diff --git a/.babelrc b/.babelrc
new file mode 100644
index 0000000..a2f61d0
--- /dev/null
+++ b/.babelrc
@@ -0,0 +1,22 @@
+{
+  "presets": [
+    // Includes plugins to use the latest versions of JavaScript.
+    ["@babel/preset-env", { "modules": false }],
+    // Includes multiple plugins used for TypeScript.
+    "@babel/preset-typescript",
+    // Includes multiple plugins used for React.
+    "@babel/preset-react"
+  ],
+  "plugins": [
+    // Allows the use of class properties.
+    "@babel/plugin-proposal-class-properties",
+    // Allows the use of decorators.
+    ["@babel/plugin-proposal-decorators", {"decoratorsBeforeExport": true}],
+    // Allows the use of ES6 spread operators.
+    "@babel/plugin-proposal-object-rest-spread",
+    // Support Webpack's import() feature, which uses Promises.
+    "@babel/plugin-syntax-dynamic-import",
+    // Supports transforming JSX syntax into JavaScript.
+    "@babel/plugin-transform-react-jsx"
+  ]
+}
diff --git a/.coveragerc b/.coveragerc
new file mode 100644
index 0000000..78eb3ee
--- /dev/null
+++ b/.coveragerc
@@ -0,0 +1,27 @@
+[run]
+include = appengine/monorail/*
+omit =
+    # Add monorail's third-party packages and worst offenders
+    ./appengine/monorail/third_party/*
+    ./appengine/monorail/lib/*
+    ./appengine/monorail/testing/*
+    ./appengine/monorail/**/test/*
+[report]
+exclude_lines =
+    # Have to re-enable the standard pragma
+    pragma: no cover
+
+    # Don't complain about missing debug-only code:
+    def __repr__
+    if self\.debug
+
+    # Don't complain if tests don't hit defensive assertion code:
+    raise AssertionError
+    raise NotImplementedError
+
+    # Don't complain if non-runnable code isn't run:
+    if 0:
+    if __name__ == ['"]__main__['"]:
+
+[expect_tests]
+expected_coverage_min = 84
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000..7b0e283
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,42 @@
+{
+    "extends": [
+        "eslint:recommended",
+        "plugin:react/recommended",
+        "google",
+        "plugin:@typescript-eslint/recommended",
+        "prettier",
+        "plugin:css-modules/recommended"
+    ],
+    "plugins": ["react", "css-modules", "jsx-a11y", "@typescript-eslint"],
+    "env": {
+        "es6": true
+    },
+    "parser": "@typescript-eslint/parser",
+    "parserOptions": {
+        "ecmaFeatures": {
+        "jsx": true
+        },
+        "ecmaVersion": 12,
+        "sourceType": "module"
+    },
+    "settings": {
+        "react": {
+            "version": "detect"
+        }
+    },
+    "rules": {
+        "react/display-name": "off"
+    },
+    "overrides": [
+        {
+          "files": ["*.ts", "*.tsx"],
+          "rules": {
+            "valid-jsdoc": ["error", {
+                "requireReturnType": false,
+                "requireParamType": false,
+                "requireReturn": false
+            }]
+          }
+        }
+    ]
+}
\ No newline at end of file
diff --git a/.expect_tests.cfg b/.expect_tests.cfg
new file mode 100644
index 0000000..bcf0e2a
--- /dev/null
+++ b/.expect_tests.cfg
@@ -0,0 +1,5 @@
+[expect_tests]
+skip=
+  components
+  gae_ts_mon
+  third_party
diff --git a/.expect_tests_pretest.py b/.expect_tests_pretest.py
new file mode 100644
index 0000000..75456cd
--- /dev/null
+++ b/.expect_tests_pretest.py
@@ -0,0 +1,70 @@
+# 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.
+
+# pylint: disable=undefined-variable
+
+import os
+import sys
+
+
+def _fix_sys_path_for_appengine(pretest_filename):
+  """Adds the App Engine built-in libraries to sys.path."""
+  # Scan the path to this file to locate the infra repo base directory.
+  infra_base_dir = os.path.abspath(pretest_filename)
+  pos = infra_base_dir.rfind('/infra/appengine')
+  if pos == -1:
+    return
+  infra_base_dir = infra_base_dir[:pos + len('/infra')]
+
+  # Remove the base infra directory from the path, since this isn't available
+  # on appengine.
+  sys.path.remove(infra_base_dir)
+
+  # Add the google_appengine directory.
+  pretest_APPENGINE_ENV_PATH = os.path.join(
+      os.path.dirname(infra_base_dir), 'gcloud', 'platform', 'google_appengine')
+  sys.path.insert(0, pretest_APPENGINE_ENV_PATH)
+
+  # Unfortunate hack, because of appengine.
+  import dev_appserver as pretest_dev_appserver
+  pretest_dev_appserver.fix_sys_path()
+
+  # Remove google_appengine SDK from sys.path after use.
+  sys.path.remove(pretest_APPENGINE_ENV_PATH)
+
+  # This is not added by fix_sys_path.
+  sys.path.append(os.path.join(pretest_APPENGINE_ENV_PATH, 'lib', 'mox'))
+
+
+def _load_appengine_config(pretest_filename):
+  """Runs appengine_config.py to reproduce the App Engine environment."""
+  app_dir = os.path.abspath(os.path.dirname(pretest_filename))
+
+  # Add the application directory to sys.path.
+  inserted = False
+  if app_dir not in sys.path:
+    sys.path.insert(0, app_dir)
+    inserted = True
+
+  # import appengine_config.py, thus executing its contents.
+  import appengine_config  # Unused Variable pylint: disable=W0612
+
+  # Clean up.
+  if inserted:
+    sys.path.remove(app_dir)
+
+
+# Using pretest_filename is magic, because it is available in the locals() of
+# the script which execfiles this file.
+_fix_sys_path_for_appengine(pretest_filename)
+
+os.environ['SERVER_SOFTWARE'] = 'test ' + os.environ.get('SERVER_SOFTWARE', '')
+os.environ['CURRENT_VERSION_ID'] = 'test.123'
+os.environ.setdefault('NO_GCE_CHECK', 'True')
+
+# Load appengine_config from the appengine project to ensure that any changes to
+# configuration there are available to the tests (e.g. sys.path modifications,
+# namespaces, etc.). This is according to
+# https://cloud.google.com/appengine/docs/python/tools/localunittesting
+_load_appengine_config(pretest_filename)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6d1d762
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,40 @@
+# TODO: Add comments/docs for these.
+.*\.py[co]
+.*\.pyc-2.4
+.*~
+.*\.orig
+.*\.swp
+.*\#.*
+.*@.*
+.nyc_output
+index\.yaml
+REVISION
+.coverage
+coverage
+htmlcov
+.DS_Store
+workspace.xml
+static_src/**/*\.min.js*
+static/dist
+node_modules
+elements/mock-data/*\.json
+!elements/mock-data/gates-mock.json
+app.yaml
+app.prod.yaml
+module-besearch.yaml
+besearch.prod.yaml
+besearch.yaml
+module-latency-insensitive.yaml
+latency-insensitive.prod.yaml
+latency-insensitive.yaml
+module-api.yaml
+templates/webpack-out
+full_results.json
+
+# Python 3 virtual environment. Created with `python3 -m venv venv`.
+venv/
+venv3/
+
+# Python third-party libraries.
+# https://cloud.google.com/appengine/docs/standard/python3/specifying-dependencies
+lib
diff --git a/.prettierrc.json b/.prettierrc.json
new file mode 100644
index 0000000..92cde39
--- /dev/null
+++ b/.prettierrc.json
@@ -0,0 +1,3 @@
+{
+  "singleQuote": true
+}
\ No newline at end of file
diff --git a/.style.yapf b/.style.yapf
new file mode 100644
index 0000000..269576a
--- /dev/null
+++ b/.style.yapf
@@ -0,0 +1,6 @@
+[style]
+based_on_style = chromium
+
+# Full list of knobs: https://github.com/google/yapf#knobs
+split_before_first_argument = true
+split_all_comma_separated_values = false
diff --git a/.testcoveragerc b/.testcoveragerc
new file mode 100644
index 0000000..04cf5e9
--- /dev/null
+++ b/.testcoveragerc
@@ -0,0 +1,23 @@
+# TODO(ehmaldonado): Consider including tests in .coveragerc once we get closer
+# to 100%.
+[run]
+include = appengine/monorail/**/test/*
+[report]
+exclude_lines =
+    # Have to re-enable the standard pragma
+    pragma: no cover
+
+    # Don't complain about missing debug-only code:
+    def __repr__
+    if self\.debug
+
+    # Don't complain if tests don't hit defensive assertion code:
+    raise AssertionError
+    raise NotImplementedError
+
+    # Don't complain if non-runnable code isn't run:
+    if 0:
+    if __name__ == ['"]__main__['"]:
+
+[expect_tests]
+expected_coverage_min = 100
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f94295e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,227 @@
+# 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
+
+# Makefile to simplify some common AppEngine actions.
+# Use 'make help' for a list of commands.
+
+DEVID = monorail-dev
+STAGEID= monorail-staging
+PRODID= monorail-prod
+
+GAE_PY?= python gae.py
+DEV_APPSERVER_FLAGS?= --watcher_ignore_re="(.*/lib|.*/node_modules|.*/third_party|.*/venv)"
+
+WEBPACK_PATH := ./node_modules/webpack-cli/bin/cli.js
+
+TARDIR ?= "/workspace"
+
+FRONTEND_MODULES?= default
+BACKEND_MODULES?= besearch latency-insensitive api
+
+BRANCH_NAME := $(shell git rev-parse --abbrev-ref HEAD)
+
+PY_DIRS = api,businesslogic,features,framework,project,proto,search,services,sitewide,testing,tracker
+
+_VERSION ?= $(shell ../../../infra/luci/appengine/components/tools/calculate_version.py)
+
+SPIN = $(shell command -v spin 2> /dev/null)
+
+default: help
+
+check:
+ifndef NPM_VERSION
+	$(error npm not found. Install from nodejs.org or see README)
+endif
+
+help:
+	@echo "Available commands:"
+	@sed -n '/^[a-zA-Z0-9_.]*:/s/:.*//p' <Makefile
+
+# Run "eval `../../go/env.py`" before running the following prpc_proto commands
+prpc_proto_v0:
+	touch ../../ENV/lib/python2.7/site-packages/google/__init__.py
+	PYTHONPATH=../../ENV/lib/python2.7/site-packages \
+	PATH=../../luci/appengine/components/tools:$(PATH) \
+	../../cipd/protoc \
+	--python_out=. --prpc-python_out=. api/api_proto/*.proto
+	cd ../../go/src/infra/monorailv2 && \
+	cproto -proto-path ../../../../appengine/monorail/ ../../../../appengine/monorail/api/api_proto/
+prpc_proto_v3:
+	touch ../../ENV/lib/python2.7/site-packages/google/__init__.py
+	PYTHONPATH=../../ENV/lib/python2.7/site-packages \
+	PATH=../../luci/appengine/components/tools:$(PATH) \
+	../../cipd/protoc \
+	--python_out=. --prpc-python_out=. api/v3/api_proto/*.proto
+	cd ../../go/src/infra/monorailv2 && \
+	cproto -proto-path ../../../../appengine/monorail/ ../../../../appengine/monorail/api/v3/api_proto/
+
+business_proto:
+	touch ../../ENV/lib/python2.7/site-packages/google/__init__.py
+	PYTHONPATH=../../ENV/lib/python2.7/site-packages \
+	PATH=../../luci/appengine/components/tools:$(PATH) \
+	../../cipd/protoc \
+	--python_out=. --prpc-python_out=. proto/*.proto
+
+test:
+	../../test.py test appengine/monorail
+
+test_no_coverage:
+	../../test.py test appengine/monorail --no-coverage
+
+coverage:
+	@echo "Running tests + HTML coverage report in ~/monorail-coverage:"
+	../../test.py test appengine/monorail --html-report ~/monorail-coverage --coveragerc appengine/monorail/.coveragerc
+
+# Shows coverage on the tests themselves, helps illuminate when we have test
+# methods that aren't used.
+test_coverage:
+	@echo "Running tests + HTML coverage report (for tests) in ~/monorail-test-coverage:"
+	../../test.py test appengine/monorail --html-report ~/monorail-test-coverage --coveragerc appengine/monorail/.testcoveragerc
+
+# Commands for running locally using dev_appserver.
+# devserver requires an application ID (-A) to be specified.
+# We are using `-A monorail-staging` because ml spam code is set up
+# to impersonate monorail-staging in the local environment.
+serve: config_local
+	@echo "---[Starting SDK AppEngine Server]---"
+	$(GAE_PY) devserver -A monorail-staging -- $(DEV_APPSERVER_FLAGS)& $(WEBPACK_PATH) --watch
+
+serve_email: config_local
+	@echo "---[Starting SDK AppEngine Server]---"
+	$(GAE_PY) devserver -A monorail-staging -- $(DEV_APPSERVER_FLAGS) --enable_sendmail=True& $(WEBPACK_PATH) --watch
+
+# The _remote commands expose the app on 0.0.0.0, so that it is externally
+# accessible by hostname:port, rather than just localhost:port.
+serve_remote: config_local
+	@echo "---[Starting SDK AppEngine Server]---"
+	$(GAE_PY) devserver -A monorail-staging -o -- $(DEV_APPSERVER_FLAGS)& $(WEBPACK_PATH) --watch
+
+serve_remote_email: config_local
+	@echo "---[Starting SDK AppEngine Server]---"
+	$(GAE_PY) devserver -A monorail-staging -o -- $(DEV_APPSERVER_FLAGS) --enable_sendmail=True& $(WEBPACK_PATH) --watch
+
+run: serve
+
+deps: node_deps
+	rm -f static/dist/*
+
+build_js:
+	$(WEBPACK_PATH) --mode=production
+
+clean_deps:
+	rm -rf node_modules
+
+node_deps:
+	npm ci --no-save
+
+dev_deps:
+	python -m pip install --no-deps -r requirements.dev.txt
+
+karma:
+	npx karma start --debug --coverage
+
+karma_debug:
+	npx karma start --debug
+
+pylint:
+	pylint -f parseable *py {$(PY_DIRS)}{/,/test/}*py
+
+py3lint:
+	pylint --py3k *py {$(PY_DIRS)}{/,/test/}*py
+
+config: config_prod_cloud config_staging_cloud config_dev_cloud
+
+# Service yaml files used by gae.py are expected to be named module-<service-name>.yaml
+config_prod:
+	m4 -DPROD < app.yaml.m4 > app.yaml
+	m4 -DPROD < module-besearch.yaml.m4 > module-besearch.yaml
+	m4 -DPROD < module-latency-insensitive.yaml.m4 > module-latency-insensitive.yaml
+	m4 -DPROD < module-api.yaml.m4 > module-api.yaml
+
+# Generate yaml files used by spinnaker.
+config_prod_cloud:
+	m4 -DPROD < app.yaml.m4 > app.prod.yaml
+	m4 -DPROD < module-besearch.yaml.m4 > besearch.prod.yaml
+	m4 -DPROD < module-latency-insensitive.yaml.m4 > latency-insensitive.prod.yaml
+	m4 -DPROD < module-api.yaml.m4 > api.prod.yaml
+
+config_staging:
+	m4 -DSTAGING < app.yaml.m4 > app.yaml
+	m4 -DSTAGING < module-besearch.yaml.m4 > module-besearch.yaml
+	m4 -DSTAGING < module-latency-insensitive.yaml.m4 > module-latency-insensitive.yaml
+	m4 -DSTAGING < module-api.yaml.m4 > module-api.yaml
+
+config_staging_cloud:
+	m4 -DSTAGING < app.yaml.m4 > app.staging.yaml
+	m4 -DSTAGING < module-besearch.yaml.m4 > besearch.staging.yaml
+	m4 -DSTAGING < module-latency-insensitive.yaml.m4 > latency-insensitive.staging.yaml
+	m4 -DSTAGING < module-api.yaml.m4 > api.staging.yaml
+
+config_dev:
+	m4 -DDEV < app.yaml.m4 > app.yaml
+	m4 -DDEV < module-besearch.yaml.m4 > module-besearch.yaml
+	m4 -DDEV < module-latency-insensitive.yaml.m4 > module-latency-insensitive.yaml
+	m4 -DDEV < module-api.yaml.m4 > module-api.yaml
+
+config_dev_cloud:
+	m4 -DDEV < app.yaml.m4 > app.yaml
+	m4 -DDEV < module-besearch.yaml.m4 > besearch.yaml
+	m4 -DDEV < module-latency-insensitive.yaml.m4 > latency-insensitive.yaml
+	m4 -DDEV < module-api.yaml.m4 > api.yaml
+
+config_local:
+	m4 app.yaml.m4 > app.yaml
+	m4 module-besearch.yaml.m4 > module-besearch.yaml
+	m4 module-latency-insensitive.yaml.m4 > module-latency-insensitive.yaml
+	m4 module-api.yaml.m4 > module-api.yaml
+
+deploy_dev: clean_deps deps build_js config_dev
+	$(eval BRANCH_NAME := $(shell git rev-parse --abbrev-ref HEAD))
+	@echo "---[Dev $(DEVID)]---"
+	$(GAE_PY) upload --tag $(BRANCH_NAME) -A $(DEVID) $(FRONTEND_MODULES) $(BACKEND_MODULES)
+
+deploy_cloud_dev: clean_deps deps build_js config
+	$(eval GCB_DIR:= $(shell mktemp -d -p /tmp monorail_XXXXX))
+	rsync -aLK . $(GCB_DIR)  # Dereferences symlinks before snapshotting.
+	cd $(GCB_DIR) && tar cf ${_VERSION}.tar .
+	gsutil cp $(GCB_DIR)/${_VERSION}.tar gs://chrome-infra-builds/monorail/dev
+	rm -rf $(GCB_DIR)
+
+
+deploy:
+ifeq ($(SPIN),)
+	$(error "please install spin go/chops-install-spin")
+endif
+	$(SPIN) pipeline execute --name "Deploy Monorail" --application monorail
+	@echo "Follow progress here: https://spinnaker-1.endpoints.chrome-infra-spinnaker.cloud.goog/#/applications/monorail/executions"
+
+external_deps: clean_deps deps build_js config
+
+package_release:
+	rsync -aLK . $(TARDIR)/package
+
+
+
+lsbuilds:
+	gcloud builds list --filter="tags='monorail'"
+
+# AppEngine apps can be tested locally and in non-default versions upload to
+# the main app-id, but it is still sometimes useful to have a completely
+# separate app-id.  E.g., for testing inbound email, load testing, or using
+# throwaway databases.
+deploy_staging: clean_deps deps build_js config_staging
+	@echo "---[Staging $(STAGEID)]---"
+	$(GAE_PY) upload -A $(STAGEID) $(FRONTEND_MODULES) $(BACKEND_MODULES)
+
+# This is our production server that users actually use.
+deploy_prod: clean_deps deps build_js config_prod
+	@echo "---[Deploying prod instance $(PRODID)]---"
+	$(GAE_PY) upload -A $(PRODID) $(FRONTEND_MODULES) $(BACKEND_MODULES)
+
+# Note that we do not provide a command-line way to make the newly-uploaded
+# version the default version. This is for two reasons: a) You should be using
+# your browser to confirm that the new version works anyway, so just use the
+# console interface to make it the default; and b) If you really want to use
+# the command line you can use gae.py directly.
diff --git a/OWNERS b/OWNERS
new file mode 100644
index 0000000..c1c4c60
--- /dev/null
+++ b/OWNERS
@@ -0,0 +1,17 @@
+ajp@google.com
+ajp@chromium.org
+andrewjc@google.com
+andrewjc@chromium.org
+dtu@google.com
+dtu@chromium.org
+jessan@google.com
+jessan@chromium.org
+jojwang@google.com
+jojwang@chromium.org
+jrobbins@chromium.org
+kweng@google.com
+kweng@chromium.org
+pawalls@google.com
+pawalls@chromium.org
+zhangtiff@google.com
+zhangtiff@chromium.org
diff --git a/PRESUBMIT.py b/PRESUBMIT.py
new file mode 100644
index 0000000..7d60203
--- /dev/null
+++ b/PRESUBMIT.py
@@ -0,0 +1,35 @@
+# Copyright 2020 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
+
+
+def CheckChange(input_api, output_api):
+  results = []
+  results += input_api.canned_checks.CheckDoNotSubmit(input_api, output_api)
+  results += input_api.canned_checks.CheckChangeHasNoTabs(input_api, output_api)
+  results += CheckNpmAudit(input_api, output_api)
+  return results
+
+
+def CheckChangeOnUpload(input_api, output_api):
+  return CheckChange(input_api, output_api)
+
+
+def CheckChangeOnCommit(input_api, output_api):
+  return CheckChange(input_api, output_api)
+
+
+def CheckNpmAudit(input_api, output_api):  # pragma: no cover
+  file_filter = lambda f: f.LocalPath().endswith('.js')
+  affected_js_files = input_api.AffectedFiles(
+      include_deletes=False, file_filter=file_filter)
+  if not affected_js_files:
+    return []
+
+  import imp
+  appengine_path = input_api.os_path.dirname(input_api.PresubmitLocalPath())
+  js_checker_path = input_api.os_path.join(appengine_path, 'js_checker.py')
+  js_checker = imp.load_source('JSChecker', js_checker_path)
+
+  return js_checker.JSChecker(input_api, output_api).RunAuditCheck()
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..529a65d
--- /dev/null
+++ b/README.md
@@ -0,0 +1,202 @@
+# Monorail Issue Tracker
+
+Monorail is the Issue Tracker used by the Chromium project and other related
+projects. It is hosted at [bugs.chromium.org](https://bugs.chromium.org).
+
+If you wish to file a bug against Monorail itself, please do so in our
+[self-hosting tracker](https://bugs.chromium.org/p/monorail/issues/entry).
+We also discuss development of Monorail at `infra-dev@chromium.org`.
+
+# Getting started with Monorail development
+
+*For Googlers:* Monorail's codebase is open source and can be installed locally on your workstation of choice.
+
+Here's how to run Monorail locally for development on MacOS and Debian stretch/buster or its derivatives.
+
+1.  You need to [get the Chrome Infra depot_tools commands](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up) to check out the source code and all its related dependencies and to be able to send changes for review.
+1.  Check out the Monorail source code
+    1.  `cd /path/to/empty/workdir`
+    1.  `fetch infra`
+    1.  `cd infra/appengine/monorail`
+1.  Make sure you have the AppEngine SDK:
+    1.  It should be fetched for you by step 1 above (during runhooks)
+    1.  Otherwise, you can download it from https://developers.google.com/appengine/downloads#Google_App_Engine_SDK_for_Python
+1.  Spin up dependent services.
+    1. We use docker and docker-compose to orchestrate. So install [docker](https://docs.docker.com/get-docker/) and [docker-compose](https://docs.docker.com/compose/install/) first. For glinux users see [go/docker](http://go/docker)
+    1.  Make sure to authenticate with the App Engine SDK and configure Docker. This is needed to install Cloud Tasks Emulator.
+        1.  `gcloud auth login`
+        1.  `gcloud auth configure-docker`
+    1. Run `docker-compose -f dev-services.yml up -d`. This should spin up:
+        1. MySQL v5.6
+        1. Redis
+        1. Cloud Tasks Emulator
+            1. [TODO](https://github.com/aertje/cloud-tasks-emulator/issues/4) host this publicly and remove section.
+            1. This will require you to authenticate to Google Container Registry to pull the docker image: `gcloud auth login` `gcloud auth configure-docker`. If you're an open source developer and do not have access to the monorail project and thereby its container registry you will need to start the Cloud Tasks Emulator from [source](https://github.com/aertje/cloud-tasks-emulator)
+1.  Set up SQL database. (You can keep the same sharding options in settings.py that you have configured for production.).
+    1. Copy setup schema into the docker container
+        1.  `docker cp schema/. mysql:/schema`
+        1.  `docker exec -it mysql bash`
+        1.  `mysql --user=root monorail < schema/framework.sql`
+        1.  `mysql --user=root monorail < schema/project.sql`
+        1.  `mysql --user=root monorail < schema/tracker.sql`
+        1.  `exit`
+1.  Configure the site defaults in settings.py.  You can leave it as-is for now.
+1.  Set up the front-end development environment:
+    1. On Debian
+        1.  ``eval `../../go/env.py` `` -- you'll need to run this in any shell you
+            wish to use for developing Monorail. It will add some key directories to
+            your `$PATH`.
+        1.  Install build requirements:
+            1.  `sudo apt-get install build-essential automake`
+    1. On MacOS
+        1.  Install node and npm
+            1.  Install node version manager `brew install nvm`
+            1.  See the brew instructions on updating your shell's configuration
+            1.  Install node and npm `nvm install 12.13.0`
+1.  Install Python and JS dependencies:
+    1.  Install MySQL, needed for mysqlclient
+        1. For mac: `brew install mysql@5.6`
+        1. For Debian derivatives, download and unpack [this bundle](https://dev.mysql.com/get/Downloads/MySQL-5.6/mysql-server_5.6.40-1ubuntu14.04_amd64.deb-bundle.tar): `tar -xf mysql-server_5.6.40-1ubuntu14.04_amd64.deb-bundle.tar`. Install the packages in the order of `mysql-common`,`mysql-community-client`, `mysql-client`, then `mysql-community-server`.
+    1.  Optional: You may need to install `pip`. You can verify whether you have it installed with `which pip`.
+        1. `curl -O https://bootstrap.pypa.io/2.7/get-pip.py`
+        1. `sudo python get-pip.py`
+    1.  Optional: Use `virtualenv` to keep from modifying system dependencies.
+        1. `sudo pip install virtualenv`
+        1. `virtualenv venv` to set up virtualenv within your monorail directory.
+        1. `source venv/bin/activate` to activate it, needed in each terminal instance of the directory.
+    1.  Mac only: install [libssl](https://github.com/PyMySQL/mysqlclient-python/issues/74), needed for mysqlclient.
+        1. `brew install openssl; export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/`
+    1.  `make dev_deps`
+    1.  `make deps`
+1.  Run the app:
+    1.  `make serve`
+1.  Browse the app at localhost:8080 your browser.
+1.  Optional: Create/modify your Monorail User row in the database and make that user a site admin. You will need to be a site admin to gain access to create projects through the UI.
+    1.  `docker exec mysql mysql --user=root monorail -e "UPDATE User SET is_site_admin = TRUE WHERE email = 'test@example.com';"`
+    1.  If the admin change isn't immediately apparent, you may need to restart your local dev appserver.
+
+Instructions for deploying Monorail to an existing instance or setting up a new instance are [here](doc/deployment.md).
+
+Here's how to run unit tests from the command-line:
+
+## Testing
+
+To run all Python unit tests, in the `appengine/monorail` directory run:
+
+```
+make test
+```
+
+For quick debugging, if you need to run just one test you can do the following. For instance for the test
+`IssueServiceTest.testUpdateIssues_Normal` in `services/test/issue_svc_test.py`:
+
+```
+../../test.py test appengine/monorail:services.test.issue_svc_test.IssueServiceTest.testUpdateIssues_Normal --no-coverage
+```
+
+### Frontend testing
+
+To run the frontend tests for Monorail, you first need to set up your Go environment. From the Monorail directory, run:
+
+```
+eval `../../go/env.py`
+```
+
+Then, to run the frontend tests, run:
+
+```
+make karma
+```
+
+If you want to skip the coverage for karma, run:
+```
+make karma_debug
+```
+
+To run only one test or a subset of tests, you can add `.only` to the test
+function you want to isolate:
+
+```javascript
+// Run one test.
+it.only(() => {
+  ...
+});
+
+// Run a subset of tests.
+describe.only(() => {
+  ...
+});
+```
+
+Just remember to remove them before you upload your CL.
+
+## Troubleshooting
+
+*   `BindError: Unable to bind localhost:8080`
+
+This error occurs when port 8080 is already being used by an existing process. Oftentimes,
+this is a leftover Monorail devserver process from a past run. To quit whatever process is
+on port 8080, you can run `kill $(lsof -ti:8080)`.
+
+*   `TypeError: connect() got an unexpected keyword argument 'charset'`
+
+This error occurs when `dev_appserver` cannot find the MySQLdb library.  Try installing it via <code>sudo apt-get install python-mysqldb</code>.
+
+*   `TypeError: connect() argument 6 must be string, not None`
+
+This occurs when your mysql server is not running.  Check if it is running with `ps aux | grep mysqld`.  Start it up with <code>/etc/init.d/mysqld start </code>on linux, or just <code>mysqld</code>.
+
+*   dev_appserver says `OSError: [Errno 24] Too many open files` and then lists out all source files
+
+dev_appserver wants to reload source files that you have changed in the editor, however that feature does not seem to work well with multiple GAE modules and instances running in different processes.  The workaround is to control-C or `kill` the dev_appserver processes and restart them.
+
+*   `IntegrityError: (1364, "Field 'comment_id' doesn't have a default value")` happens when trying to file or update an issue
+
+In some versions of SQL, the `STRICT_TRANS_TABLES` option is set by default. You'll have to disable this option to stop this error.
+
+*   `ImportError: No module named six.moves`
+
+You may not have six.moves in your virtual environment and you may need to install it.
+
+1.  Determine that python and pip versions are possibly in vpython-root
+    1.  `which python`
+    1.  `which pip`
+1.  If your python and pip are in vpython-root
+    1.  ```sudo `which python` `which pip` install six```
+
+# Development resources
+
+## Supported browsers
+
+Monorail supports all browsers defined in the [Chrome Ops guidelines](https://chromium.googlesource.com/infra/infra/+/main/doc/front_end.md).
+
+File a browser compatability bug
+[here](https://bugs.chromium.org/p/monorail/issues/entry?labels=Type-Defect,Priority-Medium,BrowserCompat).
+
+## Frontend code practices
+
+See: [Monorail Frontend Code Practices](doc/code-practices/frontend.md)
+
+## Monorail's design
+
+* [Monorail Data Storage](doc/design/data-storage.md)
+* [Monorail Email Design](doc/design/emails.md)
+* [How Search Works in Monorail](doc/design/how-search-works.md)
+* [Monorail Source Code Organization](doc/design/source-code-organization.md)
+* [Monorail Testing Strategy](doc/design/testing-strategy.md)
+
+## Triage process
+
+See: [Monorail Triage Guide](doc/triage.md).
+
+## Release process
+
+See: [Monorail Deployment](doc/deployment.md)
+
+# User guide
+
+For information on how to use Monorail, see the [Monorail User Guide](doc/userguide/README.md).
+
+## Setting up a new instance of Monorail
+
+See: [Creating a new Monorail instance](doc/instance.md)
diff --git a/api/README.md b/api/README.md
new file mode 100644
index 0000000..dfb4cca
--- /dev/null
+++ b/api/README.md
@@ -0,0 +1,51 @@
+# Monorail pRPC API
+
+This directory holds all the source for the Monorail pRPC API. This API is
+implemented using `.proto` files to describe a `gRPC` interface (services,
+methods, and request/response messages). It then uses a shim which
+converts the
+[`gRPC` server](http://www.grpc.io/docs/tutorials/basic/python.html)
+(which doesn't work on AppEngine, due to lack of support for HTTP/2) into a
+[`pRPC` server](https://godoc.org/github.com/luci/luci-go/grpc/prpc) which
+supports communication over HTTP/1.1, as well as text and JSON IO.
+
+## Getting Started
+
+In order to make API requests, your client needs to either:
+
+- Present an OAuth token generated by an allowed client ID or email.
+- Provide a XSRF token.
+- [For local dev only] Send a test account header, as used by `test_call`
+  described below.
+
+## Making requests
+
+You can make anonymous requests to a server running locally like this:
+
+```bash
+$ ./api/test_call monorail.Users GetUser '{"email": "test@example.com"}'
+```
+
+Requests that require a signed-in user can be tested locally like this:
+
+```bash
+$ ./api/test_call monorail.Issues GetIssue \
+  '{"issue_ref": {"project_name": "rutabaga", "local_id": 1}}' \
+  --test-account=test@example.com
+```
+
+## API Documentation
+
+All methods, request parameters, and responses are documented in
+[./api_proto](./api_proto).
+
+# Development
+
+## Regenerating Python from Protocol Buffers
+
+In order to regenerate the python server and client stubs from the `.proto`
+files, run this command:
+
+```bash
+$ make prpc_proto_v0
+```
diff --git a/api/__init__.py b/api/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/api/__init__.py
diff --git a/api/api_proto/__init__.py b/api/api_proto/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/api/api_proto/__init__.py
diff --git a/api/api_proto/common.proto b/api/api_proto/common.proto
new file mode 100644
index 0000000..0ff0750
--- /dev/null
+++ b/api/api_proto/common.proto
@@ -0,0 +1,109 @@
+// Copyright 2018 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
+
+// This file defines small protobufs that are included as parts of
+// multiple services or *_objects.proto PBs.
+//
+// "Ref" objects contain enough information for a UI to display
+// something to the user, and identifying info so that the client can
+// request more info from the server.
+
+syntax = "proto3";
+
+package monorail;
+
+
+// Next available tag: 3
+message ComponentRef {
+  string path = 1;
+  bool is_derived = 2;
+}
+
+
+// Next available tag: 9
+enum FieldType {
+  NO_TYPE = 0;
+  ENUM_TYPE = 1;
+  INT_TYPE = 2;
+  STR_TYPE = 3;
+  USER_TYPE = 4;
+  DATE_TYPE = 5;
+  BOOL_TYPE = 6;
+  URL_TYPE = 7;
+  APPROVAL_TYPE = 8;
+}
+
+
+// Next available tag: 5
+message FieldRef {
+  // TODO(crbug.com/monorail/4062): Don't use field IDs to identify fields.
+  uint64 field_id = 1;
+  string field_name = 2;
+  FieldType type = 3;
+  string approval_name = 4;
+}
+
+
+// Next available tag: 3
+message LabelRef {
+  string label = 1;
+  bool is_derived = 2;
+}
+
+
+// Next available tag: 4
+message StatusRef {
+  string status = 1;
+  bool means_open = 2;
+  bool is_derived = 3;
+}
+
+
+// Next available tag: 4
+message IssueRef {
+  string project_name = 1;
+  uint32 local_id = 2;
+  string ext_identifier = 3; // For referencing external issues, e.g. b/1234.
+}
+
+
+// Next available tag: 4
+message UserRef {
+  uint64 user_id = 1;
+  string display_name = 2;  // email, or obscured like "usern...@example.com".
+  bool is_derived = 3;
+}
+
+
+// Next available tag: 4
+message HotlistRef {
+  // TODO(4131): Don't use hotlist IDs to identify hotlists.
+  uint64 hotlist_id = 1;
+  string name = 2;
+  UserRef owner = 3;
+}
+
+
+// Next available tag: 3
+message ValueAndWhy {
+  string value = 1;
+  string why = 2;
+}
+
+
+// Next available tag: 3
+message Pagination {
+  uint32 max_items = 1;
+  uint32 start = 2;
+}
+
+
+// Next available tag: 5
+message SavedQuery {
+  uint64 query_id = 1;
+  string name = 2;
+  string query = 3;
+  repeated string project_names = 4;
+}
diff --git a/api/api_proto/common_pb2.py b/api/api_proto/common_pb2.py
new file mode 100644
index 0000000..1d31b51
--- /dev/null
+++ b/api/api_proto/common_pb2.py
@@ -0,0 +1,610 @@
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/api_proto/common.proto
+
+import sys
+_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
+from google.protobuf.internal import enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/api_proto/common.proto',
+  package='monorail',
+  syntax='proto3',
+  serialized_options=None,
+  serialized_pb=_b('\n\x1a\x61pi/api_proto/common.proto\x12\x08monorail\"0\n\x0c\x43omponentRef\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x12\n\nis_derived\x18\x02 \x01(\x08\"j\n\x08\x46ieldRef\x12\x10\n\x08\x66ield_id\x18\x01 \x01(\x04\x12\x12\n\nfield_name\x18\x02 \x01(\t\x12!\n\x04type\x18\x03 \x01(\x0e\x32\x13.monorail.FieldType\x12\x15\n\rapproval_name\x18\x04 \x01(\t\"-\n\x08LabelRef\x12\r\n\x05label\x18\x01 \x01(\t\x12\x12\n\nis_derived\x18\x02 \x01(\x08\"C\n\tStatusRef\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x12\n\nmeans_open\x18\x02 \x01(\x08\x12\x12\n\nis_derived\x18\x03 \x01(\x08\"J\n\x08IssueRef\x12\x14\n\x0cproject_name\x18\x01 \x01(\t\x12\x10\n\x08local_id\x18\x02 \x01(\r\x12\x16\n\x0e\x65xt_identifier\x18\x03 \x01(\t\"D\n\x07UserRef\x12\x0f\n\x07user_id\x18\x01 \x01(\x04\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\nis_derived\x18\x03 \x01(\x08\"P\n\nHotlistRef\x12\x12\n\nhotlist_id\x18\x01 \x01(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\x12 \n\x05owner\x18\x03 \x01(\x0b\x32\x11.monorail.UserRef\")\n\x0bValueAndWhy\x12\r\n\x05value\x18\x01 \x01(\t\x12\x0b\n\x03why\x18\x02 \x01(\t\".\n\nPagination\x12\x11\n\tmax_items\x18\x01 \x01(\r\x12\r\n\x05start\x18\x02 \x01(\r\"R\n\nSavedQuery\x12\x10\n\x08query_id\x18\x01 \x01(\x04\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\r\n\x05query\x18\x03 \x01(\t\x12\x15\n\rproject_names\x18\x04 \x03(\t*\x91\x01\n\tFieldType\x12\x0b\n\x07NO_TYPE\x10\x00\x12\r\n\tENUM_TYPE\x10\x01\x12\x0c\n\x08INT_TYPE\x10\x02\x12\x0c\n\x08STR_TYPE\x10\x03\x12\r\n\tUSER_TYPE\x10\x04\x12\r\n\tDATE_TYPE\x10\x05\x12\r\n\tBOOL_TYPE\x10\x06\x12\x0c\n\x08URL_TYPE\x10\x07\x12\x11\n\rAPPROVAL_TYPE\x10\x08\x62\x06proto3')
+)
+
+_FIELDTYPE = _descriptor.EnumDescriptor(
+  name='FieldType',
+  full_name='monorail.FieldType',
+  filename=None,
+  file=DESCRIPTOR,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='NO_TYPE', index=0, number=0,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='ENUM_TYPE', index=1, number=1,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='INT_TYPE', index=2, number=2,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='STR_TYPE', index=3, number=3,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='USER_TYPE', index=4, number=4,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='DATE_TYPE', index=5, number=5,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='BOOL_TYPE', index=6, number=6,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='URL_TYPE', index=7, number=7,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='APPROVAL_TYPE', index=8, number=8,
+      serialized_options=None,
+      type=None),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=718,
+  serialized_end=863,
+)
+_sym_db.RegisterEnumDescriptor(_FIELDTYPE)
+
+FieldType = enum_type_wrapper.EnumTypeWrapper(_FIELDTYPE)
+NO_TYPE = 0
+ENUM_TYPE = 1
+INT_TYPE = 2
+STR_TYPE = 3
+USER_TYPE = 4
+DATE_TYPE = 5
+BOOL_TYPE = 6
+URL_TYPE = 7
+APPROVAL_TYPE = 8
+
+
+
+_COMPONENTREF = _descriptor.Descriptor(
+  name='ComponentRef',
+  full_name='monorail.ComponentRef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='path', full_name='monorail.ComponentRef.path', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_derived', full_name='monorail.ComponentRef.is_derived', index=1,
+      number=2, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=40,
+  serialized_end=88,
+)
+
+
+_FIELDREF = _descriptor.Descriptor(
+  name='FieldRef',
+  full_name='monorail.FieldRef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='field_id', full_name='monorail.FieldRef.field_id', index=0,
+      number=1, type=4, cpp_type=4, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='field_name', full_name='monorail.FieldRef.field_name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='type', full_name='monorail.FieldRef.type', index=2,
+      number=3, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='approval_name', full_name='monorail.FieldRef.approval_name', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=90,
+  serialized_end=196,
+)
+
+
+_LABELREF = _descriptor.Descriptor(
+  name='LabelRef',
+  full_name='monorail.LabelRef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='label', full_name='monorail.LabelRef.label', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_derived', full_name='monorail.LabelRef.is_derived', index=1,
+      number=2, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=198,
+  serialized_end=243,
+)
+
+
+_STATUSREF = _descriptor.Descriptor(
+  name='StatusRef',
+  full_name='monorail.StatusRef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='status', full_name='monorail.StatusRef.status', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='means_open', full_name='monorail.StatusRef.means_open', index=1,
+      number=2, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_derived', full_name='monorail.StatusRef.is_derived', index=2,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=245,
+  serialized_end=312,
+)
+
+
+_ISSUEREF = _descriptor.Descriptor(
+  name='IssueRef',
+  full_name='monorail.IssueRef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.IssueRef.project_name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='local_id', full_name='monorail.IssueRef.local_id', index=1,
+      number=2, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='ext_identifier', full_name='monorail.IssueRef.ext_identifier', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=314,
+  serialized_end=388,
+)
+
+
+_USERREF = _descriptor.Descriptor(
+  name='UserRef',
+  full_name='monorail.UserRef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user_id', full_name='monorail.UserRef.user_id', index=0,
+      number=1, type=4, cpp_type=4, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='display_name', full_name='monorail.UserRef.display_name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_derived', full_name='monorail.UserRef.is_derived', index=2,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=390,
+  serialized_end=458,
+)
+
+
+_HOTLISTREF = _descriptor.Descriptor(
+  name='HotlistRef',
+  full_name='monorail.HotlistRef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlist_id', full_name='monorail.HotlistRef.hotlist_id', index=0,
+      number=1, type=4, cpp_type=4, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.HotlistRef.name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='owner', full_name='monorail.HotlistRef.owner', index=2,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=460,
+  serialized_end=540,
+)
+
+
+_VALUEANDWHY = _descriptor.Descriptor(
+  name='ValueAndWhy',
+  full_name='monorail.ValueAndWhy',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='value', full_name='monorail.ValueAndWhy.value', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='why', full_name='monorail.ValueAndWhy.why', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=542,
+  serialized_end=583,
+)
+
+
+_PAGINATION = _descriptor.Descriptor(
+  name='Pagination',
+  full_name='monorail.Pagination',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='max_items', full_name='monorail.Pagination.max_items', index=0,
+      number=1, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='start', full_name='monorail.Pagination.start', index=1,
+      number=2, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=585,
+  serialized_end=631,
+)
+
+
+_SAVEDQUERY = _descriptor.Descriptor(
+  name='SavedQuery',
+  full_name='monorail.SavedQuery',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='query_id', full_name='monorail.SavedQuery.query_id', index=0,
+      number=1, type=4, cpp_type=4, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.SavedQuery.name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='query', full_name='monorail.SavedQuery.query', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='project_names', full_name='monorail.SavedQuery.project_names', index=3,
+      number=4, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=633,
+  serialized_end=715,
+)
+
+_FIELDREF.fields_by_name['type'].enum_type = _FIELDTYPE
+_HOTLISTREF.fields_by_name['owner'].message_type = _USERREF
+DESCRIPTOR.message_types_by_name['ComponentRef'] = _COMPONENTREF
+DESCRIPTOR.message_types_by_name['FieldRef'] = _FIELDREF
+DESCRIPTOR.message_types_by_name['LabelRef'] = _LABELREF
+DESCRIPTOR.message_types_by_name['StatusRef'] = _STATUSREF
+DESCRIPTOR.message_types_by_name['IssueRef'] = _ISSUEREF
+DESCRIPTOR.message_types_by_name['UserRef'] = _USERREF
+DESCRIPTOR.message_types_by_name['HotlistRef'] = _HOTLISTREF
+DESCRIPTOR.message_types_by_name['ValueAndWhy'] = _VALUEANDWHY
+DESCRIPTOR.message_types_by_name['Pagination'] = _PAGINATION
+DESCRIPTOR.message_types_by_name['SavedQuery'] = _SAVEDQUERY
+DESCRIPTOR.enum_types_by_name['FieldType'] = _FIELDTYPE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+ComponentRef = _reflection.GeneratedProtocolMessageType('ComponentRef', (_message.Message,), dict(
+  DESCRIPTOR = _COMPONENTREF,
+  __module__ = 'api.api_proto.common_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ComponentRef)
+  ))
+_sym_db.RegisterMessage(ComponentRef)
+
+FieldRef = _reflection.GeneratedProtocolMessageType('FieldRef', (_message.Message,), dict(
+  DESCRIPTOR = _FIELDREF,
+  __module__ = 'api.api_proto.common_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.FieldRef)
+  ))
+_sym_db.RegisterMessage(FieldRef)
+
+LabelRef = _reflection.GeneratedProtocolMessageType('LabelRef', (_message.Message,), dict(
+  DESCRIPTOR = _LABELREF,
+  __module__ = 'api.api_proto.common_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.LabelRef)
+  ))
+_sym_db.RegisterMessage(LabelRef)
+
+StatusRef = _reflection.GeneratedProtocolMessageType('StatusRef', (_message.Message,), dict(
+  DESCRIPTOR = _STATUSREF,
+  __module__ = 'api.api_proto.common_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.StatusRef)
+  ))
+_sym_db.RegisterMessage(StatusRef)
+
+IssueRef = _reflection.GeneratedProtocolMessageType('IssueRef', (_message.Message,), dict(
+  DESCRIPTOR = _ISSUEREF,
+  __module__ = 'api.api_proto.common_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.IssueRef)
+  ))
+_sym_db.RegisterMessage(IssueRef)
+
+UserRef = _reflection.GeneratedProtocolMessageType('UserRef', (_message.Message,), dict(
+  DESCRIPTOR = _USERREF,
+  __module__ = 'api.api_proto.common_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.UserRef)
+  ))
+_sym_db.RegisterMessage(UserRef)
+
+HotlistRef = _reflection.GeneratedProtocolMessageType('HotlistRef', (_message.Message,), dict(
+  DESCRIPTOR = _HOTLISTREF,
+  __module__ = 'api.api_proto.common_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.HotlistRef)
+  ))
+_sym_db.RegisterMessage(HotlistRef)
+
+ValueAndWhy = _reflection.GeneratedProtocolMessageType('ValueAndWhy', (_message.Message,), dict(
+  DESCRIPTOR = _VALUEANDWHY,
+  __module__ = 'api.api_proto.common_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ValueAndWhy)
+  ))
+_sym_db.RegisterMessage(ValueAndWhy)
+
+Pagination = _reflection.GeneratedProtocolMessageType('Pagination', (_message.Message,), dict(
+  DESCRIPTOR = _PAGINATION,
+  __module__ = 'api.api_proto.common_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.Pagination)
+  ))
+_sym_db.RegisterMessage(Pagination)
+
+SavedQuery = _reflection.GeneratedProtocolMessageType('SavedQuery', (_message.Message,), dict(
+  DESCRIPTOR = _SAVEDQUERY,
+  __module__ = 'api.api_proto.common_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.SavedQuery)
+  ))
+_sym_db.RegisterMessage(SavedQuery)
+
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/api_proto/common_prpc_pb2.py b/api/api_proto/common_prpc_pb2.py
new file mode 100644
index 0000000..fb73302
--- /dev/null
+++ b/api/api_proto/common_prpc_pb2.py
@@ -0,0 +1,4 @@
+# Generated by the pRPC protocol buffer compiler plugin.  DO NOT EDIT!
+# source: api/api_proto/common.proto
+
+from google.protobuf import descriptor_pb2
diff --git a/api/api_proto/features.proto b/api/api_proto/features.proto
new file mode 100644
index 0000000..7d7f2fc
--- /dev/null
+++ b/api/api_proto/features.proto
@@ -0,0 +1,229 @@
+// Copyright 2018 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
+
+syntax = "proto3";
+
+package monorail;
+
+import "api/api_proto/common.proto";
+import "api/api_proto/features_objects.proto";
+
+
+service Features {
+  rpc ListHotlistsByUser (ListHotlistsByUserRequest) returns (ListHotlistsByUserResponse) {}
+  rpc ListHotlistsByIssue (ListHotlistsByIssueRequest) returns (ListHotlistsByIssueResponse) {}
+  rpc ListRecentlyVisitedHotlists (ListRecentlyVisitedHotlistsRequest) returns (ListRecentlyVisitedHotlistsResponse) {}
+  rpc ListStarredHotlists (ListStarredHotlistsRequest) returns (ListStarredHotlistsResponse) {}
+  rpc GetHotlistStarCount (GetHotlistStarCountRequest) returns (GetHotlistStarCountResponse) {}
+  rpc StarHotlist (StarHotlistRequest) returns (StarHotlistResponse) {}
+  rpc GetHotlist (GetHotlistRequest) returns (GetHotlistResponse) {}
+  rpc ListHotlistItems (ListHotlistItemsRequest) returns (ListHotlistItemsResponse) {}
+  rpc CreateHotlist (CreateHotlistRequest) returns (CreateHotlistResponse) {}
+  rpc CheckHotlistName (CheckHotlistNameRequest) returns (CheckHotlistNameResponse) {}
+  rpc RemoveIssuesFromHotlists (RemoveIssuesFromHotlistsRequest) returns (RemoveIssuesFromHotlistsResponse) {}
+  rpc AddIssuesToHotlists (AddIssuesToHotlistsRequest) returns (AddIssuesToHotlistsResponse) {}
+  rpc RerankHotlistIssues (RerankHotlistIssuesRequest) returns (RerankHotlistIssuesResponse) {}
+  rpc UpdateHotlistIssueNote (UpdateHotlistIssueNoteRequest) returns (UpdateHotlistIssueNoteResponse) {}
+  rpc DeleteHotlist (DeleteHotlistRequest) returns (DeleteHotlistResponse) {}
+  rpc PredictComponent (PredictComponentRequest) returns (PredictComponentResponse) {}
+}
+
+
+// Next available tag: 3
+message ListHotlistsByUserRequest {
+  UserRef user = 2;
+}
+
+
+// Next available tag: 2
+message ListHotlistsByUserResponse {
+  repeated Hotlist hotlists = 1;
+}
+
+
+// Next available tag: 3
+message ListHotlistsByIssueRequest {
+  IssueRef issue = 2;
+}
+
+
+// Next available tag: 2
+message ListHotlistsByIssueResponse {
+  repeated Hotlist hotlists = 1;
+}
+
+
+// Next available tag: 2
+message ListRecentlyVisitedHotlistsRequest {
+}
+
+
+// Next available tag: 2
+message ListRecentlyVisitedHotlistsResponse {
+  repeated Hotlist hotlists = 1;
+}
+
+
+// Next available tag: 2
+message ListStarredHotlistsRequest {
+}
+
+
+// Next available tag: 2
+message ListStarredHotlistsResponse {
+  repeated Hotlist hotlists = 1;
+}
+
+
+// Next available tag: 3
+message GetHotlistStarCountRequest {
+  HotlistRef hotlist_ref = 2;
+}
+
+
+// Next available tag: 2
+message GetHotlistStarCountResponse {
+  uint32 star_count = 1;
+}
+
+
+// Next available tag: 4
+message StarHotlistRequest {
+  HotlistRef hotlist_ref = 2;
+  bool starred = 3;
+}
+
+
+// Next available tag: 2
+message StarHotlistResponse {
+  uint32 star_count = 1;
+}
+
+// Next available tag: 2
+message GetHotlistRequest {
+  HotlistRef hotlist_ref = 1;
+}
+
+// Next available tag: 2
+message GetHotlistResponse {
+  Hotlist hotlist = 1;
+}
+
+
+// Next available tag: 7
+message ListHotlistItemsRequest {
+  HotlistRef hotlist_ref = 2;
+  Pagination pagination = 3;
+  uint32 can = 4;
+  string sort_spec = 5;
+  string group_by_spec = 6;
+}
+
+
+// Next available tag: 2
+message ListHotlistItemsResponse {
+  repeated HotlistItem items = 1;
+}
+
+
+// Next available tag: 7
+message CreateHotlistRequest {
+  string name = 2;
+  string summary = 3;
+  string description = 4;
+  repeated UserRef editor_refs = 5;
+  repeated IssueRef issue_refs = 6;
+  bool is_private = 7;
+}
+
+
+// Next available tag: 1
+message CreateHotlistResponse {
+}
+
+
+// Next available tag: 3
+message CheckHotlistNameRequest {
+  string name = 2;
+}
+
+
+// Next available tag: 1
+message CheckHotlistNameResponse {
+  string error = 1;
+}
+
+
+// Next available tag: 4
+message RemoveIssuesFromHotlistsRequest {
+  repeated HotlistRef hotlist_refs = 2;
+  repeated IssueRef issue_refs = 3;
+}
+
+
+// Next available tag: 1
+message RemoveIssuesFromHotlistsResponse {
+}
+
+
+// Next available tag: 5
+message AddIssuesToHotlistsRequest {
+  repeated HotlistRef hotlist_refs = 2;
+  repeated IssueRef issue_refs = 3;
+  string note = 4;
+}
+
+
+// Next available tag: 1
+message AddIssuesToHotlistsResponse {
+}
+
+// Next available tag: 5
+message RerankHotlistIssuesRequest{
+  HotlistRef hotlist_ref = 1;
+  repeated IssueRef moved_refs = 2;
+  IssueRef target_ref = 3;
+  bool split_above = 4;
+}
+
+// Next available tag: 1
+message RerankHotlistIssuesResponse{
+}
+
+// Next available tag: 5
+message UpdateHotlistIssueNoteRequest {
+  HotlistRef hotlist_ref = 2;
+  IssueRef issue_ref = 3;
+  string note = 4;
+}
+
+
+// Next available tag: 1
+message UpdateHotlistIssueNoteResponse {
+}
+
+
+// Next available tag: 2
+message DeleteHotlistRequest {
+  HotlistRef hotlist_ref = 1;
+}
+
+
+// Next available tag: 1
+message DeleteHotlistResponse {
+}
+
+
+// Next available tag: 4
+message PredictComponentRequest {
+  string text = 2;
+  string project_name = 3;
+}
+
+
+// Next available tag: 2
+message PredictComponentResponse {
+  ComponentRef component_ref = 1;
+}
diff --git a/api/api_proto/features_objects.proto b/api/api_proto/features_objects.proto
new file mode 100644
index 0000000..14b61ac
--- /dev/null
+++ b/api/api_proto/features_objects.proto
@@ -0,0 +1,43 @@
+// Copyright 2018 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
+
+syntax = "proto3";
+
+package monorail;
+
+import "api/api_proto/common.proto";
+import "api/api_proto/issue_objects.proto";
+
+
+// Next available tag: 9
+message Hotlist {
+  UserRef owner_ref = 1;
+  repeated UserRef editor_refs = 5;
+  repeated UserRef follower_refs = 6;
+  string name = 2;
+  string summary = 3;
+  string description = 4;
+  string default_col_spec = 7;
+  bool is_private = 8;
+}
+
+
+// Next available tag: 6
+message HotlistItem {
+  Issue issue = 1;
+  uint32 rank = 2;
+  UserRef adder_ref = 3;
+  uint32 added_timestamp = 4;
+  string note = 5;
+}
+
+
+// Next available tag: 5
+message HotlistPeopleDelta {
+  UserRef new_owner_ref = 1;
+  repeated UserRef add_editor_refs = 2;
+  repeated UserRef add_follower_refs = 3;
+  repeated UserRef remove_user_refs = 4;
+}
\ No newline at end of file
diff --git a/api/api_proto/features_objects_pb2.py b/api/api_proto/features_objects_pb2.py
new file mode 100644
index 0000000..63d8091
--- /dev/null
+++ b/api/api_proto/features_objects_pb2.py
@@ -0,0 +1,257 @@
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/api_proto/features_objects.proto
+
+import sys
+_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from api.api_proto import common_pb2 as api_dot_api__proto_dot_common__pb2
+from api.api_proto import issue_objects_pb2 as api_dot_api__proto_dot_issue__objects__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/api_proto/features_objects.proto',
+  package='monorail',
+  syntax='proto3',
+  serialized_options=None,
+  serialized_pb=_b('\n$api/api_proto/features_objects.proto\x12\x08monorail\x1a\x1a\x61pi/api_proto/common.proto\x1a!api/api_proto/issue_objects.proto\"\xe3\x01\n\x07Hotlist\x12$\n\towner_ref\x18\x01 \x01(\x0b\x32\x11.monorail.UserRef\x12&\n\x0b\x65\x64itor_refs\x18\x05 \x03(\x0b\x32\x11.monorail.UserRef\x12(\n\rfollower_refs\x18\x06 \x03(\x0b\x32\x11.monorail.UserRef\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0f\n\x07summary\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x18\n\x10\x64\x65\x66\x61ult_col_spec\x18\x07 \x01(\t\x12\x12\n\nis_private\x18\x08 \x01(\x08\"\x88\x01\n\x0bHotlistItem\x12\x1e\n\x05issue\x18\x01 \x01(\x0b\x32\x0f.monorail.Issue\x12\x0c\n\x04rank\x18\x02 \x01(\r\x12$\n\tadder_ref\x18\x03 \x01(\x0b\x32\x11.monorail.UserRef\x12\x17\n\x0f\x61\x64\x64\x65\x64_timestamp\x18\x04 \x01(\r\x12\x0c\n\x04note\x18\x05 \x01(\t\"\xc5\x01\n\x12HotlistPeopleDelta\x12(\n\rnew_owner_ref\x18\x01 \x01(\x0b\x32\x11.monorail.UserRef\x12*\n\x0f\x61\x64\x64_editor_refs\x18\x02 \x03(\x0b\x32\x11.monorail.UserRef\x12,\n\x11\x61\x64\x64_follower_refs\x18\x03 \x03(\x0b\x32\x11.monorail.UserRef\x12+\n\x10remove_user_refs\x18\x04 \x03(\x0b\x32\x11.monorail.UserRefb\x06proto3')
+  ,
+  dependencies=[api_dot_api__proto_dot_common__pb2.DESCRIPTOR,api_dot_api__proto_dot_issue__objects__pb2.DESCRIPTOR,])
+
+
+
+
+_HOTLIST = _descriptor.Descriptor(
+  name='Hotlist',
+  full_name='monorail.Hotlist',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='owner_ref', full_name='monorail.Hotlist.owner_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='editor_refs', full_name='monorail.Hotlist.editor_refs', index=1,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='follower_refs', full_name='monorail.Hotlist.follower_refs', index=2,
+      number=6, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.Hotlist.name', index=3,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='summary', full_name='monorail.Hotlist.summary', index=4,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='description', full_name='monorail.Hotlist.description', index=5,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='default_col_spec', full_name='monorail.Hotlist.default_col_spec', index=6,
+      number=7, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_private', full_name='monorail.Hotlist.is_private', index=7,
+      number=8, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=114,
+  serialized_end=341,
+)
+
+
+_HOTLISTITEM = _descriptor.Descriptor(
+  name='HotlistItem',
+  full_name='monorail.HotlistItem',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue', full_name='monorail.HotlistItem.issue', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='rank', full_name='monorail.HotlistItem.rank', index=1,
+      number=2, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='adder_ref', full_name='monorail.HotlistItem.adder_ref', index=2,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='added_timestamp', full_name='monorail.HotlistItem.added_timestamp', index=3,
+      number=4, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='note', full_name='monorail.HotlistItem.note', index=4,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=344,
+  serialized_end=480,
+)
+
+
+_HOTLISTPEOPLEDELTA = _descriptor.Descriptor(
+  name='HotlistPeopleDelta',
+  full_name='monorail.HotlistPeopleDelta',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='new_owner_ref', full_name='monorail.HotlistPeopleDelta.new_owner_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='add_editor_refs', full_name='monorail.HotlistPeopleDelta.add_editor_refs', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='add_follower_refs', full_name='monorail.HotlistPeopleDelta.add_follower_refs', index=2,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='remove_user_refs', full_name='monorail.HotlistPeopleDelta.remove_user_refs', index=3,
+      number=4, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=483,
+  serialized_end=680,
+)
+
+_HOTLIST.fields_by_name['owner_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_HOTLIST.fields_by_name['editor_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_HOTLIST.fields_by_name['follower_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_HOTLISTITEM.fields_by_name['issue'].message_type = api_dot_api__proto_dot_issue__objects__pb2._ISSUE
+_HOTLISTITEM.fields_by_name['adder_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_HOTLISTPEOPLEDELTA.fields_by_name['new_owner_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_HOTLISTPEOPLEDELTA.fields_by_name['add_editor_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_HOTLISTPEOPLEDELTA.fields_by_name['add_follower_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_HOTLISTPEOPLEDELTA.fields_by_name['remove_user_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+DESCRIPTOR.message_types_by_name['Hotlist'] = _HOTLIST
+DESCRIPTOR.message_types_by_name['HotlistItem'] = _HOTLISTITEM
+DESCRIPTOR.message_types_by_name['HotlistPeopleDelta'] = _HOTLISTPEOPLEDELTA
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+Hotlist = _reflection.GeneratedProtocolMessageType('Hotlist', (_message.Message,), dict(
+  DESCRIPTOR = _HOTLIST,
+  __module__ = 'api.api_proto.features_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.Hotlist)
+  ))
+_sym_db.RegisterMessage(Hotlist)
+
+HotlistItem = _reflection.GeneratedProtocolMessageType('HotlistItem', (_message.Message,), dict(
+  DESCRIPTOR = _HOTLISTITEM,
+  __module__ = 'api.api_proto.features_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.HotlistItem)
+  ))
+_sym_db.RegisterMessage(HotlistItem)
+
+HotlistPeopleDelta = _reflection.GeneratedProtocolMessageType('HotlistPeopleDelta', (_message.Message,), dict(
+  DESCRIPTOR = _HOTLISTPEOPLEDELTA,
+  __module__ = 'api.api_proto.features_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.HotlistPeopleDelta)
+  ))
+_sym_db.RegisterMessage(HotlistPeopleDelta)
+
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/api_proto/features_pb2.py b/api/api_proto/features_pb2.py
new file mode 100644
index 0000000..c415a35
--- /dev/null
+++ b/api/api_proto/features_pb2.py
@@ -0,0 +1,1543 @@
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/api_proto/features.proto
+
+import sys
+_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from api.api_proto import common_pb2 as api_dot_api__proto_dot_common__pb2
+from api.api_proto import features_objects_pb2 as api_dot_api__proto_dot_features__objects__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/api_proto/features.proto',
+  package='monorail',
+  syntax='proto3',
+  serialized_options=None,
+  serialized_pb=_b('\n\x1c\x61pi/api_proto/features.proto\x12\x08monorail\x1a\x1a\x61pi/api_proto/common.proto\x1a$api/api_proto/features_objects.proto\"<\n\x19ListHotlistsByUserRequest\x12\x1f\n\x04user\x18\x02 \x01(\x0b\x32\x11.monorail.UserRef\"A\n\x1aListHotlistsByUserResponse\x12#\n\x08hotlists\x18\x01 \x03(\x0b\x32\x11.monorail.Hotlist\"?\n\x1aListHotlistsByIssueRequest\x12!\n\x05issue\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\"B\n\x1bListHotlistsByIssueResponse\x12#\n\x08hotlists\x18\x01 \x03(\x0b\x32\x11.monorail.Hotlist\"$\n\"ListRecentlyVisitedHotlistsRequest\"J\n#ListRecentlyVisitedHotlistsResponse\x12#\n\x08hotlists\x18\x01 \x03(\x0b\x32\x11.monorail.Hotlist\"\x1c\n\x1aListStarredHotlistsRequest\"B\n\x1bListStarredHotlistsResponse\x12#\n\x08hotlists\x18\x01 \x03(\x0b\x32\x11.monorail.Hotlist\"G\n\x1aGetHotlistStarCountRequest\x12)\n\x0bhotlist_ref\x18\x02 \x01(\x0b\x32\x14.monorail.HotlistRef\"1\n\x1bGetHotlistStarCountResponse\x12\x12\n\nstar_count\x18\x01 \x01(\r\"P\n\x12StarHotlistRequest\x12)\n\x0bhotlist_ref\x18\x02 \x01(\x0b\x32\x14.monorail.HotlistRef\x12\x0f\n\x07starred\x18\x03 \x01(\x08\")\n\x13StarHotlistResponse\x12\x12\n\nstar_count\x18\x01 \x01(\r\">\n\x11GetHotlistRequest\x12)\n\x0bhotlist_ref\x18\x01 \x01(\x0b\x32\x14.monorail.HotlistRef\"8\n\x12GetHotlistResponse\x12\"\n\x07hotlist\x18\x01 \x01(\x0b\x32\x11.monorail.Hotlist\"\xa5\x01\n\x17ListHotlistItemsRequest\x12)\n\x0bhotlist_ref\x18\x02 \x01(\x0b\x32\x14.monorail.HotlistRef\x12(\n\npagination\x18\x03 \x01(\x0b\x32\x14.monorail.Pagination\x12\x0b\n\x03\x63\x61n\x18\x04 \x01(\r\x12\x11\n\tsort_spec\x18\x05 \x01(\t\x12\x15\n\rgroup_by_spec\x18\x06 \x01(\t\"@\n\x18ListHotlistItemsResponse\x12$\n\x05items\x18\x01 \x03(\x0b\x32\x15.monorail.HotlistItem\"\xae\x01\n\x14\x43reateHotlistRequest\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0f\n\x07summary\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12&\n\x0b\x65\x64itor_refs\x18\x05 \x03(\x0b\x32\x11.monorail.UserRef\x12&\n\nissue_refs\x18\x06 \x03(\x0b\x32\x12.monorail.IssueRef\x12\x12\n\nis_private\x18\x07 \x01(\x08\"\x17\n\x15\x43reateHotlistResponse\"\'\n\x17\x43heckHotlistNameRequest\x12\x0c\n\x04name\x18\x02 \x01(\t\")\n\x18\x43heckHotlistNameResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\"u\n\x1fRemoveIssuesFromHotlistsRequest\x12*\n\x0chotlist_refs\x18\x02 \x03(\x0b\x32\x14.monorail.HotlistRef\x12&\n\nissue_refs\x18\x03 \x03(\x0b\x32\x12.monorail.IssueRef\"\"\n RemoveIssuesFromHotlistsResponse\"~\n\x1a\x41\x64\x64IssuesToHotlistsRequest\x12*\n\x0chotlist_refs\x18\x02 \x03(\x0b\x32\x14.monorail.HotlistRef\x12&\n\nissue_refs\x18\x03 \x03(\x0b\x32\x12.monorail.IssueRef\x12\x0c\n\x04note\x18\x04 \x01(\t\"\x1d\n\x1b\x41\x64\x64IssuesToHotlistsResponse\"\xac\x01\n\x1aRerankHotlistIssuesRequest\x12)\n\x0bhotlist_ref\x18\x01 \x01(\x0b\x32\x14.monorail.HotlistRef\x12&\n\nmoved_refs\x18\x02 \x03(\x0b\x32\x12.monorail.IssueRef\x12&\n\ntarget_ref\x18\x03 \x01(\x0b\x32\x12.monorail.IssueRef\x12\x13\n\x0bsplit_above\x18\x04 \x01(\x08\"\x1d\n\x1bRerankHotlistIssuesResponse\"\x7f\n\x1dUpdateHotlistIssueNoteRequest\x12)\n\x0bhotlist_ref\x18\x02 \x01(\x0b\x32\x14.monorail.HotlistRef\x12%\n\tissue_ref\x18\x03 \x01(\x0b\x32\x12.monorail.IssueRef\x12\x0c\n\x04note\x18\x04 \x01(\t\" \n\x1eUpdateHotlistIssueNoteResponse\"A\n\x14\x44\x65leteHotlistRequest\x12)\n\x0bhotlist_ref\x18\x01 \x01(\x0b\x32\x14.monorail.HotlistRef\"\x17\n\x15\x44\x65leteHotlistResponse\"=\n\x17PredictComponentRequest\x12\x0c\n\x04text\x18\x02 \x01(\t\x12\x14\n\x0cproject_name\x18\x03 \x01(\t\"I\n\x18PredictComponentResponse\x12-\n\rcomponent_ref\x18\x01 \x01(\x0b\x32\x16.monorail.ComponentRef2\xa5\x0c\n\x08\x46\x65\x61tures\x12\x61\n\x12ListHotlistsByUser\x12#.monorail.ListHotlistsByUserRequest\x1a$.monorail.ListHotlistsByUserResponse\"\x00\x12\x64\n\x13ListHotlistsByIssue\x12$.monorail.ListHotlistsByIssueRequest\x1a%.monorail.ListHotlistsByIssueResponse\"\x00\x12|\n\x1bListRecentlyVisitedHotlists\x12,.monorail.ListRecentlyVisitedHotlistsRequest\x1a-.monorail.ListRecentlyVisitedHotlistsResponse\"\x00\x12\x64\n\x13ListStarredHotlists\x12$.monorail.ListStarredHotlistsRequest\x1a%.monorail.ListStarredHotlistsResponse\"\x00\x12\x64\n\x13GetHotlistStarCount\x12$.monorail.GetHotlistStarCountRequest\x1a%.monorail.GetHotlistStarCountResponse\"\x00\x12L\n\x0bStarHotlist\x12\x1c.monorail.StarHotlistRequest\x1a\x1d.monorail.StarHotlistResponse\"\x00\x12I\n\nGetHotlist\x12\x1b.monorail.GetHotlistRequest\x1a\x1c.monorail.GetHotlistResponse\"\x00\x12[\n\x10ListHotlistItems\x12!.monorail.ListHotlistItemsRequest\x1a\".monorail.ListHotlistItemsResponse\"\x00\x12R\n\rCreateHotlist\x12\x1e.monorail.CreateHotlistRequest\x1a\x1f.monorail.CreateHotlistResponse\"\x00\x12[\n\x10\x43heckHotlistName\x12!.monorail.CheckHotlistNameRequest\x1a\".monorail.CheckHotlistNameResponse\"\x00\x12s\n\x18RemoveIssuesFromHotlists\x12).monorail.RemoveIssuesFromHotlistsRequest\x1a*.monorail.RemoveIssuesFromHotlistsResponse\"\x00\x12\x64\n\x13\x41\x64\x64IssuesToHotlists\x12$.monorail.AddIssuesToHotlistsRequest\x1a%.monorail.AddIssuesToHotlistsResponse\"\x00\x12\x64\n\x13RerankHotlistIssues\x12$.monorail.RerankHotlistIssuesRequest\x1a%.monorail.RerankHotlistIssuesResponse\"\x00\x12m\n\x16UpdateHotlistIssueNote\x12\'.monorail.UpdateHotlistIssueNoteRequest\x1a(.monorail.UpdateHotlistIssueNoteResponse\"\x00\x12R\n\rDeleteHotlist\x12\x1e.monorail.DeleteHotlistRequest\x1a\x1f.monorail.DeleteHotlistResponse\"\x00\x12[\n\x10PredictComponent\x12!.monorail.PredictComponentRequest\x1a\".monorail.PredictComponentResponse\"\x00\x62\x06proto3')
+  ,
+  dependencies=[api_dot_api__proto_dot_common__pb2.DESCRIPTOR,api_dot_api__proto_dot_features__objects__pb2.DESCRIPTOR,])
+
+
+
+
+_LISTHOTLISTSBYUSERREQUEST = _descriptor.Descriptor(
+  name='ListHotlistsByUserRequest',
+  full_name='monorail.ListHotlistsByUserRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user', full_name='monorail.ListHotlistsByUserRequest.user', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=108,
+  serialized_end=168,
+)
+
+
+_LISTHOTLISTSBYUSERRESPONSE = _descriptor.Descriptor(
+  name='ListHotlistsByUserResponse',
+  full_name='monorail.ListHotlistsByUserResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlists', full_name='monorail.ListHotlistsByUserResponse.hotlists', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=170,
+  serialized_end=235,
+)
+
+
+_LISTHOTLISTSBYISSUEREQUEST = _descriptor.Descriptor(
+  name='ListHotlistsByIssueRequest',
+  full_name='monorail.ListHotlistsByIssueRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue', full_name='monorail.ListHotlistsByIssueRequest.issue', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=237,
+  serialized_end=300,
+)
+
+
+_LISTHOTLISTSBYISSUERESPONSE = _descriptor.Descriptor(
+  name='ListHotlistsByIssueResponse',
+  full_name='monorail.ListHotlistsByIssueResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlists', full_name='monorail.ListHotlistsByIssueResponse.hotlists', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=302,
+  serialized_end=368,
+)
+
+
+_LISTRECENTLYVISITEDHOTLISTSREQUEST = _descriptor.Descriptor(
+  name='ListRecentlyVisitedHotlistsRequest',
+  full_name='monorail.ListRecentlyVisitedHotlistsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=370,
+  serialized_end=406,
+)
+
+
+_LISTRECENTLYVISITEDHOTLISTSRESPONSE = _descriptor.Descriptor(
+  name='ListRecentlyVisitedHotlistsResponse',
+  full_name='monorail.ListRecentlyVisitedHotlistsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlists', full_name='monorail.ListRecentlyVisitedHotlistsResponse.hotlists', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=408,
+  serialized_end=482,
+)
+
+
+_LISTSTARREDHOTLISTSREQUEST = _descriptor.Descriptor(
+  name='ListStarredHotlistsRequest',
+  full_name='monorail.ListStarredHotlistsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=484,
+  serialized_end=512,
+)
+
+
+_LISTSTARREDHOTLISTSRESPONSE = _descriptor.Descriptor(
+  name='ListStarredHotlistsResponse',
+  full_name='monorail.ListStarredHotlistsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlists', full_name='monorail.ListStarredHotlistsResponse.hotlists', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=514,
+  serialized_end=580,
+)
+
+
+_GETHOTLISTSTARCOUNTREQUEST = _descriptor.Descriptor(
+  name='GetHotlistStarCountRequest',
+  full_name='monorail.GetHotlistStarCountRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlist_ref', full_name='monorail.GetHotlistStarCountRequest.hotlist_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=582,
+  serialized_end=653,
+)
+
+
+_GETHOTLISTSTARCOUNTRESPONSE = _descriptor.Descriptor(
+  name='GetHotlistStarCountResponse',
+  full_name='monorail.GetHotlistStarCountResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='star_count', full_name='monorail.GetHotlistStarCountResponse.star_count', index=0,
+      number=1, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=655,
+  serialized_end=704,
+)
+
+
+_STARHOTLISTREQUEST = _descriptor.Descriptor(
+  name='StarHotlistRequest',
+  full_name='monorail.StarHotlistRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlist_ref', full_name='monorail.StarHotlistRequest.hotlist_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='starred', full_name='monorail.StarHotlistRequest.starred', index=1,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=706,
+  serialized_end=786,
+)
+
+
+_STARHOTLISTRESPONSE = _descriptor.Descriptor(
+  name='StarHotlistResponse',
+  full_name='monorail.StarHotlistResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='star_count', full_name='monorail.StarHotlistResponse.star_count', index=0,
+      number=1, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=788,
+  serialized_end=829,
+)
+
+
+_GETHOTLISTREQUEST = _descriptor.Descriptor(
+  name='GetHotlistRequest',
+  full_name='monorail.GetHotlistRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlist_ref', full_name='monorail.GetHotlistRequest.hotlist_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=831,
+  serialized_end=893,
+)
+
+
+_GETHOTLISTRESPONSE = _descriptor.Descriptor(
+  name='GetHotlistResponse',
+  full_name='monorail.GetHotlistResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlist', full_name='monorail.GetHotlistResponse.hotlist', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=895,
+  serialized_end=951,
+)
+
+
+_LISTHOTLISTITEMSREQUEST = _descriptor.Descriptor(
+  name='ListHotlistItemsRequest',
+  full_name='monorail.ListHotlistItemsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlist_ref', full_name='monorail.ListHotlistItemsRequest.hotlist_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='pagination', full_name='monorail.ListHotlistItemsRequest.pagination', index=1,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='can', full_name='monorail.ListHotlistItemsRequest.can', index=2,
+      number=4, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='sort_spec', full_name='monorail.ListHotlistItemsRequest.sort_spec', index=3,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='group_by_spec', full_name='monorail.ListHotlistItemsRequest.group_by_spec', index=4,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=954,
+  serialized_end=1119,
+)
+
+
+_LISTHOTLISTITEMSRESPONSE = _descriptor.Descriptor(
+  name='ListHotlistItemsResponse',
+  full_name='monorail.ListHotlistItemsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='items', full_name='monorail.ListHotlistItemsResponse.items', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1121,
+  serialized_end=1185,
+)
+
+
+_CREATEHOTLISTREQUEST = _descriptor.Descriptor(
+  name='CreateHotlistRequest',
+  full_name='monorail.CreateHotlistRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.CreateHotlistRequest.name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='summary', full_name='monorail.CreateHotlistRequest.summary', index=1,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='description', full_name='monorail.CreateHotlistRequest.description', index=2,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='editor_refs', full_name='monorail.CreateHotlistRequest.editor_refs', index=3,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='issue_refs', full_name='monorail.CreateHotlistRequest.issue_refs', index=4,
+      number=6, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_private', full_name='monorail.CreateHotlistRequest.is_private', index=5,
+      number=7, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1188,
+  serialized_end=1362,
+)
+
+
+_CREATEHOTLISTRESPONSE = _descriptor.Descriptor(
+  name='CreateHotlistResponse',
+  full_name='monorail.CreateHotlistResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1364,
+  serialized_end=1387,
+)
+
+
+_CHECKHOTLISTNAMEREQUEST = _descriptor.Descriptor(
+  name='CheckHotlistNameRequest',
+  full_name='monorail.CheckHotlistNameRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.CheckHotlistNameRequest.name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1389,
+  serialized_end=1428,
+)
+
+
+_CHECKHOTLISTNAMERESPONSE = _descriptor.Descriptor(
+  name='CheckHotlistNameResponse',
+  full_name='monorail.CheckHotlistNameResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='error', full_name='monorail.CheckHotlistNameResponse.error', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1430,
+  serialized_end=1471,
+)
+
+
+_REMOVEISSUESFROMHOTLISTSREQUEST = _descriptor.Descriptor(
+  name='RemoveIssuesFromHotlistsRequest',
+  full_name='monorail.RemoveIssuesFromHotlistsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlist_refs', full_name='monorail.RemoveIssuesFromHotlistsRequest.hotlist_refs', index=0,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='issue_refs', full_name='monorail.RemoveIssuesFromHotlistsRequest.issue_refs', index=1,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1473,
+  serialized_end=1590,
+)
+
+
+_REMOVEISSUESFROMHOTLISTSRESPONSE = _descriptor.Descriptor(
+  name='RemoveIssuesFromHotlistsResponse',
+  full_name='monorail.RemoveIssuesFromHotlistsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1592,
+  serialized_end=1626,
+)
+
+
+_ADDISSUESTOHOTLISTSREQUEST = _descriptor.Descriptor(
+  name='AddIssuesToHotlistsRequest',
+  full_name='monorail.AddIssuesToHotlistsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlist_refs', full_name='monorail.AddIssuesToHotlistsRequest.hotlist_refs', index=0,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='issue_refs', full_name='monorail.AddIssuesToHotlistsRequest.issue_refs', index=1,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='note', full_name='monorail.AddIssuesToHotlistsRequest.note', index=2,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1628,
+  serialized_end=1754,
+)
+
+
+_ADDISSUESTOHOTLISTSRESPONSE = _descriptor.Descriptor(
+  name='AddIssuesToHotlistsResponse',
+  full_name='monorail.AddIssuesToHotlistsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1756,
+  serialized_end=1785,
+)
+
+
+_RERANKHOTLISTISSUESREQUEST = _descriptor.Descriptor(
+  name='RerankHotlistIssuesRequest',
+  full_name='monorail.RerankHotlistIssuesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlist_ref', full_name='monorail.RerankHotlistIssuesRequest.hotlist_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='moved_refs', full_name='monorail.RerankHotlistIssuesRequest.moved_refs', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='target_ref', full_name='monorail.RerankHotlistIssuesRequest.target_ref', index=2,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='split_above', full_name='monorail.RerankHotlistIssuesRequest.split_above', index=3,
+      number=4, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1788,
+  serialized_end=1960,
+)
+
+
+_RERANKHOTLISTISSUESRESPONSE = _descriptor.Descriptor(
+  name='RerankHotlistIssuesResponse',
+  full_name='monorail.RerankHotlistIssuesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1962,
+  serialized_end=1991,
+)
+
+
+_UPDATEHOTLISTISSUENOTEREQUEST = _descriptor.Descriptor(
+  name='UpdateHotlistIssueNoteRequest',
+  full_name='monorail.UpdateHotlistIssueNoteRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlist_ref', full_name='monorail.UpdateHotlistIssueNoteRequest.hotlist_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.UpdateHotlistIssueNoteRequest.issue_ref', index=1,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='note', full_name='monorail.UpdateHotlistIssueNoteRequest.note', index=2,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1993,
+  serialized_end=2120,
+)
+
+
+_UPDATEHOTLISTISSUENOTERESPONSE = _descriptor.Descriptor(
+  name='UpdateHotlistIssueNoteResponse',
+  full_name='monorail.UpdateHotlistIssueNoteResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2122,
+  serialized_end=2154,
+)
+
+
+_DELETEHOTLISTREQUEST = _descriptor.Descriptor(
+  name='DeleteHotlistRequest',
+  full_name='monorail.DeleteHotlistRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlist_ref', full_name='monorail.DeleteHotlistRequest.hotlist_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2156,
+  serialized_end=2221,
+)
+
+
+_DELETEHOTLISTRESPONSE = _descriptor.Descriptor(
+  name='DeleteHotlistResponse',
+  full_name='monorail.DeleteHotlistResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2223,
+  serialized_end=2246,
+)
+
+
+_PREDICTCOMPONENTREQUEST = _descriptor.Descriptor(
+  name='PredictComponentRequest',
+  full_name='monorail.PredictComponentRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='text', full_name='monorail.PredictComponentRequest.text', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.PredictComponentRequest.project_name', index=1,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2248,
+  serialized_end=2309,
+)
+
+
+_PREDICTCOMPONENTRESPONSE = _descriptor.Descriptor(
+  name='PredictComponentResponse',
+  full_name='monorail.PredictComponentResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='component_ref', full_name='monorail.PredictComponentResponse.component_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2311,
+  serialized_end=2384,
+)
+
+_LISTHOTLISTSBYUSERREQUEST.fields_by_name['user'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_LISTHOTLISTSBYUSERRESPONSE.fields_by_name['hotlists'].message_type = api_dot_api__proto_dot_features__objects__pb2._HOTLIST
+_LISTHOTLISTSBYISSUEREQUEST.fields_by_name['issue'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_LISTHOTLISTSBYISSUERESPONSE.fields_by_name['hotlists'].message_type = api_dot_api__proto_dot_features__objects__pb2._HOTLIST
+_LISTRECENTLYVISITEDHOTLISTSRESPONSE.fields_by_name['hotlists'].message_type = api_dot_api__proto_dot_features__objects__pb2._HOTLIST
+_LISTSTARREDHOTLISTSRESPONSE.fields_by_name['hotlists'].message_type = api_dot_api__proto_dot_features__objects__pb2._HOTLIST
+_GETHOTLISTSTARCOUNTREQUEST.fields_by_name['hotlist_ref'].message_type = api_dot_api__proto_dot_common__pb2._HOTLISTREF
+_STARHOTLISTREQUEST.fields_by_name['hotlist_ref'].message_type = api_dot_api__proto_dot_common__pb2._HOTLISTREF
+_GETHOTLISTREQUEST.fields_by_name['hotlist_ref'].message_type = api_dot_api__proto_dot_common__pb2._HOTLISTREF
+_GETHOTLISTRESPONSE.fields_by_name['hotlist'].message_type = api_dot_api__proto_dot_features__objects__pb2._HOTLIST
+_LISTHOTLISTITEMSREQUEST.fields_by_name['hotlist_ref'].message_type = api_dot_api__proto_dot_common__pb2._HOTLISTREF
+_LISTHOTLISTITEMSREQUEST.fields_by_name['pagination'].message_type = api_dot_api__proto_dot_common__pb2._PAGINATION
+_LISTHOTLISTITEMSRESPONSE.fields_by_name['items'].message_type = api_dot_api__proto_dot_features__objects__pb2._HOTLISTITEM
+_CREATEHOTLISTREQUEST.fields_by_name['editor_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_CREATEHOTLISTREQUEST.fields_by_name['issue_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_REMOVEISSUESFROMHOTLISTSREQUEST.fields_by_name['hotlist_refs'].message_type = api_dot_api__proto_dot_common__pb2._HOTLISTREF
+_REMOVEISSUESFROMHOTLISTSREQUEST.fields_by_name['issue_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_ADDISSUESTOHOTLISTSREQUEST.fields_by_name['hotlist_refs'].message_type = api_dot_api__proto_dot_common__pb2._HOTLISTREF
+_ADDISSUESTOHOTLISTSREQUEST.fields_by_name['issue_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_RERANKHOTLISTISSUESREQUEST.fields_by_name['hotlist_ref'].message_type = api_dot_api__proto_dot_common__pb2._HOTLISTREF
+_RERANKHOTLISTISSUESREQUEST.fields_by_name['moved_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_RERANKHOTLISTISSUESREQUEST.fields_by_name['target_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_UPDATEHOTLISTISSUENOTEREQUEST.fields_by_name['hotlist_ref'].message_type = api_dot_api__proto_dot_common__pb2._HOTLISTREF
+_UPDATEHOTLISTISSUENOTEREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_DELETEHOTLISTREQUEST.fields_by_name['hotlist_ref'].message_type = api_dot_api__proto_dot_common__pb2._HOTLISTREF
+_PREDICTCOMPONENTRESPONSE.fields_by_name['component_ref'].message_type = api_dot_api__proto_dot_common__pb2._COMPONENTREF
+DESCRIPTOR.message_types_by_name['ListHotlistsByUserRequest'] = _LISTHOTLISTSBYUSERREQUEST
+DESCRIPTOR.message_types_by_name['ListHotlistsByUserResponse'] = _LISTHOTLISTSBYUSERRESPONSE
+DESCRIPTOR.message_types_by_name['ListHotlistsByIssueRequest'] = _LISTHOTLISTSBYISSUEREQUEST
+DESCRIPTOR.message_types_by_name['ListHotlistsByIssueResponse'] = _LISTHOTLISTSBYISSUERESPONSE
+DESCRIPTOR.message_types_by_name['ListRecentlyVisitedHotlistsRequest'] = _LISTRECENTLYVISITEDHOTLISTSREQUEST
+DESCRIPTOR.message_types_by_name['ListRecentlyVisitedHotlistsResponse'] = _LISTRECENTLYVISITEDHOTLISTSRESPONSE
+DESCRIPTOR.message_types_by_name['ListStarredHotlistsRequest'] = _LISTSTARREDHOTLISTSREQUEST
+DESCRIPTOR.message_types_by_name['ListStarredHotlistsResponse'] = _LISTSTARREDHOTLISTSRESPONSE
+DESCRIPTOR.message_types_by_name['GetHotlistStarCountRequest'] = _GETHOTLISTSTARCOUNTREQUEST
+DESCRIPTOR.message_types_by_name['GetHotlistStarCountResponse'] = _GETHOTLISTSTARCOUNTRESPONSE
+DESCRIPTOR.message_types_by_name['StarHotlistRequest'] = _STARHOTLISTREQUEST
+DESCRIPTOR.message_types_by_name['StarHotlistResponse'] = _STARHOTLISTRESPONSE
+DESCRIPTOR.message_types_by_name['GetHotlistRequest'] = _GETHOTLISTREQUEST
+DESCRIPTOR.message_types_by_name['GetHotlistResponse'] = _GETHOTLISTRESPONSE
+DESCRIPTOR.message_types_by_name['ListHotlistItemsRequest'] = _LISTHOTLISTITEMSREQUEST
+DESCRIPTOR.message_types_by_name['ListHotlistItemsResponse'] = _LISTHOTLISTITEMSRESPONSE
+DESCRIPTOR.message_types_by_name['CreateHotlistRequest'] = _CREATEHOTLISTREQUEST
+DESCRIPTOR.message_types_by_name['CreateHotlistResponse'] = _CREATEHOTLISTRESPONSE
+DESCRIPTOR.message_types_by_name['CheckHotlistNameRequest'] = _CHECKHOTLISTNAMEREQUEST
+DESCRIPTOR.message_types_by_name['CheckHotlistNameResponse'] = _CHECKHOTLISTNAMERESPONSE
+DESCRIPTOR.message_types_by_name['RemoveIssuesFromHotlistsRequest'] = _REMOVEISSUESFROMHOTLISTSREQUEST
+DESCRIPTOR.message_types_by_name['RemoveIssuesFromHotlistsResponse'] = _REMOVEISSUESFROMHOTLISTSRESPONSE
+DESCRIPTOR.message_types_by_name['AddIssuesToHotlistsRequest'] = _ADDISSUESTOHOTLISTSREQUEST
+DESCRIPTOR.message_types_by_name['AddIssuesToHotlistsResponse'] = _ADDISSUESTOHOTLISTSRESPONSE
+DESCRIPTOR.message_types_by_name['RerankHotlistIssuesRequest'] = _RERANKHOTLISTISSUESREQUEST
+DESCRIPTOR.message_types_by_name['RerankHotlistIssuesResponse'] = _RERANKHOTLISTISSUESRESPONSE
+DESCRIPTOR.message_types_by_name['UpdateHotlistIssueNoteRequest'] = _UPDATEHOTLISTISSUENOTEREQUEST
+DESCRIPTOR.message_types_by_name['UpdateHotlistIssueNoteResponse'] = _UPDATEHOTLISTISSUENOTERESPONSE
+DESCRIPTOR.message_types_by_name['DeleteHotlistRequest'] = _DELETEHOTLISTREQUEST
+DESCRIPTOR.message_types_by_name['DeleteHotlistResponse'] = _DELETEHOTLISTRESPONSE
+DESCRIPTOR.message_types_by_name['PredictComponentRequest'] = _PREDICTCOMPONENTREQUEST
+DESCRIPTOR.message_types_by_name['PredictComponentResponse'] = _PREDICTCOMPONENTRESPONSE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+ListHotlistsByUserRequest = _reflection.GeneratedProtocolMessageType('ListHotlistsByUserRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTHOTLISTSBYUSERREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListHotlistsByUserRequest)
+  ))
+_sym_db.RegisterMessage(ListHotlistsByUserRequest)
+
+ListHotlistsByUserResponse = _reflection.GeneratedProtocolMessageType('ListHotlistsByUserResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTHOTLISTSBYUSERRESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListHotlistsByUserResponse)
+  ))
+_sym_db.RegisterMessage(ListHotlistsByUserResponse)
+
+ListHotlistsByIssueRequest = _reflection.GeneratedProtocolMessageType('ListHotlistsByIssueRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTHOTLISTSBYISSUEREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListHotlistsByIssueRequest)
+  ))
+_sym_db.RegisterMessage(ListHotlistsByIssueRequest)
+
+ListHotlistsByIssueResponse = _reflection.GeneratedProtocolMessageType('ListHotlistsByIssueResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTHOTLISTSBYISSUERESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListHotlistsByIssueResponse)
+  ))
+_sym_db.RegisterMessage(ListHotlistsByIssueResponse)
+
+ListRecentlyVisitedHotlistsRequest = _reflection.GeneratedProtocolMessageType('ListRecentlyVisitedHotlistsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTRECENTLYVISITEDHOTLISTSREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListRecentlyVisitedHotlistsRequest)
+  ))
+_sym_db.RegisterMessage(ListRecentlyVisitedHotlistsRequest)
+
+ListRecentlyVisitedHotlistsResponse = _reflection.GeneratedProtocolMessageType('ListRecentlyVisitedHotlistsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTRECENTLYVISITEDHOTLISTSRESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListRecentlyVisitedHotlistsResponse)
+  ))
+_sym_db.RegisterMessage(ListRecentlyVisitedHotlistsResponse)
+
+ListStarredHotlistsRequest = _reflection.GeneratedProtocolMessageType('ListStarredHotlistsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTSTARREDHOTLISTSREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListStarredHotlistsRequest)
+  ))
+_sym_db.RegisterMessage(ListStarredHotlistsRequest)
+
+ListStarredHotlistsResponse = _reflection.GeneratedProtocolMessageType('ListStarredHotlistsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTSTARREDHOTLISTSRESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListStarredHotlistsResponse)
+  ))
+_sym_db.RegisterMessage(ListStarredHotlistsResponse)
+
+GetHotlistStarCountRequest = _reflection.GeneratedProtocolMessageType('GetHotlistStarCountRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETHOTLISTSTARCOUNTREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetHotlistStarCountRequest)
+  ))
+_sym_db.RegisterMessage(GetHotlistStarCountRequest)
+
+GetHotlistStarCountResponse = _reflection.GeneratedProtocolMessageType('GetHotlistStarCountResponse', (_message.Message,), dict(
+  DESCRIPTOR = _GETHOTLISTSTARCOUNTRESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetHotlistStarCountResponse)
+  ))
+_sym_db.RegisterMessage(GetHotlistStarCountResponse)
+
+StarHotlistRequest = _reflection.GeneratedProtocolMessageType('StarHotlistRequest', (_message.Message,), dict(
+  DESCRIPTOR = _STARHOTLISTREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.StarHotlistRequest)
+  ))
+_sym_db.RegisterMessage(StarHotlistRequest)
+
+StarHotlistResponse = _reflection.GeneratedProtocolMessageType('StarHotlistResponse', (_message.Message,), dict(
+  DESCRIPTOR = _STARHOTLISTRESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.StarHotlistResponse)
+  ))
+_sym_db.RegisterMessage(StarHotlistResponse)
+
+GetHotlistRequest = _reflection.GeneratedProtocolMessageType('GetHotlistRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETHOTLISTREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetHotlistRequest)
+  ))
+_sym_db.RegisterMessage(GetHotlistRequest)
+
+GetHotlistResponse = _reflection.GeneratedProtocolMessageType('GetHotlistResponse', (_message.Message,), dict(
+  DESCRIPTOR = _GETHOTLISTRESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetHotlistResponse)
+  ))
+_sym_db.RegisterMessage(GetHotlistResponse)
+
+ListHotlistItemsRequest = _reflection.GeneratedProtocolMessageType('ListHotlistItemsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTHOTLISTITEMSREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListHotlistItemsRequest)
+  ))
+_sym_db.RegisterMessage(ListHotlistItemsRequest)
+
+ListHotlistItemsResponse = _reflection.GeneratedProtocolMessageType('ListHotlistItemsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTHOTLISTITEMSRESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListHotlistItemsResponse)
+  ))
+_sym_db.RegisterMessage(ListHotlistItemsResponse)
+
+CreateHotlistRequest = _reflection.GeneratedProtocolMessageType('CreateHotlistRequest', (_message.Message,), dict(
+  DESCRIPTOR = _CREATEHOTLISTREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.CreateHotlistRequest)
+  ))
+_sym_db.RegisterMessage(CreateHotlistRequest)
+
+CreateHotlistResponse = _reflection.GeneratedProtocolMessageType('CreateHotlistResponse', (_message.Message,), dict(
+  DESCRIPTOR = _CREATEHOTLISTRESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.CreateHotlistResponse)
+  ))
+_sym_db.RegisterMessage(CreateHotlistResponse)
+
+CheckHotlistNameRequest = _reflection.GeneratedProtocolMessageType('CheckHotlistNameRequest', (_message.Message,), dict(
+  DESCRIPTOR = _CHECKHOTLISTNAMEREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.CheckHotlistNameRequest)
+  ))
+_sym_db.RegisterMessage(CheckHotlistNameRequest)
+
+CheckHotlistNameResponse = _reflection.GeneratedProtocolMessageType('CheckHotlistNameResponse', (_message.Message,), dict(
+  DESCRIPTOR = _CHECKHOTLISTNAMERESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.CheckHotlistNameResponse)
+  ))
+_sym_db.RegisterMessage(CheckHotlistNameResponse)
+
+RemoveIssuesFromHotlistsRequest = _reflection.GeneratedProtocolMessageType('RemoveIssuesFromHotlistsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _REMOVEISSUESFROMHOTLISTSREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.RemoveIssuesFromHotlistsRequest)
+  ))
+_sym_db.RegisterMessage(RemoveIssuesFromHotlistsRequest)
+
+RemoveIssuesFromHotlistsResponse = _reflection.GeneratedProtocolMessageType('RemoveIssuesFromHotlistsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _REMOVEISSUESFROMHOTLISTSRESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.RemoveIssuesFromHotlistsResponse)
+  ))
+_sym_db.RegisterMessage(RemoveIssuesFromHotlistsResponse)
+
+AddIssuesToHotlistsRequest = _reflection.GeneratedProtocolMessageType('AddIssuesToHotlistsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _ADDISSUESTOHOTLISTSREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.AddIssuesToHotlistsRequest)
+  ))
+_sym_db.RegisterMessage(AddIssuesToHotlistsRequest)
+
+AddIssuesToHotlistsResponse = _reflection.GeneratedProtocolMessageType('AddIssuesToHotlistsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _ADDISSUESTOHOTLISTSRESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.AddIssuesToHotlistsResponse)
+  ))
+_sym_db.RegisterMessage(AddIssuesToHotlistsResponse)
+
+RerankHotlistIssuesRequest = _reflection.GeneratedProtocolMessageType('RerankHotlistIssuesRequest', (_message.Message,), dict(
+  DESCRIPTOR = _RERANKHOTLISTISSUESREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.RerankHotlistIssuesRequest)
+  ))
+_sym_db.RegisterMessage(RerankHotlistIssuesRequest)
+
+RerankHotlistIssuesResponse = _reflection.GeneratedProtocolMessageType('RerankHotlistIssuesResponse', (_message.Message,), dict(
+  DESCRIPTOR = _RERANKHOTLISTISSUESRESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.RerankHotlistIssuesResponse)
+  ))
+_sym_db.RegisterMessage(RerankHotlistIssuesResponse)
+
+UpdateHotlistIssueNoteRequest = _reflection.GeneratedProtocolMessageType('UpdateHotlistIssueNoteRequest', (_message.Message,), dict(
+  DESCRIPTOR = _UPDATEHOTLISTISSUENOTEREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.UpdateHotlistIssueNoteRequest)
+  ))
+_sym_db.RegisterMessage(UpdateHotlistIssueNoteRequest)
+
+UpdateHotlistIssueNoteResponse = _reflection.GeneratedProtocolMessageType('UpdateHotlistIssueNoteResponse', (_message.Message,), dict(
+  DESCRIPTOR = _UPDATEHOTLISTISSUENOTERESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.UpdateHotlistIssueNoteResponse)
+  ))
+_sym_db.RegisterMessage(UpdateHotlistIssueNoteResponse)
+
+DeleteHotlistRequest = _reflection.GeneratedProtocolMessageType('DeleteHotlistRequest', (_message.Message,), dict(
+  DESCRIPTOR = _DELETEHOTLISTREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.DeleteHotlistRequest)
+  ))
+_sym_db.RegisterMessage(DeleteHotlistRequest)
+
+DeleteHotlistResponse = _reflection.GeneratedProtocolMessageType('DeleteHotlistResponse', (_message.Message,), dict(
+  DESCRIPTOR = _DELETEHOTLISTRESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.DeleteHotlistResponse)
+  ))
+_sym_db.RegisterMessage(DeleteHotlistResponse)
+
+PredictComponentRequest = _reflection.GeneratedProtocolMessageType('PredictComponentRequest', (_message.Message,), dict(
+  DESCRIPTOR = _PREDICTCOMPONENTREQUEST,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.PredictComponentRequest)
+  ))
+_sym_db.RegisterMessage(PredictComponentRequest)
+
+PredictComponentResponse = _reflection.GeneratedProtocolMessageType('PredictComponentResponse', (_message.Message,), dict(
+  DESCRIPTOR = _PREDICTCOMPONENTRESPONSE,
+  __module__ = 'api.api_proto.features_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.PredictComponentResponse)
+  ))
+_sym_db.RegisterMessage(PredictComponentResponse)
+
+
+
+_FEATURES = _descriptor.ServiceDescriptor(
+  name='Features',
+  full_name='monorail.Features',
+  file=DESCRIPTOR,
+  index=0,
+  serialized_options=None,
+  serialized_start=2387,
+  serialized_end=3960,
+  methods=[
+  _descriptor.MethodDescriptor(
+    name='ListHotlistsByUser',
+    full_name='monorail.Features.ListHotlistsByUser',
+    index=0,
+    containing_service=None,
+    input_type=_LISTHOTLISTSBYUSERREQUEST,
+    output_type=_LISTHOTLISTSBYUSERRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListHotlistsByIssue',
+    full_name='monorail.Features.ListHotlistsByIssue',
+    index=1,
+    containing_service=None,
+    input_type=_LISTHOTLISTSBYISSUEREQUEST,
+    output_type=_LISTHOTLISTSBYISSUERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListRecentlyVisitedHotlists',
+    full_name='monorail.Features.ListRecentlyVisitedHotlists',
+    index=2,
+    containing_service=None,
+    input_type=_LISTRECENTLYVISITEDHOTLISTSREQUEST,
+    output_type=_LISTRECENTLYVISITEDHOTLISTSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListStarredHotlists',
+    full_name='monorail.Features.ListStarredHotlists',
+    index=3,
+    containing_service=None,
+    input_type=_LISTSTARREDHOTLISTSREQUEST,
+    output_type=_LISTSTARREDHOTLISTSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetHotlistStarCount',
+    full_name='monorail.Features.GetHotlistStarCount',
+    index=4,
+    containing_service=None,
+    input_type=_GETHOTLISTSTARCOUNTREQUEST,
+    output_type=_GETHOTLISTSTARCOUNTRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='StarHotlist',
+    full_name='monorail.Features.StarHotlist',
+    index=5,
+    containing_service=None,
+    input_type=_STARHOTLISTREQUEST,
+    output_type=_STARHOTLISTRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetHotlist',
+    full_name='monorail.Features.GetHotlist',
+    index=6,
+    containing_service=None,
+    input_type=_GETHOTLISTREQUEST,
+    output_type=_GETHOTLISTRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListHotlistItems',
+    full_name='monorail.Features.ListHotlistItems',
+    index=7,
+    containing_service=None,
+    input_type=_LISTHOTLISTITEMSREQUEST,
+    output_type=_LISTHOTLISTITEMSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='CreateHotlist',
+    full_name='monorail.Features.CreateHotlist',
+    index=8,
+    containing_service=None,
+    input_type=_CREATEHOTLISTREQUEST,
+    output_type=_CREATEHOTLISTRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='CheckHotlistName',
+    full_name='monorail.Features.CheckHotlistName',
+    index=9,
+    containing_service=None,
+    input_type=_CHECKHOTLISTNAMEREQUEST,
+    output_type=_CHECKHOTLISTNAMERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='RemoveIssuesFromHotlists',
+    full_name='monorail.Features.RemoveIssuesFromHotlists',
+    index=10,
+    containing_service=None,
+    input_type=_REMOVEISSUESFROMHOTLISTSREQUEST,
+    output_type=_REMOVEISSUESFROMHOTLISTSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='AddIssuesToHotlists',
+    full_name='monorail.Features.AddIssuesToHotlists',
+    index=11,
+    containing_service=None,
+    input_type=_ADDISSUESTOHOTLISTSREQUEST,
+    output_type=_ADDISSUESTOHOTLISTSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='RerankHotlistIssues',
+    full_name='monorail.Features.RerankHotlistIssues',
+    index=12,
+    containing_service=None,
+    input_type=_RERANKHOTLISTISSUESREQUEST,
+    output_type=_RERANKHOTLISTISSUESRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='UpdateHotlistIssueNote',
+    full_name='monorail.Features.UpdateHotlistIssueNote',
+    index=13,
+    containing_service=None,
+    input_type=_UPDATEHOTLISTISSUENOTEREQUEST,
+    output_type=_UPDATEHOTLISTISSUENOTERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='DeleteHotlist',
+    full_name='monorail.Features.DeleteHotlist',
+    index=14,
+    containing_service=None,
+    input_type=_DELETEHOTLISTREQUEST,
+    output_type=_DELETEHOTLISTRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='PredictComponent',
+    full_name='monorail.Features.PredictComponent',
+    index=15,
+    containing_service=None,
+    input_type=_PREDICTCOMPONENTREQUEST,
+    output_type=_PREDICTCOMPONENTRESPONSE,
+    serialized_options=None,
+  ),
+])
+_sym_db.RegisterServiceDescriptor(_FEATURES)
+
+DESCRIPTOR.services_by_name['Features'] = _FEATURES
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/api_proto/features_prpc_pb2.py b/api/api_proto/features_prpc_pb2.py
new file mode 100644
index 0000000..17257e5
--- /dev/null
+++ b/api/api_proto/features_prpc_pb2.py
@@ -0,0 +1,274 @@
+# Generated by the pRPC protocol buffer compiler plugin.  DO NOT EDIT!
+# source: api/api_proto/features.proto
+
+import base64
+import zlib
+
+from google.protobuf import descriptor_pb2
+
+# Includes description of the api/api_proto/features.proto and all of its transitive
+# dependencies. Includes source code info.
+FILE_DESCRIPTOR_SET = descriptor_pb2.FileDescriptorSet()
+FILE_DESCRIPTOR_SET.ParseFromString(zlib.decompress(base64.b64decode(
+    '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')))
+_INDEX = {
+    f.name: {
+      'descriptor': f,
+      'services': {s.name: s for s in f.service},
+    }
+    for f in FILE_DESCRIPTOR_SET.file
+}
+
+
+FeaturesServiceDescription = {
+  'file_descriptor_set': FILE_DESCRIPTOR_SET,
+  'file_descriptor': _INDEX[u'api/api_proto/features.proto']['descriptor'],
+  'service_descriptor': _INDEX[u'api/api_proto/features.proto']['services'][u'Features'],
+}
diff --git a/api/api_proto/issue_objects.proto b/api/api_proto/issue_objects.proto
new file mode 100644
index 0000000..9343c98
--- /dev/null
+++ b/api/api_proto/issue_objects.proto
@@ -0,0 +1,207 @@
+// Copyright 2018 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
+
+// This file defines protobufs for issues and related business
+// objects, e.g., field values, comments, and attachments.
+
+syntax = "proto3";
+
+package monorail;
+
+import "google/protobuf/wrappers.proto";
+import "api/api_proto/common.proto";
+
+
+// Next available tag: 8
+message Approval {
+  FieldRef field_ref = 1;
+  repeated UserRef approver_refs = 2;
+  ApprovalStatus status = 3;
+  fixed32 set_on = 4;
+  UserRef setter_ref = 5;
+  PhaseRef phase_ref = 7;
+}
+
+
+// Next available tag: 8
+enum ApprovalStatus {
+  NOT_SET = 0;
+  NEEDS_REVIEW = 1;
+  NA = 2;
+  REVIEW_REQUESTED = 3;
+  REVIEW_STARTED = 4;
+  NEED_INFO = 5;
+  APPROVED = 6;
+  NOT_APPROVED = 7;
+}
+
+
+// This message is only suitable for displaying the amendment to users.
+// We don't currently offer structured amendments that client code can
+// reason about, field names can be ambiguous, and we don't have
+// old_value for most changes.
+// Next available tag: 4
+message Amendment {
+  // This may be the name of a built-in or custom field, or relative to
+  // an approval field name.
+  string field_name = 1;
+  // This may be a new value that overwrote the old value, e.g., "Assigned",
+  // or it may be a space-separated list of changes, e.g., "Size-L -Size-S".
+  string new_or_delta_value = 2;
+  // old_value is only used when the user changes the summary.
+  string old_value = 3;
+}
+
+
+// Next available tag: 9
+message Attachment {
+  uint64 attachment_id = 1;
+  string filename = 2;
+  uint64 size = 3;  // Size in bytes.
+  string content_type = 4;
+  bool is_deleted = 5;
+  string thumbnail_url = 6;
+  string view_url = 7;
+  string download_url = 8;
+}
+
+
+// Next available tag: 16
+message Comment {
+  string project_name = 1;
+  uint32 local_id = 2;
+  uint32 sequence_num = 3;
+  bool is_deleted = 4;
+  UserRef commenter = 5;
+  fixed32 timestamp = 6;
+  string content = 7;
+  string inbound_message = 8;
+  repeated Amendment amendments = 9;
+  repeated Attachment attachments = 10;
+  FieldRef approval_ref = 11;
+  // If set, this comment is an issue description.
+  uint32 description_num = 12;
+  bool is_spam = 13;
+  bool can_delete = 14;
+  bool can_flag = 15;
+}
+
+
+// Next available tag: 5
+message FieldValue {
+  FieldRef field_ref = 1;
+  string value = 2;
+  bool is_derived = 3;
+  PhaseRef phase_ref = 4;
+}
+
+
+// Next available tag: 28
+message Issue {
+  string project_name = 1;
+  uint32 local_id = 2;
+  string summary = 3;
+  StatusRef status_ref = 4;
+  UserRef owner_ref = 5;
+  repeated UserRef cc_refs = 6;
+  repeated LabelRef label_refs = 7;
+  repeated ComponentRef component_refs = 8;
+  repeated IssueRef blocked_on_issue_refs = 9;
+  repeated IssueRef blocking_issue_refs = 10;
+  repeated IssueRef dangling_blocked_on_refs = 23;
+  repeated IssueRef dangling_blocking_refs = 24;
+  IssueRef merged_into_issue_ref = 11;
+  repeated FieldValue field_values = 12;
+  bool is_deleted = 13;
+  UserRef reporter_ref = 14;
+  fixed32 opened_timestamp = 15;
+  fixed32 closed_timestamp = 16;
+  fixed32 modified_timestamp = 17;
+  fixed32 component_modified_timestamp = 25;
+  fixed32 status_modified_timestamp = 26;
+  fixed32 owner_modified_timestamp = 27;
+  uint32 star_count = 18;
+  bool is_spam = 19;
+  uint32 attachment_count = 20;
+  repeated Approval approval_values = 21;
+  repeated PhaseDef phases = 22;
+}
+
+
+// Next available tag: 18
+message IssueDelta {
+  // Note: We use StringValue instead of string so that we can
+  // check if delta.HasField('status').  Proto3 only allows that
+  // for nested messages and provides "boxed" values for this purpose.
+  // In JSON, a StringValue is represented as a simple string.
+  google.protobuf.StringValue status = 1;
+  UserRef owner_ref = 2;
+  repeated UserRef cc_refs_add = 3;
+  repeated UserRef cc_refs_remove = 4;
+  repeated ComponentRef comp_refs_add = 5;
+  repeated ComponentRef comp_refs_remove = 6;
+  repeated LabelRef label_refs_add = 7;
+  repeated LabelRef label_refs_remove = 8;
+  repeated FieldValue field_vals_add = 9;
+  repeated FieldValue field_vals_remove = 10;
+  repeated FieldRef fields_clear = 11;
+  repeated IssueRef blocked_on_refs_add = 12;
+  repeated IssueRef blocked_on_refs_remove = 13;
+  repeated IssueRef blocking_refs_add = 14;
+  repeated IssueRef blocking_refs_remove = 15;
+  IssueRef merged_into_ref = 16;
+  google.protobuf.StringValue summary = 17;
+}
+
+
+// Next available tag: 7
+message ApprovalDelta {
+  ApprovalStatus status = 1;
+  repeated UserRef approver_refs_add = 2;
+  repeated UserRef approver_refs_remove = 3;
+  repeated FieldValue field_vals_add = 4;
+  repeated FieldValue field_vals_remove = 5;
+  repeated FieldRef fields_clear = 6;
+}
+
+
+// Next available tag: 3
+message AttachmentUpload {
+  string filename = 1;
+  bytes content = 2;
+}
+
+
+// Next available tag: 4
+message IssueSummary {
+  string project_name = 1;
+  uint32 local_id = 2;
+  string summary = 3;
+}
+
+
+// Next available tag: 3
+message PhaseDef {
+  PhaseRef phase_ref = 1;
+  uint32 rank = 2;
+}
+
+
+// Next available tag: 2
+message PhaseRef {
+  string phase_name = 1;
+}
+
+
+// Next available tag: 7
+enum SearchScope {
+  ALL = 0;
+  NEW = 1;
+  OPEN = 2;
+  OWNED = 3;
+  REPORTED = 4;
+  STARRED = 5;
+  TO_VERIFY = 6;
+}
diff --git a/api/api_proto/issue_objects_pb2.py b/api/api_proto/issue_objects_pb2.py
new file mode 100644
index 0000000..fa347e1
--- /dev/null
+++ b/api/api_proto/issue_objects_pb2.py
@@ -0,0 +1,1232 @@
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/api_proto/issue_objects.proto
+
+import sys
+_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
+from google.protobuf.internal import enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2
+from api.api_proto import common_pb2 as api_dot_api__proto_dot_common__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/api_proto/issue_objects.proto',
+  package='monorail',
+  syntax='proto3',
+  serialized_options=None,
+  serialized_pb=_b('\n!api/api_proto/issue_objects.proto\x12\x08monorail\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1a\x61pi/api_proto/common.proto\"\xe3\x01\n\x08\x41pproval\x12%\n\tfield_ref\x18\x01 \x01(\x0b\x32\x12.monorail.FieldRef\x12(\n\rapprover_refs\x18\x02 \x03(\x0b\x32\x11.monorail.UserRef\x12(\n\x06status\x18\x03 \x01(\x0e\x32\x18.monorail.ApprovalStatus\x12\x0e\n\x06set_on\x18\x04 \x01(\x07\x12%\n\nsetter_ref\x18\x05 \x01(\x0b\x32\x11.monorail.UserRef\x12%\n\tphase_ref\x18\x07 \x01(\x0b\x32\x12.monorail.PhaseRef\"N\n\tAmendment\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x1a\n\x12new_or_delta_value\x18\x02 \x01(\t\x12\x11\n\told_value\x18\x03 \x01(\t\"\xac\x01\n\nAttachment\x12\x15\n\rattachment_id\x18\x01 \x01(\x04\x12\x10\n\x08\x66ilename\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\x12\x14\n\x0c\x63ontent_type\x18\x04 \x01(\t\x12\x12\n\nis_deleted\x18\x05 \x01(\x08\x12\x15\n\rthumbnail_url\x18\x06 \x01(\t\x12\x10\n\x08view_url\x18\x07 \x01(\t\x12\x14\n\x0c\x64ownload_url\x18\x08 \x01(\t\"\x8c\x03\n\x07\x43omment\x12\x14\n\x0cproject_name\x18\x01 \x01(\t\x12\x10\n\x08local_id\x18\x02 \x01(\r\x12\x14\n\x0csequence_num\x18\x03 \x01(\r\x12\x12\n\nis_deleted\x18\x04 \x01(\x08\x12$\n\tcommenter\x18\x05 \x01(\x0b\x32\x11.monorail.UserRef\x12\x11\n\ttimestamp\x18\x06 \x01(\x07\x12\x0f\n\x07\x63ontent\x18\x07 \x01(\t\x12\x17\n\x0finbound_message\x18\x08 \x01(\t\x12\'\n\namendments\x18\t \x03(\x0b\x32\x13.monorail.Amendment\x12)\n\x0b\x61ttachments\x18\n \x03(\x0b\x32\x14.monorail.Attachment\x12(\n\x0c\x61pproval_ref\x18\x0b \x01(\x0b\x32\x12.monorail.FieldRef\x12\x17\n\x0f\x64\x65scription_num\x18\x0c \x01(\r\x12\x0f\n\x07is_spam\x18\r \x01(\x08\x12\x12\n\ncan_delete\x18\x0e \x01(\x08\x12\x10\n\x08\x63\x61n_flag\x18\x0f \x01(\x08\"}\n\nFieldValue\x12%\n\tfield_ref\x18\x01 \x01(\x0b\x32\x12.monorail.FieldRef\x12\r\n\x05value\x18\x02 \x01(\t\x12\x12\n\nis_derived\x18\x03 \x01(\x08\x12%\n\tphase_ref\x18\x04 \x01(\x0b\x32\x12.monorail.PhaseRef\"\xc0\x07\n\x05Issue\x12\x14\n\x0cproject_name\x18\x01 \x01(\t\x12\x10\n\x08local_id\x18\x02 \x01(\r\x12\x0f\n\x07summary\x18\x03 \x01(\t\x12\'\n\nstatus_ref\x18\x04 \x01(\x0b\x32\x13.monorail.StatusRef\x12$\n\towner_ref\x18\x05 \x01(\x0b\x32\x11.monorail.UserRef\x12\"\n\x07\x63\x63_refs\x18\x06 \x03(\x0b\x32\x11.monorail.UserRef\x12&\n\nlabel_refs\x18\x07 \x03(\x0b\x32\x12.monorail.LabelRef\x12.\n\x0e\x63omponent_refs\x18\x08 \x03(\x0b\x32\x16.monorail.ComponentRef\x12\x31\n\x15\x62locked_on_issue_refs\x18\t \x03(\x0b\x32\x12.monorail.IssueRef\x12/\n\x13\x62locking_issue_refs\x18\n \x03(\x0b\x32\x12.monorail.IssueRef\x12\x34\n\x18\x64\x61ngling_blocked_on_refs\x18\x17 \x03(\x0b\x32\x12.monorail.IssueRef\x12\x32\n\x16\x64\x61ngling_blocking_refs\x18\x18 \x03(\x0b\x32\x12.monorail.IssueRef\x12\x31\n\x15merged_into_issue_ref\x18\x0b \x01(\x0b\x32\x12.monorail.IssueRef\x12*\n\x0c\x66ield_values\x18\x0c \x03(\x0b\x32\x14.monorail.FieldValue\x12\x12\n\nis_deleted\x18\r \x01(\x08\x12\'\n\x0creporter_ref\x18\x0e \x01(\x0b\x32\x11.monorail.UserRef\x12\x18\n\x10opened_timestamp\x18\x0f \x01(\x07\x12\x18\n\x10\x63losed_timestamp\x18\x10 \x01(\x07\x12\x1a\n\x12modified_timestamp\x18\x11 \x01(\x07\x12$\n\x1c\x63omponent_modified_timestamp\x18\x19 \x01(\x07\x12!\n\x19status_modified_timestamp\x18\x1a \x01(\x07\x12 \n\x18owner_modified_timestamp\x18\x1b \x01(\x07\x12\x12\n\nstar_count\x18\x12 \x01(\r\x12\x0f\n\x07is_spam\x18\x13 \x01(\x08\x12\x18\n\x10\x61ttachment_count\x18\x14 \x01(\r\x12+\n\x0f\x61pproval_values\x18\x15 \x03(\x0b\x32\x12.monorail.Approval\x12\"\n\x06phases\x18\x16 \x03(\x0b\x32\x12.monorail.PhaseDef\"\x9a\x06\n\nIssueDelta\x12,\n\x06status\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.StringValue\x12$\n\towner_ref\x18\x02 \x01(\x0b\x32\x11.monorail.UserRef\x12&\n\x0b\x63\x63_refs_add\x18\x03 \x03(\x0b\x32\x11.monorail.UserRef\x12)\n\x0e\x63\x63_refs_remove\x18\x04 \x03(\x0b\x32\x11.monorail.UserRef\x12-\n\rcomp_refs_add\x18\x05 \x03(\x0b\x32\x16.monorail.ComponentRef\x12\x30\n\x10\x63omp_refs_remove\x18\x06 \x03(\x0b\x32\x16.monorail.ComponentRef\x12*\n\x0elabel_refs_add\x18\x07 \x03(\x0b\x32\x12.monorail.LabelRef\x12-\n\x11label_refs_remove\x18\x08 \x03(\x0b\x32\x12.monorail.LabelRef\x12,\n\x0e\x66ield_vals_add\x18\t \x03(\x0b\x32\x14.monorail.FieldValue\x12/\n\x11\x66ield_vals_remove\x18\n \x03(\x0b\x32\x14.monorail.FieldValue\x12(\n\x0c\x66ields_clear\x18\x0b \x03(\x0b\x32\x12.monorail.FieldRef\x12/\n\x13\x62locked_on_refs_add\x18\x0c \x03(\x0b\x32\x12.monorail.IssueRef\x12\x32\n\x16\x62locked_on_refs_remove\x18\r \x03(\x0b\x32\x12.monorail.IssueRef\x12-\n\x11\x62locking_refs_add\x18\x0e \x03(\x0b\x32\x12.monorail.IssueRef\x12\x30\n\x14\x62locking_refs_remove\x18\x0f \x03(\x0b\x32\x12.monorail.IssueRef\x12+\n\x0fmerged_into_ref\x18\x10 \x01(\x0b\x32\x12.monorail.IssueRef\x12-\n\x07summary\x18\x11 \x01(\x0b\x32\x1c.google.protobuf.StringValue\"\xa1\x02\n\rApprovalDelta\x12(\n\x06status\x18\x01 \x01(\x0e\x32\x18.monorail.ApprovalStatus\x12,\n\x11\x61pprover_refs_add\x18\x02 \x03(\x0b\x32\x11.monorail.UserRef\x12/\n\x14\x61pprover_refs_remove\x18\x03 \x03(\x0b\x32\x11.monorail.UserRef\x12,\n\x0e\x66ield_vals_add\x18\x04 \x03(\x0b\x32\x14.monorail.FieldValue\x12/\n\x11\x66ield_vals_remove\x18\x05 \x03(\x0b\x32\x14.monorail.FieldValue\x12(\n\x0c\x66ields_clear\x18\x06 \x03(\x0b\x32\x12.monorail.FieldRef\"5\n\x10\x41ttachmentUpload\x12\x10\n\x08\x66ilename\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\x0c\"G\n\x0cIssueSummary\x12\x14\n\x0cproject_name\x18\x01 \x01(\t\x12\x10\n\x08local_id\x18\x02 \x01(\r\x12\x0f\n\x07summary\x18\x03 \x01(\t\"?\n\x08PhaseDef\x12%\n\tphase_ref\x18\x01 \x01(\x0b\x32\x12.monorail.PhaseRef\x12\x0c\n\x04rank\x18\x02 \x01(\r\"\x1e\n\x08PhaseRef\x12\x12\n\nphase_name\x18\x01 \x01(\t*\x90\x01\n\x0e\x41pprovalStatus\x12\x0b\n\x07NOT_SET\x10\x00\x12\x10\n\x0cNEEDS_REVIEW\x10\x01\x12\x06\n\x02NA\x10\x02\x12\x14\n\x10REVIEW_REQUESTED\x10\x03\x12\x12\n\x0eREVIEW_STARTED\x10\x04\x12\r\n\tNEED_INFO\x10\x05\x12\x0c\n\x08\x41PPROVED\x10\x06\x12\x10\n\x0cNOT_APPROVED\x10\x07*^\n\x0bSearchScope\x12\x07\n\x03\x41LL\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x08\n\x04OPEN\x10\x02\x12\t\n\x05OWNED\x10\x03\x12\x0c\n\x08REPORTED\x10\x04\x12\x0b\n\x07STARRED\x10\x05\x12\r\n\tTO_VERIFY\x10\x06\x62\x06proto3')
+  ,
+  dependencies=[google_dot_protobuf_dot_wrappers__pb2.DESCRIPTOR,api_dot_api__proto_dot_common__pb2.DESCRIPTOR,])
+
+_APPROVALSTATUS = _descriptor.EnumDescriptor(
+  name='ApprovalStatus',
+  full_name='monorail.ApprovalStatus',
+  filename=None,
+  file=DESCRIPTOR,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='NOT_SET', index=0, number=0,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='NEEDS_REVIEW', index=1, number=1,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='NA', index=2, number=2,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='REVIEW_REQUESTED', index=3, number=3,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='REVIEW_STARTED', index=4, number=4,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='NEED_INFO', index=5, number=5,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='APPROVED', index=6, number=6,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='NOT_APPROVED', index=7, number=7,
+      serialized_options=None,
+      type=None),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=3396,
+  serialized_end=3540,
+)
+_sym_db.RegisterEnumDescriptor(_APPROVALSTATUS)
+
+ApprovalStatus = enum_type_wrapper.EnumTypeWrapper(_APPROVALSTATUS)
+_SEARCHSCOPE = _descriptor.EnumDescriptor(
+  name='SearchScope',
+  full_name='monorail.SearchScope',
+  filename=None,
+  file=DESCRIPTOR,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='ALL', index=0, number=0,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='NEW', index=1, number=1,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='OPEN', index=2, number=2,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='OWNED', index=3, number=3,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='REPORTED', index=4, number=4,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='STARRED', index=5, number=5,
+      serialized_options=None,
+      type=None),
+    _descriptor.EnumValueDescriptor(
+      name='TO_VERIFY', index=6, number=6,
+      serialized_options=None,
+      type=None),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=3542,
+  serialized_end=3636,
+)
+_sym_db.RegisterEnumDescriptor(_SEARCHSCOPE)
+
+SearchScope = enum_type_wrapper.EnumTypeWrapper(_SEARCHSCOPE)
+NOT_SET = 0
+NEEDS_REVIEW = 1
+NA = 2
+REVIEW_REQUESTED = 3
+REVIEW_STARTED = 4
+NEED_INFO = 5
+APPROVED = 6
+NOT_APPROVED = 7
+ALL = 0
+NEW = 1
+OPEN = 2
+OWNED = 3
+REPORTED = 4
+STARRED = 5
+TO_VERIFY = 6
+
+
+
+_APPROVAL = _descriptor.Descriptor(
+  name='Approval',
+  full_name='monorail.Approval',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='field_ref', full_name='monorail.Approval.field_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='approver_refs', full_name='monorail.Approval.approver_refs', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='status', full_name='monorail.Approval.status', index=2,
+      number=3, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='set_on', full_name='monorail.Approval.set_on', index=3,
+      number=4, type=7, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='setter_ref', full_name='monorail.Approval.setter_ref', index=4,
+      number=5, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='phase_ref', full_name='monorail.Approval.phase_ref', index=5,
+      number=7, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=108,
+  serialized_end=335,
+)
+
+
+_AMENDMENT = _descriptor.Descriptor(
+  name='Amendment',
+  full_name='monorail.Amendment',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='field_name', full_name='monorail.Amendment.field_name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='new_or_delta_value', full_name='monorail.Amendment.new_or_delta_value', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='old_value', full_name='monorail.Amendment.old_value', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=337,
+  serialized_end=415,
+)
+
+
+_ATTACHMENT = _descriptor.Descriptor(
+  name='Attachment',
+  full_name='monorail.Attachment',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='attachment_id', full_name='monorail.Attachment.attachment_id', index=0,
+      number=1, type=4, cpp_type=4, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='filename', full_name='monorail.Attachment.filename', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='size', full_name='monorail.Attachment.size', index=2,
+      number=3, type=4, cpp_type=4, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='content_type', full_name='monorail.Attachment.content_type', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_deleted', full_name='monorail.Attachment.is_deleted', index=4,
+      number=5, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='thumbnail_url', full_name='monorail.Attachment.thumbnail_url', index=5,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='view_url', full_name='monorail.Attachment.view_url', index=6,
+      number=7, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='download_url', full_name='monorail.Attachment.download_url', index=7,
+      number=8, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=418,
+  serialized_end=590,
+)
+
+
+_COMMENT = _descriptor.Descriptor(
+  name='Comment',
+  full_name='monorail.Comment',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.Comment.project_name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='local_id', full_name='monorail.Comment.local_id', index=1,
+      number=2, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='sequence_num', full_name='monorail.Comment.sequence_num', index=2,
+      number=3, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_deleted', full_name='monorail.Comment.is_deleted', index=3,
+      number=4, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='commenter', full_name='monorail.Comment.commenter', index=4,
+      number=5, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='timestamp', full_name='monorail.Comment.timestamp', index=5,
+      number=6, type=7, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='content', full_name='monorail.Comment.content', index=6,
+      number=7, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='inbound_message', full_name='monorail.Comment.inbound_message', index=7,
+      number=8, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='amendments', full_name='monorail.Comment.amendments', index=8,
+      number=9, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='attachments', full_name='monorail.Comment.attachments', index=9,
+      number=10, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='approval_ref', full_name='monorail.Comment.approval_ref', index=10,
+      number=11, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='description_num', full_name='monorail.Comment.description_num', index=11,
+      number=12, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_spam', full_name='monorail.Comment.is_spam', index=12,
+      number=13, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='can_delete', full_name='monorail.Comment.can_delete', index=13,
+      number=14, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='can_flag', full_name='monorail.Comment.can_flag', index=14,
+      number=15, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=593,
+  serialized_end=989,
+)
+
+
+_FIELDVALUE = _descriptor.Descriptor(
+  name='FieldValue',
+  full_name='monorail.FieldValue',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='field_ref', full_name='monorail.FieldValue.field_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='value', full_name='monorail.FieldValue.value', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_derived', full_name='monorail.FieldValue.is_derived', index=2,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='phase_ref', full_name='monorail.FieldValue.phase_ref', index=3,
+      number=4, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=991,
+  serialized_end=1116,
+)
+
+
+_ISSUE = _descriptor.Descriptor(
+  name='Issue',
+  full_name='monorail.Issue',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.Issue.project_name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='local_id', full_name='monorail.Issue.local_id', index=1,
+      number=2, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='summary', full_name='monorail.Issue.summary', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='status_ref', full_name='monorail.Issue.status_ref', index=3,
+      number=4, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='owner_ref', full_name='monorail.Issue.owner_ref', index=4,
+      number=5, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='cc_refs', full_name='monorail.Issue.cc_refs', index=5,
+      number=6, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='label_refs', full_name='monorail.Issue.label_refs', index=6,
+      number=7, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='component_refs', full_name='monorail.Issue.component_refs', index=7,
+      number=8, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='blocked_on_issue_refs', full_name='monorail.Issue.blocked_on_issue_refs', index=8,
+      number=9, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='blocking_issue_refs', full_name='monorail.Issue.blocking_issue_refs', index=9,
+      number=10, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='dangling_blocked_on_refs', full_name='monorail.Issue.dangling_blocked_on_refs', index=10,
+      number=23, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='dangling_blocking_refs', full_name='monorail.Issue.dangling_blocking_refs', index=11,
+      number=24, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='merged_into_issue_ref', full_name='monorail.Issue.merged_into_issue_ref', index=12,
+      number=11, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='field_values', full_name='monorail.Issue.field_values', index=13,
+      number=12, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_deleted', full_name='monorail.Issue.is_deleted', index=14,
+      number=13, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='reporter_ref', full_name='monorail.Issue.reporter_ref', index=15,
+      number=14, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='opened_timestamp', full_name='monorail.Issue.opened_timestamp', index=16,
+      number=15, type=7, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='closed_timestamp', full_name='monorail.Issue.closed_timestamp', index=17,
+      number=16, type=7, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='modified_timestamp', full_name='monorail.Issue.modified_timestamp', index=18,
+      number=17, type=7, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='component_modified_timestamp', full_name='monorail.Issue.component_modified_timestamp', index=19,
+      number=25, type=7, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='status_modified_timestamp', full_name='monorail.Issue.status_modified_timestamp', index=20,
+      number=26, type=7, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='owner_modified_timestamp', full_name='monorail.Issue.owner_modified_timestamp', index=21,
+      number=27, type=7, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='star_count', full_name='monorail.Issue.star_count', index=22,
+      number=18, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_spam', full_name='monorail.Issue.is_spam', index=23,
+      number=19, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='attachment_count', full_name='monorail.Issue.attachment_count', index=24,
+      number=20, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='approval_values', full_name='monorail.Issue.approval_values', index=25,
+      number=21, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='phases', full_name='monorail.Issue.phases', index=26,
+      number=22, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1119,
+  serialized_end=2079,
+)
+
+
+_ISSUEDELTA = _descriptor.Descriptor(
+  name='IssueDelta',
+  full_name='monorail.IssueDelta',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='status', full_name='monorail.IssueDelta.status', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='owner_ref', full_name='monorail.IssueDelta.owner_ref', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='cc_refs_add', full_name='monorail.IssueDelta.cc_refs_add', index=2,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='cc_refs_remove', full_name='monorail.IssueDelta.cc_refs_remove', index=3,
+      number=4, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='comp_refs_add', full_name='monorail.IssueDelta.comp_refs_add', index=4,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='comp_refs_remove', full_name='monorail.IssueDelta.comp_refs_remove', index=5,
+      number=6, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='label_refs_add', full_name='monorail.IssueDelta.label_refs_add', index=6,
+      number=7, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='label_refs_remove', full_name='monorail.IssueDelta.label_refs_remove', index=7,
+      number=8, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='field_vals_add', full_name='monorail.IssueDelta.field_vals_add', index=8,
+      number=9, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='field_vals_remove', full_name='monorail.IssueDelta.field_vals_remove', index=9,
+      number=10, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='fields_clear', full_name='monorail.IssueDelta.fields_clear', index=10,
+      number=11, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='blocked_on_refs_add', full_name='monorail.IssueDelta.blocked_on_refs_add', index=11,
+      number=12, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='blocked_on_refs_remove', full_name='monorail.IssueDelta.blocked_on_refs_remove', index=12,
+      number=13, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='blocking_refs_add', full_name='monorail.IssueDelta.blocking_refs_add', index=13,
+      number=14, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='blocking_refs_remove', full_name='monorail.IssueDelta.blocking_refs_remove', index=14,
+      number=15, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='merged_into_ref', full_name='monorail.IssueDelta.merged_into_ref', index=15,
+      number=16, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='summary', full_name='monorail.IssueDelta.summary', index=16,
+      number=17, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2082,
+  serialized_end=2876,
+)
+
+
+_APPROVALDELTA = _descriptor.Descriptor(
+  name='ApprovalDelta',
+  full_name='monorail.ApprovalDelta',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='status', full_name='monorail.ApprovalDelta.status', index=0,
+      number=1, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='approver_refs_add', full_name='monorail.ApprovalDelta.approver_refs_add', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='approver_refs_remove', full_name='monorail.ApprovalDelta.approver_refs_remove', index=2,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='field_vals_add', full_name='monorail.ApprovalDelta.field_vals_add', index=3,
+      number=4, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='field_vals_remove', full_name='monorail.ApprovalDelta.field_vals_remove', index=4,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='fields_clear', full_name='monorail.ApprovalDelta.fields_clear', index=5,
+      number=6, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2879,
+  serialized_end=3168,
+)
+
+
+_ATTACHMENTUPLOAD = _descriptor.Descriptor(
+  name='AttachmentUpload',
+  full_name='monorail.AttachmentUpload',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='filename', full_name='monorail.AttachmentUpload.filename', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='content', full_name='monorail.AttachmentUpload.content', index=1,
+      number=2, type=12, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b(""),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3170,
+  serialized_end=3223,
+)
+
+
+_ISSUESUMMARY = _descriptor.Descriptor(
+  name='IssueSummary',
+  full_name='monorail.IssueSummary',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.IssueSummary.project_name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='local_id', full_name='monorail.IssueSummary.local_id', index=1,
+      number=2, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='summary', full_name='monorail.IssueSummary.summary', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3225,
+  serialized_end=3296,
+)
+
+
+_PHASEDEF = _descriptor.Descriptor(
+  name='PhaseDef',
+  full_name='monorail.PhaseDef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='phase_ref', full_name='monorail.PhaseDef.phase_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='rank', full_name='monorail.PhaseDef.rank', index=1,
+      number=2, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3298,
+  serialized_end=3361,
+)
+
+
+_PHASEREF = _descriptor.Descriptor(
+  name='PhaseRef',
+  full_name='monorail.PhaseRef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='phase_name', full_name='monorail.PhaseRef.phase_name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3363,
+  serialized_end=3393,
+)
+
+_APPROVAL.fields_by_name['field_ref'].message_type = api_dot_api__proto_dot_common__pb2._FIELDREF
+_APPROVAL.fields_by_name['approver_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_APPROVAL.fields_by_name['status'].enum_type = _APPROVALSTATUS
+_APPROVAL.fields_by_name['setter_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_APPROVAL.fields_by_name['phase_ref'].message_type = _PHASEREF
+_COMMENT.fields_by_name['commenter'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_COMMENT.fields_by_name['amendments'].message_type = _AMENDMENT
+_COMMENT.fields_by_name['attachments'].message_type = _ATTACHMENT
+_COMMENT.fields_by_name['approval_ref'].message_type = api_dot_api__proto_dot_common__pb2._FIELDREF
+_FIELDVALUE.fields_by_name['field_ref'].message_type = api_dot_api__proto_dot_common__pb2._FIELDREF
+_FIELDVALUE.fields_by_name['phase_ref'].message_type = _PHASEREF
+_ISSUE.fields_by_name['status_ref'].message_type = api_dot_api__proto_dot_common__pb2._STATUSREF
+_ISSUE.fields_by_name['owner_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_ISSUE.fields_by_name['cc_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_ISSUE.fields_by_name['label_refs'].message_type = api_dot_api__proto_dot_common__pb2._LABELREF
+_ISSUE.fields_by_name['component_refs'].message_type = api_dot_api__proto_dot_common__pb2._COMPONENTREF
+_ISSUE.fields_by_name['blocked_on_issue_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_ISSUE.fields_by_name['blocking_issue_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_ISSUE.fields_by_name['dangling_blocked_on_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_ISSUE.fields_by_name['dangling_blocking_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_ISSUE.fields_by_name['merged_into_issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_ISSUE.fields_by_name['field_values'].message_type = _FIELDVALUE
+_ISSUE.fields_by_name['reporter_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_ISSUE.fields_by_name['approval_values'].message_type = _APPROVAL
+_ISSUE.fields_by_name['phases'].message_type = _PHASEDEF
+_ISSUEDELTA.fields_by_name['status'].message_type = google_dot_protobuf_dot_wrappers__pb2._STRINGVALUE
+_ISSUEDELTA.fields_by_name['owner_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_ISSUEDELTA.fields_by_name['cc_refs_add'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_ISSUEDELTA.fields_by_name['cc_refs_remove'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_ISSUEDELTA.fields_by_name['comp_refs_add'].message_type = api_dot_api__proto_dot_common__pb2._COMPONENTREF
+_ISSUEDELTA.fields_by_name['comp_refs_remove'].message_type = api_dot_api__proto_dot_common__pb2._COMPONENTREF
+_ISSUEDELTA.fields_by_name['label_refs_add'].message_type = api_dot_api__proto_dot_common__pb2._LABELREF
+_ISSUEDELTA.fields_by_name['label_refs_remove'].message_type = api_dot_api__proto_dot_common__pb2._LABELREF
+_ISSUEDELTA.fields_by_name['field_vals_add'].message_type = _FIELDVALUE
+_ISSUEDELTA.fields_by_name['field_vals_remove'].message_type = _FIELDVALUE
+_ISSUEDELTA.fields_by_name['fields_clear'].message_type = api_dot_api__proto_dot_common__pb2._FIELDREF
+_ISSUEDELTA.fields_by_name['blocked_on_refs_add'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_ISSUEDELTA.fields_by_name['blocked_on_refs_remove'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_ISSUEDELTA.fields_by_name['blocking_refs_add'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_ISSUEDELTA.fields_by_name['blocking_refs_remove'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_ISSUEDELTA.fields_by_name['merged_into_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_ISSUEDELTA.fields_by_name['summary'].message_type = google_dot_protobuf_dot_wrappers__pb2._STRINGVALUE
+_APPROVALDELTA.fields_by_name['status'].enum_type = _APPROVALSTATUS
+_APPROVALDELTA.fields_by_name['approver_refs_add'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_APPROVALDELTA.fields_by_name['approver_refs_remove'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_APPROVALDELTA.fields_by_name['field_vals_add'].message_type = _FIELDVALUE
+_APPROVALDELTA.fields_by_name['field_vals_remove'].message_type = _FIELDVALUE
+_APPROVALDELTA.fields_by_name['fields_clear'].message_type = api_dot_api__proto_dot_common__pb2._FIELDREF
+_PHASEDEF.fields_by_name['phase_ref'].message_type = _PHASEREF
+DESCRIPTOR.message_types_by_name['Approval'] = _APPROVAL
+DESCRIPTOR.message_types_by_name['Amendment'] = _AMENDMENT
+DESCRIPTOR.message_types_by_name['Attachment'] = _ATTACHMENT
+DESCRIPTOR.message_types_by_name['Comment'] = _COMMENT
+DESCRIPTOR.message_types_by_name['FieldValue'] = _FIELDVALUE
+DESCRIPTOR.message_types_by_name['Issue'] = _ISSUE
+DESCRIPTOR.message_types_by_name['IssueDelta'] = _ISSUEDELTA
+DESCRIPTOR.message_types_by_name['ApprovalDelta'] = _APPROVALDELTA
+DESCRIPTOR.message_types_by_name['AttachmentUpload'] = _ATTACHMENTUPLOAD
+DESCRIPTOR.message_types_by_name['IssueSummary'] = _ISSUESUMMARY
+DESCRIPTOR.message_types_by_name['PhaseDef'] = _PHASEDEF
+DESCRIPTOR.message_types_by_name['PhaseRef'] = _PHASEREF
+DESCRIPTOR.enum_types_by_name['ApprovalStatus'] = _APPROVALSTATUS
+DESCRIPTOR.enum_types_by_name['SearchScope'] = _SEARCHSCOPE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+Approval = _reflection.GeneratedProtocolMessageType('Approval', (_message.Message,), dict(
+  DESCRIPTOR = _APPROVAL,
+  __module__ = 'api.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.Approval)
+  ))
+_sym_db.RegisterMessage(Approval)
+
+Amendment = _reflection.GeneratedProtocolMessageType('Amendment', (_message.Message,), dict(
+  DESCRIPTOR = _AMENDMENT,
+  __module__ = 'api.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.Amendment)
+  ))
+_sym_db.RegisterMessage(Amendment)
+
+Attachment = _reflection.GeneratedProtocolMessageType('Attachment', (_message.Message,), dict(
+  DESCRIPTOR = _ATTACHMENT,
+  __module__ = 'api.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.Attachment)
+  ))
+_sym_db.RegisterMessage(Attachment)
+
+Comment = _reflection.GeneratedProtocolMessageType('Comment', (_message.Message,), dict(
+  DESCRIPTOR = _COMMENT,
+  __module__ = 'api.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.Comment)
+  ))
+_sym_db.RegisterMessage(Comment)
+
+FieldValue = _reflection.GeneratedProtocolMessageType('FieldValue', (_message.Message,), dict(
+  DESCRIPTOR = _FIELDVALUE,
+  __module__ = 'api.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.FieldValue)
+  ))
+_sym_db.RegisterMessage(FieldValue)
+
+Issue = _reflection.GeneratedProtocolMessageType('Issue', (_message.Message,), dict(
+  DESCRIPTOR = _ISSUE,
+  __module__ = 'api.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.Issue)
+  ))
+_sym_db.RegisterMessage(Issue)
+
+IssueDelta = _reflection.GeneratedProtocolMessageType('IssueDelta', (_message.Message,), dict(
+  DESCRIPTOR = _ISSUEDELTA,
+  __module__ = 'api.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.IssueDelta)
+  ))
+_sym_db.RegisterMessage(IssueDelta)
+
+ApprovalDelta = _reflection.GeneratedProtocolMessageType('ApprovalDelta', (_message.Message,), dict(
+  DESCRIPTOR = _APPROVALDELTA,
+  __module__ = 'api.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ApprovalDelta)
+  ))
+_sym_db.RegisterMessage(ApprovalDelta)
+
+AttachmentUpload = _reflection.GeneratedProtocolMessageType('AttachmentUpload', (_message.Message,), dict(
+  DESCRIPTOR = _ATTACHMENTUPLOAD,
+  __module__ = 'api.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.AttachmentUpload)
+  ))
+_sym_db.RegisterMessage(AttachmentUpload)
+
+IssueSummary = _reflection.GeneratedProtocolMessageType('IssueSummary', (_message.Message,), dict(
+  DESCRIPTOR = _ISSUESUMMARY,
+  __module__ = 'api.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.IssueSummary)
+  ))
+_sym_db.RegisterMessage(IssueSummary)
+
+PhaseDef = _reflection.GeneratedProtocolMessageType('PhaseDef', (_message.Message,), dict(
+  DESCRIPTOR = _PHASEDEF,
+  __module__ = 'api.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.PhaseDef)
+  ))
+_sym_db.RegisterMessage(PhaseDef)
+
+PhaseRef = _reflection.GeneratedProtocolMessageType('PhaseRef', (_message.Message,), dict(
+  DESCRIPTOR = _PHASEREF,
+  __module__ = 'api.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.PhaseRef)
+  ))
+_sym_db.RegisterMessage(PhaseRef)
+
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/api_proto/issue_objects_prpc_pb2.py b/api/api_proto/issue_objects_prpc_pb2.py
new file mode 100644
index 0000000..fe96e84
--- /dev/null
+++ b/api/api_proto/issue_objects_prpc_pb2.py
@@ -0,0 +1,4 @@
+# Generated by the pRPC protocol buffer compiler plugin.  DO NOT EDIT!
+# source: api/api_proto/issue_objects.proto
+
+from google.protobuf import descriptor_pb2
diff --git a/api/api_proto/issues.proto b/api/api_proto/issues.proto
new file mode 100644
index 0000000..7c39884
--- /dev/null
+++ b/api/api_proto/issues.proto
@@ -0,0 +1,417 @@
+// Copyright 2018 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
+
+syntax = "proto3";
+
+package monorail;
+
+import "google/protobuf/empty.proto";
+import "api/api_proto/common.proto";
+import "api/api_proto/issue_objects.proto";
+import "api/api_proto/project_objects.proto";
+
+
+service Issues {
+  rpc CreateIssue (CreateIssueRequest) returns (IssueResponse) {}
+  rpc GetIssue (GetIssueRequest) returns (IssueResponse) {}
+  rpc ListIssues (ListIssuesRequest) returns (ListIssuesResponse) {}
+  rpc ListReferencedIssues(ListReferencedIssuesRequest) returns (ListReferencedIssuesResponse) {}
+  rpc ListApplicableFieldDefs(ListApplicableFieldDefsRequest) returns (ListApplicableFieldDefsResponse) {}
+  rpc UpdateIssue (UpdateIssueRequest) returns (IssueResponse) {}
+  rpc StarIssue (StarIssueRequest) returns (StarIssueResponse) {}
+  rpc IsIssueStarred (IsIssueStarredRequest) returns (IsIssueStarredResponse) {}
+  rpc ListStarredIssues (ListStarredIssuesRequest) returns (ListStarredIssuesResponse) {}
+  // There is no CreateComment method because comments are created by updates,
+  // which may have just comment content and no delta.
+  // There is no GetComment method, clients should use ListComments.
+  rpc ListComments (ListCommentsRequest) returns (ListCommentsResponse) {}
+  rpc ListActivities (ListActivitiesRequest) returns (ListActivitiesResponse) {}
+  rpc DeleteComment (DeleteCommentRequest) returns (google.protobuf.Empty) {}
+  rpc BulkUpdateApprovals (BulkUpdateApprovalsRequest) returns (BulkUpdateApprovalsResponse) {}
+  rpc UpdateApproval (UpdateApprovalRequest) returns (UpdateApprovalResponse) {}
+  rpc ConvertIssueApprovalsTemplate (ConvertIssueApprovalsTemplateRequest) returns (ConvertIssueApprovalsTemplateResponse) {}
+  rpc IssueSnapshot (IssueSnapshotRequest) returns (IssueSnapshotResponse) {}
+  rpc PresubmitIssue (PresubmitIssueRequest) returns (PresubmitIssueResponse) {}
+  rpc RerankBlockedOnIssues (RerankBlockedOnIssuesRequest) returns (RerankBlockedOnIssuesResponse) {}
+  rpc DeleteIssue (DeleteIssueRequest) returns (DeleteIssueResponse) {}
+  rpc DeleteIssueComment (DeleteIssueCommentRequest) returns (DeleteIssueCommentResponse) {}
+  rpc DeleteAttachment (DeleteAttachmentRequest) returns (DeleteAttachmentResponse) {}
+  rpc FlagIssues (FlagIssuesRequest) returns (FlagIssuesResponse) {}
+  rpc FlagComment (FlagCommentRequest) returns (FlagCommentResponse) {}
+  rpc ListIssuePermissions (ListIssuePermissionsRequest) returns (ListIssuePermissionsResponse) {}
+  rpc MoveIssue (MoveIssueRequest) returns (MoveIssueResponse) {}
+  rpc CopyIssue (CopyIssueRequest) returns (CopyIssueResponse) {}
+}
+
+
+// Next available tag: 4
+message CreateIssueRequest {
+  string project_name = 2;
+  Issue issue = 3;
+}
+
+
+// Next available tag: 3
+message GetIssueRequest {
+  IssueRef issue_ref = 2;
+}
+
+
+// Next available tag: 3
+message IssueResponse {
+  Issue issue = 1;
+  IssueRef moved_to_ref = 2;
+}
+
+
+// Next available tag: 8
+message ListIssuesRequest {
+  string query = 2;
+  uint32 canned_query = 3;
+  repeated string project_names = 4;
+  Pagination pagination = 5;
+  string group_by_spec = 6;
+  string sort_spec = 7;
+}
+
+
+// Next available tag: 3
+message ListIssuesResponse {
+  repeated Issue issues = 1;
+  uint32 total_results = 2;
+}
+
+
+// Next available tag: 3
+message ListReferencedIssuesRequest {
+  repeated IssueRef issue_refs = 2;
+}
+
+
+// Next available tag: 2
+message ListReferencedIssuesResponse {
+  // TODO(ehmaldonado): monorail:4033 Rename these fields to issues rather than
+  // refs.
+  repeated Issue open_refs = 1;
+  repeated Issue closed_refs = 2;
+}
+
+
+// Next available tag: 3
+message ListApplicableFieldDefsRequest {
+  repeated IssueRef issue_refs = 2;
+}
+
+
+// Next available tag: 2
+message ListApplicableFieldDefsResponse {
+  repeated FieldDef field_defs = 1;
+}
+
+
+// Next available tag: 9
+message UpdateIssueRequest {
+  IssueRef issue_ref = 2;
+  bool send_email = 3;
+  IssueDelta delta = 4;
+  string comment_content = 5;
+  bool is_description = 6;
+  repeated AttachmentUpload uploads = 7;
+  repeated int64 kept_attachments = 8;
+}
+
+
+// Next available tag: 4
+message StarIssueRequest {
+  IssueRef issue_ref = 2;
+  bool starred = 3;  // True to add a star, False to remove one.
+}
+
+
+// Next available tag: 2
+message StarIssueResponse {
+  uint32 star_count = 1;
+}
+
+
+// Next available tag: 3
+message IsIssueStarredRequest {
+  IssueRef issue_ref = 2;
+}
+
+
+// Next available tag: 2
+message IsIssueStarredResponse {
+  bool is_starred = 1;
+}
+
+
+// Next available tag: 1
+message ListStarredIssuesRequest {
+}
+
+
+// Next available tag: 2
+message ListStarredIssuesResponse {
+  repeated IssueRef starred_issue_refs = 1;
+}
+
+
+// Next available tag: 3
+message ListCommentsRequest {
+  IssueRef issue_ref = 2;
+}
+
+
+// Next available tag: 2
+message ListCommentsResponse {
+  // Comments are in chronological order.  The list of comments may
+  // include deleted, spam, and description comments.  Spam and
+  // deleted comments will only have content supplied if the user is
+  // allowed to see it.
+  repeated Comment comments = 1;
+}
+
+
+// Next available tag: 5
+message ListActivitiesRequest {
+  // TODO(tyreej) description
+  UserRef user_ref = 2;
+  fixed32 before = 3;
+  fixed32 after = 4;
+}
+
+
+// Next available tag: 3
+message ListActivitiesResponse {
+  // TODO(tyreej) description
+  repeated Comment comments = 1;
+  repeated IssueSummary issue_summaries = 2;
+}
+
+
+// Next available tag: 5
+message DeleteCommentRequest {
+  IssueRef issue_ref = 2;
+  int64 sequence_num = 3;
+  bool delete = 4;  // True to delete, False to undelete.
+}
+
+
+// TODO: Consider eventually replacing calls to UpdateApprovalRequest
+// with BulkUpdateApprovalsRequest.
+// TODO: For now, block bulk attaching uploads and survey editing.
+// Next available tag: 7
+message BulkUpdateApprovalsRequest {
+  repeated IssueRef issue_refs = 2;
+  FieldRef field_ref = 3;
+  ApprovalDelta approval_delta = 4;
+  string comment_content = 5;
+  bool send_email = 6;
+}
+
+
+// Next available tag: 2
+message BulkUpdateApprovalsResponse {
+  repeated IssueRef issue_refs = 1;
+}
+
+
+// Next available tag: 10
+message UpdateApprovalRequest {
+  IssueRef issue_ref = 2;
+  FieldRef field_ref = 3;
+  ApprovalDelta approval_delta = 4;
+  string comment_content = 5;
+  bool send_email = 6;
+  bool is_description = 7;
+  repeated AttachmentUpload uploads = 8;
+  repeated int64 kept_attachments = 9;
+}
+
+
+// Next available tag: 2
+message UpdateApprovalResponse {
+  Approval approval = 1;
+  // TODO(jojwang): monorail:3895, add new_comment field.
+}
+
+
+// Next available tag: 6
+message ConvertIssueApprovalsTemplateRequest {
+  IssueRef issue_ref = 2;
+  string template_name = 3;
+  string comment_content = 4;
+  bool send_email = 5;
+}
+
+
+// Next available tag: 2
+message ConvertIssueApprovalsTemplateResponse {
+  Issue issue = 1;
+}
+
+
+// Next available tag: 9
+message IssueSnapshotRequest {
+  int32 timestamp = 2;
+  string query = 3;
+  int32 canned_query = 4;
+  string group_by = 5;
+  string label_prefix = 6;
+  string project_name = 7;
+  int32 hotlist_id = 8;
+}
+
+
+// Next available tag: 3
+message IssueSnapshotCount {
+  string dimension = 1;
+  int32 count = 2;
+}
+
+
+// Next available tag: 3
+message IssueSnapshotResponse {
+  repeated IssueSnapshotCount snapshot_count = 1;
+  repeated string unsupported_field = 2;
+  bool search_limit_reached = 3;
+}
+
+
+// Next available tag: 4
+message PresubmitIssueRequest {
+  IssueRef issue_ref = 2;
+  IssueDelta issue_delta = 3;
+}
+
+
+// Next available tag: 8
+message PresubmitIssueResponse {
+  string owner_availability = 1;
+  string owner_availability_state = 2;
+  repeated ValueAndWhy derived_labels = 3;
+  repeated ValueAndWhy derived_owners = 4;
+  repeated ValueAndWhy derived_ccs = 5;
+  repeated ValueAndWhy warnings = 6;
+  repeated ValueAndWhy errors = 7;
+}
+
+
+// Next available tag: 6
+message RerankBlockedOnIssuesRequest {
+  IssueRef issue_ref = 2;
+  IssueRef moved_ref = 3;
+  IssueRef target_ref = 4;
+  bool split_above = 5;
+}
+
+
+// Next available tag: 2
+message RerankBlockedOnIssuesResponse {
+  repeated IssueRef blocked_on_issue_refs = 1;
+}
+
+
+// Next available tag: 4
+message DeleteIssueRequest {
+  IssueRef issue_ref = 2;
+  bool delete = 3;
+}
+
+
+// Next available tag: 1
+message DeleteIssueResponse {
+}
+
+
+// Next available tag: 5
+message DeleteIssueCommentRequest {
+  IssueRef issue_ref = 2;
+  uint32 sequence_num = 3;
+  bool delete = 4;
+}
+
+
+// Next available tag: 1
+message DeleteIssueCommentResponse {
+}
+
+
+// Next available tag: 6
+message DeleteAttachmentRequest {
+  IssueRef issue_ref = 2;
+  uint32 sequence_num = 3;
+  uint32 attachment_id = 4;
+  bool delete = 5;
+}
+
+
+// Next available tag: 1
+message DeleteAttachmentResponse {
+}
+
+
+// Next available tag: 4
+message FlagIssuesRequest {
+  repeated IssueRef issue_refs = 2;
+  bool flag = 3;
+}
+
+
+// Next available tag: 1
+message FlagIssuesResponse {
+}
+
+
+// Next available tag: 5
+message FlagCommentRequest {
+  IssueRef issue_ref = 2;
+  uint32 sequence_num = 3;
+  bool flag = 4;
+}
+
+
+// Next available tag: 1
+message FlagCommentResponse {
+}
+
+
+// Next available tag: 3
+message ListIssuePermissionsRequest {
+  IssueRef issue_ref = 2;
+}
+
+
+// Next available tag: 2
+message ListIssuePermissionsResponse {
+  repeated string permissions = 1;
+}
+
+
+// Next available tag: 4
+message MoveIssueRequest {
+  IssueRef issue_ref = 2;
+  string target_project_name = 3;
+}
+
+
+// Next available tag: 2
+message MoveIssueResponse {
+  IssueRef new_issue_ref = 1;
+}
+
+
+// Next available tag: 4
+message CopyIssueRequest {
+  IssueRef issue_ref = 2;
+  string target_project_name = 3;
+}
+
+
+// Next available tag: 2
+message CopyIssueResponse {
+  IssueRef new_issue_ref = 1;
+}
diff --git a/api/api_proto/issues_pb2.py b/api/api_proto/issues_pb2.py
new file mode 100644
index 0000000..470fa21
--- /dev/null
+++ b/api/api_proto/issues_pb2.py
@@ -0,0 +1,2703 @@
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/api_proto/issues.proto
+
+import sys
+_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
+from api.api_proto import common_pb2 as api_dot_api__proto_dot_common__pb2
+from api.api_proto import issue_objects_pb2 as api_dot_api__proto_dot_issue__objects__pb2
+from api.api_proto import project_objects_pb2 as api_dot_api__proto_dot_project__objects__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/api_proto/issues.proto',
+  package='monorail',
+  syntax='proto3',
+  serialized_options=None,
+  serialized_pb=_b('\n\x1a\x61pi/api_proto/issues.proto\x12\x08monorail\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1a\x61pi/api_proto/common.proto\x1a!api/api_proto/issue_objects.proto\x1a#api/api_proto/project_objects.proto\"J\n\x12\x43reateIssueRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\x12\x1e\n\x05issue\x18\x03 \x01(\x0b\x32\x0f.monorail.Issue\"8\n\x0fGetIssueRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\"Y\n\rIssueResponse\x12\x1e\n\x05issue\x18\x01 \x01(\x0b\x32\x0f.monorail.Issue\x12(\n\x0cmoved_to_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\"\xa3\x01\n\x11ListIssuesRequest\x12\r\n\x05query\x18\x02 \x01(\t\x12\x14\n\x0c\x63\x61nned_query\x18\x03 \x01(\r\x12\x15\n\rproject_names\x18\x04 \x03(\t\x12(\n\npagination\x18\x05 \x01(\x0b\x32\x14.monorail.Pagination\x12\x15\n\rgroup_by_spec\x18\x06 \x01(\t\x12\x11\n\tsort_spec\x18\x07 \x01(\t\"L\n\x12ListIssuesResponse\x12\x1f\n\x06issues\x18\x01 \x03(\x0b\x32\x0f.monorail.Issue\x12\x15\n\rtotal_results\x18\x02 \x01(\r\"E\n\x1bListReferencedIssuesRequest\x12&\n\nissue_refs\x18\x02 \x03(\x0b\x32\x12.monorail.IssueRef\"h\n\x1cListReferencedIssuesResponse\x12\"\n\topen_refs\x18\x01 \x03(\x0b\x32\x0f.monorail.Issue\x12$\n\x0b\x63losed_refs\x18\x02 \x03(\x0b\x32\x0f.monorail.Issue\"H\n\x1eListApplicableFieldDefsRequest\x12&\n\nissue_refs\x18\x02 \x03(\x0b\x32\x12.monorail.IssueRef\"I\n\x1fListApplicableFieldDefsResponse\x12&\n\nfield_defs\x18\x01 \x03(\x0b\x32\x12.monorail.FieldDef\"\xec\x01\n\x12UpdateIssueRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\x12\x12\n\nsend_email\x18\x03 \x01(\x08\x12#\n\x05\x64\x65lta\x18\x04 \x01(\x0b\x32\x14.monorail.IssueDelta\x12\x17\n\x0f\x63omment_content\x18\x05 \x01(\t\x12\x16\n\x0eis_description\x18\x06 \x01(\x08\x12+\n\x07uploads\x18\x07 \x03(\x0b\x32\x1a.monorail.AttachmentUpload\x12\x18\n\x10kept_attachments\x18\x08 \x03(\x03\"J\n\x10StarIssueRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\x12\x0f\n\x07starred\x18\x03 \x01(\x08\"\'\n\x11StarIssueResponse\x12\x12\n\nstar_count\x18\x01 \x01(\r\">\n\x15IsIssueStarredRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\",\n\x16IsIssueStarredResponse\x12\x12\n\nis_starred\x18\x01 \x01(\x08\"\x1a\n\x18ListStarredIssuesRequest\"K\n\x19ListStarredIssuesResponse\x12.\n\x12starred_issue_refs\x18\x01 \x03(\x0b\x32\x12.monorail.IssueRef\"<\n\x13ListCommentsRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\";\n\x14ListCommentsResponse\x12#\n\x08\x63omments\x18\x01 \x03(\x0b\x32\x11.monorail.Comment\"[\n\x15ListActivitiesRequest\x12#\n\x08user_ref\x18\x02 \x01(\x0b\x32\x11.monorail.UserRef\x12\x0e\n\x06\x62\x65\x66ore\x18\x03 \x01(\x07\x12\r\n\x05\x61\x66ter\x18\x04 \x01(\x07\"n\n\x16ListActivitiesResponse\x12#\n\x08\x63omments\x18\x01 \x03(\x0b\x32\x11.monorail.Comment\x12/\n\x0fissue_summaries\x18\x02 \x03(\x0b\x32\x16.monorail.IssueSummary\"c\n\x14\x44\x65leteCommentRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\x12\x14\n\x0csequence_num\x18\x03 \x01(\x03\x12\x0e\n\x06\x64\x65lete\x18\x04 \x01(\x08\"\xc9\x01\n\x1a\x42ulkUpdateApprovalsRequest\x12&\n\nissue_refs\x18\x02 \x03(\x0b\x32\x12.monorail.IssueRef\x12%\n\tfield_ref\x18\x03 \x01(\x0b\x32\x12.monorail.FieldRef\x12/\n\x0e\x61pproval_delta\x18\x04 \x01(\x0b\x32\x17.monorail.ApprovalDelta\x12\x17\n\x0f\x63omment_content\x18\x05 \x01(\t\x12\x12\n\nsend_email\x18\x06 \x01(\x08\"E\n\x1b\x42ulkUpdateApprovalsResponse\x12&\n\nissue_refs\x18\x01 \x03(\x0b\x32\x12.monorail.IssueRef\"\xa2\x02\n\x15UpdateApprovalRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\x12%\n\tfield_ref\x18\x03 \x01(\x0b\x32\x12.monorail.FieldRef\x12/\n\x0e\x61pproval_delta\x18\x04 \x01(\x0b\x32\x17.monorail.ApprovalDelta\x12\x17\n\x0f\x63omment_content\x18\x05 \x01(\t\x12\x12\n\nsend_email\x18\x06 \x01(\x08\x12\x16\n\x0eis_description\x18\x07 \x01(\x08\x12+\n\x07uploads\x18\x08 \x03(\x0b\x32\x1a.monorail.AttachmentUpload\x12\x18\n\x10kept_attachments\x18\t \x03(\x03\">\n\x16UpdateApprovalResponse\x12$\n\x08\x61pproval\x18\x01 \x01(\x0b\x32\x12.monorail.Approval\"\x91\x01\n$ConvertIssueApprovalsTemplateRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\x12\x15\n\rtemplate_name\x18\x03 \x01(\t\x12\x17\n\x0f\x63omment_content\x18\x04 \x01(\t\x12\x12\n\nsend_email\x18\x05 \x01(\x08\"G\n%ConvertIssueApprovalsTemplateResponse\x12\x1e\n\x05issue\x18\x01 \x01(\x0b\x32\x0f.monorail.Issue\"\xa0\x01\n\x14IssueSnapshotRequest\x12\x11\n\ttimestamp\x18\x02 \x01(\x05\x12\r\n\x05query\x18\x03 \x01(\t\x12\x14\n\x0c\x63\x61nned_query\x18\x04 \x01(\x05\x12\x10\n\x08group_by\x18\x05 \x01(\t\x12\x14\n\x0clabel_prefix\x18\x06 \x01(\t\x12\x14\n\x0cproject_name\x18\x07 \x01(\t\x12\x12\n\nhotlist_id\x18\x08 \x01(\x05\"6\n\x12IssueSnapshotCount\x12\x11\n\tdimension\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x05\"\x86\x01\n\x15IssueSnapshotResponse\x12\x34\n\x0esnapshot_count\x18\x01 \x03(\x0b\x32\x1c.monorail.IssueSnapshotCount\x12\x19\n\x11unsupported_field\x18\x02 \x03(\t\x12\x1c\n\x14search_limit_reached\x18\x03 \x01(\x08\"i\n\x15PresubmitIssueRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\x12)\n\x0bissue_delta\x18\x03 \x01(\x0b\x32\x14.monorail.IssueDelta\"\xb0\x02\n\x16PresubmitIssueResponse\x12\x1a\n\x12owner_availability\x18\x01 \x01(\t\x12 \n\x18owner_availability_state\x18\x02 \x01(\t\x12-\n\x0e\x64\x65rived_labels\x18\x03 \x03(\x0b\x32\x15.monorail.ValueAndWhy\x12-\n\x0e\x64\x65rived_owners\x18\x04 \x03(\x0b\x32\x15.monorail.ValueAndWhy\x12*\n\x0b\x64\x65rived_ccs\x18\x05 \x03(\x0b\x32\x15.monorail.ValueAndWhy\x12\'\n\x08warnings\x18\x06 \x03(\x0b\x32\x15.monorail.ValueAndWhy\x12%\n\x06\x65rrors\x18\x07 \x03(\x0b\x32\x15.monorail.ValueAndWhy\"\xa9\x01\n\x1cRerankBlockedOnIssuesRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\x12%\n\tmoved_ref\x18\x03 \x01(\x0b\x32\x12.monorail.IssueRef\x12&\n\ntarget_ref\x18\x04 \x01(\x0b\x32\x12.monorail.IssueRef\x12\x13\n\x0bsplit_above\x18\x05 \x01(\x08\"R\n\x1dRerankBlockedOnIssuesResponse\x12\x31\n\x15\x62locked_on_issue_refs\x18\x01 \x03(\x0b\x32\x12.monorail.IssueRef\"K\n\x12\x44\x65leteIssueRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\x12\x0e\n\x06\x64\x65lete\x18\x03 \x01(\x08\"\x15\n\x13\x44\x65leteIssueResponse\"h\n\x19\x44\x65leteIssueCommentRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\x12\x14\n\x0csequence_num\x18\x03 \x01(\r\x12\x0e\n\x06\x64\x65lete\x18\x04 \x01(\x08\"\x1c\n\x1a\x44\x65leteIssueCommentResponse\"}\n\x17\x44\x65leteAttachmentRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\x12\x14\n\x0csequence_num\x18\x03 \x01(\r\x12\x15\n\rattachment_id\x18\x04 \x01(\r\x12\x0e\n\x06\x64\x65lete\x18\x05 \x01(\x08\"\x1a\n\x18\x44\x65leteAttachmentResponse\"I\n\x11\x46lagIssuesRequest\x12&\n\nissue_refs\x18\x02 \x03(\x0b\x32\x12.monorail.IssueRef\x12\x0c\n\x04\x66lag\x18\x03 \x01(\x08\"\x14\n\x12\x46lagIssuesResponse\"_\n\x12\x46lagCommentRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\x12\x14\n\x0csequence_num\x18\x03 \x01(\r\x12\x0c\n\x04\x66lag\x18\x04 \x01(\x08\"\x15\n\x13\x46lagCommentResponse\"D\n\x1bListIssuePermissionsRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\"3\n\x1cListIssuePermissionsResponse\x12\x13\n\x0bpermissions\x18\x01 \x03(\t\"V\n\x10MoveIssueRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\x12\x1b\n\x13target_project_name\x18\x03 \x01(\t\">\n\x11MoveIssueResponse\x12)\n\rnew_issue_ref\x18\x01 \x01(\x0b\x32\x12.monorail.IssueRef\"V\n\x10\x43opyIssueRequest\x12%\n\tissue_ref\x18\x02 \x01(\x0b\x32\x12.monorail.IssueRef\x12\x1b\n\x13target_project_name\x18\x03 \x01(\t\">\n\x11\x43opyIssueResponse\x12)\n\rnew_issue_ref\x18\x01 \x01(\x0b\x32\x12.monorail.IssueRef2\xeb\x11\n\x06Issues\x12\x46\n\x0b\x43reateIssue\x12\x1c.monorail.CreateIssueRequest\x1a\x17.monorail.IssueResponse\"\x00\x12@\n\x08GetIssue\x12\x19.monorail.GetIssueRequest\x1a\x17.monorail.IssueResponse\"\x00\x12I\n\nListIssues\x12\x1b.monorail.ListIssuesRequest\x1a\x1c.monorail.ListIssuesResponse\"\x00\x12g\n\x14ListReferencedIssues\x12%.monorail.ListReferencedIssuesRequest\x1a&.monorail.ListReferencedIssuesResponse\"\x00\x12p\n\x17ListApplicableFieldDefs\x12(.monorail.ListApplicableFieldDefsRequest\x1a).monorail.ListApplicableFieldDefsResponse\"\x00\x12\x46\n\x0bUpdateIssue\x12\x1c.monorail.UpdateIssueRequest\x1a\x17.monorail.IssueResponse\"\x00\x12\x46\n\tStarIssue\x12\x1a.monorail.StarIssueRequest\x1a\x1b.monorail.StarIssueResponse\"\x00\x12U\n\x0eIsIssueStarred\x12\x1f.monorail.IsIssueStarredRequest\x1a .monorail.IsIssueStarredResponse\"\x00\x12^\n\x11ListStarredIssues\x12\".monorail.ListStarredIssuesRequest\x1a#.monorail.ListStarredIssuesResponse\"\x00\x12O\n\x0cListComments\x12\x1d.monorail.ListCommentsRequest\x1a\x1e.monorail.ListCommentsResponse\"\x00\x12U\n\x0eListActivities\x12\x1f.monorail.ListActivitiesRequest\x1a .monorail.ListActivitiesResponse\"\x00\x12I\n\rDeleteComment\x12\x1e.monorail.DeleteCommentRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x64\n\x13\x42ulkUpdateApprovals\x12$.monorail.BulkUpdateApprovalsRequest\x1a%.monorail.BulkUpdateApprovalsResponse\"\x00\x12U\n\x0eUpdateApproval\x12\x1f.monorail.UpdateApprovalRequest\x1a .monorail.UpdateApprovalResponse\"\x00\x12\x82\x01\n\x1d\x43onvertIssueApprovalsTemplate\x12..monorail.ConvertIssueApprovalsTemplateRequest\x1a/.monorail.ConvertIssueApprovalsTemplateResponse\"\x00\x12R\n\rIssueSnapshot\x12\x1e.monorail.IssueSnapshotRequest\x1a\x1f.monorail.IssueSnapshotResponse\"\x00\x12U\n\x0ePresubmitIssue\x12\x1f.monorail.PresubmitIssueRequest\x1a .monorail.PresubmitIssueResponse\"\x00\x12j\n\x15RerankBlockedOnIssues\x12&.monorail.RerankBlockedOnIssuesRequest\x1a\'.monorail.RerankBlockedOnIssuesResponse\"\x00\x12L\n\x0b\x44\x65leteIssue\x12\x1c.monorail.DeleteIssueRequest\x1a\x1d.monorail.DeleteIssueResponse\"\x00\x12\x61\n\x12\x44\x65leteIssueComment\x12#.monorail.DeleteIssueCommentRequest\x1a$.monorail.DeleteIssueCommentResponse\"\x00\x12[\n\x10\x44\x65leteAttachment\x12!.monorail.DeleteAttachmentRequest\x1a\".monorail.DeleteAttachmentResponse\"\x00\x12I\n\nFlagIssues\x12\x1b.monorail.FlagIssuesRequest\x1a\x1c.monorail.FlagIssuesResponse\"\x00\x12L\n\x0b\x46lagComment\x12\x1c.monorail.FlagCommentRequest\x1a\x1d.monorail.FlagCommentResponse\"\x00\x12g\n\x14ListIssuePermissions\x12%.monorail.ListIssuePermissionsRequest\x1a&.monorail.ListIssuePermissionsResponse\"\x00\x12\x46\n\tMoveIssue\x12\x1a.monorail.MoveIssueRequest\x1a\x1b.monorail.MoveIssueResponse\"\x00\x12\x46\n\tCopyIssue\x12\x1a.monorail.CopyIssueRequest\x1a\x1b.monorail.CopyIssueResponse\"\x00\x62\x06proto3')
+  ,
+  dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,api_dot_api__proto_dot_common__pb2.DESCRIPTOR,api_dot_api__proto_dot_issue__objects__pb2.DESCRIPTOR,api_dot_api__proto_dot_project__objects__pb2.DESCRIPTOR,])
+
+
+
+
+_CREATEISSUEREQUEST = _descriptor.Descriptor(
+  name='CreateIssueRequest',
+  full_name='monorail.CreateIssueRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.CreateIssueRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='issue', full_name='monorail.CreateIssueRequest.issue', index=1,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=169,
+  serialized_end=243,
+)
+
+
+_GETISSUEREQUEST = _descriptor.Descriptor(
+  name='GetIssueRequest',
+  full_name='monorail.GetIssueRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.GetIssueRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=245,
+  serialized_end=301,
+)
+
+
+_ISSUERESPONSE = _descriptor.Descriptor(
+  name='IssueResponse',
+  full_name='monorail.IssueResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue', full_name='monorail.IssueResponse.issue', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='moved_to_ref', full_name='monorail.IssueResponse.moved_to_ref', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=303,
+  serialized_end=392,
+)
+
+
+_LISTISSUESREQUEST = _descriptor.Descriptor(
+  name='ListIssuesRequest',
+  full_name='monorail.ListIssuesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='query', full_name='monorail.ListIssuesRequest.query', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='canned_query', full_name='monorail.ListIssuesRequest.canned_query', index=1,
+      number=3, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='project_names', full_name='monorail.ListIssuesRequest.project_names', index=2,
+      number=4, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='pagination', full_name='monorail.ListIssuesRequest.pagination', index=3,
+      number=5, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='group_by_spec', full_name='monorail.ListIssuesRequest.group_by_spec', index=4,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='sort_spec', full_name='monorail.ListIssuesRequest.sort_spec', index=5,
+      number=7, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=395,
+  serialized_end=558,
+)
+
+
+_LISTISSUESRESPONSE = _descriptor.Descriptor(
+  name='ListIssuesResponse',
+  full_name='monorail.ListIssuesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issues', full_name='monorail.ListIssuesResponse.issues', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='total_results', full_name='monorail.ListIssuesResponse.total_results', index=1,
+      number=2, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=560,
+  serialized_end=636,
+)
+
+
+_LISTREFERENCEDISSUESREQUEST = _descriptor.Descriptor(
+  name='ListReferencedIssuesRequest',
+  full_name='monorail.ListReferencedIssuesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_refs', full_name='monorail.ListReferencedIssuesRequest.issue_refs', index=0,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=638,
+  serialized_end=707,
+)
+
+
+_LISTREFERENCEDISSUESRESPONSE = _descriptor.Descriptor(
+  name='ListReferencedIssuesResponse',
+  full_name='monorail.ListReferencedIssuesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='open_refs', full_name='monorail.ListReferencedIssuesResponse.open_refs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='closed_refs', full_name='monorail.ListReferencedIssuesResponse.closed_refs', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=709,
+  serialized_end=813,
+)
+
+
+_LISTAPPLICABLEFIELDDEFSREQUEST = _descriptor.Descriptor(
+  name='ListApplicableFieldDefsRequest',
+  full_name='monorail.ListApplicableFieldDefsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_refs', full_name='monorail.ListApplicableFieldDefsRequest.issue_refs', index=0,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=815,
+  serialized_end=887,
+)
+
+
+_LISTAPPLICABLEFIELDDEFSRESPONSE = _descriptor.Descriptor(
+  name='ListApplicableFieldDefsResponse',
+  full_name='monorail.ListApplicableFieldDefsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='field_defs', full_name='monorail.ListApplicableFieldDefsResponse.field_defs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=889,
+  serialized_end=962,
+)
+
+
+_UPDATEISSUEREQUEST = _descriptor.Descriptor(
+  name='UpdateIssueRequest',
+  full_name='monorail.UpdateIssueRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.UpdateIssueRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='send_email', full_name='monorail.UpdateIssueRequest.send_email', index=1,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='delta', full_name='monorail.UpdateIssueRequest.delta', index=2,
+      number=4, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='comment_content', full_name='monorail.UpdateIssueRequest.comment_content', index=3,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_description', full_name='monorail.UpdateIssueRequest.is_description', index=4,
+      number=6, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='uploads', full_name='monorail.UpdateIssueRequest.uploads', index=5,
+      number=7, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='kept_attachments', full_name='monorail.UpdateIssueRequest.kept_attachments', index=6,
+      number=8, type=3, cpp_type=2, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=965,
+  serialized_end=1201,
+)
+
+
+_STARISSUEREQUEST = _descriptor.Descriptor(
+  name='StarIssueRequest',
+  full_name='monorail.StarIssueRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.StarIssueRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='starred', full_name='monorail.StarIssueRequest.starred', index=1,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1203,
+  serialized_end=1277,
+)
+
+
+_STARISSUERESPONSE = _descriptor.Descriptor(
+  name='StarIssueResponse',
+  full_name='monorail.StarIssueResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='star_count', full_name='monorail.StarIssueResponse.star_count', index=0,
+      number=1, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1279,
+  serialized_end=1318,
+)
+
+
+_ISISSUESTARREDREQUEST = _descriptor.Descriptor(
+  name='IsIssueStarredRequest',
+  full_name='monorail.IsIssueStarredRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.IsIssueStarredRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1320,
+  serialized_end=1382,
+)
+
+
+_ISISSUESTARREDRESPONSE = _descriptor.Descriptor(
+  name='IsIssueStarredResponse',
+  full_name='monorail.IsIssueStarredResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='is_starred', full_name='monorail.IsIssueStarredResponse.is_starred', index=0,
+      number=1, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1384,
+  serialized_end=1428,
+)
+
+
+_LISTSTARREDISSUESREQUEST = _descriptor.Descriptor(
+  name='ListStarredIssuesRequest',
+  full_name='monorail.ListStarredIssuesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1430,
+  serialized_end=1456,
+)
+
+
+_LISTSTARREDISSUESRESPONSE = _descriptor.Descriptor(
+  name='ListStarredIssuesResponse',
+  full_name='monorail.ListStarredIssuesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='starred_issue_refs', full_name='monorail.ListStarredIssuesResponse.starred_issue_refs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1458,
+  serialized_end=1533,
+)
+
+
+_LISTCOMMENTSREQUEST = _descriptor.Descriptor(
+  name='ListCommentsRequest',
+  full_name='monorail.ListCommentsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.ListCommentsRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1535,
+  serialized_end=1595,
+)
+
+
+_LISTCOMMENTSRESPONSE = _descriptor.Descriptor(
+  name='ListCommentsResponse',
+  full_name='monorail.ListCommentsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='comments', full_name='monorail.ListCommentsResponse.comments', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1597,
+  serialized_end=1656,
+)
+
+
+_LISTACTIVITIESREQUEST = _descriptor.Descriptor(
+  name='ListActivitiesRequest',
+  full_name='monorail.ListActivitiesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user_ref', full_name='monorail.ListActivitiesRequest.user_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='before', full_name='monorail.ListActivitiesRequest.before', index=1,
+      number=3, type=7, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='after', full_name='monorail.ListActivitiesRequest.after', index=2,
+      number=4, type=7, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1658,
+  serialized_end=1749,
+)
+
+
+_LISTACTIVITIESRESPONSE = _descriptor.Descriptor(
+  name='ListActivitiesResponse',
+  full_name='monorail.ListActivitiesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='comments', full_name='monorail.ListActivitiesResponse.comments', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='issue_summaries', full_name='monorail.ListActivitiesResponse.issue_summaries', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1751,
+  serialized_end=1861,
+)
+
+
+_DELETECOMMENTREQUEST = _descriptor.Descriptor(
+  name='DeleteCommentRequest',
+  full_name='monorail.DeleteCommentRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.DeleteCommentRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='sequence_num', full_name='monorail.DeleteCommentRequest.sequence_num', index=1,
+      number=3, type=3, cpp_type=2, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='delete', full_name='monorail.DeleteCommentRequest.delete', index=2,
+      number=4, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1863,
+  serialized_end=1962,
+)
+
+
+_BULKUPDATEAPPROVALSREQUEST = _descriptor.Descriptor(
+  name='BulkUpdateApprovalsRequest',
+  full_name='monorail.BulkUpdateApprovalsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_refs', full_name='monorail.BulkUpdateApprovalsRequest.issue_refs', index=0,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='field_ref', full_name='monorail.BulkUpdateApprovalsRequest.field_ref', index=1,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='approval_delta', full_name='monorail.BulkUpdateApprovalsRequest.approval_delta', index=2,
+      number=4, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='comment_content', full_name='monorail.BulkUpdateApprovalsRequest.comment_content', index=3,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='send_email', full_name='monorail.BulkUpdateApprovalsRequest.send_email', index=4,
+      number=6, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1965,
+  serialized_end=2166,
+)
+
+
+_BULKUPDATEAPPROVALSRESPONSE = _descriptor.Descriptor(
+  name='BulkUpdateApprovalsResponse',
+  full_name='monorail.BulkUpdateApprovalsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_refs', full_name='monorail.BulkUpdateApprovalsResponse.issue_refs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2168,
+  serialized_end=2237,
+)
+
+
+_UPDATEAPPROVALREQUEST = _descriptor.Descriptor(
+  name='UpdateApprovalRequest',
+  full_name='monorail.UpdateApprovalRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.UpdateApprovalRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='field_ref', full_name='monorail.UpdateApprovalRequest.field_ref', index=1,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='approval_delta', full_name='monorail.UpdateApprovalRequest.approval_delta', index=2,
+      number=4, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='comment_content', full_name='monorail.UpdateApprovalRequest.comment_content', index=3,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='send_email', full_name='monorail.UpdateApprovalRequest.send_email', index=4,
+      number=6, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_description', full_name='monorail.UpdateApprovalRequest.is_description', index=5,
+      number=7, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='uploads', full_name='monorail.UpdateApprovalRequest.uploads', index=6,
+      number=8, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='kept_attachments', full_name='monorail.UpdateApprovalRequest.kept_attachments', index=7,
+      number=9, type=3, cpp_type=2, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2240,
+  serialized_end=2530,
+)
+
+
+_UPDATEAPPROVALRESPONSE = _descriptor.Descriptor(
+  name='UpdateApprovalResponse',
+  full_name='monorail.UpdateApprovalResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='approval', full_name='monorail.UpdateApprovalResponse.approval', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2532,
+  serialized_end=2594,
+)
+
+
+_CONVERTISSUEAPPROVALSTEMPLATEREQUEST = _descriptor.Descriptor(
+  name='ConvertIssueApprovalsTemplateRequest',
+  full_name='monorail.ConvertIssueApprovalsTemplateRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.ConvertIssueApprovalsTemplateRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='template_name', full_name='monorail.ConvertIssueApprovalsTemplateRequest.template_name', index=1,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='comment_content', full_name='monorail.ConvertIssueApprovalsTemplateRequest.comment_content', index=2,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='send_email', full_name='monorail.ConvertIssueApprovalsTemplateRequest.send_email', index=3,
+      number=5, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2597,
+  serialized_end=2742,
+)
+
+
+_CONVERTISSUEAPPROVALSTEMPLATERESPONSE = _descriptor.Descriptor(
+  name='ConvertIssueApprovalsTemplateResponse',
+  full_name='monorail.ConvertIssueApprovalsTemplateResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue', full_name='monorail.ConvertIssueApprovalsTemplateResponse.issue', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2744,
+  serialized_end=2815,
+)
+
+
+_ISSUESNAPSHOTREQUEST = _descriptor.Descriptor(
+  name='IssueSnapshotRequest',
+  full_name='monorail.IssueSnapshotRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='timestamp', full_name='monorail.IssueSnapshotRequest.timestamp', index=0,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='query', full_name='monorail.IssueSnapshotRequest.query', index=1,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='canned_query', full_name='monorail.IssueSnapshotRequest.canned_query', index=2,
+      number=4, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='group_by', full_name='monorail.IssueSnapshotRequest.group_by', index=3,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='label_prefix', full_name='monorail.IssueSnapshotRequest.label_prefix', index=4,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.IssueSnapshotRequest.project_name', index=5,
+      number=7, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='hotlist_id', full_name='monorail.IssueSnapshotRequest.hotlist_id', index=6,
+      number=8, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2818,
+  serialized_end=2978,
+)
+
+
+_ISSUESNAPSHOTCOUNT = _descriptor.Descriptor(
+  name='IssueSnapshotCount',
+  full_name='monorail.IssueSnapshotCount',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='dimension', full_name='monorail.IssueSnapshotCount.dimension', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='count', full_name='monorail.IssueSnapshotCount.count', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2980,
+  serialized_end=3034,
+)
+
+
+_ISSUESNAPSHOTRESPONSE = _descriptor.Descriptor(
+  name='IssueSnapshotResponse',
+  full_name='monorail.IssueSnapshotResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='snapshot_count', full_name='monorail.IssueSnapshotResponse.snapshot_count', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='unsupported_field', full_name='monorail.IssueSnapshotResponse.unsupported_field', index=1,
+      number=2, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='search_limit_reached', full_name='monorail.IssueSnapshotResponse.search_limit_reached', index=2,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3037,
+  serialized_end=3171,
+)
+
+
+_PRESUBMITISSUEREQUEST = _descriptor.Descriptor(
+  name='PresubmitIssueRequest',
+  full_name='monorail.PresubmitIssueRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.PresubmitIssueRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='issue_delta', full_name='monorail.PresubmitIssueRequest.issue_delta', index=1,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3173,
+  serialized_end=3278,
+)
+
+
+_PRESUBMITISSUERESPONSE = _descriptor.Descriptor(
+  name='PresubmitIssueResponse',
+  full_name='monorail.PresubmitIssueResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='owner_availability', full_name='monorail.PresubmitIssueResponse.owner_availability', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='owner_availability_state', full_name='monorail.PresubmitIssueResponse.owner_availability_state', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='derived_labels', full_name='monorail.PresubmitIssueResponse.derived_labels', index=2,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='derived_owners', full_name='monorail.PresubmitIssueResponse.derived_owners', index=3,
+      number=4, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='derived_ccs', full_name='monorail.PresubmitIssueResponse.derived_ccs', index=4,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='warnings', full_name='monorail.PresubmitIssueResponse.warnings', index=5,
+      number=6, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='errors', full_name='monorail.PresubmitIssueResponse.errors', index=6,
+      number=7, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3281,
+  serialized_end=3585,
+)
+
+
+_RERANKBLOCKEDONISSUESREQUEST = _descriptor.Descriptor(
+  name='RerankBlockedOnIssuesRequest',
+  full_name='monorail.RerankBlockedOnIssuesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.RerankBlockedOnIssuesRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='moved_ref', full_name='monorail.RerankBlockedOnIssuesRequest.moved_ref', index=1,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='target_ref', full_name='monorail.RerankBlockedOnIssuesRequest.target_ref', index=2,
+      number=4, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='split_above', full_name='monorail.RerankBlockedOnIssuesRequest.split_above', index=3,
+      number=5, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3588,
+  serialized_end=3757,
+)
+
+
+_RERANKBLOCKEDONISSUESRESPONSE = _descriptor.Descriptor(
+  name='RerankBlockedOnIssuesResponse',
+  full_name='monorail.RerankBlockedOnIssuesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='blocked_on_issue_refs', full_name='monorail.RerankBlockedOnIssuesResponse.blocked_on_issue_refs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3759,
+  serialized_end=3841,
+)
+
+
+_DELETEISSUEREQUEST = _descriptor.Descriptor(
+  name='DeleteIssueRequest',
+  full_name='monorail.DeleteIssueRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.DeleteIssueRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='delete', full_name='monorail.DeleteIssueRequest.delete', index=1,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3843,
+  serialized_end=3918,
+)
+
+
+_DELETEISSUERESPONSE = _descriptor.Descriptor(
+  name='DeleteIssueResponse',
+  full_name='monorail.DeleteIssueResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3920,
+  serialized_end=3941,
+)
+
+
+_DELETEISSUECOMMENTREQUEST = _descriptor.Descriptor(
+  name='DeleteIssueCommentRequest',
+  full_name='monorail.DeleteIssueCommentRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.DeleteIssueCommentRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='sequence_num', full_name='monorail.DeleteIssueCommentRequest.sequence_num', index=1,
+      number=3, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='delete', full_name='monorail.DeleteIssueCommentRequest.delete', index=2,
+      number=4, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3943,
+  serialized_end=4047,
+)
+
+
+_DELETEISSUECOMMENTRESPONSE = _descriptor.Descriptor(
+  name='DeleteIssueCommentResponse',
+  full_name='monorail.DeleteIssueCommentResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4049,
+  serialized_end=4077,
+)
+
+
+_DELETEATTACHMENTREQUEST = _descriptor.Descriptor(
+  name='DeleteAttachmentRequest',
+  full_name='monorail.DeleteAttachmentRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.DeleteAttachmentRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='sequence_num', full_name='monorail.DeleteAttachmentRequest.sequence_num', index=1,
+      number=3, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='attachment_id', full_name='monorail.DeleteAttachmentRequest.attachment_id', index=2,
+      number=4, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='delete', full_name='monorail.DeleteAttachmentRequest.delete', index=3,
+      number=5, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4079,
+  serialized_end=4204,
+)
+
+
+_DELETEATTACHMENTRESPONSE = _descriptor.Descriptor(
+  name='DeleteAttachmentResponse',
+  full_name='monorail.DeleteAttachmentResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4206,
+  serialized_end=4232,
+)
+
+
+_FLAGISSUESREQUEST = _descriptor.Descriptor(
+  name='FlagIssuesRequest',
+  full_name='monorail.FlagIssuesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_refs', full_name='monorail.FlagIssuesRequest.issue_refs', index=0,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='flag', full_name='monorail.FlagIssuesRequest.flag', index=1,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4234,
+  serialized_end=4307,
+)
+
+
+_FLAGISSUESRESPONSE = _descriptor.Descriptor(
+  name='FlagIssuesResponse',
+  full_name='monorail.FlagIssuesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4309,
+  serialized_end=4329,
+)
+
+
+_FLAGCOMMENTREQUEST = _descriptor.Descriptor(
+  name='FlagCommentRequest',
+  full_name='monorail.FlagCommentRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.FlagCommentRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='sequence_num', full_name='monorail.FlagCommentRequest.sequence_num', index=1,
+      number=3, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='flag', full_name='monorail.FlagCommentRequest.flag', index=2,
+      number=4, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4331,
+  serialized_end=4426,
+)
+
+
+_FLAGCOMMENTRESPONSE = _descriptor.Descriptor(
+  name='FlagCommentResponse',
+  full_name='monorail.FlagCommentResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4428,
+  serialized_end=4449,
+)
+
+
+_LISTISSUEPERMISSIONSREQUEST = _descriptor.Descriptor(
+  name='ListIssuePermissionsRequest',
+  full_name='monorail.ListIssuePermissionsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.ListIssuePermissionsRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4451,
+  serialized_end=4519,
+)
+
+
+_LISTISSUEPERMISSIONSRESPONSE = _descriptor.Descriptor(
+  name='ListIssuePermissionsResponse',
+  full_name='monorail.ListIssuePermissionsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='permissions', full_name='monorail.ListIssuePermissionsResponse.permissions', index=0,
+      number=1, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4521,
+  serialized_end=4572,
+)
+
+
+_MOVEISSUEREQUEST = _descriptor.Descriptor(
+  name='MoveIssueRequest',
+  full_name='monorail.MoveIssueRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.MoveIssueRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='target_project_name', full_name='monorail.MoveIssueRequest.target_project_name', index=1,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4574,
+  serialized_end=4660,
+)
+
+
+_MOVEISSUERESPONSE = _descriptor.Descriptor(
+  name='MoveIssueResponse',
+  full_name='monorail.MoveIssueResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='new_issue_ref', full_name='monorail.MoveIssueResponse.new_issue_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4662,
+  serialized_end=4724,
+)
+
+
+_COPYISSUEREQUEST = _descriptor.Descriptor(
+  name='CopyIssueRequest',
+  full_name='monorail.CopyIssueRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue_ref', full_name='monorail.CopyIssueRequest.issue_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='target_project_name', full_name='monorail.CopyIssueRequest.target_project_name', index=1,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4726,
+  serialized_end=4812,
+)
+
+
+_COPYISSUERESPONSE = _descriptor.Descriptor(
+  name='CopyIssueResponse',
+  full_name='monorail.CopyIssueResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='new_issue_ref', full_name='monorail.CopyIssueResponse.new_issue_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4814,
+  serialized_end=4876,
+)
+
+_CREATEISSUEREQUEST.fields_by_name['issue'].message_type = api_dot_api__proto_dot_issue__objects__pb2._ISSUE
+_GETISSUEREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_ISSUERESPONSE.fields_by_name['issue'].message_type = api_dot_api__proto_dot_issue__objects__pb2._ISSUE
+_ISSUERESPONSE.fields_by_name['moved_to_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_LISTISSUESREQUEST.fields_by_name['pagination'].message_type = api_dot_api__proto_dot_common__pb2._PAGINATION
+_LISTISSUESRESPONSE.fields_by_name['issues'].message_type = api_dot_api__proto_dot_issue__objects__pb2._ISSUE
+_LISTREFERENCEDISSUESREQUEST.fields_by_name['issue_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_LISTREFERENCEDISSUESRESPONSE.fields_by_name['open_refs'].message_type = api_dot_api__proto_dot_issue__objects__pb2._ISSUE
+_LISTREFERENCEDISSUESRESPONSE.fields_by_name['closed_refs'].message_type = api_dot_api__proto_dot_issue__objects__pb2._ISSUE
+_LISTAPPLICABLEFIELDDEFSREQUEST.fields_by_name['issue_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_LISTAPPLICABLEFIELDDEFSRESPONSE.fields_by_name['field_defs'].message_type = api_dot_api__proto_dot_project__objects__pb2._FIELDDEF
+_UPDATEISSUEREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_UPDATEISSUEREQUEST.fields_by_name['delta'].message_type = api_dot_api__proto_dot_issue__objects__pb2._ISSUEDELTA
+_UPDATEISSUEREQUEST.fields_by_name['uploads'].message_type = api_dot_api__proto_dot_issue__objects__pb2._ATTACHMENTUPLOAD
+_STARISSUEREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_ISISSUESTARREDREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_LISTSTARREDISSUESRESPONSE.fields_by_name['starred_issue_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_LISTCOMMENTSREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_LISTCOMMENTSRESPONSE.fields_by_name['comments'].message_type = api_dot_api__proto_dot_issue__objects__pb2._COMMENT
+_LISTACTIVITIESREQUEST.fields_by_name['user_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_LISTACTIVITIESRESPONSE.fields_by_name['comments'].message_type = api_dot_api__proto_dot_issue__objects__pb2._COMMENT
+_LISTACTIVITIESRESPONSE.fields_by_name['issue_summaries'].message_type = api_dot_api__proto_dot_issue__objects__pb2._ISSUESUMMARY
+_DELETECOMMENTREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_BULKUPDATEAPPROVALSREQUEST.fields_by_name['issue_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_BULKUPDATEAPPROVALSREQUEST.fields_by_name['field_ref'].message_type = api_dot_api__proto_dot_common__pb2._FIELDREF
+_BULKUPDATEAPPROVALSREQUEST.fields_by_name['approval_delta'].message_type = api_dot_api__proto_dot_issue__objects__pb2._APPROVALDELTA
+_BULKUPDATEAPPROVALSRESPONSE.fields_by_name['issue_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_UPDATEAPPROVALREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_UPDATEAPPROVALREQUEST.fields_by_name['field_ref'].message_type = api_dot_api__proto_dot_common__pb2._FIELDREF
+_UPDATEAPPROVALREQUEST.fields_by_name['approval_delta'].message_type = api_dot_api__proto_dot_issue__objects__pb2._APPROVALDELTA
+_UPDATEAPPROVALREQUEST.fields_by_name['uploads'].message_type = api_dot_api__proto_dot_issue__objects__pb2._ATTACHMENTUPLOAD
+_UPDATEAPPROVALRESPONSE.fields_by_name['approval'].message_type = api_dot_api__proto_dot_issue__objects__pb2._APPROVAL
+_CONVERTISSUEAPPROVALSTEMPLATEREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_CONVERTISSUEAPPROVALSTEMPLATERESPONSE.fields_by_name['issue'].message_type = api_dot_api__proto_dot_issue__objects__pb2._ISSUE
+_ISSUESNAPSHOTRESPONSE.fields_by_name['snapshot_count'].message_type = _ISSUESNAPSHOTCOUNT
+_PRESUBMITISSUEREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_PRESUBMITISSUEREQUEST.fields_by_name['issue_delta'].message_type = api_dot_api__proto_dot_issue__objects__pb2._ISSUEDELTA
+_PRESUBMITISSUERESPONSE.fields_by_name['derived_labels'].message_type = api_dot_api__proto_dot_common__pb2._VALUEANDWHY
+_PRESUBMITISSUERESPONSE.fields_by_name['derived_owners'].message_type = api_dot_api__proto_dot_common__pb2._VALUEANDWHY
+_PRESUBMITISSUERESPONSE.fields_by_name['derived_ccs'].message_type = api_dot_api__proto_dot_common__pb2._VALUEANDWHY
+_PRESUBMITISSUERESPONSE.fields_by_name['warnings'].message_type = api_dot_api__proto_dot_common__pb2._VALUEANDWHY
+_PRESUBMITISSUERESPONSE.fields_by_name['errors'].message_type = api_dot_api__proto_dot_common__pb2._VALUEANDWHY
+_RERANKBLOCKEDONISSUESREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_RERANKBLOCKEDONISSUESREQUEST.fields_by_name['moved_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_RERANKBLOCKEDONISSUESREQUEST.fields_by_name['target_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_RERANKBLOCKEDONISSUESRESPONSE.fields_by_name['blocked_on_issue_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_DELETEISSUEREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_DELETEISSUECOMMENTREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_DELETEATTACHMENTREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_FLAGISSUESREQUEST.fields_by_name['issue_refs'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_FLAGCOMMENTREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_LISTISSUEPERMISSIONSREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_MOVEISSUEREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_MOVEISSUERESPONSE.fields_by_name['new_issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_COPYISSUEREQUEST.fields_by_name['issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+_COPYISSUERESPONSE.fields_by_name['new_issue_ref'].message_type = api_dot_api__proto_dot_common__pb2._ISSUEREF
+DESCRIPTOR.message_types_by_name['CreateIssueRequest'] = _CREATEISSUEREQUEST
+DESCRIPTOR.message_types_by_name['GetIssueRequest'] = _GETISSUEREQUEST
+DESCRIPTOR.message_types_by_name['IssueResponse'] = _ISSUERESPONSE
+DESCRIPTOR.message_types_by_name['ListIssuesRequest'] = _LISTISSUESREQUEST
+DESCRIPTOR.message_types_by_name['ListIssuesResponse'] = _LISTISSUESRESPONSE
+DESCRIPTOR.message_types_by_name['ListReferencedIssuesRequest'] = _LISTREFERENCEDISSUESREQUEST
+DESCRIPTOR.message_types_by_name['ListReferencedIssuesResponse'] = _LISTREFERENCEDISSUESRESPONSE
+DESCRIPTOR.message_types_by_name['ListApplicableFieldDefsRequest'] = _LISTAPPLICABLEFIELDDEFSREQUEST
+DESCRIPTOR.message_types_by_name['ListApplicableFieldDefsResponse'] = _LISTAPPLICABLEFIELDDEFSRESPONSE
+DESCRIPTOR.message_types_by_name['UpdateIssueRequest'] = _UPDATEISSUEREQUEST
+DESCRIPTOR.message_types_by_name['StarIssueRequest'] = _STARISSUEREQUEST
+DESCRIPTOR.message_types_by_name['StarIssueResponse'] = _STARISSUERESPONSE
+DESCRIPTOR.message_types_by_name['IsIssueStarredRequest'] = _ISISSUESTARREDREQUEST
+DESCRIPTOR.message_types_by_name['IsIssueStarredResponse'] = _ISISSUESTARREDRESPONSE
+DESCRIPTOR.message_types_by_name['ListStarredIssuesRequest'] = _LISTSTARREDISSUESREQUEST
+DESCRIPTOR.message_types_by_name['ListStarredIssuesResponse'] = _LISTSTARREDISSUESRESPONSE
+DESCRIPTOR.message_types_by_name['ListCommentsRequest'] = _LISTCOMMENTSREQUEST
+DESCRIPTOR.message_types_by_name['ListCommentsResponse'] = _LISTCOMMENTSRESPONSE
+DESCRIPTOR.message_types_by_name['ListActivitiesRequest'] = _LISTACTIVITIESREQUEST
+DESCRIPTOR.message_types_by_name['ListActivitiesResponse'] = _LISTACTIVITIESRESPONSE
+DESCRIPTOR.message_types_by_name['DeleteCommentRequest'] = _DELETECOMMENTREQUEST
+DESCRIPTOR.message_types_by_name['BulkUpdateApprovalsRequest'] = _BULKUPDATEAPPROVALSREQUEST
+DESCRIPTOR.message_types_by_name['BulkUpdateApprovalsResponse'] = _BULKUPDATEAPPROVALSRESPONSE
+DESCRIPTOR.message_types_by_name['UpdateApprovalRequest'] = _UPDATEAPPROVALREQUEST
+DESCRIPTOR.message_types_by_name['UpdateApprovalResponse'] = _UPDATEAPPROVALRESPONSE
+DESCRIPTOR.message_types_by_name['ConvertIssueApprovalsTemplateRequest'] = _CONVERTISSUEAPPROVALSTEMPLATEREQUEST
+DESCRIPTOR.message_types_by_name['ConvertIssueApprovalsTemplateResponse'] = _CONVERTISSUEAPPROVALSTEMPLATERESPONSE
+DESCRIPTOR.message_types_by_name['IssueSnapshotRequest'] = _ISSUESNAPSHOTREQUEST
+DESCRIPTOR.message_types_by_name['IssueSnapshotCount'] = _ISSUESNAPSHOTCOUNT
+DESCRIPTOR.message_types_by_name['IssueSnapshotResponse'] = _ISSUESNAPSHOTRESPONSE
+DESCRIPTOR.message_types_by_name['PresubmitIssueRequest'] = _PRESUBMITISSUEREQUEST
+DESCRIPTOR.message_types_by_name['PresubmitIssueResponse'] = _PRESUBMITISSUERESPONSE
+DESCRIPTOR.message_types_by_name['RerankBlockedOnIssuesRequest'] = _RERANKBLOCKEDONISSUESREQUEST
+DESCRIPTOR.message_types_by_name['RerankBlockedOnIssuesResponse'] = _RERANKBLOCKEDONISSUESRESPONSE
+DESCRIPTOR.message_types_by_name['DeleteIssueRequest'] = _DELETEISSUEREQUEST
+DESCRIPTOR.message_types_by_name['DeleteIssueResponse'] = _DELETEISSUERESPONSE
+DESCRIPTOR.message_types_by_name['DeleteIssueCommentRequest'] = _DELETEISSUECOMMENTREQUEST
+DESCRIPTOR.message_types_by_name['DeleteIssueCommentResponse'] = _DELETEISSUECOMMENTRESPONSE
+DESCRIPTOR.message_types_by_name['DeleteAttachmentRequest'] = _DELETEATTACHMENTREQUEST
+DESCRIPTOR.message_types_by_name['DeleteAttachmentResponse'] = _DELETEATTACHMENTRESPONSE
+DESCRIPTOR.message_types_by_name['FlagIssuesRequest'] = _FLAGISSUESREQUEST
+DESCRIPTOR.message_types_by_name['FlagIssuesResponse'] = _FLAGISSUESRESPONSE
+DESCRIPTOR.message_types_by_name['FlagCommentRequest'] = _FLAGCOMMENTREQUEST
+DESCRIPTOR.message_types_by_name['FlagCommentResponse'] = _FLAGCOMMENTRESPONSE
+DESCRIPTOR.message_types_by_name['ListIssuePermissionsRequest'] = _LISTISSUEPERMISSIONSREQUEST
+DESCRIPTOR.message_types_by_name['ListIssuePermissionsResponse'] = _LISTISSUEPERMISSIONSRESPONSE
+DESCRIPTOR.message_types_by_name['MoveIssueRequest'] = _MOVEISSUEREQUEST
+DESCRIPTOR.message_types_by_name['MoveIssueResponse'] = _MOVEISSUERESPONSE
+DESCRIPTOR.message_types_by_name['CopyIssueRequest'] = _COPYISSUEREQUEST
+DESCRIPTOR.message_types_by_name['CopyIssueResponse'] = _COPYISSUERESPONSE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+CreateIssueRequest = _reflection.GeneratedProtocolMessageType('CreateIssueRequest', (_message.Message,), dict(
+  DESCRIPTOR = _CREATEISSUEREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.CreateIssueRequest)
+  ))
+_sym_db.RegisterMessage(CreateIssueRequest)
+
+GetIssueRequest = _reflection.GeneratedProtocolMessageType('GetIssueRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETISSUEREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetIssueRequest)
+  ))
+_sym_db.RegisterMessage(GetIssueRequest)
+
+IssueResponse = _reflection.GeneratedProtocolMessageType('IssueResponse', (_message.Message,), dict(
+  DESCRIPTOR = _ISSUERESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.IssueResponse)
+  ))
+_sym_db.RegisterMessage(IssueResponse)
+
+ListIssuesRequest = _reflection.GeneratedProtocolMessageType('ListIssuesRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTISSUESREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListIssuesRequest)
+  ))
+_sym_db.RegisterMessage(ListIssuesRequest)
+
+ListIssuesResponse = _reflection.GeneratedProtocolMessageType('ListIssuesResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTISSUESRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListIssuesResponse)
+  ))
+_sym_db.RegisterMessage(ListIssuesResponse)
+
+ListReferencedIssuesRequest = _reflection.GeneratedProtocolMessageType('ListReferencedIssuesRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTREFERENCEDISSUESREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListReferencedIssuesRequest)
+  ))
+_sym_db.RegisterMessage(ListReferencedIssuesRequest)
+
+ListReferencedIssuesResponse = _reflection.GeneratedProtocolMessageType('ListReferencedIssuesResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTREFERENCEDISSUESRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListReferencedIssuesResponse)
+  ))
+_sym_db.RegisterMessage(ListReferencedIssuesResponse)
+
+ListApplicableFieldDefsRequest = _reflection.GeneratedProtocolMessageType('ListApplicableFieldDefsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTAPPLICABLEFIELDDEFSREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListApplicableFieldDefsRequest)
+  ))
+_sym_db.RegisterMessage(ListApplicableFieldDefsRequest)
+
+ListApplicableFieldDefsResponse = _reflection.GeneratedProtocolMessageType('ListApplicableFieldDefsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTAPPLICABLEFIELDDEFSRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListApplicableFieldDefsResponse)
+  ))
+_sym_db.RegisterMessage(ListApplicableFieldDefsResponse)
+
+UpdateIssueRequest = _reflection.GeneratedProtocolMessageType('UpdateIssueRequest', (_message.Message,), dict(
+  DESCRIPTOR = _UPDATEISSUEREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.UpdateIssueRequest)
+  ))
+_sym_db.RegisterMessage(UpdateIssueRequest)
+
+StarIssueRequest = _reflection.GeneratedProtocolMessageType('StarIssueRequest', (_message.Message,), dict(
+  DESCRIPTOR = _STARISSUEREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.StarIssueRequest)
+  ))
+_sym_db.RegisterMessage(StarIssueRequest)
+
+StarIssueResponse = _reflection.GeneratedProtocolMessageType('StarIssueResponse', (_message.Message,), dict(
+  DESCRIPTOR = _STARISSUERESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.StarIssueResponse)
+  ))
+_sym_db.RegisterMessage(StarIssueResponse)
+
+IsIssueStarredRequest = _reflection.GeneratedProtocolMessageType('IsIssueStarredRequest', (_message.Message,), dict(
+  DESCRIPTOR = _ISISSUESTARREDREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.IsIssueStarredRequest)
+  ))
+_sym_db.RegisterMessage(IsIssueStarredRequest)
+
+IsIssueStarredResponse = _reflection.GeneratedProtocolMessageType('IsIssueStarredResponse', (_message.Message,), dict(
+  DESCRIPTOR = _ISISSUESTARREDRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.IsIssueStarredResponse)
+  ))
+_sym_db.RegisterMessage(IsIssueStarredResponse)
+
+ListStarredIssuesRequest = _reflection.GeneratedProtocolMessageType('ListStarredIssuesRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTSTARREDISSUESREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListStarredIssuesRequest)
+  ))
+_sym_db.RegisterMessage(ListStarredIssuesRequest)
+
+ListStarredIssuesResponse = _reflection.GeneratedProtocolMessageType('ListStarredIssuesResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTSTARREDISSUESRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListStarredIssuesResponse)
+  ))
+_sym_db.RegisterMessage(ListStarredIssuesResponse)
+
+ListCommentsRequest = _reflection.GeneratedProtocolMessageType('ListCommentsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTCOMMENTSREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListCommentsRequest)
+  ))
+_sym_db.RegisterMessage(ListCommentsRequest)
+
+ListCommentsResponse = _reflection.GeneratedProtocolMessageType('ListCommentsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTCOMMENTSRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListCommentsResponse)
+  ))
+_sym_db.RegisterMessage(ListCommentsResponse)
+
+ListActivitiesRequest = _reflection.GeneratedProtocolMessageType('ListActivitiesRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTACTIVITIESREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListActivitiesRequest)
+  ))
+_sym_db.RegisterMessage(ListActivitiesRequest)
+
+ListActivitiesResponse = _reflection.GeneratedProtocolMessageType('ListActivitiesResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTACTIVITIESRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListActivitiesResponse)
+  ))
+_sym_db.RegisterMessage(ListActivitiesResponse)
+
+DeleteCommentRequest = _reflection.GeneratedProtocolMessageType('DeleteCommentRequest', (_message.Message,), dict(
+  DESCRIPTOR = _DELETECOMMENTREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.DeleteCommentRequest)
+  ))
+_sym_db.RegisterMessage(DeleteCommentRequest)
+
+BulkUpdateApprovalsRequest = _reflection.GeneratedProtocolMessageType('BulkUpdateApprovalsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _BULKUPDATEAPPROVALSREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.BulkUpdateApprovalsRequest)
+  ))
+_sym_db.RegisterMessage(BulkUpdateApprovalsRequest)
+
+BulkUpdateApprovalsResponse = _reflection.GeneratedProtocolMessageType('BulkUpdateApprovalsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _BULKUPDATEAPPROVALSRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.BulkUpdateApprovalsResponse)
+  ))
+_sym_db.RegisterMessage(BulkUpdateApprovalsResponse)
+
+UpdateApprovalRequest = _reflection.GeneratedProtocolMessageType('UpdateApprovalRequest', (_message.Message,), dict(
+  DESCRIPTOR = _UPDATEAPPROVALREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.UpdateApprovalRequest)
+  ))
+_sym_db.RegisterMessage(UpdateApprovalRequest)
+
+UpdateApprovalResponse = _reflection.GeneratedProtocolMessageType('UpdateApprovalResponse', (_message.Message,), dict(
+  DESCRIPTOR = _UPDATEAPPROVALRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.UpdateApprovalResponse)
+  ))
+_sym_db.RegisterMessage(UpdateApprovalResponse)
+
+ConvertIssueApprovalsTemplateRequest = _reflection.GeneratedProtocolMessageType('ConvertIssueApprovalsTemplateRequest', (_message.Message,), dict(
+  DESCRIPTOR = _CONVERTISSUEAPPROVALSTEMPLATEREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ConvertIssueApprovalsTemplateRequest)
+  ))
+_sym_db.RegisterMessage(ConvertIssueApprovalsTemplateRequest)
+
+ConvertIssueApprovalsTemplateResponse = _reflection.GeneratedProtocolMessageType('ConvertIssueApprovalsTemplateResponse', (_message.Message,), dict(
+  DESCRIPTOR = _CONVERTISSUEAPPROVALSTEMPLATERESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ConvertIssueApprovalsTemplateResponse)
+  ))
+_sym_db.RegisterMessage(ConvertIssueApprovalsTemplateResponse)
+
+IssueSnapshotRequest = _reflection.GeneratedProtocolMessageType('IssueSnapshotRequest', (_message.Message,), dict(
+  DESCRIPTOR = _ISSUESNAPSHOTREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.IssueSnapshotRequest)
+  ))
+_sym_db.RegisterMessage(IssueSnapshotRequest)
+
+IssueSnapshotCount = _reflection.GeneratedProtocolMessageType('IssueSnapshotCount', (_message.Message,), dict(
+  DESCRIPTOR = _ISSUESNAPSHOTCOUNT,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.IssueSnapshotCount)
+  ))
+_sym_db.RegisterMessage(IssueSnapshotCount)
+
+IssueSnapshotResponse = _reflection.GeneratedProtocolMessageType('IssueSnapshotResponse', (_message.Message,), dict(
+  DESCRIPTOR = _ISSUESNAPSHOTRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.IssueSnapshotResponse)
+  ))
+_sym_db.RegisterMessage(IssueSnapshotResponse)
+
+PresubmitIssueRequest = _reflection.GeneratedProtocolMessageType('PresubmitIssueRequest', (_message.Message,), dict(
+  DESCRIPTOR = _PRESUBMITISSUEREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.PresubmitIssueRequest)
+  ))
+_sym_db.RegisterMessage(PresubmitIssueRequest)
+
+PresubmitIssueResponse = _reflection.GeneratedProtocolMessageType('PresubmitIssueResponse', (_message.Message,), dict(
+  DESCRIPTOR = _PRESUBMITISSUERESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.PresubmitIssueResponse)
+  ))
+_sym_db.RegisterMessage(PresubmitIssueResponse)
+
+RerankBlockedOnIssuesRequest = _reflection.GeneratedProtocolMessageType('RerankBlockedOnIssuesRequest', (_message.Message,), dict(
+  DESCRIPTOR = _RERANKBLOCKEDONISSUESREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.RerankBlockedOnIssuesRequest)
+  ))
+_sym_db.RegisterMessage(RerankBlockedOnIssuesRequest)
+
+RerankBlockedOnIssuesResponse = _reflection.GeneratedProtocolMessageType('RerankBlockedOnIssuesResponse', (_message.Message,), dict(
+  DESCRIPTOR = _RERANKBLOCKEDONISSUESRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.RerankBlockedOnIssuesResponse)
+  ))
+_sym_db.RegisterMessage(RerankBlockedOnIssuesResponse)
+
+DeleteIssueRequest = _reflection.GeneratedProtocolMessageType('DeleteIssueRequest', (_message.Message,), dict(
+  DESCRIPTOR = _DELETEISSUEREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.DeleteIssueRequest)
+  ))
+_sym_db.RegisterMessage(DeleteIssueRequest)
+
+DeleteIssueResponse = _reflection.GeneratedProtocolMessageType('DeleteIssueResponse', (_message.Message,), dict(
+  DESCRIPTOR = _DELETEISSUERESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.DeleteIssueResponse)
+  ))
+_sym_db.RegisterMessage(DeleteIssueResponse)
+
+DeleteIssueCommentRequest = _reflection.GeneratedProtocolMessageType('DeleteIssueCommentRequest', (_message.Message,), dict(
+  DESCRIPTOR = _DELETEISSUECOMMENTREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.DeleteIssueCommentRequest)
+  ))
+_sym_db.RegisterMessage(DeleteIssueCommentRequest)
+
+DeleteIssueCommentResponse = _reflection.GeneratedProtocolMessageType('DeleteIssueCommentResponse', (_message.Message,), dict(
+  DESCRIPTOR = _DELETEISSUECOMMENTRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.DeleteIssueCommentResponse)
+  ))
+_sym_db.RegisterMessage(DeleteIssueCommentResponse)
+
+DeleteAttachmentRequest = _reflection.GeneratedProtocolMessageType('DeleteAttachmentRequest', (_message.Message,), dict(
+  DESCRIPTOR = _DELETEATTACHMENTREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.DeleteAttachmentRequest)
+  ))
+_sym_db.RegisterMessage(DeleteAttachmentRequest)
+
+DeleteAttachmentResponse = _reflection.GeneratedProtocolMessageType('DeleteAttachmentResponse', (_message.Message,), dict(
+  DESCRIPTOR = _DELETEATTACHMENTRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.DeleteAttachmentResponse)
+  ))
+_sym_db.RegisterMessage(DeleteAttachmentResponse)
+
+FlagIssuesRequest = _reflection.GeneratedProtocolMessageType('FlagIssuesRequest', (_message.Message,), dict(
+  DESCRIPTOR = _FLAGISSUESREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.FlagIssuesRequest)
+  ))
+_sym_db.RegisterMessage(FlagIssuesRequest)
+
+FlagIssuesResponse = _reflection.GeneratedProtocolMessageType('FlagIssuesResponse', (_message.Message,), dict(
+  DESCRIPTOR = _FLAGISSUESRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.FlagIssuesResponse)
+  ))
+_sym_db.RegisterMessage(FlagIssuesResponse)
+
+FlagCommentRequest = _reflection.GeneratedProtocolMessageType('FlagCommentRequest', (_message.Message,), dict(
+  DESCRIPTOR = _FLAGCOMMENTREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.FlagCommentRequest)
+  ))
+_sym_db.RegisterMessage(FlagCommentRequest)
+
+FlagCommentResponse = _reflection.GeneratedProtocolMessageType('FlagCommentResponse', (_message.Message,), dict(
+  DESCRIPTOR = _FLAGCOMMENTRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.FlagCommentResponse)
+  ))
+_sym_db.RegisterMessage(FlagCommentResponse)
+
+ListIssuePermissionsRequest = _reflection.GeneratedProtocolMessageType('ListIssuePermissionsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTISSUEPERMISSIONSREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListIssuePermissionsRequest)
+  ))
+_sym_db.RegisterMessage(ListIssuePermissionsRequest)
+
+ListIssuePermissionsResponse = _reflection.GeneratedProtocolMessageType('ListIssuePermissionsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTISSUEPERMISSIONSRESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListIssuePermissionsResponse)
+  ))
+_sym_db.RegisterMessage(ListIssuePermissionsResponse)
+
+MoveIssueRequest = _reflection.GeneratedProtocolMessageType('MoveIssueRequest', (_message.Message,), dict(
+  DESCRIPTOR = _MOVEISSUEREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.MoveIssueRequest)
+  ))
+_sym_db.RegisterMessage(MoveIssueRequest)
+
+MoveIssueResponse = _reflection.GeneratedProtocolMessageType('MoveIssueResponse', (_message.Message,), dict(
+  DESCRIPTOR = _MOVEISSUERESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.MoveIssueResponse)
+  ))
+_sym_db.RegisterMessage(MoveIssueResponse)
+
+CopyIssueRequest = _reflection.GeneratedProtocolMessageType('CopyIssueRequest', (_message.Message,), dict(
+  DESCRIPTOR = _COPYISSUEREQUEST,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.CopyIssueRequest)
+  ))
+_sym_db.RegisterMessage(CopyIssueRequest)
+
+CopyIssueResponse = _reflection.GeneratedProtocolMessageType('CopyIssueResponse', (_message.Message,), dict(
+  DESCRIPTOR = _COPYISSUERESPONSE,
+  __module__ = 'api.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.CopyIssueResponse)
+  ))
+_sym_db.RegisterMessage(CopyIssueResponse)
+
+
+
+_ISSUES = _descriptor.ServiceDescriptor(
+  name='Issues',
+  full_name='monorail.Issues',
+  file=DESCRIPTOR,
+  index=0,
+  serialized_options=None,
+  serialized_start=4879,
+  serialized_end=7162,
+  methods=[
+  _descriptor.MethodDescriptor(
+    name='CreateIssue',
+    full_name='monorail.Issues.CreateIssue',
+    index=0,
+    containing_service=None,
+    input_type=_CREATEISSUEREQUEST,
+    output_type=_ISSUERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetIssue',
+    full_name='monorail.Issues.GetIssue',
+    index=1,
+    containing_service=None,
+    input_type=_GETISSUEREQUEST,
+    output_type=_ISSUERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListIssues',
+    full_name='monorail.Issues.ListIssues',
+    index=2,
+    containing_service=None,
+    input_type=_LISTISSUESREQUEST,
+    output_type=_LISTISSUESRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListReferencedIssues',
+    full_name='monorail.Issues.ListReferencedIssues',
+    index=3,
+    containing_service=None,
+    input_type=_LISTREFERENCEDISSUESREQUEST,
+    output_type=_LISTREFERENCEDISSUESRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListApplicableFieldDefs',
+    full_name='monorail.Issues.ListApplicableFieldDefs',
+    index=4,
+    containing_service=None,
+    input_type=_LISTAPPLICABLEFIELDDEFSREQUEST,
+    output_type=_LISTAPPLICABLEFIELDDEFSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='UpdateIssue',
+    full_name='monorail.Issues.UpdateIssue',
+    index=5,
+    containing_service=None,
+    input_type=_UPDATEISSUEREQUEST,
+    output_type=_ISSUERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='StarIssue',
+    full_name='monorail.Issues.StarIssue',
+    index=6,
+    containing_service=None,
+    input_type=_STARISSUEREQUEST,
+    output_type=_STARISSUERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='IsIssueStarred',
+    full_name='monorail.Issues.IsIssueStarred',
+    index=7,
+    containing_service=None,
+    input_type=_ISISSUESTARREDREQUEST,
+    output_type=_ISISSUESTARREDRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListStarredIssues',
+    full_name='monorail.Issues.ListStarredIssues',
+    index=8,
+    containing_service=None,
+    input_type=_LISTSTARREDISSUESREQUEST,
+    output_type=_LISTSTARREDISSUESRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListComments',
+    full_name='monorail.Issues.ListComments',
+    index=9,
+    containing_service=None,
+    input_type=_LISTCOMMENTSREQUEST,
+    output_type=_LISTCOMMENTSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListActivities',
+    full_name='monorail.Issues.ListActivities',
+    index=10,
+    containing_service=None,
+    input_type=_LISTACTIVITIESREQUEST,
+    output_type=_LISTACTIVITIESRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='DeleteComment',
+    full_name='monorail.Issues.DeleteComment',
+    index=11,
+    containing_service=None,
+    input_type=_DELETECOMMENTREQUEST,
+    output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='BulkUpdateApprovals',
+    full_name='monorail.Issues.BulkUpdateApprovals',
+    index=12,
+    containing_service=None,
+    input_type=_BULKUPDATEAPPROVALSREQUEST,
+    output_type=_BULKUPDATEAPPROVALSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='UpdateApproval',
+    full_name='monorail.Issues.UpdateApproval',
+    index=13,
+    containing_service=None,
+    input_type=_UPDATEAPPROVALREQUEST,
+    output_type=_UPDATEAPPROVALRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ConvertIssueApprovalsTemplate',
+    full_name='monorail.Issues.ConvertIssueApprovalsTemplate',
+    index=14,
+    containing_service=None,
+    input_type=_CONVERTISSUEAPPROVALSTEMPLATEREQUEST,
+    output_type=_CONVERTISSUEAPPROVALSTEMPLATERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='IssueSnapshot',
+    full_name='monorail.Issues.IssueSnapshot',
+    index=15,
+    containing_service=None,
+    input_type=_ISSUESNAPSHOTREQUEST,
+    output_type=_ISSUESNAPSHOTRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='PresubmitIssue',
+    full_name='monorail.Issues.PresubmitIssue',
+    index=16,
+    containing_service=None,
+    input_type=_PRESUBMITISSUEREQUEST,
+    output_type=_PRESUBMITISSUERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='RerankBlockedOnIssues',
+    full_name='monorail.Issues.RerankBlockedOnIssues',
+    index=17,
+    containing_service=None,
+    input_type=_RERANKBLOCKEDONISSUESREQUEST,
+    output_type=_RERANKBLOCKEDONISSUESRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='DeleteIssue',
+    full_name='monorail.Issues.DeleteIssue',
+    index=18,
+    containing_service=None,
+    input_type=_DELETEISSUEREQUEST,
+    output_type=_DELETEISSUERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='DeleteIssueComment',
+    full_name='monorail.Issues.DeleteIssueComment',
+    index=19,
+    containing_service=None,
+    input_type=_DELETEISSUECOMMENTREQUEST,
+    output_type=_DELETEISSUECOMMENTRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='DeleteAttachment',
+    full_name='monorail.Issues.DeleteAttachment',
+    index=20,
+    containing_service=None,
+    input_type=_DELETEATTACHMENTREQUEST,
+    output_type=_DELETEATTACHMENTRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='FlagIssues',
+    full_name='monorail.Issues.FlagIssues',
+    index=21,
+    containing_service=None,
+    input_type=_FLAGISSUESREQUEST,
+    output_type=_FLAGISSUESRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='FlagComment',
+    full_name='monorail.Issues.FlagComment',
+    index=22,
+    containing_service=None,
+    input_type=_FLAGCOMMENTREQUEST,
+    output_type=_FLAGCOMMENTRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListIssuePermissions',
+    full_name='monorail.Issues.ListIssuePermissions',
+    index=23,
+    containing_service=None,
+    input_type=_LISTISSUEPERMISSIONSREQUEST,
+    output_type=_LISTISSUEPERMISSIONSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='MoveIssue',
+    full_name='monorail.Issues.MoveIssue',
+    index=24,
+    containing_service=None,
+    input_type=_MOVEISSUEREQUEST,
+    output_type=_MOVEISSUERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='CopyIssue',
+    full_name='monorail.Issues.CopyIssue',
+    index=25,
+    containing_service=None,
+    input_type=_COPYISSUEREQUEST,
+    output_type=_COPYISSUERESPONSE,
+    serialized_options=None,
+  ),
+])
+_sym_db.RegisterServiceDescriptor(_ISSUES)
+
+DESCRIPTOR.services_by_name['Issues'] = _ISSUES
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/api_proto/issues_prpc_pb2.py b/api/api_proto/issues_prpc_pb2.py
new file mode 100644
index 0000000..942730d
--- /dev/null
+++ b/api/api_proto/issues_prpc_pb2.py
@@ -0,0 +1,403 @@
+# Generated by the pRPC protocol buffer compiler plugin.  DO NOT EDIT!
+# source: api/api_proto/issues.proto
+
+import base64
+import zlib
+
+from google.protobuf import descriptor_pb2
+
+# Includes description of the api/api_proto/issues.proto and all of its transitive
+# dependencies. Includes source code info.
+FILE_DESCRIPTOR_SET = descriptor_pb2.FileDescriptorSet()
+FILE_DESCRIPTOR_SET.ParseFromString(zlib.decompress(base64.b64decode(
+    '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')))
+_INDEX = {
+    f.name: {
+      'descriptor': f,
+      'services': {s.name: s for s in f.service},
+    }
+    for f in FILE_DESCRIPTOR_SET.file
+}
+
+
+IssuesServiceDescription = {
+  'file_descriptor_set': FILE_DESCRIPTOR_SET,
+  'file_descriptor': _INDEX[u'api/api_proto/issues.proto']['descriptor'],
+  'service_descriptor': _INDEX[u'api/api_proto/issues.proto']['services'][u'Issues'],
+}
diff --git a/api/api_proto/project_objects.proto b/api/api_proto/project_objects.proto
new file mode 100644
index 0000000..a6943ec
--- /dev/null
+++ b/api/api_proto/project_objects.proto
@@ -0,0 +1,136 @@
+// Copyright 2018 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
+
+// This file defines protobufs for issues and related business
+// objects, e.g., field values, comments, and attachments.
+
+syntax = "proto3";
+
+package monorail;
+
+import "api/api_proto/common.proto";
+import "api/api_proto/issue_objects.proto";
+
+
+// Next available tag: 4
+message Project {
+  string name = 1;
+  string summary = 2;
+  string description = 3;
+}
+
+
+// Next available tag: 6
+message StatusDef {
+  string status = 1;
+  bool means_open = 2;
+  uint32 rank = 3;
+  string docstring = 4;
+  bool deprecated = 5;
+}
+
+
+// Next available tag: 5
+message LabelDef {
+  string label = 1;
+  string docstring = 3;
+  bool deprecated = 4;
+}
+
+
+// Next available tag: 11
+message ComponentDef {
+  string path = 1;
+  string docstring = 2;
+  repeated UserRef admin_refs = 3;
+  repeated UserRef cc_refs = 4;
+  bool deprecated = 5;
+  fixed32 created = 6;
+  UserRef creator_ref = 7;
+  fixed32 modified = 8;
+  UserRef modifier_ref = 9;
+  repeated LabelRef label_refs = 10;
+}
+
+
+// Next available tag: 9
+message FieldDef {
+  FieldRef field_ref = 1;
+  string applicable_type = 2;
+  // TODO(jrobbins): applicable_predicate
+  bool is_required = 3;
+  bool is_niche = 4;
+  bool is_multivalued = 5;
+  string docstring = 6;
+  repeated UserRef admin_refs = 7;
+  // TODO(jrobbins): validation, permission granting, and notification options.
+  bool is_phase_field = 8;
+  repeated UserRef user_choices = 9;
+  repeated LabelDef enum_choices = 10;
+}
+
+
+// Next available tag: 3
+message FieldOptions {
+  FieldRef field_ref = 1;
+  repeated UserRef user_refs = 2;
+}
+
+
+// Next available tag: 4
+message ApprovalDef {
+  FieldRef field_ref = 1;
+  repeated UserRef approver_refs = 2;
+  string survey = 3;
+}
+
+
+// Next available tag: 11
+message Config {
+  string project_name = 1;
+  repeated StatusDef status_defs = 2;
+  repeated StatusRef statuses_offer_merge = 3;
+  repeated LabelDef label_defs = 4;
+  repeated string exclusive_label_prefixes = 5;
+  repeated ComponentDef component_defs = 6;
+  repeated FieldDef field_defs = 7;
+  repeated ApprovalDef approval_defs = 8;
+  bool restrict_to_known = 9;
+}
+
+
+// Next available tag: 11
+message PresentationConfig {
+  string project_thumbnail_url = 1;
+  string project_summary = 2;
+  string custom_issue_entry_url = 3;
+  string default_query = 4;
+  repeated SavedQuery saved_queries = 5;
+  string revision_url_format = 6;
+  string default_col_spec = 7;
+  string default_sort_spec = 8;
+  string default_x_attr = 9;
+  string default_y_attr = 10;
+}
+
+
+// Next available tag: 16
+message TemplateDef {
+  string template_name = 1;
+  string content = 2;
+  string summary = 3;
+  bool summary_must_be_edited = 4;
+  UserRef owner_ref = 5;
+  StatusRef status_ref = 6;
+  repeated LabelRef label_refs = 7;
+  bool members_only = 8;
+  bool owner_defaults_to_member = 9;
+  repeated UserRef admin_refs = 10;
+  repeated FieldValue field_values = 11;
+  repeated ComponentRef component_refs = 12;
+  bool component_required = 13;
+  repeated Approval approval_values = 14;
+  repeated PhaseDef phases = 15;
+}
diff --git a/api/api_proto/project_objects_pb2.py b/api/api_proto/project_objects_pb2.py
new file mode 100644
index 0000000..580810a
--- /dev/null
+++ b/api/api_proto/project_objects_pb2.py
@@ -0,0 +1,871 @@
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/api_proto/project_objects.proto
+
+import sys
+_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from api.api_proto import common_pb2 as api_dot_api__proto_dot_common__pb2
+from api.api_proto import issue_objects_pb2 as api_dot_api__proto_dot_issue__objects__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/api_proto/project_objects.proto',
+  package='monorail',
+  syntax='proto3',
+  serialized_options=None,
+  serialized_pb=_b('\n#api/api_proto/project_objects.proto\x12\x08monorail\x1a\x1a\x61pi/api_proto/common.proto\x1a!api/api_proto/issue_objects.proto\"=\n\x07Project\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07summary\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\"d\n\tStatusDef\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x12\n\nmeans_open\x18\x02 \x01(\x08\x12\x0c\n\x04rank\x18\x03 \x01(\r\x12\x11\n\tdocstring\x18\x04 \x01(\t\x12\x12\n\ndeprecated\x18\x05 \x01(\x08\"@\n\x08LabelDef\x12\r\n\x05label\x18\x01 \x01(\t\x12\x11\n\tdocstring\x18\x03 \x01(\t\x12\x12\n\ndeprecated\x18\x04 \x01(\x08\"\xaa\x02\n\x0c\x43omponentDef\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x11\n\tdocstring\x18\x02 \x01(\t\x12%\n\nadmin_refs\x18\x03 \x03(\x0b\x32\x11.monorail.UserRef\x12\"\n\x07\x63\x63_refs\x18\x04 \x03(\x0b\x32\x11.monorail.UserRef\x12\x12\n\ndeprecated\x18\x05 \x01(\x08\x12\x0f\n\x07\x63reated\x18\x06 \x01(\x07\x12&\n\x0b\x63reator_ref\x18\x07 \x01(\x0b\x32\x11.monorail.UserRef\x12\x10\n\x08modified\x18\x08 \x01(\x07\x12\'\n\x0cmodifier_ref\x18\t \x01(\x0b\x32\x11.monorail.UserRef\x12&\n\nlabel_refs\x18\n \x03(\x0b\x32\x12.monorail.LabelRef\"\xae\x02\n\x08\x46ieldDef\x12%\n\tfield_ref\x18\x01 \x01(\x0b\x32\x12.monorail.FieldRef\x12\x17\n\x0f\x61pplicable_type\x18\x02 \x01(\t\x12\x13\n\x0bis_required\x18\x03 \x01(\x08\x12\x10\n\x08is_niche\x18\x04 \x01(\x08\x12\x16\n\x0eis_multivalued\x18\x05 \x01(\x08\x12\x11\n\tdocstring\x18\x06 \x01(\t\x12%\n\nadmin_refs\x18\x07 \x03(\x0b\x32\x11.monorail.UserRef\x12\x16\n\x0eis_phase_field\x18\x08 \x01(\x08\x12\'\n\x0cuser_choices\x18\t \x03(\x0b\x32\x11.monorail.UserRef\x12(\n\x0c\x65num_choices\x18\n \x03(\x0b\x32\x12.monorail.LabelDef\"[\n\x0c\x46ieldOptions\x12%\n\tfield_ref\x18\x01 \x01(\x0b\x32\x12.monorail.FieldRef\x12$\n\tuser_refs\x18\x02 \x03(\x0b\x32\x11.monorail.UserRef\"n\n\x0b\x41pprovalDef\x12%\n\tfield_ref\x18\x01 \x01(\x0b\x32\x12.monorail.FieldRef\x12(\n\rapprover_refs\x18\x02 \x03(\x0b\x32\x11.monorail.UserRef\x12\x0e\n\x06survey\x18\x03 \x01(\t\"\xe6\x02\n\x06\x43onfig\x12\x14\n\x0cproject_name\x18\x01 \x01(\t\x12(\n\x0bstatus_defs\x18\x02 \x03(\x0b\x32\x13.monorail.StatusDef\x12\x31\n\x14statuses_offer_merge\x18\x03 \x03(\x0b\x32\x13.monorail.StatusRef\x12&\n\nlabel_defs\x18\x04 \x03(\x0b\x32\x12.monorail.LabelDef\x12 \n\x18\x65xclusive_label_prefixes\x18\x05 \x03(\t\x12.\n\x0e\x63omponent_defs\x18\x06 \x03(\x0b\x32\x16.monorail.ComponentDef\x12&\n\nfield_defs\x18\x07 \x03(\x0b\x32\x12.monorail.FieldDef\x12,\n\rapproval_defs\x18\x08 \x03(\x0b\x32\x15.monorail.ApprovalDef\x12\x19\n\x11restrict_to_known\x18\t \x01(\x08\"\xb2\x02\n\x12PresentationConfig\x12\x1d\n\x15project_thumbnail_url\x18\x01 \x01(\t\x12\x17\n\x0fproject_summary\x18\x02 \x01(\t\x12\x1e\n\x16\x63ustom_issue_entry_url\x18\x03 \x01(\t\x12\x15\n\rdefault_query\x18\x04 \x01(\t\x12+\n\rsaved_queries\x18\x05 \x03(\x0b\x32\x14.monorail.SavedQuery\x12\x1b\n\x13revision_url_format\x18\x06 \x01(\t\x12\x18\n\x10\x64\x65\x66\x61ult_col_spec\x18\x07 \x01(\t\x12\x19\n\x11\x64\x65\x66\x61ult_sort_spec\x18\x08 \x01(\t\x12\x16\n\x0e\x64\x65\x66\x61ult_x_attr\x18\t \x01(\t\x12\x16\n\x0e\x64\x65\x66\x61ult_y_attr\x18\n \x01(\t\"\x85\x04\n\x0bTemplateDef\x12\x15\n\rtemplate_name\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12\x0f\n\x07summary\x18\x03 \x01(\t\x12\x1e\n\x16summary_must_be_edited\x18\x04 \x01(\x08\x12$\n\towner_ref\x18\x05 \x01(\x0b\x32\x11.monorail.UserRef\x12\'\n\nstatus_ref\x18\x06 \x01(\x0b\x32\x13.monorail.StatusRef\x12&\n\nlabel_refs\x18\x07 \x03(\x0b\x32\x12.monorail.LabelRef\x12\x14\n\x0cmembers_only\x18\x08 \x01(\x08\x12 \n\x18owner_defaults_to_member\x18\t \x01(\x08\x12%\n\nadmin_refs\x18\n \x03(\x0b\x32\x11.monorail.UserRef\x12*\n\x0c\x66ield_values\x18\x0b \x03(\x0b\x32\x14.monorail.FieldValue\x12.\n\x0e\x63omponent_refs\x18\x0c \x03(\x0b\x32\x16.monorail.ComponentRef\x12\x1a\n\x12\x63omponent_required\x18\r \x01(\x08\x12+\n\x0f\x61pproval_values\x18\x0e \x03(\x0b\x32\x12.monorail.Approval\x12\"\n\x06phases\x18\x0f \x03(\x0b\x32\x12.monorail.PhaseDefb\x06proto3')
+  ,
+  dependencies=[api_dot_api__proto_dot_common__pb2.DESCRIPTOR,api_dot_api__proto_dot_issue__objects__pb2.DESCRIPTOR,])
+
+
+
+
+_PROJECT = _descriptor.Descriptor(
+  name='Project',
+  full_name='monorail.Project',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.Project.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='summary', full_name='monorail.Project.summary', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='description', full_name='monorail.Project.description', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=112,
+  serialized_end=173,
+)
+
+
+_STATUSDEF = _descriptor.Descriptor(
+  name='StatusDef',
+  full_name='monorail.StatusDef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='status', full_name='monorail.StatusDef.status', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='means_open', full_name='monorail.StatusDef.means_open', index=1,
+      number=2, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='rank', full_name='monorail.StatusDef.rank', index=2,
+      number=3, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='docstring', full_name='monorail.StatusDef.docstring', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='deprecated', full_name='monorail.StatusDef.deprecated', index=4,
+      number=5, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=175,
+  serialized_end=275,
+)
+
+
+_LABELDEF = _descriptor.Descriptor(
+  name='LabelDef',
+  full_name='monorail.LabelDef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='label', full_name='monorail.LabelDef.label', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='docstring', full_name='monorail.LabelDef.docstring', index=1,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='deprecated', full_name='monorail.LabelDef.deprecated', index=2,
+      number=4, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=277,
+  serialized_end=341,
+)
+
+
+_COMPONENTDEF = _descriptor.Descriptor(
+  name='ComponentDef',
+  full_name='monorail.ComponentDef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='path', full_name='monorail.ComponentDef.path', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='docstring', full_name='monorail.ComponentDef.docstring', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='admin_refs', full_name='monorail.ComponentDef.admin_refs', index=2,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='cc_refs', full_name='monorail.ComponentDef.cc_refs', index=3,
+      number=4, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='deprecated', full_name='monorail.ComponentDef.deprecated', index=4,
+      number=5, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='created', full_name='monorail.ComponentDef.created', index=5,
+      number=6, type=7, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='creator_ref', full_name='monorail.ComponentDef.creator_ref', index=6,
+      number=7, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='modified', full_name='monorail.ComponentDef.modified', index=7,
+      number=8, type=7, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='modifier_ref', full_name='monorail.ComponentDef.modifier_ref', index=8,
+      number=9, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='label_refs', full_name='monorail.ComponentDef.label_refs', index=9,
+      number=10, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=344,
+  serialized_end=642,
+)
+
+
+_FIELDDEF = _descriptor.Descriptor(
+  name='FieldDef',
+  full_name='monorail.FieldDef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='field_ref', full_name='monorail.FieldDef.field_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='applicable_type', full_name='monorail.FieldDef.applicable_type', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_required', full_name='monorail.FieldDef.is_required', index=2,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_niche', full_name='monorail.FieldDef.is_niche', index=3,
+      number=4, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_multivalued', full_name='monorail.FieldDef.is_multivalued', index=4,
+      number=5, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='docstring', full_name='monorail.FieldDef.docstring', index=5,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='admin_refs', full_name='monorail.FieldDef.admin_refs', index=6,
+      number=7, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_phase_field', full_name='monorail.FieldDef.is_phase_field', index=7,
+      number=8, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='user_choices', full_name='monorail.FieldDef.user_choices', index=8,
+      number=9, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='enum_choices', full_name='monorail.FieldDef.enum_choices', index=9,
+      number=10, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=645,
+  serialized_end=947,
+)
+
+
+_FIELDOPTIONS = _descriptor.Descriptor(
+  name='FieldOptions',
+  full_name='monorail.FieldOptions',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='field_ref', full_name='monorail.FieldOptions.field_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='user_refs', full_name='monorail.FieldOptions.user_refs', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=949,
+  serialized_end=1040,
+)
+
+
+_APPROVALDEF = _descriptor.Descriptor(
+  name='ApprovalDef',
+  full_name='monorail.ApprovalDef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='field_ref', full_name='monorail.ApprovalDef.field_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='approver_refs', full_name='monorail.ApprovalDef.approver_refs', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='survey', full_name='monorail.ApprovalDef.survey', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1042,
+  serialized_end=1152,
+)
+
+
+_CONFIG = _descriptor.Descriptor(
+  name='Config',
+  full_name='monorail.Config',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.Config.project_name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='status_defs', full_name='monorail.Config.status_defs', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='statuses_offer_merge', full_name='monorail.Config.statuses_offer_merge', index=2,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='label_defs', full_name='monorail.Config.label_defs', index=3,
+      number=4, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='exclusive_label_prefixes', full_name='monorail.Config.exclusive_label_prefixes', index=4,
+      number=5, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='component_defs', full_name='monorail.Config.component_defs', index=5,
+      number=6, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='field_defs', full_name='monorail.Config.field_defs', index=6,
+      number=7, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='approval_defs', full_name='monorail.Config.approval_defs', index=7,
+      number=8, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='restrict_to_known', full_name='monorail.Config.restrict_to_known', index=8,
+      number=9, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1155,
+  serialized_end=1513,
+)
+
+
+_PRESENTATIONCONFIG = _descriptor.Descriptor(
+  name='PresentationConfig',
+  full_name='monorail.PresentationConfig',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_thumbnail_url', full_name='monorail.PresentationConfig.project_thumbnail_url', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='project_summary', full_name='monorail.PresentationConfig.project_summary', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='custom_issue_entry_url', full_name='monorail.PresentationConfig.custom_issue_entry_url', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='default_query', full_name='monorail.PresentationConfig.default_query', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='saved_queries', full_name='monorail.PresentationConfig.saved_queries', index=4,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='revision_url_format', full_name='monorail.PresentationConfig.revision_url_format', index=5,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='default_col_spec', full_name='monorail.PresentationConfig.default_col_spec', index=6,
+      number=7, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='default_sort_spec', full_name='monorail.PresentationConfig.default_sort_spec', index=7,
+      number=8, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='default_x_attr', full_name='monorail.PresentationConfig.default_x_attr', index=8,
+      number=9, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='default_y_attr', full_name='monorail.PresentationConfig.default_y_attr', index=9,
+      number=10, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1516,
+  serialized_end=1822,
+)
+
+
+_TEMPLATEDEF = _descriptor.Descriptor(
+  name='TemplateDef',
+  full_name='monorail.TemplateDef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='template_name', full_name='monorail.TemplateDef.template_name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='content', full_name='monorail.TemplateDef.content', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='summary', full_name='monorail.TemplateDef.summary', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='summary_must_be_edited', full_name='monorail.TemplateDef.summary_must_be_edited', index=3,
+      number=4, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='owner_ref', full_name='monorail.TemplateDef.owner_ref', index=4,
+      number=5, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='status_ref', full_name='monorail.TemplateDef.status_ref', index=5,
+      number=6, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='label_refs', full_name='monorail.TemplateDef.label_refs', index=6,
+      number=7, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='members_only', full_name='monorail.TemplateDef.members_only', index=7,
+      number=8, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='owner_defaults_to_member', full_name='monorail.TemplateDef.owner_defaults_to_member', index=8,
+      number=9, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='admin_refs', full_name='monorail.TemplateDef.admin_refs', index=9,
+      number=10, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='field_values', full_name='monorail.TemplateDef.field_values', index=10,
+      number=11, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='component_refs', full_name='monorail.TemplateDef.component_refs', index=11,
+      number=12, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='component_required', full_name='monorail.TemplateDef.component_required', index=12,
+      number=13, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='approval_values', full_name='monorail.TemplateDef.approval_values', index=13,
+      number=14, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='phases', full_name='monorail.TemplateDef.phases', index=14,
+      number=15, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1825,
+  serialized_end=2342,
+)
+
+_COMPONENTDEF.fields_by_name['admin_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_COMPONENTDEF.fields_by_name['cc_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_COMPONENTDEF.fields_by_name['creator_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_COMPONENTDEF.fields_by_name['modifier_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_COMPONENTDEF.fields_by_name['label_refs'].message_type = api_dot_api__proto_dot_common__pb2._LABELREF
+_FIELDDEF.fields_by_name['field_ref'].message_type = api_dot_api__proto_dot_common__pb2._FIELDREF
+_FIELDDEF.fields_by_name['admin_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_FIELDDEF.fields_by_name['user_choices'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_FIELDDEF.fields_by_name['enum_choices'].message_type = _LABELDEF
+_FIELDOPTIONS.fields_by_name['field_ref'].message_type = api_dot_api__proto_dot_common__pb2._FIELDREF
+_FIELDOPTIONS.fields_by_name['user_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_APPROVALDEF.fields_by_name['field_ref'].message_type = api_dot_api__proto_dot_common__pb2._FIELDREF
+_APPROVALDEF.fields_by_name['approver_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_CONFIG.fields_by_name['status_defs'].message_type = _STATUSDEF
+_CONFIG.fields_by_name['statuses_offer_merge'].message_type = api_dot_api__proto_dot_common__pb2._STATUSREF
+_CONFIG.fields_by_name['label_defs'].message_type = _LABELDEF
+_CONFIG.fields_by_name['component_defs'].message_type = _COMPONENTDEF
+_CONFIG.fields_by_name['field_defs'].message_type = _FIELDDEF
+_CONFIG.fields_by_name['approval_defs'].message_type = _APPROVALDEF
+_PRESENTATIONCONFIG.fields_by_name['saved_queries'].message_type = api_dot_api__proto_dot_common__pb2._SAVEDQUERY
+_TEMPLATEDEF.fields_by_name['owner_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_TEMPLATEDEF.fields_by_name['status_ref'].message_type = api_dot_api__proto_dot_common__pb2._STATUSREF
+_TEMPLATEDEF.fields_by_name['label_refs'].message_type = api_dot_api__proto_dot_common__pb2._LABELREF
+_TEMPLATEDEF.fields_by_name['admin_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_TEMPLATEDEF.fields_by_name['field_values'].message_type = api_dot_api__proto_dot_issue__objects__pb2._FIELDVALUE
+_TEMPLATEDEF.fields_by_name['component_refs'].message_type = api_dot_api__proto_dot_common__pb2._COMPONENTREF
+_TEMPLATEDEF.fields_by_name['approval_values'].message_type = api_dot_api__proto_dot_issue__objects__pb2._APPROVAL
+_TEMPLATEDEF.fields_by_name['phases'].message_type = api_dot_api__proto_dot_issue__objects__pb2._PHASEDEF
+DESCRIPTOR.message_types_by_name['Project'] = _PROJECT
+DESCRIPTOR.message_types_by_name['StatusDef'] = _STATUSDEF
+DESCRIPTOR.message_types_by_name['LabelDef'] = _LABELDEF
+DESCRIPTOR.message_types_by_name['ComponentDef'] = _COMPONENTDEF
+DESCRIPTOR.message_types_by_name['FieldDef'] = _FIELDDEF
+DESCRIPTOR.message_types_by_name['FieldOptions'] = _FIELDOPTIONS
+DESCRIPTOR.message_types_by_name['ApprovalDef'] = _APPROVALDEF
+DESCRIPTOR.message_types_by_name['Config'] = _CONFIG
+DESCRIPTOR.message_types_by_name['PresentationConfig'] = _PRESENTATIONCONFIG
+DESCRIPTOR.message_types_by_name['TemplateDef'] = _TEMPLATEDEF
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+Project = _reflection.GeneratedProtocolMessageType('Project', (_message.Message,), dict(
+  DESCRIPTOR = _PROJECT,
+  __module__ = 'api.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.Project)
+  ))
+_sym_db.RegisterMessage(Project)
+
+StatusDef = _reflection.GeneratedProtocolMessageType('StatusDef', (_message.Message,), dict(
+  DESCRIPTOR = _STATUSDEF,
+  __module__ = 'api.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.StatusDef)
+  ))
+_sym_db.RegisterMessage(StatusDef)
+
+LabelDef = _reflection.GeneratedProtocolMessageType('LabelDef', (_message.Message,), dict(
+  DESCRIPTOR = _LABELDEF,
+  __module__ = 'api.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.LabelDef)
+  ))
+_sym_db.RegisterMessage(LabelDef)
+
+ComponentDef = _reflection.GeneratedProtocolMessageType('ComponentDef', (_message.Message,), dict(
+  DESCRIPTOR = _COMPONENTDEF,
+  __module__ = 'api.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ComponentDef)
+  ))
+_sym_db.RegisterMessage(ComponentDef)
+
+FieldDef = _reflection.GeneratedProtocolMessageType('FieldDef', (_message.Message,), dict(
+  DESCRIPTOR = _FIELDDEF,
+  __module__ = 'api.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.FieldDef)
+  ))
+_sym_db.RegisterMessage(FieldDef)
+
+FieldOptions = _reflection.GeneratedProtocolMessageType('FieldOptions', (_message.Message,), dict(
+  DESCRIPTOR = _FIELDOPTIONS,
+  __module__ = 'api.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.FieldOptions)
+  ))
+_sym_db.RegisterMessage(FieldOptions)
+
+ApprovalDef = _reflection.GeneratedProtocolMessageType('ApprovalDef', (_message.Message,), dict(
+  DESCRIPTOR = _APPROVALDEF,
+  __module__ = 'api.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ApprovalDef)
+  ))
+_sym_db.RegisterMessage(ApprovalDef)
+
+Config = _reflection.GeneratedProtocolMessageType('Config', (_message.Message,), dict(
+  DESCRIPTOR = _CONFIG,
+  __module__ = 'api.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.Config)
+  ))
+_sym_db.RegisterMessage(Config)
+
+PresentationConfig = _reflection.GeneratedProtocolMessageType('PresentationConfig', (_message.Message,), dict(
+  DESCRIPTOR = _PRESENTATIONCONFIG,
+  __module__ = 'api.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.PresentationConfig)
+  ))
+_sym_db.RegisterMessage(PresentationConfig)
+
+TemplateDef = _reflection.GeneratedProtocolMessageType('TemplateDef', (_message.Message,), dict(
+  DESCRIPTOR = _TEMPLATEDEF,
+  __module__ = 'api.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.TemplateDef)
+  ))
+_sym_db.RegisterMessage(TemplateDef)
+
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/api_proto/projects.proto b/api/api_proto/projects.proto
new file mode 100644
index 0000000..bcd1167
--- /dev/null
+++ b/api/api_proto/projects.proto
@@ -0,0 +1,211 @@
+// Copyright 2018 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
+
+syntax = "proto3";
+
+
+package monorail;
+
+import "api/api_proto/common.proto";
+import "api/api_proto/project_objects.proto";
+
+
+service Projects {
+  rpc ListProjects (ListProjectsRequest) returns (ListProjectsResponse) {}
+  rpc ListProjectTemplates (ListProjectTemplatesRequest) returns (ListProjectTemplatesResponse) {}
+  rpc GetConfig (GetConfigRequest) returns (Config) {}
+  rpc GetPresentationConfig (GetPresentationConfigRequest) returns (PresentationConfig) {}
+  rpc GetCustomPermissions (GetCustomPermissionsRequest) returns (GetCustomPermissionsResponse) {}
+  rpc GetVisibleMembers (GetVisibleMembersRequest) returns (GetVisibleMembersResponse) {}
+  rpc GetLabelOptions (GetLabelOptionsRequest) returns (GetLabelOptionsResponse) {}
+  rpc ListStatuses (ListStatusesRequest) returns (ListStatusesResponse) {}
+  rpc ListComponents (ListComponentsRequest) returns (ListComponentsResponse) {}
+  rpc ListFields (ListFieldsRequest) returns (ListFieldsResponse) {}
+  rpc GetProjectStarCount (GetProjectStarCountRequest) returns (GetProjectStarCountResponse) {}
+  rpc StarProject (StarProjectRequest) returns (StarProjectResponse) {}
+  rpc CheckProjectName (CheckProjectNameRequest) returns (CheckProjectNameResponse) {}
+  rpc CheckComponentName (CheckComponentNameRequest) returns (CheckComponentNameResponse) {}
+  rpc CheckFieldName (CheckFieldNameRequest) returns (CheckFieldNameResponse) {}
+}
+
+
+// Next available tag: 3
+message ListProjectsRequest {
+  int32 page_size = 1;
+  string page_token = 2;
+}
+
+
+// Next available tag: 3
+message ListProjectsResponse {
+  repeated Project projects = 1;
+  string next_page_token = 2;
+}
+
+
+// Next available tag: 3
+message ListProjectTemplatesRequest {
+  string project_name = 2;
+}
+
+
+// Next available tag: 2
+message ListProjectTemplatesResponse {
+  repeated TemplateDef templates = 1;
+}
+
+
+// Next available tag: 3
+message GetConfigRequest {
+  string project_name = 2;
+}
+
+// Next available tag: 3
+message GetPresentationConfigRequest {
+  string project_name = 2;
+}
+
+
+// Next available tag: 3
+message GetCustomPermissionsRequest {
+  string project_name = 2;
+}
+
+
+// Next available tag: 2
+message GetCustomPermissionsResponse {
+  repeated string permissions = 1;
+}
+
+
+// Next available tag: 3
+message GetVisibleMembersRequest {
+  string project_name = 2;
+}
+
+
+// Next available tag: 3
+message GetVisibleMembersResponse {
+  repeated UserRef user_refs = 1;
+  repeated UserRef group_refs = 2;
+}
+
+
+// Next available tag: 3
+message GetLabelOptionsRequest {
+  string project_name = 2;
+}
+
+
+// Next available tag: 3
+message GetLabelOptionsResponse {
+  repeated LabelDef label_options = 1;
+  repeated string exclusive_label_prefixes = 2;
+}
+
+
+// Next available tag: 3
+message ListStatusesRequest {
+  string project_name = 2;
+}
+
+
+// Next available tag: 4
+message ListStatusesResponse {
+  repeated StatusDef status_defs = 1;
+  repeated StatusRef statuses_offer_merge = 2;
+  bool restrict_to_known = 3;
+}
+
+
+// Next available tag: 4
+message ListComponentsRequest {
+  string project_name = 2;
+  bool include_admin_info = 3;
+}
+
+
+// Next available tag: 2
+message ListComponentsResponse {
+  repeated ComponentDef component_defs = 1;
+}
+
+
+// Next available tag: 5
+message ListFieldsRequest {
+  string project_name = 2;
+  bool include_admin_info = 3;
+  bool include_user_choices = 4;
+}
+
+
+// Next available tag: 2
+message ListFieldsResponse {
+  repeated FieldDef field_defs = 1;
+}
+
+
+// Next available tag: 3
+message GetProjectStarCountRequest {
+  string project_name = 2;
+}
+
+
+// Next available tag: 2
+message GetProjectStarCountResponse {
+  uint32 star_count = 1;
+}
+
+
+// Next available tag: 3
+message StarProjectRequest {
+  string project_name = 2;
+  bool starred = 3;
+}
+
+
+// Next available tag: 2
+message StarProjectResponse {
+  uint32 star_count = 1;
+}
+
+
+// Next available tag: 3
+message CheckProjectNameRequest {
+  string project_name = 2;
+}
+
+
+// Next available tag: 1
+message CheckProjectNameResponse {
+  string error = 1;
+}
+
+
+// Next available tag: 5
+message CheckComponentNameRequest {
+  string project_name = 2;
+  string parent_path = 3;
+  string component_name = 4;
+}
+
+
+// Next available tag: 2
+message CheckComponentNameResponse {
+  string error = 1;
+}
+
+
+// Next available tag: 4
+message CheckFieldNameRequest {
+  string project_name = 2;
+  string field_name = 3;
+}
+
+
+// Next available tag: 2
+message CheckFieldNameResponse {
+  string error = 1;
+}
diff --git a/api/api_proto/projects_pb2.py b/api/api_proto/projects_pb2.py
new file mode 100644
index 0000000..fa8a3fc
--- /dev/null
+++ b/api/api_proto/projects_pb2.py
@@ -0,0 +1,1375 @@
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/api_proto/projects.proto
+
+import sys
+_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from api.api_proto import common_pb2 as api_dot_api__proto_dot_common__pb2
+from api.api_proto import project_objects_pb2 as api_dot_api__proto_dot_project__objects__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/api_proto/projects.proto',
+  package='monorail',
+  syntax='proto3',
+  serialized_options=None,
+  serialized_pb=_b('\n\x1c\x61pi/api_proto/projects.proto\x12\x08monorail\x1a\x1a\x61pi/api_proto/common.proto\x1a#api/api_proto/project_objects.proto\"<\n\x13ListProjectsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\"T\n\x14ListProjectsResponse\x12#\n\x08projects\x18\x01 \x03(\x0b\x32\x11.monorail.Project\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"3\n\x1bListProjectTemplatesRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\"H\n\x1cListProjectTemplatesResponse\x12(\n\ttemplates\x18\x01 \x03(\x0b\x32\x15.monorail.TemplateDef\"(\n\x10GetConfigRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\"4\n\x1cGetPresentationConfigRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\"3\n\x1bGetCustomPermissionsRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\"3\n\x1cGetCustomPermissionsResponse\x12\x13\n\x0bpermissions\x18\x01 \x03(\t\"0\n\x18GetVisibleMembersRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\"h\n\x19GetVisibleMembersResponse\x12$\n\tuser_refs\x18\x01 \x03(\x0b\x32\x11.monorail.UserRef\x12%\n\ngroup_refs\x18\x02 \x03(\x0b\x32\x11.monorail.UserRef\".\n\x16GetLabelOptionsRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\"f\n\x17GetLabelOptionsResponse\x12)\n\rlabel_options\x18\x01 \x03(\x0b\x32\x12.monorail.LabelDef\x12 \n\x18\x65xclusive_label_prefixes\x18\x02 \x03(\t\"+\n\x13ListStatusesRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\"\x8e\x01\n\x14ListStatusesResponse\x12(\n\x0bstatus_defs\x18\x01 \x03(\x0b\x32\x13.monorail.StatusDef\x12\x31\n\x14statuses_offer_merge\x18\x02 \x03(\x0b\x32\x13.monorail.StatusRef\x12\x19\n\x11restrict_to_known\x18\x03 \x01(\x08\"I\n\x15ListComponentsRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\x12\x1a\n\x12include_admin_info\x18\x03 \x01(\x08\"H\n\x16ListComponentsResponse\x12.\n\x0e\x63omponent_defs\x18\x01 \x03(\x0b\x32\x16.monorail.ComponentDef\"c\n\x11ListFieldsRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\x12\x1a\n\x12include_admin_info\x18\x03 \x01(\x08\x12\x1c\n\x14include_user_choices\x18\x04 \x01(\x08\"<\n\x12ListFieldsResponse\x12&\n\nfield_defs\x18\x01 \x03(\x0b\x32\x12.monorail.FieldDef\"2\n\x1aGetProjectStarCountRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\"1\n\x1bGetProjectStarCountResponse\x12\x12\n\nstar_count\x18\x01 \x01(\r\";\n\x12StarProjectRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\x12\x0f\n\x07starred\x18\x03 \x01(\x08\")\n\x13StarProjectResponse\x12\x12\n\nstar_count\x18\x01 \x01(\r\"/\n\x17\x43heckProjectNameRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\")\n\x18\x43heckProjectNameResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\"^\n\x19\x43heckComponentNameRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\x12\x13\n\x0bparent_path\x18\x03 \x01(\t\x12\x16\n\x0e\x63omponent_name\x18\x04 \x01(\t\"+\n\x1a\x43heckComponentNameResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t\"A\n\x15\x43heckFieldNameRequest\x12\x14\n\x0cproject_name\x18\x02 \x01(\t\x12\x12\n\nfield_name\x18\x03 \x01(\t\"\'\n\x16\x43heckFieldNameResponse\x12\r\n\x05\x65rror\x18\x01 \x01(\t2\xc3\n\n\x08Projects\x12O\n\x0cListProjects\x12\x1d.monorail.ListProjectsRequest\x1a\x1e.monorail.ListProjectsResponse\"\x00\x12g\n\x14ListProjectTemplates\x12%.monorail.ListProjectTemplatesRequest\x1a&.monorail.ListProjectTemplatesResponse\"\x00\x12;\n\tGetConfig\x12\x1a.monorail.GetConfigRequest\x1a\x10.monorail.Config\"\x00\x12_\n\x15GetPresentationConfig\x12&.monorail.GetPresentationConfigRequest\x1a\x1c.monorail.PresentationConfig\"\x00\x12g\n\x14GetCustomPermissions\x12%.monorail.GetCustomPermissionsRequest\x1a&.monorail.GetCustomPermissionsResponse\"\x00\x12^\n\x11GetVisibleMembers\x12\".monorail.GetVisibleMembersRequest\x1a#.monorail.GetVisibleMembersResponse\"\x00\x12X\n\x0fGetLabelOptions\x12 .monorail.GetLabelOptionsRequest\x1a!.monorail.GetLabelOptionsResponse\"\x00\x12O\n\x0cListStatuses\x12\x1d.monorail.ListStatusesRequest\x1a\x1e.monorail.ListStatusesResponse\"\x00\x12U\n\x0eListComponents\x12\x1f.monorail.ListComponentsRequest\x1a .monorail.ListComponentsResponse\"\x00\x12I\n\nListFields\x12\x1b.monorail.ListFieldsRequest\x1a\x1c.monorail.ListFieldsResponse\"\x00\x12\x64\n\x13GetProjectStarCount\x12$.monorail.GetProjectStarCountRequest\x1a%.monorail.GetProjectStarCountResponse\"\x00\x12L\n\x0bStarProject\x12\x1c.monorail.StarProjectRequest\x1a\x1d.monorail.StarProjectResponse\"\x00\x12[\n\x10\x43heckProjectName\x12!.monorail.CheckProjectNameRequest\x1a\".monorail.CheckProjectNameResponse\"\x00\x12\x61\n\x12\x43heckComponentName\x12#.monorail.CheckComponentNameRequest\x1a$.monorail.CheckComponentNameResponse\"\x00\x12U\n\x0e\x43heckFieldName\x12\x1f.monorail.CheckFieldNameRequest\x1a .monorail.CheckFieldNameResponse\"\x00\x62\x06proto3')
+  ,
+  dependencies=[api_dot_api__proto_dot_common__pb2.DESCRIPTOR,api_dot_api__proto_dot_project__objects__pb2.DESCRIPTOR,])
+
+
+
+
+_LISTPROJECTSREQUEST = _descriptor.Descriptor(
+  name='ListProjectsRequest',
+  full_name='monorail.ListProjectsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='page_size', full_name='monorail.ListProjectsRequest.page_size', index=0,
+      number=1, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='page_token', full_name='monorail.ListProjectsRequest.page_token', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=107,
+  serialized_end=167,
+)
+
+
+_LISTPROJECTSRESPONSE = _descriptor.Descriptor(
+  name='ListProjectsResponse',
+  full_name='monorail.ListProjectsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='projects', full_name='monorail.ListProjectsResponse.projects', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='next_page_token', full_name='monorail.ListProjectsResponse.next_page_token', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=169,
+  serialized_end=253,
+)
+
+
+_LISTPROJECTTEMPLATESREQUEST = _descriptor.Descriptor(
+  name='ListProjectTemplatesRequest',
+  full_name='monorail.ListProjectTemplatesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.ListProjectTemplatesRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=255,
+  serialized_end=306,
+)
+
+
+_LISTPROJECTTEMPLATESRESPONSE = _descriptor.Descriptor(
+  name='ListProjectTemplatesResponse',
+  full_name='monorail.ListProjectTemplatesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='templates', full_name='monorail.ListProjectTemplatesResponse.templates', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=308,
+  serialized_end=380,
+)
+
+
+_GETCONFIGREQUEST = _descriptor.Descriptor(
+  name='GetConfigRequest',
+  full_name='monorail.GetConfigRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.GetConfigRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=382,
+  serialized_end=422,
+)
+
+
+_GETPRESENTATIONCONFIGREQUEST = _descriptor.Descriptor(
+  name='GetPresentationConfigRequest',
+  full_name='monorail.GetPresentationConfigRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.GetPresentationConfigRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=424,
+  serialized_end=476,
+)
+
+
+_GETCUSTOMPERMISSIONSREQUEST = _descriptor.Descriptor(
+  name='GetCustomPermissionsRequest',
+  full_name='monorail.GetCustomPermissionsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.GetCustomPermissionsRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=478,
+  serialized_end=529,
+)
+
+
+_GETCUSTOMPERMISSIONSRESPONSE = _descriptor.Descriptor(
+  name='GetCustomPermissionsResponse',
+  full_name='monorail.GetCustomPermissionsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='permissions', full_name='monorail.GetCustomPermissionsResponse.permissions', index=0,
+      number=1, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=531,
+  serialized_end=582,
+)
+
+
+_GETVISIBLEMEMBERSREQUEST = _descriptor.Descriptor(
+  name='GetVisibleMembersRequest',
+  full_name='monorail.GetVisibleMembersRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.GetVisibleMembersRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=584,
+  serialized_end=632,
+)
+
+
+_GETVISIBLEMEMBERSRESPONSE = _descriptor.Descriptor(
+  name='GetVisibleMembersResponse',
+  full_name='monorail.GetVisibleMembersResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user_refs', full_name='monorail.GetVisibleMembersResponse.user_refs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='group_refs', full_name='monorail.GetVisibleMembersResponse.group_refs', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=634,
+  serialized_end=738,
+)
+
+
+_GETLABELOPTIONSREQUEST = _descriptor.Descriptor(
+  name='GetLabelOptionsRequest',
+  full_name='monorail.GetLabelOptionsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.GetLabelOptionsRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=740,
+  serialized_end=786,
+)
+
+
+_GETLABELOPTIONSRESPONSE = _descriptor.Descriptor(
+  name='GetLabelOptionsResponse',
+  full_name='monorail.GetLabelOptionsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='label_options', full_name='monorail.GetLabelOptionsResponse.label_options', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='exclusive_label_prefixes', full_name='monorail.GetLabelOptionsResponse.exclusive_label_prefixes', index=1,
+      number=2, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=788,
+  serialized_end=890,
+)
+
+
+_LISTSTATUSESREQUEST = _descriptor.Descriptor(
+  name='ListStatusesRequest',
+  full_name='monorail.ListStatusesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.ListStatusesRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=892,
+  serialized_end=935,
+)
+
+
+_LISTSTATUSESRESPONSE = _descriptor.Descriptor(
+  name='ListStatusesResponse',
+  full_name='monorail.ListStatusesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='status_defs', full_name='monorail.ListStatusesResponse.status_defs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='statuses_offer_merge', full_name='monorail.ListStatusesResponse.statuses_offer_merge', index=1,
+      number=2, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='restrict_to_known', full_name='monorail.ListStatusesResponse.restrict_to_known', index=2,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=938,
+  serialized_end=1080,
+)
+
+
+_LISTCOMPONENTSREQUEST = _descriptor.Descriptor(
+  name='ListComponentsRequest',
+  full_name='monorail.ListComponentsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.ListComponentsRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='include_admin_info', full_name='monorail.ListComponentsRequest.include_admin_info', index=1,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1082,
+  serialized_end=1155,
+)
+
+
+_LISTCOMPONENTSRESPONSE = _descriptor.Descriptor(
+  name='ListComponentsResponse',
+  full_name='monorail.ListComponentsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='component_defs', full_name='monorail.ListComponentsResponse.component_defs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1157,
+  serialized_end=1229,
+)
+
+
+_LISTFIELDSREQUEST = _descriptor.Descriptor(
+  name='ListFieldsRequest',
+  full_name='monorail.ListFieldsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.ListFieldsRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='include_admin_info', full_name='monorail.ListFieldsRequest.include_admin_info', index=1,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='include_user_choices', full_name='monorail.ListFieldsRequest.include_user_choices', index=2,
+      number=4, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1231,
+  serialized_end=1330,
+)
+
+
+_LISTFIELDSRESPONSE = _descriptor.Descriptor(
+  name='ListFieldsResponse',
+  full_name='monorail.ListFieldsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='field_defs', full_name='monorail.ListFieldsResponse.field_defs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1332,
+  serialized_end=1392,
+)
+
+
+_GETPROJECTSTARCOUNTREQUEST = _descriptor.Descriptor(
+  name='GetProjectStarCountRequest',
+  full_name='monorail.GetProjectStarCountRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.GetProjectStarCountRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1394,
+  serialized_end=1444,
+)
+
+
+_GETPROJECTSTARCOUNTRESPONSE = _descriptor.Descriptor(
+  name='GetProjectStarCountResponse',
+  full_name='monorail.GetProjectStarCountResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='star_count', full_name='monorail.GetProjectStarCountResponse.star_count', index=0,
+      number=1, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1446,
+  serialized_end=1495,
+)
+
+
+_STARPROJECTREQUEST = _descriptor.Descriptor(
+  name='StarProjectRequest',
+  full_name='monorail.StarProjectRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.StarProjectRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='starred', full_name='monorail.StarProjectRequest.starred', index=1,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1497,
+  serialized_end=1556,
+)
+
+
+_STARPROJECTRESPONSE = _descriptor.Descriptor(
+  name='StarProjectResponse',
+  full_name='monorail.StarProjectResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='star_count', full_name='monorail.StarProjectResponse.star_count', index=0,
+      number=1, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1558,
+  serialized_end=1599,
+)
+
+
+_CHECKPROJECTNAMEREQUEST = _descriptor.Descriptor(
+  name='CheckProjectNameRequest',
+  full_name='monorail.CheckProjectNameRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.CheckProjectNameRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1601,
+  serialized_end=1648,
+)
+
+
+_CHECKPROJECTNAMERESPONSE = _descriptor.Descriptor(
+  name='CheckProjectNameResponse',
+  full_name='monorail.CheckProjectNameResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='error', full_name='monorail.CheckProjectNameResponse.error', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1650,
+  serialized_end=1691,
+)
+
+
+_CHECKCOMPONENTNAMEREQUEST = _descriptor.Descriptor(
+  name='CheckComponentNameRequest',
+  full_name='monorail.CheckComponentNameRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.CheckComponentNameRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='parent_path', full_name='monorail.CheckComponentNameRequest.parent_path', index=1,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='component_name', full_name='monorail.CheckComponentNameRequest.component_name', index=2,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1693,
+  serialized_end=1787,
+)
+
+
+_CHECKCOMPONENTNAMERESPONSE = _descriptor.Descriptor(
+  name='CheckComponentNameResponse',
+  full_name='monorail.CheckComponentNameResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='error', full_name='monorail.CheckComponentNameResponse.error', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1789,
+  serialized_end=1832,
+)
+
+
+_CHECKFIELDNAMEREQUEST = _descriptor.Descriptor(
+  name='CheckFieldNameRequest',
+  full_name='monorail.CheckFieldNameRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_name', full_name='monorail.CheckFieldNameRequest.project_name', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='field_name', full_name='monorail.CheckFieldNameRequest.field_name', index=1,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1834,
+  serialized_end=1899,
+)
+
+
+_CHECKFIELDNAMERESPONSE = _descriptor.Descriptor(
+  name='CheckFieldNameResponse',
+  full_name='monorail.CheckFieldNameResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='error', full_name='monorail.CheckFieldNameResponse.error', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1901,
+  serialized_end=1940,
+)
+
+_LISTPROJECTSRESPONSE.fields_by_name['projects'].message_type = api_dot_api__proto_dot_project__objects__pb2._PROJECT
+_LISTPROJECTTEMPLATESRESPONSE.fields_by_name['templates'].message_type = api_dot_api__proto_dot_project__objects__pb2._TEMPLATEDEF
+_GETVISIBLEMEMBERSRESPONSE.fields_by_name['user_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_GETVISIBLEMEMBERSRESPONSE.fields_by_name['group_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_GETLABELOPTIONSRESPONSE.fields_by_name['label_options'].message_type = api_dot_api__proto_dot_project__objects__pb2._LABELDEF
+_LISTSTATUSESRESPONSE.fields_by_name['status_defs'].message_type = api_dot_api__proto_dot_project__objects__pb2._STATUSDEF
+_LISTSTATUSESRESPONSE.fields_by_name['statuses_offer_merge'].message_type = api_dot_api__proto_dot_common__pb2._STATUSREF
+_LISTCOMPONENTSRESPONSE.fields_by_name['component_defs'].message_type = api_dot_api__proto_dot_project__objects__pb2._COMPONENTDEF
+_LISTFIELDSRESPONSE.fields_by_name['field_defs'].message_type = api_dot_api__proto_dot_project__objects__pb2._FIELDDEF
+DESCRIPTOR.message_types_by_name['ListProjectsRequest'] = _LISTPROJECTSREQUEST
+DESCRIPTOR.message_types_by_name['ListProjectsResponse'] = _LISTPROJECTSRESPONSE
+DESCRIPTOR.message_types_by_name['ListProjectTemplatesRequest'] = _LISTPROJECTTEMPLATESREQUEST
+DESCRIPTOR.message_types_by_name['ListProjectTemplatesResponse'] = _LISTPROJECTTEMPLATESRESPONSE
+DESCRIPTOR.message_types_by_name['GetConfigRequest'] = _GETCONFIGREQUEST
+DESCRIPTOR.message_types_by_name['GetPresentationConfigRequest'] = _GETPRESENTATIONCONFIGREQUEST
+DESCRIPTOR.message_types_by_name['GetCustomPermissionsRequest'] = _GETCUSTOMPERMISSIONSREQUEST
+DESCRIPTOR.message_types_by_name['GetCustomPermissionsResponse'] = _GETCUSTOMPERMISSIONSRESPONSE
+DESCRIPTOR.message_types_by_name['GetVisibleMembersRequest'] = _GETVISIBLEMEMBERSREQUEST
+DESCRIPTOR.message_types_by_name['GetVisibleMembersResponse'] = _GETVISIBLEMEMBERSRESPONSE
+DESCRIPTOR.message_types_by_name['GetLabelOptionsRequest'] = _GETLABELOPTIONSREQUEST
+DESCRIPTOR.message_types_by_name['GetLabelOptionsResponse'] = _GETLABELOPTIONSRESPONSE
+DESCRIPTOR.message_types_by_name['ListStatusesRequest'] = _LISTSTATUSESREQUEST
+DESCRIPTOR.message_types_by_name['ListStatusesResponse'] = _LISTSTATUSESRESPONSE
+DESCRIPTOR.message_types_by_name['ListComponentsRequest'] = _LISTCOMPONENTSREQUEST
+DESCRIPTOR.message_types_by_name['ListComponentsResponse'] = _LISTCOMPONENTSRESPONSE
+DESCRIPTOR.message_types_by_name['ListFieldsRequest'] = _LISTFIELDSREQUEST
+DESCRIPTOR.message_types_by_name['ListFieldsResponse'] = _LISTFIELDSRESPONSE
+DESCRIPTOR.message_types_by_name['GetProjectStarCountRequest'] = _GETPROJECTSTARCOUNTREQUEST
+DESCRIPTOR.message_types_by_name['GetProjectStarCountResponse'] = _GETPROJECTSTARCOUNTRESPONSE
+DESCRIPTOR.message_types_by_name['StarProjectRequest'] = _STARPROJECTREQUEST
+DESCRIPTOR.message_types_by_name['StarProjectResponse'] = _STARPROJECTRESPONSE
+DESCRIPTOR.message_types_by_name['CheckProjectNameRequest'] = _CHECKPROJECTNAMEREQUEST
+DESCRIPTOR.message_types_by_name['CheckProjectNameResponse'] = _CHECKPROJECTNAMERESPONSE
+DESCRIPTOR.message_types_by_name['CheckComponentNameRequest'] = _CHECKCOMPONENTNAMEREQUEST
+DESCRIPTOR.message_types_by_name['CheckComponentNameResponse'] = _CHECKCOMPONENTNAMERESPONSE
+DESCRIPTOR.message_types_by_name['CheckFieldNameRequest'] = _CHECKFIELDNAMEREQUEST
+DESCRIPTOR.message_types_by_name['CheckFieldNameResponse'] = _CHECKFIELDNAMERESPONSE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+ListProjectsRequest = _reflection.GeneratedProtocolMessageType('ListProjectsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTPROJECTSREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListProjectsRequest)
+  ))
+_sym_db.RegisterMessage(ListProjectsRequest)
+
+ListProjectsResponse = _reflection.GeneratedProtocolMessageType('ListProjectsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTPROJECTSRESPONSE,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListProjectsResponse)
+  ))
+_sym_db.RegisterMessage(ListProjectsResponse)
+
+ListProjectTemplatesRequest = _reflection.GeneratedProtocolMessageType('ListProjectTemplatesRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTPROJECTTEMPLATESREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListProjectTemplatesRequest)
+  ))
+_sym_db.RegisterMessage(ListProjectTemplatesRequest)
+
+ListProjectTemplatesResponse = _reflection.GeneratedProtocolMessageType('ListProjectTemplatesResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTPROJECTTEMPLATESRESPONSE,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListProjectTemplatesResponse)
+  ))
+_sym_db.RegisterMessage(ListProjectTemplatesResponse)
+
+GetConfigRequest = _reflection.GeneratedProtocolMessageType('GetConfigRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETCONFIGREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetConfigRequest)
+  ))
+_sym_db.RegisterMessage(GetConfigRequest)
+
+GetPresentationConfigRequest = _reflection.GeneratedProtocolMessageType('GetPresentationConfigRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETPRESENTATIONCONFIGREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetPresentationConfigRequest)
+  ))
+_sym_db.RegisterMessage(GetPresentationConfigRequest)
+
+GetCustomPermissionsRequest = _reflection.GeneratedProtocolMessageType('GetCustomPermissionsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETCUSTOMPERMISSIONSREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetCustomPermissionsRequest)
+  ))
+_sym_db.RegisterMessage(GetCustomPermissionsRequest)
+
+GetCustomPermissionsResponse = _reflection.GeneratedProtocolMessageType('GetCustomPermissionsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _GETCUSTOMPERMISSIONSRESPONSE,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetCustomPermissionsResponse)
+  ))
+_sym_db.RegisterMessage(GetCustomPermissionsResponse)
+
+GetVisibleMembersRequest = _reflection.GeneratedProtocolMessageType('GetVisibleMembersRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETVISIBLEMEMBERSREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetVisibleMembersRequest)
+  ))
+_sym_db.RegisterMessage(GetVisibleMembersRequest)
+
+GetVisibleMembersResponse = _reflection.GeneratedProtocolMessageType('GetVisibleMembersResponse', (_message.Message,), dict(
+  DESCRIPTOR = _GETVISIBLEMEMBERSRESPONSE,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetVisibleMembersResponse)
+  ))
+_sym_db.RegisterMessage(GetVisibleMembersResponse)
+
+GetLabelOptionsRequest = _reflection.GeneratedProtocolMessageType('GetLabelOptionsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETLABELOPTIONSREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetLabelOptionsRequest)
+  ))
+_sym_db.RegisterMessage(GetLabelOptionsRequest)
+
+GetLabelOptionsResponse = _reflection.GeneratedProtocolMessageType('GetLabelOptionsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _GETLABELOPTIONSRESPONSE,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetLabelOptionsResponse)
+  ))
+_sym_db.RegisterMessage(GetLabelOptionsResponse)
+
+ListStatusesRequest = _reflection.GeneratedProtocolMessageType('ListStatusesRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTSTATUSESREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListStatusesRequest)
+  ))
+_sym_db.RegisterMessage(ListStatusesRequest)
+
+ListStatusesResponse = _reflection.GeneratedProtocolMessageType('ListStatusesResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTSTATUSESRESPONSE,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListStatusesResponse)
+  ))
+_sym_db.RegisterMessage(ListStatusesResponse)
+
+ListComponentsRequest = _reflection.GeneratedProtocolMessageType('ListComponentsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTCOMPONENTSREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListComponentsRequest)
+  ))
+_sym_db.RegisterMessage(ListComponentsRequest)
+
+ListComponentsResponse = _reflection.GeneratedProtocolMessageType('ListComponentsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTCOMPONENTSRESPONSE,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListComponentsResponse)
+  ))
+_sym_db.RegisterMessage(ListComponentsResponse)
+
+ListFieldsRequest = _reflection.GeneratedProtocolMessageType('ListFieldsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTFIELDSREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListFieldsRequest)
+  ))
+_sym_db.RegisterMessage(ListFieldsRequest)
+
+ListFieldsResponse = _reflection.GeneratedProtocolMessageType('ListFieldsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTFIELDSRESPONSE,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListFieldsResponse)
+  ))
+_sym_db.RegisterMessage(ListFieldsResponse)
+
+GetProjectStarCountRequest = _reflection.GeneratedProtocolMessageType('GetProjectStarCountRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETPROJECTSTARCOUNTREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetProjectStarCountRequest)
+  ))
+_sym_db.RegisterMessage(GetProjectStarCountRequest)
+
+GetProjectStarCountResponse = _reflection.GeneratedProtocolMessageType('GetProjectStarCountResponse', (_message.Message,), dict(
+  DESCRIPTOR = _GETPROJECTSTARCOUNTRESPONSE,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetProjectStarCountResponse)
+  ))
+_sym_db.RegisterMessage(GetProjectStarCountResponse)
+
+StarProjectRequest = _reflection.GeneratedProtocolMessageType('StarProjectRequest', (_message.Message,), dict(
+  DESCRIPTOR = _STARPROJECTREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.StarProjectRequest)
+  ))
+_sym_db.RegisterMessage(StarProjectRequest)
+
+StarProjectResponse = _reflection.GeneratedProtocolMessageType('StarProjectResponse', (_message.Message,), dict(
+  DESCRIPTOR = _STARPROJECTRESPONSE,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.StarProjectResponse)
+  ))
+_sym_db.RegisterMessage(StarProjectResponse)
+
+CheckProjectNameRequest = _reflection.GeneratedProtocolMessageType('CheckProjectNameRequest', (_message.Message,), dict(
+  DESCRIPTOR = _CHECKPROJECTNAMEREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.CheckProjectNameRequest)
+  ))
+_sym_db.RegisterMessage(CheckProjectNameRequest)
+
+CheckProjectNameResponse = _reflection.GeneratedProtocolMessageType('CheckProjectNameResponse', (_message.Message,), dict(
+  DESCRIPTOR = _CHECKPROJECTNAMERESPONSE,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.CheckProjectNameResponse)
+  ))
+_sym_db.RegisterMessage(CheckProjectNameResponse)
+
+CheckComponentNameRequest = _reflection.GeneratedProtocolMessageType('CheckComponentNameRequest', (_message.Message,), dict(
+  DESCRIPTOR = _CHECKCOMPONENTNAMEREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.CheckComponentNameRequest)
+  ))
+_sym_db.RegisterMessage(CheckComponentNameRequest)
+
+CheckComponentNameResponse = _reflection.GeneratedProtocolMessageType('CheckComponentNameResponse', (_message.Message,), dict(
+  DESCRIPTOR = _CHECKCOMPONENTNAMERESPONSE,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.CheckComponentNameResponse)
+  ))
+_sym_db.RegisterMessage(CheckComponentNameResponse)
+
+CheckFieldNameRequest = _reflection.GeneratedProtocolMessageType('CheckFieldNameRequest', (_message.Message,), dict(
+  DESCRIPTOR = _CHECKFIELDNAMEREQUEST,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.CheckFieldNameRequest)
+  ))
+_sym_db.RegisterMessage(CheckFieldNameRequest)
+
+CheckFieldNameResponse = _reflection.GeneratedProtocolMessageType('CheckFieldNameResponse', (_message.Message,), dict(
+  DESCRIPTOR = _CHECKFIELDNAMERESPONSE,
+  __module__ = 'api.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.CheckFieldNameResponse)
+  ))
+_sym_db.RegisterMessage(CheckFieldNameResponse)
+
+
+
+_PROJECTS = _descriptor.ServiceDescriptor(
+  name='Projects',
+  full_name='monorail.Projects',
+  file=DESCRIPTOR,
+  index=0,
+  serialized_options=None,
+  serialized_start=1943,
+  serialized_end=3290,
+  methods=[
+  _descriptor.MethodDescriptor(
+    name='ListProjects',
+    full_name='monorail.Projects.ListProjects',
+    index=0,
+    containing_service=None,
+    input_type=_LISTPROJECTSREQUEST,
+    output_type=_LISTPROJECTSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListProjectTemplates',
+    full_name='monorail.Projects.ListProjectTemplates',
+    index=1,
+    containing_service=None,
+    input_type=_LISTPROJECTTEMPLATESREQUEST,
+    output_type=_LISTPROJECTTEMPLATESRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetConfig',
+    full_name='monorail.Projects.GetConfig',
+    index=2,
+    containing_service=None,
+    input_type=_GETCONFIGREQUEST,
+    output_type=api_dot_api__proto_dot_project__objects__pb2._CONFIG,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetPresentationConfig',
+    full_name='monorail.Projects.GetPresentationConfig',
+    index=3,
+    containing_service=None,
+    input_type=_GETPRESENTATIONCONFIGREQUEST,
+    output_type=api_dot_api__proto_dot_project__objects__pb2._PRESENTATIONCONFIG,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetCustomPermissions',
+    full_name='monorail.Projects.GetCustomPermissions',
+    index=4,
+    containing_service=None,
+    input_type=_GETCUSTOMPERMISSIONSREQUEST,
+    output_type=_GETCUSTOMPERMISSIONSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetVisibleMembers',
+    full_name='monorail.Projects.GetVisibleMembers',
+    index=5,
+    containing_service=None,
+    input_type=_GETVISIBLEMEMBERSREQUEST,
+    output_type=_GETVISIBLEMEMBERSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetLabelOptions',
+    full_name='monorail.Projects.GetLabelOptions',
+    index=6,
+    containing_service=None,
+    input_type=_GETLABELOPTIONSREQUEST,
+    output_type=_GETLABELOPTIONSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListStatuses',
+    full_name='monorail.Projects.ListStatuses',
+    index=7,
+    containing_service=None,
+    input_type=_LISTSTATUSESREQUEST,
+    output_type=_LISTSTATUSESRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListComponents',
+    full_name='monorail.Projects.ListComponents',
+    index=8,
+    containing_service=None,
+    input_type=_LISTCOMPONENTSREQUEST,
+    output_type=_LISTCOMPONENTSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListFields',
+    full_name='monorail.Projects.ListFields',
+    index=9,
+    containing_service=None,
+    input_type=_LISTFIELDSREQUEST,
+    output_type=_LISTFIELDSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetProjectStarCount',
+    full_name='monorail.Projects.GetProjectStarCount',
+    index=10,
+    containing_service=None,
+    input_type=_GETPROJECTSTARCOUNTREQUEST,
+    output_type=_GETPROJECTSTARCOUNTRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='StarProject',
+    full_name='monorail.Projects.StarProject',
+    index=11,
+    containing_service=None,
+    input_type=_STARPROJECTREQUEST,
+    output_type=_STARPROJECTRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='CheckProjectName',
+    full_name='monorail.Projects.CheckProjectName',
+    index=12,
+    containing_service=None,
+    input_type=_CHECKPROJECTNAMEREQUEST,
+    output_type=_CHECKPROJECTNAMERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='CheckComponentName',
+    full_name='monorail.Projects.CheckComponentName',
+    index=13,
+    containing_service=None,
+    input_type=_CHECKCOMPONENTNAMEREQUEST,
+    output_type=_CHECKCOMPONENTNAMERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='CheckFieldName',
+    full_name='monorail.Projects.CheckFieldName',
+    index=14,
+    containing_service=None,
+    input_type=_CHECKFIELDNAMEREQUEST,
+    output_type=_CHECKFIELDNAMERESPONSE,
+    serialized_options=None,
+  ),
+])
+_sym_db.RegisterServiceDescriptor(_PROJECTS)
+
+DESCRIPTOR.services_by_name['Projects'] = _PROJECTS
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/api_proto/projects_prpc_pb2.py b/api/api_proto/projects_prpc_pb2.py
new file mode 100644
index 0000000..fee63f3
--- /dev/null
+++ b/api/api_proto/projects_prpc_pb2.py
@@ -0,0 +1,313 @@
+# Generated by the pRPC protocol buffer compiler plugin.  DO NOT EDIT!
+# source: api/api_proto/projects.proto
+
+import base64
+import zlib
+
+from google.protobuf import descriptor_pb2
+
+# Includes description of the api/api_proto/projects.proto and all of its transitive
+# dependencies. Includes source code info.
+FILE_DESCRIPTOR_SET = descriptor_pb2.FileDescriptorSet()
+FILE_DESCRIPTOR_SET.ParseFromString(zlib.decompress(base64.b64decode(
+    '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'
+    'dZ5C+ki+emubbJz8bwoBFG4=')))
+_INDEX = {
+    f.name: {
+      'descriptor': f,
+      'services': {s.name: s for s in f.service},
+    }
+    for f in FILE_DESCRIPTOR_SET.file
+}
+
+
+ProjectsServiceDescription = {
+  'file_descriptor_set': FILE_DESCRIPTOR_SET,
+  'file_descriptor': _INDEX[u'api/api_proto/projects.proto']['descriptor'],
+  'service_descriptor': _INDEX[u'api/api_proto/projects.proto']['services'][u'Projects'],
+}
diff --git a/api/api_proto/sitewide.proto b/api/api_proto/sitewide.proto
new file mode 100644
index 0000000..f378ad5
--- /dev/null
+++ b/api/api_proto/sitewide.proto
@@ -0,0 +1,40 @@
+// Copyright 2018 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
+
+syntax = "proto3";
+
+package monorail;
+
+service Sitewide {
+  rpc RefreshToken (RefreshTokenRequest) returns (RefreshTokenResponse) {}
+  rpc GetServerStatus (GetServerStatusRequest) returns (GetServerStatusResponse) {}
+}
+
+
+// Next available tag: 4
+message RefreshTokenRequest {
+  string token = 2;
+  string token_path = 3;
+}
+
+
+// Next available tag: 3
+message RefreshTokenResponse {
+  string token = 1;
+  uint32 token_expires_sec = 2;
+}
+
+
+// Next available tag: 1
+message GetServerStatusRequest {
+}
+
+
+// Next available tag: 4
+message GetServerStatusResponse {
+  string banner_message = 1;
+  fixed32 banner_time = 2;
+  bool read_only = 3;
+}
diff --git a/api/api_proto/sitewide_pb2.py b/api/api_proto/sitewide_pb2.py
new file mode 100644
index 0000000..acb7e88
--- /dev/null
+++ b/api/api_proto/sitewide_pb2.py
@@ -0,0 +1,240 @@
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/api_proto/sitewide.proto
+
+import sys
+_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/api_proto/sitewide.proto',
+  package='monorail',
+  syntax='proto3',
+  serialized_options=None,
+  serialized_pb=_b('\n\x1c\x61pi/api_proto/sitewide.proto\x12\x08monorail\"8\n\x13RefreshTokenRequest\x12\r\n\x05token\x18\x02 \x01(\t\x12\x12\n\ntoken_path\x18\x03 \x01(\t\"@\n\x14RefreshTokenResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x19\n\x11token_expires_sec\x18\x02 \x01(\r\"\x18\n\x16GetServerStatusRequest\"Y\n\x17GetServerStatusResponse\x12\x16\n\x0e\x62\x61nner_message\x18\x01 \x01(\t\x12\x13\n\x0b\x62\x61nner_time\x18\x02 \x01(\x07\x12\x11\n\tread_only\x18\x03 \x01(\x08\x32\xb5\x01\n\x08Sitewide\x12O\n\x0cRefreshToken\x12\x1d.monorail.RefreshTokenRequest\x1a\x1e.monorail.RefreshTokenResponse\"\x00\x12X\n\x0fGetServerStatus\x12 .monorail.GetServerStatusRequest\x1a!.monorail.GetServerStatusResponse\"\x00\x62\x06proto3')
+)
+
+
+
+
+_REFRESHTOKENREQUEST = _descriptor.Descriptor(
+  name='RefreshTokenRequest',
+  full_name='monorail.RefreshTokenRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='token', full_name='monorail.RefreshTokenRequest.token', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='token_path', full_name='monorail.RefreshTokenRequest.token_path', index=1,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=42,
+  serialized_end=98,
+)
+
+
+_REFRESHTOKENRESPONSE = _descriptor.Descriptor(
+  name='RefreshTokenResponse',
+  full_name='monorail.RefreshTokenResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='token', full_name='monorail.RefreshTokenResponse.token', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='token_expires_sec', full_name='monorail.RefreshTokenResponse.token_expires_sec', index=1,
+      number=2, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=100,
+  serialized_end=164,
+)
+
+
+_GETSERVERSTATUSREQUEST = _descriptor.Descriptor(
+  name='GetServerStatusRequest',
+  full_name='monorail.GetServerStatusRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=166,
+  serialized_end=190,
+)
+
+
+_GETSERVERSTATUSRESPONSE = _descriptor.Descriptor(
+  name='GetServerStatusResponse',
+  full_name='monorail.GetServerStatusResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='banner_message', full_name='monorail.GetServerStatusResponse.banner_message', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='banner_time', full_name='monorail.GetServerStatusResponse.banner_time', index=1,
+      number=2, type=7, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='read_only', full_name='monorail.GetServerStatusResponse.read_only', index=2,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=192,
+  serialized_end=281,
+)
+
+DESCRIPTOR.message_types_by_name['RefreshTokenRequest'] = _REFRESHTOKENREQUEST
+DESCRIPTOR.message_types_by_name['RefreshTokenResponse'] = _REFRESHTOKENRESPONSE
+DESCRIPTOR.message_types_by_name['GetServerStatusRequest'] = _GETSERVERSTATUSREQUEST
+DESCRIPTOR.message_types_by_name['GetServerStatusResponse'] = _GETSERVERSTATUSRESPONSE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+RefreshTokenRequest = _reflection.GeneratedProtocolMessageType('RefreshTokenRequest', (_message.Message,), dict(
+  DESCRIPTOR = _REFRESHTOKENREQUEST,
+  __module__ = 'api.api_proto.sitewide_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.RefreshTokenRequest)
+  ))
+_sym_db.RegisterMessage(RefreshTokenRequest)
+
+RefreshTokenResponse = _reflection.GeneratedProtocolMessageType('RefreshTokenResponse', (_message.Message,), dict(
+  DESCRIPTOR = _REFRESHTOKENRESPONSE,
+  __module__ = 'api.api_proto.sitewide_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.RefreshTokenResponse)
+  ))
+_sym_db.RegisterMessage(RefreshTokenResponse)
+
+GetServerStatusRequest = _reflection.GeneratedProtocolMessageType('GetServerStatusRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETSERVERSTATUSREQUEST,
+  __module__ = 'api.api_proto.sitewide_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetServerStatusRequest)
+  ))
+_sym_db.RegisterMessage(GetServerStatusRequest)
+
+GetServerStatusResponse = _reflection.GeneratedProtocolMessageType('GetServerStatusResponse', (_message.Message,), dict(
+  DESCRIPTOR = _GETSERVERSTATUSRESPONSE,
+  __module__ = 'api.api_proto.sitewide_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetServerStatusResponse)
+  ))
+_sym_db.RegisterMessage(GetServerStatusResponse)
+
+
+
+_SITEWIDE = _descriptor.ServiceDescriptor(
+  name='Sitewide',
+  full_name='monorail.Sitewide',
+  file=DESCRIPTOR,
+  index=0,
+  serialized_options=None,
+  serialized_start=284,
+  serialized_end=465,
+  methods=[
+  _descriptor.MethodDescriptor(
+    name='RefreshToken',
+    full_name='monorail.Sitewide.RefreshToken',
+    index=0,
+    containing_service=None,
+    input_type=_REFRESHTOKENREQUEST,
+    output_type=_REFRESHTOKENRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetServerStatus',
+    full_name='monorail.Sitewide.GetServerStatus',
+    index=1,
+    containing_service=None,
+    input_type=_GETSERVERSTATUSREQUEST,
+    output_type=_GETSERVERSTATUSRESPONSE,
+    serialized_options=None,
+  ),
+])
+_sym_db.RegisterServiceDescriptor(_SITEWIDE)
+
+DESCRIPTOR.services_by_name['Sitewide'] = _SITEWIDE
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/api_proto/sitewide_prpc_pb2.py b/api/api_proto/sitewide_prpc_pb2.py
new file mode 100644
index 0000000..6d999b4
--- /dev/null
+++ b/api/api_proto/sitewide_prpc_pb2.py
@@ -0,0 +1,42 @@
+# Generated by the pRPC protocol buffer compiler plugin.  DO NOT EDIT!
+# source: api/api_proto/sitewide.proto
+
+import base64
+import zlib
+
+from google.protobuf import descriptor_pb2
+
+# Includes description of the api/api_proto/sitewide.proto and all of its transitive
+# dependencies. Includes source code info.
+FILE_DESCRIPTOR_SET = descriptor_pb2.FileDescriptorSet()
+FILE_DESCRIPTOR_SET.ParseFromString(zlib.decompress(base64.b64decode(
+    'eJx9lV1z2kYUhrUrgaUDTmCxg8BfGwxOpjOGxulFJnep63bqaeMOuDO5YwSsQRPQUmlx45v+pt'
+    '7017T3/Rs9u1olaRvnghm95+M9zzmCAf6swn60jgf4Ga9TqeQgi5X4NZ6JvpHMX8lEplG87FxC'
+    'YyhuUpEtruVbkQzFLxuRKbYDJaV1SDl5GgxzwQ4AzMN4HalF6JpUYCI/YaDzBnb+7ZWtZZKJD2'
+    'bkY7MvoJ6biXfrGJvGmZiacdvDhyZxkcdHYtoJ4dF3Qo1EeivSkYrUJrOgnd+g+b+MHduDB5Mo'
+    'SUQ6Xoksi+bCzt/Ooz/mQXYEFVum4pUwBFtDyEPXGGF7EKQimo1lsrwzS/tDXweuUJ/9QcAf2e'
+    'OyK6h+fAB20C/u3P/EkduH96XzBToOewMP/7Md4x+aPn2S9uPPVBTOl7/7UGZeyXlC4G8CpMrc'
+    'ksPO/iL8XK7v0ni+UPzsy2cv+PVC8PNFKlfxZsVfbdRCplmfv1ouuSnKOGLrCbM+8J8zweUNV4'
+    's445ncpFPBp3ImOMq5RIhEzPjkjkf869E3p5m6Wwrgy3gqkAibIsWnUcIngt/ITTLjcYJBwX/4'
+    '/vzi9eiC38RLdE95pIAvlFpnLweDmbgVS7kWiDSXcr4U/alcDTCQnObzB9Y+G0yyGYAPhDJ3y6'
+    '8BAC07zAucKsFnt+wQ5gYYr4BXdqjDXKCXUIWSFpjCWxUKDWDnSaFcVGff2jYsrNCRTRGtyruF'
+    'wrZK87RQ2FZ5cQXHQD2kqDkN0m7y1+Kd4tEtvrdogruqaP6SfwUaz9MMNX9Pz/EMXp02YBtKWn'
+    'jMq9PagbbWsqSTfqGwrx48KBSOrdeZdcEUo6F1IejCaL1hK0lJJwsXvQoL3ufQhT1qGnjCvKbT'
+    'vg/+eQ6v25v+vhlLNHxo4YmBD2nz0FgTAx/ascTAhxaeGPjQwhMN36JH1kXDt2jYsJUavvXeRU'
+    '9vBe1CoUvr4NDAU+YdOkf3wT/L4fWkQz9vcJl3jD+Yz78qFxuO/SPD6eptu3TfcLpm2y49fmxY'
+    'XLNt13K6Zttu0CwUcnbbe9YFUz3ati562x7t7ttKvW2PBoXSpbBbKHTphS3rgl/BE7prXSi6nN'
+    'Be21bSkk6WC4UuJ1u1QqHLSWNnUjb/Hc//AbuGQxI=')))
+_INDEX = {
+    f.name: {
+      'descriptor': f,
+      'services': {s.name: s for s in f.service},
+    }
+    for f in FILE_DESCRIPTOR_SET.file
+}
+
+
+SitewideServiceDescription = {
+  'file_descriptor_set': FILE_DESCRIPTOR_SET,
+  'file_descriptor': _INDEX[u'api/api_proto/sitewide.proto']['descriptor'],
+  'service_descriptor': _INDEX[u'api/api_proto/sitewide.proto']['services'][u'Sitewide'],
+}
diff --git a/api/api_proto/user_objects.proto b/api/api_proto/user_objects.proto
new file mode 100644
index 0000000..20f0eed
--- /dev/null
+++ b/api/api_proto/user_objects.proto
@@ -0,0 +1,42 @@
+// Copyright 2018 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
+
+// This file defines protobufs for issues and related business
+// objects, e.g., field values, comments, and attachments.
+
+syntax = "proto3";
+
+import "api/api_proto/common.proto";
+
+package monorail;
+
+// TODO(jojwang): monorail:1701, fill User with all info necessary for
+// creating a user profile page.
+// Next available tag: 7
+message User {
+  string display_name = 1;
+  int64 user_id = 2;
+  bool is_site_admin = 3;
+  string availability = 4;
+  UserRef linked_parent_ref = 5;
+  repeated UserRef linked_child_refs = 6;
+}
+
+
+// Next available tag: 3
+message UserPrefValue {
+  string name = 1;
+  string value = 2;
+}
+
+
+// Next available tag: 6
+message UserProjects {
+  UserRef user_ref = 1;
+  repeated string owner_of = 2;
+  repeated string member_of = 3;
+  repeated string contributor_to = 4;
+  repeated string starred_projects = 5;
+}
diff --git a/api/api_proto/user_objects_pb2.py b/api/api_proto/user_objects_pb2.py
new file mode 100644
index 0000000..c4e09f1
--- /dev/null
+++ b/api/api_proto/user_objects_pb2.py
@@ -0,0 +1,222 @@
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/api_proto/user_objects.proto
+
+import sys
+_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from api.api_proto import common_pb2 as api_dot_api__proto_dot_common__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/api_proto/user_objects.proto',
+  package='monorail',
+  syntax='proto3',
+  serialized_options=None,
+  serialized_pb=_b('\n api/api_proto/user_objects.proto\x12\x08monorail\x1a\x1a\x61pi/api_proto/common.proto\"\xb6\x01\n\x04User\x12\x14\n\x0c\x64isplay_name\x18\x01 \x01(\t\x12\x0f\n\x07user_id\x18\x02 \x01(\x03\x12\x15\n\ris_site_admin\x18\x03 \x01(\x08\x12\x14\n\x0c\x61vailability\x18\x04 \x01(\t\x12,\n\x11linked_parent_ref\x18\x05 \x01(\x0b\x32\x11.monorail.UserRef\x12,\n\x11linked_child_refs\x18\x06 \x03(\x0b\x32\x11.monorail.UserRef\",\n\rUserPrefValue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\"\x8a\x01\n\x0cUserProjects\x12#\n\x08user_ref\x18\x01 \x01(\x0b\x32\x11.monorail.UserRef\x12\x10\n\x08owner_of\x18\x02 \x03(\t\x12\x11\n\tmember_of\x18\x03 \x03(\t\x12\x16\n\x0e\x63ontributor_to\x18\x04 \x03(\t\x12\x18\n\x10starred_projects\x18\x05 \x03(\tb\x06proto3')
+  ,
+  dependencies=[api_dot_api__proto_dot_common__pb2.DESCRIPTOR,])
+
+
+
+
+_USER = _descriptor.Descriptor(
+  name='User',
+  full_name='monorail.User',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='display_name', full_name='monorail.User.display_name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='user_id', full_name='monorail.User.user_id', index=1,
+      number=2, type=3, cpp_type=2, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='is_site_admin', full_name='monorail.User.is_site_admin', index=2,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='availability', full_name='monorail.User.availability', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='linked_parent_ref', full_name='monorail.User.linked_parent_ref', index=4,
+      number=5, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='linked_child_refs', full_name='monorail.User.linked_child_refs', index=5,
+      number=6, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=75,
+  serialized_end=257,
+)
+
+
+_USERPREFVALUE = _descriptor.Descriptor(
+  name='UserPrefValue',
+  full_name='monorail.UserPrefValue',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.UserPrefValue.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='value', full_name='monorail.UserPrefValue.value', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=259,
+  serialized_end=303,
+)
+
+
+_USERPROJECTS = _descriptor.Descriptor(
+  name='UserProjects',
+  full_name='monorail.UserProjects',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user_ref', full_name='monorail.UserProjects.user_ref', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='owner_of', full_name='monorail.UserProjects.owner_of', index=1,
+      number=2, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='member_of', full_name='monorail.UserProjects.member_of', index=2,
+      number=3, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='contributor_to', full_name='monorail.UserProjects.contributor_to', index=3,
+      number=4, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='starred_projects', full_name='monorail.UserProjects.starred_projects', index=4,
+      number=5, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=306,
+  serialized_end=444,
+)
+
+_USER.fields_by_name['linked_parent_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_USER.fields_by_name['linked_child_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_USERPROJECTS.fields_by_name['user_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+DESCRIPTOR.message_types_by_name['User'] = _USER
+DESCRIPTOR.message_types_by_name['UserPrefValue'] = _USERPREFVALUE
+DESCRIPTOR.message_types_by_name['UserProjects'] = _USERPROJECTS
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+User = _reflection.GeneratedProtocolMessageType('User', (_message.Message,), dict(
+  DESCRIPTOR = _USER,
+  __module__ = 'api.api_proto.user_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.User)
+  ))
+_sym_db.RegisterMessage(User)
+
+UserPrefValue = _reflection.GeneratedProtocolMessageType('UserPrefValue', (_message.Message,), dict(
+  DESCRIPTOR = _USERPREFVALUE,
+  __module__ = 'api.api_proto.user_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.UserPrefValue)
+  ))
+_sym_db.RegisterMessage(UserPrefValue)
+
+UserProjects = _reflection.GeneratedProtocolMessageType('UserProjects', (_message.Message,), dict(
+  DESCRIPTOR = _USERPROJECTS,
+  __module__ = 'api.api_proto.user_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.UserProjects)
+  ))
+_sym_db.RegisterMessage(UserProjects)
+
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/api_proto/users.proto b/api/api_proto/users.proto
new file mode 100644
index 0000000..574dccd
--- /dev/null
+++ b/api/api_proto/users.proto
@@ -0,0 +1,193 @@
+// Copyright 2018 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
+
+syntax = "proto3";
+
+package monorail;
+
+import "api/api_proto/user_objects.proto";
+import "api/api_proto/common.proto";
+
+service Users {
+  rpc GetUser (GetUserRequest) returns (User) {}
+  rpc ListReferencedUsers (ListReferencedUsersRequest) returns (ListReferencedUsersResponse) {}
+  rpc GetMemberships (GetMembershipsRequest) returns (GetMembershipsResponse) {}
+  rpc GetSavedQueries (GetSavedQueriesRequest) returns (GetSavedQueriesResponse) {}
+  rpc GetUserStarCount (GetUserStarCountRequest) returns (GetUserStarCountResponse) {}
+  rpc StarUser (StarUserRequest) returns (StarUserResponse) {}
+  rpc GetUserPrefs (GetUserPrefsRequest) returns (GetUserPrefsResponse) {}
+  rpc SetUserPrefs (SetUserPrefsRequest) returns (SetUserPrefsResponse) {}
+  // TODO(jrobbins): Merge this into SetUserPrefs.
+  rpc SetExpandPermsPreference (SetExpandPermsPreferenceRequest) returns (SetExpandPermsPreferenceResponse) {}
+  rpc InviteLinkedParent (InviteLinkedParentRequest) returns (InviteLinkedParentResponse) {}
+  rpc AcceptLinkedChild (AcceptLinkedChildRequest) returns (AcceptLinkedChildResponse) {}
+  rpc UnlinkAccounts (UnlinkAccountsRequest) returns (UnlinkAccountsResponse) {}
+  rpc GetUsersProjects (GetUsersProjectsRequest) returns (GetUsersProjectsResponse) {}
+  rpc ExpungeUser (ExpungeUserRequest) returns (ExpungeUserResponse) {}
+}
+
+
+// Next available tag: 4
+message ListReferencedUsersRequest {
+  // emails is deprecated. Use user_refs instead.
+  repeated string emails = 2;
+  repeated UserRef user_refs = 3;
+}
+
+
+message ListReferencedUsersResponse {
+  repeated User users = 1;
+}
+
+
+// Next available tag: 3
+message GetUserRequest {
+  UserRef user_ref = 2;
+}
+
+
+// Next available tag: 3
+message GetMembershipsRequest {
+  UserRef user_ref = 2;
+}
+
+
+// Next available tag: 2
+message GetMembershipsResponse {
+  repeated UserRef group_refs = 1;
+}
+
+
+// Next available tag: 3
+message GetSavedQueriesRequest {
+  UserRef user_ref = 2;
+}
+
+
+// Next available tag: 2
+message GetSavedQueriesResponse {
+  repeated SavedQuery saved_queries = 1;
+}
+
+// Next available tag: 3
+message GetUserStarCountRequest {
+  UserRef user_ref = 2;
+}
+
+
+// Next available tag: 2
+message GetUserStarCountResponse {
+  uint32 star_count = 1;
+}
+
+
+// Next available tag: 4
+message StarUserRequest {
+  UserRef user_ref = 2;
+  bool starred = 3;
+}
+
+
+// Next available tag: 2
+message StarUserResponse {
+  uint32 star_count = 1;
+}
+
+
+// Next available tag: 3
+message SetExpandPermsPreferenceRequest {
+  bool expand_perms = 2;
+}
+
+
+// Next available tag: 1
+message SetExpandPermsPreferenceResponse {
+}
+
+
+// Next available tag: 3
+message GetUserPrefsRequest {
+  // Site admins may get prefs for specific users.  Otherwise, it gets
+  // prefs for the signed-in user.
+  UserRef user_ref = 2;
+}
+
+
+// Next available tag: 2
+message GetUserPrefsResponse {
+  repeated UserPrefValue prefs = 1;
+}
+
+
+// Next available tag: 5
+message SetUserPrefsRequest {
+  // Site admins may set prefs for specific users.  Otherwise, it sets
+  // prefs for the signed-in user.
+  UserRef user_ref = 2;
+  // The given prefs add to or overwrite current user prefs.
+  repeated UserPrefValue prefs = 3;
+}
+
+
+// Next available tag: 1
+message SetUserPrefsResponse {
+}
+
+
+// Next available tag: 3
+message InviteLinkedParentRequest {
+  string email = 2;
+}
+
+
+// Next available tag: 1
+message InviteLinkedParentResponse {
+}
+
+
+// Next available tag: 3
+message AcceptLinkedChildRequest {
+  string email = 2;
+}
+
+
+// Next available tag: 1
+message AcceptLinkedChildResponse {
+}
+
+
+// Next available tag: 4
+message UnlinkAccountsRequest {
+  UserRef parent = 2;
+  UserRef child = 3;
+}
+
+
+// Next available tag: 1
+message UnlinkAccountsResponse {
+}
+
+
+// Next available tag: 2
+message GetUsersProjectsRequest {
+  repeated UserRef user_refs = 1;
+}
+
+
+// Next available tag: 5
+message GetUsersProjectsResponse {
+  repeated UserProjects users_projects = 1;
+}
+
+
+// Next available tag: 2
+message ExpungeUserRequest {
+  string email = 1;
+}
+
+
+// Next available tag: 1
+message ExpungeUserResponse {
+}
\ No newline at end of file
diff --git a/api/api_proto/users_pb2.py b/api/api_proto/users_pb2.py
new file mode 100644
index 0000000..8d84700
--- /dev/null
+++ b/api/api_proto/users_pb2.py
@@ -0,0 +1,1230 @@
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/api_proto/users.proto
+
+import sys
+_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from api.api_proto import user_objects_pb2 as api_dot_api__proto_dot_user__objects__pb2
+from api.api_proto import common_pb2 as api_dot_api__proto_dot_common__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/api_proto/users.proto',
+  package='monorail',
+  syntax='proto3',
+  serialized_options=None,
+  serialized_pb=_b('\n\x19\x61pi/api_proto/users.proto\x12\x08monorail\x1a api/api_proto/user_objects.proto\x1a\x1a\x61pi/api_proto/common.proto\"R\n\x1aListReferencedUsersRequest\x12\x0e\n\x06\x65mails\x18\x02 \x03(\t\x12$\n\tuser_refs\x18\x03 \x03(\x0b\x32\x11.monorail.UserRef\"<\n\x1bListReferencedUsersResponse\x12\x1d\n\x05users\x18\x01 \x03(\x0b\x32\x0e.monorail.User\"5\n\x0eGetUserRequest\x12#\n\x08user_ref\x18\x02 \x01(\x0b\x32\x11.monorail.UserRef\"<\n\x15GetMembershipsRequest\x12#\n\x08user_ref\x18\x02 \x01(\x0b\x32\x11.monorail.UserRef\"?\n\x16GetMembershipsResponse\x12%\n\ngroup_refs\x18\x01 \x03(\x0b\x32\x11.monorail.UserRef\"=\n\x16GetSavedQueriesRequest\x12#\n\x08user_ref\x18\x02 \x01(\x0b\x32\x11.monorail.UserRef\"F\n\x17GetSavedQueriesResponse\x12+\n\rsaved_queries\x18\x01 \x03(\x0b\x32\x14.monorail.SavedQuery\">\n\x17GetUserStarCountRequest\x12#\n\x08user_ref\x18\x02 \x01(\x0b\x32\x11.monorail.UserRef\".\n\x18GetUserStarCountResponse\x12\x12\n\nstar_count\x18\x01 \x01(\r\"G\n\x0fStarUserRequest\x12#\n\x08user_ref\x18\x02 \x01(\x0b\x32\x11.monorail.UserRef\x12\x0f\n\x07starred\x18\x03 \x01(\x08\"&\n\x10StarUserResponse\x12\x12\n\nstar_count\x18\x01 \x01(\r\"7\n\x1fSetExpandPermsPreferenceRequest\x12\x14\n\x0c\x65xpand_perms\x18\x02 \x01(\x08\"\"\n SetExpandPermsPreferenceResponse\":\n\x13GetUserPrefsRequest\x12#\n\x08user_ref\x18\x02 \x01(\x0b\x32\x11.monorail.UserRef\">\n\x14GetUserPrefsResponse\x12&\n\x05prefs\x18\x01 \x03(\x0b\x32\x17.monorail.UserPrefValue\"b\n\x13SetUserPrefsRequest\x12#\n\x08user_ref\x18\x02 \x01(\x0b\x32\x11.monorail.UserRef\x12&\n\x05prefs\x18\x03 \x03(\x0b\x32\x17.monorail.UserPrefValue\"\x16\n\x14SetUserPrefsResponse\"*\n\x19InviteLinkedParentRequest\x12\r\n\x05\x65mail\x18\x02 \x01(\t\"\x1c\n\x1aInviteLinkedParentResponse\")\n\x18\x41\x63\x63\x65ptLinkedChildRequest\x12\r\n\x05\x65mail\x18\x02 \x01(\t\"\x1b\n\x19\x41\x63\x63\x65ptLinkedChildResponse\"\\\n\x15UnlinkAccountsRequest\x12!\n\x06parent\x18\x02 \x01(\x0b\x32\x11.monorail.UserRef\x12 \n\x05\x63hild\x18\x03 \x01(\x0b\x32\x11.monorail.UserRef\"\x18\n\x16UnlinkAccountsResponse\"?\n\x17GetUsersProjectsRequest\x12$\n\tuser_refs\x18\x01 \x03(\x0b\x32\x11.monorail.UserRef\"J\n\x18GetUsersProjectsResponse\x12.\n\x0eusers_projects\x18\x01 \x03(\x0b\x32\x16.monorail.UserProjects\"#\n\x12\x45xpungeUserRequest\x12\r\n\x05\x65mail\x18\x01 \x01(\t\"\x15\n\x13\x45xpungeUserResponse2\xd3\t\n\x05Users\x12\x35\n\x07GetUser\x12\x18.monorail.GetUserRequest\x1a\x0e.monorail.User\"\x00\x12\x64\n\x13ListReferencedUsers\x12$.monorail.ListReferencedUsersRequest\x1a%.monorail.ListReferencedUsersResponse\"\x00\x12U\n\x0eGetMemberships\x12\x1f.monorail.GetMembershipsRequest\x1a .monorail.GetMembershipsResponse\"\x00\x12X\n\x0fGetSavedQueries\x12 .monorail.GetSavedQueriesRequest\x1a!.monorail.GetSavedQueriesResponse\"\x00\x12[\n\x10GetUserStarCount\x12!.monorail.GetUserStarCountRequest\x1a\".monorail.GetUserStarCountResponse\"\x00\x12\x43\n\x08StarUser\x12\x19.monorail.StarUserRequest\x1a\x1a.monorail.StarUserResponse\"\x00\x12O\n\x0cGetUserPrefs\x12\x1d.monorail.GetUserPrefsRequest\x1a\x1e.monorail.GetUserPrefsResponse\"\x00\x12O\n\x0cSetUserPrefs\x12\x1d.monorail.SetUserPrefsRequest\x1a\x1e.monorail.SetUserPrefsResponse\"\x00\x12s\n\x18SetExpandPermsPreference\x12).monorail.SetExpandPermsPreferenceRequest\x1a*.monorail.SetExpandPermsPreferenceResponse\"\x00\x12\x61\n\x12InviteLinkedParent\x12#.monorail.InviteLinkedParentRequest\x1a$.monorail.InviteLinkedParentResponse\"\x00\x12^\n\x11\x41\x63\x63\x65ptLinkedChild\x12\".monorail.AcceptLinkedChildRequest\x1a#.monorail.AcceptLinkedChildResponse\"\x00\x12U\n\x0eUnlinkAccounts\x12\x1f.monorail.UnlinkAccountsRequest\x1a .monorail.UnlinkAccountsResponse\"\x00\x12[\n\x10GetUsersProjects\x12!.monorail.GetUsersProjectsRequest\x1a\".monorail.GetUsersProjectsResponse\"\x00\x12L\n\x0b\x45xpungeUser\x12\x1c.monorail.ExpungeUserRequest\x1a\x1d.monorail.ExpungeUserResponse\"\x00\x62\x06proto3')
+  ,
+  dependencies=[api_dot_api__proto_dot_user__objects__pb2.DESCRIPTOR,api_dot_api__proto_dot_common__pb2.DESCRIPTOR,])
+
+
+
+
+_LISTREFERENCEDUSERSREQUEST = _descriptor.Descriptor(
+  name='ListReferencedUsersRequest',
+  full_name='monorail.ListReferencedUsersRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='emails', full_name='monorail.ListReferencedUsersRequest.emails', index=0,
+      number=2, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='user_refs', full_name='monorail.ListReferencedUsersRequest.user_refs', index=1,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=101,
+  serialized_end=183,
+)
+
+
+_LISTREFERENCEDUSERSRESPONSE = _descriptor.Descriptor(
+  name='ListReferencedUsersResponse',
+  full_name='monorail.ListReferencedUsersResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='users', full_name='monorail.ListReferencedUsersResponse.users', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=185,
+  serialized_end=245,
+)
+
+
+_GETUSERREQUEST = _descriptor.Descriptor(
+  name='GetUserRequest',
+  full_name='monorail.GetUserRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user_ref', full_name='monorail.GetUserRequest.user_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=247,
+  serialized_end=300,
+)
+
+
+_GETMEMBERSHIPSREQUEST = _descriptor.Descriptor(
+  name='GetMembershipsRequest',
+  full_name='monorail.GetMembershipsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user_ref', full_name='monorail.GetMembershipsRequest.user_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=302,
+  serialized_end=362,
+)
+
+
+_GETMEMBERSHIPSRESPONSE = _descriptor.Descriptor(
+  name='GetMembershipsResponse',
+  full_name='monorail.GetMembershipsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='group_refs', full_name='monorail.GetMembershipsResponse.group_refs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=364,
+  serialized_end=427,
+)
+
+
+_GETSAVEDQUERIESREQUEST = _descriptor.Descriptor(
+  name='GetSavedQueriesRequest',
+  full_name='monorail.GetSavedQueriesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user_ref', full_name='monorail.GetSavedQueriesRequest.user_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=429,
+  serialized_end=490,
+)
+
+
+_GETSAVEDQUERIESRESPONSE = _descriptor.Descriptor(
+  name='GetSavedQueriesResponse',
+  full_name='monorail.GetSavedQueriesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='saved_queries', full_name='monorail.GetSavedQueriesResponse.saved_queries', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=492,
+  serialized_end=562,
+)
+
+
+_GETUSERSTARCOUNTREQUEST = _descriptor.Descriptor(
+  name='GetUserStarCountRequest',
+  full_name='monorail.GetUserStarCountRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user_ref', full_name='monorail.GetUserStarCountRequest.user_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=564,
+  serialized_end=626,
+)
+
+
+_GETUSERSTARCOUNTRESPONSE = _descriptor.Descriptor(
+  name='GetUserStarCountResponse',
+  full_name='monorail.GetUserStarCountResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='star_count', full_name='monorail.GetUserStarCountResponse.star_count', index=0,
+      number=1, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=628,
+  serialized_end=674,
+)
+
+
+_STARUSERREQUEST = _descriptor.Descriptor(
+  name='StarUserRequest',
+  full_name='monorail.StarUserRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user_ref', full_name='monorail.StarUserRequest.user_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='starred', full_name='monorail.StarUserRequest.starred', index=1,
+      number=3, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=676,
+  serialized_end=747,
+)
+
+
+_STARUSERRESPONSE = _descriptor.Descriptor(
+  name='StarUserResponse',
+  full_name='monorail.StarUserResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='star_count', full_name='monorail.StarUserResponse.star_count', index=0,
+      number=1, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=749,
+  serialized_end=787,
+)
+
+
+_SETEXPANDPERMSPREFERENCEREQUEST = _descriptor.Descriptor(
+  name='SetExpandPermsPreferenceRequest',
+  full_name='monorail.SetExpandPermsPreferenceRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='expand_perms', full_name='monorail.SetExpandPermsPreferenceRequest.expand_perms', index=0,
+      number=2, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=789,
+  serialized_end=844,
+)
+
+
+_SETEXPANDPERMSPREFERENCERESPONSE = _descriptor.Descriptor(
+  name='SetExpandPermsPreferenceResponse',
+  full_name='monorail.SetExpandPermsPreferenceResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=846,
+  serialized_end=880,
+)
+
+
+_GETUSERPREFSREQUEST = _descriptor.Descriptor(
+  name='GetUserPrefsRequest',
+  full_name='monorail.GetUserPrefsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user_ref', full_name='monorail.GetUserPrefsRequest.user_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=882,
+  serialized_end=940,
+)
+
+
+_GETUSERPREFSRESPONSE = _descriptor.Descriptor(
+  name='GetUserPrefsResponse',
+  full_name='monorail.GetUserPrefsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='prefs', full_name='monorail.GetUserPrefsResponse.prefs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=942,
+  serialized_end=1004,
+)
+
+
+_SETUSERPREFSREQUEST = _descriptor.Descriptor(
+  name='SetUserPrefsRequest',
+  full_name='monorail.SetUserPrefsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user_ref', full_name='monorail.SetUserPrefsRequest.user_ref', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='prefs', full_name='monorail.SetUserPrefsRequest.prefs', index=1,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1006,
+  serialized_end=1104,
+)
+
+
+_SETUSERPREFSRESPONSE = _descriptor.Descriptor(
+  name='SetUserPrefsResponse',
+  full_name='monorail.SetUserPrefsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1106,
+  serialized_end=1128,
+)
+
+
+_INVITELINKEDPARENTREQUEST = _descriptor.Descriptor(
+  name='InviteLinkedParentRequest',
+  full_name='monorail.InviteLinkedParentRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='email', full_name='monorail.InviteLinkedParentRequest.email', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1130,
+  serialized_end=1172,
+)
+
+
+_INVITELINKEDPARENTRESPONSE = _descriptor.Descriptor(
+  name='InviteLinkedParentResponse',
+  full_name='monorail.InviteLinkedParentResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1174,
+  serialized_end=1202,
+)
+
+
+_ACCEPTLINKEDCHILDREQUEST = _descriptor.Descriptor(
+  name='AcceptLinkedChildRequest',
+  full_name='monorail.AcceptLinkedChildRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='email', full_name='monorail.AcceptLinkedChildRequest.email', index=0,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1204,
+  serialized_end=1245,
+)
+
+
+_ACCEPTLINKEDCHILDRESPONSE = _descriptor.Descriptor(
+  name='AcceptLinkedChildResponse',
+  full_name='monorail.AcceptLinkedChildResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1247,
+  serialized_end=1274,
+)
+
+
+_UNLINKACCOUNTSREQUEST = _descriptor.Descriptor(
+  name='UnlinkAccountsRequest',
+  full_name='monorail.UnlinkAccountsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.UnlinkAccountsRequest.parent', index=0,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+    _descriptor.FieldDescriptor(
+      name='child', full_name='monorail.UnlinkAccountsRequest.child', index=1,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1276,
+  serialized_end=1368,
+)
+
+
+_UNLINKACCOUNTSRESPONSE = _descriptor.Descriptor(
+  name='UnlinkAccountsResponse',
+  full_name='monorail.UnlinkAccountsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1370,
+  serialized_end=1394,
+)
+
+
+_GETUSERSPROJECTSREQUEST = _descriptor.Descriptor(
+  name='GetUsersProjectsRequest',
+  full_name='monorail.GetUsersProjectsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user_refs', full_name='monorail.GetUsersProjectsRequest.user_refs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1396,
+  serialized_end=1459,
+)
+
+
+_GETUSERSPROJECTSRESPONSE = _descriptor.Descriptor(
+  name='GetUsersProjectsResponse',
+  full_name='monorail.GetUsersProjectsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='users_projects', full_name='monorail.GetUsersProjectsResponse.users_projects', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1461,
+  serialized_end=1535,
+)
+
+
+_EXPUNGEUSERREQUEST = _descriptor.Descriptor(
+  name='ExpungeUserRequest',
+  full_name='monorail.ExpungeUserRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='email', full_name='monorail.ExpungeUserRequest.email', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=_b("").decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1537,
+  serialized_end=1572,
+)
+
+
+_EXPUNGEUSERRESPONSE = _descriptor.Descriptor(
+  name='ExpungeUserResponse',
+  full_name='monorail.ExpungeUserResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  fields=[
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1574,
+  serialized_end=1595,
+)
+
+_LISTREFERENCEDUSERSREQUEST.fields_by_name['user_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_LISTREFERENCEDUSERSRESPONSE.fields_by_name['users'].message_type = api_dot_api__proto_dot_user__objects__pb2._USER
+_GETUSERREQUEST.fields_by_name['user_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_GETMEMBERSHIPSREQUEST.fields_by_name['user_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_GETMEMBERSHIPSRESPONSE.fields_by_name['group_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_GETSAVEDQUERIESREQUEST.fields_by_name['user_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_GETSAVEDQUERIESRESPONSE.fields_by_name['saved_queries'].message_type = api_dot_api__proto_dot_common__pb2._SAVEDQUERY
+_GETUSERSTARCOUNTREQUEST.fields_by_name['user_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_STARUSERREQUEST.fields_by_name['user_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_GETUSERPREFSREQUEST.fields_by_name['user_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_GETUSERPREFSRESPONSE.fields_by_name['prefs'].message_type = api_dot_api__proto_dot_user__objects__pb2._USERPREFVALUE
+_SETUSERPREFSREQUEST.fields_by_name['user_ref'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_SETUSERPREFSREQUEST.fields_by_name['prefs'].message_type = api_dot_api__proto_dot_user__objects__pb2._USERPREFVALUE
+_UNLINKACCOUNTSREQUEST.fields_by_name['parent'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_UNLINKACCOUNTSREQUEST.fields_by_name['child'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_GETUSERSPROJECTSREQUEST.fields_by_name['user_refs'].message_type = api_dot_api__proto_dot_common__pb2._USERREF
+_GETUSERSPROJECTSRESPONSE.fields_by_name['users_projects'].message_type = api_dot_api__proto_dot_user__objects__pb2._USERPROJECTS
+DESCRIPTOR.message_types_by_name['ListReferencedUsersRequest'] = _LISTREFERENCEDUSERSREQUEST
+DESCRIPTOR.message_types_by_name['ListReferencedUsersResponse'] = _LISTREFERENCEDUSERSRESPONSE
+DESCRIPTOR.message_types_by_name['GetUserRequest'] = _GETUSERREQUEST
+DESCRIPTOR.message_types_by_name['GetMembershipsRequest'] = _GETMEMBERSHIPSREQUEST
+DESCRIPTOR.message_types_by_name['GetMembershipsResponse'] = _GETMEMBERSHIPSRESPONSE
+DESCRIPTOR.message_types_by_name['GetSavedQueriesRequest'] = _GETSAVEDQUERIESREQUEST
+DESCRIPTOR.message_types_by_name['GetSavedQueriesResponse'] = _GETSAVEDQUERIESRESPONSE
+DESCRIPTOR.message_types_by_name['GetUserStarCountRequest'] = _GETUSERSTARCOUNTREQUEST
+DESCRIPTOR.message_types_by_name['GetUserStarCountResponse'] = _GETUSERSTARCOUNTRESPONSE
+DESCRIPTOR.message_types_by_name['StarUserRequest'] = _STARUSERREQUEST
+DESCRIPTOR.message_types_by_name['StarUserResponse'] = _STARUSERRESPONSE
+DESCRIPTOR.message_types_by_name['SetExpandPermsPreferenceRequest'] = _SETEXPANDPERMSPREFERENCEREQUEST
+DESCRIPTOR.message_types_by_name['SetExpandPermsPreferenceResponse'] = _SETEXPANDPERMSPREFERENCERESPONSE
+DESCRIPTOR.message_types_by_name['GetUserPrefsRequest'] = _GETUSERPREFSREQUEST
+DESCRIPTOR.message_types_by_name['GetUserPrefsResponse'] = _GETUSERPREFSRESPONSE
+DESCRIPTOR.message_types_by_name['SetUserPrefsRequest'] = _SETUSERPREFSREQUEST
+DESCRIPTOR.message_types_by_name['SetUserPrefsResponse'] = _SETUSERPREFSRESPONSE
+DESCRIPTOR.message_types_by_name['InviteLinkedParentRequest'] = _INVITELINKEDPARENTREQUEST
+DESCRIPTOR.message_types_by_name['InviteLinkedParentResponse'] = _INVITELINKEDPARENTRESPONSE
+DESCRIPTOR.message_types_by_name['AcceptLinkedChildRequest'] = _ACCEPTLINKEDCHILDREQUEST
+DESCRIPTOR.message_types_by_name['AcceptLinkedChildResponse'] = _ACCEPTLINKEDCHILDRESPONSE
+DESCRIPTOR.message_types_by_name['UnlinkAccountsRequest'] = _UNLINKACCOUNTSREQUEST
+DESCRIPTOR.message_types_by_name['UnlinkAccountsResponse'] = _UNLINKACCOUNTSRESPONSE
+DESCRIPTOR.message_types_by_name['GetUsersProjectsRequest'] = _GETUSERSPROJECTSREQUEST
+DESCRIPTOR.message_types_by_name['GetUsersProjectsResponse'] = _GETUSERSPROJECTSRESPONSE
+DESCRIPTOR.message_types_by_name['ExpungeUserRequest'] = _EXPUNGEUSERREQUEST
+DESCRIPTOR.message_types_by_name['ExpungeUserResponse'] = _EXPUNGEUSERRESPONSE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+ListReferencedUsersRequest = _reflection.GeneratedProtocolMessageType('ListReferencedUsersRequest', (_message.Message,), dict(
+  DESCRIPTOR = _LISTREFERENCEDUSERSREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListReferencedUsersRequest)
+  ))
+_sym_db.RegisterMessage(ListReferencedUsersRequest)
+
+ListReferencedUsersResponse = _reflection.GeneratedProtocolMessageType('ListReferencedUsersResponse', (_message.Message,), dict(
+  DESCRIPTOR = _LISTREFERENCEDUSERSRESPONSE,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ListReferencedUsersResponse)
+  ))
+_sym_db.RegisterMessage(ListReferencedUsersResponse)
+
+GetUserRequest = _reflection.GeneratedProtocolMessageType('GetUserRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETUSERREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetUserRequest)
+  ))
+_sym_db.RegisterMessage(GetUserRequest)
+
+GetMembershipsRequest = _reflection.GeneratedProtocolMessageType('GetMembershipsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETMEMBERSHIPSREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetMembershipsRequest)
+  ))
+_sym_db.RegisterMessage(GetMembershipsRequest)
+
+GetMembershipsResponse = _reflection.GeneratedProtocolMessageType('GetMembershipsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _GETMEMBERSHIPSRESPONSE,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetMembershipsResponse)
+  ))
+_sym_db.RegisterMessage(GetMembershipsResponse)
+
+GetSavedQueriesRequest = _reflection.GeneratedProtocolMessageType('GetSavedQueriesRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETSAVEDQUERIESREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetSavedQueriesRequest)
+  ))
+_sym_db.RegisterMessage(GetSavedQueriesRequest)
+
+GetSavedQueriesResponse = _reflection.GeneratedProtocolMessageType('GetSavedQueriesResponse', (_message.Message,), dict(
+  DESCRIPTOR = _GETSAVEDQUERIESRESPONSE,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetSavedQueriesResponse)
+  ))
+_sym_db.RegisterMessage(GetSavedQueriesResponse)
+
+GetUserStarCountRequest = _reflection.GeneratedProtocolMessageType('GetUserStarCountRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETUSERSTARCOUNTREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetUserStarCountRequest)
+  ))
+_sym_db.RegisterMessage(GetUserStarCountRequest)
+
+GetUserStarCountResponse = _reflection.GeneratedProtocolMessageType('GetUserStarCountResponse', (_message.Message,), dict(
+  DESCRIPTOR = _GETUSERSTARCOUNTRESPONSE,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetUserStarCountResponse)
+  ))
+_sym_db.RegisterMessage(GetUserStarCountResponse)
+
+StarUserRequest = _reflection.GeneratedProtocolMessageType('StarUserRequest', (_message.Message,), dict(
+  DESCRIPTOR = _STARUSERREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.StarUserRequest)
+  ))
+_sym_db.RegisterMessage(StarUserRequest)
+
+StarUserResponse = _reflection.GeneratedProtocolMessageType('StarUserResponse', (_message.Message,), dict(
+  DESCRIPTOR = _STARUSERRESPONSE,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.StarUserResponse)
+  ))
+_sym_db.RegisterMessage(StarUserResponse)
+
+SetExpandPermsPreferenceRequest = _reflection.GeneratedProtocolMessageType('SetExpandPermsPreferenceRequest', (_message.Message,), dict(
+  DESCRIPTOR = _SETEXPANDPERMSPREFERENCEREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.SetExpandPermsPreferenceRequest)
+  ))
+_sym_db.RegisterMessage(SetExpandPermsPreferenceRequest)
+
+SetExpandPermsPreferenceResponse = _reflection.GeneratedProtocolMessageType('SetExpandPermsPreferenceResponse', (_message.Message,), dict(
+  DESCRIPTOR = _SETEXPANDPERMSPREFERENCERESPONSE,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.SetExpandPermsPreferenceResponse)
+  ))
+_sym_db.RegisterMessage(SetExpandPermsPreferenceResponse)
+
+GetUserPrefsRequest = _reflection.GeneratedProtocolMessageType('GetUserPrefsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETUSERPREFSREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetUserPrefsRequest)
+  ))
+_sym_db.RegisterMessage(GetUserPrefsRequest)
+
+GetUserPrefsResponse = _reflection.GeneratedProtocolMessageType('GetUserPrefsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _GETUSERPREFSRESPONSE,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetUserPrefsResponse)
+  ))
+_sym_db.RegisterMessage(GetUserPrefsResponse)
+
+SetUserPrefsRequest = _reflection.GeneratedProtocolMessageType('SetUserPrefsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _SETUSERPREFSREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.SetUserPrefsRequest)
+  ))
+_sym_db.RegisterMessage(SetUserPrefsRequest)
+
+SetUserPrefsResponse = _reflection.GeneratedProtocolMessageType('SetUserPrefsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _SETUSERPREFSRESPONSE,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.SetUserPrefsResponse)
+  ))
+_sym_db.RegisterMessage(SetUserPrefsResponse)
+
+InviteLinkedParentRequest = _reflection.GeneratedProtocolMessageType('InviteLinkedParentRequest', (_message.Message,), dict(
+  DESCRIPTOR = _INVITELINKEDPARENTREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.InviteLinkedParentRequest)
+  ))
+_sym_db.RegisterMessage(InviteLinkedParentRequest)
+
+InviteLinkedParentResponse = _reflection.GeneratedProtocolMessageType('InviteLinkedParentResponse', (_message.Message,), dict(
+  DESCRIPTOR = _INVITELINKEDPARENTRESPONSE,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.InviteLinkedParentResponse)
+  ))
+_sym_db.RegisterMessage(InviteLinkedParentResponse)
+
+AcceptLinkedChildRequest = _reflection.GeneratedProtocolMessageType('AcceptLinkedChildRequest', (_message.Message,), dict(
+  DESCRIPTOR = _ACCEPTLINKEDCHILDREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.AcceptLinkedChildRequest)
+  ))
+_sym_db.RegisterMessage(AcceptLinkedChildRequest)
+
+AcceptLinkedChildResponse = _reflection.GeneratedProtocolMessageType('AcceptLinkedChildResponse', (_message.Message,), dict(
+  DESCRIPTOR = _ACCEPTLINKEDCHILDRESPONSE,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.AcceptLinkedChildResponse)
+  ))
+_sym_db.RegisterMessage(AcceptLinkedChildResponse)
+
+UnlinkAccountsRequest = _reflection.GeneratedProtocolMessageType('UnlinkAccountsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _UNLINKACCOUNTSREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.UnlinkAccountsRequest)
+  ))
+_sym_db.RegisterMessage(UnlinkAccountsRequest)
+
+UnlinkAccountsResponse = _reflection.GeneratedProtocolMessageType('UnlinkAccountsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _UNLINKACCOUNTSRESPONSE,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.UnlinkAccountsResponse)
+  ))
+_sym_db.RegisterMessage(UnlinkAccountsResponse)
+
+GetUsersProjectsRequest = _reflection.GeneratedProtocolMessageType('GetUsersProjectsRequest', (_message.Message,), dict(
+  DESCRIPTOR = _GETUSERSPROJECTSREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetUsersProjectsRequest)
+  ))
+_sym_db.RegisterMessage(GetUsersProjectsRequest)
+
+GetUsersProjectsResponse = _reflection.GeneratedProtocolMessageType('GetUsersProjectsResponse', (_message.Message,), dict(
+  DESCRIPTOR = _GETUSERSPROJECTSRESPONSE,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.GetUsersProjectsResponse)
+  ))
+_sym_db.RegisterMessage(GetUsersProjectsResponse)
+
+ExpungeUserRequest = _reflection.GeneratedProtocolMessageType('ExpungeUserRequest', (_message.Message,), dict(
+  DESCRIPTOR = _EXPUNGEUSERREQUEST,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ExpungeUserRequest)
+  ))
+_sym_db.RegisterMessage(ExpungeUserRequest)
+
+ExpungeUserResponse = _reflection.GeneratedProtocolMessageType('ExpungeUserResponse', (_message.Message,), dict(
+  DESCRIPTOR = _EXPUNGEUSERRESPONSE,
+  __module__ = 'api.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ExpungeUserResponse)
+  ))
+_sym_db.RegisterMessage(ExpungeUserResponse)
+
+
+
+_USERS = _descriptor.ServiceDescriptor(
+  name='Users',
+  full_name='monorail.Users',
+  file=DESCRIPTOR,
+  index=0,
+  serialized_options=None,
+  serialized_start=1598,
+  serialized_end=2833,
+  methods=[
+  _descriptor.MethodDescriptor(
+    name='GetUser',
+    full_name='monorail.Users.GetUser',
+    index=0,
+    containing_service=None,
+    input_type=_GETUSERREQUEST,
+    output_type=api_dot_api__proto_dot_user__objects__pb2._USER,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListReferencedUsers',
+    full_name='monorail.Users.ListReferencedUsers',
+    index=1,
+    containing_service=None,
+    input_type=_LISTREFERENCEDUSERSREQUEST,
+    output_type=_LISTREFERENCEDUSERSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetMemberships',
+    full_name='monorail.Users.GetMemberships',
+    index=2,
+    containing_service=None,
+    input_type=_GETMEMBERSHIPSREQUEST,
+    output_type=_GETMEMBERSHIPSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetSavedQueries',
+    full_name='monorail.Users.GetSavedQueries',
+    index=3,
+    containing_service=None,
+    input_type=_GETSAVEDQUERIESREQUEST,
+    output_type=_GETSAVEDQUERIESRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetUserStarCount',
+    full_name='monorail.Users.GetUserStarCount',
+    index=4,
+    containing_service=None,
+    input_type=_GETUSERSTARCOUNTREQUEST,
+    output_type=_GETUSERSTARCOUNTRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='StarUser',
+    full_name='monorail.Users.StarUser',
+    index=5,
+    containing_service=None,
+    input_type=_STARUSERREQUEST,
+    output_type=_STARUSERRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetUserPrefs',
+    full_name='monorail.Users.GetUserPrefs',
+    index=6,
+    containing_service=None,
+    input_type=_GETUSERPREFSREQUEST,
+    output_type=_GETUSERPREFSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='SetUserPrefs',
+    full_name='monorail.Users.SetUserPrefs',
+    index=7,
+    containing_service=None,
+    input_type=_SETUSERPREFSREQUEST,
+    output_type=_SETUSERPREFSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='SetExpandPermsPreference',
+    full_name='monorail.Users.SetExpandPermsPreference',
+    index=8,
+    containing_service=None,
+    input_type=_SETEXPANDPERMSPREFERENCEREQUEST,
+    output_type=_SETEXPANDPERMSPREFERENCERESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='InviteLinkedParent',
+    full_name='monorail.Users.InviteLinkedParent',
+    index=9,
+    containing_service=None,
+    input_type=_INVITELINKEDPARENTREQUEST,
+    output_type=_INVITELINKEDPARENTRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='AcceptLinkedChild',
+    full_name='monorail.Users.AcceptLinkedChild',
+    index=10,
+    containing_service=None,
+    input_type=_ACCEPTLINKEDCHILDREQUEST,
+    output_type=_ACCEPTLINKEDCHILDRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='UnlinkAccounts',
+    full_name='monorail.Users.UnlinkAccounts',
+    index=11,
+    containing_service=None,
+    input_type=_UNLINKACCOUNTSREQUEST,
+    output_type=_UNLINKACCOUNTSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetUsersProjects',
+    full_name='monorail.Users.GetUsersProjects',
+    index=12,
+    containing_service=None,
+    input_type=_GETUSERSPROJECTSREQUEST,
+    output_type=_GETUSERSPROJECTSRESPONSE,
+    serialized_options=None,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ExpungeUser',
+    full_name='monorail.Users.ExpungeUser',
+    index=13,
+    containing_service=None,
+    input_type=_EXPUNGEUSERREQUEST,
+    output_type=_EXPUNGEUSERRESPONSE,
+    serialized_options=None,
+  ),
+])
+_sym_db.RegisterServiceDescriptor(_USERS)
+
+DESCRIPTOR.services_by_name['Users'] = _USERS
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/api_proto/users_prpc_pb2.py b/api/api_proto/users_prpc_pb2.py
new file mode 100644
index 0000000..9c99700
--- /dev/null
+++ b/api/api_proto/users_prpc_pb2.py
@@ -0,0 +1,129 @@
+# Generated by the pRPC protocol buffer compiler plugin.  DO NOT EDIT!
+# source: api/api_proto/users.proto
+
+import base64
+import zlib
+
+from google.protobuf import descriptor_pb2
+
+# Includes description of the api/api_proto/users.proto and all of its transitive
+# dependencies. Includes source code info.
+FILE_DESCRIPTOR_SET = descriptor_pb2.FileDescriptorSet()
+FILE_DESCRIPTOR_SET.ParseFromString(zlib.decompress(base64.b64decode(
+    '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')))
+_INDEX = {
+    f.name: {
+      'descriptor': f,
+      'services': {s.name: s for s in f.service},
+    }
+    for f in FILE_DESCRIPTOR_SET.file
+}
+
+
+UsersServiceDescription = {
+  'file_descriptor_set': FILE_DESCRIPTOR_SET,
+  'file_descriptor': _INDEX[u'api/api_proto/users.proto']['descriptor'],
+  'service_descriptor': _INDEX[u'api/api_proto/users.proto']['services'][u'Users'],
+}
diff --git a/api/api_routes.py b/api/api_routes.py
new file mode 100644
index 0000000..093323b
--- /dev/null
+++ b/api/api_routes.py
@@ -0,0 +1,46 @@
+# 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
+
+# This file implements a pRPC API for Monorail.
+#
+# See the pRPC spec here: https://godoc.org/github.com/luci/luci-go/grpc/prpc
+#
+# Each Servicer corresponds to a service defined in a .proto file in this
+# directory. Each method on that Servicer corresponds to one of the rpcs
+# defined on the service.
+#
+# All APIs are served under the /prpc/* path space. Each service gets its own
+# namespace under that, and each method is an individual endpoints. For example,
+#   POST https://bugs.chromium.org/prpc/monorail.Users/GetUser
+# would be a call to the api.users_servicer.UsersServicer.GetUser method.
+#
+# Note that this is not a RESTful API, although it is CRUDy. All requests are
+# POSTs, all methods take exactly one input, and all methods return exactly
+# one output.
+#
+# TODO(http://crbug.com/monorail/1703): Actually integrate the rpcexplorer.
+# You can use the API Explorer here: https://bugs.chromium.org/rpcexplorer
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from api import features_servicer
+from api import issues_servicer
+from api import projects_servicer
+from api import sitewide_servicer
+from api import users_servicer
+
+
+def RegisterApiHandlers(prpc_server, services):
+  """Registers pRPC API services. And makes their routes
+  available in prpc_server.get_routes().
+  """
+
+  prpc_server.add_service(features_servicer.FeaturesServicer(services))
+  prpc_server.add_service(issues_servicer.IssuesServicer(services))
+  prpc_server.add_service(projects_servicer.ProjectsServicer(services))
+  prpc_server.add_service(sitewide_servicer.SitewideServicer(services))
+  prpc_server.add_service(users_servicer.UsersServicer(services))
diff --git a/api/converters.py b/api/converters.py
new file mode 100644
index 0000000..4f01a8b
--- /dev/null
+++ b/api/converters.py
@@ -0,0 +1,1147 @@
+# Copyright 2018 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
+
+"""Functions that convert protorpc business objects into protoc objects.
+
+Monorail uses protorpc objects internally, whereas the API uses protoc
+objects.  The difference is not just the choice of protobuf library, there
+will always be a need for conversion because out internal objects may have
+field that we do not want to expose externally, or the format of some fields
+may be different than how we want to expose them.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from six import string_types
+
+import settings
+from api.api_proto import common_pb2
+from api.api_proto import features_objects_pb2
+from api.api_proto import issue_objects_pb2
+from api.api_proto import project_objects_pb2
+from api.api_proto import user_objects_pb2
+from features import federated
+from framework import exceptions
+from framework import filecontent
+from framework import framework_constants
+from framework import framework_helpers
+from framework import permissions
+from framework import validate
+from services import features_svc
+from tracker import attachment_helpers
+from tracker import field_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_helpers
+from proto import tracker_pb2
+from proto import user_pb2
+
+
+# Convert and ingest objects in issue_objects.proto.
+
+
+def ConvertApprovalValues(approval_values, phases, users_by_id, config):
+  """Convert a list of ApprovalValue into protoc Approvals."""
+  phases_by_id = {
+    phase.phase_id: phase
+    for phase in phases}
+  result = [
+    ConvertApproval(
+      av, users_by_id, config, phase=phases_by_id.get(av.phase_id))
+    for av in approval_values]
+  result = [av for av in result if av]
+  return result
+
+
+def ConvertApproval(approval_value, users_by_id, config, phase=None):
+  """Use the given ApprovalValue to create a protoc Approval."""
+  approval_name = ''
+  fd = tracker_bizobj.FindFieldDefByID(approval_value.approval_id, config)
+  if fd:
+    approval_name = fd.field_name
+  else:
+    logging.info(
+        'Ignoring approval value referencing a non-existing field: %r',
+        approval_value)
+    return None
+
+  field_ref = ConvertFieldRef(
+      approval_value.approval_id, approval_name,
+      tracker_pb2.FieldTypes.APPROVAL_TYPE, None)
+  approver_refs = ConvertUserRefs(approval_value.approver_ids, [], users_by_id,
+                                  False)
+  setter_ref = ConvertUserRef(approval_value.setter_id, None, users_by_id)
+
+  status = ConvertApprovalStatus(approval_value.status)
+  set_on = approval_value.set_on
+
+  phase_ref = issue_objects_pb2.PhaseRef()
+  if phase:
+    phase_ref.phase_name = phase.name
+
+  result = issue_objects_pb2.Approval(
+      field_ref=field_ref, approver_refs=approver_refs,
+      status=status, set_on=set_on, setter_ref=setter_ref,
+      phase_ref=phase_ref)
+  return result
+
+
+def ConvertStatusRef(explicit_status, derived_status, config):
+  """Use the given status strings to create a StatusRef."""
+  status = explicit_status or derived_status
+  is_derived = not explicit_status
+  if not status:
+    return common_pb2.StatusRef(
+        status=framework_constants.NO_VALUES, is_derived=False, means_open=True)
+
+  return common_pb2.StatusRef(
+      status=status,
+      is_derived=is_derived,
+      means_open=tracker_helpers.MeansOpenInProject(status, config))
+
+
+def ConvertApprovalStatus(status):
+  """Use the given protorpc ApprovalStatus to create a protoc ApprovalStatus"""
+  return issue_objects_pb2.ApprovalStatus.Value(status.name)
+
+
+def ConvertUserRef(explicit_user_id, derived_user_id, users_by_id):
+  """Use the given user IDs to create a UserRef."""
+  user_id = explicit_user_id or derived_user_id
+  is_derived = not explicit_user_id
+  if not user_id:
+    return None;
+
+  return common_pb2.UserRef(
+      user_id=user_id,
+      is_derived=is_derived,
+      display_name=users_by_id[user_id].display_name)
+
+# TODO(jojwang): Rewrite method, ConvertUserRefs should be able to
+# call ConvertUserRef
+def ConvertUserRefs(explicit_user_ids, derived_user_ids, users_by_id,
+                    use_email):
+  # (List(int), List(int), Dict(int: UserView), bool) -> List(UserRef)
+  """Use the given user ID lists to create a list of UserRef.
+
+  Args:
+    explicit_user_ids: list of user_ids for users that are not derived.
+    derived_user_ids: list of user_ids for users derived from FilterRules.
+    users_by_id: dict of {user_id: UserView, ...} for all users in
+      explicit_user_ids and derived_user_ids.
+    use_email: boolean true if the UserView.email should be used as
+      the display_name instead of UserView.display_name, which may be obscured.
+
+  Returns:
+    A single list of UserRefs.
+  """
+  result = []
+  for user_id in explicit_user_ids:
+    result.append(common_pb2.UserRef(
+      user_id=user_id,
+      is_derived=False,
+      display_name=(
+          users_by_id[user_id].email
+          if use_email
+          else users_by_id[user_id].display_name)))
+  for user_id in derived_user_ids:
+    result.append(common_pb2.UserRef(
+      user_id=user_id,
+      is_derived=True,
+      display_name=(
+          users_by_id[user_id].email
+          if use_email
+          else users_by_id[user_id].display_name)))
+  return result
+
+
+def ConvertUsers(users, users_by_id):
+  """Use the given protorpc Users to create protoc Users.
+
+  Args:
+    users: list of protorpc Users to convert.
+    users_by_id: dict {user_id: UserView} of all Users linked
+      from the users list.
+
+  Returns:
+    A list of protoc Users.
+  """
+  result = []
+  for user in users:
+    linked_parent_ref = None
+    if user.linked_parent_id:
+      linked_parent_ref = ConvertUserRefs(
+          [user.linked_parent_id], [], users_by_id, False)[0]
+    linked_child_refs = ConvertUserRefs(
+        user.linked_child_ids, [], users_by_id, False)
+    converted_user = user_objects_pb2.User(
+        user_id=user.user_id,
+        display_name=user.email,
+        is_site_admin=user.is_site_admin,
+        availability=framework_helpers.GetUserAvailability(user)[0],
+        linked_parent_ref=linked_parent_ref,
+        linked_child_refs=linked_child_refs)
+    result.append(converted_user)
+  return result
+
+
+def ConvertPrefValues(userprefvalues):
+  """Convert a list of protorpc UserPrefValue to protoc UserPrefValues."""
+  return [
+      user_objects_pb2.UserPrefValue(name=upv.name, value=upv.value)
+      for upv in userprefvalues]
+
+
+def ConvertLabels(explicit_labels, derived_labels):
+  """Combine the given explicit and derived lists into LabelRefs."""
+  explicit_refs = [common_pb2.LabelRef(label=lab, is_derived=False)
+                   for lab in explicit_labels]
+  derived_refs = [common_pb2.LabelRef(label=lab, is_derived=True)
+                  for lab in derived_labels]
+  return explicit_refs + derived_refs
+
+
+def ConvertComponentRef(component_id, config, is_derived=False):
+  """Make a ComponentRef from the component_id and project config."""
+  component_def = tracker_bizobj.FindComponentDefByID(component_id, config)
+  if not component_def:
+    logging.info('Ignoring non-existing component id %s', component_id)
+    return None
+  result = common_pb2.ComponentRef(
+      path=component_def.path,
+      is_derived=is_derived)
+  return result
+
+# TODO(jojwang): rename to ConvertComponentRefs
+def ConvertComponents(explicit_component_ids, derived_component_ids, config):
+  """Make a ComponentRef for each component_id."""
+  result = [ConvertComponentRef(cid, config) for cid in explicit_component_ids]
+  result += [
+      ConvertComponentRef(cid, config, is_derived=True)
+      for cid in derived_component_ids]
+  result = [cr for cr in result if cr]
+  return result
+
+
+def ConvertIssueRef(issue_ref_pair, ext_id=''):
+  """Convert (project_name, local_id) to an IssueRef protoc object.
+
+  With optional external ref in ext_id.
+  """
+  project_name, local_id = issue_ref_pair
+  ref = common_pb2.IssueRef(project_name=project_name, local_id=local_id,
+      ext_identifier=ext_id)
+  return ref
+
+
+def ConvertIssueRefs(issue_ids, related_refs_dict):
+  """Convert a list of iids to IssueRef protoc objects."""
+  return [ConvertIssueRef(related_refs_dict[iid]) for iid in issue_ids]
+
+
+def ConvertFieldValue(field_id, field_name, value, field_type,
+                      approval_name=None, phase_name=None, is_derived=False):
+  """Convert one field value view item into a protoc FieldValue."""
+  if not isinstance(value, string_types):
+    value = str(value)
+  fv = issue_objects_pb2.FieldValue(
+      field_ref=ConvertFieldRef(field_id, field_name, field_type,
+                                approval_name),
+      value=value,
+      is_derived=is_derived)
+  if phase_name:
+    fv.phase_ref.phase_name = phase_name
+
+  return fv
+
+
+def ConvertFieldType(field_type):
+  """Use the given protorpc FieldTypes enum to create a protoc FieldType."""
+  return common_pb2.FieldType.Value(field_type.name)
+
+
+def ConvertFieldRef(field_id, field_name, field_type, approval_name):
+  """Convert a field name and protorpc FieldType into a protoc FieldRef."""
+  return common_pb2.FieldRef(field_id=field_id,
+                             field_name=field_name,
+                             type=ConvertFieldType(field_type),
+                             approval_name=approval_name)
+
+
+def ConvertFieldValues(
+    config, labels, derived_labels, field_values, users_by_id, phases=None):
+  """Convert lists of labels and field_values to protoc FieldValues."""
+  fvs = []
+  phase_names_by_id = {phase.phase_id: phase.name for phase in phases or []}
+  fds_by_id = {fd.field_id:fd for fd in config.field_defs}
+  fids_by_name = {fd.field_name:fd.field_id for fd in config.field_defs}
+  enum_names_by_lower = {
+      fd.field_name.lower(): fd.field_name for fd in config.field_defs
+      if fd.field_type == tracker_pb2.FieldTypes.ENUM_TYPE}
+
+  labels_by_prefix = tracker_bizobj.LabelsByPrefix(
+      labels, list(enum_names_by_lower.keys()))
+  der_labels_by_prefix = tracker_bizobj.LabelsByPrefix(
+      derived_labels, list(enum_names_by_lower.keys()))
+
+  for lower_field_name, values in labels_by_prefix.items():
+    field_name = enum_names_by_lower.get(lower_field_name)
+    if not field_name:
+      continue
+    fvs.extend(
+        [ConvertFieldValue(
+            fids_by_name.get(field_name), field_name, value,
+            tracker_pb2.FieldTypes.ENUM_TYPE)
+         for value in values])
+
+  for lower_field_name, values in der_labels_by_prefix.items():
+    field_name = enum_names_by_lower.get(lower_field_name)
+    if not field_name:
+      continue
+    fvs.extend(
+        [ConvertFieldValue(
+            fids_by_name.get(field_name), field_name, value,
+            tracker_pb2.FieldTypes.ENUM_TYPE, is_derived=True)
+         for value in values])
+
+  for fv in field_values:
+    field_def = fds_by_id.get(fv.field_id)
+    if not field_def:
+      logging.info(
+          'Ignoring field value referencing a non-existent field: %r', fv)
+      continue
+
+    value = tracker_bizobj.GetFieldValue(fv, users_by_id)
+    field_name = field_def.field_name
+    field_type = field_def.field_type
+    approval_name = None
+
+    if field_def.approval_id is not None:
+      approval_def = fds_by_id.get(field_def.approval_id)
+      if approval_def:
+        approval_name = approval_def.field_name
+
+    fvs.append(ConvertFieldValue(
+        fv.field_id, field_name, value, field_type, approval_name=approval_name,
+        phase_name=phase_names_by_id.get(fv.phase_id), is_derived=fv.derived))
+
+  return fvs
+
+
+def ConvertIssue(issue, users_by_id, related_refs, config):
+  """Convert our protorpc Issue to a protoc Issue.
+
+  Args:
+    issue: protorpc issue used by monorail internally.
+    users_by_id: dict {user_id: UserViews} for all users mentioned in issue.
+    related_refs: dict {issue_id: (project_name, local_id)} of all blocked-on,
+        blocking, or merged-into issues referenced from this issue, regardless
+        of perms.
+    config: ProjectIssueConfig for this issue.
+
+  Returns: A protoc Issue object.
+  """
+  status_ref = ConvertStatusRef(issue.status, issue.derived_status, config)
+  owner_ref = ConvertUserRef(
+      issue.owner_id, issue.derived_owner_id, users_by_id)
+  cc_refs = ConvertUserRefs(
+      issue.cc_ids, issue.derived_cc_ids, users_by_id, False)
+  labels, derived_labels = tracker_bizobj.ExplicitAndDerivedNonMaskedLabels(
+      issue.labels, issue.derived_labels, config)
+  label_refs = ConvertLabels(labels, derived_labels)
+  component_refs = ConvertComponents(
+      issue.component_ids, issue.derived_component_ids, config)
+  blocked_on_issue_refs = ConvertIssueRefs(
+      issue.blocked_on_iids, related_refs)
+  dangling_blocked_on_refs = [
+      ConvertIssueRef((dangling_issue.project, dangling_issue.issue_id),
+          ext_id=dangling_issue.ext_issue_identifier)
+      for dangling_issue in issue.dangling_blocked_on_refs]
+  blocking_issue_refs = ConvertIssueRefs(
+      issue.blocking_iids, related_refs)
+  dangling_blocking_refs = [
+      ConvertIssueRef((dangling_issue.project, dangling_issue.issue_id),
+          ext_id=dangling_issue.ext_issue_identifier)
+      for dangling_issue in issue.dangling_blocking_refs]
+  merged_into_issue_ref = None
+  if issue.merged_into:
+    merged_into_issue_ref = ConvertIssueRef(related_refs[issue.merged_into])
+  if issue.merged_into_external:
+    merged_into_issue_ref = ConvertIssueRef((None, None),
+        ext_id=issue.merged_into_external)
+
+  field_values = ConvertFieldValues(
+      config, issue.labels, issue.derived_labels,
+      issue.field_values, users_by_id, phases=issue.phases)
+  approval_values = ConvertApprovalValues(
+      issue.approval_values, issue.phases, users_by_id, config)
+  reporter_ref = ConvertUserRef(issue.reporter_id, None, users_by_id)
+  phases = [ConvertPhaseDef(phase) for phase in issue.phases]
+  result = issue_objects_pb2.Issue(
+      project_name=issue.project_name, local_id=issue.local_id,
+      summary=issue.summary, status_ref=status_ref, owner_ref=owner_ref,
+      cc_refs=cc_refs, label_refs=label_refs, component_refs=component_refs,
+      blocked_on_issue_refs=blocked_on_issue_refs,
+      dangling_blocked_on_refs=dangling_blocked_on_refs,
+      blocking_issue_refs=blocking_issue_refs,
+      dangling_blocking_refs=dangling_blocking_refs,
+      merged_into_issue_ref=merged_into_issue_ref, field_values=field_values,
+      is_deleted=issue.deleted, reporter_ref=reporter_ref,
+      opened_timestamp=issue.opened_timestamp,
+      closed_timestamp=issue.closed_timestamp,
+      modified_timestamp=issue.modified_timestamp,
+      component_modified_timestamp=issue.component_modified_timestamp,
+      status_modified_timestamp=issue.status_modified_timestamp,
+      owner_modified_timestamp=issue.owner_modified_timestamp,
+      star_count=issue.star_count, is_spam=issue.is_spam,
+      approval_values=approval_values, phases=phases)
+
+  # TODO(crbug.com/monorail/5857): Set attachment_count unconditionally
+  # after the underlying source of negative attachment counts has been
+  # resolved and database has been repaired.
+  if issue.attachment_count >= 0:
+    result.attachment_count = issue.attachment_count
+
+  return result
+
+
+def ConvertPhaseDef(phase):
+  """Convert a protorpc Phase to a protoc PhaseDef."""
+  phase_def = issue_objects_pb2.PhaseDef(
+      phase_ref=issue_objects_pb2.PhaseRef(phase_name=phase.name),
+      rank=phase.rank)
+  return phase_def
+
+
+def ConvertAmendment(amendment, users_by_id):
+  """Convert a protorpc Amendment to a protoc Amendment."""
+  field_name = tracker_bizobj.GetAmendmentFieldName(amendment)
+  new_value = tracker_bizobj.AmendmentString(amendment, users_by_id)
+  result = issue_objects_pb2.Amendment(
+      field_name=field_name, new_or_delta_value=new_value,
+      old_value=amendment.oldvalue)
+  return result
+
+
+def ConvertAttachment(attach, project_name):
+  """Convert a protorpc Attachment to a protoc Attachment."""
+  size, thumbnail_url, view_url, download_url = None, None, None, None
+  if not attach.deleted:
+    size = attach.filesize
+    download_url = attachment_helpers.GetDownloadURL(attach.attachment_id)
+    view_url = attachment_helpers.GetViewURL(attach, download_url, project_name)
+    thumbnail_url = attachment_helpers.GetThumbnailURL(attach, download_url)
+
+  result = issue_objects_pb2.Attachment(
+      attachment_id=attach.attachment_id, filename=attach.filename,
+      size=size, content_type=attach.mimetype,
+      is_deleted=attach.deleted, thumbnail_url=thumbnail_url,
+      view_url=view_url, download_url=download_url)
+  return result
+
+
+def ConvertComment(
+    issue, comment, config, users_by_id, comment_reporters, description_nums,
+    user_id, perms):
+  """Convert a protorpc IssueComment to a protoc Comment."""
+  commenter = users_by_id[comment.user_id]
+
+  can_delete = permissions.CanDeleteComment(
+      comment, commenter, user_id, perms)
+  can_flag, is_flagged = permissions.CanFlagComment(
+      comment, commenter, comment_reporters, user_id, perms)
+  can_view = permissions.CanViewComment(
+      comment, commenter, user_id, perms)
+  can_view_inbound_message = permissions.CanViewInboundMessage(
+      comment, user_id, perms)
+
+  is_deleted = bool(comment.deleted_by or is_flagged or commenter.banned)
+
+  result = issue_objects_pb2.Comment(
+      project_name=issue.project_name,
+      local_id=issue.local_id,
+      sequence_num=comment.sequence,
+      is_deleted=is_deleted,
+      can_delete=can_delete,
+      is_spam=is_flagged,
+      can_flag=can_flag,
+      timestamp=comment.timestamp)
+
+  if can_view:
+    result.commenter.CopyFrom(
+        ConvertUserRef(comment.user_id, None, users_by_id))
+    result.content = comment.content
+    if comment.inbound_message and can_view_inbound_message:
+      result.inbound_message = comment.inbound_message
+    result.amendments.extend([
+        ConvertAmendment(amend, users_by_id)
+        for amend in comment.amendments])
+    result.attachments.extend([
+        ConvertAttachment(attach, issue.project_name)
+        for attach in comment.attachments])
+
+  if comment.id in description_nums:
+    result.description_num = description_nums[comment.id]
+
+  fd = tracker_bizobj.FindFieldDefByID(comment.approval_id, config)
+  if fd:
+    result.approval_ref.field_name = fd.field_name
+
+  return result
+
+
+def ConvertCommentList(
+    issue, comments, config, users_by_id, comment_reporters, user_id, perms):
+  """Convert a list of protorpc IssueComments to protoc Comments."""
+  description_nums = {}
+  for comment in comments:
+    if (comment.is_description and not users_by_id[comment.user_id].banned and
+        not comment.deleted_by and not comment.is_spam):
+      description_nums[comment.id] = len(description_nums) + 1
+
+  result = [
+    ConvertComment(
+       issue, c, config, users_by_id, comment_reporters.get(c.id, []),
+       description_nums, user_id, perms)
+    for c in comments]
+  return result
+
+
+def IngestUserRef(cnxn, user_ref, user_service, autocreate=False):
+  """Return ID of specified user or raise NoSuchUserException."""
+  try:
+    return IngestUserRefs(
+        cnxn, [user_ref], user_service, autocreate=autocreate)[0]
+  except IndexError:
+    # user_ref.display_name was not a valid email.
+    raise exceptions.NoSuchUserException
+
+
+def IngestUserRefs(cnxn, user_refs, user_service, autocreate=False):
+  """Return IDs of specified users or raise NoSuchUserException."""
+
+  # Filter out user_refs with invalid display_names.
+  # Invalid emails won't get auto-created in LookupUserIds, but un-specified
+  # user_ref.user_id values have the zero-value 0. So invalid user_ref's
+  # need to be filtered out here to prevent these resulting in '0's in
+  # the 'result' array.
+  if autocreate:
+    user_refs = [user_ref for user_ref in user_refs
+                 if (not user_ref.display_name) or
+                 validate.IsValidEmail(user_ref.display_name)]
+
+  # 1. Verify that all specified user IDs actually match existing users.
+  user_ids_to_verify = [user_ref.user_id for user_ref in user_refs
+                        if user_ref.user_id]
+  user_service.LookupUserEmails(cnxn, user_ids_to_verify)
+
+  # 2. Lookup or create any users that are specified by email address.
+  needed_emails = [user_ref.display_name for user_ref in user_refs
+                   if not user_ref.user_id and user_ref.display_name]
+  emails_to_ids = user_service.LookupUserIDs(
+      cnxn, needed_emails, autocreate=autocreate)
+
+  # 3. Build the result from emails_to_ids or straight from user_ref's
+  # user_id.
+  # Note: user_id can be specified as 0 to clear the issue owner.
+  result = [
+      emails_to_ids.get(user_ref.display_name.lower(), user_ref.user_id)
+      for user_ref in user_refs
+  ]
+  return result
+
+
+def IngestPrefValues(pref_values):
+  """Return protorpc UserPrefValues for the given values."""
+  return [user_pb2.UserPrefValue(name=upv.name, value=upv.value)
+          for upv in pref_values]
+
+
+def IngestComponentRefs(comp_refs, config, ignore_missing_objects=False):
+  """Return IDs of specified components or raise NoSuchComponentException."""
+  cids_by_path = {cd.path.lower(): cd.component_id
+                  for cd in config.component_defs}
+  result = []
+  for comp_ref in comp_refs:
+    cid = cids_by_path.get(comp_ref.path.lower())
+    if cid:
+      result.append(cid)
+    else:
+      if not ignore_missing_objects:
+        raise exceptions.NoSuchComponentException()
+  return result
+
+
+def IngestFieldRefs(field_refs, config):
+  """Return IDs of specified fields or raise NoSuchFieldDefException."""
+  fids_by_name = {fd.field_name.lower(): fd.field_id
+                  for fd in config.field_defs}
+  result = []
+  for field_ref in field_refs:
+    fid = fids_by_name.get(field_ref.field_name.lower())
+    if fid:
+      result.append(fid)
+    else:
+      raise exceptions.NoSuchFieldDefException()
+  return result
+
+
+def IngestIssueRefs(cnxn, issue_refs, services):
+  """Look up issue IDs for the specified issues."""
+  project_names = set(ref.project_name for ref in issue_refs)
+  project_names_to_id = services.project.LookupProjectIDs(cnxn, project_names)
+  project_local_id_pairs = []
+  for ref in issue_refs:
+    if ref.ext_identifier:
+      # TODO(jeffcarp): For external tracker refs, once we have the classes
+      # set up, validate that the tracker for this specific ref is supported
+      # and store the external ref in the issue properly.
+      if '/' not in ref.ext_identifier:
+        raise exceptions.InvalidExternalIssueReference()
+      continue
+    if ref.project_name in project_names_to_id:
+      pair = (project_names_to_id[ref.project_name], ref.local_id)
+      project_local_id_pairs.append(pair)
+    else:
+      raise exceptions.NoSuchProjectException()
+  issue_ids, misses = services.issue.LookupIssueIDs(
+      cnxn, project_local_id_pairs)
+  if misses:
+    raise exceptions.NoSuchIssueException()
+  return issue_ids
+
+
+def IngestExtIssueRefs(issue_refs):
+  """Validate and return external issue refs."""
+  return [
+      ref.ext_identifier
+      for ref in issue_refs
+      if ref.ext_identifier
+      and federated.IsShortlinkValid(ref.ext_identifier)]
+
+
+def IngestIssueDelta(
+    cnxn, services, delta, config, phases, ignore_missing_objects=False):
+  """Ingest a protoc IssueDelta and create a protorpc IssueDelta."""
+  status = None
+  if delta.HasField('status'):
+    status = delta.status.value
+  owner_id = None
+  if delta.HasField('owner_ref'):
+    try:
+      owner_id = IngestUserRef(cnxn, delta.owner_ref, services.user)
+    except exceptions.NoSuchUserException as e:
+      if not ignore_missing_objects:
+        raise e
+  summary = None
+  if delta.HasField('summary'):
+    summary = delta.summary.value
+
+  cc_ids_add = IngestUserRefs(
+      cnxn, delta.cc_refs_add, services.user, autocreate=True)
+  cc_ids_remove = IngestUserRefs(cnxn, delta.cc_refs_remove, services.user)
+
+  comp_ids_add = IngestComponentRefs(
+      delta.comp_refs_add, config,
+      ignore_missing_objects=ignore_missing_objects)
+  comp_ids_remove = IngestComponentRefs(
+      delta.comp_refs_remove, config,
+      ignore_missing_objects=ignore_missing_objects)
+
+  labels_add = [lab_ref.label for lab_ref in delta.label_refs_add]
+  labels_remove = [lab_ref.label for lab_ref in delta.label_refs_remove]
+
+  field_vals_add, field_vals_remove = _RedistributeEnumFieldsIntoLabels(
+      labels_add, labels_remove,
+      delta.field_vals_add, delta.field_vals_remove,
+      config)
+
+  field_vals_add = IngestFieldValues(
+      cnxn, services.user, field_vals_add, config, phases=phases)
+  field_vals_remove = IngestFieldValues(
+      cnxn, services.user, field_vals_remove, config, phases=phases)
+  fields_clear = IngestFieldRefs(delta.fields_clear, config)
+
+  # Ingest intra-tracker issue refs.
+  blocked_on_add = IngestIssueRefs(
+      cnxn, delta.blocked_on_refs_add, services)
+  blocked_on_remove = IngestIssueRefs(
+      cnxn, delta.blocked_on_refs_remove, services)
+  blocking_add = IngestIssueRefs(
+      cnxn, delta.blocking_refs_add, services)
+  blocking_remove = IngestIssueRefs(
+      cnxn, delta.blocking_refs_remove, services)
+
+  # Ingest inter-tracker issue refs.
+  ext_blocked_on_add = IngestExtIssueRefs(delta.blocked_on_refs_add)
+  ext_blocked_on_remove = IngestExtIssueRefs(delta.blocked_on_refs_remove)
+  ext_blocking_add = IngestExtIssueRefs(delta.blocking_refs_add)
+  ext_blocking_remove = IngestExtIssueRefs(delta.blocking_refs_remove)
+
+  merged_into = None
+  merged_into_external = None
+  if delta.HasField('merged_into_ref'):
+    if delta.merged_into_ref.ext_identifier:  # Adding an external merged.
+      merged_into_external = delta.merged_into_ref.ext_identifier
+    elif not delta.merged_into_ref.local_id:  # Clearing an internal merged.
+      merged_into = 0
+    else:  # Adding an internal merged.
+      merged_into = IngestIssueRefs(cnxn, [delta.merged_into_ref], services)[0]
+
+  result = tracker_bizobj.MakeIssueDelta(
+      status, owner_id, cc_ids_add, cc_ids_remove, comp_ids_add,
+      comp_ids_remove, labels_add, labels_remove, field_vals_add,
+      field_vals_remove, fields_clear, blocked_on_add, blocked_on_remove,
+      blocking_add, blocking_remove, merged_into, summary,
+      ext_blocked_on_add=ext_blocked_on_add,
+      ext_blocked_on_remove=ext_blocked_on_remove,
+      ext_blocking_add=ext_blocking_add,
+      ext_blocking_remove=ext_blocking_remove,
+      merged_into_external=merged_into_external)
+  return result
+
+def IngestAttachmentUploads(attachment_uploads):
+  """Ingest protoc AttachmentUpload objects as tuples."""
+  result = []
+  for up in attachment_uploads:
+    if not up.filename:
+      raise exceptions.InputException('Missing attachment name')
+    if not up.content:
+      raise exceptions.InputException('Missing attachment content')
+    mimetype = filecontent.GuessContentTypeFromFilename(up.filename)
+    attachment_tuple = (up.filename, up.content, mimetype)
+    result.append(attachment_tuple)
+  return result
+
+
+def IngestApprovalDelta(cnxn, user_service, approval_delta, setter_id, config):
+  """Ingest a protoc ApprovalDelta and create a protorpc ApprovalDelta."""
+  fids_by_name = {fd.field_name.lower(): fd.field_id for
+                       fd in config.field_defs}
+
+  approver_ids_add = IngestUserRefs(
+      cnxn, approval_delta.approver_refs_add, user_service, autocreate=True)
+  approver_ids_remove = IngestUserRefs(
+      cnxn, approval_delta.approver_refs_remove, user_service, autocreate=True)
+
+  labels_add, labels_remove = [], []
+  # TODO(jojwang): monorail:4673, validate enum values all belong to approval.
+  field_vals_add, field_vals_remove = _RedistributeEnumFieldsIntoLabels(
+      labels_add, labels_remove,
+      approval_delta.field_vals_add, approval_delta.field_vals_remove,
+      config)
+
+  sub_fvs_add = IngestFieldValues(cnxn, user_service, field_vals_add, config)
+  sub_fvs_remove = IngestFieldValues(
+      cnxn, user_service, field_vals_remove, config)
+  sub_fields_clear = [fids_by_name.get(clear.field_name.lower()) for
+                      clear in approval_delta.fields_clear
+                      if clear.field_name.lower() in fids_by_name]
+
+  # protoc ENUMs default to the zero value (in this case: NOT_SET).
+  # NOT_SET should only be allowed when an issue is first created.
+  # Once a user changes it to something else, no one should be allowed
+  # to set it back.
+  status = None
+  if approval_delta.status != issue_objects_pb2.NOT_SET:
+    status = IngestApprovalStatus(approval_delta.status)
+
+  return tracker_bizobj.MakeApprovalDelta(
+      status, setter_id, approver_ids_add, approver_ids_remove,
+      sub_fvs_add, sub_fvs_remove, sub_fields_clear, labels_add, labels_remove)
+
+
+def IngestApprovalStatus(approval_status):
+  """Ingest a protoc ApprovalStatus and create a protorpc ApprovalStatus. """
+  if approval_status == issue_objects_pb2.NOT_SET:
+    return tracker_pb2.ApprovalStatus.NOT_SET
+  return tracker_pb2.ApprovalStatus(approval_status)
+
+
+def IngestFieldValues(cnxn, user_service, field_values, config, phases=None):
+  """Ingest a list of protoc FieldValues and create protorpc FieldValues.
+
+  Args:
+    cnxn: connection to the DB.
+    user_service: interface to user data storage.
+    field_values: a list of protoc FieldValue used by the API.
+    config: ProjectIssueConfig for this field_value's project.
+    phases: a list of the issue's protorpc Phases.
+
+
+  Returns: A protorpc FieldValue object.
+  """
+  fds_by_name = {fd.field_name.lower(): fd for fd in config.field_defs}
+  phases_by_name = {phase.name: phase.phase_id for phase in phases or []}
+
+  ingested_fvs = []
+  for fv in field_values:
+    fd = fds_by_name.get(fv.field_ref.field_name.lower())
+    if fd:
+      if not fv.value:
+        logging.info('Ignoring blank field value: %r', fv)
+        continue
+      ingested_fv = field_helpers.ParseOneFieldValue(
+          cnxn, user_service, fd, fv.value)
+      if not ingested_fv:
+        raise exceptions.InputException(
+          'Unparsable value for field %s' % fv.field_ref.field_name)
+      if ingested_fv.user_id == field_helpers.INVALID_USER_ID:
+        raise exceptions.NoSuchUserException()
+      if fd.is_phase_field:
+        ingested_fv.phase_id = phases_by_name.get(fv.phase_ref.phase_name)
+      ingested_fvs.append(ingested_fv)
+
+  return ingested_fvs
+
+
+def IngestSavedQueries(cnxn, project_service, saved_queries):
+  """Ingest a list of protoc SavedQuery and create protorpc SavedQuery.
+
+  Args:
+    cnxn: connection to the DB.
+    project_service: interface to project data storage.
+    saved_queries: a list of protoc Savedquery.
+
+  Returns: A protorpc SavedQuery object.
+  """
+  if not saved_queries:
+    return []
+
+  project_ids = set()
+  for sq in saved_queries:
+    project_ids.update(sq.executes_in_project_ids)
+
+  project_name_dict = project_service.LookupProjectNames(cnxn,
+      project_ids)
+  return [
+      common_pb2.SavedQuery(
+          query_id=sq.query_id,
+          name=sq.name,
+          query=sq.query,
+          project_names=[project_name_dict[project_id]
+              for project_id in sq.executes_in_project_ids]
+      )
+      for sq in saved_queries]
+
+
+def IngestHotlistRefs(cnxn, user_service, features_service, hotlist_refs):
+  return [IngestHotlistRef(cnxn, user_service, features_service, hotlist_ref)
+        for hotlist_ref in hotlist_refs]
+
+
+def IngestHotlistRef(cnxn, user_service, features_service, hotlist_ref):
+  hotlist_id = None
+
+  if hotlist_ref.hotlist_id:
+    # If a hotlist ID was specified, verify it actually match existing hotlists.
+    features_service.GetHotlist(cnxn, hotlist_ref.hotlist_id)
+    hotlist_id = hotlist_ref.hotlist_id
+
+  if hotlist_ref.name and hotlist_ref.owner:
+    name = hotlist_ref.name
+    owner_id = IngestUserRef(cnxn, hotlist_ref.owner, user_service)
+    hotlists = features_service.LookupHotlistIDs(cnxn, [name], [owner_id])
+    # Verify there is a hotlist with that name and owner.
+    if (name.lower(), owner_id) not in hotlists:
+      raise features_svc.NoSuchHotlistException()
+    found_id = hotlists[name.lower(), owner_id]
+    # If a hotlist_id was also given, verify it correspond to the name and
+    # owner.
+    if hotlist_id is not None and found_id != hotlist_id:
+      raise features_svc.NoSuchHotlistException()
+    hotlist_id = found_id
+
+  # Neither an ID, nor a name-owner ref were given.
+  if hotlist_id is None:
+    raise features_svc.NoSuchHotlistException()
+
+  return hotlist_id
+
+
+def IngestPagination(pagination):
+  max_items = settings.max_artifact_search_results_per_page
+  if pagination.max_items:
+    max_items = min(max_items, pagination.max_items)
+  return pagination.start, max_items
+
+# Convert and ingest objects in project_objects.proto.
+
+def ConvertStatusDef(status_def):
+  """Convert a protorpc StatusDef into a protoc StatusDef."""
+  result = project_objects_pb2.StatusDef(
+      status=status_def.status,
+      means_open=status_def.means_open,
+      docstring=status_def.status_docstring,
+      deprecated=status_def.deprecated)
+  return result
+
+
+def ConvertLabelDef(label_def):
+  """Convert a protorpc LabelDef into a protoc LabelDef."""
+  result = project_objects_pb2.LabelDef(
+      label=label_def.label,
+      docstring=label_def.label_docstring,
+      deprecated=label_def.deprecated)
+  return result
+
+
+def ConvertComponentDef(
+  component_def, users_by_id, labels_by_id, include_admin_info):
+  """Convert a protorpc ComponentDef into a protoc ComponentDef."""
+  if not include_admin_info:
+    return project_objects_pb2.ComponentDef(
+        path=component_def.path,
+        docstring=component_def.docstring,
+        deprecated=component_def.deprecated)
+
+  admin_refs = ConvertUserRefs(component_def.admin_ids, [], users_by_id, False)
+  cc_refs = ConvertUserRefs(component_def.cc_ids, [], users_by_id, False)
+  labels = [labels_by_id[lid] for lid in component_def.label_ids]
+  label_refs = ConvertLabels(labels, [])
+  creator_ref = ConvertUserRef(component_def.creator_id, None, users_by_id)
+  modifier_ref = ConvertUserRef(component_def.modifier_id, None, users_by_id)
+  return project_objects_pb2.ComponentDef(
+      path=component_def.path,
+      docstring=component_def.docstring,
+      admin_refs=admin_refs,
+      cc_refs=cc_refs,
+      deprecated=component_def.deprecated,
+      created=component_def.created,
+      creator_ref=creator_ref,
+      modified=component_def.modified,
+      modifier_ref=modifier_ref,
+      label_refs=label_refs)
+
+
+def ConvertFieldDef(field_def, user_choices, users_by_id, config,
+                    include_admin_info):
+  """Convert a protorpc FieldDef into a protoc FieldDef."""
+  parent_approval_name = None
+  if field_def.approval_id:
+    parent_fd = tracker_bizobj.FindFieldDefByID(field_def.approval_id, config)
+    if parent_fd:
+      parent_approval_name = parent_fd.field_name
+  field_ref = ConvertFieldRef(
+      field_def.field_id, field_def.field_name, field_def.field_type,
+      parent_approval_name)
+
+  enum_choices = []
+  if field_def.field_type == tracker_pb2.FieldTypes.ENUM_TYPE:
+    masked_labels = tracker_helpers.LabelsMaskedByFields(
+        config, [field_def.field_name], True)
+    enum_choices = [
+        project_objects_pb2.LabelDef(
+            label=label.name,
+            docstring=label.docstring,
+            deprecated=(label.commented == '#'))
+        for label in masked_labels]
+
+  if not include_admin_info:
+    return project_objects_pb2.FieldDef(
+        field_ref=field_ref,
+        docstring=field_def.docstring,
+        # Display full email address for user choices.
+        user_choices=ConvertUserRefs(user_choices, [], users_by_id, True),
+        enum_choices=enum_choices)
+
+  admin_refs = ConvertUserRefs(field_def.admin_ids, [], users_by_id, False)
+  # TODO(jrobbins): validation, permission granting, and notification options.
+
+  return project_objects_pb2.FieldDef(
+      field_ref=field_ref,
+      applicable_type=field_def.applicable_type,
+      is_required=field_def.is_required,
+      is_niche=field_def.is_niche,
+      is_multivalued=field_def.is_multivalued,
+      docstring=field_def.docstring,
+      admin_refs=admin_refs,
+      is_phase_field=field_def.is_phase_field,
+      enum_choices=enum_choices)
+
+
+def ConvertApprovalDef(approval_def, users_by_id, config, include_admin_info):
+  """Convert a protorpc ApprovalDef into a protoc ApprovalDef."""
+  field_def = tracker_bizobj.FindFieldDefByID(approval_def.approval_id, config)
+  field_ref = ConvertFieldRef(field_def.field_id, field_def.field_name,
+                              field_def.field_type, None)
+  if not include_admin_info:
+    return project_objects_pb2.ApprovalDef(field_ref=field_ref)
+
+  approver_refs = ConvertUserRefs(approval_def.approver_ids, [], users_by_id,
+                                  False)
+  return project_objects_pb2.ApprovalDef(
+      field_ref=field_ref,
+      approver_refs=approver_refs,
+      survey=approval_def.survey)
+
+
+def ConvertConfig(
+    project, config, users_by_id, labels_by_id):
+  """Convert a protorpc ProjectIssueConfig into a protoc Config."""
+  status_defs = [
+      ConvertStatusDef(sd)
+      for sd in config.well_known_statuses]
+  statuses_offer_merge = [
+      ConvertStatusRef(sd.status, None, config)
+      for sd in config.well_known_statuses
+      if sd.status in config.statuses_offer_merge]
+  label_defs = [
+      ConvertLabelDef(ld)
+      for ld in config.well_known_labels]
+  component_defs = [
+      ConvertComponentDef(
+          cd, users_by_id, labels_by_id, True)
+      for cd in config.component_defs]
+  field_defs = [
+      ConvertFieldDef(fd, [], users_by_id, config, True)
+      for fd in config.field_defs
+      if not fd.is_deleted]
+  approval_defs = [
+      ConvertApprovalDef(ad, users_by_id, config, True)
+      for ad in config.approval_defs]
+  result = project_objects_pb2.Config(
+      project_name=project.project_name,
+      status_defs=status_defs,
+      statuses_offer_merge=statuses_offer_merge,
+      label_defs=label_defs,
+      exclusive_label_prefixes=config.exclusive_label_prefixes,
+      component_defs=component_defs,
+      field_defs=field_defs,
+      approval_defs=approval_defs,
+      restrict_to_known=config.restrict_to_known)
+  return result
+
+
+def ConvertProjectTemplateDefs(templates, users_by_id, config):
+  """Convert a project's protorpc TemplateDefs into protoc TemplateDefs."""
+  converted_templates = []
+  for template in templates:
+    owner_ref = ConvertUserRef(template.owner_id, None, users_by_id)
+    status_ref = ConvertStatusRef(template.status, None, config)
+    labels, _derived_labels = tracker_bizobj.ExplicitAndDerivedNonMaskedLabels(
+        template.labels, [], config)
+    label_refs = ConvertLabels(labels, [])
+    admin_refs = ConvertUserRefs(template.admin_ids, [], users_by_id, False)
+    field_values = ConvertFieldValues(
+        config, template.labels, [], template.field_values, users_by_id,
+        phases=template.phases)
+    component_refs = ConvertComponents(template.component_ids, [], config)
+    approval_values = ConvertApprovalValues(
+        template.approval_values, template.phases, users_by_id, config)
+    phases = [ConvertPhaseDef(phase) for phase in template.phases]
+
+    converted_templates.append(
+        project_objects_pb2.TemplateDef(
+            template_name=template.name, content=template.content,
+            summary=template.summary,
+            summary_must_be_edited=template.summary_must_be_edited,
+            owner_ref=owner_ref, status_ref=status_ref, label_refs=label_refs,
+            members_only=template.members_only,
+            owner_defaults_to_member=template.owner_defaults_to_member,
+            admin_refs=admin_refs, field_values=field_values,
+            component_refs=component_refs,
+            component_required=template.component_required,
+            approval_values=approval_values, phases=phases)
+    )
+  return converted_templates
+
+
+def ConvertHotlist(hotlist, users_by_id):
+  """Convert a protorpc Hotlist into a protoc Hotlist."""
+  owner_ref = ConvertUserRef(
+      hotlist.owner_ids[0], None, users_by_id)
+  editor_refs = ConvertUserRefs(hotlist.editor_ids, [], users_by_id, False)
+  follower_refs = ConvertUserRefs(
+      hotlist.follower_ids, [], users_by_id, False)
+  result = features_objects_pb2.Hotlist(
+      owner_ref=owner_ref,
+      editor_refs=editor_refs,
+      follower_refs=follower_refs,
+      name=hotlist.name,
+      summary=hotlist.summary,
+      description=hotlist.description,
+      default_col_spec=hotlist.default_col_spec,
+      is_private=hotlist.is_private,
+  )
+  return result
+
+
+def ConvertHotlistItems(hotlist_items, issues_by_id, users_by_id, related_refs,
+                        harmonized_config):
+  # Note: hotlist_items are not always sorted by 'rank'
+  sorted_ranks = sorted(item.rank for item in hotlist_items)
+  friendly_ranks_dict = {
+      rank: friendly_rank for friendly_rank, rank in
+      enumerate(sorted_ranks, 1)}
+  converted_items = []
+  for item in hotlist_items:
+    issue_pb = issues_by_id[item.issue_id]
+    issue = ConvertIssue(
+        issue_pb, users_by_id, related_refs, harmonized_config)
+    adder_ref = ConvertUserRef(item.adder_id, None, users_by_id)
+    converted_items.append(features_objects_pb2.HotlistItem(
+        issue=issue,
+        rank=friendly_ranks_dict[item.rank],
+        adder_ref=adder_ref,
+        added_timestamp=item.date_added,
+        note=item.note))
+  return converted_items
+
+
+def ConvertValueAndWhy(value_and_why):
+  return common_pb2.ValueAndWhy(
+      value=value_and_why.get('value'),
+      why=value_and_why.get('why'))
+
+
+def ConvertValueAndWhyList(value_and_why_list):
+  return [ConvertValueAndWhy(vnw) for vnw in value_and_why_list]
+
+
+def _RedistributeEnumFieldsIntoLabels(
+    labels_add, labels_remove, field_vals_add, field_vals_remove, config):
+  """Look at the custom field values and treat enum fields as labels.
+
+  Args:
+    labels_add: list of labels to add/set on the issue.
+    labels_remove: list of labels to remove from the issue.
+    field_val_add: list of protoc FieldValues to be added.
+    field_val_remove: list of protoc FieldValues to be removed.
+        remove.
+    config: ProjectIssueConfig PB including custom field definitions.
+
+  Returns:
+    Two revised lists of protoc FieldValues to be added and removed,
+      without enum_types.
+
+  SIDE-EFFECT: the labels and labels_remove lists will be extended with
+  key-value labels corresponding to the enum field values.
+  """
+  field_val_strs_add = {}
+  for field_val in field_vals_add:
+    field_val_strs_add.setdefault(field_val.field_ref.field_id, []).append(
+        field_val.value)
+
+  field_val_strs_remove = {}
+  for field_val in field_vals_remove:
+    field_val_strs_remove.setdefault(field_val.field_ref.field_id, []).append(
+        field_val.value)
+
+  field_helpers.ShiftEnumFieldsIntoLabels(
+      labels_add, labels_remove, field_val_strs_add, field_val_strs_remove,
+      config)
+
+  # Filter out the fields that were shifted into labels
+  updated_field_vals_add = [
+      fv for fv in field_vals_add
+      if fv.field_ref.field_id in field_val_strs_add]
+  updated_field_vals_remove = [
+      fv for fv in field_vals_remove
+      if fv.field_ref.field_id in field_val_strs_remove]
+
+  return updated_field_vals_add, updated_field_vals_remove
diff --git a/api/features_servicer.py b/api/features_servicer.py
new file mode 100644
index 0000000..2ae49c5
--- /dev/null
+++ b/api/features_servicer.py
@@ -0,0 +1,323 @@
+# Copyright 2018 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from api import monorail_servicer
+from api import converters
+from api.api_proto import common_pb2
+from api.api_proto import features_pb2
+from api.api_proto import features_prpc_pb2
+from businesslogic import work_env
+from features import component_helpers
+from features import features_bizobj
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_views
+from framework import paginate
+from framework import permissions
+from services import features_svc
+from tracker import tracker_bizobj
+
+
+class FeaturesServicer(monorail_servicer.MonorailServicer):
+  """Handle API requests related to Features objects.
+
+  Each API request is implemented with a method as defined in the .proto
+  file that does any request-specific validation, uses work_env to
+  safely operate on business objects, and returns a response proto.
+  """
+
+  DESCRIPTION = features_prpc_pb2.FeaturesServiceDescription
+
+  @monorail_servicer.PRPCMethod
+  def ListHotlistsByUser(self, mc, request):
+    """Return the hotlists for the given user."""
+    user_id = converters.IngestUserRef(
+        mc.cnxn, request.user, self.services.user)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      mc.LookupLoggedInUserPerms(None)
+      hotlists = we.ListHotlistsByUser(user_id)
+
+    with mc.profiler.Phase('making user views'):
+      users_involved = features_bizobj.UsersInvolvedInHotlists(hotlists)
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, users_involved)
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, users_by_id)
+
+    converted_hotlists = [
+        converters.ConvertHotlist(hotlist, users_by_id)
+        for hotlist in hotlists]
+
+    result = features_pb2.ListHotlistsByUserResponse(
+        hotlists=converted_hotlists)
+
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def ListHotlistsByIssue(self, mc, request):
+    # type: (MonorailConnection, proto.features.ListHotlistsByIssueRequest) ->
+    #     proto.features.ListHotlistsByIssueResponse
+    """Return the hotlists the given issue is part of."""
+    issue_id = converters.IngestIssueRefs(
+        mc.cnxn, [request.issue], self.services)[0]
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      project = we.GetProjectByName(request.issue.project_name)
+      mc.LookupLoggedInUserPerms(project)
+      hotlists = we.ListHotlistsByIssue(issue_id)
+
+    # Reduce spam by only showing hotlists that belong to a project member.
+    project_hotlists = [
+        hotlist for hotlist in hotlists if framework_bizobj.UserIsInProject(
+            project, set(hotlist.owner_ids + hotlist.editor_ids)) or
+        features_bizobj.UserIsInHotlist(hotlist, mc.auth.effective_ids)
+    ]
+    if project_hotlists and len(hotlists) / len(project_hotlists) > 10:
+      logging.warning(
+          'Unusual hotlist activity in %s:%s' %
+          (request.issue.project_name, issue_id))
+
+    with mc.profiler.Phase('making user views'):
+      users_involved = features_bizobj.UsersInvolvedInHotlists(project_hotlists)
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, users_involved)
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, users_by_id)
+
+    converted_hotlists = [
+        converters.ConvertHotlist(hotlist, users_by_id)
+        for hotlist in project_hotlists
+    ]
+
+    result = features_pb2.ListHotlistsByIssueResponse(
+        hotlists=converted_hotlists)
+
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def ListRecentlyVisitedHotlists(self, mc, _request):
+    """Return the recently visited hotlists for the logged in user."""
+    with work_env.WorkEnv(mc, self.services) as we:
+      mc.LookupLoggedInUserPerms(None)
+      hotlists = we.ListRecentlyVisitedHotlists()
+
+    with mc.profiler.Phase('making user views'):
+      users_involved = features_bizobj.UsersInvolvedInHotlists(hotlists)
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, users_involved)
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, users_by_id)
+
+    converted_hotlists = [
+        converters.ConvertHotlist(hotlist, users_by_id)
+        for hotlist in hotlists]
+
+    result = features_pb2.ListRecentlyVisitedHotlistsResponse(
+        hotlists=converted_hotlists)
+
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def ListStarredHotlists(self, mc, _request):
+    """Return the starred hotlists for the logged in user."""
+    with work_env.WorkEnv(mc, self.services) as we:
+      mc.LookupLoggedInUserPerms(None)
+      hotlists = we.ListStarredHotlists()
+
+    with mc.profiler.Phase('maknig user views'):
+      users_involved = features_bizobj.UsersInvolvedInHotlists(hotlists)
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, users_involved)
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, users_by_id)
+
+    converted_hotlists = [
+        converters.ConvertHotlist(hotlist, users_by_id)
+        for hotlist in hotlists]
+
+    result = features_pb2.ListStarredHotlistsResponse(
+        hotlists=converted_hotlists)
+
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def GetHotlistStarCount(self, mc, request):
+    """Get the star count for the specified hotlist."""
+    hotlist_id = converters.IngestHotlistRef(
+        mc.cnxn, self.services.user, self.services.features,
+        request.hotlist_ref)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      mc.LookupLoggedInUserPerms(None)
+      star_count = we.GetHotlistStarCount(hotlist_id)
+
+    result = features_pb2.GetHotlistStarCountResponse(star_count=star_count)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def StarHotlist(self, mc, request):
+    """Star the specified hotlist."""
+    hotlist_id = converters.IngestHotlistRef(
+        mc.cnxn, self.services.user, self.services.features,
+        request.hotlist_ref)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      mc.LookupLoggedInUserPerms(None)
+      we.StarHotlist(hotlist_id, request.starred)
+      star_count = we.GetHotlistStarCount(hotlist_id)
+
+    result = features_pb2.StarHotlistResponse(star_count=star_count)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def GetHotlist(self, mc, request):
+    """Get the Hotlist metadata for the specified hotlist."""
+    hotlist_id = converters.IngestHotlistRef(
+        mc.cnxn, self.services.user, self.services.features,
+        request.hotlist_ref)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      mc.LookupLoggedInUserPerms(None)
+      hotlist = we.GetHotlist(hotlist_id)
+
+    with mc.profiler.Phase('making user views'):
+      users_involved = features_bizobj.UsersInvolvedInHotlists([hotlist])
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, users_involved)
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, users_by_id)
+
+    converted_hotlist = converters.ConvertHotlist(hotlist, users_by_id)
+    return features_pb2.GetHotlistResponse(hotlist=converted_hotlist)
+
+  @monorail_servicer.PRPCMethod
+  def CreateHotlist(self, mc, request):
+    """Create a new hotlist."""
+    editor_ids = converters.IngestUserRefs(
+        mc.cnxn, request.editor_refs, self.services.user)
+    issue_ids = converters.IngestIssueRefs(
+        mc.cnxn, request.issue_refs, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.CreateHotlist(
+          request.name, request.summary, request.description, editor_ids,
+          issue_ids, request.is_private, '')
+
+    result = features_pb2.CreateHotlistResponse()
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def CheckHotlistName(self, mc, request):
+    """Check that a hotlist name is valid and not already in use."""
+    with work_env.WorkEnv(mc, self.services) as we:
+      error = we.CheckHotlistName(request.name)
+    result = features_pb2.CheckHotlistNameResponse(error=error)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def RemoveIssuesFromHotlists(self, mc, request):
+    """Remove the given issues from the given hotlists."""
+    hotlist_ids = converters.IngestHotlistRefs(
+        mc.cnxn, self.services.user, self.services.features,
+        request.hotlist_refs)
+    issue_ids = converters.IngestIssueRefs(
+        mc.cnxn, request.issue_refs, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      mc.LookupLoggedInUserPerms(None)
+      we.RemoveIssuesFromHotlists(hotlist_ids, issue_ids)
+
+    result = features_pb2.RemoveIssuesFromHotlistsResponse()
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def AddIssuesToHotlists(self, mc, request):
+    """Add the given issues to the given hotlists."""
+    hotlist_ids = converters.IngestHotlistRefs(
+        mc.cnxn, self.services.user, self.services.features,
+        request.hotlist_refs)
+    issue_ids = converters.IngestIssueRefs(
+        mc.cnxn, request.issue_refs, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      mc.LookupLoggedInUserPerms(None)
+      we.AddIssuesToHotlists(hotlist_ids, issue_ids, request.note)
+
+    result = features_pb2.AddIssuesToHotlistsResponse()
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def RerankHotlistIssues(self, mc, request):
+    """Rerank issues in the given hotlist."""
+    hotlist_id = converters.IngestHotlistRef(
+        mc.cnxn, self.services.user, self.services.features,
+        request.hotlist_ref)
+    moved_issue_ids = converters.IngestIssueRefs(
+        mc.cnxn, request.moved_refs, self.services)
+    [target_issue_id] = converters.IngestIssueRefs(
+        mc.cnxn, [request.target_ref], self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.RerankHotlistIssues(
+          hotlist_id, moved_issue_ids, target_issue_id, request.split_above)
+
+    # TODO(jojwang): return updated hotlist items.
+    with mc.profiler.Phase('converting to response objects'):
+      result = features_pb2.RerankHotlistIssuesResponse()
+
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def UpdateHotlistIssueNote(self, mc, request):
+    """Update the note for the given issue in the given hotlist."""
+    hotlist_id = converters.IngestHotlistRef(
+        mc.cnxn, self.services.user, self.services.features,
+        request.hotlist_ref)
+    issue_id = converters.IngestIssueRefs(
+        mc.cnxn, [request.issue_ref], self.services)[0]
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      project = we.GetProjectByName(request.issue_ref.project_name)
+      mc.LookupLoggedInUserPerms(project)
+      we.UpdateHotlistIssueNote(hotlist_id, issue_id, request.note)
+
+    result = features_pb2.UpdateHotlistIssueNoteResponse()
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def DeleteHotlist(self, mc, request):
+    """Delete the given hotlist"""
+    hotlist_id = converters.IngestHotlistRef(
+        mc.cnxn, self.services.user, self.services.features,
+        request.hotlist_ref)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.DeleteHotlist(hotlist_id)
+
+    return features_pb2.DeleteHotlistResponse()
+
+  # TODO(https://crbug.com/monorail/7515): Replace or delete PredictComponent.
+  @monorail_servicer.PRPCMethod
+  def PredictComponent(self, mc, request):
+    """Predict the component of an issue based on the given text."""
+    with work_env.WorkEnv(mc, self.services) as we:
+      project = we.GetProjectByName(request.project_name)
+      config = we.GetProjectConfig(project.project_id)
+
+    component_ref = None
+    component_id = component_helpers.PredictComponent(request.text, config)
+
+    if component_id:
+      component_ref = converters.ConvertComponentRef(component_id, config)
+
+    result = features_pb2.PredictComponentResponse(component_ref=component_ref)
+    return result
diff --git a/api/issues_servicer.py b/api/issues_servicer.py
new file mode 100644
index 0000000..1cdfeca
--- /dev/null
+++ b/api/issues_servicer.py
@@ -0,0 +1,801 @@
+# Copyright 2018 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import copy
+import logging
+
+from google.protobuf import empty_pb2
+
+import settings
+from api import monorail_servicer
+from api import converters
+from api.api_proto import issue_objects_pb2
+from api.api_proto import issues_pb2
+from api.api_proto import issues_prpc_pb2
+from businesslogic import work_env
+from features import filterrules_helpers
+from features import savedqueries_helpers
+from framework import exceptions
+from framework import framework_constants
+from framework import framework_views
+from framework import permissions
+from proto import tracker_pb2
+from search import searchpipeline
+from tracker import field_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_helpers
+
+
+class IssuesServicer(monorail_servicer.MonorailServicer):
+  """Handle API requests related to Issue objects.
+
+  Each API request is implemented with a method as defined in the
+  .proto file that does any request-specific validation, uses work_env
+  to safely operate on business objects, and returns a response proto.
+  """
+
+  DESCRIPTION = issues_prpc_pb2.IssuesServiceDescription
+
+  def _GetProjectIssueAndConfig(
+      self, mc, issue_ref, use_cache=True, issue_required=True,
+      view_deleted=False):
+    """Get three objects that we need for most requests with an issue_ref."""
+    issue = None
+    with work_env.WorkEnv(mc, self.services, phase='getting P, I, C') as we:
+      project = we.GetProjectByName(
+          issue_ref.project_name, use_cache=use_cache)
+      mc.LookupLoggedInUserPerms(project)
+      config = we.GetProjectConfig(project.project_id, use_cache=use_cache)
+      if issue_required or issue_ref.local_id:
+        try:
+          issue = we.GetIssueByLocalID(
+              project.project_id, issue_ref.local_id, use_cache=use_cache,
+              allow_viewing_deleted=view_deleted)
+        except exceptions.NoSuchIssueException as e:
+          issue = None
+          if issue_required:
+            raise e
+    return project, issue, config
+
+  def _GetProjectIssueIDsAndConfig(
+      self, mc, issue_refs, use_cache=True):
+    """Get info from a single project for repeated issue_refs requests."""
+    project_names = set()
+    local_ids = []
+    for issue_ref in issue_refs:
+      if not issue_ref.local_id:
+        raise exceptions.InputException('Param `local_id` required.')
+      local_ids.append(issue_ref.local_id)
+      if issue_ref.project_name:
+        project_names.add(issue_ref.project_name)
+
+    if not project_names:
+      raise exceptions.InputException('Param `project_name` required.')
+    if len(project_names) != 1:
+      raise exceptions.InputException(
+          'This method does not support cross-project issue_refs.')
+    project_name = project_names.pop()
+    with work_env.WorkEnv(mc, self.services, phase='getting P, I ids, C') as we:
+      project = we.GetProjectByName(project_name, use_cache=use_cache)
+      mc.LookupLoggedInUserPerms(project)
+      config = we.GetProjectConfig(project.project_id, use_cache=use_cache)
+      project_local_id_pairs = [(project.project_id, local_id)
+                                for local_id in local_ids]
+    issue_ids, _misses = self.services.issue.LookupIssueIDs(
+        mc.cnxn, project_local_id_pairs)
+    return project, issue_ids, config
+
+  @monorail_servicer.PRPCMethod
+  def CreateIssue(self, _mc, request):
+    response = issue_objects_pb2.Issue()
+    response.CopyFrom(request.issue)
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def GetIssue(self, mc, request):
+    """Return the specified issue in a response proto."""
+    issue_ref = request.issue_ref
+    project, issue, config = self._GetProjectIssueAndConfig(
+        mc, issue_ref, view_deleted=True, issue_required=False)
+
+    # Code for getting where a moved issue was moved to.
+    if issue is None:
+      moved_to_ref = self.services.issue.GetCurrentLocationOfMovedIssue(
+          mc.cnxn, project.project_id, issue_ref.local_id)
+      moved_to_project_id, moved_to_id = moved_to_ref
+      moved_to_project_name = None
+
+      if moved_to_project_id is not None:
+        with work_env.WorkEnv(mc, self.services) as we:
+          moved_to_project = we.GetProject(moved_to_project_id)
+          moved_to_project_name = moved_to_project.project_name
+        return issues_pb2.IssueResponse(moved_to_ref=converters.ConvertIssueRef(
+            (moved_to_project_name, moved_to_id)))
+
+      raise exceptions.NoSuchIssueException()
+
+    if issue.deleted:
+      return issues_pb2.IssueResponse(
+          issue=issue_objects_pb2.Issue(is_deleted=True))
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      related_refs = we.GetRelatedIssueRefs([issue])
+
+    with mc.profiler.Phase('making user views'):
+      users_involved_in_issue = tracker_bizobj.UsersInvolvedInIssues([issue])
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, users_involved_in_issue)
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, users_by_id, project)
+
+    with mc.profiler.Phase('converting to response objects'):
+      response = issues_pb2.IssueResponse()
+      response.issue.CopyFrom(converters.ConvertIssue(
+          issue, users_by_id, related_refs, config))
+
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def ListIssues(self, mc, request):
+    """Return the list of issues for projects that satisfy the given query."""
+    use_cached_searches = not settings.local_mode
+    can = request.canned_query or 1
+    with work_env.WorkEnv(mc, self.services) as we:
+      start, max_items = converters.IngestPagination(request.pagination)
+      pipeline = we.ListIssues(
+          request.query, request.project_names, mc.auth.user_id, max_items,
+          start, can, request.group_by_spec, request.sort_spec,
+          use_cached_searches)
+    with mc.profiler.Phase('reveal emails to members'):
+      projects = self.services.project.GetProjectsByName(
+          mc.cnxn, request.project_names)
+      for _, p in projects.items():
+        framework_views.RevealAllEmailsToMembers(
+            mc.cnxn, self.services, mc.auth, pipeline.users_by_id, p)
+
+    converted_results = []
+    with work_env.WorkEnv(mc, self.services) as we:
+      for issue in (pipeline.visible_results or []):
+        related_refs = we.GetRelatedIssueRefs([issue])
+        converted_results.append(
+            converters.ConvertIssue(issue, pipeline.users_by_id, related_refs,
+                                    pipeline.harmonized_config))
+    total_results = 0
+    if hasattr(pipeline.pagination, 'total_count'):
+      total_results = pipeline.pagination.total_count
+    return issues_pb2.ListIssuesResponse(
+        issues=converted_results, total_results=total_results)
+
+
+  @monorail_servicer.PRPCMethod
+  def ListReferencedIssues(self, mc, request):
+    """Return the specified issues in a response proto."""
+    if not request.issue_refs:
+      return issues_pb2.ListReferencedIssuesResponse()
+
+    for issue_ref in request.issue_refs:
+      if not issue_ref.project_name:
+        raise exceptions.InputException('Param `project_name` required.')
+      if not issue_ref.local_id:
+        raise exceptions.InputException('Param `local_id` required.')
+
+    default_project_name = request.issue_refs[0].project_name
+    ref_tuples = [
+        (ref.project_name, ref.local_id) for ref in request.issue_refs]
+    with work_env.WorkEnv(mc, self.services) as we:
+      open_issues, closed_issues = we.ListReferencedIssues(
+          ref_tuples, default_project_name)
+      all_issues = open_issues + closed_issues
+      all_project_ids = [issue.project_id for issue in all_issues]
+      related_refs = we.GetRelatedIssueRefs(all_issues)
+      configs = we.GetProjectConfigs(all_project_ids)
+
+    with mc.profiler.Phase('making user views'):
+      users_involved = tracker_bizobj.UsersInvolvedInIssues(all_issues)
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, users_involved)
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, users_by_id)
+
+    with mc.profiler.Phase('converting to response objects'):
+      converted_open_issues = [
+          converters.ConvertIssue(
+              issue, users_by_id, related_refs, configs[issue.project_id])
+          for issue in open_issues]
+      converted_closed_issues = [
+          converters.ConvertIssue(
+              issue, users_by_id, related_refs, configs[issue.project_id])
+          for issue in closed_issues]
+      response = issues_pb2.ListReferencedIssuesResponse(
+          open_refs=converted_open_issues, closed_refs=converted_closed_issues)
+
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def ListApplicableFieldDefs(self, mc, request):
+    """Returns specified issues' applicable field refs in a response proto."""
+    if not request.issue_refs:
+      return issues_pb2.ListApplicableFieldDefsResponse()
+
+    _project, issue_ids, config = self._GetProjectIssueIDsAndConfig(
+        mc, request.issue_refs)
+    with work_env.WorkEnv(mc, self.services) as we:
+      issues_dict = we.GetIssuesDict(issue_ids)
+      fds = field_helpers.ListApplicableFieldDefs(issues_dict.values(), config)
+
+    users_by_id = {}
+    with mc.profiler.Phase('converting to response objects'):
+      users_involved = tracker_bizobj.UsersInvolvedInConfig(config)
+      users_by_id.update(framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, users_involved))
+      field_defs = [
+          converters.ConvertFieldDef(fd, [], users_by_id, config, True)
+          for fd in fds]
+
+    return issues_pb2.ListApplicableFieldDefsResponse(field_defs=field_defs)
+
+  @monorail_servicer.PRPCMethod
+  def UpdateIssue(self, mc, request):
+    """Apply a delta and comment to the specified issue, then return it."""
+    project, issue, config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, use_cache=False)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      if request.HasField('delta'):
+        delta = converters.IngestIssueDelta(
+            mc.cnxn, self.services, request.delta, config, issue.phases)
+      else:
+        delta = tracker_pb2.IssueDelta()  # No changes specified.
+      attachments = converters.IngestAttachmentUploads(request.uploads)
+      we.UpdateIssue(
+          issue, delta, request.comment_content, send_email=request.send_email,
+          attachments=attachments, is_description=request.is_description,
+          kept_attachments=list(request.kept_attachments))
+      related_refs = we.GetRelatedIssueRefs([issue])
+
+    with mc.profiler.Phase('making user views'):
+      users_involved_in_issue = tracker_bizobj.UsersInvolvedInIssues([issue])
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, users_involved_in_issue)
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, users_by_id, project)
+
+    with mc.profiler.Phase('converting to response objects'):
+      response = issues_pb2.IssueResponse()
+      response.issue.CopyFrom(converters.ConvertIssue(
+          issue, users_by_id, related_refs, config))
+
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def StarIssue(self, mc, request):
+    """Star (or unstar) the specified issue."""
+    _project, issue, _config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, use_cache=False)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.StarIssue(issue, request.starred)
+      # Reload the issue to get the new star count.
+      issue = we.GetIssue(issue.issue_id)
+
+    with mc.profiler.Phase('converting to response objects'):
+      response = issues_pb2.StarIssueResponse()
+      response.star_count = issue.star_count
+
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def IsIssueStarred(self, mc, request):
+    """Respond true if the signed-in user has starred the specified issue."""
+    _project, issue, _config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, use_cache=False)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      is_starred = we.IsIssueStarred(issue)
+
+    with mc.profiler.Phase('converting to response objects'):
+      response = issues_pb2.IsIssueStarredResponse()
+      response.is_starred = is_starred
+
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def ListStarredIssues(self, mc, _request):
+    """Return a list of issue ids that the signed-in user has starred."""
+    with work_env.WorkEnv(mc, self.services) as we:
+      starred_issues = we.ListStarredIssueIDs()
+      starred_issues_dict = we.GetIssueRefs(starred_issues)
+
+    with mc.profiler.Phase('converting to response objects'):
+      converted_starred_issue_refs = converters.ConvertIssueRefs(
+        starred_issues, starred_issues_dict)
+      response = issues_pb2.ListStarredIssuesResponse(
+        starred_issue_refs=converted_starred_issue_refs)
+
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def ListComments(self, mc, request):
+    """Return comments on the specified issue in a response proto."""
+    project, issue, config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref)
+    with work_env.WorkEnv(mc, self.services) as we:
+      comments = we.ListIssueComments(issue)
+      _, comment_reporters = we.LookupIssueFlaggers(issue)
+
+    with mc.profiler.Phase('making user views'):
+      users_involved_in_comments = tracker_bizobj.UsersInvolvedInCommentList(
+         comments)
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, users_involved_in_comments)
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, users_by_id, project)
+
+    with mc.profiler.Phase('converting to response objects'):
+      issue_perms = permissions.UpdateIssuePermissions(
+          mc.perms, project, issue, mc.auth.effective_ids, config=config)
+      converted_comments = converters.ConvertCommentList(
+          issue, comments, config, users_by_id, comment_reporters,
+          mc.auth.user_id, issue_perms)
+      response = issues_pb2.ListCommentsResponse(comments=converted_comments)
+
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def ListActivities(self, mc, request):
+    """Return issue activities by a specified user in a response proto."""
+    converted_user = converters.IngestUserRef(mc.cnxn, request.user_ref,
+        self.services.user)
+    user = self.services.user.GetUser(mc.cnxn, converted_user)
+    comments = self.services.issue.GetIssueActivity(
+        mc.cnxn, user_ids={request.user_ref.user_id})
+    issues = self.services.issue.GetIssues(
+        mc.cnxn, {c.issue_id for c in comments})
+    project_dict = tracker_helpers.GetAllIssueProjects(
+        mc.cnxn, issues, self.services.project)
+    config_dict = self.services.config.GetProjectConfigs(
+        mc.cnxn, list(project_dict.keys()))
+    allowed_issues = tracker_helpers.FilterOutNonViewableIssues(
+        mc.auth.effective_ids, user, project_dict,
+        config_dict, issues)
+    issue_dict = {issue.issue_id: issue for issue in allowed_issues}
+    comments = [
+        c for c in comments if c.issue_id in issue_dict]
+
+    users_by_id = framework_views.MakeAllUserViews(
+        mc.cnxn, self.services.user, [request.user_ref.user_id],
+        tracker_bizobj.UsersInvolvedInCommentList(comments))
+    for project in project_dict.values():
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, users_by_id, project)
+
+    issues_by_project = {}
+    for issue in allowed_issues:
+      issues_by_project.setdefault(issue.project_id, []).append(issue)
+
+    # A dictionary {issue_id: perms} of the PermissionSet for the current user
+    # on each of the issues.
+    issue_perms_dict = {}
+    # A dictionary {comment_id: [reporter_id]} of users who have reported the
+    # comment as spam.
+    comment_reporters = {}
+    for project_id, project_issues in issues_by_project.items():
+      mc.LookupLoggedInUserPerms(project_dict[project_id])
+      issue_perms_dict.update({
+          issue.issue_id: permissions.UpdateIssuePermissions(
+              mc.perms, project_dict[issue.project_id], issue,
+              mc.auth.effective_ids, config=config_dict[issue.project_id])
+          for issue in project_issues})
+
+      with work_env.WorkEnv(mc, self.services) as we:
+        project_issue_reporters = we.LookupIssuesFlaggers(project_issues)
+        for _, issue_comment_reporters in project_issue_reporters.values():
+          comment_reporters.update(issue_comment_reporters)
+
+    with mc.profiler.Phase('converting to response objects'):
+      converted_comments = []
+      for c in comments:
+        issue = issue_dict.get(c.issue_id)
+        issue_perms = issue_perms_dict.get(c.issue_id)
+        result = converters.ConvertComment(
+            issue, c,
+            config_dict.get(issue.project_id),
+            users_by_id,
+            comment_reporters.get(c.id, []),
+            {c.id: 1} if c.is_description else {},
+            mc.auth.user_id, issue_perms)
+        converted_comments.append(result)
+      converted_issues = [issue_objects_pb2.IssueSummary(
+          project_name=issue.project_name, local_id=issue.local_id,
+          summary=issue.summary) for issue in allowed_issues]
+      response = issues_pb2.ListActivitiesResponse(
+          comments=converted_comments, issue_summaries=converted_issues)
+
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def DeleteComment(self, mc, request):
+    _project, issue, _config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, use_cache=False)
+    with work_env.WorkEnv(mc, self.services) as we:
+      all_comments = we.ListIssueComments(issue)
+      try:
+        comment = all_comments[request.sequence_num]
+      except IndexError:
+        raise exceptions.NoSuchCommentException()
+      we.DeleteComment(issue, comment, request.delete)
+
+    return empty_pb2.Empty()
+
+  @monorail_servicer.PRPCMethod
+  def BulkUpdateApprovals(self, mc, request):
+    """Update multiple issues' approval and return the updated issue_refs."""
+    if not request.issue_refs:
+      raise exceptions.InputException('Param `issue_refs` empty.')
+
+    project, issue_ids, config = self._GetProjectIssueIDsAndConfig(
+        mc, request.issue_refs)
+
+    approval_fd = tracker_bizobj.FindFieldDef(
+        request.field_ref.field_name, config)
+    if not approval_fd:
+      raise exceptions.NoSuchFieldDefException()
+    if request.HasField('approval_delta'):
+      approval_delta = converters.IngestApprovalDelta(
+          mc.cnxn, self.services.user, request.approval_delta,
+          mc.auth.user_id, config)
+    else:
+      approval_delta = tracker_pb2.ApprovalDelta()
+    # No bulk adding approval attachments for now.
+
+    with work_env.WorkEnv(mc, self.services, phase='updating approvals') as we:
+      updated_issue_ids = we.BulkUpdateIssueApprovals(
+          issue_ids, approval_fd.field_id, project, approval_delta,
+          request.comment_content, send_email=request.send_email)
+      with mc.profiler.Phase('converting to response objects'):
+        issue_ref_pairs = we.GetIssueRefs(updated_issue_ids)
+        issue_refs = [converters.ConvertIssueRef(pair)
+                      for pair in issue_ref_pairs.values()]
+        response = issues_pb2.BulkUpdateApprovalsResponse(issue_refs=issue_refs)
+
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def UpdateApproval(self, mc, request):
+    """Update and return an approval in a response proto."""
+    project, issue, config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, use_cache=False)
+
+    approval_fd = tracker_bizobj.FindFieldDef(
+        request.field_ref.field_name, config)
+    if not approval_fd:
+      raise exceptions.NoSuchFieldDefException()
+    if request.HasField('approval_delta'):
+      approval_delta = converters.IngestApprovalDelta(
+          mc.cnxn, self.services.user, request.approval_delta,
+          mc.auth.user_id, config)
+    else:
+      approval_delta = tracker_pb2.ApprovalDelta()
+    attachments = converters.IngestAttachmentUploads(request.uploads)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      av, _comment, _issue = we.UpdateIssueApproval(
+          issue.issue_id,
+          approval_fd.field_id,
+          approval_delta,
+          request.comment_content,
+          request.is_description,
+          attachments=attachments,
+          send_email=request.send_email,
+          kept_attachments=list(request.kept_attachments))
+
+    with mc.profiler.Phase('converting to response objects'):
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, av.approver_ids, [av.setter_id])
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, users_by_id, project)
+      response = issues_pb2.UpdateApprovalResponse()
+      response.approval.CopyFrom(converters.ConvertApproval(
+          av, users_by_id, config))
+
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def ConvertIssueApprovalsTemplate(self, mc, request):
+    """Update an issue's existing approvals structure to match the one of the
+       given template."""
+
+    if not request.issue_ref.local_id or not request.issue_ref.project_name:
+      raise exceptions.InputException('Param `issue_ref.local_id` empty')
+    if not request.template_name:
+      raise exceptions.InputException('Param `template_name` empty')
+
+    project, issue, config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, use_cache=False)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.ConvertIssueApprovalsTemplate(
+          config, issue, request.template_name, request.comment_content,
+          send_email=request.send_email)
+      related_refs = we.GetRelatedIssueRefs([issue])
+
+    with mc.profiler.Phase('making user views'):
+      users_involved_in_issue = tracker_bizobj.UsersInvolvedInIssues([issue])
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, users_involved_in_issue)
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, users_by_id, project)
+
+    with mc.profiler.Phase('converting to response objects'):
+      response = issues_pb2.ConvertIssueApprovalsTemplateResponse()
+      response.issue.CopyFrom(converters.ConvertIssue(
+          issue, users_by_id, related_refs, config))
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def IssueSnapshot(self, mc, request):
+    """Fetch IssueSnapshot counts for charting."""
+    warnings = []
+
+    if not request.timestamp:
+      raise exceptions.InputException('Param `timestamp` required.')
+
+    if not request.project_name and not request.hotlist_id:
+      raise exceptions.InputException('Params `project_name` or `hotlist_id` '
+          'required.')
+
+    if request.group_by == 'label' and not request.label_prefix:
+      raise exceptions.InputException('Param `label_prefix` required.')
+
+    if request.canned_query:
+      canned_query = savedqueries_helpers.SavedQueryIDToCond(
+          mc.cnxn, self.services.features, request.canned_query)
+      # TODO(jrobbins): support linked accounts me_user_ids.
+      canned_query, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+          [mc.auth.user_id], canned_query)
+    else:
+      canned_query = None
+
+    if request.query:
+      query, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+          [mc.auth.user_id], request.query)
+    else:
+      query = None
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      try:
+        project = we.GetProjectByName(request.project_name)
+      except exceptions.NoSuchProjectException:
+        project = None
+
+      if request.hotlist_id:
+        hotlist = we.GetHotlist(request.hotlist_id)
+      else:
+        hotlist = None
+
+      results, unsupported_fields, limit_reached = we.SnapshotCountsQuery(
+          project, request.timestamp, request.group_by,
+          label_prefix=request.label_prefix, query=query,
+          canned_query=canned_query, hotlist=hotlist)
+    if request.group_by == 'owner':
+      # Map user ids to emails.
+      snapshot_counts = [
+        issues_pb2.IssueSnapshotCount(
+          dimension=self.services.user.GetUser(mc.cnxn, key).email,
+          count=result) for key, result in results.iteritems()
+      ]
+    else:
+      snapshot_counts = [
+        issues_pb2.IssueSnapshotCount(dimension=key, count=result)
+          for key, result in results.items()
+      ]
+    response = issues_pb2.IssueSnapshotResponse()
+    response.snapshot_count.extend(snapshot_counts)
+    response.unsupported_field.extend(unsupported_fields)
+    response.unsupported_field.extend(warnings)
+    response.search_limit_reached = limit_reached
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def PresubmitIssue(self, mc, request):
+    """Provide the UI with warnings and suggestions."""
+    project, issue, config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, issue_required=False)
+
+    with mc.profiler.Phase('making user views'):
+      try:
+        proposed_owner_id = converters.IngestUserRef(
+            mc.cnxn, request.issue_delta.owner_ref, self.services.user)
+      except exceptions.NoSuchUserException:
+        proposed_owner_id = 0
+
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, [proposed_owner_id])
+      proposed_owner_view = users_by_id[proposed_owner_id]
+
+    with mc.profiler.Phase('Applying IssueDelta'):
+      if issue:
+        proposed_issue = copy.deepcopy(issue)
+      else:
+        proposed_issue = tracker_pb2.Issue(
+          owner_id=framework_constants.NO_USER_SPECIFIED,
+          project_id=config.project_id)
+      issue_delta = converters.IngestIssueDelta(
+          mc.cnxn, self.services, request.issue_delta, config, None,
+          ignore_missing_objects=True)
+      tracker_bizobj.ApplyIssueDelta(
+          mc.cnxn, self.services.issue, proposed_issue, issue_delta, config)
+
+    with mc.profiler.Phase('applying rules'):
+      _, traces = filterrules_helpers.ApplyFilterRules(
+          mc.cnxn, self.services, proposed_issue, config)
+      logging.info('proposed_issue is now: %r', proposed_issue)
+      logging.info('traces are: %r', traces)
+
+    with mc.profiler.Phase('making derived user views'):
+      derived_users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, [proposed_issue.derived_owner_id],
+          proposed_issue.derived_cc_ids)
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, derived_users_by_id, project)
+
+    with mc.profiler.Phase('pair derived values with rule explanations'):
+      (derived_labels, derived_owners, derived_ccs, warnings, errors) = (
+          tracker_helpers.PairDerivedValuesWithRuleExplanations(
+              proposed_issue, traces, derived_users_by_id))
+
+    result = issues_pb2.PresubmitIssueResponse(
+        owner_availability=proposed_owner_view.avail_message_short,
+        owner_availability_state=proposed_owner_view.avail_state,
+        derived_labels=converters.ConvertValueAndWhyList(derived_labels),
+        derived_owners=converters.ConvertValueAndWhyList(derived_owners),
+        derived_ccs=converters.ConvertValueAndWhyList(derived_ccs),
+        warnings=converters.ConvertValueAndWhyList(warnings),
+        errors=converters.ConvertValueAndWhyList(errors))
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def RerankBlockedOnIssues(self, mc, request):
+    """Rerank the blocked on issues for the given issue ref."""
+    moved_issue_id, target_issue_id = converters.IngestIssueRefs(
+        mc.cnxn, [request.moved_ref, request.target_ref], self.services)
+    _project, issue, _config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.RerankBlockedOnIssues(
+          issue, moved_issue_id, target_issue_id, request.split_above)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      issue = we.GetIssue(issue.issue_id)
+      related_refs = we.GetRelatedIssueRefs([issue])
+
+    with mc.profiler.Phase('converting to response objects'):
+      converted_issue_refs = converters.ConvertIssueRefs(
+          issue.blocked_on_iids, related_refs)
+      result = issues_pb2.RerankBlockedOnIssuesResponse(
+          blocked_on_issue_refs=converted_issue_refs)
+
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def DeleteIssue(self, mc, request):
+    """Mark or unmark the given issue as deleted."""
+    _project, issue, _config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, view_deleted=True)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.DeleteIssue(issue, request.delete)
+
+    result = issues_pb2.DeleteIssueResponse()
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def DeleteIssueComment(self, mc, request):
+    """Mark or unmark the given comment as deleted."""
+    _project, issue, _config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, use_cache=False)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      comments = we.ListIssueComments(issue)
+      if request.sequence_num >= len(comments):
+        raise exceptions.InputException('Invalid sequence number.')
+      we.DeleteComment(issue, comments[request.sequence_num], request.delete)
+
+    result = issues_pb2.DeleteIssueCommentResponse()
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def DeleteAttachment(self, mc, request):
+    """Mark or unmark the given attachment as deleted."""
+    _project, issue, _config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, use_cache=False)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      comments = we.ListIssueComments(issue)
+      if request.sequence_num >= len(comments):
+        raise exceptions.InputException('Invalid sequence number.')
+      we.DeleteAttachment(
+          issue, comments[request.sequence_num], request.attachment_id,
+          request.delete)
+
+    result = issues_pb2.DeleteAttachmentResponse()
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def FlagIssues(self, mc, request):
+    """Flag or unflag the given issues as spam."""
+    if not request.issue_refs:
+      raise exceptions.InputException('Param `issue_refs` empty.')
+
+    _project, issue_ids, _config = self._GetProjectIssueIDsAndConfig(
+        mc, request.issue_refs)
+    with work_env.WorkEnv(mc, self.services) as we:
+      issues_by_id = we.GetIssuesDict(issue_ids, use_cache=False)
+      we.FlagIssues(list(issues_by_id.values()), request.flag)
+
+    result = issues_pb2.FlagIssuesResponse()
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def FlagComment(self, mc, request):
+    """Flag or unflag the given comment as spam."""
+    _project, issue, _config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, use_cache=False)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      comments = we.ListIssueComments(issue)
+      if request.sequence_num >= len(comments):
+        raise exceptions.InputException('Invalid sequence number.')
+      we.FlagComment(issue, comments[request.sequence_num], request.flag)
+
+    result = issues_pb2.FlagCommentResponse()
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def ListIssuePermissions(self, mc, request):
+    """List the permissions for the current user in the given issue."""
+    project, issue, config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, use_cache=False, view_deleted=True)
+
+    perms = permissions.UpdateIssuePermissions(
+        mc.perms, project, issue, mc.auth.effective_ids, config=config)
+
+    return issues_pb2.ListIssuePermissionsResponse(
+        permissions=sorted(perms.perm_names))
+
+  @monorail_servicer.PRPCMethod
+  def MoveIssue(self, mc, request):
+    """Move an issue to another project."""
+    _project, issue, _config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, use_cache=False)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      target_project = we.GetProjectByName(request.target_project_name)
+      moved_issue = we.MoveIssue(issue, target_project)
+
+    result = issues_pb2.MoveIssueResponse(
+        new_issue_ref=converters.ConvertIssueRef(
+            (moved_issue.project_name, moved_issue.local_id)))
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def CopyIssue(self, mc, request):
+    """Copy an issue."""
+    _project, issue, _config = self._GetProjectIssueAndConfig(
+        mc, request.issue_ref, use_cache=False)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      target_project = we.GetProjectByName(request.target_project_name)
+      copied_issue = we.CopyIssue(issue, target_project)
+
+    result = issues_pb2.CopyIssueResponse(
+        new_issue_ref=converters.ConvertIssueRef(
+            (copied_issue.project_name, copied_issue.local_id)))
+    return result
diff --git a/api/monorail_servicer.py b/api/monorail_servicer.py
new file mode 100644
index 0000000..8968ec4
--- /dev/null
+++ b/api/monorail_servicer.py
@@ -0,0 +1,383 @@
+# Copyright 2018 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import cgi
+import functools
+import logging
+import sys
+import time
+from google.appengine.api import oauth
+
+from google.appengine.api import users
+from google.protobuf import json_format
+from components.prpc import codes
+from components.prpc import server
+
+import settings
+from framework import authdata
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import monitoring
+from framework import monorailcontext
+from framework import ratelimiter
+from framework import permissions
+from framework import sql
+from framework import xsrf
+from services import client_config_svc
+from services import features_svc
+
+
+# Header for XSRF token to protect cookie-based auth users.
+XSRF_TOKEN_HEADER = 'x-xsrf-token'
+# Header for test account email.  Only accepted for local dev server.
+TEST_ACCOUNT_HEADER = 'x-test-account'
+# Optional header to help us understand why certain calls were made.
+REASON_HEADER = 'x-reason'
+# Optional header to help prevent double updates.
+REQUEST_ID_HEADER = 'x-request-id'
+
+
+def ConvertPRPCStatusToHTTPStatus(context):
+  """pRPC uses internal codes 0..16, but we want to report HTTP codes."""
+  return server._PRPC_TO_HTTP_STATUS.get(context._code, 500)
+
+
+def PRPCMethod(func):
+  @functools.wraps(func)
+  def wrapper(self, request, prpc_context, cnxn=None):
+    return self.Run(
+        func, request, prpc_context, cnxn=cnxn)
+
+  wrapper.wrapped = func
+  return wrapper
+
+
+class MonorailServicer(object):
+  """Abstract base class for API servicers.
+  """
+
+  def __init__(self, services, make_rate_limiter=True, xsrf_timeout=None):
+    self.services = services
+    if make_rate_limiter:
+      self.rate_limiter = ratelimiter.ApiRateLimiter()
+    else:
+      self.rate_limiter = None
+    # We allow subclasses to specify a different timeout. This allows the
+    # RefreshToken method to check the token with a longer expiration and
+    # generate a new one.
+    self.xsrf_timeout = xsrf_timeout or xsrf.TOKEN_TIMEOUT_SEC
+
+  def Run(
+      self, handler, request, prpc_context,
+      cnxn=None, perms=None, start_time=None, end_time=None):
+    """Run a Do* method in an API context.
+
+    Args:
+      handler: API handler method to call with MonorailContext and request.
+      request: API Request proto object.
+      prpc_context: pRPC context object with status code.
+      cnxn: Optional connection to SQL database.
+      perms: PermissionSet passed in during testing.
+      start_time: Int timestamp passed in during testing.
+      end_time: Int timestamp passed in during testing.
+
+    Returns:
+      The response proto returned from the handler or None if that
+      method raised an exception that we handle.
+
+    Raises:
+      Only programming errors should be raised as exceptions.  All
+      execptions for permission checks and input validation that are
+      raised in the Do* method are converted into pRPC status codes.
+    """
+    start_time = start_time or time.time()
+    cnxn = cnxn or sql.MonorailConnection()
+    if self.services.cache_manager:
+      self.services.cache_manager.DoDistributedInvalidation(cnxn)
+
+    response = None
+    client_id = None  # TODO(jrobbins): consider using client ID.
+    requester_auth = None
+    metadata = dict(prpc_context.invocation_metadata())
+    mc = monorailcontext.MonorailContext(self.services, cnxn=cnxn, perms=perms)
+    try:
+      self.AssertBaseChecks(request, metadata)
+      requester_auth = self.GetAndAssertRequesterAuth(
+          cnxn, metadata, self.services)
+      logging.info('request proto is:\n%r\n', request)
+      logging.info('requester is %r', requester_auth.email)
+
+      if self.rate_limiter:
+        self.rate_limiter.CheckStart(
+            client_id, requester_auth.email, start_time)
+      mc.auth = requester_auth
+      if not perms:
+        mc.LookupLoggedInUserPerms(self.GetRequestProject(mc.cnxn, request))
+      response = handler(self, mc, request)
+
+    except Exception as e:
+      if not self.ProcessException(e, prpc_context, mc):
+        raise e.__class__, e, sys.exc_info()[2]
+    finally:
+      if mc:
+        mc.CleanUp()
+      if self.rate_limiter and requester_auth and requester_auth.email:
+        end_time = end_time or time.time()
+        self.rate_limiter.CheckEnd(
+            client_id, requester_auth.email, end_time, start_time)
+      self.RecordMonitoringStats(start_time, request, response, prpc_context)
+
+    return response
+
+  def _GetAllowedEmailDomainAuth(self, cnxn, services):
+    """Checks if the requester's email is found in api_allowed_email_domains
+       and is authorized by the custom monorail scope.
+
+    Args:
+      cnxn: connection to the SQL database.
+      services: connections to backend services.
+
+    Returns:
+      A new AuthData object if the method determines the requester is allowed
+      to access the API, otherwise, None.
+    """
+    try:
+      # Note: get_current_user(scopes) returns the User with the User's email.
+      # So, in addition to requesting any scope listed in 'scopes', it also
+      # always requests the email scope.
+      monorail_scope_user = oauth.get_current_user(
+          framework_constants.MONORAIL_SCOPE)
+      logging.info('monorail scope user %r', monorail_scope_user)
+      # TODO(b/144508063): remove this workaround.
+      authorized_scopes = oauth.get_authorized_scopes(
+          framework_constants.MONORAIL_SCOPE)
+      if framework_constants.MONORAIL_SCOPE not in authorized_scopes:
+        raise oauth.Error('Work around for b/144508063')
+      logging.info(authorized_scopes)
+      if (monorail_scope_user and monorail_scope_user.email().endswith(
+          settings.api_allowed_email_domains)):
+        logging.info('User %r authenticated with Oauth and monorail',
+                     monorail_scope_user.email())
+        return authdata.AuthData.FromEmail(
+            cnxn, monorail_scope_user.email(), services)
+    except oauth.Error as ex:
+      logging.info('oauth.Error for monorail scope: %s' % ex)
+    return None
+
+  def GetAndAssertRequesterAuth(self, cnxn, metadata, services):
+    """Gets the requester identity and checks if the user has permission
+       to make the request.
+       Any users successfully authenticated with oauth must be allowlisted or
+       have accounts with the domains in api_allowed_email_domains.
+       Users identified using cookie-based auth must have valid XSRF tokens.
+       Test accounts ending with @example.com are only allowed in the
+       local_mode.
+
+    Args:
+      cnxn: connection to the SQL database.
+      metadata: metadata sent by the client.
+      services: connections to backend services.
+
+    Returns:
+      A new AuthData object representing a signed in or anonymous user.
+
+    Raises:
+      exceptions.NoSuchUserException: If the requester does not exist
+      permissions.BannedUserException: If the user has been banned from the site
+      permissions.PermissionException: If the user is not authorized with the
+        Monorail scope, is not allowlisted, and has an invalid token.
+    """
+    # TODO(monorail:6538): Move different authentication methods into separate
+    # functions.
+    requester_auth = None
+    # When running on localhost, allow request to specify test account.
+    if TEST_ACCOUNT_HEADER in metadata:
+      if not settings.local_mode:
+        raise exceptions.InputException(
+            'x-test-account only accepted in local_mode')
+      # For local development, we accept any request.
+      # TODO(jrobbins): make this more realistic by requiring a fake XSRF token.
+      test_account = metadata[TEST_ACCOUNT_HEADER]
+      if not test_account.endswith('@example.com'):
+        raise exceptions.InputException(
+            'test_account must end with @example.com')
+      logging.info('Using test_account: %r' % test_account)
+      requester_auth = authdata.AuthData.FromEmail(cnxn, test_account, services)
+
+    # Oauth for users with email domains in api_allowed_email_domains.
+    if not requester_auth:
+      requester_auth = self._GetAllowedEmailDomainAuth(cnxn, services)
+
+    # Oauth for allowlisted users
+    if not requester_auth:
+      try:
+        client_id = oauth.get_client_id(framework_constants.OAUTH_SCOPE)
+        user = oauth.get_current_user(framework_constants.OAUTH_SCOPE)
+        if user:
+          auth_client_ids, auth_emails = (
+              client_config_svc.GetClientConfigSvc().GetClientIDEmails())
+          logging.info('Oauth requester %s', user.email())
+          # Check if email or client_id is allowlisted
+          if (user.email() in auth_emails) or (client_id in auth_client_ids):
+            logging.info('Client %r is allowlisted', user.email())
+            requester_auth = authdata.AuthData.FromEmail(
+                cnxn, user.email(), services)
+      except oauth.Error as ex:
+        logging.info('Got oauth error: %r', ex)
+
+    # Cookie-based auth for signed in and anonymous users.
+    if not requester_auth:
+      # Check for signed in user
+      user = users.get_current_user()
+      if user:
+        logging.info('Using cookie user: %r', user.email())
+        requester_auth = authdata.AuthData.FromEmail(
+            cnxn, user.email(), services)
+      else:
+        # Create AuthData for anonymous user.
+        requester_auth = authdata.AuthData.FromEmail(cnxn, None, services)
+
+      # Cookie-based auth signed-in and anon users need to have the XSRF
+      # token validate.
+      try:
+        token = metadata.get(XSRF_TOKEN_HEADER)
+        xsrf.ValidateToken(
+            token, requester_auth.user_id, xsrf.XHR_SERVLET_PATH,
+            timeout=self.xsrf_timeout)
+      except xsrf.TokenIncorrect:
+        raise permissions.PermissionException(
+            'Requester %s does not have permission to make this request.'
+            % requester_auth.email)
+
+    if permissions.IsBanned(requester_auth.user_pb, requester_auth.user_view):
+      raise permissions.BannedUserException(
+          'The user %s has been banned from using this site' %
+          requester_auth.email)
+
+    return requester_auth
+
+  def AssertBaseChecks(self, request, metadata):
+    """Reject requests that we refuse to serve."""
+    # TODO(jrobbins): Add read_only check as an exception raised in sql.py.
+    if (settings.read_only and
+        not request.__class__.__name__.startswith(('Get', 'List'))):
+      raise permissions.PermissionException(
+          'This request is not allowed in read-only mode')
+
+    if REASON_HEADER in metadata:
+      logging.info('Request reason: %r', metadata[REASON_HEADER])
+    if REQUEST_ID_HEADER in metadata:
+      # TODO(jrobbins): Ignore requests with duplicate request_ids.
+      logging.info('request_id: %r', metadata[REQUEST_ID_HEADER])
+
+  def GetRequestProject(self, cnxn, request):
+    """Return the Project business object that the user is viewing or None."""
+    if hasattr(request, 'project_name'):
+      project = self.services.project.GetProjectByName(
+          cnxn, request.project_name)
+      if not project:
+        logging.info(
+            'Request has project_name: %r but it does not exist.',
+            request.project_name)
+        return None
+      return project
+    else:
+      return None
+
+  def ProcessException(self, e, prpc_context, mc):
+    """Return True if we convert an exception to a pRPC status code."""
+    logging.exception(e)
+    logging.info(e.message)
+    exc_type = type(e)
+    if exc_type == exceptions.NoSuchUserException:
+      prpc_context.set_code(codes.StatusCode.NOT_FOUND)
+      prpc_context.set_details('The user does not exist.')
+    elif exc_type == exceptions.NoSuchProjectException:
+      prpc_context.set_code(codes.StatusCode.NOT_FOUND)
+      prpc_context.set_details('The project does not exist.')
+    elif exc_type == exceptions.NoSuchTemplateException:
+      prpc_context.set_code(codes.StatusCode.NOT_FOUND)
+      prpc_context.set_details('The template does not exist.')
+    elif exc_type == exceptions.NoSuchIssueException:
+      prpc_context.set_code(codes.StatusCode.NOT_FOUND)
+      prpc_context.set_details('The issue does not exist.')
+    elif exc_type == exceptions.NoSuchCommentException:
+      prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+      prpc_context.set_details('No such comment')
+    elif exc_type == exceptions.NoSuchComponentException:
+      prpc_context.set_code(codes.StatusCode.NOT_FOUND)
+      prpc_context.set_details('The component does not exist.')
+    elif exc_type == permissions.BannedUserException:
+      prpc_context.set_code(codes.StatusCode.PERMISSION_DENIED)
+      prpc_context.set_details('The requesting user has been banned.')
+    elif exc_type == permissions.PermissionException:
+      logging.info('perms is %r', mc.perms)
+      prpc_context.set_code(codes.StatusCode.PERMISSION_DENIED)
+      prpc_context.set_details('Permission denied.')
+    elif exc_type == exceptions.GroupExistsException:
+      prpc_context.set_code(codes.StatusCode.ALREADY_EXISTS)
+      prpc_context.set_details('The user group already exists.')
+    elif exc_type == features_svc.HotlistAlreadyExists:
+      prpc_context.set_code(codes.StatusCode.ALREADY_EXISTS)
+      prpc_context.set_details('A hotlist with that name already exists.')
+    elif exc_type == exceptions.FieldDefAlreadyExists:
+      prpc_context.set_code(codes.StatusCode.ALREADY_EXISTS)
+      prpc_context.set_details('A field def with that name already exists.')
+    elif exc_type == exceptions.InvalidComponentNameException:
+      prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+      prpc_context.set_details('That component name is invalid.')
+    elif exc_type == exceptions.FilterRuleException:
+      prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+      prpc_context.set_details('Violates filter rule that should error.')
+    elif exc_type == exceptions.InputException:
+      prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+      prpc_context.set_details(
+          'Invalid arguments: %s' % cgi.escape(e.message, quote=True))
+    elif exc_type == ratelimiter.ApiRateLimitExceeded:
+      prpc_context.set_code(codes.StatusCode.PERMISSION_DENIED)
+      prpc_context.set_details('The requester has exceeded API quotas limit.')
+    elif exc_type == oauth.InvalidOAuthTokenError:
+      prpc_context.set_code(codes.StatusCode.UNAUTHENTICATED)
+      prpc_context.set_details(
+          'The oauth token was not valid or must be refreshed.')
+    elif exc_type == xsrf.TokenIncorrect:
+      logging.info('Bad XSRF token: %r', e.message)
+      prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+      prpc_context.set_details('Bad XSRF token.')
+    else:
+      prpc_context.set_code(codes.StatusCode.INTERNAL)
+      prpc_context.set_details('Potential programming error.')
+      return False  # Re-raise any exception from programming errors.
+    return True  # It if was one of the cases above, don't reraise.
+
+  def RecordMonitoringStats(
+      self, start_time, request, response, prpc_context, now=None):
+    """Record monitoring info about this request."""
+    now = now or time.time()
+    elapsed_ms = int((now - start_time) * 1000)
+    method_name = request.__class__.__name__
+    if method_name.endswith('Request'):
+      method_name = method_name[:-len('Request')]
+
+    fields = monitoring.GetCommonFields(
+        # pRPC uses its own statuses, but we report HTTP status codes.
+        ConvertPRPCStatusToHTTPStatus(prpc_context),
+        # Use the API name, not the request path, to prevent an explosion in
+        # possible field values.
+        'monorail.v0.' + method_name)
+
+    monitoring.AddServerDurations(elapsed_ms, fields)
+    monitoring.IncrementServerResponseStatusCount(fields)
+    monitoring.AddServerRequesteBytes(
+        len(json_format.MessageToJson(request)), fields)
+    response_length = 0
+    if response:
+      response_length = len(json_format.MessageToJson(response))
+      monitoring.AddServerResponseBytes(response_length, fields)
diff --git a/api/projects_servicer.py b/api/projects_servicer.py
new file mode 100644
index 0000000..640a433
--- /dev/null
+++ b/api/projects_servicer.py
@@ -0,0 +1,341 @@
+# Copyright 2018 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+import settings
+
+from api import monorail_servicer
+from api import converters
+from api.api_proto import projects_pb2
+from api.api_proto import project_objects_pb2
+from api.api_proto import projects_prpc_pb2
+from businesslogic import work_env
+from framework import framework_bizobj
+from framework import exceptions
+from framework import framework_views
+from framework import permissions
+from project import project_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_helpers
+
+# TODO(zhangtiff): Remove dependency on tracker_views.
+from tracker import tracker_views
+
+
+class ProjectsServicer(monorail_servicer.MonorailServicer):
+  """Handle API requests related to Project objects.
+
+  Each API request is implemented with a method as defined in the .proto
+  file that does any request-specific validation, uses work_env to
+  safely operate on business objects, and returns a response proto.
+  """
+
+  DESCRIPTION = projects_prpc_pb2.ProjectsServiceDescription
+
+  def _GetProject(self, mc, request, use_cache=True):
+    """Get the project object specified in the request."""
+    with work_env.WorkEnv(mc, self.services, phase='getting project') as we:
+      project = we.GetProjectByName(request.project_name, use_cache=use_cache)
+      # Perms in this project are already looked up in MonorailServicer.
+    return project
+
+  @monorail_servicer.PRPCMethod
+  def ListProjects(self, _mc, _request):
+    return projects_pb2.ListProjectsResponse(
+        projects=[
+            project_objects_pb2.Project(name='One'),
+            project_objects_pb2.Project(name='Two')],
+        next_page_token='next...')
+
+  @monorail_servicer.PRPCMethod
+  def ListProjectTemplates(self, mc, request):
+    """Return the specific project's templates."""
+    if not request.project_name:
+      raise exceptions.InputException('Param `project_name` required.')
+    project = self._GetProject(mc, request)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      config = we.GetProjectConfig(project.project_id)
+      templates = we.ListProjectTemplates(project.project_id)
+
+    with mc.profiler.Phase('converting to response objects'):
+      involved_user_ids = tracker_bizobj.UsersInvolvedInTemplates(templates)
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, involved_user_ids)
+      response = projects_pb2.ListProjectTemplatesResponse(
+          templates=converters.ConvertProjectTemplateDefs(
+              templates, users_by_id, config))
+
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def GetConfig(self, mc, request):
+    """Return the specified project config."""
+    project = self._GetProject(mc, request)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      config = we.GetProjectConfig(project.project_id)
+
+    with mc.profiler.Phase('making user views'):
+      involved_user_ids = tracker_bizobj.UsersInvolvedInConfig(config)
+      users_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, involved_user_ids)
+      framework_views.RevealAllEmailsToMembers(
+          mc.cnxn, self.services, mc.auth, users_by_id, project)
+
+      label_ids = tracker_bizobj.LabelIDsInvolvedInConfig(config)
+      labels_by_id = {
+        label_id: self.services.config.LookupLabel(
+            mc.cnxn, config.project_id, label_id)
+        for label_id in label_ids}
+
+    result = converters.ConvertConfig(
+        project, config, users_by_id, labels_by_id)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def GetPresentationConfig(self, mc, request):
+    """Return the UI centric pieces of the project config."""
+    project = self._GetProject(mc, request)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      config = we.GetProjectConfig(project.project_id)
+
+    project_thumbnail_url = tracker_views.LogoView(project).thumbnail_url
+    project_summary = project.summary
+    custom_issue_entry_url = config.custom_issue_entry_url
+    revision_url_format = (
+        project.revision_url_format or settings.revision_url_format)
+
+    default_query = None
+    saved_queries = None
+
+    # Only show default query or project saved queries for project
+    # members, in case they contain sensitive information.
+    if framework_bizobj.UserIsInProject(
+        project, mc.auth.effective_ids):
+      default_query = config.member_default_query
+
+      saved_queries = self.services.features.GetCannedQueriesByProjectID(
+          mc.cnxn, project.project_id)
+
+    return project_objects_pb2.PresentationConfig(
+        project_thumbnail_url=project_thumbnail_url,
+        project_summary=project_summary,
+        custom_issue_entry_url=custom_issue_entry_url,
+        default_query=default_query,
+        default_col_spec=config.default_col_spec,
+        default_sort_spec=config.default_sort_spec,
+        default_x_attr=config.default_x_attr,
+        default_y_attr=config.default_y_attr,
+        saved_queries=converters.IngestSavedQueries(
+            mc.cnxn, self.services.project, saved_queries),
+        revision_url_format=revision_url_format)
+
+  @monorail_servicer.PRPCMethod
+  def GetCustomPermissions(self, mc, request):
+    """Return the custom permissions for the given project."""
+    project = self._GetProject(mc, request)
+    custom_permissions = permissions.GetCustomPermissions(project)
+
+    result = projects_pb2.GetCustomPermissionsResponse(
+        permissions=custom_permissions)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def GetVisibleMembers(self, mc, request):
+    """Return the members of the project that the user can see.
+
+    Raises:
+      PermissionException the user is not allowed to view the project members.
+    """
+    project = self._GetProject(mc, request)
+    if not permissions.CanViewContributorList(mc, project):
+      raise permissions.PermissionException(
+          'User is not allowed to view the project members')
+
+    users_by_id = tracker_helpers.GetVisibleMembers(mc, project, self.services)
+
+    sorted_user_ids = sorted(
+        users_by_id, key=lambda uid: users_by_id[uid].email)
+    user_refs = converters.ConvertUserRefs(
+        sorted_user_ids, [], users_by_id, True)
+    sorted_group_ids = sorted(
+        (uv.user_id for uv in users_by_id.values() if uv.is_group),
+        key=lambda uid: users_by_id[uid].email)
+    group_refs = converters.ConvertUserRefs(
+        sorted_group_ids, [], users_by_id, True)
+
+    result = projects_pb2.GetVisibleMembersResponse(
+        user_refs=user_refs, group_refs=group_refs)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def GetLabelOptions(self, mc, request):
+    """Return the label options for autocomplete for the given project."""
+    project = self._GetProject(mc, request)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      config = we.GetProjectConfig(project.project_id)
+
+    label_options = tracker_helpers.GetLabelOptions(
+        config, permissions.GetCustomPermissions(project))
+    label_defs = [
+        project_objects_pb2.LabelDef(
+            label=label['name'],
+            docstring=label['doc'])
+        for label in label_options]
+
+    result = projects_pb2.GetLabelOptionsResponse(
+        label_options=label_defs,
+        exclusive_label_prefixes=config.exclusive_label_prefixes)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def ListStatuses(self, mc, request):
+    """Return all well-known statuses in the specified project."""
+    project = self._GetProject(mc, request)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      config = we.GetProjectConfig(project.project_id)
+
+    status_defs = [
+        converters.ConvertStatusDef(sd)
+        for sd in config.well_known_statuses]
+    statuses_offer_merge = [
+        converters.ConvertStatusRef(sd.status, None, config)
+        for sd in config.well_known_statuses
+        if sd.status in config.statuses_offer_merge]
+
+    result = projects_pb2.ListStatusesResponse(
+        status_defs=status_defs,
+        statuses_offer_merge=statuses_offer_merge,
+        restrict_to_known=config.restrict_to_known)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def ListComponents(self, mc, request):
+    """Return all component defs in the specified project."""
+    project = self._GetProject(mc, request)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      config = we.GetProjectConfig(project.project_id)
+
+    with mc.profiler.Phase('making user views'):
+      users_by_id = {}
+      if request.include_admin_info:
+        users_involved = tracker_bizobj.UsersInvolvedInConfig(config)
+        users_by_id = framework_views.MakeAllUserViews(
+            mc.cnxn, self.services.user, users_involved)
+        framework_views.RevealAllEmailsToMembers(
+            mc.cnxn, self.services, mc.auth, users_by_id, project)
+
+    with mc.profiler.Phase('looking up labels'):
+      labels_by_id = {}
+      if request.include_admin_info:
+        label_ids = tracker_bizobj.LabelIDsInvolvedInConfig(config)
+        labels_by_id = {
+          label_id: self.services.config.LookupLabel(
+              mc.cnxn, config.project_id, label_id)
+          for label_id in label_ids}
+
+    component_defs = [
+        converters.ConvertComponentDef(
+            cd, users_by_id, labels_by_id, request.include_admin_info)
+        for cd in config.component_defs]
+
+    result = projects_pb2.ListComponentsResponse(
+        component_defs=component_defs)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def ListFields(self, mc, request):
+    """List all fields for the specified project."""
+    project = self._GetProject(mc, request)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      config = we.GetProjectConfig(project.project_id)
+
+    users_by_id = {}
+    users_for_perm = {}
+    # Only look for members if user choices are requested and there are user
+    # fields that need permissions.
+    if request.include_user_choices:
+      perms_needed = {
+          fd.needs_perm
+          for fd in config.field_defs
+          if fd.needs_perm and not fd.is_deleted}
+      if perms_needed:
+        users_by_id = tracker_helpers.GetVisibleMembers(
+            mc, project, self.services)
+        effective_ids_by_user = self.services.usergroup.LookupAllMemberships(
+            mc.cnxn, users_by_id)
+        users_for_perm = project_helpers.UsersWithPermsInProject(
+            project, perms_needed, users_by_id, effective_ids_by_user)
+
+    field_defs = [
+        converters.ConvertFieldDef(
+            fd, users_for_perm.get(fd.needs_perm, []), users_by_id, config,
+            request.include_admin_info)
+        for fd in config.field_defs
+        if not fd.is_deleted]
+
+    result = projects_pb2.ListFieldsResponse(field_defs=field_defs)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def GetProjectStarCount(self, mc, request):
+    """Get the star count for the specified project."""
+    project = self._GetProject(mc, request)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      star_count = we.GetProjectStarCount(project.project_id)
+
+    result = projects_pb2.GetProjectStarCountResponse(star_count=star_count)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def StarProject(self, mc, request):
+    """Star the specified project."""
+    project = self._GetProject(mc, request)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.StarProject(project.project_id, request.starred)
+      star_count = we.GetProjectStarCount(project.project_id)
+
+    result = projects_pb2.StarProjectResponse(star_count=star_count)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def CheckProjectName(self, mc, request):
+    """Check that a project name is valid and not already in use."""
+    with work_env.WorkEnv(mc, self.services) as we:
+      error = we.CheckProjectName(request.project_name)
+    result = projects_pb2.CheckProjectNameResponse(error=error)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def CheckComponentName(self, mc, request):
+    """Check that the component name is valid and not already in use."""
+    project = self._GetProject(mc, request)
+    with work_env.WorkEnv(mc, self.services) as we:
+      error = we.CheckComponentName(
+          project.project_id, request.parent_path, request.component_name)
+    result = projects_pb2.CheckComponentNameResponse(error=error)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def CheckFieldName(self, mc, request):
+    """Check that a field name is valid and not already in use."""
+    project = self._GetProject(mc, request)
+    with work_env.WorkEnv(mc, self.services) as we:
+      error = we.CheckFieldName(project.project_id, request.field_name)
+    result = projects_pb2.CheckFieldNameResponse(error=error)
+    return result
diff --git a/api/resource_name_converters.py b/api/resource_name_converters.py
new file mode 100644
index 0000000..cb26c9b
--- /dev/null
+++ b/api/resource_name_converters.py
@@ -0,0 +1,1059 @@
+# Copyright 2020 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
+
+"""Methods for converting resource names to protorpc objects and back.
+
+IngestFoo methods take resource names and return the IDs of the resources.
+While some Ingest methods need to check for the existence of resources as
+a side-effect of producing their IDs, other layers that call these methods
+should always do their own validity checking.
+
+ConvertFoo methods take object ids
+(and sometimes a MonorailConnection and ServiceManager)
+and return resource names.
+"""
+
+import re
+import logging
+
+from features import features_constants
+from framework import exceptions
+from framework import validate
+from project import project_constants
+from tracker import tracker_constants
+from proto import tracker_pb2
+
+# Constants that hold regex patterns for resource names.
+PROJECT_NAME_PATTERN = (
+    r'projects\/(?P<project_name>%s)' % project_constants.PROJECT_NAME_PATTERN)
+PROJECT_NAME_RE = re.compile(r'%s$' % PROJECT_NAME_PATTERN)
+
+FIELD_DEF_NAME_RE = re.compile(
+    r'%s\/fieldDefs\/(?P<field_def>\d+)$' % (PROJECT_NAME_PATTERN))
+
+APPROVAL_DEF_NAME_PATTERN = (
+  r'%s\/approvalDefs\/(?P<approval_def>\d+)' % PROJECT_NAME_PATTERN)
+APPROVAL_DEF_NAME_RE = re.compile(r'%s$' % APPROVAL_DEF_NAME_PATTERN)
+
+HOTLIST_PATTERN = r'hotlists\/(?P<hotlist_id>\d+)'
+HOTLIST_NAME_RE = re.compile(r'%s$' % HOTLIST_PATTERN)
+HOTLIST_ITEM_NAME_RE = re.compile(
+    r'%s\/items\/(?P<project_name>%s)\.(?P<local_id>\d+)$' % (
+        HOTLIST_PATTERN,
+        project_constants.PROJECT_NAME_PATTERN))
+
+ISSUE_PATTERN = (r'projects\/(?P<project>%s)\/issues\/(?P<local_id>\d+)' %
+                 project_constants.PROJECT_NAME_PATTERN)
+ISSUE_NAME_RE = re.compile(r'%s$' % ISSUE_PATTERN)
+
+COMMENT_PATTERN = (r'%s\/comments\/(?P<comment_num>\d+)' % ISSUE_PATTERN)
+COMMENT_NAME_RE = re.compile(r'%s$' % COMMENT_PATTERN)
+
+USER_NAME_RE = re.compile(r'users\/((?P<user_id>\d+)|(?P<potential_email>.+))$')
+APPROVAL_VALUE_RE = re.compile(
+    r'%s\/approvalValues\/(?P<approval_id>\d+)$' % ISSUE_PATTERN)
+
+ISSUE_TEMPLATE_RE = re.compile(
+    r'%s\/templates\/(?P<template_id>\d+)$' % (PROJECT_NAME_PATTERN))
+
+# Constants that hold the template patterns for creating resource names.
+PROJECT_NAME_TMPL = 'projects/{project_name}'
+PROJECT_CONFIG_TMPL = 'projects/{project_name}/config'
+PROJECT_MEMBER_NAME_TMPL = 'projects/{project_name}/members/{user_id}'
+HOTLIST_NAME_TMPL = 'hotlists/{hotlist_id}'
+HOTLIST_ITEM_NAME_TMPL = '%s/items/{project_name}.{local_id}' % (
+    HOTLIST_NAME_TMPL)
+
+ISSUE_NAME_TMPL = 'projects/{project}/issues/{local_id}'
+COMMENT_NAME_TMPL = '%s/comments/{comment_id}' % ISSUE_NAME_TMPL
+APPROVAL_VALUE_NAME_TMPL = '%s/approvalValues/{approval_id}' % ISSUE_NAME_TMPL
+
+USER_NAME_TMPL = 'users/{user_id}'
+PROJECT_STAR_NAME_TMPL = 'users/{user_id}/projectStars/{project_name}'
+PROJECT_SQ_NAME_TMPL = 'projects/{project_name}/savedQueries/{query_name}'
+
+ISSUE_TEMPLATE_TMPL = 'projects/{project_name}/templates/{template_id}'
+STATUS_DEF_TMPL = 'projects/{project_name}/statusDefs/{status}'
+LABEL_DEF_TMPL = 'projects/{project_name}/labelDefs/{label}'
+COMPONENT_DEF_TMPL = 'projects/{project_name}/componentDefs/{component_id}'
+COMPONENT_DEF_RE = re.compile(
+    r'%s\/componentDefs\/((?P<component_id>\d+)|(?P<path>%s))$' %
+    (PROJECT_NAME_PATTERN, tracker_constants.COMPONENT_PATH_PATTERN))
+FIELD_DEF_TMPL = 'projects/{project_name}/fieldDefs/{field_id}'
+APPROVAL_DEF_TMPL = 'projects/{project_name}/approvalDefs/{approval_id}'
+
+
+def _GetResourceNameMatch(name, regex):
+  # type: (str, Pattern[str]) -> Match[str]
+  """Takes a resource name and returns the regex match.
+
+  Args:
+    name: Resource name.
+    regex: Compiled regular expression Pattern object used to match name.
+
+  Raises:
+    InputException if there is not match.
+  """
+  match = regex.match(name)
+  if not match:
+    raise exceptions.InputException(
+        'Invalid resource name: %s.' % name)
+  return match
+
+
+def _IssueIdsFromLocalIds(cnxn, project_local_id_pairs, services):
+  # type: (MonorailConnection, Sequence[Tuple(str, int)], Services ->
+  #     Sequence[int]
+  """Fetches issue IDs using the given project/local ID pairs."""
+  # Fetch Project ids from Project names.
+  project_ids_by_name = services.project.LookupProjectIDs(
+      cnxn, [pair[0] for pair in project_local_id_pairs])
+
+  # Create (project_id, issue_local_id) pairs from project_local_id_pairs.
+  project_id_local_ids = []
+  with exceptions.ErrorAggregator(exceptions.NoSuchProjectException) as err_agg:
+    for project_name, local_id in project_local_id_pairs:
+      try:
+        project_id = project_ids_by_name[project_name]
+        project_id_local_ids.append((project_id, local_id))
+      except KeyError:
+        err_agg.AddErrorMessage('Project %s not found.' % project_name)
+
+  issue_ids, misses = services.issue.LookupIssueIDsFollowMoves(
+      cnxn, project_id_local_ids)
+  if misses:
+    # Raise error with resource names rather than backend IDs.
+    project_names_by_id = {
+        p_id: p_name for p_name, p_id in project_ids_by_name.iteritems()
+    }
+    misses_by_resource_name = [
+        _ConstructIssueName(project_names_by_id[p_id], local_id)
+        for (p_id, local_id) in misses
+    ]
+    raise exceptions.NoSuchIssueException(
+        'Issue(s) %r not found' % misses_by_resource_name)
+  return issue_ids
+
+# FieldDefs
+
+
+def IngestFieldDefName(cnxn, name, services):
+  # type: (MonorailConnection, str, Services) -> (int, int)
+  """Ingests a FieldDef's resource name.
+
+  Args:
+    cnxn: MonorailConnection to the database.
+    name: Resource name of a FieldDef.
+    services: Services object for connections to backend services.
+
+  Returns:
+    The Project's ID and the FieldDef's ID. FieldDef is not guaranteed to exist.
+    TODO(jessan): This order should be consistent throughout the file.
+
+  Raises:
+    InputException if the given name does not have a valid format.
+    NoSuchProjectException if the given project name does not exist.
+  """
+  match = _GetResourceNameMatch(name, FIELD_DEF_NAME_RE)
+  field_id = int(match.group('field_def'))
+  project_name = match.group('project_name')
+  id_dict = services.project.LookupProjectIDs(cnxn, [project_name])
+  project_id = id_dict.get(project_name)
+  if project_id is None:
+    raise exceptions.NoSuchProjectException(
+        'Project not found: %s.' % project_name)
+
+  return project_id, field_id
+
+# Hotlists
+
+def IngestHotlistName(name):
+  # type: (str) -> int
+  """Takes a Hotlist resource name and returns the Hotlist ID.
+
+  Args:
+    name: Resource name of a Hotlist.
+
+  Returns:
+    The Hotlist's ID
+
+  Raises:
+    InputException if the given name does not have a valid format.
+  """
+  match = _GetResourceNameMatch(name, HOTLIST_NAME_RE)
+  return int(match.group('hotlist_id'))
+
+
+def IngestHotlistItemNames(cnxn, names, services):
+  # type: (MonorailConnection, Sequence[str], Services -> Sequence[int]
+  """Takes HotlistItem resource names and returns the associated Issues' IDs.
+
+  Args:
+    cnxn: MonorailConnection to the database.
+    names: List of HotlistItem resource names.
+    services: Services object for connections to backend services.
+
+  Returns:
+    List of Issue IDs associated with the given HotlistItems.
+
+  Raises:
+    InputException if a resource name does not have a valid format.
+    NoSuchProjectException if an Issue's Project is not found.
+    NoSuchIssueException if an Issue is not found.
+  """
+  project_local_id_pairs = []
+  for name in names:
+    match = _GetResourceNameMatch(name, HOTLIST_ITEM_NAME_RE)
+    project_local_id_pairs.append(
+        (match.group('project_name'), int(match.group('local_id'))))
+  return _IssueIdsFromLocalIds(cnxn, project_local_id_pairs, services)
+
+
+def ConvertHotlistName(hotlist_id):
+  # type: (int) -> str
+  """Takes a Hotlist and returns the Hotlist's resource name.
+
+  Args:
+    hotlist_id: ID of the Hotlist.
+
+  Returns:
+    The resource name of the Hotlist.
+  """
+  return HOTLIST_NAME_TMPL.format(hotlist_id=hotlist_id)
+
+
+def ConvertHotlistItemNames(cnxn, hotlist_id, issue_ids, services):
+  # type: (MonorailConnection, int, Collection[int], Services) ->
+  #     Mapping[int, str]
+  """Takes a Hotlist ID and HotlistItem's issue_ids and returns
+     the Hotlist items' resource names.
+
+  Args:
+    cnxn: MonorailConnection object.
+    hotlist_id: ID of the Hotlist the items belong to.
+    issue_ids: List of Issue IDs that are part of the hotlist's items.
+    services: Services object for connections to backend services.
+
+  Returns:
+    Dict of Issue IDs to HotlistItem resource names for Issues that are found.
+  """
+  # {issue_id: (project_name, local_id),...}
+  issue_refs_dict = services.issue.LookupIssueRefs(cnxn, issue_ids)
+
+  issue_ids_to_names = {}
+  for issue_id in issue_ids:
+    project_name, local_id = issue_refs_dict.get(issue_id, (None, None))
+    if project_name and local_id:
+      issue_ids_to_names[issue_id] = HOTLIST_ITEM_NAME_TMPL.format(
+          hotlist_id=hotlist_id, project_name=project_name, local_id=local_id)
+
+  return issue_ids_to_names
+
+# Issues
+
+
+def IngestCommentName(cnxn, name, services):
+  # type: (MonorailConnection, str, Services) -> Tuple[int, int, int]
+  """Ingests a Comment's resource name.
+
+  Args:
+    cnxn: MonorailConnection to the database.
+    name: Resource name of a Comment.
+    services: Services object for connections to backend services.
+
+  Returns:
+    Tuple containing three items:
+        1. Global ID of the parent project.
+        2. Global Issue id of the parent issue.
+        3. Sequence number of the comment. This is not checked for existence.
+
+  Raises:
+    InputException if the given name does not have a valid format.
+    NoSuchIssueException if the parent Issue does not exist.
+    NoSuchProjectException if the parent Project does not exist.
+  """
+  match = _GetResourceNameMatch(name, COMMENT_NAME_RE)
+
+  # Project
+  project_name = match.group('project')
+  id_dict = services.project.LookupProjectIDs(cnxn, [project_name])
+  project_id = id_dict.get(project_name)
+  if project_id is None:
+    raise exceptions.NoSuchProjectException(
+        'Project not found: %s.' % project_name)
+  # Issue
+  local_id = int(match.group('local_id'))
+  issue_pair = [(project_name, local_id)]
+  issue_id = _IssueIdsFromLocalIds(cnxn, issue_pair, services)[0]
+
+  return project_id, issue_id, int(match.group('comment_num'))
+
+
+def CreateCommentNames(issue_local_id, issue_project, comment_sequence_nums):
+  # type: (int, str, Sequence[int]) -> Mapping[int, str]
+  """Returns the resource names for the given comments.
+
+  Note: crbug.com/monorail/7507 has important context about guarantees required
+  for comment resource names to be permanent references.
+
+  Args:
+    issue_local_id: local id of the issue for which we're converting comments.
+    issue_project: the project of the issue for which we're converting comments.
+    comment_sequence_nums: sequence numbers of comments on the given issue.
+
+  Returns:
+    A mapping from comment sequence number to comment resource names.
+  """
+  sequence_nums_to_names = {}
+  for comment_sequence_num in comment_sequence_nums:
+    sequence_nums_to_names[comment_sequence_num] = COMMENT_NAME_TMPL.format(
+        project=issue_project,
+        local_id=issue_local_id,
+        comment_id=comment_sequence_num)
+  return sequence_nums_to_names
+
+def IngestApprovalDefName(cnxn, name, services):
+  # type: (MonorailConnection, str, Services) -> int
+  """Ingests an ApprovalDef's resource name.
+
+  Args:
+    cnxn: MonorailConnection to the database.
+    name: Resource name of an ApprovalDef.
+    services: Services object for connections to backend services.
+
+  Returns:
+    The ApprovalDef ID specified in `name`.
+    The ApprovalDef is not guaranteed to exist.
+
+  Raises:
+    InputException if the given name does not have a valid format.
+    NoSuchProjectException if the given project name does not exist.
+  """
+  match = _GetResourceNameMatch(name, APPROVAL_DEF_NAME_RE)
+
+  # Project
+  project_name = match.group('project_name')
+  id_dict = services.project.LookupProjectIDs(cnxn, [project_name])
+  project_id = id_dict.get(project_name)
+  if project_id is None:
+    raise exceptions.NoSuchProjectException(
+        'Project not found: %s.' % project_name)
+
+  return int(match.group('approval_def'))
+
+def IngestApprovalValueName(cnxn, name, services):
+  # type: (MonorailConnection, str, Services) -> Tuple[int, int, int]
+  """Ingests the three components of an ApprovalValue resource name.
+
+  Args:
+    cnxn: MonorailConnection object.
+    name: Resource name of an ApprovalValue.
+    services: Services object for connections to backend services.
+
+  Returns:
+    Tuple containing three items
+        1. Global ID of the parent project.
+        2. Global Issue ID of the parent issue.
+        3. The approval_id portion of the resource name. This is not checked
+           for existence.
+
+   Raises:
+    InputException if the given name does not have a valid format.
+    NoSuchIssueException if the parent Issue does not exist.
+    NoSuchProjectException if the parent Project does not exist.
+  """
+  match = _GetResourceNameMatch(name, APPROVAL_VALUE_RE)
+
+  # Project
+  project_name = match.group('project')
+  id_dict = services.project.LookupProjectIDs(cnxn, [project_name])
+  project_id = id_dict.get(project_name)
+  if project_id is None:
+    raise exceptions.NoSuchProjectException(
+        'Project not found: %s.' % project_name)
+  # Issue
+  local_id = int(match.group('local_id'))
+  issue_pair = [(project_name, local_id)]
+  issue_id = _IssueIdsFromLocalIds(cnxn, issue_pair, services)[0]
+
+  return project_id, issue_id, int(match.group('approval_id'))
+
+
+def IngestIssueName(cnxn, name, services):
+  # type: (MonorailConnection, str, Services) -> int
+  """Takes an Issue resource name and returns its global ID.
+
+  Args:
+    cnxn: MonorailConnection object.
+    name: Resource name of an Issue.
+    services: Services object for connections to backend services.
+
+  Returns:
+    The global Issue ID associated with the name.
+
+  Raises:
+    InputException if the given name does not have a valid format.
+    NoSuchIssueException if the Issue does not exist.
+    NoSuchProjectException if an Issue's Project is not found.
+
+  """
+  return IngestIssueNames(cnxn, [name], services)[0]
+
+
+def IngestIssueNames(cnxn, names, services):
+  # type: (MonorailConnection, Sequence[str], Services) -> Sequence[int]
+  """Returns global IDs for the given Issue resource names.
+
+  Args:
+    cnxn: MonorailConnection object.
+    names: Resource names of zero or more issues.
+    services: Services object for connections to backend services.
+
+  Returns:
+    The global IDs for the issues.
+
+  Raises:
+    InputException if a resource name does not have a valid format.
+    NoSuchIssueException if an Issue is not found.
+    NoSuchProjectException if an Issue's Project is not found.
+  """
+  project_local_id_pairs = []
+  with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+    for name in names:
+      try:
+        match = _GetResourceNameMatch(name, ISSUE_NAME_RE)
+        project_local_id_pairs.append(
+            (match.group('project'), int(match.group('local_id'))))
+      except exceptions.InputException as e:
+        err_agg.AddErrorMessage(e.message)
+  return _IssueIdsFromLocalIds(cnxn, project_local_id_pairs, services)
+
+
+def IngestProjectFromIssue(issue_name):
+  # type: (str) -> str
+  """Takes an issue resource_name and returns its project name.
+
+  TODO(crbug/monorail/7614): This method should only be needed for the
+  workaround for the referenced issue. When the cleanup is completed, this
+  method should be able to be removed.
+
+  Args:
+    issue_name: A resource name for an issue.
+
+  Returns:
+    The project section of the resource name (e.g for 'projects/xyz/issue/1'),
+    the method would return 'xyz'. The associated project is not guaranteed to
+    exist.
+
+  Raises:
+    InputException if 'issue_name' does not have a valid format.
+  """
+  match = _GetResourceNameMatch(issue_name, ISSUE_NAME_RE)
+  return match.group('project')
+
+
+def ConvertIssueName(cnxn, issue_id, services):
+  # type: (MonorailConnection, int, Services) -> str
+  """Takes an Issue ID and returns the corresponding Issue resource name.
+
+  Args:
+    cnxn: MonorailConnection object.
+    issue_id: The ID of the issue.
+    services: Services object.
+
+  Returns:
+    The resource name of the Issue.
+
+  Raises:
+    NoSuchIssueException if the issue is not found.
+  """
+  name = ConvertIssueNames(cnxn, [issue_id], services).get(issue_id)
+  if not name:
+    raise exceptions.NoSuchIssueException()
+  return name
+
+
+def ConvertIssueNames(cnxn, issue_ids, services):
+  # type: (MonorailConnection, Collection[int], Services) -> Mapping[int, str]
+  """Takes Issue IDs and returns the Issue resource names.
+
+  Args:
+    cnxn: MonorailConnection object.
+    issue_ids: List of Issue IDs
+    services: Services object.
+
+  Returns:
+    Dict of Issue IDs to Issue resource names for Issues that are found.
+  """
+  issue_ids_to_names = {}
+  issue_refs_dict = services.issue.LookupIssueRefs(cnxn, issue_ids)
+  for issue_id in issue_ids:
+    project, local_id = issue_refs_dict.get(issue_id, (None, None))
+    if project and local_id:
+      issue_ids_to_names[issue_id] = _ConstructIssueName(project, local_id)
+  return issue_ids_to_names
+
+
+def _ConstructIssueName(project, local_id):
+  # type: (str, int) -> str
+  """Takes project name and issue local id returns the Issue resource name."""
+  return ISSUE_NAME_TMPL.format(project=project, local_id=local_id)
+
+
+def ConvertApprovalValueNames(cnxn, issue_id, services):
+  # type: (MonorailConnection, int, Services)
+  #   -> Mapping[int, str]
+  """Takes an Issue ID and returns the resource names of its ApprovalValues.
+
+  Args:
+    cnxn: MonorailConnection object.
+    issue_id: ID of the Issue the approval_values belong to.
+    services: Services object.
+
+  Returns:
+    Dict of ApprovalDef IDs to ApprovalValue resource names for
+      ApprovalDefs that are found.
+
+  Raises:
+    NoSuchIssueException if the Issue is not found.
+  """
+  issue = services.issue.GetIssue(cnxn, issue_id)
+  project = services.project.GetProject(cnxn, issue.project_id)
+  config = services.config.GetProjectConfig(cnxn, issue.project_id)
+
+  ads_by_id = {fd.field_id: fd for fd in config.field_defs
+               if fd.field_type is tracker_pb2.FieldTypes.APPROVAL_TYPE}
+
+  approval_def_ids = [av.approval_id for av in issue.approval_values]
+  approval_ids_to_names = {}
+  for ad_id in approval_def_ids:
+    fd = ads_by_id.get(ad_id)
+    if not fd:
+      logging.info('Approval type field with id %d not found.', ad_id)
+      continue
+    approval_ids_to_names[ad_id] = APPROVAL_VALUE_NAME_TMPL.format(
+        project=project.project_name,
+        local_id=issue.local_id,
+        approval_id=ad_id)
+  return approval_ids_to_names
+
+# Users
+
+
+def IngestUserName(cnxn, name, services, autocreate=False):
+  # type: (MonorailConnection, str, Services) -> int
+  """Takes a User resource name and returns a User ID.
+
+  Args:
+    cnxn: MonorailConnection object.
+    name: The User resource name.
+    services: Services object.
+    autocreate: set to True if new Users should be created for
+        emails in resource names that do not belong to existing
+        Users.
+
+  Returns:
+    The ID of the User.
+
+  Raises:
+    InputException if the resource name does not have a valid format.
+    NoSuchUserException if autocreate is False and the given email
+        was not found.
+  """
+  match = _GetResourceNameMatch(name, USER_NAME_RE)
+  user_id = match.group('user_id')
+  if user_id:
+    return int(user_id)
+  elif validate.IsValidEmail(match.group('potential_email')):
+    return services.user.LookupUserID(
+        cnxn, match.group('potential_email'), autocreate=autocreate)
+  else:
+    raise exceptions.InputException(
+        'Invalid email format found in User resource name: %s' % name)
+
+
+def IngestUserNames(cnxn, names, services, autocreate=False):
+  # Type: (MonorailConnection, Sequence[str], Services, Optional[bool]) ->
+  #     Sequence[int]
+  """Takes User resource names and returns the User IDs.
+
+  Args:
+    cnxn: MonorailConnection object.
+    names: List of User resource names.
+    services: Services object.
+    autocreate: set to True if new Users should be created for
+        emails in resource names that do not belong to existing
+        Users.
+
+  Returns:
+    List of User IDs in the same order as names.
+
+  Raises:
+    InputException if an resource name does not have a valid format.
+    NoSuchUserException if autocreate is False and some users with given
+        emails were not found.
+  """
+  ids = []
+  for name in names:
+    ids.append(IngestUserName(cnxn, name, services, autocreate))
+
+  return ids
+
+
+def ConvertUserName(user_id):
+  # type: (int) -> str
+  """Takes a User ID and returns the User's resource name."""
+  return ConvertUserNames([user_id])[user_id]
+
+
+def ConvertUserNames(user_ids):
+  # type: (Collection[int]) -> Mapping[int, str]
+  """Takes User IDs and returns the Users' resource names.
+
+  Args:
+    user_ids: List of User IDs.
+
+  Returns:
+    Dict of User IDs to User resource names for all given user_ids.
+  """
+  user_ids_to_names = {}
+  for user_id in user_ids:
+    user_ids_to_names[user_id] = USER_NAME_TMPL.format(user_id=user_id)
+
+  return user_ids_to_names
+
+
+def ConvertProjectStarName(cnxn, user_id, project_id, services):
+  # type: (MonorailConnection, int, int, Services) -> str
+  """Takes User ID and Project ID and returns the ProjectStar resource name.
+
+  Args:
+    user_id: User ID associated with the star.
+    project_id: ID of the starred project.
+
+  Returns:
+    The ProjectStar's name.
+
+  Raises:
+    NoSuchProjectException if the project_id is not found.
+  """
+  project_name = services.project.LookupProjectNames(
+      cnxn, [project_id]).get(project_id)
+
+  return PROJECT_STAR_NAME_TMPL.format(
+      user_id=user_id, project_name=project_name)
+
+# Projects
+
+
+def IngestProjectName(cnxn, name, services):
+  # type: (str) -> int
+  """Takes a Project resource name and returns the project id.
+
+  Args:
+    name: Resource name of a Project.
+
+  Returns:
+    The project's id
+
+  Raises:
+    InputException if the given name does not have a valid format.
+    NoSuchProjectException if no project exists with the given name.
+  """
+  match = _GetResourceNameMatch(name, PROJECT_NAME_RE)
+  project_name = match.group('project_name')
+
+  id_dict = services.project.LookupProjectIDs(cnxn, [project_name])
+
+  return id_dict.get(project_name)
+
+
+def ConvertTemplateNames(cnxn, project_id, template_ids, services):
+  # type: (MonorailConnection, int, Collection[int] Services) ->
+  #     Mapping[int, str]
+  """Takes Template IDs and returns the Templates' resource names
+
+  Args:
+    cnxn: MonorailConnection object.
+    project_id: Project ID of Project that Templates must belong to.
+    template_ids: Template IDs to convert.
+    services: Services object.
+
+  Returns:
+    Dict of template ID to template resource names for all found template IDs
+    within the given project.
+
+  Raises:
+    NoSuchProjectException if no project exists with given id.
+  """
+  id_to_resource_names = {}
+
+  project_name = services.project.LookupProjectNames(
+      cnxn, [project_id]).get(project_id)
+  project_templates = services.template.GetProjectTemplates(cnxn, project_id)
+  tmpl_by_id = {tmpl.template_id: tmpl for tmpl in project_templates}
+
+  for template_id in template_ids:
+    if template_id not in tmpl_by_id:
+      logging.info(
+          'Ignoring template referencing a non-existent id: %s, ' \
+          'or not in project: %s', template_id, project_id)
+      continue
+    id_to_resource_names[template_id] = ISSUE_TEMPLATE_TMPL.format(
+        project_name=project_name,
+        template_id=template_id)
+
+  return id_to_resource_names
+
+
+def IngestTemplateName(cnxn, name, services):
+  # type: (MonorailConnection, str, Services) -> Tuple[int, int]
+  """Ingests an IssueTemplate resource name.
+
+  Args:
+    cnxn: MonorailConnection object.
+    name: Resource name of an IssueTemplate.
+    services: Services object.
+
+  Returns:
+    The IssueTemplate's ID and the Project's ID.
+
+  Raises:
+    InputException if the given name does not have a valid format.
+    NoSuchProjectException if the given project name does not exist.
+  """
+  match = _GetResourceNameMatch(name, ISSUE_TEMPLATE_RE)
+  template_id = int(match.group('template_id'))
+  project_name = match.group('project_name')
+
+  id_dict = services.project.LookupProjectIDs(cnxn, [project_name])
+  project_id = id_dict.get(project_name)
+  if project_id is None:
+    raise exceptions.NoSuchProjectException(
+        'Project not found: %s.' % project_name)
+  return template_id, project_id
+
+
+def ConvertStatusDefNames(cnxn, statuses, project_id, services):
+  # type: (MonorailConnection, Collection[str], int, Services) ->
+  #     Mapping[str, str]
+  """Takes list of status strings and returns StatusDef resource names
+
+  Args:
+    cnxn: MonorailConnection object.
+    statuses: List of status name strings
+    project_id: project id of project this belongs to
+    services: Services object.
+
+  Returns:
+    Mapping of string to resource name for all given `statuses`.
+
+  Raises:
+    NoSuchProjectException if no project exists with given id.
+  """
+  project = services.project.GetProject(cnxn, project_id)
+
+  name_dict = {}
+  for status in statuses:
+    name_dict[status] = STATUS_DEF_TMPL.format(
+        project_name=project.project_name, status=status)
+
+  return name_dict
+
+
+def ConvertLabelDefNames(cnxn, labels, project_id, services):
+  # type: (MonorailConnection, Collection[str], int, Services) ->
+  #     Mapping[str, str]
+  """Takes a list of labels and returns LabelDef resource names
+
+  Args:
+    cnxn: MonorailConnection object.
+    labels: List of labels as string
+    project_id: project id of project this belongs to
+    services: Services object.
+
+  Returns:
+    Dict of label string to label's resource name for all given `labels`.
+
+  Raises:
+    NoSuchProjectException if no project exists with given id.
+  """
+  project = services.project.GetProject(cnxn, project_id)
+
+  name_dict = {}
+
+  for label in labels:
+    name_dict[label] = LABEL_DEF_TMPL.format(
+        project_name=project.project_name, label=label)
+
+  return name_dict
+
+
+def ConvertComponentDefNames(cnxn, component_ids, project_id, services):
+  # type: (MonorailConnection, Collection[int], int, Services) ->
+  #     Mapping[int, str]
+  """Takes Component IDs and returns ComponentDef resource names
+
+  Args:
+    cnxn: MonorailConnection object.
+    component_ids: List of component ids
+    project_id: project id of project this belongs to
+    services: Services object.
+
+  Returns:
+    Dict of component ID to component's resource name for all given
+    `component_ids`
+
+  Raises:
+    NoSuchProjectException if no project exists with given id.
+  """
+  project = services.project.GetProject(cnxn, project_id)
+
+  id_dict = {}
+
+  for component_id in component_ids:
+    id_dict[component_id] = COMPONENT_DEF_TMPL.format(
+        project_name=project.project_name, component_id=component_id)
+
+  return id_dict
+
+
+def IngestComponentDefNames(cnxn, names, services):
+  # type: (MonorailConnection, Sequence[str], Services)
+  #     -> Sequence[Tuple[int, int]]
+  """Takes a list of component resource names and returns their IDs.
+
+  Args:
+    cnxn: MonorailConnection object.
+    names: List of component resource names.
+    services: Services object.
+
+  Returns:
+    List of (project ID, component ID)s in the same order as names.
+
+  Raises:
+    InputException if a resource name does not have a valid format.
+    NoSuchProjectException if no project exists with given id.
+    NoSuchComponentException if a component is not found.
+  """
+  # Parse as many (component id or path, project name) pairs as possible.
+  parsed_comp_projectnames = []
+  with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+    for name in names:
+      try:
+        match = _GetResourceNameMatch(name, COMPONENT_DEF_RE)
+        project_name = match.group('project_name')
+        component_id = match.group('component_id')
+        if component_id:
+          parsed_comp_projectnames.append((int(component_id), project_name))
+        else:
+          parsed_comp_projectnames.append(
+              (str(match.group('path')), project_name))
+      except exceptions.InputException as e:
+        err_agg.AddErrorMessage(e.message)
+
+  # Validate as many projects as possible.
+  project_names = {project_name for _, project_name in parsed_comp_projectnames}
+  project_ids_by_name = services.project.LookupProjectIDs(cnxn, project_names)
+  with exceptions.ErrorAggregator(exceptions.NoSuchProjectException) as err_agg:
+    for _, project_name in parsed_comp_projectnames:
+      if project_name not in project_ids_by_name:
+        err_agg.AddErrorMessage('Project not found: %s.' % project_name)
+
+  configs_by_pid = services.config.GetProjectConfigs(
+      cnxn, project_ids_by_name.values())
+  compid_by_pid = {}
+  comp_path_by_pid = {}
+  for pid, config in configs_by_pid.items():
+    compid_by_pid[pid] = {comp.component_id for comp in config.component_defs}
+    comp_path_by_pid[pid] = {
+        comp.path.lower(): comp.component_id for comp in config.component_defs
+    }
+
+  # Find as many components as possible
+  pid_cid_pairs = []
+  with exceptions.ErrorAggregator(
+      exceptions.NoSuchComponentException) as err_agg:
+    for comp, pname in parsed_comp_projectnames:
+      pid = project_ids_by_name[pname]
+      if isinstance(comp, int) and comp in compid_by_pid[pid]:
+        pid_cid_pairs.append((pid, comp))
+      elif isinstance(comp, str) and comp.lower() in comp_path_by_pid[pid]:
+        pid_cid_pairs.append((pid, comp_path_by_pid[pid][comp.lower()]))
+      else:
+        err_agg.AddErrorMessage('Component not found: %r.' % comp)
+
+  return pid_cid_pairs
+
+
+def ConvertFieldDefNames(cnxn, field_ids, project_id, services):
+  # type: (MonorailConnection, Collection[int], int, Services) ->
+  #     Mapping[int, str]
+  """Takes Field IDs and returns FieldDef resource names.
+
+  Args:
+    cnxn: MonorailConnection object.
+    field_ids: List of Field IDs
+    project_id: project ID that each Field must belong to.
+    services: Services object.
+
+  Returns:
+    Dict of Field ID to FieldDef resource name for FieldDefs that are found.
+
+  Raises:
+    NoSuchProjectException if no project exists with given ID.
+  """
+  project = services.project.GetProject(cnxn, project_id)
+  config = services.config.GetProjectConfig(cnxn, project_id)
+
+  fds_by_id = {fd.field_id: fd for fd in config.field_defs}
+
+  id_dict = {}
+
+  for field_id in field_ids:
+    field_def = fds_by_id.get(field_id)
+    if not field_def:
+      logging.info('Ignoring field referencing a non-existent id: %s', field_id)
+      continue
+    id_dict[field_id] = FIELD_DEF_TMPL.format(
+        project_name=project.project_name, field_id=field_id)
+
+  return id_dict
+
+
+def ConvertApprovalDefNames(cnxn, approval_ids, project_id, services):
+  # type: (MonorailConnection, Collection[int], int, Services) ->
+  #     Mapping[int, str]
+  """Takes Approval IDs and returns ApprovalDef resource names.
+
+  Args:
+    cnxn: MonorailConnection object.
+    approval_ids: List of Approval IDs.
+    project_id: Project ID these approvals must belong to.
+    services: Services object.
+
+  Returns:
+    Dict of Approval ID to ApprovalDef resource name for ApprovalDefs
+    that are found.
+
+  Raises:
+    NoSuchProjectException if no project exists with given ID.
+  """
+  project = services.project.GetProject(cnxn, project_id)
+  config = services.config.GetProjectConfig(cnxn, project_id)
+
+  fds_by_id = {fd.field_id: fd for fd in config.field_defs}
+
+  id_dict = {}
+
+  for approval_id in approval_ids:
+    approval_def = fds_by_id.get(approval_id)
+    if not approval_def:
+      logging.info(
+          'Ignoring approval referencing a non-existent id: %s', approval_id)
+      continue
+    id_dict[approval_id] = APPROVAL_DEF_TMPL.format(
+        project_name=project.project_name, approval_id=approval_id)
+
+  return id_dict
+
+
+def ConvertProjectName(cnxn, project_id, services):
+  # type: (MonorailConnection, int, Services) -> str
+  """Takes a Project ID and returns the Project's resource name.
+
+  Args:
+    cnxn: MonorailConnection object.
+    project_id: ID of the Project.
+    services: Services object.
+
+  Returns:
+    The resource name of the Project.
+
+  Raises:
+    NoSuchProjectException if no project exists with given id.
+  """
+  project_name = services.project.LookupProjectNames(
+      cnxn, [project_id]).get(project_id)
+  return PROJECT_NAME_TMPL.format(project_name=project_name)
+
+
+def ConvertProjectConfigName(cnxn, project_id, services):
+  # type: (MonorailConnection, int, Services) -> str
+  """Takes a Project ID and returns that project's config resource name.
+
+  Args:
+    cnxn: MonorailConnection object.
+    project_id: ID of the Project.
+    services: Services object.
+
+  Returns:
+    The resource name of the ProjectConfig.
+
+  Raises:
+    NoSuchProjectException if no project exists with given id.
+  """
+  project_name = services.project.LookupProjectNames(
+      cnxn, [project_id]).get(project_id)
+  return PROJECT_CONFIG_TMPL.format(project_name=project_name)
+
+
+def ConvertProjectMemberName(cnxn, project_id, user_id, services):
+  # type: (MonorailConnection, int, int, Services) -> str
+  """Takes Project and User ID then returns the ProjectMember resource name.
+
+  Args:
+    cnxn: MonorailConnection object.
+    project_id: ID of the Project.
+    user_id: ID of the User.
+    services: Services object.
+
+  Returns:
+    The resource name of the ProjectMember.
+
+  Raises:
+    NoSuchProjectException if no project exists with given id.
+  """
+  project_name = services.project.LookupProjectNames(
+      cnxn, [project_id]).get(project_id)
+
+  return PROJECT_MEMBER_NAME_TMPL.format(
+      project_name=project_name, user_id=user_id)
+
+
+def ConvertProjectSavedQueryNames(cnxn, query_ids, project_id, services):
+  # type: (MonorailConnection, Collection[int], int, Services) ->
+  #     Mapping[int, str]
+  """Takes SavedQuery IDs and returns ProjectSavedQuery resource names.
+
+  Args:
+    cnxn: MonorailConnection object.
+    query_ids: List of SavedQuery ids
+    project_id: project id of project this belongs to
+    services: Services object.
+
+  Returns:
+    Dict of ids to ProjectSavedQuery resource names for all found query ids
+    that belong to given project_id.
+
+  Raises:
+    NoSuchProjectException if no project exists with given id.
+  """
+  project_name = services.project.LookupProjectNames(
+      cnxn, [project_id]).get(project_id)
+  all_project_queries = services.features.GetCannedQueriesByProjectID(
+      cnxn, project_id)
+  query_by_ids = {query.query_id: query for query in all_project_queries}
+  ids_to_names = {}
+  for query_id in query_ids:
+    query = query_by_ids.get(query_id)
+    if not query:
+      logging.info(
+          'Ignoring saved query referencing a non-existent id: %s '
+          'or not in project: %s', query_id, project_id)
+      continue
+    ids_to_names[query_id] = PROJECT_SQ_NAME_TMPL.format(
+        project_name=project_name, query_name=query.name)
+  return ids_to_names
diff --git a/api/sitewide_servicer.py b/api/sitewide_servicer.py
new file mode 100644
index 0000000..b008e5d
--- /dev/null
+++ b/api/sitewide_servicer.py
@@ -0,0 +1,57 @@
+# Copyright 2018 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+import settings
+from api import monorail_servicer
+from api.api_proto import sitewide_pb2
+from api.api_proto import sitewide_prpc_pb2
+from framework import servlet_helpers
+from framework import xsrf
+
+
+class SitewideServicer(monorail_servicer.MonorailServicer):
+  """Handle API requests related to sitewide operations.
+
+  Each API request is implemented with a method as defined in the .proto
+  file that does any request-specific validation, uses work_env to
+  safely operate on business objects, and returns a response proto.
+  """
+
+  DESCRIPTION = sitewide_prpc_pb2.SitewideServiceDescription
+
+  def __init__(self, services, make_rate_limiter=True):
+    # It might be that the token we're asked to refresh is the same one we are
+    # using to authenticate. So we should use a longer timeout
+    # (xsrf.REFRESH_TOKEN_TIMEOUT_SEC) when checking the XSRF
+    super(SitewideServicer, self).__init__(
+        services, make_rate_limiter, xsrf.REFRESH_TOKEN_TIMEOUT_SEC)
+
+  @monorail_servicer.PRPCMethod
+  def RefreshToken(self, mc, request):
+    """Return a new token."""
+    # Validate that the token we're asked to refresh would still be valid with a
+    # longer timeout.
+    xsrf.ValidateToken(
+        request.token, mc.auth.user_id, request.token_path,
+        timeout=xsrf.REFRESH_TOKEN_TIMEOUT_SEC)
+
+    result = sitewide_pb2.RefreshTokenResponse(
+        token=xsrf.GenerateToken(mc.auth.user_id, request.token_path),
+        token_expires_sec=xsrf.TokenExpiresSec())
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def GetServerStatus(self, _mc, _request):
+    result = sitewide_pb2.GetServerStatusResponse(
+        banner_message=settings.banner_message,
+        banner_time=servlet_helpers.GetBannerTime(settings.banner_time),
+        read_only=settings.read_only)
+    return result
diff --git a/api/test/__init__.py b/api/test/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/api/test/__init__.py
diff --git a/api/test/converters_test.py b/api/test/converters_test.py
new file mode 100644
index 0000000..e193423
--- /dev/null
+++ b/api/test/converters_test.py
@@ -0,0 +1,2222 @@
+# Copyright 2018 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
+
+"""Tests for converting internal protorpc to external protoc."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from mock import Mock, patch
+import unittest
+
+from google.protobuf import wrappers_pb2
+
+import settings
+from api import converters
+from api.api_proto import common_pb2
+from api.api_proto import features_objects_pb2
+from api.api_proto import issue_objects_pb2
+from api.api_proto import project_objects_pb2
+from api.api_proto import user_objects_pb2
+from framework import exceptions
+from framework import permissions
+from proto import tracker_pb2
+from proto import user_pb2
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+from services import features_svc
+from services import service_manager
+
+
+class ConverterFunctionsTest(unittest.TestCase):
+
+  NOW = 1234567890
+
+  def setUp(self):
+    self.users_by_id = {
+        111: testing_helpers.Blank(
+            display_name='one@example.com', email='one@example.com',
+            banned=False),
+        222: testing_helpers.Blank(
+            display_name='two@example.com', email='two@example.com',
+            banned=False),
+        333: testing_helpers.Blank(
+            display_name='ban...@example.com', email='banned@example.com',
+            banned=True),
+        }
+
+    self.services = service_manager.Services(
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        features=fake.FeaturesService())
+    self.cnxn = fake.MonorailConnection()
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=789)
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+
+    self.fd_1 = tracker_pb2.FieldDef(
+        field_name='FirstField', field_id=1,
+        field_type=tracker_pb2.FieldTypes.STR_TYPE,
+        applicable_type='')
+    self.fd_2 = tracker_pb2.FieldDef(
+        field_name='SecField', field_id=2,
+        field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        applicable_type='')
+    self.fd_3 = tracker_pb2.FieldDef(
+        field_name='LegalApproval', field_id=3,
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        applicable_type='')
+    self.fd_4 = tracker_pb2.FieldDef(
+        field_name='UserField', field_id=4,
+        field_type=tracker_pb2.FieldTypes.USER_TYPE,
+        applicable_type='')
+    self.fd_5 = tracker_pb2.FieldDef(
+        field_name='Pre', field_id=5,
+        field_type=tracker_pb2.FieldTypes.ENUM_TYPE,
+        applicable_type='')
+    self.fd_6 = tracker_pb2.FieldDef(
+        field_name='PhaseField', field_id=6,
+        field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        applicable_type='', is_phase_field=True)
+    self.fd_7 = tracker_pb2.FieldDef(
+        field_name='ApprovalEnum', field_id=7,
+        field_type=tracker_pb2.FieldTypes.ENUM_TYPE,
+        applicable_type='', approval_id=self.fd_3.field_id)
+
+    self.user_1 = self.services.user.TestAddUser('one@example.com', 111)
+    self.user_2 = self.services.user.TestAddUser('two@example.com', 222)
+    self.user_3 = self.services.user.TestAddUser('banned@example.com', 333)
+    self.issue_1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, project_name='proj')
+    self.issue_2 = fake.MakeTestIssue(
+        789, 2, 'sum', 'New', 111, project_name='proj')
+    self.services.issue.TestAddIssue(self.issue_1)
+    self.services.issue.TestAddIssue(self.issue_2)
+
+  def testConvertApprovalValues_Empty(self):
+    """We handle the case where an issue has no approval values."""
+    actual = converters.ConvertApprovalValues([], [], {}, self.config)
+    self.assertEqual([], actual)
+
+  def testConvertApprovalValues_Normal(self):
+    """We can convert a list of approval values."""
+    now = 1234567890
+    self.config.field_defs.append(tracker_pb2.FieldDef(
+        field_id=1, project_id=789, field_name='EstDays',
+        field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        applicable_type=''))
+    self.config.field_defs.append(tracker_pb2.FieldDef(
+        field_id=11, project_id=789, field_name='Accessibility',
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        applicable_type='Launch'))
+    self.config.approval_defs.append(tracker_pb2.ApprovalDef(
+        approval_id=11, approver_ids=[111], survey='survey 1'))
+    self.config.approval_defs.append(tracker_pb2.ApprovalDef(
+        approval_id=12, approver_ids=[111], survey='survey 2'))
+    av_11 = tracker_pb2.ApprovalValue(
+        approval_id=11, status=tracker_pb2.ApprovalStatus.NEED_INFO,
+        setter_id=111, set_on=now, approver_ids=[111, 222],
+        phase_id=21)
+    # Note: no approval def, no phase, so it won't be returned.
+    # TODO(ehmaldonado): Figure out support for "foreign" fields.
+    av_12 = tracker_pb2.ApprovalValue(
+        approval_id=12, status=tracker_pb2.ApprovalStatus.NOT_SET,
+        setter_id=111, set_on=now, approver_ids=[111])
+    phase_21 = tracker_pb2.Phase(phase_id=21, name='Stable', rank=1)
+    actual = converters.ConvertApprovalValues(
+        [av_11, av_12], [phase_21], self.users_by_id, self.config)
+
+    expected_av_1 = issue_objects_pb2.Approval(
+        field_ref=common_pb2.FieldRef(
+            field_id=11,
+            field_name='Accessibility',
+            type=common_pb2.APPROVAL_TYPE),
+        approver_refs=[
+            common_pb2.UserRef(user_id=111, display_name='one@example.com'),
+            common_pb2.UserRef(user_id=222, display_name='two@example.com'),
+            ],
+        status=issue_objects_pb2.NEED_INFO,
+        set_on=now,
+        setter_ref=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        phase_ref=issue_objects_pb2.PhaseRef(phase_name='Stable'))
+
+    self.assertEqual([expected_av_1], actual)
+
+  def testConvertApproval(self):
+    """We can convert ApprovalValues to protoc Approvals."""
+    approval_value = tracker_pb2.ApprovalValue(
+        approval_id=3,
+        status=tracker_pb2.ApprovalStatus.NEED_INFO,
+        setter_id=222,
+        set_on=2345,
+        approver_ids=[111],
+        phase_id=1
+    )
+
+    self.config.field_defs = [self.fd_1, self.fd_2, self.fd_3]
+
+    phase = tracker_pb2.Phase(phase_id=1, name='Canary')
+
+    actual = converters.ConvertApproval(
+        approval_value, self.users_by_id, self.config, phase=phase)
+    expected = issue_objects_pb2.Approval(
+        field_ref=common_pb2.FieldRef(
+            field_id=3,
+            field_name='LegalApproval',
+            type=common_pb2.APPROVAL_TYPE),
+        approver_refs=[common_pb2.UserRef(
+            user_id=111, display_name='one@example.com', is_derived=False)
+          ],
+        status=5,
+        set_on=2345,
+        setter_ref=common_pb2.UserRef(
+            user_id=222, display_name='two@example.com', is_derived=False
+        ),
+        phase_ref=issue_objects_pb2.PhaseRef(phase_name='Canary')
+    )
+
+    self.assertEqual(expected, actual)
+
+  def testConvertApproval_NonExistentApproval(self):
+    approval_value = tracker_pb2.ApprovalValue(
+        approval_id=3,
+        status=tracker_pb2.ApprovalStatus.NEED_INFO,
+        setter_id=222,
+        set_on=2345,
+        approver_ids=[111],
+        phase_id=1
+    )
+    phase = tracker_pb2.Phase(phase_id=1, name='Canary')
+    self.assertIsNone(converters.ConvertApproval(
+        approval_value, self.users_by_id, self.config, phase=phase))
+
+
+  def testConvertApprovalStatus(self):
+    """We can convert a protorpc ApprovalStatus to a protoc ApprovalStatus."""
+    actual = converters.ConvertApprovalStatus(
+        tracker_pb2.ApprovalStatus.REVIEW_REQUESTED)
+    self.assertEqual(actual, issue_objects_pb2.REVIEW_REQUESTED)
+
+    actual = converters.ConvertApprovalStatus(
+        tracker_pb2.ApprovalStatus.NOT_SET)
+    self.assertEqual(actual, issue_objects_pb2.NOT_SET)
+
+  def testConvertUserRef(self):
+    """We can convert user IDs to a UserRef."""
+    # No specified user
+    actual = converters.ConvertUserRef(None, None, self.users_by_id)
+    expected = None
+    self.assertEqual(expected, actual)
+
+    # Explicitly specified user
+    actual = converters.ConvertUserRef(111, None, self.users_by_id)
+    expected = common_pb2.UserRef(
+        user_id=111, is_derived=False, display_name='one@example.com')
+    self.assertEqual(expected, actual)
+
+    # Derived user
+    actual = converters.ConvertUserRef(None, 111, self.users_by_id)
+    expected = common_pb2.UserRef(
+        user_id=111, is_derived=True, display_name='one@example.com')
+    self.assertEqual(expected, actual)
+
+  def testConvertUserRefs(self):
+    """We can convert lists of user_ids into UserRefs."""
+    # No specified users
+    actual = converters.ConvertUserRefs(
+        [], [], self.users_by_id, False)
+    expected = []
+    self.assertEqual(expected, actual)
+
+    # A mix of explicit and derived users
+    actual = converters.ConvertUserRefs(
+        [111], [222], self.users_by_id, False)
+    expected = [
+      common_pb2.UserRef(
+          user_id=111, is_derived=False, display_name='one@example.com'),
+      common_pb2.UserRef(
+          user_id=222, is_derived=True, display_name='two@example.com'),
+      ]
+    self.assertEqual(expected, actual)
+
+    # Use display name
+    actual = converters.ConvertUserRefs([333], [], self.users_by_id, False)
+    self.assertEqual(
+      [common_pb2.UserRef(
+           user_id=333, is_derived=False, display_name='ban...@example.com')],
+      actual)
+
+    # Use email
+    actual = converters.ConvertUserRefs([333], [], self.users_by_id, True)
+    self.assertEqual(
+      [common_pb2.UserRef(
+           user_id=333, is_derived=False, display_name='banned@example.com')],
+      actual)
+
+  @patch('time.time')
+  def testConvertUsers(self, mock_time):
+    """We can convert lists of protorpc Users to protoc Users."""
+    mock_time.return_value = self.NOW
+    user1 = user_pb2.User(
+        user_id=1, email='user1@example.com', last_visit_timestamp=self.NOW)
+    user2 = user_pb2.User(
+        user_id=2, email='user2@example.com', is_site_admin=True,
+        last_visit_timestamp=self.NOW)
+    user3 = user_pb2.User(
+        user_id=3, email='user3@example.com',
+        linked_child_ids=[4])
+    user4 = user_pb2.User(
+        user_id=4, email='user4@example.com', last_visit_timestamp=1,
+        linked_parent_id=3)
+    users_by_id = {
+        3: testing_helpers.Blank(
+            display_name='user3@example.com', email='user3@example.com',
+            banned=False),
+        4: testing_helpers.Blank(
+            display_name='user4@example.com', email='user4@example.com',
+            banned=False),
+        }
+
+    actual = converters.ConvertUsers(
+        [user1, user2, user3, user4], users_by_id)
+    self.assertItemsEqual(
+        actual,
+        [user_objects_pb2.User(
+            user_id=1,
+            display_name='user1@example.com'),
+         user_objects_pb2.User(
+            user_id=2,
+            display_name='user2@example.com',
+            is_site_admin=True),
+         user_objects_pb2.User(
+            user_id=3,
+            display_name='user3@example.com',
+            availability='User never visited',
+            linked_child_refs=[common_pb2.UserRef(
+              user_id=4, display_name='user4@example.com')]),
+         user_objects_pb2.User(
+            user_id=4,
+            display_name='user4@example.com',
+            availability='Last visit > 30 days ago',
+            linked_parent_ref=common_pb2.UserRef(
+              user_id=3, display_name='user3@example.com')),
+         ])
+
+  def testConvetPrefValues(self):
+    """We can convert a list of UserPrefValues from protorpc to protoc."""
+    self.assertEqual(
+        [],
+        converters.ConvertPrefValues([]))
+
+    userprefvalues = [
+        user_pb2.UserPrefValue(name='foo_1', value='bar_1'),
+        user_pb2.UserPrefValue(name='foo_2', value='bar_2')]
+    actual = converters.ConvertPrefValues(userprefvalues)
+    expected = [
+        user_objects_pb2.UserPrefValue(name='foo_1', value='bar_1'),
+        user_objects_pb2.UserPrefValue(name='foo_2', value='bar_2')]
+    self.assertEqual(expected, actual)
+
+  def testConvertLabels(self):
+    """We can convert labels."""
+    # No labels specified
+    actual = converters.ConvertLabels([], [])
+    self.assertEqual([], actual)
+
+    # A mix of explicit and derived labels
+    actual = converters.ConvertLabels(
+        ['Milestone-66'], ['Restrict-View-CoreTeam'])
+    expected = [
+        common_pb2.LabelRef(label='Milestone-66', is_derived=False),
+        common_pb2.LabelRef(label='Restrict-View-CoreTeam', is_derived=True),
+        ]
+    self.assertEqual(expected, actual)
+
+  def testConvertComponentRef(self):
+    """We can convert a component ref."""
+    self.config.component_defs = [
+        tracker_pb2.ComponentDef(component_id=1, path='UI'),
+        tracker_pb2.ComponentDef(component_id=2, path='DB')]
+
+    self.assertEqual(
+        common_pb2.ComponentRef(
+            path='UI',
+            is_derived=False),
+        converters.ConvertComponentRef(1, self.config))
+
+    self.assertEqual(
+        common_pb2.ComponentRef(
+            path='DB',
+            is_derived=True),
+        converters.ConvertComponentRef(2, self.config, True))
+
+    self.assertIsNone(
+        converters.ConvertComponentRef(3, self.config, True))
+
+  def testConvertComponents(self):
+    """We can convert a list of components."""
+    self.config.component_defs = [
+      tracker_pb2.ComponentDef(component_id=1, path='UI'),
+      tracker_pb2.ComponentDef(component_id=2, path='DB'),
+      ]
+
+    # No components specified
+    actual = converters.ConvertComponents([], [], self.config)
+    self.assertEqual([], actual)
+
+    # A mix of explicit, derived, and non-existing components
+    actual = converters.ConvertComponents([1, 4], [2, 3], self.config)
+    expected = [
+        common_pb2.ComponentRef(path='UI', is_derived=False),
+        common_pb2.ComponentRef(path='DB', is_derived=True),
+        ]
+    self.assertEqual(expected, actual)
+
+  def testConvertIssueRef(self):
+    """We can convert a pair (project_name, local_id) to an IssueRef."""
+    actual = converters.ConvertIssueRef(('proj', 1))
+    self.assertEqual(
+        common_pb2.IssueRef(project_name='proj', local_id=1),
+        actual)
+
+  def testConvertIssueRef_ExtIssue(self):
+    """ConvertIssueRef successfully converts an external issue."""
+    actual = converters.ConvertIssueRef(('', 0), ext_id='b/1234567')
+    self.assertEqual(
+        common_pb2.IssueRef(project_name='', local_id=0,
+            ext_identifier='b/1234567'),
+        actual)
+
+  def testConvertIssueRefs(self):
+    """We can convert issue_ids to IssueRefs."""
+    related_refs_dict = {
+        78901: ('proj', 1),
+        78902: ('proj', 2),
+        }
+    actual = converters.ConvertIssueRefs([78901, 78902], related_refs_dict)
+    self.assertEqual(
+        [common_pb2.IssueRef(project_name='proj', local_id=1),
+         common_pb2.IssueRef(project_name='proj', local_id=2)],
+        actual)
+
+  def testConvertFieldType(self):
+    self.assertEqual(
+        common_pb2.STR_TYPE,
+        converters.ConvertFieldType(tracker_pb2.FieldTypes.STR_TYPE))
+
+    self.assertEqual(
+        common_pb2.URL_TYPE,
+        converters.ConvertFieldType(tracker_pb2.FieldTypes.URL_TYPE))
+
+  def testConvertFieldRef(self):
+    actual = converters.ConvertFieldRef(
+        1, 'SomeName', tracker_pb2.FieldTypes.ENUM_TYPE, None)
+    self.assertEqual(
+        actual,
+        common_pb2.FieldRef(
+            field_id=1,
+            field_name='SomeName',
+            type=common_pb2.ENUM_TYPE))
+
+  def testConvertFieldValue(self):
+    """We can convert one FieldValueView item to a protoc FieldValue."""
+    actual = converters.ConvertFieldValue(
+        1, 'Size', 123, tracker_pb2.FieldTypes.INT_TYPE, phase_name='Canary')
+    expected = issue_objects_pb2.FieldValue(
+        field_ref=common_pb2.FieldRef(
+            field_id=1,
+            field_name='Size',
+            type=common_pb2.INT_TYPE),
+        value='123',
+        phase_ref=issue_objects_pb2.PhaseRef(phase_name='Canary'))
+    self.assertEqual(expected, actual)
+
+    actual = converters.ConvertFieldValue(
+        1, 'Size', 123, tracker_pb2.FieldTypes.INT_TYPE, 'Legal', '',
+        is_derived=True)
+    expected = issue_objects_pb2.FieldValue(
+        field_ref=common_pb2.FieldRef(
+            field_id=1,
+            field_name='Size',
+            type=common_pb2.INT_TYPE,
+            approval_name='Legal'),
+        value='123',
+        is_derived=True)
+    self.assertEqual(expected, actual)
+
+  def testConvertFieldValue_Unicode(self):
+    """We can convert one FieldValueView unicode item to a protoc FieldValue."""
+    actual = converters.ConvertFieldValue(
+        1, 'Size', u'\xe2\x9d\xa4\xef\xb8\x8f',
+        tracker_pb2.FieldTypes.STR_TYPE, phase_name='Canary')
+    expected = issue_objects_pb2.FieldValue(
+        field_ref=common_pb2.FieldRef(
+            field_id=1,
+            field_name='Size',
+            type=common_pb2.STR_TYPE),
+        value=u'\xe2\x9d\xa4\xef\xb8\x8f',
+        phase_ref=issue_objects_pb2.PhaseRef(phase_name='Canary'))
+    self.assertEqual(expected, actual)
+
+  def testConvertFieldValues(self):
+    self.fd_2.approval_id = 3
+    self.config.field_defs = [
+        self.fd_1, self.fd_2, self.fd_3, self.fd_4, self.fd_5]
+    fv_1 = tracker_bizobj.MakeFieldValue(
+        1, None, 'string', None, None, None, False)
+    fv_2 = tracker_bizobj.MakeFieldValue(
+        2, 34, None, None, None, None, False)
+    fv_3 = tracker_bizobj.MakeFieldValue(
+        111, None, 'value', None, None, None, False)
+    labels = ['Pre-label', 'not-label-enum', 'prenot-label']
+    der_labels =  ['Pre-label2']
+    phases = [tracker_pb2.Phase(name='Canary', phase_id=17)]
+    fv_1.phase_id=17
+
+    actual = converters.ConvertFieldValues(
+        self.config, labels, der_labels, [fv_1, fv_2, fv_3], {}, phases=phases)
+
+    self.maxDiff = None
+    expected = [
+      issue_objects_pb2.FieldValue(
+          field_ref=common_pb2.FieldRef(
+              field_id=1,
+              field_name='FirstField',
+              type=common_pb2.STR_TYPE),
+          value='string',
+          phase_ref=issue_objects_pb2.PhaseRef(phase_name='Canary')),
+      issue_objects_pb2.FieldValue(
+          field_ref=common_pb2.FieldRef(
+              field_id=2,
+              field_name='SecField',
+              type=common_pb2.INT_TYPE,
+              approval_name='LegalApproval'),
+          value='34'),
+      issue_objects_pb2.FieldValue(
+          field_ref=common_pb2.FieldRef(
+              field_id=5, field_name='Pre', type=common_pb2.ENUM_TYPE),
+          value='label'),
+      issue_objects_pb2.FieldValue(
+          field_ref=common_pb2.FieldRef(
+              field_id=5, field_name='Pre', type=common_pb2.ENUM_TYPE),
+          value='label2', is_derived=True),
+      ]
+    self.assertItemsEqual(expected, actual)
+
+  def testConvertIssue(self):
+    """We can convert a protorpc Issue to a protoc Issue."""
+    related_refs_dict = {
+        78901: ('proj', 1),
+        78902: ('proj', 2),
+        }
+    now = 12345678
+    self.config.component_defs = [
+      tracker_pb2.ComponentDef(component_id=1, path='UI'),
+      tracker_pb2.ComponentDef(component_id=2, path='DB'),
+      ]
+    issue = fake.MakeTestIssue(
+      789, 3, 'sum', 'New', 111, labels=['Hot'],
+      derived_labels=['Scalability'], star_count=12, reporter_id=222,
+      opened_timestamp=now, component_ids=[1], project_name='proj',
+      cc_ids=[111], derived_cc_ids=[222])
+    issue.phases = [
+        tracker_pb2.Phase(phase_id=1, name='Dev', rank=1),
+        tracker_pb2.Phase(phase_id=2, name='Beta', rank=2),
+        ]
+    issue.dangling_blocked_on_refs = [
+        tracker_pb2.DanglingIssueRef(project='dangling_proj', issue_id=1234)]
+    issue.dangling_blocking_refs = [
+        tracker_pb2.DanglingIssueRef(project='dangling_proj', issue_id=5678)]
+
+    actual = converters.ConvertIssue(
+        issue, self.users_by_id, related_refs_dict, self.config)
+
+    expected = issue_objects_pb2.Issue(
+        project_name='proj',
+        local_id=3,
+        summary='sum',
+        status_ref=common_pb2.StatusRef(
+            status='New',
+            is_derived=False,
+            means_open=True),
+        owner_ref=common_pb2.UserRef(
+            user_id=111,
+            display_name='one@example.com',
+            is_derived=False),
+        cc_refs=[
+            common_pb2.UserRef(
+                user_id=111,
+                display_name='one@example.com',
+                is_derived=False),
+            common_pb2.UserRef(
+                user_id=222,
+                display_name='two@example.com',
+                is_derived=True)],
+        label_refs=[
+            common_pb2.LabelRef(label='Hot', is_derived=False),
+            common_pb2.LabelRef(label='Scalability', is_derived=True)],
+        component_refs=[common_pb2.ComponentRef(path='UI', is_derived=False)],
+        is_deleted=False,
+        reporter_ref=common_pb2.UserRef(
+            user_id=222, display_name='two@example.com', is_derived=False),
+        opened_timestamp=now,
+        component_modified_timestamp=now,
+        status_modified_timestamp=now,
+        owner_modified_timestamp=now,
+        star_count=12,
+        is_spam=False,
+        attachment_count=0,
+        dangling_blocked_on_refs=[
+            common_pb2.IssueRef(project_name='dangling_proj', local_id=1234)],
+        dangling_blocking_refs=[
+            common_pb2.IssueRef(project_name='dangling_proj', local_id=5678)],
+        phases=[
+            issue_objects_pb2.PhaseDef(
+              phase_ref=issue_objects_pb2.PhaseRef(phase_name='Dev'),
+              rank=1),
+            issue_objects_pb2.PhaseDef(
+              phase_ref=issue_objects_pb2.PhaseRef(phase_name='Beta'),
+              rank=2)])
+    self.assertEqual(expected, actual)
+
+  def testConvertIssue_NegativeAttachmentCount(self):
+    """We can convert a protorpc Issue to a protoc Issue."""
+    related_refs_dict = {
+        78901: ('proj', 1),
+        78902: ('proj', 2),
+        }
+    now = 12345678
+    self.config.component_defs = [
+      tracker_pb2.ComponentDef(component_id=1, path='UI'),
+      tracker_pb2.ComponentDef(component_id=2, path='DB'),
+      ]
+    issue = fake.MakeTestIssue(
+      789, 3, 'sum', 'New', 111, labels=['Hot'],
+      derived_labels=['Scalability'], star_count=12, reporter_id=222,
+      opened_timestamp=now, component_ids=[1], project_name='proj',
+      cc_ids=[111], derived_cc_ids=[222], attachment_count=-10)
+    issue.phases = [
+        tracker_pb2.Phase(phase_id=1, name='Dev', rank=1),
+        tracker_pb2.Phase(phase_id=2, name='Beta', rank=2),
+        ]
+    issue.dangling_blocked_on_refs = [
+        tracker_pb2.DanglingIssueRef(project='dangling_proj', issue_id=1234)]
+    issue.dangling_blocking_refs = [
+        tracker_pb2.DanglingIssueRef(project='dangling_proj', issue_id=5678)]
+
+    actual = converters.ConvertIssue(
+        issue, self.users_by_id, related_refs_dict, self.config)
+
+    expected = issue_objects_pb2.Issue(
+        project_name='proj',
+        local_id=3,
+        summary='sum',
+        status_ref=common_pb2.StatusRef(
+            status='New',
+            is_derived=False,
+            means_open=True),
+        owner_ref=common_pb2.UserRef(
+            user_id=111,
+            display_name='one@example.com',
+            is_derived=False),
+        cc_refs=[
+            common_pb2.UserRef(
+                user_id=111,
+                display_name='one@example.com',
+                is_derived=False),
+            common_pb2.UserRef(
+                user_id=222,
+                display_name='two@example.com',
+                is_derived=True)],
+        label_refs=[
+            common_pb2.LabelRef(label='Hot', is_derived=False),
+            common_pb2.LabelRef(label='Scalability', is_derived=True)],
+        component_refs=[common_pb2.ComponentRef(path='UI', is_derived=False)],
+        is_deleted=False,
+        reporter_ref=common_pb2.UserRef(
+            user_id=222, display_name='two@example.com', is_derived=False),
+        opened_timestamp=now,
+        component_modified_timestamp=now,
+        status_modified_timestamp=now,
+        owner_modified_timestamp=now,
+        star_count=12,
+        is_spam=False,
+        dangling_blocked_on_refs=[
+            common_pb2.IssueRef(project_name='dangling_proj', local_id=1234)],
+        dangling_blocking_refs=[
+            common_pb2.IssueRef(project_name='dangling_proj', local_id=5678)],
+        phases=[
+            issue_objects_pb2.PhaseDef(
+              phase_ref=issue_objects_pb2.PhaseRef(phase_name='Dev'),
+              rank=1),
+            issue_objects_pb2.PhaseDef(
+              phase_ref=issue_objects_pb2.PhaseRef(phase_name='Beta'),
+              rank=2)])
+    self.assertEqual(expected, actual)
+
+  def testConvertIssue_ExternalMergedInto(self):
+    """ConvertIssue works on issues with external mergedinto values."""
+    issue = fake.MakeTestIssue(789, 3, 'sum', 'New', 111, project_name='proj',
+        merged_into_external='b/5678')
+    actual = converters.ConvertIssue(issue, self.users_by_id, {}, self.config)
+    expected = issue_objects_pb2.Issue(
+        project_name='proj',
+        local_id=3,
+        summary='sum',
+        merged_into_issue_ref=common_pb2.IssueRef(ext_identifier='b/5678'),
+        status_ref=common_pb2.StatusRef(
+            status='New',
+            is_derived=False,
+            means_open=True),
+        owner_ref=common_pb2.UserRef(
+            user_id=111,
+            display_name='one@example.com',
+            is_derived=False),
+        reporter_ref=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com', is_derived=False))
+
+    self.assertEqual(expected, actual)
+
+  def testConvertPhaseDef(self):
+    """We can convert a prototpc Phase to a protoc PhaseDef. """
+    phase = tracker_pb2.Phase(phase_id=1, name='phase', rank=2)
+    actual = converters.ConvertPhaseDef(phase)
+    expected = issue_objects_pb2.PhaseDef(
+        phase_ref=issue_objects_pb2.PhaseRef(phase_name='phase'),
+        rank=2
+    )
+    self.assertEqual(expected, actual)
+
+  def testConvertAmendment(self):
+    """We can convert various kinds of Amendments."""
+    amend = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.SUMMARY, newvalue='new', oldvalue='old')
+    actual = converters.ConvertAmendment(amend, self.users_by_id)
+    self.assertEqual('Summary', actual.field_name)
+    self.assertEqual('new', actual.new_or_delta_value)
+    self.assertEqual('old', actual.old_value)
+
+    amend = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.OWNER, added_user_ids=[111])
+    actual = converters.ConvertAmendment(amend, self.users_by_id)
+    self.assertEqual('Owner', actual.field_name)
+    self.assertEqual('one@example.com', actual.new_or_delta_value)
+    self.assertEqual('', actual.old_value)
+
+    amend = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.CC,
+        added_user_ids=[111], removed_user_ids=[222])
+    actual = converters.ConvertAmendment(amend, self.users_by_id)
+    self.assertEqual('Cc', actual.field_name)
+    self.assertEqual(
+      '-two@example.com one@example.com', actual.new_or_delta_value)
+    self.assertEqual('', actual.old_value)
+
+    amend = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.CUSTOM, custom_field_name='EstDays',
+        newvalue='12')
+    actual = converters.ConvertAmendment(amend, self.users_by_id)
+    self.assertEqual('EstDays', actual.field_name)
+    self.assertEqual('12', actual.new_or_delta_value)
+    self.assertEqual('', actual.old_value)
+
+  @patch('tracker.attachment_helpers.SignAttachmentID')
+  def testConvertAttachment(self, mock_SignAttachmentID):
+    mock_SignAttachmentID.return_value = 2
+    attach = tracker_pb2.Attachment(
+        attachment_id=1, mimetype='image/png', filename='example.png',
+        filesize=12345)
+
+    actual = converters.ConvertAttachment(attach, 'proj')
+
+    expected = issue_objects_pb2.Attachment(
+        attachment_id=1, filename='example.png',
+        size=12345, content_type='image/png',
+        thumbnail_url='attachment?aid=1&signed_aid=2&inline=1&thumb=1',
+        view_url='attachment?aid=1&signed_aid=2&inline=1',
+        download_url='attachment?aid=1&signed_aid=2')
+    self.assertEqual(expected, actual)
+
+  def testConvertComment_Normal(self):
+    """We can convert a protorpc IssueComment to a protoc Comment."""
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=111, timestamp=now,
+        content='a comment', sequence=12)
+
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [], {}, 111,
+        permissions.PermissionSet([]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12, is_deleted=False,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='a comment', is_spam=False)
+    self.assertEqual(expected, actual)
+
+  def testConvertComment_CanReportComment(self):
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=111, timestamp=now,
+        content='a comment', sequence=12)
+
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [], {}, 111,
+        permissions.PermissionSet([permissions.FLAG_SPAM]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='a comment', can_flag=True)
+    self.assertEqual(expected, actual)
+
+  def testConvertComment_CanUnReportComment(self):
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=111, timestamp=now,
+        content='a comment', sequence=12)
+
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [111], {}, 111,
+        permissions.PermissionSet([permissions.FLAG_SPAM]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='a comment', is_spam=True, is_deleted=True,
+        can_flag=True)
+    self.assertEqual(expected, actual)
+
+  def testConvertComment_CantUnFlagCommentWithoutVerdictSpam(self):
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=111, timestamp=now,
+        content='a comment', sequence=12, is_spam=True)
+
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [111], {}, 111,
+        permissions.PermissionSet([permissions.FLAG_SPAM]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12,
+        timestamp=now, is_spam=True, is_deleted=True)
+    self.assertEqual(expected, actual)
+
+  def testConvertComment_CanFlagSpamComment(self):
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=111, timestamp=now,
+        content='a comment', sequence=12)
+
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [], {}, 111,
+        permissions.PermissionSet([permissions.VERDICT_SPAM]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='a comment', can_flag=True)
+    self.assertEqual(expected, actual)
+
+  def testConvertComment_CanUnFlagSpamComment(self):
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=111, timestamp=now,
+        content='a comment', sequence=12, is_spam=True)
+
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [222], {}, 111,
+        permissions.PermissionSet([permissions.VERDICT_SPAM]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='a comment', is_spam=True, is_deleted=True,
+        can_flag=True)
+    self.assertEqual(expected, actual)
+
+  def testConvertComment_DeletedComment(self):
+    """We can convert a protorpc IssueComment to a protoc Comment."""
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=111, timestamp=now,
+        content='a comment', sequence=12, deleted_by=111)
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [], {}, 111,
+        permissions.PermissionSet([permissions.DELETE_OWN]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12, is_deleted=True,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='a comment', can_delete=True)
+    self.assertEqual(expected, actual)
+
+  def testConvertComment_DeletedCommentCantView(self):
+    """We can convert a protorpc IssueComment to a protoc Comment."""
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=111, timestamp=now,
+        content='a comment', sequence=12, deleted_by=111)
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [], {}, 111,
+        permissions.PermissionSet([]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12, is_deleted=True,
+        timestamp=now)
+    self.assertEqual(expected, actual)
+
+  def testConvertComment_CommentByBannedUser(self):
+    """We can convert a protorpc IssueComment to a protoc Comment."""
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=333, timestamp=now,
+        content='a comment', sequence=12)
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [], {}, 111,
+        permissions.PermissionSet([]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12, is_deleted=True,
+        timestamp=now)
+    self.assertEqual(expected, actual)
+
+  def testConvertComment_Description(self):
+    """We can convert a protorpc IssueComment to a protoc Comment."""
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=111, timestamp=now,
+        content='a comment', sequence=12, is_description=True)
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [], {101: 1}, 111,
+        permissions.PermissionSet([]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12, is_deleted=False,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='a comment', is_spam=False, description_num=1)
+    self.assertEqual(expected, actual)
+    comment.is_description = False
+
+  def testConvertComment_Approval(self):
+    """We can convert a protorpc IssueComment to a protoc Comment."""
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=111, timestamp=now,
+        content='a comment', sequence=12, approval_id=11)
+    # Comment on an approval.
+    self.config.field_defs.append(tracker_pb2.FieldDef(
+        field_id=11, project_id=789, field_name='Accessibility',
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        applicable_type='Launch'))
+    self.config.approval_defs.append(tracker_pb2.ApprovalDef(
+        approval_id=11, approver_ids=[111], survey='survey 1'))
+
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [], {}, 111,
+        permissions.PermissionSet([]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12, is_deleted=False,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='a comment', is_spam=False,
+        approval_ref=common_pb2.FieldRef(field_name='Accessibility'))
+    self.assertEqual(expected, actual)
+
+  def testConvertComment_ViewOwnInboundMessage(self):
+    """Users can view their own inbound messages."""
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=111, timestamp=now,
+        content='a comment', sequence=12, inbound_message='inbound message')
+
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [], {}, 111,
+        permissions.PermissionSet([]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12, is_deleted=False,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='a comment', inbound_message='inbound message')
+    self.assertEqual(expected, actual)
+
+  def testConvertComment_ViewInboundMessageWithPermission(self):
+    """Users can view their own inbound messages."""
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=111, timestamp=now,
+        content='a comment', sequence=12, inbound_message='inbound message')
+
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [], {}, 222,
+        permissions.PermissionSet([permissions.VIEW_INBOUND_MESSAGES]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12, is_deleted=False,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='a comment', inbound_message='inbound message')
+    self.assertEqual(expected, actual)
+
+  def testConvertComment_NotAllowedToViewInboundMessage(self):
+    """Users can view their own inbound messages."""
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=111, timestamp=now,
+        content='a comment', sequence=12, inbound_message='inbound message')
+
+    actual = converters.ConvertComment(
+        issue, comment, self.config, self.users_by_id, [], {}, 222,
+        permissions.PermissionSet([]))
+    expected = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=12, is_deleted=False,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='a comment')
+    self.assertEqual(expected, actual)
+
+  def testConvertCommentList(self):
+    """We can convert a list of comments."""
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment_0 = tracker_pb2.IssueComment(
+        id=100, project_id=789, user_id=111, timestamp=now,
+        content='a description', sequence=0, is_description=True)
+    comment_1 = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=222, timestamp=now,
+        content='a comment', sequence=1)
+    comment_2 = tracker_pb2.IssueComment(
+        id=102, project_id=789, user_id=222, timestamp=now,
+        content='deleted comment', sequence=2, deleted_by=111)
+    comment_3 = tracker_pb2.IssueComment(
+        id=103, project_id=789, user_id=111, timestamp=now,
+        content='another desc', sequence=3, is_description=True)
+
+    actual = converters.ConvertCommentList(
+        issue, [comment_0, comment_1, comment_2, comment_3], self.config,
+        self.users_by_id, {}, 222,
+        permissions.PermissionSet([permissions.DELETE_OWN]))
+
+    expected_0 = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=0, is_deleted=False,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='a description', is_spam=False,
+        description_num=1)
+    expected_1 = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=1, is_deleted=False,
+        commenter=common_pb2.UserRef(
+            user_id=222, display_name='two@example.com'),
+        timestamp=now, content='a comment', is_spam=False, can_delete=True)
+    expected_2 = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=2, is_deleted=True,
+        timestamp=now)
+    expected_3 = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=3, is_deleted=False,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='another desc', is_spam=False,
+        description_num=2)
+    self.assertEqual(expected_0, actual[0])
+    self.assertEqual(expected_1, actual[1])
+    self.assertEqual(expected_2, actual[2])
+    self.assertEqual(expected_3, actual[3])
+
+  def testConvertCommentList_DontUseDeletedOrSpamDescriptions(self):
+    """When converting comments, deleted or spam are not descriptions."""
+    now = 1234567890
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj')
+    comment_0 = tracker_pb2.IssueComment(
+        id=100, project_id=789, user_id=111, timestamp=now,
+        content='a description', sequence=0, is_description=True)
+    comment_1 = tracker_pb2.IssueComment(
+        id=101, project_id=789, user_id=222, timestamp=now,
+        content='a spam description', sequence=1, is_description=True,
+        is_spam=True)
+    comment_2 = tracker_pb2.IssueComment(
+        id=102, project_id=789, user_id=222, timestamp=now,
+        content='a deleted description', sequence=2, is_description=True,
+        deleted_by=111)
+    comment_3 = tracker_pb2.IssueComment(
+        id=103, project_id=789, user_id=111, timestamp=now,
+        content='another good desc', sequence=3, is_description=True)
+    comment_4 = tracker_pb2.IssueComment(
+        id=104, project_id=789, user_id=333, timestamp=now,
+        content='desc from banned', sequence=4, is_description=True)
+
+    actual = converters.ConvertCommentList(
+        issue, [comment_0, comment_1, comment_2, comment_3, comment_4],
+        self.config, self.users_by_id, {}, 222,
+        permissions.PermissionSet([permissions.DELETE_OWN]))
+
+    expected_0 = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=0, is_deleted=False,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='a description', is_spam=False,
+        description_num=1)
+    expected_1 = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=1, is_deleted=True,
+        timestamp=now, is_spam=True, can_delete=False)
+    expected_2 = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=2, is_deleted=True,
+        timestamp=now)
+    expected_3 = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=3, is_deleted=False,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='one@example.com'),
+        timestamp=now, content='another good desc', is_spam=False,
+        description_num=2)
+    expected_4 = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=4, is_deleted=True,
+        timestamp=now, is_spam=False)
+    self.assertEqual(expected_0, actual[0])
+    self.assertEqual(expected_1, actual[1])
+    self.assertEqual(expected_2, actual[2])
+    self.assertEqual(expected_3, actual[3])
+    self.assertEqual(expected_4, actual[4])
+
+  def testIngestUserRef(self):
+    """We can look up a single user ID for a protoc UserRef."""
+    self.services.user.TestAddUser('user1@example.com', 111)
+    ref = common_pb2.UserRef(display_name='user1@example.com')
+    actual = converters.IngestUserRef(self.cnxn, ref, self.services.user)
+    self.assertEqual(111, actual)
+
+  def testIngestUserRef_NoSuchUser(self):
+    """We reject a malformed UserRef.display_name."""
+    ref = common_pb2.UserRef(display_name='Bob@gmail.com')
+    with self.assertRaises(exceptions.NoSuchUserException):
+      converters.IngestUserRef(self.cnxn, ref, self.services.user)
+
+  def testIngestUserRefs_ClearTheOwnerField(self):
+    """We can look up user IDs for protoc UserRefs."""
+    ref = common_pb2.UserRef(user_id=0)
+    actual = converters.IngestUserRefs(self.cnxn, [ref], self.services.user)
+    self.assertEqual([0], actual)
+
+  def testIngestUserRefs_ByExistingID(self):
+    """Users can be specified by user_id."""
+    self.services.user.TestAddUser('user1@example.com', 111)
+    ref = common_pb2.UserRef(user_id=111)
+    actual = converters.IngestUserRefs(self.cnxn, [ref], self.services.user)
+    self.assertEqual([111], actual)
+
+  def testIngestUserRefs_ByNonExistingID(self):
+    """We reject references to non-existing user IDs."""
+    ref = common_pb2.UserRef(user_id=999)
+    with self.assertRaises(exceptions.NoSuchUserException):
+      converters.IngestUserRefs(self.cnxn, [ref], self.services.user)
+
+  def testIngestUserRefs_ByExistingEmail(self):
+    """Existing users can be specified by email address."""
+    self.services.user.TestAddUser('user1@example.com', 111)
+    ref = common_pb2.UserRef(display_name='user1@example.com')
+    actual = converters.IngestUserRefs(self.cnxn, [ref], self.services.user)
+    self.assertEqual([111], actual)
+
+  def testIngestUserRefs_ByNonExistingEmail(self):
+    """New users can be specified by email address."""
+    # Case where autocreate=False
+    ref = common_pb2.UserRef(display_name='new@example.com')
+    with self.assertRaises(exceptions.NoSuchUserException):
+      converters.IngestUserRefs(
+          self.cnxn, [ref], self.services.user, autocreate=False)
+
+    # Case where autocreate=True
+    actual = converters.IngestUserRefs(
+        self.cnxn, [ref], self.services.user, autocreate=True)
+    user_id = self.services.user.LookupUserID(self.cnxn, 'new@example.com')
+    self.assertEqual([user_id], actual)
+
+  def testIngestUserRefs_ByMalformedEmail(self):
+    """We ignore malformed user emails."""
+    self.services.user.TestAddUser('user1@example.com', 111)
+    self.services.user.TestAddUser('user3@example.com', 333)
+    refs = [
+        common_pb2.UserRef(user_id=0),
+        common_pb2.UserRef(display_name='not-a-valid-email'),
+        common_pb2.UserRef(user_id=333),
+        common_pb2.UserRef(display_name='user1@example.com')
+        ]
+    actual = converters.IngestUserRefs(
+        self.cnxn, refs, self.services.user, autocreate=True)
+    self.assertEqual(actual, [0, 333, 111])
+
+  def testIngestUserRefs_MixOfIDAndEmail(self):
+    """Requests can specify some users by ID and others by email."""
+    self.services.user.TestAddUser('user1@example.com', 111)
+    self.services.user.TestAddUser('user2@example.com', 222)
+    self.services.user.TestAddUser('user3@example.com', 333)
+    ref1 = common_pb2.UserRef(display_name='user1@example.com')
+    ref2 = common_pb2.UserRef(display_name='user2@example.com')
+    ref3 = common_pb2.UserRef(user_id=333)
+    actual = converters.IngestUserRefs(
+        self.cnxn, [ref1, ref2, ref3], self.services.user)
+    self.assertEqual([111, 222, 333], actual)
+
+  def testIngestUserRefs_UppercaseEmail(self):
+    """Request can include uppercase letters in email"""
+    self.services.user.TestAddUser('user1@example.com', 111)
+    ref = common_pb2.UserRef(display_name='USER1@example.com')
+    actual = converters.IngestUserRefs(self.cnxn, [ref], self.services.user)
+    self.assertEqual([111], actual)
+
+  def testIngestPrefValues(self):
+    """We can convert a list of UserPrefValues from protoc to protorpc."""
+    self.assertEqual(
+        [],
+        converters.IngestPrefValues([]))
+
+    userprefvalues = [
+        user_objects_pb2.UserPrefValue(name='foo_1', value='bar_1'),
+        user_objects_pb2.UserPrefValue(name='foo_2', value='bar_2')]
+    actual = converters.IngestPrefValues(userprefvalues)
+    expected = [
+        user_pb2.UserPrefValue(name='foo_1', value='bar_1'),
+        user_pb2.UserPrefValue(name='foo_2', value='bar_2')]
+    self.assertEqual(expected, actual)
+
+  def testIngestComponentRefs(self):
+    """We can look up component IDs for a list of protoc UserRefs."""
+    self.assertEqual([], converters.IngestComponentRefs([], self.config))
+
+    self.config.component_defs = [
+      tracker_pb2.ComponentDef(component_id=1, path='UI'),
+      tracker_pb2.ComponentDef(component_id=2, path='DB')]
+    refs = [common_pb2.ComponentRef(path='UI'),
+            common_pb2.ComponentRef(path='DB')]
+    self.assertEqual(
+        [1, 2], converters.IngestComponentRefs(refs, self.config))
+
+  def testIngestIssueRefs_ValidatesExternalRefs(self):
+    """IngestIssueRefs requires external refs have at least one slash."""
+    ref = common_pb2.IssueRef(ext_identifier='b123456')
+    with self.assertRaises(exceptions.InvalidExternalIssueReference):
+      converters.IngestIssueRefs(self.cnxn, [ref], self.services)
+
+  def testIngestIssueRefs_SkipsExternalRefs(self):
+    """IngestIssueRefs skips external refs."""
+    ref = common_pb2.IssueRef(ext_identifier='b/123456')
+    actual = converters.IngestIssueRefs(
+        self.cnxn, [ref], self.services)
+    self.assertEqual([], actual)
+
+  def testIngestExtIssueRefs_Normal(self):
+    """IngestExtIssueRefs returns all valid external refs."""
+    refs = [
+      common_pb2.IssueRef(project_name='rutabaga', local_id=1234),
+      common_pb2.IssueRef(ext_identifier='b123456'),
+      common_pb2.IssueRef(ext_identifier='b/123456'), # <- Valid ref 1.
+      common_pb2.IssueRef(ext_identifier='rutabaga/123456'),
+      common_pb2.IssueRef(ext_identifier='123456'),
+      common_pb2.IssueRef(ext_identifier='b/56789'), # <- Valid ref 2.
+      common_pb2.IssueRef(ext_identifier='b//123456')]
+
+    actual = converters.IngestExtIssueRefs(refs)
+    self.assertEqual(['b/123456', 'b/56789'], actual)
+
+  def testIngestIssueDelta_Empty(self):
+    """An empty protorpc IssueDelta makes an empty protoc IssueDelta."""
+    delta = issue_objects_pb2.IssueDelta()
+    actual = converters.IngestIssueDelta(
+        self.cnxn, self.services, delta, self.config, [])
+    expected = tracker_pb2.IssueDelta()
+    self.assertEqual(expected, actual)
+
+  def testIngestIssueDelta_BuiltInFields(self):
+    """We can create a protorpc IssueDelta from a protoc IssueDelta."""
+    self.services.user.TestAddUser('user1@example.com', 111)
+    self.services.user.TestAddUser('user2@example.com', 222)
+    self.services.user.TestAddUser('user3@example.com', 333)
+    self.config.component_defs = [
+      tracker_pb2.ComponentDef(component_id=1, path='UI')]
+    delta = issue_objects_pb2.IssueDelta(
+        status=wrappers_pb2.StringValue(value='Fixed'),
+        owner_ref=common_pb2.UserRef(user_id=222),
+        summary=wrappers_pb2.StringValue(value='New summary'),
+        cc_refs_add=[common_pb2.UserRef(user_id=333)],
+        comp_refs_add=[common_pb2.ComponentRef(path='UI')],
+        label_refs_add=[common_pb2.LabelRef(label='Hot')])
+    actual = converters.IngestIssueDelta(
+        self.cnxn, self.services, delta, self.config, [])
+    expected = tracker_pb2.IssueDelta(
+        status='Fixed', owner_id=222, summary='New summary',
+        cc_ids_add=[333], comp_ids_add=[1],
+        labels_add=['Hot'])
+    self.assertEqual(expected, actual)
+
+  def testIngestIssueDelta_ClearMergedInto(self):
+    """We can clear merged into from the current issue."""
+    delta = issue_objects_pb2.IssueDelta(merged_into_ref=common_pb2.IssueRef())
+    actual = converters.IngestIssueDelta(
+        self.cnxn, self.services, delta, self.config, [])
+    expected = tracker_pb2.IssueDelta(merged_into=0)
+    self.assertEqual(expected, actual)
+
+  def testIngestIssueDelta_BadOwner(self):
+    """We reject a specified owner that does not exist."""
+    delta = issue_objects_pb2.IssueDelta(
+        owner_ref=common_pb2.UserRef(display_name='user@exa'))
+    with self.assertRaises(exceptions.NoSuchUserException):
+      converters.IngestIssueDelta(
+          self.cnxn, self.services, delta, self.config, [])
+
+  def testIngestIssueDelta_BadOwnerIgnored(self):
+    """We can ignore an incomplete owner email for presubmit."""
+    delta = issue_objects_pb2.IssueDelta(
+        owner_ref=common_pb2.UserRef(display_name='user@exa'))
+    actual = converters.IngestIssueDelta(
+        self.cnxn, self.services, delta, self.config, [],
+        ignore_missing_objects=True)
+    expected = tracker_pb2.IssueDelta()
+    self.assertEqual(expected, actual)
+
+  def testIngestIssueDelta_InvalidComponent(self):
+    """We reject a protorpc IssueDelta that has an invalid component."""
+    self.config.component_defs = [
+      tracker_pb2.ComponentDef(component_id=1, path='UI')]
+    delta = issue_objects_pb2.IssueDelta(
+        comp_refs_add=[common_pb2.ComponentRef(path='XYZ')])
+    with self.assertRaises(exceptions.NoSuchComponentException):
+      converters.IngestIssueDelta(
+          self.cnxn, self.services, delta, self.config, [])
+
+  def testIngestIssueDelta_InvalidComponentIgnored(self):
+    """We can ignore invalid components for presubmits."""
+    self.config.component_defs = [
+      tracker_pb2.ComponentDef(component_id=1, path='UI')]
+    delta = issue_objects_pb2.IssueDelta(
+        comp_refs_add=[common_pb2.ComponentRef(path='UI'),
+                       common_pb2.ComponentRef(path='XYZ')])
+    actual = converters.IngestIssueDelta(
+        self.cnxn, self.services, delta, self.config, [],
+        ignore_missing_objects=True)
+    self.assertEqual([1], actual.comp_ids_add)
+
+  def testIngestIssueDelta_CustomFields(self):
+    """We can create a protorpc IssueDelta from a protoc IssueDelta."""
+    self.config.field_defs = [
+        self.fd_1, self.fd_2, self.fd_3, self.fd_4, self.fd_6]
+    phases = [tracker_pb2.Phase(phase_id=1, name="Beta")]
+    delta = issue_objects_pb2.IssueDelta(
+        field_vals_add=[
+            issue_objects_pb2.FieldValue(
+                value='string',
+                field_ref=common_pb2.FieldRef(field_name='FirstField')
+            ),
+            issue_objects_pb2.FieldValue(
+                value='1',
+                field_ref=common_pb2.FieldRef(field_name='PhaseField'),
+                phase_ref=issue_objects_pb2.PhaseRef(phase_name='Beta')
+            )],
+        field_vals_remove=[
+            issue_objects_pb2.FieldValue(
+                value='34', field_ref=common_pb2.FieldRef(
+                    field_name='SecField'))],
+        fields_clear=[common_pb2.FieldRef(field_name='FirstField')])
+    actual = converters.IngestIssueDelta(
+        self.cnxn, self.services, delta, self.config, phases)
+    self.assertEqual(actual.field_vals_add,
+                     [tracker_pb2.FieldValue(
+                         str_value='string', field_id=1, derived=False),
+                      tracker_pb2.FieldValue(
+                          int_value=1, field_id=6, phase_id=1, derived=False)
+                     ])
+    self.assertEqual(actual.field_vals_remove, [tracker_pb2.FieldValue(
+        int_value=34, field_id=2, derived=False)])
+    self.assertEqual(actual.fields_clear, [1])
+
+  def testIngestIssueDelta_InvalidCustomFields(self):
+    """We can create a protorpc IssueDelta from a protoc IssueDelta."""
+    # TODO(jrobbins): add and remove.
+    delta = issue_objects_pb2.IssueDelta(
+        fields_clear=[common_pb2.FieldRef(field_name='FirstField')])
+    with self.assertRaises(exceptions.NoSuchFieldDefException):
+      converters.IngestIssueDelta(
+          self.cnxn, self.services, delta, self.config, [])
+
+  def testIngestIssueDelta_ShiftFieldsIntoLabels(self):
+    """Test that enum fields are shifted into labels."""
+    self.config.field_defs = [self.fd_5]
+    delta = issue_objects_pb2.IssueDelta(
+        field_vals_add=[
+            issue_objects_pb2.FieldValue(
+                value='Foo',
+                field_ref=common_pb2.FieldRef(field_name='Pre', field_id=5)
+            )],
+        field_vals_remove=[
+            issue_objects_pb2.FieldValue(
+                value='Bar',
+                field_ref=common_pb2.FieldRef(field_name='Pre', field_id=5),
+            )])
+    actual = converters.IngestIssueDelta(
+        self.cnxn, self.services, delta, self.config, [])
+    self.assertEqual(actual.field_vals_add, [])
+    self.assertEqual(actual.field_vals_remove, [])
+    self.assertEqual(actual.labels_add, ['Pre-Foo'])
+    self.assertEqual(actual.labels_remove, ['Pre-Bar'])
+
+  def testIngestIssueDelta_RelatedIssues(self):
+    """We can create a protorpc IssueDelta that references related issues."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111)
+    self.services.issue.TestAddIssue(issue)
+    delta = issue_objects_pb2.IssueDelta(
+        blocked_on_refs_add=[common_pb2.IssueRef(
+            project_name='proj', local_id=issue.local_id)],
+        merged_into_ref=common_pb2.IssueRef(
+            project_name='proj', local_id=issue.local_id))
+    actual = converters.IngestIssueDelta(
+        self.cnxn, self.services, delta, self.config, [])
+    self.assertEqual([issue.issue_id], actual.blocked_on_add)
+    self.assertEqual([], actual.blocking_add)
+    self.assertEqual(issue.issue_id, actual.merged_into)
+
+  def testIngestIssueDelta_InvalidRelatedIssues(self):
+    """We reject references to related issues that do not exist."""
+    delta = issue_objects_pb2.IssueDelta(
+        merged_into_ref=common_pb2.IssueRef(
+            project_name='not-a-proj', local_id=8))
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      converters.IngestIssueDelta(
+          self.cnxn, self.services, delta, self.config, [])
+
+    delta = issue_objects_pb2.IssueDelta(
+        merged_into_ref=common_pb2.IssueRef(
+            project_name='proj', local_id=999))
+    with self.assertRaises(exceptions.NoSuchIssueException):
+      converters.IngestIssueDelta(
+          self.cnxn, self.services, delta, self.config, [])
+
+  def testIngestIssueDelta_ExternalMergedInto(self):
+    """IngestIssueDelta properly handles external mergedinto refs."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111)
+    self.services.issue.TestAddIssue(issue)
+    delta = issue_objects_pb2.IssueDelta(
+        merged_into_ref=common_pb2.IssueRef(ext_identifier='b/5678'))
+    actual = converters.IngestIssueDelta(
+        self.cnxn, self.services, delta, self.config, [])
+
+    self.assertIsNone(actual.merged_into)
+    self.assertEqual('b/5678', actual.merged_into_external)
+
+  def testIngestAttachmentUploads_Empty(self):
+    """Uploading zero files results in an empty list of attachments."""
+    self.assertEqual([], converters.IngestAttachmentUploads([]))
+
+  def testIngestAttachmentUploads_Normal(self):
+    """Uploading files results in a list of attachments."""
+    uploads = [
+        issue_objects_pb2.AttachmentUpload(
+            filename='hello.c', content='int main() {}'),
+        issue_objects_pb2.AttachmentUpload(
+            filename='README.md', content='readme content'),
+        ]
+    actual = converters.IngestAttachmentUploads(uploads)
+    self.assertEqual(
+      [('hello.c', 'int main() {}', 'text/plain'),
+       ('README.md', 'readme content', 'text/plain')],
+      actual)
+
+  def testIngestAttachmentUploads_Invalid(self):
+    """We reject uploaded files that lack a name or content."""
+    with self.assertRaises(exceptions.InputException):
+      converters.IngestAttachmentUploads([
+          issue_objects_pb2.AttachmentUpload(content='name is mssing')])
+
+    with self.assertRaises(exceptions.InputException):
+      converters.IngestAttachmentUploads([
+          issue_objects_pb2.AttachmentUpload(filename='content is mssing')])
+
+  def testIngestApprovalDelta(self):
+    self.services.user.TestAddUser('user1@example.com', 111)
+    self.services.user.TestAddUser('user2@example.com', 222)
+
+    self.config.field_defs = [
+        self.fd_1, self.fd_2, self.fd_3, self.fd_4, self.fd_7]
+
+    approval_delta = issue_objects_pb2.ApprovalDelta(
+        status=issue_objects_pb2.APPROVED,
+        approver_refs_add=[common_pb2.UserRef(user_id=111)],
+        approver_refs_remove=[common_pb2.UserRef(user_id=222)],
+        field_vals_add=[
+            issue_objects_pb2.FieldValue(
+                value='string', field_ref=common_pb2.FieldRef(
+                    field_id=1, field_name='FirstField')),
+            issue_objects_pb2.FieldValue(
+                value='choice1', field_ref=common_pb2.FieldRef(
+                    field_id=7, field_name='ApprovalEnum')),
+        ],
+        field_vals_remove=[
+            issue_objects_pb2.FieldValue(
+                value='34', field_ref=common_pb2.FieldRef(
+                    field_id=2, field_name='SecField')),
+            issue_objects_pb2.FieldValue(
+                value='choice2', field_ref=common_pb2.FieldRef(
+                    field_id=7, field_name='ApprovalEnum')),
+        ],
+        fields_clear=[common_pb2.FieldRef(field_name='FirstField')])
+
+    actual = converters.IngestApprovalDelta(
+        self.cnxn, self.services.user, approval_delta, 333, self.config)
+    self.assertEqual(
+        actual.status, tracker_pb2.ApprovalStatus.APPROVED,)
+    self.assertEqual(actual.setter_id, 333)
+    self.assertEqual(actual.approver_ids_add, [111])
+    self.assertEqual(actual.approver_ids_remove, [222])
+    self.assertEqual(actual.subfield_vals_add, [tracker_pb2.FieldValue(
+        str_value='string', field_id=1, derived=False)])
+    self.assertEqual(actual.subfield_vals_remove, [tracker_pb2.FieldValue(
+        int_value=34, field_id=2, derived=False)])
+    self.assertEqual(actual.subfields_clear, [1])
+    self.assertEqual(actual.labels_add, ['ApprovalEnum-choice1'])
+    self.assertEqual(actual.labels_remove, ['ApprovalEnum-choice2'])
+
+    # test a NOT_SET status is registered as None.
+    approval_delta.status = issue_objects_pb2.NOT_SET
+    actual = converters.IngestApprovalDelta(
+        self.cnxn, self.services.user, approval_delta, 333, self.config)
+    self.assertIsNone(actual.status)
+
+  def testIngestApprovalStatus(self):
+    actual = converters.IngestApprovalStatus(issue_objects_pb2.NOT_SET)
+    self.assertEqual(actual, tracker_pb2.ApprovalStatus.NOT_SET)
+
+    actual = converters.IngestApprovalStatus(issue_objects_pb2.NOT_APPROVED)
+    self.assertEqual(actual, tracker_pb2.ApprovalStatus.NOT_APPROVED)
+
+  def testIngestFieldValues(self):
+    self.services.user.TestAddUser('user1@example.com', 111)
+    self.config.field_defs = [self.fd_1, self.fd_2, self.fd_4, self.fd_6]
+    phases = [
+        tracker_pb2.Phase(phase_id=3, name="Dev"),
+        tracker_pb2.Phase(phase_id=1, name="Beta")
+    ]
+
+    field_values = [
+        issue_objects_pb2.FieldValue(
+            value='string',
+            field_ref=common_pb2.FieldRef(field_name='FirstField')
+        ),
+        issue_objects_pb2.FieldValue(
+            value='34',
+            field_ref=common_pb2.FieldRef(field_name='SecField')
+        ),
+        issue_objects_pb2.FieldValue(
+            value='user1@example.com',
+            field_ref=common_pb2.FieldRef(field_name='UserField'),
+            # phase_ref for non-phase fields should be ignored.
+            phase_ref=issue_objects_pb2.PhaseRef(phase_name='Dev')
+        ),
+        issue_objects_pb2.FieldValue(
+            value='2',
+            field_ref=common_pb2.FieldRef(field_name='PhaseField'),
+            phase_ref=issue_objects_pb2.PhaseRef(phase_name='Beta'))
+    ]
+
+    actual = converters.IngestFieldValues(
+        self.cnxn, self.services.user, field_values, self.config, phases)
+    self.assertEqual(
+        actual,
+        [
+            tracker_pb2.FieldValue(
+                str_value='string', field_id=1, derived=False),
+            tracker_pb2.FieldValue(int_value=34, field_id=2, derived=False),
+            tracker_pb2.FieldValue(user_id=111, field_id=4, derived=False),
+            tracker_pb2.FieldValue(
+                int_value=2, field_id=6, phase_id=1, derived=False)
+        ]
+    )
+
+  def testIngestFieldValues_EmptyUser(self):
+    """We ignore empty user email strings."""
+    self.services.user.TestAddUser('user1@example.com', 111)
+    self.config.field_defs = [self.fd_1, self.fd_2, self.fd_4, self.fd_6]
+    field_values = [
+        issue_objects_pb2.FieldValue(
+            value='user1@example.com',
+            field_ref=common_pb2.FieldRef(field_name='UserField')),
+        issue_objects_pb2.FieldValue(
+            value='',
+            field_ref=common_pb2.FieldRef(field_name='UserField'))
+        ]
+
+    actual = converters.IngestFieldValues(
+        self.cnxn, self.services.user, field_values, self.config, [])
+    self.assertEqual(
+        actual,
+        [tracker_pb2.FieldValue(user_id=111, field_id=4, derived=False)])
+
+  def testIngestFieldValues_Unicode(self):
+    """We can ingest unicode strings."""
+    self.config.field_defs = [self.fd_1, self.fd_2, self.fd_4, self.fd_6]
+    field_values = [
+        issue_objects_pb2.FieldValue(
+            value=u'\xe2\x9d\xa4\xef\xb8\x8f',
+            field_ref=common_pb2.FieldRef(field_name='FirstField')
+        ),
+    ]
+
+    actual = converters.IngestFieldValues(
+        self.cnxn, self.services.user, field_values, self.config, [])
+    self.assertEqual(
+        actual,
+        [
+            tracker_pb2.FieldValue(
+               str_value=u'\xe2\x9d\xa4\xef\xb8\x8f', field_id=1,
+               derived=False),
+        ]
+    )
+
+  def testIngestFieldValues_InvalidUser(self):
+    """We reject invalid user email strings."""
+    self.config.field_defs = [self.fd_1, self.fd_2, self.fd_4, self.fd_6]
+    field_values = [
+        issue_objects_pb2.FieldValue(
+            value='bad value',
+            field_ref=common_pb2.FieldRef(field_name='UserField'))]
+
+    with self.assertRaises(exceptions.NoSuchUserException):
+      converters.IngestFieldValues(
+          self.cnxn, self.services.user, field_values, self.config, [])
+
+  def testIngestFieldValues_InvalidInt(self):
+    """We reject invalid int-field strings."""
+    self.config.field_defs = [self.fd_1, self.fd_2, self.fd_4, self.fd_6]
+    field_values = [
+        issue_objects_pb2.FieldValue(
+            value='Not a number',
+            field_ref=common_pb2.FieldRef(field_name='SecField'))]
+
+    with self.assertRaises(exceptions.InputException) as cm:
+      converters.IngestFieldValues(
+          self.cnxn, self.services.user, field_values, self.config, [])
+
+    self.assertEqual(
+        'Unparsable value for field SecField',
+        cm.exception.message)
+
+  def testIngestSavedQueries(self):
+    self.services.project.TestAddProject('chromium', project_id=1)
+    self.services.project.TestAddProject('fakeproject', project_id=2)
+
+    saved_queries = [
+        tracker_pb2.SavedQuery(
+            query_id=101,
+            name='test query',
+            query='owner:me',
+            executes_in_project_ids=[1, 2]),
+        tracker_pb2.SavedQuery(
+            query_id=202,
+            name='another query',
+            query='-component:Test',
+            executes_in_project_ids=[1])
+    ]
+
+    converted_queries = converters.IngestSavedQueries(self.cnxn,
+        self.services.project, saved_queries)
+
+    self.assertEqual(converted_queries[0].query_id, 101)
+    self.assertEqual(converted_queries[0].name, 'test query')
+    self.assertEqual(converted_queries[0].query, 'owner:me')
+    self.assertEqual(converted_queries[0].project_names,
+        ['chromium', 'fakeproject'])
+
+    self.assertEqual(converted_queries[1].query_id, 202)
+    self.assertEqual(converted_queries[1].name, 'another query')
+    self.assertEqual(converted_queries[1].query, '-component:Test')
+    self.assertEqual(converted_queries[1].project_names, ['chromium'])
+
+
+  def testIngestHotlistRef(self):
+    self.services.user.TestAddUser('user1@example.com', 111)
+    hotlist = self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+
+    owner_ref = common_pb2.UserRef(user_id=111)
+    hotlist_ref = common_pb2.HotlistRef(name='Fake-Hotlist', owner=owner_ref)
+
+    actual_hotlist_id = converters.IngestHotlistRef(
+        self.cnxn, self.services.user, self.services.features, hotlist_ref)
+    self.assertEqual(actual_hotlist_id, hotlist.hotlist_id)
+
+  def testIngestHotlistRef_HotlistID(self):
+    self.services.user.TestAddUser('user1@example.com', 111)
+    hotlist = self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+
+    hotlist_ref = common_pb2.HotlistRef(hotlist_id=hotlist.hotlist_id)
+
+    actual_hotlist_id = converters.IngestHotlistRef(
+        self.cnxn, self.services.user, self.services.features, hotlist_ref)
+    self.assertEqual(actual_hotlist_id, hotlist.hotlist_id)
+
+  def testIngestHotlistRef_NotEnoughInformation(self):
+    hotlist_ref = common_pb2.HotlistRef(name='Some-Hotlist')
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      converters.IngestHotlistRef(
+          self.cnxn, self.services.user, self.services.features, hotlist_ref)
+
+  def testIngestHotlistRef_InconsistentRequest(self):
+    self.services.user.TestAddUser('user1@example.com', 111)
+    hotlist1 = self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist-2', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+
+    hotlist_ref = common_pb2.HotlistRef(
+        hotlist_id=hotlist1.hotlist_id,
+        name='Fake-Hotlist-2',
+        owner=common_pb2.UserRef(user_id=111))
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      converters.IngestHotlistRef(
+          self.cnxn, self.services.user, self.services.features, hotlist_ref)
+
+  def testIngestHotlistRef_NonExistentHotlistID(self):
+    hotlist_ref = common_pb2.HotlistRef(hotlist_id=1234)
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      converters.IngestHotlistRef(
+          self.cnxn, self.services.user, self.services.features, hotlist_ref)
+
+  def testIngestHotlistRef_NoSuchHotlist(self):
+    self.services.user.TestAddUser('user1@example.com', 111)
+
+    owner_ref = common_pb2.UserRef(user_id=111)
+    hotlist_ref = common_pb2.HotlistRef(name='Fake-Hotlist', owner=owner_ref)
+
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      converters.IngestHotlistRef(
+          self.cnxn, self.services.user, self.services.features, hotlist_ref)
+
+  def testIngestHotlistRefs(self):
+    self.services.user.TestAddUser('user1@example.com', 111)
+    hotlist_1 = self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+    hotlist_2 = self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist-2', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+
+    owner_ref = common_pb2.UserRef(user_id=111)
+    hotlist_refs = [
+        common_pb2.HotlistRef(name='Fake-Hotlist', owner=owner_ref),
+        common_pb2.HotlistRef(hotlist_id=hotlist_2.hotlist_id)]
+
+    actual_hotlist_ids = converters.IngestHotlistRefs(
+        self.cnxn, self.services.user, self.services.features, hotlist_refs)
+    self.assertEqual(
+        actual_hotlist_ids, [hotlist_1.hotlist_id, hotlist_2.hotlist_id])
+
+  def testIngestPagination(self):
+    # Use settings.max_project_search_results_per_page if max_items is not
+    # present.
+    pagination = common_pb2.Pagination(start=1234)
+    self.assertEqual(
+        (1234, settings.max_artifact_search_results_per_page),
+        converters.IngestPagination(pagination))
+    # Otherwise, use the minimum between what was requested and
+    # settings.max_project_search_results_per_page
+    pagination = common_pb2.Pagination(start=1234, max_items=56)
+    self.assertEqual(
+        (1234, 56),
+        converters.IngestPagination(pagination))
+    pagination = common_pb2.Pagination(start=1234, max_items=5678)
+    self.assertEqual(
+        (1234, settings.max_artifact_search_results_per_page),
+        converters.IngestPagination(pagination))
+
+  # TODO(jojwang): add testConvertStatusRef
+
+  def testConvertStatusDef(self):
+    """We can convert a status definition to protoc."""
+    status_def = tracker_pb2.StatusDef(status='Started')
+    actual = converters.ConvertStatusDef(status_def)
+    self.assertEqual('Started', actual.status)
+    self.assertFalse(actual.means_open)
+    self.assertEqual('', actual.docstring)
+    self.assertFalse(actual.deprecated)
+    # rank is not set on output, only used when setting a new rank.
+    self.assertEqual(0, actual.rank)
+
+    status_def = tracker_pb2.StatusDef(
+        status='New', means_open=True, status_docstring='doc', deprecated=True)
+    actual = converters.ConvertStatusDef(status_def)
+    self.assertEqual('New', actual.status)
+    self.assertTrue(actual.means_open)
+    self.assertEqual('doc', actual.docstring)
+    self.assertTrue(actual.deprecated)
+    self.assertEqual(0, actual.rank)
+
+  def testConvertLabelDef(self):
+    """We can convert a label definition to protoc."""
+    label_def = tracker_pb2.LabelDef(label='Security')
+    actual = converters.ConvertLabelDef(label_def)
+    self.assertEqual('Security', actual.label)
+    self.assertEqual('', actual.docstring)
+    self.assertFalse(actual.deprecated)
+
+    label_def = tracker_pb2.LabelDef(
+        label='UI', label_docstring='doc', deprecated=True)
+    actual = converters.ConvertLabelDef(label_def)
+    self.assertEqual('UI', actual.label)
+    self.assertEqual('doc', actual.docstring)
+    self.assertTrue(actual.deprecated)
+
+  def testConvertComponentDef_Simple(self):
+    """We can convert a minimal component definition to protoc."""
+    now = 1234567890
+    component_def = tracker_pb2.ComponentDef(
+        path='Frontend', docstring='doc', created=now, creator_id=111,
+        modified=now + 1, modifier_id=111)
+    actual = converters.ConvertComponentDef(
+        component_def, self.users_by_id, {}, True)
+    self.assertEqual('Frontend', actual.path)
+    self.assertEqual('doc', actual.docstring)
+    self.assertFalse(actual.deprecated)
+    self.assertEqual(now, actual.created)
+    self.assertEqual(111, actual.creator_ref.user_id)
+    self.assertEqual(now + 1, actual.modified)
+    self.assertEqual(111, actual.modifier_ref.user_id)
+    self.assertEqual('one@example.com', actual.creator_ref.display_name)
+
+  def testConvertComponentDef_Normal(self):
+    """We can convert a component def that has CC'd users and adds labels."""
+    labels_by_id = {1: 'Security', 2: 'Usability'}
+    component_def = tracker_pb2.ComponentDef(
+        path='Frontend', admin_ids=[111], cc_ids=[222], label_ids=[1, 2],
+        docstring='doc')
+    actual = converters.ConvertComponentDef(
+        component_def, self.users_by_id, labels_by_id, True)
+    self.assertEqual('Frontend', actual.path)
+    self.assertEqual('doc', actual.docstring)
+    self.assertEqual(1, len(actual.admin_refs))
+    self.assertEqual(111, actual.admin_refs[0].user_id)
+    self.assertEqual(1, len(actual.cc_refs))
+    self.assertFalse(actual.deprecated)
+    self.assertEqual(222, actual.cc_refs[0].user_id)
+    self.assertEqual(2, len(actual.label_refs))
+    self.assertEqual('Security', actual.label_refs[0].label)
+    self.assertEqual('Usability', actual.label_refs[1].label)
+
+    # Without include_admin_info, some fields are not set.
+    actual = converters.ConvertComponentDef(
+        component_def, self.users_by_id, labels_by_id, False)
+    self.assertEqual('Frontend', actual.path)
+    self.assertEqual('doc', actual.docstring)
+    self.assertEqual(0, len(actual.admin_refs))
+    self.assertEqual(0, len(actual.cc_refs))
+    self.assertFalse(actual.deprecated)
+    self.assertEqual(0, len(actual.label_refs))
+
+  def testConvertFieldDef_Simple(self):
+    """We can convert a minimal field definition to protoc."""
+    field_def = tracker_pb2.FieldDef(
+        field_name='EstDays', field_type=tracker_pb2.FieldTypes.INT_TYPE)
+    actual = converters.ConvertFieldDef(
+        field_def, [], self.users_by_id, self.config, True)
+    self.assertEqual('EstDays', actual.field_ref.field_name)
+    self.assertEqual(common_pb2.INT_TYPE, actual.field_ref.type)
+    self.assertEqual('', actual.field_ref.approval_name)
+    self.assertEqual('', actual.applicable_type)
+    self.assertEqual('', actual.docstring)
+    self.assertEqual(0, len(actual.admin_refs))
+    self.assertFalse(actual.is_required)
+    self.assertFalse(actual.is_niche)
+    self.assertFalse(actual.is_multivalued)
+    self.assertFalse(actual.is_phase_field)
+
+    field_def = tracker_pb2.FieldDef(
+        field_name='DesignDocs', field_type=tracker_pb2.FieldTypes.URL_TYPE,
+        applicable_type='Enhancement', is_required=True, is_niche=True,
+        is_multivalued=True, docstring='doc', admin_ids=[111],
+        is_phase_field=True)
+    actual = converters.ConvertFieldDef(
+        field_def, [], self.users_by_id, self.config, True)
+    self.assertEqual('DesignDocs', actual.field_ref.field_name)
+    self.assertEqual(common_pb2.URL_TYPE, actual.field_ref.type)
+    self.assertEqual('', actual.field_ref.approval_name)
+    self.assertEqual('Enhancement', actual.applicable_type)
+    self.assertEqual('doc', actual.docstring)
+    self.assertEqual(1, len(actual.admin_refs))
+    self.assertEqual(111, actual.admin_refs[0].user_id)
+    self.assertTrue(actual.is_required)
+    self.assertTrue(actual.is_niche)
+    self.assertTrue(actual.is_multivalued)
+    self.assertTrue(actual.is_phase_field)
+
+    # Without include_admin_info, some fields are not set.
+    actual = converters.ConvertFieldDef(
+        field_def, [], self.users_by_id, self.config, False)
+    self.assertEqual('DesignDocs', actual.field_ref.field_name)
+    self.assertEqual(common_pb2.URL_TYPE, actual.field_ref.type)
+    self.assertEqual('', actual.field_ref.approval_name)
+    self.assertEqual('', actual.applicable_type)
+    self.assertEqual('doc', actual.docstring)
+    self.assertEqual(0, len(actual.admin_refs))
+    self.assertFalse(actual.is_required)
+    self.assertFalse(actual.is_niche)
+    self.assertFalse(actual.is_multivalued)
+    self.assertFalse(actual.is_phase_field)
+
+  def testConvertFieldDef_FieldOfAnApproval(self):
+    """We can convert a field that is part of an approval."""
+    self.config.field_defs = [self.fd_1, self.fd_2, self.fd_3]
+    field_def = tracker_pb2.FieldDef(
+        field_name='Waiver', field_type=tracker_pb2.FieldTypes.URL_TYPE,
+        approval_id=self.fd_3.field_id)
+    actual = converters.ConvertFieldDef(
+        field_def, [], self.users_by_id, self.config, True)
+    self.assertEqual('Waiver', actual.field_ref.field_name)
+    self.assertEqual('LegalApproval', actual.field_ref.approval_name)
+
+  def testConvertFieldDef_UserChoices(self):
+    """We can convert an user type field that need special permissions."""
+    field_def = tracker_pb2.FieldDef(
+        field_name='PM', field_type=tracker_pb2.FieldTypes.USER_TYPE)
+    actual = converters.ConvertFieldDef(
+        field_def, [111, 333], self.users_by_id, self.config, False)
+    self.assertEqual('PM', actual.field_ref.field_name)
+    self.assertEqual(
+        [111, 333],
+        [user_ref.user_id for user_ref in actual.user_choices])
+    self.assertEqual(
+        ['one@example.com', 'banned@example.com'],
+        [user_ref.display_name for user_ref in actual.user_choices])
+
+  def testConvertFieldDef_EnumChoices(self):
+    """We can convert an enum type field."""
+    field_def = tracker_pb2.FieldDef(
+        field_name='Type', field_type=tracker_pb2.FieldTypes.ENUM_TYPE)
+    actual = converters.ConvertFieldDef(
+        field_def, [], self.users_by_id, self.config, False)
+    self.assertEqual('Type', actual.field_ref.field_name)
+    self.assertEqual(
+        ['Defect', 'Enhancement', 'Task', 'Other'],
+        [label_def.label for label_def in actual.enum_choices])
+
+  def testConvertApprovalDef(self):
+    """We can convert an ApprovalDef to protoc."""
+    self.config.field_defs = [self.fd_1, self.fd_2, self.fd_3]
+    approval_def = tracker_pb2.ApprovalDef(approval_id=3)
+    actual = converters.ConvertApprovalDef(
+        approval_def, self.users_by_id, self.config, True)
+    self.assertEqual('LegalApproval', actual.field_ref.field_name)
+    self.assertEqual(common_pb2.APPROVAL_TYPE, actual.field_ref.type)
+    self.assertEqual(0, len(actual.approver_refs))
+    self.assertEqual('', actual.survey)
+
+    approval_def = tracker_pb2.ApprovalDef(
+        approval_id=3, approver_ids=[111], survey='What?')
+    actual = converters.ConvertApprovalDef(
+        approval_def, self.users_by_id, self.config, True)
+    self.assertEqual('LegalApproval', actual.field_ref.field_name)
+    self.assertEqual(common_pb2.APPROVAL_TYPE, actual.field_ref.type)
+    self.assertEqual(1, len(actual.approver_refs))
+    self.assertEqual(111, actual.approver_refs[0].user_id)
+    self.assertEqual('What?', actual.survey)
+
+    # Without include_admin_info, some fields are not set.
+    actual = converters.ConvertApprovalDef(
+        approval_def, self.users_by_id, self.config, False)
+    self.assertEqual('LegalApproval', actual.field_ref.field_name)
+    self.assertEqual(common_pb2.APPROVAL_TYPE, actual.field_ref.type)
+    self.assertEqual(0, len(actual.approver_refs))
+    self.assertEqual('', actual.survey)
+
+  def testConvertConfig_Simple(self):
+    """We can convert a simple config to protoc."""
+    actual = converters.ConvertConfig(
+        self.project, self.config, self.users_by_id, {})
+    self.assertEqual('proj', actual.project_name)
+    self.assertEqual(9, len(actual.status_defs))
+    self.assertEqual('New', actual.status_defs[0].status)
+    self.assertEqual(17, len(actual.label_defs))
+    self.assertEqual('Type-Defect', actual.label_defs[0].label)
+    self.assertEqual(
+        ['Type', 'Priority', 'Milestone'], actual.exclusive_label_prefixes)
+    self.assertEqual(0, len(actual.component_defs))
+    self.assertEqual(0, len(actual.field_defs))
+    self.assertEqual(0, len(actual.approval_defs))
+    self.assertEqual(False, actual.restrict_to_known)
+    self.assertEqual(
+        ['Duplicate'], [s.status for s in actual.statuses_offer_merge])
+
+  def testConvertConfig_Normal(self):
+    """We can convert a config with fields and components to protoc."""
+    labels_by_id = {1: 'Security', 2: 'Usability'}
+    self.config.field_defs = [self.fd_1, self.fd_2, self.fd_3]
+    self.config.component_defs = [
+      tracker_pb2.ComponentDef(component_id=1, path='UI', label_ids=[2])]
+    self.config.approval_defs.append(tracker_pb2.ApprovalDef(
+        approval_id=3, approver_ids=[111], survey='What?'))
+    self.config.restrict_to_known = True
+    self.config.statuses_offer_merge = ['Duplicate', 'New']
+    actual = converters.ConvertConfig(
+        self.project, self.config, self.users_by_id, labels_by_id)
+    self.assertEqual(1, len(actual.component_defs))
+    self.assertEqual(3, len(actual.field_defs))
+    self.assertEqual(1, len(actual.approval_defs))
+    self.assertEqual('proj', actual.project_name)
+    self.assertEqual(True, actual.restrict_to_known)
+    self.assertEqual(
+        ['Duplicate', 'New'],
+        sorted(s.status for s in actual.statuses_offer_merge))
+
+  def testConvertConfig_FiltersDeletedFieldDefs(self):
+    """Deleted fieldDefs don't make it into the config response."""
+    labels_by_id = {1: 'Security', 2: 'Usability'}
+    deleted_fd1 = tracker_pb2.FieldDef(
+        field_name='DeletedField', field_id=100,
+        field_type=tracker_pb2.FieldTypes.STR_TYPE,
+        applicable_type='',
+        is_deleted=True)
+    deleted_fd2 = tracker_pb2.FieldDef(
+        field_name='RemovedField', field_id=101,
+        field_type=tracker_pb2.FieldTypes.ENUM_TYPE,
+        applicable_type='',
+        is_deleted=True)
+    self.config.field_defs = [self.fd_1, self.fd_2, self.fd_3, deleted_fd1,
+        deleted_fd2]
+    actual = converters.ConvertConfig(
+        self.project, self.config, self.users_by_id, labels_by_id)
+    self.assertEqual(3, len(actual.field_defs))
+
+  def testConvertProjectTemplateDefs_Normal(self):
+    """We can convert protoc TemplateDefs."""
+    self.config.component_defs = [
+        tracker_pb2.ComponentDef(component_id=1, path="dude"),
+    ]
+    status_def_1 = tracker_pb2.StatusDef(status='New', means_open=True)
+    status_def_2 = tracker_pb2.StatusDef(status='Old', means_open=False)
+    self.config.well_known_statuses.extend([status_def_1, status_def_2])
+    owner = self.services.user.TestAddUser('owner@example.com', 111)
+    admin1 = self.services.user.TestAddUser('admin1@example.com', 222)
+    admin2 = self.services.user.TestAddUser('admin2@example.com', 333)
+    appr1 = self.services.user.TestAddUser('approver1@example.com', 444)
+    self.config.field_defs = [
+        self.fd_1,  # STR_TYPE
+        self.fd_3,  # APPROVAl_TYPE
+        self.fd_5,  # ENUM_TYPE
+        self.fd_6,  # INT_TYPE PHASE
+        self.fd_7,  # ENUM_TYPE APPROVAL
+    ]
+    field_values = [
+        tracker_bizobj.MakeFieldValue(
+            self.fd_1.field_id, None, 'honk', None, None, None, False),
+        tracker_bizobj.MakeFieldValue(
+            self.fd_6.field_id, 78, None, None, None, None, False, phase_id=3)]
+    phases = [tracker_pb2.Phase(phase_id=3, name='phaseName')]
+    approval_values = [tracker_pb2.ApprovalValue(
+        approval_id=3, approver_ids=[appr1.user_id], phase_id=3)]
+    labels = ['ApprovalEnum-choice1', 'label-2', 'chicken']
+    templates = [
+        tracker_pb2.TemplateDef(
+            name='Chicken', content='description', summary='summary',
+            summary_must_be_edited=True, owner_id=111, status='New',
+            labels=labels, members_only=True,
+            owner_defaults_to_member=True,
+            admin_ids=[admin1.user_id, admin2.user_id],
+            field_values=field_values, component_ids=[1],
+            component_required=True, phases=phases,
+            approval_values=approval_values),
+        tracker_pb2.TemplateDef(name='Kale')]
+    users_by_id = {
+        owner.user_id: testing_helpers.Blank(
+            display_name=owner.email, email=owner.email, banned=False),
+        admin1.user_id: testing_helpers.Blank(
+            display_name=admin1.email, email=admin1.email, banned=False),
+        admin2.user_id: testing_helpers.Blank(
+            display_name=admin2.email, email=admin2.email, banned=True),
+        appr1.user_id: testing_helpers.Blank(
+            display_name=appr1.email, email=appr1.email, banned=False),
+    }
+    actual = converters.ConvertProjectTemplateDefs(
+        templates, users_by_id, self.config)
+    expected = [
+        project_objects_pb2.TemplateDef(
+            template_name='Chicken',
+            content='description',
+            summary='summary',
+            summary_must_be_edited=True,
+            owner_ref=common_pb2.UserRef(
+                user_id=owner.user_id,
+                display_name=owner.email,
+                is_derived=False),
+            status_ref=common_pb2.StatusRef(
+                status='New',
+                is_derived=False,
+                means_open=True),
+            label_refs=[
+                common_pb2.LabelRef(label='label-2', is_derived=False),
+                common_pb2.LabelRef(label='chicken', is_derived=False)],
+            members_only=True,
+            owner_defaults_to_member=True,
+            admin_refs=[
+                common_pb2.UserRef(
+                    user_id=admin1.user_id,
+                    display_name=admin1.email,
+                    is_derived=False),
+                common_pb2.UserRef(
+                    user_id=admin2.user_id,
+                    display_name=admin2.email,
+                    is_derived=False)],
+            field_values=[
+                issue_objects_pb2.FieldValue(
+                    field_ref=common_pb2.FieldRef(
+                        field_id=self.fd_7.field_id,
+                        field_name=self.fd_7.field_name,
+                        type=common_pb2.ENUM_TYPE),
+                    value='choice1'),
+                issue_objects_pb2.FieldValue(
+                  field_ref=common_pb2.FieldRef(
+                      field_id=self.fd_1.field_id,
+                      field_name=self.fd_1.field_name,
+                      type=common_pb2.STR_TYPE),
+                  value='honk'),
+                issue_objects_pb2.FieldValue(
+                    field_ref=common_pb2.FieldRef(
+                        field_id=self.fd_6.field_id,
+                        field_name=self.fd_6.field_name,
+                        type=common_pb2.INT_TYPE),
+                    value='78',
+                    phase_ref=issue_objects_pb2.PhaseRef(
+                        phase_name='phaseName'))],
+            component_refs=[
+                common_pb2.ComponentRef(path='dude', is_derived=False)],
+            component_required=True,
+            phases=[issue_objects_pb2.PhaseDef(
+                phase_ref=issue_objects_pb2.PhaseRef(phase_name='phaseName'))],
+            approval_values=[
+              issue_objects_pb2.Approval(
+                  field_ref=common_pb2.FieldRef(
+                      field_id=self.fd_3.field_id,
+                      field_name=self.fd_3.field_name,
+                      type=common_pb2.APPROVAL_TYPE),
+                  phase_ref=issue_objects_pb2.PhaseRef(phase_name='phaseName'),
+                  approver_refs=[common_pb2.UserRef(
+                      user_id=appr1.user_id,
+                      display_name=appr1.email,
+                      is_derived=False)])],
+        ),
+        project_objects_pb2.TemplateDef(
+            template_name='Kale',
+            status_ref=common_pb2.StatusRef(
+                status='----',
+                means_open=True),
+            owner_defaults_to_member=True)]
+    self.assertEqual(actual, expected)
+
+  def testConvertTemplateDefs_Empty(self):
+    """We can convert an empty list of protoc TemplateDefs."""
+    actual = converters.ConvertProjectTemplateDefs([], {}, self.config)
+    self.assertEqual(actual, [])
+
+  def testConvertHotlist(self):
+    """We can convert a hotlist to protoc."""
+    hotlist = fake.Hotlist(
+        'Fake-hotlist', 123, is_private=True,
+        owner_ids=[self.user_1.user_id], editor_ids=[self.user_2.user_id],
+        follower_ids=[self.user_3.user_id])
+    hotlist.summary = 'A fake hotlist.'
+    hotlist.description = 'Detailed description of the fake hotlist.'
+    hotlist.default_col_spec = 'cows tho'
+    actual = converters.ConvertHotlist(hotlist, self.users_by_id)
+    self.assertEqual(actual,
+                     features_objects_pb2.Hotlist(
+                         name=hotlist.name,
+                         summary=hotlist.summary,
+                         description=hotlist.description,
+                         default_col_spec=hotlist.default_col_spec,
+                         is_private=hotlist.is_private,
+                         owner_ref=common_pb2.UserRef(
+                             display_name=self.user_1.email,
+                             user_id=self.user_1.user_id),
+                         editor_refs=[common_pb2.UserRef(
+                             display_name=self.user_2.email,
+                             user_id=self.user_2.user_id)],
+                         follower_refs=[common_pb2.UserRef(
+                             display_name=testing_helpers.ObscuredEmail(
+                                 self.user_3.email),
+                             user_id=self.user_3.user_id)]))
+
+
+  def testConvertHotlistItem(self):
+    """We can convert a HotlistItem to protoc."""
+    project_2 = self.services.project.TestAddProject(
+        'proj2', project_id=788)
+    config_2 = tracker_bizobj.MakeDefaultProjectIssueConfig(
+        project_2.project_id)
+    config_2.field_defs = [self.fd_2]
+    self.config.field_defs = [self.fd_1]
+
+    hotlist = self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[])
+    self.services.features.UpdateHotlistItems(
+        self.cnxn, hotlist.hotlist_id, [],
+        [(self.issue_1.issue_id, 222, 12345, 'Note')])
+    issues_by_id = {self.issue_1.issue_id: self.issue_1}
+    related_refs = {}
+    harmonized_config = tracker_bizobj.HarmonizeConfigs([self.config, config_2])
+
+    actual = converters.ConvertHotlistItems(
+        hotlist.items, issues_by_id, self.users_by_id, related_refs,
+        harmonized_config)
+
+    expected_issue = converters.ConvertIssue(
+        self.issue_1, self.users_by_id, related_refs, harmonized_config)
+    self.assertEqual(
+        [features_objects_pb2.HotlistItem(
+            issue=expected_issue,
+            rank=1,
+            adder_ref=common_pb2.UserRef(
+                user_id=222,
+                display_name='two@example.com'),
+            added_timestamp=12345,
+            note='Note')],
+        actual)
+
+  def testConvertValueAndWhy(self):
+    """We can covert a dict wth 'why' and 'value' fields to a ValueAndWhy PB."""
+    actual = converters.ConvertValueAndWhy({'value': 'Foo', 'why': 'Because'})
+    self.assertEqual(
+        common_pb2.ValueAndWhy(value='Foo', why='Because'),
+        actual)
+
+  def testConvertValueAndWhyList(self):
+    """We can convert a list of value and why dicts."""
+    actual = converters.ConvertValueAndWhyList([
+        {'value': 'A', 'why': 'Because A'},
+        {'value': 'B'},
+        {'why': 'Why what?'},
+        {}])
+    self.assertEqual(
+        [common_pb2.ValueAndWhy(value='A', why='Because A'),
+         common_pb2.ValueAndWhy(value='B'),
+         common_pb2.ValueAndWhy(why='Why what?'),
+         common_pb2.ValueAndWhy()],
+        actual)
+
+  def testRedistributeEnumFieldsIntoLabels(self):
+    # function called and tests covered by
+    # IngestIssueDelta and IngestApprovalDelta
+    pass
diff --git a/api/test/features_servicer_test.py b/api/test/features_servicer_test.py
new file mode 100644
index 0000000..7a7180b
--- /dev/null
+++ b/api/test/features_servicer_test.py
@@ -0,0 +1,1039 @@
+# Copyright 2018 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
+
+"""Tests for the projects servicer."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import json
+import mock
+import unittest
+import mox
+
+from google.protobuf import wrappers_pb2
+
+from components.prpc import codes
+from components.prpc import context
+from components.prpc import server
+
+from api import converters
+from api.api_proto import common_pb2
+from api.api_proto import features_pb2
+from api.api_proto import features_objects_pb2
+from api.api_proto import issue_objects_pb2
+from framework import authdata
+from framework import exceptions
+from framework import monorailcontext
+from framework import permissions
+from framework import sorting
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+from services import features_svc
+from services import service_manager
+
+# Import component_helpers_test to mock cloudstorage before it is imported by
+# component_helpers via features servicer.
+from features.test import component_helpers_test
+from api import features_servicer  # pylint: disable=ungrouped-imports
+
+
+class FeaturesServicerTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        cache_manager=fake.CacheManager(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService(),
+        features=fake.FeaturesService(),
+        hotlist_star=fake.HotlistStarService())
+    sorting.InitializeArtValues(self.services)
+
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=789, owner_ids=[111], contrib_ids=[222, 333])
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.user1 = self.services.user.TestAddUser('owner@example.com', 111)
+    self.user2 = self.services.user.TestAddUser('editor@example.com', 222)
+    self.user3 = self.services.user.TestAddUser('foo@example.com', 333)
+    self.user4 = self.services.user.TestAddUser('bar@example.com', 444)
+    self.features_svcr = features_servicer.FeaturesServicer(
+        self.services, make_rate_limiter=False)
+    self.prpc_context = context.ServicerContext()
+    self.prpc_context.set_code(codes.StatusCode.OK)
+    self.issue_1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, project_name='proj', issue_id=78901)
+    self.issue_2 = fake.MakeTestIssue(
+        789, 2, 'sum', 'Fixed', 111, project_name='proj', issue_id=78902,
+        closed_timestamp=112223344)
+    self.issue_3 = fake.MakeTestIssue(
+        789, 3, 'sum', 'New', 111, project_name='proj', issue_id=78903)
+
+    self.services.issue.TestAddIssue(self.issue_1)
+    self.services.issue.TestAddIssue(self.issue_2)
+    self.services.issue.TestAddIssue(self.issue_3)
+
+    self.project_2 = self.services.project.TestAddProject(
+        'proj2', project_id=788, owner_ids=[111], contrib_ids=[222, 333])
+    self.config_2 = tracker_bizobj.MakeDefaultProjectIssueConfig(788)
+    self.issue_21 = fake.MakeTestIssue(
+        788, 1, 'sum', 'New', 111, project_name='proj2', issue_id=78801)
+    self.issue_22 = fake.MakeTestIssue(
+        788, 2, 'sum', 'New', 111, project_name='proj2', issue_id=78802)
+    self.issue_23 = fake.MakeTestIssue(
+        788, 3, 'sum', 'New', 111, project_name='proj2', issue_id=78803)
+    self.services.issue.TestAddIssue(self.issue_21)
+    self.services.issue.TestAddIssue(self.issue_22)
+    self.services.issue.TestAddIssue(self.issue_23)
+
+    self.PAST_TIME = 123456
+
+    # For testing PredictComponent
+    self._ml_engine = component_helpers_test.FakeMLEngine(self)
+    self._top_words = None
+    self._components_by_index = None
+
+    mock.patch(
+        'services.ml_helpers.setup_ml_engine', lambda: self._ml_engine).start()
+    mock.patch(
+        'features.component_helpers._GetTopWords',
+        lambda _: self._top_words).start()
+    mock.patch('cloudstorage.open', self.cloudstorageOpen).start()
+    mock.patch('settings.component_features', 5).start()
+
+    self.addCleanup(mock.patch.stopall)
+
+  def cloudstorageOpen(self, name, mode):
+    """Create a file mock that returns self._components_by_index when read."""
+    open_fn = mock.mock_open(read_data=json.dumps(self._components_by_index))
+    return open_fn(name, mode)
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def CallWrapped(self, wrapped_handler, *args, **kwargs):
+    return wrapped_handler.wrapped(self.features_svcr, *args, **kwargs)
+
+  def testListHotlistsByUser_SearchByEmail(self):
+    """We can get a list of hotlists for a given email."""
+    # Public hostlist owned by 'owner@example.com'
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+
+    # Query for issues for 'owner@example.com'
+    user_ref = common_pb2.UserRef(display_name='owner@example.com')
+    request = features_pb2.ListHotlistsByUserRequest(user=user_ref)
+
+    # We're not authenticated
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByUser, mc,
+                                request)
+    self.assertEqual(1, len(response.hotlists))
+    hotlist = response.hotlists[0]
+    self.assertEqual(111, hotlist.owner_ref.user_id)
+    self.assertEqual('ow...@example.com', hotlist.owner_ref.display_name)
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+
+  def testListHotlistsByUser_SearchByOwner(self):
+    """We can get a list of hotlists for a given user."""
+    # Public hostlist owned by 'owner@example.com'
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+
+    # Query for issues for 'owner@example.com'
+    user_ref = common_pb2.UserRef(user_id=111)
+    request = features_pb2.ListHotlistsByUserRequest(user=user_ref)
+
+    # We're authenticated as 'foo@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.com')
+
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByUser, mc,
+                                request)
+    self.assertEqual(1, len(response.hotlists))
+    hotlist = response.hotlists[0]
+    self.assertEqual(111, hotlist.owner_ref.user_id)
+    # User1 and user3 share self.project.
+    self.assertEqual('owner@example.com', hotlist.owner_ref.display_name)
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+
+  def testListHotlistsByUser_SearchByEditor(self):
+    """We can get a list of hotlists for a given user."""
+    # Public hostlist owned by 'owner@example.com'
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+
+    # Query for issues for 'editor@example.com'
+    user_ref = common_pb2.UserRef(user_id=222)
+    request = features_pb2.ListHotlistsByUserRequest(user=user_ref)
+
+    # We're authenticated as 'foo@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.com')
+
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByUser, mc,
+                                request)
+    self.assertEqual(1, len(response.hotlists))
+    hotlist = response.hotlists[0]
+    self.assertEqual(111, hotlist.owner_ref.user_id)
+    # User1 and user3 share self.project.
+    self.assertEqual('owner@example.com', hotlist.owner_ref.display_name)
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+
+  def testListHotlistsByUser_NotSignedIn(self):
+    # Public hostlist owned by 'owner@example.com'
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+
+    # Query for issues for 'owner@example.com'
+    user_ref = common_pb2.UserRef(user_id=111)
+    request = features_pb2.ListHotlistsByUserRequest(user=user_ref)
+
+    # We're not authenticated
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByUser, mc,
+                                request)
+
+    self.assertEqual(1, len(response.hotlists))
+    hotlist = response.hotlists[0]
+    self.assertEqual(111, hotlist.owner_ref.user_id)
+
+  def testListHotlistsByUser_Empty(self):
+    """There are no hotlists for the given user."""
+    # Public hostlist owned by 'owner@example.com'
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+
+    # Query for issues for 'bar@example.com'
+    user_ref = common_pb2.UserRef(user_id=444)
+    request = features_pb2.ListHotlistsByUserRequest(user=user_ref)
+
+    # We're authenticated as 'foo@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.com')
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByUser, mc,
+                                request)
+
+    self.assertEqual(0, len(response.hotlists))
+
+  def testListHotlistsByUser_NoHotlists(self):
+    """There are no hotlists."""
+    # No hotlists
+    # Query for issues for 'owner@example.com'
+    user_ref = common_pb2.UserRef(user_id=111)
+    request = features_pb2.ListHotlistsByUserRequest(user=user_ref)
+
+    # We're authenticated as 'foo@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.com')
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByUser, mc,
+                                request)
+    self.assertEqual(0, len(response.hotlists))
+
+  def testListHotlistsByUser_PrivateIssueAsOwner(self):
+    # Private hostlist owned by 'owner@example.com'
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222], is_private=True)
+
+    # Query for issues for 'owner@example.com'
+    user_ref = common_pb2.UserRef(user_id=111)
+    request = features_pb2.ListHotlistsByUserRequest(user=user_ref)
+
+    # We're authenticated as 'owner@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByUser, mc,
+                                request)
+
+    self.assertEqual(1, len(response.hotlists))
+    hotlist = response.hotlists[0]
+    self.assertEqual(111, hotlist.owner_ref.user_id)
+
+  def testListHotlistsByUser_PrivateIssueAsEditor(self):
+    # Private hostlist owned by 'owner@example.com'
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222], is_private=True)
+
+    # Query for issues for 'owner@example.com'
+    user_ref = common_pb2.UserRef(user_id=111)
+    request = features_pb2.ListHotlistsByUserRequest(user=user_ref)
+
+    # We're authenticated as 'editor@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='editor@example.com')
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByUser, mc,
+                                request)
+
+    self.assertEqual(1, len(response.hotlists))
+    hotlist = response.hotlists[0]
+    self.assertEqual(111, hotlist.owner_ref.user_id)
+
+  def testListHotlistsByUser_PrivateIssueNoAccess(self):
+    # Private hostlist owned by 'owner@example.com'
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222], is_private=True)
+
+    # Query for issues for 'owner@example.com'
+    user_ref = common_pb2.UserRef(user_id=111)
+    request = features_pb2.ListHotlistsByUserRequest(user=user_ref)
+
+    # We're authenticated as 'foo@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.com')
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByUser, mc,
+                                request)
+
+    self.assertEqual(0, len(response.hotlists))
+
+  def testListHotlistsByUser_PrivateIssueNotSignedIn(self):
+    # Private hostlist owned by 'owner@example.com'
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222], is_private=True)
+
+    # Query for issues for 'owner@example.com'
+    user_ref = common_pb2.UserRef(user_id=111)
+    request = features_pb2.ListHotlistsByUserRequest(user=user_ref)
+
+    # We're not authenticated
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByUser, mc,
+                                request)
+
+    self.assertEqual(0, len(response.hotlists))
+
+  def AddIssueToHotlist(self, hotlist_id, issue_id=78901, adder_id=111):
+    self.services.features.AddIssuesToHotlists(
+        self.cnxn, [hotlist_id], [(issue_id, adder_id, 0, '')],
+        None, None, None)
+
+  def testListHotlistsByIssue_Normal(self):
+    hotlist = self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+    self.AddIssueToHotlist(hotlist.hotlist_id)
+
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    request = features_pb2.ListHotlistsByIssueRequest(issue=issue_ref)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.com')
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByIssue, mc,
+                                request)
+
+    self.assertEqual(1, len(response.hotlists))
+    hotlist = response.hotlists[0]
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+
+  def testListHotlistsByIssue_NotSignedIn(self):
+    # Public hostlist owned by 'owner@example.com'
+    hotlist = self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+    self.AddIssueToHotlist(hotlist.hotlist_id)
+
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    request = features_pb2.ListHotlistsByIssueRequest(issue=issue_ref)
+
+    # We're not authenticated
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByIssue, mc,
+                                request)
+
+    self.assertEqual(1, len(response.hotlists))
+    hotlist = response.hotlists[0]
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+
+  def testListHotlistsByIssue_Empty(self):
+    """There are no hotlists with the given issue."""
+    # Public hostlist owned by 'owner@example.com'
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    request = features_pb2.ListHotlistsByIssueRequest(issue=issue_ref)
+
+    # We're authenticated as 'foo@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.com')
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByIssue, mc,
+                                request)
+
+    self.assertEqual(0, len(response.hotlists))
+
+  def testListHotlistsByIssue_NoHotlists(self):
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    request = features_pb2.ListHotlistsByIssueRequest(issue=issue_ref)
+
+    # We're authenticated as 'foo@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.com')
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByIssue, mc,
+                                request)
+    self.assertEqual(0, len(response.hotlists))
+
+  def testListHotlistsByIssue_PrivateHotlistAsOwner(self):
+    """An owner can view their private issues."""
+    # Private hostlist owned by 'owner@example.com'
+    hotlist = self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222], is_private=True)
+    self.AddIssueToHotlist(hotlist.hotlist_id)
+
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    request = features_pb2.ListHotlistsByIssueRequest(issue=issue_ref)
+
+    # We're authenticated as 'owner@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByIssue, mc,
+                                request)
+
+    self.assertEqual(1, len(response.hotlists))
+    hotlist = response.hotlists[0]
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+
+  def testListHotlistsByIssue_PrivateHotlistNoAccess(self):
+    # Private hostlist owned by 'owner@example.com'
+    hotlist = self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222], is_private=True)
+    self.AddIssueToHotlist(hotlist.hotlist_id)
+
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    request = features_pb2.ListHotlistsByIssueRequest(issue=issue_ref)
+
+    # We're authenticated as 'foo@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.com')
+    response = self.CallWrapped(self.features_svcr.ListHotlistsByIssue, mc,
+                                request)
+
+    self.assertEqual(0, len(response.hotlists))
+
+  def testListHotlistsByIssue_NonProjectHotlists(self):
+    hotlist = self.services.features.CreateHotlist(
+        self.cnxn,
+        'Fake-Hotlist',
+        'Summary',
+        'Description',
+        owner_ids=[111],
+        editor_ids=[222])
+    spam_hotlist = self.services.features.CreateHotlist(
+        self.cnxn,
+        'Spam-Hotlist',
+        'Summary',
+        'Description',
+        owner_ids=[444],
+        editor_ids=[])
+    another_hotlist = self.services.features.CreateHotlist(
+        self.cnxn,
+        'Another-Hotlist',
+        'Summary',
+        'Description',
+        owner_ids=[111],
+        editor_ids=[])
+    self.AddIssueToHotlist(hotlist.hotlist_id)
+    self.AddIssueToHotlist(spam_hotlist.hotlist_id)
+    self.AddIssueToHotlist(another_hotlist.hotlist_id)
+
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    request = features_pb2.ListHotlistsByIssueRequest(issue=issue_ref)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.com')
+    response = self.CallWrapped(
+        self.features_svcr.ListHotlistsByIssue, mc, request)
+
+    self.assertEqual(2, len(response.hotlists))
+    self.assertEqual('Fake-Hotlist', response.hotlists[0].name)
+    self.assertEqual('Another-Hotlist', response.hotlists[1].name)
+
+  def testListRecentlyVisitedHotlists(self):
+    hotlists = [
+        self.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[self.user2.user_id], editor_ids=[self.user1.user_id],
+            default_col_spec='chicken'),
+        self.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist-2', 'Summary', 'Description',
+            owner_ids=[self.user1.user_id], editor_ids=[self.user2.user_id],
+            default_col_spec='honk'),
+        self.services.features.CreateHotlist(
+            self.cnxn, 'Private-Hotlist', 'Summary', 'Description',
+            owner_ids=[self.user3.user_id], editor_ids=[self.user2.user_id],
+            is_private=True)]
+
+    for hotlist in hotlists:
+      self.services.user.AddVisitedHotlist(
+          self.cnxn, self.user1.user_id, hotlist.hotlist_id)
+
+    request = features_pb2.ListRecentlyVisitedHotlistsRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user1.email)
+    response = self.CallWrapped(
+        self.features_svcr.ListRecentlyVisitedHotlists, mc, request)
+
+    expected_hotlists = [
+        features_objects_pb2.Hotlist(
+            owner_ref=common_pb2.UserRef(
+                user_id=self.user2.user_id, display_name=self.user2.email),
+            editor_refs=[
+                common_pb2.UserRef(
+                    user_id=self.user1.user_id, display_name=self.user1.email)
+            ],
+            name='Fake-Hotlist',
+            summary='Summary',
+            description='Description',
+            is_private=False,
+            default_col_spec='chicken'),
+        features_objects_pb2.Hotlist(
+            owner_ref=common_pb2.UserRef(
+                user_id=self.user1.user_id, display_name=self.user1.email),
+            editor_refs=[
+                common_pb2.UserRef(
+                    user_id=self.user2.user_id, display_name=self.user2.email)
+            ],
+            name='Fake-Hotlist-2',
+            summary='Summary',
+            description='Description',
+            is_private=False,
+            default_col_spec='honk')
+    ]
+
+    # We don't have permission to see the last issue, because it is marked as
+    # private and we're not owners or editors.
+    self.assertEqual(expected_hotlists, list(response.hotlists))
+
+  def testListRecentlyVisitedHotlists_Anon(self):
+    request = features_pb2.ListRecentlyVisitedHotlistsRequest()
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    response = self.CallWrapped(
+        self.features_svcr.ListRecentlyVisitedHotlists, mc, request)
+    self.assertEqual(0, len(response.hotlists))
+
+  def testListStarredHotlists(self):
+    hotlists = [
+        self.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[self.user2.user_id], editor_ids=[self.user1.user_id],
+            default_col_spec='cow chicken'),
+        self.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist-2', 'Summary', 'Description',
+            owner_ids=[self.user1.user_id],
+            editor_ids=[self.user2.user_id, self.user3.user_id],
+            default_col_spec=''),
+        self.services.features.CreateHotlist(
+            self.cnxn, 'Private-Hotlist', 'Summary', 'Description',
+            owner_ids=[self.user3.user_id], editor_ids=[self.user2.user_id],
+            is_private=True, default_col_spec='chicken')]
+
+    for hotlist in hotlists:
+      self.services.hotlist_star.SetStar(
+          self.cnxn, hotlist.hotlist_id, self.user1.user_id, True)
+
+    request = features_pb2.ListStarredHotlistsRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.features_svcr.ListStarredHotlists, mc, request)
+
+    expected_hotlists = [
+        features_objects_pb2.Hotlist(
+            owner_ref=common_pb2.UserRef(
+                user_id=self.user2.user_id, display_name=self.user2.email),
+            editor_refs=[
+                common_pb2.UserRef(
+                    user_id=self.user1.user_id, display_name=self.user1.email)
+            ],
+            name='Fake-Hotlist',
+            summary='Summary',
+            description='Description',
+            is_private=False,
+            default_col_spec='cow chicken'),
+        features_objects_pb2.Hotlist(
+            owner_ref=common_pb2.UserRef(
+                user_id=self.user1.user_id, display_name=self.user1.email),
+            editor_refs=[
+                common_pb2.UserRef(
+                    user_id=self.user2.user_id, display_name=self.user2.email),
+                common_pb2.UserRef(
+                    user_id=self.user3.user_id, display_name=self.user3.email)
+            ],
+            name='Fake-Hotlist-2',
+            summary='Summary',
+            description='Description',
+            is_private=False)
+    ]
+
+    # We don't have permission to see the last issue, because it is marked as
+    # private and we're not owners or editors.
+    self.assertEqual(expected_hotlists, list(response.hotlists))
+
+  def testListStarredHotlists_Anon(self):
+    request = features_pb2.ListStarredHotlistsRequest()
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    response = self.CallWrapped(
+        self.features_svcr.ListStarredHotlists, mc, request)
+    self.assertEqual(0, len(response.hotlists))
+
+  def CallGetStarCount(self):
+    # Query for hotlists for 'owner@example.com'
+    owner_ref = common_pb2.UserRef(user_id=111)
+    hotlist_ref = common_pb2.HotlistRef(name='Fake-Hotlist', owner=owner_ref)
+    request = features_pb2.GetHotlistStarCountRequest(hotlist_ref=hotlist_ref)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.features_svcr.GetHotlistStarCount, mc, request)
+    return response.star_count
+
+  def CallStar(self, requester='owner@example.com', starred=True):
+    # Query for hotlists for 'owner@example.com'
+    owner_ref = common_pb2.UserRef(user_id=111)
+    hotlist_ref = common_pb2.HotlistRef(name='Fake-Hotlist', owner=owner_ref)
+    request = features_pb2.StarHotlistRequest(
+        hotlist_ref=hotlist_ref, starred=starred)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=requester)
+    response = self.CallWrapped(
+        self.features_svcr.StarHotlist, mc, request)
+    return response.star_count
+
+  def testStarCount_Normal(self):
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+    self.assertEqual(0, self.CallGetStarCount())
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(1, self.CallGetStarCount())
+
+  def testStarCount_StarTwiceSameUser(self):
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(1, self.CallGetStarCount())
+
+  def testStarCount_StarTwiceDifferentUser(self):
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(2, self.CallStar(requester='user_222@example.com'))
+    self.assertEqual(2, self.CallGetStarCount())
+
+  def testStarCount_RemoveStarTwiceSameUser(self):
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(1, self.CallGetStarCount())
+
+    self.assertEqual(0, self.CallStar(starred=False))
+    self.assertEqual(0, self.CallStar(starred=False))
+    self.assertEqual(0, self.CallGetStarCount())
+
+  def testStarCount_RemoveStarTwiceDifferentUser(self):
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[222])
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(2, self.CallStar(requester='user_222@example.com'))
+    self.assertEqual(2, self.CallGetStarCount())
+
+    self.assertEqual(1, self.CallStar(starred=False))
+    self.assertEqual(
+        0, self.CallStar(requester='user_222@example.com', starred=False))
+    self.assertEqual(0, self.CallGetStarCount())
+
+  def testGetHotlist(self):
+    hotlist = self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[self.user3.user_id], editor_ids=[self.user4.user_id],
+        is_private=True, default_col_spec='corgi butts')
+
+    owner_ref = common_pb2.UserRef(user_id=self.user3.user_id)
+    hotlist_ref = common_pb2.HotlistRef(
+        name=hotlist.name, owner=owner_ref)
+    request = features_pb2.GetHotlistRequest(hotlist_ref=hotlist_ref)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user4.email)
+    mc.LookupLoggedInUserPerms(None)
+    response = self.CallWrapped(
+        self.features_svcr.GetHotlist, mc, request)
+
+    self.assertEqual(
+        response.hotlist,
+        features_objects_pb2.Hotlist(
+          owner_ref=common_pb2.UserRef(
+              user_id=self.user3.user_id,
+              display_name=testing_helpers.ObscuredEmail(self.user3.email)),
+          editor_refs=[common_pb2.UserRef(
+              user_id=self.user4.user_id,
+              display_name=self.user4.email)],
+          name=hotlist.name,
+          summary=hotlist.summary,
+          description=hotlist.description,
+          default_col_spec='corgi butts',
+          is_private=True))
+
+  def testGetHotlist_BadInput(self):
+    hotlist_ref = common_pb2.HotlistRef()
+    request = features_pb2.GetHotlistRequest(hotlist_ref=hotlist_ref)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.com')
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      self.CallWrapped(self.features_svcr.GetHotlist, mc, request)
+
+  def testCreateHotlist_Normal(self):
+    request = features_pb2.CreateHotlistRequest(
+        name='Fake-Hotlist',
+        summary='Summary',
+        description='Description',
+        editor_refs=[
+            common_pb2.UserRef(user_id=222),
+            common_pb2.UserRef(display_name='foo@example.com')],
+        issue_refs=[
+            common_pb2.IssueRef(project_name='proj', local_id=1),
+            common_pb2.IssueRef(project_name='proj', local_id=2)],
+        is_private=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.features_svcr.CreateHotlist, mc, request)
+
+    # Check that the hotlist was successfuly added.
+    hotlist_id = self.services.features.LookupHotlistIDs(
+        self.cnxn, ['Fake-Hotlist'], [111]).get(('fake-hotlist', 111))
+    hotlist = self.services.features.GetHotlist(self.cnxn, hotlist_id)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+    self.assertEqual([111], hotlist.owner_ids)
+    self.assertEqual([222, 333], hotlist.editor_ids)
+    self.assertEqual(
+        [self.issue_1.issue_id, self.issue_2.issue_id],
+        [item.issue_id for item in hotlist.items])
+    self.assertTrue(hotlist.is_private)
+
+  def testCreateHotlist_Simple(self):
+    request = features_pb2.CreateHotlistRequest(
+        name='Fake-Hotlist',
+        summary='Summary',
+        description='Description')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.features_svcr.CreateHotlist, mc, request)
+
+    # Check that the hotlist was successfuly added.
+    hotlist_id = self.services.features.LookupHotlistIDs(
+        self.cnxn, ['Fake-Hotlist'], [111]).get(('fake-hotlist', 111))
+    hotlist = self.services.features.GetHotlist(self.cnxn, hotlist_id)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+    self.assertEqual([111], hotlist.owner_ids)
+    self.assertEqual([], hotlist.editor_ids)
+    self.assertEqual(0, len(hotlist.items))
+    self.assertFalse(hotlist.is_private)
+
+  def testCheckHotlistName_OK(self):
+    request = features_pb2.CheckHotlistNameRequest(name='Fake-Hotlist')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    result = self.CallWrapped(self.features_svcr.CheckHotlistName, mc, request)
+    self.assertEqual('', result.error)
+
+  def testCheckHotlistName_Anon(self):
+    request = features_pb2.CheckHotlistNameRequest(name='Fake-Hotlist')
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.features_svcr.CheckHotlistName, mc, request)
+
+  def testCheckHotlistName_InvalidName(self):
+    request = features_pb2.CheckHotlistNameRequest(name='**Invalid**')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    result = self.CallWrapped(self.features_svcr.CheckHotlistName, mc, request)
+    self.assertNotEqual('', result.error)
+
+  def testCheckHotlistName_AlreadyExists(self):
+    self.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[])
+
+    request = features_pb2.CheckHotlistNameRequest(name='Fake-Hotlist')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    result = self.CallWrapped(self.features_svcr.CheckHotlistName, mc, request)
+    self.assertNotEqual('', result.error)
+
+  def testRemoveIssuesFromHotlists(self):
+    # Create two hotlists with issues 1 and 2.
+    hotlist_1 = self.services.features.CreateHotlist(
+        self.cnxn, 'Hotlist-1', 'Summary', 'Description', owner_ids=[111],
+        editor_ids=[])
+    hotlist_2 = self.services.features.CreateHotlist(
+        self.cnxn, 'Hotlist-2', 'Summary', 'Description', owner_ids=[111],
+        editor_ids=[])
+    self.services.features.AddIssuesToHotlists(
+        self.cnxn,
+        [hotlist_1.hotlist_id, hotlist_2.hotlist_id],
+        [(self.issue_1.issue_id, 111, 0, ''),
+         (self.issue_2.issue_id, 111, 0, '')],
+        None, None, None)
+
+    # Remove Issue 1 from both hotlists.
+    request = features_pb2.RemoveIssuesFromHotlistsRequest(
+        hotlist_refs=[
+            common_pb2.HotlistRef(
+                name='Hotlist-1',
+                owner=common_pb2.UserRef(user_id=111)),
+            common_pb2.HotlistRef(
+                name='Hotlist-2',
+                owner=common_pb2.UserRef(user_id=111))],
+        issue_refs=[
+            common_pb2.IssueRef(project_name='proj', local_id=1)])
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.features_svcr.RemoveIssuesFromHotlists, mc, request)
+
+    # Only Issue 2 should remain in both lists.
+    self.assertEqual(
+        [self.issue_2.issue_id],
+        [item.issue_id for item in hotlist_1.items])
+    self.assertEqual(
+        [self.issue_2.issue_id],
+        [item.issue_id for item in hotlist_2.items])
+
+  def testAddIssuesToHotlists(self):
+    # Create two hotlists
+    hotlist_1 = self.services.features.CreateHotlist(
+        self.cnxn, 'Hotlist-1', 'Summary', 'Description', owner_ids=[111],
+        editor_ids=[])
+    hotlist_2 = self.services.features.CreateHotlist(
+        self.cnxn, 'Hotlist-2', 'Summary', 'Description', owner_ids=[111],
+        editor_ids=[])
+
+    # Add Issue 1 to both hotlists
+    request = features_pb2.AddIssuesToHotlistsRequest(
+        note='Foo',
+        hotlist_refs=[
+            common_pb2.HotlistRef(
+                name='Hotlist-1',
+                owner=common_pb2.UserRef(user_id=111)),
+            common_pb2.HotlistRef(
+                name='Hotlist-2',
+                owner=common_pb2.UserRef(user_id=111))],
+        issue_refs=[
+            common_pb2.IssueRef(project_name='proj', local_id=1)])
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.features_svcr.AddIssuesToHotlists, mc, request)
+
+    self.assertEqual(
+        [self.issue_1.issue_id],
+        [item.issue_id for item in hotlist_1.items])
+    self.assertEqual(
+        [self.issue_1.issue_id],
+        [item.issue_id for item in hotlist_2.items])
+
+    self.assertEqual('Foo', hotlist_1.items[0].note)
+    self.assertEqual('Foo', hotlist_2.items[0].note)
+
+  def testRerankHotlistIssues(self):
+    """Rerank a hotlist."""
+    issue_3 = fake.MakeTestIssue(
+        789, 3, 'sum', 'New', 111, project_name='proj', issue_id=78903)
+    issue_4 = fake.MakeTestIssue(
+        789, 4, 'sum', 'New', 111, project_name='proj', issue_id=78904)
+    self.services.issue.TestAddIssue(issue_3)
+    self.services.issue.TestAddIssue(issue_4)
+
+    owner_ids = [self.user1.user_id]
+    follower_ids = [self.user2.user_id]
+    editor_ids = [self.user3.user_id]
+    hotlist_items = [
+        (78904, 31, self.user2.user_id, self.PAST_TIME, 'note'),
+        (78903, 21, self.user2.user_id, self.PAST_TIME, 'note'),
+        (78902, 11, self.user2.user_id, self.PAST_TIME, 'note'),
+        (78901, 1, self.user2.user_id, self.PAST_TIME, 'note')]
+    hotlist = self.services.features.TestAddHotlist(
+        'RerankHotlistName', summary='summary', owner_ids=owner_ids,
+        editor_ids=editor_ids, follower_ids=follower_ids,
+        hotlist_id=1236, hotlist_item_fields=hotlist_items)
+
+    request = features_pb2.RerankHotlistIssuesRequest(
+        hotlist_ref=common_pb2.HotlistRef(
+            name='RerankHotlistName',
+            owner=common_pb2.UserRef(user_id=self.user1.user_id)),
+        moved_refs=[common_pb2.IssueRef(
+            project_name='proj', local_id=2)],
+        target_ref=common_pb2.IssueRef(project_name='proj', local_id=4),
+        split_above=True)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user1.email)
+    mc.LookupLoggedInUserPerms(self.project)
+    self.CallWrapped(self.features_svcr.RerankHotlistIssues, mc, request)
+
+    self.assertEqual(
+        [item.issue_id for item in hotlist.items],
+        [78901, 78903, 78902, 78904])
+
+  def testUpdateHotlistIssueNote(self):
+    hotlist = self.services.features.CreateHotlist(
+        self.cnxn, 'Hotlist-1', 'Summary', 'Description', owner_ids=[111],
+        editor_ids=[])
+    self.services.features.AddIssuesToHotlists(
+        self.cnxn,
+        [hotlist.hotlist_id], [(self.issue_1.issue_id, 111, 0, '')],
+        None, None, None)
+
+    request = features_pb2.UpdateHotlistIssueNoteRequest(
+        hotlist_ref=common_pb2.HotlistRef(
+            name='Hotlist-1',
+            owner=common_pb2.UserRef(user_id=111)),
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        note='Note')
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.features_svcr.UpdateHotlistIssueNote, mc, request)
+
+    self.assertEqual('Note', hotlist.items[0].note)
+
+  def testUpdateHotlistIssueNote_NotAllowed(self):
+    hotlist = self.services.features.CreateHotlist(
+        self.cnxn, 'Hotlist-1', 'Summary', 'Description', owner_ids=[222],
+        editor_ids=[])
+    self.services.features.AddIssuesToHotlists(
+        self.cnxn,
+        [hotlist.hotlist_id], [(self.issue_1.issue_id, 222, 0, '')],
+        None, None, None)
+
+    request = features_pb2.UpdateHotlistIssueNoteRequest(
+        hotlist_ref=common_pb2.HotlistRef(
+            name='Hotlist-1',
+            owner=common_pb2.UserRef(user_id=222)),
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        note='Note')
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.features_svcr.UpdateHotlistIssueNote, mc, request)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user2.email)
+    mc.LookupLoggedInUserPerms(None)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user2.email)
+    mc.LookupLoggedInUserPerms(None)
+
+  def testDeleteHotlist(self):
+    """Test we can delete a hotlist via the API."""
+    owner_ids = [self.user2.user_id]
+    editor_ids = []
+    hotlist = self.services.features.TestAddHotlist(
+        name='Hotlist-1', summary='summary', description='description',
+        owner_ids=owner_ids, editor_ids=editor_ids, hotlist_id=1235)
+    request = features_pb2.DeleteHotlistRequest(
+        hotlist_ref=common_pb2.HotlistRef(
+            name=hotlist.name,
+            owner=common_pb2.UserRef(user_id=self.user2.user_id)))
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user2.email)
+    mc.LookupLoggedInUserPerms(None)
+    self.CallWrapped(self.features_svcr.DeleteHotlist, mc, request)
+
+    self.assertTrue(
+        hotlist.hotlist_id in self.services.features.expunged_hotlist_ids)
+
+  def testPredictComponent_Normal(self):
+    """Test normal case when predicted component exists."""
+    component_id = self.services.config.CreateComponentDef(
+        cnxn=None, project_id=self.project.project_id, path='Ruta>Baga',
+        docstring='', deprecated=False, admin_ids=[], cc_ids=[], created=None,
+        creator_id=None, label_ids=[])
+
+    self._top_words = {
+        'foo': 0,
+        'bar': 1,
+        'baz': 2}
+    self._components_by_index = {
+        '0': '123',
+        '1': str(component_id),
+        '2': '789'}
+    self._ml_engine.expected_features = [3, 0, 1, 0, 0]
+    self._ml_engine.scores = [5, 10, 3]
+
+    request = features_pb2.PredictComponentRequest(
+        project_name='proj',
+        text='foo baz foo foo')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    result = self.CallWrapped(self.features_svcr.PredictComponent, mc, request)
+
+    self.assertEqual(
+        common_pb2.ComponentRef(
+            path='Ruta>Baga'),
+        result.component_ref)
+
+  def testPredictComponent_NoPrediction(self):
+    """Test case when no component id was predicted."""
+    self._top_words = {
+        'foo': 0,
+        'bar': 1,
+        'baz': 2}
+    self._components_by_index = {
+        '0': '123',
+        '1': '456',
+        '2': '789'}
+    self._ml_engine.expected_features = [3, 0, 1, 0, 0]
+    self._ml_engine.scores = [5, 10, 3]
+
+    request = features_pb2.PredictComponentRequest(
+        project_name='proj',
+        text='foo baz foo foo')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    result = self.CallWrapped(self.features_svcr.PredictComponent, mc, request)
+
+    self.assertEqual(common_pb2.ComponentRef(), result.component_ref)
diff --git a/api/test/issues_servicer_test.py b/api/test/issues_servicer_test.py
new file mode 100644
index 0000000..2c46f7c
--- /dev/null
+++ b/api/test/issues_servicer_test.py
@@ -0,0 +1,2693 @@
+# Copyright 2018 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
+
+"""Tests for the issues servicer."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import sys
+import time
+import unittest
+from mock import ANY, Mock, patch
+
+from google.protobuf import empty_pb2
+
+from components.prpc import codes
+from components.prpc import context
+from components.prpc import server
+
+from api import issues_servicer
+from api import converters
+from api.api_proto import common_pb2
+from api.api_proto import issues_pb2
+from api.api_proto import issue_objects_pb2
+from api.api_proto import common_pb2
+from businesslogic import work_env
+from features import filterrules_helpers
+from features import send_notifications
+from framework import authdata
+from framework import exceptions
+from framework import framework_views
+from framework import monorailcontext
+from framework import permissions
+from search import frontendsearchpipeline
+from proto import tracker_pb2
+from proto import project_pb2
+from testing import fake
+from tracker import tracker_bizobj
+from services import service_manager
+from proto import tracker_pb2
+
+
+class IssuesServicerTest(unittest.TestCase):
+
+  NOW = 1234567890
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        features=fake.FeaturesService(),
+        issue=fake.IssueService(),
+        issue_star=fake.IssueStarService(),
+        project=fake.ProjectService(),
+        spam=fake.SpamService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=789, owner_ids=[111], contrib_ids=[222, 333])
+    self.user_1 = self.services.user.TestAddUser('owner@example.com', 111)
+    self.user_2 = self.services.user.TestAddUser('approver2@example.com', 222)
+    self.user_3 = self.services.user.TestAddUser('approver3@example.com', 333)
+    self.user_4 = self.services.user.TestAddUser('nonmember@example.com', 444)
+    self.issue_1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, project_name='proj',
+        opened_timestamp=self.NOW, issue_id=1001)
+    self.issue_2 = fake.MakeTestIssue(
+        789, 2, 'sum', 'New', 111, project_name='proj', issue_id=1002)
+    self.issue_1.blocked_on_iids.append(self.issue_2.issue_id)
+    self.issue_1.blocked_on_ranks.append(sys.maxint)
+    self.services.issue.TestAddIssue(self.issue_1)
+    self.services.issue.TestAddIssue(self.issue_2)
+    self.issues_svcr = issues_servicer.IssuesServicer(
+        self.services, make_rate_limiter=False)
+    self.prpc_context = context.ServicerContext()
+    self.prpc_context.set_code(server.StatusCode.OK)
+    self.auth = authdata.AuthData(user_id=333, email='approver3@example.com')
+
+    self.fd_1 = tracker_pb2.FieldDef(
+        field_name='FirstField', field_id=1,
+        field_type=tracker_pb2.FieldTypes.STR_TYPE,
+        applicable_type='')
+    self.fd_2 = tracker_pb2.FieldDef(
+        field_name='SecField', field_id=2,
+        field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        applicable_type='')
+    self.fd_3 = tracker_pb2.FieldDef(
+        field_name='LegalApproval', field_id=3,
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        applicable_type='')
+    self.fd_4 = tracker_pb2.FieldDef(
+        field_name='UserField', field_id=4,
+        field_type=tracker_pb2.FieldTypes.USER_TYPE,
+        applicable_type='')
+    self.fd_5 = tracker_pb2.FieldDef(
+        field_name='DogApproval', field_id=5,
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        applicable_type='')
+
+  def CallWrapped(self, wrapped_handler, *args, **kwargs):
+    return wrapped_handler.wrapped(self.issues_svcr, *args, **kwargs)
+
+  def testGetProjectIssueIDsAndConfig_OnlyOneProjectName(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    issue_refs = [
+        common_pb2.IssueRef(project_name='proj', local_id=1),
+        common_pb2.IssueRef(local_id=2),
+        common_pb2.IssueRef(project_name='proj', local_id=3),
+    ]
+    project, issue_ids, config = self.issues_svcr._GetProjectIssueIDsAndConfig(
+        mc, issue_refs)
+    self.assertEqual(project, self.project)
+    self.assertEqual(issue_ids, [self.issue_1.issue_id, self.issue_2.issue_id])
+    self.assertEqual(
+        config,
+        self.services.config.GetProjectConfig(
+            self.cnxn, self.project.project_id))
+
+  def testGetProjectIssueIDsAndConfig_NoProjectName(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    issue_refs = [
+        common_pb2.IssueRef(local_id=2),
+        common_pb2.IssueRef(local_id=3),
+    ]
+    with self.assertRaises(exceptions.InputException):
+      self.issues_svcr._GetProjectIssueIDsAndConfig(mc, issue_refs)
+
+  def testGetProjectIssueIDsAndConfig_MultipleProjectNames(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    issue_refs = [
+        common_pb2.IssueRef(project_name='proj', local_id=2),
+        common_pb2.IssueRef(project_name='proj2', local_id=3),
+    ]
+    with self.assertRaises(exceptions.InputException):
+      self.issues_svcr._GetProjectIssueIDsAndConfig(mc, issue_refs)
+
+  def testGetProjectIssueIDsAndConfig_MissingLocalId(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    issue_refs = [
+        common_pb2.IssueRef(project_name='proj'),
+        common_pb2.IssueRef(project_name='proj', local_id=3),
+    ]
+    with self.assertRaises(exceptions.InputException):
+      self.issues_svcr._GetProjectIssueIDsAndConfig(mc, issue_refs)
+
+  def testCreateIssue_Normal(self):
+    """We can create an issue."""
+    request = issues_pb2.CreateIssueRequest(
+        project_name='proj',
+        issue=issue_objects_pb2.Issue(
+            project_name='proj', local_id=1, summary='sum'))
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    response = self.CallWrapped(self.issues_svcr.CreateIssue, mc, request)
+
+    self.assertEqual('proj', response.project_name)
+
+  def testGetIssue_Normal(self):
+    """We can get an issue."""
+    request = issues_pb2.GetIssueRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    response = self.CallWrapped(self.issues_svcr.GetIssue, mc, request)
+
+    actual = response.issue
+    self.assertEqual('proj', actual.project_name)
+    self.assertEqual(1, actual.local_id)
+    self.assertEqual(1, len(actual.blocked_on_issue_refs))
+    self.assertEqual('proj', actual.blocked_on_issue_refs[0].project_name)
+    self.assertEqual(2, actual.blocked_on_issue_refs[0].local_id)
+
+  def testGetIssue_Moved(self):
+    """We can get a moved issue."""
+    self.services.project.TestAddProject(
+        'other', project_id=987, owner_ids=[111], contrib_ids=[111])
+    issue = fake.MakeTestIssue(987, 200, 'sum', 'New', 111, issue_id=1010)
+    self.services.issue.TestAddIssue(issue)
+    self.services.issue.TestAddMovedIssueRef(789, 404, 987, 200)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    request = issues_pb2.GetIssueRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 404
+
+    response = self.CallWrapped(self.issues_svcr.GetIssue, mc, request)
+
+    ref = response.moved_to_ref
+    self.assertEqual(200, ref.local_id)
+    self.assertEqual('other', ref.project_name)
+
+  @patch('search.frontendsearchpipeline.FrontendSearchPipeline')
+  def testListIssues(self, mock_pipeline):
+    """We can get a list of issues from a search."""
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com',
+        auth=self.auth)
+    users_by_id = framework_views.MakeAllUserViews(
+        mc.cnxn, self.services.user, [111])
+    config = self.services.config.GetProjectConfig(self.cnxn, 789)
+
+    instance = Mock(
+        spec=True, visible_results=[self.issue_1, self.issue_2],
+        users_by_id=users_by_id, harmonized_config=config,
+        pagination=Mock(total_count=2))
+    mock_pipeline.return_value = instance
+    instance.SearchForIIDs = Mock()
+    instance.MergeAndSortIssues = Mock()
+    instance.Paginate = Mock()
+
+    request = issues_pb2.ListIssuesRequest(query='',project_names=['proj'])
+    response = self.CallWrapped(self.issues_svcr.ListIssues, mc, request)
+
+    actual_issue_1 = response.issues[0]
+    self.assertEqual(actual_issue_1.owner_ref.user_id, 111)
+    self.assertEqual('owner@example.com', actual_issue_1.owner_ref.display_name)
+    self.assertEqual(actual_issue_1.local_id, 1)
+
+    actual_issue_2 = response.issues[1]
+    self.assertEqual(actual_issue_2.owner_ref.user_id, 111)
+    self.assertEqual('owner@example.com', actual_issue_2.owner_ref.display_name)
+    self.assertEqual(actual_issue_2.local_id, 2)
+    self.assertEqual(2, response.total_results)
+
+  # TODO(zhangtiff): Add tests for ListIssues + canned queries.
+
+  @patch('search.frontendsearchpipeline.FrontendSearchPipeline')
+  def testListIssues_IncludesAttachmentCount(self, mock_pipeline):
+    """Ensure ListIssues includes correct attachment counts."""
+
+    # Add an attachment to one of the issues so we can check attachment counts.
+    issue_3 = fake.MakeTestIssue(
+        789, 3, 'sum', 'New', 111, project_name='proj', issue_id=2003,
+        attachment_count=1)
+    issue_4 = fake.MakeTestIssue(
+        789, 4, 'sum', 'New', 111, project_name='proj', issue_id=2004,
+        attachment_count=-10)
+    self.services.issue.TestAddIssue(issue_3)
+    self.services.issue.TestAddIssue(issue_4)
+
+    # Request the list of issues.
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com',
+        auth=self.auth)
+    mc.LookupLoggedInUserPerms(self.project)
+
+    users_by_id = framework_views.MakeAllUserViews(
+        mc.cnxn, self.services.user, [111])
+    config = self.services.config.GetProjectConfig(self.cnxn, 789)
+    instance = Mock(
+        spec=True, visible_results=[
+            self.issue_1, self.issue_2, issue_3, issue_4],
+        users_by_id=users_by_id, harmonized_config=config,
+        pagination=Mock(total_count=4))
+    mock_pipeline.return_value = instance
+    instance.SearchForIIDs = Mock()
+    instance.MergeAndSortIssues = Mock()
+    instance.Paginate = Mock()
+
+    request = issues_pb2.ListIssuesRequest(query='', project_names=['proj'])
+    response = self.CallWrapped(self.issues_svcr.ListIssues, mc, request)
+
+    # Ensure attachment counts match what we expect.
+    actual_issue_1 = response.issues[0]
+    self.assertEqual(actual_issue_1.attachment_count, 0)
+    self.assertEqual(actual_issue_1.local_id, 1)
+
+    actual_issue_2 = response.issues[1]
+    self.assertEqual(actual_issue_2.attachment_count, 0)
+    self.assertEqual(actual_issue_2.local_id, 2)
+
+    actual_issue_3 = response.issues[2]
+    self.assertEqual(actual_issue_3.attachment_count, 1)
+    self.assertEqual(actual_issue_3.local_id, 3)
+
+    actual_issue_4 = response.issues[3]
+    # NOTE(pawalls): It is not possible to test for presence in Proto3. Instead
+    # we test for default value here though it is semantically different
+    # and not quite the behavior we care about.
+    self.assertEqual(actual_issue_4.attachment_count, 0)
+    self.assertEqual(actual_issue_4.local_id, 4)
+
+  @patch('search.frontendsearchpipeline.FrontendSearchPipeline')
+  def testListIssues_No_visible_results(self, mock_pipeline):
+    """Ensure ListIssues handles the no visible results case."""
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=None, auth=None)
+    users_by_id = framework_views.MakeAllUserViews(
+        mc.cnxn, self.services.user, [111])
+    config = self.services.config.GetProjectConfig(self.cnxn, 789)
+
+    instance = Mock(
+        spec=True,
+        users_by_id=users_by_id,
+        harmonized_config=config,
+        # When there are no results, these default to None.
+        visible_results=None,
+        pagination=None)
+    mock_pipeline.return_value = instance
+    instance.SearchForIIDs = Mock()
+    instance.MergeAndSortIssues = Mock()
+    instance.Paginate = Mock()
+
+    request = issues_pb2.ListIssuesRequest(query='', project_names=['proj'])
+    response = self.CallWrapped(self.issues_svcr.ListIssues, mc, request)
+
+    self.assertEqual(len(response.issues), 0)
+
+  def testListReferencedIssues(self):
+    """We can get the referenced issues that exist."""
+    self.services.project.TestAddProject(
+        'other-proj', project_id=788, owner_ids=[111])
+    other_issue = fake.MakeTestIssue(
+        788, 1, 'sum', 'Fixed', 111, project_name='other-proj', issue_id=78801)
+    self.services.issue.TestAddIssue(other_issue)
+    # We ignore project_names or local_ids that don't exist in our DB.
+    request = issues_pb2.ListReferencedIssuesRequest(
+        issue_refs=[
+            common_pb2.IssueRef(project_name='proj', local_id=1),
+            common_pb2.IssueRef(project_name='other-proj', local_id=1),
+            common_pb2.IssueRef(project_name='other-proj', local_id=2),
+            common_pb2.IssueRef(project_name='ghost-proj', local_id=1)
+            ]
+        )
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    response = self.CallWrapped(
+        self.issues_svcr.ListReferencedIssues, mc, request)
+    self.assertEqual(len(response.closed_refs), 1)
+    self.assertEqual(len(response.open_refs), 1)
+    self.assertEqual(
+        issue_objects_pb2.Issue(
+            local_id=1,
+            project_name='other-proj',
+            summary='sum',
+            status_ref=common_pb2.StatusRef(
+                status='Fixed'),
+            owner_ref=common_pb2.UserRef(
+                user_id=111,
+                display_name='owner@example.com'),
+            reporter_ref=common_pb2.UserRef(
+                user_id=111,
+                display_name='owner@example.com')),
+        response.closed_refs[0])
+    self.assertEqual(
+        issue_objects_pb2.Issue(
+            local_id=1,
+            project_name='proj',
+            summary='sum',
+            status_ref=common_pb2.StatusRef(
+                status='New',
+                means_open=True),
+            owner_ref=common_pb2.UserRef(
+                user_id=111,
+                display_name='owner@example.com'),
+            blocked_on_issue_refs=[common_pb2.IssueRef(
+                project_name='proj',
+                local_id=2)],
+            reporter_ref=common_pb2.UserRef(
+                user_id=111,
+                display_name='owner@example.com'),
+            opened_timestamp=self.NOW,
+            component_modified_timestamp=self.NOW,
+            status_modified_timestamp=self.NOW,
+            owner_modified_timestamp=self.NOW),
+        response.open_refs[0])
+
+  def testListReferencedIssues_MissingInput(self):
+    request = issues_pb2.ListReferencedIssuesRequest(
+        issue_refs=[common_pb2.IssueRef(local_id=1)])
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.ListReferencedIssues, mc, request)
+
+  def testListApplicableFieldDefs_EmptyIssueRefs(self):
+    request = issues_pb2.ListApplicableFieldDefsRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.issues_svcr.ListApplicableFieldDefs, mc, request)
+    self.assertEqual(response, issues_pb2.ListApplicableFieldDefsResponse())
+
+  def testListApplicableFieldDefs_CrossProjectRequest(self):
+    issue_refs = [common_pb2.IssueRef(project_name='proj', local_id=1),
+                  common_pb2.IssueRef(project_name='proj2', local_id=2)]
+    request = issues_pb2.ListApplicableFieldDefsRequest(issue_refs=issue_refs)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.ListApplicableFieldDefs, mc, request)
+
+  def testListApplicableFieldDefs_MissingProjectName(self):
+    issue_refs = [common_pb2.IssueRef(local_id=1),
+                  common_pb2.IssueRef(local_id=2)]
+    request = issues_pb2.ListApplicableFieldDefsRequest(issue_refs=issue_refs)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.ListApplicableFieldDefs, mc, request)
+
+  def testListApplicableFieldDefs_Normal(self):
+    self.issue_1.labels = ['Type-Feedback']
+    self.issue_2.approval_values = [
+        tracker_pb2.ApprovalValue(approval_id=self.fd_3.field_id)]
+    self.fd_1.applicable_type = 'Defect'  # not applicable
+    self.fd_2.applicable_type = 'feedback'  # applicable
+    self.fd_3.applicable_type = 'ignored'  # is APPROVAL_TYPE, applicable
+    self.fd_4.applicable_type = ''  # applicable
+    self.fd_5.applicable_type = ''  # is APPROVAl_TYPE, not applicable
+    config = tracker_pb2.ProjectIssueConfig(
+        project_id=789,
+        field_defs=[self.fd_1, self.fd_2, self.fd_3, self.fd_4, self.fd_5])
+    self.services.config.StoreConfig(self.cnxn, config)
+    issue_refs = [common_pb2.IssueRef(project_name='proj', local_id=1),
+                  common_pb2.IssueRef(project_name='proj', local_id=2)]
+    request = issues_pb2.ListApplicableFieldDefsRequest(issue_refs=issue_refs)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.issues_svcr.ListApplicableFieldDefs, mc, request)
+    converted_field_defs = [converters.ConvertFieldDef(fd, [], {}, config, True)
+                            for fd in [self.fd_2, self.fd_3, self.fd_4]]
+    self.assertEqual(response, issues_pb2.ListApplicableFieldDefsResponse(
+        field_defs=converted_field_defs))
+
+  def testUpdateIssue_Denied_Edit(self):
+    """We reject requests to update an issue when the user lacks perms."""
+    request = issues_pb2.UpdateIssueRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    request.delta.summary.value = 'new summary'
+
+    # Anon user can never update.
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    mc.LookupLoggedInUserPerms(self.project)
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.UpdateIssue, mc, request)
+
+    # Signed in user cannot view this issue.
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    self.issue_1.labels = ['Restrict-View-CoreTeam']
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.UpdateIssue, mc, request)
+
+    # Signed in user cannot edit this issue.
+    self.issue_1.labels = ['Restrict-EditIssue-CoreTeam']
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.UpdateIssue, mc, request)
+
+  @patch('features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_JustAComment(self, _fake_pasicn):
+    """We check AddIssueComment when the user is only commenting."""
+    request = issues_pb2.UpdateIssueRequest()
+    request.comment_content = 'Foo'
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    # Note: no delta.
+
+    # Anon user can never update.
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    mc.LookupLoggedInUserPerms(self.project)
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.UpdateIssue, mc, request)
+
+    # Signed in user cannot view this issue.
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    self.issue_1.labels = ['Restrict-View-CoreTeam']
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.UpdateIssue, mc, request)
+
+    # Signed in user cannot edit this issue, but they can still comment.
+    self.issue_1.labels = ['Restrict-EditIssue-CoreTeam']
+    self.CallWrapped(self.issues_svcr.UpdateIssue, mc, request)
+
+    # Signed in user cannot post even a text comment.
+    self.issue_1.labels = ['Restrict-AddIssueComment-CoreTeam']
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.UpdateIssue, mc, request)
+
+  @patch('features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_Normal(self, fake_pasicn):
+    """We can update an issue."""
+    request = issues_pb2.UpdateIssueRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    request.delta.summary.value = 'New summary'
+    request.delta.label_refs_add.extend([
+        common_pb2.LabelRef(label='Hot')])
+    request.comment_content = 'test comment'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    response = self.CallWrapped(self.issues_svcr.UpdateIssue, mc, request)
+
+    actual = response.issue
+    # Intended stuff was changed.
+    self.assertEqual(1, len(actual.label_refs))
+    self.assertEqual('Hot', actual.label_refs[0].label)
+    self.assertEqual('New summary', actual.summary)
+
+    # Other stuff didn't change.
+    self.assertEqual('proj', actual.project_name)
+    self.assertEqual(1, actual.local_id)
+    self.assertEqual(1, len(actual.blocked_on_issue_refs))
+    self.assertEqual('proj', actual.blocked_on_issue_refs[0].project_name)
+    self.assertEqual(2, actual.blocked_on_issue_refs[0].local_id)
+
+    # A comment was added.
+    fake_pasicn.assert_called_once()
+    comments = self.services.issue.GetCommentsForIssue(
+        self.cnxn, self.issue_1.issue_id)
+    self.assertEqual(2, len(comments))
+    self.assertEqual('test comment', comments[1].content)
+
+  @patch('features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_CommentOnly(self, fake_pasicn):
+    """We can update an issue with a comment w/o making any other changes."""
+    request = issues_pb2.UpdateIssueRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    request.comment_content = 'test comment'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    self.CallWrapped(self.issues_svcr.UpdateIssue, mc, request)
+
+    # A comment was added.
+    fake_pasicn.assert_called_once()
+    comments = self.services.issue.GetCommentsForIssue(
+        self.cnxn, self.issue_1.issue_id)
+    self.assertEqual(2, len(comments))
+    self.assertEqual('test comment', comments[1].content)
+    self.assertFalse(comments[1].is_description)
+
+  @patch('features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_CommentWithAttachments(self, fake_pasicn):
+    """We can update an issue with a comment and attachments."""
+    request = issues_pb2.UpdateIssueRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    request.comment_content = 'test comment'
+    request.uploads.extend([
+          issue_objects_pb2.AttachmentUpload(
+              filename='a.txt',
+              content='aaaaa')])
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    self.CallWrapped(self.issues_svcr.UpdateIssue, mc, request)
+
+    # A comment with an attachment was added.
+    fake_pasicn.assert_called_once()
+    comments = self.services.issue.GetCommentsForIssue(
+        self.cnxn, self.issue_1.issue_id)
+    self.assertEqual(2, len(comments))
+    self.assertEqual('test comment', comments[1].content)
+    self.assertFalse(comments[1].is_description)
+    self.assertEqual(1, len(comments[1].attachments))
+    self.assertEqual('a.txt', comments[1].attachments[0].filename)
+    self.assertEqual(5, self.project.attachment_bytes_used)
+
+  @patch('features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_Description(self, fake_pasicn):
+    """We can update an issue's description."""
+    request = issues_pb2.UpdateIssueRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    request.comment_content = 'new description'
+    request.is_description = True
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    self.CallWrapped(self.issues_svcr.UpdateIssue, mc, request)
+
+    # A comment was added.
+    fake_pasicn.assert_called_once()
+    comments = self.services.issue.GetCommentsForIssue(
+        self.cnxn, self.issue_1.issue_id)
+    self.assertEqual(2, len(comments))
+    self.assertEqual('new description', comments[1].content)
+    self.assertTrue(comments[1].is_description)
+
+  @patch('features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_NoOp(self, fake_pasicn):
+    """We gracefully ignore requests that have no delta or comment."""
+    request = issues_pb2.UpdateIssueRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    response = self.CallWrapped(self.issues_svcr.UpdateIssue, mc, request)
+
+    actual = response.issue
+    # Other stuff didn't change.
+    self.assertEqual('proj', actual.project_name)
+    self.assertEqual(1, actual.local_id)
+    self.assertEqual('sum', actual.summary)
+    self.assertEqual('New', actual.status_ref.status)
+
+    # No comment was added.
+    fake_pasicn.assert_not_called()
+    comments = self.services.issue.GetCommentsForIssue(
+        self.cnxn, self.issue_1.issue_id)
+    self.assertEqual(1, len(comments))
+
+  def testStarIssue_Denied(self):
+    """We reject requests to star an issue if the user lacks perms."""
+    request = issues_pb2.StarIssueRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    request.starred = True
+
+    # Anon user cannot star an issue.
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    mc.LookupLoggedInUserPerms(self.project)
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.StarIssue, mc, request)
+
+    # User star an issue that they cannot view.
+    self.issue_1.labels = ['Restrict-View-CoreTeam']
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.StarIssue, mc, request)
+
+    # The issue was not actually starred.
+    self.assertEqual(0, self.issue_1.star_count)
+
+  def testStarIssue_Normal(self):
+    """Users can star and unstar issues."""
+    request = issues_pb2.StarIssueRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    request.starred = True
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    # First, star it.
+    response = self.CallWrapped(self.issues_svcr.StarIssue, mc, request)
+    self.assertEqual(1, response.star_count)
+
+    # Then, unstar it.
+    request.starred = False
+    response = self.CallWrapped(self.issues_svcr.StarIssue, mc, request)
+    self.assertEqual(0, response.star_count)
+
+  def testIsIssueStared_Anon(self):
+    """Anon users can't star issues, so they always get back False."""
+    request = issues_pb2.IsIssueStarredRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    mc.LookupLoggedInUserPerms(self.project)
+
+    response = self.CallWrapped(self.issues_svcr.IsIssueStarred, mc, request)
+    self.assertFalse(response.is_starred)
+
+  def testIsIssueStared_Denied(self):
+    """Users can't ask about an issue that they cannot currently view."""
+    request = issues_pb2.IsIssueStarredRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    self.issue_1.labels = ['Restrict-View-CoreTeam']
+
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.IsIssueStarred, mc, request)
+
+  def testIsIssueStared_Normal(self):
+    """Users can star and unstar issues."""
+    request = issues_pb2.IsIssueStarredRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    # It is not initially starred by this user.
+    response = self.CallWrapped(self.issues_svcr.IsIssueStarred, mc, request)
+    self.assertFalse(response.is_starred)
+
+    # If we star it, we get response True.
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, 'fake config', self.issue_1.issue_id,
+        333, True)
+    response = self.CallWrapped(self.issues_svcr.IsIssueStarred, mc, request)
+    self.assertTrue(response.is_starred)
+
+  def testListStarredIssues_Anon(self):
+    """Users can't see their starred issues until they sign in."""
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    mc.LookupLoggedInUserPerms(self.project)
+
+    response = self.CallWrapped(self.issues_svcr.ListStarredIssues, mc, {})
+    # Assert that response has an empty list
+    self.assertEqual(0, len(response.starred_issue_refs))
+
+  def testListStarredIssues_Normal(self):
+    """User can access which issues they've starred."""
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    # First, star some issues
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, 'fake config', self.issue_1.issue_id,
+        333, True)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, 'fake config', self.issue_2.issue_id,
+        333, True)
+
+    # Now test that user can retrieve their star in a list
+    response = self.CallWrapped(self.issues_svcr.ListStarredIssues, mc, {})
+    self.assertEqual(2, len(response.starred_issue_refs))
+
+  def testListComments_Normal(self):
+    """We can get comments on an issue."""
+    comment = tracker_pb2.IssueComment(
+        user_id=111, timestamp=self.NOW, content='second',
+        project_id=789, issue_id=self.issue_1.issue_id, sequence=1)
+    self.services.issue.TestAddComment(comment, self.issue_1.local_id)
+    request = issues_pb2.ListCommentsRequest()
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    response = self.CallWrapped(self.issues_svcr.ListComments, mc, request)
+
+    actual_0 = response.comments[0]
+    actual_1 = response.comments[1]
+    expected_0 = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=0, is_deleted=False,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='owner@example.com'),
+        timestamp=self.NOW, content='sum', is_spam=False,
+        description_num=1, can_delete=True, can_flag=True)
+    expected_1 = issue_objects_pb2.Comment(
+        project_name='proj', local_id=1, sequence_num=1, is_deleted=False,
+        commenter=common_pb2.UserRef(
+            user_id=111, display_name='owner@example.com'),
+        timestamp=self.NOW, content='second', can_delete=True, can_flag=True)
+    self.assertEqual(expected_0, actual_0)
+    self.assertEqual(expected_1, actual_1)
+
+  def testListActivities_Normal(self):
+    """We can get issue activity."""
+    self.services.user.TestAddUser('user@example.com', 444)
+
+    config = tracker_pb2.ProjectIssueConfig(
+        project_id=789,
+        field_defs=[self.fd_1])
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    comment = tracker_pb2.IssueComment(
+        user_id=444, timestamp=self.NOW, content='c1',
+        project_id=789, issue_id=self.issue_1.issue_id, sequence=1)
+    self.services.issue.TestAddComment(comment, self.issue_1.local_id)
+
+    self.services.project.TestAddProject(
+        'proj2', project_id=790, owner_ids=[111], contrib_ids=[222, 333])
+    issue_2 = fake.MakeTestIssue(
+        790, 1, 'sum', 'New', 444, project_name='proj2',
+        opened_timestamp=self.NOW, issue_id=2001)
+    comment_2 = tracker_pb2.IssueComment(
+        user_id=444, timestamp=self.NOW, content='c2',
+        project_id=790, issue_id=issue_2.issue_id, sequence=1)
+    self.services.issue.TestAddComment(comment_2, issue_2.local_id)
+    self.services.issue.TestAddIssue(issue_2)
+
+    issue_3 = fake.MakeTestIssue(
+        790, 2, 'sum', 'New', 111, project_name='proj2',
+        opened_timestamp=self.NOW, issue_id=2002, labels=['Restrict-View-Foo'])
+    comment_3 = tracker_pb2.IssueComment(
+        user_id=444, timestamp=self.NOW, content='c3',
+        project_id=790, issue_id=issue_3.issue_id, sequence=1)
+    self.services.issue.TestAddComment(comment_3, issue_3.local_id)
+    self.services.issue.TestAddIssue(issue_3)
+
+    request = issues_pb2.ListActivitiesRequest()
+    request.user_ref.user_id = 444
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.issues_svcr.ListActivities, mc, request)
+
+    self.maxDiff = None
+    self.assertEqual([
+        issue_objects_pb2.Comment(
+            project_name='proj',
+            local_id=1,
+            commenter=common_pb2.UserRef(
+                user_id=444, display_name='user@example.com'),
+            timestamp=self.NOW,
+            content='c1',
+            sequence_num=1,
+            can_delete=True,
+            can_flag=True),
+        issue_objects_pb2.Comment(
+            project_name='proj2',
+            local_id=1,
+            commenter=common_pb2.UserRef(
+                user_id=444, display_name='user@example.com'),
+            timestamp=self.NOW,
+            content='sum',
+            description_num=1,
+            can_delete=True,
+            can_flag=True),
+        issue_objects_pb2.Comment(
+            project_name='proj2',
+            local_id=1,
+            commenter=common_pb2.UserRef(
+                user_id=444, display_name='user@example.com'),
+            timestamp=self.NOW,
+            content='c2',
+            sequence_num=1,
+            can_delete=True,
+            can_flag=True)],
+        sorted(
+            response.comments,
+            key=lambda c: (c.project_name, c.local_id, c.sequence_num)))
+    self.assertEqual([
+        issue_objects_pb2.IssueSummary(
+            project_name='proj',
+            local_id=1,
+            summary='sum'),
+        issue_objects_pb2.IssueSummary(
+            project_name='proj2',
+            local_id=1,
+            summary='sum')],
+        sorted(
+            response.issue_summaries,
+            key=lambda issue: (issue.project_name, issue.local_id)))
+
+  def testListActivities_Amendment(self):
+    self.services.user.TestAddUser('user@example.com', 444)
+
+    comment = tracker_pb2.IssueComment(
+        user_id=444,
+        timestamp=self.NOW,
+        amendments=[tracker_bizobj.MakeOwnerAmendment(111, 222)],
+        project_id=789,
+        issue_id=self.issue_1.issue_id,
+        content='',
+        sequence=1)
+    self.services.issue.TestAddComment(comment, self.issue_1.local_id)
+
+    request = issues_pb2.ListActivitiesRequest()
+    request.user_ref.user_id = 444
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.issues_svcr.ListActivities, mc, request)
+
+    self.assertEqual([
+        issue_objects_pb2.Comment(
+            project_name='proj',
+            local_id=1,
+            commenter=common_pb2.UserRef(
+                user_id=444, display_name='user@example.com'),
+            timestamp=self.NOW,
+            content='',
+            sequence_num=1,
+            amendments=[issue_objects_pb2.Amendment(
+                field_name="Owner",
+                new_or_delta_value="ow...@example.com")],
+            can_delete=True,
+            can_flag=True)],
+        sorted(
+            response.comments,
+            key=lambda c: (c.project_name, c.local_id, c.sequence_num)))
+    self.assertEqual([
+        issue_objects_pb2.IssueSummary(
+            project_name='proj',
+            local_id=1,
+            summary='sum')],
+        sorted(
+            response.issue_summaries,
+            key=lambda issue: (issue.project_name, issue.local_id)))
+
+  @patch('testing.fake.IssueService.SoftDeleteComment')
+  def testDeleteComment_Invalid(self, fake_softdeletecomment):
+    """We reject requests to delete a non-existent comment."""
+    # Note: no comments added to self.issue_1 after the description.
+    request = issues_pb2.DeleteCommentRequest(
+        issue_ref=common_pb2.IssueRef(project_name='proj', local_id=1),
+        sequence_num=2, delete=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    with self.assertRaises(exceptions.NoSuchCommentException):
+      self.CallWrapped(self.issues_svcr.DeleteComment, mc, request)
+
+    fake_softdeletecomment.assert_not_called()
+
+  def testDeleteComment_Normal(self):
+    """An authorized user can delete and undelete a comment."""
+    comment_1 = tracker_pb2.IssueComment(
+        project_id=789, issue_id=self.issue_1.issue_id, content='one')
+    self.services.issue.TestAddComment(comment_1, 1)
+    comment_2 = tracker_pb2.IssueComment(
+        project_id=789, issue_id=self.issue_1.issue_id, content='two',
+        user_id=222)
+    self.services.issue.TestAddComment(comment_2, 1)
+
+    # Delete a comment.
+    request = issues_pb2.DeleteCommentRequest(
+        issue_ref=common_pb2.IssueRef(project_name='proj', local_id=1),
+        sequence_num=2, delete=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    response = self.CallWrapped(self.issues_svcr.DeleteComment, mc, request)
+
+    self.assertTrue(isinstance(response, empty_pb2.Empty))
+    self.assertEqual(111, comment_2.deleted_by)
+
+    # Undelete a comment.
+    request.delete=False
+
+    response = self.CallWrapped(self.issues_svcr.DeleteComment, mc, request)
+
+    self.assertTrue(isinstance(response, empty_pb2.Empty))
+    self.assertEqual(None, comment_2.deleted_by)
+
+  @patch('testing.fake.IssueService.SoftDeleteComment')
+  def testDeleteComment_Denied(self, fake_softdeletecomment):
+    """An unauthorized user cannot delete a comment."""
+    comment_1 = tracker_pb2.IssueComment(
+        project_id=789, issue_id=self.issue_1.issue_id, content='one',
+        user_id=222)
+    self.services.issue.TestAddComment(comment_1, 1)
+
+    request = issues_pb2.DeleteCommentRequest(
+        issue_ref=common_pb2.IssueRef(project_name='proj', local_id=1),
+        sequence_num=1, delete=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com')
+
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.DeleteComment, mc, request)
+
+    fake_softdeletecomment.assert_not_called()
+    self.assertIsNone(comment_1.deleted_by)
+
+  def testUpdateApproval_MissingFieldDef(self):
+    """Missing Approval Field Def throwns exception."""
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    field_ref = common_pb2.FieldRef(field_name='LegalApproval')
+    approval_delta = issue_objects_pb2.ApprovalDelta(
+        status=issue_objects_pb2.REVIEW_REQUESTED)
+    request = issues_pb2.UpdateApprovalRequest(
+        issue_ref=issue_ref, field_ref=field_ref, approval_delta=approval_delta)
+
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com',
+        auth=self.auth)
+
+    with self.assertRaises(exceptions.NoSuchFieldDefException):
+      self.CallWrapped(self.issues_svcr.UpdateApproval, mc, request)
+
+  def testBulkUpdateApprovals_EmptyIssueRefs(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    request = issues_pb2.BulkUpdateApprovalsRequest(
+        field_ref=common_pb2.FieldRef(field_name='LegalApproval'),
+        approval_delta=issue_objects_pb2.ApprovalDelta())
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.BulkUpdateApprovals, mc, request)
+
+  def testBulkUpdateApprovals_NoProjectName(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    issue_refs = [common_pb2.IssueRef(local_id=1),
+                  common_pb2.IssueRef(local_id=2)]
+    request = issues_pb2.BulkUpdateApprovalsRequest(
+        issue_refs=issue_refs,
+        field_ref=common_pb2.FieldRef(field_name='LegalApproval'),
+        approval_delta=issue_objects_pb2.ApprovalDelta())
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.BulkUpdateApprovals, mc, request)
+
+  def testBulkUpdateApprovals_CrossProjectRequest(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    issue_refs = [common_pb2.IssueRef(project_name='p1', local_id=1),
+                  common_pb2.IssueRef(project_name='p2', local_id=2)]
+    request = issues_pb2.BulkUpdateApprovalsRequest(
+        issue_refs=issue_refs,
+        field_ref=common_pb2.FieldRef(field_name='LegalApproval'),
+        approval_delta=issue_objects_pb2.ApprovalDelta())
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.BulkUpdateApprovals, mc, request)
+
+  def testBulkUpdateApprovals_NoSuchFieldDef(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    issue_refs = [common_pb2.IssueRef(project_name='proj', local_id=1),
+                  common_pb2.IssueRef(project_name='proj', local_id=2)]
+    request = issues_pb2.BulkUpdateApprovalsRequest(
+        issue_refs=issue_refs,
+        field_ref=common_pb2.FieldRef(field_name='LegalApproval'),
+        approval_delta=issue_objects_pb2.ApprovalDelta())
+    with self.assertRaises(exceptions.NoSuchFieldDefException):
+      self.CallWrapped(self.issues_svcr.BulkUpdateApprovals, mc, request)
+
+  def testBulkUpdateApprovals_AnonDenied(self):
+    """Anon user cannot make any updates"""
+    config = tracker_pb2.ProjectIssueConfig(
+        project_id=789,
+        field_defs=[self.fd_3])
+    self.services.config.StoreConfig(self.cnxn, config)
+    field_ref = common_pb2.FieldRef(field_name='LegalApproval')
+    approval_delta = issue_objects_pb2.ApprovalDelta()
+    issue_refs = [common_pb2.IssueRef(project_name='proj', local_id=1),
+                  common_pb2.IssueRef(project_name='proj', local_id=2)]
+    request = issues_pb2.BulkUpdateApprovalsRequest(
+        issue_refs=issue_refs, field_ref=field_ref,
+        approval_delta=approval_delta)
+
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.BulkUpdateApprovals, mc, request)
+
+  def testBulkUpdateApprovals_UserLacksViewPerms(self):
+    """User who cannot view issue cannot update issue."""
+    config = tracker_pb2.ProjectIssueConfig(
+        project_id=789,
+        field_defs=[self.fd_3])
+    self.services.config.StoreConfig(self.cnxn, config)
+    field_ref = common_pb2.FieldRef(field_name='LegalApproval')
+    approval_delta = issue_objects_pb2.ApprovalDelta()
+    issue_refs = [common_pb2.IssueRef(project_name='proj', local_id=1),
+                  common_pb2.IssueRef(project_name='proj', local_id=2)]
+    request = issues_pb2.BulkUpdateApprovalsRequest(
+        issue_refs=issue_refs, field_ref=field_ref,
+        approval_delta=approval_delta)
+
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='nonmember@example.com')
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.BulkUpdateApprovals, mc, request)
+
+  @patch('time.time')
+  @patch('businesslogic.work_env.WorkEnv.BulkUpdateIssueApprovals')
+  @patch('businesslogic.work_env.WorkEnv.GetIssueRefs')
+  def testBulkUpdateApprovals_Normal(
+      self, mockGetIssueRefs, mockBulkUpdateIssueApprovals, mockTime):
+    """Issue approvals that can be updated are updated and returned."""
+    mockTime.return_value = 12345
+    mockGetIssueRefs.return_value = {1001: ('proj', 1), 1002: ('proj', 2)}
+    config = tracker_pb2.ProjectIssueConfig(
+        project_id=789,
+        field_defs=[self.fd_3])
+    self.services.config.StoreConfig(self.cnxn, config)
+    field_ref = common_pb2.FieldRef(field_name='LegalApproval')
+    issue_refs = [common_pb2.IssueRef(project_name='proj', local_id=1),
+                  common_pb2.IssueRef(project_name='proj', local_id=2)]
+    request = issues_pb2.BulkUpdateApprovalsRequest(
+        issue_refs=issue_refs, field_ref=field_ref,
+        approval_delta=issue_objects_pb2.ApprovalDelta(
+            status=issue_objects_pb2.APPROVED),
+        comment_content='new bulk comment')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='nonmember@example.com')
+    response = self.CallWrapped(
+        self.issues_svcr.BulkUpdateApprovals, mc, request)
+    self.assertEqual(
+        response,
+        issues_pb2.BulkUpdateApprovalsResponse(
+            issue_refs=[common_pb2.IssueRef(project_name='proj', local_id=1),
+                        common_pb2.IssueRef(project_name='proj', local_id=2)]))
+
+    approval_delta = tracker_pb2.ApprovalDelta(
+        status=tracker_pb2.ApprovalStatus.APPROVED,
+        setter_id=444, set_on=12345)
+    mockBulkUpdateIssueApprovals.assert_called_once_with(
+        [1001, 1002], 3, self.project, approval_delta,
+        'new bulk comment', send_email=False)
+
+  @patch('businesslogic.work_env.WorkEnv.BulkUpdateIssueApprovals')
+  @patch('businesslogic.work_env.WorkEnv.GetIssueRefs')
+  def testBulkUpdateApprovals_EmptyDelta(
+      self, mockGetIssueRefs, mockBulkUpdateIssueApprovals):
+    """Bulk update approval requests don't fail with an empty approval delta."""
+    mockGetIssueRefs.return_value = {1001: ('proj', 1)}
+    config = tracker_pb2.ProjectIssueConfig(
+        project_id=789,
+        field_defs=[self.fd_3])
+    self.services.config.StoreConfig(self.cnxn, config)
+    field_ref = common_pb2.FieldRef(field_name='LegalApproval')
+    issue_refs = [common_pb2.IssueRef(project_name='proj', local_id=1)]
+    request = issues_pb2.BulkUpdateApprovalsRequest(
+        issue_refs=issue_refs, field_ref=field_ref,
+        comment_content='new bulk comment',
+        send_email=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='nonmember@example.com')
+    self.CallWrapped(
+        self.issues_svcr.BulkUpdateApprovals, mc, request)
+
+    approval_delta = tracker_pb2.ApprovalDelta()
+    mockBulkUpdateIssueApprovals.assert_called_once_with(
+        [1001], 3, self.project, approval_delta,
+        'new bulk comment', send_email=True)
+
+
+  @patch('businesslogic.work_env.WorkEnv.UpdateIssueApproval')
+  @patch('features.send_notifications.PrepareAndSendApprovalChangeNotification')
+  def testUpdateApproval(self, _mockPrepareAndSend, mockUpdateIssueApproval):
+    """We can update an approval."""
+
+    av_3 = tracker_pb2.ApprovalValue(
+            approval_id=3,
+            status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW,
+            approver_ids=[333]
+    )
+    self.issue_1.approval_values = [av_3]
+
+    config = self.services.config.GetProjectConfig(
+        self.cnxn, 789)
+    config.field_defs = [self.fd_1, self.fd_3]
+
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    field_ref = common_pb2.FieldRef(field_name='LegalApproval')
+    approval_delta = issue_objects_pb2.ApprovalDelta(
+        status=issue_objects_pb2.REVIEW_REQUESTED,
+        approver_refs_add=[
+          common_pb2.UserRef(user_id=222, display_name='approver2@example.com')
+          ],
+        field_vals_add=[
+          issue_objects_pb2.FieldValue(
+              field_ref=common_pb2.FieldRef(field_name='FirstField'),
+              value='string')
+          ]
+    )
+
+    request = issues_pb2.UpdateApprovalRequest(
+        issue_ref=issue_ref, field_ref=field_ref, approval_delta=approval_delta,
+        comment_content='Well, actually'
+    )
+    request.issue_ref.project_name = 'proj'
+    request.issue_ref.local_id = 1
+    request.uploads.extend([
+          issue_objects_pb2.AttachmentUpload(
+              filename='a.txt',
+              content='aaaaa')])
+    request.kept_attachments.extend([1, 2, 3])
+    request.send_email = True
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com',
+        auth=self.auth)
+
+    mockUpdateIssueApproval.return_value = [
+        tracker_pb2.ApprovalValue(
+            approval_id=3,
+            status=tracker_pb2.ApprovalStatus.REVIEW_REQUESTED,
+            setter_id=333,
+            approver_ids=[333, 222]),
+        'comment_pb',
+        {},  # Fake issue.
+    ]
+
+    actual = self.CallWrapped(self.issues_svcr.UpdateApproval, mc, request)
+
+    expected = issues_pb2.UpdateApprovalResponse()
+    expected.approval.CopyFrom(
+      issue_objects_pb2.Approval(
+          field_ref=common_pb2.FieldRef(
+              field_id=3,
+              field_name='LegalApproval',
+              type=common_pb2.APPROVAL_TYPE),
+          approver_refs=[
+              common_pb2.UserRef(
+                  user_id=333, display_name='approver3@example.com'),
+              common_pb2.UserRef(
+                  user_id=222, display_name='approver2@example.com')
+              ],
+          status=issue_objects_pb2.REVIEW_REQUESTED,
+          setter_ref=common_pb2.UserRef(
+                  user_id=333, display_name='approver3@example.com'),
+          phase_ref=issue_objects_pb2.PhaseRef()
+      )
+      )
+
+    work_env.WorkEnv(mc, self.services).UpdateIssueApproval.\
+    assert_called_once_with(
+        self.issue_1.issue_id, 3, ANY, u'Well, actually', False,
+        attachments=[(u'a.txt', 'aaaaa', 'text/plain')], send_email=True,
+        kept_attachments=[1, 2, 3])
+    self.assertEqual(expected, actual)
+
+  @patch('businesslogic.work_env.WorkEnv.UpdateIssueApproval')
+  @patch('features.send_notifications.PrepareAndSendApprovalChangeNotification')
+  def testUpdateApproval_IsDescription(
+      self, _mockPrepareAndSend, mockUpdateIssueApproval):
+    """We can update an approval survey."""
+
+    av_3 = tracker_pb2.ApprovalValue(approval_id=3)
+    self.issue_1.approval_values = [av_3]
+
+    config = self.services.config.GetProjectConfig(self.cnxn, 789)
+    config.field_defs = [self.fd_3]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    field_ref = common_pb2.FieldRef(field_name='LegalApproval')
+    approval_delta = issue_objects_pb2.ApprovalDelta()
+
+    request = issues_pb2.UpdateApprovalRequest(
+        issue_ref=issue_ref, field_ref=field_ref, approval_delta=approval_delta,
+        comment_content='Better response.', is_description=True)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com',
+        auth=self.auth)
+
+    mockUpdateIssueApproval.return_value = [
+        tracker_pb2.ApprovalValue(approval_id=3),
+        'comment_pb',
+        {},  # Fake issue.
+    ]
+
+    actual = self.CallWrapped(self.issues_svcr.UpdateApproval, mc, request)
+
+    expected = issues_pb2.UpdateApprovalResponse()
+    expected.approval.CopyFrom(
+        issue_objects_pb2.Approval(
+            field_ref=common_pb2.FieldRef(
+                field_id=3,
+                field_name='LegalApproval',
+                type=common_pb2.APPROVAL_TYPE),
+            phase_ref=issue_objects_pb2.PhaseRef()
+        )
+    )
+
+    work_env.WorkEnv(mc, self.services
+    ).UpdateIssueApproval.assert_called_once_with(
+        self.issue_1.issue_id, 3,
+        tracker_pb2.ApprovalDelta(),
+        u'Better response.', True, attachments=[], send_email=False,
+        kept_attachments=[])
+    self.assertEqual(expected, actual)
+
+  @patch('businesslogic.work_env.WorkEnv.UpdateIssueApproval')
+  @patch('features.send_notifications.PrepareAndSendApprovalChangeNotification')
+  def testUpdateApproval_EmptyDelta(
+      self, _mockPrepareAndSend, mockUpdateIssueApproval):
+    self.issue_1.approval_values = [tracker_pb2.ApprovalValue(approval_id=3)]
+
+    config = self.services.config.GetProjectConfig(self.cnxn, 789)
+    config.field_defs = [self.fd_3]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    field_ref = common_pb2.FieldRef(field_name='LegalApproval')
+
+    request = issues_pb2.UpdateApprovalRequest(
+        issue_ref=issue_ref, field_ref=field_ref,
+        comment_content='Better response.', is_description=True)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com',
+        auth=self.auth)
+
+    mockUpdateIssueApproval.return_value = [
+        tracker_pb2.ApprovalValue(approval_id=3),
+        'comment_pb',
+        {},  # Fake issue.
+    ]
+
+    actual = self.CallWrapped(self.issues_svcr.UpdateApproval, mc, request)
+
+    approval_value = issue_objects_pb2.Approval(
+        field_ref=common_pb2.FieldRef(
+            field_id=3,
+            field_name='LegalApproval',
+            type=common_pb2.APPROVAL_TYPE),
+        phase_ref=issue_objects_pb2.PhaseRef()
+    )
+    expected = issues_pb2.UpdateApprovalResponse(approval=approval_value)
+    self.assertEqual(expected, actual)
+
+    mockUpdateIssueApproval.assert_called_once_with(
+        self.issue_1.issue_id, 3,
+        tracker_pb2.ApprovalDelta(),
+        u'Better response.', True, attachments=[], send_email=False,
+        kept_attachments=[])
+
+  @patch('businesslogic.work_env.WorkEnv.ConvertIssueApprovalsTemplate')
+  def testConvertIssueApprovalsTemplate(self, mockWorkEnvConvertApprovals):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com',
+        auth=self.auth)
+    request = issues_pb2.ConvertIssueApprovalsTemplateRequest(
+        issue_ref=common_pb2.IssueRef(project_name='proj', local_id=1),
+        template_name='template_name', comment_content='CHICKEN',
+        send_email=True)
+    response = self.CallWrapped(
+        self.issues_svcr.ConvertIssueApprovalsTemplate, mc, request)
+    config = self.services.config.GetProjectConfig(self.cnxn, 789)
+    mockWorkEnvConvertApprovals.assert_called_once_with(
+        config, self.issue_1, 'template_name', request.comment_content,
+        send_email=request.send_email)
+    self.assertEqual(
+        response.issue,
+        issue_objects_pb2.Issue(
+            project_name='proj',
+            local_id=1,
+            summary='sum',
+            owner_ref=common_pb2.UserRef(
+                user_id=111, display_name='owner@example.com'),
+            status_ref=common_pb2.StatusRef(status='New', means_open=True),
+            blocked_on_issue_refs=[
+                common_pb2.IssueRef(project_name='proj', local_id=2)],
+            reporter_ref=common_pb2.UserRef(
+                user_id=111, display_name='owner@example.com'),
+            opened_timestamp=self.NOW,
+            component_modified_timestamp=self.NOW,
+            status_modified_timestamp=self.NOW,
+            owner_modified_timestamp=self.NOW,
+            ))
+
+  def testConvertIssueApprovalsTemplate_MissingRequiredFields(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver3@example.com',
+        auth=self.auth)
+    request = issues_pb2.ConvertIssueApprovalsTemplateRequest(
+        issue_ref=common_pb2.IssueRef(project_name='proj', local_id=1))
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(
+          self.issues_svcr.ConvertIssueApprovalsTemplate, mc, request)
+
+    request = issues_pb2.ConvertIssueApprovalsTemplateRequest(
+        template_name='name')
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(
+          self.issues_svcr.ConvertIssueApprovalsTemplate, mc, request)
+
+  @patch('businesslogic.work_env.WorkEnv.SnapshotCountsQuery')
+  def testSnapshotCounts_RequiredFields(self, mockSnapshotCountsQuery):
+    """Test that timestamp is required at all times.
+    And that label_prefix is required when group_by is 'label'.
+    """
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    # Test timestamp is required.
+    request = issues_pb2.IssueSnapshotRequest(project_name='proj')
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.IssueSnapshot, mc, request)
+
+    # Test project_name or hotlist_id is required.
+    request = issues_pb2.IssueSnapshotRequest(timestamp=1531334109)
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.IssueSnapshot, mc, request)
+
+    # Test label_prefix is required when group_by is 'label'.
+    request = issues_pb2.IssueSnapshotRequest(timestamp=1531334109,
+        project_name='proj', group_by='label')
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.IssueSnapshot, mc, request)
+
+    mockSnapshotCountsQuery.assert_not_called()
+
+  @patch('businesslogic.work_env.WorkEnv.SnapshotCountsQuery')
+  def testSnapshotCounts_Basic(self, mockSnapshotCountsQuery):
+    """Tests the happy path case."""
+    request = issues_pb2.IssueSnapshotRequest(
+        timestamp=1531334109, project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mockSnapshotCountsQuery.return_value = ({'total': 123}, [], True)
+
+    response = self.CallWrapped(self.issues_svcr.IssueSnapshot, mc, request)
+
+    self.assertEqual(123, response.snapshot_count[0].count)
+    self.assertEqual(0, len(response.unsupported_field))
+    self.assertTrue(response.search_limit_reached)
+    mockSnapshotCountsQuery.assert_called_once_with(self.project, 1531334109,
+      '', query=None, canned_query=None, label_prefix='', hotlist=None)
+
+  @patch('businesslogic.work_env.WorkEnv.SnapshotCountsQuery')
+  @patch('search.searchpipeline.ReplaceKeywordsWithUserIDs')
+  @patch('features.savedqueries_helpers.SavedQueryIDToCond')
+  def testSnapshotCounts_ReplacesKeywords(self, mockSavedQueryIDToCond,
+                                          mockReplaceKeywordsWithUserIDs,
+                                          mockSnapshotCountsQuery):
+    """Tests that canned query is unpacked and keywords in query and canned
+    query are replaced with user IDs."""
+    request = issues_pb2.IssueSnapshotRequest(timestamp=1531334109,
+        project_name='proj', query='owner:me', canned_query=3)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mockSavedQueryIDToCond.return_value = 'cc:me'
+    mockReplaceKeywordsWithUserIDs.side_effect = [
+        ('cc:2345', []), ('owner:1234', [])]
+    mockSnapshotCountsQuery.return_value = ({'total': 789}, [], False)
+
+    response = self.CallWrapped(self.issues_svcr.IssueSnapshot, mc, request)
+
+    self.assertEqual(789, response.snapshot_count[0].count)
+    self.assertEqual(0, len(response.unsupported_field))
+    self.assertFalse(response.search_limit_reached)
+    mockSnapshotCountsQuery.assert_called_once_with(self.project, 1531334109,
+      '', query='owner:1234', canned_query='cc:2345', label_prefix='',
+      hotlist=None)
+
+  @patch('businesslogic.work_env.WorkEnv.SnapshotCountsQuery')
+  def testSnapshotCounts_GroupByLabel(self, mockSnapshotCountsQuery):
+    """Tests grouping by label with label_prefix and a query.
+    But no canned_query.
+    """
+    request = issues_pb2.IssueSnapshotRequest(timestamp=1531334109,
+        project_name='proj', group_by='label', label_prefix='Type',
+        query='rutabaga:rutabaga')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mockSnapshotCountsQuery.return_value = (
+        {'label1': 123, 'label2': 987},
+        ['rutabaga'],
+        True)
+
+    response = self.CallWrapped(self.issues_svcr.IssueSnapshot, mc, request)
+
+    self.assertEqual(2, len(response.snapshot_count))
+    self.assertEqual('label1', response.snapshot_count[0].dimension)
+    self.assertEqual(123, response.snapshot_count[0].count)
+    self.assertEqual('label2', response.snapshot_count[1].dimension)
+    self.assertEqual(987, response.snapshot_count[1].count)
+    self.assertEqual(1, len(response.unsupported_field))
+    self.assertEqual('rutabaga', response.unsupported_field[0])
+    self.assertTrue(response.search_limit_reached)
+    mockSnapshotCountsQuery.assert_called_once_with(self.project, 1531334109,
+        'label', label_prefix='Type', query='rutabaga:rutabaga',
+        canned_query=None, hotlist=None)
+
+  @patch('businesslogic.work_env.WorkEnv.SnapshotCountsQuery')
+  def testSnapshotCounts_GroupByComponent(self, mockSnapshotCountsQuery):
+    """Tests grouping by component with a query and a canned_query."""
+    request = issues_pb2.IssueSnapshotRequest(timestamp=1531334109,
+        project_name='proj', group_by='component',
+        query='rutabaga:rutabaga', canned_query=2)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mockSnapshotCountsQuery.return_value = (
+        {'component1': 123, 'component2': 987},
+        ['rutabaga'],
+        True)
+
+    response = self.CallWrapped(self.issues_svcr.IssueSnapshot, mc, request)
+
+    self.assertEqual(2, len(response.snapshot_count))
+    self.assertEqual('component1', response.snapshot_count[0].dimension)
+    self.assertEqual(123, response.snapshot_count[0].count)
+    self.assertEqual('component2', response.snapshot_count[1].dimension)
+    self.assertEqual(987, response.snapshot_count[1].count)
+    self.assertEqual(1, len(response.unsupported_field))
+    self.assertEqual('rutabaga', response.unsupported_field[0])
+    self.assertTrue(response.search_limit_reached)
+    mockSnapshotCountsQuery.assert_called_once_with(self.project, 1531334109,
+        'component', label_prefix='', query='rutabaga:rutabaga',
+        canned_query='is:open', hotlist=None)
+
+  @patch('businesslogic.work_env.WorkEnv.SnapshotCountsQuery')
+  def testSnapshotCounts_GroupByOpen(self, mockSnapshotCountsQuery):
+    """Tests grouping by open with a query."""
+    request = issues_pb2.IssueSnapshotRequest(
+        timestamp=1531334109, project_name='proj', group_by='open')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mockSnapshotCountsQuery.return_value = (
+        {'Opened': 100, 'Closed': 23}, [], True)
+
+    response = self.CallWrapped(self.issues_svcr.IssueSnapshot, mc, request)
+
+    self.assertEqual(2, len(response.snapshot_count))
+    self.assertEqual('Opened', response.snapshot_count[0].dimension)
+    self.assertEqual(100, response.snapshot_count[0].count)
+    self.assertEqual('Closed', response.snapshot_count[1].dimension)
+    self.assertEqual(23, response.snapshot_count[1].count)
+    mockSnapshotCountsQuery.assert_called_once_with(self.project, 1531334109,
+        'open', label_prefix='', query=None, canned_query=None, hotlist=None)
+
+  @patch('businesslogic.work_env.WorkEnv.SnapshotCountsQuery')
+  def testSnapshotCounts_GroupByStatus(self, mockSnapshotCountsQuery):
+    """Tests grouping by status with a query."""
+    request = issues_pb2.IssueSnapshotRequest(
+        timestamp=1531334109, project_name='proj', group_by='status')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mockSnapshotCountsQuery.return_value = (
+        {'Accepted': 100, 'Fixed': 23}, [], True)
+
+    response = self.CallWrapped(self.issues_svcr.IssueSnapshot, mc, request)
+
+    self.assertEqual(2, len(response.snapshot_count))
+    self.assertEqual('Fixed', response.snapshot_count[0].dimension)
+    self.assertEqual(23, response.snapshot_count[0].count)
+    self.assertEqual('Accepted', response.snapshot_count[1].dimension)
+    self.assertEqual(100, response.snapshot_count[1].count)
+    mockSnapshotCountsQuery.assert_called_once_with(self.project, 1531334109,
+        'status', label_prefix='', query=None, canned_query=None, hotlist=None)
+
+  @patch('businesslogic.work_env.WorkEnv.SnapshotCountsQuery')
+  def testSnapshotCounts_GroupByOwner(self, mockSnapshotCountsQuery):
+    """Tests grouping by status with a query."""
+    request = issues_pb2.IssueSnapshotRequest(
+        timestamp=1531334109, project_name='proj', group_by='owner')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mockSnapshotCountsQuery.return_value = ({111: 100}, [], True)
+
+    response = self.CallWrapped(self.issues_svcr.IssueSnapshot, mc, request)
+
+    self.assertEqual(1, len(response.snapshot_count))
+    self.assertEqual('owner@example.com', response.snapshot_count[0].dimension)
+    self.assertEqual(100, response.snapshot_count[0].count)
+    mockSnapshotCountsQuery.assert_called_once_with(self.project, 1531334109,
+        'owner', label_prefix='', query=None, canned_query=None, hotlist=None)
+
+  @patch('businesslogic.work_env.WorkEnv.GetHotlist')
+  @patch('businesslogic.work_env.WorkEnv.SnapshotCountsQuery')
+  def testSnapshotCounts_WithHotlist(self, mockSnapshotCountsQuery,
+                                     mockGetHotlist):
+    """Tests grouping by status with a hotlist."""
+    request = issues_pb2.IssueSnapshotRequest(
+        timestamp=1531334109, hotlist_id=19191)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mockSnapshotCountsQuery.return_value = ({'total': 123}, [], True)
+    fake_hotlist = fake.Hotlist('hotlist_rutabaga', 19191)
+    mockGetHotlist.return_value = fake_hotlist
+
+    response = self.CallWrapped(self.issues_svcr.IssueSnapshot, mc, request)
+
+    self.assertEqual(1, len(response.snapshot_count))
+    self.assertEqual('total', response.snapshot_count[0].dimension)
+    self.assertEqual(123, response.snapshot_count[0].count)
+    mockSnapshotCountsQuery.assert_called_once_with(None, 1531334109,
+        '', label_prefix='', query=None, canned_query=None,
+        hotlist=fake_hotlist)
+
+  def AddField(self, name, field_type_str):
+    kwargs = {
+        'cnxn': self.cnxn,
+        'project_id': self.project.project_id,
+        'field_name': name,
+        'field_type_str': field_type_str}
+    kwargs.update(
+        {
+            arg: None for arg in (
+                'applic_type', 'applic_pred', 'is_required', 'is_niche',
+                'is_multivalued', 'min_value', 'max_value', 'regex',
+                'needs_member', 'needs_perm', 'grants_perm', 'notify_on',
+                'date_action_str', 'docstring')
+        })
+    kwargs.update({arg: [] for arg in ('admin_ids', 'editor_ids')})
+
+    return self.services.config.CreateFieldDef(**kwargs)
+
+  @patch('testing.fake.FeaturesService.GetFilterRules')
+  def testPresubmitIssue_NoDerivedFields(self, mockGetFilterRules):
+    """When no rules match, we respond with just owner availability."""
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    issue_delta = issue_objects_pb2.IssueDelta(
+        owner_ref=common_pb2.UserRef(user_id=111),
+        label_refs_add=[common_pb2.LabelRef(label='foo')])
+
+    mockGetFilterRules.return_value = [
+        filterrules_helpers.MakeRule('label:bar', add_labels=['baz'])]
+
+    request = issues_pb2.PresubmitIssueRequest(
+        issue_ref=issue_ref, issue_delta=issue_delta)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.issues_svcr.PresubmitIssue, mc, request)
+
+    self.assertEqual(
+        issues_pb2.PresubmitIssueResponse(
+            owner_availability="User never visited",
+            owner_availability_state="never"),
+        response)
+
+  @patch('testing.fake.FeaturesService.GetFilterRules')
+  def testPresubmitIssue_IncompleteOwnerEmail(self, mockGetFilterRules):
+    """User is in the process of typing in the proposed owner."""
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    issue_delta = issue_objects_pb2.IssueDelta(
+        owner_ref=common_pb2.UserRef(display_name='owner@examp'))
+
+    mockGetFilterRules.return_value = []
+    request = issues_pb2.PresubmitIssueRequest(
+        issue_ref=issue_ref, issue_delta=issue_delta)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    actual = self.CallWrapped(self.issues_svcr.PresubmitIssue, mc, request)
+
+    self.assertEqual(
+        issues_pb2.PresubmitIssueResponse(),
+        actual)
+
+  @patch('testing.fake.FeaturesService.GetFilterRules')
+  def testPresubmitIssue_NewIssue(self, mockGetFilterRules):
+    """Proposed owner has a vacation message set."""
+    self.user_1.vacation_message = 'In Galapagos Islands'
+    issue_ref = common_pb2.IssueRef(project_name='proj')
+    issue_delta = issue_objects_pb2.IssueDelta(
+        owner_ref=common_pb2.UserRef(user_id=111),
+        label_refs_add=[common_pb2.LabelRef(label='foo')])
+
+    mockGetFilterRules.return_value = []
+
+    request = issues_pb2.PresubmitIssueRequest(
+        issue_ref=issue_ref, issue_delta=issue_delta)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.issues_svcr.PresubmitIssue, mc, request)
+
+    self.assertEqual(
+        issues_pb2.PresubmitIssueResponse(
+            owner_availability='In Galapagos Islands',
+            owner_availability_state='none'),
+        response)
+
+  @patch('testing.fake.FeaturesService.GetFilterRules')
+  def testPresubmitIssue_OwnerVacation(self, mockGetFilterRules):
+    """Proposed owner has a vacation message set."""
+    self.user_1.vacation_message = 'In Galapagos Islands'
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    issue_delta = issue_objects_pb2.IssueDelta(
+        owner_ref=common_pb2.UserRef(user_id=111),
+        label_refs_add=[common_pb2.LabelRef(label='foo')])
+
+    mockGetFilterRules.return_value = []
+
+    request = issues_pb2.PresubmitIssueRequest(
+        issue_ref=issue_ref, issue_delta=issue_delta)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.issues_svcr.PresubmitIssue, mc, request)
+
+    self.assertEqual(
+        issues_pb2.PresubmitIssueResponse(
+            owner_availability='In Galapagos Islands',
+            owner_availability_state='none'),
+        response)
+
+  @patch('testing.fake.FeaturesService.GetFilterRules')
+  def testPresubmitIssue_OwnerIsAvailable(self, mockGetFilterRules):
+    """Proposed owner not on vacation and has visited recently."""
+    self.user_1.last_visit_timestamp = int(time.time())
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    issue_delta = issue_objects_pb2.IssueDelta(
+        owner_ref=common_pb2.UserRef(user_id=111),
+        label_refs_add=[common_pb2.LabelRef(label='foo')])
+
+    mockGetFilterRules.return_value = []
+
+    request = issues_pb2.PresubmitIssueRequest(
+        issue_ref=issue_ref, issue_delta=issue_delta)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.issues_svcr.PresubmitIssue, mc, request)
+
+    self.assertEqual(
+        issues_pb2.PresubmitIssueResponse(
+            owner_availability='',
+            owner_availability_state=''),
+        response)
+
+  @patch('testing.fake.FeaturesService.GetFilterRules')
+  def testPresubmitIssue_DerivedLabels(self, mockGetFilterRules):
+    """Test that we can match label rules and return derived labels."""
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    issue_delta = issue_objects_pb2.IssueDelta(
+        owner_ref=common_pb2.UserRef(user_id=111),
+        label_refs_add=[common_pb2.LabelRef(label='foo')])
+
+    mockGetFilterRules.return_value = [
+        filterrules_helpers.MakeRule('label:foo', add_labels=['bar', 'baz'])]
+
+    request = issues_pb2.PresubmitIssueRequest(
+        issue_ref=issue_ref, issue_delta=issue_delta)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.issues_svcr.PresubmitIssue, mc, request)
+
+    self.assertEqual(
+        [common_pb2.ValueAndWhy(
+            value='bar',
+            why='Added by rule: IF label:foo THEN ADD LABEL'),
+         common_pb2.ValueAndWhy(
+            value='baz',
+            why='Added by rule: IF label:foo THEN ADD LABEL')],
+        [vnw for vnw in response.derived_labels])
+
+  @patch('testing.fake.FeaturesService.GetFilterRules')
+  def testPresubmitIssue_DerivedOwner(self, mockGetFilterRules):
+    """Test that we can match component rules and return derived owners."""
+    self.services.config.CreateComponentDef(
+        self.cnxn, self.project.project_id, 'Foo', 'Foo Docstring', False,
+        [], [], 0, 111, [])
+    self.issue_1.owner_id = 0
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    issue_delta = issue_objects_pb2.IssueDelta(
+        comp_refs_add=[common_pb2.ComponentRef(path='Foo')])
+
+    mockGetFilterRules.return_value = [
+        filterrules_helpers.MakeRule('component:Foo', default_owner_id=222)]
+
+    request = issues_pb2.PresubmitIssueRequest(
+        issue_ref=issue_ref, issue_delta=issue_delta)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.issues_svcr.PresubmitIssue, mc, request)
+
+    self.assertEqual(
+        [common_pb2.ValueAndWhy(
+            value='approver2@example.com',
+            why='Added by rule: IF component:Foo THEN SET DEFAULT OWNER')],
+        [vnw for vnw in response.derived_owners])
+
+  @patch('testing.fake.FeaturesService.GetFilterRules')
+  def testPresubmitIssue_DerivedCCs(self, mockGetFilterRules):
+    """Test that we can match field rules and return derived cc emails."""
+    field_id = self.AddField('Foo', 'ENUM_TYPE')
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    issue_delta = issue_objects_pb2.IssueDelta(
+        owner_ref=common_pb2.UserRef(user_id=111),
+        field_vals_add=[issue_objects_pb2.FieldValue(
+            value='Bar', field_ref=common_pb2.FieldRef(field_id=field_id))])
+
+    mockGetFilterRules.return_value = [
+        filterrules_helpers.MakeRule('Foo=Bar', add_cc_ids=[222, 333])]
+
+    request = issues_pb2.PresubmitIssueRequest(
+        issue_ref=issue_ref, issue_delta=issue_delta)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.issues_svcr.PresubmitIssue, mc, request)
+
+    self.assertEqual(
+        [common_pb2.ValueAndWhy(
+            value='approver2@example.com',
+            why='Added by rule: IF Foo=Bar THEN ADD CC'),
+         common_pb2.ValueAndWhy(
+            value='approver3@example.com',
+            why='Added by rule: IF Foo=Bar THEN ADD CC')],
+        [vnw for vnw in response.derived_ccs])
+
+  @patch('testing.fake.FeaturesService.GetFilterRules')
+  def testPresubmitIssue_DerivedCCsNonMember(self, mockGetFilterRules):
+    """Test that we can return obscured cc emails to non-members."""
+    field_id = self.AddField('Foo', 'ENUM_TYPE')
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    issue_delta = issue_objects_pb2.IssueDelta(
+        owner_ref=common_pb2.UserRef(user_id=111),
+        field_vals_add=[issue_objects_pb2.FieldValue(
+            value='Bar', field_ref=common_pb2.FieldRef(field_id=field_id))])
+
+    mockGetFilterRules.return_value = [
+        filterrules_helpers.MakeRule('Foo=Bar', add_cc_ids=[222, 333])]
+
+    request = issues_pb2.PresubmitIssueRequest(
+        issue_ref=issue_ref, issue_delta=issue_delta)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='nonmember@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.issues_svcr.PresubmitIssue, mc, request)
+
+    self.assertEqual(
+        [
+            common_pb2.ValueAndWhy(
+                value='appro...@example.com',
+                why='Added by rule: IF Foo=Bar THEN ADD CC'),
+            common_pb2.ValueAndWhy(
+                value='appro...@example.com',
+                why='Added by rule: IF Foo=Bar THEN ADD CC')
+        ], [vnw for vnw in response.derived_ccs])
+
+  @patch('testing.fake.FeaturesService.GetFilterRules')
+  def testPresubmitIssue_Warnings(self, mockGetFilterRules):
+    """Test that we can match owner rules and return warnings."""
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    issue_delta = issue_objects_pb2.IssueDelta(
+        owner_ref=common_pb2.UserRef(user_id=111))
+
+    mockGetFilterRules.return_value = [
+        filterrules_helpers.MakeRule(
+            'owner:owner@example.com', warning='Owner is too busy')]
+
+    request = issues_pb2.PresubmitIssueRequest(
+        issue_ref=issue_ref, issue_delta=issue_delta)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.issues_svcr.PresubmitIssue, mc, request)
+
+    self.assertEqual(
+        [common_pb2.ValueAndWhy(
+            value='Owner is too busy',
+            why='Added by rule: IF owner:owner@example.com THEN ADD WARNING')],
+        [vnw for vnw in response.warnings])
+
+  @patch('testing.fake.FeaturesService.GetFilterRules')
+  def testPresubmitIssue_Errors(self, mockGetFilterRules):
+    """Test that we can match owner rules and return errors."""
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    issue_delta = issue_objects_pb2.IssueDelta(
+        owner_ref=common_pb2.UserRef(user_id=222),
+        cc_refs_add=[
+            common_pb2.UserRef(user_id=111),
+            common_pb2.UserRef(user_id=333)])
+
+    mockGetFilterRules.return_value = [
+        filterrules_helpers.MakeRule(
+            'cc:owner@example.com', error='Owner is not to be disturbed')]
+
+    request = issues_pb2.PresubmitIssueRequest(
+        issue_ref=issue_ref, issue_delta=issue_delta)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.issues_svcr.PresubmitIssue, mc, request)
+
+    self.assertEqual(
+        [common_pb2.ValueAndWhy(
+            value='Owner is not to be disturbed',
+            why='Added by rule: IF cc:owner@example.com THEN ADD ERROR')],
+        [vnw for vnw in response.errors])
+
+  @patch('testing.fake.FeaturesService.GetFilterRules')
+  def testPresubmitIssue_Errors_ExistingOwner(self, mockGetFilterRules):
+    """Test that we apply the rules to the issue + delta, not only delta."""
+    issue_ref = common_pb2.IssueRef(project_name='proj', local_id=1)
+    issue_delta = issue_objects_pb2.IssueDelta()
+
+    mockGetFilterRules.return_value = [
+        filterrules_helpers.MakeRule(
+            'owner:owner@example.com', error='Owner is not to be disturbed')]
+
+    request = issues_pb2.PresubmitIssueRequest(
+        issue_ref=issue_ref, issue_delta=issue_delta)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.issues_svcr.PresubmitIssue, mc, request)
+
+    self.assertEqual(
+        [common_pb2.ValueAndWhy(
+            value='Owner is not to be disturbed',
+            why='Added by rule: IF owner:owner@example.com THEN ADD ERROR')],
+        [vnw for vnw in response.errors])
+
+  def testRerankBlockedOnIssues_SplitBelow(self):
+    issues = []
+    for idx in range(3, 6):
+      issues.append(fake.MakeTestIssue(
+          789, idx, 'sum', 'New', 111, project_name='proj', issue_id=1000+idx))
+      self.services.issue.TestAddIssue(issues[-1])
+      self.issue_1.blocked_on_iids.append(issues[-1].issue_id)
+      self.issue_1.blocked_on_ranks.append(self.issue_1.blocked_on_ranks[-1]-1)
+
+    request = issues_pb2.RerankBlockedOnIssuesRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        moved_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=2),
+        target_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=4),
+        split_above=False)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.issues_svcr.RerankBlockedOnIssues, mc, request)
+
+    self.assertEqual(
+        [3, 4, 2, 5],
+        [blocked_on_ref.local_id
+         for blocked_on_ref in response.blocked_on_issue_refs])
+
+  def testRerankBlockedOnIssues_SplitAbove(self):
+    self.project.committer_ids.append(222)
+    issues = []
+    for idx in range(3, 6):
+      issues.append(fake.MakeTestIssue(
+          789, idx, 'sum', 'New', 111, project_name='proj', issue_id=1000+idx))
+      self.services.issue.TestAddIssue(issues[-1])
+      self.issue_1.blocked_on_iids.append(issues[-1].issue_id)
+      self.issue_1.blocked_on_ranks.append(self.issue_1.blocked_on_ranks[-1]-1)
+
+    request = issues_pb2.RerankBlockedOnIssuesRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        moved_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=2),
+        target_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=4),
+        split_above=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver2@example.com')
+    response = self.CallWrapped(
+        self.issues_svcr.RerankBlockedOnIssues, mc, request)
+
+    self.assertEqual(
+        [3, 2, 4, 5],
+        [blocked_on_ref.local_id
+         for blocked_on_ref in response.blocked_on_issue_refs])
+
+  def testRerankBlockedOnIssues_CantEditIssue(self):
+    self.project.committer_ids.append(222)
+    issues = []
+    for idx in range(3, 6):
+      issues.append(fake.MakeTestIssue(
+          789, idx, 'sum', 'New', 111, project_name='proj', issue_id=1000+idx))
+      self.services.issue.TestAddIssue(issues[-1])
+      self.issue_1.blocked_on_iids.append(issues[-1].issue_id)
+      self.issue_1.blocked_on_ranks.append(self.issue_1.blocked_on_ranks[-1]-1)
+
+    self.issue_1.labels = ['Restrict-EditIssue-Foo']
+
+    request = issues_pb2.RerankBlockedOnIssuesRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        moved_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=2),
+        target_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=4),
+        split_above=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver2@example.com')
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.RerankBlockedOnIssues, mc, request)
+
+  def testRerankBlockedOnIssues_ComplexPermissions(self):
+    """We can rerank blocked on issues, regardless of perms on other issues.
+
+    If Issue 1 is blocked on Issue 3 and Issue 4, we should be able to reorder
+    them as long as we have permission to edit Issue 1, even if we don't have
+    permission to view or edit Issues 3 or 4.
+    """
+    # Issue 3 is in proj2, which we don't have access to.
+    project_2 = self.services.project.TestAddProject(
+        'proj2', project_id=790, owner_ids=[222], contrib_ids=[333])
+    project_2.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    issue_3 = fake.MakeTestIssue(
+        790, 3, 'sum', 'New', 111, project_name='proj2', issue_id=1003)
+
+    # Issue 4 requires a permission we don't have in order to edit it.
+    issue_4 = fake.MakeTestIssue(
+        789, 4, 'sum', 'New', 111, project_name='proj', issue_id=1004)
+    issue_4.labels = ['Restrict-EditIssue-Foo']
+
+    self.services.issue.TestAddIssue(issue_3)
+    self.services.issue.TestAddIssue(issue_4)
+
+    self.issue_1.blocked_on_iids = [1003, 1004]
+    self.issue_1.blocked_on_ranks = [2, 1]
+
+    request = issues_pb2.RerankBlockedOnIssuesRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        moved_ref=common_pb2.IssueRef(
+            project_name='proj2',
+            local_id=3),
+        target_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=4),
+        split_above=False)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.issues_svcr.RerankBlockedOnIssues, mc, request)
+
+    self.assertEqual(
+        [4, 3],
+        [blocked_on_ref.local_id
+         for blocked_on_ref in response.blocked_on_issue_refs])
+
+  def testDeleteIssue_Delete(self):
+    """We can delete an issue."""
+    issue = self.services.issue.GetIssue(self.cnxn, self.issue_1.issue_id)
+    self.assertFalse(issue.deleted)
+
+    request = issues_pb2.DeleteIssueRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        delete=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.issues_svcr.DeleteIssue, mc, request)
+
+    issue = self.services.issue.GetIssue(self.cnxn, self.issue_1.issue_id)
+    self.assertTrue(issue.deleted)
+
+  def testDeleteIssue_Undelete(self):
+    """We can undelete an issue."""
+    self.services.issue.SoftDeleteIssue(
+        self.cnxn, self.project.project_id, 1, True, self.services.user)
+    issue = self.services.issue.GetIssue(self.cnxn, self.issue_1.issue_id)
+    self.assertTrue(issue.deleted)
+
+    request = issues_pb2.DeleteIssueRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        delete=False)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.issues_svcr.DeleteIssue, mc, request)
+
+    issue = self.services.issue.GetIssue(self.cnxn, self.issue_1.issue_id)
+    self.assertFalse(issue.deleted)
+
+  def testDeleteIssueComment_Delete(self):
+    """We can delete an issue comment."""
+    comment = tracker_pb2.IssueComment(
+        project_id=self.project.project_id,
+        issue_id=self.issue_1.issue_id,
+        user_id=111,
+        content='Foo',
+        timestamp=12345)
+    self.services.issue.TestAddComment(comment, self.issue_1.local_id)
+
+    request = issues_pb2.DeleteIssueCommentRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        sequence_num=1,
+        delete=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.issues_svcr.DeleteIssueComment, mc, request)
+
+    comment = self.services.issue.GetComment(self.cnxn, comment.id)
+    self.assertEqual(111, comment.deleted_by)
+
+  def testDeleteIssueComment_Undelete(self):
+    """We can undelete an issue comment."""
+    comment = tracker_pb2.IssueComment(
+        project_id=self.project.project_id,
+        issue_id=self.issue_1.issue_id,
+        user_id=111,
+        content='Foo',
+        timestamp=12345,
+        deleted_by=111)
+    self.services.issue.TestAddComment(comment, self.issue_1.local_id)
+
+    request = issues_pb2.DeleteIssueCommentRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        sequence_num=1,
+        delete=False)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.issues_svcr.DeleteIssueComment, mc, request)
+
+    comment = self.services.issue.GetComment(self.cnxn, comment.id)
+    self.assertIsNone(comment.deleted_by)
+
+  def testDeleteIssueComment_InvalidSequenceNum(self):
+    """We can handle invalid sequence numbers."""
+    request = issues_pb2.DeleteIssueCommentRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        sequence_num=1,
+        delete=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.DeleteIssueComment, mc, request)
+
+  def testDeleteAttachment_Delete(self):
+    """We can delete an issue comment attachment."""
+    comment = tracker_pb2.IssueComment(
+        project_id=self.project.project_id,
+        issue_id=self.issue_1.issue_id,
+        user_id=111,
+        content='Foo',
+        timestamp=12345)
+    self.services.issue.TestAddComment(comment, self.issue_1.local_id)
+    attachment = tracker_pb2.Attachment()
+    self.services.issue.TestAddAttachment(attachment, comment.id, 1)
+
+    request = issues_pb2.DeleteAttachmentRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        sequence_num=1,
+        attachment_id=attachment.attachment_id,
+        delete=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(
+        self.issues_svcr.DeleteAttachment, mc, request)
+
+    self.assertTrue(attachment.deleted)
+
+  def testDeleteAttachment_Undelete(self):
+    """We can undelete an issue comment attachment."""
+    comment = tracker_pb2.IssueComment(
+        project_id=self.project.project_id,
+        issue_id=self.issue_1.issue_id,
+        user_id=111,
+        content='Foo',
+        timestamp=12345,
+        deleted_by=111)
+    self.services.issue.TestAddComment(comment, self.issue_1.local_id)
+    attachment = tracker_pb2.Attachment(deleted=True)
+    self.services.issue.TestAddAttachment(attachment, comment.id, 1)
+
+    request = issues_pb2.DeleteAttachmentRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        sequence_num=1,
+        attachment_id=attachment.attachment_id,
+        delete=False)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(
+        self.issues_svcr.DeleteAttachment, mc, request)
+
+    self.assertFalse(attachment.deleted)
+
+  def testDeleteAttachment_InvalidSequenceNum(self):
+    """We can handle invalid sequence numbers."""
+    request = issues_pb2.DeleteAttachmentRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        sequence_num=1,
+        attachment_id=1234,
+        delete=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(
+          self.issues_svcr.DeleteAttachment, mc, request)
+
+  def testFlagIssues_Normal(self):
+    """Test that an user can flag an issue as spam."""
+    self.services.user.TestAddUser('user@example.com', 999)
+
+    request = issues_pb2.FlagIssuesRequest(
+        issue_refs=[
+            common_pb2.IssueRef(
+                project_name='proj',
+                local_id=1),
+            common_pb2.IssueRef(
+                project_name='proj',
+                local_id=2)],
+        flag=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@example.com')
+    self.CallWrapped(self.issues_svcr.FlagIssues, mc, request)
+
+    issue_id = self.issue_1.issue_id
+    self.assertEqual(
+        [999], self.services.spam.reports_by_issue_id[issue_id])
+    self.assertNotIn(
+        999, self.services.spam.manual_verdicts_by_issue_id[issue_id])
+
+    issue_id2 = self.issue_2.issue_id
+    self.assertEqual(
+        [999], self.services.spam.reports_by_issue_id[issue_id2])
+    self.assertNotIn(
+        999, self.services.spam.manual_verdicts_by_issue_id[issue_id2])
+
+  def testFlagIssues_Unflag(self):
+    """Test that we can un-flag an issue as spam."""
+    self.services.spam.FlagIssues(
+        self.cnxn, self.services.issue, [self.issue_1], 111, True)
+    self.services.spam.RecordManualIssueVerdicts(
+        self.cnxn, self.services.issue, [self.issue_1], 111, True)
+
+    request = issues_pb2.FlagIssuesRequest(
+        issue_refs=[
+            common_pb2.IssueRef(
+                project_name='proj',
+                local_id=1)],
+        flag=False)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.issues_svcr.FlagIssues, mc, request)
+
+    issue_id = self.issue_1.issue_id
+    self.assertEqual([], self.services.spam.reports_by_issue_id[issue_id])
+    self.assertFalse(
+        self.services.spam.manual_verdicts_by_issue_id[issue_id][111])
+
+  def testFlagIssues_OwnerAutoVerdict(self):
+    """Test that an owner can flag an issue as spam and it is a verdict."""
+    request = issues_pb2.FlagIssuesRequest(
+        issue_refs=[
+            common_pb2.IssueRef(
+                project_name='proj',
+                local_id=1)],
+        flag=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.issues_svcr.FlagIssues, mc, request)
+
+    issue_id = self.issue_1.issue_id
+    self.assertEqual(
+        [111], self.services.spam.reports_by_issue_id[issue_id])
+    self.assertTrue(
+        self.services.spam.manual_verdicts_by_issue_id[issue_id][111])
+
+  def testFlagIssues_CommitterAutoVerdict(self):
+    """Test that an owner can flag an issue as spam and it is a verdict."""
+    self.services.user.TestAddUser('committer@example.com', 999)
+    self.services.project.TestAddProjectMembers(
+        [999], self.project, fake.COMMITTER_ROLE)
+
+    request = issues_pb2.FlagIssuesRequest(
+        issue_refs=[
+            common_pb2.IssueRef(
+                project_name='proj',
+                local_id=1)],
+        flag=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='committer@example.com')
+    self.CallWrapped(self.issues_svcr.FlagIssues, mc, request)
+
+    issue_id = self.issue_1.issue_id
+    self.assertEqual(
+        [999], self.services.spam.reports_by_issue_id[issue_id])
+    self.assertTrue(
+        self.services.spam.manual_verdicts_by_issue_id[issue_id][999])
+
+  def testFlagIssues_ContributorAutoVerdict(self):
+    """Test that an owner can flag an issue as spam and it is a verdict."""
+    request = issues_pb2.FlagIssuesRequest(
+        issue_refs=[
+            common_pb2.IssueRef(
+                project_name='proj',
+                local_id=1)],
+        flag=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver2@example.com')
+    self.CallWrapped(self.issues_svcr.FlagIssues, mc, request)
+
+    issue_id = self.issue_1.issue_id
+    self.assertEqual(
+        [222], self.services.spam.reports_by_issue_id[issue_id])
+    self.assertTrue(
+        self.services.spam.manual_verdicts_by_issue_id[issue_id][222])
+
+  def testFlagIssues_NotAllowed(self):
+    """Test that anon users cannot flag issues as spam."""
+    request = issues_pb2.FlagIssuesRequest(
+        issue_refs=[
+            common_pb2.IssueRef(
+                project_name='proj',
+                local_id=1)],
+        flag=True)
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.FlagIssues, mc, request)
+
+    self.assertEqual(
+        [], self.services.spam.reports_by_issue_id[self.issue_1.issue_id])
+    self.assertEqual({}, self.services.spam.manual_verdicts_by_issue_id)
+
+  def testFlagIssues_CrossProjectNotAllowed(self):
+    """Test that cross-project requests are rejected."""
+    request = issues_pb2.FlagIssuesRequest(
+        issue_refs=[
+            common_pb2.IssueRef(
+                project_name='proj',
+                local_id=1),
+            common_pb2.IssueRef(
+                project_name='proj2',
+                local_id=2)],
+        flag=True)
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.FlagIssues, mc, request)
+
+    self.assertEqual(
+        [], self.services.spam.reports_by_issue_id[self.issue_1.issue_id])
+    self.assertEqual({}, self.services.spam.manual_verdicts_by_issue_id)
+
+  def testFlagIssues_MissingIssueRefs(self):
+    request = issues_pb2.FlagIssuesRequest(flag=True)
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.FlagIssues, mc, request)
+
+  def testFlagComment_InvalidSequenceNumber(self):
+    """Test that we reject requests with invalid sequence numbers."""
+    request = issues_pb2.FlagCommentRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        sequence_num=1,
+        flag=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@example.com')
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.FlagComment, mc, request)
+
+  def testFlagComment_Normal(self):
+    """Test that an user can flag a comment as spam."""
+    self.services.user.TestAddUser('user@example.com', 999)
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=111,
+        issue_id=self.issue_1.issue_id)
+    self.services.issue.TestAddComment(comment, 1)
+
+    request = issues_pb2.FlagCommentRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        sequence_num=1,
+        flag=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@example.com')
+    self.CallWrapped(self.issues_svcr.FlagComment, mc, request)
+
+    comment_reports = self.services.spam.comment_reports_by_issue_id
+    manual_verdicts = self.services.spam.manual_verdicts_by_comment_id
+    self.assertEqual([999], comment_reports[self.issue_1.issue_id][comment.id])
+    self.assertNotIn(999, manual_verdicts[comment.id])
+
+  def testFlagComment_Unflag(self):
+    """Test that we can un-flag a comment as spam."""
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=999,
+        issue_id=self.issue_1.issue_id)
+    self.services.issue.TestAddComment(comment, 1)
+
+    self.services.spam.FlagComment(
+        self.cnxn, self.issue_1, comment.id, 999, 111, True)
+    self.services.spam.RecordManualCommentVerdict(
+        self.cnxn, self.services.issue, self.services.user, comment.id, 111,
+        True)
+
+    request = issues_pb2.FlagCommentRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        sequence_num=1,
+        flag=False)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.issues_svcr.FlagComment, mc, request)
+
+    comment_reports = self.services.spam.comment_reports_by_issue_id
+    manual_verdicts = self.services.spam.manual_verdicts_by_comment_id
+    self.assertEqual([], comment_reports[self.issue_1.issue_id][comment.id])
+    self.assertFalse(manual_verdicts[comment.id][111])
+
+  def testFlagComment_OwnerAutoVerdict(self):
+    """Test that an owner can flag a comment as spam and it is a verdict."""
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=999,
+        issue_id=self.issue_1.issue_id)
+    self.services.issue.TestAddComment(comment, 1)
+
+    request = issues_pb2.FlagCommentRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        sequence_num=1,
+        flag=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.issues_svcr.FlagComment, mc, request)
+
+    comment_reports = self.services.spam.comment_reports_by_issue_id
+    manual_verdicts = self.services.spam.manual_verdicts_by_comment_id
+    self.assertEqual([111], comment_reports[self.issue_1.issue_id][comment.id])
+    self.assertTrue(manual_verdicts[comment.id][111])
+
+  def testFlagComment_CommitterAutoVerdict(self):
+    """Test that an owner can flag an issue as spam and it is a verdict."""
+    self.services.user.TestAddUser('committer@example.com', 999)
+    self.services.project.TestAddProjectMembers(
+        [999], self.project, fake.COMMITTER_ROLE)
+
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=999,
+        issue_id=self.issue_1.issue_id)
+    self.services.issue.TestAddComment(comment, 1)
+
+    request = issues_pb2.FlagCommentRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        sequence_num=1,
+        flag=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='committer@example.com')
+    self.CallWrapped(self.issues_svcr.FlagComment, mc, request)
+
+    comment_reports = self.services.spam.comment_reports_by_issue_id
+    manual_verdicts = self.services.spam.manual_verdicts_by_comment_id
+    self.assertEqual([999], comment_reports[self.issue_1.issue_id][comment.id])
+    self.assertTrue(manual_verdicts[comment.id][999])
+
+  def testFlagComment_ContributorAutoVerdict(self):
+    """Test that an owner can flag an issue as spam and it is a verdict."""
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=999,
+        issue_id=self.issue_1.issue_id)
+    self.services.issue.TestAddComment(comment, 1)
+
+    request = issues_pb2.FlagCommentRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        sequence_num=1,
+        flag=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver2@example.com')
+    self.CallWrapped(self.issues_svcr.FlagComment, mc, request)
+
+    comment_reports = self.services.spam.comment_reports_by_issue_id
+    manual_verdicts = self.services.spam.manual_verdicts_by_comment_id
+    self.assertEqual([222], comment_reports[self.issue_1.issue_id][comment.id])
+    self.assertTrue(manual_verdicts[comment.id][222])
+
+  def testFlagComment_NotAllowed(self):
+    """Test that anon users cannot flag issues as spam."""
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=999,
+        issue_id=self.issue_1.issue_id)
+    self.services.issue.TestAddComment(comment, 1)
+
+    request = issues_pb2.FlagCommentRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        sequence_num=1,
+        flag=True)
+    mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.FlagComment, mc, request)
+
+    comment_reports = self.services.spam.comment_reports_by_issue_id
+    manual_verdicts = self.services.spam.manual_verdicts_by_comment_id
+    self.assertNotIn(comment.id, comment_reports[self.issue_1.issue_id])
+    self.assertEqual({}, manual_verdicts[comment.id])
+
+  def testListIssuePermissions_Normal(self):
+    issue_1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, project_name='proj', issue_id=1001)
+    self.services.issue.TestAddIssue(issue_1)
+
+    request = issues_pb2.ListIssuePermissionsRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1))
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@example.com')
+
+    response = self.CallWrapped(
+        self.issues_svcr.ListIssuePermissions, mc, request)
+    self.assertEqual(
+        issues_pb2.ListIssuePermissionsResponse(
+            permissions=[
+               'addissuecomment',
+               'createissue',
+               'deleteown',
+               'flagspam',
+               'setstar',
+               'view']),
+        response)
+
+  def testListIssuePermissions_DeletedIssue(self):
+    issue_1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, project_name='proj', issue_id=1001)
+    issue_1.deleted = True
+    self.services.issue.TestAddIssue(issue_1)
+
+    request = issues_pb2.ListIssuePermissionsRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1))
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver2@example.com')
+
+    response = self.CallWrapped(
+        self.issues_svcr.ListIssuePermissions, mc, request)
+    self.assertEqual(
+        issues_pb2.ListIssuePermissionsResponse(permissions=['view']),
+        response)
+
+  def testListIssuePermissions_CanViewDeletedIssue(self):
+    issue_1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, project_name='proj', issue_id=1001)
+    issue_1.deleted = True
+    self.services.issue.TestAddIssue(issue_1)
+
+    request = issues_pb2.ListIssuePermissionsRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1))
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    response = self.CallWrapped(
+        self.issues_svcr.ListIssuePermissions, mc, request)
+    self.assertEqual(
+        issues_pb2.ListIssuePermissionsResponse(permissions=[
+            'deleteissue',
+            'view']),
+        response)
+
+  def testListIssuePermissions_IssueRestrictions(self):
+    issue_1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, project_name='proj', issue_id=1001)
+    issue_1.labels = ['Restrict-SetStar-CustomPerm']
+    self.services.issue.TestAddIssue(issue_1)
+
+    request = issues_pb2.ListIssuePermissionsRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1))
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver2@example.com')
+
+    response = self.CallWrapped(
+        self.issues_svcr.ListIssuePermissions, mc, request)
+    self.assertEqual(
+        issues_pb2.ListIssuePermissionsResponse(
+            permissions=[
+               'addissuecomment',
+               'createissue',
+               'deleteown',
+               'flagspam',
+               'verdictspam',
+               'view']),
+        response)
+
+  def testListIssuePermissions_IssueGrantedPerms(self):
+    self.services.config.CreateFieldDef(
+        self.cnxn, 789, 'Field Name', 'USER_TYPE', None, None, None, None, None,
+        None, None, None, None, None, 'CustomPerm', None, None, 'Docstring', [],
+        [])
+    issue_1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, project_name='proj', issue_id=1001)
+    issue_1.labels = ['Restrict-SetStar-CustomPerm']
+    issue_1.field_values = [tracker_pb2.FieldValue(user_id=222, field_id=123)]
+    self.services.issue.TestAddIssue(issue_1)
+
+    request = issues_pb2.ListIssuePermissionsRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1))
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='approver2@example.com')
+
+    response = self.CallWrapped(
+        self.issues_svcr.ListIssuePermissions, mc, request)
+    self.assertEqual(
+        issues_pb2.ListIssuePermissionsResponse(
+            permissions=[
+               'addissuecomment',
+               'createissue',
+               'customperm',
+               'deleteown',
+               'flagspam',
+               'setstar',
+               'verdictspam',
+               'view']),
+        response)
+
+  @patch('services.tracker_fulltext.IndexIssues')
+  @patch('services.tracker_fulltext.UnindexIssues')
+  def testMoveIssue_Normal(self, _mock_index, _mock_unindex):
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    self.project.owner_ids = [111]
+    target_project = self.services.project.TestAddProject(
+      'dest', project_id=988, committer_ids=[111])
+
+    request = issues_pb2.MoveIssueRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        target_project_name='dest')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.issues_svcr.MoveIssue, mc, request)
+
+    self.assertEqual(
+        issues_pb2.MoveIssueResponse(
+            new_issue_ref=common_pb2.IssueRef(
+                project_name='dest',
+                local_id=1)),
+        response)
+
+    moved_issue = self.services.issue.GetIssueByLocalID(self.cnxn,
+        target_project.project_id, 1)
+    self.assertEqual(target_project.project_id, moved_issue.project_id)
+    self.assertEqual(issue.summary, moved_issue.summary)
+    self.assertEqual(moved_issue.reporter_id, 111)
+
+  @patch('services.tracker_fulltext.IndexIssues')
+  def testCopyIssue_Normal(self, _mock_index):
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    self.project.owner_ids = [111]
+
+    request = issues_pb2.CopyIssueRequest(
+        issue_ref=common_pb2.IssueRef(
+            project_name='proj',
+            local_id=1),
+        target_project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.issues_svcr.CopyIssue, mc, request)
+
+    self.assertEqual(
+        issues_pb2.CopyIssueResponse(
+            new_issue_ref=common_pb2.IssueRef(
+                project_name='proj',
+                local_id=3)),
+        response)
+
+    copied_issue = self.services.issue.GetIssueByLocalID(self.cnxn,
+        self.project.project_id, 3)
+    self.assertEqual(self.project.project_id, copied_issue.project_id)
+    self.assertEqual(issue.summary, copied_issue.summary)
+    self.assertEqual(copied_issue.reporter_id, 111)
diff --git a/api/test/monorail_servicer_test.py b/api/test/monorail_servicer_test.py
new file mode 100644
index 0000000..8c5a1d3
--- /dev/null
+++ b/api/test/monorail_servicer_test.py
@@ -0,0 +1,484 @@
+# Copyright 2018 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
+
+"""Tests for MonorailServicer."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+import unittest
+import mock
+import mox
+
+from components.prpc import server
+from components.prpc import codes
+from components.prpc import context
+from google.appengine.ext import testbed
+from google.protobuf import json_format
+
+import settings
+from api import monorail_servicer
+from framework import authdata
+from framework import exceptions
+from framework import framework_constants
+from framework import monorailcontext
+from framework import permissions
+from framework import ratelimiter
+from framework import xsrf
+from services import cachemanager_svc
+from services import config_svc
+from services import service_manager
+from services import features_svc
+from testing import fake
+from testing import testing_helpers
+
+
+class MonorailServicerFunctionsTest(unittest.TestCase):
+
+  def testConvertPRPCStatusToHTTPStatus(self):
+    """We can convert pRPC status codes to http codes for monitoring."""
+    prpc_context = context.ServicerContext()
+
+    prpc_context.set_code(codes.StatusCode.OK)
+    self.assertEqual(
+        200, monorail_servicer.ConvertPRPCStatusToHTTPStatus(prpc_context))
+
+    prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+    self.assertEqual(
+        400, monorail_servicer.ConvertPRPCStatusToHTTPStatus(prpc_context))
+
+    prpc_context.set_code(codes.StatusCode.PERMISSION_DENIED)
+    self.assertEqual(
+        403, monorail_servicer.ConvertPRPCStatusToHTTPStatus(prpc_context))
+
+    prpc_context.set_code(codes.StatusCode.NOT_FOUND)
+    self.assertEqual(
+        404, monorail_servicer.ConvertPRPCStatusToHTTPStatus(prpc_context))
+
+    prpc_context.set_code(codes.StatusCode.INTERNAL)
+    self.assertEqual(
+        500, monorail_servicer.ConvertPRPCStatusToHTTPStatus(prpc_context))
+
+
+class UpdateSomethingRequest(testing_helpers.Blank):
+  """A fake request that would do a write."""
+  pass
+
+
+class ListSomethingRequest(testing_helpers.Blank):
+  """A fake request that would do a read."""
+  pass
+
+
+class TestableServicer(monorail_servicer.MonorailServicer):
+  """Fake servicer class."""
+
+  def __init__(self, services):
+    super(TestableServicer, self).__init__(services)
+    self.was_called = False
+    self.seen_mc = None
+    self.seen_request = None
+
+  @monorail_servicer.PRPCMethod
+  def CalcSomething(self, mc, request):
+    """Raise the test exception, or return what we got for verification."""
+    self.was_called = True
+    self.seen_mc = mc
+    self.seen_request = request
+    assert mc
+    assert request
+    if request.exc_class:
+      raise request.exc_class()
+    else:
+      return 'fake response proto'
+
+
+class MonorailServicerTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+    self.testbed.init_user_stub()
+
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService(),
+        cache_manager=fake.CacheManager())
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=789, owner_ids=[111])
+    # allowlisted_bot's email is allowlisted in testing/api_clients.cfg.
+    self.allowlisted_bot = self.services.user.TestAddUser(
+        '123456789@developer.gserviceaccount.com', 999)
+    # allowlisted_client_id_user is used to test accounts that are only
+    # allowlisted with the client_id.
+    self.allowlisted_client_id_user = self.services.user.TestAddUser(
+        'allowlisted-with-client-id@developer.gserviceaccount.com', 888)
+    self.non_member = self.services.user.TestAddUser(
+        'nonmember@example.com', 222)
+    self.allowed_domain_user = self.services.user.TestAddUser(
+        'chickenchicken@google.com', 333)
+    self.test_user = self.services.user.TestAddUser('test@example.com', 420)
+    self.svcr = TestableServicer(self.services)
+    self.nonmember_token = xsrf.GenerateToken(222, xsrf.XHR_SERVLET_PATH)
+    self.request = UpdateSomethingRequest(exc_class=None)
+    self.prpc_context = context.ServicerContext()
+    self.prpc_context.set_code(codes.StatusCode.OK)
+    self.prpc_context._invocation_metadata = [
+        (monorail_servicer.XSRF_TOKEN_HEADER, self.nonmember_token)]
+
+    self.oauth_patcher = mock.patch(
+        'google.appengine.api.oauth.get_current_user')
+    self.mock_oauth_gcu = self.oauth_patcher.start()
+    self.mock_oauth_gcu.return_value = None
+
+    self.oauth_client_id_patcher = mock.patch(
+        'google.appengine.api.oauth.get_client_id')
+    self.mock_oauth_gcid = self.oauth_client_id_patcher.start()
+    self.mock_oauth_gcid.return_value = "1234common.clientid"
+
+    # TODO(b/144508063): remove this workaround.
+    self.oauth_authorized_scopes_patcher = mock.patch(
+        'google.appengine.api.oauth.get_authorized_scopes')
+    self.mock_oauth_gas = self.oauth_authorized_scopes_patcher.start()
+    self.mock_oauth_gas.return_value = [framework_constants.MONORAIL_SCOPE]
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+    self.testbed.deactivate()
+
+  def SetUpRecordMonitoringStats(self):
+    self.mox.StubOutWithMock(json_format, 'MessageToJson')
+    json_format.MessageToJson(self.request).AndReturn('json of request')
+    json_format.MessageToJson('fake response proto').AndReturn(
+        'json of response')
+    self.mox.ReplayAll()
+
+  def testRun_SiteWide_Normal(self):
+    """Calling the handler through the decorator."""
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    self.SetUpRecordMonitoringStats()
+    # pylint: disable=unexpected-keyword-arg
+    response = self.svcr.CalcSomething(
+        self.request, self.prpc_context, cnxn=self.cnxn)
+    self.assertIsNone(self.svcr.seen_mc.cnxn)  # Because of CleanUp().
+    self.assertEqual(self.svcr.seen_mc.auth.email, self.non_member.email)
+    self.assertIn(permissions.CREATE_HOTLIST.lower(),
+                  self.svcr.seen_mc.perms.perm_names)
+    self.assertNotIn(permissions.ADMINISTER_SITE.lower(),
+                     self.svcr.seen_mc.perms.perm_names)
+    self.assertEqual(self.request, self.svcr.seen_request)
+    self.assertEqual('fake response proto', response)
+    self.assertEqual(codes.StatusCode.OK, self.prpc_context._code)
+
+  def testRun_RequesterBanned(self):
+    """If we reject the request, give PERMISSION_DENIED."""
+    self.non_member.banned = 'Spammer'
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    self.SetUpRecordMonitoringStats()
+    # pylint: disable=unexpected-keyword-arg
+    self.svcr.CalcSomething(
+        self.request, self.prpc_context, cnxn=self.cnxn)
+    self.assertFalse(self.svcr.was_called)
+    self.assertEqual(
+        codes.StatusCode.PERMISSION_DENIED, self.prpc_context._code)
+
+  def testRun_AnonymousRequester(self):
+    """Test we properly process anonymous users with valid tokens."""
+    self.prpc_context._invocation_metadata = [
+        (monorail_servicer.XSRF_TOKEN_HEADER,
+         xsrf.GenerateToken(0, xsrf.XHR_SERVLET_PATH))]
+    self.SetUpRecordMonitoringStats()
+    # pylint: disable=unexpected-keyword-arg
+    response = self.svcr.CalcSomething(
+        self.request, self.prpc_context, cnxn=self.cnxn)
+    self.assertIsNone(self.svcr.seen_mc.cnxn)  # Because of CleanUp().
+    self.assertIsNone(self.svcr.seen_mc.auth.email)
+    self.assertNotIn(permissions.CREATE_HOTLIST.lower(),
+                  self.svcr.seen_mc.perms.perm_names)
+    self.assertNotIn(permissions.ADMINISTER_SITE.lower(),
+                     self.svcr.seen_mc.perms.perm_names)
+    self.assertEqual(self.request, self.svcr.seen_request)
+    self.assertEqual('fake response proto', response)
+    self.assertEqual(codes.StatusCode.OK, self.prpc_context._code)
+
+  def testRun_DistributedInvalidation(self):
+    """The Run method must call DoDistributedInvalidation()."""
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    self.SetUpRecordMonitoringStats()
+    # pylint: disable=unexpected-keyword-arg
+    self.svcr.CalcSomething(
+        self.request, self.prpc_context, cnxn=self.cnxn)
+    self.assertIsNotNone(self.services.cache_manager.last_call)
+
+  def testRun_HandlerErrorResponse(self):
+    """An expected exception in the method causes an error status."""
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    self.SetUpRecordMonitoringStats()
+    # pylint: disable=attribute-defined-outside-init
+    self.request.exc_class = exceptions.NoSuchUserException
+    # pylint: disable=unexpected-keyword-arg
+    response = self.svcr.CalcSomething(
+        self.request, self.prpc_context, cnxn=self.cnxn)
+    self.assertTrue(self.svcr.was_called)
+    self.assertIsNone(self.svcr.seen_mc.cnxn)  # Because of CleanUp().
+    self.assertEqual(self.svcr.seen_mc.auth.email, self.non_member.email)
+    self.assertEqual(self.request, self.svcr.seen_request)
+    self.assertIsNone(response)
+    self.assertEqual(codes.StatusCode.NOT_FOUND, self.prpc_context._code)
+
+  def testRun_HandlerProgrammingError(self):
+    """An unexception in the handler method is re-raised."""
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    self.SetUpRecordMonitoringStats()
+    # pylint: disable=attribute-defined-outside-init
+    self.request.exc_class = NotImplementedError
+    self.assertRaises(
+        NotImplementedError,
+        self.svcr.CalcSomething,
+        self.request, self.prpc_context, cnxn=self.cnxn)
+    self.assertTrue(self.svcr.was_called)
+    self.assertIsNone(self.svcr.seen_mc.cnxn)  # Because of CleanUp().
+
+  def testGetAndAssertRequesterAuth_Cookie_Anon(self):
+    """We get and allow requests from anon user using cookie auth."""
+    metadata = {
+        monorail_servicer.XSRF_TOKEN_HEADER: xsrf.GenerateToken(
+            0, xsrf.XHR_SERVLET_PATH)}
+    # Signed out.
+    self.assertIsNone(self.svcr.GetAndAssertRequesterAuth(
+        self.cnxn, metadata, self.services).email)
+
+  def testGetAndAssertRequesterAuth_Cookie_SignedIn(self):
+    """We get and allow requests from signed in users using cookie auth."""
+    metadata = dict(self.prpc_context.invocation_metadata())
+    # Signed in with cookie auth.
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    user_auth = self.svcr.GetAndAssertRequesterAuth(
+        self.cnxn, metadata, self.services)
+    self.assertEqual(self.non_member.email, user_auth.email)
+
+  def testGetAndAssertRequester_Anon_BadToken(self):
+    """We get the email address of the signed in user using oauth."""
+    metadata = {}
+    # Anonymous user has invalid token.
+    with self.assertRaises(permissions.PermissionException):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  def testGetAndAssertRequester_Oauth_AllowedDomain_NoMonorailScope(self):
+    """We reject users with allowed domains but no monorail scope."""
+    metadata = {}
+    self.mock_oauth_gcu.return_value = None
+
+    with self.assertRaises(permissions.PermissionException):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  def testGetAndAssertRequester_Oauth_BadDomain_MonorailScope(self):
+    """We reject users with bad domains using the monorail scope."""
+    metadata = {}
+    def side_effect(scope=None):
+      if scope == framework_constants.MONORAIL_SCOPE:
+        return testing_helpers.Blank(
+            email=lambda: 'testchicken@chicken.com', client_id=lambda: 7899)
+      return None
+    self.mock_oauth_gcu.side_effect = side_effect
+
+    with self.assertRaises(permissions.PermissionException):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  def testGetAndAssertRequester_Oauth_AllowedDomain_MonorailScope(self):
+    """We get and allow users with allowed domains using the monorail scope."""
+    metadata = {}
+    def side_effect(scope=None):
+      if scope == framework_constants.MONORAIL_SCOPE:
+        return testing_helpers.Blank(
+            email=lambda: self.allowed_domain_user.email,
+            client_id=lambda: 7899)
+      return None
+    self.mock_oauth_gcu.side_effect = side_effect
+
+    user_auth = self.svcr.GetAndAssertRequesterAuth(
+        self.cnxn, metadata, self.services)
+    self.assertEqual(user_auth.email, self.allowed_domain_user.email)
+
+  def testGetAndAssertRequesterAuth_Oauth_Allowlisted(self):
+    metadata = {}
+    # Signed in with oauth.
+    self.mock_oauth_gcu.return_value = testing_helpers.Blank(
+        email=lambda: self.allowlisted_bot.email)
+
+    bot_auth = self.svcr.GetAndAssertRequesterAuth(
+        self.cnxn, metadata, self.services)
+    self.assertEqual(bot_auth.email, self.allowlisted_bot.email)
+
+  def testGetAndAssertRequesterAuth_Oauth_NotAllowlisted(self):
+    metadata = {}
+    # Signed in with oauth.
+    self.mock_oauth_gcu.return_value = testing_helpers.Blank(
+        email=lambda: 'who-is-this@test.com')
+
+    with self.assertRaises(permissions.PermissionException):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  def testGetAndAssertRequesterAuth_Oauth_ClientIDOnly(self):
+    """We get and allow accounts that only have their client_id allowlisted."""
+    metadata = {}
+    self.mock_oauth_gcu.return_value = testing_helpers.Blank(
+        email=lambda: self.allowlisted_client_id_user.email)
+    self.mock_oauth_gcid.return_value = "98723764876"
+    both_auth = self.svcr.GetAndAssertRequesterAuth(
+        self.cnxn, metadata, self.services)
+    self.assertEqual(both_auth.email, self.allowlisted_client_id_user.email)
+
+  def testGetAndAssertRequesterAuth_Banned(self):
+    self.non_member.banned = 'Spammer'
+    metadata = dict(self.prpc_context.invocation_metadata())
+    # Signed in with cookie auth.
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    with self.assertRaises(permissions.BannedUserException):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  def testGetRequester_TestAccountOnAppspot(self):
+    """Specifying test_account is ignored on deployed server."""
+    # pylint: disable=attribute-defined-outside-init
+    metadata = {'x-test-account': 'test@example.com'}
+    with self.assertRaises(exceptions.InputException):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  def testGetRequester_TestAccountOnDev(self):
+    """For integration testing, we can set test_account on dev_server."""
+    try:
+      orig_local_mode = settings.local_mode
+      settings.local_mode = True
+
+      # pylint: disable=attribute-defined-outside-init
+      metadata = {'x-test-account': 'test@example.com'}
+      test_auth = self.svcr.GetAndAssertRequesterAuth(
+          self.cnxn, metadata, self.services)
+      self.assertEqual('test@example.com', test_auth.email)
+
+      # pylint: disable=attribute-defined-outside-init
+      metadata = {'x-test-account': 'test@anythingelse.com'}
+      with self.assertRaises(exceptions.InputException):
+        self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+    finally:
+      settings.local_mode = orig_local_mode
+
+  def testAssertBaseChecks_SiteIsReadOnly_Write(self):
+    """We reject writes and allow reads when site is read-only."""
+    orig_read_only = settings.read_only
+    try:
+      settings.read_only = True
+      metadata = {}
+      self.assertRaises(
+        permissions.PermissionException,
+        self.svcr.AssertBaseChecks, self.request, metadata)
+    finally:
+      settings.read_only = orig_read_only
+
+  def testAssertBaseChecks_SiteIsReadOnly_Read(self):
+    """We reject writes and allow reads when site is read-only."""
+    orig_read_only = settings.read_only
+    try:
+      settings.read_only = True
+      metadata = {monorail_servicer.XSRF_TOKEN_HEADER: self.nonmember_token}
+
+      # Our default request is an update.
+      with self.assertRaises(permissions.PermissionException):
+        self.svcr.AssertBaseChecks(self.request, metadata)
+
+      # A method name starting with "List" or "Get" will run OK.
+      self.request = ListSomethingRequest(exc_class=None)
+      self.svcr.AssertBaseChecks(self.request, metadata)
+    finally:
+      settings.read_only = orig_read_only
+
+  def testGetRequestProject(self):
+    """We get a project specified by request field project_name."""
+    # No project specified.
+    self.assertIsNone(self.svcr.GetRequestProject(self.cnxn, self.request))
+
+    # Existing project specified.
+    # pylint: disable=attribute-defined-outside-init
+    self.request.project_name = 'proj'
+    self.assertEqual(
+        self.project, self.svcr.GetRequestProject(self.cnxn, self.request))
+
+    # Bad project specified.
+    # pylint: disable=attribute-defined-outside-init
+    self.request.project_name = 'not-a-proj'
+    self.assertIsNone(self.svcr.GetRequestProject(self.cnxn, self.request))
+
+  def CheckExceptionStatus(self, e, expected_code, details=None):
+    mc = monorailcontext.MonorailContext(self.services)
+    self.prpc_context.set_code(codes.StatusCode.OK)
+    processed = self.svcr.ProcessException(e, self.prpc_context, mc)
+    if expected_code:
+      self.assertTrue(processed)
+      self.assertEqual(expected_code, self.prpc_context._code)
+    else:
+      self.assertFalse(processed)
+      # Uncaught exceptions should indicate an error.
+      self.assertEqual(codes.StatusCode.INTERNAL, self.prpc_context._code)
+    if details is not None:
+      self.assertEqual(details, self.prpc_context._details)
+
+  def testProcessException(self):
+    """Expected exceptions are converted to pRPC codes, expected not."""
+    self.CheckExceptionStatus(
+        exceptions.NoSuchUserException(), codes.StatusCode.NOT_FOUND)
+    self.CheckExceptionStatus(
+        exceptions.NoSuchProjectException(), codes.StatusCode.NOT_FOUND)
+    self.CheckExceptionStatus(
+        exceptions.NoSuchIssueException(), codes.StatusCode.NOT_FOUND)
+    self.CheckExceptionStatus(
+        exceptions.NoSuchComponentException(), codes.StatusCode.NOT_FOUND)
+    self.CheckExceptionStatus(
+        permissions.BannedUserException(), codes.StatusCode.PERMISSION_DENIED)
+    self.CheckExceptionStatus(
+        permissions.PermissionException(), codes.StatusCode.PERMISSION_DENIED)
+    self.CheckExceptionStatus(
+        exceptions.GroupExistsException(), codes.StatusCode.ALREADY_EXISTS)
+    self.CheckExceptionStatus(
+        exceptions.InvalidComponentNameException(),
+        codes.StatusCode.INVALID_ARGUMENT)
+    self.CheckExceptionStatus(
+        exceptions.InputException('echoed values'),
+        codes.StatusCode.INVALID_ARGUMENT,
+        details='Invalid arguments: echoed values')
+    self.CheckExceptionStatus(
+        exceptions.FilterRuleException(),
+        codes.StatusCode.INVALID_ARGUMENT,
+        details='Violates filter rule that should error.')
+    self.CheckExceptionStatus(
+        ratelimiter.ApiRateLimitExceeded('client_id', 'email'),
+        codes.StatusCode.PERMISSION_DENIED)
+    self.CheckExceptionStatus(
+        features_svc.HotlistAlreadyExists(), codes.StatusCode.ALREADY_EXISTS)
+    self.CheckExceptionStatus(NotImplementedError(), None)
+
+  def testProcessException_ErrorMessageEscaped(self):
+    """If we ever echo user input in error messages, it is escaped.."""
+    self.CheckExceptionStatus(
+        exceptions.InputException('echoed <script>"code"</script>'),
+        codes.StatusCode.INVALID_ARGUMENT,
+        details=('Invalid arguments: echoed '
+                 '&lt;script&gt;&quot;code&quot;&lt;/script&gt;'))
+
+  def testRecordMonitoringStats_RequestClassDoesNotEndInRequest(self):
+    """We cope with request proto class names that do not end in 'Request'."""
+    self.request = 'this is a string'
+    self.SetUpRecordMonitoringStats()
+    start_time = 1522559788.939511
+    now = 1522569311.892738
+    self.svcr.RecordMonitoringStats(
+        start_time, self.request, 'fake response proto', self.prpc_context,
+        now=now)
diff --git a/api/test/projects_servicer_test.py b/api/test/projects_servicer_test.py
new file mode 100644
index 0000000..b3084c3
--- /dev/null
+++ b/api/test/projects_servicer_test.py
@@ -0,0 +1,1086 @@
+# Copyright 2018 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
+
+"""Tests for the projects servicer."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+from mock import patch
+
+from components.prpc import codes
+from components.prpc import context
+from components.prpc import server
+
+from api import projects_servicer
+from api.api_proto import common_pb2
+from api.api_proto import issue_objects_pb2
+from api.api_proto import project_objects_pb2
+from api.api_proto import projects_pb2
+from framework import authdata
+from framework import exceptions
+from framework import framework_constants
+from framework import monorailcontext
+from framework import permissions
+from proto import tracker_pb2
+from proto import project_pb2
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from testing import fake
+from testing import testing_helpers
+from services import service_manager
+
+
+class ProjectsServicerTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService(),
+        project_star=fake.ProjectStarService(),
+        features=fake.FeaturesService())
+
+    self.admin = self.services.user.TestAddUser('admin@example.com', 123)
+    self.admin.is_site_admin = True
+    self.owner = self.services.user.TestAddUser('owner@example.com', 111)
+    self.services.user.TestAddUser('user_222@example.com', 222)
+    self.services.user.TestAddUser('user_333@example.com', 333)
+    self.services.user.TestAddUser('user_444@example.com', 444)
+    self.services.user.TestAddUser('user_666@example.com', 666)
+
+    # User group 888 has members: user_555 and proj@monorail.com
+    self.services.user.TestAddUser('group888@googlegroups.com', 888)
+    self.services.usergroup.TestAddGroupSettings(
+        888, 'group888@googlegroups.com')
+    self.services.usergroup.TestAddMembers(888, [555, 1001])
+
+    # User group 999 has members: user_111 and user_444
+    self.services.user.TestAddUser('group999@googlegroups.com', 999)
+    self.services.usergroup.TestAddGroupSettings(
+        999, 'group999@googlegroups.com')
+    self.services.usergroup.TestAddMembers(999, [111, 444])
+
+    # User group 777 has members: user_666 and group 999.
+    self.services.user.TestAddUser('group777@googlegroups.com', 777)
+    self.services.usergroup.TestAddGroupSettings(
+        777, 'group777@googlegroups.com')
+    self.services.usergroup.TestAddMembers(777, [666, 999])
+
+    self.project = self.services.project.TestAddProject(
+        'proj',
+        project_id=789,
+        owner_ids=[111],
+        committer_ids=[222],
+        contrib_ids=[333])
+    self.projects_svcr = projects_servicer.ProjectsServicer(
+        self.services, make_rate_limiter=False)
+    self.prpc_context = context.ServicerContext()
+    self.prpc_context.set_code(codes.StatusCode.OK)
+
+  def CallWrapped(self, wrapped_handler, *args, **kwargs):
+    return wrapped_handler.wrapped(self.projects_svcr, *args, **kwargs)
+
+  def testListProjects_Normal(self):
+    """We can get a list of all projects on the site."""
+    request = projects_pb2.ListProjectsRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(self.projects_svcr.ListProjects, mc, request)
+    self.assertEqual(2, len(response.projects))
+
+  def testGetConfig_Normal(self):
+    """We can get a project config."""
+    request = projects_pb2.GetConfigRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(self.projects_svcr.GetConfig, mc, request)
+    self.assertEqual('proj', response.project_name)
+
+  def testGetConfig_NoSuchProject(self):
+    """We reject a request to get a config for a non-existent project."""
+    request = projects_pb2.GetConfigRequest(project_name='unknown-proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      self.CallWrapped(self.projects_svcr.GetConfig, mc, request)
+
+  def testGetConfig_PermissionDenied(self):
+    """We reject a request to get a config for a non-viewable project."""
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    request = projects_pb2.GetConfigRequest(project_name='proj')
+
+    # User is a member of the members-only project.
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(self.projects_svcr.GetConfig, mc, request)
+    self.assertEqual('proj', response.project_name)
+
+    # User is not a member of the members-only project.
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='nonmember@example.com')
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.projects_svcr.GetConfig, mc, request)
+
+  @patch('businesslogic.work_env.WorkEnv.ListProjectTemplates')
+  def testListProjectTemplates_Normal(self, mockListProjectTemplates):
+    fd_1 = tracker_pb2.FieldDef(
+        field_name='FirstField', field_id=1,
+        field_type=tracker_pb2.FieldTypes.STR_TYPE)
+    fd_2 = tracker_pb2.FieldDef(
+        field_name='LegalApproval', field_id=2,
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    component = tracker_pb2.ComponentDef(component_id=1, path='dude')
+    status_def = tracker_pb2.StatusDef(status='New', means_open=True)
+    config = tracker_pb2.ProjectIssueConfig(
+        project_id=789, field_defs=[fd_1, fd_2], component_defs=[component],
+        well_known_statuses=[status_def])
+    self.services.config.StoreConfig(self.cnxn, config)
+    admin1 = self.services.user.TestAddUser('admin@example.com', 222)
+    appr1 = self.services.user.TestAddUser('approver@example.com', 333)
+    setter = self.services.user.TestAddUser('setter@example.com', 444)
+    template = tracker_pb2.TemplateDef(
+        name='Chicken', content='description', summary='summary',
+        status='New', admin_ids=[admin1.user_id],
+        field_values=[tracker_bizobj.MakeFieldValue(
+            fd_1.field_id, None, 'Cow', None, None, None, False)],
+        component_ids=[component.component_id],
+        approval_values=[tracker_pb2.ApprovalValue(
+            approval_id=2, approver_ids=[appr1.user_id],
+            setter_id=setter.user_id)])
+    mockListProjectTemplates.return_value = [template]
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    request = projects_pb2.ListProjectTemplatesRequest(project_name='proj')
+    response = self.CallWrapped(
+        self.projects_svcr.ListProjectTemplates, mc, request)
+    self.assertEqual(
+        response,
+        projects_pb2.ListProjectTemplatesResponse(
+            templates=[project_objects_pb2.TemplateDef(
+                template_name='Chicken',
+                content='description',
+                summary='summary',
+                status_ref=common_pb2.StatusRef(
+                    status='New',
+                    is_derived=False,
+                    means_open=True),
+                owner_defaults_to_member=True,
+                admin_refs=[
+                  common_pb2.UserRef(
+                      user_id=admin1.user_id,
+                      display_name=testing_helpers.ObscuredEmail(admin1.email),
+                      is_derived=False)],
+                field_values=[
+                  issue_objects_pb2.FieldValue(
+                    field_ref=common_pb2.FieldRef(
+                        field_id=fd_1.field_id,
+                        field_name=fd_1.field_name,
+                        type=common_pb2.STR_TYPE),
+                    value='Cow')],
+                component_refs=[
+                    common_pb2.ComponentRef(
+                        path=component.path, is_derived=False)],
+                approval_values=[
+                  issue_objects_pb2.Approval(
+                    field_ref=common_pb2.FieldRef(
+                        field_id=fd_2.field_id,
+                        field_name=fd_2.field_name,
+                        type=common_pb2.APPROVAL_TYPE),
+                    setter_ref=common_pb2.UserRef(
+                        user_id=setter.user_id,
+                        display_name=testing_helpers.ObscuredEmail(
+                            setter.email)),
+                    phase_ref=issue_objects_pb2.PhaseRef(),
+                    approver_refs=[common_pb2.UserRef(
+                        user_id=appr1.user_id,
+                        display_name=testing_helpers.ObscuredEmail(appr1.email),
+                        is_derived=False)])],
+          )]))
+
+  def testListProjectTemplates_NoProjectName(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    request = projects_pb2.ListProjectTemplatesRequest()
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.projects_svcr.ListProjectTemplates, mc, request)
+
+  def testListProjectTemplates_NoSuchProject(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    request = projects_pb2.ListProjectTemplatesRequest(project_name='ghost')
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      self.CallWrapped(self.projects_svcr.ListProjectTemplates, mc, request)
+
+  def testListProjectTemplates_PermissionDenied(self):
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='nonmember@example.com')
+    request = projects_pb2.GetConfigRequest(project_name='proj')
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.projects_svcr.ListProjectTemplates, mc, request)
+
+  def testGetPresentationConfig_Normal(self):
+    """Test getting project summary, thumbnail url, custom issue entry, etc."""
+    config = tracker_pb2.ProjectIssueConfig(project_id=789)
+    self.project.summary = 'project summary'
+    config.custom_issue_entry_url = 'issue entry url'
+    config.member_default_query = 'default query'
+    config.default_col_spec = 'ID Summary'
+    config.default_sort_spec = 'Priority Status'
+    config.default_x_attr = 'Priority'
+    config.default_y_attr = 'Status'
+    self.project.revision_url_format = 'revision url format'
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    request = projects_pb2.GetPresentationConfigRequest(project_name='proj')
+    response = self.CallWrapped(
+        self.projects_svcr.GetPresentationConfig, mc, request)
+
+    self.assertEqual('project summary', response.project_summary)
+    self.assertEqual('issue entry url', response.custom_issue_entry_url)
+    self.assertEqual('default query', response.default_query)
+    self.assertEqual('ID Summary', response.default_col_spec)
+    self.assertEqual('Priority Status', response.default_sort_spec)
+    self.assertEqual('Priority', response.default_x_attr)
+    self.assertEqual('Status', response.default_y_attr)
+    self.assertEqual('revision url format', response.revision_url_format)
+
+  def testGetPresentationConfig_SavedQueriesAllowed(self):
+    """Only project members or higher can see project saved queries."""
+    self.services.features.UpdateCannedQueries(self.cnxn, 789, [
+        tracker_pb2.SavedQuery(query_id=101, name='test', query='owner:me'),
+        tracker_pb2.SavedQuery(query_id=202, name='hello', query='world')
+    ])
+
+    # User 333 is a contributor.
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user_333@example.com')
+
+    request = projects_pb2.GetPresentationConfigRequest(project_name='proj')
+    response = self.CallWrapped(self.projects_svcr.GetPresentationConfig, mc,
+        request)
+
+    self.assertEqual(2, len(response.saved_queries))
+
+    self.assertEqual(101, response.saved_queries[0].query_id)
+    self.assertEqual('test', response.saved_queries[0].name)
+    self.assertEqual('owner:me', response.saved_queries[0].query)
+
+    self.assertEqual(202, response.saved_queries[1].query_id)
+    self.assertEqual('hello', response.saved_queries[1].name)
+    self.assertEqual('world', response.saved_queries[1].query)
+
+  def testGetPresentationConfig_SavedQueriesDenied(self):
+    """Only project members or higher can see project saved queries."""
+    self.services.features.UpdateCannedQueries(self.cnxn, 789, [
+        tracker_pb2.SavedQuery(query_id=101, name='test', query='owner:me'),
+        tracker_pb2.SavedQuery(query_id=202, name='hello', query='world')
+    ])
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='nonmember@example.com')
+
+    request = projects_pb2.GetPresentationConfigRequest(project_name='proj')
+    response = self.CallWrapped(self.projects_svcr.GetPresentationConfig, mc,
+        request)
+
+    self.assertEqual(0, len(response.saved_queries))
+
+  def testGetCustomPermissions_Normal(self):
+    self.project.extra_perms = [
+        project_pb2.Project.ExtraPerms(
+            member_id=111,
+            perms=['FooPerm', 'BarPerm'])]
+
+    request = projects_pb2.GetConfigRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.org')
+    response = self.CallWrapped(
+        self.projects_svcr.GetCustomPermissions, mc, request)
+    self.assertEqual(['BarPerm', 'FooPerm'], response.permissions)
+
+  def testGetCustomPermissions_PermissionsAreDedupped(self):
+    self.project.extra_perms = [
+        project_pb2.Project.ExtraPerms(
+            member_id=111,
+            perms=['FooPerm', 'FooPerm']),
+        project_pb2.Project.ExtraPerms(
+            member_id=222,
+            perms=['FooPerm'])]
+
+    request = projects_pb2.GetConfigRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.org')
+    response = self.CallWrapped(
+        self.projects_svcr.GetCustomPermissions, mc, request)
+    self.assertEqual(['FooPerm'], response.permissions)
+
+  def testGetCustomPermissions_PermissionsAreSorted(self):
+    self.project.extra_perms = [
+        project_pb2.Project.ExtraPerms(
+            member_id=111,
+            perms=['FooPerm', 'BarPerm']),
+        project_pb2.Project.ExtraPerms(
+            member_id=222,
+            perms=['BazPerm'])]
+
+    request = projects_pb2.GetConfigRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.org')
+    response = self.CallWrapped(
+        self.projects_svcr.GetCustomPermissions, mc, request)
+    self.assertEqual(['BarPerm', 'BazPerm', 'FooPerm'], response.permissions)
+
+  def testGetCustomPermissions_IgnoreStandardPermissions(self):
+    self.project.extra_perms = [
+        project_pb2.Project.ExtraPerms(
+            member_id=111,
+            perms=permissions.STANDARD_PERMISSIONS + ['FooPerm'])]
+
+    request = projects_pb2.GetConfigRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.org')
+    response = self.CallWrapped(
+        self.projects_svcr.GetCustomPermissions, mc, request)
+    self.assertEqual(['FooPerm'], response.permissions)
+
+  def testGetCustomPermissions_NoCustomPermissions(self):
+    self.project.extra_perms = []
+    request = projects_pb2.GetConfigRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='foo@example.org')
+    response = self.CallWrapped(
+        self.projects_svcr.GetCustomPermissions, mc, request)
+    self.assertEqual([], response.permissions)
+
+  def assertVisibleMembers(self, expected_user_ids, expected_group_ids,
+                           requester=None):
+    request = projects_pb2.GetVisibleMembersRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=requester)
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(
+        self.projects_svcr.GetVisibleMembers, mc, request)
+    self.assertEqual(
+        expected_user_ids,
+        [user_ref.user_id for user_ref in response.user_refs])
+    # Assert that we get the full email address.
+    self.assertEqual(
+        [self.services.user.LookupUserEmail(self.cnxn, user_id)
+         for user_id in expected_user_ids],
+        [user_ref.display_name for user_ref in response.user_refs])
+    self.assertEqual(
+        expected_group_ids,
+        [group_ref.user_id for group_ref in response.group_refs])
+    # Assert that we get the full email address.
+    self.assertEqual(
+        [self.services.user.LookupUserEmail(self.cnxn, user_id)
+         for user_id in expected_group_ids],
+        [group_ref.display_name for group_ref in response.group_refs])
+    return response
+
+  def testGetVisibleMembers_Normal(self):
+    # Not logged in - Test users have their email addresses obscured to
+    # non-project members by default.
+    self.assertVisibleMembers([], [])
+    # Logged in as non project member
+    self.assertVisibleMembers([], [], requester='foo@example.com')
+    # Logged in as owner
+    self.assertVisibleMembers([111, 222, 333], [],
+                              requester='owner@example.com')
+    # Logged in as committer
+    self.assertVisibleMembers([111, 222, 333], [],
+                              requester='user_222@example.com')
+    # Logged in as contributor
+    self.assertVisibleMembers([111, 222, 333], [],
+                              requester='user_333@example.com')
+
+  def testGetVisibleMembers_OnlyOwnersSeeContributors(self):
+    self.project.only_owners_see_contributors = True
+    # Not logged in
+    with self.assertRaises(permissions.PermissionException):
+      self.assertVisibleMembers([111, 222], [])
+    # Logged in with a non-member
+    with self.assertRaises(permissions.PermissionException):
+      self.assertVisibleMembers([111, 222], [], requester='foo@example.com')
+    # Logged in as owner
+    self.assertVisibleMembers([111, 222, 333], [],
+                              requester='owner@example.com')
+    # Logged in as committer
+    self.assertVisibleMembers([111, 222, 333], [],
+                              requester='user_222@example.com')
+    # Logged in as contributor
+    with self.assertRaises(permissions.PermissionException):
+      self.assertVisibleMembers(
+          [111, 222], [], requester='user_333@example.com')
+
+  def testGetVisibleMembers_MemberIsGroup(self):
+    self.project.contributor_ids.extend([999])
+    self.assertVisibleMembers([999, 111, 222, 333, 444], [999],
+                              requester='owner@example.com')
+
+  def testGetVisibleMembers_AcExclusion(self):
+    self.services.project.ac_exclusion_ids[self.project.project_id] = [333]
+    self.assertVisibleMembers([111, 222], [], requester='owner@example.com')
+
+  def testGetVisibleMembers_NoExpand(self):
+    self.services.project.no_expand_ids[self.project.project_id] = [999]
+    self.project.contributor_ids.extend([999])
+    self.assertVisibleMembers([999, 111, 222, 333], [999],
+                              requester='owner@example.com')
+
+  def testGetVisibleMembers_ObscuredEmails(self):
+    # Unobscure the owner's email. Non-project members can see.
+    self.services.user.UpdateUserSettings(
+        self.cnxn, 111, self.owner, obscure_email=False)
+
+    # Not logged in
+    self.assertVisibleMembers([111], [])
+    # Logged in as not a project member
+    self.assertVisibleMembers([111], [], requester='foo@example.com')
+    # Logged in as owner
+    self.assertVisibleMembers(
+        [111, 222, 333], [], requester='owner@example.com')
+    # Logged in as committer
+    self.assertVisibleMembers(
+        [111, 222, 333], [], requester='user_222@example.com')
+    # Logged in as contributor
+    self.assertVisibleMembers(
+        [111, 222, 333], [], requester='user_333@example.com')
+
+  def testListStatuses(self):
+    request = projects_pb2.ListStatusesRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.ListStatuses, mc, request)
+    self.assertFalse(response.restrict_to_known)
+    self.assertEqual(
+        [('New', True),
+         ('Accepted', True),
+         ('Started', True),
+         ('Fixed', False),
+         ('Verified', False),
+         ('Invalid', False),
+         ('Duplicate', False),
+         ('WontFix', False),
+         ('Done', False)],
+        [(status_def.status, status_def.means_open)
+         for status_def in response.status_defs])
+    self.assertEqual(
+        [('Duplicate', False)],
+        [(status_def.status, status_def.means_open)
+         for status_def in response.statuses_offer_merge])
+
+  def testListComponents(self):
+    self.services.config.CreateComponentDef(
+        self.cnxn, self.project.project_id, 'Foo', 'Foo Component', True, [],
+        [], True, 111, [])
+    self.services.config.CreateComponentDef(
+        self.cnxn, self.project.project_id, 'Bar', 'Bar Component', False, [],
+        [], True, 111, [])
+    self.services.config.CreateComponentDef(
+        self.cnxn, self.project.project_id, 'Bar>Baz', 'Baz Component',
+        False, [], [], True, 111, [])
+
+    request = projects_pb2.ListComponentsRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.ListComponents, mc, request)
+
+    self.assertEqual(
+        [project_objects_pb2.ComponentDef(
+            path='Foo',
+            docstring='Foo Component',
+            deprecated=True),
+         project_objects_pb2.ComponentDef(
+             path='Bar',
+             docstring='Bar Component',
+             deprecated=False),
+         project_objects_pb2.ComponentDef(
+             path='Bar>Baz',
+             docstring='Baz Component',
+             deprecated=False)],
+        list(response.component_defs))
+
+  def testListComponents_IncludeAdminInfo(self):
+    self.services.config.CreateComponentDef(
+        self.cnxn, self.project.project_id, 'Foo', 'Foo Component', True, [],
+        [], 1234567, 111, [])
+    self.services.config.CreateComponentDef(
+        self.cnxn, self.project.project_id, 'Bar', 'Bar Component', False, [],
+        [], 1234568, 111, [])
+    self.services.config.CreateComponentDef(
+        self.cnxn, self.project.project_id, 'Bar>Baz', 'Baz Component',
+        False, [], [], 1234569, 111, [])
+    creator_ref = common_pb2.UserRef(
+        user_id=111,
+        display_name='owner@example.com')
+
+    request = projects_pb2.ListComponentsRequest(
+        project_name='proj', include_admin_info=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.ListComponents, mc, request)
+
+    self.assertEqual(
+        [project_objects_pb2.ComponentDef(
+            path='Foo',
+            docstring='Foo Component',
+            deprecated=True,
+            created=1234567,
+            creator_ref=creator_ref),
+         project_objects_pb2.ComponentDef(
+             path='Bar',
+             docstring='Bar Component',
+             deprecated=False,
+             created=1234568,
+             creator_ref=creator_ref),
+         project_objects_pb2.ComponentDef(
+             path='Bar>Baz',
+             docstring='Baz Component',
+             deprecated=False,
+             created=1234569,
+             creator_ref=creator_ref),
+            ],
+        list(response.component_defs))
+
+  def AddField(self, name, **kwargs):
+    if kwargs.get('needs_perm'):
+      kwargs['needs_member'] = True
+    kwargs.setdefault('cnxn', self.cnxn)
+    kwargs.setdefault('project_id', self.project.project_id)
+    kwargs.setdefault('field_name', name)
+    kwargs.setdefault('field_type_str', 'USER_TYPE')
+    for arg in ('applic_type', 'applic_pred', 'is_required', 'is_niche',
+                'is_multivalued', 'min_value', 'max_value', 'regex',
+                'needs_member', 'needs_perm', 'grants_perm', 'notify_on',
+                'date_action_str', 'docstring'):
+      kwargs.setdefault(arg, None)
+    for arg in ('admin_ids', 'editor_ids'):
+      kwargs.setdefault(arg, [])
+
+    self.services.config.CreateFieldDef(**kwargs)
+
+  def testListFields_Normal(self):
+    self.AddField('Foo Field', needs_perm=permissions.EDIT_ISSUE)
+
+    request = projects_pb2.ListFieldsRequest(
+        project_name='proj', include_user_choices=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.ListFields, mc, request)
+
+    self.assertEqual(1, len(response.field_defs))
+    field = response.field_defs[0]
+    self.assertEqual('Foo Field', field.field_ref.field_name)
+    self.assertEqual(
+        [111, 222],
+        sorted([user_ref.user_id for user_ref in field.user_choices]))
+    self.assertEqual(
+        ['owner@example.com', 'user_222@example.com'],
+        sorted([user_ref.display_name for user_ref in field.user_choices]))
+
+  def testListFields_DontIncludeUserChoices(self):
+    self.AddField('Foo Field', needs_perm=permissions.EDIT_ISSUE)
+
+    request = projects_pb2.ListFieldsRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.ListFields, mc, request)
+
+    self.assertEqual(1, len(response.field_defs))
+    field = response.field_defs[0]
+    self.assertEqual(0, len(field.user_choices))
+
+  def testListFields_IncludeAdminInfo(self):
+    self.AddField('Foo Field', needs_perm=permissions.EDIT_ISSUE, is_niche=True,
+                  applic_type='Foo Applic Type')
+
+    request = projects_pb2.ListFieldsRequest(
+        project_name='proj', include_admin_info=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.ListFields, mc, request)
+
+    self.assertEqual(1, len(response.field_defs))
+    field = response.field_defs[0]
+    self.assertEqual('Foo Field', field.field_ref.field_name)
+    self.assertEqual(True, field.is_niche)
+    self.assertEqual('Foo Applic Type', field.applicable_type)
+
+  def testListFields_EnumFieldChoices(self):
+    self.AddField('Type', field_type_str='ENUM_TYPE')
+
+    request = projects_pb2.ListFieldsRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.ListFields, mc, request)
+
+    self.assertEqual(1, len(response.field_defs))
+    field = response.field_defs[0]
+    self.assertEqual('Type', field.field_ref.field_name)
+    self.assertEqual(
+        ['Defect', 'Enhancement', 'Task', 'Other'],
+        [label.label for label in field.enum_choices])
+
+  def testListFields_CustomPermission(self):
+    self.AddField('Foo Field', needs_perm='FooPerm')
+    self.project.extra_perms = [
+        project_pb2.Project.ExtraPerms(
+            member_id=111,
+            perms=['UnrelatedPerm']),
+        project_pb2.Project.ExtraPerms(
+            member_id=222,
+            perms=['FooPerm'])]
+
+    request = projects_pb2.ListFieldsRequest(
+        project_name='proj', include_user_choices=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.ListFields, mc, request)
+
+    self.assertEqual(1, len(response.field_defs))
+    field = response.field_defs[0]
+    self.assertEqual('Foo Field', field.field_ref.field_name)
+    self.assertEqual(
+        [222],
+        sorted([user_ref.user_id for user_ref in field.user_choices]))
+    self.assertEqual(
+        ['user_222@example.com'],
+        sorted([user_ref.display_name for user_ref in field.user_choices]))
+
+  def testListFields_IndirectPermission(self):
+    """Test that the permissions of effective ids are also considered."""
+    self.AddField('Foo Field', needs_perm='FooPerm')
+    self.project.contributor_ids.extend([999])
+    self.project.extra_perms = [
+        project_pb2.Project.ExtraPerms(
+            member_id=999,
+            perms=['FooPerm', 'BarPerm'])]
+
+    request = projects_pb2.ListFieldsRequest(
+        project_name='proj', include_user_choices=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(
+        self.projects_svcr.ListFields, mc, request)
+
+    self.assertEqual(1, len(response.field_defs))
+    field = response.field_defs[0]
+    self.assertEqual('Foo Field', field.field_ref.field_name)
+    # Users 111 and 444 are members of group 999, which has the needed
+    # permission.
+    self.assertEqual(
+        [111, 444, 999],
+        sorted([user_ref.user_id for user_ref in field.user_choices]))
+    self.assertEqual(
+        ['group999@googlegroups.com', 'owner@example.com',
+         'user_444@example.com'],
+        sorted([user_ref.display_name for user_ref in field.user_choices]))
+
+  def testListFields_TwiceIndirectPermission(self):
+    """Test that only direct memberships are considered."""
+    self.AddField('Foo Field', needs_perm='FooPerm')
+    # User group 777 has members: user_666 and group 999.
+    self.project.contributor_ids.extend([777])
+    self.project.contributor_ids.extend([999])
+    self.project.extra_perms = [
+        project_pb2.Project.ExtraPerms(
+            member_id=777, perms=['FooPerm', 'BarPerm'])
+    ]
+
+    request = projects_pb2.ListFieldsRequest(
+        project_name='proj', include_user_choices=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.projects_svcr.ListFields, mc, request)
+
+    self.assertEqual(1, len(response.field_defs))
+    field = response.field_defs[0]
+    self.assertEqual('Foo Field', field.field_ref.field_name)
+    self.assertEqual(
+        [666, 777, 999],
+        sorted([user_ref.user_id for user_ref in field.user_choices]))
+    self.assertEqual(
+        [
+            'group777@googlegroups.com', 'group999@googlegroups.com',
+            'user_666@example.com'
+        ], sorted([user_ref.display_name for user_ref in field.user_choices]))
+
+  def testListFields_NoPermissionsNeeded(self):
+    self.AddField('Foo Field')
+
+    request = projects_pb2.ListFieldsRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.ListFields, mc, request)
+
+    self.assertEqual(1, len(response.field_defs))
+    field = response.field_defs[0]
+    self.assertEqual('Foo Field', field.field_ref.field_name)
+
+  def testListFields_MultipleFields(self):
+    self.AddField('Bar Field', needs_perm=permissions.VIEW)
+    self.AddField('Foo Field', needs_perm=permissions.EDIT_ISSUE)
+
+    request = projects_pb2.ListFieldsRequest(
+        project_name='proj', include_user_choices=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.ListFields, mc, request)
+
+    self.assertEqual(2, len(response.field_defs))
+    field_defs = sorted(
+        response.field_defs, key=lambda field: field.field_ref.field_name)
+
+    self.assertEqual(
+        ['Bar Field', 'Foo Field'],
+        [field.field_ref.field_name for field in field_defs])
+    self.assertEqual(
+        [[111, 222, 333],
+         [111, 222]],
+        [sorted(user_ref.user_id for user_ref in field.user_choices)
+         for field in field_defs])
+    self.assertEqual(
+        [['owner@example.com', 'user_222@example.com', 'user_333@example.com'],
+         ['owner@example.com', 'user_222@example.com']],
+        [sorted(user_ref.display_name for user_ref in field.user_choices)
+         for field in field_defs])
+
+  def testListFields_NoFields(self):
+    request = projects_pb2.ListFieldsRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.ListFields, mc, request)
+
+    self.assertEqual(0, len(response.field_defs))
+
+  def testGetLabelOptions_Normal(self):
+    request = projects_pb2.GetLabelOptionsRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.GetLabelOptions, mc, request)
+
+    expected_label_names = [
+        label[0] for label in tracker_constants.DEFAULT_WELL_KNOWN_LABELS]
+    expected_label_names += [
+        'Restrict-View-EditIssue', 'Restrict-AddIssueComment-EditIssue',
+        'Restrict-View-CoreTeam']
+    self.assertEqual(
+        sorted(expected_label_names),
+        sorted(label.label for label in response.label_options))
+
+  def testGetLabelOptions_CustomPermissions(self):
+    self.project.extra_perms = [
+        project_pb2.Project.ExtraPerms(
+            member_id=222,
+            perms=['FooPerm', 'BarPerm'])]
+
+    request = projects_pb2.GetLabelOptionsRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.GetLabelOptions, mc, request)
+
+    expected_label_names = [
+        label[0] for label in tracker_constants.DEFAULT_WELL_KNOWN_LABELS]
+    expected_label_names += [
+        'Restrict-View-EditIssue', 'Restrict-AddIssueComment-EditIssue']
+    expected_label_names += [
+        'Restrict-%s-%s' % (std_perm, custom_perm)
+        for std_perm in permissions.STANDARD_ISSUE_PERMISSIONS
+        for custom_perm in ('BarPerm', 'FooPerm')]
+
+    self.assertEqual(
+        sorted(expected_label_names),
+        sorted(label.label for label in response.label_options))
+
+  def testGetLabelOptions_FieldMasksLabel(self):
+    self.AddField('Type', field_type_str='ENUM_TYPE')
+
+    request = projects_pb2.GetLabelOptionsRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.GetLabelOptions, mc, request)
+
+    expected_label_names = [
+        label[0] for label in tracker_constants.DEFAULT_WELL_KNOWN_LABELS
+        if not label[0].startswith('Type-')
+    ]
+    expected_label_names += [
+        'Restrict-View-EditIssue', 'Restrict-AddIssueComment-EditIssue',
+        'Restrict-View-CoreTeam']
+    self.assertEqual(
+        sorted(expected_label_names),
+        sorted(label.label for label in response.label_options))
+
+  def CallGetStarCount(self):
+    request = projects_pb2.GetProjectStarCountRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.projects_svcr.GetProjectStarCount, mc, request)
+    return response.star_count
+
+  def CallStar(self, requester='owner@example.com', starred=True):
+    request = projects_pb2.StarProjectRequest(
+        project_name='proj', starred=starred)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=requester)
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(
+        self.projects_svcr.StarProject, mc, request)
+    return response.star_count
+
+  def testStarCount_Normal(self):
+    self.assertEqual(0, self.CallGetStarCount())
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(1, self.CallGetStarCount())
+
+  def testStarCount_StarTwiceSameUser(self):
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(1, self.CallGetStarCount())
+
+  def testStarCount_StarTwiceDifferentUser(self):
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(2, self.CallStar(requester='user_222@example.com'))
+    self.assertEqual(2, self.CallGetStarCount())
+
+  def testStarCount_RemoveStarTwiceSameUser(self):
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(1, self.CallGetStarCount())
+
+    self.assertEqual(0, self.CallStar(starred=False))
+    self.assertEqual(0, self.CallStar(starred=False))
+    self.assertEqual(0, self.CallGetStarCount())
+
+  def testStarCount_RemoveStarTwiceDifferentUser(self):
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(2, self.CallStar(requester='user_222@example.com'))
+    self.assertEqual(2, self.CallGetStarCount())
+
+    self.assertEqual(1, self.CallStar(starred=False))
+    self.assertEqual(
+        0, self.CallStar(requester='user_222@example.com', starred=False))
+    self.assertEqual(0, self.CallGetStarCount())
+
+  def testCheckProjectName_OK(self):
+    """We can check a project name."""
+    request = projects_pb2.CheckProjectNameRequest(project_name='foo')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(
+        self.projects_svcr.CheckProjectName, mc, request)
+
+    self.assertEqual('', response.error)
+
+  def testCheckProjectName_InvalidProjectName(self):
+    """We reject an invalid project name."""
+    request = projects_pb2.CheckProjectNameRequest(project_name='Foo')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(
+        self.projects_svcr.CheckProjectName, mc, request)
+
+    self.assertNotEqual('', response.error)
+
+  def testCheckProjectName_NotAllowed(self):
+    """Users that can't create a project shouldn't get any information."""
+    request = projects_pb2.CheckProjectNameRequest(project_name='Foo')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.projects_svcr.CheckProjectName, mc, request)
+
+  def testCheckProjectName_ProjectAlreadyExists(self):
+    """There is already a project with that name."""
+    request = projects_pb2.CheckProjectNameRequest(project_name='proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(
+        self.projects_svcr.CheckProjectName, mc, request)
+
+    self.assertNotEqual('', response.error)
+
+  def testCheckComponentName_OK(self):
+    request = projects_pb2.CheckComponentNameRequest(
+        project_name='proj',
+        component_name='Component')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(
+        self.projects_svcr.CheckComponentName, mc, request)
+
+    self.assertEqual('', response.error)
+
+  def testCheckComponentName_ParentComponentOK(self):
+    self.services.config.CreateComponentDef(
+        self.cnxn, self.project.project_id, 'Component', 'Docstring',
+        False, [], [], 0, 111, [])
+    request = projects_pb2.CheckComponentNameRequest(
+        project_name='proj',
+        parent_path='Component',
+        component_name='Path')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(
+        self.projects_svcr.CheckComponentName, mc, request)
+
+    self.assertEqual('', response.error)
+
+  def testCheckComponentName_InvalidComponentName(self):
+    request = projects_pb2.CheckComponentNameRequest(
+        project_name='proj',
+        component_name='Component-')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(
+        self.projects_svcr.CheckComponentName, mc, request)
+
+    self.assertNotEqual('', response.error)
+
+  def testCheckComponentName_ComponentAlreadyExists(self):
+    self.services.config.CreateComponentDef(
+        self.cnxn, self.project.project_id, 'Component', 'Docstring',
+        False, [], [], 0, 111, [])
+    request = projects_pb2.CheckComponentNameRequest(
+        project_name='proj',
+        component_name='Component')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(
+        self.projects_svcr.CheckComponentName, mc, request)
+
+    self.assertNotEqual('', response.error)
+
+  def testCheckComponentName_NotAllowedToViewProject(self):
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    request = projects_pb2.CheckComponentNameRequest(
+        project_name='proj',
+        parent_path='Component',
+        component_name='Path')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user_444@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.projects_svcr.CheckComponentName, mc, request)
+
+  def testCheckComponentName_ParentComponentDoesntExist(self):
+    request = projects_pb2.CheckComponentNameRequest(
+        project_name='proj',
+        parent_path='Component',
+        component_name='Path')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    with self.assertRaises(exceptions.NoSuchComponentException):
+      self.CallWrapped(self.projects_svcr.CheckComponentName, mc, request)
+
+  def testCheckFieldName_OK(self):
+    request = projects_pb2.CheckFieldNameRequest(
+        project_name='proj',
+        field_name='Foo')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.projects_svcr.CheckFieldName, mc, request)
+    self.assertEqual('', response.error)
+
+  def testCheckFieldName_InvalidFieldName(self):
+    request = projects_pb2.CheckFieldNameRequest(
+        project_name='proj',
+        field_name='**Foo**')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.projects_svcr.CheckFieldName, mc, request)
+    self.assertNotEqual('', response.error)
+
+  def testCheckFieldName_InvalidFieldName_ApproverSuffix(self):
+    request = projects_pb2.CheckFieldNameRequest(
+        project_name='proj',
+        field_name='Foo-aPprOver')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.projects_svcr.CheckFieldName, mc, request)
+    self.assertNotEqual('', response.error)
+
+  def testCheckFieldName_FieldAlreadyExists(self):
+    self.AddField('Foo')
+    request = projects_pb2.CheckFieldNameRequest(
+        project_name='proj',
+        field_name='Foo')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.projects_svcr.CheckFieldName, mc, request)
+    self.assertNotEqual('', response.error)
+
+  def testCheckFieldName_FieldIsPrefixOfAnother(self):
+    self.AddField('Foo-Bar')
+    request = projects_pb2.CheckFieldNameRequest(
+        project_name='proj',
+        field_name='Foo')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.projects_svcr.CheckFieldName, mc, request)
+    self.assertNotEqual('', response.error)
+
+  def testCheckFieldName_AnotherFieldIsPrefix(self):
+    self.AddField('Foo')
+    request = projects_pb2.CheckFieldNameRequest(
+        project_name='proj',
+        field_name='Foo-Bar')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='admin@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.projects_svcr.CheckFieldName, mc, request)
+    self.assertNotEqual('', response.error)
+
+  def testCheckFieldName_NotAllowedToViewProject(self):
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    request = projects_pb2.CheckFieldNameRequest(
+        project_name='proj',
+        field_name='Foo')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user_444@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.projects_svcr.CheckFieldName, mc, request)
diff --git a/api/test/resource_name_converters_test.py b/api/test/resource_name_converters_test.py
new file mode 100644
index 0000000..e9ca437
--- /dev/null
+++ b/api/test/resource_name_converters_test.py
@@ -0,0 +1,773 @@
+# Copyright 2018 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
+
+"""Tests for converting between resource names and external ids."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from mock import Mock, patch
+import unittest
+import re
+
+from api import resource_name_converters as rnc
+from framework import exceptions
+from testing import fake
+from services import service_manager
+from proto import tracker_pb2
+
+class ResourceNameConverterTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        features=fake.FeaturesService(),
+        template=fake.TemplateService(),
+        config=fake.ConfigService())
+    self.cnxn = fake.MonorailConnection()
+    self.PAST_TIME = 12345
+    self.project_1 = self.services.project.TestAddProject(
+        'proj', project_id=789)
+    self.project_2 = self.services.project.TestAddProject(
+        'goose', project_id=788)
+    self.dne_project_id = 1999
+
+    self.issue_1 = fake.MakeTestIssue(
+        self.project_1.project_id, 1, 'sum', 'New', 111,
+        project_name=self.project_1.project_name)
+    self.issue_2 = fake.MakeTestIssue(
+        self.project_2.project_id, 2, 'sum', 'New', 111,
+        project_name=self.project_2.project_name)
+    self.services.issue.TestAddIssue(self.issue_1)
+    self.services.issue.TestAddIssue(self.issue_2)
+
+    self.user_1 = self.services.user.TestAddUser('user_111@example.com', 111)
+    self.user_2 = self.services.user.TestAddUser('user_222@example.com', 222)
+    self.user_3 = self.services.user.TestAddUser('user_333@example.com', 333)
+
+    hotlist_items = [
+        (self.issue_1.issue_id, 9, self.user_2.user_id, self.PAST_TIME, 'note'),
+        (self.issue_2.issue_id, 1, self.user_1.user_id, self.PAST_TIME, 'note')]
+    self.hotlist_1 = self.services.features.TestAddHotlist(
+        'HotlistName', owner_ids=[], editor_ids=[],
+        hotlist_item_fields=hotlist_items)
+
+    self.template_1 = self.services.template.TestAddIssueTemplateDef(
+        1, self.project_1.project_id, 'template_1_name')
+    self.template_2 = self.services.template.TestAddIssueTemplateDef(
+        2, self.project_2.project_id, 'template_2_name')
+    self.dne_template_id = 3
+
+    self.field_def_1_name = 'test_field'
+    self.field_def_1 = self.services.config.CreateFieldDef(
+        self.cnxn, self.project_1.project_id, self.field_def_1_name, 'STR_TYPE',
+        None, None, None, None, None, None, None, None, None, None, None, None,
+        None, None, [], [])
+    self.approval_def_1_name = 'approval_field_1'
+    self.approval_def_1_id = self.services.config.CreateFieldDef(
+        self.cnxn, self.project_1.project_id, self.approval_def_1_name,
+        'APPROVAL_TYPE', None, None, None, None, None, None, None, None, None,
+        None, None, None, None, None, [], [])
+    self.component_def_1_path = 'Foo'
+    self.component_def_1_id = self.services.config.CreateComponentDef(
+        self.cnxn, self.project_1.project_id, self.component_def_1_path, '',
+        False, [], [], None, 111, [])
+    self.component_def_2_path = 'Foo>Bar>Hey123_I-am-valid'
+    self.component_def_2_id = self.services.config.CreateComponentDef(
+        self.cnxn, self.project_1.project_id, self.component_def_2_path, '',
+        False, [], [], None, 111, [])
+    self.component_def_3_path = 'Fizz'
+    self.component_def_3_id = self.services.config.CreateComponentDef(
+        self.cnxn, self.project_2.project_id, self.component_def_3_path, '',
+        False, [], [], None, 111, [])
+    self.dne_component_def_id = 999
+    self.dne_field_def_id = 999999
+    self.psq_1 = tracker_pb2.SavedQuery(
+        query_id=2, name='psq1 name', base_query_id=1, query='foo=bar')
+    self.psq_2 = tracker_pb2.SavedQuery(
+        query_id=3, name='psq2 name', base_query_id=1, query='fizz=buzz')
+    self.dne_psq_id = 987
+    self.services.features.UpdateCannedQueries(
+        self.cnxn, self.project_1.project_id, [self.psq_1, self.psq_2])
+
+  def testGetResourceNameMatch(self):
+    """We can get a resource name match."""
+    regex = re.compile(r'name\/(?P<group_name>[a-z]+)$')
+    match = rnc._GetResourceNameMatch('name/honque', regex)
+    self.assertEqual(match.group('group_name'), 'honque')
+
+  def testGetResouceNameMatch_InvalidName(self):
+    """An exception is raised if there is not match."""
+    regex = re.compile(r'name\/(?P<group_name>[a-z]+)$')
+    with self.assertRaises(exceptions.InputException):
+      rnc._GetResourceNameMatch('honque/honque', regex)
+
+  def testIngestApprovalDefName(self):
+    approval_id = rnc.IngestApprovalDefName(
+        self.cnxn, 'projects/proj/approvalDefs/123', self.services)
+    self.assertEqual(approval_id, 123)
+
+  def testIngestApprovalDefName_InvalidName(self):
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestApprovalDefName(
+          self.cnxn, 'projects/proj/approvalDefs/123d', self.services)
+
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.IngestApprovalDefName(
+          self.cnxn, 'projects/garbage/approvalDefs/123', self.services)
+
+  def testIngestFieldDefName(self):
+    """We can get a FieldDef's resource name match."""
+    self.assertEqual(
+        rnc.IngestFieldDefName(
+            self.cnxn, 'projects/proj/fieldDefs/123', self.services),
+        (789, 123))
+
+  def testIngestFieldDefName_InvalidName(self):
+    """An exception is raised if the FieldDef's resource name is invalid"""
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestFieldDefName(
+          self.cnxn, 'projects/proj/fieldDefs/7Dog', self.services)
+
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestFieldDefName(
+          self.cnxn, 'garbage/proj/fieldDefs/123', self.services)
+
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.IngestFieldDefName(
+          self.cnxn, 'projects/garbage/fieldDefs/123', self.services)
+
+  def testIngestHotlistName(self):
+    """We can get a Hotlist's resource name match."""
+    self.assertEqual(rnc.IngestHotlistName('hotlists/78909'), 78909)
+
+  def testIngestHotlistName_InvalidName(self):
+    """An exception is raised if the Hotlist's resource name is invalid"""
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestHotlistName('hotlists/789honk789')
+
+  def testIngestHotlistItemNames(self):
+    """We can get Issue IDs from HotlistItems resource names."""
+    names = [
+        'hotlists/78909/items/proj.1',
+        'hotlists/78909/items/goose.2']
+    self.assertEqual(
+        rnc.IngestHotlistItemNames(self.cnxn, names, self.services),
+        [self.issue_1.issue_id, self.issue_2.issue_id])
+
+  def testIngestHotlistItemNames_ProjectNotFound(self):
+    """Exception is raised if a project is not found."""
+    names = [
+        'hotlists/78909/items/proj.1',
+        'hotlists/78909/items/chicken.2']
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.IngestHotlistItemNames(self.cnxn, names, self.services)
+
+  def testIngestHotlistItemNames_MultipleProjectsNotFound(self):
+    """Aggregated exceptions raised if projects are not found."""
+    names = [
+        'hotlists/78909/items/proj.1', 'hotlists/78909/items/chicken.2',
+        'hotlists/78909/items/cow.3'
+    ]
+    with self.assertRaisesRegexp(exceptions.NoSuchProjectException,
+                                 'Project chicken not found.\n' +
+                                 'Project cow not found.'):
+      rnc.IngestHotlistItemNames(self.cnxn, names, self.services)
+
+  def testIngestHotlistItems_IssueNotFound(self):
+    """Exception is raised if an Issue is not found."""
+    names = [
+        'hotlists/78909/items/proj.1',
+        'hotlists/78909/items/goose.5']
+    with self.assertRaisesRegexp(exceptions.NoSuchIssueException, '%r' % names):
+      rnc.IngestHotlistItemNames(self.cnxn, names, self.services)
+
+  def testConvertHotlistName(self):
+    """We can get a Hotlist's resource name."""
+    self.assertEqual(rnc.ConvertHotlistName(10), 'hotlists/10')
+
+  def testConvertHotlistItemNames(self):
+    """We can get Hotlist items' resource names."""
+    expected_dict = {
+        self.hotlist_1.items[0].issue_id: 'hotlists/7739/items/proj.1',
+        self.hotlist_1.items[1].issue_id: 'hotlists/7739/items/goose.2',
+    }
+    self.assertEqual(
+        rnc.ConvertHotlistItemNames(
+            self.cnxn, self.hotlist_1.hotlist_id, expected_dict.keys(),
+            self.services), expected_dict)
+
+  def testIngestApprovalValueName(self):
+    project_id, issue_id, approval_def_id = rnc.IngestApprovalValueName(
+        self.cnxn, 'projects/proj/issues/1/approvalValues/404', self.services)
+    self.assertEqual(project_id, self.project_1.project_id)
+    self.assertEqual(issue_id, self.issue_1.issue_id)
+    self.assertEqual(404, approval_def_id)  # We don't verify it exists.
+
+  def testIngestApprovalValueName_ProjectDoesNotExist(self):
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.IngestApprovalValueName(
+          self.cnxn, 'projects/noproj/issues/1/approvalValues/1', self.services)
+
+  def testIngestApprovalValueName_IssueDoesNotExist(self):
+    with self.assertRaisesRegexp(exceptions.NoSuchIssueException,
+                                 'projects/proj/issues/404'):
+      rnc.IngestApprovalValueName(
+          self.cnxn, 'projects/proj/issues/404/approvalValues/1', self.services)
+
+  def testIngestApprovalValueName_InvalidStart(self):
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestApprovalValueName(
+          self.cnxn, 'zprojects/proj/issues/1/approvalValues/1', self.services)
+
+  def testIngestApprovalValueName_InvalidEnd(self):
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestApprovalValueName(
+          self.cnxn, 'projects/proj/issues/1/approvalValues/1z', self.services)
+
+  def testIngestApprovalValueName_InvalidCollection(self):
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestApprovalValueName(
+          self.cnxn, 'projects/proj/issues/1/approvalValue/1', self.services)
+
+  def testIngestIssueName(self):
+    """We can get an Issue global id from its resource name."""
+    self.assertEqual(
+        rnc.IngestIssueName(self.cnxn, 'projects/proj/issues/1', self.services),
+        self.issue_1.issue_id)
+
+  def testIngestIssueName_ProjectDoesNotExist(self):
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.IngestIssueName(self.cnxn, 'projects/noproj/issues/1', self.services)
+
+  def testIngestIssueName_IssueDoesNotExist(self):
+    with self.assertRaises(exceptions.NoSuchIssueException):
+      rnc.IngestIssueName(self.cnxn, 'projects/proj/issues/2', self.services)
+
+  def testIngestIssueName_InvalidLocalId(self):
+    """Issue resource name Local IDs are digits."""
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestIssueName(self.cnxn, 'projects/proj/issues/x', self.services)
+
+  def testIngestIssueName_InvalidProjectId(self):
+    """Project names are more than 1 character."""
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestIssueName(self.cnxn, 'projects/p/issues/1', self.services)
+
+  def testIngestIssueName_InvalidFormat(self):
+    """Issue resource names must begin with the project resource name."""
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestIssueName(self.cnxn, 'issues/1', self.services)
+
+  def testIngestIssueName_Moved(self):
+    """We can get a moved issue."""
+    moved_to_project_id = 987
+    self.services.project.TestAddProject(
+        'other', project_id=moved_to_project_id)
+    new_issue_id = 1010
+    issue = fake.MakeTestIssue(
+        moved_to_project_id, 200, 'sum', 'New', 111, issue_id=new_issue_id)
+    self.services.issue.TestAddIssue(issue)
+    self.services.issue.TestAddMovedIssueRef(
+        self.project_1.project_id, 404, moved_to_project_id, 200)
+
+    self.assertEqual(
+        rnc.IngestIssueName(
+            self.cnxn, 'projects/proj/issues/404', self.services), new_issue_id)
+
+  def testIngestIssueNames(self):
+    """We can get an Issue global ids from resource names."""
+    self.assertEqual(
+        rnc.IngestIssueNames(
+            self.cnxn, ['projects/proj/issues/1', 'projects/goose/issues/2'],
+            self.services), [self.issue_1.issue_id, self.issue_2.issue_id])
+
+  def testIngestIssueNames_EmptyList(self):
+    """We get an empty list when providing an empty list of issue names."""
+    self.assertEqual(rnc.IngestIssueNames(self.cnxn, [], self.services), [])
+
+  def testIngestIssueNames_WithBadInputs(self):
+    """We aggregate input exceptions."""
+    with self.assertRaisesRegexp(
+        exceptions.InputException,
+        'Invalid resource name: projects/proj/badformat/1.\n' +
+        'Invalid resource name: badformat/proj/issues/1.'):
+      rnc.IngestIssueNames(
+          self.cnxn, [
+              'projects/proj/badformat/1', 'badformat/proj/issues/1',
+              'projects/proj/issues/1'
+          ], self.services)
+
+  def testIngestIssueNames_OneDoesNotExist(self):
+    """We get an exception if one issue name provided does not exist."""
+    with self.assertRaises(exceptions.NoSuchIssueException):
+      rnc.IngestIssueNames(
+          self.cnxn, ['projects/proj/issues/1', 'projects/proj/issues/2'],
+          self.services)
+
+  def testIngestIssueNames_ManyDoNotExist(self):
+    """We get an exception if one issue name provided does not exist."""
+    dne_issues = ['projects/proj/issues/2', 'projects/proj/issues/3']
+    with self.assertRaisesRegexp(exceptions.NoSuchIssueException,
+                                 '%r' % dne_issues):
+      rnc.IngestIssueNames(self.cnxn, dne_issues, self.services)
+
+  def testIngestIssueNames_ProjectsNotExist(self):
+    """Aggregated exceptions raised if projects are not found."""
+    with self.assertRaisesRegexp(exceptions.NoSuchProjectException,
+                                 'Project chicken not found.\n' +
+                                 'Project cow not found.'):
+      rnc.IngestIssueNames(
+          self.cnxn, [
+              'projects/chicken/issues/2', 'projects/cow/issues/3',
+              'projects/proj/issues/1'
+          ], self.services)
+
+  def testIngestProjectFromIssue(self):
+    self.assertEqual(rnc.IngestProjectFromIssue('projects/xyz/issues/1'), 'xyz')
+
+  def testIngestProjectFromIssue_InvalidName(self):
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestProjectFromIssue('projects/xyz')
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestProjectFromIssue('garbage')
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestProjectFromIssue('projects/xyz/issues/garbage')
+
+  def testIngestCommentName(self):
+    name = 'projects/proj/issues/1/comments/0'
+    actual = rnc.IngestCommentName(self.cnxn, name, self.services)
+    self.assertEqual(
+        actual, (self.project_1.project_id, self.issue_1.issue_id, 0))
+
+  def testIngestCommentName_InputException(self):
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestCommentName(self.cnxn, 'misspelled name', self.services)
+
+  def testIngestCommentName_NoSuchProject(self):
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.IngestCommentName(
+          self.cnxn, 'projects/doesnotexist/issues/1/comments/0', self.services)
+
+  def testIngestCommentName_NoSuchIssue(self):
+    with self.assertRaisesRegexp(exceptions.NoSuchIssueException,
+                                 "['projects/proj/issues/404']"):
+      rnc.IngestCommentName(
+          self.cnxn, 'projects/proj/issues/404/comments/0', self.services)
+
+  def testConvertCommentNames(self):
+    """We can create comment names."""
+    expected = {
+        0: 'projects/proj/issues/1/comments/0',
+        1: 'projects/proj/issues/1/comments/1'
+    }
+    self.assertEqual(rnc.CreateCommentNames(1, 'proj', [0, 1]), expected)
+
+  def testConvertCommentNames_Empty(self):
+    """Converting an empty list of comments returns an empty dict."""
+    self.assertEqual(rnc.CreateCommentNames(1, 'proj', []), {})
+
+  def testConvertIssueName(self):
+    """We can create an Issue resource name from an issue_id."""
+    self.assertEqual(
+        rnc.ConvertIssueName(self.cnxn, self.issue_1.issue_id, self.services),
+        'projects/proj/issues/1')
+
+  def testConvertIssueName_NotFound(self):
+    """Exception is raised if the issue is not found."""
+    with self.assertRaises(exceptions.NoSuchIssueException):
+      rnc.ConvertIssueName(self.cnxn, 3279, self.services)
+
+  def testConvertIssueNames(self):
+    """We can create Issue resource names from issue_ids."""
+    self.assertEqual(
+        rnc.ConvertIssueNames(
+            self.cnxn, [self.issue_1.issue_id, 3279], self.services),
+        {self.issue_1.issue_id: 'projects/proj/issues/1'})
+
+  def testConvertApprovalValueNames(self):
+    """We can create ApprovalValue resource names."""
+    self.issue_1.approval_values = [tracker_pb2.ApprovalValue(
+        approval_id=self.approval_def_1_id)]
+
+    expected_name = (
+        'projects/proj/issues/1/approvalValues/%d' % self.approval_def_1_id)
+    self.assertEqual(
+        {self.approval_def_1_id: expected_name},
+        rnc.ConvertApprovalValueNames(
+            self.cnxn, self.issue_1.issue_id, self.services))
+
+  def testIngestUserName(self):
+    """We can get a User ID from User resource name."""
+    name = 'users/111'
+    self.assertEqual(rnc.IngestUserName(self.cnxn, name, self.services), 111)
+
+  def testIngestUserName_DisplayName(self):
+    """We can get a User ID from User resource name with a display name set."""
+    name = 'users/%s' % self.user_3.email
+    self.assertEqual(rnc.IngestUserName(self.cnxn, name, self.services), 333)
+
+  def testIngestUserName_NoSuchUser(self):
+    """When autocreate=False, we raise an exception if a user is not found."""
+    name = 'users/chicken@test.com'
+    with self.assertRaises(exceptions.NoSuchUserException):
+      rnc.IngestUserName(self.cnxn, name, self.services)
+
+  def testIngestUserName_InvalidEmail(self):
+    """We raise an exception if a given resource name's email is invalid."""
+    name = 'users/chickentest.com'
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestUserName(self.cnxn, name, self.services)
+
+  def testIngestUserName_Autocreate(self):
+    """When autocreate=True create a new User if they don't already exist."""
+    new_email = 'chicken@test.com'
+    name = 'users/%s' % new_email
+    user_id = rnc.IngestUserName(
+        self.cnxn, name, self.services, autocreate=True)
+
+    new_id = self.services.user.LookupUserID(
+        self.cnxn, new_email, autocreate=False)
+    self.assertEqual(new_id, user_id)
+
+  def testIngestUserNames(self):
+    """We can get User IDs from User resource names."""
+    names = ['users/111', 'users/222', 'users/%s' % self.user_3.email]
+    expected_ids = [111, 222, 333]
+    self.assertEqual(
+        rnc.IngestUserNames(self.cnxn, names, self.services), expected_ids)
+
+  def testIngestUserNames_NoSuchUser(self):
+    """When autocreate=False, we raise an exception if a user is not found."""
+    names = [
+        'users/111', 'users/chicken@test.com',
+        'users/%s' % self.user_3.email
+    ]
+    with self.assertRaises(exceptions.NoSuchUserException):
+      rnc.IngestUserNames(self.cnxn, names, self.services)
+
+  def testIngestUserNames_InvalidEmail(self):
+    """We raise an exception if a given resource name's email is invalid."""
+    names = [
+        'users/111', 'users/chickentest.com',
+        'users/%s' % self.user_3.email
+    ]
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestUserNames(self.cnxn, names, self.services)
+
+  def testIngestUserNames_Autocreate(self):
+    """When autocreate=True we create new Users if they don't already exist."""
+    new_email = 'user_444@example.com'
+    names = [
+        'users/111',
+        'users/%s' % new_email,
+        'users/%s' % self.user_3.email
+    ]
+    ids = rnc.IngestUserNames(self.cnxn, names, self.services, autocreate=True)
+
+    new_id = self.services.user.LookupUserID(
+        self.cnxn, new_email, autocreate=False)
+    expected_ids = [111, new_id, 333]
+    self.assertEqual(expected_ids, ids)
+
+  def testConvertUserName(self):
+    """We can convert a single User ID to resource name."""
+    self.assertEqual(rnc.ConvertUserName(111), 'users/111')
+
+  def testConvertUserNames(self):
+    """We can get User resource names."""
+    expected_dict = {111: 'users/111', 222: 'users/222', 333: 'users/333'}
+    self.assertEqual(rnc.ConvertUserNames(expected_dict.keys()), expected_dict)
+
+  def testConvertUserNames_Empty(self):
+    """We can process an empty Users list."""
+    self.assertEqual(rnc.ConvertUserNames([]), {})
+
+  def testConvertProjectStarName(self):
+    """We can convert a User ID and Project ID to resource name."""
+    name = rnc.ConvertProjectStarName(
+        self.cnxn, 111, self.project_1.project_id, self.services)
+    expected = 'users/111/projectStars/{}'.format(self.project_1.project_name)
+    self.assertEqual(name, expected)
+
+  def testConvertProjectStarName_NoSuchProjectException(self):
+    """Throws an exception when Project ID is invalid."""
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.ConvertProjectStarName(self.cnxn, 111, 123455, self.services)
+
+  def testIngestProjectName(self):
+    """We can get project name from Project resource names."""
+    name = 'projects/{}'.format(self.project_1.project_name)
+    expected = self.project_1.project_id
+    self.assertEqual(
+        rnc.IngestProjectName(self.cnxn, name, self.services), expected)
+
+  def testIngestProjectName_InvalidName(self):
+    """An exception is raised if the Hotlist's resource name is invalid"""
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestProjectName(self.cnxn, 'projects/', self.services)
+
+  def testConvertTemplateNames(self):
+    """We can get IssueTemplate resource names."""
+    expected_resource_name = 'projects/{}/templates/{}'.format(
+        self.project_1.project_name, self.template_1.template_id)
+    expected = {self.template_1.template_id: expected_resource_name}
+
+    self.assertEqual(
+        rnc.ConvertTemplateNames(
+            self.cnxn, self.project_1.project_id, [self.template_1.template_id],
+            self.services), expected)
+
+  def testConvertTemplateNames_NoSuchProjectException(self):
+    """We get an exception if project with id does not exist."""
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.ConvertTemplateNames(
+          self.cnxn, self.dne_project_id, [self.template_1.template_id],
+          self.services)
+
+  def testConvertTemplateNames_NonExistentTemplate(self):
+    """We only return templates that exist."""
+    self.assertEqual(
+        rnc.ConvertTemplateNames(
+            self.cnxn, self.project_1.project_id, [self.dne_template_id],
+            self.services), {})
+
+  def testConvertTemplateNames_TemplateInProject(self):
+    """We only return templates in the project."""
+    expected_resource_name = 'projects/{}/templates/{}'.format(
+        self.project_2.project_name, self.template_2.template_id)
+    expected = {self.template_2.template_id: expected_resource_name}
+
+    self.assertEqual(
+        rnc.ConvertTemplateNames(
+            self.cnxn, self.project_2.project_id,
+            [self.template_1.template_id, self.template_2.template_id],
+            self.services), expected)
+
+  def testIngestTemplateName(self):
+    name = 'projects/{}/templates/{}'.format(
+        self.project_1.project_name, self.template_1.template_id)
+    actual = rnc.IngestTemplateName(self.cnxn, name, self.services)
+    expected = (self.template_1.template_id, self.project_1.project_id)
+    self.assertEqual(actual, expected)
+
+  def testIngestTemplateName_DoesNotExist(self):
+    """We will ingest templates that don't exist."""
+    name = 'projects/{}/templates/{}'.format(
+        self.project_1.project_name, self.dne_template_id)
+    actual = rnc.IngestTemplateName(self.cnxn, name, self.services)
+    expected = (self.dne_template_id, self.project_1.project_id)
+    self.assertEqual(actual, expected)
+
+  def testIngestTemplateName_InvalidName(self):
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestTemplateName(
+          self.cnxn, 'projects/asdf/misspelled_template/123', self.services)
+
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.IngestTemplateName(
+          self.cnxn, 'projects/asdf/templates/123', self.services)
+
+  def testConvertStatusDefNames(self):
+    """We can get Status resource name."""
+    expected_resource_name = 'projects/{}/statusDefs/{}'.format(
+        self.project_1.project_name, self.issue_1.status)
+
+    actual = rnc.ConvertStatusDefNames(
+        self.cnxn, [self.issue_1.status], self.project_1.project_id,
+        self.services)
+    self.assertEqual(actual[self.issue_1.status], expected_resource_name)
+
+  def testConvertStatusDefNames_NoSuchProjectException(self):
+    """We can get an exception if project with id does not exist."""
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.ConvertStatusDefNames(
+          self.cnxn, [self.issue_1.status], self.dne_project_id, self.services)
+
+  def testConvertLabelDefNames(self):
+    """We can get Label resource names."""
+    expected_label = 'some label'
+    expected_resource_name = 'projects/{}/labelDefs/{}'.format(
+        self.project_1.project_name, expected_label)
+
+    self.assertEqual(
+        rnc.ConvertLabelDefNames(
+            self.cnxn, [expected_label], self.project_1.project_id,
+            self.services), {expected_label: expected_resource_name})
+
+  def testConvertLabelDefNames_NoSuchProjectException(self):
+    """We can get an exception if project with id does not exist."""
+    some_label = 'some label'
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.ConvertLabelDefNames(
+          self.cnxn, [some_label], self.dne_project_id, self.services)
+
+  def testConvertComponentDefNames(self):
+    """We can get Component resource names."""
+    expected_id = 123456
+    expected_resource_name = 'projects/{}/componentDefs/{}'.format(
+        self.project_1.project_name, expected_id)
+
+    self.assertEqual(
+        rnc.ConvertComponentDefNames(
+            self.cnxn, [expected_id], self.project_1.project_id, self.services),
+        {expected_id: expected_resource_name})
+
+  def testConvertComponentDefNames_NoSuchProjectException(self):
+    """We can get an exception if project with id does not exist."""
+    component_id = 123456
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.ConvertComponentDefNames(
+          self.cnxn, [component_id], self.dne_project_id, self.services)
+
+  def testIngestComponentDefNames(self):
+    names = [
+        'projects/proj/componentDefs/%d' % self.component_def_1_id,
+        'projects/proj/componentDefs/%s' % self.component_def_2_path
+    ]
+    actual = rnc.IngestComponentDefNames(self.cnxn, names, self.services)
+    self.assertEqual(actual, [
+        (self.project_1.project_id, self.component_def_1_id),
+        (self.project_1.project_id, self.component_def_2_id)])
+
+  def testIngestComponentDefNames_NoSuchProjectException(self):
+    names = ['projects/xyz/componentDefs/%d' % self.component_def_1_id]
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.IngestComponentDefNames(self.cnxn, names, self.services)
+
+    names = ['projects/xyz/componentDefs/1', 'projects/zyz/componentDefs/1']
+    expected_error = 'Project not found: xyz.\nProject not found: zyz.'
+    with self.assertRaisesRegexp(exceptions.NoSuchProjectException,
+                                 expected_error):
+      rnc.IngestComponentDefNames(self.cnxn, names, self.services)
+
+  def testIngestComponentDefNames_NoSuchComponentException(self):
+    names = ['projects/proj/componentDefs/%d' % self.dne_component_def_id]
+    with self.assertRaises(exceptions.NoSuchComponentException):
+      rnc.IngestComponentDefNames(self.cnxn, names, self.services)
+
+    names = [
+        'projects/proj/componentDefs/999', 'projects/proj/componentDefs/cow'
+    ]
+    expected_error = 'Component not found: 999.\nComponent not found: \'cow\'.'
+    with self.assertRaisesRegexp(exceptions.NoSuchComponentException,
+                                 expected_error):
+      rnc.IngestComponentDefNames(self.cnxn, names, self.services)
+
+  def testIngestComponentDefNames_InvalidNames(self):
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestComponentDefNames(
+          self.cnxn, ['projects/proj/componentDefs/not.path.or.id'],
+          self.services)
+
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestComponentDefNames(
+          self.cnxn, ['projects/proj/componentDefs/Foo>'], self.services)
+
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestComponentDefNames(
+          self.cnxn, ['projects/proj/componentDefs/>Bar'], self.services)
+
+    with self.assertRaises(exceptions.InputException):
+      rnc.IngestComponentDefNames(
+          self.cnxn, ['projects/proj/componentDefs/Foo>123Bar'], self.services)
+
+  def testIngestComponentDefNames_CrossProject(self):
+    names = [
+        'projects/proj/componentDefs/%d' % self.component_def_1_id,
+        'projects/goose/componentDefs/%s' % self.component_def_3_path
+    ]
+    actual = rnc.IngestComponentDefNames(self.cnxn, names, self.services)
+    self.assertEqual(actual, [
+        (self.project_1.project_id, self.component_def_1_id),
+        (self.project_2.project_id, self.component_def_3_id)])
+
+  def testConvertFieldDefNames(self):
+    """Returns resource names for fields that exist and ignores others."""
+    expected_key = self.field_def_1
+    expected_value = 'projects/{}/fieldDefs/{}'.format(
+        self.project_1.project_name, self.field_def_1)
+
+    field_ids = [self.field_def_1, self.dne_field_def_id]
+    self.assertEqual(
+        rnc.ConvertFieldDefNames(
+            self.cnxn, field_ids, self.project_1.project_id, self.services),
+        {expected_key: expected_value})
+
+  def testConvertFieldDefNames_NoSuchProjectException(self):
+    field_ids = [self.field_def_1, self.dne_field_def_id]
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.ConvertFieldDefNames(
+          self.cnxn, field_ids, self.dne_project_id, self.services)
+
+  def testConvertApprovalDefNames(self):
+    outcome = rnc.ConvertApprovalDefNames(
+        self.cnxn, [self.approval_def_1_id], self.project_1.project_id,
+        self.services)
+
+    expected_key = self.approval_def_1_id
+    expected_value = 'projects/{}/approvalDefs/{}'.format(
+        self.project_1.project_name, self.approval_def_1_id)
+    self.assertEqual(outcome, {expected_key: expected_value})
+
+  def testConvertApprovalDefNames_NoSuchProjectException(self):
+    approval_ids = [self.approval_def_1_id]
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.ConvertApprovalDefNames(
+          self.cnxn, approval_ids, self.dne_project_id, self.services)
+
+  def testConvertProjectName(self):
+    self.assertEqual(
+        rnc.ConvertProjectName(
+            self.cnxn, self.project_1.project_id, self.services),
+        'projects/{}'.format(self.project_1.project_name))
+
+  def testConvertProjectName_NoSuchProjectException(self):
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.ConvertProjectName(self.cnxn, self.dne_project_id, self.services)
+
+  def testConvertProjectConfigName(self):
+    self.assertEqual(
+        rnc.ConvertProjectConfigName(
+            self.cnxn, self.project_1.project_id, self.services),
+        'projects/{}/config'.format(self.project_1.project_name))
+
+  def testConvertProjectConfigName_NoSuchProjectException(self):
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.ConvertProjectConfigName(
+          self.cnxn, self.dne_project_id, self.services)
+
+  def testConvertProjectMemberName(self):
+    self.assertEqual(
+        rnc.ConvertProjectMemberName(
+            self.cnxn, self.project_1.project_id, 111, self.services),
+        'projects/{}/members/{}'.format(self.project_1.project_name, 111))
+
+  def testConvertProjectMemberName_NoSuchProjectException(self):
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.ConvertProjectMemberName(
+          self.cnxn, self.dne_project_id, 111, self.services)
+
+  def testConvertProjectSavedQueryNames(self):
+    query_ids = [self.psq_1.query_id, self.psq_2.query_id, self.dne_psq_id]
+    outcome = rnc.ConvertProjectSavedQueryNames(
+        self.cnxn, query_ids, self.project_1.project_id, self.services)
+
+    expected_value_1 = 'projects/{}/savedQueries/{}'.format(
+        self.project_1.project_name, self.psq_1.name)
+    expected_value_2 = 'projects/{}/savedQueries/{}'.format(
+        self.project_1.project_name, self.psq_2.name)
+    self.assertEqual(
+        outcome, {
+            self.psq_1.query_id: expected_value_1,
+            self.psq_2.query_id: expected_value_2
+        })
+
+  def testConvertProjectSavedQueryNames_NoSuchProjectException(self):
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      rnc.ConvertProjectSavedQueryNames(
+          self.cnxn, [self.psq_1.query_id], self.dne_project_id, self.services)
diff --git a/api/test/sitewide_servicer_test.py b/api/test/sitewide_servicer_test.py
new file mode 100644
index 0000000..3259fbb
--- /dev/null
+++ b/api/test/sitewide_servicer_test.py
@@ -0,0 +1,143 @@
+# Copyright 2018 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
+
+"""Tests for the sitewide servicer."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+import unittest
+
+import mock
+from components.prpc import codes
+from components.prpc import context
+from components.prpc import server
+
+import settings
+from api import sitewide_servicer
+from api.api_proto import common_pb2
+from api.api_proto import sitewide_pb2
+from framework import monorailcontext
+from framework import xsrf
+from services import service_manager
+from testing import fake
+
+
+class SitewideServicerTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        usergroup=fake.UserGroupService(),
+        user=fake.UserService())
+    self.user_1 = self.services.user.TestAddUser('owner@example.com', 111)
+    self.sitewide_svcr = sitewide_servicer.SitewideServicer(
+        self.services, make_rate_limiter=False)
+
+  def CallWrapped(self, wrapped_handler, *args, **kwargs):
+    return wrapped_handler.wrapped(self.sitewide_svcr, *args, **kwargs)
+
+  @mock.patch('services.secrets_svc.GetXSRFKey')
+  @mock.patch('time.time')
+  def testRefreshToken(self, mockTime, mockGetXSRFKey):
+    """We can refresh an expired token."""
+    mockGetXSRFKey.side_effect = lambda: 'fakeXSRFKey'
+    # The token is at the brink of being too old
+    mockTime.side_effect = lambda: 1 + xsrf.REFRESH_TOKEN_TIMEOUT_SEC
+
+    token_path = 'token_path'
+    token = xsrf.GenerateToken(111, token_path, 1)
+
+    request = sitewide_pb2.RefreshTokenRequest(
+        token=token, token_path=token_path)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(self.sitewide_svcr.RefreshToken, mc, request)
+
+    self.assertEqual(
+        sitewide_pb2.RefreshTokenResponse(
+            token='QSaKMyXhY752g7n8a34HyTo4NjQwMDE=',
+            token_expires_sec=870901),
+        response)
+
+  @mock.patch('services.secrets_svc.GetXSRFKey')
+  @mock.patch('time.time')
+  def testRefreshToken_InvalidToken(self, mockTime, mockGetXSRFKey):
+    """We reject attempts to refresh an invalid token."""
+    mockGetXSRFKey.side_effect = ['fakeXSRFKey']
+    mockTime.side_effect = [123]
+
+    token_path = 'token_path'
+    token = 'invalidToken'
+
+    request = sitewide_pb2.RefreshTokenRequest(
+        token=token, token_path=token_path)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    with self.assertRaises(xsrf.TokenIncorrect):
+      self.CallWrapped(self.sitewide_svcr.RefreshToken, mc, request)
+
+  @mock.patch('services.secrets_svc.GetXSRFKey')
+  @mock.patch('time.time')
+  def testRefreshToken_TokenTooOld(self, mockTime, mockGetXSRFKey):
+    """We reject attempts to refresh a token that's too old."""
+    mockGetXSRFKey.side_effect = lambda: 'fakeXSRFKey'
+    mockTime.side_effect = lambda: 2 + xsrf.REFRESH_TOKEN_TIMEOUT_SEC
+
+    token_path = 'token_path'
+    token = xsrf.GenerateToken(111, token_path, 1)
+
+    request = sitewide_pb2.RefreshTokenRequest(
+        token=token, token_path=token_path)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    with self.assertRaises(xsrf.TokenIncorrect):
+      self.CallWrapped(self.sitewide_svcr.RefreshToken, mc, request)
+
+  def testGetServerStatus_Normal(self):
+    request = sitewide_pb2.GetServerStatusRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(self.sitewide_svcr.GetServerStatus, mc, request)
+
+    self.assertEqual(
+        sitewide_pb2.GetServerStatusResponse(),
+        response)
+
+  @mock.patch('settings.banner_message', 'Message')
+  def testGetServerStatus_BannerMessage(self):
+    request = sitewide_pb2.GetServerStatusRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(self.sitewide_svcr.GetServerStatus, mc, request)
+
+    self.assertEqual(
+        sitewide_pb2.GetServerStatusResponse(banner_message='Message'),
+        response)
+
+  @mock.patch('settings.banner_time', (2019, 6, 13, 18, 30))
+  def testGetServerStatus_BannerTime(self):
+    request = sitewide_pb2.GetServerStatusRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(self.sitewide_svcr.GetServerStatus, mc, request)
+
+    self.assertEqual(
+        sitewide_pb2.GetServerStatusResponse(banner_time=1560450600),
+        response)
+
+  @mock.patch('settings.read_only', True)
+  def testGetServerStatus_ReadOnly(self):
+    request = sitewide_pb2.GetServerStatusRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(self.sitewide_svcr.GetServerStatus, mc, request)
+
+    self.assertEqual(
+        sitewide_pb2.GetServerStatusResponse(read_only=True),
+        response)
diff --git a/api/test/users_servicer_test.py b/api/test/users_servicer_test.py
new file mode 100644
index 0000000..aa25d18
--- /dev/null
+++ b/api/test/users_servicer_test.py
@@ -0,0 +1,606 @@
+# Copyright 2018 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
+
+"""Tests for the users servicer."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mox
+from components.prpc import codes
+from components.prpc import context
+from components.prpc import server
+
+from api import users_servicer
+from api.api_proto import common_pb2
+from api.api_proto import users_pb2
+from api.api_proto import user_objects_pb2
+from framework import authdata
+from framework import exceptions
+from framework import monorailcontext
+from framework import permissions
+from proto import project_pb2
+from proto import tracker_pb2
+from proto import user_pb2
+from testing import fake
+from services import service_manager
+
+
+class UsersServicerTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        user_star=fake.UserStarService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService(),
+        project_star=fake.ProjectStarService(),
+        features=fake.FeaturesService())
+    self.project = self.services.project.TestAddProject('proj', project_id=987)
+    self.user = self.services.user.TestAddUser('owner@example.com', 111)
+    self.user_2 = self.services.user.TestAddUser('test2@example.com', 222)
+    self.group1_id = self.services.usergroup.CreateGroup(
+        self.cnxn, self.services, 'group1@test.com', 'anyone')
+    self.group2_id = self.services.usergroup.CreateGroup(
+        self.cnxn, self.services, 'group2@test.com', 'anyone')
+    self.services.usergroup.UpdateMembers(
+        self.cnxn, self.group1_id, [111], 'member')
+    self.services.usergroup.UpdateMembers(
+        self.cnxn, self.group2_id, [222, 111], 'owner')
+    self.users_svcr = users_servicer.UsersServicer(
+        self.services, make_rate_limiter=False)
+    self.prpc_context = context.ServicerContext()
+    self.prpc_context.set_code(codes.StatusCode.OK)
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def CallWrapped(self, wrapped_handler, *args, **kwargs):
+    return wrapped_handler.wrapped(self.users_svcr, *args, **kwargs)
+
+  def testGetMemberships(self):
+    request = users_pb2.GetMembershipsRequest(
+        user_ref=common_pb2.UserRef(
+            display_name='owner@example.com', user_id=111))
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    response = self.CallWrapped(self.users_svcr.GetMemberships, mc, request)
+    expected_group_refs = [
+        common_pb2.UserRef(
+            display_name='group1@test.com', user_id=self.group1_id),
+        common_pb2.UserRef(
+            display_name='group2@test.com', user_id=self.group2_id)
+    ]
+
+    self.assertItemsEqual(expected_group_refs, response.group_refs)
+
+  def testGetMemberships_NonExistentUser(self):
+    request = users_pb2.GetMembershipsRequest(
+        user_ref=common_pb2.UserRef(
+            display_name='ghost@example.com', user_id=888)
+    )
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='')
+
+    with self.assertRaises(exceptions.NoSuchUserException):
+      self.CallWrapped(self.users_svcr.GetMemberships, mc, request)
+
+  def testGetUser(self):
+    """We can get a user by email address."""
+    user_ref = common_pb2.UserRef(display_name='test2@example.com')
+    request = users_pb2.GetUserRequest(user_ref=user_ref)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.users_svcr.GetUser, mc, request)
+    self.assertEqual(response.display_name, 'test2@example.com')
+    self.assertEqual(response.user_id, 222)
+    self.assertFalse(response.is_site_admin)
+
+    self.user_2.is_site_admin = True
+    response = self.CallWrapped(
+        self.users_svcr.GetUser, mc, request)
+    self.assertTrue(response.is_site_admin)
+
+  def testListReferencedUsers(self):
+    """We can get all valid users by email addresses."""
+    request = users_pb2.ListReferencedUsersRequest(
+        # we ignore emails that are empty or belong to non-existent users.
+        user_refs=[
+            common_pb2.UserRef(display_name='test2@example.com'),
+            common_pb2.UserRef(display_name='ghost@example.com'),
+            common_pb2.UserRef(display_name=''),
+            common_pb2.UserRef()])
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.users_svcr.ListReferencedUsers, mc, request)
+    self.assertEqual(len(response.users), 1)
+    self.assertEqual(response.users[0].user_id, 222)
+
+  def testListReferencedUsers_Deprecated(self):
+    """We can get all valid users by email addresses."""
+    request = users_pb2.ListReferencedUsersRequest(
+        # we ignore emails that are empty or belong to non-existent users.
+        emails=[
+            'test2@example.com',
+            'ghost@example.com',
+            ''])
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.users_svcr.ListReferencedUsers, mc, request)
+    self.assertEqual(len(response.users), 1)
+    self.assertEqual(response.users[0].user_id, 222)
+
+  def CallGetStarCount(self):
+    request = users_pb2.GetUserStarCountRequest(
+        user_ref=common_pb2.UserRef(user_id=222))
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(
+        self.users_svcr.GetUserStarCount, mc, request)
+    return response.star_count
+
+  def CallStar(self, requester='owner@example.com', starred=True):
+    request = users_pb2.StarUserRequest(
+        user_ref=common_pb2.UserRef(user_id=222), starred=starred)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=requester)
+    response = self.CallWrapped(
+        self.users_svcr.StarUser, mc, request)
+    return response.star_count
+
+  def testStarCount_Normal(self):
+    self.assertEqual(0, self.CallGetStarCount())
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(1, self.CallGetStarCount())
+
+  def testStarCount_StarTwiceSameUser(self):
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(1, self.CallGetStarCount())
+
+  def testStarCount_StarTwiceDifferentUser(self):
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(2, self.CallStar(requester='test2@example.com'))
+    self.assertEqual(2, self.CallGetStarCount())
+
+  def testStarCount_RemoveStarTwiceSameUser(self):
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(1, self.CallGetStarCount())
+
+    self.assertEqual(0, self.CallStar(starred=False))
+    self.assertEqual(0, self.CallStar(starred=False))
+    self.assertEqual(0, self.CallGetStarCount())
+
+  def testStarCount_RemoveStarTwiceDifferentUser(self):
+    self.assertEqual(1, self.CallStar())
+    self.assertEqual(2, self.CallStar(requester='test2@example.com'))
+    self.assertEqual(2, self.CallGetStarCount())
+
+    self.assertEqual(1, self.CallStar(starred=False))
+    self.assertEqual(
+        0, self.CallStar(requester='test2@example.com', starred=False))
+    self.assertEqual(0, self.CallGetStarCount())
+
+  def testSetExpandPermsPreference_KeepOpen(self):
+    request = users_pb2.SetExpandPermsPreferenceRequest(expand_perms=True)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.users_svcr.SetExpandPermsPreference, mc, request)
+
+    user = self.services.user.GetUser(self.cnxn, self.user.user_id)
+    self.assertTrue(user.keep_people_perms_open)
+
+  def testSetExpandPermsPreference_DontKeepOpen(self):
+    request = users_pb2.SetExpandPermsPreferenceRequest(expand_perms=False)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.users_svcr.SetExpandPermsPreference, mc, request)
+
+    user = self.services.user.GetUser(self.cnxn, self.user.user_id)
+    self.assertFalse(user.keep_people_perms_open)
+
+  def testGetUserSavedQueries_Anon(self):
+    """Anon has empty saved queries."""
+    request = users_pb2.GetSavedQueriesRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=None)
+    response = self.CallWrapped(self.users_svcr.GetSavedQueries, mc, request)
+
+    self.assertEqual(0, len(response.saved_queries))
+
+  def testGetUserSavedQueries_Mine(self):
+    """See your own queries."""
+    self.services.features.UpdateUserSavedQueries(self.cnxn, 111, [
+      tracker_pb2.SavedQuery(query_id=101, name='test', query='owner:me'),
+      tracker_pb2.SavedQuery(query_id=202, name='hello', query='world',
+          executes_in_project_ids=[987])
+    ])
+    request = users_pb2.GetUserPrefsRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(self.users_svcr.GetSavedQueries, mc, request)
+
+    self.assertEqual(2, len(response.saved_queries))
+
+    self.assertEqual('test', response.saved_queries[0].name)
+    self.assertEqual('owner:me', response.saved_queries[0].query)
+    self.assertEqual('hello', response.saved_queries[1].name)
+    self.assertEqual('world', response.saved_queries[1].query)
+    self.assertEqual(['proj'], response.saved_queries[1].project_names)
+
+
+  def testGetUserSavedQueries_Other_Allowed(self):
+    """See other people's queries if you're an admin."""
+    self.services.features.UpdateUserSavedQueries(self.cnxn, 111, [
+      tracker_pb2.SavedQuery(query_id=101, name='test', query='owner:me'),
+      tracker_pb2.SavedQuery(query_id=202, name='hello', query='world',
+          executes_in_project_ids=[987])
+    ])
+    self.user_2.is_site_admin = True
+
+    request = users_pb2.GetSavedQueriesRequest()
+    request.user_ref.display_name = 'owner@example.com'
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='test2@example.com')
+
+    response = self.CallWrapped(self.users_svcr.GetSavedQueries, mc, request)
+
+    self.assertEqual(2, len(response.saved_queries))
+
+    self.assertEqual('test', response.saved_queries[0].name)
+    self.assertEqual('owner:me', response.saved_queries[0].query)
+    self.assertEqual('hello', response.saved_queries[1].name)
+    self.assertEqual('world', response.saved_queries[1].query)
+    self.assertEqual(['proj'], response.saved_queries[1].project_names)
+
+  def testGetUserSavedQueries_Other_Denied(self):
+    """Can't see other people's queries unless you're an admin."""
+    self.services.features.UpdateUserSavedQueries(self.cnxn, 111, [
+      tracker_pb2.SavedQuery(query_id=101, name='test', query='owner:me'),
+      tracker_pb2.SavedQuery(query_id=202, name='hello', query='world',
+          executes_in_project_ids=[987])
+    ])
+
+    request = users_pb2.GetSavedQueriesRequest()
+    request.user_ref.display_name = 'owner@example.com'
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='test2@example.com')
+
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.users_svcr.GetSavedQueries, mc, request)
+
+  def testGetUserPrefs_Anon(self):
+    """Anon always has empty prefs."""
+    request = users_pb2.GetUserPrefsRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=None)
+    response = self.CallWrapped(self.users_svcr.GetUserPrefs, mc, request)
+
+    self.assertEqual(0, len(response.prefs))
+
+  def testGetUserPrefs_Mine_Empty(self):
+    """User who never set any pref gets empty prefs."""
+    request = users_pb2.GetUserPrefsRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(self.users_svcr.GetUserPrefs, mc, request)
+
+    self.assertEqual(0, len(response.prefs))
+
+  def testGetUserPrefs_Mine_Some(self):
+    """User who set a pref gets it back."""
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+    request = users_pb2.GetUserPrefsRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    response = self.CallWrapped(self.users_svcr.GetUserPrefs, mc, request)
+
+    self.assertEqual(1, len(response.prefs))
+    self.assertEqual('code_font', response.prefs[0].name)
+    self.assertEqual('true', response.prefs[0].value)
+
+  def testGetUserPrefs_Other_Allowed(self):
+    """A site admin can read another user's prefs."""
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+    self.user_2.is_site_admin = True
+
+    request = users_pb2.GetUserPrefsRequest()
+    request.user_ref.display_name = 'owner@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='test2@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(self.users_svcr.GetUserPrefs, mc, request)
+
+    self.assertEqual(1, len(response.prefs))
+    self.assertEqual('code_font', response.prefs[0].name)
+    self.assertEqual('true', response.prefs[0].value)
+
+  def testGetUserPrefs_Other_Denied(self):
+    """A non-admin cannot read another user's prefs."""
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+    # user2 is not a site admin.
+
+    request = users_pb2.GetUserPrefsRequest()
+    request.user_ref.display_name = 'owner@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='test2@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.users_svcr.GetUserPrefs, mc, request)
+
+  def testSetUserPrefs_Anon(self):
+    """Anon cannot set prefs."""
+    request = users_pb2.SetUserPrefsRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=None)
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.users_svcr.SetUserPrefs, mc, request)
+
+  def testSetUserPrefs_Mine_Empty(self):
+    """Setting zero prefs is a no-op.."""
+    request = users_pb2.SetUserPrefsRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.users_svcr.SetUserPrefs, mc, request)
+
+    prefs_after = self.services.user.GetUserPrefs(self.cnxn, 111)
+    self.assertEqual(0, len(prefs_after.prefs))
+
+  def testSetUserPrefs_Mine_Add(self):
+    """User can set a preference for the first time."""
+    request = users_pb2.SetUserPrefsRequest(
+        prefs=[user_objects_pb2.UserPrefValue(name='code_font', value='true')])
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.users_svcr.SetUserPrefs, mc, request)
+
+    prefs_after = self.services.user.GetUserPrefs(self.cnxn, 111)
+    self.assertEqual(1, len(prefs_after.prefs))
+    self.assertEqual('code_font', prefs_after.prefs[0].name)
+    self.assertEqual('true', prefs_after.prefs[0].value)
+
+  def testSetUserPrefs_Mine_Overwrite(self):
+    """User can change the value of a pref."""
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+    request = users_pb2.SetUserPrefsRequest(
+        prefs=[user_objects_pb2.UserPrefValue(name='code_font', value='false')])
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+    self.CallWrapped(self.users_svcr.SetUserPrefs, mc, request)
+
+    prefs_after = self.services.user.GetUserPrefs(self.cnxn, 111)
+    self.assertEqual(1, len(prefs_after.prefs))
+    self.assertEqual('code_font', prefs_after.prefs[0].name)
+    self.assertEqual('false', prefs_after.prefs[0].value)
+
+  def testSetUserPrefs_Other_Allowed(self):
+    """A site admin can update another user's prefs."""
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+    self.user_2.is_site_admin = True
+
+    request = users_pb2.SetUserPrefsRequest(
+        prefs=[user_objects_pb2.UserPrefValue(name='code_font', value='false')])
+    request.user_ref.display_name = 'owner@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='test2@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    self.CallWrapped(self.users_svcr.SetUserPrefs, mc, request)
+
+    prefs_after = self.services.user.GetUserPrefs(self.cnxn, 111)
+    self.assertEqual(1, len(prefs_after.prefs))
+    self.assertEqual('code_font', prefs_after.prefs[0].name)
+    self.assertEqual('false', prefs_after.prefs[0].value)
+
+  def testSetUserPrefs_Other_Denied(self):
+    """A non-admin cannot set another user's prefs."""
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+    # user2 is not a site admin.
+
+    request = users_pb2.SetUserPrefsRequest(
+        prefs=[user_objects_pb2.UserPrefValue(name='code_font', value='false')])
+    request.user_ref.display_name = 'owner@example.com'
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='test2@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.users_svcr.SetUserPrefs, mc, request)
+
+    # Regardless of any exception, the preferences remain unchanged.
+    prefs_after = self.services.user.GetUserPrefs(self.cnxn, 111)
+    self.assertEqual(1, len(prefs_after.prefs))
+    self.assertEqual('code_font', prefs_after.prefs[0].name)
+    self.assertEqual('true', prefs_after.prefs[0].value)
+
+  def testInviteLinkedParent_NotFound(self):
+    """Reject attempt to invite a user that does not exist."""
+    self.services.user.TestAddUser('user@google.com', 333)
+    request = users_pb2.InviteLinkedParentRequest(
+        email='who@chromium.org')  # Does not exist.
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='who@google.com')
+    with self.assertRaises(exceptions.NoSuchUserException):
+      self.CallWrapped(self.users_svcr.InviteLinkedParent, mc, request)
+
+  def testInviteLinkedParent_Normal(self):
+    """We can invite accounts to link when all criteria are met."""
+    self.services.user.TestAddUser('user@google.com', 333)
+    self.services.user.TestAddUser('user@chromium.org', 444)
+    request = users_pb2.InviteLinkedParentRequest(
+        email='user@google.com')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@chromium.org')
+    self.CallWrapped(self.users_svcr.InviteLinkedParent, mc, request)
+
+    (invite_as_parent, invite_as_child
+     ) = self.services.user.GetPendingLinkedInvites(self.cnxn, 333)
+    self.assertEqual([444], invite_as_parent)
+    self.assertEqual([], invite_as_child)
+    (invite_as_parent, invite_as_child
+     ) = self.services.user.GetPendingLinkedInvites(self.cnxn, 444)
+    self.assertEqual([], invite_as_parent)
+    self.assertEqual([333], invite_as_child)
+
+  def testAcceptLinkedChild_NotFound(self):
+    """Reject attempt to link a user that does not exist."""
+    self.services.user.TestAddUser('user@google.com', 333)
+    request = users_pb2.AcceptLinkedChildRequest(
+        email='who@chromium.org')  # Does not exist.
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='who@google.com')
+    with self.assertRaises(exceptions.NoSuchUserException):
+      self.CallWrapped(self.users_svcr.AcceptLinkedChild, mc, request)
+
+  def testAcceptLinkedChild_NoInvite(self):
+    """Reject attempt to link accounts when there was no invite."""
+    self.services.user.TestAddUser('user@google.com', 333)
+    self.services.user.TestAddUser('user@chromium.org', 444)
+    request = users_pb2.AcceptLinkedChildRequest(
+        email='user@chromium.org')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@google.com')
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.users_svcr.AcceptLinkedChild, mc, request)
+
+  def testAcceptLinkedChild_Normal(self):
+    """We can linke accounts when all criteria are met."""
+    parent = self.services.user.TestAddUser('user@google.com', 333)
+    child = self.services.user.TestAddUser('user@chromium.org', 444)
+    self.services.user.InviteLinkedParent(
+        self.cnxn, parent.user_id, child.user_id)
+    request = users_pb2.AcceptLinkedChildRequest(
+        email='user@chromium.org')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@google.com')
+    self.CallWrapped(self.users_svcr.AcceptLinkedChild, mc, request)
+
+    self.assertEqual(parent.user_id, child.linked_parent_id)
+    self.assertIn(child.user_id, parent.linked_child_ids)
+
+  def testUnlinkAccounts_NotFound(self):
+    """Reject attempt to unlink a user that does not exist or unspecified."""
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    request = users_pb2.UnlinkAccountsRequest(
+        parent=common_pb2.UserRef(display_name='who@chromium.org'),
+        child=common_pb2.UserRef(display_name='owner@example.com'))
+    with self.assertRaises(exceptions.NoSuchUserException):
+      self.CallWrapped(self.users_svcr.UnlinkAccounts, mc, request)
+
+    request = users_pb2.UnlinkAccountsRequest(
+        parent=common_pb2.UserRef(display_name='owner@example.com'),
+        child=common_pb2.UserRef(display_name='who@google.com'))
+    with self.assertRaises(exceptions.NoSuchUserException):
+      self.CallWrapped(self.users_svcr.UnlinkAccounts, mc, request)
+
+    request = users_pb2.UnlinkAccountsRequest(
+        parent=common_pb2.UserRef(display_name='owner@example.com'))
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.users_svcr.UnlinkAccounts, mc, request)
+
+    request = users_pb2.UnlinkAccountsRequest(
+        child=common_pb2.UserRef(display_name='owner@example.com'))
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.users_svcr.UnlinkAccounts, mc, request)
+
+  def testUnlinkAccounts_Normal(self):
+    """Users can unlink their accounts."""
+    self.services.user.linked_account_rows = [(111, 222)]
+    request = users_pb2.UnlinkAccountsRequest(
+        parent=common_pb2.UserRef(display_name='owner@example.com'),
+        child=common_pb2.UserRef(display_name='test2@example.com'))
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='owner@example.com')
+
+    self.CallWrapped(self.users_svcr.UnlinkAccounts, mc, request)
+
+    self.assertEqual([], self.services.user.linked_account_rows)
+
+  def AddUserProjects(self, user_id):
+    project_states = {
+        'live': project_pb2.ProjectState.LIVE,
+        'archived': project_pb2.ProjectState.ARCHIVED,
+        'deletable': project_pb2.ProjectState.DELETABLE}
+
+    for name, state in project_states.items():
+      self.services.project.TestAddProject(
+          'owner-%s-%s' % (name, user_id), state=state, owner_ids=[user_id])
+      self.services.project.TestAddProject(
+          'committer-%s-%s' % (name, user_id), state=state,\
+          committer_ids=[user_id])
+      contributor = self.services.project.TestAddProject(
+          'contributor-%s-%s' % (name, user_id), state=state)
+      contributor.contributor_ids = [user_id]
+
+    members_only = self.services.project.TestAddProject(
+        'members-only-' + str(user_id), owner_ids=[user_id])
+    members_only.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+
+  def testGetUsersProjects(self):
+    self.user = self.services.user.TestAddUser('test3@example.com', 333)
+    self.services.project_star.SetStar(
+        self.cnxn, self.project.project_id, 222, True)
+    self.project.committer_ids.extend([222])
+
+    self.AddUserProjects(222)
+    self.AddUserProjects(333)
+
+    request = users_pb2.GetUsersProjectsRequest(user_refs=[
+        common_pb2.UserRef(display_name='test2@example.com'),
+        common_pb2.UserRef(display_name='test3@example.com')])
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='test2@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(
+        self.users_svcr.GetUsersProjects, mc, request)
+
+    self.assertEqual([
+        user_objects_pb2.UserProjects(
+            user_ref=common_pb2.UserRef(display_name='test2@example.com'),
+            owner_of=['members-only-222', 'owner-live-222'],
+            member_of=['committer-live-222', 'proj'],
+            contributor_to=['contributor-live-222'],
+            starred_projects=['proj']),
+        user_objects_pb2.UserProjects(
+            user_ref=common_pb2.UserRef(display_name='test3@example.com'),
+            owner_of=['owner-live-333'],
+            member_of=['committer-live-333'],
+            contributor_to=['contributor-live-333'])],
+        list(response.users_projects))
+
+  def testGetUsersProjects_NoUserRefs(self):
+    request = users_pb2.GetUsersProjectsRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='test2@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(
+        self.users_svcr.GetUsersProjects, mc, request)
+    self.assertEqual([], list(response.users_projects))
diff --git a/api/test_call b/api/test_call
new file mode 100755
index 0000000..5455241
--- /dev/null
+++ b/api/test_call
@@ -0,0 +1,157 @@
+#!/usr/bin/env python
+"""
+This is a helper script for making pRPC API calls during local development.
+
+Usage examples:
+
+To test an anonymous request to your own local monorail server:
+1. Run 'make serve' in another shell
+2. `./api/test_call monorail.Projects ListComponents
+     '{"project_name": "monorail", "include_admin_info": true}'`
+
+To test a signed in request to your own local monorail server:
+1. Run 'make serve' in another shell
+2. `./api/test_call monorail.Projects ListComponents
+     '{"project_name": "monorail", "include_admin_info": true}'
+     --test_account=test@example.com`
+Note that test account email address must always end in @example.com.
+
+To test an anonymous request to your monorail staging server:
+1. Deploy your staging server version, e.g., 12345-76697e9-tainted-jrobbins.
+2. Visit your staging server in a new incognito window and view source
+   to find the XSRF token for the anonymous user in JS var CS_env['token'].
+3. `./api/test_call monorail.Projects ListComponents
+    '{"project_name": "monorail", "include_admin_info": true}'
+    --host=12345-76697e9-tainted-jrobbins-dot-monorail-staging.appspot.com
+    --xsrf-token='THE_ANON_TOKEN'`
+
+To test a signed-in request to your monorail staging server using
+the client_id for monorail-staging and your own account:
+1. Make sure that you have a role in the monorail-staging project.
+2. Have your account allowlisted by email address.
+3. Download the monorail-staging app credientials via
+   `gcloud --project=monorail-staging auth login`.
+4. `./api/test_call monorail.Projects ListComponents
+    '{"project_name": "monorail", "include_admin_info": true}'
+    --host=12345-76697e9-tainted-jrobbins-dot-monorail-staging.appspot.com
+    --use-app-credentials`
+
+To test a signed-in request to your monorail staging server using
+a service account client secrets file that you download:
+(Note: This is not recommended for prod because downloading secrets
+is a bad practice.)
+1. Create a service account via the Cloud Console for any project.
+   Choose "IAM & Admin" > "Service accounts".
+   Press "+ Create Service Account".
+   Fill in the form and submit it to save a service account .json file
+   to your local disk.  Keep this file private.
+2. File an issue on /p/monorail to allowlist your client_id and/or
+   client_email.  Or, author a CL yourself to add it to the allowlist.
+3. `./api/test_call monorail.Projects ListComponents
+    '{"project_name": "monorail", "include_admin_info": true}'
+    --host=12345-76697e9-tainted-jrobbins-dot-monorail-staging.appspot.com
+    --service-account=FILENAME_OF_SERVICE_ACCOUNT_JSON_FILE`
+"""
+
+import argparse
+import errno
+import json
+import logging
+import os
+import sys
+
+
+monorail_dir = os.path.dirname(os.path.abspath(__file__ + '/..'))
+third_party_path = os.path.join(monorail_dir, 'third_party')
+if third_party_path not in sys.path:
+  sys.path.insert(0, third_party_path)
+
+import httplib2
+from oauth2client.client import GoogleCredentials
+
+
+URL_BASE = 'http://localhost:8080/prpc/'
+OAUTH_SCOPE = 'https://www.googleapis.com/auth/userinfo.email'
+
+def make_http(args):
+  """Return an httplib2.Http object, with or without oauth."""
+  http = httplib2.Http()
+  credentials = None
+  if args.use_app_credentials:
+    credentials = GoogleCredentials.get_application_default()
+  if args.service_account:
+    credentials = GoogleCredentials.from_stream(args.service_account)
+    logging.debug('Will request as user %r', credentials.service_account_email)
+
+  if credentials:
+    credentials = credentials.create_scoped([OAUTH_SCOPE])
+    logging.debug('Will request as client %r', credentials.client_id)
+    if not args.host:
+      print(('[ERROR] OAuth on localhost will always see user '
+             'example@example.com, so we do not support that.\n'
+             'Instead, add --server=YOUR_STAGING_SERVER, '
+             'or use --test_account=USER@example.com.'))
+      sys.exit(1)
+
+    http = credentials.authorize(http)
+
+  return http
+
+def make_call(service, method, json_body, args):
+  """Call the server and print the response contents."""
+  body = json.loads(json_body)
+
+  url_base = URL_BASE
+  if args.host:
+    url_base = 'https://%s/prpc/' % args.host
+  url = '%s%s/%s' % (url_base, service, method)
+  logging.debug('Request URL: %s', url)
+
+  http = make_http(args)
+  headers = {
+      'Content-Type': 'application/json',
+      'Accept': 'application/json',
+      }
+  if args.test_account:
+    headers['x-test-account'] = args.test_account
+  if args.xsrf_token:
+    headers['x-xsrf-token'] = args.xsrf_token
+  body = json.dumps(body)
+
+  logging.debug('Body: %r' % body)
+  try:
+    response, contents = http.request(
+        url, method='POST', body=body, headers=headers)
+    logging.info('Received response: %s', contents)
+  except httplib2.HttpLib2Error as e:
+    if hasattr(e.reason, 'errno') and e.reason.errno == errno.ECONNREFUSED:
+      print('[Error] Could not reach server. Is it running?')
+    else:
+      raise e
+
+
+if __name__ == '__main__':
+  parser = argparse.ArgumentParser(description='Process some integers.')
+  parser.add_argument('service', help='pRPC service name.')
+  parser.add_argument('method', help='pRPC method name.')
+  parser.add_argument('json_body', help='pRPC HTTP body in valid JSON.')
+  parser.add_argument('--test-account',
+      help='Test account to use, in the form of an email.')
+  parser.add_argument('--xsrf-token', help='Custom XSRF token.')
+  parser.add_argument('--host', help='remote server FQDN.')
+  parser.add_argument(
+      '--use-app-credentials',
+      help='Use credentials of a GAE app that you are signed into via gcloud.',
+      action='store_true')
+  parser.add_argument(
+      '--service-account', help='Service account credentials JSON file name.')
+  parser.add_argument('-v', '--verbose', action='store_true')
+  args = parser.parse_args()
+
+  if args.verbose:
+    log_level = logging.DEBUG
+  else:
+    log_level = logging.INFO
+  logging.basicConfig(format='%(levelname)s: %(message)s', level=log_level)
+
+  make_call(args.service, args.method, args.json_body, args)
diff --git a/api/users_servicer.py b/api/users_servicer.py
new file mode 100644
index 0000000..d106868
--- /dev/null
+++ b/api/users_servicer.py
@@ -0,0 +1,217 @@
+# Copyright 2018 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from api import converters
+from api import monorail_servicer
+from api import converters
+from api.api_proto import users_pb2
+from api.api_proto import users_prpc_pb2
+from api.api_proto import user_objects_pb2
+from businesslogic import work_env
+from framework import authdata
+from framework import framework_views
+from framework import permissions
+
+class UsersServicer(monorail_servicer.MonorailServicer):
+  """Handle API requests related to User objects.
+
+  Each API request is implemented with a method as defined in the
+  .proto file that does any request-specific validation, uses work_env
+  to safely operate on business objects, and returns a response proto.
+  """
+
+  DESCRIPTION = users_prpc_pb2.UsersServiceDescription
+
+  @monorail_servicer.PRPCMethod
+  def GetUser(self, mc, request):
+    """Return info about the specified user."""
+    with work_env.WorkEnv(mc, self.services) as we:
+      users, linked_user_ids = we.ListReferencedUsers(
+          [request.user_ref.display_name])
+      linked_user_views = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, linked_user_ids)
+
+    with mc.profiler.Phase('converting to response objects'):
+      response_users = converters.ConvertUsers(users, linked_user_views)
+
+    return response_users[0]
+
+  @monorail_servicer.PRPCMethod
+  def ListReferencedUsers(self, mc, request):
+    """Return the list of existing users in a response proto."""
+    emails = request.emails
+    if request.user_refs:
+      emails = [user_ref.display_name for user_ref in request.user_refs]
+    with work_env.WorkEnv(mc, self.services) as we:
+      users, linked_user_ids = we.ListReferencedUsers(emails)
+      linked_user_views = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, linked_user_ids)
+
+    with mc.profiler.Phase('converting to response objects'):
+      response_users = converters.ConvertUsers(users, linked_user_views)
+      response = users_pb2.ListReferencedUsersResponse(users=response_users)
+
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def GetMemberships(self, mc, request):
+    """Return the user groups for the given user visible to the requester."""
+    user_id = converters.IngestUserRef(
+        mc.cnxn, request.user_ref, self.services.user)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      group_ids = we.GetMemberships(user_id)
+
+    with mc.profiler.Phase('converting to response objects'):
+      groups_by_id = framework_views.MakeAllUserViews(
+          mc.cnxn, self.services.user, group_ids)
+      group_refs = converters.ConvertUserRefs(
+          group_ids, [], groups_by_id, True)
+
+      return users_pb2.GetMembershipsResponse(group_refs=group_refs)
+
+  @monorail_servicer.PRPCMethod
+  def GetUserStarCount(self, mc, request):
+    """Return the star count for a given user."""
+    user_id = converters.IngestUserRef(
+        mc.cnxn, request.user_ref, self.services.user)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      star_count = we.GetUserStarCount(user_id)
+
+    result = users_pb2.GetUserStarCountResponse(star_count=star_count)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def StarUser(self, mc, request):
+    """Star a given user."""
+    user_id = converters.IngestUserRef(
+        mc.cnxn, request.user_ref, self.services.user)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.StarUser(user_id, request.starred)
+      star_count = we.GetUserStarCount(user_id)
+
+    result = users_pb2.StarUserResponse(star_count=star_count)
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def SetExpandPermsPreference(self, mc, request):
+    """Set a users preference on whether to expand perms by default."""
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.UpdateUserSettings(
+          mc.auth.user_pb, keep_people_perms_open=request.expand_perms)
+
+    result = users_pb2.SetExpandPermsPreferenceResponse()
+    return result
+
+  def _SignedInOrSpecifiedUser(self, mc, request):
+    """If request specifies a user, return it.  Otherwise signed-in user."""
+    user_id = mc.auth.user_id
+    if request.HasField('user_ref'):
+      user_id = converters.IngestUserRef(
+          mc.cnxn, request.user_ref, self.services.user)
+    return user_id
+
+  @monorail_servicer.PRPCMethod
+  def GetSavedQueries(self, mc, request):
+    """Get a user's saved queries."""
+    user_id = self._SignedInOrSpecifiedUser(mc, request)
+
+    # Only site admins can view other user's saved queries.
+    if user_id != mc.auth.user_id and not mc.auth.user_pb.is_site_admin:
+      raise permissions.PermissionException(
+        'You are not allowed to view this user\'s saved queries')
+
+    saved_queries = self.services.features.GetSavedQueriesByUserID(
+        mc.cnxn, user_id)
+    return users_pb2.GetSavedQueriesResponse(
+        saved_queries=converters.IngestSavedQueries(mc.cnxn,
+            self.services.project, saved_queries))
+
+  @monorail_servicer.PRPCMethod
+  def GetUserPrefs(self, mc, request):
+    """Get a user's preferences."""
+    with work_env.WorkEnv(mc, self.services) as we:
+      userprefs = we.GetUserPrefs(self._SignedInOrSpecifiedUser(mc, request))
+
+    result = users_pb2.GetUserPrefsResponse(
+        prefs=converters.ConvertPrefValues(userprefs.prefs))
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def SetUserPrefs(self, mc, request):
+    """Add to or set a users preferences."""
+    with work_env.WorkEnv(mc, self.services) as we:
+      pref_values = converters.IngestPrefValues(request.prefs)
+      we.SetUserPrefs(self._SignedInOrSpecifiedUser(mc, request), pref_values)
+
+    result = users_pb2.SetUserPrefsResponse()
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def InviteLinkedParent(self, mc, request):
+    """Create a linked account invite."""
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.InviteLinkedParent(request.email)
+
+    result = users_pb2.InviteLinkedParentResponse()
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def AcceptLinkedChild(self, mc, request):
+    """Link a child account that has invited this account as parent."""
+    child_id = self.services.user.LookupUserID(mc.cnxn, request.email)
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.AcceptLinkedChild(child_id)
+
+    result = users_pb2.AcceptLinkedChildResponse()
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def UnlinkAccounts(self, mc, request):
+    """Unlink a specificed parent and child account."""
+    parent_id, child_id = converters.IngestUserRefs(
+        mc.cnxn, [request.parent, request.child], self.services.user)
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.UnlinkAccounts(parent_id, child_id)
+
+    result = users_pb2.UnlinkAccountsResponse()
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def GetUsersProjects(self, mc, request):
+    user_ids = converters.IngestUserRefs(
+        mc.cnxn, request.user_refs, self.services.user)
+    user_auths = [
+        authdata.AuthData.FromUserID(mc.cnxn, user_id, self.services)
+        for user_id in user_ids]
+
+    result = users_pb2.GetUsersProjectsResponse()
+    with work_env.WorkEnv(mc, self.services) as we:
+      for user_ref, auth in zip(request.user_refs, user_auths):
+        starred = we.ListStarredProjects(auth.user_id)
+        owner, _archived, member, contrib = we.GetUserProjects(
+            auth.effective_ids)
+        user_projects = result.users_projects.add()
+        user_projects.user_ref.CopyFrom(user_ref)
+        user_projects.owner_of.extend(p.project_name for p in owner)
+        user_projects.member_of.extend(p.project_name for p in member)
+        user_projects.contributor_to.extend(p.project_name for p in contrib)
+        user_projects.starred_projects.extend(p.project_name for p in starred)
+
+    return result
+
+  @monorail_servicer.PRPCMethod
+  def ExpungeUser(self, mc, request):
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.ExpungeUsers([request.email])
+
+    response = users_pb2.ExpungeUserResponse()
+    return response
diff --git a/api/v3/README.md b/api/v3/README.md
new file mode 100644
index 0000000..088cf32
--- /dev/null
+++ b/api/v3/README.md
@@ -0,0 +1,32 @@
+# Monorail v3.0 pRPC API
+
+This directory holds all the source for the Monorail pRPC API. This API is
+implemented using `.proto` files to describe a `gRPC` interface (services,
+methods, and request/response messages). It then uses a shim which
+converts the
+[`gRPC` server](http://www.grpc.io/docs/tutorials/basic/python.html)
+(which doesn't work on AppEngine, due to lack of support for HTTP/2) into a
+[`pRPC` server](https://godoc.org/github.com/luci/luci-go/grpc/prpc) which
+supports communication over HTTP/1.1, as well as text and JSON IO.
+
+- Resource name formats for each message are found in the message's resource annotation `pattern` field.
+- This v3.0 pRPC API is a resource-oriented API and aims to closely follow the principles at aip.dev.
+
+
+## API Documentation
+
+All resources, methods, request parameters, and responses are documented in
+[./api_proto](./api_proto).
+
+Resource name formats for each message are found in the message's resource annotation `pattern` field.
+
+## Development
+
+### Regenerating Python from Protocol Buffers
+
+In order to regenerate the python server and client stubs from the `.proto`
+files, run this command:
+
+```bash
+$ make prpc_proto_v3
+```
diff --git a/api/v3/__init__.py b/api/v3/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/api/v3/__init__.py
diff --git a/api/v3/api_constants.py b/api/v3/api_constants.py
new file mode 100644
index 0000000..9752242
--- /dev/null
+++ b/api/v3/api_constants.py
@@ -0,0 +1,28 @@
+# Copyright 2020 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.
+"""Some constants used by Monorail's v3 API."""
+
+# Max comments per page in the ListComment API.
+MAX_COMMENTS_PER_PAGE = 100
+
+# Max issues per page in the SearchIssues API.
+MAX_ISSUES_PER_PAGE = 100
+
+# Max issues tp fetch in the BatchGetIssues API.
+MAX_BATCH_ISSUES = 100
+
+# Max issues to modify at once in the ModifyIssues API.
+MAX_MODIFY_ISSUES = 100
+
+# Max impacted issues allowed in a ModifyIssues API.
+MAX_MODIFY_IMPACTED_ISSUES = 50
+
+# Max approval values to modify at once in the ModifyIssueApprovalValues API.
+MAX_MODIFY_APPROVAL_VALUES = 100
+
+# Max users to fetch in the BatchGetUsers API.
+MAX_BATCH_USERS = 100
+
+# Max component defs to fetch in the ListComponentDefs API
+MAX_COMPONENTS_PER_PAGE = 100
diff --git a/api/v3/api_proto/__init__.py b/api/v3/api_proto/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/api/v3/api_proto/__init__.py
diff --git a/api/v3/api_proto/feature_objects.proto b/api/v3/api_proto/feature_objects.proto
new file mode 100644
index 0000000..716dc51
--- /dev/null
+++ b/api/v3/api_proto/feature_objects.proto
@@ -0,0 +1,88 @@
+// Copyright 2020 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
+
+// This file defines protobufs for features and related business
+// objects, e.g., hotlists.
+
+syntax = "proto3";
+
+package monorail.v3;
+
+option go_package = "api/v3/api_proto";
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/protobuf/timestamp.proto";
+import "api/v3/api_proto/issue_objects.proto";
+
+// A user-owned list of Issues.
+// Next available tag: 9
+message Hotlist {
+  option (google.api.resource) = {
+    type: "api.crbug.com/Hotlist"
+    pattern: "hotlists/{hotlist_id}"
+  };
+
+  // Resource name of the hotlist.
+  string name = 1;
+  // `display_name` must follow pattern found at `framework_bizobj.RE_HOTLIST_NAME_PATTERN`.
+  string display_name = 2 [ (google.api.field_behavior) = REQUIRED ];
+  // Resource name of the hotlist owner.
+  // Owners can update hotlist settings, editors, owner, and HotlistItems.
+  // TODO(monorail:7023): field_behavior may be changed in the future.
+  string owner = 3 [
+      (google.api.resource_reference) = {type: "api.crbug.com/User"},
+      (google.api.field_behavior) = REQUIRED ];
+  // Resource names of the hotlist editors.
+  // Editors can update hotlist HotlistItems.
+  repeated string editors = 4 [ (google.api.resource_reference) = {type: "api.crbug.com/User"} ];
+  // Summary of the hotlist.
+  string summary = 5 [ (google.api.field_behavior) = REQUIRED ];
+  // More detailed description of the purpose of the hotlist.
+  string description = 6 [ (google.api.field_behavior) = REQUIRED ];
+  // Ordered list of default columns shown on hotlist's issues list view.
+  repeated IssuesListColumn default_columns = 7;
+
+  // Privacy level of a Hotlist.
+  // Next available tag: 2
+  enum HotlistPrivacy {
+    // This value is unused.
+    HOTLIST_PRIVACY_UNSPECIFIED = 0;
+    // Only the owner and editors of the hotlist can view the hotlist.
+    PRIVATE = 1;
+    // Anyone on the web can view the hotlist.
+    PUBLIC = 2;
+  }
+  HotlistPrivacy hotlist_privacy = 8;
+}
+
+
+// Represents the the position of an Issue in a Hotlist.
+// Next available tag: 7
+message HotlistItem {
+  option (google.api.resource) = {
+    type: "api.crbug.com/HotlistItem"
+    pattern: "hotlists/{hotlist_id}/items/{item_id}"
+  };
+
+  // Resource name of the HotlistItem.
+  string name = 1;
+  // The Issue associated with this item.
+  string issue = 2 [
+      (google.api.resource_reference) = {type: "api.crbug.com/Issue"},
+      (google.api.field_behavior) = IMMUTABLE ];
+  // Represents the item's position in the Hotlist in decreasing priority order.
+  // Values will be from 1 to N (the size of the hotlist), each item having a unique rank.
+  // Changes to rank must be made in `RerankHotlistItems`.
+  uint32 rank = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+  // Resource name of the adder of HotlistItem.
+  string adder = 4 [
+      (google.api.resource_reference) = {type: "api.crbug.com/User"},
+      (google.api.field_behavior) = OUTPUT_ONLY ];
+  // The time this HotlistItem was added to the hotlist.
+  google.protobuf.Timestamp create_time = 5  [ (google.api.field_behavior) = OUTPUT_ONLY ];
+  // User-provided additional details about this item.
+  string note = 6;
+}
\ No newline at end of file
diff --git a/api/v3/api_proto/feature_objects_pb2.py b/api/v3/api_proto/feature_objects_pb2.py
new file mode 100644
index 0000000..37a1d21
--- /dev/null
+++ b/api/v3/api_proto/feature_objects_pb2.py
@@ -0,0 +1,246 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/v3/api_proto/feature_objects.proto
+
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
+from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
+from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
+from api.v3.api_proto import issue_objects_pb2 as api_dot_v3_dot_api__proto_dot_issue__objects__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/v3/api_proto/feature_objects.proto',
+  package='monorail.v3',
+  syntax='proto3',
+  serialized_options=b'Z\020api/v3/api_proto',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n&api/v3/api_proto/feature_objects.proto\x12\x0bmonorail.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a$api/v3/api_proto/issue_objects.proto\"\xac\x03\n\x07Hotlist\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12)\n\x05owner\x18\x03 \x01(\tB\x1a\xfa\x41\x14\n\x12\x61pi.crbug.com/User\xe0\x41\x02\x12(\n\x07\x65\x64itors\x18\x04 \x03(\tB\x17\xfa\x41\x14\n\x12\x61pi.crbug.com/User\x12\x14\n\x07summary\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x65scription\x18\x06 \x01(\tB\x03\xe0\x41\x02\x12\x36\n\x0f\x64\x65\x66\x61ult_columns\x18\x07 \x03(\x0b\x32\x1d.monorail.v3.IssuesListColumn\x12<\n\x0fhotlist_privacy\x18\x08 \x01(\x0e\x32#.monorail.v3.Hotlist.HotlistPrivacy\"J\n\x0eHotlistPrivacy\x12\x1f\n\x1bHOTLIST_PRIVACY_UNSPECIFIED\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\n\n\x06PUBLIC\x10\x02:1\xea\x41.\n\x15\x61pi.crbug.com/Hotlist\x12\x15hotlists/{hotlist_id}\"\x90\x02\n\x0bHotlistItem\x12\x0c\n\x04name\x18\x01 \x01(\t\x12*\n\x05issue\x18\x02 \x01(\tB\x1b\xfa\x41\x15\n\x13\x61pi.crbug.com/Issue\xe0\x41\x05\x12\x11\n\x04rank\x18\x03 \x01(\rB\x03\xe0\x41\x03\x12)\n\x05\x61\x64\x64\x65r\x18\x04 \x01(\tB\x1a\xfa\x41\x14\n\x12\x61pi.crbug.com/User\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0c\n\x04note\x18\x06 \x01(\t:E\xea\x41\x42\n\x19\x61pi.crbug.com/HotlistItem\x12%hotlists/{hotlist_id}/items/{item_id}B\x12Z\x10\x61pi/v3/api_protob\x06proto3'
+  ,
+  dependencies=[google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,api_dot_v3_dot_api__proto_dot_issue__objects__pb2.DESCRIPTOR,])
+
+
+
+_HOTLIST_HOTLISTPRIVACY = _descriptor.EnumDescriptor(
+  name='HotlistPrivacy',
+  full_name='monorail.v3.Hotlist.HotlistPrivacy',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='HOTLIST_PRIVACY_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='PRIVATE', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='PUBLIC', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=490,
+  serialized_end=564,
+)
+_sym_db.RegisterEnumDescriptor(_HOTLIST_HOTLISTPRIVACY)
+
+
+_HOTLIST = _descriptor.Descriptor(
+  name='Hotlist',
+  full_name='monorail.v3.Hotlist',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.Hotlist.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='display_name', full_name='monorail.v3.Hotlist.display_name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='owner', full_name='monorail.v3.Hotlist.owner', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='editors', full_name='monorail.v3.Hotlist.editors', index=3,
+      number=4, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='summary', full_name='monorail.v3.Hotlist.summary', index=4,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='description', full_name='monorail.v3.Hotlist.description', index=5,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='default_columns', full_name='monorail.v3.Hotlist.default_columns', index=6,
+      number=7, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='hotlist_privacy', full_name='monorail.v3.Hotlist.hotlist_privacy', index=7,
+      number=8, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _HOTLIST_HOTLISTPRIVACY,
+  ],
+  serialized_options=b'\352A.\n\025api.crbug.com/Hotlist\022\025hotlists/{hotlist_id}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=187,
+  serialized_end=615,
+)
+
+
+_HOTLISTITEM = _descriptor.Descriptor(
+  name='HotlistItem',
+  full_name='monorail.v3.HotlistItem',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.HotlistItem.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='issue', full_name='monorail.v3.HotlistItem.issue', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\025\n\023api.crbug.com/Issue\340A\005', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='rank', full_name='monorail.v3.HotlistItem.rank', index=2,
+      number=3, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='adder', full_name='monorail.v3.HotlistItem.adder', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='create_time', full_name='monorail.v3.HotlistItem.create_time', index=4,
+      number=5, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='note', full_name='monorail.v3.HotlistItem.note', index=5,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=b'\352AB\n\031api.crbug.com/HotlistItem\022%hotlists/{hotlist_id}/items/{item_id}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=618,
+  serialized_end=890,
+)
+
+_HOTLIST.fields_by_name['default_columns'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUESLISTCOLUMN
+_HOTLIST.fields_by_name['hotlist_privacy'].enum_type = _HOTLIST_HOTLISTPRIVACY
+_HOTLIST_HOTLISTPRIVACY.containing_type = _HOTLIST
+_HOTLISTITEM.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
+DESCRIPTOR.message_types_by_name['Hotlist'] = _HOTLIST
+DESCRIPTOR.message_types_by_name['HotlistItem'] = _HOTLISTITEM
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+Hotlist = _reflection.GeneratedProtocolMessageType('Hotlist', (_message.Message,), {
+  'DESCRIPTOR' : _HOTLIST,
+  '__module__' : 'api.v3.api_proto.feature_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.Hotlist)
+  })
+_sym_db.RegisterMessage(Hotlist)
+
+HotlistItem = _reflection.GeneratedProtocolMessageType('HotlistItem', (_message.Message,), {
+  'DESCRIPTOR' : _HOTLISTITEM,
+  '__module__' : 'api.v3.api_proto.feature_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.HotlistItem)
+  })
+_sym_db.RegisterMessage(HotlistItem)
+
+
+DESCRIPTOR._options = None
+_HOTLIST.fields_by_name['display_name']._options = None
+_HOTLIST.fields_by_name['owner']._options = None
+_HOTLIST.fields_by_name['editors']._options = None
+_HOTLIST.fields_by_name['summary']._options = None
+_HOTLIST.fields_by_name['description']._options = None
+_HOTLIST._options = None
+_HOTLISTITEM.fields_by_name['issue']._options = None
+_HOTLISTITEM.fields_by_name['rank']._options = None
+_HOTLISTITEM.fields_by_name['adder']._options = None
+_HOTLISTITEM.fields_by_name['create_time']._options = None
+_HOTLISTITEM._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/api/v3/api_proto/frontend.proto b/api/v3/api_proto/frontend.proto
new file mode 100644
index 0000000..b6e8564
--- /dev/null
+++ b/api/v3/api_proto/frontend.proto
@@ -0,0 +1,85 @@
+// Copyright 2020 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
+
+syntax = "proto3";
+
+package monorail.v3;
+
+option go_package = "api/v3/api_proto";
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "api/v3/api_proto/project_objects.proto";
+
+// ***DO NOT CALL rpcs IN THIS SERVICE.***
+// This service is for Monorail's frontend only.
+
+service Frontend {
+  // status: DO NOT USE
+  // Returns all project specific configurations needed for the SPA client.
+  //
+  // Raises:
+  //   INVALID_ARGUMENT if the project resource name provided is invalid.
+  //   NOT_FOUND if the parent project is not found.
+  //   PERMISSION_DENIED if user is not allowed to view this project.
+  rpc GatherProjectEnvironment (GatherProjectEnvironmentRequest) returns (GatherProjectEnvironmentResponse) {};
+
+  // status: DO NOT USE
+  // Returns all of a given user's project memberships.
+  //
+  // Raises:
+  //   NOT_FOUND if the user is not found.
+  //   INVALID_ARGUMENT if the user resource name provided is invalid.
+  rpc GatherProjectMembershipsForUser (GatherProjectMembershipsForUserRequest)
+    returns (GatherProjectMembershipsForUserResponse) {}
+}
+
+
+// Request message for GatherProjectEnvironment
+// Next available tag: 2
+message GatherProjectEnvironmentRequest {
+  // The name of the project these config environments belong to.
+  string parent = 1 [
+    (google.api.resource_reference) = {type: "api.crbug.com/Project"},
+    (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// Response message for GatherProjectEnvironment
+// Next available tag: 9
+message GatherProjectEnvironmentResponse {
+  // Project definitions such as display_name and summary.
+  Project project = 1;
+  // Configurations of this project such as default search term,
+  // default templates for members and non members.
+  ProjectConfig project_config = 2;
+  // List of statuses that belong to this project.
+  repeated StatusDef statuses = 3;
+  // List of well known labels that belong to this project.
+  repeated LabelDef well_known_labels = 4;
+  // List of components that belong to this project.
+  repeated ComponentDef components = 5;
+  // List of custom fields that belong to this project.
+  repeated FieldDef fields = 6;
+  // List of approval fields that belong to this project.
+  repeated ApprovalDef approval_fields = 7;
+  // Saved search queries that admins defined for this project.
+  repeated ProjectSavedQuery saved_queries = 8;
+}
+
+// The request message for Frontend.GatherProjectMembershipsForUser.
+// Next available tag: 2
+message GatherProjectMembershipsForUserRequest {
+  // The name of the user to request.
+  string user = 1 [
+      (google.api.resource_reference) = {type: "api.crbug.com/User"}];
+}
+
+// The response message for Frontend.GatherProjectMembershipsForUser.
+// Next available tag: 2
+message GatherProjectMembershipsForUserResponse {
+  // The projects that the user is a member of.
+  repeated ProjectMember project_memberships = 1;
+}
\ No newline at end of file
diff --git a/api/v3/api_proto/frontend_pb2.py b/api/v3/api_proto/frontend_pb2.py
new file mode 100644
index 0000000..980b6cd
--- /dev/null
+++ b/api/v3/api_proto/frontend_pb2.py
@@ -0,0 +1,291 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/v3/api_proto/frontend.proto
+
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
+from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
+from api.v3.api_proto import project_objects_pb2 as api_dot_v3_dot_api__proto_dot_project__objects__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/v3/api_proto/frontend.proto',
+  package='monorail.v3',
+  syntax='proto3',
+  serialized_options=b'Z\020api/v3/api_proto',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n\x1f\x61pi/v3/api_proto/frontend.proto\x12\x0bmonorail.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&api/v3/api_proto/project_objects.proto\"P\n\x1fGatherProjectEnvironmentRequest\x12-\n\x06parent\x18\x01 \x01(\tB\x1d\xfa\x41\x17\n\x15\x61pi.crbug.com/Project\xe0\x41\x02\"\x99\x03\n GatherProjectEnvironmentResponse\x12%\n\x07project\x18\x01 \x01(\x0b\x32\x14.monorail.v3.Project\x12\x32\n\x0eproject_config\x18\x02 \x01(\x0b\x32\x1a.monorail.v3.ProjectConfig\x12(\n\x08statuses\x18\x03 \x03(\x0b\x32\x16.monorail.v3.StatusDef\x12\x30\n\x11well_known_labels\x18\x04 \x03(\x0b\x32\x15.monorail.v3.LabelDef\x12-\n\ncomponents\x18\x05 \x03(\x0b\x32\x19.monorail.v3.ComponentDef\x12%\n\x06\x66ields\x18\x06 \x03(\x0b\x32\x15.monorail.v3.FieldDef\x12\x31\n\x0f\x61pproval_fields\x18\x07 \x03(\x0b\x32\x18.monorail.v3.ApprovalDef\x12\x35\n\rsaved_queries\x18\x08 \x03(\x0b\x32\x1e.monorail.v3.ProjectSavedQuery\"O\n&GatherProjectMembershipsForUserRequest\x12%\n\x04user\x18\x01 \x01(\tB\x17\xfa\x41\x14\n\x12\x61pi.crbug.com/User\"b\n\'GatherProjectMembershipsForUserResponse\x12\x37\n\x13project_memberships\x18\x01 \x03(\x0b\x32\x1a.monorail.v3.ProjectMember2\x96\x02\n\x08\x46rontend\x12y\n\x18GatherProjectEnvironment\x12,.monorail.v3.GatherProjectEnvironmentRequest\x1a-.monorail.v3.GatherProjectEnvironmentResponse\"\x00\x12\x8e\x01\n\x1fGatherProjectMembershipsForUser\x12\x33.monorail.v3.GatherProjectMembershipsForUserRequest\x1a\x34.monorail.v3.GatherProjectMembershipsForUserResponse\"\x00\x42\x12Z\x10\x61pi/v3/api_protob\x06proto3'
+  ,
+  dependencies=[google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,api_dot_v3_dot_api__proto_dot_project__objects__pb2.DESCRIPTOR,])
+
+
+
+
+_GATHERPROJECTENVIRONMENTREQUEST = _descriptor.Descriptor(
+  name='GatherProjectEnvironmentRequest',
+  full_name='monorail.v3.GatherProjectEnvironmentRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.v3.GatherProjectEnvironmentRequest.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\027\n\025api.crbug.com/Project\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=148,
+  serialized_end=228,
+)
+
+
+_GATHERPROJECTENVIRONMENTRESPONSE = _descriptor.Descriptor(
+  name='GatherProjectEnvironmentResponse',
+  full_name='monorail.v3.GatherProjectEnvironmentResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project', full_name='monorail.v3.GatherProjectEnvironmentResponse.project', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='project_config', full_name='monorail.v3.GatherProjectEnvironmentResponse.project_config', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='statuses', full_name='monorail.v3.GatherProjectEnvironmentResponse.statuses', index=2,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='well_known_labels', full_name='monorail.v3.GatherProjectEnvironmentResponse.well_known_labels', index=3,
+      number=4, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='components', full_name='monorail.v3.GatherProjectEnvironmentResponse.components', index=4,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='fields', full_name='monorail.v3.GatherProjectEnvironmentResponse.fields', index=5,
+      number=6, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='approval_fields', full_name='monorail.v3.GatherProjectEnvironmentResponse.approval_fields', index=6,
+      number=7, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='saved_queries', full_name='monorail.v3.GatherProjectEnvironmentResponse.saved_queries', index=7,
+      number=8, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=231,
+  serialized_end=640,
+)
+
+
+_GATHERPROJECTMEMBERSHIPSFORUSERREQUEST = _descriptor.Descriptor(
+  name='GatherProjectMembershipsForUserRequest',
+  full_name='monorail.v3.GatherProjectMembershipsForUserRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user', full_name='monorail.v3.GatherProjectMembershipsForUserRequest.user', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=642,
+  serialized_end=721,
+)
+
+
+_GATHERPROJECTMEMBERSHIPSFORUSERRESPONSE = _descriptor.Descriptor(
+  name='GatherProjectMembershipsForUserResponse',
+  full_name='monorail.v3.GatherProjectMembershipsForUserResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_memberships', full_name='monorail.v3.GatherProjectMembershipsForUserResponse.project_memberships', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=723,
+  serialized_end=821,
+)
+
+_GATHERPROJECTENVIRONMENTRESPONSE.fields_by_name['project'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._PROJECT
+_GATHERPROJECTENVIRONMENTRESPONSE.fields_by_name['project_config'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._PROJECTCONFIG
+_GATHERPROJECTENVIRONMENTRESPONSE.fields_by_name['statuses'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._STATUSDEF
+_GATHERPROJECTENVIRONMENTRESPONSE.fields_by_name['well_known_labels'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._LABELDEF
+_GATHERPROJECTENVIRONMENTRESPONSE.fields_by_name['components'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._COMPONENTDEF
+_GATHERPROJECTENVIRONMENTRESPONSE.fields_by_name['fields'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._FIELDDEF
+_GATHERPROJECTENVIRONMENTRESPONSE.fields_by_name['approval_fields'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._APPROVALDEF
+_GATHERPROJECTENVIRONMENTRESPONSE.fields_by_name['saved_queries'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._PROJECTSAVEDQUERY
+_GATHERPROJECTMEMBERSHIPSFORUSERRESPONSE.fields_by_name['project_memberships'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._PROJECTMEMBER
+DESCRIPTOR.message_types_by_name['GatherProjectEnvironmentRequest'] = _GATHERPROJECTENVIRONMENTREQUEST
+DESCRIPTOR.message_types_by_name['GatherProjectEnvironmentResponse'] = _GATHERPROJECTENVIRONMENTRESPONSE
+DESCRIPTOR.message_types_by_name['GatherProjectMembershipsForUserRequest'] = _GATHERPROJECTMEMBERSHIPSFORUSERREQUEST
+DESCRIPTOR.message_types_by_name['GatherProjectMembershipsForUserResponse'] = _GATHERPROJECTMEMBERSHIPSFORUSERRESPONSE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+GatherProjectEnvironmentRequest = _reflection.GeneratedProtocolMessageType('GatherProjectEnvironmentRequest', (_message.Message,), {
+  'DESCRIPTOR' : _GATHERPROJECTENVIRONMENTREQUEST,
+  '__module__' : 'api.v3.api_proto.frontend_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.GatherProjectEnvironmentRequest)
+  })
+_sym_db.RegisterMessage(GatherProjectEnvironmentRequest)
+
+GatherProjectEnvironmentResponse = _reflection.GeneratedProtocolMessageType('GatherProjectEnvironmentResponse', (_message.Message,), {
+  'DESCRIPTOR' : _GATHERPROJECTENVIRONMENTRESPONSE,
+  '__module__' : 'api.v3.api_proto.frontend_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.GatherProjectEnvironmentResponse)
+  })
+_sym_db.RegisterMessage(GatherProjectEnvironmentResponse)
+
+GatherProjectMembershipsForUserRequest = _reflection.GeneratedProtocolMessageType('GatherProjectMembershipsForUserRequest', (_message.Message,), {
+  'DESCRIPTOR' : _GATHERPROJECTMEMBERSHIPSFORUSERREQUEST,
+  '__module__' : 'api.v3.api_proto.frontend_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.GatherProjectMembershipsForUserRequest)
+  })
+_sym_db.RegisterMessage(GatherProjectMembershipsForUserRequest)
+
+GatherProjectMembershipsForUserResponse = _reflection.GeneratedProtocolMessageType('GatherProjectMembershipsForUserResponse', (_message.Message,), {
+  'DESCRIPTOR' : _GATHERPROJECTMEMBERSHIPSFORUSERRESPONSE,
+  '__module__' : 'api.v3.api_proto.frontend_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.GatherProjectMembershipsForUserResponse)
+  })
+_sym_db.RegisterMessage(GatherProjectMembershipsForUserResponse)
+
+
+DESCRIPTOR._options = None
+_GATHERPROJECTENVIRONMENTREQUEST.fields_by_name['parent']._options = None
+_GATHERPROJECTMEMBERSHIPSFORUSERREQUEST.fields_by_name['user']._options = None
+
+_FRONTEND = _descriptor.ServiceDescriptor(
+  name='Frontend',
+  full_name='monorail.v3.Frontend',
+  file=DESCRIPTOR,
+  index=0,
+  serialized_options=None,
+  create_key=_descriptor._internal_create_key,
+  serialized_start=824,
+  serialized_end=1102,
+  methods=[
+  _descriptor.MethodDescriptor(
+    name='GatherProjectEnvironment',
+    full_name='monorail.v3.Frontend.GatherProjectEnvironment',
+    index=0,
+    containing_service=None,
+    input_type=_GATHERPROJECTENVIRONMENTREQUEST,
+    output_type=_GATHERPROJECTENVIRONMENTRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GatherProjectMembershipsForUser',
+    full_name='monorail.v3.Frontend.GatherProjectMembershipsForUser',
+    index=1,
+    containing_service=None,
+    input_type=_GATHERPROJECTMEMBERSHIPSFORUSERREQUEST,
+    output_type=_GATHERPROJECTMEMBERSHIPSFORUSERRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+])
+_sym_db.RegisterServiceDescriptor(_FRONTEND)
+
+DESCRIPTOR.services_by_name['Frontend'] = _FRONTEND
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/v3/api_proto/frontend_prpc_pb2.py b/api/v3/api_proto/frontend_prpc_pb2.py
new file mode 100644
index 0000000..5087c3a
--- /dev/null
+++ b/api/v3/api_proto/frontend_prpc_pb2.py
@@ -0,0 +1,864 @@
+# Generated by the pRPC protocol buffer compiler plugin.  DO NOT EDIT!
+# source: api/v3/api_proto/frontend.proto
+
+import base64
+import zlib
+
+from google.protobuf import descriptor_pb2
+
+# Includes description of the api/v3/api_proto/frontend.proto and all of its transitive
+# dependencies. Includes source code info.
+FILE_DESCRIPTOR_SET = descriptor_pb2.FileDescriptorSet()
+FILE_DESCRIPTOR_SET.ParseFromString(zlib.decompress(base64.b64decode(
+    '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'
+    'fce+tWoQGScvK9P54+2Wr8quqec7dzz733LNnncrf7mzAmphcvLM/Z0jGdrnMb8UXPbxmnUb1c'
+    'I0FXl/EOv5E308pkU/5I36ksPD02Y701a3Vc1pQX/YKJp7IDJRqLxcrDzP36Av9O7/BbsJjwIF'
+    'eGrRGQPu43ssrJhq1tfXuuRQw/SgX5prPgr49xkd7lbx+fyE1Mjk8N5E9OTZwbyydMYVN+w+hY'
+    'Hlavvt/UPzQ6TqiL38P5win67XWO+G1xYunQ32EVip/JUtt8fyA/Vsj306MBKTvXPzF4Nh+4x0'
+    '4/l8v7W+KdFnXKbXV0upp+ipNM/g0z1sc73+f6qSH4Pd9Yb8ba30u2/126/cVmeXes/TU18yPW'
+    '+kP++hiO1h/KncgPvah2yj+XO+FvjreTqe3+end+6iGucPBTGum77X5K+cjXb6TrnatrN9shNU'
+    'Wk1TKxVtPksxiSUrLMjj5MXm0zOiUyiUuRWbExejiIZzyie/2m4swlUuppgnjE6Jbncx1+Ot5M'
+    'k7XSYkG9lj7sN8Gtb6m2tZk+aOvbsQpv/E5BvZs+47cTddqvF+enZCHamuKGueX53HZ/W5xeTr'
+    '1J5aBybfrLMf4wfb+/HiH4p1R6udrWFjZ53lufkTy9ipqOq7cL6/Cx/it92l9XrixFZflc1p76'
+    'ZQ1WlmJFtdKndknUeVFJrWuVNL60GC+JPjUlUQXheh4VtW6tCqJ34hXEx3ZhM0VO9K0KW79WYQ'
+    'P0arwwfGwKO+g3l2bKCFG2tW3t4aLfy7zD8YNkH6RP+c3TF6uIQ09zB3bxPdfXedl+/qqgv87c'
+    'TVKWf0bCyVlVOLmJWZa5329PdGl6u99Cw3wqKqqxkCLgLJeGh8VHpiIhiIfFR/hhZp/fnuhV8L'
+    'RYmis9onniPzJf8Pwg2WnpV/rtpCGWZ69OEWtztE2p8UdtfUeur9ezI/z1hPq40FaJ/Z2e8Tcs'
+    'Vueh5LGBObuIchXa+u64TgoF+r5gfV4IFhMISejWOVqUl2pT0HWUWPMFGiOEfVxKpRn1vEH5uA'
+    'DB485hvy1eD8j8kdGJwZPnpiYKg6dO5QvjCZnf4jeO5M/mCyTu2/3W3Mi5qf7R4eH8yETgdl7w'
+    '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'
+    'HdB8A=')))
+_INDEX = {
+    f.name: {
+      'descriptor': f,
+      'services': {s.name: s for s in f.service},
+    }
+    for f in FILE_DESCRIPTOR_SET.file
+}
+
+
+FrontendServiceDescription = {
+  'file_descriptor_set': FILE_DESCRIPTOR_SET,
+  'file_descriptor': _INDEX[u'api/v3/api_proto/frontend.proto']['descriptor'],
+  'service_descriptor': _INDEX[u'api/v3/api_proto/frontend.proto']['services'][u'Frontend'],
+}
diff --git a/api/v3/api_proto/hotlists.proto b/api/v3/api_proto/hotlists.proto
new file mode 100644
index 0000000..1f668f7
--- /dev/null
+++ b/api/v3/api_proto/hotlists.proto
@@ -0,0 +1,276 @@
+// Copyright 2020 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
+
+syntax = "proto3";
+
+package monorail.v3;
+
+option go_package = "api/v3/api_proto";
+
+import "api/v3/api_proto/feature_objects.proto";
+import "google/protobuf/field_mask.proto";
+import "google/protobuf/empty.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+
+// ***ONLY CALL rpcs WITH `status: {ALPHA|STABLE}`***
+// rpcs without `status` are not ready.
+
+// Hotlists service includes all methods needed for managing Hotlists.
+service Hotlists {
+  // status: NOT READY
+  // Creates a new hotlist.
+  //
+  // Raises:
+  //   NOT_FOUND if some given hotlist editors do not exist.
+  //   ALREADY_EXISTS if a hotlist with the same name owned by the user
+  //   already exists.
+  //   INVALID_ARGUMENT if a `hotlist.owner` is given.
+  rpc CreateHotlist (CreateHotlistRequest) returns (Hotlist) {}
+
+  // status: NOT READY
+  // Returns the requested Hotlist.
+  //
+  // Raises:
+  //   NOT_FOUND if the requested hotlist is not found.
+  //   PERMISSION_DENIED if the requester is not allowed to view the hotlist.
+  //   INVALID_ARGUMENT if the given resource name is not valid.
+  rpc GetHotlist (GetHotlistRequest) returns (Hotlist) {}
+
+  // status: NOT READY
+  // Updates a hotlist.
+  //
+  // Raises:
+  //   NOT_FOUND if the hotlist is not found.
+  //   PERMISSION_DENIED if the requester is not allowed to update the hotlist.
+  //   INVALID_ARGUMENT if required fields are missing.
+  rpc UpdateHotlist (UpdateHotlistRequest) returns (Hotlist) {}
+
+  // status: NOT READY
+  // Deletes a hotlist.
+  //
+  // Raises:
+  //   NOT_FOUND if the hotlist is not found.
+  //   PERMISSION_DENIED if the requester is not allowed to delete the hotlist.
+  rpc DeleteHotlist (GetHotlistRequest) returns (google.protobuf.Empty) {}
+
+  // status: NOT READY
+  // Returns a list of all HotlistItems in the hotlist.
+  //
+  // Raises:
+  //   NOT_FOUND if the parent hotlist is not found.
+  //   PERMISSION_DENIED if the requester is not allowed to view the hotlist.
+  //   INVALID_ARGUMENT if the page_token or given hotlist resource name is not
+  //   valid.
+  rpc ListHotlistItems (ListHotlistItemsRequest) returns (ListHotlistItemsResponse) {}
+
+  // status: NOT READY
+  // Reranks a hotlist's items.
+  //
+  // Raises:
+  //   NOT_FOUND if the hotlist or issues to rerank are not found.
+  //   PERMISSION_DENIED if the requester is not allowed to rerank the hotlist
+  //   or view issues they're trying to rerank.
+  //   INVALID_ARGUMENT if the `target_position` is invalid or `hotlist_items`
+  //   is empty or contains items not in the Hotlist.
+  rpc RerankHotlistItems (RerankHotlistItemsRequest) returns (google.protobuf.Empty) {}
+
+  // status: NOT READY
+  // Adds new items associated with given issues to a hotlist.
+  //
+  // Raises:
+  //   NOT_FOUND if the parent hotlist or issues are not found.
+  //   PERMISSION_DENIED if the requester is not allowed to edit the hotlist or
+  //   view issues they are trying to add.
+  //   INVALID_ARGUMENT if the `target_position` is invalid or `hotlist_items`
+  //   is empty or contains items not in the Hotlist.
+  rpc AddHotlistItems (AddHotlistItemsRequest) returns (google.protobuf.Empty) {}
+
+  // status: NOT READY
+  // Removes items associated with given issues from a hotlist.
+  //
+  // Raises:
+  //   NOT_FOUND if the parent hotlist or issues are not found.
+  //   PERMISSION_DENIED if the requester is not allowed to edit the hotlist or
+  //   view issues they are trying to remove.
+  //   INVALID_ARGUMENT if the `target_position` is invalid or `hotlist_items`
+  //   is empty or contains items not in the Hotlist.
+  rpc RemoveHotlistItems (RemoveHotlistItemsRequest) returns (google.protobuf.Empty) {}
+
+  // status: NOT READY
+  // Removes editors assigned to a hotlist.
+  //
+  // Raises:
+  //   NOT_FOUND if the hotlist is not found.
+  //   PERMISSION_DENIED if the requester is not allowed to remove all specified
+  //   editors from the hotlist.
+  //   INVALID_ARGUMENT if any specified editors are not in the hotlist.
+  rpc RemoveHotlistEditors (RemoveHotlistEditorsRequest) returns (google.protobuf.Empty) {}
+
+  // status: NOT READY
+  // Gathers all viewable hotlists that a user is a member of.
+  //
+  // Raises:
+  //   NOT_FOUND if the user is not found.
+  //   INVALID_ARGUMENT if the `user` is invalid.
+  rpc GatherHotlistsForUser (GatherHotlistsForUserRequest) returns (GatherHotlistsForUserResponse) {}
+}
+
+
+// Request message for CreateHotlist method.
+// Next available tag: 2
+message CreateHotlistRequest {
+  // The hotlist to create.
+  // `hotlist.owner` must be empty. The owner of the new hotlist will be
+  // set to the requester.
+  Hotlist hotlist = 1 [ (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// Request message for GetHotlist method.
+// Next available tag: 2
+message GetHotlistRequest {
+  // The name of the hotlist to retrieve.
+  string name = 1 [
+      (google.api.field_behavior) = REQUIRED,
+      (google.api.resource_reference) = {type: "api.crbug.com/Hotlist"}];
+}
+
+
+// Request message for UpdateHotlist method.
+// Next available tag: 2
+message UpdateHotlistRequest {
+  // The hotlist's `name` field is used to identify the hotlist to be updated.
+  Hotlist hotlist = 1 [
+      (google.api.field_behavior) = REQUIRED,
+      (google.api.resource_reference) = {type: "api.crbug.com/Hotlist"} ];
+  // The list of fields to be updated.
+  google.protobuf.FieldMask update_mask = 2 [ (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// Request message for ListHotlistItems method.
+// Next available tag: 5
+message ListHotlistItemsRequest {
+  // The parent hotlist, which owns this collection of items.
+  string parent = 1 [
+      (google.api.field_behavior) = REQUIRED,
+      (google.api.resource_reference) = {type: "api.crbug.com/Hotlist"} ];
+  // The maximum number of items to return. The service may return fewer than
+  // this value.
+  // If unspecified, at most 1000 items will be returned.
+  // The maximum value is 1000; values above 1000 will be coerced to 1000.
+  int32 page_size = 2;
+  // The string of comma separated field names used to order the items.
+  // Adding '-' before a field, reverses the sort order.
+  // E.g. 'stars,-status' sorts the items by number of stars low to high, then
+  // status high to low.
+  // If unspecified, items will be ordered by their rank in the parent.
+  string order_by = 3;
+  // A page token, received from a previous `ListHotlistItems` call.
+  // Provide this to retrieve the subsequent page.
+  //
+  // When paginating, all other parameters provided to `ListHotlistItems` must
+  // match the call that provided the page token.
+  string page_token = 4;
+}
+
+
+// Response to ListHotlistItems call.
+// Next available tag: 3
+message ListHotlistItemsResponse {
+  // The items from the specified hotlist.
+  repeated HotlistItem items = 1;
+  // A token, which can be sent as `page_token` to retrieve the next page.
+  // If this field is omitted, there are no subsequent pages.
+  string next_page_token = 2;
+}
+
+
+// The request used to rerank a Hotlist.
+// Next available tag: 4
+message RerankHotlistItemsRequest {
+  // Resource name of the Hotlist to rerank.
+  string name = 1 [
+      (google.api.resource_reference) = {type: "api.crbug.com/Hotlist"},
+      (google.api.field_behavior) = REQUIRED ];
+  // HotlistItems to be moved. The order of `hotlist_items` will
+  // determine the order of these items after they have been moved.
+  // E.g. With items [a, b, c, d, e], moving [d, c] to `target_position` 3, will
+  // result in items [a, b, e, d, c].
+  repeated string hotlist_items = 2 [
+      (google.api.resource_reference) = {type: "api.crbug.com/HotlistItem"},
+      (google.api.field_behavior) = REQUIRED ];
+  // Target starting position of the moved items.
+  // `target_position` must be between 0 and (# hotlist items - # items being moved).
+  uint32 target_position = 3 [ (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// Request message for an AddHotlistItems call.
+// Next available tag: 4
+message AddHotlistItemsRequest {
+  // Resource name of the Hotlist to add new items to.
+  string parent = 1 [
+      (google.api.field_behavior) = REQUIRED,
+      (google.api.resource_reference) = {type: "api.crbug.com/Hotlist"} ];
+  // Resource names of Issues to associate with new HotlistItems added to `parent`.
+  repeated string issues = 2 [
+      (google.api.field_behavior) = REQUIRED,
+      (google.api.resource_reference) = {type: "api.crbug.com/Issue"} ];
+  // Target starting position of the new items.
+  // `target_position` must be between [0 and # of items that currently exist in
+  // `parent`]. The request will fail if a specified `target_position` is outside
+  // of this range.
+  // New HotlistItems added to a non-last position of the hotlist will
+  // cause ranks of existing HotlistItems below `target_position` to be adjusted.
+  // If no `target_position` is given, new items will be added to the end of
+  // `parent`.
+  uint32 target_position = 3;
+}
+
+
+// Request message for a RemoveHotlistItems call.
+// Next available tag: 3
+message RemoveHotlistItemsRequest {
+  // Resource name of the Hotlist to remove items from.
+  string parent = 1 [
+      (google.api.field_behavior) = REQUIRED,
+      (google.api.resource_reference) = {type: "api.crbug.com/Hotlist"} ];
+  // Resource names of Issues associated with HotlistItems that should be removed.
+  repeated string issues = 2 [
+      (google.api.field_behavior) = REQUIRED,
+      (google.api.resource_reference) = {type: "api.crbug.com/Issue"} ];
+}
+
+
+// Request message for a RemoveHotlistEditors call.
+// Next available tag: 3
+message RemoveHotlistEditorsRequest {
+  // Resource name of the Hotlist to remove editors from.
+  string name = 1 [
+      (google.api.field_behavior) = REQUIRED,
+      (google.api.resource_reference) = {type: "api.crbug.com/Hotlist"} ];
+  // Resource names of Users associated with the hotlist that should be removed.
+  repeated string editors = 2 [
+      (google.api.field_behavior) = REQUIRED,
+      (google.api.resource_reference) = {type: "api.crbug.com/User"} ];
+}
+
+
+// Request message for a GatherHotlistsForUser call.
+// Next available tag: 2
+message GatherHotlistsForUserRequest {
+  // Resource name of the user whose hotlists we want to fetch.
+  string user = 1 [ (google.api.field_behavior) = REQUIRED,
+      (google.api.resource_reference) = {type: "api.crbug.com/User"} ];
+}
+
+
+// Response message for a GatherHotlistsForUser call.
+// Next available tag: 2
+message GatherHotlistsForUserResponse {
+  repeated Hotlist hotlists = 1;
+}
\ No newline at end of file
diff --git a/api/v3/api_proto/hotlists_pb2.py b/api/v3/api_proto/hotlists_pb2.py
new file mode 100644
index 0000000..0258602
--- /dev/null
+++ b/api/v3/api_proto/hotlists_pb2.py
@@ -0,0 +1,690 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/v3/api_proto/hotlists.proto
+
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from api.v3.api_proto import feature_objects_pb2 as api_dot_v3_dot_api__proto_dot_feature__objects__pb2
+from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2
+from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
+from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
+from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/v3/api_proto/hotlists.proto',
+  package='monorail.v3',
+  syntax='proto3',
+  serialized_options=b'Z\020api/v3/api_proto',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n\x1f\x61pi/v3/api_proto/hotlists.proto\x12\x0bmonorail.v3\x1a&api/v3/api_proto/feature_objects.proto\x1a google/protobuf/field_mask.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"B\n\x14\x43reateHotlistRequest\x12*\n\x07hotlist\x18\x01 \x01(\x0b\x32\x14.monorail.v3.HotlistB\x03\xe0\x41\x02\"@\n\x11GetHotlistRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15\x61pi.crbug.com/Hotlist\"\x92\x01\n\x14UpdateHotlistRequest\x12\x44\n\x07hotlist\x18\x01 \x01(\x0b\x32\x14.monorail.v3.HotlistB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15\x61pi.crbug.com/Hotlist\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x81\x01\n\x17ListHotlistItemsRequest\x12-\n\x06parent\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15\x61pi.crbug.com/Hotlist\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12\x12\n\npage_token\x18\x04 \x01(\t\"\\\n\x18ListHotlistItemsResponse\x12\'\n\x05items\x18\x01 \x03(\x0b\x32\x18.monorail.v3.HotlistItem\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xa0\x01\n\x19RerankHotlistItemsRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xfa\x41\x17\n\x15\x61pi.crbug.com/Hotlist\xe0\x41\x02\x12\x38\n\rhotlist_items\x18\x02 \x03(\tB!\xfa\x41\x1b\n\x19\x61pi.crbug.com/HotlistItem\xe0\x41\x02\x12\x1c\n\x0ftarget_position\x18\x03 \x01(\rB\x03\xe0\x41\x02\"\x8d\x01\n\x16\x41\x64\x64HotlistItemsRequest\x12-\n\x06parent\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15\x61pi.crbug.com/Hotlist\x12+\n\x06issues\x18\x02 \x03(\tB\x1b\xe0\x41\x02\xfa\x41\x15\n\x13\x61pi.crbug.com/Issue\x12\x17\n\x0ftarget_position\x18\x03 \x01(\r\"w\n\x19RemoveHotlistItemsRequest\x12-\n\x06parent\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15\x61pi.crbug.com/Hotlist\x12+\n\x06issues\x18\x02 \x03(\tB\x1b\xe0\x41\x02\xfa\x41\x15\n\x13\x61pi.crbug.com/Issue\"w\n\x1bRemoveHotlistEditorsRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15\x61pi.crbug.com/Hotlist\x12+\n\x07\x65\x64itors\x18\x02 \x03(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12\x61pi.crbug.com/User\"H\n\x1cGatherHotlistsForUserRequest\x12(\n\x04user\x18\x01 \x01(\tB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12\x61pi.crbug.com/User\"G\n\x1dGatherHotlistsForUserResponse\x12&\n\x08hotlists\x18\x01 \x03(\x0b\x32\x14.monorail.v3.Hotlist2\xe6\x06\n\x08Hotlists\x12J\n\rCreateHotlist\x12!.monorail.v3.CreateHotlistRequest\x1a\x14.monorail.v3.Hotlist\"\x00\x12\x44\n\nGetHotlist\x12\x1e.monorail.v3.GetHotlistRequest\x1a\x14.monorail.v3.Hotlist\"\x00\x12J\n\rUpdateHotlist\x12!.monorail.v3.UpdateHotlistRequest\x1a\x14.monorail.v3.Hotlist\"\x00\x12I\n\rDeleteHotlist\x12\x1e.monorail.v3.GetHotlistRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x61\n\x10ListHotlistItems\x12$.monorail.v3.ListHotlistItemsRequest\x1a%.monorail.v3.ListHotlistItemsResponse\"\x00\x12V\n\x12RerankHotlistItems\x12&.monorail.v3.RerankHotlistItemsRequest\x1a\x16.google.protobuf.Empty\"\x00\x12P\n\x0f\x41\x64\x64HotlistItems\x12#.monorail.v3.AddHotlistItemsRequest\x1a\x16.google.protobuf.Empty\"\x00\x12V\n\x12RemoveHotlistItems\x12&.monorail.v3.RemoveHotlistItemsRequest\x1a\x16.google.protobuf.Empty\"\x00\x12Z\n\x14RemoveHotlistEditors\x12(.monorail.v3.RemoveHotlistEditorsRequest\x1a\x16.google.protobuf.Empty\"\x00\x12p\n\x15GatherHotlistsForUser\x12).monorail.v3.GatherHotlistsForUserRequest\x1a*.monorail.v3.GatherHotlistsForUserResponse\"\x00\x42\x12Z\x10\x61pi/v3/api_protob\x06proto3'
+  ,
+  dependencies=[api_dot_v3_dot_api__proto_dot_feature__objects__pb2.DESCRIPTOR,google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,])
+
+
+
+
+_CREATEHOTLISTREQUEST = _descriptor.Descriptor(
+  name='CreateHotlistRequest',
+  full_name='monorail.v3.CreateHotlistRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlist', full_name='monorail.v3.CreateHotlistRequest.hotlist', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=211,
+  serialized_end=277,
+)
+
+
+_GETHOTLISTREQUEST = _descriptor.Descriptor(
+  name='GetHotlistRequest',
+  full_name='monorail.v3.GetHotlistRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.GetHotlistRequest.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\027\n\025api.crbug.com/Hotlist', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=279,
+  serialized_end=343,
+)
+
+
+_UPDATEHOTLISTREQUEST = _descriptor.Descriptor(
+  name='UpdateHotlistRequest',
+  full_name='monorail.v3.UpdateHotlistRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlist', full_name='monorail.v3.UpdateHotlistRequest.hotlist', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\027\n\025api.crbug.com/Hotlist', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='update_mask', full_name='monorail.v3.UpdateHotlistRequest.update_mask', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=346,
+  serialized_end=492,
+)
+
+
+_LISTHOTLISTITEMSREQUEST = _descriptor.Descriptor(
+  name='ListHotlistItemsRequest',
+  full_name='monorail.v3.ListHotlistItemsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.v3.ListHotlistItemsRequest.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\027\n\025api.crbug.com/Hotlist', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_size', full_name='monorail.v3.ListHotlistItemsRequest.page_size', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='order_by', full_name='monorail.v3.ListHotlistItemsRequest.order_by', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_token', full_name='monorail.v3.ListHotlistItemsRequest.page_token', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=495,
+  serialized_end=624,
+)
+
+
+_LISTHOTLISTITEMSRESPONSE = _descriptor.Descriptor(
+  name='ListHotlistItemsResponse',
+  full_name='monorail.v3.ListHotlistItemsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='items', full_name='monorail.v3.ListHotlistItemsResponse.items', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='next_page_token', full_name='monorail.v3.ListHotlistItemsResponse.next_page_token', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=626,
+  serialized_end=718,
+)
+
+
+_RERANKHOTLISTITEMSREQUEST = _descriptor.Descriptor(
+  name='RerankHotlistItemsRequest',
+  full_name='monorail.v3.RerankHotlistItemsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.RerankHotlistItemsRequest.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\027\n\025api.crbug.com/Hotlist\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='hotlist_items', full_name='monorail.v3.RerankHotlistItemsRequest.hotlist_items', index=1,
+      number=2, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\033\n\031api.crbug.com/HotlistItem\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='target_position', full_name='monorail.v3.RerankHotlistItemsRequest.target_position', index=2,
+      number=3, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=721,
+  serialized_end=881,
+)
+
+
+_ADDHOTLISTITEMSREQUEST = _descriptor.Descriptor(
+  name='AddHotlistItemsRequest',
+  full_name='monorail.v3.AddHotlistItemsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.v3.AddHotlistItemsRequest.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\027\n\025api.crbug.com/Hotlist', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='issues', full_name='monorail.v3.AddHotlistItemsRequest.issues', index=1,
+      number=2, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\025\n\023api.crbug.com/Issue', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='target_position', full_name='monorail.v3.AddHotlistItemsRequest.target_position', index=2,
+      number=3, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=884,
+  serialized_end=1025,
+)
+
+
+_REMOVEHOTLISTITEMSREQUEST = _descriptor.Descriptor(
+  name='RemoveHotlistItemsRequest',
+  full_name='monorail.v3.RemoveHotlistItemsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.v3.RemoveHotlistItemsRequest.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\027\n\025api.crbug.com/Hotlist', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='issues', full_name='monorail.v3.RemoveHotlistItemsRequest.issues', index=1,
+      number=2, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\025\n\023api.crbug.com/Issue', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1027,
+  serialized_end=1146,
+)
+
+
+_REMOVEHOTLISTEDITORSREQUEST = _descriptor.Descriptor(
+  name='RemoveHotlistEditorsRequest',
+  full_name='monorail.v3.RemoveHotlistEditorsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.RemoveHotlistEditorsRequest.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\027\n\025api.crbug.com/Hotlist', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='editors', full_name='monorail.v3.RemoveHotlistEditorsRequest.editors', index=1,
+      number=2, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1148,
+  serialized_end=1267,
+)
+
+
+_GATHERHOTLISTSFORUSERREQUEST = _descriptor.Descriptor(
+  name='GatherHotlistsForUserRequest',
+  full_name='monorail.v3.GatherHotlistsForUserRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user', full_name='monorail.v3.GatherHotlistsForUserRequest.user', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1269,
+  serialized_end=1341,
+)
+
+
+_GATHERHOTLISTSFORUSERRESPONSE = _descriptor.Descriptor(
+  name='GatherHotlistsForUserResponse',
+  full_name='monorail.v3.GatherHotlistsForUserResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='hotlists', full_name='monorail.v3.GatherHotlistsForUserResponse.hotlists', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1343,
+  serialized_end=1414,
+)
+
+_CREATEHOTLISTREQUEST.fields_by_name['hotlist'].message_type = api_dot_v3_dot_api__proto_dot_feature__objects__pb2._HOTLIST
+_UPDATEHOTLISTREQUEST.fields_by_name['hotlist'].message_type = api_dot_v3_dot_api__proto_dot_feature__objects__pb2._HOTLIST
+_UPDATEHOTLISTREQUEST.fields_by_name['update_mask'].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK
+_LISTHOTLISTITEMSRESPONSE.fields_by_name['items'].message_type = api_dot_v3_dot_api__proto_dot_feature__objects__pb2._HOTLISTITEM
+_GATHERHOTLISTSFORUSERRESPONSE.fields_by_name['hotlists'].message_type = api_dot_v3_dot_api__proto_dot_feature__objects__pb2._HOTLIST
+DESCRIPTOR.message_types_by_name['CreateHotlistRequest'] = _CREATEHOTLISTREQUEST
+DESCRIPTOR.message_types_by_name['GetHotlistRequest'] = _GETHOTLISTREQUEST
+DESCRIPTOR.message_types_by_name['UpdateHotlistRequest'] = _UPDATEHOTLISTREQUEST
+DESCRIPTOR.message_types_by_name['ListHotlistItemsRequest'] = _LISTHOTLISTITEMSREQUEST
+DESCRIPTOR.message_types_by_name['ListHotlistItemsResponse'] = _LISTHOTLISTITEMSRESPONSE
+DESCRIPTOR.message_types_by_name['RerankHotlistItemsRequest'] = _RERANKHOTLISTITEMSREQUEST
+DESCRIPTOR.message_types_by_name['AddHotlistItemsRequest'] = _ADDHOTLISTITEMSREQUEST
+DESCRIPTOR.message_types_by_name['RemoveHotlistItemsRequest'] = _REMOVEHOTLISTITEMSREQUEST
+DESCRIPTOR.message_types_by_name['RemoveHotlistEditorsRequest'] = _REMOVEHOTLISTEDITORSREQUEST
+DESCRIPTOR.message_types_by_name['GatherHotlistsForUserRequest'] = _GATHERHOTLISTSFORUSERREQUEST
+DESCRIPTOR.message_types_by_name['GatherHotlistsForUserResponse'] = _GATHERHOTLISTSFORUSERRESPONSE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+CreateHotlistRequest = _reflection.GeneratedProtocolMessageType('CreateHotlistRequest', (_message.Message,), {
+  'DESCRIPTOR' : _CREATEHOTLISTREQUEST,
+  '__module__' : 'api.v3.api_proto.hotlists_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.CreateHotlistRequest)
+  })
+_sym_db.RegisterMessage(CreateHotlistRequest)
+
+GetHotlistRequest = _reflection.GeneratedProtocolMessageType('GetHotlistRequest', (_message.Message,), {
+  'DESCRIPTOR' : _GETHOTLISTREQUEST,
+  '__module__' : 'api.v3.api_proto.hotlists_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.GetHotlistRequest)
+  })
+_sym_db.RegisterMessage(GetHotlistRequest)
+
+UpdateHotlistRequest = _reflection.GeneratedProtocolMessageType('UpdateHotlistRequest', (_message.Message,), {
+  'DESCRIPTOR' : _UPDATEHOTLISTREQUEST,
+  '__module__' : 'api.v3.api_proto.hotlists_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.UpdateHotlistRequest)
+  })
+_sym_db.RegisterMessage(UpdateHotlistRequest)
+
+ListHotlistItemsRequest = _reflection.GeneratedProtocolMessageType('ListHotlistItemsRequest', (_message.Message,), {
+  'DESCRIPTOR' : _LISTHOTLISTITEMSREQUEST,
+  '__module__' : 'api.v3.api_proto.hotlists_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListHotlistItemsRequest)
+  })
+_sym_db.RegisterMessage(ListHotlistItemsRequest)
+
+ListHotlistItemsResponse = _reflection.GeneratedProtocolMessageType('ListHotlistItemsResponse', (_message.Message,), {
+  'DESCRIPTOR' : _LISTHOTLISTITEMSRESPONSE,
+  '__module__' : 'api.v3.api_proto.hotlists_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListHotlistItemsResponse)
+  })
+_sym_db.RegisterMessage(ListHotlistItemsResponse)
+
+RerankHotlistItemsRequest = _reflection.GeneratedProtocolMessageType('RerankHotlistItemsRequest', (_message.Message,), {
+  'DESCRIPTOR' : _RERANKHOTLISTITEMSREQUEST,
+  '__module__' : 'api.v3.api_proto.hotlists_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.RerankHotlistItemsRequest)
+  })
+_sym_db.RegisterMessage(RerankHotlistItemsRequest)
+
+AddHotlistItemsRequest = _reflection.GeneratedProtocolMessageType('AddHotlistItemsRequest', (_message.Message,), {
+  'DESCRIPTOR' : _ADDHOTLISTITEMSREQUEST,
+  '__module__' : 'api.v3.api_proto.hotlists_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.AddHotlistItemsRequest)
+  })
+_sym_db.RegisterMessage(AddHotlistItemsRequest)
+
+RemoveHotlistItemsRequest = _reflection.GeneratedProtocolMessageType('RemoveHotlistItemsRequest', (_message.Message,), {
+  'DESCRIPTOR' : _REMOVEHOTLISTITEMSREQUEST,
+  '__module__' : 'api.v3.api_proto.hotlists_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.RemoveHotlistItemsRequest)
+  })
+_sym_db.RegisterMessage(RemoveHotlistItemsRequest)
+
+RemoveHotlistEditorsRequest = _reflection.GeneratedProtocolMessageType('RemoveHotlistEditorsRequest', (_message.Message,), {
+  'DESCRIPTOR' : _REMOVEHOTLISTEDITORSREQUEST,
+  '__module__' : 'api.v3.api_proto.hotlists_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.RemoveHotlistEditorsRequest)
+  })
+_sym_db.RegisterMessage(RemoveHotlistEditorsRequest)
+
+GatherHotlistsForUserRequest = _reflection.GeneratedProtocolMessageType('GatherHotlistsForUserRequest', (_message.Message,), {
+  'DESCRIPTOR' : _GATHERHOTLISTSFORUSERREQUEST,
+  '__module__' : 'api.v3.api_proto.hotlists_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.GatherHotlistsForUserRequest)
+  })
+_sym_db.RegisterMessage(GatherHotlistsForUserRequest)
+
+GatherHotlistsForUserResponse = _reflection.GeneratedProtocolMessageType('GatherHotlistsForUserResponse', (_message.Message,), {
+  'DESCRIPTOR' : _GATHERHOTLISTSFORUSERRESPONSE,
+  '__module__' : 'api.v3.api_proto.hotlists_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.GatherHotlistsForUserResponse)
+  })
+_sym_db.RegisterMessage(GatherHotlistsForUserResponse)
+
+
+DESCRIPTOR._options = None
+_CREATEHOTLISTREQUEST.fields_by_name['hotlist']._options = None
+_GETHOTLISTREQUEST.fields_by_name['name']._options = None
+_UPDATEHOTLISTREQUEST.fields_by_name['hotlist']._options = None
+_UPDATEHOTLISTREQUEST.fields_by_name['update_mask']._options = None
+_LISTHOTLISTITEMSREQUEST.fields_by_name['parent']._options = None
+_RERANKHOTLISTITEMSREQUEST.fields_by_name['name']._options = None
+_RERANKHOTLISTITEMSREQUEST.fields_by_name['hotlist_items']._options = None
+_RERANKHOTLISTITEMSREQUEST.fields_by_name['target_position']._options = None
+_ADDHOTLISTITEMSREQUEST.fields_by_name['parent']._options = None
+_ADDHOTLISTITEMSREQUEST.fields_by_name['issues']._options = None
+_REMOVEHOTLISTITEMSREQUEST.fields_by_name['parent']._options = None
+_REMOVEHOTLISTITEMSREQUEST.fields_by_name['issues']._options = None
+_REMOVEHOTLISTEDITORSREQUEST.fields_by_name['name']._options = None
+_REMOVEHOTLISTEDITORSREQUEST.fields_by_name['editors']._options = None
+_GATHERHOTLISTSFORUSERREQUEST.fields_by_name['user']._options = None
+
+_HOTLISTS = _descriptor.ServiceDescriptor(
+  name='Hotlists',
+  full_name='monorail.v3.Hotlists',
+  file=DESCRIPTOR,
+  index=0,
+  serialized_options=None,
+  create_key=_descriptor._internal_create_key,
+  serialized_start=1417,
+  serialized_end=2287,
+  methods=[
+  _descriptor.MethodDescriptor(
+    name='CreateHotlist',
+    full_name='monorail.v3.Hotlists.CreateHotlist',
+    index=0,
+    containing_service=None,
+    input_type=_CREATEHOTLISTREQUEST,
+    output_type=api_dot_v3_dot_api__proto_dot_feature__objects__pb2._HOTLIST,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GetHotlist',
+    full_name='monorail.v3.Hotlists.GetHotlist',
+    index=1,
+    containing_service=None,
+    input_type=_GETHOTLISTREQUEST,
+    output_type=api_dot_v3_dot_api__proto_dot_feature__objects__pb2._HOTLIST,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='UpdateHotlist',
+    full_name='monorail.v3.Hotlists.UpdateHotlist',
+    index=2,
+    containing_service=None,
+    input_type=_UPDATEHOTLISTREQUEST,
+    output_type=api_dot_v3_dot_api__proto_dot_feature__objects__pb2._HOTLIST,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='DeleteHotlist',
+    full_name='monorail.v3.Hotlists.DeleteHotlist',
+    index=3,
+    containing_service=None,
+    input_type=_GETHOTLISTREQUEST,
+    output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListHotlistItems',
+    full_name='monorail.v3.Hotlists.ListHotlistItems',
+    index=4,
+    containing_service=None,
+    input_type=_LISTHOTLISTITEMSREQUEST,
+    output_type=_LISTHOTLISTITEMSRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='RerankHotlistItems',
+    full_name='monorail.v3.Hotlists.RerankHotlistItems',
+    index=5,
+    containing_service=None,
+    input_type=_RERANKHOTLISTITEMSREQUEST,
+    output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='AddHotlistItems',
+    full_name='monorail.v3.Hotlists.AddHotlistItems',
+    index=6,
+    containing_service=None,
+    input_type=_ADDHOTLISTITEMSREQUEST,
+    output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='RemoveHotlistItems',
+    full_name='monorail.v3.Hotlists.RemoveHotlistItems',
+    index=7,
+    containing_service=None,
+    input_type=_REMOVEHOTLISTITEMSREQUEST,
+    output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='RemoveHotlistEditors',
+    full_name='monorail.v3.Hotlists.RemoveHotlistEditors',
+    index=8,
+    containing_service=None,
+    input_type=_REMOVEHOTLISTEDITORSREQUEST,
+    output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='GatherHotlistsForUser',
+    full_name='monorail.v3.Hotlists.GatherHotlistsForUser',
+    index=9,
+    containing_service=None,
+    input_type=_GATHERHOTLISTSFORUSERREQUEST,
+    output_type=_GATHERHOTLISTSFORUSERRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+])
+_sym_db.RegisterServiceDescriptor(_HOTLISTS)
+
+DESCRIPTOR.services_by_name['Hotlists'] = _HOTLISTS
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/v3/api_proto/hotlists_prpc_pb2.py b/api/v3/api_proto/hotlists_prpc_pb2.py
new file mode 100644
index 0000000..bce36ac
--- /dev/null
+++ b/api/v3/api_proto/hotlists_prpc_pb2.py
@@ -0,0 +1,788 @@
+# Generated by the pRPC protocol buffer compiler plugin.  DO NOT EDIT!
+# source: api/v3/api_proto/hotlists.proto
+
+import base64
+import zlib
+
+from google.protobuf import descriptor_pb2
+
+# Includes description of the api/v3/api_proto/hotlists.proto and all of its transitive
+# dependencies. Includes source code info.
+FILE_DESCRIPTOR_SET = descriptor_pb2.FileDescriptorSet()
+FILE_DESCRIPTOR_SET.ParseFromString(zlib.decompress(base64.b64decode(
+    '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')))
+_INDEX = {
+    f.name: {
+      'descriptor': f,
+      'services': {s.name: s for s in f.service},
+    }
+    for f in FILE_DESCRIPTOR_SET.file
+}
+
+
+HotlistsServiceDescription = {
+  'file_descriptor_set': FILE_DESCRIPTOR_SET,
+  'file_descriptor': _INDEX[u'api/v3/api_proto/hotlists.proto']['descriptor'],
+  'service_descriptor': _INDEX[u'api/v3/api_proto/hotlists.proto']['services'][u'Hotlists'],
+}
diff --git a/api/v3/api_proto/issue_objects.proto b/api/v3/api_proto/issue_objects.proto
new file mode 100644
index 0000000..2c5cf69
--- /dev/null
+++ b/api/v3/api_proto/issue_objects.proto
@@ -0,0 +1,349 @@
+// Copyright 2020 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
+
+// This file defines protobufs for issues and related business
+// objects, e.g., field values, comments, and attachments.
+
+syntax = "proto3";
+
+package monorail.v3;
+
+option go_package = "api/v3/api_proto";
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/protobuf/timestamp.proto";
+
+// Represents a comment and any associated changes to an Issue.
+//
+// Comments cannot be Created or Updated through standard methods. The
+// OUTPUT_ONLY annotations here indicate fields that would never be provided
+// by the user even if these methods were made available.
+// Next available tag: 11.
+message Comment {
+
+  // The type of comment.
+  // Next available tag: 9
+  enum Type {
+    // The default comment type. Used if type is omitted.
+    UNSPECIFIED = 0;
+    // A standard comment on an issue.
+    COMMENT = 1;
+    // A comment representing a new description for the issue.
+    DESCRIPTION = 2;
+  }
+
+  // A file attached to a comment.
+  // Next available tag: 8
+  message Attachment {
+    // The name of the attached file.
+    string filename = 1;
+    // It is possible for attachments to be deleted (and undeleted) by the
+    // uploader. The name of deleted attachments are still shown, but the
+    // content is not available.
+    IssueContentState state = 2;
+    // Size of the attached file in bytes.
+    uint64 size = 3;
+    // The type of content contained in the file, using the IANA's media type
+    // https://www.iana.org/assignments/media-types/media-types.xhtml.
+    string media_type = 4;
+    // The URI used for a preview of the attachment (when relelvant).
+    string thumbnail_uri = 5;
+    // The URI used to view the content of the attachment.
+    string view_uri = 6;
+    // The URI used to download the content of the attachment.
+    string download_uri = 7;
+  }
+
+  // This message is only suitable for displaying the amendment to users.
+  // We don't currently offer structured amendments that client code can
+  // reason about, field names can be ambiguous, and we don't have
+  // old_value for most changes.
+  // Next available tag: 4
+  message Amendment {
+    // This may be the name of a built-in or custom field, or relative to
+    // an approval field name.
+    string field_name = 1;
+    // This may be a new value that overwrote the old value, e.g., "Assigned",
+    // or it may be a space-separated list of changes, e.g., "Size-L -Size-S".
+    string new_or_delta_value = 2;
+    // old_value is only used when the user changes the summary.
+    string old_value = 3;
+  }
+
+  option (google.api.resource) = {
+    type: "api.crbug.com/Comment"
+    pattern: "projects/{project}/issues/{issue}/comments/{comment}"
+  };
+
+  // Resource name of the comment.
+  string name = 1;
+  // The state of the comment.
+  IssueContentState state = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+  // The type of comment.
+  Type type = 3;
+  // The text of the comment.
+  string content = 4;
+  // Resource name of the author of the comment.
+  string commenter = 5 [
+    (google.api.resource_reference) = { type: "api.crbug.com/User" },
+    (google.api.field_behavior) = OUTPUT_ONLY
+  ];
+  // The time this comment was added to the Issue.
+  google.protobuf.Timestamp create_time = 6
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+  // Optional string full text of an email that caused this comment to be added.
+  string inbound_message = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
+  // The approval this comment is associated with, if applicable.
+  string approval = 8
+      [(google.api.resource_reference) = { type: "api.crbug.com/ApprovalValue" }];
+  // Any changes made to the issue in association with this comment.
+  repeated Amendment amendments = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
+  // Any attachments uploaded in association with this comment.
+  repeated Attachment attachments = 10
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+
+// Many values on an issue can be set either explicitly or by a rule.
+//
+// Note: Though Derivations are used as OUTPUT_ONLY, values including them
+// will still be ingested even though the Derivation is ignored.
+//
+// Next available tag: 3
+enum Derivation {
+  // The default derivation. This value is used if the derivation is omitted.
+  DERIVATION_UNSPECIFIED = 0;
+  // The value was explicitly set on the issue.
+  EXPLICIT = 1;
+  // Value was auto-applied to the issue based on a project's rule. See
+  // monorail/doc/userguide/project-owners.md#how-to-configure-filter-rules
+  RULE = 2;
+}
+
+
+// A value of a custom field for an issue.
+// Next available tag: 5
+message FieldValue {
+  // The project-defined field associated with this value
+  string field = 1 [
+      (google.api.resource_reference) = { type: "api.crbug.com/FieldDef" }];
+  // The value associated with the field.
+  // Mapping of field types to string value:
+  // ENUM_TYPE(int) => str(value)
+  // INT_TYPE(int) => str(value)
+  // STR_TYPE(str) => value
+  // USER_TYPE(int) => the user's resource name
+  // DATE_TYPE(int) => str(int) representing time in seconds since epoch
+  // URL_TYPE(str) => value
+  string value = 2;
+  // How the value was derived.
+  Derivation derivation = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+  // Issues with phase-specific fields can have values for each phase.
+  string phase = 4;
+}
+
+// Documents and tracks a bug, task, or feature request within a Project.
+// Next available tag: 23
+message Issue {
+  option (google.api.resource) = {
+    type: "api.crbug.com/Issue"
+    pattern: "projects/{project}/issues/{issue}"
+  };
+
+  // A possibly rule-derived component for the issue.
+  // Next available tag: 3
+  message ComponentValue {
+    // The component.
+    string component = 1 [
+      (google.api.resource_reference) = { type: "api.crbug.com/ComponentDef" }
+    ];
+    // How the component was derived.
+    Derivation derivation = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+  }
+
+  // A possibly rule-derived label for an issue.
+  // Next available tag: 3
+  message LabelValue {
+    // The label.
+    string label = 1;
+    // How the label was derived.
+    Derivation derivation = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+  }
+
+  // A possibly rule-derived status for an issue.
+  // Next available tag: 3
+  message StatusValue {
+    // The status of the issue. Note that in rare cases this can be a
+    // value not defined in the project's StatusDefs (e.g. if the issue
+    // was moved from another project).
+    string status = 1;
+    // How the status was derived.
+    Derivation derivation = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+  }
+
+  // A possibly rule-derived user value on an issue.
+  // Next available tag: 3
+  message UserValue {
+    // The user.
+    string user = 1
+        [(google.api.resource_reference) = { type: "api.crbug.com/User" }];
+    // How the user value was derived.
+    Derivation derivation = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
+  }
+
+  // Resource name of the issue.
+  string name = 1;
+  // A brief summary of the issue. Generally displayed as a user-facing title.
+  // TODO(monorail:6988): The UI limits summary length while the backend does
+  // not. Resolve this discrepancy.
+  string summary = 2;
+  // The state of the issue.
+  IssueContentState state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
+  // The current status of the issue.
+  StatusValue status = 4 [(google.api.field_behavior) = REQUIRED];
+  // The user who created the issue.
+  string reporter = 5 [
+    (google.api.resource_reference) = { type: "api.crbug.com/User" },
+    (google.api.field_behavior) = OUTPUT_ONLY
+  ];
+  // The user currently responsible for the issue. This user must be a member of
+  // the Project.
+  UserValue owner = 6;
+  // Additional users receiving notifications on the issue.
+  repeated UserValue cc_users = 7;
+  // Labels applied to the issue.
+  repeated LabelValue labels = 8;
+  // Components the issue is associated with.
+  repeated ComponentValue components = 9;
+  // Values for custom fields on the issue.
+  repeated FieldValue field_values = 10;
+  // An issue can be merged into another. If this value is set, the issue
+  // referred to should be considered the primary source for further updates.
+  IssueRef merged_into_issue_ref = 11;
+  // Issues preventing the completion of this issue.
+  repeated IssueRef blocked_on_issue_refs = 12;
+  // Issues for which this issue is blocking completion.
+  repeated IssueRef blocking_issue_refs = 13;
+  // The time the issue was reported.
+  google.protobuf.Timestamp create_time = 14
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+  // The most recent time the issue was closed.
+  google.protobuf.Timestamp close_time = 15
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+  // The most recent time the issue was modified.
+  google.protobuf.Timestamp modify_time = 16
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+  // The most recent time a component value was modified.
+  google.protobuf.Timestamp component_modify_time = 17
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+  // The most recent time the status value was modified.
+  google.protobuf.Timestamp status_modify_time = 18
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+  // The most recent time the owner made a modification to the issue.
+  google.protobuf.Timestamp owner_modify_time = 19
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+  // The number of attachments associated with the issue.
+  uint32 attachment_count = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
+  // The number of users who have starred the issue.
+  uint32 star_count = 21 [(google.api.field_behavior) = OUTPUT_ONLY];
+  // Phases of a process the issue is tracking (if applicable).
+  // See monorail/doc/userguide/concepts.md#issue-approvals-and-gates
+  repeated string phases = 22 [
+      (google.api.field_behavior) = OUTPUT_ONLY];
+}
+
+// States that an issue or its comments can be in (aip.dev/216).
+// Next available tag: 4
+enum IssueContentState {
+  // The default value. This value is used if the state is omitted.
+  STATE_UNSPECIFIED = 0;
+  // The Issue or Comment is available.
+  ACTIVE = 1;
+  // The Issue or Comment has been deleted.
+  DELETED = 2;
+  // The Issue or Comment has been flagged as spam.
+  // Takes precedent over DELETED.
+  SPAM = 3;
+}
+
+// Specifies a column in an issues list view.
+// Next available tag: 2
+message IssuesListColumn {
+  // Column name shown in the column header.
+  string column = 1;
+}
+
+// Refers to an issue that may or may not be tracked in Monorail.
+// At least one of `issue` and `ext_identifier` MUST be set; they MUST NOT both
+// be set.
+// Next available tag: 3
+message IssueRef {
+  // Resource name of an issue tracked in Monorail
+  string issue = 1
+      [(google.api.resource_reference) = { type: "api.crbug.com/Issue" }];
+  // For referencing external issues, e.g. b/1234, or a dangling reference
+  // to an old 'codesite' issue.
+  // TODO(monorail:7208): add more documentation on dangling references.
+  string ext_identifier = 2;
+}
+
+// Documents and tracks an approval process.
+// See monorail/doc/userguide/concepts.md#issue-approvals-and-gates
+// Next available tag: 9
+message ApprovalValue {
+  option (google.api.resource) = {
+     type: "api.crbug.com/ApprovalValue"
+     pattern: "projects/{project}/issues/{issue}/approvalValues/{approval}"
+   };
+
+  // Potential states for an approval. Note that these statuses cause different
+  // sets of notifications. See monorail/doc/userguide/email.md
+  // Next available tag: 9
+  enum ApprovalStatus {
+    // The default approval status. This value is used if the status is omitted.
+    APPROVAL_STATUS_UNSPECIFIED = 0;
+    // No status has yet been set on this value.
+    NOT_SET = 1;
+    // This issue needs review from the approvers for this phase.
+    NEEDS_REVIEW = 2;
+    // This approval is not needed for this issue for this phase.
+    NA = 3;
+    // The issue is ready for the approvers to review.
+    REVIEW_REQUESTED = 4;
+    // The approvers have started reviewing this issue.
+    REVIEW_STARTED = 5;
+    // The approvers need more information.
+    NEED_INFO = 6;
+    // The approvers have approved this issue for this phase.
+    APPROVED = 7;
+    // The approvers have indicated this issue is not approved for this phase.
+    NOT_APPROVED = 8;
+  }
+
+  // The resource name.
+  string name = 1;
+  // The resource name of the ApprovalDef.
+  string approval_def = 2 [
+      (google.api.resource_reference) = { type: "api.crbug.com/ApprovalDef" },
+      (google.api.field_behavior) = OUTPUT_ONLY];
+  // The users able to grant this approval.
+  repeated string approvers = 3 [
+      (google.api.resource_reference) = { type: "api.crbug.com/User" }];
+  // The current status of the approval.
+  ApprovalStatus status = 4;
+  // The time `status` was last set.
+  google.protobuf.Timestamp set_time = 5 [
+      (google.api.field_behavior) = OUTPUT_ONLY];
+  // The user who most recently set `status`.
+  string setter = 6 [
+      (google.api.resource_reference) = { type: "api.crbug.com/User" },
+      (google.api.field_behavior) = OUTPUT_ONLY];
+  // The phase the approval is associated with (if applicable).
+  string phase = 7 [
+      (google.api.field_behavior) = OUTPUT_ONLY];
+  // FieldValues with `approval_def` as their parent.
+  repeated FieldValue field_values = 8;
+}
\ No newline at end of file
diff --git a/api/v3/api_proto/issue_objects_pb2.py b/api/v3/api_proto/issue_objects_pb2.py
new file mode 100644
index 0000000..1644b3c
--- /dev/null
+++ b/api/v3/api_proto/issue_objects_pb2.py
@@ -0,0 +1,1123 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/v3/api_proto/issue_objects.proto
+
+from google.protobuf.internal import enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
+from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
+from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/v3/api_proto/issue_objects.proto',
+  package='monorail.v3',
+  syntax='proto3',
+  serialized_options=b'Z\020api/v3/api_proto',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n$api/v3/api_proto/issue_objects.proto\x12\x0bmonorail.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xba\x06\n\x07\x43omment\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x32\n\x05state\x18\x02 \x01(\x0e\x32\x1e.monorail.v3.IssueContentStateB\x03\xe0\x41\x03\x12\'\n\x04type\x18\x03 \x01(\x0e\x32\x19.monorail.v3.Comment.Type\x12\x0f\n\x07\x63ontent\x18\x04 \x01(\t\x12-\n\tcommenter\x18\x05 \x01(\tB\x1a\xfa\x41\x14\n\x12\x61pi.crbug.com/User\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1c\n\x0finbound_message\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x32\n\x08\x61pproval\x18\x08 \x01(\tB \xfa\x41\x1d\n\x1b\x61pi.crbug.com/ApprovalValue\x12\x37\n\namendments\x18\t \x03(\x0b\x32\x1e.monorail.v3.Comment.AmendmentB\x03\xe0\x41\x03\x12\x39\n\x0b\x61ttachments\x18\n \x03(\x0b\x32\x1f.monorail.v3.Comment.AttachmentB\x03\xe0\x41\x03\x1a\xae\x01\n\nAttachment\x12\x10\n\x08\x66ilename\x18\x01 \x01(\t\x12-\n\x05state\x18\x02 \x01(\x0e\x32\x1e.monorail.v3.IssueContentState\x12\x0c\n\x04size\x18\x03 \x01(\x04\x12\x12\n\nmedia_type\x18\x04 \x01(\t\x12\x15\n\rthumbnail_uri\x18\x05 \x01(\t\x12\x10\n\x08view_uri\x18\x06 \x01(\t\x12\x14\n\x0c\x64ownload_uri\x18\x07 \x01(\t\x1aN\n\tAmendment\x12\x12\n\nfield_name\x18\x01 \x01(\t\x12\x1a\n\x12new_or_delta_value\x18\x02 \x01(\t\x12\x11\n\told_value\x18\x03 \x01(\t\"5\n\x04Type\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0b\n\x07\x43OMMENT\x10\x01\x12\x0f\n\x0b\x44\x45SCRIPTION\x10\x02:P\xea\x41M\n\x15\x61pi.crbug.com/Comment\x12\x34projects/{project}/issues/{issue}/comments/{comment}\"\x88\x01\n\nFieldValue\x12*\n\x05\x66ield\x18\x01 \x01(\tB\x1b\xfa\x41\x18\n\x16\x61pi.crbug.com/FieldDef\x12\r\n\x05value\x18\x02 \x01(\t\x12\x30\n\nderivation\x18\x03 \x01(\x0e\x32\x17.monorail.v3.DerivationB\x03\xe0\x41\x03\x12\r\n\x05phase\x18\x04 \x01(\t\"\xb1\x0b\n\x05Issue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07summary\x18\x02 \x01(\t\x12\x32\n\x05state\x18\x03 \x01(\x0e\x32\x1e.monorail.v3.IssueContentStateB\x03\xe0\x41\x03\x12\x33\n\x06status\x18\x04 \x01(\x0b\x32\x1e.monorail.v3.Issue.StatusValueB\x03\xe0\x41\x02\x12,\n\x08reporter\x18\x05 \x01(\tB\x1a\xfa\x41\x14\n\x12\x61pi.crbug.com/User\xe0\x41\x03\x12+\n\x05owner\x18\x06 \x01(\x0b\x32\x1c.monorail.v3.Issue.UserValue\x12.\n\x08\x63\x63_users\x18\x07 \x03(\x0b\x32\x1c.monorail.v3.Issue.UserValue\x12-\n\x06labels\x18\x08 \x03(\x0b\x32\x1d.monorail.v3.Issue.LabelValue\x12\x35\n\ncomponents\x18\t \x03(\x0b\x32!.monorail.v3.Issue.ComponentValue\x12-\n\x0c\x66ield_values\x18\n \x03(\x0b\x32\x17.monorail.v3.FieldValue\x12\x34\n\x15merged_into_issue_ref\x18\x0b \x01(\x0b\x32\x15.monorail.v3.IssueRef\x12\x34\n\x15\x62locked_on_issue_refs\x18\x0c \x03(\x0b\x32\x15.monorail.v3.IssueRef\x12\x32\n\x13\x62locking_issue_refs\x18\r \x03(\x0b\x32\x15.monorail.v3.IssueRef\x12\x34\n\x0b\x63reate_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x33\n\nclose_time\x18\x0f \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bmodify_time\x18\x10 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x15\x63omponent_modify_time\x18\x11 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12;\n\x12status_modify_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12:\n\x11owner_modify_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1d\n\x10\x61ttachment_count\x18\x14 \x01(\rB\x03\xe0\x41\x03\x12\x17\n\nstar_count\x18\x15 \x01(\rB\x03\xe0\x41\x03\x12\x13\n\x06phases\x18\x16 \x03(\tB\x03\xe0\x41\x03\x1av\n\x0e\x43omponentValue\x12\x32\n\tcomponent\x18\x01 \x01(\tB\x1f\xfa\x41\x1c\n\x1a\x61pi.crbug.com/ComponentDef\x12\x30\n\nderivation\x18\x02 \x01(\x0e\x32\x17.monorail.v3.DerivationB\x03\xe0\x41\x03\x1aM\n\nLabelValue\x12\r\n\x05label\x18\x01 \x01(\t\x12\x30\n\nderivation\x18\x02 \x01(\x0e\x32\x17.monorail.v3.DerivationB\x03\xe0\x41\x03\x1aO\n\x0bStatusValue\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x30\n\nderivation\x18\x02 \x01(\x0e\x32\x17.monorail.v3.DerivationB\x03\xe0\x41\x03\x1a\x64\n\tUserValue\x12%\n\x04user\x18\x01 \x01(\tB\x17\xfa\x41\x14\n\x12\x61pi.crbug.com/User\x12\x30\n\nderivation\x18\x02 \x01(\x0e\x32\x17.monorail.v3.DerivationB\x03\xe0\x41\x03:;\xea\x41\x38\n\x13\x61pi.crbug.com/Issue\x12!projects/{project}/issues/{issue}\"\"\n\x10IssuesListColumn\x12\x0e\n\x06\x63olumn\x18\x01 \x01(\t\"K\n\x08IssueRef\x12\'\n\x05issue\x18\x01 \x01(\tB\x18\xfa\x41\x15\n\x13\x61pi.crbug.com/Issue\x12\x16\n\x0e\x65xt_identifier\x18\x02 \x01(\t\"\xf2\x04\n\rApprovalValue\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x37\n\x0c\x61pproval_def\x18\x02 \x01(\tB!\xfa\x41\x1b\n\x19\x61pi.crbug.com/ApprovalDef\xe0\x41\x03\x12*\n\tapprovers\x18\x03 \x03(\tB\x17\xfa\x41\x14\n\x12\x61pi.crbug.com/User\x12\x39\n\x06status\x18\x04 \x01(\x0e\x32).monorail.v3.ApprovalValue.ApprovalStatus\x12\x31\n\x08set_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12*\n\x06setter\x18\x06 \x01(\tB\x1a\xfa\x41\x14\n\x12\x61pi.crbug.com/User\xe0\x41\x03\x12\x12\n\x05phase\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12-\n\x0c\x66ield_values\x18\x08 \x03(\x0b\x32\x17.monorail.v3.FieldValue\"\xb1\x01\n\x0e\x41pprovalStatus\x12\x1f\n\x1b\x41PPROVAL_STATUS_UNSPECIFIED\x10\x00\x12\x0b\n\x07NOT_SET\x10\x01\x12\x10\n\x0cNEEDS_REVIEW\x10\x02\x12\x06\n\x02NA\x10\x03\x12\x14\n\x10REVIEW_REQUESTED\x10\x04\x12\x12\n\x0eREVIEW_STARTED\x10\x05\x12\r\n\tNEED_INFO\x10\x06\x12\x0c\n\x08\x41PPROVED\x10\x07\x12\x10\n\x0cNOT_APPROVED\x10\x08:]\xea\x41Z\n\x1b\x61pi.crbug.com/ApprovalValue\x12;projects/{project}/issues/{issue}/approvalValues/{approval}*@\n\nDerivation\x12\x1a\n\x16\x44\x45RIVATION_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x45XPLICIT\x10\x01\x12\x08\n\x04RULE\x10\x02*M\n\x11IssueContentState\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07\x44\x45LETED\x10\x02\x12\x08\n\x04SPAM\x10\x03\x42\x12Z\x10\x61pi/v3/api_protob\x06proto3'
+  ,
+  dependencies=[google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,])
+
+_DERIVATION = _descriptor.EnumDescriptor(
+  name='Derivation',
+  full_name='monorail.v3.Derivation',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='DERIVATION_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='EXPLICIT', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='RULE', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=3316,
+  serialized_end=3380,
+)
+_sym_db.RegisterEnumDescriptor(_DERIVATION)
+
+Derivation = enum_type_wrapper.EnumTypeWrapper(_DERIVATION)
+_ISSUECONTENTSTATE = _descriptor.EnumDescriptor(
+  name='IssueContentState',
+  full_name='monorail.v3.IssueContentState',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='STATE_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='ACTIVE', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='DELETED', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='SPAM', index=3, number=3,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=3382,
+  serialized_end=3459,
+)
+_sym_db.RegisterEnumDescriptor(_ISSUECONTENTSTATE)
+
+IssueContentState = enum_type_wrapper.EnumTypeWrapper(_ISSUECONTENTSTATE)
+DERIVATION_UNSPECIFIED = 0
+EXPLICIT = 1
+RULE = 2
+STATE_UNSPECIFIED = 0
+ACTIVE = 1
+DELETED = 2
+SPAM = 3
+
+
+_COMMENT_TYPE = _descriptor.EnumDescriptor(
+  name='Type',
+  full_name='monorail.v3.Comment.Type',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='COMMENT', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='DESCRIPTION', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=838,
+  serialized_end=891,
+)
+_sym_db.RegisterEnumDescriptor(_COMMENT_TYPE)
+
+_APPROVALVALUE_APPROVALSTATUS = _descriptor.EnumDescriptor(
+  name='ApprovalStatus',
+  full_name='monorail.v3.ApprovalValue.ApprovalStatus',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='APPROVAL_STATUS_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NOT_SET', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NEEDS_REVIEW', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NA', index=3, number=3,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='REVIEW_REQUESTED', index=4, number=4,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='REVIEW_STARTED', index=5, number=5,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NEED_INFO', index=6, number=6,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='APPROVED', index=7, number=7,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NOT_APPROVED', index=8, number=8,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=3042,
+  serialized_end=3219,
+)
+_sym_db.RegisterEnumDescriptor(_APPROVALVALUE_APPROVALSTATUS)
+
+
+_COMMENT_ATTACHMENT = _descriptor.Descriptor(
+  name='Attachment',
+  full_name='monorail.v3.Comment.Attachment',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='filename', full_name='monorail.v3.Comment.Attachment.filename', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='state', full_name='monorail.v3.Comment.Attachment.state', index=1,
+      number=2, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='size', full_name='monorail.v3.Comment.Attachment.size', index=2,
+      number=3, type=4, cpp_type=4, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='media_type', full_name='monorail.v3.Comment.Attachment.media_type', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='thumbnail_uri', full_name='monorail.v3.Comment.Attachment.thumbnail_uri', index=4,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='view_uri', full_name='monorail.v3.Comment.Attachment.view_uri', index=5,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='download_uri', full_name='monorail.v3.Comment.Attachment.download_uri', index=6,
+      number=7, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=582,
+  serialized_end=756,
+)
+
+_COMMENT_AMENDMENT = _descriptor.Descriptor(
+  name='Amendment',
+  full_name='monorail.v3.Comment.Amendment',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='field_name', full_name='monorail.v3.Comment.Amendment.field_name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='new_or_delta_value', full_name='monorail.v3.Comment.Amendment.new_or_delta_value', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='old_value', full_name='monorail.v3.Comment.Amendment.old_value', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=758,
+  serialized_end=836,
+)
+
+_COMMENT = _descriptor.Descriptor(
+  name='Comment',
+  full_name='monorail.v3.Comment',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.Comment.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='state', full_name='monorail.v3.Comment.state', index=1,
+      number=2, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='type', full_name='monorail.v3.Comment.type', index=2,
+      number=3, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='content', full_name='monorail.v3.Comment.content', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='commenter', full_name='monorail.v3.Comment.commenter', index=4,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='create_time', full_name='monorail.v3.Comment.create_time', index=5,
+      number=6, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='inbound_message', full_name='monorail.v3.Comment.inbound_message', index=6,
+      number=7, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='approval', full_name='monorail.v3.Comment.approval', index=7,
+      number=8, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\035\n\033api.crbug.com/ApprovalValue', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='amendments', full_name='monorail.v3.Comment.amendments', index=8,
+      number=9, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='attachments', full_name='monorail.v3.Comment.attachments', index=9,
+      number=10, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[_COMMENT_ATTACHMENT, _COMMENT_AMENDMENT, ],
+  enum_types=[
+    _COMMENT_TYPE,
+  ],
+  serialized_options=b'\352AM\n\025api.crbug.com/Comment\0224projects/{project}/issues/{issue}/comments/{comment}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=147,
+  serialized_end=973,
+)
+
+
+_FIELDVALUE = _descriptor.Descriptor(
+  name='FieldValue',
+  full_name='monorail.v3.FieldValue',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='field', full_name='monorail.v3.FieldValue.field', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\030\n\026api.crbug.com/FieldDef', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='value', full_name='monorail.v3.FieldValue.value', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='derivation', full_name='monorail.v3.FieldValue.derivation', index=2,
+      number=3, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='phase', full_name='monorail.v3.FieldValue.phase', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=976,
+  serialized_end=1112,
+)
+
+
+_ISSUE_COMPONENTVALUE = _descriptor.Descriptor(
+  name='ComponentValue',
+  full_name='monorail.v3.Issue.ComponentValue',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='component', full_name='monorail.v3.Issue.ComponentValue.component', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\034\n\032api.crbug.com/ComponentDef', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='derivation', full_name='monorail.v3.Issue.ComponentValue.derivation', index=1,
+      number=2, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2131,
+  serialized_end=2249,
+)
+
+_ISSUE_LABELVALUE = _descriptor.Descriptor(
+  name='LabelValue',
+  full_name='monorail.v3.Issue.LabelValue',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='label', full_name='monorail.v3.Issue.LabelValue.label', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='derivation', full_name='monorail.v3.Issue.LabelValue.derivation', index=1,
+      number=2, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2251,
+  serialized_end=2328,
+)
+
+_ISSUE_STATUSVALUE = _descriptor.Descriptor(
+  name='StatusValue',
+  full_name='monorail.v3.Issue.StatusValue',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='status', full_name='monorail.v3.Issue.StatusValue.status', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='derivation', full_name='monorail.v3.Issue.StatusValue.derivation', index=1,
+      number=2, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2330,
+  serialized_end=2409,
+)
+
+_ISSUE_USERVALUE = _descriptor.Descriptor(
+  name='UserValue',
+  full_name='monorail.v3.Issue.UserValue',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user', full_name='monorail.v3.Issue.UserValue.user', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='derivation', full_name='monorail.v3.Issue.UserValue.derivation', index=1,
+      number=2, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2411,
+  serialized_end=2511,
+)
+
+_ISSUE = _descriptor.Descriptor(
+  name='Issue',
+  full_name='monorail.v3.Issue',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.Issue.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='summary', full_name='monorail.v3.Issue.summary', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='state', full_name='monorail.v3.Issue.state', index=2,
+      number=3, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='status', full_name='monorail.v3.Issue.status', index=3,
+      number=4, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='reporter', full_name='monorail.v3.Issue.reporter', index=4,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='owner', full_name='monorail.v3.Issue.owner', index=5,
+      number=6, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='cc_users', full_name='monorail.v3.Issue.cc_users', index=6,
+      number=7, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='labels', full_name='monorail.v3.Issue.labels', index=7,
+      number=8, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='components', full_name='monorail.v3.Issue.components', index=8,
+      number=9, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='field_values', full_name='monorail.v3.Issue.field_values', index=9,
+      number=10, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='merged_into_issue_ref', full_name='monorail.v3.Issue.merged_into_issue_ref', index=10,
+      number=11, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='blocked_on_issue_refs', full_name='monorail.v3.Issue.blocked_on_issue_refs', index=11,
+      number=12, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='blocking_issue_refs', full_name='monorail.v3.Issue.blocking_issue_refs', index=12,
+      number=13, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='create_time', full_name='monorail.v3.Issue.create_time', index=13,
+      number=14, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='close_time', full_name='monorail.v3.Issue.close_time', index=14,
+      number=15, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='modify_time', full_name='monorail.v3.Issue.modify_time', index=15,
+      number=16, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='component_modify_time', full_name='monorail.v3.Issue.component_modify_time', index=16,
+      number=17, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='status_modify_time', full_name='monorail.v3.Issue.status_modify_time', index=17,
+      number=18, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='owner_modify_time', full_name='monorail.v3.Issue.owner_modify_time', index=18,
+      number=19, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='attachment_count', full_name='monorail.v3.Issue.attachment_count', index=19,
+      number=20, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='star_count', full_name='monorail.v3.Issue.star_count', index=20,
+      number=21, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='phases', full_name='monorail.v3.Issue.phases', index=21,
+      number=22, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[_ISSUE_COMPONENTVALUE, _ISSUE_LABELVALUE, _ISSUE_STATUSVALUE, _ISSUE_USERVALUE, ],
+  enum_types=[
+  ],
+  serialized_options=b'\352A8\n\023api.crbug.com/Issue\022!projects/{project}/issues/{issue}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1115,
+  serialized_end=2572,
+)
+
+
+_ISSUESLISTCOLUMN = _descriptor.Descriptor(
+  name='IssuesListColumn',
+  full_name='monorail.v3.IssuesListColumn',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='column', full_name='monorail.v3.IssuesListColumn.column', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2574,
+  serialized_end=2608,
+)
+
+
+_ISSUEREF = _descriptor.Descriptor(
+  name='IssueRef',
+  full_name='monorail.v3.IssueRef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue', full_name='monorail.v3.IssueRef.issue', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\025\n\023api.crbug.com/Issue', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='ext_identifier', full_name='monorail.v3.IssueRef.ext_identifier', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2610,
+  serialized_end=2685,
+)
+
+
+_APPROVALVALUE = _descriptor.Descriptor(
+  name='ApprovalValue',
+  full_name='monorail.v3.ApprovalValue',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.ApprovalValue.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='approval_def', full_name='monorail.v3.ApprovalValue.approval_def', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\033\n\031api.crbug.com/ApprovalDef\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='approvers', full_name='monorail.v3.ApprovalValue.approvers', index=2,
+      number=3, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='status', full_name='monorail.v3.ApprovalValue.status', index=3,
+      number=4, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='set_time', full_name='monorail.v3.ApprovalValue.set_time', index=4,
+      number=5, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='setter', full_name='monorail.v3.ApprovalValue.setter', index=5,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='phase', full_name='monorail.v3.ApprovalValue.phase', index=6,
+      number=7, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='field_values', full_name='monorail.v3.ApprovalValue.field_values', index=7,
+      number=8, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _APPROVALVALUE_APPROVALSTATUS,
+  ],
+  serialized_options=b'\352AZ\n\033api.crbug.com/ApprovalValue\022;projects/{project}/issues/{issue}/approvalValues/{approval}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2688,
+  serialized_end=3314,
+)
+
+_COMMENT_ATTACHMENT.fields_by_name['state'].enum_type = _ISSUECONTENTSTATE
+_COMMENT_ATTACHMENT.containing_type = _COMMENT
+_COMMENT_AMENDMENT.containing_type = _COMMENT
+_COMMENT.fields_by_name['state'].enum_type = _ISSUECONTENTSTATE
+_COMMENT.fields_by_name['type'].enum_type = _COMMENT_TYPE
+_COMMENT.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
+_COMMENT.fields_by_name['amendments'].message_type = _COMMENT_AMENDMENT
+_COMMENT.fields_by_name['attachments'].message_type = _COMMENT_ATTACHMENT
+_COMMENT_TYPE.containing_type = _COMMENT
+_FIELDVALUE.fields_by_name['derivation'].enum_type = _DERIVATION
+_ISSUE_COMPONENTVALUE.fields_by_name['derivation'].enum_type = _DERIVATION
+_ISSUE_COMPONENTVALUE.containing_type = _ISSUE
+_ISSUE_LABELVALUE.fields_by_name['derivation'].enum_type = _DERIVATION
+_ISSUE_LABELVALUE.containing_type = _ISSUE
+_ISSUE_STATUSVALUE.fields_by_name['derivation'].enum_type = _DERIVATION
+_ISSUE_STATUSVALUE.containing_type = _ISSUE
+_ISSUE_USERVALUE.fields_by_name['derivation'].enum_type = _DERIVATION
+_ISSUE_USERVALUE.containing_type = _ISSUE
+_ISSUE.fields_by_name['state'].enum_type = _ISSUECONTENTSTATE
+_ISSUE.fields_by_name['status'].message_type = _ISSUE_STATUSVALUE
+_ISSUE.fields_by_name['owner'].message_type = _ISSUE_USERVALUE
+_ISSUE.fields_by_name['cc_users'].message_type = _ISSUE_USERVALUE
+_ISSUE.fields_by_name['labels'].message_type = _ISSUE_LABELVALUE
+_ISSUE.fields_by_name['components'].message_type = _ISSUE_COMPONENTVALUE
+_ISSUE.fields_by_name['field_values'].message_type = _FIELDVALUE
+_ISSUE.fields_by_name['merged_into_issue_ref'].message_type = _ISSUEREF
+_ISSUE.fields_by_name['blocked_on_issue_refs'].message_type = _ISSUEREF
+_ISSUE.fields_by_name['blocking_issue_refs'].message_type = _ISSUEREF
+_ISSUE.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
+_ISSUE.fields_by_name['close_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
+_ISSUE.fields_by_name['modify_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
+_ISSUE.fields_by_name['component_modify_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
+_ISSUE.fields_by_name['status_modify_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
+_ISSUE.fields_by_name['owner_modify_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
+_APPROVALVALUE.fields_by_name['status'].enum_type = _APPROVALVALUE_APPROVALSTATUS
+_APPROVALVALUE.fields_by_name['set_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
+_APPROVALVALUE.fields_by_name['field_values'].message_type = _FIELDVALUE
+_APPROVALVALUE_APPROVALSTATUS.containing_type = _APPROVALVALUE
+DESCRIPTOR.message_types_by_name['Comment'] = _COMMENT
+DESCRIPTOR.message_types_by_name['FieldValue'] = _FIELDVALUE
+DESCRIPTOR.message_types_by_name['Issue'] = _ISSUE
+DESCRIPTOR.message_types_by_name['IssuesListColumn'] = _ISSUESLISTCOLUMN
+DESCRIPTOR.message_types_by_name['IssueRef'] = _ISSUEREF
+DESCRIPTOR.message_types_by_name['ApprovalValue'] = _APPROVALVALUE
+DESCRIPTOR.enum_types_by_name['Derivation'] = _DERIVATION
+DESCRIPTOR.enum_types_by_name['IssueContentState'] = _ISSUECONTENTSTATE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+Comment = _reflection.GeneratedProtocolMessageType('Comment', (_message.Message,), {
+
+  'Attachment' : _reflection.GeneratedProtocolMessageType('Attachment', (_message.Message,), {
+    'DESCRIPTOR' : _COMMENT_ATTACHMENT,
+    '__module__' : 'api.v3.api_proto.issue_objects_pb2'
+    # @@protoc_insertion_point(class_scope:monorail.v3.Comment.Attachment)
+    })
+  ,
+
+  'Amendment' : _reflection.GeneratedProtocolMessageType('Amendment', (_message.Message,), {
+    'DESCRIPTOR' : _COMMENT_AMENDMENT,
+    '__module__' : 'api.v3.api_proto.issue_objects_pb2'
+    # @@protoc_insertion_point(class_scope:monorail.v3.Comment.Amendment)
+    })
+  ,
+  'DESCRIPTOR' : _COMMENT,
+  '__module__' : 'api.v3.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.Comment)
+  })
+_sym_db.RegisterMessage(Comment)
+_sym_db.RegisterMessage(Comment.Attachment)
+_sym_db.RegisterMessage(Comment.Amendment)
+
+FieldValue = _reflection.GeneratedProtocolMessageType('FieldValue', (_message.Message,), {
+  'DESCRIPTOR' : _FIELDVALUE,
+  '__module__' : 'api.v3.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.FieldValue)
+  })
+_sym_db.RegisterMessage(FieldValue)
+
+Issue = _reflection.GeneratedProtocolMessageType('Issue', (_message.Message,), {
+
+  'ComponentValue' : _reflection.GeneratedProtocolMessageType('ComponentValue', (_message.Message,), {
+    'DESCRIPTOR' : _ISSUE_COMPONENTVALUE,
+    '__module__' : 'api.v3.api_proto.issue_objects_pb2'
+    # @@protoc_insertion_point(class_scope:monorail.v3.Issue.ComponentValue)
+    })
+  ,
+
+  'LabelValue' : _reflection.GeneratedProtocolMessageType('LabelValue', (_message.Message,), {
+    'DESCRIPTOR' : _ISSUE_LABELVALUE,
+    '__module__' : 'api.v3.api_proto.issue_objects_pb2'
+    # @@protoc_insertion_point(class_scope:monorail.v3.Issue.LabelValue)
+    })
+  ,
+
+  'StatusValue' : _reflection.GeneratedProtocolMessageType('StatusValue', (_message.Message,), {
+    'DESCRIPTOR' : _ISSUE_STATUSVALUE,
+    '__module__' : 'api.v3.api_proto.issue_objects_pb2'
+    # @@protoc_insertion_point(class_scope:monorail.v3.Issue.StatusValue)
+    })
+  ,
+
+  'UserValue' : _reflection.GeneratedProtocolMessageType('UserValue', (_message.Message,), {
+    'DESCRIPTOR' : _ISSUE_USERVALUE,
+    '__module__' : 'api.v3.api_proto.issue_objects_pb2'
+    # @@protoc_insertion_point(class_scope:monorail.v3.Issue.UserValue)
+    })
+  ,
+  'DESCRIPTOR' : _ISSUE,
+  '__module__' : 'api.v3.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.Issue)
+  })
+_sym_db.RegisterMessage(Issue)
+_sym_db.RegisterMessage(Issue.ComponentValue)
+_sym_db.RegisterMessage(Issue.LabelValue)
+_sym_db.RegisterMessage(Issue.StatusValue)
+_sym_db.RegisterMessage(Issue.UserValue)
+
+IssuesListColumn = _reflection.GeneratedProtocolMessageType('IssuesListColumn', (_message.Message,), {
+  'DESCRIPTOR' : _ISSUESLISTCOLUMN,
+  '__module__' : 'api.v3.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.IssuesListColumn)
+  })
+_sym_db.RegisterMessage(IssuesListColumn)
+
+IssueRef = _reflection.GeneratedProtocolMessageType('IssueRef', (_message.Message,), {
+  'DESCRIPTOR' : _ISSUEREF,
+  '__module__' : 'api.v3.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.IssueRef)
+  })
+_sym_db.RegisterMessage(IssueRef)
+
+ApprovalValue = _reflection.GeneratedProtocolMessageType('ApprovalValue', (_message.Message,), {
+  'DESCRIPTOR' : _APPROVALVALUE,
+  '__module__' : 'api.v3.api_proto.issue_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ApprovalValue)
+  })
+_sym_db.RegisterMessage(ApprovalValue)
+
+
+DESCRIPTOR._options = None
+_COMMENT.fields_by_name['state']._options = None
+_COMMENT.fields_by_name['commenter']._options = None
+_COMMENT.fields_by_name['create_time']._options = None
+_COMMENT.fields_by_name['inbound_message']._options = None
+_COMMENT.fields_by_name['approval']._options = None
+_COMMENT.fields_by_name['amendments']._options = None
+_COMMENT.fields_by_name['attachments']._options = None
+_COMMENT._options = None
+_FIELDVALUE.fields_by_name['field']._options = None
+_FIELDVALUE.fields_by_name['derivation']._options = None
+_ISSUE_COMPONENTVALUE.fields_by_name['component']._options = None
+_ISSUE_COMPONENTVALUE.fields_by_name['derivation']._options = None
+_ISSUE_LABELVALUE.fields_by_name['derivation']._options = None
+_ISSUE_STATUSVALUE.fields_by_name['derivation']._options = None
+_ISSUE_USERVALUE.fields_by_name['user']._options = None
+_ISSUE_USERVALUE.fields_by_name['derivation']._options = None
+_ISSUE.fields_by_name['state']._options = None
+_ISSUE.fields_by_name['status']._options = None
+_ISSUE.fields_by_name['reporter']._options = None
+_ISSUE.fields_by_name['create_time']._options = None
+_ISSUE.fields_by_name['close_time']._options = None
+_ISSUE.fields_by_name['modify_time']._options = None
+_ISSUE.fields_by_name['component_modify_time']._options = None
+_ISSUE.fields_by_name['status_modify_time']._options = None
+_ISSUE.fields_by_name['owner_modify_time']._options = None
+_ISSUE.fields_by_name['attachment_count']._options = None
+_ISSUE.fields_by_name['star_count']._options = None
+_ISSUE.fields_by_name['phases']._options = None
+_ISSUE._options = None
+_ISSUEREF.fields_by_name['issue']._options = None
+_APPROVALVALUE.fields_by_name['approval_def']._options = None
+_APPROVALVALUE.fields_by_name['approvers']._options = None
+_APPROVALVALUE.fields_by_name['set_time']._options = None
+_APPROVALVALUE.fields_by_name['setter']._options = None
+_APPROVALVALUE.fields_by_name['phase']._options = None
+_APPROVALVALUE._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/api/v3/api_proto/issues.proto b/api/v3/api_proto/issues.proto
new file mode 100644
index 0000000..988f958
--- /dev/null
+++ b/api/v3/api_proto/issues.proto
@@ -0,0 +1,461 @@
+// Copyright 2020 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
+
+syntax = "proto3";
+
+package monorail.v3;
+
+option go_package = "api/v3/api_proto";
+
+import "google/protobuf/field_mask.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "api/v3/api_proto/issue_objects.proto";
+
+// ***ONLY CALL rpcs WITH `status: {ALPHA|STABLE}`***
+// rpcs without `status` are not ready.
+
+// Issues service includes all methods needed for managing Issues.
+service Issues {
+  // status: ALPHA
+  // Returns the requested Issue.
+  //
+  // Raises:
+  //   INVALID_ARGUMENT if `name` is formatted incorrectly.
+  //   NOT_FOUND if the issue does not exist.
+  //   PERMISSION_DENIED if the requester is not allowed to view the issue.
+  rpc GetIssue (GetIssueRequest) returns (Issue) {}
+
+  // status: ALPHA
+  // Returns the requested Issues.
+  //
+  // Raises:
+  //   INVALID_ARGUMENT if `names` is formatted incorrectly. Or if a parent
+  //       collection in `names` does not match the value in `parent`.
+  //   NOT_FOUND if any of the given issues do not exist.
+  //   PERMISSION_DENIED if the requester does not have permission to view one
+  //       (or more) of the given issues.
+  rpc BatchGetIssues(BatchGetIssuesRequest) returns (BatchGetIssuesResponse) {}
+
+  // status: ALPHA
+  // Searches over issues within the specified projects.
+  //
+  // Raises:
+  //   INVALID_ARGUMENT if project names or search query are invalid.
+  rpc SearchIssues (SearchIssuesRequest) returns (SearchIssuesResponse) {}
+
+  // status: ALPHA
+  // Lists comments for an issue.
+  //
+  // Raises:
+  //   INVALID_ARGUMENT if `parent` is formatted incorrectly or `page_size` < 0.
+  //   NOT_FOUND if `parent` does not exist.
+  //   PERMISSION_DENIED if the requester is not allowed to view `parent`.
+  rpc ListComments (ListCommentsRequest) returns (ListCommentsResponse) {}
+
+  // status: ALPHA
+  // Modifies Issues and creates a new Comment for each.
+  // Issues with NOOP changes and no comment_content will not be updated
+  // and will not be included in the response.
+  // We do not offer a standard UpdateIssue because every issue change
+  // must result in the side-effect of creating a new Comment, and may result in
+  // the side effect of sending a notification. We also want to allow for any
+  // combination of issue changes to be made at once in a monolithic method.
+  //
+  // Raises:
+  //   INVALID_ARGUMENT required fields are missing or fields are formatted
+  //     incorrectly.
+  //   NOT_FOUND if any specified issues are not found.
+  //   PERMISSION_DENIED if the requester is not allowed to make the
+  //     requested change.
+  rpc ModifyIssues (ModifyIssuesRequest) returns (ModifyIssuesResponse) {}
+
+  // status: ALPHA
+  // Modifies ApprovalValues and creates a new Comment for each delta.
+  // We do not offer a standard UpdateApprovalValue because changes result
+  // in creating Comments on the parent Issue, and may have the side effect of
+  // sending notifications. We also want to allow for any combination of
+  // approval changes to be made at once in a monolithic method.
+  // To modify owner add 'owner' to update_mask, though 'owner.user' works too.
+  //
+  // Raises:
+  //   INVALID_ARGUMENT required fields are missing or fields are formatted
+  //     incorrectly.
+  //   NOT_FOUND if any specified ApprovalValues are not found.
+  //   PERMISSION_DENIED if the requester is not allowed to make any of the
+  //     requested changes.
+  rpc ModifyIssueApprovalValues (ModifyIssueApprovalValuesRequest) returns
+      (ModifyIssueApprovalValuesResponse) {}
+
+  // status: ALPHA
+  // Lists approval values for an issue.
+  //
+  // Raises:
+  //   INVALID_ARGUMENT if request `parent` is formatted incorrectly.
+  //   NOT_FOUND if the parent issue does not exist.
+  //   PERMISSION_DENIED if the requester is not allowed to view parent issue.
+  rpc ListApprovalValues (ListApprovalValuesRequest) returns
+      (ListApprovalValuesResponse) {}
+
+  // status: NOT READY
+  // Changes state for a comment. Supported state transitions:
+  //   - ACTIVE -> DELETED
+  //   - ACTIVE -> SPAM
+  //   - DELETED -> ACTIVE
+  //   - SPAM -> ACTIVE
+  //
+  // Raises:
+  //   TODO(crbug/monorail/7867): Document errors when implemented
+  rpc ModifyCommentState (ModifyCommentStateRequest) returns
+      (ModifyCommentStateResponse) {}
+
+  // status: NOT READY
+  // Makes an issue from an IssueTemplate and deltas.
+  //
+  // Raises:
+  //   TODO(crbug/monorail/7197): Document errors when implemented
+  rpc MakeIssueFromTemplate (MakeIssueFromTemplateRequest) returns (Issue) {}
+
+  // status: ALPHA
+  // Makes a basic issue, does not support phases, approvals, or approval
+  // fields.
+  // We do not offer a standard CreateIssue because Issue descriptions are
+  // required, but not included in the Issue proto.
+  //
+  // Raises:
+  //   INVALID_ARGUMENT if any given names does not have a valid format, if any
+  //     fields in the requested issue were invalid, or if proposed values
+  //     violates filter rules that should error.
+  //   NOT_FOUND if no project exists with the given name.
+  //   PERMISSION_DENIED if user lacks sufficient permissions.
+  rpc MakeIssue (MakeIssueRequest) returns (Issue) {}
+}
+
+
+// The request message for Issues.GetIssue.
+// Next available tag: 2
+message GetIssueRequest {
+  // The name of the issue to request.
+  string name = 1 [
+      (google.api.resource_reference) = {type: "api.crbug.com/Issue"},
+      (google.api.field_behavior) = REQUIRED ];
+}
+
+// The request message for Issues.BatchGetIssues.
+// Next available tag: 3
+message BatchGetIssuesRequest {
+  // The project name from which to batch get issues. If included, the parent
+  // of all the issues specified in `names` must match this field.
+  string parent = 1 [
+    (google.api.resource_reference) = {type: "api.crbug.com/Project"} ];
+  // The issues to request. Maximum of 100 can be retrieved.
+  repeated string names = 2 [
+      (google.api.resource_reference) = {type: "api.crbug.com/Issue"} ];
+}
+
+// The response message for Issues.BatchGetIssues.
+// Next available tag: 2
+message BatchGetIssuesResponse {
+  // Issues matching the given request.
+  repeated Issue issues = 1;
+}
+
+// The request message for Issues.SearchIssues.
+// Next available tag: 6
+message SearchIssuesRequest {
+  // The names of Projects in which to search issues.
+  repeated string projects = 1 [
+    (google.api.resource_reference) = {type: "api.crbug.com/Project"},
+    (google.api.field_behavior) = REQUIRED ];
+  // The query string can contain any number of free text and
+  // field search expressions.
+  // Please see https://bugs.chromium.org/p/chromium/issues/searchtips for more
+  // details of how the query string works.
+  //
+  // Canned queries have been deprecated in v3 in favor of search scoping using
+  // parentheses support.
+  // For clients who previously used canned queries, we're providing the
+  // mapping of legacy canned query IDs to Monorail search syntax:
+  //   - Format: (can_id, description, query_string)
+  //   - (1, 'All issues', '')
+  //   - (2, 'Open issues', 'is:open')
+  //   - (3, 'Open and owned by me', 'is:open owner:me')
+  //   - (4, 'Open and reported by me', 'is:open reporter:me')
+  //   - (5, 'Open and starred by me', 'is:open is:starred')
+  //   - (6, 'New issues', 'status:new')
+  //   - (7, 'Issues to verify', 'status=fixed,done')
+  //   - (8, 'Open with comment by me', 'is:open commentby:me')
+  string query = 2;
+  // The maximum number of items to return. The service may return fewer than
+  // this value.
+  // If unspecified, at most 100 items will be returned.
+  // The maximum value is 100; values above 100 will be coerced to 100.
+  int32 page_size = 3;
+  // A page token, received from a previous `SearchIssues` call.
+  // Provide this to retrieve the subsequent page.
+  //
+  // When paginating, all other parameters provided to `SearchIssues` must match
+  // the call that provided the page token.
+  string page_token = 4;
+  // The string of comma separated field names used to order the items.
+  // Adding '-' before a field, reverses the sort order.
+  // E.g. 'stars,-status' sorts the items by number of stars, high to low,
+  // then by status, low to high.
+  string order_by = 5;
+}
+
+// The response message for Issues.SearchIssues.
+// Next available tag: 3
+message SearchIssuesResponse {
+  // Issues matching the given request.
+  repeated Issue issues = 1;
+  // A token, which can be sent as `page_token` to retrieve the next page.
+  // If this field is omitted, there are no subsequent pages.
+  string next_page_token = 2;
+}
+
+// The request message for Issues.ListComments.
+// Next available tag: 5
+message ListCommentsRequest {
+  // The name of the issue for which to list comments.
+  string parent = 1 [
+    (google.api.resource_reference) = {type: "api.crbug.com/Issue"},
+    (google.api.field_behavior) = REQUIRED ];
+  // The maximum number of items to return. The service may return fewer than
+  // this value.
+  // If unspecified, at most 100 items will be returned.
+  // The maximum value is 100; values above 100 will be coerced to 100.
+  int32 page_size = 2;
+  // A page token, received from a previous `ListComments` call.
+  // Provide this to retrieve the subsequent page.
+  //
+  // When paginating, all other parameters provided to `ListComments` must
+  // match the call that provided the page token.
+  string page_token = 3;
+  // For our initial release this filter only supports filtering to comments
+  // related to a specific approval.
+  // For example `approval = "projects/monorail/approvalDefs/1"`,
+  // Note that no further logical or comparison operators are supported
+  string filter = 4;
+}
+
+// The response message for Issues.ListComments
+// Next available tag: 3
+message ListCommentsResponse {
+  // The comments from the specified issue.
+  repeated Comment comments = 1;
+  // A token, which can be sent as `page_token` to retrieve the next page.
+  // If this field is omitted, there are no subsequent pages.
+  string next_page_token = 2;
+}
+
+// An attachment to upload to a comment or description.
+// Next available tag: 3
+message AttachmentUpload {
+  string filename = 1 [ (google.api.field_behavior) = REQUIRED ];
+  bytes content = 2 [ (google.api.field_behavior) = REQUIRED ];
+}
+
+// Holds changes to one issue, used in ModifyIssuesRequest.
+// Next available tag: 9
+message IssueDelta {
+  // The issue's `name` field is used to identify the issue to be
+  // updated. `issue.name` must always be filled.
+  //
+  // Values with rule-based Derivation within `issue` and in `field_vals_remove`
+  // will be ignored.
+  Issue issue = 1 [
+      (google.api.field_behavior) = REQUIRED ];
+  // The list of fields in `issue` to be updated.
+  //
+  // Repeated fields set on `issue` will be appended to.
+  //
+  // Non-repeated fields (e.g. `owner`) can be set with `issue.owner` set and
+  // either 'owner' or 'owner.user' added to `update_mask`.
+  // To unset non-repeated fields back to their default value, `issue.owner`
+  // must contain the default value and `update_mask` must include 'owner.user'
+  // NOT 'owner'.
+  //
+  // Its `field_values`, however, are a special case. Fields can be specified as
+  // single-value or multi-value in their FieldDef.
+  //
+  // Single-value Field: if there is preexisting FieldValue with the same
+  // `field` and `phase`, it will be REPLACED.
+  //
+  // Multi-value Field: a new value will be appended, unless the same `field`,
+  // `phase`, `value` combination already exists. In that case, the FieldValue
+  // will be ignored. In other words, duplicate values are ignored.
+  // (With the exception of crbug.com/monorail/8137 until it is fixed).
+  google.protobuf.FieldMask update_mask = 2 [
+      (google.api.field_behavior) = REQUIRED ];
+
+  // Values to remove from the repeated fields of the issue.
+
+  // Cc's to remove.
+  repeated string ccs_remove = 3 [
+      (google.api.resource_reference) = {type: "api.crbug.com/User"}];
+  // Blocked_on issues to remove.
+  repeated IssueRef blocked_on_issues_remove = 4;
+  // Blocking issues to remove.
+  repeated IssueRef blocking_issues_remove = 5;
+  // Components to remove.
+  repeated string components_remove = 6 [
+      (google.api.resource_reference) = {type: "api.crbug.com/ComponentDef"}];
+  // Labels to remove.
+  repeated string labels_remove = 7;
+  // FieldValues to remove. Any values that did not already exist will be
+  // ignored e.g. if you append a FieldValue in issue and remove it here, it
+  // will still be added.
+  repeated FieldValue field_vals_remove = 8;
+
+  // TODO(crbug.com/monorail/8019): add Attachment uploading and removing.
+}
+
+// Changes to make to an ApprovalValue. Used to ModifyIssueApprovalValues or
+// to MakeIssueFromTemplate.
+//
+// NOTE: The same handling of FieldValues discussed in IssueDelta applies here.
+// Next available tag: 6
+message ApprovalDelta {
+  // The ApprovalValue we want to update. `approval_value.name` must always be
+  // set.
+  ApprovalValue approval_value = 1;
+  // Repeated fields found in `update_mask` will be appended to.
+  google.protobuf.FieldMask update_mask = 2 [
+      (google.api.field_behavior) = REQUIRED ];
+  // Resource names of the approvers we want to remove.
+  repeated string approvers_remove = 3 [
+      (google.api.resource_reference) = { type: "api.crbug.com/User" }
+  ];
+  // FieldValues that do not belong to `approval_value` will trigger error.
+  repeated FieldValue field_vals_remove = 5;
+  // TODO(crbug.com/monorail/8019): add Attachment uploading and removing.
+}
+
+
+// The type of notification a change should trigger.
+// See monorail/doc/userguide/email.md
+// Next available tag: 2
+enum NotifyType {
+  // The default value. This value is unused.
+  NOTIFY_TYPE_UNSPECIFIED = 0;
+  // An email notification should be sent.
+  EMAIL = 1;
+  // No notifcation should be triggered at all.
+  NO_NOTIFICATION = 2;
+}
+
+
+// The request message for Issues.ModifyIssues.
+// Next available tag: 5
+message ModifyIssuesRequest {
+  // The issue changes to make. A maximum of 100 issue changes can be requested.
+  // There is also a constraint of 50 additional 'impacted issues' per
+  // ModifyIssuesRequest. 'Impacted issues' are issues that are adding/removing
+  // `blocked_on`, `blocking`, or `merge`
+  // If you encounter this error, consider significantly smaller batches.
+  repeated IssueDelta deltas = 1;
+  // The type of notification the modifications should trigger.
+  NotifyType notify_type = 2;
+  // The comment text that should be added to each issue in delta.
+  // Max length is 51200 characters.
+  string comment_content = 3;
+  // The attachment that will be to each comment for each issue in delta.
+  repeated AttachmentUpload uploads = 4;
+}
+
+
+// The response message for Issues.ModifyIssues.
+// Next available tag: 2
+message ModifyIssuesResponse {
+  // The updated issues.
+  repeated Issue issues = 1;
+}
+
+// The request message for Issues.ModifyIssueApprovalValues.
+// Next available tag: 4
+message ModifyIssueApprovalValuesRequest {
+  // The ApprovalValue changes to make. Maximum of 100 deltas can be requested.
+  repeated ApprovalDelta deltas = 1;
+  // The type of notification the modifications should trigger.
+  NotifyType notify_type = 2;
+  // The `content` of the Comment created for each change in `deltas`.
+  // Max length is 51200 characters.
+  string comment_content = 3;
+}
+
+// The response message for Issues.ModifyIssueApprovalValuesRequest.
+// Next available tag: 2
+message ModifyIssueApprovalValuesResponse {
+  // The updated ApprovalValues.
+  repeated ApprovalValue approval_values = 1;
+}
+
+// The request message for Issue.ListApprovalValues.
+// Next available tag: 2
+message ListApprovalValuesRequest {
+  // The name of the issue for which to list approval values.
+  string parent = 1 [
+    (google.api.resource_reference) = {type: "api.crbug.com/Issue"},
+    (google.api.field_behavior) = REQUIRED ];
+}
+
+// The response message for Issues.ListApprovalValues.
+// Next available tag: 2
+message ListApprovalValuesResponse {
+  // The approval values from the specified issue.
+  repeated ApprovalValue approval_values = 1;
+}
+
+// The request message for Issues.ModifyCommentState.
+// Next available tag: 3
+message ModifyCommentStateRequest {
+  // Resource name of the comment to modify state.
+  string name = 1 [
+    (google.api.resource_reference) = {type: "api.crbug.com/Comment"},
+    (google.api.field_behavior) = REQUIRED ];
+  // Requested state.
+  IssueContentState state = 2;
+}
+
+// The response message for Issues.ModifyCommentState.
+// Next available tag: 2
+message ModifyCommentStateResponse {
+  // The updated comment after modifying state.
+  Comment comment = 1;
+}
+
+// The request message for MakeIssueFromTemplate.
+// Next available tag: 5
+message MakeIssueFromTemplateRequest {
+  // Resource name of the template to use for filling in default values
+  // and adding approvals and phases.
+  string template = 1 [
+      (google.api.resource_reference) = { type: "api.crbug.com/Template" }
+  ];
+  // The issue differences relative to the `template.issue` default.
+  IssueDelta template_issue_delta = 2;
+  // Changes to fields belonging to approvals relative to template default.
+  // While ApprovalDelta can hold additional information, this method only
+  // allows adding and removing field values, all other deltas will be ignored.
+  repeated ApprovalDelta template_approval_deltas = 3;
+  // The issue description, will be saved as the first comment.
+  string description = 4;
+}
+
+// The request message for MakeIssue.
+// Next available tag: 5
+message MakeIssueRequest {
+  // The name of the project the issue should belong to.
+  string parent = 1 [
+    (google.api.resource_reference) = {type: "api.crbug.com/Project"},
+    (google.api.field_behavior) = REQUIRED ];
+  // The issue to be created.
+  Issue issue = 2;
+  // The issue description.
+  string description = 3;
+  // The type of notification the creation should trigger.
+  NotifyType notify_type = 4;
+}
diff --git a/api/v3/api_proto/issues_pb2.py b/api/v3/api_proto/issues_pb2.py
new file mode 100644
index 0000000..7b8abd3
--- /dev/null
+++ b/api/v3/api_proto/issues_pb2.py
@@ -0,0 +1,1261 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/v3/api_proto/issues.proto
+
+from google.protobuf.internal import enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2
+from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
+from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
+from api.v3.api_proto import issue_objects_pb2 as api_dot_v3_dot_api__proto_dot_issue__objects__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/v3/api_proto/issues.proto',
+  package='monorail.v3',
+  syntax='proto3',
+  serialized_options=b'Z\020api/v3/api_proto',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n\x1d\x61pi/v3/api_proto/issues.proto\x12\x0bmonorail.v3\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$api/v3/api_proto/issue_objects.proto\"<\n\x0fGetIssueRequest\x12)\n\x04name\x18\x01 \x01(\tB\x1b\xfa\x41\x15\n\x13\x61pi.crbug.com/Issue\xe0\x41\x02\"l\n\x15\x42\x61tchGetIssuesRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xfa\x41\x17\n\x15\x61pi.crbug.com/Project\x12\'\n\x05names\x18\x02 \x03(\tB\x18\xfa\x41\x15\n\x13\x61pi.crbug.com/Issue\"<\n\x16\x42\x61tchGetIssuesResponse\x12\"\n\x06issues\x18\x01 \x03(\x0b\x32\x12.monorail.v3.Issue\"\x8e\x01\n\x13SearchIssuesRequest\x12/\n\x08projects\x18\x01 \x03(\tB\x1d\xfa\x41\x17\n\x15\x61pi.crbug.com/Project\xe0\x41\x02\x12\r\n\x05query\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"S\n\x14SearchIssuesResponse\x12\"\n\x06issues\x18\x01 \x03(\x0b\x32\x12.monorail.v3.Issue\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"y\n\x13ListCommentsRequest\x12+\n\x06parent\x18\x01 \x01(\tB\x1b\xfa\x41\x15\n\x13\x61pi.crbug.com/Issue\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\"W\n\x14ListCommentsResponse\x12&\n\x08\x63omments\x18\x01 \x03(\x0b\x32\x14.monorail.v3.Comment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"?\n\x10\x41ttachmentUpload\x12\x15\n\x08\x66ilename\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x14\n\x07\x63ontent\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"\x8e\x03\n\nIssueDelta\x12&\n\x05issue\x18\x01 \x01(\x0b\x32\x12.monorail.v3.IssueB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12+\n\nccs_remove\x18\x03 \x03(\tB\x17\xfa\x41\x14\n\x12\x61pi.crbug.com/User\x12\x37\n\x18\x62locked_on_issues_remove\x18\x04 \x03(\x0b\x32\x15.monorail.v3.IssueRef\x12\x35\n\x16\x62locking_issues_remove\x18\x05 \x03(\x0b\x32\x15.monorail.v3.IssueRef\x12:\n\x11\x63omponents_remove\x18\x06 \x03(\tB\x1f\xfa\x41\x1c\n\x1a\x61pi.crbug.com/ComponentDef\x12\x15\n\rlabels_remove\x18\x07 \x03(\t\x12\x32\n\x11\x66ield_vals_remove\x18\x08 \x03(\x0b\x32\x17.monorail.v3.FieldValue\"\xe0\x01\n\rApprovalDelta\x12\x32\n\x0e\x61pproval_value\x18\x01 \x01(\x0b\x32\x1a.monorail.v3.ApprovalValue\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x31\n\x10\x61pprovers_remove\x18\x03 \x03(\tB\x17\xfa\x41\x14\n\x12\x61pi.crbug.com/User\x12\x32\n\x11\x66ield_vals_remove\x18\x05 \x03(\x0b\x32\x17.monorail.v3.FieldValue\"\xb5\x01\n\x13ModifyIssuesRequest\x12\'\n\x06\x64\x65ltas\x18\x01 \x03(\x0b\x32\x17.monorail.v3.IssueDelta\x12,\n\x0bnotify_type\x18\x02 \x01(\x0e\x32\x17.monorail.v3.NotifyType\x12\x17\n\x0f\x63omment_content\x18\x03 \x01(\t\x12.\n\x07uploads\x18\x04 \x03(\x0b\x32\x1d.monorail.v3.AttachmentUpload\":\n\x14ModifyIssuesResponse\x12\"\n\x06issues\x18\x01 \x03(\x0b\x32\x12.monorail.v3.Issue\"\x95\x01\n ModifyIssueApprovalValuesRequest\x12*\n\x06\x64\x65ltas\x18\x01 \x03(\x0b\x32\x1a.monorail.v3.ApprovalDelta\x12,\n\x0bnotify_type\x18\x02 \x01(\x0e\x32\x17.monorail.v3.NotifyType\x12\x17\n\x0f\x63omment_content\x18\x03 \x01(\t\"X\n!ModifyIssueApprovalValuesResponse\x12\x33\n\x0f\x61pproval_values\x18\x01 \x03(\x0b\x32\x1a.monorail.v3.ApprovalValue\"H\n\x19ListApprovalValuesRequest\x12+\n\x06parent\x18\x01 \x01(\tB\x1b\xfa\x41\x15\n\x13\x61pi.crbug.com/Issue\xe0\x41\x02\"Q\n\x1aListApprovalValuesResponse\x12\x33\n\x0f\x61pproval_values\x18\x01 \x03(\x0b\x32\x1a.monorail.v3.ApprovalValue\"w\n\x19ModifyCommentStateRequest\x12+\n\x04name\x18\x01 \x01(\tB\x1d\xfa\x41\x17\n\x15\x61pi.crbug.com/Comment\xe0\x41\x02\x12-\n\x05state\x18\x02 \x01(\x0e\x32\x1e.monorail.v3.IssueContentState\"C\n\x1aModifyCommentStateResponse\x12%\n\x07\x63omment\x18\x01 \x01(\x0b\x32\x14.monorail.v3.Comment\"\xd7\x01\n\x1cMakeIssueFromTemplateRequest\x12-\n\x08template\x18\x01 \x01(\tB\x1b\xfa\x41\x18\n\x16\x61pi.crbug.com/Template\x12\x35\n\x14template_issue_delta\x18\x02 \x01(\x0b\x32\x17.monorail.v3.IssueDelta\x12<\n\x18template_approval_deltas\x18\x03 \x03(\x0b\x32\x1a.monorail.v3.ApprovalDelta\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\"\xa7\x01\n\x10MakeIssueRequest\x12-\n\x06parent\x18\x01 \x01(\tB\x1d\xfa\x41\x17\n\x15\x61pi.crbug.com/Project\xe0\x41\x02\x12!\n\x05issue\x18\x02 \x01(\x0b\x32\x12.monorail.v3.Issue\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12,\n\x0bnotify_type\x18\x04 \x01(\x0e\x32\x17.monorail.v3.NotifyType*I\n\nNotifyType\x12\x1b\n\x17NOTIFY_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x45MAIL\x10\x01\x12\x13\n\x0fNO_NOTIFICATION\x10\x02\x32\x96\x07\n\x06Issues\x12>\n\x08GetIssue\x12\x1c.monorail.v3.GetIssueRequest\x1a\x12.monorail.v3.Issue\"\x00\x12[\n\x0e\x42\x61tchGetIssues\x12\".monorail.v3.BatchGetIssuesRequest\x1a#.monorail.v3.BatchGetIssuesResponse\"\x00\x12U\n\x0cSearchIssues\x12 .monorail.v3.SearchIssuesRequest\x1a!.monorail.v3.SearchIssuesResponse\"\x00\x12U\n\x0cListComments\x12 .monorail.v3.ListCommentsRequest\x1a!.monorail.v3.ListCommentsResponse\"\x00\x12U\n\x0cModifyIssues\x12 .monorail.v3.ModifyIssuesRequest\x1a!.monorail.v3.ModifyIssuesResponse\"\x00\x12|\n\x19ModifyIssueApprovalValues\x12-.monorail.v3.ModifyIssueApprovalValuesRequest\x1a..monorail.v3.ModifyIssueApprovalValuesResponse\"\x00\x12g\n\x12ListApprovalValues\x12&.monorail.v3.ListApprovalValuesRequest\x1a\'.monorail.v3.ListApprovalValuesResponse\"\x00\x12g\n\x12ModifyCommentState\x12&.monorail.v3.ModifyCommentStateRequest\x1a\'.monorail.v3.ModifyCommentStateResponse\"\x00\x12X\n\x15MakeIssueFromTemplate\x12).monorail.v3.MakeIssueFromTemplateRequest\x1a\x12.monorail.v3.Issue\"\x00\x12@\n\tMakeIssue\x12\x1d.monorail.v3.MakeIssueRequest\x1a\x12.monorail.v3.Issue\"\x00\x42\x12Z\x10\x61pi/v3/api_protob\x06proto3'
+  ,
+  dependencies=[google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,api_dot_v3_dot_api__proto_dot_issue__objects__pb2.DESCRIPTOR,])
+
+_NOTIFYTYPE = _descriptor.EnumDescriptor(
+  name='NotifyType',
+  full_name='monorail.v3.NotifyType',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='NOTIFY_TYPE_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='EMAIL', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NO_NOTIFICATION', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=2768,
+  serialized_end=2841,
+)
+_sym_db.RegisterEnumDescriptor(_NOTIFYTYPE)
+
+NotifyType = enum_type_wrapper.EnumTypeWrapper(_NOTIFYTYPE)
+NOTIFY_TYPE_UNSPECIFIED = 0
+EMAIL = 1
+NO_NOTIFICATION = 2
+
+
+
+_GETISSUEREQUEST = _descriptor.Descriptor(
+  name='GetIssueRequest',
+  full_name='monorail.v3.GetIssueRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.GetIssueRequest.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\025\n\023api.crbug.com/Issue\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=178,
+  serialized_end=238,
+)
+
+
+_BATCHGETISSUESREQUEST = _descriptor.Descriptor(
+  name='BatchGetIssuesRequest',
+  full_name='monorail.v3.BatchGetIssuesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.v3.BatchGetIssuesRequest.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\027\n\025api.crbug.com/Project', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='names', full_name='monorail.v3.BatchGetIssuesRequest.names', index=1,
+      number=2, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\025\n\023api.crbug.com/Issue', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=240,
+  serialized_end=348,
+)
+
+
+_BATCHGETISSUESRESPONSE = _descriptor.Descriptor(
+  name='BatchGetIssuesResponse',
+  full_name='monorail.v3.BatchGetIssuesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issues', full_name='monorail.v3.BatchGetIssuesResponse.issues', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=350,
+  serialized_end=410,
+)
+
+
+_SEARCHISSUESREQUEST = _descriptor.Descriptor(
+  name='SearchIssuesRequest',
+  full_name='monorail.v3.SearchIssuesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='projects', full_name='monorail.v3.SearchIssuesRequest.projects', index=0,
+      number=1, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\027\n\025api.crbug.com/Project\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='query', full_name='monorail.v3.SearchIssuesRequest.query', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_size', full_name='monorail.v3.SearchIssuesRequest.page_size', index=2,
+      number=3, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_token', full_name='monorail.v3.SearchIssuesRequest.page_token', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='order_by', full_name='monorail.v3.SearchIssuesRequest.order_by', index=4,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=413,
+  serialized_end=555,
+)
+
+
+_SEARCHISSUESRESPONSE = _descriptor.Descriptor(
+  name='SearchIssuesResponse',
+  full_name='monorail.v3.SearchIssuesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issues', full_name='monorail.v3.SearchIssuesResponse.issues', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='next_page_token', full_name='monorail.v3.SearchIssuesResponse.next_page_token', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=557,
+  serialized_end=640,
+)
+
+
+_LISTCOMMENTSREQUEST = _descriptor.Descriptor(
+  name='ListCommentsRequest',
+  full_name='monorail.v3.ListCommentsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.v3.ListCommentsRequest.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\025\n\023api.crbug.com/Issue\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_size', full_name='monorail.v3.ListCommentsRequest.page_size', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_token', full_name='monorail.v3.ListCommentsRequest.page_token', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='filter', full_name='monorail.v3.ListCommentsRequest.filter', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=642,
+  serialized_end=763,
+)
+
+
+_LISTCOMMENTSRESPONSE = _descriptor.Descriptor(
+  name='ListCommentsResponse',
+  full_name='monorail.v3.ListCommentsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='comments', full_name='monorail.v3.ListCommentsResponse.comments', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='next_page_token', full_name='monorail.v3.ListCommentsResponse.next_page_token', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=765,
+  serialized_end=852,
+)
+
+
+_ATTACHMENTUPLOAD = _descriptor.Descriptor(
+  name='AttachmentUpload',
+  full_name='monorail.v3.AttachmentUpload',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='filename', full_name='monorail.v3.AttachmentUpload.filename', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='content', full_name='monorail.v3.AttachmentUpload.content', index=1,
+      number=2, type=12, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"",
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=854,
+  serialized_end=917,
+)
+
+
+_ISSUEDELTA = _descriptor.Descriptor(
+  name='IssueDelta',
+  full_name='monorail.v3.IssueDelta',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issue', full_name='monorail.v3.IssueDelta.issue', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='update_mask', full_name='monorail.v3.IssueDelta.update_mask', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='ccs_remove', full_name='monorail.v3.IssueDelta.ccs_remove', index=2,
+      number=3, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='blocked_on_issues_remove', full_name='monorail.v3.IssueDelta.blocked_on_issues_remove', index=3,
+      number=4, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='blocking_issues_remove', full_name='monorail.v3.IssueDelta.blocking_issues_remove', index=4,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='components_remove', full_name='monorail.v3.IssueDelta.components_remove', index=5,
+      number=6, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\034\n\032api.crbug.com/ComponentDef', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='labels_remove', full_name='monorail.v3.IssueDelta.labels_remove', index=6,
+      number=7, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='field_vals_remove', full_name='monorail.v3.IssueDelta.field_vals_remove', index=7,
+      number=8, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=920,
+  serialized_end=1318,
+)
+
+
+_APPROVALDELTA = _descriptor.Descriptor(
+  name='ApprovalDelta',
+  full_name='monorail.v3.ApprovalDelta',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='approval_value', full_name='monorail.v3.ApprovalDelta.approval_value', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='update_mask', full_name='monorail.v3.ApprovalDelta.update_mask', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='approvers_remove', full_name='monorail.v3.ApprovalDelta.approvers_remove', index=2,
+      number=3, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='field_vals_remove', full_name='monorail.v3.ApprovalDelta.field_vals_remove', index=3,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1321,
+  serialized_end=1545,
+)
+
+
+_MODIFYISSUESREQUEST = _descriptor.Descriptor(
+  name='ModifyIssuesRequest',
+  full_name='monorail.v3.ModifyIssuesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='deltas', full_name='monorail.v3.ModifyIssuesRequest.deltas', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='notify_type', full_name='monorail.v3.ModifyIssuesRequest.notify_type', index=1,
+      number=2, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='comment_content', full_name='monorail.v3.ModifyIssuesRequest.comment_content', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='uploads', full_name='monorail.v3.ModifyIssuesRequest.uploads', index=3,
+      number=4, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1548,
+  serialized_end=1729,
+)
+
+
+_MODIFYISSUESRESPONSE = _descriptor.Descriptor(
+  name='ModifyIssuesResponse',
+  full_name='monorail.v3.ModifyIssuesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='issues', full_name='monorail.v3.ModifyIssuesResponse.issues', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1731,
+  serialized_end=1789,
+)
+
+
+_MODIFYISSUEAPPROVALVALUESREQUEST = _descriptor.Descriptor(
+  name='ModifyIssueApprovalValuesRequest',
+  full_name='monorail.v3.ModifyIssueApprovalValuesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='deltas', full_name='monorail.v3.ModifyIssueApprovalValuesRequest.deltas', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='notify_type', full_name='monorail.v3.ModifyIssueApprovalValuesRequest.notify_type', index=1,
+      number=2, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='comment_content', full_name='monorail.v3.ModifyIssueApprovalValuesRequest.comment_content', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1792,
+  serialized_end=1941,
+)
+
+
+_MODIFYISSUEAPPROVALVALUESRESPONSE = _descriptor.Descriptor(
+  name='ModifyIssueApprovalValuesResponse',
+  full_name='monorail.v3.ModifyIssueApprovalValuesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='approval_values', full_name='monorail.v3.ModifyIssueApprovalValuesResponse.approval_values', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1943,
+  serialized_end=2031,
+)
+
+
+_LISTAPPROVALVALUESREQUEST = _descriptor.Descriptor(
+  name='ListApprovalValuesRequest',
+  full_name='monorail.v3.ListApprovalValuesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.v3.ListApprovalValuesRequest.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\025\n\023api.crbug.com/Issue\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2033,
+  serialized_end=2105,
+)
+
+
+_LISTAPPROVALVALUESRESPONSE = _descriptor.Descriptor(
+  name='ListApprovalValuesResponse',
+  full_name='monorail.v3.ListApprovalValuesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='approval_values', full_name='monorail.v3.ListApprovalValuesResponse.approval_values', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2107,
+  serialized_end=2188,
+)
+
+
+_MODIFYCOMMENTSTATEREQUEST = _descriptor.Descriptor(
+  name='ModifyCommentStateRequest',
+  full_name='monorail.v3.ModifyCommentStateRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.ModifyCommentStateRequest.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\027\n\025api.crbug.com/Comment\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='state', full_name='monorail.v3.ModifyCommentStateRequest.state', index=1,
+      number=2, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2190,
+  serialized_end=2309,
+)
+
+
+_MODIFYCOMMENTSTATERESPONSE = _descriptor.Descriptor(
+  name='ModifyCommentStateResponse',
+  full_name='monorail.v3.ModifyCommentStateResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='comment', full_name='monorail.v3.ModifyCommentStateResponse.comment', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2311,
+  serialized_end=2378,
+)
+
+
+_MAKEISSUEFROMTEMPLATEREQUEST = _descriptor.Descriptor(
+  name='MakeIssueFromTemplateRequest',
+  full_name='monorail.v3.MakeIssueFromTemplateRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='template', full_name='monorail.v3.MakeIssueFromTemplateRequest.template', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\030\n\026api.crbug.com/Template', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='template_issue_delta', full_name='monorail.v3.MakeIssueFromTemplateRequest.template_issue_delta', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='template_approval_deltas', full_name='monorail.v3.MakeIssueFromTemplateRequest.template_approval_deltas', index=2,
+      number=3, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='description', full_name='monorail.v3.MakeIssueFromTemplateRequest.description', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2381,
+  serialized_end=2596,
+)
+
+
+_MAKEISSUEREQUEST = _descriptor.Descriptor(
+  name='MakeIssueRequest',
+  full_name='monorail.v3.MakeIssueRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.v3.MakeIssueRequest.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\027\n\025api.crbug.com/Project\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='issue', full_name='monorail.v3.MakeIssueRequest.issue', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='description', full_name='monorail.v3.MakeIssueRequest.description', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='notify_type', full_name='monorail.v3.MakeIssueRequest.notify_type', index=3,
+      number=4, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2599,
+  serialized_end=2766,
+)
+
+_BATCHGETISSUESRESPONSE.fields_by_name['issues'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUE
+_SEARCHISSUESRESPONSE.fields_by_name['issues'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUE
+_LISTCOMMENTSRESPONSE.fields_by_name['comments'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._COMMENT
+_ISSUEDELTA.fields_by_name['issue'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUE
+_ISSUEDELTA.fields_by_name['update_mask'].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK
+_ISSUEDELTA.fields_by_name['blocked_on_issues_remove'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUEREF
+_ISSUEDELTA.fields_by_name['blocking_issues_remove'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUEREF
+_ISSUEDELTA.fields_by_name['field_vals_remove'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._FIELDVALUE
+_APPROVALDELTA.fields_by_name['approval_value'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._APPROVALVALUE
+_APPROVALDELTA.fields_by_name['update_mask'].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK
+_APPROVALDELTA.fields_by_name['field_vals_remove'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._FIELDVALUE
+_MODIFYISSUESREQUEST.fields_by_name['deltas'].message_type = _ISSUEDELTA
+_MODIFYISSUESREQUEST.fields_by_name['notify_type'].enum_type = _NOTIFYTYPE
+_MODIFYISSUESREQUEST.fields_by_name['uploads'].message_type = _ATTACHMENTUPLOAD
+_MODIFYISSUESRESPONSE.fields_by_name['issues'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUE
+_MODIFYISSUEAPPROVALVALUESREQUEST.fields_by_name['deltas'].message_type = _APPROVALDELTA
+_MODIFYISSUEAPPROVALVALUESREQUEST.fields_by_name['notify_type'].enum_type = _NOTIFYTYPE
+_MODIFYISSUEAPPROVALVALUESRESPONSE.fields_by_name['approval_values'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._APPROVALVALUE
+_LISTAPPROVALVALUESRESPONSE.fields_by_name['approval_values'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._APPROVALVALUE
+_MODIFYCOMMENTSTATEREQUEST.fields_by_name['state'].enum_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUECONTENTSTATE
+_MODIFYCOMMENTSTATERESPONSE.fields_by_name['comment'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._COMMENT
+_MAKEISSUEFROMTEMPLATEREQUEST.fields_by_name['template_issue_delta'].message_type = _ISSUEDELTA
+_MAKEISSUEFROMTEMPLATEREQUEST.fields_by_name['template_approval_deltas'].message_type = _APPROVALDELTA
+_MAKEISSUEREQUEST.fields_by_name['issue'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUE
+_MAKEISSUEREQUEST.fields_by_name['notify_type'].enum_type = _NOTIFYTYPE
+DESCRIPTOR.message_types_by_name['GetIssueRequest'] = _GETISSUEREQUEST
+DESCRIPTOR.message_types_by_name['BatchGetIssuesRequest'] = _BATCHGETISSUESREQUEST
+DESCRIPTOR.message_types_by_name['BatchGetIssuesResponse'] = _BATCHGETISSUESRESPONSE
+DESCRIPTOR.message_types_by_name['SearchIssuesRequest'] = _SEARCHISSUESREQUEST
+DESCRIPTOR.message_types_by_name['SearchIssuesResponse'] = _SEARCHISSUESRESPONSE
+DESCRIPTOR.message_types_by_name['ListCommentsRequest'] = _LISTCOMMENTSREQUEST
+DESCRIPTOR.message_types_by_name['ListCommentsResponse'] = _LISTCOMMENTSRESPONSE
+DESCRIPTOR.message_types_by_name['AttachmentUpload'] = _ATTACHMENTUPLOAD
+DESCRIPTOR.message_types_by_name['IssueDelta'] = _ISSUEDELTA
+DESCRIPTOR.message_types_by_name['ApprovalDelta'] = _APPROVALDELTA
+DESCRIPTOR.message_types_by_name['ModifyIssuesRequest'] = _MODIFYISSUESREQUEST
+DESCRIPTOR.message_types_by_name['ModifyIssuesResponse'] = _MODIFYISSUESRESPONSE
+DESCRIPTOR.message_types_by_name['ModifyIssueApprovalValuesRequest'] = _MODIFYISSUEAPPROVALVALUESREQUEST
+DESCRIPTOR.message_types_by_name['ModifyIssueApprovalValuesResponse'] = _MODIFYISSUEAPPROVALVALUESRESPONSE
+DESCRIPTOR.message_types_by_name['ListApprovalValuesRequest'] = _LISTAPPROVALVALUESREQUEST
+DESCRIPTOR.message_types_by_name['ListApprovalValuesResponse'] = _LISTAPPROVALVALUESRESPONSE
+DESCRIPTOR.message_types_by_name['ModifyCommentStateRequest'] = _MODIFYCOMMENTSTATEREQUEST
+DESCRIPTOR.message_types_by_name['ModifyCommentStateResponse'] = _MODIFYCOMMENTSTATERESPONSE
+DESCRIPTOR.message_types_by_name['MakeIssueFromTemplateRequest'] = _MAKEISSUEFROMTEMPLATEREQUEST
+DESCRIPTOR.message_types_by_name['MakeIssueRequest'] = _MAKEISSUEREQUEST
+DESCRIPTOR.enum_types_by_name['NotifyType'] = _NOTIFYTYPE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+GetIssueRequest = _reflection.GeneratedProtocolMessageType('GetIssueRequest', (_message.Message,), {
+  'DESCRIPTOR' : _GETISSUEREQUEST,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.GetIssueRequest)
+  })
+_sym_db.RegisterMessage(GetIssueRequest)
+
+BatchGetIssuesRequest = _reflection.GeneratedProtocolMessageType('BatchGetIssuesRequest', (_message.Message,), {
+  'DESCRIPTOR' : _BATCHGETISSUESREQUEST,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.BatchGetIssuesRequest)
+  })
+_sym_db.RegisterMessage(BatchGetIssuesRequest)
+
+BatchGetIssuesResponse = _reflection.GeneratedProtocolMessageType('BatchGetIssuesResponse', (_message.Message,), {
+  'DESCRIPTOR' : _BATCHGETISSUESRESPONSE,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.BatchGetIssuesResponse)
+  })
+_sym_db.RegisterMessage(BatchGetIssuesResponse)
+
+SearchIssuesRequest = _reflection.GeneratedProtocolMessageType('SearchIssuesRequest', (_message.Message,), {
+  'DESCRIPTOR' : _SEARCHISSUESREQUEST,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.SearchIssuesRequest)
+  })
+_sym_db.RegisterMessage(SearchIssuesRequest)
+
+SearchIssuesResponse = _reflection.GeneratedProtocolMessageType('SearchIssuesResponse', (_message.Message,), {
+  'DESCRIPTOR' : _SEARCHISSUESRESPONSE,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.SearchIssuesResponse)
+  })
+_sym_db.RegisterMessage(SearchIssuesResponse)
+
+ListCommentsRequest = _reflection.GeneratedProtocolMessageType('ListCommentsRequest', (_message.Message,), {
+  'DESCRIPTOR' : _LISTCOMMENTSREQUEST,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListCommentsRequest)
+  })
+_sym_db.RegisterMessage(ListCommentsRequest)
+
+ListCommentsResponse = _reflection.GeneratedProtocolMessageType('ListCommentsResponse', (_message.Message,), {
+  'DESCRIPTOR' : _LISTCOMMENTSRESPONSE,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListCommentsResponse)
+  })
+_sym_db.RegisterMessage(ListCommentsResponse)
+
+AttachmentUpload = _reflection.GeneratedProtocolMessageType('AttachmentUpload', (_message.Message,), {
+  'DESCRIPTOR' : _ATTACHMENTUPLOAD,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.AttachmentUpload)
+  })
+_sym_db.RegisterMessage(AttachmentUpload)
+
+IssueDelta = _reflection.GeneratedProtocolMessageType('IssueDelta', (_message.Message,), {
+  'DESCRIPTOR' : _ISSUEDELTA,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.IssueDelta)
+  })
+_sym_db.RegisterMessage(IssueDelta)
+
+ApprovalDelta = _reflection.GeneratedProtocolMessageType('ApprovalDelta', (_message.Message,), {
+  'DESCRIPTOR' : _APPROVALDELTA,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ApprovalDelta)
+  })
+_sym_db.RegisterMessage(ApprovalDelta)
+
+ModifyIssuesRequest = _reflection.GeneratedProtocolMessageType('ModifyIssuesRequest', (_message.Message,), {
+  'DESCRIPTOR' : _MODIFYISSUESREQUEST,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ModifyIssuesRequest)
+  })
+_sym_db.RegisterMessage(ModifyIssuesRequest)
+
+ModifyIssuesResponse = _reflection.GeneratedProtocolMessageType('ModifyIssuesResponse', (_message.Message,), {
+  'DESCRIPTOR' : _MODIFYISSUESRESPONSE,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ModifyIssuesResponse)
+  })
+_sym_db.RegisterMessage(ModifyIssuesResponse)
+
+ModifyIssueApprovalValuesRequest = _reflection.GeneratedProtocolMessageType('ModifyIssueApprovalValuesRequest', (_message.Message,), {
+  'DESCRIPTOR' : _MODIFYISSUEAPPROVALVALUESREQUEST,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ModifyIssueApprovalValuesRequest)
+  })
+_sym_db.RegisterMessage(ModifyIssueApprovalValuesRequest)
+
+ModifyIssueApprovalValuesResponse = _reflection.GeneratedProtocolMessageType('ModifyIssueApprovalValuesResponse', (_message.Message,), {
+  'DESCRIPTOR' : _MODIFYISSUEAPPROVALVALUESRESPONSE,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ModifyIssueApprovalValuesResponse)
+  })
+_sym_db.RegisterMessage(ModifyIssueApprovalValuesResponse)
+
+ListApprovalValuesRequest = _reflection.GeneratedProtocolMessageType('ListApprovalValuesRequest', (_message.Message,), {
+  'DESCRIPTOR' : _LISTAPPROVALVALUESREQUEST,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListApprovalValuesRequest)
+  })
+_sym_db.RegisterMessage(ListApprovalValuesRequest)
+
+ListApprovalValuesResponse = _reflection.GeneratedProtocolMessageType('ListApprovalValuesResponse', (_message.Message,), {
+  'DESCRIPTOR' : _LISTAPPROVALVALUESRESPONSE,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListApprovalValuesResponse)
+  })
+_sym_db.RegisterMessage(ListApprovalValuesResponse)
+
+ModifyCommentStateRequest = _reflection.GeneratedProtocolMessageType('ModifyCommentStateRequest', (_message.Message,), {
+  'DESCRIPTOR' : _MODIFYCOMMENTSTATEREQUEST,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ModifyCommentStateRequest)
+  })
+_sym_db.RegisterMessage(ModifyCommentStateRequest)
+
+ModifyCommentStateResponse = _reflection.GeneratedProtocolMessageType('ModifyCommentStateResponse', (_message.Message,), {
+  'DESCRIPTOR' : _MODIFYCOMMENTSTATERESPONSE,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ModifyCommentStateResponse)
+  })
+_sym_db.RegisterMessage(ModifyCommentStateResponse)
+
+MakeIssueFromTemplateRequest = _reflection.GeneratedProtocolMessageType('MakeIssueFromTemplateRequest', (_message.Message,), {
+  'DESCRIPTOR' : _MAKEISSUEFROMTEMPLATEREQUEST,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.MakeIssueFromTemplateRequest)
+  })
+_sym_db.RegisterMessage(MakeIssueFromTemplateRequest)
+
+MakeIssueRequest = _reflection.GeneratedProtocolMessageType('MakeIssueRequest', (_message.Message,), {
+  'DESCRIPTOR' : _MAKEISSUEREQUEST,
+  '__module__' : 'api.v3.api_proto.issues_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.MakeIssueRequest)
+  })
+_sym_db.RegisterMessage(MakeIssueRequest)
+
+
+DESCRIPTOR._options = None
+_GETISSUEREQUEST.fields_by_name['name']._options = None
+_BATCHGETISSUESREQUEST.fields_by_name['parent']._options = None
+_BATCHGETISSUESREQUEST.fields_by_name['names']._options = None
+_SEARCHISSUESREQUEST.fields_by_name['projects']._options = None
+_LISTCOMMENTSREQUEST.fields_by_name['parent']._options = None
+_ATTACHMENTUPLOAD.fields_by_name['filename']._options = None
+_ATTACHMENTUPLOAD.fields_by_name['content']._options = None
+_ISSUEDELTA.fields_by_name['issue']._options = None
+_ISSUEDELTA.fields_by_name['update_mask']._options = None
+_ISSUEDELTA.fields_by_name['ccs_remove']._options = None
+_ISSUEDELTA.fields_by_name['components_remove']._options = None
+_APPROVALDELTA.fields_by_name['update_mask']._options = None
+_APPROVALDELTA.fields_by_name['approvers_remove']._options = None
+_LISTAPPROVALVALUESREQUEST.fields_by_name['parent']._options = None
+_MODIFYCOMMENTSTATEREQUEST.fields_by_name['name']._options = None
+_MAKEISSUEFROMTEMPLATEREQUEST.fields_by_name['template']._options = None
+_MAKEISSUEREQUEST.fields_by_name['parent']._options = None
+
+_ISSUES = _descriptor.ServiceDescriptor(
+  name='Issues',
+  full_name='monorail.v3.Issues',
+  file=DESCRIPTOR,
+  index=0,
+  serialized_options=None,
+  create_key=_descriptor._internal_create_key,
+  serialized_start=2844,
+  serialized_end=3762,
+  methods=[
+  _descriptor.MethodDescriptor(
+    name='GetIssue',
+    full_name='monorail.v3.Issues.GetIssue',
+    index=0,
+    containing_service=None,
+    input_type=_GETISSUEREQUEST,
+    output_type=api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='BatchGetIssues',
+    full_name='monorail.v3.Issues.BatchGetIssues',
+    index=1,
+    containing_service=None,
+    input_type=_BATCHGETISSUESREQUEST,
+    output_type=_BATCHGETISSUESRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='SearchIssues',
+    full_name='monorail.v3.Issues.SearchIssues',
+    index=2,
+    containing_service=None,
+    input_type=_SEARCHISSUESREQUEST,
+    output_type=_SEARCHISSUESRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListComments',
+    full_name='monorail.v3.Issues.ListComments',
+    index=3,
+    containing_service=None,
+    input_type=_LISTCOMMENTSREQUEST,
+    output_type=_LISTCOMMENTSRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ModifyIssues',
+    full_name='monorail.v3.Issues.ModifyIssues',
+    index=4,
+    containing_service=None,
+    input_type=_MODIFYISSUESREQUEST,
+    output_type=_MODIFYISSUESRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ModifyIssueApprovalValues',
+    full_name='monorail.v3.Issues.ModifyIssueApprovalValues',
+    index=5,
+    containing_service=None,
+    input_type=_MODIFYISSUEAPPROVALVALUESREQUEST,
+    output_type=_MODIFYISSUEAPPROVALVALUESRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListApprovalValues',
+    full_name='monorail.v3.Issues.ListApprovalValues',
+    index=6,
+    containing_service=None,
+    input_type=_LISTAPPROVALVALUESREQUEST,
+    output_type=_LISTAPPROVALVALUESRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ModifyCommentState',
+    full_name='monorail.v3.Issues.ModifyCommentState',
+    index=7,
+    containing_service=None,
+    input_type=_MODIFYCOMMENTSTATEREQUEST,
+    output_type=_MODIFYCOMMENTSTATERESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='MakeIssueFromTemplate',
+    full_name='monorail.v3.Issues.MakeIssueFromTemplate',
+    index=8,
+    containing_service=None,
+    input_type=_MAKEISSUEFROMTEMPLATEREQUEST,
+    output_type=api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='MakeIssue',
+    full_name='monorail.v3.Issues.MakeIssue',
+    index=9,
+    containing_service=None,
+    input_type=_MAKEISSUEREQUEST,
+    output_type=api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+])
+_sym_db.RegisterServiceDescriptor(_ISSUES)
+
+DESCRIPTOR.services_by_name['Issues'] = _ISSUES
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/v3/api_proto/issues_prpc_pb2.py b/api/v3/api_proto/issues_prpc_pb2.py
new file mode 100644
index 0000000..8bf1235
--- /dev/null
+++ b/api/v3/api_proto/issues_prpc_pb2.py
@@ -0,0 +1,822 @@
+# Generated by the pRPC protocol buffer compiler plugin.  DO NOT EDIT!
+# source: api/v3/api_proto/issues.proto
+
+import base64
+import zlib
+
+from google.protobuf import descriptor_pb2
+
+# Includes description of the api/v3/api_proto/issues.proto and all of its transitive
+# dependencies. Includes source code info.
+FILE_DESCRIPTOR_SET = descriptor_pb2.FileDescriptorSet()
+FILE_DESCRIPTOR_SET.ParseFromString(zlib.decompress(base64.b64decode(
+    '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'
+    'wX+52ZC4D/Bpwj87Y=')))
+_INDEX = {
+    f.name: {
+      'descriptor': f,
+      'services': {s.name: s for s in f.service},
+    }
+    for f in FILE_DESCRIPTOR_SET.file
+}
+
+
+IssuesServiceDescription = {
+  'file_descriptor_set': FILE_DESCRIPTOR_SET,
+  'file_descriptor': _INDEX[u'api/v3/api_proto/issues.proto']['descriptor'],
+  'service_descriptor': _INDEX[u'api/v3/api_proto/issues.proto']['services'][u'Issues'],
+}
diff --git a/api/v3/api_proto/permission_objects.proto b/api/v3/api_proto/permission_objects.proto
new file mode 100644
index 0000000..60f8169
--- /dev/null
+++ b/api/v3/api_proto/permission_objects.proto
@@ -0,0 +1,43 @@
+// Copyright 2020 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
+
+// This file defines protobufs for features and related business
+// objects, e.g., hotlists.
+
+syntax = "proto3";
+
+package monorail.v3;
+
+option go_package = "api/v3/api_proto";
+
+// All possible permissions on the Monorail site.
+// Next available tag: 6
+enum Permission {
+  // Default value. This value is unused.
+  PERMISSION_UNSPECIFIED = 0;
+  // The permission needed to add and remove issues from a hotlist.
+  HOTLIST_EDIT = 1;
+  // The permission needed to delete a hotlist or change hotlist
+  // settings/members.
+  HOTLIST_ADMINISTER = 2;
+  // The permission needed to edit an issue.
+  ISSUE_EDIT = 3;
+  // The permission needed to edit a custom field definition.
+  FIELD_DEF_EDIT = 4;
+  // The permission needed to edit the value of a custom field.
+  // More permissions will be required in the specific issue
+  // where the user plans to edit that value, e.g. ISSUE_EDIT.
+  FIELD_DEF_VALUE_EDIT = 5;
+}
+
+
+// The set of a user's permissions for a single resource.
+// Next available tag: 3
+message PermissionSet {
+  // The name of the resource `permissions` applies to.
+  string resource = 1;
+  // All the permissions a user has for `resource`.
+  repeated Permission permissions = 2;
+}
diff --git a/api/v3/api_proto/permission_objects_pb2.py b/api/v3/api_proto/permission_objects_pb2.py
new file mode 100644
index 0000000..2ea90db
--- /dev/null
+++ b/api/v3/api_proto/permission_objects_pb2.py
@@ -0,0 +1,133 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/v3/api_proto/permission_objects.proto
+
+from google.protobuf.internal import enum_type_wrapper
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/v3/api_proto/permission_objects.proto',
+  package='monorail.v3',
+  syntax='proto3',
+  serialized_options=b'Z\020api/v3/api_proto',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n)api/v3/api_proto/permission_objects.proto\x12\x0bmonorail.v3\"O\n\rPermissionSet\x12\x10\n\x08resource\x18\x01 \x01(\t\x12,\n\x0bpermissions\x18\x02 \x03(\x0e\x32\x17.monorail.v3.Permission*\x90\x01\n\nPermission\x12\x1a\n\x16PERMISSION_UNSPECIFIED\x10\x00\x12\x10\n\x0cHOTLIST_EDIT\x10\x01\x12\x16\n\x12HOTLIST_ADMINISTER\x10\x02\x12\x0e\n\nISSUE_EDIT\x10\x03\x12\x12\n\x0e\x46IELD_DEF_EDIT\x10\x04\x12\x18\n\x14\x46IELD_DEF_VALUE_EDIT\x10\x05\x42\x12Z\x10\x61pi/v3/api_protob\x06proto3'
+)
+
+_PERMISSION = _descriptor.EnumDescriptor(
+  name='Permission',
+  full_name='monorail.v3.Permission',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='PERMISSION_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='HOTLIST_EDIT', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='HOTLIST_ADMINISTER', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='ISSUE_EDIT', index=3, number=3,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='FIELD_DEF_EDIT', index=4, number=4,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='FIELD_DEF_VALUE_EDIT', index=5, number=5,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=140,
+  serialized_end=284,
+)
+_sym_db.RegisterEnumDescriptor(_PERMISSION)
+
+Permission = enum_type_wrapper.EnumTypeWrapper(_PERMISSION)
+PERMISSION_UNSPECIFIED = 0
+HOTLIST_EDIT = 1
+HOTLIST_ADMINISTER = 2
+ISSUE_EDIT = 3
+FIELD_DEF_EDIT = 4
+FIELD_DEF_VALUE_EDIT = 5
+
+
+
+_PERMISSIONSET = _descriptor.Descriptor(
+  name='PermissionSet',
+  full_name='monorail.v3.PermissionSet',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='resource', full_name='monorail.v3.PermissionSet.resource', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='permissions', full_name='monorail.v3.PermissionSet.permissions', index=1,
+      number=2, type=14, cpp_type=8, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=58,
+  serialized_end=137,
+)
+
+_PERMISSIONSET.fields_by_name['permissions'].enum_type = _PERMISSION
+DESCRIPTOR.message_types_by_name['PermissionSet'] = _PERMISSIONSET
+DESCRIPTOR.enum_types_by_name['Permission'] = _PERMISSION
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+PermissionSet = _reflection.GeneratedProtocolMessageType('PermissionSet', (_message.Message,), {
+  'DESCRIPTOR' : _PERMISSIONSET,
+  '__module__' : 'api.v3.api_proto.permission_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.PermissionSet)
+  })
+_sym_db.RegisterMessage(PermissionSet)
+
+
+DESCRIPTOR._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/api/v3/api_proto/permissions.proto b/api/v3/api_proto/permissions.proto
new file mode 100644
index 0000000..9efba1f
--- /dev/null
+++ b/api/v3/api_proto/permissions.proto
@@ -0,0 +1,61 @@
+// Copyright 2020 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.
+
+syntax = "proto3";
+
+package monorail.v3;
+
+option go_package = "api/v3/api_proto";
+
+import "google/api/field_behavior.proto";
+import "api/v3/api_proto/permission_objects.proto";
+
+// ***DO NOT CALL rpcs IN THIS SERVICE.***
+// This service is for Monorail's frontend only.
+
+// Permissions service includes all methods needed for fetching permissions.
+service Permissions {
+  // status: DO NOT USE
+  // Returns the requester's permissions for the given resource.
+  //
+  // Raises:
+  //  PERMISSION_DENIED if the given resource does not exist and/or the
+  //      requester does not have permission to view the resource's name space.
+  //  NOT_FOUND if the given resource does not exist.
+  rpc GetPermissionSet (GetPermissionSetRequest) returns (PermissionSet) {}
+
+  // status: DO NOT USE
+  // Returns the requester's permissions for all the given resources.
+  //
+  // Raises:
+  //  PERMISSION_DENIED if any of the given resources do not exist and/or the
+  //      requester does not have permission to view one of the resource's
+  //      name space.
+  // NOT_FOUND if one of the given resources do not exist.
+  rpc BatchGetPermissionSets (BatchGetPermissionSetsRequest) returns (BatchGetPermissionSetsResponse) {}
+}
+
+
+// Request message for the GetPermissionSet emthod.
+// Next available tag: 2
+message GetPermissionSetRequest {
+  // The resource name of the resource permissions to retrieve.
+  string name = 1 [ (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// Request message for the BatchGetPermissionSets method.
+// Next available tag: 2
+message BatchGetPermissionSetsRequest {
+  // The resource names of the resource permissions to retrieve.
+  repeated string names = 1 [ (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// Response message for the BatchGetPermissionSets method.
+// Next available tag: 2
+message BatchGetPermissionSetsResponse {
+  // The Permissions, one for each of the given resources.
+  repeated PermissionSet permission_sets = 1;
+}
diff --git a/api/v3/api_proto/permissions_pb2.py b/api/v3/api_proto/permissions_pb2.py
new file mode 100644
index 0000000..c22e0ab
--- /dev/null
+++ b/api/v3/api_proto/permissions_pb2.py
@@ -0,0 +1,193 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/v3/api_proto/permissions.proto
+
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
+from api.v3.api_proto import permission_objects_pb2 as api_dot_v3_dot_api__proto_dot_permission__objects__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/v3/api_proto/permissions.proto',
+  package='monorail.v3',
+  syntax='proto3',
+  serialized_options=b'Z\020api/v3/api_proto',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n\"api/v3/api_proto/permissions.proto\x12\x0bmonorail.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a)api/v3/api_proto/permission_objects.proto\",\n\x17GetPermissionSetRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\"3\n\x1d\x42\x61tchGetPermissionSetsRequest\x12\x12\n\x05names\x18\x01 \x03(\tB\x03\xe0\x41\x02\"U\n\x1e\x42\x61tchGetPermissionSetsResponse\x12\x33\n\x0fpermission_sets\x18\x01 \x03(\x0b\x32\x1a.monorail.v3.PermissionSet2\xda\x01\n\x0bPermissions\x12V\n\x10GetPermissionSet\x12$.monorail.v3.GetPermissionSetRequest\x1a\x1a.monorail.v3.PermissionSet\"\x00\x12s\n\x16\x42\x61tchGetPermissionSets\x12*.monorail.v3.BatchGetPermissionSetsRequest\x1a+.monorail.v3.BatchGetPermissionSetsResponse\"\x00\x42\x12Z\x10\x61pi/v3/api_protob\x06proto3'
+  ,
+  dependencies=[google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,api_dot_v3_dot_api__proto_dot_permission__objects__pb2.DESCRIPTOR,])
+
+
+
+
+_GETPERMISSIONSETREQUEST = _descriptor.Descriptor(
+  name='GetPermissionSetRequest',
+  full_name='monorail.v3.GetPermissionSetRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.GetPermissionSetRequest.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=127,
+  serialized_end=171,
+)
+
+
+_BATCHGETPERMISSIONSETSREQUEST = _descriptor.Descriptor(
+  name='BatchGetPermissionSetsRequest',
+  full_name='monorail.v3.BatchGetPermissionSetsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='names', full_name='monorail.v3.BatchGetPermissionSetsRequest.names', index=0,
+      number=1, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=173,
+  serialized_end=224,
+)
+
+
+_BATCHGETPERMISSIONSETSRESPONSE = _descriptor.Descriptor(
+  name='BatchGetPermissionSetsResponse',
+  full_name='monorail.v3.BatchGetPermissionSetsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='permission_sets', full_name='monorail.v3.BatchGetPermissionSetsResponse.permission_sets', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=226,
+  serialized_end=311,
+)
+
+_BATCHGETPERMISSIONSETSRESPONSE.fields_by_name['permission_sets'].message_type = api_dot_v3_dot_api__proto_dot_permission__objects__pb2._PERMISSIONSET
+DESCRIPTOR.message_types_by_name['GetPermissionSetRequest'] = _GETPERMISSIONSETREQUEST
+DESCRIPTOR.message_types_by_name['BatchGetPermissionSetsRequest'] = _BATCHGETPERMISSIONSETSREQUEST
+DESCRIPTOR.message_types_by_name['BatchGetPermissionSetsResponse'] = _BATCHGETPERMISSIONSETSRESPONSE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+GetPermissionSetRequest = _reflection.GeneratedProtocolMessageType('GetPermissionSetRequest', (_message.Message,), {
+  'DESCRIPTOR' : _GETPERMISSIONSETREQUEST,
+  '__module__' : 'api.v3.api_proto.permissions_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.GetPermissionSetRequest)
+  })
+_sym_db.RegisterMessage(GetPermissionSetRequest)
+
+BatchGetPermissionSetsRequest = _reflection.GeneratedProtocolMessageType('BatchGetPermissionSetsRequest', (_message.Message,), {
+  'DESCRIPTOR' : _BATCHGETPERMISSIONSETSREQUEST,
+  '__module__' : 'api.v3.api_proto.permissions_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.BatchGetPermissionSetsRequest)
+  })
+_sym_db.RegisterMessage(BatchGetPermissionSetsRequest)
+
+BatchGetPermissionSetsResponse = _reflection.GeneratedProtocolMessageType('BatchGetPermissionSetsResponse', (_message.Message,), {
+  'DESCRIPTOR' : _BATCHGETPERMISSIONSETSRESPONSE,
+  '__module__' : 'api.v3.api_proto.permissions_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.BatchGetPermissionSetsResponse)
+  })
+_sym_db.RegisterMessage(BatchGetPermissionSetsResponse)
+
+
+DESCRIPTOR._options = None
+_GETPERMISSIONSETREQUEST.fields_by_name['name']._options = None
+_BATCHGETPERMISSIONSETSREQUEST.fields_by_name['names']._options = None
+
+_PERMISSIONS = _descriptor.ServiceDescriptor(
+  name='Permissions',
+  full_name='monorail.v3.Permissions',
+  file=DESCRIPTOR,
+  index=0,
+  serialized_options=None,
+  create_key=_descriptor._internal_create_key,
+  serialized_start=314,
+  serialized_end=532,
+  methods=[
+  _descriptor.MethodDescriptor(
+    name='GetPermissionSet',
+    full_name='monorail.v3.Permissions.GetPermissionSet',
+    index=0,
+    containing_service=None,
+    input_type=_GETPERMISSIONSETREQUEST,
+    output_type=api_dot_v3_dot_api__proto_dot_permission__objects__pb2._PERMISSIONSET,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='BatchGetPermissionSets',
+    full_name='monorail.v3.Permissions.BatchGetPermissionSets',
+    index=1,
+    containing_service=None,
+    input_type=_BATCHGETPERMISSIONSETSREQUEST,
+    output_type=_BATCHGETPERMISSIONSETSRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+])
+_sym_db.RegisterServiceDescriptor(_PERMISSIONS)
+
+DESCRIPTOR.services_by_name['Permissions'] = _PERMISSIONS
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/v3/api_proto/permissions_prpc_pb2.py b/api/v3/api_proto/permissions_prpc_pb2.py
new file mode 100644
index 0000000..3afdc60
--- /dev/null
+++ b/api/v3/api_proto/permissions_prpc_pb2.py
@@ -0,0 +1,432 @@
+# Generated by the pRPC protocol buffer compiler plugin.  DO NOT EDIT!
+# source: api/v3/api_proto/permissions.proto
+
+import base64
+import zlib
+
+from google.protobuf import descriptor_pb2
+
+# Includes description of the api/v3/api_proto/permissions.proto and all of its transitive
+# dependencies. Includes source code info.
+FILE_DESCRIPTOR_SET = descriptor_pb2.FileDescriptorSet()
+FILE_DESCRIPTOR_SET.ParseFromString(zlib.decompress(base64.b64decode(
+    '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')))
+_INDEX = {
+    f.name: {
+      'descriptor': f,
+      'services': {s.name: s for s in f.service},
+    }
+    for f in FILE_DESCRIPTOR_SET.file
+}
+
+
+PermissionsServiceDescription = {
+  'file_descriptor_set': FILE_DESCRIPTOR_SET,
+  'file_descriptor': _INDEX[u'api/v3/api_proto/permissions.proto']['descriptor'],
+  'service_descriptor': _INDEX[u'api/v3/api_proto/permissions.proto']['services'][u'Permissions'],
+}
diff --git a/api/v3/api_proto/project_objects.proto b/api/v3/api_proto/project_objects.proto
new file mode 100644
index 0000000..0c2a4c1
--- /dev/null
+++ b/api/v3/api_proto/project_objects.proto
@@ -0,0 +1,543 @@
+// Copyright 2020 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
+
+// This file defines protobufs for projects and their resources.
+
+syntax = "proto3";
+
+package monorail.v3;
+
+option go_package = "api/v3/api_proto";
+
+import "google/protobuf/timestamp.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "api/v3/api_proto/issue_objects.proto";
+import "api/v3/api_proto/permission_objects.proto";
+
+// The top level organization of issues in Monorail.
+//
+// See monorail/doc/userguide/concepts.md#Projects-and-roles.
+// and monorail/doc/userguide/project-owners.md#why-does-monorail-have-projects
+// Next available tag: 5
+message Project {
+  option (google.api.resource) = {
+    type: "api.crbug.com/Project"
+    pattern: "projects/{project}"
+  };
+
+  // Resource name of the project.
+  string name = 1;
+  // Display name of the project.
+  string display_name = 2 [(google.api.field_behavior) = IMMUTABLE];
+  // Summary of the project, ie describing what its use and purpose.
+  string summary = 3;
+  // URL pointing to this project's logo image.
+  string thumbnail_url = 4;
+}
+
+// Potential steps along the development process that an issue can be in.
+//
+// See monorail/doc/userguide/project-owners.md#How-to-configure-statuses
+// (-- aip.dev/not-precedent: "Status" should be reserved for HTTP/gRPC codes
+//     per aip.dev/216. Monorail's Status  preceded the AIP standards, and is
+//     used extensively throughout the system.)
+// Next available tag: 7
+message StatusDef {
+  option (google.api.resource) = {
+    type: "api.crbug.com/StatusDef"
+    pattern: "projects/{project}/statusDefs/{status_def}"
+  };
+
+  // Type of this status.
+  // Next available tag: 4
+  enum StatusDefType {
+    // Default enum value. This value is unused.
+    STATUS_DEF_TYPE_UNSPECIFIED = 0;
+    // This status means issue is open.
+    OPEN = 1;
+    // This status means issue is closed.
+    CLOSED = 2;
+    // This status means issue is merged into another.
+    MERGED = 3;
+  }
+
+  // State of this status.
+  // Next available tag: 3
+  enum StatusDefState {
+    // Default value. This value is unused.
+    STATUS_DEF_STATE_UNSPECIFIED = 0;
+    // This status is deprecated
+    DEPRECATED = 1;
+    // This status is not deprecated
+    ACTIVE = 2;
+  }
+
+  // Resource name of the status.
+  string name = 1;
+  // String value of the status.
+  string value = 2;
+  // Type of this status.
+  StatusDefType type = 3;
+  // Sorting rank of this status. If we sort issues by status
+  // this rank determines the sort order rather than status value.
+  uint32 rank = 4;
+  // Brief explanation of this status.
+  string docstring = 5;
+  // State of this status.
+  StatusDefState state = 6;
+}
+
+// Well-known labels that can be applied to issues within the project.
+//
+// See monorail/doc/userguide/concepts.md#issue-fields-and-labels.
+// Next available tag: 5
+// Labels defined in this project.
+message LabelDef {
+
+  option (google.api.resource) = {
+    type: "api.crbug.com/LabelDef"
+    pattern: "projects/{project}/labelDefs/{label_def}"
+  };
+
+  // State of this label.
+  // Next available tag: 3
+  enum LabelDefState {
+    // Default enum value. This value is unused.
+    LABEL_DEF_STATE_UNSPECIFIED = 0;
+    // This label is deprecated
+    DEPRECATED = 1;
+    // This label is not deprecated
+    ACTIVE = 2;
+  }
+
+  // Resource name of the label.
+  string name = 1;
+  // String value of the label.
+  string value = 2;
+  // Brief explanation of this label.
+  string docstring = 3;
+  // State of this label.
+  LabelDefState state = 4;
+}
+
+// Custom fields defined for the project.
+//
+// See monorail/doc/userguide/concepts.md#issue-fields-and-labels.
+// Check bugs.chromium.org/p/{project}/adminLabels to see the FieldDef IDs.
+// If your code needs to call multiple monorail instances
+// (e.g. monorail-{prod|staging|dev}) FieldDef IDs for FieldDefs
+// with the same display_name will differ between each monorail
+// instance. To see what FieldDef ID to use when calling staging
+// you must check bugs-staging.chromium.org/p/{project}/adminLabels.
+// Next available tag: 15
+message FieldDef {
+  option (google.api.resource) = {
+    type: "api.crbug.com/FieldDef"
+    pattern: "projects/{project}/fieldDefs/{field_def_id}"
+  };
+
+  // Resource name of the field.
+  string name = 1;
+  // Display name of the field.
+  string display_name = 2 [(google.api.field_behavior) = IMMUTABLE];
+  // Brief explanation of this field.
+  string docstring = 3;
+  // Type of this field.
+  // Next available tag: 7
+  enum Type {
+    // Default enum value. This value is unused.
+    TYPE_UNSPECIFIED = 0;
+    // This field can be filled only with enumerated option(s).
+    ENUM = 1;
+    // This field can be filled with integer(s).
+    INT = 2;
+    // This field can be filled with string(s).
+    STR = 3;
+    // This field can be filled with user(s).
+    USER = 4;
+    // This field can be filled with date(s).
+    DATE = 5;
+    // This field can be filled with URL(s).
+    URL = 6;
+  }
+  Type type = 4 [(google.api.field_behavior) = IMMUTABLE];
+
+  // Type of issue this field applies: ie Bug or Enhancement.
+  // Note: type is indicated by any "Type-foo" label or "Type" custom field.
+  string applicable_issue_type = 5;
+  // Administrators of this field.
+  repeated string admins = 6 [
+      (google.api.resource_reference) = { type: "api.crbug.com/User" }
+  ];
+
+  // Traits of this field, ie is required or can support multiple values.
+  // Next available tag: 6
+  enum Traits {
+    // Default enum value. This value is unused.
+    TRAITS_UNSPECIFIED = 0;
+    // This field must be filled out in issues where it's applicable.
+    REQUIRED = 1;
+    // This field defaults to hidden.
+    DEFAULT_HIDDEN = 2;
+    // This field can have multiple values.
+    MULTIVALUED = 3;
+    // This is a phase field, meaning it is repeated for each phase of an
+    // approval process. It cannot be the child of a particular approval.
+    PHASE = 4;
+    // Values of this field can only be edited in issues/templates by editors.
+    // Project owners and field admins are not subject of this restriction.
+    RESTRICTED = 5;
+  }
+  repeated Traits traits = 7;
+
+  // ApprovalDef that this field belongs to, if applicable.
+  // A field may not both have `approval_parent` set and have the PHASE trait.
+  string approval_parent = 8 [
+      (google.api.resource_reference) = { type: "api.crbug.com/ApprovalDef" },
+      (google.api.field_behavior) = IMMUTABLE
+  ];
+
+  // Settings specific to enum type fields.
+  // Next available tag: 2
+  message EnumTypeSettings {
+    // One available choice for an enum field.
+    // Next available tag: 3
+    message Choice {
+      // Value of this choice.
+      string value = 1;
+      // Brief explanation of this choice.
+      string docstring = 2;
+    }
+    repeated Choice choices = 1;
+  }
+  EnumTypeSettings enum_settings = 9;
+
+  // Settings specific to int type fields.
+  // Next available tag: 3
+  message IntTypeSettings {
+    // Minimum value that this field can have.
+    int32 min_value = 1;
+    // Maximum value that this field can have.
+    int32 max_value = 2;
+  }
+  IntTypeSettings int_settings = 10;
+
+  // Settings specific to str type fields.
+  // Next available tag: 2
+  message StrTypeSettings {
+    // Regex that this field value(s) must match.
+    string regex = 1;
+  }
+  StrTypeSettings str_settings = 11;
+
+  // Settings specific to user type fields.
+  // Next available tag: 5
+  message UserTypeSettings {
+    // Event that triggers a notification.
+    // Next available tag: 3
+    enum NotifyTriggers {
+      // Default notify trigger value. This value is unused.
+      NOTIFY_TRIGGERS_UNSPECIFIED = 0;
+      // There are no notifications.
+      NEVER = 1;
+      // Notify whenever any comment is made.
+      ANY_COMMENT = 2;
+    }
+    NotifyTriggers notify_triggers = 1;
+    // Field value(s) can only be set to users that fulfill the role
+    // requirements.
+    // Next available tag: 3
+    enum RoleRequirements {
+      // Default role requirement value. This value is unused.
+      ROLE_REQUIREMENTS_UNSPECIFIED = 0;
+      // There is no requirement.
+      NO_ROLE_REQUIREMENT = 1;
+      // Field value(s) can only be set to users who are members.
+      PROJECT_MEMBER = 2;
+    }
+    RoleRequirements role_requirements = 2;
+    // User(s) named in this field are granted this permission in the issue.
+    string grants_perm = 3;
+    // Field value(s) can only be set to users with this permission.
+    string needs_perm = 4;
+  }
+  UserTypeSettings user_settings = 12;
+
+  // Settings specific to date type fields.
+  // Next available tag: 2
+  message DateTypeSettings {
+    // Action to do when a date field value arrives.
+    // Next available tag: 4
+    enum DateAction {
+      // Default date action value. This value is unused.
+      DATE_ACTION_UNSPECIFIED = 0;
+      // No action will be taken when a date arrives.
+      NO_ACTION = 1;
+      // Notify owner only when a date arrives.
+      NOTIFY_OWNER = 2;
+      // Notify all participants when a date arrives.
+      NOTIFY_PARTICIPANTS = 3;
+    }
+    DateAction date_action = 1;
+  }
+  DateTypeSettings date_settings = 13;
+
+  // Editors of this field, only for RESTRICTED fields.
+  repeated string editors = 14 [
+      (google.api.resource_reference) = { type: "api.crbug.com/User" }
+  ];
+}
+
+// A high level definition of the part of the software affected by an issue.
+//
+// See monorail/doc/userguide/project-owners.md#how-to-configure-components.
+// Check crbug.com/p/{project}/adminComponents to see the ComponenttDef IDs.
+// Next available tag: 12
+message ComponentDef {
+  option (google.api.resource) = {
+    type: "api.crbug.com/ComponentDef"
+    pattern: "projects/{project}/componentDefs/{component_def_id}"
+  };
+
+  // The current state of the component definition.
+  // Next available tag: 3
+  enum ComponentDefState {
+    // Default enum value. This value is unused.
+    COMPONENT_DEF_STATE_UNSPECIFIED = 0;
+    // This component is deprecated
+    DEPRECATED = 1;
+    // This component is not deprecated
+    ACTIVE = 2;
+  }
+
+  // Resource name of the component, aka identifier.
+  // the API will always return ComponentDef names with format:
+  // projects/{project}/componentDefs/<component_def_id>.
+  // However the API will accept ComponentDef names with formats:
+  // projects/{project}/componentDefs/<component_def_id>|<value>.
+  string name = 1;
+  // String value of the component, ie 'Tools>Stability' or 'Blink'.
+  string value = 2;
+  // Brief explanation of this component.
+  string docstring = 3;
+  // Administrators of this component.
+  repeated string admins = 4 [
+      (google.api.resource_reference) = { type: "api.crbug.com/User" }
+  ];
+  // Auto cc'ed users of this component.
+  repeated string ccs = 5 [
+      (google.api.resource_reference) = { type: "api.crbug.com/User" }
+  ];
+  // State of this component.
+  ComponentDefState state = 6;
+  // The user that created this component.
+  string creator = 7 [
+      (google.api.resource_reference) = { type: "api.crbug.com/User" },
+      (google.api.field_behavior) = OUTPUT_ONLY
+  ];
+  // The user that last modified this component.
+  string modifier = 8 [
+      (google.api.resource_reference) = { type: "api.crbug.com/User" },
+      (google.api.field_behavior) = OUTPUT_ONLY
+  ];
+  // The time this component was created.
+  google.protobuf.Timestamp create_time = 9 [
+      (google.api.field_behavior) = OUTPUT_ONLY
+  ];
+  // The time this component was last modified.
+  google.protobuf.Timestamp modify_time = 10 [
+      (google.api.field_behavior) = OUTPUT_ONLY
+  ];
+  // Labels that auto-apply to issues in this component.
+  repeated string labels = 11;
+}
+
+// Defines approvals that issues within the project may need.
+// See monorail/doc/userguide/concepts.md#issue-approvals-and-gates and
+// monorail/doc/userguide/project-owners.md#How-to-configure-approvals
+// Check bugs.chromium.org/p/{project}/adminLabels to see the ApprovalDef IDs.
+// If your code needs to call multiple monorail instances
+// (e.g. monorail-{prod|staging|dev}) ApprovalDef IDs for ApprovalDefs
+// with the same display_name will differ between each monorail
+// instance. To see what ApprovalDef ID to use when calling staging
+// you must check bugs-staging.chromium.org/p/{project}/adminLabels.
+// Next available tag: 7
+message ApprovalDef {
+  option (google.api.resource) = {
+    type: "api.crbug.com/ApprovalDef"
+    pattern: "projects/{project}/approvalDefs/{approval_def_id}"
+  };
+
+  // Resource name of the approval.
+  string name = 1;
+  // Display name of the field.
+  string display_name = 2 [(google.api.field_behavior) = IMMUTABLE];
+  // Brief explanation of this field.
+  string docstring = 3;
+  // Information approvers need from requester.
+  // May be adjusted on the issue after creation.
+  string survey = 4;
+  // Default list of users who can approve this field.
+  // May be adjusted on the issue after creation.
+  repeated string approvers = 5 [
+      (google.api.resource_reference) = { type: "api.crbug.com/User" }
+  ];
+  // Administrators of this field.
+  repeated string admins = 6 [
+      (google.api.resource_reference) = { type: "api.crbug.com/User" }
+  ];
+}
+
+
+// Defines saved queries that belong to a project
+//
+// Next available tag: 4
+message ProjectSavedQuery {
+  option (google.api.resource) = {
+    type: "api.crbug.com/ProjectSavedQuery"
+    pattern: "projects/{project}/savedQueries/{saved_query_id}"
+  };
+
+  // Resource name of this saved query.
+  string name = 1;
+  // Display name of this saved query, ie 'open issues'.
+  string display_name = 2;
+  // Search term of this saved query.
+  string query = 3;
+}
+
+
+// Defines a template for filling issues.
+// Next available tag: 10
+message IssueTemplate {
+  option (google.api.resource) = {
+    type: "api.crbug.com/IssueTemplate"
+    pattern: "projects/{project}/templates/{template_id}"
+  };
+  // Resource name of the template.
+  string name = 1;
+  // Display name of this template.
+  string display_name = 2 [(google.api.field_behavior) = IMMUTABLE];
+  // Canonical Issue for this template.
+  Issue issue = 3;
+  // ApprovalValues to be created with the issue when using this template.
+  repeated ApprovalValue approval_values = 9;
+  // Boolean indicating subsequent issue creation must have delta in summary.
+  bool summary_must_be_edited = 4;
+  // Visibility permission of template.
+  // Next available tag: 3
+  enum TemplatePrivacy {
+    // This value is unused.
+    TEMPLATE_PRIVACY_UNSPECIFIED = 0;
+    // Owner project members may view this template.
+    MEMBERS_ONLY = 1;
+    // Anyone on the web can view this template.
+    PUBLIC = 2;
+  }
+  TemplatePrivacy template_privacy = 5;
+  // Indicator of who if anyone should be the default owner of the issue
+  // created with this template.
+  // Next available tag: 2
+  enum DefaultOwner {
+    // There is no default owner.
+    // This value is used if the default owner is omitted.
+    DEFAULT_OWNER_UNSPECIFIED = 0;
+    // The owner should default to the Issue reporter if the reporter is a
+    // member of the project.
+    PROJECT_MEMBER_REPORTER = 1;
+  }
+  DefaultOwner default_owner = 6;
+  // Boolean indicating whether issue must have a component.
+  bool component_required = 7;
+  // Names of Users who can administer this template.
+  repeated string admins = 8 [
+      (google.api.resource_reference) = { type: "api.crbug.com/User" }];
+}
+
+
+// Defines configurations of a project
+//
+// Next available tag: 11
+message ProjectConfig {
+  option (google.api.resource) = {
+    type: "api.crbug.com/ProjectConfig"
+    pattern: "projects/{project}/config"
+  };
+
+  // Resource name of the project config.
+  string name = 1;
+  // Set of label prefixes that only apply once per issue.
+  // E.g. priority, since no issue can be both Priority-High and Priority-Low.
+  repeated string exclusive_label_prefixes = 2;
+  // Default search query for this project's members.
+  string member_default_query = 3;
+  // TODO(crbug.com/monorail/7517): consider using IssuesListColumn
+  // Default sort specification for this project.
+  string default_sort = 4;
+  // Default columns for displaying issue list for this project.
+  repeated IssuesListColumn default_columns = 5;
+  // Grid view configurations.
+  // Next available tag: 3
+  message GridViewConfig {
+    // Default column dimension in grid view for this project.
+    string default_x_attr = 1;
+    // Default row dimension in grid view for this project.
+    string default_y_attr = 2;
+  }
+  GridViewConfig project_grid_config = 6;
+  // Default template used for issue entry for members of this project.
+  string member_default_template = 7 [
+      (google.api.resource_reference) = { type: "api.crbug.com/Template" }];
+  // Default template used for issue entry for non-members of this project.
+  string non_members_default_template = 8 [
+      (google.api.resource_reference) = { type: "api.crbug.com/Template" }];
+  // URL to browse project's source code revisions for any given revnum.
+  // E.g. https://crrev.com/{revnum}
+  string revision_url_format = 9;
+  // A project's custom URL for the "New issue" link, only if specified.
+  string custom_issue_entry_url = 10;
+}
+
+// Specifies info for a member of a project.
+//
+// Next available tag: 7
+message ProjectMember {
+  // Resource name of the Project Member.
+  // projects/{project}/members/{user_id}
+  string name = 1;
+  // The role the user has in the project.
+  // Next available tag: 4
+  enum ProjectRole {
+    // The user has no role in the project.
+    PROJECT_ROLE_UNSPECIFIED = 0;
+    // The user can make any changes to the project.
+    OWNER = 1;
+    // The user may participate in the project but may not edit the project.
+    COMMITTER = 2;
+    // The user starts with the same permissions as a non-member.
+    CONTRIBUTOR = 3;
+  }
+  ProjectRole role = 2;
+  // Which built-in/standard permissions the user has set.
+  repeated Permission standard_perms = 3;
+  // Custom permissions defined for the user.
+  // eg. "Google" in "Restrict-View-Google" is an example custom permission.
+  repeated string custom_perms = 4;
+  // Annotations about a user configured by project owners.
+  // Visible to anyone who can see the project's settings.
+  string notes = 5;
+  // Whether the user should show up in autocomplete.
+  // Next available tag: 3
+  enum AutocompleteVisibility {
+    // No autocomplete visibility value specified.
+    AUTOCOMPLETE_VISIBILITY_UNSPECIFIED = 0;
+    // The user should not show up in autocomplete.
+    HIDDEN = 1;
+    // The user may show up in autocomplete.
+    SHOWN = 2;
+  }
+  AutocompleteVisibility include_in_autocomplete = 6;
+}
diff --git a/api/v3/api_proto/project_objects_pb2.py b/api/v3/api_proto/project_objects_pb2.py
new file mode 100644
index 0000000..52f0cbb
--- /dev/null
+++ b/api/v3/api_proto/project_objects_pb2.py
@@ -0,0 +1,1715 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/v3/api_proto/project_objects.proto
+
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
+from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
+from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
+from api.v3.api_proto import issue_objects_pb2 as api_dot_v3_dot_api__proto_dot_issue__objects__pb2
+from api.v3.api_proto import permission_objects_pb2 as api_dot_v3_dot_api__proto_dot_permission__objects__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/v3/api_proto/project_objects.proto',
+  package='monorail.v3',
+  syntax='proto3',
+  serialized_options=b'Z\020api/v3/api_proto',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n&api/v3/api_proto/project_objects.proto\x12\x0bmonorail.v3\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a$api/v3/api_proto/issue_objects.proto\x1a)api/v3/api_proto/permission_objects.proto\"\x8a\x01\n\x07Project\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x0f\n\x07summary\x18\x03 \x01(\t\x12\x15\n\rthumbnail_url\x18\x04 \x01(\t:.\xea\x41+\n\x15\x61pi.crbug.com/Project\x12\x12projects/{project}\"\xa1\x03\n\tStatusDef\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x32\n\x04type\x18\x03 \x01(\x0e\x32$.monorail.v3.StatusDef.StatusDefType\x12\x0c\n\x04rank\x18\x04 \x01(\r\x12\x11\n\tdocstring\x18\x05 \x01(\t\x12\x34\n\x05state\x18\x06 \x01(\x0e\x32%.monorail.v3.StatusDef.StatusDefState\"R\n\rStatusDefType\x12\x1f\n\x1bSTATUS_DEF_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04OPEN\x10\x01\x12\n\n\x06\x43LOSED\x10\x02\x12\n\n\x06MERGED\x10\x03\"N\n\x0eStatusDefState\x12 \n\x1cSTATUS_DEF_STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nDEPRECATED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02:H\xea\x41\x45\n\x17\x61pi.crbug.com/StatusDef\x12*projects/{project}/statusDefs/{status_def}\"\x83\x02\n\x08LabelDef\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x11\n\tdocstring\x18\x03 \x01(\t\x12\x32\n\x05state\x18\x04 \x01(\x0e\x32#.monorail.v3.LabelDef.LabelDefState\"L\n\rLabelDefState\x12\x1f\n\x1bLABEL_DEF_STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nDEPRECATED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02:E\xea\x41\x42\n\x16\x61pi.crbug.com/LabelDef\x12(projects/{project}/labelDefs/{label_def}\"\xcb\r\n\x08\x46ieldDef\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x11\n\tdocstring\x18\x03 \x01(\t\x12-\n\x04type\x18\x04 \x01(\x0e\x32\x1a.monorail.v3.FieldDef.TypeB\x03\xe0\x41\x05\x12\x1d\n\x15\x61pplicable_issue_type\x18\x05 \x01(\t\x12\'\n\x06\x61\x64mins\x18\x06 \x03(\tB\x17\xfa\x41\x14\n\x12\x61pi.crbug.com/User\x12,\n\x06traits\x18\x07 \x03(\x0e\x32\x1c.monorail.v3.FieldDef.Traits\x12:\n\x0f\x61pproval_parent\x18\x08 \x01(\tB!\xfa\x41\x1b\n\x19\x61pi.crbug.com/ApprovalDef\xe0\x41\x05\x12=\n\renum_settings\x18\t \x01(\x0b\x32&.monorail.v3.FieldDef.EnumTypeSettings\x12;\n\x0cint_settings\x18\n \x01(\x0b\x32%.monorail.v3.FieldDef.IntTypeSettings\x12;\n\x0cstr_settings\x18\x0b \x01(\x0b\x32%.monorail.v3.FieldDef.StrTypeSettings\x12=\n\ruser_settings\x18\x0c \x01(\x0b\x32&.monorail.v3.FieldDef.UserTypeSettings\x12=\n\rdate_settings\x18\r \x01(\x0b\x32&.monorail.v3.FieldDef.DateTypeSettings\x12(\n\x07\x65\x64itors\x18\x0e \x03(\tB\x17\xfa\x41\x14\n\x12\x61pi.crbug.com/User\x1a~\n\x10\x45numTypeSettings\x12>\n\x07\x63hoices\x18\x01 \x03(\x0b\x32-.monorail.v3.FieldDef.EnumTypeSettings.Choice\x1a*\n\x06\x43hoice\x12\r\n\x05value\x18\x01 \x01(\t\x12\x11\n\tdocstring\x18\x02 \x01(\t\x1a\x37\n\x0fIntTypeSettings\x12\x11\n\tmin_value\x18\x01 \x01(\x05\x12\x11\n\tmax_value\x18\x02 \x01(\x05\x1a \n\x0fStrTypeSettings\x12\r\n\x05regex\x18\x01 \x01(\t\x1a\x92\x03\n\x10UserTypeSettings\x12N\n\x0fnotify_triggers\x18\x01 \x01(\x0e\x32\x35.monorail.v3.FieldDef.UserTypeSettings.NotifyTriggers\x12R\n\x11role_requirements\x18\x02 \x01(\x0e\x32\x37.monorail.v3.FieldDef.UserTypeSettings.RoleRequirements\x12\x13\n\x0bgrants_perm\x18\x03 \x01(\t\x12\x12\n\nneeds_perm\x18\x04 \x01(\t\"M\n\x0eNotifyTriggers\x12\x1f\n\x1bNOTIFY_TRIGGERS_UNSPECIFIED\x10\x00\x12\t\n\x05NEVER\x10\x01\x12\x0f\n\x0b\x41NY_COMMENT\x10\x02\"b\n\x10RoleRequirements\x12!\n\x1dROLE_REQUIREMENTS_UNSPECIFIED\x10\x00\x12\x17\n\x13NO_ROLE_REQUIREMENT\x10\x01\x12\x12\n\x0ePROJECT_MEMBER\x10\x02\x1a\xbf\x01\n\x10\x44\x61teTypeSettings\x12\x46\n\x0b\x64\x61te_action\x18\x01 \x01(\x0e\x32\x31.monorail.v3.FieldDef.DateTypeSettings.DateAction\"c\n\nDateAction\x12\x1b\n\x17\x44\x41TE_ACTION_UNSPECIFIED\x10\x00\x12\r\n\tNO_ACTION\x10\x01\x12\x10\n\x0cNOTIFY_OWNER\x10\x02\x12\x17\n\x13NOTIFY_PARTICIPANTS\x10\x03\"U\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x45NUM\x10\x01\x12\x07\n\x03INT\x10\x02\x12\x07\n\x03STR\x10\x03\x12\x08\n\x04USER\x10\x04\x12\x08\n\x04\x44\x41TE\x10\x05\x12\x07\n\x03URL\x10\x06\"n\n\x06Traits\x12\x16\n\x12TRAITS_UNSPECIFIED\x10\x00\x12\x0c\n\x08REQUIRED\x10\x01\x12\x12\n\x0e\x44\x45\x46\x41ULT_HIDDEN\x10\x02\x12\x0f\n\x0bMULTIVALUED\x10\x03\x12\t\n\x05PHASE\x10\x04\x12\x0e\n\nRESTRICTED\x10\x05:H\xea\x41\x45\n\x16\x61pi.crbug.com/FieldDef\x12+projects/{project}/fieldDefs/{field_def_id}\"\xcc\x04\n\x0c\x43omponentDef\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t\x12\x11\n\tdocstring\x18\x03 \x01(\t\x12\'\n\x06\x61\x64mins\x18\x04 \x03(\tB\x17\xfa\x41\x14\n\x12\x61pi.crbug.com/User\x12$\n\x03\x63\x63s\x18\x05 \x03(\tB\x17\xfa\x41\x14\n\x12\x61pi.crbug.com/User\x12:\n\x05state\x18\x06 \x01(\x0e\x32+.monorail.v3.ComponentDef.ComponentDefState\x12+\n\x07\x63reator\x18\x07 \x01(\tB\x1a\xfa\x41\x14\n\x12\x61pi.crbug.com/User\xe0\x41\x03\x12,\n\x08modifier\x18\x08 \x01(\tB\x1a\xfa\x41\x14\n\x12\x61pi.crbug.com/User\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bmodify_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x0e\n\x06labels\x18\x0b \x03(\t\"T\n\x11\x43omponentDefState\x12#\n\x1f\x43OMPONENT_DEF_STATE_UNSPECIFIED\x10\x00\x12\x0e\n\nDEPRECATED\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02:T\xea\x41Q\n\x1a\x61pi.crbug.com/ComponentDef\x12\x33projects/{project}/componentDefs/{component_def_id}\"\x81\x02\n\x0b\x41pprovalDef\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12\x11\n\tdocstring\x18\x03 \x01(\t\x12\x0e\n\x06survey\x18\x04 \x01(\t\x12*\n\tapprovers\x18\x05 \x03(\tB\x17\xfa\x41\x14\n\x12\x61pi.crbug.com/User\x12\'\n\x06\x61\x64mins\x18\x06 \x03(\tB\x17\xfa\x41\x14\n\x12\x61pi.crbug.com/User:Q\xea\x41N\n\x19\x61pi.crbug.com/ApprovalDef\x12\x31projects/{project}/approvalDefs/{approval_def_id}\"\x9e\x01\n\x11ProjectSavedQuery\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\r\n\x05query\x18\x03 \x01(\t:V\xea\x41S\n\x1f\x61pi.crbug.com/ProjectSavedQuery\x12\x30projects/{project}/savedQueries/{saved_query_id}\"\xe8\x04\n\rIssueTemplate\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x05\x12!\n\x05issue\x18\x03 \x01(\x0b\x32\x12.monorail.v3.Issue\x12\x33\n\x0f\x61pproval_values\x18\t \x03(\x0b\x32\x1a.monorail.v3.ApprovalValue\x12\x1e\n\x16summary_must_be_edited\x18\x04 \x01(\x08\x12\x44\n\x10template_privacy\x18\x05 \x01(\x0e\x32*.monorail.v3.IssueTemplate.TemplatePrivacy\x12>\n\rdefault_owner\x18\x06 \x01(\x0e\x32\'.monorail.v3.IssueTemplate.DefaultOwner\x12\x1a\n\x12\x63omponent_required\x18\x07 \x01(\x08\x12\'\n\x06\x61\x64mins\x18\x08 \x03(\tB\x17\xfa\x41\x14\n\x12\x61pi.crbug.com/User\"Q\n\x0fTemplatePrivacy\x12 \n\x1cTEMPLATE_PRIVACY_UNSPECIFIED\x10\x00\x12\x10\n\x0cMEMBERS_ONLY\x10\x01\x12\n\n\x06PUBLIC\x10\x02\"J\n\x0c\x44\x65\x66\x61ultOwner\x12\x1d\n\x19\x44\x45\x46\x41ULT_OWNER_UNSPECIFIED\x10\x00\x12\x1b\n\x17PROJECT_MEMBER_REPORTER\x10\x01:L\xea\x41I\n\x1b\x61pi.crbug.com/IssueTemplate\x12*projects/{project}/templates/{template_id}\"\xb0\x04\n\rProjectConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12 \n\x18\x65xclusive_label_prefixes\x18\x02 \x03(\t\x12\x1c\n\x14member_default_query\x18\x03 \x01(\t\x12\x14\n\x0c\x64\x65\x66\x61ult_sort\x18\x04 \x01(\t\x12\x36\n\x0f\x64\x65\x66\x61ult_columns\x18\x05 \x03(\x0b\x32\x1d.monorail.v3.IssuesListColumn\x12\x46\n\x13project_grid_config\x18\x06 \x01(\x0b\x32).monorail.v3.ProjectConfig.GridViewConfig\x12<\n\x17member_default_template\x18\x07 \x01(\tB\x1b\xfa\x41\x18\n\x16\x61pi.crbug.com/Template\x12\x41\n\x1cnon_members_default_template\x18\x08 \x01(\tB\x1b\xfa\x41\x18\n\x16\x61pi.crbug.com/Template\x12\x1b\n\x13revision_url_format\x18\t \x01(\t\x12\x1e\n\x16\x63ustom_issue_entry_url\x18\n \x01(\t\x1a@\n\x0eGridViewConfig\x12\x16\n\x0e\x64\x65\x66\x61ult_x_attr\x18\x01 \x01(\t\x12\x16\n\x0e\x64\x65\x66\x61ult_y_attr\x18\x02 \x01(\t:;\xea\x41\x38\n\x1b\x61pi.crbug.com/ProjectConfig\x12\x19projects/{project}/config\"\xaf\x03\n\rProjectMember\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x34\n\x04role\x18\x02 \x01(\x0e\x32&.monorail.v3.ProjectMember.ProjectRole\x12/\n\x0estandard_perms\x18\x03 \x03(\x0e\x32\x17.monorail.v3.Permission\x12\x14\n\x0c\x63ustom_perms\x18\x04 \x03(\t\x12\r\n\x05notes\x18\x05 \x01(\t\x12R\n\x17include_in_autocomplete\x18\x06 \x01(\x0e\x32\x31.monorail.v3.ProjectMember.AutocompleteVisibility\"V\n\x0bProjectRole\x12\x1c\n\x18PROJECT_ROLE_UNSPECIFIED\x10\x00\x12\t\n\x05OWNER\x10\x01\x12\r\n\tCOMMITTER\x10\x02\x12\x0f\n\x0b\x43ONTRIBUTOR\x10\x03\"X\n\x16\x41utocompleteVisibility\x12\'\n#AUTOCOMPLETE_VISIBILITY_UNSPECIFIED\x10\x00\x12\n\n\x06HIDDEN\x10\x01\x12\t\n\x05SHOWN\x10\x02\x42\x12Z\x10\x61pi/v3/api_protob\x06proto3'
+  ,
+  dependencies=[google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,api_dot_v3_dot_api__proto_dot_issue__objects__pb2.DESCRIPTOR,api_dot_v3_dot_api__proto_dot_permission__objects__pb2.DESCRIPTOR,])
+
+
+
+_STATUSDEF_STATUSDEFTYPE = _descriptor.EnumDescriptor(
+  name='StatusDefType',
+  full_name='monorail.v3.StatusDef.StatusDefType',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='STATUS_DEF_TYPE_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='OPEN', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='CLOSED', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='MERGED', index=3, number=3,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=552,
+  serialized_end=634,
+)
+_sym_db.RegisterEnumDescriptor(_STATUSDEF_STATUSDEFTYPE)
+
+_STATUSDEF_STATUSDEFSTATE = _descriptor.EnumDescriptor(
+  name='StatusDefState',
+  full_name='monorail.v3.StatusDef.StatusDefState',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='STATUS_DEF_STATE_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='DEPRECATED', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='ACTIVE', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=636,
+  serialized_end=714,
+)
+_sym_db.RegisterEnumDescriptor(_STATUSDEF_STATUSDEFSTATE)
+
+_LABELDEF_LABELDEFSTATE = _descriptor.EnumDescriptor(
+  name='LabelDefState',
+  full_name='monorail.v3.LabelDef.LabelDefState',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='LABEL_DEF_STATE_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='DEPRECATED', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='ACTIVE', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=903,
+  serialized_end=979,
+)
+_sym_db.RegisterEnumDescriptor(_LABELDEF_LABELDEFSTATE)
+
+_FIELDDEF_USERTYPESETTINGS_NOTIFYTRIGGERS = _descriptor.EnumDescriptor(
+  name='NotifyTriggers',
+  full_name='monorail.v3.FieldDef.UserTypeSettings.NotifyTriggers',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='NOTIFY_TRIGGERS_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NEVER', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='ANY_COMMENT', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=2148,
+  serialized_end=2225,
+)
+_sym_db.RegisterEnumDescriptor(_FIELDDEF_USERTYPESETTINGS_NOTIFYTRIGGERS)
+
+_FIELDDEF_USERTYPESETTINGS_ROLEREQUIREMENTS = _descriptor.EnumDescriptor(
+  name='RoleRequirements',
+  full_name='monorail.v3.FieldDef.UserTypeSettings.RoleRequirements',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='ROLE_REQUIREMENTS_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NO_ROLE_REQUIREMENT', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='PROJECT_MEMBER', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=2227,
+  serialized_end=2325,
+)
+_sym_db.RegisterEnumDescriptor(_FIELDDEF_USERTYPESETTINGS_ROLEREQUIREMENTS)
+
+_FIELDDEF_DATETYPESETTINGS_DATEACTION = _descriptor.EnumDescriptor(
+  name='DateAction',
+  full_name='monorail.v3.FieldDef.DateTypeSettings.DateAction',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='DATE_ACTION_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NO_ACTION', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NOTIFY_OWNER', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NOTIFY_PARTICIPANTS', index=3, number=3,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=2420,
+  serialized_end=2519,
+)
+_sym_db.RegisterEnumDescriptor(_FIELDDEF_DATETYPESETTINGS_DATEACTION)
+
+_FIELDDEF_TYPE = _descriptor.EnumDescriptor(
+  name='Type',
+  full_name='monorail.v3.FieldDef.Type',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='TYPE_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='ENUM', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='INT', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='STR', index=3, number=3,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='USER', index=4, number=4,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='DATE', index=5, number=5,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='URL', index=6, number=6,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=2521,
+  serialized_end=2606,
+)
+_sym_db.RegisterEnumDescriptor(_FIELDDEF_TYPE)
+
+_FIELDDEF_TRAITS = _descriptor.EnumDescriptor(
+  name='Traits',
+  full_name='monorail.v3.FieldDef.Traits',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='TRAITS_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='REQUIRED', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='DEFAULT_HIDDEN', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='MULTIVALUED', index=3, number=3,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='PHASE', index=4, number=4,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='RESTRICTED', index=5, number=5,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=2608,
+  serialized_end=2718,
+)
+_sym_db.RegisterEnumDescriptor(_FIELDDEF_TRAITS)
+
+_COMPONENTDEF_COMPONENTDEFSTATE = _descriptor.EnumDescriptor(
+  name='ComponentDefState',
+  full_name='monorail.v3.ComponentDef.ComponentDefState',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='COMPONENT_DEF_STATE_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='DEPRECATED', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='ACTIVE', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=3213,
+  serialized_end=3297,
+)
+_sym_db.RegisterEnumDescriptor(_COMPONENTDEF_COMPONENTDEFSTATE)
+
+_ISSUETEMPLATE_TEMPLATEPRIVACY = _descriptor.EnumDescriptor(
+  name='TemplatePrivacy',
+  full_name='monorail.v3.IssueTemplate.TemplatePrivacy',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='TEMPLATE_PRIVACY_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='MEMBERS_ONLY', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='PUBLIC', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=4188,
+  serialized_end=4269,
+)
+_sym_db.RegisterEnumDescriptor(_ISSUETEMPLATE_TEMPLATEPRIVACY)
+
+_ISSUETEMPLATE_DEFAULTOWNER = _descriptor.EnumDescriptor(
+  name='DefaultOwner',
+  full_name='monorail.v3.IssueTemplate.DefaultOwner',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='DEFAULT_OWNER_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='PROJECT_MEMBER_REPORTER', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=4271,
+  serialized_end=4345,
+)
+_sym_db.RegisterEnumDescriptor(_ISSUETEMPLATE_DEFAULTOWNER)
+
+_PROJECTMEMBER_PROJECTROLE = _descriptor.EnumDescriptor(
+  name='ProjectRole',
+  full_name='monorail.v3.ProjectMember.ProjectRole',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='PROJECT_ROLE_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='OWNER', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='COMMITTER', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='CONTRIBUTOR', index=3, number=3,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=5244,
+  serialized_end=5330,
+)
+_sym_db.RegisterEnumDescriptor(_PROJECTMEMBER_PROJECTROLE)
+
+_PROJECTMEMBER_AUTOCOMPLETEVISIBILITY = _descriptor.EnumDescriptor(
+  name='AutocompleteVisibility',
+  full_name='monorail.v3.ProjectMember.AutocompleteVisibility',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='AUTOCOMPLETE_VISIBILITY_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='HIDDEN', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='SHOWN', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=5332,
+  serialized_end=5420,
+)
+_sym_db.RegisterEnumDescriptor(_PROJECTMEMBER_AUTOCOMPLETEVISIBILITY)
+
+
+_PROJECT = _descriptor.Descriptor(
+  name='Project',
+  full_name='monorail.v3.Project',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.Project.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='display_name', full_name='monorail.v3.Project.display_name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\005', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='summary', full_name='monorail.v3.Project.summary', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='thumbnail_url', full_name='monorail.v3.Project.thumbnail_url', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=b'\352A+\n\025api.crbug.com/Project\022\022projects/{project}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=230,
+  serialized_end=368,
+)
+
+
+_STATUSDEF = _descriptor.Descriptor(
+  name='StatusDef',
+  full_name='monorail.v3.StatusDef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.StatusDef.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='value', full_name='monorail.v3.StatusDef.value', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='type', full_name='monorail.v3.StatusDef.type', index=2,
+      number=3, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='rank', full_name='monorail.v3.StatusDef.rank', index=3,
+      number=4, type=13, cpp_type=3, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='docstring', full_name='monorail.v3.StatusDef.docstring', index=4,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='state', full_name='monorail.v3.StatusDef.state', index=5,
+      number=6, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _STATUSDEF_STATUSDEFTYPE,
+    _STATUSDEF_STATUSDEFSTATE,
+  ],
+  serialized_options=b'\352AE\n\027api.crbug.com/StatusDef\022*projects/{project}/statusDefs/{status_def}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=371,
+  serialized_end=788,
+)
+
+
+_LABELDEF = _descriptor.Descriptor(
+  name='LabelDef',
+  full_name='monorail.v3.LabelDef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.LabelDef.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='value', full_name='monorail.v3.LabelDef.value', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='docstring', full_name='monorail.v3.LabelDef.docstring', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='state', full_name='monorail.v3.LabelDef.state', index=3,
+      number=4, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _LABELDEF_LABELDEFSTATE,
+  ],
+  serialized_options=b'\352AB\n\026api.crbug.com/LabelDef\022(projects/{project}/labelDefs/{label_def}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=791,
+  serialized_end=1050,
+)
+
+
+_FIELDDEF_ENUMTYPESETTINGS_CHOICE = _descriptor.Descriptor(
+  name='Choice',
+  full_name='monorail.v3.FieldDef.EnumTypeSettings.Choice',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='value', full_name='monorail.v3.FieldDef.EnumTypeSettings.Choice.value', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='docstring', full_name='monorail.v3.FieldDef.EnumTypeSettings.Choice.docstring', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1787,
+  serialized_end=1829,
+)
+
+_FIELDDEF_ENUMTYPESETTINGS = _descriptor.Descriptor(
+  name='EnumTypeSettings',
+  full_name='monorail.v3.FieldDef.EnumTypeSettings',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='choices', full_name='monorail.v3.FieldDef.EnumTypeSettings.choices', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[_FIELDDEF_ENUMTYPESETTINGS_CHOICE, ],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1703,
+  serialized_end=1829,
+)
+
+_FIELDDEF_INTTYPESETTINGS = _descriptor.Descriptor(
+  name='IntTypeSettings',
+  full_name='monorail.v3.FieldDef.IntTypeSettings',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='min_value', full_name='monorail.v3.FieldDef.IntTypeSettings.min_value', index=0,
+      number=1, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='max_value', full_name='monorail.v3.FieldDef.IntTypeSettings.max_value', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1831,
+  serialized_end=1886,
+)
+
+_FIELDDEF_STRTYPESETTINGS = _descriptor.Descriptor(
+  name='StrTypeSettings',
+  full_name='monorail.v3.FieldDef.StrTypeSettings',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='regex', full_name='monorail.v3.FieldDef.StrTypeSettings.regex', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1888,
+  serialized_end=1920,
+)
+
+_FIELDDEF_USERTYPESETTINGS = _descriptor.Descriptor(
+  name='UserTypeSettings',
+  full_name='monorail.v3.FieldDef.UserTypeSettings',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='notify_triggers', full_name='monorail.v3.FieldDef.UserTypeSettings.notify_triggers', index=0,
+      number=1, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='role_requirements', full_name='monorail.v3.FieldDef.UserTypeSettings.role_requirements', index=1,
+      number=2, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='grants_perm', full_name='monorail.v3.FieldDef.UserTypeSettings.grants_perm', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='needs_perm', full_name='monorail.v3.FieldDef.UserTypeSettings.needs_perm', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _FIELDDEF_USERTYPESETTINGS_NOTIFYTRIGGERS,
+    _FIELDDEF_USERTYPESETTINGS_ROLEREQUIREMENTS,
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1923,
+  serialized_end=2325,
+)
+
+_FIELDDEF_DATETYPESETTINGS = _descriptor.Descriptor(
+  name='DateTypeSettings',
+  full_name='monorail.v3.FieldDef.DateTypeSettings',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='date_action', full_name='monorail.v3.FieldDef.DateTypeSettings.date_action', index=0,
+      number=1, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _FIELDDEF_DATETYPESETTINGS_DATEACTION,
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2328,
+  serialized_end=2519,
+)
+
+_FIELDDEF = _descriptor.Descriptor(
+  name='FieldDef',
+  full_name='monorail.v3.FieldDef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.FieldDef.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='display_name', full_name='monorail.v3.FieldDef.display_name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\005', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='docstring', full_name='monorail.v3.FieldDef.docstring', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='type', full_name='monorail.v3.FieldDef.type', index=3,
+      number=4, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\005', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='applicable_issue_type', full_name='monorail.v3.FieldDef.applicable_issue_type', index=4,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='admins', full_name='monorail.v3.FieldDef.admins', index=5,
+      number=6, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='traits', full_name='monorail.v3.FieldDef.traits', index=6,
+      number=7, type=14, cpp_type=8, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='approval_parent', full_name='monorail.v3.FieldDef.approval_parent', index=7,
+      number=8, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\033\n\031api.crbug.com/ApprovalDef\340A\005', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='enum_settings', full_name='monorail.v3.FieldDef.enum_settings', index=8,
+      number=9, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='int_settings', full_name='monorail.v3.FieldDef.int_settings', index=9,
+      number=10, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='str_settings', full_name='monorail.v3.FieldDef.str_settings', index=10,
+      number=11, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='user_settings', full_name='monorail.v3.FieldDef.user_settings', index=11,
+      number=12, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='date_settings', full_name='monorail.v3.FieldDef.date_settings', index=12,
+      number=13, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='editors', full_name='monorail.v3.FieldDef.editors', index=13,
+      number=14, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[_FIELDDEF_ENUMTYPESETTINGS, _FIELDDEF_INTTYPESETTINGS, _FIELDDEF_STRTYPESETTINGS, _FIELDDEF_USERTYPESETTINGS, _FIELDDEF_DATETYPESETTINGS, ],
+  enum_types=[
+    _FIELDDEF_TYPE,
+    _FIELDDEF_TRAITS,
+  ],
+  serialized_options=b'\352AE\n\026api.crbug.com/FieldDef\022+projects/{project}/fieldDefs/{field_def_id}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1053,
+  serialized_end=2792,
+)
+
+
+_COMPONENTDEF = _descriptor.Descriptor(
+  name='ComponentDef',
+  full_name='monorail.v3.ComponentDef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.ComponentDef.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='value', full_name='monorail.v3.ComponentDef.value', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='docstring', full_name='monorail.v3.ComponentDef.docstring', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='admins', full_name='monorail.v3.ComponentDef.admins', index=3,
+      number=4, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='ccs', full_name='monorail.v3.ComponentDef.ccs', index=4,
+      number=5, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='state', full_name='monorail.v3.ComponentDef.state', index=5,
+      number=6, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='creator', full_name='monorail.v3.ComponentDef.creator', index=6,
+      number=7, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='modifier', full_name='monorail.v3.ComponentDef.modifier', index=7,
+      number=8, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='create_time', full_name='monorail.v3.ComponentDef.create_time', index=8,
+      number=9, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='modify_time', full_name='monorail.v3.ComponentDef.modify_time', index=9,
+      number=10, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='labels', full_name='monorail.v3.ComponentDef.labels', index=10,
+      number=11, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _COMPONENTDEF_COMPONENTDEFSTATE,
+  ],
+  serialized_options=b'\352AQ\n\032api.crbug.com/ComponentDef\0223projects/{project}/componentDefs/{component_def_id}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=2795,
+  serialized_end=3383,
+)
+
+
+_APPROVALDEF = _descriptor.Descriptor(
+  name='ApprovalDef',
+  full_name='monorail.v3.ApprovalDef',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.ApprovalDef.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='display_name', full_name='monorail.v3.ApprovalDef.display_name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\005', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='docstring', full_name='monorail.v3.ApprovalDef.docstring', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='survey', full_name='monorail.v3.ApprovalDef.survey', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='approvers', full_name='monorail.v3.ApprovalDef.approvers', index=4,
+      number=5, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='admins', full_name='monorail.v3.ApprovalDef.admins', index=5,
+      number=6, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=b'\352AN\n\031api.crbug.com/ApprovalDef\0221projects/{project}/approvalDefs/{approval_def_id}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3386,
+  serialized_end=3643,
+)
+
+
+_PROJECTSAVEDQUERY = _descriptor.Descriptor(
+  name='ProjectSavedQuery',
+  full_name='monorail.v3.ProjectSavedQuery',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.ProjectSavedQuery.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='display_name', full_name='monorail.v3.ProjectSavedQuery.display_name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='query', full_name='monorail.v3.ProjectSavedQuery.query', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=b'\352AS\n\037api.crbug.com/ProjectSavedQuery\0220projects/{project}/savedQueries/{saved_query_id}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3646,
+  serialized_end=3804,
+)
+
+
+_ISSUETEMPLATE = _descriptor.Descriptor(
+  name='IssueTemplate',
+  full_name='monorail.v3.IssueTemplate',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.IssueTemplate.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='display_name', full_name='monorail.v3.IssueTemplate.display_name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\005', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='issue', full_name='monorail.v3.IssueTemplate.issue', index=2,
+      number=3, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='approval_values', full_name='monorail.v3.IssueTemplate.approval_values', index=3,
+      number=9, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='summary_must_be_edited', full_name='monorail.v3.IssueTemplate.summary_must_be_edited', index=4,
+      number=4, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='template_privacy', full_name='monorail.v3.IssueTemplate.template_privacy', index=5,
+      number=5, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='default_owner', full_name='monorail.v3.IssueTemplate.default_owner', index=6,
+      number=6, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='component_required', full_name='monorail.v3.IssueTemplate.component_required', index=7,
+      number=7, type=8, cpp_type=7, label=1,
+      has_default_value=False, default_value=False,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='admins', full_name='monorail.v3.IssueTemplate.admins', index=8,
+      number=8, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _ISSUETEMPLATE_TEMPLATEPRIVACY,
+    _ISSUETEMPLATE_DEFAULTOWNER,
+  ],
+  serialized_options=b'\352AI\n\033api.crbug.com/IssueTemplate\022*projects/{project}/templates/{template_id}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=3807,
+  serialized_end=4423,
+)
+
+
+_PROJECTCONFIG_GRIDVIEWCONFIG = _descriptor.Descriptor(
+  name='GridViewConfig',
+  full_name='monorail.v3.ProjectConfig.GridViewConfig',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='default_x_attr', full_name='monorail.v3.ProjectConfig.GridViewConfig.default_x_attr', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='default_y_attr', full_name='monorail.v3.ProjectConfig.GridViewConfig.default_y_attr', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4861,
+  serialized_end=4925,
+)
+
+_PROJECTCONFIG = _descriptor.Descriptor(
+  name='ProjectConfig',
+  full_name='monorail.v3.ProjectConfig',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.ProjectConfig.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='exclusive_label_prefixes', full_name='monorail.v3.ProjectConfig.exclusive_label_prefixes', index=1,
+      number=2, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='member_default_query', full_name='monorail.v3.ProjectConfig.member_default_query', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='default_sort', full_name='monorail.v3.ProjectConfig.default_sort', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='default_columns', full_name='monorail.v3.ProjectConfig.default_columns', index=4,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='project_grid_config', full_name='monorail.v3.ProjectConfig.project_grid_config', index=5,
+      number=6, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='member_default_template', full_name='monorail.v3.ProjectConfig.member_default_template', index=6,
+      number=7, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\030\n\026api.crbug.com/Template', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='non_members_default_template', full_name='monorail.v3.ProjectConfig.non_members_default_template', index=7,
+      number=8, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\030\n\026api.crbug.com/Template', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='revision_url_format', full_name='monorail.v3.ProjectConfig.revision_url_format', index=8,
+      number=9, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='custom_issue_entry_url', full_name='monorail.v3.ProjectConfig.custom_issue_entry_url', index=9,
+      number=10, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[_PROJECTCONFIG_GRIDVIEWCONFIG, ],
+  enum_types=[
+  ],
+  serialized_options=b'\352A8\n\033api.crbug.com/ProjectConfig\022\031projects/{project}/config',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4426,
+  serialized_end=4986,
+)
+
+
+_PROJECTMEMBER = _descriptor.Descriptor(
+  name='ProjectMember',
+  full_name='monorail.v3.ProjectMember',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.ProjectMember.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='role', full_name='monorail.v3.ProjectMember.role', index=1,
+      number=2, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='standard_perms', full_name='monorail.v3.ProjectMember.standard_perms', index=2,
+      number=3, type=14, cpp_type=8, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='custom_perms', full_name='monorail.v3.ProjectMember.custom_perms', index=3,
+      number=4, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='notes', full_name='monorail.v3.ProjectMember.notes', index=4,
+      number=5, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='include_in_autocomplete', full_name='monorail.v3.ProjectMember.include_in_autocomplete', index=5,
+      number=6, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _PROJECTMEMBER_PROJECTROLE,
+    _PROJECTMEMBER_AUTOCOMPLETEVISIBILITY,
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=4989,
+  serialized_end=5420,
+)
+
+_STATUSDEF.fields_by_name['type'].enum_type = _STATUSDEF_STATUSDEFTYPE
+_STATUSDEF.fields_by_name['state'].enum_type = _STATUSDEF_STATUSDEFSTATE
+_STATUSDEF_STATUSDEFTYPE.containing_type = _STATUSDEF
+_STATUSDEF_STATUSDEFSTATE.containing_type = _STATUSDEF
+_LABELDEF.fields_by_name['state'].enum_type = _LABELDEF_LABELDEFSTATE
+_LABELDEF_LABELDEFSTATE.containing_type = _LABELDEF
+_FIELDDEF_ENUMTYPESETTINGS_CHOICE.containing_type = _FIELDDEF_ENUMTYPESETTINGS
+_FIELDDEF_ENUMTYPESETTINGS.fields_by_name['choices'].message_type = _FIELDDEF_ENUMTYPESETTINGS_CHOICE
+_FIELDDEF_ENUMTYPESETTINGS.containing_type = _FIELDDEF
+_FIELDDEF_INTTYPESETTINGS.containing_type = _FIELDDEF
+_FIELDDEF_STRTYPESETTINGS.containing_type = _FIELDDEF
+_FIELDDEF_USERTYPESETTINGS.fields_by_name['notify_triggers'].enum_type = _FIELDDEF_USERTYPESETTINGS_NOTIFYTRIGGERS
+_FIELDDEF_USERTYPESETTINGS.fields_by_name['role_requirements'].enum_type = _FIELDDEF_USERTYPESETTINGS_ROLEREQUIREMENTS
+_FIELDDEF_USERTYPESETTINGS.containing_type = _FIELDDEF
+_FIELDDEF_USERTYPESETTINGS_NOTIFYTRIGGERS.containing_type = _FIELDDEF_USERTYPESETTINGS
+_FIELDDEF_USERTYPESETTINGS_ROLEREQUIREMENTS.containing_type = _FIELDDEF_USERTYPESETTINGS
+_FIELDDEF_DATETYPESETTINGS.fields_by_name['date_action'].enum_type = _FIELDDEF_DATETYPESETTINGS_DATEACTION
+_FIELDDEF_DATETYPESETTINGS.containing_type = _FIELDDEF
+_FIELDDEF_DATETYPESETTINGS_DATEACTION.containing_type = _FIELDDEF_DATETYPESETTINGS
+_FIELDDEF.fields_by_name['type'].enum_type = _FIELDDEF_TYPE
+_FIELDDEF.fields_by_name['traits'].enum_type = _FIELDDEF_TRAITS
+_FIELDDEF.fields_by_name['enum_settings'].message_type = _FIELDDEF_ENUMTYPESETTINGS
+_FIELDDEF.fields_by_name['int_settings'].message_type = _FIELDDEF_INTTYPESETTINGS
+_FIELDDEF.fields_by_name['str_settings'].message_type = _FIELDDEF_STRTYPESETTINGS
+_FIELDDEF.fields_by_name['user_settings'].message_type = _FIELDDEF_USERTYPESETTINGS
+_FIELDDEF.fields_by_name['date_settings'].message_type = _FIELDDEF_DATETYPESETTINGS
+_FIELDDEF_TYPE.containing_type = _FIELDDEF
+_FIELDDEF_TRAITS.containing_type = _FIELDDEF
+_COMPONENTDEF.fields_by_name['state'].enum_type = _COMPONENTDEF_COMPONENTDEFSTATE
+_COMPONENTDEF.fields_by_name['create_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
+_COMPONENTDEF.fields_by_name['modify_time'].message_type = google_dot_protobuf_dot_timestamp__pb2._TIMESTAMP
+_COMPONENTDEF_COMPONENTDEFSTATE.containing_type = _COMPONENTDEF
+_ISSUETEMPLATE.fields_by_name['issue'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUE
+_ISSUETEMPLATE.fields_by_name['approval_values'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._APPROVALVALUE
+_ISSUETEMPLATE.fields_by_name['template_privacy'].enum_type = _ISSUETEMPLATE_TEMPLATEPRIVACY
+_ISSUETEMPLATE.fields_by_name['default_owner'].enum_type = _ISSUETEMPLATE_DEFAULTOWNER
+_ISSUETEMPLATE_TEMPLATEPRIVACY.containing_type = _ISSUETEMPLATE
+_ISSUETEMPLATE_DEFAULTOWNER.containing_type = _ISSUETEMPLATE
+_PROJECTCONFIG_GRIDVIEWCONFIG.containing_type = _PROJECTCONFIG
+_PROJECTCONFIG.fields_by_name['default_columns'].message_type = api_dot_v3_dot_api__proto_dot_issue__objects__pb2._ISSUESLISTCOLUMN
+_PROJECTCONFIG.fields_by_name['project_grid_config'].message_type = _PROJECTCONFIG_GRIDVIEWCONFIG
+_PROJECTMEMBER.fields_by_name['role'].enum_type = _PROJECTMEMBER_PROJECTROLE
+_PROJECTMEMBER.fields_by_name['standard_perms'].enum_type = api_dot_v3_dot_api__proto_dot_permission__objects__pb2._PERMISSION
+_PROJECTMEMBER.fields_by_name['include_in_autocomplete'].enum_type = _PROJECTMEMBER_AUTOCOMPLETEVISIBILITY
+_PROJECTMEMBER_PROJECTROLE.containing_type = _PROJECTMEMBER
+_PROJECTMEMBER_AUTOCOMPLETEVISIBILITY.containing_type = _PROJECTMEMBER
+DESCRIPTOR.message_types_by_name['Project'] = _PROJECT
+DESCRIPTOR.message_types_by_name['StatusDef'] = _STATUSDEF
+DESCRIPTOR.message_types_by_name['LabelDef'] = _LABELDEF
+DESCRIPTOR.message_types_by_name['FieldDef'] = _FIELDDEF
+DESCRIPTOR.message_types_by_name['ComponentDef'] = _COMPONENTDEF
+DESCRIPTOR.message_types_by_name['ApprovalDef'] = _APPROVALDEF
+DESCRIPTOR.message_types_by_name['ProjectSavedQuery'] = _PROJECTSAVEDQUERY
+DESCRIPTOR.message_types_by_name['IssueTemplate'] = _ISSUETEMPLATE
+DESCRIPTOR.message_types_by_name['ProjectConfig'] = _PROJECTCONFIG
+DESCRIPTOR.message_types_by_name['ProjectMember'] = _PROJECTMEMBER
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+Project = _reflection.GeneratedProtocolMessageType('Project', (_message.Message,), {
+  'DESCRIPTOR' : _PROJECT,
+  '__module__' : 'api.v3.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.Project)
+  })
+_sym_db.RegisterMessage(Project)
+
+StatusDef = _reflection.GeneratedProtocolMessageType('StatusDef', (_message.Message,), {
+  'DESCRIPTOR' : _STATUSDEF,
+  '__module__' : 'api.v3.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.StatusDef)
+  })
+_sym_db.RegisterMessage(StatusDef)
+
+LabelDef = _reflection.GeneratedProtocolMessageType('LabelDef', (_message.Message,), {
+  'DESCRIPTOR' : _LABELDEF,
+  '__module__' : 'api.v3.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.LabelDef)
+  })
+_sym_db.RegisterMessage(LabelDef)
+
+FieldDef = _reflection.GeneratedProtocolMessageType('FieldDef', (_message.Message,), {
+
+  'EnumTypeSettings' : _reflection.GeneratedProtocolMessageType('EnumTypeSettings', (_message.Message,), {
+
+    'Choice' : _reflection.GeneratedProtocolMessageType('Choice', (_message.Message,), {
+      'DESCRIPTOR' : _FIELDDEF_ENUMTYPESETTINGS_CHOICE,
+      '__module__' : 'api.v3.api_proto.project_objects_pb2'
+      # @@protoc_insertion_point(class_scope:monorail.v3.FieldDef.EnumTypeSettings.Choice)
+      })
+    ,
+    'DESCRIPTOR' : _FIELDDEF_ENUMTYPESETTINGS,
+    '__module__' : 'api.v3.api_proto.project_objects_pb2'
+    # @@protoc_insertion_point(class_scope:monorail.v3.FieldDef.EnumTypeSettings)
+    })
+  ,
+
+  'IntTypeSettings' : _reflection.GeneratedProtocolMessageType('IntTypeSettings', (_message.Message,), {
+    'DESCRIPTOR' : _FIELDDEF_INTTYPESETTINGS,
+    '__module__' : 'api.v3.api_proto.project_objects_pb2'
+    # @@protoc_insertion_point(class_scope:monorail.v3.FieldDef.IntTypeSettings)
+    })
+  ,
+
+  'StrTypeSettings' : _reflection.GeneratedProtocolMessageType('StrTypeSettings', (_message.Message,), {
+    'DESCRIPTOR' : _FIELDDEF_STRTYPESETTINGS,
+    '__module__' : 'api.v3.api_proto.project_objects_pb2'
+    # @@protoc_insertion_point(class_scope:monorail.v3.FieldDef.StrTypeSettings)
+    })
+  ,
+
+  'UserTypeSettings' : _reflection.GeneratedProtocolMessageType('UserTypeSettings', (_message.Message,), {
+    'DESCRIPTOR' : _FIELDDEF_USERTYPESETTINGS,
+    '__module__' : 'api.v3.api_proto.project_objects_pb2'
+    # @@protoc_insertion_point(class_scope:monorail.v3.FieldDef.UserTypeSettings)
+    })
+  ,
+
+  'DateTypeSettings' : _reflection.GeneratedProtocolMessageType('DateTypeSettings', (_message.Message,), {
+    'DESCRIPTOR' : _FIELDDEF_DATETYPESETTINGS,
+    '__module__' : 'api.v3.api_proto.project_objects_pb2'
+    # @@protoc_insertion_point(class_scope:monorail.v3.FieldDef.DateTypeSettings)
+    })
+  ,
+  'DESCRIPTOR' : _FIELDDEF,
+  '__module__' : 'api.v3.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.FieldDef)
+  })
+_sym_db.RegisterMessage(FieldDef)
+_sym_db.RegisterMessage(FieldDef.EnumTypeSettings)
+_sym_db.RegisterMessage(FieldDef.EnumTypeSettings.Choice)
+_sym_db.RegisterMessage(FieldDef.IntTypeSettings)
+_sym_db.RegisterMessage(FieldDef.StrTypeSettings)
+_sym_db.RegisterMessage(FieldDef.UserTypeSettings)
+_sym_db.RegisterMessage(FieldDef.DateTypeSettings)
+
+ComponentDef = _reflection.GeneratedProtocolMessageType('ComponentDef', (_message.Message,), {
+  'DESCRIPTOR' : _COMPONENTDEF,
+  '__module__' : 'api.v3.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ComponentDef)
+  })
+_sym_db.RegisterMessage(ComponentDef)
+
+ApprovalDef = _reflection.GeneratedProtocolMessageType('ApprovalDef', (_message.Message,), {
+  'DESCRIPTOR' : _APPROVALDEF,
+  '__module__' : 'api.v3.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ApprovalDef)
+  })
+_sym_db.RegisterMessage(ApprovalDef)
+
+ProjectSavedQuery = _reflection.GeneratedProtocolMessageType('ProjectSavedQuery', (_message.Message,), {
+  'DESCRIPTOR' : _PROJECTSAVEDQUERY,
+  '__module__' : 'api.v3.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ProjectSavedQuery)
+  })
+_sym_db.RegisterMessage(ProjectSavedQuery)
+
+IssueTemplate = _reflection.GeneratedProtocolMessageType('IssueTemplate', (_message.Message,), {
+  'DESCRIPTOR' : _ISSUETEMPLATE,
+  '__module__' : 'api.v3.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.IssueTemplate)
+  })
+_sym_db.RegisterMessage(IssueTemplate)
+
+ProjectConfig = _reflection.GeneratedProtocolMessageType('ProjectConfig', (_message.Message,), {
+
+  'GridViewConfig' : _reflection.GeneratedProtocolMessageType('GridViewConfig', (_message.Message,), {
+    'DESCRIPTOR' : _PROJECTCONFIG_GRIDVIEWCONFIG,
+    '__module__' : 'api.v3.api_proto.project_objects_pb2'
+    # @@protoc_insertion_point(class_scope:monorail.v3.ProjectConfig.GridViewConfig)
+    })
+  ,
+  'DESCRIPTOR' : _PROJECTCONFIG,
+  '__module__' : 'api.v3.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ProjectConfig)
+  })
+_sym_db.RegisterMessage(ProjectConfig)
+_sym_db.RegisterMessage(ProjectConfig.GridViewConfig)
+
+ProjectMember = _reflection.GeneratedProtocolMessageType('ProjectMember', (_message.Message,), {
+  'DESCRIPTOR' : _PROJECTMEMBER,
+  '__module__' : 'api.v3.api_proto.project_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ProjectMember)
+  })
+_sym_db.RegisterMessage(ProjectMember)
+
+
+DESCRIPTOR._options = None
+_PROJECT.fields_by_name['display_name']._options = None
+_PROJECT._options = None
+_STATUSDEF._options = None
+_LABELDEF._options = None
+_FIELDDEF.fields_by_name['display_name']._options = None
+_FIELDDEF.fields_by_name['type']._options = None
+_FIELDDEF.fields_by_name['admins']._options = None
+_FIELDDEF.fields_by_name['approval_parent']._options = None
+_FIELDDEF.fields_by_name['editors']._options = None
+_FIELDDEF._options = None
+_COMPONENTDEF.fields_by_name['admins']._options = None
+_COMPONENTDEF.fields_by_name['ccs']._options = None
+_COMPONENTDEF.fields_by_name['creator']._options = None
+_COMPONENTDEF.fields_by_name['modifier']._options = None
+_COMPONENTDEF.fields_by_name['create_time']._options = None
+_COMPONENTDEF.fields_by_name['modify_time']._options = None
+_COMPONENTDEF._options = None
+_APPROVALDEF.fields_by_name['display_name']._options = None
+_APPROVALDEF.fields_by_name['approvers']._options = None
+_APPROVALDEF.fields_by_name['admins']._options = None
+_APPROVALDEF._options = None
+_PROJECTSAVEDQUERY._options = None
+_ISSUETEMPLATE.fields_by_name['display_name']._options = None
+_ISSUETEMPLATE.fields_by_name['admins']._options = None
+_ISSUETEMPLATE._options = None
+_PROJECTCONFIG.fields_by_name['member_default_template']._options = None
+_PROJECTCONFIG.fields_by_name['non_members_default_template']._options = None
+_PROJECTCONFIG._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/api/v3/api_proto/projects.proto b/api/v3/api_proto/projects.proto
new file mode 100644
index 0000000..d902067
--- /dev/null
+++ b/api/v3/api_proto/projects.proto
@@ -0,0 +1,178 @@
+// Copyright 2020 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
+
+syntax = "proto3";
+
+package monorail.v3;
+
+option go_package = "api/v3/api_proto";
+
+import "google/protobuf/empty.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "api/v3/api_proto/project_objects.proto";
+
+// ***ONLY CALL rpcs WITH `status: {ALPHA|STABLE}`***
+// rpcs without `status` are not ready.
+
+// Projects service includes all methods needed for managing Projects.
+service Projects {
+  // status: NOT READY
+  // Creates a new FieldDef (custom field).
+  //
+  // Raises:
+  //   NOT_FOUND if some given users do not exist.
+  //   ALREADY_EXISTS if a field with the same name owned by the project
+  //   already exists.
+  //   INVALID_INPUT if there was a problem with the input.
+  //   PERMISSION_DENIED if the user cannot edit the project.
+  rpc CreateFieldDef (CreateFieldDefRequest) returns (FieldDef) {}
+
+  // status: ALPHA
+  // Creates a new ComponentDef.
+  //
+  // Raises:
+  //   INVALID_INPUT if the request is invalid.
+  //   ALREADY_EXISTS if the component already exists.
+  //   PERMISSION_DENIED if the user is not allowed to create a/this component.
+  //   NOT_FOUND if the parent project or a component cc or admin is not found.
+  rpc CreateComponentDef (CreateComponentDefRequest) returns (ComponentDef) {}
+
+  // status: ALPHA
+  // Deletes a ComponentDef.
+  //
+  // Raises:
+  //   INVALID_INPUT if the request is invalid.
+  //   PERMISSION_DENIED if the user is not allowed to delete a/this component.
+  //   NOT_FOUND if the component or project is not found.
+  rpc DeleteComponentDef (DeleteComponentDefRequest) returns (google.protobuf.Empty) {}
+
+  // status: NOT READY
+  // Returns all templates for specified project.
+  //
+  // Raises:
+  //   NOT_FOUND if the requested parent project is not found.
+  //   INVALID_ARGUMENT if the given `parent` is not valid.
+  rpc ListIssueTemplates (ListIssueTemplatesRequest) returns (ListIssueTemplatesResponse) {}
+
+  // status: ALPHA
+  // Returns all field defs for specified project.
+  //
+  // Raises:
+  //   NOT_FOUND if the request arent project is not found.
+  //   INVALID_ARGUMENT if the given `parent` is not valid.
+  rpc ListComponentDefs (ListComponentDefsRequest) returns (ListComponentDefsResponse) {}
+
+  // status: NOT READY
+  // Returns all projects hosted on Monorail.
+  rpc ListProjects (ListProjectsRequest) returns (ListProjectsResponse) {}
+}
+
+// Request message for CreateFieldDef method.
+// Next available tag: 3
+message CreateFieldDefRequest {
+  // The project resource where this field will be created.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {type: "api.crbug.com/Project" }];
+  // The field to create.
+  // It must have a display_name and a type with its corresponding settings.
+  FieldDef fielddef = 2 [ (google.api.field_behavior) = REQUIRED ];
+}
+
+// Request message for CreateComponentDef method.
+// Next available tag: 3
+message CreateComponentDefRequest {
+  // The project resource where this component will be created.
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {type: "api.crbug.com/Project" }];
+  // The component to create.
+  ComponentDef component_def = 2 [ (google.api.field_behavior) = REQUIRED ];
+}
+
+// Request message for DeleteComponentDef method.
+// Next available tag: 2
+message DeleteComponentDefRequest {
+  // The component to delete.
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {type: "api.crbug.com/ComponentDef"}];
+}
+
+// Request message for ListIssueTemplates
+// Next available tag: 4
+message ListIssueTemplatesRequest {
+  // The name of the project these templates belong to.
+  string parent = 1 [
+    (google.api.resource_reference) = {type: "api.crbug.com/Project"},
+    (google.api.field_behavior) = REQUIRED ];
+  // The maximum number of items to return. The service may return fewer than
+  // this value.
+  int32 page_size = 2;
+  // A page token, received from a previous `ListIssueTemplates` call.
+  // Provide this to retrieve the subsequent page.
+  // When paginating, all other parameters provided to
+  // `ListIssueTemplatesRequest` must match the call that provided the token.
+  string page_token = 3;
+}
+
+// Response message for ListIssueTemplates
+// Next available tag: 3
+message ListIssueTemplatesResponse {
+  // Templates matching the given request.
+  repeated IssueTemplate templates = 1;
+  // A token, which can be sent as `page_token` to retrieve the next page.
+  // If this field is omitted, there are no subsequent pages.
+  string next_page_token = 2;
+}
+
+// Request message for ListComponentDefs
+// Next available tag: 4
+message ListComponentDefsRequest {
+  // The name of the parent project.
+  string parent = 1 [
+    (google.api.resource_reference) = {type: "api.crbug.com/Project"},
+    (google.api.field_behavior) = REQUIRED ];
+  // The maximum number of items to return. The service may return fewer than
+  // this value.
+  int32 page_size = 2;
+  // A page token, received from a previous `ListComponentDefs` call.
+  // Provide this to retrieve the subsequent page.
+  // When paginating, all other parameters provided to
+  // `ListComponentDefsRequest` must match the call that provided the token.
+  string page_token = 3;
+}
+
+// Response message for ListComponentDefs
+// Next available tag: 3
+message ListComponentDefsResponse {
+  // Component defs matching the given request.
+  repeated ComponentDef component_defs = 1;
+  // A token which can be sent as `page_token` to retrieve the next page.
+  // If this field is omitted, there are no subsequent pages.
+  string next_page_token = 2;
+}
+
+// Request message for ListProjects
+// Next available tag: 3
+message ListProjectsRequest {
+  // The maximum number of items to return. The service may return fewer than
+  // this value.
+  int32 page_size = 1;
+  // A page token, received from a previous `ListProjects` call.
+  // Provide this to retrieve the subsequent page.
+  string page_token = 2;
+}
+
+// Response message for ListProjects
+// Next available tag: 3
+message ListProjectsResponse {
+  // Projects matching the given request.
+  repeated Project projects = 1;
+  // A token, which can be sent as `page_token` to retrieve the next page.
+  // If this field is omitted, there are no subsequent pages.
+  string next_page_token = 2;
+}
diff --git a/api/v3/api_proto/projects_pb2.py b/api/v3/api_proto/projects_pb2.py
new file mode 100644
index 0000000..0478142
--- /dev/null
+++ b/api/v3/api_proto/projects_pb2.py
@@ -0,0 +1,554 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/v3/api_proto/projects.proto
+
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
+from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
+from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
+from api.v3.api_proto import project_objects_pb2 as api_dot_v3_dot_api__proto_dot_project__objects__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/v3/api_proto/projects.proto',
+  package='monorail.v3',
+  syntax='proto3',
+  serialized_options=b'Z\020api/v3/api_proto',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n\x1f\x61pi/v3/api_proto/projects.proto\x12\x0bmonorail.v3\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&api/v3/api_proto/project_objects.proto\"t\n\x15\x43reateFieldDefRequest\x12-\n\x06parent\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15\x61pi.crbug.com/Project\x12,\n\x08\x66ielddef\x18\x02 \x01(\x0b\x32\x15.monorail.v3.FieldDefB\x03\xe0\x41\x02\"\x81\x01\n\x19\x43reateComponentDefRequest\x12-\n\x06parent\x18\x01 \x01(\tB\x1d\xe0\x41\x02\xfa\x41\x17\n\x15\x61pi.crbug.com/Project\x12\x35\n\rcomponent_def\x18\x02 \x01(\x0b\x32\x19.monorail.v3.ComponentDefB\x03\xe0\x41\x02\"M\n\x19\x44\x65leteComponentDefRequest\x12\x30\n\x04name\x18\x01 \x01(\tB\"\xe0\x41\x02\xfa\x41\x1c\n\x1a\x61pi.crbug.com/ComponentDef\"q\n\x19ListIssueTemplatesRequest\x12-\n\x06parent\x18\x01 \x01(\tB\x1d\xfa\x41\x17\n\x15\x61pi.crbug.com/Project\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"d\n\x1aListIssueTemplatesResponse\x12-\n\ttemplates\x18\x01 \x03(\x0b\x32\x1a.monorail.v3.IssueTemplate\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"p\n\x18ListComponentDefsRequest\x12-\n\x06parent\x18\x01 \x01(\tB\x1d\xfa\x41\x17\n\x15\x61pi.crbug.com/Project\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"g\n\x19ListComponentDefsResponse\x12\x31\n\x0e\x63omponent_defs\x18\x01 \x03(\x0b\x32\x19.monorail.v3.ComponentDef\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"<\n\x13ListProjectsRequest\x12\x11\n\tpage_size\x18\x01 \x01(\x05\x12\x12\n\npage_token\x18\x02 \x01(\t\"W\n\x14ListProjectsResponse\x12&\n\x08projects\x18\x01 \x03(\x0b\x32\x14.monorail.v3.Project\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xb2\x04\n\x08Projects\x12M\n\x0e\x43reateFieldDef\x12\".monorail.v3.CreateFieldDefRequest\x1a\x15.monorail.v3.FieldDef\"\x00\x12Y\n\x12\x43reateComponentDef\x12&.monorail.v3.CreateComponentDefRequest\x1a\x19.monorail.v3.ComponentDef\"\x00\x12V\n\x12\x44\x65leteComponentDef\x12&.monorail.v3.DeleteComponentDefRequest\x1a\x16.google.protobuf.Empty\"\x00\x12g\n\x12ListIssueTemplates\x12&.monorail.v3.ListIssueTemplatesRequest\x1a\'.monorail.v3.ListIssueTemplatesResponse\"\x00\x12\x64\n\x11ListComponentDefs\x12%.monorail.v3.ListComponentDefsRequest\x1a&.monorail.v3.ListComponentDefsResponse\"\x00\x12U\n\x0cListProjects\x12 .monorail.v3.ListProjectsRequest\x1a!.monorail.v3.ListProjectsResponse\"\x00\x42\x12Z\x10\x61pi/v3/api_protob\x06proto3'
+  ,
+  dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,api_dot_v3_dot_api__proto_dot_project__objects__pb2.DESCRIPTOR,])
+
+
+
+
+_CREATEFIELDDEFREQUEST = _descriptor.Descriptor(
+  name='CreateFieldDefRequest',
+  full_name='monorail.v3.CreateFieldDefRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.v3.CreateFieldDefRequest.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\027\n\025api.crbug.com/Project', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='fielddef', full_name='monorail.v3.CreateFieldDefRequest.fielddef', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=177,
+  serialized_end=293,
+)
+
+
+_CREATECOMPONENTDEFREQUEST = _descriptor.Descriptor(
+  name='CreateComponentDefRequest',
+  full_name='monorail.v3.CreateComponentDefRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.v3.CreateComponentDefRequest.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\027\n\025api.crbug.com/Project', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='component_def', full_name='monorail.v3.CreateComponentDefRequest.component_def', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=296,
+  serialized_end=425,
+)
+
+
+_DELETECOMPONENTDEFREQUEST = _descriptor.Descriptor(
+  name='DeleteComponentDefRequest',
+  full_name='monorail.v3.DeleteComponentDefRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.DeleteComponentDefRequest.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\034\n\032api.crbug.com/ComponentDef', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=427,
+  serialized_end=504,
+)
+
+
+_LISTISSUETEMPLATESREQUEST = _descriptor.Descriptor(
+  name='ListIssueTemplatesRequest',
+  full_name='monorail.v3.ListIssueTemplatesRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.v3.ListIssueTemplatesRequest.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\027\n\025api.crbug.com/Project\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_size', full_name='monorail.v3.ListIssueTemplatesRequest.page_size', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_token', full_name='monorail.v3.ListIssueTemplatesRequest.page_token', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=506,
+  serialized_end=619,
+)
+
+
+_LISTISSUETEMPLATESRESPONSE = _descriptor.Descriptor(
+  name='ListIssueTemplatesResponse',
+  full_name='monorail.v3.ListIssueTemplatesResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='templates', full_name='monorail.v3.ListIssueTemplatesResponse.templates', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='next_page_token', full_name='monorail.v3.ListIssueTemplatesResponse.next_page_token', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=621,
+  serialized_end=721,
+)
+
+
+_LISTCOMPONENTDEFSREQUEST = _descriptor.Descriptor(
+  name='ListComponentDefsRequest',
+  full_name='monorail.v3.ListComponentDefsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.v3.ListComponentDefsRequest.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\027\n\025api.crbug.com/Project\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_size', full_name='monorail.v3.ListComponentDefsRequest.page_size', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_token', full_name='monorail.v3.ListComponentDefsRequest.page_token', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=723,
+  serialized_end=835,
+)
+
+
+_LISTCOMPONENTDEFSRESPONSE = _descriptor.Descriptor(
+  name='ListComponentDefsResponse',
+  full_name='monorail.v3.ListComponentDefsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='component_defs', full_name='monorail.v3.ListComponentDefsResponse.component_defs', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='next_page_token', full_name='monorail.v3.ListComponentDefsResponse.next_page_token', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=837,
+  serialized_end=940,
+)
+
+
+_LISTPROJECTSREQUEST = _descriptor.Descriptor(
+  name='ListProjectsRequest',
+  full_name='monorail.v3.ListProjectsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='page_size', full_name='monorail.v3.ListProjectsRequest.page_size', index=0,
+      number=1, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_token', full_name='monorail.v3.ListProjectsRequest.page_token', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=942,
+  serialized_end=1002,
+)
+
+
+_LISTPROJECTSRESPONSE = _descriptor.Descriptor(
+  name='ListProjectsResponse',
+  full_name='monorail.v3.ListProjectsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='projects', full_name='monorail.v3.ListProjectsResponse.projects', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='next_page_token', full_name='monorail.v3.ListProjectsResponse.next_page_token', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1004,
+  serialized_end=1091,
+)
+
+_CREATEFIELDDEFREQUEST.fields_by_name['fielddef'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._FIELDDEF
+_CREATECOMPONENTDEFREQUEST.fields_by_name['component_def'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._COMPONENTDEF
+_LISTISSUETEMPLATESRESPONSE.fields_by_name['templates'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._ISSUETEMPLATE
+_LISTCOMPONENTDEFSRESPONSE.fields_by_name['component_defs'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._COMPONENTDEF
+_LISTPROJECTSRESPONSE.fields_by_name['projects'].message_type = api_dot_v3_dot_api__proto_dot_project__objects__pb2._PROJECT
+DESCRIPTOR.message_types_by_name['CreateFieldDefRequest'] = _CREATEFIELDDEFREQUEST
+DESCRIPTOR.message_types_by_name['CreateComponentDefRequest'] = _CREATECOMPONENTDEFREQUEST
+DESCRIPTOR.message_types_by_name['DeleteComponentDefRequest'] = _DELETECOMPONENTDEFREQUEST
+DESCRIPTOR.message_types_by_name['ListIssueTemplatesRequest'] = _LISTISSUETEMPLATESREQUEST
+DESCRIPTOR.message_types_by_name['ListIssueTemplatesResponse'] = _LISTISSUETEMPLATESRESPONSE
+DESCRIPTOR.message_types_by_name['ListComponentDefsRequest'] = _LISTCOMPONENTDEFSREQUEST
+DESCRIPTOR.message_types_by_name['ListComponentDefsResponse'] = _LISTCOMPONENTDEFSRESPONSE
+DESCRIPTOR.message_types_by_name['ListProjectsRequest'] = _LISTPROJECTSREQUEST
+DESCRIPTOR.message_types_by_name['ListProjectsResponse'] = _LISTPROJECTSRESPONSE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+CreateFieldDefRequest = _reflection.GeneratedProtocolMessageType('CreateFieldDefRequest', (_message.Message,), {
+  'DESCRIPTOR' : _CREATEFIELDDEFREQUEST,
+  '__module__' : 'api.v3.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.CreateFieldDefRequest)
+  })
+_sym_db.RegisterMessage(CreateFieldDefRequest)
+
+CreateComponentDefRequest = _reflection.GeneratedProtocolMessageType('CreateComponentDefRequest', (_message.Message,), {
+  'DESCRIPTOR' : _CREATECOMPONENTDEFREQUEST,
+  '__module__' : 'api.v3.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.CreateComponentDefRequest)
+  })
+_sym_db.RegisterMessage(CreateComponentDefRequest)
+
+DeleteComponentDefRequest = _reflection.GeneratedProtocolMessageType('DeleteComponentDefRequest', (_message.Message,), {
+  'DESCRIPTOR' : _DELETECOMPONENTDEFREQUEST,
+  '__module__' : 'api.v3.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.DeleteComponentDefRequest)
+  })
+_sym_db.RegisterMessage(DeleteComponentDefRequest)
+
+ListIssueTemplatesRequest = _reflection.GeneratedProtocolMessageType('ListIssueTemplatesRequest', (_message.Message,), {
+  'DESCRIPTOR' : _LISTISSUETEMPLATESREQUEST,
+  '__module__' : 'api.v3.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListIssueTemplatesRequest)
+  })
+_sym_db.RegisterMessage(ListIssueTemplatesRequest)
+
+ListIssueTemplatesResponse = _reflection.GeneratedProtocolMessageType('ListIssueTemplatesResponse', (_message.Message,), {
+  'DESCRIPTOR' : _LISTISSUETEMPLATESRESPONSE,
+  '__module__' : 'api.v3.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListIssueTemplatesResponse)
+  })
+_sym_db.RegisterMessage(ListIssueTemplatesResponse)
+
+ListComponentDefsRequest = _reflection.GeneratedProtocolMessageType('ListComponentDefsRequest', (_message.Message,), {
+  'DESCRIPTOR' : _LISTCOMPONENTDEFSREQUEST,
+  '__module__' : 'api.v3.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListComponentDefsRequest)
+  })
+_sym_db.RegisterMessage(ListComponentDefsRequest)
+
+ListComponentDefsResponse = _reflection.GeneratedProtocolMessageType('ListComponentDefsResponse', (_message.Message,), {
+  'DESCRIPTOR' : _LISTCOMPONENTDEFSRESPONSE,
+  '__module__' : 'api.v3.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListComponentDefsResponse)
+  })
+_sym_db.RegisterMessage(ListComponentDefsResponse)
+
+ListProjectsRequest = _reflection.GeneratedProtocolMessageType('ListProjectsRequest', (_message.Message,), {
+  'DESCRIPTOR' : _LISTPROJECTSREQUEST,
+  '__module__' : 'api.v3.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListProjectsRequest)
+  })
+_sym_db.RegisterMessage(ListProjectsRequest)
+
+ListProjectsResponse = _reflection.GeneratedProtocolMessageType('ListProjectsResponse', (_message.Message,), {
+  'DESCRIPTOR' : _LISTPROJECTSRESPONSE,
+  '__module__' : 'api.v3.api_proto.projects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListProjectsResponse)
+  })
+_sym_db.RegisterMessage(ListProjectsResponse)
+
+
+DESCRIPTOR._options = None
+_CREATEFIELDDEFREQUEST.fields_by_name['parent']._options = None
+_CREATEFIELDDEFREQUEST.fields_by_name['fielddef']._options = None
+_CREATECOMPONENTDEFREQUEST.fields_by_name['parent']._options = None
+_CREATECOMPONENTDEFREQUEST.fields_by_name['component_def']._options = None
+_DELETECOMPONENTDEFREQUEST.fields_by_name['name']._options = None
+_LISTISSUETEMPLATESREQUEST.fields_by_name['parent']._options = None
+_LISTCOMPONENTDEFSREQUEST.fields_by_name['parent']._options = None
+
+_PROJECTS = _descriptor.ServiceDescriptor(
+  name='Projects',
+  full_name='monorail.v3.Projects',
+  file=DESCRIPTOR,
+  index=0,
+  serialized_options=None,
+  create_key=_descriptor._internal_create_key,
+  serialized_start=1094,
+  serialized_end=1656,
+  methods=[
+  _descriptor.MethodDescriptor(
+    name='CreateFieldDef',
+    full_name='monorail.v3.Projects.CreateFieldDef',
+    index=0,
+    containing_service=None,
+    input_type=_CREATEFIELDDEFREQUEST,
+    output_type=api_dot_v3_dot_api__proto_dot_project__objects__pb2._FIELDDEF,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='CreateComponentDef',
+    full_name='monorail.v3.Projects.CreateComponentDef',
+    index=1,
+    containing_service=None,
+    input_type=_CREATECOMPONENTDEFREQUEST,
+    output_type=api_dot_v3_dot_api__proto_dot_project__objects__pb2._COMPONENTDEF,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='DeleteComponentDef',
+    full_name='monorail.v3.Projects.DeleteComponentDef',
+    index=2,
+    containing_service=None,
+    input_type=_DELETECOMPONENTDEFREQUEST,
+    output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListIssueTemplates',
+    full_name='monorail.v3.Projects.ListIssueTemplates',
+    index=3,
+    containing_service=None,
+    input_type=_LISTISSUETEMPLATESREQUEST,
+    output_type=_LISTISSUETEMPLATESRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListComponentDefs',
+    full_name='monorail.v3.Projects.ListComponentDefs',
+    index=4,
+    containing_service=None,
+    input_type=_LISTCOMPONENTDEFSREQUEST,
+    output_type=_LISTCOMPONENTDEFSRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListProjects',
+    full_name='monorail.v3.Projects.ListProjects',
+    index=5,
+    containing_service=None,
+    input_type=_LISTPROJECTSREQUEST,
+    output_type=_LISTPROJECTSRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+])
+_sym_db.RegisterServiceDescriptor(_PROJECTS)
+
+DESCRIPTOR.services_by_name['Projects'] = _PROJECTS
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/v3/api_proto/projects_prpc_pb2.py b/api/v3/api_proto/projects_prpc_pb2.py
new file mode 100644
index 0000000..326f69d
--- /dev/null
+++ b/api/v3/api_proto/projects_prpc_pb2.py
@@ -0,0 +1,889 @@
+# Generated by the pRPC protocol buffer compiler plugin.  DO NOT EDIT!
+# source: api/v3/api_proto/projects.proto
+
+import base64
+import zlib
+
+from google.protobuf import descriptor_pb2
+
+# Includes description of the api/v3/api_proto/projects.proto and all of its transitive
+# dependencies. Includes source code info.
+FILE_DESCRIPTOR_SET = descriptor_pb2.FileDescriptorSet()
+FILE_DESCRIPTOR_SET.ParseFromString(zlib.decompress(base64.b64decode(
+    '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'
+    'd+3sj/kzOUzH9mdyOGrE7cEevVT//zc7BrM=')))
+_INDEX = {
+    f.name: {
+      'descriptor': f,
+      'services': {s.name: s for s in f.service},
+    }
+    for f in FILE_DESCRIPTOR_SET.file
+}
+
+
+ProjectsServiceDescription = {
+  'file_descriptor_set': FILE_DESCRIPTOR_SET,
+  'file_descriptor': _INDEX[u'api/v3/api_proto/projects.proto']['descriptor'],
+  'service_descriptor': _INDEX[u'api/v3/api_proto/projects.proto']['services'][u'Projects'],
+}
diff --git a/api/v3/api_proto/user_objects.proto b/api/v3/api_proto/user_objects.proto
new file mode 100644
index 0000000..958efbc
--- /dev/null
+++ b/api/v3/api_proto/user_objects.proto
@@ -0,0 +1,183 @@
+// Copyright 2020 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
+
+// This file defines protobufs for users and related business
+// objects, e.g., users, user preferences.
+
+syntax = "proto3";
+
+package monorail.v3;
+
+option go_package = "api/v3/api_proto";
+
+import "google/api/resource.proto";
+import "google/api/field_behavior.proto";
+
+// User represents a user of the Monorail site.
+// Next available tag: 5
+message User {
+  option (google.api.resource) = {
+    type: "api.crbug.com/User"
+    pattern: "users/{user_id}"
+  };
+  // Resource name of the user.
+  // The API will always return User names with format: users/<user_id>.
+  // However the API will accept User names with formats: users/<user_id> or users/<email>.
+  // To fetch the display_name for any users/<user_id> returned by the API,
+  // you can call {Batch}GetUser{s}.
+  // We represent deleted users within Monorail with `users/1` or `users/2103649657`.
+  string name = 1;
+  // User display_name to show other users using the site.
+  // By default this is the obscured or un-obscured email.
+  string display_name = 2;
+  // Obscured or un-obscured user email or empty if this represents
+  // a deleted user.
+  string email = 4 [ (google.api.field_behavior) = OUTPUT_ONLY ];
+  // User-written indication of their availability or working hours.
+  string availability_message = 3;
+}
+
+
+// UserSettings represents preferences and account settings of a User.
+// Next available tag: 8
+message UserSettings {
+  option (google.api.resource) = {
+    type: "api.crbug.com/UserSettings"
+    pattern: "usersettings/{user_id}"
+  };
+
+  // Potential roles of a user.
+  // Next available tag: 3
+  enum SiteRole {
+    // Default value. This value is unused.
+    SITE_ROLE_UNSPECIFIED = 0;
+    // Normal site user with no special site-wide extra permissions.
+    NORMAL = 1;
+    // Site-wide admin role.
+    ADMIN = 2;
+  }
+
+  // The access the user has to the site.
+  // Next available tag: 3
+  message SiteAccess {
+    // Potential status of a user's access to the site.
+    // Next available tag: 3
+    enum Status {
+      // Default value. This value is unused.
+      STATUS_UNSPECIFIED = 0;
+      // The user has access to the site.
+      FULL_ACCESS = 1;
+      // The user is banned from the site.
+      BANNED = 2;
+    }
+
+    // The status of the user's access to the site.
+    Status status = 1;
+    // An explanation for the value of `status`.
+    string reason = 2;
+  }
+
+  // Trait options for notifications the user receives.
+  // Next available tag: 6;
+  enum NotificationTraits {
+    // Default value. This value is unused.
+    NOTIFICATION_TRAITS_UNSPECIFIED = 0;
+    // Send change notifications for issues where user is owner or cc.
+    NOTIFY_ON_OWNED_OR_CC_ISSUE_CHANGES = 1;
+    // Send change notifications for issues the user has starred.
+    NOTIFY_ON_STARRED_ISSUE_CHANGES = 2;
+    // Send date-type field notifications for issues the user has starred.
+    // See monorail/doc/userguide/email.md#why-did-i-get-a-follow_up-email-notification.
+    NOTIFY_ON_STARRED_NOTIFY_DATES = 3;
+    // Email subject lines should be compact.
+    COMPACT_SUBJECT_LINE = 4;
+    // Include a button link to the issue, in Gmail.
+    GMAIL_INCLUDE_ISSUE_LINK_BUTTON = 5;
+  }
+
+  // Privacy trait options for the user.
+  // Next available tag: 2
+  enum PrivacyTraits {
+    // Default value. This value is unused.
+    PRIVACY_TRAITS_UNSPECIFIED = 0;
+    // Obscure the user's email from non-project members throughout the site.
+    OBSCURE_EMAIL = 1;
+  }
+
+  // Site interaction trait options for the user.
+  // Next available tag: 3
+  enum SiteInteractionTraits {
+    // Default value. This value is unused.
+    SITE_INTERACTION_TRAITS_UNSPECIFIED = 0;
+    // Add 'Restrict-View-Google' labels to new issues the user reports.
+    // Issues will only be visible to the user (issue reporter)
+    // and users with the `Google` permission.
+    REPORT_RESTRICT_VIEW_GOOGLE_ISSUES = 1;
+    // When viewing public issues, show a banner to remind the user not
+    // to post sensitive information.
+    PUBLIC_ISSUE_BANNER = 2;
+  }
+
+  // Resource name of the user that has these settings.
+  string name = 1 [ (google.api.resource_reference) = {type: "api.crbug.com/UserSettings"} ];
+  // The global site role for the user.
+  SiteRole site_role = 2 [ (google.api.field_behavior) = OUTPUT_ONLY ];
+  // Resource name of linked secondary users.
+  repeated string linked_secondary_users = 3 [
+      (google.api.resource_reference) = {type: "api.crbug.com/User"},
+      (google.api.field_behavior) = OUTPUT_ONLY ];
+  // The user's access to the site.
+  SiteAccess site_access = 4 [ (google.api.field_behavior) = OUTPUT_ONLY ];
+  // Notification trait preferences of the user.
+  repeated NotificationTraits notification_traits = 5;
+  // Privacy trait preferences of the user.
+  repeated PrivacyTraits privacy_traits = 6;
+  // Site interaction trait preferences of the user.
+  repeated SiteInteractionTraits site_interaction_traits = 7;
+}
+
+// Defines saved queries that belong to a user.
+//
+// Next available tag: 6
+message UserSavedQuery {
+  option (google.api.resource) = {
+    type: "api.crbug.com/UserSavedQuery"
+    pattern: "users/{user_id}/savedQueries/{saved_query_id}"
+  };
+
+  // Resource name of this saved query.
+  string name = 1;
+  // Display name of this saved query, ie 'open issues'.
+  string display_name = 2;
+  // Search term of this saved query.
+  string query = 3;
+  // List of projects this query can be searched in.
+  repeated string projects = 4 [
+      (google.api.resource_reference) = { type: "api.crbug.com/Project" }
+  ];
+  // Subscription mode of this saved query
+  // Next available tag: 3
+  enum SubscriptionMode {
+    // Default API value. This value is unused.
+    SUBSCRIPTION_MODE_UNSPECIFIED = 0;
+    // Do not subscribe to notifications.
+    NO_NOTIFICATION = 1;
+    // Subscribe to notifications.
+    IMMEDIATE_NOTIFICATION = 2;
+  }
+  SubscriptionMode subscription_mode = 5;
+}
+
+// A project starred by a user.
+//
+// Next available tag: 2
+message ProjectStar {
+  option (google.api.resource) = {
+    type: "api.crbug.com/ProjectStar"
+    pattern: "users/{user_id}/projectStars/{project_name}"
+  };
+  // Resource name of the ProjectStar.
+  string name = 1;
+}
\ No newline at end of file
diff --git a/api/v3/api_proto/user_objects_pb2.py b/api/v3/api_proto/user_objects_pb2.py
new file mode 100644
index 0000000..2c68f09
--- /dev/null
+++ b/api/v3/api_proto/user_objects_pb2.py
@@ -0,0 +1,551 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/v3/api_proto/user_objects.proto
+
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
+from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/v3/api_proto/user_objects.proto',
+  package='monorail.v3',
+  syntax='proto3',
+  serialized_options=b'Z\020api/v3/api_proto',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n#api/v3/api_proto/user_objects.proto\x12\x0bmonorail.v3\x1a\x19google/api/resource.proto\x1a\x1fgoogle/api/field_behavior.proto\"\x86\x01\n\x04User\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x12\n\x05\x65mail\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x1c\n\x14\x61vailability_message\x18\x03 \x01(\t:(\xea\x41%\n\x12\x61pi.crbug.com/User\x12\x0fusers/{user_id}\"\x9a\t\n\x0cUserSettings\x12-\n\x04name\x18\x01 \x01(\tB\x1f\xfa\x41\x1c\n\x1a\x61pi.crbug.com/UserSettings\x12:\n\tsite_role\x18\x02 \x01(\x0e\x32\".monorail.v3.UserSettings.SiteRoleB\x03\xe0\x41\x03\x12:\n\x16linked_secondary_users\x18\x03 \x03(\tB\x1a\xfa\x41\x14\n\x12\x61pi.crbug.com/User\xe0\x41\x03\x12>\n\x0bsite_access\x18\x04 \x01(\x0b\x32$.monorail.v3.UserSettings.SiteAccessB\x03\xe0\x41\x03\x12I\n\x13notification_traits\x18\x05 \x03(\x0e\x32,.monorail.v3.UserSettings.NotificationTraits\x12?\n\x0eprivacy_traits\x18\x06 \x03(\x0e\x32\'.monorail.v3.UserSettings.PrivacyTraits\x12P\n\x17site_interaction_traits\x18\x07 \x03(\x0e\x32/.monorail.v3.UserSettings.SiteInteractionTraits\x1a\x98\x01\n\nSiteAccess\x12;\n\x06status\x18\x01 \x01(\x0e\x32+.monorail.v3.UserSettings.SiteAccess.Status\x12\x0e\n\x06reason\x18\x02 \x01(\t\"=\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x46ULL_ACCESS\x10\x01\x12\n\n\x06\x42\x41NNED\x10\x02\"<\n\x08SiteRole\x12\x19\n\x15SITE_ROLE_UNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\t\n\x05\x41\x44MIN\x10\x02\"\xea\x01\n\x12NotificationTraits\x12#\n\x1fNOTIFICATION_TRAITS_UNSPECIFIED\x10\x00\x12\'\n#NOTIFY_ON_OWNED_OR_CC_ISSUE_CHANGES\x10\x01\x12#\n\x1fNOTIFY_ON_STARRED_ISSUE_CHANGES\x10\x02\x12\"\n\x1eNOTIFY_ON_STARRED_NOTIFY_DATES\x10\x03\x12\x18\n\x14\x43OMPACT_SUBJECT_LINE\x10\x04\x12#\n\x1fGMAIL_INCLUDE_ISSUE_LINK_BUTTON\x10\x05\"B\n\rPrivacyTraits\x12\x1e\n\x1aPRIVACY_TRAITS_UNSPECIFIED\x10\x00\x12\x11\n\rOBSCURE_EMAIL\x10\x01\"\x81\x01\n\x15SiteInteractionTraits\x12\'\n#SITE_INTERACTION_TRAITS_UNSPECIFIED\x10\x00\x12&\n\"REPORT_RESTRICT_VIEW_GOOGLE_ISSUES\x10\x01\x12\x17\n\x13PUBLIC_ISSUE_BANNER\x10\x02:7\xea\x41\x34\n\x1a\x61pi.crbug.com/UserSettings\x12\x16usersettings/{user_id}\"\xf4\x02\n\x0eUserSavedQuery\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\r\n\x05query\x18\x03 \x01(\t\x12,\n\x08projects\x18\x04 \x03(\tB\x1a\xfa\x41\x17\n\x15\x61pi.crbug.com/Project\x12G\n\x11subscription_mode\x18\x05 \x01(\x0e\x32,.monorail.v3.UserSavedQuery.SubscriptionMode\"f\n\x10SubscriptionMode\x12!\n\x1dSUBSCRIPTION_MODE_UNSPECIFIED\x10\x00\x12\x13\n\x0fNO_NOTIFICATION\x10\x01\x12\x1a\n\x16IMMEDIATE_NOTIFICATION\x10\x02:P\xea\x41M\n\x1c\x61pi.crbug.com/UserSavedQuery\x12-users/{user_id}/savedQueries/{saved_query_id}\"h\n\x0bProjectStar\x12\x0c\n\x04name\x18\x01 \x01(\t:K\xea\x41H\n\x19\x61pi.crbug.com/ProjectStar\x12+users/{user_id}/projectStars/{project_name}B\x12Z\x10\x61pi/v3/api_protob\x06proto3'
+  ,
+  dependencies=[google_dot_api_dot_resource__pb2.DESCRIPTOR,google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,])
+
+
+
+_USERSETTINGS_SITEACCESS_STATUS = _descriptor.EnumDescriptor(
+  name='Status',
+  full_name='monorail.v3.UserSettings.SiteAccess.Status',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='STATUS_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='FULL_ACCESS', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='BANNED', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=811,
+  serialized_end=872,
+)
+_sym_db.RegisterEnumDescriptor(_USERSETTINGS_SITEACCESS_STATUS)
+
+_USERSETTINGS_SITEROLE = _descriptor.EnumDescriptor(
+  name='SiteRole',
+  full_name='monorail.v3.UserSettings.SiteRole',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='SITE_ROLE_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NORMAL', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='ADMIN', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=874,
+  serialized_end=934,
+)
+_sym_db.RegisterEnumDescriptor(_USERSETTINGS_SITEROLE)
+
+_USERSETTINGS_NOTIFICATIONTRAITS = _descriptor.EnumDescriptor(
+  name='NotificationTraits',
+  full_name='monorail.v3.UserSettings.NotificationTraits',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='NOTIFICATION_TRAITS_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NOTIFY_ON_OWNED_OR_CC_ISSUE_CHANGES', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NOTIFY_ON_STARRED_ISSUE_CHANGES', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NOTIFY_ON_STARRED_NOTIFY_DATES', index=3, number=3,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='COMPACT_SUBJECT_LINE', index=4, number=4,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='GMAIL_INCLUDE_ISSUE_LINK_BUTTON', index=5, number=5,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=937,
+  serialized_end=1171,
+)
+_sym_db.RegisterEnumDescriptor(_USERSETTINGS_NOTIFICATIONTRAITS)
+
+_USERSETTINGS_PRIVACYTRAITS = _descriptor.EnumDescriptor(
+  name='PrivacyTraits',
+  full_name='monorail.v3.UserSettings.PrivacyTraits',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='PRIVACY_TRAITS_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='OBSCURE_EMAIL', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=1173,
+  serialized_end=1239,
+)
+_sym_db.RegisterEnumDescriptor(_USERSETTINGS_PRIVACYTRAITS)
+
+_USERSETTINGS_SITEINTERACTIONTRAITS = _descriptor.EnumDescriptor(
+  name='SiteInteractionTraits',
+  full_name='monorail.v3.UserSettings.SiteInteractionTraits',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='SITE_INTERACTION_TRAITS_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='REPORT_RESTRICT_VIEW_GOOGLE_ISSUES', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='PUBLIC_ISSUE_BANNER', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=1242,
+  serialized_end=1371,
+)
+_sym_db.RegisterEnumDescriptor(_USERSETTINGS_SITEINTERACTIONTRAITS)
+
+_USERSAVEDQUERY_SUBSCRIPTIONMODE = _descriptor.EnumDescriptor(
+  name='SubscriptionMode',
+  full_name='monorail.v3.UserSavedQuery.SubscriptionMode',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='SUBSCRIPTION_MODE_UNSPECIFIED', index=0, number=0,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='NO_NOTIFICATION', index=1, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='IMMEDIATE_NOTIFICATION', index=2, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=1619,
+  serialized_end=1721,
+)
+_sym_db.RegisterEnumDescriptor(_USERSAVEDQUERY_SUBSCRIPTIONMODE)
+
+
+_USER = _descriptor.Descriptor(
+  name='User',
+  full_name='monorail.v3.User',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.User.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='display_name', full_name='monorail.v3.User.display_name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='email', full_name='monorail.v3.User.email', index=2,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='availability_message', full_name='monorail.v3.User.availability_message', index=3,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=b'\352A%\n\022api.crbug.com/User\022\017users/{user_id}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=113,
+  serialized_end=247,
+)
+
+
+_USERSETTINGS_SITEACCESS = _descriptor.Descriptor(
+  name='SiteAccess',
+  full_name='monorail.v3.UserSettings.SiteAccess',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='status', full_name='monorail.v3.UserSettings.SiteAccess.status', index=0,
+      number=1, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='reason', full_name='monorail.v3.UserSettings.SiteAccess.reason', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _USERSETTINGS_SITEACCESS_STATUS,
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=720,
+  serialized_end=872,
+)
+
+_USERSETTINGS = _descriptor.Descriptor(
+  name='UserSettings',
+  full_name='monorail.v3.UserSettings',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.UserSettings.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\034\n\032api.crbug.com/UserSettings', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='site_role', full_name='monorail.v3.UserSettings.site_role', index=1,
+      number=2, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='linked_secondary_users', full_name='monorail.v3.UserSettings.linked_secondary_users', index=2,
+      number=3, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='site_access', full_name='monorail.v3.UserSettings.site_access', index=3,
+      number=4, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\003', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='notification_traits', full_name='monorail.v3.UserSettings.notification_traits', index=4,
+      number=5, type=14, cpp_type=8, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='privacy_traits', full_name='monorail.v3.UserSettings.privacy_traits', index=5,
+      number=6, type=14, cpp_type=8, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='site_interaction_traits', full_name='monorail.v3.UserSettings.site_interaction_traits', index=6,
+      number=7, type=14, cpp_type=8, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[_USERSETTINGS_SITEACCESS, ],
+  enum_types=[
+    _USERSETTINGS_SITEROLE,
+    _USERSETTINGS_NOTIFICATIONTRAITS,
+    _USERSETTINGS_PRIVACYTRAITS,
+    _USERSETTINGS_SITEINTERACTIONTRAITS,
+  ],
+  serialized_options=b'\352A4\n\032api.crbug.com/UserSettings\022\026usersettings/{user_id}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=250,
+  serialized_end=1428,
+)
+
+
+_USERSAVEDQUERY = _descriptor.Descriptor(
+  name='UserSavedQuery',
+  full_name='monorail.v3.UserSavedQuery',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.UserSavedQuery.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='display_name', full_name='monorail.v3.UserSavedQuery.display_name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='query', full_name='monorail.v3.UserSavedQuery.query', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='projects', full_name='monorail.v3.UserSavedQuery.projects', index=3,
+      number=4, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\027\n\025api.crbug.com/Project', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='subscription_mode', full_name='monorail.v3.UserSavedQuery.subscription_mode', index=4,
+      number=5, type=14, cpp_type=8, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _USERSAVEDQUERY_SUBSCRIPTIONMODE,
+  ],
+  serialized_options=b'\352AM\n\034api.crbug.com/UserSavedQuery\022-users/{user_id}/savedQueries/{saved_query_id}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1431,
+  serialized_end=1803,
+)
+
+
+_PROJECTSTAR = _descriptor.Descriptor(
+  name='ProjectStar',
+  full_name='monorail.v3.ProjectStar',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.ProjectStar.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=b'\352AH\n\031api.crbug.com/ProjectStar\022+users/{user_id}/projectStars/{project_name}',
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=1805,
+  serialized_end=1909,
+)
+
+_USERSETTINGS_SITEACCESS.fields_by_name['status'].enum_type = _USERSETTINGS_SITEACCESS_STATUS
+_USERSETTINGS_SITEACCESS.containing_type = _USERSETTINGS
+_USERSETTINGS_SITEACCESS_STATUS.containing_type = _USERSETTINGS_SITEACCESS
+_USERSETTINGS.fields_by_name['site_role'].enum_type = _USERSETTINGS_SITEROLE
+_USERSETTINGS.fields_by_name['site_access'].message_type = _USERSETTINGS_SITEACCESS
+_USERSETTINGS.fields_by_name['notification_traits'].enum_type = _USERSETTINGS_NOTIFICATIONTRAITS
+_USERSETTINGS.fields_by_name['privacy_traits'].enum_type = _USERSETTINGS_PRIVACYTRAITS
+_USERSETTINGS.fields_by_name['site_interaction_traits'].enum_type = _USERSETTINGS_SITEINTERACTIONTRAITS
+_USERSETTINGS_SITEROLE.containing_type = _USERSETTINGS
+_USERSETTINGS_NOTIFICATIONTRAITS.containing_type = _USERSETTINGS
+_USERSETTINGS_PRIVACYTRAITS.containing_type = _USERSETTINGS
+_USERSETTINGS_SITEINTERACTIONTRAITS.containing_type = _USERSETTINGS
+_USERSAVEDQUERY.fields_by_name['subscription_mode'].enum_type = _USERSAVEDQUERY_SUBSCRIPTIONMODE
+_USERSAVEDQUERY_SUBSCRIPTIONMODE.containing_type = _USERSAVEDQUERY
+DESCRIPTOR.message_types_by_name['User'] = _USER
+DESCRIPTOR.message_types_by_name['UserSettings'] = _USERSETTINGS
+DESCRIPTOR.message_types_by_name['UserSavedQuery'] = _USERSAVEDQUERY
+DESCRIPTOR.message_types_by_name['ProjectStar'] = _PROJECTSTAR
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+User = _reflection.GeneratedProtocolMessageType('User', (_message.Message,), {
+  'DESCRIPTOR' : _USER,
+  '__module__' : 'api.v3.api_proto.user_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.User)
+  })
+_sym_db.RegisterMessage(User)
+
+UserSettings = _reflection.GeneratedProtocolMessageType('UserSettings', (_message.Message,), {
+
+  'SiteAccess' : _reflection.GeneratedProtocolMessageType('SiteAccess', (_message.Message,), {
+    'DESCRIPTOR' : _USERSETTINGS_SITEACCESS,
+    '__module__' : 'api.v3.api_proto.user_objects_pb2'
+    # @@protoc_insertion_point(class_scope:monorail.v3.UserSettings.SiteAccess)
+    })
+  ,
+  'DESCRIPTOR' : _USERSETTINGS,
+  '__module__' : 'api.v3.api_proto.user_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.UserSettings)
+  })
+_sym_db.RegisterMessage(UserSettings)
+_sym_db.RegisterMessage(UserSettings.SiteAccess)
+
+UserSavedQuery = _reflection.GeneratedProtocolMessageType('UserSavedQuery', (_message.Message,), {
+  'DESCRIPTOR' : _USERSAVEDQUERY,
+  '__module__' : 'api.v3.api_proto.user_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.UserSavedQuery)
+  })
+_sym_db.RegisterMessage(UserSavedQuery)
+
+ProjectStar = _reflection.GeneratedProtocolMessageType('ProjectStar', (_message.Message,), {
+  'DESCRIPTOR' : _PROJECTSTAR,
+  '__module__' : 'api.v3.api_proto.user_objects_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ProjectStar)
+  })
+_sym_db.RegisterMessage(ProjectStar)
+
+
+DESCRIPTOR._options = None
+_USER.fields_by_name['email']._options = None
+_USER._options = None
+_USERSETTINGS.fields_by_name['name']._options = None
+_USERSETTINGS.fields_by_name['site_role']._options = None
+_USERSETTINGS.fields_by_name['linked_secondary_users']._options = None
+_USERSETTINGS.fields_by_name['site_access']._options = None
+_USERSETTINGS._options = None
+_USERSAVEDQUERY.fields_by_name['projects']._options = None
+_USERSAVEDQUERY._options = None
+_PROJECTSTAR._options = None
+# @@protoc_insertion_point(module_scope)
diff --git a/api/v3/api_proto/users.proto b/api/v3/api_proto/users.proto
new file mode 100644
index 0000000..7d8aa48
--- /dev/null
+++ b/api/v3/api_proto/users.proto
@@ -0,0 +1,161 @@
+// Copyright 2020 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.
+
+syntax = "proto3";
+
+package monorail.v3;
+
+option go_package = "api/v3/api_proto";
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "api/v3/api_proto/user_objects.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+// ***ONLY CALL rpcs WITH `status: {ALPHA|STABLE}`***
+// rpcs without `status` are not ready.
+
+// Users service includes all methods needed for managing Users.
+service Users {
+  // status: ALPHA
+  // Returns the requested User.
+  //
+  // Raises:
+  //   NOT_FOUND is the user is not found.
+  //   INVALID_ARGUMENT if the `name` is invalid.
+  rpc GetUser (GetUserRequest) returns (User) {}
+
+  // status: ALPHA
+  // Returns all of the requested Users.
+  //
+  // Raises:
+  //   NOT_FOUND if any users are not found.
+  //   INVALID_ARGUMENT if any `names` are invalid.
+  rpc BatchGetUsers (BatchGetUsersRequest) returns (BatchGetUsersResponse) {}
+
+  // status: NOT READY
+  // Updates a User.
+  //
+  // Raises:
+  //   NOT_FOUND if the user is not found.
+  //   PERMISSION_DENIED if the requester is not allowed to update the user.
+  //   INVALID_ARGUMENT if required fields are missing or fields are invalid.
+  rpc UpdateUser (UpdateUserRequest) returns (User) {}
+
+  // status: NOT READY
+  // Stars a given project for the requestor.
+  //
+  // Raises:
+  //   NOT_FOUND if the requested project is not found.
+  //   INVALID_ARGUMENT if the given `project` is not valid.
+  rpc StarProject (StarProjectRequest) returns (ProjectStar) {}
+
+  // status: NOT READY
+  // Unstars a given project for the requestor.
+  //
+  // Raises:
+  //   NOT_FOUND if the requested project is not found.
+  //   INVALID_ARGUMENT if the given `project` is not valid.
+  rpc UnStarProject (UnStarProjectRequest) returns (google.protobuf.Empty) {}
+
+  // status: NOT READY
+  // Lists all of a user's starred projects.
+  //
+  // Raises:
+  //   NOT_FOUND if the requested user is not found.
+  //   INVALID_ARGUMENT if the given `parent` is not valid.
+  rpc ListProjectStars (ListProjectStarsRequest) returns (ListProjectStarsResponse) {}
+}
+
+
+// The request message for Users.GetUser.
+// Next available tag: 2
+message GetUserRequest {
+  // The name of the user to request.
+  string name = 1 [
+      (google.api.resource_reference) = {type: "api.crbug.com/User"},
+      (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// The request message for Users.BatchGetUsers.
+// Next available tag: 2
+message BatchGetUsersRequest {
+  // The name of the users to request. At most 100 may be requested.
+  repeated string names = 1 [
+      (google.api.resource_reference) = {type: "api.crbug.com/User"},
+      (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// The response message for Users.BatchGetUsers.
+// Next available tag: 2
+message BatchGetUsersResponse {
+  // The users that were requested.
+  repeated User users = 1;
+}
+
+
+// The request message for Users.UpdateUser.
+// Next available tag: 3
+message UpdateUserRequest {
+  // The user's `name` field is used to identify the user to be updated.
+  User user = 1 [
+      (google.api.field_behavior) = REQUIRED,
+      (google.api.resource_reference) = {type: "api.crbug.com/User"} ];
+  // The list of fields to be updated.
+  google.protobuf.FieldMask update_mask = 2 [ (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// The request message for Users.StarProject.
+// Next available tag: 2
+message StarProjectRequest {
+  // The resource name for the Project to star.
+  string project = 1 [
+      (google.api.resource_reference) = {type: "api.crbug.com/Project"},
+      (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// The request message for Users.UnStarProject.
+// Next available tag: 2
+message UnStarProjectRequest {
+  // The resource name for the Project to unstar.
+  string project = 1 [
+      (google.api.resource_reference) = {type: "api.crbug.com/Project"},
+      (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// The request message for Users.ListProjectStars.
+// Next available tag: 4
+message ListProjectStarsRequest {
+  // The resource name for the user having stars listed.
+  string parent = 1 [
+      (google.api.resource_reference) = {type: "api.crbug.com/User"},
+      (google.api.field_behavior) = REQUIRED ];
+  // The maximum number of items to return. The service may return fewer than
+  // this value.
+  // If unspecified, at most 1000 items will be returned.
+  int32 page_size = 2;
+  // A page token, received from a previous `ListProjectStars` call.
+  // Provide this to retrieve the subsequent page.
+  //
+  // When paginating, all other parameters provided to `ListProjectStars` must
+  // match the call that provided the page token.
+  string page_token = 3;
+}
+
+
+// The response message for Users.ListProjectStars.
+// Next available tag: 3
+message ListProjectStarsResponse {
+  // Data for each starred project.
+  repeated ProjectStar project_stars = 1;
+  // A token, which can be sent as `page_token` to retrieve the next page.
+  // If this field is omitted, there are no subsequent pages.
+  string next_page_token = 2;
+}
diff --git a/api/v3/api_proto/users_pb2.py b/api/v3/api_proto/users_pb2.py
new file mode 100644
index 0000000..f08b494
--- /dev/null
+++ b/api/v3/api_proto/users_pb2.py
@@ -0,0 +1,472 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api/v3/api_proto/users.proto
+
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
+from google.api import resource_pb2 as google_dot_api_dot_resource__pb2
+from api.v3.api_proto import user_objects_pb2 as api_dot_v3_dot_api__proto_dot_user__objects__pb2
+from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
+from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api/v3/api_proto/users.proto',
+  package='monorail.v3',
+  syntax='proto3',
+  serialized_options=b'Z\020api/v3/api_proto',
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n\x1c\x61pi/v3/api_proto/users.proto\x12\x0bmonorail.v3\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#api/v3/api_proto/user_objects.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\":\n\x0eGetUserRequest\x12(\n\x04name\x18\x01 \x01(\tB\x1a\xfa\x41\x14\n\x12\x61pi.crbug.com/User\xe0\x41\x02\"A\n\x14\x42\x61tchGetUsersRequest\x12)\n\x05names\x18\x01 \x03(\tB\x1a\xfa\x41\x14\n\x12\x61pi.crbug.com/User\xe0\x41\x02\"9\n\x15\x42\x61tchGetUsersResponse\x12 \n\x05users\x18\x01 \x03(\x0b\x32\x11.monorail.v3.User\"\x86\x01\n\x11UpdateUserRequest\x12;\n\x04user\x18\x01 \x01(\x0b\x32\x11.monorail.v3.UserB\x1a\xe0\x41\x02\xfa\x41\x14\n\x12\x61pi.crbug.com/User\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"D\n\x12StarProjectRequest\x12.\n\x07project\x18\x01 \x01(\tB\x1d\xfa\x41\x17\n\x15\x61pi.crbug.com/Project\xe0\x41\x02\"F\n\x14UnStarProjectRequest\x12.\n\x07project\x18\x01 \x01(\tB\x1d\xfa\x41\x17\n\x15\x61pi.crbug.com/Project\xe0\x41\x02\"l\n\x17ListProjectStarsRequest\x12*\n\x06parent\x18\x01 \x01(\tB\x1a\xfa\x41\x14\n\x12\x61pi.crbug.com/User\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"d\n\x18ListProjectStarsResponse\x12/\n\rproject_stars\x18\x01 \x03(\x0b\x32\x18.monorail.v3.ProjectStar\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\xde\x03\n\x05Users\x12;\n\x07GetUser\x12\x1b.monorail.v3.GetUserRequest\x1a\x11.monorail.v3.User\"\x00\x12X\n\rBatchGetUsers\x12!.monorail.v3.BatchGetUsersRequest\x1a\".monorail.v3.BatchGetUsersResponse\"\x00\x12\x41\n\nUpdateUser\x12\x1e.monorail.v3.UpdateUserRequest\x1a\x11.monorail.v3.User\"\x00\x12J\n\x0bStarProject\x12\x1f.monorail.v3.StarProjectRequest\x1a\x18.monorail.v3.ProjectStar\"\x00\x12L\n\rUnStarProject\x12!.monorail.v3.UnStarProjectRequest\x1a\x16.google.protobuf.Empty\"\x00\x12\x61\n\x10ListProjectStars\x12$.monorail.v3.ListProjectStarsRequest\x1a%.monorail.v3.ListProjectStarsResponse\"\x00\x42\x12Z\x10\x61pi/v3/api_protob\x06proto3'
+  ,
+  dependencies=[google_dot_api_dot_field__behavior__pb2.DESCRIPTOR,google_dot_api_dot_resource__pb2.DESCRIPTOR,api_dot_v3_dot_api__proto_dot_user__objects__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,])
+
+
+
+
+_GETUSERREQUEST = _descriptor.Descriptor(
+  name='GetUserRequest',
+  full_name='monorail.v3.GetUserRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='name', full_name='monorail.v3.GetUserRequest.name', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=205,
+  serialized_end=263,
+)
+
+
+_BATCHGETUSERSREQUEST = _descriptor.Descriptor(
+  name='BatchGetUsersRequest',
+  full_name='monorail.v3.BatchGetUsersRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='names', full_name='monorail.v3.BatchGetUsersRequest.names', index=0,
+      number=1, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=265,
+  serialized_end=330,
+)
+
+
+_BATCHGETUSERSRESPONSE = _descriptor.Descriptor(
+  name='BatchGetUsersResponse',
+  full_name='monorail.v3.BatchGetUsersResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='users', full_name='monorail.v3.BatchGetUsersResponse.users', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=332,
+  serialized_end=389,
+)
+
+
+_UPDATEUSERREQUEST = _descriptor.Descriptor(
+  name='UpdateUserRequest',
+  full_name='monorail.v3.UpdateUserRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='user', full_name='monorail.v3.UpdateUserRequest.user', index=0,
+      number=1, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002\372A\024\n\022api.crbug.com/User', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='update_mask', full_name='monorail.v3.UpdateUserRequest.update_mask', index=1,
+      number=2, type=11, cpp_type=10, label=1,
+      has_default_value=False, default_value=None,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=392,
+  serialized_end=526,
+)
+
+
+_STARPROJECTREQUEST = _descriptor.Descriptor(
+  name='StarProjectRequest',
+  full_name='monorail.v3.StarProjectRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project', full_name='monorail.v3.StarProjectRequest.project', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\027\n\025api.crbug.com/Project\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=528,
+  serialized_end=596,
+)
+
+
+_UNSTARPROJECTREQUEST = _descriptor.Descriptor(
+  name='UnStarProjectRequest',
+  full_name='monorail.v3.UnStarProjectRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project', full_name='monorail.v3.UnStarProjectRequest.project', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\027\n\025api.crbug.com/Project\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=598,
+  serialized_end=668,
+)
+
+
+_LISTPROJECTSTARSREQUEST = _descriptor.Descriptor(
+  name='ListProjectStarsRequest',
+  full_name='monorail.v3.ListProjectStarsRequest',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.v3.ListProjectStarsRequest.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=b'\372A\024\n\022api.crbug.com/User\340A\002', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_size', full_name='monorail.v3.ListProjectStarsRequest.page_size', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_token', full_name='monorail.v3.ListProjectStarsRequest.page_token', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=670,
+  serialized_end=778,
+)
+
+
+_LISTPROJECTSTARSRESPONSE = _descriptor.Descriptor(
+  name='ListProjectStarsResponse',
+  full_name='monorail.v3.ListProjectStarsResponse',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project_stars', full_name='monorail.v3.ListProjectStarsResponse.project_stars', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='next_page_token', full_name='monorail.v3.ListProjectStarsResponse.next_page_token', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=780,
+  serialized_end=880,
+)
+
+_BATCHGETUSERSRESPONSE.fields_by_name['users'].message_type = api_dot_v3_dot_api__proto_dot_user__objects__pb2._USER
+_UPDATEUSERREQUEST.fields_by_name['user'].message_type = api_dot_v3_dot_api__proto_dot_user__objects__pb2._USER
+_UPDATEUSERREQUEST.fields_by_name['update_mask'].message_type = google_dot_protobuf_dot_field__mask__pb2._FIELDMASK
+_LISTPROJECTSTARSRESPONSE.fields_by_name['project_stars'].message_type = api_dot_v3_dot_api__proto_dot_user__objects__pb2._PROJECTSTAR
+DESCRIPTOR.message_types_by_name['GetUserRequest'] = _GETUSERREQUEST
+DESCRIPTOR.message_types_by_name['BatchGetUsersRequest'] = _BATCHGETUSERSREQUEST
+DESCRIPTOR.message_types_by_name['BatchGetUsersResponse'] = _BATCHGETUSERSRESPONSE
+DESCRIPTOR.message_types_by_name['UpdateUserRequest'] = _UPDATEUSERREQUEST
+DESCRIPTOR.message_types_by_name['StarProjectRequest'] = _STARPROJECTREQUEST
+DESCRIPTOR.message_types_by_name['UnStarProjectRequest'] = _UNSTARPROJECTREQUEST
+DESCRIPTOR.message_types_by_name['ListProjectStarsRequest'] = _LISTPROJECTSTARSREQUEST
+DESCRIPTOR.message_types_by_name['ListProjectStarsResponse'] = _LISTPROJECTSTARSRESPONSE
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+GetUserRequest = _reflection.GeneratedProtocolMessageType('GetUserRequest', (_message.Message,), {
+  'DESCRIPTOR' : _GETUSERREQUEST,
+  '__module__' : 'api.v3.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.GetUserRequest)
+  })
+_sym_db.RegisterMessage(GetUserRequest)
+
+BatchGetUsersRequest = _reflection.GeneratedProtocolMessageType('BatchGetUsersRequest', (_message.Message,), {
+  'DESCRIPTOR' : _BATCHGETUSERSREQUEST,
+  '__module__' : 'api.v3.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.BatchGetUsersRequest)
+  })
+_sym_db.RegisterMessage(BatchGetUsersRequest)
+
+BatchGetUsersResponse = _reflection.GeneratedProtocolMessageType('BatchGetUsersResponse', (_message.Message,), {
+  'DESCRIPTOR' : _BATCHGETUSERSRESPONSE,
+  '__module__' : 'api.v3.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.BatchGetUsersResponse)
+  })
+_sym_db.RegisterMessage(BatchGetUsersResponse)
+
+UpdateUserRequest = _reflection.GeneratedProtocolMessageType('UpdateUserRequest', (_message.Message,), {
+  'DESCRIPTOR' : _UPDATEUSERREQUEST,
+  '__module__' : 'api.v3.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.UpdateUserRequest)
+  })
+_sym_db.RegisterMessage(UpdateUserRequest)
+
+StarProjectRequest = _reflection.GeneratedProtocolMessageType('StarProjectRequest', (_message.Message,), {
+  'DESCRIPTOR' : _STARPROJECTREQUEST,
+  '__module__' : 'api.v3.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.StarProjectRequest)
+  })
+_sym_db.RegisterMessage(StarProjectRequest)
+
+UnStarProjectRequest = _reflection.GeneratedProtocolMessageType('UnStarProjectRequest', (_message.Message,), {
+  'DESCRIPTOR' : _UNSTARPROJECTREQUEST,
+  '__module__' : 'api.v3.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.UnStarProjectRequest)
+  })
+_sym_db.RegisterMessage(UnStarProjectRequest)
+
+ListProjectStarsRequest = _reflection.GeneratedProtocolMessageType('ListProjectStarsRequest', (_message.Message,), {
+  'DESCRIPTOR' : _LISTPROJECTSTARSREQUEST,
+  '__module__' : 'api.v3.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListProjectStarsRequest)
+  })
+_sym_db.RegisterMessage(ListProjectStarsRequest)
+
+ListProjectStarsResponse = _reflection.GeneratedProtocolMessageType('ListProjectStarsResponse', (_message.Message,), {
+  'DESCRIPTOR' : _LISTPROJECTSTARSRESPONSE,
+  '__module__' : 'api.v3.api_proto.users_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.v3.ListProjectStarsResponse)
+  })
+_sym_db.RegisterMessage(ListProjectStarsResponse)
+
+
+DESCRIPTOR._options = None
+_GETUSERREQUEST.fields_by_name['name']._options = None
+_BATCHGETUSERSREQUEST.fields_by_name['names']._options = None
+_UPDATEUSERREQUEST.fields_by_name['user']._options = None
+_UPDATEUSERREQUEST.fields_by_name['update_mask']._options = None
+_STARPROJECTREQUEST.fields_by_name['project']._options = None
+_UNSTARPROJECTREQUEST.fields_by_name['project']._options = None
+_LISTPROJECTSTARSREQUEST.fields_by_name['parent']._options = None
+
+_USERS = _descriptor.ServiceDescriptor(
+  name='Users',
+  full_name='monorail.v3.Users',
+  file=DESCRIPTOR,
+  index=0,
+  serialized_options=None,
+  create_key=_descriptor._internal_create_key,
+  serialized_start=883,
+  serialized_end=1361,
+  methods=[
+  _descriptor.MethodDescriptor(
+    name='GetUser',
+    full_name='monorail.v3.Users.GetUser',
+    index=0,
+    containing_service=None,
+    input_type=_GETUSERREQUEST,
+    output_type=api_dot_v3_dot_api__proto_dot_user__objects__pb2._USER,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='BatchGetUsers',
+    full_name='monorail.v3.Users.BatchGetUsers',
+    index=1,
+    containing_service=None,
+    input_type=_BATCHGETUSERSREQUEST,
+    output_type=_BATCHGETUSERSRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='UpdateUser',
+    full_name='monorail.v3.Users.UpdateUser',
+    index=2,
+    containing_service=None,
+    input_type=_UPDATEUSERREQUEST,
+    output_type=api_dot_v3_dot_api__proto_dot_user__objects__pb2._USER,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='StarProject',
+    full_name='monorail.v3.Users.StarProject',
+    index=3,
+    containing_service=None,
+    input_type=_STARPROJECTREQUEST,
+    output_type=api_dot_v3_dot_api__proto_dot_user__objects__pb2._PROJECTSTAR,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='UnStarProject',
+    full_name='monorail.v3.Users.UnStarProject',
+    index=4,
+    containing_service=None,
+    input_type=_UNSTARPROJECTREQUEST,
+    output_type=google_dot_protobuf_dot_empty__pb2._EMPTY,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+  _descriptor.MethodDescriptor(
+    name='ListProjectStars',
+    full_name='monorail.v3.Users.ListProjectStars',
+    index=5,
+    containing_service=None,
+    input_type=_LISTPROJECTSTARSREQUEST,
+    output_type=_LISTPROJECTSTARSRESPONSE,
+    serialized_options=None,
+    create_key=_descriptor._internal_create_key,
+  ),
+])
+_sym_db.RegisterServiceDescriptor(_USERS)
+
+DESCRIPTOR.services_by_name['Users'] = _USERS
+
+# @@protoc_insertion_point(module_scope)
diff --git a/api/v3/api_proto/users_prpc_pb2.py b/api/v3/api_proto/users_prpc_pb2.py
new file mode 100644
index 0000000..0d0012a
--- /dev/null
+++ b/api/v3/api_proto/users_prpc_pb2.py
@@ -0,0 +1,622 @@
+# Generated by the pRPC protocol buffer compiler plugin.  DO NOT EDIT!
+# source: api/v3/api_proto/users.proto
+
+import base64
+import zlib
+
+from google.protobuf import descriptor_pb2
+
+# Includes description of the api/v3/api_proto/users.proto and all of its transitive
+# dependencies. Includes source code info.
+FILE_DESCRIPTOR_SET = descriptor_pb2.FileDescriptorSet()
+FILE_DESCRIPTOR_SET.ParseFromString(zlib.decompress(base64.b64decode(
+    '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'
+    'z50zDqK9b0KYa/ngiBIX9KwOf6zPp/AIQlirE=')))
+_INDEX = {
+    f.name: {
+      'descriptor': f,
+      'services': {s.name: s for s in f.service},
+    }
+    for f in FILE_DESCRIPTOR_SET.file
+}
+
+
+UsersServiceDescription = {
+  'file_descriptor_set': FILE_DESCRIPTOR_SET,
+  'file_descriptor': _INDEX[u'api/v3/api_proto/users.proto']['descriptor'],
+  'service_descriptor': _INDEX[u'api/v3/api_proto/users.proto']['services'][u'Users'],
+}
diff --git a/api/v3/api_routes.py b/api/v3/api_routes.py
new file mode 100644
index 0000000..b627941
--- /dev/null
+++ b/api/v3/api_routes.py
@@ -0,0 +1,42 @@
+#
+# See the pRPC spec here: https://godoc.org/github.com/luci/luci-go/grpc/prpc
+#
+# Each Servicer corresponds to a service defined in a .proto file in this
+# directory. Each method on that Servicer corresponds to one of the rpcs
+# defined on the service.
+#
+# All APIs are served under the /prpc/* path space. Each service gets its own
+# namespace under that, and each method is an individual endpoints. For example,
+# POST https://bugs.chromium.org/prpc/monorail.v3.Issues/GetIssue
+# would be a call to the api.v3.issues_servicer.IssuesServicer.GetIssue method.
+#
+# Note that this is not a RESTful API, although it is CRUDy. All requests are
+# POSTs, all methods take exactly one input, and all methods return exactly
+# one output.
+#
+# TODO(http://crbug.com/monorail/1703): Actually integrate the rpcexplorer.
+# You can use the API Explorer here: https://bugs.chromium.org/rpcexplorer
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from api.v3 import issues_servicer
+from api.v3 import hotlists_servicer
+from api.v3 import frontend_servicer
+from api.v3 import projects_servicer
+from api.v3 import permissions_servicer
+from api.v3 import users_servicer
+
+
+def RegisterApiHandlers(prpc_server, services):
+  """Registers pRPC API services. And makes their routes
+  available in prpc_server.get_routes().
+  """
+
+  prpc_server.add_service(issues_servicer.IssuesServicer(services))
+  prpc_server.add_service(hotlists_servicer.HotlistsServicer(services))
+  prpc_server.add_service(projects_servicer.ProjectsServicer(services))
+  prpc_server.add_service(permissions_servicer.PermissionsServicer(services))
+  prpc_server.add_service(users_servicer.UsersServicer(services))
+  prpc_server.add_service(frontend_servicer.FrontendServicer(services))
diff --git a/api/v3/apps-script-client/IssueService.js b/api/v3/apps-script-client/IssueService.js
new file mode 100644
index 0000000..d1c6c9d
--- /dev/null
+++ b/api/v3/apps-script-client/IssueService.js
@@ -0,0 +1,908 @@
+// Copyright 2020 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.
+
+/* eslint-disable no-unused-vars */
+
+const COMMENT_TYPE_DESCRIPTION = 'DESCRIPTION';
+
+/**
+ * Fetches the issue from Monorail.
+ * @param {string} issueName The resource name of the issue.
+ * @return {Issue}
+ */
+function getIssue(issueName) {
+  const message = {'name': issueName};
+  const url = URL + 'monorail.v3.Issues/GetIssue';
+  return run_(url, message);
+}
+
+/**
+ * Fetches all the given issues from Monorail.
+ * @param {Array<string>} issueNames The resource names of the issues.
+ * @return {Array<Issue>}
+ */
+function batchGetIssues(issueNames) {
+  const message = {'names': issueNames};
+  const url = URL + 'monorail.v3.Issues/BatchGetIssues';
+  return run_(url, message);
+}
+
+/**
+ * Fetches all the ApprovalValues that belong to the given issue.
+ * @param {string} issueName The resource name of the issue.
+ * @return {Array<ApprovalValue>}
+ */
+function listApprovalValues(issueName) {
+  const message = {'parent': issueName};
+  const url = URL + 'monorail.v3.Issues/ListApprovalValues';
+  return run_(url, message);
+}
+
+/**
+ * Calls SearchIssues with the given parameters.
+ * @param {Array<string>} projectNames resource names of the projects to search.
+ * @param {string} query The query to use to search.
+ * @param {string} orderBy The issue fields to order issues by.
+ * @param {Number} pageSize The maximum issues to return.
+ * @param {string} pageToken The page token from the previous call.
+ * @return {Array<SearchIssuesResponse>}
+ */
+function searchIssuesPagination_(
+    projectNames, query, orderBy, pageSize, pageToken) {
+  const message = {
+    'projects': projectNames,
+    'query': query,
+    'orderBy': orderBy,
+    'pageToken': pageToken};
+  if (pageSize) {
+    message['pageSize'] = pageSize;
+  }
+  const url = URL + 'monorail.v3.Issues/SearchIssues';
+  return run_(url, message);
+}
+
+// TODO(crbug.com/monorail/7143): SearchIssues only accepts one project.
+/**
+ * Searches Monorail for issues using the given query.
+ * NOTE: We currently only accept `projectNames` with one and only one project.
+ * @param {Array<string>} projects Resource names of the projects to search
+ *     within.
+ * @param {string=} query The query to use to search.
+ * @param {string=} orderBy The issue fields to order issues by,
+ *    e.g. 'EstDays,Opened,-stars'
+ * @return {Array<Issue>}
+ */
+function searchIssues(projects, query, orderBy) {
+  const pageSize = 100;
+  let pageToken;
+
+  issues = [];
+
+  do {
+    const resp = searchIssuesPagination_(
+        projects, query, orderBy, pageSize, pageToken);
+    issues = issues.concat(resp.issues);
+    pageToken = resp.nextPageToken;
+  }
+  while (pageToken);
+
+  return issues;
+}
+
+/**
+ * Calls ListComments with the given parameters.
+ * @param {string} issueName Resource name of the issue.
+ * @param {string} filter The approval filter query.
+ * @param {Number} pageSize The maximum number of comments to return.
+ * @param {string} pageToken The page token from the previous request.
+ * @return {ListCommentsResponse}
+ */
+function listCommentsPagination_(issueName, filter, pageSize, pageToken) {
+  const message = {
+    'parent': issueName,
+    'pageToken': pageToken,
+    'filter': filter,
+  };
+  if (pageSize) {
+    message['pageSize'] = pageSize;
+  }
+  const url = URL + 'monorail.v3.Issues/ListComments';
+  return run_(url, message);
+}
+
+/**
+ * Returns all comments and previous/current descriptions of an issue.
+ * @param {string} issueName Resource name of the Issue.
+ * @param {string=} filter The filter query filtering out comments.
+ *     We only accept `approval = "<approvalDef resource name>""`.
+ *     e.g. 'approval = "projects/chromium/approvalDefs/34"'
+ * @return {Array<Comment>}
+ */
+function listComments(issueName, filter) {
+  let pageToken;
+
+  let comments = [];
+  do {
+    const resp = listCommentsPagination_(issueName, filter, '', pageToken);
+    comments = comments.concat(resp.comments);
+    pageToken = resp.nextPageToken;
+  }
+  while (pageToken);
+
+  return comments;
+}
+
+/**
+ * Gets the current description of an issue.
+ * @param {string} issueName Resource name of the Issue.
+ * @param {string=} filter The filter query filtering out comments.
+ *     We only accept `approval = "<approvalDef resource name>""`.
+ *     e.g. 'approval = "projects/chromium/approvalDefs/34"'
+ * @return {Comment}
+ */
+function getCurrentDescription(issueName, filter) {
+  const allComments = listComments(issueName, filter);
+  for (let i = (allComments.length - 1); i > -1; i--) {
+    if (allComments[i].type === COMMENT_TYPE_DESCRIPTION) {
+      return allComments[i];
+    }
+  }
+}
+
+/**
+ * Gets the first (non-description) comment of an issue.
+ * @param {string} issueName Resource name of the Issue.
+ * @param {string=} filter The filter query filtering out comments.
+ *     We only accept `approval = "<approvalDef resource name>""`.
+ *      e.g. 'approval = "projects/chromium/approvalDefs/34"'
+ * @return {Comment}
+ */
+function getFirstComment(issueName, filter) {
+  const allComments = listComments(issueName, filter);
+  for (let i = 0; i < allComments.length; i++) {
+    if (allComments[i].type !== COMMENT_TYPE_DESCRIPTION) {
+      return allComments[i];
+    }
+  }
+  return null;
+}
+
+/**
+ * Gets the last (non-description) comment of an issue.
+ * @param {string} issueName The resource name of the issue.
+ * @param {string=} filter The filter query filtering out comments.
+ *     We only accept `approval = "<approvalDef resource name>""`.
+ *     e.g. 'approval = "projects/chromium/approvalDefs/34"'
+ * @return {Issue}
+ */
+function getLastComment(issueName, filter) {
+  const allComments = listComments(issueName, filter);
+  for (let i = (allComments.length - 1); i > -1; i--) {
+    if (allComments[i].type != COMMENT_TYPE_DESCRIPTION) {
+      return allComments[i];
+    }
+  }
+  return null;
+}
+
+/**
+ * Checks if the given label exists in the issue.
+ * @param {Issue} issue The issue to search within for the label.
+ * @param {string} label The label to search for.
+ * @return {boolean}
+ */
+function hasLabel(issue, label) {
+  if (issue.labels) {
+    const testLabel = label.toLowerCase();
+    return issue.labels.some(({label}) => testLabel === label.toLowerCase());
+  }
+  return false;
+}
+
+/**
+ * Checks if the issue has any labels matching the given regex.
+ * @param {Issue} issue The issue to search within for matching labels.
+ * @param {string} regex The regex pattern to use to search for labels.
+ * @return {boolean}
+ */
+function hasLabelMatching(issue, regex) {
+  if (issue.labels) {
+    const re = new RegExp(regex, 'i');
+    return issue.labels.some(({label}) => re.test(label));
+  }
+  return false;
+}
+
+/**
+ * Returns all labels in the issue that match the given regex.
+ * @param {Issue} issue The issue to search within for matching labels.
+ * @param {string} regex The regex pattern to use to search for labels.
+ * @return {Array<string>}
+ */
+function getLabelsMatching(issue, regex) {
+  const labels = [];
+  if (issue.labels) {
+    const re = new RegExp(regex, 'i');
+    for (let i = 0; i < issue.labels.length; i++) {
+      if (re.test(issue.labels[i].label)) {
+        labels.push(issue.labels[i].label);
+      }
+    }
+  }
+  return labels;
+}
+
+/**
+ * Get the comment where the given label was added, if any.
+ * @param {string} issueName The resource name of the issue.
+ * @param {string} label The label that was remove.
+ * @return {Comment}
+ */
+function getLabelSetComment(issueName, label) {
+  const comments = listComments(issueName);
+  for (let i = 0; i < comments.length; i++) {
+    const comment = comments[i];
+    if (comment.amendments) {
+      for (let j = 0; j < comment.amendments.length; j++) {
+        const amendment = comment.amendments[j];
+        if (amendment['fieldName'] === 'Labels' &&
+            amendment['newOrDeltaValue'].toLowerCase() === (
+              label.toLocaleLowerCase())) {
+          return comment;
+        }
+      }
+    }
+  }
+  return null;
+}
+
+/**
+ * Get the comment where the given label was removed, if any.
+ * @param {string} issueName The resource name of the issue.
+ * @param {string} label The label that was remove.
+ * @return {Comment}
+ */
+function getLabelRemoveComment(issueName, label) {
+  const comments = listComments(issueName);
+  for (let i = 0; i < comments.length; i++) {
+    const comment = comments[i];
+    if (comment.amendments) {
+      for (let j = 0; j < comment.amendments.length; j++) {
+        const amendment = comment.amendments[j];
+        if (amendment['fieldName'] === 'Labels' &&
+            amendment[
+                'newOrDeltaValue'].toLowerCase() === (
+              '-' + label.toLocaleLowerCase())) {
+          return comment;
+        }
+      }
+    }
+  }
+  return null;
+}
+
+/**
+ * Updates the issue to have the given label added.
+ * This method does not call Monorail's API to save this change.
+ * Call saveChanges() to send all updates to Monorail.
+ * @param {Issue} issue The issue to update.
+ * @param {string} label The label to add.
+ */
+function addLabel(issue, label) {
+  if (hasLabel(issue, label)) return;
+  maybeCreateDelta_(issue);
+  // Add the label to the issue's delta.labelsAdd.
+  issue.delta.labelsAdd.push(label);
+  // Add the label to the issue.
+  issue.labels.push({label: label});
+  // 'labels' added to updateMask in saveChanges().
+}
+
+/**
+ * Updates the issue to have the given label removed from the issue.
+ * This method does not call Monorail's API to save this change.
+ * Call saveChanges() to send all updates to Monorail.
+ * @param {Issue} issue The issue to update.
+ * @param {string} label The label to remove.
+ */
+function removeLabel(issue, label) {
+  if (!hasLabel(issue, label)) return;
+  maybeCreateDelta_(issue);
+  // Add the label to the issue's delta.labelsRemove.
+  issue.delta.labelsRemove.push(label);
+  // Remove label from issue.
+  for (let i = 0; i < issue.labels.length; i++) {
+    if (issue.labels[i].label.toLowerCase() === label.toLowerCase()) {
+      issue.labels.splice(i, 1);
+      break;
+    }
+  }
+}
+
+/**
+ * Sets the owner of the given issue.
+ * This method does not call Monorail's API to save this change.
+ * Call saveChanges() to send all updates to Monorail.
+ * @param {Issue} issue Issue to change.
+ * @param {string} ownerName The resource name of the new owner,
+ *     e.g. 'users/chicken@email.com'
+*/
+function setOwner(issue, ownerName) {
+  maybeCreateDelta_(issue);
+  issue.owner = {'user': ownerName};
+  if (issue.delta.updateMask.indexOf('owner.user') === -1) {
+    issue.delta.updateMask.push('owner.user');
+  }
+}
+
+/**
+ * Sets the summary of the given issue.
+ * This method does not call Monorail's API to save this change.
+ * Call saveChanges() to send all updates to Monorail.
+ * @param {Issue} issue Issue to change.
+ * @param {string} summary The new summary of the issue.
+*/
+function setSummary(issue, summary) {
+  maybeCreateDelta_(issue);
+  issue.summary = summary;
+  if (issue.delta.updateMask.indexOf('summary') === -1) {
+    issue.delta.updateMask.push('summary');
+  }
+}
+
+/**
+ *Sets the status of the given issue.
+ * This method does not call Monorail's API to save this change.
+ * Call saveChanges() to send all updates to Monorail.
+ * @param {Issue} issue Issue to change.
+ * @param {string} status The new status of the issue e.g. 'Available'.
+*/
+function setStatus(issue, status) {
+  maybeCreateDelta_(issue);
+  issue.status.status = status;
+  if (issue.delta.updateMask.indexOf('status.status') === -1) {
+    issue.delta.updateMask.push('status.status');
+  }
+}
+
+/**
+ * Sets the merged into issue for the given issue.
+ * This method does not call Monorail's API to save this change.
+ * Call saveChanges() to send all updates to Monorail.
+ * @param {Issue} issue Issue to change.
+ * @param {IssueRef} mergedIntoRef IssueRef of the issue to merge into.
+ */
+function setMergedInto(issue, mergedIntoRef) {
+  maybeCreateDelta_(issue);
+  issue.mergedIntoIssueRef = mergedIntoRef;
+  if (issue.delta.updateMask.indexOf('mergedIntoIssueRef') === -1) {
+    issue.delta.updateMask.push('mergedIntoIssueRef');
+  }
+}
+
+/**
+ * Checks if target is found in source.
+ * @param {IssueRef} target The IssueRef to look for.
+ * @param {Array<IssueRef>} source the IssueRefs to look in.
+ * @return {number} index of target in source, -1 if not found.
+ */
+function issueRefExists_(target, source) {
+  for (let i = 0; i < source.length; i++) {
+    if ((source[i].issue === target.issue || (!source[i].issue && !target.issue)
+    ) && (source[i].extIdentifier === target.extIdentifier || (
+      !source[i].extIdentifier && !target.extIdentifier))) {
+      return i;
+    }
+  }
+  return -1;
+}
+
+/**
+ * Makes blocking issue ref changes.
+ * blockingIssuesAdd are added before blockingIssuesRemove are removed.
+ * This method does not call Monorail's API to save this change.
+ * Call saveChanges() to send all updates to Monorail.
+ * @param {Issue} issue Issue to change.
+ * @param {Array<IssueRef>} blockingIssuesAdd issues to add as blocking issues.
+ * @param {Array<IssueRef>} blockingIssuesRemove issues to remove from blocking
+ *     issues.
+ */
+function addBlockingIssueChanges(
+    issue, blockingIssuesAdd, blockingIssuesRemove) {
+  maybeCreateDelta_(issue);
+  blockingIssuesAdd.forEach((addRef) => {
+    const iInIssue = issueRefExists_(addRef, issue.blockingIssueRefs);
+    if (iInIssue === -1) { // addRef not found in issue
+      issue.blockingIssueRefs.push(addRef);
+      issue.delta.blockingAdd.push(addRef);
+      const iInDeltaRemove = issueRefExists_(
+          addRef, issue.delta.blockingRemove);
+      if (iInDeltaRemove != -1) {
+        // Remove addRef from blckingRemove that may have been added earlier.
+        issue.delta.blockingRemove.splice(iInDeltaRemove, 1);
+      }
+      // issue.delta.updateMask is updated in saveChanges()
+    }
+  });
+  // Add blockingIssuesAdd to issue and issue.delta.blockingAdd if not in
+  // issue.blockingIssues
+  blockingIssuesRemove.forEach((removeRef) => {
+    const iInIssue = issueRefExists_(removeRef, issue.blockingIssueRefs);
+    if (iInIssue > -1) {
+      issue.blockingIssueRefs.splice(iInIssue, 1);
+      issue.delta.blockingRemove.push(removeRef);
+      const iInDeltaAdd = issueRefExists_(removeRef, issue.delta.blockingAdd);
+      if (iInDeltaAdd != -1) {
+        issue.delta.blockingAdd.splice(iInDeltaAdd, 1);
+      }
+    }
+  });
+}
+
+/**
+ * Makes blocked-on issue ref changes.
+ * blockedOnIssuesAdd are added before blockedOnIssuesRemove are removed.
+ * This method does not call Monorail's API to save this change.
+ * Call saveChanges() to send all updates to Monorail.
+ * @param {Issue} issue Issue to change.
+ * @param {Array<IssueRef>} blockedOnIssuesAdd issues to add as blockedon
+ *     issues.
+ * @param {Array<IssueRef>} blockedOnIssuesRemove issues to remove from
+ *     blockedon issues.
+ */
+function addBlockedOnIssueChanges(
+    issue, blockedOnIssuesAdd, blockedOnIssuesRemove) {
+  maybeCreateDelta_(issue);
+  blockedOnIssuesAdd.forEach((addRef) => {
+    const iInIssue = issueRefExists_(addRef, issue.blockedOnIssueRefs);
+    if (iInIssue === -1) { // addRef not found in issue
+      issue.blockedOnIssueRefs.push(addRef);
+      issue.delta.blockedOnAdd.push(addRef);
+      const iInDeltaRemove = issueRefExists_(
+          addRef, issue.delta.blockedOnRemove);
+      if (iInDeltaRemove != -1) {
+        // Remove addRef from blckingRemove that may have been added earlier.
+        issue.delta.blockedOnRemove.splice(iInDeltaRemove, 1);
+      }
+      // issue.delta.updateMask is updated in saveChanges()
+    }
+  });
+  // Add blockedOnIssuesAdd to issue and issue.delta.blockedOnAdd if not in
+  // issue.blockedOnIssues.
+  blockedOnIssuesRemove.forEach((removeRef) => {
+    const iInIssue = issueRefExists_(removeRef, issue.blockedOnIssueRefs);
+    if (iInIssue > -1) {
+      issue.blockedOnIssueRefs.splice(iInIssue, 1);
+      issue.delta.blockedOnRemove.push(removeRef);
+      const iInDeltaAdd = issueRefExists_(removeRef, issue.delta.blockedOnAdd);
+      if (iInDeltaAdd != -1) {
+        issue.delta.blockedOnAdd.splice(iInDeltaAdd, 1);
+      }
+    }
+  });
+}
+
+
+/**
+ * Looks for a component name in an Array of ComponentValues.
+ * @param {string} compName Resource name of the Component to look for.
+ * @param {Array<ComponentValue>} compArray List of ComponentValues.
+ * @return {number} Index of compName in compArray, -1 if not found.
+ */
+function componentExists_(compName, compArray) {
+  for (let i = 0; i < compArray.length; i++) {
+    if (compArray[i].component === compName) {
+      return i;
+    }
+  }
+  return -1;
+}
+
+/**
+ * Adds the component changes to the issue.
+ * componentNamesAdd are added before componentNamesremove are removed.
+ * This method does not call Monorail's API to save this change.
+ * Call saveChanges() to send all updates to Monorail.
+ * @param {Issue} issue Issue to change.
+ * @param {Array<string>} componentNamesAdd Array of component resource names.
+ * @param {Array<string>} componentNamesRemove Array or component resource
+ *     names.
+
+*/
+function addComponentChanges(issue, componentNamesAdd, componentNamesRemove) {
+  maybeCreateDelta_(issue);
+  componentNamesAdd.forEach((compName) => {
+    const iInIssue = componentExists_(compName, issue.components);
+    if (iInIssue === -1) { // compName is not in issue.
+      issue.components.push({'component': compName});
+      issue.delta.componentsAdd.push(compName);
+      const iInDeltaRemove = issue.delta.componentsRemove.indexOf(compName);
+      if (iInDeltaRemove != -1) {
+        // Remove compName from issue.delta.componentsRemove that may have been
+        // added before.
+        issue.delta.componentsRemove.splice(iInDeltaRemove, 1);
+      }
+      // issue.delta.updateMask is updated in saveChanges()
+    }
+  });
+
+  componentNamesRemove.forEach((compName) => {
+    const iInIssue = componentExists_(compName, issue.components);
+    if (iInIssue != -1) { // compName was found in issue.
+      issue.components.splice(iInIssue, 1);
+      issue.delta.componentsRemove.push(compName);
+      const iInDeltaAdd = issue.delta.componentsAdd.indexOf(compName);
+      if (iInDeltaAdd != -1) {
+        // Remove compName from issue.delta.componentsAdd that may have been
+        // added before.
+        issue.delta.componentsAdd.splice(iInDeltaAdd, 1);
+      }
+    }
+  });
+}
+
+/**
+ * Checks if the fieldVal is found in fieldValsArray
+ * @param {FieldValue} fieldVal the field to look for.
+ * @param {Array<FieldValue>} fieldValsArray the Array to look within.
+ * @return {number} the index of fieldVal in fieldValsArray, or -1 if not found.
+ */
+function fieldValueExists_(fieldVal, fieldValsArray) {
+  for (let i = 0; i < fieldValsArray.length; i++) {
+    const currFv = fieldValsArray[i];
+    if (currFv.field === fieldVal.field && currFv.value === fieldVal.value && (
+      currFv.phase === fieldVal.phase || (
+        !currFv.phase && !fieldVal.phase))) {
+      return i;
+    }
+  }
+  return -1;
+}
+
+/**
+ * Adds the FieldValue changes to the issue.
+ * fieldValuesAdd are added before fieldValuesRemove are removed.
+ * This method does not call Monorail's API to save this change.
+ * Call saveChanges() to send all updates to Monorail.
+ * @param {Issue} issue Issue to change.
+ * @param {Array<FieldValue>} fieldValuesAdd Array of FieldValues to add.
+ * @param {Array<FieldValue>} fieldValuesRemove Array of FieldValues to remove.
+*/
+function addFieldValueChanges(issue, fieldValuesAdd, fieldValuesRemove) {
+  maybeCreateDelta_(issue);
+  fieldValuesAdd.forEach((fvAdd) => {
+    const iInIssue = fieldValueExists_(fvAdd, issue.fieldValues);
+    if (iInIssue === -1) { // fvAdd is not already in issue, so we can add it.
+      issue.fieldValues.push(fvAdd);
+      issue.delta.fieldValuesAdd.push(fvAdd);
+      const iInDeltaRemove = fieldValueExists_(
+          fvAdd, issue.delta.fieldValuesRemove);
+      if (iInDeltaRemove != -1) {
+        // fvAdd was added to fieldValuesRemove in a previous call.
+        issue.delta.fieldValuesRemove.splice(iInDeltaRemove, 1);
+      }
+      // issue.delta.updateMask is updated in saveChanges()
+    }
+  });
+  // issue.delta.updateMask is updated in saveChanges()
+  fieldValuesRemove.forEach((fvRemove) => {
+    const iInIssue = fieldValueExists_(fvRemove, issue.fieldValues);
+    if (iInIssue != -1) { // fvRemove is in issue, so we can remove it.
+      issue.fieldValues.splice(iInIssue, 1);
+      issue.delta.fieldValuesRemove.push(fvRemove);
+      const iInDeltaAdd = fieldValueExists_(
+          fvRemove, issue.delta.fieldValuesAdd);
+      if (iInDeltaAdd != -1) {
+        // fvRemove was added to fieldValuesAdd in a previous call.
+        issue.delta.fieldValuesAdd.splice(iInDeltaAdd, 1);
+      }
+    }
+  });
+}
+
+/**
+ * Checks for the existence of userName in userValues
+ * @param {string} userName A user resource name to look for.
+ * @param {Array<UserValue>} userValues UserValues to search through.
+ * @return {number} Index of userName's UserValue in userValues or -1 if not
+ *     found.
+ */
+function userValueExists_(userName, userValues) {
+  for (let i = 0; i< userValues.length; i++) {
+    if (userValues[i].user === userName) {
+      return i;
+    }
+  }
+  return -1;
+}
+
+/**
+ * Adds the CC changes to the issue.
+ * ccNamesAdd are added before ccNamesRemove are removed.
+ * This method does not call Monorail's API to save this change.
+ * Call saveChanges() to send all updates to Monorail.
+ * @param {Issue} issue Issue to change.
+ * @param {Array<string>} ccNamesAdd Array if user resource names.
+ * @param {Array<string>} ccNamesRemove Array if user resource names.
+*/
+function addCcChanges(issue, ccNamesAdd, ccNamesRemove) {
+  maybeCreateDelta_(issue);
+  ccNamesAdd.forEach((ccName) => {
+    const iInIssue = userValueExists_(ccName, issue.ccUsers);
+    if (iInIssue === -1) { // User is not in issue, so we can add them.
+      issue.ccUsers.push({'user': ccName});
+      issue.delta.ccsAdd.push(ccName);
+      const iInDeltaRemove = issue.delta.ccsRemove.indexOf(ccName);
+      if (iInDeltaRemove != -1) {
+        // ccName was added to ccsRemove in a previous call.
+        issue.delta.ccsRemove.splice(iInDeltaRemove, 1);
+      }
+    }
+  });
+  ccNamesRemove.forEach((ccName) => {
+    const iInIssue = userValueExists_(ccName, issue.ccUsers);
+    if (iInIssue != -1) { // User is in issue, so we can remove it.
+      issue.ccUsers.splice(iInIssue, 1);
+      issue.delta.ccsRemove.push(ccName);
+      const iInDeltaAdd = issue.delta.ccsAdd.indexOf(ccName);
+      if (iInDeltaAdd != -1) {
+        // ccName was added to delta.ccsAdd in a previous all.
+        issue.delta.ccsAdd.splice(iInDeltaAdd, 1);
+      }
+    }
+  });
+}
+
+/**
+ * Set the pending comment of the issue.
+ * @param {Issue} issue Issue whose comment we want to set.
+ * @param {string} comment Comment that we want for the issue.
+ */
+function setComment(issue, comment) {
+  maybeCreateDelta_(issue);
+  issue.delta.comment = comment;
+}
+
+/**
+ * Get the pending comment for the issue.
+ * @param {Issue} issue Issue whose comment we want.
+ * @return {string}
+ */
+function getPendingComment(issue) {
+  if (issue.delta) {
+    return issue.delta.comment;
+  }
+  return '';
+}
+
+/**
+ * Adds to the existing pending comment
+ * @param {Issue} issue Issue to update.
+ * @param {string} comment The comment string to add to the existing one.
+ */
+function appendComment(issue, comment) {
+  maybeCreateDelta_(issue);
+  issue.delta.comment = issue.delta.comment.concat(comment);
+}
+
+/**
+ * Sets up an issue for pending changes.
+ * @param {Issue} issue The issue that needs to be updated.
+ */
+function maybeCreateDelta_(issue) {
+  if (!issue.delta) {
+    issue.delta = newIssueDelta_();
+    if (!issue.components) {
+      issue.components = [];
+    };
+    if (!issue.blockingIssueRefs) {
+      issue.blockingIssueRefs = [];
+    }
+    if (!issue.blockedOnIssueRefs) {
+      issue.blockedOnIssueRefs = [];
+    }
+    if (!issue.ccUsers) {
+      issue.ccUsers = [];
+    }
+    if (!issue.labels) {
+      issue.labels = [];
+    }
+    if (!issue.fieldValues) {
+      issue.fieldValues = [];
+    }
+  }
+}
+
+/**
+ * Creates an IssueDelta
+ * @return {IssueDelta_}
+ */
+function newIssueDelta_() {
+  return new IssueDelta_();
+}
+
+/** Used to track pending changes to an issue.*/
+function IssueDelta_() {
+  /** Array<string> */ this.updateMask = [];
+
+  // User resource names.
+  /** Array<string> */ this.ccsRemove = [];
+  /** Array<string> */ this.ccsAdd = [];
+
+  /** Array<IssueRef> */ this.blockedOnRemove = [];
+  /** Array<IssueRef> */ this.blockedOnAdd = [];
+  /** Array<IssueRef> */ this.blockingRemove = [];
+  /** Array<IssueRef> */ this.blockingAdd = [];
+
+  // Component resource names.
+  /** Array<string> */ this.componentsRemove = [];
+  /** Array<string> */ this.componentsAdd = [];
+
+  // Label values, e.g. 'Security-Notify'.
+  /** Array<string> */ this.labelsRemove = [];
+  /** Array<string> */ this.labelsAdd = [];
+
+  /** Array<FieldValue> */ this.fieldValuesRemove = [];
+  /** Array<FieldValue> */ this.fieldValuesAdd = [];
+
+  this.comment = '';
+}
+
+/**
+ * Calls Monorail's API to update the issue.
+ * @param {Issue} issue The issue to update where issue['delta'] is expected
+ *     to exist.
+ * @param {boolean} sendEmail True if the update should trigger email
+ *     notifications.
+ * @return {Issue}
+ */
+function saveChanges(issue, sendEmail) {
+  if (!issue.delta) {
+    throw new Error('No pending changes for issue.');
+  }
+
+  const modifyDelta = {
+    'ccsRemove': issue.delta.ccsRemove,
+    'blockedOnIssuesRemove': issue.delta.blockedOnRemove,
+    'blockingIssuesRemove': issue.delta.blockingRemove,
+    'componentsRemove': issue.delta.componentsRemove,
+    'labelsRemove': issue.delta.labelsRemove,
+    'fieldValsRemove': issue.delta.fieldValuesRemove,
+    'issue': {
+      'name': issue.name,
+      'fieldValues': issue.delta.fieldValuesAdd,
+      'blockedOnIssueRefs': issue.delta.blockedOnAdd,
+      'blockingIssueRefs': issue.delta.blockingAdd,
+      'mergedIntoIssueRef': issue.mergedIntoIssueRef,
+      'summary': issue.summary,
+      'status': issue.status,
+      'owner': issue.owner,
+      'labels': [],
+      'ccUsers': [],
+      'components': [],
+    },
+  };
+
+  if (issue.delta.fieldValuesAdd.length > 0) {
+    issue.delta.updateMask.push('fieldValues');
+  }
+
+  if (issue.delta.blockedOnAdd.length > 0) {
+    issue.delta.updateMask.push('blockedOnIssueRefs');
+  }
+
+  if (issue.delta.blockingAdd.length > 0) {
+    issue.delta.updateMask.push('blockingIssueRefs');
+  }
+
+  if (issue.delta.ccsAdd.length > 0) {
+    issue.delta.updateMask.push('ccUsers');
+  }
+  issue.delta.ccsAdd.forEach((userResourceName) => {
+    modifyDelta.issue['ccUsers'].push({'user': userResourceName});
+  });
+
+  if (issue.delta.labelsAdd.length > 0) {
+    issue.delta.updateMask.push('labels');
+  }
+  issue.delta.labelsAdd.forEach((label) => {
+    modifyDelta.issue['labels'].push({'label': label});
+  });
+
+  if (issue.delta.componentsAdd.length > 0) {
+    issue.delta.updateMask.push('components');
+  }
+  issue.delta.componentsAdd.forEach((compResourceName) => {
+    modifyDelta.issue['components'].push({'component': compResourceName});
+  });
+
+  modifyDelta['updateMask'] = issue.delta.updateMask.join();
+
+  const message = {
+    'deltas': [modifyDelta],
+    'notifyType': sendEmail ? 'EMAIL' : 'NO_NOTIFICATION',
+    'commentContent': issue.delta.comment,
+  };
+
+  const url = URL + 'monorail.v3.Issues/ModifyIssues';
+  response = run_(url, message);
+  if (!response.issues) {
+    Logger.log('All changes Noop');
+    return null;
+  }
+  issue = response.issues[0];
+  return issue;
+}
+
+/**
+ * Creates an Issue.
+ * @param {string} projectName: Resource name of the parent project.
+ * @param {string} summary: Summary of the issue.
+ * @param {string} description: Description of the issue.
+ * @param {string} status: Status of the issue, e.g. "Untriaged".
+ * @param {boolean} sendEmail: True if this should trigger email notifications.
+ * @param {string=} ownerName: Resource name of the issue owner.
+ * @param {Array<string>=} ccNames: Resource names of the users to cc.
+ * @param {Array<string>=} labels: Labels to add to the issue,
+ *     e.g. "Restict-View-Google".
+ * @param {Array<string>=} componentNames: Resource names of components to add.
+ * @param {Array<FieldValue>=} fieldValues: FieldValues to add to the issue.
+ * @param {Array<IssueRef>=} blockedOnRefs: IssueRefs for blocked on issues.
+ * @param {Array<IssueRef>=} blockingRefs: IssueRefs for blocking issues.
+ * @return {Issue}
+ */
+function makeIssue(
+    projectName, summary, description, status, sendEmail, ownerName, ccNames,
+    labels, componentNames, fieldValues, blockedOnRefs, blockingRefs) {
+  const issue = {
+    'summary': summary,
+    'status': {'status': status},
+    'ccUsers': [],
+    'components': [],
+    'labels': [],
+  };
+
+  if (ownerName) {
+    issue['owner'] = {'user': ownerName};
+  }
+
+  if (ccNames) {
+    ccNames.forEach((ccName) => {
+      issue['ccUsers'].push({'user': ccName});
+    });
+  };
+
+  if (labels) {
+    labels.forEach((label) => {
+      issue['labels'].push({'label': label});
+    });
+  };
+
+  if (componentNames) {
+    componentNames.forEach((componentName) => {
+      issue['components'].push({'component': componentName});
+    });
+  };
+
+  if (fieldValues) {
+    issue['fieldValues'] = fieldValues;
+  };
+
+  if (blockedOnRefs) {
+    issue['blockedOnIssueRefs'] = blockedOnRefs;
+  };
+
+  if (blockingRefs) {
+    issue['blockingIssueRefs'] = blockingRefs;
+  };
+
+  const message = {
+    'parent': projectName,
+    'issue': issue,
+    'description': description,
+    'notifyType': sendEmail ? 'EMAIL': 'NO_NOTIFICATION',
+  };
+  const url = URL + 'monorail.v3.Issues/MakeIssue';
+  return run_(url, message);
+}
diff --git a/api/v3/apps-script-client/ProjectService.js b/api/v3/apps-script-client/ProjectService.js
new file mode 100644
index 0000000..1487a53
--- /dev/null
+++ b/api/v3/apps-script-client/ProjectService.js
@@ -0,0 +1,52 @@
+// Copyright 2020 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.
+
+/* eslint-disable no-unused-vars */
+
+/**
+ * Creates a ComponentDef.
+ * @param {string} projectName The resource name of the parent project.
+ * @param {string} value The name of the component
+ *     e.g. "Triage" or "Triage>Security".
+ * @param {string=} docstring Short description of the ComponentDef.
+ * @param {Array<string>=} admins Array of User resource names to set as admins.
+ * @param {Array<string>=} ccs Array of User resources names to set as auto-ccs.
+ * @param {Array<string>=} labels Array of labels.
+ * @return {ComponentDef}
+ */
+function createComponentDef(
+    projectName, value, docstring, admins, ccs, labels) {
+  const componentDef = {
+    'value': value,
+    'docstring': docstring,
+  };
+  if (admins) {
+    componentDef['admins'] = admins;
+  }
+  if (ccs) {
+    componentDef['ccs'] = ccs;
+  }
+  if (labels) {
+    componentDef['labels'] = labels;
+  }
+  const message = {
+    'parent': projectName,
+    'componentDef': componentDef,
+  };
+  const url = URL + 'monorail.v3.Projects/CreateComponentDef';
+  return run_(url, message);
+}
+
+/**
+ * Deletes a ComponentDef.
+ * @param {string} componentName Resource name of the ComponentDef to delete.
+ * @return {EmptyProto}
+ */
+function deleteComponentDef(componentName) {
+  const message = {
+    'name': componentName,
+  };
+  const url = URL + 'monorail.v3.Projects/DeleteComponentDef';
+  return run_(url, message);
+}
diff --git a/api/v3/apps-script-client/README.md b/api/v3/apps-script-client/README.md
new file mode 100644
index 0000000..a15a5f9
--- /dev/null
+++ b/api/v3/apps-script-client/README.md
@@ -0,0 +1,8 @@
+## This directory contains code that make up our v3 Apps Script client library.
+
+client.js is purposely omitted.
+
+To make updates to the library:
+1) Update the code here and send in a CL for review.
+2) Merge the Cl and copy-paste the changes into Apps Script at go/monorail-v3-apps-script.
+3) Create a new static version in Apps Script and update the labeled version 'latest' to point to the new static version.
diff --git a/api/v3/apps-script-client/UserService.js b/api/v3/apps-script-client/UserService.js
new file mode 100644
index 0000000..6402db5
--- /dev/null
+++ b/api/v3/apps-script-client/UserService.js
@@ -0,0 +1,27 @@
+// Copyright 2020 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.
+
+/* eslint-disable no-unused-vars */
+
+/**
+ * Fetches the user from Monorai.
+ * @param {string} userName The resource name of the user.
+ * @return {User}
+ */
+function getUser(userName) {
+  const message = {'name': userName};
+  const url = URL + 'monorail.v3.Users/GetUser';
+  return run_(url, message);
+}
+
+/**
+ * Fetches the users from Monorail.
+ * @param {Array<string>} userNames The resource names of the users.
+ * @return {Array<User>}
+ */
+function batchGetUsers(userNames) {
+  const message = {'names': userNames};
+  const url = URL + 'monorail.v3.Users/BatchGetUsers';
+  return run_(url, message);
+}
diff --git a/api/v3/apps-script-client/helpers.js b/api/v3/apps-script-client/helpers.js
new file mode 100644
index 0000000..05ee920
--- /dev/null
+++ b/api/v3/apps-script-client/helpers.js
@@ -0,0 +1,82 @@
+// Copyright 2020 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.
+
+/* eslint-disable no-unused-vars */
+
+/**
+ * Returns the user's resource name.
+ * @param {string|number} user The user's email or user_id
+ * @return {string}
+ */
+function computeUserName(user) {
+  return `users/${user}`;
+}
+
+/**
+ * Returns the users' resource names.
+ * @param {Array<string|number>} users Array of user emails/user_ids.
+ * @return {Array<string>}
+ */
+function computeUserNames(users) {
+  const userNames = [];
+  users.forEach((user) => {
+    userNames.push(computeUserName(user));
+  });
+  return userNames;
+}
+
+
+/**
+ * Returns the issue's resource name.
+ * @param {string} project The name of the project the issue belongs to,
+ *     e.g. 'chromium'.
+ * @param {number} id The issue's id.
+ * @return {string}
+ */
+function computeIssueName(project, id) {
+  return `projects/${project}/issues/${id}`;
+}
+
+/**
+ * Returns the project's resource name.
+ * @param {string} project The display name of the project, e.g. 'chromium'.
+ * @return {string}
+ */
+function computeProjectName(project) {
+  return `projects/${project}`;
+}
+
+/**
+ * Returns the projects' resource names in the same order.
+ * @param {Array<string>} projects The display names of the projects,
+ *     e.g. 'chromium'.
+ * @return {Array<string>}
+ */
+function computeProjectNames(projects) {
+  const projectNames = [];
+  projects.forEach((project) => {
+    projectNames.push(computeProjectName(project));
+  });
+  return projectNames;
+}
+
+/**
+ * Returns the FieldDef's resource name.
+ * @param {string} project The display name of the project, e.g. 'chromium'.
+ * @param {number} fieldId ID of the FieldDef.
+ * @return {string}
+ */
+function computeFieldDefName(project, fieldId) {
+  return `projects/${project}/fieldDefs/${fieldId}`;
+}
+
+/**
+ * Returns the ComponentDef's resource name.
+ * @param {string} project The display name of the project, e.g. 'chromium'.
+ * @param {number|string} componentIdOrPath ID or value of the ComponentDef.
+ * @return {string}
+*/
+function computeComponentDefName(project, componentIdOrPath) {
+  return `projects/${project}/componentDefs/${componentIdOrPath}`;
+}
diff --git a/api/v3/apps-script-client/types.js b/api/v3/apps-script-client/types.js
new file mode 100644
index 0000000..cafba21
--- /dev/null
+++ b/api/v3/apps-script-client/types.js
@@ -0,0 +1,75 @@
+// Copyright 2020 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.
+
+/* eslint-disable max-len */
+
+/**
+ * The label of an issue.
+ * @typedef {Object} LabelValue
+ * @property {string} label - the string label. e.g. 'Target-99'.
+ * @property {string} derivation - How the label was derived. One of 'EXPLICIT', 'RULE'.
+ */
+
+/**
+ * A user involved in an issue.
+ * @typedef {Object} UserValue
+ * @property {string} user - The User resource name.
+ * @property {string} derivation - How the user was derived. One of 'EXPLICIT', 'RULE'.
+ */
+
+/**
+ * A component involved in an issue.
+ * @typedef {Object} ComponentValue
+ * @property {string} component - The ComponentDef resource name.
+ * @property {string} derivation - How the component was derived. One of 'EXPLICIT', 'RULE'.
+ */
+
+/**
+ * A field involved in an issue.
+ * @typedef {Object} FieldValue
+ * @property {string} field - The FieldDef resource name.
+ * @property {string} value - The value associated with the field.
+ * @property {string} derivation - How the value was derived. One of 'EXPLICIT', 'RULE'.
+ * @property {string} phase - The phase of an issue that this value belongs to, if any.
+ */
+
+/**
+ * The status of an issue.
+ * @typedef {Object} StatusValue
+ * @property {string} status - The status. e.g. 'Available'.
+ * @property {string} derivation - How the status was derived. One of 'EXPLICIT', 'RULE'.
+ */
+
+/**
+ * A reference to monorail or external issue.
+ * @typedef {Object} IssueRef
+ * @property {string} [issue] - The resource name of the issue.
+ * @property {string} [extIdentifier] - The identifier of an external issue e.g 'b/123'.
+ */
+
+/**
+ * An Issue.
+ * @typedef {Object} Issue
+ * @property {string} name - The resource name of the issue.
+ * @property {string} summary - The issue summary.
+ * @property {string} state - The current state of the issue. One of 'ACTIVE', 'DELETED', 'SPAM'.
+ * @property {string} reporter - The User resource name of the issue reporter.
+ * @property {UserValue} owner - The issue's owner.
+ * @property {StatusValue} status - The issue status.
+ * @property {IssueRef} mergedIntoIssueRef - The issue this issue is merged into.
+ * @property {Array<IssueRef>} blockedOnIssueRefs - TODO
+ * @property {Array<IssueRef>} blockingIssueRefs - TODO
+ * @property {Array<LabelValue>} labels - The labels of the issue.
+ * @property {Array<FieldValue>} fieldValues - TODO
+ * @property {Array<UserValue>} ccUsers - The users cc'd to this issue.
+ * @property {Array<ComponentValue>} components - The Components added to the issue.
+ * @property {Number} attachmentCount - The number of attachments this issue holds.
+ * @property {Number} starCount - The number of stars this issue has.
+ * @property {Array<FieldValue>} fieldValues - The field values of the issue.
+ * @property {Array<string>} phases - The names of all Phases in this issue.
+ * @property {Object} delta - Holds the pending changes that will be applied with SaveChanges().
+ */
+// TODO(crbug.com/monorail/6456): createTime, closeTime, modifyTime, componentModifyTime, statusModifyTime, ownerModifyTime
+
+// TODO(crbug.com/monorail/6456): Add other classes.
diff --git a/api/v3/converters.py b/api/v3/converters.py
new file mode 100644
index 0000000..60aebd7
--- /dev/null
+++ b/api/v3/converters.py
@@ -0,0 +1,1979 @@
+# Copyright 2020 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.
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import itertools
+import logging
+import time
+
+from google.protobuf import timestamp_pb2
+
+from api import resource_name_converters as rnc
+from api.v3.api_proto import feature_objects_pb2
+from api.v3.api_proto import issues_pb2
+from api.v3.api_proto import issue_objects_pb2
+from api.v3.api_proto import project_objects_pb2
+from api.v3.api_proto import user_objects_pb2
+
+from framework import exceptions
+from framework import filecontent
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from proto import tracker_pb2
+from project import project_helpers
+from tracker import attachment_helpers
+from tracker import field_helpers
+from tracker import tracker_bizobj as tbo
+from tracker import tracker_helpers
+
+Choice = project_objects_pb2.FieldDef.EnumTypeSettings.Choice
+
+# Ingest/convert dicts for ApprovalStatus.
+_V3_APPROVAL_STATUS = issue_objects_pb2.ApprovalValue.ApprovalStatus.Value
+_APPROVAL_STATUS_INGEST = {
+  _V3_APPROVAL_STATUS('APPROVAL_STATUS_UNSPECIFIED'): None,
+  _V3_APPROVAL_STATUS('NOT_SET'): tracker_pb2.ApprovalStatus.NOT_SET,
+  _V3_APPROVAL_STATUS('NEEDS_REVIEW'): tracker_pb2.ApprovalStatus.NEEDS_REVIEW,
+  _V3_APPROVAL_STATUS('NA'): tracker_pb2.ApprovalStatus.NA,
+  _V3_APPROVAL_STATUS('REVIEW_REQUESTED'):
+      tracker_pb2.ApprovalStatus.REVIEW_REQUESTED,
+  _V3_APPROVAL_STATUS('REVIEW_STARTED'):
+      tracker_pb2.ApprovalStatus.REVIEW_STARTED,
+  _V3_APPROVAL_STATUS('NEED_INFO'): tracker_pb2.ApprovalStatus.NEED_INFO,
+  _V3_APPROVAL_STATUS('APPROVED'): tracker_pb2.ApprovalStatus.APPROVED,
+  _V3_APPROVAL_STATUS('NOT_APPROVED'): tracker_pb2.ApprovalStatus.NOT_APPROVED,
+}
+_APPROVAL_STATUS_CONVERT = {
+  val: key for key, val in _APPROVAL_STATUS_INGEST.items()}
+
+
+class Converter(object):
+  """Class to manage converting objects between the API and backend layer."""
+
+  def __init__(self, mc, services):
+    # type: (MonorailContext, Services) -> Converter
+    """Create a Converter with the given MonorailContext and Services.
+
+    Args:
+      mc: MonorailContext object containing the MonorailConnection to the DB
+            and the requester's AuthData object.
+      services: Services object for connections to backend services.
+    """
+    self.cnxn = mc.cnxn
+    self.user_auth = mc.auth
+    self.services = services
+
+  # Hotlists
+
+  def ConvertHotlist(self, hotlist):
+    # type: (proto.feature_objects_pb2.Hotlist)
+    #    -> api_proto.feature_objects_pb2.Hotlist
+    """Convert a protorpc Hotlist into a protoc Hotlist."""
+
+    hotlist_resource_name = rnc.ConvertHotlistName(hotlist.hotlist_id)
+    members_by_id = rnc.ConvertUserNames(
+        hotlist.owner_ids + hotlist.editor_ids)
+    default_columns = self._ComputeIssuesListColumns(hotlist.default_col_spec)
+    if hotlist.is_private:
+      hotlist_privacy = feature_objects_pb2.Hotlist.HotlistPrivacy.Value(
+          'PRIVATE')
+    else:
+      hotlist_privacy = feature_objects_pb2.Hotlist.HotlistPrivacy.Value(
+          'PUBLIC')
+
+    return feature_objects_pb2.Hotlist(
+        name=hotlist_resource_name,
+        display_name=hotlist.name,
+        owner=members_by_id.get(hotlist.owner_ids[0]),
+        editors=[
+            members_by_id.get(editor_id) for editor_id in hotlist.editor_ids
+        ],
+        summary=hotlist.summary,
+        description=hotlist.description,
+        default_columns=default_columns,
+        hotlist_privacy=hotlist_privacy)
+
+  def ConvertHotlists(self, hotlists):
+    # type: (Sequence[proto.feature_objects_pb2.Hotlist])
+    #    -> Sequence[api_proto.feature_objects_pb2.Hotlist]
+    """Convert protorpc Hotlists into protoc Hotlists."""
+    return [self.ConvertHotlist(hotlist) for hotlist in hotlists]
+
+  def ConvertHotlistItems(self, hotlist_id, items):
+    # type: (int, Sequence[proto.features_pb2.HotlistItem]) ->
+    #     Sequence[api_proto.feature_objects_pb2.Hotlist]
+    """Convert a Sequence of protorpc HotlistItems into a Sequence of protoc
+       HotlistItems.
+
+    Args:
+      hotlist_id: ID of the Hotlist the items belong to.
+      items: Sequence of HotlistItem protorpc objects.
+
+    Returns:
+      Sequence of protoc HotlistItems in the same order they are given in
+        `items`.
+      In the rare event that any issues in `items` are not found, they will be
+        omitted from the result.
+    """
+    issue_ids = [item.issue_id for item in items]
+    # Converting HotlistItemNames and IssueNames both require looking up the
+    # issues in the hotlist. However, we want to keep the code clean and
+    # readable so we keep the two processes separate.
+    resource_names_dict = rnc.ConvertHotlistItemNames(
+        self.cnxn, hotlist_id, issue_ids, self.services)
+    issue_names_dict = rnc.ConvertIssueNames(
+        self.cnxn, issue_ids, self.services)
+    adders_by_id = rnc.ConvertUserNames([item.adder_id for item in items])
+
+    # Filter out items whose issues were not found.
+    found_items = [
+        item for item in items if resource_names_dict.get(item.issue_id) and
+        issue_names_dict.get(item.issue_id)
+    ]
+    if len(items) != len(found_items):
+      found_ids = [item.issue_id for item in found_items]
+      missing_ids = [iid for iid in issue_ids if iid not in found_ids]
+      logging.info('HotlistItem issues %r not found' % missing_ids)
+
+    # Generate user friendly ranks (0, 1, 2, 3,...) that are exposed to API
+    # clients, instead of using padded ranks (1, 11, 21, 31,...).
+    sorted_ranks = sorted(item.rank for item in found_items)
+    friendly_ranks_dict = {
+        rank: friendly_rank for friendly_rank, rank in enumerate(sorted_ranks)
+    }
+
+    api_items = []
+    for item in found_items:
+      api_item = feature_objects_pb2.HotlistItem(
+          name=resource_names_dict.get(item.issue_id),
+          issue=issue_names_dict.get(item.issue_id),
+          rank=friendly_ranks_dict[item.rank],
+          adder=adders_by_id.get(item.adder_id),
+          note=item.note)
+      if item.date_added:
+        api_item.create_time.FromSeconds(item.date_added)
+      api_items.append(api_item)
+
+    return api_items
+
+  # Issues
+
+  def _ConvertComponentValues(self, issue):
+    # proto.tracker_pb2.Issue ->
+    #     Sequence[api_proto.issue_objects_pb2.Issue.ComponentValue]
+    """Convert the status string on issue into a ComponentValue."""
+    component_values = []
+    component_ids = itertools.chain(
+        issue.component_ids, issue.derived_component_ids)
+    ids_to_names = rnc.ConvertComponentDefNames(
+        self.cnxn, component_ids, issue.project_id, self.services)
+
+    for component_id in issue.component_ids:
+      if component_id in ids_to_names:
+        component_values.append(
+            issue_objects_pb2.Issue.ComponentValue(
+                component=ids_to_names[component_id],
+                derivation=issue_objects_pb2.Derivation.Value(
+                    'EXPLICIT')))
+    for derived_component_id in issue.derived_component_ids:
+      if derived_component_id in ids_to_names:
+        component_values.append(
+            issue_objects_pb2.Issue.ComponentValue(
+                component=ids_to_names[derived_component_id],
+                derivation=issue_objects_pb2.Derivation.Value('RULE')))
+
+    return component_values
+
+  def _ConvertStatusValue(self, issue):
+    # proto.tracker_pb2.Issue -> api_proto.issue_objects_pb2.Issue.StatusValue
+    """Convert the status string on issue into a StatusValue."""
+    derivation = issue_objects_pb2.Derivation.Value(
+        'DERIVATION_UNSPECIFIED')
+    if issue.status:
+      derivation = issue_objects_pb2.Derivation.Value('EXPLICIT')
+    else:
+      derivation = issue_objects_pb2.Derivation.Value('RULE')
+    return issue_objects_pb2.Issue.StatusValue(
+        status=issue.status or issue.derived_status, derivation=derivation)
+
+  def _ConvertAmendments(self, amendments, user_display_names):
+    # type: (Sequence[proto.tracker_pb2.Amendment], Mapping[int, str]) ->
+    #     Sequence[api_proto.issue_objects_pb2.Comment.Amendment]
+    """Convert protorpc Amendments to protoc Amendments.
+
+    Args:
+      amendments: the amendments to convert
+      user_display_names: map from user_id to display name for all users
+          involved in the amendments.
+
+    Returns:
+      The converted amendments.
+    """
+    results = []
+    for amendment in amendments:
+      field_name = tbo.GetAmendmentFieldName(amendment)
+      new_value = tbo.AmendmentString_New(amendment, user_display_names)
+      results.append(
+          issue_objects_pb2.Comment.Amendment(
+              field_name=field_name,
+              new_or_delta_value=new_value,
+              old_value=amendment.oldvalue))
+    return results
+
+  def _ConvertAttachments(self, attachments, project_name):
+    # type: (Sequence[proto.tracker_pb2.Attachment], str) ->
+    #     Sequence[api_proto.issue_objects_pb2.Comment.Attachment]
+    """Convert protorpc Attachments to protoc Attachments."""
+    results = []
+    for attach in attachments:
+      if attach.deleted:
+        state = issue_objects_pb2.IssueContentState.Value('DELETED')
+        size, thumbnail_uri, view_uri, download_uri = None, None, None, None
+      else:
+        state = issue_objects_pb2.IssueContentState.Value('ACTIVE')
+        size = attach.filesize
+        download_uri = attachment_helpers.GetDownloadURL(attach.attachment_id)
+        view_uri = attachment_helpers.GetViewURL(
+            attach, download_uri, project_name)
+        thumbnail_uri = attachment_helpers.GetThumbnailURL(attach, download_uri)
+      results.append(
+          issue_objects_pb2.Comment.Attachment(
+              filename=attach.filename,
+              state=state,
+              size=size,
+              media_type=attach.mimetype,
+              thumbnail_uri=thumbnail_uri,
+              view_uri=view_uri,
+              download_uri=download_uri))
+    return results
+
+  def ConvertComments(self, issue_id, comments):
+    # type: (int, Sequence[proto.tracker_pb2.IssueComment])
+    #     -> Sequence[api_proto.issue_objects_pb2.Comment]
+    """Convert protorpc IssueComments from issue into protoc Comments."""
+    issue = self.services.issue.GetIssue(self.cnxn, issue_id)
+    users_by_id = self.services.user.GetUsersByIDs(
+        self.cnxn, tbo.UsersInvolvedInCommentList(comments))
+    (user_display_names,
+     _user_display_emails) = framework_bizobj.CreateUserDisplayNamesAndEmails(
+         self.cnxn, self.services, self.user_auth, users_by_id.values())
+    comment_names_dict = rnc.CreateCommentNames(
+        issue.local_id, issue.project_name,
+        [comment.sequence for comment in comments])
+    approval_ids = [
+        comment.approval_id
+        for comment in comments
+        if comment.approval_id is not None  # In case of a 0 approval_id.
+    ]
+    approval_ids_to_names = rnc.ConvertApprovalDefNames(
+        self.cnxn, approval_ids, issue.project_id, self.services)
+
+    converted_comments = []
+    for comment in comments:
+      if comment.is_spam:
+        state = issue_objects_pb2.IssueContentState.Value('SPAM')
+      elif comment.deleted_by:
+        state = issue_objects_pb2.IssueContentState.Value('DELETED')
+      else:
+        state = issue_objects_pb2.IssueContentState.Value('ACTIVE')
+      comment_type = issue_objects_pb2.Comment.Type.Value('COMMENT')
+      if comment.is_description:
+        comment_type = issue_objects_pb2.Comment.Type.Value('DESCRIPTION')
+      converted_attachments = self._ConvertAttachments(
+          comment.attachments, issue.project_name)
+      converted_amendments = self._ConvertAmendments(
+          comment.amendments, user_display_names)
+      converted_comment = issue_objects_pb2.Comment(
+          name=comment_names_dict[comment.sequence],
+          state=state,
+          type=comment_type,
+          create_time=timestamp_pb2.Timestamp(seconds=comment.timestamp),
+          attachments=converted_attachments,
+          amendments=converted_amendments)
+      if comment.content:
+        converted_comment.content = comment.content
+      if comment.user_id:
+        converted_comment.commenter = rnc.ConvertUserName(comment.user_id)
+      if comment.inbound_message:
+        converted_comment.inbound_message = comment.inbound_message
+      if comment.approval_id and comment.approval_id in approval_ids_to_names:
+        converted_comment.approval = approval_ids_to_names[comment.approval_id]
+      converted_comments.append(converted_comment)
+    return converted_comments
+
+  def ConvertIssue(self, issue):
+    # type: (proto.tracker_pb2.Issue) -> api_proto.issue_objects_pb2.Issue
+    """Convert a protorpc Issue into a protoc Issue."""
+    issues = self.ConvertIssues([issue])
+    if len(issues) < 1:
+      raise exceptions.NoSuchIssueException()
+    if len(issues) > 1:
+      logging.warning('More than one converted issue returned: %s', issues)
+    return issues[0]
+
+  def ConvertIssues(self, issues):
+    # type: (Sequence[proto.tracker_pb2.Issue]) ->
+    #     Sequence[api_proto.issue_objects_pb2.Issue]
+    """Convert protorpc Issues into protoc Issues."""
+    issue_ids = [issue.issue_id for issue in issues]
+    issue_names_dict = rnc.ConvertIssueNames(
+        self.cnxn, issue_ids, self.services)
+    found_issues = [
+        issue for issue in issues if issue.issue_id in issue_names_dict
+    ]
+    converted_issues = []
+    for issue in found_issues:
+      status = self._ConvertStatusValue(issue)
+      content_state = issue_objects_pb2.IssueContentState.Value(
+          'STATE_UNSPECIFIED')
+      if issue.is_spam:
+        content_state = issue_objects_pb2.IssueContentState.Value('SPAM')
+      elif issue.deleted:
+        content_state = issue_objects_pb2.IssueContentState.Value('DELETED')
+      else:
+        content_state = issue_objects_pb2.IssueContentState.Value('ACTIVE')
+
+      owner = None
+      # Explicit values override values derived from rules.
+      if issue.owner_id:
+        owner = issue_objects_pb2.Issue.UserValue(
+            derivation=issue_objects_pb2.Derivation.Value('EXPLICIT'),
+            user=rnc.ConvertUserName(issue.owner_id))
+      elif issue.derived_owner_id:
+        owner = issue_objects_pb2.Issue.UserValue(
+            derivation=issue_objects_pb2.Derivation.Value('RULE'),
+            user=rnc.ConvertUserName(issue.derived_owner_id))
+
+      cc_users = []
+      for cc_user_id in issue.cc_ids:
+        cc_users.append(
+            issue_objects_pb2.Issue.UserValue(
+                derivation=issue_objects_pb2.Derivation.Value('EXPLICIT'),
+                user=rnc.ConvertUserName(cc_user_id)))
+      for derived_cc_user_id in issue.derived_cc_ids:
+        cc_users.append(
+            issue_objects_pb2.Issue.UserValue(
+                derivation=issue_objects_pb2.Derivation.Value('RULE'),
+                user=rnc.ConvertUserName(derived_cc_user_id)))
+
+      labels = self.ConvertLabels(
+          issue.labels, issue.derived_labels, issue.project_id)
+      components = self._ConvertComponentValues(issue)
+      non_approval_fvs = self._GetNonApprovalFieldValues(
+          issue.field_values, issue.project_id)
+      field_values = self.ConvertFieldValues(
+          non_approval_fvs, issue.project_id, issue.phases)
+      field_values.extend(
+          self.ConvertEnumFieldValues(
+              issue.labels, issue.derived_labels, issue.project_id))
+      related_issue_ids = (
+          [issue.merged_into] + issue.blocked_on_iids + issue.blocking_iids)
+      issue_names_by_ids = rnc.ConvertIssueNames(
+          self.cnxn, related_issue_ids, self.services)
+      merged_into_issue_ref = None
+      if issue.merged_into and issue.merged_into in issue_names_by_ids:
+        merged_into_issue_ref = issue_objects_pb2.IssueRef(
+            issue=issue_names_by_ids[issue.merged_into])
+      if issue.merged_into_external:
+        merged_into_issue_ref = issue_objects_pb2.IssueRef(
+            ext_identifier=issue.merged_into_external)
+
+      blocked_on_issue_refs = [
+          issue_objects_pb2.IssueRef(issue=issue_names_by_ids[iid])
+          for iid in issue.blocked_on_iids
+          if iid in issue_names_by_ids
+      ]
+      blocked_on_issue_refs.extend(
+          issue_objects_pb2.IssueRef(
+              ext_identifier=blocked_on.ext_issue_identifier)
+          for blocked_on in issue.dangling_blocked_on_refs)
+
+      blocking_issue_refs = [
+          issue_objects_pb2.IssueRef(issue=issue_names_by_ids[iid])
+          for iid in issue.blocking_iids
+          if iid in issue_names_by_ids
+      ]
+      blocking_issue_refs.extend(
+          issue_objects_pb2.IssueRef(
+              ext_identifier=blocking.ext_issue_identifier)
+          for blocking in issue.dangling_blocking_refs)
+      # All other timestamps were set when the issue was created.
+      close_time = None
+      if issue.closed_timestamp:
+        close_time = timestamp_pb2.Timestamp(seconds=issue.closed_timestamp)
+
+      phases = self._ComputePhases(issue.phases)
+
+      result = issue_objects_pb2.Issue(
+          name=issue_names_dict[issue.issue_id],
+          summary=issue.summary,
+          state=content_state,
+          status=status,
+          reporter=rnc.ConvertUserName(issue.reporter_id),
+          owner=owner,
+          cc_users=cc_users,
+          labels=labels,
+          components=components,
+          field_values=field_values,
+          merged_into_issue_ref=merged_into_issue_ref,
+          blocked_on_issue_refs=blocked_on_issue_refs,
+          blocking_issue_refs=blocking_issue_refs,
+          create_time=timestamp_pb2.Timestamp(seconds=issue.opened_timestamp),
+          close_time=close_time,
+          modify_time=timestamp_pb2.Timestamp(seconds=issue.modified_timestamp),
+          component_modify_time=timestamp_pb2.Timestamp(
+              seconds=issue.component_modified_timestamp),
+          status_modify_time=timestamp_pb2.Timestamp(
+              seconds=issue.status_modified_timestamp),
+          owner_modify_time=timestamp_pb2.Timestamp(
+              seconds=issue.owner_modified_timestamp),
+          star_count=issue.star_count,
+          phases=phases)
+      # TODO(crbug.com/monorail/5857): Set attachment_count unconditionally
+      # after the underlying source of negative attachment counts has been
+      # resolved and database has been repaired.
+      if issue.attachment_count >= 0:
+        result.attachment_count = issue.attachment_count
+      converted_issues.append(result)
+    return converted_issues
+
+  def IngestAttachmentUploads(self, attachment_uploads):
+    # type: (Sequence[api_proto.issues_pb2.AttachmentUpload] ->
+    #     Sequence[framework_helpers.AttachmentUpload])
+    """Ingests protoc AttachmentUploads into framework_helpers.AttachUploads."""
+    ingested_uploads = []
+    with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+      for up in attachment_uploads:
+        if not up.filename or not up.content:
+          err_agg.AddErrorMessage(
+              'Uploaded atachment missing filename or content')
+        mimetype = filecontent.GuessContentTypeFromFilename(up.filename)
+        ingested_uploads.append(
+            framework_helpers.AttachmentUpload(
+                up.filename, up.content, mimetype))
+
+    return ingested_uploads
+
+  def IngestIssueDeltas(self, issue_deltas):
+    # type: (Sequence[api_proto.issues_pb2.IssueDelta]) ->
+    #     Sequence[Tuple[int, proto.tracker_pb2.IssueDelta]]
+    """Ingests protoc IssueDeltas, into protorpc IssueDeltas.
+
+    Args:
+      issue_deltas: the protoc IssueDeltas to ingest.
+
+    Returns:
+      A list of (issue_id, tracker_pb2.IssueDelta) tuples that contain
+      values found in issue_deltas, ignoring all OUTPUT_ONLY and masked
+      fields.
+
+    Raises:
+      InputException: if any fields in the approval_deltas were invalid.
+      NoSuchProjectException: if any parent projects are not found.
+      NoSuchIssueException: if any issues are not found.
+      NoSuchComponentException: if any components are not found.
+    """
+    issue_names = [delta.issue.name for delta in issue_deltas]
+    issue_ids = rnc.IngestIssueNames(self.cnxn, issue_names, self.services)
+    issues_dict, misses = self.services.issue.GetIssuesDict(
+        self.cnxn, issue_ids)
+    if misses:
+      logging.info(
+          'Issues not found for supposedly valid issue_ids: %r' % misses)
+      raise ValueError('Could not fetch some issues.')
+    configs_by_pid = self.services.config.GetProjectConfigs(
+        self.cnxn, {issue.project_id for issue in issues_dict.values()})
+
+    with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+      for api_delta in issue_deltas:
+        if not api_delta.HasField('update_mask'):
+          err_agg.AddErrorMessage(
+              '`update_mask` must be set for {} delta.', api_delta.issue.name)
+        elif not api_delta.update_mask.IsValidForDescriptor(
+            issue_objects_pb2.Issue.DESCRIPTOR):
+          err_agg.AddErrorMessage(
+              'Invalid `update_mask` for {} delta.', api_delta.issue.name)
+
+    ingested = []
+    for iid, api_delta in zip(issue_ids, issue_deltas):
+      delta = tracker_pb2.IssueDelta()
+
+      # Check non-repeated fields before MergeMessage because in an object
+      # where fields are not set and with a FieldMask applied, there is no
+      # way to tell if empty fields were explicitly listed or not listed
+      # in the FieldMask.
+      paths_set = set(api_delta.update_mask.paths)
+      if (not paths_set.isdisjoint({'status', 'status.status'}) and
+          api_delta.issue.status.status):
+        delta.status = api_delta.issue.status.status
+      elif 'status.status' in paths_set and not api_delta.issue.status.status:
+        delta.status = ''
+
+      if (not paths_set.isdisjoint({'owner', 'owner.user'}) and
+          api_delta.issue.owner.user):
+        delta.owner_id = rnc.IngestUserName(
+              self.cnxn, api_delta.issue.owner.user, self.services)
+      elif 'owner.user' in paths_set and not api_delta.issue.owner.user:
+        delta.owner_id = framework_constants.NO_USER_SPECIFIED
+
+      if 'summary' in paths_set:
+        if api_delta.issue.summary:
+          delta.summary = api_delta.issue.summary
+        else:
+          delta.summary = ''
+
+      merge_ref = api_delta.issue.merged_into_issue_ref
+      if 'merged_into_issue_ref' in paths_set:
+        if (api_delta.issue.merged_into_issue_ref.issue or
+            api_delta.issue.merged_into_issue_ref.ext_identifier):
+          ingested_ref = self._IngestIssueRef(merge_ref)
+          if isinstance(ingested_ref, tracker_pb2.DanglingIssueRef):
+            delta.merged_into_external = ingested_ref.ext_issue_identifier
+          else:
+            delta.merged_into = ingested_ref
+      elif 'merged_into_issue_ref.issue' in paths_set:
+        if api_delta.issue.merged_into_issue_ref.issue:
+          delta.merged_into = self._IngestIssueRef(merge_ref)
+        else:
+          delta.merged_into = 0
+      elif 'merged_into_issue_ref.ext_identifier' in paths_set:
+        if api_delta.issue.merged_into_issue_ref.ext_identifier:
+          ingested_ref = self._IngestIssueRef(merge_ref)
+          delta.merged_into_external = ingested_ref.ext_issue_identifier
+        else:
+          delta.merged_into_external = ''
+
+      filtered_api_issue = issue_objects_pb2.Issue()
+      api_delta.update_mask.MergeMessage(
+          api_delta.issue,
+          filtered_api_issue,
+          replace_message_field=True,
+          replace_repeated_field=True)
+
+      cc_names = [name for name in api_delta.ccs_remove] + [
+          user_value.user for user_value in filtered_api_issue.cc_users
+      ]
+      cc_ids = rnc.IngestUserNames(self.cnxn, cc_names, self.services)
+      delta.cc_ids_remove = cc_ids[:len(api_delta.ccs_remove)]
+      delta.cc_ids_add = cc_ids[len(api_delta.ccs_remove):]
+
+      comp_names = [component for component in api_delta.components_remove] + [
+          c_value.component for c_value in filtered_api_issue.components
+      ]
+      project_comp_ids = rnc.IngestComponentDefNames(
+          self.cnxn, comp_names, self.services)
+      comp_ids = [comp_id for (_pid, comp_id) in project_comp_ids]
+      delta.comp_ids_remove = comp_ids[:len(api_delta.components_remove)]
+      delta.comp_ids_add = comp_ids[len(api_delta.components_remove):]
+
+      # Added to delta below, after ShiftEnumFieldsIntoLabels.
+      labels_add = [value.label for value in filtered_api_issue.labels]
+      labels_remove = [label for label in api_delta.labels_remove]
+
+      config = configs_by_pid[issues_dict[iid].project_id]
+      fvs_add, add_enums = self._IngestFieldValues(
+          filtered_api_issue.field_values, config)
+      fvs_remove, remove_enums = self._IngestFieldValues(
+          api_delta.field_vals_remove, config)
+      field_helpers.ShiftEnumFieldsIntoLabels(
+          labels_add, labels_remove, add_enums, remove_enums, config)
+      delta.field_vals_add = fvs_add
+      delta.field_vals_remove = fvs_remove
+      delta.labels_add = labels_add
+      delta.labels_remove = labels_remove
+      assert len(add_enums) == 0  # ShiftEnumFieldsIntoLabels clears all enums.
+      assert len(remove_enums) == 0
+
+      blocked_on_iids_rm, blocked_on_dangling_rm = self._IngestIssueRefs(
+          api_delta.blocked_on_issues_remove)
+      delta.blocked_on_remove = blocked_on_iids_rm
+      delta.ext_blocked_on_remove = [
+          ref.ext_issue_identifier for ref in blocked_on_dangling_rm
+      ]
+
+      blocked_on_iids_add, blocked_on_dangling_add = self._IngestIssueRefs(
+          filtered_api_issue.blocked_on_issue_refs)
+      delta.blocked_on_add = blocked_on_iids_add
+      delta.ext_blocked_on_add = [
+          ref.ext_issue_identifier for ref in blocked_on_dangling_add
+      ]
+
+      blocking_iids_rm, blocking_dangling_rm = self._IngestIssueRefs(
+          api_delta.blocking_issues_remove)
+      delta.blocking_remove = blocking_iids_rm
+      delta.ext_blocking_remove = [
+          ref.ext_issue_identifier for ref in blocking_dangling_rm
+      ]
+
+      blocking_iids_add, blocking_dangling_add = self._IngestIssueRefs(
+          filtered_api_issue.blocking_issue_refs)
+      delta.blocking_add = blocking_iids_add
+      delta.ext_blocking_add = [
+          ref.ext_issue_identifier for ref in blocking_dangling_add
+      ]
+
+      ingested.append((iid, delta))
+
+    return ingested
+
+  def IngestApprovalDeltas(self, approval_deltas, setter_id):
+    # type: (Sequence[api_proto.issues_pb2.ApprovalDelta], int) ->
+    #     Sequence[Tuple[int, int, proto.tracker_pb2.ApprovalDelta]]
+    """Ingests protoc ApprovalDeltas into protorpc ApprovalDeltas.
+
+    Args:
+      approval_deltas: the protoc ApprovalDeltas to ingest.
+      setter_id: The ID for the user setting the deltas.
+
+    Returns:
+      Sequence of (issue_id, approval_id, ApprovalDelta) tuples in the order
+      provided. The ApprovalDeltas ignore all OUTPUT_ONLY and masked fields.
+      The tuples are "delta_specifications;" they identify one requested change.
+
+    Raises:
+      InputException: if any fields in the approval_delta protos were invalid.
+      NoSuchProjectException: if the parent project of any ApprovalValue isn't
+          found.
+      NoSuchIssueException: if the issue of any ApprovalValue isn't found.
+      NoSuchUserException: if any user value was provided with an invalid email.
+          Note that users specified by ID are not checked for existence.
+    """
+    delta_specifications = []
+    set_on = int(time.time())  # Use the same timestamp for all deltas.
+    for approval_delta in approval_deltas:
+      approval_name = approval_delta.approval_value.name
+      # TODO(crbug/monorail/8173): Aggregate errors.
+      project_id, issue_id, approval_id = rnc.IngestApprovalValueName(
+          self.cnxn, approval_name, self.services)
+
+      if not approval_delta.HasField('update_mask'):
+        raise exceptions.InputException(
+            '`update_mask` must be set for %s delta.' % approval_name)
+      elif not approval_delta.update_mask.IsValidForDescriptor(
+          issue_objects_pb2.ApprovalValue.DESCRIPTOR):
+        raise exceptions.InputException(
+            'Invalid `update_mask` for %s delta.' % approval_name)
+      filtered_value = issue_objects_pb2.ApprovalValue()
+      approval_delta.update_mask.MergeMessage(
+          approval_delta.approval_value,
+          filtered_value,
+          replace_message_field=True,
+          replace_repeated_field=True)
+      status = _APPROVAL_STATUS_INGEST[filtered_value.status]
+      # Approvers
+      # No autocreate.
+      # A user may try to remove all existing approvers [a, b] and add another
+      # approver [c]. If they mis-type `c` and we auto-create `c` instead of
+      # raising error, this would cause the ApprovalValue to be editable by no
+      # one but site admins.
+      approver_ids_add = rnc.IngestUserNames(
+          self.cnxn, filtered_value.approvers, self.services, autocreate=False)
+      approver_ids_remove = rnc.IngestUserNames(
+          self.cnxn,
+          approval_delta.approvers_remove,
+          self.services,
+          autocreate=False)
+
+      # Field Values.
+      config = self.services.config.GetProjectConfig(self.cnxn, project_id)
+      approval_fds_by_id = {
+          fd.field_id: fd
+          for fd in config.field_defs
+          if fd.field_type is tracker_pb2.FieldTypes.APPROVAL_TYPE
+      }
+      if approval_id not in approval_fds_by_id:
+        raise exceptions.InputException(
+            'Approval not found in project for %s' % approval_name)
+
+      sub_fvs_add, add_enums = self._IngestFieldValues(
+          filtered_value.field_values, config, approval_id_filter=approval_id)
+      sub_fvs_remove, remove_enums = self._IngestFieldValues(
+          approval_delta.field_vals_remove,
+          config,
+          approval_id_filter=approval_id)
+      labels_add = []
+      labels_remove = []
+      field_helpers.ShiftEnumFieldsIntoLabels(
+          labels_add, labels_remove, add_enums, remove_enums, config)
+      assert len(add_enums) == 0  # ShiftEnumFieldsIntoLabels clears all enums.
+      assert len(remove_enums) == 0
+      delta = tbo.MakeApprovalDelta(
+          status,
+          setter_id,
+          approver_ids_add,
+          approver_ids_remove,
+          sub_fvs_add,
+          sub_fvs_remove, [],
+          labels_add,
+          labels_remove,
+          set_on=set_on)
+      delta_specifications.append((issue_id, approval_id, delta))
+    return delta_specifications
+
+  def IngestIssue(self, issue, project_id):
+    # type: (api_proto.issue_objects_pb2.Issue, int) -> proto.tracker_pb2.Issue
+    """Ingest a protoc Issue into a protorpc Issue.
+
+    Args:
+      issue: the protoc issue to ingest.
+      project_id: The project into which we're ingesting `issue`.
+
+    Returns:
+      protorpc version of issue, ignoring all OUTPUT_ONLY fields.
+
+    Raises:
+      InputException: if any fields in the 'issue' proto were invalid.
+      NoSuchProjectException: if 'project_id' is not found.
+    """
+    # Get config first. We can't ingest the issue if the project isn't found.
+    config = self.services.config.GetProjectConfig(self.cnxn, project_id)
+    ingestedDict = {
+      'project_id': project_id,
+      'summary': issue.summary
+    }
+    with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+      self._ExtractOwner(issue, ingestedDict, err_agg)
+
+      # Extract ccs.
+      try:
+        ingestedDict['cc_ids'] = rnc.IngestUserNames(
+            self.cnxn, [cc.user for cc in issue.cc_users], self.services,
+            autocreate=True)
+      except exceptions.InputException as e:
+        err_agg.AddErrorMessage('Error ingesting cc_users: {}', e)
+
+      # Extract status.
+      if issue.HasField('status') and issue.status.status:
+        ingestedDict['status'] = issue.status.status
+      else:
+        err_agg.AddErrorMessage('Status is required when creating an issue')
+
+      # Extract components.
+      try:
+        project_comp_ids = rnc.IngestComponentDefNames(
+            self.cnxn, [cv.component for cv in issue.components], self.services)
+        ingestedDict['component_ids'] = [
+            comp_id for (_pid, comp_id) in project_comp_ids]
+      except (exceptions.InputException, exceptions.NoSuchProjectException,
+              exceptions.NoSuchComponentException) as e:
+        err_agg.AddErrorMessage('Error ingesting components: {}', e)
+
+      # Extract labels and field values.
+      ingestedDict['labels'] = [lv.label for lv in issue.labels]
+      try:
+        ingestedDict['field_values'], enums = self._IngestFieldValues(
+            issue.field_values, config)
+        field_helpers.ShiftEnumFieldsIntoLabels(
+            ingestedDict['labels'], [], enums, [], config)
+        assert len(
+            enums) == 0  # ShiftEnumFieldsIntoLabels must clear all enums.
+      except exceptions.InputException as e:
+        err_agg.AddErrorMessage(e.message)
+
+      # Ingest merged, blocking/blocked_on.
+      self._ExtractIssueRefs(issue, ingestedDict, err_agg)
+    return tracker_pb2.Issue(**ingestedDict)
+
+  def _IngestFieldValues(self, field_values, config, approval_id_filter=None):
+    # type: (Sequence[api_proto.issue_objects.FieldValue],
+    #     proto.tracker_pb2.ProjectIssueConfig, Optional[int]) ->
+    #     Tuple[Sequence[proto.tracker_pb2.FieldValue],
+    #         Mapping[int, Sequence[str]]]
+    """Returns protorpc FieldValues for the given protoc FieldValues.
+
+    Raises exceptions if any field could not be parsed for any reasons such as
+        unsupported field type, non-existent field, field from different
+        projects, or fields with mismatched parent approvals.
+
+    Args:
+      field_values: protoc FieldValues to ingest.
+      config: ProjectIssueConfig for the FieldValues we're ingesting.
+      approval_id_filter: an approval_id, including any FieldValues that does
+          not have this approval as a parent will trigger InputException.
+
+    Returns:
+      A pair 1) Ingested FieldValues. 2) A mapping of field ids to values
+      for ENUM_TYPE fields in 'field_values.'
+
+    Raises:
+      InputException: if any fields_values could not be parsed for any reasons
+          such as unsupported field type, non-existent field, or field from
+          different projects.
+    """
+    fds_by_id = {fd.field_id: fd for fd in config.field_defs}
+    enums = {}
+    ingestedFieldValues = []
+    with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+      for fv in field_values:
+        try:
+          project_id, fd_id = rnc.IngestFieldDefName(
+              self.cnxn, fv.field, self.services)
+          fd = fds_by_id[fd_id]
+          # Raise if field does not belong to approval_id_filter (if provided).
+          if (approval_id_filter is not None and
+              fd.approval_id != approval_id_filter):
+            approval_name = rnc.ConvertApprovalDefNames(
+                self.cnxn, [approval_id_filter], project_id,
+                self.services)[approval_id_filter]
+            err_agg.AddErrorMessage(
+                'Field {} does not belong to approval {}', fv.field,
+                approval_name)
+            continue
+          if fd.field_type == tracker_pb2.FieldTypes.ENUM_TYPE:
+            enums.setdefault(fd_id, []).append(fv.value)
+          else:
+            ingestedFieldValues.append(self._IngestFieldValue(fv, fd))
+        except (exceptions.InputException, exceptions.NoSuchProjectException,
+                exceptions.NoSuchFieldDefException, ValueError) as e:
+          err_agg.AddErrorMessage(
+              'Could not ingest value ({}) for FieldDef ({}): {}', fv.value,
+              fv.field, e)
+        except exceptions.NoSuchUserException as e:
+          err_agg.AddErrorMessage(
+              'User ({}) not found when ingesting user field: {}', fv.value,
+              fv.field)
+        except KeyError as e:
+          err_agg.AddErrorMessage('Field {} is not in this project', fv.field)
+    return ingestedFieldValues, enums
+
+  def _IngestFieldValue(self, field_value, field_def):
+    # type: (api_proto.issue_objects.FieldValue, proto.tracker_pb2.FieldDef) ->
+    #     proto.tracker_pb2.FieldValue
+    """Ingest a protoc FieldValue into a protorpc FieldValue.
+
+    Args:
+      field_value: protoc FieldValue to ingest.
+      field_def: protorpc FieldDef associated with 'field_value'.
+          BOOL_TYPE and APPROVAL_TYPE are ignored.
+          Enum values are not allowed. They must be ingested as labels.
+
+    Returns:
+      Ingested protorpc FieldValue.
+
+    Raises:
+      InputException if 'field_def' is USER_TYPE and 'field_value' does not
+          have a valid formatted resource name.
+      NoSuchUserException if specified user in field does not exist.
+      ValueError if 'field_value' could not be parsed for 'field_def'.
+    """
+    assert field_def.field_type != tracker_pb2.FieldTypes.ENUM_TYPE
+    if field_def.field_type == tracker_pb2.FieldTypes.USER_TYPE:
+      return self._ParseOneUserFieldValue(field_value.value, field_def.field_id)
+    fv = field_helpers.ParseOneFieldValue(
+        self.cnxn, self.services.user, field_def, field_value.value)
+    # ParseOneFieldValue currently ignores parsing errors, although it has TODOs
+    # to raise them.
+    if not fv:
+      raise ValueError('Could not parse %s' % field_value.value)
+    return fv
+
+  def _ParseOneUserFieldValue(self, value, field_id):
+    # type: (str, int) -> proto.tracker_pb2.FieldValue
+    """Replacement for the obsolete user parsing in ParseOneFieldValue."""
+    user_id = rnc.IngestUserName(self.cnxn, value, self.services)
+    return tbo.MakeFieldValue(field_id, None, None, user_id, None, None, False)
+
+  def _ExtractOwner(self, issue, ingestedDict, err_agg):
+    # type: (api_proto.issue_objects_pb2.Issue, Dict[str, Any], ErrorAggregator)
+    #     -> None
+    """Fills 'owner' into `ingestedDict`, if it can be extracted."""
+    if issue.HasField('owner'):
+      try:
+        # Unlike for cc's, we require owner be an existing user, thus call we
+        # do not autocreate.
+        ingestedDict['owner_id'] = rnc.IngestUserName(
+            self.cnxn, issue.owner.user, self.services, autocreate=False)
+      except exceptions.InputException as e:
+        err_agg.AddErrorMessage(
+            'Error ingesting owner ({}): {}', issue.owner.user, e)
+      except exceptions.NoSuchUserException as e:
+        err_agg.AddErrorMessage(
+            'User ({}) not found when ingesting owner', e)
+    else:
+      ingestedDict['owner_id'] = framework_constants.NO_USER_SPECIFIED
+
+  def _ExtractIssueRefs(self, issue, ingestedDict, err_agg):
+    # type: (api_proto.issue_objects_pb2.Issue, Dict[str, Any], ErrorAggregator)
+    #     -> None
+    """Fills issue relationships into `ingestedDict` from `issue`."""
+    if issue.HasField('merged_into_issue_ref'):
+      try:
+        merged_into_ref = self._IngestIssueRef(issue.merged_into_issue_ref)
+        if isinstance(merged_into_ref, tracker_pb2.DanglingIssueRef):
+          ingestedDict['merged_into_external'] = (
+              merged_into_ref.ext_issue_identifier)
+        else:
+          ingestedDict['merged_into'] = merged_into_ref
+      except exceptions.InputException as e:
+        err_agg.AddErrorMessage(
+            'Error ingesting ref {}: {}', issue.merged_into_issue_ref, e)
+    try:
+      iids, dangling_refs = self._IngestIssueRefs(issue.blocked_on_issue_refs)
+      ingestedDict['blocked_on_iids'] = iids
+      ingestedDict['dangling_blocked_on_refs'] = dangling_refs
+    except exceptions.InputException as e:
+      err_agg.AddErrorMessage(e.message)
+    try:
+      iids, dangling_refs = self._IngestIssueRefs(issue.blocking_issue_refs)
+      ingestedDict['blocking_iids'] = iids
+      ingestedDict['dangling_blocking_refs'] = dangling_refs
+    except exceptions.InputException as e:
+      err_agg.AddErrorMessage(e.message)
+
+  def _IngestIssueRefs(self, issue_refs):
+    # type: (api_proto.issue_objects.IssueRf) ->
+    #     Tuple[Sequence[int], Sequence[tracker_pb2.DanglingIssueRef]]
+    """Given protoc IssueRefs, returns issue_ids and DanglingIssueRefs."""
+    issue_ids = []
+    external_refs = []
+    with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+      for ref in issue_refs:
+        try:
+          ingested_ref = self._IngestIssueRef(ref)
+          if isinstance(ingested_ref, tracker_pb2.DanglingIssueRef):
+            external_refs.append(ingested_ref)
+          else:
+            issue_ids.append(ingested_ref)
+        except (exceptions.InputException, exceptions.NoSuchIssueException,
+                exceptions.NoSuchProjectException) as e:
+          err_agg.AddErrorMessage('Error ingesting ref {}: {}', ref, e)
+
+    return issue_ids, external_refs
+
+  def _IngestIssueRef(self, issue_ref):
+    # type: (api_proto.issue_objects.IssueRef) ->
+    #     Union[int, tracker_pb2.DanglingIssueRef]
+    """Given a protoc IssueRef, returns an issue id or DanglingIssueRef."""
+    if issue_ref.issue and issue_ref.ext_identifier:
+      raise exceptions.InputException(
+        'IssueRefs MUST NOT have both `issue` and `ext_identifier`')
+    if issue_ref.issue:
+      return rnc.IngestIssueName(self.cnxn, issue_ref.issue, self.services)
+    if issue_ref.ext_identifier:
+      # TODO(crbug.com/monorail/7208): Handle ingestion/conversion of CodeSite
+      # refs. We may be able to avoid ever needing to ingest them.
+      return tracker_pb2.DanglingIssueRef(
+          ext_issue_identifier=issue_ref.ext_identifier
+        )
+    raise exceptions.InputException(
+        'IssueRefs MUST have one of `issue` and `ext_identifier`')
+
+  def IngestIssuesListColumns(self, issues_list_columns):
+    # type: (Sequence[proto.issue_objects_pb2.IssuesListColumn] -> str
+    """Ingest a list of protoc IssueListColumns and returns a string."""
+    return ' '.join([col.column for col in issues_list_columns])
+
+  def _ComputeIssuesListColumns(self, columns):
+    # type: (string) -> Sequence[api_proto.issue_objects_pb2.IssuesListColumn]
+    """Convert string representation of columns to protoc IssuesListColumns"""
+    return [
+        issue_objects_pb2.IssuesListColumn(column=col)
+        for col in columns.split()
+    ]
+
+  def IngestNotifyType(self, notify):
+    # type: (issue_pb.NotifyType) -> bool
+    """Ingest a NotifyType to boolean."""
+    if (notify == issues_pb2.NotifyType.Value('NOTIFY_TYPE_UNSPECIFIED') or
+        notify == issues_pb2.NotifyType.Value('EMAIL')):
+      return True
+    elif notify == issues_pb2.NotifyType.Value('NO_NOTIFICATION'):
+      return False
+
+  # Users
+
+  def ConvertUser(self, user):
+    # type: (protorpc.User) -> api_proto.user_objects_pb2.User
+    """Convert a protorpc User into a protoc User.
+
+    Args:
+      user: protorpc User object.
+
+    Returns:
+      The protoc User object.
+    """
+    return self.ConvertUsers([user.user_id])[user.user_id]
+
+
+  # TODO(crbug/monorail/7238): Make this take in a full User object and
+  # return a Sequence, rather than a map, after hotlist users are converted.
+  def ConvertUsers(self, user_ids):
+    # type: (Sequence[int]) -> Map(int, api_proto.user_objects_pb2.User)
+    """Convert list of protorpc Users into list of protoc Users.
+
+    Args:
+      user_ids: List of User IDs.
+
+    Returns:
+      Dict of User IDs to User protos for given user_ids that could be found.
+    """
+    user_ids_to_names = {}
+
+    # Get display names
+    users_by_id = self.services.user.GetUsersByIDs(self.cnxn, user_ids)
+    (display_names_by_id,
+     display_emails_by_id) = framework_bizobj.CreateUserDisplayNamesAndEmails(
+         self.cnxn, self.services, self.user_auth, users_by_id.values())
+
+    for user_id, user in users_by_id.items():
+      name = rnc.ConvertUserNames([user_id]).get(user_id)
+
+      display_name = display_names_by_id.get(user_id)
+      display_email = display_emails_by_id.get(user_id)
+      availability = framework_helpers.GetUserAvailability(user)
+      availability_message, _availability_status = availability
+
+      user_ids_to_names[user_id] = user_objects_pb2.User(
+          name=name,
+          display_name=display_name,
+          email=display_email,
+          availability_message=availability_message)
+
+    return user_ids_to_names
+
+  def ConvertProjectStars(self, user_id, projects):
+    # type: (int, Collection[protorpc.Project]) ->
+    #     Collection[api_proto.user_objects_pb2.ProjectStar]
+    """Convert list of protorpc Projects into protoc ProjectStars.
+
+    Args:
+      user_id: The user the ProjectStar is associated with.
+      projects: All starred projects.
+
+    Returns:
+      List of ProjectStar messages.
+    """
+    api_project_stars = []
+    for proj in projects:
+      name = rnc.ConvertProjectStarName(
+          self.cnxn, user_id, proj.project_id, self.services)
+      star = user_objects_pb2.ProjectStar(name=name)
+      api_project_stars.append(star)
+    return api_project_stars
+
+  # Field Defs
+
+  def ConvertFieldDefs(self, field_defs, project_id):
+    # type: (Sequence[proto.tracker_pb2.FieldDef], int) ->
+    #     Sequence[api_proto.project_objects_pb2.FieldDef]
+    """Convert sequence of protorpc FieldDefs to protoc FieldDefs.
+
+    Args:
+      field_defs: List of protorpc FieldDefs
+      project_id: ID of the Project that is ancestor to all given
+        `field_defs`.
+
+    Returns:
+      Sequence of protoc FieldDef in the same order they are given in
+      `field_defs`. In the event any field_def or the referenced approval_id
+      in `field_defs` is not found, they will be omitted from the result.
+    """
+    field_ids = [fd.field_id for fd in field_defs]
+    resource_names_dict = rnc.ConvertFieldDefNames(
+        self.cnxn, field_ids, project_id, self.services)
+    parent_approval_ids = [
+        fd.approval_id for fd in field_defs if fd.approval_id is not None
+    ]
+    approval_names_dict = rnc.ConvertApprovalDefNames(
+        self.cnxn, parent_approval_ids, project_id, self.services)
+
+    api_fds = []
+    for fd in field_defs:
+      # Skip over approval fields, they have their separate ApprovalDef
+      if fd.field_type == tracker_pb2.FieldTypes.APPROVAL_TYPE:
+        continue
+      if fd.field_id not in resource_names_dict:
+        continue
+
+      name = resource_names_dict.get(fd.field_id)
+      display_name = fd.field_name
+      docstring = fd.docstring
+      field_type = self._ConvertFieldDefType(fd.field_type)
+      applicable_issue_type = fd.applicable_type
+      admins = rnc.ConvertUserNames(fd.admin_ids).values()
+      editors = rnc.ConvertUserNames(fd.editor_ids).values()
+      traits = self._ComputeFieldDefTraits(fd)
+      approval_parent = approval_names_dict.get(fd.approval_id)
+
+      enum_settings = None
+      if field_type == project_objects_pb2.FieldDef.Type.Value('ENUM'):
+        enum_settings = project_objects_pb2.FieldDef.EnumTypeSettings(
+            choices=self._GetEnumFieldChoices(fd))
+
+      int_settings = None
+      if field_type == project_objects_pb2.FieldDef.Type.Value('INT'):
+        int_settings = project_objects_pb2.FieldDef.IntTypeSettings(
+            min_value=fd.min_value, max_value=fd.max_value)
+
+      str_settings = None
+      if field_type == project_objects_pb2.FieldDef.Type.Value('STR'):
+        str_settings = project_objects_pb2.FieldDef.StrTypeSettings(
+            regex=fd.regex)
+
+      user_settings = None
+      if field_type == project_objects_pb2.FieldDef.Type.Value('USER'):
+        user_settings = project_objects_pb2.FieldDef.UserTypeSettings(
+            role_requirements=self._ConvertRoleRequirements(fd.needs_member),
+            notify_triggers=self._ConvertNotifyTriggers(fd.notify_on),
+            grants_perm=fd.grants_perm,
+            needs_perm=fd.needs_perm)
+
+      date_settings = None
+      if field_type == project_objects_pb2.FieldDef.Type.Value('DATE'):
+        date_settings = project_objects_pb2.FieldDef.DateTypeSettings(
+            date_action=self._ConvertDateAction(fd.date_action))
+
+      api_fd = project_objects_pb2.FieldDef(
+          name=name,
+          display_name=display_name,
+          docstring=docstring,
+          type=field_type,
+          applicable_issue_type=applicable_issue_type,
+          admins=admins,
+          traits=traits,
+          approval_parent=approval_parent,
+          enum_settings=enum_settings,
+          int_settings=int_settings,
+          str_settings=str_settings,
+          user_settings=user_settings,
+          date_settings=date_settings,
+          editors=editors)
+      api_fds.append(api_fd)
+    return api_fds
+
+  def _ConvertDateAction(self, date_action):
+    # type: (proto.tracker_pb2.DateAction) ->
+    #     api_proto.project_objects_pb2.FieldDef.DateTypeSettings.DateAction
+    """Convert protorpc DateAction to protoc
+       FieldDef.DateTypeSettings.DateAction"""
+    if date_action == tracker_pb2.DateAction.NO_ACTION:
+      return project_objects_pb2.FieldDef.DateTypeSettings.DateAction.Value(
+          'NO_ACTION')
+    elif date_action == tracker_pb2.DateAction.PING_OWNER_ONLY:
+      return project_objects_pb2.FieldDef.DateTypeSettings.DateAction.Value(
+          'NOTIFY_OWNER')
+    elif date_action == tracker_pb2.DateAction.PING_PARTICIPANTS:
+      return project_objects_pb2.FieldDef.DateTypeSettings.DateAction.Value(
+          'NOTIFY_PARTICIPANTS')
+    else:
+      raise ValueError('Unsupported DateAction Value')
+
+  def _ConvertRoleRequirements(self, needs_member):
+    # type: (bool) ->
+    #     api_proto.project_objects_pb2.FieldDef.
+    #     UserTypeSettings.RoleRequirements
+    """Convert protorpc RoleRequirements to protoc
+       FieldDef.UserTypeSettings.RoleRequirements"""
+
+    proto_user_settings = project_objects_pb2.FieldDef.UserTypeSettings
+    if needs_member:
+      return proto_user_settings.RoleRequirements.Value('PROJECT_MEMBER')
+    else:
+      return proto_user_settings.RoleRequirements.Value('NO_ROLE_REQUIREMENT')
+
+  def _ConvertNotifyTriggers(self, notify_trigger):
+    # type: (proto.tracker_pb2.NotifyTriggers) ->
+    #     api_proto.project_objects_pb2.FieldDef.UserTypeSettings.NotifyTriggers
+    """Convert protorpc NotifyTriggers to protoc
+       FieldDef.UserTypeSettings.NotifyTriggers"""
+    if notify_trigger == tracker_pb2.NotifyTriggers.NEVER:
+      return project_objects_pb2.FieldDef.UserTypeSettings.NotifyTriggers.Value(
+          'NEVER')
+    elif notify_trigger == tracker_pb2.NotifyTriggers.ANY_COMMENT:
+      return project_objects_pb2.FieldDef.UserTypeSettings.NotifyTriggers.Value(
+          'ANY_COMMENT')
+    else:
+      raise ValueError('Unsupported NotifyTriggers Value')
+
+  def _ConvertFieldDefType(self, field_type):
+    # type: (proto.tracker_pb2.FieldTypes) ->
+    #     api_proto.project_objects_pb2.FieldDef.Type
+    """Convert protorpc FieldType to protoc FieldDef.Type
+
+    Args:
+      field_type: protorpc FieldType
+
+    Returns:
+      Corresponding protoc FieldDef.Type
+
+    Raises:
+      ValueError if input `field_type` has no suitable supported FieldDef.Type,
+      or input `field_type` is not a recognized enum option.
+    """
+    if field_type == tracker_pb2.FieldTypes.ENUM_TYPE:
+      return project_objects_pb2.FieldDef.Type.Value('ENUM')
+    elif field_type == tracker_pb2.FieldTypes.INT_TYPE:
+      return project_objects_pb2.FieldDef.Type.Value('INT')
+    elif field_type == tracker_pb2.FieldTypes.STR_TYPE:
+      return project_objects_pb2.FieldDef.Type.Value('STR')
+    elif field_type == tracker_pb2.FieldTypes.USER_TYPE:
+      return project_objects_pb2.FieldDef.Type.Value('USER')
+    elif field_type == tracker_pb2.FieldTypes.DATE_TYPE:
+      return project_objects_pb2.FieldDef.Type.Value('DATE')
+    elif field_type == tracker_pb2.FieldTypes.URL_TYPE:
+      return project_objects_pb2.FieldDef.Type.Value('URL')
+    else:
+      raise ValueError(
+          'Unsupported tracker_pb2.FieldType enum. Boolean types '
+          'are unsupported and approval types are found in ApprovalDefs')
+
+  def _ComputeFieldDefTraits(self, field_def):
+    # type: (proto.tracker_pb2.FieldDef) ->
+    #     Sequence[api_proto.project_objects_pb2.FieldDef.Traits]
+    """Compute sequence of FieldDef.Traits for a given protorpc FieldDef."""
+    trait_protos = []
+    if field_def.is_required:
+      trait_protos.append(project_objects_pb2.FieldDef.Traits.Value('REQUIRED'))
+    if field_def.is_niche:
+      trait_protos.append(
+          project_objects_pb2.FieldDef.Traits.Value('DEFAULT_HIDDEN'))
+    if field_def.is_multivalued:
+      trait_protos.append(
+          project_objects_pb2.FieldDef.Traits.Value('MULTIVALUED'))
+    if field_def.is_phase_field:
+      trait_protos.append(project_objects_pb2.FieldDef.Traits.Value('PHASE'))
+    if field_def.is_restricted_field:
+      trait_protos.append(
+          project_objects_pb2.FieldDef.Traits.Value('RESTRICTED'))
+    return trait_protos
+
+  def _GetEnumFieldChoices(self, field_def):
+    # type: (proto.tracker_pb2.FieldDef) ->
+    #     Sequence[Choice]
+    """Get sequence of choices for an enum field
+
+    Args:
+      field_def: protorpc FieldDef
+
+    Returns:
+      Sequence of valid Choices for enum field `field_def`.
+
+    Raises:
+      ValueError if input `field_def` is not an enum type field.
+    """
+    if field_def.field_type != tracker_pb2.FieldTypes.ENUM_TYPE:
+      raise ValueError('Cannot get value from label for non-enum-type field')
+
+    config = self.services.config.GetProjectConfig(
+        self.cnxn, field_def.project_id)
+    value_docstr_tuples = tracker_helpers._GetEnumFieldValuesAndDocstrings(
+        field_def, config)
+
+    return [
+        Choice(value=value, docstring=docstring)
+        for value, docstring in value_docstr_tuples
+    ]
+
+  # Field Values
+
+  def _GetNonApprovalFieldValues(self, field_values, project_id):
+    # type: (Sequence[proto.tracker_pb2.FieldValue], int) ->
+    #     Sequence[proto.tracker_pb2.FieldValue]
+    """Filter out field values that belong to an approval field."""
+    config = self.services.config.GetProjectConfig(self.cnxn, project_id)
+    approval_fd_ids = set(
+        [fd.field_id for fd in config.field_defs if fd.approval_id])
+
+    return [fv for fv in field_values if fv.field_id not in approval_fd_ids]
+
+  def ConvertFieldValues(self, field_values, project_id, phases):
+    # type: (Sequence[proto.tracker_pb2.FieldValue], int,
+    #     Sequence[proto.tracker_pb2.Phase]) ->
+    #     Sequence[api_proto.issue_objects_pb2.FieldValue]
+    """Convert sequence of field_values to protoc FieldValues.
+
+    This method does not handle enum_type fields.
+
+    Args:
+      field_values: List of FieldValues
+      project_id: ID of the Project that is ancestor to all given
+        `field_values`.
+      phases: List of Phases
+
+    Returns:
+      Sequence of protoc FieldValues in the same order they are given in
+      `field_values`. In the event any field_values in `field_values` are not
+      found, they will be omitted from the result.
+    """
+    phase_names_by_id = {phase.phase_id: phase.name for phase in phases}
+    field_ids = [fv.field_id for fv in field_values]
+    resource_names_dict = rnc.ConvertFieldDefNames(
+        self.cnxn, field_ids, project_id, self.services)
+
+    api_fvs = []
+    for fv in field_values:
+      if fv.field_id not in resource_names_dict:
+        continue
+
+      name = resource_names_dict.get(fv.field_id)
+      value = self._ComputeFieldValueString(fv)
+      derivation = self._ComputeFieldValueDerivation(fv)
+      phase = phase_names_by_id.get(fv.phase_id)
+      api_item = issue_objects_pb2.FieldValue(
+          field=name, value=value, derivation=derivation, phase=phase)
+      api_fvs.append(api_item)
+
+    return api_fvs
+
+  def _ComputeFieldValueString(self, field_value):
+    # type: (proto.tracker_pb2.FieldValue) -> str
+    """Convert a FieldValue's value to a string."""
+    if field_value is None:
+      raise exceptions.InputException('No FieldValue specified')
+    elif field_value.int_value is not None:
+      return str(field_value.int_value)
+    elif field_value.str_value is not None:
+      return field_value.str_value
+    elif field_value.user_id is not None:
+      return rnc.ConvertUserNames([field_value.user_id
+                                  ]).get(field_value.user_id)
+    elif field_value.date_value is not None:
+      return str(field_value.date_value)
+    elif field_value.url_value is not None:
+      return field_value.url_value
+    else:
+      raise exceptions.InputException('FieldValue must have at least one value')
+
+  def _ComputeFieldValueDerivation(self, field_value):
+    # type: (proto.tracker_pb2.FieldValue) ->
+    #     api_proto.issue_objects_pb2.Issue.Derivation
+    """Convert a FieldValue's 'derived' to a protoc Issue.Derivation.
+
+    Args:
+      field_value: protorpc FieldValue
+
+    Returns:
+      Issue.Derivation of given `field_value`
+    """
+    if field_value.derived:
+      return issue_objects_pb2.Derivation.Value('RULE')
+    else:
+      return issue_objects_pb2.Derivation.Value('EXPLICIT')
+
+  # Approval Def
+
+  def ConvertApprovalDefs(self, approval_defs, project_id):
+    # type: (Sequence[proto.tracker_pb2.ApprovalDef], int) ->
+    #     Sequence[api_proto.project_objects_pb2.ApprovalDef]
+    """Convert sequence of protorpc ApprovalDefs to protoc ApprovalDefs.
+
+    Args:
+      approval_defs: List of protorpc ApprovalDefs
+      project_id: ID of the Project the approval_defs belong to.
+
+    Returns:
+      Sequence of protoc ApprovalDefs in the same order they are given in
+      in `approval_defs`. In the event any approval_def in `approval_defs`
+      are not found, they will be omitted from the result.
+    """
+    approval_ids = set([ad.approval_id for ad in approval_defs])
+    resource_names_dict = rnc.ConvertApprovalDefNames(
+        self.cnxn, approval_ids, project_id, self.services)
+
+    # Get matching field defs, needed to fill out protoc ApprovalDefs
+    config = self.services.config.GetProjectConfig(self.cnxn, project_id)
+    fd_by_id = {}
+    for fd in config.field_defs:
+      if (fd.field_type == tracker_pb2.FieldTypes.APPROVAL_TYPE and
+          fd.field_id in approval_ids):
+        fd_by_id[fd.field_id] = fd
+
+    all_users = tbo.UsersInvolvedInApprovalDefs(
+        approval_defs, fd_by_id.values())
+    user_resource_names_dict = rnc.ConvertUserNames(all_users)
+
+    api_ads = []
+    for ad in approval_defs:
+      if (ad.approval_id not in resource_names_dict or
+          ad.approval_id not in fd_by_id):
+        continue
+      matching_fd = fd_by_id.get(ad.approval_id)
+      name = resource_names_dict.get(ad.approval_id)
+      display_name = matching_fd.field_name
+      docstring = matching_fd.docstring
+      survey = ad.survey
+      approvers = [
+          user_resource_names_dict.get(approver_id)
+          for approver_id in ad.approver_ids
+      ]
+      admins = [
+          user_resource_names_dict.get(admin_id)
+          for admin_id in matching_fd.admin_ids
+      ]
+
+      api_ad = project_objects_pb2.ApprovalDef(
+          name=name,
+          display_name=display_name,
+          docstring=docstring,
+          survey=survey,
+          approvers=approvers,
+          admins=admins)
+      api_ads.append(api_ad)
+    return api_ads
+
+  def ConvertApprovalValues(self, approval_values, field_values, phases,
+                            issue_id=None, project_id=None):
+    # type: (Sequence[proto.tracker_pb2.ApprovalValue],
+    #     Sequence[proto.tracker_pb2.FieldValue],
+    #     Sequence[proto.tracker_pb2.Phase], Optional[int], Optional[int]) ->
+    #     Sequence[api_proto.issue_objects_pb2.ApprovalValue]
+    """Convert sequence of approval_values to protoc ApprovalValues.
+
+    `approval_values` may belong to a template or an issue. If they belong to a
+    template, `project_id` should be given for the project the template is in.
+    If these are issue `approval_values` `issue_id` should be given`.
+    So, one of `issue_id` or `project_id` must be provided.
+    If both are given, we ignore `project_id` and assume the `approval_values`
+    belong to an issue.
+
+    Args:
+      approval_values: List of ApprovalValues.
+      field_values: List of FieldValues that may belong to the approval_values.
+      phases: List of Phases that may be associated with the approval_values.
+      issue_id: ID of the Issue that the `approval_values` belong to.
+      project_id: ID of the Project that the `approval_values`
+        template belongs to.
+
+    Returns:
+      Sequence of protoc ApprovalValues in the same order they are given in
+      in `approval_values`. In the event any approval definitions in
+      `approval_values` are not found, they will be omitted from the result.
+
+    Raises:
+      InputException if neither `issue_id` nor `project_id` is given.
+    """
+
+    approval_ids = [av.approval_id for av in approval_values]
+    resource_names_dict = {}
+    if issue_id is not None:
+      # Only issue approval_values have resource names.
+      resource_names_dict = rnc.ConvertApprovalValueNames(
+          self.cnxn, issue_id, self.services)
+      project_id = self.services.issue.GetIssue(self.cnxn, issue_id).project_id
+    elif project_id is None:
+      raise exceptions.InputException(
+          'One  `issue_id` or `project_id` must be given.')
+
+    phase_names_by_id = {phase.phase_id: phase.name for phase in phases}
+    ad_names_dict = rnc.ConvertApprovalDefNames(
+        self.cnxn, approval_ids, project_id, self.services)
+
+    # Organize the field values by the approval values they are
+    # associated with.
+    config = self.services.config.GetProjectConfig(self.cnxn, project_id)
+    fds_by_id = {fd.field_id: fd for fd in config.field_defs}
+    fvs_by_parent_approvals = collections.defaultdict(list)
+    for fv in field_values:
+      fd = fds_by_id.get(fv.field_id)
+      if fd and fd.approval_id:
+        fvs_by_parent_approvals[fd.approval_id].append(fv)
+
+    api_avs = []
+    for av in approval_values:
+      # We only skip missing approval names if we are converting issue approval
+      # values.
+      if issue_id is not None and av.approval_id not in resource_names_dict:
+        continue
+
+      name = resource_names_dict.get(av.approval_id)
+      approval_def = ad_names_dict.get(av.approval_id)
+      approvers = rnc.ConvertUserNames(av.approver_ids).values()
+      status = self._ComputeApprovalValueStatus(av.status)
+      setter = rnc.ConvertUserName(av.setter_id)
+      phase = phase_names_by_id.get(av.phase_id)
+
+      field_values = self.ConvertFieldValues(
+          fvs_by_parent_approvals[av.approval_id], project_id, phases)
+
+      api_item = issue_objects_pb2.ApprovalValue(
+          name=name,
+          approval_def=approval_def,
+          approvers=approvers,
+          status=status,
+          setter=setter,
+          field_values=field_values,
+          phase=phase)
+      if av.set_on:
+        api_item.set_time.FromSeconds(av.set_on)
+      api_avs.append(api_item)
+
+    return api_avs
+
+  def _ComputeApprovalValueStatus(self, status):
+    # type: (proto.tracker_pb2.ApprovalStatus) ->
+    #     api_proto.issue_objects_pb2.Issue.ApprovalStatus
+    """Convert a protorpc ApprovalStatus to a protoc Issue.ApprovalStatus."""
+    try:
+      return _APPROVAL_STATUS_CONVERT[status]
+    except KeyError:
+      raise ValueError('Unrecognized tracker_pb2.ApprovalStatus enum')
+
+  # Projects
+
+  def ConvertIssueTemplates(self, project_id, templates):
+    # type: (int, Sequence[proto.tracker_pb2.TemplateDef]) ->
+    #     Sequence[api_proto.project_objects_pb2.IssueTemplate]
+    """Convert a Sequence of TemplateDefs to protoc IssueTemplates.
+
+    Args:
+      project_id: ID of the Project the templates belong to.
+      templates: Sequence of TemplateDef protorpc objects.
+
+    Returns:
+      Sequence of protoc IssueTemplate in the same order they are given in
+      `templates`. In the rare event that any templates are not found,
+      they will be omitted from the result.
+    """
+    api_templates = []
+
+    resource_names_dict = rnc.ConvertTemplateNames(
+        self.cnxn, project_id, [template.template_id for template in templates],
+        self.services)
+
+    for template in templates:
+      if template.template_id not in resource_names_dict:
+        continue
+      name = resource_names_dict.get(template.template_id)
+      summary_must_be_edited = template.summary_must_be_edited
+      template_privacy = self._ComputeTemplatePrivacy(template)
+      default_owner = self._ComputeTemplateDefaultOwner(template)
+      component_required = template.component_required
+      admins = rnc.ConvertUserNames(template.admin_ids).values()
+      issue = self._FillIssueFromTemplate(template, project_id)
+      approval_values = self.ConvertApprovalValues(
+          template.approval_values, template.field_values, template.phases,
+          project_id=project_id)
+      api_templates.append(
+          project_objects_pb2.IssueTemplate(
+              name=name,
+              display_name=template.name,
+              issue=issue,
+              approval_values=approval_values,
+              summary_must_be_edited=summary_must_be_edited,
+              template_privacy=template_privacy,
+              default_owner=default_owner,
+              component_required=component_required,
+              admins=admins))
+
+    return api_templates
+
+  def _FillIssueFromTemplate(self, template, project_id):
+    # type: (proto.tracker_pb2.TemplateDef, int) ->
+    #     api_proto.issue_objects_pb2.Issue
+    """Convert a TemplateDef to its embedded protoc Issue.
+
+    IssueTemplate does not set the following fields:
+      name
+      reporter
+      cc_users
+      blocked_on_issue_refs
+      blocking_issue_refs
+      create_time
+      close_time
+      modify_time
+      component_modify_time
+      status_modify_time
+      owner_modify_time
+      attachment_count
+      star_count
+
+    Args:
+      template: TemplateDef protorpc objects.
+      project_id: ID of the Project the template belongs to.
+
+    Returns:
+      protoc Issue filled with data from given `template`.
+    """
+    summary = template.summary
+    state = issue_objects_pb2.IssueContentState.Value('ACTIVE')
+    status = issue_objects_pb2.Issue.StatusValue(
+        status=template.status,
+        derivation=issue_objects_pb2.Derivation.Value('EXPLICIT'))
+    owner = None
+    if template.owner_id is not None:
+      owner = issue_objects_pb2.Issue.UserValue(
+          user=rnc.ConvertUserNames([template.owner_id]).get(template.owner_id))
+    labels = self.ConvertLabels(template.labels, [], project_id)
+    components_dict = rnc.ConvertComponentDefNames(
+        self.cnxn, template.component_ids, project_id, self.services)
+    components = []
+    for component_resource_name in components_dict.values():
+      components.append(
+          issue_objects_pb2.Issue.ComponentValue(
+              component=component_resource_name,
+              derivation=issue_objects_pb2.Derivation.Value('EXPLICIT')))
+    non_approval_fvs = self._GetNonApprovalFieldValues(
+        template.field_values, project_id)
+    field_values = self.ConvertFieldValues(
+        non_approval_fvs, project_id, template.phases)
+    field_values.extend(
+        self.ConvertEnumFieldValues(template.labels, [], project_id))
+    phases = self._ComputePhases(template.phases)
+
+    filled_issue = issue_objects_pb2.Issue(
+        summary=summary,
+        state=state,
+        status=status,
+        owner=owner,
+        labels=labels,
+        components=components,
+        field_values=field_values,
+        phases=phases)
+    return filled_issue
+
+  def _ComputeTemplatePrivacy(self, template):
+    # type: (proto.tracker_pb2.TemplateDef) ->
+    #     api_proto.project_objects_pb2.IssueTemplate.TemplatePrivacy
+    """Convert a protorpc TemplateDef to its protoc TemplatePrivacy."""
+    if template.members_only:
+      return project_objects_pb2.IssueTemplate.TemplatePrivacy.Value(
+          'MEMBERS_ONLY')
+    else:
+      return project_objects_pb2.IssueTemplate.TemplatePrivacy.Value('PUBLIC')
+
+  def _ComputeTemplateDefaultOwner(self, template):
+    # type: (proto.tracker_pb2.TemplateDef) ->
+    #     api_proto.project_objects_pb2.IssueTemplate.DefaultOwner
+    """Convert a protorpc TemplateDef to its protoc DefaultOwner."""
+    if template.owner_defaults_to_member:
+      return project_objects_pb2.IssueTemplate.DefaultOwner.Value(
+          'PROJECT_MEMBER_REPORTER')
+    else:
+      return project_objects_pb2.IssueTemplate.DefaultOwner.Value(
+          'DEFAULT_OWNER_UNSPECIFIED')
+
+  def _ComputePhases(self, phases):
+    # type: (proto.tracker_pb2.TemplateDef) -> Sequence[str]
+    """Convert a protorpc TemplateDef to its sorted string phases."""
+    sorted_phases = sorted(phases, key=lambda phase: phase.rank)
+    return [phase.name for phase in sorted_phases]
+
+  def ConvertLabels(self, labels, derived_labels, project_id):
+    # type: (Sequence[str], Sequence[str], int) ->
+    #     Sequence[api_proto.issue_objects_pb2.Issue.LabelValue]
+    """Convert string labels to LabelValues for non-enum-field labels
+
+    Args:
+      labels: Sequence of string labels
+      project_id: ID of the Project these labels belong to.
+
+    Return:
+      Sequence of protoc IssueValues for given `labels` that
+      do not represent enum field values.
+    """
+    config = self.services.config.GetProjectConfig(self.cnxn, project_id)
+    non_fd_labels, non_fd_der_labels = tbo.ExplicitAndDerivedNonMaskedLabels(
+        labels, derived_labels, config)
+    api_labels = []
+    for label in non_fd_labels:
+      api_labels.append(
+          issue_objects_pb2.Issue.LabelValue(
+              label=label,
+              derivation=issue_objects_pb2.Derivation.Value('EXPLICIT')))
+    for label in non_fd_der_labels:
+      api_labels.append(
+          issue_objects_pb2.Issue.LabelValue(
+              label=label,
+              derivation=issue_objects_pb2.Derivation.Value('RULE')))
+    return api_labels
+
+  def ConvertEnumFieldValues(self, labels, derived_labels, project_id):
+    # type: (Sequence[str], Sequence[str], int) ->
+    #     Sequence[api_proto.issue_objects_pb2.FieldValue]
+    """Convert string labels to FieldValues for enum-field labels
+
+    Args:
+      labels: Sequence of string labels
+      project_id: ID of the Project these labels belong to.
+
+    Return:
+      Sequence of protoc FieldValues only for given `labels` that
+      represent enum field values.
+    """
+    config = self.services.config.GetProjectConfig(self.cnxn, project_id)
+    enum_ids_by_name = {
+        fd.field_name.lower(): fd.field_id
+        for fd in config.field_defs
+        if fd.field_type is tracker_pb2.FieldTypes.ENUM_TYPE
+        and not fd.is_deleted
+    }
+    resource_names_dict = rnc.ConvertFieldDefNames(
+        self.cnxn, enum_ids_by_name.values(), project_id, self.services)
+
+    api_fvs = []
+
+    labels_by_prefix = tbo.LabelsByPrefix(labels, enum_ids_by_name.keys())
+    for lower_field_name, values in labels_by_prefix.items():
+      field_id = enum_ids_by_name.get(lower_field_name)
+      resource_name = resource_names_dict.get(field_id)
+      if not resource_name:
+        continue
+      api_fvs.extend(
+          [
+              issue_objects_pb2.FieldValue(
+                  field=resource_name,
+                  value=value,
+                  derivation=issue_objects_pb2.Derivation.Value(
+                      'EXPLICIT')) for value in values
+          ])
+
+    der_labels_by_prefix = tbo.LabelsByPrefix(
+        derived_labels, enum_ids_by_name.keys())
+    for lower_field_name, values in der_labels_by_prefix.items():
+      field_id = enum_ids_by_name.get(lower_field_name)
+      resource_name = resource_names_dict.get(field_id)
+      if not resource_name:
+        continue
+      api_fvs.extend(
+          [
+              issue_objects_pb2.FieldValue(
+                  field=resource_name,
+                  value=value,
+                  derivation=issue_objects_pb2.Derivation.Value('RULE'))
+              for value in values
+          ])
+
+    return api_fvs
+
+  def ConvertProject(self, project):
+    # type: (proto.project_pb2.Project) ->
+    #     api_proto.project_objects_pb2.Project
+    """Convert a protorpc Project to its protoc Project."""
+
+    return project_objects_pb2.Project(
+        name=rnc.ConvertProjectName(
+            self.cnxn, project.project_id, self.services),
+        display_name=project.project_name,
+        summary=project.summary,
+        thumbnail_url=project_helpers.GetThumbnailUrl(project.logo_gcs_id))
+
+  def ConvertProjects(self, projects):
+    # type: (Sequence[proto.project_pb2.Project]) ->
+    #     Sequence[api_proto.project_objects_pb2.Project]
+    """Convert a Sequence of protorpc Projects to protoc Projects."""
+    return [self.ConvertProject(proj) for proj in projects]
+
+  def ConvertProjectConfig(self, project_config):
+    # type: (proto.tracker_pb2.ProjectIssueConfig) ->
+    #     api_proto.project_objects_pb2.ProjectConfig
+    """Convert protorpc ProjectIssueConfig to protoc ProjectConfig."""
+    project = self.services.project.GetProject(
+        self.cnxn, project_config.project_id)
+    project_grid_config = project_objects_pb2.ProjectConfig.GridViewConfig(
+        default_x_attr=project_config.default_x_attr,
+        default_y_attr=project_config.default_y_attr)
+    template_names = rnc.ConvertTemplateNames(
+        self.cnxn, project_config.project_id, [
+            project_config.default_template_for_developers,
+            project_config.default_template_for_users
+        ], self.services)
+    return project_objects_pb2.ProjectConfig(
+        name=rnc.ConvertProjectConfigName(
+            self.cnxn, project_config.project_id, self.services),
+        exclusive_label_prefixes=project_config.exclusive_label_prefixes,
+        member_default_query=project_config.member_default_query,
+        default_sort=project_config.default_sort_spec,
+        default_columns=self._ComputeIssuesListColumns(
+            project_config.default_col_spec),
+        project_grid_config=project_grid_config,
+        member_default_template=template_names.get(
+            project_config.default_template_for_developers),
+        non_members_default_template=template_names.get(
+            project_config.default_template_for_users),
+        revision_url_format=project.revision_url_format,
+        custom_issue_entry_url=project_config.custom_issue_entry_url)
+
+  def CreateProjectMember(self, cnxn, project_id, user_id, role):
+    # type: (MonorailContext, int, int, str) ->
+    #     api_proto.project_objects_pb2.ProjectMember
+    """Creates a ProjectMember object from specified parameters.
+
+    Args:
+      cnxn: MonorailConnection object.
+      project_id: ID of the Project the User is a member of.
+      user_id: ID of the user who is a member.
+      role: str specifying the user's role based on a ProjectRole value.
+
+    Return:
+      A protoc ProjectMember object.
+    """
+    name = rnc.ConvertProjectMemberName(
+        cnxn, project_id, user_id, self.services)
+    return project_objects_pb2.ProjectMember(
+        name=name,
+        role=project_objects_pb2.ProjectMember.ProjectRole.Value(role))
+
+  def ConvertLabelDefs(self, label_defs, project_id):
+    # type: (Sequence[proto.tracker_pb2.LabelDef], int) ->
+    #     Sequence[api_proto.project_objects_pb2.LabelDef]
+    """Convert protorpc LabelDefs to protoc LabelDefs"""
+    resource_names_dict = rnc.ConvertLabelDefNames(
+        self.cnxn, [ld.label for ld in label_defs], project_id, self.services)
+
+    api_lds = []
+    for ld in label_defs:
+      state = project_objects_pb2.LabelDef.LabelDefState.Value('ACTIVE')
+      if ld.deprecated:
+        state = project_objects_pb2.LabelDef.LabelDefState.Value('DEPRECATED')
+      api_lds.append(
+          project_objects_pb2.LabelDef(
+              name=resource_names_dict.get(ld.label),
+              value=ld.label,
+              docstring=ld.label_docstring,
+              state=state))
+    return api_lds
+
+  def ConvertStatusDefs(self, status_defs, project_id):
+    # type: (Sequence[proto.tracker_pb2.StatusDef], int) ->
+    #     Sequence[api_proto.project_objects_pb2.StatusDef]
+    """Convert protorpc StatusDefs to protoc StatusDefs
+
+    Args:
+      status_defs: Sequence of StatusDefs.
+      project_id: ID of the Project these belong to.
+
+    Returns:
+      Sequence of protoc StatusDefs in the same order they are given in
+      `status_defs`.
+    """
+    resource_names_dict = rnc.ConvertStatusDefNames(
+        self.cnxn, [sd.status for sd in status_defs], project_id, self.services)
+    config = self.services.config.GetProjectConfig(self.cnxn, project_id)
+    mergeable_statuses = set(config.statuses_offer_merge)
+
+    # Rank is only surfaced as positional value in well_known_statuses
+    rank_by_status = {}
+    for rank, sd in enumerate(config.well_known_statuses):
+      rank_by_status[sd.status] = rank
+
+    api_sds = []
+    for sd in status_defs:
+      state = project_objects_pb2.StatusDef.StatusDefState.Value('ACTIVE')
+      if sd.deprecated:
+        state = project_objects_pb2.StatusDef.StatusDefState.Value('DEPRECATED')
+
+      if sd.means_open:
+        status_type = project_objects_pb2.StatusDef.StatusDefType.Value('OPEN')
+      else:
+        if sd.status in mergeable_statuses:
+          status_type = project_objects_pb2.StatusDef.StatusDefType.Value(
+              'MERGED')
+        else:
+          status_type = project_objects_pb2.StatusDef.StatusDefType.Value(
+              'CLOSED')
+
+      api_sd = project_objects_pb2.StatusDef(
+          name=resource_names_dict.get(sd.status),
+          value=sd.status,
+          type=status_type,
+          rank=rank_by_status[sd.status],
+          docstring=sd.status_docstring,
+          state=state,
+      )
+      api_sds.append(api_sd)
+    return api_sds
+
+  def ConvertComponentDef(self, component_def):
+    # type: (proto.tracker_pb2.ComponentDef) ->
+    #     api_proto.project_objects.ComponentDef
+    """Convert a protorpc ComponentDef to a protoc ComponentDef."""
+    return self.ConvertComponentDefs([component_def],
+                                     component_def.project_id)[0]
+
+  def ConvertComponentDefs(self, component_defs, project_id):
+    # type: (Sequence[proto.tracker_pb2.ComponentDef], int) ->
+    #     Sequence[api_proto.project_objects.ComponentDef]
+    """Convert sequence of protorpc ComponentDefs to protoc ComponentDefs
+
+    Args:
+      component_defs: Sequence of protoc ComponentDefs.
+      project_id: ID of the Project these belong to.
+
+    Returns:
+      Sequence of protoc ComponentDefs in the same order they are given in
+      `component_defs`.
+    """
+    resource_names_dict = rnc.ConvertComponentDefNames(
+        self.cnxn, [cd.component_id for cd in component_defs], project_id,
+        self.services)
+    involved_user_ids = tbo.UsersInvolvedInComponents(component_defs)
+    user_resource_names_dict = rnc.ConvertUserNames(involved_user_ids)
+
+    all_label_ids = set()
+    for cd in component_defs:
+      all_label_ids.update(cd.label_ids)
+
+    # If this becomes a performance issue, we should add bulk look up.
+    labels_by_id = {
+        label_id: self.services.config.LookupLabel(
+            self.cnxn, project_id, label_id) for label_id in all_label_ids
+    }
+
+    api_cds = []
+    for cd in component_defs:
+      state = project_objects_pb2.ComponentDef.ComponentDefState.Value('ACTIVE')
+      if cd.deprecated:
+        state = project_objects_pb2.ComponentDef.ComponentDefState.Value(
+            'DEPRECATED')
+
+      api_cd = project_objects_pb2.ComponentDef(
+          name=resource_names_dict.get(cd.component_id),
+          value=cd.path,
+          docstring=cd.docstring,
+          state=state,
+          admins=[
+              user_resource_names_dict.get(admin_id)
+              for admin_id in cd.admin_ids
+          ],
+          ccs=[user_resource_names_dict.get(cc_id) for cc_id in cd.cc_ids],
+          creator=user_resource_names_dict.get(cd.creator_id),
+          modifier=user_resource_names_dict.get(cd.modifier_id),
+          create_time=timestamp_pb2.Timestamp(seconds=cd.created),
+          modify_time=timestamp_pb2.Timestamp(seconds=cd.modified),
+          labels=[labels_by_id[label_id] for label_id in cd.label_ids],
+      )
+      api_cds.append(api_cd)
+    return api_cds
+
+  def ConvertProjectSavedQueries(self, saved_queries, project_id):
+    # type: (Sequence[proto.tracker_pb2.SavedQuery], int) ->
+    #     Sequence(api_proto.project_objects.ProjectSavedQuery)
+    """Convert sequence of protorpc SavedQueries to protoc ProjectSavedQueries
+
+    Args:
+      saved_queries: Sequence of SavedQueries.
+      project_id: ID of the Project these belong to.
+
+    Returns:
+      Sequence of protoc ProjectSavedQueries in the same order they are given in
+      `saved_queries`. In the event any items in `saved_queries` are not found
+      or don't belong to the project, they will be omitted from the result.
+    """
+    resource_names_dict = rnc.ConvertProjectSavedQueryNames(
+        self.cnxn, [sq.query_id for sq in saved_queries], project_id,
+        self.services)
+    api_psqs = []
+    for sq in saved_queries:
+      if sq.query_id not in resource_names_dict:
+        continue
+
+      # TODO(crbug/monorail/7756): Remove base_query_id, avoid confusions.
+      # Until then we have to expand the query by including base_query_id.
+      # base_query_id can only be in the set of DEFAULT_CANNED_QUERIES.
+      if sq.base_query_id:
+        query = '{} {}'.format(tbo.GetBuiltInQuery(sq.base_query_id), sq.query)
+      else:
+        query = sq.query
+
+      api_psqs.append(
+          project_objects_pb2.ProjectSavedQuery(
+              name=resource_names_dict.get(sq.query_id),
+              display_name=sq.name,
+              query=query))
+    return api_psqs
diff --git a/api/v3/frontend_servicer.py b/api/v3/frontend_servicer.py
new file mode 100644
index 0000000..7374f1b
--- /dev/null
+++ b/api/v3/frontend_servicer.py
@@ -0,0 +1,107 @@
+# Copyright 2020 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from api import resource_name_converters as rnc
+from api.v3 import monorail_servicer
+from api.v3.api_proto import frontend_pb2
+from api.v3.api_proto import project_objects_pb2
+from api.v3.api_proto import frontend_prpc_pb2
+from businesslogic import work_env
+
+
+class FrontendServicer(monorail_servicer.MonorailServicer):
+  """Handle frontend specific API requests.
+  Each API request is implemented with a method as defined in the
+  .proto file. Each method does any request-specific validation, uses work_env
+  to safely operate on business objects, and returns a response proto.
+  """
+
+  DESCRIPTION = frontend_prpc_pb2.FrontendServiceDescription
+
+  @monorail_servicer.PRPCMethod
+  def GatherProjectEnvironment(self, mc, request):
+    # type: (MonorailContext, GatherProjectEnvironmentRequest) ->
+    #     GatherProjectEnvironmentResponse
+    """pRPC API method that implements GatherProjectEnvironment.
+
+    Raises:
+      InputException if the project resource name provided is invalid.
+      NoSuchProjectException if the parent project is not found.
+      PermissionException if user is not allowed to view this project.
+    """
+
+    project_id = rnc.IngestProjectName(mc.cnxn, request.parent, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      project = we.GetProject(project_id)
+      project_config = we.GetProjectConfig(project_id)
+
+    api_project = self.converter.ConvertProject(project)
+    api_project_config = self.converter.ConvertProjectConfig(project_config)
+    api_status_defs = self.converter.ConvertStatusDefs(
+        project_config.well_known_statuses, project_id)
+    api_label_defs = self.converter.ConvertLabelDefs(
+        project_config.well_known_labels, project_id)
+    api_component_defs = self.converter.ConvertComponentDefs(
+        project_config.component_defs, project_id)
+    api_field_defs = self.converter.ConvertFieldDefs(
+        project_config.field_defs, project_id)
+    api_approval_defs = self.converter.ConvertApprovalDefs(
+        project_config.approval_defs, project_id)
+    saved_queries = self.services.features.GetCannedQueriesByProjectID(
+        mc.cnxn, project_id)
+    api_sqs = self.converter.ConvertProjectSavedQueries(
+        saved_queries, project_id)
+
+    return frontend_pb2.GatherProjectEnvironmentResponse(
+        project=api_project,
+        project_config=api_project_config,
+        statuses=api_status_defs,
+        well_known_labels=api_label_defs,
+        components=api_component_defs,
+        fields=api_field_defs,
+        approval_fields=api_approval_defs,
+        saved_queries=api_sqs)
+
+  @monorail_servicer.PRPCMethod
+  def GatherProjectMembershipsForUser(self, mc, request):
+    # type: (MonorailContext, GatherProjectMembershipsForUserRequest) ->
+    #     GatherProjectMembershipsForUserResponse
+    """pRPC API method that implements GatherProjectMembershipsForUser.
+
+    Raises:
+      NoSuchUserException if the user is not found.
+      InputException if the user resource name is invalid.
+    """
+
+    user_id = rnc.IngestUserName(mc.cnxn, request.user, self.services)
+
+    project_memberships = []
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      owner, committer, contributor = we.GatherProjectMembershipsForUser(
+          user_id)
+
+    for project_id in owner:
+      project_member = self.converter.CreateProjectMember(
+          mc.cnxn, project_id, user_id, 'OWNER')
+      project_memberships.append(project_member)
+
+    for project_id in committer:
+      project_member = self.converter.CreateProjectMember(
+          mc.cnxn, project_id, user_id, 'COMMITTER')
+      project_memberships.append(project_member)
+
+    for project_id in contributor:
+      project_member = self.converter.CreateProjectMember(
+          mc.cnxn, project_id, user_id, 'CONTRIBUTOR')
+      project_memberships.append(project_member)
+
+    return frontend_pb2.GatherProjectMembershipsForUserResponse(
+        project_memberships=project_memberships)
diff --git a/api/v3/hotlists_servicer.py b/api/v3/hotlists_servicer.py
new file mode 100644
index 0000000..2ea2a31
--- /dev/null
+++ b/api/v3/hotlists_servicer.py
@@ -0,0 +1,266 @@
+# Copyright 2020 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from google.protobuf import empty_pb2
+
+from api import resource_name_converters as rnc
+from api.v3 import monorail_servicer
+from api.v3.api_proto import feature_objects_pb2
+from api.v3.api_proto import hotlists_pb2
+from api.v3.api_proto import hotlists_prpc_pb2
+from businesslogic import work_env
+from framework import exceptions
+from features import features_constants
+from tracker import tracker_constants
+
+
+class HotlistsServicer(monorail_servicer.MonorailServicer):
+  """Handle API requests related to Hotlist objects.
+  Each API request is implemented with a method as defined in the
+  .proto file. Each method does any request-specific validation, uses work_env
+  to safely operate on business objects, and returns a response proto.
+  """
+  # NOTE(crbug/monorail/7614): Until the referenced cleanup is complete,
+  # all servicer methods that are scoped to a single Project need to call
+  # mc.LookupLoggedInUserPerms.
+  # Methods in this file do not because hotlists can span projects.
+
+  DESCRIPTION = hotlists_prpc_pb2.HotlistsServiceDescription
+
+  @monorail_servicer.PRPCMethod
+  def ListHotlistItems(self, mc, request):
+    # type: (MonorailContext, ListHotlistItemsRequest) ->
+    #     ListHotlistItemsResponse
+    """pRPC API method that implements ListHotlistItems.
+
+      Raises:
+        NoSuchHotlistException if the hotlist is not found.
+        PermissionException if the user is not allowed to view the hotlist.
+        InputException if the request.page_token is invalid, the request does
+          not match the previous request that provided the given page_token, or
+          the page_size is a negative value.
+    """
+    hotlist_id = rnc.IngestHotlistName(request.parent)
+    if request.page_size < 0:
+      raise exceptions.InputException('`page_size` cannot be negative.')
+    page_size = request.page_size
+    if (not request.page_size or
+        request.page_size > features_constants.DEFAULT_RESULTS_PER_PAGE):
+      page_size = features_constants.DEFAULT_RESULTS_PER_PAGE
+
+    # TODO(crbug/monorail/7104): take start from request.page_token
+    start = 0
+    sort_spec = request.order_by.replace(',', ' ')
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      list_result = we.ListHotlistItems(
+          hotlist_id, page_size, start,
+          tracker_constants.ALL_ISSUES_CAN, sort_spec, '')
+
+    # TODO(crbug/monorail/7104): plug in next_page_token when it's been
+    # implemented.
+    next_page_token = ''
+    return hotlists_pb2.ListHotlistItemsResponse(
+        items=self.converter.ConvertHotlistItems(hotlist_id, list_result.items),
+        next_page_token=next_page_token)
+
+
+  @monorail_servicer.PRPCMethod
+  def RerankHotlistItems(self, mc, request):
+    # type: (MonorailContext, RerankHotlistItemsRequest) -> Empty
+    """pRPC API method that implements RerankHotlistItems.
+
+    Raises:
+      NoSuchHotlistException if the hotlist is not found.
+      PermissionException if the user is not allowed to rerank the hotlist.
+      InputException if request.target_position is invalid or
+        request.hotlist_items is empty or contains invalid items.
+      NoSuchIssueException if hotlist item does not exist.
+    """
+
+    hotlist_id = rnc.IngestHotlistName(request.name)
+    moved_issue_ids = rnc.IngestHotlistItemNames(
+        mc.cnxn, request.hotlist_items, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.RerankHotlistItems(
+          hotlist_id, moved_issue_ids, request.target_position)
+
+    return empty_pb2.Empty()
+
+
+  @monorail_servicer.PRPCMethod
+  def RemoveHotlistItems(self, mc, request):
+    # type: (MonorailContext, RemoveHotlistItemsRequest) -> Empty
+    """pPRC API method that implements RemoveHotlistItems.
+
+    Raises:
+      NoSuchHotlistException if the hotlist is not found.
+      PermissionException if the user is not allowed to edit the hotlist.
+      InputException if the items to be removed are not found in the hotlist.
+    """
+
+    hotlist_id = rnc.IngestHotlistName(request.parent)
+    remove_issue_ids = rnc.IngestIssueNames(
+        mc.cnxn, request.issues, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.RemoveHotlistItems(hotlist_id, remove_issue_ids)
+
+    return empty_pb2.Empty()
+
+
+  @monorail_servicer.PRPCMethod
+  def AddHotlistItems(self, mc, request):
+    # type: (MonorailContext, AddHotlistItemsRequest) -> Empty
+    """pRPC API method that implements AddHotlistItems.
+
+    Raises:
+      NoSuchHotlistException if the hotlist is not found.
+      PermissionException if the user is not allowed to edit the hotlist.
+      InputException if the request.target_position is invalid or the given
+        list of issues to add is empty or invalid.
+    """
+    hotlist_id = rnc.IngestHotlistName(request.parent)
+    new_issue_ids = rnc.IngestIssueNames(mc.cnxn, request.issues, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.AddHotlistItems(hotlist_id, new_issue_ids, request.target_position)
+
+    return empty_pb2.Empty()
+
+
+  @monorail_servicer.PRPCMethod
+  def RemoveHotlistEditors(self, mc, request):
+    # type: (MonorailContext, RemoveHotlistEditorsRequest) -> Empty
+    """pPRC API method that implements RemoveHotlistEditors.
+
+    Raises:
+      NoSuchHotlistException if the hotlist is not found.
+      PermissionException if the user is not allowed to edit the hotlist.
+      InputException if the editors to be removed are not found in the hotlist.
+    """
+
+    hotlist_id = rnc.IngestHotlistName(request.name)
+    remove_user_ids = rnc.IngestUserNames(
+        mc.cnxn, request.editors, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.RemoveHotlistEditors(hotlist_id, remove_user_ids)
+
+    return empty_pb2.Empty()
+
+
+  @monorail_servicer.PRPCMethod
+  def GetHotlist(self, mc, request):
+    # type: (MonorailContext, GetHotlistRequest) -> Hotlist
+    """pRPC API method that implements GetHotlist.
+
+    Raises:
+      InputException if the given name does not have a valid format.
+      NoSuchHotlistException if the hotlist is not found.
+      PermissionException if the user is not allowed to view the hotlist.
+    """
+
+    hotlist_id = rnc.IngestHotlistName(request.name)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      hotlist = we.GetHotlist(hotlist_id)
+
+    return self.converter.ConvertHotlist(hotlist)
+
+  @monorail_servicer.PRPCMethod
+  def GatherHotlistsForUser(self, mc, request):
+    # type: (MonorailContext, GatherHotlistsForUserRequest)
+    #   -> GatherHotlistsForUserResponse
+    """pRPC API method that implements GatherHotlistsForUser.
+
+    Raises:
+      NoSuchUserException if the user is not found.
+      InputException if some request parameters are invalid.
+    """
+
+    user_id = rnc.IngestUserName(mc.cnxn, request.user, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      hotlists = we.ListHotlistsByUser(user_id)
+
+    return hotlists_pb2.GatherHotlistsForUserResponse(
+        hotlists=self.converter.ConvertHotlists(hotlists))
+
+  @monorail_servicer.PRPCMethod
+  def UpdateHotlist(self, mc, request):
+    # type: (MonorailContext, UpdateHotlistRequest) -> UpdateHotlistResponse
+    """pRPC API method that implements UpdateHotlist.
+
+    Raises:
+      NoSuchHotlistException if the hotlist is not found.
+      PermissionException if the user is not allowed to make this update.
+      InputException if some request parameters are required and missing or
+        invalid.
+    """
+    if not request.update_mask:
+      raise exceptions.InputException('No paths given in `update_mask`.')
+    if not request.hotlist:
+      raise exceptions.InputException('No `hotlist` param given.')
+
+    if not request.update_mask.IsValidForDescriptor(
+        feature_objects_pb2.Hotlist.DESCRIPTOR):
+      raise exceptions.InputException('Invalid `update_mask` for `hotlist`')
+
+    hotlist_id = rnc.IngestHotlistName(request.hotlist.name)
+
+    update_args = {}
+    hotlist = request.hotlist
+    for path in request.update_mask.paths:
+      if path == 'display_name':
+        update_args['hotlist_name'] = hotlist.display_name
+      elif path == 'owner':
+        owner_id = rnc.IngestUserName(mc.cnxn, hotlist.owner, self.services)
+        update_args['owner_id'] = owner_id
+      elif path == 'editors':
+        add_editor_ids = rnc.IngestUserNames(
+            mc.cnxn, hotlist.editors, self.services)
+        update_args['add_editor_ids'] = add_editor_ids
+      elif path == 'summary':
+        update_args['summary'] = hotlist.summary
+      elif path == 'description':
+        update_args['description'] = hotlist.description
+      elif path == 'hotlist_privacy':
+        update_args['is_private'] = (
+            hotlist.hotlist_privacy == feature_objects_pb2.Hotlist
+            .HotlistPrivacy.Value('PRIVATE'))
+      elif path == 'default_columns':
+        update_args[
+            'default_col_spec'] = self.converter.IngestIssuesListColumns(
+                hotlist.default_columns)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.UpdateHotlist(hotlist_id, **update_args)
+      hotlist = we.GetHotlist(hotlist_id, use_cache=False)
+
+    return self.converter.ConvertHotlist(hotlist)
+
+  @monorail_servicer.PRPCMethod
+  def DeleteHotlist(self, mc, request):
+    # type: (MonorailContext, GetHotlistRequest) -> Empty
+    """pRPC API method that implements DeleteHotlist.
+
+    Raises:
+      InputException if the given name does not have a valid format.
+      NoSuchHotlistException if the hotlist is not found.
+      PermissionException if the user is not allowed to delete the hotlist.
+    """
+
+    hotlist_id = rnc.IngestHotlistName(request.name)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.DeleteHotlist(hotlist_id)
+
+    return empty_pb2.Empty()
diff --git a/api/v3/issues_servicer.py b/api/v3/issues_servicer.py
new file mode 100644
index 0000000..ebd545b
--- /dev/null
+++ b/api/v3/issues_servicer.py
@@ -0,0 +1,396 @@
+# Copyright 2020 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import re
+
+from api import resource_name_converters as rnc
+from api.v3 import api_constants
+from api.v3 import converters
+from api.v3 import monorail_servicer
+from api.v3 import paginator
+from api.v3.api_proto import issues_pb2
+from api.v3.api_proto import issue_objects_pb2
+from api.v3.api_proto import issues_prpc_pb2
+from businesslogic import work_env
+from framework import exceptions
+
+# We accept only the following filter, and only on ListComments.
+# If we accept more complex filters in the future, introduce a library.
+_APPROVAL_DEF_FILTER_RE = re.compile(
+    r'approval = "(?P<approval_name>%s)"$' % rnc.APPROVAL_DEF_NAME_PATTERN)
+
+
+class IssuesServicer(monorail_servicer.MonorailServicer):
+  """Handle API requests related to Issue objects.
+  Each API request is implemented with a method as defined in the
+  .proto file that does any request-specific validation, uses work_env
+  to safely operate on business objects, and returns a response proto.
+  """
+
+  DESCRIPTION = issues_prpc_pb2.IssuesServiceDescription
+
+  @monorail_servicer.PRPCMethod
+  def GetIssue(self, mc, request):
+    # type: (MonorailContext, GetIssueRequest) -> Issue
+    """pRPC API method that implements GetIssue.
+
+    Raises:
+      InputException: the given name does not have a valid format.
+      NoSuchIssueException: the issue is not found.
+      PermissionException the user is not allowed to view the issue.
+    """
+    issue_id = rnc.IngestIssueName(mc.cnxn, request.name, self.services)
+    with work_env.WorkEnv(mc, self.services) as we:
+      # TODO(crbug/monorail/7614): Eliminate the need to do this lookup.
+      project = we.GetProjectByName(rnc.IngestProjectFromIssue(request.name))
+      mc.LookupLoggedInUserPerms(project)
+      issue = we.GetIssue(issue_id, allow_viewing_deleted=True)
+    return self.converter.ConvertIssue(issue)
+
+  @monorail_servicer.PRPCMethod
+  def BatchGetIssues(self, mc, request):
+    # type: (MonorailContext, BatchGetIssuesRequest) -> BatchGetIssuesResponse
+    """pRPC API method that implements BatchGetIssues.
+
+    Raises:
+      InputException: If `names` is formatted incorrectly. Or if a parent
+          collection in `names` does not match the value in `parent`.
+      NoSuchIssueException: If any of the given issues do not exist.
+      PermissionException If the requester does not have permission to view one
+          (or more) of the given issues.
+    """
+    if len(request.names) > api_constants.MAX_BATCH_ISSUES:
+      raise exceptions.InputException(
+          'Requesting %d issues when the allowed maximum is %d issues.' %
+          (len(request.names), api_constants.MAX_BATCH_ISSUES))
+    if request.parent:
+      parent_match = rnc._GetResourceNameMatch(
+          request.parent, rnc.PROJECT_NAME_RE)
+      parent_project = parent_match.group('project_name')
+      with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+        for name in request.names:
+          try:
+            name_match = rnc._GetResourceNameMatch(name, rnc.ISSUE_NAME_RE)
+            issue_project = name_match.group('project')
+            if issue_project != parent_project:
+              err_agg.AddErrorMessage(
+                  '%s is not a child issue of %s.' % (name, request.parent))
+          except exceptions.InputException as e:
+            err_agg.AddErrorMessage(e.message)
+    with work_env.WorkEnv(mc, self.services) as we:
+      # NOTE(crbug/monorail/7614): Until the referenced cleanup is complete,
+      # all servicer methods that are scoped to a single Project need to call
+      # mc.LookupLoggedInUserPerms.
+      #  This method does not because it may be scoped to multiple projects.
+      issue_ids = rnc.IngestIssueNames(mc.cnxn, request.names, self.services)
+      issues_by_iid = we.GetIssuesDict(issue_ids)
+    return issues_pb2.BatchGetIssuesResponse(
+        issues=self.converter.ConvertIssues(
+            [issues_by_iid[issue_id] for issue_id in issue_ids]))
+
+  @monorail_servicer.PRPCMethod
+  def SearchIssues(self, mc, request):
+    # type: (MonorailContext, SearchIssuesRequest) -> SearchIssuesResponse
+    """pRPC API method that implements SearchIssue.
+
+    Raises:
+      InputException: if any given names in `projects` are invalid or if the
+        search query uses invalid syntax (ie: unmatched parentheses).
+    """
+    page_size = paginator.CoercePageSize(
+        request.page_size, api_constants.MAX_ISSUES_PER_PAGE)
+    pager = paginator.Paginator(
+        page_size=page_size,
+        order_by=request.order_by,
+        query=request.query,
+        projects=request.projects)
+
+    project_names = []
+    for resource_name in request.projects:
+      match = rnc._GetResourceNameMatch(resource_name, rnc.PROJECT_NAME_RE)
+      project_names.append(match.group('project_name'))
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      # NOTE(crbug/monorail/7614): Until the referenced cleanup is complete,
+      # all servicer methods that are scoped to a single Project need to call
+      # mc.LookupLoggedInUserPerms.
+      #  This method does not because it may be scoped to multiple projects.
+      list_result = we.SearchIssues(
+          request.query, project_names, mc.auth.user_id, page_size,
+          pager.GetStart(request.page_token), request.order_by)
+
+    return issues_pb2.SearchIssuesResponse(
+        issues=self.converter.ConvertIssues(list_result.items),
+        next_page_token=pager.GenerateNextPageToken(list_result.next_start))
+
+  @monorail_servicer.PRPCMethod
+  def ListComments(self, mc, request):
+    # type: (MonorailContext, ListCommentsRequest) -> ListCommentsResponse
+    """pRPC API method that implements ListComments.
+
+    Raises:
+      InputException: the given name format or page_size are not valid.
+      NoSuchIssueException: the parent is not found.
+      PermissionException: the user is not allowed to view the parent.
+    """
+    issue_id = rnc.IngestIssueName(mc.cnxn, request.parent, self.services)
+    page_size = paginator.CoercePageSize(
+        request.page_size, api_constants.MAX_COMMENTS_PER_PAGE)
+    pager = paginator.Paginator(
+      parent=request.parent, page_size=page_size, filter_str=request.filter)
+    approval_id = None
+    if request.filter:
+      match = _APPROVAL_DEF_FILTER_RE.match(request.filter)
+      if match:
+        approval_id = rnc.IngestApprovalDefName(
+            mc.cnxn, match.group('approval_name'), self.services)
+      if not match:
+        raise exceptions.InputException(
+            'Filtering other than approval not supported.')
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      # TODO(crbug/monorail/7614): Eliminate the need to do this lookup.
+      project = we.GetProjectByName(rnc.IngestProjectFromIssue(request.parent))
+      mc.LookupLoggedInUserPerms(project)
+      list_result = we.SafeListIssueComments(
+          issue_id, page_size, pager.GetStart(request.page_token),
+          approval_id=approval_id)
+    return issues_pb2.ListCommentsResponse(
+        comments=self.converter.ConvertComments(issue_id, list_result.items),
+        next_page_token=pager.GenerateNextPageToken(list_result.next_start))
+
+  @monorail_servicer.PRPCMethod
+  def ListApprovalValues(self, mc, request):
+    # type: (MonorailContext, ListApprovalValuesRequest) ->
+    #     ListApprovalValuesResponse
+    """pRPC API method that implements ListApprovalValues.
+
+    Raises:
+      InputException: the given parent does not have a valid format.
+      NoSuchIssueException: the parent issue is not found.
+      PermissionException the user is not allowed to view the parent issue.
+    """
+    issue_id = rnc.IngestIssueName(mc.cnxn, request.parent, self.services)
+    with work_env.WorkEnv(mc, self.services) as we:
+      # TODO(crbug/monorail/7614): Eliminate the need to do this lookup.
+      project = we.GetProjectByName(rnc.IngestProjectFromIssue(request.parent))
+      mc.LookupLoggedInUserPerms(project)
+      issue = we.GetIssue(issue_id)
+
+    api_avs = self.converter.ConvertApprovalValues(issue.approval_values,
+        issue.field_values, issue.phases, issue_id=issue_id)
+
+    return issues_pb2.ListApprovalValuesResponse(approval_values=api_avs)
+
+  @monorail_servicer.PRPCMethod
+  def MakeIssueFromTemplate(self, _mc, _request):
+    # type: (MonorailContext, MakeIssueFromTemplateRequest) -> Issue
+    """pRPC API method that implements MakeIssueFromTemplate.
+
+    Raises:
+      TODO(crbug/monorail/7197): Document errors when implemented
+    """
+    # Phase 1: Gather info
+    #   Get project id and template name from template resource name.
+    #   Get template pb.
+    #   Make tracker_pb2.IssueDelta from request.template_issue_delta, share
+    #   code with v3/ModifyIssue
+
+    # with work_env.WorkEnv(mc, self.services) as we:
+    #   project = ... get project from template.
+    #   mc.LookupLoggedInUserPerms(project)
+    #   created_issue = we.MakeIssueFromTemplate(template, description, delta)
+
+    # Return newly created API issue.
+    # return converters.ConvertIssue(created_issue)
+
+    return issue_objects_pb2.Issue()
+
+  @monorail_servicer.PRPCMethod
+  def MakeIssue(self, mc, request):
+    # type: (MonorailContext, MakeIssueRequest) -> Issue
+    """pRPC API method that implements MakeIssue.
+
+    Raises:
+      InputException if any given names do not have a valid format or if any
+        fields in the requested issue were invalid.
+      NoSuchProjectException if no project exists with the given parent.
+      FilterRuleException if proposed issue values violate any filter rules
+        that shows error.
+      PermissionException if user lacks sufficient permissions.
+    """
+    project_id = rnc.IngestProjectName(mc.cnxn, request.parent, self.services)
+    with work_env.WorkEnv(mc, self.services) as we:
+      # TODO(crbug/monorail/7614): Eliminate the need to do this lookup.
+      project = we.GetProject(project_id)
+      mc.LookupLoggedInUserPerms(project)
+
+    ingested_issue = self.converter.IngestIssue(
+        request.issue, project_id)
+    send_email = self.converter.IngestNotifyType(request.notify_type)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      created_issue = we.MakeIssue(
+          ingested_issue, request.description, send_email)
+      starred_issue = we.StarIssue(created_issue, True)
+
+    return self.converter.ConvertIssue(starred_issue)
+
+  @monorail_servicer.PRPCMethod
+  def ModifyIssues(self, mc, request):
+    # type: (MonorailContext, ModifyIssuesRequest) -> ModifyIssuesResponse
+    """pRPC API method that implements ModifyIssues.
+
+    Raises:
+      InputException if any given names do not have a valid format or if any
+        fields in the requested issue were invalid.
+      NoSuchIssueException if some issues weren't found.
+      NoSuchProjectException if no project was found for some given issues.
+      FilterRuleException if proposed issue changes violate any filter rules
+        that shows error.
+      PermissionException if user lacks sufficient permissions.
+    """
+    if not request.deltas:
+      return issues_pb2.ModifyIssuesResponse()
+    if len(request.deltas) > api_constants.MAX_MODIFY_ISSUES:
+      raise exceptions.InputException(
+          'Requesting %d updates when the allowed maximum is %d updates.' %
+          (len(request.deltas), api_constants.MAX_MODIFY_ISSUES))
+    impacted_issues_count = 0
+    for delta in request.deltas:
+      impacted_issues_count += (
+          len(delta.blocked_on_issues_remove) +
+          len(delta.blocking_issues_remove) +
+          len(delta.issue.blocking_issue_refs) +
+          len(delta.issue.blocked_on_issue_refs))
+      if 'merged_into_issue_ref' in delta.update_mask.paths:
+        impacted_issues_count += 1
+    if impacted_issues_count > api_constants.MAX_MODIFY_IMPACTED_ISSUES:
+      raise exceptions.InputException(
+          'Updates include %d impacted issues when the allowed maximum is %d.' %
+          (impacted_issues_count, api_constants.MAX_MODIFY_IMPACTED_ISSUES))
+    iid_delta_pairs = self.converter.IngestIssueDeltas(request.deltas)
+    with work_env.WorkEnv(mc, self.services) as we:
+      issues = we.ModifyIssues(
+          iid_delta_pairs,
+          attachment_uploads=self.converter.IngestAttachmentUploads(
+              request.uploads),
+          comment_content=request.comment_content,
+          send_email=self.converter.IngestNotifyType(request.notify_type))
+
+    return issues_pb2.ModifyIssuesResponse(
+        issues=self.converter.ConvertIssues(issues))
+
+  @monorail_servicer.PRPCMethod
+  def ModifyIssueApprovalValues(self, mc, request):
+    # type: (MonorailContext, ModifyIssueApprovalValuesRequest) ->
+    #     ModifyIssueApprovalValuesResponse
+    """pRPC API method that implements ModifyIssueApprovalValues.
+
+    Raises:
+      InputException if any fields in the delta were invalid.
+      NoSuchIssueException: if the issue of any ApprovalValue isn't found.
+      NoSuchProjectException: if the parent project of any ApprovalValue isn't
+          found.
+      NoSuchUserException: if any user value provided isn't found.
+      PermissionException if user lacks sufficient permissions.
+      # TODO(crbug/monorail/7925): Not all of these are yet thrown.
+    """
+    if len(request.deltas) > api_constants.MAX_MODIFY_APPROVAL_VALUES:
+      raise exceptions.InputException(
+          'Requesting %d updates when the allowed maximum is %d updates.' %
+          (len(request.deltas), api_constants.MAX_MODIFY_APPROVAL_VALUES))
+    response = issues_pb2.ModifyIssueApprovalValuesResponse()
+    delta_specifications = self.converter.IngestApprovalDeltas(
+        request.deltas, mc.auth.user_id)
+    send_email = self.converter.IngestNotifyType(request.notify_type)
+    with work_env.WorkEnv(mc, self.services) as we:
+      # NOTE(crbug/monorail/7614): Until the referenced cleanup is complete,
+      # all servicer methods that are scoped to a single Project need to call
+      # mc.LookupLoggedInUserPerms.
+      # This method does not because it may be scoped to multiple projects.
+      issue_approval_values = we.BulkUpdateIssueApprovalsV3(
+          delta_specifications, request.comment_content, send_email=send_email)
+    api_avs = []
+    for issue, approval_value in issue_approval_values:
+      api_avs.extend(
+          self.converter.ConvertApprovalValues(
+              [approval_value],
+              issue.field_values,
+              issue.phases,
+              issue_id=issue.issue_id))
+    response.approval_values.extend(api_avs)
+    return response
+
+  @monorail_servicer.PRPCMethod
+  def ModifyCommentState(self, mc, request):
+    # type: (MonorailContext, ModifyCommentStateRequest) ->
+    #     ModifyCommentStateResponse
+    """pRPC API method that implements ModifyCommentState.
+
+    We do not support changing between DELETED <-> SPAM. User must
+    undelete or unflag-as-spam first.
+
+    Raises:
+      NoSuchProjectException if the parent Project does not exist.
+      NoSuchIssueException: if the issue does not exist.
+      NoSuchCommentException: if the comment does not exist.
+      PermissionException if user lacks sufficient permissions.
+      ActionNotSupported if user requests unsupported state transitions.
+    """
+    (project_id, issue_id,
+     comment_num) = rnc.IngestCommentName(mc.cnxn, request.name, self.services)
+    with work_env.WorkEnv(mc, self.services) as we:
+      # TODO(crbug/monorail/7614): Eliminate the need to do this lookup.
+      project = we.GetProject(project_id)
+      mc.LookupLoggedInUserPerms(project)
+      issue = we.GetIssue(issue_id, use_cache=False)
+      comments_list = we.SafeListIssueComments(issue_id, 1, comment_num).items
+      try:
+        comment = comments_list[0]
+      except IndexError:
+        raise exceptions.NoSuchCommentException()
+
+      if request.state == issue_objects_pb2.IssueContentState.Value('ACTIVE'):
+        if comment.is_spam:
+          we.FlagComment(issue, comment, False)
+        elif comment.deleted_by != 0:
+          we.DeleteComment(issue, comment, delete=False)
+        else:
+          # No-op if already currently active
+          pass
+      elif request.state == issue_objects_pb2.IssueContentState.Value(
+          'DELETED'):
+        if (not comment.deleted_by) and (not comment.is_spam):
+          we.DeleteComment(issue, comment, delete=True)
+        elif comment.deleted_by and not comment.is_spam:
+          # No-op if already deleted
+          pass
+        else:
+          raise exceptions.ActionNotSupported(
+              'Cannot change comment state from spam to deleted.')
+      elif request.state == issue_objects_pb2.IssueContentState.Value('SPAM'):
+        if (not comment.deleted_by) and (not comment.is_spam):
+          we.FlagComment(issue, comment, True)
+        elif comment.is_spam:
+          # No-op if already spam
+          pass
+        else:
+          raise exceptions.ActionNotSupported(
+              'Cannot change comment state from deleted to spam.')
+      else:
+        raise exceptions.ActionNotSupported('Unsupported target comment state.')
+
+      # FlagComment does not have side effect on comment, must refresh.
+      refreshed_comment = we.SafeListIssueComments(issue_id, 1,
+                                                   comment_num).items[0]
+
+    converted_comment = self.converter.ConvertComments(
+        issue_id, [refreshed_comment])[0]
+    return issues_pb2.ModifyCommentStateResponse(comment=converted_comment)
diff --git a/api/v3/monorail_servicer.py b/api/v3/monorail_servicer.py
new file mode 100644
index 0000000..8f2e26e
--- /dev/null
+++ b/api/v3/monorail_servicer.py
@@ -0,0 +1,434 @@
+# Copyright 2018 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import cgi
+import functools
+import logging
+import time
+import sys
+
+from google.oauth2 import id_token
+from google.auth.transport import requests as google_requests
+
+from google.appengine.api import oauth
+from google.appengine.api import users
+from google.appengine.api import app_identity
+from google.protobuf import json_format
+from components.prpc import codes
+from components.prpc import server
+
+from framework import monitoring
+
+import settings
+from api.v3 import converters
+from framework import authdata
+from framework import exceptions
+from framework import framework_constants
+from framework import monitoring
+from framework import monorailcontext
+from framework import ratelimiter
+from framework import permissions
+from framework import sql
+from framework import xsrf
+from services import client_config_svc
+from services import features_svc
+
+
+# Header for XSRF token to protect cookie-based auth users.
+XSRF_TOKEN_HEADER = 'x-xsrf-token'
+# Header for test account email.  Only accepted for local dev server.
+TEST_ACCOUNT_HEADER = 'x-test-account'
+# Optional header to help us understand why certain calls were made.
+REASON_HEADER = 'x-reason'
+# Optional header to help prevent double updates.
+REQUEST_ID_HEADER = 'x-request-id'
+# Domain for service account emails.
+SERVICE_ACCOUNT_DOMAIN = 'gserviceaccount.com'
+
+
+def ConvertPRPCStatusToHTTPStatus(context):
+  """pRPC uses internal codes 0..16, but we want to report HTTP codes."""
+  return server._PRPC_TO_HTTP_STATUS.get(context._code, 500)
+
+
+def PRPCMethod(func):
+  @functools.wraps(func)
+  def wrapper(self, request, prpc_context, cnxn=None):
+    return self.Run(
+        func, request, prpc_context, cnxn=cnxn)
+
+  wrapper.wrapped = func
+  return wrapper
+
+
+class MonorailServicer(object):
+  """Abstract base class for API servicers.
+  """
+
+  def __init__(self, services, make_rate_limiter=True, xsrf_timeout=None):
+    self.services = services
+    if make_rate_limiter:
+      self.rate_limiter = ratelimiter.ApiRateLimiter()
+    else:
+      self.rate_limiter = None
+    # We allow subclasses to specify a different timeout. This allows the
+    # RefreshToken method to check the token with a longer expiration and
+    # generate a new one.
+    self.xsrf_timeout = xsrf_timeout or xsrf.TOKEN_TIMEOUT_SEC
+    self.converter = None
+
+  def Run(
+      self, handler, request, prpc_context,
+      cnxn=None, perms=None, start_time=None, end_time=None):
+    """Run a Do* method in an API context.
+
+    Args:
+      handler: API handler method to call with MonorailContext and request.
+      request: API Request proto object.
+      prpc_context: pRPC context object with status code.
+      cnxn: Optional connection to SQL database.
+      perms: PermissionSet passed in during testing.
+      start_time: Int timestamp passed in during testing.
+      end_time: Int timestamp passed in during testing.
+
+    Returns:
+      The response proto returned from the handler or None if that
+      method raised an exception that we handle.
+
+    Raises:
+      Only programming errors should be raised as exceptions.  All
+      exceptions for permission checks and input validation that are
+      raised in the Do* method are converted into pRPC status codes.
+    """
+    start_time = start_time or time.time()
+    cnxn = cnxn or sql.MonorailConnection()
+    if self.services.cache_manager:
+      self.services.cache_manager.DoDistributedInvalidation(cnxn)
+
+    response = None
+    requester_auth = None
+    metadata = dict(prpc_context.invocation_metadata())
+    mc = monorailcontext.MonorailContext(self.services, cnxn=cnxn, perms=perms)
+    try:
+      self.AssertBaseChecks(request, metadata)
+      client_id, requester_auth = self.GetAndAssertRequesterAuth(
+          cnxn, metadata, self.services)
+      logging.info('request proto is:\n%r\n', request)
+      logging.info('requester is %r', requester_auth.email)
+      monitoring.IncrementAPIRequestsCount(
+          'v3', client_id, client_email=requester_auth.email)
+
+      # TODO(crbug.com/monorail/8161)We pass in a None client_id for rate
+      # limiting because CheckStart and CheckEnd will track and limit requests
+      # per email and client_id separately.
+      # So if there are many site users one day, we may end up rate limiting our
+      # own site. With a None client_id we are only rate limiting by emails.
+      if self.rate_limiter:
+        self.rate_limiter.CheckStart(None, requester_auth.email, start_time)
+      mc.auth = requester_auth
+      if not perms:
+        # NOTE(crbug/monorail/7614): We rely on servicer methods to call
+        # to call LookupLoggedInUserPerms() with a project when they need to.
+        mc.LookupLoggedInUserPerms(None)
+
+      self.converter = converters.Converter(mc, self.services)
+      response = handler(self, mc, request)
+
+    except Exception as e:
+      if not self.ProcessException(e, prpc_context, mc):
+        raise e.__class__, e, sys.exc_info()[2]
+    finally:
+      if mc:
+        mc.CleanUp()
+      if self.rate_limiter and requester_auth and requester_auth.email:
+        end_time = end_time or time.time()
+        self.rate_limiter.CheckEnd(
+            None, requester_auth.email, end_time, start_time)
+      self.RecordMonitoringStats(start_time, request, response, prpc_context)
+
+    return response
+
+  def CheckIDToken(self, cnxn, metadata):
+    # type: (MonorailConnection, Mapping[str, str])
+    #     -> Tuple[Optional[str], Optional[authdata.AuthData]]
+    """Authenticate user from an ID token.
+
+    Args:
+      cnxn: connection to the SQL database.
+      metadata: metadata sent by the client.
+
+    Returns:
+      The audience (AKA client_id) and a new AuthData object representing
+      the user making the request or (None, None) if no ID token was found.
+
+    Raises:
+      permissions.PermissionException: If the token is invalid, the client ID
+        is not allowlisted, or no user email was found in the ID token.
+    """
+    bearer = metadata.get('authorization')
+    if not bearer:
+      return None, None
+    if bearer.lower().startswith('bearer '):
+      token = bearer[7:]
+    else:
+      raise permissions.PermissionException('Invalid authorization token.')
+    # TODO(crbug.com/monorail/7724): Use cachecontrol module to cache
+    # certification used for verification.
+    request = google_requests.Request()
+
+    try:
+      id_info = id_token.verify_oauth2_token(token, request)
+      logging.info('ID token info: %r' % id_info)
+    except ValueError:
+      raise permissions.PermissionException(
+          'Invalid bearer token.')
+
+    audience = id_info['aud']
+    email = id_info.get('email')
+    if not email:
+      raise permissions.PermissionException(
+          'No email found in token info. '
+          'Make sure requests are made with scopes `openid` and `email`')
+
+    auth_client_ids, service_account_emails = (
+        client_config_svc.GetClientConfigSvc().GetClientIDEmails())
+
+    if email.endswith(SERVICE_ACCOUNT_DOMAIN):
+      # For service accounts, the email must be allowlisted to call the
+      # API and we must confirm that the ID token was meant for
+      # Monorail by checking the audience.
+
+      # An API call to any <version>-dot-<service>-dot-<app_id>.appspot.com
+      # must have token audience of `https://<app_id>.appspot.com`
+      app_id = app_identity.get_application_id()  # e.g. 'monorail-prod'
+      host = 'https://%s.appspot.com' % app_id
+      if audience != host:
+        raise permissions.PermissionException(
+            'Invalid token audience: %s.' % audience)
+      if email not in service_account_emails:
+        raise permissions.PermissionException(
+            'Account %s is not allowlisted' % email)
+    else:
+      # For users, the audience is the client_id of the site used to make
+      # the call to Monorail's API. The client_id must be allow-listed.
+      if audience not in auth_client_ids:
+        raise permissions.PermissionException(
+            'Client %s is not allowlisted' % audience)
+
+    # We must confirm the client/email is allowlisted before we
+    # potentially auto-create the user account in Monorail.
+    return audience, authdata.AuthData.FromEmail(
+        cnxn, email, self.services, autocreate=True)
+
+  def GetAndAssertRequesterAuth(self, cnxn, metadata, services):
+    # type: (MonorailConnection, Mapping[str, str], Services ->
+    #    Tuple[str, authdata.AuthData]
+    """Gets the requester identity and checks if the user has permission
+       to make the request.
+       Any users successfully authenticated with oauth must be allowlisted or
+       have accounts with the domains in api_allowed_email_domains.
+       Users identified using cookie-based auth must have valid XSRF tokens.
+       Test accounts ending with @example.com are only allowed in the
+       local_mode.
+
+    Args:
+      cnxn: connection to the SQL database.
+      metadata: metadata sent by the client.
+      services: connections to backend services.
+
+    Returns:
+      The client ID and a new AuthData object representing a signed in or
+      anonymous user.
+
+    Raises:
+      exceptions.NoSuchUserException: If the requester does not exist
+      permissions.BannedUserException: If the user has been banned from the site
+      permissions.PermissionException: If the user is not authorized with the
+        Monorail scope, is not allowlisted, and has an invalid token.
+    """
+    # TODO(monorail:6538): Move different authentication methods into separate
+    # functions.
+    requester_auth = None
+    client_id = None
+    # When running on localhost, allow request to specify test account.
+    if TEST_ACCOUNT_HEADER in metadata:
+      if not settings.local_mode:
+        raise exceptions.InputException(
+            'x-test-account only accepted in local_mode')
+      # For local development, we accept any request.
+      # TODO(jrobbins): make this more realistic by requiring a fake XSRF token.
+      test_account = metadata[TEST_ACCOUNT_HEADER]
+      if not test_account.endswith('@example.com'):
+        raise exceptions.InputException(
+            'test_account must end with @example.com')
+      logging.info('Using test_account: %r' % test_account)
+      requester_auth = authdata.AuthData.FromEmail(cnxn, test_account, services)
+
+    # Oauth2 ID token auth.
+    if not requester_auth:
+      client_id, requester_auth = self.CheckIDToken(cnxn, metadata)
+
+    if client_id is None:
+      # TODO(crbug.com/monorail/8160): For site users, we temporarily use
+      # the host as the client_id, until we implement auth in the frontend
+      # to make API requests with ID tokens that include client_ids.
+      client_id = 'https://%s.appspot.com' % app_identity.get_application_id()
+
+
+    # Cookie-based auth for signed in and anonymous users.
+    if not requester_auth:
+      # Check for signed in user
+      user = users.get_current_user()
+      if user:
+        logging.info('Using cookie user: %r', user.email())
+        requester_auth = authdata.AuthData.FromEmail(
+            cnxn, user.email(), services)
+      else:
+        # Create AuthData for anonymous user.
+        requester_auth = authdata.AuthData.FromEmail(cnxn, None, services)
+
+      # Cookie-based auth signed-in and anon users need to have the XSRF
+      # token validate.
+      try:
+        token = metadata.get(XSRF_TOKEN_HEADER)
+        xsrf.ValidateToken(
+            token, requester_auth.user_id, xsrf.XHR_SERVLET_PATH,
+            timeout=self.xsrf_timeout)
+      except xsrf.TokenIncorrect:
+        raise permissions.PermissionException(
+            'Requester %s does not have permission to make this request.'
+            % requester_auth.email)
+
+    if permissions.IsBanned(requester_auth.user_pb, requester_auth.user_view):
+      raise permissions.BannedUserException(
+          'The user %s has been banned from using this site' %
+          requester_auth.email)
+
+    return (client_id, requester_auth)
+
+  def AssertBaseChecks(self, request, metadata):
+    """Reject requests that we refuse to serve."""
+    # TODO(jrobbins): Add read_only check as an exception raised in sql.py.
+    if (settings.read_only and
+        not request.__class__.__name__.startswith(('Get', 'List'))):
+      raise permissions.PermissionException(
+          'This request is not allowed in read-only mode')
+
+    if REASON_HEADER in metadata:
+      logging.info('Request reason: %r', metadata[REASON_HEADER])
+    if REQUEST_ID_HEADER in metadata:
+      # TODO(jrobbins): Ignore requests with duplicate request_ids.
+      logging.info('request_id: %r', metadata[REQUEST_ID_HEADER])
+
+  def ProcessException(self, e, prpc_context, mc):
+    """Return True if we convert an exception to a pRPC status code."""
+    logging.exception(e)
+    logging.info(e.message)
+    exc_type = type(e)
+    if exc_type == exceptions.NoSuchUserException:
+      prpc_context.set_code(codes.StatusCode.NOT_FOUND)
+      prpc_context.set_details('The user does not exist.')
+    elif exc_type == exceptions.NoSuchProjectException:
+      prpc_context.set_code(codes.StatusCode.NOT_FOUND)
+      prpc_context.set_details('The project does not exist.')
+    elif exc_type == exceptions.NoSuchTemplateException:
+      prpc_context.set_code(codes.StatusCode.NOT_FOUND)
+      prpc_context.set_details('The template does not exist.')
+    elif exc_type == exceptions.NoSuchIssueException:
+      prpc_context.set_code(codes.StatusCode.NOT_FOUND)
+      details = 'The issue does not exist.'
+      if e.message:
+        details = cgi.escape(e.message, quote=True)
+      prpc_context.set_details(details)
+    elif exc_type == exceptions.NoSuchIssueApprovalException:
+      prpc_context.set_code(codes.StatusCode.NOT_FOUND)
+      prpc_context.set_details('The issue approval does not exist.')
+    elif exc_type == exceptions.NoSuchCommentException:
+      prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+      prpc_context.set_details('No such comment')
+    elif exc_type == exceptions.NoSuchComponentException:
+      prpc_context.set_code(codes.StatusCode.NOT_FOUND)
+      prpc_context.set_details('The component does not exist.')
+    elif exc_type == permissions.BannedUserException:
+      prpc_context.set_code(codes.StatusCode.PERMISSION_DENIED)
+      prpc_context.set_details('The requesting user has been banned.')
+    elif exc_type == permissions.PermissionException:
+      logging.info('perms is %r', mc.perms)
+      prpc_context.set_code(codes.StatusCode.PERMISSION_DENIED)
+      prpc_context.set_details('Permission denied.')
+    elif exc_type == exceptions.GroupExistsException:
+      prpc_context.set_code(codes.StatusCode.ALREADY_EXISTS)
+      prpc_context.set_details('The user group already exists.')
+    elif exc_type == features_svc.HotlistAlreadyExists:
+      prpc_context.set_code(codes.StatusCode.ALREADY_EXISTS)
+      prpc_context.set_details('A hotlist with that name already exists.')
+    elif exc_type == exceptions.ComponentDefAlreadyExists:
+      prpc_context.set_code(codes.StatusCode.ALREADY_EXISTS)
+      prpc_context.set_details('A component with that path already exists.')
+    elif exc_type == exceptions.ActionNotSupported:
+      prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+      prpc_context.set_details('Requested action not supported.')
+    elif exc_type == exceptions.InvalidComponentNameException:
+      prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+      prpc_context.set_details('That component name is invalid.')
+    elif exc_type == exceptions.FilterRuleException:
+      prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+      prpc_context.set_details('Violates filter rule that should error.')
+    elif exc_type == exceptions.InputException:
+      prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+      prpc_context.set_details(
+         'Invalid arguments: %s' % cgi.escape(e.message, quote=True))
+    elif exc_type == exceptions.OverAttachmentQuota:
+      prpc_context.set_code(codes.StatusCode.RESOURCE_EXHAUSTED)
+      prpc_context.set_details(
+          'The request would exceed the attachment quota limit.')
+    elif exc_type == ratelimiter.ApiRateLimitExceeded:
+      prpc_context.set_code(codes.StatusCode.PERMISSION_DENIED)
+      prpc_context.set_details('The requester has exceeded API quotas limit.')
+    elif exc_type == oauth.InvalidOAuthTokenError:
+      prpc_context.set_code(codes.StatusCode.UNAUTHENTICATED)
+      prpc_context.set_details(
+          'The oauth token was not valid or must be refreshed.')
+    elif exc_type == xsrf.TokenIncorrect:
+      logging.info('Bad XSRF token: %r', e.message)
+      prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+      prpc_context.set_details('Bad XSRF token.')
+    elif exc_type == exceptions.PageTokenException:
+      prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+      prpc_context.set_details(
+          'Page token invalid or incorrect for the accompanying request')
+    else:
+      prpc_context.set_code(codes.StatusCode.INTERNAL)
+      prpc_context.set_details('Potential programming error.')
+      return False  # Re-raise any exception from programming errors.
+    return True  # It if was one of the cases above, don't reraise.
+
+  def RecordMonitoringStats(
+      self, start_time, request, response, prpc_context, now=None):
+    """Record monitoring info about this request."""
+    now = now or time.time()
+    elapsed_ms = int((now - start_time) * 1000)
+    method_name = request.__class__.__name__
+    if method_name.endswith('Request'):
+      method_name = method_name[:-len('Request')]
+
+    fields = monitoring.GetCommonFields(
+        # pRPC uses its own statuses, but we report HTTP status codes.
+        ConvertPRPCStatusToHTTPStatus(prpc_context),
+        # Use the API name, not the request path, to prevent an explosion in
+        # possible field values.
+        'monorail.v3.' + method_name)
+    monitoring.AddServerDurations(elapsed_ms, fields)
+    monitoring.IncrementServerResponseStatusCount(fields)
+    monitoring.AddServerRequesteBytes(
+        len(json_format.MessageToJson(request)), fields)
+    response_length = 0
+    if response:
+      response_length = len(json_format.MessageToJson(response))
+      monitoring.AddServerResponseBytes(response_length, fields)
diff --git a/api/v3/paginator.py b/api/v3/paginator.py
new file mode 100644
index 0000000..16e66fa
--- /dev/null
+++ b/api/v3/paginator.py
@@ -0,0 +1,91 @@
+# Copyright 2020 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.
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from framework import exceptions
+from framework import paginate
+from proto import secrets_pb2
+
+
+def CoercePageSize(page_size, max_size, default_size=None):
+  # type: (int, int, Optional[int]) -> int
+  """Validates page_size and coerces it to max_size if needed.
+
+  Args:
+    page_size: The page_size requested by the user.
+    max_size: the maximum page size allowed. Must be > 0.
+        Also used as default if default_size not provided
+    default_size: default size to use if page_size not provided. Must be > 0.
+
+  Returns:
+    The appropriate page size to use for the request, based on the parameters.
+    Specifically this means
+      - page_size if not greater than max_size
+      - max_size if page_size > max_size
+      - max_size if page_size is not provided and default_size is not provided
+      - default_size if page_size is not provided
+
+  Raises:
+    InputException: if page_size is negative.
+  """
+  # These are programming errors. They are not user input.
+  assert max_size > 0
+  assert default_size is None or default_size > 0
+
+  # Check for invalid user provided page_size.
+  if page_size and page_size < 0:
+    raise exceptions.InputException('`page_size` cannot be negative.')
+
+  if not page_size:
+    return default_size or max_size
+  if page_size > max_size:
+    return max_size
+  return page_size
+
+
+class Paginator(object):
+  """Class to manage API pagination.
+
+  Paginator handles the pagination tasks and info of a single List or
+  Search API method implementation, given the contents of the request.
+  """
+
+  def __init__(self, parent=None, page_size=None, order_by=None,
+      filter_str=None, query=None, projects=None):
+    # type: (Optional[str], Optional[int], Optional[str], Optional[str],
+    #   Optional[str], Optional[Collection[str]]]) -> None
+    self.request_contents = secrets_pb2.ListRequestContents(
+        parent=parent, page_size=page_size, order_by=order_by,
+        filter=filter_str, query=query, projects=projects)
+
+  def GetStart(self, page_token):
+    # type: (Optional[str]) -> int
+    """Validates a request.page_token and returns the start index for it."""
+    if page_token:
+      # TODO(crbug.com/monorail/6758): Proto string fields are unicode types in
+      # python 2. In python 3 these unicode strings will be represented with
+      # string types. paginate.ValidateAndParsePageToken requires a string token
+      # during validation (compare_digest()). Once we move to python 3, we can
+      # remove this string casting.
+      token = str(page_token)
+      return paginate.ValidateAndParsePageToken(token, self.request_contents)
+    return 0
+
+  def GenerateNextPageToken(self, next_start):
+    # type: (Optional[int]) -> str
+    """Generates the `next_page_token` for the API response.
+
+    Args:
+      next_start: The start index of the next page, or None if no more results.
+
+    Returns:
+      A string clients can use to request the next page. Returns None if
+      next_start was None
+    """
+    if next_start is None:
+      return None
+    return paginate.GeneratePageToken(self.request_contents, next_start)
diff --git a/api/v3/permission_converters.py b/api/v3/permission_converters.py
new file mode 100644
index 0000000..6837438
--- /dev/null
+++ b/api/v3/permission_converters.py
@@ -0,0 +1,62 @@
+# Copyright 2020 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.
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from framework import permissions
+from framework import exceptions
+from api.v3.api_proto import permission_objects_pb2
+
+# Global dictionaries to map backend permission strings to
+# API Permission enum values.
+
+HOTLIST_PERMISSIONS_MAP = {
+    permissions.EDIT_HOTLIST:
+        permission_objects_pb2.Permission.Value('HOTLIST_EDIT'),
+    permissions.ADMINISTER_HOTLIST:
+        permission_objects_pb2.Permission.Value('HOTLIST_ADMINISTER')
+}
+
+FIELDDEF_PERMISSIONS_MAP = {
+    permissions.EDIT_FIELD_DEF:
+        permission_objects_pb2.Permission.Value('FIELD_DEF_EDIT'),
+    permissions.EDIT_FIELD_DEF_VALUE:
+        permission_objects_pb2.Permission.Value('FIELD_DEF_VALUE_EDIT')
+}
+
+# TODO(crbug/monorail/7339): Create a common _ConvertPermissions(permissions,
+# permissions_map)
+
+
+def ConvertHotlistPermissions(hotlist_permissions):
+  # type: (Sequence[str]) -> Sequence[permission_objects_pb2.Permission]
+  """Converts hotlist permission strings into protoc Permission enum values."""
+  api_permissions = []
+  for permission in hotlist_permissions:
+    api_permission = HOTLIST_PERMISSIONS_MAP.get(permission)
+    if not api_permission:
+      raise exceptions.InputException(
+          'Unrecognized hotlist permission: %s' % permission)
+    api_permissions.append(api_permission)
+
+  return api_permissions
+
+
+def ConvertFieldDefPermissions(field_permissions):
+  # type: (Sequence[str]) -> Sequence[permission_objects_pb2.Permission]
+  """Converts field permission strings into protoc Permission enum values."""
+  api_permissions = []
+  for permission in field_permissions:
+    api_permission = FIELDDEF_PERMISSIONS_MAP.get(permission)
+    if not api_permission:
+      raise exceptions.InputException(
+          'Unrecognized field permission: %s' % permission)
+    api_permissions.append(api_permission)
+
+  return api_permissions
+
+
+# TODO(crbug/monorail/7339): Implement all ConvertFooPermissions methods.
diff --git a/api/v3/permissions_servicer.py b/api/v3/permissions_servicer.py
new file mode 100644
index 0000000..d544478
--- /dev/null
+++ b/api/v3/permissions_servicer.py
@@ -0,0 +1,87 @@
+# Copyright 2020 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.
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from google.protobuf import empty_pb2
+
+from api import resource_name_converters as rnc
+from api.v3 import permission_converters as pc
+from api.v3 import monorail_servicer
+from api.v3.api_proto import permission_objects_pb2
+from api.v3.api_proto import permissions_pb2
+from api.v3.api_proto import permissions_prpc_pb2
+from businesslogic import work_env
+from framework import exceptions
+
+
+class PermissionsServicer(monorail_servicer.MonorailServicer):
+  """Handle API requests related to Permissions.
+  Each API request is implemented with a method as defined in the
+  .proto file. Each method does any request-specific validation, uses work_env
+  to safely operate on business objects, and returns a response proto.
+  """
+
+  DESCRIPTION = permissions_prpc_pb2.PermissionsServiceDescription
+
+  @monorail_servicer.PRPCMethod
+  def BatchGetPermissionSets(self, mc, request):
+    # type: (MonorailContext, BatchGetPermissionSetsRequest) ->
+    # BatchGetPermissionSetsResponse
+    """pRPC API method that implements BatchGetPermissionSets.
+
+    Raises:
+      InputException: if any name in request.names is not a valid resource name
+          or a permission string is not recognized.
+      PermissionException: if the requester does not have permission to
+          view one of the resources.
+    """
+    api_permission_sets = []
+    with work_env.WorkEnv(mc, self.services) as we:
+      for name in request.names:
+        api_permission_sets.append(self._GetPermissionSet(mc.cnxn, we, name))
+
+    return permissions_pb2.BatchGetPermissionSetsResponse(
+        permission_sets=api_permission_sets)
+
+  def _GetPermissionSet(self, cnxn, we, name):
+    # type: (sql.MonorailConnection, businesslogic.WorkEnv, str) ->
+    # permission_objects_pb2.PermissionSet
+    """Takes a resource name and returns the PermissionSet for the resource.
+
+      Args:
+        cnxn: MonorailConnection object to the database.
+        we: WorkEnv object to get the permission strings.
+        name: resource name of a resource we want a PermissionSet for.
+
+      Returns:
+        PermissionSet object.
+
+      Raises:
+      InputException: if request.name is not a valid resource name or a
+          permission string is not recognized.
+      PermissionException: if the requester does not have permission to
+          view the resource.
+    """
+    try:
+      hotlist_id = rnc.IngestHotlistName(name)
+      permissions = we.ListHotlistPermissions(hotlist_id)
+      api_permissions = pc.ConvertHotlistPermissions(permissions)
+      return permission_objects_pb2.PermissionSet(
+          resource=name, permissions=api_permissions)
+    except exceptions.InputException:
+      pass
+    try:
+      project_id, field_id = rnc.IngestFieldDefName(cnxn, name, self.services)
+      permissions = we.ListFieldDefPermissions(field_id, project_id)
+      api_permissions = pc.ConvertFieldDefPermissions(permissions)
+      return permission_objects_pb2.PermissionSet(
+          resource=name, permissions=api_permissions)
+    except exceptions.InputException:
+      pass
+    # TODO(crbug/monorail/7339): Add more try-except blocks for other
+    # resource types.
+    raise exceptions.InputException('invalid resource name')
diff --git a/api/v3/projects_servicer.py b/api/v3/projects_servicer.py
new file mode 100644
index 0000000..17d6f93
--- /dev/null
+++ b/api/v3/projects_servicer.py
@@ -0,0 +1,149 @@
+# Copyright 2020 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from google.protobuf import empty_pb2
+
+from api import resource_name_converters as rnc
+from api.v3 import api_constants
+from api.v3 import monorail_servicer
+from api.v3 import paginator
+from api.v3.api_proto import projects_pb2
+from api.v3.api_proto import projects_prpc_pb2
+from businesslogic import work_env
+
+
+class ProjectsServicer(monorail_servicer.MonorailServicer):
+  """Handle API requests related to Project objects.
+  Each API request is implemented with a method as defined in the
+  .proto file. Each method does any request-specific validation, uses work_env
+  to safely operate on business objects, and returns a response proto.
+  """
+
+  DESCRIPTION = projects_prpc_pb2.ProjectsServiceDescription
+
+  @monorail_servicer.PRPCMethod
+  def ListIssueTemplates(self, mc, request):
+    # type: (MonorailContext, ListIssueTemplatesRequest) ->
+    #   ListIssueTemplatesResponse
+    """pRPC API method that implements ListIssueTemplates.
+
+      Raises:
+        InputException if the request.parent is invalid.
+        NoSuchProjectException if no project exists with the given name.
+    """
+    project_id = rnc.IngestProjectName(mc.cnxn, request.parent, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      # TODO(crbug/monorail/7614): Eliminate the need to do this lookup.
+      project = we.GetProject(project_id)
+      mc.LookupLoggedInUserPerms(project)
+      templates = we.ListProjectTemplates(project_id)
+
+    return projects_pb2.ListIssueTemplatesResponse(
+        templates=self.converter.ConvertIssueTemplates(project_id, templates))
+
+  @monorail_servicer.PRPCMethod
+  def ListComponentDefs(self, mc, request):
+    # type: (MonorailContext, ListComponentDefsRequest) ->
+    #   ListComponentDefsResponse
+    """pRPC API method that implements ListComponentDefs.
+
+      Raises:
+        InputException if the request.parent is invalid.
+        NoSuchProjectException if the parent project is not found.
+    """
+    project_id = rnc.IngestProjectName(mc.cnxn, request.parent, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      # TODO(crbug/monorail/7614): Eliminate the need to do this lookup.
+      project = we.GetProject(project_id)
+      mc.LookupLoggedInUserPerms(project)
+
+      page_size = paginator.CoercePageSize(
+        request.page_size, api_constants.MAX_COMPONENTS_PER_PAGE)
+      pager = paginator.Paginator(
+          parent=request.parent, page_size=page_size)
+      list_result = we.ListComponentDefs(
+          project_id, page_size, pager.GetStart(request.page_token))
+
+      api_component_defs = self.converter.ConvertComponentDefs(
+          list_result.items, project_id)
+
+    return projects_pb2.ListComponentDefsResponse(
+        component_defs=api_component_defs,
+        next_page_token=pager.GenerateNextPageToken(list_result.next_start))
+
+  @monorail_servicer.PRPCMethod
+  def CreateComponentDef(self, mc, request):
+    # type: (MonorailContext, CreateComponentDefRequest) ->
+    #   ComponentDef
+    """pRPC API method that implements CreateComponentDef.
+
+      Raises:
+        InputException if the request is invalid.
+        NoSuchUserException if any given component admins or ccs do not exist.
+        NoSuchProjectException if the parent project does not exist.
+        PermissionException if the requester is not allowed to create
+          this component.
+    """
+    project_id = rnc.IngestProjectName(mc.cnxn, request.parent, self.services)
+    admin_ids = rnc.IngestUserNames(
+        mc.cnxn, request.component_def.admins, self.services)
+    cc_ids = rnc.IngestUserNames(
+        mc.cnxn, request.component_def.ccs, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      component_def = we.CreateComponentDef(
+          project_id, request.component_def.value,
+          request.component_def.docstring, admin_ids, cc_ids,
+          request.component_def.labels)
+
+    return self.converter.ConvertComponentDef(component_def)
+
+  @monorail_servicer.PRPCMethod
+  def DeleteComponentDef(self, mc, request):
+    # type: (MonorailContext, DeleteComponentDefRequest) -> Empty
+    """pRPC API method that implements DeleteComponentDef.
+
+      Raises:
+        InputException if the request in invalid.
+        NoSuchComponentException if the component does not exist.
+        PermissionException if the requester is not allowed to delete
+          this component.
+        NoSuchProjectException if the parent project does not exist.
+    """
+    project_id, component_id = rnc.IngestComponentDefNames(
+        mc.cnxn, [request.name], self.services)[0]
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.DeleteComponentDef(project_id, component_id)
+
+    return empty_pb2.Empty()
+
+  @monorail_servicer.PRPCMethod
+  def ListProjects(self, mc, _):
+    # type: (MonorailContext, ListProjectsRequest) -> ListProjectsResponse
+    """pRPC API method that implements ListProjects.
+
+      Raises:
+        InputException if the request.page_token is invalid or the request does
+          not match the previous request that provided the given page_token.
+    """
+    with work_env.WorkEnv(mc, self.services) as we:
+      # NOTE(crbug/monorail/7614): Until the referenced cleanup is complete,
+      # all servicer methods that are scoped to a single Project need to call
+      # mc.LookupLoggedInUserPerms.
+      #  This method does not because it may be scoped to multiple projects.
+      allowed_project_ids = we.ListProjects()
+      projects_dict = we.GetProjects(allowed_project_ids)
+      projects = [projects_dict[proj_id] for proj_id in allowed_project_ids]
+
+    # TODO(crbug.com/monorail/7505): Add pagination logic.
+    return projects_pb2.ListProjectsResponse(
+        projects=self.converter.ConvertProjects(projects))
diff --git a/api/v3/test/__init__.py b/api/v3/test/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/api/v3/test/__init__.py
diff --git a/api/v3/test/converters_test.py b/api/v3/test/converters_test.py
new file mode 100644
index 0000000..1bbd12c
--- /dev/null
+++ b/api/v3/test/converters_test.py
@@ -0,0 +1,3254 @@
+# Copyright 2020 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.
+"""Tests for converting internal protorpc to external protoc."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import copy
+import difflib
+import logging
+import unittest
+
+import mock
+from google.protobuf import field_mask_pb2
+from google.protobuf import timestamp_pb2
+
+from api import resource_name_converters as rnc
+from api.v3 import converters
+from api.v3.api_proto import feature_objects_pb2
+from api.v3.api_proto import issues_pb2
+from api.v3.api_proto import issue_objects_pb2
+from api.v3.api_proto import user_objects_pb2
+from api.v3.api_proto import project_objects_pb2
+from framework import authdata
+from framework import exceptions
+from framework import framework_constants
+from framework import framework_helpers
+from framework import monorailcontext
+from testing import fake
+from testing import testing_helpers
+from tracker import field_helpers
+from services import service_manager
+from proto import tracker_pb2
+from tracker import tracker_bizobj as tbo
+
+EXPLICIT_DERIVATION = issue_objects_pb2.Derivation.Value('EXPLICIT')
+RULE_DERIVATION = issue_objects_pb2.Derivation.Value('RULE')
+Choice = project_objects_pb2.FieldDef.EnumTypeSettings.Choice
+
+CURRENT_TIME = 12346.78
+
+
+class ConverterFunctionsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        usergroup=fake.UserGroupService(),
+        user=fake.UserService(),
+        config=fake.ConfigService(),
+        template=fake.TemplateService(),
+        features=fake.FeaturesService())
+    self.cnxn = fake.MonorailConnection()
+    self.mc = monorailcontext.MonorailContext(self.services, cnxn=self.cnxn)
+    self.converter = converters.Converter(self.mc, self.services)
+    self.PAST_TIME = int(CURRENT_TIME - 1)
+    self.project_1 = self.services.project.TestAddProject(
+        'proj', project_id=789)
+    self.project_2 = self.services.project.TestAddProject(
+        'goose', project_id=788)
+    self.user_1 = self.services.user.TestAddUser('one@example.com', 111)
+    self.user_2 = self.services.user.TestAddUser('two@example.com', 222)
+    self.user_3 = self.services.user.TestAddUser('three@example.com', 333)
+    self.services.project.TestAddProjectMembers(
+        [self.user_1.user_id], self.project_1, 'CONTRIBUTOR_ROLE')
+
+    self.field_def_1_name = 'test_field_1'
+    self.field_def_1 = self._CreateFieldDef(
+        self.project_1.project_id,
+        self.field_def_1_name,
+        'STR_TYPE',
+        admin_ids=[self.user_1.user_id],
+        is_required=True,
+        is_multivalued=True,
+        is_phase_field=True,
+        regex='abc')
+    self.field_def_2_name = 'test_field_2'
+    self.field_def_2 = self._CreateFieldDef(
+        self.project_1.project_id,
+        self.field_def_2_name,
+        'INT_TYPE',
+        max_value=37,
+        is_niche=True)
+    self.field_def_3_name = 'days'
+    self.field_def_3 = self._CreateFieldDef(
+        self.project_1.project_id, self.field_def_3_name, 'ENUM_TYPE')
+    self.field_def_4_name = 'OS'
+    self.field_def_4 = self._CreateFieldDef(
+        self.project_1.project_id, self.field_def_4_name, 'ENUM_TYPE')
+    self.field_def_5_name = 'yellow'
+    self.field_def_5 = self._CreateFieldDef(
+        self.project_1.project_id, self.field_def_5_name, 'ENUM_TYPE')
+    self.field_def_7_name = 'redredred'
+    self.field_def_7 = self._CreateFieldDef(
+        self.project_1.project_id,
+        self.field_def_7_name,
+        'ENUM_TYPE',
+        is_restricted_field=True,
+        editor_ids=[self.user_1.user_id])
+    self.field_def_8_name = 'dogandcat'
+    self.field_def_8 = self._CreateFieldDef(
+        self.project_1.project_id,
+        self.field_def_8_name,
+        'USER_TYPE',
+        needs_member=True,
+        needs_perm='EDIT_PROJECT',
+        notify_on=tracker_pb2.NotifyTriggers.ANY_COMMENT)
+    self.field_def_9_name = 'catanddog'
+    self.field_def_9 = self._CreateFieldDef(
+        self.project_1.project_id,
+        self.field_def_9_name,
+        'DATE_TYPE',
+        date_action_str='ping_owner_only')
+    self.field_def_10_name = 'url'
+    self.field_def_10 = self._CreateFieldDef(
+        self.project_1.project_id, self.field_def_10_name, 'URL_TYPE')
+    self.field_def_project2_name = 'lorem'
+    self.field_def_project2 = self._CreateFieldDef(
+        self.project_2.project_id, self.field_def_project2_name, 'ENUM_TYPE')
+    self.approval_def_1_name = 'approval_field_1'
+    self.approval_def_1_id = self._CreateFieldDef(
+        self.project_1.project_id,
+        self.approval_def_1_name,
+        'APPROVAL_TYPE',
+        docstring='ad_1_docstring',
+        admin_ids=[self.user_1.user_id])
+    self.approval_def_1 = tracker_pb2.ApprovalDef(
+        approval_id=self.approval_def_1_id,
+        approver_ids=[self.user_2.user_id],
+        survey='approval_def_1 survey')
+    self.approval_def_2_name = 'approval_field_1'
+    self.approval_def_2_id = self._CreateFieldDef(
+        self.project_1.project_id,
+        self.approval_def_2_name,
+        'APPROVAL_TYPE',
+        docstring='ad_2_docstring',
+        admin_ids=[self.user_1.user_id])
+    self.approval_def_2 = tracker_pb2.ApprovalDef(
+        approval_id=self.approval_def_2_id,
+        approver_ids=[self.user_2.user_id],
+        survey='approval_def_2 survey')
+    approval_defs = [self.approval_def_1, self.approval_def_2]
+    self.field_def_6_name = 'simonsays'
+    self.field_def_6 = self._CreateFieldDef(
+        self.project_1.project_id,
+        self.field_def_6_name,
+        'STR_TYPE',
+        approval_id=self.approval_def_1_id)
+    self.dne_field_def_id = 999999
+    self.fv_1_value = u'some_string_field_value'
+    self.fv_1 = fake.MakeFieldValue(
+        field_id=self.field_def_1, str_value=self.fv_1_value, derived=False)
+    self.fv_1_derived = fake.MakeFieldValue(
+        field_id=self.field_def_1, str_value=self.fv_1_value, derived=True)
+    self.fv_6 = fake.MakeFieldValue(
+        field_id=self.field_def_6, str_value=u'touch-nose', derived=False)
+    self.phase_1_id = 123123
+    self.phase_1 = fake.MakePhase(self.phase_1_id, name='some phase name')
+    self.av_1 = fake.MakeApprovalValue(
+        self.approval_def_1_id,
+        setter_id=self.user_1.user_id,
+        set_on=self.PAST_TIME,
+        approver_ids=[self.user_2.user_id],
+        phase_id=self.phase_1_id)
+    self.av_2 = fake.MakeApprovalValue(
+        self.approval_def_1_id,
+        setter_id=self.user_1.user_id,
+        set_on=self.PAST_TIME,
+        approver_ids=[self.user_2.user_id])
+
+    self.issue_1 = fake.MakeTestIssue(
+        self.project_1.project_id,
+        1,
+        'sum',
+        'New',
+        self.user_1.user_id,
+        cc_ids=[self.user_2.user_id],
+        derived_cc_ids=[self.user_3.user_id],
+        project_name=self.project_1.project_name,
+        star_count=1,
+        labels=['label-a', 'label-b', 'days-1'],
+        derived_owner_id=self.user_2.user_id,
+        derived_status='Fixed',
+        derived_labels=['label-derived', 'OS-mac', 'label-derived-2'],
+        component_ids=[1, 2],
+        merged_into_external='b/1',
+        derived_component_ids=[3, 4],
+        attachment_count=5,
+        field_values=[self.fv_1, self.fv_1_derived],
+        opened_timestamp=self.PAST_TIME,
+        modified_timestamp=self.PAST_TIME,
+        approval_values=[self.av_1],
+        phases=[self.phase_1])
+    self.issue_2 = fake.MakeTestIssue(
+        self.project_2.project_id,
+        2,
+        'sum2',
+        None,
+        None,
+        reporter_id=self.user_1.user_id,
+        project_name=self.project_2.project_name,
+        merged_into=self.issue_1.issue_id,
+        opened_timestamp=self.PAST_TIME,
+        modified_timestamp=self.PAST_TIME,
+        closed_timestamp=self.PAST_TIME,
+        derived_status='Fixed',
+        derived_owner_id=self.user_2.user_id,
+        is_spam=True)
+    self.services.issue.TestAddIssue(self.issue_1)
+    self.services.issue.TestAddIssue(self.issue_2)
+
+    self.template_0 = self.services.template.TestAddIssueTemplateDef(
+        11110, self.project_1.project_id, 'template0')
+    self.template_1_label1_value = '2'
+    self.template_1_labels = [
+        'pri-1', '{}-{}'.format(
+            self.field_def_3_name, self.template_1_label1_value)
+    ]
+    self.template_1 = self.services.template.TestAddIssueTemplateDef(
+        11111,
+        self.project_1.project_id,
+        'template1',
+        content='foobar',
+        summary='foo',
+        admin_ids=[self.user_2.user_id],
+        owner_id=self.user_1.user_id,
+        labels=self.template_1_labels,
+        component_ids=[654],
+        field_values=[self.fv_1],
+        approval_values=[self.av_1],
+        phases=[self.phase_1])
+    self.template_2 = self.services.template.TestAddIssueTemplateDef(
+        11112,
+        self.project_1.project_id,
+        'template2',
+        members_only=True,
+        owner_defaults_to_member=True)
+    self.template_3 = self.services.template.TestAddIssueTemplateDef(
+        11113,
+        self.project_1.project_id,
+        'template3',
+        field_values=[self.fv_1],
+        approval_values=[self.av_2],
+    )
+    self.dne_template = tracker_pb2.TemplateDef(
+        name='dne_template_name', template_id=11114)
+    self.labeldef_1 = tracker_pb2.LabelDef(
+        label='white-mountain',
+        label_docstring='test label doc string for white-mountain')
+    self.labeldef_2 = tracker_pb2.LabelDef(
+        label='yellow-submarine',
+        label_docstring='Submarine choice for yellow enum field')
+    self.labeldef_3 = tracker_pb2.LabelDef(
+        label='yellow-basket',
+        label_docstring='Basket choice for yellow enum field')
+    self.labeldef_4 = tracker_pb2.LabelDef(
+        label='yellow-tasket',
+        label_docstring='Deprecated tasket choice for yellow enum field',
+        deprecated=True)
+    self.labeldef_5 = tracker_pb2.LabelDef(
+        label='mont-blanc',
+        label_docstring='test label doc string for mont-blanc',
+        deprecated=True)
+    self.predefined_labels = [
+        self.labeldef_1, self.labeldef_2, self.labeldef_3, self.labeldef_4,
+        self.labeldef_5
+    ]
+    test_label_ids = {}
+    for index, ld in enumerate(self.predefined_labels):
+      test_label_ids[ld.label] = index
+    self.services.config.TestAddLabelsDict(test_label_ids)
+    self.status_1 = tracker_pb2.StatusDef(
+        status='New', means_open=True, status_docstring='status_1 docstring')
+    self.status_2 = tracker_pb2.StatusDef(
+        status='Duplicate',
+        means_open=False,
+        status_docstring='status_2 docstring')
+    self.status_3 = tracker_pb2.StatusDef(
+        status='Accepted',
+        means_open=True,
+        status_docstring='status_3_docstring')
+    self.status_4 = tracker_pb2.StatusDef(
+        status='Gibberish',
+        means_open=True,
+        status_docstring='status_4_docstring',
+        deprecated=True)
+    self.predefined_statuses = [
+        self.status_1, self.status_2, self.status_3, self.status_4
+    ]
+    self.component_def_1_path = 'foo'
+    self.component_def_1_id = self.services.config.CreateComponentDef(
+        self.cnxn, self.project_1.project_id, self.component_def_1_path,
+        'cd1_docstring', False, [self.user_1.user_id], [self.user_2.user_id],
+        self.PAST_TIME, self.user_1.user_id, [0, 1, 2, 3, 4])
+    self.component_def_2_path = 'foo>bar'
+    self.component_def_2_id = self.services.config.CreateComponentDef(
+        self.cnxn, self.project_1.project_id, self.component_def_2_path,
+        'cd2_docstring', True, [self.user_1.user_id], [self.user_2.user_id],
+        self.PAST_TIME, self.user_1.user_id, [])
+    self.services.config.UpdateConfig(
+        self.cnxn,
+        self.project_1,
+        statuses_offer_merge=[self.status_2.status],
+        excl_label_prefixes=['type', 'priority'],
+        default_template_for_developers=self.template_2.template_id,
+        default_template_for_users=self.template_1.template_id,
+        list_prefs=('ID Summary', 'ID', 'status', 'owner', 'owner:me'),
+        # UpdateConfig accepts tuples rather than protorpc *Defs
+        well_known_labels=[
+            (ld.label, ld.label_docstring, ld.deprecated)
+            for ld in self.predefined_labels
+        ],
+        approval_defs=[
+            (ad.approval_id, ad.approver_ids, ad.survey) for ad in approval_defs
+        ],
+        well_known_statuses=[
+            (sd.status, sd.status_docstring, sd.means_open, sd.deprecated)
+            for sd in self.predefined_statuses
+        ])
+    # base_query_id 2 equates to "is:open", defined in tracker_constants.
+    self.psq_1 = tracker_pb2.SavedQuery(
+        query_id=2, name='psq1 name', base_query_id=2, query='foo=bar')
+    self.psq_2 = tracker_pb2.SavedQuery(
+        query_id=3, name='psq2 name', query='fizz=buzz')
+    self.services.features.UpdateCannedQueries(
+        self.cnxn, self.project_1.project_id, [self.psq_1, self.psq_2])
+
+  def _CreateFieldDef(
+      self,
+      project_id,
+      field_name,
+      field_type_str,
+      docstring=None,
+      min_value=None,
+      max_value=None,
+      regex=None,
+      needs_member=None,
+      needs_perm=None,
+      grants_perm=None,
+      notify_on=None,
+      date_action_str=None,
+      admin_ids=None,
+      editor_ids=None,
+      is_required=False,
+      is_niche=False,
+      is_multivalued=False,
+      is_phase_field=False,
+      approval_id=None,
+      is_restricted_field=False):
+    """Calls CreateFieldDef with reasonable defaults, returns the ID."""
+    if admin_ids is None:
+      admin_ids = []
+    if editor_ids is None:
+      editor_ids = []
+    return self.services.config.CreateFieldDef(
+        self.cnxn,
+        project_id,
+        field_name,
+        field_type_str,
+        None,
+        None,
+        is_required,
+        is_niche,
+        is_multivalued,
+        min_value,
+        max_value,
+        regex,
+        needs_member,
+        needs_perm,
+        grants_perm,
+        notify_on,
+        date_action_str,
+        docstring,
+        admin_ids,
+        editor_ids,
+        is_phase_field=is_phase_field,
+        approval_id=approval_id,
+        is_restricted_field=is_restricted_field)
+
+  def _GetFieldDefById(self, project_id, fd_id):
+    config = self.services.config.GetProjectConfig(self.cnxn, project_id)
+    return [fd for fd in config.field_defs if fd.field_id == fd_id][0]
+
+  def _GetApprovalDefById(self, project_id, ad_id):
+    config = self.services.config.GetProjectConfig(self.cnxn, project_id)
+    return [ad for ad in config.approval_defs if ad.approval_id == ad_id][0]
+
+  def testConvertHotlist(self):
+    """We can convert a Hotlist."""
+    hotlist = fake.Hotlist(
+        'Hotlist-Name',
+        240,
+        default_col_spec='chicken goose',
+        is_private=False,
+        owner_ids=[111],
+        editor_ids=[222, 333],
+        summary='Hotlist summary',
+        description='Hotlist Description')
+    expected_api_hotlist = feature_objects_pb2.Hotlist(
+        name='hotlists/240',
+        display_name=hotlist.name,
+        owner= 'users/111',
+        summary=hotlist.summary,
+        description=hotlist.description,
+        editors=['users/222', 'users/333'],
+        hotlist_privacy=feature_objects_pb2.Hotlist.HotlistPrivacy.Value(
+            'PUBLIC'),
+        default_columns=[
+            issue_objects_pb2.IssuesListColumn(column='chicken'),
+            issue_objects_pb2.IssuesListColumn(column='goose')
+        ])
+    self.converter.user_auth = authdata.AuthData.FromUser(
+        self.cnxn, self.user_1, self.services)
+    self.assertEqual(
+        expected_api_hotlist, self.converter.ConvertHotlist(hotlist))
+
+  def testConvertHotlist_DefaultValues(self):
+    """We can convert a Hotlist with some empty or default values."""
+    hotlist = fake.Hotlist(
+        'Hotlist-Name',
+        241,
+        is_private=True,
+        owner_ids=[111],
+        summary='Hotlist summary',
+        description='Hotlist Description',
+        default_col_spec='')
+    expected_api_hotlist = feature_objects_pb2.Hotlist(
+        name='hotlists/241',
+        display_name=hotlist.name,
+        owner='users/111',
+        summary=hotlist.summary,
+        description=hotlist.description,
+        hotlist_privacy=feature_objects_pb2.Hotlist.HotlistPrivacy.Value(
+            'PRIVATE'))
+    self.converter.user_auth = authdata.AuthData.FromUser(
+        self.cnxn, self.user_1, self.services)
+    self.assertEqual(
+        expected_api_hotlist, self.converter.ConvertHotlist(hotlist))
+
+  def testConvertHotlists(self):
+    """We can convert several Hotlists."""
+    hotlists = [
+        fake.Hotlist(
+            'Hotlist-Name',
+            241,
+            owner_ids=[111],
+            summary='Hotlist summary',
+            description='Hotlist Description'),
+        fake.Hotlist(
+            'Hotlist-Name',
+            241,
+            owner_ids=[111],
+            summary='Hotlist summary',
+            description='Hotlist Description')
+    ]
+    self.assertEqual(2, len(self.converter.ConvertHotlists(hotlists)))
+
+  def testConvertHotlistItems(self):
+    """We can convert HotlistItems."""
+    hotlist_item_fields = [
+        (self.issue_1.issue_id, 21, 111, self.PAST_TIME, 'note2'),
+        (78900, 11, 222, self.PAST_TIME, 'note3'),  # Does not exist.
+        (self.issue_2.issue_id, 1, 222, None, 'note1'),
+    ]
+    hotlist = fake.Hotlist(
+        'Hotlist-Name', 241, hotlist_item_fields=hotlist_item_fields)
+    self.converter.user_auth = authdata.AuthData.FromUser(
+        self.cnxn, self.user_1, self.services)
+    api_items = self.converter.ConvertHotlistItems(
+        hotlist.hotlist_id, hotlist.items)
+    expected_create_time = timestamp_pb2.Timestamp()
+    expected_create_time.FromSeconds(self.PAST_TIME)
+    expected_items = [
+        feature_objects_pb2.HotlistItem(
+            name='hotlists/241/items/proj.1',
+            issue='projects/proj/issues/1',
+            rank=1,
+            adder= 'users/111',
+            create_time=expected_create_time,
+            note='note2'),
+        feature_objects_pb2.HotlistItem(
+            name='hotlists/241/items/goose.2',
+            issue='projects/goose/issues/2',
+            rank=0,
+            adder='users/222',
+            note='note1')
+    ]
+    self.assertEqual(api_items, expected_items)
+
+  def testConvertHotlistItems_Empty(self):
+    hotlist = fake.Hotlist('Hotlist-Name', 241)
+    self.converter.user_auth = authdata.AuthData.FromUser(
+        self.cnxn, self.user_1, self.services)
+    api_items = self.converter.ConvertHotlistItems(
+        hotlist.hotlist_id, hotlist.items)
+    self.assertEqual(api_items, [])
+
+  @mock.patch('tracker.attachment_helpers.SignAttachmentID')
+  def testConvertComments(self, mock_SignAttachmentID):
+    """We can convert comments."""
+    mock_SignAttachmentID.return_value = 2
+    attach = tracker_pb2.Attachment(
+        attachment_id=1,
+        mimetype='image/png',
+        filename='example.png',
+        filesize=12345)
+    deleted_attach = tracker_pb2.Attachment(
+        attachment_id=2,
+        mimetype='image/png',
+        filename='deleted_example.png',
+        filesize=67890,
+        deleted=True)
+    initial_comment = tracker_pb2.IssueComment(
+        project_id=self.issue_1.project_id,
+        issue_id=self.issue_1.issue_id,
+        user_id=self.issue_1.reporter_id,
+        timestamp=self.PAST_TIME,
+        content='initial description',
+        sequence=0,
+        is_description=True,
+        description_num='1',
+        attachments=[attach, deleted_attach])
+    deleted_comment = tracker_pb2.IssueComment(
+        project_id=self.issue_1.project_id,
+        issue_id=self.issue_1.issue_id,
+        timestamp=self.PAST_TIME,
+        deleted_by=self.issue_1.reporter_id,
+        sequence=1)
+    amendments = [
+        tracker_pb2.Amendment(
+            field=tracker_pb2.FieldID.SUMMARY, newvalue='new', oldvalue='old'),
+        tracker_pb2.Amendment(
+            field=tracker_pb2.FieldID.OWNER, added_user_ids=[111]),
+        tracker_pb2.Amendment(
+            field=tracker_pb2.FieldID.CC,
+            added_user_ids=[111],
+            removed_user_ids=[222]),
+        tracker_pb2.Amendment(
+            field=tracker_pb2.FieldID.CUSTOM,
+            custom_field_name='EstDays',
+            newvalue='12')
+    ]
+    amendments_comment = tracker_pb2.IssueComment(
+        project_id=self.issue_1.project_id,
+        issue_id=self.issue_1.issue_id,
+        user_id=self.issue_1.reporter_id,
+        timestamp=self.PAST_TIME,
+        content='some amendments',
+        sequence=2,
+        amendments=amendments,
+        importer_id=1,  # Not used in conversion, so nothing to verify.
+        approval_id=self.approval_def_1_id)
+    inbound_spam_comment = tracker_pb2.IssueComment(
+        project_id=self.issue_1.project_id,
+        issue_id=self.issue_1.issue_id,
+        user_id=self.issue_1.reporter_id,
+        timestamp=self.PAST_TIME,
+        content='content',
+        sequence=3,
+        inbound_message='inbound message',
+        is_spam=True)
+    expected_0 = issue_objects_pb2.Comment(
+        name='projects/proj/issues/1/comments/0',
+        state=issue_objects_pb2.IssueContentState.Value('ACTIVE'),
+        type=issue_objects_pb2.Comment.Type.Value('DESCRIPTION'),
+        content='initial description',
+        commenter='users/111',
+        create_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        attachments=[
+            issue_objects_pb2.Comment.Attachment(
+                filename='example.png',
+                state=issue_objects_pb2.IssueContentState.Value('ACTIVE'),
+                size=12345,
+                media_type='image/png',
+                thumbnail_uri='attachment?aid=1&signed_aid=2&inline=1&thumb=1',
+                view_uri='attachment?aid=1&signed_aid=2&inline=1',
+                download_uri='attachment?aid=1&signed_aid=2'),
+            issue_objects_pb2.Comment.Attachment(
+                filename='deleted_example.png',
+                state=issue_objects_pb2.IssueContentState.Value('DELETED'),
+                media_type='image/png')
+        ])
+    expected_1 = issue_objects_pb2.Comment(
+        name='projects/proj/issues/1/comments/1',
+        state=issue_objects_pb2.IssueContentState.Value('DELETED'),
+        type=issue_objects_pb2.Comment.Type.Value('COMMENT'),
+        create_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME))
+    expected_2 = issue_objects_pb2.Comment(
+        name='projects/proj/issues/1/comments/2',
+        state=issue_objects_pb2.IssueContentState.Value('ACTIVE'),
+        type=issue_objects_pb2.Comment.Type.Value('COMMENT'),
+        content='some amendments',
+        commenter='users/111',
+        create_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        approval='projects/proj/approvalDefs/%d' % self.approval_def_1_id,
+        amendments=[
+            issue_objects_pb2.Comment.Amendment(
+                field_name='Summary', new_or_delta_value='new',
+                old_value='old'),
+            issue_objects_pb2.Comment.Amendment(
+                field_name='Owner', new_or_delta_value='o...@example.com'),
+            issue_objects_pb2.Comment.Amendment(
+                field_name='Cc',
+                new_or_delta_value='-t...@example.com o...@example.com'),
+            issue_objects_pb2.Comment.Amendment(
+                field_name='EstDays', new_or_delta_value='12')
+        ])
+    expected_3 = issue_objects_pb2.Comment(
+        name='projects/proj/issues/1/comments/3',
+        state=issue_objects_pb2.IssueContentState.Value('SPAM'),
+        type=issue_objects_pb2.Comment.Type.Value('COMMENT'),
+        content='content',
+        commenter='users/111',
+        create_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        inbound_message='inbound message')
+
+    comments = [
+        initial_comment, deleted_comment, amendments_comment,
+        inbound_spam_comment
+    ]
+    actual = self.converter.ConvertComments(self.issue_1.issue_id, comments)
+    self.assertEqual(actual, [expected_0, expected_1, expected_2, expected_3])
+
+  def testConvertComments_Empty(self):
+    """We can convert an empty list of comments."""
+    self.assertEqual(
+        self.converter.ConvertComments(self.issue_1.issue_id, []), [])
+
+  def testConvertIssue(self):
+    """We can convert a single issue."""
+    self.assertEqual(self.converter.ConvertIssue(self.issue_1),
+        self.converter.ConvertIssues([self.issue_1])[0])
+
+  def testConvertIssues(self):
+    """We can convert Issues."""
+    blocked_on_1 = fake.MakeTestIssue(
+        self.project_1.project_id,
+        3,
+        'sum3',
+        'New',
+        self.user_1.user_id,
+        issue_id=301,
+        project_name=self.project_1.project_name,
+    )
+    blocked_on_2 = fake.MakeTestIssue(
+        self.project_2.project_id,
+        4,
+        'sum4',
+        'New',
+        self.user_1.user_id,
+        issue_id=401,
+        project_name=self.project_2.project_name,
+    )
+    blocking = fake.MakeTestIssue(
+        self.project_2.project_id,
+        5,
+        'sum5',
+        'New',
+        self.user_1.user_id,
+        issue_id=501,
+        project_name=self.project_2.project_name,
+    )
+    self.services.issue.TestAddIssue(blocked_on_1)
+    self.services.issue.TestAddIssue(blocked_on_2)
+    self.services.issue.TestAddIssue(blocking)
+
+    # Reversing natural ordering to ensure order is respected.
+    self.issue_1.blocked_on_iids = [
+        blocked_on_2.issue_id, blocked_on_1.issue_id
+    ]
+    self.issue_1.dangling_blocked_on_refs = [
+        tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/555'),
+        tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/2')
+    ]
+    self.issue_1.blocking_iids = [blocking.issue_id]
+    self.issue_1.dangling_blocking_refs = [
+        tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/3')
+    ]
+
+    issues = [self.issue_1, self.issue_2]
+    expected_1 = issue_objects_pb2.Issue(
+        name='projects/proj/issues/1',
+        summary='sum',
+        state=issue_objects_pb2.IssueContentState.Value('ACTIVE'),
+        status=issue_objects_pb2.Issue.StatusValue(
+            derivation=EXPLICIT_DERIVATION, status='New'),
+        reporter='users/111',
+        owner=issue_objects_pb2.Issue.UserValue(
+            derivation=EXPLICIT_DERIVATION, user='users/111'),
+        cc_users=[
+            issue_objects_pb2.Issue.UserValue(
+                derivation=EXPLICIT_DERIVATION, user='users/222'),
+            issue_objects_pb2.Issue.UserValue(
+                derivation=RULE_DERIVATION, user='users/333')
+        ],
+        labels=[
+            issue_objects_pb2.Issue.LabelValue(
+                derivation=EXPLICIT_DERIVATION, label='label-a'),
+            issue_objects_pb2.Issue.LabelValue(
+                derivation=EXPLICIT_DERIVATION, label='label-b'),
+            issue_objects_pb2.Issue.LabelValue(
+                derivation=RULE_DERIVATION, label='label-derived'),
+            issue_objects_pb2.Issue.LabelValue(
+                derivation=RULE_DERIVATION, label='label-derived-2')
+        ],
+        components=[
+            issue_objects_pb2.Issue.ComponentValue(
+                derivation=EXPLICIT_DERIVATION,
+                component='projects/proj/componentDefs/1'),
+            issue_objects_pb2.Issue.ComponentValue(
+                derivation=EXPLICIT_DERIVATION,
+                component='projects/proj/componentDefs/2'),
+            issue_objects_pb2.Issue.ComponentValue(
+                derivation=RULE_DERIVATION,
+                component='projects/proj/componentDefs/3'),
+            issue_objects_pb2.Issue.ComponentValue(
+                derivation=RULE_DERIVATION,
+                component='projects/proj/componentDefs/4'),
+        ],
+        field_values=[
+            issue_objects_pb2.FieldValue(
+                derivation=EXPLICIT_DERIVATION,
+                field='projects/proj/fieldDefs/%d' % self.field_def_1,
+                value=self.fv_1_value,
+            ),
+            issue_objects_pb2.FieldValue(
+                derivation=RULE_DERIVATION,
+                field='projects/proj/fieldDefs/%d' % self.field_def_1,
+                value=self.fv_1_value,
+            ),
+            issue_objects_pb2.FieldValue(
+                derivation=EXPLICIT_DERIVATION,
+                field='projects/proj/fieldDefs/%d' % self.field_def_3,
+                value='1',
+            ),
+            issue_objects_pb2.FieldValue(
+                derivation=RULE_DERIVATION,
+                field='projects/proj/fieldDefs/%d' % self.field_def_4,
+                value='mac',
+            )
+        ],
+        merged_into_issue_ref=issue_objects_pb2.IssueRef(ext_identifier='b/1'),
+        blocked_on_issue_refs=[
+            issue_objects_pb2.IssueRef(issue='projects/goose/issues/4'),
+            issue_objects_pb2.IssueRef(issue='projects/proj/issues/3'),
+            issue_objects_pb2.IssueRef(ext_identifier='b/555'),
+            issue_objects_pb2.IssueRef(ext_identifier='b/2')
+        ],
+        blocking_issue_refs=[
+            issue_objects_pb2.IssueRef(issue='projects/goose/issues/5'),
+            issue_objects_pb2.IssueRef(ext_identifier='b/3')
+        ],
+        create_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        component_modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        status_modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        owner_modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        star_count=1,
+        attachment_count=5,
+        phases=[self.phase_1.name])
+    expected_2 = issue_objects_pb2.Issue(
+        name='projects/goose/issues/2',
+        summary='sum2',
+        state=issue_objects_pb2.IssueContentState.Value('SPAM'),
+        status=issue_objects_pb2.Issue.StatusValue(
+            derivation=RULE_DERIVATION, status='Fixed'),
+        reporter='users/111',
+        owner=issue_objects_pb2.Issue.UserValue(
+            derivation=RULE_DERIVATION, user='users/222'),
+        merged_into_issue_ref=issue_objects_pb2.IssueRef(
+            issue='projects/proj/issues/1'),
+        create_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        close_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        component_modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        status_modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        owner_modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME))
+    self.assertEqual(
+        self.converter.ConvertIssues(issues), [expected_1, expected_2])
+
+  def testConvertIssues_Empty(self):
+    """ConvertIssues works with no issues passed in."""
+    self.assertEqual(self.converter.ConvertIssues([]), [])
+
+  def testConvertIssues_NegativeAttachmentCount(self):
+    """Negative attachment counts are not set on issues."""
+    issue = fake.MakeTestIssue(
+        self.project_1.project_id,
+        3,
+        'sum',
+        'New',
+        owner_id=None,
+        reporter_id=111,
+        attachment_count=-10,
+        project_name=self.project_1.project_name,
+        opened_timestamp=self.PAST_TIME,
+        modified_timestamp=self.PAST_TIME)
+    self.services.issue.TestAddIssue(issue)
+    expected_issue = issue_objects_pb2.Issue(
+        name='projects/proj/issues/3',
+        state=issue_objects_pb2.IssueContentState.Value('ACTIVE'),
+        summary='sum',
+        status=issue_objects_pb2.Issue.StatusValue(
+            derivation=EXPLICIT_DERIVATION, status='New'),
+        reporter='users/111',
+        create_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        component_modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        status_modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        owner_modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+    )
+    self.assertEqual(self.converter.ConvertIssues([issue]), [expected_issue])
+
+  def testConvertIssues_FilterApprovalFV(self):
+    issue = fake.MakeTestIssue(
+        self.project_1.project_id,
+        3,
+        'sum',
+        'New',
+        owner_id=None,
+        reporter_id=111,
+        attachment_count=-10,
+        project_name=self.project_1.project_name,
+        opened_timestamp=self.PAST_TIME,
+        modified_timestamp=self.PAST_TIME,
+        field_values=[self.fv_1, self.fv_6])
+    self.services.issue.TestAddIssue(issue)
+    actual = self.converter.ConvertIssues([issue])[0]
+
+    expected_fv = issue_objects_pb2.FieldValue(
+        derivation=EXPLICIT_DERIVATION,
+        field='projects/proj/fieldDefs/%d' % self.field_def_1,
+        value=self.fv_1_value,
+    )
+    self.assertEqual(len(actual.field_values), 1)
+    self.assertEqual(actual.field_values[0], expected_fv)
+
+  def testConvertUser(self):
+    """We can convert a single User."""
+    self.user_1.vacation_message = 'non-empty-string'
+    self.converter.user_auth = authdata.AuthData.FromUser(
+        self.cnxn, self.user_1, self.services)
+
+    expected_user = user_objects_pb2.User(
+        name='users/111',
+        display_name='one@example.com',
+        email='one@example.com',
+        availability_message='non-empty-string')
+    self.assertEqual(self.converter.ConvertUser(self.user_1), expected_user)
+
+
+  def testConvertUsers(self):
+    user_deleted = self.services.user.TestAddUser(
+        '', framework_constants.DELETED_USER_ID)
+    self.user_1.vacation_message = 'non-empty-string'
+    user_ids = [self.user_1.user_id, user_deleted.user_id]
+    self.converter.user_auth = authdata.AuthData.FromUser(
+        self.cnxn, self.user_1, self.services)
+
+    expected_user_dict = {
+        self.user_1.user_id:
+            user_objects_pb2.User(
+                name='users/111',
+                display_name='one@example.com',
+                email='one@example.com',
+                availability_message='non-empty-string'),
+        user_deleted.user_id:
+            user_objects_pb2.User(
+                name='users/1',
+                display_name=framework_constants.DELETED_USER_NAME,
+                email='',
+                availability_message='User never visited'),
+    }
+    self.assertEqual(self.converter.ConvertUsers(user_ids), expected_user_dict)
+
+  def testConvertProjectStars(self):
+    expected_stars = [
+        user_objects_pb2.ProjectStar(name='users/111/projectStars/proj'),
+        user_objects_pb2.ProjectStar(name='users/111/projectStars/goose')
+    ]
+    self.assertEqual(
+        self.converter.ConvertProjectStars(
+            self.user_1.user_id, [self.project_1, self.project_2]),
+        expected_stars)
+
+  def _Issue(self, project_id, local_id):
+    issue = tracker_pb2.Issue(owner_id=0)
+    issue.project_name = 'proj-%d' % project_id
+    issue.project_id = project_id
+    issue.local_id = local_id
+    issue.issue_id = project_id * 100 + local_id
+    return issue
+
+  def testIngestAttachmentUploads(self):
+    up_1 = issues_pb2.AttachmentUpload(
+        filename='clown.gif', content='iTs prOUnOuNcED JIF')
+    up_2 = issues_pb2.AttachmentUpload(
+        filename='mowgli', content='cutest dog')
+
+    ingested = self.converter.IngestAttachmentUploads([up_1, up_2])
+    expected = [framework_helpers.AttachmentUpload(
+        'clown.gif', 'iTs prOUnOuNcED JIF', 'image/gif'),
+                framework_helpers.AttachmentUpload(
+                    'mowgli', 'cutest dog', 'text/plain')]
+    self.assertEqual(ingested, expected)
+
+  def testtIngestAttachmentUploads_Invalid(self):
+    up_1 = issues_pb2.AttachmentUpload(filename='clown.gif')
+    up_2 = issues_pb2.AttachmentUpload(content='cutest dog')
+
+    with self.assertRaisesRegexp(
+        exceptions.InputException, 'Uploaded .+\nUploaded .+'):
+      self.converter.IngestAttachmentUploads([up_1, up_2])
+
+  def testIngestIssueDeltas(self):
+    # Set up.
+    self.services.project.TestAddProject('proj-780', project_id=780)
+    config = fake.MakeTestConfig(780, [], [])
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    issue_1 = self._Issue(780, 1)
+    self.services.issue.TestAddIssue(issue_1)
+    issue_2 = self._Issue(780, 2)
+    self.services.issue.TestAddIssue(issue_2)
+    comp_1 = fake.MakeTestComponentDef(780, 1)
+    comp_2 = fake.MakeTestComponentDef(780, 2)
+    fd_str = fake.MakeTestFieldDef(1, 780, tracker_pb2.FieldTypes.STR_TYPE)
+    fd_enum = fake.MakeTestFieldDef(
+        2, 780, tracker_pb2.FieldTypes.ENUM_TYPE, field_name='Kingdom')
+    config = fake.MakeTestConfig(780, [], [])
+    config.component_defs = [comp_1, comp_2]
+    config.field_defs = [fd_str, fd_enum]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    # Issue and delta that changes all things.
+    api_issue_all = issue_objects_pb2.Issue(
+        name='projects/proj-780/issues/1',
+        status=issue_objects_pb2.Issue.StatusValue(status='Fixed'),
+        owner=issue_objects_pb2.Issue.UserValue(user='users/111'),
+        summary='honk honk.',
+        cc_users=[issue_objects_pb2.Issue.UserValue(user='users/222')],
+        components=[
+            issue_objects_pb2.Issue.ComponentValue(
+                component='projects/proj-780/componentDefs/1')
+        ],
+        field_values=[
+            issue_objects_pb2.FieldValue(
+                field='projects/proj-780/fieldDefs/1', value='chicken'),
+            issue_objects_pb2.FieldValue(
+                field='projects/proj-780/fieldDefs/2', value='come')
+        ],
+        labels=[issue_objects_pb2.Issue.LabelValue(label='ready')])
+    mask_all = field_mask_pb2.FieldMask(
+        paths=[
+            'status', 'owner', 'summary', 'cc_users', 'labels', 'components',
+            'field_values'
+        ])
+    api_delta_all = issues_pb2.IssueDelta(
+        issue=api_issue_all,
+        update_mask=mask_all,
+        ccs_remove=['users/333'],
+        components_remove=['projects/proj-780/componentDefs/2'],
+        field_vals_remove=[
+            issue_objects_pb2.FieldValue(
+                field='projects/proj-780/fieldDefs/1', value='rooster'),
+            issue_objects_pb2.FieldValue(
+                field='projects/proj-780/fieldDefs/2', value='leave')
+        ],
+        labels_remove=['not-ready'])
+    exp_fvs_add = [
+        field_helpers.ParseOneFieldValue(
+            self.cnxn, self.services.user, fd_str, 'chicken')
+    ]
+    exp_fvs_remove = [
+        field_helpers.ParseOneFieldValue(
+            self.cnxn, self.services.user, fd_str, 'rooster')
+    ]
+    expected_delta_all = tracker_pb2.IssueDelta(
+        status='Fixed',
+        owner_id=111,
+        summary='honk honk.',
+        cc_ids_add=[222],
+        cc_ids_remove=[333],
+        comp_ids_add=[1],
+        comp_ids_remove=[2],
+        field_vals_add=exp_fvs_add,
+        field_vals_remove=exp_fvs_remove,
+        labels_add=['ready', 'Kingdom-come'],
+        labels_remove=['not-ready', 'Kingdom-leave'])
+
+    api_deltas = [api_delta_all]
+
+    # Issue with all fields, but an empty mask.
+    api_issue_all_masked = issue_objects_pb2.Issue(
+        name='projects/proj-780/issues/2',
+        status=issue_objects_pb2.Issue.StatusValue(status='Fixed'),
+        owner=issue_objects_pb2.Issue.UserValue(user='users/111'),
+        summary='honk honk.',
+        cc_users=[issue_objects_pb2.Issue.UserValue(user='users/222')],
+        components=[
+            issue_objects_pb2.Issue.ComponentValue(
+                component='projects/proj-780/componentDefs/1')
+        ],
+        field_values=[
+            issue_objects_pb2.FieldValue(
+                field='projects/proj-780/fieldDefs/1', value='chicken'),
+            issue_objects_pb2.FieldValue(
+                field='projects/proj-780/fieldDefs/2', value='come')
+        ],
+        labels=[issue_objects_pb2.Issue.LabelValue(label='ready')])
+    api_delta_all_masked = issues_pb2.IssueDelta(
+        issue=api_issue_all_masked,
+        update_mask=field_mask_pb2.FieldMask(paths=[]),
+        ccs_remove=['users/333'],
+        components_remove=['projects/proj-780/componentDefs/2'],
+        field_vals_remove=[
+            issue_objects_pb2.FieldValue(
+                field='projects/proj-780/fieldDefs/1', value='rooster'),
+            issue_objects_pb2.FieldValue(
+                field='projects/proj-780/fieldDefs/2', value='leave')
+        ],
+        labels_remove=['not-ready'])
+    expected_delta_all_masked = tracker_pb2.IssueDelta(
+        cc_ids_remove=[333],
+        comp_ids_remove=[2],
+        labels_remove=['not-ready', 'Kingdom-leave'],
+        field_vals_remove=exp_fvs_remove)
+
+    api_deltas.append(api_delta_all_masked)
+
+    actual = self.converter.IngestIssueDeltas(api_deltas)
+    expected = [(78001, expected_delta_all), (78002, expected_delta_all_masked)]
+    self.assertEqual(actual, expected)
+
+  def testIngestIssueDeltas_IssueRefs(self):
+    # Set up.
+    self.services.project.TestAddProject('proj-780', project_id=780)
+    issue = self._Issue(780, 1)
+    self.services.issue.TestAddIssue(issue)
+
+    bo_add = self._Issue(780, 2)
+    self.services.issue.TestAddIssue(bo_add)
+
+    b_add = self._Issue(780, 3)
+    self.services.issue.TestAddIssue(b_add)
+
+    bo_remove = self._Issue(780, 4)
+    self.services.issue.TestAddIssue(bo_remove)
+
+    b_remove = self._Issue(780, 5)
+    self.services.issue.TestAddIssue(b_remove)
+
+    # merge_remove tested in testIngestIssueDeltas_RemoveNonRepeated
+    merge_add = self._Issue(780, 6)
+    self.services.issue.TestAddIssue(merge_add)
+
+    api_issue = issue_objects_pb2.Issue(
+        name='projects/proj-780/issues/1',
+        blocked_on_issue_refs=[
+            issue_objects_pb2.IssueRef(issue='projects/proj-780/issues/2'),
+            issue_objects_pb2.IssueRef(ext_identifier='b/1')
+        ],
+        blocking_issue_refs=[
+            issue_objects_pb2.IssueRef(issue='projects/proj-780/issues/3'),
+            issue_objects_pb2.IssueRef(ext_identifier='b/2')
+        ],
+        merged_into_issue_ref=issue_objects_pb2.IssueRef(
+            issue='projects/proj-780/issues/6'))
+
+    api_delta = issues_pb2.IssueDelta(
+        issue=api_issue,
+        update_mask=field_mask_pb2.FieldMask(
+            paths=[
+                'blocked_on_issue_refs', 'blocking_issue_refs',
+                'merged_into_issue_ref'
+            ]),
+        blocked_on_issues_remove=[
+            issue_objects_pb2.IssueRef(issue='projects/proj-780/issues/4'),
+            issue_objects_pb2.IssueRef(ext_identifier='b/3')
+        ],
+        blocking_issues_remove=[
+            issue_objects_pb2.IssueRef(issue='projects/proj-780/issues/5'),
+            issue_objects_pb2.IssueRef(ext_identifier='b/4')
+        ])
+
+    expected_delta = tracker_pb2.IssueDelta(
+        blocked_on_add=[bo_add.issue_id],
+        blocked_on_remove=[bo_remove.issue_id],
+        blocking_add=[b_add.issue_id],
+        blocking_remove=[b_remove.issue_id],
+        ext_blocked_on_add=['b/1'],
+        ext_blocked_on_remove=['b/3'],
+        ext_blocking_add=['b/2'],
+        ext_blocking_remove=['b/4'],
+        merged_into=merge_add.issue_id)
+
+    # Test adding an external merged_into_issue.
+    api_issue_ext_merged = issue_objects_pb2.Issue(
+        name='projects/proj-780/issues/2',
+        merged_into_issue_ref=issue_objects_pb2.IssueRef(ext_identifier='b/1'))
+    api_delta_ext_merged = issues_pb2.IssueDelta(
+        issue=api_issue_ext_merged,
+        update_mask=field_mask_pb2.FieldMask(paths=['merged_into_issue_ref']))
+    expected_delta_ext_merged = tracker_pb2.IssueDelta(
+        merged_into_external='b/1')
+
+    # Test issue with empty mask.
+    issue_all_masked = self._Issue(780, 11)
+    self.services.issue.TestAddIssue(issue_all_masked)
+
+    api_issue_all_masked = copy.deepcopy(api_issue)
+    api_issue_all_masked.name = 'projects/proj-780/issues/11'
+    api_delta_all_masked = issues_pb2.IssueDelta(
+        issue=api_issue_all_masked, update_mask=field_mask_pb2.FieldMask())
+    expected_all_masked_delta = tracker_pb2.IssueDelta()
+
+    # Check results.
+    actual = self.converter.IngestIssueDeltas(
+        [api_delta, api_delta_ext_merged, api_delta_all_masked])
+
+    expected = [
+        (78001, expected_delta), (78002, expected_delta_ext_merged),
+        (78011, expected_all_masked_delta)
+    ]
+    self.assertEqual(actual, expected)
+
+  def testIngestIssueDeltas_OwnerAndOwnerDotUser(self):
+    # Set up.
+    self.services.project.TestAddProject('proj-780', project_id=780)
+    issue = self._Issue(780, 1)
+    self.services.issue.TestAddIssue(issue)
+
+    api_issue = issue_objects_pb2.Issue(
+        name='projects/proj-780/issues/1',
+        owner=issue_objects_pb2.Issue.UserValue(user='users/111')
+    )
+
+    # Expect ingest to work when update_mask has just 'owner'.
+    api_delta = issues_pb2.IssueDelta(
+        issue=api_issue,
+        update_mask=field_mask_pb2.FieldMask(paths=['owner'])
+    )
+    expected_delta = tracker_pb2.IssueDelta(owner_id=111)
+    expected = [(78001, expected_delta)]
+    actual = self.converter.IngestIssueDeltas([api_delta])
+    self.assertEqual(actual, expected)
+
+    # Expect ingest to also work when update_mask uses 'owner.user' instead.
+    api_delta = issues_pb2.IssueDelta(
+        issue=api_issue,
+        update_mask=field_mask_pb2.FieldMask(paths=['owner.user'])
+    )
+    actual = self.converter.IngestIssueDeltas([api_delta])
+    self.assertEqual(actual, expected)
+
+  def testIngestIssueDeltas_StatusAndStatusDotStatus(self):
+    # Set up.
+    self.services.project.TestAddProject('proj-780', project_id=780)
+    issue = self._Issue(780, 1)
+    self.services.issue.TestAddIssue(issue)
+
+    api_issue = issue_objects_pb2.Issue(
+        name='projects/proj-780/issues/1',
+        owner=issue_objects_pb2.Issue.UserValue(user='users/111'),
+        status=issue_objects_pb2.Issue.StatusValue(status='New')
+    )
+
+    # Expect ingest to work when update_mask has just 'status'.
+    api_delta = issues_pb2.IssueDelta(
+        issue=api_issue,
+        update_mask=field_mask_pb2.FieldMask(paths=['status'])
+    )
+    expected_delta = tracker_pb2.IssueDelta(status='New')
+    expected = [(78001, expected_delta)]
+    actual = self.converter.IngestIssueDeltas([api_delta])
+    self.assertEqual(actual, expected)
+
+    # Expect ingest to also work when update_mask uses 'status.status' instead.
+    api_delta = issues_pb2.IssueDelta(
+        issue=api_issue,
+        update_mask=field_mask_pb2.FieldMask(paths=['status.status'])
+    )
+    actual = self.converter.IngestIssueDeltas([api_delta])
+    self.assertEqual(actual, expected)
+
+  def testIngestIssueDeltas_RemoveNonRepeated(self):
+    # Set up.
+    self.services.project.TestAddProject('proj-780', project_id=780)
+    issue_1 = self._Issue(780, 1)
+    self.services.issue.TestAddIssue(issue_1)
+    issue_2 = self._Issue(780, 2)
+    self.services.issue.TestAddIssue(issue_2)
+
+    # Check we can remove fields without specifying them in the
+    # issue, as long as they're specified in the FieldMask.
+    api_issue = issue_objects_pb2.Issue(
+        name='projects/proj-780/issues/1')
+    api_delta = issues_pb2.IssueDelta(
+        issue=api_issue,
+        update_mask=field_mask_pb2.FieldMask(
+            paths=[
+                'owner.user', 'status.status', 'summary',
+                'merged_into_issue_ref.issue'
+            ]))
+
+    # Check thet setting fields to '' result in same behavior as not
+    # explicitly setting the values at all.
+    api_issue_set = issue_objects_pb2.Issue(
+        name='projects/proj-780/issues/2',
+        summary='',
+        status=issue_objects_pb2.Issue.StatusValue(status=''),
+        owner=issue_objects_pb2.Issue.UserValue(user=''),
+        merged_into_issue_ref=issue_objects_pb2.IssueRef(issue=''))
+    api_delta_set = issues_pb2.IssueDelta(
+        issue=api_issue_set,
+        update_mask=field_mask_pb2.FieldMask(
+            paths=[
+                'owner.user', 'status.status', 'summary',
+                'merged_into_issue_ref.issue'
+            ]))
+
+    expected_delta = tracker_pb2.IssueDelta(
+        owner_id=framework_constants.NO_USER_SPECIFIED,
+        status='',
+        summary='',
+        merged_into=0)
+
+    actual = self.converter.IngestIssueDeltas([api_delta, api_delta_set])
+    expected = [(78001, expected_delta), (78002, expected_delta)]
+    self.assertEqual(actual, expected)
+
+  def testIngestIssueDeltas_InvalidMask(self):
+    self.services.project.TestAddProject('proj-780', project_id=780)
+    issue_1 = self._Issue(780, 1)
+    self.services.issue.TestAddIssue(issue_1)
+    issue_2 = self._Issue(780, 2)
+    self.services.issue.TestAddIssue(issue_2)
+    issue_3 = self._Issue(780, 3)
+    self.services.issue.TestAddIssue(issue_3)
+    api_deltas = []
+    err_msgs = []
+
+    api_issue_1 = issue_objects_pb2.Issue(name='projects/proj-780/issues/1')
+    api_delta_1 = issues_pb2.IssueDelta(issue=api_issue_1)
+    api_deltas.append(api_delta_1)
+    err_msgs.append(
+        '`update_mask` must be set for projects/proj-780/issues/1 delta.')
+
+    api_issue_2 = issue_objects_pb2.Issue(name='projects/proj-780/issues/2')
+    api_delta_2 = issues_pb2.IssueDelta(
+        issue=api_issue_2,
+        update_mask=field_mask_pb2.FieldMask())  # Empty but set is fine.
+    api_deltas.append(api_delta_2)
+
+    api_issue_3 = issue_objects_pb2.Issue(name='projects/proj-780/issues/3')
+    api_delta_3 = issues_pb2.IssueDelta(
+        issue=api_issue_3,
+        update_mask=field_mask_pb2.FieldMask(paths=['chicken']))
+    api_deltas.append(api_delta_3)
+    err_msgs.append(
+        'Invalid `update_mask` for projects/proj-780/issues/3 delta.')
+
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 '\n'.join(err_msgs)):
+      self.converter.IngestIssueDeltas(api_deltas)
+
+  def testIngestIssueDeltas_OutputOnlyIgnored(self):
+    # Set up.
+    self.services.project.TestAddProject('proj-780', project_id=780)
+    issue_1 = self._Issue(780, 1)
+    self.services.issue.TestAddIssue(issue_1)
+    comp_1 = fake.MakeTestComponentDef(780, 1)
+    fd_str = fake.MakeTestFieldDef(1, 780, tracker_pb2.FieldTypes.STR_TYPE)
+    config = fake.MakeTestConfig(780, [], [])
+    config.component_defs = [comp_1]
+    config.field_defs = [fd_str]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    api_issue = issue_objects_pb2.Issue(
+        name='projects/proj-780/issues/1',
+        owner=issue_objects_pb2.Issue.UserValue(
+            user='users/111',
+            derivation=issue_objects_pb2.Derivation.Value('RULE')),
+        status=issue_objects_pb2.Issue.StatusValue(
+            status='KingdomCome',
+            derivation=issue_objects_pb2.Derivation.Value('RULE')),
+        state=issue_objects_pb2.IssueContentState.Value('DELETED'),
+        reporter='users/222',
+        cc_users=[
+            issue_objects_pb2.Issue.UserValue(
+                user='users/333',
+                derivation=issue_objects_pb2.Derivation.Value('RULE'))
+        ],
+        labels=[
+            issue_objects_pb2.Issue.LabelValue(
+                label='wikipedia-sections',
+                derivation=issue_objects_pb2.Derivation.Value('RULE'))
+        ],
+        components=[
+            issue_objects_pb2.Issue.ComponentValue(
+                component='projects/proj-780/componentDefs/1',
+                derivation=issue_objects_pb2.Derivation.Value('RULE'))
+        ],
+        field_values=[
+            issue_objects_pb2.FieldValue(
+                field='projects/proj-780/fieldDefs/1',
+                value='bugs',
+                derivation=issue_objects_pb2.Derivation.Value('RULE'))
+        ],
+        create_time=timestamp_pb2.Timestamp(seconds=4044242),
+        close_time=timestamp_pb2.Timestamp(seconds=4044242),
+        modify_time=timestamp_pb2.Timestamp(seconds=4044242),
+        component_modify_time=timestamp_pb2.Timestamp(seconds=4044242),
+        status_modify_time=timestamp_pb2.Timestamp(seconds=4044242),
+        owner_modify_time=timestamp_pb2.Timestamp(seconds=4044242),
+        attachment_count=4,
+        star_count=2,
+        phases=['EarlyLife', 'CrimesBegin', 'CrimesContinue'])
+    paths_with_output_only = [
+        'owner', 'status', 'state', 'reporter', 'cc_users', 'labels',
+        'components', 'field_values', 'create_time', 'close_time',
+        'modify_time', 'component_modify_time', 'status_modify_time',
+        'owner_modify_time', 'attachment_count', 'star_count', 'phases']
+    api_delta = issues_pb2.IssueDelta(
+        issue=api_issue,
+        update_mask=field_mask_pb2.FieldMask(paths=paths_with_output_only))
+
+    expected_delta = tracker_pb2.IssueDelta(
+        # We ignore all Issue.*Value.derivation OUTPUT_ONLY fields.
+        owner_id=111,
+        status='KingdomCome',
+        cc_ids_add=[333],
+        labels_add=['wikipedia-sections'],
+        comp_ids_add=[1],
+        field_vals_add=[
+            field_helpers.ParseOneFieldValue(
+                self.cnxn, self.services.user, fd_str, 'bugs')
+        ])
+
+    actual = self.converter.IngestIssueDeltas([api_delta])
+    expected = [(78001, expected_delta)]
+    self.assertEqual(actual, expected)
+
+
+  def testIngestIssueDeltas_Empty(self):
+    actual = self.converter.IngestIssueDeltas([])
+    self.assertEqual(actual, [])
+
+  def testIngestIssueDeltas_InvalidValuesForFields(self):
+    # Set up.
+    self.services.project.TestAddProject('proj-780', project_id=780)
+    issue_1 = self._Issue(780, 1)
+    self.services.issue.TestAddIssue(issue_1)
+    fd_int = fake.MakeTestFieldDef(1, 780, tracker_pb2.FieldTypes.INT_TYPE)
+    fd_date = fake.MakeTestFieldDef(2, 780, tracker_pb2.FieldTypes.DATE_TYPE)
+    config = fake.MakeTestConfig(780, [], [])
+    config.field_defs = [fd_int, fd_date]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    api_issue = issue_objects_pb2.Issue(
+        name='projects/proj-780/issues/1',
+        field_values=[
+            issue_objects_pb2.FieldValue(
+                field='projects/proj-780/fieldDefs/1',
+                value='NotAnInt',
+                derivation=issue_objects_pb2.Derivation.Value('RULE')),
+            issue_objects_pb2.FieldValue(
+                field='projects/proj-780/fieldDefs/2',
+                value='NoDate',
+                derivation=issue_objects_pb2.Derivation.Value('EXPLICIT')),
+        ],
+    )
+    api_delta = issues_pb2.IssueDelta(
+        issue=api_issue,
+        update_mask=field_mask_pb2.FieldMask(paths=['field_values']))
+    error_messages = [
+        r'Could not ingest value \(NotAnInt\) for FieldDef \(projects/proj-780/'
+        r'fieldDefs/1\): Could not parse NotAnInt',
+        r'Could not ingest value \(NoDate\) for FieldDef \(projects/proj-780/fi'
+        r'eldDefs/2\): Could not parse NoDate',
+    ]
+    error_messages_re = '\n'.join(error_messages)
+    with self.assertRaisesRegexp(exceptions.InputException, error_messages_re):
+      self.converter.IngestIssueDeltas([api_delta])
+
+  @mock.patch('time.time', mock.MagicMock(return_value=CURRENT_TIME))
+  def testIngestApprovalDeltas(self):
+    mask = field_mask_pb2.FieldMask(
+        paths=['approvers', 'status', 'setter', 'phase', 'set_time'])
+    av_name = (
+        'projects/proj/issues/1/approvalValues/%d' % self.approval_def_1_id)
+    approval_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(
+            name=av_name,
+            status=issue_objects_pb2.ApprovalValue.ApprovalStatus.Value('NA'),
+            approvers=['users/222', 'users/333'],
+            approval_def='ignored',
+            set_time=timestamp_pb2.Timestamp(),  # Ignored.
+            setter='ignored',
+            phase='ignored'),
+        update_mask=mask,
+        approvers_remove=['users/222'])
+    actual = self.converter.IngestApprovalDeltas(
+        [approval_delta], self.user_1.user_id)
+    expected_delta = tracker_pb2.ApprovalDelta(
+        status=tracker_pb2.ApprovalStatus.NA,
+        setter_id=self.user_1.user_id,
+        set_on=int(CURRENT_TIME),
+        approver_ids_add=[222, 333],
+        approver_ids_remove=[222],
+    )
+    expected_delta_specifications = [
+        (self.issue_1.issue_id, self.approval_def_1_id, expected_delta)
+    ]
+    self.assertEqual(actual, expected_delta_specifications)
+
+  def testIngestApprovalDeltas_EmptyMask(self):
+    av_name = (
+        'projects/proj/issues/1/approvalValues/%d' % self.approval_def_1_id)
+    # field_def_6 belongs to approval_def_1.
+    approval_fv = issue_objects_pb2.FieldValue(
+        field='projects/proj/fieldDefs/%d' % self.field_def_6, value=u'x')
+    approval_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(
+            name=av_name,
+            status=issue_objects_pb2.ApprovalValue.ApprovalStatus.Value('NA'),
+            approvers=['users/222', 'users/333'],
+            approval_def='ignored',
+            field_values=[approval_fv],
+            set_time=timestamp_pb2.Timestamp(),  # Ignored.
+            setter='ignored',
+            phase='ignored'),
+        update_mask=field_mask_pb2.FieldMask(),
+        approvers_remove=['users/222'])
+    actual = self.converter.IngestApprovalDeltas(
+        [approval_delta], self.user_1.user_id)
+    expected_delta = tracker_pb2.ApprovalDelta(approver_ids_remove=[222])
+    expected_delta_specifications = [
+        (self.issue_1.issue_id, self.approval_def_1_id, expected_delta)
+    ]
+    self.assertEqual(actual, expected_delta_specifications)
+
+  def testIngestApprovalDeltas_InvalidMask(self):
+    av_name = (
+        'projects/proj/issues/1/approvalValues/%d' % self.approval_def_1_id)
+    approval_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(name=av_name),
+        update_mask=field_mask_pb2.FieldMask(paths=['chicken']))
+    expected_err = 'Invalid `update_mask` for %s delta' % av_name
+    with self.assertRaisesRegexp(exceptions.InputException, expected_err):
+      self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
+
+  def testIngestApprovalDeltas_FilterFieldValues(self):
+    av_name = (
+        'projects/proj/issues/1/approvalValues/%d' % self.approval_def_1_id)
+
+    # field_def_6 belongs to approval_def_1, should be ingested.
+    approval_fv = issue_objects_pb2.FieldValue(
+        field='projects/proj/fieldDefs/%d' % self.field_def_6,
+        value=u'touch-nose',
+        derivation=RULE_DERIVATION,  # Ignored.
+    )
+    # An enum field belonging to approval_def_1, should be ingested.
+    approval_enum_field_id = self._CreateFieldDef(
+        self.project_1.project_id,
+        'approval2field',
+        'ENUM_TYPE',
+        approval_id=self.approval_def_1_id)
+    approval_enum_fv = issue_objects_pb2.FieldValue(
+        field='projects/proj/fieldDefs/%d' % approval_enum_field_id,
+        value=u'enumval')
+    # Create field value that points to different approval, should raise error.
+    approval_2_fv = issue_objects_pb2.FieldValue(
+        field='projects/proj/fieldDefs/%d' % self.field_def_2, value=u'error')
+    av = issue_objects_pb2.ApprovalValue(
+        name=av_name, field_values=[approval_fv])
+    approval_delta = issues_pb2.ApprovalDelta(
+        update_mask=field_mask_pb2.FieldMask(paths=['field_values']),
+        approval_value=av,
+        field_vals_remove=[approval_enum_fv, approval_2_fv],
+        approvers_remove=['users/222'],
+    )
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 'Field .* does not belong to approval .*'):
+      self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
+
+  def testIngestApprovalDeltas_InvalidFieldValues(self):
+    av_name = (
+        'projects/proj/issues/1/approvalValues/%d' % self.approval_def_1_id)
+    approval_fv = issue_objects_pb2.FieldValue(
+        field='projects/proj/fieldDefs/%d' % self.field_def_6,
+        value=u'touch-nose',
+        derivation=RULE_DERIVATION,  # Ignored.
+    )
+    other_fv = issue_objects_pb2.FieldValue(
+        field='projects/proj/fieldDefs/%d' % self.field_def_1,
+        value=u'something',
+    )
+    # This does not exist, and should throw error.
+    dne_fv = issue_objects_pb2.FieldValue(
+        field='projects/proj/fieldDefs/404',
+        value=u'DoesNotExist',
+    )
+    av = issue_objects_pb2.ApprovalValue(
+        name=av_name, field_values=[other_fv, approval_fv, dne_fv])
+    approval_delta = issues_pb2.ApprovalDelta(
+        update_mask=field_mask_pb2.FieldMask(paths=['field_values']),
+        approval_value=av,
+        approvers_remove=['users/222'],
+    )
+    with self.assertRaisesRegexp(
+        exceptions.InputException,
+        'Field projects/proj/fieldDefs/404 is not in this project'):
+      self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
+
+  def testIngestApprovalDeltas_WrongProject(self):
+    approval_def_project2_name = 'project2_approval'
+    approval_def_project2_id = self._CreateFieldDef(
+        self.project_2.project_id,
+        approval_def_project2_name,
+        'APPROVAL_TYPE',
+        docstring='project2_ad_docstring',
+        admin_ids=[self.user_1.user_id])
+    self.services.config.UpdateConfig(
+        self.cnxn,
+        self.project_2,
+        approval_defs=[
+            (approval_def_project2_id, [self.user_1.user_id], 'survey')
+        ])
+    wrong_project_av_name = (
+        'projects/proj/issues/1/approvalValues/%d' % approval_def_project2_id)
+    approval_delta = issues_pb2.ApprovalDelta(
+        update_mask=field_mask_pb2.FieldMask(),
+        approval_value=issue_objects_pb2.ApprovalValue(
+            name=wrong_project_av_name))
+    with self.assertRaises(exceptions.InputException):
+      self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
+
+  def testIngestApprovalDeltas_DoesNotExist(self):
+    dne_av_name = ('projects/proj/issues/1/approvalValues/404')
+    approval_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(name=dne_av_name),
+        update_mask=field_mask_pb2.FieldMask())
+    with self.assertRaises(exceptions.InputException):
+      self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
+
+  def testIngestApprovalDeltas_NonApproval(self):
+    """We fail if provided a non-approval Field ID in the resource name."""
+    dne_av_name = (
+        'projects/proj/issues/1/approvalValues/%s' % self.field_def_1)
+    approval_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(name=dne_av_name),
+        update_mask=field_mask_pb2.FieldMask())
+    with self.assertRaises(exceptions.InputException):
+      self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
+
+  def testIngestApprovalDeltas_IssueDoesNotExist(self):
+    dne_av_name = (
+        'projects/proj/issues/404/approvalValues/%d' % self.approval_def_1_id)
+    approval_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(name=dne_av_name),
+        update_mask=field_mask_pb2.FieldMask())
+    with self.assertRaises(exceptions.NoSuchIssueException):
+      self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
+
+  def testIngestApprovalDeltas_EmptyDelta(self):
+    av_name = (
+        'projects/proj/issues/1/approvalValues/%d' % self.approval_def_1_id)
+    approval_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(name=av_name),
+        update_mask=field_mask_pb2.FieldMask())
+
+    actual = self.converter.IngestApprovalDeltas(
+        [approval_delta], self.user_1.user_id)
+
+    expected_delta = tracker_pb2.ApprovalDelta()
+    expected_delta_specifications = [
+        (self.issue_1.issue_id, self.approval_def_1_id, expected_delta)
+    ]
+    self.assertEqual(actual, expected_delta_specifications)
+
+  def testIngestApprovalDeltas_InvalidName(self):
+    approval_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(name='x'))
+    with self.assertRaises(exceptions.InputException):
+      self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
+
+  def testIngestApprovalDeltas_NoName(self):
+    approval_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(
+            status=issue_objects_pb2.ApprovalValue.ApprovalStatus.Value('NA')))
+    with self.assertRaises(exceptions.InputException):
+      self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
+
+  def testIngestApprovalDeltas_NoStatus(self):
+    """Setter ID isn't set when status isn't set."""
+    av_name = (
+        'projects/proj/issues/1/approvalValues/%d' % self.approval_def_1_id)
+    approval_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(
+            name=av_name,
+            status=issue_objects_pb2.ApprovalValue.ApprovalStatus.Value('NA'),
+            approvers=['users/333']),
+        # Status left out of update mask.
+        update_mask=field_mask_pb2.FieldMask(paths=['approvers']),
+        approvers_remove=['users/222'])
+    actual = self.converter.IngestApprovalDeltas(
+        [approval_delta], self.user_1.user_id)
+    expected_delta = tracker_pb2.ApprovalDelta(
+        approver_ids_add=[333], approver_ids_remove=[222])
+    expected_delta_specifications = [
+        (self.issue_1.issue_id, self.approval_def_1_id, expected_delta)
+    ]
+    self.assertEqual(actual, expected_delta_specifications)
+
+  def testIngestApprovalDeltas_ApproverRemoveDoesNotExist(self):
+    av_name = (
+        'projects/proj/issues/1/approvalValues/%d' % self.approval_def_1_id)
+    approval_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(name=av_name),
+        update_mask=field_mask_pb2.FieldMask(),
+        approvers_remove=['users/nobody@404.com'])
+    with self.assertRaises(exceptions.NoSuchUserException):
+      self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
+
+  def testIngestApprovalDeltas_ApproverAddDoesNotExist(self):
+    av_name = (
+        'projects/proj/issues/1/approvalValues/%d' % self.approval_def_1_id)
+    approval_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(
+            name=av_name, approvers=['users/nobody@404.com']),
+        update_mask=field_mask_pb2.FieldMask(paths=['approvers']))
+    with self.assertRaises(exceptions.NoSuchUserException):
+      self.converter.IngestApprovalDeltas([approval_delta], self.user_1.user_id)
+
+  def testIngestApprovalDeltas_FirstErrorRaised(self):
+    """Until we have error aggregation, we raise the first found error."""
+    av_name = (
+        'projects/proj/issues/1/approvalValues/%d' % self.approval_def_1_id)
+    user_dne_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(
+            name=av_name, approvers=['users/nobody@404.com']),
+        update_mask=field_mask_pb2.FieldMask(paths=['approvers']))
+    invalid_name_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(name='garbage'))
+    with self.assertRaises(exceptions.NoSuchUserException):
+      self.converter.IngestApprovalDeltas(
+          [user_dne_delta, invalid_name_delta], self.user_1.user_id)
+
+  def testIngestApprovalDeltas_MultipleDeltasSameSetOn(self):
+    av_name = (
+        'projects/proj/issues/1/approvalValues/%d' % self.approval_def_1_id)
+    delta_1 = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(
+            name=av_name,
+            status=issue_objects_pb2.ApprovalValue.ApprovalStatus.Value('NA'),
+            approvers=['users/222']),
+        update_mask=field_mask_pb2.FieldMask(paths=['approvers', 'status']))
+    # Change status, and also ensure we don't reuse the same mask across deltas
+    # Approvers should be ignored for delta_2 because it is not included in the
+    # mask.
+    delta_2 = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(
+            name=av_name,
+            status=issue_objects_pb2.ApprovalValue.ApprovalStatus.Value(
+                'NOT_SET'),
+            approvers=['users/222']),
+        update_mask=field_mask_pb2.FieldMask(paths=['status']))
+    actual = self.converter.IngestApprovalDeltas(
+        [delta_1, delta_2], self.user_1.user_id)
+    self.assertEqual(len(actual), 2)
+    actual_iid_1, actual_approval_id_1, actual_delta_1 = actual[0]
+    actual_iid_2, actual_approval_id_2, actual_delta_2 = actual[1]
+    self.assertEqual(actual_iid_1, self.issue_1.issue_id)
+    self.assertEqual(actual_iid_2, self.issue_1.issue_id)
+    self.assertEqual(actual_approval_id_1, self.approval_def_1_id)
+    self.assertEqual(actual_approval_id_2, self.approval_def_1_id)
+
+    self.assertEqual(actual_delta_1.status, tracker_pb2.ApprovalStatus.NA)
+    self.assertEqual(actual_delta_2.status, tracker_pb2.ApprovalStatus.NOT_SET)
+    self.assertEqual(actual_delta_1.setter_id, self.user_1.user_id)
+    self.assertEqual(actual_delta_2.setter_id, self.user_1.user_id)
+    self.assertEqual(actual_delta_1.approver_ids_add, [222])
+    self.assertEqual(actual_delta_2.approver_ids_add, [])
+    # We don't patch time.time, so these would be different if the set_on wasn't
+    # passed in.
+    # Note: More ideal/correct unit test would create a mock that forces
+    # time.time to return an incremented value on its subsequent calls.
+    self.assertEqual(actual_delta_1.set_on, actual_delta_2.set_on)
+
+  def testIngestApprovalDeltas_DifferentProjects(self):
+    # Create an ApprovalDef for project2
+    approval_def_project2_name = 'project2_approval'
+    approval_def_project2_id = self._CreateFieldDef(
+        self.project_2.project_id,
+        approval_def_project2_name,
+        'APPROVAL_TYPE',
+        docstring='project2_ad_docstring',
+        admin_ids=[self.user_1.user_id])
+    self.services.config.UpdateConfig(
+        self.cnxn,
+        self.project_2,
+        approval_defs=[
+            (approval_def_project2_id, [self.user_1.user_id], 'survey')
+        ])
+
+    # Define a field belonging to project_2's ApprovalDef.
+    project2_field_id = self._CreateFieldDef(
+        self.project_2.project_id,
+        'approval2field',
+        'STR_TYPE',
+        approval_id=approval_def_project2_id)
+    project2_fv = issue_objects_pb2.FieldValue(
+        field='projects/proj/fieldDefs/%d' % project2_field_id, value=u'p2')
+
+    # field_def_6 belongs to approval_def_1.
+    project1_fv = issue_objects_pb2.FieldValue(
+        field='projects/proj/fieldDefs/%d' % self.field_def_6,
+        value=u'touch-nose',
+    )
+
+    # Both ApprovalValues are provided both FieldValues, and we expect them
+    # to only include the FieldValues appropriate to their respective approvals.
+    project2_av_name = (
+        'projects/%s/issues/2/approvalValues/%d' %
+        (self.project_2.project_name, approval_def_project2_id))
+    project2_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(
+            name=project2_av_name, field_values=[project1_fv, project2_fv]),
+        update_mask=field_mask_pb2.FieldMask(paths=['field_values']))
+
+    project1_av_name = (
+        'projects/proj/issues/1/approvalValues/%d' % self.approval_def_1_id)
+    project1_delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(
+            name=project1_av_name, field_values=[project1_fv, project2_fv]),
+        update_mask=field_mask_pb2.FieldMask(paths=['field_values']))
+
+    with self.assertRaisesRegexp(
+        exceptions.InputException,
+        'Field projects/proj/fieldDefs/%d is not in this project' %
+        self.field_def_6):
+      self.converter.IngestApprovalDeltas(
+          [project2_delta, project1_delta], self.user_1.user_id)
+
+  def testIngestIssue(self):
+    ingest = issue_objects_pb2.Issue(
+        summary='sum',
+        status=issue_objects_pb2.Issue.StatusValue(
+            status='new', derivation=RULE_DERIVATION),
+        owner=issue_objects_pb2.Issue.UserValue(
+            derivation=EXPLICIT_DERIVATION, user='users/111'),
+        cc_users=[
+            issue_objects_pb2.Issue.UserValue(
+                derivation=EXPLICIT_DERIVATION, user='users/new@user.com'),
+            issue_objects_pb2.Issue.UserValue(
+                derivation=RULE_DERIVATION, user='users/333')
+        ],
+        components=[
+            issue_objects_pb2.Issue.ComponentValue(
+                component='projects/proj/componentDefs/%d' %
+                self.component_def_1_id),
+            issue_objects_pb2.Issue.ComponentValue(
+                component='projects/proj/componentDefs/%d' %
+                self.component_def_2_id),
+        ],
+        labels=[
+            issue_objects_pb2.Issue.LabelValue(
+                derivation=EXPLICIT_DERIVATION, label='a'),
+            issue_objects_pb2.Issue.LabelValue(
+                derivation=EXPLICIT_DERIVATION, label='key-explicit'),
+            issue_objects_pb2.Issue.LabelValue(
+                derivation=RULE_DERIVATION, label='derived1'),
+            issue_objects_pb2.Issue.LabelValue(
+                derivation=RULE_DERIVATION, label='key-derived')
+        ],
+        field_values=[
+            issue_objects_pb2.FieldValue(
+                derivation=EXPLICIT_DERIVATION,
+                field='projects/proj/fieldDefs/%d' % self.field_def_1,
+                value='multivalue1',
+            ),
+            issue_objects_pb2.FieldValue(
+                derivation=RULE_DERIVATION,
+                field='projects/proj/fieldDefs/%d' % self.field_def_1,
+                value='multivalue2',
+            ),
+            issue_objects_pb2.FieldValue(
+                derivation=EXPLICIT_DERIVATION,
+                field='projects/proj/fieldDefs/%d' % self.field_def_3,
+                value='1',
+            ),
+            issue_objects_pb2.FieldValue(
+                derivation=RULE_DERIVATION,
+                field='projects/proj/fieldDefs/%d' % self.field_def_4,
+                value='mac',
+            ),
+            issue_objects_pb2.FieldValue(
+                field='projects/proj/fieldDefs/%d' % self.field_def_2,
+                value='38',  # Max value not checked.
+            ),
+            issue_objects_pb2.FieldValue(  # Multivalue not checked.
+                field='projects/proj/fieldDefs/%d' % self.field_def_2,
+                value='0'  # Confirm we ingest 0 rather than None.
+            ),
+            issue_objects_pb2.FieldValue(
+                field='projects/proj/fieldDefs/%d' % self.field_def_8,
+                value='users/111',
+            ),
+            issue_objects_pb2.FieldValue(
+                field='projects/proj/fieldDefs/%d' % self.field_def_8,
+                value='users/404',  # User lookup not attempted.
+            ),
+            issue_objects_pb2.FieldValue(
+                field='projects/proj/fieldDefs/%d' % self.field_def_9,
+                value='2020-01-01',
+            ),
+            issue_objects_pb2.FieldValue(
+                field='projects/proj/fieldDefs/%d' % self.field_def_9,
+                value='2100-01-01',
+            ),
+            issue_objects_pb2.FieldValue(
+                field='projects/proj/fieldDefs/%d' % self.field_def_9,
+                value='1000-01-01',
+            ),
+            issue_objects_pb2.FieldValue(
+                field='projects/proj/fieldDefs/%d' % self.field_def_10,
+                value='garbage',
+            ),
+        ],
+        merged_into_issue_ref=issue_objects_pb2.IssueRef(ext_identifier='b/1'),
+        blocked_on_issue_refs=[
+            # Reversing natural ordering to ensure order is respected.
+            issue_objects_pb2.IssueRef(issue='projects/goose/issues/4'),
+            issue_objects_pb2.IssueRef(issue='projects/proj/issues/3'),
+            issue_objects_pb2.IssueRef(ext_identifier='b/555'),
+            issue_objects_pb2.IssueRef(ext_identifier='b/2')
+        ],
+        blocking_issue_refs=[
+            issue_objects_pb2.IssueRef(issue='projects/goose/issues/5'),
+            issue_objects_pb2.IssueRef(ext_identifier='b/3')
+        ],
+        # All the following fields should be ignored.
+        name='projects/proj/issues/1',
+        state=issue_objects_pb2.IssueContentState.Value('SPAM'),
+        reporter='users/111',
+        create_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        component_modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        status_modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        owner_modify_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        star_count=1,
+        attachment_count=5,
+        phases=[self.phase_1.name])
+
+    blocked_on_1 = fake.MakeTestIssue(
+        self.project_1.project_id,
+        3,
+        'sum3',
+        'New',
+        self.user_1.user_id,
+        issue_id=301,
+        project_name=self.project_1.project_name,
+    )
+    blocked_on_2 = fake.MakeTestIssue(
+        self.project_2.project_id,
+        4,
+        'sum4',
+        'New',
+        self.user_1.user_id,
+        issue_id=401,
+        project_name=self.project_2.project_name,
+    )
+    blocking = fake.MakeTestIssue(
+        self.project_2.project_id,
+        5,
+        'sum5',
+        'New',
+        self.user_1.user_id,
+        issue_id=501,
+        project_name=self.project_2.project_name,
+    )
+    self.services.issue.TestAddIssue(blocked_on_1)
+    self.services.issue.TestAddIssue(blocked_on_2)
+    self.services.issue.TestAddIssue(blocking)
+
+    actual = self.converter.IngestIssue(ingest, self.project_1.project_id)
+
+    expected_cc1_id = self.services.user.LookupUserID(
+        self.cnxn, 'new@user.com', autocreate=False)
+    expected_field_values = [
+        tracker_pb2.FieldValue(
+            field_id=self.field_def_1,
+            str_value=u'multivalue1',
+            derived=False,
+        ),
+        tracker_pb2.FieldValue(
+            field_id=self.field_def_1,
+            str_value=u'multivalue2',
+            derived=False,
+        ),
+        tracker_pb2.FieldValue(
+            field_id=self.field_def_2, int_value=38, derived=False),
+        tracker_pb2.FieldValue(
+            field_id=self.field_def_2, int_value=0, derived=False),
+        tracker_pb2.FieldValue(
+            field_id=self.field_def_8, user_id=111, derived=False),
+        tracker_pb2.FieldValue(
+            field_id=self.field_def_8, user_id=404, derived=False),
+        tracker_pb2.FieldValue(
+            field_id=self.field_def_9, date_value=1577836800, derived=False),
+        tracker_pb2.FieldValue(
+            field_id=self.field_def_9, date_value=4102444800, derived=False),
+        tracker_pb2.FieldValue(
+            field_id=self.field_def_9, date_value=-30610224000, derived=False),
+        tracker_pb2.FieldValue(
+            field_id=self.field_def_10,
+            url_value=u'http://garbage',
+            derived=False),
+    ]
+    expected = tracker_pb2.Issue(
+        project_id=self.project_1.project_id,
+        summary=u'sum',
+        status=u'new',
+        owner_id=111,
+        cc_ids=[expected_cc1_id, 333],
+        component_ids=[self.component_def_1_id, self.component_def_2_id],
+        merged_into_external=u'b/1',
+        labels=[
+            u'a', u'key-explicit', u'derived1', u'key-derived', u'days-1',
+            u'OS-mac'
+        ],
+        field_values=expected_field_values,
+        blocked_on_iids=[blocked_on_2.issue_id, blocked_on_1.issue_id],
+        blocking_iids=[blocking.issue_id],
+        dangling_blocked_on_refs=[
+            tracker_pb2.DanglingIssueRef(ext_issue_identifier=u'b/555'),
+            tracker_pb2.DanglingIssueRef(ext_issue_identifier=u'b/2')
+        ],
+        dangling_blocking_refs=[
+            tracker_pb2.DanglingIssueRef(ext_issue_identifier=u'b/3')
+        ],
+    )
+    self.AssertProtosEqual(actual, expected)
+
+  def AssertProtosEqual(self, actual, expected):
+    """Asserts equal, printing a diff if not."""
+    # TODO(jessan): If others find this useful, move to a shared testing lib.
+    try:
+      self.assertEqual(actual, expected)
+    except AssertionError as e:
+      # Append a diff to the normal error message.
+      expected_str = str(expected).splitlines(1)
+      actual_str = str(actual).splitlines(1)
+      diff = difflib.unified_diff(actual_str, expected_str)
+      err_msg = '%s\nProto actual vs expected diff:\n %s' % (e, ''.join(diff))
+      raise AssertionError(err_msg)
+
+  def testIngestIssue_Minimal(self):
+    """Test IngestIssue with as few fields set as possible."""
+    minimal = issue_objects_pb2.Issue(
+        status=issue_objects_pb2.Issue.StatusValue(status='new')
+    )
+    expected = tracker_pb2.Issue(
+        project_id=self.project_1.project_id,
+        summary='', # Summary gets set to empty str on conversion.
+        status='new',
+        owner_id=0
+    )
+    actual = self.converter.IngestIssue(minimal, self.project_1.project_id)
+    self.assertEqual(actual, expected)
+
+  def testIngestIssue_NoSuchProject(self):
+    self.services.config.strict = True
+    ingest = issue_objects_pb2.Issue(
+        status=issue_objects_pb2.Issue.StatusValue(status='new'))
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      self.converter.IngestIssue(ingest, -1)
+
+  def testIngestIssue_Errors(self):
+    invalid_issue_ref = issue_objects_pb2.IssueRef(
+        ext_identifier='b/1',
+        issue='projects/proj/issues/1')
+    ingest = issue_objects_pb2.Issue(
+        summary='sum',
+        owner=issue_objects_pb2.Issue.UserValue(
+            derivation=EXPLICIT_DERIVATION, user='users/nonexisting@user.com'),
+        cc_users=[
+            issue_objects_pb2.Issue.UserValue(
+                derivation=EXPLICIT_DERIVATION, user='invalidFormat1'),
+            issue_objects_pb2.Issue.UserValue(
+                derivation=RULE_DERIVATION, user='invalidFormat2')
+        ],
+        components=[
+            issue_objects_pb2.Issue.ComponentValue(
+                component='projects/proj/componentDefs/404')
+        ],
+        field_values=[
+            issue_objects_pb2.FieldValue(),
+            issue_objects_pb2.FieldValue(field='garbage'),
+            issue_objects_pb2.FieldValue(
+                field='projects/proj/fieldDefs/%d' % self.field_def_8,
+                value='users/nonexisting@user.com',
+            ),
+        ],
+        merged_into_issue_ref=invalid_issue_ref,
+        blocked_on_issue_refs=[
+            issue_objects_pb2.IssueRef(),
+            issue_objects_pb2.IssueRef(issue='projects/404/issues/1')
+        ],
+        blocking_issue_refs=[
+            issue_objects_pb2.IssueRef(issue='projects/proj/issues/404')
+        ],
+    )
+    error_messages = [
+        r'.+not found when ingesting owner',
+        r'.+cc_users: Invalid resource name: invalidFormat1.',
+        r'Status is required when creating an issue',
+        r'.+components: Component not found: 404.',
+        r'.+: Invalid resource name: .', r'.+: Invalid resource name: garbage.',
+        r'.+not found when ingesting user field:.+',
+        r'.+issue:.+[\n\r]+ext_identifier:.+[\n\r]+: IssueRefs MUST NOT have.+',
+        r'.+: IssueRefs MUST have one of.+',
+        r'.+issue:.+[\n\r]+: Project 404 not found.',
+        r'.+issue:.+[\n\r]+: Issue.+404.+not found'
+    ]
+    error_messages_re = '\n'.join(error_messages)
+    with self.assertRaisesRegexp(exceptions.InputException, error_messages_re):
+      self.converter.IngestIssue(ingest, self.project_1.project_id)
+
+  def testIngestIssuesListColumns(self):
+    columns = [
+        issue_objects_pb2.IssuesListColumn(column='chicken'),
+        issue_objects_pb2.IssuesListColumn(column='boiled-egg')
+    ]
+    self.assertEqual(
+        self.converter.IngestIssuesListColumns(columns), 'chicken boiled-egg')
+
+  def testIngestIssuesListColumns_Empty(self):
+    self.assertEqual(self.converter.IngestIssuesListColumns([]), '')
+
+  def test_ComputeIssuesListColumns(self):
+    """Can convert string to sequence of IssuesListColumns"""
+    expected_columns = [
+        issue_objects_pb2.IssuesListColumn(column='chicken'),
+        issue_objects_pb2.IssuesListColumn(column='boiled-egg')
+    ]
+    self.assertEqual(
+        expected_columns,
+        self.converter._ComputeIssuesListColumns('chicken boiled-egg'))
+
+  def test_ComputeIssuesListColumns_Empty(self):
+    """Can handle empty strings"""
+    self.assertEqual([], self.converter._ComputeIssuesListColumns(''))
+
+  def test_Conversion_IssuesListColumns(self):
+    """_Ingest and _Compute converts to and from each other"""
+    expected_columns = 'foo bar fizz buzz'
+    converted_columns = self.converter._ComputeIssuesListColumns(
+        expected_columns)
+    self.assertEqual(
+        expected_columns,
+        self.converter.IngestIssuesListColumns(converted_columns))
+
+    expected_columns = [
+        issue_objects_pb2.IssuesListColumn(column='foo'),
+        issue_objects_pb2.IssuesListColumn(column='bar'),
+        issue_objects_pb2.IssuesListColumn(column='fizz'),
+        issue_objects_pb2.IssuesListColumn(column='buzz')
+    ]
+    converted_columns = self.converter.IngestIssuesListColumns(expected_columns)
+    self.assertEqual(
+        expected_columns,
+        self.converter._ComputeIssuesListColumns(converted_columns))
+
+  def testIngestNotifyType(self):
+    notify = issues_pb2.NotifyType.Value('NOTIFY_TYPE_UNSPECIFIED')
+    actual = self.converter.IngestNotifyType(notify)
+    self.assertEqual(actual, True)
+    notify = issues_pb2.NotifyType.Value('EMAIL')
+    actual = self.converter.IngestNotifyType(notify)
+    self.assertEqual(actual, True)
+    notify = issues_pb2.NotifyType.Value('NO_NOTIFICATION')
+    actual = self.converter.IngestNotifyType(notify)
+    self.assertEqual(actual, False)
+
+  def test_GetNonApprovalFieldValues(self):
+    """It filters out field values that belong to approvals"""
+    expected_str = 'some_string_field_value'
+    fv_expected = fake.MakeFieldValue(
+        field_id=self.field_def_1, str_value=expected_str, derived=False)
+    actual = self.converter._GetNonApprovalFieldValues(
+        [fv_expected, self.fv_6], self.project_1.project_id)
+    self.assertEqual(len(actual), 1)
+    self.assertEqual(actual[0], fv_expected)
+
+  def test_GetNonApprovalFieldValues_Empty(self):
+    actual = self.converter._GetNonApprovalFieldValues(
+        [], self.project_1.project_id)
+    self.assertEqual(actual, [])
+
+  def testConvertFieldValues(self):
+    """It ignores field values referencing a non-existent field"""
+    expected_str = 'some_string_field_value'
+    fv = fake.MakeFieldValue(
+        field_id=self.field_def_1, str_value=expected_str, derived=False)
+    expected_name = rnc.ConvertFieldDefNames(
+        self.cnxn, [self.field_def_1], self.project_1.project_id,
+        self.services)[self.field_def_1]
+    expected_value = issue_objects_pb2.FieldValue(
+        field=expected_name,
+        value=expected_str,
+        derivation=EXPLICIT_DERIVATION,
+        phase=None)
+    output = self.converter.ConvertFieldValues(
+        [fv], self.project_1.project_id, [])
+    self.assertEqual([expected_value], output)
+
+  def testConvertFieldValues_Empty(self):
+    output = self.converter.ConvertFieldValues(
+        [], self.project_1.project_id, [])
+    self.assertEqual([], output)
+
+  def testConvertFieldValues_PreservesOrder(self):
+    """It ignores field values referencing a non-existent field"""
+    expected_str = 'some_string_field_value'
+    fv_1 = fake.MakeFieldValue(
+        field_id=self.field_def_1, str_value=expected_str, derived=False)
+    name_1 = rnc.ConvertFieldDefNames(
+        self.cnxn, [self.field_def_1], self.project_1.project_id,
+        self.services)[self.field_def_1]
+    expected_1 = issue_objects_pb2.FieldValue(
+        field=name_1,
+        value=expected_str,
+        derivation=EXPLICIT_DERIVATION,
+        phase=None)
+
+    expected_int = 111111
+    fv_2 = fake.MakeFieldValue(
+        field_id=self.field_def_2, int_value=expected_int, derived=True)
+    name_2 = rnc.ConvertFieldDefNames(
+        self.cnxn, [self.field_def_2], self.project_1.project_id,
+        self.services).get(self.field_def_2)
+    expected_2 = issue_objects_pb2.FieldValue(
+        field=name_2,
+        value=str(expected_int),
+        derivation=RULE_DERIVATION,
+        phase=None)
+    output = self.converter.ConvertFieldValues(
+        [fv_1, fv_2], self.project_1.project_id, [])
+    self.assertEqual([expected_1, expected_2], output)
+
+  def testConvertFieldValues_IgnoresNullFieldDefs(self):
+    """It ignores field values referencing a non-existent field"""
+    expected_str = 'some_string_field_value'
+    fv_1 = fake.MakeFieldValue(
+        field_id=self.field_def_1, str_value=expected_str, derived=False)
+    name_1 = rnc.ConvertFieldDefNames(
+        self.cnxn, [self.field_def_1], self.project_1.project_id,
+        self.services)[self.field_def_1]
+    expected_1 = issue_objects_pb2.FieldValue(
+        field=name_1,
+        value=expected_str,
+        derivation=EXPLICIT_DERIVATION,
+        phase=None)
+
+    fv_2 = fake.MakeFieldValue(
+        field_id=self.dne_field_def_id, int_value=111111, derived=True)
+    output = self.converter.ConvertFieldValues(
+        [fv_1, fv_2], self.project_1.project_id, [])
+    self.assertEqual([expected_1], output)
+
+  def test_ComputeFieldValueString_None(self):
+    with self.assertRaises(exceptions.InputException):
+      self.converter._ComputeFieldValueString(None)
+
+  def test_ComputeFieldValueString_INT_TYPE(self):
+    expected = 123158
+    fv = fake.MakeFieldValue(field_id=self.field_def_2, int_value=expected)
+    output = self.converter._ComputeFieldValueString(fv)
+    self.assertEqual(str(expected), output)
+
+  def test_ComputeFieldValueString_STR_TYPE(self):
+    expected = 'some_string_field_value'
+    fv = fake.MakeFieldValue(field_id=self.field_def_1, str_value=expected)
+    output = self.converter._ComputeFieldValueString(fv)
+    self.assertEqual(expected, output)
+
+  def test_ComputeFieldValueString_USER_TYPE(self):
+    user_id = self.user_1.user_id
+    expected = rnc.ConvertUserName(user_id)
+    fv = fake.MakeFieldValue(field_id=self.dne_field_def_id, user_id=user_id)
+    output = self.converter._ComputeFieldValueString(fv)
+    self.assertEqual(expected, output)
+
+  def test_ComputeFieldValueString_DATE_TYPE(self):
+    expected = 1234567890
+    fv = fake.MakeFieldValue(
+        field_id=self.dne_field_def_id, date_value=expected)
+    output = self.converter._ComputeFieldValueString(fv)
+    self.assertEqual(str(expected), output)
+
+  def test_ComputeFieldValueString_URL_TYPE(self):
+    expected = 'some URL'
+    fv = fake.MakeFieldValue(field_id=self.dne_field_def_id, url_value=expected)
+    output = self.converter._ComputeFieldValueString(fv)
+    self.assertEqual(expected, output)
+
+  def test_ComputeFieldValueDerivation_RULE(self):
+    expected = RULE_DERIVATION
+    fv = fake.MakeFieldValue(
+        field_id=self.field_def_1, str_value='something', derived=True)
+    output = self.converter._ComputeFieldValueDerivation(fv)
+    self.assertEqual(expected, output)
+
+  def test_ComputeFieldValueDerivation_EXPLICIT(self):
+    expected = EXPLICIT_DERIVATION
+    fv = fake.MakeFieldValue(
+        field_id=self.field_def_1, str_value='something', derived=False)
+    output = self.converter._ComputeFieldValueDerivation(fv)
+    self.assertEqual(expected, output)
+
+  def testConvertApprovalValues_Issue(self):
+    """We can convert issue approval_values."""
+    name = rnc.ConvertApprovalValueNames(
+        self.cnxn, self.issue_1.issue_id, self.services)[self.av_1.approval_id]
+    approval_def_name = rnc.ConvertApprovalDefNames(
+        self.cnxn, [self.approval_def_1_id], self.project_1.project_id,
+        self.services)[self.approval_def_1_id]
+    approvers = [rnc.ConvertUserName(self.user_2.user_id)]
+    status = issue_objects_pb2.ApprovalValue.ApprovalStatus.Value(
+        'NOT_SET')
+    setter = rnc.ConvertUserName(self.user_1.user_id)
+    api_fvs = self.converter.ConvertFieldValues(
+        [self.fv_6], self.project_1.project_id, [self.phase_1])
+    # Check we can handle converting a None `set_on`.
+    self.av_1.set_on = None
+
+    output = self.converter.ConvertApprovalValues(
+        [self.av_1], [self.fv_1, self.fv_6], [self.phase_1],
+        issue_id=self.issue_1.issue_id)
+    expected = issue_objects_pb2.ApprovalValue(
+        name=name,
+        approval_def=approval_def_name,
+        approvers=approvers,
+        status=status,
+        setter=setter,
+        phase=self.phase_1.name,
+        field_values=api_fvs)
+    self.assertEqual([expected], output)
+
+  def testConvertApprovalValues_Templates(self):
+    """We can convert template approval_values."""
+    approval_def_name = rnc.ConvertApprovalDefNames(
+        self.cnxn, [self.approval_def_1_id], self.project_1.project_id,
+        self.services)[self.approval_def_1_id]
+    approvers = [rnc.ConvertUserName(self.user_2.user_id)]
+    status = issue_objects_pb2.ApprovalValue.ApprovalStatus.Value(
+        'NOT_SET')
+    set_time = timestamp_pb2.Timestamp()
+    set_time.FromSeconds(self.PAST_TIME)
+    setter = rnc.ConvertUserName(self.user_1.user_id)
+    api_fvs = self.converter.ConvertFieldValues(
+        [self.fv_6], self.project_1.project_id, [self.phase_1])
+
+    output = self.converter.ConvertApprovalValues(
+        [self.av_1], [self.fv_1, self.fv_6], [self.phase_1],
+        project_id=self.project_1.project_id)
+    expected = issue_objects_pb2.ApprovalValue(
+        approval_def=approval_def_name,
+        approvers=approvers,
+        status=status,
+        set_time=set_time,
+        setter=setter,
+        phase=self.phase_1.name,
+        field_values=api_fvs)
+    self.assertEqual([expected], output)
+
+  def testConvertApprovalValues_NoPhase(self):
+    approval_def_name = rnc.ConvertApprovalDefNames(
+        self.cnxn, [self.approval_def_1_id], self.project_1.project_id,
+        self.services)[self.approval_def_1_id]
+    approvers = [rnc.ConvertUserName(self.user_2.user_id)]
+    status = issue_objects_pb2.ApprovalValue.ApprovalStatus.Value(
+        'NOT_SET')
+    set_time = timestamp_pb2.Timestamp()
+    set_time.FromSeconds(self.PAST_TIME)
+    setter = rnc.ConvertUserName(self.user_1.user_id)
+    expected = issue_objects_pb2.ApprovalValue(
+        approval_def=approval_def_name,
+        approvers=approvers,
+        status=status,
+        set_time=set_time,
+        setter=setter)
+
+    output = self.converter.ConvertApprovalValues(
+        [self.av_1], [], [], project_id=self.project_1.project_id)
+    self.assertEqual([expected], output)
+
+  def testConvertApprovalValues_Empty(self):
+    output = self.converter.ConvertApprovalValues(
+        [], [], [], project_id=self.project_1.project_id)
+    self.assertEqual([], output)
+
+  def testConvertApprovalValues_IgnoresNullFieldDefs(self):
+    """It ignores approval values referencing a non-existent field"""
+    av = fake.MakeApprovalValue(self.dne_field_def_id)
+
+    output = self.converter.ConvertApprovalValues(
+        [av], [], [], issue_id=self.issue_1.issue_id)
+    self.assertEqual([], output)
+
+  def test_ComputeApprovalValueStatus_NOT_SET(self):
+    self.assertEqual(
+        self.converter._ComputeApprovalValueStatus(
+            tracker_pb2.ApprovalStatus.NOT_SET),
+        issue_objects_pb2.ApprovalValue.ApprovalStatus.Value(
+            'NOT_SET'))
+
+  def test_ComputeApprovalValueStatus_NEEDS_REVIEW(self):
+    self.assertEqual(
+        self.converter._ComputeApprovalValueStatus(
+            tracker_pb2.ApprovalStatus.NEEDS_REVIEW),
+        issue_objects_pb2.ApprovalValue.ApprovalStatus.Value('NEEDS_REVIEW'))
+
+  def test_ComputeApprovalValueStatus_NA(self):
+    self.assertEqual(
+        self.converter._ComputeApprovalValueStatus(
+            tracker_pb2.ApprovalStatus.NA),
+        issue_objects_pb2.ApprovalValue.ApprovalStatus.Value('NA'))
+
+  def test_ComputeApprovalValueStatus_REVIEW_REQUESTED(self):
+    self.assertEqual(
+        self.converter._ComputeApprovalValueStatus(
+            tracker_pb2.ApprovalStatus.REVIEW_REQUESTED),
+        issue_objects_pb2.ApprovalValue.ApprovalStatus.Value(
+            'REVIEW_REQUESTED'))
+
+  def test_ComputeApprovalValueStatus_REVIEW_STARTED(self):
+    self.assertEqual(
+        self.converter._ComputeApprovalValueStatus(
+            tracker_pb2.ApprovalStatus.REVIEW_STARTED),
+        issue_objects_pb2.ApprovalValue.ApprovalStatus.Value('REVIEW_STARTED'))
+
+  def test_ComputeApprovalValueStatus_NEED_INFO(self):
+    self.assertEqual(
+        self.converter._ComputeApprovalValueStatus(
+            tracker_pb2.ApprovalStatus.NEED_INFO),
+        issue_objects_pb2.ApprovalValue.ApprovalStatus.Value('NEED_INFO'))
+
+  def test_ComputeApprovalValueStatus_APPROVED(self):
+    self.assertEqual(
+        self.converter._ComputeApprovalValueStatus(
+            tracker_pb2.ApprovalStatus.APPROVED),
+        issue_objects_pb2.ApprovalValue.ApprovalStatus.Value('APPROVED'))
+
+  def test_ComputeApprovalValueStatus_NOT_APPROVED(self):
+    self.assertEqual(
+        self.converter._ComputeApprovalValueStatus(
+            tracker_pb2.ApprovalStatus.NOT_APPROVED),
+        issue_objects_pb2.ApprovalValue.ApprovalStatus.Value('NOT_APPROVED'))
+
+  def test_ComputeTemplatePrivacy_PUBLIC(self):
+    self.assertEqual(
+        self.converter._ComputeTemplatePrivacy(self.template_1),
+        project_objects_pb2.IssueTemplate.TemplatePrivacy.Value('PUBLIC'))
+
+  def test_ComputeTemplatePrivacy_MEMBERS_ONLY(self):
+    self.assertEqual(
+        self.converter._ComputeTemplatePrivacy(self.template_2),
+        project_objects_pb2.IssueTemplate.TemplatePrivacy.Value('MEMBERS_ONLY'))
+
+  def test_ComputeTemplateDefaultOwner_UNSPECIFIED(self):
+    self.assertEqual(
+        self.converter._ComputeTemplateDefaultOwner(self.template_1),
+        project_objects_pb2.IssueTemplate.DefaultOwner.Value(
+            'DEFAULT_OWNER_UNSPECIFIED'))
+
+  def test_ComputeTemplateDefaultOwner_REPORTER(self):
+    self.assertEqual(
+        self.converter._ComputeTemplateDefaultOwner(self.template_2),
+        project_objects_pb2.IssueTemplate.DefaultOwner.Value(
+            'PROJECT_MEMBER_REPORTER'))
+
+  def test_ComputePhases(self):
+    """It sorts by rank"""
+    phase1 = fake.MakePhase(123111, name='phase1name', rank=3)
+    phase2 = fake.MakePhase(123112, name='phase2name', rank=2)
+    phase3 = fake.MakePhase(123113, name='phase3name', rank=1)
+    expected = ['phase3name', 'phase2name', 'phase1name']
+    self.assertEqual(
+        self.converter._ComputePhases([phase1, phase2, phase3]), expected)
+
+  def test_ComputePhases_EMPTY(self):
+    self.assertEqual(self.converter._ComputePhases([]), [])
+
+  def test_FillIssueFromTemplate(self):
+    result = self.converter._FillIssueFromTemplate(
+        self.template_1, self.project_1.project_id)
+    self.assertFalse(result.name)
+    self.assertEqual(result.summary, self.template_1.summary)
+    self.assertEqual(
+        result.state, issue_objects_pb2.IssueContentState.Value('ACTIVE'))
+    self.assertEqual(result.status.status, 'New')
+    self.assertFalse(result.reporter)
+    self.assertEqual(result.owner.user, 'users/{}'.format(self.user_1.user_id))
+    self.assertEqual(len(result.cc_users), 0)
+    self.assertFalse(result.cc_users)
+    self.assertEqual(len(result.labels), 1)
+    self.assertEqual(result.labels[0].label, self.template_1.labels[0])
+    self.assertEqual(result.labels[0].derivation, EXPLICIT_DERIVATION)
+    self.assertEqual(len(result.components), 1)
+    self.assertEqual(
+        result.components[0].component, 'projects/{}/componentDefs/{}'.format(
+            self.project_1.project_name, self.template_1.component_ids[0]))
+    self.assertEqual(result.components[0].derivation, EXPLICIT_DERIVATION)
+    self.assertEqual(len(result.field_values), 2)
+    self.assertEqual(
+        result.field_values[0].field, 'projects/{}/fieldDefs/{}'.format(
+            self.project_1.project_name, self.field_def_1))
+    self.assertEqual(result.field_values[0].value, self.fv_1_value)
+    self.assertEqual(result.field_values[0].derivation, EXPLICIT_DERIVATION)
+    expected_name = rnc.ConvertFieldDefNames(
+        self.cnxn, [self.field_def_3], self.project_1.project_id,
+        self.services).get(self.field_def_3)
+    self.assertEqual(
+        result.field_values[1],
+        issue_objects_pb2.FieldValue(
+            field=expected_name,
+            value=self.template_1_label1_value,
+            derivation=EXPLICIT_DERIVATION))
+    self.assertFalse(result.blocked_on_issue_refs)
+    self.assertFalse(result.blocking_issue_refs)
+    self.assertFalse(result.attachment_count)
+    self.assertFalse(result.star_count)
+    self.assertEqual(len(result.phases), 1)
+    self.assertEqual(result.phases[0], self.phase_1.name)
+
+  def test_FillIssueFromTemplate_NoPhase(self):
+    result = self.converter._FillIssueFromTemplate(
+        self.template_3, self.project_1.project_id)
+    self.assertEqual(len(result.field_values), 1)
+    self.assertEqual(
+        result.field_values[0].field, 'projects/{}/fieldDefs/{}'.format(
+            self.project_1.project_name, self.field_def_1))
+    self.assertEqual(result.field_values[0].value, self.fv_1_value)
+    self.assertEqual(result.field_values[0].derivation, EXPLICIT_DERIVATION)
+    self.assertEqual(len(result.phases), 0)
+
+  def test_FillIssueFromTemplate_FilterApprovalFV(self):
+    template = self.services.template.TestAddIssueTemplateDef(
+        11114,
+        self.project_1.project_id,
+        'template3',
+        field_values=[self.fv_1, self.fv_6],
+        approval_values=[self.av_2],
+    )
+    result = self.converter._FillIssueFromTemplate(
+        template, self.project_1.project_id)
+    self.assertEqual(len(result.field_values), 1)
+    self.assertEqual(
+        result.field_values[0].field, 'projects/{}/fieldDefs/{}'.format(
+            self.project_1.project_name, self.field_def_1))
+    self.assertEqual(result.field_values[0].value, self.fv_1_value)
+    self.assertEqual(result.field_values[0].derivation, EXPLICIT_DERIVATION)
+
+  def testConvertIssueTemplates(self):
+    result = self.converter.ConvertIssueTemplates(
+        self.project_1.project_id, [self.template_1])
+    self.assertEqual(len(result), 1)
+    actual = result[0]
+    self.assertEqual(
+        actual.name, 'projects/{}/templates/{}'.format(
+            self.project_1.project_name, self.template_1.template_id))
+    self.assertEqual(actual.display_name, self.template_1.name)
+    self.assertEqual(actual.summary_must_be_edited, False)
+    self.assertEqual(
+        actual.template_privacy,
+        project_objects_pb2.IssueTemplate.TemplatePrivacy.Value('PUBLIC'))
+    self.assertEqual(
+        actual.default_owner,
+        project_objects_pb2.IssueTemplate.DefaultOwner.Value(
+            'DEFAULT_OWNER_UNSPECIFIED'))
+    self.assertEqual(actual.component_required, False)
+    self.assertEqual(actual.admins, ['users/{}'.format(self.user_2.user_id)])
+    self.assertEqual(
+        actual.issue,
+        self.converter._FillIssueFromTemplate(
+            self.template_1, self.project_1.project_id))
+    self.assertListEqual(
+        [av for av in actual.approval_values],
+        self.converter.ConvertApprovalValues(
+            self.template_1.approval_values, self.template_1.field_values,
+            self.template_1.phases, project_id=self.project_1.project_id))
+
+  def testConvertIssueTemplates_IgnoresNonExistentTemplate(self):
+    result = self.converter.ConvertIssueTemplates(
+        self.project_1.project_id, [self.dne_template])
+    self.assertEqual(len(result), 0)
+
+  def testConvertLabels_OmitsFieldDefs(self):
+    """It omits field def labels"""
+    input_labels = ['pri-1', '{}-2'.format(self.field_def_3_name)]
+    result = self.converter.ConvertLabels(
+        input_labels, [], self.project_1.project_id)
+    self.assertEqual(len(result), 1)
+    expected = issue_objects_pb2.Issue.LabelValue(
+        label=input_labels[0], derivation=EXPLICIT_DERIVATION)
+    self.assertEqual(result[0], expected)
+
+  def testConvertLabels_DerivedLabels(self):
+    """It handles derived labels"""
+    input_labels = ['pri-1']
+    result = self.converter.ConvertLabels(
+        [], input_labels, self.project_1.project_id)
+    self.assertEqual(len(result), 1)
+    expected = issue_objects_pb2.Issue.LabelValue(
+        label=input_labels[0], derivation=RULE_DERIVATION)
+    self.assertEqual(result[0], expected)
+
+  def testConvertLabels(self):
+    """It includes both non-derived and derived labels"""
+    input_labels = ['pri-1', '{}-2'.format(self.field_def_3_name)]
+    input_der_labels = ['{}-3'.format(self.field_def_3_name), 'job-secret']
+    result = self.converter.ConvertLabels(
+        input_labels, input_der_labels, self.project_1.project_id)
+    self.assertEqual(len(result), 2)
+    expected_0 = issue_objects_pb2.Issue.LabelValue(
+        label=input_labels[0], derivation=EXPLICIT_DERIVATION)
+    self.assertEqual(result[0], expected_0)
+    expected_1 = issue_objects_pb2.Issue.LabelValue(
+        label=input_der_labels[1], derivation=RULE_DERIVATION)
+    self.assertEqual(result[1], expected_1)
+
+  def testConvertLabels_Empty(self):
+    result = self.converter.ConvertLabels([], [], self.project_1.project_id)
+    self.assertEqual(result, [])
+
+  def testConvertEnumFieldValues_OnlyFieldDefs(self):
+    """It only returns enum field values"""
+    expected_value = '2'
+    input_labels = [
+        'pri-1', '{}-{}'.format(self.field_def_3_name, expected_value)
+    ]
+    result = self.converter.ConvertEnumFieldValues(
+        input_labels, [], self.project_1.project_id)
+    self.assertEqual(len(result), 1)
+    expected_name = rnc.ConvertFieldDefNames(
+        self.cnxn, [self.field_def_3], self.project_1.project_id,
+        self.services).get(self.field_def_3)
+    expected = issue_objects_pb2.FieldValue(
+        field=expected_name,
+        value=expected_value,
+        derivation=EXPLICIT_DERIVATION)
+    self.assertEqual(result[0], expected)
+
+  def testConvertEnumFieldValues_DerivedLabels(self):
+    """It handles derived enum field values"""
+    expected_value = '2'
+    input_der_labels = [
+        'pri-1', '{}-{}'.format(self.field_def_3_name, expected_value)
+    ]
+    result = self.converter.ConvertEnumFieldValues(
+        [], input_der_labels, self.project_1.project_id)
+    self.assertEqual(len(result), 1)
+    expected_name = rnc.ConvertFieldDefNames(
+        self.cnxn, [self.field_def_3], self.project_1.project_id,
+        self.services).get(self.field_def_3)
+    expected = issue_objects_pb2.FieldValue(
+        field=expected_name, value=expected_value, derivation=RULE_DERIVATION)
+    self.assertEqual(result[0], expected)
+
+  def testConvertEnumFieldValues_Empty(self):
+    result = self.converter.ConvertEnumFieldValues(
+        [], [], self.project_1.project_id)
+    self.assertEqual(result, [])
+
+  def testConvertEnumFieldValues_ProjectSpecific(self):
+    """It only considers field defs from specified project"""
+    expected_value = '2'
+    input_labels = [
+        '{}-{}'.format(self.field_def_3_name, expected_value),
+        '{}-ipsum'.format(self.field_def_project2_name)
+    ]
+    result = self.converter.ConvertEnumFieldValues(
+        input_labels, [], self.project_1.project_id)
+    self.assertEqual(len(result), 1)
+    expected_name = rnc.ConvertFieldDefNames(
+        self.cnxn, [self.field_def_3], self.project_1.project_id,
+        self.services).get(self.field_def_3)
+    expected = issue_objects_pb2.FieldValue(
+        field=expected_name,
+        value=expected_value,
+        derivation=EXPLICIT_DERIVATION)
+    self.assertEqual(result[0], expected)
+
+  def testConvertEnumFieldValues(self):
+    """It handles derived enum field values"""
+    expected_value_0 = '2'
+    expected_value_1 = 'macOS'
+    input_labels = [
+        'pri-1', '{}-{}'.format(self.field_def_3_name, expected_value_0),
+        '{}-ipsum'.format(self.field_def_project2_name)
+    ]
+    input_der_labels = [
+        '{}-{}'.format(self.field_def_4_name, expected_value_1), 'foo-bar'
+    ]
+    result = self.converter.ConvertEnumFieldValues(
+        input_labels, input_der_labels, self.project_1.project_id)
+    self.assertEqual(len(result), 2)
+    expected_0_name = rnc.ConvertFieldDefNames(
+        self.cnxn, [self.field_def_3], self.project_1.project_id,
+        self.services).get(self.field_def_3)
+    expected_0 = issue_objects_pb2.FieldValue(
+        field=expected_0_name,
+        value=expected_value_0,
+        derivation=EXPLICIT_DERIVATION)
+    self.assertEqual(result[0], expected_0)
+    expected_1_name = rnc.ConvertFieldDefNames(
+        self.cnxn, [self.field_def_4], self.project_1.project_id,
+        self.services).get(self.field_def_4)
+    expected_1 = issue_objects_pb2.FieldValue(
+        field=expected_1_name,
+        value=expected_value_1,
+        derivation=RULE_DERIVATION)
+    self.assertEqual(result[1], expected_1)
+
+  @mock.patch('project.project_helpers.GetThumbnailUrl')
+  def testConvertProject(self, mock_GetThumbnailUrl):
+    """We can convert a Project."""
+    mock_GetThumbnailUrl.return_value = 'xyz'
+    expected_api_project = project_objects_pb2.Project(
+        name='projects/{}'.format(self.project_1.project_name),
+        display_name=self.project_1.project_name,
+        summary=self.project_1.summary,
+        thumbnail_url='xyz')
+    self.assertEqual(
+        expected_api_project, self.converter.ConvertProject(self.project_1))
+
+  @mock.patch('project.project_helpers.GetThumbnailUrl')
+  def testConvertProjects(self, mock_GetThumbnailUrl):
+    """We can convert a Sequence of Projects."""
+    mock_GetThumbnailUrl.return_value = 'xyz'
+    expected_api_projects = [
+        project_objects_pb2.Project(
+            name='projects/{}'.format(self.project_1.project_name),
+            display_name=self.project_1.project_name,
+            summary=self.project_1.summary,
+            thumbnail_url='xyz'),
+        project_objects_pb2.Project(
+            name='projects/{}'.format(self.project_2.project_name),
+            display_name=self.project_2.project_name,
+            summary=self.project_2.summary,
+            thumbnail_url='xyz')
+    ]
+    self.assertEqual(
+        expected_api_projects,
+        self.converter.ConvertProjects([self.project_1, self.project_2]))
+
+  def testConvertProjectConfig(self):
+    """We can convert a project_config"""
+    project_config = self.services.config.GetProjectConfig(
+        self.cnxn, self.project_1.project_id)
+    expected_grid_config = project_objects_pb2.ProjectConfig.GridViewConfig(
+        default_x_attr=project_config.default_x_attr,
+        default_y_attr=project_config.default_y_attr)
+    template_names = rnc.ConvertTemplateNames(
+        self.cnxn, project_config.project_id, [
+            project_config.default_template_for_developers,
+            project_config.default_template_for_users
+        ], self.services)
+    expected_api_config = project_objects_pb2.ProjectConfig(
+        name=rnc.ConvertProjectConfigName(
+            self.cnxn, self.project_1.project_id, self.services),
+        exclusive_label_prefixes=project_config.exclusive_label_prefixes,
+        member_default_query=project_config.member_default_query,
+        default_sort=project_config.default_sort_spec,
+        default_columns=[
+            issue_objects_pb2.IssuesListColumn(column=col)
+            for col in project_config.default_col_spec.split()
+        ],
+        project_grid_config=expected_grid_config,
+        member_default_template=template_names.get(
+            project_config.default_template_for_developers),
+        non_members_default_template=template_names.get(
+            project_config.default_template_for_users),
+        revision_url_format=self.project_1.revision_url_format,
+        custom_issue_entry_url=project_config.custom_issue_entry_url)
+    self.converter.user_auth = authdata.AuthData.FromUser(
+        self.cnxn, self.user_1, self.services)
+    self.assertEqual(
+        expected_api_config,
+        self.converter.ConvertProjectConfig(project_config))
+
+  def testConvertProjectConfig_NonMembers(self):
+    """We can convert a project_config for non project members"""
+    self.converter.user_auth = authdata.AuthData.FromUser(
+        self.cnxn, self.user_2, self.services)
+    project_config = self.services.config.GetProjectConfig(
+        self.cnxn, self.project_1.project_id)
+    api_config = self.converter.ConvertProjectConfig(project_config)
+
+    expected_default_query = project_config.member_default_query
+    self.assertEqual(expected_default_query, api_config.member_default_query)
+
+    expected_member_default_template = rnc.ConvertTemplateNames(
+        self.cnxn, project_config.project_id,
+        [project_config.default_template_for_developers], self.services).get(
+            project_config.default_template_for_developers)
+    self.assertEqual(
+        expected_member_default_template, api_config.member_default_template)
+
+  def testCreateProjectMember(self):
+    """We can create a ProjectMember."""
+    expected_project_member = project_objects_pb2.ProjectMember(
+        name='projects/proj/members/111',
+        role=project_objects_pb2.ProjectMember.ProjectRole.Value('OWNER'))
+    self.assertEqual(
+        expected_project_member,
+        self.converter.CreateProjectMember(self.cnxn, 789, 111, 'OWNER'))
+
+  def test_ConvertDateAction(self):
+    """We can convert from protorpc to protoc FieldDef.DateAction"""
+    date_type_settings = project_objects_pb2.FieldDef.DateTypeSettings
+
+    input_type = tracker_pb2.DateAction.NO_ACTION
+    actual = self.converter._ConvertDateAction(input_type)
+    expected = date_type_settings.DateAction.Value('NO_ACTION')
+    self.assertEqual(expected, actual)
+
+    input_type = tracker_pb2.DateAction.PING_OWNER_ONLY
+    actual = self.converter._ConvertDateAction(input_type)
+    expected = date_type_settings.DateAction.Value('NOTIFY_OWNER')
+    self.assertEqual(expected, actual)
+
+    input_type = tracker_pb2.DateAction.PING_PARTICIPANTS
+    actual = self.converter._ConvertDateAction(input_type)
+    expected = date_type_settings.DateAction.Value('NOTIFY_PARTICIPANTS')
+    self.assertEqual(expected, actual)
+
+  def test_ConvertRoleRequirements(self):
+    """We can convert from protorpc to protoc FieldDef.RoleRequirements"""
+    user_type_settings = project_objects_pb2.FieldDef.UserTypeSettings
+
+    actual = self.converter._ConvertRoleRequirements(False)
+    expected = user_type_settings.RoleRequirements.Value('NO_ROLE_REQUIREMENT')
+    self.assertEqual(expected, actual)
+
+    actual = self.converter._ConvertRoleRequirements(True)
+    expected = user_type_settings.RoleRequirements.Value('PROJECT_MEMBER')
+    self.assertEqual(expected, actual)
+
+  def test_ConvertNotifyTriggers(self):
+    """We can convert from protorpc to protoc FieldDef.NotifyTriggers"""
+    user_type_settings = project_objects_pb2.FieldDef.UserTypeSettings
+
+    input_type = tracker_pb2.NotifyTriggers.NEVER
+    actual = self.converter._ConvertNotifyTriggers(input_type)
+    expected = user_type_settings.NotifyTriggers.Value('NEVER')
+    self.assertEqual(expected, actual)
+
+    input_type = tracker_pb2.NotifyTriggers.ANY_COMMENT
+    actual = self.converter._ConvertNotifyTriggers(input_type)
+    expected = user_type_settings.NotifyTriggers.Value('ANY_COMMENT')
+    self.assertEqual(expected, actual)
+
+  def test_ConvertFieldDefType(self):
+    """We can convert from protorpc FieldType to protoc FieldDef.Type"""
+    input_type = tracker_pb2.FieldTypes.ENUM_TYPE
+    actual = self.converter._ConvertFieldDefType(input_type)
+    expected = project_objects_pb2.FieldDef.Type.Value('ENUM')
+    self.assertEqual(expected, actual)
+
+    input_type = tracker_pb2.FieldTypes.INT_TYPE
+    actual = self.converter._ConvertFieldDefType(input_type)
+    expected = project_objects_pb2.FieldDef.Type.Value('INT')
+    self.assertEqual(expected, actual)
+
+    input_type = tracker_pb2.FieldTypes.STR_TYPE
+    actual = self.converter._ConvertFieldDefType(input_type)
+    expected = project_objects_pb2.FieldDef.Type.Value('STR')
+    self.assertEqual(expected, actual)
+
+    input_type = tracker_pb2.FieldTypes.USER_TYPE
+    actual = self.converter._ConvertFieldDefType(input_type)
+    expected = project_objects_pb2.FieldDef.Type.Value('USER')
+    self.assertEqual(expected, actual)
+
+    input_type = tracker_pb2.FieldTypes.DATE_TYPE
+    actual = self.converter._ConvertFieldDefType(input_type)
+    expected = project_objects_pb2.FieldDef.Type.Value('DATE')
+    self.assertEqual(expected, actual)
+
+    input_type = tracker_pb2.FieldTypes.URL_TYPE
+    actual = self.converter._ConvertFieldDefType(input_type)
+    expected = project_objects_pb2.FieldDef.Type.Value('URL')
+    self.assertEqual(expected, actual)
+
+  def test_ConvertFieldDefType_BOOL(self):
+    """We raise exception for unsupported input type BOOL"""
+    input_type = tracker_pb2.FieldTypes.BOOL_TYPE
+    with self.assertRaises(ValueError) as cm:
+      self.converter._ConvertFieldDefType(input_type)
+    self.assertEqual(
+        'Unsupported tracker_pb2.FieldType enum. Boolean types '
+        'are unsupported and approval types are found in ApprovalDefs',
+        str(cm.exception))
+
+  def test_ConvertFieldDefType_APPROVAL(self):
+    """We raise exception for input type APPROVAL"""
+    input_type = tracker_pb2.FieldTypes.APPROVAL_TYPE
+    with self.assertRaises(ValueError) as cm:
+      self.converter._ConvertFieldDefType(input_type)
+    self.assertEqual(
+        'Unsupported tracker_pb2.FieldType enum. Boolean types '
+        'are unsupported and approval types are found in ApprovalDefs',
+        str(cm.exception))
+
+  def testConvertFieldDefs(self):
+    """We can convert field defs"""
+    project_config = self.services.config.GetProjectConfig(
+        self.cnxn, self.project_1.project_id)
+    input_fds = project_config.field_defs
+    output = self.converter.ConvertFieldDefs(
+        input_fds, self.project_1.project_id)
+    fd1_rn = rnc.ConvertFieldDefNames(
+        self.cnxn, [self.field_def_1], self.project_1.project_id,
+        self.services).get(self.field_def_1)
+    self.assertEqual(fd1_rn, output[0].name)
+    self.assertEqual(self.field_def_1_name, output[0].display_name)
+    self.assertEqual('', output[0].docstring)
+    self.assertEqual(
+        project_objects_pb2.FieldDef.Type.Value('STR'), output[0].type)
+    self.assertEqual(
+        project_objects_pb2.FieldDef.Type.Value('INT'), output[1].type)
+    self.assertEqual('', output[1].applicable_issue_type)
+    fd1_admin_editor = [rnc.ConvertUserName(self.user_1.user_id)]
+    self.assertEqual(fd1_admin_editor, output[0].admins)
+    self.assertEqual(fd1_admin_editor, output[5].editors)
+
+  def testConvertFieldDefs_Traits(self):
+    """We can convert FieldDefs with traits"""
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_1)
+    output = self.converter.ConvertFieldDefs(
+        [input_fd], self.project_1.project_id)
+    self.assertEqual(1, len(output))
+    expected_traits = [
+        project_objects_pb2.FieldDef.Traits.Value('REQUIRED'),
+        project_objects_pb2.FieldDef.Traits.Value('MULTIVALUED'),
+        project_objects_pb2.FieldDef.Traits.Value('PHASE')
+    ]
+    self.assertEqual(expected_traits, output[0].traits)
+
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_2)
+    output = self.converter.ConvertFieldDefs(
+        [input_fd], self.project_1.project_id)
+    self.assertEqual(1, len(output))
+    expected_traits = [
+        project_objects_pb2.FieldDef.Traits.Value('DEFAULT_HIDDEN')
+    ]
+    self.assertEqual(expected_traits, output[0].traits)
+
+  def testConvertFieldDefs_ApprovalParent(self):
+    """We can convert FieldDef with approval parents"""
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_6)
+    output = self.converter.ConvertFieldDefs(
+        [input_fd], self.project_1.project_id)
+    self.assertEqual(1, len(output))
+
+    approval_names_dict = rnc.ConvertApprovalDefNames(
+        self.cnxn, [self.approval_def_1_id], self.project_1.project_id,
+        self.services)
+    expected_approval_parent = approval_names_dict.get(input_fd.approval_id)
+    self.assertEqual(expected_approval_parent, output[0].approval_parent)
+
+  def testConvertFieldDefs_EnumTypeSettings(self):
+    """We can convert enum FieldDef and its settings"""
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_5)
+    output = self.converter.ConvertFieldDefs(
+        [input_fd], self.project_1.project_id)
+    self.assertEqual(1, len(output))
+
+    expected_settings = project_objects_pb2.FieldDef.EnumTypeSettings(
+        choices=[
+            Choice(
+                value='submarine', docstring=self.labeldef_2.label_docstring),
+            Choice(value='basket', docstring=self.labeldef_3.label_docstring)
+        ])
+    self.assertEqual(expected_settings, output[0].enum_settings)
+
+  def testConvertFieldDefs_IntTypeSettings(self):
+    """We can convert int FieldDef and its settings"""
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_2)
+    output = self.converter.ConvertFieldDefs(
+        [input_fd], self.project_1.project_id)
+    self.assertEqual(1, len(output))
+
+    expected_settings = project_objects_pb2.FieldDef.IntTypeSettings(
+        max_value=37)
+    self.assertEqual(expected_settings, output[0].int_settings)
+
+  def testConvertFieldDefs_StrTypeSettings(self):
+    """We can convert str FieldDef and its settings"""
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_1)
+    output = self.converter.ConvertFieldDefs(
+        [input_fd], self.project_1.project_id)
+    self.assertEqual(1, len(output))
+
+    expected_settings = project_objects_pb2.FieldDef.StrTypeSettings(
+        regex='abc')
+    self.assertEqual(expected_settings, output[0].str_settings)
+
+  def testConvertFieldDefs_UserTypeSettings(self):
+    """We can convert user FieldDef and its settings"""
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_8)
+    output = self.converter.ConvertFieldDefs(
+        [input_fd], self.project_1.project_id)
+    self.assertEqual(1, len(output))
+
+    user_settings = project_objects_pb2.FieldDef.UserTypeSettings
+    expected_settings = project_objects_pb2.FieldDef.UserTypeSettings(
+        role_requirements=user_settings.RoleRequirements.Value(
+            'PROJECT_MEMBER'),
+        needs_perm='EDIT_PROJECT',
+        notify_triggers=user_settings.NotifyTriggers.Value('ANY_COMMENT'))
+    self.assertEqual(expected_settings, output[0].user_settings)
+
+  def testConvertFieldDefs_DateTypeSettings(self):
+    """We can convert user FieldDef and its settings"""
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_9)
+    output = self.converter.ConvertFieldDefs(
+        [input_fd], self.project_1.project_id)
+    self.assertEqual(1, len(output))
+
+    date_settings = project_objects_pb2.FieldDef.DateTypeSettings
+    expected_settings = project_objects_pb2.FieldDef.DateTypeSettings(
+        date_action=date_settings.DateAction.Value('NOTIFY_OWNER'))
+    self.assertEqual(expected_settings, output[0].date_settings)
+
+  def testConvertFieldDefs_SkipsApprovals(self):
+    """We skip over approval defs"""
+    project_config = self.services.config.GetProjectConfig(
+        self.cnxn, self.project_1.project_id)
+    input_fds = project_config.field_defs
+    # project_1 is set up to have 10 non-approval fields and 2 approval fields.
+    self.assertEqual(12, len(input_fds))
+    output = self.converter.ConvertFieldDefs(
+        input_fds, self.project_1.project_id)
+    # assert we skip approval fields
+    self.assertEqual(10, len(output))
+
+  def testConvertFieldDefs_NonexistentID(self):
+    """We skip over any field defs whose ID does not exist."""
+    input_fd = tracker_pb2.FieldDef(
+        field_id=self.dne_field_def_id,
+        project_id=self.project_1.project_id,
+        field_name='foobar',
+        field_type=tracker_pb2.FieldTypes('STR_TYPE'))
+
+    output = self.converter.ConvertFieldDefs(
+        [input_fd], self.project_1.project_id)
+    self.assertEqual(0, len(output))
+
+  def testConvertFieldDefs_Empty(self):
+    """We can handle empty list input"""
+    self.assertEqual(
+        [], self.converter.ConvertFieldDefs([], self.project_1.project_id))
+
+  def test_ComputeFieldDefTraits(self):
+    """We can get Sequence of Traits for a FieldDef"""
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_1)
+    actual = self.converter._ComputeFieldDefTraits(input_fd)
+    expected = [
+        project_objects_pb2.FieldDef.Traits.Value('REQUIRED'),
+        project_objects_pb2.FieldDef.Traits.Value('MULTIVALUED'),
+        project_objects_pb2.FieldDef.Traits.Value('PHASE')
+    ]
+    self.assertEqual(expected, actual)
+
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_2)
+    actual = self.converter._ComputeFieldDefTraits(input_fd)
+    expected = [project_objects_pb2.FieldDef.Traits.Value('DEFAULT_HIDDEN')]
+    self.assertEqual(expected, actual)
+
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_7)
+    actual = self.converter._ComputeFieldDefTraits(input_fd)
+    expected = [project_objects_pb2.FieldDef.Traits.Value('RESTRICTED')]
+    self.assertEqual(expected, actual)
+
+  def test_ComputeFieldDefTraits_Empty(self):
+    """We return an empty Sequence of Traits for plain FieldDef"""
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_3)
+    actual = self.converter._ComputeFieldDefTraits(input_fd)
+    self.assertEqual([], actual)
+
+  def test_GetEnumFieldChoices(self):
+    """We can get all choices for an enum field"""
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_5)
+    actual = self.converter._GetEnumFieldChoices(input_fd)
+    expected = [
+        Choice(
+            value=self.labeldef_2.label.split('-')[1],
+            docstring=self.labeldef_2.label_docstring),
+        Choice(
+            value=self.labeldef_3.label.split('-')[1],
+            docstring=self.labeldef_3.label_docstring),
+    ]
+    self.assertEqual(expected, actual)
+
+  def test_GetEnumFieldChoices_NotEnumField(self):
+    """We raise exception for non-enum-field"""
+    input_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.field_def_1)
+    with self.assertRaises(ValueError) as cm:
+      self.converter._GetEnumFieldChoices(input_fd)
+    self.assertEqual(
+        'Cannot get value from label for non-enum-type field', str(
+            cm.exception))
+
+  def testConvertApprovalDefs(self):
+    """We can convert ApprovalDefs"""
+    input_ad = self._GetApprovalDefById(
+        self.project_1.project_id, self.approval_def_1_id)
+    actual = self.converter.ConvertApprovalDefs(
+        [input_ad], self.project_1.project_id)
+
+    resource_names_dict = rnc.ConvertApprovalDefNames(
+        self.cnxn, [self.approval_def_1_id], self.project_1.project_id,
+        self.services)
+    expected_name = resource_names_dict.get(self.approval_def_1_id)
+    self.assertEqual(actual[0].name, expected_name)
+    self.assertEqual(actual[0].display_name, self.approval_def_1_name)
+    matching_fd = self._GetFieldDefById(
+        self.project_1.project_id, self.approval_def_1_id)
+    expected_docstring = matching_fd.docstring
+    self.assertEqual(actual[0].docstring, expected_docstring)
+    self.assertEqual(actual[0].survey, self.approval_def_1.survey)
+    expected_approvers = [rnc.ConvertUserName(self.user_2.user_id)]
+    self.assertEqual(actual[0].approvers, expected_approvers)
+    expected_admins = [rnc.ConvertUserName(self.user_1.user_id)]
+    self.assertEqual(actual[0].admins, expected_admins)
+
+  def testConvertApprovalDefs_Empty(self):
+    """We can handle empty case"""
+    actual = self.converter.ConvertApprovalDefs([], self.project_1.project_id)
+    self.assertEqual(actual, [])
+
+  def testConvertApprovalDefs_SkipsNonApprovalDefs(self):
+    """We skip if no matching field def exists"""
+    input_ad = tracker_pb2.ApprovalDef(
+        approval_id=self.dne_field_def_id,
+        approver_ids=[self.user_2.user_id],
+        survey='anything goes')
+    actual = self.converter.ConvertApprovalDefs(
+        [input_ad], self.project_1.project_id)
+    self.assertEqual(actual, [])
+
+  def testConvertLabelDefs(self):
+    """We can convert LabelDefs"""
+    actual = self.converter.ConvertLabelDefs(
+        [self.labeldef_1, self.labeldef_5], self.project_1.project_id)
+    resource_names_dict = rnc.ConvertLabelDefNames(
+        self.cnxn, [self.labeldef_1.label, self.labeldef_5.label],
+        self.project_1.project_id, self.services)
+    expected_0_name = resource_names_dict.get(self.labeldef_1.label)
+    expected_0 = project_objects_pb2.LabelDef(
+        name=expected_0_name,
+        value=self.labeldef_1.label,
+        docstring=self.labeldef_1.label_docstring,
+        state=project_objects_pb2.LabelDef.LabelDefState.Value('ACTIVE'))
+    self.assertEqual(expected_0, actual[0])
+    expected_1_name = resource_names_dict.get(self.labeldef_5.label)
+    expected_1 = project_objects_pb2.LabelDef(
+        name=expected_1_name,
+        value=self.labeldef_5.label,
+        docstring=self.labeldef_5.label_docstring,
+        state=project_objects_pb2.LabelDef.LabelDefState.Value('DEPRECATED'))
+    self.assertEqual(expected_1, actual[1])
+
+  def testConvertLabelDefs_Empty(self):
+    """We can handle empty input case"""
+    actual = self.converter.ConvertLabelDefs([], self.project_1.project_id)
+    self.assertEqual([], actual)
+
+  def testConvertStatusDefs(self):
+    """We can convert StatusDefs"""
+    actual = self.converter.ConvertStatusDefs(
+        self.predefined_statuses, self.project_1.project_id)
+    self.assertEqual(len(actual), 4)
+
+    input_names = [sd.status for sd in self.predefined_statuses]
+    names = rnc.ConvertStatusDefNames(
+        self.cnxn, input_names, self.project_1.project_id, self.services)
+    self.assertEqual(names[self.status_1.status], actual[0].name)
+    self.assertEqual(names[self.status_2.status], actual[1].name)
+    self.assertEqual(names[self.status_3.status], actual[2].name)
+    self.assertEqual(names[self.status_4.status], actual[3].name)
+
+    self.assertEqual(self.status_1.status, actual[0].value)
+    self.assertEqual(
+        project_objects_pb2.StatusDef.StatusDefType.Value('OPEN'),
+        actual[0].type)
+    self.assertEqual(0, actual[0].rank)
+    self.assertEqual(self.status_1.status_docstring, actual[0].docstring)
+    self.assertEqual(
+        project_objects_pb2.StatusDef.StatusDefState.Value('ACTIVE'),
+        actual[0].state)
+
+  def testConvertStatusDefs_Empty(self):
+    """Can handle empty input case"""
+    actual = self.converter.ConvertStatusDefs([], self.project_1.project_id)
+    self.assertEqual([], actual)
+
+  def testConvertStatusDefs_Rank(self):
+    """Rank is indepdendent of input order"""
+    input_sds = [self.status_2, self.status_4, self.status_3, self.status_1]
+    actual = self.converter.ConvertStatusDefs(
+        input_sds, self.project_1.project_id)
+    self.assertEqual(1, actual[0].rank)
+    self.assertEqual(3, actual[1].rank)
+
+  def testConvertStatusDefs_type_MERGED(self):
+    """Includes mergeable status when parsed from project config"""
+    actual = self.converter.ConvertStatusDefs(
+        [self.status_2], self.project_1.project_id)
+    self.assertEqual(
+        project_objects_pb2.StatusDef.StatusDefType.Value('MERGED'),
+        actual[0].type)
+
+  def testConvertStatusDefs_state_DEPRECATED(self):
+    """Includes deprecated status"""
+    actual = self.converter.ConvertStatusDefs(
+        [self.status_4], self.project_1.project_id)
+    self.assertEqual(
+        project_objects_pb2.StatusDef.StatusDefState.Value('DEPRECATED'),
+        actual[0].state)
+
+  def testConvertComponentDef(self):
+    now = 123
+    project = self.services.project.TestAddProject('comp-test', project_id=987)
+    config = fake.MakeTestConfig(project.project_id, [], [])
+    component_def = fake.MakeTestComponentDef(
+        project.project_id, 1, path='Chickens>Dickens')
+    component_def.created = now
+    config.component_defs = [component_def]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    actual = self.converter.ConvertComponentDef(component_def)
+    expected = project_objects_pb2.ComponentDef(
+        name='projects/comp-test/componentDefs/1',
+        value='Chickens>Dickens',
+        state=project_objects_pb2.ComponentDef.ComponentDefState.Value(
+            'ACTIVE'),
+        create_time=timestamp_pb2.Timestamp(seconds=now),
+        modify_time=timestamp_pb2.Timestamp())
+    self.assertEqual(actual, expected)
+
+  def testConvertComponentDefs(self):
+    """We can convert ComponentDefs"""
+    project_config = self.services.config.GetProjectConfig(
+        self.cnxn, self.project_1.project_id)
+    self.assertEqual(len(project_config.component_defs), 2)
+
+    actual = self.converter.ConvertComponentDefs(
+        project_config.component_defs, self.project_1.project_id)
+    self.assertEqual(2, len(actual))
+
+    resource_names_dict = rnc.ConvertComponentDefNames(
+        self.cnxn, [self.component_def_1_id, self.component_def_2_id],
+        self.project_1.project_id, self.services)
+    self.assertEqual(
+        resource_names_dict.get(self.component_def_1_id), actual[0].name)
+    self.assertEqual(
+        resource_names_dict.get(self.component_def_2_id), actual[1].name)
+    self.assertEqual(self.component_def_1_path, actual[0].value)
+    self.assertEqual(self.component_def_2_path, actual[1].value)
+    self.assertEqual('cd1_docstring', actual[0].docstring)
+    self.assertEqual(
+        project_objects_pb2.ComponentDef.ComponentDefState.Value('ACTIVE'),
+        actual[0].state)
+    self.assertEqual(
+        project_objects_pb2.ComponentDef.ComponentDefState.Value('DEPRECATED'),
+        actual[1].state)
+    # component_def 1 and 2 have the same admins, ccs, creator, and create_time
+    expected_admins = [rnc.ConvertUserName(self.user_1.user_id)]
+    self.assertEqual(expected_admins, actual[0].admins)
+    expected_ccs = [rnc.ConvertUserName(self.user_2.user_id)]
+    self.assertEqual(expected_ccs, actual[0].ccs)
+    expected_creator = rnc.ConvertUserName(self.user_1.user_id)
+    self.assertEqual(expected_creator, actual[0].creator)
+    expected_create_time = timestamp_pb2.Timestamp(seconds=self.PAST_TIME)
+    self.assertEqual(expected_create_time, actual[0].create_time)
+
+    expected_labels = [ld.label for ld in self.predefined_labels]
+    self.assertEqual(expected_labels, actual[0].labels)
+    self.assertEqual([], actual[1].labels)
+
+  def testConvertComponentDefs_Empty(self):
+    """Can handle empty input case"""
+    actual = self.converter.ConvertComponentDefs([], self.project_1.project_id)
+    self.assertEqual([], actual)
+
+  def testConvertProjectSavedQueries(self):
+    """We can convert ProjectSavedQueries"""
+    input_psqs = [self.psq_2]
+    actual = self.converter.ConvertProjectSavedQueries(
+        input_psqs, self.project_1.project_id)
+    self.assertEqual(1, len(actual))
+
+    resource_names_dict = rnc.ConvertProjectSavedQueryNames(
+        self.cnxn, [self.psq_2.query_id], self.project_1.project_id,
+        self.services)
+    self.assertEqual(
+        resource_names_dict.get(self.psq_2.query_id), actual[0].name)
+    self.assertEqual(self.psq_2.name, actual[0].display_name)
+    self.assertEqual(self.psq_2.query, actual[0].query)
+
+  def testConvertProjectSavedQueries_ExpandsBasedOn(self):
+    """We expand query to include base_query_id"""
+    actual = self.converter.ConvertProjectSavedQueries(
+        [self.psq_1], self.project_1.project_id)
+    expected_query = '{} {}'.format(
+        tbo.GetBuiltInQuery(self.psq_1.base_query_id), self.psq_1.query)
+    self.assertEqual(expected_query, actual[0].query)
+
+  def testConvertProjectSavedQueries_NotInProject(self):
+    """We skip over saved queries that don't belong to this project"""
+    psq_not_registered = tracker_pb2.SavedQuery(
+        query_id=4, name='psq no registered name', query='no registered')
+    actual = self.converter.ConvertProjectSavedQueries(
+        [psq_not_registered], self.project_1.project_id)
+    self.assertEqual([], actual)
+
+  def testConvertProjectSavedQueries_Empty(self):
+    """We can handle empty inputs"""
+    actual = self.converter.ConvertProjectSavedQueries(
+        [], self.project_1.project_id)
+    self.assertEqual([], actual)
diff --git a/api/v3/test/frontend_servicer_test.py b/api/v3/test/frontend_servicer_test.py
new file mode 100644
index 0000000..e58f1ab
--- /dev/null
+++ b/api/v3/test/frontend_servicer_test.py
@@ -0,0 +1,237 @@
+# Copyright 2020 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
+"""Tests for the hotlists servicer."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from google.protobuf import timestamp_pb2
+from mock import patch
+
+from api import resource_name_converters as rnc
+from api.v3 import converters
+from api.v3 import frontend_servicer
+from api.v3.api_proto import frontend_pb2
+from api.v3.api_proto import project_objects_pb2
+from framework import exceptions
+from framework import monorailcontext
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from tracker import tracker_constants
+
+
+class FrontendServicerTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        features=fake.FeaturesService(),
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        user=fake.UserService(),
+        template=fake.TemplateService(),
+        usergroup=fake.UserGroupService())
+    self.frontend_svcr = frontend_servicer.FrontendServicer(
+        self.services, make_rate_limiter=False)
+
+    self.user_1 = self.services.user.TestAddUser('user_111@example.com', 111)
+    self.user_1_resource_name = 'users/111'
+    self.project_1_resource_name = 'projects/proj'
+    self.project_1 = self.services.project.TestAddProject(
+        'proj', project_id=789)
+    self.template_0 = self.services.template.TestAddIssueTemplateDef(
+        11110, self.project_1.project_id, 'template0')
+    self.PAST_TIME = 12345
+    self.component_def_1_path = 'foo'
+    self.component_def_1_id = self.services.config.CreateComponentDef(
+        self.cnxn, self.project_1.project_id, self.component_def_1_path,
+        'cd1_docstring', False, [self.user_1.user_id], [], self.PAST_TIME,
+        self.user_1.user_id, [])
+    self.field_def_1_name = 'test_field_1'
+    self.field_def_1 = self._CreateFieldDef(
+        self.project_1.project_id,
+        self.field_def_1_name,
+        'STR_TYPE',
+        admin_ids=[self.user_1.user_id],
+        is_required=True,
+        is_multivalued=True,
+        is_phase_field=True,
+        regex='abc')
+    self.approval_def_1_name = 'approval_field_1'
+    self.approval_def_1_id = self._CreateFieldDef(
+        self.project_1.project_id,
+        self.approval_def_1_name,
+        'APPROVAL_TYPE',
+        docstring='ad_1_docstring',
+        admin_ids=[self.user_1.user_id])
+    self.approval_def_1 = tracker_pb2.ApprovalDef(
+        approval_id=self.approval_def_1_id,
+        approver_ids=[self.user_1.user_id],
+        survey='approval_def_1 survey')
+    self.services.config.UpdateConfig(
+        self.cnxn,
+        self.project_1,
+        # UpdateConfig accepts tuples rather than protorpc *Defs
+        approval_defs=[
+            (ad.approval_id, ad.approver_ids, ad.survey)
+            for ad in [self.approval_def_1]
+        ])
+
+  def _CreateFieldDef(
+      self,
+      project_id,
+      field_name,
+      field_type_str,
+      docstring=None,
+      min_value=None,
+      max_value=None,
+      regex=None,
+      needs_member=None,
+      needs_perm=None,
+      grants_perm=None,
+      notify_on=None,
+      date_action_str=None,
+      admin_ids=None,
+      editor_ids=None,
+      is_required=False,
+      is_niche=False,
+      is_multivalued=False,
+      is_phase_field=False,
+      approval_id=None,
+      is_restricted_field=False):
+    """Calls CreateFieldDef with reasonable defaults, returns the ID."""
+    if admin_ids is None:
+      admin_ids = []
+    if editor_ids is None:
+      editor_ids = []
+    return self.services.config.CreateFieldDef(
+        self.cnxn,
+        project_id,
+        field_name,
+        field_type_str,
+        None,
+        None,
+        is_required,
+        is_niche,
+        is_multivalued,
+        min_value,
+        max_value,
+        regex,
+        needs_member,
+        needs_perm,
+        grants_perm,
+        notify_on,
+        date_action_str,
+        docstring,
+        admin_ids,
+        editor_ids,
+        is_phase_field=is_phase_field,
+        approval_id=approval_id,
+        is_restricted_field=is_restricted_field)
+
+  def CallWrapped(self, wrapped_handler, mc, *args, **kwargs):
+    self.frontend_svcr.converter = converters.Converter(mc, self.services)
+    return wrapped_handler.wrapped(self.frontend_svcr, mc, *args, **kwargs)
+
+  @patch('project.project_helpers.GetThumbnailUrl')
+  def testGatherProjectEnvironment(self, mock_GetThumbnailUrl):
+    """We can fetch all project related parameters for web frontend."""
+    mock_GetThumbnailUrl.return_value = 'xyz'
+
+    request = frontend_pb2.GatherProjectEnvironmentRequest(
+        parent=self.project_1_resource_name)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    response = self.CallWrapped(
+        self.frontend_svcr.GatherProjectEnvironment, mc, request)
+    project_config = self.services.config.GetProjectConfig(
+        self.cnxn, self.project_1.project_id)
+
+    self.assertEqual(
+        response.project,
+        self.frontend_svcr.converter.ConvertProject(self.project_1))
+    self.assertEqual(
+        response.project_config,
+        self.frontend_svcr.converter.ConvertProjectConfig(project_config))
+
+    self.assertEqual(
+        len(response.statuses),
+        len(tracker_constants.DEFAULT_WELL_KNOWN_STATUSES))
+    self.assertEqual(
+        response.statuses[0],
+        project_objects_pb2.StatusDef(
+            name='projects/{project_name}/statusDefs/{status}'.format(
+                project_name=self.project_1.project_name,
+                status=tracker_constants.DEFAULT_WELL_KNOWN_STATUSES[0][0]),
+            value=tracker_constants.DEFAULT_WELL_KNOWN_STATUSES[0][0],
+            type=project_objects_pb2.StatusDef.StatusDefType.Value('OPEN'),
+            rank=0,
+            docstring=tracker_constants.DEFAULT_WELL_KNOWN_STATUSES[0][1],
+            state=project_objects_pb2.StatusDef.StatusDefState.Value('ACTIVE'),
+        ))
+
+    self.assertEqual(
+        len(response.well_known_labels),
+        len(tracker_constants.DEFAULT_WELL_KNOWN_LABELS))
+    self.assertEqual(
+        response.well_known_labels[0],
+        project_objects_pb2.LabelDef(
+            name='projects/{project_name}/labelDefs/{label}'.format(
+                project_name=self.project_1.project_name,
+                label=tracker_constants.DEFAULT_WELL_KNOWN_LABELS[0][0]),
+            value=tracker_constants.DEFAULT_WELL_KNOWN_LABELS[0][0],
+            docstring=tracker_constants.DEFAULT_WELL_KNOWN_LABELS[0][1],
+            state=project_objects_pb2.LabelDef.LabelDefState.Value('ACTIVE'),
+        ))
+
+    expected = self.frontend_svcr.converter.ConvertComponentDefs(
+        project_config.component_defs, self.project_1.project_id)
+    # Have to use list comprehension to break response sub field into list
+    self.assertEqual([api_cd for api_cd in response.components], expected)
+
+    expected = self.frontend_svcr.converter.ConvertFieldDefs(
+        project_config.field_defs, self.project_1.project_id)
+    self.assertEqual([api_fd for api_fd in response.fields], expected)
+
+    expected = self.frontend_svcr.converter.ConvertApprovalDefs(
+        project_config.approval_defs, self.project_1.project_id)
+    self.assertEqual([api_ad for api_ad in response.approval_fields], expected)
+
+  def testGatherProjectMembershipsForUser(self):
+    """We can list a user's project memberships."""
+    self.services.project.TestAddProject(
+        'owner_proj', project_id=777, owner_ids=[111])
+    self.services.project.TestAddProject(
+        'committer_proj', project_id=888, committer_ids=[111])
+    contributor_proj = self.services.project.TestAddProject(
+        'contributor_proj', project_id=999)
+    contributor_proj.contributor_ids = [111]
+
+    request = frontend_pb2.GatherProjectMembershipsForUserRequest(
+        user=self.user_1_resource_name)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    response = self.CallWrapped(
+        self.frontend_svcr.GatherProjectMembershipsForUser, mc, request)
+
+    owner_membership = project_objects_pb2.ProjectMember(
+        name='projects/{}/members/{}'.format('owner_proj', '111'),
+        role=project_objects_pb2.ProjectMember.ProjectRole.Value('OWNER'))
+    committer_membership = project_objects_pb2.ProjectMember(
+        name='projects/{}/members/{}'.format('committer_proj', '111'),
+        role=project_objects_pb2.ProjectMember.ProjectRole.Value('COMMITTER'))
+    contributor_membership = project_objects_pb2.ProjectMember(
+        name='projects/{}/members/{}'.format('contributor_proj', '111'),
+        role=project_objects_pb2.ProjectMember.ProjectRole.Value('CONTRIBUTOR'))
+    self.assertEqual(
+        response,
+        frontend_pb2.GatherProjectMembershipsForUserResponse(
+            project_memberships=[
+                owner_membership, committer_membership, contributor_membership
+            ]))
diff --git a/api/v3/test/hotlists_servicer_test.py b/api/v3/test/hotlists_servicer_test.py
new file mode 100644
index 0000000..e9808b5
--- /dev/null
+++ b/api/v3/test/hotlists_servicer_test.py
@@ -0,0 +1,397 @@
+# Copyright 2020 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
+
+"""Tests for the hotlists servicer."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from google.protobuf import empty_pb2
+from google.protobuf import field_mask_pb2
+
+from api import resource_name_converters as rnc
+from api.v3 import hotlists_servicer
+from api.v3 import converters
+from api.v3.api_proto import hotlists_pb2
+from api.v3.api_proto import feature_objects_pb2
+from api.v3.api_proto import issue_objects_pb2
+from api.v3.api_proto import user_objects_pb2
+from framework import exceptions
+from framework import monorailcontext
+from framework import permissions
+from features import features_constants
+from testing import fake
+from services import features_svc
+from services import service_manager
+
+
+class HotlistsServicerTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        features=fake.FeaturesService(),
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.hotlists_svcr = hotlists_servicer.HotlistsServicer(
+        self.services, make_rate_limiter=False)
+    self.converter = None
+    self.PAST_TIME = 12345
+    self.user_1 = self.services.user.TestAddUser('user_111@example.com', 111)
+    self.user_2 = self.services.user.TestAddUser('user_222@example.com', 222)
+    self.user_3 = self.services.user.TestAddUser('user_333@example.com', 333)
+
+    user_ids = [self.user_1.user_id, self.user_2.user_id, self.user_3.user_id]
+    self.user_ids_to_name = rnc.ConvertUserNames(user_ids)
+
+    self.project_1 = self.services.project.TestAddProject(
+        'proj', project_id=789)
+
+    self.issue_1 = fake.MakeTestIssue(
+        self.project_1.project_id, 1, 'sum', 'New', 111,
+        project_name=self.project_1.project_name)
+    self.issue_2 = fake.MakeTestIssue(
+        self.project_1.project_id, 2, 'sum', 'New', 111,
+        project_name=self.project_1.project_name)
+    self.issue_3 = fake.MakeTestIssue(
+        self.project_1.project_id, 3, 'sum', 'New', 111,
+        project_name=self.project_1.project_name)
+    self.issue_4 = fake.MakeTestIssue(
+        self.project_1.project_id, 4, 'sum', 'New', 111,
+        project_name=self.project_1.project_name)
+    self.issue_5 = fake.MakeTestIssue(
+        self.project_1.project_id, 5, 'sum', 'New', 111,
+        project_name=self.project_1.project_name)
+    self.issue_6 = fake.MakeTestIssue(
+        self.project_1.project_id, 6, 'sum', 'New', 111,
+        project_name=self.project_1.project_name)
+    self.services.issue.TestAddIssue(self.issue_1)
+    self.services.issue.TestAddIssue(self.issue_2)
+    self.services.issue.TestAddIssue(self.issue_3)
+    self.services.issue.TestAddIssue(self.issue_4)
+    self.services.issue.TestAddIssue(self.issue_5)
+    self.services.issue.TestAddIssue(self.issue_6)
+    issue_ids = [
+        self.issue_1.issue_id, self.issue_2.issue_id, self.issue_3.issue_id,
+        self.issue_4.issue_id, self.issue_5.issue_id, self.issue_6.issue_id
+    ]
+    self.issue_ids_to_name = rnc.ConvertIssueNames(
+        self.cnxn, issue_ids, self.services)
+
+    hotlist_items = [
+        (
+            self.issue_4.issue_id, 31, self.user_3.user_id, self.PAST_TIME,
+            'note5'),
+        (
+            self.issue_3.issue_id, 21, self.user_1.user_id, self.PAST_TIME,
+            'note1'),
+        (
+            self.issue_2.issue_id, 11, self.user_2.user_id, self.PAST_TIME,
+            'note2'),
+        (
+            self.issue_1.issue_id, 1, self.user_1.user_id, self.PAST_TIME,
+            'note4')
+    ]
+    self.hotlist_1 = self.services.features.TestAddHotlist(
+        'HotlistName',
+        summary='summary',
+        description='description',
+        owner_ids=[self.user_1.user_id],
+        editor_ids=[self.user_2.user_id],
+        hotlist_item_fields=hotlist_items,
+        default_col_spec='',
+        is_private=True)
+    self.hotlist_resource_name = rnc.ConvertHotlistName(
+        self.hotlist_1.hotlist_id)
+
+  def CallWrapped(self, wrapped_handler, mc, *args, **kwargs):
+    self.converter = converters.Converter(mc, self.services)
+    self.hotlists_svcr.converter = self.converter
+    return wrapped_handler.wrapped(self.hotlists_svcr, mc, *args, **kwargs)
+
+  # TODO(crbug/monorail/7104): Add page_token tests when implemented.
+  def testListHotlistItems(self):
+    """We can list a Hotlist's HotlistItems."""
+    request = hotlists_pb2.ListHotlistItemsRequest(
+        parent=self.hotlist_resource_name, page_size=2, order_by='note,stars')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    response = self.CallWrapped(
+        self.hotlists_svcr.ListHotlistItems, mc, request)
+    expected_items = self.converter.ConvertHotlistItems(
+        self.hotlist_1.hotlist_id,
+        [self.hotlist_1.items[1], self.hotlist_1.items[2]])
+    self.assertEqual(
+        response, hotlists_pb2.ListHotlistItemsResponse(items=expected_items))
+
+  def testListHotlistItems_Empty(self):
+    """We can return a response if the Hotlist has no items"""
+    empty_hotlist = self.services.features.TestAddHotlist(
+        'Empty',
+        owner_ids=[self.user_1.user_id],
+        editor_ids=[self.user_2.user_id],
+        hotlist_item_fields=[])
+    hotlist_resource_name = rnc.ConvertHotlistName(empty_hotlist.hotlist_id)
+    request = hotlists_pb2.ListHotlistItemsRequest(parent=hotlist_resource_name)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    response = self.CallWrapped(
+        self.hotlists_svcr.ListHotlistItems, mc, request)
+    self.assertEqual(response, hotlists_pb2.ListHotlistItemsResponse(items=[]))
+
+  def testListHotlistItems_InvalidPageSize(self):
+    """We raise an exception if `page_size` is negative."""
+    request = hotlists_pb2.ListHotlistItemsRequest(
+        parent=self.hotlist_resource_name, page_size=-1)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.hotlists_svcr.ListHotlistItems, mc, request)
+
+  def testListHotlistItems_DefaultPageSize(self):
+    """We use our default page size when no `page_size` is given."""
+    request = hotlists_pb2.ListHotlistItemsRequest(
+        parent=self.hotlist_resource_name)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    response = self.CallWrapped(
+        self.hotlists_svcr.ListHotlistItems, mc, request)
+    self.assertEqual(
+        len(response.items),
+        min(
+            features_constants.DEFAULT_RESULTS_PER_PAGE,
+            len(self.hotlist_1.items)))
+
+  def testRerankHotlistItems(self):
+    """We can rerank a Hotlist."""
+    item_names_dict = rnc.ConvertHotlistItemNames(
+        self.cnxn, self.hotlist_1.hotlist_id,
+        [item.issue_id for item in self.hotlist_1.items], self.services)
+    request = hotlists_pb2.RerankHotlistItemsRequest(
+        name=self.hotlist_resource_name,
+        hotlist_items=[
+            item_names_dict[self.issue_4.issue_id],
+            item_names_dict[self.issue_3.issue_id]
+        ],
+        target_position=0)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    self.CallWrapped(self.hotlists_svcr.RerankHotlistItems, mc, request)
+    updated_hotlist = self.services.features.GetHotlist(
+        self.cnxn, self.hotlist_1.hotlist_id)
+    self.assertEqual(
+        [item.issue_id for item in updated_hotlist.items],
+        [self.issue_4.issue_id, self.issue_3.issue_id,
+         self.issue_1.issue_id, self.issue_2.issue_id])
+
+  def testRemoveHotlistItems(self):
+    """We can remove items from a Hotlist."""
+    issue_1_name = self.issue_ids_to_name[self.issue_1.issue_id]
+    issue_2_name = self.issue_ids_to_name[self.issue_2.issue_id]
+    request = hotlists_pb2.RemoveHotlistItemsRequest(
+        parent=self.hotlist_resource_name, issues=[issue_1_name, issue_2_name])
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    self.CallWrapped(self.hotlists_svcr.RemoveHotlistItems, mc, request)
+    updated_hotlist = self.services.features.GetHotlist(
+        self.cnxn, self.hotlist_1.hotlist_id)
+    # The hotlist used to have 4 items and we've removed two.
+    self.assertEqual(len(updated_hotlist.items), 2)
+
+  def testAddHotlistItems(self):
+    """We can add items to a Hotlist."""
+    issue_5_name = self.issue_ids_to_name[self.issue_5.issue_id]
+    issue_6_name = self.issue_ids_to_name[self.issue_6.issue_id]
+    request = hotlists_pb2.AddHotlistItemsRequest(
+        parent=self.hotlist_resource_name, issues=[issue_5_name, issue_6_name])
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    self.CallWrapped(self.hotlists_svcr.AddHotlistItems, mc, request)
+    updated_hotlist = self.services.features.GetHotlist(
+        self.cnxn, self.hotlist_1.hotlist_id)
+    # The hotlist used to have 4 items and we've added two.
+    self.assertEqual(len(updated_hotlist.items), 6)
+
+  def testRemoveHotlistEditors(self):
+    """We can remove editors from a Hotlist."""
+    user_2_name = self.user_ids_to_name[self.user_2.user_id]
+    request = hotlists_pb2.RemoveHotlistEditorsRequest(
+        name=self.hotlist_resource_name, editors=[user_2_name])
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    self.CallWrapped(self.hotlists_svcr.RemoveHotlistEditors, mc, request)
+    updated_hotlist = self.services.features.GetHotlist(
+        self.cnxn, self.hotlist_1.hotlist_id)
+    # User 2 was the only editor in the hotlist, and we removed them.
+    self.assertEqual(len(updated_hotlist.editor_ids), 0)
+
+  def testGetHotlist(self):
+    """We can get a Hotlist."""
+    request = hotlists_pb2.GetHotlistRequest(name=self.hotlist_resource_name)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    api_hotlist = self.CallWrapped(self.hotlists_svcr.GetHotlist, mc, request)
+    self.assertEqual(api_hotlist, self.converter.ConvertHotlist(self.hotlist_1))
+
+  def testGatherHotlistsForUser(self):
+    """We can get all visible hotlists of a user."""
+    request = hotlists_pb2.GatherHotlistsForUserRequest(
+        user=self.user_ids_to_name[self.user_2.user_id])
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    response = self.CallWrapped(
+        self.hotlists_svcr.GatherHotlistsForUser, mc, request)
+
+    user_names_by_id = rnc.ConvertUserNames(
+        [self.user_2.user_id, self.user_1.user_id])
+    expected_api_hotlists = [
+        feature_objects_pb2.Hotlist(
+            name=self.hotlist_resource_name,
+            display_name='HotlistName',
+            summary='summary',
+            description='description',
+            hotlist_privacy=feature_objects_pb2.Hotlist.HotlistPrivacy.Value(
+                'PRIVATE'),
+            owner=user_names_by_id[self.user_1.user_id],
+            editors=[user_names_by_id[self.user_2.user_id]])
+    ]
+    self.assertEqual(
+        response,
+        hotlists_pb2.GatherHotlistsForUserResponse(
+            hotlists=expected_api_hotlists))
+
+  def testUpdateHotlist_AllFields(self):
+    """We can update a Hotlist."""
+    request = hotlists_pb2.UpdateHotlistRequest(
+        update_mask=field_mask_pb2.FieldMask(
+            paths=[
+                'summary',
+                'description',
+                'default_columns',
+                'hotlist_privacy',
+                'display_name',
+                'owner',
+                'editors',
+            ]),
+        hotlist=feature_objects_pb2.Hotlist(
+            name=self.hotlist_resource_name,
+            display_name='newName',
+            summary='new summary',
+            description='new description',
+            default_columns=[
+                issue_objects_pb2.IssuesListColumn(column='new-chicken-egg')
+            ],
+            hotlist_privacy=feature_objects_pb2.Hotlist.HotlistPrivacy.Value(
+                'PUBLIC'),
+            owner=self.user_ids_to_name[self.user_2.user_id],
+            editors=[self.user_ids_to_name[self.user_3.user_id]]))
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    api_hotlist = self.CallWrapped(
+        self.hotlists_svcr.UpdateHotlist, mc, request)
+    user_names_by_id = rnc.ConvertUserNames(
+        [self.user_3.user_id, self.user_2.user_id, self.user_1.user_id])
+    expected_hotlist = feature_objects_pb2.Hotlist(
+        name=self.hotlist_resource_name,
+        display_name='newName',
+        summary='new summary',
+        description='new description',
+        default_columns=[
+            issue_objects_pb2.IssuesListColumn(column='new-chicken-egg')
+        ],
+        hotlist_privacy=feature_objects_pb2.Hotlist.HotlistPrivacy.Value(
+            'PUBLIC'),
+        owner=user_names_by_id[self.user_2.user_id],
+        editors=[
+            user_names_by_id[self.user_2.user_id],
+            user_names_by_id[self.user_3.user_id]
+        ])
+    self.assertEqual(api_hotlist, expected_hotlist)
+
+  def testUpdateHotlist_OneField(self):
+    request = hotlists_pb2.UpdateHotlistRequest(
+        update_mask=field_mask_pb2.FieldMask(paths=['summary']),
+        hotlist=feature_objects_pb2.Hotlist(
+            name=self.hotlist_resource_name,
+            display_name='newName',
+            summary='new summary',
+            description='new description',
+            default_columns=[
+                issue_objects_pb2.IssuesListColumn(column='new-chicken-egg')
+            ],
+            hotlist_privacy=feature_objects_pb2.Hotlist.HotlistPrivacy.Value(
+                'PUBLIC')))
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    api_hotlist = self.CallWrapped(
+        self.hotlists_svcr.UpdateHotlist, mc, request)
+    user_names_by_id = rnc.ConvertUserNames(
+        [self.user_2.user_id, self.user_1.user_id])
+    expected_hotlist = feature_objects_pb2.Hotlist(
+        name=self.hotlist_resource_name,
+        display_name='HotlistName',
+        summary='new summary',
+        description='description',
+        default_columns=[],
+        hotlist_privacy=feature_objects_pb2.Hotlist.HotlistPrivacy.Value(
+            'PRIVATE'),
+        owner=user_names_by_id[self.user_1.user_id],
+        editors=[user_names_by_id[self.user_2.user_id]])
+    self.assertEqual(api_hotlist, expected_hotlist)
+
+  def testUpdateHotlist_EmptyFieldMask(self):
+    request = hotlists_pb2.UpdateHotlistRequest(
+        hotlist=feature_objects_pb2.Hotlist(summary='new'))
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.hotlists_svcr.UpdateHotlist, mc, request)
+
+  def testUpdateHotlist_EmptyHotlist(self):
+    request = hotlists_pb2.UpdateHotlistRequest(
+        update_mask=field_mask_pb2.FieldMask(paths=['summary']))
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.hotlists_svcr.UpdateHotlist, mc, request)
+
+  def testDeleteHotlist(self):
+    """We can delete a Hotlist."""
+    request = hotlists_pb2.GetHotlistRequest(name=self.hotlist_resource_name)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    api_response = self.CallWrapped(
+        self.hotlists_svcr.DeleteHotlist, mc, request)
+    self.assertEqual(api_response, empty_pb2.Empty())
+
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      self.services.features.GetHotlist(
+          self.cnxn, self.hotlist_1.hotlist_id)
diff --git a/api/v3/test/issues_servicer_test.py b/api/v3/test/issues_servicer_test.py
new file mode 100644
index 0000000..7cfee41
--- /dev/null
+++ b/api/v3/test/issues_servicer_test.py
@@ -0,0 +1,890 @@
+# Copyright 2020 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
+
+"""Tests for the issues servicer."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import copy
+import unittest
+import mock
+
+from api.v3 import converters
+from api.v3 import issues_servicer
+from api.v3.api_proto import issues_pb2
+from api.v3.api_proto import issue_objects_pb2
+from framework import exceptions
+from framework import framework_helpers
+from framework import monorailcontext
+from framework import permissions
+from proto import tracker_pb2
+from testing import fake
+from services import service_manager
+
+from google.appengine.ext import testbed
+from google.protobuf import timestamp_pb2
+from google.protobuf import field_mask_pb2
+
+
+def _Issue(project_id, local_id):
+  issue = tracker_pb2.Issue(owner_id=0)
+  issue.project_name = 'proj-%d' % project_id
+  issue.project_id = project_id
+  issue.local_id = local_id
+  issue.issue_id = project_id * 100 + local_id
+  return issue
+
+
+CURRENT_TIME = 12346.78
+
+
+class IssuesServicerTest(unittest.TestCase):
+
+  def setUp(self):
+    # memcache and datastore needed for generating page tokens.
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        issue_star=fake.IssueStarService(),
+        project=fake.ProjectService(),
+        features=fake.FeaturesService(),
+        spam=fake.SpamService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.issues_svcr = issues_servicer.IssuesServicer(
+        self.services, make_rate_limiter=False)
+    self.PAST_TIME = int(CURRENT_TIME - 1)
+
+    self.owner = self.services.user.TestAddUser('owner@example.com', 111)
+    self.user_2 = self.services.user.TestAddUser('user_2@example.com', 222)
+
+    self.project_1 = self.services.project.TestAddProject(
+        'chicken', project_id=789)
+    self.issue_1_resource_name = 'projects/chicken/issues/1234'
+    self.issue_1 = fake.MakeTestIssue(
+        self.project_1.project_id,
+        1234,
+        'sum',
+        'New',
+        self.owner.user_id,
+        labels=['find-me', 'pri-3'],
+        project_name=self.project_1.project_name)
+    self.services.issue.TestAddIssue(self.issue_1)
+
+    self.project_2 = self.services.project.TestAddProject('cow', project_id=788)
+    self.issue_2_resource_name = 'projects/cow/issues/1235'
+    self.issue_2 = fake.MakeTestIssue(
+        self.project_2.project_id,
+        1235,
+        'sum',
+        'New',
+        self.user_2.user_id,
+        project_name=self.project_2.project_name)
+    self.services.issue.TestAddIssue(self.issue_2)
+    self.issue_3 = fake.MakeTestIssue(
+        self.project_2.project_id,
+        1236,
+        'sum',
+        'New',
+        self.user_2.user_id,
+        labels=['find-me', 'pri-1'],
+        project_name=self.project_2.project_name)
+    self.services.issue.TestAddIssue(self.issue_3)
+
+  def CallWrapped(self, wrapped_handler, mc, *args, **kwargs):
+    self.issues_svcr.converter = converters.Converter(mc, self.services)
+    return wrapped_handler.wrapped(self.issues_svcr, mc, *args, **kwargs)
+
+  def testGetIssue(self):
+    """We can get an issue."""
+    request = issues_pb2.GetIssueRequest(name=self.issue_1_resource_name)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    actual_response = self.CallWrapped(self.issues_svcr.GetIssue, mc, request)
+    self.assertEqual(
+        actual_response, self.issues_svcr.converter.ConvertIssue(self.issue_1))
+
+  def testBatchGetIssues(self):
+    """We can batch get issues."""
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    request = issues_pb2.BatchGetIssuesRequest(
+        names=['projects/cow/issues/1235', 'projects/cow/issues/1236'])
+    actual_response = self.CallWrapped(
+        self.issues_svcr.BatchGetIssues, mc, request)
+    self.assertEqual(
+        [issue.name for issue in actual_response.issues],
+        ['projects/cow/issues/1235', 'projects/cow/issues/1236'])
+
+  def testBatchGetIssues_Empty(self):
+    """We can return a response if the request has no names."""
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    request = issues_pb2.BatchGetIssuesRequest(names=[])
+    actual_response = self.CallWrapped(
+        self.issues_svcr.BatchGetIssues, mc, request)
+    self.assertEqual(
+        actual_response, issues_pb2.BatchGetIssuesResponse(issues=[]))
+
+  def testBatchGetIssues_WithParent(self):
+    """We can batch get issues with a given parent."""
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    request = issues_pb2.BatchGetIssuesRequest(
+        parent='projects/cow',
+        names=['projects/cow/issues/1235', 'projects/cow/issues/1236'])
+    actual_response = self.CallWrapped(
+        self.issues_svcr.BatchGetIssues, mc, request)
+    self.assertEqual(
+        [issue.name for issue in actual_response.issues],
+        ['projects/cow/issues/1235', 'projects/cow/issues/1236'])
+
+  def testBatchGetIssues_FromMultipleProjects(self):
+    """We can batch get issues from multiple projects."""
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    request = issues_pb2.BatchGetIssuesRequest(
+        names=[
+            'projects/chicken/issues/1234', 'projects/cow/issues/1235',
+            'projects/cow/issues/1236'
+        ])
+    actual_response = self.CallWrapped(
+        self.issues_svcr.BatchGetIssues, mc, request)
+    self.assertEqual(
+        [issue.name for issue in actual_response.issues], [
+            'projects/chicken/issues/1234', 'projects/cow/issues/1235',
+            'projects/cow/issues/1236'
+        ])
+
+  def testBatchGetIssues_WithBadInput(self):
+    """We raise an exception with bad input to batch get issues."""
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    request = issues_pb2.BatchGetIssuesRequest(
+        parent='projects/cow',
+        names=['projects/cow/issues/1235', 'projects/chicken/issues/1234'])
+    with self.assertRaisesRegexp(
+        exceptions.InputException,
+        'projects/chicken/issues/1234 is not a child issue of projects/cow.'):
+      self.CallWrapped(self.issues_svcr.BatchGetIssues, mc, request)
+
+    request = issues_pb2.BatchGetIssuesRequest(
+        parent='projects/sheep',
+        names=['projects/cow/issues/1235', 'projects/chicken/issues/1234'])
+    with self.assertRaisesRegexp(
+        exceptions.InputException,
+        'projects/cow/issues/1235 is not a child issue of projects/sheep.\n' +
+        'projects/chicken/issues/1234 is not a child issue of projects/sheep.'):
+      self.CallWrapped(self.issues_svcr.BatchGetIssues, mc, request)
+
+    request = issues_pb2.BatchGetIssuesRequest(
+        parent='projects/cow',
+        names=['projects/cow/badformat/1235', 'projects/chicken/issues/1234'])
+    with self.assertRaisesRegexp(
+        exceptions.InputException,
+        'Invalid resource name: projects/cow/badformat/1235.'):
+      self.CallWrapped(self.issues_svcr.BatchGetIssues, mc, request)
+
+  def testBatchGetIssues_NonExistentIssues(self):
+    """We raise an exception with bad input to batch get issues."""
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    request = issues_pb2.BatchGetIssuesRequest(
+        parent='projects/chicken',
+        names=['projects/chicken/issues/1', 'projects/chicken/issues/2'])
+    with self.assertRaisesRegexp(
+        exceptions.NoSuchIssueException,
+        "\['projects/chicken/issues/1', 'projects/chicken/issues/2'\] not found"
+    ):
+      self.CallWrapped(self.issues_svcr.BatchGetIssues, mc, request)
+
+  @mock.patch('api.v3.api_constants.MAX_BATCH_ISSUES', 2)
+  def testBatchGetIssues(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    request = issues_pb2.BatchGetIssuesRequest(
+        parent='projects/cow',
+        names=[
+            'projects/cow/issues/1235', 'projects/chicken/issues/1234',
+            'projects/cow/issues/1233'
+        ])
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.BatchGetIssues, mc, request)
+
+  @mock.patch('search.frontendsearchpipeline.FrontendSearchPipeline')
+  @mock.patch('api.v3.api_constants.MAX_ISSUES_PER_PAGE', 2)
+  def testSearchIssues(self, mock_pipeline):
+    """We can search for issues in some projects."""
+    request = issues_pb2.SearchIssuesRequest(
+        projects=['projects/chicken', 'projects/cow'],
+        query='label:find-me',
+        order_by='-pri',
+        page_size=3)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_2.email)
+
+    instance = mock.Mock(
+        spec=True, total_count=3, visible_results=[self.issue_1, self.issue_3])
+    mock_pipeline.return_value = instance
+    instance.SearchForIIDs = mock.Mock()
+    instance.MergeAndSortIssues = mock.Mock()
+    instance.Paginate = mock.Mock()
+
+    actual_response = self.CallWrapped(
+        self.issues_svcr.SearchIssues, mc, request)
+    # start index is 0.
+    # number of items is coerced from 3 -> 2
+    mock_pipeline.assert_called_once_with(
+        self.cnxn,
+        self.services,
+        mc.auth, [222],
+        'label:find-me', ['chicken', 'cow'],
+        2,
+        0,
+        1,
+        '',
+        '-pri',
+        mc.warnings,
+        mc.errors,
+        True,
+        mc.profiler,
+        project=None)
+    self.assertEqual(
+        [issue.name for issue in actual_response.issues],
+        ['projects/chicken/issues/1234', 'projects/cow/issues/1236'])
+
+    # Check the `next_page_token` can be used to get the next page of results.
+    request.page_token = actual_response.next_page_token
+    self.CallWrapped(self.issues_svcr.SearchIssues, mc, request)
+    # start index is now 2.
+    mock_pipeline.assert_called_with(
+        self.cnxn,
+        self.services,
+        mc.auth, [222],
+        'label:find-me', ['chicken', 'cow'],
+        2,
+        2,
+        1,
+        '',
+        '-pri',
+        mc.warnings,
+        mc.errors,
+        True,
+        mc.profiler,
+        project=None)
+
+  @mock.patch('search.frontendsearchpipeline.FrontendSearchPipeline')
+  @mock.patch('api.v3.api_constants.MAX_ISSUES_PER_PAGE', 2)
+  def testSearchIssues_PaginationErrorOrderByChanged(self, mock_pipeline):
+    """Error when changing the order_by and using the same page_otoken."""
+    request = issues_pb2.SearchIssuesRequest(
+        projects=['projects/chicken', 'projects/cow'],
+        query='label:find-me',
+        order_by='-pri',
+        page_size=3)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_2.email)
+
+    instance = mock.Mock(
+        spec=True, total_count=3, visible_results=[self.issue_1, self.issue_3])
+    mock_pipeline.return_value = instance
+    instance.SearchForIIDs = mock.Mock()
+    instance.MergeAndSortIssues = mock.Mock()
+    instance.Paginate = mock.Mock()
+
+    actual_response = self.CallWrapped(
+        self.issues_svcr.SearchIssues, mc, request)
+
+    # The request should fail if we use `next_page_token` and change parameters.
+    request.page_token = actual_response.next_page_token
+    request.order_by = 'owner'
+    with self.assertRaises(exceptions.PageTokenException):
+      self.CallWrapped(self.issues_svcr.SearchIssues, mc, request)
+
+  # Note the 'empty' case doesn't make sense for ListComments, as one is created
+  # for every issue.
+  def testListComments(self):
+    comment_2 = tracker_pb2.IssueComment(
+        id=123,
+        issue_id=self.issue_1.issue_id,
+        project_id=self.issue_1.project_id,
+        user_id=self.owner.user_id,
+        content='comment 2')
+    self.services.issue.TestAddComment(comment_2, self.issue_1.local_id)
+    request = issues_pb2.ListCommentsRequest(
+        parent=self.issue_1_resource_name, page_size=1)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    actual_response = self.CallWrapped(
+        self.issues_svcr.ListComments, mc, request)
+    self.assertEqual(len(actual_response.comments), 1)
+
+    # Check the `next_page_token` can be used to get the next page of results
+    request.page_token = actual_response.next_page_token
+    next_actual_response = self.CallWrapped(
+        self.issues_svcr.ListComments, mc, request)
+    self.assertEqual(len(next_actual_response.comments), 1)
+    self.assertEqual(next_actual_response.comments[0].content, 'comment 2')
+
+  def testListComments_UnsupportedFilter(self):
+    """If anything other than approval is provided, it's an error."""
+    filter_str = 'content = "x"'
+    request = issues_pb2.ListCommentsRequest(
+        parent=self.issue_1_resource_name, page_size=1, filter=filter_str)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.ListComments, mc, request)
+
+  def testListComments_TwoApprovalsErrors(self):
+    """If anything other than a single approval is provided, it's an error."""
+    filter_str = (
+        'approval = "projects/chicken/approvalDefs/404" OR '
+        'approval = "projects/chicken/approvalDefs/405')
+    request = issues_pb2.ListCommentsRequest(
+        parent=self.issue_1_resource_name, page_size=1, filter=filter_str)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.ListComments, mc, request)
+
+  def testListComments_FilterTypoError(self):
+    """Even an extra space is an error."""
+    filter_str = 'approval = "projects/chicken/approvalDefs/404" '
+    request = issues_pb2.ListCommentsRequest(
+        parent=self.issue_1_resource_name, page_size=1, filter=filter_str)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.ListComments, mc, request)
+
+  def testListComments_UnknownApprovalInFilter(self):
+    """Filter with unknown approval returns no error and no comments."""
+    approval_comment = tracker_pb2.IssueComment(
+        id=123,
+        issue_id=self.issue_1.issue_id,
+        project_id=self.issue_1.project_id,
+        user_id=self.owner.user_id,
+        content='comment 2 - approval 1',
+        approval_id=1)
+    self.services.issue.TestAddComment(approval_comment, self.issue_1.local_id)
+    request = issues_pb2.ListCommentsRequest(
+        parent=self.issue_1_resource_name, page_size=1,
+        filter='approval = "projects/chicken/approvalDefs/404"')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    response = self.CallWrapped(self.issues_svcr.ListComments, mc, request)
+    self.assertEqual(len(response.comments), 0)
+
+  def testListComments_ApprovalInFilter(self):
+    approval_comment = tracker_pb2.IssueComment(
+        id=123,
+        issue_id=self.issue_1.issue_id,
+        project_id=self.issue_1.project_id,
+        user_id=self.owner.user_id,
+        content='comment 2 - approval 1',
+        approval_id=1)
+    self.services.issue.TestAddComment(approval_comment, self.issue_1.local_id)
+    request = issues_pb2.ListCommentsRequest(
+        parent=self.issue_1_resource_name, page_size=1,
+        filter='approval = "projects/chicken/approvalDefs/1"')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    response = self.CallWrapped(self.issues_svcr.ListComments, mc, request)
+    self.assertEqual(len(response.comments), 1)
+    self.assertEqual(response.comments[0].content, approval_comment.content)
+
+  def testListApprovalValues(self):
+    config = fake.MakeTestConfig(self.project_2.project_id, [], [])
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    # Make regular field def and value
+    fd_1 = fake.MakeTestFieldDef(
+        1, self.project_2.project_id, tracker_pb2.FieldTypes.STR_TYPE,
+        field_name='field1')
+    self.services.config.TestAddFieldDef(fd_1)
+    fv_1 = fake.MakeFieldValue(
+        field_id=fd_1.field_id, str_value='value1', derived=False)
+
+    # Make testing approval def and its associated field def
+    approval_gate = fake.MakeTestFieldDef(
+        2, self.project_2.project_id, tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        field_name='approval-gate-1')
+    self.services.config.TestAddFieldDef(approval_gate)
+    ad = fake.MakeTestApprovalDef(2, approver_ids=[self.user_2.user_id])
+    self.services.config.TestAddApprovalDef(ad, self.project_2.project_id)
+
+    # Make approval value
+    av = fake.MakeApprovalValue(2, set_on=self.PAST_TIME,
+          approver_ids=[self.user_2.user_id], setter_id=self.user_2.user_id)
+
+    # Make field def that belongs to above approval_def
+    fd_2 = fake.MakeTestFieldDef(
+        3, self.project_2.project_id, tracker_pb2.FieldTypes.STR_TYPE,
+        field_name='field2', approval_id=2)
+    self.services.config.TestAddFieldDef(fd_2)
+    fv_2 = fake.MakeFieldValue(
+        field_id=fd_2.field_id, str_value='value2', derived=False)
+
+    issue_resource_name = 'projects/cow/issues/1237'
+    issue = fake.MakeTestIssue(
+        self.project_2.project_id,
+        1237,
+        'sum',
+        'New',
+        self.user_2.user_id,
+        project_name=self.project_2.project_name,
+        field_values=[fv_1, fv_2],
+        approval_values=[av])
+    self.services.issue.TestAddIssue(issue)
+
+    request = issues_pb2.ListApprovalValuesRequest(parent=issue_resource_name)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    actual_response = self.CallWrapped(
+        self.issues_svcr.ListApprovalValues, mc, request)
+
+    self.assertEqual(len(actual_response.approval_values), 1)
+    expected_fv = issue_objects_pb2.FieldValue(
+        field='projects/cow/fieldDefs/3',
+        value='value2',
+        derivation=issue_objects_pb2.Derivation.Value('EXPLICIT'))
+    expected = issue_objects_pb2.ApprovalValue(
+        name='projects/cow/issues/1237/approvalValues/2',
+        status=issue_objects_pb2.ApprovalValue.ApprovalStatus.Value('NOT_SET'),
+        approvers=['users/222'],
+        approval_def='projects/cow/approvalDefs/2',
+        set_time=timestamp_pb2.Timestamp(seconds=self.PAST_TIME),
+        setter='users/222',
+        field_values=[expected_fv])
+    self.assertEqual(actual_response.approval_values[0], expected)
+
+  def testListApprovalValues_Empty(self):
+    request = issues_pb2.ListApprovalValuesRequest(
+        parent=self.issue_1_resource_name)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    actual_response = self.CallWrapped(
+        self.issues_svcr.ListApprovalValues, mc, request)
+    self.assertEqual(len(actual_response.approval_values), 0)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testMakeIssue(self, _fake_pasicn):
+    request_issue = issue_objects_pb2.Issue(
+        summary='sum',
+        status=issue_objects_pb2.Issue.StatusValue(status='New'),
+        cc_users=[issue_objects_pb2.Issue.UserValue(user='users/222')],
+        labels=[issue_objects_pb2.Issue.LabelValue(label='foo-bar')]
+    )
+    request = issues_pb2.MakeIssueRequest(
+        parent='projects/chicken',
+        issue=request_issue,
+        description='description'
+    )
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    response = self.CallWrapped(
+        self.issues_svcr.MakeIssue, mc, request)
+    self.assertEqual(response.summary, 'sum')
+    self.assertEqual(response.status.status, 'New')
+    self.assertEqual(response.cc_users[0].user, 'users/222')
+    self.assertEqual(response.labels[0].label, 'foo-bar')
+    self.assertEqual(response.star_count, 1)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('time.time')
+  def testModifyIssues(self, fake_time, fake_notify):
+    fake_time.return_value = 12345
+
+    issue = _Issue(780, 1)
+    self.services.project.TestAddProject(
+        issue.project_name, project_id=issue.project_id,
+        owner_ids=[self.owner.user_id])
+
+    issue.labels = ['keep-me', 'remove-me']
+    self.services.issue.TestAddIssue(issue)
+    exp_issue = copy.deepcopy(issue)
+
+    self.services.issue.CreateIssueComment = mock.Mock()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+
+    request = issues_pb2.ModifyIssuesRequest(
+        deltas=[
+            issues_pb2.IssueDelta(
+                issue=issue_objects_pb2.Issue(
+                    name='projects/proj-780/issues/1',
+                    labels=[issue_objects_pb2.Issue.LabelValue(
+                        label='add-me')]),
+                update_mask=field_mask_pb2.FieldMask(paths=['labels']),
+                labels_remove=['remove-me'])],
+        uploads=[issues_pb2.AttachmentUpload(
+            filename='mowgli.gif', content='cute dog')],
+        comment_content='Release the chicken.',
+        notify_type=issues_pb2.NotifyType.Value('NO_NOTIFICATION'))
+
+    response = self.CallWrapped(
+        self.issues_svcr.ModifyIssues, mc, request)
+    exp_issue.labels = ['keep-me', 'add-me']
+    exp_issue.modified_timestamp = 12345
+    exp_api_issue = self.issues_svcr.converter.ConvertIssue(exp_issue)
+    self.assertEqual([iss for iss in response.issues], [exp_api_issue])
+
+    # All updated issues should have been fetched from DB, skipping cache.
+    # So we expect assume_stale=False was applied to all issues during the
+    # the fetch.
+    exp_issue.assume_stale = False
+    # These derived values get set to the following when an issue goes through
+    # the ApplyFilterRules path. (see filter_helpers._ComputeDerivedFields)
+    exp_issue.derived_owner_id = 0
+    exp_issue.derived_status = ''
+    exp_attachments = [framework_helpers.AttachmentUpload(
+        'mowgli.gif', 'cute dog', 'image/gif')]
+    exp_amendments = [tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.LABELS, newvalue='-remove-me add-me')]
+    self.services.issue.CreateIssueComment.assert_called_once_with(
+        self.cnxn, exp_issue, mc.auth.user_id, 'Release the chicken.',
+        attachments=exp_attachments, amendments=exp_amendments, commit=False)
+    fake_notify.assert_called_once_with(
+        issue.issue_id, 'testing-app.appspot.com', self.owner.user_id,
+        comment_id=mock.ANY, old_owner_id=None, send_email=False)
+
+  def testModifyIssues_Empty(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    request = issues_pb2.ModifyIssuesRequest()
+    response = self.CallWrapped(self.issues_svcr.ModifyIssues, mc, request)
+    self.assertEqual(response, issues_pb2.ModifyIssuesResponse())
+
+  @mock.patch('api.v3.api_constants.MAX_MODIFY_ISSUES', 2)
+  @mock.patch('api.v3.api_constants.MAX_MODIFY_IMPACTED_ISSUES', 4)
+  def testModifyIssues_TooMany(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    request = issues_pb2.ModifyIssuesRequest(
+        deltas=[
+            issues_pb2.IssueDelta(),
+            issues_pb2.IssueDelta(),
+            issues_pb2.IssueDelta()
+        ])
+    with self.assertRaisesRegexp(
+        exceptions.InputException,
+        'Requesting 3 updates when the allowed maximum is 2 updates.'):
+      self.CallWrapped(self.issues_svcr.ModifyIssues, mc, request)
+
+    issue_ref_list = [issue_objects_pb2.IssueRef()]
+    request = issues_pb2.ModifyIssuesRequest(
+        deltas=[
+            issues_pb2.IssueDelta(
+                issue=issue_objects_pb2.Issue(
+                    blocked_on_issue_refs=issue_ref_list),
+                blocked_on_issues_remove=issue_ref_list,
+                update_mask=field_mask_pb2.FieldMask(
+                    paths=['merged_into_issue_ref'])),
+            issues_pb2.IssueDelta(
+                issue=issue_objects_pb2.Issue(
+                    blocking_issue_refs=issue_ref_list),
+                blocking_issues_remove=issue_ref_list)
+        ])
+    with self.assertRaisesRegexp(
+        exceptions.InputException,
+        'Updates include 5 impacted issues when the allowed maximum is 4.'):
+      self.CallWrapped(self.issues_svcr.ModifyIssues, mc, request)
+
+  @mock.patch('time.time', mock.MagicMock(return_value=CURRENT_TIME))
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendApprovalChangeNotification')
+  def testModifyIssueApprovalValues(self, fake_notify):
+    self.services.issue.DeltaUpdateIssueApproval = mock.Mock()
+    config = fake.MakeTestConfig(self.project_1.project_id, [], [])
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    # Make testing approval def and its associated field def
+    field_id = 2
+    approval_field_def = fake.MakeTestFieldDef(
+        field_id,
+        self.project_1.project_id,
+        tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        field_name='approval-gate-1')
+    self.services.config.TestAddFieldDef(approval_field_def)
+    ad = fake.MakeTestApprovalDef(field_id, approver_ids=[self.owner.user_id])
+    self.services.config.TestAddApprovalDef(ad, self.project_1.project_id)
+
+    # Make approval value
+    av = fake.MakeApprovalValue(
+        field_id,
+        status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW,
+        set_on=self.PAST_TIME,
+        approver_ids=[self.owner.user_id],
+        setter_id=self.user_2.user_id)
+
+    issue = fake.MakeTestIssue(
+        self.project_1.project_id,
+        1237,
+        'sum',
+        'New',
+        self.owner.user_id,
+        project_name=self.project_1.project_name,
+        approval_values=[av])
+    self.services.issue.TestAddIssue(issue)
+
+    av_name = 'projects/%s/issues/%d/approvalValues/%d' % (
+        self.project_1.project_name, issue.local_id, ad.approval_id)
+    delta = issues_pb2.ApprovalDelta(
+        approval_value=issue_objects_pb2.ApprovalValue(
+            name=av_name,
+            status=issue_objects_pb2.ApprovalValue.ApprovalStatus.Value('NA')),
+        update_mask=field_mask_pb2.FieldMask(paths=['status']))
+
+    request = issues_pb2.ModifyIssueApprovalValuesRequest(deltas=[delta],)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    response = self.CallWrapped(
+        self.issues_svcr.ModifyIssueApprovalValues, mc, request)
+    expected_ingested_delta = tracker_pb2.ApprovalDelta(
+        status=tracker_pb2.ApprovalStatus.NA,
+        set_on=int(CURRENT_TIME),
+        setter_id=self.owner.user_id,
+    )
+    # NOTE: Because we mock out DeltaUpdateIssueApproval, the ApprovalValues
+    # returned haven't been changed in this test. We can't test that it was
+    # changed correctly, but we can make sure it's for the right ApprovalValue.
+    self.assertEqual(len(response.approval_values), 1)
+    self.assertEqual(response.approval_values[0].name, av_name)
+    self.services.issue.DeltaUpdateIssueApproval.assert_called_once_with(
+        mc.cnxn,
+        self.owner.user_id,
+        config,
+        issue,
+        av,
+        expected_ingested_delta,
+        comment_content=u'',
+        is_description=False,
+        attachments=None,
+        kept_attachments=None)
+    fake_notify.assert_called_once_with(
+        issue.issue_id,
+        ad.approval_id,
+        'testing-app.appspot.com',
+        mock.ANY,
+        send_email=True)
+
+  @mock.patch('api.v3.api_constants.MAX_MODIFY_APPROVAL_VALUES', 2)
+  def testModifyIssueApprovalValues_TooMany(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    request = issues_pb2.ModifyIssueApprovalValuesRequest(
+        deltas=[
+            issues_pb2.ApprovalDelta(),
+            issues_pb2.ApprovalDelta(),
+            issues_pb2.ApprovalDelta()
+        ])
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.issues_svcr.ModifyIssueApprovalValues, mc, request)
+
+  def testModifyIssueApprovalValues_Empty(self):
+    request = issues_pb2.ModifyIssueApprovalValuesRequest()
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    response = self.CallWrapped(
+        self.issues_svcr.ModifyIssueApprovalValues, mc, request)
+    self.assertEqual(len(response.approval_values), 0)
+
+  @mock.patch(
+      'businesslogic.work_env.WorkEnv.GetIssue',
+      return_value=tracker_pb2.Issue(
+          owner_id=0,
+          project_name='chicken',
+          project_id=789,
+          local_id=1234,
+          issue_id=80134))
+  def testModifyCommentState(self, mocked_get_issue):
+    name = self.issue_1_resource_name + '/comments/1'
+    state = issue_objects_pb2.IssueContentState.Value('DELETED')
+    request = issues_pb2.ModifyCommentStateRequest(name=name, state=state)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    with self.assertRaises(exceptions.NoSuchCommentException):
+      self.CallWrapped(self.issues_svcr.ModifyCommentState, mc, request)
+    mocked_get_issue.assert_any_call(self.issue_1.issue_id, use_cache=False)
+
+  def testModifyCommentState_Delete(self):
+    comment_1 = tracker_pb2.IssueComment(
+        id=124,
+        issue_id=self.issue_1.issue_id,
+        project_id=self.issue_1.project_id,
+        user_id=self.owner.user_id,
+        content='first actual comment')
+    self.services.issue.TestAddComment(comment_1, self.issue_1.local_id)
+
+    name = self.issue_1_resource_name + '/comments/1'
+    state = issue_objects_pb2.IssueContentState.Value('DELETED')
+    request = issues_pb2.ModifyCommentStateRequest(name=name, state=state)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    response = self.CallWrapped(
+        self.issues_svcr.ModifyCommentState, mc, request)
+    self.assertEqual(response.comment.state, state)
+    self.assertEqual(response.comment.content, 'first actual comment')
+
+    # Test noop
+    response = self.CallWrapped(
+        self.issues_svcr.ModifyCommentState, mc, request)
+    self.assertEqual(response.comment.state, state)
+
+    # Test undelete
+    state = issue_objects_pb2.IssueContentState.Value('ACTIVE')
+    request = issues_pb2.ModifyCommentStateRequest(name=name, state=state)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    response = self.CallWrapped(
+        self.issues_svcr.ModifyCommentState, mc, request)
+    self.assertEqual(response.comment.state, state)
+
+  @mock.patch(
+      'framework.permissions.UpdateIssuePermissions',
+      return_value=permissions.ADMIN_PERMISSIONSET)
+  def testModifyCommentState_Spam(self, _mocked):
+    comment_1 = tracker_pb2.IssueComment(
+        id=124,
+        issue_id=self.issue_1.issue_id,
+        project_id=self.issue_1.project_id,
+        user_id=self.owner.user_id,
+        content='first actual comment')
+    self.services.issue.TestAddComment(comment_1, self.issue_1.local_id)
+
+    name = self.issue_1_resource_name + '/comments/1'
+    state = issue_objects_pb2.IssueContentState.Value('SPAM')
+    request = issues_pb2.ModifyCommentStateRequest(name=name, state=state)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    response = self.CallWrapped(
+        self.issues_svcr.ModifyCommentState, mc, request)
+    self.assertEqual(response.comment.state, state)
+
+    # Test noop
+    response = self.CallWrapped(
+        self.issues_svcr.ModifyCommentState, mc, request)
+    self.assertEqual(response.comment.state, state)
+
+    # Test unflag as spam
+    state = issue_objects_pb2.IssueContentState.Value('ACTIVE')
+    request = issues_pb2.ModifyCommentStateRequest(name=name, state=state)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    response = self.CallWrapped(
+        self.issues_svcr.ModifyCommentState, mc, request)
+    self.assertEqual(response.comment.state, state)
+
+  def testModifyCommentState_Active(self):
+    comment_1 = tracker_pb2.IssueComment(
+        id=124,
+        issue_id=self.issue_1.issue_id,
+        project_id=self.issue_1.project_id,
+        user_id=self.owner.user_id,
+        content='first actual comment')
+    self.services.issue.TestAddComment(comment_1, self.issue_1.local_id)
+
+    name = self.issue_1_resource_name + '/comments/1'
+    state = issue_objects_pb2.IssueContentState.Value('ACTIVE')
+    request = issues_pb2.ModifyCommentStateRequest(name=name, state=state)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    response = self.CallWrapped(
+        self.issues_svcr.ModifyCommentState, mc, request)
+    self.assertEqual(response.comment.state, state)
+
+  def testModifyCommentState_Spam_ActionNotSupported(self):
+    # Cannot transition from deleted to spam
+    comment_1 = tracker_pb2.IssueComment(
+        id=124,
+        issue_id=self.issue_1.issue_id,
+        project_id=self.issue_1.project_id,
+        user_id=self.owner.user_id,
+        content='first actual comment',
+        deleted_by=self.owner.user_id)
+    self.services.issue.TestAddComment(comment_1, self.issue_1.local_id)
+
+    name = self.issue_1_resource_name + '/comments/1'
+    state = issue_objects_pb2.IssueContentState.Value('SPAM')
+    request = issues_pb2.ModifyCommentStateRequest(name=name, state=state)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    with self.assertRaises(exceptions.ActionNotSupported):
+      self.CallWrapped(self.issues_svcr.ModifyCommentState, mc, request)
+
+  def testModifyCommentState_Delete_ActionNotSupported(self):
+    # Cannot transition from spam to deleted
+    comment_1 = tracker_pb2.IssueComment(
+        id=124,
+        issue_id=self.issue_1.issue_id,
+        project_id=self.issue_1.project_id,
+        user_id=self.owner.user_id,
+        content='first actual comment',
+        is_spam=True)
+    self.services.issue.TestAddComment(comment_1, self.issue_1.local_id)
+
+    name = self.issue_1_resource_name + '/comments/1'
+    state = issue_objects_pb2.IssueContentState.Value('DELETED')
+    request = issues_pb2.ModifyCommentStateRequest(name=name, state=state)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    with self.assertRaises(exceptions.ActionNotSupported):
+      self.CallWrapped(self.issues_svcr.ModifyCommentState, mc, request)
+
+  def testModifyCommentState_NoSuchComment(self):
+    name = self.issue_1_resource_name + '/comments/1'
+    state = issue_objects_pb2.IssueContentState.Value('DELETED')
+    request = issues_pb2.ModifyCommentStateRequest(name=name, state=state)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.owner.email)
+    with self.assertRaises(exceptions.NoSuchCommentException):
+      self.CallWrapped(self.issues_svcr.ModifyCommentState, mc, request)
+
+  def testModifyCommentState_Delete_PermissionException(self):
+    comment_1 = tracker_pb2.IssueComment(
+        id=124,
+        issue_id=self.issue_1.issue_id,
+        project_id=self.issue_1.project_id,
+        user_id=self.owner.user_id,
+        content='first actual comment')
+    self.services.issue.TestAddComment(comment_1, self.issue_1.local_id)
+
+    name = self.issue_1_resource_name + '/comments/1'
+    state = issue_objects_pb2.IssueContentState.Value('DELETED')
+    request = issues_pb2.ModifyCommentStateRequest(name=name, state=state)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_2.email)
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.ModifyCommentState, mc, request)
+
+  @mock.patch(
+      'framework.permissions.UpdateIssuePermissions',
+      return_value=permissions.READ_ONLY_PERMISSIONSET)
+  def testModifyCommentState_Spam_PermissionException(self, _mocked):
+    comment_1 = tracker_pb2.IssueComment(
+        id=124,
+        issue_id=self.issue_1.issue_id,
+        project_id=self.issue_1.project_id,
+        user_id=self.owner.user_id,
+        content='first actual comment')
+    self.services.issue.TestAddComment(comment_1, self.issue_1.local_id)
+
+    name = self.issue_1_resource_name + '/comments/1'
+    state = issue_objects_pb2.IssueContentState.Value('SPAM')
+    request = issues_pb2.ModifyCommentStateRequest(name=name, state=state)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_2.email)
+    with self.assertRaises(permissions.PermissionException):
+      self.CallWrapped(self.issues_svcr.ModifyCommentState, mc, request)
diff --git a/api/v3/test/monorail_servicer_test.py b/api/v3/test/monorail_servicer_test.py
new file mode 100644
index 0000000..3569879
--- /dev/null
+++ b/api/v3/test/monorail_servicer_test.py
@@ -0,0 +1,534 @@
+# Copyright 2018 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
+
+"""Tests for MonorailServicer."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+import unittest
+import mock
+import mox
+
+from components.prpc import server
+from components.prpc import codes
+from components.prpc import context
+from google.appengine.ext import testbed
+from google.protobuf import json_format
+
+import settings
+from api.v3 import monorail_servicer
+from framework import authdata
+from framework import exceptions
+from framework import framework_constants
+from framework import monorailcontext
+from framework import permissions
+from framework import ratelimiter
+from framework import xsrf
+from services import cachemanager_svc
+from services import config_svc
+from services import service_manager
+from services import features_svc
+from testing import fake
+from testing import testing_helpers
+
+
+class MonorailServicerFunctionsTest(unittest.TestCase):
+
+  def testConvertPRPCStatusToHTTPStatus(self):
+    """We can convert pRPC status codes to http codes for monitoring."""
+    prpc_context = context.ServicerContext()
+
+    prpc_context.set_code(codes.StatusCode.OK)
+    self.assertEqual(
+        200, monorail_servicer.ConvertPRPCStatusToHTTPStatus(prpc_context))
+
+    prpc_context.set_code(codes.StatusCode.INVALID_ARGUMENT)
+    self.assertEqual(
+        400, monorail_servicer.ConvertPRPCStatusToHTTPStatus(prpc_context))
+
+    prpc_context.set_code(codes.StatusCode.PERMISSION_DENIED)
+    self.assertEqual(
+        403, monorail_servicer.ConvertPRPCStatusToHTTPStatus(prpc_context))
+
+    prpc_context.set_code(codes.StatusCode.NOT_FOUND)
+    self.assertEqual(
+        404, monorail_servicer.ConvertPRPCStatusToHTTPStatus(prpc_context))
+
+    prpc_context.set_code(codes.StatusCode.INTERNAL)
+    self.assertEqual(
+        500, monorail_servicer.ConvertPRPCStatusToHTTPStatus(prpc_context))
+
+
+class UpdateSomethingRequest(testing_helpers.Blank):
+  """A fake request that would do a write."""
+  pass
+
+
+class ListSomethingRequest(testing_helpers.Blank):
+  """A fake request that would do a read."""
+  pass
+
+
+class TestableServicer(monorail_servicer.MonorailServicer):
+  """Fake servicer class."""
+
+  def __init__(self, services):
+    super(TestableServicer, self).__init__(services)
+    self.was_called = False
+    self.seen_mc = None
+    self.seen_request = None
+
+  @monorail_servicer.PRPCMethod
+  def CalcSomething(self, mc, request):
+    """Raise the test exception, or return what we got for verification."""
+    self.was_called = True
+    self.seen_mc = mc
+    self.seen_request = request
+    assert mc
+    assert request
+    if request.exc_class:
+      raise request.exc_class()
+    else:
+      return 'fake response proto'
+
+
+class MonorailServicerTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+    self.testbed.init_user_stub()
+
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService(),
+        cache_manager=fake.CacheManager())
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=789, owner_ids=[111])
+    # Allowlisted in testing/api_clients.cfg
+    self.allowlisted_client_id = '98723764876'
+    self.non_member = self.services.user.TestAddUser(
+        'nonmember@example.com', 222)
+    self.test_user = self.services.user.TestAddUser('test@example.com', 420)
+    self.svcr = TestableServicer(self.services)
+    self.nonmember_token = xsrf.GenerateToken(222, xsrf.XHR_SERVLET_PATH)
+    self.request = UpdateSomethingRequest(exc_class=None)
+    self.prpc_context = context.ServicerContext()
+    self.prpc_context.set_code(codes.StatusCode.OK)
+    self.prpc_context._invocation_metadata = [
+        (monorail_servicer.XSRF_TOKEN_HEADER, self.nonmember_token)]
+    # This string is returned by app_identity.get_application_id() when
+    # called in the test env.
+    self.app_id = 'testing-app'
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+    self.testbed.deactivate()
+
+  def SetUpRecordMonitoringStats(self):
+    self.mox.StubOutWithMock(json_format, 'MessageToJson')
+    json_format.MessageToJson(self.request).AndReturn('json of request')
+    json_format.MessageToJson('fake response proto').AndReturn(
+        'json of response')
+    self.mox.ReplayAll()
+
+  def testRun_SiteWide_Normal(self):
+    """Calling the handler through the decorator."""
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    self.SetUpRecordMonitoringStats()
+    # pylint: disable=unexpected-keyword-arg
+    response = self.svcr.CalcSomething(
+        self.request, self.prpc_context, cnxn=self.cnxn)
+    self.assertIsNone(self.svcr.seen_mc.cnxn)  # Because of CleanUp().
+    self.assertEqual(self.svcr.seen_mc.auth.email, self.non_member.email)
+    self.assertIn(permissions.CREATE_HOTLIST.lower(),
+                  self.svcr.seen_mc.perms.perm_names)
+    self.assertNotIn(permissions.ADMINISTER_SITE.lower(),
+                     self.svcr.seen_mc.perms.perm_names)
+    self.assertEqual(self.request, self.svcr.seen_request)
+    self.assertEqual('fake response proto', response)
+    self.assertEqual(codes.StatusCode.OK, self.prpc_context._code)
+
+  def testRun_RequesterBanned(self):
+    """If we reject the request, give PERMISSION_DENIED."""
+    self.non_member.banned = 'Spammer'
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    self.SetUpRecordMonitoringStats()
+    # pylint: disable=unexpected-keyword-arg
+    self.svcr.CalcSomething(
+        self.request, self.prpc_context, cnxn=self.cnxn)
+    self.assertFalse(self.svcr.was_called)
+    self.assertEqual(
+        codes.StatusCode.PERMISSION_DENIED, self.prpc_context._code)
+
+  def testRun_AnonymousRequester(self):
+    """Test we properly process anonymous users with valid tokens."""
+    self.prpc_context._invocation_metadata = [
+        (monorail_servicer.XSRF_TOKEN_HEADER,
+         xsrf.GenerateToken(0, xsrf.XHR_SERVLET_PATH))]
+    self.SetUpRecordMonitoringStats()
+    # pylint: disable=unexpected-keyword-arg
+    response = self.svcr.CalcSomething(
+        self.request, self.prpc_context, cnxn=self.cnxn)
+    self.assertIsNone(self.svcr.seen_mc.cnxn)  # Because of CleanUp().
+    self.assertIsNone(self.svcr.seen_mc.auth.email)
+    self.assertNotIn(permissions.CREATE_HOTLIST.lower(),
+                  self.svcr.seen_mc.perms.perm_names)
+    self.assertNotIn(permissions.ADMINISTER_SITE.lower(),
+                     self.svcr.seen_mc.perms.perm_names)
+    self.assertEqual(self.request, self.svcr.seen_request)
+    self.assertEqual('fake response proto', response)
+    self.assertEqual(codes.StatusCode.OK, self.prpc_context._code)
+
+  def testRun_DistributedInvalidation(self):
+    """The Run method must call DoDistributedInvalidation()."""
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    self.SetUpRecordMonitoringStats()
+    # pylint: disable=unexpected-keyword-arg
+    self.svcr.CalcSomething(
+        self.request, self.prpc_context, cnxn=self.cnxn)
+    self.assertIsNotNone(self.services.cache_manager.last_call)
+
+  def testRun_HandlerErrorResponse(self):
+    """An expected exception in the method causes an error status."""
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    self.SetUpRecordMonitoringStats()
+    # pylint: disable=attribute-defined-outside-init
+    self.request.exc_class = exceptions.NoSuchUserException
+    # pylint: disable=unexpected-keyword-arg
+    response = self.svcr.CalcSomething(
+        self.request, self.prpc_context, cnxn=self.cnxn)
+    self.assertTrue(self.svcr.was_called)
+    self.assertIsNone(self.svcr.seen_mc.cnxn)  # Because of CleanUp().
+    self.assertEqual(self.svcr.seen_mc.auth.email, self.non_member.email)
+    self.assertEqual(self.request, self.svcr.seen_request)
+    self.assertIsNone(response)
+    self.assertEqual(codes.StatusCode.NOT_FOUND, self.prpc_context._code)
+
+  def testRun_HandlerProgrammingError(self):
+    """An unexception in the handler method is re-raised."""
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    self.SetUpRecordMonitoringStats()
+    # pylint: disable=attribute-defined-outside-init
+    self.request.exc_class = NotImplementedError
+    self.assertRaises(
+        NotImplementedError,
+        self.svcr.CalcSomething,
+        self.request, self.prpc_context, cnxn=self.cnxn)
+    self.assertTrue(self.svcr.was_called)
+    self.assertIsNone(self.svcr.seen_mc.cnxn)  # Because of CleanUp().
+
+  def testGetAndAssertRequesterAuth_Cookie_Anon(self):
+    """We get and allow requests from anon user using cookie auth."""
+    metadata = {
+        monorail_servicer.XSRF_TOKEN_HEADER: xsrf.GenerateToken(
+            0, xsrf.XHR_SERVLET_PATH)}
+    # Signed out.
+    client_id, user_auth = self.svcr.GetAndAssertRequesterAuth(
+        self.cnxn, metadata, self.services)
+    self.assertIsNone(user_auth.email)
+    self.assertEqual(client_id, 'https://%s.appspot.com' % self.app_id)
+
+  def testGetAndAssertRequesterAuth_Cookie_SignedIn(self):
+    """We get and allow requests from signed in users using cookie auth."""
+    metadata = dict(self.prpc_context.invocation_metadata())
+    # Signed in with cookie auth.
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    client_id, user_auth = self.svcr.GetAndAssertRequesterAuth(
+        self.cnxn, metadata, self.services)
+    self.assertEqual(self.non_member.email, user_auth.email)
+    self.assertEqual(client_id, 'https://%s.appspot.com' % self.app_id)
+
+  def testGetAndAssertRequester_Anon_BadToken(self):
+    """We get the email address of the signed in user using oauth."""
+    metadata = {}
+    # Anonymous user has invalid token.
+    with self.assertRaises(permissions.PermissionException):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  @mock.patch('google.oauth2.id_token.verify_oauth2_token')
+  def testGetAndAssertRequesterAuth_IDToken_CaseInsensitiveBearer(
+      self, mock_verifier):
+    """We are case-insensitive when looking for the 'bearer' string."""
+    metadata = {'authorization': 'beaReR allowlisted-user-id-token'}
+    some_other_site_user = self.services.user.TestAddUser(
+        'some-human-user@human.test', 888)
+
+    # Signed in with oauth.
+    mock_verifier.return_value = {
+        'aud': self.allowlisted_client_id,
+        'email': some_other_site_user.email,
+    }
+
+    client_id, user_auth = self.svcr.GetAndAssertRequesterAuth(
+        self.cnxn, metadata, self.services)
+    self.assertEqual(client_id, self.allowlisted_client_id)
+    self.assertEqual(user_auth.email, some_other_site_user.email)
+    mock_verifier.assert_called_once_with('allowlisted-user-id-token', mock.ANY)
+
+  @mock.patch('google.oauth2.id_token.verify_oauth2_token')
+  def testGetAndAssertRequesterAuth_IDToken_AutoCreateUser(self, mock_verifier):
+    """We can auto-create Monorail users for the requester."""
+    metadata = {'authorization': 'beaReR allowlisted-user-id-token'}
+    # Signed in with oauth.
+    mock_verifier.return_value = {
+        'aud': self.allowlisted_client_id,
+        'email': 'new-user@email.com',
+    }
+
+    client_id, user_auth = self.svcr.GetAndAssertRequesterAuth(
+        self.cnxn, metadata, self.services)
+    self.assertEqual(client_id, self.allowlisted_client_id)
+    self.assertEqual(user_auth.email, 'new-user@email.com')
+    mock_verifier.assert_called_once_with('allowlisted-user-id-token', mock.ANY)
+
+  def testGetAndAssertRequesterAuth_IDToken_InvalidAuthToken(self):
+    """We raise an exception if 'bearer' is missing from headers."""
+    metadata = {'authorization': 'allowlisted-user-id-token'}
+
+    with self.assertRaises(permissions.PermissionException):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  @mock.patch('google.oauth2.id_token.verify_oauth2_token')
+  def testGetAndAssertRequesterAuth_IDToken_ServiceAccountAllowed(
+      self, mock_verifier):
+    """We allow requests from allowlisted service accounts with correct aud."""
+    metadata = {'authorization': 'Bearer allowlisted-user-id-token'}
+    # Allowlisted in testing/api_clients.cfg
+    allowlisted_service_account_email = self.services.user.TestAddUser(
+        '123456789@developer.gserviceaccount.com', 889)
+
+    aud = 'https://%s.appspot.com' % self.app_id
+    # Signed in with oauth.
+    mock_verifier.return_value = {
+        'aud': aud,
+        'email': allowlisted_service_account_email.email,
+    }
+
+    client_id, user_auth = self.svcr.GetAndAssertRequesterAuth(
+        self.cnxn, metadata, self.services)
+    self.assertEqual(client_id, aud)
+    self.assertEqual(user_auth.email, allowlisted_service_account_email.email)
+    mock_verifier.assert_called_once_with('allowlisted-user-id-token', mock.ANY)
+
+  @mock.patch('google.oauth2.id_token.verify_oauth2_token')
+  def testGetAndAssertRequesterAuth_IDToken_ServiceAccountNotAllowed(
+      self, mock_verifier):
+    """We raise an exception if the service account is not allowlisted"""
+    metadata = {'authorization': 'Bearer non-allowlisted-user-id-token'}
+
+    # Signed in with oauth.
+    mock_verifier.return_value = {
+        'aud': 'https://%s.appspot.com' % self.app_id,
+        # A random service account, not allow-listed.
+        'email': 'bigbadwolf@gserviceaccount.com',
+    }
+
+    with self.assertRaisesRegexp(
+        permissions.PermissionException, r'Account .+ is not allowlisted'):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  @mock.patch('google.oauth2.id_token.verify_oauth2_token')
+  def testGetAndAssertRequesterAuth_IDToken_ServiceAccountBadAud(
+      self, mock_verifier):
+    """We raise an exception when a service account token['aud'] is invalid."""
+    metadata = {'authorization': 'Bearer non-allowlisted-user-id-token'}
+    # Allowlisted in testing/api_clients.cfg
+    allowlisted_service_account_email = self.services.user.TestAddUser(
+        '123456789@developer.gserviceaccount.com', 889)
+
+    # Signed in with oauth.
+    mock_verifier.return_value = {
+        'aud': 'id-token-inteded-for-some-other-site',
+        'email': allowlisted_service_account_email.email,
+    }
+
+    with self.assertRaisesRegexp(
+        permissions.PermissionException, r'Invalid token audience: .+'):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  @mock.patch('google.oauth2.id_token.verify_oauth2_token')
+  def testGetAndAssertRequesterAuth_IDToken_ClientNotAllowed(
+      self, mock_verifier):
+    """We raise an exception if the client ID is not allowlisted."""
+    metadata = {'authorization': 'Bearer non-allowlisted-client-id-token'}
+
+    # Signed in with oauth.
+    mock_verifier.return_value = {
+        # A client ID not allow-listed.
+        'aud': 'some-other-site-client-id',
+        # Some human user that the client is impersonating for the request.
+        'email': 'some-other-site-user@test.com',
+    }
+
+    with self.assertRaisesRegexp(
+        permissions.PermissionException, r'Client .+ is not allowlisted'):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+    # Assert some-other-site-user was not auto-created.
+    with self.assertRaises(exceptions.NoSuchUserException):
+      self.services.user.LookupUserID(
+          self.cnxn, 'some-other-site-user@test.com')
+
+  @mock.patch('google.oauth2.id_token.verify_oauth2_token')
+  def testGetAndAssertRequesterAuth_IDToken_NoEmail(self, mock_verifier):
+    """We raise an exception if ID token has no email information."""
+    metadata = {'authorization': 'Bearer allowlisted-user-id-token'}
+
+    # Signed in with oauth.
+    mock_verifier.return_value = {'aud': self.allowlisted_client_id}
+
+    with self.assertRaises(permissions.PermissionException):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  @mock.patch('google.oauth2.id_token.verify_oauth2_token')
+  def testGetAndAssertRequesterAuth_IDToken_InvalidIDToken(self, mock_verifier):
+    """We raise an exception if the ID token is invalid."""
+    metadata = {'authorization': 'Bearer bad-token'}
+
+    mock_verifier.side_effect = ValueError()
+
+    with self.assertRaises(permissions.PermissionException):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  def testGetAndAssertRequesterAuth_Banned(self):
+    self.non_member.banned = 'Spammer'
+    metadata = dict(self.prpc_context.invocation_metadata())
+    # Signed in with cookie auth.
+    self.testbed.setup_env(user_email=self.non_member.email, overwrite=True)
+    with self.assertRaises(permissions.BannedUserException):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  def testGetRequester_TestAccountOnAppspot(self):
+    """Specifying test_account is ignored on deployed server."""
+    # pylint: disable=attribute-defined-outside-init
+    metadata = {'x-test-account': 'test@example.com'}
+    with self.assertRaises(exceptions.InputException):
+      self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+
+  def testGetRequester_TestAccountOnDev(self):
+    """For integration testing, we can set test_account on dev_server."""
+    try:
+      orig_local_mode = settings.local_mode
+      settings.local_mode = True
+
+      # pylint: disable=attribute-defined-outside-init
+      metadata = {'x-test-account': 'test@example.com'}
+      client_id, test_auth = self.svcr.GetAndAssertRequesterAuth(
+          self.cnxn, metadata, self.services)
+      self.assertEqual('test@example.com', test_auth.email)
+      self.assertEqual('https://%s.appspot.com' % self.app_id, client_id)
+
+      # pylint: disable=attribute-defined-outside-init
+      metadata = {'x-test-account': 'test@anythingelse.com'}
+      with self.assertRaises(exceptions.InputException):
+        self.svcr.GetAndAssertRequesterAuth(self.cnxn, metadata, self.services)
+    finally:
+      settings.local_mode = orig_local_mode
+
+  def testAssertBaseChecks_SiteIsReadOnly_Write(self):
+    """We reject writes and allow reads when site is read-only."""
+    orig_read_only = settings.read_only
+    try:
+      settings.read_only = True
+      metadata = {}
+      self.assertRaises(
+        permissions.PermissionException,
+        self.svcr.AssertBaseChecks, self.request, metadata)
+    finally:
+      settings.read_only = orig_read_only
+
+  def testAssertBaseChecks_SiteIsReadOnly_Read(self):
+    """We reject writes and allow reads when site is read-only."""
+    orig_read_only = settings.read_only
+    try:
+      settings.read_only = True
+      metadata = {monorail_servicer.XSRF_TOKEN_HEADER: self.nonmember_token}
+
+      # Our default request is an update.
+      with self.assertRaises(permissions.PermissionException):
+        self.svcr.AssertBaseChecks(self.request, metadata)
+
+      # A method name starting with "List" or "Get" will run OK.
+      self.request = ListSomethingRequest(exc_class=None)
+      self.svcr.AssertBaseChecks(self.request, metadata)
+    finally:
+      settings.read_only = orig_read_only
+
+  def CheckExceptionStatus(self, e, expected_code, details=None):
+    mc = monorailcontext.MonorailContext(self.services)
+    self.prpc_context.set_code(codes.StatusCode.OK)
+    processed = self.svcr.ProcessException(e, self.prpc_context, mc)
+    if expected_code:
+      self.assertTrue(processed)
+      self.assertEqual(expected_code, self.prpc_context._code)
+    else:
+      self.assertFalse(processed)
+      # Uncaught exceptions should indicate an error.
+      self.assertEqual(codes.StatusCode.INTERNAL, self.prpc_context._code)
+    if details is not None:
+      self.assertEqual(details, self.prpc_context._details)
+
+  def testProcessException(self):
+    """Expected exceptions are converted to pRPC codes, expected not."""
+    self.CheckExceptionStatus(
+        exceptions.NoSuchUserException(), codes.StatusCode.NOT_FOUND)
+    self.CheckExceptionStatus(
+        exceptions.NoSuchProjectException(), codes.StatusCode.NOT_FOUND)
+    self.CheckExceptionStatus(
+        exceptions.NoSuchIssueException(), codes.StatusCode.NOT_FOUND)
+    self.CheckExceptionStatus(
+        exceptions.NoSuchComponentException(), codes.StatusCode.NOT_FOUND)
+    self.CheckExceptionStatus(
+        permissions.BannedUserException(), codes.StatusCode.PERMISSION_DENIED)
+    self.CheckExceptionStatus(
+        permissions.PermissionException(), codes.StatusCode.PERMISSION_DENIED)
+    self.CheckExceptionStatus(
+        exceptions.GroupExistsException(), codes.StatusCode.ALREADY_EXISTS)
+    self.CheckExceptionStatus(
+        exceptions.InvalidComponentNameException(),
+        codes.StatusCode.INVALID_ARGUMENT)
+    self.CheckExceptionStatus(
+        exceptions.FilterRuleException(),
+        codes.StatusCode.INVALID_ARGUMENT,
+        details='Violates filter rule that should error.')
+    self.CheckExceptionStatus(
+        exceptions.InputException('echoed values'),
+        codes.StatusCode.INVALID_ARGUMENT,
+        details='Invalid arguments: echoed values')
+    self.CheckExceptionStatus(
+        exceptions.OverAttachmentQuota(), codes.StatusCode.RESOURCE_EXHAUSTED)
+    self.CheckExceptionStatus(
+        ratelimiter.ApiRateLimitExceeded('client_id', 'email'),
+        codes.StatusCode.PERMISSION_DENIED)
+    self.CheckExceptionStatus(
+        features_svc.HotlistAlreadyExists(), codes.StatusCode.ALREADY_EXISTS)
+    self.CheckExceptionStatus(NotImplementedError(), None)
+
+  def testProcessException_ErrorMessageEscaped(self):
+    """If we ever echo user input in error messages, it is escaped.."""
+    self.CheckExceptionStatus(
+        exceptions.InputException('echoed <script>"code"</script>'),
+        codes.StatusCode.INVALID_ARGUMENT,
+        details=('Invalid arguments: echoed '
+                 '&lt;script&gt;&quot;code&quot;&lt;/script&gt;'))
+
+  def testRecordMonitoringStats_RequestClassDoesNotEndInRequest(self):
+    """We cope with request proto class names that do not end in 'Request'."""
+    self.request = 'this is a string'
+    self.SetUpRecordMonitoringStats()
+    start_time = 1522559788.939511
+    now = 1522569311.892738
+    self.svcr.RecordMonitoringStats(
+        start_time, self.request, 'fake response proto', self.prpc_context,
+        now=now)
diff --git a/api/v3/test/paginator_test.py b/api/v3/test/paginator_test.py
new file mode 100644
index 0000000..ca0b713
--- /dev/null
+++ b/api/v3/test/paginator_test.py
@@ -0,0 +1,78 @@
+# Copyright 2020 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.
+"""Tests for the Paginator class."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from google.appengine.ext import testbed
+
+from api.v3 import paginator
+from api.v3.api_proto import hotlists_pb2
+from framework import exceptions
+from framework import paginate
+
+class PaginatorTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+
+    self.paginator = paginator.Paginator(
+        parent='animal/goose/sound/honks', query='chaos')
+
+  def testGetStart(self):
+    """We can get the start index from a page_token."""
+    start = 5
+    page_token = paginate.GeneratePageToken(
+        self.paginator.request_contents, start)
+    self.assertEqual(self.paginator.GetStart(page_token), start)
+
+  def testGetStart_EmptyPageToken(self):
+    """We return the default start for an empty page_token."""
+    request = hotlists_pb2.ListHotlistItemsRequest()
+    self.assertEqual(0, self.paginator.GetStart(request.page_token))
+
+  def testGenerateNextPageToken(self):
+    """We return the next page token."""
+    next_start = 10
+    expected_page_token = paginate.GeneratePageToken(
+        self.paginator.request_contents, next_start)
+    self.assertEqual(
+        self.paginator.GenerateNextPageToken(next_start), expected_page_token)
+
+  def testGenerateNextPageToken_NoStart(self):
+    """We return None if start is not provided."""
+    next_start = None
+    self.assertEqual(self.paginator.GenerateNextPageToken(next_start), None)
+
+  def testCoercePageSize(self):
+    """A valid page_size is used when provided."""
+    self.assertEqual(1, paginator.CoercePageSize(1, 5))
+
+  def testCoercePageSize_Negative(self):
+    """An exception is raised for a negative page_size."""
+    with self.assertRaises(exceptions.InputException):
+      paginator.CoercePageSize(-1, 5)
+
+  def testCoercePageSize_TooBig(self):
+    """A page_size above the max is coerced to the max."""
+    self.assertEqual(5, paginator.CoercePageSize(6, 5, 2))
+
+  def testCoercePageSize_Default(self):
+    """A default page_size different from max_size is used when provided."""
+    self.assertEqual(2, paginator.CoercePageSize(None, 5, 2))
+
+  def testCoercePageSize_NotProvided(self):
+    """max_size is used if no page_size or default_size provided."""
+    self.assertEqual(5, paginator.CoercePageSize(None, 5))
+
+  def testCoercePageSize_Zero(self):
+    """Handles zero equivalently to None."""
+    self.assertEqual(5, paginator.CoercePageSize(0, 5))
\ No newline at end of file
diff --git a/api/v3/test/permissions_converter_test.py b/api/v3/test/permissions_converter_test.py
new file mode 100644
index 0000000..e679eb6
--- /dev/null
+++ b/api/v3/test/permissions_converter_test.py
@@ -0,0 +1,44 @@
+# Copyright 2020 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.
+"""Tests for converting permission strings to API permissions enums."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from api.v3 import permission_converters as pc
+from api.v3.api_proto import permission_objects_pb2
+from framework import exceptions
+from framework import permissions
+
+
+class ConverterFunctionsTest(unittest.TestCase):
+
+  def testConvertHotlistPermissions(self):
+    api_perms = pc.ConvertHotlistPermissions(
+        [permissions.ADMINISTER_HOTLIST, permissions.EDIT_HOTLIST])
+    expected_perms = [
+        permission_objects_pb2.Permission.Value('HOTLIST_ADMINISTER'),
+        permission_objects_pb2.Permission.Value('HOTLIST_EDIT')
+    ]
+    self.assertEqual(api_perms, expected_perms)
+
+  def testConvertHotlistPermissions_InvalidPermission(self):
+    with self.assertRaises(exceptions.InputException):
+      pc.ConvertHotlistPermissions(['EatHotlist'])
+
+  def testConvertFieldDefPermissions(self):
+    api_perms = pc.ConvertFieldDefPermissions(
+        [permissions.EDIT_FIELD_DEF_VALUE, permissions.EDIT_FIELD_DEF])
+    expected_perms = [
+        permission_objects_pb2.Permission.Value('FIELD_DEF_VALUE_EDIT'),
+        permission_objects_pb2.Permission.Value('FIELD_DEF_EDIT')
+    ]
+    self.assertEqual(api_perms, expected_perms)
+
+  def testConvertFieldDefPermissions_InvalidPermission(self):
+    with self.assertRaises(exceptions.InputException):
+      pc.ConvertFieldDefPermissions(['EatFieldDef'])
diff --git a/api/v3/test/permissions_servicer_test.py b/api/v3/test/permissions_servicer_test.py
new file mode 100644
index 0000000..076bd40
--- /dev/null
+++ b/api/v3/test/permissions_servicer_test.py
@@ -0,0 +1,105 @@
+# Copyright 2020 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.
+"""Tests for the permissions servicer."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from api.v3 import permission_converters as pc
+from api.v3 import permissions_servicer
+from api.v3.api_proto import permissions_pb2
+from api.v3.api_proto import permission_objects_pb2
+from framework import exceptions
+from framework import monorailcontext
+from framework import permissions
+from testing import fake
+from services import features_svc
+from services import service_manager
+
+
+class PermissionsServicerTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        features=fake.FeaturesService(),
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=789, committer_ids=[111])
+    self.permissions_svcr = permissions_servicer.PermissionsServicer(
+        self.services, make_rate_limiter=False)
+    self.user_1 = self.services.user.TestAddUser('goose_1@example.com', 111)
+    self.hotlist_1 = self.services.features.TestAddHotlist(
+        'ThingsToBreak', owner_ids=[self.user_1.user_id])
+    self.services.config.CreateFieldDef(
+        self.cnxn, self.project.project_id, 'Field_1', 'STR_TYPE', None, None,
+        None, None, None, None, None, None, None, None, None, None, None, None,
+        [], [])
+    self.config = self.services.config.GetProjectConfig(
+        self.cnxn, self.project.project_id)
+
+  def CallWrapped(self, wrapped_handler, *args, **kwargs):
+    return wrapped_handler.wrapped(self.permissions_svcr, *args, **kwargs)
+
+  def testBatchGetPermissionSets_Hotlist(self):
+    """We can batch get PermissionSets for hotlists."""
+    hotlist_1_name = 'hotlists/%s' % self.hotlist_1.hotlist_id
+    request = permissions_pb2.BatchGetPermissionSetsRequest(
+        names=[hotlist_1_name])
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    response = self.CallWrapped(
+        self.permissions_svcr.BatchGetPermissionSets, mc, request)
+
+    expected_permission_sets = [
+        permission_objects_pb2.PermissionSet(
+            resource=hotlist_1_name,
+            permissions=[
+                permission_objects_pb2.Permission.Value('HOTLIST_ADMINISTER'),
+                permission_objects_pb2.Permission.Value('HOTLIST_EDIT'),
+            ])
+    ]
+    self.assertEqual(
+        response,
+        permissions_pb2.BatchGetPermissionSetsResponse(
+            permission_sets=expected_permission_sets))
+
+  def testBatchGetPermissionSets_FieldDef(self):
+    """We can batch get PermissionSets for fields."""
+    field = self.config.field_defs[0]
+    field_1_name = 'projects/%s/fieldDefs/%s' % (
+        self.project.project_name, field.field_id)
+    request = permissions_pb2.BatchGetPermissionSetsRequest(
+        names=[field_1_name])
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(self.project)
+    response = self.CallWrapped(
+        self.permissions_svcr.BatchGetPermissionSets, mc, request)
+
+    expected_permission_sets = [
+        permission_objects_pb2.PermissionSet(
+            resource=field_1_name,
+            permissions=[
+                permission_objects_pb2.Permission.Value('FIELD_DEF_VALUE_EDIT'),
+            ])
+    ]
+    self.assertEqual(
+        response,
+        permissions_pb2.BatchGetPermissionSetsResponse(
+            permission_sets=expected_permission_sets))
+
+  # Each case of recognized resource name is tested in testBatchGetPermissions.
+  def testGetPermissionSet_InvalidName(self):
+    """We raise exception when the resource name is unrecognized."""
+    we = None
+    with self.assertRaises(exceptions.InputException):
+      self.permissions_svcr._GetPermissionSet(self.cnxn, we, 'goose/honk')
diff --git a/api/v3/test/projects_servicer_test.py b/api/v3/test/projects_servicer_test.py
new file mode 100644
index 0000000..83aa8ab
--- /dev/null
+++ b/api/v3/test/projects_servicer_test.py
@@ -0,0 +1,245 @@
+# Copyright 2020 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
+"""Tests for the hotlists servicer."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+import mock
+import logging
+
+from google.protobuf import timestamp_pb2
+from google.protobuf import empty_pb2
+
+from api import resource_name_converters as rnc
+from api.v3 import projects_servicer
+from api.v3 import converters
+from api.v3.api_proto import projects_pb2
+from api.v3.api_proto import project_objects_pb2
+from api.v3.api_proto import issue_objects_pb2
+from framework import exceptions
+from framework import monorailcontext
+from framework import permissions
+from testing import fake
+from services import service_manager
+
+from google.appengine.ext import testbed
+
+class ProjectsServicerTest(unittest.TestCase):
+
+  def setUp(self):
+    # memcache and datastore needed for generating page tokens.
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        features=fake.FeaturesService(),
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        user=fake.UserService(),
+        template=fake.TemplateService(),
+        usergroup=fake.UserGroupService())
+    self.projects_svcr = projects_servicer.ProjectsServicer(
+        self.services, make_rate_limiter=False)
+
+    self.user_1 = self.services.user.TestAddUser('user_111@example.com', 111)
+
+    self.project_1 = self.services.project.TestAddProject(
+        'proj', project_id=789)
+    self.template_1 = self.services.template.TestAddIssueTemplateDef(
+        123, 789, 'template_1_name', content='foo bar', summary='foo')
+    self.project_1_resource_name = 'projects/proj'
+    self.converter = None
+
+  def CallWrapped(self, wrapped_handler, mc, *args, **kwargs):
+    self.converter = converters.Converter(mc, self.services)
+    self.projects_svcr.converter = self.converter
+    return wrapped_handler.wrapped(self.projects_svcr, mc, *args, **kwargs)
+
+  def testListIssueTemplates(self):
+    request = projects_pb2.ListIssueTemplatesRequest(
+        parent=self.project_1_resource_name)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    response = self.CallWrapped(
+        self.projects_svcr.ListIssueTemplates, mc, request)
+
+    expected_issue = issue_objects_pb2.Issue(
+        summary=self.template_1.summary,
+        state=issue_objects_pb2.IssueContentState.Value('ACTIVE'),
+        status=issue_objects_pb2.Issue.StatusValue(
+            status=self.template_1.status,
+            derivation=issue_objects_pb2.Derivation.Value('EXPLICIT')))
+    expected_template = project_objects_pb2.IssueTemplate(
+        name='projects/{}/templates/{}'.format(
+            self.project_1.project_name, self.template_1.template_id),
+        display_name=self.template_1.name,
+        issue=expected_issue,
+        summary_must_be_edited=False,
+        template_privacy=project_objects_pb2.IssueTemplate.TemplatePrivacy
+        .Value('PUBLIC'),
+        default_owner=project_objects_pb2.IssueTemplate.DefaultOwner.Value(
+            'DEFAULT_OWNER_UNSPECIFIED'),
+        component_required=False)
+
+    self.assertEqual(
+        response,
+        projects_pb2.ListIssueTemplatesResponse(templates=[expected_template]))
+
+  @mock.patch('api.v3.api_constants.MAX_COMPONENTS_PER_PAGE', 3)
+  def testListComponentDefs(self):
+    project = self.services.project.TestAddProject(
+        'greece', project_id=987, owner_ids=[self.user_1.user_id])
+    config = fake.MakeTestConfig(project.project_id, [], [])
+    cd_1 = fake.MakeTestComponentDef(project.project_id, 1, path='Circe')
+    cd_2 = fake.MakeTestComponentDef(project.project_id, 2, path='Achilles')
+    cd_3 = fake.MakeTestComponentDef(project.project_id, 3, path='Patroclus')
+    cd_4 = fake.MakeTestComponentDef(project.project_id, 3, path='Galatea')
+    config.component_defs = [cd_1, cd_2, cd_3, cd_4]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+
+    request = projects_pb2.ListComponentDefsRequest(parent='projects/greece')
+    response_1 = self.CallWrapped(
+        self.projects_svcr.ListComponentDefs, mc, request)
+    expected_cds_1 = self.converter.ConvertComponentDefs(
+        [cd_1, cd_2, cd_3], project.project_id)
+    self.assertEqual(list(response_1.component_defs), expected_cds_1)
+
+    request = projects_pb2.ListComponentDefsRequest(
+        parent='projects/greece', page_token=response_1.next_page_token)
+    response_2 = self.CallWrapped(
+        self.projects_svcr.ListComponentDefs, mc, request)
+    expected_cds_2 = self.converter.ConvertComponentDefs(
+        [cd_4], project.project_id)
+    self.assertEqual(list(response_2.component_defs), expected_cds_2)
+
+  @mock.patch('api.v3.api_constants.MAX_COMPONENTS_PER_PAGE', 2)
+  def testListComponentDefs_PaginateAndMaxSizeCap(self):
+    project = self.services.project.TestAddProject(
+        'greece', project_id=987, owner_ids=[self.user_1.user_id])
+    config = fake.MakeTestConfig(project.project_id, [], [])
+    cd_1 = fake.MakeTestComponentDef(project.project_id, 1, path='Circe')
+    cd_2 = fake.MakeTestComponentDef(project.project_id, 2, path='Achilles')
+    cd_3 = fake.MakeTestComponentDef(project.project_id, 3, path='Patroclus')
+    cd_4 = fake.MakeTestComponentDef(project.project_id, 4, path='Galatea')
+    cd_5 = fake.MakeTestComponentDef(project.project_id, 5, path='Briseis')
+    config.component_defs = [cd_1, cd_2, cd_3, cd_4, cd_5]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+
+    request = projects_pb2.ListComponentDefsRequest(
+        parent='projects/greece', page_size=3)
+    response_1 = self.CallWrapped(
+        self.projects_svcr.ListComponentDefs, mc, request)
+    expected_cds_1 = self.converter.ConvertComponentDefs(
+        [cd_1, cd_2], project.project_id)
+    self.assertEqual(list(response_1.component_defs), expected_cds_1)
+
+    request = projects_pb2.ListComponentDefsRequest(
+        parent='projects/greece', page_size=3,
+        page_token=response_1.next_page_token)
+    response_2 = self.CallWrapped(
+        self.projects_svcr.ListComponentDefs, mc, request)
+    expected_cds_2 = self.converter.ConvertComponentDefs(
+        [cd_3, cd_4], project.project_id)
+    self.assertEqual(list(response_2.component_defs), expected_cds_2)
+
+    request = projects_pb2.ListComponentDefsRequest(
+        parent='projects/greece', page_size=3,
+        page_token=response_2.next_page_token)
+    response_3 = self.CallWrapped(
+        self.projects_svcr.ListComponentDefs, mc, request)
+    expected_cds_3 = self.converter.ConvertComponentDefs(
+        [cd_5], project.project_id)
+    self.assertEqual(response_3, projects_pb2.ListComponentDefsResponse(
+        component_defs=expected_cds_3))
+
+  @mock.patch('time.time')
+  def testCreateComponentDef(self, mockTime):
+    now = 123
+    mockTime.return_value = now
+
+    user_1 = self.services.user.TestAddUser('achilles@test.com', 981)
+    self.services.user.TestAddUser('patroclus@test.com', 982)
+    self.services.user.TestAddUser('circe@test.com', 983)
+
+    project = self.services.project.TestAddProject(
+        'chicken', project_id=987, owner_ids=[user_1.user_id])
+    config = fake.MakeTestConfig(project.project_id, [], [])
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    expected = project_objects_pb2.ComponentDef(
+        value='circe',
+        docstring='You threw me to the crows',
+        admins=['users/983'],
+        ccs=['users/981', 'users/982'],
+        labels=['more-soup', 'beach-day'],
+    )
+    request = projects_pb2.CreateComponentDefRequest(
+        parent='projects/chicken', component_def=expected)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=user_1.email)
+    response = self.CallWrapped(
+        self.projects_svcr.CreateComponentDef, mc, request)
+
+    self.assertEqual(1, len(config.component_defs))
+    expected.name = 'projects/chicken/componentDefs/%d' % config.component_defs[
+        0].component_id
+    expected.state = project_objects_pb2.ComponentDef.ComponentDefState.Value(
+        'ACTIVE')
+    expected.creator = 'users/981'
+    expected.create_time.FromSeconds(now)
+    expected.modify_time.FromSeconds(0)
+    self.assertEqual(response, expected)
+
+  def testDeleteComponentDef(self):
+    user_1 = self.services.user.TestAddUser('achilles@test.com', 981)
+    project = self.services.project.TestAddProject(
+        'chicken', project_id=987, owner_ids=[user_1.user_id])
+    config = fake.MakeTestConfig(project.project_id, [], [])
+    component_def = fake.MakeTestComponentDef(
+        project.project_id, 1, path='Chickens>Dickens')
+    config.component_defs = [component_def]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    request = projects_pb2.DeleteComponentDefRequest(
+        name='projects/chicken/componentDefs/1')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=user_1.email)
+    actual = self.CallWrapped(
+        self.projects_svcr.DeleteComponentDef, mc, request)
+    self.assertEqual(actual, empty_pb2.Empty())
+
+    self.assertEqual(config.component_defs, [])
+
+  @mock.patch('project.project_helpers.GetThumbnailUrl')
+  def testListProjects(self, mock_GetThumbnailUrl):
+    mock_GetThumbnailUrl.return_value = 'xyz'
+
+    request = projects_pb2.ListProjectsRequest()
+
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    response = self.CallWrapped(self.projects_svcr.ListProjects, mc, request)
+
+    expected_project = project_objects_pb2.Project(
+        name=self.project_1_resource_name,
+        display_name=self.project_1.project_name,
+        summary=self.project_1.summary,
+        thumbnail_url='xyz')
+
+    self.assertEqual(
+        response,
+        projects_pb2.ListProjectsResponse(projects=[expected_project]))
diff --git a/api/v3/test/users_servicer_test.py b/api/v3/test/users_servicer_test.py
new file mode 100644
index 0000000..8982ec9
--- /dev/null
+++ b/api/v3/test/users_servicer_test.py
@@ -0,0 +1,136 @@
+# Copyright 2020 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.
+"""Tests for the users servicer."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+import mock
+
+from google.protobuf import empty_pb2
+
+from api import resource_name_converters as rnc
+from api.v3 import users_servicer
+from api.v3 import converters
+from api.v3.api_proto import users_pb2
+from api.v3.api_proto import user_objects_pb2
+from framework import exceptions
+from framework import monorailcontext
+from framework import permissions
+from testing import fake
+from testing import testing_helpers
+from services import features_svc
+from services import user_svc
+from services import service_manager
+
+
+class UsersServicerTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService(),
+        project_star=fake.ProjectStarService())
+    self.users_svcr = users_servicer.UsersServicer(
+        self.services, make_rate_limiter=False)
+
+    self.user_1 = self.services.user.TestAddUser('user_111@example.com', 111)
+    self.user_2 = self.services.user.TestAddUser('user_222@example.com', 222)
+    self.user_3 = self.services.user.TestAddUser('user_333@example.com', 333)
+
+    self.project_1 = self.services.project.TestAddProject(
+        'proj', project_id=789)
+
+    self.converter = None
+
+  def CallWrapped(self, wrapped_handler, mc, *args, **kwargs):
+    self.converter = converters.Converter(mc, self.services)
+    self.users_svcr.converter = self.converter
+    return wrapped_handler.wrapped(self.users_svcr, mc, *args, **kwargs)
+
+  def testGetUser(self):
+    request = users_pb2.GetUserRequest(name='users/222')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    response = self.CallWrapped(self.users_svcr.GetUser, mc, request)
+    expected_response = user_objects_pb2.User(
+        name='users/222',
+        display_name=testing_helpers.ObscuredEmail(self.user_2.email),
+        email=testing_helpers.ObscuredEmail(self.user_2.email),
+        availability_message='User never visited')
+    self.assertEqual(response, expected_response)
+
+  def testBatchGetUsers(self):
+    request = users_pb2.BatchGetUsersRequest(
+        names=['users/222', 'users/333'])
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    response = self.CallWrapped(self.users_svcr.BatchGetUsers, mc, request)
+    expected_users = [
+        user_objects_pb2.User(
+            name='users/222',
+            display_name=testing_helpers.ObscuredEmail(self.user_2.email),
+            email=testing_helpers.ObscuredEmail(self.user_2.email),
+            availability_message='User never visited'),
+        user_objects_pb2.User(
+            name='users/333',
+            display_name=testing_helpers.ObscuredEmail(self.user_3.email),
+            email=testing_helpers.ObscuredEmail(self.user_3.email),
+            availability_message='User never visited')
+    ]
+    self.assertEqual(
+        response, users_pb2.BatchGetUsersResponse(users=expected_users))
+
+  @mock.patch('api.v3.api_constants.MAX_BATCH_USERS', 2)
+  def testBatchGetUsers_TooMany(self):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    request = users_pb2.BatchGetUsersRequest(
+        names=['users/222', 'users/333', 'users/444'])
+    with self.assertRaises(exceptions.InputException):
+      self.CallWrapped(self.users_svcr.BatchGetUsers, mc, request)
+
+  def testStarProject(self):
+    request = users_pb2.StarProjectRequest(project='projects/proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    response = self.CallWrapped(self.users_svcr.StarProject, mc, request)
+    expected_name = 'users/111/projectStars/proj'
+
+    self.assertEqual(response, user_objects_pb2.ProjectStar(name=expected_name))
+
+  def testUnStarProject(self):
+    request = users_pb2.UnStarProjectRequest(project='projects/proj')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+    response = self.CallWrapped(self.users_svcr.UnStarProject, mc, request)
+
+    self.assertEqual(response, empty_pb2.Empty())
+
+    is_starred = self.services.project_star.IsItemStarredBy(self.cnxn, 789, 111)
+    self.assertFalse(is_starred)
+
+  def testListProjectStars(self):
+    request = users_pb2.ListProjectStarsRequest(parent='users/111')
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester=self.user_1.email)
+    mc.LookupLoggedInUserPerms(None)
+
+    self.services.project_star.SetStar(
+        self.cnxn, self.project_1.project_id, self.user_1.user_id, True)
+
+    response = self.CallWrapped(self.users_svcr.ListProjectStars, mc, request)
+
+    expected_response = users_pb2.ListProjectStarsResponse(
+        project_stars=[
+            user_objects_pb2.ProjectStar(name='users/111/projectStars/proj')
+        ])
+    self.assertEqual(response, expected_response)
diff --git a/api/v3/users_servicer.py b/api/v3/users_servicer.py
new file mode 100644
index 0000000..cbf70c5
--- /dev/null
+++ b/api/v3/users_servicer.py
@@ -0,0 +1,127 @@
+# Copyright 2020 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.
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from google.protobuf import empty_pb2
+
+from api import resource_name_converters as rnc
+from api.v3 import monorail_servicer
+from api.v3 import api_constants
+from api.v3.api_proto import users_pb2
+from api.v3.api_proto import user_objects_pb2
+from api.v3.api_proto import users_prpc_pb2
+from businesslogic import work_env
+from framework import exceptions
+
+
+class UsersServicer(monorail_servicer.MonorailServicer):
+  """Handle API requests related to User objects.
+  Each API request is implemented with a method as defined in the
+  .proto file. Each method does any request-specific validation, uses work_env
+  to safely operate on business objects, and returns a response proto.
+  """
+
+  DESCRIPTION = users_prpc_pb2.UsersServiceDescription
+
+  @monorail_servicer.PRPCMethod
+  def GetUser(self, mc, request):
+    # type: (MonorailContext, GetUserRequest) ->
+    # GetUserResponse
+    """pRPC API method that implements GetUser.
+
+      Raises:
+        InputException if a name in request.name is invalid.
+        NoSuchUserException if a User is not found.
+    """
+    user_id = rnc.IngestUserName(mc.cnxn, request.name, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      user = we.GetUser(user_id)
+
+    return self.converter.ConvertUser(user)
+
+  @monorail_servicer.PRPCMethod
+  def BatchGetUsers(self, mc, request):
+    # type: (MonorailContext, BatchGetUsersRequest) ->
+    # BatchGetUsersResponse
+    """pRPC API method that implements BatchGetUsers.
+
+      Raises:
+        InputException if a name in request.names is invalid.
+        NoSuchUserException if a User is not found.
+    """
+    if len(request.names) > api_constants.MAX_BATCH_USERS:
+      raise exceptions.InputException(
+          'Requesting %d users when the allowed maximum is %d users.' %
+          (len(request.names), api_constants.MAX_BATCH_USERS))
+    user_ids = rnc.IngestUserNames(mc.cnxn, request.names, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      users = we.BatchGetUsers(user_ids)
+
+    api_users_by_id = self.converter.ConvertUsers(
+        [user.user_id for user in users])
+    api_users = [api_users_by_id[user_id] for user_id in user_ids]
+
+    return users_pb2.BatchGetUsersResponse(users=api_users)
+
+  @monorail_servicer.PRPCMethod
+  def StarProject(self, mc, request):
+    # type: (MonorailContext, StarProjectRequest) ->
+    # ProjectStar
+    """pRPC API method that implements StarProject.
+
+      Raises:
+        InputException if the project name in request.project is invalid.
+        NoSuchProjectException if no project exists with the given name.
+    """
+    project_id = rnc.IngestProjectName(mc.cnxn, request.project, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.StarProject(project_id, True)
+
+    user_id = mc.auth.user_id
+    star_name = rnc.ConvertProjectStarName(
+        mc.cnxn, user_id, project_id, self.services)
+
+    return user_objects_pb2.ProjectStar(name=star_name)
+
+  @monorail_servicer.PRPCMethod
+  def UnStarProject(self, mc, request):
+    # type: (MonorailContext, UnStarProjectRequest) ->
+    # Empty
+    """pRPC API method that implements UnStarProject.
+
+      Raises:
+        InputException if the project name in request.project is invalid.
+        NoSuchProjectException if no project exists with the given name.
+    """
+    project_id = rnc.IngestProjectName(mc.cnxn, request.project, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      we.StarProject(project_id, False)
+
+    return empty_pb2.Empty()
+
+  @monorail_servicer.PRPCMethod
+  def ListProjectStars(self, mc, request):
+    # type: (MonorailContext, ListProjectStarsRequest) ->
+    #   ListProjectStarsResponse
+    """pRPC API method that implements ListProjectStars.
+
+      Raises:
+        InputException: if the `page_token` or `parent` is invalid.
+        NoSuchUserException: if the User is not found.
+    """
+    user_id = rnc.IngestUserName(mc.cnxn, request.parent, self.services)
+
+    with work_env.WorkEnv(mc, self.services) as we:
+      projects = we.ListStarredProjects(user_id)
+
+    # TODO(crbug.com/monorail/7175): Add pagination logic.
+    return users_pb2.ListProjectStarsResponse(
+        project_stars=self.converter.ConvertProjectStars(user_id, projects))
diff --git a/api/v3_test_call.py b/api/v3_test_call.py
new file mode 100644
index 0000000..6d5b01a
--- /dev/null
+++ b/api/v3_test_call.py
@@ -0,0 +1,107 @@
+# Copyright 2020 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.
+
+#!/usr/bin/env python
+"""
+This script requires `google-auth` 1.15.0 or higher.
+To update this for monorail's third_party run the following from
+monorail/third_party/google:
+bash ./update.sh 1.15.0
+
+This is an example of how a script might make calls to monorail's v3  pRPC API.
+
+Usage example:
+```
+python v3_test_call.py \
+monorail.v3.Issues GetIssue '{"name": "projects/monorail/issues/404"}'
+```
+
+The email of your service account should be allow-listed with Monorail.
+"""
+
+import argparse
+import json
+import logging
+import os
+import sys
+import requests
+
+monorail_dir = os.path.dirname(os.path.abspath(__file__ + '/..'))
+third_party_path = os.path.join(monorail_dir, 'third_party')
+if third_party_path not in sys.path:
+  sys.path.insert(0, third_party_path)
+
+# Older versions of https://github.com/googleapis/google-auth-library-python
+# do not have the fetch_id_token() method called below.
+# v1.15.0 or later should be fine.
+from google.oauth2 import id_token
+from google.auth.transport import requests as google_requests
+
+# Download and save your service account credentials file in
+# api/service-account-key.json.
+# id_token.fetch_id_token looks inside GOOGLE_APPLICATION_CREDENTIALS to fetch
+# service account credentials.
+os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = 'service-account-key.json'
+
+# BASE_URL can point to any monorail-dev api service version.
+# However, you MAY get ssl cert errors when BASE_URL is not the
+# default below. If this happens you will have to test your version
+# by using the existing BASE_URL and migrating all traffic to your api
+# version via pantheon.
+BASE_URL = 'https://api-dot-monorail-dev.appspot.com/prpc'
+
+# TARGET_AUDIENCE should not change as long as BASE_URL is pointing to
+# some monorail-dev version. If BASE_URL is updated to point to
+# monorail-{staging|prod}, update TARGET_AUDIENCE accordingly.
+TARGET_AUDIENCE = 'https://monorail-dev.appspot.com'
+
+# XSSI_PREFIX found at the beginning of every prpc response.
+XSSI_PREFIX = ")]}'\n"
+
+import httplib2
+from oauth2client.client import GoogleCredentials
+
+
+def make_call(service, method, json_body):
+  # Fetch ID token
+  request = google_requests.Request()
+  token = id_token.fetch_id_token(request, TARGET_AUDIENCE)
+  # Note: ID tokens for service accounts can also be fetched with with the
+  # Cloud IAM API projects.serviceAccounts.generateIdToken
+  # generateIdToken only needs the service account email or ID and the
+  # target_audience.
+
+  # Call monorail's API.
+  headers = {
+      'Authorization': 'Bearer %s' % token,
+      'Content-Type': 'application/json',
+      'Accept': 'application/json',
+  }
+
+  url = "%s/%s/%s" % (BASE_URL, service, method)
+
+  body = json.loads(json_body)
+  resp = requests.post(url, data=json.dumps(body), headers=headers)
+  logging.info(resp)
+  logging.info(resp.text)
+  logging.info(resp.content)
+  logging.info(json.dumps(json.loads(resp.content[len(XSSI_PREFIX):])))
+
+  # Verify and decode ID token to take a look at what's inside.
+  # API users should not have to do this. This is just for learning about
+  # how ID tokens work.
+  request = google_requests.Request()
+  id_info = id_token.verify_oauth2_token(token, request)
+  logging.info('id_info %s' % id_info)
+
+
+if __name__ == '__main__':
+  parser = argparse.ArgumentParser(description='Process some integers.')
+  parser.add_argument('service', help='pRPC service name.')
+  parser.add_argument('method', help='pRPC method name.')
+  parser.add_argument('json_body', help='pRPC HTTP body in valid JSON.')
+  args = parser.parse_args()
+  log_level = logging.INFO
+  logging.basicConfig(format='%(levelname)s: %(message)s', level=log_level)
+  make_call(args.service, args.method, args.json_body)
diff --git a/app.yaml.m4 b/app.yaml.m4
new file mode 100644
index 0000000..222d27e
--- /dev/null
+++ b/app.yaml.m4
@@ -0,0 +1,121 @@
+# Copyright 2019 The Chromium Authors. All rights reserved.
+# Use of this source code is govered by a BSD-style
+# license that can be found in the LICENSE file or at
+# https://developers.google.com/open-source/licenses/bsd
+
+runtime: python27
+api_version: 1
+threadsafe: no
+
+default_expiration: "10d"
+
+define(`_VERSION', `syscmd(`echo $_VERSION')')
+
+ifdef(`PROD', `
+instance_class: F4
+automatic_scaling:
+  min_idle_instances: 25
+  max_pending_latency: 0.2s
+')
+
+ifdef(`STAGING', `
+instance_class: F4
+automatic_scaling:
+  min_idle_instances: 1
+  max_pending_latency: 0.2s
+')
+
+ifdef(`DEV', `
+instance_class: F4
+automatic_scaling:
+  min_idle_instances: 1
+')
+
+handlers:
+- url: /_ah/api/.*
+  script: monorailapp.endpoints
+
+- url: /robots.txt
+  static_files: static/robots.txt
+  upload: static/robots.txt
+  expiration: "10m"
+
+- url: /database-maintenance
+  static_files: static/database-maintenance.html
+  upload: static/database-maintenance.html
+
+- url: /static/dist
+  static_dir: static/dist
+  mime_type: application/javascript
+  secure: always
+  http_headers:
+    Access-Control-Allow-Origin: '*'
+
+- url: /static/js
+  static_dir: static/js
+  mime_type: application/javascript
+  secure: always
+  http_headers:
+    Access-Control-Allow-Origin: '*'
+
+- url: /static
+  static_dir: static
+
+- url: /_ah/mail/.+
+  script: monorailapp.app
+  login: admin
+
+- url: /_ah/warmup
+  script: monorailapp.app
+  login: admin
+
+- url: /.*
+  script: monorailapp.app
+  secure: always
+
+inbound_services:
+- mail
+- mail_bounce
+ifdef(`PROD', `
+- warmup
+')
+ifdef(`STAGING', `
+- warmup
+')
+
+libraries:
+- name: endpoints
+  version: 1.0
+- name: grpcio
+  version: 1.0.0
+- name: MySQLdb
+  version: "latest"
+- name: ssl # needed for google.auth.transport and GAE_USE_SOCKETS_HTTPLIB
+  version: "2.7.11"
+
+includes:
+- gae_ts_mon
+
+env_variables:
+  VERSION_ID: '_VERSION'
+  GAE_USE_SOCKETS_HTTPLIB : ''
+
+vpc_access_connector:
+ifdef(`DEV',`
+  name: "projects/monorail-dev/locations/us-central1/connectors/redis-connector"
+')
+ifdef(`STAGING',`
+  name: "projects/monorail-staging/locations/us-central1/connectors/redis-connector"
+')
+ifdef(`PROD', `
+  name: "projects/monorail-prod/locations/us-central1/connectors/redis-connector"
+')
+
+skip_files:
+- ^(.*/)?#.*#$
+- ^(.*/)?.*~$
+- ^(.*/)?.*\.py[co]$
+- ^(.*/)?.*/RCS/.*$
+- ^(.*/)?\..*$
+- node_modules/
+- venv/
diff --git a/appengine_config.py b/appengine_config.py
new file mode 100644
index 0000000..d21f2f6
--- /dev/null
+++ b/appengine_config.py
@@ -0,0 +1,41 @@
+# 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
+
+"""Configuration."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import os
+import sys
+
+# Enable third-party imports
+from google.appengine.ext import vendor
+vendor.add(os.path.join(os.path.dirname(__file__), 'third_party'))
+
+# Set path to your libraries folder.
+lib_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'lib')
+
+# Add libraries installed in the path folder.
+vendor.add(lib_path)
+# Add libraries to pkg_resources working set to find the distribution.
+import pkg_resources
+pkg_resources.working_set.add_entry(lib_path)
+
+import six
+reload(six)
+
+import httplib2
+import oauth2client
+
+# Only need this for local development. gae_ts_mon.__init__.py inserting
+# protobuf_dir to front of sys.path seems to cause this problem.
+# See go/monorail-import-mystery for more context.
+import settings
+if settings.local_mode:
+  from google.rpc import status_pb2
+
+from components import utils
+utils.fix_protobuf_package()
diff --git a/businesslogic/__init__.py b/businesslogic/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/businesslogic/__init__.py
diff --git a/businesslogic/test/__init__.py b/businesslogic/test/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/businesslogic/test/__init__.py
diff --git a/businesslogic/test/work_env_test.py b/businesslogic/test/work_env_test.py
new file mode 100644
index 0000000..63ac60f
--- /dev/null
+++ b/businesslogic/test/work_env_test.py
@@ -0,0 +1,7381 @@
+# Copyright 2017 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
+
+"""Tests for the WorkEnv class."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import copy
+import logging
+import sys
+import unittest
+import mock
+
+from google.appengine.api import memcache
+from google.appengine.ext import testbed
+
+import settings
+from businesslogic import work_env
+from features import filterrules_helpers
+from framework import authdata
+from framework import exceptions
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import permissions
+from framework import sorting
+from features import send_notifications
+from proto import features_pb2
+from proto import project_pb2
+from proto import tracker_pb2
+from proto import user_pb2
+from services import config_svc
+from services import features_svc
+from services import issue_svc
+from services import project_svc
+from services import user_svc
+from services import usergroup_svc
+from services import service_manager
+from services import spam_svc
+from services import star_svc
+from services import template_svc
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+def _Issue(project_id, local_id):
+  # TODO(crbug.com/monorail/8124): Many parts of monorail's codebase
+  # assumes issue.owner_id could never be None and that issues without
+  # owners have owner_id = 0.
+  issue = tracker_pb2.Issue(owner_id=0)
+  issue.project_name = 'proj-%d' % project_id
+  issue.project_id = project_id
+  issue.local_id = local_id
+  issue.issue_id = project_id*100 + local_id
+  return issue
+
+
+class WorkEnvTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake connection'
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        cache_manager=fake.CacheManager(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        project=fake.ProjectService(),
+        issue_star=fake.IssueStarService(),
+        project_star=fake.ProjectStarService(),
+        user_star=fake.UserStarService(),
+        hotlist_star=fake.HotlistStarService(),
+        features=fake.FeaturesService(),
+        usergroup=fake.UserGroupService(),
+        template=mock.Mock(spec=template_svc.TemplateService),
+        spam=fake.SpamService())
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=789, committer_ids=[111])
+    self.component_id_1 = self.services.config.CreateComponentDef(
+        self.cnxn, self.project.project_id, 'Component', 'Docstring', False, [],
+        [], 0, 111, [])
+    self.component_id_2 = self.services.config.CreateComponentDef(
+        self.cnxn, self.project.project_id, 'Component>Test', 'Docstring',
+        False, [], [], 0, 111, [])
+
+    config = fake.MakeTestConfig(self.project.project_id, [], [])
+    config.well_known_statuses = [
+        tracker_pb2.StatusDef(status='Fixed', means_open=False)
+    ]
+    self.services.config.StoreConfig(self.cnxn, config)
+    self.admin_user = self.services.user.TestAddUser(
+        'admin@example.com', 444)
+    self.admin_user.is_site_admin = True
+    self.user_1 = self.services.user.TestAddUser('user_111@example.com', 111)
+    self.user_2 = self.services.user.TestAddUser('user_222@example.com', 222)
+    self.user_3 = self.services.user.TestAddUser('user_333@example.com', 333)
+    self.hotlist = self.services.features.TestAddHotlist(
+        'myhotlist', summary='old sum', owner_ids=[self.user_1.user_id],
+        editor_ids=[self.user_2.user_id], description='old desc',
+        is_private=True)
+    # reserved for testing that a hotlist does not exist
+    self.dne_hotlist_id = 1234
+    self.mr = testing_helpers.MakeMonorailRequest(project=self.project)
+    self.mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    self.field_def_1_name = 'test_field_1'
+    self.field_def_1 = fake.MakeTestFieldDef(
+        101, self.project.project_id, tracker_pb2.FieldTypes.INT_TYPE,
+        field_name=self.field_def_1_name, max_value=10)
+    self.services.config.TestAddFieldDef(self.field_def_1)
+    self.PAST_TIME = 12345
+    self.dne_project_id = 999
+    sorting.InitializeArtValues(self.services)
+
+    self.work_env = work_env.WorkEnv(
+      self.mr, self.services, 'Testing phase')
+
+  def SignIn(self, user_id=111):
+    self.mr.auth = authdata.AuthData.FromUserID(
+        self.cnxn, user_id, self.services)
+    self.mr.perms = permissions.GetPermissions(
+        self.mr.auth.user_pb, self.mr.auth.effective_ids, self.project)
+
+  def testAssertUserCanModifyIssues_Empty(self):
+    with self.work_env as we:
+      we._AssertUserCanModifyIssues([], True)
+
+  def testAssertUserCanModifyIssues_RestrictedFields(self):
+    restricted_int_fd = fake.MakeTestFieldDef(
+        1, 789, tracker_pb2.FieldTypes.INT_TYPE,
+        field_name='int_field', is_restricted_field=True)
+    self.services.config.TestAddFieldDef(restricted_int_fd)
+
+    restricted_enum_fd = fake.MakeTestFieldDef(
+        2, 789, tracker_pb2.FieldTypes.ENUM_TYPE,
+        field_name='enum_field',
+        is_restricted_field=True)
+    self.services.config.TestAddFieldDef(restricted_enum_fd)
+
+    issue = fake.MakeTestIssue(
+        789, 1, 'summary', 'Available', self.admin_user.user_id)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta(
+        summary='changing summary',
+        fields_clear=[restricted_int_fd.field_id],
+        labels_remove=['enum_field-test'])
+    issue_delta_pairs = [(issue, delta)]
+
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.assertRaisesRegexp(permissions.PermissionException,
+                                 r'.+int_field\n.+enum_field'):
+      with self.work_env as we:
+        we._AssertUserCanModifyIssues(issue_delta_pairs, True)
+
+    # Add user_1 as an editor
+    restricted_int_fd.editor_ids = [self.user_1.user_id]
+    restricted_enum_fd.editor_ids = [self.user_1.user_id]
+    with self.work_env as we:
+      we._AssertUserCanModifyIssues(issue_delta_pairs, True)
+
+  def testAssertUserCanModifyIssues_HasEditPerms(self):
+    issue = fake.MakeTestIssue(
+        789, 1, 'summary', 'Available', self.admin_user.user_id)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta(summary='changing summary', cc_ids_add=[111])
+    issue_delta_pairs = [(issue, delta)]
+
+    # Committer can edit issues.
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.work_env as we:
+      we._AssertUserCanModifyIssues(
+          issue_delta_pairs, True, comment_content='ping')
+
+  def testAssertUserCanModifyIssues_MergedInto(self):
+    issue = fake.MakeTestIssue(
+        789, 1, 'summary', 'Available', self.admin_user.user_id)
+    self.services.issue.TestAddIssue(issue)
+
+    restricted_issue = fake.MakeTestIssue(
+        789, 2, 'summary', 'Aavailable', self.admin_user.user_id,
+        labels=['Restrict-View-Chicken'])
+    self.services.issue.TestAddIssue(restricted_issue)
+
+    issue_delta_pairs = [
+        (issue, tracker_pb2.IssueDelta(merged_into=restricted_issue.issue_id))
+    ]
+
+    # Committer cannot merge into issue they cannot edit.
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we._AssertUserCanModifyIssues(
+            issue_delta_pairs, True, comment_content='ping')
+
+  def testAssertUserCanModifyIssues_HasFineGrainedPerms(self):
+    self.services.project.TestAddProject(
+        'projWithExtraPerms',
+        project_id=788,
+        contrib_ids=[self.user_1.user_id],
+        extra_perms=[
+            project_pb2.Project.ExtraPerms(
+                member_id=self.user_1.user_id,
+                perms=[
+                    permissions.ADD_ISSUE_COMMENT,
+                    permissions.EDIT_ISSUE_SUMMARY, permissions.EDIT_ISSUE_OWNER
+                ])
+        ])
+    error_messages_re = []
+
+    # user_1 can update issue summaries in the project.
+    issue_1 = fake.MakeTestIssue(
+        788, 1, 'summary', 'Available', self.admin_user.user_id,
+        project_name='farm')
+    self.services.issue.TestAddIssue(issue_1)
+    issue_delta_pairs = [(issue_1, tracker_pb2.IssueDelta(summary='bok bok'))]
+
+    # user_1 does not have EDIT_ISSUE_CC perms in project.
+    error_messages_re.append(r'.+changes to issue farm:2')
+    issue_2 = fake.MakeTestIssue(
+        788, 2, 'summary', 'Fixed', self.admin_user.user_id,
+        project_name='farm')
+    self.services.issue.TestAddIssue(issue_2)
+    issue_delta_pairs.append(
+        (issue_2, tracker_pb2.IssueDelta(cc_ids_add=[777])))
+
+    # user_1 does not have EDIT_ISSUE_STATUS perms in project.
+    error_messages_re.append(r'.+changes to issue farm:3')
+    issue_3 = fake.MakeTestIssue(
+        788, 3, 'summary', 'Fixed', self.admin_user.user_id,
+        project_name='farm')
+    self.services.issue.TestAddIssue(issue_3)
+    issue_delta_pairs.append(
+        (issue_3, tracker_pb2.IssueDelta(status='eggsHatching')))
+
+    # user_1 can update issue owners in the project.
+    issue_4 = fake.MakeTestIssue(
+        788, 4, 'summary', 'Fixed', self.admin_user.user_id,
+        project_name='farm')
+    self.services.issue.TestAddIssue(issue_3)
+    issue_delta_pairs.append(
+        (issue_4, tracker_pb2.IssueDelta(owner_id=self.user_2.user_id)))
+
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.assertRaisesRegexp(permissions.PermissionException,
+                                 '\n'.join(error_messages_re)):
+      with self.work_env as we:
+        we._AssertUserCanModifyIssues(
+            issue_delta_pairs, False, comment_content='ping')
+
+  def testAssertUserCanModifyIssues_IssueGrantedPerms(self):
+    """We properly take issue granted permissions into account."""
+    granting_fd = tracker_pb2.FieldDef(
+        field_name='grants_editissue',
+        field_id=1,
+        field_type=tracker_pb2.FieldTypes.USER_TYPE,
+        grants_perm='editissue')
+    config = fake.MakeTestConfig(789, [], [])
+    config.field_defs = [granting_fd]
+    self.services.config.StoreConfig('cnxn', config)
+
+    # we add user_2 to "grants_editissue" field which should grant them
+    # "EditIssue" in this issue.
+    issue = fake.MakeTestIssue(
+        789, 1, 'summary', 'Available', self.admin_user.user_id,
+        field_values=[
+            tracker_pb2.FieldValue(field_id=1, user_id=self.user_2.user_id)
+        ])
+    self.services.issue.TestAddIssue(issue)
+    issue_delta_pairs = [
+        (issue, tracker_pb2.IssueDelta(summary='changing summary'))
+    ]
+
+    self.SignIn(user_id=self.user_2.user_id)
+    with self.work_env as we:
+      we._AssertUserCanModifyIssues(issue_delta_pairs, False)
+
+    self.SignIn(user_id=self.user_3.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we._AssertUserCanModifyIssues(issue_delta_pairs, False)
+
+
+  # FUTURE: GetSiteReadOnlyState()
+  # FUTURE: SetSiteReadOnlyState()
+  # FUTURE: GetSiteBannerMessage()
+  # FUTURE: SetSiteBannerMessage()
+
+  def testCreateProject_Normal(self):
+    """We can create a project."""
+    self.SignIn(user_id=self.admin_user.user_id)
+    with self.work_env as we:
+      project_id = we.CreateProject(
+          'newproj', [111], [222], [333], 'summary', 'desc')
+      actual = we.GetProject(project_id)
+
+    self.assertEqual('summary', actual.summary)
+    self.assertEqual('desc', actual.description)
+    self.services.template.CreateDefaultProjectTemplates\
+        .assert_called_once_with(self.mr.cnxn, project_id)
+
+  def testCreateProject_AlreadyExists(self):
+    """We can create a project."""
+    self.SignIn(user_id=self.admin_user.user_id)
+    # Project 'proj' is created in setUp().
+    with self.assertRaises(exceptions.ProjectAlreadyExists):
+      with self.work_env as we:
+        we.CreateProject('proj', [111], [222], [333], 'summary', 'desc')
+
+    self.assertFalse(
+        self.services.template.CreateDefaultProjectTemplates.called)
+
+  def testCreateProject_NotAllowed(self):
+    """A user without permissions cannon create a project."""
+    self.SignIn()
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.CreateProject('proj', [111], [222], [333], 'summary', 'desc')
+
+    self.assertFalse(
+        self.services.template.CreateDefaultProjectTemplates.called)
+
+  def testCheckProjectName_OK(self):
+    """We can check a project name."""
+    self.SignIn(user_id=self.admin_user.user_id)
+    with self.work_env as we:
+      self.assertIsNone(we.CheckProjectName('foo'))
+
+  def testCheckProjectName_InvalidProjectName(self):
+    """We can check an invalid project name."""
+    self.SignIn(user_id=self.admin_user.user_id)
+    with self.work_env as we:
+      self.assertIsNotNone(we.CheckProjectName('Foo'))
+
+  def testCheckProjectName_AlreadyExists(self):
+    """There is already a project with that name."""
+    self.SignIn(user_id=self.admin_user.user_id)
+    with self.work_env as we:
+      self.assertIsNotNone(we.CheckProjectName('proj'))
+
+  def testCheckProjectName_NotAllowed(self):
+    """Users that can't create a project shouldn't get any information."""
+    self.SignIn()
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.CheckProjectName('Foo')
+
+  def testCheckComponentName_OK(self):
+    self.SignIn()
+    with self.work_env as we:
+      self.assertIsNone(we.CheckComponentName(
+          self.project.project_id, None, 'Component'))
+
+  def testCheckComponentName_ParentComponentOK(self):
+    self.services.config.CreateComponentDef(
+        self.cnxn, self.project.project_id, 'Component', 'Docstring',
+        False, [], [], 0, 111, [])
+    self.SignIn()
+    with self.work_env as we:
+      self.assertIsNone(we.CheckComponentName(
+          self.project.project_id, 'Component', 'SubComponent'))
+
+  def testCheckComponentName_InvalidComponentName(self):
+    self.SignIn()
+    with self.work_env as we:
+      self.assertIsNotNone(we.CheckComponentName(
+          self.project.project_id, None, 'Component>Foo'))
+
+  def testCheckComponentName_ComponentAlreadyExists(self):
+    self.services.config.CreateComponentDef(
+        self.cnxn, self.project.project_id, 'Component', 'Docstring',
+        False, [], [], 0, 111, [])
+    self.SignIn()
+    with self.work_env as we:
+      self.assertIsNotNone(we.CheckComponentName(
+          self.project.project_id, None, 'Component'))
+
+  def testCheckComponentName_NotAllowedToViewProject(self):
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    self.SignIn(333)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.CheckComponentName(self.project.project_id, None, 'Component')
+
+  def testCheckComponentName_ParentComponentDoesntExist(self):
+    self.SignIn()
+    with self.assertRaises(exceptions.NoSuchComponentException):
+      with self.work_env as we:
+        we.CheckComponentName(
+            self.project.project_id, 'Component', 'SubComponent')
+
+  def testCheckFieldName_OK(self):
+    self.SignIn()
+    with self.work_env as we:
+      self.assertIsNone(we.CheckFieldName(
+          self.project.project_id, 'Field'))
+
+  def testCheckFieldName_InvalidFieldName(self):
+    self.SignIn()
+    with self.work_env as we:
+      self.assertIsNotNone(we.CheckFieldName(
+          self.project.project_id, '**Field**'))
+
+  def testCheckFieldName_FieldAlreadyExists(self):
+    fd = fake.MakeTestFieldDef(
+        1, self.project.project_id, tracker_pb2.FieldTypes.STR_TYPE,
+        field_name='Field')
+    self.services.config.TestAddFieldDef(fd)
+    self.SignIn()
+    with self.work_env as we:
+      self.assertIsNotNone(we.CheckFieldName(
+          self.project.project_id, 'Field'))
+
+  def testCheckFieldName_FieldIsPrefixOfAnother(self):
+    fd = fake.MakeTestFieldDef(
+        1, self.project.project_id, tracker_pb2.FieldTypes.STR_TYPE,
+        field_name='Field-Foo')
+    self.services.config.TestAddFieldDef(fd)
+    self.SignIn()
+    with self.work_env as we:
+      self.assertIsNotNone(we.CheckFieldName(
+          self.project.project_id, 'Field'))
+
+  def testCheckFieldName_AnotherFieldIsPrefix(self):
+    fd = fake.MakeTestFieldDef(
+        1, self.project.project_id, tracker_pb2.FieldTypes.STR_TYPE,
+        field_name='Field')
+    self.services.config.TestAddFieldDef(fd)
+    self.SignIn()
+    with self.work_env as we:
+      self.assertIsNotNone(we.CheckFieldName(
+          self.project.project_id, 'Field-Foo'))
+
+  def testCheckFieldName_ReservedPrefix(self):
+    self.SignIn()
+    with self.work_env as we:
+      self.assertIsNotNone(we.CheckFieldName(
+          self.project.project_id, 'Summary'))
+
+  def testCheckFieldName_ReservedSuffix(self):
+    self.SignIn()
+    with self.work_env as we:
+      self.assertIsNotNone(we.CheckFieldName(
+          self.project.project_id, 'Chicken-ApproveR'))
+
+  def testCheckFieldName_NotAllowedToViewProject(self):
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    self.SignIn(user_id=333)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.CheckFieldName(self.project.project_id, 'Field')
+
+  def testListProjects(self):
+    """We can get the project IDs of projects visible to the current user."""
+    # Project 789 is created in setUp()
+    self.services.project.TestAddProject(
+        'proj2', project_id=2, access=project_pb2.ProjectAccess.MEMBERS_ONLY)
+    self.services.project.TestAddProject('proj3', project_id=3)
+    with self.work_env as we:
+      actual = we.ListProjects()
+
+    self.assertEqual([3, 789], actual)
+
+  @mock.patch('settings.branded_domains',
+              {'proj3': 'branded.com', '*': 'bugs.chromium.org'})
+  def testListProjects_BrandedDomain_NotLive(self):
+    """Branded domains don't affect localhost and demo servers."""
+    # Project 789 is created in setUp()
+    self.services.project.TestAddProject(
+        'proj2', project_id=2, access=project_pb2.ProjectAccess.MEMBERS_ONLY)
+    self.services.project.TestAddProject('proj3', project_id=3)
+
+    with self.work_env as we:
+      actual = we.ListProjects(domain='localhost:8080')
+      self.assertEqual([3, 789], actual)
+
+      actual = we.ListProjects(domain='app-id.appspot.com')
+      self.assertEqual([3, 789], actual)
+
+  @mock.patch('settings.branded_domains',
+              {'proj3': 'branded.com', '*': 'bugs.chromium.org'})
+  def testListProjects_BrandedDomain_LiveSite(self):
+    """Project list only contains projects on the current branded domain."""
+    # Project 789 is created in setUp()
+    self.services.project.TestAddProject(
+        'proj2', project_id=2, access=project_pb2.ProjectAccess.MEMBERS_ONLY)
+    self.services.project.TestAddProject('proj3', project_id=3)
+
+    with self.work_env as we:
+      actual = we.ListProjects(domain='branded.com')
+      self.assertEqual([3], actual)
+
+      actual = we.ListProjects(domain='bugs.chromium.org')
+      self.assertEqual([789], actual)
+
+  def testGetProject_Normal(self):
+    """We can get an existing project by project_id."""
+    with self.work_env as we:
+      actual = we.GetProject(789)
+
+    self.assertEqual(self.project, actual)
+
+  def testGetProject_NoSuchProject(self):
+    """We reject attempts to get a non-existent project."""
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      with self.work_env as we:
+        _actual = we.GetProject(999)
+
+  def testGetProject_NotAllowed(self):
+    """We reject attempts to get a project we don't have permission to."""
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        _actual = we.GetProject(789)
+
+  def testGetProjectByName_Normal(self):
+    """We can get an existing project by project_name."""
+    with self.work_env as we:
+      actual = we.GetProjectByName('proj')
+
+    self.assertEqual(self.project, actual)
+
+  def testGetProjectByName_NoSuchProject(self):
+    """We reject attempts to get a non-existent project."""
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      with self.work_env as we:
+        _actual = we.GetProjectByName('huh-what')
+
+  def testGetProjectByName_NoPermission(self):
+    """We reject attempts to get a project we don't have permissions to."""
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        _actual = we.GetProjectByName('proj')
+
+  def AddUserProjects(self):
+    project_states = {
+        'live': project_pb2.ProjectState.LIVE,
+        'archived': project_pb2.ProjectState.ARCHIVED,
+        'deletable': project_pb2.ProjectState.DELETABLE}
+
+    projects = {}
+    for name, state in project_states.items():
+      projects['owner-'+name] = self.services.project.TestAddProject(
+          'owner-' + name, state=state, owner_ids=[222])
+      projects['committer-'+name] = self.services.project.TestAddProject(
+          'committer-' + name, state=state, committer_ids=[222])
+      projects['contributor-'+name] = self.services.project.TestAddProject(
+          'contributor-' + name, state=state)
+      projects['contributor-'+name].contributor_ids = [222]
+
+    projects['members-only'] = self.services.project.TestAddProject(
+        'members-only', owner_ids=[222])
+    projects['members-only'].access = (
+        project_pb2.ProjectAccess.MEMBERS_ONLY)
+
+    return projects
+
+  def testGatherProjectMembershipsForUser_OtherUser(self):
+    """We can get the projects in which a user has a role.
+      Member only projects are hidden."""
+    projects = self.AddUserProjects()
+
+    with self.work_env as we:
+      owner, committer, contrib = we.GatherProjectMembershipsForUser(222)
+
+    self.assertEqual([projects['owner-live'].project_id], owner)
+    self.assertEqual([projects['committer-live'].project_id], committer)
+    self.assertEqual([projects['contributor-live'].project_id], contrib)
+
+  def testGatherProjectMembershipsForUser_OwnUser(self):
+    """We can get the projects in which the logged in user has a role. """
+    projects = self.AddUserProjects()
+
+    self.SignIn(user_id=222)
+    with self.work_env as we:
+      owner, committer, contrib = we.GatherProjectMembershipsForUser(222)
+
+    self.assertEqual(
+        [
+            projects['members-only'].project_id,
+            projects['owner-live'].project_id
+        ], owner)
+    self.assertEqual([projects['committer-live'].project_id], committer)
+    self.assertEqual([projects['contributor-live'].project_id], contrib)
+
+  def testGatherProjectMembershipsForUser_Admin(self):
+    """Admins can see all project roles another user has. """
+    projects = self.AddUserProjects()
+
+    self.SignIn(user_id=444)
+    with self.work_env as we:
+      owner, committer, contrib = we.GatherProjectMembershipsForUser(222)
+
+    self.assertEqual(
+        [
+            projects['members-only'].project_id,
+            projects['owner-live'].project_id
+        ], owner)
+    self.assertEqual([projects['committer-live'].project_id], committer)
+    self.assertEqual([projects['contributor-live'].project_id], contrib)
+
+  def testGetUserRolesInAllProjects_OtherUsers(self):
+    """We can get the projects in which the user has a role."""
+    projects = self.AddUserProjects()
+
+    with self.work_env as we:
+      owner, member, contrib = we.GetUserRolesInAllProjects({222})
+
+    by_name = lambda project: project.project_name
+    self.assertEqual(
+        [projects['owner-live']],
+        sorted(list(owner.values()), key=by_name))
+    self.assertEqual(
+        [projects['committer-live']],
+        sorted(list(member.values()), key=by_name))
+    self.assertEqual(
+        [projects['contributor-live']],
+        sorted(list(contrib.values()), key=by_name))
+
+  def testGetUserRolesInAllProjects_OwnUser(self):
+    """We can get the projects in which the user has a role."""
+    projects = self.AddUserProjects()
+
+    self.SignIn(user_id=222)
+    with self.work_env as we:
+      owner, member, contrib = we.GetUserRolesInAllProjects({222})
+
+    by_name = lambda project: project.project_name
+    self.assertEqual(
+        [projects['members-only'], projects['owner-archived'],
+         projects['owner-live']],
+        sorted(list(owner.values()), key=by_name))
+    self.assertEqual(
+        [projects['committer-archived'], projects['committer-live']],
+        sorted(list(member.values()), key=by_name))
+    self.assertEqual(
+        [projects['contributor-archived'], projects['contributor-live']],
+        sorted(list(contrib.values()), key=by_name))
+
+  def testGetUserRolesInAllProjects_Admin(self):
+    """We can get the projects in which the user has a role."""
+    projects = self.AddUserProjects()
+
+    self.SignIn(user_id=444)
+    with self.work_env as we:
+      owner, member, contrib = we.GetUserRolesInAllProjects({222})
+
+    by_name = lambda project: project.project_name
+    self.assertEqual(
+        [projects['members-only'], projects['owner-archived'],
+         projects['owner-deletable'], projects['owner-live']],
+        sorted(list(owner.values()), key=by_name))
+    self.assertEqual(
+        [projects['committer-archived'], projects['committer-deletable'],
+         projects['committer-live']],
+        sorted(list(member.values()), key=by_name))
+    self.assertEqual(
+        [projects['contributor-archived'], projects['contributor-deletable'],
+         projects['contributor-live']],
+        sorted(list(contrib.values()), key=by_name))
+
+  def testGetUserProjects_OnlyLiveOfOtherUsers(self):
+    """Regular users should only see live projects of other users."""
+    projects = self.AddUserProjects()
+
+    self.SignIn()
+    with self.work_env as we:
+      owner, archived, member, contrib = we.GetUserProjects({222})
+
+    self.assertEqual([projects['owner-live']], owner)
+    self.assertEqual([], archived)
+    self.assertEqual([projects['committer-live']], member)
+    self.assertEqual([projects['contributor-live']], contrib)
+
+  def testGetUserProjects_AdminSeesAll(self):
+    """Admins should see all projects from other users."""
+    projects = self.AddUserProjects()
+
+    self.SignIn(user_id=444)
+    with self.work_env as we:
+      owner, archived, member, contrib = we.GetUserProjects({222})
+
+    self.assertEqual([projects['members-only'], projects['owner-live']], owner)
+    self.assertEqual([projects['owner-archived']], archived)
+    self.assertEqual([projects['committer-live']], member)
+    self.assertEqual([projects['contributor-live']], contrib)
+
+  def testGetUserProjects_UserSeesOwnProjects(self):
+    """Users should see all own projects."""
+    projects = self.AddUserProjects()
+
+    self.SignIn(user_id=222)
+    with self.work_env as we:
+      owner, archived, member, contrib = we.GetUserProjects({222})
+
+    self.assertEqual([projects['members-only'], projects['owner-live']], owner)
+    self.assertEqual([projects['owner-archived']], archived)
+    self.assertEqual([projects['committer-live']], member)
+    self.assertEqual([projects['contributor-live']], contrib)
+
+  def testUpdateProject_Normal(self):
+    """We can update an existing project."""
+    self.SignIn(user_id=self.admin_user.user_id)
+    with self.work_env as we:
+      we.UpdateProject(789, read_only_reason='test reason')
+      project = we.GetProject(789)
+
+    self.assertEqual('test reason', project.read_only_reason)
+
+  def testUpdateProject_NoSuchProject(self):
+    """Updating a nonexistent project raises an exception."""
+    self.SignIn(user_id=self.admin_user.user_id)
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      with self.work_env as we:
+        we.UpdateProject(999, summary='new summary')
+
+  def testDeleteProject_Normal(self):
+    """We can mark an existing project as deletable."""
+    self.SignIn(user_id=self.admin_user.user_id)
+    with self.work_env as we:
+      we.DeleteProject(789)
+
+    self.assertEqual(project_pb2.ProjectState.DELETABLE, self.project.state)
+
+  def testDeleteProject_NoSuchProject(self):
+    """Changing a nonexistent project raises an exception."""
+    self.SignIn(user_id=self.admin_user.user_id)
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      with self.work_env as we:
+        we.DeleteProject(999)
+
+  def testStarProject_Normal(self):
+    """We can star and unstar a project."""
+    self.SignIn()
+    with self.work_env as we:
+      self.assertFalse(we.IsProjectStarred(789))
+      we.StarProject(789, True)
+      self.assertTrue(we.IsProjectStarred(789))
+      we.StarProject(789, False)
+      self.assertFalse(we.IsProjectStarred(789))
+
+  def testStarProject_NoSuchProject(self):
+    """We can't star a nonexistent project."""
+    self.SignIn()
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      with self.work_env as we:
+        we.StarProject(999, True)
+
+  def testStarProject_Anon(self):
+    """Anon user can't star a project."""
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.StarProject(789, True)
+
+  def testIsProjectStarred_Normal(self):
+    """We can check if a project is starred."""
+    # Tested by method testStarProject_Normal().
+    pass
+
+  def testIsProjectStarred_NoProjectSpecified(self):
+    """A project ID must be specified."""
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException):
+        self.assertFalse(we.IsProjectStarred(None))
+
+  def testIsProjectStarred_NoSuchProject(self):
+    """We can't check for stars on a nonexistent project."""
+    self.SignIn()
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      with self.work_env as we:
+        we.IsProjectStarred(999)
+
+  def testGetProjectStarCount_Normal(self):
+    """We can count the stars of a project."""
+    self.SignIn()
+    with self.work_env as we:
+      self.assertEqual(0, we.GetProjectStarCount(789))
+      we.StarProject(789, True)
+      self.assertEqual(1, we.GetProjectStarCount(789))
+
+    self.SignIn(user_id=self.admin_user.user_id)
+    with self.work_env as we:
+      we.StarProject(789, True)
+      self.assertEqual(2, we.GetProjectStarCount(789))
+      we.StarProject(789, False)
+      self.assertEqual(1, we.GetProjectStarCount(789))
+
+  def testGetProjectStarCount_NoSuchProject(self):
+    """We can't count stars of a nonexistent project."""
+    self.SignIn()
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      with self.work_env as we:
+        we.GetProjectStarCount(999)
+
+  def testGetProjectStarCount_NoProjectSpecified(self):
+    """A project ID must be specified."""
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException):
+        self.assertFalse(we.GetProjectStarCount(None))
+
+  def testListStarredProjects_ViewingSelf(self):
+    """A user can view their own starred projects, if they still have access."""
+    project1 = self.services.project.TestAddProject('proj1', project_id=1)
+    project2 = self.services.project.TestAddProject('proj2', project_id=2)
+    with self.work_env as we:
+      self.SignIn()
+      we.StarProject(project1.project_id, True)
+      we.StarProject(project2.project_id, True)
+      self.assertItemsEqual(
+        [project1, project2], we.ListStarredProjects())
+      project2.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+      self.assertItemsEqual(
+        [project1], we.ListStarredProjects())
+
+  def testListStarredProjects_ViewingOther(self):
+    """A user can view their own starred projects, if they still have access."""
+    project1 = self.services.project.TestAddProject('proj1', project_id=1)
+    project2 = self.services.project.TestAddProject('proj2', project_id=2)
+    with self.work_env as we:
+      self.SignIn(user_id=222)
+      we.StarProject(project1.project_id, True)
+      we.StarProject(project2.project_id, True)
+      self.SignIn(user_id=111)
+      self.assertEqual([], we.ListStarredProjects())
+      self.assertItemsEqual(
+        [project1, project2], we.ListStarredProjects(viewed_user_id=222))
+      project2.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+      self.assertItemsEqual(
+        [project1], we.ListStarredProjects(viewed_user_id=222))
+
+  def testGetProjectConfig_Normal(self):
+    """We can get an existing config by project_id."""
+    config = fake.MakeTestConfig(789, ['LabelOne'], ['New'])
+    self.services.config.StoreConfig('cnxn', config)
+    with self.work_env as we:
+      actual = we.GetProjectConfig(789)
+
+    self.assertEqual(config, actual)
+
+  def testGetProjectConfig_NoSuchProject(self):
+    """We reject attempts to get a non-existent config."""
+    self.services.config.strict = True
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      with self.work_env as we:
+        _actual = we.GetProjectConfig(self.dne_project_id)
+
+  def testListProjectTemplates_IsMember(self):
+    private_tmpl = tracker_pb2.TemplateDef(name='Chicken', members_only=True)
+    public_tmpl = tracker_pb2.TemplateDef(name='Kale', members_only=False)
+    self.services.template.GetProjectTemplates.return_value = [
+        private_tmpl, public_tmpl]
+
+    self.SignIn()  # user 111 is a member of self.project
+
+    with self.work_env as we:
+      actual = we.ListProjectTemplates(self.project.project_id)
+
+    self.assertEqual(actual, [private_tmpl, public_tmpl])
+    self.services.template.GetProjectTemplates.assert_called_once_with(
+        self.mr.cnxn, self.project.project_id)
+
+  def testListProjectTemplates_IsNotMember(self):
+    private_tmpl = tracker_pb2.TemplateDef(name='Chicken', members_only=True)
+    public_tmpl = tracker_pb2.TemplateDef(name='Kale', members_only=False)
+    self.services.template.GetProjectTemplates.return_value = [
+        private_tmpl, public_tmpl]
+
+    with self.work_env as we:
+      actual = we.ListProjectTemplates(self.project.project_id)
+
+    self.assertEqual(actual, [public_tmpl])
+    self.services.template.GetProjectTemplates.assert_called_once_with(
+        self.mr.cnxn, self.project.project_id)
+
+  def testListComponentDefs(self):
+    project = self.services.project.TestAddProject(
+        'Greece', owner_ids=[self.user_1.user_id])
+    config = fake.MakeTestConfig(project.project_id, [], [])
+    cd_1 = fake.MakeTestComponentDef(project.project_id, 1, path='Circe')
+    cd_2 = fake.MakeTestComponentDef(project.project_id, 2, path='Achilles')
+    cd_3 = fake.MakeTestComponentDef(project.project_id, 3, path='Patroclus')
+    config.component_defs = [cd_1, cd_2, cd_3]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    self.SignIn(self.user_1.user_id)
+    with self.work_env as we:
+      actual = we.ListComponentDefs(project.project_id, 10, 1)
+    self.assertEqual(actual, work_env.ListResult([cd_2, cd_3], None))
+
+  def testListComponentDefs_NotFound(self):
+    self.SignIn(self.user_2.user_id)
+
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      with self.work_env as we:
+        we.ListComponentDefs(404, 10, 1)
+
+    project = self.services.project.TestAddProject(
+        'Greece',
+        owner_ids=[self.user_1.user_id],
+        access=project_pb2.ProjectAccess.MEMBERS_ONLY)
+    config = fake.MakeTestConfig(project.project_id, [], [])
+    cd_1 = fake.MakeTestComponentDef(project.project_id, 1, path='Circe')
+    config.component_defs = [cd_1]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      with self.work_env as we:
+        we.ListComponentDefs(project.project_id, 10, 1)
+
+  def testListComponentDefs_InvalidPaginate(self):
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.ListComponentDefs(404, -1, 10)
+
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.ListComponentDefs(404, 1, -10)
+
+  @mock.patch('time.time')
+  def testCreateComponentDef(self, fake_time):
+    now = 123
+    fake_time.return_value = now
+    project = self.services.project.TestAddProject(
+        'Music', owner_ids=[self.user_1.user_id])
+    admin = self.services.user.TestAddUser('admin@test.com', 555)
+    self.SignIn(self.user_1.user_id)
+    with self.work_env as we:
+      actual = we.CreateComponentDef(
+          project.project_id, 'hanggai', 'hamtlag', [admin.user_id],
+          [self.user_2.user_id], ['taro', 'mowgli'])
+    self.assertEqual(actual.project_id, project.project_id)
+    self.assertEqual(actual.path, 'hanggai')
+    self.assertEqual(actual.docstring, 'hamtlag')
+    self.assertEqual(actual.admin_ids, [admin.user_id])
+    self.assertEqual(actual.cc_ids, [222])
+    self.assertFalse(actual.deprecated)
+    self.assertEqual(actual.created, now)
+    self.assertEqual(actual.creator_id, self.user_1.user_id)
+    self.assertEqual(
+        actual.label_ids,
+        self.services.config.LookupLabelIDs(
+            self.cnxn, project.project_id, ['taro', 'mowgli']))
+
+    # Test with ancestor.
+    self.SignIn(admin.user_id)
+    with self.work_env as we:
+      actual = we.CreateComponentDef(
+          project.project_id, 'hanggai>band', 'rock band',
+          [self.user_2.user_id], [], [])
+    self.assertEqual(actual.project_id, project.project_id)
+    self.assertEqual(actual.path, 'hanggai>band')
+    self.assertEqual(actual.docstring, 'rock band')
+    self.assertEqual(actual.admin_ids, [self.user_2.user_id])
+    self.assertFalse(actual.deprecated)
+    self.assertEqual(actual.created, now)
+    self.assertEqual(actual.creator_id, admin.user_id)
+
+  def testCreateComponentDef_InvalidUsers(self):
+    project = self.services.project.TestAddProject(
+        'Music', owner_ids=[self.user_1.user_id])
+    self.SignIn(self.user_1.user_id)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.CreateComponentDef(
+            project.project_id, 'hanggai', 'hamtlag', [404], [404], [])
+
+  def testCreateComponentDef_InvalidLeaf(self):
+    project = self.services.project.TestAddProject(
+        'Music', owner_ids=[self.user_1.user_id])
+    self.SignIn(self.user_1.user_id)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.CreateComponentDef(
+            project.project_id, 'music>hanggai.rockband', 'hamtlag', [], [], [])
+
+  def testCreateComponentDef_LeafAlreadyExists(self):
+    project = self.services.project.TestAddProject(
+        'Music', owner_ids=[self.user_1.user_id])
+    self.SignIn(self.user_1.user_id)
+    with self.work_env as we:
+      we.CreateComponentDef(
+          project.project_id, 'mowgli', 'favorite things',
+          [self.user_1.user_id], [], [])
+    with self.assertRaises(exceptions.ComponentDefAlreadyExists):
+      with self.work_env as we:
+        we.CreateComponentDef(
+            project.project_id, 'mowgli', 'more favorite things', [], [], [])
+
+    # Test components with ancestors are also checked correctly
+    with self.work_env as we:
+      we.CreateComponentDef(
+          project.project_id, 'mowgli>food', 'lots of chicken', [], [], [])
+    with self.assertRaises(exceptions.ComponentDefAlreadyExists):
+      with self.work_env as we:
+        we.CreateComponentDef(
+            project.project_id, 'mowgli>food', 'lots of salmon', [], [], [])
+
+  def testCreateComponentDef_AncestorNotFound(self):
+    project = self.services.project.TestAddProject(
+        'Music', owner_ids=[self.user_1.user_id])
+    self.SignIn(self.user_1.user_id)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.CreateComponentDef(
+            project.project_id, 'mowgli>chicken', 'more favorite things', [],
+            [], [])
+
+  def testCreateComponentDef_PermissionDenied(self):
+    project = self.services.project.TestAddProject(
+        'Music', owner_ids=[self.user_1.user_id])
+    admin = self.services.user.TestAddUser('admin@test.com', 888)
+    self.SignIn(self.user_1.user_id)
+    with self.work_env as we:
+      we.CreateComponentDef(
+          project.project_id, 'mowgli', 'favorite things', [admin.user_id], [],
+          [])
+      we.CreateComponentDef(
+          project.project_id, 'mowgli>beef', 'favorite things', [], [], [])
+
+    user = self.services.user.TestAddUser('user@test.com', 777)
+    self.SignIn(user.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.CreateComponentDef(
+            project.project_id, 'bambi', 'spring time', [], [], [])
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.CreateComponentDef(
+            project.project_id, 'mowgli>chicken', 'more favorite things', [],
+            [], [])
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.CreateComponentDef(
+            project.project_id, 'mowgli>beef>rice', 'more favorite things', [],
+            [], [])
+
+  def testDeleteComponentDef(self):
+    project = self.services.project.TestAddProject(
+        'Achilles', owner_ids=[self.user_1.user_id])
+    config = fake.MakeTestConfig(project.project_id, [], [])
+    component_def = fake.MakeTestComponentDef(
+        project.project_id, 1, path='Chickens>Dickens')
+    config.component_defs = [component_def]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    self.SignIn(self.user_1.user_id)
+    with self.work_env as we:
+      we.DeleteComponentDef(project.project_id, component_def.component_id)
+
+    self.assertEqual(config.component_defs, [])
+
+  def testDeleteComponentDef_NotFound(self):
+    project = self.services.project.TestAddProject(
+        'Achilles', owner_ids=[self.user_1.user_id])
+
+    self.SignIn(self.user_1.user_id)
+    with self.assertRaises(exceptions.NoSuchComponentException):
+      with self.work_env as we:
+        we.DeleteComponentDef(project.project_id, 404)
+
+  def testDeleteComponentDef_CannotViewProject(self):
+    project = self.services.project.TestAddProject(
+        'Achilles',
+        owner_ids=[self.user_1.user_id],
+        access=project_pb2.ProjectAccess.MEMBERS_ONLY)
+
+    self.SignIn(self.user_2.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.DeleteComponentDef(project.project_id, 404)
+
+  def testDeleteComponentDef_SubcomponentFound(self):
+    project = self.services.project.TestAddProject(
+        'Achilles', owner_ids=[self.user_1.user_id])
+    config = fake.MakeTestConfig(project.project_id, [], [])
+    dickens_comp = fake.MakeTestComponentDef(
+        project.project_id, 1, path='Chickens>Dickens')
+    chickens_comp = fake.MakeTestComponentDef(
+        project.project_id, 2, path='Chickens')
+    config.component_defs = [chickens_comp, dickens_comp]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    self.SignIn(self.user_1.user_id)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.DeleteComponentDef(project.project_id, chickens_comp.component_id)
+
+  def testDeleteComponentDef_NonComponentAdminsCannotDelete(self):
+    admin = self.services.user.TestAddUser('circe@test.com', 888)
+    user = self.services.user.TestAddUser('patroclus@test.com', 999)
+
+    project = self.services.project.TestAddProject(
+        'Achilles', owner_ids=[self.user_1.user_id])
+    config = fake.MakeTestConfig(project.project_id, [], [])
+
+    dickens_comp = fake.MakeTestComponentDef(
+        project.project_id,
+        1,
+        path='Chickens>Dickens',
+    )
+    dickens_comp.admin_ids = [admin.user_id]
+    chickens_comp = fake.MakeTestComponentDef(
+        project.project_id, 2, path='Chickens')
+
+    config.component_defs = [chickens_comp, dickens_comp]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    self.SignIn(admin.user_id)
+    with self.work_env as we:
+      we.DeleteComponentDef(project.project_id, dickens_comp.component_id)
+
+    self.SignIn(user.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.DeleteComponentDef(project.project_id, chickens_comp.component_id)
+
+
+  # FUTURE: labels, statuses, components, rules, templates, and views.
+  # FUTURE: project saved queries.
+  # FUTURE: GetProjectPermissionsForUser()
+
+  ### Field methods
+
+  # FUTURE: All other field methods.
+
+  def testGetFieldDef_Normal(self):
+    """We can get an existing fielddef by field_id."""
+    fd = fake.MakeTestFieldDef(
+        2, self.project.project_id, tracker_pb2.FieldTypes.STR_TYPE,
+        field_name='Field')
+    self.services.config.TestAddFieldDef(fd)
+    config = self.services.config.GetProjectConfig(self.cnxn, 789)
+
+    with self.work_env as we:
+      actual = we.GetFieldDef(fd.field_id, self.project)
+
+    self.assertEqual(config.field_defs[1], actual)
+
+  def testGetFieldDef_NoSuchFieldDef(self):
+    """We reject attempts to get a non-existent field."""
+    with self.assertRaises(exceptions.NoSuchFieldDefException):
+      with self.work_env as we:
+        _actual = we.GetFieldDef(999, self.project)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testCreateIssue_Normal(self, fake_pasicn, fake_pasibn):
+    """We can create an issue."""
+    self.SignIn(user_id=111)
+    approval_values = [tracker_pb2.ApprovalValue(approval_id=23, phase_id=3)]
+    phases = [tracker_pb2.Phase(name='Canary', phase_id=3)]
+    with self.work_env as we:
+      actual_issue, comment = we.CreateIssue(
+          789,
+          'sum',
+          'New',
+          111, [333], ['Hot'], [], [],
+          'desc',
+          phases=phases,
+          approval_values=approval_values)
+    self.assertEqual(789, actual_issue.project_id)
+    self.assertEqual('sum', actual_issue.summary)
+    self.assertEqual('New', actual_issue.status)
+    self.assertEqual(111, actual_issue.reporter_id)
+    self.assertEqual(111, actual_issue.owner_id)
+    self.assertEqual([333], actual_issue.cc_ids)
+    self.assertEqual([], actual_issue.field_values)
+    self.assertEqual([], actual_issue.component_ids)
+    self.assertEqual(approval_values, actual_issue.approval_values)
+    self.assertEqual(phases, actual_issue.phases)
+    self.assertEqual('desc', comment.content)
+    loaded_comments = self.services.issue.GetCommentsForIssue(
+        self.cnxn, actual_issue.issue_id)
+    self.assertEqual('desc', loaded_comments[0].content)
+
+    # Verify that an indexing task was enqueued for this issue:
+    self.assertTrue(self.services.issue.enqueue_issues_called)
+    self.assertEqual(1, len(self.services.issue.enqueued_issues))
+    self.assertEqual(actual_issue.issue_id,
+        self.services.issue.enqueued_issues[0])
+
+    # Verify that tasks were queued to send email notifications.
+    hostport = 'testing-app.appspot.com'
+    fake_pasicn.assert_called_once_with(
+        actual_issue.issue_id, hostport, 111, comment_id=comment.id)
+    fake_pasibn.assert_called_once_with(
+        actual_issue.issue_id, hostport, [], 111)
+
+  @mock.patch(
+      'settings.preferred_domains', {'testing-app.appspot.com': 'example.com'})
+  @mock.patch(
+      'settings.branded_domains', {'proj': 'branded.com'})
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testCreateIssue_Branded(self, fake_pasicn, fake_pasibn):
+    """Use branded domains in notification about creating an issue."""
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      actual_issue, comment = we.CreateIssue(
+          789, 'sum', 'New', 111, [333], ['Hot'], [], [], 'desc')
+
+    self.assertEqual('proj', actual_issue.project_name)
+    # Verify that tasks were queued to send email notifications.
+    hostport = 'branded.com'
+    fake_pasicn.assert_called_once_with(
+        actual_issue.issue_id, hostport, 111, comment_id=comment.id)
+    fake_pasibn.assert_called_once_with(
+        actual_issue.issue_id, hostport, [], 111)
+
+  @mock.patch(
+      'settings.preferred_domains', {'testing-app.appspot.com': 'example.com'})
+  @mock.patch(
+      'settings.branded_domains', {'other-proj': 'branded.com'})
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testCreateIssue_Nonbranded(self, fake_pasicn, fake_pasibn):
+    """Don't use branded domains when creating issue in different project."""
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      actual_issue, comment = we.CreateIssue(
+          789, 'sum', 'New', 111, [333], ['Hot'], [], [], 'desc')
+
+    self.assertEqual('proj', actual_issue.project_name)
+    # Verify that tasks were queued to send email notifications.
+    hostport = 'example.com'
+    fake_pasicn.assert_called_once_with(
+        actual_issue.issue_id, hostport, 111, comment_id=comment.id)
+    fake_pasibn.assert_called_once_with(
+        actual_issue.issue_id, hostport, [], 111)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testCreateIssue_DontSendEmail(self, fake_pasicn, fake_pasibn):
+    """We can create an issue, without queueing notification tasks."""
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      actual_issue, comment = we.CreateIssue(
+          789,
+          'sum',
+          'New',
+          111, [333], ['Hot'], [], [],
+          'desc',
+          send_email=False)
+    self.assertEqual(789, actual_issue.project_id)
+    self.assertEqual('sum', actual_issue.summary)
+    self.assertEqual('New', actual_issue.status)
+    self.assertEqual('desc', comment.content)
+
+    # Verify that tasks were not queued to send email notifications.
+    self.assertEqual([], fake_pasicn.mock_calls)
+    self.assertEqual([], fake_pasibn.mock_calls)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testCreateIssue_ImportedIssue_Allowed(self, _fake_pasicn, _fake_pasibn):
+    """We can create an imported issue, if the requester has permission."""
+    PAST_TIME = 123456
+    self.project.extra_perms = [project_pb2.Project.ExtraPerms(
+        member_id=111, perms=['ImportComment'])]
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      actual_issue, comment = we.CreateIssue(
+          789,
+          'sum',
+          'New',
+          111, [333], ['Hot'], [], [],
+          'desc',
+          send_email=False,
+          reporter_id=222,
+          timestamp=PAST_TIME)
+    self.assertEqual(789, actual_issue.project_id)
+    self.assertEqual('sum', actual_issue.summary)
+    self.assertEqual(222, actual_issue.reporter_id)
+    self.assertEqual(PAST_TIME, actual_issue.opened_timestamp)
+    self.assertEqual(222, comment.user_id)
+    self.assertEqual(111, comment.importer_id)
+    self.assertEqual(PAST_TIME, comment.timestamp)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testCreateIssue_ImportedIssue_Denied(self, _fake_pasicn, _fake_pasibn):
+    """We can refuse to import an issue, if requester lacks permission."""
+    PAST_TIME = 123456
+    # Note: no "ImportComment" permission is granted.
+    self.SignIn(user_id=111)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.CreateIssue(
+            789, 'sum', 'New', 222, [333], ['Hot'], [], [], 'desc',
+            send_email=False, reporter_id=222, timestamp=PAST_TIME)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testCreateIssue_OnwerValidation(self, _fake_pasicn, _fake_pasibn):
+    """We validate the owner."""
+    self.SignIn(user_id=111)
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 'Issue owner must be a project member'):
+      with self.work_env as we:
+        # user_id 222 is not a project member
+        we.CreateIssue(789, 'sum', 'New', 222, [333], ['Hot'], [], [], 'desc')
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testCreateIssue_SummaryValidation(self, _fake_pasicn, _fake_pasibn):
+    """We validate the summary."""
+    self.SignIn(user_id=111)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        # Summary cannot be empty
+        we.CreateIssue(789, '', 'New', 111, [333], ['Hot'], [], [], 'desc')
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        # Summary cannot be only spaces
+        we.CreateIssue(789, ' ', 'New', 111, [333], ['Hot'], [], [], 'desc')
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testCreateIssue_DescriptionValidation(self, _fake_pasicn, _fake_pasibn):
+    """We validate the description."""
+    self.SignIn(user_id=111)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        # Description cannot be empty
+        we.CreateIssue(789, 'sum', 'New', 111, [333], ['Hot'], [], [], '')
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        # Description cannot be only spaces
+        we.CreateIssue(789, 'sum', 'New', 111, [333], ['Hot'], [], [], ' ')
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testCreateIssue_FieldValueValidation(self, _fake_pasicn, _fake_pasibn):
+    """We validate field values against field definitions."""
+    self.SignIn(user_id=111)
+    # field_def_1 has a max of 10.
+    fv = fake.MakeFieldValue(field_id=self.field_def_1.field_id, int_value=11)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.CreateIssue(789, 'sum', 'New', 111, [], [], [fv], [], '')
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testCreateIssue_AppliesFilterRules(self, _fake_pasicn, _fake_pasibn):
+    """We apply filter rules."""
+    self.services.features.TestAddFilterRule(
+        789, '-has:component', add_labels=['no-component'])
+
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      actual_issue, _ = we.CreateIssue(
+          789, 'sum', 'New', 111, [333], [], [], [], 'desc')
+    self.assertEqual(len(actual_issue.derived_labels), 1)
+    self.assertEqual(actual_issue.derived_labels[0], 'no-component')
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testCreateIssue_RaiseFilterErrors(self, _fake_pasicn, _fake_pasibn):
+    """We raise FilterRuleException if filter rule should show error."""
+    self.services.features.TestAddFilterRule(789, '-has:component', error='er')
+    PAST_TIME = 123456
+    self.SignIn(user_id=111)
+    with self.assertRaises(exceptions.FilterRuleException):
+      with self.work_env as we:
+        we.CreateIssue(
+            789,
+            'sum',
+            'New',
+            111, [], [], [], [],
+            'desc',
+            send_email=False,
+            timestamp=PAST_TIME)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testCreateIssue_IgnoresFilterErrors(self, _fake_pasicn, _fake_pasibn):
+    """We can apply filter rules and ignore resulting errors."""
+    self.services.features.TestAddFilterRule(789, '-has:component', error='er')
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      actual_issue, _ = we.CreateIssue(
+          789,
+          'sum',
+          'New',
+          111, [], [], [], [],
+          'desc',
+          send_email=False,
+          raise_filter_errors=False)
+    self.assertEqual(len(actual_issue.component_ids), 0)
+
+  def testMakeIssueFromDelta(self):
+    # TODO(crbug/monorail/7197): implement tests
+    pass
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testMakeIssue_Normal(self, _fake_pasicn, _fake_pasibn):
+    self.SignIn(user_id=111)
+    fd_id = self.services.config.CreateFieldDef(
+        self.cnxn,
+        self.project.project_id,
+        'Restricted-Foo',
+        'STR_TYPE',
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None, [], [111],
+        is_restricted_field=True)
+    input_fv = tracker_pb2.FieldValue(field_id=fd_id, str_value='Bar')
+    input_issue = tracker_pb2.Issue(
+        project_id=789,
+        owner_id=111,
+        summary='sum',
+        status='New',
+        field_values=[input_fv])
+    with self.work_env as we:
+      actual_issue = we.MakeIssue(input_issue, 'description', False)
+    self.assertEqual(actual_issue.project_id, 789)
+    self.assertEqual(actual_issue.summary, 'sum')
+    self.assertEqual(actual_issue.status, 'New')
+    self.assertEqual(actual_issue.reporter_id, 111)
+    self.assertEqual(actual_issue.field_values, [input_fv])
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testMakeIssue_ChecksRestrictedFields(self, _fake_pasicn, _fake_pasibn):
+    self.SignIn(user_id=222)
+    fd_id = self.services.config.CreateFieldDef(
+        self.cnxn,
+        self.project.project_id,
+        'Restricted-Foo',
+        'STR_TYPE',
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None, [], [111],
+        is_restricted_field=True)
+    input_fv = tracker_pb2.FieldValue(field_id=fd_id, str_value='Bar')
+    input_issue = tracker_pb2.Issue(
+        project_id=789, summary='sum', status='New', field_values=[input_fv])
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.MakeIssue(input_issue, 'description', False)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testMakeIssue_ChecksRestrictedLabels(self, _fake_pasicn, _fake_pasibn):
+    """Also checks restricted field that are masked as labels."""
+    self.SignIn(user_id=222)
+    self.services.config.CreateFieldDef(
+        self.cnxn,
+        self.project.project_id,
+        'Rfoo',
+        'ENUM_TYPE',
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None, [], [111],
+        is_restricted_field=True)
+    input_issue = tracker_pb2.Issue(
+        project_id=789, summary='sum', status='New', labels=['Rfoo-bar'])
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.MakeIssue(input_issue, 'description', False)
+
+  @mock.patch('services.tracker_fulltext.IndexIssues')
+  @mock.patch('services.tracker_fulltext.UnindexIssues')
+  def testMoveIssue_Normal(self, mock_unindex, mock_index):
+    """We can move issues."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    self.project.owner_ids = [111]
+    target_project = self.services.project.TestAddProject(
+      'dest', project_id=988, committer_ids=[111])
+
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      moved_issue = we.MoveIssue(issue, target_project)
+
+    self.assertEqual(moved_issue.project_name, 'dest')
+    self.assertEqual(moved_issue.local_id, 1)
+
+    moved_issue = self.services.issue.GetIssueByLocalID(
+        'cnxn', target_project.project_id, 1)
+    self.assertEqual(target_project.project_id, moved_issue.project_id)
+    self.assertEqual(issue.summary, moved_issue.summary)
+    self.assertEqual(moved_issue.reporter_id, 111)
+
+    mock_unindex.assert_called_once_with([issue.issue_id])
+    mock_index.assert_called_once_with(
+       self.mr.cnxn, [issue], self.services.user, self.services.issue,
+       self.services.config)
+
+  @mock.patch('services.tracker_fulltext.IndexIssues')
+  @mock.patch('services.tracker_fulltext.UnindexIssues')
+  def testMoveIssue_MoveBackAgain(self, _mock_unindex, _mock_index):
+    """We can move issues backt and get the old id."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    issue.project_name = 'proj'
+    self.services.issue.TestAddIssue(issue)
+    self.project.owner_ids = [111]
+    target_project = self.services.project.TestAddProject(
+      'dest', project_id=988, owner_ids=[111])
+
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      moved_issue = we.MoveIssue(issue, target_project)
+      moved_issue = we.MoveIssue(moved_issue, self.project)
+
+    self.assertEqual(moved_issue.project_name, 'proj')
+    self.assertEqual(moved_issue.local_id, 1)
+
+    moved_issue = self.services.issue.GetIssueByLocalID(
+        'cnxn', self.project.project_id, 1)
+    self.assertEqual(self.project.project_id, moved_issue.project_id)
+
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    self.assertEqual(
+        comments[1].content, 'Moved issue proj:1 to now be issue dest:1.')
+    self.assertEqual(
+        comments[2].content, 'Moved issue dest:1 back to issue proj:1 again.')
+
+  def testMoveIssue_Anon(self):
+    """Anon can't move issues."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    target_project = self.services.project.TestAddProject(
+      'dest', project_id=988)
+
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.MoveIssue(issue, target_project)
+
+  def testMoveIssue_CantDeleteIssue(self):
+    """We can't move issues if we don't have DeleteIssue perm on the issue."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    target_project = self.services.project.TestAddProject(
+      'dest', project_id=988, committer_ids=[111])
+
+    self.SignIn(user_id=111)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.MoveIssue(issue, target_project)
+
+  def testMoveIssue_CantEditIssueOnTargetProject(self):
+    """We can't move issues if we don't have EditIssue perm on target."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    self.project.owner_ids = [111]
+    target_project = self.services.project.TestAddProject(
+      'dest', project_id=989)
+
+    self.SignIn(user_id=111)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.MoveIssue(issue, target_project)
+
+  def testMoveIssue_CantRestrictions(self):
+    """We can't move issues if they have restriction labels."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    issue.labels = ['Restrict-Foo-Bar']
+    self.services.issue.TestAddIssue(issue)
+    self.project.owner_ids = [111]
+    target_project = self.services.project.TestAddProject(
+      'dest', project_id=989, committer_ids=[111])
+
+    self.SignIn(user_id=111)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.MoveIssue(issue, target_project)
+
+  def testMoveIssue_TooLongIssue(self):
+    """We can't move issues if the comment is too long."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    target_project = self.services.project.TestAddProject(
+        'dest', project_id=988, committer_ids=[111])
+
+    self.SignIn(user_id=111)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.MoveIssue(issue, target_project)
+
+  @mock.patch('services.tracker_fulltext.IndexIssues')
+  def testCopyIssue_Normal(self, mock_index):
+    """We can copy issues."""
+    issue = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, issue_id=78901, project_name='proj')
+    self.services.issue.TestAddIssue(issue)
+    self.project.owner_ids = [111]
+    target_project = self.services.project.TestAddProject(
+      'dest', project_id=988, committer_ids=[111])
+
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      copied_issue = we.CopyIssue(issue, target_project)
+
+    self.assertEqual(copied_issue.project_name, 'dest')
+    self.assertEqual(copied_issue.local_id, 1)
+
+    # Original issue should still exist.
+    self.services.issue.GetIssueByLocalID('cnxn', 789, 1)
+
+    copied_issue = self.services.issue.GetIssueByLocalID(
+        'cnxn', target_project.project_id, 1)
+    self.assertEqual(target_project.project_id, copied_issue.project_id)
+    self.assertEqual(issue.summary, copied_issue.summary)
+    self.assertEqual(copied_issue.reporter_id, 111)
+
+    mock_index.assert_called_once_with(
+       self.mr.cnxn, [copied_issue], self.services.user, self.services.issue,
+       self.services.config)
+
+    comment = self.services.issue.GetCommentsForIssue(
+        'cnxn', copied_issue.issue_id)[-1]
+    self.assertEqual(1, len(comment.amendments))
+    amendment = comment.amendments[0]
+    self.assertEqual(
+        tracker_pb2.Amendment(
+            field=tracker_pb2.FieldID.PROJECT,
+            newvalue='dest',
+            added_user_ids=[],
+            removed_user_ids=[]),
+        amendment)
+
+  @mock.patch('services.tracker_fulltext.IndexIssues')
+  def testCopyIssue_SameProject(self, mock_index):
+    """We can copy issues."""
+    issue = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, issue_id=78901, project_name='proj')
+    self.services.issue.TestAddIssue(issue)
+    self.project.owner_ids = [111]
+    target_project = self.project
+
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      copied_issue = we.CopyIssue(issue, target_project)
+
+    self.assertEqual(copied_issue.project_name, 'proj')
+    self.assertEqual(copied_issue.local_id, 2)
+
+    # Original issue should still exist.
+    self.services.issue.GetIssueByLocalID('cnxn', 789, 1)
+
+    copied_issue = self.services.issue.GetIssueByLocalID(
+        'cnxn', target_project.project_id, 2)
+    self.assertEqual(target_project.project_id, copied_issue.project_id)
+    self.assertEqual(issue.summary, copied_issue.summary)
+    self.assertEqual(copied_issue.reporter_id, 111)
+
+    mock_index.assert_called_once_with(
+       self.mr.cnxn, [copied_issue], self.services.user, self.services.issue,
+       self.services.config)
+    comment = self.services.issue.GetCommentsForIssue(
+        'cnxn', copied_issue.issue_id)[-1]
+    self.assertEqual(0, len(comment.amendments))
+
+  def testCopyIssue_Anon(self):
+    """Anon can't copy issues."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    target_project = self.services.project.TestAddProject(
+      'dest', project_id=988)
+
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.CopyIssue(issue, target_project)
+
+  def testCopyIssue_CantDeleteIssue(self):
+    """We can't copy issues if we don't have DeleteIssue perm on the issue."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    target_project = self.services.project.TestAddProject(
+      'dest', project_id=988, committer_ids=[111])
+
+    self.SignIn(user_id=111)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.CopyIssue(issue, target_project)
+
+  def testCopyIssue_CantEditIssueOnTargetProject(self):
+    """We can't copy issues if we don't have EditIssue perm on target."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    self.project.owner_ids = [111]
+    target_project = self.services.project.TestAddProject(
+      'dest', project_id=989)
+
+    self.SignIn(user_id=111)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.CopyIssue(issue, target_project)
+
+  def testCopyIssue_CantRestrictions(self):
+    """We can't copy issues if they have restriction labels."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    issue.labels = ['Restrict-Foo-Bar']
+    self.services.issue.TestAddIssue(issue)
+    self.project.owner_ids = [111]
+    target_project = self.services.project.TestAddProject(
+      'dest', project_id=989, committer_ids=[111])
+
+    self.SignIn(user_id=111)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.CopyIssue(issue, target_project)
+
+  @mock.patch('search.frontendsearchpipeline.FrontendSearchPipeline')
+  def testSearchIssues(self, mocked_pipeline):
+    mocked_instance = mocked_pipeline.return_value
+    mocked_instance.total_count = 10
+    mocked_instance.visible_results = ['a', 'b']
+    with self.work_env as we:
+      actual = we.SearchIssues('', ['proj'], 123, 20, 0, '')
+    expected = work_env.ListResult(['a', 'b'], None)
+    self.assertEqual(actual, expected)
+
+  @mock.patch('search.frontendsearchpipeline.FrontendSearchPipeline')
+  def testSearchIssues_paginates(self, mocked_pipeline):
+    mocked_instance = mocked_pipeline.return_value
+    mocked_instance.total_count = 50
+    mocked_instance.visible_results = ['a', 'b']
+    with self.work_env as we:
+      actual = we.SearchIssues('', ['proj'], 123, 20, 0, '')
+    expected = work_env.ListResult(['a', 'b'], 20)
+    self.assertEqual(actual, expected)
+
+  @mock.patch('search.frontendsearchpipeline.FrontendSearchPipeline')
+  def testSearchIssues_NoSuchProject(self, mocked_pipeline):
+    mocked_instance = mocked_pipeline.return_value
+    mocked_instance.total_count = 10
+    mocked_instance.visible_results = ['a', 'b']
+
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      with self.work_env as we:
+        we.SearchIssues('', ['chicken'], 123, 20, 0, '')
+
+  @mock.patch('search.frontendsearchpipeline.FrontendSearchPipeline')
+  def testListIssues_Normal(self, mocked_pipeline):
+    """We can do a query that generates some results."""
+    mocked_instance = mocked_pipeline.return_value
+    with self.work_env as we:
+      actual = we.ListIssues('', ['a'], 123, 20, 0, 1, '', '', True)
+    self.assertEqual(actual, mocked_instance)
+    mocked_instance.SearchForIIDs.assert_called_once()
+    mocked_instance.MergeAndSortIssues.assert_called_once()
+    mocked_instance.Paginate.assert_called_once()
+
+  def testListIssues_Error(self):
+    """Errors are safely reported."""
+    pass  # TODO(jrobbins): add unit test
+
+  def testFindIssuePositionInSearch_Normal(self):
+    """We can find an issue position for the flipper."""
+    pass  # TODO(jrobbins): add unit test
+
+  def testFindIssuePositionInSearch_Error(self):
+    """Errors are safely reported."""
+    pass  # TODO(jrobbins): add unit test
+
+  def testGetIssuesDict_Normal(self):
+    """We can get an existing issue by issue_id."""
+    issue_1 = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue_1)
+    issue_2 = fake.MakeTestIssue(789, 2, 'sum', 'New', 111, issue_id=78902)
+    self.services.issue.TestAddIssue(issue_2)
+
+    with self.work_env as we:
+      actual = we.GetIssuesDict([78901, 78902])
+
+    self.assertEqual({78901: issue_1, 78902: issue_2}, actual)
+
+  def testGetIssuesDict_NoPermission(self):
+    """We reject attempts to get issues the user cannot view."""
+    issue_1 = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    issue_1.labels = ['Restrict-View-CoreTeam']
+    issue_1.project_name = 'farm-proj'
+    self.services.issue.TestAddIssue(issue_1)
+    issue_2 = fake.MakeTestIssue(789, 2, 'sum', 'New', 111, issue_id=78902)
+    self.services.issue.TestAddIssue(issue_2)
+    issue_3 = fake.MakeTestIssue(789, 3, 'sum', 'New', 111, issue_id=78903)
+    issue_3.labels = ['Restrict-View-CoreTeam']
+    issue_3.project_name = 'farm-proj'
+    self.services.issue.TestAddIssue(issue_3)
+    with self.assertRaisesRegexp(
+        permissions.PermissionException,
+        'User is not allowed to view issue: farm-proj:1.\n' +
+        'User is not allowed to view issue: farm-proj:3.'):
+      with self.work_env as we:
+        we.GetIssuesDict([78901, 78902, 78903])
+
+  def testGetIssuesDict_NoSuchIssue(self):
+    """We reject attempts to get a non-existent issue."""
+    issue_1 = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue_1)
+    with self.assertRaisesRegexp(exceptions.NoSuchIssueException,
+                                 'No such issue: 78902\nNo such issue: 78903'):
+      with self.work_env as we:
+        _actual = we.GetIssuesDict([78901, 78902, 78903])
+
+  def testGetIssue_Normal(self):
+    """We can get an existing issue by issue_id."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    with self.work_env as we:
+      actual = we.GetIssue(78901)
+
+    self.assertEqual(issue, actual)
+
+  def testGetIssue_NoPermission(self):
+    """We reject attempts to get an issue we don't have permission for."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    issue.labels = ['Restrict-View-CoreTeam']
+    self.services.issue.TestAddIssue(issue)
+
+    # We should get a permission exception
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        _actual = we.GetIssue(78901)
+
+    # ...unless we have permission to see the issue
+    self.SignIn(user_id=self.admin_user.user_id)
+    with self.work_env as we:
+      actual = we.GetIssue(78901)
+    self.assertEqual(issue, actual)
+
+  def testGetIssue_NoneIssue(self):
+    """We reject attempts to get a none issue."""
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        _actual = we.GetIssue(None)
+
+  def testGetIssue_NoSuchIssue(self):
+    """We reject attempts to get a non-existent issue."""
+    with self.assertRaises(exceptions.NoSuchIssueException):
+      with self.work_env as we:
+        _actual = we.GetIssue(78901)
+
+  def testListReferencedIssues(self):
+    """We return only existing or visible issues even w/out project names."""
+    ref_tuples = [
+        (None, 1), ('other-proj', 1), ('proj', 99),
+        ('ghost-proj', 1), ('proj', 42), ('other-proj', 1)]
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    private = fake.MakeTestIssue(789, 42, 'sum', 'New', 422, issue_id=78942)
+    private.labels.append('Restrict-View-CoreTeam')
+    self.services.issue.TestAddIssue(private)
+    self.services.project.TestAddProject(
+        'other-proj', project_id=788)
+    other_issue = fake.MakeTestIssue(
+        788, 1, 'sum', 'Fixed', 111, issue_id=78801)
+    self.services.issue.TestAddIssue(other_issue)
+
+    with self.work_env as we:
+      actual_open, actual_closed = we.ListReferencedIssues(ref_tuples, 'proj')
+
+    self.assertEqual([issue], actual_open)
+    self.assertEqual([other_issue], actual_closed)
+
+  def testListReferencedIssues_PreservesOrder(self):
+    ref_tuples = [('proj', i) for i in range(1, 10)]
+    # Duplicate some ref_tuples. The result should have no duplicated issues,
+    # with only the first occurrence being preserved.
+    ref_tuples += [('proj', 1), ('proj', 5)]
+    expected_open = [
+        fake.MakeTestIssue(789, i, 'sum', 'New', 111) for i in range(1, 5)]
+    expected_closed = [
+        fake.MakeTestIssue(789, i, 'sum', 'Fixed', 111) for i in range(5, 10)]
+    for issue in expected_open + expected_closed:
+      self.services.issue.TestAddIssue(issue)
+
+    with self.work_env as we:
+      actual_open, actual_closed = we.ListReferencedIssues(ref_tuples, 'proj')
+
+    self.assertEqual(expected_open, actual_open)
+    self.assertEqual(expected_closed, actual_closed)
+
+  def testGetIssueByLocalID_Normal(self):
+    """We can get an existing issue by project_id and local_id."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    with self.work_env as we:
+      actual = we.GetIssueByLocalID(789, 1)
+
+    self.assertEqual(issue, actual)
+
+  def testGetIssueByLocalID_ProjectNotSpecified(self):
+    """We reject calls with missing information."""
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        _actual = we.GetIssueByLocalID(None, 1)
+
+  def testGetIssueByLocalID_IssueNotSpecified(self):
+    """We reject calls with missing information."""
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        _actual = we.GetIssueByLocalID(789, None)
+
+  def testGetIssueByLocalID_NoSuchIssue(self):
+    """We reject attempts to get a non-existent issue."""
+    with self.assertRaises(exceptions.NoSuchIssueException):
+      with self.work_env as we:
+        _actual = we.GetIssueByLocalID(789, 1)
+
+  def testGetRelatedIssueRefs_None(self):
+    """We handle issues that have no related issues."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111)
+    self.services.issue.TestAddIssue(issue)
+
+    with self.work_env as we:
+      actual = we.GetRelatedIssueRefs([issue])
+
+    self.assertEqual({}, actual)
+
+  def testGetRelatedIssueRefs_Some(self):
+    """We can get refs for related issues of a given issue."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111)
+    sooner = fake.MakeTestIssue(789, 2, 'sum', 'New', 111, project_name='proj')
+    later = fake.MakeTestIssue(789, 3, 'sum', 'New', 111, project_name='proj')
+    better = fake.MakeTestIssue(789, 4, 'sum', 'New', 111, project_name='proj')
+    issue.blocked_on_iids.append(sooner.issue_id)
+    issue.blocking_iids.append(later.issue_id)
+    issue.merged_into = better.issue_id
+    self.services.issue.TestAddIssue(issue)
+    self.services.issue.TestAddIssue(sooner)
+    self.services.issue.TestAddIssue(later)
+    self.services.issue.TestAddIssue(better)
+
+    with self.work_env as we:
+      actual = we.GetRelatedIssueRefs([issue])
+
+    self.assertEqual(
+        {sooner.issue_id: ('proj', 2),
+         later.issue_id: ('proj', 3),
+         better.issue_id: ('proj', 4)},
+        actual)
+
+  def testGetRelatedIssueRefs_MultipleIssues(self):
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111)
+    blocking = fake.MakeTestIssue(
+        789, 2, 'sum', 'New', 111, project_name='proj')
+    issue2 = fake.MakeTestIssue(789, 3, 'sum', 'New', 111, project_name='proj')
+    blocked_on = fake.MakeTestIssue(
+        789, 4, 'sum', 'New', 111, project_name='proj')
+    issue3 = fake.MakeTestIssue(789, 5, 'sum', 'New', 111, project_name='proj')
+    merged_into = fake.MakeTestIssue(
+        789, 6, 'sum', 'New', 111, project_name='proj')
+
+    issue.blocked_on_iids.append(blocked_on.issue_id)
+    issue2.blocking_iids.append(blocking.issue_id)
+    issue3.merged_into = merged_into.issue_id
+
+    self.services.issue.TestAddIssue(issue)
+    self.services.issue.TestAddIssue(issue2)
+    self.services.issue.TestAddIssue(issue3)
+    self.services.issue.TestAddIssue(blocked_on)
+    self.services.issue.TestAddIssue(blocking)
+    self.services.issue.TestAddIssue(merged_into)
+
+    with self.work_env as we:
+      actual = we.GetRelatedIssueRefs([issue, issue2, issue3])
+
+    self.assertEqual(
+        {blocking.issue_id: ('proj', 2),
+         blocked_on.issue_id: ('proj', 4),
+         merged_into.issue_id: ('proj', 6)},
+        actual)
+
+  def testGetIssueRefs(self):
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, project_name='proj1')
+    issue2 = fake.MakeTestIssue(789, 3, 'sum', 'New', 111, project_name='proj')
+    issue3 = fake.MakeTestIssue(789, 5, 'sum', 'New', 111, project_name='proj')
+
+    self.services.issue.TestAddIssue(issue)
+    self.services.issue.TestAddIssue(issue2)
+    self.services.issue.TestAddIssue(issue3)
+
+    with self.work_env as we:
+      actual = we.GetIssueRefs(
+          [issue.issue_id, issue2.issue_id, issue3.issue_id])
+
+    self.assertEqual(
+        {issue.issue_id: ('proj1', 1),
+         issue2.issue_id: ('proj', 3),
+         issue3.issue_id: ('proj', 5)},
+        actual)
+
+  @mock.patch('businesslogic.work_env.WorkEnv.UpdateIssueApproval')
+  def testBulkUpdateIssueApprovals(self, mockUpdateIssueApproval):
+    updated_issues = [78901, 78902]
+    def side_effect(issue_id, *_args, **_kwargs):
+      if issue_id in [78903]:
+        raise permissions.PermissionException
+      if issue_id in [78904, 78905]:
+        raise exceptions.NoSuchIssueApprovalException
+    mockUpdateIssueApproval.side_effect = side_effect
+
+    self.SignIn()
+
+    approval_delta = tracker_pb2.ApprovalDelta()
+    issue_ids = self.work_env.BulkUpdateIssueApprovals(
+        [78901, 78902, 78903, 78904, 78905], 24, self.project, approval_delta,
+        'comment', send_email=True)
+    self.assertEqual(issue_ids, updated_issues)
+    updateIssueApprovalCalls = [
+        mock.call(
+            78901, 24, approval_delta, 'comment', False, send_email=False),
+        mock.call(
+            78902, 24, approval_delta, 'comment', False, send_email=False),
+        mock.call(
+            78903, 24, approval_delta, 'comment', False, send_email=False),
+        mock.call(
+            78904, 24, approval_delta, 'comment', False, send_email=False),
+        mock.call(
+            78905, 24, approval_delta, 'comment', False, send_email=False),
+    ]
+    self.assertEqual(
+        mockUpdateIssueApproval.call_count, len(updateIssueApprovalCalls))
+    mockUpdateIssueApproval.assert_has_calls(updateIssueApprovalCalls)
+
+  def testBulkUpdateIssueApprovals_AnonUser(self):
+    approval_delta = tracker_pb2.ApprovalDelta()
+    with self.assertRaises(permissions.PermissionException):
+      self.work_env.BulkUpdateIssueApprovals(
+          [], 24, self.project, approval_delta,
+          'comment', send_email=True)
+
+  def testBulkUpdateIssueApprovals_UserLacksViewPerms(self):
+    approval_delta = tracker_pb2.ApprovalDelta()
+    self.SignIn(222)
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    with self.assertRaises(permissions.PermissionException):
+      self.work_env.BulkUpdateIssueApprovals(
+          [], 24, self.project, approval_delta,
+          'comment', send_email=True)
+
+  @mock.patch('businesslogic.work_env.WorkEnv.UpdateIssueApproval')
+  def testBulkUpdateIssueApprovalsV3(self, mockUpdateIssueApproval):
+
+    def side_effect(issue_id, approval_id, *_args, **_kwargs):
+      return (
+          tracker_pb2.ApprovalValue(approval_id=approval_id),
+          tracker_pb2.IssueComment(issue_id=issue_id),
+          tracker_pb2.Issue(issue_id=issue_id))
+
+    mockUpdateIssueApproval.side_effect = side_effect
+
+    self.SignIn()
+
+    approval_delta = tracker_pb2.ApprovalDelta()
+    approval_delta_2 = tracker_pb2.ApprovalDelta(approver_ids_add=[111])
+    deltas_by_issue = [
+        (78901, 1, approval_delta),
+        (78901, 1, approval_delta),
+        (78901, 2, approval_delta),
+        (78901, 2, approval_delta_2),
+        (78902, 24, approval_delta),
+    ]
+    updated_approval_values = self.work_env.BulkUpdateIssueApprovalsV3(
+        deltas_by_issue, 'xyz', send_email=True)
+    expected = []
+    for iid, aid, _delta in deltas_by_issue:
+      issue_approval_value_pair = (
+          tracker_pb2.Issue(issue_id=iid),
+          tracker_pb2.ApprovalValue(approval_id=aid))
+      expected.append(issue_approval_value_pair)
+
+    self.assertEqual(updated_approval_values, expected)
+    updateIssueApprovalCalls = []
+    for iid, aid, delta in deltas_by_issue:
+      mock_call = mock.call(
+          iid, aid, delta, 'xyz', False, send_email=True, update_perms=True)
+      updateIssueApprovalCalls.append(mock_call)
+    self.assertEqual(mockUpdateIssueApproval.call_count, len(deltas_by_issue))
+    mockUpdateIssueApproval.assert_has_calls(updateIssueApprovalCalls)
+
+  @mock.patch('businesslogic.work_env.WorkEnv.UpdateIssueApproval')
+  def testBulkUpdateIssueApprovalsV3_PermError(self, mockUpdateIssueApproval):
+    mockUpdateIssueApproval.side_effect = mock.Mock(
+        side_effect=permissions.PermissionException())
+    approval_delta = tracker_pb2.ApprovalDelta()
+    deltas_by_issue = [(78901, 1, approval_delta)]
+    with self.assertRaises(permissions.PermissionException):
+      self.work_env.BulkUpdateIssueApprovalsV3(
+          deltas_by_issue, 'comment', send_email=True)
+
+  @mock.patch('businesslogic.work_env.WorkEnv.UpdateIssueApproval')
+  def testBulkUpdateIssueApprovalsV3_NotFound(self, mockUpdateIssueApproval):
+    mockUpdateIssueApproval.side_effect = mock.Mock(
+        side_effect=exceptions.NoSuchIssueApprovalException())
+    approval_delta = tracker_pb2.ApprovalDelta()
+    deltas_by_issue = [(78901, 1, approval_delta)]
+    with self.assertRaises(exceptions.NoSuchIssueApprovalException):
+      self.work_env.BulkUpdateIssueApprovalsV3(
+          deltas_by_issue, 'comment', send_email=True)
+
+  def testBulkUpdateIssueApprovalsV3_UserLacksViewPerms(self):
+    self.SignIn(222)
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    # No exception raised in v3. Permissions checked in UpdateIssueApprovals.
+    self.work_env.BulkUpdateIssueApprovalsV3([], 'comment', send_email=True)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendApprovalChangeNotification')
+  def testUpdateIssueApproval(self, _mockPrepareAndSend):
+    """We can update an issue's approval_value."""
+
+    self.services.issue.DeltaUpdateIssueApproval = mock.Mock()
+
+    self.SignIn()
+
+    config = fake.MakeTestConfig(789, [], [])
+    self.services.config.StoreConfig('cnxn', config)
+
+    av_24 = tracker_pb2.ApprovalValue(
+        approval_id=24, approver_ids=[111],
+        status=tracker_pb2.ApprovalStatus.NOT_SET, set_on=1234, setter_id=999)
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111,
+                               issue_id=78901, approval_values=[av_24])
+    self.services.issue.TestAddIssue(issue)
+
+    delta = tracker_pb2.ApprovalDelta(
+        status=tracker_pb2.ApprovalStatus.REVIEW_REQUESTED,
+        set_on=2345,
+        approver_ids_add=[222],
+        setter_id=111)
+
+    self.work_env.UpdateIssueApproval(78901, 24, delta, 'please review', False)
+
+    self.services.issue.DeltaUpdateIssueApproval.assert_called_once_with(
+        self.mr.cnxn, 111, config, issue, av_24, delta,
+        comment_content='please review', is_description=False, attachments=None,
+        kept_attachments=None)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendApprovalChangeNotification')
+  def testUpdateIssueApproval_IsDescription(self, _mockPrepareAndSend):
+    """We can update an issue's approval survey."""
+
+    self.services.issue.DeltaUpdateIssueApproval = mock.Mock()
+
+    self.SignIn()
+
+    config = fake.MakeTestConfig(789, [], [])
+    self.services.config.StoreConfig('cnxn', config)
+
+    av_24 = tracker_pb2.ApprovalValue(approval_id=24)
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111,
+                               issue_id=78901, approval_values=[av_24])
+    self.services.issue.TestAddIssue(issue)
+
+    delta = tracker_pb2.ApprovalDelta(setter_id=111)
+    self.work_env.UpdateIssueApproval(78901, 24, delta, 'better response', True)
+
+    self.services.issue.DeltaUpdateIssueApproval.assert_called_once_with(
+        self.mr.cnxn, 111, config, issue, av_24, delta,
+        comment_content='better response', is_description=True,
+        attachments=None, kept_attachments=None)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendApprovalChangeNotification')
+  def testUpdateIssueApproval_Attachments(self, _mockPrepareAndSend):
+    """We can attach files as we many an approval change."""
+    self.services.issue.DeltaUpdateIssueApproval = mock.Mock()
+
+    self.SignIn()
+
+    config = fake.MakeTestConfig(789, [], [])
+    self.services.config.StoreConfig('cnxn', config)
+
+    av_24 = tracker_pb2.ApprovalValue(
+        approval_id=24, approver_ids=[111],
+        status=tracker_pb2.ApprovalStatus.NOT_SET, set_on=1234, setter_id=999)
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111,
+                               issue_id=78901, approval_values=[av_24])
+    self.services.issue.TestAddIssue(issue)
+
+    delta = tracker_pb2.ApprovalDelta(
+        status=tracker_pb2.ApprovalStatus.REVIEW_REQUESTED,
+        set_on=2345,
+        approver_ids_add=[222],
+        setter_id=111)
+    attachments = []
+    self.work_env.UpdateIssueApproval(78901, 24, delta, 'please review', False,
+                                      attachments=attachments)
+
+    self.services.issue.DeltaUpdateIssueApproval.assert_called_once_with(
+        self.mr.cnxn, 111, config, issue, av_24, delta,
+        comment_content='please review', is_description=False,
+        attachments=attachments, kept_attachments=None)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendApprovalChangeNotification')
+  @mock.patch(
+      'tracker.tracker_helpers.FilterKeptAttachments')
+  def testUpdateIssueApproval_KeptAttachments(
+      self, mockFilterKeptAttachments, _mockPrepareAndSend):
+    """We can keep attachments from previous descriptions."""
+    self.services.issue.DeltaUpdateIssueApproval = mock.Mock()
+    mockFilterKeptAttachments.return_value = [1, 2]
+
+    self.SignIn()
+
+    config = fake.MakeTestConfig(789, [], [])
+    self.services.config.StoreConfig('cnxn', config)
+
+    av_24 = tracker_pb2.ApprovalValue(
+        approval_id=24, approver_ids=[111],
+        status=tracker_pb2.ApprovalStatus.NOT_SET, set_on=1234, setter_id=999)
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111,
+                               issue_id=78901, approval_values=[av_24])
+    self.services.issue.TestAddIssue(issue)
+
+    delta = tracker_pb2.ApprovalDelta(setter_id=111)
+    with self.work_env as we:
+      we.UpdateIssueApproval(
+          78901, 24, delta, 'Another Desc', True, kept_attachments=[1, 2, 3])
+
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    mockFilterKeptAttachments.assert_called_once_with(
+        True, [1, 2, 3], comments, 24)
+    self.services.issue.DeltaUpdateIssueApproval.assert_called_once_with(
+        self.mr.cnxn, 111, config, issue, av_24, delta,
+        comment_content='Another Desc', is_description=True,
+        attachments=None, kept_attachments=[1, 2])
+
+  def testUpdateIssueApproval_TooLongComment(self):
+    """We raise an exception if too long a comment is used when updating an
+        issue's approval value."""
+    self.services.issue.DeltaUpdateIssueApproval = mock.Mock()
+
+    self.SignIn()
+
+    config = fake.MakeTestConfig(789, [], [])
+    self.services.config.StoreConfig('cnxn', config)
+
+    av_24 = tracker_pb2.ApprovalValue(
+        approval_id=24,
+        approver_ids=[111],
+        status=tracker_pb2.ApprovalStatus.NOT_SET,
+        set_on=1234,
+        setter_id=999)
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'summary',
+        'Available',
+        111,
+        issue_id=78901,
+        approval_values=[av_24])
+    self.services.issue.TestAddIssue(issue)
+
+    delta = tracker_pb2.ApprovalDelta(
+        status=tracker_pb2.ApprovalStatus.REVIEW_REQUESTED,
+        set_on=2345,
+        approver_ids_add=[222])
+
+    with self.assertRaises(exceptions.InputException):
+      long_comment = '   ' + 'c' * tracker_constants.MAX_COMMENT_CHARS + '  '
+      self.work_env.UpdateIssueApproval(78901, 24, delta, long_comment, False)
+
+  def testUpdateIssueApproval_NonExistentUsers(self):
+    """We raise an exception if adding an approver that does not exist."""
+    self.services.issue.DeltaUpdateIssueApproval = mock.Mock()
+
+    self.SignIn()
+
+    config = fake.MakeTestConfig(789, [], [])
+    self.services.config.StoreConfig('cnxn', config)
+
+    av_24 = tracker_pb2.ApprovalValue(
+        approval_id=24,
+        approver_ids=[111],
+        status=tracker_pb2.ApprovalStatus.NOT_SET,
+        set_on=1234,
+        setter_id=999)
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'summary',
+        'Available',
+        111,
+        issue_id=78901,
+        approval_values=[av_24])
+    self.services.issue.TestAddIssue(issue)
+
+    delta = tracker_pb2.ApprovalDelta(
+        status=tracker_pb2.ApprovalStatus.REVIEW_REQUESTED,
+        set_on=2345,
+        approver_ids_add=[9876])
+
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 'users/9876: User does not exist.'):
+      comment = 'stuff'
+      self.work_env.UpdateIssueApproval(78901, 24, delta, comment, False)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testConvertIssueApprovalsTemplate(self, fake_pasicn):
+    """We can convert an issue's approvals to match template's approvals."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111)
+    issue.approval_values = [
+        tracker_pb2.ApprovalValue(
+            approval_id=3,
+            phase_id=4,
+            status=tracker_pb2.ApprovalStatus.APPROVED,
+            approver_ids=[111],
+        ),
+        tracker_pb2.ApprovalValue(
+            approval_id=4,
+            phase_id=5,
+            approver_ids=[111]),
+        tracker_pb2.ApprovalValue(approval_id=6)]
+    issue.phases = [
+        tracker_pb2.Phase(name='Expired', phase_id=4),
+        tracker_pb2.Phase(name='canary', phase_id=3)]
+    issue.field_values = [
+        tracker_bizobj.MakeFieldValue(8, None, 'Pink', None, None, None, False),
+        tracker_bizobj.MakeFieldValue(
+            9, None, 'Silver', None, None, None, False, phase_id=3),
+        tracker_bizobj.MakeFieldValue(
+            19, None, 'Orange', None, None, None, False, phase_id=4),
+        ]
+
+    self.services.issue._UpdateIssuesApprovals = mock.Mock()
+    self.SignIn()
+
+    template = testing_helpers.DefaultTemplates()[0]
+    template.approval_values = [
+        tracker_pb2.ApprovalValue(
+            approval_id=3,
+            phase_id=6,  # Different phase. Nothing else affected.
+            approver_ids=[222]),
+        # No phase. Nothing else affected.
+        tracker_pb2.ApprovalValue(approval_id=4),
+        # New approval not already found in issue.
+        tracker_pb2.ApprovalValue(
+            approval_id=7,
+            phase_id=5,
+            approver_ids=[222]),
+    ]  # No approval 6
+    template.phases = [tracker_pb2.Phase(name='Canary', phase_id=5),
+                       tracker_pb2.Phase(name='Stable-Exp', phase_id=6)]
+    self.services.template.GetTemplateByName.return_value = template
+
+    config = self.services.config.GetProjectConfig(self.cnxn, 789)
+    config.approval_defs = [
+        tracker_pb2.ApprovalDef(approval_id=3, survey='Question3'),
+        tracker_pb2.ApprovalDef(approval_id=4, survey='Question4'),
+        tracker_pb2.ApprovalDef(approval_id=7, survey='Question7'),
+    ]
+    config.field_defs = [
+      tracker_pb2.FieldDef(
+          field_id=3, project_id=789, field_name='Cow'),
+      tracker_pb2.FieldDef(
+          field_id=4, project_id=789, field_name='Chicken'),
+      tracker_pb2.FieldDef(
+          field_id=6, project_id=789, field_name='Llama'),
+      tracker_pb2.FieldDef(
+          field_id=7, project_id=789, field_name='Roo'),
+      tracker_pb2.FieldDef(
+          field_id=8, project_id=789, field_name='Salmon'),
+      tracker_pb2.FieldDef(
+          field_id=9, project_id=789, field_name='Tuna', is_phase_field=True),
+      tracker_pb2.FieldDef(
+          field_id=10, project_id=789, field_name='Clown', is_phase_field=True),
+    ]
+    self.work_env.ConvertIssueApprovalsTemplate(
+        config, issue, 'template_name', 'Convert', send_email=False)
+
+    expected_avs = [
+      tracker_pb2.ApprovalValue(
+            approval_id=3,
+            phase_id=6,
+            status=tracker_pb2.ApprovalStatus.APPROVED,
+            approver_ids=[111],
+        ),
+      tracker_pb2.ApprovalValue(
+          approval_id=4,
+          approver_ids=[111]),
+      tracker_pb2.ApprovalValue(
+          approval_id=7,
+          phase_id=5,
+          approver_ids=[222]),
+    ]
+    expected_fvs = [
+        tracker_bizobj.MakeFieldValue(8, None, 'Pink', None, None, None, False),
+        tracker_bizobj.MakeFieldValue(
+            9, None, 'Silver', None, None, None, False, phase_id=5),
+    ]
+    self.assertEqual(issue.approval_values, expected_avs)
+    self.assertEqual(issue.field_values, expected_fvs)
+    self.assertEqual(issue.phases, template.phases)
+    self.services.template.GetTemplateByName.assert_called_once_with(
+        self.mr.cnxn, 'template_name', 789)
+    fake_pasicn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', 111, send_email=False,
+        comment_id=mock.ANY)
+
+  def testConvertIssueApprovalsTemplate_NoSuchTemplate(self):
+    self.SignIn()
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111)
+    self.services.template.GetTemplateByName.return_value = None
+    config = self.services.config.GetProjectConfig(self.cnxn, 789)
+    with self.assertRaises(exceptions.NoSuchTemplateException):
+      self.work_env.ConvertIssueApprovalsTemplate(
+          config, issue, 'template_name', 'comment')
+
+  def testConvertIssueApprovalsTemplate_TooLongComment(self):
+    self.SignIn()
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111)
+    config = self.services.config.GetProjectConfig(self.cnxn, 789)
+    with self.assertRaises(exceptions.InputException):
+      long_comment = '   ' + 'c' * tracker_constants.MAX_COMMENT_CHARS + '  '
+      self.work_env.ConvertIssueApprovalsTemplate(
+          config, issue, 'template_name', long_comment)
+
+  def testConvertIssueApprovalsTemplate_MissingEditPermissions(self):
+    self.SignIn(self.user_2.user_id)
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', self.user_1.user_id)
+    config = self.services.config.GetProjectConfig(self.cnxn, 789)
+    with self.assertRaises(permissions.PermissionException):
+      self.work_env.ConvertIssueApprovalsTemplate(
+          config, issue, 'template_name', 'comment')
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_Normal(self, fake_pasicn, fake_pasibn):
+    """We can update an issue."""
+    self.SignIn()
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 0)
+    self.services.issue.TestAddIssue(issue)
+
+    fd = tracker_pb2.FieldDef(
+        field_name='CustomField',
+        field_id=1,
+        field_type=tracker_pb2.FieldTypes.STR_TYPE)
+    res_fd = tracker_pb2.FieldDef(
+        field_name='ResField',
+        field_id=2,
+        field_type=tracker_pb2.FieldTypes.STR_TYPE,
+        is_restricted_field=True,
+        admin_ids=[111])
+    res_fd2 = tracker_pb2.FieldDef(
+        field_name='ResEnumField',
+        field_id=3,
+        field_type=tracker_pb2.FieldTypes.ENUM_TYPE,
+        is_restricted_field=True,
+        editor_ids=[111])
+    config = self.services.config.GetProjectConfig(self.cnxn, 789)
+    config.field_defs = [fd, res_fd, res_fd2]
+    self.services.config.StoreConfig(None, config)
+
+    fv = tracker_pb2.FieldValue(field_id=1, str_value='Chicken')
+    res_fv = tracker_pb2.FieldValue(field_id=2, str_value='Dog')
+    delta = tracker_pb2.IssueDelta(
+        owner_id=111,
+        summary='New summary',
+        cc_ids_add=[333],
+        field_vals_add=[fv, res_fv],
+        labels_add=['resenumfield-b'])
+
+    with self.work_env as we:
+      we.UpdateIssue(issue, delta, 'Getting started')
+
+    self.assertEqual(111, issue.owner_id)
+    self.assertEqual('New summary', issue.summary)
+    self.assertEqual([333], issue.cc_ids)
+    self.assertEqual([fv, res_fv], issue.field_values)
+    self.assertEqual(['resenumfield-b'], issue.labels)
+    self.assertEqual([issue.issue_id], self.services.issue.enqueued_issues)
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    comment_pb = comments[-1]
+    self.assertFalse(comment_pb.is_description)
+    fake_pasicn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', 111, send_email=True,
+        old_owner_id=0, comment_id=comment_pb.id)
+    fake_pasibn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', [], 111, send_email=True)
+
+  def testUpdateIssue_RejectEditRestrictedField(self):
+    """We can update an issue."""
+    self.SignIn()
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 0)
+    self.services.issue.TestAddIssue(issue)
+
+    fd = tracker_pb2.FieldDef(
+        field_name='CustomField',
+        field_id=1,
+        field_type=tracker_pb2.FieldTypes.STR_TYPE)
+    res_fd = tracker_pb2.FieldDef(
+        field_name='ResField',
+        field_id=2,
+        field_type=tracker_pb2.FieldTypes.STR_TYPE,
+        is_restricted_field=True)
+    res_fd2 = tracker_pb2.FieldDef(
+        field_name='ResEnumField',
+        field_id=3,
+        field_type=tracker_pb2.FieldTypes.ENUM_TYPE,
+        is_restricted_field=True)
+    config = self.services.config.GetProjectConfig(self.cnxn, 789)
+    config.field_defs = [fd, res_fd, res_fd2]
+    self.services.config.StoreConfig(None, config)
+
+    fv = tracker_pb2.FieldValue(field_id=1, str_value='Chicken')
+    res_fv = tracker_pb2.FieldValue(field_id=2, str_value='Dog')
+    delta_res_field_val = tracker_pb2.IssueDelta(
+        owner_id=111,
+        summary='New summary',
+        cc_ids_add=[333],
+        field_vals_add=[fv, res_fv])
+    delta_res_enum = tracker_pb2.IssueDelta(
+        owner_id=111,
+        summary='New summary',
+        cc_ids_add=[333],
+        field_vals_add=[fv],
+        labels_add=['resenumfield-b'])
+
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.UpdateIssue(issue, delta_res_field_val, 'Getting Started')
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.UpdateIssue(issue, delta_res_enum, 'Getting Started')
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_EditDescription(self, fake_pasicn, fake_pasibn):
+    """We can edit an issue description."""
+    self.SignIn()
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta()
+
+    with self.work_env as we:
+      we.UpdateIssue(issue, delta, 'New description', is_description=True)
+
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    comment_pb = comments[-1]
+    self.assertTrue(comment_pb.is_description)
+    fake_pasicn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', 111, send_email=True,
+        old_owner_id=111, comment_id=comment_pb.id)
+    fake_pasibn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', [], 111, send_email=True)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_NotAllowedToEditDescription(
+      self, fake_pasicn, fake_pasibn):
+    """We cannot edit an issue description without EditIssue permission."""
+    self.SignIn(222)
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta()
+
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.UpdateIssue(issue, delta, 'New description', is_description=True)
+
+    fake_pasicn.assert_not_called()
+    fake_pasibn.assert_not_called()
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_EditTooLongComment(self, fake_pasicn, fake_pasibn):
+    """We cannot edit an issue description with too long a comment."""
+    self.SignIn(222)
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta()
+
+    with self.assertRaises(exceptions.InputException):
+      long_comment = '   ' + 'c' * tracker_constants.MAX_COMMENT_CHARS + '  '
+      with self.work_env as we:
+        we.UpdateIssue(issue, delta, long_comment)
+
+    fake_pasicn.assert_not_called()
+    fake_pasibn.assert_not_called()
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_AddTooLongComment(self, fake_pasicn, fake_pasibn):
+    """We cannot add too long a comment."""
+    self.SignIn()
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta()
+
+    with self.assertRaises(exceptions.InputException):
+      long_comment = '   ' + 'c' * tracker_constants.MAX_COMMENT_CHARS + '  '
+      with self.work_env as we:
+        we.UpdateIssue(issue, delta, long_comment)
+
+    fake_pasicn.assert_not_called()
+    fake_pasibn.assert_not_called()
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_AddComment(self, fake_pasicn, fake_pasibn):
+    """We can add a comment."""
+    self.SignIn(222)
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta()
+
+    with self.work_env as we:
+      we.UpdateIssue(issue, delta, 'New description')
+
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    comment_pb = comments[-1]
+    self.assertFalse(comment_pb.is_description)
+    fake_pasicn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', 222, send_email=True,
+        old_owner_id=111, comment_id=comment_pb.id)
+    fake_pasibn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', [], 222, send_email=True)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_AddComment_NoEmail(self, fake_pasicn, fake_pasibn):
+    """We can add a comment without sending email."""
+    self.SignIn(222)
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta()
+
+    with self.work_env as we:
+      we.UpdateIssue(issue, delta, 'New description', send_email=False)
+
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    comment_pb = comments[-1]
+    self.assertFalse(comment_pb.is_description)
+    fake_pasicn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', 222, send_email=False,
+        old_owner_id=111, comment_id=comment_pb.id)
+    fake_pasibn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', [], 222, send_email=False)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('framework.permissions.GetExtraPerms')
+  def testUpdateIssue_EditOwner(
+      self, fake_extra_perms, fake_pasicn, fake_pasibn):
+    """We can edit the owner with the EditIssueOwner permission."""
+    self.SignIn(222)
+    fake_extra_perms.return_value = [permissions.EDIT_ISSUE_OWNER]
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta(owner_id=0)
+
+    with self.work_env as we:
+      we.UpdateIssue(issue, delta, '')
+
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    comment_pb = comments[-1]
+    self.assertFalse(comment_pb.is_description)
+    self.assertEqual(0, issue.owner_id)
+    fake_pasicn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', 222, send_email=True,
+        old_owner_id=111, comment_id=comment_pb.id)
+    fake_pasibn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', [], 222, send_email=True)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('framework.permissions.GetExtraPerms')
+  def testUpdateIssue_EditSummary(
+      self, fake_extra_perms, fake_pasicn, fake_pasibn):
+    """We can edit the owner with the EditIssueOwner permission."""
+    self.SignIn(222)
+    fake_extra_perms.return_value = [permissions.EDIT_ISSUE_SUMMARY]
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta(summary='New Summary')
+
+    with self.work_env as we:
+      we.UpdateIssue(issue, delta, '')
+
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    comment_pb = comments[-1]
+    self.assertFalse(comment_pb.is_description)
+    self.assertEqual('New Summary', issue.summary)
+    fake_pasicn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', 222, send_email=True,
+        old_owner_id=111, comment_id=comment_pb.id)
+    fake_pasibn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', [], 222, send_email=True)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('framework.permissions.GetExtraPerms')
+  def testUpdateIssue_EditStatus(
+      self, fake_extra_perms, fake_pasicn, fake_pasibn):
+    """We can edit the owner with the EditIssueOwner permission."""
+    self.SignIn(222)
+    fake_extra_perms.return_value = [permissions.EDIT_ISSUE_STATUS]
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta(status='Fixed')
+
+    with self.work_env as we:
+      we.UpdateIssue(issue, delta, '')
+
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    comment_pb = comments[-1]
+    self.assertFalse(comment_pb.is_description)
+    self.assertEqual('Fixed', issue.status)
+    fake_pasicn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', 222, send_email=True,
+        old_owner_id=111, comment_id=comment_pb.id)
+    fake_pasibn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', [], 222, send_email=True)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('framework.permissions.GetExtraPerms')
+  def testUpdateIssue_EditCC(self, fake_extra_perms, _fake_pasicn):
+    """We can edit the owner with the EditIssueOwner permission."""
+    self.SignIn(222)
+    fake_extra_perms.return_value = [permissions.EDIT_ISSUE_CC]
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    issue.cc_ids = [111]
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta(cc_ids_add=[222])
+
+    with self.work_env as we:
+      we.UpdateIssue(issue, delta, '')
+
+    self.assertEqual([111, 222], issue.cc_ids)
+    delta = tracker_pb2.IssueDelta(cc_ids_remove=[111])
+
+    with self.work_env as we:
+      we.UpdateIssue(issue, delta, '')
+
+    self.assertEqual([222], issue.cc_ids)
+
+  def testUpdateIssue_BadOwner(self):
+    """We reject new issue owners that don't pass validation."""
+    self.SignIn()
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+
+    # No such user ID.
+    delta = tracker_pb2.IssueDelta(owner_id=555)
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException) as cm:
+        we.UpdateIssue(issue, delta, '')
+    self.assertEqual('Issue owner user ID not found.',
+                     cm.exception.message)
+
+    # Not a member
+    delta = tracker_pb2.IssueDelta(owner_id=222)
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException) as cm:
+        we.UpdateIssue(issue, delta, '')
+    self.assertEqual('Issue owner must be a project member.',
+                     cm.exception.message)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_MergeInto(self, fake_pasicn, fake_pasibn):
+    """We can merge Issue 1 (merged_issue) into Issue 2 (merged_into_issue),
+       including CCs and starrers."""
+    self.SignIn()
+    merged_issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    merged_into_issue = fake.MakeTestIssue(789, 2, 'summary2', 'Available', 111)
+    self.services.issue.TestAddIssue(merged_issue)
+    self.services.issue.TestAddIssue(merged_into_issue)
+    delta = tracker_pb2.IssueDelta(
+        merged_into=merged_into_issue.issue_id, status='Duplicate')
+
+    merged_issue.cc_ids = [111, 222, 333, 444]
+    self.services.issue_star.SetStarsBatch(
+        'cnxn', 'service', 'config', merged_issue.issue_id, [111, 222, 333],
+        True)
+    self.services.issue_star.SetStarsBatch(
+        'cnxn', 'service', 'config', merged_into_issue.issue_id, [555], True)
+    with self.work_env as we:
+      we.UpdateIssue(merged_issue, delta, '')
+
+    merged_into_issue_comments = self.services.issue.GetCommentsForIssue(
+        'cnxn', merged_into_issue.issue_id)
+
+    # Original issue marked as duplicate.
+    self.assertEqual('Duplicate', merged_issue.status)
+    # Target issue has original issue's CCs.
+    self.assertEqual([444, 333, 222, 111], merged_into_issue.cc_ids)
+    # A comment was added to the target issue.
+    merged_into_issue_comment = merged_into_issue_comments[-1]
+    self.assertEqual(
+        'Issue 1 has been merged into this issue.',
+        merged_into_issue_comment.content)
+    source_starrers = self.services.issue_star.LookupItemStarrers(
+        'cnxn', merged_issue.issue_id)
+    self.assertItemsEqual([111, 222, 333], source_starrers)
+    target_starrers = self.services.issue_star.LookupItemStarrers(
+        'cnxn', merged_into_issue.issue_id)
+    self.assertItemsEqual([111, 222, 333, 555], target_starrers)
+    # Notifications should be sent for both
+    # the merged issue and the merged_into issue.
+    merged_issue_comments = self.services.issue.GetCommentsForIssue(
+        'cnxn', merged_issue.issue_id)
+    merged_issue_comment = merged_issue_comments[-1]
+    hostport = 'testing-app.appspot.com'
+    execute_calls = [
+        mock.call(
+            merged_into_issue.issue_id,
+            hostport,
+            111,
+            send_email=True,
+            comment_id=merged_into_issue_comment.id),
+        mock.call(
+            merged_issue.issue_id,
+            hostport,
+            111,
+            send_email=True,
+            old_owner_id=111,
+            comment_id=merged_issue_comment.id)
+    ]
+    fake_pasicn.assert_has_calls(execute_calls)
+    self.assertEqual(2, fake_pasicn.call_count)
+    fake_pasibn.assert_called_once_with(
+        merged_issue.issue_id, hostport, [], 111, send_email=True)
+
+  def testUpdateIssue_MergeIntoRestrictedIssue(self):
+    """We cannot merge into an issue we cannot view and edit."""
+    self.SignIn(333)
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    issue2 = fake.MakeTestIssue(789, 2, 'summary2', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+    self.services.issue.TestAddIssue(issue2)
+
+    delta = tracker_pb2.IssueDelta(
+        merged_into=issue2.issue_id,
+        status='Duplicate')
+
+    issue2.labels = ['Restrict-View-Foo']
+    with self.work_env as we:
+      with self.assertRaises(permissions.PermissionException):
+        we.UpdateIssue(issue, delta, '')
+
+    issue2.labels = ['Restrict-EditIssue-Foo']
+    with self.work_env as we:
+      with self.assertRaises(permissions.PermissionException):
+        we.UpdateIssue(issue, delta, '')
+
+    # Original issue still available.
+    self.assertEqual('Available', issue.status)
+    # Target issue was not modified.
+    self.assertEqual([], issue2.cc_ids)
+    # No comment was added.
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue2.issue_id)
+    self.assertEqual(1, len(comments))
+
+  def testUpdateIssue_MergeIntoItself(self):
+    """We cannot merge an issue into itself."""
+    self.SignIn()
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta(
+        merged_into=issue.issue_id,
+        status='Duplicate')
+
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException) as cm:
+        we.UpdateIssue(issue, delta, '')
+    self.assertEqual('Cannot merge an issue into itself.', cm.exception.message)
+
+    # Original issue still available.
+    self.assertEqual('Available', issue.status)
+    # No comment was added.
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    self.assertEqual(1, len(comments))
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_BlockOn(self, fake_pasicn, fake_pasibn):
+    """We can block an issue on an existing issue."""
+    self.SignIn()
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    upstream_issue = fake.MakeTestIssue(789, 2, 'umbrella', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+
+    delta = tracker_pb2.IssueDelta(blocked_on_add=[upstream_issue.issue_id])
+    with self.work_env as we:
+      we.UpdateIssue(issue, delta, '')
+
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    comment_pb = comments[-1]
+    self.assertEqual([upstream_issue.issue_id], issue.blocked_on_iids)
+    fake_pasicn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', 111, send_email=True,
+        old_owner_id=111, comment_id=comment_pb.id)
+    fake_pasibn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', [upstream_issue.issue_id],
+        111, send_email=True)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_BlockOnItself(self, fake_pasicn, fake_pasibn):
+    """We cannot block an issue on itself."""
+    self.SignIn()
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+
+    delta = tracker_pb2.IssueDelta(blocked_on_add=[issue.issue_id])
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException) as cm:
+        we.UpdateIssue(issue, delta, '')
+    self.assertEqual('Cannot block an issue on itself.', cm.exception.message)
+
+    delta = tracker_pb2.IssueDelta(blocking_add=[issue.issue_id])
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException) as cm:
+        we.UpdateIssue(issue, delta, '')
+    self.assertEqual('Cannot block an issue on itself.', cm.exception.message)
+
+    # Original issue was not modified.
+    self.assertEqual(0, len(issue.blocked_on_iids))
+    self.assertEqual(0, len(issue.blocking_iids))
+    # No comment was added.
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    self.assertEqual(1, len(comments))
+    fake_pasicn.assert_not_called()
+    fake_pasibn.assert_not_called()
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_Attachments(self, fake_pasicn, fake_pasibn):
+    """We can attach files as we make a change."""
+    self.SignIn()
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 0)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta(
+        owner_id=111, summary='New summary', cc_ids_add=[333])
+
+    attachments = []
+    with self.work_env as we:
+      we.UpdateIssue(issue, delta, 'Getting started', attachments=attachments)
+
+    self.assertEqual(111, issue.owner_id)
+    self.assertEqual('New summary', issue.summary)
+    self.assertEqual([333], issue.cc_ids)
+    self.assertEqual([issue.issue_id], self.services.issue.enqueued_issues)
+
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    comment_pb = comments[-1]
+    self.assertEqual([], comment_pb.attachments)
+    fake_pasicn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', 111, send_email=True,
+        old_owner_id=0, comment_id=comment_pb.id)
+    fake_pasibn.assert_called_with(
+        issue.issue_id, 'testing-app.appspot.com', [], 111, send_email=True)
+
+    attachments = [
+        ('README.md', 'readme content', 'text/plain'),
+        ('hello.txt', 'hello content', 'text/plain')]
+    with self.work_env as we:
+      we.UpdateIssue(issue, delta, 'Getting started', attachments=attachments)
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    comment_pb = comments[-1]
+    self.assertEqual(2, len(comment_pb.attachments))
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_KeptAttachments(self, _fake_pasicn):
+    """We can attach files as we make a change."""
+    self.SignIn()
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 111)
+    self.services.issue.TestAddIssue(issue)
+
+    # Add some initial attachments
+    delta = tracker_pb2.IssueDelta()
+    attachments = [
+        ('README.md', 'readme content', 'text/plain'),
+        ('hello.txt', 'hello content', 'text/plain')]
+    with self.work_env as we:
+      we.UpdateIssue(
+          issue, delta, 'New Description', attachments=attachments,
+          is_description=True)
+
+    with self.work_env as we:
+      we.UpdateIssue(
+          issue, delta, 'Yet Another Description', is_description=True,
+          kept_attachments=[1, 2, 3])
+
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    comment_pb = comments[-1]
+    self.assertEqual(1, len(comment_pb.attachments))
+    self.assertEqual('hello.txt', comment_pb.attachments[0].filename)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueBlockingNotification')
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_PermissionDenied(self, fake_pasicn, fake_pasibn):
+    """We reject attempts to update an issue when the user lacks permission."""
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 555)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta(
+        owner_id=222, summary='New summary', cc_ids_add=[333])
+
+    with self.work_env as we:
+      # User is not signed in.
+      with self.assertRaises(permissions.PermissionException):
+        we.UpdateIssue(issue, delta, 'I am anon')
+
+      # User signed in to acconut that can view but not edit.
+      self.SignIn(user_id=222)
+      with self.assertRaises(permissions.PermissionException):
+        we.UpdateIssue(issue, delta, 'I am not a project member')
+
+      # User signed in to acconut that can view and edit, but issue
+      # restricts edits to a perm that the user lacks.
+      self.SignIn(user_id=111)
+      issue.labels.append('Restrict-EditIssue-CoreTeam')
+      with self.assertRaises(permissions.PermissionException):
+        we.UpdateIssue(issue, delta, 'I lack CoreTeam')
+
+    fake_pasicn.assert_not_called()
+    fake_pasibn.assert_not_called()
+
+  @mock.patch(
+      'settings.preferred_domains', {'testing-app.appspot.com': 'example.com'})
+  @mock.patch(
+      'settings.branded_domains', {'proj': 'branded.com'})
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testUpdateIssue_BrandedDomain(self, fake_pasicn):
+    """Updating an issue in project with branded domain uses that domain."""
+    self.SignIn()
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'Available', 0)
+    self.services.issue.TestAddIssue(issue)
+    delta = tracker_pb2.IssueDelta(
+        owner_id=111, summary='New summary', cc_ids_add=[333])
+
+    with self.work_env as we:
+      we.UpdateIssue(issue, delta, 'Getting started')
+
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue.issue_id)
+    comment_pb = comments[-1]
+    hostport = 'branded.com'
+    fake_pasicn.assert_called_with(
+        issue.issue_id, hostport, 111, send_email=True,
+        old_owner_id=0, comment_id=comment_pb.id)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('features.send_notifications.SendIssueBulkChangeNotification')
+  @mock.patch('time.time')
+  def testModifyIssues_WeirdDeltas(
+      self, fake_time, fake_bulk_notify, fake_notify):
+    """Test that ModifyIssues does not panic with weird deltas."""
+    fake_time.return_value = self.PAST_TIME
+
+    # Issues merge into each other.
+    issue_merge_a = _Issue(789, 1)
+    issue_merge_b = _Issue(789, 2)
+
+    delta_merge_a = tracker_pb2.IssueDelta(
+        merged_into=issue_merge_b.issue_id, status='Duplicate')
+    delta_merge_b = tracker_pb2.IssueDelta(
+        merged_into=issue_merge_a.issue_id, status='Duplicate')
+
+    exp_merge_a = copy.deepcopy(issue_merge_a)
+    exp_merge_a.merged_into = issue_merge_b.issue_id
+    exp_merge_a.status = 'Duplicate'
+    exp_merge_a.status_modified_timestamp = self.PAST_TIME
+    exp_amendments_merge_a = [
+        tracker_bizobj.MakeStatusAmendment('Duplicate', ''),
+        tracker_bizobj.MakeMergedIntoAmendment(
+            [(issue_merge_b.project_name, issue_merge_b.local_id)], [],
+            default_project_name=issue_merge_a.project_name)
+    ]
+
+    exp_merge_a_imp_content = work_env.MERGE_COMMENT % issue_merge_b.local_id
+    exp_merge_b = copy.deepcopy(issue_merge_b)
+    exp_merge_b.merged_into = exp_merge_a.issue_id
+    exp_merge_b.status = 'Duplicate'
+    exp_merge_b.status_modified_timestamp = self.PAST_TIME
+    exp_amendments_merge_b = [
+        tracker_bizobj.MakeStatusAmendment('Duplicate', ''),
+        tracker_bizobj.MakeMergedIntoAmendment(
+            [(issue_merge_a.project_name, issue_merge_a.local_id)], [],
+            default_project_name=issue_merge_b.project_name)
+    ]
+
+    exp_merge_b_imp_content = work_env.MERGE_COMMENT % issue_merge_a.local_id
+
+    # Issues that block each other.
+    issue_block_a = _Issue(789, 5)
+    issue_block_b = _Issue(789, 6)
+
+    delta_block_a = tracker_pb2.IssueDelta(
+        blocking_add=[issue_block_b.issue_id])
+    delta_block_b = tracker_pb2.IssueDelta(
+        blocking_add=[issue_block_a.issue_id])
+
+    exp_block_a = copy.deepcopy(issue_block_a)
+    exp_block_a.blocking_iids = [issue_block_b.issue_id]
+    exp_block_a.blocked_on_iids = [issue_block_b.issue_id]
+    exp_amendments_block_a = [tracker_bizobj.MakeBlockingAmendment(
+        [(issue_block_b.project_name, issue_block_b.local_id)], [],
+        default_project_name=issue_block_a.project_name)]
+    exp_amendments_block_a_imp = [tracker_bizobj.MakeBlockedOnAmendment(
+        [(issue_block_b.project_name, issue_block_b.local_id)], [],
+        default_project_name=issue_block_a.project_name)]
+
+    exp_block_b = copy.deepcopy(issue_block_b)
+    exp_block_b.blocking_iids = [issue_block_a.issue_id]
+    exp_block_b.blocked_on_iids = [issue_block_a.issue_id]
+    exp_amendments_block_b = [tracker_bizobj.MakeBlockingAmendment(
+        [(issue_block_a.project_name, issue_block_a.local_id)], [],
+        default_project_name=issue_block_b.project_name)]
+    exp_amendments_block_b_imp = [tracker_bizobj.MakeBlockedOnAmendment(
+        [(issue_block_a.project_name, issue_block_a.local_id)], [],
+        default_project_name=issue_block_b.project_name)]
+
+    # By default new blocked_on issues that appear in blocked_on_iids
+    # with no prior rank associated with it are un-ranked and assigned rank 0.
+    # See SortBlockedOn in issue_svc.py.
+    exp_block_a.blocked_on_ranks = [0]
+    exp_block_b.blocked_on_ranks = [0]
+
+    self.services.issue.TestAddIssue(issue_merge_a)
+    self.services.issue.TestAddIssue(issue_merge_b)
+    self.services.issue.TestAddIssue(issue_block_a)
+    self.services.issue.TestAddIssue(issue_block_b)
+
+    self.mr.cnxn = mock.Mock()
+    self.mr.cnxn.Commit = mock.Mock()
+    self.services.issue.EnqueueIssuesForIndexing = mock.Mock()
+    issue_delta_pairs = [(issue_merge_a.issue_id, delta_merge_a),
+                         (issue_merge_b.issue_id, delta_merge_b),
+                         (issue_block_a.issue_id, delta_block_a),
+                         (issue_block_b.issue_id, delta_block_b)]
+
+    content = 'Je suis un ananas.'
+    self.SignIn(self.user_1.user_id)
+    send_email = False
+    with self.work_env as we:
+      actual_issues = we.ModifyIssues(
+          issue_delta_pairs,
+          False,
+          comment_content=content,
+          send_email=send_email)
+
+    # We expect all issues to have a description comment and the comment(s)
+    # added from the ModifyIssues() changes.
+    def CheckComment(
+        issue_id, exp_amendments, exp_amendments_imp, imp_comment_content=''):
+      (_desc, comment, comment_imp
+      ) = self.services.issue.comments_by_iid[issue_id]
+      self.assertEqual(comment.amendments, exp_amendments)
+      self.assertEqual(comment.content, content)
+      self.assertEqual(comment_imp.amendments, exp_amendments_imp)
+      self.assertEqual(comment_imp.content, imp_comment_content)
+      return comment, comment_imp
+
+    # Merge changes result in a MERGEDINTO Amendment for an
+    # Issue's mergedInto change (e.g. MergedInto: 1)
+    # and comment content for the impacted issue's change (with no amendment).
+    # (e.g. 'Issue 2 has been merged into the this issue.')
+    comment_merge_a, comment_merge_a_imp = CheckComment(
+        issue_merge_a.issue_id,
+        exp_amendments_merge_a, [],
+        imp_comment_content=exp_merge_a_imp_content)
+    comment_merge_b, comment_merge_b_imp = CheckComment(
+        issue_merge_b.issue_id,
+        exp_amendments_merge_b, [],
+        imp_comment_content=exp_merge_b_imp_content)
+
+    comment_block_a, comment_block_a_imp = CheckComment(
+        issue_block_a.issue_id, exp_amendments_block_a,
+        exp_amendments_block_a_imp)
+    comment_block_b, comment_block_b_imp = CheckComment(
+        issue_block_b.issue_id, exp_amendments_block_b,
+        exp_amendments_block_b_imp)
+
+    exp_issues = [exp_merge_a, exp_merge_b, exp_block_a, exp_block_b]
+    self.assertEqual(len(actual_issues), len(exp_issues))
+    for exp_issue in exp_issues:
+      # All updated issues should have been fetched from DB, skipping cache.
+      # So we expect assume_stale=False was applied to all issues during the
+      # the fetch.
+      exp_issue.assume_stale = False
+      # These derived values get set to the following when an issue goes through
+      # the ApplyFilterRules path. (see filter_helpers._ComputeDerivedFields)
+      exp_issue.derived_status = ''
+      exp_issue.derived_owner_id = 0
+
+      exp_issue.modified_timestamp = self.PAST_TIME
+
+      # Check we successfully updated the issue in our services layer.
+      self.assertEqual(exp_issue, self.services.issue.GetIssue(
+        self.cnxn, exp_issue.issue_id))
+      # Check the issue was successfully returned.
+      self.assertTrue(exp_issue in actual_issues)
+
+    # Check issues enqueued for indexing.
+    reindex_iids = {issue.issue_id for issue in exp_issues}
+    self.services.issue.EnqueueIssuesForIndexing.assert_called_once_with(
+        self.mr.cnxn, reindex_iids, commit=False)
+    self.mr.cnxn.Commit.assert_called_once()
+
+    hostport = 'testing-app.appspot.com'
+    expected_notify_calls = [
+        # Notifications for main changes.
+        mock.call(
+            issue_merge_a.issue_id,
+            hostport,
+            self.user_1.user_id,
+            old_owner_id=None,
+            comment_id=comment_merge_a.id,
+            send_email=send_email),
+        mock.call(
+            issue_merge_b.issue_id,
+            hostport,
+            self.user_1.user_id,
+            old_owner_id=None,
+            comment_id=comment_merge_b.id,
+            send_email=send_email),
+        mock.call(
+            issue_block_a.issue_id,
+            hostport,
+            self.user_1.user_id,
+            old_owner_id=None,
+            comment_id=comment_block_a.id,
+            send_email=send_email),
+        mock.call(
+            issue_block_b.issue_id,
+            hostport,
+            self.user_1.user_id,
+            old_owner_id=None,
+            comment_id=comment_block_b.id,
+            send_email=send_email),
+        # Notifications for impacted changes.
+        mock.call(
+            issue_merge_a.issue_id,
+            hostport,
+            self.user_1.user_id,
+            comment_id=comment_merge_a_imp.id,
+            send_email=send_email),
+        mock.call(
+            issue_merge_b.issue_id,
+            hostport,
+            self.user_1.user_id,
+            comment_id=comment_merge_b_imp.id,
+            send_email=send_email),
+        mock.call(
+            issue_block_a.issue_id,
+            hostport,
+            self.user_1.user_id,
+            comment_id=comment_block_a_imp.id,
+            send_email=send_email),
+        mock.call(
+            issue_block_b.issue_id,
+            hostport,
+            self.user_1.user_id,
+            comment_id=comment_block_b_imp.id,
+            send_email=send_email),
+    ]
+    fake_notify.assert_has_calls(expected_notify_calls, any_order=True)
+    fake_bulk_notify.assert_not_called()
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('features.send_notifications.SendIssueBulkChangeNotification')
+  @mock.patch('time.time')
+  def testModifyIssues(self, fake_time, fake_bulk_notify, fake_notify):
+    fake_time.return_value = self.PAST_TIME
+
+    # A main issue with noop delta.
+    issue_noop = _Issue(789, 1)
+    issue_noop.labels = ['chicken']
+    delta_noop = tracker_pb2.IssueDelta(labels_add=issue_noop.labels)
+
+    exp_issue_noop = copy.deepcopy(issue_noop)
+    exp_amendments_noop = []
+
+    # A main issue with an empty delta and impacts from
+    # issue_shared_a and issue_shared_b.
+    issue_empty = _Issue(789, 2)
+    delta_empty = tracker_pb2.IssueDelta()
+
+    exp_issue_empty = copy.deepcopy(issue_empty)
+    exp_amendments_empty = []
+    exp_amendments_empty_imp = []
+
+    # A main issue with a shared delta_shared.
+    issue_shared_a = _Issue(789, 3)
+    delta_shared = tracker_pb2.IssueDelta(
+        owner_id=self.user_1.user_id, blocked_on_add=[issue_empty.issue_id])
+
+    exp_issue_shared_a = copy.deepcopy(issue_shared_a)
+    exp_issue_shared_a.owner_modified_timestamp = self.PAST_TIME
+    exp_issue_shared_a.owner_id = self.user_1.user_id
+    exp_issue_shared_a.blocked_on_iids.append(issue_empty.issue_id)
+    # By default new blocked_on issues that appear in blocked_on_iids
+    # with no prior rank associated with it are un-ranked and assigned rank 0.
+    # See SortBlockedOn in issue_svc.py.
+    exp_issue_shared_a.blocked_on_ranks = [0]
+    exp_amendments_shared_a = [
+        tracker_bizobj.MakeOwnerAmendment(
+            delta_shared.owner_id, issue_shared_a.owner_id),
+        tracker_bizobj.MakeBlockedOnAmendment(
+            [(issue_empty.project_name, issue_empty.local_id)], [],
+            default_project_name=issue_shared_a.project_name)]
+    exp_issue_empty.blocking_iids.append(issue_shared_a.issue_id)
+
+    # A main issue with a shared delta_shared.
+    issue_shared_b = _Issue(789, 4)
+
+    exp_issue_shared_b = copy.deepcopy(issue_shared_b)
+    exp_issue_shared_b.owner_modified_timestamp = self.PAST_TIME
+    exp_issue_shared_b.owner_id = delta_shared.owner_id
+    exp_issue_shared_b.blocked_on_iids.append(issue_empty.issue_id)
+    exp_issue_shared_b.blocked_on_ranks = [0]
+
+    exp_amendments_shared_b = [
+        tracker_bizobj.MakeOwnerAmendment(
+            delta_shared.owner_id, issue_shared_b.owner_id),
+        tracker_bizobj.MakeBlockedOnAmendment(
+            [(issue_empty.project_name, issue_empty.local_id)], [],
+            default_project_name=issue_shared_b.project_name)]
+    exp_issue_empty.blocking_iids.append(issue_shared_b.issue_id)
+
+    added_refs = [(issue_shared_b.project_name, issue_shared_b.local_id),
+                  (issue_shared_a.project_name, issue_shared_a.local_id)]
+    exp_amendments_empty_imp.append(tracker_bizobj.MakeBlockingAmendment(
+        added_refs, [], default_project_name=issue_empty.project_name))
+
+    # Issues impacted by issue_unique.
+    imp_issue_a = _Issue(789, 11)
+    imp_issue_a.owner_id = self.user_1.user_id
+    imp_issue_b = _Issue(789, 12)
+
+    exp_imp_issue_a = copy.deepcopy(imp_issue_a)
+    exp_imp_issue_b = copy.deepcopy(imp_issue_b)
+
+    # A main issue with a unique delta and impact on imp_issue_{a|b}.
+    issue_unique = _Issue(789, 5)
+    issue_unique.merged_into = imp_issue_b.issue_id
+    delta_unique = tracker_pb2.IssueDelta(
+        merged_into=imp_issue_a.issue_id, status='Duplicate')
+
+    exp_issue_unique = copy.deepcopy(issue_unique)
+    exp_issue_unique.merged_into = imp_issue_a.issue_id
+    exp_issue_unique.status = 'Duplicate'
+    exp_issue_unique.status_modified_timestamp = self.PAST_TIME
+    exp_amendments_unique = [
+        tracker_bizobj.MakeStatusAmendment('Duplicate', ''),
+        tracker_bizobj.MakeMergedIntoAmendment(
+            [(imp_issue_a.project_name, imp_issue_a.local_id)],
+            [(imp_issue_b.project_name, imp_issue_b.local_id)],
+            default_project_name=issue_unique.project_name)
+    ]
+
+    # We star issue_5 and expect this star to be merged into imp_issue.
+    exp_imp_starrer = 444
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, None, issue_unique.issue_id,
+        exp_imp_starrer, True)
+    exp_imp_issue_a.star_count = 1
+
+    # Add a FilterRule for star_count to check filter rules are applied.
+    starred_label = 'starry-night'
+    self.services.features.TestAddFilterRule(
+        789, 'stars=1', add_labels=[starred_label])
+    exp_imp_issue_a.derived_labels.append(starred_label)
+
+    # Setting status away from a MERGED type auto-removes any merged_into.
+    issue_unmerged = _Issue(789, 6)
+    issue_unmerged.merged_into_external = 'b/123'
+    issue_unmerged.status = 'Duplicate'
+    delta_unmerged = tracker_pb2.IssueDelta(status='Available')
+
+    exp_issue_unmerged = copy.deepcopy(issue_unmerged)
+    exp_issue_unmerged.status = 'Available'
+    exp_issue_unmerged.merged_into_external = ''
+    exp_issue_unmerged.merged_into = 0
+    exp_issue_unmerged.status_modified_timestamp = self.PAST_TIME
+    exp_amendments_unmerged = [
+        tracker_bizobj.MakeStatusAmendment('Available', 'Duplicate'),
+        tracker_bizobj.MakeMergedIntoAmendment(
+            [], [tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/123')])
+    ]
+
+    self.services.issue.TestAddIssue(imp_issue_a)
+    self.services.issue.TestAddIssue(imp_issue_b)
+    self.services.issue.TestAddIssue(issue_noop)
+    self.services.issue.TestAddIssue(issue_empty)
+    self.services.issue.TestAddIssue(issue_shared_a)
+    self.services.issue.TestAddIssue(issue_shared_b)
+    self.services.issue.TestAddIssue(issue_unique)
+    self.services.issue.TestAddIssue(issue_unmerged)
+
+    issue_delta_pairs = [
+        (issue_noop.issue_id, delta_noop), (issue_empty.issue_id, delta_empty),
+        (issue_shared_a.issue_id, delta_shared),
+        (issue_shared_b.issue_id, delta_shared),
+        (issue_unique.issue_id, delta_unique),
+        (issue_unmerged.issue_id, delta_unmerged)
+    ]
+    self.mr.cnxn = mock.Mock()
+    self.mr.cnxn.Commit = mock.Mock()
+    self.services.issue.EnqueueIssuesForIndexing = mock.Mock()
+    content = 'Je suis un ananas.'
+    self.SignIn(self.user_1.user_id)
+    send_email = True
+    with self.work_env as we:
+      actual_issues = we.ModifyIssues(
+          issue_delta_pairs,
+          False,
+          comment_content=content,
+          send_email=send_email)
+
+    # Check comments correct.
+    # We expect all issues to have a description comment and the comment(s)
+    # added from the ModifyIssues() changes.
+    (_desc, comment_noop
+    ) = self.services.issue.comments_by_iid[issue_noop.issue_id]
+    self.assertEqual(comment_noop.amendments, exp_amendments_noop)
+    self.assertEqual(comment_noop.content, content)
+
+    # Modified issues that are also impacted, get two comments:
+    # One with the comment content and, direct issue changes defined in a
+    # paired delta.
+    # One with the impacted changes with no comment content.
+    (_desc, comment_empty, comment_empty_imp
+    ) = self.services.issue.comments_by_iid[issue_empty.issue_id]
+    self.assertEqual(comment_empty.amendments, exp_amendments_empty)
+    self.assertEqual(comment_empty.content, content)
+    self.assertEqual(comment_empty_imp.amendments, exp_amendments_empty_imp)
+    self.assertEqual(comment_empty_imp.content, '')
+
+    [_desc, shared_a_comment] = self.services.issue.comments_by_iid[
+        issue_shared_a.issue_id]
+    self.assertEqual(shared_a_comment.amendments, exp_amendments_shared_a)
+    self.assertEqual(shared_a_comment.content, content)
+
+    (_desc, shared_b_comment) = self.services.issue.comments_by_iid[
+        issue_shared_b.issue_id]
+    self.assertEqual(shared_b_comment.amendments, exp_amendments_shared_b)
+    self.assertEqual(shared_b_comment.content, content)
+
+    (_desc, unique_comment) = self.services.issue.comments_by_iid[
+        issue_unique.issue_id]
+    self.assertEqual(unique_comment.amendments, exp_amendments_unique)
+    self.assertEqual(unique_comment.content, content)
+
+    (_des, unmerged_comment
+    ) = self.services.issue.comments_by_iid[issue_unmerged.issue_id]
+    self.assertEqual(unmerged_comment.amendments, exp_amendments_unmerged)
+    self.assertEqual(unmerged_comment.content, content)
+
+    # imp_issue_{a|b} were only an impacted issue and never main issues with
+    # IssueDelta changes. Only one comment with impacted changes should
+    # have been added.
+    (_desc,
+     imp_a_comment) = self.services.issue.comments_by_iid[imp_issue_a.issue_id]
+    self.assertEqual(imp_a_comment.amendments, [])
+    self.assertEqual(
+        imp_a_comment.content,
+        'Issue %s has been merged into this issue.\n' % issue_unique.local_id)
+    (_desc,
+     imp_b_comment) = self.services.issue.comments_by_iid[imp_issue_b.issue_id]
+    self.assertEqual(imp_b_comment.amendments, [])
+    self.assertEqual(
+        imp_b_comment.content,
+        'Issue %s has been un-merged from this issue.\n' %
+        issue_unique.local_id)
+
+    # Check stars correct.
+    self.assertEqual(
+        [exp_imp_starrer],
+        self.services.issue_star.stars_by_item_id[imp_issue_a.issue_id])
+
+    # Check issues correct.
+    expected_issues = [
+        exp_issue_noop, exp_issue_empty, exp_issue_shared_a, exp_issue_shared_b,
+        exp_issue_unique, exp_imp_issue_a, exp_imp_issue_b, exp_issue_unmerged
+    ]
+    # Check we successfully updated these in our services layer.
+    for exp_issue in expected_issues:
+      # All updated issues should have been fetched from DB, skipping cache.
+      # So we expect assume_stale=False was applied to all issues during the
+      # the fetch.
+      exp_issue.assume_stale = False
+      # These derived values get set to the following when an issue goes through
+      # the ApplyFilterRules path. (see filter_helpers._ComputeDerivedFields)
+      # issue_noop had no changes so filter rules were never applied to it.
+      if exp_issue != exp_issue_noop:
+        exp_issue.derived_status = ''
+        exp_issue.derived_owner_id = 0
+
+      exp_issue.modified_timestamp = self.PAST_TIME
+
+      self.assertEqual(
+        exp_issue, self.services.issue.GetIssue(self.cnxn, exp_issue.issue_id))
+    # Check the expected issues were successfully returned.
+    exp_actual_issues = [
+        exp_issue_noop, exp_issue_empty, exp_issue_shared_a, exp_issue_shared_b,
+        exp_issue_unique, exp_issue_unmerged
+    ]
+    self.assertEqual(len(exp_actual_issues), len(actual_issues))
+    for issue in actual_issues:
+      self.assertTrue(issue in exp_actual_issues)
+
+    # Check notifications sent.
+    hostport = 'testing-app.appspot.com'
+    expected_notify_calls = [
+        # Notified as a main issue update.
+        mock.call(
+            issue_noop.issue_id,
+            hostport,
+            self.user_1.user_id,
+            old_owner_id=None,
+            comment_id=comment_noop.id,
+            send_email=send_email),
+        # Notified as a main issue update.
+        mock.call(
+            issue_empty.issue_id,
+            hostport,
+            self.user_1.user_id,
+            old_owner_id=None,
+            comment_id=comment_empty.id,
+            send_email=send_email),
+        # Notified as a main issue update.
+        mock.call(
+            issue_unique.issue_id,
+            hostport,
+            self.user_1.user_id,
+            old_owner_id=None,
+            comment_id=unique_comment.id,
+            send_email=send_email),
+        # Notified as a main issue update.
+        mock.call(
+            issue_unmerged.issue_id,
+            hostport,
+            self.user_1.user_id,
+            old_owner_id=None,
+            comment_id=unmerged_comment.id,
+            send_email=send_email),
+        # Notified as an impacted issue update.
+        mock.call(
+            imp_issue_b.issue_id,
+            hostport,
+            self.user_1.user_id,
+            comment_id=imp_b_comment.id,
+            send_email=send_email),
+        # Notified as an impacted issue update.
+        mock.call(
+            issue_empty.issue_id,
+            hostport,
+            self.user_1.user_id,
+            comment_id=comment_empty_imp.id,
+            send_email=send_email),
+        # Notified as an impacted issue update.
+        mock.call(
+            imp_issue_a.issue_id,
+            hostport,
+            self.user_1.user_id,
+            comment_id=imp_a_comment.id,
+            send_email=send_email)
+    ]
+    fake_notify.assert_has_calls(expected_notify_calls)
+    old_owner_ids = []
+    shared_amendments = exp_amendments_shared_a + exp_amendments_shared_b
+    users_by_id = {0: mock.ANY, 111: mock.ANY}
+    fake_bulk_notify.assert_called_once_with(
+        {issue_shared_a.issue_id, issue_shared_b.issue_id}, hostport,
+        old_owner_ids, content, self.user_1.user_id, shared_amendments,
+        send_email, users_by_id)
+
+    # Check issues enqueued for indexing.
+    reindex_iids = {issue.issue_id for issue in expected_issues}
+    self.services.issue.EnqueueIssuesForIndexing.assert_called_once_with(
+        self.mr.cnxn, reindex_iids, commit=False)
+    self.mr.cnxn.Commit.assert_called_once()
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('features.send_notifications.SendIssueBulkChangeNotification')
+  @mock.patch('time.time')
+  def testModifyIssues_ComponentModified(
+      self, fake_time, fake_bulk_notify, fake_notify):
+    fake_time.return_value = self.PAST_TIME
+
+    issue = _Issue(789, 1)
+    issue.component_ids = [self.component_id_1]
+    delta = tracker_pb2.IssueDelta(
+        comp_ids_add=[self.component_id_2],
+        comp_ids_remove=[self.component_id_1])
+
+    exp_issue = copy.deepcopy(issue)
+
+    self.services.issue.TestAddIssue(issue)
+
+    issue_delta_pairs = [(issue.issue_id, delta)]
+    self.mr.cnxn = mock.Mock()
+    self.mr.cnxn.Commit = mock.Mock()
+    self.services.issue.EnqueueIssuesForIndexing = mock.Mock()
+    content = 'Modifying component'
+    self.SignIn(self.user_1.user_id)
+    send_email = True
+
+    with self.work_env as we:
+      we.ModifyIssues(
+          issue_delta_pairs,
+          False,
+          comment_content=content,
+          send_email=send_email)
+
+    exp_issue.modified_timestamp = self.PAST_TIME
+    exp_issue.component_modified_timestamp = self.PAST_TIME
+    exp_issue.component_ids = [self.component_id_2]
+
+    exp_issue.derived_status = ''
+    exp_issue.derived_owner_id = 0
+    exp_issue.assume_stale = False
+
+    self.assertEqual(
+        exp_issue, self.services.issue.GetIssue(self.cnxn, exp_issue.issue_id))
+
+    fake_bulk_notify.assert_not_called()
+    fake_notify.assert_called()
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('features.send_notifications.SendIssueBulkChangeNotification')
+  @mock.patch('time.time')
+  def testModifyIssues_StatusModified(
+      self, fake_time, fake_bulk_notify, fake_notify):
+    fake_time.return_value = self.PAST_TIME
+
+    issue = _Issue(789, 1)
+    issue.status = 'New'
+    delta = tracker_pb2.IssueDelta(status='Fixed')
+
+    exp_issue = copy.deepcopy(issue)
+
+    self.services.issue.TestAddIssue(issue)
+
+    issue_delta_pairs = [(issue.issue_id, delta)]
+    self.mr.cnxn = mock.Mock()
+    self.mr.cnxn.Commit = mock.Mock()
+    self.services.issue.EnqueueIssuesForIndexing = mock.Mock()
+    content = 'Modifying status'
+    self.SignIn(self.user_1.user_id)
+    send_email = True
+
+    with self.work_env as we:
+      we.ModifyIssues(
+          issue_delta_pairs,
+          False,
+          comment_content=content,
+          send_email=send_email)
+
+    exp_issue.modified_timestamp = self.PAST_TIME
+    exp_issue.status_modified_timestamp = self.PAST_TIME
+    exp_issue.closed_timestamp = self.PAST_TIME
+    exp_issue.status = 'Fixed'
+
+    exp_issue.derived_status = ''
+    exp_issue.derived_owner_id = 0
+    exp_issue.assume_stale = False
+
+    self.assertEqual(
+        exp_issue, self.services.issue.GetIssue(self.cnxn, exp_issue.issue_id))
+
+    fake_bulk_notify.assert_not_called()
+    fake_notify.assert_called()
+
+  # We must redirect the testing environment's default domain to a
+  # non-appspot.com one, in order for the per-project branded domains to get
+  # used. See framework_helpers.GetNeededDomain().
+  @mock.patch(
+      'settings.preferred_domains', {'testing-app.appspot.com': 'example.com'})
+  @mock.patch(
+      'settings.branded_domains', {
+          'proj-783': '783.com', 'proj-782': '782.com', 'proj-781': '781.com'})
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('features.send_notifications.SendIssueBulkChangeNotification')
+  @mock.patch('time.time')
+  def testModifyIssues_MultiProjectChanges(
+      self, fake_time, fake_bulk_notify, fake_notify):
+    fake_time.return_value = self.PAST_TIME
+    self.services.project.TestAddProject(
+        'proj-783', project_id=783, committer_ids=[self.user_1.user_id])
+    self.services.project.TestAddProject(
+        'proj-782', project_id=782, committer_ids=[self.user_1.user_id])
+    self.services.project.TestAddProject(
+        'proj-781', project_id=781, committer_ids=[self.user_1.user_id])
+    delta = tracker_pb2.IssueDelta(cc_ids_add=[self.user_2.user_id])
+
+    def setUpIssue(pid, local_id):
+      issue = _Issue(pid, local_id)
+      exp_amendments = [tracker_bizobj.MakeCcAmendment(delta.cc_ids_add, [])]
+      exp_issue = copy.deepcopy(issue)
+      exp_issue.cc_ids.extend(delta.cc_ids_add)
+      exp_issue.modified_timestamp = self.PAST_TIME
+      return issue, exp_amendments, exp_issue
+
+    # We expect fake_bulk_notify to send these issues' notifications.
+    issue_p1a, exp_amendments_p1a, exp_p1a = setUpIssue(781, 1)
+    issue_p1b, exp_amendments_p1b, exp_p1b = setUpIssue(781, 2)
+
+    # We expect fake_notify to send this issue's notification.
+    issue_p2, exp_amendments_p2, exp_p2 = setUpIssue(782, 1)
+
+    # We expect fake_bulk_notify to send these issues' notifications.
+    issue_p3a, exp_amendments_p3a, exp_p3a = setUpIssue(783, 1)
+    issue_p3b, exp_amendments_p3b, exp_p3b = setUpIssue(783, 2)
+
+    self.services.issue.TestAddIssue(issue_p1a)
+    self.services.issue.TestAddIssue(issue_p1b)
+    self.services.issue.TestAddIssue(issue_p2)
+    self.services.issue.TestAddIssue(issue_p3a)
+    self.services.issue.TestAddIssue(issue_p3b)
+
+    self.mr.cnxn = mock.Mock()
+    self.mr.cnxn.Commit = mock.Mock()
+    self.services.issue.EnqueueIssuesForIndexing = mock.Mock()
+    issue_delta_pairs = [(issue_p1a.issue_id, delta),
+                         (issue_p1b.issue_id, delta),
+                         (issue_p2.issue_id, delta),
+                         (issue_p3a.issue_id, delta),
+                         (issue_p3b.issue_id, delta)]
+    self.SignIn(self.user_1.user_id)
+    content = None
+    send_email = True
+    with self.work_env as we:
+      actual_issues = we.ModifyIssues(
+          issue_delta_pairs, False, send_email=send_email)
+
+    # Check comments.
+    # We expect all issues to have a description comment and the comment(s)
+    # added from the ModifyIssues() changes.
+    def CheckComment(issue_id, exp_amendments):
+      (_desc, comment) = self.services.issue.comments_by_iid[issue_id]
+      self.assertEqual(comment.amendments, exp_amendments)
+      self.assertEqual(comment.content, content)
+      return comment
+
+    _comment_p1a = CheckComment(issue_p1a.issue_id, exp_amendments_p1a)
+    _comment_p1b = CheckComment(issue_p1b.issue_id, exp_amendments_p1b)
+    comment_p2 = CheckComment(issue_p2.issue_id, exp_amendments_p2)
+    _comment_p3a = CheckComment(issue_p3a.issue_id, exp_amendments_p3a)
+    _comment_p3b = CheckComment(issue_p3b.issue_id, exp_amendments_p3b)
+
+    # Check issues.
+    exp_issues = [exp_p1a, exp_p1b, exp_p2, exp_p3a, exp_p3b]
+    for exp_issue in exp_issues:
+      # All updated issues should have been fetched from DB, skipping cache.
+      # So we expect assume_stale=False was applied to all issues during the
+      # the fetch.
+      exp_issue.assume_stale = False
+      # These derived values get set to the following when an issue goes through
+      # the ApplyFilterRules path. (see filter_helpers._ComputeDerivedFields)
+      exp_issue.derived_status = ''
+      exp_issue.derived_owner_id = 0
+      # Check we successfully updated these issues in our services layer.
+      self.assertEqual(exp_issue, self.services.issue.GetIssue(
+          self.cnxn, exp_issue.issue_id))
+      # Check the expected issues were successfully returned.
+      self.assertTrue(exp_issue in actual_issues)
+
+    # Check issues enqueued for indexing.
+    reindex_iids = {issue.issue_id for issue in exp_issues}
+    self.services.issue.EnqueueIssuesForIndexing.assert_called_once_with(
+        self.mr.cnxn, reindex_iids, commit=False)
+    self.mr.cnxn.Commit.assert_called_once()
+
+    # Check notifications.
+    p2_hostport = '782.com'
+    fake_notify.assert_called_once_with(
+        issue_p2.issue_id,
+        p2_hostport,
+        self.user_1.user_id,
+        old_owner_id=None,
+        comment_id=comment_p2.id,
+        send_email=send_email)
+
+    p1_hostport = '781.com'
+    p1_amendments = exp_amendments_p1a + exp_amendments_p1b
+    p3_hostport = '783.com'
+    p3_amendments = exp_amendments_p3a + exp_amendments_p3b
+    users_by_id = {222: mock.ANY}
+    old_owners = []
+    expected_bulk_calls = [
+        mock.call({issue_p3a.issue_id, issue_p3b.issue_id}, p3_hostport,
+                  old_owners, content, self.user_1.user_id, p3_amendments,
+                  send_email, users_by_id),
+        mock.call({issue_p1a.issue_id, issue_p1b.issue_id}, p1_hostport,
+                  old_owners, content, self.user_1.user_id, p1_amendments,
+                  send_email, users_by_id)]
+    fake_bulk_notify.assert_has_calls(expected_bulk_calls, any_order=True)
+
+  def testModifyIssues_PermDenied(self):
+    """Test that AssertUsercanModifyIssues is called."""
+    issue = _Issue(789, 1)
+    delta = tracker_pb2.IssueDelta(labels_add=['some-label'])
+    non_member = self.services.user.TestAddUser('non_member@example.com', 666)
+    self.services.issue.TestAddIssue(issue)
+    self.SignIn(non_member.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.ModifyIssues(
+            [(issue.issue_id, delta)], False, comment_content='bad chicken')
+
+  # Detailed change validation testing happens in tracker_helpers_test.
+  def testModifyIssues_InvalidChange(self):
+    """Test that we check issue change validity."""
+    non_member = self.services.user.TestAddUser('non_member@example.com', 666)
+    issue = _Issue(789, 1)
+    delta = tracker_pb2.IssueDelta(owner_id=non_member.user_id)
+    self.services.issue.TestAddIssue(issue)
+    self.SignIn(self.user_1.user_id)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.ModifyIssues(
+            [(issue.issue_id, delta)], False, comment_content='bad chicken')
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('features.send_notifications.SendIssueBulkChangeNotification')
+  def testModifyIssues_Noop(self, fake_bulk_notify, fake_notify):
+    issue_empty = _Issue(789, 1)
+    delta_empty = tracker_pb2.IssueDelta()
+
+    issue_noop = _Issue(789, 2)
+    issue_noop.owner_id = self.user_2.user_id
+    delta_noop = tracker_pb2.IssueDelta(owner_id=issue_noop.owner_id)
+
+    delta_noop_shared = tracker_pb2.IssueDelta(owner_id=issue_noop.owner_id)
+    issue_noop_shared_a = _Issue(789, 3)
+    issue_noop_shared_a.owner_id = delta_noop_shared.owner_id
+    issue_noop_shared_b = _Issue(789, 4)
+    issue_noop_shared_b.owner_id = delta_noop_shared.owner_id
+
+    self.services.issue.TestAddIssue(issue_empty)
+    self.services.issue.TestAddIssue(issue_noop)
+    self.services.issue.TestAddIssue(issue_noop_shared_a)
+    self.services.issue.TestAddIssue(issue_noop_shared_b)
+
+    exp_issues = [
+        copy.deepcopy(issue_empty),
+        copy.deepcopy(issue_noop),
+        copy.deepcopy(issue_noop_shared_a),
+        copy.deepcopy(issue_noop_shared_b)
+    ]
+
+    issue_delta_pairs = [(issue_empty.issue_id, delta_empty),
+                         (issue_noop.issue_id, delta_noop),
+                         (issue_noop_shared_a.issue_id, delta_noop_shared),
+                         (issue_noop_shared_b.issue_id, delta_noop_shared)]
+
+
+    self.mr.cnxn = mock.Mock()
+    self.mr.cnxn.Commit = mock.Mock()
+    self.services.issue.UpdateIssue = mock.Mock()
+    self.services.issue_star.SetStarsBatch_SkipIssueUpdate = mock.Mock()
+    self.services.issue.CreateIssueComment = mock.Mock()
+    self.services.project.UpdateProject = mock.Mock()
+    self.services.issue.EnqueueIssuesForIndexing = mock.Mock()
+    self.SignIn(self.user_1.user_id)
+    with self.work_env as we:
+      issues = we.ModifyIssues(issue_delta_pairs, False, send_email=True)
+
+    for exp_issue in exp_issues:
+      exp_issue.assume_stale = False
+      # Check issues remained the same with no changes.
+      self.assertEqual(
+          exp_issue,
+          self.services.issue.GetIssue(self.cnxn, exp_issue.issue_id))
+
+    self.assertFalse(issues)
+    self.services.issue.UpdateIssue.assert_not_called()
+    self.services.issue_star.SetStarsBatch_SkipIssueUpdate.assert_not_called()
+    self.services.issue.CreateIssueComment.assert_not_called()
+    self.services.project.UpdateProject.assert_not_called()
+    self.services.issue.EnqueueIssuesForIndexing.assert_not_called()
+    fake_bulk_notify.assert_not_called()
+    fake_notify.assert_not_called()
+    self.mr.cnxn.Commit.assert_not_called()
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('features.send_notifications.SendIssueBulkChangeNotification')
+  @mock.patch('time.time')
+  def testModifyIssues_CommentWithNoChanges(
+      self, fake_time, fake_bulk_notify, fake_notify):
+    fake_time.return_value = self.PAST_TIME
+
+    issue = _Issue(789, 1)
+    delta_empty = tracker_pb2.IssueDelta()
+
+    exp_issue = copy.deepcopy(issue)
+    exp_issue.modified_timestamp = self.PAST_TIME
+    exp_issue.assume_stale = False
+
+    self.services.issue.TestAddIssue(issue)
+
+    issue_delta_pairs = [(issue.issue_id, delta_empty)]
+
+    self.mr.cnxn = mock.Mock()
+    self.mr.cnxn.Commit = mock.Mock()
+    self.services.issue.UpdateIssue = mock.Mock()
+    self.services.issue_star.SetStarsBatch_SkipIssueUpdate = mock.Mock()
+    self.services.issue.CreateIssueComment = mock.Mock()
+    self.services.project.UpdateProject = mock.Mock()
+    self.services.issue.EnqueueIssuesForIndexing = mock.Mock()
+    self.SignIn(self.user_1.user_id)
+
+    with self.work_env as we:
+      issues = we.ModifyIssues(
+          issue_delta_pairs, False, comment_content='invisible chickens')
+
+    self.assertEqual(len(issues), 1)
+    self.assertEqual(exp_issue, issues[0])
+    self.assertEqual(
+        exp_issue, self.services.issue.GetIssue(self.cnxn, exp_issue.issue_id))
+
+    self.services.issue.UpdateIssue.assert_not_called()
+    self.services.issue_star.SetStarsBatch_SkipIssueUpdate.assert_not_called()
+    self.services.issue.CreateIssueComment.assert_called()
+    self.services.project.UpdateProject.assert_not_called()
+    self.services.issue.EnqueueIssuesForIndexing.assert_called()
+
+    fake_bulk_notify.assert_not_called()
+    fake_notify.assert_called()
+    self.mr.cnxn.Commit.assert_called()
+    # The closed_timestamp has ben reset to its default value of 0.
+    self.assertEqual(
+        0,
+        self.services.issue.GetIssue(self.cnxn,
+                                     exp_issue.issue_id).closed_timestamp)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('features.send_notifications.SendIssueBulkChangeNotification')
+  @mock.patch('time.time')
+  def testModifyIssues_AttachmentsWithNoChanges(
+      self, fake_time, fake_bulk_notify, fake_notify):
+
+    fake_time.return_value = self.PAST_TIME
+
+    issue = _Issue(789, 1)
+    delta_empty = tracker_pb2.IssueDelta()
+
+    exp_issue = copy.deepcopy(issue)
+    exp_issue.modified_timestamp = self.PAST_TIME
+    exp_issue.assume_stale = False
+
+    self.services.issue.TestAddIssue(issue)
+
+    issue_delta_pairs = [(issue.issue_id, delta_empty)]
+
+    self.mr.cnxn = mock.Mock()
+    self.mr.cnxn.Commit = mock.Mock()
+    self.services.issue.UpdateIssue = mock.Mock()
+    self.services.issue_star.SetStarsBatch_SkipIssueUpdate = mock.Mock()
+    self.services.issue.CreateIssueComment = mock.Mock()
+    self.services.project.UpdateProject = mock.Mock()
+    self.services.issue.EnqueueIssuesForIndexing = mock.Mock()
+    self.SignIn(self.user_1.user_id)
+
+    upload = framework_helpers.AttachmentUpload(
+        'BEAR-necessities', 'Forget about your worries and your strife',
+        'text/plain')
+
+    with self.work_env as we:
+      issues = we.ModifyIssues(issue_delta_pairs, attachment_uploads=[upload])
+
+    self.assertEqual(len(issues), 1)
+    self.assertEqual(exp_issue, issues[0])
+    self.assertEqual(
+        exp_issue, self.services.issue.GetIssue(self.cnxn, exp_issue.issue_id))
+
+    self.services.issue.UpdateIssue.assert_not_called()
+    self.services.issue_star.SetStarsBatch_SkipIssueUpdate.assert_not_called()
+    self.services.issue.CreateIssueComment.assert_called()
+    self.services.project.UpdateProject.assert_called()
+    self.services.issue.EnqueueIssuesForIndexing.assert_called()
+
+    fake_bulk_notify.assert_not_called()
+    fake_notify.assert_called()
+    self.mr.cnxn.Commit.assert_called()
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  @mock.patch('features.send_notifications.SendIssueBulkChangeNotification')
+  def testModifyIssues_Empty(self, fake_bulk_notify, fake_notify):
+    self.mr.cnxn = mock.Mock()
+    self.mr.cnxn.Commit = mock.Mock()
+    self.services.issue.UpdateIssue = mock.Mock()
+    self.services.issue_star.SetStarsBatch_SkipIssueUpdate = mock.Mock()
+    self.services.issue.CreateIssueComment = mock.Mock()
+    self.services.issue.EnqueueIssuesForIndexing = mock.Mock()
+    with self.work_env as we:
+      issues = we.ModifyIssues([], False, comment_content='invisible chickens')
+
+    self.assertFalse(issues)
+    self.services.issue.UpdateIssue.assert_not_called()
+    self.services.issue_star.SetStarsBatch_SkipIssueUpdate.assert_not_called()
+    self.services.issue.CreateIssueComment.assert_not_called()
+    self.services.issue.EnqueueIssuesForIndexing.assert_not_called()
+    fake_bulk_notify.assert_not_called()
+    fake_notify.assert_not_called()
+    self.mr.cnxn.Commit.assert_not_called()
+
+
+  def testModifyIssuesBulkNotifyForDelta(self):
+    # Integrate tested in ModifyIssues tests as the main concern is
+    # if BulkNotify and Notify work correctly together in the ModifyIssues
+    # context.
+    pass
+
+  def testModifyIssuesNotifyForDelta(self):
+    # Integrate tested in ModifyIssues tests as the main concern is
+    # if BulkNotify and Notify work correctly together in the ModifyIssues
+    # context.
+    pass
+
+  def testDeleteIssue(self):
+    """We can mark and unmark an issue as deleted."""
+    self.SignIn(user_id=self.admin_user.user_id)
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    with self.work_env as we:
+      _actual = we.DeleteIssue(issue, True)
+    self.assertTrue(issue.deleted)
+    with self.work_env as we:
+      _actual = we.DeleteIssue(issue, False)
+    self.assertFalse(issue.deleted)
+
+  def testFlagIssue_Normal(self):
+    """Users can mark and unmark an issue as spam."""
+    self.services.user.TestAddUser('user222@example.com', 222)
+    self.SignIn(user_id=222)
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    with self.work_env as we:
+      we.FlagIssues([issue], True)
+    self.assertEqual(
+        [222], self.services.spam.reports_by_issue_id[78901])
+    self.assertNotIn(
+        222, self.services.spam.manual_verdicts_by_issue_id[78901])
+    with self.work_env as we:
+      we.FlagIssues([issue], False)
+    self.assertEqual(
+        [], self.services.spam.reports_by_issue_id[78901])
+    self.assertNotIn(
+        222, self.services.spam.manual_verdicts_by_issue_id[78901])
+
+  def testFlagIssue_AutoVerdict(self):
+    """Admins can mark and unmark an issue as spam and it counts as verdict."""
+    self.SignIn(user_id=self.admin_user.user_id)
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    with self.work_env as we:
+      we.FlagIssues([issue], True)
+    self.assertEqual(
+        [444], self.services.spam.reports_by_issue_id[78901])
+    self.assertTrue(self.services.spam.manual_verdicts_by_issue_id[78901][444])
+    with self.work_env as we:
+      we.FlagIssues([issue], False)
+    self.assertEqual(
+        [], self.services.spam.reports_by_issue_id[78901])
+    self.assertFalse(
+        self.services.spam.manual_verdicts_by_issue_id[78901][444])
+
+  def testFlagIssue_NotAllowed(self):
+    """Anons can't mark issues as spam."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.FlagIssues([issue], True)
+
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.FlagIssues([issue], False)
+
+  def testLookupIssuesFlaggers_Normal(self):
+    issue_1 = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue_1)
+    comment_1_1 = tracker_pb2.IssueComment(
+        project_id=789, content='lorem ipsum', user_id=111,
+        issue_id=issue_1.issue_id)
+    comment_1_2 = tracker_pb2.IssueComment(
+        project_id=789, content='dolor sit amet', user_id=111,
+        issue_id=issue_1.issue_id)
+    self.services.issue.TestAddComment(comment_1_1, 1)
+    self.services.issue.TestAddComment(comment_1_2, 1)
+
+    issue_2 = fake.MakeTestIssue(789, 2, 'sum', 'New', 111, issue_id=78902)
+    self.services.issue.TestAddIssue(issue_2)
+    comment_2_1 = tracker_pb2.IssueComment(
+        project_id=789, content='lorem ipsum', user_id=111,
+        issue_id=issue_2.issue_id)
+    self.services.issue.TestAddComment(comment_2_1, 2)
+
+
+    self.SignIn(user_id=222)
+    with self.work_env as we:
+      we.FlagIssues([issue_1], True)
+
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      we.FlagComment(issue_1, comment_1_2, True)
+      we.FlagComment(issue_2, comment_2_1, True)
+
+      reporters = we.LookupIssuesFlaggers([issue_1, issue_2])
+      self.assertEqual({
+          issue_1.issue_id: ([222], {comment_1_2.id: [111]}),
+          issue_2.issue_id: ([], {comment_2_1.id: [111]}),
+      }, reporters)
+
+  def testLookupIssueFlaggers_Normal(self):
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    comment_1 = tracker_pb2.IssueComment(
+        project_id=789, content='lorem ipsum', user_id=111,
+        issue_id=issue.issue_id)
+    comment_2 = tracker_pb2.IssueComment(
+        project_id=789, content='dolor sit amet', user_id=111,
+        issue_id=issue.issue_id)
+    self.services.issue.TestAddComment(comment_1, 1)
+    self.services.issue.TestAddComment(comment_2, 2)
+
+    self.SignIn(user_id=222)
+    with self.work_env as we:
+      we.FlagIssues([issue], True)
+
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      we.FlagComment(issue, comment_2, True)
+      issue_reporters, comment_reporters = we.LookupIssueFlaggers(issue)
+      self.assertEqual([222], issue_reporters)
+      self.assertEqual({comment_2.id: [111]}, comment_reporters)
+
+  def testGetIssuePositionInHotlist(self):
+    issue1 = fake.MakeTestIssue(
+        789, 1, 'sum1', 'New', self.user_1.user_id, issue_id=78901)
+    self.services.issue.TestAddIssue(issue1)
+    issue2 = fake.MakeTestIssue(
+        789, 2, 'sum1', 'New', self.user_2.user_id, issue_id=78902)
+    self.services.issue.TestAddIssue(issue2)
+    issue3 = fake.MakeTestIssue(
+        789, 3, 'sum1', 'New', self.user_3.user_id, issue_id=78903)
+    self.services.issue.TestAddIssue(issue3)
+
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[self.user_1.user_id], editor_ids=[])
+    self.AddIssueToHotlist(hotlist.hotlist_id, issue_id=issue2.issue_id)
+    self.AddIssueToHotlist(hotlist.hotlist_id, issue_id=issue1.issue_id)
+    self.AddIssueToHotlist(hotlist.hotlist_id, issue_id=issue3.issue_id)
+
+    with self.work_env as we:
+      prev_iid, cur_index, next_iid, total_count = we.GetIssuePositionInHotlist(
+          issue1, hotlist, 1, 'rank', '')
+
+    self.assertEqual(prev_iid, issue2.issue_id)
+    self.assertEqual(cur_index, 1)
+    self.assertEqual(next_iid, issue3.issue_id)
+    self.assertEqual(total_count, 3)
+
+  def testRerankBlockedOnIssues_SplitBelow(self):
+    parent_issue = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, project_name='proj', issue_id=1001)
+    self.services.issue.TestAddIssue(parent_issue)
+
+    issues = []
+    for idx in range(2, 6):
+      issues.append(fake.MakeTestIssue(
+          789, idx, 'sum', 'New', 111, project_name='proj', issue_id=1000+idx))
+      self.services.issue.TestAddIssue(issues[-1])
+      parent_issue.blocked_on_iids.append(issues[-1].issue_id)
+      next_rank = sys.maxint
+      if parent_issue.blocked_on_ranks:
+        next_rank = parent_issue.blocked_on_ranks[-1] - 1
+      parent_issue.blocked_on_ranks.append(next_rank)
+
+    self.SignIn()
+    with self.work_env as we:
+      we.RerankBlockedOnIssues(parent_issue, 1002, 1004, False)
+      new_parent_issue = we.GetIssue(1001)
+
+    self.assertEqual([1003, 1004, 1002, 1005], new_parent_issue.blocked_on_iids)
+
+  def testRerankBlockedOnIssues_SplitAbove(self):
+    parent_issue = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, project_name='proj', issue_id=1001)
+    self.services.issue.TestAddIssue(parent_issue)
+
+    issues = []
+    for idx in range(2, 6):
+      issues.append(fake.MakeTestIssue(
+          789, idx, 'sum', 'New', 111, project_name='proj', issue_id=1000+idx))
+      self.services.issue.TestAddIssue(issues[-1])
+      parent_issue.blocked_on_iids.append(issues[-1].issue_id)
+      next_rank = sys.maxint
+      if parent_issue.blocked_on_ranks:
+        next_rank = parent_issue.blocked_on_ranks[-1] - 1
+      parent_issue.blocked_on_ranks.append(next_rank)
+
+    self.SignIn()
+    with self.work_env as we:
+      we.RerankBlockedOnIssues(parent_issue, 1002, 1004, True)
+      new_parent_issue = we.GetIssue(1001)
+
+    self.assertEqual([1003, 1002, 1004, 1005], new_parent_issue.blocked_on_iids)
+
+  @mock.patch('tracker.rerank_helpers.MAX_RANKING', 1)
+  def testRerankBlockedOnIssues_NoRoom(self):
+    parent_issue = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, project_name='proj', issue_id=1001)
+    parent_issue.blocked_on_ranks = [1, 0, 0]
+    self.services.issue.TestAddIssue(parent_issue)
+
+    issues = []
+    for idx in range(2, 5):
+      issues.append(fake.MakeTestIssue(
+          789, idx, 'sum', 'New', 111, project_name='proj', issue_id=1000+idx))
+      self.services.issue.TestAddIssue(issues[-1])
+      parent_issue.blocked_on_iids.append(issues[-1].issue_id)
+
+    self.SignIn()
+    with self.work_env as we:
+      we.RerankBlockedOnIssues(parent_issue, 1003, 1004, True)
+      new_parent_issue = we.GetIssue(1001)
+
+    self.assertEqual([1002, 1003, 1004], new_parent_issue.blocked_on_iids)
+
+  def testRerankBlockedOnIssues_CantEditIssue(self):
+    parent_issue = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 555, project_name='proj', issue_id=1001)
+    parent_issue.labels = ['Restrict-EditIssue-Foo']
+    self.services.issue.TestAddIssue(parent_issue)
+
+    self.SignIn()
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.RerankBlockedOnIssues(parent_issue, 1003, 1002, True)
+
+  def testRerankBlockedOnIssues_MovedNotOnBlockedOn(self):
+    parent_issue = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, project_name='proj', issue_id=1001)
+    self.services.issue.TestAddIssue(parent_issue)
+
+    self.SignIn()
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.RerankBlockedOnIssues(parent_issue, 1003, 1002, True)
+
+  def testRerankBlockedOnIssues_TargetNotOnBlockedOn(self):
+    moved = fake.MakeTestIssue(
+        789, 2, 'sum', 'New', 111, project_name='proj', issue_id=1002)
+    self.services.issue.TestAddIssue(moved)
+    parent_issue = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, project_name='proj', issue_id=1001)
+    parent_issue.blocked_on_iids = [1002]
+    parent_issue.blocked_on_ranks = [1]
+    self.services.issue.TestAddIssue(parent_issue)
+
+    self.SignIn()
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.RerankBlockedOnIssues(parent_issue, 1002, 1003, True)
+
+  # FUTURE: GetIssuePermissionsForUser()
+
+  # FUTURE: CreateComment()
+
+  def testListIssueComments_Normal(self):
+    """We can list comments for an issue."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='more info', user_id=111,
+        issue_id=issue.issue_id)
+    self.services.issue.TestAddComment(comment, 1)
+
+    with self.work_env as we:
+      actual_comments = we.ListIssueComments(issue)
+
+    self.assertEqual(2, len(actual_comments))
+    self.assertEqual('sum', actual_comments[0].content)
+    self.assertEqual('more info', actual_comments[1].content)
+
+  def _Comment(self, issue, content, local_id, approval_id=None):
+    """Adds a comment to issue with reasonable defaults."""
+    comment = tracker_pb2.IssueComment(
+        project_id=issue.project_id,
+        content=content,
+        user_id=issue.reporter_id,
+        issue_id=issue.issue_id,
+        approval_id=approval_id)
+    self.services.issue.TestAddComment(comment, local_id)
+
+  def testSafeListIssueComments_Normal(self):
+    initial_description = 'sum'
+    issue = fake.MakeTestIssue(
+        self.project.project_id,
+        1,
+        initial_description,
+        'New',
+        self.user_1.user_id,
+        issue_id=78901,
+        project_name=self.project.project_name)
+    self.services.issue.TestAddIssue(issue)
+    self._Comment(issue, 'more info', 1)
+
+    with self.work_env as we:
+      list_result = we.SafeListIssueComments(issue.issue_id, 1000, 0)
+
+    self.assertEqual(None, list_result.next_start)
+    actual_comments = list_result.items
+    self.assertEqual(2, len(actual_comments))
+    self.assertEqual(initial_description, actual_comments[0].content)
+    self.assertEqual('more info', actual_comments[1].content)
+
+
+  def testSafeListIssueComments_DeletedIssue(self):
+    """Users without permissions cannot view comments on deleted issues."""
+    issue = fake.MakeTestIssue(
+        self.project.project_id,
+        1,
+        'sum',
+        'New',
+        self.user_1.user_id,
+        issue_id=78901,
+        project_name=self.project.project_name)
+    issue.deleted = True
+    self.services.issue.TestAddIssue(issue)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.SafeListIssueComments(issue.issue_id, 1000, 0)
+
+  def testSafeListIssueComments_NotAllowed(self):
+    issue = fake.MakeTestIssue(
+        self.project.project_id,
+        1,
+        'sum',
+        'New',
+        self.user_1.user_id,
+        issue_id=78901,
+        project_name=self.project.project_name,
+        labels=['Restrict-View-CoreTeam'])
+    self.services.issue.TestAddIssue(issue)
+
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.SafeListIssueComments(issue.issue_id, 1000, 0)
+
+  def testSafeListIssueComments_UserFlagged(self):
+    """Users see comments they flagged as spam."""
+    issue = fake.MakeTestIssue(
+        self.project.project_id,
+        1,
+        'sum',
+        'New',
+        self.user_1.user_id,
+        issue_id=78901,
+        project_name=self.project.project_name)
+    self.services.issue.TestAddIssue(issue)
+    flagged_comment = tracker_pb2.IssueComment(
+        project_id=self.project.project_id,
+        content='flagged content',
+        user_id=self.user_1.user_id,
+        issue_id=issue.issue_id,
+        inbound_message='Some message',
+        importer_id=self.user_1.user_id)
+    self.services.issue.TestAddComment(flagged_comment, 1)
+
+    self.services.spam.FlagComment(
+        self.cnxn, issue, flagged_comment.id, flagged_comment.user_id,
+        self.user_2.user_id, True)
+
+    # One user flagging a comment doesn't cause other users to see it as spam.
+    with self.work_env as we:
+      list_result = we.SafeListIssueComments(issue.issue_id, 1000, 0)
+    self.assertFalse(list_result.items[1].is_spam)
+
+    self.SignIn(self.user_2.user_id)
+    with self.work_env as we:
+      list_result = we.SafeListIssueComments(issue.issue_id, 1000, 0)
+    self.assertTrue(list_result.items[1].is_spam)
+    self.assertEqual('flagged content', list_result.items[1].content)
+
+  def testSafeListIssueComments_FilteredContent(self):
+
+    def AssertFiltered(comment, filtered_comment):
+      # Unfiltered
+      self.assertEqual(comment.id, filtered_comment.id)
+      self.assertEqual(comment.issue_id, filtered_comment.issue_id)
+      self.assertEqual(comment.project_id, filtered_comment.project_id)
+      self.assertEqual(comment.approval_id, filtered_comment.approval_id)
+      self.assertEqual(comment.timestamp, filtered_comment.timestamp)
+      self.assertEqual(comment.deleted_by, filtered_comment.deleted_by)
+      self.assertEqual(comment.sequence, filtered_comment.sequence)
+      self.assertEqual(comment.is_spam, filtered_comment.is_spam)
+      self.assertEqual(comment.is_description, filtered_comment.is_description)
+      self.assertEqual(
+          comment.description_num, filtered_comment.description_num)
+      # Filtered.
+      self.assertEqual(None, filtered_comment.content)
+      self.assertEqual(0, filtered_comment.user_id)
+      self.assertEqual([], filtered_comment.amendments)
+      self.assertEqual([], filtered_comment.attachments)
+      self.assertEqual(None, filtered_comment.inbound_message)
+      self.assertEqual(0, filtered_comment.importer_id)
+
+    initial_description = 'sum'
+    issue = fake.MakeTestIssue(
+        self.project.project_id,
+        1,
+        initial_description,
+        'New',
+        self.user_1.user_id,
+        issue_id=78901,
+        project_name=self.project.project_name)
+    self.services.issue.TestAddIssue(issue)
+    spam_comment = tracker_pb2.IssueComment(
+        project_id=self.project.project_id,
+        content='spam',
+        user_id=self.user_1.user_id,
+        issue_id=issue.issue_id,
+        is_spam=True,
+        inbound_message='Some message',
+        importer_id=self.user_1.user_id)
+    deleted_comment = tracker_pb2.IssueComment(
+        project_id=self.project.project_id,
+        content='deleted',
+        user_id=self.user_1.user_id,
+        issue_id=issue.issue_id,
+        deleted_by=self.user_1.user_id,
+        amendments=[
+            tracker_pb2.Amendment(
+                field=tracker_pb2.FieldID.SUMMARY, newvalue='new')
+        ],
+        attachments=[
+            tracker_pb2.Attachment(
+                attachment_id=1,
+                mimetype='image/png',
+                filename='example.png',
+                filesize=12345)
+        ])
+    inbound_comment = tracker_pb2.IssueComment(
+        project_id=self.project.project_id,
+        content='from an inbound message',
+        user_id=self.user_1.user_id,
+        issue_id=issue.issue_id,
+        inbound_message='the full inbound message')
+    self.services.issue.TestAddComment(spam_comment, 1)
+    self.services.issue.TestAddComment(deleted_comment, 2)
+    self.services.issue.TestAddComment(inbound_comment, 3)
+    with self.work_env as we:
+      list_result = we.SafeListIssueComments(issue.issue_id, 1000, 0)
+
+    self.assertEqual(None, list_result.next_start)
+    actual_comments = list_result.items
+    self.assertEqual(4, len(actual_comments))
+    self.assertEqual(initial_description, actual_comments[0].content)
+    AssertFiltered(spam_comment, actual_comments[1])
+    AssertFiltered(deleted_comment, actual_comments[2])
+    self.assertEqual('from an inbound message', actual_comments[3].content)
+    self.assertEqual(None, actual_comments[3].inbound_message)
+
+  def testSafeListIssueComments_AdminsViewUnfiltered(self):
+    """Admins can appropriately view comment content that would be filtered."""
+    issue = fake.MakeTestIssue(
+        self.project.project_id,
+        1,
+        'sum',
+        'New',
+        self.user_1.user_id,
+        issue_id=78901,
+        project_name=self.project.project_name)
+    self.services.issue.TestAddIssue(issue)
+    spam_comment = tracker_pb2.IssueComment(
+        project_id=self.project.project_id,
+        content='spam',
+        user_id=self.user_1.user_id,
+        issue_id=issue.issue_id,
+        is_spam=True,
+        inbound_message='Some message',
+        importer_id=self.user_1.user_id)
+    deleted_comment = tracker_pb2.IssueComment(
+        project_id=self.project.project_id,
+        content='deleted',
+        user_id=self.user_1.user_id,
+        issue_id=issue.issue_id,
+        deleted_by=self.user_1.user_id,
+        amendments=[
+            tracker_pb2.Amendment(
+                field=tracker_pb2.FieldID.SUMMARY, newvalue='new')
+        ],
+        attachments=[
+            tracker_pb2.Attachment(
+                attachment_id=1,
+                mimetype='image/png',
+                filename='example.png',
+                filesize=12345)
+        ])
+    inbound_comment = tracker_pb2.IssueComment(
+        project_id=self.project.project_id,
+        content='from an inbound message',
+        user_id=self.user_1.user_id,
+        issue_id=issue.issue_id,
+        inbound_message='the full inbound message')
+    self.services.issue.TestAddComment(spam_comment, 1)
+    self.services.issue.TestAddComment(deleted_comment, 2)
+    self.services.issue.TestAddComment(inbound_comment, 3)
+
+    self.SignIn(self.admin_user.user_id)
+    with self.work_env as we:
+      list_result = we.SafeListIssueComments(issue.issue_id, 1000, 0)
+
+    # Admins can view the fields of comments that would be filtered.
+    actual_comments = list_result.items
+    self.assertEqual(spam_comment.content, actual_comments[1].content)
+    self.assertEqual(deleted_comment.content, actual_comments[2].content)
+    self.assertEqual(
+        'the full inbound message', actual_comments[3].inbound_message)
+
+  def testSafeListIssueComments_MoreItems(self):
+    initial_description = 'sum'
+    issue = fake.MakeTestIssue(
+        self.project.project_id,
+        1,
+        initial_description,
+        'New',
+        self.user_1.user_id,
+        issue_id=78901,
+        project_name=self.project.project_name)
+    self.services.issue.TestAddIssue(issue)
+    self._Comment(issue, 'more info', 1)
+
+    with self.work_env as we:
+      list_result = we.SafeListIssueComments(issue.issue_id, 1, 0)
+
+    self.assertEqual(1, list_result.next_start)
+    actual_comments = list_result.items
+    self.assertEqual(1, len(actual_comments))
+    self.assertEqual(initial_description, actual_comments[0].content)
+
+  def testSafeListIssueComments_Start(self):
+    initial_description = 'sum'
+    issue = fake.MakeTestIssue(
+        self.project.project_id,
+        1,
+        initial_description,
+        'New',
+        self.user_1.user_id,
+        issue_id=78901,
+        project_name=self.project.project_name)
+    self.services.issue.TestAddIssue(issue)
+    self._Comment(issue, 'more info', 1)
+
+    with self.work_env as we:
+      list_result = we.SafeListIssueComments(issue.issue_id, 1000, 1)
+    self.assertEqual(None, list_result.next_start)
+    actual_comments = list_result.items
+    self.assertEqual(1, len(actual_comments))
+    self.assertEqual('more info', actual_comments[0].content)
+
+  def testSafeListIssueComments_ApprovalId(self):
+    issue = fake.MakeTestIssue(
+        self.project.project_id,
+        1,
+        'initial description',
+        'New',
+        self.user_1.user_id,
+        issue_id=78901,
+        project_name=self.project.project_name)
+    self.services.issue.TestAddIssue(issue)
+
+    max_items = 2
+    # Create comments for testing.
+    self._Comment(issue, 'more info', 1)
+    self._Comment(issue, 'approval2 info', 2, approval_id=2)
+    # This would be after the max_items of 2, so we are ensuring that the
+    # max_items limit applies AFTER filtering rather than before.
+    self._Comment(issue, 'approval1 info1', 3, approval_id=1)
+    self._Comment(issue, 'approval1 info2', 4, approval_id=1)
+    self._Comment(issue, 'approval1 info3', 5, approval_id=1)
+
+    with self.work_env as we:
+      list_result = we.SafeListIssueComments(
+        issue.issue_id, max_items, 0, approval_id=1)
+    self.assertEqual(
+        2, list_result.next_start, 'We have a third approval comment')
+    actual_comments = list_result.items
+    self.assertEqual(2, len(actual_comments))
+    self.assertEqual('approval1 info1', actual_comments[0].content)
+    self.assertEqual('approval1 info2', actual_comments[1].content)
+
+  def testSafeListIssueComments_StartAndApprovalId(self):
+    issue = fake.MakeTestIssue(
+        self.project.project_id,
+        1,
+        'initial description',
+        'New',
+        self.user_1.user_id,
+        issue_id=78901,
+        project_name=self.project.project_name)
+    self.services.issue.TestAddIssue(issue)
+
+    # Create comments for testing.
+    self._Comment(issue, 'more info', 1)
+    self._Comment(issue, 'approval2 info', 2, approval_id=2)
+    self._Comment(issue, 'approval1 info1', 3, approval_id=1)
+    self._Comment(issue, 'approval1 info2', 4, approval_id=1)
+    self._Comment(issue, 'approval1 info3', 5, approval_id=1)
+
+    with self.work_env as we:
+      list_result = we.SafeListIssueComments(
+        issue.issue_id, 1000, 1, approval_id=1)
+    self.assertEqual(None, list_result.next_start)
+    actual_comments = list_result.items
+    self.assertEqual(2, len(actual_comments))
+    self.assertEqual('approval1 info2', actual_comments[0].content)
+    self.assertEqual('approval1 info3', actual_comments[1].content)
+
+  # FUTURE: UpdateComment()
+
+  def testDeleteComment_Normal(self):
+    """We can mark and unmark a comment as deleted."""
+    self.SignIn(user_id=111)
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=111,
+        issue_id=issue.issue_id)
+    self.services.issue.TestAddComment(comment, 1)
+    with self.work_env as we:
+      we.DeleteComment(issue, comment, True)
+      self.assertEqual(111, comment.deleted_by)
+      we.DeleteComment(issue, comment, False)
+      self.assertEqual(None, comment.deleted_by)
+
+  @mock.patch('services.issue_svc.IssueService.SoftDeleteComment')
+  def testDeleteComment_UndeleteableSpam(self, mockSoftDeleteComment):
+    """Throws exception when comment is spam and owner is deleting."""
+    self.SignIn(user_id=111)
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=111,
+        issue_id=issue.issue_id, is_spam=True)
+    self.services.issue.TestAddComment(comment, 1)
+    with self.work_env as we:
+      with self.assertRaises(permissions.PermissionException):
+        we.DeleteComment(issue, comment, True)
+      self.assertEqual(None, comment.deleted_by)
+      mockSoftDeleteComment.assert_not_called()
+
+  @mock.patch('services.issue_svc.IssueService.SoftDeleteComment')
+  @mock.patch('framework.permissions.CanDeleteComment')
+  def testDeleteComment_UndeletablePermissions(self, mockCanDelete,
+                                               mockSoftDeleteComment):
+    """Throws exception when deleter doesn't have permission to do so."""
+    mockCanDelete.return_value = False
+    self.SignIn(user_id=111)
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=111,
+        issue_id=issue.issue_id, is_spam=True)
+    self.services.issue.TestAddComment(comment, 1)
+    with self.work_env as we:
+      with self.assertRaises(permissions.PermissionException):
+        we.DeleteComment(issue, comment, True)
+      self.assertEqual(None, comment.deleted_by)
+      mockSoftDeleteComment.assert_not_called()
+
+  def testDeleteAttachment_Normal(self):
+    """We can mark and unmark a comment attachment as deleted."""
+    self.SignIn(user_id=111)
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=111,
+        issue_id=issue.issue_id)
+    self.services.issue.TestAddComment(comment, 1)
+    attachment = tracker_pb2.Attachment()
+    self.services.issue.TestAddAttachment(attachment, comment.id, 1)
+    with self.work_env as we:
+      we.DeleteAttachment(
+          issue, comment, attachment.attachment_id, True)
+      self.assertTrue(attachment.deleted)
+      we.DeleteAttachment(
+          issue, comment, attachment.attachment_id, False)
+      self.assertFalse(attachment.deleted)
+
+  @mock.patch('services.issue_svc.IssueService.SoftDeleteComment')
+  @mock.patch('framework.permissions.CanDeleteComment')
+  def testDeleteAttachment_UndeletablePermissions(
+      self, mockCanDelete, mockSoftDeleteComment):
+    """Throws exception when deleter doesn't have permission to do so."""
+    mockCanDelete.return_value = False
+    self.SignIn(user_id=111)
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=111,
+        issue_id=issue.issue_id, is_spam=True)
+    self.services.issue.TestAddComment(comment, 1)
+    attachment = tracker_pb2.Attachment()
+    self.services.issue.TestAddAttachment(attachment, comment.id, 1)
+    self.assertFalse(attachment.deleted)
+    with self.work_env as we:
+      with self.assertRaises(permissions.PermissionException):
+        we.DeleteAttachment(
+            issue, comment, attachment.attachment_id, True)
+      self.assertFalse(attachment.deleted)
+      mockSoftDeleteComment.assert_not_called()
+
+  def testFlagComment_Normal(self):
+    """We can mark and unmark a comment as spam."""
+    self.SignIn(user_id=111)
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=111,
+        issue_id=issue.issue_id)
+    self.services.issue.TestAddComment(comment, 1)
+
+    comment_reports = self.services.spam.comment_reports_by_issue_id
+    with self.work_env as we:
+      we.FlagComment(issue, comment, True)
+      self.assertEqual([111], comment_reports[issue.issue_id][comment.id])
+      we.FlagComment(issue, comment, False)
+      self.assertEqual([], comment_reports[issue.issue_id][comment.id])
+
+  def testFlagComment_AutoVerdict(self):
+    """Admins can mark and unmark a comment as spam, and it is a verdict."""
+    self.SignIn(user_id=self.admin_user.user_id)
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=111,
+        issue_id=issue.issue_id)
+    self.services.issue.TestAddComment(comment, 1)
+
+    comment_reports = self.services.spam.comment_reports_by_issue_id
+    manual_verdicts = self.services.spam.manual_verdicts_by_comment_id
+    with self.work_env as we:
+      we.FlagComment(issue, comment, True)
+      self.assertEqual([444], comment_reports[issue.issue_id][comment.id])
+      self.assertTrue(manual_verdicts[comment.id][444])
+      we.FlagComment(issue, comment, False)
+      self.assertEqual([], comment_reports[issue.issue_id][comment.id])
+      self.assertFalse(manual_verdicts[comment.id][444])
+
+  def testFlagComment_NotAllowed(self):
+    """Anons can't mark comment as spam."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=111,
+        issue_id=issue.issue_id)
+    self.services.issue.TestAddComment(comment, 1)
+
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.FlagComment(issue, comment, True)
+
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.FlagComment(issue, comment, False)
+
+  def testStarIssue_Normal(self):
+    """We can star and unstar issues."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    self.SignIn(user_id=111)
+
+    with self.work_env as we:
+      updated_issue = we.StarIssue(issue, True)
+      self.assertEqual(1, updated_issue.star_count)
+      updated_issue = we.StarIssue(issue, False)
+      self.assertEqual(0, updated_issue.star_count)
+
+  def testStarIssue_Anon(self):
+    """A signed out user cannot star or unstar issues."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    # Don't sign in.
+
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.StarIssue(issue, True)
+
+  def testIsIssueStarred_Normal(self):
+    """We can check if the current user starred an issue or not."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    self.SignIn(user_id=111)
+
+    with self.work_env as we:
+      self.assertFalse(we.IsIssueStarred(issue))
+      we.StarIssue(issue, True)
+      self.assertTrue(we.IsIssueStarred(issue))
+      we.StarIssue(issue, False)
+      self.assertFalse(we.IsIssueStarred(issue))
+
+  def testIsIssueStarred_Anon(self):
+    """A signed out user has never starred anything."""
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    # Don't sign in.
+
+    with self.work_env as we:
+      self.assertFalse(we.IsIssueStarred(issue))
+
+  def testListStarredIssueIDs_Anon(self):
+    """A signed out users has no starred issues."""
+    # Don't sign in.
+    with self.work_env as we:
+      self.assertEqual([], we.ListStarredIssueIDs())
+
+  def testListStarredIssueIDs_Normal(self):
+    """We can get the list of issues starred by a user."""
+    issue1 = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue1)
+    issue2 = fake.MakeTestIssue(789, 2, 'sum2', 'New', 111, issue_id=78902)
+    self.services.issue.TestAddIssue(issue2)
+
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      # User has not starred anything yet.
+      self.assertEqual([], we.ListStarredIssueIDs())
+
+      # Now, star a couple of issues.
+      we.StarIssue(issue1, True)
+      we.StarIssue(issue2, True)
+      self.assertItemsEqual(
+          [issue1.issue_id, issue2.issue_id],
+          we.ListStarredIssueIDs())
+
+    # Check that there is no cross-talk between users.
+    self.SignIn(user_id=222)
+    with self.work_env as we:
+      # User has not starred anything yet.
+      self.assertEqual([], we.ListStarredIssueIDs())
+
+      # Now, star an issue as that other user.
+      we.StarIssue(issue1, True)
+      self.assertEqual([issue1.issue_id], we.ListStarredIssueIDs())
+
+  def testGetUser(self):
+    """We return the User PB for the given existing user id."""
+    expected = self.services.user.TestAddUser('test5@example.com', 555)
+    with self.work_env as we:
+      actual = we.GetUser(555)
+      self.assertEqual(expected, actual)
+
+  def testBatchGetUsers(self):
+    """We return the User PBs for all given user ids."""
+    actual = self.work_env.BatchGetUsers(
+        [self.user_1.user_id, self.user_2.user_id])
+    self.assertEqual(actual, [self.user_1, self.user_2])
+
+  def testBatchGetUsers_NoUserFound(self):
+    """We raise an exception if a User is not found."""
+    with self.assertRaises(exceptions.NoSuchUserException):
+      self.work_env.BatchGetUsers(
+          [self.user_1.user_id, self.user_2.user_id, 404])
+
+  def testGetUser_DoesntExist(self):
+    """We reject attempts to get an user that doesn't exist."""
+    with self.assertRaises(exceptions.NoSuchUserException):
+      with self.work_env as we:
+        we.GetUser(555)
+
+  def setUpUserGroups(self):
+    self.services.user.TestAddUser('test5@example.com', 555)
+    self.services.user.TestAddUser('test6@example.com', 666)
+    public_group_id = self.services.usergroup.CreateGroup(
+        self.cnxn, self.services, 'group1@test.com', 'anyone')
+    private_group_id = self.services.usergroup.CreateGroup(
+        self.cnxn, self.services, 'group2@test.com', 'owners')
+    self.services.usergroup.UpdateMembers(
+        self.cnxn, public_group_id, [111], 'member')
+    self.services.usergroup.UpdateMembers(
+        self.cnxn, private_group_id, [555, 111], 'owner')
+    return public_group_id, private_group_id
+
+  def testGetMemberships_Anon(self):
+    """We return groups the user is in and that are visible to the requester."""
+    public_group_id, _ = self.setUpUserGroups()
+    with self.work_env as we:
+      self.assertEqual(we.GetMemberships(111), [public_group_id])
+
+  def testGetMemberships_UserHasPerm(self):
+    public_group_id, private_group_id = self.setUpUserGroups()
+    self.SignIn(user_id=555)
+    with self.work_env as we:
+      self.assertItemsEqual(
+          we.GetMemberships(111), [public_group_id, private_group_id])
+
+  def testGetMemeberships_UserHasNoPerm(self):
+    public_group_id, _ = self.setUpUserGroups()
+    self.SignIn(user_id=666)
+    with self.work_env as we:
+      self.assertItemsEqual(
+          we.GetMemberships(111), [public_group_id])
+
+  def testGetMemeberships_GetOwnMembership(self):
+    public_group_id, private_group_id = self.setUpUserGroups()
+    self.SignIn(user_id=111)
+    with self.work_env as we:
+      self.assertItemsEqual(
+          we.GetMemberships(111), [public_group_id, private_group_id])
+
+  def testListReferencedUsers(self):
+    """We return the list of User PBs for the given existing user emails."""
+    user5 = self.services.user.TestAddUser('test5@example.com', 555)
+    user6 = self.services.user.TestAddUser('test6@example.com', 666)
+    with self.work_env as we:
+      # We ignore emails that are empty or belong to non-existent users.
+      users, linked_user_ids = we.ListReferencedUsers(
+          ['test4@example.com', 'test5@example.com', 'test6@example.com', ''])
+      self.assertItemsEqual(users, [user5, user6])
+      self.assertEqual(linked_user_ids, [])
+
+  def testListReferencedUsers_Linked(self):
+    """We return User PBs and the IDs of any linked accounts."""
+    user5 = self.services.user.TestAddUser('test5@example.com', 555)
+    user5.linked_child_ids = [666, 777]
+    user6 = self.services.user.TestAddUser('test6@example.com', 666)
+    user6.linked_parent_id = 555
+    with self.work_env as we:
+      # We ignore emails that are empty or belong to non-existent users.
+      users, linked_user_ids = we.ListReferencedUsers(
+          ['test4@example.com', 'test5@example.com', 'test6@example.com', ''])
+      self.assertItemsEqual(users, [user5, user6])
+      self.assertItemsEqual(linked_user_ids, [555, 666, 777])
+
+  def testStarUser_Normal(self):
+    """We can star and unstar a user."""
+    self.SignIn()
+    with self.work_env as we:
+      self.assertFalse(we.IsUserStarred(111))
+      we.StarUser(111, True)
+      self.assertTrue(we.IsUserStarred(111))
+      we.StarUser(111, False)
+      self.assertFalse(we.IsUserStarred(111))
+
+  def testStarUser_NoSuchUser(self):
+    """We can't star a nonexistent user."""
+    self.SignIn()
+    with self.assertRaises(exceptions.NoSuchUserException):
+      with self.work_env as we:
+        we.StarUser(999, True)
+
+  def testStarUser_Anon(self):
+    """Anon user can't star a user."""
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.StarUser(111, True)
+
+  def testIsUserStarred_Normal(self):
+    """We can check if a user is starred."""
+    # Tested by method testStarUser_Normal().
+    pass
+
+  def testIsUserStarred_NoUserSpecified(self):
+    """A user ID must be specified."""
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException):
+        self.assertFalse(we.IsUserStarred(None))
+
+  def testIsUserStarred_NoSuchUser(self):
+    """We can't check for stars on a nonexistent user."""
+    self.SignIn()
+    with self.assertRaises(exceptions.NoSuchUserException):
+      with self.work_env as we:
+        we.IsUserStarred(999)
+
+  def testGetUserStarCount_Normal(self):
+    """We can count the stars of a user."""
+    self.SignIn()
+    with self.work_env as we:
+      self.assertEqual(0, we.GetUserStarCount(111))
+      we.StarUser(111, True)
+      self.assertEqual(1, we.GetUserStarCount(111))
+
+    self.SignIn(user_id=self.admin_user.user_id)
+    with self.work_env as we:
+      we.StarUser(111, True)
+      self.assertEqual(2, we.GetUserStarCount(111))
+      we.StarUser(111, False)
+      self.assertEqual(1, we.GetUserStarCount(111))
+
+  def testGetUserStarCount_NoSuchUser(self):
+    """We can't count stars of a nonexistent user."""
+    self.SignIn()
+    with self.assertRaises(exceptions.NoSuchUserException):
+      with self.work_env as we:
+        we.GetUserStarCount(111111)
+
+  def testGetUserStarCount_NoUserSpecified(self):
+    """A user ID must be specified."""
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException):
+        self.assertFalse(we.GetUserStarCount(None))
+
+  def testGetPendingLinkInvites_Anon(self):
+    """Anon never had pending linkage invites."""
+    with self.work_env as we:
+      as_parent, as_child = we.GetPendingLinkedInvites()
+    self.assertEqual([], as_parent)
+    self.assertEqual([], as_child)
+
+  def testGetPendingLinkInvites_None(self):
+    """When an account has no invites, we see empty lists."""
+    self.SignIn()
+    with self.work_env as we:
+      as_parent, as_child = we.GetPendingLinkedInvites()
+    self.assertEqual([], as_parent)
+    self.assertEqual([], as_child)
+
+  def testGetPendingLinkInvites_Some(self):
+    """If there are any pending invites for the current user, we get them."""
+    self.SignIn()
+    self.services.user.invite_rows = [(111, 222), (333, 444), (555, 111)]
+    with self.work_env as we:
+      as_parent, as_child = we.GetPendingLinkedInvites()
+    self.assertEqual([222], as_parent)
+    self.assertEqual([555], as_child)
+
+  def testInviteLinkedParent_MissingParent(self):
+    """Invited parent must be specified by email."""
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException):
+        we.InviteLinkedParent('')
+
+  def testInviteLinkedParent_Anon(self):
+    """Anon cannot invite anyone to link accounts."""
+    with self.work_env as we:
+      with self.assertRaises(permissions.PermissionException):
+        we.InviteLinkedParent('x@example.com')
+
+  def testInviteLinkedParent_NotAMatch(self):
+    """We only allow linkage invites when usernames match."""
+    self.SignIn()
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException) as cm:
+        we.InviteLinkedParent('x@example.com')
+      self.assertEqual('Linked account names must match', cm.exception.message)
+
+  @mock.patch('settings.linkable_domains', {'example.com': ['other.com']})
+  def testInviteLinkedParent_BadDomain(self):
+    """We only allow linkage invites between allowlisted domains."""
+    self.SignIn()
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException) as cm:
+        we.InviteLinkedParent('user_111@hacker.com')
+      self.assertEqual(
+          'Linked account unsupported domain', cm.exception.message)
+
+  @mock.patch('settings.linkable_domains', {'example.com': ['other.com']})
+  def testInviteLinkedParent_NoSuchParent(self):
+    """Verify that the parent account already exists."""
+    self.SignIn()
+    with self.work_env as we:
+      with self.assertRaises(exceptions.NoSuchUserException):
+        we.InviteLinkedParent('user_111@other.com')
+
+  @mock.patch('settings.linkable_domains', {'example.com': ['other.com']})
+  def testInviteLinkedParent_Normal(self):
+    """A child account can invite a matching parent account to link."""
+    self.services.user.TestAddUser('user_111@other.com', 555)
+    self.SignIn()
+    with self.work_env as we:
+      we.InviteLinkedParent('user_111@other.com')
+      self.assertEqual(
+          [(555, 111)], self.services.user.invite_rows)
+
+  def testAcceptLinkedChild_NoInvite(self):
+    """A parent account can only accept an exiting invite."""
+    self.SignIn()
+    self.services.user.invite_rows = [(111, 222)]
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException):
+        we.AcceptLinkedChild(333)
+
+    self.SignIn(user_id=222)
+    self.services.user.invite_rows = [(111, 333)]
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException):
+        we.AcceptLinkedChild(333)
+
+  def testAcceptLinkedChild_Normal(self):
+    """A parent account can accept an invite from a child."""
+    self.SignIn()
+    self.services.user.invite_rows = [(111, 222)]
+    with self.work_env as we:
+      we.AcceptLinkedChild(222)
+      self.assertEqual(
+        [(111, 222)], self.services.user.linked_account_rows)
+      self.assertEqual(
+        [], self.services.user.invite_rows)
+
+  def testUnlinkAccounts_NotAllowed(self):
+    """Reject attempts to unlink someone else's accounts."""
+    self.SignIn(user_id=333)
+    with self.work_env as we:
+      with self.assertRaises(permissions.PermissionException):
+        we.UnlinkAccounts(111, 222)
+
+  def testUnlinkAccounts_AdminIsAllowed(self):
+    """Site admins may unlink someone else's accounts."""
+    self.SignIn(user_id=444)
+    self.services.user.linked_account_rows = [(111, 222)]
+    with self.work_env as we:
+      we.UnlinkAccounts(111, 222)
+    self.assertNotIn((111, 222), self.services.user.linked_account_rows)
+
+  def testUnlinkAccounts_Normal(self):
+    """A parent or child can unlink their linked account."""
+    self.SignIn(user_id=111)
+    self.services.user.linked_account_rows = [(111, 222), (333, 444)]
+    with self.work_env as we:
+      we.UnlinkAccounts(111, 222)
+    self.assertEqual([(333, 444)], self.services.user.linked_account_rows)
+
+    self.SignIn(user_id=222)
+    self.services.user.linked_account_rows = [(111, 222), (333, 444)]
+    with self.work_env as we:
+      we.UnlinkAccounts(111, 222)
+    self.assertEqual([(333, 444)], self.services.user.linked_account_rows)
+
+  def testUpdateUserSettings(self):
+    """We can update the settings of the logged in user."""
+    self.SignIn()
+    user = self.services.user.GetUser(self.cnxn, 111)
+    with self.work_env as we:
+      we.UpdateUserSettings(
+          user,
+          obscure_email=True,
+          keep_people_perms_open=True)
+
+    self.assertTrue(user.obscure_email)
+    self.assertTrue(user.keep_people_perms_open)
+
+  def testUpdateUserSettings_Anon(self):
+    """A user must be logged in."""
+    anon = self.services.user.GetUser(self.cnxn, 0)
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException):
+        we.UpdateUserSettings(anon, keep_people_perms_open=True)
+
+  def testGetUserPrefs_Anon(self):
+    """Anon always has empty prefs."""
+    with self.work_env as we:
+      userprefs = we.GetUserPrefs(0)
+
+    self.assertEqual(0, userprefs.user_id)
+    self.assertEqual([], userprefs.prefs)
+
+  def testGetUserPrefs_Mine_Empty(self):
+    """User who never set any pref gets empty prefs."""
+    self.SignIn()
+    with self.work_env as we:
+      userprefs = we.GetUserPrefs(111)
+
+    self.assertEqual(111, userprefs.user_id)
+    self.assertEqual([], userprefs.prefs)
+
+  def testGetUserPrefs_Mine_Some(self):
+    """User who set a pref gets it back."""
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+    self.SignIn()
+    with self.work_env as we:
+      userprefs = we.GetUserPrefs(111)
+
+    self.assertEqual(111, userprefs.user_id)
+    self.assertEqual(1, len(userprefs.prefs))
+    self.assertEqual('code_font', userprefs.prefs[0].name)
+    self.assertEqual('true', userprefs.prefs[0].value)
+
+  def testGetUserPrefs_Other_Allowed(self):
+    """A site admin can read another user's prefs."""
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+    self.SignIn(user_id=self.admin_user.user_id)
+
+    with self.work_env as we:
+      userprefs = we.GetUserPrefs(111)
+
+    self.assertEqual(111, userprefs.user_id)
+    self.assertEqual(1, len(userprefs.prefs))
+    self.assertEqual('code_font', userprefs.prefs[0].name)
+    self.assertEqual('true', userprefs.prefs[0].value)
+
+  def testGetUserPrefs_Other_Denied(self):
+    """A non-admin cannot read another user's prefs."""
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+    # user2 is not a site admin.
+    self.SignIn(222)
+
+    with self.work_env as we:
+      with self.assertRaises(permissions.PermissionException):
+        we.GetUserPrefs(111)
+
+  def _SetUpCorpUsers(self, user_ids):
+    self.services.user.TestAddUser('corp_group@example.com', 888)
+    self.services.usergroup.TestAddGroupSettings(
+        888, 'corp_group@example.com')
+    self.services.usergroup.TestAddMembers(888, user_ids)
+
+  # TODO(jrobbins): Update this with user group prefs when implemented.
+  @mock.patch(
+      'settings.restrict_new_issues_user_groups', ['corp_group@example.com'])
+  def testGetUserPrefs_Mine_RestrictNewIssues(self):
+    """User who belongs to restrict_new_issues user group gets those prefs."""
+    self._SetUpCorpUsers([111, 222])
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+    self.SignIn()
+    with self.work_env as we:
+      userprefs = we.GetUserPrefs(111)
+
+    self.assertEqual(111, userprefs.user_id)
+    self.assertEqual(2, len(userprefs.prefs))
+    self.assertEqual('code_font', userprefs.prefs[0].name)
+    self.assertEqual('true', userprefs.prefs[0].value)
+    self.assertEqual('restrict_new_issues', userprefs.prefs[1].name)
+    self.assertEqual('true', userprefs.prefs[1].value)
+
+  @mock.patch(
+      'settings.restrict_new_issues_user_groups', ['corp_group@example.com'])
+  def testGetUserPrefs_Mine_RestrictNewIssues_OptedOut(self):
+    """If a restrict_new_issues user has opted out, use that pref value."""
+    self._SetUpCorpUsers([111, 222])
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='restrict_new_issues', value='false')])
+    self.SignIn()
+    with self.work_env as we:
+      userprefs = we.GetUserPrefs(111)
+
+    self.assertEqual(111, userprefs.user_id)
+    self.assertEqual(1, len(userprefs.prefs))
+    self.assertEqual('restrict_new_issues', userprefs.prefs[0].name)
+    self.assertEqual('false', userprefs.prefs[0].value)
+
+  # TODO(jrobbins): Update this with user group prefs when implemented.
+  @mock.patch(
+      'settings.public_issue_notice_user_groups', ['corp_group@example.com'])
+  def testGetUserPrefs_Mine_PublicIssueNotice(self):
+    """User who belongs to public_issue_notice user group gets those prefs."""
+    self._SetUpCorpUsers([111, 222])
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+    self.SignIn()
+    with self.work_env as we:
+      userprefs = we.GetUserPrefs(111)
+
+    self.assertEqual(111, userprefs.user_id)
+    self.assertEqual(2, len(userprefs.prefs))
+    self.assertEqual('code_font', userprefs.prefs[0].name)
+    self.assertEqual('true', userprefs.prefs[0].value)
+    self.assertEqual('public_issue_notice', userprefs.prefs[1].name)
+    self.assertEqual('true', userprefs.prefs[1].value)
+
+  @mock.patch(
+      'settings.public_issue_notice_user_groups', ['corp_group@example.com'])
+  def testGetUserPrefs_Mine_PublicIssueNotice_OptedOut(self):
+    """If a public_issue_notice user has opted out, use that pref value."""
+    self._SetUpCorpUsers([111, 222])
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='public_issue_notice', value='false')])
+    self.SignIn()
+    with self.work_env as we:
+      userprefs = we.GetUserPrefs(111)
+
+    self.assertEqual(111, userprefs.user_id)
+    self.assertEqual(1, len(userprefs.prefs))
+    self.assertEqual('public_issue_notice', userprefs.prefs[0].name)
+    self.assertEqual('false', userprefs.prefs[0].value)
+
+  def testSetUserPrefs_Anon(self):
+    """Anon cannot set prefs."""
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException):
+        we.SetUserPrefs(0, [])
+
+  def testSetUserPrefs_Mine_Empty(self):
+    """Setting zero prefs is a no-op.."""
+    self.SignIn(111)
+
+    with self.work_env as we:
+      we.SetUserPrefs(111, [])
+
+    prefs_after = self.services.user.GetUserPrefs(self.cnxn, 111)
+    self.assertEqual(0, len(prefs_after.prefs))
+
+  def testSetUserPrefs_Mine_Add(self):
+    """User can set a preference for the first time."""
+    self.SignIn(111)
+
+    with self.work_env as we:
+      we.SetUserPrefs(
+          111,
+          [user_pb2.UserPrefValue(name='code_font', value='true')])
+
+    prefs_after = self.services.user.GetUserPrefs(self.cnxn, 111)
+    self.assertEqual(1, len(prefs_after.prefs))
+    self.assertEqual('code_font', prefs_after.prefs[0].name)
+    self.assertEqual('true', prefs_after.prefs[0].value)
+
+  def testSetUserPrefs_Mine_Overwrite(self):
+    """User can change the value of a pref."""
+    self.SignIn(111)
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+
+    with self.work_env as we:
+      we.SetUserPrefs(
+          111,
+          [user_pb2.UserPrefValue(name='code_font', value='false')])
+
+    prefs_after = self.services.user.GetUserPrefs(self.cnxn, 111)
+    self.assertEqual(1, len(prefs_after.prefs))
+    self.assertEqual('code_font', prefs_after.prefs[0].name)
+    self.assertEqual('false', prefs_after.prefs[0].value)
+
+  def testSetUserPrefs_Mine_Bad(self):
+    """User cannot set a preference value that is not valid."""
+    self.SignIn(111)
+
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException):
+        we.SetUserPrefs(
+            111,
+            [user_pb2.UserPrefValue(name='code_font', value='sorta')])
+      with self.assertRaises(exceptions.InputException):
+        we.SetUserPrefs(
+            111,
+            [user_pb2.UserPrefValue(name='sign', value='gemini')])
+
+    # Regardless of exceptions, nothing was actually stored.
+    prefs_after = self.services.user.GetUserPrefs(self.cnxn, 111)
+    self.assertEqual(0, len(prefs_after.prefs))
+
+  def testSetUserPrefs_Other_Allowed(self):
+    """A site admin can update another user's prefs."""
+    self.SignIn(user_id=self.admin_user.user_id)
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+
+    with self.work_env as we:
+      we.SetUserPrefs(
+          111,
+          [user_pb2.UserPrefValue(name='code_font', value='false')])
+
+    prefs_after = self.services.user.GetUserPrefs(self.cnxn, 111)
+    self.assertEqual(1, len(prefs_after.prefs))
+    self.assertEqual('code_font', prefs_after.prefs[0].name)
+    self.assertEqual('false', prefs_after.prefs[0].value)
+
+  def testSetUserPrefs_Other_Denied(self):
+    """A non-admin cannot set another user's prefs."""
+    # user2 is not a site admin.
+    self.SignIn(222)
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='code_font', value='true')])
+
+    with self.work_env as we:
+      with self.assertRaises(permissions.PermissionException):
+        we.SetUserPrefs(
+            111,
+            [user_pb2.UserPrefValue(name='code_font', value='false')])
+
+    # Regardless of any exception, the preferences remain unchanged.
+    prefs_after = self.services.user.GetUserPrefs(self.cnxn, 111)
+    self.assertEqual(1, len(prefs_after.prefs))
+    self.assertEqual('code_font', prefs_after.prefs[0].name)
+    self.assertEqual('true', prefs_after.prefs[0].value)
+
+  # FUTURE: GetUser()
+  # FUTURE: UpdateUser()
+  # FUTURE: DeleteUser()
+  # FUTURE: ListStarredUsers()
+
+  def testExpungeUsers_PermissionException(self):
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.ExpungeUsers([])
+
+  def testExpungeUsers_NoUsers(self):
+    self.mr.cnxn = mock.Mock()
+    self.mr.cnxn.Commit = mock.Mock()
+    self.services.usergroup.group_dag = mock.Mock()
+
+    self.mr.perms = permissions.ADMIN_PERMISSIONSET
+    with self.work_env as we:
+      we.ExpungeUsers(['unknown@user.test'])
+
+    self.mr.cnxn.Commit.assert_not_called()
+    self.services.usergroup.group_dag.MarkObsolete.assert_not_called()
+
+  def testExpungeUsers_ReservedUserID(self):
+    self.mr.cnxn = mock.Mock()
+    self.mr.cnxn.Commit = mock.Mock()
+    self.services.usergroup.group_dag = mock.Mock()
+
+    user_1 = self.services.user.TestAddUser(
+        'tainted-data@user.test', framework_constants.DELETED_USER_ID)
+
+    self.mr.perms = permissions.ADMIN_PERMISSIONSET
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.ExpungeUsers([user_1.email])
+
+  @mock.patch(
+      'features.send_notifications.'
+      'PrepareAndSendDeletedFilterRulesNotification')
+  def testExpungeUsers_SkipPermissieons(self, _fake_pasdfrn):
+    self.mr.cnxn = mock.Mock()
+    self.services.usergroup.group_dag = mock.Mock()
+    with self.work_env as we:
+      we.ExpungeUsers([], check_perms=False)
+
+  @mock.patch(
+      'features.send_notifications.'
+      'PrepareAndSendDeletedFilterRulesNotification')
+  def testExpungeUsers(self, fake_pasdfrn):
+    """Test user data correctly expunged."""
+    # Replace template service mock with fake testing TemplateService
+    self.services.template = fake.TemplateService()
+
+    wipeout_emails = ['cow@test.com', 'chicken@test.com', 'llama@test.com',
+                      'alpaca@test.com']
+    user_1 = self.services.user.TestAddUser('cow@test.com', 111)
+    user_2 = self.services.user.TestAddUser('chicken@test.com', 222)
+    user_3 = self.services.user.TestAddUser('llama@test.com', 333)
+    user_4 = self.services.user.TestAddUser('random@test.com', 888)
+    ids_by_email = {user_1.email: user_1.user_id, user_2.email: user_2.user_id,
+                    user_3.email: user_3.user_id}
+    user_ids = list(ids_by_email.values())
+
+    # set up testing data
+    starred_project_id = 19
+    self.services.project_star._SetStar(self.mr.cnxn, 12, user_1.user_id, True)
+    self.services.user_star.SetStar(
+        self.mr.cnxn, user_2.user_id, user_4.user_id, True)
+    template = self.services.template.TestAddIssueTemplateDef(
+        13, 16, 'template name', owner_id=user_3.user_id)
+    project1 = self.services.project.TestAddProject(
+        'project1', owner_ids=[111, 333], project_id=16)
+    project2 = self.services.project.TestAddProject(
+        'project2',owner_ids=[888], contrib_ids=[111, 222],
+        committer_ids=[333], project_id=17)
+
+    self.services.features.TestAddFilterRule(
+        16, 'owner:cow@test.com', add_cc_ids=[user_4.user_id])
+    self.services.features.TestAddFilterRule(
+        16, 'owner:random@test.com',
+        add_cc_ids=[user_2.user_id, user_3.user_id])
+    self.services.features.TestAddFilterRule(
+        17, 'label:random-label', add_notify=[user_3.email])
+    kept_rule = self.services.features.TestAddFilterRule(
+        16, 'owner:random@test.com', add_notify=['random2@test.com'])
+
+    self.mr.cnxn = mock.Mock()
+    self.services.usergroup.group_dag = mock.Mock()
+
+    # call ExpungeUsers
+    self.mr.perms = permissions.ADMIN_PERMISSIONSET
+    with self.work_env as we:
+      we.ExpungeUsers(wipeout_emails)
+
+    # Assert users expunged in stars
+    self.assertFalse(self.services.project_star.IsItemStarredBy(
+        self.mr.cnxn, starred_project_id, user_1.user_id))
+    self.assertFalse(self.services.user_star.CountItemStars(
+        self.mr.cnxn, user_2.user_id))
+
+    # Assert users expunged in quick edits and saved queries
+    self.assertItemsEqual(
+        self.services.features.expunged_users_in_quick_edits, user_ids)
+    self.assertItemsEqual(
+        self.services.features.expunged_users_in_saved_queries, user_ids)
+
+    # Assert users expunged in templates and configs
+    self.assertIsNone(template.owner_id)
+    self.assertItemsEqual(
+        self.services.config.expunged_users_in_configs, user_ids)
+
+    # Assert users expunged in projects
+    self.assertEqual(project1.owner_ids, [])
+    self.assertEqual(project2.contributor_ids, [])
+
+    # Assert users expunged in issues
+    self.assertItemsEqual(
+        self.services.issue.expunged_users_in_issues, user_ids)
+    self.assertTrue(self.services.issue.enqueue_issues_called)
+
+    # Assert users expunged in spam
+    self.assertItemsEqual(
+        self.services.spam.expunged_users_in_spam, user_ids)
+
+    # Assert users expunged in hotlists
+    self.assertItemsEqual(
+        self.services.features.expunged_users_in_hotlists, user_ids)
+
+    # Assert users expunged in groups
+    self.assertItemsEqual(
+        self.services.usergroup.expunged_users_in_groups, user_ids)
+
+    # Assert filter rules expunged
+    self.assertEqual(
+        self.services.features.test_rules[16], [kept_rule])
+    self.assertEqual(
+        self.services.features.test_rules[17], [])
+
+    # Assert mocks
+    self.assertEqual(7, len(self.mr.cnxn.Commit.call_args_list))
+    self.services.usergroup.group_dag.MarkObsolete.assert_called_once()
+
+    fake_pasdfrn.assert_has_calls(
+        [mock.call(
+            16,
+            'testing-app.appspot.com',
+            ['if owner:%s then add cc(s): random@test.com' % (
+                framework_constants.DELETED_USER_NAME),
+             'if owner:random@test.com then add cc(s): %s, %s' % (
+                 framework_constants.DELETED_USER_NAME,
+                 framework_constants.DELETED_USER_NAME)]),
+         mock.call(
+             17,
+             'testing-app.appspot.com',
+             ['if label:random-label then notify: %s' % (
+                 framework_constants.DELETED_USER_NAME)])
+        ])
+
+  def testTotalUsersCount_WithDeletedUser(self):
+    # Clear users added previously with TestAddUser
+    self.services.user.users_by_id = {}
+    self.services.user.TestAddUser(
+        '', framework_constants.DELETED_USER_ID)
+    self.services.user.TestAddUser('cow@test.com', 111)
+    self.services.user.TestAddUser('chicken@test.com', 222)
+    self.assertEqual(2, self.services.user.TotalUsersCount(self.mr.cnxn))
+
+  def testTotalUsersCount(self):
+    # Clear users added previously with TestAddUser
+    self.services.user.users_by_id = {}
+    self.services.user.TestAddUser('cow@test.com', 111)
+    self.assertEqual(1, self.services.user.TotalUsersCount(self.mr.cnxn))
+
+  def testGetAllUserEmailsBatch(self):
+    # Clear users added previously with TestAddUser
+    self.services.user.users_by_id = {}
+    user_1 = self.services.user.TestAddUser('cow@test.com', 111)
+    user_2 = self.services.user.TestAddUser('chicken@test.com', 222)
+    user_6 = self.services.user.TestAddUser('6@test.com', 666)
+    user_5 = self.services.user.TestAddUser('5@test.com', 555)
+    user_3 = self.services.user.TestAddUser('3@test.com', 333)
+    self.services.user.TestAddUser('4@test.com', 444)
+
+
+    self.assertItemsEqual(
+        [user_1.email, user_2.email, user_3.email],
+        self.services.user.GetAllUserEmailsBatch(self.mr.cnxn, limit=3))
+    self.assertItemsEqual(
+        [user_5.email, user_6.email],
+        self.services.user.GetAllUserEmailsBatch(
+            self.mr.cnxn, limit=3, offset=4))
+
+    # Test existence of deleted user does not change results.
+    self.services.user.TestAddUser(
+        '', framework_constants.DELETED_USER_ID)
+    self.assertItemsEqual(
+        [user_1.email, user_2.email, user_3.email],
+        self.services.user.GetAllUserEmailsBatch(self.mr.cnxn, limit=3))
+    self.assertItemsEqual(
+        [user_5.email, user_6.email],
+        self.services.user.GetAllUserEmailsBatch(
+            self.mr.cnxn, limit=3, offset=4))
+
+  # FUTURE: CreateGroup()
+  # FUTURE: ListGroups()
+  # FUTURE: UpdateGroup()
+  # FUTURE: DeleteGroup()
+
+  def AddIssueToHotlist(self, hotlist_id, issue_id=78901, adder_id=111):
+    self.services.features.AddIssuesToHotlists(
+        self.cnxn, [hotlist_id], [(issue_id, adder_id, 0, '')],
+        None, None, None)
+
+  def testCreateHotlist_Normal(self):
+    """We can create a hotlist."""
+    issue_1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue_1)
+
+    self.SignIn()
+    with self.work_env as we:
+      hotlist = we.CreateHotlist(
+          'name', 'summary', 'description', [222], [78901], False,
+          'priority owner')
+
+    self.assertEqual('name', hotlist.name)
+    self.assertEqual('summary', hotlist.summary)
+    self.assertEqual('description', hotlist.description)
+    self.assertEqual([111], hotlist.owner_ids)
+    self.assertEqual([222], hotlist.editor_ids)
+    self.assertEqual([78901], [item.issue_id for item in hotlist.items])
+    self.assertEqual(False, hotlist.is_private)
+    self.assertEqual('priority owner', hotlist.default_col_spec)
+
+  def testCreateHotlist_NotViewable(self):
+    """We cannot add issues we cannot see to a hotlist."""
+    hotlist_owner_id = 333
+    issue1 = fake.MakeTestIssue(
+        789, 1, 'sum1', 'New', 111, issue_id=78901,
+        labels=['Restrict-View-Chicken'])
+    self.services.issue.TestAddIssue(issue1)
+
+    self.SignIn(user_id=hotlist_owner_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.CreateHotlist(
+            'Cow-Hotlist', 'Moo', 'MooMoo', [], [issue1.issue_id], False, '')
+
+  def testCreateHotlist_AnonCantCreateHotlist(self):
+    """We must be signed in to create a hotlist."""
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.CreateHotlist('name', 'summary', 'description', [], [222], False, '')
+
+  def testCreateHotlist_InvalidName(self):
+    """We can't create a hotlist with an invalid name."""
+    self.SignIn()
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.CreateHotlist(
+            '***Invalid***', 'summary', 'description', [], [], False, '')
+
+  def testCreateHotlist_HotlistAlreadyExists(self):
+    """We can't create a hotlist with a name that already exists."""
+    self.SignIn()
+    with self.work_env as we:
+      we.CreateHotlist('name', 'summary', 'description', [], [], False, '')
+
+    with self.assertRaises(features_svc.HotlistAlreadyExists):
+      with self.work_env as we:
+        we.CreateHotlist('name', 'foo', 'bar', [], [], True, '')
+
+  def testUpdateHotlist(self):
+    """We can update a hotlist."""
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.work_env as we:
+      we.UpdateHotlist(
+          self.hotlist.hotlist_id, hotlist_name=self.hotlist.name,
+          summary='new sum', description='new desc',
+          owner_id=self.user_2.user_id,
+          add_editor_ids=[self.user_1.user_id, self.user_3.user_id],
+          is_private=False)
+      updated_hotlist = we.GetHotlist(self.hotlist.hotlist_id)
+
+    expected_hotlist = features_pb2.Hotlist(
+        hotlist_id=self.hotlist.hotlist_id, name=self.hotlist.name,
+        summary='new sum', description='new desc',
+        owner_ids=[self.user_2.user_id],
+        editor_ids=[self.user_2.user_id,
+                    self.user_3.user_id,
+                    self.user_1.user_id],
+        is_private=False)
+    self.assertEqual(updated_hotlist, expected_hotlist)
+
+  @mock.patch('testing.fake.FeaturesService.UpdateHotlist')
+  def testUpdateHotlist_NoChanges(self, fake_update_hotlist):
+    """The DB does not get updated if all changes are no-op changes"""
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.work_env as we:
+      we.UpdateHotlist(
+          self.hotlist.hotlist_id, hotlist_name=self.hotlist.name,
+          owner_id=self.user_1.user_id,
+          add_editor_ids=[self.user_1.user_id, self.user_2.user_id],
+          is_private=self.hotlist.is_private,
+          default_col_spec=self.hotlist.default_col_spec,
+          summary=self.hotlist.summary,
+          description=self.hotlist.description)
+      updated_hotlist = we.GetHotlist(self.hotlist.hotlist_id)
+
+    self.assertEqual(updated_hotlist, self.hotlist)
+    fake_update_hotlist.assert_not_called()
+
+  def testUpdateHotlist_HotlistNotFound(self):
+    """Error is thrown when a hotlist is not found."""
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      with self.work_env as we:
+        we.UpdateHotlist(404)
+
+  def testUpdateHotlist_NoPermissions(self):
+    """Error is thrown when the user doesn't have administer permisisons."""
+    self.SignIn(user_id=self.user_2.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.UpdateHotlist(self.hotlist.hotlist_id)
+
+  def testUpdateHotlist_InvalidName(self):
+    """Error is thrown when proposed new name is invalid."""
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.UpdateHotlist(self.hotlist.hotlist_id, hotlist_name='-Chicken')
+
+  def testUpdateHotlist_HotlistAlreadyExistsOwnerChange(self):
+    """Error is thrown proposed owner has hotlist with same name."""
+    _hotlist_conflict = self.work_env.services.features.TestAddHotlist(
+        'myhotlist', summary='old sum', owner_ids=[self.user_2.user_id],
+        description='old desc', hotlist_id=458, is_private=True)
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.assertRaises(features_svc.HotlistAlreadyExists):
+      with self.work_env as we:
+        we.UpdateHotlist(self.hotlist.hotlist_id, owner_id=self.user_2.user_id)
+
+  def testUpdateHotlist_HotlistAlreadyExistsNameChange(self):
+    """Error is thrown when owner already has a hotlist with same name as
+       proposed name."""
+    hotlist_conflict = self.work_env.services.features.TestAddHotlist(
+        'myhotlist2', summary='old sum', owner_ids=[self.user_1.user_id],
+        description='old desc', hotlist_id=458, is_private=True)
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.assertRaises(features_svc.HotlistAlreadyExists):
+      with self.work_env as we:
+        we.UpdateHotlist(
+            self.hotlist.hotlist_id, hotlist_name=hotlist_conflict.name)
+
+  def testUpdateHotlist_HotlistAlreadyExistsNameAndOwnerChange(self):
+    """Error is thrown when new owner already has hotlist with same new name."""
+    hotlist_conflict = self.work_env.services.features.TestAddHotlist(
+        'myhotlist2', summary='old sum', owner_ids=[self.user_2.user_id],
+        description='old desc', hotlist_id=458, is_private=True)
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.assertRaises(features_svc.HotlistAlreadyExists):
+      with self.work_env as we:
+        we.UpdateHotlist(
+            self.hotlist.hotlist_id, owner_id=self.user_2.user_id,
+            hotlist_name=hotlist_conflict.name)
+
+  def testGetHotlist_Normal(self):
+    """We can get an existing hotlist by hotlist_id."""
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[])
+
+    with self.work_env as we:
+      actual = we.GetHotlist(hotlist.hotlist_id)
+
+    self.assertEqual(hotlist, actual)
+
+  def testGetHotlist_NoneHotlist(self):
+    """We reject attempts to pass a None hotlist_id."""
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        _actual = we.GetHotlist(None)
+
+  def testGetHotlist_NoSuchHotlist(self):
+    """We reject attempts to get a non-existent hotlist."""
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      with self.work_env as we:
+        _actual = we.GetHotlist(999)
+
+  def testListHotlistItems_MoreItems(self):
+    """We can get hotlist's sorted HotlistItems and next start index."""
+    owner_ids = [self.user_1.user_id]
+    issue1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', self.user_1.user_id, issue_id=78901)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.project.TestAddProject(
+        'proj', project_id=788, committer_ids=[self.user_1.user_id])
+    issue2 = fake.MakeTestIssue(
+        788, 2, 'sum', 'New', self.user_1.user_id, issue_id=78802)
+    self.services.issue.TestAddIssue(issue2)
+    issue3 = fake.MakeTestIssue(
+        789, 3, 'sum', 'New', self.user_3.user_id, issue_id=78803)
+    self.services.issue.TestAddIssue(issue3)
+    base_date = 1205079300
+    hotlist_item_tuples = [
+        (issue1.issue_id, 1, self.user_1.user_id, base_date + 2, 'dude wheres'),
+        (issue2.issue_id, 31, self.user_1.user_id, base_date + 1, 'my car'),
+        (issue3.issue_id, 21, self.user_1.user_id, base_date, '')]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'hotlist', summary='Summary', description='Description',
+        owner_ids=owner_ids, hotlist_id=123,
+        hotlist_item_fields=hotlist_item_tuples)
+
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.work_env as we:
+      max_items = 2
+      start = 0
+      can = 1
+      sort_spec = 'rank'
+      group_by_spec = ''
+      list_result = we.ListHotlistItems(
+          hotlist.hotlist_id, max_items, start, can, sort_spec, group_by_spec)
+
+    expected_items = [
+      features_pb2.Hotlist.HotlistItem(
+          issue_id=issue1.issue_id, rank=1, adder_id=self.user_1.user_id,
+          date_added=base_date + 2, note='dude wheres'),
+      features_pb2.Hotlist.HotlistItem(
+          issue_id=issue3.issue_id, rank=21, adder_id=self.user_1.user_id,
+          date_added=base_date, note='')]
+    self.assertEqual(list_result.items, expected_items)
+
+    self.assertEqual(list_result.next_start, 2)
+
+  def testListHotlistItems_OutOfRange(self):
+    """We can handle out of range `start` and `max_items`."""
+    owner_ids = [self.user_1.user_id]
+    issue1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', self.user_1.user_id, issue_id=78901)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.project.TestAddProject(
+        'proj', project_id=788, committer_ids=[self.user_1.user_id])
+    base_date = 1205079300
+    hotlist_item_tuples = [
+        (issue1.issue_id, 1, self.user_1.user_id, base_date + 2, 'dude wheres')]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'hotlist', summary='Summary', description='Description',
+        owner_ids=owner_ids, hotlist_id=123,
+        hotlist_item_fields=hotlist_item_tuples)
+
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.work_env as we:
+      max_items = 10
+      start = 4
+      can = 1
+      sort_spec = ''
+      group_by_spec = ''
+      list_result = we.ListHotlistItems(
+          hotlist.hotlist_id, max_items, start, can, sort_spec, group_by_spec)
+
+    self.assertEqual(list_result.items, [])
+
+    self.assertIsNone(list_result.next_start)
+
+  def testListHotlistItems_InvalidMaxItems(self):
+    """We raise an exception if the given max_items is invalid."""
+    owner_ids = [self.user_1.user_id]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'hotlist',
+        summary='Summary',
+        description='Description',
+        owner_ids=owner_ids,
+        hotlist_id=123)
+
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        max_items = -2
+        start = 0
+        can = 1
+        sort_spec = 'rank'
+        group_by_spec = ''
+        we.ListHotlistItems(
+            hotlist.hotlist_id, max_items, start, can, sort_spec, group_by_spec)
+
+  def testListHotlistItems_InvalidStart(self):
+    """We raise an exception if the given start is invalid."""
+    owner_ids = [self.user_1.user_id]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'hotlist',
+        summary='Summary',
+        description='Description',
+        owner_ids=owner_ids,
+        hotlist_id=123)
+
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        max_items = 10
+        start = -1
+        can = 1
+        sort_spec = 'rank'
+        group_by_spec = ''
+        we.ListHotlistItems(
+            hotlist.hotlist_id, max_items, start, can, sort_spec, group_by_spec)
+
+
+  def testListHotlistItems_OpenOnly(self):
+    """We can get hotlist's sorted HotlistItems."""
+    base_date = 1205079300
+    owner_ids = [self.user_1.user_id]
+    issue1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', self.user_1.user_id, issue_id=78901)
+    self.services.issue.TestAddIssue(issue1)
+    issue2 = fake.MakeTestIssue(
+        789, 2, 'sum', 'Fixed', self.user_1.user_id, issue_id=78902,
+        closed_timestamp=base_date + 10)
+    self.services.issue.TestAddIssue(issue2)
+    hotlist_item_tuples = [
+        (issue1.issue_id, 1, self.user_1.user_id, base_date + 2, 'dude wheres'),
+        (issue2.issue_id, 31, self.user_1.user_id, base_date + 1, 'my car')]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'hotlist', summary='Summary', description='Description',
+        owner_ids=owner_ids, hotlist_id=123,
+        hotlist_item_fields=hotlist_item_tuples)
+
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.work_env as we:
+      max_items = 2
+      start = 0
+      can = 2
+      sort_spec = 'rank'
+      group_by_spec = ''
+      list_result = we.ListHotlistItems(
+          hotlist.hotlist_id, max_items, start, can, sort_spec, group_by_spec)
+
+    expected_items = [
+      features_pb2.Hotlist.HotlistItem(
+          issue_id=issue1.issue_id, rank=1, adder_id=self.user_1.user_id,
+          date_added=base_date + 2, note='dude wheres')]
+    self.assertEqual(list_result.items, expected_items)
+
+    self.assertIsNone(list_result.next_start)
+
+  def testListHotlistItems_HideRestricted(self):
+    """We can get hotlist's sorted HotlistItems."""
+    base_date = 1205079300
+    owner_ids = [self.user_1.user_id]
+    issue1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', self.user_1.user_id, issue_id=78901)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.project.TestAddProject(
+        'proj', project_id=788, committer_ids=[self.user_1.user_id])
+    issue2 = fake.MakeTestIssue(
+        788, 2, 'sum', 'New', self.user_1.user_id, issue_id=78802,
+        closed_timestamp=base_date + 15)
+    self.services.issue.TestAddIssue(issue2)
+    issue3 = fake.MakeTestIssue(
+        789, 3, 'sum', 'New', self.user_3.user_id, issue_id=78803,
+        closed_timestamp=base_date + 10,
+        labels=['Restrict-View-Sheep'])  # user_1 does not have 'Sheep' perms
+    self.services.issue.TestAddIssue(issue3)
+    hotlist_item_tuples = [
+        (issue1.issue_id, 1, self.user_1.user_id, base_date + 2, 'dude wheres'),
+        (issue3.issue_id, 21, self.user_2.user_id, base_date, ''),
+        (issue2.issue_id, 31, self.user_1.user_id, base_date + 1, 'my car')]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'hotlist', summary='Summary', description='Description',
+        owner_ids=owner_ids, hotlist_id=123,
+        hotlist_item_fields=hotlist_item_tuples)
+
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.work_env as we:
+      max_items = 3
+      start = 0
+      can = 1
+      sort_spec = 'rank'
+      group_by_spec = ''
+      list_result = we.ListHotlistItems(
+          hotlist.hotlist_id, max_items, start, can, sort_spec, group_by_spec)
+
+    expected_items = [
+      features_pb2.Hotlist.HotlistItem(
+          issue_id=issue1.issue_id, rank=1, adder_id=self.user_1.user_id,
+          date_added=base_date + 2, note='dude wheres'),
+      features_pb2.Hotlist.HotlistItem(
+          issue_id=issue2.issue_id, rank=31, adder_id=self.user_1.user_id,
+          date_added=base_date + 1, note='my car')]
+    self.assertEqual(list_result.items, expected_items)
+
+    self.assertIsNone(list_result.next_start)
+
+  def testTransferHotlistOwnership(self):
+    """We can transfer ownership of a hotlist."""
+    owner_ids = [self.user_1.user_id]
+    editor_ids = [self.user_2.user_id]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'hotlist', summary='Summary', description='Description',
+        owner_ids=owner_ids, editor_ids=editor_ids, hotlist_id=123)
+
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.work_env as we:
+      we.TransferHotlistOwnership(
+          hotlist.hotlist_id, self.user_2.user_id, True)
+      transferred_hotlist = we.GetHotlist(hotlist.hotlist_id)
+      self.assertEqual(transferred_hotlist.owner_ids, editor_ids)
+      self.assertEqual(transferred_hotlist.editor_ids, owner_ids)
+
+  def testTransferHotlistOwnership_NoPermission(self):
+    """We only let hotlist owners transfer hotlist ownership."""
+    owner_ids = [self.user_1.user_id]
+    editor_ids = [self.user_2.user_id]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'SameName', summary='Summary', description='Description',
+        owner_ids=owner_ids, editor_ids=editor_ids, hotlist_id=123)
+
+    self.SignIn(user_id=self.user_2.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.TransferHotlistOwnership(
+            hotlist.hotlist_id, self.user_2.user_id, True)
+
+  def testTransferHotlistOwnership_RejectNewOwner(self):
+    """We reject attempts when new owner already owns a
+       hotlist with the same name."""
+    owner_ids = [self.user_1.user_id]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'SameName', summary='Summary', description='Description',
+        owner_ids=owner_ids, hotlist_id=123)
+    _other_hotlist = self.work_env.services.features.TestAddHotlist(
+        'SameName', summary='summary', description='description',
+        owner_ids=[self.user_2.user_id], hotlist_id=124)
+
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.TransferHotlistOwnership(
+            hotlist.hotlist_id, self.user_2.user_id, True)
+
+  def testRemoveHotlistEditors(self):
+    """Hotlist owner can remove editors as normal."""
+    owner_ids = [self.user_1.user_id]
+    editor_ids = [self.user_2.user_id]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'RejectUnowned',
+        summary='Summary',
+        description='description',
+        owner_ids=owner_ids,
+        editor_ids=editor_ids,
+        hotlist_id=1257)
+
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.work_env as we:
+      remove_editor_ids = [self.user_2.user_id]
+      we.RemoveHotlistEditors(hotlist.hotlist_id, remove_editor_ids)
+
+      updated_hotlist = we.GetHotlist(hotlist.hotlist_id)
+      self.assertEqual(updated_hotlist.owner_ids, owner_ids)
+      self.assertEqual(updated_hotlist.editor_ids, [])
+
+  def testRemoveHotlistEditors_NoPermission(self):
+    """A user who is not in the hotlist cannot remove editors."""
+    owner_ids = [self.user_1.user_id]
+    editor_ids = [self.user_2.user_id]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'RejectUnowned',
+        summary='Summary',
+        description='description',
+        owner_ids=owner_ids,
+        editor_ids=editor_ids,
+        hotlist_id=1257)
+
+    self.SignIn(user_id=self.user_3.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        remove_editor_ids = [self.user_2.user_id]
+        we.RemoveHotlistEditors(hotlist.hotlist_id, remove_editor_ids)
+
+  def testRemoveHotlistEditors_CannotRemoveOtherEditors(self):
+    """A user who is not the hotlist owner cannot remove editors."""
+    owner_ids = [self.user_1.user_id]
+    editor_ids = [self.user_2.user_id, self.user_3.user_id]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'RejectUnowned',
+        summary='Summary',
+        description='description',
+        owner_ids=owner_ids,
+        editor_ids=editor_ids,
+        hotlist_id=1257)
+
+    self.SignIn(user_id=self.user_3.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        remove_editor_ids = [self.user_2.user_id]
+        we.RemoveHotlistEditors(hotlist.hotlist_id, remove_editor_ids)
+
+  def testRemoveHotlistEditors_AllowRemoveSelf(self):
+    """A non-owner member of a hotlist can remove themselves."""
+    owner_ids = [self.user_1.user_id]
+    editor_ids = [self.user_2.user_id]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'RejectUnowned',
+        summary='Summary',
+        description='description',
+        owner_ids=owner_ids,
+        editor_ids=editor_ids,
+        hotlist_id=1257)
+
+    self.SignIn(user_id=self.user_2.user_id)
+
+    with self.work_env as we:
+      remove_editor_ids = [self.user_2.user_id]
+      we.RemoveHotlistEditors(hotlist.hotlist_id, remove_editor_ids)
+
+      updated_hotlist = we.GetHotlist(hotlist.hotlist_id)
+      self.assertEqual(updated_hotlist.owner_ids, owner_ids)
+      self.assertEqual(updated_hotlist.editor_ids, [])
+
+    # assert cannot remove someone else
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.RemoveHotlistEditors(hotlist.hotlist_id, [self.user_3.user_id])
+
+  def testRemoveHotlistEditors_AllowRemoveParentLinkedAccount(self):
+    """A non-owner member of a hotlist can remove their linked accounts."""
+    owner_ids = [self.user_1.user_id]
+    editor_ids = [self.user_3.user_id]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'RejectUnowned',
+        summary='Summary',
+        description='description',
+        owner_ids=owner_ids,
+        editor_ids=editor_ids,
+        hotlist_id=1257)
+    self.services.user.InviteLinkedParent(
+        self.cnxn, self.user_3.user_id, self.user_2.user_id)
+    self.services.user.AcceptLinkedChild(
+        self.cnxn, self.user_3.user_id, self.user_2.user_id)
+
+    self.SignIn(user_id=self.user_2.user_id)
+    with self.work_env as we:
+      remove_editor_ids = [self.user_3.user_id]
+      we.RemoveHotlistEditors(hotlist.hotlist_id, remove_editor_ids)
+
+      updated_hotlist = we.GetHotlist(hotlist.hotlist_id)
+      self.assertEqual(updated_hotlist.owner_ids, owner_ids)
+      self.assertEqual(updated_hotlist.editor_ids, [])
+
+  def testRemoveHotlistEditors_AllowRemoveChildLinkedAccount(self):
+    """A non-owner member of a hotlist can remove their linked accounts."""
+    owner_ids = [self.user_1.user_id]
+    editor_ids = [self.user_2.user_id]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'RejectUnowned',
+        summary='Summary',
+        description='description',
+        owner_ids=owner_ids,
+        editor_ids=editor_ids,
+        hotlist_id=1257)
+    self.services.user.InviteLinkedParent(
+        self.cnxn, self.user_3.user_id, self.user_2.user_id)
+    self.services.user.AcceptLinkedChild(
+        self.cnxn, self.user_3.user_id, self.user_2.user_id)
+
+    self.SignIn(user_id=self.user_3.user_id)
+    with self.work_env as we:
+      remove_editor_ids = [self.user_2.user_id]
+      we.RemoveHotlistEditors(hotlist.hotlist_id, remove_editor_ids)
+
+      updated_hotlist = we.GetHotlist(hotlist.hotlist_id)
+      self.assertEqual(updated_hotlist.owner_ids, owner_ids)
+      self.assertEqual(updated_hotlist.editor_ids, [])
+
+  def testDeleteHotlist(self):
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'hotlistName', 'summary', 'desc', [444], [])
+
+    self.SignIn(user_id=444)
+    with self.work_env as we:
+      we.DeleteHotlist(hotlist.hotlist_id)
+
+    # Just test that services.features.ExpungeHotlists was called
+    self.assertTrue(
+        hotlist.hotlist_id in self.services.features.expunged_hotlist_ids)
+
+  def testDeleteHotlist_NoPerms(self):
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'hotlistName', 'summary', 'desc', [444], [])
+
+    self.SignIn(user_id=333)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.DeleteHotlist(hotlist.hotlist_id)
+
+  def testListHotlistsByUser_Normal(self):
+    self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[444], editor_ids=[])
+
+    self.SignIn()
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByUser(444)
+
+    self.assertEqual(1, len(hotlists))
+    hotlist = hotlists[0]
+    self.assertEqual([444], hotlist.owner_ids)
+    self.assertEqual([], hotlist.editor_ids)
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+
+  def testListHotlistsByUser_AnotherUser(self):
+    self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[333], editor_ids=[])
+
+    self.SignIn()
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByUser(333)
+
+    self.assertEqual(1, len(hotlists))
+    hotlist = hotlists[0]
+    self.assertEqual([333], hotlist.owner_ids)
+    self.assertEqual([], hotlist.editor_ids)
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+
+  def testListHotlistsByUser_NotSignedIn(self):
+    self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[444], editor_ids=[])
+
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByUser(444)
+
+    self.assertEqual(1, len(hotlists))
+    hotlist = hotlists[0]
+    self.assertEqual([444], hotlist.owner_ids)
+    self.assertEqual([], hotlist.editor_ids)
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+
+  def testListHotlistsByUser_NoUserId(self):
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.ListHotlistsByUser(None)
+
+
+  def testListHotlistsByUser_Empty(self):
+    self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[333], editor_ids=[])
+
+    self.SignIn()
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByUser(444)
+
+    self.assertEqual(0, len(hotlists))
+
+  def testListHotlistsByUser_NoHotlists(self):
+    self.SignIn()
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByUser(444)
+
+    self.assertEqual(0, len(hotlists))
+
+  def testListHotlistsByUser_PrivateHotlistAsOwner(self):
+    self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[333], is_private=True)
+
+    self.SignIn()
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByUser(333)
+
+    self.assertEqual(1, len(hotlists))
+    hotlist = hotlists[0]
+    self.assertEqual([111], hotlist.owner_ids)
+    self.assertEqual([333], hotlist.editor_ids)
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+
+  def testListHotlistsByUser_PrivateHotlistAsEditor(self):
+    self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[333], editor_ids=[111], is_private=True)
+
+    self.SignIn()
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByUser(333)
+
+    self.assertEqual(1, len(hotlists))
+    hotlist = hotlists[0]
+    self.assertEqual([333], hotlist.owner_ids)
+    self.assertEqual([111], hotlist.editor_ids)
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+
+  def testListHotlistsByUser_PrivateHotlistNoAcess(self):
+    self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[333], editor_ids=[], is_private=True)
+
+    self.SignIn()
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByUser(333)
+
+    self.assertEqual(0, len(hotlists))
+
+  def testListHotlistsByIssue_Normal(self):
+    issue = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[])
+    self.AddIssueToHotlist(hotlist.hotlist_id)
+
+    self.SignIn()
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByIssue(78901)
+
+    self.assertEqual(1, len(hotlists))
+    hotlist = hotlists[0]
+    self.assertEqual([111], hotlist.owner_ids)
+    self.assertEqual([], hotlist.editor_ids)
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+
+  def testListHotlistsByIssue_NotSignedIn(self):
+    issue = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[])
+    self.AddIssueToHotlist(hotlist.hotlist_id)
+
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByIssue(78901)
+
+    self.assertEqual(1, len(hotlists))
+    hotlist = hotlists[0]
+    self.assertEqual([111], hotlist.owner_ids)
+    self.assertEqual([], hotlist.editor_ids)
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+
+  def testListHotlistsByIssue_NotAllowedToSeeIssue(self):
+    issue = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    issue.labels = ['Restrict-View-CoreTeam']
+    self.services.issue.TestAddIssue(issue)
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[])
+    self.AddIssueToHotlist(hotlist.hotlist_id)
+
+    # We should get a permission exception
+    self.SignIn(333)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.ListHotlistsByIssue(78901)
+
+  def testListHotlistsByIssue_NoSuchIssue(self):
+    self.SignIn()
+    with self.assertRaises(exceptions.NoSuchIssueException):
+      with self.work_env as we:
+        we.ListHotlistsByIssue(78901)
+
+  def testListHotlistsByIssue_NoHotlists(self):
+    issue = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+
+    self.SignIn()
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByIssue(78901)
+
+    self.assertEqual(0, len(hotlists))
+
+  def testListHotlistsByIssue_PrivateHotlistAsOwner(self):
+    issue = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[333], is_private=True)
+    self.AddIssueToHotlist(hotlist.hotlist_id)
+
+    self.SignIn()
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByIssue(78901)
+
+    self.assertEqual(1, len(hotlists))
+    hotlist = hotlists[0]
+    self.assertEqual([111], hotlist.owner_ids)
+    self.assertEqual([333], hotlist.editor_ids)
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+
+  def testListHotlistsByIssue_PrivateHotlistAsEditor(self):
+    issue = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[333], editor_ids=[111], is_private=True)
+    self.AddIssueToHotlist(hotlist.hotlist_id)
+
+    self.SignIn()
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByIssue(78901)
+
+    self.assertEqual(1, len(hotlists))
+    hotlist = hotlists[0]
+    self.assertEqual([333], hotlist.owner_ids)
+    self.assertEqual([111], hotlist.editor_ids)
+    self.assertEqual('Fake-Hotlist', hotlist.name)
+    self.assertEqual('Summary', hotlist.summary)
+    self.assertEqual('Description', hotlist.description)
+
+  def testListHotlistsByIssue_PrivateHotlistNoAcess(self):
+    issue = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[444], editor_ids=[333], is_private=True)
+    self.AddIssueToHotlist(hotlist.hotlist_id)
+
+    self.SignIn()
+    with self.work_env as we:
+      hotlists = we.ListHotlistsByIssue(78901)
+
+    self.assertEqual(0, len(hotlists))
+
+  def testListRecentlyVisitedHotlists(self):
+    hotlists = [
+        self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[444], editor_ids=[111]),
+        self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist-2', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[333]),
+        self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Private-Hotlist', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[333], is_private=True),
+        self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Private-Hotlist-2', 'Summary', 'Description',
+            owner_ids=[222], editor_ids=[333], is_private=True)]
+
+    for hotlist in hotlists:
+      self.work_env.services.user.AddVisitedHotlist(
+          self.cnxn, 111, hotlist.hotlist_id)
+
+    self.SignIn()
+    with self.work_env as we:
+      visited_hotlists = we.ListRecentlyVisitedHotlists()
+
+    # We don't have permission to see the last hotlist, because it is marked as
+    # private and we're not owners or editors of it.
+    self.assertEqual(hotlists[:-1], visited_hotlists)
+
+  def testListRecentlyVisitedHotlists_Anon(self):
+    with self.work_env as we:
+      self.assertEqual([], we.ListRecentlyVisitedHotlists())
+
+  def testListStarredHotlists(self):
+    hotlists = [
+        self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[444], editor_ids=[111]),
+        self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist-2', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[333]),
+        self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Private-Hotlist', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[333], is_private=True),
+        self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Private-Hotlist-2', 'Summary', 'Description',
+            owner_ids=[222], editor_ids=[333], is_private=True)]
+
+    for hotlist in hotlists:
+      self.work_env.services.hotlist_star.SetStar(
+          self.cnxn, hotlist.hotlist_id, 111, True)
+
+    self.SignIn()
+    with self.work_env as we:
+      visited_hotlists = we.ListStarredHotlists()
+
+    # We don't have permission to see the last hotlist, because it is marked as
+    # private and we're not owners or editors of it.
+    self.assertEqual(hotlists[:-1], visited_hotlists)
+
+  def testListStarredHotlists_Anon(self):
+    with self.work_env as we:
+      self.assertEqual([], we.ListStarredHotlists())
+
+  def testStarHotlist_Normal(self):
+    """We can star and unstar a hotlist."""
+    hotlist_id = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[]).hotlist_id
+
+    self.SignIn()
+    with self.work_env as we:
+      self.assertFalse(we.IsHotlistStarred(hotlist_id))
+      we.StarHotlist(hotlist_id, True)
+      self.assertTrue(we.IsHotlistStarred(hotlist_id))
+      we.StarHotlist(hotlist_id, False)
+      self.assertFalse(we.IsHotlistStarred(hotlist_id))
+
+  def testStarHotlist_NoHotlistSpecified(self):
+    """A hotlist must be specified."""
+    self.SignIn()
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.StarHotlist(None, True)
+
+  def testStarHotlist_NoSuchHotlist(self):
+    """We can't star a nonexistent hotlist."""
+    self.SignIn()
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      with self.work_env as we:
+        we.StarHotlist(999, True)
+
+  def testStarHotlist_Anon(self):
+    """Anon user can't star a hotlist."""
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.StarHotlist(999, True)
+
+  # testIsHotlistStarred_Normal is Tested by method testStarHotlist_Normal().
+
+  def testIsHotlistStarred_Anon(self):
+    """Anon user can't star a hotlist."""
+    with self.work_env as we:
+      self.assertFalse(we.IsHotlistStarred(999))
+
+  def testIsHotlistStarred_NoHotlistSpecified(self):
+    """A Hotlist ID must be specified."""
+    with self.work_env as we:
+      with self.assertRaises(exceptions.InputException):
+        we.IsHotlistStarred(None)
+
+  def testIsHotlistStarred_NoSuchHotlist(self):
+    """We can't check for stars on a nonexistent hotlist."""
+    self.SignIn()
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      with self.work_env as we:
+        we.IsHotlistStarred(999)
+
+  def testGetHotlistStarCount(self):
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[])
+    self.services.hotlist_star.SetStar(
+        self.cnxn, hotlist.hotlist_id, 111, True)
+    self.services.hotlist_star.SetStar(
+        self.cnxn, hotlist.hotlist_id, 222, True)
+
+    with self.work_env as we:
+      self.assertEqual(2, we.GetHotlistStarCount(hotlist.hotlist_id))
+
+  def testGetHotlistStarCount_NoneHotlist(self):
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.GetHotlistStarCount(None)
+
+  def testGetHotlistStarCount_NoSuchHotlist(self):
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      with self.work_env as we:
+        we.GetHotlistStarCount(123)
+
+  def testCheckHotlistName_OK(self):
+    self.SignIn()
+    with self.work_env as we:
+      error = we.CheckHotlistName('Fake-Hotlist')
+    self.assertIsNone(error)
+
+  def testCheckHotlistName_Anon(self):
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.CheckHotlistName('Fake-Hotlist')
+
+  def testCheckHotlistName_InvalidName(self):
+    self.SignIn()
+    with self.work_env as we:
+      error = we.CheckHotlistName('**Invalid**')
+    self.assertIsNotNone(error)
+
+  def testCheckHotlistName_AlreadyExists(self):
+    self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[111], editor_ids=[])
+
+    self.SignIn()
+    with self.work_env as we:
+      error = we.CheckHotlistName('Fake-Hotlist')
+    self.assertIsNotNone(error)
+
+  def testRemoveIssuesFromHotlists(self):
+    """We can remove issues from hotlists."""
+    issue1 = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue1)
+    issue2 = fake.MakeTestIssue(789, 2, 'sum2', 'New', 111, issue_id=78902)
+    self.services.issue.TestAddIssue(issue2)
+
+    hotlist1 = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+    self.AddIssueToHotlist(hotlist1.hotlist_id, issue1.issue_id)
+    self.AddIssueToHotlist(hotlist1.hotlist_id, issue2.issue_id)
+
+    hotlist2 = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist-2', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+    self.AddIssueToHotlist(hotlist2.hotlist_id, issue1.issue_id)
+
+    self.SignIn()
+    with self.work_env as we:
+      we.RemoveIssuesFromHotlists(
+          [hotlist1.hotlist_id, hotlist2.hotlist_id], [issue1.issue_id])
+
+    self.assertEqual(
+        [issue2.issue_id], [item.issue_id for item in hotlist1.items])
+    self.assertEqual(0, len(hotlist2.items))
+
+  def testRemoveIssuesFromHotlists_RemoveIssueNotInHotlist(self):
+    """Removing an issue from a hotlist that doesn't have it has no effect."""
+    issue1 = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue1)
+    issue2 = fake.MakeTestIssue(789, 2, 'sum2', 'New', 111, issue_id=78902)
+    self.services.issue.TestAddIssue(issue2)
+
+    hotlist1 = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+    self.AddIssueToHotlist(hotlist1.hotlist_id, issue1.issue_id)
+    self.AddIssueToHotlist(hotlist1.hotlist_id, issue2.issue_id)
+
+    hotlist2 = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist-2', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+    self.AddIssueToHotlist(hotlist2.hotlist_id, issue1.issue_id)
+
+    self.SignIn()
+    with self.work_env as we:
+      # Issue 2 is not in Fake-Hotlist-2
+      we.RemoveIssuesFromHotlists([hotlist2.hotlist_id], [issue2.issue_id])
+
+    self.assertEqual(
+        [issue1.issue_id, issue2.issue_id],
+        [item.issue_id for item in hotlist1.items])
+    self.assertEqual(
+        [issue1.issue_id],
+        [item.issue_id for item in hotlist2.items])
+
+  def testRemoveIssuesFromHotlists_NotAllowed(self):
+    """Only owners and editors can remove issues."""
+    hotlist = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+
+    # 333 is not an owner or editor.
+    self.SignIn(333)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.RemoveIssuesFromHotlists([hotlist.hotlist_id], [1234])
+
+  def testRemoveIssuesFromHotlists_NoSuchHotlist(self):
+    """We can't remove issues from non existent hotlists."""
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      with self.work_env as we:
+        we.RemoveIssuesFromHotlists([1, 2, 3], [4, 5, 6])
+
+  def testAddIssuesToHotlists(self):
+    """We can add issues to hotlists."""
+    issue1 = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue1)
+    issue2 = fake.MakeTestIssue(789, 2, 'sum2', 'New', 111, issue_id=78902)
+    self.services.issue.TestAddIssue(issue2)
+
+    hotlist1 = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+    hotlist2 = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist-2', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+
+    self.SignIn()
+    with self.work_env as we:
+      we.AddIssuesToHotlists(
+          [hotlist1.hotlist_id, hotlist2.hotlist_id],
+          [issue1.issue_id, issue2.issue_id],
+          'Foo')
+
+    self.assertEqual(
+        [issue1.issue_id, issue2.issue_id],
+        [item.issue_id for item in hotlist1.items])
+    self.assertEqual(
+        [issue1.issue_id, issue2.issue_id],
+        [item.issue_id for item in hotlist2.items])
+
+    self.assertEqual(['Foo', 'Foo'], [item.note for item in hotlist1.items])
+    self.assertEqual(['Foo', 'Foo'], [item.note for item in hotlist2.items])
+
+  def testAddIssuesToHotlists_IssuesAlreadyInHotlist(self):
+    """Adding an issue to a hotlist that already has it has no effect."""
+    issue1 = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue1)
+    issue2 = fake.MakeTestIssue(789, 2, 'sum2', 'New', 111, issue_id=78902)
+    self.services.issue.TestAddIssue(issue2)
+
+    hotlist1 = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+    self.AddIssueToHotlist(hotlist1.hotlist_id, issue1.issue_id)
+    self.AddIssueToHotlist(hotlist1.hotlist_id, issue2.issue_id)
+
+    hotlist2 = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist-2', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+    self.AddIssueToHotlist(hotlist2.hotlist_id, issue1.issue_id)
+
+    self.SignIn()
+    with self.work_env as we:
+      # Issue 1 is in both hotlists
+      we.AddIssuesToHotlists(
+          [hotlist1.hotlist_id, hotlist2.hotlist_id], [issue1.issue_id], None)
+
+    self.assertEqual(
+        [issue1.issue_id, issue2.issue_id],
+        [item.issue_id for item in hotlist1.items])
+    self.assertEqual(
+        [issue1.issue_id],
+        [item.issue_id for item in hotlist2.items])
+
+  def testAddIssuesToHotlists_NotViewable(self):
+    """Users can add viewable issues to hotlists."""
+    issue1 = fake.MakeTestIssue(
+        789, 1, 'sum1', 'New', 111, issue_id=78901)
+    issue1.labels = ['Restrict-View-CoreTeam']
+    self.services.issue.TestAddIssue(issue1)
+    hotlist = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[333], editor_ids=[])
+
+    self.SignIn(user_id=333)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.AddIssuesToHotlists([hotlist.hotlist_id], [78901], None)
+
+  def testAddIssuesToHotlists_NotAllowed(self):
+    """Only owners and editors can add issues."""
+    hotlist = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+
+    # 333 is not an owner or editor.
+    self.SignIn(user_id=333)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.AddIssuesToHotlists([hotlist.hotlist_id], [1234], None)
+
+  def testAddIssuesToHotlists_NoSuchHotlist(self):
+    """We can't remove issues from non existent hotlists."""
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      with self.work_env as we:
+        we.AddIssuesToHotlists([1, 2, 3], [4, 5, 6], None)
+
+  def createHotlistWithItems(self):
+    issue_1 = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue_1)
+    issue_2 = fake.MakeTestIssue(789, 2, 'sum', 'New', 111, issue_id=78902)
+    self.services.issue.TestAddIssue(issue_2)
+    issue_3 = fake.MakeTestIssue(789, 3, 'sum', 'New', 111, issue_id=78903)
+    self.services.issue.TestAddIssue(issue_3)
+    issue_4 = fake.MakeTestIssue(789, 4, 'sum', 'New', 111, issue_id=78904)
+    self.services.issue.TestAddIssue(issue_4)
+    owner_ids = [self.user_1.user_id]
+    editor_ids = [self.user_2.user_id]
+    hotlist_items = [
+        (issue_4.issue_id, 31, self.user_3.user_id, self.PAST_TIME, ''),
+        (issue_3.issue_id, 21, self.user_1.user_id, self.PAST_TIME, ''),
+        (issue_2.issue_id, 11, self.user_2.user_id, self.PAST_TIME, ''),
+        (issue_1.issue_id, 1, self.user_1.user_id, self.PAST_TIME, '')
+    ]
+    return self.work_env.services.features.TestAddHotlist(
+        'HotlistName', owner_ids=owner_ids, editor_ids=editor_ids,
+        hotlist_item_fields=hotlist_items)
+
+  def testRemoveHotlistItems(self):
+    """We can remove issues from a hotlist."""
+    hotlist = self.createHotlistWithItems()
+    self.SignIn(self.user_2.user_id)
+    with self.work_env as we:
+      we.RemoveHotlistItems(hotlist.hotlist_id, [78901, 78903])
+
+    self.assertEqual([item.issue_id for item in hotlist.items], [78902, 78904])
+
+  def testRemoveHotlistItems_NoHotlistPermissions(self):
+    """We raise an exception if user lacks edit permissions in hotlist."""
+    self.SignIn(self.user_3.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.RemoveHotlistItems(self.hotlist.hotlist_id, [78901])
+
+  def testRemoveHotlistItems_NoSuchHotlist(self):
+    """We raise an exception if the hotlist is not found."""
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      with self.work_env as we:
+        we.RemoveHotlistItems(self.dne_hotlist_id, [78901])
+
+  def testRemoveHotlistItems_ItemNotFound(self):
+    """We raise an exception if user tries to remove item not in hotlist."""
+    hotlist = self.createHotlistWithItems()
+    self.SignIn(self.user_2.user_id)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.RemoveHotlistItems(hotlist.hotlist_id, [404])
+
+  def testAddHotlistItems_NoSuchHotlist(self):
+    """We raise an exception if the hotlist is not found."""
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      with self.work_env as we:
+        we.AddHotlistItems(self.dne_hotlist_id, [78901], 0)
+
+  def testAddHotlistItems_NoHotlistEditPermissions(self):
+    """We raise an exception if the user lacks edit permissions in hotlist."""
+    self.SignIn(self.user_3.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.AddHotlistItems(self.hotlist.hotlist_id, [78901], 0)
+
+  def testAddHotlistItems_NoItemsGiven(self):
+    """We raise an exception if the given list of issues is empty."""
+    hotlist = self.createHotlistWithItems()
+    self.SignIn(self.user_2.user_id)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.AddHotlistItems(hotlist.hotlist_id, [], 0)
+
+  def testAddHotlistItems(self):
+    """We add new items to the hotlist and don't touch existing items."""
+    hotlist = self.createHotlistWithItems()
+    self.SignIn(self.user_2.user_id)
+    with self.work_env as we:
+      we.AddHotlistItems(hotlist.hotlist_id, [78909, 78910, 78901], 2)
+
+    expected_item_ids = [78901, 78902, 78909, 78910, 78903, 78904]
+    updated_hotlist = we.GetHotlist(hotlist.hotlist_id)
+    self.assertEqual(
+        expected_item_ids, [item.issue_id for item in updated_hotlist.items])
+
+  def testRerankHotlistItems_NoPerms(self):
+    """We don't let non editors/owners rerank HotlistItems."""
+    hotlist = self.createHotlistWithItems()
+    moved_ids = [78901]
+    target_position = 0
+    self.SignIn(self.user_3.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.RerankHotlistItems(hotlist.hotlist_id, moved_ids, target_position)
+
+  def testRerankHotlistItems_HotlistItemsNotFound(self):
+    """We raise an exception if not all Issue IDs are in the hotlist."""
+    hotlist = self.createHotlistWithItems()
+    # 78909 is not an existing HotlistItem issue.
+    moved_ids = [78901, 78909]
+    target_position = 1
+    self.SignIn(self.user_2.user_id)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.RerankHotlistItems(hotlist.hotlist_id, moved_ids, target_position)
+
+  def testRerankHotlistItems_MovedIssuesEmpty(self):
+    """We raise an exception if the list of Issue IDs is empty."""
+    hotlist = self.createHotlistWithItems()
+    moved_ids = []
+    target_position = 1
+    self.SignIn(self.user_2.user_id)
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.RerankHotlistItems(hotlist.hotlist_id, moved_ids, target_position)
+
+  @mock.patch('time.time')
+  def testRerankHotlistItems(self, fake_time):
+    """We can rerank HotlistItems."""
+    fake_time.return_value = self.PAST_TIME
+    hotlist = self.createHotlistWithItems()
+    moved_ids = [78901, 78903]
+    target_position = 1
+    self.SignIn(self.user_2.user_id)
+    with self.work_env as we:
+      updated_hotlist = we.RerankHotlistItems(
+          hotlist.hotlist_id, moved_ids, target_position)
+
+    expected_item_ids = [78902, 78901, 78903, 78904]
+    self.assertEqual(
+        expected_item_ids, [item.issue_id for item in updated_hotlist.items])
+
+  @mock.patch('time.time')
+  def testGetChangedHotlistItems(self, fake_time):
+    """We can get changed HotlistItems when moving existing and new issues."""
+    fake_time.return_value = self.PAST_TIME
+    hotlist = self.createHotlistWithItems()
+    # moved_ids include new issues not in hotlist: [78907, 78909]
+    moved_ids = [78901, 78907, 78903, 78909]
+    target_position = 1
+    self.SignIn(self.user_2.user_id)
+    with self.work_env as we:
+      changed_items = we._GetChangedHotlistItems(
+          hotlist, moved_ids, target_position)
+
+    expected_hotlist_items = [
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78901,
+            rank=14,
+            note='',
+            adder_id=self.user_1.user_id,
+            date_added=self.PAST_TIME),
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78907,
+            rank=19,
+            adder_id=self.user_2.user_id,
+            date_added=self.PAST_TIME),
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78903,
+            rank=24,
+            note='',
+            adder_id=self.user_1.user_id,
+            date_added=self.PAST_TIME),
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78909,
+            rank=29,
+            adder_id=self.user_2.user_id,
+            date_added=self.PAST_TIME)
+    ]
+    self.assertEqual(changed_items, expected_hotlist_items)
+
+  # TODO(crbug/monorail/7104): Remove these tests once RerankHotlistIssues
+  # is deleted.
+  def testRerankHotlistIssues_SplitAbove(self):
+    """We can rerank issues in a hotlist with split_above = true."""
+    owner_ids = [self.user_1.user_id]
+    editor_ids = [self.user_2.user_id]
+    follower_ids = []
+    hotlist_items = [
+        (78904, 31, self.user_2.user_id, self.PAST_TIME, 'note'),
+        (78903, 21, self.user_2.user_id, self.PAST_TIME, 'note'),
+        (78902, 11, self.user_2.user_id, self.PAST_TIME, 'note'),
+        (78901, 1, self.user_2.user_id, self.PAST_TIME, 'note')]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'HotlistName', summary='summary', owner_ids=owner_ids,
+        editor_ids=editor_ids, follower_ids=follower_ids,
+        hotlist_id=1235, hotlist_item_fields=hotlist_items)
+
+    moved_ids = [78901]
+    target_id = 78904
+    split_above = True
+    self.SignIn(self.user_2.user_id)
+    with self.work_env as we:
+      we.RerankHotlistIssues(
+          hotlist.hotlist_id, moved_ids, target_id, split_above)
+      updated_hotlist = we.GetHotlist(hotlist.hotlist_id)
+      self.assertEqual(
+          [item.issue_id for item in updated_hotlist.items],
+          [78902, 78903, 78901, 78904])
+
+  def testRerankHotlistIssues_SplitBelow(self):
+    """We can rerank issues in a hotlist with split_above = false."""
+    owner_ids = [self.user_1.user_id]
+    editor_ids = [self.user_2.user_id]
+    follower_ids = []
+    hotlist_items = [
+        (78904, 31, self.user_2.user_id, self.PAST_TIME, 'note'),
+        (78903, 21, self.user_2.user_id, self.PAST_TIME, 'note'),
+        (78902, 11, self.user_2.user_id, self.PAST_TIME, 'note'),
+        (78901, 1, self.user_2.user_id, self.PAST_TIME, 'note')]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'HotlistName', summary='summary', owner_ids=owner_ids,
+        editor_ids=editor_ids, follower_ids=follower_ids,
+        hotlist_id=1235, hotlist_item_fields=hotlist_items)
+
+    moved_ids = [78901]
+    target_id = 78904
+    split_above = False
+    self.SignIn(self.user_2.user_id)
+    with self.work_env as we:
+      we.RerankHotlistIssues(
+          hotlist.hotlist_id, moved_ids, target_id, split_above)
+      updated_hotlist = we.GetHotlist(hotlist.hotlist_id)
+      self.assertEqual(
+          [item.issue_id for item in updated_hotlist.items],
+          [78902, 78903, 78904, 78901])
+
+  def testRerankHotlistIssues_NoPerms(self):
+    """We don't let non editors/owners update issue ranks."""
+    owner_ids = [self.user_1.user_id]
+    editor_ids = []
+    follower_ids = [self.user_3.user_id]
+    hotlist = self.work_env.services.features.TestAddHotlist(
+        'HotlistName', summary='summary', owner_ids=owner_ids,
+        editor_ids=editor_ids, follower_ids=follower_ids,
+        hotlist_id=1235)
+
+    moved_ids = [78901]
+    target_id = 78904
+    split_above = True
+    self.SignIn(self.user_3.user_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.RerankHotlistIssues(
+            hotlist.hotlist_id, moved_ids, target_id, split_above)
+
+  def testUpdateHotlistIssueNote(self):
+    issue = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+
+    hotlist = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+    self.AddIssueToHotlist(hotlist.hotlist_id, issue.issue_id)
+
+    self.SignIn()
+    with self.work_env as we:
+      we.UpdateHotlistIssueNote(hotlist.hotlist_id, 78901, 'Note')
+
+    self.assertEqual('Note', hotlist.items[0].note)
+
+  def testUpdateHotlistIssueNote_IssueNotInHotlist(self):
+    issue = fake.MakeTestIssue(789, 1, 'sum1', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+
+    hotlist = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+
+    self.SignIn()
+    with self.assertRaises(exceptions.InputException):
+      with self.work_env as we:
+        we.UpdateHotlistIssueNote(hotlist.hotlist_id, 78901, 'Note')
+
+  def testUpdateHotlistIssueNote_NoSuchIssue(self):
+    hotlist = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+
+    self.SignIn()
+    with self.assertRaises(exceptions.NoSuchIssueException):
+      with self.work_env as we:
+        we.UpdateHotlistIssueNote(hotlist.hotlist_id, 78901, 'Note')
+
+  def testUpdateHotlistIssueNote_CantEditHotlist(self):
+    hotlist = self.work_env.services.features.CreateHotlist(
+            self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+            owner_ids=[111], editor_ids=[])
+
+    self.SignIn(user_id=333)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.UpdateHotlistIssueNote(hotlist.hotlist_id, 78901, 'Note')
+
+  def testUpdateHotlistIssueNote_NoSuchHotlist(self):
+    self.SignIn()
+    with self.assertRaises(features_svc.NoSuchHotlistException):
+      with self.work_env as we:
+        we.UpdateHotlistIssueNote(1234, 78901, 'Note')
+
+  def testListHotlistPermissions_Anon(self):
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[self.user_1.user_id], editor_ids=[])
+    # Anon can view public hotlist.
+    with self.work_env as we:
+      anon_perms = we.ListHotlistPermissions(hotlist.hotlist_id)
+    self.assertEqual(anon_perms, [])
+
+    # Anon cannot view private hotlist.
+    hotlist.is_private = True
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.ListHotlistPermissions(hotlist.hotlist_id)
+
+  def testListHotlistPermissions_Owner(self):
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[self.user_1.user_id], editor_ids=[])
+
+    self.SignIn(user_id=self.user_1.user_id)
+    with self.work_env as we:
+      owner_perms = we.ListHotlistPermissions(hotlist.hotlist_id)
+    self.assertEqual(owner_perms, permissions.HOTLIST_OWNER_PERMISSIONS)
+
+  def testListHotlistPermissions_Editor(self):
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[self.user_1.user_id], editor_ids=[self.user_2.user_id])
+
+    self.SignIn(user_id=self.user_2.user_id)
+    with self.work_env as we:
+      owner_perms = we.ListHotlistPermissions(hotlist.hotlist_id)
+    self.assertEqual(owner_perms, permissions.HOTLIST_EDITOR_PERMISSIONS)
+
+  def testListHotlistPermissions_NonMember(self):
+    hotlist = self.work_env.services.features.CreateHotlist(
+        self.cnxn, 'Fake-Hotlist', 'Summary', 'Description',
+        owner_ids=[self.user_1.user_id], editor_ids=[self.user_2.user_id])
+
+    self.SignIn(user_id=self.user_3.user_id)
+    with self.work_env as we:
+      perms = we.ListHotlistPermissions(hotlist.hotlist_id)
+    self.assertEqual(perms, [])
+
+    hotlist.is_private = True
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        we.ListHotlistPermissions(hotlist.hotlist_id)
+
+  def testListFieldDefPermissions_Anon(self):
+    field_id = self.services.config.CreateFieldDef(
+        self.cnxn, self.project.project_id, 'Field', 'STR_TYPE', None, None,
+        None, None, None, None, None, None, None, None, None, None, None, None,
+        [], [])
+    restricted_field_id = self.services.config.CreateFieldDef(
+        self.cnxn,
+        self.project.project_id,
+        'ResField',
+        'STR_TYPE',
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None, [], [],
+        is_restricted_field=True)
+
+    # Anon can only view fields in a public project.
+    with self.work_env as we:
+      anon_perms = we.ListFieldDefPermissions(field_id, self.project.project_id)
+    self.assertEqual(anon_perms, [])
+    with self.work_env as we:
+      anon_perms = we.ListFieldDefPermissions(
+          restricted_field_id, self.project.project_id)
+    self.assertEqual(anon_perms, [])
+
+    # Anon cannot view fields in a private project.
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        anon_perms = we.ListFieldDefPermissions(
+            field_id, self.project.project_id)
+    with self.assertRaises(permissions.PermissionException):
+      with self.work_env as we:
+        anon_perms = we.ListFieldDefPermissions(
+            restricted_field_id, self.project.project_id)
+
+  def testListFieldDefPermissions_SiteAdminAndProjectOwners(self):
+    """SiteAdmins/ProjectOwners can always edit a field and its value."""
+    field_id = self.services.config.CreateFieldDef(
+        self.cnxn, self.project.project_id, 'Field', 'STR_TYPE', None, None,
+        None, None, None, None, None, None, None, None, None, None, None, None,
+        [], [])
+    restricted_field_id = self.services.config.CreateFieldDef(
+        self.cnxn,
+        self.project.project_id,
+        'ResField',
+        'STR_TYPE',
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None, [], [],
+        is_restricted_field=True)
+
+    self.SignIn(user_id=self.admin_user.user_id)
+
+    with self.work_env as we:
+      site_admin_perms_1 = we.ListFieldDefPermissions(
+          field_id, self.project.project_id)
+    self.assertEqual(
+        site_admin_perms_1,
+        [permissions.EDIT_FIELD_DEF, permissions.EDIT_FIELD_DEF_VALUE])
+
+    with self.work_env as we:
+      site_admin_perms_2 = we.ListFieldDefPermissions(
+          restricted_field_id, self.project.project_id)
+    self.assertEqual(
+        site_admin_perms_2,
+        [permissions.EDIT_FIELD_DEF, permissions.EDIT_FIELD_DEF_VALUE])
+
+  def testListFieldDefPermissions_FieldEditor(self):
+    """Field Editors can edit the value of a field."""
+    field_id = self.services.config.CreateFieldDef(
+        self.cnxn, self.project.project_id, 'Field', 'STR_TYPE', None, None,
+        None, None, None, None, None, None, None, None, None, None, None, None,
+        [], [111])
+    restricted_field_id = self.services.config.CreateFieldDef(
+        self.cnxn,
+        self.project.project_id,
+        'ResField',
+        'STR_TYPE',
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None,
+        None, [], [111],
+        is_restricted_field=True)
+
+    self.SignIn(user_id=self.user_1.user_id)
+
+    with self.work_env as we:
+      field_editor_perms = we.ListFieldDefPermissions(
+          field_id, self.project.project_id)
+    self.assertEqual(field_editor_perms, [permissions.EDIT_FIELD_DEF_VALUE])
+
+    with self.work_env as we:
+      field_editor_perms = we.ListFieldDefPermissions(
+          restricted_field_id, self.project.project_id)
+    self.assertEqual(field_editor_perms, [permissions.EDIT_FIELD_DEF_VALUE])
+
+
+  # FUTURE: UpdateHotlist()
+  # FUTURE: DeleteHotlist()
+
+  def setUpExpungeUsersFromStars(self):
+    config = fake.MakeTestConfig(789, [], [])
+    self.work_env.services.project_star.SetStarsBatch(
+        self.cnxn, 789, [222, 444, 555], True)
+    self.work_env.services.issue_star.SetStarsBatch(
+        self.cnxn, self.services, config, 78901, [222, 444, 666], True)
+    self.work_env.services.hotlist_star.SetStarsBatch(
+        self.cnxn, 1678, [222, 444, 555], True)
+    self.work_env.services.user_star.SetStarsBatch(
+        self.cnxn, 888, [222, 333, 777], True)
+    self.work_env.services.user_star.SetStarsBatch(
+        self.cnxn, 999, [111, 222, 333], True)
+
+  def testExpungeUsersFromStars(self):
+    self.setUpExpungeUsersFromStars()
+    user_ids = [999, 222, 555]
+    self.work_env.expungeUsersFromStars(user_ids)
+    self.assertEqual(
+        self.work_env.services.project_star.LookupItemStarrers(self.cnxn, 789),
+        [444])
+    self.assertEqual(
+        self.work_env.services.issue_star.LookupItemStarrers(self.cnxn, 78901),
+        [444, 666])
+    self.assertEqual(
+        self.work_env.services.hotlist_star.LookupItemStarrers(self.cnxn, 1678),
+        [444])
+    self.assertEqual(
+        self.work_env.services.user_star.LookupItemStarrers(self.cnxn, 888),
+        [333, 777])
+    self.assertEqual(
+        self.work_env.services.user_star.expunged_item_ids, [999, 222, 555])
diff --git a/businesslogic/work_env.py b/businesslogic/work_env.py
new file mode 100644
index 0000000..c7282c0
--- /dev/null
+++ b/businesslogic/work_env.py
@@ -0,0 +1,3843 @@
+# Copyright 2017 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
+
+"""WorkEnv is a context manager and API for high-level operations.
+
+A work environment is used by request handlers for the legacy UI, v1
+API, and v2 API.  The WorkEnvironment operations are a common code
+path that does permission checking, input validation, coordination of
+service-level calls, follow-up tasks (e.g., triggering
+notifications after certain operations) and other systemic
+functionality so that that code is not duplicated in multiple request
+handlers.
+
+Responsibilities of request handers (legacy UI and external API) and associated
+frameworks:
++ API: check oauth client allowlist or XSRF token
++ Rate-limiting
++ Create a MonorailContext (or MonorailRequest) object:
+  - Parse the request, including syntactic validation, e.g, non-negative ints
+  - Authenticate the requesting user
++ Call the WorkEnvironment to perform the requested action
+  - Catch exceptions and generate error messages
++ UI: Decide screen flow, and on-page online-help
++ Render the result business objects as UI HTML or API response protobufs
+
+Responsibilities of WorkEnv:
++ Most monitoring, profiling, and logging
++ Apply business rules:
+  - Check permissions
+    - Every GetFoo/GetFoosDict method will assert that the user can view Foo(s)
+  - Detailed validation of request parameters
+  - Raise exceptions to indicate problems
++ Make coordinated calls to the services layer to make DB changes
+  - E.g., calls may need to be made in a specific order
++ Enqueue tasks for background follow-up work:
+  - E.g., email notifications
+
+Responsibilities of the Services layer:
++ Individual CRUD operations on objects in the database
+  - Each services class should be independent of others
++ App-specific interface around external services:
+  - E.g., GAE search, GCS, monorail-predict
++ Business object caches
++ Breaking large operations into batches as appropriate for the underlying
+  data storage service, e.g., DB shards and search engine indexing.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import itertools
+import logging
+import time
+
+import settings
+from features import features_constants
+from features import filterrules_helpers
+from features import send_notifications
+from features import features_bizobj
+from features import hotlist_helpers
+from framework import authdata
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import permissions
+from search import frontendsearchpipeline
+from services import features_svc
+from services import tracker_fulltext
+from sitewide import sitewide_helpers
+from tracker import field_helpers
+from tracker import rerank_helpers
+from tracker import field_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+from project import project_helpers
+from proto import features_pb2
+from proto import project_pb2
+from proto import tracker_pb2
+from proto import user_pb2
+
+
+# TODO(jrobbins): break this file into one facade plus ~5
+# implementation parts that roughly correspond to services files.
+
+# ListResult is returned in List/Search methods to bundle the requested
+# items and the next start index for a subsequent request. If there are
+# no more items to be fetched, `next_start` should be None.
+ListResult = collections.namedtuple('ListResult', ['items', 'next_start'])
+# type: (Sequence[Object], Optional[int]) -> None
+
+# Comments added to issues impacted by another issue's mergedInto change.
+UNMERGE_COMMENT = 'Issue %s has been un-merged from this issue.\n'
+MERGE_COMMENT = 'Issue %s has been merged into this issue.\n'
+
+
+class WorkEnv(object):
+
+  def __init__(self, mc, services, phase=None):
+    self.mc = mc
+    self.services = services
+    self.phase = phase
+
+  def __enter__(self):
+    if self.mc.profiler and self.phase:
+      self.mc.profiler.StartPhase(name=self.phase)
+    return self  # The instance of this class is the context object.
+
+  def __exit__(self, exception_type, value, traceback):
+    if self.mc.profiler and self.phase:
+      self.mc.profiler.EndPhase()
+    return False  # Re-raise any exception in the with-block.
+
+  def _UserCanViewProject(self, project):
+    """Test if the user may view the given project."""
+    return permissions.UserCanViewProject(
+        self.mc.auth.user_pb, self.mc.auth.effective_ids, project)
+
+  def _FilterVisibleProjectsDict(self, projects):
+    """Filter out projects the user doesn't have permission to view."""
+    return {
+        key: proj
+        for key, proj in projects.items()
+        if self._UserCanViewProject(proj)}
+
+  def _AssertPermInProject(self, perm, project):
+    """Make sure the user may use perm in the given project."""
+    project_perms = permissions.GetPermissions(
+        self.mc.auth.user_pb, self.mc.auth.effective_ids, project)
+    permitted = project_perms.CanUsePerm(
+        perm, self.mc.auth.effective_ids, project, [])
+    if not permitted:
+      raise permissions.PermissionException(
+        'User lacks permission %r in project %s' % (perm, project.project_name))
+
+  def _UserCanViewIssue(self, issue, allow_viewing_deleted=False):
+    """Test if user may view an issue according to perms in issue's project."""
+    project = self.GetProject(issue.project_id)
+    config = self.GetProjectConfig(issue.project_id)
+    granted_perms = tracker_bizobj.GetGrantedPerms(
+        issue, self.mc.auth.effective_ids, config)
+    project_perms = permissions.GetPermissions(
+        self.mc.auth.user_pb, self.mc.auth.effective_ids, project)
+    issue_perms = permissions.UpdateIssuePermissions(
+        project_perms, project, issue, self.mc.auth.effective_ids,
+        granted_perms=granted_perms)
+    permit_view = permissions.CanViewIssue(
+        self.mc.auth.effective_ids, issue_perms, project, issue,
+        allow_viewing_deleted=allow_viewing_deleted,
+        granted_perms=granted_perms)
+    return issue_perms, permit_view
+
+  def _AssertUserCanViewIssue(self, issue, allow_viewing_deleted=False):
+    """Make sure the user may view the issue."""
+    issue_perms, permit_view = self._UserCanViewIssue(
+        issue, allow_viewing_deleted)
+    if not permit_view:
+      raise permissions.PermissionException(
+          'User is not allowed to view issue: %s:%d.' %
+          (issue.project_name, issue.local_id))
+    return issue_perms
+
+  def _UserCanUsePermInIssue(self, issue, perm):
+    """Test if the user may use perm on the given issue."""
+    issue_perms = self._AssertUserCanViewIssue(
+        issue, allow_viewing_deleted=True)
+    return issue_perms.HasPerm(perm, None, None, [])
+
+  def _AssertPermInIssue(self, issue, perm):
+    """Make sure the user may use perm on the given issue."""
+    permitted = self._UserCanUsePermInIssue(issue, perm)
+    if not permitted:
+      raise permissions.PermissionException(
+        'User lacks permission %r in issue' % perm)
+
+  def _AssertUserCanModifyIssues(
+      self, issue_delta_pairs, is_description_change, comment_content=None):
+    # type: (Tuple[Issue, IssueDelta], Boolean, Optional[str]) -> None
+    """Make sure the user may make the delta changes for each paired issue."""
+    # We assume that view permission for each issue, and therefore project,
+    # was checked by the caller.
+    project_ids = list(
+        {issue.project_id for (issue, _delta) in issue_delta_pairs})
+    projects_by_id = self.services.project.GetProjects(
+        self.mc.cnxn, project_ids)
+    configs_by_id = self.services.config.GetProjectConfigs(
+        self.mc.cnxn, project_ids)
+
+    project_perms_by_ids = {}
+    for project_id, project in projects_by_id.items():
+      project_perms_by_ids[project_id] = permissions.GetPermissions(
+          self.mc.auth.user_pb, self.mc.auth.effective_ids, project)
+
+    with exceptions.ErrorAggregator(permissions.PermissionException) as err_agg:
+      for issue, delta in issue_delta_pairs:
+        project_perms = project_perms_by_ids.get(issue.project_id)
+        config = configs_by_id.get(issue.project_id)
+        project = projects_by_id.get(issue.project_id)
+        granted_perms = tracker_bizobj.GetGrantedPerms(
+            issue, self.mc.auth.effective_ids, config)
+        issue_perms = permissions.UpdateIssuePermissions(
+            project_perms,
+            project,
+            issue,
+            self.mc.auth.effective_ids,
+            granted_perms=granted_perms)
+
+        # User cannot merge any issue into an issue they cannot edit.
+        if delta.merged_into:
+          merged_into_issue = self.GetIssue(
+              delta.merged_into, use_cache=False, allow_viewing_deleted=True)
+          self._AssertPermInIssue(merged_into_issue, permissions.EDIT_ISSUE)
+
+        # User cannot change values for restricted fields they cannot edit.
+        field_ids = [fv.field_id for fv in delta.field_vals_add]
+        field_ids.extend([fv.field_id for fv in delta.field_vals_remove])
+        field_ids.extend(delta.fields_clear)
+        labels = itertools.chain(delta.labels_add, delta.labels_remove)
+        try:
+          self._AssertUserCanEditFieldsAndEnumMaskedLabels(
+              project, config, field_ids, labels)
+        except permissions.PermissionException as e:
+          err_agg.AddErrorMessage(e.message)
+
+        if issue_perms.HasPerm(permissions.EDIT_ISSUE, self.mc.auth.user_id,
+                               project):
+          continue
+
+        # The user does not have general EDIT_ISSUE permissions, but may
+        # have perms to modify certain issue parts/fields.
+
+        # Description changes can only be made by users with EDIT_ISSUE.
+        if is_description_change:
+          err_agg.AddErrorMessage(
+              'User not allowed to edit description in issue %s:%d' %
+              (issue.project_name, issue.local_id))
+
+        if comment_content and not issue_perms.HasPerm(
+            permissions.ADD_ISSUE_COMMENT, self.mc.auth.user_id, project):
+          err_agg.AddErrorMessage(
+              'User not allowed to add comment in issue %s:%d' %
+              (issue.project_name, issue.local_id))
+
+        if delta == tracker_pb2.IssueDelta():
+          continue
+
+        allowed_delta = tracker_pb2.IssueDelta()
+        if issue_perms.HasPerm(permissions.EDIT_ISSUE_STATUS,
+                               self.mc.auth.user_id, project):
+          allowed_delta.status = delta.status
+        if issue_perms.HasPerm(permissions.EDIT_ISSUE_SUMMARY,
+                               self.mc.auth.user_id, project):
+          allowed_delta.summary = delta.summary
+        if issue_perms.HasPerm(permissions.EDIT_ISSUE_OWNER,
+                               self.mc.auth.user_id, project):
+          allowed_delta.owner_id = delta.owner_id
+        if issue_perms.HasPerm(permissions.EDIT_ISSUE_CC, self.mc.auth.user_id,
+                               project):
+          allowed_delta.cc_ids_add = delta.cc_ids_add
+          allowed_delta.cc_ids_remove = delta.cc_ids_remove
+        # We do not check for or add other fields (e.g. comps, labels, fields)
+        # of `delta` to `allowed_delta` because they are only allowed
+        # with EDIT_ISSUE perms.
+        if delta != allowed_delta:
+          err_agg.AddErrorMessage(
+              'User lack permission to make these changes to issue %s:%d' %
+              (issue.project_name, issue.local_id))
+
+  # end of `with` block.
+
+  def _AssertUserCanDeleteComment(self, issue, comment):
+    issue_perms = self._AssertUserCanViewIssue(
+       issue, allow_viewing_deleted=True)
+    commenter = self.services.user.GetUser(self.mc.cnxn, comment.user_id)
+    permitted = permissions.CanDeleteComment(
+        comment, commenter, self.mc.auth.user_id, issue_perms)
+    if not permitted:
+      raise permissions.PermissionException('Cannot delete comment')
+
+  def _AssertUserCanViewHotlist(self, hotlist):
+    """Make sure the user may view the hotlist."""
+    if not permissions.CanViewHotlist(
+        self.mc.auth.effective_ids, self.mc.perms, hotlist):
+      raise permissions.PermissionException(
+          'User is not allowed to view this hotlist')
+
+  def _AssertUserCanEditHotlist(self, hotlist):
+    if not permissions.CanEditHotlist(
+        self.mc.auth.effective_ids, self.mc.perms, hotlist):
+      raise permissions.PermissionException(
+          'User is not allowed to edit this hotlist')
+
+  def _AssertUserCanEditValueForFieldDef(self, project, fielddef):
+    if not permissions.CanEditValueForFieldDef(
+        self.mc.auth.effective_ids, self.mc.perms, project, fielddef):
+      raise permissions.PermissionException(
+          'User is not allowed to edit custom field %s' % fielddef.field_name)
+
+  def _AssertUserCanEditFieldsAndEnumMaskedLabels(
+      self, project, config, field_ids, labels):
+    field_ids = set(field_ids)
+
+    enum_fds_by_name = {
+        f.field_name.lower(): f.field_id
+        for f in config.field_defs
+        if f.field_type is tracker_pb2.FieldTypes.ENUM_TYPE and not f.is_deleted
+    }
+    for label in labels:
+      enum_field_name = tracker_bizobj.LabelIsMaskedByField(
+          label, enum_fds_by_name.keys())
+      if enum_field_name:
+        field_ids.add(enum_fds_by_name.get(enum_field_name))
+
+    fds_by_id = {fd.field_id: fd for fd in config.field_defs}
+    with exceptions.ErrorAggregator(permissions.PermissionException) as err_agg:
+      for field_id in field_ids:
+        fd = fds_by_id.get(field_id)
+        if fd:
+          try:
+            self._AssertUserCanEditValueForFieldDef(project, fd)
+          except permissions.PermissionException as e:
+            err_agg.AddErrorMessage(e.message)
+
+  def _AssertUserCanViewFieldDef(self, project, field):
+    """Make sure the user may view the field."""
+    if not permissions.CanViewFieldDef(self.mc.auth.effective_ids,
+                                       self.mc.perms, project, field):
+      raise permissions.PermissionException(
+          'User is not allowed to view this field')
+
+  ### Site methods
+
+  # FUTURE: GetSiteReadOnlyState()
+  # FUTURE: SetSiteReadOnlyState()
+  # FUTURE: GetSiteBannerMessage()
+  # FUTURE: SetSiteBannerMessage()
+
+  ### Project methods
+
+  def CreateProject(
+      self, project_name, owner_ids, committer_ids, contributor_ids,
+      summary, description, state=project_pb2.ProjectState.LIVE,
+      access=None, read_only_reason=None, home_page=None, docs_url=None,
+      source_url=None, logo_gcs_id=None, logo_file_name=None):
+    """Create and store a Project with the given attributes.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_name: a valid project name, all lower case.
+      owner_ids: a list of user IDs for the project owners.
+      committer_ids: a list of user IDs for the project members.
+      contributor_ids: a list of user IDs for the project contributors.
+      summary: one-line explanation of the project.
+      description: one-page explanation of the project.
+      state: a project state enum defined in project_pb2.
+      access: optional project access enum defined in project.proto.
+      read_only_reason: if given, provides a status message and marks
+        the project as read-only.
+      home_page: home page of the project
+      docs_url: url to redirect to for wiki/documentation links
+      source_url: url to redirect to for source browser links
+      logo_gcs_id: google storage object id of the project's logo
+      logo_file_name: uploaded file name of the project's logo
+
+    Returns:
+      The int project_id of the new project.
+
+    Raises:
+      ProjectAlreadyExists: A project with that name already exists.
+    """
+    if not permissions.CanCreateProject(self.mc.perms):
+      raise permissions.PermissionException(
+          'User is not allowed to create a project')
+
+    with self.mc.profiler.Phase('creating project %r' % project_name):
+      project_id = self.services.project.CreateProject(
+          self.mc.cnxn, project_name, owner_ids, committer_ids, contributor_ids,
+          summary, description, state=state, access=access,
+          read_only_reason=read_only_reason, home_page=home_page,
+          docs_url=docs_url, source_url=source_url, logo_gcs_id=logo_gcs_id,
+          logo_file_name=logo_file_name)
+      self.services.template.CreateDefaultProjectTemplates(self.mc.cnxn,
+          project_id)
+    return project_id
+
+  def ListProjects(self, domain=None, use_cache=True):
+    """Return a list of project IDs that the current user may view."""
+    # TODO(crbug.com/monorail/7508): Add permission checking in ListProjects.
+    # Note: No permission checks because anyone can list projects, but
+    # the results are filtered by permission to view each project.
+
+    with self.mc.profiler.Phase('list projects for %r' % self.mc.auth.user_id):
+      project_ids = self.services.project.GetVisibleLiveProjects(
+          self.mc.cnxn, self.mc.auth.user_pb, self.mc.auth.effective_ids,
+          domain=domain, use_cache=use_cache)
+
+    return project_ids
+
+  def CheckProjectName(self, project_name):
+    """Check that a project name is valid and not already in use.
+
+    Args:
+      project_name: str the project name to check.
+
+    Returns:
+      None if the user can create a project with that name, or a string with the
+      reason the name can't be used.
+
+    Raises:
+      PermissionException: The user is not allowed to create a project.
+    """
+    # We check that the user can create a project so we don't leak information
+    # about project names.
+    if not permissions.CanCreateProject(self.mc.perms):
+      raise permissions.PermissionException(
+          'User is not allowed to create a project')
+
+    with self.mc.profiler.Phase('checking project name %s' % project_name):
+      if not project_helpers.IsValidProjectName(project_name):
+        return '"%s" is not a valid project name.' % project_name
+      if self.services.project.LookupProjectIDs(self.mc.cnxn, [project_name]):
+        return 'There is already a project with that name.'
+    return None
+
+  def CheckComponentName(self, project_id, parent_path, component_name):
+    """Check that the component name is valid and not already in use.
+
+    Args:
+      project_id: int with the id of the project where we want to create the
+          component.
+      parent_path: optional str with the path of the parent component.
+      component_name: str with the name of the proposed component.
+
+    Returns:
+      None if the user can create a component with that name, or a string with
+      the reason the name can't be used.
+    """
+    # Check that the project exists and the user can view it.
+    self.GetProject(project_id)
+    # If a parent component is given, make sure it exists.
+    config = self.GetProjectConfig(project_id)
+    if parent_path and not tracker_bizobj.FindComponentDef(parent_path, config):
+      raise exceptions.NoSuchComponentException(
+          'Component %r not found' % parent_path)
+    with self.mc.profiler.Phase(
+        'checking component name %r %r' % (parent_path, component_name)):
+      if not tracker_constants.COMPONENT_NAME_RE.match(component_name):
+        return '"%s" is not a valid component name.' % component_name
+      if parent_path:
+        component_name = '%s>%s' % (parent_path, component_name)
+      if tracker_bizobj.FindComponentDef(component_name, config):
+        return 'There is already a component with that name.'
+    return None
+
+  def CheckFieldName(self, project_id, field_name):
+    """Check that the field name is valid and not already in use.
+
+    Args:
+      project_id: int with the id of the project where we want to create the
+          field.
+      field_name: str with the name of the proposed field.
+
+    Returns:
+      None if the user can create a field with that name, or a string with
+      the reason the name can't be used.
+    """
+    # Check that the project exists and the user can view it.
+    self.GetProject(project_id)
+    config = self.GetProjectConfig(project_id)
+
+    field_name = field_name.lower()
+    with self.mc.profiler.Phase('checking field name %r' % field_name):
+      if not tracker_constants.FIELD_NAME_RE.match(field_name):
+        return '"%s" is not a valid field name.' % field_name
+      if field_name in tracker_constants.RESERVED_PREFIXES:
+        return 'That name is reserved'
+      if field_name.endswith(
+          tuple(tracker_constants.RESERVED_COL_NAME_SUFFIXES)):
+        return 'That suffix is reserved'
+      for fd in config.field_defs:
+        fn = fd.field_name.lower()
+        if field_name == fn:
+          return 'There is already a field with that name.'
+        if field_name.startswith(fn + '-'):
+          return 'An existing field is a prefix of that name.'
+        if fn.startswith(field_name + '-'):
+          return 'That name is a prefix of an existing field name.'
+
+    return None
+
+  def GetProjects(self, project_ids, use_cache=True):
+    """Return the specified projects.
+
+    Args:
+      project_ids: int project_ids of the projects to retrieve.
+      use_cache: set to false when doing read-modify-write.
+
+    Returns:
+      The specified projects.
+
+    Raises:
+      NoSuchProjectException: There is no project with that ID.
+    """
+    with self.mc.profiler.Phase('getting projects %r' % project_ids):
+      projects = self.services.project.GetProjects(
+          self.mc.cnxn, project_ids, use_cache=use_cache)
+
+    projects = self._FilterVisibleProjectsDict(projects)
+    return projects
+
+  def GetProject(self, project_id, use_cache=True):
+    """Return the specified project.
+
+    Args:
+      project_id: int project_id of the project to retrieve.
+      use_cache: set to false when doing read-modify-write.
+
+    Returns:
+      The specified project.
+
+    Raises:
+      NoSuchProjectException: There is no project with that ID.
+    """
+    projects = self.GetProjects([project_id], use_cache=use_cache)
+    if project_id not in projects:
+      raise permissions.PermissionException(
+          'User is not allowed to view this project')
+    return projects[project_id]
+
+  def GetProjectsByName(self, project_names, use_cache=True):
+    """Return the named project.
+
+    Args:
+      project_names: string names of the projects to retrieve.
+      use_cache: set to false when doing read-modify-write.
+
+    Returns:
+      The specified projects.
+    """
+    with self.mc.profiler.Phase('getting projects %r' % project_names):
+      projects = self.services.project.GetProjectsByName(
+          self.mc.cnxn, project_names, use_cache=use_cache)
+
+    for pn in project_names:
+      if pn not in projects:
+        raise exceptions.NoSuchProjectException('Project %r not found.' % pn)
+
+    projects = self._FilterVisibleProjectsDict(projects)
+    return projects
+
+  def GetProjectByName(self, project_name, use_cache=True):
+    """Return the named project.
+
+    Args:
+      project_name: string name of the project to retrieve.
+      use_cache: set to false when doing read-modify-write.
+
+    Returns:
+      The specified project.
+
+    Raises:
+      NoSuchProjectException: There is no project with that name.
+    """
+    projects = self.GetProjectsByName([project_name], use_cache)
+    if not projects:
+      raise permissions.PermissionException(
+          'User is not allowed to view this project')
+
+    return projects[project_name]
+
+  def GatherProjectMembershipsForUser(self, user_id):
+    """Return the projects where the user has a role.
+
+    Args:
+      user_id: ID of the user we are requesting project memberships for.
+
+    Returns:
+      A triple with project IDs where the user is an owner, a committer, or a
+      contributor.
+    """
+    viewed_user_effective_ids = authdata.AuthData.FromUserID(
+        self.mc.cnxn, user_id, self.services).effective_ids
+
+    owner_projects, _archived, committer_projects, contrib_projects = (
+        self.GetUserProjects(viewed_user_effective_ids))
+
+    owner_proj_ids = [proj.project_id for proj in owner_projects]
+    committer_proj_ids = [proj.project_id for proj in committer_projects]
+    contrib_proj_ids = [proj.project_id for proj in contrib_projects]
+    return owner_proj_ids, committer_proj_ids, contrib_proj_ids
+
+  def GetUserRolesInAllProjects(self, viewed_user_effective_ids):
+    """Return the projects where the user has a role.
+
+    Args:
+      viewed_user_effective_ids: list of IDs of the user whose projects we want
+          to see.
+
+    Returns:
+      A triple with projects where the user is an owner, a member or a
+      contributor.
+    """
+    with self.mc.profiler.Phase(
+        'Finding roles in all projects for %r' % viewed_user_effective_ids):
+      project_ids = self.services.project.GetUserRolesInAllProjects(
+          self.mc.cnxn, viewed_user_effective_ids)
+
+    owner_projects = self.GetProjects(project_ids[0])
+    member_projects = self.GetProjects(project_ids[1])
+    contrib_projects = self.GetProjects(project_ids[2])
+
+    return owner_projects, member_projects, contrib_projects
+
+  def GetUserProjects(self, viewed_user_effective_ids):
+    # TODO(crbug.com/monorail/7398): Combine this function with
+    # GatherProjectMembershipsForUser after removing the legacy
+    # project list page and the v0 GetUsersProjects RPC.
+    """Get the projects to display in the user's profile.
+
+    Args:
+      viewed_user_effective_ids: set of int user IDs of the user being viewed.
+
+    Returns:
+      A 4-tuple of lists of PBs:
+        - live projects the viewed user owns
+        - archived projects the viewed user owns
+        - live projects the viewed user is a member of
+        - live projects the viewed user is a contributor to
+
+      Any projects the viewing user should not be able to see are filtered out.
+      Admins can see everything, while other users can see all non-locked
+      projects they own or are a member of, as well as all live projects.
+    """
+    # Permissions are checked in we.GetUserRolesInAllProjects()
+    owner_projects, member_projects, contrib_projects = (
+        self.GetUserRolesInAllProjects(viewed_user_effective_ids))
+
+    # We filter out DELETABLE projects, and keep a project where the user has a
+    # highest role, e.g. if the user is both an owner and a member, the project
+    # is listed under owner projects, not under member_projects.
+    archived_projects = [
+        project
+        for project in owner_projects.values()
+        if project.state == project_pb2.ProjectState.ARCHIVED]
+
+    contrib_projects = [
+        project
+        for pid, project in contrib_projects.items()
+        if pid not in owner_projects
+        and pid not in member_projects
+        and project.state != project_pb2.ProjectState.DELETABLE
+        and project.state != project_pb2.ProjectState.ARCHIVED]
+
+    member_projects = [
+        project
+        for pid, project in member_projects.items()
+        if pid not in owner_projects
+        and project.state != project_pb2.ProjectState.DELETABLE
+        and project.state != project_pb2.ProjectState.ARCHIVED]
+
+    owner_projects = [
+        project
+        for pid, project in owner_projects.items()
+        if project.state != project_pb2.ProjectState.DELETABLE
+        and project.state != project_pb2.ProjectState.ARCHIVED]
+
+    by_name = lambda project: project.project_name
+    owner_projects = sorted(owner_projects, key=by_name)
+    archived_projects = sorted(archived_projects, key=by_name)
+    member_projects = sorted(member_projects, key=by_name)
+    contrib_projects = sorted(contrib_projects, key=by_name)
+
+    return owner_projects, archived_projects, member_projects, contrib_projects
+
+  def UpdateProject(
+      self,
+      project_id,
+      summary=None,
+      description=None,
+      state=None,
+      state_reason=None,
+      access=None,
+      issue_notify_address=None,
+      attachment_bytes_used=None,
+      attachment_quota=None,
+      moved_to=None,
+      process_inbound_email=None,
+      only_owners_remove_restrictions=None,
+      read_only_reason=None,
+      cached_content_timestamp=None,
+      only_owners_see_contributors=None,
+      delete_time=None,
+      recent_activity=None,
+      revision_url_format=None,
+      home_page=None,
+      docs_url=None,
+      source_url=None,
+      logo_gcs_id=None,
+      logo_file_name=None,
+      issue_notify_always_detailed=None):
+    """Update the DB with the given project information."""
+    project = self.GetProject(project_id)
+    self._AssertPermInProject(permissions.EDIT_PROJECT, project)
+
+    with self.mc.profiler.Phase('updating project %r' % project_id):
+      self.services.project.UpdateProject(
+          self.mc.cnxn,
+          project_id,
+          summary=summary,
+          description=description,
+          state=state,
+          state_reason=state_reason,
+          access=access,
+          issue_notify_address=issue_notify_address,
+          attachment_bytes_used=attachment_bytes_used,
+          attachment_quota=attachment_quota,
+          moved_to=moved_to,
+          process_inbound_email=process_inbound_email,
+          only_owners_remove_restrictions=only_owners_remove_restrictions,
+          read_only_reason=read_only_reason,
+          cached_content_timestamp=cached_content_timestamp,
+          only_owners_see_contributors=only_owners_see_contributors,
+          delete_time=delete_time,
+          recent_activity=recent_activity,
+          revision_url_format=revision_url_format,
+          home_page=home_page,
+          docs_url=docs_url,
+          source_url=source_url,
+          logo_gcs_id=logo_gcs_id,
+          logo_file_name=logo_file_name,
+          issue_notify_always_detailed=issue_notify_always_detailed)
+
+  def DeleteProject(self, project_id):
+    """Mark the project as deletable.  It will be reaped by a cron job.
+
+    Args:
+      project_id: int ID of the project to delete.
+
+    Returns:
+      Nothing.
+
+    Raises:
+      NoSuchProjectException: There is no project with that ID.
+    """
+    project = self.GetProject(project_id)
+    self._AssertPermInProject(permissions.EDIT_PROJECT, project)
+
+    with self.mc.profiler.Phase('marking deletable %r' % project_id):
+      _project = self.GetProject(project_id)
+      self.services.project.MarkProjectDeletable(
+          self.mc.cnxn, project_id, self.services.config)
+
+  def StarProject(self, project_id, starred):
+    """Star or unstar the specified project.
+
+    Args:
+      project_id: int ID of the project to star/unstar.
+      starred: true to add a star, false to remove it.
+
+    Returns:
+      Nothing.
+
+    Raises:
+      NoSuchProjectException: There is no project with that ID.
+    """
+    project = self.GetProject(project_id)
+    self._AssertPermInProject(permissions.SET_STAR, project)
+
+    with self.mc.profiler.Phase('(un)starring project %r' % project_id):
+      self.services.project_star.SetStar(
+          self.mc.cnxn, project_id, self.mc.auth.user_id, starred)
+
+  def IsProjectStarred(self, project_id):
+    """Return True if the current user has starred the given project.
+
+    Args:
+      project_id: int ID of the project to check.
+
+    Returns:
+      True if starred.
+
+    Raises:
+      NoSuchProjectException: There is no project with that ID.
+    """
+    if project_id is None:
+      raise exceptions.InputException('No project specified')
+
+    if not self.mc.auth.user_id:
+      return False
+
+    with self.mc.profiler.Phase('checking project star %r' % project_id):
+      # Make sure the project exists and user has permission to see it.
+      _project = self.GetProject(project_id)
+      return self.services.project_star.IsItemStarredBy(
+        self.mc.cnxn, project_id, self.mc.auth.user_id)
+
+  def GetProjectStarCount(self, project_id):
+    """Return the number of times the project has been starred.
+
+    Args:
+      project_id: int ID of the project to check.
+
+    Returns:
+      The number of times the project has been starred.
+
+    Raises:
+      NoSuchProjectException: There is no project with that ID.
+    """
+    if project_id is None:
+      raise exceptions.InputException('No project specified')
+
+    with self.mc.profiler.Phase('counting stars for project %r' % project_id):
+      # Make sure the project exists and user has permission to see it.
+      _project = self.GetProject(project_id)
+      return self.services.project_star.CountItemStars(self.mc.cnxn, project_id)
+
+  def ListStarredProjects(self, viewed_user_id=None):
+    """Return a list of projects starred by the current or viewed user.
+
+    Args:
+      viewed_user_id: optional user ID for another user's profile page, if
+          not supplied, the signed in user is used.
+
+    Returns:
+      A list of projects that were starred by current user and that they
+      are currently allowed to view.
+    """
+    # Note: No permission checks for this call, but the list of starred
+    # projects is filtered based on permission to view.
+
+    if viewed_user_id is None:
+      if self.mc.auth.user_id:
+        viewed_user_id = self.mc.auth.user_id
+      else:
+        return []  # Anon user and no viewed user specified.
+    with self.mc.profiler.Phase('ListStarredProjects for %r' % viewed_user_id):
+      viewable_projects = sitewide_helpers.GetViewableStarredProjects(
+          self.mc.cnxn, self.services, viewed_user_id,
+          self.mc.auth.effective_ids, self.mc.auth.user_pb)
+    return viewable_projects
+
+  def GetProjectConfigs(self, project_ids, use_cache=True):
+    """Return the specifed configs.
+
+    Args:
+      project_ids: int IDs of the projects to retrieve.
+      use_cache: set to false when doing read-modify-write.
+
+    Returns:
+      The specified configs.
+    """
+    with self.mc.profiler.Phase('getting configs for %r' % project_ids):
+      configs = self.services.config.GetProjectConfigs(
+          self.mc.cnxn, project_ids, use_cache=use_cache)
+
+    projects = self._FilterVisibleProjectsDict(
+        self.GetProjects(list(configs.keys())))
+    configs = {project_id: configs[project_id] for project_id in projects}
+
+    return configs
+
+  def GetProjectConfig(self, project_id, use_cache=True):
+    """Return the specifed config.
+
+    Args:
+      project_id: int ID of the project to retrieve.
+      use_cache: set to false when doing read-modify-write.
+
+    Returns:
+      The specified config.
+
+    Raises:
+      NoSuchProjectException: There is no matching config.
+    """
+    configs = self.GetProjectConfigs([project_id], use_cache)
+    if not configs:
+      raise exceptions.NoSuchProjectException()
+    return configs[project_id]
+
+  def ListProjectTemplates(self, project_id):
+    templates = self.services.template.GetProjectTemplates(
+        self.mc.cnxn, project_id)
+    project = self.GetProject(project_id)
+    # Filter non-viewable templates
+    if framework_bizobj.UserIsInProject(project, self.mc.auth.effective_ids):
+      return templates
+    return [template for template in templates if not template.members_only]
+
+  def ListComponentDefs(self, project_id, page_size, start):
+    # type: (int, int, int) -> ListResult
+    """Returns component defs that belong to the project."""
+    if start < 0:
+      raise exceptions.InputException('Invalid `start`: %d' % start)
+    if page_size < 0:
+      raise exceptions.InputException('Invalid `page_size`: %d' % page_size)
+
+    config = self.GetProjectConfig(project_id)
+    end = start + page_size
+    next_start = None
+    if end < len(config.component_defs):
+      next_start = end
+    return ListResult(config.component_defs[start:end], next_start)
+
+  def CreateComponentDef(
+      self, project_id, path, description, admin_ids, cc_ids, labels):
+    # type: (int, str, str, Collection[int], Collection[int], Collection[str])
+    #     -> ComponentDef
+    """Creates a ComponentDef with the given information."""
+    project = self.GetProject(project_id)
+    config = self.GetProjectConfig(project_id)
+
+    # Validate new ComponentDef and check permissions.
+    ancestor_path, leaf_name = None, path
+    if '>' in path:
+      ancestor_path, leaf_name = path.rsplit('>', 1)
+      ancestor_def = tracker_bizobj.FindComponentDef(ancestor_path, config)
+      if not ancestor_def:
+        raise exceptions.InputException(
+            'Ancestor path %s is invalid.' % ancestor_path)
+      project_perms = permissions.GetPermissions(
+          self.mc.auth.user_pb, self.mc.auth.effective_ids, project)
+      if not permissions.CanEditComponentDef(
+          self.mc.auth.effective_ids, project_perms, project, ancestor_def,
+          config):
+        raise permissions.PermissionException(
+            'User is not allowed to create a subcomponent under %s.' %
+            ancestor_path)
+    else:
+      # A brand new top level component is being created.
+      self._AssertPermInProject(permissions.EDIT_PROJECT, project)
+
+    if not tracker_constants.COMPONENT_NAME_RE.match(leaf_name):
+      raise exceptions.InputException('Invalid component path: %s.' % leaf_name)
+
+    if tracker_bizobj.FindComponentDef(path, config):
+      raise exceptions.ComponentDefAlreadyExists(
+          'Component path %s already exists.' % path)
+
+    with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+      tracker_helpers.AssertUsersExist(
+          self.mc.cnxn, self.services, cc_ids + admin_ids, err_agg)
+
+    label_ids = self.services.config.LookupLabelIDs(
+        self.mc.cnxn, project_id, labels, autocreate=True)
+    self.services.config.CreateComponentDef(
+        self.mc.cnxn, project_id, path, description, False, admin_ids, cc_ids,
+        int(time.time()), self.mc.auth.user_id, label_ids)
+    updated_config = self.GetProjectConfig(project_id, use_cache=False)
+    return tracker_bizobj.FindComponentDef(path, updated_config)
+
+  def DeleteComponentDef(self, project_id, component_id):
+    # type: (MonorailConnection, int, int) -> None
+    """Deletes the given ComponentDef."""
+    project = self.GetProject(project_id)
+    config = self.GetProjectConfig(project_id)
+
+    component_def = tracker_bizobj.FindComponentDefByID(component_id, config)
+    if not component_def:
+      raise exceptions.NoSuchComponentException('The component does not exist.')
+
+    project_perms = permissions.GetPermissions(
+        self.mc.auth.user_pb, self.mc.auth.effective_ids, project)
+    if not permissions.CanEditComponentDef(
+        self.mc.auth.effective_ids, project_perms, project, component_def,
+        config):
+      raise permissions.PermissionException(
+          'User is not allowed to delete this component.')
+
+    if tracker_bizobj.FindDescendantComponents(config, component_def):
+      raise exceptions.InputException(
+          'Components with subcomponents cannot be deleted.')
+
+    self.services.config.DeleteComponentDef(
+        self.mc.cnxn, project_id, component_id)
+
+  # FUTURE: labels, statuses, components, rules, templates, and views.
+  # FUTURE: project saved queries.
+  # FUTURE: GetProjectPermissionsForUser()
+
+  ### Field methods
+
+  # FUTURE: All other field methods.
+
+  def GetFieldDef(self, field_id, project):
+    # type: (int, Project) -> FieldDef
+    """Return the specified hotlist.
+
+    Args:
+      field_id: int field_id of the field to retrieve.
+      project: Project object that the field belongs to.
+
+    Returns:
+      The specified field.
+
+    Raises:
+      InputException: No field was specified.
+      NoSuchFieldDefException: There is no field with that ID.
+      PermissionException: The user is not allowed to view the field.
+    """
+    with self.mc.profiler.Phase('getting fielddef %r' % field_id):
+      config = self.GetProjectConfig(project.project_id)
+      field = tracker_bizobj.FindFieldDefByID(field_id, config)
+      if field is None:
+        raise exceptions.NoSuchFieldDefException('Field not found.')
+    self._AssertUserCanViewFieldDef(project, field)
+    return field
+
+  ### Issue methods
+
+  def CreateIssue(
+      self,
+      project_id,  # type: int
+      summary,  # type: str
+      status,  # type: str
+      owner_id,  # type: int
+      cc_ids,  # type: Sequence[int]
+      labels,  # type: Sequence[str]
+      field_values,  # type: Sequence[proto.tracker_pb2.FieldValue]
+      component_ids,  # type: Sequence[int]
+      marked_description,  # type: str
+      blocked_on=None,  # type: Sequence[int]
+      blocking=None,  # type: Sequence[int]
+      attachments=None,  # type: Sequence[Tuple[str, str, str]]
+      phases=None,  # type: Sequence[proto.tracker_pb2.Phase]
+      approval_values=None,  # type: Sequence[proto.tracker_pb2.ApprovalValue]
+      send_email=True,  # type: bool
+      reporter_id=None,  # type: int
+      timestamp=None,  # type: int
+      dangling_blocked_on=None,  # type: Sequence[DanglingIssueRef]
+      dangling_blocking=None,  # type: Sequence[DanglingIssueRef]
+      raise_filter_errors=True,  # type: bool
+  ):
+    # type: (...) -> (proto.tracker_pb2.Issue, proto.tracker_pb2.IssueComment)
+    """Create and store a new issue with all the given information.
+
+    Args:
+      project_id: int ID for the current project.
+      summary: one-line summary string summarizing this issue.
+      status: string issue status value.  E.g., 'New'.
+      owner_id: user ID of the issue owner.
+      cc_ids: list of user IDs for users to be CC'd on changes.
+      labels: list of label strings.  E.g., 'Priority-High'.
+      field_values: list of FieldValue PBs.
+      component_ids: list of int component IDs.
+      marked_description: issue description with initial HTML markup.
+      blocked_on: list of issue_ids that this issue is blocked on.
+      blocking: list of issue_ids that this issue blocks.
+      attachments: [(filename, contents, mimetype),...] attachments uploaded at
+          the time the comment was made.
+      phases: list of Phase PBs.
+      approval_values: list of ApprovalValue PBs.
+      send_email: set to False to avoid email notifications.
+      reporter_id: optional user ID of a different user to attribute this
+          issue report to.  The requester must have the ImportComment perm.
+      timestamp: optional int timestamp of an imported issue.
+      dangling_blocked_on: a list of DanglingIssueRefs this issue is blocked on.
+      dangling_blocking: a list of DanglingIssueRefs that this issue blocks.
+      raise_filter_errors: whether to raise when filter rules produce errors.
+
+    Returns:
+      A tuple (newly created Issue, Comment PB for the description).
+
+    Raises:
+      FilterRuleException if creation violates any filter rule that shows error.
+      InputException: The issue has invalid input, see validation below.
+      PermissionException if user lacks sufficient permissions.
+    """
+    project = self.GetProject(project_id)
+    self._AssertPermInProject(permissions.CREATE_ISSUE, project)
+
+    # TODO(crbug/monorail/7197): The following are needed for v3 API
+    # Phase 5.2 Validate sufficient attachment quota and update
+
+    if reporter_id and reporter_id != self.mc.auth.user_id:
+      self._AssertPermInProject(permissions.IMPORT_COMMENT, project)
+      importer_id = self.mc.auth.user_id
+    else:
+      reporter_id = self.mc.auth.user_id
+      importer_id = None
+
+    with self.mc.profiler.Phase('creating issue in project %r' % project_id):
+      # TODO(crbug/monorail/8000): Refactor issue proto construction
+      # to the caller.
+      status = framework_bizobj.CanonicalizeLabel(status)
+      labels = [framework_bizobj.CanonicalizeLabel(l) for l in labels]
+      labels = [l for l in labels if l]
+
+      issue = tracker_pb2.Issue()
+      issue.project_id = project_id
+      issue.project_name = self.services.project.LookupProjectNames(
+          self.mc.cnxn, [project_id]).get(project_id)
+      issue.summary = summary
+      issue.status = status
+      issue.owner_id = owner_id
+      issue.cc_ids.extend(cc_ids)
+      issue.labels.extend(labels)
+      issue.field_values.extend(field_values)
+      issue.component_ids.extend(component_ids)
+      issue.reporter_id = reporter_id
+      if blocked_on is not None:
+        issue.blocked_on_iids = blocked_on
+        issue.blocked_on_ranks = [0] * len(blocked_on)
+      if blocking is not None:
+        issue.blocking_iids = blocking
+      if dangling_blocked_on is not None:
+        issue.dangling_blocked_on_refs = dangling_blocked_on
+      if dangling_blocking is not None:
+        issue.dangling_blocking_refs = dangling_blocking
+      if attachments:
+        issue.attachment_count = len(attachments)
+      if phases:
+        issue.phases = phases
+      if approval_values:
+        issue.approval_values = approval_values
+      timestamp = timestamp or int(time.time())
+      issue.opened_timestamp = timestamp
+      issue.modified_timestamp = timestamp
+      issue.owner_modified_timestamp = timestamp
+      issue.status_modified_timestamp = timestamp
+      issue.component_modified_timestamp = timestamp
+
+      # Validate the issue
+      tracker_helpers.AssertValidIssueForCreate(
+          self.mc.cnxn, self.services, issue, marked_description)
+
+      # Apply filter rules.
+      # Set the closed_timestamp both before and after filter rules.
+      config = self.GetProjectConfig(issue.project_id)
+      if not tracker_helpers.MeansOpenInProject(
+          tracker_bizobj.GetStatus(issue), config):
+        issue.closed_timestamp = issue.opened_timestamp
+      filterrules_helpers.ApplyFilterRules(
+          self.mc.cnxn, self.services, issue, config)
+      if issue.derived_errors and raise_filter_errors:
+        raise exceptions.FilterRuleException(issue.derived_errors)
+      if not tracker_helpers.MeansOpenInProject(
+          tracker_bizobj.GetStatus(issue), config):
+        issue.closed_timestamp = issue.opened_timestamp
+
+      new_issue, comment = self.services.issue.CreateIssue(
+          self.mc.cnxn,
+          self.services,
+          issue,
+          marked_description,
+          attachments=attachments,
+          index_now=False,
+          importer_id=importer_id)
+      logging.info(
+          'created issue %r in project %r', new_issue.local_id, project_id)
+
+    with self.mc.profiler.Phase('following up after issue creation'):
+      self.services.project.UpdateRecentActivity(self.mc.cnxn, project_id)
+
+    if send_email:
+      with self.mc.profiler.Phase('queueing notification tasks'):
+        hostport = framework_helpers.GetHostPort(
+            project_name=project.project_name)
+        send_notifications.PrepareAndSendIssueChangeNotification(
+            new_issue.issue_id, hostport, reporter_id, comment_id=comment.id)
+        send_notifications.PrepareAndSendIssueBlockingNotification(
+            new_issue.issue_id, hostport, new_issue.blocked_on_iids,
+            reporter_id)
+
+    return new_issue, comment
+
+  def MakeIssueFromTemplate(self, _template, _description, _issue_delta):
+    # type: (tracker_pb2.TemplateDef, str, tracker_pb2.IssueDelta) ->
+    #     tracker_pb2.Issue
+    """Creates issue from template, issue description, and delta.
+
+    Args:
+      template: Template that issue creation is based on.
+      description: Issue description string.
+      issue_delta: Difference between desired issue and base issue.
+
+    Returns:
+      Newly created issue, as protorpc Issue.
+
+    Raises:
+      TODO(crbug/monorail/7197): Document errors when implemented
+    """
+    # Phase 2: Build Issue from TemplateDef
+    # Use helper method, likely from template_helpers
+
+    # Phase 3: Validate proposed deltas and check permissions
+    # Check summary has been edited if required, else throw
+    # Check description is different from template default, else throw
+    # Check edit permission on field values of issue deltas, else throw
+
+    # Phase 4: Merge template, delta, and defaults
+    # Merge delta into issue
+    # Apply approval def defaults to approval values
+    # Capitalize every line of description
+
+    # Phase 5: Create issue by calling work_env.CreateIssue
+
+    return tracker_pb2.Issue()
+
+  def MakeIssue(self, issue, description, send_email):
+    # type: (tracker_pb2.Issue, str, bool) -> tracker_pb2.Issue
+    """Check restricted field permissions and create issue.
+
+    Args:
+      issue: Data for the created issue in a Protocol Bugger.
+      description: Description for the initial description comment created.
+      send_email: Whether this issue creation should email people.
+
+    Returns:
+      The created Issue PB.
+
+    Raises:
+      FilterRuleException if creation violates any filter rule that shows error.
+      InputException: The issue has invalid input, see validation below.
+      PermissionException if user lacks sufficient permissions.
+    """
+    config = self.GetProjectConfig(issue.project_id)
+    project = self.GetProject(issue.project_id)
+    self._AssertUserCanEditFieldsAndEnumMaskedLabels(
+        project, config, [fv.field_id for fv in issue.field_values],
+        issue.labels)
+    issue, _comment = self.CreateIssue(
+        issue.project_id,
+        issue.summary,
+        issue.status,
+        issue.owner_id,
+        issue.cc_ids,
+        issue.labels,
+        issue.field_values,
+        issue.component_ids,
+        description,
+        blocked_on=issue.blocked_on_iids,
+        blocking=issue.blocking_iids,
+        dangling_blocked_on=issue.dangling_blocked_on_refs,
+        dangling_blocking=issue.dangling_blocking_refs,
+        send_email=send_email)
+    return issue
+
+  def MoveIssue(self, issue, target_project):
+    """Move issue to the target_project.
+
+    The current user needs to have permission to delete the current issue, and
+    to edit issues on the target project.
+
+    Args:
+      issue: the issue PB.
+      target_project: the project PB where the issue should be moved to.
+    Returns:
+      The issue PB of the new issue on the target project.
+    """
+    self._AssertPermInIssue(issue, permissions.DELETE_ISSUE)
+    self._AssertPermInProject(permissions.EDIT_ISSUE, target_project)
+
+    if permissions.GetRestrictions(issue):
+      raise exceptions.InputException(
+          'Issues with Restrict labels are not allowed to be moved')
+
+    with self.mc.profiler.Phase('Moving Issue'):
+      tracker_fulltext.UnindexIssues([issue.issue_id])
+
+      # issue is modified by MoveIssues
+      old_text_ref = 'issue %s:%s' % (issue.project_name, issue.local_id)
+      moved_back_iids = self.services.issue.MoveIssues(
+          self.mc.cnxn, target_project, [issue], self.services.user)
+      new_text_ref = 'issue %s:%s' % (issue.project_name, issue.local_id)
+
+      if issue.issue_id in moved_back_iids:
+        content = 'Moved %s back to %s again.' % (old_text_ref, new_text_ref)
+      else:
+        content = 'Moved %s to now be %s.' % (old_text_ref, new_text_ref)
+      self.services.issue.CreateIssueComment(
+          self.mc.cnxn, issue, self.mc.auth.user_id, content,
+          amendments=[
+              tracker_bizobj.MakeProjectAmendment(target_project.project_name)])
+
+      tracker_fulltext.IndexIssues(
+          self.mc.cnxn, [issue], self.services.user, self.services.issue,
+          self.services.config)
+
+    return issue
+
+  def CopyIssue(self, issue, target_project):
+    """Copy issue to the target_project.
+
+    The current user needs to have permission to delete the current issue, and
+    to edit issues on the target project.
+
+    Args:
+      issue: the issue PB.
+      target_project: the project PB where the issue should be copied to.
+    Returns:
+      The issue PB of the new issue on the target project.
+    """
+    self._AssertPermInIssue(issue, permissions.DELETE_ISSUE)
+    self._AssertPermInProject(permissions.EDIT_ISSUE, target_project)
+
+    if permissions.GetRestrictions(issue):
+      raise exceptions.InputException(
+          'Issues with Restrict labels are not allowed to be copied')
+
+    with self.mc.profiler.Phase('Copying Issue'):
+      copied_issue = self.services.issue.CopyIssues(
+          self.mc.cnxn, target_project, [issue], self.services.user,
+          self.mc.auth.user_id)[0]
+
+      issue_ref = 'issue %s:%s' % (issue.project_name, issue.local_id)
+      copied_issue_ref = 'issue %s:%s' % (
+          copied_issue.project_name, copied_issue.local_id)
+
+      # Add comment to the original issue.
+      content = 'Copied %s to %s' % (issue_ref, copied_issue_ref)
+      self.services.issue.CreateIssueComment(
+          self.mc.cnxn, issue, self.mc.auth.user_id, content)
+
+      # Add comment to the newly created issue.
+      # Add project amendment only if the project changed.
+      amendments = []
+      if issue.project_id != copied_issue.project_id:
+        amendments.append(
+            tracker_bizobj.MakeProjectAmendment(target_project.project_name))
+      new_issue_content = 'Copied %s from %s' % (copied_issue_ref, issue_ref)
+      self.services.issue.CreateIssueComment(
+          self.mc.cnxn, copied_issue, self.mc.auth.user_id, new_issue_content,
+          amendments=amendments)
+
+      tracker_fulltext.IndexIssues(
+          self.mc.cnxn, [copied_issue], self.services.user, self.services.issue,
+          self.services.config)
+
+    return copied_issue
+
+  def _MergeLinkedAccounts(self, me_user_id):
+    """Return a list of the given user ID and any linked accounts."""
+    if not me_user_id:
+      return []
+
+    result = [me_user_id]
+    me_user = self.services.user.GetUser(self.mc.cnxn, me_user_id)
+    if me_user:
+      if me_user.linked_parent_id:
+        result.append(me_user.linked_parent_id)
+      result.extend(me_user.linked_child_ids)
+    return result
+
+  def SearchIssues(
+      self, query_string, query_project_names, me_user_id, items_per_page,
+      paginate_start, sort_spec):
+    # type: (str, Sequence[str], int, int, int, str) -> ListResult
+    """Search for issues in the given projects."""
+    # View permissions and project existence check.
+    _projects = self.GetProjectsByName(query_project_names)
+    # TODO(crbug.com/monorail/6988): Delete ListIssues when endpoints and v1
+    # are deprecated. Move pipeline call to SearchIssues.
+    # TODO(crbug.com/monorail/7678): Remove can. Pass project_ids
+    # into pipeline call instead of project_names into SearchIssues call.
+    # project_names with project_ids.
+    use_cached_searches = not settings.local_mode
+    pipeline = self.ListIssues(
+        query_string, query_project_names, me_user_id, items_per_page,
+        paginate_start, 1, '', sort_spec, use_cached_searches)
+
+    end = paginate_start + items_per_page
+    next_start = None
+    if end < pipeline.total_count:
+      next_start = end
+    return ListResult(pipeline.visible_results, next_start)
+
+  def ListIssues(
+      self,
+      query_string,  # type: str
+      query_project_names,  # type: Sequence[str]
+      me_user_id,  # type: int
+      items_per_page,  # type: int
+      paginate_start,  # type: int
+      can,  # type: int
+      group_by_spec,  # type: str
+      sort_spec,  # type: str
+      use_cached_searches,  # type: bool
+      project=None  # type: proto.Project
+  ):
+    # type: (...) -> search.frontendsearchpipeline.FrontendSearchPipeline
+    """Do an issue search w/ mc + passed in args to return a pipeline object.
+
+    Args:
+      query_string: str with the query the user is searching for.
+      query_project_names: List of project names to query for.
+      me_user_id: Relevant user id. Usually the logged in user.
+      items_per_page: Max number of issues to include in the results.
+      paginate_start: Offset of issues to skip for pagination.
+      can: id of canned query to use.
+      group_by_spec: str used to specify how issues should be grouped.
+      sort_spec: str used to specify how issues should be sorted.
+      use_cached_searches: Whether to use the cache or not.
+      project: Project object for the current project the user is viewing.
+
+    Returns:
+      A FrontendSearchPipeline instance with data on issues found.
+    """
+    # Permission to view a project is checked in FrontendSearchPipeline().
+    # Individual results are filtered by permissions in SearchForIIDs().
+
+    with self.mc.profiler.Phase('searching issues'):
+      me_user_ids = self._MergeLinkedAccounts(me_user_id)
+      pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+          self.mc.cnxn,
+          self.services,
+          self.mc.auth,
+          me_user_ids,
+          query_string,
+          query_project_names,
+          items_per_page,
+          paginate_start,
+          can,
+          group_by_spec,
+          sort_spec,
+          self.mc.warnings,
+          self.mc.errors,
+          use_cached_searches,
+          self.mc.profiler,
+          project=project)
+      if not self.mc.errors.AnyErrors():
+        pipeline.SearchForIIDs()
+        pipeline.MergeAndSortIssues()
+        pipeline.Paginate()
+      # TODO(jojwang): raise InvalidQueryException.
+      return pipeline
+
+  # TODO(jrobbins): This method also requires self.mc to be a MonorailRequest.
+  def FindIssuePositionInSearch(self, issue):
+    """Do an issue search and return flipper info for the given issue.
+
+    Args:
+      issue: issue that the user is currently viewing.
+
+    Returns:
+      A 4-tuple of flipper info: (prev_iid, cur_index, next_iid, total_count).
+    """
+    # Permission to view a project is checked in FrontendSearchPipeline().
+    # Individual results are filtered by permissions in SearchForIIDs().
+
+    with self.mc.profiler.Phase('finding issue position in search'):
+      me_user_ids = self._MergeLinkedAccounts(self.mc.me_user_id)
+      pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+          self.mc.cnxn,
+          self.services,
+          self.mc.auth,
+          me_user_ids,
+          self.mc.query,
+          self.mc.query_project_names,
+          self.mc.num,
+          self.mc.start,
+          self.mc.can,
+          self.mc.group_by_spec,
+          self.mc.sort_spec,
+          self.mc.warnings,
+          self.mc.errors,
+          self.mc.use_cached_searches,
+          self.mc.profiler,
+          project=self.mc.project)
+      if not self.mc.errors.AnyErrors():
+        # Only do the search if the user's query parsed OK.
+        pipeline.SearchForIIDs()
+
+      # Note: we never call MergeAndSortIssues() because we don't need a unified
+      # sorted list, we only need to know the position on such a list of the
+      # current issue.
+      prev_iid, cur_index, next_iid = pipeline.DetermineIssuePosition(issue)
+
+      return prev_iid, cur_index, next_iid, pipeline.total_count
+
+  # TODO(crbug/monorail/6988): add boolean to ignore_private_issues
+  def GetIssuesDict(self, issue_ids, use_cache=True,
+                    allow_viewing_deleted=False):
+    # type: (Collection[int], Optional[Boolean], Optional[Boolean]) ->
+    #     Mapping[int, Issue]
+    """Return a dict {iid: issue} with the specified issues, if allowed.
+
+    Args:
+      issue_ids: int global issue IDs.
+      use_cache: set to false to ensure fresh issues.
+      allow_viewing_deleted: set to true to allow user to view deleted issues.
+
+    Returns:
+      A dict {issue_id: issue} for only those issues that the user is allowed
+      to view.
+
+    Raises:
+      NoSuchIssueException if an issue is not found.
+      PermissionException if the user cannot view all issues.
+    """
+    with self.mc.profiler.Phase('getting issues %r' % issue_ids):
+      issues_by_id, missing_ids = self.services.issue.GetIssuesDict(
+          self.mc.cnxn, issue_ids, use_cache=use_cache)
+
+    if missing_ids:
+      with exceptions.ErrorAggregator(
+          exceptions.NoSuchIssueException) as missing_err_agg:
+        for missing_id in missing_ids:
+          missing_err_agg.AddErrorMessage('No such issue: %s' % missing_id)
+
+    with exceptions.ErrorAggregator(
+        permissions.PermissionException) as permission_err_agg:
+      for issue in issues_by_id.values():
+        try:
+          self._AssertUserCanViewIssue(
+              issue, allow_viewing_deleted=allow_viewing_deleted)
+        except permissions.PermissionException as e:
+          permission_err_agg.AddErrorMessage(e.message)
+
+    return issues_by_id
+
+  def GetIssue(self, issue_id, use_cache=True, allow_viewing_deleted=False):
+    """Return the specified issue.
+
+    Args:
+      issue_id: int global issue ID.
+      use_cache: set to false to ensure fresh issue.
+      allow_viewing_deleted: set to true to allow user to view a deleted issue.
+
+    Returns:
+      The requested Issue PB.
+    """
+    if issue_id is None:
+      raise exceptions.InputException('No issue issue_id specified')
+
+    with self.mc.profiler.Phase('getting issue %r' % issue_id):
+      issue = self.services.issue.GetIssue(
+          self.mc.cnxn, issue_id, use_cache=use_cache)
+
+    self._AssertUserCanViewIssue(
+        issue, allow_viewing_deleted=allow_viewing_deleted)
+    return issue
+
+  def ListReferencedIssues(self, ref_tuples, default_project_name):
+    """Return the specified issues."""
+    # Make sure ref_tuples are unique, preserving order.
+    ref_tuples = list(collections.OrderedDict(
+        list(zip(ref_tuples, ref_tuples))))
+    ref_projects = self.services.project.GetProjectsByName(
+        self.mc.cnxn,
+        [(ref_pn or default_project_name) for ref_pn, _ in ref_tuples])
+    issue_ids, _misses = self.services.issue.ResolveIssueRefs(
+        self.mc.cnxn, ref_projects, default_project_name, ref_tuples)
+    open_issues, closed_issues = (
+        tracker_helpers.GetAllowedOpenedAndClosedIssues(
+            self.mc, issue_ids, self.services))
+    return open_issues, closed_issues
+
+  def GetIssueByLocalID(
+      self, project_id, local_id, use_cache=True,
+      allow_viewing_deleted=False):
+    """Return the specified issue, TODO: iff the signed in user may view it.
+
+    Args:
+      project_id: int project ID of the project that contains the issue.
+      local_id: int issue local id number.
+      use_cache: set to False when doing read-modify-write operations.
+      allow_viewing_deleted: set to True to return a deleted issue so that
+          an authorized user may undelete it.
+
+    Returns:
+      The specified Issue PB.
+
+    Raises:
+      exceptions.InputException: Something was not specified properly.
+      exceptions.NoSuchIssueException: The issue does not exist.
+    """
+    if project_id is None:
+      raise exceptions.InputException('No project specified')
+    if local_id is None:
+      raise exceptions.InputException('No issue local_id specified')
+
+    with self.mc.profiler.Phase('getting issue %r:%r' % (project_id, local_id)):
+      issue = self.services.issue.GetIssueByLocalID(
+          self.mc.cnxn, project_id, local_id, use_cache=use_cache)
+
+    self._AssertUserCanViewIssue(
+        issue, allow_viewing_deleted=allow_viewing_deleted)
+    return issue
+
+  def GetRelatedIssueRefs(self, issues):
+    """Return a dict {iid: (project_name, local_id)} for all related issues."""
+    related_iids = set()
+    with self.mc.profiler.Phase('getting related issue refs'):
+      for issue in issues:
+        related_iids.update(issue.blocked_on_iids)
+        related_iids.update(issue.blocking_iids)
+        if issue.merged_into:
+          related_iids.add(issue.merged_into)
+      logging.info('related_iids is %r', related_iids)
+      return self.services.issue.LookupIssueRefs(self.mc.cnxn, related_iids)
+
+  def GetIssueRefs(self, issue_ids):
+    """Return a dict {iid: (project_name, local_id)} for all issue_ids."""
+    return self.services.issue.LookupIssueRefs(self.mc.cnxn, issue_ids)
+
+  def BulkUpdateIssueApprovals(self, issue_ids, approval_id, project,
+                               approval_delta, comment_content,
+                               send_email):
+    """Update all given issues' specified approval."""
+    # Anon users and users with no permission to view the project
+    # will get permission denied. Missing permissions to update
+    # individual issues will not throw exceptions. Issues will just not be
+    # updated.
+    if not self.mc.auth.user_id:
+      raise permissions.PermissionException('Anon cannot make changes')
+    if not self._UserCanViewProject(project):
+      raise permissions.PermissionException('User cannot view project')
+    updated_issue_ids = []
+    for issue_id in issue_ids:
+      try:
+        self.UpdateIssueApproval(
+            issue_id, approval_id, approval_delta, comment_content, False,
+            send_email=False)
+        updated_issue_ids.append(issue_id)
+      except exceptions.NoSuchIssueApprovalException as e:
+        logging.info('Skipping issue %s, no approval: %s', issue_id, e)
+      except permissions.PermissionException as e:
+        logging.info('Skipping issue %s, update not allowed: %s', issue_id, e)
+    # TODO(crbug/monorail/8122): send bulk approval update email if send_email.
+    if send_email:
+      pass
+    return updated_issue_ids
+
+  def BulkUpdateIssueApprovalsV3(
+      self, delta_specifications, comment_content, send_email):
+    # type: (Sequence[Tuple[int, int, tracker_pb2.ApprovalDelta]]], str,
+    #     Boolean -> Sequence[proto.tracker_pb2.ApprovalValue]
+    """Executes the ApprovalDeltas.
+
+    Args:
+      delta_specifications: List of (issue_id, approval_id, ApprovalDelta).
+      comment_content: The content of the comment to be posted with each delta.
+      send_email: Whether to send an email on each change.
+          TODO(crbug/monorail/8122): send bulk approval update email instead.
+
+    Returns:
+      A list of (Issue, ApprovalValue) pairs corresponding to each
+      specification provided in `delta_specifications`.
+
+    Raises:
+      InputException: If a comment is too long.
+      NoSuchIssueApprovalException: If any of the approvals specified
+          does not exist.
+      PermissionException: If the current user lacks permissions to execute
+          any of the deltas provided.
+    """
+    updated_approval_values = []
+    for (issue_id, approval_id, approval_delta) in delta_specifications:
+      updated_av, _comment, issue = self.UpdateIssueApproval(
+          issue_id,
+          approval_id,
+          approval_delta,
+          comment_content,
+          False,
+          send_email=send_email,
+          update_perms=True)
+      updated_approval_values.append((issue, updated_av))
+    return updated_approval_values
+
+  def UpdateIssueApproval(
+      self,
+      issue_id,
+      approval_id,
+      approval_delta,
+      comment_content,
+      is_description,
+      attachments=None,
+      send_email=True,
+      kept_attachments=None,
+      update_perms=False):
+    # type: (int, int, proto.tracker_pb2.ApprovalDelta, str, Boolean,
+    #     Optional[Sequence[proto.tracker_pb2.Attachment]], Optional[Boolean],
+    #     Optional[Sequence[int]], Optional[Boolean]) ->
+    #     (proto.tracker_pb2.ApprovalValue, proto.tracker_pb2.IssueComment)
+    """Update an issue's approval.
+
+    Raises:
+      InputException: The comment content is too long or additional approvers do
+      not exist.
+      PermissionException: The user is lacking one of the permissions needed
+      for the given delta.
+      NoSuchIssueApprovalException: The issue/approval combo does not exist.
+    """
+
+    issue, approval_value = self.services.issue.GetIssueApproval(
+        self.mc.cnxn, issue_id, approval_id, use_cache=False)
+
+    self._AssertPermInIssue(issue, permissions.EDIT_ISSUE)
+
+    if len(comment_content) > tracker_constants.MAX_COMMENT_CHARS:
+      raise exceptions.InputException('Comment is too long')
+
+    project = self.GetProject(issue.project_id)
+    config = self.GetProjectConfig(issue.project_id)
+    # TODO(crbug/monorail/7614): Remove the need for this hack to update perms.
+    if update_perms:
+      self.mc.LookupLoggedInUserPerms(project)
+
+    if attachments:
+      with self.mc.profiler.Phase('Accounting for quota'):
+        new_bytes_used = tracker_helpers.ComputeNewQuotaBytesUsed(
+          project, attachments)
+        self.services.project.UpdateProject(
+          self.mc.cnxn, issue.project_id, attachment_bytes_used=new_bytes_used)
+
+    if kept_attachments:
+      with self.mc.profiler.Phase('Filtering kept attachments'):
+        kept_attachments = tracker_helpers.FilterKeptAttachments(
+            is_description, kept_attachments, self.ListIssueComments(issue),
+            approval_id)
+
+    if approval_delta.status:
+      if not permissions.CanUpdateApprovalStatus(
+          self.mc.auth.effective_ids, self.mc.perms, project,
+          approval_value.approver_ids, approval_delta.status):
+        raise permissions.PermissionException(
+            'User not allowed to make this status update.')
+
+    if approval_delta.approver_ids_remove or approval_delta.approver_ids_add:
+      if not permissions.CanUpdateApprovers(
+          self.mc.auth.effective_ids, self.mc.perms, project,
+          approval_value.approver_ids):
+        raise permissions.PermissionException(
+            'User not allowed to modify approvers of this approval.')
+
+    # Check additional approvers exist.
+    with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+      tracker_helpers.AssertUsersExist(
+          self.mc.cnxn, self.services, approval_delta.approver_ids_add, err_agg)
+
+    with self.mc.profiler.Phase(
+        'updating approval for issue %r, aprpoval %r' % (
+            issue_id, approval_id)):
+      comment_pb = self.services.issue.DeltaUpdateIssueApproval(
+          self.mc.cnxn, self.mc.auth.user_id, config, issue, approval_value,
+          approval_delta, comment_content=comment_content,
+          is_description=is_description, attachments=attachments,
+          kept_attachments=kept_attachments)
+      hostport = framework_helpers.GetHostPort(
+          project_name=project.project_name)
+      send_notifications.PrepareAndSendApprovalChangeNotification(
+          issue_id, approval_id, hostport, comment_pb.id,
+          send_email=send_email)
+
+    return approval_value, comment_pb, issue
+
+  def ConvertIssueApprovalsTemplate(
+      self, config, issue, template_name, comment_content, send_email=True):
+    # type: (proto.tracker_pb2.ProjectIssueConfig, proto.tracker_pb2.Issue,
+    #     str, str, Optional[Boolean] )
+    """Convert an issue's existing approvals structure to match the one of
+       the given template.
+
+    Raises:
+      InputException: The comment content is too long.
+    """
+    self._AssertPermInIssue(issue, permissions.EDIT_ISSUE)
+
+    template = self.services.template.GetTemplateByName(
+        self.mc.cnxn, template_name, issue.project_id)
+    if not template:
+      raise exceptions.NoSuchTemplateException(
+          'Template %s is not found' % template_name)
+
+    if len(comment_content) > tracker_constants.MAX_COMMENT_CHARS:
+      raise exceptions.InputException('Comment is too long')
+
+    with self.mc.profiler.Phase('updating issue %r' % issue):
+      comment_pb = self.services.issue.UpdateIssueStructure(
+          self.mc.cnxn, config, issue, template, self.mc.auth.user_id,
+          comment_content)
+      hostport = framework_helpers.GetHostPort(project_name=issue.project_name)
+      send_notifications.PrepareAndSendIssueChangeNotification(
+          issue.issue_id, hostport, self.mc.auth.user_id,
+          send_email=send_email, comment_id=comment_pb.id)
+
+  def UpdateIssue(
+      self, issue, delta, comment_content, attachments=None, send_email=True,
+      is_description=False, kept_attachments=None, inbound_message=None):
+    # type: (...) => None
+    """Update an issue with a set of changes and add a comment.
+
+    Args:
+      issue: Existing Issue PB for the issue to be modified.
+      delta: IssueDelta object containing all the changes to be made.
+      comment_content: string content of the user's comment.
+      attachments: List [(filename, contents, mimetype),...] of attachments.
+      send_email: set to False to suppress email notifications.
+      is_description: True if this adds a new issue description.
+      kept_attachments: This should be a list of int attachment ids for
+          attachments kept from previous descriptions, if the comment is
+          a change to the issue description.
+      inbound_message: optional string full text of an email that caused
+          this comment to be added.
+
+    Returns:
+      Nothing.
+
+    Raises:
+      InputException: The comment content is too long.
+    """
+    if not self._UserCanUsePermInIssue(issue, permissions.EDIT_ISSUE):
+      # We're editing the issue description. Only users with EditIssue
+      # permission can edit the description.
+      if is_description:
+        raise permissions.PermissionException(
+            'Users lack permission EditIssue in issue')
+      # If we're adding a comment, we must have AddIssueComment permission and
+      # verify it's size.
+      if comment_content:
+        self._AssertPermInIssue(issue, permissions.ADD_ISSUE_COMMENT)
+      # If we're modifying the issue, check that we only modify the fields we're
+      # allowed to edit.
+      if delta != tracker_pb2.IssueDelta():
+        allowed_delta = tracker_pb2.IssueDelta()
+        if self._UserCanUsePermInIssue(issue, permissions.EDIT_ISSUE_STATUS):
+          allowed_delta.status = delta.status
+        if self._UserCanUsePermInIssue(issue, permissions.EDIT_ISSUE_SUMMARY):
+          allowed_delta.summary = delta.summary
+        if self._UserCanUsePermInIssue(issue, permissions.EDIT_ISSUE_OWNER):
+          allowed_delta.owner_id = delta.owner_id
+        if self._UserCanUsePermInIssue(issue, permissions.EDIT_ISSUE_CC):
+          allowed_delta.cc_ids_add = delta.cc_ids_add
+          allowed_delta.cc_ids_remove = delta.cc_ids_remove
+        if delta != allowed_delta:
+          raise permissions.PermissionException(
+              'Users lack permission EditIssue in issue')
+
+    if delta.merged_into:
+      # Reject attempts to merge an issue into an issue we cannot view and edit.
+      merged_into_issue = self.GetIssue(
+          delta.merged_into, use_cache=False, allow_viewing_deleted=True)
+      self._AssertPermInIssue(issue, permissions.EDIT_ISSUE)
+      # Reject attempts to merge an issue into itself.
+      if issue.issue_id == delta.merged_into:
+        raise exceptions.InputException(
+          'Cannot merge an issue into itself.')
+
+    # Reject comments that are too long.
+    if comment_content and len(
+        comment_content) > tracker_constants.MAX_COMMENT_CHARS:
+      raise exceptions.InputException('Comment is too long')
+
+    # Reject attempts to block on issue on itself.
+    if (issue.issue_id in delta.blocked_on_add
+        or issue.issue_id in delta.blocking_add):
+      raise exceptions.InputException(
+        'Cannot block an issue on itself.')
+
+    project = self.GetProject(issue.project_id)
+    config = self.GetProjectConfig(issue.project_id)
+
+    # Reject attempts to edit restricted fields that the user cannot change.
+    field_ids = [fv.field_id for fv in delta.field_vals_add]
+    field_ids.extend([fvr.field_id for fvr in delta.field_vals_remove])
+    field_ids.extend(delta.fields_clear)
+    labels = itertools.chain(delta.labels_add, delta.labels_remove)
+    self._AssertUserCanEditFieldsAndEnumMaskedLabels(
+        project, config, field_ids, labels)
+
+    old_owner_id = tracker_bizobj.GetOwnerId(issue)
+
+    if attachments:
+      with self.mc.profiler.Phase('Accounting for quota'):
+        new_bytes_used = tracker_helpers.ComputeNewQuotaBytesUsed(
+            project, attachments)
+        self.services.project.UpdateProject(
+            self.mc.cnxn, issue.project_id,
+            attachment_bytes_used=new_bytes_used)
+
+    with self.mc.profiler.Phase('Validating the issue change'):
+      # If the owner changed, it must be a project member.
+      if (delta.owner_id is not None and delta.owner_id != issue.owner_id):
+        parsed_owner_valid, msg = tracker_helpers.IsValidIssueOwner(
+          self.mc.cnxn, project, delta.owner_id, self.services)
+        if not parsed_owner_valid:
+          raise exceptions.InputException(msg)
+
+    if kept_attachments:
+      with self.mc.profiler.Phase('Filtering kept attachments'):
+        kept_attachments = tracker_helpers.FilterKeptAttachments(
+            is_description, kept_attachments, self.ListIssueComments(issue),
+            None)
+
+    with self.mc.profiler.Phase('Updating issue %r' % (issue.issue_id)):
+      _amendments, comment_pb = self.services.issue.DeltaUpdateIssue(
+          self.mc.cnxn, self.services, self.mc.auth.user_id, issue.project_id,
+          config, issue, delta, comment=comment_content,
+          attachments=attachments, is_description=is_description,
+          kept_attachments=kept_attachments, inbound_message=inbound_message)
+
+    with self.mc.profiler.Phase('Following up after issue update'):
+      if delta.merged_into:
+        new_starrers = tracker_helpers.GetNewIssueStarrers(
+            self.mc.cnxn, self.services, [issue.issue_id],
+            delta.merged_into)
+        merged_into_project = self.GetProject(merged_into_issue.project_id)
+        tracker_helpers.AddIssueStarrers(
+            self.mc.cnxn, self.services, self.mc,
+            delta.merged_into, merged_into_project, new_starrers)
+        # Load target issue again to get the updated star count.
+        merged_into_issue = self.GetIssue(
+            merged_into_issue.issue_id, use_cache=False)
+        merge_comment_pb = tracker_helpers.MergeCCsAndAddComment(
+            self.services, self.mc, issue, merged_into_issue)
+        # Send notification emails.
+        hostport = framework_helpers.GetHostPort(
+            project_name=merged_into_project.project_name)
+        reporter_id = self.mc.auth.user_id
+        send_notifications.PrepareAndSendIssueChangeNotification(
+            merged_into_issue.issue_id,
+            hostport,
+            reporter_id,
+            send_email=send_email,
+            comment_id=merge_comment_pb.id)
+      self.services.project.UpdateRecentActivity(
+          self.mc.cnxn, issue.project_id)
+
+    with self.mc.profiler.Phase('Generating notifications'):
+      if comment_pb:
+        hostport = framework_helpers.GetHostPort(
+            project_name=project.project_name)
+        reporter_id = self.mc.auth.user_id
+        send_notifications.PrepareAndSendIssueChangeNotification(
+            issue.issue_id, hostport, reporter_id,
+            send_email=send_email, old_owner_id=old_owner_id,
+            comment_id=comment_pb.id)
+        delta_blocked_on_iids = delta.blocked_on_add + delta.blocked_on_remove
+        send_notifications.PrepareAndSendIssueBlockingNotification(
+            issue.issue_id, hostport, delta_blocked_on_iids,
+            reporter_id, send_email=send_email)
+
+  def ModifyIssues(
+      self,
+      issue_id_delta_pairs,
+      attachment_uploads=None,
+      comment_content=None,
+      send_email=True):
+    # type: (Sequence[Tuple[int, IssueDelta]], Boolean, Optional[str],
+    #     Optional[bool]) -> Sequence[Issue]
+    """Modify issues by the given deltas and returns all issues post-update.
+
+    Note: Issues with NOOP deltas and no comment_content to add will not be
+        updated and will not be returned.
+
+    Args:
+      issue_id_delta_pairs: List of Tuples containing IDs and IssueDeltas, one
+        for each issue to modify.
+      attachment_uploads: List of AttachmentUpload tuples to be attached to the
+        new comments created for all modified issues in issue_id_delta_pairs.
+      comment_content: The text for the comment this issue change will use.
+      send_email: Whether this change sends an email or not.
+
+    Returns:
+      List of modified issues.
+    """
+
+    main_issue_ids = {issue_id for issue_id, _delta in issue_id_delta_pairs}
+    issues_by_id = self.GetIssuesDict(main_issue_ids, use_cache=False)
+    issue_delta_pairs = [
+        (issues_by_id[issue_id], delta)
+        for (issue_id, delta) in issue_id_delta_pairs
+    ]
+
+    # PHASE 1: Prepare these changes and assert they can be made.
+    self._AssertUserCanModifyIssues(
+        issue_delta_pairs, False, comment_content=comment_content)
+    new_bytes_by_pid = tracker_helpers.PrepareIssueChanges(
+        self.mc.cnxn,
+        issue_delta_pairs,
+        self.services,
+        attachment_uploads=attachment_uploads,
+        comment_content=comment_content)
+    # TODO(crbug.com/monorail/8074): Assert we do not update more than 100
+    # issues at once.
+
+    # PHASE 2: Organize data. tracker_helpers.GroupUniqueDeltaIssues()
+    (_unique_deltas, issues_for_unique_deltas
+    ) = tracker_helpers.GroupUniqueDeltaIssues(issue_delta_pairs)
+
+    # PHASE 3-4: Modify issues in RAM.
+    changes = tracker_helpers.ApplyAllIssueChanges(
+        self.mc.cnxn, issue_delta_pairs, self.services)
+
+    # PHASE 5: Apply filter rules.
+    inflight_issues = changes.issues_to_update_dict.values()
+    project_ids = list(
+        {issue.project_id for issue in inflight_issues})
+    configs_by_id = self.services.config.GetProjectConfigs(
+        self.mc.cnxn, project_ids)
+    with exceptions.ErrorAggregator(exceptions.FilterRuleException) as err_agg:
+      for issue in inflight_issues:
+        config = configs_by_id[issue.project_id]
+
+        # Update closed timestamp before filter rules because filter rules
+        # may affect them.
+        old_effective_status = changes.old_statuses_by_iid.get(issue.issue_id)
+        # The old status might be None because the IssueDeltas did not contain
+        # a status change and MeansOpenInProject treats None as "Open".
+        if old_effective_status:
+          tracker_helpers.UpdateClosedTimestamp(
+              config, issue, old_effective_status)
+
+        filterrules_helpers.ApplyFilterRules(
+              self.mc.cnxn, self.services, issue, config)
+        if issue.derived_errors:
+          err_agg.AddErrorMessage('/n'.join(issue.derived_errors))
+
+        # Update closed timestamp after filter rules because filter rules
+        # could change effective status.
+        # The old status might be None because the IssueDeltas did not contain
+        # a status change and MeansOpenInProject treats None as "Open".
+        if old_effective_status:
+          tracker_helpers.UpdateClosedTimestamp(
+              config, issue, old_effective_status)
+
+    # PHASE 6: Update modified timestamps for issues in RAM.
+    all_involved_iids = main_issue_ids.union(
+        changes.issues_to_update_dict.keys())
+
+    now_timestamp = int(time.time())
+    # Add modified timestamps for issues with amendments.
+    for iid in all_involved_iids:
+      issue = changes.issues_to_update_dict.get(iid, issues_by_id.get(iid))
+      issue_modified = iid in changes.issues_to_update_dict
+
+      if not (issue_modified or comment_content or attachment_uploads):
+        # Skip issues that have neither amendments or comment changes.
+        continue
+
+      old_owner = changes.old_owners_by_iid.get(issue.issue_id)
+      old_status = changes.old_statuses_by_iid.get(issue.issue_id)
+      old_components = changes.old_components_by_iid.get(issue.issue_id)
+
+      # Adding this issue to issues_to_update, so its modified_timestamp gets
+      # updated in PHASE 7's UpdateIssues() call. Issues with NOOP changes
+      # but still need a new comment added for `comment_content` or
+      # `attachments` are added back here.
+      changes.issues_to_update_dict[issue.issue_id] = issue
+
+      issue.modified_timestamp = now_timestamp
+
+      if (iid in changes.old_owners_by_iid and
+          old_owner != tracker_bizobj.GetOwnerId(issue)):
+        issue.owner_modified_timestamp = now_timestamp
+
+      if (iid in changes.old_statuses_by_iid and
+          old_status != tracker_bizobj.GetStatus(issue)):
+        issue.status_modified_timestamp = now_timestamp
+
+      if (iid in changes.old_components_by_iid and
+          set(old_components) != set(issue.component_ids)):
+        issue.component_modified_timestamp = now_timestamp
+
+    # PHASE 7: Apply changes to DB: update issues, combine starrers
+    # for merged issues, create issue comments, enqueue issues for
+    # re-indexing.
+    if changes.issues_to_update_dict:
+      self.services.issue.UpdateIssues(
+          self.mc.cnxn, changes.issues_to_update_dict.values(), commit=False)
+    comments_by_iid = {}
+    impacted_comments_by_iid = {}
+
+    # changes.issues_to_update includes all main issues or impacted
+    # issues with updated fields and main issues that had noop changes
+    # but still need a comment created for `comment_content` or `attachments`.
+    for iid, issue in changes.issues_to_update_dict.items():
+      # Update starrers for merged issues.
+      new_starrers = changes.new_starrers_by_iid.get(iid)
+      if new_starrers:
+        self.services.issue_star.SetStarsBatch_SkipIssueUpdate(
+            self.mc.cnxn, iid, new_starrers, True, commit=False)
+
+      # Create new issue comment for main issue changes.
+      amendments = changes.amendments_by_iid.get(iid)
+      if (amendments or comment_content or
+          attachment_uploads) and iid in main_issue_ids:
+        comments_by_iid[iid] = self.services.issue.CreateIssueComment(
+            self.mc.cnxn,
+            issue,
+            self.mc.auth.user_id,
+            comment_content,
+            amendments=amendments,
+            attachments=attachment_uploads,
+            commit=False)
+
+      # Create new issue comment for impacted issue changes.
+      # ie: when an issue is marked as blockedOn another or similar.
+      imp_amendments = changes.imp_amendments_by_iid.get(iid)
+      if imp_amendments:
+        filtered_imp_amendments = []
+        content = ''
+        # Represent MERGEDINTO Amendments for impacted issues with
+        # comment content instead to be consistent with previous behavior
+        # and so users can tell whether a merged change comment on an issue
+        # is a change in the issue's merged_into or a change in another
+        # issue's merged_into.
+        for am in imp_amendments:
+          if am.field is tracker_pb2.FieldID.MERGEDINTO and am.newvalue:
+            for value in am.newvalue.split():
+              if value.startswith('-'):
+                content += UNMERGE_COMMENT % value.strip('-')
+              else:
+                content += MERGE_COMMENT % value
+          else:
+            filtered_imp_amendments.append(am)
+
+        impacted_comments_by_iid[iid] = self.services.issue.CreateIssueComment(
+            self.mc.cnxn,
+            issue,
+            self.mc.auth.user_id,
+            content,
+            amendments=filtered_imp_amendments,
+            commit=False)
+
+    # Update used bytes for each impacted project.
+    for pid, new_bytes_used in new_bytes_by_pid.items():
+      self.services.project.UpdateProject(
+          self.mc.cnxn, pid, attachment_bytes_used=new_bytes_used, commit=False)
+
+    # Reindex issues and commit all DB changes.
+    issues_to_reindex = set(
+        comments_by_iid.keys() + impacted_comments_by_iid.keys())
+    if issues_to_reindex:
+      self.services.issue.EnqueueIssuesForIndexing(
+          self.mc.cnxn, issues_to_reindex, commit=False)
+      # We only commit if there are issues to reindex. No issues to reindex
+      # means there were no updates that need a commit.
+      self.mc.cnxn.Commit()
+
+    # PHASE 8: Send notifications for each group of issues from Phase 2.
+    # Fetch hostports.
+    hostports_by_pid = {}
+    for iid, issue in changes.issues_to_update_dict.items():
+      # Note: issues_to_update only include issues with changes in metadata.
+      # If iid is not in issues_to_update, the issue may still have a new
+      # comment that we want to send notifications for.
+      issue = changes.issues_to_update_dict.get(iid, issues_by_id.get(iid))
+
+      if issue.project_id not in hostports_by_pid:
+        hostports_by_pid[issue.project_id] = framework_helpers.GetHostPort(
+            project_name=issue.project_name)
+    # Send emails for main changes in issues by unique delta.
+    for issues in issues_for_unique_deltas:
+      # Group issues for each unique delta by project because
+      # SendIssueBulkChangeNotification cannot handle cross-project
+      # notifications and hostports are specific to each project.
+      issues_by_pid = collections.defaultdict(set)
+      for issue in issues:
+        issues_by_pid[issue.project_id].add(issue)
+      for project_issues in issues_by_pid.values():
+        # Send one email to involved users for the issue.
+        if len(project_issues) == 1:
+          (project_issue,) = project_issues
+          self._ModifyIssuesNotifyForDelta(
+              project_issue, changes, comments_by_iid, hostports_by_pid,
+              send_email)
+        # Send one bulk email for users involved in all updated issues.
+        else:
+          self._ModifyIssuesBulkNotifyForDelta(
+              project_issues,
+              changes,
+              hostports_by_pid,
+              send_email,
+              comment_content=comment_content)
+
+    # Send emails for changes to impacted issues.
+    for issue_id, comment_pb in impacted_comments_by_iid.items():
+      issue = changes.issues_to_update_dict[issue_id]
+      hostport = hostports_by_pid[issue.project_id]
+      # We do not need to track old owners because the only owner change
+      # that could have happened for impacted issues' changes is a change from
+      # no owner to a derived owner.
+      send_notifications.PrepareAndSendIssueChangeNotification(
+          issue_id, hostport, self.mc.auth.user_id, comment_id=comment_pb.id,
+          send_email=send_email)
+
+    return [
+        issues_by_id[iid] for iid in main_issue_ids if iid in comments_by_iid
+    ]
+
+  def _ModifyIssuesNotifyForDelta(
+      self, issue, changes, comments_by_iid, hostports_by_pid, send_email):
+    # type: (Issue, tracker_helpers._IssueChangesTuple,
+    #     Mapping[int, IssueComment], Mapping[int, str], bool) -> None
+    comment_pb = comments_by_iid.get(issue.issue_id)
+    # Existence of a comment_pb means there were updates to the issue or
+    # comment_content added to the issue that should trigger
+    # notifications.
+    if comment_pb:
+      hostport = hostports_by_pid[issue.project_id]
+      old_owner_id = changes.old_owners_by_iid.get(issue.issue_id)
+      send_notifications.PrepareAndSendIssueChangeNotification(
+          issue.issue_id,
+          hostport,
+          self.mc.auth.user_id,
+          old_owner_id=old_owner_id,
+          comment_id=comment_pb.id,
+          send_email=send_email)
+
+  def _ModifyIssuesBulkNotifyForDelta(
+      self, issues, changes, hostports_by_pid, send_email,
+      comment_content=None):
+    # type: (Collection[Issue], _IssueChangesTuple, Mapping[int, str], bool,
+    #     Optional[str]) -> None
+    iids = {issue.issue_id for issue in issues}
+    old_owner_ids = [
+        changes.old_owners_by_iid.get(iid)
+        for iid in iids
+        if changes.old_owners_by_iid.get(iid)
+    ]
+    amendments = []
+    for iid in iids:
+      ams = changes.amendments_by_iid.get(iid, [])
+      amendments.extend(ams)
+    # Calling SendBulkChangeNotification does not require the comment_pb
+    # objects only the amendments. Checking for existence of amendments
+    # and comment_content is equivalent to checking for existence of new
+    # comments created for these issues.
+    if amendments or comment_content:
+      # TODO(crbug.com/monorail/8125): Stop using UserViews for bulk
+      # notifications.
+      users_by_id = framework_views.MakeAllUserViews(
+          self.mc.cnxn, self.services.user, old_owner_ids,
+          tracker_bizobj.UsersInvolvedInAmendments(amendments))
+      hostport = hostports_by_pid[issues.pop().project_id]
+      send_notifications.SendIssueBulkChangeNotification(
+          iids, hostport, old_owner_ids, comment_content,
+          self.mc.auth.user_id, amendments, send_email, users_by_id)
+
+  def DeleteIssue(self, issue, delete):
+    """Mark or unmark the given issue as deleted."""
+    self._AssertPermInIssue(issue, permissions.DELETE_ISSUE)
+
+    with self.mc.profiler.Phase('Marking issue %r deleted' % (issue.issue_id)):
+      self.services.issue.SoftDeleteIssue(
+          self.mc.cnxn, issue.project_id, issue.local_id, delete,
+          self.services.user)
+
+  def FlagIssues(self, issues, flag):
+    """Flag or unflag the given issues as spam."""
+    for issue in issues:
+      self._AssertPermInIssue(issue, permissions.FLAG_SPAM)
+
+    issue_ids = [issue.issue_id for issue in issues]
+    with self.mc.profiler.Phase('Marking issues %r as spam' % issue_ids):
+      self.services.spam.FlagIssues(
+          self.mc.cnxn, self.services.issue, issues, self.mc.auth.user_id,
+          flag)
+      if self._UserCanUsePermInIssue(issue, permissions.VERDICT_SPAM):
+        self.services.spam.RecordManualIssueVerdicts(
+            self.mc.cnxn, self.services.issue, issues, self.mc.auth.user_id,
+            flag)
+
+  def LookupIssuesFlaggers(self, issues):
+    """Returns users who've reported the issue or its comments as spam.
+
+    Args:
+      issues: the list of issues to query.
+    Returns:
+      A dictionary
+        {issue_id: ([issue_reporters], {comment_id: [comment_reporters]})}
+      For each issue id, a tuple with the users who have flagged the issue;
+      and a dictionary of users who have flagged a comment for each comment id.
+    """
+    for issue in issues:
+      self._AssertUserCanViewIssue(issue)
+
+    issue_ids = [issue.issue_id for issue in issues]
+    with self.mc.profiler.Phase('Looking up flaggers for %s' % issue_ids):
+      reporters = self.services.spam.LookupIssuesFlaggers(
+          self.mc.cnxn, issue_ids)
+
+    return reporters
+
+  def LookupIssueFlaggers(self, issue):
+    """Returns users who've reported the issue or its comments as spam.
+
+    Args:
+      issue: the issue to query.
+    Returns:
+      A tuple
+        ([issue_reporters], {comment_id: [comment_reporters]})
+      With the users who have flagged the issue; and a dictionary of users who
+      have flagged a comment for each comment id.
+    """
+    return self.LookupIssuesFlaggers([issue])[issue.issue_id]
+
+  def GetIssuePositionInHotlist(
+      self, current_issue, hotlist, can, sort_spec, group_by_spec):
+    # type: (Issue, Hotlist, int, str, str) -> (int, int, int, int)
+    """Get index info of an issue within a hotlist.
+
+    Args:
+      current_issue: the currently viewed issue.
+      hotlist: the hotlist this flipper is flipping through.
+      can: int "canned query" number to scope the visible issues.
+      sort_spec: string that lists the sort order.
+      group_by_spec: string that lists the grouping order.
+    """
+    issues_list = self.services.issue.GetIssues(self.mc.cnxn,
+        [item.issue_id for item in hotlist.items])
+    project_ids = hotlist_helpers.GetAllProjectsOfIssues(issues_list)
+    config_list = hotlist_helpers.GetAllConfigsOfProjects(
+        self.mc.cnxn, project_ids, self.services)
+    harmonized_config = tracker_bizobj.HarmonizeConfigs(config_list)
+    (sorted_issues, _hotlist_issues_context,
+     _users) = hotlist_helpers.GetSortedHotlistIssues(
+         self.mc.cnxn, hotlist.items, issues_list, self.mc.auth,
+         can, sort_spec, group_by_spec, harmonized_config, self.services,
+         self.mc.profiler)
+    (prev_iid, cur_index,
+     next_iid) = features_bizobj.DetermineHotlistIssuePosition(
+         current_issue, [issue.issue_id for issue in sorted_issues])
+    total_count = len(sorted_issues)
+    return prev_iid, cur_index, next_iid, total_count
+
+  def RerankBlockedOnIssues(self, issue, moved_id, target_id, split_above):
+    """Rerank the blocked on issues for issue_id.
+
+    Args:
+      issue: The issue to modify.
+      moved_id: The id of the issue to move.
+      target_id: The id of the issue to move |moved_issue| to.
+      split_above: Whether to move |moved_issue| before or after |target_issue|.
+    """
+    # Make sure the user has permission to edit the issue.
+    self._AssertPermInIssue(issue, permissions.EDIT_ISSUE)
+    # Make sure the moved and target issues are in the blocked-on list.
+    if moved_id not in issue.blocked_on_iids:
+      raise exceptions.InputException(
+          'The issue to move is not in the blocked-on list.')
+    if target_id not in issue.blocked_on_iids:
+      raise exceptions.InputException(
+          'The target issue is not in the blocked-on list.')
+
+    phase_name = 'Moving issue %r %s issue %d.' % (
+        moved_id, 'above' if split_above else 'below', target_id)
+    with self.mc.profiler.Phase(phase_name):
+      lower, higher = tracker_bizobj.SplitBlockedOnRanks(
+          issue, target_id, split_above,
+          [iid for iid in issue.blocked_on_iids if iid != moved_id])
+      rank_changes = rerank_helpers.GetInsertRankings(
+          lower, higher, [moved_id])
+      if rank_changes:
+        self.services.issue.ApplyIssueRerank(
+            self.mc.cnxn, issue.issue_id, rank_changes)
+
+  # FUTURE: GetIssuePermissionsForUser()
+
+  # FUTURE: CreateComment()
+
+
+  # TODO(crbug.com/monorail/7520): Delete when usages removed.
+  def ListIssueComments(self, issue):
+    """Return comments on the specified viewable issue."""
+    self._AssertUserCanViewIssue(issue)
+
+    with self.mc.profiler.Phase('getting comments for %r' % issue.issue_id):
+      comments = self.services.issue.GetCommentsForIssue(
+          self.mc.cnxn, issue.issue_id)
+
+    return comments
+
+
+  def SafeListIssueComments(
+      self, issue_id, max_items, start, approval_id=None):
+    # type: (tracker_pb2.Issue, int, int, Optional[int]) -> ListResult
+    """Return comments on the issue, filtering non-viewable content.
+
+    TODO(crbug.com/monorail/7520): Rename to ListIssueComments.
+
+    Note: This returns `deleted_by`, but it should only be used for the purposes
+    of determining whether the comment is deleted. The viewer may not have
+    access to view who deleted the comment.
+
+    Args:
+      issue_id: The issue for which we're listing comments.
+      max_items: The maximum number of comments to return.
+      start: The index of the start position in the list of comments.
+      approval_id: Whether to only return comments on this approval.
+
+    Returns:
+      A work_env.ListResult namedtuple with the comments for the issue.
+
+    Raises:
+      PermissionException: The logged-in user is not allowed to view the issue.
+    """
+    if start < 0:
+      raise exceptions.InputException('Invalid `start`: %d' % start)
+    if max_items < 0:
+      raise exceptions.InputException('Invalid `max_items`: %d' % max_items)
+
+    with self.mc.profiler.Phase('getting comments for %r' % issue_id):
+      issue = self.GetIssue(issue_id)
+      comments = self.services.issue.GetCommentsForIssue(self.mc.cnxn, issue_id)
+      _, comment_reporters = self.LookupIssueFlaggers(issue)
+      users_involved_in_comments = tracker_bizobj.UsersInvolvedInCommentList(
+          comments)
+      users_by_id = framework_views.MakeAllUserViews(
+          self.mc.cnxn, self.services.user, users_involved_in_comments)
+
+    with self.mc.profiler.Phase('getting perms for comments'):
+      project = self.GetProjectByName(issue.project_name)
+      self.mc.LookupLoggedInUserPerms(project)
+      config = self.GetProjectConfig(project.project_id)
+      perms = permissions.UpdateIssuePermissions(
+          self.mc.perms,
+          project,
+          issue,
+          self.mc.auth.effective_ids,
+          config=config)
+
+    # TODO(crbug.com/monorail/7525): Check values, and return next_start.
+    end = start + max_items
+    filtered_comments = []
+    with self.mc.profiler.Phase('converting comments'):
+      for comment in comments:
+        if approval_id and comment.approval_id != approval_id:
+          continue
+        commenter = users_by_id[comment.user_id]
+
+        _can_flag, is_flagged = permissions.CanFlagComment(
+            comment, commenter, comment_reporters.get(comment.id, []),
+            self.mc.auth.user_id, perms)
+        can_view = permissions.CanViewComment(
+            comment, commenter, self.mc.auth.user_id, perms)
+        can_view_inbound_message = permissions.CanViewInboundMessage(
+            comment, self.mc.auth.user_id, perms)
+
+        # By default, all fields should get filtered out.
+        # i.e. this is an allowlist rather than a denylist to reduce leaking
+        # info.
+        filtered_comment = tracker_pb2.IssueComment(
+            id=comment.id,
+            issue_id=comment.issue_id,
+            project_id=comment.project_id,
+            approval_id=comment.approval_id,
+            timestamp=comment.timestamp,
+            deleted_by=comment.deleted_by,
+            sequence=comment.sequence,
+            is_spam=is_flagged,
+            is_description=comment.is_description,
+            description_num=comment.description_num)
+        if can_view:
+          filtered_comment.content = comment.content
+          filtered_comment.user_id = comment.user_id
+          filtered_comment.amendments.extend(comment.amendments)
+          filtered_comment.attachments.extend(comment.attachments)
+          filtered_comment.importer_id = comment.importer_id
+          if can_view_inbound_message:
+            filtered_comment.inbound_message = comment.inbound_message
+        filtered_comments.append(filtered_comment)
+    next_start = None
+    if end < len(filtered_comments):
+      next_start = end
+    return ListResult(filtered_comments[start:end], next_start)
+
+  # FUTURE: UpdateComment()
+
+  def DeleteComment(self, issue, comment, delete):
+    """Mark or unmark a comment as deleted by the current user."""
+    self._AssertUserCanDeleteComment(issue, comment)
+    if comment.is_spam and self.mc.auth.user_id == comment.user_id:
+      raise permissions.PermissionException('Cannot delete comment.')
+
+    with self.mc.profiler.Phase(
+        'deleting issue %r comment %r' % (issue.issue_id, comment.id)):
+      self.services.issue.SoftDeleteComment(
+          self.mc.cnxn, issue, comment, self.mc.auth.user_id,
+          self.services.user, delete=delete)
+
+  def DeleteAttachment(self, issue, comment, attachment_id, delete):
+    """Mark or unmark a comment attachment as deleted by the current user."""
+    # A user can delete an attachment iff they can delete a comment.
+    self._AssertUserCanDeleteComment(issue, comment)
+
+    phase_message = 'deleting issue %r comment %r attachment %r' % (
+        issue.issue_id, comment.id, attachment_id)
+    with self.mc.profiler.Phase(phase_message):
+      self.services.issue.SoftDeleteAttachment(
+          self.mc.cnxn, issue, comment, attachment_id, self.services.user,
+          delete=delete)
+
+  def FlagComment(self, issue, comment, flag):
+    """Mark or unmark a comment as spam."""
+    self._AssertPermInIssue(issue, permissions.FLAG_SPAM)
+    with self.mc.profiler.Phase(
+        'flagging issue %r comment %r' % (issue.issue_id, comment.id)):
+      self.services.spam.FlagComment(
+          self.mc.cnxn, issue, comment.id, comment.user_id,
+          self.mc.auth.user_id, flag)
+      if self._UserCanUsePermInIssue(issue, permissions.VERDICT_SPAM):
+        self.services.spam.RecordManualCommentVerdict(
+            self.mc.cnxn, self.services.issue, self.services.user, comment.id,
+            self.mc.auth.user_id, flag)
+
+  def StarIssue(self, issue, starred):
+    # type: (Issue, bool) -> Issue
+    """Set or clear a star on the given issue for the signed in user."""
+    if not self.mc.auth.user_id:
+      raise permissions.PermissionException('Anon cannot star issues')
+    self._AssertPermInIssue(issue, permissions.SET_STAR)
+
+    with self.mc.profiler.Phase('starring issue %r' % issue.issue_id):
+      config = self.services.config.GetProjectConfig(
+          self.mc.cnxn, issue.project_id)
+      self.services.issue_star.SetStar(
+          self.mc.cnxn, self.services, config, issue.issue_id,
+          self.mc.auth.user_id, starred)
+    return self.services.issue.GetIssue(self.mc.cnxn, issue.issue_id)
+
+  def IsIssueStarred(self, issue, cnxn=None):
+    """Return True if the given issue is starred by the signed in user."""
+    self._AssertUserCanViewIssue(issue)
+
+    with self.mc.profiler.Phase('checking star %r' % issue.issue_id):
+      return self.services.issue_star.IsItemStarredBy(
+          cnxn or self.mc.cnxn, issue.issue_id, self.mc.auth.user_id)
+
+  def ListStarredIssueIDs(self):
+    """Return a list of the issue IDs that the current issue has starred."""
+    # This returns an unfiltered list of issue_ids.  Permissions will be
+    # applied if and when the caller attempts to load each issue.
+
+    with self.mc.profiler.Phase('getting stars %r' % self.mc.auth.user_id):
+      return self.services.issue_star.LookupStarredItemIDs(
+          self.mc.cnxn, self.mc.auth.user_id)
+
+  def SnapshotCountsQuery(self, project, timestamp, group_by, label_prefix=None,
+                          query=None, canned_query=None, hotlist=None):
+    """Query IssueSnapshots for daily counts.
+
+    See chart_svc.QueryIssueSnapshots for more detail on arguments.
+
+    Args:
+      project (Project): Project to search.
+      timestamp (int): Will query for snapshots at this timestamp.
+      group_by (str): 2nd dimension, see QueryIssueSnapshots for options.
+      label_prefix (str): Required for label queries. Only returns results
+        with the supplied prefix.
+      query (str, optional): If supplied, will parse & apply query conditions.
+      canned_query (str, optional): Parsed canned query.
+      hotlist (Hotlist, optional): Hotlist to search under (in lieu of project).
+
+    Returns:
+      1. A dict of {name: count} for each item in group_by.
+      2. A list of any unsupported query conditions in query.
+    """
+    # This returns counts of viewable issues.
+    with self.mc.profiler.Phase('querying snapshot counts'):
+      return self.services.chart.QueryIssueSnapshots(
+        self.mc.cnxn, self.services, timestamp, self.mc.auth.effective_ids,
+        project, self.mc.perms, group_by=group_by, label_prefix=label_prefix,
+        query=query, canned_query=canned_query, hotlist=hotlist)
+
+  ### User methods
+
+  # TODO(crbug/monorail/7238): rewrite this method to call BatchGetUsers.
+  def GetUser(self, user_id):
+    # type: (int) -> User
+    """Return the user with the given ID."""
+
+    return self.BatchGetUsers([user_id])[0]
+
+  def BatchGetUsers(self, user_ids):
+    # type: (Sequence[int]) -> Sequence[User]
+    """Return all Users for given User IDs.
+
+    Args:
+      user_ids: list of User IDs.
+
+    Returns:
+      A list of User objects in the same order as the given User IDs.
+
+    Raises:
+      NoSuchUserException if a User for a given User ID is not found.
+    """
+    users_by_id = self.services.user.GetUsersByIDs(
+        self.mc.cnxn, user_ids, skip_missed=True)
+    users = []
+    for user_id in user_ids:
+      user = users_by_id.get(user_id)
+      if not user:
+        raise exceptions.NoSuchUserException(
+            'No User with ID %s found' % user_id)
+      users.append(user)
+    return users
+
+  def GetMemberships(self, user_id):
+    """Return the user group ids for the given user visible to the requester."""
+    group_ids = self.services.usergroup.LookupMemberships(self.mc.cnxn, user_id)
+    if user_id == self.mc.auth.user_id:
+      return group_ids
+    (member_ids_by_ids, owner_ids_by_ids
+    ) = self.services.usergroup.LookupAllMembers(
+        self.mc.cnxn, group_ids)
+    settings_by_id = self.services.usergroup.GetAllGroupSettings(
+        self.mc.cnxn, group_ids)
+
+    (owned_project_ids, membered_project_ids,
+     contrib_project_ids) = self.services.project.GetUserRolesInAllProjects(
+         self.mc.cnxn, self.mc.auth.effective_ids)
+    project_ids = owned_project_ids.union(
+        membered_project_ids).union(contrib_project_ids)
+
+    visible_group_ids = []
+    for group_id, group_settings in settings_by_id.items():
+      member_ids = member_ids_by_ids.get(group_id)
+      owner_ids = owner_ids_by_ids.get(group_id)
+      if permissions.CanViewGroupMembers(
+          self.mc.perms, self.mc.auth.effective_ids, group_settings,
+          member_ids, owner_ids, project_ids):
+        visible_group_ids.append(group_id)
+
+    return visible_group_ids
+
+  def ListReferencedUsers(self, emails):
+    """Return a list of the given emails' User PBs, plus linked account ids.
+
+    Args:
+      emails: list of emails of users to look up.
+
+    Returns:
+      A pair (users, linked_users_ids) where users is an unsorted list of
+      User PBs and linked_user_ids is a list of user IDs of any linked accounts.
+    """
+    with self.mc.profiler.Phase('getting existing users'):
+      user_id_dict = self.services.user.LookupExistingUserIDs(
+          self.mc.cnxn, emails)
+      users_by_id = self.services.user.GetUsersByIDs(
+          self.mc.cnxn, list(user_id_dict.values()))
+      user_list = list(users_by_id.values())
+
+      linked_user_ids = []
+      for user in user_list:
+        if user.linked_parent_id:
+          linked_user_ids.append(user.linked_parent_id)
+        linked_user_ids.extend(user.linked_child_ids)
+
+    return user_list, linked_user_ids
+
+  def StarUser(self, user_id, starred):
+    """Star or unstar the specified user.
+
+    Args:
+      user_id: int ID of the user to star/unstar.
+      starred: true to add a star, false to remove it.
+
+    Returns:
+      Nothing.
+
+    Raises:
+      NoSuchUserException: There is no user with that ID.
+    """
+    if not self.mc.auth.user_id:
+      raise exceptions.InputException('No current user specified')
+
+    with self.mc.profiler.Phase('(un)starring user %r' % user_id):
+      # Make sure the user exists and user has permission to see it.
+      self.services.user.LookupUserEmail(self.mc.cnxn, user_id)
+      self.services.user_star.SetStar(
+          self.mc.cnxn, user_id, self.mc.auth.user_id, starred)
+
+  def IsUserStarred(self, user_id):
+    """Return True if the current user has starred the given user.
+
+    Args:
+      user_id: int ID of the user to check.
+
+    Returns:
+      True if starred.
+
+    Raises:
+      NoSuchUserException: There is no user with that ID.
+    """
+    if user_id is None:
+      raise exceptions.InputException('No user specified')
+
+    if not self.mc.auth.user_id:
+      return False
+
+    with self.mc.profiler.Phase('checking user star %r' % user_id):
+      # Make sure the user exists.
+      self.services.user.LookupUserEmail(self.mc.cnxn, user_id)
+      return self.services.user_star.IsItemStarredBy(
+        self.mc.cnxn, user_id, self.mc.auth.user_id)
+
+  def GetUserStarCount(self, user_id):
+    """Return the number of times the user has been starred.
+
+    Args:
+      user_id: int ID of the user to check.
+
+    Returns:
+      The number of times the user has been starred.
+
+    Raises:
+      NoSuchUserException: There is no user with that ID.
+    """
+    if user_id is None:
+      raise exceptions.InputException('No user specified')
+
+    with self.mc.profiler.Phase('counting stars for user %r' % user_id):
+      # Make sure the user exists.
+      self.services.user.LookupUserEmail(self.mc.cnxn, user_id)
+      return self.services.user_star.CountItemStars(self.mc.cnxn, user_id)
+
+  def GetPendingLinkedInvites(self, user_id=None):
+    """Return info about a user's linked account invites."""
+    with self.mc.profiler.Phase('checking linked account invites'):
+      result = self.services.user.GetPendingLinkedInvites(
+          self.mc.cnxn, user_id or self.mc.auth.user_id)
+      return result
+
+  def InviteLinkedParent(self, parent_email):
+    """Invite a matching account to be my parent."""
+    if not parent_email:
+      raise exceptions.InputException('No parent account specified')
+    if not self.mc.auth.user_id:
+      raise permissions.PermissionException('Anon cannot link accounts')
+    with self.mc.profiler.Phase('Validating proposed parent'):
+      # We only offer self-serve account linking to matching usernames.
+      (p_username, p_domain,
+       _obs_username, _obs_email) = framework_bizobj.ParseAndObscureAddress(
+          parent_email)
+      c_view = self.mc.auth.user_view
+      if p_username != c_view.username:
+        logging.info('Username %r != %r', p_username, c_view.username)
+        raise exceptions.InputException('Linked account names must match')
+      allowed_domains = settings.linkable_domains.get(c_view.domain, [])
+      if p_domain not in allowed_domains:
+        logging.info('parent domain %r is not in list for %r: %r',
+                     p_domain, c_view.domain, allowed_domains)
+        raise exceptions.InputException('Linked account unsupported domain')
+      parent_id = self.services.user.LookupUserID(self.mc.cnxn, parent_email)
+    with self.mc.profiler.Phase('Creating linked account invite'):
+      self.services.user.InviteLinkedParent(
+          self.mc.cnxn, parent_id, self.mc.auth.user_id)
+
+  def AcceptLinkedChild(self, child_id):
+    """Accept an invitation from a child account."""
+    with self.mc.profiler.Phase('Accept linked account invite'):
+      self.services.user.AcceptLinkedChild(
+          self.mc.cnxn, self.mc.auth.user_id, child_id)
+
+  def UnlinkAccounts(self, parent_id, child_id):
+    """Delete a linked-account relationship."""
+    if (self.mc.auth.user_id != parent_id and
+        self.mc.auth.user_id != child_id):
+      permitted = self.mc.perms.CanUsePerm(
+        permissions.EDIT_OTHER_USERS, self.mc.auth.effective_ids, None, [])
+      if not permitted:
+        raise permissions.PermissionException(
+          'User lacks permission to unlink accounts')
+
+    with self.mc.profiler.Phase('Unlink accounts'):
+      self.services.user.UnlinkAccounts(self.mc.cnxn, parent_id, child_id)
+
+  def UpdateUserSettings(self, user, **kwargs):
+    """Update the preferences of the specified user.
+
+    Args:
+      user: User PB for the user to update.
+      keyword_args: dictionary of setting names mapped to new values.
+    """
+    if not user or not user.user_id:
+      raise exceptions.InputException('Cannot update user settings for anon.')
+
+    with self.mc.profiler.Phase(
+        'updating settings for %s with %s' % (self.mc.auth.user_id, kwargs)):
+      self.services.user.UpdateUserSettings(
+          self.mc.cnxn, user.user_id, user, **kwargs)
+
+  def GetUserPrefs(self, user_id):
+    """Get the UserPrefs for the specified user."""
+    # Anon user always has default prefs.
+    if not user_id:
+      return user_pb2.UserPrefs(user_id=0)
+    if user_id != self.mc.auth.user_id:
+      if not self.mc.perms.HasPerm(permissions.EDIT_OTHER_USERS, None, None):
+        raise permissions.PermissionException(
+            'Only site admins may see other users\' preferences')
+    with self.mc.profiler.Phase('Getting prefs for %s' % user_id):
+      userprefs = self.services.user.GetUserPrefs(self.mc.cnxn, user_id)
+
+    # Hard-coded user prefs for at-risk users that should use "corp mode".
+    # For some users we mark all of their new issues as Restrict-View-Google.
+    # Others see a "public issue" warning when commenting on public issues.
+    # TODO(crbug.com/monorail/5462):
+    # Remove when user group preferences are implemented.
+    if framework_bizobj.IsRestrictNewIssuesUser(self.mc.cnxn, self.services,
+                                                user_id):
+      # Copy so that cached version is not modified.
+      userprefs = user_pb2.UserPrefs(user_id=user_id, prefs=userprefs.prefs)
+      if 'restrict_new_issues' not in {pref.name for pref in userprefs.prefs}:
+        userprefs.prefs.append(user_pb2.UserPrefValue(
+            name='restrict_new_issues', value='true'))
+    if framework_bizobj.IsPublicIssueNoticeUser(self.mc.cnxn, self.services,
+                                                user_id):
+      # Copy so that cached version is not modified.
+      userprefs = user_pb2.UserPrefs(user_id=user_id, prefs=userprefs.prefs)
+      if 'public_issue_notice' not in {pref.name for pref in userprefs.prefs}:
+        userprefs.prefs.append(user_pb2.UserPrefValue(
+            name='public_issue_notice', value='true'))
+
+    return userprefs
+
+  def SetUserPrefs(self, user_id, prefs):
+    """Set zero or more UserPrefValue for the specified user."""
+    # Anon user always has default prefs.
+    if not user_id:
+      raise exceptions.InputException('Anon cannot have prefs')
+    if user_id != self.mc.auth.user_id:
+      if not self.mc.perms.HasPerm(permissions.EDIT_OTHER_USERS, None, None):
+        raise permissions.PermissionException(
+            'Only site admins may set other users\' preferences')
+    for pref in prefs:
+      error_msg = framework_bizobj.ValidatePref(pref.name, pref.value)
+      if error_msg:
+        raise exceptions.InputException(error_msg)
+    with self.mc.profiler.Phase(
+        'setting prefs for %s' % (self.mc.auth.user_id)):
+      self.services.user.SetUserPrefs(self.mc.cnxn, user_id, prefs)
+
+  # FUTURE: GetUser()
+  # FUTURE: UpdateUser()
+  # FUTURE: DeleteUser()
+  # FUTURE: ListStarredUsers()
+
+  def ExpungeUsers(self, emails, check_perms=True, commit=True):
+    """Permanently deletes user data and removes remaining user references
+       for all listed users.
+
+      To avoid any executions that might take too long and make the site hang,
+      a limit clause will be added to some operations. If any user references
+      are left behind due to the cut-off, the final services.user.ExpungeUsers
+      will fail because we cannot delete User rows that are still referenced
+      in other tables. work_env.ExpungeUsers can be called again until all user
+      references are removed and the final services.user.ExpungeUsers succeeds.
+      The limit clause will not be applied in operations for tables that contain
+      user_id or email columns but do not officially Reference the User table.
+      E.g. SpamVerdict and SpamReport. These user references must all be removed
+      before the attempt to delete rows from User is made. The limit will also
+      not be applied for sets of operations where values removed in earlier
+      operations would have to be known in order for later operations to
+      succeed.  E.g. ExpungeUsersIngroups().
+    """
+    if check_perms:
+      if not permissions.CanExpungeUsers(self.mc):
+        raise permissions.PermissionException(
+            'User is not allowed to delete users.')
+
+    limit = 10000
+    user_ids_by_email = self.services.user.LookupExistingUserIDs(
+        self.mc.cnxn, emails)
+    user_ids = list(set(user_ids_by_email.values()))
+    if framework_constants.DELETED_USER_ID in user_ids:
+      raise exceptions.InputException(
+          'Reserved deleted_user_id found in deletion request and'
+          'should not be deleted')
+    if not user_ids:
+      logging.info('Emails %r not found in DB. No users deleted', emails)
+      return
+
+    # The operations made in the methods below can be limited.
+    # We can adjust 'limit' as necessary to avoid timing out.
+    self.services.issue_star.ExpungeStarsByUsers(
+        self.mc.cnxn, user_ids, limit=limit)
+    self.services.project_star.ExpungeStarsByUsers(
+        self.mc.cnxn, user_ids, limit=limit)
+    self.services.hotlist_star.ExpungeStarsByUsers(
+        self.mc.cnxn, user_ids, limit=limit)
+    self.services.user_star.ExpungeStarsByUsers(
+        self.mc.cnxn, user_ids, limit=limit)
+    for user_id in user_ids:
+      self.services.user_star.ExpungeStars(
+          self.mc.cnxn, user_id, commit=False, limit=limit)
+
+    self.services.features.ExpungeQuickEditsByUsers(
+        self.mc.cnxn, user_ids, limit=limit)
+    self.services.features.ExpungeSavedQueriesByUsers(
+        self.mc.cnxn, user_ids, limit=limit)
+
+    self.services.template.ExpungeUsersInTemplates(
+        self.mc.cnxn, user_ids, limit=limit)
+    self.services.config.ExpungeUsersInConfigs(
+        self.mc.cnxn, user_ids, limit=limit)
+
+    self.services.project.ExpungeUsersInProjects(
+        self.mc.cnxn, user_ids, limit=limit)
+
+    # The upcoming operations cannot be limited with 'limit'.
+    # So it's possible that these operations below may lead to timing out
+    # and ExpungeUsers will have to run again to fully delete all users.
+    # We commit the above operations here, so if a failure does happen
+    # below, the second run of ExpungeUsers will have less work to do.
+    if commit:
+      self.mc.cnxn.Commit()
+
+    affected_issue_ids = self.services.issue.ExpungeUsersInIssues(
+        self.mc.cnxn, user_ids_by_email, limit=limit)
+    # Commit ExpungeUsersInIssues here, as it has many operations
+    # and at least one operation that cannot be limited.
+    if commit:
+      self.mc.cnxn.Commit()
+      self.services.issue.EnqueueIssuesForIndexing(
+          self.mc.cnxn, affected_issue_ids)
+
+    # Spam verdict and report tables have user_id columns that do not
+    # reference User. No limit will be applied.
+    self.services.spam.ExpungeUsersInSpam(self.mc.cnxn, user_ids)
+    if commit:
+      self.mc.cnxn.Commit()
+
+    # No limit will be applied for expunging in hotlists.
+    self.services.features.ExpungeUsersInHotlists(
+        self.mc.cnxn, user_ids, self.services.hotlist_star, self.services.user,
+        self.services.chart)
+    if commit:
+      self.mc.cnxn.Commit()
+
+    # No limit will be applied for expunging in UserGroups.
+    self.services.usergroup.ExpungeUsersInGroups(
+        self.mc.cnxn, user_ids)
+    if commit:
+      self.mc.cnxn.Commit()
+
+    # No limit will be applied for expunging in FilterRules.
+    deleted_rules_by_project = self.services.features.ExpungeFilterRulesByUser(
+        self.mc.cnxn, user_ids_by_email)
+    rule_strs_by_project = filterrules_helpers.BuildRedactedFilterRuleStrings(
+        self.mc.cnxn, deleted_rules_by_project, self.services.user, emails)
+    if commit:
+      self.mc.cnxn.Commit()
+
+    # We will attempt to expunge all given users here. Limiting the users we
+    # delete should be done before work_env.ExpungeUsers is called.
+    self.services.user.ExpungeUsers(self.mc.cnxn, user_ids)
+    if commit:
+      self.mc.cnxn.Commit()
+      self.services.usergroup.group_dag.MarkObsolete()
+
+    for project_id, filter_rule_strs in rule_strs_by_project.items():
+      project = self.services.project.GetProject(self.mc.cnxn, project_id)
+      hostport = framework_helpers.GetHostPort(
+          project_name=project.project_name)
+      send_notifications.PrepareAndSendDeletedFilterRulesNotification(
+          project_id, hostport, filter_rule_strs)
+
+  def TotalUsersCount(self):
+    """Returns the total number of Users in Monorail."""
+    return self.services.user.TotalUsersCount(self.mc.cnxn)
+
+  def GetAllUserEmailsBatch(self, limit=1000, offset=0):
+    """Returns a list emails that belong to Users in Monorail.
+
+    Returns:
+      A list of emails for Users within Monorail ordered by the user.user_ids.
+      The list will hold at most [limit] emails and will start at the given
+      [offset].
+    """
+    return self.services.user.GetAllUserEmailsBatch(
+        self.mc.cnxn, limit=limit, offset=offset)
+
+  ### Group methods
+
+  # FUTURE: CreateGroup()
+  # FUTURE: ListGroups()
+  # FUTURE: UpdateGroup()
+  # FUTURE: DeleteGroup()
+
+  ### Hotlist methods
+
+  def CreateHotlist(
+      self, name, summary, description, editor_ids, issue_ids, is_private,
+      default_col_spec):
+    # type: (string, string, string, Collection[int], Collection[int], Boolean,
+    #     string)
+    """Create a hotlist.
+
+    Args:
+      name: a valid hotlist name.
+      summary: one-line explanation of the hotlist.
+      description: one-page explanation of the hotlist.
+      editor_ids: a list of user IDs for the hotlist editors.
+      issue_ids: a list of issue IDs for the hotlist issues.
+      is_private: True if the hotlist can only be viewed by owners and editors.
+      default_col_spec: default columns for the hotlist's list view.
+
+
+    Returns:
+      The newly created hotlist.
+
+    Raises:
+      HotlistAlreadyExists: A hotlist with the given name already exists.
+      InputException: No user is signed in or the proposed name is invalid.
+      PermissionException: If the user cannot view all of the issues.
+    """
+    if not self.mc.auth.user_id:
+      raise exceptions.InputException('Anon cannot create hotlists.')
+
+    # GetIssuesDict checks that the user can view all issues.
+    self.GetIssuesDict(issue_ids)
+
+    if not framework_bizobj.IsValidHotlistName(name):
+      raise exceptions.InputException(
+          '%s is not a valid name for a Hotlist' % name)
+    if self.services.features.LookupHotlistIDs(
+        self.mc.cnxn, [name], [self.mc.auth.user_id]):
+      raise features_svc.HotlistAlreadyExists()
+
+    with self.mc.profiler.Phase('creating hotlist %s' % name):
+      hotlist = self.services.features.CreateHotlist(
+          self.mc.cnxn, name, summary, description, [self.mc.auth.user_id],
+          editor_ids, issue_ids=issue_ids, is_private=is_private,
+          default_col_spec=default_col_spec, ts=int(time.time()))
+
+    return hotlist
+
+  def UpdateHotlist(
+      self, hotlist_id, hotlist_name=None, summary=None, description=None,
+      is_private=None, default_col_spec=None, owner_id=None,
+      add_editor_ids=None):
+    # type: (int, str, str, str, bool, str, int, Collection[int]) -> None
+    """Update the given hotlist.
+
+    If a new value is None, the value does not get updated.
+
+    Args:
+      hotlist_id: hotlist_id of the hotlist to update.
+      hotlist_name: proposed new name for the hotlist.
+      summary: new summary for the hotlist.
+      description: new description for the hotlist.
+      is_private: true if hotlist should be updated to private.
+      default_col_spec: new default columns for hotlist list view.
+      owner_id: User id of the new owner.
+      add_editor_ids: User ids to add as editors.
+
+    Raises:
+      InputException: The given hotlist_id is None or proposed new name is not
+        a valid hotlist name.
+      NoSuchHotlistException: There is no hotlist with the given ID.
+      PermissionException: The logged-in user is not allowed to update
+        this hotlist's settings.
+      NoSuchUserException: Some proposed editors or owner were not found.
+      HotlistAlreadyExists: The (proposed new) hotlist owner already owns a
+        hotlist with the same (proposed) name.
+    """
+    hotlist = self.services.features.GetHotlist(
+        self.mc.cnxn, hotlist_id, use_cache=False)
+    if not permissions.CanAdministerHotlist(
+        self.mc.auth.effective_ids, self.mc.perms, hotlist):
+      raise permissions.PermissionException(
+          'User is not allowed to update hotlist settings.')
+
+    if hotlist.name == hotlist_name:
+      hotlist_name = None
+    if hotlist.owner_ids[0] == owner_id:
+      owner_id = None
+
+    if hotlist_name and not framework_bizobj.IsValidHotlistName(hotlist_name):
+      raise exceptions.InputException(
+          '"%s" is not a valid hotlist name' % hotlist_name)
+
+    # Check (new) owner does not already own a hotlist with the (new) name.
+    if hotlist_name or owner_id:
+      owner_ids = [owner_id] if owner_id else None
+      if self.services.features.LookupHotlistIDs(
+          self.mc.cnxn, [hotlist_name or hotlist.name],
+          owner_ids or hotlist.owner_ids):
+        raise features_svc.HotlistAlreadyExists(
+            'User already owns a hotlist with name %s' %
+            hotlist_name or hotlist.name)
+
+    # Filter out existing editors and users that will be added as owner
+    # or is the current owner.
+    next_owner_id = owner_id or hotlist.owner_ids[0]
+    if add_editor_ids:
+      new_editor_ids_set = {user_id for user_id in add_editor_ids if
+                            user_id not in hotlist.editor_ids and
+                            user_id != next_owner_id}
+      add_editor_ids = list(new_editor_ids_set)
+
+    # Validate user change requests.
+    user_ids = []
+    if add_editor_ids:
+      user_ids.extend(add_editor_ids)
+    else:
+      add_editor_ids = None
+    if owner_id:
+      user_ids.append(owner_id)
+    if user_ids:
+      self.services.user.LookupUserEmails(self.mc.cnxn, user_ids)
+
+    # Check for other no-op changes.
+    if summary == hotlist.summary:
+      summary = None
+    if description == hotlist.description:
+      description = None
+    if is_private == hotlist.is_private:
+      is_private = None
+    if default_col_spec == hotlist.default_col_spec:
+      default_col_spec = None
+
+    if ([hotlist_name, summary, description, is_private, default_col_spec,
+         owner_id, add_editor_ids] ==
+        [None, None, None, None, None, None, None]):
+      logging.info('No updates given')
+      return
+
+    if (summary is not None) and (not summary):
+      raise exceptions.InputException('Hotlist cannot have an empty summary.')
+    if (description is not None) and (not description):
+      raise exceptions.InputException(
+          'Hotlist cannot have an empty description.')
+    if default_col_spec is not None and not framework_bizobj.IsValidColumnSpec(
+        default_col_spec):
+      raise exceptions.InputException(
+          '"%s" is not a valid column spec' % default_col_spec)
+
+    self.services.features.UpdateHotlist(
+        self.mc.cnxn, hotlist_id, name=hotlist_name, summary=summary,
+        description=description, is_private=is_private,
+        default_col_spec=default_col_spec, owner_id=owner_id,
+        add_editor_ids=add_editor_ids)
+
+  # TODO(crbug/monorail/7104): delete UpdateHotlistRoles.
+
+  def GetHotlist(self, hotlist_id, use_cache=True):
+    # int, Optional[Boolean] -> Hotlist
+    """Return the specified hotlist.
+
+    Args:
+      hotlist_id: int hotlist_id of the hotlist to retrieve.
+      use_cache: set to false when doing read-modify-write.
+
+    Returns:
+      The specified hotlist.
+
+    Raises:
+      NoSuchHotlistException: There is no hotlist with that ID.
+      PermissionException: The user is not allowed to view the hotlist.
+    """
+    if hotlist_id is None:
+      raise exceptions.InputException('No hotlist specified')
+
+    with self.mc.profiler.Phase('getting hotlist %r' % hotlist_id):
+      hotlist = self.services.features.GetHotlist(
+          self.mc.cnxn, hotlist_id, use_cache=use_cache)
+    self._AssertUserCanViewHotlist(hotlist)
+    return hotlist
+
+  # TODO(crbug/monorail/7104): Remove group_by_spec argument and pre-pend
+  # values to sort_spec.
+  def ListHotlistItems(self, hotlist_id, max_items, start, can, sort_spec,
+                       group_by_spec, use_cache=True):
+    # type: (int, int, int, int, str, str, bool) -> ListResult
+    """Return a list of HotlistItems for the given hotlist that
+       are visible by the user.
+
+    Args:
+      hotlist_id: int hotlist_id of the hotlist.
+      max_items: int the maximum number of HotlistItems we want to return.
+      start: int start position in the total sorted items.
+      can: int "canned_query" number to scope the visible issues.
+      sort_spec: string that lists the sort order.
+      group_by_spec: string that lists the grouping order.
+      use_cache: set to false when doing read-modify-write.
+
+    Returns:
+      A work_env.ListResult namedtuple.
+
+    Raises:
+      NoSuchHotlistException: There is no hotlist with that ID.
+      InputException: `max_items` or `start` are negative values.
+      PermissionException: The user is not allowed to view the hotlist.
+    """
+    hotlist = self.GetHotlist(hotlist_id, use_cache=use_cache)
+    if start < 0:
+      raise exceptions.InputException('Invalid `start`: %d' % start)
+    if max_items < 0:
+      raise exceptions.InputException('Invalid `max_items`: %d' % max_items)
+
+    hotlist_issues = self.services.issue.GetIssues(
+        self.mc.cnxn, [item.issue_id for item in hotlist.items])
+    project_ids = hotlist_helpers.GetAllProjectsOfIssues(hotlist_issues)
+    config_list = hotlist_helpers.GetAllConfigsOfProjects(
+        self.mc.cnxn, project_ids, self.services)
+    harmonized_config = tracker_bizobj.HarmonizeConfigs(config_list)
+
+    (sorted_issues, _hotlist_items_context,
+     _users_by_id) = hotlist_helpers.GetSortedHotlistIssues(
+        self.mc.cnxn, hotlist.items, hotlist_issues, self.mc.auth, can,
+        sort_spec, group_by_spec, harmonized_config, self.services,
+        self.mc.profiler)
+
+
+    end = start + max_items
+    visible_issues = sorted_issues[start:end]
+    hotlist_items_dict = {item.issue_id: item for item in hotlist.items}
+    visible_hotlist_items = [hotlist_items_dict.get(issue.issue_id) for
+                            issue in visible_issues]
+
+    next_start = None
+    if end < len(sorted_issues):
+      next_start = end
+    return ListResult(visible_hotlist_items, next_start)
+
+  def TransferHotlistOwnership(self, hotlist_id, new_owner_id, remain_editor,
+                               use_cache=True, commit=True):
+    """Transfer ownership of hotlist from current owner to new_owner.
+
+    Args:
+      hotlist_id: int hotlist_id of the hotlist we want to transfer
+      new_owner_id: user_id of the new owner
+      remain_editor: True if the old owner should remain on the hotlist as
+        editor.
+      use_cache: set to false when doing read-modify-write.
+      commit: True, if changes should be committed.
+
+    Raises:
+      NoSuchHotlistException: There is not hotlist with the given ID.
+      PermissionException: The logged-in user is not allowed to change ownership
+        of the hotlist.
+      InputException: The proposed new owner already owns a hotlist with the
+        same name.
+    """
+    hotlist = self.services.features.GetHotlist(
+        self.mc.cnxn, hotlist_id, use_cache=use_cache)
+    edit_permitted = permissions.CanAdministerHotlist(
+        self.mc.auth.effective_ids, self.mc.perms, hotlist)
+    if not edit_permitted:
+      raise permissions.PermissionException(
+          'User is not allowed to update hotlist members.')
+
+    if self.services.features.LookupHotlistIDs(
+        self.mc.cnxn, [hotlist.name], [new_owner_id]):
+      raise exceptions.InputException(
+          'Proposed new owner already owns a hotlist with this name.')
+
+    self.services.features.TransferHotlistOwnership(
+        self.mc.cnxn, hotlist, new_owner_id, remain_editor, commit=commit)
+
+  def RemoveHotlistEditors(self, hotlist_id, remove_editor_ids, use_cache=True):
+    """Removes editors in a hotlist.
+
+    Args:
+      hotlist_id: the id of the hotlist we want to update
+      remove_editor_ids: list of user_ids to remove from hotlist editors
+
+    Raises:
+      NoSuchHotlistException: There is not hotlist with the given ID.
+      PermissionException: The logged-in user is not allowed to administer the
+        hotlist.
+      InputException: The users being removed are not editors in the hotlist.
+    """
+    hotlist = self.services.features.GetHotlist(
+        self.mc.cnxn, hotlist_id, use_cache=use_cache)
+    edit_permitted = permissions.CanAdministerHotlist(
+        self.mc.auth.effective_ids, self.mc.perms, hotlist)
+
+    # check if user is only removing themselves from the hotlist.
+    # removing linked accounts is allowed but users cannot remove groups
+    # they are part of from hotlists.
+    user_or_linked_ids = (
+        self.mc.auth.user_pb.linked_child_ids + [self.mc.auth.user_id])
+    if self.mc.auth.user_pb.linked_parent_id:
+      user_or_linked_ids.append(self.mc.auth.user_pb.linked_parent_id)
+    removing_self_only = set(remove_editor_ids).issubset(
+        set(user_or_linked_ids))
+
+    if not removing_self_only and not edit_permitted:
+      raise permissions.PermissionException(
+          'User is not allowed to remove editors')
+
+    if not set(remove_editor_ids).issubset(set(hotlist.editor_ids)):
+      raise exceptions.InputException(
+          'Cannot remove users who are not hotlist editors.')
+
+    self.services.features.RemoveHotlistEditors(
+        self.mc.cnxn, hotlist_id, remove_editor_ids)
+
+  def DeleteHotlist(self, hotlist_id):
+    """Delete the given hotlist from the DB.
+
+    Args:
+      hotlist_id (int): The id of the hotlist to delete.
+
+    Raises:
+      NoSuchHotlistException: There is not hotlist with the given ID.
+      PermissionException: The logged-in user is not allowed to
+        delete the hotlist.
+    """
+    hotlist = self.services.features.GetHotlist(
+        self.mc.cnxn, hotlist_id, use_cache=False)
+    edit_permitted = permissions.CanAdministerHotlist(
+        self.mc.auth.effective_ids, self.mc.perms, hotlist)
+    if not edit_permitted:
+      raise permissions.PermissionException(
+          'User is not allowed to delete hotlist')
+
+    self.services.features.ExpungeHotlists(
+        self.mc.cnxn, [hotlist.hotlist_id], self.services.hotlist_star,
+        self.services.user,  self.services.chart)
+
+  def ListHotlistsByUser(self, user_id):
+    """Return the hotlists for the given user.
+
+    Args:
+      user_id (int): The id of the user to query.
+
+    Returns:
+      The hotlists for the given user.
+    """
+    if user_id is None:
+      raise exceptions.InputException('No user specified')
+
+    with self.mc.profiler.Phase('querying hotlists for user %r' % user_id):
+      hotlists = self.services.features.GetHotlistsByUserID(
+          self.mc.cnxn, user_id)
+
+    # Filter the hotlists that the currently authenticated user cannot see.
+    result = [
+        hotlist
+        for hotlist in hotlists
+        if permissions.CanViewHotlist(
+            self.mc.auth.effective_ids, self.mc.perms, hotlist)]
+    return result
+
+  def ListHotlistsByIssue(self, issue_id):
+    """Return the hotlists the given issue is part of.
+
+    Args:
+      issue_id (int): The id of the issue to query.
+
+    Returns:
+      The hotlists the given issue is part of.
+    """
+    # Check that the issue exists and the user has permission to see it.
+    self.GetIssue(issue_id)
+
+    with self.mc.profiler.Phase('querying hotlists for issue %r' % issue_id):
+      hotlists = self.services.features.GetHotlistsByIssueID(
+          self.mc.cnxn, issue_id)
+
+    # Filter the hotlists that the currently authenticated user cannot see.
+    result = [
+        hotlist
+        for hotlist in hotlists
+        if permissions.CanViewHotlist(
+            self.mc.auth.effective_ids, self.mc.perms, hotlist)]
+    return result
+
+  def ListRecentlyVisitedHotlists(self):
+    """Return the recently visited hotlists for the logged in user.
+
+    Returns:
+      The recently visited hotlists for the given user, or an empty list if no
+      user is logged in.
+    """
+    if not self.mc.auth.user_id:
+      return []
+
+    with self.mc.profiler.Phase(
+        'get recently visited hotlists for user %r' % self.mc.auth.user_id):
+      hotlist_ids = self.services.user.GetRecentlyVisitedHotlists(
+          self.mc.cnxn, self.mc.auth.user_id)
+      hotlists_by_id = self.services.features.GetHotlists(
+          self.mc.cnxn, hotlist_ids)
+      hotlists = [hotlists_by_id[hotlist_id] for hotlist_id in hotlist_ids]
+
+    # Filter the hotlists that the currently authenticated user cannot see.
+    # It might be that some of the hotlists have become private since the user
+    # last visited them, or the user has lost access for other reasons.
+    result = [
+        hotlist
+        for hotlist in hotlists
+        if permissions.CanViewHotlist(
+            self.mc.auth.effective_ids, self.mc.perms, hotlist)]
+    return result
+
+  def ListStarredHotlists(self):
+    """Return the starred hotlists for the logged in user.
+
+    Returns:
+      The starred hotlists for the logged in user.
+    """
+    if not self.mc.auth.user_id:
+      return []
+
+    with self.mc.profiler.Phase(
+        'get starred hotlists for user %r' % self.mc.auth.user_id):
+      hotlist_ids = self.services.hotlist_star.LookupStarredItemIDs(
+          self.mc.cnxn, self.mc.auth.user_id)
+      hotlists_by_id, _ = self.services.features.GetHotlistsByID(
+          self.mc.cnxn, hotlist_ids)
+      hotlists = [hotlists_by_id[hotlist_id] for hotlist_id in hotlist_ids]
+
+    # Filter the hotlists that the currently authenticated user cannot see.
+    # It might be that some of the hotlists have become private since the user
+    # starred them, or the user has lost access for other reasons.
+    result = [
+        hotlist
+        for hotlist in hotlists
+        if permissions.CanViewHotlist(
+            self.mc.auth.effective_ids, self.mc.perms, hotlist)]
+    return result
+
+  def StarHotlist(self, hotlist_id, starred):
+    """Star or unstar the specified hotlist.
+
+    Args:
+      hotlist_id: int ID of the hotlist to star/unstar.
+      starred: true to add a star, false to remove it.
+
+    Returns:
+      Nothing.
+
+    Raises:
+      NoSuchHotlistException: There is no hotlist with that ID.
+    """
+    if hotlist_id is None:
+      raise exceptions.InputException('No hotlist specified')
+
+    if not self.mc.auth.user_id:
+      raise exceptions.InputException('No current user specified')
+
+    with self.mc.profiler.Phase('(un)starring hotlist %r' % hotlist_id):
+      # Make sure the hotlist exists and user has permission to see it.
+      self.GetHotlist(hotlist_id)
+      self.services.hotlist_star.SetStar(
+          self.mc.cnxn, hotlist_id, self.mc.auth.user_id, starred)
+
+  def IsHotlistStarred(self, hotlist_id):
+    """Return True if the current hotlist has starred the given hotlist.
+
+    Args:
+      hotlist_id: int ID of the hotlist to check.
+
+    Returns:
+      True if starred.
+
+    Raises:
+      NoSuchHotlistException: There is no hotlist with that ID.
+    """
+    if hotlist_id is None:
+      raise exceptions.InputException('No hotlist specified')
+
+    if not self.mc.auth.user_id:
+      return False
+
+    with self.mc.profiler.Phase('checking hotlist star %r' % hotlist_id):
+      # Make sure the hotlist exists and user has permission to see it.
+      self.GetHotlist(hotlist_id)
+      return self.services.hotlist_star.IsItemStarredBy(
+        self.mc.cnxn, hotlist_id, self.mc.auth.user_id)
+
+  def GetHotlistStarCount(self, hotlist_id):
+    """Return the number of times the hotlist has been starred.
+
+    Args:
+      hotlist_id: int ID of the hotlist to check.
+
+    Returns:
+      The number of times the hotlist has been starred.
+
+    Raises:
+      NoSuchHotlistException: There is no hotlist with that ID.
+    """
+    if hotlist_id is None:
+      raise exceptions.InputException('No hotlist specified')
+
+    with self.mc.profiler.Phase('counting stars for hotlist %r' % hotlist_id):
+      # Make sure the hotlist exists and user has permission to see it.
+      self.GetHotlist(hotlist_id)
+      return self.services.hotlist_star.CountItemStars(self.mc.cnxn, hotlist_id)
+
+  def CheckHotlistName(self, name):
+    """Check that a hotlist name is valid and not already in use.
+
+    Args:
+      name: str the hotlist name to check.
+
+    Returns:
+      None if the user can create a hotlist with that name, or a string with the
+      reason the name can't be used.
+
+    Raises:
+      InputException: The user is not signed in.
+    """
+    if not self.mc.auth.user_id:
+      raise exceptions.InputException('No current user specified')
+
+    with self.mc.profiler.Phase('checking hotlist name: %r' % name):
+      if not framework_bizobj.IsValidHotlistName(name):
+        return '"%s" is not a valid hotlist name.' % name
+      if self.services.features.LookupHotlistIDs(
+          self.mc.cnxn, [name], [self.mc.auth.user_id]):
+        return 'There is already a hotlist with that name.'
+
+    return None
+
+  def RemoveIssuesFromHotlists(self, hotlist_ids, issue_ids):
+    """Remove the issues given in issue_ids from the given hotlists.
+
+    Args:
+      hotlist_ids: a list of hotlist ids to remove the issues from.
+      issue_ids: a list of issue_ids to be removed.
+
+    Raises:
+      PermissionException: The user has no permission to edit the hotlist.
+      NoSuchHotlistException: One of the hotlist ids was not found.
+    """
+    for hotlist_id in hotlist_ids:
+      self._AssertUserCanEditHotlist(self.GetHotlist(hotlist_id))
+
+    with self.mc.profiler.Phase(
+        'Removing issues %r from hotlists %r' % (issue_ids, hotlist_ids)):
+      self.services.features.RemoveIssuesFromHotlists(
+          self.mc.cnxn, hotlist_ids, issue_ids, self.services.issue,
+          self.services.chart)
+
+  def AddIssuesToHotlists(self, hotlist_ids, issue_ids, note):
+    """Add the issues given in issue_ids to the given hotlists.
+
+    Args:
+      hotlist_ids: a list of hotlist ids to add the issues to.
+      issue_ids: a list of issue_ids to be added.
+      note: a string with a message to record along with the issues.
+
+    Raises:
+      PermissionException: The user has no permission to edit the hotlist.
+      NoSuchHotlistException: One of the hotlist ids was not found.
+    """
+    for hotlist_id in hotlist_ids:
+      self._AssertUserCanEditHotlist(self.GetHotlist(hotlist_id))
+
+    # GetIssuesDict checks that the user can view all issues
+    self.GetIssuesDict(issue_ids)
+
+    added_tuples = [
+        (issue_id, self.mc.auth.user_id, int(time.time()), note)
+        for issue_id in issue_ids]
+
+    with self.mc.profiler.Phase(
+        'Removing issues %r from hotlists %r' % (issue_ids, hotlist_ids)):
+      self.services.features.AddIssuesToHotlists(
+          self.mc.cnxn, hotlist_ids, added_tuples, self.services.issue,
+          self.services.chart)
+
+  # TODO(crbug/monorai/7104): RemoveHotlistItems and RerankHotlistItems should
+  # replace RemoveIssuesFromHotlist, AddIssuesToHotlists,
+  # RemoveIssuesFromHotlists.
+  # The latter 3 methods are still used in v0 API paths and should be removed
+  # once those v0 API methods are removed.
+  def RemoveHotlistItems(self, hotlist_id, remove_issue_ids):
+    # type: (int, Collection[int]) -> None
+    """Remove given issues from a hotlist.
+
+    Args:
+      hotlist_id: A hotlist ID of the hotlist to remove issues from.
+      remove_issue_ids: A list of issue IDs that belong to HotlistItems
+        we want to remove from the hotlist.
+
+    Raises:
+      NoSuchHotlistException: If the hotlist is not found.
+      NoSuchIssueException: if an Issue is not found for a given
+        remove_issue_id.
+      PermissionException: If the user lacks permissions to edit the hotlist or
+        view all the given issues.
+      InputException: If there are ids in `remove_issue_ids` that do not exist
+        in the hotlist.
+    """
+    hotlist = self.GetHotlist(hotlist_id)
+    self._AssertUserCanEditHotlist(hotlist)
+    if not remove_issue_ids:
+      raise exceptions.InputException('`remove_issue_ids` empty.')
+
+    item_issue_ids = {item.issue_id for item in hotlist.items}
+    if not (set(remove_issue_ids).issubset(item_issue_ids)):
+      raise exceptions.InputException('item(s) not found in hotlist.')
+
+    # Raise exception for un-viewable or not found item_issue_ids.
+    self.GetIssuesDict(item_issue_ids)
+
+    self.services.features.UpdateHotlistIssues(
+        self.mc.cnxn, hotlist_id, [], remove_issue_ids, self.services.issue,
+        self.services.chart)
+
+  def AddHotlistItems(self, hotlist_id, new_issue_ids, target_position):
+    # type: (int, Sequence[int], int) -> None
+    """Add given issues to a hotlist.
+
+    Args:
+      hotlist_id: A hotlist ID of the hotlist to add issues to.
+      new_issue_ids: A list of issue IDs that should belong to new
+        HotlistItems added to the hotlist. HotlistItems will be added
+        in the same order the IDs are given in. If some HotlistItems already
+        exist in the Hotlist, they will not be moved.
+      target_position: The index, starting at 0, of the new position the
+        first issue in new_issue_ids should have. This value cannot be greater
+        than (# of current hotlist.items).
+
+    Raises:
+      PermissionException: If the user lacks permissions to edit the hotlist or
+        view all the given issues.
+      NoSuchHotlistException: If the hotlist is not found.
+      NoSuchIssueException: If an Issue is not found for a given new_issue_id.
+      InputException: If the target_position or new_issue_ids are not valid.
+    """
+    hotlist = self.GetHotlist(hotlist_id)
+    self._AssertUserCanEditHotlist(hotlist)
+    if not new_issue_ids:
+      raise exceptions.InputException('no new issues given to add.')
+
+    item_issue_ids = {item.issue_id for item in hotlist.items}
+    confirmed_new_issue_ids = set(new_issue_ids).difference(item_issue_ids)
+
+    # Raise exception for un-viewable or not found item_issue_ids.
+    self.GetIssuesDict(item_issue_ids)
+
+    if confirmed_new_issue_ids:
+      changed_items = self._GetChangedHotlistItems(
+          hotlist, list(confirmed_new_issue_ids), target_position)
+      self.services.features.UpdateHotlistIssues(
+          self.mc.cnxn, hotlist_id, changed_items, [], self.services.issue,
+          self.services.chart)
+
+  def RerankHotlistItems(self, hotlist_id, moved_issue_ids, target_position):
+    # type: (int, list(int), int) -> Hotlist
+    """Rerank HotlistItems of a Hotlist.
+
+      This method reranks existing hotlist items to the given target_position.
+        e.g. For a hotlist with items (a, b, c, d, e), if moved_issue_ids were
+        [e.issue_id, c.issue_id] and target_position were 0,
+        the hotlist items would be reranked as (e, c, a, b, d).
+
+    Args:
+      hotlist_id: A hotlist ID of the hotlist to rerank.
+      moved_issue_ids: A list of issue IDs in the hotlist, to be moved
+        together, in the order they should have after the reranking.
+      target_position: The index, starting at 0, of the new position the
+        first issue in moved_issue_ids should have. This value cannot be greater
+        than (# of current hotlist.items not being reranked).
+
+    Returns:
+      The updated hotlist.
+
+    Raises:
+      PermissionException: If the user lacks permissions to rerank the hotlist
+        or view all the given issues.
+      NoSuchHotlistException: If the hotlist is not found.
+      NoSuchIssueException: If an Issue is not found for a given moved_issue_id.
+      InputException: If the target_position or moved_issue_ids are not valid.
+    """
+    hotlist = self.GetHotlist(hotlist_id)
+    self._AssertUserCanEditHotlist(hotlist)
+    if not moved_issue_ids:
+      raise exceptions.InputException('`moved_issue_ids` empty.')
+
+    item_issue_ids = {item.issue_id for item in hotlist.items}
+    if not (set(moved_issue_ids).issubset(item_issue_ids)):
+      raise exceptions.InputException('item(s) not found in hotlist.')
+
+    # Raise exception for un-viewable or not found item_issue_ids.
+    self.GetIssuesDict(item_issue_ids)
+    changed_items = self._GetChangedHotlistItems(
+        hotlist, moved_issue_ids, target_position)
+
+    if changed_items:
+      self.services.features.UpdateHotlistIssues(
+          self.mc.cnxn, hotlist_id, changed_items, [], self.services.issue,
+          self.services.chart)
+
+    return self.GetHotlist(hotlist.hotlist_id)
+
+  def _GetChangedHotlistItems(self, hotlist, moved_issue_ids, target_position):
+    # type: (Hotlist, Sequence(int), int) -> Hotlist
+    """Returns HotlistItems that are changed after moving existing/new issues.
+
+      This returns the list of new HotlistItems and existing HotlistItems
+      with updated ranks as a result of moving the given issues to the given
+      target_position. This list may include HotlistItems whose ranks' must be
+      changed as a result of the `moved_issue_ids`.
+
+    Args:
+      hotlist: The hotlist that owns the HotlistItems.
+      moved_issue_ids: A sequence of issue IDs for new or existing items of the
+        Hotlist, to be moved together, in the order they should have after
+        the change.
+      target_position: The index, starting at 0, of the new position the
+        first issue in moved_issue_ids should have. This value cannot be greater
+        than (# of current hotlist.items not being reranked).
+
+    Returns:
+      The updated hotlist.
+
+    Raises:
+      PermissionException: If the user lacks permissions to rerank the hotlist.
+      NoSuchHotlistException: If the hotlist is not found.
+      InputException: If the target_position or moved_issue_ids are not valid.
+    """
+    # List[Tuple[issue_id, new_rank]]
+    changed_item_ranks = rerank_helpers.GetHotlistRerankChanges(
+        hotlist.items, moved_issue_ids, target_position)
+
+    items_by_id = {item.issue_id: item for item in hotlist.items}
+    changed_items = []
+    current_time = int(time.time())
+    for issue_id, rank in changed_item_ranks:
+      # Get existing item to update or create new item.
+      item = items_by_id.get(
+          issue_id,
+          features_pb2.Hotlist.HotlistItem(
+              issue_id=issue_id,
+              adder_id=self.mc.auth.user_id,
+              date_added=current_time))
+      item.rank = rank
+      changed_items.append(item)
+
+    return changed_items
+
+  # TODO(crbug/monorail/7031): Remove this method
+  # and corresponding v0 prpc method.
+  def RerankHotlistIssues(self, hotlist_id, moved_ids, target_id, split_above):
+    """Rerank the moved issues for the hotlist.
+
+    Args:
+      hotlist_id: an int with the id of the hotlist.
+      moved_ids: The id of the issues to move.
+      target_id: the id of the issue to move the issues to.
+      split_above: True if moved issues should be moved before the target issue.
+    """
+    hotlist = self.GetHotlist(hotlist_id)
+    self._AssertUserCanEditHotlist(hotlist)
+    hotlist_issue_ids = [item.issue_id for item in hotlist.items]
+    if not set(moved_ids).issubset(set(hotlist_issue_ids)):
+      raise exceptions.InputException('The issue to move is not in the hotlist')
+    if target_id not in hotlist_issue_ids:
+      raise exceptions.InputException('The target issue is not in the hotlist.')
+
+    phase_name = 'Moving issues %r %s issue %d.' % (
+        moved_ids, 'above' if split_above else 'below', target_id)
+    with self.mc.profiler.Phase(phase_name):
+      lower, higher = features_bizobj.SplitHotlistIssueRanks(
+          target_id, split_above,
+          [(item.issue_id, item.rank) for item in hotlist.items if
+           item.issue_id not in moved_ids])
+      rank_changes = rerank_helpers.GetInsertRankings(lower, higher, moved_ids)
+      if rank_changes:
+        relations_to_change = {
+            issue_id: rank for issue_id, rank in rank_changes}
+        self.services.features.UpdateHotlistItemsFields(
+            self.mc.cnxn, hotlist_id, new_ranks=relations_to_change)
+
+  def UpdateHotlistIssueNote(self, hotlist_id, issue_id, note):
+    """Update the given issue of the given hotlist with the given note.
+
+    Args:
+      hotlist_id: an int with the id of the hotlist.
+      issue_id: an int with the id of the issue.
+      note: a string with a message to record for the given issue.
+    Raises:
+      PermissionException: The user has no permission to edit the hotlist.
+      NoSuchHotlistException: The hotlist id was not found.
+      InputException: The issue is not part of the hotlist.
+    """
+    # Make sure the hotlist exists and we have permission to see and edit it.
+    hotlist = self.GetHotlist(hotlist_id)
+    self._AssertUserCanEditHotlist(hotlist)
+
+    # Make sure the issue exists and we have permission to see it.
+    self.GetIssue(issue_id)
+
+    # Make sure the issue belongs to the hotlist.
+    if not any(item.issue_id == issue_id for item in hotlist.items):
+      raise exceptions.InputException('The issue is not part of the hotlist.')
+
+    with self.mc.profiler.Phase(
+        'Editing note for issue %s in hotlist %s' % (issue_id, hotlist_id)):
+      new_notes = {issue_id: note}
+      self.services.features.UpdateHotlistItemsFields(
+          self.mc.cnxn, hotlist_id, new_notes=new_notes)
+
+  def expungeUsersFromStars(self, user_ids):
+    """Wipes any starred user or user's stars from all star services.
+
+    This method will not commit the operation. This method will not
+    make changes to in-memory data.
+    """
+
+    self.services.project_star.ExpungeStarsByUsers(self.mc.cnxn, user_ids)
+    self.services.issue_star.ExpungeStarsByUsers(self.mc.cnxn, user_ids)
+    self.services.hotlist_star.ExpungeStarsByUsers(self.mc.cnxn, user_ids)
+    self.services.user_star.ExpungeStarsByUsers(self.mc.cnxn, user_ids)
+    for user_id in user_ids:
+      self.services.user_star.ExpungeStars(self.mc.cnxn, user_id, commit=False)
+
+  # Permissions
+
+  # ListFooPermission methods will return the list of permissions in addition to
+  # the permission to "VIEW",
+  # that the logged in user has for a given resource_id's resource Foo.
+  # If the user cannot view Foo, PermissionException will be raised.
+  # Not all resources will have predefined lists of permissions
+  # (e.g permissions.HOTLIST_OWNER_PERMISSIONS)
+  # For most cases, the list of permissions will be created within the
+  # ListFooPermissions method.
+
+  def ListHotlistPermissions(self, hotlist_id):
+    # type: (int) -> List(str)
+    """Return the list of permissions the current user has for the hotlist."""
+    # Permission to view checked in GetHotlist()
+    hotlist = self.GetHotlist(hotlist_id)
+    if permissions.CanAdministerHotlist(self.mc.auth.effective_ids,
+                                        self.mc.perms, hotlist):
+      return permissions.HOTLIST_OWNER_PERMISSIONS
+    if permissions.CanEditHotlist(self.mc.auth.effective_ids, self.mc.perms,
+                                  hotlist):
+      return permissions.HOTLIST_EDITOR_PERMISSIONS
+    return []
+
+  def ListFieldDefPermissions(self, field_id, project_id):
+    # type:(int, int) -> List[str]
+    """Return the list of permissions the current user has for the fieldDef."""
+    project = self.GetProject(project_id)
+    # TODO(crbug/monorail/7614): The line below was added temporarily while this
+    # bug is fixed.
+    self.mc.LookupLoggedInUserPerms(project)
+    field = self.GetFieldDef(field_id, project)
+    if permissions.CanEditFieldDef(self.mc.auth.effective_ids, self.mc.perms,
+                                   project, field):
+      return [permissions.EDIT_FIELD_DEF, permissions.EDIT_FIELD_DEF_VALUE]
+    if permissions.CanEditValueForFieldDef(self.mc.auth.effective_ids,
+                                           self.mc.perms, project, field):
+      return [permissions.EDIT_FIELD_DEF_VALUE]
+    return []
diff --git a/codereview.settings b/codereview.settings
new file mode 100644
index 0000000..7052a1f
--- /dev/null
+++ b/codereview.settings
@@ -0,0 +1,11 @@
+# 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
+
+CODE_REVIEW_SERVER: https://codereview.chromium.org
+BUG_PREFIX: monorail:
+CC_LIST: chromium-reviews@chromium.org, jrobbins@chromium.org, infra-reviews+infra@chromium.org
+GERRIT_HOST: True
+PROJECT: infra
+VIEW_VC: https://chromium.googlesource.com/infra/infra/+/
diff --git a/components b/components
new file mode 120000
index 0000000..f4ffdf8
--- /dev/null
+++ b/components
@@ -0,0 +1 @@
+../../luci/appengine/components/components
\ No newline at end of file
diff --git a/cron.yaml b/cron.yaml
new file mode 100644
index 0000000..5a4715f
--- /dev/null
+++ b/cron.yaml
@@ -0,0 +1,47 @@
+# 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
+
+# The default timezone for crons in App Engine is UTC.
+# See: https://cloud.google.com/appengine/docs/standard/python/config/cronref#syntax
+# To avoid potential bugs with Daylight Savings Time, please do
+# not use timezones other than UTC.
+
+cron:
+- description: keep the databases loaded
+  url: /p/chromium/issues/list
+  schedule: every 30 minutes synchronized
+- description: consolidate old invalidation rows
+  url: /_cron/ramCacheConsolidate
+  schedule: every 6 hours synchronized
+- description: index issues that were modified in big batches
+  url: /_cron/reindexQueue
+  schedule: every 1 minutes synchronized
+- description: get rid of doomed and deletable projects
+  url: /_cron/reap
+  schedule: every 24 hours synchronized
+- description: send ts_mon metrics
+  url: /internal/cron/ts_mon/send
+  schedule: every 1 minutes
+- description: export spam model training examples
+  url: /_cron/spamDataExport
+  schedule: every day 09:00
+- description: fetch api clients from luci-config
+  url: /_cron/loadApiClientConfigs
+  schedule: every 30 minutes synchronized
+- description: deletes old visited hotlists
+  url: /_cron/trimVisitedPages
+  schedule: every monday 01:00
+- description: ping all issues with date fields that arrived
+  url: /_cron/dateAction
+  schedule: every day 12:00
+- description: retrain spam model with GCS training data
+  url: /_cron/spamTraining
+  schedule: every day 10:00
+- description: export component model training examples
+  url: /_cron/componentDataExport
+  schedule: every mon 9:00
+- description: sync monorail's user lists with wipeout-lite
+  url: /_cron/wipeoutSync
+  schedule: every day 09:00
diff --git a/dev-services.yml b/dev-services.yml
new file mode 100644
index 0000000..6b5bbe2
--- /dev/null
+++ b/dev-services.yml
@@ -0,0 +1,38 @@
+version: '3'
+services:
+  mysql:
+    image: 'mysql:5.6'
+    container_name: 'mysql'
+    ports:
+      - '3306:3306'
+    environment:
+      MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
+      MYSQL_DATABASE: 'monorail'
+    command: mysqld --sql_mode="ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
+  redis:
+    image: 'redis:alpine'
+    container_name: 'redis'
+    ports:
+      - '6379:6379'
+  cloud-tasks-emulator:
+    # As of 9/18/2020 latest tag is built from source at
+    # https://github.com/aertje/cloud-tasks-emulator/commit/ff9a1afc8f3aeedbc6ca1f468b2c53b74c18a6e6
+    image: 'us.gcr.io/monorail-dev/cloud-tasks-emulator:latest'
+    container_name: 'cloud-tasks-emulator'
+    ports:
+      - '9090:9090'
+    environment:
+      APP_ENGINE_EMULATOR_HOST: 'http://host.docker.internal:8080'
+    command: >
+      --queue projects/monorail-staging/locations/us-central1/queues/componentexport
+      --queue projects/monorail-staging/locations/us-central1/queues/default
+      --queue projects/monorail-staging/locations/us-central1/queues/notifications
+      --queue projects/monorail-staging/locations/us-central1/queues/outboundemail
+      --queue projects/monorail-staging/locations/us-central1/queues/recomputederivedfields
+      --queue projects/monorail-staging/locations/us-central1/queues/spamexport
+      --queue projects/monorail-staging/locations/us-central1/queues/wipeoutsendusers
+      --queue projects/monorail-staging/locations/us-central1/queues/wipeoutdeleteusers
+      --queue projects/monorail-staging/locations/us-central1/queues/deleteusers
+      --queue projects/monorail-staging/locations/us-central1/queues/pubsub-issueupdates
+      -host 0.0.0.0
+      -port 9090
diff --git a/dispatch.yaml b/dispatch.yaml
new file mode 100644
index 0000000..975c8cb
--- /dev/null
+++ b/dispatch.yaml
@@ -0,0 +1,10 @@
+dispatch:
+
+- url: "*/_backend/*"
+  service: besearch
+
+- url: "*/_cron/*"
+  service: latency-insensitive
+
+- url: "*/_task/*"
+  service: latency-insensitive
diff --git a/doc/README.md b/doc/README.md
new file mode 100644
index 0000000..799ee28
--- /dev/null
+++ b/doc/README.md
@@ -0,0 +1,60 @@
+# Monorail Issue Tracker
+
+## What is Monorail?
+
+Monorail is the issue tracker used by Chromium-related projects on
+<https://bugs.chromium.org>.
+
+* Monorail is a port of the Google Code issue tracker to AppEngine. It provides
+continuity for the chrome team with the least number of unknowns, while achieving
+these goals:
+  * Vastly simpler to develop and operate:
+  * Runs on Google App Engine, data in Google Cloud SQL and GCS.
+  * Built on simpler GAE APIs.
+  * Pure python, greatly simplified code, supported by Chrome Operations team.
+* Better product focus:
+  * Focused on needs of larger teams: e.g., built-in support for user groups,
+    custom fields, more control over issue visibility, better validation to
+    improve issue data quality.
+  * Closely aligned with the chrome development process and dedicated to the
+    future needs of the chrome team.
+* Scaleable by design:
+  * Designed from the start to handle Chrome's future issue tracking needs.
+  * Efficient implementation of queries like issue ID and date ranges.
+  * Improved security and spam defenses.
+* Ease of transition:
+  * Same data model as used by our existing issues for an exact import.
+  * Our v1 API is very close to the old Google Code API.
+  * Same ACLs and project administration controls.
+  * Familiar UI, but streamlined.  One-to-one redirects from Google Code.
+
+## Monorail key features
+
+* Developed as open source.
+* Flexible issue representation that allows for creation of one-off labels.
+* Custom fields defined by project owners.
+* Support for components.  Issues can be in multiple components.
+* Filter rules are IF-THEN rules that automatically add labels or CC users.
+* Fine-grained permission system allows control over visiblity and individual
+  actions on individual issues.
+* Saved queries per user and per project.
+* Users can subscribe to their saved queries (not just labels) and get mail on updates.
+* User groups are built into Monorail, so no update lag on built-in groups.
+  We can also sync from Google Groups.
+* Support for custom fields that are treated very much like built-in fields.
+  Custom fields can be multi-valued.
+* User-valued custom fields can be restricted to only allow qualified users that
+  have a given permission.
+* User-valued custom fields can trigger notifications to those users, and/or grant
+  permissions to the named users.
+* Notification emails include detailed footers that give an ordered list of the
+  reasons why the email was sent to you, with specifics such as "You are the on the
+  auto-cc list of Component C".
+* ML-based spam detection applied before notifications are generated. Users can
+  also flag spam.
+* Limited-availability Endpoints API that works like the old Google Code API.
+* Personal hotlists with ranked issues.
+
+## Reporting problems with Monorail
+
+Please file an issue at <https://bugs.chromium.org/p/monorail>.
diff --git a/doc/api.md b/doc/api.md
new file mode 100644
index 0000000..4328d42
--- /dev/null
+++ b/doc/api.md
@@ -0,0 +1,382 @@
+# Monorail API v1
+
+Monorail API v1 aims to provide nearly identical interface to Google Code issue tracker's API for existing clients' smooth transition. You can get a high-level overview from the documents below.
+
+* [Code example in python](example.py)
+
+
+Rate limiting:
+
+* We count requests for each signed in account.
+* The rate limit is currently 450 requests per minute.  We can adjust that per-account if needed.
+* We enforce the limit in a five-minute window, so 2250 requests are allowed within any given 5 minutes.
+* Individual requests that take more than 5s count as 2 requests.  This could happen for complex issue searches, especially free text and negated free text terms.
+* If the client exceeds the rate limit, it will get response code 400, in which case it should wait and try again.
+* These parameters are defined in settings.py and framework/ratelimiter.py.
+
+
+This API provides the following methods to read/write user/issue/comment objects in Monorail:
+
+[TOC]
+
+## monorail.groups.create
+
+* Description: Create a new user group.
+* Permission: The requester needs permission to create groups.
+* Parameters:
+	* groupName(required, string): The name of the group to create.
+	* who_can_view_members(required, string): The visibility setting of the group. Available options are 'ANYONE', 'MEMBERS' and 'OWNERS'.
+	* ext_group_type(string): The type of the source group if the new group is imported from the source. Available options are 'BAGGINS', 'CHROME_INFRA_AUTH' and 'MDB'.
+* Return message:
+	* groupID(int): The ID of the newly created group.
+* Error code:
+	* 400: The group already exists.
+	* 403: The requester has no permission to create a group.
+
+## monorail.groups.get
+
+* Description: Get a group's settings and users.
+* Permission: The requester needs permission to view this group.
+* Parameters:
+	* groupName(required, string): The name of the group to view.
+* Return message:
+	* groupID(int): The ID of the newly created group.
+	* groupSettings(dict):
+		* groupName(string): The name of the group.
+		* who_can_view_members(string): The visibility setting of the group.
+		* ext_group_type(string): The type of the source group.
+		* last_sync_time(int): The timestamp when the group was last synced from the source. This field is only meaningful for groups with ext_group_type set.
+	* groupOwners(list): A list of group owners' emails.
+	* groupMembers(list): A list of group members' emails.
+* Error code:
+	* 403: The requester has no permission to view this group.
+	* 404: The group does not exist.
+
+## monorail.groups.settings.list
+
+* Description: List all group settings.
+* Permission: None.
+* Parameters:
+	* importedGroupsOnly(boolean): A flag indicating whether only fetching settings of imported groups. The default is False.
+* Return message:
+	* groupSettings(list of dict):
+		* groupName(string): The name of the group.
+		* who_can_view_members(string): The visibility setting of the group.
+		* ext_group_type(string): The type of the source group.
+		* last_sync_time(int): The timestamp when the group was last synced from the source. This field is only meaningful for groups with ext_group_type set.
+* Error code: None.
+
+## monorail.groups.update
+
+* Description: Update a group's settings and users.
+* Permission: The requester needs permission to edit this group.
+* Parameters:
+	* groupName(required, string): The name of the group to edit.
+	* who_can_view_members(string): The visibility setting of the group.
+	* ext_group_type(string): The type of the source group.
+	* last_sync_time(int): The timestamp when the group was last synced from the source.
+	* body(dict):
+		* groupOwners(list of string): A list of owner emails.
+		* groupMembers(list of string): A list of member emails.
+* Return message: Empty.
+* Error code:
+	* 403: The requester has no permission to edit this group.
+
+## monorail.issues.comments.delete
+
+* Description: Delete a comment.
+* Permission: The requester needs permission to delete this comment.
+* Parameters:
+	* projectId(required, string): The name of the project.
+	* issueId(required, int): The ID of the issue.
+	* commentId(required, int): The ID of the comment.
+* Return message: Empty.
+* Error code:
+	* 403: The requester has no permission to delete this comment.
+	* 404: The issue and/or comment does not exist.
+
+## monorail.issues.comments.insert
+
+* Description: Add a comment.
+* Permission: The requester needs permission to comment an issue.
+* Parameters:
+	* projectId(required, string): The name of the project.
+	* issueId(required, int): The ID of the issue.
+	* sendEmail(boolean): A flag indicating whether to send notifications. The default is True.
+	* Request body(dict):
+		* content(string): Content of the comment to add.
+		* updates(dict): Issue fields to update.
+			* summary(string): The new summary of the issue.
+			* status(string): The new status of the issue.
+			* owner(string): The new owner of the issue.
+			* labels(list of string): The labels to add/remove.
+			* cc(list of string): A list of emails to add/remove from cc field.
+			* blockedOn(list of string): The ID of the issues on which the current issue is blocked.
+			* blocking(list of string): The ID of the issues which the current issue is blocking.
+			* mergedInto(string): The ID of the issue to merge into.
+			* components(list of string): The components to add/remove.
+* Return message:
+	* author(dict):
+		* htmlLink(string): The link to the author profile.
+		* name(string): The name of the author.
+	* canDelete(boolean): Whether current requester could delete the new comment.
+	* content(string): Content of the new comment.
+	* id(int): ID of the new comment.
+	* published(string): Published datetime of the new comment.
+	* updates(dict): Issue fields updated by the new comment.
+* Error code:
+	* 403: The requester has no permission to comment this issue.
+	* 404: The issue does not exist.
+
+## monorail.issues.comments.list
+
+* Description: List all comments for an issue.
+* Permission: The requester needs permission to view this issue.
+* Parameters:
+	* projectId(required, string): The name of the project.
+	* issueId(required, int): The ID of the issue.
+	* maxResults(int): The max number of comments to retrieve in one request. The default is 100.
+	* startIndex(int): The starting index of comments to retrieve. The default is 0.
+* Return message:
+	* totalResults(int): Total number of comments retrieved.
+	* items(list of dict): A list of comments.
+		* attachments(dict): The attachment of this comment.
+		* author(dict): The author of this comment.
+		* canDelete(boolean): Whether the requester could delete this comment.
+		* content(string): Content of this comment.
+		* deletedBy(dict): The user who has deleted this comment.
+		* id(int): The ID of this comment.
+		* published(string): Published datetime of this comment.
+		* updates(dict): Issue fields updated by this comment.
+* Error code:
+	* 403: The requester has no permission to view this issue.
+	* 404: The issue does not exist.
+
+## monorail.issues.comments.undelete
+
+* Description: Restore a deleted comment.
+* Permission: The requester needs permission to delete this comment.
+* Parameters:
+	* projectId(required, string): The name of the project.
+	* issueId(required, int): The ID of the issue.
+	* commentId(required, int): The ID of the comment.
+* Return message: Empty.
+* Error code:
+	* 403: The requester has no permission to delete this comment.
+	* 404: The issue and/or comment does not exist.
+
+## monorail.issues.get
+
+* Description: Get an issue.
+* Permission: The requester needs permission to view this issue.
+* Parameters:
+	* projectId(required, string): The name of the project.
+	* issueId(required, int): The ID of the issue.
+* Return message:
+	* id(int): ID of this issue.
+	* summary(string): Summary of this issue.
+	* stars(int): Number of stars of this issue.
+	* starred(boolean): Whether this issue is starred by the requester.
+	* status(string): Status of this issue.
+	* state(string): State of this issue. Available values are 'closed' amd 'open'.
+	* labels(list of string): Labels of this issue.
+	* author(dict): The reporter of this issue.
+	* owner(dict): The owner of this issue.
+	* cc(list of dict): The list of emails to cc.
+	* updated(string): Last updated datetime of this issue.
+	* published(string): Published datetime of this issue.
+	* closed(string): Closed datetime of this issue.
+	* blockedOn(list of dict): The issues on which the current issue is blocked.
+	* blocking(list of dict): The issues which the current issue is blocking.
+	* projectId(string): The name of the project.
+	* canComment(boolean): Whether the requester can comment on this issue.
+	* canEdit(boolean): Whether the requester can edit this issue.
+	* components(list of string): Components of the issue.
+* Error code:
+	* 403: The requester has no permission to view this issue.
+	* 404: The issue does not exist.
+
+## monorail.issues.insert
+
+* Description: Add a new issue.
+* Permission: The requester needs permission to create a issue.
+* Parameters:
+	* projectId(required, string): The name of the project.
+	* sendEmail(boolean): A flag indicating whether to send notifications. The default is True.
+	* body(dict):
+		* blockedOn(list of dict): The issues on which the current issue is blocked.
+		* blocking(list of dict): The issues which the current issue is blocking.
+		* cc(list of dict): The list of emails to cc.
+		* description(required, string): Content of the issue.
+		* labels(list of string): Labels of this issue.
+		* owner(dict): The owner of this issue.
+		* status(required, string): Status of this issue.
+		* summary(requred, string): Summary of this issue.
+		* components(list of string): Components of this issue.
+* Return message:
+	* id(int): ID of this issue.
+	* summary(string): Summary of this issue.
+	* stars(int): Number of stars of this issue.
+	* starred(boolean): Whether this issue is starred by the requester.
+	* status(string): Status of this issue.
+	* state(string): State of this issue. Available values are 'closed' and 'open'.
+	* labels(list of string): Labels of this issue.
+	* author(dict): The reporter of this issue.
+	* owner(dict): The owner of this issue.
+	* cc(list of dict): The list of emails to cc.
+	* updated(string): Last updated datetime of this issue.
+	* published(string): Published datetime of this issue.
+	* closed(string): Closed datetime of this issue.
+	* blockedOn(list of dict): The issues on which the current issue is blocked.
+	* blocking(list of dict): The issues which the current issue is blocking.
+	* projectId(string): The name of the project.
+	* canComment(boolean): Whether the requester can comment on this issue.
+	* canEdit(boolean): Whether the requester can edit this issue.
+	* components(list of string): Components of this issue.
+* Error code:
+	* 403: The requester has no permission to create a issue.
+
+## monorail.issues.list
+
+* Description: List issues for projects.
+* Permission: The requester needs permission to view issues in requested projects.
+* Parameters:
+	* projectId(required, string): The name of the project.
+	* additionalProject(list of string): Additional projects to search issues.
+	* can(string): Canned query. Available values are 'all', 'new', 'open', 'owned', 'starred' and 'to_verify'.
+	* label(string): Search for issues with this label.
+	* maxResults(int): The max number of issues to retrieve in one request. The default is 100.
+	* owner(string): Search for issues with this owner.
+	* publishedMax(int): Search for issues published before the timestamp.
+	* publishedMin(int): Search for issues published after the timestamp.
+	* q(string): Custom query criteria, e.g. 'status:New'.
+	* sort(string): Fields to sort issues by.
+	* startIndex(int): The starting index of issues to retrieve. The default is 0.
+	* status(string): Search for issues of this status.
+	* updatedMax(int): Search for issues updated before the timestamp.
+	* updatedMin(int): Search for issues updated after the timestamp.
+* Return message:
+	* totalResults(int): Total number of issues retrieved.
+	* items(list of dict): A list of issues.
+		* author(dict): The reporter of this issue.
+		* blockedOn(list of dict): The issues on which the current issue is blocked.
+		* blocking(list of dict): The issues which the current issue is blocking.
+		* canComment(boolean): Whether the requester can comment on this issue.
+		* canEdit(boolean): Whether the requester can edit this issue.
+		* cc(list of dict): The list of emails to cc.
+		* closed(string): Closed datetime of this issue.
+		* description(string): Content of this issue.
+		* id(int): ID of this issue.
+		* labels(list of string): Labels of this issue.
+		* owner(dict): The owner of this issue.
+		* published(string): Published datetime of this issue.
+		* starred(boolean): Whether this issue is starred by the requester.
+		* stars(int): Number of stars of this issue.
+		* state(string): State of this issue. Available values are 'closed' and 'open'.
+		* status(string): Status of this issue.
+		* summary(string): Summary of this issue.
+		* updated(string): Last updated datetime of this issue.
+* Error code:
+	* 403: The requester has no permission to view issues in the projects.
+
+## monorail.users.get
+
+* Description: Get a user.
+* Permission: None.
+* Parameters:
+	* userId(required, string): The email of the user.
+	* ownerProjectsOnly(boolean): Whether to only return projects the user owns. The default is False.
+* Return message:
+	* projects(dict):
+		* name(string): The name of the project.
+		* htmlLink(string): The relative url of this project.
+		* summary(string): Summary of this project.
+		* description(string): Description of this project.
+		* role(string): Role of the user in this project.
+		* issuesConfig(dict): Issue configurations.
+* Error code: None.
+
+## monorail.components.create
+
+* Description:  Create a component.
+* Permission: The requester needs permission to edit the requested project.
+* Parameters:
+	* projectId(required, string): The name of the project.
+	* componentName(required, string): The leaf name of the component to create.
+	* body(dict):
+		* parentPath(string): Full path of the parent component.
+		* description(string): Description of the new component.
+		* admin(list of string): A list of user emails who can administer this component.
+		* cc(list of string): A list of user emails who will be added to cc list when this component is added to an issue.
+		* deprecated(boolean): A flag indicating whether this component is deprecated. The default is False.
+* Return message:
+	* componentId(int): The ID of the new component.
+	* projectName(string): The name of the project this new component belongs to.
+	* componentPath(string): The full path of the component.
+	* description(string): Description of the new component.
+	* admin(list of string): A list of user emails who can administer this component.
+	* cc(list of string): A list of user emails who will be added to cc list when this component is added to an issue.
+	* deprecated(boolean): A flag indicating whether this component is deprecated.
+	* created(datetime): Created datetime.
+	* creator(string): Email of the creator.
+	* modified(datetime): Last modified datetime.
+	* modifier(string): Email of last modifier.
+* Error code:
+	* 400: The component name is invalid or already in use.
+	* 403: The requester has no permission to create components in the project.
+	* 404: The parent component does not exist, or the project does not exist.
+
+## monorail.components.delete
+
+* Description:  Delete a component.
+* Permission: The requester needs permission to edit the requested component.
+* Parameters:
+	* projectId(required, string): The name of the project.
+	* componentPath(required, string): The full path of the component to delete.
+* Return message: None.
+* Error code:
+	* 403: The requester has no permission to delete this component, or tries to delete component that has subcomponents.
+	* 404: The component does not exist, or the project does not exist.
+
+## monorail.components.list
+
+* Description:  List all components of a given project.
+* Permission: None.
+* Parameters:
+	* projectId(required, string): The name of the project.
+* Return message:
+	* components(list of dict):
+		* componentId(int): The ID of the new component.
+		* projectName(string): The name of the project this new component belongs to.
+		* componentPath(string): The full path of the component.
+		* description(string): Description of the new component.
+		* admin(list of string): A list of user emails who can administer this component.
+		* cc(list of string): A list of user emails who will be added to cc list when this component is added to an issue.
+		* deprecated(boolean): A flag indicating whether this component is deprecated.
+		* created(datetime): Created datetime.
+		* creator(string): Email of the creator.
+		* modified(datetime): Last modified datetime.
+		* modifier(string): Email of last modifier.
+* Error code:
+	* 403: The requester has no permission to delete this component, or tries to delete component that has subcomponents.
+	* 404: The project does not exist.
+
+## monorail.components.update
+
+* Description:  Update a component.
+* Permission: The requester needs permission to edit the requested component.
+* Parameters:
+	* projectId(required, string): The name of the project.
+	* componentPath(required, string): The full path of the component to delete.
+	* updates(list of dict):
+		* field(required, string): Component field to update. Available options are 'LEAF_NAME', 'DESCRIPTION', 'ADMIN', 'CC' and 'DEPRECATED'.
+		* leafName(string): The new leaf name of the component.
+		* description(string): The new description of the component.
+		* admin(list of string): The new list of user emails who can administer this component.
+		* cc (list of string): The new list of user emails who will be added to cc list when this component is added to an issue.
+		* deprecated(boolean): The new boolean value indicating whether this component is deprecated.
+* Return message: None.
+* Error code:
+	* 400: The new component name is invalid or already in use.
+	* 403: The requester has no permission to edit this component.
+	* 404: The component does not exist, or the project does not exist.
diff --git a/doc/code-practices/frontend.md b/doc/code-practices/frontend.md
new file mode 100644
index 0000000..b248cd4
--- /dev/null
+++ b/doc/code-practices/frontend.md
@@ -0,0 +1,239 @@
+# Monorail Frontend Code Practices
+
+This guide documents the code practices used by Chops Workflow team when writing new client code in the Monorail Issue Tracker.
+
+Through this guide, we use [IETF standards language](https://tools.ietf.org/html/bcp14) to represent the requirements level of different recommendations. For example:
+
+
+
+*   **Must** - Code that is written is required to follow this rule.
+*   **Should** - We recommend that new code follow this rule where possible.
+*   **May** - Following this guideline is optional.
+
+[TOC]
+
+
+## JavaScript
+
+
+### Follow the Google JavaScript Style Guide
+
+We enforce the use of the [Google JavaScript style guide](https://google.github.io/styleguide/jsguide.html) through ES Lint, with our rules set by [eslint-config-google](https://github.com/google/eslint-config-google).
+
+
+
+*   New JavaScript code **must** follow the Google style guide rules enforced by our ES Lint config.
+*   In all other cases, JavaScript **should** adhere to the Google style guide.
+
+
+#### Exceptions
+
+
+
+*   While the Google style guide [recommends using a trailing underscore for private JavaScript field names](https://google.github.io/styleguide/jsguide.html#naming-non-constant-field-names), our code **should** start private field names with an underscore instead to be consistent with the convention adopted by open source libraries we depend on.
+
+
+### Use modern browser features
+
+We generally aim to write a modern codebase that makes use of recent JavaScript features to keep our coding conventions fresh.
+
+
+
+*   When using features that are not yet supported in [all supported browsers](#heading=h.s0dpmzuabf7w), we **must** polyfill features to meet our browser support requirements.
+*   New JavaScript code **should not** inject values into the global scope. ES modules should be used for importing variables and functions across files instead.
+*   When writing asynchronous code, JavaScript code **should** favor async/await over Promises.
+    *   Exception: `Promise.all()` **may** be used to simultaneously run multiple await calls.
+*   JavaScript code **should** use the modularized forms of built-in functions rather than the global forms. For example, prefer [Number.parseInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/parseInt) over [parseInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt).
+*   String building code **should** prefer [ES template literals](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals) over string concatenation for strings built from multiple interpolated variables. Template literals usually produce more readable code than direct concatenation.
+*   JavaScript code **should** prefer using native browser functionality over importing external dependencies. If a native browser function does the same thing as an external library, prefer using the native functionality.
+
+
+#### Browser support guidelines
+
+All code written **must** target the two latest stable versions of each of the following browsers, per the [Chrome Ops Browser Support Guidelines](https://chromium.googlesource.com/infra/infra/+/main/doc/front_end.md#browser-support).
+
+
+### Avoid unexpected Object mutations
+
+
+
+*   Functions **must not** directly mutate any Object or Arrays that are passed into them as parameters, unless the function explicitly documents that it mutates its parameters.
+*   Objects and Arrays declared as constants **should** have their values frozen with `Object.freeze()` to prevent accidental mutations.
+
+
+### Create readable function names
+
+
+
+*   Event handlers **should** be named after the actions they do, not the actions that trigger them. For example `starIssue()` is a better function header than `onClick()`.
+    *   Exception: APIs that allow specifying custom handlers **may** accept event handling functions with generic names like clickHandler.
+
+
+### Code comments
+
+
+
+*   TODOs in code **should** reference a tracking issue in the TODO comment.
+
+
+### Performance
+
+
+
+*   JavaScript code **should not** create extraneous objects in loops or repeated functions. Object initialization is expensive, including for common native objects such as Function, RegExp, and Date. Thus, creating new Objects in every iteration of a loop or other repeated function can lead to unexpected performance hits. Where possible, initialize objects once and re-use them on each iteration rather than recreating them repeatedly.
+
+
+## Web components/LitElement
+
+Monorail’s frontend is written as a single page app (SPA) using the JavaScript framework [LitElement](https://lit-element.polymer-project.org/). LitElement is a lightweight framework built on top of the native Web Components API present in modern browsers.
+
+When creating new elements, we try to follow recommended code practices for both Web Components and LitElement.
+
+
+### Web components practices
+
+Google Web Fundamentals offers a [Custom Elements Best Practices](https://developers.google.com/web/fundamentals/web-components/best-practices) guide. While the recommendations in this guide are solid, many of them are already covered by LitElement’s underlying usage of Web Components. Thus, we avoid explicitly requiring following this guide to avoid confusion.
+
+However, many of the recommendations from this guide are useful, even when using LitElement. We adapt this advice for our purposes here.
+
+
+
+*   Elements **should not** break the hidden attribute when styling the :host element. For example, if you set a custom element to have the style of `:host { display: flex; }`, by default this causes the `:host[hidden]` state to also use `display: flex;`. To overcome this, you can use CSS to explicitly declare that the :host element should be hidden when the hidden attribute is set.
+*   Elements **should** enable Shadow DOM to encapsulate styles. LitElement enables Shadow DOM by default and offers options for disabling it. However, disabling ShadowDOM is discouraged because many Web Components features, such as `<slot>` elements, are built on top of Shadow DOM.
+*   Elements **should not** error when initialized without attributes. For example, adding attribute-less HTML such as `<my-custom-element></my-custom-element>` to the DOM should not cause code errors.
+*   Elements **should not** dispatch events in response to changes made by the parent. The parent already knows about its own activity, so dispatching events in these circumstances is not meaningful.
+*   Elements **should not** accept rich data (ie: Objects and Arrays) as attributes. LitElement provides APIs for setting Arrays and Objects through either attributes or properties, but it is more efficient to set them through properties. Setting these values through attributes requires extra serialization and deserialization.
+    *   Exception: When LitElements are used outside of lit-html rendering, declared HTML **may** pass rich data in through attributes. Outside of lit-html, setting property values for DOM is often inconvenient.
+*   Elements **should not** self apply classes to their own `:host` element. The parent of an element is responsible for applying classes to an element, not the element itself.
+
+
+### Organizing elements
+
+When creating a single page app using LitElement, we render all components in the app through a root component that handles frontend routing and loads additional components for routes the user visits.
+
+
+
+*   Elements **should** be grouped into folders with the same name as the element with tests and element code living together.
+    *   Exception: Related sub-elements of a parent element **may** be grouped into the parent element’s folder if the element is not used outside the parent.
+*   Pages **should** lazily load dependent modules when the user first navigates to that page. To improve initial load time performance, we split element code into bundles divided across routes.
+*   Elements **should** use the mr- prefix if they are specific to Monorail and **may** use the chops- prefix if they implement functionality that is general enough to be shared with other apps. (ie: `<chops-button>`, `<chops-checkbox>`)
+*   Nested routes **may** be subdivided into separate sub-components with their own routing logic. This pattern promotes sharing code between related pages.
+
+
+### LitElement lifecycle
+
+LitElement provides several lifecycle callbacks for elements. When writing code, it is important to be aware of which kinds of work should be done during different phases of an element’s life.
+
+
+
+*   Elements **must** remove any created external side effects before `disconnectedCallback()` finishes running.
+    *   Example: If an element attaches any global event handlers at any time in its lifecycle, those global event handlers **must not** continue to run when the element is removed from the DOM.
+*   Elements **should not** do work dependent on property values in `connectedCallback()` or `constructor()`. These functions will not re-run if property values change, so work done based on property values will become stale when properties change.
+    *   Exception: An element **may** initialize values based on other property values as long as values continue to be updated beyond when the element initializes.
+    *   Use `update()` for functionality meant to run before the `render()` cycle and `updated()` for functionality that runs after.
+*   Elements **should** use the `update()` callback for work that happens _before render_ and the `updated()` callback for work that happens _after render_.
+    *   More strictly, code with significant side effects such as XHR requests **must not** run in the `update()` callback but **may** run in the `updated()` callback.
+
+
+### Sharing functionality
+
+
+
+*   Elements **should not** use mixins for sharing behavior. See: [Mixins Considered Harmful](https://reactjs.org/blog/2016/07/13/mixins-considered-harmful.html)
+    *   Exception: Elements **may** use the `connect()` mixin for sharing Redux functionality.
+
+
+### HTML/CSS
+
+
+
+*   HTML and CSS written in elements **should** follow the [Google HTML/CSS style guide](https://google.github.io/styleguide/htmlcssguide.html).
+*   An element **should** make its `:host` element the main container of the element. When a parent element styles a child element directly through CSS, the `:host` element is the HTMLElement that receives the styles.
+*   Styles in CSS **should** aim to use the minimum specificity required to apply the declared style. This is important because increased specificity is used to overwrite existing styles. In particular:
+    *   CSS **should not** use the `!important` directive.
+    *   Elements **should** be styled with classes rather than with IDs because styles applied to ID selectors are harder to overwrite.
+*   CSS custom properties **should** be used to specify commonly used CSS values, such as shared color palette colors.
+    *   In addition, CSS custom properties **may** be used by individual elements to expose an API for parents to style the element through.
+*   Elements **may** use shared JavaScript constants with lit-html CSS variables to share styles among multiple elements. See: [Sharing styles in LitElement](https://lit-element.polymer-project.org/guide/styles#sharing-styles)
+
+
+### Security recommendations
+
+
+
+*   Code **must not** use LitElement’s `unsafeHTML` or `unsafeCSS` directives.
+*   Code **must not** directly set anchor href values outside of LitElement’s data binding system. LitElement sanitizes variable values when data binding and manually binding data to the DOM outside of LitElement’s sanitization system is a security liability.
+*   Code **must not** directly set `innerHTML` on any elements to values including user-inputted data.
+    *   Note: It is common for [Web Component example code](https://developers.google.com/web/fundamentals/web-components/customelements) to make use of directly setting innerHTML to set HTML templates. In these examples, setting innerHTML is often safe because the sample code does not add any variables into the rendered HTML. However, setting innerHTML directly is still risky and can be completely avoided as a pattern when writing LitElement elements.
+
+
+## Redux/Data Binding
+
+We use [Redux](https://redux.js.org/) on our LitElement frontend to manage state.
+
+
+
+*   JavaScript code **must** maintain unidirectional data flow. Unidirectional data flow could also be referred to as “props down, events up” and other names. See: [Redux Data Flow](https://redux.js.org/basics/data-flow/)
+    *   In short, all data that lives in Redux **must** be edited by editing the Redux store, not through intermediate data changes. These edits happen through dispatched actions.
+    *   This means that automatic 2-way data binding patterns, used in frameworks like Polymer, **must not** be used.
+    *   Note: For component data stored outside of Redux, this data flow pattern **should** still be followed by treating the topmost component where data originated from as the “parent” of the data.
+*   JavaScript code **must** follow all rules listed as “Essential” in the [Redux style guide](https://redux.js.org/style-guide/style-guide/).
+    *   Additionally, “Strongly Recommended” and “Recommended” rules in Redux’s style guide **may** be followed.
+*   Objects that cannot be directly serialized into JSON **must not** be stored in the Redux store. As an example, this includes JavaScript’s native Map and Set object.
+*   Reducers, actions, and selectors **must** be organized into files according to the [“Ducks” pattern](https://github.com/erikras/ducks-modular-redux).
+*   Reducers **should** be separated into small functions that individually handle only a few action types.
+*   Redux state **should** be normalized to avoid storing duplicate copies of the same data in the state. See: [Normalizing Redux State Shape](https://redux.js.org/recipes/structuring-reducers/normalizing-state-shape/)
+*   JavaScript code **should not** directly pull data from the Redux state Object. Data inside the Redux store **should** be accessed through a layer of selector functions, using [Reselect](https://github.com/reduxjs/reselect).
+*   Reducers, selectors, and action creators **should** be unit tested like functions. For example, a reducer is a function that takes in an initial state and an action then returns a new state.
+*   Reducers **may** destructure action arguments to make it easier to read which kinds of action attributes are used. In particular, this pattern is useful when reducers are composed into many small functions that each handle a small number of actions.
+*   Components connected to Redux **may** use the [Presentational/Container component pattern](https://medium.com/@dan_abramov/smart-and-dumb-components-7ca2f9a7c7d0) to separate “connected” versions of the component from “unconnected” versions. This pattern is useful for testing components outside of Redux and for separating concerns.
+
+
+## Testing
+
+
+
+*   Mock timers **must** be added for code which depends on time. For example, any code which uses debouncing, throttling, settimeout, or setInterval **must** mock time in tests. Tests dependent on time are likely to flakily fail.
+*   New JavaScript code **must** have 90% or higher test coverage. Where possible, code **should** aim for 100% test coverage.
+*   Unit tests **should** be kept small when possible. More smaller tests are preferable to fewer larger tests.
+*   The HTMLElement dispatchEvent() function **may** be used to simulate browser events such as keypresses, mouse events, and more.
+
+
+## UX
+
+
+### Follow Material Design guidelines
+
+When making design changes to our UI, we aim to follow [Google’s Material Design guidelines](https://material.io/design/). In particular, because we are designing a developer tool where our users benefit from power user features and high scannability for large amounts of data, we pay particular attention to [recommendations on applying density](https://material.io/design/layout/applying-density.html).
+
+
+
+*   Our UI designs **must not** directly use Google branding such as the Google logo or Google brand colors. Monorail is not an official Google product.
+*   Visual designs **should** follow the Material Design guidelines. In particular, try
+*   Colors used in designs **should** be taken from the [2014 Material Design color palette](https://material.io/design/color/the-color-system.html). Where this color palette falls short of our design needs, new colors **should** be created by mixing shades of the existing 2014 Material colors.
+*   Our UI designs **should** follow a “build from white” design philosophy where most of the UI is neutral in color and additional hues are added to draw emphasis to specific elements.
+
+
+### Accessibility
+
+To keep our UI accessible to a variety of users, we aim to follow the [WAI-ARIA guidelines](https://www.w3.org/WAI/standards-guidelines/aria/).
+
+
+
+*   UI designs **must** keep a 4.5:1 minimum contrast ratio for text and icons.
+*   CSS **must not** set “outline: none” without creating a new focus style for intractable elements. While removing native focus styles is a tempting way to make a design “feel more modern”, being able to see which elements are focused is an essential feature for keyboard interaction.
+*   UI changes **should** follow the [Material Design accessibility guidelines](https://material.io/design/usability/accessibility.html).
+*   HTML code **should** favor using existing semantic native elements over recreating native functionality where possible. For example, it is better to use a `<button>` element for a clickable button than to create a `<div>` with an onclick handler.
+    *   Tip: In many cases, an underlying native element **may** be used as part of an implementation that otherwise seems to need completely custom code. One common example is when styling native checkboxes: while many CSS examples create new DOM elements to replace the look of a native checkbox, it is possible to use CSS pseudoelements to tie interaction with those new elements to an underlying native checkbox.
+    *   Exception: Oftentimes, specific code requirements will make using native elements unfeasible. In these cases, the custom element implementation **must** follow any relevant WAI-ARIA for the type of element being implemented. For example, these are the [WAI-ARIA guidelines on implementing an accessible modal dialog](https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/dialog.html).
+*   Any element with an onclick handler **should** be a `<button>`. The `<button>` element handles mapping keyboard shortcuts to click handlers, which adds keyboard support for these intractable elements.
+*   Manual screenreader testing **should** be done when implementing heavily customized interactive elements. Autocomplete, chip inputs, and custom modal implementations are examples of elements that should be verified against screenreader testing.
+
+
+### Writing
+
+
+
+*   Error messages **should** guide users towards solving the cause of the error when possible.
+*   Text in the UI **should not** use terminology that’s heavily tied to app internals. Concepts **should** be expressed in terms that users understand.
+*   Wording **should** be kept simple and short where possible.
diff --git a/doc/deployment.md b/doc/deployment.md
new file mode 100644
index 0000000..fd12add
--- /dev/null
+++ b/doc/deployment.md
@@ -0,0 +1,348 @@
+# Monorail Deployment
+
+*This document covers updating Chromium's instance of Monorail through
+Spinnaker. If you are looking to deploy your own instance of Monorail,
+see: [Creating a new Monorail instance](instance.md)*
+
+## Before your first deployment
+
+Spinnaker is a platform that helps teams configure and manage application
+deployment pipelines. We have a
+[ChromeOps Spinnaker](http://go/chrome-infra-spinnaker) instance that holds
+pipelines for several ChromeOps services, including Monorail.
+
+IMPORTANT: In the event of an unexpected failure in a Spinnaker pipeline, it is
+extremely important that the release engineer properly cleans up versions in the
+Appengine console (e.g. delete bad versions and manual rollback to previous
+version).
+
+### Spinnaker Traffic Splitting
+
+Spinnaker's traffic splitting, rollback, and cleanup systems rely heavily on the
+assumption that the currently deployed version always has the highest version
+number. During Rollbacks, Spinnaker will migrate traffic back to the second
+highest version number and delete the highest version number. So, if the
+previous deployed version was v013 and there was a v014 that was created but
+somehow never properly deleted, and Spinnaker just created a v015, which it is
+now trying to rollback, this means, spinnaker will migrate 100% traffic "back"
+to v014, which might be a bad version, and delete v015. The same could happen
+for traffic migrations. If a previous, good deployment is v013 with 100%
+traffic, and there is a bad deployment at v014 that was never cleaned up, during
+a new deployment, Spinnaker will have created v015 and begin traffic splitting
+between v014 and v015, which means our users are either being sent to the bad
+version or the new version.
+
+If you are ever unsure about how you should handle a manual cleanup and
+rollback, ping the [Monorail chat](http://chat/room/AAAACV9ZZ8k) and ask for
+help.
+
+Below are brief descriptions of all the pipelines that make up the Monorail
+deployment process in Spinnaker.
+
+#### Deploy Monorail
+
+This is the starting point of the Monorail deployment process and should be
+manually triggered by the Release Engineer.
+![start monorail deployment](md_images/start-deploy-monorail.png)
+This pipeline handles creating a Cloud Build of Monorail. The build can be created from
+HEAD of a given branch or it can re-build a previous Cloud Build given a "BUILD_ID".
+Once the build is complete, a `Deploy {Dev|Staging|Prod}` pipeline can be automatically
+triggered to deploy the build to an environment. On a regular weekly release, we should
+use the default "ENV" = dev, provide the release branch, and leave "BUILD_ID" empty.
+
+##### Parameter Options
+
+*   The "BRANCH" parameter takes the name of the release branch that holds
+    the commits we want to deploy.
+    The input should be in the form of `refs/releases/monorail/[*deployment number*]`.
+    e.g. "refs/releases/monorail/1" builds from HEAD of
+    [infra/infra/+/refs/releases/monorail/1](https://chromium.googlesource.com/infra/infra/+/refs/releases/monorail/1).
+*   The "ENV" parameter can be set to "dev", "staging", or "prod" to
+    automatically trigger `Deploy Dev`, `Deploy Staging`, or `Deploy
+    Production` (respectively) with a successful finish of `Deploy Monorail`.
+    The "nodeploy" option means no new monorail version will get deployed
+    to any environment.
+*   The "BUILD_ID" parameter can take the id of a previous Cloud Build found
+    [here](https://pantheon.corp.google.com/cloud-build/builds?organizationId=433637338589&src=ac&project=chrome-infra-spinnaker).
+    We can use this to rebuild older Monorail versions. When the "BUILD_ID"
+    is given "BRANCH" is ignored.
+
+#### Deploy Dev
+
+This pipeline handles deploying a new monorail-dev version and migrating traffic
+to the newest version.
+
+After a new version is created, but before traffic is migrated, there is a
+"Continue?" stage that waits on manual judgement. The release engineer is
+expected to do any testing in the newest version before confirming that the
+pipeline should continue with traffic migration. If there are any issues, the
+release engineer should select "Rollback", which triggers the `Rollback`
+pipeline. If "Continue" is selected, spinnaker will immediately migrate 100%
+traffic to to the newest version.
+![manual judgement stage](md_images/manual-judgement-stage.png)
+![continue options](md_images/continue-options.png)
+
+The successful finish of this pipeline triggers two pipelines: `Cleanup` and
+`Deploy Staging`.
+
+#### Deploy Development - EXPERIMENTAL
+
+Note that this pipeline is similar to the above `Deploy Dev` pipeline.
+This is for Prod Tech's experimental purposes. Please ignore this pipeline. This
+cannot be triggered by `Deploy Monorail`.
+
+#### Deploy Staging
+
+This pipeline handles deploying a new monorail-staging version and migrating
+traffic to the newest version.
+
+Like `Deploy Dev` after a new version is created, there is a
+"Continue?" stage that waits on manual judgement. The release engineer should
+test the new version before letting the pipeline proceed to traffic migration.
+If any issues are spotted, the release engineer should select "Rollback", to
+trigger the `Rollback` pipeline.
+
+Unlike `Deploy Dev`, after "Continue" is selected, spinnaker will
+proceed with three separate stages of traffic splitting with a waiting period
+between each traffic split.
+
+The successful finish of this pipeline triggers two pipelines: `Cleanup` and
+`Deploy Production`.
+
+#### Deploy Production
+
+This pipeline handles deploying a new monorail-prod version and migrating
+traffic to the newest version.
+
+This pipeline has the same set of stages as `Deploy Staging`. the successful
+finish of this pipeline triggers the `Cleanup` pipeline.
+
+#### Rollback
+
+This pipeline handles migrating traffic back from the newest version to the
+previous version and deleting the newest version. This pipeline is normally
+triggered by the `Rollback` stage of the `Deploy Dev|Staging|Production`
+pipelines and it only handles rolling back one of the applications, not all
+three.
+
+##### Parameter Options
+
+*   "Stack" is a required parameter for this pipeline and can be one of "dev",
+    "staging", or "prod". This determines which of monorail's three applications
+    (monorail-dev, monorail-staging, monorail-prod) it should rollback. When
+    `Rollback` is triggered by one of the above Deploy pipelines, the
+    appropriate "Stack" value is passed. When the release engineer needs to
+    manually trigger the `Rollback` pipeline they should make sure they are
+    choosing the correct "Stack" to rollback.
+    ![start rollback](md_images/start-rollback.png)
+    ![rollback options](md_images/rollback-options.png)
+
+#### Cleanup
+
+This pipeline handles deleting the oldest version.
+
+For more details read [go/monorail-deployments](go/monorail-deployments) and
+[go/chrome-infra-appengine-deployments](go/chrome-infra-appengine-deployments).
+
+TODO(jojwang): Currently, notifications still need to be set up. See
+[b/138311682](https://b.corp.google.com/issues/138311682)
+
+### Notifications
+
+Monorail's pipelines in Spinnaker have been configured to send notifications to
+monorail-eng+spinnaker@google.com when:
+
+1.  Any Monorail pipeline fails
+1.  `Deploy Staging` requires manual judgement at the "Continue?" stage.
+1.  `Deploy Production` requires manual judgement at the "Continue?" stage.
+
+## Deploying a new version to an existing instance using Spinnaker
+
+For each release cycle, a new `refs/releases/monorail/[*deployment number*]`
+branch is created at the latest [*commit SHA*] that we want to be part of the
+deployment. Spinnaker will take the [*deployment number*] and deploy from HEAD
+of the matching branch.
+
+Manual testing steps are added during Workflow's weekly meetings for each
+commit between the previous release and this release.
+
+## Spinnaker Deployment steps
+
+If any step below fails. Stop the deploy and ping
+[Monorail chat](http://chat/room/AAAACV9ZZ8k).
+
+1.  Prequalify
+    1.  Check for signs of trouble
+        1.  [go/chops-hangout](http://go/chops-hangout)
+        1.  [Viceroy](http://go/monorail-prod-viceroy)
+        1.  [go/devx-pages](http://go/devx-pages)
+        1.  [GAE dashboard](https://console.cloud.google.com/appengine?project=monorail-prod&duration=PT1H)
+        1.  [Error Reporting](http://console.cloud.google.com/errors?time=P1D&order=COUNT_DESC&resolution=OPEN&resolution=ACKNOWLEDGED&project=monorail-prod)
+    1.  If there are any significant operational problems with Monorail or ChOps
+        in general, halt deploy and notify team.
+1.  Assess
+    1.  View the existing release branches with
+        ```
+        git ls-remote origin "refs/releases/monorail/*"
+        ```
+        Each row will show the deployment's *commit SHA* followed by the branch
+        name. The value after monorail/ is the *deployment number*.
+    1.  Your *deployment number* is the last deployment number + 1.
+    1.  Your *commit SHA* is either from the commit you want to deploy from or
+        the last commit from HEAD. To get the SHA from HEAD:
+        ```
+        git rev-parse HEAD
+        ```
+1.  Create branch
+    1.  Create a new local branch at the desired [*commit SHA*]:
+        ```
+        git checkout -b <your_release_branch_name> [*commit SHA*]
+        ```
+        1.  [Optional] cherry pick another commit that is ahead of
+            [*commit SHA*]:
+            ```
+            git cherry-pick -x [*cherry-picked commit SHA*]
+            ```
+    1.  Push your local branch to remote origin and tag it as
+        <your_release_branch_name>:refs/releases/monorail/x, where x is your *deployment number*:
+        ```
+        git push origin <your_release_branch_name>:refs/releases/monorail/[*deployment number*]
+        ```
+        1.  If the branch already exists, [*commit SHA*] must be ahead of the
+            current commit that the branch points to.
+1.  Update Dev and Staging schema
+    1.  Check for changes since last deploy:
+        ```
+        tail -30 schema/alter-table-log.txt
+        ```
+        If you don't see any changes since the last deploy, skip this section.
+    1.  Copy and paste updates to the
+        [primary DB](http://console.cloud.google.com/sql/instances/primary/overview?project=monorail-dev)
+        in the `monorail-dev` project. Please be careful when pasting into SQL
+        prompt.
+    1.  Copy and paste the new changes into the
+        [primary DB](http://console.cloud.google.com/sql/instances/primary/overview?project=monorail-staging)
+        in staging.
+1.  Start deployment
+    1.  Navigate to the Monorail Delivery page at
+        [go/spinnaker-deploy-monorail](https://spinnaker-1.endpoints.chrome-infra-spinnaker.cloud.goog/#/applications/monorail/executions)
+        in Spinnaker.
+    1.  Identify the `Deploy Monorail` Pipeline.
+    1.  Click "Start Manual Execution".
+        ![start monorail deployment](md_images/start-deploy-monorail.png)
+    1.  The "BUILD_ID" field should be empty.
+    1.  The "ENV" field should be set to "dev".
+    1.  The "BRANCH" field should be set to
+        "refs/releases/monorail/[*deployment number*]".
+    1.  The notifications box can remain unchanged.
+1.  Confirm monorail-dev was successfully deployed (Pipeline: `Deploy Dev`, Stage: "Continue?")
+    1.  Find the new version using the
+        [appengine dev version console](https://pantheon.corp.google.com/appengine/versions?organizationId=433637338589&project=monorail-dev).
+    1.  Visit popular/essential pages and confirm they are all accessible.
+    1.  If everything looks good, choose "Continue" for Deploy Dev.
+    1.  If there is an issue, choose "Rollback" for this stage.
+1.  Test on Staging (Pipeline: `Deploy Staging`, Stage: "Continue?")
+    1.  Find the new version using the
+        [appengine staging version console](https://pantheon.corp.google.com/appengine/versions?organizationId=433637338589&project=monorail-staging).
+    1.  For each commit since last deploy, verify affected functionality still
+        works.
+        1.  Test using a non-admin account, unless you're verifying
+            admin-specific functionality.
+        1.  If you rolled back a previous attempt, make sure you test any
+            changes that might have landed in the mean time.
+        1.  Test that email works by updating any issue with an owner and/or cc
+            list and confirming that the email shows up in
+            [g/monorail-staging-emails](http://g/monorail-staging-emails) with
+            all the correct recipients.
+    1.  If everything looks good, choose "Continue" for Deploy Staging.
+    1.  If there is an issue, choose "Rollback" for this stage.
+1.  Update Prod Schema
+    1.  If you made changes to the Dev and Prod schema, repeat them on the prod
+        database.
+1.  Test on Prod (Pipeline: `Deploy Production`, Stage: "Continue?")
+    1.  Find the new version using the
+        [appengine prod version console](https://pantheon.corp.google.com/appengine/versions?organizationId=433637338589&project=monorail-prod).
+    1.  For each commit since last deploy, verify affected functionality still
+        works. Test using a non-admin account, unless you're verifying
+        admin-specific functionality.
+    1.  Add a comment to an issue.
+    1.  Enter a new issue and CC your personal account.
+    1.  Verify that you got an email
+    1.  Try doing a query that is not cached, then repeat it to test the cached
+        case.
+    1.  If everything looks good, choose "Continue" for Deploy Prod.
+    1.  If there is an issue, choose "Rollback" for this stage.
+1.  Monitor Viceroy and Error Reporting
+    1.  Modest latency increases are normal in the first 10-20 minutes
+    1.  Check
+        [/p/chromium updates page](https://bugs.chromium.org/p/chromium/updates/list).
+    1.  [Chromiumdash](https://chromiumdash.appspot.com/release-manager?platform=Android),
+        should work after deployment.
+1.  Announce the Deployment.
+    1.  Include the [build id](https://screenshot.googleplex.com/KvzoxHEs6Qy.png) of the
+        Cloud Build used for this deployment.
+    1.  Include a link and name of the release branch used for the deployment.
+    1.  Include list of changes that went out (obtained from section 2 above),
+        or via `git log --oneline .` (use `--before` and `--after` as needed).
+    1.  If there were schema changes, copy and paste the commands at the bottom
+        of the email
+    1.  Use the subject line:
+        "Deployed Monorail to staging and prod with release branch [*deployment number*]"
+    1.  Send the email to "monorail-eng@google.com" and
+        "chrome-infra+monorail@google.com"
+1.  Add a new row to the
+    [Monorail Deployment Stats](http://go/monorail-deployment-stats) spreadsheet
+    to help track deploys/followups/rollbacks. It is important to do this even
+    if the deploy failed for some reason.
+
+### Rolling back and other unexpected situations.
+
+If issues are discovered after the "Continue?" stage and traffic migration has
+already started: Cancel the execution and manually start the `Rollback`
+pipeline. ![cancel executions](md_images/cancel-execution.png)
+
+If issues are discovered during the monorail-staging or monorail-prod deployment
+DO NOT forget to also run the `Rollback` pipeline for monorail-dev or
+monorail-dev and monorail-staging, respectively.
+
+If you are ever unsure on how to rollback or clean up unexpected Spinnaker
+errors please ping the [Monorail chat](http://chat/room/AAAACV9ZZ8k) for help.
+
+## Manually Deploying and Rolling back if Spinnaker is down.
+
+### Creating a new app version
+1. From infra/monorail, create a new local branch at the desired [*commit SHA*]. Ensure that the branch has no unmerged changes.
+   ```
+   git checkout -b <your_release_branch_name> [*commit SHA*]
+   ```
+   1.  [Optional] cherry pick another commit that is ahead of
+            [*commit SHA*]:
+            ```
+            git cherry-pick -x [*cherry-picked commit SHA*]
+            ```
+1. run
+   ```
+   eval `../../go/env.py`
+   ```
+1. Create a new version with gae.py (replacing `deploy_dev` with `deploy_staging` or `deploy_prod`, if appropriate):
+   ```
+   make deploy_dev
+   ```
+   1.  [Optional] If you encounter `ImportError: No module named six.moves`, try again after running:
+            [*commit SHA*]:
+            ```
+            sudo `which python` `which pip` install six
+            ```
+1. The new version should show up in pantheon's App Engine's Versions [page](https://pantheon.corp.google.com/appengine/versions?src=ac&project=monorail-dev&serviceId=default). Traffic allocation should be 0%.
+
+### Migrating traffic to a previous or new version
+1. Confirm the new version you want to release or the old version you want to roll back to exists in [pantheon](https://pantheon.corp.google.com/appengine/versions?src=ac&project=monorail-dev&serviceId=api):
+   1. Confirm this for all services (default, besearch, latency-insensitive, api) via the Service dropdown.
+   ![services-dropdown](md_images/pantheon-services-dropdown.png)
+1. Select the desired version and click "Migrate Traffic". REPEAT THIS FOR EVERY SERVICE.
+   ![migrate-traffic](md_images/pantheon-migrate-traffic.png)
+
+
+## Creating and deploying a new Monorail instance
+
+See: [Creating a new Monorail instance](instance.md)
diff --git a/doc/design/data-storage.md b/doc/design/data-storage.md
new file mode 100644
index 0000000..3c2d082
--- /dev/null
+++ b/doc/design/data-storage.md
@@ -0,0 +1,292 @@
+# Monorail Data Storage
+
+## Objective
+
+Monorail needs a data storage system that is expressive, scalable, and
+performs well.
+
+Monorail needs to store complex business objects for projects, issues,
+users, and several other entities.  The tool is central to several
+software development processes, and we need to be able to continue to
+add more kinds of business objects while maintaining high confidence
+in the integrity of the data that we host.
+
+The database needs to scale well past one million issues, and support
+several thousand highly engaged users and automated clients, while
+also handling requests from many thousands more passive visitors.
+While most issues have only a few kilobytes of text, a small number of
+issues can have a huge number of comments, participants, attachments,
+or starrers.
+
+As a broad performance guideline, users expect 90% of operations to
+complete in under one second and 99% of operations to be done in under
+two seconds.  That timeframe must include work for all data
+transmission, and business logic, which leaves under one second for
+all needed database queries.  The system must perform well under load,
+including during traffic spikes due to legitimate usage or attempts to
+DoS the site.
+
+Of course, we need our data storage system to be secure and reliable.
+Even though the data storage system is not accessed directly by user
+requests, there is always the possibility of an SQL injection attack
+that somehow makes it through our request handlers.  We also need
+access controls and policies to reduce insider risks.
+
+## Background
+
+Monorail evolved from code.google.com which used Bigtable for data
+storage and a structured variant of Google's web search engine for
+queries.  Using Bigtable gave code.google.com virtually unlimited
+scalability in terms of table size, and made it easy to declare a
+schema change at any time.  However, it was poor at returning complete
+result sets and did not enforce referential integrity.  Over time, the
+application code accumulated more and more layers of backward
+compatibility with previous data schemas, or the team needed to spend
+big chunks of time doing manual schema migrations.
+
+Monorail is implemented in python and uses protocol buffers to
+represent business objects internally.  This worked well with Bigtable
+because it basically stored protocol buffers natively, but with a
+relational database it requires some ORM code.  The construction of
+large numbers of temporary objects can make python performance
+inconsistent due to the work needed to construct those objects and the
+memory management overhead.  In particular, the ProtoRPC library can
+be slow.
+
+## Approach
+
+Monorail uses Google Cloud SQL with MySQL as its main data storage
+backend.  The key advantages of this approach are that it is familiar
+to many engineers beyond Google, scales well to several million rows,
+allows for ad-hoc queries, enforces column types and referential
+integrity, and has easy-to-administer access controls.
+
+We mitigate several of the downsides of this approach as follows:
+
+*  The complexity of forming SQL statements is handled by `sql.py`
+   which exposes python functions that offer most options as keyword
+   parameters.
+
+*  The potential slowness of executing complex queries for issue search
+   is managed by sharding queries across replicas and using an index
+   that includes a `shard_id` column.
+
+*  The slowness of constructing protocol buffers is avoided by using a
+   combination of RAM caches and memcache.  However, maintaining
+   distributed caches requires distributed invalidation.
+
+*  The complexity of ORM code is managed by organizing it into classes
+   in our services layer, with much of the serialization and
+   deserialization code in associated cache management classes.
+
+*  The security risk of SQL injection is limited by having all code
+   paths go through `sql.py` which consistently makes use of the
+   underlying MySQL library to do escaping, and checks each statement
+   against an allow-list of regular expressions to ensure that no
+   user-controlled elements are injected.
+
+## Detailed design: Architecture
+
+Monorail is a GAE application with multiple services that each have
+automatic scaling of the number of instances.  The database is a MySQL
+database with one primary for most types of reads and all writes, plus
+a set of read-only replicas that are used for sharded issue queries
+and comments.  The main purpose of the sharded replicas is to
+parallelize the work needed to scan table rows during issue search
+queries, and to increase the total amount of RAM used for SQL sorting.
+A few other queries are sent to random replicas to reduce load on the
+primary.
+
+To increase the DB RAM cache hit ratio, each logical data shard is
+sent to a specific DB replica.  E.g., queries for shard 1 are sent to
+DB replica 1.  In cases where the desired DB replica is not available,
+the query is sent to a random replica.  An earlier design iteration
+also required `besearch` GAE instances to have 1-to-1 affinity with DB
+replicas, but that constraint was removed in favor of automatic
+scaling of the number of `besearch` instances.
+
+## Detailed design: Protections against SQL injection attacks
+
+With very few exceptions, SQL statements are not formed in any other
+place in our code than in `sql.py`, which has had careful review.
+Values used in queries are consistently escaped by the underlying
+MySQL library.  As a further level of protection, each SQL statement
+is matched against an allow-list of regular expressions that ensure
+that we only send SQL that fits our expectations.  For example,
+`sql.py` should raise an exception if an SQL statement somehow
+specified an `INTO outfile` clause.
+
+Google Cloud SQL and the MySQL library also have some protections
+built in.  For example, a statement sent to the SQL server must be a
+single statement: it cannot have an unescaped semicolon followed by a
+second SQL statement.
+
+Also, to the extent that user-influenced queries are sent to DB
+replicas, even a malicious SQL injection could not alter data or
+permissions because the replicas are read-only.
+
+## Detailed design: Two-level caches and distributed cache invalidation
+
+Monorail includes an `AbstractTwoLevelCache` class that combines a
+`RAMCache` object with logic for using memcache.  Each two-level cache
+or RAM cache is treated like a dictionary keyed by an object ID
+integer.  For example, the user cache is keyed by user ID number.
+Each cache also has a `kind` enum value and a maximum size.  When a
+cache is constructed, it registers with a singleton `CacheManager`
+object that is used during distributed invalidation.
+
+Each type of cache in Monorail implements a subclass of
+`AbstractTwoLevelCache` to add logic for retrieving items from the
+database on a cache miss and deserializing them.  These operations all
+work as batch operations to retrieve a collection of keys into a
+dictionary of results.
+
+When retrieving values from a two-level cache, first the RAM cache in
+that GAE instance is checked.  On a RAM miss, memcache is checked.  If
+both levels miss, the `FetchItems()` method in the cache class is run
+to query the database and deserialize DB rows into protocol buffer
+business objects.
+
+Values are never explicitly added to a two-level cache by calling
+code.  Adding an item to the cache happens only as a side effect of a
+retrieval that had a cache miss and required a fetch.
+
+When services-level code updates a business object in the database, it
+calls `InvalidateKeys()` on the relevant caches.  This removes the old
+key and value from the local RAM cache in that GAE instance and
+deletes any corresponding entry in memcache.  Of course, updating RAM
+in one GAE instance does not affect any stale values that are cached
+in the RAM of other GAE instances.  To invalidate those items, a row
+is inserted into the `Invalidate` table in the DB.  In cases where it
+is easier to invalidate all items of a given kind, the value zero is
+used as a wildcard ID.
+
+Each time that any GAE instance starts to service a new incoming
+request, it first checks for any new entries in the `Invalidate`
+table.  For up to 1000 rows, the `CacheManager` drops items from all
+registered RAM caches that match that kind and ID.  Request processing
+then proceeds, and any attempts to retrieve stale business objects
+will cause cache misses that are then loaded from the DB.
+
+Always adding rows to the `Invalidate` table would eventually make
+that table huge.  So, Monorail uses a cron task to periodically drop
+old entries in the `Invalidate` table.  Only the most recent 1000
+entries are kept.  If a GAE instance checks the `Invalidate` table and
+finds that there are 1000 or more new entries since the list time it
+checked, the instance will flush all of its RAM caches.
+
+Invalidating local caches at the start of each request does not handle
+the situation where one GAE instance is handling a long-running
+request and another GAE instance updates business objects at the same
+time.  The long-running request may have retrieved and cached some
+business objects early in the request processing, and then use a stale
+cached copy of one of those same business objects later, after the
+underlying DB data has changed.  To avoid this, services-level code
+that updates business objects specifies the keyword use_cache=False to
+retrieve a fresh copy of the object for each read-modify-write
+operation.  As a further protection, the Issue protocol buffer has an
+`assume_stale` boolean that helps check that issues from the cache are
+not written back to the database.
+
+## Detailed design: Read-only mode
+
+Monorail has a couple of different levels of read-only modes.  The
+entire site can be put into a read-only mode for maintenance by
+specifying `read_only=True` in `settings.py`.  Also, individual
+projects can be put into read-only mode by setting the
+`read_only_reason` field on the project business object.
+
+Read-only projects are a vestigial code.google.com feature that is not
+currently exposed in any administrative UI.  It is implemented by
+passing an EZT variable which causes `read-only-rejection.ezt` to be
+shown to the user instead of the normal page content.  This UI-level
+condition does not prevent API users from performing updates to the
+project.  In fact, even users who have existing pages open can submit
+forms to produce updates.
+
+The site-wide read-only mode is implemented in `registerpages.py` to
+not register POST handlers when the site is in read-only mode for
+maintenance.  Also, in both the Endpoints and pRPC APIs there are
+checks that reject requests that make updates during read-only mode.
+
+## Detailed design: Connection pooling and the avoid list
+
+It is faster to use an existing SQL connection object than to create a
+new one.  So, `sql.py` implements a `ConnectionPool` class to keep SQL
+connection objects until they are needed again.  MySQL uses implicit
+transactions, so any connection keeps reading data as it existed at
+the time of the last commit on that connection.  To get fresh data, we
+do an empty commit on each connection at the time that we take it from
+the pool.  To ensure that that commit is really empty, we roll back
+any uncommitted updates for any request that had an exception.
+
+A `MonorailConnection` is a collection of SQL connections with one for
+the primary DB and one for each replica that is used during the current
+request.  Creating a connection to a given replica can fail if that
+replica is offline.  Replicas can be restarted by the Google Cloud SQL
+service at any time, e.g., to update DB server software.  When
+Monorail fails to create a connection to a replica, it will simply use
+a different replica instead.  However, the process of trying to
+connect can be slow.  So, Monorail implements a dictionary with the
+shard IDs of any unavailable replicas and the timestamp of the most
+recent failure.  Monorail will avoid an unavailable replica for 45
+seconds, giving it time to restart.
+
+## Detailed design: Search result caches
+
+This is described in [how-search-works.md](how-search-works.md).
+
+## Detailed design: Attachments
+
+Monorail's SQL database contains rows for issue attachments that
+contain information about the attachment, but not the attachment
+content.
+
+Attachment content is stored in Google Cloud Storage.  Each attachment
+is given a path of the form `/BUCKET/PROJECT_ID/attachments/UUID`
+where UUID is a string with random hexadecimal digits generated by
+python's [uuid
+library](https://docs.python.org/2.7/library/uuid.html).  Each GCS
+object has options specified which includes a `Content-Disposition`
+header value with the desired filename.  We use the name of the
+uploaded file in cases where it is known to be safe to keep it,
+otherwise we use `attachment.dat`.
+
+The MIME type of each attachment is determined from the file name and
+file contents.  If we cannot determine a well-known file type,
+`application/octet-stream` is used instead.
+
+For image attachments, we generate a thumbnail-sized version of the
+image using GAE's
+[image](https://cloud.google.com/appengine/docs/standard/python/images/)
+library at upload time.
+
+Attachments are served to users directly from GCS via a signed link.
+The risk of malicious attachment content is reduced by using a
+different "locked domain" for each attachment link.  This prevents any
+Javascript in an attachment from accessing cookies intended for our
+application or any other website or even another attachment.
+
+## Detailed design: Secrets
+
+Monorail stores some small pieces of data in Datastore rather than
+Google Cloud Storage.  This data includes the secret keys used to
+generate XSRF tokens and authentication headers for reply emails.
+These keys will never be a valid part of any SQL data export, so they
+would need to be excluded from access granted to any account used for
+SQL data export.  Rather than take on that complexity, we used
+Datastore instead, and we do not grant access for anyone outside the
+Monorail team to access the project's Datastore entities.
+
+## Detailed design: Source code locations
+*  `framework/sql.py`: Table managers, connection pools, and other utilities.
+*  `framework/filecontent.py`: Functions to determine file types for
+    attachments.
+*  `framework/gcs_helpers.py`: Functions to write attachments into Google
+    Cloud Storage.
+*  `services/caches.py`: Base classes for caches.
+*  `services/cachemanager.py`: Code for distributed invalidation and cron job
+    for the `Invalidate` table.
+*  `services/secrets_svc.py`: Code to get secret keys from Datastore.
+*  `services/*.py`: Persistence code for business objects.
+*  `settings.py`: Configuration of DB replicas and read_only mode.
diff --git a/doc/design/emails.md b/doc/design/emails.md
new file mode 100644
index 0000000..851e072
--- /dev/null
+++ b/doc/design/emails.md
@@ -0,0 +1,333 @@
+# Monorail email design
+
+## Objective
+
+Monorail needs a strong outbound and inbound email strategy that keeps
+our users informed when issues require their attention.  We generate a
+variety of outbound messages.  We accept inbound email replies from
+human users who find it easier to post comments via email.  And, we
+integrate with alerts monitoring via inbound email.
+
+Our email features must scale up in several dimensions, including:
+
+*  The number of messages generated, which is driven by the issue
+   activity
+
+*  The number of distinct types of notifications that the tool can
+   generate
+
+*  The amount of inbound replies, alerts, as well as spam and bounce
+   notifications
+
+*  The variety of access controls needed for sensitive issues and
+   different types of users
+
+## Background
+
+Monorail is a [different-time, different-place CSCW
+application](https://en.wikipedia.org/wiki/Computer-supported_cooperative_work)
+in which users may need to work with each other on multiple occasions
+to resolve an issue.  Furthermore, the exact set of collaborators
+needed to resolve a given issue is discovered as part of the work for
+that issue rather than being known from the start.  And, each issue
+participant is likely to be highly multitasking across several issues
+and other development tasks.  As is normal for issue tracking tools,
+we send email notifications to issue participants for each issue
+change.  However, because participants can get a fair number of emails
+from us, they want to be able to filter those emails based on the
+reason why the email was sent to them.
+
+Email is not an inherently secure or private technology.  We trust
+that email is delivered to the recipient without being read by any
+servers along the way.  However, some email addresses may be
+individual users and others might be mailing lists, so we "nerf"
+messages in cases where Monorail has no indication that the recipient
+is an individual.  Also, it is possible to forge an email reply, so we
+rely on shared secrets to authenticate that an inbound message came
+from a given user.  Because the email sender line is so vulnerable to
+abuse, GAE does not allow GAE apps to set that header arbitrarily.
+Instead, we rely on a combination of supported email senders, DNS SPF
+entries, and friendly `From:` lines.
+
+Users sometimes make mistakes when entering email addresses, and email
+accounts can be shut down over time, both of these situations generate
+bounce emails.  Continued generation of outbound emails that bounce is
+a waste of resources and quota.
+
+## Approach
+
+To keep issue participants engaged, whenever an issue is created or
+has a new comment, we send email notifications to the issue owner,
+CC'd users, users who have starred the issue, and users who have
+subscriptions that match the new state of the issue.  Monorail
+generates notifications for individual issue changes, as well as bulk
+edits, blocking notifications, and approval changes.  Monorail has a
+special rule for "noisy" issues, which is to only generate emails when
+project members post comments.  Also, when a date-type field has a
+date value for a date that has arrived, we send a "follow-up" email to
+remind the user to update the issue.
+
+Monorail sends individual emails to each recipient rather than adding
+them all to one long `Cc:` line.  The reason for this is so that we
+can personalize the content of the message to each user based on their
+preferences, the reason why the message was sent to them, and our
+level of trust of that address.  Also, using individual messages
+allows us to authenticate replies with a secret that is shared
+individually with each user.  And, individual emails ensure that email
+replies come directly back to Monorail rather than going to other
+issue participants.  This reduces cases of duplicate emails and allows
+for enforcement of permissions that might have changed after an
+earlier notification was sent.
+
+To keep outbound emails organized as threads in recipients' inboxes,
+we set a `References:` header message ID that is used for all messages
+that belong in that thread.  However, as a GAE app, Monorail has no
+way to access the message ID of any actual outbound email.  Also, any
+given thread participant might join the conversation late, after
+missing the first email message that would have anchored the thread.
+So, instead of using actual message IDs, we generate a synthetic
+message ID that represents the thread as a whole and then reference
+that same ID from each email.
+
+When we send outbound emails, we include a shared secret in the
+`References:` header that an email client will echo back in the reply,
+much like a cookie.  When we receive an inbound email, we verify that
+the `References:` header includes a value that is appropriate to the
+specified user and issue.  One exception to this rule is that we allow
+inbound emails from the alert system (Monarch).
+
+Bounces are handled by flagging the user account with a bouncing
+timestamp.  Monorail will not attempt to send any more emails to a
+bouncing user account.  A user can clear the bouncing timestamp by
+clicking a button on their user profile page.
+
+An inbound email is first verified to check the identity of the sender
+and the target issue.  After permissions are checked, the message body
+is parsed.  The first few lines of the body can contain assignments to
+the issue summary, status, labels, and owner.  The rest of the body is
+posted to the issue as a comment.  Common email message footers and
+.sig elements are detected and stripped from the comment.  The
+original email message is also stored in the DB and can be viewed by
+project owners.
+
+## Detailed design: Architecture
+
+Monorail is a GAE application with several services.  The `default`
+service responds to user requests, while the `latency-insensitive`
+service executes a variety of cron jobs and follow-up tasks.
+
+Outbound email is generated in tasks that run in the
+`latency-insensitive` service so as to remove that work from the time
+needed to finish the user's request, and to avoid spikes in `default`
+instance allocations when many outbound emails are generated at one
+time.  We use automatic scaling, but turnover in `default` instances
+would lower the RAM cache hit ratio.
+
+Inbound email is currently handled in the `default` service.  However,
+those requests could be routed to the `latency-insensitive` service in
+the future.
+
+## Detailed design: Domain configuration
+
+Monorail serves HTTP requests sent to the `monorail-prod.appspot.com`
+domain as well as `bugs.chromium.org` and other "branded" domains
+configured in `settings.py` and the GAE console.  These custom domains
+are also used in the email address part of the `From:` line of outbound
+emails.  They must be listed as `monorail@DOMAIN` in the email senders
+tab of the settings page for the GAE app.
+
+The `Reply-To:` line is always set to
+`PROJECTNAME@monorail-prod.appspotmail.com` and is not branded.
+
+The DNS records for each custom domain must include a TXT record like
+`v=spf1 include:_spf.google.com ?all` to tell other servers to trust
+that the email sent from a certain list of SMTP servers is legitimate
+for our app.
+
+## Detailed design: Key algorithms and data structures
+
+`User` protocol buffers include a few booleans for the user's
+preferences for email notifications.
+
+When generating a list of notification recipients, Monorail builds a
+data structure called a `group_reason_list` which pairs
+`addr_perm_lists` with reasons why those addresses are being notified.
+Each `addr_perm_list` is a list of named tuples that have fields for a
+project membership boolean, an email address, an optional `User`
+protocol buffer, a constant indicating whether that user has permission
+to reply, and a `UserPrefs` protocol buffer.
+
+The `group_reason_list` is built up by code that is specific to each
+reason.  A given email address might be notified for more than one
+reason.  Then, that list is inverted to make a dictionary keyed by
+recipient email address that lists the reasons why that address was
+notified.  Entries for linked accounts are then merged.  And, the list
+of reasons is used to add a footer to the email body that lists the
+specific reasons for that user.
+
+When generating an outbound email, we add a `References:` header to
+make the messages for the same issue thread together and to
+authenticate any reply.  That header value is computed using a hash of
+the user's email address and the subject line of the emails (which
+includes the project name and issue ID number).  Each part is combined
+with a secret value stored in Cloud Datastore and accessed via
+`secrets_svc.py`.
+
+Most outbound emails include the summary line of the issue, the
+details of any updates, and the text of the comment.  However, there
+are some cases where Monorail sends a "nerfed" safe subset of
+information that consists only of a link to the issue and a generic
+message saying that the issue has been created or updated.  We send a
+link-only notification when the issue is restricted and the recipient
+may be a mailing list.  Monorail cannot know if an email address
+represents a mailing list or an individual user, so it assumes that
+any address corresponding to a `User` record which has never visited
+the site is a mailing list.
+
+Monorail considers an issue to be "noisy" if the issue already has
+more than 100 comments and more than 100 starrers.  Such issues can
+generate a huge amount of email that would consume our quota and have
+low value for most recipients.  A large amount of chatter by
+non-members can make it harder for project members to notice the
+comments that are important to resolving the issue.  Monorail only
+sends notifications for noisy issues if the comment author is a
+project member.
+
+## Detailed design: Code walk-throughs
+
+### Individual issue change
+
+1. User A posts a comment on an existing issue 123.
+
+1.  The user's request is handled by the `default` GAE service.
+    `work_env` coordinates the steps to update issue 123 in the
+    database and invalidate it in caches.
+
+1.  `work_env` calls `PrepareAndSendIssueChangeNotification()` to
+    create a task entry that includes a reference to the new comment
+    and a field to omit user A being notified.
+
+1.  That task is processed by the `latency-insensitive` GAE service by
+    the `NotifyIssueChangeTask` handler.  It determines if the issue is
+    noisy, gathers potential recipents by reasons, omits the comment
+    author, and checks whether each recipient would be allowed to view
+    the issue.  Three different email bodies are prepared: one for
+    non-members that has other users' email addresses obscured, one
+    for members that reveals email addresses, and one for link-only
+    notifications.
+
+1.  The group reason list is then passed to
+    `MakeBulletedEmailWorkItems()` which inverts the list, adds
+    personalized footers, and converts the plain text email body into
+    a simple HTML formatted email body.  It then returns a list with a
+    new task record for each email message to be sent.
+
+1.  If the generation task fails for any reason, it will be retried,
+    but no email messages are actually sent on the failed run.  If the
+    entire process up to this point succeeds, then
+    `AddAllEmailTasks()` is called to enqueue each of the single
+    message tasks.
+
+1.  Those tasks are handled by the `OutboundEmailTask` handler in the
+    `latency-insensitve` service.  Individual tasks are used for each
+    outbound email because sending emails can sometimes fail.  Each
+    task is automatically retried without rerunning other tasks.
+
+### Bulk issue change
+
+The process is similar to the individual issue change process, except
+that a list of allowed recipients is made for each issue.  Then, that
+list is inverted to make a list of issues that a given recipient
+should be notified about.  This is done in the `NotifyBulkChangeTask`
+handler.
+
+When a given recipient is to be notified of multiple issues that were
+changed, the email message body lists the updates made and then lists
+each of the affected issues.  In contrast, when a given recipient is
+to be notified of exactly one issue, the body is formatted to look
+like the individual issue change notification.
+
+### Blocking change
+
+When issue 123 is edited to make it blocked on issue 456, participants
+in the upstream issue (456) are notified.  Likewise, when a blocking
+relationship is removed, another notification is sent.  This is done
+by the `NotifyBlockingChangeTask` handler.
+
+### Approval issue change
+
+This is handled by `NotifyApprovalChangeTask`.
+
+TODO: needs more details.
+
+### Date-action notifications
+
+Some date-type custom fields can be configured to send follow-up
+reminders when the specified date arrives.
+
+1.  The date-action cron task runs once each day as configured in
+    `cron.yaml`.
+
+1.  The `DateActionCron` handler is run in the `latency-insensitive`
+    GAE service.  It does an SQL query to find issues that have a
+    date-type field set to today's date and that is configured to send
+    a notification.  For each such issue, it enqueues a new task to
+    handle that date action.
+
+1.  Each of those tasks is handled by `IssueDateActionTask` which
+    works like an individual email notification.  The main difference
+    is that issue subscribers are not notified and issue starrers are
+    only notified if they have opted into that type of notification.
+    The handler posts a comment to the issue, calls
+    `ComputeGroupReasonList()` to compute a group reason list, calls
+    `MakeBulletedEmailWorkItems()` to make individual message tasks,
+    and calls `AddAllEmailTasks()` to enqueue those email tasks.
+
+### Inbound email processing
+
+TODO: needs more details
+
+### Alerts
+
+TODO: needs more details
+
+## Detailed design: Source code locations
+
+*  `settings.py`: Configuration of branded domains.  Also, email
+   From-line string templates that are used to re-route email
+   generated on the dev or staging servers.
+
+*  `businesslogic/work_env.py`: Internal handlers for many changes such
+   as updating issues.  It checks permissions, coordinates updates to
+   various backends, and enqueues tasks for follow-up work such as
+   sending notifications.
+
+*  `features/notify.py`: This file has most email notification task
+   handlers.
+
+*  `features/notify_reasons.py`: Functions to compute `AddrPermLists`
+   from a list of potential recipients by checking permissions and
+   looking up user preferences.  It combines these lists into an
+   overall group reason list.  Also, computes list of issue
+   subscribers by evaluating saved queries.
+
+*  `features/notify_helpers.py`: Functions to generate personalized
+   email bodies and enqueue lists of individual email tasks based on a
+   group reason list.
+
+*  `features/dateaction.py`: Cron task for the date-action feature and
+   task handler to generate the follow-up comments and email
+   notifications.
+
+*  `features/inboundemail.py`: Handlers for inbound email messages and
+   bounce messages.
+
+*  `features/commands.py` and `features/commitlogcomands.py`: Parsing
+   and processing of issue field assignment lines that can be at the
+   top of the body of an inbound email message.
+
+*  `features/alert2issue.py`: Functions to parse emails from our alert
+   monitoring service and then create or update issues.
+
+*  `framework/emailfmt.py`: Utility functions for parsing and
+   generating email headers.
diff --git a/doc/design/how-search-works.md b/doc/design/how-search-works.md
new file mode 100644
index 0000000..c724223
--- /dev/null
+++ b/doc/design/how-search-works.md
@@ -0,0 +1,395 @@
+# How Search Works in Monorail
+
+[TOC]
+
+## Objective
+
+Our goal for Monorail's search design is to provide a fast issue
+search implementation for Monorail that can scale well past one
+million issues and give results in about two seconds.  Monorail
+supports a wide range of query terms, so we cannot simply predefine
+indexes for all possible queries.  Monorail also needs to be
+scalable in the number of requests to withstand DoS attacks,
+ill-behaved API clients, and normal traffic spikes.  A key requirement
+of Monorail's search is to give exact result counts even for fairly
+large result sets (up to 100,000 issues).
+
+## Background
+
+From 2005 to 2016, we tracked issues on code.google.com, which stored
+issues in Bigtable and indexed them with Mustang ST (a structured
+search enhancement to Google's web search).  This implementation
+suffered from highly complex queries and occasional outages.  It
+relied on caching to serve popular queries and could suffer a
+"stampede" effect when the cache needed to be refilled after
+invalidations.
+
+When the Monorail SQL database was being designed in 2011, Google
+Cloud SQL was much slower than it is today.  Some key factors made a
+non-sharded design unacceptable:
+
+*  The SQL database took too long to execute a query.  Basically, the
+   time taken is proportional to the number of `Issue` table rows
+   considered.  While indexes are used for many of Monorail's other
+   queries, the issue search query is essentially a table scan in many
+   cases.  The question is how much of the table is scanned.
+
+*  Getting SQL result rows into python was slow.  The protocol between
+   the database and app was inefficient, prompting some significant
+   work-arounds that were eventually phased out.  And, constructing a
+   large number of ProtoRPC internal business objects was slow.  Both
+   steps were CPU intensive.  Being CPU-bound produced a poor user
+   experience because the amount of CPU time given to a GAE app is
+   unpredictable, leading to frustrating latency on queries that
+   seemed fine previously.
+
+## Overview of the approach
+
+The design of our search implementation basically addresses these
+challenges point-by-point:
+
+Because there is no one index that can narrow down the number of table
+rows considered for all possible user issue queries, we sharded the
+database so that each table scan is limited to one shard.  For
+example, with 10 shards, we can use 10 database instances in parallel,
+each scanning only 1/10 of the table rows that would otherwise be
+scanned.  This saves time in retrieving rows.  Using 10 DB instances
+also increases the total amount of RAM available to those instances
+which increases their internal cache hit ratio and allows them to do
+more sorting in RAM rather than using slower disk-based methods.
+
+Because constructing ProtoRPC objects was slow, we implemented RAM
+caches and used memcache to reduce the number of issues that need to
+be loaded from the DB and constructed in python for any individual
+user request.  Using RAM caches means that we can serve traffic spikes
+for popular issues and queries well, but it also required us to
+implement a distributed cache invalidation feature.
+
+Sharding queries at the DB level naturally led to sharding requests
+across multiple besearch instances in python.  Using 10 besearch
+instances gives 10x the amount of CPU time available for constructing
+ProtoRPC objects.  Of course, sharding means that we needed to
+implement a merge sort to produce an overall result list that is
+sorted.
+
+Another aspect of our approach is that we reduce the work needed in
+the main SQL query as much as possible by mapping user-oriented terms
+to internal ID integers in python code before sending the query to
+SQL.  This mapping could be done via JOIN clauses in the query, but
+the information needed for these mappings rarely changes and can be
+cached effectively in python RAM.
+
+
+## Detailed design: Architecture
+
+The parts of Monorail's architecture relevant to search consists of:
+
+*  The `default` GAE service that handles incoming requests from users,
+   makes sharded queries to the `besearch` service, integrates the
+   results, and responds to the user.
+
+*  The `besearch` GAE service that handles sharded search requests from
+   the `default` module and communicates with a DB instance.  The
+   `besearch` service handles two kinds of requests: `search` requests
+   which generate results that are not permission-checked so that they
+   can be shared among all users, and `nonviewable` requests that do
+   permission checks in bulk for a given user.
+
+* A primary DB instance and 10 replicas.  The database has an
+   Invalidate table used for distributed invalidation.  And,
+   issue-related tables include a `shard` column that allows us to
+   define a DB index that includes the shard ID.  The worst (least
+   specific) key used by our issue query is typically `(shard,
+   status_id)` when searching for open issues and `(shard,
+   project_id)` when searching all issues in a project.
+
+*  There are RAM caches in the `default` and `besearch` service
+   instances, and we use memcache for both search result sets and for
+   business objects (e.g., projects, configs, issues, and users).
+
+*  Monorail uses the GAE full-text search index library for full-text
+   terms in the user query.  These terms are processed before the
+   query is sent to the SQL database.  The slowness of GAE full-text
+   search and the lack of integration between full-text terms and
+   structured terms is a weakness of the current design.
+
+## Detailed design: Key algorithms
+
+### Query parsing
+
+To convert the user's query string into an SQL statement,
+FrontendSearchPipeline first parses parentheses and OR statemeents, splitting
+up a query into separate subqueries that can be retrieved from the cache or
+sent to different backend shards.
+
+The generated subqueries should collectively output the same set of search
+results as the initial query, but without using ORs or parentheses in their
+syntax. An example is that the query `'A (B OR C)'` would be split into the
+subqueries `['A B', 'A C']`.
+
+Then, each besearch shard parses the subquery it was assigned using the helpers
+in search/query2ast.  We first parse the into query terms using regular
+expressions.  Then, we build an abstract syntax tree (AST).  Then, we simplify
+that AST by doing cacheable lookups in python.  Then, we convert the simplified
+AST into a set of LEFT JOIN, WHERE, and ORDER BY clauses.
+
+It is possible for a query to fail to parse and raise an exception
+before the query is executed.
+
+### Result set representations
+
+We represent issue search results as lists of global issue ID numbers
+(IIDs).  We represent nonviewable issues as sets of IIDs.
+
+To apply permission checks to search results, we simply use set
+membership: any issue IID that is in the nonviewable set for the
+current user is excluded from the allowed results.
+
+### Sharded query execution
+
+To manage sharded requests to `besearch` backends, the
+`FrontendSearchPipeline` class does the following steps:
+
+1.  The constructor checks the user query and can determine an error
+    message to display to the user.
+
+1.  `SearchForIIDs()` calls `_StartBackendSearch()` which determines
+    the set of shards that need to be queried, checks memcache for
+    known results and calls backends to provide any missing results.
+    `_StartBackendSearch()` returns a list of rpc_tuples, which
+    `SearchForIIDs()` waits on.  Each rpc_tuple has a callback that
+    contains some retry logic.  Sharded nonviewable IIDs are also
+    determined. For each shard, the allowed IIDs for the current user
+    are computed by removing nonviewable IIDs from the list of result
+    IIDs.
+
+1.  `MergeAndSortIssues()` merges the sharded results into an overall
+    result list of allowed IIDs by calling `_NarrowFilteredIIDs()` and
+    `_SortIssues()`.  An important aspect of this step is that only a
+    subset of issues are retrieved.  `_NarrowFilteredIIDs()` fetches a
+    small set of sample issues and uses the existing sorted order of
+    IIDs in each shard to narrow down the set of issues that could be
+    displayed on the current pagination page.  Once that subset is
+    determined, `_SortIssues()` calls methods in
+    `framework/sorting.py` to do the actual sorting.
+
+### Issue position in list
+
+Monorail's flipper feature also uses the `FrontendSearchPipeline`
+class, but calls `DetermineIssuePosition()` rather than
+`MergeAndSortIssues()`.  `DetermineIssuePosition()` also retrieves
+only a subset of the issues in the allowed IIDs list.  For each shard,
+it uses a sample of a few issues to determine the sub-range of issues
+that must be retrieved, and then sorts those with the current issue to
+determine the number of issues in that shard that would precede the
+currently viewed issue.  The position of the current issue in the
+overall result list is the sum of the counts of preceding issues in
+each shard.  Candidates for the next and previous issues are also
+identified on a per-shard basis, and then the overall next and
+previous issues are determined.
+
+
+### Memcache keys and invalidation
+
+We cache search results keyed by query and shard, regardless of the
+user or their permissions.  This allows the app to reuse cached
+results for different users.  When issues are edited, we only need to
+invalidate the shard that that issue belongs to.
+
+The key format for search results in memcache is `memcache_key_prefix,
+subquery, sd_str, sid`, where:
+
+ * `memcache_key_prefix` is a list of project IDs or `all`
+ * `subquery` is the user query (or one OR-clause of it)
+ * `sd_str` is the sort directive
+ * `sid` is the shard ID number
+
+If it were not for cross-project search, we would simply cache when we
+do a search and then invalidate when an issue is modified.  But, with
+cross-project search we don't know all the memcache entries that would
+need to be invalidated.  So, instead, we write the search result cache
+entries and then an initial modified_ts value for each project if it
+was not already there. And, when we update an issue we write a new
+modified_ts entry for that issue's project shard. That entry
+implicitly invalidates all search result cache entries that were
+written earlier because they are now stale.  When reading from the
+cache, we ignore any cache entry that corresponds to a project with
+modified_ts after the cached search result timestamp, because it is
+stale.
+
+We cache nonviewable IID sets keyed by user ID, project ID, and shard
+ID, regardless of query.  We only need to invalidate cached
+nonviewable IDs when a user role is granted or revoked, when an issue
+restriction label is changed, or a new restricted issue is created.
+
+
+## Detailed design: Code walk-throughs
+
+### Issue search
+
+1. The user makes a request to an issue list page.  For the EZT issue
+   list page, the usual request handling is done, including a call to
+   `IssueList#GatherPageData()`.  For, the web components list page or
+   an API client, the `ListIssues()` API handler is called.
+
+1. One of those request handlers calls `work_env.ListIssues()` which
+   constructs a `FrontendSearchPipeline` and works through the entire
+   process to generate the list of issues to be returned for the
+   current pagination page.  The pipeline object is returned.
+
+The `FrontendSearchPipeline` process steps are:
+
+1.  A `FrontendSearchPipeline` object is created to manage the search
+    process.  It immediately parses some simple information from the
+    request and initializes variables.
+
+1.  `WorkEnv` calls `SearchForIIDs(`) on the
+    `FrontendSearchPipeline`. It loops over the shards and:
+
+  * It checks memcache to see if that (query, sort, shard_id) is
+    cached and the cache is still valid.  If found, these can be used
+    as unfiltered IIDs.
+
+  * If not cached, it kicks off a request to one of the GAE `besearch`
+    backend instances to get fresh unfiltered IIDs.  Each backend
+    translates the user query into an SQL query and executes it on one
+    of the SQL replicas.  Each backend stores a list of unfiltered
+    IIDs in memcache.
+
+  * In parallel, unviewable IIDs for the current user are looked up in
+    the cache and possibly requested from the `besearch` backends.
+
+  * Within each shard, unviewable IIDs are removed from the unfiltered
+    IIDs to give sharded lists of filtered IIDs.
+
+  * Sharded lists of filtered IIDs are combined into an overall result
+    that has only the issues needed for the current pagination page.
+    This step involves retrieving sample issues and a few distinct
+    sorting steps.
+
+  * Backend calls are made with the `X-AppEngine-FailFast: Yes` header
+    set, which means that if the selected backend is already busy, the
+    request immediately fails so that it can be retried on another
+    backend that might not be busy.  If there is an error or timeout
+    during any backend call, a second attempt is made without the
+    `FailFast` header. If that fails, that failure results in an error
+    message saying that some backends did not respond.
+
+### Issue flipper
+
+For the issue detail page, we do not need to completely sort and
+paginate the issues.  Instead, we only need the count of allowed
+issues, the position of the current issue in the hypothetically sorted
+list, and the IDs of the previous and next issues, if any, which we
+call the "flipper" feature.
+
+As of December 2019, the flipper does not use the pRPC API yet.
+Instead, it uses an older JSON servlet implementation.  When it is
+implemented in the pRPC API, only the first few steps listed below
+will change.
+
+The steps for the flipper are:
+
+1.  The web components version of the issue detail page makes an XHR
+    request to the flipper servlet with the search query and the
+    current issue ref in query string parameters.
+
+1.  The `FlipperIndex` servlet decides if a flipper should be shown,
+    and whether the request is being made in the context of an issue
+    search or a hotlist.
+
+1.  It calls `work_env.FindIssuePositionInSearch()` to get the
+    position of the current issue, previous and next issues, and the
+    total count of allowed search results.
+
+1.  Instead of calling the pipeline's `MergeAndSortIssues()`, the
+    method `DetermineIssuePosition()` is called.  It retrieves only a
+    small fraction of the issues in each shard and determines the
+    overall position of the current issue and the IID of the preceding
+    and following issues in the sorted list.
+
+We also have special servlets that redirect the user to the previous
+or next issues given a current issue and a query.  These allow for
+faster navigation when the user clicks these links or uses the `j` or
+`k` keystrokes before the flipper has fully loaded.
+
+
+### Snapshots
+
+To power the burndown charts feature, every issue create and update operation
+writes a new row to the `IssueSnapshot` table. When a user visits a chart page,
+the search pipeline runs a `SELECT COUNT` query on the `IssueSnapshot` table,
+instead of what it would normally do, running a `SELECT` query on the `Issue`
+table.
+
+Any given issue will have many snapshots over time. The way we keep track of
+the most recent snapshots are with the columns `IssueSnapshot.period_start`
+and `IssueSnapshot.period_end`.
+
+If you imagine a Monorail instance with only one issue, each time we add
+a new snapshot to the table, we update the previous snapshot's `period_end`
+and the new snapshot's `period_start` to be the current unix time. This means
+that for a given range (period_start, period_end), there is only one snapshot
+that applies. The most recent snapshot always has its period_end set to
+MAX_INT.
+
+    Snapshot ID:  1         2         3                 MAX_INT
+
+    Unix time:
+    1560000004                        +-----------------+
+    1560000003              +---------+
+    1560000002    +---------+
+
+
+## Detailed design: Source code locations
+
+*  `framework/sorting.py`: Sorting of issues in RAM.  See sorting
+   design doc.
+
+*  `search/frontendsearchpipeline.py`: Where searches are processed first.
+   Sequences events for hitting sharded backends.  Does set logic to remove
+   nonviewable IIDs from the current user's search results.
+   MergeAndSortIssues() combines search results from each shard into a unified
+   result.  Also, DetermineIssuePosition() function calculates the position
+   of the current issue in a search result without merging the entire search
+   result.
+
+*  `search/backendsearchpipeline.py`: Sequence of events to search for
+   matching issues and at-risk issues, caching of unfiltered results,
+   and calling code for permissions filtering. Also, calls ast2select
+   and ast2sort to build the query, and combine SQL results with
+   full-text results.
+
+*  `search/backendsearch.py`: Small backend servlet that handles the
+   request for one shard from the frontend, uses a
+   backendsearchpipeline instance, returns the results to the frontend
+   as JSON including an unfiltered_iids list of global issue IDs.  As
+   a side-effect, each parallel execution of this servlet loads some
+   of the issues that the frontend will very likely need and
+   pre-caches them in memcache.
+
+*  `search/backendnonviewable.py`: Small backend servlet that finds
+   issues in one shard of a project that the given user cannot view.
+   This is not specific to the user's current query.  It puts that
+   result into memcache, and returns those IDs as JSON to the
+   frontend.
+
+*  `search/searchpipeline.py`: Utility functions used by both frontend
+   and backend parts of the search process.
+
+*  `tracker/tracker_helpers.py`: Has a dictionary of key functions used
+   when sorting issues in RAM.
+
+*  `services/issue_svc.py`: RunIssueQuery() runs an SQL query on a
+   specific DB shard.
+
+*  `search/query2ast.py`: parses the user’s query into an AST (abstract
+   syntax tree).
+
+*  `search/ast2ast.py`: Simplifies the AST by doing some lookups in
+   python for info that could be cached in RAM.
+
+*  `search/ast2select.py`: Converts the AST into SQL clauses.
+
+*  `search/ast2sort.py`: Converts sort directives into SQL ORDER BY
+   clauses.
diff --git a/doc/design/source-code-organization.md b/doc/design/source-code-organization.md
new file mode 100644
index 0000000..005bf57
--- /dev/null
+++ b/doc/design/source-code-organization.md
@@ -0,0 +1,208 @@
+# Monorail Source Code Organization
+
+[TOC]
+
+## Overview
+
+Monorail's source code organization evolved from the way that source
+code was organized for Google Code (code.google.com).  That site
+featured a suite of tools with code for each tool in a separate
+directory.  Roughly speaking, the majority of the code was organized
+to match the information architecture of the web site.  Monorail keeps
+that general approach, but makes a distinction between core issue
+tracking functionality (in the `tracker` directory) and additional
+features (in the `features` directory).
+
+Also dating back to Google Code's 2005 design, the concept of a
+"servlet" is key to Monorail's UI-centric source code organization.  A
+servlet is a python class with methods to handle all functionality for
+a given UI web page. Servlets handle the initial page rendering, any
+form processing, and have related classes for any XHR calls needed for
+interactive elements on a page.  Servlet's mix application business
+logic, e.g., permission checks, with purely UI logic, e.g., screen
+flow and echoing UI state in query string parameters.
+
+From 2018 to 2020, the old servlet-oriented source code organization
+is slowly being hollowed out and replaced with a more API-centric
+implementation.  Server-side python code is gradually being shifted
+from the `tracker`, `project`, `sitewide`, and `features` directories
+to the `api` and `businesslogic` directories.  While more UI logic is
+being shifted from python code into javascript code under
+`static_src`.
+
+Although Monorail's GAE app has several GAE services, we do not
+organize the source code around GAE services because they each share a
+significant amount of code.
+
+## Source code dependency layers
+
+At a high level, the code is organized into a few logical layers with
+dependencies going downward:
+
+App-integration layer
+
+*  The main program `monorailapp.py` that ties all the servlets together.
+
+*  All GAE configuration files, e.g., `app.yaml` and `cron.yaml`.
+
+Request handler layer
+
+*  This including servlets, inbound email, Endpoints, and rRPC.
+
+*  These files handle a request from a user, including syntactic
+   validation of request fields, and formatting of the response.
+
+Business logic layer
+
+*  This layer does the main work of handling a request, including
+   semantic validation of whether the request is valid, permission
+   checking, coordinating calls to the services layer, and kicking off
+   any follow-up tasks such as sending notification.
+
+*  Much of the content of `*_helper.py` and `*_bizobj.py` files also
+   belong to this layer, even though it has not been moved here as of
+   2019.
+
+Services layer
+
+*  This layer include our object-relational-mapping logic.
+
+*  It also manages connections to backends that we use other than the
+   database, for example full-text search.
+
+Framework layer
+
+*  This has code that provides widely used functionality and systemic
+   features, e.g.,`sql.py` and `xsrf.py`.
+
+Asset layer
+
+*  These are low-level files that can be included from anywhere in the
+   code, and should not depend on anything else.  For example,
+   `settings.py`, various `*_constants.py` files, and protobuf
+   definitions.
+
+
+## Source code file and directories by layer
+
+App-integration layer
+
+*  `monorailapp.py`: The main program that loads all web app request
+   handlers.
+
+*  `registerpages.py`: Code to register specific request handlers at
+   specific URLs.
+
+*  `*.yaml`: GAE configuration files
+
+Request handler layer
+
+*  `tracker/*.py`: Servlets for core issue tracking functionality.
+
+*  `features/*.py`: Servlets for issue tracking features that are not
+   core to the product.
+
+*  `project/*.py`: Servlets for creating and configuring projects and
+   memberships.
+
+*  `sitewide/*.py`: Servlets for user profile pages, the site home
+   page, and user groups.
+
+*  `templates/*/*.ezt`: Template files for old web UI page generation.
+
+*  `api/*.py`: pRPC API request handlers.
+
+*  `services/api_svc_v1.py`: Endpoints request handlers.
+
+*  `features/inboundemail.py`: Inbound email request handlers and bounces.
+
+*  `features/notify.py`: Email notification task handlers.
+
+
+Business logic layer
+
+*  `businesslogic/work_env.py`:  Internal API for monorail.
+
+*  `*/*_bizobj.py` and `*/*_helpers.py*` files: Business logic that was
+   written for servlets but that is gradually being used only through
+   work_env.
+
+Services layer
+
+*  `schema/*.sql`:  SQL database table definitions.
+
+*  `services/service_manager.py`: Simple object to hold all service objects.
+
+*  `services/caches.py` and `cachemanager.py`: RAM and memcache caches
+   and distributed invalidation.
+
+*  `services/issues_svc.py`: DB persistence for issues, comments, and
+   attachments
+
+*  `services/user_svc.py`: Persistence for user accounts.
+
+*  `services/usergroup_svc.py`: Persistence for user groups.
+
+*  `services/features_svc.py`: Persistence for hotlists, saved queries,
+   and filter rules.
+
+*  `services/chart_svc.py`: Persistence for issue snapshots and
+   charting queries.
+
+*  `services/secrets_svc.py`: Datastore code for key used to generate
+   XSRF tokens.
+
+*  `services/project_svc.py`: Persistence for projects and members.
+
+*  `services/config_svc.py`: Persistence for issue tracking
+   configuration in a project, except templates.
+
+*  `services/client_config_svc.py`: Persistence for API allowlist.
+
+*  `services/tracker_fulltext.py`: Connection to GAE fulltext search
+   index.
+
+*  `services/template_svc.py`: Persistence for issue templates.
+
+*  `services/star_svc.py`: Persistence for all types of stars.
+
+*  `services/spam_svc.py`: Persistence for abuse flags and spam verdicts.
+
+*  `services/ml_helpers.py`: Utilities for working with ML Engine backend.
+
+*  `search/*`: frontend and backend code for sharded issue search and
+   result set caching.
+
+
+Framework layer
+
+*  `framework/sql.py`: SQL DB table managers and safe SQL statement
+   generation.
+
+*  `framework/servlet.py` and `jsonfeed.py`:  Base classes for servlets.
+
+*  `framework/warmup.py`: Trivial servlet needed for GAE warmup feature.
+
+*  `framework/permissions.py`: Permissionset objects and permission
+   checking functions.
+
+*  `framework/authdata.py`, `monorailrequest.py`, and
+   `monorailcontext.py`: objects that represent information about the
+   incoming request.
+
+*  `framework/xsrf.py`, `banned.py`: Anti-abuse utilities.
+
+*  `testing/*.py`: Utilities for python unit tests.
+
+Asset layer
+
+*  `settings.py`: Server instance configuration.
+
+*  `framework/urls.py`: Constants for web UI URLs.
+
+*  `framework/exceptions.py`: python exceptions used throughout the code.
+
+*  `framework/framework_constants.py`: Implementation-oriented constants.
+
+*  `proto/*.proto`: ProtoRPC definitions for internal representation of
+   business objects.
diff --git a/doc/design/testing-strategy.md b/doc/design/testing-strategy.md
new file mode 100644
index 0000000..8865e06
--- /dev/null
+++ b/doc/design/testing-strategy.md
@@ -0,0 +1,114 @@
+# Monorail Testing Strategy
+
+## Problem
+
+Monorail (bugs.chromium.org) is a complex issue tracking tool with a
+large number of features that needs to work very reliably because it
+is used by everyone working on Chrome, which is a critical Google
+product.  At the same time, testing needs to be done at low cost
+because the Monorail team is also tasked with developing new
+functionality.
+
+## Strategy
+
+Basically, the end goal is a test automation pyramid with the base
+being unit tests with the highest test coverage, a middle layer where
+we test the API that the the UI uses, and the top layer is automated
+system tests for a few things to avoid surprises.
+
+![Testing pyramid](https://2.bp.blogspot.com/-YTzv_O4TnkA/VTgexlumP1I/AAAAAAAAAJ8/57-rnwyvP6g/s1600/image02.png)
+
+The reason for that is that unit tests give the best return on
+investment and the best support for ensuring that individual changes
+work correctly as those changes are being made.  End-to-end testing is more
+like a necessary evil: it is not very cost-effective because these
+tests are hard to write, easily broken by unrelated changes, and often
+have race conditions that make them flakey if we are not very careful.
+The API tests at the middle layer are a kind of integration testing
+that proves that larger parts of the code work together in a
+production environment, but they should still be easy to maintain.
+
+Past experience on code.google.com supports that strategy. Automated
+system tests were done through the UI and were notoriously slow and
+flakey. IIRC, we ran them 4 times and if any one run passed, it was
+considered a pass, and it was still flakey.  They frequently failed
+mysteriously.  They were so flakey that it was hard to know when a new
+real error had been introduced rather than flakiness getting worse. We
+repeatedly rewrote tests to eliminate flakiness and got them to pass,
+but that is a slow process because you need to run the tests many
+times to be sure that it is really passing, and there was always the
+doubt that a test could be falsely passing.  Many manual tests were
+never automated because of a backlog of problems with the existing
+automated tests.
+
+
+See also:
+[Google Test Blog posting about end-to-end tests](https://testing.googleblog.com/2015/04/just-say-no-to-more-end-to-end-tests.html).
+And, [Google internal unit test how-to](go/unit-tests).
+
+
+## Test coverage goals
+
+| Type        | Lang/Tech                | Coverage | Flakiness |
+|-------------|--------------------------|----------|-----------|
+| Unit        | Python pRPC API code     | 100%     | None      |
+| Unit        | Other python code        | >85%     | None      |
+| Unit        | Javascript functions     | >90%     | None      |
+| Unit        | LitElement JS            | >90%     | None      |
+| Integration | Probers                  | 10%?     | None      |
+| Integration | pRPC client in python?   | 25%?     | None      |
+| UI          | Web testing tool?        | 10%?     | As little as possible |
+| UI          | English in a spreadsheet | 100%     | N/A       |
+
+
+## Plan of action
+
+Building all the needed tests are a lot of work, and we have limited
+resources and a lot of other demands.  So, we need to choose wisely.
+Also, we need to keep delivering quality releases at each step, so we
+need to work incrementally.  Since we won't "finish", we need a
+mindset of constant test improvement, as tracked in coverage and
+flakiness metrics.
+
+Steps:
+
+1.  Strictly maintain unit test coverage for pRPC, work_env, and other
+    key python files at 100%.
+
+1.  Improve python unit test code style and update library usage,
+    e.g., mox to mock.
+
+1.  Improve unit test coverage for other python code to be > 85%.
+
+1.  Maintain JS unit tests as part of UI refresh.  Run with `karma`.
+
+1.  Design and implement probers for a few key features.
+
+1.  Design and implement API unit tests and system tests.
+
+1.  Research options for web UI testing. Select one.
+
+1.  Implement automated UI tests for a few key features.
+
+1.  Maintain go/monorail-system-test spreadsheet as we add or modify
+    functionality.
+
+
+## Related topics
+
+Accessibility testing: So far we have just used the audit tools in
+Chrome. We could find additional audit tools and/or request
+consultation with some of our users who are accessibility experts.  We
+have, and will continue to, give high priority to accessibility
+problems that are reported to us.
+
+API performance testing: Some API calls are part of our monitoring.
+However, we currently do not actively manage small changes in latency.
+We should look at performance changes for each release and over longer
+time-spans.
+
+UI performance testing: Again, we have monitoring, but we have not
+been looking critically at small changes in UI performance across
+releases.
+
+Security testing:  We are enrolled in a fuzzing service.
diff --git a/doc/example.py b/doc/example.py
new file mode 100644
index 0000000..beec6c2
--- /dev/null
+++ b/doc/example.py
@@ -0,0 +1,43 @@
+# This example uses Google APIs Client for Python, you can download it here:
+# https://developers.google.com/api-client-library/python/
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import apiclient
+
+import httplib2
+
+from oauth2client.file import Storage
+
+
+DISCOVERY_URL = (
+    'https://monorail-staging.appspot.com/_ah/api/discovery/v1/apis/'
+    '{api}/{apiVersion}/rest')
+
+
+# Get credentials to authorize http object
+storage = Storage('Your-local-credential-file')
+credentials = storage.get()
+http = credentials.authorize(httplib2.Http())
+
+# Create monorail client using Google APIs Client for Python
+monorail = apiclient.discovery.build(
+    'monorail', 'v1',
+    discoveryServiceUrl=DISCOVERY_URL,
+    http=http)
+
+# Create a chromium project issue
+insert_response = monorail.issues().insert(projectId='chromium', body={
+    'summary': 'Strange grinding sound',
+    'status': 'Untriaged',
+    'cc': [{'name':'user1@example.org'}, {'name':'user2@example.org'}]
+}).execute()
+
+new_issue_id = insert_response['id']
+
+# Get all issues of chromium
+list_response = monorail.issues().list(projectId='chromium').execute()
+issues = list_response['items']
+total_issues = list_response['totalResults']
diff --git a/doc/instance.md b/doc/instance.md
new file mode 100644
index 0000000..23a7df8
--- /dev/null
+++ b/doc/instance.md
@@ -0,0 +1,37 @@
+# Creating a new Monorail instance
+
+1.  Create new GAE apps for production and staging.
+1.  Configure GCP billing.
+1.  Fork settings.py and configure every part of it, especially trusted domains
+    and "all" email settings.
+    1.  Change num_logical_shards to the number of read replicas you want.
+    1.  You might want to also update `*/*_constants.py` files.
+1.  Create new primary DB and an appropriate number of read replicas for prod
+    and staging.
+    1.  Set up IP address and configure admin password and allowed IP addr.
+        [Instructions](https://cloud.google.com/sql/docs/mysql-client#configure-instance-mysql).
+    1.  Set up backups on primary DB. The first backup must be created before
+        you can configure replicas.
+1.  Set up log saving to bigquery or something.
+1.  Set up monitoring and alerts.
+1.  Set up attachment storage in GCS.
+1.  Set up spam data and train models.
+1.  Fork and customize some of HTML in templates/framework/header.ezt,
+    footer.ezt, and some CSS to give the instance a visually different
+    appearance.
+1.  Get From-address allowlisted so that the "View issue" link in Gmail/Inbox
+    works.
+1.  Set up a custom domain with SSL and get that configured into GAE. Make sure
+    to have some kind of reminder system set up so that you know before cert
+    expire.
+1.  Configure the API. Details? Allowed clients are now configured through
+    luci-config, so that is a whole other thing to set up. (Or, maybe decide not
+    to offer any API access.)
+1.  Gain permission to sync GGG user groups. Set up borgcron job to sync user
+    groups. Configure that job to hit the API for your instance. (Or, maybe
+    decide not to sync any user groups.)
+1.  Monorail does not not access any internal APIs, so no allowlisting is
+    required.
+1.  For projects on code.google.com, coordinate with that team to set flags to
+    do per-issue redirects from old project to new site. As each project is
+    imported, set it's moved-to field.
diff --git a/doc/md_images/cancel-execution.png b/doc/md_images/cancel-execution.png
new file mode 100644
index 0000000..b9d1514
--- /dev/null
+++ b/doc/md_images/cancel-execution.png
Binary files differ
diff --git a/doc/md_images/continue-options.png b/doc/md_images/continue-options.png
new file mode 100644
index 0000000..27e8b1d
--- /dev/null
+++ b/doc/md_images/continue-options.png
Binary files differ
diff --git a/doc/md_images/manual-judgement-stage.png b/doc/md_images/manual-judgement-stage.png
new file mode 100644
index 0000000..9d8e1de
--- /dev/null
+++ b/doc/md_images/manual-judgement-stage.png
Binary files differ
diff --git a/doc/md_images/nav-to-build-log.png b/doc/md_images/nav-to-build-log.png
new file mode 100644
index 0000000..da4a0bb
--- /dev/null
+++ b/doc/md_images/nav-to-build-log.png
Binary files differ
diff --git a/doc/md_images/pantheon-migrate-traffic.png b/doc/md_images/pantheon-migrate-traffic.png
new file mode 100644
index 0000000..fae47ff
--- /dev/null
+++ b/doc/md_images/pantheon-migrate-traffic.png
Binary files differ
diff --git a/doc/md_images/pantheon-services-dropdown.png b/doc/md_images/pantheon-services-dropdown.png
new file mode 100644
index 0000000..d7fb434
--- /dev/null
+++ b/doc/md_images/pantheon-services-dropdown.png
Binary files differ
diff --git a/doc/md_images/rollback-options.png b/doc/md_images/rollback-options.png
new file mode 100644
index 0000000..d43ed6e
--- /dev/null
+++ b/doc/md_images/rollback-options.png
Binary files differ
diff --git a/doc/md_images/start-deploy-monorail.png b/doc/md_images/start-deploy-monorail.png
new file mode 100644
index 0000000..361fbfb
--- /dev/null
+++ b/doc/md_images/start-deploy-monorail.png
Binary files differ
diff --git a/doc/md_images/start-rollback.png b/doc/md_images/start-rollback.png
new file mode 100644
index 0000000..828280e
--- /dev/null
+++ b/doc/md_images/start-rollback.png
Binary files differ
diff --git a/doc/release-notes.md b/doc/release-notes.md
new file mode 100644
index 0000000..5b2c77a
--- /dev/null
+++ b/doc/release-notes.md
@@ -0,0 +1,18 @@
+# Monorail Release Notes
+
+### Mar 12th, 2018
+
+* Added HTML headers to the issue detail page to make it easier for
+  screen readers to navigate the page.
+
+### Feb 27th, 2018
+
+* Moved spam flag on issue detail page down below issue metadata to
+  prevent confusion with the star.
+
+### Jan 8th, 2018
+
+* New URL-type custom fields are available for project owners to
+  create under the 'Development Process' tab.
+* Bolded text in issue descriptions remain bolded after description
+  edits.
diff --git a/doc/terms.md b/doc/terms.md
new file mode 100644
index 0000000..a11aa38
--- /dev/null
+++ b/doc/terms.md
@@ -0,0 +1,39 @@
+# Terms of Service for Monorail (https://bugs.chromium.org)
+
+Please refer to [Google’s Terms of Service](https://policies.google.com/terms).
+
+The terms below are specific to Monorail and are in addition to or superseding
+Google’s Terms of Service.
+
+## Your Account in Monorail
+
+A Monorail User account is automatically created when you visit
+https://bugs.chromium.org while logged in for the first time. The account is
+associated with your email.
+
+## Data Retention
+
+As a bug tracker for Chromium and Chromium related projects, the issues and
+discussions that occur in Monorail are insightful and vital to understanding the
+codebase and history of the projects we track. Therefore, Monorail retains all
+data generated on the site indefinitely. User accounts and data associated with
+the account may be deleted upon request or as a result of the associated email
+being deleted. See [Deleting Your User Account](#Deleting-Your-User-Account) for
+more information.
+
+## Deleting Your User Account
+
+There are two ways a User Account can be deleted in Monorail.
+
+1.  If the Google account associated with a Monorail User Account is deleted,
+    Monorail will delete the User account within 7 days. For instructions
+    deleting your Google account visit the
+    [Google Account Help Center](https://support.google.com/accounts/answer/32046?hl=en).
+
+1.  Users can request the deletion of their owner Monorail User Account by
+    [filing a bug](https://bugs.chromium.org/p/monorail/issues/entry) with the
+    Monorail Team while logged in with the account that they want deleted. We
+    will not accept requests to delete accounts that differ from that of the
+    user making the request. Please note that if a user visits Monorail again
+    while logged in, after their account has been deleted, Monorail will
+    automatically create another account.
diff --git a/doc/triage.md b/doc/triage.md
new file mode 100644
index 0000000..81c8114
--- /dev/null
+++ b/doc/triage.md
@@ -0,0 +1,60 @@
+# Monorail Triage Guide (go/monorail-triage)
+
+Monorail is a tool that is actively used and maintained by
+the Chromium community.  It is important that we look at
+issues reported by our users and take appropriate actions.
+
+For the full list of trooper responsibilities, see
+[go/chops-workflow-trooper](http://go/chops-workflow-trooper).
+
+## Triage Process
+
+Look at each issue in the
+[Monorail untriaged
+queue](https://bugs.chromium.org/p/monorail/issues/list?q=&can=41013401) and
+[Sheriffbot untriaged queue](http://crbug.com/?q=component%3DTools%3EStability%3ESheriffbot%20status%3Auntriaged&can=2)
+and do the following:
+
+* If the issue is unintelligible or empty, flag the issue as spam.
+  * Check the user stats at bugs.chromium.org/u/{user\_email}/updates, and if none of their
+  activities on the site are serious or valid, ban them as spammer.
+* Move issues to the correct project (eg. "chromium") if misfiled.
+* Apply the correct `type:` label.
+* If the bug is caused by someone else's changes or if the bug is part of the feature
+  clearly owned by one person, assign the issue to that person and set
+  `status:Assigned`.
+* Validate the issue and make it clear and actionable
+  * If not actionable or reproducible, mark issue as `status:WontFix`
+  * If the issue requires more information from reporter, add the label
+    `needs:Feedback` and ask the reporter for more information.
+* Update issue `Pri-` label
+  * If the issue is a Monorail API Request, set `Pri-1`
+  * If the issue is a security or privacy issue, set `Pri-1`
+  * Refer to [Priorities](#Priorities) for all other cases.
+* If the issue is `Pri-0` or `Pri-1`
+  * If `Pri-0`: assign self as `owner`, mark `status:Started`, notify team leads, follow
+    the IRM process as Incident Commander.
+  * If `Pri-1`: assign self as owner, mark `status:Started` and work to resolve the
+    issue. Find another owner and make a formal handoff if you are not able to
+    address.
+* If an issue has been `needs:Feedback` for more than 7 days without response, mark
+  as `status:WontFix` with an explanatory comment.
+* Otherwise, mark issue as `status:Available`
+
+## Priorities
+
+* `Pri-0`: Critical issue causing failures in production. Major functionality broken
+  that renders a feature unusable for all customers.
+* `Pri-1`: Urgent; the issue is blocking a user from getting their job done. Defect
+  causing functional regression in production. Production issue impacting other
+  customers. Any type of security or privacy problem. Finally, any workflow
+  administrative tasks that have been officially asked to the trooper to handle,
+  that includes very explicitly: Monorail API access request, Sheriffbot testing &
+  deployment, and Hotlist removal.
+* `Pri-2`: Important; tied to OKRs or near term upcoming release. Bug that should be
+  addressed in one of the next few releases.
+* `Pri-3`: We feel your pain: the team would like to fix this, but lacks the resources
+  to do this soon. Desirable feature or enhancement not on the near-term roadmap.
+  Defects that are not regressions, have workarounds, and affect few users.
+* `Pri-4`: Ponies and icebox. Unfortunate: it's a legitimate issue, but the team never
+  plans to fix this.
diff --git a/doc/userguide/README.md b/doc/userguide/README.md
new file mode 100644
index 0000000..7651297
--- /dev/null
+++ b/doc/userguide/README.md
@@ -0,0 +1,78 @@
+# Monorail Issue Tracker User Guide
+
+
+## What is Monorail?
+
+Monorail is the Issue Tracker used by the Chromium project and other related
+projects. It is hosted at [bugs.chromium.org](https://bugs.chromium.org).
+
+
+## Why we use Monorail
+
+The projects that use Monorail have carefully considered other issue
+tracking tools and selected Monorail because of several key features:
+
+* Monorail is extremely flexible, allowing for a range of development
+  processes to be used in different projects or within the same project,
+  and for process details to be gracefully phased in and phased out
+  over time.  For example, labels and custom fields are treated very
+  much like built-in fields.
+
+* Monorail is inclusive in that it allows average users to view details
+  of how a project's development process is configured so that contributors
+  can understand how their contributions fit in.  And, Monorail's UI
+  emphasizes usability and accessibility.
+
+* Monorail has a long track record of hosting a mix of public-facing and
+  private issues.  This has required per-issue access controls and user
+  privacy features.
+
+* Monorail helps users focus on individual issues and also work with sets
+  of issues through powerful issue list, grid, and graph views.
+
+* Monorail is built and maintained by the Chrome team, allowing for
+  customization to our processes.  For example, Feature Launch Tracking.
+
+
+## User guide table of contents
+
+This user guide is organized into the following chapters:
+
+* [Quick start](quick-start.md)
+* [Concepts](concepts.md)
+* [Working with individual issues](working-with-issues.md)
+* [Issue lists, grids, and charts](list-views.md)
+* [Power user features](power-users.md)
+* [Email notifications and replies](email.md)
+<!-- Feature launch tracking and approvals -->
+* [Other project pages for users](project-pages.md)
+* [User profiles and hotlists](profiles-and-hotlists.md)
+* [Project owner's guide](project-owners.md)
+* [Site admin's guide](site-admins.md)
+
+
+## How to ask for help and report problems with Monorail itself
+
+<!-- This is purposely written in a couple different places to make it
+     easier for users to find. -->
+
+If you wish to file a bug against Monorail itself, please do so in our
+[self-hosting tracker](https://bugs.chromium.org/p/monorail/issues/entry).
+We also discuss development of Monorail at `infra-dev@chromium.org`.
+
+You can report spam issues via the "..." menu near the issue summary.
+You can report spam comments via the "..." menu on that comment.  Any
+project owner can ban a spammer from the site.
+
+
+## A history of Monorail
+
+The design of Monorail was insipred by our experience with Bugzilla and
+other issue trackers that tended toward hard-coding a development
+process into the tool.  This work was previously part of Google's
+Project Hosting service on code.google.com from 2006 until 2016.
+Several Chromium-related projects were heavy users of the issue
+tracker part of code.google.com, and they opted to continue
+development work on it.  Monorail launched as an open source project
+in 2016.  Bugs.chromium.org currently hosts over 25 related projects,
+with over one million issues in the /p/chromium project alone.
diff --git a/doc/userguide/concepts.md b/doc/userguide/concepts.md
new file mode 100644
index 0000000..d9ca829
--- /dev/null
+++ b/doc/userguide/concepts.md
@@ -0,0 +1,376 @@
+# Monorail Concepts
+
+[TOC]
+
+## User accounts
+
+*   Users may visit the Monorail server without signing in, and may view public
+    issues anonymously.
+
+*   Signing in to Monorail requires a Google account. People can create a GMail
+    account, or create a Google account using an existing email address.
+
+*   User accounts are identified by email address.
+
+*   When you post, your email address is shared with project members.
+
+*   You can access your user profile via the account menu.
+
+*   Your user pages also include a list of your recent posts, your saved
+    queries, and your hotlists.
+
+*   The settings page allows you to set user preferences, including a vacation
+    message.
+
+*   Monorail allows account linking between certain types of accounts.
+    (Currently only allowed between @google.com and @chromium.org accounts). To
+    link your accounts:
+
+    1.  Log in to the account that you want to make a child account.
+    1.  Navigate to your account 'Profile' page via the dropdown at the
+        top-right of every page.
+    1.  You should see "Link this account to:". Select the parent account and
+        click "Link"
+    1.  Switch to the account you've chosen to be the parent account.
+    1.  Navigate to the 'Profile' page.
+    1.  You should see a pending linked account invite from your first account.
+        Click 'Accept'.
+
+*   If you need to completely delete your account, there is a button for that on
+    your profile page.
+
+    *   Each issue or comment that you create becomes part of the project, so
+        deleting your account simply removes your email address from those
+        postings. If you need to delete individual posts, you should do that
+        before deleting your account.
+
+*   If Monorail sends an email to a user and that email bounces, the account is
+    marked as bouncing. A user can sign in and clear the bouncing flag via their
+    profile page.
+
+*   The bouncing state, time of last visit, and any vacation message are all
+    used to produce a user availability message that may be shown when that user
+    is an issue owner or CC’d.
+
+*   Project owners and site admins may ban user accounts that are used to post
+    spam or other content that does not align with Monorail’s mission.
+
+## Projects and roles
+
+*   Each project contains issues, grants roles to project members, and
+    configures how issues are tracked in that project.
+
+*   Projects can be public or members-only. Only project members may access the
+    contents of a members-only project, however the name of a members-only
+    project may occur in comments and other places throughout the site.
+
+*   The project owners are responsible for configuring the project to fit their
+    development process (described below).
+
+*   Project members have permissions to edit issues, and they are listed in the
+    autocomplete menus for owner and CCs.
+
+*   While most activity on a Monorail server occurs within a given project, it
+    is also possible to work across projects. For example, a hotlist can include
+    issues from multiple projects.
+
+*   Some projects that we host have a branded domain name. Visiting one of these
+    projects will redirect the user to that domain name.
+
+*   When an old project is no longer needed, it can be archived or marked as
+    moved to a different URL.
+
+## Issues, comments, and attachments
+
+Issues:
+
+*   Each issue is given a unique numeric ID number when the issue is created.
+    Issue IDs count up so that they serve as a project odometer and a quick way
+    for members to judge the age of an issue.
+
+*   Each issue has a set of fields including summary, reporter, owner, CCs,
+    components, labels, and custom fields.
+
+*   Issues may be blocked on other issues. The relationship is two-way, meaning
+    that if issue A is blocked on issue B, then issue B is blocking issue A.
+
+*   Each issue has several timestamps, including the time when it was opened,
+    when it was most recently closed, when the status was most recently set,
+    when the components were modified, and when the owner was most recently
+    changed.
+
+Comments:
+
+*   Each comment consists of the comment text, the email address of the user
+    which posted the comment, and the time at which the comment was posted.
+
+*   Each comment has a unique anchor URL that can be bookmarked and shared.
+
+*   Each comment has a sequence number within the issue. E.g., comment 1 is the
+    first comment on the issue after it was reported. Older comments may be
+    initially collapsed in the UI to help focus attention on the most recent
+    comments.
+
+*   Comment text is unicode and may include a wide range of characters including
+    emoji.
+
+*   Whitespace in comments is stored in our database but extra whitespace is
+    usually not visible in the UI unless the user has clicked the `Code` button
+    to use a fixed-width code-friendly font.
+
+*   All comments on an issue have the same access controls as the issue.
+    Monorail does not currently support private comments. If you need to make a
+    private comment to another issue participant, you should do it via email or
+    chat.
+
+*   Each comment can list some amendments to the issue. E.g., if the issue owner
+    was changed when the comment was posted, then the new owner is shown.
+
+*   Each comment is limited to 50 KB. If you wish to share log files or other
+    long documents, they should be uploaded as attachments or shared via Google
+    Drive or another tool.
+
+*   Comments can be marked as spam or marked deleted. Even these comments are
+    still part of the project and may be viewed by project members, if needed.
+
+Attachments:
+
+*   Each comment can contain some attachments, such as logs, text files, images,
+    or videos.
+
+*   Monorail supports up to 10 MB worth of attachments on each issue. Larger
+    attachments should be shared via Google Drive or some other way.
+
+*   Monorail allows direct viewing of images, videos, and certain text files.
+    Other attachment types can only be downloaded.
+
+*   Attachment URLs are not all shareable. If you need to refer to an
+    attachment, it is usually best to link to the comment that contains it.
+
+## Issue fields and labels
+
+*   Issues have several built-in fields including summary, reporter, owner, CCs,
+    status, components, and various timestamps. However, many fields that are
+    built into other issue tracking tools are configured as labels or custom
+    fields in Monorail, for example, issue priority.
+
+*   Issue labels are short strings that mean something to project members. They
+    are described more below.
+
+*   Project owners can define custom fields of several different types,
+    including enums, strings, dates, and users.
+
+*   Project owners and field admins can decide on who is allowed to edit a
+    custom field value. If an user is not allowed to edit a field, the input
+    to change its value will be greyed-out or it will not be rendered.
+
+*   There are three main types of labels:
+
+    *   OneWord labels contain no dashes and are treated similarly to hashtags
+        and tags found in other tools.
+    *   Key-Value labels have one or more dashes and are treated almost like
+        enumerated-type fields.
+    *   Restriction labels start with "Restrict-" and have the effect of
+        limiting access to the issue. These are described more below.
+
+*   A list of well-known labels can be configured by project owners. Each
+    well-known label can have a documentation string and it will sort by its
+    rank in the list.
+
+*   Well-known labels are offered in the autocomplete menus. However, users are
+    still free to type out other label strings that make sense to their team.
+
+## Issue approvals and gates
+
+Issues in Monorail can be used to track complex and multi-phased review
+processes for new features or projects using approvals and gates.
+
+Project owners can define project-wide approvals that represent the
+review process of different stakeholders and review teams. For each process,
+project owners can create issue templates that include the set of approvals
+that should be part of the process.
+E.g. A template representing a Launch process that requires approval from
+UX, Security, and A11y teams would include UX, Security, and A11y approvals.
+
+Project owners can also create gates within a template and group approvals
+under those gates to represent the review process phases.
+E.g. A process may have "Proposal", "Design", and "Launch"
+phases where some set of review teams need to review during the
+"Proposal" phase before the feature owner can move on to the "Design"
+phase and request reviews from another set of teams.
+
+When a team wants to go through a review process, they can use the template
+to create an issue that inherits the approvals and gates structure.
+
+Issue gates and approvals cannot be changed after the issue has been created.
+Approvals show up in their own section of the issue details page, separate
+from the issue's fields and comments sections.
+
+*  Approvals can be grouped under ordered gates or they can be gate-less.
+*  Approvals have their own comments separate from issue comments.
+*  Approval statuses are used to indicate the status of the review:
+
+   *  `NeedsReview`: the review has not started yet, but is required.
+   *  `NA`: a review is not required.
+   *  `ReviewRequested`: the issue owner and team have answered any survey
+      and follow-up questions and are ready for the approvers to begin
+      or continue review.
+   *  `ReviewStarted`: approvers have started review.
+   *  `NeedInfo`: approvers have more questions before they can proceed.
+   *  `Approved`: approvers have reviewed and approved the plan.
+   *  `NotApproved`: approvers have reviewed and do not approve of the plan.
+*  Only approvers of an approval are allowed to set statuses to
+   `Approved`, `Not Approved`, and `NA` and can remove and add other
+   users as approvers.
+*  Approval surveys hold context and questions that the approvers want
+   answered before a team requests review.
+*  Approvals may have custom fields associated with them. Those custom
+   fields will show up with their approvals, separate from the other
+   fields of the issue. These fields can be restricted and have field
+   editors assigned to them. This allows project owners and admins to use
+   them while having control over who is allowed to edit the value of those
+   fields, which is regularly a desired feature in this context.
+*  Issue gates also hold gate fields configured by project owners. These
+   gate fields show up right next to the gate names, separate from other
+   issue fields. If an issue does not have any gates, gate fields do not
+   show up.
+
+## Labels for flexibility and process evolution
+
+Monorail normally treats key-value labels and custom fields and labels in the
+same way that built-in fields are treated. For example:
+
+*   When displayed in the UI, they are shown individually as equals of built-in
+    fields, not nested under a subheading.
+
+*   They can be used as columns in the list view, and also in grid and chart
+    views.
+
+*   Users can search for them using the same syntax as built-in fields.
+
+Monorail tracks issues over multi-year periods, so we need to gracefully handle
+process changes that happen from time to time. In particular, Monorail allows
+for incremental formalization of enum-like values. For example:
+
+*   A team may start labeling issues simply as a way to identify a set of
+    related issues. E.g., `LCDDisplay` and `OLEDDisplay`.
+
+*   The team might decide to switch to Key-Value labels to make it easier to
+    query and read in the list views. E.g., `Display-LCD` and `Display-OLED`.
+
+*   If more people start using those labels, the project owners might make them
+    well-known labels and add documentation strings to clarify the meaning of
+    each. However, oddball labels like `Display-Paper` could still be used. This
+    configuration might last for years.
+
+*   If these labels used so much that it seems worth adding a row to the editing
+    form, then the project owners can define an enum-type custom field named
+    `Display` with the well-known label suffixes as possible values. This would
+    discourage oddball values, but they could still exist on existing issues.
+
+*   At a later date, the project owners might review the set of fields, and
+    decide to demote some of them back to well-known labels.
+
+*   If the process changes to the point that it is no longer useful to organize
+    issues by those labels, they can be removed from the well-known list, but
+    still exist on old issues.
+
+## Permissions
+
+*   In Monorail, a permission is represented by a short string, such as `View`
+    or `EditIssue`.
+
+*   Project owners grant roles to users in a project. Each role includes a list
+    of permission strings.
+
+*   The possible roles are: Anonymous visitor, signed-in non-member,
+    contributor, committer, and owner.
+
+*   Project owners may also grant additional permissions to a project member.
+    For example, a user might be a contributor, plus `EditIssue`.
+
+*   Project owners and field admins can restrict custom fields. That will allow
+    them to specify field editors: the only users allowed to edit custom field
+    values in issues and templates.
+
+*   When a user makes a request to the Monorail server, the server checks that
+    they can access the project and that they have the needed permission for
+    that action. E.g., viewing an issue requires the `View` permission.
+
+*   If an issue has a restriction label of the form
+    `Restrict-Action-OtherPermission` then the user may only perform `Action` if
+    they could normally do it, and if they also have permission
+    `OtherPermission`. For example, `Restrict-View-EditIssue` means that the
+    only users who can view the issue are the ones who could also edit it.
+
+*   Since both permissions and restriction labels are just strings, they can be
+    customized with words that make sense to the project owners. For example, if
+    only a subset of project members are supposed to deal with security issues,
+    they could be granted a `SecurityTeam` permission and those issues labeled
+    with `Restrict-View-SecurityTeam`. The most common example is
+    `Restrict-View-Google`.
+
+*   Restriction labels can be added in any of the ways that other labels can be
+    added, including adding them directly to an individual issue, bulk edits,
+    filter rules, or including them in an issue template.
+
+*   Regardless of restriction labels, the issue reporter, owner, CC’d users, and
+    users named in certain user-type custom fields always have permission to
+    view the issue. And, issue owners always have permission to edit.
+
+*   Project owners and site administrators are not subject to restriction
+    labels. They can also always edit the value of restricted fields.
+
+*   Admins of a field can always edit the field's value(s) in an issue or
+    template as long as they have permission to edit the issue or template.
+
+## Project configuration
+
+Projects are configured to define the development process used to track issues,
+including:
+
+*   The project description, optional link to a project home page, and optional
+    logo
+
+*   A list of open and closed issue statuses. Each status can have a
+    documentation string.
+
+*   A list of well-known labels and their documentation strings.
+
+*   A list of custom fields, each with a documentation string and validation
+    options.
+
+*   A list of issue templates to use when creating new issues.
+
+*   A list of components, each with a documentation string, auto-CCs, and labels
+    to add.
+
+*   A list of filter rules to automatically add some issue fields based on other
+    values.
+
+*   Default list and grid view configurations for project members.
+
+<!-- TODO: These areas of project configuration are covered more in
+     the Project Owner Guide. -->
+
+## Personal hotlists
+
+*   Each user has a list of personal hotlists that can be accessed via the
+    account menu.
+
+*   A hotlist is a ranked list of issues, which can belong to multiple projects.
+
+*   Users can rerank issues in a hotlist by dragging them up or down.
+
+*   Issues can be added to a hotlist via the hotlist page, the issue detail
+    page, or issue list.
+
+*   Each hotlist belongs to one user, but that user can add other users to be
+    editors.
+
+*   Each issue in a hotlist can also have a short note attached.
+
+*   Hotlists themselves can be public or members-only. A user who is allowed to
+    view a hotlist will only see the subset of issues that they are allowed to
+    view as determined by issue permissions. Hotlists do not affect issue
+    permissions.
diff --git a/doc/userguide/email.md b/doc/userguide/email.md
new file mode 100644
index 0000000..cecd961
--- /dev/null
+++ b/doc/userguide/email.md
@@ -0,0 +1,239 @@
+# Email Notifications and Replies
+
+[TOC]
+
+## How does Monorail send email messages?
+
+Monorail sends individual email messages to each user who should be
+notified of an issue change.  For example, if users A, B and C are all
+CC’d on an issue, a new comment on that issue will trigger three
+separate email messages: one to each of the email addresses for users
+A, B, and C.  Sending individual messages, rather than a single
+message with several addresses listed, allows Monorail to customize
+the content of each message for each user, avoid sending duplicate
+emails in many cases, and better manage email replies.
+
+
+## Who is notified when an issue changes?
+
+When a new issue is created or a comment is posted to an issue,
+Monorail computes a set of users to notify for specific reasons.
+Those reasons cause the following users to be added to the set:
+
+* The issue owner, plus the previous owner if the owner field was
+  edited
+
+* CC’d users, including any CC’d user added by filter rules or
+  component definitions
+
+* Users who have starred the issue and are currently allowed to view
+  the issue
+
+* Users named in user-type custom fields that are configured to
+  trigger notifications
+
+* Users who have subscriptions with queries that match the new state
+  of the issue
+
+If any of those items are user groups that exist in Monorail, they are
+replaced by the list of members of the user group.  If a given user is
+a member of two user groups in the set, the user themselves will only
+be in the set once.
+
+The issue reporter is not automatically included in the set of users
+to notify.  However, by default, a user stars an issue when they
+report it.  So, the issue reporter is usually also a starrer unless
+they click to unstar the issue.
+
+Monorail removes some users from the set:
+
+* The user who made the change, because they already know about the
+  change.
+
+* Users who opted out of issue change notifications by unchecking some
+  options on their user settings page (see below).
+
+* For any users with linked accounts, if both accounts would be
+  notified, Monorail omits the child account.
+
+* Any banned or bouncing users.
+
+Finally, Monorail adds in these email addresses:
+
+* Any also-notify addresses defined in matching filter rules
+
+* Any notify-all email address configured by the project owners
+
+Monorail then sends email messages to each of those email addresses.
+Usually, those addresses correspond to the inboxes of individual users.
+However, some accounts have email addresses that post to mailing lists
+(not user groups that are sync’d to Monorail).  For those messages,
+the mailing list software takes over to distribute the message to
+members of that mailing list and add it to the mailing list archive.
+
+## Who is notified when an issue's approval changes?
+
+Some issues own approvals which have their own thread of comments and
+fields. Notifications for approval changes and comments behave
+differently from issue notifications.
+
+Below, "feature team" will be used to mean users named in user-type
+custom fields that are configured to trigger notifications AND
+the issue owner.
+CC'd users are not notified for any approval changes.
+
+The following are all possible changes someone could make to an approval
+and the users that would be added to the set of notification recipients
+as a result.
+
+A new approval comment or approval field change  will trigger
+notifications to:
+  *  The feature team
+  *  Approvers of the approval
+
+An approval status change to:
+  *  `ReviewRequested` notifies approvers.
+  *  `NeedInfo`, `NeedsReview`, `ReviewStarted`, `Approved`,
+     `NotApproved`, and `NA` notifies the feature team.
+
+A change of approvers notifies all approvers including the ones being
+added and removed.
+
+Like issues, the user who made the approval changes will not
+receive the resulting email.
+
+## Why did I get an email notification?
+
+If you receive an email notification from Monorail, it is because of
+one of the reasons listed in the section above.  Monorail personalizes
+each message by adding a footer that lists the reason or reasons why
+that message was sent to you.  In Gmail, you may need to click a "..."
+icon near the bottom of the message to see this footer.
+
+
+## Why did I NOT get an email notification?
+
+Please see the reasons listed above for why Monorail removes potential
+email recipients.
+
+If Monorail previously sent an email to your address, and that
+email bounced, Monorail will flag your account as bouncing.  This can
+happen if you are new to a team and a teammate CC’d your email address
+before your email account had been created.  You can clear the
+bouncing flag by clicking a link on your user profile page.
+
+If you use multiple accounts with Monorail, someone may have CC’d
+one of your other accounts.
+
+
+## How do I configure email notifications?
+
+Users currently have two options to configure email notifications on
+their settings page:
+
+* `If I am in the issue's owner or CC fields.`
+
+* `If I starred the issue.`
+
+You can access the settings page via the account menu.
+
+
+## How can I filter these emails?
+
+The best way to filter emails is to look at the reasons listed in the
+footer.  For example, if the email message contains the string "You
+are the owner of the issue", then you might want to mark the message
+as important.
+
+
+## How to star an issue
+
+Anyone can star an issue by clicking the star icon near the issue ID
+on the issue detail page, issue list page, or hotlist page.  Starring
+an issue will subscribe you to email notifications for changes to that
+issue.  The issue reporter stars the issue be default, but they can
+unstar it if they are no longer interested.
+
+
+## How to subscribe to an issue query
+
+1. Sign in and click your email address in the far upper right of the
+   page to access your account menu.
+1. Choose `Saved queries`.
+1. Choose a name that describes what you are interested in.
+1. List the names of the projects where you want the subscription to
+   apply.
+1. Type an issue query for issues in those projects that you are
+   interested in.
+
+If you choose the `Notify immediately` option, then when any issue
+that matches that query is updated, you will get an email
+notification.  If you choose either to be notified or not notified,
+you can use any of your subscriptions in the issue query scope menu.
+
+
+## Why did I get a follow-up email notification?
+
+When an issue has a date-type custom field set, and that field is
+configured to trigger notifications, and the specified date arrives
+while the issue is still open, then Monorail will automatically post a
+comment to the issue as a reminder.  That comment triggers
+notification emails to the issue owner, CC’d users, and users who
+starred the issue.
+
+On the settings page, there is an option to not send follow-up emails
+for issues that you have starred.  However, follow-up emails are
+always sent to the issue owner and CC’d users.
+
+
+## How to reply to a notification email
+
+Project owners may enable processing of replies in their project, but
+it is disabled by default.  If it is enabled in your project, you will
+see that the footer of each email notification invites you to "Reply
+to this email to add a comment" or "Reply to this email to add a
+comment or make updates".  These lines will only appear on messages
+that are sent directly to you, not on messages sent to an also-notify
+or notify-all mailing list address.
+
+When you see one of those footer lines, you can reply to the email
+from your email client.  You should reply using the same email address
+that the notification was sent to, which normally happens
+automatically unless you forward your email from one account to
+another.  And, you must keep the same email subject line.  The text of
+your reply will become the content of a new comment on the issue.  If
+your reply cannot be processed, you will get an email notification
+with an error message explaining what went wrong.
+
+If the notification sent to you invited you to "make updates", then
+you can include some lines at the top of your email message to update
+the state of the issue.  Any text after the first line that does not
+parse as a command will be treated as the comment content.  Quoted
+lines and signature lines are automatically stripped off.  To help
+make sure nothing important is lost, project members may use the
+comment `...` menu to view the original email message with nothing
+stripped off.
+
+For example:
+
+```
+Owner: user@example.com
+Status: Started
+Pri: 2
+
+I looked through the logs and found a possible root cause.  Lowering
+priority because there is a clear work-around.
+
+Cheers
+```
+
+That reply will update the issue owner, status, and the issue
+priority.  And, it will use the rest of the text as the comment body,
+except for "Cheers" which will be stripped.
+
+
+
+## Can I create a new issue via email?
+
+Monorail does not currently allow for new issues to be created via
+email.  Please use the issue entry page to create a new issue.
diff --git a/doc/userguide/list-views.md b/doc/userguide/list-views.md
new file mode 100644
index 0000000..a553847
--- /dev/null
+++ b/doc/userguide/list-views.md
@@ -0,0 +1,202 @@
+# Issue lists, grids, and charts
+
+[TOC]
+
+## How do teams use Monorail list, grid, and chart views?
+
+There are many uses for issue aggregate views, including:
+
+*   Finding a particular issue or a set of related issues
+*   Seeing issues assigned to you, or checking the status of issues you reported
+*   Seeing incoming issues that need to be triaged
+*   Understanding the set of open issues that your team is responsible for
+    resolving
+*   Understanding trends, hot spots, or rates of progress
+
+Monorail has flexible list views so that users can accomplish a wide range of
+common tasks without needing external reporting tools. But, for more challenging
+understanding tasks, we also offer limited integration with some reporting tools
+to Googlers.
+
+## How to search for issues
+
+1.  Sign in, if you want to work with restricted issues or members-only
+    projects.
+1.  Navigate into the appropriate project by using the project list on the site
+    home page or the project menu in the upper-left of each page.
+1.  Type search terms into the search box at the top of each project page. An
+    autocomplete menu will help you enter search terms. The triangle menu at the
+    end of the search box has an option for a search tips page that gives
+    example queries.
+1.  Normally, Monorail searches open issues only. You can change the search
+    scope by using the menu just to the left of the search box.
+1.  Press enter or click the search icon to do the search
+
+You can also jump directly to any issue by searching for the issue’s ID number.
+
+## How to find issues that you need to work on
+
+1.  Sign in and navigate to the appropriate project.
+1.  Search for `owner:me` to see issues assigned to you. You might also try
+    `cc:me` or `reporter:me`. If you are working on a specific component, try
+    `component:` followed by the component’s path.
+
+If you are a project member, the project owner may have already configured a
+default query that will show your issues or a list of high-priority issues that
+all team members should focus on.
+
+Issue search results pages can be bookmarked, so it is common for teams to
+define a query that team members should use to triage incoming issues, and then
+share that as a link or make a short-link for it.
+
+## How to refine a search query
+
+You can refine a query by editing the query terms in the search box at the top
+of the page. You can add more search terms to the end of the query or adjust
+existing terms. The autocomplete menu will appear if you position the text
+cursor in the existing query term. One common way to adjust search terms is to
+add more values to an existing term by using commas, e.g., `Pri:0,1`.
+
+A quick way to narrow down a displayed list of issues is to filter on one of the
+shown columns. Click on the column heading, open the `Show only` submenu, and
+select a value that you would like to see. A search term that matches only that
+value will be added to the query and the list will be updated.
+
+## How to sort an issue list
+
+1.  Do a query to get the right set of issues, and show the column that you want
+    to sort on.
+1.  Click the column heading to open the column menu.
+1.  Choose `Sort up` or `Sort down`.
+
+Labels defined by the project owners will sort according to the order in which
+they are listed on the label admin page, e.g., Priority-High, Priority-Medium,
+Priority-Low. Teams are also free to use labels that make sense to them without
+waiting for the project owner to define them, and those labels will sort
+alphabetically.
+
+To sort on multiple columns, A, B, and C: First sort on column, C, then B, and
+then A. Whenever two issues have the same value for A, the tie will be broken
+using column B, and C if needed.
+
+For multi-valued fields, issues sort based on the best value for that
+field.  E.g., if an issue has CC’s for `a-user@example.com` and
+`h-user@example.com`, it will sort with the A’s when sorting up and
+with the H’s when sorting down.
+
+Project owners can specify a default sort order for issues. This default order
+is used when the user does not specify a sort order and when there are ties.
+
+## How to change columns on an issue list
+
+1.  Click on the `...` menu located after the last column heading in the issue
+    list.
+1.  Select one of the column names to toggle it.
+
+Alternatively, you can hide an existing column by clicking on the column heading
+and choosing `Hide column`.
+
+## How to put an issue list into a spreadsheet
+
+You can copy and paste from an HTML table to a Google Spreadsheet:
+
+1.  Do a search and configure the issue list to show the desired columns.
+1.  Drag over the desired issues to select all cells.
+1.  Copy with control-c or by using the browse `Edit` menu.
+1.  Visit the Google Spreadsheet that you wish to put the information into.
+1.  Paste with control-v or by using the browse `Edit` menu.
+
+For longer sets of results, project members can export CSV files:
+
+1.  Sign in as a project member.
+1.  Do a search and configure the issue list to show the desired columns.
+1.  Click the `CSV` link at the bottom of the issue list.  A file will download.
+1.  Visit Google Drive.
+1.  Choose the menu item to upload a file.
+1.  Upload the CSV file that was download.
+
+The exported CSV will only contain data on that page. If the list is longer
+than one page either shorten the search result or go to the next page and
+click the `CSV` link again.
+You can also increase the pagination size to 1000 to include more results per
+page by adding &num=1000 to the query parameter
+
+## How to group rows
+
+The issue list can group rows and show a group heading. For example, issues
+could be grouped by priority. To group rows:
+
+1.  Do the issue search and, if needed, add a column for the field that you want
+    to use for grouping.
+1.  Click on the column header.
+1.  Choose `Group rows`.
+
+Each section header shows the count of issues in that section, and sections
+expanded or collapsed as you work through the list.
+
+## How to do a bulk edit
+
+1.  Search for issues that are relevant to your task.
+1.  Click the checkboxes for the issues that you want to edit, or use the
+    controls above the issue table to select all issues on the current page.
+1.  Select `Bulk edit` from the controls above the issue list.
+1.  On the bulk edit page, describe the reason for your change, and enter values
+    to add, remove, or set on each issue.
+1.  Submit the form.
+
+## How to view an issue grid
+
+Monorail’s issue grid is similar to a scatter chart in that it can give a
+high-level view of the distribution of issues across rows and columns that you
+select.
+
+1.  On the issue list page, click `Grid` in the upper-left above the issue list
+    table.
+1.  The issue grid shows the same issues that were shown in the issue list, but
+    in a grid format.
+1.  Select the fields to be used for the grid rows and columns.
+
+You can also set the level of detail to show in grid cells: issue tiles, issue
+IDs, or counts. Tiles give the most details about issues, but only a limited
+number of tiles can fit most screens. If issue IDs are shown, hovering the mouse
+over an ID shows the issue summary. Counts can be the best option for a large
+set of issues, and clicking on a count link navigates you to a list of specific
+issues.
+
+Note: Because some issue fields can be multi-valued, it is possible for a given
+issue to appear in multiple places on the issue grid at the same time. The total
+count shown above the grid is the number of issues in the search results, even
+if some of them are displayed multiple times.
+
+## How to view an issue chart
+
+Monorail’s chart view is a simple way to see the number of issues that satisfy a
+query over a period of time, which gives you insights into issue trends.
+Monorail uses historical data to chart any query made up of query terms that we
+support in charts. Unlike many other reporting tools, you do not need to define
+a query ahead of time. To see a chart:
+
+1.  Do a query for the issues that you are interested in. Charts currently
+    support only query terms for cc, component, hotlist, label, owner, reporter,
+    and status.
+1.  Click `Chart` in the upper-left above the issue table.
+1.  Hover your mouse over data points to see exact dates and counts.
+1.  Use the controls below the chart to adjust date range, grouping, and
+    predictions.
+
+## How to see a burndown chart
+
+One of the most important issue trends is the trend toward zero as a team works
+to resolve a set of issues related to some upcoming milestone or launch.
+Monorail can add a prediction line to the chart, which is commonly called a
+burndown chart. Here’s how:
+
+1.  Do a query for the issues that you are interested in. Charts currently
+    support only query terms for cc, component, hotlist, label, owner, reporter,
+    and status.
+1.  Click `Chart` in the upper-left above the issue table.
+1.  Click one of the prediction options in the controls below the chart. A
+    dotted line will be added to the chart showing the current trend and a
+    future prediction.
+1.  Optionally, click the chart legend items at the top of the chart to add
+    prediction error ranges.
diff --git a/doc/userguide/power-users.md b/doc/userguide/power-users.md
new file mode 100644
index 0000000..1241133
--- /dev/null
+++ b/doc/userguide/power-users.md
@@ -0,0 +1,159 @@
+# Power User Features
+
+[TOC]
+
+## Keyboard shortcuts
+
+Monorail offers many keyboard shortcuts. Press `?` to see a list of shortcuts.
+If your text cursor is in a text field, click outside of it or press Escape
+before pressing `?`.
+
+## Bookmarks
+
+Every page in Monorail can be bookmarked. The URL of each page can be shared
+with other users, who will see the contents of that page based on their own
+permissions. Individual issue comments are also anchors that can be bookmarked.
+
+For example, if your team uses a specific query to see the list of incoming
+issues that you are responsible for triaging, copy the URL of that issue list
+and share it. You may want to create a short link (a go/ link) and add a link to
+it in your team documentation.
+
+There are several query string parameters that can be included in the issue list
+page links, including:
+
+*   q= is the issue search query.
+
+*   can= is the issue search scope number. This defaults to 2 for open issues,
+    but it can be set to 1 to search all issues, or other values for other items
+    in the scope menu.
+
+*   sort= is a space-separated list of column names with the most significant
+    column first. Each column name can have a leading minus-sign for descending
+    sorting.
+
+*   colspec= is a space-separated list of columns names to display.
+
+*   groupby= is a space-separated list of columns names to group results by.
+
+*   num= is the number of issue results to be shown on each pagination page,
+    which defaults to 100.
+
+*   mode= defaults to `list` but can be set to `chart` or `grid`.
+
+## Deep links
+
+It is possible to bookmark Monorail pages that display a form, such as the issue
+entry page. Furthermore, you may add URL query string parameters to prefill some
+form fields for the user.
+
+On the issue entry form, these values can be filled in even if the user would
+normally not see those fields offered. You can use such links in user
+documentation that guides the user to report an issue that is labeled in a way
+to make it show up in your team’s triage query.
+
+Those fields are:
+
+* `template=` the name of the issue template to use
+
+* `summary=` initial issue summary
+
+* `description=` initial issue description
+
+* `labels=` a comma-separated list of labels (e.g., Type-Bug, Pri-2)
+
+* `owner=` email address of the initial issue owner
+
+* `status=` the status value for the new issue
+
+* `cc=` comma-separated list of email addresses to CC
+
+* `components=` a comma-separated list of component paths
+
+* `blocking=` a comma-separated list of bugs the new issue will block
+
+* `blockedon=` a comma-separated list of bugs the new issue is blocked by
+
+## Chrome custom search engines
+
+An easy way to skip a step when searching for issues is to define a keyword for
+searching monorail in the Chrome browser. Here’s how:
+
+1.  Pop up a context menu in the Chrome Omnibox URL field.
+1.  Select "Edit Search Engines...".
+1.  Click "Add".
+1.  Define a short keyword and use a Monorail URL with a `%s` placeholder.
+
+For example, you might define "mc" to search /p/chromium issues using URL
+`https://bugs.chromium.org/p/chromium/issues/list?q=%s` Or, you might use a deep
+link rather than a search. For example, you could start reporting a defect
+summary line directly from the Omnibox by defining "md" as
+`https://bugs.chromium.org/p/chromium/issues/entry?template=Defect+report+from+developer&summary=%s`
+
+## Federated issue tracking
+
+Monorail has some support for referencing issues in other issue tracking tools.
+You can always reference any issue in any web-based issue tracking tool by
+pasting the URL of that page into a Monorail issue comment. Googlers may also
+want to use the "b/" shorthand for internal issues. The "b/" syntax can be used
+in issue comments, blocking, blocked-on, and merged-info fields. Googlers may
+see an "i" icon with an option to sign in to preview the summary lines of
+referenced internal issues.
+
+## Crbug.com shortlinks
+
+Separate from Monorail itself, the Chromium developers maintain a service on
+crbug.com that redirects requests to Monorail pages. This allows for shorter
+URLs that are easier to type and fit more easily into source code comments.
+
+The supported URLs include:
+
+*   http://crbug.com/: Goes to the issue list in the /p/chromium project.
+
+*   http://crbug.com/123: Goes to issue 123 in the /p/chromium project.
+
+*   http://crbug.com/123#c4: Goes to issue chromium:123 comment 4.
+
+*   http://crbug.com/new or http://crbug.new: Goes to issue entry form in the
+    /p/chromium project.
+
+*   http://crbug.com/PROJECT/: Goes to the issue list in the specified project.
+
+*   http://crbug.com/PROJECT/123: Goes to issue 123 in the specified project.
+
+*   http://crbug.com/PROJECT/new: Goes to the issue entry form in the specified
+    project.
+
+## Autolinking
+
+When you type an issue description or comment, Monorail will automatically
+convert some parts of the text into HTML links. The following are supported:
+
+*   `issue 123` or `bug 123` link to issue 123 in the current project.
+
+*   `issue project:123` links to issue 123 in the specified project.
+
+*   `b/123` links to issue 123 in Google’s internal issue tracker.
+
+*   `cl/123` links to changelist 123 in Google’s internal version control
+    system.
+
+*   A git hash links to http://crrev.com for the specified commit, unless
+    otherwise specified in the project.
+
+*   `comment 6` or `#c6` link to the 6th comment in the current issue thread.
+
+*   `go/link-name` links to your page through Google’s shortlink service
+
+## Commit-log message integration
+
+Most projects are configured to allow the Git Watcher tool to post comments to
+issues. Including `Bug: <bug_id...>` in a commit message triggers Git Watcher to
+post a comment mentioning the commit on the issue when the commit's CL is
+submitted. Including `Fixed: <bug_id...>` in a commit message triggers Git
+Watcher to set the referenced bugs' status to "Fixed".
+
+Both the `Bug:` and the `Fixed:` automations accept bug IDs in multiple formats:
+*   `Fixed: n`
+*   `Fixed: project:n`
+*   `Fixed: <Issue Tracker URL>`
diff --git a/doc/userguide/profiles-and-hotlists.md b/doc/userguide/profiles-and-hotlists.md
new file mode 100644
index 0000000..4c85888
--- /dev/null
+++ b/doc/userguide/profiles-and-hotlists.md
@@ -0,0 +1,202 @@
+# User Profiles and Hotlists
+
+[TOC]
+
+## The account menu
+
+The user account menu is located at the far upper-right of each Monorail page.
+When you are signed out, it offers a link to sign in. When you are signed in, it
+offers a menu with choices to switch users, access your user pages, or sign out.
+User pages include the user profile, updates, settings, saved queries, and
+hotlists.
+
+## The user profile page
+
+Each Monorail user has a profile page that can be accessed at URL `/u/EMAIL` or
+via their user ID number. You can access your own profile page through the
+account menu. You can click to access the profile page of any user who you see
+mentioned on an issue detail page as the issue reporter, owner, CC'd user, or a
+comment author.
+
+The user profile page lists projects where that user has a membership. The
+profile page shows how long it has been since the user used that account to
+visit the site. Please note that some users have multiple accounts, so they may
+have visited more recently using a different account. Also, if the user has set
+a vacation message, that message is shown here.
+
+Any project owner may ban a user from the site by clicking a button on the user
+profile page. This is one way that we fight spam and abuse.
+
+## Linked accounts
+
+Googlers who have an @chromium.org account may wish to link it to their
+@google.com account. These two types of accounts can be linked with one becoming
+the parent account and the other becoming the child account.
+
+When accounts are linked:
+
+*   Using the child account will display a reminder notice to switch to the
+    parent account.
+
+*   When signed in to the parent account, the user also has all permissions of
+    the child account.
+
+*   If both accounts would be listed in an autocomplete menu, only the parent
+    account is listed.
+
+*   If both accounts would be notified of an issue change, only the parent
+    account is notified.
+
+*   Searching using the `me` keyword will match issues that reference either
+    account.
+
+To link accounts:
+1.  Sign in to the account that you want to become the child
+    account (the one that you don't intend to use any longer).
+1.  Visit the profile page for the child account.
+1.  Invite the other account to be the parent account.
+1.  Use the account menu to switch users to the parent account (the one
+    that you intend to use from now on).
+1.  Use the account menu to go to the profile page for the parent
+    account. This is not the profile that you are already on.
+1.  Accept the invitation to link the child account.
+
+To unlink accounts: sign in as either account, use the account menu to navigate
+to your profile page, and click the `Unlink` button.
+
+## The user settings page
+
+The settings page allows users to set user preferences for their account. You
+can navigate to the settings page by signing in and selecting `Settings` from
+the account menu.
+
+On that page you can set preferences that affect:
+
+*   Privacy: How your email address is displayed to non-members.
+
+*   Notifications: What triggers notifications to you and how they are
+    formatted.
+
+*   Community interactions: Opt into settings that help avoid accidental
+    oversharing.
+
+*   Availability: You can let other users know that you are away.
+
+Site administrators can also view and change the settings for any other user on
+that user's profile page.
+
+## The user activity page
+
+The user updates page lists recent activity by that user. This page can be
+reached by clicking `Updates` in the account menu for your own updates, or via
+the `Updates` tab on any user's profile page.
+
+The list of updates includes new issue reports and comments posted on existing
+issues. Each row show how long ago the activity happened, which issue was
+affected, and the content of the change. You can click to expand each row to
+show more details.
+
+The list of issue changes only includes rows for issues that the signed in user
+is currently allowed to view.
+
+## The user hotlists page
+
+The user hotlists page lists hotlists that a user owns or can edit. This page
+can be reached by clicking `Hotlists` in the account menu for your own hotlists,
+or via the `Hotlists` tab at the top of any users profile page.
+
+Clicking on a row in the hotlists table navigates to the list of issues in that
+hotlist. When viewing a hotlist, the hotlist owner and editors may rerank issues
+in the hotlist, and they may add or remove issues. Reranking issues in a hotlist
+is only possible when the issues are sorted by rank. Reranking is done by
+dragging a gripper icon up or down the list.
+
+In the list of hotlists, only hotlists that the signed in user is allowed to
+view are shown. And, within a specific hotlist, only issues that the signed in
+user is allowed to view are shown.
+
+## How to create a hotlist
+
+1.  Sign in and select `Hotlists` from the account menu.
+1.  Click the `Create hotlist` button.
+1.  Choose a name and provide a description for the hotlist.
+1.  You may list other users who should be able to edit the hotlist.
+1.  Hotlists are only visible to hotlist members by default, but you can make
+    your hotlist public.
+1.  Submit the form.
+
+It is also possible to create a hotlist directly from an issue list, an issue
+detail page, or an existing hotlist page. See below for details.
+
+## Who can view a hotlist?
+
+A public hotlist can be viewed by anyone on the Internet, even anonymous users.
+
+A members-only hotlist can only be viewed by the hotlist owner and members
+listed on the hotlist people page. You can add or remove people from your
+hotlist by clicking the `People` tab at the very top of any hotlist page.
+
+Hotlists do not affect issue permissions. The individual issues within a hotlist
+are subject to the normal permission checking for issues. If a user cannot view
+an issue, they will not see it listed in the hotlist, even if they can view or
+edit the hotlist itself.
+
+## How to add or remove issues to a hotlist
+
+There are several ways to do it.
+
+Starting from an issue detail page, you can add the issue to one or more
+hotlists, or remove it:
+
+1.  Sign in and view an issue detail page.
+1.  Click `Update your hotlists` in the issue data column.
+1.  In the dialog box, check or uncheck the names of hotlists to add or remove.
+1.  Alternatively, you can create a new hotlist directly from that dialog box.
+
+Project members can add multiple issues to hotlists by starting from the issue
+list page or an existing source hotlist:
+
+<!-- TODO: The WC version of the issue list does not require the user
+to be a member. -->
+
+1.  Sign in as a project member and view an issue list page or existing hotlist.
+1.  Select one or more issues by clicking checkboxes or using the `x` keystroke.
+1.  Click `Add to hotlist...` in the action options above the issue list.
+1.  In the dialog box, check the names of hotlists to add the issues to.
+1.  Alternatively, you can create a new hotlist directly from that dialog box.
+
+Starting from the list of issues in the target hotlist:
+
+1.  Sign in as the hotlist owner or a member who can edit the hotlist.
+1.  Click `Add issues...` from the actions above the issue list.
+1.  Type in a comma-separated list of project names and issue IDs. For example
+    `chromium:1234`.
+
+## How to rerank issues in a hotlist
+
+1.  Sign in as the hotlist owner or a member who can edit the hotlist.
+1.  Visit the hotlist issue list page.
+1.  Don't sort the issues by any column heading other than Rank.
+1.  As you hover the mouse over each issue row, a gripper icon will appear in
+    the far left column.
+1.  Drag the gripper icon up or down the list to place the selected issue in the
+    new position.
+
+## How to delete a hotlist
+
+1.  Sign in as the hotlist owner.
+1.  Visit the hotlist issue list page.
+1.  Click the `Settings` tab at the very top of the page.
+1.  Click `Delete hotlist` and confirm the deletion.
+
+## How can I completely delete my account?
+
+You can delete your Google account at http://myaccount.google.com. If you do
+that, a few days later, Monorail will be notified of the account deletion. At
+that time, issues and comments posted by that account will be changed to
+indicate that the author is `a deleted user`. The issues and comments themselves
+are your contribution to the project and they remain a part of the project.
+
+If you wish to completely delete your Monorail account without deleting your
+Google account, please
+[file an issue](http://bugs.chromium.org/p/monorail/issues/entry?labels=Restrict-View-Google).
diff --git a/doc/userguide/project-owners.md b/doc/userguide/project-owners.md
new file mode 100644
index 0000000..0ce4f5b
--- /dev/null
+++ b/doc/userguide/project-owners.md
@@ -0,0 +1,398 @@
+# Project Owner's Guide
+
+[TOC]
+
+## Why does Monorail have projects?
+
+Each project contains issues, grants roles to project members, and
+configures how issues are tracked in that project.
+
+Projects are coarse-grained containers that provide the most basic
+issue organization and access control capabilities.  For example,
+issues related to the Chromium browser are in `/p/chromium`, while
+issues for the Monorail issue tracker are in `/p/monorail`.  Monorail
+has many ways to organize issues, such as labels and components, but
+at the highest level, issues are organized by project.  Likewise,
+Monorail has many ways to control access to issues through restriction
+labels, but at the highest level a user either has permission to visit
+an entire project or they do not.  Projects also provide a
+coarse-grained life-cycle for issues: when the entire project is
+archived, all issues belonging to that project become inaccessible.
+
+The rest of this chapter deals with how project owners can configure
+the issue tracking process within a project.  Each project is intended
+to have a single, unified, and coordinated process for tracking
+issues.  If two issues are in the same project, they should be
+expected to have roughly the same life-cycle and meaningful fields,
+whereas two issues in two separate projects might be tracked in fairly
+different ways.  Also, the set of possible issue owners is determined
+by the members of the project, so two issues in two distinct projects
+could have two distinct sets of possible issue owners.
+
+Unlike some other issue tracking tools, components in Monorail are not
+a unit of process definition: an issue can be in zero, any one, or any
+number of components within a project. The components should just
+provide context as to which part of the project's source code has the
+defect and which teams should be CC'd on the issue.  Every issue in a
+project should have the same life-cycle regardless of component.  Any
+member of a project could be the owner of any issue in that project,
+regardless of components.
+
+Issues can be moved between projects, but that is uncommon, and they
+are contained within exactly one project at any time.  When an issue
+is moved between projects, it is likely that several fields of the
+issue will need to be updated, such as the status and owner.  In
+contrast, components within a project can usually be added to or
+removed from an issue while keeping other fields unchanged.
+
+## How to quickly remove spam and spammers
+
+The purpose of Monorail is to help developers resolve software defects
+and other issues.  Any comments that seem to be spam, abuse, or wildly
+off topic should be removed from the site.  That can be done by using
+the `...` menu on comments or issues.
+
+Any project owner can ban a user from the site by clicking on the user
+email link to get to that user’s profile page, and then clicking `Ban
+Spammer`.  All comments and issues entered by that user are
+automatically marked as spam.
+
+## How to grant roles to project members
+
+1.  Sign in as a project owner and visit any page in your project.
+1.  Open the gear menu and select `People`.
+1.  Click the `Add members` button.
+1.  Enter the email addresses of the users that you want to add to the project.
+1.  Choose the role that they should have: Owner, Committer, or Contributor.
+1.  Click `Save changes`.
+
+Once a user has been granted a role in the project, the people list
+page will have a row for that user.  Anyone who can visit the project
+can click a project member row to see details of that user’s
+permissions in the project on a people detail page.  Project owners
+can use the people details page to change the role of a user or grant
+them individual permissions.
+
+User roles in a project can be removed by clicking buttons on either
+the people list page or people detail page.
+
+## How to configure statuses
+
+1.  Sign in as a project owner and visit any page in your project.
+1.  Open the gear menu and select `Development process`.
+1.  Click the `Statuses` tab at the top of the page.
+1.  Type open and closed status definition lines in two text
+    input areas on that page.
+1.  Click `Save changes`.
+
+The syntax of a status definition line is `[#]StatusName[=
+docstring]`.  Where `#` indicates that the status is deprecated.
+`StatusName` is the name of the status, which may contain dots,
+dashes, and underscores, but no spaces.  And, the optional `docstring`
+is the documentation string that will be displayed to users to explain
+the meaning of that status.
+
+Deprecated status values are not offered in autocomplete menus or the
+status field menu.  However, they are kept in the system so that
+existing issues that have that status can be sorted according to the
+logical rank.  In contrast, a status value that is no longer desired
+could be simply deleted, which would remove it from menu choices and
+also lose the logical ranking of that status value.
+
+The status definition page also has a field to list statuses that
+indicate that an issue is being merged into another issue.  Usually
+that is set to simply `Duplicate`.  However, it is possible to use a
+different name for that status that fits your process better, or to
+list multiple such statuses.
+
+## How to configure labels
+
+1.  Sign in as a project owner and visit any page in your project.
+1.  Open the gear menu and select `Development process`.
+1.  Click the `Labels and fields` tab at the top of the page.
+1.  Type label definition lines in the text input area.
+1.  Click `Save changes`.
+
+The syntax of a label definition line is `[#]LabelName[= docstring]`.
+Where `#` indicates that the label is deprecated.  `LabelName` is the
+name of the status, which may contain dots, dashes, and underscores,
+but no spaces.  And, the optional `docstring` is the documentation
+string that will be displayed to users to explain the meaning of that
+label.
+
+It is common to define a set of related Key-Value labels that all have
+the same Key.  The Monorail user interface treats them somewhat like
+enum fields.  The Key part of the label can be used in queries, as
+search result column headings, or as grid axes.  Some Key strings can
+be listed as exclusive prefixes, which means that the Monorail UI will
+not offer autocomplete options for another value once an issue has one
+of those Key-Value labels.
+
+Deprecated labels values are not offered in autocomplete menus, just
+as with deprecated status values.  See the section above for details.
+
+## How to configure custom fields
+
+1.  Sign in as a project owner and visit any page in your project.
+1.  Open the gear menu and select `Development process`.
+1.  Click the `Labels and fields` tab at the top of the page.
+1.  To edit an existing custom field, click on the row for that
+    custom field in the field definition table.
+1.  Or, to create a new custom field, click `Add field`.
+
+The form used to create or edit a field definition consists of the
+field name, field type, and various validation options that are
+appropriate to that field type.  For example, an integer custom field
+could specify a minimum or maximum value.  Most details of a field
+definition can be changed later, but the name cannot.  Also, a deleted
+field name cannot be reused.
+
+Enum-type custom fields are stored as labels in Monorail's database.
+If you start to create an enum-type custom field with name "Key", you
+will immediately see enum values offered for each existing Key-Value
+label that has the same Key part.  The syntax for defining new enum
+options is `EnumValue[= docstring]`.
+
+Custom fields may be configured to be applicable to any issue or only
+to issues that have a specific `Type-*` label.  And, the field can be
+optional or required on issues where it is applicable.  For example, a
+DesignDoc custom field with a link to a design document might be a
+required field for any issue that has the Type-Design-Review label.
+
+A custom field can have a `Parent Approval`, which means they will
+appear under the parent approval's section in an issue, separate from
+where other fields are shown.
+A custom field can also be an `Issue Gate field`, which means they will
+appear under each issue's gate, separate from where other fields are shown.
+For example, if an Issue has gates `Design`, `Test`, and `Launch`, a gate
+field called `Milestone` would appear under each gate section. If
+`Milestone` is a multi-valued field, each gate's "Milestone" can have
+multiple values.
+A custom field cannot be a gate field and have a parent approval at the
+same time.
+
+Some fields are more commonly used than others.  In large projects,
+there may be variations of the software development process that are
+only used with a few issues.  Over time, more and more such process
+variations will be defined, and the total set of custom fields to
+support all those different variations could make issue editing forms
+long and complex.  Monorail helps manage that situation by allowing
+fields to be defined as important enough to always be offered as a
+visible field when the field is applicable to the issue, or only
+important enough to be kept behind a `Show all fields` link.
+
+Project owners may edit any field.  Each field may also specify a list
+of field administrators who are also allowed to edit that field.  This
+helps project owners delegate responsibility for configuring fields
+used in certain development processes to the developers who perform
+those processes.  Each field can also specify a list of field editors
+when the field is restricted.  This helps project owners delegate responsibility
+for changing the value of a custom field (in issues or templates) to specific
+users or monorail groups.
+
+## How to configure approvals
+
+1.  Sign in as a project owner and visit any page in your project.
+1.  Open the gear menu and select `Development process`.
+1.  Click the `Labels and fields` tab at the top of the page.
+1.  To edit an existing approval definition, click on the row for that
+    approval field in the field definition table.
+1.  Or, to create a new approval definition, click `Add field`.
+
+Approvals are used to track the review and approval of some feature,
+project, or proposal.
+An approval definition has a default set of `Approvers`,
+a `Survey` field, plus a `Description` and `Admins` like custom fields.
+
+Approval definitions are used to create Approval Values in issues.
+`Approvers` are allowed to set an Approval Value status to
+`Approved` or `Not Approved`. and `NA`. When an issue is first created
+with approvals, the approval definition's `Approvers` are used as the
+initial default set of the Approval Value's `Approvers`. From there,
+the approvers can add or remove other users as approverss for that
+particular issue.
+
+An approval definition's `Survey` will also be copied over to an issue's
+approval value during issue creation and can be modified within the issue
+later on.
+
+Changing an Approval definition's `Approvers` or `Survey` does not
+retroactively change the `Approvers` or `Survey` of approval values
+in existing issues.
+
+Approval values in issues can only be created using issue templates.
+
+See the section on [configuring templates](#How-to-configure-issue-templates)
+for more information.
+
+## How to configure filter rules
+
+1.  Sign in as a project owner and visit any page in your project.
+1.  Open the gear menu and select `Development process`.
+1.  Click the `Rules` tab at the top of the page.
+1.  Fill in some rule predicates and consequences.
+1.  Submit the form.
+
+Filter rules are if-then rules that automatically add information to
+issues when the issues are created, when the issues are updated, and
+when the rules change.  Rules add derived values to issues, which are
+stored separately from the explicitly set values on the issue itself.
+When a value is explicitly set, that value overrides the derived
+value, however the derived value itself cannot be edited except by
+changing the rule.
+
+The purpose of filter rules is to allow the explicit values on an
+issue to focus on capturing the details of the problem situation,
+while pragmatic concerns such as access controls and prioritization
+can have meaningful defaults set automatically.
+
+For example, there could be a rule that says `if [type=Defect
+component=Authentication] then add label Restrict-View-SecurityTeam`.
+That would mean that any defect in the system’s authentication
+component should be restricted to only be viewable by the security
+team (and the reporter, owner, and any CC’d users).
+
+## How to configure issue templates
+
+1.  Sign in as a project owner and visit any page in your project.
+1.  Open the gear menu and select `Development process`.
+1.  Click the `Templates` tab at the top of the page.
+
+Issue templates are used to create new issues with some of the details
+filled in.  Each template has a name and the initial values for the
+issue summary, description, and other fields.  Most templates will be
+available to all users who can report issues in the project, but it is
+also possible to restrict a template to only project members.
+
+On that page you can set the default templates that are used for new
+issue reports by project members or non-members.  And, there is a list
+of existing templates and a button to create a new template.
+
+Each template must have a unique name.  Templates cannot be renamed
+after creation, but you can create a new template with the desired
+name then delete the original template.
+
+Template summary lines that begin with text inside brackets, such as
+`[Deployment] Name of system that needs to be deployed` will cause the
+issue entry page to keep the bracketed text when the user initially
+types the summary line.  Also, any labels that end with a question
+mark, like `Key-?`, will cause the issue entry page to require the
+user to edit that label before submitting the form.
+
+A template can have some set of approvals that may belong to some
+set of gates defined in the template. A template may have approvals
+that do not belong to any gate, but a gate must have at least one
+approval associated with it. Approvals and gates are for project owners
+to communicate some process of reviewing and approving. A project may
+have a process where new features must be reviewed by some group of
+UX, Privacy, Security, A11y teams. These are represented by approvals.
+The process may also require some phases like `Proposal`, `Design`,
+and `Launch` where the approvals of one phase must be completed before
+a team can move on to the next phase. This process can be represented
+by approvals within gates.
+When an issue is created using the template, it inherits the set of
+approvals and gates. The approvals and gates that exist within an
+issue cannot be changed after issue creation. Issues cannot be
+created with approvals and gates that are not copied over from a
+template.
+Project owners can create issue templates for a process. Whenever
+a team wants to begin such a process, they would create a new issue
+using the appropriate template.
+Changing the approvals and gates structure of a template will not
+retroactively change the approvals and gates of issues that have
+already been created.
+
+Each template can have a comma-separated list of template
+administrators who are allowed to edit that template.  This allows
+project owners to delegate authority to maintain certain templates to
+the teams that work on issues that use that template.  However, the
+overall set of templates is controlled by the project owners.
+
+## How to configure components
+
+1.  Sign in as a project owner and visit any page in your project.
+1.  Open the gear menu and select `Development process`.
+1.  Click the `Components` tab at the top of the page.
+
+Components form a high-level outline of the software being developed
+in the project so that an issue can be related to the part of that
+software that needs to change.  For example, if a software system has
+architectural tiers for database access, business logic, and user
+interface, that would suggest using three components in Monorail.  If
+a piece of software is developed by a different team or using
+different processes, then using a separate monorail project may be
+more appropriate.
+
+The components list page shows a list of all currently active
+components in the project.  It can be filtered to show a smaller set
+of components, for example just the components that the signed-in user
+is involved in.  Showing all components includes both active
+components and components that have been marked as deprecated.
+
+Each component is identified by a path string that consists of a list
+of names separated by greater-than signs, e.g., `Database>Metrics`.
+When searching for issues by component, subcomponents are normally
+included in the results.
+
+The main purpose of components is to indicate the part of the software
+that needs to change to resolve an issue.  That could be determined as
+part of the investigative work needed to fully document the issue.
+Monorail components help with some of the pragmatic aspects of issue
+tracking by automatically adding labels or CCing people who might help
+resolve the issue.
+
+Each component can have a comma-separated list of component
+administrators who are allowed to edit that component.  This allows
+project owners to delegate authority to maintain certain components to
+the teams that work on issues that use that component.  However, the
+overall set of components and their organization is controlled by the
+project owners.
+
+## How to configure default views
+
+1.  Sign in as a project owner and visit any page in your project.
+1.  Open the gear menu and select `Development process`.
+1.  Click the `Views` tab at the top of the page.
+1.  Fill in a default query for project members to help them stay
+    focused on the issues that are most important for the team as a
+    whole, or set it to `owner:me` to focus each team member on
+    resolving the issues assigned to them.
+1.  Fill in default list columns and grid options.
+1.  Submit the form.
+
+## How to administer project settings
+
+1.  Sign in as a project owner and visit any page in your project.
+1.  Open the gear menu and select `Administer`.
+
+This page allows project owners to edit the project summary line,
+description, access level and some other settings.  The description
+can be written in Markdown.
+
+## How to view the project storage quota
+
+1.  Sign in as a project owner and visit any page in your project.
+1.  Open the gear menu and select `Administer`.
+1.  Click the `Advanced` tab at the top of the page.
+
+The second section of the page shows how much storage space has been
+used for attachments in this project and the current limit.  If the
+usage reaches the limit, users will no longer be offered the option to
+add attachments to issues.  Site administrators can increase the
+storage limit for each project.
+
+## How to move, archive, or delete a project
+
+1.  Sign in as a project owner and visit any page in your project.
+1.  Open the gear menu and select `Administer`.
+1.  Click the `Advanced` tab at the top of the page.
+1.  Click a button to `Archive` the project.
+1.  Or, fill in a new project URL and click the `Move` button to
+    indicate that the project has moved.
+
+When a project is archived, only project owners may access the content
+of the project.  Also, ‘Unarchive’ and `Delete` options will be
+offered on that page.  If the project owner clicks the `Delete`
+button, the contents of the project will immediately become
+inaccessible to any users, and all data for that project will be
+deleted from Monorail's database within a few days.
diff --git a/doc/userguide/project-pages.md b/doc/userguide/project-pages.md
new file mode 100644
index 0000000..3b30716
--- /dev/null
+++ b/doc/userguide/project-pages.md
@@ -0,0 +1,76 @@
+# Other Project Pages for Users
+
+[TOC]
+
+## The project list page
+
+The site home page at https://bugs.chromium.org/ shows a list of
+projects that we host on the site.  Each project row shows the project
+name, summary, your role in the project, and how long it has been
+since the last activity in that project.
+
+## The project menu
+
+When you are in a project, the name of the project is shown in the
+upper-left of each page.  Clicking on that name opens a menu that
+lists all the projects where you have a membership or that you have
+starred.  You can easily navigate between projects by selecting a
+different project from that menu.
+
+## The project people page
+
+When you are in a project, there is a gear menu located just to the
+right of the issue search box.  Selecting `People` from that menu
+takes you to the project people list.
+
+The project people list page lists all the members of the current
+project, along with their roles, extra permissions, and any notes.  As
+a user, you can refer to this list to learn who is involved in the
+project so that you can involve them in issues or contact them via
+email.  As with all pages on the site, project members see the email
+addresses of other users, and non-members will only see the email
+addresses of other users who have opted into sharing that information.
+
+Project owners use this page to add and remove project members.
+
+## The development process pages
+
+When you are in a project, there is a gear menu located just to the
+right of the issue search box.  Selecting `Development process` from
+that menu takes you to the project introduction page.
+
+The project introduction page has a short textual description of the
+goal of the project.  And, most projects have a link to the source
+code location for the software being developed.
+
+The tabs across the top of the page allow you to navigate to pages
+that show many more details of the software development process.
+These pages are accessible to all users who can view the project.  The
+purpose of these pages is to help all users participate in the project
+productively, which requires that they know the meaning of the fields
+and values being used.
+
+The development process tabs are:
+
+* Statuses: Lists open and closed issue statuses
+
+* Labels and fields: Lists issue labels and custom field definitions
+
+* Templates: Lists templates used to create new issues
+
+* Components: Lists software components being developed
+
+* Views: Shows default options for the issue list and grid pages, and
+  any saved queries
+
+
+## The project history page
+
+When you are in a project, there is a gear menu located just to the
+right of the issue search box.  Selecting `History` from that menu
+takes you to the project history page.
+
+The project history page shows a list of recent changes to issues in a
+project.  You can click to expand each row to see the details of an
+individual change.  The list only includes items for issues that you
+are currently allowed to view.
diff --git a/doc/userguide/quick-start.md b/doc/userguide/quick-start.md
new file mode 100644
index 0000000..fd9b790
--- /dev/null
+++ b/doc/userguide/quick-start.md
@@ -0,0 +1,186 @@
+# Monorail Quick Start
+
+[TOC]
+
+## Mission: Track issues to help improve software products
+
+Monorail’s mission is to track issues to help improve software
+products.  Every piece of information stored in Monorail’s database is
+contributed from a user to one of the projects that we host for the
+purpose of helping developers work on that project.  Issue tracking
+covers many different development processes, including fixing defects,
+organizing enhancement requests, breaking down new development work
+into tasks, tracking operational and support tasks, coordinating and
+prioritizing work, estimating schedules, and overseeing new feature
+launches.
+
+
+## Guiding principles
+
+* Flexibility: Monorail is unusually flexible, especially in its use
+  of labels and custom fields.  This allows large projects to include
+  several small teams, some of which care about labels and fields that
+  are specific to their own processes.  Flexibility also enables
+  process changes to be gracefully phased in or phased out over the
+  long term.
+
+* Security: Even open source projects need access controls so that
+  developers can work to resolve security flaws before disclosing
+  them.  Per-issue access controls allow developers to work closely
+  with users and partners on a mix of public and restricted issues.
+
+* Inclusiveness: Computing is an empowering and equalizing force in
+  society.  Monorail’s inclusive functionality and user interface can
+  help many different stakeholders influence the future of a project,
+  causing ripple effects of inclusion through our software ecosystem.
+
+
+## High-level organization
+
+A Monorail server is divided into projects, such as `/p/chromium` and
+`/p/monorail`, that each have a list of project members, and that
+contain a set of issues.  Each project also has a page that lists the
+history of issue changes, and a set of pages that describe the software
+development process configured for that project.
+
+Each issue has metadata such as the issue summary, reporter, owner,
+CC'd users, labels, and custom fields.  Each issue also has a list of
+comments, which may each have some attachments and amendments to the
+metadata.
+
+Each user also has a profile page and related pages that show that user's
+activity on the site, their saved queries, and their hotlists.
+
+
+## How to enter an issue
+
+Please search for relevant existing issues before entering a new issue.
+
+1. Sign in to Monorail.  If this is your first time, you will see a
+   privacy notice dialog box.
+1. Click on the `New issue` button at the top of the page.
+   Note: In the `/p/chromium` project, non-members will be redirected
+   to a new issue wizard.
+1. Choose an issue template based on the kind of issue that you want
+   to create.
+1. Fill in the issue summary and details.
+1. Project members can also set initial values for labels and fields.
+1. Attach files that will help project members understand and
+   resolve the issue.
+
+Most issue types are public or could become public, so don't include
+personal or confidential information.  Be mindful of the contents of
+attachments, and crop and redact screenshots to avoid sharing
+unintended details.  Never include passwords.
+
+When you report an issue, you star the issue by default.  Starring
+causes you to get email notifications of comments on that issue.
+
+It is also possible to enter issues by clicking on a "deep link" to
+our issue entry page.  Such links are sometimes used in documentation
+pages that tell users when to file an issue.
+
+
+## How to search for issues
+
+1. Click on the search box at the top of the page.
+1. Type in some search terms.  These can be structured or full text terms.
+   The autocomplete menu lists possible structured terms.
+1. The search will cover open issues by default.  You can search all
+   issues or another scope by selecting a value from the search scope
+   menu.
+1. Press Enter, or click the search icon.
+
+A menu at the end of the search box input field offers links to the
+advanced search page and the search tips page.
+
+You can jump directly to any issue by searching for the issue’s ID
+number.
+
+
+## How to comment on an issue
+
+1. Sign in to Monorail.  If this is your first time, you will see a
+   privacy notice dialog box.
+1. The comment box is located at the bottom of each issue detail page,
+   below existing comments.
+1. Please keep comments respectful and constructive with the goal of
+   resolving the issue in mind.  A message with a code of conduct link
+   is shown to new users.
+1. If you want to be notified of future updates on this issue, click
+   the star icon.
+
+If you need to delete a comment that you posted, use the "..." menu
+for that comment.  Attachments can also be marked as deleted.
+
+
+## How to edit an issue
+
+1. Sign in to Monorail as a project member.  Only project members may
+   edit issues.
+1. The editing fields are located with the comment form at the bottom
+   of the page.
+1. Please consider posting a comment that briefly explains the reason
+   for the edit.  For example, "Lowering the priority of this defect
+   because there is a clear work-around."
+
+It is also possible for project members to bulk edit multiple issues
+at one time, and to update an issue by replying to some issue update
+notifications.
+
+
+## How to link to an issue
+
+If you need a URL that you can bookmark or paste into another document:
+
+* You can copy and share the URL of the issue as it is shown in the
+  browser location bar.
+
+* For a cleaner link, open the browser context menu on the link icon
+  located next to the issue summary, then choose "Copy Link Address".
+
+If you are writing text in an issue comment, you can make a textual
+reference to another issue by typing the word "issue" or "issues".  For
+example:
+
+* issue 1234
+* issues 1234, 2345, and 3456
+* issue monorail:1234
+
+
+## How to be notified of changes to an issue
+
+There are several ways to get notifications:
+
+* Click the star icon at the top of the issue to express your interest
+  in seeing the issue resolved and to be notified of future updates to
+  the issue.  Or, click the star icon for that issue in the issue list.
+
+* The issue owner and any CC’d addresses are notified of changes.
+
+* You can subscribe to a saved query.  Start by clicking the "Saved
+  queries" item in the account menu.
+
+
+## How to associate a CL with an issue
+
+1. When you create a code change list, include a "BUG:" or "Fixed:"
+   line at the bottom of the change description.
+1. When you upload the CL for review, consider posting a comment to
+   the issue with the URL of the pending CL.
+1. Most projects have set up the Git Watcher, formerly Bugdroid, to post a
+   comment to the issue when the CL lands.
+
+
+## How to ask for help and report problems with Monorail itself
+
+<!-- This is purposely written in a couple different places to make it
+     easier for users to find. -->
+
+If you wish to file a bug against Monorail itself, please do so in our
+[self-hosting tracker](https://bugs.chromium.org/p/monorail/issues/entry).
+We also discuss development of Monorail at `infra-dev@chromium.org`.
+
+You can report spam issues via the "..." menu near the issue summary.
+You can report spam comments via the "..." menu on that comment.  Any
+project owner can ban a spammer from the site.
diff --git a/doc/userguide/site-admins.md b/doc/userguide/site-admins.md
new file mode 100644
index 0000000..619db5e
--- /dev/null
+++ b/doc/userguide/site-admins.md
@@ -0,0 +1,95 @@
+# Site Admin's Guide
+
+[TOC]
+
+## What are Monorail site administrator accounts and what are they used for?
+
+Site administrators are like super-users in Monorail.  A site admin
+account can perform any action that any other account can perform, and
+some that are only available for site administrators.  While most
+permissions can be granted to project members by project owners, some
+of the administrative permissions are reserved for site admins only.
+
+Site admins have the ability to create projects and user groups.  They
+can also make changes to existing projects, user groups, users, or
+issues on behalf of project owners that are having trouble making the
+desired changes for some reason.  For example, a site admin might help
+a project owner by setting up an initial project configuration.  Both
+project owners and site admins can ban users from the site to help
+fight spam and abuse.
+
+
+## How to create a project
+
+1.  Sign into your site admin account.
+1.  Visit the site home page.
+1.  Click the `Create a new project` link.
+1.  Fill in the project name, summary, and description.
+1.  Submit the form.
+
+1.  In the new project, visit the People page to grant a role to a
+    project owner and remove yourself.
+
+## How to delete a project
+
+1.  Sign into your site admin account.
+1.  Open the gear menu and select `Administer`.
+1.  Click the `Advanced` tab at the top of the page.
+1.  Click a button to `Archive` the project.
+
+Site admins also have a `Doom` option that schedules the project for
+deletion in 90 days.  The `Archive` options will be a better choice
+for most projects because storage space is typically not a problem for
+our site.
+
+## How to increase the project storage quota
+
+1.  Sign into your site admin account and visit any page in the project.
+1.  Open the gear menu and select `Administer`.
+1.  Click the `Advanced` tab at the top of the page.
+1.  Type in a new storage limit.  The limit is measured in megabytes.
+1.  Click `Update Quota`.
+
+## How to view the list of user groups
+
+1.  Sign into your site admin account.
+1.  Visit the `/g` URL to see the list of user groups.
+
+There is currently no link to navigate to that page.  It is only
+accessible to site admins.
+
+## How to create a new user group
+
+1.  Sign into your site admin account.
+1.  Visit the `/g` URL to see the list of user groups
+1.  Click `Create Group`.
+1.  Fill in the form and submit it.
+
+Monorail has three types of user groups: native groups that are
+managed entirely within Monorail, synchronized user groups that are
+periodically copied from Google Groups or other sources, and computed
+user groups that are based entirely on email address domain name.  To
+set up a synchronized user group, see the Monorail playbook.
+
+## How to ban a user account
+
+1.  Sign into your site admin account.
+1.  Visit the user’s profile page.
+1.  Fill in a reason to ban the user.  Or, click `Ban this user as a spammer`.
+
+The reason field serves as a note to other site admins, it is not
+shown to the user or other users.
+
+If you use the `Ban this user as a spammer` button, all of the issues
+and comments posted by that user will be marked as spam.
+
+## How to completely delete a user account
+
+1.  Sign into your site admin account.
+1.  Visit the user's profile page.
+1.  Click `Delete user account`.
+
+The user record will be deleted from our database.  Any references to
+that user in issue fields or comment author lines will be removed or
+changed to `a deleted user`, but the content itself will be retained
+as part of the project that it was contributed to.
diff --git a/doc/userguide/working-with-issues.md b/doc/userguide/working-with-issues.md
new file mode 100644
index 0000000..a43777b
--- /dev/null
+++ b/doc/userguide/working-with-issues.md
@@ -0,0 +1,350 @@
+# Working with Issues
+
+[TOC]
+
+## Why do we  track issues?
+
+The goal of tracking an issue is to resolve it.  Issues are a way for
+the development team to organize information about work that could be
+done to improve their software product.  There are many types of
+issues including defects, enhancement requests, operational alert
+tickets, and several others.  There are typically far more things that
+the team could be working on than they actually have time to work on,
+so issues are triaged, prioritized, labeled, assigned, and discussed.
+They can be open for a long time before being resolved.  After they
+are resolved, many issues contain important rationale that can be used
+when investigating regressions.
+
+
+## What’s in an issue?  And, why is that information needed?
+
+Issues in Monorail contain a summary line, description, comments, a
+reporter, an owner, CC’d users, labels, components, custom fields, and
+references to related issues.  Users can express interest in an issue
+by starring it, and each issue shows a star count.  Each piece of that
+information serves one or more of the following purposes:
+
+
+* Description of the situation.  Issues should capture details about
+  error messages, steps to reproduce, and how the software product
+  falls short of user expectations.  Attachments may help capture this
+  information in the form of screenshots or logs.
+
+* Routing and prioritization.  Before an issue can be resolved, it
+  needs to be seen by the right team and assigned to an owner who can
+  make the needed changes.  CC’s, components, and labels are often
+  used to make issues show up in the triage queries used by different
+  teams.
+
+* Investigation.  Not every issue can be solved immediately.  Some
+  issues need further investigation to find the root cause of the
+  problem or to weigh different solution approaches.  This information
+  is usually captured in comments, attachments, and links.
+
+* Traceability.  Comments with references to CLs show how much work
+  has been done so far.  After code changes are committed, they must
+  often be verified by a QA team or the issue reporter.  Later, the
+  ability to trace between code commits and issues provides important
+  rationale for the state of the code, which can help prevent future
+  regressions or fix them.
+
+* Advocacy and community.  Users should have a voice in the project.
+  Issue stars help prioritize issues and keep users in the loop as the
+  discussion continues.  Users can post comments to explain the impact
+  that an issue is having on them, to weigh in on solution
+  alternatives, and to thank developers.
+
+
+## Who can view an issue?
+
+Basically, public issues may be viewed by anyone, whereas restricted
+issues can only be viewed by people involved in the issue and project
+members who were granted access that type of issue.
+
+<!-- TODO(jrobbins): Maybe move this to a separate permissons.md
+     reference page. -->
+
+Here are the details:
+
+1. Before a user may access an issue, they must first be able to
+   access the project.  Most projects that we host are public, but
+   some are members-only.
+
+1. The issue participants (including reporter, owner, and any CC’d
+   users) can always view that issue.  Users named in certain custom
+   fields also gain access.  Project owners can view all issues in
+   that project, and site administrators can view any issue in any
+   project.
+
+1. For other project members, an issue that has a label
+   `Restrict-View-X` may only be viewed if the user has been granted
+   permission `X` in that project.  If there are multiple
+   `Restrict-View-*` labels, the user needs all permissions specified
+   in those labels.
+
+1. An issue that is in a public project and that has no restriction
+   labels may be viewed by anyone.
+
+For example, in a public project there could be an issue labeled
+`Restrict-View-SecurityTeam`.  The only users who may view that issue
+would be the reporter, owner, CC’d users, users named in custom
+fields, project owners, site admins, and project members who were
+granted the `SecurityTeam` permission.  It would not be viewable by
+anonymous visitors, non-members who are not participants, or even
+project members who were not granted the `SecurityTeam` permission.
+
+
+## Who can edit an issue?
+
+Basically, only project committers and project owners may edit issues.
+That set of users is narrowed down if the issue has restriction
+labels.
+
+<!-- TODO(jrobbins): Maybe move this to a separate permissons.md
+     reference page. -->
+
+Here are the details:
+
+1. A user cannot edit an issue if they are not permitted to view it.
+
+1. The issue owner can always edit that issue.  Also, users named in
+   certain custom fields may be able to edit the issue.  Project
+   owners can edit any issue in that project, and site administrators
+   can edit any issue in any project.
+
+1. For other project members, editing an issue requires the
+   `EditIssue` permission.  That permission is part of the project
+   committer role, and it can also be granted to a project
+   contributor.
+
+1. If the issue has a restriction label `Restrict-EditIssue-X`, then
+   only project members who were granted permission `X` in that
+   project may edit that issue.  If there are multiple
+   `Restrict-EditIssue-*` labels, the user needs all permissions
+   specified in those labels.
+
+
+## Who owns issue content?
+
+Because the purpose of tracking issues is to help project members
+improve the software that they are developing, all issue content
+belongs to the project.  When a user reports an issue or posts a
+comment, they are contributing that information to the project for the
+benefit of the project.
+
+
+## How to enter an issue
+
+<!-- Note that this is also in quick-start.md. -->
+
+1. Sign in to Monorail.  If this is your first time, you will see a
+   privacy notice dialog box.
+
+1. Click on the `New issue` button at the top of the page.
+
+1. In the /p/chromium project, non-members will be directed to the
+   "new issue wizard".
+
+1. Choose an issue template based on the kind of issue that you want to create.
+
+1. Fill in the issue summary and details.
+
+1. Project members can also set initial values for labels and fields.
+
+1. Optionally, attach files that will help project members understand
+   and resolve the issue.
+
+1. When you report an issue, you star the issue by default.  Starring
+   causes you to get email notifications of comments on that issue.
+
+
+## How to link to an issue or a specific comment in an issue
+
+<!-- Note that this is also in quick-start.md. -->
+
+If you need a URL that you can bookmark or paste into another document:
+
+* You can copy and share the URL of the issue as it is shown in the
+  browser location bar.
+
+* For a cleaner link, click on the link icon located to the right of
+  the issue summary.
+
+If you are writing text in an issue comment, you can make a textual
+reference to another issue by typing word "issue" or "issues".  For
+example:
+
+* issue 1234
+* issues 1234, 2345, and 3456
+* issue monorail:1234
+* Googlers can reference an internal issue by using: b/1234
+
+
+## How to view and download issue attachments
+
+* Attached images and videos show a thumbnail or preview image.  You
+  can click on that to see the full-sized image or play the video.
+
+* Click the `View` link to view the attachment in a new browser tab.
+  Not all types of attachments can be viewed this way.
+
+* For many types of text files, viewing the attachment opens a new
+  page that shows the file with syntax highlighting.
+
+* Click the `Download` link to download the attachment to your
+  computer.  Usually the file name is the same as the one used when
+  the file was uploaded, however in some cases we use a filename that
+  we know is safe.
+
+
+## How to link to a specific line of attached text file
+
+1. Open the attachment by clicking the `View` link.
+
+1. In the text file attachment viewer page, the line numbers are
+   hyperlinks.  Click one to add an anchor to your current browser
+   location, or use a pop-up menu to copy the link address.
+
+
+## How to comment on an issue
+
+<!-- Note that this is also in quick-start.md. -->
+
+1. Sign in to Monorail.  If this is your first time, you will see a
+   privacy notice dialog box.
+
+1. The comment box is located at the bottom of each issue detail page,
+   below existing comments.
+
+1. Please keep comments respectful and constructive with the goal of
+   resolving the issue in mind.  A message with a code of conduct link
+   is shown to new users.
+
+1. If you want to be notified of future updates on this issue, click
+   the star icon.
+
+
+## How to delete a comment or attachment
+
+Users may delete comments that they posted.  Also, project owners and
+site administrators may delete any comment.
+
+1. Open the `...` menu that is near the comment.
+1. Select `Delete comment` to mark the comment as deleted.
+
+
+## How to report spam
+
+Users may report spam issues and comments.  These spam reports are
+used as inputs to our spam detection model.  When a project member
+reports spam, the issue or comment is immediately classified as spam.
+
+1. Sign in to Monorail.
+1. Open the `...` menu near the issue summary or comment.
+1. Select `Flag comment` item or the `Flag issue as spam` item.
+
+
+## How to edit an issue
+
+<!-- Note that this is also in quick-start.md. -->
+
+1. Sign in to Monorail as a project member.  Only project members may
+   edit issues.
+
+1. The editing fields are located with the comment form at the bottom
+   of the page.
+
+1. Please consider posting a comment that briefly explains the reason
+   for the edit.  For example, "Lowering the priority of this defect
+   because there is a clear work-around."
+
+It is also possible for project members to bulk edit multiple issues
+at one time, and to update an issue by replying to some issue update
+notifications.
+
+
+## How to close an issue as a duplicate of another issue
+
+1. Sign in as project committer and view the issue.
+
+1. Set the issue status to `Duplicate`.
+
+1. A `Merged into:` input field will appear, type the other issue ID
+   into that field.
+  * If the other issue is in a different project, use `projectname:issue_id`.
+  * For Googlers, if the issue is in our internal issue tracking tool,
+    use `b/issue_id`.
+
+1. Press `Save changes`.
+
+
+## How to be notified of changes to an issue
+
+Anyone can star an issue by clicking the star icon near the issue ID
+on the issue detail page, issue list page, or hotlist page.  Starring
+an issue will subscribe you to email notifications for changes to that
+issue.  The issue reporter stars the issue by default, but they can
+unstar it if they are no longer interested.
+
+Another way to get notifications is to create a saved query.  Sign in
+and click your email address in the far upper right of the page to
+access your account menu, then choose `Saved queries`.  You can name
+and define an issue query for issues that you are interested in.  When
+any issue that matches that query is updated, you will get an email
+notification.
+
+Email notifications of changes are also sent to the issue owner and
+any CC’d users.  Users named in certain custom fields will also be
+notified.  When the issue owner is changed, the old issue owner gets
+one final notification of that change, even though they are no longer
+an issue participant.
+
+Project owners and component admins can also set up filter rules and
+auto-cc rules to automatically add users to the CC field of an issue.
+Filter rules can also cause notifications to be sent to email
+addresses that do not represent users, for example, mailing lists.
+
+
+## How to associate a CL with an issue
+
+When writing your CL description, add a `BUG=` line or a `Fixes:` line
+to the end of the commit log message.  These lines can reference a
+`/p/chromium` issue by issue ID number, or an issue in any project by
+using the "project_name:issue_id" syntax.
+
+After you upload a CL for review, you can copy the URL of the code
+review and then paste it into an issue comment.
+
+When the CL passes review and is committed, the bugdroid utility will
+automatically post a comment to the issue referenced in the `BUG=` or
+`Fixes` line.
+
+
+## How to move or copy an issue between projects
+
+<!-- I am not mentioning DeleteIssue because I think it should not be
+required.  See monorail:6634 -->
+
+You must have permission to edit issues in the destination project.
+Only non-restricted issues can be moved: if an issue is restricted,
+consider creating a new issue in the target project that blocks the
+original issue.
+
+1. Open the `...` menu near the issue summary and choose `Move issue`
+   or “Copy issue”.
+
+1. Select the name of the target project in the dialog box that opens.
+
+1. Press the `Move issue` or `Copy issue` button.
+
+
+## How to delete an issue
+
+In most cases, you should close the issue with status `Invalid` or
+`WontFix` rather than deleting it.  Spam issues should be marked as
+spam so that they help build our spam model.  Only project owners and
+site administrators can mark issues as deleted.
+
+1. Sign in as a project owner and view the issue.
+1. Open the `...` menu near the issue summary and choose `Delete issue`.
+1. Confirm that you really want to mark the issue as deleted.
diff --git a/features/__init__.py b/features/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/features/__init__.py
@@ -0,0 +1 @@
+
diff --git a/features/activities.py b/features/activities.py
new file mode 100644
index 0000000..35c6a64
--- /dev/null
+++ b/features/activities.py
@@ -0,0 +1,285 @@
+# 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
+
+"""Code to support project and user activies pages."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import sql
+from framework import template_helpers
+from framework import timestr
+from project import project_views
+from proto import tracker_pb2
+from tracker import tracker_helpers
+from tracker import tracker_views
+
+UPDATES_PER_PAGE = 50
+MAX_UPDATES_PER_PAGE = 200
+
+
+class ActivityView(template_helpers.PBProxy):
+  """EZT-friendly wrapper for Activities."""
+
+  _TITLE_TEMPLATE = template_helpers.MonorailTemplate(
+      framework_constants.TEMPLATE_PATH + 'features/activity-title.ezt',
+      compress_whitespace=True, base_format=ezt.FORMAT_HTML)
+
+  _BODY_TEMPLATE = template_helpers.MonorailTemplate(
+      framework_constants.TEMPLATE_PATH + 'features/activity-body.ezt',
+      compress_whitespace=True, base_format=ezt.FORMAT_HTML)
+
+  def __init__(
+      self, pb, mr, prefetched_issues, users_by_id,
+      prefetched_projects, prefetched_configs,
+      autolink=None, all_ref_artifacts=None, ending=None, highlight=None):
+    """Constructs an ActivityView out of an Activity protocol buffer.
+
+    Args:
+      pb: an IssueComment or Activity protocol buffer.
+      mr: HTTP request info, used by the artifact autolink.
+      prefetched_issues: dictionary of the issues for the comments being shown.
+      users_by_id: dict {user_id: UserView} for all relevant users.
+      prefetched_projects: dict {project_id: project} including all the projects
+          that we might need.
+      prefetched_configs: dict {project_id: config} for those projects.
+      autolink: Autolink instance.
+      all_ref_artifacts: list of all artifacts in the activity stream.
+      ending: ending type for activity titles, 'in_project' or 'by_user'
+      highlight: what to highlight in the middle column on user updates pages
+          i.e. 'project', 'user', or None
+    """
+    template_helpers.PBProxy.__init__(self, pb)
+
+    activity_type = 'ProjectIssueUpdate'  # TODO(jrobbins): more types
+
+    self.comment = None
+    self.issue = None
+    self.field_changed = None
+    self.multiple_fields_changed = ezt.boolean(False)
+    self.project = None
+    self.user = None
+    self.timestamp = time.time()  # Bogus value makes bad ones highly visible.
+
+    if isinstance(pb, tracker_pb2.IssueComment):
+      self.timestamp = pb.timestamp
+      issue = prefetched_issues[pb.issue_id]
+      if self.timestamp == issue.opened_timestamp:
+        issue_change_id = None  # This comment is the description.
+      else:
+        issue_change_id = pb.timestamp  # instead of seq num.
+
+      self.comment = tracker_views.IssueCommentView(
+          mr.project_name, pb, users_by_id, autolink,
+          all_ref_artifacts, mr, issue)
+
+      # TODO(jrobbins): pass effective_ids of the commenter so that they
+      # can be identified as a project member or not.
+      config = prefetched_configs[issue.project_id]
+      self.issue = tracker_views.IssueView(issue, users_by_id, config)
+      self.user = self.comment.creator
+      project = prefetched_projects[issue.project_id]
+      self.project_name = project.project_name
+      self.project = project_views.ProjectView(project)
+
+    else:
+      logging.warn('unknown activity object %r', pb)
+
+    nested_page_data = {
+        'activity_type': activity_type,
+        'issue_change_id': issue_change_id,
+        'comment': self.comment,
+        'issue': self.issue,
+        'project': self.project,
+        'user': self.user,
+        'timestamp': self.timestamp,
+        'ending_type': ending,
+        }
+
+    self.escaped_title = self._TITLE_TEMPLATE.GetResponse(
+        nested_page_data).strip()
+    self.escaped_body = self._BODY_TEMPLATE.GetResponse(
+        nested_page_data).strip()
+
+    if autolink is not None and all_ref_artifacts is not None:
+      # TODO(jrobbins): actually parse the comment text.  Actually render runs.
+      runs = autolink.MarkupAutolinks(
+          mr, [template_helpers.TextRun(self.escaped_body)], all_ref_artifacts)
+      self.escaped_body = ''.join(run.content for run in runs)
+
+    self.date_bucket, self.date_relative = timestr.GetHumanScaleDate(
+        self.timestamp)
+    time_tuple = time.localtime(self.timestamp)
+    self.date_tooltip = time.asctime(time_tuple)
+
+    # We always highlight the user for starring activities
+    if activity_type.startswith('UserStar'):
+      self.highlight = 'user'
+    else:
+      self.highlight = highlight
+
+
+def GatherUpdatesData(
+    services, mr, project_ids=None, user_ids=None, ending=None,
+    updates_page_url=None, autolink=None, highlight=None):
+  """Gathers and returns updates data.
+
+  Args:
+    services: Connections to backend services.
+    mr: HTTP request info, used by the artifact autolink.
+    project_ids: List of project IDs we want updates for.
+    user_ids: List of user IDs we want updates for.
+    ending: Ending type for activity titles, 'in_project' or 'by_user'.
+    updates_page_url: The URL that will be used to create pagination links from.
+    autolink: Autolink instance.
+    highlight: What to highlight in the middle column on user updates pages
+        i.e. 'project', 'user', or None.
+  """
+  # num should be non-negative number
+  num = mr.GetPositiveIntParam('num', UPDATES_PER_PAGE)
+  num = min(num, MAX_UPDATES_PER_PAGE)
+
+  updates_data = {
+      'no_stars': None,
+      'no_activities': None,
+      'pagination': None,
+      'updates_data': None,
+      'ending_type': ending,
+      }
+
+  if not user_ids and not project_ids:
+    updates_data['no_stars'] = ezt.boolean(True)
+    return updates_data
+
+  ascending = bool(mr.after)
+  with mr.profiler.Phase('get activities'):
+    comments = services.issue.GetIssueActivity(mr.cnxn, num=num,
+        before=mr.before, after=mr.after, project_ids=project_ids,
+        user_ids=user_ids, ascending=ascending)
+    # Filter the comments based on permission to view the issue.
+    # TODO(jrobbins): push permission checking in the query so that
+    # pagination pages never become underfilled, or use backends to shard.
+    # TODO(jrobbins): come back to this when I implement private comments.
+    # TODO(jrobbins): it would be better if we could just get the dict directly.
+    prefetched_issues_list = services.issue.GetIssues(
+        mr.cnxn, {c.issue_id for c in comments})
+    prefetched_issues = {
+        issue.issue_id: issue for issue in prefetched_issues_list}
+    needed_project_ids = {issue.project_id for issue
+        in prefetched_issues_list}
+    prefetched_projects = services.project.GetProjects(
+        mr.cnxn, needed_project_ids)
+    prefetched_configs = services.config.GetProjectConfigs(
+        mr.cnxn, needed_project_ids)
+    viewable_issues_list = tracker_helpers.FilterOutNonViewableIssues(
+        mr.auth.effective_ids, mr.auth.user_pb, prefetched_projects,
+        prefetched_configs, prefetched_issues_list)
+    viewable_iids = {issue.issue_id for issue in viewable_issues_list}
+    comments = [
+        c for c in comments if c.issue_id in viewable_iids]
+    if ascending:
+      comments.reverse()
+
+  amendment_user_ids = []
+  for comment in comments:
+    for amendment in comment.amendments:
+      amendment_user_ids.extend(amendment.added_user_ids)
+      amendment_user_ids.extend(amendment.removed_user_ids)
+
+  users_by_id = framework_views.MakeAllUserViews(
+      mr.cnxn, services.user, [c.user_id for c in comments],
+      amendment_user_ids)
+  framework_views.RevealAllEmailsToMembers(
+      mr.cnxn, services, mr.auth, users_by_id, mr.project)
+
+  num_results_returned = len(comments)
+  displayed_activities = comments[:UPDATES_PER_PAGE]
+
+  if not num_results_returned:
+    updates_data['no_activities'] = ezt.boolean(True)
+    return updates_data
+
+  # Get all referenced artifacts first
+  all_ref_artifacts = None
+  if autolink is not None:
+    content_list = []
+    for activity in comments:
+      content_list.append(activity.content)
+
+    all_ref_artifacts = autolink.GetAllReferencedArtifacts(
+        mr, content_list)
+
+  # Now process content and gather activities
+  today = []
+  yesterday = []
+  pastweek = []
+  pastmonth = []
+  thisyear = []
+  older = []
+
+  with mr.profiler.Phase('rendering activities'):
+    for activity in displayed_activities:
+      entry = ActivityView(
+          activity, mr, prefetched_issues, users_by_id,
+          prefetched_projects, prefetched_configs,
+          autolink=autolink, all_ref_artifacts=all_ref_artifacts, ending=ending,
+          highlight=highlight)
+
+      if entry.date_bucket == 'Today':
+        today.append(entry)
+      elif entry.date_bucket == 'Yesterday':
+        yesterday.append(entry)
+      elif entry.date_bucket == 'Last 7 days':
+        pastweek.append(entry)
+      elif entry.date_bucket == 'Last 30 days':
+        pastmonth.append(entry)
+      elif entry.date_bucket == 'Earlier this year':
+        thisyear.append(entry)
+      elif entry.date_bucket == 'Before this year':
+        older.append(entry)
+
+  new_after = None
+  new_before = None
+  if displayed_activities:
+    new_after = displayed_activities[0].timestamp
+    new_before = displayed_activities[-1].timestamp
+
+  prev_url = None
+  next_url = None
+  if updates_page_url:
+    list_servlet_rel_url = updates_page_url.split('/')[-1]
+    recognized_params = [(name, mr.GetParam(name))
+                         for name in framework_helpers.RECOGNIZED_PARAMS]
+    if displayed_activities and (mr.before or mr.after):
+      prev_url = framework_helpers.FormatURL(
+          recognized_params, list_servlet_rel_url, after=new_after)
+    if mr.after or len(comments) > UPDATES_PER_PAGE:
+      next_url = framework_helpers.FormatURL(
+          recognized_params, list_servlet_rel_url, before=new_before)
+
+  if prev_url or next_url:
+    pagination = template_helpers.EZTItem(
+        start=None, last=None, prev_url=prev_url, next_url=next_url,
+        reload_url=None, visible=ezt.boolean(True), total_count=None)
+  else:
+    pagination = None
+
+  updates_data.update({
+      'no_activities': ezt.boolean(False),
+      'pagination': pagination,
+      'updates_data': template_helpers.EZTItem(
+          today=today, yesterday=yesterday, pastweek=pastweek,
+          pastmonth=pastmonth, thisyear=thisyear, older=older),
+      })
+
+  return updates_data
diff --git a/features/alert2issue.py b/features/alert2issue.py
new file mode 100644
index 0000000..fbaf5d9
--- /dev/null
+++ b/features/alert2issue.py
@@ -0,0 +1,305 @@
+# Copyright 2019 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
+
+"""Handlers to process alert notification messages."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import itertools
+import logging
+import rfc822
+
+import settings
+from businesslogic import work_env
+from features import commitlogcommands
+from framework import framework_constants
+from framework import monorailcontext
+from framework import emailfmt
+from tracker import tracker_constants
+from tracker import tracker_helpers
+
+AlertEmailHeader = emailfmt.AlertEmailHeader
+
+
+def IsAllowlisted(email_addr):
+  """Returns whether a given email is from one of the allowlisted domains."""
+  return email_addr.endswith(settings.alert_allowlisted_suffixes)
+
+
+def IsCommentSizeReasonable(comment):
+  # type: str -> bool
+  """Returns whether a given comment string is a reasonable size."""
+  return len(comment) <= tracker_constants.MAX_COMMENT_CHARS
+
+
+def FindAlertIssue(services, cnxn, project_id, incident_label):
+  """Find the existing issue with the incident_label."""
+  if not incident_label:
+    return None
+
+  label_id = services.config.LookupLabelID(
+      cnxn, project_id, incident_label)
+  if not label_id:
+    return None
+
+  # If a new notification is sent with an existing incident ID, then it
+  # should be added as a new comment into the existing issue.
+  #
+  # If there are more than one issues with a given incident ID, then
+  # it's either
+  # - there is a bug in this module,
+  # - the issues were manually updated with the same incident ID, OR
+  # - an issue auto update program updated the issues with the same
+  #  incident ID, which also sounds like a bug.
+  #
+  # In any cases, the latest issue should be used, whichever status it has.
+  # - The issue of an ongoing incident can be mistakenly closed by
+  # engineers.
+  # - A closed incident can be reopened, and, therefore, the issue also
+  # needs to be re-opened.
+  issue_ids = services.issue.GetIIDsByLabelIDs(
+      cnxn, [label_id], project_id, None)
+  issues = services.issue.GetIssues(cnxn, issue_ids)
+  if issues:
+    return max(issues, key=lambda issue: issue.modified_timestamp)
+  return None
+
+
+def GetAlertProperties(services, cnxn, project_id, incident_id, trooper_queue,
+                       msg):
+  """Create a dict of issue property values for the alert to be created with.
+
+  Args:
+    cnxn: connection to SQL database.
+    project_id: the ID of the Monorail project, in which the alert should
+      be created in.
+    incident_id: string containing an optional unique incident used to
+      de-dupe alert issues.
+    trooper_queue: the label specifying the trooper queue to add an issue into.
+    msg: the email.Message object containing the alert notification.
+
+  Returns:
+    A dict of issue property values to be used for issue creation.
+  """
+  proj_config = services.config.GetProjectConfig(cnxn, project_id)
+  user_svc = services.user
+  known_labels = set(wkl.label.lower() for wkl in proj_config.well_known_labels)
+
+  props = dict(
+      owner_id=_GetOwnerID(user_svc, cnxn, msg.get(AlertEmailHeader.OWNER)),
+      cc_ids=_GetCCIDs(user_svc, cnxn, msg.get(AlertEmailHeader.CC)),
+      component_ids=_GetComponentIDs(
+          proj_config, msg.get(AlertEmailHeader.COMPONENT)),
+
+      # Props that are added as labels.
+      trooper_queue=(trooper_queue or 'Infra-Troopers-Alerts'),
+      incident_label=_GetIncidentLabel(incident_id),
+      priority=_GetPriority(known_labels, msg.get(AlertEmailHeader.PRIORITY)),
+      oses=_GetOSes(known_labels, msg.get(AlertEmailHeader.OS)),
+      issue_type=_GetIssueType(known_labels, msg.get(AlertEmailHeader.TYPE)),
+
+      field_values=[],
+  )
+
+  # Props that depend on other props.
+  props.update(
+      status=_GetStatus(proj_config, props['owner_id'],
+                        msg.get(AlertEmailHeader.STATUS)),
+      labels=_GetLabels(msg.get(AlertEmailHeader.LABEL),
+                        props['trooper_queue'], props['incident_label'],
+                        props['priority'], props['issue_type'], props['oses']),
+  )
+
+  return props
+
+
+def ProcessEmailNotification(
+    services, cnxn, project, project_addr, from_addr, auth, subject, body,
+    incident_id, msg, trooper_queue=None):
+  # type: (...) -> None
+  """Process an alert notification email to create or update issues.""
+
+  Args:
+    cnxn: connection to SQL database.
+    project: Project PB for the project containing the issue.
+    project_addr: string email address the alert email was sent to.
+    from_addr: string email address of the user who sent the alert email
+        to our server.
+    auth: AuthData object with user_id and email address of the user who
+        will file the alert issue.
+    subject: the subject of the email message
+    body: the body text of the email message
+    incident_id: string containing an optional unique incident used to
+        de-dupe alert issues.
+    msg: the email.Message object that the notification was delivered via.
+    trooper_queue: the label specifying the trooper queue that the alert
+      notification was sent to. If not given, the notification is sent to
+      Infra-Troopers-Alerts.
+
+  Side-effect:
+    Creates an issue or issue comment, if no error was reported.
+  """
+  # Make sure the email address is allowlisted.
+  if not IsAllowlisted(from_addr):
+    logging.info('Unauthorized %s tried to send alert to %s',
+                 from_addr, project_addr)
+    return
+
+  formatted_body = 'Filed by %s on behalf of %s\n\n%s' % (
+      auth.email, from_addr, body)
+  if not IsCommentSizeReasonable(formatted_body):
+    logging.info(
+        '%s tried to send an alert comment that is too long in %s', from_addr,
+        project_addr)
+    return
+
+  mc = monorailcontext.MonorailContext(services, auth=auth, cnxn=cnxn)
+  mc.LookupLoggedInUserPerms(project)
+  with work_env.WorkEnv(mc, services) as we:
+    alert_props = GetAlertProperties(
+        services, cnxn, project.project_id, incident_id, trooper_queue, msg)
+    alert_issue = FindAlertIssue(
+        services, cnxn, project.project_id, alert_props['incident_label'])
+
+    if alert_issue:
+      # Add a reply to the existing issue for this incident.
+      services.issue.CreateIssueComment(
+          cnxn, alert_issue, auth.user_id, formatted_body)
+    else:
+      # Create a new issue for this incident. To preserve previous behavior do
+      # not raise filter rule errors.
+      alert_issue, _ = we.CreateIssue(
+          project.project_id,
+          subject,
+          alert_props['status'],
+          alert_props['owner_id'],
+          alert_props['cc_ids'],
+          alert_props['labels'],
+          alert_props['field_values'],
+          alert_props['component_ids'],
+          formatted_body,
+          raise_filter_errors=False)
+
+    # Update issue using commands.
+    lines = body.strip().split('\n')
+    uia = commitlogcommands.UpdateIssueAction(alert_issue.local_id)
+    commands_found = uia.Parse(
+        cnxn, project.project_name, auth.user_id, lines,
+        services, strip_quoted_lines=True)
+
+    if commands_found:
+      uia.Run(mc, services)
+
+
+def _GetComponentIDs(proj_config, components):
+  comps = ['Infra']
+  if components:
+    components = components.strip()
+  if components:
+    comps = [c.strip() for c in components.split(',')]
+  return tracker_helpers.LookupComponentIDs(comps, proj_config)
+
+
+def _GetIncidentLabel(incident_id):
+  return 'Incident-Id-%s'.strip().lower() % incident_id if incident_id else ''
+
+
+def _GetLabels(custom_labels, trooper_queue, incident_label, priority,
+               issue_type, oses):
+  labels = set(['Restrict-View-Google'.lower()])
+  labels.update(
+      # Whitespaces in a label can cause UI rendering each of the words as
+      # a separate label.
+      ''.join(label.split()).lower() for label in itertools.chain(
+          custom_labels.split(',') if custom_labels else [],
+          [trooper_queue, incident_label, priority, issue_type],
+          oses)
+      if label
+  )
+  return list(labels)
+
+
+def _GetOwnerID(user_svc, cnxn, owner_email):
+  if owner_email:
+    owner_email = owner_email.strip()
+  if not owner_email:
+    return framework_constants.NO_USER_SPECIFIED
+  emails = [addr for _, addr in rfc822.AddressList(owner_email)]
+  return user_svc.LookupExistingUserIDs(
+      cnxn, emails).get(owner_email) or framework_constants.NO_USER_SPECIFIED
+
+
+def _GetCCIDs(user_svc, cnxn, cc_emails):
+  if cc_emails:
+    cc_emails = cc_emails.strip()
+  if not cc_emails:
+    return []
+  emails = [addr for _, addr in rfc822.AddressList(cc_emails)]
+  return [userID for _, userID
+          in user_svc.LookupExistingUserIDs(cnxn, emails).iteritems()
+          if userID is not None]
+
+
+def _GetPriority(known_labels, priority):
+  priority_label = ('Pri-%s' % priority).strip().lower()
+  if priority:
+    if priority_label in known_labels:
+      return priority_label
+    logging.info('invalid priority %s for alerts; default to pri-2', priority)
+
+  # XXX: what if 'Pri-2' doesn't exist in known_labels?
+  return 'pri-2'
+
+
+def _GetStatus(proj_config, owner_id, status):
+  # XXX: what if assigned and available are not in known_statuses?
+  if status:
+    status = status.strip().lower()
+  if owner_id:
+    # If there is an owner, the status must be 'Assigned'.
+    if status and status != 'assigned':
+      logging.info(
+          'invalid status %s for an alert with an owner; default to assigned',
+          status)
+    return 'assigned'
+
+  if status:
+    if tracker_helpers.MeansOpenInProject(status, proj_config):
+      return status
+    logging.info('invalid status %s for an alert; default to available', status)
+
+  return 'available'
+
+
+def _GetOSes(known_labels, oses):
+  if oses:
+    oses = oses.strip().lower()
+  if not oses:
+    return []
+
+  os_labels_to_lookup = {
+      ('os-%s' % os).strip() for os in oses.split(',') if os
+  }
+  os_labels_to_return = os_labels_to_lookup & known_labels
+  invalid_os_labels = os_labels_to_lookup - os_labels_to_return
+  if invalid_os_labels:
+    logging.info('invalid OSes %s', ','.join(invalid_os_labels))
+
+  return list(os_labels_to_return)
+
+
+def _GetIssueType(known_labels, issue_type):
+  if issue_type:
+    issue_type = issue_type.strip().lower()
+  if issue_type is None:
+    return None
+
+  issue_type_label = 'type-%s' % issue_type
+  if issue_type_label in known_labels:
+    return issue_type_label
+
+  logging.info('invalid type %s for an alert; default to None', issue_type)
+  return None
diff --git a/features/autolink.py b/features/autolink.py
new file mode 100644
index 0000000..2787b9c
--- /dev/null
+++ b/features/autolink.py
@@ -0,0 +1,624 @@
+# 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
+
+"""Autolink helps auto-link references to artifacts in text.
+
+This class maintains a registry of artifact autolink syntax specs and
+callbacks. The structure of that registry is:
+  { component_name: (lookup_callback, match_to_reference_function,
+                     { regex: substitution_callback, ...}),
+    ...
+  }
+
+For example:
+  { 'tracker':
+     (GetReferencedIssues,
+      ExtractProjectAndIssueIds,
+      {_ISSUE_REF_RE: ReplaceIssueRef}),
+    'versioncontrol':
+     (GetReferencedRevisions,
+      ExtractProjectAndRevNum,
+      {_GIT_HASH_RE: ReplaceRevisionRef}),
+  }
+
+The dictionary of regexes is used here because, in the future, we
+might add more regexes for each component rather than have one complex
+regex per component.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import re
+import urllib
+import urlparse
+
+import settings
+from features import autolink_constants
+from framework import template_helpers
+from framework import validate
+from proto import project_pb2
+from tracker import tracker_helpers
+
+
+# If the total length of all comments is too large, we don't autolink.
+_MAX_TOTAL_LENGTH = 150 * 1024  # 150KB
+# Special all_referenced_artifacts value used to indicate that the
+# text content is too big to lookup all referenced artifacts quickly.
+SKIP_LOOKUPS = 'skip lookups'
+
+_CLOSING_TAG_RE = re.compile('</[a-z0-9]+>$', re.IGNORECASE)
+
+# These are allowed in links, but if any of closing delimiters appear
+# at the end of the link, and the opening one is not part of the link,
+# then trim off the closing delimiters.
+_LINK_TRAILING_CHARS = [
+    (None, ':'),
+    (None, '.'),
+    (None, ','),
+    ('(', ')'),
+    ('[', ']'),
+    ('{', '}'),
+    ('<', '>'),
+    ("'", "'"),
+    ('"', '"'),
+    ]
+
+
+def LinkifyEmail(_mr, autolink_regex_match, component_ref_artifacts):
+  """Examine a textual reference and replace it with a hyperlink or not.
+
+  This is a callback for use with the autolink feature.  The function
+  parameters are standard for this type of callback.
+
+  Args:
+    _mr: unused information parsed from the HTTP request.
+    autolink_regex_match: regex match for the textual reference.
+    component_ref_artifacts: result of call to GetReferencedUsers.
+
+  Returns:
+    A list of TextRuns with tag=a linking to the user profile page of
+    any defined users, otherwise a mailto: link is generated.
+  """
+  email = autolink_regex_match.group(0)
+
+  if not validate.IsValidEmail(email):
+    return [template_helpers.TextRun(email)]
+
+  if component_ref_artifacts and email in component_ref_artifacts:
+    href = '/u/%s' % email
+  else:
+    href = 'mailto:' + email
+
+  result = [template_helpers.TextRun(email, tag='a', href=href)]
+  return result
+
+
+def CurryGetReferencedUsers(services):
+  """Return a function to get ref'd users with these services objects bound.
+
+  Currying is a convienent way to give the callback access to the services
+  objects, but without requiring that all possible services objects be passed
+  through the autolink registry and functions.
+
+  Args:
+    services: connection to the user persistence layer.
+
+  Returns:
+    A ready-to-use function that accepts the arguments that autolink
+    expects to pass to it.
+  """
+
+  def GetReferencedUsers(mr, emails):
+    """Return a dict of users referenced by these comments.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      ref_tuples: email address strings for each user
+          that is mentioned in the comment text.
+
+    Returns:
+      A dictionary {email: user_pb} including all existing users.
+    """
+    user_id_dict = services.user.LookupExistingUserIDs(mr.cnxn, emails)
+    users_by_id = services.user.GetUsersByIDs(mr.cnxn,
+        list(user_id_dict.values()))
+    users_by_email = {
+      email: users_by_id[user_id]
+      for email, user_id in user_id_dict.items()}
+    return users_by_email
+
+  return GetReferencedUsers
+
+
+def Linkify(_mr, autolink_regex_match, _component_ref_artifacts):
+  """Examine a textual reference and replace it with a hyperlink or not.
+
+  This is a callback for use with the autolink feature.  The function
+  parameters are standard for this type of callback.
+
+  Args:
+    _mr: unused information parsed from the HTTP request.
+    autolink_regex_match: regex match for the textual reference.
+    _component_ref_artifacts: unused result of call to GetReferencedIssues.
+
+  Returns:
+    A list of TextRuns with tag=a for all matched ftp, http, https and mailto
+    links converted into HTML hyperlinks.
+  """
+  hyperlink = autolink_regex_match.group(0)
+
+  trailing = ''
+  for begin, end in _LINK_TRAILING_CHARS:
+    if hyperlink.endswith(end):
+      if not begin or hyperlink[:-len(end)].find(begin) == -1:
+        trailing = end + trailing
+        hyperlink = hyperlink[:-len(end)]
+
+  tag_match = _CLOSING_TAG_RE.search(hyperlink)
+  if tag_match:
+    trailing = hyperlink[tag_match.start(0):] + trailing
+    hyperlink = hyperlink[:tag_match.start(0)]
+
+  href = hyperlink
+  if not href.lower().startswith(('http', 'ftp', 'mailto')):
+    # We use http because redirects for https are not all set up.
+    href = 'http://' + href
+
+  if (not validate.IsValidURL(href) and
+      not (href.startswith('mailto') and validate.IsValidEmail(href[7:]))):
+    return [template_helpers.TextRun(autolink_regex_match.group(0))]
+
+  result = [template_helpers.TextRun(hyperlink, tag='a', href=href)]
+  if trailing:
+    result.append(template_helpers.TextRun(trailing))
+
+  return result
+
+
+# Regular expression to detect git hashes.
+# Used to auto-link to Git hashes on crrev.com when displaying issue details.
+# Matches "rN", "r#N", and "revision N" when "rN" is not part of a larger word
+# and N is a hexadecimal string of 40 chars.
+_GIT_HASH_RE = re.compile(
+    r'\b(?P<prefix>r(evision\s+#?)?)?(?P<revnum>([a-f0-9]{40}))\b',
+    re.IGNORECASE | re.MULTILINE)
+
+# This is for SVN revisions and Git commit posisitons.
+_SVN_REF_RE = re.compile(
+    r'\b(?P<prefix>r(evision\s+#?)?)(?P<revnum>([0-9]{4,7}))\b',
+    re.IGNORECASE | re.MULTILINE)
+
+
+def GetReferencedRevisions(_mr, _refs):
+  """Load the referenced revision objects."""
+  # For now we just autolink any revision hash without actually
+  # checking that such a revision exists,
+  # TODO(jrobbins): Hit crrev.com and check that the revision exists
+  # and show a rollover with revision info.
+  return None
+
+
+def ExtractRevNums(_mr, autolink_regex_match):
+  """Return internal representation of a rev reference."""
+  ref = autolink_regex_match.group('revnum')
+  logging.debug('revision ref = %s', ref)
+  return [ref]
+
+
+def ReplaceRevisionRef(
+    mr, autolink_regex_match, _component_ref_artifacts):
+  """Return HTML markup for an autolink reference."""
+  prefix = autolink_regex_match.group('prefix')
+  revnum = autolink_regex_match.group('revnum')
+  url = _GetRevisionURLFormat(mr.project).format(revnum=revnum)
+  content = revnum
+  if prefix:
+    content = '%s%s' % (prefix, revnum)
+  return [template_helpers.TextRun(content, tag='a', href=url)]
+
+
+def _GetRevisionURLFormat(project):
+  # TODO(jrobbins): Expose a UI to customize it to point to whatever site
+  # hosts the source code. Also, site-wide default.
+  return (project.revision_url_format or settings.revision_url_format)
+
+
+# Regular expression to detect issue references.
+# Used to auto-link to other issues when displaying issue details.
+# Matches "issue " when "issue" is not part of a larger word, or
+# "issue #", or just a "#" when it is preceeded by a space.
+_ISSUE_REF_RE = re.compile(r"""
+    (?P<prefix>\b(issues?|bugs?)[ \t]*(:|=)?)
+    ([ \t]*(?P<project_name>\b[-a-z0-9]+[:\#])?
+     (?P<number_sign>\#?)
+     (?P<local_id>\d+)\b
+     (,?[ \t]*(and|or)?)?)+""", re.IGNORECASE | re.VERBOSE)
+
+# This is for chromium.org's crbug.com shorthand domain.
+_CRBUG_REF_RE = re.compile(r"""
+    (?P<prefix>\b(https?://)?crbug.com/)
+    ((?P<project_name>\b[-a-z0-9]+)(?P<separator>/))?
+    (?P<local_id>\d+)\b
+    (?P<anchor>\#c[0-9]+)?""", re.IGNORECASE | re.VERBOSE)
+
+# Once the overall issue reference has been detected, pick out the specific
+# issue project:id items within it.  Often there is just one, but the "and|or"
+# syntax can allow multiple issues.
+_SINGLE_ISSUE_REF_RE = re.compile(r"""
+    (?P<prefix>\b(issue|bug)[ \t]*)?
+    (?P<project_name>\b[-a-z0-9]+[:\#])?
+    (?P<number_sign>\#?)
+    (?P<local_id>\d+)\b""", re.IGNORECASE | re.VERBOSE)
+
+
+def CurryGetReferencedIssues(services):
+  """Return a function to get ref'd issues with these services objects bound.
+
+  Currying is a convienent way to give the callback access to the services
+  objects, but without requiring that all possible services objects be passed
+  through the autolink registry and functions.
+
+  Args:
+    services: connection to issue, config, and project persistence layers.
+
+  Returns:
+    A ready-to-use function that accepts the arguments that autolink
+    expects to pass to it.
+  """
+
+  def GetReferencedIssues(mr, ref_tuples):
+    """Return lists of open and closed issues referenced by these comments.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      ref_tuples: list of (project_name, local_id) tuples for each issue
+          that is mentioned in the comment text. The project_name may be None,
+          in which case the issue is assumed to be in the current project.
+
+    Returns:
+      A list of open and closed issue dicts.
+    """
+    ref_projects = services.project.GetProjectsByName(
+        mr.cnxn,
+        [(ref_pn or mr.project_name) for ref_pn, _ in ref_tuples])
+    issue_ids, _misses = services.issue.ResolveIssueRefs(
+        mr.cnxn, ref_projects, mr.project_name, ref_tuples)
+    open_issues, closed_issues = (
+        tracker_helpers.GetAllowedOpenedAndClosedIssues(
+            mr, issue_ids, services))
+
+    open_dict = {}
+    for issue in open_issues:
+      open_dict[_IssueProjectKey(issue.project_name, issue.local_id)] = issue
+
+    closed_dict = {}
+    for issue in closed_issues:
+      closed_dict[_IssueProjectKey(issue.project_name, issue.local_id)] = issue
+
+    logging.info('autolinking dicts %r and %r', open_dict, closed_dict)
+
+    return open_dict, closed_dict
+
+  return GetReferencedIssues
+
+
+def _ParseProjectNameMatch(project_name):
+  """Process the passed project name and determine the best representation.
+
+  Args:
+    project_name: a string with the project name matched in a regex
+
+  Returns:
+    A minimal representation of the project name, None if no valid content.
+  """
+  if not project_name:
+    return None
+  return project_name.lstrip().rstrip('#: \t\n')
+
+
+def _ExtractProjectAndIssueIds(
+    autolink_regex_match, subregex, default_project_name=None):
+  """Convert a regex match for a textual reference into our internal form."""
+  whole_str = autolink_regex_match.group(0)
+  refs = []
+  for submatch in subregex.finditer(whole_str):
+    project_name = (
+        _ParseProjectNameMatch(submatch.group('project_name')) or
+        default_project_name)
+    ref = (project_name, int(submatch.group('local_id')))
+    refs.append(ref)
+    logging.info('issue ref = %s', ref)
+
+  return refs
+
+
+def ExtractProjectAndIssueIdsNormal(_mr, autolink_regex_match):
+  """Convert a regex match for a textual reference into our internal form."""
+  return _ExtractProjectAndIssueIds(
+      autolink_regex_match, _SINGLE_ISSUE_REF_RE)
+
+
+def ExtractProjectAndIssueIdsCrBug(_mr, autolink_regex_match):
+  """Convert a regex match for a textual reference into our internal form."""
+  return _ExtractProjectAndIssueIds(
+      autolink_regex_match, _CRBUG_REF_RE, default_project_name='chromium')
+
+
+# This uses project name to avoid a lookup on project ID in a function
+# that has no services object.
+def _IssueProjectKey(project_name, local_id):
+  """Make a dictionary key to identify a referenced issue."""
+  return '%s:%d' % (project_name, local_id)
+
+
+class IssueRefRun(object):
+  """A text run that links to a referenced issue."""
+
+  def __init__(self, issue, is_closed, project_name, content, anchor):
+    self.tag = 'a'
+    self.css_class = 'closed_ref' if is_closed else None
+    self.title = issue.summary
+    self.href = '/p/%s/issues/detail?id=%d%s' % (
+        project_name, issue.local_id, anchor)
+
+    self.content = content
+    if is_closed:
+      self.content = ' %s ' % self.content
+
+
+def _ReplaceIssueRef(
+    autolink_regex_match, component_ref_artifacts, single_issue_regex,
+    default_project_name):
+  """Examine a textual reference and replace it with an autolink or not.
+
+  Args:
+    autolink_regex_match: regex match for the textual reference.
+    component_ref_artifacts: result of earlier call to GetReferencedIssues.
+    single_issue_regex: regular expression to parse individual issue references
+        out of a multi-issue-reference phrase.  E.g., "issues 12 and 34".
+    default_project_name: project name to use when not specified.
+
+  Returns:
+    A list of IssueRefRuns and TextRuns to replace the textual
+    reference.  If there is an issue to autolink to, we return an HTML
+    hyperlink.  Otherwise, we the run will have the original plain
+    text.
+  """
+  open_dict, closed_dict = {}, {}
+  if component_ref_artifacts:
+    open_dict, closed_dict = component_ref_artifacts
+  original = autolink_regex_match.group(0)
+  logging.info('called ReplaceIssueRef on %r', original)
+  result_runs = []
+  pos = 0
+  for submatch in single_issue_regex.finditer(original):
+    if submatch.start() >= pos:
+      if original[pos: submatch.start()]:
+        result_runs.append(template_helpers.TextRun(
+            original[pos: submatch.start()]))
+      replacement_run = _ReplaceSingleIssueRef(
+          submatch, open_dict, closed_dict, default_project_name)
+      result_runs.append(replacement_run)
+      pos = submatch.end()
+
+  if original[pos:]:
+    result_runs.append(template_helpers.TextRun(original[pos:]))
+
+  return result_runs
+
+
+def ReplaceIssueRefNormal(mr, autolink_regex_match, component_ref_artifacts):
+  """Replaces occurances of 'issue 123' with link TextRuns as needed."""
+  return _ReplaceIssueRef(
+      autolink_regex_match, component_ref_artifacts,
+      _SINGLE_ISSUE_REF_RE, mr.project_name)
+
+
+def ReplaceIssueRefCrBug(_mr, autolink_regex_match, component_ref_artifacts):
+  """Replaces occurances of 'crbug.com/123' with link TextRuns as needed."""
+  return _ReplaceIssueRef(
+      autolink_regex_match, component_ref_artifacts,
+      _CRBUG_REF_RE, 'chromium')
+
+
+def _ReplaceSingleIssueRef(
+    submatch, open_dict, closed_dict, default_project_name):
+  """Replace one issue reference with a link, or the original text."""
+  content = submatch.group(0)
+  project_name = submatch.group('project_name')
+  anchor = submatch.groupdict().get('anchor') or ''
+  if project_name:
+    project_name = project_name.lstrip().rstrip(':#')
+  else:
+    # We need project_name for the URL, even if it is not in the text.
+    project_name = default_project_name
+
+  local_id = int(submatch.group('local_id'))
+  issue_key = _IssueProjectKey(project_name, local_id)
+  if issue_key in open_dict:
+    return IssueRefRun(
+        open_dict[issue_key], False, project_name, content, anchor)
+  elif issue_key in closed_dict:
+    return IssueRefRun(
+        closed_dict[issue_key], True, project_name, content, anchor)
+  else:  # Don't link to non-existent issues.
+    return template_helpers.TextRun(content)
+
+
+class Autolink(object):
+  """Maintains a registry of autolink syntax and can apply it to comments."""
+
+  def __init__(self):
+    self.registry = {}
+
+  def RegisterComponent(self, component_name, artifact_lookup_function,
+                        match_to_reference_function, autolink_re_subst_dict):
+    """Register all the autolink info for a software component.
+
+    Args:
+      component_name: string name of software component, must be unique.
+      artifact_lookup_function: function to batch lookup all artifacts that
+          might have been referenced in a set of comments:
+          function(all_matches) -> referenced_artifacts
+          the referenced_artifacts will be pased to each subst function.
+      match_to_reference_function: convert a regex match object to
+          some internal representation of the artifact reference.
+      autolink_re_subst_dict: dictionary of regular expressions and
+          the substitution function that should be called for each match:
+          function(match, referenced_artifacts) -> replacement_markup
+    """
+    self.registry[component_name] = (artifact_lookup_function,
+                                     match_to_reference_function,
+                                     autolink_re_subst_dict)
+
+  def GetAllReferencedArtifacts(
+      self, mr, comment_text_list, max_total_length=_MAX_TOTAL_LENGTH):
+    """Call callbacks to lookup all artifacts possibly referenced.
+
+    Args:
+      mr: information parsed out of the user HTTP request.
+      comment_text_list: list of comment content strings.
+      max_total_length: int max number of characters to accept:
+          if more than this, then skip autolinking entirely.
+
+    Returns:
+      Opaque object that can be pased to MarkupAutolinks.  It's
+      structure happens to be {component_name: artifact_list, ...},
+      or the special value SKIP_LOOKUPS.
+    """
+    total_len = sum(len(comment_text) for comment_text in comment_text_list)
+    if total_len > max_total_length:
+      return SKIP_LOOKUPS
+
+    all_referenced_artifacts = {}
+    for comp, (lookup, match_to_refs, re_dict) in self.registry.items():
+      refs = set()
+      for comment_text in comment_text_list:
+        for regex in re_dict:
+          for match in regex.finditer(comment_text):
+            additional_refs = match_to_refs(mr, match)
+            if additional_refs:
+              refs.update(additional_refs)
+
+      all_referenced_artifacts[comp] = lookup(mr, refs)
+
+    return all_referenced_artifacts
+
+  def MarkupAutolinks(self, mr, text_runs, all_referenced_artifacts):
+    """Loop over components and regexes, applying all substitutions.
+
+    Args:
+      mr: info parsed from the user's HTTP request.
+      text_runs: List of text runs for the user's comment.
+      all_referenced_artifacts: result of previous call to
+        GetAllReferencedArtifacts.
+
+    Returns:
+      List of text runs for the entire user comment, some of which may have
+      attribures that cause them to render as links in render-rich-text.ezt.
+    """
+    items = list(self.registry.items())
+    items.sort()  # Process components in determinate alphabetical order.
+    for component, (_lookup, _match_ref, re_subst_dict) in items:
+      if all_referenced_artifacts == SKIP_LOOKUPS:
+        component_ref_artifacts = None
+      else:
+        component_ref_artifacts = all_referenced_artifacts[component]
+      for regex, subst_fun in re_subst_dict.items():
+        text_runs = self._ApplySubstFunctionToRuns(
+            text_runs, regex, subst_fun, mr, component_ref_artifacts)
+
+    return text_runs
+
+  def _ApplySubstFunctionToRuns(
+      self, text_runs, regex, subst_fun, mr, component_ref_artifacts):
+    """Apply autolink regex and substitution function to each text run.
+
+    Args:
+      text_runs: list of TextRun objects with parts of the original comment.
+      regex: Regular expression for detecting textual references to artifacts.
+      subst_fun: function to return autolink markup, or original text.
+      mr: common info parsed from the user HTTP request.
+      component_ref_artifacts: already-looked-up destination artifacts to use
+        when computing substitution text.
+
+    Returns:
+      A new list with more and smaller runs, some of which may have tag
+      and link attributes set.
+    """
+    result_runs = []
+    for run in text_runs:
+      content = run.content
+      if run.tag:
+        # This chunk has already been substituted, don't allow nested
+        # autolinking to mess up our output.
+        result_runs.append(run)
+      else:
+        pos = 0
+        for match in regex.finditer(content):
+          if match.start() > pos:
+            result_runs.append(template_helpers.TextRun(
+                content[pos: match.start()]))
+          replacement_runs = subst_fun(mr, match, component_ref_artifacts)
+          result_runs.extend(replacement_runs)
+          pos = match.end()
+
+        if run.content[pos:]:  # Keep any text that came after the last match
+          result_runs.append(template_helpers.TextRun(run.content[pos:]))
+
+    # TODO(jrobbins): ideally we would merge consecutive plain text runs
+    # so that regexes can match across those run boundaries.
+
+    return result_runs
+
+
+def RegisterAutolink(services):
+  """Register all the autolink hooks."""
+  # The order of the RegisterComponent() calls does not matter so that we could
+  # do this registration from separate modules in the future if needed.
+  # Priority order of application is determined by the names of the registered
+  # handers, which are sorted in MarkupAutolinks().
+
+  services.autolink.RegisterComponent(
+      '01-tracker-crbug',
+      CurryGetReferencedIssues(services),
+      ExtractProjectAndIssueIdsCrBug,
+      {_CRBUG_REF_RE: ReplaceIssueRefCrBug})
+
+  services.autolink.RegisterComponent(
+      '02-linkify-full-urls',
+      lambda request, mr: None,
+      lambda mr, match: None,
+      {autolink_constants.IS_A_LINK_RE: Linkify})
+
+  services.autolink.RegisterComponent(
+      '03-linkify-user-profiles-or-mailto',
+      CurryGetReferencedUsers(services),
+      lambda _mr, match: [match.group(0)],
+      {autolink_constants.IS_IMPLIED_EMAIL_RE: LinkifyEmail})
+
+  services.autolink.RegisterComponent(
+      '04-tracker-regular',
+      CurryGetReferencedIssues(services),
+      ExtractProjectAndIssueIdsNormal,
+      {_ISSUE_REF_RE: ReplaceIssueRefNormal})
+
+  services.autolink.RegisterComponent(
+      '05-linkify-shorthand',
+      lambda request, mr: None,
+      lambda mr, match: None,
+      {autolink_constants.IS_A_SHORT_LINK_RE: Linkify,
+       autolink_constants.IS_A_NUMERIC_SHORT_LINK_RE: Linkify,
+       autolink_constants.IS_IMPLIED_LINK_RE: Linkify,
+       })
+
+  services.autolink.RegisterComponent(
+      '06-versioncontrol',
+      GetReferencedRevisions,
+      ExtractRevNums,
+      {_GIT_HASH_RE: ReplaceRevisionRef,
+       _SVN_REF_RE: ReplaceRevisionRef})
diff --git a/features/autolink_constants.py b/features/autolink_constants.py
new file mode 100644
index 0000000..ddb9bb3
--- /dev/null
+++ b/features/autolink_constants.py
@@ -0,0 +1,58 @@
+# Copyright 2017 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
+
+"""Some constants of regexes used in Monorail to validate urls and emails."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import re
+import settings
+
+# We linkify http, https, ftp, and mailto schemes only.
+LINKIFY_SCHEMES = r'https?://|ftp://|mailto:'
+
+# This regex matches shorthand URLs that we know are valid.
+# Example: go/monorail
+# The scheme is optional, and if it is missing we add it to the link.
+IS_A_SHORT_LINK_RE = re.compile(
+    r'(?<![-/._])\b(%s)?'     # Scheme is optional for short links.
+    r'(%s)'        # The list of know shorthand links from settings.py
+    r'/([^\s<]+)'  # Allow anything, checked with validation code.
+    % (LINKIFY_SCHEMES, '|'.join(settings.autolink_shorthand_hosts)),
+    re.UNICODE)
+IS_A_NUMERIC_SHORT_LINK_RE = re.compile(
+    r'(?<![-/._])\b(%s)?'     # Scheme is optional for short links.
+    r'(%s)'        # The list of know shorthand links from settings.py
+    r'/([0-9]+)'  # Allow digits only for these domains.
+    % (LINKIFY_SCHEMES, '|'.join(settings.autolink_numeric_shorthand_hosts)),
+    re.UNICODE)
+
+# This regex matches fully-formed URLs, starting with a scheme.
+# Example: http://chromium.org or mailto:user@example.com
+# We link to the specified URL without adding anything.
+# Also count a start-tag '<' as a url delimeter, since the autolinker
+# is sometimes run against html fragments.
+IS_A_LINK_RE = re.compile(
+    r'\b(%s)'    # Scheme must be a whole word.
+    r'([^\s<]+)' # Allow anything, checked with validation code.
+    % LINKIFY_SCHEMES, re.UNICODE)
+
+# This regex matches text that looks like a URL despite lacking a scheme.
+# Example: crrev.com
+# Since the scheme is not specified, we prepend "http://".
+IS_IMPLIED_LINK_RE = re.compile(
+    r'(?<![-/._])\b[a-z]((-|\.)?[a-z0-9])+\.(com|net|org|edu)\b'  # Domain.
+    r'(/[^\s<]*)?',  # Allow anything, check with validation code.
+    re.UNICODE)
+
+# This regex matches text that looks like an email address.
+# Example: user@example.com
+# These get linked to the user profile page if it exists, otherwise
+# they become a mailto:.
+IS_IMPLIED_EMAIL_RE = re.compile(
+    r'\b[a-z]((-|\.)?[a-z0-9])+@'  # Username@
+    r'[a-z]((-|\.)?[a-z0-9])+\.(com|net|org|edu)\b',  # Domain
+    re.UNICODE)
diff --git a/features/banspammer.py b/features/banspammer.py
new file mode 100644
index 0000000..4b66251
--- /dev/null
+++ b/features/banspammer.py
@@ -0,0 +1,97 @@
+# 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
+
+"""Classes for banning spammer users"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import json
+import time
+
+from framework import cloud_tasks_helpers
+from framework import framework_helpers
+from framework import permissions
+from framework import jsonfeed
+from framework import servlet
+from framework import urls
+
+class BanSpammer(servlet.Servlet):
+  """Ban a user and mark their content as spam"""
+
+  def AssertBasePermission(self, mr):
+    """Check whether the user has any permission to ban users.
+
+    Args:
+      mr: commonly used info parsed from the request.
+    """
+    super(BanSpammer, self).AssertBasePermission(mr)
+    if not permissions.CanBan(mr, self.services):
+      raise permissions.PermissionException(
+          'User is not allowed to ban users.')
+
+  def ProcessFormData(self, mr, post_data):
+    self.AssertBasePermission(mr)
+    viewed_user_id = mr.viewed_user_auth.user_pb.user_id
+    reporter_id = mr.auth.user_id
+
+    # First ban or un-ban the user as a spammer.
+    framework_helpers.UserSettings.ProcessBanForm(
+        mr.cnxn, self.services.user, post_data, mr.viewed_user_auth.user_id,
+        mr.viewed_user_auth.user_pb)
+
+    params = {
+        'spammer_id': viewed_user_id,
+        'reporter_id': reporter_id,
+        'is_spammer': 'banned' in post_data
+    }
+    task = cloud_tasks_helpers.generate_simple_task(
+        urls.BAN_SPAMMER_TASK + '.do', params)
+    cloud_tasks_helpers.create_task(task)
+
+    return framework_helpers.FormatAbsoluteURL(
+        mr, mr.viewed_user_auth.user_view.profile_url, include_project=False,
+        saved=1, ts=int(time.time()))
+
+
+class BanSpammerTask(jsonfeed.InternalTask):
+  """This task will update all of the comments and issues created by the
+     target user with is_spam=True, and also add a manual verdict attached
+     to the user who originated the ban request. This is a potentially long
+     running operation, so it is implemented as an async task.
+  """
+
+  def HandleRequest(self, mr):
+    spammer_id = mr.GetPositiveIntParam('spammer_id')
+    reporter_id = mr.GetPositiveIntParam('reporter_id')
+    is_spammer = mr.GetBoolParam('is_spammer')
+
+    # Get all of the issues reported by the spammer.
+    issue_ids = self.services.issue.GetIssueIDsReportedByUser(mr.cnxn,
+        spammer_id)
+
+    issues = []
+
+    if len(issue_ids) > 0:
+      issues = self.services.issue.GetIssues(
+          mr.cnxn, issue_ids, use_cache=False)
+
+      # Mark them as spam/ham in bulk.
+      self.services.spam.RecordManualIssueVerdicts(mr.cnxn, self.services.issue,
+          issues, reporter_id, is_spammer)
+
+    # Get all of the comments
+    comments = self.services.issue.GetCommentsByUser(mr.cnxn, spammer_id)
+
+    for comment in comments:
+      self.services.spam.RecordManualCommentVerdict(mr.cnxn,
+            self.services.issue, self.services.user, comment.id,
+            reporter_id, is_spammer)
+
+    self.response.body = json.dumps({
+      'comments': len(comments),
+      'issues': len(issues),
+    })
diff --git a/features/commands.py b/features/commands.py
new file mode 100644
index 0000000..3ba376e
--- /dev/null
+++ b/features/commands.py
@@ -0,0 +1,306 @@
+# 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
+
+"""Classes and functions that implement command-line-like issue updates."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import re
+
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from tracker import tracker_constants
+
+
+def ParseQuickEditCommand(
+    cnxn, cmd, issue, config, logged_in_user_id, services):
+  """Parse a quick edit command into assignments and labels."""
+  parts = _BreakCommandIntoParts(cmd)
+  parser = AssignmentParser(None, easier_kv_labels=True)
+
+  for key, value in parts:
+    if key:  # A key=value assignment.
+      valid_assignment = parser.ParseAssignment(
+          cnxn, key, value, config, services, logged_in_user_id)
+      if not valid_assignment:
+        logging.info('ignoring assignment: %r, %r', key, value)
+
+    elif value.startswith('-'):  # Removing a label.
+      parser.labels_remove.append(_StandardizeLabel(value[1:], config))
+
+    else:  # Adding a label.
+      value = value.strip('+')
+      parser.labels_add.append(_StandardizeLabel(value, config))
+
+  new_summary = parser.summary or issue.summary
+
+  if parser.status is None:
+    new_status = issue.status
+  else:
+    new_status = parser.status
+
+  if parser.owner_id is None:
+    new_owner_id = issue.owner_id
+  else:
+    new_owner_id = parser.owner_id
+
+  new_cc_ids = [cc for cc in list(issue.cc_ids) + list(parser.cc_add)
+                if cc not in parser.cc_remove]
+  (new_labels, _update_add,
+   _update_remove) = framework_bizobj.MergeLabels(
+       issue.labels, parser.labels_add, parser.labels_remove, config)
+
+  return new_summary, new_status, new_owner_id, new_cc_ids, new_labels
+
+
+ASSIGN_COMMAND_RE = re.compile(
+    r'(?P<key>\w+(?:-|\w)*)(?:=|:)'
+    r'(?:(?P<value1>(?:-|\+|\.|%|@|=|,|\w)+)|'
+    r'"(?P<value2>[^"]+)"|'
+    r"'(?P<value3>[^']+)')",
+    re.UNICODE | re.IGNORECASE)
+
+LABEL_COMMAND_RE = re.compile(
+    r'(?P<label>(?:\+|-)?\w(?:-|\w)*)',
+    re.UNICODE | re.IGNORECASE)
+
+
+def _BreakCommandIntoParts(cmd):
+  """Break a quick edit command into assignment and label parts.
+
+  Args:
+    cmd: string command entered by the user.
+
+  Returns:
+    A list of (key, value) pairs where key is the name of the field
+    being assigned or None for OneWord labels, and value is the value
+    to assign to it, or the whole label.  Value may begin with a "+"
+    which is just ignored, or a "-" meaning that the label should be
+    removed, or neither.
+  """
+  parts = []
+  cmd = cmd.strip()
+  m = True
+
+  while m:
+    m = ASSIGN_COMMAND_RE.match(cmd)
+    if m:
+      key = m.group('key')
+      value = m.group('value1') or m.group('value2') or m.group('value3')
+      parts.append((key, value))
+      cmd = cmd[len(m.group(0)):].strip()
+    else:
+      m = LABEL_COMMAND_RE.match(cmd)
+      if m:
+        parts.append((None, m.group('label')))
+        cmd = cmd[len(m.group(0)):].strip()
+
+  return parts
+
+
+def _ParsePlusMinusList(value):
+  """Parse a string containing a series of plus/minuse values.
+
+  Strings are seprated by whitespace, comma and/or semi-colon.
+
+  Example:
+    value = "one +two -three"
+    plus = ['one', 'two']
+    minus = ['three']
+
+  Args:
+    value: string containing unparsed plus minus values.
+
+  Returns:
+    A tuple of (plus, minus) string values.
+  """
+  plus = []
+  minus = []
+  # Treat ';' and ',' as separators (in addition to SPACE)
+  for ch in [',', ';']:
+    value = value.replace(ch, ' ')
+  terms = [i.strip() for i in value.split()]
+  for item in terms:
+    if item.startswith('-'):
+      minus.append(item.lstrip('-'))
+    else:
+      plus.append(item.lstrip('+'))  # optional leading '+'
+
+  return plus, minus
+
+
+class AssignmentParser(object):
+  """Class to parse assignment statements in quick edits or email replies."""
+
+  def __init__(self, template, easier_kv_labels=False):
+    self.cc_list = []
+    self.cc_add = []
+    self.cc_remove = []
+    self.owner_id = None
+    self.status = None
+    self.summary = None
+    self.labels_list = []
+    self.labels_add = []
+    self.labels_remove = []
+    self.branch = None
+
+    # Accept "Anything=Anything" for quick-edit, but not in commit-log-commands
+    # because it would be too error-prone when mixed with plain text comment
+    # text and without autocomplete to help users triggering it via typos.
+    self.easier_kv_labels = easier_kv_labels
+
+    if template:
+      if template.owner_id:
+        self.owner_id = template.owner_id
+      if template.summary:
+        self.summary = template.summary
+      if template.labels:
+        self.labels_list = template.labels
+      # Do not have a similar check as above for status because it could be an
+      # empty string.
+      self.status = template.status
+
+  def ParseAssignment(self, cnxn, key, value, config, services, user_id):
+    """Parse command-style text entered by the user to update an issue.
+
+    E.g., The user may want to set the issue status to "reviewed", or
+    set the owner to "me".
+
+    Args:
+      cnxn: connection to SQL database.
+      key: string name of the field to set.
+      value: string value to be interpreted.
+      config: Projects' issue tracker configuration PB.
+      services: connections to backends.
+      user_id: int user ID of the user making the change.
+
+    Returns:
+      True if the line could be parsed as an assigment, False otherwise.
+      Also, as a side-effect, the assigned values are built up in the instance
+      variables of the parser.
+    """
+    valid_line = True
+
+    if key == 'owner':
+      if framework_constants.NO_VALUE_RE.match(value):
+        self.owner_id = framework_constants.NO_USER_SPECIFIED
+      else:
+        try:
+          self.owner_id = _LookupMeOrUsername(cnxn, value, services, user_id)
+        except exceptions.NoSuchUserException:
+          logging.warning('bad owner: %r when committing to project_id %r',
+                          value, config.project_id)
+          valid_line = False
+
+    elif key == 'cc':
+      try:
+        add, remove = _ParsePlusMinusList(value)
+        self.cc_add = [_LookupMeOrUsername(cnxn, cc, services, user_id)
+                       for cc in add if cc]
+        self.cc_remove = [_LookupMeOrUsername(cnxn, cc, services, user_id)
+                          for cc in remove if cc]
+        for user_id in self.cc_add:
+          if user_id not in self.cc_list:
+            self.cc_list.append(user_id)
+        self.cc_list = [user_id for user_id in self.cc_list
+                        if user_id not in self.cc_remove]
+      except exceptions.NoSuchUserException:
+        logging.warning('bad cc: %r when committing to project_id %r',
+                        value, config.project_id)
+        valid_line = False
+
+    elif key == 'summary':
+      self.summary = value
+
+    elif key == 'status':
+      if framework_constants.NO_VALUE_RE.match(value):
+        self.status = ''
+      else:
+        self.status = _StandardizeStatus(value, config)
+
+    elif key == 'label' or key == 'labels':
+      self.labels_add, self.labels_remove = _ParsePlusMinusList(value)
+      self.labels_add = [_StandardizeLabel(lab, config)
+                         for lab in self.labels_add]
+      self.labels_remove = [_StandardizeLabel(lab, config)
+                            for lab in self.labels_remove]
+      (self.labels_list, _update_add,
+       _update_remove) = framework_bizobj.MergeLabels(
+           self.labels_list, self.labels_add, self.labels_remove, config)
+
+    elif (self.easier_kv_labels and
+          key not in tracker_constants.RESERVED_PREFIXES and
+          key and value):
+      if key.startswith('-'):
+        self.labels_remove.append(_StandardizeLabel(
+            '%s-%s' % (key[1:], value), config))
+      else:
+        self.labels_add.append(_StandardizeLabel(
+            '%s-%s' % (key, value), config))
+
+    else:
+      valid_line = False
+
+    return valid_line
+
+
+def _StandardizeStatus(status, config):
+  """Attempt to match a user-supplied status with standard status values.
+
+  Args:
+    status: User-supplied status string.
+    config: Project's issue tracker configuration PB.
+
+  Returns:
+    A canonicalized status string, that matches a standard project
+    value, if found.
+  """
+  well_known_statuses = [wks.status for wks in config.well_known_statuses]
+  return _StandardizeArtifact(status, well_known_statuses)
+
+
+def _StandardizeLabel(label, config):
+  """Attempt to match a user-supplied label with standard label values.
+
+  Args:
+    label: User-supplied label string.
+    config: Project's issue tracker configuration PB.
+
+  Returns:
+    A canonicalized label string, that matches a standard project
+    value, if found.
+  """
+  well_known_labels = [wkl.label for wkl in config.well_known_labels]
+  return _StandardizeArtifact(label, well_known_labels)
+
+
+def _StandardizeArtifact(artifact, well_known_artifacts):
+  """Attempt to match a user-supplied artifact with standard artifact values.
+
+  Args:
+    artifact: User-supplied artifact string.
+    well_known_artifacts: List of well known values of the artifact.
+
+  Returns:
+    A canonicalized artifact string, that matches a standard project
+    value, if found.
+  """
+  artifact = framework_bizobj.CanonicalizeLabel(artifact)
+  for wka in well_known_artifacts:
+    if artifact.lower() == wka.lower():
+      return wka
+  # No match - use user-supplied artifact.
+  return artifact
+
+
+def _LookupMeOrUsername(cnxn, username, services, user_id):
+  """Handle the 'me' syntax or lookup a user's user ID."""
+  if username.lower() == 'me':
+    return user_id
+
+  return services.user.LookupUserID(cnxn, username)
diff --git a/features/commitlogcommands.py b/features/commitlogcommands.py
new file mode 100644
index 0000000..f570ae3
--- /dev/null
+++ b/features/commitlogcommands.py
@@ -0,0 +1,162 @@
+# 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
+
+"""Implements processing of issue update command lines.
+
+This currently processes the leading command-lines that appear
+at the top of inbound email messages to update existing issues.
+
+It could also be expanded to allow new issues to be created. Or, to
+handle commands in commit-log messages if the version control system
+invokes a webhook.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import re
+
+from businesslogic import work_env
+from features import commands
+from features import send_notifications
+from framework import emailfmt
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_helpers
+from framework import permissions
+from proto import tracker_pb2
+
+
+# Actions have separate 'Parse' and 'Run' implementations to allow better
+# testing coverage.
+class IssueAction(object):
+  """Base class for all issue commands."""
+
+  def __init__(self):
+    self.parser = commands.AssignmentParser(None)
+    self.description = ''
+    self.inbound_message = None
+    self.commenter_id = None
+    self.project = None
+    self.config = None
+    self.hostport = framework_helpers.GetHostPort()
+
+  def Parse(
+      self, cnxn, project_name, commenter_id, lines, services,
+      strip_quoted_lines=False, hostport=None):
+    """Populate object from raw user input.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_name: Name of the project containing the issue.
+      commenter_id: int user ID of user creating comment.
+      lines: list of strings containing test to be parsed.
+      services: References to existing objects from Monorail's service layer.
+      strip_quoted_lines: boolean for whether to remove quoted lines from text.
+      hostport: Optionally override the current instance's hostport variable.
+
+    Returns:
+      A boolean for whether any command lines were found while parsing.
+
+    Side-effect:
+      Edits the values of instance variables in this class with parsing output.
+    """
+    self.project = services.project.GetProjectByName(cnxn, project_name)
+    self.config = services.config.GetProjectConfig(
+        cnxn, self.project.project_id)
+    self.commenter_id = commenter_id
+
+    has_commands = False
+
+    # Process all valid key-value lines. Once we find a non key-value line,
+    # treat the rest as the 'description'.
+    for idx, line in enumerate(lines):
+      valid_line = False
+      m = re.match(r'^\s*(\w+)\s*\:\s*(.*?)\s*$', line)
+      if m:
+        has_commands = True
+        # Process Key-Value
+        key = m.group(1).lower()
+        value = m.group(2)
+        valid_line = self.parser.ParseAssignment(
+            cnxn, key, value, self.config, services, self.commenter_id)
+
+      if not valid_line:
+        # Not Key-Value. Treat this line and remaining as 'description'.
+        # First strip off any trailing blank lines.
+        while lines and not lines[-1].strip():
+          lines.pop()
+        if lines:
+          self.description = '\n'.join(lines[idx:])
+          break
+
+    if strip_quoted_lines:
+      self.inbound_message = '\n'.join(lines)
+      self.description = emailfmt.StripQuotedText(self.description)
+
+    if hostport:
+      self.hostport = hostport
+
+    for key in ['owner_id', 'cc_add', 'cc_remove', 'summary',
+                'status', 'labels_add', 'labels_remove', 'branch']:
+      logging.info('\t%s: %s', key, self.parser.__dict__[key])
+
+    for key in ['commenter_id', 'description', 'hostport']:
+      logging.info('\t%s: %s', key, self.__dict__[key])
+
+    return has_commands
+
+  def Run(self, mc, services):
+    """Execute this action."""
+    raise NotImplementedError()
+
+
+class UpdateIssueAction(IssueAction):
+  """Implements processing email replies or the "update issue" command."""
+
+  def __init__(self, local_id):
+    super(UpdateIssueAction, self).__init__()
+    self.local_id = local_id
+
+  def Run(self, mc, services):
+    """Updates an issue based on the parsed commands."""
+    try:
+      issue = services.issue.GetIssueByLocalID(
+          mc.cnxn, self.project.project_id, self.local_id, use_cache=False)
+    except exceptions.NoSuchIssueException:
+      return  # Issue does not exist, so do nothing
+
+    delta = tracker_pb2.IssueDelta()
+
+    allow_edit = permissions.CanEditIssue(
+        mc.auth.effective_ids, mc.perms, self.project, issue)
+
+    if allow_edit:
+      delta.summary = self.parser.summary or issue.summary
+      if self.parser.status is None:
+        delta.status = issue.status
+      else:
+        delta.status = self.parser.status
+
+      if self.parser.owner_id is None:
+        delta.owner_id = issue.owner_id
+      else:
+        delta.owner_id = self.parser.owner_id
+
+      delta.cc_ids_add = list(self.parser.cc_add)
+      delta.cc_ids_remove = list(self.parser.cc_remove)
+      delta.labels_add = self.parser.labels_add
+      delta.labels_remove = self.parser.labels_remove
+      # TODO(jrobbins): allow editing of custom fields
+
+    with work_env.WorkEnv(mc, services) as we:
+      we.UpdateIssue(
+          issue, delta, self.description, inbound_message=self.inbound_message)
+
+    logging.info('Updated issue %s:%s',
+                 self.project.project_name, issue.local_id)
+
+    # Note: notifications are generated in work_env.
diff --git a/features/component_helpers.py b/features/component_helpers.py
new file mode 100644
index 0000000..1392f0b
--- /dev/null
+++ b/features/component_helpers.py
@@ -0,0 +1,127 @@
+# Copyright 2018 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import json
+import logging
+import re
+
+import settings
+import cloudstorage
+
+from features import generate_dataset
+from framework import framework_helpers
+from services import ml_helpers
+from tracker import tracker_bizobj
+
+from googleapiclient import discovery
+from oauth2client.client import GoogleCredentials
+
+
+MODEL_NAME = 'projects/{}/models/{}'.format(
+    settings.classifier_project_id, settings.component_model_name)
+
+
+def _GetTopWords(trainer_name):  # pragma: no cover
+  # TODO(carapew): Use memcache to get top words rather than storing as a
+  # variable.
+  credentials = GoogleCredentials.get_application_default()
+  storage = discovery.build('storage', 'v1', credentials=credentials)
+  request = storage.objects().get_media(
+      bucket=settings.component_ml_bucket,
+      object=trainer_name + '/topwords.txt')
+  response = request.execute()
+
+  # This turns the top words list into a dictionary for faster feature
+  # generation.
+  return {word: idx for idx, word in enumerate(response.split())}
+
+
+def _GetComponentsByIndex(trainer_name):
+  # TODO(carapew): Memcache the index mapping file.
+  mapping_path = '/%s/%s/component_index.json' % (
+      settings.component_ml_bucket, trainer_name)
+  logging.info('Mapping path full name: %r', mapping_path)
+
+  with cloudstorage.open(mapping_path, 'r') as index_mapping_file:
+    logging.info('Index component mapping opened')
+    mapping = index_mapping_file.read()
+    logging.info(mapping)
+    return json.loads(mapping)
+
+
+@framework_helpers.retry(3)
+def _GetComponentPrediction(ml_engine, instance):
+  """Predict the component from the default model based on the provided text.
+
+  Args:
+    ml_engine: An ML Engine instance for making predictions.
+    instance: The dict object returned from ml_helpers.GenerateFeaturesRaw
+      containing the features generated from the provided text.
+
+  Returns:
+    The index of the component with the highest score. ML engine's predict
+    api returns a dict of the format
+    {'predictions': [{'classes': ['0', '1', ...], 'scores': [.00234, ...]}]}
+    where each class has a score at the same index. Classes are sequential,
+    so the index of the highest score also happens to be the component's
+    index.
+  """
+  body = {'instances': [{'inputs': instance['word_features']}]}
+  request = ml_engine.projects().predict(name=MODEL_NAME, body=body)
+  response = request.execute()
+
+  logging.info('ML Engine API response: %r' % response)
+  scores = response['predictions'][0]['scores']
+
+  return scores.index(max(scores))
+
+
+def PredictComponent(raw_text, config):
+  """Get the component ID predicted for the given text.
+
+  Args:
+    raw_text: The raw text for which we want to predict a component.
+    config: The config of the project. Used to decide if the predicted component
+        is valid.
+
+  Returns:
+    The component ID predicted for the provided component, or None if no
+    component was predicted.
+  """
+  # Set-up ML engine.
+  ml_engine = ml_helpers.setup_ml_engine()
+
+  # Gets the timestamp number from the folder containing the model's trainer
+  # in order to get the correct files for mappings and features.
+  request = ml_engine.projects().models().get(name=MODEL_NAME)
+  response = request.execute()
+
+  version = re.search(r'v_(\d+)', response['defaultVersion']['name']).group(1)
+  trainer_name = 'component_trainer_%s' % version
+
+  top_words = _GetTopWords(trainer_name)
+  components_by_index = _GetComponentsByIndex(trainer_name)
+  logging.info('Length of top words list: %s', len(top_words))
+
+  clean_text = generate_dataset.CleanText(raw_text)
+  instance = ml_helpers.GenerateFeaturesRaw(
+      [clean_text], settings.component_features, top_words)
+
+  # Get the component id with the highest prediction score. Component ids are
+  # stored in GCS as strings, but represented in the app as longs.
+  best_score_index = _GetComponentPrediction(ml_engine, instance)
+  component_id = components_by_index.get(str(best_score_index))
+  if component_id:
+    component_id = int(component_id)
+
+  # The predicted component id might not exist.
+  if tracker_bizobj.FindComponentDefByID(component_id, config) is None:
+    return None
+
+  return component_id
diff --git a/features/componentexport.py b/features/componentexport.py
new file mode 100644
index 0000000..cadb6a8
--- /dev/null
+++ b/features/componentexport.py
@@ -0,0 +1,59 @@
+# Copyright 2018 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
+""" Tasks and handlers for maintaining the spam classifier model. These
+    should be run via cron and task queue rather than manually.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import cloudstorage
+import datetime
+import logging
+import webapp2
+
+from google.appengine.api import app_identity
+
+from features.generate_dataset import build_component_dataset
+from framework import cloud_tasks_helpers
+from framework import servlet
+from framework import urls
+
+
+class ComponentTrainingDataExport(webapp2.RequestHandler):
+  """Trigger a training data export task"""
+  def get(self):
+    logging.info('Training data export requested.')
+    task = {
+        'app_engine_http_request':
+            {
+                'http_method': 'GET',
+                'relative_uri': urls.COMPONENT_DATA_EXPORT_TASK,
+            }
+    }
+    cloud_tasks_helpers.create_task(task, queue='componentexport')
+
+
+class ComponentTrainingDataExportTask(servlet.Servlet):
+  """Export training data for issues and their assigned components, to be used
+     to train  a model later.
+  """
+  def get(self):
+    logging.info('Training data export initiated.')
+    bucket_name = app_identity.get_default_gcs_bucket_name()
+    logging.info('Bucket name: %s', bucket_name)
+    date_str = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
+
+    logging.info('Opening cloud storage')
+    gcs_file = cloudstorage.open('/' + bucket_name
+                                 + '/component_training_data/'
+                                 + date_str + '.csv',
+        content_type='text/csv', mode='w')
+
+    logging.info('GCS file opened')
+
+    gcs_file = build_component_dataset(self.services.issue, gcs_file)
+
+    gcs_file.close()
diff --git a/features/dateaction.py b/features/dateaction.py
new file mode 100644
index 0000000..a525db1
--- /dev/null
+++ b/features/dateaction.py
@@ -0,0 +1,227 @@
+# 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
+
+"""Cron and task handlers for email notifications of issue date value arrival.
+
+If an issue has a date-type custom field, and that custom field is configured
+to perform an action when that date arrives, then this cron handler and the
+associated tasks carry out those actions on that issue.
+"""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+import settings
+
+from features import notify_helpers
+from features import notify_reasons
+from framework import cloud_tasks_helpers
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import jsonfeed
+from framework import permissions
+from framework import timestr
+from framework import urls
+from proto import tracker_pb2
+from tracker import tracker_bizobj
+from tracker import tracker_helpers
+from tracker import tracker_views
+
+
+TEMPLATE_PATH = framework_constants.TEMPLATE_PATH
+
+class DateActionCron(jsonfeed.InternalTask):
+  """Find and process issues with date-type values that arrived today."""
+
+  def HandleRequest(self, mr):
+    """Find issues with date-type-fields that arrived and spawn tasks."""
+    highest_iid_so_far = 0
+    capped = True
+    timestamp_min, timestamp_max = _GetTimestampRange(int(time.time()))
+    left_joins = [
+        ('Issue2FieldValue ON Issue.id = Issue2FieldValue.issue_id', []),
+        ('FieldDef ON Issue2FieldValue.field_id = FieldDef.id', []),
+        ]
+    where = [
+        ('FieldDef.field_type = %s', ['date_type']),
+        ('FieldDef.date_action IN (%s,%s)',
+         ['ping_owner_only', 'ping_participants']),
+        ('Issue2FieldValue.date_value >= %s', [timestamp_min]),
+        ('Issue2FieldValue.date_value < %s', [timestamp_max]),
+        ]
+    order_by = [
+        ('Issue.id', []),
+        ]
+    while capped:
+      chunk_issue_ids, capped = self.services.issue.RunIssueQuery(
+          mr.cnxn, left_joins,
+          where + [('Issue.id > %s', [highest_iid_so_far])], order_by)
+      if chunk_issue_ids:
+        logging.info('chunk_issue_ids = %r', chunk_issue_ids)
+        highest_iid_so_far = max(highest_iid_so_far, max(chunk_issue_ids))
+        for issue_id in chunk_issue_ids:
+          self.EnqueueDateAction(issue_id)
+
+  def EnqueueDateAction(self, issue_id):
+    """Create a task to notify users that an issue's date has arrived.
+
+    Args:
+      issue_id: int ID of the issue that was changed.
+
+    Returns nothing.
+    """
+    params = {'issue_id': issue_id}
+    task = cloud_tasks_helpers.generate_simple_task(
+        urls.ISSUE_DATE_ACTION_TASK + '.do', params)
+    cloud_tasks_helpers.create_task(task)
+
+
+def _GetTimestampRange(now):
+  """Return a (min, max) timestamp range for today."""
+  timestamp_min = (now // framework_constants.SECS_PER_DAY *
+                   framework_constants.SECS_PER_DAY)
+  timestamp_max = timestamp_min + framework_constants.SECS_PER_DAY
+  return timestamp_min, timestamp_max
+
+
+class IssueDateActionTask(notify_helpers.NotifyTaskBase):
+  """JSON servlet that notifies appropriate users after an issue change."""
+
+  _EMAIL_TEMPLATE = 'features/auto-ping-email.ezt'
+  _LINK_ONLY_EMAIL_TEMPLATE = (
+      'tracker/issue-change-notification-email-link-only.ezt')
+
+  def HandleRequest(self, mr):
+    """Process the task to process an issue date action.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+
+    Returns:
+      Results dictionary in JSON format which is useful just for debugging.
+      The main goal is the side-effect of sending emails.
+    """
+    issue_id = mr.GetPositiveIntParam('issue_id')
+    issue = self.services.issue.GetIssue(mr.cnxn, issue_id, use_cache=False)
+    project = self.services.project.GetProject(mr.cnxn, issue.project_id)
+    hostport = framework_helpers.GetHostPort(project_name=project.project_name)
+    config = self.services.config.GetProjectConfig(mr.cnxn, issue.project_id)
+    pings = self._CalculateIssuePings(issue, config)
+    if not pings:
+      logging.warning('Issue %r has no dates to ping afterall?', issue_id)
+      return
+    comment = self._CreatePingComment(mr.cnxn, issue, pings, hostport)
+    starrer_ids = self.services.issue_star.LookupItemStarrers(
+        mr.cnxn, issue.issue_id)
+
+    users_by_id = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user,
+        tracker_bizobj.UsersInvolvedInIssues([issue]),
+        tracker_bizobj.UsersInvolvedInComment(comment),
+        starrer_ids)
+    logging.info('users_by_id is %r', users_by_id)
+    tasks = self._MakeEmailTasks(
+      mr.cnxn, issue, project, config, comment, starrer_ids,
+      hostport, users_by_id, pings)
+
+    notified = notify_helpers.AddAllEmailTasks(tasks)
+    return {
+        'notified': notified,
+        }
+
+  def _CreatePingComment(self, cnxn, issue, pings, hostport):
+    """Create an issue comment saying that some dates have arrived."""
+    content = '\n'.join(self._FormatPingLine(ping) for ping in pings)
+    author_email_addr = '%s@%s' % (settings.date_action_ping_author, hostport)
+    date_action_user_id = self.services.user.LookupUserID(
+        cnxn, author_email_addr, autocreate=True)
+    comment = self.services.issue.CreateIssueComment(
+        cnxn, issue, date_action_user_id, content)
+    return comment
+
+  def _MakeEmailTasks(
+      self, cnxn, issue, project, config, comment, starrer_ids,
+      hostport, users_by_id, pings):
+    """Return a list of dicts for tasks to notify people."""
+    detail_url = framework_helpers.IssueCommentURL(
+        hostport, project, issue.local_id, seq_num=comment.sequence)
+    fields = sorted((field_def for (field_def, _date_value) in pings),
+                    key=lambda fd: fd.field_name)
+    email_data = {
+        'issue': tracker_views.IssueView(issue, users_by_id, config),
+        'summary': issue.summary,
+        'ping_comment_content': comment.content,
+        'detail_url': detail_url,
+        'fields': fields,
+        }
+
+    # Generate three versions of email body with progressively more info.
+    body_link_only = self.link_only_email_template.GetResponse(
+      {'detail_url': detail_url, 'was_created': ezt.boolean(False)})
+    body_for_non_members = self.email_template.GetResponse(email_data)
+    framework_views.RevealAllEmails(users_by_id)
+    body_for_members = self.email_template.GetResponse(email_data)
+    logging.info('body for non-members is:\n%r' % body_for_non_members)
+    logging.info('body for members is:\n%r' % body_for_members)
+
+    contributor_could_view = permissions.CanViewIssue(
+        set(), permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET,
+        project, issue)
+
+    group_reason_list = notify_reasons.ComputeGroupReasonList(
+        cnxn, self.services, project, issue, config, users_by_id,
+        [], contributor_could_view, starrer_ids=starrer_ids,
+        commenter_in_project=True, include_subscribers=False,
+        include_notify_all=False,
+        starrer_pref_check_function=lambda u: u.notify_starred_ping)
+
+    commenter_view = users_by_id[comment.user_id]
+    email_tasks = notify_helpers.MakeBulletedEmailWorkItems(
+        group_reason_list, issue, body_link_only, body_for_non_members,
+        body_for_members, project, hostport, commenter_view, detail_url,
+        seq_num=comment.sequence, subject_prefix='Follow up on issue ',
+        compact_subject_prefix='Follow up ')
+
+    return email_tasks
+
+  def _CalculateIssuePings(self, issue, config):
+    """Return a list of (field, timestamp) pairs for dates that should ping."""
+    timestamp_min, timestamp_max = _GetTimestampRange(int(time.time()))
+    arrived_dates_by_field_id = {
+        fv.field_id: fv.date_value
+        for fv in issue.field_values
+        if timestamp_min <= fv.date_value < timestamp_max}
+    logging.info('arrived_dates_by_field_id = %r', arrived_dates_by_field_id)
+    # TODO(jrobbins): Lookup field defs regardless of project_id to better
+    # handle foreign fields in issues that have been moved between projects.
+    pings = [
+      (field, arrived_dates_by_field_id[field.field_id])
+      for field in config.field_defs
+      if (field.field_id in arrived_dates_by_field_id and
+          field.date_action in (tracker_pb2.DateAction.PING_OWNER_ONLY,
+                                tracker_pb2.DateAction.PING_PARTICIPANTS))]
+
+    # TODO(jrobbins): For now, assume all pings apply only to open issues.
+    # Later, allow each date action to specify whether it applies to open
+    # issues or all issues.
+    means_open = tracker_helpers.MeansOpenInProject(
+        tracker_bizobj.GetStatus(issue), config)
+    pings = [ping for ping in pings if means_open]
+
+    pings = sorted(pings, key=lambda ping: ping[0].field_name)
+    return pings
+
+  def _FormatPingLine(self, ping):
+    """Return a one-line string describing the date that arrived."""
+    field, timestamp = ping
+    date_str = timestr.TimestampToDateWidgetStr(timestamp)
+    return 'The %s date has arrived: %s' % (field.field_name, date_str)
diff --git a/features/features_bizobj.py b/features/features_bizobj.py
new file mode 100644
index 0000000..804e6a4
--- /dev/null
+++ b/features/features_bizobj.py
@@ -0,0 +1,109 @@
+# 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
+
+"""Business objects for the Monorail features.
+
+These are classes and functions that operate on the objects that users care
+about in features (eg. hotlists).
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from framework import framework_bizobj
+from framework import urls
+from proto import features_pb2
+
+
+def GetOwnerIds(hotlist):
+  """Returns the list of ids for the given hotlist's owners."""
+  return hotlist.owner_ids
+
+
+def UsersInvolvedInHotlists(hotlists):
+  """Returns a set of all users who have roles in the given hotlists."""
+  result = set()
+  for hotlist in hotlists:
+    result.update(hotlist.owner_ids)
+    result.update(hotlist.editor_ids)
+    result.update(hotlist.follower_ids)
+  return result
+
+
+def UserOwnsHotlist(hotlist, effective_ids):
+  """Returns T/F if the user is the owner/not the owner of the hotlist."""
+  return not effective_ids.isdisjoint(hotlist.owner_ids or set())
+
+
+def IssueIsInHotlist(hotlist, issue_id):
+  """Returns T/F if the issue is in the hotlist."""
+  return any(issue_id == hotlist_issue.issue_id
+             for hotlist_issue in hotlist.items)
+
+
+def UserIsInHotlist(hotlist, effective_ids):
+  """Returns T/F if the user is involved/not involved in the hotlist."""
+  return (UserOwnsHotlist(hotlist, effective_ids) or
+          not effective_ids.isdisjoint(hotlist.editor_ids or set()) or
+          not effective_ids.isdisjoint(hotlist.follower_ids or set()))
+
+
+def SplitHotlistIssueRanks(target_iid, split_above, iid_rank_pairs):
+  """Splits hotlist issue relation rankings by some target issue's rank.
+
+  Hotlists issues are sorted Low to High. When split_above is true,
+  the split should occur before the target object and the objects
+  should be moved above the target, with lower ranks than the target.
+
+  Args:
+    target_iid: the global ID of the issue to split rankings about.
+    split_above: False to split below the target issue, True to split above.
+    iid_rank_pairs: a list tuples [(issue_id, rank_in_hotlist),...} for all
+    issues in a hotlist excluding the one being moved.
+
+  Returns:
+    A tuple (lower, higher) where both are lists of [(issue_iid, rank), ...]
+    of issues in rank order. If split_above is False the target issue is
+    included in higher, otherwise it is included in lower.
+  """
+  iid_rank_pairs.reverse()
+  offset = int(not split_above)
+  for i, (issue_id, _) in enumerate(iid_rank_pairs):
+    if issue_id == target_iid:
+      return iid_rank_pairs[:i + offset], iid_rank_pairs[i + offset:]
+  logging.error(
+      'Target issue %r was not found in the list of issue_id rank pairs',
+                target_iid)
+  return iid_rank_pairs, []
+
+
+def DetermineHotlistIssuePosition(issue, issue_ids):
+  """Find position of an issue in a hotlist for a flipper.
+
+  Args:
+    issue: The issue PB currently being viewed
+    issue_ids: list of issue_id's
+
+  Returns:
+    A 3-tuple (prev_iid, index, next_iid) where prev_iid is the
+    IID of the previous issue in the total ordering (or None),
+    index is the index that the current issue has in the sorted
+    list of issues in the hotlist,
+    next_iid is the next issue (or None).
+  """
+
+  prev_iid, next_iid = None, None
+  total_issues = len(issue_ids)
+  for i, issue_id in enumerate(issue_ids):
+    if issue_id == issue.issue_id:
+      index = i
+      if i < total_issues - 1:
+        next_iid = issue_ids[i + 1]
+      if i > 0:
+        prev_iid = issue_ids[i - 1]
+      return prev_iid, index, next_iid
+  return None, None, None
diff --git a/features/features_constants.py b/features/features_constants.py
new file mode 100644
index 0000000..b21a7f5
--- /dev/null
+++ b/features/features_constants.py
@@ -0,0 +1,44 @@
+# 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
+
+"""Some constants used in Monorail hotlist pages."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from tracker import tracker_constants
+from project import project_constants
+
+DEFAULT_COL_SPEC = 'Rank Project Status Type ID Stars Owner Summary Modified'
+DEFAULT_RESULTS_PER_PAGE = 100
+OTHER_BUILT_IN_COLS = (
+    tracker_constants.OTHER_BUILT_IN_COLS + ['Adder', 'Added', 'Note'])
+# pylint: disable=line-too-long
+ISSUE_INPUT_REGEX = '%s:\d+(([,]|\s)+%s:\d+)*' % (
+    project_constants.PROJECT_NAME_PATTERN,
+    project_constants.PROJECT_NAME_PATTERN)
+FIELD_DEF_NAME_PATTERN = '[a-zA-Z]([_-]?[a-zA-Z0-9])*'
+
+QUEUE_NOTIFICATIONS = 'notifications'
+QUEUE_OUTBOUND_EMAIL = 'outboundemail'
+QUEUE_PUBSUB = 'pubsub-issueupdates'
+QUEUE_RECOMPUTE_DERIVED_FIELDS = 'recomputederivedfields'
+
+KNOWN_CUES = (
+    'privacy_click_through',
+    'code_of_conduct',
+    'how_to_join_project',
+    'search_for_numbers',
+    'dit_keystrokes',
+    'italics_mean_derived',
+    'availability_msgs',
+    'stale_fulltext',
+    'document_team_duties',
+    'showing_ids_instead_of_tiles',
+    'issue_timestamps',
+    'you_are_on_vacation',
+    'your_email_bounced',
+    'explain_hotlist_starring',
+)
diff --git a/features/federated.py b/features/federated.py
new file mode 100644
index 0000000..2e4486a
--- /dev/null
+++ b/features/federated.py
@@ -0,0 +1,78 @@
+# Copyright 2019 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
+
+"""Logic for storing and representing issues from external trackers."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import re
+
+from framework.exceptions import InvalidExternalIssueReference
+
+
+class FederatedIssue(object):
+  """Abstract base class for holding one federated issue.
+
+  Each distinct external tracker should subclass this.
+  """
+  shortlink_re = None
+
+  def __init__(self, shortlink):
+    if not self.IsShortlinkValid(shortlink):
+      raise InvalidExternalIssueReference(
+          'Shortlink does not match any valid tracker: %s' % shortlink)
+
+    self.shortlink = shortlink
+
+  @classmethod
+  def IsShortlinkValid(cls, shortlink):
+    """Returns whether given shortlink is correctly formatted."""
+    if not cls.shortlink_re:
+      raise NotImplementedError()
+    return re.match(cls.shortlink_re, shortlink)
+
+
+class GoogleIssueTrackerIssue(FederatedIssue):
+  """Holds one Google Issue Tracker issue.
+
+  URL: https://issuetracker.google.com/
+  """
+  shortlink_re = r'^b\/\d+$'
+  url_format = 'https://issuetracker.google.com/issues/{issue_id}'
+
+  def __init__(self, shortlink):
+    super(GoogleIssueTrackerIssue, self).__init__(shortlink)
+    self.issue_id = int(self.shortlink[2:])
+
+  def ToURL(self):
+    return self.url_format.format(issue_id=self.issue_id)
+
+  def Summary(self):
+    """Returns a short string description for UI."""
+    return 'Google Issue Tracker issue %s.' % self.issue_id
+
+
+# All supported tracker classes.
+_federated_issue_classes = [GoogleIssueTrackerIssue]
+
+
+def IsShortlinkValid(shortlink):
+  """Returns whether the given string is valid for any issue tracker."""
+  return any(tracker_class.IsShortlinkValid(shortlink)
+      for tracker_class in _federated_issue_classes)
+
+
+def FromShortlink(shortlink):
+  """Returns a FederatedIssue for the first matching tracker.
+
+  If no matching tracker is found, returns None.
+  """
+  for tracker_class in _federated_issue_classes:
+    if tracker_class.IsShortlinkValid(shortlink):
+      return tracker_class(shortlink)
+
+  return None
diff --git a/features/filterrules.py b/features/filterrules.py
new file mode 100644
index 0000000..3b1277e
--- /dev/null
+++ b/features/filterrules.py
@@ -0,0 +1,50 @@
+# 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
+
+"""Implementation of the filter rules feature."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from features import filterrules_helpers
+from framework import jsonfeed
+from tracker import tracker_constants
+
+
+class RecomputeDerivedFieldsTask(jsonfeed.InternalTask):
+  """JSON servlet that recomputes derived fields on a batch of issues."""
+
+  def HandleRequest(self, mr):
+    """Recompute derived field values on one range of issues in a shard."""
+    logging.info(
+        'params are %r %r %r %r', mr.specified_project_id, mr.lower_bound,
+        mr.upper_bound, mr.shard_id)
+    project = self.services.project.GetProject(
+        mr.cnxn, mr.specified_project_id)
+    config = self.services.config.GetProjectConfig(
+        mr.cnxn, mr.specified_project_id)
+    filterrules_helpers.RecomputeAllDerivedFieldsNow(
+        mr.cnxn, self.services, project, config, lower_bound=mr.lower_bound,
+        upper_bound=mr.upper_bound)
+
+    return {
+        'success': True,
+        }
+
+
+class ReindexQueueCron(jsonfeed.InternalTask):
+  """JSON servlet that reindexes some issues each minute, as needed."""
+
+  def HandleRequest(self, mr):
+    """Reindex issues that are listed in the reindex table."""
+    num_reindexed = self.services.issue.ReindexIssues(
+        mr.cnxn, tracker_constants.MAX_ISSUES_TO_REINDEX_PER_MINUTE,
+        self.services.user)
+
+    return {
+        'num_reindexed': num_reindexed,
+        }
diff --git a/features/filterrules_helpers.py b/features/filterrules_helpers.py
new file mode 100644
index 0000000..22acc7d
--- /dev/null
+++ b/features/filterrules_helpers.py
@@ -0,0 +1,848 @@
+# 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
+
+"""Implementation of the filter rules helper functions."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import re
+import six
+
+from six import string_types
+
+import settings
+from features import features_constants
+from framework import cloud_tasks_helpers
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import urls
+from framework import validate
+from proto import ast_pb2
+from proto import tracker_pb2
+from search import query2ast
+from search import searchpipeline
+from tracker import component_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+
+
+# Maximum number of filer rules that can be specified in a given
+# project.  This helps us bound the amount of time needed to
+# (re)compute derived fields.
+MAX_RULES = 200
+
+BLOCK = tracker_constants.RECOMPUTE_DERIVED_FIELDS_BLOCK_SIZE
+
+
+# TODO(jrobbins): implement a more efficient way to update just those
+# issues affected by a specific component change.
+def RecomputeAllDerivedFields(cnxn, services, project, config):
+  """Create work items to update all issues after filter rule changes.
+
+  Args:
+    cnxn: connection to SQL database.
+    services: connections to backend services.
+    project: Project PB for the project that was edited.
+    config: ProjectIssueConfig PB for the project that was edited,
+        including the edits made.
+  """
+  if not settings.recompute_derived_fields_in_worker:
+    # Background tasks are not enabled, just do everything in the servlet.
+    RecomputeAllDerivedFieldsNow(cnxn, services, project, config)
+    return
+
+  highest_id = services.issue.GetHighestLocalID(cnxn, project.project_id)
+  if highest_id == 0:
+    return  # No work to do.
+
+  # Enqueue work items for blocks of issues to recompute.
+  steps = list(range(1, highest_id + 1, BLOCK))
+  steps.reverse()  # Update higher numbered issues sooner, old issues last.
+  # Cycle through shard_ids just to load-balance among the replicas.  Each
+  # block includes all issues in that local_id range, not just 1/10 of them.
+  shard_id = 0
+  for step in steps:
+    params = {
+        'project_id': project.project_id,
+        'lower_bound': step,
+        'upper_bound': min(step + BLOCK, highest_id + 1),
+        'shard_id': shard_id,
+    }
+    task = cloud_tasks_helpers.generate_simple_task(
+        urls.RECOMPUTE_DERIVED_FIELDS_TASK + '.do', params)
+    cloud_tasks_helpers.create_task(
+        task, queue=features_constants.QUEUE_RECOMPUTE_DERIVED_FIELDS)
+
+    shard_id = (shard_id + 1) % settings.num_logical_shards
+
+
+def RecomputeAllDerivedFieldsNow(
+    cnxn, services, project, config, lower_bound=None, upper_bound=None):
+  """Re-apply all filter rules to all issues in a project.
+
+  Args:
+    cnxn: connection to SQL database.
+    services: connections to persistence layer.
+    project: Project PB for the project that was changed.
+    config: ProjectIssueConfig for that project.
+    lower_bound: optional int lowest issue ID to consider, inclusive.
+    upper_bound: optional int highest issue ID to consider, exclusive.
+
+  SIDE-EFFECT: updates all issues in the project. Stores and re-indexes
+  all those that were changed.
+  """
+  if lower_bound is not None and upper_bound is not None:
+    issues = services.issue.GetIssuesByLocalIDs(
+        cnxn, project.project_id, list(range(lower_bound, upper_bound)),
+        use_cache=False)
+  else:
+    issues = services.issue.GetAllIssuesInProject(
+        cnxn, project.project_id, use_cache=False)
+
+  rules = services.features.GetFilterRules(cnxn, project.project_id)
+  predicate_asts = ParsePredicateASTs(rules, config, [])
+  modified_issues = []
+  for issue in issues:
+    any_change, _traces = ApplyGivenRules(
+        cnxn, services, issue, config, rules, predicate_asts)
+    if any_change:
+      modified_issues.append(issue)
+
+  services.issue.UpdateIssues(cnxn, modified_issues, just_derived=True)
+
+  # Doing the FTS indexing can be too slow, so queue up the issues
+  # that need to be re-indexed by a cron-job later.
+  services.issue.EnqueueIssuesForIndexing(
+      cnxn, [issue.issue_id for issue in modified_issues])
+
+
+def ParsePredicateASTs(rules, config, me_user_ids):
+  """Parse the given rules in QueryAST PBs."""
+  predicates = [rule.predicate for rule in rules]
+  if me_user_ids:
+    predicates = [
+      searchpipeline.ReplaceKeywordsWithUserIDs(me_user_ids, pred)[0]
+      for pred in predicates]
+  predicate_asts = [
+      query2ast.ParseUserQuery(pred, '', query2ast.BUILTIN_ISSUE_FIELDS, config)
+      for pred in predicates]
+  return predicate_asts
+
+
+def ApplyFilterRules(cnxn, services, issue, config):
+  """Apply the filter rules for this project to the given issue.
+
+  Args:
+    cnxn: database connection, used to look up user IDs.
+    services: persistence layer for users, issues, and projects.
+    issue: An Issue PB that has just been updated with new explicit values.
+    config: The project's issue tracker config PB.
+
+  Returns:
+    A pair (any_changes, traces) where any_changes is true if any changes
+    were made to the issue derived fields, and traces is a dictionary
+    {(field_id, new_value): explanation_str} of traces that
+    explain which rule generated each derived value.
+
+  SIDE-EFFECT: update the derived_* fields of the Issue PB.
+  """
+  rules = services.features.GetFilterRules(cnxn, issue.project_id)
+  predicate_asts = ParsePredicateASTs(rules, config, [])
+  return ApplyGivenRules(cnxn, services, issue, config, rules, predicate_asts)
+
+
+def ApplyGivenRules(cnxn, services, issue, config, rules, predicate_asts):
+  """Apply the filter rules for this project to the given issue.
+
+  Args:
+    cnxn: database connection, used to look up user IDs.
+    services: persistence layer for users, issues, and projects.
+    issue: An Issue PB that has just been updated with new explicit values.
+    config: The project's issue tracker config PB.
+    rules: list of FilterRule PBs.
+
+  Returns:
+    A pair (any_changes, traces) where any_changes is true if any changes
+    were made to the issue derived fields, and traces is a dictionary
+    {(field_id, new_value): explanation_str} of traces that
+    explain which rule generated each derived value.
+
+  SIDE-EFFECT: update the derived_* fields of the Issue PB.
+  """
+  (derived_owner_id, derived_status, derived_cc_ids,
+   derived_labels, derived_notify_addrs, traces,
+   new_warnings, new_errors) = _ComputeDerivedFields(
+       cnxn, services, issue, config, rules, predicate_asts)
+
+  any_change = (derived_owner_id != issue.derived_owner_id or
+                derived_status != issue.derived_status or
+                derived_cc_ids != issue.derived_cc_ids or
+                derived_labels != issue.derived_labels or
+                derived_notify_addrs != issue.derived_notify_addrs)
+
+  # Remember any derived values.
+  issue.derived_owner_id = derived_owner_id
+  issue.derived_status = derived_status
+  issue.derived_cc_ids = derived_cc_ids
+  issue.derived_labels = derived_labels
+  issue.derived_notify_addrs = derived_notify_addrs
+  issue.derived_warnings = new_warnings
+  issue.derived_errors = new_errors
+
+  return any_change, traces
+
+
+def _ComputeDerivedFields(cnxn, services, issue, config, rules, predicate_asts):
+  """Compute derived field values for an issue based on filter rules.
+
+  Args:
+    cnxn: database connection, used to look up user IDs.
+    services: persistence layer for users, issues, and projects.
+    issue: the issue to examine.
+    config: ProjectIssueConfig for the project containing the issue.
+    rules: list of FilterRule PBs.
+    predicate_asts: QueryAST PB for each rule.
+
+  Returns:
+    A 8-tuple of derived values for owner_id, status, cc_ids, labels,
+    notify_addrs, traces, warnings, and errors.  These values are the result
+    of applying all rules in order.  Filter rules only produce derived values
+    that do not conflict with the explicit field values of the issue.
+  """
+  excl_prefixes = [
+      prefix.lower() for prefix in config.exclusive_label_prefixes]
+  # Examine the explicit labels and Cc's on the issue.
+  lower_labels = [lab.lower() for lab in issue.labels]
+  label_set = set(lower_labels)
+  cc_set = set(issue.cc_ids)
+  excl_prefixes_used = set()
+  for lab in lower_labels:
+    prefix = lab.split('-')[0]
+    if prefix in excl_prefixes:
+      excl_prefixes_used.add(prefix)
+  prefix_values_added = {}
+
+  # Start with the assumption that rules don't change anything, then
+  # accumulate changes.
+  derived_owner_id = framework_constants.NO_USER_SPECIFIED
+  derived_status = ''
+  derived_cc_ids = []
+  derived_labels = []
+  derived_notify_addrs = []
+  traces = {}  # {(field_id, new_value): explanation_str}
+  new_warnings = []
+  new_errors = []
+
+  def AddLabelConsideringExclusivePrefixes(label):
+    lab_lower = label.lower()
+    if lab_lower in label_set:
+      return False  # We already have that label.
+    prefix = lab_lower.split('-')[0]
+    if '-' in lab_lower and prefix in excl_prefixes:
+      if prefix in excl_prefixes_used:
+        return False  # Issue already has that prefix.
+      # Replace any earlied-added label that had the same exclusive prefix.
+      if prefix in prefix_values_added:
+        label_set.remove(prefix_values_added[prefix].lower())
+        derived_labels.remove(prefix_values_added[prefix])
+      prefix_values_added[prefix] = label
+
+    derived_labels.append(label)
+    label_set.add(lab_lower)
+    return True
+
+  # Apply component labels and auto-cc's before doing the rules.
+  components = tracker_bizobj.GetIssueComponentsAndAncestors(issue, config)
+  for cd in components:
+    for cc_id in cd.cc_ids:
+      if cc_id not in cc_set:
+        derived_cc_ids.append(cc_id)
+        cc_set.add(cc_id)
+        traces[(tracker_pb2.FieldID.CC, cc_id)] = (
+            'Added by component %s' % cd.path)
+
+    for label_id in cd.label_ids:
+      lab = services.config.LookupLabel(cnxn, config.project_id, label_id)
+      if AddLabelConsideringExclusivePrefixes(lab):
+        traces[(tracker_pb2.FieldID.LABELS, lab)] = (
+            'Added by component %s' % cd.path)
+
+  # Apply each rule in order. Later rules see the results of earlier rules.
+  # Later rules can overwrite or add to results of earlier rules.
+  # TODO(jrobbins): also pass in in-progress values for owner and CCs so
+  # that early rules that set those can affect later rules that check them.
+  for rule, predicate_ast in zip(rules, predicate_asts):
+    (rule_owner_id, rule_status, rule_add_cc_ids,
+     rule_add_labels, rule_add_notify, rule_add_warning,
+     rule_add_error) = _ApplyRule(
+         cnxn, services, rule, predicate_ast, issue, label_set, config)
+
+    # logging.info(
+    #    'rule "%s" gave %r, %r, %r, %r, %r',
+    #     rule.predicate, rule_owner_id, rule_status, rule_add_cc_ids,
+    #     rule_add_labels, rule_add_notify)
+
+    if rule_owner_id and not issue.owner_id:
+      derived_owner_id = rule_owner_id
+      traces[(tracker_pb2.FieldID.OWNER, rule_owner_id)] = (
+        'Added by rule: IF %s THEN SET DEFAULT OWNER' % rule.predicate)
+
+    if rule_status and not issue.status:
+      derived_status = rule_status
+      traces[(tracker_pb2.FieldID.STATUS, rule_status)] = (
+        'Added by rule: IF %s THEN SET DEFAULT STATUS' % rule.predicate)
+
+    for cc_id in rule_add_cc_ids:
+      if cc_id not in cc_set:
+        derived_cc_ids.append(cc_id)
+        cc_set.add(cc_id)
+        traces[(tracker_pb2.FieldID.CC, cc_id)] = (
+          'Added by rule: IF %s THEN ADD CC' % rule.predicate)
+
+    for lab in rule_add_labels:
+      if AddLabelConsideringExclusivePrefixes(lab):
+        traces[(tracker_pb2.FieldID.LABELS, lab)] = (
+            'Added by rule: IF %s THEN ADD LABEL' % rule.predicate)
+
+    for addr in rule_add_notify:
+      if addr not in derived_notify_addrs:
+        derived_notify_addrs.append(addr)
+        # Note: No trace because also-notify addresses are not shown in the UI.
+
+    if rule_add_warning:
+      new_warnings.append(rule_add_warning)
+      traces[(tracker_pb2.FieldID.WARNING, rule_add_warning)] = (
+        'Added by rule: IF %s THEN ADD WARNING' % rule.predicate)
+
+    if rule_add_error:
+      new_errors.append(rule_add_error)
+      traces[(tracker_pb2.FieldID.ERROR, rule_add_error)] = (
+        'Added by rule: IF %s THEN ADD ERROR' % rule.predicate)
+
+  return (derived_owner_id, derived_status, derived_cc_ids, derived_labels,
+          derived_notify_addrs, traces, new_warnings, new_errors)
+
+
+def EvalPredicate(
+    cnxn, services, predicate_ast, issue, label_set, config, owner_id, cc_ids,
+    status):
+  """Return True if the given issue satisfies the given predicate.
+
+  Args:
+    cnxn: Connection to SQL database.
+    services: persistence layer for users and issues.
+    predicate_ast: QueryAST for rule or saved query string.
+    issue: Issue PB of the issue to evaluate.
+    label_set: set of lower-cased labels on the issue.
+    config: ProjectIssueConfig for the project that contains the issue.
+    owner_id: int user ID of the issue owner.
+    cc_ids: list of int user IDs of the users Cc'd on the issue.
+    status: string status value of the issue.
+
+  Returns:
+    True if the issue satisfies the predicate.
+
+  Note: filter rule evaluation passes in only the explicit owner_id,
+  cc_ids, and status whereas subscription evaluation passes in the
+  combination of explicit values and derived values.
+  """
+  # TODO(jrobbins): Call ast2ast to simplify the predicate and do
+  # most lookups.  Refactor to allow that to be done once.
+  project = services.project.GetProject(cnxn, config.project_id)
+  for conj in predicate_ast.conjunctions:
+    if all(_ApplyCond(cnxn, services, project, cond, issue, label_set, config,
+                      owner_id, cc_ids, status)
+            for cond in conj.conds):
+      return True
+
+  # All OR-clauses were evaluated, but none of them was matched.
+  return False
+
+
+def _ApplyRule(
+    cnxn, services, rule_pb, predicate_ast, issue, label_set, config):
+  """Test if the given rule should fire and return its result.
+
+  Args:
+    cnxn: database connection, used to look up user IDs.
+    services: persistence layer for users and issues.
+    rule_pb: FilterRule PB instance with a predicate and various actions.
+    predicate_ast: QueryAST for the rule predicate.
+    issue: The Issue PB to be considered.
+    label_set: set of lowercased labels from an issue's explicit
+      label_list plus and labels that have accumlated from previous rules.
+    config: ProjectIssueConfig for the project containing the issue.
+
+  Returns:
+    A 6-tuple of the results from this rule: derived owner id, status,
+    cc_ids to add, labels to add, notify addresses to add, and a warning
+    string.  Currently only one will be set and the others will all be
+    None or an empty list.
+  """
+  if EvalPredicate(
+      cnxn, services, predicate_ast, issue, label_set, config,
+      issue.owner_id, issue.cc_ids, issue.status):
+    logging.info('rule adds: %r', rule_pb.add_labels)
+    return (rule_pb.default_owner_id, rule_pb.default_status,
+            rule_pb.add_cc_ids, rule_pb.add_labels,
+            rule_pb.add_notify_addrs, rule_pb.warning, rule_pb.error)
+  else:
+    return None, None, [], [], [], None, None
+
+
+def _ApplyCond(
+    cnxn, services, project, term, issue, label_set, config, owner_id, cc_ids,
+    status):
+  """Return True if the given issue satisfied the given predicate term."""
+  op = term.op
+  vals = term.str_values or term.int_values
+  # Since rules are per-project, there'll be exactly 1 field
+  fd = term.field_defs[0]
+  field = fd.field_name
+
+  if field == 'label':
+    return _Compare(op, vals, label_set)
+  if field == 'component':
+    return _CompareComponents(config, op, vals, issue.component_ids)
+  if field == 'any_field':
+    return _Compare(op, vals, label_set) or _Compare(op, vals, [issue.summary])
+  if field == 'attachments':
+    return _Compare(op, term.int_values, [issue.attachment_count])
+  if field == 'blocked':
+    return _Compare(op, vals, issue.blocked_on_iids)
+  if field == 'blockedon':
+    return _CompareIssueRefs(
+        cnxn, services, project, op, term.str_values, issue.blocked_on_iids)
+  if field == 'blocking':
+    return _CompareIssueRefs(
+        cnxn, services, project, op, term.str_values, issue.blocking_iids)
+  if field == 'cc':
+    return _CompareUsers(cnxn, services.user, op, vals, cc_ids)
+  if field == 'closed':
+    return (issue.closed_timestamp and
+            _Compare(op, vals, [issue.closed_timestamp]))
+  if field == 'id':
+    return _Compare(op, vals, [issue.local_id])
+  if field == 'mergedinto':
+    return _CompareIssueRefs(
+        cnxn, services, project, op, term.str_values, [issue.merged_into or 0])
+  if field == 'modified':
+    return (issue.modified_timestamp and
+            _Compare(op, vals, [issue.modified_timestamp]))
+  if field == 'open':
+    # TODO(jrobbins): this just checks the explicit status, not the result
+    # of any previous rules.
+    return tracker_helpers.MeansOpenInProject(status, config)
+  if field == 'opened':
+    return (issue.opened_timestamp and
+            _Compare(op, vals, [issue.opened_timestamp]))
+  if field == 'owner':
+    return _CompareUsers(cnxn, services.user, op, vals, [owner_id])
+  if field == 'reporter':
+    return _CompareUsers(cnxn, services.user, op, vals, [issue.reporter_id])
+  if field == 'stars':
+    return _Compare(op, term.int_values, [issue.star_count])
+  if field == 'status':
+    return _Compare(op, vals, [status.lower()])
+  if field == 'summary':
+    return _Compare(op, vals, [issue.summary])
+
+  # Since rules are per-project, it makes no sense to support field project.
+  # We would need to load comments to support fields comment, commentby,
+  # description, attachment.
+  # Supporting starredby is probably not worth the complexity.
+
+  logging.info('Rule with unsupported field %r was False', field)
+  return False
+
+
+def _CheckTrivialCases(op, issue_values):
+  """Check has:x and -has:x terms and no values.  Otherwise, return None."""
+  # We can do these operators without looking up anything or even knowing
+  # which field is being checked.
+  issue_values_exist = bool(
+      issue_values and issue_values != [''] and issue_values != [0])
+  if op == ast_pb2.QueryOp.IS_DEFINED:
+    return issue_values_exist
+  elif op == ast_pb2.QueryOp.IS_NOT_DEFINED:
+    return not issue_values_exist
+  elif not issue_values_exist:
+    # No other operator can match empty values.
+    return op in (ast_pb2.QueryOp.NE, ast_pb2.QueryOp.NOT_TEXT_HAS)
+
+  return None  # Caller should continue processing the term.
+
+def _CompareComponents(config, op, rule_values, issue_values):
+  """Compare the components specified in the rule vs those in the issue."""
+  trivial_result = _CheckTrivialCases(op, issue_values)
+  if trivial_result is not None:
+    return trivial_result
+
+  exact = op in (ast_pb2.QueryOp.EQ, ast_pb2.QueryOp.NE)
+  rule_component_ids = set()
+  for path in rule_values:
+    rule_component_ids.update(tracker_bizobj.FindMatchingComponentIDs(
+        path, config, exact=exact))
+
+  if op == ast_pb2.QueryOp.TEXT_HAS or op == ast_pb2.QueryOp.EQ:
+    return any(rv in issue_values for rv in rule_component_ids)
+  elif op == ast_pb2.QueryOp.NOT_TEXT_HAS or op == ast_pb2.QueryOp.NE:
+    return all(rv not in issue_values for rv in rule_component_ids)
+
+  return False
+
+
+def _CompareIssueRefs(
+  cnxn, services, project, op, rule_str_values, issue_values):
+  """Compare the issues specified in the rule vs referenced in the issue."""
+  trivial_result = _CheckTrivialCases(op, issue_values)
+  if trivial_result is not None:
+    return trivial_result
+
+  rule_refs = []
+  for str_val in rule_str_values:
+    ref = tracker_bizobj.ParseIssueRef(str_val)
+    if ref:
+      rule_refs.append(ref)
+  rule_ref_project_names = set(
+      pn for pn, local_id in rule_refs if pn)
+  rule_ref_projects_dict = services.project.GetProjectsByName(
+      cnxn, rule_ref_project_names)
+  rule_ref_projects_dict[project.project_name] = project
+  rule_iids, _misses = services.issue.ResolveIssueRefs(
+      cnxn, rule_ref_projects_dict, project.project_name, rule_refs)
+
+  if op == ast_pb2.QueryOp.TEXT_HAS:
+    op = ast_pb2.QueryOp.EQ
+  if op == ast_pb2.QueryOp.NOT_TEXT_HAS:
+    op = ast_pb2.QueryOp.NE
+
+  return _Compare(op, rule_iids, issue_values)
+
+
+def _CompareUsers(cnxn, user_service, op, rule_values, issue_values):
+  """Compare the user(s) specified in the rule and the issue."""
+  # Note that all occurances of "me" in rule_values should have already
+  # been resolved to str(user_id) of the subscribing user.
+  # TODO(jrobbins): Project filter rules should not be allowed to have "me".
+
+  trivial_result = _CheckTrivialCases(op, issue_values)
+  if trivial_result is not None:
+    return trivial_result
+
+  try:
+    return _CompareUserIDs(op, rule_values, issue_values)
+  except ValueError:
+    return _CompareEmails(cnxn, user_service, op, rule_values, issue_values)
+
+
+def _CompareUserIDs(op, rule_values, issue_values):
+  """Compare users according to specified user ID integer strings."""
+  rule_user_ids = [int(uid_str) for uid_str in rule_values]
+
+  if op == ast_pb2.QueryOp.TEXT_HAS or op == ast_pb2.QueryOp.EQ:
+    return any(rv in issue_values for rv in rule_user_ids)
+  elif op == ast_pb2.QueryOp.NOT_TEXT_HAS or op == ast_pb2.QueryOp.NE:
+    return all(rv not in issue_values for rv in rule_user_ids)
+
+  logging.info('unexpected numeric user operator %r %r %r',
+               op, rule_values, issue_values)
+  return False
+
+
+def _CompareEmails(cnxn, user_service, op, rule_values, issue_values):
+  """Compare users based on email addresses."""
+  issue_emails = list(
+      user_service.LookupUserEmails(cnxn, issue_values).values())
+
+  if op == ast_pb2.QueryOp.TEXT_HAS:
+    return any(_HasText(rv, issue_emails) for rv in rule_values)
+  elif op == ast_pb2.QueryOp.NOT_TEXT_HAS:
+    return all(not _HasText(rv, issue_emails) for rv in rule_values)
+  elif op == ast_pb2.QueryOp.EQ:
+    return any(rv in issue_emails for rv in rule_values)
+  elif op == ast_pb2.QueryOp.NE:
+    return all(rv not in issue_emails for rv in rule_values)
+
+  logging.info('unexpected user operator %r %r %r',
+               op, rule_values, issue_values)
+  return False
+
+
+def _Compare(op, rule_values, issue_values):
+  """Compare the values specified in the rule and the issue."""
+  trivial_result = _CheckTrivialCases(op, issue_values)
+  if trivial_result is not None:
+    return trivial_result
+
+  if (op in [ast_pb2.QueryOp.TEXT_HAS, ast_pb2.QueryOp.NOT_TEXT_HAS] and
+      issue_values and not isinstance(min(issue_values), string_types)):
+    return False  # Empty or numeric fields cannot match substrings
+  elif op == ast_pb2.QueryOp.TEXT_HAS:
+    return any(_HasText(rv, issue_values) for rv in rule_values)
+  elif op == ast_pb2.QueryOp.NOT_TEXT_HAS:
+    return all(not _HasText(rv, issue_values) for rv in rule_values)
+
+  val_type = type(min(issue_values))
+  if val_type in six.integer_types:
+    try:
+      rule_values = [int(rv) for rv in rule_values]
+    except ValueError:
+      logging.info('rule value conversion to int failed: %r', rule_values)
+      return False
+
+  if op == ast_pb2.QueryOp.EQ:
+    return any(rv in issue_values for rv in rule_values)
+  elif op == ast_pb2.QueryOp.NE:
+    return all(rv not in issue_values for rv in rule_values)
+
+  if val_type not in six.integer_types:
+    return False  # Inequalities only work on numeric fields
+
+  if op == ast_pb2.QueryOp.GT:
+    return min(issue_values) > min(rule_values)
+  elif op == ast_pb2.QueryOp.GE:
+    return min(issue_values) >= min(rule_values)
+  elif op == ast_pb2.QueryOp.LT:
+    return max(issue_values) < max(rule_values)
+  elif op == ast_pb2.QueryOp.LE:
+    return max(issue_values) <= max(rule_values)
+
+  logging.info('unexpected operator %r %r %r', op, rule_values, issue_values)
+  return False
+
+
+def _HasText(rule_text, issue_values):
+  """Return True if the issue contains the rule text, case insensitive."""
+  rule_lower = rule_text.lower()
+  for iv in issue_values:
+    if iv is not None and rule_lower in iv.lower():
+      return True
+
+  return False
+
+
+def MakeRule(
+    predicate, default_status=None, default_owner_id=None, add_cc_ids=None,
+    add_labels=None, add_notify=None, warning=None, error=None):
+  """Make a FilterRule PB with the supplied information.
+
+  Args:
+    predicate: string query that will trigger the rule if satisfied.
+    default_status: optional default status to set if rule fires.
+    default_owner_id: optional default owner_id to set if rule fires.
+    add_cc_ids: optional cc ids to set if rule fires.
+    add_labels: optional label strings to set if rule fires.
+    add_notify: optional notify email addresses to set if rule fires.
+    warning: optional string for a software development process warning.
+    error: optional string for a software development process error.
+
+  Returns:
+    A new FilterRule PB.
+  """
+  rule_pb = tracker_pb2.FilterRule()
+  rule_pb.predicate = predicate
+
+  if add_labels:
+    rule_pb.add_labels = add_labels
+  if default_status:
+    rule_pb.default_status = default_status
+  if default_owner_id:
+    rule_pb.default_owner_id = default_owner_id
+  if add_cc_ids:
+    rule_pb.add_cc_ids = add_cc_ids
+  if add_notify:
+    rule_pb.add_notify_addrs = add_notify
+  if warning:
+    rule_pb.warning = warning
+  if error:
+    rule_pb.error = error
+
+  return rule_pb
+
+
+def ParseRules(cnxn, post_data, user_service, errors, prefix=''):
+  """Parse rules from the user and return a list of FilterRule PBs.
+
+  Args:
+    cnxn: connection to database.
+    post_data: dictionary of html form data.
+    user_service: connection to user backend services.
+    errors: EZTErrors message used to display field validation errors.
+    prefix: optional string prefix used to differentiate the form fields
+      for existing rules from the form fields for new rules.
+
+  Returns:
+    A list of FilterRule PBs
+  """
+  rules = []
+
+  # The best we can do for now is show all validation errors at the bottom of
+  # the filter rules section, not directly on the rule that had the error :(.
+  error_list = []
+
+  for i in range(1, MAX_RULES + 1):
+    if ('%spredicate%s' % (prefix, i)) not in post_data:
+      continue  # skip any entries that are blank or have no predicate.
+    predicate = post_data['%spredicate%s' % (prefix, i)].strip()
+    action_type = post_data.get('%saction_type%s' % (prefix, i),
+                                'add_labels').strip()
+    action_value = post_data.get('%saction_value%s' % (prefix, i),
+                                 '').strip()
+    if predicate:
+      # Note: action_value may be '', meaning no-op.
+      rules.append(_ParseOneRule(
+          cnxn, predicate, action_type, action_value, user_service, i,
+          error_list))
+
+  if error_list:
+    errors.rules = error_list
+
+  return rules
+
+
+def _ParseOneRule(
+    cnxn, predicate, action_type, action_value, user_service,
+    rule_num, error_list):
+  """Parse one FilterRule based on the action type."""
+
+  if action_type == 'default_status':
+    status = framework_bizobj.CanonicalizeLabel(action_value)
+    rule = MakeRule(predicate, default_status=status)
+
+  elif action_type == 'default_owner':
+    if action_value:
+      try:
+        user_id = user_service.LookupUserID(cnxn, action_value)
+      except exceptions.NoSuchUserException:
+        user_id = framework_constants.NO_USER_SPECIFIED
+        error_list.append(
+            'Rule %d: No such user: %s' % (rule_num, action_value))
+    else:
+      user_id = framework_constants.NO_USER_SPECIFIED
+    rule = MakeRule(predicate, default_owner_id=user_id)
+
+  elif action_type == 'add_ccs':
+    cc_ids = []
+    for email in re.split('[,;\s]+', action_value):
+      if not email.strip():
+        continue
+      try:
+        user_id = user_service.LookupUserID(
+            cnxn, email.strip(), autocreate=True)
+        cc_ids.append(user_id)
+      except exceptions.NoSuchUserException:
+        error_list.append(
+            'Rule %d: No such user: %s' % (rule_num, email.strip()))
+
+    rule = MakeRule(predicate, add_cc_ids=cc_ids)
+
+  elif action_type == 'add_labels':
+    add_labels = framework_constants.IDENTIFIER_RE.findall(action_value)
+    rule = MakeRule(predicate, add_labels=add_labels)
+
+  elif action_type == 'also_notify':
+    add_notify = []
+    for addr in re.split('[,;\s]+', action_value):
+      if validate.IsValidEmail(addr.strip()):
+        add_notify.append(addr.strip())
+      else:
+        error_list.append(
+            'Rule %d: Invalid email address: %s' % (rule_num, addr.strip()))
+
+    rule = MakeRule(predicate, add_notify=add_notify)
+
+  elif action_type == 'warning':
+    rule = MakeRule(predicate, warning=action_value)
+
+  elif action_type == 'error':
+    rule = MakeRule(predicate, error=action_value)
+
+  else:
+    logging.info('unexpected action type, probably tampering:%r', action_type)
+    raise exceptions.InputException()
+
+  return rule
+
+
+def OwnerCcsInvolvedInFilterRules(rules):
+  """Finds all user_ids in the given rules and returns them.
+
+  Args:
+    rules: a list of FilterRule PBs.
+
+  Returns:
+    A set of user_ids.
+  """
+  user_ids = set()
+  for rule in rules:
+    if rule.default_owner_id:
+      user_ids.add(rule.default_owner_id)
+    user_ids.update(rule.add_cc_ids)
+  return user_ids
+
+
+def BuildFilterRuleStrings(filter_rules, emails_by_id):
+  """Builds strings that represent filter rules.
+
+  Args:
+    filter_rules: a list of FilterRule PBs.
+    emails_by_id: a dict of {user_id: email, ..} of user_ids in the FilterRules.
+
+  Returns:
+    A list of strings each representing a FilterRule.
+    eg. "if predicate then consequence"
+  """
+  rule_strs = []
+  for rule in filter_rules:
+    cons = ""
+    if rule.add_labels:
+      cons = 'add label(s): %s' % ', '.join(rule.add_labels)
+    elif rule.default_status:
+      cons = 'set default status: %s' % rule.default_status
+    elif rule.default_owner_id:
+      cons = 'set default owner: %s' % emails_by_id.get(
+          rule.default_owner_id, 'user not found')
+    elif rule.add_cc_ids:
+      cons = 'add cc(s): %s' % ', '.join(
+        [emails_by_id.get(user_id, 'user not found')
+         for user_id in rule.add_cc_ids])
+    elif rule.add_notify_addrs:
+      cons = 'notify: %s' % ', '.join(rule.add_notify_addrs)
+
+    rule_strs.append('if %s then %s' % (rule.predicate, cons))
+
+  return rule_strs
+
+
+def BuildRedactedFilterRuleStrings(
+    cnxn, rules_by_project, user_service, hide_emails):
+  """Converts FilterRule PBs in strings that hide references to hide_emails.
+
+  Args:
+    rules_by_project: a dict of {project_id, [filter_rule, ...], ...}
+      with FilterRule PBs.
+    user_service:
+    hide_emails: a list of emails that should not be shown in rule strings.
+  """
+  rule_strs_by_project = {}
+  prohibited_re = re.compile(
+      r'\b%s\b' % r'\b|\b'.join(map(re.escape, hide_emails)))
+  for project_id, rules in rules_by_project.items():
+    user_ids_in_rules = OwnerCcsInvolvedInFilterRules(rules)
+    emails_by_id = user_service.LookupUserEmails(
+        cnxn, user_ids_in_rules, ignore_missed=True)
+    rule_strs = BuildFilterRuleStrings(rules, emails_by_id)
+    censored_strs = [
+        prohibited_re.sub(framework_constants.DELETED_USER_NAME, rule_str)
+        for rule_str in rule_strs]
+
+    rule_strs_by_project[project_id] = censored_strs
+
+  return rule_strs_by_project
diff --git a/features/filterrules_views.py b/features/filterrules_views.py
new file mode 100644
index 0000000..75fb425
--- /dev/null
+++ b/features/filterrules_views.py
@@ -0,0 +1,53 @@
+# 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
+
+"""Classes to display filter rules in templates."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from framework import template_helpers
+
+
+class RuleView(template_helpers.PBProxy):
+  """Wrapper class that makes it easier to display a Rule via EZT."""
+
+  def __init__(self, rule_pb, users_by_id):
+    super(RuleView, self).__init__(rule_pb)
+
+    self.action_type = ''
+    self.action_value = ''
+
+    if rule_pb is None:
+      return  # Just leave everything as ''
+
+    # self.predicate is automatically available.
+
+    # For the current UI, we assume that each rule has exactly
+    # one action, so we can determine the text value for it here.
+    if rule_pb.default_status:
+      self.action_type = 'default_status'
+      self.action_value = rule_pb.default_status
+    elif rule_pb.default_owner_id:
+      self.action_type = 'default_owner'
+      self.action_value = users_by_id[rule_pb.default_owner_id].email
+    elif rule_pb.add_cc_ids:
+      self.action_type = 'add_ccs'
+      usernames = [users_by_id[cc_id].email for cc_id in rule_pb.add_cc_ids]
+      self.action_value = ', '.join(usernames)
+    elif rule_pb.add_labels:
+      self.action_type = 'add_labels'
+      self.action_value = ', '.join(rule_pb.add_labels)
+    elif rule_pb.add_notify_addrs:
+      self.action_type = 'also_notify'
+      self.action_value = ', '.join(rule_pb.add_notify_addrs)
+    elif rule_pb.warning:
+      self.action_type = 'warning'
+      self.action_value = rule_pb.warning
+    elif rule_pb.error:
+      self.action_type = 'error'
+      self.action_value = rule_pb.error
diff --git a/features/generate_dataset.py b/features/generate_dataset.py
new file mode 100644
index 0000000..b13ae88
--- /dev/null
+++ b/features/generate_dataset.py
@@ -0,0 +1,123 @@
+"""This module is used to go from raw data to a csv dataset to build models for
+   component prediction.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import argparse
+import string
+import sys
+import csv
+import re
+import logging
+import random
+import time
+import os
+import settings
+from framework import sql
+from framework import servlet
+
+if not settings.unit_test_mode:
+  import MySQLdb as mdb
+ISSUE_LIMIT = 7000
+ISSUES_PER_RUN = 50
+COMPONENT_PREDICTOR_PROJECT = 16
+
+def build_component_dataset(issue, csv_file):
+  """Main function to build dataset for training models.
+
+  Args:
+    issue: The issue service with set up data.
+    csv_file: The csv file path to store the dataset.
+  """
+
+  logging.info('Building dataset')
+  con = sql.MonorailConnection()
+
+  csv_writer = csv.writer(csv_file)
+
+  logging.info('Downloading the dataset from database.')
+
+  issue_table = sql.SQLTableManager('Issue')
+  issue_component_table = sql.SQLTableManager('Issue2Component')
+  closed_index_table = sql.SQLTableManager('ComponentIssueClosedIndex')
+
+  close = closed_index_table.SelectValue(con, col='closed_index')
+
+  last_close = issue_table.Select(con,
+                                  cols=['closed'],
+                                  where=[('closed > %s', [str(close)]),
+                                         ('project_id = %s',
+                                          [str(COMPONENT_PREDICTOR_PROJECT)])],
+                                  order_by=[('closed', [])],
+                                  limit=ISSUE_LIMIT)[-1][0]
+
+  issue_ids = issue_table.Select(con,
+                              cols=['id'],
+                              where=[('closed > %s', [str(close)]),
+                                     ('closed <= %s', [str(last_close)]),
+                                     ('project_id = %s',
+                                      [str(COMPONENT_PREDICTOR_PROJECT)])])
+
+
+  logging.info('Close: ' + str(close))
+  logging.info('Last close: ' + str(last_close))
+
+  # Get the comments and components for 50 issues at a time so as to not
+  # overwhelm a single shard with all 7000 issues at once
+  for i in range(0, len(issue_ids), ISSUES_PER_RUN):
+    issue_list = [str(x[0]) for x in issue_ids[i:i+ISSUES_PER_RUN]]
+
+    comments = issue.GetCommentsForIssues(con, issue_list, content_only=True)
+
+    shard_id = random.randint(0, settings.num_logical_shards - 1)
+
+    components = issue_component_table.Select(con,
+                                        cols=['issue_id',
+                                              'GROUP_CONCAT(component_id '
+                                              + 'SEPARATOR \',\')'],
+                                        joins=[('ComponentDef ON '
+                                                'ComponentDef.id = '
+                                                'Issue2Component.component_id',
+                                                [])],
+                                        where=[('(deprecated = %s OR deprecated'
+                                                ' IS NULL)', [False]),
+                                                ('is_deleted = %s', [False])],
+                                        group_by=['issue_id'],
+                                        shard_id=shard_id,
+                                        issue_id=issue_list)
+
+    for issue_id, component_ids in components:
+      comment_string = ' '.join(
+          [comment.content for comment in comments[issue_id]])
+
+      final_text = CleanText(comment_string)
+
+      final_issue = component_ids, final_text
+      csv_writer.writerow(final_issue)
+
+  closed_index_table.Update(con, delta={'closed_index' : last_close})
+
+  return csv_file
+
+
+def CleanText(text):
+  """Cleans provided text by lower casing words, removing punctuation, and
+  normalizing spacing so that there is exactly one space between each word.
+
+  Args:
+    text: Raw text to be cleaned.
+
+  Returns:
+    Cleaned version of text.
+
+  """
+
+  pretty_issue = text.lower().strip()
+
+  quoteless_issue = re.sub('\'', '', pretty_issue)
+  no_punctuation_issue = re.sub('[^\w\s]|_+', ' ', quoteless_issue)
+  one_space_issue = ' '.join(no_punctuation_issue.split())
+
+  return one_space_issue
diff --git a/features/hotlist_helpers.py b/features/hotlist_helpers.py
new file mode 100644
index 0000000..f23f72e
--- /dev/null
+++ b/features/hotlist_helpers.py
@@ -0,0 +1,473 @@
+# 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
+
+"""Helper functions and classes used by the hotlist pages."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import collections
+
+from features import features_constants
+from framework import framework_views
+from framework import framework_helpers
+from framework import sorting
+from framework import table_view_helpers
+from framework import timestr
+from framework import paginate
+from framework import permissions
+from framework import urls
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+from tracker import tablecell
+
+
+# Type to hold a HotlistRef
+HotlistRef = collections.namedtuple('HotlistRef', 'user_id, hotlist_name')
+
+
+def GetSortedHotlistIssues(
+    cnxn, hotlist_items, issues, auth, can, sort_spec, group_by_spec,
+    harmonized_config, services, profiler):
+  # type: (MonorailConnection, List[HotlistItem], List[Issue], AuthData,
+  #        ProjectIssueConfig, Services, Profiler) -> (List[Issue], Dict, Dict)
+  """Sorts the given HotlistItems and Issues and filters out Issues that
+     the user cannot view.
+
+  Args:
+    cnxn: MonorailConnection for connection to the SQL database.
+    hotlist_items: list of HotlistItems in the Hotlist we want to sort.
+    issues: list of Issues in the Hotlist we want to sort.
+    auth: AuthData object that identifies the logged in user.
+    can: int "canned query" number to scope the visible issues.
+    sort_spec: string that lists the sort order.
+    group_by_spec: string that lists the grouping order.
+    harmonized_config: ProjectIssueConfig created from all configs of projects
+      with issues in the issues list.
+    services: Services object for connections to backend services.
+    profiler: Profiler object to display and record processes.
+
+  Returns:
+    A tuple of (sorted_issues, hotlist_items_context, issues_users_by_id) where:
+
+    sorted_issues: list of Issues that are sorted and issues the user cannot
+      view are filtered out.
+    hotlist_items_context: a dict of dicts providing HotlistItem values that
+      are associated with each Hotlist Issue. E.g:
+      {issue.issue_id: {'issue_rank': hotlist item rank,
+                        'adder_id': hotlist item adder's user_id,
+                        'date_added': timestamp when this issue was added to the
+                          hotlist,
+                        'note': note for this issue in the hotlist,},
+       issue.issue_id: {...}}
+     issues_users_by_id: dict of {user_id: UserView, ...} for all users involved
+       in the hotlist items and issues.
+  """
+  with profiler.Phase('Checking issue permissions and getting ranks'):
+
+    allowed_issues = FilterIssues(cnxn, auth, can, issues, services)
+    allowed_iids = [issue.issue_id for issue in allowed_issues]
+    # The values for issues in a hotlist are specific to the hotlist
+    # (rank, adder, added) without invalidating the keys, an issue will retain
+    # the rank value it has in one hotlist when navigating to another hotlist.
+    sorting.InvalidateArtValuesKeys(
+        cnxn, [issue.issue_id for issue in allowed_issues])
+    sorted_ranks = sorted(
+        [hotlist_item.rank for hotlist_item in hotlist_items if
+         hotlist_item.issue_id in allowed_iids])
+    friendly_ranks = {
+        rank: friendly for friendly, rank in enumerate(sorted_ranks, 1)}
+    issue_adders = framework_views.MakeAllUserViews(
+        cnxn, services.user, [hotlist_item.adder_id for
+                                 hotlist_item in hotlist_items])
+    hotlist_items_context = {
+        hotlist_item.issue_id: {'issue_rank':
+                                 friendly_ranks[hotlist_item.rank],
+                                 'adder_id': hotlist_item.adder_id,
+                                 'date_added': timestr.FormatAbsoluteDate(
+                                     hotlist_item.date_added),
+                                 'note': hotlist_item.note}
+        for hotlist_item in hotlist_items if
+        hotlist_item.issue_id in allowed_iids}
+
+  with profiler.Phase('Making user views'):
+    issues_users_by_id = framework_views.MakeAllUserViews(
+        cnxn, services.user,
+        tracker_bizobj.UsersInvolvedInIssues(allowed_issues or []))
+    issues_users_by_id.update(issue_adders)
+
+  with profiler.Phase('Sorting issues'):
+    sortable_fields = tracker_helpers.SORTABLE_FIELDS.copy()
+    sortable_fields.update(
+        {'rank': lambda issue: hotlist_items_context[
+            issue.issue_id]['issue_rank'],
+         'adder': lambda issue: hotlist_items_context[
+             issue.issue_id]['adder_id'],
+         'added': lambda issue: hotlist_items_context[
+             issue.issue_id]['date_added'],
+         'note': lambda issue: hotlist_items_context[
+             issue.issue_id]['note']})
+    sortable_postproc = tracker_helpers.SORTABLE_FIELDS_POSTPROCESSORS.copy()
+    sortable_postproc.update(
+        {'adder': lambda user_view: user_view.email,
+        })
+
+    sorted_issues = sorting.SortArtifacts(
+        allowed_issues, harmonized_config, sortable_fields,
+        sortable_postproc, group_by_spec, sort_spec,
+        users_by_id=issues_users_by_id, tie_breakers=['rank', 'id'])
+    return sorted_issues, hotlist_items_context, issues_users_by_id
+
+
+def CreateHotlistTableData(mr, hotlist_issues, services):
+  """Creates the table data for the hotlistissues table."""
+  with mr.profiler.Phase('getting stars'):
+    starred_iid_set = set(services.issue_star.LookupStarredItemIDs(
+        mr.cnxn, mr.auth.user_id))
+
+  with mr.profiler.Phase('Computing col_spec'):
+    mr.ComputeColSpec(mr.hotlist)
+
+  issues_list = services.issue.GetIssues(
+        mr.cnxn,
+        [hotlist_issue.issue_id for hotlist_issue in hotlist_issues])
+  with mr.profiler.Phase('Getting config'):
+    hotlist_issues_project_ids = GetAllProjectsOfIssues(
+        [issue for issue in issues_list])
+    is_cross_project = len(hotlist_issues_project_ids) > 1
+    config_list = GetAllConfigsOfProjects(
+        mr.cnxn, hotlist_issues_project_ids, services)
+    harmonized_config = tracker_bizobj.HarmonizeConfigs(config_list)
+
+  # With no sort_spec specified, a hotlist should default to be sorted by
+  # 'rank'. sort_spec needs to be modified because hotlistissues.py
+  # checks for 'rank' in sort_spec to set 'allow_rerank' which determines if
+  # drag and drop reranking should be enabled.
+  if not mr.sort_spec:
+    mr.sort_spec = 'rank'
+  (sorted_issues, hotlist_issues_context,
+   issues_users_by_id) = GetSortedHotlistIssues(
+       mr.cnxn, hotlist_issues, issues_list, mr.auth, mr.can, mr.sort_spec,
+       mr.group_by_spec, harmonized_config, services, mr.profiler)
+
+  with mr.profiler.Phase("getting related issues"):
+    related_iids = set()
+    results_needing_related = sorted_issues
+    lower_cols = mr.col_spec.lower().split()
+    for issue in results_needing_related:
+      if 'blockedon' in lower_cols:
+        related_iids.update(issue.blocked_on_iids)
+      if 'blocking' in lower_cols:
+        related_iids.update(issue.blocking_iids)
+      if 'mergedinto' in lower_cols:
+        related_iids.add(issue.merged_into)
+    related_issues_list = services.issue.GetIssues(
+        mr.cnxn, list(related_iids))
+    related_issues = {issue.issue_id: issue for issue in related_issues_list}
+
+  with mr.profiler.Phase('filtering unviewable issues'):
+    viewable_iids_set = {issue.issue_id
+                         for issue in tracker_helpers.GetAllowedIssues(
+                             mr, [related_issues.values()], services)[0]}
+
+  with mr.profiler.Phase('building table'):
+    context_for_all_issues = {
+        issue.issue_id: hotlist_issues_context[issue.issue_id]
+                              for issue in sorted_issues}
+
+    column_values = table_view_helpers.ExtractUniqueValues(
+        mr.col_spec.lower().split(), sorted_issues, issues_users_by_id,
+        harmonized_config, related_issues,
+        hotlist_context_dict=context_for_all_issues)
+    unshown_columns = table_view_helpers.ComputeUnshownColumns(
+        sorted_issues, mr.col_spec.split(), harmonized_config,
+        features_constants.OTHER_BUILT_IN_COLS)
+    url_params = [(name, mr.GetParam(name)) for name in
+                  framework_helpers.RECOGNIZED_PARAMS]
+    # We are passing in None for the project_name because we are not operating
+    # under any project.
+    pagination = paginate.ArtifactPagination(
+        sorted_issues, mr.num, mr.GetPositiveIntParam('start'),
+        None, GetURLOfHotlist(mr.cnxn, mr.hotlist, services.user),
+        total_count=len(sorted_issues), url_params=url_params)
+
+    sort_spec = '%s %s %s' % (
+        mr.group_by_spec, mr.sort_spec, harmonized_config.default_sort_spec)
+
+    table_data = _MakeTableData(
+        pagination.visible_results, starred_iid_set,
+        mr.col_spec.lower().split(), mr.group_by_spec.lower().split(),
+        issues_users_by_id, tablecell.CELL_FACTORIES, related_issues,
+        viewable_iids_set, harmonized_config, context_for_all_issues,
+        mr.hotlist_id, sort_spec)
+
+  table_related_dict = {
+      'column_values': column_values, 'unshown_columns': unshown_columns,
+      'pagination': pagination, 'is_cross_project': is_cross_project }
+  return table_data, table_related_dict
+
+
+def _MakeTableData(issues, starred_iid_set, lower_columns,
+                   lower_group_by, users_by_id, cell_factories,
+                   related_issues, viewable_iids_set, config,
+                   context_for_all_issues,
+                   hotlist_id, sort_spec):
+  """Returns data from MakeTableData after adding additional information."""
+  table_data = table_view_helpers.MakeTableData(
+      issues, starred_iid_set, lower_columns, lower_group_by,
+      users_by_id, cell_factories, lambda issue: issue.issue_id,
+      related_issues, viewable_iids_set, config, context_for_all_issues)
+
+  for row, art in zip(table_data, issues):
+    row.issue_id = art.issue_id
+    row.local_id = art.local_id
+    row.project_name = art.project_name
+    row.project_url = framework_helpers.FormatURL(
+        None, '/p/%s' % row.project_name)
+    row.issue_ref = '%s:%d' % (art.project_name, art.local_id)
+    row.issue_clean_url = tracker_helpers.FormatRelativeIssueURL(
+        art.project_name, urls.ISSUE_DETAIL, id=art.local_id)
+    row.issue_ctx_url = tracker_helpers.FormatRelativeIssueURL(
+        art.project_name, urls.ISSUE_DETAIL,
+        id=art.local_id, sort=sort_spec, hotlist_id=hotlist_id)
+
+  return table_data
+
+
+def FilterIssues(cnxn, auth, can, issues, services):
+  # (MonorailConnection, AuthData, int, List[Issue], Services) -> List[Issue]
+  """Return a list of issues that the user is allowed to view.
+
+  Args:
+    cnxn: MonorailConnection for connection to the SQL database.
+    auth: AuthData object that identifies the logged in user.
+    can: in "canned_query" number to scope the visible issues.
+    issues: list of Issues to be filtered.
+    services: Services object for connections to backend services.
+
+  Returns:
+    A list of Issues that the user has permissions to view.
+  """
+  allowed_issues = []
+  project_ids = GetAllProjectsOfIssues(issues)
+  issue_projects = services.project.GetProjects(cnxn, project_ids)
+  configs_by_project_id = services.config.GetProjectConfigs(cnxn, project_ids)
+  perms_by_project_id = {
+      pid: permissions.GetPermissions(auth.user_pb, auth.effective_ids, p)
+      for pid, p in issue_projects.items()}
+  for issue in issues:
+    if (can == 1) or not issue.closed_timestamp:
+      issue_project = issue_projects[issue.project_id]
+      config = configs_by_project_id[issue.project_id]
+      perms = perms_by_project_id[issue.project_id]
+      granted_perms = tracker_bizobj.GetGrantedPerms(
+          issue, auth.effective_ids, config)
+      permit_view = permissions.CanViewIssue(
+          auth.effective_ids, perms,
+          issue_project, issue, granted_perms=granted_perms)
+      if permit_view:
+        allowed_issues.append(issue)
+
+  return allowed_issues
+
+
+def GetAllConfigsOfProjects(cnxn, project_ids, services):
+  """Returns a list of configs for the given list of projects."""
+  config_dict = services.config.GetProjectConfigs(cnxn, project_ids)
+  config_list = [config_dict[project_id] for project_id in project_ids]
+  return config_list
+
+
+def GetAllProjectsOfIssues(issues):
+  """Returns a list of all projects that the given issues are in."""
+  project_ids = set()
+  for issue in issues:
+    project_ids.add(issue.project_id)
+  return project_ids
+
+
+def MembersWithoutGivenIDs(hotlist, exclude_ids):
+  """Return three lists of member user IDs, with exclude_ids not in them."""
+  owner_ids = [user_id for user_id in hotlist.owner_ids
+               if user_id not in exclude_ids]
+  editor_ids = [user_id for user_id in hotlist.editor_ids
+                   if user_id not in exclude_ids]
+  follower_ids = [user_id for user_id in hotlist.follower_ids
+                     if user_id not in exclude_ids]
+
+  return owner_ids, editor_ids, follower_ids
+
+
+def MembersWithGivenIDs(hotlist, new_member_ids, role):
+  """Return three lists of member IDs with the new IDs in the right one.
+
+  Args:
+    hotlist: Hotlist PB for the project to get current members from.
+    new_member_ids: set of user IDs for members being added.
+    role: string name of the role that new_member_ids should be granted.
+
+  Returns:
+    Three lists of member IDs with new_member_ids added to the appropriate
+    list and removed from any other role.
+
+  Raises:
+    ValueError: if the role is not one of owner, committer, or contributor.
+  """
+  owner_ids, editor_ids, follower_ids = MembersWithoutGivenIDs(
+      hotlist, new_member_ids)
+
+  if role == 'owner':
+    owner_ids.extend(new_member_ids)
+  elif role == 'editor':
+    editor_ids.extend(new_member_ids)
+  elif role == 'follower':
+    follower_ids.extend(new_member_ids)
+  else:
+    raise ValueError()
+
+  return owner_ids, editor_ids, follower_ids
+
+
+def GetURLOfHotlist(cnxn, hotlist, user_service, url_for_token=False):
+    """Determines the url to be used to access the given hotlist.
+
+    Args:
+      cnxn: connection to SQL database
+      hotlist: the hotlist_pb
+      user_service: interface to user data storage
+      url_for_token: if true, url returned will use user's id
+        regardless of their user settings, for tokenization.
+
+    Returns:
+      The string url to be used when accessing this hotlist.
+    """
+    if not hotlist.owner_ids:  # Should never happen.
+      logging.error('Unowned Hotlist: id:%r, name:%r', hotlist.hotlist_id,
+                                                       hotlist.name)
+      return ''
+    owner_id = hotlist.owner_ids[0]  # only one owner allowed
+    owner = user_service.GetUser(cnxn, owner_id)
+    if owner.obscure_email or url_for_token:
+      return '/u/%d/hotlists/%s' % (owner_id, hotlist.name)
+    return (
+        '/u/%s/hotlists/%s' % (
+            owner.email, hotlist.name))
+
+
+def RemoveHotlist(cnxn, hotlist_id, services):
+  """Removes the given hotlist from the database.
+    Args:
+      hotlist_id: the id of the hotlist to be removed.
+      services: interfaces to data storage.
+  """
+  services.hotlist_star.ExpungeStars(cnxn, hotlist_id)
+  services.user.ExpungeHotlistsFromHistory(cnxn, [hotlist_id])
+  services.features.DeleteHotlist(cnxn, hotlist_id)
+
+
+# The following are used by issueentry.
+
+def InvalidParsedHotlistRefsNames(parsed_hotlist_refs, user_hotlist_pbs):
+  """Find and return all names without a corresponding hotlist so named.
+
+  Args:
+    parsed_hotlist_refs: a list of ParsedHotlistRef objects
+    user_hotlist_pbs: the hotlist protobuf objects of all hotlists
+      belonging to the user
+
+  Returns:
+    a list of invalid names; if none are found, the empty list
+  """
+  user_hotlist_names = {hotlist.name for hotlist in user_hotlist_pbs}
+  invalid_names = list()
+  for parsed_ref in parsed_hotlist_refs:
+    if parsed_ref.hotlist_name not in user_hotlist_names:
+      invalid_names.append(parsed_ref.hotlist_name)
+  return invalid_names
+
+
+def AmbiguousShortrefHotlistNames(short_refs, user_hotlist_pbs):
+  """Find and return ambiguous hotlist shortrefs' hotlist names.
+
+  A hotlist shortref is ambiguous iff there exists more than
+  hotlist with that name in the user's hotlists.
+
+  Args:
+    short_refs: a list of ParsedHotlistRef object specifying only
+      a hotlist name (user_email being none)
+    user_hotlist_pbs: the hotlist protobuf objects of all hotlists
+      belonging to the user
+
+  Returns:
+    a list of ambiguous hotlist names; if none are found, the empty list
+  """
+  ambiguous_names = set()
+  seen = set()
+  for hotlist in user_hotlist_pbs:
+    if hotlist.name in seen:
+      ambiguous_names.add(hotlist.name)
+    seen.add(hotlist.name)
+  ambiguous_from_refs = list()
+  for ref in short_refs:
+    if ref.hotlist_name in ambiguous_names:
+      ambiguous_from_refs.append(ref.hotlist_name)
+  return ambiguous_from_refs
+
+
+def InvalidParsedHotlistRefsEmails(full_refs, user_hotlist_emails_to_owners):
+  """Find and return invalid e-mails in hotlist full refs.
+
+  Args:
+    full_refs: a list of ParsedHotlistRef object specifying both
+      user_email and hotlist_name
+    user_hotlist_emails_to_owners: a dictionary having for its keys only
+      the e-mails of the owners of the hotlists the user had edit permission
+      over. (Could also be a set containing these e-mails.)
+
+  Returns:
+    A list of invalid e-mails; if none are found, the empty list.
+  """
+  parsed_emails = [pref.user_email for pref in full_refs]
+  invalid_emails = list()
+  for email in parsed_emails:
+    if email not in user_hotlist_emails_to_owners:
+      invalid_emails.append(email)
+  return invalid_emails
+
+
+def GetHotlistsOfParsedHotlistFullRefs(
+    full_refs, user_hotlist_emails_to_owners, user_hotlist_refs_to_pbs):
+  """Check that all full refs are valid.
+
+  A ref is 'invalid' if it doesn't specify one of the user's hotlists.
+
+  Args:
+    full_refs: a list of ParsedHotlistRef object specifying both
+      user_email and hotlist_name
+    user_hotlist_emails_to_owners: a dictionary having for its keys only
+      the e-mails of the owners of the hotlists the user had edit permission
+      over.
+    user_hotlist_refs_to_pbs: a dictionary mapping HotlistRefs
+      (owner_id, hotlist_name) to the corresponding hotlist protobuf object for
+      the user's hotlists
+
+  Returns:
+    A two-tuple: (list of valid refs' corresponding hotlist protobuf objects,
+                  list of invalid refs)
+
+  """
+  invalid_refs = list()
+  valid_pbs = list()
+  for parsed_ref in full_refs:
+    hotlist_ref = HotlistRef(
+        user_hotlist_emails_to_owners[parsed_ref.user_email],
+        parsed_ref.hotlist_name)
+    if hotlist_ref not in user_hotlist_refs_to_pbs:
+      invalid_refs.append(parsed_ref)
+    else:
+      valid_pbs.append(user_hotlist_refs_to_pbs[hotlist_ref])
+  return valid_pbs, invalid_refs
diff --git a/features/hotlist_views.py b/features/hotlist_views.py
new file mode 100644
index 0000000..8b17bbb
--- /dev/null
+++ b/features/hotlist_views.py
@@ -0,0 +1,92 @@
+# 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
+
+"""Classes to display hotlists in templates."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import ezt
+
+import logging
+
+from framework import framework_helpers
+from framework import permissions
+from framework import template_helpers
+
+
+class MemberView(object):
+  """EZT-view of details of how a person is participating in a project."""
+
+  def __init__(self, logged_in_user_id, member_id, user_view, hotlist,
+               effective_ids=None):
+    """Initialize a MemberView with the given information.
+
+    Args:
+      logged_in_user_id: int user ID of the viewing user, or 0 for anon.
+      member_id: int user ID of the hotlist member being viewed.
+      user_ivew: UserView object for this member
+      hotlist: Hotlist PB for the currently viewed hotlist
+      effective_ids: optional set of user IDs for this user, if supplied
+          we show the highest role that they have via any group membership.
+    """
+
+    self.viewing_self = ezt.boolean(logged_in_user_id == member_id)
+
+    self.user = user_view
+    member_qs_param = user_view.user_id
+    self.detail_url = '/u/%s/' % member_qs_param
+    self.role = framework_helpers.GetHotlistRoleName(
+        effective_ids or {member_id}, hotlist)
+
+
+class HotlistView(template_helpers.PBProxy):
+  """Wrapper class that makes it easier to display a hotlist via EZT."""
+
+  def __init__(
+      self, hotlist_pb, perms, user_auth=None,
+      viewed_user_id=None, users_by_id=None, is_starred=False):
+    super(HotlistView, self).__init__(hotlist_pb)
+
+    self.visible = permissions.CanViewHotlist(
+        user_auth.effective_ids, perms, hotlist_pb)
+
+    self.access_is_private = ezt.boolean(hotlist_pb.is_private)
+    if not hotlist_pb.owner_ids:  # Should never happen.
+      logging.error('Unowned Hotlist: id:%r, name:%r',
+        hotlist_pb.hotlist_id,
+        hotlist_pb.name)
+      self.url = ''
+      return
+    owner_id = hotlist_pb.owner_ids[0]  # only one owner allowed
+    owner = users_by_id[owner_id]
+    if owner.user.banned:
+      self.visible = False
+    if owner.obscure_email or not self.visible:
+      self.url = (
+          '/u/%d/hotlists/%s' % (owner_id, hotlist_pb.name))
+    else:
+      self.url = (
+          '/u/%s/hotlists/%s' % (
+              owner.email, hotlist_pb.name))
+
+    self.role_name = ''
+    if viewed_user_id in hotlist_pb.owner_ids:
+      self.role_name = 'owner'
+    elif any(effective_id in hotlist_pb.editor_ids for
+             effective_id in user_auth.effective_ids):
+      self.role_name = 'editor'
+
+    if users_by_id:
+      self.owners = [users_by_id[owner_id] for
+                     owner_id in hotlist_pb.owner_ids]
+      self.editors = [users_by_id[editor_id] for
+                      editor_id in hotlist_pb.editor_ids]
+    self.num_issues = len(hotlist_pb.items)
+    self.is_followed = ezt.boolean(user_auth.user_id in hotlist_pb.follower_ids)
+    # TODO(jojwang): if hotlist follower's will not be used, perhaps change
+    # from is_followed to is_member or just use is_starred
+    self.num_followers = len(hotlist_pb.follower_ids)
+    self.is_starred = ezt.boolean(is_starred)
diff --git a/features/hotlistcreate.py b/features/hotlistcreate.py
new file mode 100644
index 0000000..448697b
--- /dev/null
+++ b/features/hotlistcreate.py
@@ -0,0 +1,117 @@
+# 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
+
+"""Servlet for creating new hotlists."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+import re
+
+from features import features_constants
+from features import hotlist_helpers
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_helpers
+from framework import permissions
+from framework import servlet
+from framework import urls
+from services import features_svc
+from proto import api_pb2_v1
+
+
+_MSG_HOTLIST_NAME_NOT_AVAIL = 'You already have a hotlist with that name.'
+_MSG_MISSING_HOTLIST_NAME = 'Missing hotlist name'
+_MSG_INVALID_HOTLIST_NAME = 'Invalid hotlist name'
+_MSG_MISSING_HOTLIST_SUMMARY = 'Missing hotlist summary'
+_MSG_INVALID_ISSUES_INPUT = 'Issues input is invalid'
+_MSG_INVALID_MEMBERS_INPUT = 'One or more editor emails is not valid.'
+
+
+class HotlistCreate(servlet.Servlet):
+  """HotlistCreate shows a simple page with a form to create a hotlist."""
+
+  _PAGE_TEMPLATE = 'features/hotlist-create-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    """Check whether the user has any permission to visit this page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+    """
+    super(HotlistCreate, self).AssertBasePermission(mr)
+    if not permissions.CanCreateHotlist(mr.perms):
+      raise permissions.PermissionException(
+          'User is not allowed to create a hotlist.')
+
+  def GatherPageData(self, mr):
+    return {
+        'user_tab_mode': 'st6',
+        'initial_name': '',
+        'initial_summary': '',
+        'initial_description': '',
+        'initial_editors': '',
+        'initial_privacy': 'no',
+        }
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the hotlist create form.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: The post_data dict for the current request.
+
+    Returns:
+      String URL to redirect the user to after processing.
+    """
+    hotlist_name = post_data.get('hotlistname')
+    if not hotlist_name:
+      mr.errors.hotlistname = _MSG_MISSING_HOTLIST_NAME
+    elif not framework_bizobj.IsValidHotlistName(hotlist_name):
+      mr.errors.hotlistname = _MSG_INVALID_HOTLIST_NAME
+
+    summary = post_data.get('summary')
+    if not summary:
+      mr.errors.summary = _MSG_MISSING_HOTLIST_SUMMARY
+
+    description = post_data.get('description', '')
+
+    editors = post_data.get('editors', '')
+    editor_ids = []
+    if editors:
+      editor_emails = [
+          email.strip() for email in editors.split(',')]
+      try:
+        editor_dict = self.services.user.LookupUserIDs(mr.cnxn, editor_emails)
+        editor_ids = list(editor_dict.values())
+      except exceptions.NoSuchUserException:
+        mr.errors.editors = _MSG_INVALID_MEMBERS_INPUT
+      # In case the logged-in user specifies themselves as an editor, ignore it.
+      editor_ids = [eid for eid in editor_ids if eid != mr.auth.user_id]
+
+    is_private = post_data.get('is_private')
+
+    if not mr.errors.AnyErrors():
+      try:
+        hotlist = self.services.features.CreateHotlist(
+            mr.cnxn, hotlist_name, summary, description,
+            owner_ids=[mr.auth.user_id], editor_ids=editor_ids,
+            is_private=(is_private == 'yes'),
+            ts=int(time.time()))
+      except features_svc.HotlistAlreadyExists:
+        mr.errors.hotlistname = _MSG_HOTLIST_NAME_NOT_AVAIL
+
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(
+          mr, initial_name=hotlist_name, initial_summary=summary,
+          initial_description=description,
+          initial_editors=editors, initial_privacy=is_private)
+    else:
+      return framework_helpers.FormatAbsoluteURL(
+          mr, hotlist_helpers.GetURLOfHotlist(
+              mr.cnxn, hotlist, self.services.user),
+          include_project=False)
diff --git a/features/hotlistdetails.py b/features/hotlistdetails.py
new file mode 100644
index 0000000..d3bf3b2
--- /dev/null
+++ b/features/hotlistdetails.py
@@ -0,0 +1,123 @@
+# 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
+
+"""Servlets for hotlist details main subtab."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+
+import ezt
+
+from features import hotlist_helpers
+from framework import framework_bizobj
+from framework import framework_helpers
+from framework import servlet
+from framework import permissions
+from framework import urls
+
+_MSG_DESCRIPTION_MISSING = 'Description is missing.'
+_MSG_SUMMARY_MISSING = 'Summary is missing.'
+_MSG_NAME_MISSING = 'Hotlist name is missing.'
+_MSG_COL_SPEC_MISSING = 'Hotlist default columns are missing.'
+_MSG_HOTLIST_NAME_NOT_AVAIL = 'You already have a hotlist with that name.'
+# pylint: disable=line-too-long
+_MSG_INVALID_HOTLIST_NAME = "Invalid hotlist name. Please make sure your hotlist name begins with a letter followed by any number of letters, numbers, -'s, and .'s"
+
+
+class HotlistDetails(servlet.Servlet):
+  """A page with hotlist details and editing options."""
+
+  _PAGE_TEMPLATE = 'features/hotlist-details-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.HOTLIST_TAB_DETAILS
+
+  def AssertBasePermission(self, mr):
+    super(HotlistDetails, self).AssertBasePermission(mr)
+    if not permissions.CanViewHotlist(
+        mr.auth.effective_ids, mr.perms, mr.hotlist):
+      raise permissions.PermissionException(
+          'User is not allowed to view the hotlist details')
+
+  def GatherPageData(self, mr):
+    """Buil up a dictionary of data values to use when rendering the page."""
+    if mr.auth.user_id:
+      self.services.user.AddVisitedHotlist(
+          mr.cnxn, mr.auth.user_id, mr.hotlist_id)
+    cant_administer_hotlist = not permissions.CanAdministerHotlist(
+        mr.auth.effective_ids, mr.perms, mr.hotlist)
+
+    return {
+        'initial_summary': mr.hotlist.summary,
+        'initial_description': mr.hotlist.description,
+        'initial_name': mr.hotlist.name,
+        'initial_default_col_spec': mr.hotlist.default_col_spec,
+        'initial_is_private': ezt.boolean(mr.hotlist.is_private),
+        'cant_administer_hotlist': ezt.boolean(cant_administer_hotlist),
+        'viewing_user_page': ezt.boolean(True),
+        'new_ui_url': '%s/%s/settings' % (urls.HOTLISTS, mr.hotlist_id),
+    }
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    if not permissions.CanAdministerHotlist(
+        mr.auth.effective_ids, mr.perms, mr.hotlist):
+      raise permissions.PermissionException(
+          'User is not allowed to update hotlist settings.')
+
+    if post_data.get('deletestate') == 'true':
+      hotlist_helpers.RemoveHotlist(mr.cnxn, mr.hotlist_id, self.services)
+      return framework_helpers.FormatAbsoluteURL(
+          mr, '/u/%s/hotlists' % mr.auth.email,
+          saved=1, ts=int(time.time()), include_project=False)
+
+    (summary, description, name, default_col_spec) = self._ParseMetaData(
+        post_data, mr)
+    is_private = post_data.get('is_private') != 'no'
+
+    if not mr.errors.AnyErrors():
+      self.services.features.UpdateHotlist(
+          mr.cnxn, mr.hotlist.hotlist_id, name=name, summary=summary,
+          description=description, is_private=is_private,
+          default_col_spec=default_col_spec)
+
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(
+          mr, initial_summary=summary, initial_description=description,
+          initial_name=name, initial_default_col_spec=default_col_spec)
+    else:
+      return framework_helpers.FormatAbsoluteURL(
+          mr, '/u/%s/hotlists/%s%s' % (
+              mr.auth.user_id, mr.hotlist_id, urls.HOTLIST_DETAIL),
+          saved=1, ts=int(time.time()),
+          include_project=False)
+
+  def _ParseMetaData(self, post_data, mr):
+    """Process a POST on the hotlist metadata."""
+    summary = None
+    description = ''
+    name = None
+    default_col_spec = None
+
+    if 'summary' in post_data:
+      summary = post_data['summary']
+      if not summary:
+        mr.errors.summary = _MSG_SUMMARY_MISSING
+    if 'description' in post_data:
+      description = post_data['description']
+    if 'name' in post_data:
+      name = post_data['name']
+      if not name:
+        mr.errors.name = _MSG_NAME_MISSING
+      else:
+        if not framework_bizobj.IsValidHotlistName(name):
+          mr.errors.name = _MSG_INVALID_HOTLIST_NAME
+        elif self.services.features.LookupHotlistIDs(
+            mr.cnxn, [name], [mr.auth.user_id]) and (
+                mr.hotlist.name.lower() != name.lower()):
+          mr.errors.name = _MSG_HOTLIST_NAME_NOT_AVAIL
+    if 'default_col_spec' in post_data:
+      default_col_spec = post_data['default_col_spec']
+    return summary, description, name, default_col_spec
diff --git a/features/hotlistissues.py b/features/hotlistissues.py
new file mode 100644
index 0000000..8743772
--- /dev/null
+++ b/features/hotlistissues.py
@@ -0,0 +1,349 @@
+# 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
+
+"""Classes that implement the hotlistissues page and related forms."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import ezt
+
+import settings
+import time
+import re
+
+from businesslogic import work_env
+from features import features_bizobj
+from features import features_constants
+from features import hotlist_helpers
+from framework import exceptions
+from framework import servlet
+from framework import sorting
+from framework import permissions
+from framework import framework_helpers
+from framework import paginate
+from framework import framework_constants
+from framework import framework_views
+from framework import grid_view_helpers
+from framework import template_helpers
+from framework import timestr
+from framework import urls
+from framework import xsrf
+from services import features_svc
+from tracker import tracker_bizobj
+
+_INITIAL_ADD_ISSUES_MESSAGE = 'projectname:localID, projectname:localID, etc.'
+_MSG_INVALID_ISSUES_INPUT = (
+    'Please follow project_name:issue_id, project_name:issue_id..')
+_MSG_ISSUES_NOT_FOUND = 'One or more of your issues were not found.'
+_MSG_ISSUES_NOT_VIEWABLE = 'You lack permission to view one or more issues.'
+
+
+class HotlistIssues(servlet.Servlet):
+  """HotlistIssues is a page that shows the issues of one hotlist."""
+
+  _PAGE_TEMPLATE = 'features/hotlist-issues-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.HOTLIST_TAB_ISSUES
+
+  def AssertBasePermission(self, mr):
+    """Check that the user has permission to even visit this page."""
+    super(HotlistIssues, self).AssertBasePermission(mr)
+    try:
+      hotlist = self._GetHotlist(mr)
+    except features_svc.NoSuchHotlistException:
+      return
+    permit_view = permissions.CanViewHotlist(
+        mr.auth.effective_ids, mr.perms, hotlist)
+    if not permit_view:
+      raise permissions.PermissionException(
+        'User is not allowed to view this hotlist')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly usef info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    with mr.profiler.Phase('getting hotlist'):
+      if mr.hotlist_id is None:
+        self.abort(404, 'no hotlist specified')
+    if mr.auth.user_id:
+      self.services.user.AddVisitedHotlist(
+          mr.cnxn, mr.auth.user_id, mr.hotlist_id)
+
+    if mr.mode == 'grid':
+      page_data = self.GetGridViewData(mr)
+    else:
+      page_data = self.GetTableViewData(mr)
+
+    with mr.profiler.Phase('making page perms'):
+      owner_permissions = permissions.CanAdministerHotlist(
+          mr.auth.effective_ids, mr.perms, mr.hotlist)
+      editor_permissions = permissions.CanEditHotlist(
+          mr.auth.effective_ids, mr.perms, mr.hotlist)
+      # TODO(jojwang): each issue should have an individual
+      # SetStar status based on its project to indicate whether or not
+      # the star icon should be shown to the user.
+      page_perms = template_helpers.EZTItem(
+          EditIssue=None, SetStar=mr.auth.user_id)
+
+    allow_rerank = (not mr.group_by_spec and mr.sort_spec.startswith(
+        'rank') and (owner_permissions or editor_permissions))
+
+    user_hotlists = self.services.features.GetHotlistsByUserID(
+        mr.cnxn, mr.auth.user_id)
+    try:
+      user_hotlists.remove(self.services.features.GetHotlist(
+          mr.cnxn, mr.hotlist_id))
+    except ValueError:
+      pass
+
+    new_ui_url = '%s/%s/issues' % (urls.HOTLISTS, mr.hotlist_id)
+
+    # Note: The HotlistView is created and returned in servlet.py
+    page_data.update(
+        {
+            'owner_permissions':
+                ezt.boolean(owner_permissions),
+            'editor_permissions':
+                ezt.boolean(editor_permissions),
+            'issue_tab_mode':
+                'issueList',
+            'grid_mode':
+                ezt.boolean(mr.mode == 'grid'),
+            'list_mode':
+                ezt.boolean(mr.mode == 'list'),
+            'chart_mode':
+                ezt.boolean(mr.mode == 'chart'),
+            'page_perms':
+                page_perms,
+            'colspec':
+                mr.col_spec,
+            # monorail:6336, used in <ezt-show-columns-connector>
+            'phasespec':
+                "",
+            'allow_rerank':
+                ezt.boolean(allow_rerank),
+            'csv_link':
+                framework_helpers.FormatURL(
+                    [
+                        (name, mr.GetParam(name))
+                        for name in framework_helpers.RECOGNIZED_PARAMS
+                    ],
+                    '%d/csv' % mr.hotlist_id,
+                    num=100),
+            'is_hotlist':
+                ezt.boolean(True),
+            'col_spec':
+                mr.col_spec.lower(),
+            'viewing_user_page':
+                ezt.boolean(True),
+            # for update-issues-hotlists-dialog in
+            # issue-list-controls-top.
+            'user_issue_hotlists': [],
+            'user_remaining_hotlists':
+                user_hotlists,
+            'new_ui_url':
+                new_ui_url,
+        })
+    return page_data
+  # TODO(jojwang): implement peek issue on hover, implement starring issues
+
+  def _GetHotlist(self, mr):
+    """Retrieve the current hotlist."""
+    if mr.hotlist_id is None:
+      return None
+    try:
+      hotlist = self.services.features.GetHotlist(mr.cnxn, mr.hotlist_id)
+    except features_svc.NoSuchHotlistException:
+      self.abort(404, 'hotlist not found')
+    return hotlist
+
+  def GetTableViewData(self, mr):
+    """EZT template values to render a Table View of issues.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dictionary of page data for rendering of the Table View.
+    """
+    table_data, table_related_dict = hotlist_helpers.CreateHotlistTableData(
+        mr, mr.hotlist.items, self.services)
+    columns = mr.col_spec.split()
+    ordered_columns = [template_helpers.EZTItem(col_index=i, name=col)
+                       for i, col in enumerate(columns)]
+    table_view_data = {
+        'table_data': table_data,
+        'panels': [template_helpers.EZTItem(ordered_columns=ordered_columns)],
+        'cursor': mr.cursor or mr.preview,
+        'preview': mr.preview,
+        'default_colspec': features_constants.DEFAULT_COL_SPEC,
+        'default_results_per_page': 10,
+        'preview_on_hover': (
+            settings.enable_quick_edit and mr.auth.user_pb.preview_on_hover),
+        # token must be generated using url with userid to accommodate
+        # multiple urls for one hotlist
+        'edit_hotlist_token': xsrf.GenerateToken(
+            mr.auth.user_id,
+            hotlist_helpers.GetURLOfHotlist(
+                mr.cnxn, mr.hotlist, self.services.user,
+                url_for_token=True) + '.do'),
+        'add_local_ids': '',
+        'placeholder': _INITIAL_ADD_ISSUES_MESSAGE,
+        'add_issues_selected': ezt.boolean(False),
+        'col_spec': ''
+        }
+    table_view_data.update(table_related_dict)
+
+    return table_view_data
+
+  def ProcessFormData(self, mr, post_data):
+    if not permissions.CanEditHotlist(
+        mr.auth.effective_ids, mr.perms, mr.hotlist):
+      raise permissions.PermissionException(
+          'User is not allowed to edit this hotlist.')
+
+    hotlist_view_url = hotlist_helpers.GetURLOfHotlist(
+        mr.cnxn, mr.hotlist, self.services.user)
+    current_col_spec = post_data.get('current_col_spec')
+    default_url = framework_helpers.FormatAbsoluteURL(
+        mr, hotlist_view_url,
+        include_project=False, colspec=current_col_spec)
+    sorting.InvalidateArtValuesKeys(
+        mr.cnxn,
+        [hotlist_item.issue_id for hotlist_item
+         in mr.hotlist.items])
+
+    if post_data.get('remove') == 'true':
+      project_and_local_ids = post_data.get('remove_local_ids')
+    else:
+      project_and_local_ids = post_data.get('add_local_ids')
+      if not project_and_local_ids:
+        return default_url
+
+    selected_iids = []
+    if project_and_local_ids:
+      pattern = re.compile(features_constants.ISSUE_INPUT_REGEX)
+      if pattern.match(project_and_local_ids):
+        issue_refs_tuples = [(pair.split(':')[0].strip(),
+                          int(pair.split(':')[1].strip()))
+                             for pair in project_and_local_ids.split(',')
+                             if pair.strip()]
+        project_names = {project_name for (project_name, _) in
+                         issue_refs_tuples}
+        projects_dict = self.services.project.GetProjectsByName(
+            mr.cnxn, project_names)
+        selected_iids, _misses = self.services.issue.ResolveIssueRefs(
+            mr.cnxn, projects_dict, mr.project_name, issue_refs_tuples)
+        if (not selected_iids) or len(issue_refs_tuples) > len(selected_iids):
+          mr.errors.issues = _MSG_ISSUES_NOT_FOUND
+          # TODO(jojwang): give issues that were not found.
+      else:
+        mr.errors.issues = _MSG_INVALID_ISSUES_INPUT
+
+    try:
+      with work_env.WorkEnv(mr, self.services) as we:
+        we.GetIssuesDict(selected_iids)
+    except exceptions.NoSuchIssueException:
+      mr.errors.issues = _MSG_ISSUES_NOT_FOUND
+    except permissions.PermissionException:
+      mr.errors.issues = _MSG_ISSUES_NOT_VIEWABLE
+
+    # TODO(jojwang): fix: when there are errors, hidden column come back on
+    # the .do page but go away once the errors are fixed and the form
+    # is submitted again
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(
+          mr, add_local_ids=project_and_local_ids,
+          add_issues_selected=ezt.boolean(True), col_spec=current_col_spec)
+
+    else:
+      with work_env.WorkEnv(mr, self.services) as we:
+        if post_data.get('remove') == 'true':
+          we.RemoveIssuesFromHotlists([mr.hotlist_id], selected_iids)
+        else:
+          we.AddIssuesToHotlists([mr.hotlist_id], selected_iids, '')
+      return framework_helpers.FormatAbsoluteURL(
+          mr, hotlist_view_url, saved=1, ts=int(time.time()),
+          include_project=False, colspec=current_col_spec)
+
+  def GetGridViewData(self, mr):
+    """EZT template values to render a Table View of issues.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dictionary of page data for rendering of the Table View.
+    """
+    mr.ComputeColSpec(mr.hotlist)
+    starred_iid_set = set(self.services.issue_star.LookupStarredItemIDs(
+        mr.cnxn, mr.auth.user_id))
+    issues_list = self.services.issue.GetIssues(
+        mr.cnxn,
+        [hotlist_issue.issue_id for hotlist_issue
+         in mr.hotlist.items])
+    allowed_issues = hotlist_helpers.FilterIssues(
+        mr.cnxn, mr.auth, mr.can, issues_list, self.services)
+    issue_and_hotlist_users = tracker_bizobj.UsersInvolvedInIssues(
+        allowed_issues or []).union(features_bizobj.UsersInvolvedInHotlists(
+            [mr.hotlist]))
+    users_by_id = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user,
+        issue_and_hotlist_users)
+    hotlist_issues_project_ids = hotlist_helpers.GetAllProjectsOfIssues(
+        [issue for issue in issues_list])
+    config_list = hotlist_helpers.GetAllConfigsOfProjects(
+        mr.cnxn, hotlist_issues_project_ids, self.services)
+    harmonized_config = tracker_bizobj.HarmonizeConfigs(config_list)
+    limit = settings.max_issues_in_grid
+    grid_limited = len(allowed_issues) > limit
+    lower_cols = mr.col_spec.lower().split()
+    grid_x = (mr.x or harmonized_config.default_x_attr or '--').lower()
+    grid_y = (mr.y or harmonized_config.default_y_attr or '--').lower()
+    lower_cols.append(grid_x)
+    lower_cols.append(grid_y)
+    related_iids = set()
+    for issue in allowed_issues:
+      if 'blockedon' in lower_cols:
+        related_iids.update(issue.blocked_on_iids)
+      if 'blocking' in lower_cols:
+        related_iids.update(issue.blocking_iids)
+      if 'mergedinto' in lower_cols:
+        related_iids.add(issue.merged_into)
+    related_issues_list = self.services.issue.GetIssues(
+        mr.cnxn, list(related_iids))
+    related_issues = {issue.issue_id: issue for issue in related_issues_list}
+
+    hotlist_context_dict = {
+        hotlist_issue.issue_id: {'adder_id': hotlist_issue.adder_id,
+                                 'date_added': timestr.FormatRelativeDate(
+                                     hotlist_issue.date_added),
+                                 'note': hotlist_issue.note}
+        for hotlist_issue in mr.hotlist.items}
+
+    grid_view_data = grid_view_helpers.GetGridViewData(
+        mr, allowed_issues, harmonized_config,
+        users_by_id, starred_iid_set, grid_limited, related_issues,
+        hotlist_context_dict=hotlist_context_dict)
+
+    url_params = [(name, mr.GetParam(name)) for name in
+                  framework_helpers.RECOGNIZED_PARAMS]
+    # We are passing in None for the project_name in ArtifactPagination
+    # because we are not operating under any project.
+    grid_view_data.update({'pagination': paginate.ArtifactPagination(
+          allowed_issues,
+          mr.GetPositiveIntParam(
+              'num', features_constants.DEFAULT_RESULTS_PER_PAGE),
+          mr.GetPositiveIntParam('start'), None,
+          urls.HOTLIST_ISSUES, total_count=len(allowed_issues),
+          url_params=url_params)})
+
+    return grid_view_data
diff --git a/features/hotlistissuescsv.py b/features/hotlistissuescsv.py
new file mode 100644
index 0000000..3ae3f3b
--- /dev/null
+++ b/features/hotlistissuescsv.py
@@ -0,0 +1,62 @@
+# 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
+
+"""Implemention of the hotlist issues list output as a CSV file."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from features import hotlistissues
+from framework import framework_views
+from framework import csv_helpers
+from framework import permissions
+from framework import xsrf
+
+
+# TODO(jojwang): can be refactored even more, see similarities with
+# IssueListCsv
+class HotlistIssuesCsv(hotlistissues.HotlistIssues):
+  """HotlistIssuesCsv provides to the user a list of issues as a CSV document.
+
+  Overrides the standard HotlistIssues servlet but uses a different EZT template
+  to provide the same content as the HotlistIssues only as CSV. Adds the HTTP
+  header to offer the result as a download.
+  """
+
+  _PAGE_TEMPLATE = 'tracker/issue-list-csv.ezt'
+
+  def GatherPageData(self, mr):
+    if not mr.auth.user_id:
+      raise permissions.PermissionException(
+          'Anonymous users are not allowed to download hotlist CSV')
+
+    owner_id = mr.hotlist.owner_ids[0]  # only one owner allowed
+    users_by_id = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user,
+        [owner_id])
+    owner = users_by_id[owner_id]
+
+    # Try to validate XSRF by either user email or user ID.
+    try:
+      xsrf.ValidateToken(
+          mr.token, mr.auth.user_id,
+          '/u/%s/hotlists/%s.do' % (owner.email, mr.hotlist.name))
+    except xsrf.TokenIncorrect:
+      xsrf.ValidateToken(
+          mr.token, mr.auth.user_id,
+          '/u/%s/hotlists/%s.do' % (owner.user_id, mr.hotlist.name))
+
+    # Sets headers to allow the response to be downloaded.
+    self.content_type = 'text/csv; charset=UTF-8'
+    download_filename = 'hotlist_%d-issues.csv' % mr.hotlist_id
+    self.response.headers.add(
+        'Content-Disposition', 'attachment; filename=%s' % download_filename)
+    self.response.headers.add('X-Content-Type-Options', 'nosniff')
+
+    mr.ComputeColSpec(mr.hotlist)
+    mr.col_spec = csv_helpers.RewriteColspec(mr.col_spec)
+    page_data = hotlistissues.HotlistIssues.GatherPageData(self, mr)
+    return csv_helpers.ReformatRowsForCSV(
+        mr, page_data, '%d/csv' % mr.hotlist_id)
diff --git a/features/hotlistpeople.py b/features/hotlistpeople.py
new file mode 100644
index 0000000..1eb00ff
--- /dev/null
+++ b/features/hotlistpeople.py
@@ -0,0 +1,252 @@
+# 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
+
+"""Classes to implement the hotlistpeople page and related forms."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from features import hotlist_helpers
+from features import hotlist_views
+from framework import framework_helpers
+from framework import framework_views
+from framework import paginate
+from framework import permissions
+from framework import servlet
+from framework import urls
+from project import project_helpers
+
+MEMBERS_PER_PAGE = 50
+
+
+class HotlistPeopleList(servlet.Servlet):
+  _PAGE_TEMPLATE = 'project/people-list-page.ezt'
+  # Note: using the project's peoplelist page template. minor edits were
+  # to make it compatible with HotlistPeopleList
+  _MAIN_TAB_MODE = servlet.Servlet.HOTLIST_TAB_PEOPLE
+
+  def AssertBasePermission(self, mr):
+    super(HotlistPeopleList, self).AssertBasePermission(mr)
+    if not permissions.CanViewHotlist(
+        mr.auth.effective_ids, mr.perms, mr.hotlist):
+      raise permissions.PermissionException(
+          'User is now allowed to view the hotlist people list')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    if mr.auth.user_id:
+      self.services.user.AddVisitedHotlist(
+          mr.cnxn, mr.auth.user_id, mr.hotlist_id)
+
+    all_members = (mr.hotlist.owner_ids +
+                   mr.hotlist.editor_ids + mr.hotlist.follower_ids)
+
+    hotlist_url = hotlist_helpers.GetURLOfHotlist(
+        mr.cnxn, mr.hotlist, self.services.user)
+
+    with mr.profiler.Phase('gathering members on this page'):
+      users_by_id = framework_views.MakeAllUserViews(
+          mr.cnxn, self.services.user, all_members)
+      framework_views.RevealAllEmailsToMembers(
+          mr.cnxn, self.services, mr.auth, users_by_id, mr.project)
+
+    untrusted_user_group_proxies = []
+    # TODO(jojwang): implement FindUntrustedGroups()
+
+    with mr.profiler.Phase('making member views'):
+      owner_views = self._MakeMemberViews(mr, mr.hotlist.owner_ids, users_by_id)
+      editor_views = self._MakeMemberViews(mr, mr.hotlist.editor_ids,
+                                           users_by_id)
+      follower_views = self._MakeMemberViews(mr, mr.hotlist.follower_ids,
+                                             users_by_id)
+      all_member_views = owner_views + editor_views + follower_views
+
+    url_params = [(name, mr.GetParam(name)) for name in
+                  framework_helpers.RECOGNIZED_PARAMS]
+    # We are passing in None for the project_name because we are not operating
+    # under any project.
+    pagination = paginate.ArtifactPagination(
+        all_member_views, mr.GetPositiveIntParam('num', MEMBERS_PER_PAGE),
+        mr.GetPositiveIntParam('start'), None,
+        '%s%s' % (hotlist_url, urls.HOTLIST_PEOPLE), url_params=url_params)
+
+    offer_membership_editing = permissions.CanAdministerHotlist(
+        mr.auth.effective_ids, mr.perms, mr.hotlist)
+
+    offer_remove_self = (
+        not offer_membership_editing and
+        mr.auth.user_id and
+        mr.auth.user_id in mr.hotlist.editor_ids)
+
+    newly_added_views = [mv for mv in all_member_views
+                         if str(mv.user.user_id) in mr.GetParam('new', [])]
+
+    return {
+        'is_hotlist': ezt.boolean(True),
+        'untrusted_user_groups': untrusted_user_group_proxies,
+        'pagination': pagination,
+        'initial_add_members': '',
+        'subtab_mode': None,
+        'initially_expand_form': ezt.boolean(False),
+        'newly_added_views': newly_added_views,
+        'offer_membership_editing': ezt.boolean(offer_membership_editing),
+        'offer_remove_self': ezt.boolean(offer_remove_self),
+        'total_num_owners': len(mr.hotlist.owner_ids),
+        'check_abandonment': ezt.boolean(True),
+        'initial_new_owner_username': '',
+        'placeholder': 'new-owner-username',
+        'open_dialog': ezt.boolean(False),
+        'viewing_user_page': ezt.boolean(True),
+        'new_ui_url': '%s/%s/people' % (urls.HOTLISTS, mr.hotlist_id),
+    }
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    permit_edit = permissions.CanAdministerHotlist(
+        mr.auth.effective_ids, mr.perms, mr.hotlist)
+    can_remove_self = (
+        not permit_edit and
+        mr.auth.user_id and
+        mr.auth.user_id in mr.hotlist.editor_ids)
+    if not can_remove_self and not permit_edit:
+      raise permissions.PermissionException(
+          'User is not permitted to edit hotlist membership')
+    hotlist_url = hotlist_helpers.GetURLOfHotlist(
+        mr.cnxn, mr.hotlist, self.services.user)
+    if permit_edit:
+      if 'addbtn' in post_data:
+        return self.ProcessAddMembers(mr, post_data, hotlist_url)
+      elif 'removebtn' in post_data:
+        return self.ProcessRemoveMembers(mr, post_data, hotlist_url)
+      elif 'changeowners' in post_data:
+        return self.ProcessChangeOwnership(mr, post_data)
+    if can_remove_self:
+      if 'removeself' in post_data:
+        return self.ProcessRemoveSelf(mr, hotlist_url)
+
+  def _MakeMemberViews(self, mr, member_ids, users_by_id):
+    """Return a sorted list of MemberViews for display by EZT."""
+    member_views = [hotlist_views.MemberView(
+        mr.auth.user_id, member_id, users_by_id[member_id],
+        mr.hotlist) for member_id in member_ids]
+    member_views.sort(key=lambda mv: mv.user.email)
+    return member_views
+
+  def ProcessChangeOwnership(self, mr, post_data):
+    new_owner_id_set = project_helpers.ParseUsernames(
+        mr.cnxn, self.services.user, post_data.get('changeowners'))
+    remain_as_editor = post_data.get('becomeeditor') == 'on'
+    if len(new_owner_id_set) != 1:
+      mr.errors.transfer_ownership = (
+          'Please add one valid user email.')
+    else:
+      new_owner_id = new_owner_id_set.pop()
+      if self.services.features.LookupHotlistIDs(
+          mr.cnxn, [mr.hotlist.name], [new_owner_id]):
+        mr.errors.transfer_ownership = (
+            'This user already owns a hotlist with the same name')
+
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(
+          mr, initial_new_owner_username=post_data.get('changeowners'),
+          open_dialog=ezt.boolean(True))
+    else:
+      old_and_new_owner_ids = [new_owner_id] + mr.hotlist.owner_ids
+      (_, editor_ids, follower_ids) = hotlist_helpers.MembersWithoutGivenIDs(
+          mr.hotlist, old_and_new_owner_ids)
+      if remain_as_editor and mr.hotlist.owner_ids:
+        editor_ids.append(mr.hotlist.owner_ids[0])
+
+      self.services.features.UpdateHotlistRoles(
+          mr.cnxn, mr.hotlist_id, [new_owner_id], editor_ids, follower_ids)
+
+      hotlist = self.services.features.GetHotlist(mr.cnxn, mr.hotlist_id)
+      hotlist_url = hotlist_helpers.GetURLOfHotlist(
+        mr.cnxn, hotlist, self.services.user)
+      return framework_helpers.FormatAbsoluteURL(
+          mr,'%s%s' % (hotlist_url, urls.HOTLIST_PEOPLE),
+          saved=1, ts=int(time.time()),
+          include_project=False)
+
+  def ProcessAddMembers(self, mr, post_data, hotlist_url):
+    """Process the user's request to add members.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+      post_data: dictionary of form data
+      hotlist_url: hotlist_url to return to after data has been processed.
+
+    Returns:
+      String URL to redirect the user to after processing
+    """
+    # NOTE: using project_helpers function
+    new_member_ids = project_helpers.ParseUsernames(
+        mr.cnxn, self.services.user, post_data.get('addmembers'))
+    if not new_member_ids or not post_data.get('addmembers'):
+      mr.errors.incorrect_email_input = (
+          'Please give full emails seperated by commas.')
+    role = post_data['role']
+
+    (owner_ids, editor_ids, follower_ids) = hotlist_helpers.MembersWithGivenIDs(
+        mr.hotlist, new_member_ids, role)
+    # TODO(jojwang): implement MAX_HOTLIST_PEOPLE
+
+    if not owner_ids:
+      mr.errors.addmembers = (
+          'Cannot have a hotlist without an owner; please leave at least one.')
+
+    if mr.errors.AnyErrors():
+      add_members_str = post_data.get('addmembers', '')
+      self.PleaseCorrect(
+          mr, initial_add_members=add_members_str, initially_expand_form=True)
+    else:
+      self.services.features.UpdateHotlistRoles(
+          mr.cnxn, mr.hotlist_id, owner_ids, editor_ids, follower_ids)
+      return framework_helpers.FormatAbsoluteURL(
+          mr, '%s%s' % (
+              hotlist_url, urls.HOTLIST_PEOPLE),
+          saved=1, ts=int(time.time()),
+          new=','.join([str(u) for u in new_member_ids]),
+          include_project=False)
+
+  def ProcessRemoveMembers(self, mr, post_data, hotlist_url):
+    """Process the user's request to remove members."""
+    remove_strs = post_data.getall('remove')
+    logging.info('remove_strs = %r', remove_strs)
+    remove_ids = set(
+        self.services.user.LookupUserIDs(mr.cnxn, remove_strs).values())
+    (owner_ids, editor_ids,
+     follower_ids) = hotlist_helpers.MembersWithoutGivenIDs(
+         mr.hotlist, remove_ids)
+
+    self.services.features.UpdateHotlistRoles(
+        mr.cnxn, mr.hotlist_id, owner_ids, editor_ids, follower_ids)
+
+    return framework_helpers.FormatAbsoluteURL(
+        mr, '%s%s' % (
+              hotlist_url, urls.HOTLIST_PEOPLE),
+          saved=1, ts=int(time.time()), include_project=False)
+
+  def ProcessRemoveSelf(self, mr, hotlist_url):
+    """Process the request to remove the logged-in user."""
+    remove_ids = [mr.auth.user_id]
+
+    # This function does no permission checking; that's done by the caller.
+    (owner_ids, editor_ids,
+        follower_ids) = hotlist_helpers.MembersWithoutGivenIDs(
+            mr.hotlist, remove_ids)
+
+    self.services.features.UpdateHotlistRoles(
+        mr.cnxn, mr.hotlist_id, owner_ids, editor_ids, follower_ids)
+
+    return framework_helpers.FormatAbsoluteURL(
+        mr, '%s%s' % (
+              hotlist_url, urls.HOTLIST_PEOPLE),
+          saved=1, ts=int(time.time()), include_project=False)
diff --git a/features/inboundemail.py b/features/inboundemail.py
new file mode 100644
index 0000000..8ae095e
--- /dev/null
+++ b/features/inboundemail.py
@@ -0,0 +1,339 @@
+# 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
+
+"""Handler to process inbound email with issue comments and commands."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import email
+import logging
+import os
+import re
+import time
+import urllib
+
+import ezt
+
+from google.appengine.api import mail
+from google.appengine.ext.webapp.mail_handlers import BounceNotificationHandler
+
+import webapp2
+
+import settings
+from businesslogic import work_env
+from features import alert2issue
+from features import commitlogcommands
+from features import notify_helpers
+from framework import authdata
+from framework import emailfmt
+from framework import exceptions
+from framework import framework_constants
+from framework import monorailcontext
+from framework import permissions
+from framework import sql
+from framework import template_helpers
+from proto import project_pb2
+from tracker import tracker_helpers
+
+
+TEMPLATE_PATH_BASE = framework_constants.TEMPLATE_PATH
+
+MSG_TEMPLATES = {
+    'banned': 'features/inboundemail-banned.ezt',
+    'body_too_long': 'features/inboundemail-body-too-long.ezt',
+    'project_not_found': 'features/inboundemail-project-not-found.ezt',
+    'not_a_reply': 'features/inboundemail-not-a-reply.ezt',
+    'no_account': 'features/inboundemail-no-account.ezt',
+    'no_artifact': 'features/inboundemail-no-artifact.ezt',
+    'no_perms': 'features/inboundemail-no-perms.ezt',
+    'replies_disabled': 'features/inboundemail-replies-disabled.ezt',
+    }
+
+
+class InboundEmail(webapp2.RequestHandler):
+  """Servlet to handle inbound email messages."""
+
+  def __init__(self, request, response, services=None, *args, **kwargs):
+    super(InboundEmail, self).__init__(request, response, *args, **kwargs)
+    self.services = services or self.app.config.get('services')
+    self._templates = {}
+    for name, template_path in MSG_TEMPLATES.items():
+      self._templates[name] = template_helpers.MonorailTemplate(
+          TEMPLATE_PATH_BASE + template_path,
+          compress_whitespace=False, base_format=ezt.FORMAT_RAW)
+
+  def get(self, project_addr=None):
+    logging.info('\n\n\nGET for InboundEmail and project_addr is %r',
+                 project_addr)
+    self.Handler(mail.InboundEmailMessage(self.request.body),
+                 urllib.unquote(project_addr))
+
+  def post(self, project_addr=None):
+    logging.info('\n\n\nPOST for InboundEmail and project_addr is %r',
+                 project_addr)
+    self.Handler(mail.InboundEmailMessage(self.request.body),
+                 urllib.unquote(project_addr))
+
+  def Handler(self, inbound_email_message, project_addr):
+    """Process an inbound email message."""
+    msg = inbound_email_message.original
+    email_tasks = self.ProcessMail(msg, project_addr)
+
+    if email_tasks:
+      notify_helpers.AddAllEmailTasks(email_tasks)
+
+  def ProcessMail(self, msg, project_addr):
+    """Process an inbound email message."""
+    # TODO(jrobbins): If the message is HUGE, don't even try to parse
+    # it. Silently give up.
+
+    (from_addr, to_addrs, cc_addrs, references, incident_id, subject,
+     body) = emailfmt.ParseEmailMessage(msg)
+
+    logging.info('Proj addr:   %r', project_addr)
+    logging.info('From addr:   %r', from_addr)
+    logging.info('Subject:     %r', subject)
+    logging.info('To:          %r', to_addrs)
+    logging.info('Cc:          %r', cc_addrs)
+    logging.info('References:  %r', references)
+    logging.info('Incident Id: %r', incident_id)
+    logging.info('Body:        %r', body)
+
+    # If message body is very large, reject it and send an error email.
+    if emailfmt.IsBodyTooBigToParse(body):
+      return _MakeErrorMessageReplyTask(
+          project_addr, from_addr, self._templates['body_too_long'])
+
+    # Make sure that the project reply-to address is in the To: line.
+    if not emailfmt.IsProjectAddressOnToLine(project_addr, to_addrs):
+      return None
+
+    project_name, verb, trooper_queue = emailfmt.IdentifyProjectVerbAndLabel(
+        project_addr)
+
+    is_alert = bool(verb and verb.lower() == 'alert')
+    error_addr = from_addr
+    local_id = None
+    author_addr = from_addr
+
+    if is_alert:
+      error_addr = settings.alert_escalation_email
+      author_addr = settings.alert_service_account
+    else:
+      local_id = emailfmt.IdentifyIssue(project_name, subject)
+      if not local_id:
+        logging.info('Could not identify issue: %s %s', project_addr, subject)
+        # No error message, because message was probably not intended for us.
+        return None
+
+    cnxn = sql.MonorailConnection()
+    if self.services.cache_manager:
+      self.services.cache_manager.DoDistributedInvalidation(cnxn)
+
+    project = self.services.project.GetProjectByName(cnxn, project_name)
+    # Authenticate the author_addr and perm check.
+    try:
+      mc = monorailcontext.MonorailContext(
+          self.services, cnxn=cnxn, requester=author_addr, autocreate=is_alert)
+      mc.LookupLoggedInUserPerms(project)
+    except exceptions.NoSuchUserException:
+      return _MakeErrorMessageReplyTask(
+          project_addr, error_addr, self._templates['no_account'])
+
+    # TODO(zhangtiff): Add separate email templates for alert error cases.
+    if not project or project.state != project_pb2.ProjectState.LIVE:
+      return _MakeErrorMessageReplyTask(
+          project_addr, error_addr, self._templates['project_not_found'])
+
+    if not project.process_inbound_email:
+      return _MakeErrorMessageReplyTask(
+          project_addr, error_addr, self._templates['replies_disabled'],
+          project_name=project_name)
+
+    # Verify that this is a reply to a notification that we could have sent.
+    is_development = os.environ['SERVER_SOFTWARE'].startswith('Development')
+    if not (is_alert or is_development):
+      for ref in references:
+        if emailfmt.ValidateReferencesHeader(ref, project, from_addr, subject):
+          break  # Found a message ID that we could have sent.
+        if emailfmt.ValidateReferencesHeader(
+            ref, project, from_addr.lower(), subject):
+          break  # Also match all-lowercase from-address.
+      else: # for-else: if loop completes with no valid reference found.
+        return _MakeErrorMessageReplyTask(
+            project_addr, from_addr, self._templates['not_a_reply'])
+
+    # Note: If the issue summary line is changed, a new thread is created,
+    # and replies to the old thread will no longer work because the subject
+    # line hash will not match, which seems reasonable.
+
+    if mc.auth.user_pb.banned:
+      logging.info('Banned user %s tried to post to %s',
+                   from_addr, project_addr)
+      return _MakeErrorMessageReplyTask(
+          project_addr, error_addr, self._templates['banned'])
+
+    # If the email is an alert, switch to the alert handling path.
+    if is_alert:
+      alert2issue.ProcessEmailNotification(
+          self.services, cnxn, project, project_addr, from_addr,
+          mc.auth, subject, body, incident_id, msg, trooper_queue)
+      return None
+
+    # This email is a response to an email about a comment.
+    self.ProcessIssueReply(
+        mc, project, local_id, project_addr, body)
+
+    return None
+
+  def ProcessIssueReply(
+      self, mc, project, local_id, project_addr, body):
+    """Examine an issue reply email body and add a comment to the issue.
+
+    Args:
+      mc: MonorailContext with cnxn and the requester email, user_id, perms.
+      project: Project PB for the project containing the issue.
+      local_id: int ID of the issue being replied to.
+      project_addr: string email address used for outbound emails from
+          that project.
+      body: string email body text of the reply email.
+
+    Returns:
+      A list of follow-up work items, e.g., to notify other users of
+      the new comment, or to notify the user that their reply was not
+      processed.
+
+    Side-effect:
+      Adds a new comment to the issue, if no error is reported.
+    """
+    try:
+      issue = self.services.issue.GetIssueByLocalID(
+          mc.cnxn, project.project_id, local_id)
+    except exceptions.NoSuchIssueException:
+      issue = None
+
+    if not issue or issue.deleted:
+      # The referenced issue was not found, e.g., it might have been
+      # deleted, or someone messed with the subject line.  Reject it.
+      return _MakeErrorMessageReplyTask(
+          project_addr, mc.auth.email, self._templates['no_artifact'],
+          artifact_phrase='issue %d' % local_id,
+          project_name=project.project_name)
+
+    can_view = mc.perms.CanUsePerm(
+        permissions.VIEW, mc.auth.effective_ids, project,
+        permissions.GetRestrictions(issue))
+    can_comment = mc.perms.CanUsePerm(
+        permissions.ADD_ISSUE_COMMENT, mc.auth.effective_ids, project,
+        permissions.GetRestrictions(issue))
+    if not can_view or not can_comment:
+      return _MakeErrorMessageReplyTask(
+          project_addr, mc.auth.email, self._templates['no_perms'],
+          artifact_phrase='issue %d' % local_id,
+          project_name=project.project_name)
+
+    # TODO(jrobbins): if the user does not have EDIT_ISSUE and the inbound
+    # email tries to make an edit, send back an error message.
+
+    lines = body.strip().split('\n')
+    uia = commitlogcommands.UpdateIssueAction(local_id)
+    uia.Parse(mc.cnxn, project.project_name, mc.auth.user_id, lines,
+              self.services, strip_quoted_lines=True)
+    uia.Run(mc, self.services)
+
+
+def _MakeErrorMessageReplyTask(
+    project_addr, sender_addr, template, **callers_page_data):
+  """Return a new task to send an error message email.
+
+  Args:
+    project_addr: string email address that the inbound email was delivered to.
+    sender_addr: string email address of user who sent the email that we could
+        not process.
+    template: EZT template used to generate the email error message.  The
+        first line of this generated text will be used as the subject line.
+    callers_page_data: template data dict for body of the message.
+
+  Returns:
+    A list with a single Email task that can be enqueued to
+    actually send the email.
+
+  Raises:
+    ValueError: if the template does begin with a "Subject:" line.
+  """
+  email_data = {
+      'project_addr': project_addr,
+      'sender_addr': sender_addr
+      }
+  email_data.update(callers_page_data)
+
+  generated_lines = template.GetResponse(email_data)
+  subject, body = generated_lines.split('\n', 1)
+  if subject.startswith('Subject: '):
+    subject = subject[len('Subject: '):]
+  else:
+    raise ValueError('Email template does not begin with "Subject:" line.')
+
+  email_task = dict(to=sender_addr, subject=subject, body=body,
+                    from_addr=emailfmt.NoReplyAddress())
+  logging.info('sending email error reply: %r', email_task)
+
+  return [email_task]
+
+
+BAD_WRAP_RE = re.compile('=\r\n')
+BAD_EQ_RE = re.compile('=3D')
+
+class BouncedEmail(BounceNotificationHandler):
+  """Handler to notice when email to given user is bouncing."""
+
+  # For docs on AppEngine's bounce email handling, see:
+  # https://cloud.google.com/appengine/docs/python/mail/bounce
+  # Source code is in file:
+  # google_appengine/google/appengine/ext/webapp/mail_handlers.py
+
+  def post(self):
+    try:
+      super(BouncedEmail, self).post()
+    except AttributeError:
+      # Work-around for
+      # https://code.google.com/p/googleappengine/issues/detail?id=13512
+      raw_message = self.request.POST.get('raw-message')
+      logging.info('raw_message %r', raw_message)
+      raw_message = BAD_WRAP_RE.sub('', raw_message)
+      raw_message = BAD_EQ_RE.sub('=', raw_message)
+      logging.info('fixed raw_message %r', raw_message)
+      mime_message = email.message_from_string(raw_message)
+      logging.info('get_payload gives %r', mime_message.get_payload())
+      self.request.POST['raw-message'] = mime_message
+      super(BouncedEmail, self).post()  # Retry with mime_message
+
+
+  def receive(self, bounce_message):
+    email_addr = bounce_message.original.get('to')
+    logging.info('Bounce was sent to: %r', email_addr)
+
+    # TODO(crbug.com/monorail/8727): The problem is likely no longer happening.
+    # but we are adding permanent logging so we don't have to keep adding
+    # expriring logpoints.
+    if '@intel' in email_addr:  # both intel.com and intel-partner.
+      logging.info(
+          'bounce message: %s', bounce_message.notification.get('text'))
+
+    app_config = webapp2.WSGIApplication.app.config
+    services = app_config['services']
+    cnxn = sql.MonorailConnection()
+
+    try:
+      user_id = services.user.LookupUserID(cnxn, email_addr)
+      user = services.user.GetUser(cnxn, user_id)
+      user.email_bounce_timestamp = int(time.time())
+      services.user.UpdateUser(cnxn, user_id, user)
+    except exceptions.NoSuchUserException:
+      logging.info('User %r not found, ignoring', email_addr)
+      logging.info('Received bounce post ... [%s]', self.request)
+      logging.info('Bounce original: %s', bounce_message.original)
+      logging.info('Bounce notification: %s', bounce_message.notification)
diff --git a/features/notify.py b/features/notify.py
new file mode 100644
index 0000000..c285c76
--- /dev/null
+++ b/features/notify.py
@@ -0,0 +1,1055 @@
+# 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
+
+"""Task handlers for email notifications of issue changes.
+
+Email notificatons are sent when an issue changes, an issue that is blocking
+another issue changes, or a bulk edit is done.  The users notified include
+the project-wide mailing list, issue owners, cc'd users, starrers,
+also-notify addresses, and users who have saved queries with email notification
+set.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import json
+import logging
+import os
+
+import ezt
+
+from google.appengine.api import mail
+from google.appengine.runtime import apiproxy_errors
+
+import settings
+from features import autolink
+from features import notify_helpers
+from features import notify_reasons
+from framework import authdata
+from framework import emailfmt
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import jsonfeed
+from framework import monorailrequest
+from framework import permissions
+from framework import template_helpers
+from framework import urls
+from tracker import tracker_bizobj
+from tracker import tracker_helpers
+from tracker import tracker_views
+from proto import tracker_pb2
+
+
+class NotifyIssueChangeTask(notify_helpers.NotifyTaskBase):
+  """JSON servlet that notifies appropriate users after an issue change."""
+
+  _EMAIL_TEMPLATE = 'tracker/issue-change-notification-email.ezt'
+  _LINK_ONLY_EMAIL_TEMPLATE = (
+      'tracker/issue-change-notification-email-link-only.ezt')
+
+  def HandleRequest(self, mr):
+    """Process the task to notify users after an issue change.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+
+    Returns:
+      Results dictionary in JSON format which is useful just for debugging.
+      The main goal is the side-effect of sending emails.
+    """
+    issue_id = mr.GetPositiveIntParam('issue_id')
+    if not issue_id:
+      return {
+          'params': {},
+          'notified': [],
+          'message': 'Cannot proceed without a valid issue ID.',
+      }
+    commenter_id = mr.GetPositiveIntParam('commenter_id')
+    seq_num = mr.seq
+    omit_ids = [commenter_id]
+    hostport = mr.GetParam('hostport')
+    try:
+      old_owner_id = mr.GetPositiveIntParam('old_owner_id')
+    except Exception:
+      old_owner_id = framework_constants.NO_USER_SPECIFIED
+    send_email = bool(mr.GetIntParam('send_email'))
+    comment_id = mr.GetPositiveIntParam('comment_id')
+    params = dict(
+        issue_id=issue_id, commenter_id=commenter_id,
+        seq_num=seq_num, hostport=hostport, old_owner_id=old_owner_id,
+        omit_ids=omit_ids, send_email=send_email, comment_id=comment_id)
+
+    logging.info('issue change params are %r', params)
+    # TODO(jrobbins): Re-enable the issue cache for notifications after
+    # the stale issue defect (monorail:2514) is 100% resolved.
+    issue = self.services.issue.GetIssue(mr.cnxn, issue_id, use_cache=False)
+    project = self.services.project.GetProject(mr.cnxn, issue.project_id)
+    config = self.services.config.GetProjectConfig(mr.cnxn, issue.project_id)
+
+    if issue.is_spam:
+      # Don't send email for spam issues.
+      return {
+          'params': params,
+          'notified': [],
+      }
+
+    all_comments = self.services.issue.GetCommentsForIssue(
+        mr.cnxn, issue.issue_id)
+    if comment_id:
+      logging.info('Looking up comment by comment_id')
+      for c in all_comments:
+        if c.id == comment_id:
+          comment = c
+          logging.info('Comment was found by comment_id')
+          break
+      else:
+        raise ValueError('Comment %r was not found' % comment_id)
+    else:
+      logging.info('Looking up comment by seq_num')
+      comment = all_comments[seq_num]
+
+    # Only issues that any contributor could view sent to mailing lists.
+    contributor_could_view = permissions.CanViewIssue(
+        set(), permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET,
+        project, issue)
+    starrer_ids = self.services.issue_star.LookupItemStarrers(
+        mr.cnxn, issue.issue_id)
+    users_by_id = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user,
+        tracker_bizobj.UsersInvolvedInIssues([issue]), [old_owner_id],
+        tracker_bizobj.UsersInvolvedInComment(comment),
+        issue.cc_ids, issue.derived_cc_ids, starrer_ids, omit_ids)
+
+    # Make followup tasks to send emails
+    tasks = []
+    if send_email:
+      tasks = self._MakeEmailTasks(
+          mr.cnxn, project, issue, config, old_owner_id, users_by_id,
+          all_comments, comment, starrer_ids, contributor_could_view,
+          hostport, omit_ids, mr.perms)
+
+    notified = notify_helpers.AddAllEmailTasks(tasks)
+
+    return {
+        'params': params,
+        'notified': notified,
+        }
+
+  def _MakeEmailTasks(
+      self, cnxn, project, issue, config, old_owner_id,
+      users_by_id, all_comments, comment, starrer_ids,
+      contributor_could_view, hostport, omit_ids, perms):
+    """Formulate emails to be sent."""
+    detail_url = framework_helpers.IssueCommentURL(
+        hostport, project, issue.local_id, seq_num=comment.sequence)
+
+    # TODO(jrobbins): avoid the need to make a MonorailRequest object.
+    mr = monorailrequest.MonorailRequest(self.services)
+    mr.project_name = project.project_name
+    mr.project = project
+    mr.perms = perms
+
+    # We do not autolink in the emails, so just use an empty
+    # registry of autolink rules.
+    # TODO(jrobbins): offer users an HTML email option w/ autolinks.
+    autolinker = autolink.Autolink()
+    was_created = ezt.boolean(comment.sequence == 0)
+
+    email_data = {
+        # Pass open_related and closed_related into this method and to
+        # the issue view so that we can show it on new issue email.
+        'issue': tracker_views.IssueView(issue, users_by_id, config),
+        'summary': issue.summary,
+        'comment': tracker_views.IssueCommentView(
+            project.project_name, comment, users_by_id,
+            autolinker, {}, mr, issue),
+        'comment_text': comment.content,
+        'detail_url': detail_url,
+        'was_created': was_created,
+        }
+
+    # Generate three versions of email body: link-only is just the link,
+    # non-members see some obscured email addresses, and members version has
+    # all full email addresses exposed.
+    body_link_only = self.link_only_email_template.GetResponse(
+      {'detail_url': detail_url, 'was_created': was_created})
+    body_for_non_members = self.email_template.GetResponse(email_data)
+    framework_views.RevealAllEmails(users_by_id)
+    email_data['comment'] = tracker_views.IssueCommentView(
+        project.project_name, comment, users_by_id,
+        autolinker, {}, mr, issue)
+    body_for_members = self.email_template.GetResponse(email_data)
+
+    logging.info('link-only body is:\n%r' % body_link_only)
+    logging.info('body for non-members is:\n%r' % body_for_non_members)
+    logging.info('body for members is:\n%r' % body_for_members)
+
+    commenter_email = users_by_id[comment.user_id].email
+    omit_addrs = set([commenter_email] +
+                     [users_by_id[omit_id].email for omit_id in omit_ids])
+
+    auth = authdata.AuthData.FromUserID(
+        cnxn, comment.user_id, self.services)
+    commenter_in_project = framework_bizobj.UserIsInProject(
+        project, auth.effective_ids)
+    noisy = tracker_helpers.IsNoisy(len(all_comments) - 1, len(starrer_ids))
+
+    # Give each user a bullet-list of all the reasons that apply for that user.
+    group_reason_list = notify_reasons.ComputeGroupReasonList(
+        cnxn, self.services, project, issue, config, users_by_id,
+        omit_addrs, contributor_could_view, noisy=noisy,
+        starrer_ids=starrer_ids, old_owner_id=old_owner_id,
+        commenter_in_project=commenter_in_project)
+
+    commenter_view = users_by_id[comment.user_id]
+    detail_url = framework_helpers.FormatAbsoluteURLForDomain(
+        hostport, issue.project_name, urls.ISSUE_DETAIL,
+        id=issue.local_id)
+    email_tasks = notify_helpers.MakeBulletedEmailWorkItems(
+        group_reason_list, issue, body_link_only, body_for_non_members,
+        body_for_members, project, hostport, commenter_view, detail_url,
+        seq_num=comment.sequence)
+
+    return email_tasks
+
+
+class NotifyBlockingChangeTask(notify_helpers.NotifyTaskBase):
+  """JSON servlet that notifies appropriate users after a blocking change."""
+
+  _EMAIL_TEMPLATE = 'tracker/issue-blocking-change-notification-email.ezt'
+  _LINK_ONLY_EMAIL_TEMPLATE = (
+      'tracker/issue-change-notification-email-link-only.ezt')
+
+  def HandleRequest(self, mr):
+    """Process the task to notify users after an issue blocking change.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+
+    Returns:
+      Results dictionary in JSON format which is useful just for debugging.
+      The main goal is the side-effect of sending emails.
+    """
+    issue_id = mr.GetPositiveIntParam('issue_id')
+    if not issue_id:
+      return {
+          'params': {},
+          'notified': [],
+          'message': 'Cannot proceed without a valid issue ID.',
+      }
+    commenter_id = mr.GetPositiveIntParam('commenter_id')
+    omit_ids = [commenter_id]
+    hostport = mr.GetParam('hostport')
+    delta_blocker_iids = mr.GetIntListParam('delta_blocker_iids')
+    send_email = bool(mr.GetIntParam('send_email'))
+    params = dict(
+        issue_id=issue_id, commenter_id=commenter_id,
+        hostport=hostport, delta_blocker_iids=delta_blocker_iids,
+        omit_ids=omit_ids, send_email=send_email)
+
+    logging.info('blocking change params are %r', params)
+    issue = self.services.issue.GetIssue(mr.cnxn, issue_id)
+    if issue.is_spam:
+      return {
+        'params': params,
+        'notified': [],
+        }
+
+    upstream_issues = self.services.issue.GetIssues(
+        mr.cnxn, delta_blocker_iids)
+    logging.info('updating ids %r', [up.local_id for up in upstream_issues])
+    upstream_projects = tracker_helpers.GetAllIssueProjects(
+        mr.cnxn, upstream_issues, self.services.project)
+    upstream_configs = self.services.config.GetProjectConfigs(
+        mr.cnxn, list(upstream_projects.keys()))
+
+    users_by_id = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user, [commenter_id])
+    commenter_view = users_by_id[commenter_id]
+
+    tasks = []
+    if send_email:
+      for upstream_issue in upstream_issues:
+        one_issue_email_tasks = self._ProcessUpstreamIssue(
+            mr.cnxn, upstream_issue,
+            upstream_projects[upstream_issue.project_id],
+            upstream_configs[upstream_issue.project_id],
+            issue, omit_ids, hostport, commenter_view)
+        tasks.extend(one_issue_email_tasks)
+
+    notified = notify_helpers.AddAllEmailTasks(tasks)
+
+    return {
+        'params': params,
+        'notified': notified,
+        }
+
+  def _ProcessUpstreamIssue(
+      self, cnxn, upstream_issue, upstream_project, upstream_config,
+      issue, omit_ids, hostport, commenter_view):
+    """Compute notifications for one upstream issue that is now blocking."""
+    upstream_detail_url = framework_helpers.FormatAbsoluteURLForDomain(
+        hostport, upstream_issue.project_name, urls.ISSUE_DETAIL,
+        id=upstream_issue.local_id)
+    logging.info('upstream_detail_url = %r', upstream_detail_url)
+    detail_url = framework_helpers.FormatAbsoluteURLForDomain(
+        hostport, issue.project_name, urls.ISSUE_DETAIL,
+        id=issue.local_id)
+
+    # Only issues that any contributor could view are sent to mailing lists.
+    contributor_could_view = permissions.CanViewIssue(
+        set(), permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET,
+        upstream_project, upstream_issue)
+
+    # Now construct the e-mail to send
+
+    # Note: we purposely do not notify users who starred an issue
+    # about changes in blocking.
+    users_by_id = framework_views.MakeAllUserViews(
+        cnxn, self.services.user,
+        tracker_bizobj.UsersInvolvedInIssues([upstream_issue]), omit_ids)
+
+    is_blocking = upstream_issue.issue_id in issue.blocked_on_iids
+
+    email_data = {
+        'issue': tracker_views.IssueView(
+            upstream_issue, users_by_id, upstream_config),
+        'summary': upstream_issue.summary,
+        'detail_url': upstream_detail_url,
+        'is_blocking': ezt.boolean(is_blocking),
+        'downstream_issue_ref': tracker_bizobj.FormatIssueRef(
+            (None, issue.local_id)),
+        'downstream_issue_url': detail_url,
+        }
+
+    # TODO(jrobbins): Generate two versions of email body: members
+    # vesion has other member full email addresses exposed.  But, don't
+    # expose too many as we iterate through upstream projects.
+    body_link_only = self.link_only_email_template.GetResponse(
+        {'detail_url': upstream_detail_url, 'was_created': ezt.boolean(False)})
+    body = self.email_template.GetResponse(email_data)
+
+    omit_addrs = {users_by_id[omit_id].email for omit_id in omit_ids}
+
+    # Get the transitive set of owners and Cc'd users, and their UserView's.
+    # Give each user a bullet-list of all the reasons that apply for that user.
+    # Starrers are not notified of blocking changes to reduce noise.
+    group_reason_list = notify_reasons.ComputeGroupReasonList(
+        cnxn, self.services, upstream_project, upstream_issue,
+        upstream_config, users_by_id, omit_addrs, contributor_could_view)
+    one_issue_email_tasks = notify_helpers.MakeBulletedEmailWorkItems(
+        group_reason_list, upstream_issue, body_link_only, body, body,
+        upstream_project, hostport, commenter_view, detail_url)
+
+    return one_issue_email_tasks
+
+
+class NotifyBulkChangeTask(notify_helpers.NotifyTaskBase):
+  """JSON servlet that notifies appropriate users after a bulk edit."""
+
+  _EMAIL_TEMPLATE = 'tracker/issue-bulk-change-notification-email.ezt'
+
+  def HandleRequest(self, mr):
+    """Process the task to notify users after an issue blocking change.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+
+    Returns:
+      Results dictionary in JSON format which is useful just for debugging.
+      The main goal is the side-effect of sending emails.
+    """
+    issue_ids = mr.GetIntListParam('issue_ids')
+    hostport = mr.GetParam('hostport')
+    if not issue_ids:
+      return {
+          'params': {},
+          'notified': [],
+          'message': 'Cannot proceed without a valid issue IDs.',
+      }
+
+    old_owner_ids = mr.GetIntListParam('old_owner_ids')
+    comment_text = mr.GetParam('comment_text')
+    commenter_id = mr.GetPositiveIntParam('commenter_id')
+    amendments = mr.GetParam('amendments')
+    send_email = bool(mr.GetIntParam('send_email'))
+    params = dict(
+        issue_ids=issue_ids, commenter_id=commenter_id, hostport=hostport,
+        old_owner_ids=old_owner_ids, comment_text=comment_text,
+        send_email=send_email, amendments=amendments)
+
+    logging.info('bulk edit params are %r', params)
+    issues = self.services.issue.GetIssues(mr.cnxn, issue_ids)
+    # TODO(jrobbins): For cross-project bulk edits, prefetch all relevant
+    # projects and configs and pass a dict of them to subroutines.  For
+    # now, all issue must be in the same project.
+    project_id = issues[0].project_id
+    project = self.services.project.GetProject(mr.cnxn, project_id)
+    config = self.services.config.GetProjectConfig(mr.cnxn, project_id)
+    issues = [issue for issue in issues if not issue.is_spam]
+    anon_perms = permissions.GetPermissions(None, set(), project)
+
+    users_by_id = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user, [commenter_id])
+    ids_in_issues = {}
+    starrers = {}
+
+    non_private_issues = []
+    for issue, old_owner_id in zip(issues, old_owner_ids):
+      # TODO(jrobbins): use issue_id consistently rather than local_id.
+      starrers[issue.local_id] = self.services.issue_star.LookupItemStarrers(
+          mr.cnxn, issue.issue_id)
+      named_ids = set()  # users named in user-value fields that notify.
+      for fd in config.field_defs:
+        named_ids.update(notify_reasons.ComputeNamedUserIDsToNotify(
+            issue.field_values, fd))
+      direct, indirect = self.services.usergroup.ExpandAnyGroupEmailRecipients(
+          mr.cnxn,
+          list(issue.cc_ids) + list(issue.derived_cc_ids) +
+          [issue.owner_id, old_owner_id, issue.derived_owner_id] +
+          list(named_ids))
+      ids_in_issues[issue.local_id] = set(starrers[issue.local_id])
+      ids_in_issues[issue.local_id].update(direct)
+      ids_in_issues[issue.local_id].update(indirect)
+      ids_in_issue_needing_views = (
+          ids_in_issues[issue.local_id] |
+          tracker_bizobj.UsersInvolvedInIssues([issue]))
+      new_ids_in_issue = [user_id for user_id in ids_in_issue_needing_views
+                          if user_id not in users_by_id]
+      users_by_id.update(
+          framework_views.MakeAllUserViews(
+              mr.cnxn, self.services.user, new_ids_in_issue))
+
+      anon_can_view = permissions.CanViewIssue(
+          set(), anon_perms, project, issue)
+      if anon_can_view:
+        non_private_issues.append(issue)
+
+    commenter_view = users_by_id[commenter_id]
+    omit_addrs = {commenter_view.email}
+
+    tasks = []
+    if send_email:
+      email_tasks = self._BulkEditEmailTasks(
+          mr.cnxn, issues, old_owner_ids, omit_addrs, project,
+          non_private_issues, users_by_id, ids_in_issues, starrers,
+          commenter_view, hostport, comment_text, amendments, config)
+      tasks = email_tasks
+
+    notified = notify_helpers.AddAllEmailTasks(tasks)
+    return {
+        'params': params,
+        'notified': notified,
+        }
+
+  def _BulkEditEmailTasks(
+      self, cnxn, issues, old_owner_ids, omit_addrs, project,
+      non_private_issues, users_by_id, ids_in_issues, starrers,
+      commenter_view, hostport, comment_text, amendments, config):
+    """Generate Email PBs to notify interested users after a bulk edit."""
+    # 1. Get the user IDs of everyone who could be notified,
+    # and make all their user proxies. Also, build a dictionary
+    # of all the users to notify and the issues that they are
+    # interested in.  Also, build a dictionary of additional email
+    # addresses to notify and the issues to notify them of.
+    users_by_id = {}
+    ids_to_notify_of_issue = {}
+    additional_addrs_to_notify_of_issue = collections.defaultdict(list)
+
+    users_to_queries = notify_reasons.GetNonOmittedSubscriptions(
+        cnxn, self.services, [project.project_id], {})
+    config = self.services.config.GetProjectConfig(
+        cnxn, project.project_id)
+    for issue, old_owner_id in zip(issues, old_owner_ids):
+      issue_participants = set(
+          [tracker_bizobj.GetOwnerId(issue), old_owner_id] +
+          tracker_bizobj.GetCcIds(issue))
+      # users named in user-value fields that notify.
+      for fd in config.field_defs:
+        issue_participants.update(
+            notify_reasons.ComputeNamedUserIDsToNotify(issue.field_values, fd))
+      for user_id in ids_in_issues[issue.local_id]:
+        # TODO(jrobbins): implement batch GetUser() for speed.
+        if not user_id:
+          continue
+        auth = authdata.AuthData.FromUserID(
+            cnxn, user_id, self.services)
+        if (auth.user_pb.notify_issue_change and
+            not auth.effective_ids.isdisjoint(issue_participants)):
+          ids_to_notify_of_issue.setdefault(user_id, []).append(issue)
+        elif (auth.user_pb.notify_starred_issue_change and
+              user_id in starrers[issue.local_id]):
+          # Skip users who have starred issues that they can no longer view.
+          starrer_perms = permissions.GetPermissions(
+              auth.user_pb, auth.effective_ids, project)
+          granted_perms = tracker_bizobj.GetGrantedPerms(
+              issue, auth.effective_ids, config)
+          starrer_can_view = permissions.CanViewIssue(
+              auth.effective_ids, starrer_perms, project, issue,
+              granted_perms=granted_perms)
+          if starrer_can_view:
+            ids_to_notify_of_issue.setdefault(user_id, []).append(issue)
+        logging.info(
+            'ids_to_notify_of_issue[%s] = %s',
+            user_id,
+            [i.local_id for i in ids_to_notify_of_issue.get(user_id, [])])
+
+      # Find all subscribers that should be notified.
+      subscribers_to_consider = notify_reasons.EvaluateSubscriptions(
+          cnxn, issue, users_to_queries, self.services, config)
+      for sub_id in subscribers_to_consider:
+        auth = authdata.AuthData.FromUserID(cnxn, sub_id, self.services)
+        sub_perms = permissions.GetPermissions(
+            auth.user_pb, auth.effective_ids, project)
+        granted_perms = tracker_bizobj.GetGrantedPerms(
+            issue, auth.effective_ids, config)
+        sub_can_view = permissions.CanViewIssue(
+            auth.effective_ids, sub_perms, project, issue,
+            granted_perms=granted_perms)
+        if sub_can_view:
+          ids_to_notify_of_issue.setdefault(sub_id, [])
+          if issue not in ids_to_notify_of_issue[sub_id]:
+            ids_to_notify_of_issue[sub_id].append(issue)
+
+      if issue in non_private_issues:
+        for notify_addr in issue.derived_notify_addrs:
+          additional_addrs_to_notify_of_issue[notify_addr].append(issue)
+
+    # 2. Compose an email specifically for each user, and one email to each
+    # notify_addr with all the issues that it.
+    # Start from non-members first, then members to reveal email addresses.
+    email_tasks = []
+    needed_user_view_ids = [uid for uid in ids_to_notify_of_issue
+                            if uid not in users_by_id]
+    users_by_id.update(framework_views.MakeAllUserViews(
+        cnxn, self.services.user, needed_user_view_ids))
+    member_ids_to_notify_of_issue = {}
+    non_member_ids_to_notify_of_issue = {}
+    member_additional_addrs = {}
+    non_member_additional_addrs = {}
+    addr_to_addrperm = {}  # {email_address: AddrPerm object}
+    all_user_prefs = self.services.user.GetUsersPrefs(
+        cnxn, ids_to_notify_of_issue)
+
+    # TODO(jrobbins): Merge ids_to_notify_of_issue entries for linked accounts.
+
+    for user_id in ids_to_notify_of_issue:
+      if not user_id:
+        continue  # Don't try to notify NO_USER_SPECIFIED
+      if users_by_id[user_id].email in omit_addrs:
+        logging.info('Omitting %s', user_id)
+        continue
+      user_issues = ids_to_notify_of_issue[user_id]
+      if not user_issues:
+        continue  # user's prefs indicate they don't want these notifications
+      auth = authdata.AuthData.FromUserID(
+          cnxn, user_id, self.services)
+      is_member = bool(framework_bizobj.UserIsInProject(
+          project, auth.effective_ids))
+      if is_member:
+        member_ids_to_notify_of_issue[user_id] = user_issues
+      else:
+        non_member_ids_to_notify_of_issue[user_id] = user_issues
+      addr = users_by_id[user_id].email
+      omit_addrs.add(addr)
+      addr_to_addrperm[addr] = notify_reasons.AddrPerm(
+          is_member, addr, users_by_id[user_id].user,
+          notify_reasons.REPLY_NOT_ALLOWED, all_user_prefs[user_id])
+
+    for addr, addr_issues in additional_addrs_to_notify_of_issue.items():
+      auth = None
+      try:
+        auth = authdata.AuthData.FromEmail(cnxn, addr, self.services)
+      except:  # pylint: disable=bare-except
+        logging.warning('Cannot find user of email %s ', addr)
+      if auth:
+        is_member = bool(framework_bizobj.UserIsInProject(
+            project, auth.effective_ids))
+      else:
+        is_member = False
+      if is_member:
+        member_additional_addrs[addr] = addr_issues
+      else:
+        non_member_additional_addrs[addr] = addr_issues
+      omit_addrs.add(addr)
+      addr_to_addrperm[addr] = notify_reasons.AddrPerm(
+          is_member, addr, None, notify_reasons.REPLY_NOT_ALLOWED, None)
+
+    for user_id, user_issues in non_member_ids_to_notify_of_issue.items():
+      addr = users_by_id[user_id].email
+      email = self._FormatBulkIssuesEmail(
+          addr_to_addrperm[addr], user_issues, users_by_id,
+          commenter_view, hostport, comment_text, amendments, config, project)
+      email_tasks.append(email)
+      logging.info('about to bulk notify non-member %s (%s) of %s',
+                   users_by_id[user_id].email, user_id,
+                   [issue.local_id for issue in user_issues])
+
+    for addr, addr_issues in non_member_additional_addrs.items():
+      email = self._FormatBulkIssuesEmail(
+          addr_to_addrperm[addr], addr_issues, users_by_id, commenter_view,
+          hostport, comment_text, amendments, config, project)
+      email_tasks.append(email)
+      logging.info('about to bulk notify non-member additional addr %s of %s',
+                   addr, [addr_issue.local_id for addr_issue in addr_issues])
+
+    framework_views.RevealAllEmails(users_by_id)
+    commenter_view.RevealEmail()
+
+    for user_id, user_issues in member_ids_to_notify_of_issue.items():
+      addr = users_by_id[user_id].email
+      email = self._FormatBulkIssuesEmail(
+          addr_to_addrperm[addr], user_issues, users_by_id,
+          commenter_view, hostport, comment_text, amendments, config, project)
+      email_tasks.append(email)
+      logging.info('about to bulk notify member %s (%s) of %s',
+                   addr, user_id, [issue.local_id for issue in user_issues])
+
+    for addr, addr_issues in member_additional_addrs.items():
+      email = self._FormatBulkIssuesEmail(
+          addr_to_addrperm[addr], addr_issues, users_by_id, commenter_view,
+          hostport, comment_text, amendments, config, project)
+      email_tasks.append(email)
+      logging.info('about to bulk notify member additional addr %s of %s',
+                   addr, [addr_issue.local_id for addr_issue in addr_issues])
+
+    # 4. Add in the project's issue_notify_address.  This happens even if it
+    # is the same as the commenter's email address (which would be an unusual
+    # but valid project configuration).  Only issues that any contributor could
+    # view are included in emails to the all-issue-activity mailing lists.
+    if (project.issue_notify_address
+        and project.issue_notify_address not in omit_addrs):
+      non_private_issues_live = []
+      for issue in issues:
+        contributor_could_view = permissions.CanViewIssue(
+            set(), permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET,
+            project, issue)
+        if contributor_could_view:
+          non_private_issues_live.append(issue)
+
+      if non_private_issues_live:
+        project_notify_addrperm = notify_reasons.AddrPerm(
+            True, project.issue_notify_address, None,
+            notify_reasons.REPLY_NOT_ALLOWED, None)
+        email = self._FormatBulkIssuesEmail(
+            project_notify_addrperm, non_private_issues_live,
+            users_by_id, commenter_view, hostport, comment_text, amendments,
+            config, project)
+        email_tasks.append(email)
+        omit_addrs.add(project.issue_notify_address)
+        logging.info('about to bulk notify all-issues %s of %s',
+                     project.issue_notify_address,
+                     [issue.local_id for issue in non_private_issues])
+
+    return email_tasks
+
+  def _FormatBulkIssuesEmail(
+      self, addr_perm, issues, users_by_id, commenter_view,
+      hostport, comment_text, amendments, config, project):
+    """Format an email to one user listing many issues."""
+
+    from_addr = emailfmt.FormatFromAddr(
+        project, commenter_view=commenter_view, reveal_addr=addr_perm.is_member,
+        can_reply_to=False)
+
+    subject, body = self._FormatBulkIssues(
+        issues, users_by_id, commenter_view, hostport, comment_text,
+        amendments, config, addr_perm)
+    body = notify_helpers._TruncateBody(body)
+
+    return dict(from_addr=from_addr, to=addr_perm.address, subject=subject,
+                body=body)
+
+  def _FormatBulkIssues(
+      self, issues, users_by_id, commenter_view, hostport, comment_text,
+      amendments, config, addr_perm):
+    """Format a subject and body for a bulk issue edit."""
+    project_name = issues[0].project_name
+
+    any_link_only = False
+    issue_views = []
+    for issue in issues:
+      # TODO(jrobbins): choose config from dict of prefetched configs.
+      issue_view = tracker_views.IssueView(issue, users_by_id, config)
+      issue_view.link_only = ezt.boolean(False)
+      if addr_perm and notify_helpers.ShouldUseLinkOnly(addr_perm, issue):
+        issue_view.link_only = ezt.boolean(True)
+        any_link_only = True
+      issue_views.append(issue_view)
+
+    email_data = {
+        'any_link_only': ezt.boolean(any_link_only),
+        'hostport': hostport,
+        'num_issues': len(issues),
+        'issues': issue_views,
+        'comment_text': comment_text,
+        'commenter': commenter_view,
+        'amendments': amendments,
+    }
+
+    if len(issues) == 1:
+      # TODO(jrobbins): use compact email subject lines based on user pref.
+      if addr_perm and notify_helpers.ShouldUseLinkOnly(addr_perm, issues[0]):
+        subject = 'issue %s in %s' % (issues[0].local_id, project_name)
+      else:
+        subject = 'issue %s in %s: %s' % (
+            issues[0].local_id, project_name, issues[0].summary)
+      # TODO(jrobbins): Look up the sequence number instead and treat this
+      # more like an individual change for email threading.  For now, just
+      # add "Re:" because bulk edits are always replies.
+      subject = 'Re: ' + subject
+    else:
+      subject = '%d issues changed in %s' % (len(issues), project_name)
+
+    body = self.email_template.GetResponse(email_data)
+
+    return subject, body
+
+
+# For now, this class will not be used to send approval comment notifications
+# TODO(jojwang): monorail:3588, it might make sense for this class to handle
+# sending comment notifications for approval custom_subfield changes.
+class NotifyApprovalChangeTask(notify_helpers.NotifyTaskBase):
+  """JSON servlet that notifies appropriate users after an approval change."""
+
+  _EMAIL_TEMPLATE = 'tracker/approval-change-notification-email.ezt'
+
+  def HandleRequest(self, mr):
+    """Process the task to notify users after an approval change.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+
+    Returns:
+      Results dictionary in JSON format which is useful just for debugging.
+      The main goal is the side-effect of sending emails.
+    """
+
+    send_email = bool(mr.GetIntParam('send_email'))
+    issue_id = mr.GetPositiveIntParam('issue_id')
+    approval_id = mr.GetPositiveIntParam('approval_id')
+    comment_id = mr.GetPositiveIntParam('comment_id')
+    hostport = mr.GetParam('hostport')
+
+    params = dict(
+        temporary='',
+        hostport=hostport,
+        issue_id=issue_id
+        )
+    logging.info('approval change params are %r', params)
+
+    issue, approval_value = self.services.issue.GetIssueApproval(
+        mr.cnxn, issue_id, approval_id, use_cache=False)
+    project = self.services.project.GetProject(mr.cnxn, issue.project_id)
+    config = self.services.config.GetProjectConfig(mr.cnxn, issue.project_id)
+
+    approval_fd = tracker_bizobj.FindFieldDefByID(approval_id, config)
+    if approval_fd is None:
+      raise exceptions.NoSuchFieldDefException()
+
+    # GetCommentsForIssue will fill the sequence for all comments, while
+    # other method for getting a single comment will not.
+    # The comment sequence is especially useful for Approval issues with
+    # many comment sections.
+    comment = None
+    all_comments = self.services.issue.GetCommentsForIssue(mr.cnxn, issue_id)
+    for c in all_comments:
+      if c.id == comment_id:
+        comment = c
+        break
+    if not comment:
+      raise exceptions.NoSuchCommentException()
+
+    field_user_ids = set()
+    relevant_fds = [fd for fd in config.field_defs if
+                    not fd.approval_id or
+                    fd.approval_id is approval_value.approval_id]
+    for fd in relevant_fds:
+      field_user_ids.update(
+          notify_reasons.ComputeNamedUserIDsToNotify(issue.field_values, fd))
+    users_by_id = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user, [issue.owner_id],
+        approval_value.approver_ids,
+        tracker_bizobj.UsersInvolvedInComment(comment),
+        list(field_user_ids))
+
+    tasks = []
+    if send_email:
+      tasks = self._MakeApprovalEmailTasks(
+          hostport, issue, project, approval_value, approval_fd.field_name,
+          comment, users_by_id, list(field_user_ids), mr.perms)
+
+    notified = notify_helpers.AddAllEmailTasks(tasks)
+
+    return {
+        'params': params,
+        'notified': notified,
+        'tasks': tasks,
+        }
+
+  def _MakeApprovalEmailTasks(
+      self, hostport, issue, project, approval_value, approval_name,
+      comment, users_by_id, user_ids_from_fields, perms):
+    """Formulate emails to be sent."""
+
+    # TODO(jojwang): avoid need to make MonorailRequest and autolinker
+    # for comment_view OR make make tracker_views._ParseTextRuns public
+    # and only pass text_runs to email_data.
+    mr = monorailrequest.MonorailRequest(self.services)
+    mr.project_name = project.project_name
+    mr.project = project
+    mr.perms = perms
+    autolinker = autolink.Autolink()
+
+    approval_url = framework_helpers.IssueCommentURL(
+        hostport, project, issue.local_id, seq_num=comment.sequence)
+
+    comment_view = tracker_views.IssueCommentView(
+        project.project_name, comment, users_by_id, autolinker, {}, mr, issue)
+    domain_url = framework_helpers.FormatAbsoluteURLForDomain(
+        hostport, project.project_name, '/issues/')
+
+    commenter_view = users_by_id[comment.user_id]
+    email_data = {
+        'domain_url': domain_url,
+        'approval_url': approval_url,
+        'comment': comment_view,
+        'issue_local_id': issue.local_id,
+        'summary': issue.summary,
+        }
+    subject = '%s Approval: %s (Issue %s)' % (
+        approval_name, issue.summary, issue.local_id)
+    email_body = self.email_template.GetResponse(email_data)
+    body = notify_helpers._TruncateBody(email_body)
+
+    recipient_ids = self._GetApprovalEmailRecipients(
+        approval_value, comment, issue, user_ids_from_fields,
+        omit_ids=[comment.user_id])
+    direct, indirect = self.services.usergroup.ExpandAnyGroupEmailRecipients(
+        mr.cnxn, recipient_ids)
+    # group ids were found in recipient_ids.
+    # Re-set recipient_ids to remove group_ids
+    if indirect:
+      recipient_ids = set(direct + indirect)
+      users_by_id.update(framework_views.MakeAllUserViews(
+          mr.cnxn, self.services.user, indirect))  # already contains direct
+
+    # TODO(crbug.com/monorail/9104): Compute notify_reasons.AddrPerms based on
+    # project settings and recipient permissions so `reply_to` can be accurately
+    # set.
+
+    email_tasks = []
+    for rid in recipient_ids:
+      from_addr = emailfmt.FormatFromAddr(
+          project, commenter_view=commenter_view, can_reply_to=False)
+      dest_email = users_by_id[rid].email
+
+      refs = emailfmt.GetReferences(
+          dest_email, subject, comment.sequence,
+          '%s@%s' % (project.project_name, emailfmt.MailDomain()))
+      reply_to = emailfmt.NoReplyAddress()
+      email_tasks.append(
+          dict(
+              from_addr=from_addr,
+              to=dest_email,
+              subject=subject,
+              body=body,
+              reply_to=reply_to,
+              references=refs))
+
+    return email_tasks
+
+  def _GetApprovalEmailRecipients(
+      self, approval_value, comment, issue, user_ids_from_fields,
+      omit_ids=None):
+    # TODO(jojwang): monorail:3588, reorganize this, since now, comment_content
+    # and approval amendments happen in the same comment.
+    # NOTE: user_ids_from_fields are all the notify_on=ANY_COMMENT users.
+    # However, these users will still be excluded from notifications
+    # meant for approvers only eg. (status changed to REVIEW_REQUESTED).
+    recipient_ids = []
+    if comment.amendments:
+      for amendment in comment.amendments:
+        if amendment.custom_field_name == 'Status':
+          if (approval_value.status is
+              tracker_pb2.ApprovalStatus.REVIEW_REQUESTED):
+            recipient_ids = approval_value.approver_ids
+          else:
+            recipient_ids.extend([issue.owner_id])
+            recipient_ids.extend(user_ids_from_fields)
+
+        elif amendment.custom_field_name == 'Approvers':
+          recipient_ids.extend(approval_value.approver_ids)
+          recipient_ids.append(issue.owner_id)
+          recipient_ids.extend(user_ids_from_fields)
+          recipient_ids.extend(amendment.removed_user_ids)
+    else:
+      # No amendments, just a comment.
+      recipient_ids.extend(approval_value.approver_ids)
+      recipient_ids.append(issue.owner_id)
+      recipient_ids.extend(user_ids_from_fields)
+
+    if omit_ids:
+      recipient_ids = [rid for rid in recipient_ids if rid not in omit_ids]
+
+    return list(set(recipient_ids))
+
+
+class NotifyRulesDeletedTask(notify_helpers.NotifyTaskBase):
+  """JSON servlet that sends one email."""
+
+  _EMAIL_TEMPLATE = 'project/rules-deleted-notification-email.ezt'
+
+  def HandleRequest(self, mr):
+    """Process the task to notify project owners after a filter rule
+      has been deleted.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+
+    Returns:
+      Results dictionary in JSON format which is useful for debugging.
+    """
+    project_id = mr.GetPositiveIntParam('project_id')
+    rules = mr.GetListParam('filter_rules')
+    hostport = mr.GetParam('hostport')
+
+    params = dict(
+        project_id=project_id,
+        rules=rules,
+        hostport=hostport,
+        )
+    logging.info('deleted filter rules params are %r', params)
+
+    project = self.services.project.GetProject(mr.cnxn, project_id)
+    emails_by_id = self.services.user.LookupUserEmails(
+        mr.cnxn, project.owner_ids, ignore_missed=True)
+
+    tasks = self._MakeRulesDeletedEmailTasks(
+        hostport, project, emails_by_id, rules)
+    notified = notify_helpers.AddAllEmailTasks(tasks)
+
+    return {
+        'params': params,
+        'notified': notified,
+        'tasks': tasks,
+        }
+
+  def _MakeRulesDeletedEmailTasks(self, hostport, project, emails_by_id, rules):
+
+    rules_url = framework_helpers.FormatAbsoluteURLForDomain(
+        hostport, project.project_name, urls.ADMIN_RULES)
+
+    email_data = {
+        'project_name': project.project_name,
+        'rules': rules,
+        'rules_url': rules_url,
+    }
+    logging.info(email_data)
+    subject = '%s Project: Deleted Filter Rules' % project.project_name
+    email_body = self.email_template.GetResponse(email_data)
+    body = notify_helpers._TruncateBody(email_body)
+
+    email_tasks = []
+    for rid in project.owner_ids:
+      from_addr = emailfmt.FormatFromAddr(
+          project, reveal_addr=True, can_reply_to=False)
+      dest_email = emails_by_id.get(rid)
+      email_tasks.append(
+          dict(from_addr=from_addr, to=dest_email, subject=subject, body=body))
+
+    return email_tasks
+
+
+class OutboundEmailTask(jsonfeed.InternalTask):
+  """JSON servlet that sends one email.
+
+  Handles tasks enqueued from notify_helpers._EnqueueOutboundEmail.
+  """
+
+  def HandleRequest(self, mr):
+    """Process the task to send one email message.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+
+    Returns:
+      Results dictionary in JSON format which is useful just for debugging.
+      The main goal is the side-effect of sending emails.
+    """
+    # To avoid urlencoding the email body, the most salient parameters to this
+    # method are passed as a json-encoded POST body.
+    try:
+      email_params = json.loads(self.request.body)
+    except ValueError:
+      logging.error(self.request.body)
+      raise
+    # If running on a GAFYD domain, you must define an app alias on the
+    # Application Settings admin web page.
+    sender = email_params.get('from_addr')
+    reply_to = email_params.get('reply_to')
+    to = email_params.get('to')
+    if not to:
+      # Cannot proceed if we cannot create a valid EmailMessage.
+      return {'note': 'Skipping because no "to" address found.'}
+
+    # Don't send emails to any banned users.
+    try:
+      user_id = self.services.user.LookupUserID(mr.cnxn, to)
+      user = self.services.user.GetUser(mr.cnxn, user_id)
+      if user.banned:
+        logging.info('Not notifying banned user %r', user.email)
+        return {'note': 'Skipping because user is banned.'}
+    except exceptions.NoSuchUserException:
+      pass
+
+    references = email_params.get('references')
+    subject = email_params.get('subject')
+    body = email_params.get('body')
+    html_body = email_params.get('html_body')
+
+    if settings.local_mode:
+      to_format = settings.send_local_email_to
+    else:
+      to_format = settings.send_all_email_to
+
+    if to_format:
+      to_user, to_domain = to.split('@')
+      to = to_format % {'user': to_user, 'domain': to_domain}
+
+    logging.info(
+        'Email:\n sender: %s\n reply_to: %s\n to: %s\n references: %s\n '
+        'subject: %s\n body: %s\n html body: %s',
+        sender, reply_to, to, references, subject, body, html_body)
+    if html_body:
+      logging.info('Readable HTML:\n%s', html_body.replace('<br/>', '<br/>\n'))
+    message = mail.EmailMessage(
+        sender=sender, to=to, subject=subject, body=body)
+    if html_body:
+      message.html = html_body
+    if reply_to:
+      message.reply_to = reply_to
+    if references:
+      message.headers = {'References': references}
+    if settings.unit_test_mode:
+      logging.info('Sending message "%s" in test mode.', message.subject)
+    else:
+      retry_count = 3
+      for i in range(retry_count):
+        try:
+          message.send()
+          break
+        except apiproxy_errors.DeadlineExceededError as ex:
+          logging.warning('Sending email timed out on try: %d', i)
+          logging.warning(str(ex))
+
+    return dict(
+        sender=sender, to=to, subject=subject, body=body, html_body=html_body,
+        reply_to=reply_to, references=references)
diff --git a/features/notify_helpers.py b/features/notify_helpers.py
new file mode 100644
index 0000000..f22ed38
--- /dev/null
+++ b/features/notify_helpers.py
@@ -0,0 +1,440 @@
+# 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
+
+"""Helper functions for email notifications of issue changes."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import json
+import logging
+
+import ezt
+import six
+
+from features import autolink
+from features import autolink_constants
+from features import features_constants
+from features import filterrules_helpers
+from features import savedqueries_helpers
+from features import notify_reasons
+from framework import cloud_tasks_helpers
+from framework import emailfmt
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import jsonfeed
+from framework import monorailrequest
+from framework import permissions
+from framework import template_helpers
+from framework import urls
+from proto import tracker_pb2
+from search import query2ast
+from search import searchpipeline
+from tracker import tracker_bizobj
+
+
+# Email tasks can get too large for AppEngine to handle. In order to prevent
+# that, we set a maximum body size, and may truncate messages to that length.
+# We set this value to 35k so that the total of 35k body + 35k html_body +
+# metadata does not exceed AppEngine's limit of 100k.
+MAX_EMAIL_BODY_SIZE = 35 * 1024
+
+# This HTML template adds mark up which enables Gmail/Inbox to display a
+# convenient link that takes users to the CL directly from the inbox without
+# having to click on the email.
+# Documentation for this schema.org markup is here:
+#   https://developers.google.com/gmail/markup/reference/go-to-action
+HTML_BODY_WITH_GMAIL_ACTION_TEMPLATE = """
+<html>
+<body>
+<script type="application/ld+json">
+{
+  "@context": "http://schema.org",
+  "@type": "EmailMessage",
+  "potentialAction": {
+    "@type": "ViewAction",
+    "name": "View Issue",
+    "url": "%(url)s"
+  },
+  "description": ""
+}
+</script>
+
+<div style="font-family: arial, sans-serif; white-space:pre">%(body)s</div>
+</body>
+</html>
+"""
+
+HTML_BODY_WITHOUT_GMAIL_ACTION_TEMPLATE = """
+<html>
+<body>
+<div style="font-family: arial, sans-serif; white-space:pre">%(body)s</div>
+</body>
+</html>
+"""
+
+
+NOTIFY_RESTRICTED_ISSUES_PREF_NAME = 'notify_restricted_issues'
+NOTIFY_WITH_DETAILS = 'notify with details'
+NOTIFY_WITH_DETAILS_GOOGLE = 'notify with details: Google'
+NOTIFY_WITH_LINK_ONLY = 'notify with link only'
+
+
+def _EnqueueOutboundEmail(message_dict):
+  """Create a task to send one email message, all fields are in the dict.
+
+  We use a separate task for each outbound email to isolate errors.
+
+  Args:
+    message_dict: dict with all needed info for the task.
+  """
+  # We use a JSON-encoded payload because it ensures that the task size is
+  # effectively the same as the sum of the email bodies. Using params results
+  # in the dict being urlencoded, which can (worst case) triple the size of
+  # an email body containing many characters which need to be escaped.
+  payload = json.dumps(message_dict)
+  task = {
+      'app_engine_http_request':
+          {
+              'relative_uri': urls.OUTBOUND_EMAIL_TASK + '.do',
+              # Cloud Tasks expects body to be in bytes.
+              'body': payload.encode(),
+              # Cloud tasks default body content type is octet-stream.
+              'headers': {
+                  'Content-type': 'application/json'
+              }
+          }
+  }
+  cloud_tasks_helpers.create_task(
+      task, queue=features_constants.QUEUE_OUTBOUND_EMAIL)
+
+
+def AddAllEmailTasks(tasks):
+  """Add one GAE task for each email to be sent."""
+  notified = []
+  for task in tasks:
+    _EnqueueOutboundEmail(task)
+    notified.append(task['to'])
+
+  return notified
+
+
+class NotifyTaskBase(jsonfeed.InternalTask):
+  """Abstract base class for notification task handler."""
+
+  _EMAIL_TEMPLATE = None  # Subclasses must override this.
+  _LINK_ONLY_EMAIL_TEMPLATE = None  # Subclasses may override this.
+
+  CHECK_SECURITY_TOKEN = False
+
+  def __init__(self, *args, **kwargs):
+    super(NotifyTaskBase, self).__init__(*args, **kwargs)
+
+    if not self._EMAIL_TEMPLATE:
+      raise Exception('Subclasses must override _EMAIL_TEMPLATE.'
+                      ' This class must not be called directly.')
+    # We use FORMAT_RAW for emails because they are plain text, not HTML.
+    # TODO(jrobbins): consider sending HTML formatted emails someday.
+    self.email_template = template_helpers.MonorailTemplate(
+        framework_constants.TEMPLATE_PATH + self._EMAIL_TEMPLATE,
+        compress_whitespace=False, base_format=ezt.FORMAT_RAW)
+
+    if self._LINK_ONLY_EMAIL_TEMPLATE:
+      self.link_only_email_template = template_helpers.MonorailTemplate(
+          framework_constants.TEMPLATE_PATH + self._LINK_ONLY_EMAIL_TEMPLATE,
+          compress_whitespace=False, base_format=ezt.FORMAT_RAW)
+
+
+def _MergeLinkedAccountReasons(addr_to_addrperm, addr_to_reasons):
+  """Return an addr_reasons_dict where parents omit child accounts."""
+  all_ids = set(addr_perm.user.user_id
+                for addr_perm in addr_to_addrperm.values()
+                if addr_perm.user)
+  merged_ids = set()
+
+  result = {}
+  for addr, reasons in addr_to_reasons.items():
+    addr_perm = addr_to_addrperm[addr]
+    parent_id = addr_perm.user.linked_parent_id if addr_perm.user else None
+    if parent_id and parent_id in all_ids:
+      # The current user is a child account and the parent would be notified,
+      # so only notify the parent.
+      merged_ids.add(parent_id)
+    else:
+      result[addr] = reasons
+
+  for addr, reasons in result.items():
+    addr_perm = addr_to_addrperm[addr]
+    if addr_perm.user and addr_perm.user.user_id in merged_ids:
+      reasons.append(notify_reasons.REASON_LINKED_ACCOUNT)
+
+  return result
+
+
+def MakeBulletedEmailWorkItems(
+    group_reason_list, issue, body_link_only, body_for_non_members,
+    body_for_members, project, hostport, commenter_view, detail_url,
+    seq_num=None, subject_prefix=None, compact_subject_prefix=None):
+  """Make a list of dicts describing email-sending tasks to notify users.
+
+  Args:
+    group_reason_list: list of (addr_perm_list, reason) tuples.
+    issue: Issue that was updated.
+    body_link_only: string body of email with minimal information.
+    body_for_non_members: string body of email to send to non-members.
+    body_for_members: string body of email to send to members.
+    project: Project that contains the issue.
+    hostport: string hostname and port number for links to the site.
+    commenter_view: UserView for the user who made the comment.
+    detail_url: str direct link to the issue.
+    seq_num: optional int sequence number of the comment.
+    subject_prefix: optional string to customize the email subject line.
+    compact_subject_prefix: optional string to customize the email subject line.
+
+  Returns:
+    A list of dictionaries, each with all needed info to send an individual
+    email to one user.  Each email contains a footer that lists all the
+    reasons why that user received the email.
+  """
+  logging.info('group_reason_list is %r', group_reason_list)
+  addr_to_addrperm = {}  # {email_address: AddrPerm object}
+  addr_to_reasons = {}  # {email_address: [reason, ...]}
+  for group, reason in group_reason_list:
+    for memb_addr_perm in group:
+      addr = memb_addr_perm.address
+      addr_to_addrperm[addr] = memb_addr_perm
+      addr_to_reasons.setdefault(addr, []).append(reason)
+
+  addr_to_reasons = _MergeLinkedAccountReasons(
+      addr_to_addrperm, addr_to_reasons)
+  logging.info('addr_to_reasons is %r', addr_to_reasons)
+
+  email_tasks = []
+  for addr, reasons in addr_to_reasons.items():
+    memb_addr_perm = addr_to_addrperm[addr]
+    email_tasks.append(_MakeEmailWorkItem(
+        memb_addr_perm, reasons, issue, body_link_only, body_for_non_members,
+        body_for_members, project, hostport, commenter_view, detail_url,
+        seq_num=seq_num, subject_prefix=subject_prefix,
+        compact_subject_prefix=compact_subject_prefix))
+
+  return email_tasks
+
+
+def _TruncateBody(body):
+  """Truncate body string if it exceeds size limit."""
+  if len(body) > MAX_EMAIL_BODY_SIZE:
+    logging.info('Truncate body since its size %d exceeds limit', len(body))
+    return body[:MAX_EMAIL_BODY_SIZE] + '...'
+  return body
+
+
+def _GetNotifyRestrictedIssues(user_prefs, email, user):
+  """Return the notify_restricted_issues pref or a calculated default value."""
+  # If we explicitly set a pref for this address, use it.
+  if user_prefs:
+    for pref in user_prefs.prefs:
+      if pref.name == NOTIFY_RESTRICTED_ISSUES_PREF_NAME:
+        return pref.value
+
+  # Mailing lists cannot visit the site, so if it visited, it is a person.
+  if user and user.last_visit_timestamp:
+    return NOTIFY_WITH_DETAILS
+
+  # If it is a google.com mailing list, allow details for R-V-G issues.
+  if email.endswith('@google.com'):
+    return NOTIFY_WITH_DETAILS_GOOGLE
+
+  # It might be a public mailing list, so don't risk leaking any details.
+  return NOTIFY_WITH_LINK_ONLY
+
+
+def ShouldUseLinkOnly(addr_perm, issue, always_detailed=False):
+  """Return true when there is a risk of leaking a restricted issue.
+
+  We send notifications that contain only a link to the issue with no other
+  details about the change when:
+  - The issue is R-V-G and the address may be a non-google.com mailing list, or
+  - The issue is restricted with something other than R-V-G, and the user
+     may be a mailing list, or
+  - The user has a preference set.
+  """
+  if always_detailed:
+    return False
+
+  restrictions = permissions.GetRestrictions(issue, perm=permissions.VIEW)
+  if not restrictions:
+    return False
+
+  pref = _GetNotifyRestrictedIssues(
+      addr_perm.user_prefs, addr_perm.address, addr_perm.user)
+  if pref == NOTIFY_WITH_DETAILS:
+    return False
+  if (pref == NOTIFY_WITH_DETAILS_GOOGLE and
+      restrictions == ['restrict-view-google']):
+    return False
+
+  # If NOTIFY_WITH_LINK_ONLY or any unexpected value:
+  return True
+
+
+def _MakeEmailWorkItem(
+    addr_perm, reasons, issue, body_link_only,
+    body_for_non_members, body_for_members, project, hostport, commenter_view,
+    detail_url, seq_num=None, subject_prefix=None, compact_subject_prefix=None):
+  """Make one email task dict for one user, includes a detailed reason."""
+  should_use_link_only = ShouldUseLinkOnly(
+      addr_perm, issue, always_detailed=project.issue_notify_always_detailed)
+  subject_format = (
+      (subject_prefix or 'Issue ') +
+      '%(local_id)d in %(project_name)s')
+  if addr_perm.user and addr_perm.user.email_compact_subject:
+    subject_format = (
+        (compact_subject_prefix or '') +
+        '%(project_name)s:%(local_id)d')
+
+  subject = subject_format % {
+    'local_id': issue.local_id,
+    'project_name': issue.project_name,
+    }
+  if not should_use_link_only:
+    subject += ': ' + issue.summary
+
+  footer = _MakeNotificationFooter(reasons, addr_perm.reply_perm, hostport)
+  if isinstance(footer, six.text_type):
+    footer = footer.encode('utf-8')
+  if should_use_link_only:
+    body = _TruncateBody(body_link_only) + footer
+  elif addr_perm.is_member:
+    logging.info('got member %r, sending body for members', addr_perm.address)
+    body = _TruncateBody(body_for_members) + footer
+  else:
+    logging.info(
+        'got non-member %r, sending body for non-members', addr_perm.address)
+    body = _TruncateBody(body_for_non_members) + footer
+  logging.info('sending message footer:\n%r', footer)
+
+  can_reply_to = (
+      addr_perm.reply_perm != notify_reasons.REPLY_NOT_ALLOWED and
+      project.process_inbound_email)
+  from_addr = emailfmt.FormatFromAddr(
+    project, commenter_view=commenter_view, reveal_addr=addr_perm.is_member,
+    can_reply_to=can_reply_to)
+  if can_reply_to:
+    reply_to = '%s@%s' % (project.project_name, emailfmt.MailDomain())
+  else:
+    reply_to = emailfmt.NoReplyAddress()
+  refs = emailfmt.GetReferences(
+    addr_perm.address, subject, seq_num,
+    '%s@%s' % (project.project_name, emailfmt.MailDomain()))
+  # We use markup to display a convenient link that takes users directly to the
+  # issue without clicking on the email.
+  html_body = None
+  template = HTML_BODY_WITH_GMAIL_ACTION_TEMPLATE
+  if addr_perm.user and not addr_perm.user.email_view_widget:
+    template = HTML_BODY_WITHOUT_GMAIL_ACTION_TEMPLATE
+  body_with_tags = _AddHTMLTags(body.decode('utf-8'))
+  # Escape single quotes which are occasionally used to contain HTML
+  # attributes and event handler definitions.
+  body_with_tags = body_with_tags.replace("'", '&#39;')
+  html_body = template % {
+      'url': detail_url,
+      'body': body_with_tags,
+      }
+  return dict(
+    to=addr_perm.address, subject=subject, body=body, html_body=html_body,
+    from_addr=from_addr, reply_to=reply_to, references=refs)
+
+
+def _AddHTMLTags(body):
+  """Adds HMTL tags in the specified email body.
+
+  Specifically does the following:
+  * Detects links and adds <a href>s around the links.
+  * Substitutes <br/> for all occurrences of "\n".
+
+  See crbug.com/582463 for context.
+  """
+  # Convert all URLs into clickable links.
+  body = _AutolinkBody(body)
+
+  # Convert all "\n"s into "<br/>"s.
+  body = body.replace('\r\n', '<br/>')
+  body = body.replace('\n', '<br/>')
+  return body
+
+
+def _AutolinkBody(body):
+  """Convert text that looks like URLs into <a href=...>.
+
+  This uses autolink.py, but it does not register all the autolink components
+  because some of them depend on the current user's permissions which would
+  not make sense for an email body that will be sent to several different users.
+  """
+  email_autolink = autolink.Autolink()
+  email_autolink.RegisterComponent(
+      '01-linkify-user-profiles-or-mailto',
+      lambda request, mr: None,
+      lambda _mr, match: [match.group(0)],
+      {autolink_constants.IS_IMPLIED_EMAIL_RE: autolink.LinkifyEmail})
+  email_autolink.RegisterComponent(
+      '02-linkify-full-urls',
+      lambda request, mr: None,
+      lambda mr, match: None,
+      {autolink_constants.IS_A_LINK_RE: autolink.Linkify})
+  email_autolink.RegisterComponent(
+      '03-linkify-shorthand',
+      lambda request, mr: None,
+      lambda mr, match: None,
+      {autolink_constants.IS_A_SHORT_LINK_RE: autolink.Linkify,
+       autolink_constants.IS_A_NUMERIC_SHORT_LINK_RE: autolink.Linkify,
+       autolink_constants.IS_IMPLIED_LINK_RE: autolink.Linkify,
+       })
+
+  input_run = template_helpers.TextRun(body)
+  output_runs = email_autolink.MarkupAutolinks(
+      None, [input_run], autolink.SKIP_LOOKUPS)
+  output_strings = [run.FormatForHTMLEmail() for run in output_runs]
+  return ''.join(output_strings)
+
+
+def _MakeNotificationFooter(reasons, reply_perm, hostport):
+  """Make an informative footer for a notification email.
+
+  Args:
+    reasons: a list of strings to be used as the explanation.  Empty if no
+        reason is to be given.
+    reply_perm: string which is one of REPLY_NOT_ALLOWED, REPLY_MAY_COMMENT,
+        REPLY_MAY_UPDATE.
+    hostport: string with domain_name:port_number to be used in linking to
+        the user preferences page.
+
+  Returns:
+    A string to be used as the email footer.
+  """
+  if not reasons:
+    return ''
+
+  domain_port = hostport.split(':')
+  domain_port[0] = framework_helpers.GetPreferredDomain(domain_port[0])
+  hostport = ':'.join(domain_port)
+
+  prefs_url = 'https://%s%s' % (hostport, urls.USER_SETTINGS)
+  lines = ['-- ']
+  lines.append('You received this message because:')
+  lines.extend('  %d. %s' % (idx + 1, reason)
+               for idx, reason in enumerate(reasons))
+
+  lines.extend(['', 'You may adjust your notification preferences at:',
+                prefs_url])
+
+  if reply_perm == notify_reasons.REPLY_MAY_COMMENT:
+    lines.extend(['', 'Reply to this email to add a comment.'])
+  elif reply_perm == notify_reasons.REPLY_MAY_UPDATE:
+    lines.extend(['', 'Reply to this email to add a comment or make updates.'])
+
+  return '\n'.join(lines)
diff --git a/features/notify_reasons.py b/features/notify_reasons.py
new file mode 100644
index 0000000..436f975
--- /dev/null
+++ b/features/notify_reasons.py
@@ -0,0 +1,438 @@
+# Copyright 2017 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
+
+"""Helper functions for deciding who to notify and why.."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+
+import settings
+from features import filterrules_helpers
+from features import savedqueries_helpers
+from framework import authdata
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import permissions
+from proto import tracker_pb2
+from search import query2ast
+from search import searchpipeline
+from tracker import component_helpers
+from tracker import tracker_bizobj
+
+# When sending change notification emails, choose the reply-to header and
+# footer message based on three levels of the recipient's permissions
+# for that issue.
+REPLY_NOT_ALLOWED = 'REPLY_NOT_ALLOWED'
+REPLY_MAY_COMMENT = 'REPLY_MAY_COMMENT'
+REPLY_MAY_UPDATE = 'REPLY_MAY_UPDATE'
+
+# These are strings describing the various reasons that we send notifications.
+REASON_REPORTER = 'You reported this issue'
+REASON_OWNER = 'You are the owner of the issue'
+REASON_OLD_OWNER = 'You were the issue owner before this change'
+REASON_DEFAULT_OWNER = 'A rule made you owner of the issue'
+REASON_CCD = 'You were specifically CC\'d on the issue'
+REASON_DEFAULT_CCD = 'A rule CC\'d you on the issue'
+# TODO(crbug.com/monorail/2857): separate reasons for notification to group
+# members resulting from component and rules derived ccs.
+REASON_GROUP_CCD = (
+    'A group you\'re a member of was specifically CC\'d on the issue')
+REASON_STARRER = 'You starred the issue'
+REASON_SUBSCRIBER = 'Your saved query matched the issue'
+REASON_ALSO_NOTIFY = 'A rule was set up to notify you'
+REASON_ALL_NOTIFICATIONS = (
+    'The project was configured to send all issue notifications '
+    'to this address')
+REASON_LINKED_ACCOUNT = 'Your linked account would have been notified'
+
+# An AddrPerm is how we represent our decision to notify a given
+# email address, which version of the email body to send to them, and
+# whether to offer them the option to reply to the notification.  Many
+# of the functions in this file pass around AddrPerm lists (an "APL").
+# is_member is a boolean
+# address is a string email address
+# user is a User PB, including built-in user preference fields.
+# reply_perm is one of REPLY_NOT_ALLOWED, REPLY_MAY_COMMENT,
+# REPLY_MAY_UPDATE.
+# user_prefs is a UserPrefs object with string->string user prefs.
+AddrPerm = collections.namedtuple(
+    'AddrPerm', 'is_member, address, user, reply_perm, user_prefs')
+
+
+
+def ComputeIssueChangeAddressPermList(
+    cnxn, ids_to_consider, project, issue, services, omit_addrs,
+    users_by_id, pref_check_function=lambda u: u.notify_issue_change):
+  """Return a list of user email addresses to notify of an issue change.
+
+  User email addresses are determined by looking up the given user IDs
+  in the given users_by_id dict.
+
+  Args:
+    cnxn: connection to SQL database.
+    ids_to_consider: list of user IDs for users interested in this issue.
+    project: Project PB for the project containing this issue.
+    issue: Issue PB for the issue that was updated.
+    services: Services.
+    omit_addrs: set of strings for email addresses to not notify because
+        they already know.
+    users_by_id: dict {user_id: user_view} user info.
+    pref_check_function: optional function to use to check if a certain
+        User PB has a preference set to receive the email being sent.  It
+        defaults to "If I am in the issue's owner or cc field", but it
+        can be set to check "If I starred the issue."
+
+  Returns:
+    A list of AddrPerm objects.
+  """
+  memb_addr_perm_list = []
+  logging.info('Considering %r ', ids_to_consider)
+  all_user_prefs = services.user.GetUsersPrefs(cnxn, ids_to_consider)
+  for user_id in ids_to_consider:
+    if user_id == framework_constants.NO_USER_SPECIFIED:
+      continue
+    user = services.user.GetUser(cnxn, user_id)
+    # Notify people who have a pref set, or if they have no User PB
+    # because the pref defaults to True.
+    if user and not pref_check_function(user):
+      logging.info('Not notifying %r: user preference', user.email)
+      continue
+    # TODO(jrobbins): doing a bulk operation would reduce DB load.
+    auth = authdata.AuthData.FromUserID(cnxn, user_id, services)
+    perms = permissions.GetPermissions(user, auth.effective_ids, project)
+    config = services.config.GetProjectConfig(cnxn, project.project_id)
+    granted_perms = tracker_bizobj.GetGrantedPerms(
+        issue, auth.effective_ids, config)
+
+    if not permissions.CanViewIssue(
+        auth.effective_ids, perms, project, issue,
+        granted_perms=granted_perms):
+      logging.info('Not notifying %r: user cannot view issue', user.email)
+      continue
+
+    addr = users_by_id[user_id].email
+    if addr in omit_addrs:
+      logging.info('Not notifying %r: user already knows', user.email)
+      continue
+
+    recipient_is_member = bool(framework_bizobj.UserIsInProject(
+        project, auth.effective_ids))
+
+    reply_perm = REPLY_NOT_ALLOWED
+    if project.process_inbound_email:
+      if permissions.CanEditIssue(auth.effective_ids, perms, project, issue):
+        reply_perm = REPLY_MAY_UPDATE
+      elif permissions.CanCommentIssue(
+          auth.effective_ids, perms, project, issue):
+        reply_perm = REPLY_MAY_COMMENT
+
+    memb_addr_perm_list.append(
+      AddrPerm(recipient_is_member, addr, user, reply_perm,
+               all_user_prefs[user_id]))
+
+  logging.info('For %s %s, will notify: %r',
+               project.project_name, issue.local_id,
+               [ap.address for ap in memb_addr_perm_list])
+
+  return memb_addr_perm_list
+
+
+def ComputeProjectNotificationAddrList(
+    cnxn, services, project, contributor_could_view, omit_addrs):
+  """Return a list of non-user addresses to notify of an issue change.
+
+  The non-user addresses are specified by email address strings, not
+  user IDs.  One such address can be specified in the project PB.
+  It is not assumed to have permission to see all issues.
+
+  Args:
+    cnxn: connection to SQL database.
+    services: A Services object.
+    project: Project PB containing the issue that was updated.
+    contributor_could_view: True if any project contributor should be able to
+        see the notification email, e.g., in a mailing list archive or feed.
+    omit_addrs: set of strings for email addresses to not notify because
+        they already know.
+
+  Returns:
+    A list of tuples: [(False, email_addr, None, reply_permission_level), ...],
+    where reply_permission_level is always REPLY_NOT_ALLOWED for now.
+  """
+  memb_addr_perm_list = []
+  if contributor_could_view:
+    ml_addr = project.issue_notify_address
+    ml_user_prefs = services.user.GetUserPrefsByEmail(cnxn, ml_addr)
+
+    if ml_addr and ml_addr not in omit_addrs:
+      memb_addr_perm_list.append(
+          AddrPerm(False, ml_addr, None, REPLY_NOT_ALLOWED, ml_user_prefs))
+
+  return memb_addr_perm_list
+
+
+def ComputeIssueNotificationAddrList(cnxn, services, issue, omit_addrs):
+  """Return a list of non-user addresses to notify of an issue change.
+
+  The non-user addresses are specified by email address strings, not
+  user IDs.  They can be set by filter rules with the "Also notify" action.
+  "Also notify" addresses are assumed to have permission to see any issue,
+  even a restricted one.
+
+  Args:
+    cnxn: connection to SQL database.
+    services: A Services object.
+    issue: Issue PB for the issue that was updated.
+    omit_addrs: set of strings for email addresses to not notify because
+        they already know.
+
+  Returns:
+    A list of tuples: [(False, email_addr, None, reply_permission_level), ...],
+    where reply_permission_level is always REPLY_NOT_ALLOWED for now.
+  """
+  addr_perm_list = []
+  for addr in issue.derived_notify_addrs:
+    if addr not in omit_addrs:
+      notify_user_prefs = services.user.GetUserPrefsByEmail(cnxn, addr)
+      addr_perm_list.append(
+          AddrPerm(False, addr, None, REPLY_NOT_ALLOWED, notify_user_prefs))
+
+  return addr_perm_list
+
+
+def _GetSubscribersAddrPermList(
+    cnxn, services, issue, project, config, omit_addrs, users_by_id):
+  """Lookup subscribers, evaluate their saved queries, and decide to notify."""
+  users_to_queries = GetNonOmittedSubscriptions(
+      cnxn, services, [project.project_id], omit_addrs)
+  # TODO(jrobbins): need to pass through the user_id to use for "me".
+  subscribers_to_notify = EvaluateSubscriptions(
+      cnxn, issue, users_to_queries, services, config)
+  # TODO(jrobbins): expand any subscribers that are user groups.
+  subs_needing_user_views = [
+      uid for uid in subscribers_to_notify if uid not in users_by_id]
+  users_by_id.update(framework_views.MakeAllUserViews(
+      cnxn, services.user, subs_needing_user_views))
+  sub_addr_perm_list = ComputeIssueChangeAddressPermList(
+      cnxn, subscribers_to_notify, project, issue, services, omit_addrs,
+      users_by_id, pref_check_function=lambda *args: True)
+
+  return sub_addr_perm_list
+
+
+def EvaluateSubscriptions(
+    cnxn, issue, users_to_queries, services, config):
+  """Determine subscribers who have subs that match the given issue."""
+  # Note: unlike filter rule, subscriptions see explicit & derived values.
+  lower_labels = [lab.lower() for lab in tracker_bizobj.GetLabels(issue)]
+  label_set = set(lower_labels)
+
+  subscribers_to_notify = []
+  for uid, saved_queries in users_to_queries.items():
+    for sq in saved_queries:
+      if sq.subscription_mode != 'immediate':
+        continue
+      if issue.project_id not in sq.executes_in_project_ids:
+        continue
+      cond = savedqueries_helpers.SavedQueryToCond(sq)
+      # TODO(jrobbins): Support linked accounts me_user_ids.
+      cond, _warnings = searchpipeline.ReplaceKeywordsWithUserIDs([uid], cond)
+      cond_ast = query2ast.ParseUserQuery(
+        cond, '', query2ast.BUILTIN_ISSUE_FIELDS, config)
+
+      if filterrules_helpers.EvalPredicate(
+          cnxn, services, cond_ast, issue, label_set, config,
+          tracker_bizobj.GetOwnerId(issue), tracker_bizobj.GetCcIds(issue),
+          tracker_bizobj.GetStatus(issue)):
+        subscribers_to_notify.append(uid)
+        break  # Don't bother looking at the user's other saved quereies.
+
+  return subscribers_to_notify
+
+
+def GetNonOmittedSubscriptions(cnxn, services, project_ids, omit_addrs):
+  """Get a dict of users w/ subscriptions in those projects."""
+  users_to_queries = services.features.GetSubscriptionsInProjects(
+      cnxn, project_ids)
+  user_emails = services.user.LookupUserEmails(
+      cnxn, list(users_to_queries.keys()))
+  for user_id, email in user_emails.items():
+    if email in omit_addrs:
+      del users_to_queries[user_id]
+  return users_to_queries
+
+
+def ComputeCustomFieldAddrPerms(
+    cnxn, config, issue, project, services, omit_addrs, users_by_id):
+  """Check the reasons to notify users named in custom fields."""
+  group_reason_list = []
+  for fd in config.field_defs:
+    (direct_named_ids,
+     transitive_named_ids) = services.usergroup.ExpandAnyGroupEmailRecipients(
+         cnxn, ComputeNamedUserIDsToNotify(issue.field_values, fd))
+    named_user_ids = direct_named_ids + transitive_named_ids
+    if named_user_ids:
+      named_addr_perms = ComputeIssueChangeAddressPermList(
+          cnxn, named_user_ids, project, issue, services, omit_addrs,
+          users_by_id, pref_check_function=lambda u: True)
+      group_reason_list.append(
+          (named_addr_perms, 'You are named in the %s field' % fd.field_name))
+
+  return group_reason_list
+
+
+def ComputeNamedUserIDsToNotify(field_values, fd):
+  """Give a list of user IDs to notify because they're in a field."""
+  if (fd.field_type == tracker_pb2.FieldTypes.USER_TYPE and
+      fd.notify_on == tracker_pb2.NotifyTriggers.ANY_COMMENT):
+    return [fv.user_id for fv in field_values
+            if fv.field_id == fd.field_id]
+
+  return []
+
+
+def ComputeComponentFieldAddrPerms(
+    cnxn, config, issue, project, services, omit_addrs, users_by_id):
+  """Return [(addr_perm_list, reason),...] for users auto-cc'd by components."""
+  component_ids = set(issue.component_ids)
+  group_reason_list = []
+  for cd in config.component_defs:
+    if cd.component_id in component_ids:
+      (direct_ccs,
+       transitive_ccs) = services.usergroup.ExpandAnyGroupEmailRecipients(
+           cnxn, component_helpers.GetCcIDsForComponentAndAncestors(config, cd))
+      cc_ids = direct_ccs + transitive_ccs
+      comp_addr_perms = ComputeIssueChangeAddressPermList(
+          cnxn, cc_ids, project, issue, services, omit_addrs,
+          users_by_id, pref_check_function=lambda u: True)
+      group_reason_list.append(
+          (comp_addr_perms,
+           'You are auto-CC\'d on all issues in component %s' % cd.path))
+
+  return group_reason_list
+
+
+def ComputeGroupReasonList(
+    cnxn, services, project, issue, config, users_by_id, omit_addrs,
+    contributor_could_view, starrer_ids=None, noisy=False,
+    old_owner_id=None, commenter_in_project=True, include_subscribers=True,
+    include_notify_all=True,
+    starrer_pref_check_function=lambda u: u.notify_starred_issue_change):
+  """Return a list [(addr_perm_list, reason),...] of addrs to notify."""
+  # Get the transitive set of owners and Cc'd users, and their UserViews.
+  starrer_ids = starrer_ids or []
+  reporter = [issue.reporter_id] if issue.reporter_id in starrer_ids else []
+  if old_owner_id:
+    old_direct_owners, old_transitive_owners = (
+        services.usergroup.ExpandAnyGroupEmailRecipients(cnxn, [old_owner_id]))
+  else:
+    old_direct_owners, old_transitive_owners = [], []
+
+  direct_owners, transitive_owners = (
+      services.usergroup.ExpandAnyGroupEmailRecipients(cnxn, [issue.owner_id]))
+  der_direct_owners, der_transitive_owners = (
+      services.usergroup.ExpandAnyGroupEmailRecipients(
+          cnxn, [issue.derived_owner_id]))
+  direct_comp, trans_comp = services.usergroup.ExpandAnyGroupEmailRecipients(
+      cnxn, component_helpers.GetComponentCcIDs(issue, config))
+  direct_ccs, transitive_ccs = services.usergroup.ExpandAnyGroupEmailRecipients(
+      cnxn, list(issue.cc_ids))
+  der_direct_ccs, der_transitive_ccs = (
+      services.usergroup.ExpandAnyGroupEmailRecipients(
+          cnxn, list(issue.derived_cc_ids)))
+  # Remove cc's derived from components, which are grouped into their own
+  # notify-reason-group in ComputeComponentFieldAddrPerms().
+  # This means that an exact email cc'd by both a component and a rule will
+  # get an email that says they are only being notified because of the
+  # component.
+  # Note that a user directly cc'd due to a rule who is also part of a
+  # group cc'd due to a component, will get a message saying they're cc'd for
+  # both the rule and the component.
+  der_direct_ccs = list(set(der_direct_ccs).difference(set(direct_comp)))
+  der_transitive_ccs = list(set(der_transitive_ccs).difference(set(trans_comp)))
+
+  users_by_id.update(framework_views.MakeAllUserViews(
+      cnxn, services.user, transitive_owners, der_transitive_owners,
+      direct_comp, trans_comp, transitive_ccs, der_transitive_ccs))
+
+  # Notify interested people according to the reason for their interest:
+  # owners, component auto-cc'd users, cc'd users, starrers, and
+  # other notification addresses.
+  reporter_addr_perm_list = ComputeIssueChangeAddressPermList(
+      cnxn, reporter, project, issue, services, omit_addrs, users_by_id)
+  owner_addr_perm_list = ComputeIssueChangeAddressPermList(
+      cnxn, direct_owners + transitive_owners, project, issue,
+      services, omit_addrs, users_by_id)
+  old_owner_addr_perm_list = ComputeIssueChangeAddressPermList(
+      cnxn, old_direct_owners + old_transitive_owners, project, issue,
+      services, omit_addrs, users_by_id)
+  owner_addr_perm_set = set(owner_addr_perm_list)
+  old_owner_addr_perm_list = [ap for ap in old_owner_addr_perm_list
+                              if ap not in owner_addr_perm_set]
+  der_owner_addr_perm_list = ComputeIssueChangeAddressPermList(
+      cnxn, der_direct_owners + der_transitive_owners, project, issue,
+      services, omit_addrs, users_by_id)
+  cc_addr_perm_list = ComputeIssueChangeAddressPermList(
+      cnxn, direct_ccs, project, issue, services, omit_addrs, users_by_id)
+  transitive_cc_addr_perm_list = ComputeIssueChangeAddressPermList(
+      cnxn, transitive_ccs, project, issue, services, omit_addrs, users_by_id)
+  der_cc_addr_perm_list = ComputeIssueChangeAddressPermList(
+      cnxn, der_direct_ccs + der_transitive_ccs, project, issue,
+      services, omit_addrs, users_by_id)
+
+  starrer_addr_perm_list = []
+  sub_addr_perm_list = []
+  if not noisy or commenter_in_project:
+    # Avoid an OOM by only notifying a number of starrers that we can handle.
+    # And, we really should limit the number of emails that we send anyway.
+    max_starrers = settings.max_starrers_to_notify
+    starrer_ids = starrer_ids[-max_starrers:]
+    # Note: starrers can never be user groups.
+    starrer_addr_perm_list = (
+        ComputeIssueChangeAddressPermList(
+            cnxn, starrer_ids, project, issue,
+            services, omit_addrs, users_by_id,
+            pref_check_function=starrer_pref_check_function))
+
+    if include_subscribers:
+      sub_addr_perm_list = _GetSubscribersAddrPermList(
+          cnxn, services, issue, project, config, omit_addrs,
+          users_by_id)
+
+  # Get the list of addresses to notify based on filter rules.
+  issue_notify_addr_list = ComputeIssueNotificationAddrList(
+      cnxn, services, issue, omit_addrs)
+  # Get the list of addresses to notify based on project settings.
+  proj_notify_addr_list = []
+  if include_notify_all:
+    proj_notify_addr_list = ComputeProjectNotificationAddrList(
+        cnxn, services, project, contributor_could_view, omit_addrs)
+
+  group_reason_list = [
+      (reporter_addr_perm_list, REASON_REPORTER),
+      (owner_addr_perm_list, REASON_OWNER),
+      (old_owner_addr_perm_list, REASON_OLD_OWNER),
+      (der_owner_addr_perm_list, REASON_DEFAULT_OWNER),
+      (cc_addr_perm_list, REASON_CCD),
+      (transitive_cc_addr_perm_list, REASON_GROUP_CCD),
+      (der_cc_addr_perm_list, REASON_DEFAULT_CCD),
+  ]
+  group_reason_list.extend(ComputeComponentFieldAddrPerms(
+      cnxn, config, issue, project, services, omit_addrs,
+      users_by_id))
+  group_reason_list.extend(ComputeCustomFieldAddrPerms(
+      cnxn, config, issue, project, services, omit_addrs,
+      users_by_id))
+  group_reason_list.extend([
+      (starrer_addr_perm_list, REASON_STARRER),
+      (sub_addr_perm_list, REASON_SUBSCRIBER),
+      (issue_notify_addr_list, REASON_ALSO_NOTIFY),
+      (proj_notify_addr_list, REASON_ALL_NOTIFICATIONS),
+      ])
+  return group_reason_list
diff --git a/features/prettify.py b/features/prettify.py
new file mode 100644
index 0000000..bc64282
--- /dev/null
+++ b/features/prettify.py
@@ -0,0 +1,76 @@
+# 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
+
+"""Helper functions for source code syntax highlighting."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import ezt
+
+from framework import framework_constants
+
+
+# We only attempt to do client-side syntax highlighting on files that we
+# expect to be source code in languages that we support, and that are
+# reasonably sized.
+MAX_PRETTIFY_LINES = 3000
+
+
+def PrepareSourceLinesForHighlighting(file_contents):
+  """Parse a file into lines for highlighting.
+
+  Args:
+    file_contents: string contents of the source code file.
+
+  Returns:
+    A list of _SourceLine objects, one for each line in the source file.
+  """
+  return [_SourceLine(num + 1, line) for num, line
+          in enumerate(file_contents.splitlines())]
+
+
+class _SourceLine(object):
+  """Convenience class to represent one line of the source code display.
+
+  Attributes:
+      num: The line's location in the source file.
+      line: String source code line to display.
+  """
+
+  def __init__(self, num, line):
+    self.num = num
+    self.line = line
+
+  def __repr__(self):
+    return '%d: %s' % (self.num, self.line)
+
+
+def BuildPrettifyData(num_lines, path):
+  """Return page data to help configure google-code-prettify.
+
+  Args:
+    num_lines: int number of lines of source code in the file.
+    path: string path to the file, or just the filename.
+
+  Returns:
+    Dictionary that can be passed to EZT to render a page.
+  """
+  reasonable_size = num_lines < MAX_PRETTIFY_LINES
+
+  filename_lower = path[path.rfind('/') + 1:].lower()
+  ext = filename_lower[filename_lower.rfind('.') + 1:]
+
+  # Note that '' might be a valid entry in these maps.
+  prettify_class = framework_constants.PRETTIFY_CLASS_MAP.get(ext)
+  if prettify_class is None:
+    prettify_class = framework_constants.PRETTIFY_FILENAME_CLASS_MAP.get(
+        filename_lower)
+  supported_lang = prettify_class is not None
+
+  return {
+      'should_prettify': ezt.boolean(supported_lang and reasonable_size),
+      'prettify_class': prettify_class,
+      }
diff --git a/features/pubsub.py b/features/pubsub.py
new file mode 100644
index 0000000..a74ff22
--- /dev/null
+++ b/features/pubsub.py
@@ -0,0 +1,81 @@
+# Copyright 2019 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
+
+"""Task handlers for publishing issue updates onto a pub/sub topic.
+
+The pub/sub topic name is: `projects/{project-id}/topics/issue-updates`.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import httplib2
+import logging
+import sys
+
+import settings
+
+from googleapiclient.discovery import build
+from apiclient.errors import Error as ApiClientError
+from oauth2client.client import GoogleCredentials
+from oauth2client.client import Error as Oauth2ClientError
+
+from framework import exceptions
+from framework import jsonfeed
+
+
+class PublishPubsubIssueChangeTask(jsonfeed.InternalTask):
+  """JSON servlet that pushes issue update messages onto a pub/sub topic."""
+
+  def HandleRequest(self, mr):
+    """Push a message onto a pub/sub queue.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+    Returns:
+      A dictionary. If an error occurred, the 'error' field will be a string
+      containing the error message.
+    """
+    pubsub_client = set_up_pubsub_api()
+    if not pubsub_client:
+      return {
+        'error': 'Pub/Sub API init failure.',
+      }
+
+    issue_id = mr.GetPositiveIntParam('issue_id')
+    if not issue_id:
+      return {
+        'error': 'Cannot proceed without a valid issue ID.',
+      }
+    try:
+      issue = self.services.issue.GetIssue(mr.cnxn, issue_id, use_cache=False)
+    except exceptions.NoSuchIssueException:
+      return {
+        'error': 'Could not find issue with ID %s' % issue_id,
+      }
+
+    pubsub_client.projects().topics().publish(
+        topic=settings.pubsub_topic_id,
+        body={
+          'messages': [{
+            'attributes': {
+              'local_id': str(issue.local_id),
+              'project_name': str(issue.project_name),
+            },
+          }],
+        },
+      ).execute()
+
+    return {}
+
+
+def set_up_pubsub_api():
+  """Attempts to build and return a pub/sub API client."""
+  try:
+    return build('pubsub', 'v1', http=httplib2.Http(),
+        credentials=GoogleCredentials.get_application_default())
+  except (Oauth2ClientError, ApiClientError):
+    logging.error("Error setting up Pub/Sub API: %s" % sys.exc_info()[0])
+    return None
diff --git a/features/rerankhotlist.py b/features/rerankhotlist.py
new file mode 100644
index 0000000..fe235db
--- /dev/null
+++ b/features/rerankhotlist.py
@@ -0,0 +1,136 @@
+# 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
+
+"""Class that implements the reranking on the hotlistissues table page."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from features import features_bizobj
+from features import hotlist_helpers
+from framework import jsonfeed
+from framework import permissions
+from framework import sorting
+from services import features_svc
+from tracker import rerank_helpers
+
+
+class RerankHotlistIssue(jsonfeed.JsonFeed):
+  """Rerank an issue in a hotlist."""
+
+  def AssertBasePermission(self, mr):
+    super(RerankHotlistIssue, self).AssertBasePermission(mr)
+    if mr.target_id and mr.moved_ids and mr.split_above:
+      try:
+        hotlist = self._GetHotlist(mr)
+      except features_svc.NoSuchHotlistException:
+        return
+      edit_perm = permissions.CanEditHotlist(
+          mr.auth.effective_ids, mr.perms, hotlist)
+      if not edit_perm:
+        raise permissions.PermissionException(
+            'User is not allowed to re-rank this hotlist')
+
+  def HandleRequest(self, mr):
+    changed_ranks = self._GetNewRankings(mr)
+
+    if changed_ranks:
+      relations_to_change = dict(
+          (issue_id, rank) for issue_id, rank in changed_ranks)
+
+      self.services.features.UpdateHotlistItemsFields(
+          mr.cnxn, mr.hotlist_id, new_ranks=relations_to_change)
+
+      hotlist_items = self.services.features.GetHotlist(
+          mr.cnxn, mr.hotlist_id).items
+
+      # Note: Cannot use mr.hotlist because hotlist_issues
+      # of mr.hotlist is not updated
+
+      sorting.InvalidateArtValuesKeys(
+          mr.cnxn, [hotlist_item.issue_id for hotlist_item in hotlist_items])
+      (table_data, _) = hotlist_helpers.CreateHotlistTableData(
+          mr, hotlist_items, self.services)
+
+      json_table_data = [{
+          'cells': [{
+              'type': cell.type,
+              'values': [{
+                  'item': value.item,
+                  'isDerived': value.is_derived,
+              } for value in cell.values],
+              'colIndex': cell.col_index,
+              'align': cell.align,
+              'noWrap': cell.NOWRAP,
+              'nonColLabels': [{
+                  'value': label.value,
+                  'isDerived': label.is_derived,
+              } for label in cell.non_column_labels],
+          } for cell in table_row.cells],
+          'issueRef': table_row.issue_ref,
+          'idx': table_row.idx,
+          'projectName': table_row.project_name,
+          'projectURL': table_row.project_url,
+          'localID': table_row.local_id,
+          'issueID': table_row.issue_id,
+          'isStarred': table_row.starred,
+          'issueCleanURL': table_row.issue_clean_url,
+          'issueContextURL': table_row.issue_ctx_url,
+      } for table_row in table_data]
+
+      for row, json_row in zip(
+          [table_row for table_row in table_data], json_table_data):
+        if (row.group and row.group.cells):
+          json_row.update({'group': {
+              'rowsInGroup': row.group.rows_in_group,
+              'cells': [{'groupName': cell.group_name,
+                         'values': [{
+                          # TODO(jojwang): check if this gives error when there
+                          # is no value.item
+                             'item': value.item if value.item else 'None',
+                         } for value in cell.values],
+              } for cell in row.group.cells],
+          }})
+        else:
+          json_row['group'] = 'no'
+
+      return {'table_data': json_table_data}
+    else:
+      return {'table_data': ''}
+
+  def _GetHotlist(self, mr):
+    """Retrieve the current hotlist."""
+    if mr.hotlist_id is None:
+      return None
+    try:
+      hotlist = self.services.features.GetHotlist( mr.cnxn, mr.hotlist_id)
+    except features_svc.NoSuchHotlistException:
+      self.abort(404, 'hotlist not found')
+    return hotlist
+
+  def _GetNewRankings(self, mr):
+    """Compute new issue reference rankings."""
+    missing = False
+    if not (mr.target_id):
+      logging.info('No target_id.')
+      missing = True
+    if not (mr.moved_ids):
+      logging.info('No moved_ids.')
+      missing = True
+    if mr.split_above is None:
+      logging.info('No split_above.')
+      missing = True
+    if missing:
+      return
+
+    untouched_items = [
+        (item.issue_id, item.rank) for item in
+        mr.hotlist.items if item.issue_id not in mr.moved_ids]
+
+    lower, higher = features_bizobj.SplitHotlistIssueRanks(
+        mr.target_id, mr.split_above, untouched_items)
+    return rerank_helpers.GetInsertRankings(lower, higher, mr.moved_ids)
diff --git a/features/savedqueries.py b/features/savedqueries.py
new file mode 100644
index 0000000..5cc1bc8
--- /dev/null
+++ b/features/savedqueries.py
@@ -0,0 +1,76 @@
+# 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
+
+"""Page for showing a user's saved queries and subscription options."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from features import savedqueries_helpers
+from framework import framework_helpers
+from framework import permissions
+from framework import servlet
+from framework import urls
+
+
+class SavedQueries(servlet.Servlet):
+  """A page class that shows the user's saved queries."""
+
+  _PAGE_TEMPLATE = 'features/saved-queries-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    super(SavedQueries, self).AssertBasePermission(mr)
+    viewing_self = mr.viewed_user_auth.user_id == mr.auth.user_id
+    if not mr.auth.user_pb.is_site_admin and not viewing_self:
+      raise permissions.PermissionException(
+          'User not allowed to edit this user\'s saved queries')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    saved_queries = self.services.features.GetSavedQueriesByUserID(
+        mr.cnxn, mr.viewed_user_auth.user_id)
+    saved_query_views = [
+        savedqueries_helpers.SavedQueryView(
+            sq, idx + 1, mr.cnxn, self.services.project)
+        for idx, sq in enumerate(saved_queries)]
+
+    page_data = {
+        'canned_queries': saved_query_views,
+        'new_query_indexes': (
+            list(range(len(saved_queries) + 1,
+                  savedqueries_helpers.MAX_QUERIES + 1))),
+        'max_queries': savedqueries_helpers.MAX_QUERIES,
+        'user_tab_mode': 'st4',
+        'viewing_user_page': ezt.boolean(True),
+        }
+    return page_data
+
+  def ProcessFormData(self, mr, post_data):
+    """Validate and store the contents of the issues tracker admin page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: HTML form data from the request.
+
+    Returns:
+      String URL to redirect the user to, or None if response was already sent.
+    """
+    existing_queries = savedqueries_helpers.ParseSavedQueries(
+        mr.cnxn, post_data, self.services.project)
+    added_queries = savedqueries_helpers.ParseSavedQueries(
+        mr.cnxn, post_data, self.services.project, prefix='new_')
+    saved_queries = existing_queries + added_queries
+
+    self.services.features.UpdateUserSavedQueries(
+        mr.cnxn, mr.viewed_user_auth.user_id, saved_queries)
+
+    return framework_helpers.FormatAbsoluteURL(
+        mr, '/u/%s%s' % (mr.viewed_username, urls.SAVED_QUERIES),
+        include_project=False, saved=1, ts=int(time.time()))
diff --git a/features/savedqueries_helpers.py b/features/savedqueries_helpers.py
new file mode 100644
index 0000000..a6cb46f
--- /dev/null
+++ b/features/savedqueries_helpers.py
@@ -0,0 +1,116 @@
+# 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
+
+"""Utility functions and classes for dealing with saved queries.
+
+Saved queries can be part of the project issue config, where they are
+called "canned queries".  Or, they can be personal saved queries that
+may appear in the search scope drop-down, on the user's dashboard, or
+in the user's subscription.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import re
+
+from framework import template_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+MAX_QUERIES = 100
+
+
+def ParseSavedQueries(cnxn, post_data, project_service, prefix=''):
+  """Parse form data for the Saved Queries part of an admin form."""
+  saved_queries = []
+  for i in range(1, MAX_QUERIES + 1):
+    if ('%ssavedquery_name_%s' % (prefix, i)) not in post_data:
+      continue  # skip any entries that are blank or have no predicate.
+
+    name = post_data['%ssavedquery_name_%s' % (prefix, i)].strip()
+    if not name:
+      continue  # skip any blank entries
+
+    if '%ssavedquery_id_%s' % (prefix, i) in post_data:
+      query_id = int(post_data['%ssavedquery_id_%s' % (prefix, i)])
+    else:
+      query_id = None  # a new query_id will be generated by the DB.
+
+    project_names_str = post_data.get(
+        '%ssavedquery_projects_%s' % (prefix, i), '')
+    project_names = [pn.strip().lower()
+                     for pn in re.split('[],;\s]+', project_names_str)
+                     if pn.strip()]
+    project_ids = list(project_service.LookupProjectIDs(
+        cnxn, project_names).values())
+
+    base_id = int(post_data['%ssavedquery_base_%s' % (prefix, i)])
+    query = post_data['%ssavedquery_query_%s' % (prefix, i)].strip()
+
+    subscription_mode_field = '%ssavedquery_sub_mode_%s' % (prefix, i)
+    if subscription_mode_field in post_data:
+      subscription_mode = post_data[subscription_mode_field].strip()
+    else:
+      subscription_mode = None
+
+    saved_queries.append(tracker_bizobj.MakeSavedQuery(
+        query_id, name, base_id, query, subscription_mode=subscription_mode,
+        executes_in_project_ids=project_ids))
+
+  return saved_queries
+
+
+class SavedQueryView(template_helpers.PBProxy):
+  """Wrapper class that makes it easier to display SavedQuery via EZT."""
+
+  def __init__(self, sq, idx, cnxn, project_service):
+    """Store relevant values for later display by EZT.
+
+    Args:
+      sq: A SavedQuery protocol buffer.
+      idx: Int index of this saved query in the list.
+      cnxn: connection to SQL database.
+      project_service: persistence layer for project data.
+    """
+    super(SavedQueryView, self).__init__(sq)
+
+    self.idx = idx
+    base_query_name = 'All issues'
+    for canned in tracker_constants.DEFAULT_CANNED_QUERIES:
+      qid, name, _base_id, _query = canned
+      if qid == sq.base_query_id:
+        base_query_name = name
+
+    if cnxn:
+      project_names = sorted(project_service.LookupProjectNames(
+          cnxn, sq.executes_in_project_ids).values())
+      self.projects = ', '.join(project_names)
+    else:
+      self.projects = ''
+
+    self.docstring = '[%s] %s' % (base_query_name, sq.query)
+
+
+def SavedQueryToCond(saved_query):
+  """Convert a SavedQuery PB to a user query condition string."""
+  if saved_query is None:
+    return ''
+
+  base_cond = tracker_bizobj.GetBuiltInQuery(saved_query.base_query_id)
+  cond = '%s %s' % (base_cond, saved_query.query)
+  return cond.strip()
+
+
+def SavedQueryIDToCond(cnxn, features_service, query_id):
+  """Convert a can/query ID to a user query condition string."""
+  built_in = tracker_bizobj.GetBuiltInQuery(query_id)
+  if built_in:
+    return built_in
+
+  saved_query = features_service.GetSavedQuery(cnxn, query_id)
+  return SavedQueryToCond(saved_query)
diff --git a/features/send_notifications.py b/features/send_notifications.py
new file mode 100644
index 0000000..e7ee4d4
--- /dev/null
+++ b/features/send_notifications.py
@@ -0,0 +1,118 @@
+# Copyright 2018 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
+
+"""Functions that prepare and send email notifications of issue changes."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+
+import logging
+
+from features import features_constants
+from framework import cloud_tasks_helpers
+from framework import framework_constants
+from framework import urls
+from tracker import tracker_bizobj
+
+
+def PrepareAndSendIssueChangeNotification(
+    issue_id, hostport, commenter_id, send_email=True,
+    old_owner_id=framework_constants.NO_USER_SPECIFIED, comment_id=None):
+  """Create a task to notify users that an issue has changed.
+
+  Args:
+    issue_id: int ID of the issue that was changed.
+    hostport: string domain name and port number from the HTTP request.
+    commenter_id: int user ID of the user who made the comment.
+    send_email: True if email notifications should be sent.
+    old_owner_id: optional user ID of owner before the current change took
+      effect. They will also be notified.
+    comment_id: int Comment ID of the comment that was entered.
+
+  Returns nothing.
+  """
+  if old_owner_id is None:
+    old_owner_id = framework_constants.NO_USER_SPECIFIED
+  params = dict(
+      issue_id=issue_id, commenter_id=commenter_id, comment_id=comment_id,
+      hostport=hostport, old_owner_id=old_owner_id, send_email=int(send_email))
+  task = cloud_tasks_helpers.generate_simple_task(
+      urls.NOTIFY_ISSUE_CHANGE_TASK + '.do', params)
+  cloud_tasks_helpers.create_task(
+      task, queue=features_constants.QUEUE_NOTIFICATIONS)
+
+  task = cloud_tasks_helpers.generate_simple_task(
+      urls.PUBLISH_PUBSUB_ISSUE_CHANGE_TASK + '.do', params)
+  cloud_tasks_helpers.create_task(task, queue=features_constants.QUEUE_PUBSUB)
+
+
+def PrepareAndSendIssueBlockingNotification(
+    issue_id, hostport, delta_blocker_iids, commenter_id, send_email=True):
+  """Create a task to follow up on an issue blocked_on change."""
+  if not delta_blocker_iids:
+    return  # No notification is needed
+
+  params = dict(
+      issue_id=issue_id, commenter_id=commenter_id, hostport=hostport,
+      send_email=int(send_email),
+      delta_blocker_iids=','.join(str(iid) for iid in delta_blocker_iids))
+
+  task = cloud_tasks_helpers.generate_simple_task(
+      urls.NOTIFY_BLOCKING_CHANGE_TASK + '.do', params)
+  cloud_tasks_helpers.create_task(
+      task, queue=features_constants.QUEUE_NOTIFICATIONS)
+
+
+def PrepareAndSendApprovalChangeNotification(
+    issue_id, approval_id, hostport, comment_id, send_email=True):
+  """Create a task to follow up on an approval change."""
+
+  params = dict(
+      issue_id=issue_id, approval_id=approval_id, hostport=hostport,
+      comment_id=comment_id, send_email=int(send_email))
+
+  task = cloud_tasks_helpers.generate_simple_task(
+      urls.NOTIFY_APPROVAL_CHANGE_TASK + '.do', params)
+  cloud_tasks_helpers.create_task(
+      task, queue=features_constants.QUEUE_NOTIFICATIONS)
+
+
+def SendIssueBulkChangeNotification(
+    issue_ids, hostport, old_owner_ids, comment_text, commenter_id,
+    amendments, send_email, users_by_id):
+  """Create a task to follow up on an issue blocked_on change."""
+  amendment_lines = []
+  for up in amendments:
+    line = '    %s: %s' % (
+        tracker_bizobj.GetAmendmentFieldName(up),
+        tracker_bizobj.AmendmentString(up, users_by_id))
+    if line not in amendment_lines:
+      amendment_lines.append(line)
+
+  params = dict(
+      issue_ids=','.join(str(iid) for iid in issue_ids),
+      commenter_id=commenter_id, hostport=hostport, send_email=int(send_email),
+      old_owner_ids=','.join(str(uid) for uid in old_owner_ids),
+      comment_text=comment_text, amendments='\n'.join(amendment_lines))
+
+  task = cloud_tasks_helpers.generate_simple_task(
+      urls.NOTIFY_BULK_CHANGE_TASK + '.do', params)
+  cloud_tasks_helpers.create_task(
+      task, queue=features_constants.QUEUE_NOTIFICATIONS)
+
+
+def PrepareAndSendDeletedFilterRulesNotification(
+    project_id, hostport, filter_rule_strs):
+  """Create a task to notify project owners of deleted filter rules."""
+
+  params = dict(
+      project_id=project_id, filter_rules=','.join(filter_rule_strs),
+      hostport=hostport)
+
+  task = cloud_tasks_helpers.generate_simple_task(
+      urls.NOTIFY_RULES_DELETED_TASK + '.do', params)
+  cloud_tasks_helpers.create_task(
+      task, queue=features_constants.QUEUE_NOTIFICATIONS)
diff --git a/features/spammodel.py b/features/spammodel.py
new file mode 100644
index 0000000..dc5e715
--- /dev/null
+++ b/features/spammodel.py
@@ -0,0 +1,92 @@
+# 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
+""" Tasks and handlers for maintaining the spam classifier model. These
+    should be run via cron and task queue rather than manually.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import csv
+import logging
+import webapp2
+import cloudstorage
+import json
+
+from datetime import date
+from datetime import datetime
+from datetime import timedelta
+from google.appengine.api import app_identity
+
+from framework import cloud_tasks_helpers
+from framework import gcs_helpers
+from framework import servlet
+from framework import urls
+
+class TrainingDataExport(webapp2.RequestHandler):
+  """Trigger a training data export task"""
+  def get(self):
+    task = cloud_tasks_helpers.generate_simple_task(
+        urls.SPAM_DATA_EXPORT_TASK + '.do', {})
+    cloud_tasks_helpers.create_task(task)
+
+
+BATCH_SIZE = 1000
+
+class TrainingDataExportTask(servlet.Servlet):
+  """Export any human-labeled ham or spam from the previous day. These
+     records will be used by a subsequent task to create an updated model.
+  """
+  CHECK_SECURITY_TOKEN = False
+
+  def ProcessFormData(self, mr, post_data):
+    logging.info("Training data export initiated.")
+
+    bucket_name = app_identity.get_default_gcs_bucket_name()
+    date_str = date.today().isoformat()
+    export_target_path = '/' + bucket_name + '/spam_training_data/' + date_str
+    total_issues = 0
+
+    with cloudstorage.open(export_target_path, mode='w',
+        content_type=None, options=None, retry_params=None) as gcs_file:
+
+      csv_writer = csv.writer(gcs_file, delimiter=',', quotechar='"',
+          quoting=csv.QUOTE_ALL, lineterminator='\n')
+
+      since = datetime.now() - timedelta(days=7)
+
+      # TODO: Further pagination.
+      issues, first_comments, _count = (
+          self.services.spam.GetTrainingIssues(
+              mr.cnxn, self.services.issue, since, offset=0, limit=BATCH_SIZE))
+      total_issues += len(issues)
+      for issue in issues:
+        # Cloud Prediction API doesn't allow newlines in the training data.
+        fixed_summary = issue.summary.replace('\r\n', ' ')
+        fixed_comment = first_comments[issue.issue_id].replace('\r\n', ' ')
+        email = self.services.user.LookupUserEmail(mr.cnxn, issue.reporter_id)
+        csv_writer.writerow([
+            'spam' if issue.is_spam else 'ham',
+            fixed_summary.encode('utf-8'), fixed_comment.encode('utf-8'), email,
+        ])
+
+      comments = (
+          self.services.spam.GetTrainingComments(
+              mr.cnxn, self.services.issue, since, offset=0, limit=BATCH_SIZE))
+      total_comments = len(comments)
+      for comment in comments:
+        # Cloud Prediction API doesn't allow newlines in the training data.
+        fixed_comment = comment.content.replace('\r\n', ' ')
+        email = self.services.user.LookupUserEmail(mr.cnxn, comment.user_id)
+        csv_writer.writerow([
+            'spam' if comment.is_spam else 'ham',
+            # Comments don't have summaries, so it's blank:
+            '', fixed_comment.encode('utf-8'), email
+        ])
+
+    self.response.body = json.dumps({
+        "exported_issue_count": total_issues,
+        "exported_comment_count": total_comments,
+    })
diff --git a/features/spamtraining.py b/features/spamtraining.py
new file mode 100644
index 0000000..625fa53
--- /dev/null
+++ b/features/spamtraining.py
@@ -0,0 +1,63 @@
+"""Cron job to train spam model with all spam data."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import settings
+import time
+
+from googleapiclient import discovery
+from googleapiclient import errors
+from google.appengine.api import app_identity
+from oauth2client.client import GoogleCredentials
+import webapp2
+
+class TrainSpamModelCron(webapp2.RequestHandler):
+
+  """Submit a job to ML Engine which uploads a spam classification model by
+     training on an already packaged trainer.
+  """
+  def get(self):
+
+    credentials = GoogleCredentials.get_application_default()
+    ml = discovery.build('ml', 'v1', credentials=credentials)
+
+    app_id = app_identity.get_application_id()
+    project_id = 'projects/%s' % (app_id)
+    job_id = 'spam_trainer_%d' % time.time()
+    training_input = {
+        'scaleTier': 'BASIC',
+        'packageUris': [
+            settings.trainer_staging
+            if app_id == "monorail-staging" else
+            settings.trainer_prod
+        ],
+        'pythonModule': 'trainer.task',
+        'args': [
+            '--train-steps',
+            '1000',
+            '--verbosity',
+            'DEBUG',
+            '--gcs-bucket',
+            'monorail-prod.appspot.com',
+            '--gcs-prefix',
+            'spam_training_data',
+            '--trainer-type',
+            'spam'
+        ],
+        'region': 'us-central1',
+        'jobDir': 'gs://%s-mlengine/%s' % (app_id, job_id),
+        'runtimeVersion': '1.2'
+    }
+    job_info = {
+        'jobId': job_id,
+        'trainingInput': training_input
+    }
+    request = ml.projects().jobs().create(parent=project_id, body=job_info)
+
+    try:
+      response = request.execute()
+      logging.info(response)
+    except errors.HttpError, err:
+      logging.error(err._get_reason())
diff --git a/features/test/__init__.py b/features/test/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/features/test/__init__.py
diff --git a/features/test/activities_test.py b/features/test/activities_test.py
new file mode 100644
index 0000000..4eae1ab
--- /dev/null
+++ b/features/test/activities_test.py
@@ -0,0 +1,143 @@
+# 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
+
+"""Unittests for monorail.feature.activities."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mox
+
+from features import activities
+from framework import framework_views
+from framework import profiler
+from proto import tracker_pb2
+from proto import user_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class ActivitiesTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService(),
+    )
+
+    self.project_name = 'proj'
+    self.project_id = 987
+    self.project = self.services.project.TestAddProject(
+        self.project_name, project_id=self.project_id,
+        process_inbound_email=True)
+
+    self.issue_id = 11
+    self.issue_local_id = 100
+    self.issue = tracker_pb2.Issue()
+    self.issue.issue_id = self.issue_id
+    self.issue.project_id = self.project_id
+    self.issue.local_id = self.issue_local_id
+    self.services.issue.TestAddIssue(self.issue)
+
+    self.comment_id = 123
+    self.comment_timestamp = 120
+    self.user = self.services.user.TestAddUser('testuser@example.com', 2)
+    self.user_id = self.user.user_id
+    self.mr_after = 1234
+
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testActivities_NoUpdates(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    updates_data = activities.GatherUpdatesData(
+        self.services, mr, project_ids=[256],
+        user_ids=None, ending=None, updates_page_url=None, autolink=None,
+        highlight=None)
+
+    self.assertIsNone(updates_data['pagination'])
+    self.assertIsNone(updates_data['no_stars'])
+    self.assertIsNone(updates_data['updates_data'])
+    self.assertEqual('yes', updates_data['no_activities'])
+    self.assertIsNone(updates_data['ending_type'])
+
+  def createAndAssertUpdates(self, project_ids=None, user_ids=None,
+                             ascending=True):
+    comment_1 = tracker_pb2.IssueComment(
+        id=self.comment_id, issue_id=self.issue_id,
+        project_id=self.project_id, user_id=self.user_id,
+        content='this is the 1st comment',
+        timestamp=self.comment_timestamp)
+    self.mox.StubOutWithMock(self.services.issue, 'GetIssueActivity')
+
+    after = 0
+    if ascending:
+      after = self.mr_after
+    self.services.issue.GetIssueActivity(
+        mox.IgnoreArg(), num=50, before=0, after=after, project_ids=project_ids,
+        user_ids=user_ids, ascending=ascending).AndReturn([comment_1])
+
+    self.mox.ReplayAll()
+
+    mr = testing_helpers.MakeMonorailRequest()
+    if ascending:
+      mr.after = self.mr_after
+
+    updates_page_url='testing/testing'
+    updates_data = activities.GatherUpdatesData(
+        self.services, mr, project_ids=project_ids,
+        user_ids=user_ids, ending=None, autolink=None,
+        highlight='highlightme', updates_page_url=updates_page_url)
+    self.mox.VerifyAll()
+
+    if mr.after:
+      pagination = updates_data['pagination']
+      self.assertIsNone(pagination.last)
+      self.assertEqual(
+          '%s?before=%d' %
+          (updates_page_url.split('/')[-1], self.comment_timestamp),
+          pagination.next_url)
+      self.assertEqual(
+          '%s?after=%d' %
+          (updates_page_url.split('/')[-1], self.comment_timestamp),
+          pagination.prev_url)
+
+    activity_view = updates_data['updates_data'].older[0]
+    self.assertEqual(
+        '<a class="ot-issue-link"\n \n '
+        'href="/p//issues/detail?id=%s#c_ts%s"\n >'
+        'issue %s</a>\n\n()\n\n\n\n\n \n commented on' % (
+            self.issue_local_id, self.comment_timestamp, self.issue_local_id),
+        activity_view.escaped_title)
+    self.assertEqual(
+        '<span class="ot-issue-comment">\n this is the 1st comment\n</span>',
+        activity_view.escaped_body)
+    self.assertEqual('highlightme', activity_view.highlight)
+    self.assertEqual(self.project_name, activity_view.project_name)
+
+  def testActivities_AscendingProjectUpdates(self):
+    self.createAndAssertUpdates(project_ids=[self.project_id], ascending=True)
+
+  def testActivities_DescendingProjectUpdates(self):
+    self.createAndAssertUpdates(project_ids=[self.project_id], ascending=False)
+
+  def testActivities_AscendingUserUpdates(self):
+    self.createAndAssertUpdates(user_ids=[self.user_id], ascending=True)
+
+  def testActivities_DescendingUserUpdates(self):
+    self.createAndAssertUpdates(user_ids=[self.user_id], ascending=False)
+
+  def testActivities_SpecifyProjectAndUser(self):
+    self.createAndAssertUpdates(
+        project_ids=[self.project_id], user_ids=[self.user_id], ascending=False)
diff --git a/features/test/alert2issue_test.py b/features/test/alert2issue_test.py
new file mode 100644
index 0000000..3b1b6d1
--- /dev/null
+++ b/features/test/alert2issue_test.py
@@ -0,0 +1,677 @@
+# Copyright 2019 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
+
+"""Unittests for monorail.feature.alert2issue."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import email
+import unittest
+from mock import patch
+import mox
+from parameterized import parameterized
+
+from features import alert2issue
+from framework import authdata
+from framework import emailfmt
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_helpers
+
+AlertEmailHeader = emailfmt.AlertEmailHeader
+
+
+class TestData(object):
+  """Contains constants or such objects that are intended to be read-only."""
+  cnxn = 'fake cnxn'
+  test_issue_local_id = 100
+  component_id = 123
+  trooper_queue = 'my-trooper-bug-queue'
+
+  project_name = 'proj'
+  project_addr = '%s+ALERT+%s@monorail.example.com' % (
+      project_name, trooper_queue)
+  project_id = 987
+
+  from_addr = 'user@monorail.example.com'
+  user_id = 111
+
+  msg_body = 'this is the body'
+  msg_subject = 'this is the subject'
+  msg = testing_helpers.MakeMessage(
+      testing_helpers.ALERT_EMAIL_HEADER_LINES, msg_body)
+
+  incident_id = msg.get(AlertEmailHeader.INCIDENT_ID)
+  incident_label = alert2issue._GetIncidentLabel(incident_id)
+
+  # All the tests in this class use the following alert properties, and
+  # the generator functions/logic should be tested in a separate class.
+  alert_props = {
+      'owner_id': 0,
+      'cc_ids': [],
+      'status': 'Available',
+      'incident_label': incident_label,
+      'priority': 'Pri-0',
+      'trooper_queue': trooper_queue,
+      'field_values': [],
+      'labels': [
+          'Restrict-View-Google', 'Pri-0', incident_label, trooper_queue
+      ],
+      'component_ids': [component_id],
+  }
+
+
+class ProcessEmailNotificationTests(unittest.TestCase, TestData):
+  """Implements unit tests for alert2issue.ProcessEmailNotification."""
+  def setUp(self):
+    # services
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService(),
+        features=fake.FeaturesService())
+
+    # project
+    self.project = self.services.project.TestAddProject(
+        self.project_name, project_id=self.project_id,
+        process_inbound_email=True, contrib_ids=[self.user_id])
+
+    # config
+    proj_config = fake.MakeTestConfig(self.project_id, [], ['Available'])
+    comp_def_1 = tracker_pb2.ComponentDef(
+        component_id=123, project_id=987, path='FOO', docstring='foo docstring')
+    proj_config.component_defs = [comp_def_1]
+    self.services.config.StoreConfig(self.cnxn, proj_config)
+
+    # sender
+    self.auth = authdata.AuthData(user_id=self.user_id, email=self.from_addr)
+
+    # issue
+    self.issue = tracker_pb2.Issue(
+        project_id=self.project_id,
+        local_id=self.test_issue_local_id,
+        summary=self.msg_subject,
+        reporter_id=self.user_id,
+        component_ids=[self.component_id],
+        status=self.alert_props['status'],
+        labels=self.alert_props['labels'],
+    )
+    self.services.issue.TestAddIssue(self.issue)
+
+    # Patch send_notifications functions.
+    self.notification_patchers = [
+        patch('features.send_notifications.%s' % func, spec=True)
+        for func in [
+            'PrepareAndSendIssueBlockingNotification',
+            'PrepareAndSendIssueChangeNotification',
+        ]
+    ]
+    self.blocking_notification = self.notification_patchers[0].start()
+    self.blocking_notification = self.notification_patchers[1].start()
+
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.notification_patchers[0].stop()
+    self.notification_patchers[1].stop()
+
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testGoogleAddrsAreAllowlistedSender(self):
+    self.assertTrue(alert2issue.IsAllowlisted('test@google.com'))
+    self.assertFalse(alert2issue.IsAllowlisted('test@notgoogle.com'))
+
+  def testSkipNotification_IfFromNonAllowlistedSender(self):
+    self.mox.StubOutWithMock(alert2issue, 'IsAllowlisted')
+    alert2issue.IsAllowlisted(self.from_addr).AndReturn(False)
+
+    # None of them should be called, if the sender has not been allowlisted.
+    self.mox.StubOutWithMock(self.services.issue, 'CreateIssueComment')
+    self.mox.StubOutWithMock(self.services.issue, 'CreateIssue')
+    self.mox.ReplayAll()
+
+    alert2issue.ProcessEmailNotification(
+        self.services, self.cnxn, self.project, self.project_addr,
+        self.from_addr, self.auth, self.msg_subject, self.msg_body,
+        self.incident_label, self.msg, self.trooper_queue)
+    self.mox.VerifyAll()
+
+  def testSkipNotification_TooLongComment(self):
+    self.mox.StubOutWithMock(alert2issue, 'IsAllowlisted')
+    alert2issue.IsAllowlisted(self.from_addr).AndReturn(True)
+    self.mox.StubOutWithMock(alert2issue, 'IsCommentSizeReasonable')
+    alert2issue.IsCommentSizeReasonable(
+        'Filed by %s on behalf of %s\n\n%s' %
+        (self.auth.email, self.from_addr, self.msg_body)).AndReturn(False)
+
+    # None of them should be called, if the comment is too long.
+    self.mox.StubOutWithMock(self.services.issue, 'CreateIssueComment')
+    self.mox.StubOutWithMock(self.services.issue, 'CreateIssue')
+    self.mox.ReplayAll()
+
+    alert2issue.ProcessEmailNotification(
+        self.services, self.cnxn, self.project, self.project_addr,
+        self.from_addr, self.auth, self.msg_subject, self.msg_body,
+        self.incident_label, self.msg, self.trooper_queue)
+    self.mox.VerifyAll()
+
+  def testProcessNotification_IfFromAllowlistedSender(self):
+    self.mox.StubOutWithMock(alert2issue, 'IsAllowlisted')
+    alert2issue.IsAllowlisted(self.from_addr).AndReturn(True)
+
+    self.mox.StubOutWithMock(tracker_helpers, 'LookupComponentIDs')
+    tracker_helpers.LookupComponentIDs(
+        ['Infra'],
+        mox.IgnoreArg()).AndReturn([1])
+    self.mox.StubOutWithMock(self.services.issue, 'CreateIssueComment')
+    self.mox.StubOutWithMock(self.services.issue, 'CreateIssue')
+    self.mox.ReplayAll()
+
+    # Either of the methods should be called, if the sender is allowlisted.
+    with self.assertRaises(mox.UnexpectedMethodCallError):
+      alert2issue.ProcessEmailNotification(
+          self.services, self.cnxn, self.project, self.project_addr,
+          self.from_addr, self.auth, self.msg_subject, self.msg_body,
+          self.incident_label, self.msg, self.trooper_queue)
+
+    self.mox.VerifyAll()
+
+  def testIssueCreated_ForNewIncident(self):
+    """Tests if a new issue is created for a new incident."""
+    self.mox.StubOutWithMock(alert2issue, 'IsAllowlisted')
+    alert2issue.IsAllowlisted(self.from_addr).AndReturn(True)
+
+    # FindAlertIssue() returns None for a new incident.
+    self.mox.StubOutWithMock(alert2issue, 'FindAlertIssue')
+    alert2issue.FindAlertIssue(
+        self.services, self.cnxn, self.project.project_id,
+        self.incident_label).AndReturn(None)
+
+    # Mock GetAlertProperties() to create the issue with the expected
+    # properties.
+    self.mox.StubOutWithMock(alert2issue, 'GetAlertProperties')
+    alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.msg).AndReturn(self.alert_props)
+
+    self.mox.ReplayAll()
+    alert2issue.ProcessEmailNotification(
+        self.services, self.cnxn, self.project, self.project_addr,
+        self.from_addr, self.auth, self.msg_subject, self.msg_body,
+        self.incident_id, self.msg, self.trooper_queue)
+
+    # the local ID of the newly created issue should be +1 from the highest ID
+    # in the existing issues.
+    comments = self._verifyIssue(self.test_issue_local_id + 1, self.alert_props)
+    self.assertEqual(comments[0].content,
+                     'Filed by %s on behalf of %s\n\n%s' % (
+                         self.from_addr, self.from_addr, self.msg_body))
+
+    self.mox.VerifyAll()
+
+  def testProcessEmailNotification_ExistingIssue(self):
+    """When an alert for an ongoing incident comes in, add a comment."""
+    self.mox.StubOutWithMock(alert2issue, 'IsAllowlisted')
+    alert2issue.IsAllowlisted(self.from_addr).AndReturn(True)
+
+    # FindAlertIssue() returns None for a new incident.
+    self.mox.StubOutWithMock(alert2issue, 'FindAlertIssue')
+    alert2issue.FindAlertIssue(
+        self.services, self.cnxn, self.project.project_id,
+        self.incident_label).AndReturn(self.issue)
+
+    # Mock GetAlertProperties() to create the issue with the expected
+    # properties.
+    self.mox.StubOutWithMock(alert2issue, 'GetAlertProperties')
+    alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.msg).AndReturn(self.alert_props)
+
+    self.mox.ReplayAll()
+
+    # Before processing the notification, ensures that there is only 1 comment
+    # in the test issue.
+    comments = self._verifyIssue(self.test_issue_local_id, self.alert_props)
+    self.assertEqual(len(comments), 1)
+
+    # Process
+    alert2issue.ProcessEmailNotification(
+        self.services, self.cnxn, self.project, self.project_addr,
+        self.from_addr, self.auth, self.msg_subject, self.msg_body,
+        self.incident_id, self.msg, self.trooper_queue)
+
+    # Now, it should have a new comment added.
+    comments = self._verifyIssue(self.test_issue_local_id, self.alert_props)
+    self.assertEqual(len(comments), 2)
+    self.assertEqual(comments[1].content,
+                     'Filed by %s on behalf of %s\n\n%s' % (
+                         self.from_addr, self.from_addr, self.msg_body))
+
+    self.mox.VerifyAll()
+
+  def _verifyIssue(self, local_issue_id, alert_props):
+    actual_issue = self.services.issue.GetIssueByLocalID(
+        self.cnxn, self.project.project_id, local_issue_id)
+    actual_comments = self.services.issue.GetCommentsForIssue(
+        self.cnxn, actual_issue.issue_id)
+
+    self.assertEqual(actual_issue.summary, self.msg_subject)
+    self.assertEqual(actual_issue.status, alert_props['status'])
+    self.assertEqual(actual_issue.reporter_id, self.user_id)
+    self.assertEqual(actual_issue.component_ids, [self.component_id])
+    if alert_props['owner_id']:
+      self.assertEqual(actual_issue.owner_id, alert_props['owner_id'])
+    self.assertEqual(sorted(actual_issue.labels), sorted(alert_props['labels']))
+    return actual_comments
+
+
+class GetAlertPropertiesTests(unittest.TestCase, TestData):
+  """Implements unit tests for alert2issue.GetAlertProperties."""
+  def assertSubset(self, lhs, rhs):
+    if not (lhs <= rhs):
+      raise AssertionError('%s not a subset of %s' % (lhs, rhs))
+
+  def assertCaseInsensitiveEqual(self, lhs, rhs):
+    self.assertEqual(lhs if lhs is None else lhs.lower(),
+                     rhs if lhs is None else rhs.lower())
+
+  def setUp(self):
+    # services
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService())
+
+    # project
+    self.project = self.services.project.TestAddProject(
+        self.project_name, project_id=self.project_id,
+        process_inbound_email=True, contrib_ids=[self.user_id])
+
+    proj_config = fake.MakeTestConfig(
+        self.project_id,
+        [
+            # test labels for Pri field
+            'Pri-0', 'Pri-1', 'Pri-2', 'Pri-3',
+            # test labels for OS field
+            'OS-Android', 'OS-Windows',
+            # test labels for Type field
+            'Type-Bug', 'Type-Bug-Regression', 'Type-Bug-Security', 'Type-Task',
+        ],
+        ['Assigned', 'Available', 'Unconfirmed']
+    )
+    self.services.config.StoreConfig(self.cnxn, proj_config)
+
+    # create a test email message, which tests can alternate the header values
+    # to verify the behaviour of a given parser function.
+    self.test_msg = email.Message.Message()
+    for key, value in self.msg.items():
+      self.test_msg[key] = value
+
+    self.mox = mox.Mox()
+
+  @parameterized.expand([
+      (None,),
+      ('',),
+      (' ',),
+  ])
+  def testDefaultComponent(self, header_value):
+    """Checks if the default component is Infra."""
+    self.test_msg.replace_header(AlertEmailHeader.COMPONENT, header_value)
+    self.mox.StubOutWithMock(tracker_helpers, 'LookupComponentIDs')
+    tracker_helpers.LookupComponentIDs(
+        ['Infra'],
+        mox.IgnoreArg()).AndReturn([self.component_id])
+
+    self.mox.ReplayAll()
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+    self.assertEqual(props['component_ids'], [self.component_id])
+    self.mox.VerifyAll()
+
+  @parameterized.expand([
+      # an existing single component with componentID 1
+      ({'Infra': 1}, [1]),
+      # 3 of existing components
+      ({'Infra': 1, 'Foo': 2, 'Bar': 3}, [1, 2, 3]),
+      # a non-existing component
+      ({'Infra': None}, []),
+      # 3 of non-existing components
+      ({'Infra': None, 'Foo': None, 'Bar': None}, []),
+      # a mix of existing and non-existing components
+      ({'Infra': 1, 'Foo': None, 'Bar': 2}, [1, 2]),
+  ])
+  def testGetComponentIDs(self, components, expected_component_ids):
+    """Tests _GetComponentIDs."""
+    self.test_msg.replace_header(
+        AlertEmailHeader.COMPONENT, ','.join(sorted(components.keys())))
+
+    self.mox.StubOutWithMock(tracker_helpers, 'LookupComponentIDs')
+    tracker_helpers.LookupComponentIDs(
+        sorted(components.keys()),
+        mox.IgnoreArg()).AndReturn(
+            [components[key] for key in sorted(components.keys())
+             if components[key]]
+        )
+
+    self.mox.ReplayAll()
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+    self.assertEqual(sorted(props['component_ids']),
+                     sorted(expected_component_ids))
+    self.mox.VerifyAll()
+
+
+  def testLabelsWithNecessaryValues(self):
+    """Checks if the labels contain all the necessary values."""
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+
+    # This test assumes that the test message contains non-empty values for
+    # all the headers.
+    self.assertTrue(props['incident_label'])
+    self.assertTrue(props['priority'])
+    self.assertTrue(props['issue_type'])
+    self.assertTrue(props['oses'])
+
+    # Here are a list of the labels that props['labels'] should contain
+    self.assertIn('Restrict-View-Google'.lower(), props['labels'])
+    self.assertIn(self.trooper_queue, props['labels'])
+    self.assertIn(props['incident_label'], props['labels'])
+    self.assertIn(props['priority'], props['labels'])
+    self.assertIn(props['issue_type'], props['labels'])
+    for os in props['oses']:
+      self.assertIn(os, props['labels'])
+
+  @parameterized.expand([
+      (None, 0),
+      ('', 0),
+      (' ', 0),
+  ])
+  def testDefaultOwnerID(self, header_value, expected_owner_id):
+    """Checks if _GetOwnerID returns None in default."""
+    self.test_msg.replace_header(AlertEmailHeader.OWNER, header_value)
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+    self.assertEqual(props['owner_id'], expected_owner_id)
+
+  @parameterized.expand(
+      [
+          # an existing user with userID 1.
+          ('owner@example.org', 1),
+          # a non-existing user.
+          ('owner@example.org', 0),
+      ])
+  def testGetOwnerID(self, owner, expected_owner_id):
+    """Tests _GetOwnerID returns the ID of the owner."""
+    self.test_msg.replace_header(AlertEmailHeader.CC, '')
+    self.test_msg.replace_header(AlertEmailHeader.OWNER, owner)
+
+    self.mox.StubOutWithMock(self.services.user, 'LookupExistingUserIDs')
+    self.services.user.LookupExistingUserIDs(self.cnxn, [owner]).AndReturn(
+        {owner: expected_owner_id})
+
+    self.mox.ReplayAll()
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+    self.mox.VerifyAll()
+    self.assertEqual(props['owner_id'], expected_owner_id)
+
+  @parameterized.expand([
+      (None, []),
+      ('', []),
+      (' ', []),
+  ])
+  def testDefaultCCIDs(self, header_value, expected_cc_ids):
+    """Checks if _GetCCIDs returns an empty list in default."""
+    self.test_msg.replace_header(AlertEmailHeader.CC, header_value)
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+    self.assertEqual(props['cc_ids'], expected_cc_ids)
+
+  @parameterized.expand([
+      # with one existing user cc-ed.
+      ({'user1@example.org': 1}, [1]),
+      # with two of existing users.
+      ({'user1@example.org': 1, 'user2@example.org': 2}, [1, 2]),
+      # with one non-existing user.
+      ({'user1@example.org': None}, []),
+      # with two of non-existing users.
+      ({'user1@example.org': None, 'user2@example.org': None}, []),
+      # with a mix of existing and non-existing users.
+      ({'user1@example.org': 1, 'user2@example.org': None}, [1]),
+  ])
+  def testGetCCIDs(self, ccers, expected_cc_ids):
+    """Tests _GetCCIDs returns the IDs of the email addresses to be cc-ed."""
+    self.test_msg.replace_header(
+        AlertEmailHeader.CC, ','.join(sorted(ccers.keys())))
+    self.test_msg.replace_header(AlertEmailHeader.OWNER, '')
+
+    self.mox.StubOutWithMock(self.services.user, 'LookupExistingUserIDs')
+    self.services.user.LookupExistingUserIDs(
+        self.cnxn, sorted(ccers.keys())).AndReturn(ccers)
+
+    self.mox.ReplayAll()
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+    self.mox.VerifyAll()
+    self.assertEqual(sorted(props['cc_ids']), sorted(expected_cc_ids))
+
+  @parameterized.expand([
+      # None and '' should result in the default priority returned.
+      (None, 'Pri-2'),
+      ('', 'Pri-2'),
+      (' ', 'Pri-2'),
+
+      # Tests for valid priority values
+      ('0', 'Pri-0'),
+      ('1', 'Pri-1'),
+      ('2', 'Pri-2'),
+      ('3', 'Pri-3'),
+
+      # Tests for invalid priority values
+      ('test', 'Pri-2'),
+      ('foo', 'Pri-2'),
+      ('critical', 'Pri-2'),
+      ('4', 'Pri-2'),
+      ('3x', 'Pri-2'),
+      ('00', 'Pri-2'),
+      ('01', 'Pri-2'),
+  ])
+  def testGetPriority(self, header_value, expected_priority):
+    """Tests _GetPriority."""
+    self.test_msg.replace_header(AlertEmailHeader.PRIORITY, header_value)
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+    self.assertCaseInsensitiveEqual(props['priority'], expected_priority)
+
+  @parameterized.expand([
+      (None, 'Available'),
+      ('', 'Available'),
+      (' ', 'Available'),
+  ])
+  def testDefaultStatus(self, header_value, expected_status):
+    """Checks if _GetStatus return Available in default."""
+    self.test_msg.replace_header(AlertEmailHeader.STATUS, header_value)
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+    self.assertCaseInsensitiveEqual(props['status'], expected_status)
+
+  @parameterized.expand([
+      ('random_status', True, 'random_status'),
+      # If the status is not one of the open statuses, the default status
+      # should be returned instead.
+      ('random_status', False, 'Available'),
+  ])
+  def testGetStatusWithoutOwner(self, status, means_open, expected_status):
+    """Tests GetStatus without an owner."""
+    self.test_msg.replace_header(AlertEmailHeader.STATUS, status)
+    self.mox.StubOutWithMock(tracker_helpers, 'MeansOpenInProject')
+    tracker_helpers.MeansOpenInProject(status, mox.IgnoreArg()).AndReturn(
+        means_open)
+
+    self.mox.ReplayAll()
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+    self.assertCaseInsensitiveEqual(props['status'], expected_status)
+    self.mox.VerifyAll()
+
+  @parameterized.expand([
+      # If there is an owner, the status should always be Assigned.
+      (None, 'Assigned'),
+      ('', 'Assigned'),
+      (' ', 'Assigned'),
+
+      ('random_status', 'Assigned'),
+      ('Available', 'Assigned'),
+      ('Unconfirmed', 'Assigned'),
+      ('Fixed', 'Assigned'),
+  ])
+  def testGetStatusWithOwner(self, status, expected_status):
+    """Tests GetStatus with an owner."""
+    owner = 'owner@example.org'
+    self.test_msg.replace_header(AlertEmailHeader.OWNER, owner)
+    self.test_msg.replace_header(AlertEmailHeader.CC, '')
+    self.test_msg.replace_header(AlertEmailHeader.STATUS, status)
+
+    self.mox.StubOutWithMock(self.services.user, 'LookupExistingUserIDs')
+    self.services.user.LookupExistingUserIDs(self.cnxn, [owner]).AndReturn(
+        {owner: 1})
+
+    self.mox.ReplayAll()
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+    self.assertCaseInsensitiveEqual(props['status'], expected_status)
+    self.mox.VerifyAll()
+
+  @parameterized.expand(
+      [
+          # None and '' should result in None returned.
+          (None, None),
+          ('', None),
+          (' ', None),
+
+          # allowlisted issue types
+          ('Bug', 'Type-Bug'),
+          ('Bug-Regression', 'Type-Bug-Regression'),
+          ('Bug-Security', 'Type-Bug-Security'),
+          ('Task', 'Type-Task'),
+
+          # non-allowlisted issue types
+          ('foo', None),
+          ('bar', None),
+          ('Bug,Bug-Regression', None),
+          ('Bug,', None),
+          (',Task', None),
+      ])
+  def testGetIssueType(self, header_value, expected_issue_type):
+    """Tests _GetIssueType."""
+    self.test_msg.replace_header(AlertEmailHeader.TYPE, header_value)
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+    self.assertCaseInsensitiveEqual(props['issue_type'], expected_issue_type)
+
+  @parameterized.expand(
+      [
+          # None and '' should result in an empty list returned.
+          (None, []),
+          ('', []),
+          (' ', []),
+
+          # a single, allowlisted os
+          ('Android', ['OS-Android']),
+          # a single, non-allowlisted OS
+          ('Bendroid', []),
+          # multiple, allowlisted oses
+          ('Android,Windows', ['OS-Android', 'OS-Windows']),
+          # multiple, non-allowlisted oses
+          ('Bendroid,Findows', []),
+          # a mix of allowlisted and non-allowlisted oses
+          ('Android,Findows,Windows,Bendroid', ['OS-Android', 'OS-Windows']),
+          # a mix of allowlisted and non-allowlisted oses with trailing commas.
+          ('Android,Findows,Windows,Bendroid,,', ['OS-Android', 'OS-Windows']),
+          # a mix of allowlisted and non-allowlisted oses with commas at the
+          # beginning.
+          (
+              ',,Android,Findows,Windows,Bendroid,,',
+              ['OS-Android', 'OS-Windows']),
+      ])
+  def testGetOSes(self, header_value, expected_oses):
+    """Tests _GetOSes."""
+    self.test_msg.replace_header(AlertEmailHeader.OS, header_value)
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+    self.assertEqual(sorted(os if os is None else os.lower()
+                            for os in props['oses']),
+                     sorted(os if os is None else os.lower()
+                            for os in expected_oses))
+
+  @parameterized.expand([
+      # None and '' should result in an empty list + RSVG returned.
+      (None, []),
+      ('', []),
+      (' ', []),
+
+      ('Label-1', ['label-1']),
+      ('Label-1,Label-2', ['label-1', 'label-2',]),
+      ('Label-1,Label-2,Label-3', ['label-1', 'label-2', 'label-3']),
+
+      # Duplicates should be removed.
+      ('Label-1,Label-1', ['label-1']),
+      ('Label-1,label-1', ['label-1']),
+      (',Label-1,label-1,', ['label-1']),
+      ('Label-1,label-1,', ['label-1']),
+      (',Label-1,,label-1,,,', ['label-1']),
+      ('Label-1,Label-2,Label-1', ['label-1', 'label-2']),
+
+      # Whitespaces should be removed from labels.
+      ('La bel - 1 ', ['label-1']),
+      ('La bel - 1 , Label- 1', ['label-1']),
+      ('La bel- 1 , Label - 2', ['label-1', 'label-2']),
+
+      # RSVG should be set always.
+      ('Label-1,Label-1,Restrict-View-Google', ['label-1']),
+  ])
+  def testGetLabels(self, header_value, expected_labels):
+    """Tests _GetLabels."""
+    self.test_msg.replace_header(AlertEmailHeader.LABEL, header_value)
+    props = alert2issue.GetAlertProperties(
+        self.services, self.cnxn, self.project_id, self.incident_id,
+        self.trooper_queue, self.test_msg)
+
+    # Check if there are any duplicates
+    labels = set(props['labels'])
+    self.assertEqual(sorted(props['labels']), sorted(list(labels)))
+
+    # Check the labels that shouldb always be included
+    self.assertIn('Restrict-View-Google'.lower(), labels)
+    self.assertIn(props['trooper_queue'], labels)
+    self.assertIn(props['incident_label'], labels)
+    self.assertIn(props['priority'], labels)
+    self.assertIn(props['issue_type'], labels)
+    self.assertSubset(set(props['oses']), labels)
+
+    # All the custom labels should be present.
+    self.assertSubset(set(expected_labels), labels)
diff --git a/features/test/autolink_test.py b/features/test/autolink_test.py
new file mode 100644
index 0000000..a779014
--- /dev/null
+++ b/features/test/autolink_test.py
@@ -0,0 +1,808 @@
+# 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
+
+"""Unittest for the autolink feature."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import re
+import unittest
+
+from features import autolink
+from features import autolink_constants
+from framework import template_helpers
+from proto import tracker_pb2
+from testing import fake
+from testing import testing_helpers
+
+
+SIMPLE_EMAIL_RE = re.compile(r'([a-z]+)@([a-z]+)\.com')
+OVER_AMBITIOUS_DOMAIN_RE = re.compile(r'([a-z]+)\.(com|net|org)')
+
+
+class AutolinkTest(unittest.TestCase):
+
+  def RegisterEmailCallbacks(self, aa):
+
+    def LookupUsers(_mr, all_addresses):
+      """Return user objects for only users who are at trusted domains."""
+      return [addr for addr in all_addresses
+              if addr.endswith('@example.com')]
+
+    def Match2Addresses(_mr, match):
+      return [match.group(0)]
+
+    def MakeMailtoLink(_mr, match, comp_ref_artifacts):
+      email = match.group(0)
+      if comp_ref_artifacts and email in comp_ref_artifacts:
+        return [template_helpers.TextRun(
+            tag='a', href='mailto:%s' % email, content=email)]
+      else:
+        return [template_helpers.TextRun('%s AT %s.com' % match.group(1, 2))]
+
+    aa.RegisterComponent('testcomp',
+                         LookupUsers,
+                         Match2Addresses,
+                         {SIMPLE_EMAIL_RE: MakeMailtoLink})
+
+  def RegisterDomainCallbacks(self, aa):
+
+    def LookupDomains(_mr, _all_refs):
+      """Return business objects for only real domains. Always just True."""
+      return True  # We don't have domain business objects, accept anything.
+
+    def Match2Domains(_mr, match):
+      return [match.group(0)]
+
+    def MakeHyperLink(_mr, match, _comp_ref_artifacts):
+      domain = match.group(0)
+      return [template_helpers.TextRun(tag='a', href=domain, content=domain)]
+
+    aa.RegisterComponent('testcomp2',
+                         LookupDomains,
+                         Match2Domains,
+                         {OVER_AMBITIOUS_DOMAIN_RE: MakeHyperLink})
+
+  def setUp(self):
+    self.aa = autolink.Autolink()
+    self.RegisterEmailCallbacks(self.aa)
+    self.comment1 = ('Feel free to contact me at a@other.com, '
+                     'or b@example.com, or c@example.org.')
+    self.comment2 = 'no matches in this comment'
+    self.comment3 = 'just matches with no ref: a@other.com, c@example.org'
+    self.comments = [self.comment1, self.comment2, self.comment3]
+
+  def testRegisterComponent(self):
+    self.assertIn('testcomp', self.aa.registry)
+
+  def testGetAllReferencedArtifacts(self):
+    all_ref_artifacts = self.aa.GetAllReferencedArtifacts(
+        None, self.comments)
+
+    self.assertIn('testcomp', all_ref_artifacts)
+    comp_refs = all_ref_artifacts['testcomp']
+    self.assertIn('b@example.com', comp_refs)
+    self.assertTrue(len(comp_refs) == 1)
+
+  def testGetAllReferencedArtifacts_TooBig(self):
+    all_ref_artifacts = self.aa.GetAllReferencedArtifacts(
+        None, self.comments, max_total_length=10)
+
+    self.assertEqual(autolink.SKIP_LOOKUPS, all_ref_artifacts)
+
+  def testMarkupAutolinks(self):
+    all_ref_artifacts = self.aa.GetAllReferencedArtifacts(None, self.comments)
+    result = self.aa.MarkupAutolinks(
+        None, [template_helpers.TextRun(self.comment1)], all_ref_artifacts)
+    self.assertEqual('Feel free to contact me at ', result[0].content)
+    self.assertEqual('a AT other.com', result[1].content)
+    self.assertEqual(', or ', result[2].content)
+    self.assertEqual('b@example.com', result[3].content)
+    self.assertEqual('mailto:b@example.com', result[3].href)
+    self.assertEqual(', or c@example.org.', result[4].content)
+
+    result = self.aa.MarkupAutolinks(
+        None, [template_helpers.TextRun(self.comment2)], all_ref_artifacts)
+    self.assertEqual('no matches in this comment', result[0].content)
+
+    result = self.aa.MarkupAutolinks(
+        None, [template_helpers.TextRun(self.comment3)], all_ref_artifacts)
+    self.assertEqual('just matches with no ref: ', result[0].content)
+    self.assertEqual('a AT other.com', result[1].content)
+    self.assertEqual(', c@example.org', result[2].content)
+
+  def testNonnestedAutolinks(self):
+    """Test that when a substitution yields plain text, others are applied."""
+    self.RegisterDomainCallbacks(self.aa)
+    all_ref_artifacts = self.aa.GetAllReferencedArtifacts(None, self.comments)
+    result = self.aa.MarkupAutolinks(
+        None, [template_helpers.TextRun(self.comment1)], all_ref_artifacts)
+    self.assertEqual('Feel free to contact me at ', result[0].content)
+    self.assertEqual('a AT ', result[1].content)
+    self.assertEqual('other.com', result[2].content)
+    self.assertEqual('other.com', result[2].href)
+    self.assertEqual(', or ', result[3].content)
+    self.assertEqual('b@example.com', result[4].content)
+    self.assertEqual('mailto:b@example.com', result[4].href)
+    self.assertEqual(', or c@', result[5].content)
+    self.assertEqual('example.org', result[6].content)
+    self.assertEqual('example.org', result[6].href)
+    self.assertEqual('.', result[7].content)
+
+    result = self.aa.MarkupAutolinks(
+        None, [template_helpers.TextRun(self.comment2)], all_ref_artifacts)
+    self.assertEqual('no matches in this comment', result[0].content)
+    result = self.aa.MarkupAutolinks(
+        None, [template_helpers.TextRun(self.comment3)], all_ref_artifacts)
+    self.assertEqual('just matches with no ref: ', result[0].content)
+    self.assertEqual('a AT ', result[1].content)
+    self.assertEqual('other.com', result[2].content)
+    self.assertEqual('other.com', result[2].href)
+    self.assertEqual(', c@', result[3].content)
+    self.assertEqual('example.org', result[4].content)
+    self.assertEqual('example.org', result[4].href)
+
+  def testMarkupAutolinks_TooBig(self):
+    """If the issue has too much text, we just do regex-based autolinking."""
+    all_ref_artifacts = self.aa.GetAllReferencedArtifacts(
+        None, self.comments, max_total_length=10)
+    result = self.aa.MarkupAutolinks(
+        None, [template_helpers.TextRun(self.comment1)], all_ref_artifacts)
+    self.assertEqual(5, len(result))
+    self.assertEqual('Feel free to contact me at ', result[0].content)
+    # The test autolink handlers in this file do not link email addresses.
+    self.assertEqual('a AT other.com', result[1].content)
+    self.assertIsNone(result[1].href)
+
+class EmailAutolinkTest(unittest.TestCase):
+
+  def setUp(self):
+    self.user_1 = 'fake user'  # Note: no User fields are accessed.
+
+  def DoLinkify(
+      self, content, filter_re=autolink_constants.IS_IMPLIED_EMAIL_RE):
+    """Calls the LinkifyEmail method and returns the result.
+
+    Args:
+      content: string with a hyperlink.
+
+    Returns:
+      A list of TextRuns with some runs having the embedded email hyperlinked.
+      Or, None if no link was detected.
+    """
+    match = filter_re.search(content)
+    if not match:
+      return None
+
+    return autolink.LinkifyEmail(None, match, {'one@example.com': self.user_1})
+
+  def testLinkifyEmail(self):
+    """Test that an address is autolinked when put in the given context."""
+    test = 'one@ or @one'
+    result = self.DoLinkify('Have you met %s' % test)
+    self.assertEqual(None, result)
+
+    test = 'one@example.com'
+    result = self.DoLinkify('Have you met %s' % test)
+    self.assertEqual('/u/' + test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    test = 'alias@example.com'
+    result = self.DoLinkify('Please also CC %s' % test)
+    self.assertEqual('mailto:' + test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    result = self.DoLinkify('Reviewed-By: Test Person <%s>' % test)
+    self.assertEqual('mailto:' + test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+
+class URLAutolinkTest(unittest.TestCase):
+
+  def DoLinkify(self, content, filter_re=autolink_constants.IS_A_LINK_RE):
+    """Calls the linkify method and returns the result.
+
+    Args:
+      content: string with a hyperlink.
+
+    Returns:
+      A list of TextRuns with some runs will have the embedded URL hyperlinked.
+      Or, None if no link was detected.
+    """
+    match = filter_re.search(content)
+    if not match:
+      return None
+
+    return autolink.Linkify(None, match, None)
+
+  def testLinkify(self):
+    """Test that given url is autolinked when put in the given context."""
+    # Disallow the linking of URLs with user names and passwords.
+    test = 'http://user:pass@www.yahoo.com'
+    result = self.DoLinkify('What about %s' % test)
+    self.assertEqual(None, result[0].tag)
+    self.assertEqual(None, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    # Disallow the linking of non-HTTP(S) links
+    test = 'nntp://news.google.com'
+    result = self.DoLinkify('%s' % test)
+    self.assertEqual(None, result)
+
+    # Disallow the linking of file links
+    test = 'file://C:/Windows/System32/cmd.exe'
+    result = self.DoLinkify('%s' % test)
+    self.assertEqual(None, result)
+
+    # Test some known URLs
+    test = 'http://www.example.com'
+    result = self.DoLinkify('What about %s' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+  def testLinkify_FTP(self):
+    """Test that FTP urls are linked."""
+    # Check for a standard ftp link
+    test = 'ftp://ftp.example.com'
+    result = self.DoLinkify('%s' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+  def testLinkify_Email(self):
+    """Test that mailto: urls are linked."""
+    test = 'mailto:user@example.com'
+    result = self.DoLinkify('%s' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+  def testLinkify_ShortLink(self):
+    """Test that shortlinks are linked."""
+    test = 'http://go/monorail'
+    result = self.DoLinkify(
+        '%s' % test, filter_re=autolink_constants.IS_A_SHORT_LINK_RE)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    test = 'go/monorail'
+    result = self.DoLinkify(
+        '%s' % test, filter_re=autolink_constants.IS_A_SHORT_LINK_RE)
+    self.assertEqual('http://' + test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    test = 'b/12345'
+    result = self.DoLinkify(
+      '%s' % test, filter_re=autolink_constants.IS_A_NUMERIC_SHORT_LINK_RE)
+    self.assertEqual('http://' + test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    test = 'http://b/12345'
+    result = self.DoLinkify(
+      '%s' % test, filter_re=autolink_constants.IS_A_NUMERIC_SHORT_LINK_RE)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    test = '/b/12345'
+    result = self.DoLinkify(
+        '%s' % test, filter_re=autolink_constants.IS_A_SHORT_LINK_RE)
+    self.assertIsNone(result)
+
+    test = '/b/12345'
+    result = self.DoLinkify(
+      '%s' % test, filter_re=autolink_constants.IS_A_NUMERIC_SHORT_LINK_RE)
+    self.assertIsNone(result)
+
+    test = 'b/secondFileInDiff'
+    result = self.DoLinkify(
+      '%s' % test, filter_re=autolink_constants.IS_A_NUMERIC_SHORT_LINK_RE)
+    self.assertIsNone(result)
+
+  def testLinkify_ImpliedLink(self):
+    """Test that text with .com, .org, .net, and .edu are linked."""
+    test = 'google.org'
+    result = self.DoLinkify(
+        '%s' % test, filter_re=autolink_constants.IS_IMPLIED_LINK_RE)
+    self.assertEqual('http://' + test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    test = 'code.google.com/p/chromium'
+    result = self.DoLinkify(
+        '%s' % test, filter_re=autolink_constants.IS_IMPLIED_LINK_RE)
+    self.assertEqual('http://' + test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    # This is not a domain, it is a directory or something.
+    test = 'build.out/p/chromium'
+    result = self.DoLinkify(
+        '%s' % test, filter_re=autolink_constants.IS_IMPLIED_LINK_RE)
+    self.assertEqual(None, result)
+
+    # We do not link the NNTP scheme, and the domain name part of it will not
+    # be linked as an HTTP link because it is preceeded by "/".
+    test = 'nntp://news.google.com'
+    result = self.DoLinkify(
+        '%s' % test, filter_re=autolink_constants.IS_IMPLIED_LINK_RE)
+    self.assertIsNone(result)
+
+  def testLinkify_Context(self):
+    """Test that surrounding syntax is not considered part of the url."""
+    test = 'http://www.example.com'
+
+    # Check for a link followed by a comma at end of English phrase.
+    result = self.DoLinkify('The URL %s, points to a great website.' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual(',', result[1].content)
+
+    # Check for a link followed by a period at end of English sentence.
+    result = self.DoLinkify('The best site ever, %s.' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual('.', result[1].content)
+
+    # Check for a link in paranthesis (), [], or {}
+    result = self.DoLinkify('My fav site (%s).' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual(').', result[1].content)
+
+    result = self.DoLinkify('My fav site [%s].' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual('].', result[1].content)
+
+    result = self.DoLinkify('My fav site {%s}.' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual('}.', result[1].content)
+
+    # Check for a link with trailing colon
+    result = self.DoLinkify('Hit %s: you will love it.' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual(':', result[1].content)
+
+    # Check link with commas in query string, but don't include trailing comma.
+    test = 'http://www.example.com/?v=1,2,3'
+    result = self.DoLinkify('Try %s, ok?' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    # Check link surrounded by angle-brackets.
+    result = self.DoLinkify('<%s>' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual('>', result[1].content)
+
+    # Check link surrounded by double-quotes.
+    result = self.DoLinkify('"%s"' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual('"', result[1].content)
+
+    # Check link with embedded double-quotes.
+    test = 'http://www.example.com/?q="a+b+c"'
+    result = self.DoLinkify('Try %s, ok?' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual(',', result[1].content)
+
+    # Check link surrounded by single-quotes.
+    result = self.DoLinkify("'%s'" % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual("'", result[1].content)
+
+    # Check link with embedded single-quotes.
+    test = "http://www.example.com/?q='a+b+c'"
+    result = self.DoLinkify('Try %s, ok?' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual(',', result[1].content)
+
+    # Check link with embedded parens.
+    test = 'http://www.example.com/funky(foo)and(bar).asp'
+    result = self.DoLinkify('Try %s, ok?' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual(',', result[1].content)
+
+    test = 'http://www.example.com/funky(foo)and(bar).asp'
+    result = self.DoLinkify('My fav site <%s>' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual('>', result[1].content)
+
+    # Check link with embedded brackets and braces.
+    test = 'http://www.example.com/funky[foo]and{bar}.asp'
+    result = self.DoLinkify('My fav site <%s>' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual('>', result[1].content)
+
+    # Check link with mismatched delimeters inside it or outside it.
+    test = 'http://www.example.com/funky"(foo]and>bar}.asp'
+    result = self.DoLinkify('My fav site <%s>' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual('>', result[1].content)
+
+    test = 'http://www.example.com/funky"(foo]and>bar}.asp'
+    result = self.DoLinkify('My fav site {%s' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    test = 'http://www.example.com/funky"(foo]and>bar}.asp'
+    result = self.DoLinkify('My fav site %s}' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual('}', result[1].content)
+
+    # Link as part of an HTML example.
+    test = 'http://www.example.com/'
+    result = self.DoLinkify('<a href="%s">' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual('">', result[1].content)
+
+    # Link nested in an HTML tag.
+    result = self.DoLinkify('<span>%s</span>' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    # Link followed by HTML tag - same bug as above.
+    result = self.DoLinkify('%s<span>foo</span>' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    # Link followed by unescaped HTML tag.
+    result = self.DoLinkify('%s<span>foo</span>' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+    # Link surrounded by multiple delimiters.
+    result = self.DoLinkify('(e.g. <%s>)' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+    result = self.DoLinkify('(e.g. <%s>),' % test)
+    self.assertEqual(test, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+  def testLinkify_ContextOnBadLink(self):
+    """Test that surrounding text retained in cases where we don't link url."""
+    test = 'http://bad=example'
+    result = self.DoLinkify('<a href="%s">' % test)
+    self.assertEqual(None, result[0].href)
+    self.assertEqual(test + '">', result[0].content)
+    self.assertEqual(1, len(result))
+
+  def testLinkify_UnicodeContext(self):
+    """Test that unicode context does not mess up the link."""
+    test = 'http://www.example.com'
+
+    # This string has a non-breaking space \xa0.
+    result = self.DoLinkify(u'The correct RFC link is\xa0%s' % test)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual(test, result[0].href)
+
+  def testLinkify_UnicodeLink(self):
+    """Test that unicode in a link is OK."""
+    test = u'http://www.example.com?q=division\xc3\xb7sign'
+
+    # This string has a non-breaking space \xa0.
+    result = self.DoLinkify(u'The unicode link is %s' % test)
+    self.assertEqual(test, result[0].content)
+    self.assertEqual(test, result[0].href)
+
+  def testLinkify_LinkTextEscapingDisabled(self):
+    """Test that url-like things that miss validation aren't linked."""
+    # Link matched by the regex but not accepted by the validator.
+    test = 'http://bad_domain/reportdetail?reportid=35aa03e04772358b'
+    result = self.DoLinkify('<span>%s</span>' % test)
+    self.assertEqual(None, result[0].href)
+    self.assertEqual(test, result[0].content)
+
+
+def _Issue(project_name, local_id, summary, status):
+  issue = tracker_pb2.Issue()
+  issue.project_name = project_name
+  issue.local_id = local_id
+  issue.summary = summary
+  issue.status = status
+  return issue
+
+
+class TrackerAutolinkTest(unittest.TestCase):
+
+  COMMENT_TEXT = (
+    'This relates to issue 1, issue #2, and issue3 \n'
+    'as well as bug 4, bug #5, and bug6 \n'
+    'with issue other-project:12 and issue other-project#13. \n'
+    'Watch out for issues 21, 22, and 23 with oxford comma. \n'
+    'And also bugs 31, 32 and 33 with no oxford comma.\n'
+    'Here comes crbug.com/123 and crbug.com/monorail/456.\n'
+    'We do not match when an issue\n'
+    '999. Is split across lines.'
+    )
+
+  def testExtractProjectAndIssueIdNormal(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/detail?id=1')
+    ref_batches = []
+    for match in autolink._ISSUE_REF_RE.finditer(self.COMMENT_TEXT):
+      new_refs = autolink.ExtractProjectAndIssueIdsNormal(mr, match)
+      ref_batches.append(new_refs)
+
+    self.assertEqual(
+        ref_batches, [
+            [(None, 1)],
+            [(None, 2)],
+            [(None, 3)],
+            [(None, 4)],
+            [(None, 5)],
+            [(None, 6)],
+            [('other-project', 12)],
+            [('other-project', 13)],
+            [(None, 21), (None, 22), (None, 23)],
+            [(None, 31), (None, 32), (None, 33)],
+        ])
+
+
+  def testExtractProjectAndIssueIdCrbug(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/detail?id=1')
+    ref_batches = []
+    for match in autolink._CRBUG_REF_RE.finditer(self.COMMENT_TEXT):
+      new_refs = autolink.ExtractProjectAndIssueIdsCrBug(mr, match)
+      ref_batches.append(new_refs)
+
+    self.assertEqual(ref_batches, [
+        [('chromium', 123)],
+        [('monorail', 456)],
+    ])
+
+  def DoReplaceIssueRef(
+      self, content, regex=autolink._ISSUE_REF_RE,
+      single_issue_regex=autolink._SINGLE_ISSUE_REF_RE,
+      default_project_name=None):
+    """Calls the ReplaceIssueRef method and returns the result.
+
+    Args:
+      content: string that may have a textual reference to an issue.
+      regex: optional regex to use instead of _ISSUE_REF_RE.
+
+    Returns:
+      A list of TextRuns with some runs will have the reference hyperlinked.
+      Or, None if no reference detected.
+    """
+    match = regex.search(content)
+    if not match:
+      return None
+
+    open_dict = {'proj:1': _Issue('proj', 1, 'summary-PROJ-1', 'New'),
+                 # Assume there is no issue 3 in PROJ
+                 'proj:4': _Issue('proj', 4, 'summary-PROJ-4', 'New'),
+                 'proj:6': _Issue('proj', 6, 'summary-PROJ-6', 'New'),
+                 'other-project:12': _Issue('other-project', 12,
+                                            'summary-OP-12', 'Accepted'),
+                }
+    closed_dict = {'proj:2': _Issue('proj', 2, 'summary-PROJ-2', 'Fixed'),
+                   'proj:5': _Issue('proj', 5, 'summary-PROJ-5', 'Fixed'),
+                   'other-project:13': _Issue('other-project', 13,
+                                              'summary-OP-12', 'Invalid'),
+                   'chromium:13': _Issue('chromium', 13,
+                                         'summary-Cr-13', 'Invalid'),
+                  }
+    comp_ref_artifacts = (open_dict, closed_dict,)
+
+    replacement_runs = autolink._ReplaceIssueRef(
+        match, comp_ref_artifacts, single_issue_regex, default_project_name)
+    return replacement_runs
+
+  def testReplaceIssueRef_NoMatch(self):
+    result = self.DoReplaceIssueRef('What is this all about?')
+    self.assertIsNone(result)
+
+  def testReplaceIssueRef_Normal(self):
+    result = self.DoReplaceIssueRef(
+        'This relates to issue 1', default_project_name='proj')
+    self.assertEqual('/p/proj/issues/detail?id=1', result[0].href)
+    self.assertEqual('issue 1', result[0].content)
+    self.assertEqual(None, result[0].css_class)
+    self.assertEqual('summary-PROJ-1', result[0].title)
+    self.assertEqual('a', result[0].tag)
+
+    result = self.DoReplaceIssueRef(
+        ', issue #2', default_project_name='proj')
+    self.assertEqual('/p/proj/issues/detail?id=2', result[0].href)
+    self.assertEqual(' issue #2 ', result[0].content)
+    self.assertEqual('closed_ref', result[0].css_class)
+    self.assertEqual('summary-PROJ-2', result[0].title)
+    self.assertEqual('a', result[0].tag)
+
+    result = self.DoReplaceIssueRef(
+        ', and issue3 ', default_project_name='proj')
+    self.assertEqual(None, result[0].href)  # There is no issue 3
+    self.assertEqual('issue3', result[0].content)
+
+    result = self.DoReplaceIssueRef(
+        'as well as bug 4', default_project_name='proj')
+    self.assertEqual('/p/proj/issues/detail?id=4', result[0].href)
+    self.assertEqual('bug 4', result[0].content)
+
+    result = self.DoReplaceIssueRef(
+        ', bug #5, ', default_project_name='proj')
+    self.assertEqual('/p/proj/issues/detail?id=5', result[0].href)
+    self.assertEqual(' bug #5 ', result[0].content)
+
+    result = self.DoReplaceIssueRef(
+        'and bug6', default_project_name='proj')
+    self.assertEqual('/p/proj/issues/detail?id=6', result[0].href)
+    self.assertEqual('bug6', result[0].content)
+
+    result = self.DoReplaceIssueRef(
+        'with issue other-project:12', default_project_name='proj')
+    self.assertEqual('/p/other-project/issues/detail?id=12', result[0].href)
+    self.assertEqual('issue other-project:12', result[0].content)
+
+    result = self.DoReplaceIssueRef(
+        'and issue other-project#13', default_project_name='proj')
+    self.assertEqual('/p/other-project/issues/detail?id=13', result[0].href)
+    self.assertEqual(' issue other-project#13 ', result[0].content)
+
+  def testReplaceIssueRef_CrBug(self):
+    result = self.DoReplaceIssueRef(
+        'and crbug.com/other-project/13', regex=autolink._CRBUG_REF_RE,
+        single_issue_regex=autolink._CRBUG_REF_RE,
+        default_project_name='chromium')
+    self.assertEqual('/p/other-project/issues/detail?id=13', result[0].href)
+    self.assertEqual(' crbug.com/other-project/13 ', result[0].content)
+
+    result = self.DoReplaceIssueRef(
+        'and http://crbug.com/13', regex=autolink._CRBUG_REF_RE,
+        single_issue_regex=autolink._CRBUG_REF_RE,
+        default_project_name='chromium')
+    self.assertEqual('/p/chromium/issues/detail?id=13', result[0].href)
+    self.assertEqual(' http://crbug.com/13 ', result[0].content)
+
+    result = self.DoReplaceIssueRef(
+        'and http://crbug.com/13#c17', regex=autolink._CRBUG_REF_RE,
+        single_issue_regex=autolink._CRBUG_REF_RE,
+        default_project_name='chromium')
+    self.assertEqual('/p/chromium/issues/detail?id=13#c17', result[0].href)
+    self.assertEqual(' http://crbug.com/13#c17 ', result[0].content)
+
+  def testParseProjectNameMatch(self):
+    golden = 'project-name'
+    variations = ['%s', '  %s', '%s  ', '%s:', '%s#', '%s#:', '%s:#', '%s :#',
+                  '\t%s', '%s\t', '\t%s\t', '\t\t%s\t\t', '\n%s', '%s\n',
+                  '\n%s\n', '\n\n%s\n\n', '\t\n%s', '\n\t%s', '%s\t\n',
+                  '%s\n\t', '\t\n%s#', '\n\t%s#', '%s\t\n#', '%s\n\t#',
+                  '\t\n%s:', '\n\t%s:', '%s\t\n:', '%s\n\t:'
+                 ]
+
+    # First pass checks all valid project name results
+    for pattern in variations:
+      self.assertEqual(
+          golden, autolink._ParseProjectNameMatch(pattern % golden))
+
+    # Second pass tests all inputs that should result in None
+    for pattern in variations:
+      self.assertTrue(
+          autolink._ParseProjectNameMatch(pattern % '') in [None, ''])
+
+
+class VCAutolinkTest(unittest.TestCase):
+
+  GIT_HASH_1 = '1' * 40
+  GIT_HASH_2 = '2' * 40
+  GIT_HASH_3 = 'a1' * 20
+  GIT_COMMENT_TEXT = (
+      'This is a fix for r%s and R%s, by r2d2, who also authored revision %s, '
+      'revision #%s, revision %s, and revision %s' % (
+          GIT_HASH_1, GIT_HASH_2, GIT_HASH_3,
+          GIT_HASH_1.upper(), GIT_HASH_2.upper(), GIT_HASH_3.upper()))
+  SVN_COMMENT_TEXT = (
+      'This is a fix for r12 and R3400, by r2d2, who also authored '
+      'revision r4, '
+      'revision #1234567, revision 789, and revision 9025.  If you have '
+      'questions, call me at 18005551212')
+
+  def testGetReferencedRevisions(self):
+    refs = ['1', '2', '3']
+    # For now, we do not look up revision objects, result is always None
+    self.assertIsNone(autolink.GetReferencedRevisions(None, refs))
+
+  def testExtractGitHashes(self):
+    refs = []
+    for match in autolink._GIT_HASH_RE.finditer(self.GIT_COMMENT_TEXT):
+      new_refs = autolink.ExtractRevNums(None, match)
+      refs.extend(new_refs)
+
+    self.assertEqual(
+        refs, [
+            self.GIT_HASH_1, self.GIT_HASH_2, self.GIT_HASH_3,
+            self.GIT_HASH_1.upper(),
+            self.GIT_HASH_2.upper(),
+            self.GIT_HASH_3.upper()
+        ])
+
+  def testExtractRevNums(self):
+    refs = []
+    for match in autolink._SVN_REF_RE.finditer(self.SVN_COMMENT_TEXT):
+      new_refs = autolink.ExtractRevNums(None, match)
+      refs.extend(new_refs)
+
+    # Note that we only autolink rNNNN with at least 4 digits.
+    self.assertEqual(refs, ['3400', '1234567', '9025'])
+
+
+  def DoReplaceRevisionRef(self, content, project=None):
+    """Calls the ReplaceRevisionRef method and returns the result.
+
+    Args:
+      content: string with a hyperlink.
+      project: optional project.
+
+    Returns:
+      A list of TextRuns with some runs will have the embedded URL hyperlinked.
+      Or, None if no link was detected.
+    """
+    match = autolink._GIT_HASH_RE.search(content)
+    if not match:
+      return None
+
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/source/detail?r=1', project=project)
+    replacement_runs = autolink.ReplaceRevisionRef(mr, match, None)
+    return replacement_runs
+
+  def testReplaceRevisionRef(self):
+    result = self.DoReplaceRevisionRef(
+        'This is a fix for r%s' % self.GIT_HASH_1)
+    self.assertEqual('https://crrev.com/%s' % self.GIT_HASH_1, result[0].href)
+    self.assertEqual('r%s' % self.GIT_HASH_1, result[0].content)
+
+    result = self.DoReplaceRevisionRef(
+        'and R%s, by r2d2, who ' % self.GIT_HASH_2)
+    self.assertEqual('https://crrev.com/%s' % self.GIT_HASH_2, result[0].href)
+    self.assertEqual('R%s' % self.GIT_HASH_2, result[0].content)
+
+    result = self.DoReplaceRevisionRef('by r2d2, who ')
+    self.assertEqual(None, result)
+
+    result = self.DoReplaceRevisionRef(
+        'also authored revision %s, ' % self.GIT_HASH_3)
+    self.assertEqual('https://crrev.com/%s' % self.GIT_HASH_3, result[0].href)
+    self.assertEqual('revision %s' % self.GIT_HASH_3, result[0].content)
+
+    result = self.DoReplaceRevisionRef(
+        'revision #%s, ' % self.GIT_HASH_1.upper())
+    self.assertEqual(
+        'https://crrev.com/%s' % self.GIT_HASH_1.upper(), result[0].href)
+    self.assertEqual(
+        'revision #%s' % self.GIT_HASH_1.upper(), result[0].content)
+
+    result = self.DoReplaceRevisionRef(
+        'revision %s, ' % self.GIT_HASH_2.upper())
+    self.assertEqual(
+        'https://crrev.com/%s' % self.GIT_HASH_2.upper(), result[0].href)
+    self.assertEqual('revision %s' % self.GIT_HASH_2.upper(), result[0].content)
+
+    result = self.DoReplaceRevisionRef(
+        'and revision %s' % self.GIT_HASH_3.upper())
+    self.assertEqual(
+        'https://crrev.com/%s' % self.GIT_HASH_3.upper(), result[0].href)
+    self.assertEqual('revision %s' % self.GIT_HASH_3.upper(), result[0].content)
+
+  def testReplaceRevisionRef_CustomURL(self):
+    """A project can override the URL used for revision links."""
+    project = fake.Project()
+    project.revision_url_format = 'http://example.com/+/{revnum}'
+    result = self.DoReplaceRevisionRef(
+        'This is a fix for r%s' % self.GIT_HASH_1, project=project)
+    self.assertEqual(
+        'http://example.com/+/%s' % self.GIT_HASH_1, result[0].href)
+    self.assertEqual('r%s' % self.GIT_HASH_1, result[0].content)
diff --git a/features/test/banspammer_test.py b/features/test/banspammer_test.py
new file mode 100644
index 0000000..e6fceff
--- /dev/null
+++ b/features/test/banspammer_test.py
@@ -0,0 +1,141 @@
+# 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
+
+"""Tests for the ban spammer feature."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import json
+import mock
+import os
+import unittest
+import urllib
+import webapp2
+
+import settings
+from features import banspammer
+from framework import framework_views
+from framework import permissions
+from framework import urls
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+class BanSpammerTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.mr = testing_helpers.MakeMonorailRequest()
+    self.services = service_manager.Services(
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        spam=fake.SpamService(),
+        user=fake.UserService())
+    self.servlet = banspammer.BanSpammer('req', 'res', services=self.services)
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def testProcessFormData_noPermission(self, get_client_mock):
+    self.servlet.services.user.TestAddUser('member', 222)
+    self.servlet.services.user.TestAddUser('spammer@domain.com', 111)
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/u/spammer@domain.com/banSpammer.do',
+        perms=permissions.GetPermissions(None, {}, None))
+    mr.viewed_user_auth.user_view = framework_views.MakeUserView(mr.cnxn,
+        self.servlet.services.user, 111)
+    mr.auth.user_id = 222
+    self.assertRaises(permissions.PermissionException,
+        self.servlet.AssertBasePermission, mr)
+    try:
+      self.servlet.ProcessFormData(mr, {})
+    except permissions.PermissionException:
+      pass
+    self.assertEqual(get_client_mock().queue_path.call_count, 0)
+    self.assertEqual(get_client_mock().create_task.call_count, 0)
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def testProcessFormData_ok(self, get_client_mock):
+    self.servlet.services.user.TestAddUser('owner', 222)
+    self.servlet.services.user.TestAddUser('spammer@domain.com', 111)
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/u/spammer@domain.com/banSpammer.do',
+        perms=permissions.ADMIN_PERMISSIONSET)
+    mr.viewed_user_auth.user_view = framework_views.MakeUserView(mr.cnxn,
+        self.servlet.services.user, 111)
+    mr.viewed_user_auth.user_pb.user_id = 111
+    mr.auth.user_id = 222
+    self.servlet.ProcessFormData(mr, {'banned': 'non-empty'})
+
+    params = {'spammer_id': 111, 'reporter_id': 222, 'is_spammer': True}
+    task = {
+        'app_engine_http_request':
+            {
+                'relative_uri': urls.BAN_SPAMMER_TASK + '.do',
+                'body': urllib.urlencode(params),
+                'headers': {
+                    'Content-type': 'application/x-www-form-urlencoded'
+                }
+            }
+    }
+    get_client_mock().queue_path.assert_called_with(
+        settings.app_id, settings.CLOUD_TASKS_REGION, 'default')
+    get_client_mock().create_task.assert_called_once()
+    ((_parent, called_task), _kwargs) = get_client_mock().create_task.call_args
+    self.assertEqual(called_task, task)
+
+
+class BanSpammerTaskTest(unittest.TestCase):
+  def setUp(self):
+    self.services = service_manager.Services(
+        issue=fake.IssueService(),
+        spam=fake.SpamService())
+    self.res = webapp2.Response()
+    self.servlet = banspammer.BanSpammerTask('req', self.res,
+        services=self.services)
+
+  def testProcessFormData_okNoIssues(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path=urls.BAN_SPAMMER_TASK + '.do', method='POST',
+        params={'spammer_id': 111, 'reporter_id': 222})
+
+    self.servlet.HandleRequest(mr)
+    self.assertEqual(self.res.body, json.dumps({'comments': 0, 'issues': 0}))
+
+  def testProcessFormData_okSomeIssues(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path=urls.BAN_SPAMMER_TASK + '.do', method='POST',
+        params={'spammer_id': 111, 'reporter_id': 222})
+
+    for i in range(0, 10):
+      issue = fake.MakeTestIssue(
+          1, i, 'issue_summary', 'New', 111, project_name='project-name')
+      self.servlet.services.issue.TestAddIssue(issue)
+
+    self.servlet.HandleRequest(mr)
+    self.assertEqual(self.res.body, json.dumps({'comments': 0, 'issues': 10}))
+
+  def testProcessFormData_okSomeCommentsAndIssues(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path=urls.BAN_SPAMMER_TASK + '.do', method='POST',
+        params={'spammer_id': 111, 'reporter_id': 222})
+
+    for i in range(0, 12):
+      issue = fake.MakeTestIssue(
+          1, i, 'issue_summary', 'New', 111, project_name='project-name')
+      self.servlet.services.issue.TestAddIssue(issue)
+
+    for i in range(10, 20):
+      issue = fake.MakeTestIssue(
+          1, i, 'issue_summary', 'New', 222, project_name='project-name')
+      self.servlet.services.issue.TestAddIssue(issue)
+      for _ in range(0, 5):
+        comment = tracker_pb2.IssueComment()
+        comment.project_id = 1
+        comment.user_id = 111
+        comment.issue_id = issue.issue_id
+        self.servlet.services.issue.TestAddComment(comment, issue.local_id)
+    self.servlet.HandleRequest(mr)
+    self.assertEqual(self.res.body, json.dumps({'comments': 50, 'issues': 10}))
diff --git a/features/test/commands_test.py b/features/test/commands_test.py
new file mode 100644
index 0000000..e8bc47b
--- /dev/null
+++ b/features/test/commands_test.py
@@ -0,0 +1,230 @@
+# 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
+
+"""Classes and functions that implement command-line-like issue updates."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import unittest
+
+from features import commands
+from framework import framework_constants
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+class CommandsTest(unittest.TestCase):
+
+  def VerifyParseQuickEditCommmand(
+      self, cmd, exp_summary='sum', exp_status='New', exp_owner_id=111,
+      exp_cc_ids=None, exp_labels=None):
+
+    issue = tracker_pb2.Issue()
+    issue.project_name = 'proj'
+    issue.local_id = 1
+    issue.summary = 'sum'
+    issue.status = 'New'
+    issue.owner_id = 111
+    issue.cc_ids.extend([222, 333])
+    issue.labels.extend(['Type-Defect', 'Priority-Medium', 'Hot'])
+
+    if exp_cc_ids is None:
+      exp_cc_ids = [222, 333]
+    if exp_labels is None:
+      exp_labels = ['Type-Defect', 'Priority-Medium', 'Hot']
+
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    logged_in_user_id = 999
+    services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService())
+    services.user.TestAddUser('jrobbins', 333)
+    services.user.TestAddUser('jrobbins@jrobbins.org', 888)
+
+    cnxn = 'fake cnxn'
+    (summary, status, owner_id, cc_ids,
+     labels) = commands.ParseQuickEditCommand(
+         cnxn, cmd, issue, config, logged_in_user_id, services)
+    self.assertEqual(exp_summary, summary)
+    self.assertEqual(exp_status, status)
+    self.assertEqual(exp_owner_id, owner_id)
+    self.assertListEqual(exp_cc_ids, cc_ids)
+    self.assertListEqual(exp_labels, labels)
+
+  def testParseQuickEditCommmand_Empty(self):
+    self.VerifyParseQuickEditCommmand('')  # Nothing should change.
+
+  def testParseQuickEditCommmand_BuiltInFields(self):
+    self.VerifyParseQuickEditCommmand(
+        'status=Fixed', exp_status='Fixed')
+    self.VerifyParseQuickEditCommmand(  # Normalized capitalization.
+        'status=fixed', exp_status='Fixed')
+    self.VerifyParseQuickEditCommmand(
+        'status=limbo', exp_status='limbo')
+
+    self.VerifyParseQuickEditCommmand(
+        'owner=me', exp_owner_id=999)
+    self.VerifyParseQuickEditCommmand(
+        'owner=jrobbins@jrobbins.org', exp_owner_id=888)
+    self.VerifyParseQuickEditCommmand(
+        'owner=----', exp_owner_id=framework_constants.NO_USER_SPECIFIED)
+
+    self.VerifyParseQuickEditCommmand(
+        'summary=JustOneWord', exp_summary='JustOneWord')
+    self.VerifyParseQuickEditCommmand(
+        'summary="quoted sentence"', exp_summary='quoted sentence')
+    self.VerifyParseQuickEditCommmand(
+        "summary='quoted sentence'", exp_summary='quoted sentence')
+
+    self.VerifyParseQuickEditCommmand(
+        'cc=me', exp_cc_ids=[222, 333, 999])
+    self.VerifyParseQuickEditCommmand(
+        'cc=jrobbins@jrobbins.org', exp_cc_ids=[222, 333, 888])
+    self.VerifyParseQuickEditCommmand(
+        'cc=me,jrobbins@jrobbins.org',
+        exp_cc_ids=[222, 333, 999, 888])
+    self.VerifyParseQuickEditCommmand(
+        'cc=-jrobbins,jrobbins@jrobbins.org',
+        exp_cc_ids=[222, 888])
+
+  def testParseQuickEditCommmand_Labels(self):
+    self.VerifyParseQuickEditCommmand(
+        'Priority=Low', exp_labels=['Type-Defect', 'Hot', 'Priority-Low'])
+    self.VerifyParseQuickEditCommmand(
+        'priority=low', exp_labels=['Type-Defect', 'Hot', 'Priority-Low'])
+    self.VerifyParseQuickEditCommmand(
+        'priority-low', exp_labels=['Type-Defect', 'Hot', 'Priority-Low'])
+    self.VerifyParseQuickEditCommmand(
+        '-priority-low', exp_labels=['Type-Defect', 'Priority-Medium', 'Hot'])
+    self.VerifyParseQuickEditCommmand(
+        '-priority-medium', exp_labels=['Type-Defect', 'Hot'])
+
+    self.VerifyParseQuickEditCommmand(
+        'Cold', exp_labels=['Type-Defect', 'Priority-Medium', 'Hot', 'Cold'])
+    self.VerifyParseQuickEditCommmand(
+        '+Cold', exp_labels=['Type-Defect', 'Priority-Medium', 'Hot', 'Cold'])
+    self.VerifyParseQuickEditCommmand(
+        '-Hot Cold', exp_labels=['Type-Defect', 'Priority-Medium', 'Cold'])
+    self.VerifyParseQuickEditCommmand(
+        '-Hot', exp_labels=['Type-Defect', 'Priority-Medium'])
+
+  def testParseQuickEditCommmand_Multiple(self):
+    self.VerifyParseQuickEditCommmand(
+        'Priority=Low -hot owner:me cc:-jrobbins summary="other summary"',
+        exp_summary='other summary', exp_owner_id=999,
+        exp_cc_ids=[222], exp_labels=['Type-Defect', 'Priority-Low'])
+
+  def testBreakCommandIntoParts_Empty(self):
+    self.assertListEqual(
+        [],
+        commands._BreakCommandIntoParts(''))
+
+  def testBreakCommandIntoParts_Single(self):
+    self.assertListEqual(
+        [('summary', 'new summary')],
+        commands._BreakCommandIntoParts('summary="new summary"'))
+    self.assertListEqual(
+        [('summary', 'OneWordSummary')],
+        commands._BreakCommandIntoParts('summary=OneWordSummary'))
+    self.assertListEqual(
+        [('key', 'value')],
+        commands._BreakCommandIntoParts('key=value'))
+    self.assertListEqual(
+        [('key', 'value-with-dashes')],
+        commands._BreakCommandIntoParts('key=value-with-dashes'))
+    self.assertListEqual(
+        [('key', 'value')],
+        commands._BreakCommandIntoParts('key:value'))
+    self.assertListEqual(
+        [('key', 'value')],
+        commands._BreakCommandIntoParts(' key:value '))
+    self.assertListEqual(
+        [('key', 'value')],
+        commands._BreakCommandIntoParts('key:"value"'))
+    self.assertListEqual(
+        [('key', 'user@dom.com')],
+        commands._BreakCommandIntoParts('key:user@dom.com'))
+    self.assertListEqual(
+        [('key', 'a@dom.com,-b@dom.com')],
+        commands._BreakCommandIntoParts('key:a@dom.com,-b@dom.com'))
+    self.assertListEqual(
+        [(None, 'label')],
+        commands._BreakCommandIntoParts('label'))
+    self.assertListEqual(
+        [(None, '-label')],
+        commands._BreakCommandIntoParts('-label'))
+    self.assertListEqual(
+        [(None, '+label')],
+        commands._BreakCommandIntoParts('+label'))
+
+  def testBreakCommandIntoParts_Multiple(self):
+    self.assertListEqual(
+        [('summary', 'new summary'), (None, 'Hot'), (None, '-Cold'),
+         ('owner', 'me'), ('cc', '+a,-b')],
+        commands._BreakCommandIntoParts(
+            'summary="new summary" Hot -Cold owner:me cc:+a,-b'))
+
+
+class CommandSyntaxParsingTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        user=fake.UserService())
+
+    self.services.project.TestAddProject('proj', owner_ids=[111])
+    self.services.user.TestAddUser('a@example.com', 222)
+
+    cnxn = 'fake connection'
+    config = self.services.config.GetProjectConfig(cnxn, 789)
+
+    for status in ['New', 'ReadyForReview']:
+      config.well_known_statuses.append(tracker_pb2.StatusDef(
+          status=status))
+
+    for label in ['Prioity-Low', 'Priority-High']:
+      config.well_known_labels.append(tracker_pb2.LabelDef(
+          label=label))
+
+    config.exclusive_label_prefixes.extend(
+        tracker_constants.DEFAULT_EXCL_LABEL_PREFIXES)
+
+    self.services.config.StoreConfig(cnxn, config)
+
+  def testStandardizeStatus(self):
+    config = self.services.config.GetProjectConfig('fake cnxn', 789)
+    self.assertEqual('New',
+                     commands._StandardizeStatus('NEW', config))
+    self.assertEqual('New',
+                     commands._StandardizeStatus('n$Ew ', config))
+    self.assertEqual(
+        'custom-label',
+        commands._StandardizeLabel('custom=label ', config))
+
+  def testStandardizeLabel(self):
+    config = self.services.config.GetProjectConfig('fake cnxn', 789)
+    self.assertEqual(
+        'Priority-High',
+        commands._StandardizeLabel('priority-high', config))
+    self.assertEqual(
+        'Priority-High',
+        commands._StandardizeLabel('PRIORITY=HIGH', config))
+
+  def testLookupMeOrUsername(self):
+    self.assertEqual(
+        123,
+        commands._LookupMeOrUsername('fake cnxn', 'me', self.services, 123))
+
+    self.assertEqual(
+        222,
+        commands._LookupMeOrUsername(
+            'fake cnxn', 'a@example.com', self.services, 0))
diff --git a/features/test/commitlogcommands_test.py b/features/test/commitlogcommands_test.py
new file mode 100644
index 0000000..7e5d566
--- /dev/null
+++ b/features/test/commitlogcommands_test.py
@@ -0,0 +1,111 @@
+# 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
+
+"""Unittests for monorail.features.commitlogcommands."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+
+from features import commitlogcommands
+from features import send_notifications
+from framework import monorailcontext
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class InboundEmailTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService(),
+        config=fake.ConfigService())
+
+    self.member = self.services.user.TestAddUser('member@example.com', 111)
+    self.outsider = self.services.user.TestAddUser('outsider@example.com', 222)
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=987, process_inbound_email=True,
+        committer_ids=[self.member.user_id])
+    self.issue = tracker_pb2.Issue()
+    self.issue.issue_id = 98701
+    self.issue.project_id = 987
+    self.issue.local_id = 1
+    self.issue.owner_id = 0
+    self.issue.summary = 'summary'
+    self.issue.status = 'Assigned'
+    self.services.issue.TestAddIssue(self.issue)
+
+    self.uia = commitlogcommands.UpdateIssueAction(self.issue.local_id)
+
+  def testParse_NoCommandLines(self):
+    commands_found = self.uia.Parse(self.cnxn, self.project.project_name, 111,
+                   ['line 1'], self.services,
+                   hostport='testing-app.appspot.com', strip_quoted_lines=True)
+    self.assertEqual(False, commands_found)
+    self.assertEqual('line 1', self.uia.description)
+    self.assertEqual('line 1', self.uia.inbound_message)
+
+  def testParse_StripQuotedLines(self):
+    commands_found = self.uia.Parse(self.cnxn, self.project.project_name, 111,
+                   ['summary:something', '> line 1', 'line 2'], self.services,
+                   hostport='testing-app.appspot.com', strip_quoted_lines=True)
+    self.assertEqual(True, commands_found)
+    self.assertEqual('line 2', self.uia.description)
+    self.assertEqual(
+        'summary:something\n> line 1\nline 2', self.uia.inbound_message)
+
+  def testParse_NoStripQuotedLines(self):
+    commands_found = self.uia.Parse(self.cnxn, self.project.project_name, 111,
+                   ['summary:something', '> line 1', 'line 2'], self.services,
+                   hostport='testing-app.appspot.com')
+    self.assertEqual(True, commands_found)
+    self.assertEqual('> line 1\nline 2', self.uia.description)
+    self.assertIsNone(self.uia.inbound_message)
+
+  def setupAndCallRun(self, mc, commenter_id, mock_pasicn):
+    self.uia.Parse(self.cnxn, self.project.project_name, 111,
+                   ['summary:something', 'status:New', '> line 1', '> line 2'],
+                   self.services, hostport='testing-app.appspot.com')
+    self.uia.Run(mc, self.services)
+
+    mock_pasicn.assert_called_once_with(
+        self.issue.issue_id, 'testing-app.appspot.com', commenter_id,
+        old_owner_id=self.issue.owner_id, comment_id=1, send_email=True)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testRun_AllowEdit(self, mock_pasicn):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='member@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    self.setupAndCallRun(mc, 111, mock_pasicn)
+
+    self.assertEqual('> line 1\n> line 2', self.uia.description)
+    # Assert that amendments were made to the issue.
+    self.assertEqual('something', self.issue.summary)
+    self.assertEqual('New', self.issue.status)
+
+  @mock.patch(
+      'features.send_notifications.PrepareAndSendIssueChangeNotification')
+  def testRun_NoAllowEdit(self, mock_pasicn):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='outsider@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    self.setupAndCallRun(mc, 222, mock_pasicn)
+
+    self.assertEqual('> line 1\n> line 2', self.uia.description)
+    # Assert that amendments were *not* made to the issue.
+    self.assertEqual('summary', self.issue.summary)
+    self.assertEqual('Assigned', self.issue.status)
diff --git a/features/test/component_helpers_test.py b/features/test/component_helpers_test.py
new file mode 100644
index 0000000..aa6c761
--- /dev/null
+++ b/features/test/component_helpers_test.py
@@ -0,0 +1,145 @@
+# Copyright 2018 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
+
+"""Unit tests for component prediction endpoints."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import json
+import mock
+import sys
+import unittest
+
+from services import service_manager
+from testing import fake
+
+# Mock cloudstorage before it's imported by component_helpers
+sys.modules['cloudstorage'] = mock.Mock()
+from features import component_helpers
+
+
+class FakeMLEngine(object):
+  def __init__(self, test):
+    self.test = test
+    self.expected_features = None
+    self.scores = None
+    self._execute_response = None
+
+  def projects(self):
+    return self
+
+  def models(self):
+    return self
+
+  def predict(self, name, body):
+    self.test.assertEqual(component_helpers.MODEL_NAME, name)
+    self.test.assertEqual(
+        {'instances': [{'inputs': self.expected_features}]}, body)
+    self._execute_response = {'predictions': [{'scores': self.scores}]}
+    return self
+
+  def get(self, name):
+    self.test.assertEqual(component_helpers.MODEL_NAME, name)
+    self._execute_response = {'defaultVersion': {'name': 'v_1234'}}
+    return self
+
+  def execute(self):
+    response = self._execute_response
+    self._execute_response = None
+    return response
+
+
+class ComponentHelpersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        user=fake.UserService())
+    self.project = fake.Project(project_name='proj')
+
+    self._ml_engine = FakeMLEngine(self)
+    self._top_words = None
+    self._components_by_index = None
+
+    mock.patch(
+        'services.ml_helpers.setup_ml_engine', lambda: self._ml_engine).start()
+    mock.patch(
+        'features.component_helpers._GetTopWords',
+        lambda _: self._top_words).start()
+    mock.patch('cloudstorage.open', self.cloudstorageOpen).start()
+    mock.patch('settings.component_features', 5).start()
+
+    self.addCleanup(mock.patch.stopall)
+
+  def cloudstorageOpen(self, name, mode):
+    """Create a file mock that returns self._components_by_index when read."""
+    open_fn = mock.mock_open(read_data=json.dumps(self._components_by_index))
+    return open_fn(name, mode)
+
+  def testPredict_Normal(self):
+    """Test normal case when predicted component exists."""
+    component_id = self.services.config.CreateComponentDef(
+        cnxn=None, project_id=self.project.project_id, path='Ruta>Baga',
+        docstring='', deprecated=False, admin_ids=[], cc_ids=[], created=None,
+        creator_id=None, label_ids=[])
+    config = self.services.config.GetProjectConfig(
+        None, self.project.project_id)
+
+    self._top_words = {
+        'foo': 0,
+        'bar': 1,
+        'baz': 2}
+    self._components_by_index = {
+        '0': '123',
+        '1': str(component_id),
+        '2': '789'}
+    self._ml_engine.expected_features = [3, 0, 1, 0, 0]
+    self._ml_engine.scores = [5, 10, 3]
+
+    text = 'foo baz foo foo'
+
+    self.assertEqual(
+        component_id, component_helpers.PredictComponent(text, config))
+
+  def testPredict_UnknownComponentIndex(self):
+    """Test case where the prediction is not in components_by_index."""
+    config = self.services.config.GetProjectConfig(
+        None, self.project.project_id)
+
+    self._top_words = {
+        'foo': 0,
+        'bar': 1,
+        'baz': 2}
+    self._components_by_index = {
+        '0': '123',
+        '1': '456',
+        '2': '789'}
+    self._ml_engine.expected_features = [3, 0, 1, 0, 0]
+    self._ml_engine.scores = [5, 10, 3, 1000]
+
+    text = 'foo baz foo foo'
+
+    self.assertIsNone(component_helpers.PredictComponent(text, config))
+
+  def testPredict_InvalidComponentIndex(self):
+    """Test case where the prediction is not a valid component id."""
+    config = self.services.config.GetProjectConfig(
+        None, self.project.project_id)
+
+    self._top_words = {
+        'foo': 0,
+        'bar': 1,
+        'baz': 2}
+    self._components_by_index = {
+        '0': '123',
+        '1': '456',
+        '2': '789'}
+    self._ml_engine.expected_features = [3, 0, 1, 0, 0]
+    self._ml_engine.scores = [5, 10, 3]
+
+    text = 'foo baz foo foo'
+
+    self.assertIsNone(component_helpers.PredictComponent(text, config))
diff --git a/features/test/componentexport_test.py b/features/test/componentexport_test.py
new file mode 100644
index 0000000..0e5fbf8
--- /dev/null
+++ b/features/test/componentexport_test.py
@@ -0,0 +1,42 @@
+# Copyright 2020 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.
+"""Tests for the componentexport module."""
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+import mock
+import unittest
+import webapp2
+
+import settings
+from features import componentexport
+from framework import urls
+
+
+class ComponentTrainingDataExportTest(unittest.TestCase):
+
+  def test_handler_definition(self):
+    instance = componentexport.ComponentTrainingDataExport()
+    self.assertIsInstance(instance, webapp2.RequestHandler)
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def test_enqueues_task(self, get_client_mock):
+    componentexport.ComponentTrainingDataExport().get()
+
+    queue = 'componentexport'
+    task = {
+        'app_engine_http_request':
+            {
+                'http_method': 'GET',
+                'relative_uri': urls.COMPONENT_DATA_EXPORT_TASK
+            }
+    }
+
+    get_client_mock().queue_path.assert_called_with(
+        settings.app_id, settings.CLOUD_TASKS_REGION, queue)
+    get_client_mock().create_task.assert_called_once()
+    ((_parent, called_task), _kwargs) = get_client_mock().create_task.call_args
+    self.assertEqual(called_task, task)
diff --git a/features/test/dateaction_test.py b/features/test/dateaction_test.py
new file mode 100644
index 0000000..09e5c5c
--- /dev/null
+++ b/features/test/dateaction_test.py
@@ -0,0 +1,323 @@
+# 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
+
+"""Unittest for the dateaction module."""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import logging
+import mock
+import time
+import unittest
+
+from features import dateaction
+from framework import cloud_tasks_helpers
+from framework import framework_constants
+from framework import framework_views
+from framework import timestr
+from framework import urls
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+
+
+NOW = 1492120863
+
+
+class DateActionCronTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        issue=fake.IssueService())
+    self.servlet = dateaction.DateActionCron(
+        'req', 'res', services=self.services)
+    self.TIMESTAMP_MIN = (
+        NOW // framework_constants.SECS_PER_DAY *
+        framework_constants.SECS_PER_DAY)
+    self.TIMESTAMP_MAX = self.TIMESTAMP_MIN + framework_constants.SECS_PER_DAY
+    self.left_joins = [
+        ('Issue2FieldValue ON Issue.id = Issue2FieldValue.issue_id', []),
+        ('FieldDef ON Issue2FieldValue.field_id = FieldDef.id', []),
+    ]
+    self.where = [
+        ('FieldDef.field_type = %s', ['date_type']),
+        (
+            'FieldDef.date_action IN (%s,%s)',
+            ['ping_owner_only', 'ping_participants']),
+        ('Issue2FieldValue.date_value >= %s', [self.TIMESTAMP_MIN]),
+        ('Issue2FieldValue.date_value < %s', [self.TIMESTAMP_MAX]),
+    ]
+    self.order_by = [
+        ('Issue.id', []),
+    ]
+
+  @mock.patch('time.time', return_value=NOW)
+  def testHandleRequest_NoMatches(self, _mock_time):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path=urls.DATE_ACTION_CRON)
+    self.services.issue.RunIssueQuery = mock.MagicMock(return_value=([], False))
+
+    self.servlet.HandleRequest(mr)
+
+    self.services.issue.RunIssueQuery.assert_called_with(
+        mr.cnxn, self.left_joins, self.where + [('Issue.id > %s', [0])],
+        self.order_by)
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  @mock.patch('time.time', return_value=NOW)
+  def testHandleRequest_OneMatche(self, _mock_time, get_client_mock):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path=urls.DATE_ACTION_CRON)
+    self.services.issue.RunIssueQuery = mock.MagicMock(
+        return_value=([78901], False))
+
+    self.servlet.HandleRequest(mr)
+
+    self.services.issue.RunIssueQuery.assert_called_with(
+        mr.cnxn, self.left_joins, self.where + [('Issue.id > %s', [0])],
+        self.order_by)
+    expected_task = {
+        'app_engine_http_request':
+            {
+                'relative_uri': urls.ISSUE_DATE_ACTION_TASK + '.do',
+                'body': 'issue_id=78901',
+                'headers': {
+                    'Content-type': 'application/x-www-form-urlencoded'
+                }
+            }
+    }
+    get_client_mock().create_task.assert_any_call(
+        get_client_mock().queue_path(),
+        expected_task,
+        retry=cloud_tasks_helpers._DEFAULT_RETRY)
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def testEnqueueDateAction(self, get_client_mock):
+    self.servlet.EnqueueDateAction(78901)
+    expected_task = {
+        'app_engine_http_request':
+            {
+                'relative_uri': urls.ISSUE_DATE_ACTION_TASK + '.do',
+                'body': 'issue_id=78901',
+                'headers': {
+                    'Content-type': 'application/x-www-form-urlencoded'
+                }
+            }
+    }
+    get_client_mock().create_task.assert_any_call(
+        get_client_mock().queue_path(),
+        expected_task,
+        retry=cloud_tasks_helpers._DEFAULT_RETRY)
+
+
+class IssueDateActionTaskTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        features=fake.FeaturesService(),
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue_star=fake.IssueStarService())
+    self.servlet = dateaction.IssueDateActionTask(
+        'req', 'res', services=self.services)
+
+    self.config = self.services.config.GetProjectConfig('cnxn', 789)
+    self.config.field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            123, 789, 'NextAction', tracker_pb2.FieldTypes.DATE_TYPE,
+            '', '', False, False, False, None, None, None, False, '',
+            None, None, tracker_pb2.DateAction.PING_OWNER_ONLY,
+            'Date of next expected progress update', False),
+        tracker_bizobj.MakeFieldDef(
+            124, 789, 'EoL', tracker_pb2.FieldTypes.DATE_TYPE,
+            '', '', False, False, False, None, None, None, False, '',
+            None, None, tracker_pb2.DateAction.PING_OWNER_ONLY, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            125, 789, 'TLsBirthday', tracker_pb2.FieldTypes.DATE_TYPE,
+            '', '', False, False, False, None, None, None, False, '',
+            None, None, tracker_pb2.DateAction.NO_ACTION, 'doc', False),
+        ]
+    self.services.config.StoreConfig('cnxn', self.config)
+    self.project = self.services.project.TestAddProject('proj', project_id=789)
+    self.owner = self.services.user.TestAddUser('owner@example.com', 111)
+    self.date_action_user = self.services.user.TestAddUser(
+        'date-action-user@example.com', 555)
+
+  def testHandleRequest_IssueHasNoArrivedDates(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path=urls.ISSUE_DATE_ACTION_TASK + '.do?issue_id=78901')
+    self.services.issue.TestAddIssue(fake.MakeTestIssue(
+        789, 1, 'summary', 'New', 111, issue_id=78901))
+    self.assertEqual(1, len(self.services.issue.GetCommentsForIssue(
+        mr.cnxn, 78901)))
+
+    self.servlet.HandleRequest(mr)
+    self.assertEqual(1, len(self.services.issue.GetCommentsForIssue(
+        mr.cnxn, 78901)))
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testHandleRequest_IssueHasOneArriveDate(self, create_task_mock):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path=urls.ISSUE_DATE_ACTION_TASK + '.do?issue_id=78901')
+
+    now = int(time.time())
+    date_str = timestr.TimestampToDateWidgetStr(now)
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    issue.field_values = [
+        tracker_bizobj.MakeFieldValue(123, None, None, None, now, None, False)]
+    self.assertEqual(1, len(self.services.issue.GetCommentsForIssue(
+        mr.cnxn, 78901)))
+
+    self.servlet.HandleRequest(mr)
+    comments = self.services.issue.GetCommentsForIssue(mr.cnxn, 78901)
+    self.assertEqual(2, len(comments))
+    self.assertEqual(
+      'The NextAction date has arrived: %s' % date_str,
+      comments[1].content)
+
+    self.assertEqual(create_task_mock.call_count, 1)
+
+    (args, kwargs) = create_task_mock.call_args
+    self.assertEqual(
+        args[0]['app_engine_http_request']['relative_uri'],
+        urls.OUTBOUND_EMAIL_TASK + '.do')
+    self.assertEqual(kwargs['queue'], 'outboundemail')
+
+  def SetUpFieldValues(self, issue, now):
+    issue.field_values = [
+        tracker_bizobj.MakeFieldValue(123, None, None, None, now, None, False),
+        tracker_bizobj.MakeFieldValue(124, None, None, None, now, None, False),
+        tracker_bizobj.MakeFieldValue(125, None, None, None, now, None, False),
+        ]
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testHandleRequest_IssueHasTwoArriveDates(self, create_task_mock):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path=urls.ISSUE_DATE_ACTION_TASK + '.do?issue_id=78901')
+
+    now = int(time.time())
+    date_str = timestr.TimestampToDateWidgetStr(now)
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    self.SetUpFieldValues(issue, now)
+    self.assertEqual(1, len(self.services.issue.GetCommentsForIssue(
+        mr.cnxn, 78901)))
+
+    self.servlet.HandleRequest(mr)
+    comments = self.services.issue.GetCommentsForIssue(mr.cnxn, 78901)
+    self.assertEqual(2, len(comments))
+    self.assertEqual(
+      'The EoL date has arrived: %s\n'
+      'The NextAction date has arrived: %s' % (date_str, date_str),
+      comments[1].content)
+
+    self.assertEqual(create_task_mock.call_count, 1)
+
+    (args, kwargs) = create_task_mock.call_args
+    self.assertEqual(
+        args[0]['app_engine_http_request']['relative_uri'],
+        urls.OUTBOUND_EMAIL_TASK + '.do')
+    self.assertEqual(kwargs['queue'], 'outboundemail')
+
+  def MakePingComment(self):
+    comment = tracker_pb2.IssueComment()
+    comment.project_id = self.project.project_id
+    comment.user_id = self.date_action_user.user_id
+    comment.content = 'Some date(s) arrived...'
+    return comment
+
+  def testMakeEmailTasks_Owner(self):
+    """The issue owner gets pinged and the email has expected content."""
+    issue = fake.MakeTestIssue(
+        789, 1, 'summary', 'New', self.owner.user_id, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    now = int(time.time())
+    self.SetUpFieldValues(issue, now)
+    issue.project_name = 'proj'
+    comment = self.MakePingComment()
+    next_action_field_def = self.config.field_defs[0]
+    pings = [(next_action_field_def, now)]
+    users_by_id = framework_views.MakeAllUserViews(
+        'fake cnxn', self.services.user,
+        [self.owner.user_id, self.date_action_user.user_id])
+
+    tasks = self.servlet._MakeEmailTasks(
+        'fake cnxn', issue, self.project, self.config, comment,
+        [], 'example-app.appspot.com', users_by_id, pings)
+    self.assertEqual(1, len(tasks))
+    notify_owner_task = tasks[0]
+    self.assertEqual('owner@example.com', notify_owner_task['to'])
+    self.assertEqual(
+        'Follow up on issue 1 in proj: summary',
+        notify_owner_task['subject'])
+    body = notify_owner_task['body']
+    self.assertIn(comment.content, body)
+    self.assertIn(next_action_field_def.docstring, body)
+
+  def testMakeEmailTasks_Starrer(self):
+    """Users who starred the issue are notified iff they opt in."""
+    issue = fake.MakeTestIssue(
+        789, 1, 'summary', 'New', 0, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    now = int(time.time())
+    self.SetUpFieldValues(issue, now)
+    issue.project_name = 'proj'
+    comment = self.MakePingComment()
+    next_action_field_def = self.config.field_defs[0]
+    pings = [(next_action_field_def, now)]
+
+    starrer_333 = self.services.user.TestAddUser('starrer333@example.com', 333)
+    starrer_333.notify_starred_ping = True
+    self.services.user.TestAddUser('starrer444@example.com', 444)
+    starrer_ids = [333, 444]
+    users_by_id = framework_views.MakeAllUserViews(
+        'fake cnxn', self.services.user,
+        [self.owner.user_id, self.date_action_user.user_id],
+        starrer_ids)
+
+    tasks = self.servlet._MakeEmailTasks(
+        'fake cnxn', issue, self.project, self.config, comment,
+        starrer_ids, 'example-app.appspot.com', users_by_id, pings)
+    self.assertEqual(1, len(tasks))
+    notify_owner_task = tasks[0]
+    self.assertEqual('starrer333@example.com', notify_owner_task['to'])
+
+  def testCalculateIssuePings_Normal(self):
+    """Return a ping for an issue that has a date that happened today."""
+    issue = fake.MakeTestIssue(
+        789, 1, 'summary', 'New', 0, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    now = int(time.time())
+    self.SetUpFieldValues(issue, now)
+    issue.project_name = 'proj'
+
+    pings = self.servlet._CalculateIssuePings(issue, self.config)
+
+    self.assertEqual(
+        [(self.config.field_defs[1], now),
+         (self.config.field_defs[0], now)],
+        pings)
+
+  def testCalculateIssuePings_Closed(self):
+    """Don't ping for a closed issue."""
+    issue = fake.MakeTestIssue(
+        789, 1, 'summary', 'Fixed', 0, issue_id=78901)
+    self.services.issue.TestAddIssue(issue)
+    now = int(time.time())
+    self.SetUpFieldValues(issue, now)
+    issue.project_name = 'proj'
+
+    pings = self.servlet._CalculateIssuePings(issue, self.config)
+
+    self.assertEqual([], pings)
diff --git a/features/test/features_bizobj_test.py b/features/test/features_bizobj_test.py
new file mode 100644
index 0000000..1814ae2
--- /dev/null
+++ b/features/test/features_bizobj_test.py
@@ -0,0 +1,134 @@
+# 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
+
+"""Tests for features bizobj functions."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from proto import features_pb2
+from features import features_bizobj
+from testing import fake
+
+class FeaturesBizobjTest(unittest.TestCase):
+
+  def setUp(self):
+    self.local_ids = [1, 2, 3, 4, 5]
+    self.issues = [fake.MakeTestIssue(1000, local_id, '', 'New', 111)
+                   for local_id in self.local_ids]
+    self.hotlistitems = [features_pb2.MakeHotlistItem(
+        issue.issue_id, rank=rank*10, adder_id=111, date_added=3) for
+                           rank, issue in enumerate(self.issues)]
+    self.iids = [item.issue_id for item in self.hotlistitems]
+
+  def testIssueIsInHotlist(self):
+    hotlist = features_pb2.Hotlist(items=self.hotlistitems)
+    for issue in self.issues:
+      self.assertTrue(features_bizobj.IssueIsInHotlist(hotlist, issue.issue_id))
+
+    self.assertFalse(features_bizobj.IssueIsInHotlist(
+        hotlist, fake.MakeTestIssue(1000, 9, '', 'New', 111)))
+
+  def testSplitHotlistIssueRanks(self):
+    iid_rank_tuples = [(issue.issue_id, issue.rank)
+                       for issue in self.hotlistitems]
+    iid_rank_tuples.reverse()
+    ret = features_bizobj.SplitHotlistIssueRanks(
+        100003, True, iid_rank_tuples)
+    self.assertEqual(ret, (iid_rank_tuples[:2], iid_rank_tuples[2:]))
+
+    iid_rank_tuples.reverse()
+    ret = features_bizobj.SplitHotlistIssueRanks(
+        100003, False, iid_rank_tuples)
+    self.assertEqual(ret, (iid_rank_tuples[:3], iid_rank_tuples[3:]))
+
+    # target issue not found
+    first_pairs, second_pairs = features_bizobj.SplitHotlistIssueRanks(
+        100009, True, iid_rank_tuples)
+    self.assertEqual(iid_rank_tuples, first_pairs)
+    self.assertEqual(second_pairs, [])
+
+  def testGetOwnerIds(self):
+    hotlist = features_pb2.Hotlist(owner_ids=[111])
+    self.assertEqual(features_bizobj.GetOwnerIds(hotlist), [111])
+
+  def testUsersInvolvedInHotlists_Empty(self):
+    self.assertEqual(set(), features_bizobj.UsersInvolvedInHotlists([]))
+
+  def testUsersInvolvedInHotlists_Normal(self):
+    hotlist1 = features_pb2.Hotlist(
+        owner_ids=[111, 222], editor_ids=[333, 444, 555],
+        follower_ids=[123])
+    hotlist2 = features_pb2.Hotlist(
+        owner_ids=[111], editor_ids=[222, 123])
+    self.assertEqual(set([111, 222, 333, 444, 555, 123]),
+                     features_bizobj.UsersInvolvedInHotlists([hotlist1,
+                                                              hotlist2]))
+
+  def testUserIsInHotlist(self):
+    h = features_pb2.Hotlist()
+    self.assertFalse(features_bizobj.UserIsInHotlist(h, {9}))
+    self.assertFalse(features_bizobj.UserIsInHotlist(h, set()))
+
+    h.owner_ids.extend([1, 2, 3])
+    h.editor_ids.extend([4, 5, 6])
+    h.follower_ids.extend([7, 8, 9])
+    self.assertTrue(features_bizobj.UserIsInHotlist(h, {1}))
+    self.assertTrue(features_bizobj.UserIsInHotlist(h, {4}))
+    self.assertTrue(features_bizobj.UserIsInHotlist(h, {7}))
+    self.assertFalse(features_bizobj.UserIsInHotlist(h, {10}))
+
+    # Membership via group membership
+    self.assertTrue(features_bizobj.UserIsInHotlist(h, {10, 4}))
+
+    # Membership via several group memberships
+    self.assertTrue(features_bizobj.UserIsInHotlist(h, {1, 4}))
+
+    # Several irrelevant group memberships
+    self.assertFalse(features_bizobj.UserIsInHotlist(h, {10, 11, 12}))
+
+  def testDetermineHotlistIssuePosition(self):
+    # normal
+    prev_iid, index, next_iid = features_bizobj.DetermineHotlistIssuePosition(
+        self.issues[2], self.iids)
+    self.assertEqual(prev_iid, self.hotlistitems[1].issue_id)
+    self.assertEqual(index, 2)
+    self.assertEqual(next_iid, self.hotlistitems[3].issue_id)
+
+    # end of list
+    prev_iid, index, next_iid = features_bizobj.DetermineHotlistIssuePosition(
+        self.issues[4], self.iids)
+    self.assertEqual(prev_iid, self.hotlistitems[3].issue_id)
+    self.assertEqual(index, 4)
+    self.assertEqual(next_iid, None)
+
+    # beginning of list
+    prev_iid, index, next_iid = features_bizobj.DetermineHotlistIssuePosition(
+        self.issues[0], self.iids)
+    self.assertEqual(prev_iid, None)
+    self.assertEqual(index, 0)
+    self.assertEqual(next_iid, self.hotlistitems[1].issue_id)
+
+    # one item in list
+    prev_iid, index, next_iid = features_bizobj.DetermineHotlistIssuePosition(
+        self.issues[2], [self.iids[2]])
+    self.assertEqual(prev_iid, None)
+    self.assertEqual(index, 0)
+    self.assertEqual(next_iid, None)
+
+    prev_iid, index, next_iid = features_bizobj.DetermineHotlistIssuePosition(
+        self.issues[2], [self.iids[3]])
+    self.assertEqual(prev_iid, None)
+    self.assertEqual(index, None)
+    self.assertEqual(next_iid, None)
+
+    #none
+    prev_iid, index, next_iid = features_bizobj.DetermineHotlistIssuePosition(
+        self.issues[2], [])
+    self.assertEqual(prev_iid, None)
+    self.assertEqual(index, None)
+    self.assertEqual(next_iid, None)
diff --git a/features/test/federated_test.py b/features/test/federated_test.py
new file mode 100644
index 0000000..1ba088a
--- /dev/null
+++ b/features/test/federated_test.py
@@ -0,0 +1,114 @@
+# Copyright 2019 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
+
+"""Unit tests for monorail.feature.federated."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from features import federated
+from framework.exceptions import InvalidExternalIssueReference
+
+
+# Schema: tracker, shortlink.
+VALID_SHORTLINKS = [
+    ('google', 'b/1'),
+    ('google', 'b/123456'),
+    ('google', 'b/1234567890123')]
+
+
+# Schema: tracker, shortlink.
+INVALID_SHORTLINKS = [
+   ('google', 'b'),
+   ('google', 'b/'),
+   ('google', 'b//123'),
+   ('google', 'b/123/123')]
+
+
+class FederatedTest(unittest.TestCase):
+  """Test public module methods."""
+
+  def testIsShortlinkValid_Valid(self):
+    for _, shortlink in VALID_SHORTLINKS:
+      self.assertTrue(federated.IsShortlinkValid(shortlink),
+        'Expected %s to be a valid shortlink for any tracker.'
+        % shortlink)
+
+  def testIsShortlinkValid_Invalid(self):
+    for _, shortlink in INVALID_SHORTLINKS:
+      self.assertFalse(federated.IsShortlinkValid(shortlink),
+        'Expected %s to be an invalid shortlink for any tracker.'
+        % shortlink)
+
+  def testFromShortlink_Valid(self):
+    for _, shortlink in VALID_SHORTLINKS:
+      issue = federated.FromShortlink(shortlink)
+      self.assertEqual(shortlink, issue.shortlink, (
+          'Expected %s to be converted into a valid tracker object '
+          'with shortlink %s' % (shortlink, issue.shortlink)))
+
+  def testFromShortlink_Invalid(self):
+    for _, shortlink in INVALID_SHORTLINKS:
+      self.assertIsNone(federated.FromShortlink(shortlink))
+
+
+class FederatedIssueTest(unittest.TestCase):
+
+  def testInit_NotImplemented(self):
+    """By default, __init__ raises NotImplementedError.
+
+    Because __init__ calls IsShortlinkValid. See test below.
+    """
+    with self.assertRaises(NotImplementedError):
+      federated.FederatedIssue('a')
+
+  def testIsShortlinkValid_NotImplemented(self):
+    """By default, IsShortlinkValid raises NotImplementedError."""
+    with self.assertRaises(NotImplementedError):
+      federated.FederatedIssue('a').IsShortlinkValid('rutabaga')
+
+
+class GoogleIssueTrackerIssueTest(unittest.TestCase):
+
+  def setUp(self):
+    self.valid_shortlinks = [s for tracker, s in VALID_SHORTLINKS
+      if tracker == 'google']
+    self.invalid_shortlinks = [s for tracker, s in INVALID_SHORTLINKS
+      if tracker == 'google']
+
+  def testInit_ValidatesValidShortlink(self):
+    for shortlink in self.valid_shortlinks:
+      issue = federated.GoogleIssueTrackerIssue(shortlink)
+      self.assertEqual(issue.shortlink, shortlink)
+
+  def testInit_ValidatesInvalidShortlink(self):
+    for shortlink in self.invalid_shortlinks:
+      with self.assertRaises(InvalidExternalIssueReference):
+        federated.GoogleIssueTrackerIssue(shortlink)
+
+  def testIsShortlinkValid_Valid(self):
+    for shortlink in self.valid_shortlinks:
+      self.assertTrue(
+        federated.GoogleIssueTrackerIssue.IsShortlinkValid(shortlink),
+        'Expected %s to be a valid shortlink for Google.'
+        % shortlink)
+
+  def testIsShortlinkValid_Invalid(self):
+    for shortlink in self.invalid_shortlinks:
+      self.assertFalse(
+        federated.GoogleIssueTrackerIssue.IsShortlinkValid(shortlink),
+        'Expected %s to be an invalid shortlink for Google.'
+        % shortlink)
+
+  def testToURL(self):
+    self.assertEqual('https://issuetracker.google.com/issues/123456',
+        federated.GoogleIssueTrackerIssue('b/123456').ToURL())
+
+  def testSummary(self):
+    self.assertEqual('Google Issue Tracker issue 123456.',
+        federated.GoogleIssueTrackerIssue('b/123456').Summary())
diff --git a/features/test/filterrules_helpers_test.py b/features/test/filterrules_helpers_test.py
new file mode 100644
index 0000000..99d22b7
--- /dev/null
+++ b/features/test/filterrules_helpers_test.py
@@ -0,0 +1,927 @@
+# 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
+
+"""Unit tests for filterrules_helpers feature."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+import urllib
+import urlparse
+
+import settings
+from features import filterrules_helpers
+from framework import cloud_tasks_helpers
+from framework import framework_constants
+from framework import template_helpers
+from framework import urls
+from proto import ast_pb2
+from proto import tracker_pb2
+from search import query2ast
+from services import service_manager
+from testing import fake
+from tracker import tracker_bizobj
+
+
+ORIG_SUMMARY = 'this is the orginal summary'
+ORIG_LABELS = ['one', 'two']
+
+# Fake user id mapping
+TEST_ID_MAP = {
+    'mike.j.parent': 1,
+    'jrobbins': 2,
+    'ningerso': 3,
+    'ui@example.com': 4,
+    'db@example.com': 5,
+    'ui-db@example.com': 6,
+    }
+
+TEST_LABEL_IDS = {
+  'i18n': 1,
+  'l10n': 2,
+  'Priority-High': 3,
+  'Priority-Medium': 4,
+  }
+
+
+class RecomputeAllDerivedFieldsTest(unittest.TestCase):
+
+  BLOCK = filterrules_helpers.BLOCK
+
+  def setUp(self):
+    self.features = fake.FeaturesService()
+    self.user = fake.UserService()
+    self.services = service_manager.Services(
+        features=self.features,
+        user=self.user,
+        issue=fake.IssueService())
+    self.project = fake.Project(project_name='proj')
+    self.config = 'fake config'
+    self.cnxn = 'fake cnxn'
+
+
+  def testRecomputeDerivedFields_Disabled(self):
+    """Servlet should just call RecomputeAllDerivedFieldsNow with no bounds."""
+    saved_flag = settings.recompute_derived_fields_in_worker
+    settings.recompute_derived_fields_in_worker = False
+
+    filterrules_helpers.RecomputeAllDerivedFields(
+        self.cnxn, self.services, self.project, self.config)
+    self.assertTrue(self.services.issue.get_all_issues_in_project_called)
+    self.assertTrue(self.services.issue.update_issues_called)
+    self.assertTrue(self.services.issue.enqueue_issues_called)
+
+    settings.recompute_derived_fields_in_worker = saved_flag
+
+  def testRecomputeDerivedFields_DisabledNextIDSet(self):
+    """Servlet should just call RecomputeAllDerivedFields with no bounds."""
+    saved_flag = settings.recompute_derived_fields_in_worker
+    settings.recompute_derived_fields_in_worker = False
+    self.services.issue.next_id = 1234
+
+    filterrules_helpers.RecomputeAllDerivedFields(
+        self.cnxn, self.services, self.project, self.config)
+    self.assertTrue(self.services.issue.get_all_issues_in_project_called)
+    self.assertTrue(self.services.issue.enqueue_issues_called)
+
+    settings.recompute_derived_fields_in_worker = saved_flag
+
+  def testRecomputeDerivedFields_NoIssues(self):
+    """Servlet should not call because there is no work to do."""
+    saved_flag = settings.recompute_derived_fields_in_worker
+    settings.recompute_derived_fields_in_worker = True
+
+    filterrules_helpers.RecomputeAllDerivedFields(
+        self.cnxn, self.services, self.project, self.config)
+    self.assertFalse(self.services.issue.get_all_issues_in_project_called)
+    self.assertFalse(self.services.issue.update_issues_called)
+    self.assertFalse(self.services.issue.enqueue_issues_called)
+
+    settings.recompute_derived_fields_in_worker = saved_flag
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def testRecomputeDerivedFields_SomeIssues(self, get_client_mock):
+    """Servlet should enqueue one work item rather than call directly."""
+    saved_flag = settings.recompute_derived_fields_in_worker
+    settings.recompute_derived_fields_in_worker = True
+    self.services.issue.next_id = 1234
+    num_calls = (self.services.issue.next_id // self.BLOCK + 1)
+
+    filterrules_helpers.RecomputeAllDerivedFields(
+        self.cnxn, self.services, self.project, self.config)
+    self.assertFalse(self.services.issue.get_all_issues_in_project_called)
+    self.assertFalse(self.services.issue.update_issues_called)
+    self.assertFalse(self.services.issue.enqueue_issues_called)
+
+    get_client_mock().queue_path.assert_any_call(
+        settings.app_id, settings.CLOUD_TASKS_REGION, 'recomputederivedfields')
+    self.assertEqual(get_client_mock().queue_path.call_count, num_calls)
+    self.assertEqual(get_client_mock().create_task.call_count, num_calls)
+
+    parent = get_client_mock().queue_path()
+    highest_id = self.services.issue.GetHighestLocalID(
+        self.cnxn, self.project.project_id)
+    steps = list(range(1, highest_id + 1, self.BLOCK))
+    steps.reverse()
+    shard_id = 0
+    for step in steps:
+      params = {
+          'project_id': self.project.project_id,
+          'lower_bound': step,
+          'upper_bound': min(step + self.BLOCK, highest_id + 1),
+          'shard_id': shard_id,
+      }
+      task = {
+          'app_engine_http_request':
+              {
+                  'relative_uri': urls.RECOMPUTE_DERIVED_FIELDS_TASK + '.do',
+                  'body': urllib.urlencode(params),
+                  'headers':
+                      {
+                          'Content-type': 'application/x-www-form-urlencoded'
+                      }
+              }
+      }
+      get_client_mock().create_task.assert_any_call(
+          parent, task, retry=cloud_tasks_helpers._DEFAULT_RETRY)
+      shard_id = (shard_id + 1) % settings.num_logical_shards
+
+    settings.recompute_derived_fields_in_worker = saved_flag
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def testRecomputeDerivedFields_LotsOfIssues(self, get_client_mock):
+    """Servlet should enqueue multiple work items."""
+    saved_flag = settings.recompute_derived_fields_in_worker
+    settings.recompute_derived_fields_in_worker = True
+    self.services.issue.next_id = 12345
+
+    filterrules_helpers.RecomputeAllDerivedFields(
+        self.cnxn, self.services, self.project, self.config)
+
+    self.assertFalse(self.services.issue.get_all_issues_in_project_called)
+    self.assertFalse(self.services.issue.update_issues_called)
+    self.assertFalse(self.services.issue.enqueue_issues_called)
+    num_calls = (self.services.issue.next_id // self.BLOCK + 1)
+    get_client_mock().queue_path.assert_any_call(
+        settings.app_id, settings.CLOUD_TASKS_REGION, 'recomputederivedfields')
+    self.assertEqual(get_client_mock().queue_path.call_count, num_calls)
+    self.assertEqual(get_client_mock().create_task.call_count, num_calls)
+
+    ((_parent, called_task),
+     _kwargs) = get_client_mock().create_task.call_args_list[0]
+    relative_uri = called_task.get('app_engine_http_request').get(
+        'relative_uri')
+    self.assertEqual(relative_uri, urls.RECOMPUTE_DERIVED_FIELDS_TASK + '.do')
+    encoded_params = called_task.get('app_engine_http_request').get('body')
+    params = {k: v[0] for k, v in urlparse.parse_qs(encoded_params).items()}
+    self.assertEqual(params['project_id'], str(self.project.project_id))
+    self.assertEqual(
+        params['lower_bound'], str(12345 // self.BLOCK * self.BLOCK + 1))
+    self.assertEqual(params['upper_bound'], str(12345))
+
+    ((_parent, called_task), _kwargs) = get_client_mock().create_task.call_args
+    relative_uri = called_task.get('app_engine_http_request').get(
+        'relative_uri')
+    self.assertEqual(relative_uri, urls.RECOMPUTE_DERIVED_FIELDS_TASK + '.do')
+    encoded_params = called_task.get('app_engine_http_request').get('body')
+    params = {k: v[0] for k, v in urlparse.parse_qs(encoded_params).items()}
+    self.assertEqual(params['project_id'], str(self.project.project_id))
+    self.assertEqual(params['lower_bound'], str(1))
+    self.assertEqual(params['upper_bound'], str(self.BLOCK + 1))
+
+    settings.recompute_derived_fields_in_worker = saved_flag
+
+  @mock.patch(
+      'features.filterrules_helpers.ApplyGivenRules', return_value=(True, {}))
+  def testRecomputeAllDerivedFieldsNow(self, apply_mock):
+    """Servlet should reapply all filter rules to project's issues."""
+    self.services.issue.next_id = 12345
+    test_issue_1 = fake.MakeTestIssue(
+        project_id=self.project.project_id, local_id=1, issue_id=1001,
+        summary='sum1', owner_id=100, status='New')
+    test_issue_1.assume_stale = False  # We will store this issue.
+    test_issue_2 = fake.MakeTestIssue(
+        project_id=self.project.project_id, local_id=2, issue_id=1002,
+        summary='sum2', owner_id=100, status='New')
+    test_issue_2.assume_stale = False  # We will store this issue.
+    test_issues = [test_issue_1, test_issue_2]
+    self.services.issue.TestAddIssue(test_issue_1)
+    self.services.issue.TestAddIssue(test_issue_2)
+
+    filterrules_helpers.RecomputeAllDerivedFieldsNow(
+        self.cnxn, self.services, self.project, self.config)
+
+    self.assertTrue(self.services.issue.get_all_issues_in_project_called)
+    self.assertTrue(self.services.issue.update_issues_called)
+    self.assertTrue(self.services.issue.enqueue_issues_called)
+    self.assertEqual(test_issues, self.services.issue.updated_issues)
+    self.assertEqual([issue.issue_id for issue in test_issues],
+                     self.services.issue.enqueued_issues)
+    self.assertEqual(apply_mock.call_count, 2)
+    for test_issue in test_issues:
+      apply_mock.assert_any_call(
+          self.cnxn, self.services, test_issue, self.config, [], [])
+
+
+class FilterRulesHelpersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        project=fake.ProjectService(),
+        issue=fake.IssueService(),
+        config=fake.ConfigService())
+    self.project = self.services.project.TestAddProject('proj', project_id=789)
+    self.other_project = self.services.project.TestAddProject(
+        'otherproj', project_id=890)
+    for email, user_id in TEST_ID_MAP.items():
+      self.services.user.TestAddUser(email, user_id)
+    self.services.config.TestAddLabelsDict(TEST_LABEL_IDS)
+
+  def testApplyRule(self):
+    cnxn = 'fake sql connection'
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 111, labels=ORIG_LABELS)
+    config = tracker_pb2.ProjectIssueConfig(project_id=self.project.project_id)
+    # Empty label set cannot satisfy rule looking for labels.
+    pred = 'label:a label:b'
+    rule = filterrules_helpers.MakeRule(
+        pred, default_owner_id=1, default_status='S')
+    predicate_ast = query2ast.ParseUserQuery(
+        pred, '', query2ast.BUILTIN_ISSUE_FIELDS, config)
+    self.assertEqual(
+        (None, None, [], [], [], None, None),
+        filterrules_helpers._ApplyRule(
+            cnxn, self.services, rule, predicate_ast, issue, set(), config))
+
+    pred = 'label:a -label:b'
+    rule = filterrules_helpers.MakeRule(
+        pred, default_owner_id=1, default_status='S')
+    predicate_ast = query2ast.ParseUserQuery(
+        pred, '', query2ast.BUILTIN_ISSUE_FIELDS, config)
+    self.assertEqual(
+        (None, None, [], [], [], None, None),
+        filterrules_helpers._ApplyRule(
+            cnxn, self.services, rule, predicate_ast, issue, set(), config))
+
+    # Empty label set will satisfy rule looking for missing labels.
+    pred = '-label:a -label:b'
+    rule = filterrules_helpers.MakeRule(
+        pred, default_owner_id=1, default_status='S')
+    predicate_ast = query2ast.ParseUserQuery(
+        pred, '', query2ast.BUILTIN_ISSUE_FIELDS, config)
+    self.assertEqual(
+        (1, 'S', [], [], [], None, None),
+        filterrules_helpers._ApplyRule(
+            cnxn, self.services, rule, predicate_ast, issue, set(), config))
+
+    # Label set has the needed labels.
+    pred = 'label:a label:b'
+    rule = filterrules_helpers.MakeRule(
+        pred, default_owner_id=1, default_status='S')
+    predicate_ast = query2ast.ParseUserQuery(
+        pred, '', query2ast.BUILTIN_ISSUE_FIELDS, config)
+    self.assertEqual(
+        (1, 'S', [], [], [], None, None),
+        filterrules_helpers._ApplyRule(
+            cnxn, self.services, rule, predicate_ast, issue, {'a', 'b'},
+            config))
+
+    # Label set has the needed labels with test for unicode.
+    pred = 'label:a label:b'
+    rule = filterrules_helpers.MakeRule(
+        pred, default_owner_id=1, default_status='S')
+    predicate_ast = query2ast.ParseUserQuery(
+        pred, '', query2ast.BUILTIN_ISSUE_FIELDS, config)
+    self.assertEqual(
+        (1, 'S', [], [], [], None, None),
+        filterrules_helpers._ApplyRule(
+            cnxn, self.services, rule, predicate_ast, issue, {u'a', u'b'},
+            config))
+
+    # Label set has the needed labels, capitalization irrelevant.
+    pred = 'label:A label:B'
+    rule = filterrules_helpers.MakeRule(
+        pred, default_owner_id=1, default_status='S')
+    predicate_ast = query2ast.ParseUserQuery(
+        pred, '', query2ast.BUILTIN_ISSUE_FIELDS, config)
+    self.assertEqual(
+        (1, 'S', [], [], [], None, None),
+        filterrules_helpers._ApplyRule(
+            cnxn, self.services, rule, predicate_ast, issue, {'a', 'b'},
+            config))
+
+    # Label set has a label, the rule negates.
+    pred = 'label:a -label:b'
+    rule = filterrules_helpers.MakeRule(
+        pred, default_owner_id=1, default_status='S')
+    predicate_ast = query2ast.ParseUserQuery(
+        pred, '', query2ast.BUILTIN_ISSUE_FIELDS, config)
+    self.assertEqual(
+        (None, None, [], [], [], None, None),
+        filterrules_helpers._ApplyRule(
+            cnxn, self.services, rule, predicate_ast, issue, {'a', 'b'},
+            config))
+
+    # Consequence is to add a warning.
+    pred = 'label:a'
+    rule = filterrules_helpers.MakeRule(
+        pred, warning='Hey look out')
+    predicate_ast = query2ast.ParseUserQuery(
+        pred, '', query2ast.BUILTIN_ISSUE_FIELDS, config)
+    self.assertEqual(
+        (None, None, [], [], [], 'Hey look out', None),
+        filterrules_helpers._ApplyRule(
+            cnxn, self.services, rule, predicate_ast, issue, {'a', 'b'},
+            config))
+
+    # Consequence is to add an error.
+    pred = 'label:a'
+    rule = filterrules_helpers.MakeRule(
+        pred, error='We cannot allow that')
+    predicate_ast = query2ast.ParseUserQuery(
+        pred, '', query2ast.BUILTIN_ISSUE_FIELDS, config)
+    self.assertEqual(
+        (None, None, [], [], [], None, 'We cannot allow that'),
+        filterrules_helpers._ApplyRule(
+            cnxn, self.services, rule, predicate_ast, issue, {'a', 'b'},
+            config))
+
+  def testComputeDerivedFields_Components(self):
+    cnxn = 'fake sql connection'
+    rules = []
+    component_defs = [
+      tracker_bizobj.MakeComponentDef(
+        10, 789, 'DB', 'database', False, [],
+        [TEST_ID_MAP['db@example.com'],
+         TEST_ID_MAP['ui-db@example.com']],
+        0, 0,
+        label_ids=[TEST_LABEL_IDS['i18n'],
+                   TEST_LABEL_IDS['Priority-High']]),
+      tracker_bizobj.MakeComponentDef(
+        20, 789, 'Install', 'installer', False, [],
+        [], 0, 0),
+      tracker_bizobj.MakeComponentDef(
+        30, 789, 'UI', 'doc', False, [],
+        [TEST_ID_MAP['ui@example.com'],
+         TEST_ID_MAP['ui-db@example.com']],
+        0, 0,
+        label_ids=[TEST_LABEL_IDS['i18n'],
+                   TEST_LABEL_IDS['l10n'],
+                   TEST_LABEL_IDS['Priority-Medium']]),
+      ]
+    excl_prefixes = ['Priority', 'type', 'milestone']
+    config = tracker_pb2.ProjectIssueConfig(
+        exclusive_label_prefixes=excl_prefixes,
+        component_defs=component_defs)
+    predicate_asts = filterrules_helpers.ParsePredicateASTs(rules, config, [])
+
+    # No components.
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0, labels=ORIG_LABELS)
+    self.assertEqual(
+        (0, '', [], [], [], {}, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+    # One component, no CCs or labels added
+    issue.component_ids = [20]
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0, labels=ORIG_LABELS)
+    self.assertEqual(
+        (0, '', [], [], [], {}, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+    # One component, some CCs and labels added
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0, labels=ORIG_LABELS,
+        component_ids=[10])
+    traces = {
+      (tracker_pb2.FieldID.CC, TEST_ID_MAP['db@example.com']):
+          'Added by component DB',
+      (tracker_pb2.FieldID.CC, TEST_ID_MAP['ui-db@example.com']):
+          'Added by component DB',
+      (tracker_pb2.FieldID.LABELS, 'i18n'):
+          'Added by component DB',
+      (tracker_pb2.FieldID.LABELS, 'Priority-High'):
+          'Added by component DB',
+      }
+    self.assertEqual(
+        (
+            0, '', [
+                TEST_ID_MAP['db@example.com'], TEST_ID_MAP['ui-db@example.com']
+            ], ['i18n', 'Priority-High'], [], traces, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+    # One component, CCs and labels not added because of labels on the issue.
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0, labels=['Priority-Low', 'i18n'],
+        component_ids=[10])
+    issue.cc_ids = [TEST_ID_MAP['db@example.com']]
+    traces = {
+      (tracker_pb2.FieldID.CC, TEST_ID_MAP['ui-db@example.com']):
+          'Added by component DB',
+      }
+    self.assertEqual(
+        (0, '', [TEST_ID_MAP['ui-db@example.com']], [], [], traces, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+    # Multiple components, added CCs treated as a set, exclusive labels in later
+    # components take priority over earlier ones.
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0, labels=ORIG_LABELS,
+        component_ids=[10, 30])
+    traces = {
+      (tracker_pb2.FieldID.CC, TEST_ID_MAP['db@example.com']):
+          'Added by component DB',
+      (tracker_pb2.FieldID.CC, TEST_ID_MAP['ui-db@example.com']):
+          'Added by component DB',
+      (tracker_pb2.FieldID.LABELS, 'i18n'):
+          'Added by component DB',
+      (tracker_pb2.FieldID.LABELS, 'Priority-High'):
+          'Added by component DB',
+      (tracker_pb2.FieldID.CC, TEST_ID_MAP['ui@example.com']):
+          'Added by component UI',
+      (tracker_pb2.FieldID.LABELS, 'Priority-Medium'):
+          'Added by component UI',
+      (tracker_pb2.FieldID.LABELS, 'l10n'):
+          'Added by component UI',
+      }
+    self.assertEqual(
+        (
+            0, '', [
+                TEST_ID_MAP['db@example.com'], TEST_ID_MAP['ui-db@example.com'],
+                TEST_ID_MAP['ui@example.com']
+            ], ['i18n', 'l10n', 'Priority-Medium'], [], traces, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+  def testComputeDerivedFields_Rules(self):
+    cnxn = 'fake sql connection'
+    rules = [
+        filterrules_helpers.MakeRule(
+            'label:HasWorkaround', add_labels=['Priority-Low']),
+        filterrules_helpers.MakeRule(
+            'label:Security', add_labels=['Private']),
+        filterrules_helpers.MakeRule(
+            'label:Security', add_labels=['Priority-High'],
+            add_notify=['jrobbins@chromium.org']),
+        filterrules_helpers.MakeRule(
+            'Priority=High label:Regression', add_labels=['Urgent']),
+        filterrules_helpers.MakeRule(
+            'Size=L', default_owner_id=444),
+        filterrules_helpers.MakeRule(
+            'Size=XL', warning='It will take too long'),
+        filterrules_helpers.MakeRule(
+            'Size=XL', warning='It will cost too much'),
+        ]
+    excl_prefixes = ['Priority', 'type', 'milestone']
+    config = tracker_pb2.ProjectIssueConfig(
+        exclusive_label_prefixes=excl_prefixes,
+        project_id=self.project.project_id)
+    predicate_asts = filterrules_helpers.ParsePredicateASTs(rules, config, [])
+
+    # No rules fire.
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0, labels=ORIG_LABELS)
+    self.assertEqual(
+        (0, '', [], [], [], {}, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0, labels=['foo', 'bar'])
+    self.assertEqual(
+        (0, '', [], [], [], {}, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+    # One rule fires.
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0, labels=['Size-L'])
+    traces = {
+        (tracker_pb2.FieldID.OWNER, 444):
+            'Added by rule: IF Size=L THEN SET DEFAULT OWNER',
+        }
+    self.assertEqual(
+        (444, '', [], [], [], traces, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+    # One rule fires, but no effect because of explicit fields.
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0,
+        labels=['HasWorkaround', 'Priority-Critical'])
+    traces = {}
+    self.assertEqual(
+        (0, '', [], [], [], traces, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+    # One rule fires, another has no effect because of explicit exclusive label.
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0,
+        labels=['Security', 'Priority-Critical'])
+    traces = {
+        (tracker_pb2.FieldID.LABELS, 'Private'):
+            'Added by rule: IF label:Security THEN ADD LABEL',
+        }
+    self.assertEqual(
+        (0, '', [], ['Private'], ['jrobbins@chromium.org'], traces, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+    # Multiple rules have cumulative effect.
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0, labels=['HasWorkaround', 'Size-L'])
+    traces = {
+        (tracker_pb2.FieldID.LABELS, 'Priority-Low'):
+            'Added by rule: IF label:HasWorkaround THEN ADD LABEL',
+        (tracker_pb2.FieldID.OWNER, 444):
+            'Added by rule: IF Size=L THEN SET DEFAULT OWNER',
+        }
+    self.assertEqual(
+        (444, '', [], ['Priority-Low'], [], traces, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+    # Multiple rules have cumulative warnings.
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0, labels=['Size-XL'])
+    traces = {
+        (tracker_pb2.FieldID.WARNING, 'It will take too long'):
+            'Added by rule: IF Size=XL THEN ADD WARNING',
+        (tracker_pb2.FieldID.WARNING, 'It will cost too much'):
+            'Added by rule: IF Size=XL THEN ADD WARNING',
+        }
+    self.assertEqual(
+        (
+            0, '', [], [], [], traces,
+            ['It will take too long', 'It will cost too much'], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+    # Two rules fire, second overwrites the first.
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0, labels=['HasWorkaround', 'Security'])
+    traces = {
+        (tracker_pb2.FieldID.LABELS, 'Priority-Low'):
+            'Added by rule: IF label:HasWorkaround THEN ADD LABEL',
+        (tracker_pb2.FieldID.LABELS, 'Priority-High'):
+            'Added by rule: IF label:Security THEN ADD LABEL',
+        (tracker_pb2.FieldID.LABELS, 'Private'):
+            'Added by rule: IF label:Security THEN ADD LABEL',
+        }
+    self.assertEqual(
+        (
+            0, '', [], ['Private', 'Priority-High'], ['jrobbins@chromium.org'],
+            traces, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+    # Two rules fire, second triggered by the first.
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 0, labels=['Security', 'Regression'])
+    traces = {
+        (tracker_pb2.FieldID.LABELS, 'Priority-High'):
+            'Added by rule: IF label:Security THEN ADD LABEL',
+        (tracker_pb2.FieldID.LABELS, 'Urgent'):
+            'Added by rule: IF Priority=High label:Regression THEN ADD LABEL',
+        (tracker_pb2.FieldID.LABELS, 'Private'):
+            'Added by rule: IF label:Security THEN ADD LABEL',
+        }
+    self.assertEqual(
+        (
+            0, '', [], ['Private', 'Priority-High', 'Urgent'],
+            ['jrobbins@chromium.org'], traces, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+    # Two rules fire, each one wants to add the same CC: only add once.
+    rules.append(filterrules_helpers.MakeRule('Watch', add_cc_ids=[111]))
+    rules.append(filterrules_helpers.MakeRule('Monitor', add_cc_ids=[111]))
+    config = tracker_pb2.ProjectIssueConfig(
+        exclusive_label_prefixes=excl_prefixes,
+        project_id=self.project.project_id)
+    predicate_asts = filterrules_helpers.ParsePredicateASTs(rules, config, [])
+    traces = {
+        (tracker_pb2.FieldID.CC, 111):
+            'Added by rule: IF Watch THEN ADD CC',
+        }
+    issue = fake.MakeTestIssue(
+        789, 1, ORIG_SUMMARY, 'New', 111, labels=['Watch', 'Monitor'])
+    self.assertEqual(
+        (0, '', [111], [], [], traces, [], []),
+        filterrules_helpers._ComputeDerivedFields(
+            cnxn, self.services, issue, config, rules, predicate_asts))
+
+  def testCompareComponents_Trivial(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.IS_DEFINED, [], [123]))
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.IS_NOT_DEFINED, [], [123]))
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.IS_DEFINED, [], []))
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.IS_NOT_DEFINED, [], []))
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, [123], []))
+
+  def testCompareComponents_Normal(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    config.component_defs.append(tracker_bizobj.MakeComponentDef(
+        100, 789, 'UI', 'doc', False, [], [], 0, 0))
+    config.component_defs.append(tracker_bizobj.MakeComponentDef(
+        110, 789, 'UI>Help', 'doc', False, [], [], 0, 0))
+    config.component_defs.append(tracker_bizobj.MakeComponentDef(
+        200, 789, 'Networking', 'doc', False, [], [], 0, 0))
+
+    # Check if the issue is in a specified component or subcomponent.
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['UI'], [100]))
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['UI>Help'], [110]))
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['UI'], [100, 110]))
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['UI'], []))
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['UI'], [110]))
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['UI'], [200]))
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['UI>Help'], [100]))
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['Networking'], [100]))
+
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.NE, ['UI'], []))
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.NE, ['UI'], [100]))
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.NE, ['Networking'], [100]))
+
+    # Exact vs non-exact.
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['Help'], [110]))
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.TEXT_HAS, ['UI'], [110]))
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.TEXT_HAS, ['Help'], [110]))
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.NOT_TEXT_HAS, ['UI'], [110]))
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.NOT_TEXT_HAS, ['Help'], [110]))
+
+    # Multivalued issues and Quick-OR notation
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['Networking'], [200]))
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['Networking'], [100, 110]))
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['UI', 'Networking'], [100]))
+    self.assertFalse(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['UI', 'Networking'], [110]))
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['UI', 'Networking'], [200]))
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['UI', 'Networking'], [110, 200]))
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.TEXT_HAS, ['UI', 'Networking'], [110, 200]))
+    self.assertTrue(filterrules_helpers._CompareComponents(
+        config, ast_pb2.QueryOp.EQ, ['UI>Help', 'Networking'], [110, 200]))
+
+  def testCompareIssueRefs_Trivial(self):
+    self.assertTrue(filterrules_helpers._CompareIssueRefs(
+        self.cnxn, self.services, self.project,
+        ast_pb2.QueryOp.IS_DEFINED, [], [123]))
+    self.assertFalse(filterrules_helpers._CompareIssueRefs(
+        self.cnxn, self.services, self.project,
+        ast_pb2.QueryOp.IS_NOT_DEFINED, [], [123]))
+    self.assertFalse(filterrules_helpers._CompareIssueRefs(
+        self.cnxn, self.services, self.project,
+        ast_pb2.QueryOp.IS_DEFINED, [], []))
+    self.assertTrue(filterrules_helpers._CompareIssueRefs(
+        self.cnxn, self.services, self.project,
+        ast_pb2.QueryOp.IS_NOT_DEFINED, [], []))
+    self.assertFalse(filterrules_helpers._CompareIssueRefs(
+        self.cnxn, self.services, self.project,
+        ast_pb2.QueryOp.EQ, ['1'], []))
+
+  def testCompareIssueRefs_Normal(self):
+    self.services.issue.TestAddIssue(fake.MakeTestIssue(
+        789, 1, 'summary', 'New', 0, issue_id=123))
+    self.services.issue.TestAddIssue(fake.MakeTestIssue(
+        789, 2, 'summary', 'New', 0, issue_id=124))
+    self.services.issue.TestAddIssue(fake.MakeTestIssue(
+        890, 1, 'other summary', 'New', 0, issue_id=125))
+
+    # EQ and NE, implict references to the current project.
+    self.assertTrue(filterrules_helpers._CompareIssueRefs(
+        self.cnxn, self.services, self.project,
+        ast_pb2.QueryOp.EQ, ['1'], [123]))
+    self.assertFalse(filterrules_helpers._CompareIssueRefs(
+        self.cnxn, self.services, self.project,
+        ast_pb2.QueryOp.NE, ['1'], [123]))
+
+    # EQ and NE, explicit project references.
+    self.assertTrue(filterrules_helpers._CompareIssueRefs(
+        self.cnxn, self.services, self.project,
+        ast_pb2.QueryOp.EQ, ['proj:1'], [123]))
+    self.assertTrue(filterrules_helpers._CompareIssueRefs(
+        self.cnxn, self.services, self.project,
+        ast_pb2.QueryOp.EQ, ['otherproj:1'], [125]))
+
+    # Inequalities
+    self.assertTrue(filterrules_helpers._CompareIssueRefs(
+        self.cnxn, self.services, self.project,
+        ast_pb2.QueryOp.GE, ['1'], [123]))
+    self.assertTrue(filterrules_helpers._CompareIssueRefs(
+        self.cnxn, self.services, self.project,
+        ast_pb2.QueryOp.GE, ['1'], [124]))
+    self.assertTrue(filterrules_helpers._CompareIssueRefs(
+        self.cnxn, self.services, self.project,
+        ast_pb2.QueryOp.GE, ['2'], [124]))
+    self.assertFalse(filterrules_helpers._CompareIssueRefs(
+        self.cnxn, self.services, self.project,
+        ast_pb2.QueryOp.GT, ['2'], [124]))
+
+  def testCompareUsers(self):
+    pass  # TODO(jrobbins): Add this test.
+
+  def testCompareUserIDs(self):
+    pass  # TODO(jrobbins): Add this test.
+
+  def testCompareEmails(self):
+    pass  # TODO(jrobbins): Add this test.
+
+  def testCompare(self):
+    pass  # TODO(jrobbins): Add this test.
+
+  def testParseOneRuleAddLabels(self):
+    cnxn = 'fake SQL connection'
+    error_list = []
+    rule_pb = filterrules_helpers._ParseOneRule(
+        cnxn, 'label:lab1 label:lab2', 'add_labels', 'hot cOld, ', None, 1,
+        error_list)
+    self.assertEqual('label:lab1 label:lab2', rule_pb.predicate)
+    self.assertEqual(error_list, [])
+    self.assertEqual(len(rule_pb.add_labels), 2)
+    self.assertEqual(rule_pb.add_labels[0], 'hot')
+    self.assertEqual(rule_pb.add_labels[1], 'cOld')
+
+    rule_pb = filterrules_helpers._ParseOneRule(
+        cnxn, '', 'default_status', 'hot cold', None, 1, error_list)
+    self.assertEqual(len(rule_pb.predicate), 0)
+    self.assertEqual(error_list, [])
+
+  def testParseOneRuleDefaultOwner(self):
+    cnxn = 'fake SQL connection'
+    error_list = []
+    rule_pb = filterrules_helpers._ParseOneRule(
+        cnxn, 'label:lab1, label:lab2 ', 'default_owner', 'jrobbins',
+        self.services.user, 1, error_list)
+    self.assertEqual(error_list, [])
+    self.assertEqual(rule_pb.default_owner_id, TEST_ID_MAP['jrobbins'])
+
+  def testParseOneRuleDefaultStatus(self):
+    cnxn = 'fake SQL connection'
+    error_list = []
+    rule_pb = filterrules_helpers._ParseOneRule(
+        cnxn, 'label:lab1', 'default_status', 'InReview',
+        None, 1, error_list)
+    self.assertEqual(error_list, [])
+    self.assertEqual(rule_pb.default_status, 'InReview')
+
+  def testParseOneRuleAddCcs(self):
+    cnxn = 'fake SQL connection'
+    error_list = []
+    rule_pb = filterrules_helpers._ParseOneRule(
+        cnxn, 'label:lab1', 'add_ccs', 'jrobbins, mike.j.parent',
+        self.services.user, 1, error_list)
+    self.assertEqual(error_list, [])
+    self.assertEqual(rule_pb.add_cc_ids[0], TEST_ID_MAP['jrobbins'])
+    self.assertEqual(rule_pb.add_cc_ids[1], TEST_ID_MAP['mike.j.parent'])
+    self.assertEqual(len(rule_pb.add_cc_ids), 2)
+
+  def testParseRulesNone(self):
+    cnxn = 'fake SQL connection'
+    post_data = {}
+    rules = filterrules_helpers.ParseRules(
+        cnxn, post_data, None, template_helpers.EZTError())
+    self.assertEqual(rules, [])
+
+  def testParseRules(self):
+    cnxn = 'fake SQL connection'
+    post_data = {
+        'predicate1': 'a, b c',
+        'action_type1': 'default_status',
+        'action_value1': 'Reviewed',
+        'predicate2': 'a, b c',
+        'action_type2': 'default_owner',
+        'action_value2': 'jrobbins',
+        'predicate3': 'a, b c',
+        'action_type3': 'add_ccs',
+        'action_value3': 'jrobbins, mike.j.parent',
+        'predicate4': 'a, b c',
+        'action_type4': 'add_labels',
+        'action_value4': 'hot, cold',
+        }
+    errors = template_helpers.EZTError()
+    rules = filterrules_helpers.ParseRules(
+        cnxn, post_data, self.services.user, errors)
+    self.assertEqual(rules[0].predicate, 'a, b c')
+    self.assertEqual(rules[0].default_status, 'Reviewed')
+    self.assertEqual(rules[1].default_owner_id, TEST_ID_MAP['jrobbins'])
+    self.assertEqual(rules[2].add_cc_ids[0], TEST_ID_MAP['jrobbins'])
+    self.assertEqual(rules[2].add_cc_ids[1], TEST_ID_MAP['mike.j.parent'])
+    self.assertEqual(rules[3].add_labels[0], 'hot')
+    self.assertEqual(rules[3].add_labels[1], 'cold')
+    self.assertEqual(len(rules), 4)
+    self.assertFalse(errors.AnyErrors())
+
+  def testOwnerCcsInvolvedInFilterRules(self):
+    rules = [
+        tracker_pb2.FilterRule(add_cc_ids=[111, 333], default_owner_id=999),
+        tracker_pb2.FilterRule(default_owner_id=888),
+        tracker_pb2.FilterRule(add_cc_ids=[999, 777]),
+        tracker_pb2.FilterRule(),
+        ]
+    actual_user_ids = filterrules_helpers.OwnerCcsInvolvedInFilterRules(rules)
+    self.assertItemsEqual([111, 333, 777, 888, 999], actual_user_ids)
+
+  def testBuildFilterRuleStrings(self):
+    rules = [
+        tracker_pb2.FilterRule(
+            predicate='label:machu', add_cc_ids=[111, 333, 999]),
+        tracker_pb2.FilterRule(predicate='label:pichu', default_owner_id=222),
+        tracker_pb2.FilterRule(
+            predicate='owner:farmer@test.com',
+            add_labels=['cows-farting', 'chicken', 'machu-pichu']),
+        tracker_pb2.FilterRule(predicate='label:beach', default_status='New'),
+        tracker_pb2.FilterRule(
+            predicate='label:rainforest',
+            add_notify_addrs=['cake@test.com', 'pie@test.com']),
+    ]
+    emails_by_id = {
+        111: 'cow@test.com', 222: 'fox@test.com', 333: 'llama@test.com'}
+    rule_strs = filterrules_helpers.BuildFilterRuleStrings(rules, emails_by_id)
+
+    self.assertItemsEqual(
+        rule_strs, [
+            'if label:machu '
+            'then add cc(s): cow@test.com, llama@test.com, user not found',
+            'if label:pichu then set default owner: fox@test.com',
+            'if owner:farmer@test.com '
+            'then add label(s): cows-farting, chicken, machu-pichu',
+            'if label:beach then set default status: New',
+            'if label:rainforest then notify: cake@test.com, pie@test.com',
+        ])
+
+  def testBuildRedactedFilterRuleStrings(self):
+    rules_by_project = {
+        16: [
+            tracker_pb2.FilterRule(
+                predicate='label:machu', add_cc_ids=[111, 333, 999]),
+            tracker_pb2.FilterRule(
+                predicate='label:pichu', default_owner_id=222)],
+        19: [
+            tracker_pb2.FilterRule(
+                predicate='owner:farmer@test.com',
+                add_labels=['cows-farting', 'chicken', 'machu-pichu']),
+            tracker_pb2.FilterRule(
+                predicate='label:rainforest',
+                add_notify_addrs=['cake@test.com', 'pie@test.com'])],
+        }
+    deleted_emails = ['farmer@test.com', 'pie@test.com', 'fox@test.com']
+    self.services.user.TestAddUser('cow@test.com', 111)
+    self.services.user.TestAddUser('fox@test.com', 222)
+    self.services.user.TestAddUser('llama@test.com', 333)
+    actual = filterrules_helpers.BuildRedactedFilterRuleStrings(
+        self.cnxn, rules_by_project, self.services.user, deleted_emails)
+
+    self.assertItemsEqual(
+        actual,
+        {16: [
+            'if label:machu '
+            'then add cc(s): cow@test.com, llama@test.com, user not found',
+            'if label:pichu '
+            'then set default owner: %s' %
+            framework_constants.DELETED_USER_NAME],
+         19: [
+             'if owner:%s '
+             'then add label(s): cows-farting, chicken, machu-pichu' %
+             framework_constants.DELETED_USER_NAME,
+             'if label:rainforest '
+             'then notify: cake@test.com, %s' %
+             framework_constants.DELETED_USER_NAME],
+        })
diff --git a/features/test/filterrules_views_test.py b/features/test/filterrules_views_test.py
new file mode 100644
index 0000000..323b6c2
--- /dev/null
+++ b/features/test/filterrules_views_test.py
@@ -0,0 +1,75 @@
+# 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
+
+"""Unittest for issue tracker views."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from features import filterrules_views
+from proto import tracker_pb2
+from testing import testing_helpers
+
+
+class RuleViewTest(unittest.TestCase):
+
+  def setUp(self):
+    self.rule = tracker_pb2.FilterRule()
+    self.rule.predicate = 'label:a label:b'
+
+  def testNone(self):
+    view = filterrules_views.RuleView(None, {})
+    self.assertEqual('', view.action_type)
+    self.assertEqual('', view.action_value)
+
+  def testEmpty(self):
+    view = filterrules_views.RuleView(self.rule, {})
+    self.rule.predicate = ''
+    self.assertEqual('', view.predicate)
+    self.assertEqual('', view.action_type)
+    self.assertEqual('', view.action_value)
+
+  def testDefaultStatus(self):
+    self.rule.default_status = 'Unknown'
+    view = filterrules_views.RuleView(self.rule, {})
+    self.assertEqual('label:a label:b', view.predicate)
+    self.assertEqual('default_status', view.action_type)
+    self.assertEqual('Unknown', view.action_value)
+
+  def testDefaultOwner(self):
+    self.rule.default_owner_id = 111
+    view = filterrules_views.RuleView(
+        self.rule, {
+            111: testing_helpers.Blank(email='jrobbins@chromium.org')})
+    self.assertEqual('label:a label:b', view.predicate)
+    self.assertEqual('default_owner', view.action_type)
+    self.assertEqual('jrobbins@chromium.org', view.action_value)
+
+  def testAddCCs(self):
+    self.rule.add_cc_ids.extend([111, 222])
+    view = filterrules_views.RuleView(
+        self.rule, {
+            111: testing_helpers.Blank(email='jrobbins@chromium.org'),
+            222: testing_helpers.Blank(email='jrobbins@gmail.com')})
+    self.assertEqual('label:a label:b', view.predicate)
+    self.assertEqual('add_ccs', view.action_type)
+    self.assertEqual(
+        'jrobbins@chromium.org, jrobbins@gmail.com', view.action_value)
+
+  def testAddLabels(self):
+    self.rule.add_labels.extend(['Hot', 'Cool'])
+    view = filterrules_views.RuleView(self.rule, {})
+    self.assertEqual('label:a label:b', view.predicate)
+    self.assertEqual('add_labels', view.action_type)
+    self.assertEqual('Hot, Cool', view.action_value)
+
+  def testAlsoNotify(self):
+    self.rule.add_notify_addrs.extend(['a@dom.com', 'b@dom.com'])
+    view = filterrules_views.RuleView(self.rule, {})
+    self.assertEqual('label:a label:b', view.predicate)
+    self.assertEqual('also_notify', view.action_type)
+    self.assertEqual('a@dom.com, b@dom.com', view.action_value)
diff --git a/features/test/generate_features_test.py b/features/test/generate_features_test.py
new file mode 100644
index 0000000..8b1664e
--- /dev/null
+++ b/features/test/generate_features_test.py
@@ -0,0 +1,25 @@
+# Copyright 2018 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
+
+"""Unit test for generate_features."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from features import generate_dataset
+
+
+class GenerateFeaturesTest(unittest.TestCase):
+
+  def testCleanText(self):
+    sampleText = """Here's some sample text...$*IT should l00k much\n\n\t,
+                    _much_MUCH better \"cleaned\"!"""
+    self.assertEqual(generate_dataset.CleanText(sampleText),
+                     ("heres some sample text it should l00k much much much "
+                      "better cleaned"))
+    emptyText = ""
+    self.assertEqual(generate_dataset.CleanText(emptyText), "")
diff --git a/features/test/hotlist_helpers_test.py b/features/test/hotlist_helpers_test.py
new file mode 100644
index 0000000..800a913
--- /dev/null
+++ b/features/test/hotlist_helpers_test.py
@@ -0,0 +1,285 @@
+# 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
+
+"""Unit tests for helpers module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from features import hotlist_helpers
+from features import features_constants
+from framework import profiler
+from framework import table_view_helpers
+from framework import sorting
+from services import service_manager
+from testing import testing_helpers
+from testing import fake
+from tracker import tablecell
+from tracker import tracker_bizobj
+from proto import features_pb2
+from proto import tracker_pb2
+
+
+class HotlistTableDataTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        issue=fake.IssueService(),
+        features=fake.FeaturesService(),
+        issue_star=fake.AbstractStarService(),
+        config=fake.ConfigService(),
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        cache_manager=fake.CacheManager())
+    self.services.project.TestAddProject('ProjectName', project_id=1)
+
+    self.services.user.TestAddUser('annajowang@email.com', 111)
+    self.services.user.TestAddUser('claremont@email.com', 222)
+    issue1 = fake.MakeTestIssue(
+        1, 1, 'issue_summary', 'New', 111, project_name='ProjectName')
+    self.services.issue.TestAddIssue(issue1)
+    issue2 = fake.MakeTestIssue(
+        1, 2, 'issue_summary2', 'New', 111, project_name='ProjectName')
+    self.services.issue.TestAddIssue(issue2)
+    issue3 = fake.MakeTestIssue(
+        1, 3, 'issue_summary3', 'New', 222, project_name='ProjectName')
+    self.services.issue.TestAddIssue(issue3)
+    issues = [issue1, issue2, issue3]
+    hotlist_items = [
+        (issue.issue_id, rank, 222, None, '') for
+        rank, issue in enumerate(issues)]
+
+    self.hotlist_items_list = [
+        features_pb2.MakeHotlistItem(
+            issue_id, rank=rank, adder_id=adder_id,
+            date_added=date, note=note) for (
+                issue_id, rank, adder_id, date, note) in hotlist_items]
+    self.test_hotlist = self.services.features.TestAddHotlist(
+        'hotlist', hotlist_id=123, owner_ids=[111],
+        hotlist_item_fields=hotlist_items)
+    sorting.InitializeArtValues(self.services)
+    self.mr = None
+
+  def setUpCreateHotlistTableDataTestMR(self, **kwargs):
+    self.mr = testing_helpers.MakeMonorailRequest(**kwargs)
+    self.services.user.TestAddUser('annajo@email.com', 148)
+    self.mr.auth.effective_ids = {148}
+    self.mr.col_spec = 'ID Summary Modified'
+
+  def testCreateHotlistTableData(self):
+    self.setUpCreateHotlistTableDataTestMR(hotlist=self.test_hotlist)
+    table_data, table_related_dict = hotlist_helpers.CreateHotlistTableData(
+        self.mr, self.hotlist_items_list, self.services)
+    self.assertEqual(len(table_data), 3)
+    start_index = 100001
+    for row in table_data:
+      self.assertEqual(row.project_name, 'ProjectName')
+      self.assertEqual(row.issue_id, start_index)
+      start_index += 1
+    self.assertEqual(len(table_related_dict['column_values']), 3)
+
+    # test none of the shown columns show up in unshown_columns
+    self.assertTrue(
+        set(self.mr.col_spec.split()).isdisjoint(
+            table_related_dict['unshown_columns']))
+    self.assertEqual(table_related_dict['is_cross_project'], False)
+    self.assertEqual(len(table_related_dict['pagination'].visible_results), 3)
+
+  def testCreateHotlistTableData_Pagination(self):
+    self.setUpCreateHotlistTableDataTestMR(
+        hotlist=self.test_hotlist, path='/123?num=2')
+    table_data, _ = hotlist_helpers.CreateHotlistTableData(
+        self.mr, self.hotlist_items_list, self.services)
+    self.assertEqual(len(table_data), 2)
+
+  def testCreateHotlistTableData_EndPagination(self):
+    self.setUpCreateHotlistTableDataTestMR(
+        hotlist=self.test_hotlist, path='/123?num=2&start=2')
+    table_data, _ = hotlist_helpers.CreateHotlistTableData(
+        self.mr, self.hotlist_items_list, self.services)
+    self.assertEqual(len(table_data), 1)
+
+
+class MakeTableDataTest(unittest.TestCase):
+
+  def test_MakeTableData(self):
+    issues = [fake.MakeTestIssue(
+        789, 1, 'issue_summary', 'New', 111, project_name='ProjectName',
+        issue_id=1001)]
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cell_factories = {
+        'summary': table_view_helpers.TableCellSummary}
+    table_data = hotlist_helpers._MakeTableData(
+        issues, [], ['summary'], [], {} , cell_factories,
+        {}, set(), config, None, 29, 'stars')
+    self.assertEqual(len(table_data), 1)
+    row = table_data[0]
+    self.assertEqual(row.issue_id, 1001)
+    self.assertEqual(row.local_id, 1)
+    self.assertEqual(row.project_name, 'ProjectName')
+    self.assertEqual(row.issue_ref, 'ProjectName:1')
+    self.assertTrue('hotlist_id=29' in row.issue_ctx_url)
+    self.assertTrue('sort=stars' in row.issue_ctx_url)
+
+
+class GetAllProjectsOfIssuesTest(unittest.TestCase):
+
+  issue_x_1 = tracker_pb2.Issue()
+  issue_x_1.project_id = 789
+
+  issue_x_2 = tracker_pb2.Issue()
+  issue_x_2.project_id = 789
+
+  issue_y_1 = tracker_pb2.Issue()
+  issue_y_1.project_id = 678
+
+  def testGetAllProjectsOfIssues_Normal(self):
+    issues = [self.issue_x_1, self.issue_x_2]
+    self.assertEqual(
+        hotlist_helpers.GetAllProjectsOfIssues(issues),
+        set([789]))
+    issues = [self.issue_x_1, self.issue_x_2, self.issue_y_1]
+    self.assertEqual(
+        hotlist_helpers.GetAllProjectsOfIssues(issues),
+        set([678, 789]))
+
+  def testGetAllProjectsOfIssues_Empty(self):
+    self.assertEqual(
+        hotlist_helpers.GetAllProjectsOfIssues([]),
+        set())
+
+
+class HelpersUnitTest(unittest.TestCase):
+
+  # TODO(jojwang): Write Tests for GetAllConfigsOfProjects
+  def setUp(self):
+    self.services = service_manager.Services(issue=fake.IssueService(),
+                                        config=fake.ConfigService(),
+                                        project=fake.ProjectService(),
+                                        features=fake.FeaturesService(),
+                                        user=fake.UserService())
+    self.project = self.services.project.TestAddProject(
+        'ProjectName', project_id=1, owner_ids=[111])
+
+    self.services.user.TestAddUser('annajowang@email.com', 111)
+    self.services.user.TestAddUser('claremont@email.com', 222)
+    self.issue1 = fake.MakeTestIssue(
+        1, 1, 'issue_summary', 'New', 111,
+        project_name='ProjectName', labels='restrict-view-Googler')
+    self.services.issue.TestAddIssue(self.issue1)
+    self.issue3 = fake.MakeTestIssue(
+        1, 3, 'issue_summary3', 'New', 222, project_name='ProjectName')
+    self.services.issue.TestAddIssue(self.issue3)
+    self.issue4 = fake.MakeTestIssue(
+        1, 4, 'issue_summary4', 'Fixed', 222, closed_timestamp=232423,
+        project_name='ProjectName')
+    self.services.issue.TestAddIssue(self.issue4)
+    self.issues = [self.issue1, self.issue3, self.issue4]
+    self.mr = testing_helpers.MakeMonorailRequest()
+
+  def testFilterIssues(self):
+    test_allowed_issues = hotlist_helpers.FilterIssues(
+        self.mr.cnxn, self.mr.auth, 2, self.issues, self.services)
+    self.assertEqual(len(test_allowed_issues), 1)
+    self.assertEqual(test_allowed_issues[0].local_id, 3)
+
+  def testFilterIssues_ShowClosed(self):
+    test_allowed_issues = hotlist_helpers.FilterIssues(
+        self.mr.cnxn, self.mr.auth, 1, self.issues, self.services)
+    self.assertEqual(len(test_allowed_issues), 2)
+    self.assertEqual(test_allowed_issues[0].local_id, 3)
+    self.assertEqual(test_allowed_issues[1].local_id, 4)
+
+  def testMembersWithoutGivenIDs(self):
+    h = features_pb2.Hotlist()
+    owners, editors, followers = hotlist_helpers.MembersWithoutGivenIDs(
+        h, set())
+    # Check lists are empty
+    self.assertFalse(owners)
+    self.assertFalse(editors)
+    self.assertFalse(followers)
+
+    h.owner_ids.extend([1, 2, 3])
+    h.editor_ids.extend([4, 5, 6])
+    h.follower_ids.extend([7, 8, 9])
+    owners, editors, followers = hotlist_helpers.MembersWithoutGivenIDs(
+        h, {10, 11, 12})
+    self.assertEqual(h.owner_ids, owners)
+    self.assertEqual(h.editor_ids, editors)
+    self.assertEqual(h.follower_ids, followers)
+
+    owners, editors, followers = hotlist_helpers.MembersWithoutGivenIDs(
+        h, set())
+    self.assertEqual(h.owner_ids, owners)
+    self.assertEqual(h.editor_ids, editors)
+    self.assertEqual(h.follower_ids, followers)
+
+    owners, editors, followers = hotlist_helpers.MembersWithoutGivenIDs(
+        h, {1, 4, 7})
+    self.assertEqual([2, 3], owners)
+    self.assertEqual([5, 6], editors)
+    self.assertEqual([8, 9], followers)
+
+  def testMembersWithGivenIDs(self):
+    h = features_pb2.Hotlist()
+
+    # empty GivenIDs give empty member lists from originally empty member lists
+    owners, editors, followers = hotlist_helpers.MembersWithGivenIDs(
+        h, set(), 'follower')
+    self.assertFalse(owners)
+    self.assertFalse(editors)
+    self.assertFalse(followers)
+
+    # empty GivenIDs return original non-empty member lists
+    h.owner_ids.extend([1, 2, 3])
+    h.editor_ids.extend([4, 5, 6])
+    h.follower_ids.extend([7, 8, 9])
+    owners, editors, followers = hotlist_helpers.MembersWithGivenIDs(
+        h, set(), 'editor')
+    self.assertEqual(owners, h.owner_ids)
+    self.assertEqual(editors, h.editor_ids)
+    self.assertEqual(followers, h.follower_ids)
+
+    # non-member GivenIDs return updated member lists
+    owners, editors, followers = hotlist_helpers.MembersWithGivenIDs(
+        h, {10, 11, 12}, 'owner')
+    self.assertEqual(owners, [1, 2, 3, 10, 11, 12])
+    self.assertEqual(editors, [4, 5, 6])
+    self.assertEqual(followers, [7, 8, 9])
+
+    # member GivenIDs return updated member lists
+    owners, editors, followers = hotlist_helpers.MembersWithGivenIDs(
+        h, {1, 4, 7}, 'editor')
+    self.assertEqual(owners, [2, 3])
+    self.assertEqual(editors, [5, 6, 1, 4, 7])
+    self.assertEqual(followers, [8, 9])
+
+  def testGetURLOfHotlist(self):
+    cnxn = 'fake cnxn'
+    user = self.services.user.TestAddUser('claremont@email.com', 432)
+    user.obscure_email = False
+    hotlist1 = self.services.features.TestAddHotlist(
+        'hotlist1', hotlist_id=123, owner_ids=[432])
+    url = hotlist_helpers.GetURLOfHotlist(
+        cnxn, hotlist1, self.services.user)
+    self.assertEqual('/u/claremont@email.com/hotlists/hotlist1', url)
+
+    url = hotlist_helpers.GetURLOfHotlist(
+        cnxn, hotlist1, self.services.user, url_for_token=True)
+    self.assertEqual('/u/432/hotlists/hotlist1', url)
+
+    user.obscure_email = True
+    url = hotlist_helpers.GetURLOfHotlist(
+        cnxn, hotlist1, self.services.user)
+    self.assertEqual('/u/432/hotlists/hotlist1', url)
+
+    # Test that a Hotlist without an owner has an empty URL.
+    hotlist_unowned = self.services.features.TestAddHotlist('hotlist2',
+        hotlist_id=234, owner_ids=[])
+    url = hotlist_helpers.GetURLOfHotlist(cnxn, hotlist_unowned,
+        self.services.user)
+    self.assertFalse(url)
diff --git a/features/test/hotlist_views_test.py b/features/test/hotlist_views_test.py
new file mode 100644
index 0000000..92369ba
--- /dev/null
+++ b/features/test/hotlist_views_test.py
@@ -0,0 +1,125 @@
+# 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
+
+"""Unit tests for hotlist_views classes."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from features import hotlist_views
+from framework import authdata
+from framework import framework_views
+from framework import permissions
+from services import service_manager
+from testing import fake
+from proto import user_pb2
+
+
+class MemberViewTest(unittest.TestCase):
+
+  def setUp(self):
+    self.hotlist = fake.Hotlist('hotlistName', 123,
+                                hotlist_item_fields=[
+                                    (2, 0, None, None, ''),
+                                    (1, 0, None, None, ''),
+                                    (5, 0, None, None, '')],
+                                is_private=False, owner_ids=[111])
+    self.user1 = user_pb2.User(user_id=111)
+    self.user1_view = framework_views.UserView(self.user1)
+
+  def testMemberViewCorrect(self):
+    member_view = hotlist_views.MemberView(111, 111, self.user1_view,
+                                           self.hotlist)
+    self.assertEqual(member_view.user, self.user1_view)
+    self.assertEqual(member_view.detail_url, '/u/111/')
+    self.assertEqual(member_view.role, 'Owner')
+    self.assertTrue(member_view.viewing_self)
+
+
+class HotlistViewTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(user=fake.UserService(),
+    usergroup=fake.UserGroupService())
+    self.user1 = self.services.user.TestAddUser('user1', 111)
+    self.user1.obscure_email = True
+    self.user1_view = framework_views.UserView(self.user1)
+    self.user2 = self.services.user.TestAddUser('user2', 222)
+    self.user2.obscure_email = False
+    self.user2_view = framework_views.UserView(self.user2)
+    self.user3 = self.services.user.TestAddUser('user3', 333)
+    self.user3_view = framework_views.UserView(self.user3)
+    self.user4 = self.services.user.TestAddUser('user4', 444, banned=True)
+    self.user4_view = framework_views.UserView(self.user4)
+
+    self.user_auth = authdata.AuthData.FromEmail(
+        None, 'user3', self.services)
+    self.user_auth.effective_ids = {3}
+    self.user_auth.user_id = 3
+    self.users_by_id = {1: self.user1_view, 2: self.user2_view,
+        3: self.user3_view, 4: self.user4_view}
+    self.perms = permissions.EMPTY_PERMISSIONSET
+
+  def testNoOwner(self):
+    hotlist = fake.Hotlist('unowned', 500, owner_ids=[])
+    view = hotlist_views.HotlistView(hotlist, self.perms,
+                                     self.user_auth, 1, self.users_by_id)
+    self.assertFalse(view.url)
+
+  def testBanned(self):
+    # With a banned user
+    hotlist = fake.Hotlist('userBanned', 423, owner_ids=[4])
+    hotlist_view = hotlist_views.HotlistView(
+        hotlist, self.perms, self.user_auth, 1, self.users_by_id)
+    self.assertFalse(hotlist_view.visible)
+
+    # With a user not banned
+    hotlist = fake.Hotlist('userNotBanned', 453, owner_ids=[1])
+    hotlist_view = hotlist_views.HotlistView(
+        hotlist, self.perms, self.user_auth, 1, self.users_by_id)
+    self.assertTrue(hotlist_view.visible)
+
+  def testNoPermissions(self):
+    hotlist = fake.Hotlist(
+        'private', 333, is_private=True, owner_ids=[1], editor_ids=[2])
+    hotlist_view = hotlist_views.HotlistView(
+        hotlist, self.perms, self.user_auth, 1, self.users_by_id)
+    self.assertFalse(hotlist_view.visible)
+    self.assertEqual(hotlist_view.url, '/u/1/hotlists/private')
+
+  def testFriendlyURL(self):
+    # owner with obscure_email:false
+    hotlist = fake.Hotlist(
+        'noObscureHotlist', 133, owner_ids=[2], editor_ids=[3])
+    hotlist_view = hotlist_views.HotlistView(
+        hotlist, self.perms, self.user_auth,
+        viewed_user_id=3, users_by_id=self.users_by_id)
+    self.assertEqual(hotlist_view.url, '/u/user2/hotlists/noObscureHotlist')
+
+    #owner with obscure_email:true
+    hotlist = fake.Hotlist('ObscureHotlist', 133, owner_ids=[1], editor_ids=[3])
+    hotlist_view = hotlist_views.HotlistView(
+        hotlist, self.perms, self.user_auth, viewed_user_id=1,
+        users_by_id=self.users_by_id)
+    self.assertEqual(hotlist_view.url, '/u/1/hotlists/ObscureHotlist')
+
+  def testOtherAttributes(self):
+    hotlist = fake.Hotlist(
+        'hotlistName', 123, hotlist_item_fields=[(2, 0, None, None, ''),
+                                                (1, 0, None, None, ''),
+                                                 (5, 0, None, None, '')],
+                                is_private=False, owner_ids=[1],
+                                editor_ids=[2, 3])
+    hotlist_view = hotlist_views.HotlistView(
+        hotlist, self.perms, self.user_auth, viewed_user_id=2,
+        users_by_id=self.users_by_id, is_starred=True)
+    self.assertTrue(hotlist_view.visible, True)
+    self.assertEqual(hotlist_view.role_name, 'editor')
+    self.assertEqual(hotlist_view.owners, [self.user1_view])
+    self.assertEqual(hotlist_view.editors, [self.user2_view, self.user3_view])
+    self.assertEqual(hotlist_view.num_issues, 3)
+    self.assertTrue(hotlist_view.is_starred)
diff --git a/features/test/hotlistcreate_test.py b/features/test/hotlistcreate_test.py
new file mode 100644
index 0000000..8cf0012
--- /dev/null
+++ b/features/test/hotlistcreate_test.py
@@ -0,0 +1,148 @@
+# 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
+
+"""Unit test for Hotlist creation servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mox
+import unittest
+
+import settings
+from framework import permissions
+from features import hotlistcreate
+from proto import site_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class HotlistCreateTest(unittest.TestCase):
+  """Tests for the HotlistCreate servlet."""
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.mr = testing_helpers.MakeMonorailRequest()
+    self.services = service_manager.Services(project=fake.ProjectService(),
+                                        user=fake.UserService(),
+                                             issue=fake.IssueService(),
+                                             features=fake.FeaturesService())
+    self.servlet = hotlistcreate.HotlistCreate('req', 'res',
+                                               services=self.services)
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def CheckAssertBasePermissions(
+      self, restriction, expect_admin_ok, expect_nonadmin_ok):
+    old_hotlist_creation_restriction = settings.hotlist_creation_restriction
+    settings.hotlist_creation_restriction = restriction
+
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.GetPermissions(None, {}, None))
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, mr)
+
+    mr = testing_helpers.MakeMonorailRequest()
+    if expect_admin_ok:
+      self.servlet.AssertBasePermission(mr)
+    else:
+      self.assertRaises(
+          permissions.PermissionException,
+          self.servlet.AssertBasePermission, mr)
+
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.GetPermissions(mr.auth.user_pb, {111}, None))
+    if expect_nonadmin_ok:
+      self.servlet.AssertBasePermission(mr)
+    else:
+      self.assertRaises(
+          permissions.PermissionException,
+          self.servlet.AssertBasePermission, mr)
+
+    settings.hotlist_creation_restriction = old_hotlist_creation_restriction
+
+  def testAssertBasePermission(self):
+    self.CheckAssertBasePermissions(
+        site_pb2.UserTypeRestriction.ANYONE, True, True)
+    self.CheckAssertBasePermissions(
+        site_pb2.UserTypeRestriction.ADMIN_ONLY, True, False)
+    self.CheckAssertBasePermissions(
+        site_pb2.UserTypeRestriction.NO_ONE, False, False)
+
+  def testGatherPageData(self):
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual('st6', page_data['user_tab_mode'])
+    self.assertEqual('', page_data['initial_name'])
+    self.assertEqual('', page_data['initial_summary'])
+    self.assertEqual('', page_data['initial_description'])
+    self.assertEqual('', page_data['initial_editors'])
+    self.assertEqual('no', page_data['initial_privacy'])
+
+  def testProcessFormData(self):
+    self.servlet.services.user.TestAddUser('owner', 111)
+    self.mr.auth.user_id = 111
+    post_data = fake.PostData(hotlistname=['Hotlist'], summary=['summ'],
+                              description=['hey'],
+                              editors=[''], is_private=['yes'])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue('/u/111/hotlists/Hotlist' in url)
+
+  def testProcessFormData_OwnerInEditors(self):
+    self.servlet.services.user.TestAddUser('owner_editor', 222)
+    self.mr.auth.user_id = 222
+    self.mr.cnxn = 'fake cnxn'
+    post_data = fake.PostData(hotlistname=['Hotlist-owner-editor'],
+                              summary=['summ'],
+                              description=['hi'],
+                              editors=['owner_editor'], is_private=['yes'])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue('/u/222/hotlists/Hotlist-owner-editor' in url)
+    hotlists_by_id = self.servlet.services.features.LookupHotlistIDs(
+        self.mr.cnxn, ['Hotlist-owner-editor'], [222])
+    self.assertTrue(('hotlist-owner-editor', 222) in hotlists_by_id)
+    hotlist_id = hotlists_by_id[('hotlist-owner-editor', 222)]
+    hotlist = self.servlet.services.features.GetHotlist(
+        self.mr.cnxn, hotlist_id, use_cache=False)
+    self.assertEqual(hotlist.owner_ids, [222])
+    self.assertEqual(hotlist.editor_ids, [])
+
+  def testProcessFormData_RejectTemplateInvalid(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    # invalid hotlist name and nonexistent editor
+    post_data = fake.PostData(hotlistname=['123BadName'], summary=['summ'],
+                              description=['hey'],
+                              editors=['test@email.com'], is_private=['yes'])
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        mr, initial_name = '123BadName', initial_summary='summ',
+        initial_description='hey',
+        initial_editors='test@email.com', initial_privacy='yes')
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual(mr.errors.hotlistname, 'Invalid hotlist name')
+    self.assertEqual(mr.errors.editors,
+                     'One or more editor emails is not valid.')
+    self.assertIsNone(url)
+
+  def testProcessFormData_RejectTemplateMissing(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    # missing name and summary
+    post_data = fake.PostData()
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(mr, initial_name = None, initial_summary=None,
+                               initial_description='',
+                               initial_editors='', initial_privacy=None)
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual(mr.errors.hotlistname, 'Missing hotlist name')
+    self.assertEqual(mr.errors.summary,'Missing hotlist summary')
+    self.assertIsNone(url)
diff --git a/features/test/hotlistdetails_test.py b/features/test/hotlistdetails_test.py
new file mode 100644
index 0000000..9a9e53f
--- /dev/null
+++ b/features/test/hotlistdetails_test.py
@@ -0,0 +1,226 @@
+# 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
+
+"""Unit tests for hotlistdetails page."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import mox
+import unittest
+import mock
+
+import ezt
+
+from framework import permissions
+from features import features_constants
+from services import service_manager
+from features import hotlistdetails
+from proto import features_pb2
+from testing import fake
+from testing import testing_helpers
+
+class HotlistDetailsTest(unittest.TestCase):
+  """Unit tests for the HotlistDetails servlet class."""
+
+  def setUp(self):
+    self.user_service = fake.UserService()
+    self.user_1 = self.user_service.TestAddUser('111@test.com', 111)
+    self.user_2 = self.user_service.TestAddUser('user2@test.com', 222)
+    services = service_manager.Services(
+        features=fake.FeaturesService(), user=self.user_service)
+    self.servlet = hotlistdetails.HotlistDetails(
+        'req', 'res', services=services)
+    self.hotlist = self.servlet.services.features.TestAddHotlist(
+        'hotlist', summary='hotlist summary', description='hotlist description',
+        owner_ids=[111], editor_ids=[222])
+    self.request, self.mr = testing_helpers.GetRequestObjects(
+        hotlist=self.hotlist)
+    self.mr.auth.user_id = 111
+    self.private_hotlist = services.features.TestAddHotlist(
+        'private_hotlist', owner_ids=[111], editor_ids=[222], is_private=True)
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testAssertBasePermission(self):
+    # non-members cannot view private hotlists
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.private_hotlist, perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.effective_ids = {333}
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+
+    # members can view private hotlists
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.private_hotlist)
+    mr.auth.effective_ids = {222, 444}
+    self.servlet.AssertBasePermission(mr)
+
+    # non-members can view public hotlists
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.hotlist)
+    mr.auth.effective_ids = {333, 444}
+    self.servlet.AssertBasePermission(mr)
+
+    # members can view public hotlists
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.hotlist)
+    mr.auth.effective_ids = {111, 333}
+    self.servlet.AssertBasePermission(mr)
+
+  def testGatherPageData(self):
+    self.mr.auth.effective_ids = [222]
+    self.mr.perms = permissions.EMPTY_PERMISSIONSET
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual('hotlist summary', page_data['initial_summary'])
+    self.assertEqual('hotlist description', page_data['initial_description'])
+    self.assertEqual('hotlist', page_data['initial_name'])
+    self.assertEqual(features_constants.DEFAULT_COL_SPEC,
+                     page_data['initial_default_col_spec'])
+    self.assertEqual(ezt.boolean(False), page_data['initial_is_private'])
+
+    # editor is viewing, so cant_administer_hotlist is True
+    self.assertEqual(ezt.boolean(True), page_data['cant_administer_hotlist'])
+
+    # owner is veiwing, so cant_administer_hotlist is False
+    self.mr.auth.effective_ids = [111]
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(ezt.boolean(False), page_data['cant_administer_hotlist'])
+
+  def testProcessFormData(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.hotlist,
+        path='/u/111/hotlists/%s/details' % self.hotlist.hotlist_id,
+        services=service_manager.Services(user=self.user_service),
+        perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.effective_ids = {111}
+    mr.auth.user_id = 111
+    post_data = fake.PostData(
+        name=['hotlist'],
+        summary = ['hotlist summary'],
+        description = ['hotlist description'],
+        default_col_spec = ['test default col spec'])
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.assertTrue((
+        '/u/111/hotlists/%d/details?saved=' % self.hotlist.hotlist_id) in url)
+
+  @mock.patch('features.hotlist_helpers.RemoveHotlist')
+  def testProcessFormData_DeleteHotlist(self, fake_rh):
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.hotlist,
+        path='/u/111/hotlists/%s/details' % self.hotlist.hotlist_id,
+        services=service_manager.Services(user=self.user_service),
+        perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.effective_ids = {self.user_1.user_id}
+    mr.auth.user_id = self.user_1.user_id
+    mr.auth.email = self.user_1.email
+
+    post_data = fake.PostData(deletestate=['true'])
+    url = self.servlet.ProcessFormData(mr, post_data)
+    fake_rh.assert_called_once_with(
+        mr.cnxn, mr.hotlist_id, self.servlet.services)
+    self.assertTrue(('/u/%s/hotlists?saved=' % self.user_1.email) in url)
+
+  def testProcessFormData_RejectTemplate(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.hotlist,
+        path='/u/111/hotlists/%s/details' % self.hotlist.hotlist_id,
+        services=service_manager.Services(user=self.user_service),
+        perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.user_id = 111
+    mr.auth.effective_ids = {111}
+    post_data = fake.PostData(
+        summary = [''],
+        name = [''],
+        description = ['fake description'],
+        default_col_spec = ['test default col spec'])
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        mr, initial_summary='',
+        initial_description='fake description', initial_name = '',
+        initial_default_col_spec = 'test default col spec')
+    self.mox.ReplayAll()
+
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual(hotlistdetails._MSG_NAME_MISSING, mr.errors.name)
+    self.assertEqual(hotlistdetails._MSG_SUMMARY_MISSING,
+                     mr.errors.summary)
+    self.assertIsNone(url)
+
+  def testProcessFormData_DuplicateName(self):
+    self.servlet.services.features.TestAddHotlist(
+        'FirstHotlist', summary='hotlist summary', description='description',
+        owner_ids=[111], editor_ids=[])
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.hotlist,
+        path='/u/111/hotlists/%s/details' % (self.hotlist.hotlist_id),
+        services=service_manager.Services(user=self.user_service),
+        perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.user_id = 111
+    mr.auth.effective_ids = {111}
+    post_data = fake.PostData(
+        summary = ['hotlist summary'],
+        name = ['FirstHotlist'],
+        description = ['description'],
+        default_col_spec = ['test default col spec'])
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        mr, initial_summary='hotlist summary',
+        initial_description='description', initial_name = 'FirstHotlist',
+        initial_default_col_spec = 'test default col spec')
+    self.mox.ReplayAll()
+
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual(hotlistdetails._MSG_HOTLIST_NAME_NOT_AVAIL,
+                     mr.errors.name)
+    self.assertIsNone(url)
+
+  def testProcessFormData_Bad(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.hotlist,
+        path='/u/111/hotlists/%s/details' % (self.hotlist.hotlist_id),
+        services=service_manager.Services(user=self.user_service),
+         perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.user_id = 111
+    mr.auth.effective_ids = {111}
+    post_data = fake.PostData(
+        summary = ['hotlist summary'],
+        name = ['2badName'],
+        description = ['fake description'],
+        default_col_spec = ['test default col spec'])
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        mr, initial_summary='hotlist summary',
+        initial_description='fake description', initial_name = '2badName',
+        initial_default_col_spec = 'test default col spec')
+    self.mox.ReplayAll()
+
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual(hotlistdetails._MSG_INVALID_HOTLIST_NAME,
+                     mr.errors.name)
+    self.assertIsNone(url)
+
+  def testProcessFormData_NoPermissions(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.hotlist,
+        path='/u/111/hotlists/%s/details' % (self.hotlist.hotlist_id),
+        services=service_manager.Services(user=self.user_service),
+        perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.user_id = self.user_2.user_id
+    mr.auth.effective_ids = {self.user_2.user_id}
+    post_data = fake.PostData(
+        summary = ['hotlist summary'],
+        name = ['hotlist'],
+        description = ['fake description'],
+        default_col_spec = ['test default col spec'])
+    with self.assertRaises(permissions.PermissionException):
+      self.servlet.ProcessFormData(mr, post_data)
diff --git a/features/test/hotlistissues_test.py b/features/test/hotlistissues_test.py
new file mode 100644
index 0000000..49c3270
--- /dev/null
+++ b/features/test/hotlistissues_test.py
@@ -0,0 +1,211 @@
+# 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
+
+"""Unit tests for issuelist module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mox
+import mock
+import unittest
+import time
+
+from google.appengine.ext import testbed
+import ezt
+
+from features import hotlistissues
+from features import hotlist_helpers
+from framework import framework_views
+from framework import permissions
+from framework import sorting
+from framework import template_helpers
+from framework import xsrf
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class HotlistIssuesUnitTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+    self.services = service_manager.Services(
+        issue_star=fake.IssueStarService(),
+        config=fake.ConfigService(),
+        user=fake.UserService(),
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        features=fake.FeaturesService(),
+        cache_manager=fake.CacheManager(),
+        hotlist_star=fake.HotlistStarService())
+    self.servlet = hotlistissues.HotlistIssues(
+        'req', 'res', services=self.services)
+    self.user1 = self.services.user.TestAddUser('testuser@gmail.com', 111)
+    self.user2 = self.services.user.TestAddUser('testuser2@gmail.com', 222, )
+    self.services.project.TestAddProject('project-name', project_id=1)
+    self.issue1 = fake.MakeTestIssue(
+        1, 1, 'issue_summary', 'New', 111, project_name='project-name')
+    self.services.issue.TestAddIssue(self.issue1)
+    self.issue2 = fake.MakeTestIssue(
+        1, 2, 'issue_summary2', 'New', 111, project_name='project-name')
+    self.services.issue.TestAddIssue(self.issue2)
+    self.issue3 = fake.MakeTestIssue(
+        1, 3, 'issue_summary3', 'New', 222, project_name='project-name')
+    self.services.issue.TestAddIssue(self.issue3)
+    self.issues = [self.issue1, self.issue2, self.issue3]
+    self.hotlist_item_fields = [
+        (issue.issue_id, rank, 111, 1205079300, '') for
+        rank, issue in enumerate(self.issues)]
+    self.test_hotlist = self.services.features.TestAddHotlist(
+        'hotlist', hotlist_id=123, owner_ids=[222], editor_ids=[111],
+        hotlist_item_fields=self.hotlist_item_fields)
+    self.hotlistissues = self.test_hotlist.items
+    # Unless perms is specified,
+    # MakeMonorailRequest will return an mr with admin permissions.
+    self.mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.test_hotlist, path='/u/222/hotlists/123',
+        services=self.services, perms=permissions.EMPTY_PERMISSIONSET)
+    self.mr.hotlist_id = self.test_hotlist.hotlist_id
+    self.mr.auth.user_id = 111
+    self.mr.auth.effective_ids = {111}
+    self.mr.viewed_user_auth.user_id = 111
+    sorting.InitializeArtValues(self.services)
+
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.testbed.deactivate()
+
+  def testAssertBasePermissions(self):
+    private_hotlist = self.services.features.TestAddHotlist(
+        'privateHotlist', hotlist_id=321, owner_ids=[222],
+        hotlist_item_fields=self.hotlist_item_fields, is_private=True)
+    # non-members cannot view private hotlists
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=private_hotlist, perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.effective_ids = {333}
+    mr.hotlist_id = private_hotlist.hotlist_id
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+
+    # members can view private hotlists
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=private_hotlist, perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.effective_ids = {222, 444}
+    mr.hotlist_id = private_hotlist.hotlist_id
+    self.servlet.AssertBasePermission(mr)
+
+    # non-members can view public hotlists
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.test_hotlist, perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.effective_ids = {333, 444}
+    mr.hotlist_id = self.test_hotlist.hotlist_id
+    self.servlet.AssertBasePermission(mr)
+
+    # members can view public hotlists
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.test_hotlist, perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.effective_ids = {111, 333}
+    mr.hotlist_id = self.test_hotlist.hotlist_id
+    self.servlet.AssertBasePermission(mr)
+
+  def testGatherPageData(self):
+    self.mr.mode = 'list'
+    self.mr.auth.effective_ids = {111}
+    self.mr.auth.user_id = 111
+    self.mr.sort_spec = 'rank stars'
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(ezt.boolean(False), page_data['owner_permissions'])
+    self.assertEqual(ezt.boolean(True), page_data['editor_permissions'])
+    self.assertEqual(ezt.boolean(False), page_data['grid_mode'])
+    self.assertEqual(ezt.boolean(True), page_data['allow_rerank'])
+
+    self.mr.sort_spec = 'stars ranks'
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(ezt.boolean(False), page_data['allow_rerank'])
+
+  def testGetTableViewData(self):
+    now = time.time()
+    self.mox.StubOutWithMock(time, 'time')
+    time.time().MultipleTimes().AndReturn(now)
+    self.mox.ReplayAll()
+
+    self.mr.auth.user_id = 222
+    self.mr.col_spec = 'Stars Projects Rank'
+    table_view_data = self.servlet.GetTableViewData(self.mr)
+    self.assertEqual(table_view_data['edit_hotlist_token'], xsrf.GenerateToken(
+        self.mr.auth.user_id, '/u/222/hotlists/hotlist.do'))
+    self.assertEqual(table_view_data['add_issues_selected'], ezt.boolean(False))
+
+    self.user2.obscure_email = False
+    table_view_data = self.servlet.GetTableViewData(self.mr)
+    self.assertEqual(table_view_data['edit_hotlist_token'], xsrf.GenerateToken(
+        self.mr.auth.user_id, '/u/222/hotlists/hotlist.do'))
+    self.mox.VerifyAll()
+
+  def testGetGridViewData(self):
+    # TODO(jojwang): Write this test
+    pass
+
+  def testProcessFormData_NoNewIssues(self):
+    post_data = fake.PostData(remove=['false'], add_local_ids=[''])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue(url.endswith('u/222/hotlists/hotlist'))
+    self.assertEqual(self.test_hotlist.items, self.hotlistissues)
+
+  def testProcessFormData_AddBadIssueRef(self):
+    self.servlet.PleaseCorrect = mock.Mock()
+    post_data = fake.PostData(
+        remove=['false'], add_local_ids=['no-such-project:999'])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertIsNone(url)
+    self.servlet.PleaseCorrect.assert_called_once()
+
+  def testProcessFormData_RemoveBadIssueRef(self):
+    post_data = fake.PostData(
+        remove=['true'], add_local_ids=['no-such-project:999'])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertIn('u/222/hotlists/hotlist', url)
+    self.assertEqual(self.test_hotlist.items, self.hotlistissues)
+
+  def testProcessFormData_NormalEditIssues(self):
+    issue4 = fake.MakeTestIssue(
+        1, 4, 'issue_summary4', 'New', 222, project_name='project-name')
+    self.services.issue.TestAddIssue(issue4)
+    issue5 = fake.MakeTestIssue(
+        1, 5, 'issue_summary5', 'New', 222, project_name='project-name')
+    self.services.issue.TestAddIssue(issue5)
+
+    post_data = fake.PostData(remove=['false'],
+                              add_local_ids=['project-name:4, project-name:5'])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue('u/222/hotlists/hotlist' in url)
+    self.assertEqual(len(self.test_hotlist.items), 5)
+    self.assertEqual(
+        self.test_hotlist.items[3].issue_id, issue4.issue_id)
+    self.assertEqual(
+        self.test_hotlist.items[4].issue_id, issue5.issue_id)
+
+    post_data = fake.PostData(remove=['true'], remove_local_ids=[
+        'project-name:4, project-name:1, project-name:2'])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue('u/222/hotlists/hotlist' in url)
+    self.assertTrue(len(self.test_hotlist.items), 2)
+    issue_ids = [issue.issue_id for issue in self.test_hotlist.items]
+    self.assertTrue(issue5.issue_id in issue_ids)
+    self.assertTrue(self.issue3.issue_id in issue_ids)
+
+  def testProcessFormData_NoPermissions(self):
+    post_data = fake.PostData(remove=['false'],
+                              add_local_ids=['project-name:4, project-name:5'])
+    self.mr.auth.effective_ids = {333}
+    self.mr.auth.user_id = 333
+    with self.assertRaises(permissions.PermissionException):
+      self.servlet.ProcessFormData(self.mr, post_data)
diff --git a/features/test/hotlistissuescsv_test.py b/features/test/hotlistissuescsv_test.py
new file mode 100644
index 0000000..afa53d5
--- /dev/null
+++ b/features/test/hotlistissuescsv_test.py
@@ -0,0 +1,97 @@
+# 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
+
+"""Unit tests for issuelistcsv module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from google.appengine.ext import testbed
+
+import webapp2
+
+from framework import permissions
+from framework import sorting
+from framework import xsrf
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from features import hotlistissuescsv
+
+
+class HotlistIssuesCsvTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+    self.services = service_manager.Services(
+        issue_star=fake.IssueStarService(),
+        config=fake.ConfigService(),
+        user=fake.UserService(),
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        cache_manager=fake.CacheManager(),
+        features=fake.FeaturesService())
+    self.servlet = hotlistissuescsv.HotlistIssuesCsv(
+        'req', webapp2.Response(), services=self.services)
+    self.user1 = self.services.user.TestAddUser('testuser@gmail.com', 111)
+    self.user2 = self.services.user.TestAddUser('testuser2@gmail.com', 222)
+    self.services.project.TestAddProject('project-name', project_id=1)
+    self.issue1 = fake.MakeTestIssue(
+        1, 1, 'issue_summary', 'New', 111, project_name='project-name')
+    self.services.issue.TestAddIssue(self.issue1)
+    self.issues = [self.issue1]
+    self.hotlist_item_fields = [
+        (issue.issue_id, rank, 111, 1205079300, '') for
+        rank, issue in enumerate(self.issues)]
+    self.hotlist = self.services.features.TestAddHotlist(
+        'MyHotlist', hotlist_id=123, owner_ids=[222], editor_ids=[111],
+        hotlist_item_fields=self.hotlist_item_fields)
+    self._MakeMR('/u/222/hotlists/MyHotlist')
+    sorting.InitializeArtValues(self.services)
+
+  def _MakeMR(self, path):
+    self.mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.hotlist, path=path, services=self.services)
+    self.mr.hotlist_id = self.hotlist.hotlist_id
+    self.mr.hotlist = self.hotlist
+
+  def testGatherPageData_AnonUsers(self):
+    """Anonymous users cannot download the issue list."""
+    self.mr.auth.user_id = 0
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.GatherPageData, self.mr)
+
+  def testGatherPageData_NoXSRF(self):
+    """Users need a valid XSRF token to download the issue list."""
+    # Note no token query-string parameter is set.
+    self.mr.auth.user_id = self.user2.user_id
+    self.assertRaises(xsrf.TokenIncorrect,
+                      self.servlet.GatherPageData, self.mr)
+
+  def testGatherPageData_BadXSRF(self):
+    """Users need a valid XSRF token to download the issue list."""
+    for path in ('/u/222/hotlists/MyHotlist',
+                 '/u/testuser2@gmail.com/hotlists/MyHotlist'):
+      token = 'bad'
+      self._MakeMR(path + '?token=%s' % token)
+      self.mr.auth.user_id = self.user2.user_id
+      self.assertRaises(xsrf.TokenIncorrect,
+                        self.servlet.GatherPageData, self.mr)
+
+  def testGatherPageData_Normal(self):
+    """Users can get the hotlist issue list."""
+    for path in ('/u/222/hotlists/MyHotlist',
+                 '/u/testuser2@gmail.com/hotlists/MyHotlist'):
+      form_token_path = self.servlet._FormHandlerURL(path)
+      token = xsrf.GenerateToken(self.user1.user_id, form_token_path)
+      self._MakeMR(path + '?token=%s' % token)
+      self.mr.auth.email = self.user1.email
+      self.mr.auth.user_id = self.user1.user_id
+      self.servlet.GatherPageData(self.mr)
diff --git a/features/test/hotlistpeople_test.py b/features/test/hotlistpeople_test.py
new file mode 100644
index 0000000..74beec3
--- /dev/null
+++ b/features/test/hotlistpeople_test.py
@@ -0,0 +1,253 @@
+# 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
+
+"""Unittest for Hotlist People servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mox
+import unittest
+import logging
+
+import ezt
+
+from testing import fake
+from features import hotlistpeople
+from framework import permissions
+from services import service_manager
+from testing import testing_helpers
+
+class HotlistPeopleListTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        features=fake.FeaturesService(),
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.owner_user = self.services.user.TestAddUser('buzbuz@gmail.com', 111)
+    self.editor_user = self.services.user.TestAddUser('monica@gmail.com', 222)
+    self.non_member_user = self.services.user.TestAddUser(
+        'who-dis@gmail.com', 333)
+    self.private_hotlist = self.services.features.TestAddHotlist(
+        'PrivateHotlist', 'owner only', [111], [222], is_private=True)
+    self.public_hotlist = self.services.features.TestAddHotlist(
+        'PublicHotlist', 'everyone', [111], [222], is_private=False)
+    self.servlet = hotlistpeople.HotlistPeopleList(
+        'req', 'res', services=self.services)
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testAssertBasePermission(self):
+    # owner can view people in private hotlist
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.private_hotlist, perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.effective_ids = {111, 444}
+    self.servlet.AssertBasePermission(mr)
+
+    # editor can view people in private hotlist
+    mr.auth.effective_ids = {222, 333}
+    self.servlet.AssertBasePermission(mr)
+
+    # non-members cannot view people in private hotlist
+    mr.auth.effective_ids = {444, 333}
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+
+    # owner can view people in public hotlist
+    mr = testing_helpers.MakeMonorailRequest(hotlist=self.public_hotlist)
+    mr.auth.effective_ids = {111, 444}
+    self.servlet.AssertBasePermission(mr)
+
+    # editor can view people in public hotlist
+    mr.auth.effective_ids = {222, 333}
+    self.servlet.AssertBasePermission(mr)
+
+    # non-members cannot view people in public hotlist
+    mr.auth.effective_ids = {444, 333}
+    self.servlet.AssertBasePermission(mr)
+
+  def testGatherPageData(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        hotlist=self.public_hotlist, perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.user_id = 111
+    mr.auth.effective_ids = {111}
+    mr.cnxn = 'fake cnxn'
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(ezt.boolean(True), page_data['offer_membership_editing'])
+    self.assertEqual(ezt.boolean(False), page_data['offer_remove_self'])
+    self.assertEqual(page_data['total_num_owners'], 1)
+    self.assertEqual(page_data['newly_added_views'], [])
+    self.assertEqual(len(page_data['pagination'].visible_results), 2)
+
+    # non-owners cannot edit people list
+    mr.auth.user_id = 222
+    mr.auth.effective_ids = {222}
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(ezt.boolean(False), page_data['offer_membership_editing'])
+    self.assertEqual(ezt.boolean(True), page_data['offer_remove_self'])
+
+    mr.auth.user_id = 333
+    mr.auth.effective_ids = {333}
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(ezt.boolean(False), page_data['offer_membership_editing'])
+    self.assertEqual(ezt.boolean(False), page_data['offer_remove_self'])
+
+  def testProcessFormData_Permission(self):
+    """Only owner can change member of hotlist."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/u/buzbuz@gmail.com/hotlists/PrivateHotlist/people',
+        hotlist=self.private_hotlist, perms=permissions.EMPTY_PERMISSIONSET)
+    mr.auth.effective_ids = {111, 444}
+    self.servlet.ProcessFormData(mr, {})
+
+    mr.auth.effective_ids = {222, 444}
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.ProcessFormData, mr, {})
+
+  def testProcessRemoveMembers(self):
+    hotlist = self.servlet.services.features.TestAddHotlist(
+        'HotlistName', 'removing 222, monica', [111], [222])
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/u/buzbuz@gmail.com/hotlists/HotlistName/people',
+        hotlist=hotlist)
+    mr.hotlist_id = hotlist.hotlist_id
+    post_data = fake.PostData(
+        remove = ['monica@gmail.com'])
+    url = self.servlet.ProcessRemoveMembers(
+        mr, post_data, '/u/111/hotlists/HotlistName')
+    self.assertTrue('/u/111/hotlists/HotlistName/people' in url)
+    self.assertEqual(hotlist.editor_ids, [])
+
+  def testProcessRemoveSelf(self):
+    hotlist = self.servlet.services.features.TestAddHotlist(
+        'HotlistName', 'self removing 222, monica', [111], [222])
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/u/buzbuz@gmail.com/hotlists/HotlistName/people',
+        hotlist=hotlist)
+    mr.hotlist_id = hotlist.hotlist_id
+    mr.cnxn = 'fake cnxn'
+    # The owner cannot be removed using ProcessRemoveSelf(); this is enforced
+    # by permission in ProcessFormData, not in the function itself;
+    # nor may a random user...
+    mr.auth.user_id = 333
+    mr.auth.effective_ids = {333}
+    url = self.servlet.ProcessRemoveSelf(mr, '/u/111/hotlists/HotlistName')
+    self.assertTrue('/u/111/hotlists/HotlistName/people' in url)
+    self.assertEqual(hotlist.owner_ids, [111])
+    self.assertEqual(hotlist.editor_ids, [222])
+    # ...but an editor can.
+    mr.auth.user_id = 222
+    mr.auth.effective_ids = {222}
+    url = self.servlet.ProcessRemoveSelf(mr, '/u/111/hotlists/HotlistName')
+    self.assertTrue('/u/111/hotlists/HotlistName/people' in url)
+    self.assertEqual(hotlist.owner_ids, [111])
+    self.assertEqual(hotlist.editor_ids, [])
+
+  def testProcessAddMembers(self):
+    hotlist = self.servlet.services.features.TestAddHotlist(
+        'HotlistName', 'adding 333, who-dis', [111], [222])
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/u/buzbuz@gmail.com/hotlists/HotlistName/people',
+        hotlist=hotlist)
+    mr.hotlist_id = hotlist.hotlist_id
+    post_data = fake.PostData(
+        addmembers = ['who-dis@gmail.com'],
+        role = ['editor'])
+    url = self.servlet.ProcessAddMembers(
+        mr, post_data, '/u/111/hotlists/HotlistName')
+    self.assertTrue('/u/111/hotlists/HotlistName/people' in url)
+    self.assertEqual(hotlist.editor_ids, [222, 333])
+
+  def testProcessAddMembers_OwnerToEditor(self):
+    hotlist = self.servlet.services.features.TestAddHotlist(
+        'HotlistName', 'adding owner 111, buzbuz as editor', [111], [222])
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/u/buzbuz@gmail.com/hotlists/HotlistName/people',
+        hotlist=hotlist)
+    mr.hotlist_id = hotlist.hotlist_id
+    addmembers_input = 'buzbuz@gmail.com'
+    post_data = fake.PostData(
+        addmembers = [addmembers_input],
+        role = ['editor'])
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        mr, initial_add_members=addmembers_input, initially_expand_form=True)
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessAddMembers(
+        mr, post_data, '/u/111/hotlists/HotlistName')
+    self.mox.VerifyAll()
+    self.assertEqual(
+        'Cannot have a hotlist without an owner; please leave at least one.',
+        mr.errors.addmembers)
+    self.assertIsNone(url)
+    # Verify that no changes have actually occurred.
+    self.assertEqual(hotlist.owner_ids, [111])
+    self.assertEqual(hotlist.editor_ids, [222])
+
+  def testProcessChangeOwnership(self):
+    hotlist = self.servlet.services.features.TestAddHotlist(
+        'HotlistName', 'new owner 333, who-dis', [111], [222])
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/u/buzbuz@gmail.com/hotlists/HotlistName/people',
+        hotlist=hotlist)
+    mr.hotlist_id = hotlist.hotlist_id
+    post_data = fake.PostData(
+        changeowners = ['who-dis@gmail.com'],
+        becomeeditor = ['on'])
+    url = self.servlet.ProcessChangeOwnership(mr, post_data)
+    self.assertTrue('/u/333/hotlists/HotlistName/people' in url)
+    self.assertEqual(hotlist.owner_ids, [333])
+    self.assertEqual(hotlist.editor_ids, [222, 111])
+
+  def testProcessChangeOwnership_UnownedHotlist(self):
+    hotlist = self.services.features.TestAddHotlist(
+        'unowned', 'new owner 333, who-dis', [], [222])
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/whatever',
+        hotlist=hotlist)
+    mr.hotlist_id = hotlist.hotlist_id
+    post_data = fake.PostData(
+        changeowners = ['who-dis@gmail.com'],
+        becomeeditor = ['on'])
+    self.servlet.ProcessChangeOwnership(mr, post_data)
+    self.assertEqual([333], mr.hotlist.owner_ids)
+
+  def testProcessChangeOwnership_BadEmail(self):
+    hotlist = self.servlet.services.features.TestAddHotlist(
+        'HotlistName', 'new owner 333, who-dis', [111], [222])
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/u/buzbuz@gmail.com/hotlists/HotlistName/people',
+        hotlist=hotlist)
+    mr.hotlist_id = hotlist.hotlist_id
+    changeowners_input = 'who-dis@gmail.com, extra-email@gmail.com'
+    post_data = fake.PostData(
+        changeowners = [changeowners_input],
+        becomeeditor = ['on'])
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        mr, initial_new_owner_username=changeowners_input, open_dialog='yes')
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessChangeOwnership(mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual(
+        'Please add one valid user email.', mr.errors.transfer_ownership)
+    self.assertIsNone(url)
+
+  def testProcessChangeOwnership_DuplicateName(self):
+    # other_hotlist = self.servlet.services.features.TestAddHotlist(
+    #    'HotlistName', 'hotlist with same name', [333], [])
+    # hotlist = self.servlet.services.features.TestAddHotlist(
+    #     'HotlistName', 'new owner 333, who-dis', [111], [222])
+
+    # in the test_hotlists dict of features_service in testing/fake
+    # 'other_hotlist' is overwritten by 'hotlist'
+    # TODO(jojwang): edit the fake features_service to allow hotlists
+    # with the same name but different owners
+    pass
diff --git a/features/test/inboundemail_test.py b/features/test/inboundemail_test.py
new file mode 100644
index 0000000..6c13827
--- /dev/null
+++ b/features/test/inboundemail_test.py
@@ -0,0 +1,400 @@
+# 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
+
+"""Unittests for monorail.feature.inboundemail."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+import webapp2
+from mock import patch
+
+import mox
+import time
+
+from google.appengine.ext.webapp.mail_handlers import BounceNotificationHandler
+
+import settings
+from businesslogic import work_env
+from features import alert2issue
+from features import commitlogcommands
+from features import inboundemail
+from framework import authdata
+from framework import emailfmt
+from framework import monorailcontext
+from framework import permissions
+from proto import project_pb2
+from proto import tracker_pb2
+from proto import user_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_helpers
+
+
+class InboundEmailTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService())
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=987, process_inbound_email=True,
+        contrib_ids=[111])
+    self.project_addr = 'proj@monorail.example.com'
+
+    self.issue = tracker_pb2.Issue()
+    self.issue.project_id = 987
+    self.issue.local_id = 100
+    self.services.issue.TestAddIssue(self.issue)
+
+    self.msg = testing_helpers.MakeMessage(
+        testing_helpers.HEADER_LINES, 'awesome!')
+
+    request, _ = testing_helpers.GetRequestObjects()
+    self.inbound = inboundemail.InboundEmail(request, None, self.services)
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testTemplates(self):
+    for name, template_path in self.inbound._templates.items():
+      assert(name in inboundemail.MSG_TEMPLATES)
+      assert(
+          template_path.GetTemplatePath().endswith(
+              inboundemail.MSG_TEMPLATES[name]))
+
+  def testProcessMail_MsgTooBig(self):
+    self.mox.StubOutWithMock(emailfmt, 'IsBodyTooBigToParse')
+    emailfmt.IsBodyTooBigToParse(mox.IgnoreArg()).AndReturn(True)
+    self.mox.ReplayAll()
+
+    email_tasks = self.inbound.ProcessMail(self.msg, self.project_addr)
+    self.mox.VerifyAll()
+    self.assertEqual(1, len(email_tasks))
+    email_task = email_tasks[0]
+    self.assertEqual('user@example.com', email_task['to'])
+    self.assertEqual('Email body too long', email_task['subject'])
+
+  def testProcessMail_NoProjectOnToLine(self):
+    self.mox.StubOutWithMock(emailfmt, 'IsProjectAddressOnToLine')
+    emailfmt.IsProjectAddressOnToLine(
+        self.project_addr, [self.project_addr]).AndReturn(False)
+    self.mox.ReplayAll()
+
+    ret = self.inbound.ProcessMail(self.msg, self.project_addr)
+    self.mox.VerifyAll()
+    self.assertIsNone(ret)
+
+  def testProcessMail_IssueUnidentified(self):
+    self.mox.StubOutWithMock(emailfmt, 'IdentifyProjectVerbAndLabel')
+    emailfmt.IdentifyProjectVerbAndLabel(self.project_addr).AndReturn(('proj',
+        None, None))
+
+    self.mox.StubOutWithMock(emailfmt, 'IdentifyIssue')
+    emailfmt.IdentifyIssue('proj', mox.IgnoreArg()).AndReturn((None))
+
+    self.mox.ReplayAll()
+
+    ret = self.inbound.ProcessMail(self.msg, self.project_addr)
+    self.mox.VerifyAll()
+    self.assertIsNone(ret)
+
+  def testProcessMail_ProjectNotLive(self):
+    self.services.user.TestAddUser('user@example.com', 111)
+    self.project.state = project_pb2.ProjectState.DELETABLE
+    email_tasks = self.inbound.ProcessMail(self.msg, self.project_addr)
+    email_task = email_tasks[0]
+    self.assertEqual('user@example.com', email_task['to'])
+    self.assertEqual('Project not found', email_task['subject'])
+
+  def testProcessMail_ProjectInboundEmailDisabled(self):
+    self.services.user.TestAddUser('user@example.com', 111)
+    self.project.process_inbound_email = False
+    email_tasks = self.inbound.ProcessMail(self.msg, self.project_addr)
+    email_task = email_tasks[0]
+    self.assertEqual('user@example.com', email_task['to'])
+    self.assertEqual(
+        'Email replies are not enabled in project proj', email_task['subject'])
+
+  def testProcessMail_NoRefHeader(self):
+    self.services.user.TestAddUser('user@example.com', 111)
+    self.mox.StubOutWithMock(emailfmt, 'ValidateReferencesHeader')
+    emailfmt.ValidateReferencesHeader(
+        mox.IgnoreArg(), self.project, mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(False)
+    emailfmt.ValidateReferencesHeader(
+        mox.IgnoreArg(), self.project, mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(False)
+    self.mox.ReplayAll()
+
+    email_tasks = self.inbound.ProcessMail(self.msg, self.project_addr)
+    self.mox.VerifyAll()
+    self.assertEqual(1, len(email_tasks))
+    email_task = email_tasks[0]
+    self.assertEqual('user@example.com', email_task['to'])
+    self.assertEqual(
+        'Your message is not a reply to a notification email',
+        email_task['subject'])
+
+  def testProcessMail_NoAccount(self):
+    # Note: not calling TestAddUser().
+    email_tasks = self.inbound.ProcessMail(self.msg, self.project_addr)
+    self.mox.VerifyAll()
+    self.assertEqual(1, len(email_tasks))
+    email_task = email_tasks[0]
+    self.assertEqual('user@example.com', email_task['to'])
+    self.assertEqual(
+        'Could not determine account of sender', email_task['subject'])
+
+  def testProcessMail_BannedAccount(self):
+    user_pb = self.services.user.TestAddUser('user@example.com', 111)
+    user_pb.banned = 'banned'
+
+    self.mox.StubOutWithMock(emailfmt, 'ValidateReferencesHeader')
+    emailfmt.ValidateReferencesHeader(
+        mox.IgnoreArg(), self.project, mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(True)
+    self.mox.ReplayAll()
+
+    email_tasks = self.inbound.ProcessMail(self.msg, self.project_addr)
+    self.mox.VerifyAll()
+    self.assertEqual(1, len(email_tasks))
+    email_task = email_tasks[0]
+    self.assertEqual('user@example.com', email_task['to'])
+    self.assertEqual(
+        'You are banned from using this issue tracker', email_task['subject'])
+
+  def testProcessMail_Success(self):
+    self.services.user.TestAddUser('user@example.com', 111)
+
+    self.mox.StubOutWithMock(emailfmt, 'ValidateReferencesHeader')
+    emailfmt.ValidateReferencesHeader(
+        mox.IgnoreArg(), self.project, mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(True)
+
+    self.mox.StubOutWithMock(self.inbound, 'ProcessIssueReply')
+    self.inbound.ProcessIssueReply(
+        mox.IgnoreArg(), self.project, 123, self.project_addr,
+        'awesome!')
+
+    self.mox.ReplayAll()
+
+    ret = self.inbound.ProcessMail(self.msg, self.project_addr)
+    self.mox.VerifyAll()
+    self.assertIsNone(ret)
+
+  def testProcessMail_Success_with_AlertNotification(self):
+    """Test ProcessMail with an alert notification message.
+
+    This is a sanity check for alert2issue.ProcessEmailNotification to ensure
+    that it can be successfully invoked in ProcessMail. Each function of
+    alert2issue module should be tested in aler2issue_test.
+    """
+    project_name = self.project.project_name
+    verb = 'alert'
+    trooper_queue = 'my-trooper'
+    project_addr = '%s+%s+%s@example.com' % (project_name, verb, trooper_queue)
+
+    self.mox.StubOutWithMock(emailfmt, 'IsProjectAddressOnToLine')
+    emailfmt.IsProjectAddressOnToLine(
+        project_addr, mox.IgnoreArg()).AndReturn(True)
+
+    class MockAuthData(object):
+      def __init__(self):
+        self.user_pb = user_pb2.MakeUser(111)
+        self.effective_ids = set([1, 2, 3])
+        self.user_id = 111
+        self.email = 'user@example.com'
+
+    mock_auth_data = MockAuthData()
+    self.mox.StubOutWithMock(authdata.AuthData, 'FromEmail')
+    authdata.AuthData.FromEmail(
+        mox.IgnoreArg(), settings.alert_service_account, self.services,
+        autocreate=True).AndReturn(mock_auth_data)
+
+    self.mox.StubOutWithMock(alert2issue, 'ProcessEmailNotification')
+    alert2issue.ProcessEmailNotification(
+        self.services, mox.IgnoreArg(), self.project, project_addr,
+        mox.IgnoreArg(), mock_auth_data, mox.IgnoreArg(), 'awesome!', '',
+        self.msg, trooper_queue)
+
+    self.mox.ReplayAll()
+    ret = self.inbound.ProcessMail(self.msg, project_addr)
+    self.mox.VerifyAll()
+    self.assertIsNone(ret)
+
+  def testProcessIssueReply_NoIssue(self):
+    nonexistant_local_id = 200
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    email_tasks = self.inbound.ProcessIssueReply(
+        mc, self.project, nonexistant_local_id, self.project_addr,
+        'awesome!')
+    self.assertEqual(1, len(email_tasks))
+    email_task = email_tasks[0]
+    self.assertEqual('user@example.com', email_task['to'])
+    self.assertEqual(
+        'Could not find issue %d in project %s' %
+        (nonexistant_local_id, self.project.project_name),
+        email_task['subject'])
+
+  def testProcessIssueReply_DeletedIssue(self):
+    self.issue.deleted = True
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@example.com')
+    mc.LookupLoggedInUserPerms(self.project)
+
+    email_tasks = self.inbound.ProcessIssueReply(
+        mc, self.project, self.issue.local_id, self.project_addr,
+        'awesome!')
+    self.assertEqual(1, len(email_tasks))
+    email_task = email_tasks[0]
+    self.assertEqual('user@example.com', email_task['to'])
+    self.assertEqual(
+        'Could not find issue %d in project %s' %
+        (self.issue.local_id, self.project.project_name), email_task['subject'])
+
+  def VerifyUserHasNoPerm(self, perms):
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@example.com')
+    mc.perms = perms
+
+    email_tasks = self.inbound.ProcessIssueReply(
+        mc, self.project, self.issue.local_id, self.project_addr,
+        'awesome!')
+    self.assertEqual(1, len(email_tasks))
+    email_task = email_tasks[0]
+    self.assertEqual('user@example.com', email_task['to'])
+    self.assertEqual(
+        'User does not have permission to add a comment', email_task['subject'])
+
+  def testProcessIssueReply_NoViewPerm(self):
+    self.VerifyUserHasNoPerm(permissions.EMPTY_PERMISSIONSET)
+
+  def testProcessIssueReply_CantViewRestrictedIssue(self):
+    self.issue.labels.append('Restrict-View-CoreTeam')
+    self.VerifyUserHasNoPerm(permissions.USER_PERMISSIONSET)
+
+  def testProcessIssueReply_NoAddIssuePerm(self):
+    self.VerifyUserHasNoPerm(permissions.READ_ONLY_PERMISSIONSET)
+
+  def testProcessIssueReply_NoEditIssuePerm(self):
+    self.services.user.TestAddUser('user@example.com', 111)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@example.com')
+    mc.perms = permissions.USER_PERMISSIONSET
+    mock_uia = commitlogcommands.UpdateIssueAction(self.issue.local_id)
+
+    self.mox.StubOutWithMock(commitlogcommands, 'UpdateIssueAction')
+    commitlogcommands.UpdateIssueAction(self.issue.local_id).AndReturn(mock_uia)
+
+    self.mox.StubOutWithMock(mock_uia, 'Parse')
+    mock_uia.Parse(
+        self.cnxn, self.project.project_name, 111, ['awesome!'], self.services,
+        strip_quoted_lines=True)
+    self.mox.StubOutWithMock(mock_uia, 'Run')
+    # mc.perms does not contain permission EDIT_ISSUE.
+    mock_uia.Run(mc, self.services)
+
+    self.mox.ReplayAll()
+    ret = self.inbound.ProcessIssueReply(
+        mc, self.project, self.issue.local_id, self.project_addr,
+        'awesome!')
+    self.mox.VerifyAll()
+    self.assertIsNone(ret)
+
+  def testProcessIssueReply_Success(self):
+    self.services.user.TestAddUser('user@example.com', 111)
+    mc = monorailcontext.MonorailContext(
+        self.services, cnxn=self.cnxn, requester='user@example.com')
+    mc.perms = permissions.COMMITTER_ACTIVE_PERMISSIONSET
+    mock_uia = commitlogcommands.UpdateIssueAction(self.issue.local_id)
+
+    self.mox.StubOutWithMock(commitlogcommands, 'UpdateIssueAction')
+    commitlogcommands.UpdateIssueAction(self.issue.local_id).AndReturn(mock_uia)
+
+    self.mox.StubOutWithMock(mock_uia, 'Parse')
+    mock_uia.Parse(
+        self.cnxn, self.project.project_name, 111, ['awesome!'], self.services,
+        strip_quoted_lines=True)
+    self.mox.StubOutWithMock(mock_uia, 'Run')
+    mock_uia.Run(mc, self.services)
+
+    self.mox.ReplayAll()
+    ret = self.inbound.ProcessIssueReply(
+        mc, self.project, self.issue.local_id, self.project_addr,
+        'awesome!')
+    self.mox.VerifyAll()
+    self.assertIsNone(ret)
+
+
+class BouncedEmailTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        user=fake.UserService())
+    self.user = self.services.user.TestAddUser('user@example.com', 111)
+
+    app = webapp2.WSGIApplication(config={'services': self.services})
+    app.set_globals(app=app)
+
+    self.servlet = inboundemail.BouncedEmail()
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testPost_Normal(self):
+    """Normally, our post() just calls BounceNotificationHandler post()."""
+    self.mox.StubOutWithMock(BounceNotificationHandler, 'post')
+    BounceNotificationHandler.post()
+    self.mox.ReplayAll()
+
+    self.servlet.post()
+    self.mox.VerifyAll()
+
+  def testPost_Exception(self):
+    """Our post() method works around an escaping bug."""
+    self.servlet.request = webapp2.Request.blank(
+        '/', POST={'raw-message': 'this is an email message'})
+
+    self.mox.StubOutWithMock(BounceNotificationHandler, 'post')
+    BounceNotificationHandler.post().AndRaise(AttributeError())
+    BounceNotificationHandler.post()
+    self.mox.ReplayAll()
+
+    self.servlet.post()
+    self.mox.VerifyAll()
+
+  def testReceive_Normal(self):
+    """Find the user that bounced and set email_bounce_timestamp."""
+    self.assertEqual(0, self.user.email_bounce_timestamp)
+
+    bounce_message = testing_helpers.Blank(original={'to': 'user@example.com'})
+    self.servlet.receive(bounce_message)
+
+    self.assertNotEqual(0, self.user.email_bounce_timestamp)
+
+  def testReceive_NoSuchUser(self):
+    """When not found, log it and ignore without creating a user record."""
+    self.servlet.request = webapp2.Request.blank(
+        '/', POST={'raw-message': 'this is an email message'})
+    bounce_message = testing_helpers.Blank(
+        original={'to': 'nope@example.com'},
+        notification='notification')
+    self.servlet.receive(bounce_message)
+    self.assertEqual(1, len(self.services.user.users_by_id))
diff --git a/features/test/notify_helpers_test.py b/features/test/notify_helpers_test.py
new file mode 100644
index 0000000..615da38
--- /dev/null
+++ b/features/test/notify_helpers_test.py
@@ -0,0 +1,617 @@
+# -*- coding: utf-8 -*-
+# 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
+
+"""Tests for notify_helpers.py."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import json
+import mock
+import unittest
+import os
+
+from features import features_constants
+from features import notify_helpers
+from features import notify_reasons
+from framework import emailfmt
+from framework import framework_views
+from framework import urls
+from proto import user_pb2
+from services import service_manager
+from testing import fake
+
+
+REPLY_NOT_ALLOWED = notify_reasons.REPLY_NOT_ALLOWED
+REPLY_MAY_COMMENT = notify_reasons.REPLY_MAY_COMMENT
+REPLY_MAY_UPDATE = notify_reasons.REPLY_MAY_UPDATE
+
+
+class TaskQueueingFunctionsTest(unittest.TestCase):
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def testAddAllEmailTasks(self, get_client_mock):
+    notify_helpers.AddAllEmailTasks(
+      tasks=[{'to': 'user'}, {'to': 'user2'}])
+
+    self.assertEqual(get_client_mock().create_task.call_count, 2)
+
+    queue_call_args = get_client_mock().queue_path.call_args_list
+    ((_app_id, _region, queue), _kwargs) = queue_call_args[0]
+    self.assertEqual(queue, features_constants.QUEUE_OUTBOUND_EMAIL)
+    ((_app_id, _region, queue), _kwargs) = queue_call_args[1]
+    self.assertEqual(queue, features_constants.QUEUE_OUTBOUND_EMAIL)
+
+    task_call_args = get_client_mock().create_task.call_args_list
+    ((_parent, task), _kwargs) = task_call_args[0]
+    expected_task = {
+        'app_engine_http_request':
+            {
+                'relative_uri': urls.OUTBOUND_EMAIL_TASK + '.do',
+                'body': json.dumps({
+                    'to': 'user'
+                }).encode(),
+                'headers': {
+                    'Content-type': 'application/json'
+                }
+            }
+    }
+    self.assertEqual(task, expected_task)
+    ((_parent, task), _kwargs) = task_call_args[1]
+    expected_task = {
+        'app_engine_http_request':
+            {
+                'relative_uri': urls.OUTBOUND_EMAIL_TASK + '.do',
+                'body': json.dumps({
+                    'to': 'user2'
+                }).encode(),
+                'headers': {
+                    'Content-type': 'application/json'
+                }
+            }
+    }
+    self.assertEqual(task, expected_task)
+
+
+class MergeLinkedAccountReasonsTest(unittest.TestCase):
+
+  def setUp(self):
+    parent = user_pb2.User(
+        user_id=111, email='parent@example.org',
+        linked_child_ids=[222])
+    child = user_pb2.User(
+        user_id=222, email='child@example.org',
+        linked_parent_id=111)
+    user_3 = user_pb2.User(
+        user_id=333, email='user4@example.org')
+    user_4 = user_pb2.User(
+        user_id=444, email='user4@example.org')
+    self.addr_perm_parent = notify_reasons.AddrPerm(
+        False, parent.email, parent, notify_reasons.REPLY_NOT_ALLOWED,
+        user_pb2.UserPrefs())
+    self.addr_perm_child = notify_reasons.AddrPerm(
+        False, child.email, child, notify_reasons.REPLY_NOT_ALLOWED,
+        user_pb2.UserPrefs())
+    self.addr_perm_3 = notify_reasons.AddrPerm(
+        False, user_3.email, user_3, notify_reasons.REPLY_NOT_ALLOWED,
+        user_pb2.UserPrefs())
+    self.addr_perm_4 = notify_reasons.AddrPerm(
+        False, user_4.email, user_4, notify_reasons.REPLY_NOT_ALLOWED,
+        user_pb2.UserPrefs())
+    self.addr_perm_5 = notify_reasons.AddrPerm(
+        False, 'alias@example.com', None, notify_reasons.REPLY_NOT_ALLOWED,
+        user_pb2.UserPrefs())
+
+  def testEmptyDict(self):
+    """Zero users to notify."""
+    self.assertEqual(
+        {},
+        notify_helpers._MergeLinkedAccountReasons({}, {}))
+
+  def testNormal(self):
+    """No users are related."""
+    addr_to_addrperm = {
+       self.addr_perm_parent.address: self.addr_perm_parent,
+       self.addr_perm_3.address: self.addr_perm_3,
+       self.addr_perm_4.address: self.addr_perm_4,
+       self.addr_perm_5.address: self.addr_perm_5,
+       }
+    addr_to_reasons = {
+       self.addr_perm_parent.address: [notify_reasons.REASON_CCD],
+       self.addr_perm_3.address: [notify_reasons.REASON_OWNER],
+       self.addr_perm_4.address: [notify_reasons.REASON_CCD],
+       self.addr_perm_5.address: [notify_reasons.REASON_CCD],
+       }
+    self.assertEqual(
+        {self.addr_perm_parent.address: [notify_reasons.REASON_CCD],
+         self.addr_perm_3.address: [notify_reasons.REASON_OWNER],
+         self.addr_perm_4.address: [notify_reasons.REASON_CCD],
+         self.addr_perm_5.address: [notify_reasons.REASON_CCD]
+         },
+        notify_helpers._MergeLinkedAccountReasons(
+            addr_to_addrperm, addr_to_reasons))
+
+  def testMerged(self):
+    """A child is merged into parent notification."""
+    addr_to_addrperm = {
+       self.addr_perm_parent.address: self.addr_perm_parent,
+       self.addr_perm_child.address: self.addr_perm_child,
+       }
+    addr_to_reasons = {
+       self.addr_perm_parent.address: [notify_reasons.REASON_OWNER],
+       self.addr_perm_child.address: [notify_reasons.REASON_CCD],
+       }
+    self.assertEqual(
+        {self.addr_perm_parent.address:
+         [notify_reasons.REASON_OWNER,
+          notify_reasons.REASON_LINKED_ACCOUNT]
+         },
+        notify_helpers._MergeLinkedAccountReasons(
+            addr_to_addrperm, addr_to_reasons))
+
+
+class MakeBulletedEmailWorkItemsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.project = fake.Project(project_name='proj1')
+    self.commenter_view = framework_views.StuffUserView(
+        111, 'test@example.com', True)
+    self.issue = fake.MakeTestIssue(
+        self.project.project_id, 1234, 'summary', 'New', 111)
+    self.detail_url = 'http://test-detail-url.com/id=1234'
+
+  def testEmptyAddrs(self):
+    """Test the case where we found zero users to notify."""
+    email_tasks = notify_helpers.MakeBulletedEmailWorkItems(
+        [], self.issue, 'link only body', 'non-member body', 'member body',
+        self.project, 'example.com',
+        self.commenter_view, self.detail_url)
+    self.assertEqual([], email_tasks)
+    email_tasks = notify_helpers.MakeBulletedEmailWorkItems(
+        [([], 'reason')], self.issue, 'link only body', 'non-member body',
+        'member body', self.project,
+        'example.com', self.commenter_view, self.detail_url)
+    self.assertEqual([], email_tasks)
+
+
+class LinkOnlyLogicTest(unittest.TestCase):
+
+  def setUp(self):
+    self.user_prefs = user_pb2.UserPrefs()
+    self.user = user_pb2.User()
+    self.issue = fake.MakeTestIssue(
+        789, 1, 'summary one', 'New', 111)
+    self.rvg_issue = fake.MakeTestIssue(
+        789, 2, 'summary two', 'New', 111, labels=['Restrict-View-Google'])
+    self.more_restricted_issue = fake.MakeTestIssue(
+        789, 3, 'summary three', 'New', 111, labels=['Restrict-View-Core'])
+    self.both_restricted_issue = fake.MakeTestIssue(
+        789, 4, 'summary four', 'New', 111,
+        labels=['Restrict-View-Google', 'Restrict-View-Core'])
+    self.addr_perm = notify_reasons.AddrPerm(
+        False, 'user@example.com', self.user, notify_reasons.REPLY_MAY_COMMENT,
+        self.user_prefs)
+
+  def testGetNotifyRestrictedIssues_NoPrefsPassed(self):
+    """AlsoNotify and all-issues addresses have no UserPrefs.  None is used."""
+    actual = notify_helpers._GetNotifyRestrictedIssues(
+        None, 'user@example.com', self.user)
+    self.assertEqual('notify with link only', actual)
+
+    self.user.last_visit_timestamp = 123456789
+    actual = notify_helpers._GetNotifyRestrictedIssues(
+        None, 'user@example.com', self.user)
+    self.assertEqual('notify with details', actual)
+
+  def testGetNotifyRestrictedIssues_PrefIsSet(self):
+    """When the notify_restricted_issues pref is set, we use it."""
+    self.user_prefs.prefs.extend([
+        user_pb2.UserPrefValue(name='x', value='y'),
+        user_pb2.UserPrefValue(name='notify_restricted_issues', value='z'),
+        ])
+    actual = notify_helpers._GetNotifyRestrictedIssues(
+        self.user_prefs, 'user@example.com', self.user)
+    self.assertEqual('z', actual)
+
+  def testGetNotifyRestrictedIssues_UserHasVisited(self):
+    """If user has ever visited, we know that they are not a mailing list."""
+    self.user.last_visit_timestamp = 123456789
+    actual = notify_helpers._GetNotifyRestrictedIssues(
+        self.user_prefs, 'user@example.com', self.user)
+    self.assertEqual('notify with details', actual)
+
+  def testGetNotifyRestrictedIssues_GooglerNeverVisited(self):
+    """It could be a noogler or google mailing list."""
+    actual = notify_helpers._GetNotifyRestrictedIssues(
+        self.user_prefs, 'user@google.com', self.user)
+    self.assertEqual('notify with details: Google', actual)
+
+  def testGetNotifyRestrictedIssues_NonGooglerNeverVisited(self):
+    """It could be a new non-noogler or public mailing list."""
+    actual = notify_helpers._GetNotifyRestrictedIssues(
+        self.user_prefs, 'user@example.com', self.user)
+    self.assertEqual('notify with link only', actual)
+
+    # If email does not match any known user, user object will be None.
+    actual = notify_helpers._GetNotifyRestrictedIssues(
+        self.user_prefs, 'user@example.com', None)
+    self.assertEqual('notify with link only', actual)
+
+  def testShouldUseLinkOnly_UnrestrictedIssue(self):
+    """Issue is not restricted, so go ahead and send comment details."""
+    self.assertFalse(notify_helpers.ShouldUseLinkOnly(
+        self.addr_perm, self.issue))
+
+  def testShouldUseLinkOnly_AlwaysDetailed(self):
+    """Issue is not restricted, so go ahead and send comment details."""
+    self.assertFalse(
+        notify_helpers.ShouldUseLinkOnly(self.addr_perm, self.issue, True))
+
+  @mock.patch('features.notify_helpers._GetNotifyRestrictedIssues')
+  def testShouldUseLinkOnly_NotifyWithDetails(self, fake_gnri):
+    """Issue is restricted, and user is allowed to get full comment details."""
+    fake_gnri.return_value = notify_helpers.NOTIFY_WITH_DETAILS
+    self.assertFalse(notify_helpers.ShouldUseLinkOnly(
+        self.addr_perm, self.rvg_issue))
+    self.assertFalse(notify_helpers.ShouldUseLinkOnly(
+        self.addr_perm, self.more_restricted_issue))
+    self.assertFalse(notify_helpers.ShouldUseLinkOnly(
+        self.addr_perm, self.both_restricted_issue))
+
+
+class MakeEmailWorkItemTest(unittest.TestCase):
+
+  def setUp(self):
+    self.project = fake.Project(project_name='proj1')
+    self.project.process_inbound_email = True
+    self.project2 = fake.Project(project_name='proj2')
+    self.project2.issue_notify_always_detailed = True
+    self.commenter_view = framework_views.StuffUserView(
+        111, 'test@example.com', True)
+    self.expected_html_footer = (
+        'You received this message because:<br/>  1. reason<br/><br/>You may '
+        'adjust your notification preferences at:<br/><a href="https://'
+        'example.com/hosting/settings">https://example.com/hosting/settings'
+        '</a>')
+    self.services = service_manager.Services(
+        user=fake.UserService())
+    self.member = self.services.user.TestAddUser('member@example.com', 222)
+    self.issue = fake.MakeTestIssue(
+        self.project.project_id, 1234, 'summary', 'New', 111,
+        project_name='proj1')
+    self.detail_url = 'http://test-detail-url.com/id=1234'
+
+  @mock.patch('features.notify_helpers.ShouldUseLinkOnly')
+  def testBodySelection_LinkOnly(self, mock_sulo):
+    """We send a link-only body when ShouldUseLinkOnly() is true."""
+    mock_sulo.return_value = True
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            True, 'a@a.com', self.member, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs()),
+        ['reason'], self.issue,
+        'body link-only', 'body mem', 'body mem', self.project,
+        'example.com', self.commenter_view, self.detail_url)
+    self.assertIn('body link-only', email_task['body'])
+
+  def testBodySelection_Member(self):
+    """We send members the email body that is indented for members."""
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            True, 'a@a.com', self.member, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs()),
+        ['reason'], self.issue,
+        'body link-only', 'body mem', 'body mem', self.project,
+        'example.com', self.commenter_view, self.detail_url)
+    self.assertIn('body mem', email_task['body'])
+
+  def testBodySelection_AlwaysDetailed(self):
+    """Always send full email when project configuration requires it."""
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            True, 'a@a.com', self.member, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs()), ['reason'], self.issue, 'body link-only',
+        'body mem', 'body mem', self.project2, 'example.com',
+        self.commenter_view, self.detail_url)
+    self.assertIn('body mem', email_task['body'])
+
+  def testBodySelection_NonMember(self):
+    """We send non-members the email body that is indented for non-members."""
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            False, 'a@a.com', self.member, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs()),
+        ['reason'], self.issue,
+        'body link-only', 'body non', 'body mem', self.project,
+        'example.com', self.commenter_view, self.detail_url)
+
+    self.assertEqual('a@a.com', email_task['to'])
+    self.assertEqual('Issue 1234 in proj1: summary', email_task['subject'])
+    self.assertIn('body non', email_task['body'])
+    self.assertEqual(
+      emailfmt.FormatFromAddr(self.project, commenter_view=self.commenter_view,
+                              can_reply_to=False),
+      email_task['from_addr'])
+    self.assertEqual(emailfmt.NoReplyAddress(), email_task['reply_to'])
+
+  def testHtmlBody(self):
+    """"An html body is sent if a detail_url is specified."""
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            False, 'a@a.com', self.member, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs()),
+        ['reason'], self.issue,
+        'body link-only', 'body non', 'body mem', self.project,
+        'example.com', self.commenter_view, self.detail_url)
+
+    expected_html_body = (
+        notify_helpers.HTML_BODY_WITH_GMAIL_ACTION_TEMPLATE % {
+            'url': self.detail_url,
+            'body': 'body non-- <br/>%s' % self.expected_html_footer})
+    self.assertEqual(expected_html_body, email_task['html_body'])
+
+  def testHtmlBody_WithUnicodeChars(self):
+    """"An html body is sent if a detail_url is specified."""
+    unicode_content = '\xe2\x9d\xa4     â    â'
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            False, 'a@a.com', self.member, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs()),
+        ['reason'], self.issue,
+        'body link-only', unicode_content, 'unused body mem',
+        self.project, 'example.com', self.commenter_view, self.detail_url)
+
+    expected_html_body = (
+        notify_helpers.HTML_BODY_WITH_GMAIL_ACTION_TEMPLATE % {
+            'url': self.detail_url,
+            'body': '%s-- <br/>%s' % (unicode_content.decode('utf-8'),
+                                      self.expected_html_footer)})
+    self.assertEqual(expected_html_body, email_task['html_body'])
+
+  def testHtmlBody_WithLinks(self):
+    """"An html body is sent if a detail_url is specified."""
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            False, 'a@a.com', self.member, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs()),
+        ['reason'], self.issue,
+        'body link-only', 'test google.com test', 'unused body mem',
+        self.project, 'example.com', self.commenter_view, self.detail_url)
+
+    expected_html_body = (
+        notify_helpers.HTML_BODY_WITH_GMAIL_ACTION_TEMPLATE % {
+            'url': self.detail_url,
+            'body': (
+            'test <a href="http://google.com">google.com</a> test-- <br/>%s' % (
+                self.expected_html_footer))})
+    self.assertEqual(expected_html_body, email_task['html_body'])
+
+  def testHtmlBody_LinkWithinTags(self):
+    """"An html body is sent with correct <a href>s."""
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            False, 'a@a.com', self.member, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs()),
+        ['reason'], self.issue,
+        'body link-only', 'a <http://google.com> z', 'unused body',
+        self.project, 'example.com', self.commenter_view,
+        self.detail_url)
+
+    expected_html_body = (
+        notify_helpers.HTML_BODY_WITH_GMAIL_ACTION_TEMPLATE % {
+            'url': self.detail_url,
+            'body': (
+                'a &lt;<a href="http://google.com">http://google.com</a>&gt; '
+                'z-- <br/>%s' % self.expected_html_footer)})
+    self.assertEqual(expected_html_body, email_task['html_body'])
+
+  def testHtmlBody_EmailWithinTags(self):
+    """"An html body is sent with correct <a href>s."""
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            False, 'a@a.com', self.member, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs()),
+        ['reason'], self.issue,
+        'body link-only', 'a <tt@chromium.org> <aa@chromium.org> z',
+        'unused body mem', self.project, 'example.com', self.commenter_view,
+        self.detail_url)
+
+    expected_html_body = (
+        notify_helpers.HTML_BODY_WITH_GMAIL_ACTION_TEMPLATE % {
+            'url': self.detail_url,
+            'body': (
+                'a &lt;<a href="mailto:tt@chromium.org">tt@chromium.org</a>&gt;'
+                ' &lt;<a href="mailto:aa@chromium.org">aa@chromium.org</a>&gt; '
+                'z-- <br/>%s' % self.expected_html_footer)})
+    self.assertEqual(expected_html_body, email_task['html_body'])
+
+  def testHtmlBody_WithEscapedHtml(self):
+    """"An html body is sent with html content escaped."""
+    body_with_html_content = (
+        '<a href="http://www.google.com">test</a> \'something\'')
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            False, 'a@a.com', self.member, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs()),
+        ['reason'], self.issue,
+        'body link-only', body_with_html_content, 'unused body mem',
+        self.project, 'example.com', self.commenter_view, self.detail_url)
+
+    escaped_body_with_html_content = (
+        '&lt;a href=&quot;http://www.google.com&quot;&gt;test&lt;/a&gt; '
+        '&#39;something&#39;')
+    notify_helpers._MakeNotificationFooter(
+        ['reason'], REPLY_NOT_ALLOWED, 'example.com')
+    expected_html_body = (
+        notify_helpers.HTML_BODY_WITH_GMAIL_ACTION_TEMPLATE % {
+            'url': self.detail_url,
+            'body': '%s-- <br/>%s' % (escaped_body_with_html_content,
+                                      self.expected_html_footer)})
+    self.assertEqual(expected_html_body, email_task['html_body'])
+
+  def doTestAddHTMLTags(self, body, expected):
+    actual = notify_helpers._AddHTMLTags(body)
+    self.assertEqual(expected, actual)
+
+  def testAddHTMLTags_Email(self):
+    """An email address produces <a href="mailto:...">...</a>."""
+    self.doTestAddHTMLTags(
+      'test test@example.com.',
+      ('test <a href="mailto:test@example.com">'
+       'test@example.com</a>.'))
+
+  def testAddHTMLTags_EmailInQuotes(self):
+    """Quoted "test@example.com" produces "<a href="...">...</a>"."""
+    self.doTestAddHTMLTags(
+      'test "test@example.com".',
+      ('test &quot;<a href="mailto:test@example.com">'
+       'test@example.com</a>&quot;.'))
+
+  def testAddHTMLTags_EmailInAngles(self):
+    """Bracketed <test@example.com> produces &lt;<a href="...">...</a>&gt;."""
+    self.doTestAddHTMLTags(
+      'test <test@example.com>.',
+      ('test &lt;<a href="mailto:test@example.com">'
+       'test@example.com</a>&gt;.'))
+
+  def testAddHTMLTags_Website(self):
+    """A website URL produces <a href="http:...">...</a>."""
+    self.doTestAddHTMLTags(
+      'test http://www.example.com.',
+      ('test <a href="http://www.example.com">'
+       'http://www.example.com</a>.'))
+
+  def testAddHTMLTags_WebsiteInQuotes(self):
+    """A link in quotes gets the quotes escaped."""
+    self.doTestAddHTMLTags(
+      'test "http://www.example.com".',
+      ('test &quot;<a href="http://www.example.com">'
+       'http://www.example.com</a>&quot;.'))
+
+  def testAddHTMLTags_WebsiteInAngles(self):
+    """Bracketed <www.example.com> produces &lt;<a href="...">...</a>&gt;."""
+    self.doTestAddHTMLTags(
+      'test <http://www.example.com>.',
+      ('test &lt;<a href="http://www.example.com">'
+       'http://www.example.com</a>&gt;.'))
+
+  def testReplyInvitation(self):
+    """We include a footer about replying that is appropriate for that user."""
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            True, 'a@a.com', self.member, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs()),
+        ['reason'], self.issue,
+        'body link-only', 'body non', 'body mem', self.project,
+        'example.com', self.commenter_view, self.detail_url)
+    self.assertEqual(emailfmt.NoReplyAddress(), email_task['reply_to'])
+    self.assertNotIn('Reply to this email', email_task['body'])
+
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            True, 'a@a.com', self.member, REPLY_MAY_COMMENT,
+            user_pb2.UserPrefs()),
+        ['reason'], self.issue,
+        'body link-only', 'body non', 'body mem', self.project,
+        'example.com', self.commenter_view, self.detail_url)
+    self.assertEqual(
+      '%s@%s' % (self.project.project_name, emailfmt.MailDomain()),
+      email_task['reply_to'])
+    self.assertIn('Reply to this email to add a comment', email_task['body'])
+    self.assertNotIn('make changes', email_task['body'])
+
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            True, 'a@a.com', self.member, REPLY_MAY_UPDATE,
+            user_pb2.UserPrefs()),
+        ['reason'], self.issue,
+        'body link-only', 'body non', 'body mem', self.project,
+        'example.com', self.commenter_view, self.detail_url)
+    self.assertEqual(
+      '%s@%s' % (self.project.project_name, emailfmt.MailDomain()),
+      email_task['reply_to'])
+    self.assertIn('Reply to this email to add a comment', email_task['body'])
+    self.assertIn('make updates', email_task['body'])
+
+  def testInboundEmailDisabled(self):
+    """We don't invite replies if they are disabled for this project."""
+    self.project.process_inbound_email = False
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            True, 'a@a.com', self.member, REPLY_MAY_UPDATE,
+            user_pb2.UserPrefs()),
+        ['reason'], self.issue,
+        'body link-only', 'body non', 'body mem',
+        self.project, 'example.com', self.commenter_view, self.detail_url)
+    self.assertEqual(emailfmt.NoReplyAddress(), email_task['reply_to'])
+
+  def testReasons(self):
+    """The footer lists reasons why that email was sent to that user."""
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            True, 'a@a.com', self.member, REPLY_MAY_UPDATE,
+            user_pb2.UserPrefs()),
+        ['Funny', 'Caring', 'Near'], self.issue,
+        'body link-only', 'body non', 'body mem',
+        self.project, 'example.com', self.commenter_view, self.detail_url)
+    self.assertIn('because:', email_task['body'])
+    self.assertIn('1. Funny', email_task['body'])
+    self.assertIn('2. Caring', email_task['body'])
+    self.assertIn('3. Near', email_task['body'])
+
+    email_task = notify_helpers._MakeEmailWorkItem(
+        notify_reasons.AddrPerm(
+            True, 'a@a.com', self.member, REPLY_MAY_UPDATE,
+            user_pb2.UserPrefs()),
+        [], self.issue,
+        'body link-only', 'body non', 'body mem',
+        self.project, 'example.com', self.commenter_view, self.detail_url)
+    self.assertNotIn('because', email_task['body'])
+
+
+class MakeNotificationFooterTest(unittest.TestCase):
+
+  def testMakeNotificationFooter_NoReason(self):
+    footer = notify_helpers._MakeNotificationFooter(
+        [], REPLY_NOT_ALLOWED, 'example.com')
+    self.assertEqual('', footer)
+
+  def testMakeNotificationFooter_WithReason(self):
+    footer = notify_helpers._MakeNotificationFooter(
+        ['REASON'], REPLY_NOT_ALLOWED, 'example.com')
+    self.assertIn('REASON', footer)
+    self.assertIn('https://example.com/hosting/settings', footer)
+
+    footer = notify_helpers._MakeNotificationFooter(
+        ['REASON'], REPLY_NOT_ALLOWED, 'example.com')
+    self.assertIn('REASON', footer)
+    self.assertIn('https://example.com/hosting/settings', footer)
+
+  def testMakeNotificationFooter_ManyReasons(self):
+    footer = notify_helpers._MakeNotificationFooter(
+        ['Funny', 'Caring', 'Warmblooded'], REPLY_NOT_ALLOWED,
+        'example.com')
+    self.assertIn('Funny', footer)
+    self.assertIn('Caring', footer)
+    self.assertIn('Warmblooded', footer)
+
+  def testMakeNotificationFooter_WithReplyInstructions(self):
+    footer = notify_helpers._MakeNotificationFooter(
+        ['REASON'], REPLY_NOT_ALLOWED, 'example.com')
+    self.assertNotIn('Reply', footer)
+    self.assertIn('https://example.com/hosting/settings', footer)
+
+    footer = notify_helpers._MakeNotificationFooter(
+        ['REASON'], REPLY_MAY_COMMENT, 'example.com')
+    self.assertIn('add a comment', footer)
+    self.assertNotIn('make updates', footer)
+    self.assertIn('https://example.com/hosting/settings', footer)
+
+    footer = notify_helpers._MakeNotificationFooter(
+        ['REASON'], REPLY_MAY_UPDATE, 'example.com')
+    self.assertIn('add a comment', footer)
+    self.assertIn('make updates', footer)
+    self.assertIn('https://example.com/hosting/settings', footer)
diff --git a/features/test/notify_reasons_test.py b/features/test/notify_reasons_test.py
new file mode 100644
index 0000000..559e322
--- /dev/null
+++ b/features/test/notify_reasons_test.py
@@ -0,0 +1,407 @@
+# Copyright 2017 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
+
+"""Tests for notify_reasons.py."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+import os
+
+from features import notify_reasons
+from framework import emailfmt
+from framework import framework_views
+from framework import urls
+from proto import user_pb2
+from proto import usergroup_pb2
+from services import service_manager
+from testing import fake
+from tracker import tracker_bizobj
+
+
+REPLY_NOT_ALLOWED = notify_reasons.REPLY_NOT_ALLOWED
+REPLY_MAY_COMMENT = notify_reasons.REPLY_MAY_COMMENT
+REPLY_MAY_UPDATE = notify_reasons.REPLY_MAY_UPDATE
+
+
+class ComputeIssueChangeAddressPermListTest(unittest.TestCase):
+
+  def setUp(self):
+    self.users_by_id = {
+        111: framework_views.StuffUserView(111, 'owner@example.com', True),
+        222: framework_views.StuffUserView(222, 'member@example.com', True),
+        999: framework_views.StuffUserView(999, 'visitor@example.com', True),
+        }
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.owner = self.services.user.TestAddUser('owner@example.com', 111)
+    self.member = self.services.user.TestAddUser('member@example.com', 222)
+    self.visitor = self.services.user.TestAddUser('visitor@example.com', 999)
+    self.project = self.services.project.TestAddProject(
+        'proj', owner_ids=[111], committer_ids=[222])
+    self.project.process_inbound_email = True
+    self.issue = fake.MakeTestIssue(
+        self.project.project_id, 1, 'summary', 'New', 111)
+
+  def testEmptyIDs(self):
+    cnxn = 'fake cnxn'
+    addr_perm_list = notify_reasons.ComputeIssueChangeAddressPermList(
+        cnxn, [], self.project, self.issue, self.services, [], {})
+    self.assertEqual([], addr_perm_list)
+
+  def testRecipientIsMember(self):
+    cnxn = 'fake cnxn'
+    ids_to_consider = [111, 222, 999]
+    addr_perm_list = notify_reasons.ComputeIssueChangeAddressPermList(
+        cnxn, ids_to_consider, self.project, self.issue, self.services, set(),
+        self.users_by_id, pref_check_function=lambda *args: True)
+    self.assertEqual(
+        [notify_reasons.AddrPerm(
+            True, 'owner@example.com', self.owner, REPLY_MAY_UPDATE,
+            user_pb2.UserPrefs(user_id=111)),
+         notify_reasons.AddrPerm(
+            True, 'member@example.com', self.member, REPLY_MAY_UPDATE,
+            user_pb2.UserPrefs(user_id=222)),
+         notify_reasons.AddrPerm(
+            False, 'visitor@example.com', self.visitor, REPLY_MAY_COMMENT,
+            user_pb2.UserPrefs(user_id=999))],
+        addr_perm_list)
+
+
+class ComputeProjectAndIssueNotificationAddrListTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService())
+    self.project = self.services.project.TestAddProject('project')
+    self.services.user.TestAddUser('alice@gmail.com', 111)
+    self.services.user.TestAddUser('bob@gmail.com', 222)
+    self.services.user.TestAddUser('fred@gmail.com', 555)
+
+  def testNotifyAddress(self):
+    # No mailing list or filter rules are defined
+    addr_perm_list = notify_reasons.ComputeProjectNotificationAddrList(
+        self.cnxn, self.services, self.project, True, set())
+    self.assertListEqual([], addr_perm_list)
+
+    # Only mailing list is notified.
+    self.project.issue_notify_address = 'mailing-list@domain.com'
+    addr_perm_list = notify_reasons.ComputeProjectNotificationAddrList(
+        self.cnxn, self.services, self.project, True, set())
+    self.assertListEqual(
+        [notify_reasons.AddrPerm(
+            False, 'mailing-list@domain.com', None, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs())],
+        addr_perm_list)
+
+    # No one is notified because mailing list was already notified.
+    omit_addrs = {'mailing-list@domain.com'}
+    addr_perm_list = notify_reasons.ComputeProjectNotificationAddrList(
+        self.cnxn, self.services, self.project, False, omit_addrs)
+    self.assertListEqual([], addr_perm_list)
+
+    # No one is notified because anon users cannot view.
+    addr_perm_list = notify_reasons.ComputeProjectNotificationAddrList(
+        self.cnxn, self.services, self.project, False, set())
+    self.assertListEqual([], addr_perm_list)
+
+  def testFilterRuleNotifyAddresses(self):
+    issue = fake.MakeTestIssue(
+        self.project.project_id, 1, 'summary', 'New', 555)
+    issue.derived_notify_addrs.extend(['notify@domain.com'])
+
+    addr_perm_list = notify_reasons.ComputeIssueNotificationAddrList(
+        self.cnxn, self.services, issue, set())
+    self.assertListEqual(
+        [notify_reasons.AddrPerm(
+            False, 'notify@domain.com', None, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs())],
+        addr_perm_list)
+
+    # Also-notify addresses can be omitted (e.g., if it is the same as
+    # the email address of the user who made the change).
+    addr_perm_list = notify_reasons.ComputeIssueNotificationAddrList(
+        self.cnxn, self.services, issue, {'notify@domain.com'})
+    self.assertListEqual([], addr_perm_list)
+
+
+class ComputeGroupReasonListTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        features=fake.FeaturesService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.project = self.services.project.TestAddProject(
+      'project', project_id=789)
+    self.config = self.services.config.GetProjectConfig('cnxn', 789)
+    self.alice = self.services.user.TestAddUser('alice@example.com', 111)
+    self.bob = self.services.user.TestAddUser('bob@example.com', 222)
+    self.fred = self.services.user.TestAddUser('fred@example.com', 555)
+    self.users_by_id = framework_views.MakeAllUserViews(
+        'cnxn', self.services.user, [111, 222, 555])
+    self.issue = fake.MakeTestIssue(
+        self.project.project_id, 1, 'summary', 'New', 555)
+
+  def CheckGroupReasonList(
+      self,
+      actual,
+      reporter_apl=None,
+      owner_apl=None,
+      old_owner_apl=None,
+      default_owner_apl=None,
+      ccd_apl=None,
+      group_ccd_apl=None,
+      default_ccd_apl=None,
+      starrer_apl=None,
+      subscriber_apl=None,
+      also_notified_apl=None,
+      all_notifications_apl=None):
+    (
+        you_report, you_own, you_old_owner, you_default_owner, you_ccd,
+        you_group_ccd, you_default_ccd, you_star, you_subscribe,
+        you_also_notify, all_notifications) = actual
+    self.assertEqual(
+        (reporter_apl or [], notify_reasons.REASON_REPORTER),
+        you_report)
+    self.assertEqual(
+        (owner_apl or [], notify_reasons.REASON_OWNER),
+        you_own)
+    self.assertEqual(
+        (old_owner_apl or [], notify_reasons.REASON_OLD_OWNER),
+        you_old_owner)
+    self.assertEqual(
+        (default_owner_apl or [], notify_reasons.REASON_DEFAULT_OWNER),
+        you_default_owner)
+    self.assertEqual(
+        (ccd_apl or [], notify_reasons.REASON_CCD),
+        you_ccd)
+    self.assertEqual(
+        (group_ccd_apl or [], notify_reasons.REASON_GROUP_CCD), you_group_ccd)
+    self.assertEqual(
+        (default_ccd_apl or [], notify_reasons.REASON_DEFAULT_CCD),
+        you_default_ccd)
+    self.assertEqual(
+        (starrer_apl or [], notify_reasons.REASON_STARRER),
+        you_star)
+    self.assertEqual(
+        (subscriber_apl or [], notify_reasons.REASON_SUBSCRIBER),
+        you_subscribe)
+    self.assertEqual(
+        (also_notified_apl or [], notify_reasons.REASON_ALSO_NOTIFY),
+        you_also_notify)
+    self.assertEqual(
+        (all_notifications_apl or [], notify_reasons.REASON_ALL_NOTIFICATIONS),
+        all_notifications)
+
+  def testComputeGroupReasonList_OwnerAndCC(self):
+    """Fred owns the issue, Alice is CC'd."""
+    self.issue.cc_ids = [self.alice.user_id]
+    actual = notify_reasons.ComputeGroupReasonList(
+        'cnxn', self.services, self.project, self.issue, self.config,
+        self.users_by_id, [], True)
+    self.CheckGroupReasonList(
+        actual,
+        owner_apl=[notify_reasons.AddrPerm(
+            False, self.fred.email, self.fred, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs(user_id=self.fred.user_id))],
+        ccd_apl=[notify_reasons.AddrPerm(
+            False, self.alice.email, self.alice, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs(user_id=self.alice.user_id))])
+
+  def testComputeGroupReasonList_DerivedCcs(self):
+    """Check we correctly compute reasons for component and rule ccs."""
+    member_1 = self.services.user.TestAddUser('member_1@example.com', 991)
+    member_2 = self.services.user.TestAddUser('member_2@example.com', 992)
+    member_3 = self.services.user.TestAddUser('member_3@example.com', 993)
+
+    expanded_group = self.services.user.TestAddUser('group@example.com', 999)
+    self.services.usergroup.CreateGroup(
+        'cnxn', self.services, expanded_group.email, 'owners')
+    self.services.usergroup.TestAddGroupSettings(
+        expanded_group.user_id,
+        expanded_group.email,
+        notify_members=True,
+        notify_group=False)
+    self.services.usergroup.TestAddMembers(
+        expanded_group.user_id, [member_1.user_id, member_2.user_id])
+
+    group = self.services.user.TestAddUser('group_1@example.com', 888)
+    self.services.usergroup.CreateGroup(
+        'cnxn', self.services, group.email, 'owners')
+    self.services.usergroup.TestAddGroupSettings(
+        group.user_id, group.email, notify_members=False, notify_group=True)
+    self.services.usergroup.TestAddMembers(
+        group.user_id, [member_2.user_id, member_3.user_id])
+
+    users_by_id = framework_views.MakeAllUserViews(
+        'cnxn', self.services.user, [
+            self.alice.user_id, self.fred.user_id, member_1.user_id,
+            member_2.user_id, member_3.user_id, group.user_id,
+            expanded_group.user_id
+        ])
+
+    comp_id = 123
+    self.config.component_defs = [
+        fake.MakeTestComponentDef(
+            self.project.project_id,
+            comp_id,
+            path='Chicken',
+            cc_ids=[group.user_id, expanded_group.user_id, self.alice.user_id])
+    ]
+    derived_cc_ids = [
+        self.fred.user_id,  # cc'd directly due to a rule
+        self.alice.user_id,  # cc'd due to the component
+        expanded_group
+        .user_id,  # cc'd due to the component, members notified directly
+        group.user_id,  # cc'd due to the component
+        # cc'd directly due to a rule,
+        # not removed from rule cc notifications due to transitive cc of
+        # expanded_group.
+        member_1.user_id,
+        member_3.user_id,
+    ]
+    issue = fake.MakeTestIssue(
+        self.project.project_id,
+        2,
+        'summary',
+        'New',
+        0,
+        derived_cc_ids=derived_cc_ids,
+        component_ids=[comp_id])
+    actual = notify_reasons.ComputeGroupReasonList(
+        'cnxn', self.services, self.project, issue, self.config, users_by_id,
+        [], True)
+
+    # Asserts list/reason of derived ccs from rules (not components).
+    # The derived ccs list/reason is the 7th tuple returned by
+    # ComputeGroupReasonList()
+    actual_ccd_apl, actual_ccd_reason = actual[6]
+    self.assertEqual(
+        actual_ccd_apl, [
+            notify_reasons.AddrPerm(
+                False, member_3.email, member_3, REPLY_NOT_ALLOWED,
+                user_pb2.UserPrefs(user_id=member_3.user_id)),
+            notify_reasons.AddrPerm(
+                False, self.fred.email, self.fred, REPLY_NOT_ALLOWED,
+                user_pb2.UserPrefs(user_id=self.fred.user_id)),
+            notify_reasons.AddrPerm(
+                False, member_1.email, member_1, REPLY_NOT_ALLOWED,
+                user_pb2.UserPrefs(user_id=member_1.user_id)),
+        ])
+    self.assertEqual(actual_ccd_reason, notify_reasons.REASON_DEFAULT_CCD)
+
+    # Asserts list/reason of derived ccs from components.
+    # The component derived ccs list/reason is hte 8th tuple returned by
+    # ComputeGroupReasonList() when there are component derived ccs.
+    actual_component_apl, actual_comp_reason = actual[7]
+    self.assertEqual(
+        actual_component_apl, [
+            notify_reasons.AddrPerm(
+                False, group.email, group, REPLY_NOT_ALLOWED,
+                user_pb2.UserPrefs(user_id=group.user_id)),
+            notify_reasons.AddrPerm(
+                False, self.alice.email, self.alice, REPLY_NOT_ALLOWED,
+                user_pb2.UserPrefs(user_id=self.alice.user_id)),
+            notify_reasons.AddrPerm(
+                False, member_2.email, member_2, REPLY_NOT_ALLOWED,
+                user_pb2.UserPrefs(user_id=member_2.user_id)),
+            notify_reasons.AddrPerm(
+                False, member_1.email, member_1, REPLY_NOT_ALLOWED,
+                user_pb2.UserPrefs(user_id=member_1.user_id)),
+        ])
+    self.assertEqual(
+        actual_comp_reason,
+        "You are auto-CC'd on all issues in component Chicken")
+
+  def testComputeGroupReasonList_Starrers(self):
+    """Bob and Alice starred it, but Alice opts out of notifications."""
+    self.alice.notify_starred_issue_change = False
+    actual = notify_reasons.ComputeGroupReasonList(
+        'cnxn', self.services, self.project, self.issue, self.config,
+        self.users_by_id, [], True,
+        starrer_ids=[self.alice.user_id, self.bob.user_id])
+    self.CheckGroupReasonList(
+        actual,
+        owner_apl=[notify_reasons.AddrPerm(
+            False, self.fred.email, self.fred, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs(user_id=self.fred.user_id))],
+        starrer_apl=[notify_reasons.AddrPerm(
+            False, self.bob.email, self.bob, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs(user_id=self.bob.user_id))])
+
+  def testComputeGroupReasonList_Subscribers(self):
+    """Bob subscribed."""
+    sq = tracker_bizobj.MakeSavedQuery(
+          1, 'freds issues', 1, 'owner:fred@example.com',
+          subscription_mode='immediate', executes_in_project_ids=[789])
+    self.services.features.UpdateUserSavedQueries(
+        'cnxn', self.bob.user_id, [sq])
+    actual = notify_reasons.ComputeGroupReasonList(
+        'cnxn', self.services, self.project, self.issue, self.config,
+        self.users_by_id, [], True)
+    self.CheckGroupReasonList(
+        actual,
+        owner_apl=[notify_reasons.AddrPerm(
+            False, self.fred.email, self.fred, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs(user_id=self.fred.user_id))],
+        subscriber_apl=[notify_reasons.AddrPerm(
+            False, self.bob.email, self.bob, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs(user_id=self.bob.user_id))])
+
+    # Now with subscriber notifications disabled.
+    actual = notify_reasons.ComputeGroupReasonList(
+        'cnxn', self.services, self.project, self.issue, self.config,
+        self.users_by_id, [], True, include_subscribers=False)
+    self.CheckGroupReasonList(
+        actual,
+        owner_apl=[notify_reasons.AddrPerm(
+            False, self.fred.email, self.fred, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs(user_id=self.fred.user_id))])
+
+  def testComputeGroupReasonList_NotifyAll(self):
+    """Project is configured to always notify issues@example.com."""
+    self.project.issue_notify_address = 'issues@example.com'
+    actual = notify_reasons.ComputeGroupReasonList(
+        'cnxn', self.services, self.project, self.issue, self.config,
+        self.users_by_id, [], True)
+    self.CheckGroupReasonList(
+        actual,
+        owner_apl=[notify_reasons.AddrPerm(
+            False, self.fred.email, self.fred, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs(user_id=self.fred.user_id))],
+        all_notifications_apl=[notify_reasons.AddrPerm(
+            False, 'issues@example.com', None, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs())])
+
+    # We don't use the notify-all address when the issue is not public.
+    actual = notify_reasons.ComputeGroupReasonList(
+        'cnxn', self.services, self.project, self.issue, self.config,
+        self.users_by_id, [], False)
+    self.CheckGroupReasonList(
+        actual,
+        owner_apl=[notify_reasons.AddrPerm(
+            False, self.fred.email, self.fred, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs(user_id=self.fred.user_id))])
+
+    # Now with the notify-all address disabled.
+    actual = notify_reasons.ComputeGroupReasonList(
+        'cnxn', self.services, self.project, self.issue, self.config,
+        self.users_by_id, [], True, include_notify_all=False)
+    self.CheckGroupReasonList(
+        actual,
+        owner_apl=[notify_reasons.AddrPerm(
+            False, self.fred.email, self.fred, REPLY_NOT_ALLOWED,
+            user_pb2.UserPrefs(user_id=self.fred.user_id))])
diff --git a/features/test/notify_test.py b/features/test/notify_test.py
new file mode 100644
index 0000000..00de106
--- /dev/null
+++ b/features/test/notify_test.py
@@ -0,0 +1,708 @@
+# 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
+
+"""Tests for notify.py."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import json
+import mock
+import unittest
+import webapp2
+
+from google.appengine.ext import testbed
+
+from features import notify
+from features import notify_reasons
+from framework import emailfmt
+from framework import urls
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import attachment_helpers
+from tracker import tracker_bizobj
+
+from third_party import cloudstorage
+
+
+def MakeTestIssue(project_id, local_id, owner_id, reporter_id, is_spam=False):
+  issue = tracker_pb2.Issue()
+  issue.project_id = project_id
+  issue.local_id = local_id
+  issue.issue_id = 1000 * project_id + local_id
+  issue.owner_id = owner_id
+  issue.reporter_id = reporter_id
+  issue.is_spam = is_spam
+  return issue
+
+
+class NotifyTaskHandleRequestTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        issue_star=fake.IssueStarService(),
+        features=fake.FeaturesService())
+    self.requester = self.services.user.TestAddUser('requester@example.com', 1)
+    self.nonmember = self.services.user.TestAddUser('user@example.com', 2)
+    self.member = self.services.user.TestAddUser('member@example.com', 3)
+    self.project = self.services.project.TestAddProject(
+        'test-project', owner_ids=[1, 3], project_id=12345)
+    self.issue1 = MakeTestIssue(
+        project_id=12345, local_id=1, owner_id=2, reporter_id=1)
+    self.issue2 = MakeTestIssue(
+        project_id=12345, local_id=2, owner_id=2, reporter_id=1)
+    self.services.issue.TestAddIssue(self.issue1)
+
+    self._old_gcs_open = cloudstorage.open
+    cloudstorage.open = fake.gcs_open
+    self.orig_sign_attachment_id = attachment_helpers.SignAttachmentID
+    attachment_helpers.SignAttachmentID = (
+        lambda aid: 'signed_%d' % aid)
+
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+
+  def tearDown(self):
+    cloudstorage.open = self._old_gcs_open
+    attachment_helpers.SignAttachmentID = self.orig_sign_attachment_id
+
+  def get_filtered_task_call_args(self, create_task_mock, relative_uri):
+    return [
+        (args, kwargs)
+        for (args, kwargs) in create_task_mock.call_args_list
+        if args[0]['app_engine_http_request']['relative_uri'] == relative_uri
+    ]
+
+  def VerifyParams(self, result, params):
+    self.assertEqual(
+        bool(params['send_email']), result['params']['send_email'])
+    if 'issue_id' in params:
+      self.assertEqual(params['issue_id'], result['params']['issue_id'])
+    if 'issue_ids' in params:
+      self.assertEqual([int(p) for p in params['issue_ids'].split(',')],
+                       result['params']['issue_ids'])
+
+  def testNotifyIssueChangeTask_Normal(self):
+    task = notify.NotifyIssueChangeTask(
+        request=None, response=None, services=self.services)
+    params = {'send_email': 1, 'issue_id': 12345001, 'seq': 0,
+              'commenter_id': 2}
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params=params,
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    self.VerifyParams(result, params)
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testNotifyIssueChangeTask_Spam(self, _create_task_mock):
+    issue = MakeTestIssue(
+        project_id=12345, local_id=1, owner_id=1, reporter_id=1,
+        is_spam=True)
+    self.services.issue.TestAddIssue(issue)
+    task = notify.NotifyIssueChangeTask(
+        request=None, response=None, services=self.services)
+    params = {'send_email': 0, 'issue_id': issue.issue_id, 'seq': 0,
+              'commenter_id': 2}
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params=params,
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    self.assertEqual(0, len(result['notified']))
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testNotifyBlockingChangeTask_Normal(self, _create_task_mock):
+    issue2 = MakeTestIssue(
+        project_id=12345, local_id=2, owner_id=2, reporter_id=1)
+    self.services.issue.TestAddIssue(issue2)
+    task = notify.NotifyBlockingChangeTask(
+        request=None, response=None, services=self.services)
+    params = {
+        'send_email': 1, 'issue_id': issue2.issue_id, 'seq': 0,
+        'delta_blocker_iids': self.issue1.issue_id, 'commenter_id': 1,
+        'hostport': 'bugs.chromium.org'}
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params=params,
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    self.VerifyParams(result, params)
+
+  def testNotifyBlockingChangeTask_Spam(self):
+    issue2 = MakeTestIssue(
+        project_id=12345, local_id=2, owner_id=2, reporter_id=1,
+        is_spam=True)
+    self.services.issue.TestAddIssue(issue2)
+    task = notify.NotifyBlockingChangeTask(
+        request=None, response=None, services=self.services)
+    params = {
+        'send_email': 1, 'issue_id': issue2.issue_id, 'seq': 0,
+        'delta_blocker_iids': self.issue1.issue_id, 'commenter_id': 1}
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params=params,
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    self.assertEqual(0, len(result['notified']))
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testNotifyBulkChangeTask_Normal(self, create_task_mock):
+    """We generate email tasks for each user involved in the issues."""
+    issue2 = MakeTestIssue(
+        project_id=12345, local_id=2, owner_id=2, reporter_id=1)
+    issue2.cc_ids = [3]
+    self.services.issue.TestAddIssue(issue2)
+    task = notify.NotifyBulkChangeTask(
+        request=None, response=None, services=self.services)
+    params = {
+        'send_email': 1, 'seq': 0,
+        'issue_ids': '%d,%d' % (self.issue1.issue_id, issue2.issue_id),
+        'old_owner_ids': '1,1', 'commenter_id': 1}
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params=params,
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    self.VerifyParams(result, params)
+
+    call_args_list = self.get_filtered_task_call_args(
+        create_task_mock, urls.OUTBOUND_EMAIL_TASK + '.do')
+    self.assertEqual(2, len(call_args_list))
+
+    for (args, _kwargs) in call_args_list:
+      task = args[0]
+      body = json.loads(task['app_engine_http_request']['body'].decode())
+      if 'user' in body['to']:
+        self.assertIn(u'\u2026', body['from_addr'])
+      # Full email for members
+      if 'member' in body['to']:
+        self.assertNotIn(u'\u2026', body['from_addr'])
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testNotifyBulkChangeTask_AlsoNotify(self, create_task_mock):
+    """We generate email tasks for also-notify addresses."""
+    self.issue1.derived_notify_addrs = [
+        'mailing-list@example.com', 'member@example.com']
+    task = notify.NotifyBulkChangeTask(
+        request=None, response=None, services=self.services)
+    params = {
+        'send_email': 1, 'seq': 0,
+        'issue_ids': '%d' % (self.issue1.issue_id),
+        'old_owner_ids': '1', 'commenter_id': 1}
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params=params,
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    self.VerifyParams(result, params)
+
+    call_args_list = self.get_filtered_task_call_args(
+        create_task_mock, urls.OUTBOUND_EMAIL_TASK + '.do')
+    self.assertEqual(3, len(call_args_list))
+
+    self.assertItemsEqual(
+        ['user@example.com', 'mailing-list@example.com', 'member@example.com'],
+        result['notified'])
+    for (args, _kwargs) in call_args_list:
+      task = args[0]
+      body = json.loads(task['app_engine_http_request']['body'].decode())
+      # obfuscated email for non-members
+      if 'user' in body['to']:
+        self.assertIn(u'\u2026', body['from_addr'])
+      # Full email for members
+      if 'member' in body['to']:
+        self.assertNotIn(u'\u2026', body['from_addr'])
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testNotifyBulkChangeTask_ProjectNotify(self, create_task_mock):
+    """We generate email tasks for project.issue_notify_address."""
+    self.project.issue_notify_address = 'mailing-list@example.com'
+    task = notify.NotifyBulkChangeTask(
+        request=None, response=None, services=self.services)
+    params = {
+        'send_email': 1, 'seq': 0,
+        'issue_ids': '%d' % (self.issue1.issue_id),
+        'old_owner_ids': '1', 'commenter_id': 1}
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params=params,
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    self.VerifyParams(result, params)
+
+    call_args_list = self.get_filtered_task_call_args(
+        create_task_mock, urls.OUTBOUND_EMAIL_TASK + '.do')
+    self.assertEqual(2, len(call_args_list))
+
+    self.assertItemsEqual(
+        ['user@example.com', 'mailing-list@example.com'],
+        result['notified'])
+
+    for (args, _kwargs) in call_args_list:
+      task = args[0]
+      body = json.loads(task['app_engine_http_request']['body'].decode())
+      # obfuscated email for non-members
+      if 'user' in body['to']:
+        self.assertIn(u'\u2026', body['from_addr'])
+      # Full email for members
+      if 'member' in body['to']:
+        self.assertNotIn(u'\u2026', body['from_addr'])
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testNotifyBulkChangeTask_SubscriberGetsEmail(self, create_task_mock):
+    """If a user subscription matches the issue, notify that user."""
+    task = notify.NotifyBulkChangeTask(
+        request=None, response=None, services=self.services)
+    params = {
+        'send_email': 1,
+        'issue_ids': '%d' % (self.issue1.issue_id),
+        'seq': 0,
+        'old_owner_ids': '1', 'commenter_id': 1}
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params=params,
+        method='POST',
+        services=self.services)
+    self.services.user.TestAddUser('subscriber@example.com', 4)
+    sq = tracker_bizobj.MakeSavedQuery(
+        1, 'all open issues', 2, '', subscription_mode='immediate',
+        executes_in_project_ids=[self.issue1.project_id])
+    self.services.features.UpdateUserSavedQueries('cnxn', 4, [sq])
+    result = task.HandleRequest(mr)
+    self.VerifyParams(result, params)
+
+    call_args_list = self.get_filtered_task_call_args(
+        create_task_mock, urls.OUTBOUND_EMAIL_TASK + '.do')
+    self.assertEqual(2, len(call_args_list))
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testNotifyBulkChangeTask_CCAndSubscriberListsIssueOnce(
+      self, create_task_mock):
+    """If a user both CCs and subscribes, include issue only once."""
+    task = notify.NotifyBulkChangeTask(
+        request=None, response=None, services=self.services)
+    params = {
+        'send_email': 1,
+        'issue_ids': '%d' % (self.issue1.issue_id),
+        'seq': 0,
+        'old_owner_ids': '1', 'commenter_id': 1}
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params=params,
+        method='POST',
+        services=self.services)
+    self.services.user.TestAddUser('subscriber@example.com', 4)
+    self.issue1.cc_ids = [4]
+    sq = tracker_bizobj.MakeSavedQuery(
+        1, 'all open issues', 2, '', subscription_mode='immediate',
+        executes_in_project_ids=[self.issue1.project_id])
+    self.services.features.UpdateUserSavedQueries('cnxn', 4, [sq])
+    result = task.HandleRequest(mr)
+    self.VerifyParams(result, params)
+
+    call_args_list = self.get_filtered_task_call_args(
+        create_task_mock, urls.OUTBOUND_EMAIL_TASK + '.do')
+    self.assertEqual(2, len(call_args_list))
+
+    found = False
+    for (args, _kwargs) in call_args_list:
+      task = args[0]
+      body = json.loads(task['app_engine_http_request']['body'].decode())
+      if body['to'] == 'subscriber@example.com':
+        found = True
+        task_body = body['body']
+        self.assertEqual(1, task_body.count('Issue %d' % self.issue1.local_id))
+    self.assertTrue(found)
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testNotifyBulkChangeTask_Spam(self, _create_task_mock):
+    """A spam issue is excluded from notification emails."""
+    issue2 = MakeTestIssue(
+        project_id=12345, local_id=2, owner_id=2, reporter_id=1,
+        is_spam=True)
+    self.services.issue.TestAddIssue(issue2)
+    task = notify.NotifyBulkChangeTask(
+        request=None, response=None, services=self.services)
+    params = {
+        'send_email': 1,
+        'issue_ids': '%d,%d' % (self.issue1.issue_id, issue2.issue_id),
+        'seq': 0,
+        'old_owner_ids': '1,1', 'commenter_id': 1}
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params=params,
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    self.assertEqual(1, len(result['notified']))
+
+  def testFormatBulkIssues_Normal_Single(self):
+    """A user may see full notification details for all changed issues."""
+    self.issue1.summary = 'one summary'
+    task = notify.NotifyBulkChangeTask(
+        request=None, response=None, services=self.services)
+    users_by_id = {}
+    commenter_view = None
+    config = self.services.config.GetProjectConfig('cnxn', 12345)
+    addrperm = notify_reasons.AddrPerm(
+        False, 'nonmember@example.com', self.nonmember,
+        notify_reasons.REPLY_NOT_ALLOWED, None)
+
+    subject, body = task._FormatBulkIssues(
+      [self.issue1], users_by_id, commenter_view, 'localhost:8080',
+      'test comment', [], config, addrperm)
+
+    self.assertIn('one summary', subject)
+    self.assertIn('one summary', body)
+    self.assertIn('test comment', body)
+
+  def testFormatBulkIssues_Normal_Multiple(self):
+    """A user may see full notification details for all changed issues."""
+    self.issue1.summary = 'one summary'
+    self.issue2.summary = 'two summary'
+    task = notify.NotifyBulkChangeTask(
+        request=None, response=None, services=self.services)
+    users_by_id = {}
+    commenter_view = None
+    config = self.services.config.GetProjectConfig('cnxn', 12345)
+    addrperm = notify_reasons.AddrPerm(
+        False, 'nonmember@example.com', self.nonmember,
+        notify_reasons.REPLY_NOT_ALLOWED, None)
+
+    subject, body = task._FormatBulkIssues(
+      [self.issue1, self.issue2], users_by_id, commenter_view, 'localhost:8080',
+      'test comment', [], config, addrperm)
+
+    self.assertIn('2 issues changed', subject)
+    self.assertIn('one summary', body)
+    self.assertIn('two summary', body)
+    self.assertIn('test comment', body)
+
+  def testFormatBulkIssues_LinkOnly_Single(self):
+    """A user may not see full notification details for some changed issue."""
+    self.issue1.summary = 'one summary'
+    self.issue1.labels = ['Restrict-View-Google']
+    task = notify.NotifyBulkChangeTask(
+        request=None, response=None, services=self.services)
+    users_by_id = {}
+    commenter_view = None
+    config = self.services.config.GetProjectConfig('cnxn', 12345)
+    addrperm = notify_reasons.AddrPerm(
+        False, 'nonmember@example.com', self.nonmember,
+        notify_reasons.REPLY_NOT_ALLOWED, None)
+
+    subject, body = task._FormatBulkIssues(
+      [self.issue1], users_by_id, commenter_view, 'localhost:8080',
+      'test comment', [], config, addrperm)
+
+    self.assertIn('issue 1', subject)
+    self.assertNotIn('one summary', subject)
+    self.assertNotIn('one summary', body)
+    self.assertNotIn('test comment', body)
+
+  def testFormatBulkIssues_LinkOnly_Multiple(self):
+    """A user may not see full notification details for some changed issue."""
+    self.issue1.summary = 'one summary'
+    self.issue1.labels = ['Restrict-View-Google']
+    self.issue2.summary = 'two summary'
+    task = notify.NotifyBulkChangeTask(
+        request=None, response=None, services=self.services)
+    users_by_id = {}
+    commenter_view = None
+    config = self.services.config.GetProjectConfig('cnxn', 12345)
+    addrperm = notify_reasons.AddrPerm(
+        False, 'nonmember@example.com', self.nonmember,
+        notify_reasons.REPLY_NOT_ALLOWED, None)
+
+    subject, body = task._FormatBulkIssues(
+      [self.issue1, self.issue2], users_by_id, commenter_view, 'localhost:8080',
+      'test comment', [], config, addrperm)
+
+    self.assertIn('2 issues', subject)
+    self.assertNotIn('summary', subject)
+    self.assertNotIn('one summary', body)
+    self.assertIn('two summary', body)
+    self.assertNotIn('test comment', body)
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testNotifyApprovalChangeTask_Normal(self, _create_task_mock):
+    config = self.services.config.GetProjectConfig('cnxn', 12345)
+    config.field_defs = [
+        # issue's User field with any_comment is notified.
+        tracker_bizobj.MakeFieldDef(
+            121, 12345, 'TL', tracker_pb2.FieldTypes.USER_TYPE,
+            '', '', False, False, False, None, None, None, False, '',
+            None, tracker_pb2.NotifyTriggers.ANY_COMMENT, 'no_action',
+            'TL, notified on everything', False),
+        # issue's User field with never is not notified.
+        tracker_bizobj.MakeFieldDef(
+            122, 12345, 'silentTL', tracker_pb2.FieldTypes.USER_TYPE,
+            '', '', False, False, False, None, None, None, False, '',
+            None, tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+            'TL, notified on nothing', False),
+        # approval's User field with any_comment is notified.
+        tracker_bizobj.MakeFieldDef(
+            123, 12345, 'otherapprovalTL', tracker_pb2.FieldTypes.USER_TYPE,
+            '', '', False, False, False, None, None, None, False, '',
+            None, tracker_pb2.NotifyTriggers.ANY_COMMENT, 'no_action',
+            'TL on the approvers team', False, approval_id=3),
+        # another approval's User field with any_comment is not notified.
+        tracker_bizobj.MakeFieldDef(
+            124, 12345, 'otherapprovalTL', tracker_pb2.FieldTypes.USER_TYPE,
+            '', '', False, False, False, None, None, None, False, '',
+            None, tracker_pb2.NotifyTriggers.ANY_COMMENT, 'no_action',
+            'TL on another approvers team', False, approval_id=4),
+        tracker_bizobj.MakeFieldDef(
+            3, 12345, 'Goat-Approval', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+            '', '', False, False, False, None, None, None, False, '',
+            None, tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+            'Get Approval from Goats', False)
+    ]
+    self.services.config.StoreConfig('cnxn', config)
+
+    # Custom user_type field TLs
+    self.services.user.TestAddUser('TL@example.com', 111)
+    self.services.user.TestAddUser('silentTL@example.com', 222)
+    self.services.user.TestAddUser('approvalTL@example.com', 333)
+    self.services.user.TestAddUser('otherapprovalTL@example.com', 444)
+
+    # Approvers
+    self.services.user.TestAddUser('approver_old@example.com', 777)
+    self.services.user.TestAddUser('approver_new@example.com', 888)
+    self.services.user.TestAddUser('approver_still@example.com', 999)
+    self.services.user.TestAddUser('approver_group@example.com', 666)
+    self.services.user.TestAddUser('group_mem1@example.com', 661)
+    self.services.user.TestAddUser('group_mem2@example.com', 662)
+    self.services.user.TestAddUser('group_mem3@example.com', 663)
+    self.services.usergroup.TestAddGroupSettings(
+        666, 'approver_group@example.com')
+    self.services.usergroup.TestAddMembers(666, [661, 662, 663])
+    canary_phase = tracker_pb2.Phase(
+        name='Canary', phase_id=1, rank=1)
+    approval_values = [
+        tracker_pb2.ApprovalValue(approval_id=3,
+                                  approver_ids=[888, 999, 666, 661])]
+    approval_issue = MakeTestIssue(
+        project_id=12345, local_id=2, owner_id=2, reporter_id=1,
+        is_spam=True)
+    approval_issue.phases = [canary_phase]
+    approval_issue.approval_values = approval_values
+    approval_issue.field_values = [
+        tracker_bizobj.MakeFieldValue(121, None, None, 111, None, None, False),
+        tracker_bizobj.MakeFieldValue(122, None, None, 222, None, None, False),
+        tracker_bizobj.MakeFieldValue(123, None, None, 333, None, None, False),
+        tracker_bizobj.MakeFieldValue(124, None, None, 444, None, None, False),
+    ]
+    self.services.issue.TestAddIssue(approval_issue)
+
+    amend = tracker_bizobj.MakeApprovalApproversAmendment([888], [777])
+
+    comment = tracker_pb2.IssueComment(
+        project_id=12345, user_id=999, issue_id=approval_issue.issue_id,
+        amendments=[amend], timestamp=1234567890, content='just a comment.')
+    attach = tracker_pb2.Attachment(
+        attachment_id=4567, filename='sploot.jpg', mimetype='image/png',
+        gcs_object_id='/pid/attachments/abcd', filesize=(1024 * 1023))
+    comment.attachments.append(attach)
+    self.services.issue.TestAddComment(comment, approval_issue.local_id)
+    self.services.issue.TestAddAttachment(
+        attach, comment.id, approval_issue.issue_id)
+
+    task = notify.NotifyApprovalChangeTask(
+        request=None, response=None, services=self.services)
+    params = {
+        'send_email': 1,
+        'issue_id': approval_issue.issue_id,
+        'approval_id': 3,
+        'comment_id': comment.id,
+    }
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params=params,
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    self.assertTrue('just a comment' in result['tasks'][0]['body'])
+    self.assertTrue('Approvers: -appro...' in result['tasks'][0]['body'])
+    self.assertTrue('sploot.jpg' in result['tasks'][0]['body'])
+    self.assertTrue(
+        '/issues/attachment?aid=4567' in result['tasks'][0]['body'])
+    self.assertItemsEqual(
+        ['user@example.com', 'approver_old@example.com',
+         'approver_new@example.com', 'TL@example.com',
+         'approvalTL@example.com', 'group_mem1@example.com',
+         'group_mem2@example.com', 'group_mem3@example.com'],
+        result['notified'])
+
+    # Test no approvers/groups notified
+    # Status change to NEED_INFO does not email approvers.
+    amend2 = tracker_bizobj.MakeApprovalStatusAmendment(
+        tracker_pb2.ApprovalStatus.NEED_INFO)
+    comment2 = tracker_pb2.IssueComment(
+        project_id=12345, user_id=999, issue_id=approval_issue.issue_id,
+        amendments=[amend2], timestamp=1234567891, content='')
+    self.services.issue.TestAddComment(comment2, approval_issue.local_id)
+    task = notify.NotifyApprovalChangeTask(
+        request=None, response=None, services=self.services)
+    params = {
+        'send_email': 1,
+        'issue_id': approval_issue.issue_id,
+        'approval_id': 3,
+        'comment_id': comment2.id,
+    }
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params=params,
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+
+    self.assertIsNotNone(result['tasks'][0].get('references'))
+    self.assertEqual(result['tasks'][0]['reply_to'], emailfmt.NoReplyAddress())
+    self.assertTrue('Status: need_info' in result['tasks'][0]['body'])
+    self.assertItemsEqual(
+        ['user@example.com', 'TL@example.com', 'approvalTL@example.com'],
+        result['notified'])
+
+  def testNotifyApprovalChangeTask_GetApprovalEmailRecipients(self):
+    task = notify.NotifyApprovalChangeTask(
+        request=None, response=None, services=self.services)
+    issue = fake.MakeTestIssue(789, 1, 'summary', 'New', 111)
+    approval_value = tracker_pb2.ApprovalValue(
+        approver_ids=[222, 333],
+        status=tracker_pb2.ApprovalStatus.APPROVED)
+    comment = tracker_pb2.IssueComment(
+        project_id=789, user_id=1, issue_id=78901)
+
+    # Comment with not amendments notifies everyone.
+    rids = task._GetApprovalEmailRecipients(
+        approval_value, comment, issue, [777, 888])
+    self.assertItemsEqual(rids, [111, 222, 333, 777, 888])
+
+    # New APPROVED status notifies owners and any_comment users.
+    amendment = tracker_bizobj.MakeApprovalStatusAmendment(
+        tracker_pb2.ApprovalStatus.APPROVED)
+    comment.amendments = [amendment]
+    rids = task._GetApprovalEmailRecipients(
+        approval_value, comment, issue, [777, 888])
+    self.assertItemsEqual(rids, [111, 777, 888])
+
+    # New REVIEW_REQUESTED status notifies approvers.
+    approval_value.status = tracker_pb2.ApprovalStatus.REVIEW_REQUESTED
+    amendment = tracker_bizobj.MakeApprovalStatusAmendment(
+        tracker_pb2.ApprovalStatus.REVIEW_REQUESTED)
+    comment.amendments = [amendment]
+    rids = task._GetApprovalEmailRecipients(
+        approval_value, comment, issue, [777, 888])
+    self.assertItemsEqual(rids, [222, 333])
+
+    # Approvers change notifies everyone.
+    amendment = tracker_bizobj.MakeApprovalApproversAmendment(
+        [222], [555])
+    comment.amendments = [amendment]
+    approval_value.approver_ids = [222]
+    rids = task._GetApprovalEmailRecipients(
+        approval_value, comment, issue, [777], omit_ids=[444, 333])
+    self.assertItemsEqual(rids, [111, 222, 555, 777])
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testNotifyRulesDeletedTask(self, _create_task_mock):
+    self.services.project.TestAddProject(
+        'proj', owner_ids=[777, 888], project_id=789)
+    self.services.user.TestAddUser('owner1@test.com', 777)
+    self.services.user.TestAddUser('cow@test.com', 888)
+    task = notify.NotifyRulesDeletedTask(
+        request=None, response=None, services=self.services)
+    params = {'project_id': 789,
+              'filter_rules': 'if green make yellow,if orange make blue'}
+    mr = testing_helpers.MakeMonorailRequest(
+        params=params,
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    self.assertEqual(len(result['tasks']), 2)
+    body = result['tasks'][0]['body']
+    self.assertTrue('if green make yellow' in body)
+    self.assertTrue('if green make yellow' in body)
+    self.assertTrue('/p/proj/adminRules' in body)
+    self.assertItemsEqual(
+        ['cow@test.com', 'owner1@test.com'], result['notified'])
+
+  def testOutboundEmailTask_Normal(self):
+    """We can send an email."""
+    params = {
+        'from_addr': 'requester@example.com',
+        'reply_to': 'user@example.com',
+        'to': 'user@example.com',
+        'subject': 'Test subject'}
+    body = json.dumps(params)
+    request = webapp2.Request.blank('/', body=body)
+    task = notify.OutboundEmailTask(
+        request=request, response=None, services=self.services)
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        payload=body,
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    self.assertEqual(params['from_addr'], result['sender'])
+    self.assertEqual(params['subject'], result['subject'])
+
+  def testOutboundEmailTask_MissingTo(self):
+    """We skip emails that don't specify the To-line."""
+    params = {
+        'from_addr': 'requester@example.com',
+        'reply_to': 'user@example.com',
+        'subject': 'Test subject'}
+    body = json.dumps(params)
+    request = webapp2.Request.blank('/', body=body)
+    task = notify.OutboundEmailTask(
+        request=request, response=None, services=self.services)
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        payload=body,
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    self.assertEqual('Skipping because no "to" address found.', result['note'])
+    self.assertNotIn('from_addr', result)
+
+  def testOutboundEmailTask_BannedUser(self):
+    """We don't send emails to banned users.."""
+    params = {
+        'from_addr': 'requester@example.com',
+        'reply_to': 'user@example.com',
+        'to': 'banned@example.com',
+        'subject': 'Test subject'}
+    body = json.dumps(params)
+    request = webapp2.Request.blank('/', body=body)
+    task = notify.OutboundEmailTask(
+        request=request, response=None, services=self.services)
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        payload=body,
+        method='POST',
+        services=self.services)
+    self.services.user.TestAddUser('banned@example.com', 404, banned=True)
+    result = task.HandleRequest(mr)
+    self.assertEqual('Skipping because user is banned.', result['note'])
+    self.assertNotIn('from_addr', result)
diff --git a/features/test/prettify_test.py b/features/test/prettify_test.py
new file mode 100644
index 0000000..07fce43
--- /dev/null
+++ b/features/test/prettify_test.py
@@ -0,0 +1,92 @@
+# 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
+
+"""Unittest for the prettify module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import ezt
+
+from features import prettify
+
+
+class SourceBrowseTest(unittest.TestCase):
+
+  def testPrepareSourceLinesForHighlighting(self):
+    # String representing an empty source file
+    src = ''
+
+    file_lines = prettify.PrepareSourceLinesForHighlighting(src)
+    self.assertEqual(len(file_lines), 0)
+
+  def testPrepareSourceLinesForHighlightingNoBreaks(self):
+    # seven lines of text with no blank lines
+    src = ' 1\n 2\n 3\n 4\n 5\n 6\n 7'
+
+    file_lines = prettify.PrepareSourceLinesForHighlighting(src)
+    self.assertEqual(len(file_lines), 7)
+    out_lines = [fl.line for fl in file_lines]
+    self.assertEqual('\n'.join(out_lines), src)
+
+    file_lines = prettify.PrepareSourceLinesForHighlighting(src)
+    self.assertEqual(len(file_lines), 7)
+
+  def testPrepareSourceLinesForHighlightingWithBreaks(self):
+    # seven lines of text with line 5 being blank
+    src = ' 1\n 2\n 3\n 4\n\n 6\n 7'
+
+    file_lines = prettify.PrepareSourceLinesForHighlighting(src)
+    self.assertEqual(len(file_lines), 7)
+
+
+class BuildPrettifyDataTest(unittest.TestCase):
+
+  def testNonSourceFile(self):
+    prettify_data = prettify.BuildPrettifyData(0, '/dev/null')
+    self.assertDictEqual(
+        dict(should_prettify=ezt.boolean(False),
+             prettify_class=None),
+        prettify_data)
+
+    prettify_data = prettify.BuildPrettifyData(10, 'readme.txt')
+    self.assertDictEqual(
+        dict(should_prettify=ezt.boolean(False),
+             prettify_class=None),
+        prettify_data)
+
+  def testGenericLanguage(self):
+    prettify_data = prettify.BuildPrettifyData(123, 'trunk/src/hello.php')
+    self.assertDictEqual(
+        dict(should_prettify=ezt.boolean(True),
+             prettify_class=''),
+        prettify_data)
+
+  def testSpecificLanguage(self):
+    prettify_data = prettify.BuildPrettifyData(123, 'trunk/src/hello.java')
+    self.assertDictEqual(
+        dict(should_prettify=ezt.boolean(True),
+             prettify_class='lang-java'),
+        prettify_data)
+
+  def testThirdPartyExtensionLanguages(self):
+    for ext in ['apollo', 'agc', 'aea', 'el', 'scm', 'cl', 'lisp',
+                'go', 'hs', 'lua', 'fs', 'ml', 'proto', 'scala',
+                'sql', 'vb', 'vbs', 'vhdl', 'vhd', 'wiki', 'yaml',
+                'yml', 'clj']:
+      prettify_data = prettify.BuildPrettifyData(123, '/trunk/src/hello.' + ext)
+      self.assertDictEqual(
+          dict(should_prettify=ezt.boolean(True),
+               prettify_class='lang-' + ext),
+          prettify_data)
+
+  def testExactFilename(self):
+    prettify_data = prettify.BuildPrettifyData(123, 'trunk/src/Makefile')
+    self.assertDictEqual(
+        dict(should_prettify=ezt.boolean(True),
+             prettify_class='lang-sh'),
+        prettify_data)
diff --git a/features/test/pubsub_test.py b/features/test/pubsub_test.py
new file mode 100644
index 0000000..2044cf7
--- /dev/null
+++ b/features/test/pubsub_test.py
@@ -0,0 +1,110 @@
+# Copyright 2019 The Chromium Authors. All rights reserved.
+# Use of this source code is govered by a BSD-style
+# license that can be found in the LICENSE file or at
+# https://developers.google.com/open-source/licenses/bsd
+
+"""Tests for features.pubsub."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from mock import Mock
+
+from features import pubsub
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class PublishPubsubIssueChangeTaskTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        features=fake.FeaturesService())
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[1, 3],
+        project_id=12345)
+
+    # Stub the pubsub API (there is no pubsub testbed stub).
+    self.pubsub_client_mock = Mock()
+    pubsub.set_up_pubsub_api = Mock(return_value=self.pubsub_client_mock)
+
+  def testPublishPubsubIssueChangeTask_NoIssueIdParam(self):
+    """Test case when issue_id param is not passed."""
+    task = pubsub.PublishPubsubIssueChangeTask(
+        request=None, response=None, services=self.services)
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params={},
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    expected_body = {
+      'error': 'Cannot proceed without a valid issue ID.',
+    }
+    self.assertEqual(result, expected_body)
+
+  def testPublishPubsubIssueChangeTask_PubSubAPIInitFailure(self):
+    """Test case when pub/sub API fails to init."""
+    pubsub.set_up_pubsub_api = Mock(return_value=None)
+    task = pubsub.PublishPubsubIssueChangeTask(
+        request=None, response=None, services=self.services)
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params={},
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    expected_body = {
+      'error': 'Pub/Sub API init failure.',
+    }
+    self.assertEqual(result, expected_body)
+
+  def testPublishPubsubIssueChangeTask_IssueNotFound(self):
+    """Test case when issue is not found."""
+    task = pubsub.PublishPubsubIssueChangeTask(
+        request=None, response=None, services=self.services)
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params={'issue_id': 314159},
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+    expected_body = {
+      'error': 'Could not find issue with ID 314159',
+    }
+    self.assertEqual(result, expected_body)
+
+  def testPublishPubsubIssueChangeTask_Normal(self):
+    """Test normal happy-path case."""
+    issue = fake.MakeTestIssue(789, 543, 'sum', 'New', 111, issue_id=78901,
+        project_name='rutabaga')
+    self.services.issue.TestAddIssue(issue)
+    task = pubsub.PublishPubsubIssueChangeTask(
+        request=None, response=None, services=self.services)
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 1},
+        params={'issue_id': 78901},
+        method='POST',
+        services=self.services)
+    result = task.HandleRequest(mr)
+
+    self.pubsub_client_mock.projects().topics().publish.assert_called_once_with(
+      topic='projects/testing-app/topics/issue-updates',
+      body={
+        'messages': [{
+          'attributes': {
+            'local_id': '543',
+            'project_name': 'rutabaga',
+          },
+        }],
+      }
+    )
+    self.assertEqual(result, {})
diff --git a/features/test/savedqueries_helpers_test.py b/features/test/savedqueries_helpers_test.py
new file mode 100644
index 0000000..d635fe1
--- /dev/null
+++ b/features/test/savedqueries_helpers_test.py
@@ -0,0 +1,112 @@
+# 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
+
+"""Unit tests for savedqueries_helpers feature."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mox
+
+from features import savedqueries_helpers
+from testing import fake
+from tracker import tracker_bizobj
+
+
+class SavedQueriesHelperTest(unittest.TestCase):
+
+  def setUp(self):
+    self.features = fake.FeaturesService()
+    self.project = fake.ProjectService()
+    self.cnxn = 'fake cnxn'
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testParseSavedQueries(self):
+    post_data = {
+        'xyz_savedquery_name_1': '',
+        'xyz_savedquery_name_2': 'name2',
+        'xyz_savedquery_name_3': 'name3',
+        'xyz_savedquery_id_1': 1,
+        'xyz_savedquery_id_2': 2,
+        'xyz_savedquery_id_3': 3,
+        'xyz_savedquery_projects_1': '123',
+        'xyz_savedquery_projects_2': 'abc',
+        'xyz_savedquery_projects_3': 'def',
+        'xyz_savedquery_base_1': 4,
+        'xyz_savedquery_base_2': 5,
+        'xyz_savedquery_base_3': 6,
+        'xyz_savedquery_query_1': 'query1',
+        'xyz_savedquery_query_2': 'query2',
+        'xyz_savedquery_query_3': 'query3',
+        'xyz_savedquery_sub_mode_1': 'sub_mode1',
+        'xyz_savedquery_sub_mode_2': 'sub_mode2',
+        'xyz_savedquery_sub_mode_3': 'sub_mode3',
+    }
+    self.project.TestAddProject(name='abc', project_id=1001)
+    self.project.TestAddProject(name='def', project_id=1002)
+
+    saved_queries = savedqueries_helpers.ParseSavedQueries(
+        self.cnxn, post_data, self.project, prefix='xyz_')
+    self.assertEqual(2, len(saved_queries))
+
+    # pylint: disable=unbalanced-tuple-unpacking
+    saved_query1, saved_query2 = saved_queries
+    # Assert contents of saved_query1.
+    self.assertEqual(2, saved_query1.query_id)
+    self.assertEqual('name2', saved_query1.name)
+    self.assertEqual(5, saved_query1.base_query_id)
+    self.assertEqual('query2', saved_query1.query)
+    self.assertEqual([1001], saved_query1.executes_in_project_ids)
+    self.assertEqual('sub_mode2', saved_query1.subscription_mode)
+    # Assert contents of saved_query2.
+    self.assertEqual(3, saved_query2.query_id)
+    self.assertEqual('name3', saved_query2.name)
+    self.assertEqual(6, saved_query2.base_query_id)
+    self.assertEqual('query3', saved_query2.query)
+    self.assertEqual([1002], saved_query2.executes_in_project_ids)
+    self.assertEqual('sub_mode3', saved_query2.subscription_mode)
+
+  def testSavedQueryToCond(self):
+    class MockSavedQuery:
+      def __init__(self):
+        self.base_query_id = 1
+        self.query = 'query'
+    saved_query = MockSavedQuery()
+
+    cond_for_missing_query = savedqueries_helpers.SavedQueryToCond(None)
+    self.assertEqual('', cond_for_missing_query)
+
+    cond_with_no_base = savedqueries_helpers.SavedQueryToCond(saved_query)
+    self.assertEqual('query', cond_with_no_base)
+
+    self.mox.StubOutWithMock(tracker_bizobj, 'GetBuiltInQuery')
+    tracker_bizobj.GetBuiltInQuery(1).AndReturn('base')
+    self.mox.ReplayAll()
+    cond_with_base = savedqueries_helpers.SavedQueryToCond(saved_query)
+    self.assertEqual('base query', cond_with_base)
+    self.mox.VerifyAll()
+
+  def testSavedQueryIDToCond(self):
+    self.mox.StubOutWithMock(savedqueries_helpers, 'SavedQueryToCond')
+    savedqueries_helpers.SavedQueryToCond(mox.IgnoreArg()).AndReturn('ret')
+    self.mox.ReplayAll()
+    query_cond = savedqueries_helpers.SavedQueryIDToCond(
+        self.cnxn, self.features, 1)
+    self.assertEqual('ret', query_cond)
+    self.mox.VerifyAll()
+
+    self.mox.StubOutWithMock(tracker_bizobj, 'GetBuiltInQuery')
+    tracker_bizobj.GetBuiltInQuery(1).AndReturn('built_in_query')
+    self.mox.ReplayAll()
+    query_cond = savedqueries_helpers.SavedQueryIDToCond(
+        self.cnxn, self.features, 1)
+    self.assertEqual('built_in_query', query_cond)
+    self.mox.VerifyAll()
diff --git a/features/test/savedqueries_test.py b/features/test/savedqueries_test.py
new file mode 100644
index 0000000..08624a2
--- /dev/null
+++ b/features/test/savedqueries_test.py
@@ -0,0 +1,43 @@
+# 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
+
+"""Unit tests for savedqueries feature."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from features import savedqueries
+from framework import monorailrequest
+from framework import permissions
+from services import service_manager
+from testing import fake
+
+
+class SavedQueriesTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService())
+    self.servlet = savedqueries.SavedQueries(
+        'req', 'res', services=self.services)
+    self.services.user.TestAddUser('a@example.com', 111)
+
+  def testAssertBasePermission(self):
+    """Only permit site admins and users viewing themselves."""
+    mr = monorailrequest.MonorailRequest(self.services)
+    mr.viewed_user_auth.user_id = 111
+    mr.auth.user_id = 222
+
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+
+    mr.auth.user_id = 111
+    self.servlet.AssertBasePermission(mr)
+
+    mr.auth.user_id = 222
+    mr.auth.user_pb.is_site_admin = True
+    self.servlet.AssertBasePermission(mr)
diff --git a/features/test/send_notifications_test.py b/features/test/send_notifications_test.py
new file mode 100644
index 0000000..435a67d
--- /dev/null
+++ b/features/test/send_notifications_test.py
@@ -0,0 +1,141 @@
+# 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
+
+"""Tests for prepareandsend.py"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+import urlparse
+
+from features import send_notifications
+from framework import urls
+from tracker import tracker_bizobj
+
+
+class SendNotificationTest(unittest.TestCase):
+
+  def _get_filtered_task_call_args(self, create_task_mock, relative_uri):
+    return [
+        (args, _kwargs)
+        for (args, _kwargs) in create_task_mock.call_args_list
+        if args[0]['app_engine_http_request']['relative_uri'].startswith(
+            relative_uri)
+    ]
+
+  def _get_create_task_path_and_params(self, call):
+    (args, _kwargs) = call
+    path = args[0]['app_engine_http_request']['relative_uri']
+    encoded_params = args[0]['app_engine_http_request']['body']
+    params = {
+        k: v[0] for k, v in urlparse.parse_qs(encoded_params, True).items()
+    }
+    return path, params
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testPrepareAndSendIssueChangeNotification(self, create_task_mock):
+    send_notifications.PrepareAndSendIssueChangeNotification(
+        issue_id=78901,
+        hostport='testbed-test.appspotmail.com',
+        commenter_id=1,
+        old_owner_id=2,
+        send_email=True)
+
+    call_args_list = self._get_filtered_task_call_args(
+        create_task_mock, urls.NOTIFY_ISSUE_CHANGE_TASK + '.do')
+    self.assertEqual(1, len(call_args_list))
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testPrepareAndSendIssueBlockingNotification(self, create_task_mock):
+    send_notifications.PrepareAndSendIssueBlockingNotification(
+        issue_id=78901,
+        hostport='testbed-test.appspotmail.com',
+        delta_blocker_iids=[],
+        commenter_id=1,
+        send_email=True)
+
+    call_args_list = self._get_filtered_task_call_args(
+        create_task_mock, urls.NOTIFY_BLOCKING_CHANGE_TASK + '.do')
+    self.assertEqual(0, len(call_args_list))
+
+    send_notifications.PrepareAndSendIssueBlockingNotification(
+        issue_id=78901,
+        hostport='testbed-test.appspotmail.com',
+        delta_blocker_iids=[2],
+        commenter_id=1,
+        send_email=True)
+
+    call_args_list = self._get_filtered_task_call_args(
+        create_task_mock, urls.NOTIFY_BLOCKING_CHANGE_TASK + '.do')
+    self.assertEqual(1, len(call_args_list))
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testPrepareAndSendApprovalChangeNotification(self, create_task_mock):
+    send_notifications.PrepareAndSendApprovalChangeNotification(
+        78901, 3, 'testbed-test.appspotmail.com', 55)
+
+    call_args_list = self._get_filtered_task_call_args(
+        create_task_mock, urls.NOTIFY_APPROVAL_CHANGE_TASK + '.do')
+    self.assertEqual(1, len(call_args_list))
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testSendIssueBulkChangeNotification_CommentOnly(self, create_task_mock):
+    send_notifications.SendIssueBulkChangeNotification(
+        issue_ids=[78901],
+        hostport='testbed-test.appspotmail.com',
+        old_owner_ids=[2],
+        comment_text='comment',
+        commenter_id=1,
+        amendments=[],
+        send_email=True,
+        users_by_id=2)
+
+    call_args_list = self._get_filtered_task_call_args(
+        create_task_mock, urls.NOTIFY_BULK_CHANGE_TASK + '.do')
+    self.assertEqual(1, len(call_args_list))
+    _path, params = self._get_create_task_path_and_params(call_args_list[0])
+    self.assertEqual(params['comment_text'], 'comment')
+    self.assertEqual(params['amendments'], '')
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testSendIssueBulkChangeNotification_Normal(self, create_task_mock):
+    send_notifications.SendIssueBulkChangeNotification(
+        issue_ids=[78901],
+        hostport='testbed-test.appspotmail.com',
+        old_owner_ids=[2],
+        comment_text='comment',
+        commenter_id=1,
+        amendments=[
+            tracker_bizobj.MakeStatusAmendment('New', 'Old'),
+            tracker_bizobj.MakeLabelsAmendment(['Added'], ['Removed']),
+            tracker_bizobj.MakeStatusAmendment('New', 'Old'),
+            ],
+        send_email=True,
+        users_by_id=2)
+
+    call_args_list = self._get_filtered_task_call_args(
+        create_task_mock, urls.NOTIFY_BULK_CHANGE_TASK + '.do')
+    self.assertEqual(1, len(call_args_list))
+    _path, params = self._get_create_task_path_and_params(call_args_list[0])
+    self.assertEqual(params['comment_text'], 'comment')
+    self.assertEqual(
+        params['amendments'].split('\n'),
+        ['    Status: New', '    Labels: -Removed Added'])
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testPrepareAndSendDeletedFilterRulesNotifications(self, create_task_mock):
+    filter_rule_strs = ['if yellow make orange', 'if orange make blue']
+    send_notifications.PrepareAndSendDeletedFilterRulesNotification(
+        789, 'testbed-test.appspotmail.com', filter_rule_strs)
+
+    call_args_list = self._get_filtered_task_call_args(
+        create_task_mock, urls.NOTIFY_RULES_DELETED_TASK + '.do')
+    self.assertEqual(1, len(call_args_list))
+    _path, params = self._get_create_task_path_and_params(call_args_list[0])
+    self.assertEqual(params['project_id'], '789')
+    self.assertEqual(
+        params['filter_rules'], 'if yellow make orange,if orange make blue')
diff --git a/features/test/spammodel_test.py b/features/test/spammodel_test.py
new file mode 100644
index 0000000..3e99c8f
--- /dev/null
+++ b/features/test/spammodel_test.py
@@ -0,0 +1,39 @@
+# Copyright 2020 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.
+"""Tests for the spammodel module."""
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+import mock
+import unittest
+import webapp2
+
+from features import spammodel
+from framework import urls
+
+
+class TrainingDataExportTest(unittest.TestCase):
+
+  def test_handler_definition(self):
+    instance = spammodel.TrainingDataExport()
+    self.assertIsInstance(instance, webapp2.RequestHandler)
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def test_enqueues_task(self, get_client_mock):
+    spammodel.TrainingDataExport().get()
+    task = {
+        'app_engine_http_request':
+            {
+                'relative_uri': urls.SPAM_DATA_EXPORT_TASK + '.do',
+                'body': '',
+                'headers': {
+                    'Content-type': 'application/x-www-form-urlencoded'
+                }
+            }
+    }
+    get_client_mock().create_task.assert_called_once()
+    ((_parent, called_task), _kwargs) = get_client_mock().create_task.call_args
+    self.assertEqual(called_task, task)
diff --git a/features/userhotlists.py b/features/userhotlists.py
new file mode 100644
index 0000000..330ab73
--- /dev/null
+++ b/features/userhotlists.py
@@ -0,0 +1,83 @@
+# 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
+
+"""Page for showing a user's hotlists."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import ezt
+
+from features import features_bizobj
+from features import hotlist_views
+from framework import framework_views
+from framework import servlet
+
+
+class UserHotlists(servlet.Servlet):
+  """Servlet to display all of a user's hotlists."""
+
+  _PAGE_TEMPLATE = 'features/user-hotlists.ezt'
+
+  def GatherPageData(self, mr):
+    viewed_users_hotlists = self.services.features.GetHotlistsByUserID(
+        mr.cnxn, mr.viewed_user_auth.user_id)
+
+    viewed_starred_hids = self.services.hotlist_star.LookupStarredItemIDs(
+        mr.cnxn, mr.viewed_user_auth.user_id)
+    viewed_users_starred_hotlists, _ = self.services.features.GetHotlistsByID(
+        mr.cnxn, viewed_starred_hids)
+
+    viewed_users_relevant_hotlists = viewed_users_hotlists + list(
+        set(viewed_users_starred_hotlists.values()) -
+        set(viewed_users_hotlists))
+
+    users_by_id = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user,
+        features_bizobj.UsersInvolvedInHotlists(viewed_users_relevant_hotlists))
+
+    views = [hotlist_views.HotlistView(
+        hotlist_pb, mr.perms, mr.auth, mr.viewed_user_auth.user_id,
+        users_by_id, self.services.hotlist_star.IsItemStarredBy(
+            mr.cnxn, hotlist_pb.hotlist_id, mr.auth.user_id))
+        for hotlist_pb in viewed_users_relevant_hotlists]
+
+    # visible to viewer, not viewed_user
+    visible_hotlists = [view for view in views if view.visible]
+
+    owner_of_hotlists = [hotlist_view for hotlist_view in visible_hotlists
+                         if hotlist_view.role_name == 'owner']
+    editor_of_hotlists = [hotlist_view for hotlist_view in visible_hotlists
+                          if hotlist_view.role_name == 'editor']
+    follower_of_hotlists = [hotlist_view for hotlist_view in visible_hotlists
+                         if hotlist_view.role_name == '']
+    starred_hotlists = [hotlist_view for hotlist_view in visible_hotlists
+                        if hotlist_view.hotlist_id in viewed_starred_hids]
+
+    viewed_user_display_name = framework_views.GetViewedUserDisplayName(mr)
+
+    return {
+        'user_tab_mode': 'st6',
+        'viewed_user_display_name': viewed_user_display_name,
+        'owner_of_hotlists': owner_of_hotlists,
+        'editor_of_hotlists': editor_of_hotlists,
+        'follower_of_hotlists': follower_of_hotlists,
+        'starred_hotlists': starred_hotlists,
+        'viewing_user_page': ezt.boolean(True),
+        }
+
+  def GatherHelpData(self, mr, page_data):
+    """Return a dict of values to drive on-page user help.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+      page_data: Dictionary of base and page template data.
+
+    Returns:
+      A dict of values to drive on-page user help, to be added to page_data.
+    """
+    help_data = super(UserHotlists, self).GatherHelpData(mr, page_data)
+    help_data['cue'] = 'explain_hotlist_starring'
+    return help_data
diff --git a/framework/__init__.py b/framework/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/framework/__init__.py
@@ -0,0 +1 @@
+
diff --git a/framework/alerts.py b/framework/alerts.py
new file mode 100644
index 0000000..1d24f77
--- /dev/null
+++ b/framework/alerts.py
@@ -0,0 +1,57 @@
+# 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
+
+"""Helpers for showing alerts at the top of the page.
+
+These alerts are then displayed by alerts.ezt.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+
+import ezt
+
+# Expiration time for special features of timestamped links.
+# This is not for security, just for informational messages that
+# make sense in the context of a user session, but that should
+# not appear days later if the user follows a bookmarked link.
+_LINK_EXPIRATION_SEC = 8
+
+
+class AlertsView(object):
+  """EZT object for showing alerts at the top of the page."""
+
+  def __init__(self, mr):
+    # Used to show message confirming item was updated
+    self.updated = mr.GetIntParam('updated')
+
+    # Used to show message confirming item was moved and the location of the new
+    # item.
+    self.moved_to_project = mr.GetParam('moved_to_project')
+    self.moved_to_id = mr.GetIntParam('moved_to_id')
+    self.moved = self.moved_to_project and self.moved_to_id
+
+    # Used to show message confirming item was copied and the location of the
+    # new item.
+    self.copied_from_id = mr.GetIntParam('copied_from_id')
+    self.copied_to_project = mr.GetParam('copied_to_project')
+    self.copied_to_id = mr.GetIntParam('copied_to_id')
+    self.copied = self.copied_to_project and self.copied_to_id
+
+    # Used to show message confirming items deleted
+    self.deleted = mr.GetParam('deleted')
+
+    # If present, we will show message confirming that data was saved
+    self.saved = mr.GetParam('saved')
+
+    link_generation_timestamp = mr.GetIntParam('ts', default_value=0)
+    now = int(time.time())
+    ts_links_are_valid = now - link_generation_timestamp < _LINK_EXPIRATION_SEC
+
+    show_alert = ts_links_are_valid and (
+        self.updated or self.moved or self.copied or self.deleted or self.saved)
+    self.show = ezt.boolean(show_alert)
diff --git a/framework/authdata.py b/framework/authdata.py
new file mode 100644
index 0000000..3c1bee9
--- /dev/null
+++ b/framework/authdata.py
@@ -0,0 +1,145 @@
+# 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
+
+"""Classes to hold information parsed from a request.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from google.appengine.api import users
+
+from proto import user_pb2
+from framework import framework_bizobj
+from framework import framework_views
+
+
+class AuthData(object):
+  """This object holds authentication data about a user.
+
+  This is used by MonorailRequest as it determines which user the
+  requester is authenticated as and fetches the user's data.  It can
+  also be used to lookup perms for user IDs specified in issue fields.
+
+  Attributes:
+    user_id: The user ID of the user (or 0 if not signed in).
+    effective_ids: A set of user IDs that includes the signed in user's
+        direct user ID and the user IDs of all their user groups.
+        This set will be empty for anonymous users.
+    user_view: UserView object for the signed-in user.
+    user_pb: User object for the signed-in user.
+    email: email address for the user, or None.
+  """
+
+  def __init__(self, user_id=0, email=None):
+    self.user_id = user_id
+    self.effective_ids = {user_id} if user_id else set()
+    self.user_view = None
+    self.user_pb = user_pb2.MakeUser(user_id)
+    self.email = email
+
+  @classmethod
+  def FromRequest(cls, cnxn, services):
+    """Determine auth information from the request and fetches user data.
+
+    If everything works and the user is signed in, then all of the public
+    attributes of the AuthData instance will be filled in appropriately.
+
+    Args:
+      cnxn: connection to the SQL database.
+      services: Interface to all persistence storage backends.
+
+    Returns:
+      A new AuthData object.
+    """
+    user = users.get_current_user()
+    if user is None:
+      return cls()
+    else:
+      # We create a User row for each user who visits the site.
+      # TODO(jrobbins): we should really only do it when they take action.
+      return cls.FromEmail(cnxn, user.email(), services, autocreate=True)
+
+  @classmethod
+  def FromEmail(cls, cnxn, email, services, autocreate=False):
+    """Determine auth information for the given user email address.
+
+    Args:
+      cnxn: monorail connection to the database.
+      email: string email address of the user.
+      services: connections to backend servers.
+      autocreate: set to True to create a new row in the Users table if needed.
+
+    Returns:
+      A new AuthData object.
+
+    Raises:
+      execptions.NoSuchUserException: If the user of the email does not exist.
+    """
+    auth = cls()
+    auth.email = email
+    if email:
+      auth.user_id = services.user.LookupUserID(
+          cnxn, email, autocreate=autocreate)
+      assert auth.user_id
+      cls._FinishInitialization(cnxn, auth, services, user_pb=None)
+
+    return auth
+
+  @classmethod
+  def FromUserID(cls, cnxn, user_id, services):
+    """Determine auth information for the given user ID.
+
+    Args:
+      cnxn: monorail connection to the database.
+      user_id: int user ID of the user.
+      services: connections to backend servers.
+
+    Returns:
+      A new AuthData object.
+    """
+    auth = cls()
+    auth.user_id = user_id
+    if auth.user_id:
+      auth.email = services.user.LookupUserEmail(cnxn, user_id)
+      cls._FinishInitialization(cnxn, auth, services, user_pb=None)
+
+    return auth
+
+  @classmethod
+  def FromUser(cls, cnxn, user, services):
+    """Determine auth information for the given user.
+
+    Args:
+      cnxn: monorail connection to the database.
+      user: user protobuf.
+      services: connections to backend servers.
+
+    Returns:
+      A new AuthData object.
+    """
+    auth = cls()
+    auth.user_id = user.user_id
+    if auth.user_id:
+      auth.email = user.email
+      cls._FinishInitialization(cnxn, auth, services, user)
+
+    return auth
+
+
+  @classmethod
+  def _FinishInitialization(cls, cnxn, auth, services, user_pb=None):
+    """Fill in the test of the fields based on the user_id."""
+    effective_ids_dict = framework_bizobj.GetEffectiveIds(
+        cnxn, services, [auth.user_id])
+    auth.effective_ids = effective_ids_dict[auth.user_id]
+    auth.user_pb = user_pb or services.user.GetUser(cnxn, auth.user_id)
+    if auth.user_pb:
+      auth.user_view = framework_views.UserView(auth.user_pb)
+
+  def __repr__(self):
+    """Return a string more useful for debugging."""
+    return 'AuthData(email=%r, user_id=%r, effective_ids=%r)' % (
+        self.email, self.user_id, self.effective_ids)
diff --git a/framework/banned.py b/framework/banned.py
new file mode 100644
index 0000000..cb0e220
--- /dev/null
+++ b/framework/banned.py
@@ -0,0 +1,54 @@
+# 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
+
+"""A class to display the a message explaining that the user has been banned.
+
+We can ban a user for anti-social behavior.  We indicate that the user is
+banned by adding a 'banned' field to their User PB in the DB.  Whenever
+a user with a banned indicator visits any page, AssertBasePermission()
+checks has_banned and redirects to this page.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+import ezt
+
+from framework import permissions
+from framework import servlet
+
+
+class Banned(servlet.Servlet):
+  """The Banned page shows a message explaining that the user is banned."""
+
+  _PAGE_TEMPLATE = 'framework/banned-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    """Allow banned users to see this page, and prevent non-banned users."""
+    # Note, we do not call Servlet.AssertBasePermission because
+    # that would redirect banned users here again in an endless loop.
+
+    # We only show this page to users who are banned.  If a non-banned user
+    # follows a link to this URL, don't show the banned message, because that
+    # would lead to a big misunderstanding.
+    if not permissions.IsBanned(mr.auth.user_pb, mr.auth.user_view):
+      logging.info('non-banned user: %s', mr.auth.user_pb)
+      self.abort(404)
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    # Aside from plus-addresses, we do not display the specific
+    # reason for banning.
+    is_plus_address = '+' in (mr.auth.user_pb.email or '')
+
+    return {
+        'is_plus_address': ezt.boolean(is_plus_address),
+
+        # Make the "Sign Out" link just sign out, don't try to bring the
+        # user back to this page after they sign out.
+        'currentPageURLEncoded': None,
+        }
diff --git a/framework/clientmon.py b/framework/clientmon.py
new file mode 100644
index 0000000..cc4917c
--- /dev/null
+++ b/framework/clientmon.py
@@ -0,0 +1,52 @@
+# 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
+
+"""A class to log client-side javascript error reports.
+
+Updates frontend/js_errors ts_mon metric.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import json
+import logging
+
+from framework import jsonfeed
+
+from infra_libs import ts_mon
+
+class ClientMonitor(jsonfeed.JsonFeed):
+  """JSON feed to track client side js errors in ts_mon."""
+
+  js_errors = ts_mon.CounterMetric('frontend/js_errors',
+      'Number of uncaught client-side JS errors.',
+      None)
+
+  def HandleRequest(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+
+    post_data = mr.request.POST
+    errors = post_data.get('errors')
+    try:
+      errors = json.loads(errors)
+
+      total_errors = 0
+      for error_key in errors:
+        total_errors += errors[error_key]
+      logging.error('client monitor report (%d): %s', total_errors,
+          post_data.get('errors'))
+      self.js_errors.increment_by(total_errors)
+    except Exception as e:
+      logging.error('Problem processing client monitor report: %r', e)
+
+    return {}
diff --git a/framework/cloud_tasks_helpers.py b/framework/cloud_tasks_helpers.py
new file mode 100644
index 0000000..a00fa0d
--- /dev/null
+++ b/framework/cloud_tasks_helpers.py
@@ -0,0 +1,99 @@
+# Copyright 2020 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.
+"""A helper module for interfacing with google cloud tasks.
+
+This module wraps Gooogle Cloud Tasks, link to its documentation:
+https://googleapis.dev/python/cloudtasks/1.3.0/gapic/v2/api.html
+"""
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+import logging
+import urllib
+
+from google.api_core import exceptions
+from google.api_core import retry
+
+import settings
+
+if not settings.unit_test_mode:
+  import grpc
+  from google.cloud import tasks
+
+_client = None
+# Default exponential backoff retry config for enqueueing, not to be confused
+# with retry config for dispatching, which exists per queue.
+_DEFAULT_RETRY = retry.Retry(initial=.1, maximum=1.6, multiplier=2, deadline=10)
+
+
+def _get_client():
+  # type: () -> tasks.CloudTasksClient
+  """Returns a cloud tasks client."""
+  global _client
+  if not _client:
+    if settings.local_mode:
+      _client = tasks.CloudTasksClient(
+          channel=grpc.insecure_channel(settings.CLOUD_TASKS_EMULATOR_ADDRESS))
+    else:
+      _client = tasks.CloudTasksClient()
+  return _client
+
+
+def create_task(task, queue='default', **kwargs):
+  # type: (Union[dict, tasks.types.Task], str, **Any) ->
+  #     tasks.types.Task
+  """Tries and catches creating a cloud task.
+
+  This exposes a simplied task creation interface by wrapping
+  tasks.CloudTasksClient.create_task; see its documentation:
+  https://googleapis.dev/python/cloudtasks/1.5.0/gapic/v2/api.html#google.cloud.tasks_v2.CloudTasksClient.create_task
+
+  Args:
+    task: A dict or Task describing the task to add.
+    queue: A string indicating name of the queue to add task to.
+    kwargs: Additional arguments to pass to cloud task client's create_task
+
+  Returns:
+    Successfully created Task object.
+
+  Raises:
+    AttributeError: If input task is malformed or missing attributes.
+    google.api_core.exceptions.GoogleAPICallError: If the request failed for any
+        reason.
+    google.api_core.exceptions.RetryError: If the request failed due to a
+        retryable error and retry attempts failed.
+    ValueError: If the parameters are invalid.
+  """
+  client = _get_client()
+
+  parent = client.queue_path(
+      settings.app_id, settings.CLOUD_TASKS_REGION, queue)
+  target = task.get('app_engine_http_request').get('relative_uri')
+  kwargs.setdefault('retry', _DEFAULT_RETRY)
+  logging.info('Enqueueing %s task to %s', target, parent)
+  return client.create_task(parent, task, **kwargs)
+
+
+def generate_simple_task(url, params):
+  # type: (str, dict) -> dict
+  """Construct a basic cloud tasks Task for an appengine handler.
+  Args:
+    url: Url path that handles the task.
+    params: Url query parameters dict.
+
+  Returns:
+    Dict representing a cloud tasks Task object.
+  """
+  return {
+      'app_engine_http_request':
+          {
+              'relative_uri': url,
+              'body': urllib.urlencode(params),
+              'headers': {
+                  'Content-type': 'application/x-www-form-urlencoded'
+              }
+          }
+  }
diff --git a/framework/csp_report.py b/framework/csp_report.py
new file mode 100644
index 0000000..83e3126
--- /dev/null
+++ b/framework/csp_report.py
@@ -0,0 +1,22 @@
+# 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
+
+"""Servlet for Content Security Policy violation reporting.
+See http://www.html5rocks.com/en/tutorials/security/content-security-policy/
+for more information on how this mechanism works.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import webapp2
+import logging
+
+
+class CSPReportPage(webapp2.RequestHandler):
+  """CSPReportPage serves CSP violation reports."""
+
+  def post(self):
+    logging.error('CSP Violation: %s' % self.request.body)
diff --git a/framework/csv_helpers.py b/framework/csv_helpers.py
new file mode 100644
index 0000000..3dd10c7
--- /dev/null
+++ b/framework/csv_helpers.py
@@ -0,0 +1,74 @@
+# 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
+
+"""Helper functions for creating CSV pagedata."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import types
+
+from framework import framework_helpers
+
+
+# Whenever the user request one of these columns, we replace it with the
+# list of alternate columns.  In effect, we split the requested column
+# into two CSV columns.
+_CSV_COLS_TO_REPLACE = {
+    'summary': ['Summary', 'AllLabels'],
+    'opened': ['Opened', 'OpenedTimestamp'],
+    'closed': ['Closed', 'ClosedTimestamp'],
+    'modified': ['Modified', 'ModifiedTimestamp'],
+    'ownermodified': ['OwnerModified', 'OwnerModifiedTimestamp'],
+    'statusmodified': ['StatusModified', 'StatusModifiedTimestamp'],
+    'componentmodified': ['ComponentModified', 'ComponentModifiedTimestamp'],
+    'ownerlastvisit': ['OwnerLastVisit', 'OwnerLastVisitDaysAgo'],
+    }
+
+
+def RewriteColspec(col_spec):
+  """Rewrite the given colspec to expand special CSV columns."""
+  new_cols = []
+
+  for col in col_spec.split():
+    rewriten_cols = _CSV_COLS_TO_REPLACE.get(col.lower(), [col])
+    new_cols.extend(rewriten_cols)
+
+  return ' '.join(new_cols)
+
+
+def ReformatRowsForCSV(mr, page_data, url_path):
+  """Rewrites/adds to the given page_data so the CSV templates can use it."""
+  # CSV files are at risk for the PDF content sniffing by Acrobat Reader
+  page_data['prevent_sniffing'] = True
+
+  # If we're truncating the results, add a URL to the next page of results
+  page_data['next_csv_link'] = None
+  pagination = page_data['pagination']
+  if pagination.next_url:
+    page_data['next_csv_link'] = framework_helpers.FormatAbsoluteURL(
+        mr, url_path, start=pagination.last)
+    page_data['item_count'] = pagination.last - pagination.start + 1
+
+  for row in page_data['table_data']:
+    for cell in row.cells:
+      for value in cell.values:
+        value.item = EscapeCSV(value.item)
+  return page_data
+
+
+def EscapeCSV(s):
+  """Return a version of string S that is safe as part of a CSV file."""
+  if s is None:
+    return ''
+  if isinstance(s, types.StringTypes):
+    s = s.strip().replace('"', '""')
+    # Prefix any formula cells because some spreadsheets have built-in
+    # formila functions that can actually have side-effects on the user's
+    # computer.
+    if s.startswith(('=', '-', '+', '@')):
+      s = "'" + s
+
+  return s
diff --git a/framework/deleteusers.py b/framework/deleteusers.py
new file mode 100644
index 0000000..0c23ac5
--- /dev/null
+++ b/framework/deleteusers.py
@@ -0,0 +1,139 @@
+# Copyright 2019 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.
+
+"""Cron and task handlers for syncing with wipeoute-lite and deleting users."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import json
+import logging
+import httplib2
+
+from google.appengine.api import app_identity
+
+from businesslogic import work_env
+from framework import cloud_tasks_helpers
+from framework import framework_constants
+from framework import jsonfeed
+from framework import urls
+from oauth2client.client import GoogleCredentials
+
+WIPEOUT_ENDPOINT = 'https://emporia-pa.googleapis.com/v1/apps/%s'
+MAX_BATCH_SIZE = 10000
+MAX_DELETE_USERS_SIZE = 1000
+
+
+def authorize():
+  credentials = GoogleCredentials.get_application_default()
+  credentials = credentials.create_scoped(framework_constants.OAUTH_SCOPE)
+  return credentials.authorize(httplib2.Http(timeout=60))
+
+
+class WipeoutSyncCron(jsonfeed.InternalTask):
+  """Enqueue tasks for sending user lists to wipeout-lite and deleting deleted
+     users fetched from wipeout-lite."""
+
+  def HandleRequest(self, mr):
+    batch_param = mr.GetIntParam('batchsize', default_value=MAX_BATCH_SIZE)
+    # Use batch_param as batch_size unless it is None or 0.
+    batch_size = min(batch_param, MAX_BATCH_SIZE)
+    total_users = self.services.user.TotalUsersCount(mr.cnxn)
+    total_batches = int(total_users / batch_size)
+    # Add an extra batch to process remainder user emails.
+    if total_users % batch_size:
+      total_batches += 1
+    if not total_batches:
+      logging.info('No users to report.')
+      return
+
+    for i in range(total_batches):
+      params = dict(limit=batch_size, offset=i * batch_size)
+      task = cloud_tasks_helpers.generate_simple_task(
+          urls.SEND_WIPEOUT_USER_LISTS_TASK + '.do', params)
+      cloud_tasks_helpers.create_task(
+          task, queue=framework_constants.QUEUE_SEND_WIPEOUT_USER_LISTS)
+
+    task = cloud_tasks_helpers.generate_simple_task(
+        urls.DELETE_WIPEOUT_USERS_TASK + '.do', {})
+    cloud_tasks_helpers.create_task(
+        task, queue=framework_constants.QUEUE_FETCH_WIPEOUT_DELETED_USERS)
+
+
+class SendWipeoutUserListsTask(jsonfeed.InternalTask):
+  """Sends a batch of monorail users to wipeout-lite."""
+
+  def HandleRequest(self, mr):
+    limit = mr.GetIntParam('limit')
+    assert limit != None, 'Missing param limit'
+    offset = mr.GetIntParam('offset')
+    assert offset != None, 'Missing param offset'
+    emails = self.services.user.GetAllUserEmailsBatch(
+        mr.cnxn, limit=limit, offset=offset)
+    accounts = [{'id': email} for email in emails]
+    service = authorize()
+    self.sendUserLists(service, accounts)
+
+  def sendUserLists(self, service, accounts):
+    app_id = app_identity.get_application_id()
+    endpoint = WIPEOUT_ENDPOINT % app_id
+    resp, data = service.request(
+        '%s/verifiedaccounts' % endpoint,
+        method='POST',
+        headers={'Content-Type': 'application/json; charset=UTF-8'},
+        body=json.dumps(accounts))
+    logging.info(
+        'Received response, %s with contents, %s', resp, data)
+
+
+class DeleteWipeoutUsersTask(jsonfeed.InternalTask):
+  """Fetches deleted users from wipeout-lite and enqueues tasks to delete
+     those users from Monorail's DB."""
+
+  def HandleRequest(self, mr):
+    limit = mr.GetIntParam('limit', MAX_DELETE_USERS_SIZE)
+    limit = min(limit, MAX_DELETE_USERS_SIZE)
+    service = authorize()
+    deleted_user_data = self.fetchDeletedUsers(service)
+    deleted_emails = [user_object['id'] for user_object in deleted_user_data]
+    total_batches = int(len(deleted_emails) / limit)
+    if len(deleted_emails) % limit:
+      total_batches += 1
+
+    for i in range(total_batches):
+      start = i * limit
+      end = start + limit
+      params = dict(emails=','.join(deleted_emails[start:end]))
+      task = cloud_tasks_helpers.generate_simple_task(
+          urls.DELETE_USERS_TASK + '.do', params)
+      cloud_tasks_helpers.create_task(
+          task, queue=framework_constants.QUEUE_DELETE_USERS)
+
+  def fetchDeletedUsers(self, service):
+    app_id = app_identity.get_application_id()
+    endpoint = WIPEOUT_ENDPOINT % app_id
+    resp, data = service.request(
+        '%s/deletedaccounts' % endpoint,
+        method='GET',
+        headers={'Content-Type': 'application/json; charset=UTF-8'})
+    logging.info(
+        'Received response, %s with contents, %s', resp, data)
+    return json.loads(data)
+
+
+class DeleteUsersTask(jsonfeed.InternalTask):
+  """Deletes users from Monorail's DB."""
+
+  def HandleRequest(self, mr):
+    """Delete users with the emails given in the 'emails' param."""
+    emails = mr.GetListParam('emails', default_value=[])
+    assert len(emails) <= MAX_DELETE_USERS_SIZE, (
+        'We cannot delete more than %d users at once, current users: %d' %
+        (MAX_DELETE_USERS_SIZE, len(emails)))
+    if len(emails) == 0:
+      logging.info("No user emails found in deletion request")
+      return
+    with work_env.WorkEnv(mr, self.services) as we:
+      we.ExpungeUsers(emails, check_perms=False)
diff --git a/framework/emailfmt.py b/framework/emailfmt.py
new file mode 100644
index 0000000..2933fea
--- /dev/null
+++ b/framework/emailfmt.py
@@ -0,0 +1,422 @@
+# 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
+
+"""Functions that format or parse email messages in Monorail.
+
+Specifically, this module has the logic for generating various email
+header lines that help match inbound and outbound email to the project
+and artifact that generated it.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import hmac
+import logging
+import re
+import rfc822
+
+import six
+
+from google.appengine.api import app_identity
+
+import settings
+from framework import framework_constants
+from services import client_config_svc
+from services import secrets_svc
+
+# TODO(jrobbins): Parsing very large messages is slow, and we are not going
+# to handle attachments at first, so there is no reason to consider large
+# emails.
+MAX_BODY_SIZE = 100 * 1024
+MAX_HEADER_CHARS_CONSIDERED = 255
+
+
+def _checkEmailHeaderPrefix(key):
+  """Ensures that a given email header starts with X-Alert2Monorail prefix."""
+  # this is to catch typos in the email header prefix and raises an exception
+  # during package loading time.
+  assert key.startswith('X-Alert2Monorail')
+  return key
+
+
+class AlertEmailHeader(object):
+  """A list of the email header keys supported by Alert2Monorail."""
+  # pylint: disable=bad-whitespace
+  #
+  # The prefix has been hard-coded without string substitution to make them
+  # searchable with the header keys.
+  INCIDENT_ID = 'X-Incident-Id'
+  OWNER       = _checkEmailHeaderPrefix('X-Alert2Monorail-owner')
+  CC          = _checkEmailHeaderPrefix('X-Alert2Monorail-cc')
+  PRIORITY    = _checkEmailHeaderPrefix('X-Alert2Monorail-priority')
+  STATUS      = _checkEmailHeaderPrefix('X-Alert2Monorail-status')
+  COMPONENT   = _checkEmailHeaderPrefix('X-Alert2Monorail-component')
+  OS          = _checkEmailHeaderPrefix('X-Alert2Monorail-os')
+  TYPE        = _checkEmailHeaderPrefix('X-Alert2Monorail-type')
+  LABEL       = _checkEmailHeaderPrefix('X-Alert2Monorail-label')
+
+
+def IsBodyTooBigToParse(body):
+  """Return True if the email message body is too big to process."""
+  return len(body) > MAX_BODY_SIZE
+
+
+def IsProjectAddressOnToLine(project_addr, to_addrs):
+  """Return True if an email was explicitly sent directly to us."""
+  return project_addr in to_addrs
+
+
+def ParseEmailMessage(msg):
+  """Parse the given MessageRouterMessage and return relevant fields.
+
+  Args:
+    msg: email.message.Message object for the email message sent to us.
+
+  Returns:
+    A tuple: from_addr, to_addrs, cc_addrs, references,
+    incident_id, subject, body.
+  """
+  # Ignore messages that are probably not from humans, see:
+  # http://google.com/search?q=precedence+bulk+junk
+  precedence = msg.get('precedence', '')
+  if precedence.lower() in ['bulk', 'junk']:
+    logging.info('Precedence: %r indicates an autoresponder', precedence)
+    return '', [], [], '', '', '', ''
+
+  from_addrs = _ExtractAddrs(msg.get('from', ''))
+  if from_addrs:
+    from_addr = from_addrs[0]
+  else:
+    from_addr = ''
+
+  to_addrs = _ExtractAddrs(msg.get('to', ''))
+  cc_addrs = _ExtractAddrs(msg.get('cc', ''))
+
+  in_reply_to = msg.get('in-reply-to', '')
+  incident_id = msg.get(AlertEmailHeader.INCIDENT_ID, '')
+  references = msg.get('references', '').split()
+  references = list({ref for ref in [in_reply_to] + references if ref})
+  subject = _StripSubjectPrefixes(msg.get('subject', ''))
+
+  body = u''
+  for part in msg.walk():
+    # We only process plain text emails.
+    if part.get_content_type() == 'text/plain':
+      body = part.get_payload(decode=True)
+      if not isinstance(body, six.text_type):
+        body = body.decode('utf-8')
+      break  # Only consider the first text part.
+
+  return (from_addr, to_addrs, cc_addrs, references, incident_id, subject,
+          body)
+
+
+def _ExtractAddrs(header_value):
+  """Given a message header value, return email address found there."""
+  friendly_addr_pairs = list(rfc822.AddressList(header_value))
+  return [addr for _friendly, addr in friendly_addr_pairs]
+
+
+def _StripSubjectPrefixes(subject):
+  """Strip off any 'Re:', 'Fwd:', etc. subject line prefixes."""
+  prefix = _FindSubjectPrefix(subject)
+  while prefix:
+    subject = subject[len(prefix):].strip()
+    prefix = _FindSubjectPrefix(subject)
+
+  return subject
+
+
+def _FindSubjectPrefix(subject):
+  """If the given subject starts with a prefix, return that prefix."""
+  for prefix in ['re:', 'aw:', 'fwd:', 'fw:']:
+    if subject.lower().startswith(prefix):
+      return prefix
+
+  return None
+
+
+def MailDomain():
+  """Return the domain name where this app can recieve email."""
+  if settings.unit_test_mode:
+    return 'testbed-test.appspotmail.com'
+
+  # If running on a GAFYD domain, you must define an app alias on the
+  # Application Settings admin web page.  If you cannot reserve the matching
+  # APP_ID for the alias, then specify it in settings.mail_domain.
+  if settings.mail_domain:
+    return settings.mail_domain
+
+  app_id = app_identity.get_application_id()
+  if ':' in app_id:
+    app_id = app_id.split(':')[-1]
+
+  return '%s.appspotmail.com' % app_id
+
+
+def FormatFriendly(commenter_view, sender, reveal_addr):
+  """Format the From: line to include the commenter's friendly name if given."""
+  if commenter_view:
+    site_name = settings.site_name.lower()
+    if commenter_view.email in client_config_svc.GetServiceAccountMap():
+      friendly = commenter_view.display_name
+    elif reveal_addr:
+      friendly = commenter_view.email
+    else:
+      friendly = u'%s\u2026@%s' % (
+          commenter_view.obscured_username, commenter_view.domain)
+    if '@' in sender:
+      sender_username, sender_domain = sender.split('@', 1)
+      sender = '%s+v2.%d@%s' % (
+          sender_username, commenter_view.user_id, sender_domain)
+      friendly = friendly.split('@')[0]
+    return '%s via %s <%s>' % (friendly, site_name, sender)
+  else:
+    return sender
+
+
+def NoReplyAddress(commenter_view=None, reveal_addr=False):
+  """Return an address that ignores all messages sent to it."""
+  # Note: We use "no_reply" with an underscore to avoid potential conflict
+  # with any project name.  Project names cannot have underscores.
+  # Note: This does not take branded domains into account, but this address
+  # is only used for email error messages and in the reply-to address
+  # when the user is not allowed to reply.
+  sender = 'no_reply@%s' % MailDomain()
+  return FormatFriendly(commenter_view, sender, reveal_addr)
+
+
+def FormatFromAddr(project, commenter_view=None, reveal_addr=False,
+                   can_reply_to=True):
+  """Return a string to be used on the email From: line.
+
+  Args:
+    project: Project PB for the project that the email is sent from.
+    commenter_view: Optional UserView of the user who made a comment.  We use
+        the user's (potentially obscured) email address as their friendly name.
+    reveal_addr: Optional bool. If False then the address is obscured.
+    can_reply_to: Optional bool. If True then settings.send_email_as is used,
+        otherwise settings.send_noreply_email_as is used.
+
+  Returns:
+    A string that should be used in the From: line of outbound email
+    notifications for the given project.
+  """
+  addr_format = (settings.send_email_as_format if can_reply_to
+                 else settings.send_noreply_email_as_format)
+  domain = settings.branded_domains.get(
+      project.project_name, settings.branded_domains.get('*'))
+  domain = domain or 'chromium.org'
+  if domain.count('.') > 1:
+    domain = '.'.join(domain.split('.')[-2:])
+  addr = addr_format % {'domain': domain}
+  return FormatFriendly(commenter_view, addr, reveal_addr)
+
+
+def NormalizeHeader(s):
+  """Make our message-ids robust against mail client spacing and truncation."""
+  words = _StripSubjectPrefixes(s).split()  # Split on any runs of whitespace.
+  normalized = ' '.join(words)
+  truncated = normalized[:MAX_HEADER_CHARS_CONSIDERED]
+  return truncated
+
+
+def MakeMessageID(to_addr, subject, from_addr):
+  """Make a unique (but deterministic) email Message-Id: value."""
+  normalized_subject = NormalizeHeader(subject)
+  if isinstance(normalized_subject, six.text_type):
+    normalized_subject = normalized_subject.encode('utf-8')
+  mail_hmac_key = secrets_svc.GetEmailKey()
+  return '<0=%s=%s=%s@%s>' % (
+      hmac.new(mail_hmac_key, to_addr).hexdigest(),
+      hmac.new(mail_hmac_key, normalized_subject).hexdigest(),
+      from_addr.split('@')[0],
+      MailDomain())
+
+
+def GetReferences(to_addr, subject, seq_num, project_from_addr):
+  """Make a References: header to make this message thread properly.
+
+  Args:
+    to_addr: address that email message will be sent to.
+    subject: subject line of email message.
+    seq_num: sequence number of message in thread, e.g., 0, 1, 2, ...,
+        or None if the message is not part of a thread.
+    project_from_addr: address that the message will be sent from.
+
+  Returns:
+    A string Message-ID that does not correspond to any actual email
+    message that was ever sent, but it does serve to unite all the
+    messages that belong togther in a thread.
+  """
+  if seq_num is not None:
+    return MakeMessageID(to_addr, subject, project_from_addr)
+  else:
+    return ''
+
+
+def ValidateReferencesHeader(message_ref, project, from_addr, subject):
+  """Check that the References header is one that we could have sent.
+
+  Args:
+    message_ref: one of the References header values from the inbound email.
+    project: Project PB for the affected project.
+    from_addr: string email address that inbound email was sent from.
+    subject: string base subject line of inbound email.
+
+  Returns:
+    True if it looks like this is a reply to a message that we sent
+    to the same address that replied.  Otherwise, False.
+  """
+  sender = '%s@%s' % (project.project_name, MailDomain())
+  expected_ref = MakeMessageID(from_addr, subject, sender)
+
+  # TODO(jrobbins): project option to not check from_addr.
+  # TODO(jrobbins): project inbound auth token.
+  return expected_ref == message_ref
+
+
+PROJECT_EMAIL_RE = re.compile(
+    r'(?P<project>[-a-z0-9]+)'
+    r'(\+(?P<verb>[a-z0-9]+)(\+(?P<label>[a-z0-9-]+))?)?'
+    r'@(?P<domain>[-a-z0-9.]+)')
+
+ISSUE_CHANGE_SUBJECT_RE = re.compile(
+    r'Issue (?P<local_id>[0-9]+) in '
+    r'(?P<project>[-a-z0-9]+): '
+    r'(?P<summary>.+)')
+
+ISSUE_CHANGE_COMPACT_SUBJECT_RE = re.compile(
+    r'(?P<project>[-a-z0-9]+):'
+    r'(?P<local_id>[0-9]+): '
+    r'(?P<summary>.+)')
+
+
+def IdentifyIssue(project_name, subject):
+  """Parse the artifact id from a reply and verify it is a valid issue.
+
+  Args:
+    project_name: string the project to search for the issue in.
+    subject: string email subject line received, it must match the one
+        sent.  Leading prefixes like "Re:" should already have been stripped.
+
+  Returns:
+    An int local_id for the id of the issue. None if no id is found or the id
+    is not valid.
+  """
+
+  issue_project_name, local_id_str = _MatchSubject(subject)
+
+  if project_name != issue_project_name:
+    # Something is wrong with the project name.
+    return None
+
+  logging.info('project_name = %r', project_name)
+  logging.info('local_id_str = %r', local_id_str)
+
+  try:
+    local_id = int(local_id_str)
+  except (ValueError, TypeError):
+    local_id = None
+
+  return local_id
+
+
+def IdentifyProjectVerbAndLabel(project_addr):
+  # Ignore any inbound email sent to a "no_reply@" address.
+  if project_addr.startswith('no_reply@'):
+    return None, None, None
+
+  project_name = None
+  verb = None
+  label = None
+  m = PROJECT_EMAIL_RE.match(project_addr.lower())
+  if m:
+    project_name = m.group('project')
+    verb = m.group('verb')
+    label = m.group('label')
+
+  return project_name, verb, label
+
+
+def _MatchSubject(subject):
+  """Parse the project, artifact type, and artifact id from a subject line."""
+  m = (ISSUE_CHANGE_SUBJECT_RE.match(subject) or
+       ISSUE_CHANGE_COMPACT_SUBJECT_RE.match(subject))
+  if m:
+    return m.group('project'), m.group('local_id')
+
+  return None, None
+
+
+# TODO(jrobbins): For now, we strip out lines that look like quoted
+# text and then will give the user the option to see the whole email.
+# For 2.0 of this feature, we should change the Comment PB to have
+# runs of text with different properties so that the UI can present
+# "- Show quoted text -" and expand it in-line.
+
+# TODO(jrobbins): For now, we look for lines that indicate quoted
+# text (e.g., they start with ">").  But, we should also collapse
+# multiple lines that are identical to other lines in previous
+# non-deleted comments on the same issue, regardless of quote markers.
+
+
+# We cut off the message if we see something that looks like a signature and
+# it is near the bottom of the message.
+SIGNATURE_BOUNDARY_RE = re.compile(
+    r'^(([-_=]+ ?)+|'
+    r'cheers|(best |warm |kind )?regards|thx|thanks|thank you|'
+    r'Sent from my i?Phone|Sent from my iPod)'
+    r',? *$', re.I)
+
+MAX_SIGNATURE_LINES = 8
+
+FORWARD_OR_EXPLICIT_SIG_PATS = [
+  r'[^0-9a-z]+(forwarded|original) message[^0-9a-z]+\s*$',
+  r'Updates:\s*$',
+  r'Comment #\d+ on issue \d+ by \S+:',
+  # If we see this anywhere in the message, treat the rest as a signature.
+  r'--\s*$',
+  ]
+FORWARD_OR_EXPLICIT_SIG_PATS_AND_REST_RE = re.compile(
+  r'^(%s)(.|\n)*' % '|'.join(FORWARD_OR_EXPLICIT_SIG_PATS),
+  flags=re.MULTILINE | re.IGNORECASE)
+
+# This handles gmail well, and it's pretty broad without seeming like
+# it would cause false positives.
+QUOTE_PATS = [
+  r'^On .*\s+<\s*\S+?@[-a-z0-9.]+>\s*wrote:\s*$',
+  r'^On .* \S+?@[-a-z0-9.]+\s*wrote:\s*$',
+  r'^\S+?@[-a-z0-9.]+ \(\S+?@[-a-z0-9.]+\)\s*wrote:\s*$',
+  r'\S+?@[-a-z0-9]+.appspotmail.com\s.*wrote:\s*$',
+  r'\S+?@[-a-z0-9]+.appspotmail.com\s+.*a\s+\xc3\xa9crit\s*:\s*$',
+  r'^\d+/\d+/\d+ +<\S+@[-a-z0-9.]+>:?\s*$',
+  r'^>.*$',
+  ]
+QUOTED_BLOCKS_RE = re.compile(
+  r'(^\s*\n)*((%s)\n?)+(^\s*\n)*' % '|'.join(QUOTE_PATS),
+  flags=re.MULTILINE | re.IGNORECASE)
+
+
+def StripQuotedText(description):
+  """Strip all quoted text lines out of the given comment text."""
+  # If the rest of message is forwared text, we're done.
+  description = FORWARD_OR_EXPLICIT_SIG_PATS_AND_REST_RE.sub('', description)
+  # Replace each quoted block of lines and surrounding blank lines with at
+  # most one blank line.
+  description = QUOTED_BLOCKS_RE.sub('\n', description)
+
+  new_lines = description.strip().split('\n')
+  # Make another pass over the last few lines to strip out signatures.
+  sig_zone_start = max(0, len(new_lines) - MAX_SIGNATURE_LINES)
+  for idx in range(sig_zone_start, len(new_lines)):
+    line = new_lines[idx]
+    if SIGNATURE_BOUNDARY_RE.match(line):
+      # We found the likely start of a signature, just keep the lines above it.
+      new_lines = new_lines[:idx]
+      break
+
+  return '\n'.join(new_lines).strip()
diff --git a/framework/exceptions.py b/framework/exceptions.py
new file mode 100644
index 0000000..51c9951
--- /dev/null
+++ b/framework/exceptions.py
@@ -0,0 +1,184 @@
+# Copyright 2017 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
+
+"""Exception classes used throughout monorail.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+
+class ErrorAggregator():
+  """Class for holding errors and raising an exception for many."""
+
+  def __init__(self, exc_type):
+    # type: (type) -> None
+    self.exc_type = exc_type
+    self.error_messages = []
+
+  def __enter__(self):
+    return self
+
+  def __exit__(self, exc_type, exc_value, exc_traceback):
+    # If no exceptions were raised within the context, we check
+    # if any error messages were accumulated that we should raise
+    # an exception for.
+    if exc_type == None:
+      self.RaiseIfErrors()
+    # If there were exceptions raised within the context, we do
+    # nothing to suppress them.
+
+  def AddErrorMessage(self, message, *args, **kwargs):
+    # type: (str, *Any, **Any) -> None
+    """Add a new error message.
+
+    Args:
+      message: An error message, to be formatted using *args and **kwargs.
+      *args: passed in to str.format.
+      **kwargs: passed in to str.format.
+    """
+    self.error_messages.append(message.format(*args, **kwargs))
+
+  def RaiseIfErrors(self):
+    # type: () -> None
+    """If there are errors, raise one exception."""
+    if self.error_messages:
+      raise self.exc_type("\n".join(self.error_messages))
+
+
+class Error(Exception):
+  """Base class for errors from this module."""
+  pass
+
+
+class ActionNotSupported(Error):
+  """The user is trying to do something we do not support."""
+  pass
+
+
+class InputException(Error):
+  """Error in user input processing."""
+  pass
+
+
+class ProjectAlreadyExists(Error):
+  """Tried to create a project that already exists."""
+
+
+class FieldDefAlreadyExists(Error):
+  """Tried to create a custom field that already exists."""
+
+
+class ComponentDefAlreadyExists(Error):
+  """Tried to create a component that already exists."""
+
+
+class NoSuchProjectException(Error):
+  """No project with the specified name exists."""
+  pass
+
+
+class NoSuchTemplateException(Error):
+  """No template with the specified name exists."""
+  pass
+
+
+class NoSuchUserException(Error):
+  """No user with the specified name exists."""
+  pass
+
+
+class NoSuchIssueException(Error):
+  """The requested issue was not found."""
+  pass
+
+
+class NoSuchAttachmentException(Error):
+  """The requested attachment was not found."""
+  pass
+
+
+class NoSuchCommentException(Error):
+  """The requested comment was not found."""
+  pass
+
+
+class NoSuchAmendmentException(Error):
+  """The requested amendment was not found."""
+  pass
+
+
+class NoSuchComponentException(Error):
+  """No component with the specified name exists."""
+  pass
+
+
+class InvalidComponentNameException(Error):
+  """The component name is invalid."""
+  pass
+
+
+class InvalidHotlistException(Error):
+  """The specified hotlist is invalid."""
+  pass
+
+
+class NoSuchFieldDefException(Error):
+  """No field def for specified project exists."""
+  pass
+
+
+class InvalidFieldTypeException(Error):
+  """Expected field type and actual field type do not match."""
+  pass
+
+
+class NoSuchIssueApprovalException(Error):
+  """The requested approval for the issue was not found."""
+  pass
+
+
+class CircularGroupException(Error):
+  """Circular nested group exception."""
+  pass
+
+
+class GroupExistsException(Error):
+  """Group already exists exception."""
+  pass
+
+
+class NoSuchGroupException(Error):
+  """Requested group was not found exception."""
+  pass
+
+
+class InvalidExternalIssueReference(Error):
+  """Improperly formatted external issue reference.
+
+  External issue references must be of the form:
+
+      $tracker_shortname/$tracker_specific_id
+
+  For example, issuetracker.google.com issues:
+
+      b/123456789
+  """
+  pass
+
+
+class PageTokenException(Error):
+  """Incorrect page tokens."""
+  pass
+
+
+class FilterRuleException(Error):
+  """Violates a filter rule that should show error."""
+  pass
+
+
+class OverAttachmentQuota(Error):
+  """Project will exceed quota if the current operation is allowed."""
+  pass
diff --git a/framework/excessiveactivity.py b/framework/excessiveactivity.py
new file mode 100644
index 0000000..3737e9a
--- /dev/null
+++ b/framework/excessiveactivity.py
@@ -0,0 +1,25 @@
+# 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
+
+"""A class to display the an error page for excessive activity.
+
+This page is shown when the user performs a given type of action
+too many times in a 24-hour period or exceeds a lifetime limit.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from framework import servlet
+
+
+class ExcessiveActivity(servlet.Servlet):
+  """ExcessiveActivity page shows an error message."""
+
+  _PAGE_TEMPLATE = 'framework/excessive-activity-page.ezt'
+
+  def GatherPageData(self, _mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    return {}
diff --git a/framework/filecontent.py b/framework/filecontent.py
new file mode 100644
index 0000000..15d2940
--- /dev/null
+++ b/framework/filecontent.py
@@ -0,0 +1,204 @@
+# 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
+
+"""Utility routines for dealing with MIME types and decoding text files."""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import itertools
+import logging
+
+from framework import framework_constants
+
+
+_EXTENSION_TO_CTYPE_TABLE = {
+    # These are images/PDFs that we trust the browser to display.
+    'gif': 'image/gif',
+    'jpg': 'image/jpeg',
+    'jpeg': 'image/jpeg',
+    'png': 'image/png',
+    'webp': 'image/webp',
+    'ico': 'image/x-icon',
+    'svg': 'image/svg+xml',
+    'pdf': 'application/pdf',
+    'ogv': 'video/ogg',
+    'mov': 'video/quicktime',
+    'mp4': 'video/mp4',
+    'mpg': 'video/mp4',
+    'mpeg': 'video/mp4',
+    'webm': 'video/webm',
+
+    # We do not serve mimetypes that cause the brower to launch a local
+    # app because that is not required for issue tracking and it is a
+    # potential security risk.
+}
+
+
+def GuessContentTypeFromFilename(filename):
+  """Guess a file's content type based on the filename extension.
+
+  Args:
+    filename: String name of a file.
+
+  Returns:
+    MIME type string to use when serving this file.  We only use text/plain for
+    text files, appropriate image content-types, or application/octet-stream
+    for virtually all binary files.  This limits the richness of the user's
+    experience, e.g., the user cannot open an MS Office application directly
+    by clicking on an attachment, but it is safer.
+  """
+  ext = filename.split('.')[-1] if ('.' in filename) else ''
+  ext = ext.lower()
+  if ext in COMMON_TEXT_FILE_EXTENSIONS:
+    return 'text/plain'
+  return _EXTENSION_TO_CTYPE_TABLE.get(ext.lower(), 'application/octet-stream')
+
+
+# Constants used in detecting if a file has binary content.
+# All line lengths must be below the upper limit, and there must be a spefic
+# ratio below the lower limit.
+_MAX_SOURCE_LINE_LEN_LOWER = 350
+_MAX_SOURCE_LINE_LEN_UPPER = 800
+_SOURCE_LINE_LEN_LOWER_RATIO = 0.9
+
+# Message to display for undecodable commit log or author values.
+UNDECODABLE_LOG_CONTENT = '[Cannot be displayed]'
+
+# How large a repository file is in bytes before we don't try to display it
+SOURCE_FILE_MAX_SIZE = 1000 * 1024
+SOURCE_FILE_MAX_LINES = 50000
+
+# The source code browser will not attempt to display any filename ending
+# with one of these extensions.
+COMMON_BINARY_FILE_EXTENSIONS = {
+    'gif', 'jpg', 'jpeg', 'psd', 'ico', 'icon', 'xbm', 'xpm', 'xwd', 'pcx',
+    'bmp', 'png', 'vsd,' 'mpg', 'mpeg', 'wmv', 'wmf', 'avi', 'flv', 'snd',
+    'mp3', 'wma', 'exe', 'dll', 'bin', 'class', 'o', 'so', 'lib', 'dylib',
+    'jar', 'ear', 'war', 'par', 'msi', 'tar', 'zip', 'rar', 'cab', 'z', 'gz',
+    'bz2', 'dmg', 'iso', 'rpm', 'pdf', 'eps', 'tif', 'tiff', 'xls', 'ppt',
+    'graffie', 'violet', 'webm', 'webp',
+    }
+
+# The source code browser will display file contents as text data for files
+# with the following extensions or exact filenames (assuming they decode
+# correctly).
+COMMON_TEXT_FILE_EXTENSIONS = (
+    set(framework_constants.PRETTIFY_CLASS_MAP.keys()) | {
+        '',
+        'ada',
+        'asan',
+        'asm',
+        'asp',
+        'bat',
+        'cgi',
+        'csv',
+        'diff',
+        'el',
+        'emacs',
+        'jsp',
+        'log',
+        'markdown',
+        'md',
+        'mf',
+        'patch',
+        'plist',
+        'properties',
+        'r',
+        'rc',
+        'txt',
+        'vim',
+        'wiki',
+        'xemacs',
+        'yacc',
+    })
+COMMON_TEXT_FILENAMES = (
+    set(framework_constants.PRETTIFY_FILENAME_CLASS_MAP.keys()) |
+    {'authors', 'install', 'readme'})
+
+
+def DecodeFileContents(file_contents, path=None):
+  """Try converting file contents to unicode using utf-8 or latin-1.
+
+  This is applicable to untrusted maybe-text from vcs files or inbound emails.
+
+  We try decoding the file as utf-8, then fall back on latin-1. In the former
+  case, we call the file a text file; in the latter case, we guess whether
+  the file is text or binary based on line length.
+
+  If we guess text when the file is binary, the user sees safely encoded
+  gibberish. If the other way around, the user sees a message that we will
+  not display the file.
+
+  TODO(jrobbins): we could try the user-supplied encoding, iff it
+  is one of the encodings that we know that we can handle.
+
+  Args:
+    file_contents: byte string from uploaded file.  It could be text in almost
+      any encoding, or binary.  We cannot trust the user-supplied encoding
+      in the mime-type property.
+    path: string pathname of file.
+
+  Returns:
+    The tuple (unicode_string, is_binary, is_long):
+      - The unicode version of the string.
+      - is_binary is true if the string could not be decoded as text.
+      - is_long is true if the file has more than SOURCE_FILE_MAX_LINES lines.
+  """
+  # If the filename is one that typically identifies a binary file, then
+  # just treat it as binary without any further analysis.
+  ext = None
+  if path and '.' in path:
+    ext = path.split('.')[-1]
+    if ext.lower() in COMMON_BINARY_FILE_EXTENSIONS:
+      # If the file is binary, we don't care about the length, since we don't
+      # show or diff it.
+      return u'', True, False
+
+  # If the string can be decoded as utf-8, we treat it as textual.
+  try:
+    u_str = file_contents.decode('utf-8', 'strict')
+    is_long = len(u_str.split('\n')) > SOURCE_FILE_MAX_LINES
+    return u_str, False, is_long
+  except UnicodeDecodeError:
+    logging.info('not a utf-8 file: %s bytes', len(file_contents))
+
+  # Fall back on latin-1. This will always succeed, since every byte maps to
+  # something in latin-1, even if that something is gibberish.
+  u_str = file_contents.decode('latin-1', 'strict')
+
+  lines = u_str.split('\n')
+  is_long = len(lines) > SOURCE_FILE_MAX_LINES
+  # Treat decodable files with certain filenames and/or extensions as text
+  # files. This avoids problems with common file types using our text/binary
+  # heuristic rules below.
+  if path:
+    name = path.split('/')[-1]
+    if (name.lower() in COMMON_TEXT_FILENAMES or
+        (ext and ext.lower() in COMMON_TEXT_FILE_EXTENSIONS)):
+      return u_str, False, is_long
+
+  # HEURISTIC: Binary files can qualify as latin-1, so we need to
+  # check further.  Any real source code is going to be divided into
+  # reasonably sized lines. All lines must be below an upper character limit,
+  # and most lines must be below a lower limit. This allows some exceptions
+  # to the lower limit, but is more restrictive than just using a single
+  # large character limit.
+  is_binary = False
+  lower_count = 0
+  for line in itertools.islice(lines, SOURCE_FILE_MAX_LINES):
+    size = len(line)
+    if size <= _MAX_SOURCE_LINE_LEN_LOWER:
+      lower_count += 1
+    elif size > _MAX_SOURCE_LINE_LEN_UPPER:
+      is_binary = True
+      break
+
+  ratio = lower_count / float(max(1, len(lines)))
+  if ratio < _SOURCE_LINE_LEN_LOWER_RATIO:
+    is_binary = True
+
+  return u_str, is_binary, is_long
diff --git a/framework/framework_bizobj.py b/framework/framework_bizobj.py
new file mode 100644
index 0000000..bacaec5
--- /dev/null
+++ b/framework/framework_bizobj.py
@@ -0,0 +1,512 @@
+# 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
+
+"""Business objects for Monorail's framework.
+
+These are classes and functions that operate on the objects that
+users care about in Monorail but that are not part of just one specific
+component: e.g., projects, users, and labels.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import functools
+import itertools
+import re
+
+import six
+
+import settings
+from framework import exceptions
+from framework import framework_constants
+from proto import tracker_pb2
+from services import client_config_svc
+
+
+# Pattern to match a valid column header name.
+RE_COLUMN_NAME = r'\w+[\w+-.]*\w+'
+
+# Compiled regexp to match a valid column specification.
+RE_COLUMN_SPEC = re.compile('(%s(\s%s)*)*$' % (RE_COLUMN_NAME, RE_COLUMN_NAME))
+
+
+def WhichUsersShareAProject(cnxn, services, user_effective_ids, other_users):
+  # type: (MonorailConnection, Services, Sequence[int],
+  #     Collection[user_pb2.User]) -> Collection[user_pb2.User]
+  """Returns a list of users that share a project with given user_effective_ids.
+
+  Args:
+    cnxn: MonorailConnection to the database.
+    services: Services object for connections to backend services.
+    user_effective_ids: The user's set of effective_ids.
+    other_users: The list of users to be filtered for email visibility.
+
+  Returns:
+    Collection of users that share a project with at least one effective_id.
+  """
+
+  projects_by_user_effective_id = services.project.GetProjectMemberships(
+      cnxn, user_effective_ids)
+  authed_user_projects = set(
+      itertools.chain.from_iterable(projects_by_user_effective_id.values()))
+
+  other_user_ids = [other_user.user_id for other_user in other_users]
+  all_other_user_effective_ids = GetEffectiveIds(cnxn, services, other_user_ids)
+  users_that_share_project = []
+  for other_user in other_users:
+    other_user_effective_ids = all_other_user_effective_ids[other_user.user_id]
+
+    # Do not filter yourself.
+    if any(uid in user_effective_ids for uid in other_user_effective_ids):
+      users_that_share_project.append(other_user)
+      continue
+
+    other_user_proj_by_effective_ids = services.project.GetProjectMemberships(
+        cnxn, other_user_effective_ids)
+    other_user_projects = itertools.chain.from_iterable(
+        other_user_proj_by_effective_ids.values())
+    if any(project in authed_user_projects for project in other_user_projects):
+      users_that_share_project.append(other_user)
+  return users_that_share_project
+
+
+def FilterViewableEmails(cnxn, services, user_auth, other_users):
+  # type: (MonorailConnection, Services, AuthData,
+  #     Collection[user_pb2.User]) -> Collection[user_pb2.User]
+  """Returns a list of users with emails visible to `user_auth`.
+
+  Args:
+    cnxn: MonorailConnection to the database.
+    services: Services object for connections to backend services.
+    user_auth: The AuthData of the user viewing the email addresses.
+    other_users: The list of users to be filtered for email visibility.
+
+  Returns:
+    Collection of user that should reveal their emails.
+  """
+  # Case 1: Anon users don't see anything revealed.
+  if user_auth.user_pb is None:
+    return []
+
+  # Case 2: site admins always see unobscured email addresses.
+  if user_auth.user_pb.is_site_admin:
+    return other_users
+
+  # Case 3: Members of any groups in settings.full_emails_perm_groups
+  # can view unobscured email addresses.
+  for group_email in settings.full_emails_perm_groups:
+    if services.usergroup.LookupUserGroupID(
+        cnxn, group_email) in user_auth.effective_ids:
+      return other_users
+
+  # Case 4: Users see unobscured emails as long as they share a common Project.
+  return WhichUsersShareAProject(
+      cnxn, services, user_auth.effective_ids, other_users)
+
+
+def DoUsersShareAProject(cnxn, services, user_effective_ids, other_user_id):
+  # type: (MonorailConnection, Services, Sequence[int], int) -> bool
+  """Determine whether two users share at least one Project.
+
+  The user_effective_ids may include group ids or the other_user_id may be a
+  member of a group that results in transitive Project ownership.
+
+  Args:
+    cnxn: MonorailConnection to the database.
+    services: Services object for connections to backend services.
+    user_effective_ids: The effective ids of the authorized User.
+    other_user_id: The other user's user_id to compare against.
+
+  Returns:
+    True if one or more Projects are shared between the Users.
+  """
+  projects_by_user_effective_id = services.project.GetProjectMemberships(
+      cnxn, user_effective_ids)
+  authed_user_projects = itertools.chain.from_iterable(
+      projects_by_user_effective_id.values())
+
+  # Get effective ids for other user to handle transitive Project membership.
+  other_user_effective_ids = GetEffectiveIds(cnxn, services, other_user_id)
+  projects_by_other_user_effective_ids = services.project.GetProjectMemberships(
+      cnxn, other_user_effective_ids)
+  other_user_projects = itertools.chain.from_iterable(
+      projects_by_other_user_effective_ids.values())
+
+  return any(project in authed_user_projects for project in other_user_projects)
+
+
+# TODO(https://crbug.com/monorail/8192): Remove this method.
+def DeprecatedShouldRevealEmail(user_auth, project, viewed_email):
+  # type: (AuthData, Project, str) -> bool
+  """
+  Deprecated V1 API logic to decide whether to publish a user's email
+  address. Avoid updating this method.
+
+  Args:
+    user_auth: The AuthData of the user viewing the email addresses.
+    project: The Project PB to which the viewed user belongs.
+    viewed_email: The email of the viewed user.
+
+  Returns:
+    True if email addresses should be published to the logged-in user.
+  """
+  # Case 1: Anon users don't see anything revealed.
+  if user_auth.user_pb is None:
+    return False
+
+  # Case 2: site admins always see unobscured email addresses.
+  if user_auth.user_pb.is_site_admin:
+    return True
+
+  # Case 3: Project members see the unobscured email of everyone in a project.
+  if project and UserIsInProject(project, user_auth.effective_ids):
+    return True
+
+  # Case 4: Do not obscure your own email.
+  if viewed_email and user_auth.user_pb.email == viewed_email:
+    return True
+
+  return False
+
+
+def ParseAndObscureAddress(email):
+  # type: str -> str
+  """Break the given email into username and domain, and obscure.
+
+  Args:
+    email: string email address to process
+
+  Returns:
+    A 4-tuple (username, domain, obscured_username, obscured_email).
+    The obscured_username is truncated more aggressively than how Google Groups
+    does it: it truncates at 5 characters or truncates OFF 3 characters,
+    whichever results in a shorter obscured_username.
+  """
+  if '@' in email:
+    username, user_domain = email.split('@', 1)
+  else:  # don't fail if User table has unexpected email address format.
+    username, user_domain = email, ''
+
+  base_username = username.split('+')[0]
+  cutoff_point = min(5, max(1, len(base_username) - 3))
+  obscured_username = base_username[:cutoff_point]
+  obscured_email = '%s...@%s' %(obscured_username, user_domain)
+
+  return username, user_domain, obscured_username, obscured_email
+
+
+def CreateUserDisplayNamesAndEmails(cnxn, services, user_auth, users):
+  # type: (MonorailConnection, Services, AuthData,
+  #     Collection[user_pb2.User]) ->
+  #     Tuple[Mapping[int, str], Mapping[int, str]]
+  """Create the display names and emails of the given users based on the
+     current user.
+
+  Args:
+    cnxn: MonorailConnection to the database.
+    services: Services object for connections to backend services.
+    user_auth: AuthData object that identifies the logged in user.
+    users: Collection of User PB objects.
+
+  Returns:
+    A Tuple containing two Dicts of user_ids to display names and user_ids to
+        emails. If a given User does not have an email, there will be an empty
+        string in both.
+  """
+  # NOTE: Currently only service accounts can have display_names set. For all
+  # other users and service accounts with no display_names specified, we use the
+  # obscured or unobscured emails for both `display_names` and `emails`.
+  # See crbug.com/monorail/8510.
+  display_names = {}
+  emails = {}
+
+  # Do a pass on simple display cases.
+  maybe_revealed_users = []
+  for user in users:
+    if user.user_id == framework_constants.DELETED_USER_ID:
+      display_names[user.user_id] = framework_constants.DELETED_USER_NAME
+      emails[user.user_id] = ''
+    elif not user.email:
+      display_names[user.user_id] = ''
+      emails[user.user_id] = ''
+    elif not user.obscure_email:
+      display_names[user.user_id] = user.email
+      emails[user.user_id] = user.email
+    else:
+      # Default to hiding user email.
+      (_username, _domain, _obs_username,
+       obs_email) = ParseAndObscureAddress(user.email)
+      display_names[user.user_id] = obs_email
+      emails[user.user_id] = obs_email
+      maybe_revealed_users.append(user)
+
+  # Reveal viewable emails.
+  viewable_users = FilterViewableEmails(
+      cnxn, services, user_auth, maybe_revealed_users)
+  for user in viewable_users:
+    display_names[user.user_id] = user.email
+    emails[user.user_id] = user.email
+
+  # Use Client.display_names for service accounts that have one specified.
+  for user in users:
+    if user.email in client_config_svc.GetServiceAccountMap():
+      display_names[user.user_id] = client_config_svc.GetServiceAccountMap()[
+          user.email]
+
+  return display_names, emails
+
+
+def UserOwnsProject(project, effective_ids):
+  """Return True if any of the effective_ids is a project owner."""
+  return not effective_ids.isdisjoint(project.owner_ids or set())
+
+
+def UserIsInProject(project, effective_ids):
+  """Return True if any of the effective_ids is a project member.
+
+  Args:
+    project: Project PB for the current project.
+    effective_ids: set of int user IDs for the current user (including all
+        user groups).  This will be an empty set for anonymous users.
+
+  Returns:
+    True if the user has any direct or indirect role in the project.  The value
+    will actually be a set(), but it will have an ID in it if the user is in
+    the project, or it will be an empty set which is considered False.
+  """
+  return (UserOwnsProject(project, effective_ids) or
+          not effective_ids.isdisjoint(project.committer_ids or set()) or
+          not effective_ids.isdisjoint(project.contributor_ids or set()))
+
+
+def IsPriviledgedDomainUser(email):
+  """Return True if the user's account is from a priviledged domain."""
+  if email and '@' in email:
+    _, user_domain = email.split('@', 1)
+    return user_domain in settings.priviledged_user_domains
+
+  return False
+
+
+def IsValidColumnSpec(col_spec):
+  # type: str -> bool
+  """Return true if the given column specification is valid."""
+  return re.match(RE_COLUMN_SPEC, col_spec)
+
+
+# String translation table to catch a common typos in label names.
+_CANONICALIZATION_TRANSLATION_TABLE = {
+    ord(delete_u_char): None
+    for delete_u_char in u'!"#$%&\'()*+,/:;<>?@[\\]^`{|}~\t\n\x0b\x0c\r '
+    }
+_CANONICALIZATION_TRANSLATION_TABLE.update({ord(u'='): ord(u'-')})
+
+
+def CanonicalizeLabel(user_input):
+  """Canonicalize a given label or status value.
+
+  When the user enters a string that represents a label or an enum,
+  convert it a canonical form that makes it more likely to match
+  existing values.
+
+  Args:
+    user_input: string that the user typed for a label.
+
+  Returns:
+    Canonical form of that label as a unicode string.
+  """
+  if user_input is None:
+    return user_input
+
+  if not isinstance(user_input, six.text_type):
+    user_input = user_input.decode('utf-8')
+
+  canon_str = user_input.translate(_CANONICALIZATION_TRANSLATION_TABLE)
+  return canon_str
+
+
+def MergeLabels(labels_list, labels_add, labels_remove, config):
+  """Update a list of labels with the given add and remove label lists.
+
+  Args:
+    labels_list: list of current labels.
+    labels_add: labels that the user wants to add.
+    labels_remove: labels that the user wants to remove.
+    config: ProjectIssueConfig with info about exclusive prefixes and
+        enum fields.
+
+  Returns:
+    (merged_labels, update_labels_add, update_labels_remove):
+    A new list of labels with the given labels added and removed, and
+    any exclusive label prefixes taken into account.  Then two
+    lists of update strings to explain the changes that were actually
+    made.
+  """
+  old_lower_labels = [lab.lower() for lab in labels_list]
+  labels_add = [lab for lab in labels_add
+                if lab.lower() not in old_lower_labels]
+  labels_remove = [lab for lab in labels_remove
+                   if lab.lower() in old_lower_labels]
+  labels_remove_lower = [lab.lower() for lab in labels_remove]
+  exclusive_prefixes = [
+      lab.lower() + '-' for lab in config.exclusive_label_prefixes]
+  for fd in config.field_defs:
+    if (fd.field_type == tracker_pb2.FieldTypes.ENUM_TYPE and
+        not fd.is_multivalued):
+      exclusive_prefixes.append(fd.field_name.lower() + '-')
+
+  # We match prefix strings rather than splitting on dash because
+  # an exclusive-prefix or field name may contain dashes.
+  def MatchPrefix(lab, prefixes):
+    for prefix_dash in prefixes:
+      if lab.lower().startswith(prefix_dash):
+        return prefix_dash
+    return False
+
+  # Dedup any added labels.  E.g., ignore attempts to add Priority twice.
+  excl_add = []
+  dedupped_labels_add = []
+  for lab in labels_add:
+    matched_prefix_dash = MatchPrefix(lab, exclusive_prefixes)
+    if matched_prefix_dash:
+      if matched_prefix_dash not in excl_add:
+        excl_add.append(matched_prefix_dash)
+        dedupped_labels_add.append(lab)
+    else:
+      dedupped_labels_add.append(lab)
+
+  # "Old minus exclusive" is the set of old label values minus any
+  # that should be overwritten by newly set exclusive labels.
+  old_minus_excl = []
+  for lab in labels_list:
+    matched_prefix_dash = MatchPrefix(lab, excl_add)
+    if not matched_prefix_dash:
+      old_minus_excl.append(lab)
+
+  merged_labels = [lab for lab in old_minus_excl + dedupped_labels_add
+                   if lab.lower() not in labels_remove_lower]
+
+  return merged_labels, dedupped_labels_add, labels_remove
+
+
+# Pattern to match a valid hotlist name.
+RE_HOTLIST_NAME_PATTERN = r"[a-zA-Z][-0-9a-zA-Z\.]*"
+
+# Compiled regexp to match the hotlist name and nothing more before or after.
+RE_HOTLIST_NAME = re.compile(
+    '^%s$' % RE_HOTLIST_NAME_PATTERN, re.VERBOSE)
+
+
+def IsValidHotlistName(s):
+  """Return true if the given string is a valid hotlist name."""
+  return (RE_HOTLIST_NAME.match(s) and
+          len(s) <= framework_constants.MAX_HOTLIST_NAME_LENGTH)
+
+
+USER_PREF_DEFS = {
+  'code_font': re.compile('(true|false)'),
+  'render_markdown': re.compile('(true|false)'),
+
+  # The are for dismissible cues.  True means the user has dismissed them.
+  'privacy_click_through': re.compile('(true|false)'),
+  'corp_mode_click_through': re.compile('(true|false)'),
+  'code_of_conduct': re.compile('(true|false)'),
+  'dit_keystrokes': re.compile('(true|false)'),
+  'italics_mean_derived': re.compile('(true|false)'),
+  'availability_msgs': re.compile('(true|false)'),
+  'your_email_bounced': re.compile('(true|false)'),
+  'search_for_numbers': re.compile('(true|false)'),
+  'restrict_new_issues': re.compile('(true|false)'),
+  'public_issue_notice': re.compile('(true|false)'),
+  'you_are_on_vacation': re.compile('(true|false)'),
+  'how_to_join_project': re.compile('(true|false)'),
+  'document_team_duties': re.compile('(true|false)'),
+  'showing_ids_instead_of_tiles': re.compile('(true|false)'),
+  'issue_timestamps': re.compile('(true|false)'),
+  'stale_fulltext': re.compile('(true|false)'),
+  }
+MAX_PREF_VALUE_LENGTH = 80
+
+
+def ValidatePref(name, value):
+  """Return an error message if the server does not support a pref value."""
+  if name not in USER_PREF_DEFS:
+    return 'Unknown pref name: %r' % name
+  if len(value) > MAX_PREF_VALUE_LENGTH:
+    return 'Value for pref name %r is too long' % name
+  if not USER_PREF_DEFS[name].match(value):
+    return 'Invalid pref value %r for %r' % (value, name)
+  return None
+
+
+def IsRestrictNewIssuesUser(cnxn, services, user_id):
+  # type: (MonorailConnection, Services, int) -> bool)
+  """Returns true iff user's new issues should be restricted by default."""
+  user_group_ids = services.usergroup.LookupMemberships(cnxn, user_id)
+  restrict_new_issues_groups_dict = services.user.LookupUserIDs(
+      cnxn, settings.restrict_new_issues_user_groups, autocreate=True)
+  restrict_new_issues_group_ids = set(restrict_new_issues_groups_dict.values())
+  return any(gid in restrict_new_issues_group_ids for gid in user_group_ids)
+
+
+def IsPublicIssueNoticeUser(cnxn, services, user_id):
+  # type: (MonorailConnection, Services, int) -> bool)
+  """Returns true iff user should see a public issue notice by default."""
+  user_group_ids = services.usergroup.LookupMemberships(cnxn, user_id)
+  public_issue_notice_groups_dict = services.user.LookupUserIDs(
+      cnxn, settings.public_issue_notice_user_groups, autocreate=True)
+  public_issue_notice_group_ids = set(public_issue_notice_groups_dict.values())
+  return any(gid in public_issue_notice_group_ids for gid in user_group_ids)
+
+
+def GetEffectiveIds(cnxn, services, user_ids):
+  # type: (MonorailConnection, Services, Collection[int]) ->
+  #   Mapping[int, Collection[int]]
+  """
+  Given a set of user IDs, it returns a mapping of user_id to a set of effective
+  IDs that include the user's ID and all of their user groups. This mapping
+  will be contain only the user_id anonymous users.
+  """
+  # Get direct memberships for user_ids.
+  effective_ids_by_user_id = services.usergroup.LookupAllMemberships(
+      cnxn, user_ids)
+  # Add user_id to list of effective_ids.
+  for user_id, effective_ids in effective_ids_by_user_id.items():
+    effective_ids.add(user_id)
+  # Get User objects for user_ids.
+  users_by_id = services.user.GetUsersByIDs(cnxn, user_ids)
+  for user_id, user in users_by_id.items():
+    if user and user.email:
+      effective_ids_by_user_id[user_id].update(
+          _ComputeMembershipsByEmail(cnxn, services, user.email))
+
+      # Add related parent and child ids.
+      related_ids = []
+      if user.linked_parent_id:
+        related_ids.append(user.linked_parent_id)
+      if user.linked_child_ids:
+        related_ids.extend(user.linked_child_ids)
+
+      # Add any related efective_ids.
+      if related_ids:
+        effective_ids_by_user_id[user_id].update(related_ids)
+        effective_ids_by_related_id = services.usergroup.LookupAllMemberships(
+            cnxn, related_ids)
+        related_effective_ids = functools.reduce(
+            set.union, effective_ids_by_related_id.values(), set())
+        effective_ids_by_user_id[user_id].update(related_effective_ids)
+  return effective_ids_by_user_id
+
+
+def _ComputeMembershipsByEmail(cnxn, services, email):
+  # type: (MonorailConnection, Services, str) -> Collection[int]
+  """
+  Given an user email, it returns a list [group_id] of computed user groups.
+  """
+  # Get the user email domain to compute memberships of the user.
+  (_username, user_email_domain, _obs_username,
+   _obs_email) = ParseAndObscureAddress(email)
+  return services.usergroup.LookupComputedMemberships(cnxn, user_email_domain)
diff --git a/framework/framework_constants.py b/framework/framework_constants.py
new file mode 100644
index 0000000..1490135
--- /dev/null
+++ b/framework/framework_constants.py
@@ -0,0 +1,184 @@
+# 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
+
+"""Some constants used throughout Monorail."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import os
+import re
+
+
+# Number of seconds in various periods.
+SECS_PER_MINUTE = 60
+SECS_PER_HOUR = SECS_PER_MINUTE * 60
+SECS_PER_DAY = SECS_PER_HOUR * 24
+SECS_PER_MONTH = SECS_PER_DAY * 30
+SECS_PER_YEAR = SECS_PER_DAY * 365
+
+# When we write to memcache, let the values expire so that we don't
+# get any unexpected super-old values as we make code changes over the
+# years.   Also, searches can contain date terms like [opened<today-1]
+# that would become wrong if cached for a long time.
+CACHE_EXPIRATION = 6 * SECS_PER_HOUR
+
+# Fulltext indexing happens asynchronously and we get no notification
+# when the indexing operation has completed.  So, when we cache searches
+# that use fulltext terms, the results might be stale.  We still do
+# cache them and use the cached values, but we expire them so that the
+# results cannot be stale for a long period of time.
+FULLTEXT_MEMCACHE_EXPIRATION = 3 * SECS_PER_MINUTE
+
+# Size in bytes of the largest form submission that we will accept
+MAX_POST_BODY_SIZE = 10 * 1024 * 1024   # = 10 MB
+
+# Special issue ID to use when an issue is explicitly not specified.
+NO_ISSUE_SPECIFIED = 0
+
+# Special user ID and name to use when no user was specified.
+NO_USER_SPECIFIED = 0
+NO_SESSION_SPECIFIED = 0
+NO_USER_NAME = '----'
+DELETED_USER_NAME = 'a_deleted_user'
+DELETED_USER_ID = 1
+USER_NOT_FOUND_NAME = 'user_not_found'
+
+# Queues for deleting users tasks.
+QUEUE_SEND_WIPEOUT_USER_LISTS = 'wipeoutsendusers'
+QUEUE_FETCH_WIPEOUT_DELETED_USERS = 'wipeoutdeleteusers'
+QUEUE_DELETE_USERS = 'deleteusers'
+
+# We remember the time of each user's last page view, but to reduce the
+# number of database writes, we only update it if it is newer by an hour.
+VISIT_RESOLUTION = 1 * SECS_PER_HOUR
+
+# String to display when some field has no value.
+NO_VALUES = '----'
+
+# If the user enters one or more dashes, that means "no value".  This is useful
+# in bulk edit, inbound email, and commit log command where a blank field
+# means "keep what was there" or is ignored.
+NO_VALUE_RE = re.compile(r'^-+$')
+
+# Used to loosely validate column spec. Mainly guards against malicious input.
+COLSPEC_RE = re.compile(r'^[-.\w\s/]*$', re.UNICODE)
+COLSPEC_COL_RE = re.compile(r'[-.\w/]+', re.UNICODE)
+MAX_COL_PARTS = 25
+MAX_COL_LEN = 50
+
+# Used to loosely validate sort spec. Mainly guards against malicious input.
+SORTSPEC_RE = re.compile(r'^[-.\w\s/]*$', re.UNICODE)
+MAX_SORT_PARTS = 6
+
+# For the artifact search box autosizing when the user types a long query.
+MIN_ARTIFACT_SEARCH_FIELD_SIZE = 38
+MAX_ARTIFACT_SEARCH_FIELD_SIZE = 75
+AUTOSIZE_STEP = 3
+
+# Regular expressions used in parsing label and status configuration text
+IDENTIFIER_REGEX = r'[-.\w]+'
+IDENTIFIER_RE = re.compile(IDENTIFIER_REGEX, re.UNICODE)
+# Labels and status values that are prefixed by a pound-sign are not displayed
+# in autocomplete menus.
+IDENTIFIER_DOCSTRING_RE = re.compile(
+    r'^(#?%s)[ \t]*=?[ \t]*(.*)$' % IDENTIFIER_REGEX,
+    re.MULTILINE | re.UNICODE)
+
+# Number of label text fields that we can display on a web form for issues.
+MAX_LABELS = 24
+
+# Default number of comments to display on an artifact detail page at one time.
+# Other comments will be paginated.
+DEFAULT_COMMENTS_PER_PAGE = 100
+
+# Content type to use when serving JSON.
+CONTENT_TYPE_JSON = 'application/json; charset=UTF-8'
+CONTENT_TYPE_JSON_OPTIONS = 'nosniff'
+
+# Maximum comments to index to keep the search index from choking.  E.g., if an
+# artifact had 1200 comments, only 0..99 and 701..1200 would be indexed.
+# This mainly affects advocacy issues which are highly redundant anyway.
+INITIAL_COMMENTS_TO_INDEX = 100
+FINAL_COMMENTS_TO_INDEX = 500
+
+# This is the longest string that GAE search will accept in one field.
+# The entire search document is also limited to 1MB, so our limit is 200 * 1024
+# chars so that each can be 4 bytes and the comments leave room for metadata.
+# https://cloud.google.com/appengine/docs/standard/python/search/#documents
+MAX_FTS_FIELD_SIZE = 200 * 1024
+
+# Base path to EZT templates.
+this_dir = os.path.dirname(__file__)
+TEMPLATE_PATH = this_dir[:this_dir.rindex('/')] + '/templates/'
+
+# Defaults for dooming a project.
+DEFAULT_DOOM_REASON = 'No longer needed'
+DEFAULT_DOOM_PERIOD = SECS_PER_DAY * 90
+
+MAX_PROJECT_PEOPLE = 1000
+
+MAX_HOTLIST_NAME_LENGTH = 80
+
+# When logging potentially long debugging strings, only show this many chars.
+LOGGING_MAX_LENGTH = 2000
+
+# Maps languages supported by google-code-prettify
+# to the class name that should be added to code blocks in that language.
+# This list should be kept in sync with the handlers registered
+# in lang-*.js and prettify.js from the prettify project.
+PRETTIFY_CLASS_MAP = {
+    ext: 'lang-' + ext
+    for ext in [
+        # Supported in lang-*.js
+        'apollo', 'agc', 'aea', 'lisp', 'el', 'cl', 'scm',
+        'css', 'go', 'hs', 'lua', 'fs', 'ml', 'proto', 'scala', 'sql', 'vb',
+        'vbs', 'vhdl', 'vhd', 'wiki', 'yaml', 'yml', 'clj',
+        # Supported in prettify.js
+        'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl',
+        'c', 'cc', 'cpp', 'cxx', 'cyc', 'm',
+        'json', 'cs', 'java', 'bsh', 'csh', 'sh', 'cv', 'py', 'perl', 'pl',
+        'pm', 'rb', 'js', 'coffee',
+        ]}
+
+# Languages which are not specifically mentioned in prettify.js
+# but which render intelligibly with the default handler.
+PRETTIFY_CLASS_MAP.update(
+    (ext, '') for ext in [
+        'hpp', 'hxx', 'hh', 'h', 'inl', 'idl', 'swig', 'd',
+        'php', 'tcl', 'aspx', 'cfc', 'cfm',
+        'ent', 'mod', 'as',
+        'y', 'lex', 'awk', 'n', 'pde',
+        ])
+
+# Languages which are not specifically mentioned in prettify.js
+# but which should be rendered using a certain prettify module.
+PRETTIFY_CLASS_MAP.update({
+    'docbook': 'lang-xml',
+    'dtd': 'lang-xml',
+    'duby': 'lang-rb',
+    'mk': 'lang-sh',
+    'mak': 'lang-sh',
+    'make': 'lang-sh',
+    'mirah': 'lang-rb',
+    'ss': 'lang-lisp',
+    'vcproj': 'lang-xml',
+    'xsd': 'lang-xml',
+    'xslt': 'lang-xml',
+})
+
+PRETTIFY_FILENAME_CLASS_MAP = {
+    'makefile': 'lang-sh',
+    'makefile.in': 'lang-sh',
+    'doxyfile': 'lang-sh',  # Key-value pairs with hash comments
+    '.checkstyle': 'lang-xml',
+    '.classpath': 'lang-xml',
+    '.project': 'lang-xml',
+}
+
+OAUTH_SCOPE = 'https://www.googleapis.com/auth/userinfo.email'
+MONORAIL_SCOPE = 'https://www.googleapis.com/auth/monorail'
+
+FILENAME_RE = re.compile('^[-_.a-zA-Z0-9 #+()]+$')
diff --git a/framework/framework_helpers.py b/framework/framework_helpers.py
new file mode 100644
index 0000000..b7199b1
--- /dev/null
+++ b/framework/framework_helpers.py
@@ -0,0 +1,660 @@
+# 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
+
+"""Helper functions and classes used throughout Monorail."""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import collections
+import logging
+import random
+import string
+import textwrap
+import threading
+import time
+import traceback
+import urllib
+import urlparse
+
+from google.appengine.api import app_identity
+
+import ezt
+import six
+
+import settings
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import template_helpers
+from framework import timestr
+from framework import urls
+from proto import user_pb2
+from services import client_config_svc
+
+# AttachmentUpload holds the information of an incoming uploaded
+# attachment before it gets saved as a gcs file and saved to the DB.
+AttachmentUpload = collections.namedtuple(
+    'AttachmentUpload', ['filename', 'contents', 'mimetype'])
+# type: (str, str, str) -> None
+
+# For random key generation
+RANDOM_KEY_LENGTH = 128
+RANDOM_KEY_CHARACTERS = string.ascii_letters + string.digits
+
+# params recognized by FormatURL, in the order they will appear in the url
+RECOGNIZED_PARAMS = ['can', 'start', 'num', 'q', 'colspec', 'groupby', 'sort',
+                     'show', 'format', 'me', 'table_title', 'projects',
+                     'hotlist_id']
+
+
+def retry(tries, delay=1, backoff=2):
+  """A retry decorator with exponential backoff.
+
+  Functions are retried when Exceptions occur.
+
+  Args:
+    tries: int Number of times to retry, set to 0 to disable retry.
+    delay: float Initial sleep time in seconds.
+    backoff: float Must be greater than 1, further failures would sleep
+             delay*=backoff seconds.
+  """
+  if backoff <= 1:
+    raise ValueError("backoff must be greater than 1")
+  if tries < 0:
+    raise ValueError("tries must be 0 or greater")
+  if delay <= 0:
+    raise ValueError("delay must be greater than 0")
+
+  def decorator(func):
+    def wrapper(*args, **kwargs):
+      _tries, _delay = tries, delay
+      _tries += 1  # Ensure we call func at least once.
+      while _tries > 0:
+        try:
+          ret = func(*args, **kwargs)
+          return ret
+        except Exception:
+          _tries -= 1
+          if _tries == 0:
+            logging.error('Exceeded maximum number of retries for %s.',
+                          func.__name__)
+            raise
+          trace_str = traceback.format_exc()
+          logging.warning('Retrying %s due to Exception: %s',
+                          func.__name__, trace_str)
+          time.sleep(_delay)
+          _delay *= backoff  # Wait longer the next time we fail.
+    return wrapper
+  return decorator
+
+
+class PromiseCallback(object):
+  """Executes the work of a Promise and then dereferences everything."""
+
+  def __init__(self, promise, callback, *args, **kwargs):
+    self.promise = promise
+    self.callback = callback
+    self.args = args
+    self.kwargs = kwargs
+
+  def __call__(self):
+    try:
+      self.promise._WorkOnPromise(self.callback, *self.args, **self.kwargs)
+    finally:
+      # Make sure we no longer hold onto references to anything.
+      self.promise = self.callback = self.args = self.kwargs = None
+
+
+class Promise(object):
+  """Class for promises to deliver a value in the future.
+
+  A thread is started to run callback(args), that thread
+  should return the value that it generates, or raise an expception.
+  p.WaitAndGetValue() will block until a value is available.
+  If an exception was raised, p.WaitAndGetValue() will re-raise the
+  same exception.
+  """
+
+  def __init__(self, callback, *args, **kwargs):
+    """Initialize the promise and immediately call the supplied function.
+
+    Args:
+      callback: Function that takes the args and returns the promise value.
+      *args:  Any arguments to the target function.
+      **kwargs: Any keyword args for the target function.
+    """
+
+    self.has_value = False
+    self.value = None
+    self.event = threading.Event()
+    self.exception = None
+
+    promise_callback = PromiseCallback(self, callback, *args, **kwargs)
+
+    # Execute the callback in another thread.
+    promise_thread = threading.Thread(target=promise_callback)
+    promise_thread.start()
+
+  def _WorkOnPromise(self, callback, *args, **kwargs):
+    """Run callback to compute the promised value.  Save any exceptions."""
+    try:
+      self.value = callback(*args, **kwargs)
+    except Exception as e:
+      trace_str = traceback.format_exc()
+      logging.info('Exception while working on promise: %s\n', trace_str)
+      # Add the stack trace at this point to the exception.  That way, in the
+      # logs, we can see what happened further up in the call stack
+      # than WaitAndGetValue(), which re-raises exceptions.
+      e.pre_promise_trace = trace_str
+      self.exception = e
+    finally:
+      self.has_value = True
+      self.event.set()
+
+  def WaitAndGetValue(self):
+    """Block until my value is available, then return it or raise exception."""
+    self.event.wait()
+    if self.exception:
+      raise self.exception  # pylint: disable=raising-bad-type
+    return self.value
+
+
+def FormatAbsoluteURLForDomain(
+    host, project_name, servlet_name, scheme='https', **kwargs):
+  """A variant of FormatAbsoluteURL for when request objects are not available.
+
+  Args:
+    host: string with hostname and optional port, e.g. 'localhost:8080'.
+    project_name: the destination project name, if any.
+    servlet_name: site or project-local url fragement of dest page.
+    scheme: url scheme, e.g., 'http' or 'https'.
+    **kwargs: additional query string parameters may be specified as named
+      arguments to this function.
+
+  Returns:
+    A full url beginning with 'http[s]://'.
+  """
+  path_and_args = FormatURL(None, servlet_name, **kwargs)
+
+  if host:
+    domain_port = host.split(':')
+    domain_port[0] = GetPreferredDomain(domain_port[0])
+    host = ':'.join(domain_port)
+
+  absolute_domain_url = '%s://%s' % (scheme, host)
+  if project_name:
+    return '%s/p/%s%s' % (absolute_domain_url, project_name, path_and_args)
+  return absolute_domain_url + path_and_args
+
+
+def FormatAbsoluteURL(
+    mr, servlet_name, include_project=True, project_name=None,
+    scheme=None, copy_params=True, **kwargs):
+  """Return an absolute URL to a servlet with old and new params.
+
+  Args:
+    mr: info parsed from the current request.
+    servlet_name: site or project-local url fragement of dest page.
+    include_project: if True, include the project home url as part of the
+      destination URL (as long as it is specified either in mr
+      or as the project_name param.)
+    project_name: the destination project name, to override
+      mr.project_name if include_project is True.
+    scheme: either 'http' or 'https', to override mr.request.scheme.
+    copy_params: if True, copy well-known parameters from the existing request.
+    **kwargs: additional query string parameters may be specified as named
+      arguments to this function.
+
+  Returns:
+    A full url beginning with 'http[s]://'.  The destination URL will be in
+    the same domain as the current request.
+  """
+  path_and_args = FormatURL(
+      [(name, mr.GetParam(name)) for name in RECOGNIZED_PARAMS]
+      if copy_params else None,
+      servlet_name, **kwargs)
+  scheme = scheme or mr.request.scheme
+
+  project_base = ''
+  if include_project:
+    project_base = '/p/%s' % (project_name or mr.project_name)
+
+  return '%s://%s%s%s' % (scheme, mr.request.host, project_base, path_and_args)
+
+
+def FormatMovedProjectURL(mr, moved_to):
+  """Return a transformation of the given url into the given project.
+
+  Args:
+    mr: common information parsed from the HTTP request.
+    moved_to: A string from a project's moved_to field that matches
+      project_constants.RE_PROJECT_NAME.
+
+  Returns:
+    The url transposed into the given destination project.
+  """
+  project_name = moved_to
+  _, _, path, parameters, query, fragment_identifier = urlparse.urlparse(
+      mr.current_page_url)
+  # Strip off leading "/p/<moved from project>"
+  path = '/' + path.split('/', 3)[3]
+  rest_of_url = urlparse.urlunparse(
+    ('', '', path, parameters, query, fragment_identifier))
+  return '/p/%s%s' % (project_name, rest_of_url)
+
+
+def GetNeededDomain(project_name, current_domain):
+  """Return the branded domain for the project iff not on current_domain."""
+  if (not current_domain or
+      '.appspot.com' in current_domain or
+      ':' in current_domain):
+    return None
+  desired_domain = settings.branded_domains.get(
+      project_name, settings.branded_domains.get('*'))
+  if desired_domain == current_domain:
+    return None
+  return desired_domain
+
+
+def FormatURL(recognized_params, url, **kwargs):
+  # type: (Sequence[Tuple(str, str)], str, **Any) -> str
+  """Return a project relative URL to a servlet with old and new params.
+
+  Args:
+    recognized_params: Default query parameters to include.
+    url: Base URL. Could be a relative path for an EZT Servlet or an
+      absolute path for a separate service (ie: besearch).
+    **kwargs: Additional query parameters to add.
+
+  Returns:
+    A URL with the specified query parameters.
+  """
+  # Standard params not overridden in **kwargs come first, followed by kwargs.
+  # The exception is the 'id' param. If present then the 'id' param always comes
+  # first. See bugs.chromium.org/p/monorail/issues/detail?id=374
+  all_params = []
+  if kwargs.get('id'):
+    all_params.append(('id', kwargs['id']))
+  # TODO(jojwang): update all calls to FormatURL to only include non-None
+  # recognized_params
+  if recognized_params:
+    all_params.extend(
+        param for param in recognized_params if param[0] not in kwargs)
+
+  all_params.extend(
+      # Ignore the 'id' param since we already added it above.
+      sorted([kwarg for kwarg in kwargs.items() if kwarg[0] != 'id']))
+  return _FormatQueryString(url, all_params)
+
+
+def _FormatQueryString(url, params):
+  # type: (str, Sequence[Tuple(str, str)]) -> str
+  """URLencode a list of parameters and attach them to the end of a URL.
+
+  Args:
+    url: URL to append the querystring to.
+    params: List of query parameters to append.
+
+  Returns:
+    A URL with the specified query parameters.
+  """
+  param_string = '&'.join(
+      '%s=%s' % (name, urllib.quote(six.text_type(value).encode('utf-8')))
+      for name, value in params if value is not None)
+  if not param_string:
+    qs_start_char = ''
+  elif '?' in url:
+    qs_start_char = '&'
+  else:
+    qs_start_char = '?'
+  return '%s%s%s' % (url, qs_start_char, param_string)
+
+
+def WordWrapSuperLongLines(s, max_cols=100):
+  """Reformat input that was not word-wrapped by the browser.
+
+  Args:
+    s: the string to be word-wrapped, it may have embedded newlines.
+    max_cols: int maximum line length.
+
+  Returns:
+    Wrapped text string.
+
+  Rather than wrap the whole thing, we only wrap super-long lines and keep
+  all the reasonable lines formated as-is.
+  """
+  lines = [textwrap.fill(line, max_cols) for line in s.splitlines()]
+  wrapped_text = '\n'.join(lines)
+
+  # The split/join logic above can lose one final blank line.
+  if s.endswith('\n') or s.endswith('\r'):
+    wrapped_text += '\n'
+
+  return wrapped_text
+
+
+def StaticCacheHeaders():
+  """Returns HTTP headers for static content, based on the current time."""
+  year_from_now = int(time.time()) + framework_constants.SECS_PER_YEAR
+  headers = [
+      ('Cache-Control',
+       'max-age=%d, private' % framework_constants.SECS_PER_YEAR),
+      ('Last-Modified', timestr.TimeForHTMLHeader()),
+      ('Expires', timestr.TimeForHTMLHeader(when=year_from_now)),
+  ]
+  logging.info('static headers are %r', headers)
+  return headers
+
+
+def ComputeListDeltas(old_list, new_list):
+  """Given an old and new list, return the items added and removed.
+
+  Args:
+    old_list: old list of values for comparison.
+    new_list: new list of values for comparison.
+
+  Returns:
+    Two lists: one with all the values added (in new_list but was not
+    in old_list), and one with all the values removed (not in new_list
+    but was in old_lit).
+  """
+  if old_list == new_list:
+    return [], []  # A common case: nothing was added or removed.
+
+  added = set(new_list)
+  added.difference_update(old_list)
+  removed = set(old_list)
+  removed.difference_update(new_list)
+  return list(added), list(removed)
+
+
+def GetRoleName(effective_ids, project):
+  """Determines the name of the role a member has for a given project.
+
+  Args:
+    effective_ids: set of user IDs to get the role name for.
+    project: Project PB containing the different the different member lists.
+
+  Returns:
+    The name of the role.
+  """
+  if not effective_ids.isdisjoint(project.owner_ids):
+    return 'Owner'
+  if not effective_ids.isdisjoint(project.committer_ids):
+    return 'Committer'
+  if not effective_ids.isdisjoint(project.contributor_ids):
+    return 'Contributor'
+  return None
+
+
+def GetHotlistRoleName(effective_ids, hotlist):
+  """Determines the name of the role a member has for a given hotlist."""
+  if not effective_ids.isdisjoint(hotlist.owner_ids):
+    return 'Owner'
+  if not effective_ids.isdisjoint(hotlist.editor_ids):
+    return 'Editor'
+  if not effective_ids.isdisjoint(hotlist.follower_ids):
+    return 'Follower'
+  return None
+
+
+class UserSettings(object):
+  """Abstract class providing static methods for user settings forms."""
+
+  @classmethod
+  def GatherUnifiedSettingsPageData(
+      cls, logged_in_user_id, settings_user_view, settings_user,
+      settings_user_prefs):
+    """Gather EZT variables needed for the unified user settings form.
+
+    Args:
+      logged_in_user_id: The user ID of the acting user.
+      settings_user_view: The UserView of the target user.
+      settings_user: The User PB of the target user.
+      settings_user_prefs: UserPrefs object for the view user.
+
+    Returns:
+      A dictionary giving the names and values of all the variables to
+      be exported to EZT to support the unified user settings form template.
+    """
+
+    settings_user_prefs_view = template_helpers.EZTItem(
+      **{name: None for name in framework_bizobj.USER_PREF_DEFS})
+    if settings_user_prefs:
+      for upv in settings_user_prefs.prefs:
+        if upv.value == 'true':
+          setattr(settings_user_prefs_view, upv.name, True)
+        elif upv.value == 'false':
+          setattr(settings_user_prefs_view, upv.name, None)
+
+    logging.info('settings_user_prefs_view is %r' % settings_user_prefs_view)
+    return {
+        'settings_user': settings_user_view,
+        'settings_user_pb': template_helpers.PBProxy(settings_user),
+        'settings_user_is_banned': ezt.boolean(settings_user.banned),
+        'self': ezt.boolean(logged_in_user_id == settings_user_view.user_id),
+        'profile_url_fragment': (
+            settings_user_view.profile_url[len('/u/'):]),
+        'preview_on_hover': ezt.boolean(settings_user.preview_on_hover),
+        'settings_user_prefs': settings_user_prefs_view,
+        }
+
+  @classmethod
+  def ProcessBanForm(
+      cls, cnxn, user_service, post_data, user_id, user):
+    """Process the posted form data from the ban user form.
+
+    Args:
+      cnxn: connection to the SQL database.
+      user_service: An instance of UserService for saving changes.
+      post_data: The parsed post data from the form submission request.
+      user_id: The user id of the target user.
+      user: The user PB of the target user.
+    """
+    user_service.UpdateUserBan(
+        cnxn, user_id, user, is_banned='banned' in post_data,
+            banned_reason=post_data.get('banned_reason', ''))
+
+  @classmethod
+  def ProcessSettingsForm(
+      cls, we, post_data, user, admin=False):
+    """Process the posted form data from the unified user settings form.
+
+    Args:
+      we: A WorkEnvironment with cnxn and services.
+      post_data: The parsed post data from the form submission request.
+      user: The user PB of the target user.
+      admin: Whether settings reserved for admins are supported.
+    """
+    obscure_email = 'obscure_email' in post_data
+
+    kwargs = {}
+    if admin:
+      kwargs.update(is_site_admin='site_admin' in post_data)
+      kwargs.update(is_banned='banned' in post_data,
+                    banned_reason=post_data.get('banned_reason', ''))
+
+    we.UpdateUserSettings(
+        user, notify='notify' in post_data,
+        notify_starred='notify_starred' in post_data,
+        email_compact_subject='email_compact_subject' in post_data,
+        email_view_widget='email_view_widget' in post_data,
+        notify_starred_ping='notify_starred_ping' in post_data,
+        preview_on_hover='preview_on_hover' in post_data,
+        obscure_email=obscure_email,
+        vacation_message=post_data.get('vacation_message', ''),
+        **kwargs)
+
+    user_prefs = []
+    for pref_name in ['restrict_new_issues', 'public_issue_notice']:
+      user_prefs.append(user_pb2.UserPrefValue(
+          name=pref_name,
+          value=('true' if pref_name in post_data else 'false')))
+    we.SetUserPrefs(user.user_id, user_prefs)
+
+
+def GetHostPort(project_name=None):
+  """Get string domain name and port number."""
+
+  app_id = app_identity.get_application_id()
+  if ':' in app_id:
+    domain, app_id = app_id.split(':')
+  else:
+    domain = ''
+
+  if domain.startswith('google'):
+    hostport = '%s.googleplex.com' % app_id
+  else:
+    hostport = '%s.appspot.com' % app_id
+
+  live_site_domain = GetPreferredDomain(hostport)
+  if project_name:
+    project_needed_domain = GetNeededDomain(project_name, live_site_domain)
+    if project_needed_domain:
+      return project_needed_domain
+
+  return live_site_domain
+
+
+def IssueCommentURL(
+    hostport, project, local_id, seq_num=None):
+  """Return a URL pointing directly to the specified comment."""
+  servlet_name = urls.ISSUE_DETAIL
+  detail_url = FormatAbsoluteURLForDomain(
+      hostport, project.project_name, servlet_name, id=local_id)
+  if seq_num:
+    detail_url += '#c%d' % seq_num
+
+  return detail_url
+
+
+def MurmurHash3_x86_32(key, seed=0x0):
+  """Implements the x86/32-bit version of Murmur Hash 3.0.
+
+  MurmurHash3 is written by Austin Appleby, and is placed in the public
+  domain. See https://code.google.com/p/smhasher/ for details.
+
+  This pure python implementation of the x86/32 bit version of MurmurHash3 is
+  written by Fredrik Kihlander and also placed in the public domain.
+  See https://github.com/wc-duck/pymmh3 for details.
+
+  The MurmurHash3 algorithm is chosen for these reasons:
+  * It is fast, even when implemented in pure python.
+  * It is remarkably well distributed, and unlikely to cause collisions.
+  * It is stable and unchanging (any improvements will be in MurmurHash4).
+  * It is well-tested, and easily usable in other contexts (such as bulk
+    data imports).
+
+  Args:
+    key (string): the data that you want hashed
+    seed (int): An offset, treated as essentially part of the key.
+
+  Returns:
+    A 32-bit integer (can be interpreted as either signed or unsigned).
+  """
+  key = bytearray(key.encode('utf-8'))
+
+  def fmix(h):
+    h ^= h >> 16
+    h  = (h * 0x85ebca6b) & 0xFFFFFFFF
+    h ^= h >> 13
+    h  = (h * 0xc2b2ae35) & 0xFFFFFFFF
+    h ^= h >> 16
+    return h;
+
+  length = len(key)
+  nblocks = int(length // 4)
+
+  h1 = seed;
+
+  c1 = 0xcc9e2d51
+  c2 = 0x1b873593
+
+  # body
+  for block_start in range(0, nblocks * 4, 4):
+    k1 = key[ block_start + 3 ] << 24 | \
+         key[ block_start + 2 ] << 16 | \
+         key[ block_start + 1 ] <<  8 | \
+         key[ block_start + 0 ]
+
+    k1 = c1 * k1 & 0xFFFFFFFF
+    k1 = (k1 << 15 | k1 >> 17) & 0xFFFFFFFF
+    k1 = (c2 * k1) & 0xFFFFFFFF;
+
+    h1 ^= k1
+    h1  = ( h1 << 13 | h1 >> 19 ) & 0xFFFFFFFF
+    h1  = ( h1 * 5 + 0xe6546b64 ) & 0xFFFFFFFF
+
+  # tail
+  tail_index = nblocks * 4
+  k1 = 0
+  tail_size = length & 3
+
+  if tail_size >= 3:
+    k1 ^= key[ tail_index + 2 ] << 16
+  if tail_size >= 2:
+    k1 ^= key[ tail_index + 1 ] << 8
+  if tail_size >= 1:
+    k1 ^= key[ tail_index + 0 ]
+
+  if tail_size != 0:
+    k1  = ( k1 * c1 ) & 0xFFFFFFFF
+    k1  = ( k1 << 15 | k1 >> 17 ) & 0xFFFFFFFF
+    k1  = ( k1 * c2 ) & 0xFFFFFFFF
+    h1 ^= k1
+
+  return fmix( h1 ^ length )
+
+
+def MakeRandomKey(length=RANDOM_KEY_LENGTH, chars=RANDOM_KEY_CHARACTERS):
+  """Return a string with lots of random characters."""
+  chars = [random.choice(chars) for _ in range(length)]
+  return ''.join(chars)
+
+
+def IsServiceAccount(email, client_emails=None):
+  """Return a boolean value whether this email is a service account."""
+  if email.endswith('gserviceaccount.com'):
+    return True
+  if client_emails is None:
+    _, client_emails = (
+        client_config_svc.GetClientConfigSvc().GetClientIDEmails())
+  return email in client_emails
+
+
+def GetPreferredDomain(domain):
+  """Get preferred domain to display.
+
+  The preferred domain replaces app_id for default version of monorail-prod
+  and monorail-staging.
+  """
+  return settings.preferred_domains.get(domain, domain)
+
+
+def GetUserAvailability(user, is_group=False):
+  """Return (str, str) that explains why the user might not be available."""
+  if not user.user_id:
+    return None, None
+  if user.banned:
+    return 'Banned', 'banned'
+  if user.vacation_message:
+    return user.vacation_message, 'none'
+  if user.email_bounce_timestamp:
+    return 'Email to this user bounced', 'none'
+  # No availability shown for user groups, or addresses that are
+  # likely to be mailing lists.
+  if is_group or (user.email and '-' in user.email):
+    return None, None
+  if not user.last_visit_timestamp:
+    return 'User never visited', 'never'
+  secs_ago = int(time.time()) - user.last_visit_timestamp
+  last_visit_str = timestr.FormatRelativeDate(
+      user.last_visit_timestamp, days_only=True)
+  if secs_ago > 30 * framework_constants.SECS_PER_DAY:
+    return 'Last visit > 30 days ago', 'none'
+  if secs_ago > 15 * framework_constants.SECS_PER_DAY:
+    return ('Last visit %s' % last_visit_str), 'unsure'
+  return None, None
diff --git a/framework/framework_views.py b/framework/framework_views.py
new file mode 100644
index 0000000..17dead8
--- /dev/null
+++ b/framework/framework_views.py
@@ -0,0 +1,215 @@
+# 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
+
+"""View classes to make it easy to display framework objects in EZT."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import permissions
+from framework import template_helpers
+from framework import timestr
+from proto import user_pb2
+from services import client_config_svc
+import settings
+
+
+_LABEL_DISPLAY_CHARS = 30
+_LABEL_PART_DISPLAY_CHARS = 15
+
+
+class LabelView(object):
+  """Wrapper class that makes it easier to display a label via EZT."""
+
+  def __init__(self, label, config):
+    """Make several values related to this label available as attrs.
+
+    Args:
+      label: artifact label string.  E.g., 'Priority-High' or 'Frontend'.
+      config: PB with a well_known_labels list, or None.
+    """
+    self.name = label
+    self.is_restrict = ezt.boolean(permissions.IsRestrictLabel(label))
+
+    self.docstring = ''
+    if config:
+      for wkl in config.well_known_labels:
+        if label.lower() == wkl.label.lower():
+          self.docstring = wkl.label_docstring
+
+    if '-' in label:
+      self.prefix, self.value = label.split('-', 1)
+    else:
+      self.prefix, self.value = '', label
+
+
+class StatusView(object):
+  """Wrapper class that makes it easier to display a status via EZT."""
+
+  def __init__(self, status, config):
+    """Make several values related to this status available as attrs.
+
+    Args:
+      status: artifact status string.  E.g., 'New' or 'Accepted'.
+      config: PB with a well_known_statuses list, or None.
+    """
+
+    self.name = status
+
+    self.docstring = ''
+    self.means_open = ezt.boolean(True)
+    if config:
+      for wks in config.well_known_statuses:
+        if status.lower() == wks.status.lower():
+          self.docstring = wks.status_docstring
+          self.means_open = ezt.boolean(wks.means_open)
+
+
+class UserView(object):
+  """Wrapper class to easily display basic user information in a template."""
+
+  def __init__(self, user, is_group=False):
+    self.user = user
+    self.is_group = is_group
+    email = user.email or ''
+    self.user_id = user.user_id
+    self.email = email
+    if user.obscure_email:
+      self.profile_url = '/u/%s/' % user.user_id
+    else:
+      self.profile_url = '/u/%s/' % email
+    self.obscure_email = user.obscure_email
+    self.banned = ''
+
+    (self.username, self.domain, self.obscured_username,
+     obscured_email) = framework_bizobj.ParseAndObscureAddress(email)
+    # No need to obfuscate or reveal client email.
+    # Instead display a human-readable username.
+    if self.user_id == framework_constants.DELETED_USER_ID:
+      self.display_name = framework_constants.DELETED_USER_NAME
+      self.obscure_email = ''
+      self.profile_url = ''
+    elif self.email in client_config_svc.GetServiceAccountMap():
+      self.display_name = client_config_svc.GetServiceAccountMap()[self.email]
+    elif not self.obscure_email:
+      self.display_name = email
+    else:
+      self.display_name = obscured_email
+
+    self.avail_message, self.avail_state = (
+        framework_helpers.GetUserAvailability(user, is_group))
+    self.avail_message_short = template_helpers.FitUnsafeText(
+        self.avail_message, 35)
+
+  def RevealEmail(self):
+    if not self.email:
+      return
+    if self.email not in client_config_svc.GetServiceAccountMap():
+      self.obscure_email = False
+      self.display_name = self.email
+      self.profile_url = '/u/%s/' % self.email
+
+
+def MakeAllUserViews(
+    cnxn, user_service, *list_of_user_id_lists, **kw):
+  """Make a dict {user_id: user_view, ...} for all user IDs given."""
+  distinct_user_ids = set()
+  distinct_user_ids.update(*list_of_user_id_lists)
+  if None in distinct_user_ids:
+    distinct_user_ids.remove(None)
+  group_ids = kw.get('group_ids', [])
+  user_dict = user_service.GetUsersByIDs(cnxn, distinct_user_ids)
+  return {user_id: UserView(user_pb, is_group=user_id in group_ids)
+          for user_id, user_pb in user_dict.items()}
+
+
+def MakeUserView(cnxn, user_service, user_id):
+  """Make a UserView for the given user ID."""
+  user = user_service.GetUser(cnxn, user_id)
+  return UserView(user)
+
+
+def StuffUserView(user_id, email, obscure_email):
+  """Construct a UserView with the given parameters for testing."""
+  user = user_pb2.MakeUser(user_id, email=email, obscure_email=obscure_email)
+  return UserView(user)
+
+
+# TODO(https://crbug.com/monorail/8192): Remove optional project.
+def RevealAllEmailsToMembers(cnxn, services, auth, users_by_id, project=None):
+  # type: (MonorailConnection, Services, AuthData, Collection[user_pb2.User],
+  #     Optional[project_pb2.Project] -> None)
+  """Reveal emails based on the authenticated user.
+
+  The actual behavior can be determined by looking into
+  framework_bizobj.ShouldRevealEmail. Look at https://crbug.com/monorail/8030
+  for context.
+  This method should be deleted when endpoints and ezt pages are deprecated.
+
+  Args:
+    cnxn: MonorailConnection to the database.
+    services: Services object for connections to backend services.
+    auth: AuthData object that identifies the logged in user.
+    users_by_id: dictionary of UserView's that might be displayed.
+    project: Optional Project PB for the current project.
+
+  Returns:
+    Nothing, but the UserViews in users_by_id may be modified to
+    publish email address.
+  """
+  if project:
+    for user_view in users_by_id.values():
+      if framework_bizobj.DeprecatedShouldRevealEmail(auth, project,
+                                                      user_view.email):
+        user_view.RevealEmail()
+  else:
+    viewable_users = framework_bizobj.FilterViewableEmails(
+        cnxn, services, auth, users_by_id.values())
+    for user_view in viewable_users:
+      user_view.RevealEmail()
+
+
+def RevealAllEmails(users_by_id):
+  """Allow anyone to see unobscured email addresses of project members.
+
+  The modified view objects should only be used to generate views for other
+  project members.
+
+  Args:
+    users_by_id: dictionary of UserViews that will be displayed.
+
+  Returns:
+    Nothing, but the UserViews in users_by_id may be modified to
+    publish email address.
+  """
+  for user_view in users_by_id.values():
+    user_view.RevealEmail()
+
+
+def GetViewedUserDisplayName(mr):
+  """Get display name of the viewed user given the logged-in user."""
+  # Do not obscure email if current user is a site admin. Do not obscure
+  # email if current user is viewing their own profile. For all other
+  # cases do whatever obscure_email setting for the user is.
+  viewing_self = mr.auth.user_id == mr.viewed_user_auth.user_id
+  email_obscured = (not(mr.auth.user_pb.is_site_admin or viewing_self)
+                    and mr.viewed_user_auth.user_view.obscure_email)
+  if email_obscured:
+    (_username, _domain, _obscured_username,
+     obscured_email) = framework_bizobj.ParseAndObscureAddress(
+         mr.viewed_user_auth.email)
+    viewed_user_display_name = obscured_email
+  else:
+    viewed_user_display_name = mr.viewed_user_auth.email
+
+  return viewed_user_display_name
diff --git a/framework/gcs_helpers.py b/framework/gcs_helpers.py
new file mode 100644
index 0000000..a01b565
--- /dev/null
+++ b/framework/gcs_helpers.py
@@ -0,0 +1,207 @@
+# 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
+
+"""Set of helpers for interacting with Google Cloud Storage."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import base64
+import logging
+import os
+import time
+import urllib
+import uuid
+
+from datetime import datetime, timedelta
+
+from google.appengine.api import app_identity
+from google.appengine.api import images
+from google.appengine.api import memcache
+from google.appengine.api import urlfetch
+from third_party import cloudstorage
+from third_party.cloudstorage import errors
+
+from framework import filecontent
+from framework import framework_constants
+from framework import framework_helpers
+
+
+ATTACHMENT_TTL = timedelta(seconds=30)
+
+IS_DEV_APPSERVER = (
+    'development' in os.environ.get('SERVER_SOFTWARE', '').lower())
+
+RESIZABLE_MIME_TYPES = [
+    'image/png', 'image/jpg', 'image/jpeg', 'image/gif', 'image/webp',
+    ]
+
+DEFAULT_THUMB_WIDTH = 250
+DEFAULT_THUMB_HEIGHT = 200
+LOGO_THUMB_WIDTH = 110
+LOGO_THUMB_HEIGHT = 30
+MAX_ATTACH_SIZE_TO_COPY = 10 * 1024 * 1024  # 10 MB
+# GCS signatures are valid for 10 minutes by default, but cache them for
+# 5 minutes just to be on the safe side.
+GCS_SIG_TTL = 60 * 5
+
+
+def _Now():
+  return datetime.utcnow()
+
+
+class UnsupportedMimeType(Exception):
+  pass
+
+
+def DeleteObjectFromGCS(object_id):
+  object_path = ('/' + app_identity.get_default_gcs_bucket_name() + object_id)
+  cloudstorage.delete(object_path)
+
+
+def StoreObjectInGCS(
+    content, mime_type, project_id, thumb_width=DEFAULT_THUMB_WIDTH,
+    thumb_height=DEFAULT_THUMB_HEIGHT, filename=None):
+  bucket_name = app_identity.get_default_gcs_bucket_name()
+  guid = uuid.uuid4()
+  object_id = '/%s/attachments/%s' % (project_id, guid)
+  object_path = '/' + bucket_name + object_id
+  options = {}
+  if filename:
+    if not framework_constants.FILENAME_RE.match(filename):
+      logging.info('bad file name: %s' % filename)
+      filename = 'attachment.dat'
+    options['Content-Disposition'] = 'inline; filename="%s"' % filename
+  logging.info('Writing with options %r', options)
+  with cloudstorage.open(object_path, 'w', mime_type, options=options) as f:
+    f.write(content)
+
+  if mime_type in RESIZABLE_MIME_TYPES:
+    # Create and save a thumbnail too.
+    thumb_content = None
+    try:
+      thumb_content = images.resize(content, thumb_width, thumb_height)
+    except images.LargeImageError:
+      # Don't log the whole exception because we don't need to see
+      # this on the Cloud Error Reporting page.
+      logging.info('Got LargeImageError on image with %d bytes', len(content))
+    except Exception, e:
+      # Do not raise exception for incorrectly formed images.
+      # See https://bugs.chromium.org/p/monorail/issues/detail?id=597 for more
+      # detail.
+      logging.exception(e)
+    if thumb_content:
+      thumb_path = '%s-thumbnail' % object_path
+      with cloudstorage.open(thumb_path, 'w', 'image/png') as f:
+        f.write(thumb_content)
+
+  return object_id
+
+
+def CheckMimeTypeResizable(mime_type):
+  if mime_type not in RESIZABLE_MIME_TYPES:
+    raise UnsupportedMimeType(
+        'Please upload a logo with one of the following mime types:\n%s' %
+            ', '.join(RESIZABLE_MIME_TYPES))
+
+
+def StoreLogoInGCS(file_name, content, project_id):
+  mime_type = filecontent.GuessContentTypeFromFilename(file_name)
+  CheckMimeTypeResizable(mime_type)
+  if '\\' in file_name:  # IE insists on giving us the whole path.
+    file_name = file_name[file_name.rindex('\\') + 1:]
+  return StoreObjectInGCS(
+      content, mime_type, project_id, thumb_width=LOGO_THUMB_WIDTH,
+      thumb_height=LOGO_THUMB_HEIGHT)
+
+
+@framework_helpers.retry(3, delay=0.25, backoff=1.25)
+def _FetchSignedURL(url):
+  """Request that devstorage API signs a GCS content URL."""
+  resp = urlfetch.fetch(url, follow_redirects=False)
+  redir = resp.headers["Location"]
+  return redir
+
+
+def SignUrl(bucket, object_id):
+  """Get a signed URL to download a GCS object.
+
+  Args:
+    bucket: string name of the GCS bucket.
+    object_id: string object ID of the file within that bucket.
+
+  Returns:
+    A signed URL, or '/mising-gcs-url' if signing failed.
+  """
+  try:
+    cache_key = 'gcs-object-url-%s' % object_id
+    cached = memcache.get(key=cache_key)
+    if cached is not None:
+      return cached
+
+    if IS_DEV_APPSERVER:
+      attachment_url = '/_ah/gcs/%s%s' % (bucket, object_id)
+    else:
+      result = ('https://www.googleapis.com/storage/v1/b/'
+          '{bucket}/o/{object_id}?access_token={token}&alt=media')
+      scopes = ['https://www.googleapis.com/auth/devstorage.read_only']
+      if object_id[0] == '/':
+        object_id = object_id[1:]
+      url = result.format(
+          bucket=bucket,
+          object_id=urllib.quote_plus(object_id),
+          token=app_identity.get_access_token(scopes)[0])
+      attachment_url = _FetchSignedURL(url)
+
+    if not memcache.set(key=cache_key, value=attachment_url, time=GCS_SIG_TTL):
+      logging.error('Could not cache gcs url %s for %s', attachment_url,
+          object_id)
+
+    return attachment_url
+
+  except Exception as e:
+    logging.exception(e)
+    return '/missing-gcs-url'
+
+
+def MaybeCreateDownload(bucket_name, object_id, filename):
+  """If the obj is not huge, and no download version exists, create it."""
+  src = '/%s%s' % (bucket_name, object_id)
+  dst = '/%s%s-download' % (bucket_name, object_id)
+  cloudstorage.validate_file_path(src)
+  cloudstorage.validate_file_path(dst)
+  logging.info('Maybe create %r from %r', dst, src)
+
+  if IS_DEV_APPSERVER:
+    logging.info('dev environment never makes download copies.')
+    return False
+
+  # If "Download" object already exists, we are done.
+  try:
+    cloudstorage.stat(dst)
+    logging.info('Download version of attachment already exists')
+    return True
+  except errors.NotFoundError:
+    pass
+
+  # If "View" object is huge, give up.
+  src_stat = cloudstorage.stat(src)
+  if src_stat.st_size > MAX_ATTACH_SIZE_TO_COPY:
+    logging.info('Download version of attachment would be too big')
+    return False
+
+  with cloudstorage.open(src, 'r') as infile:
+    content = infile.read()
+  logging.info('opened GCS object and read %r bytes', len(content))
+  content_type = src_stat.content_type
+  options = {
+    'Content-Disposition': 'attachment; filename="%s"' % filename,
+    }
+  logging.info('Writing with options %r', options)
+  with cloudstorage.open(dst, 'w', content_type, options=options) as outfile:
+    outfile.write(content)
+  logging.info('done writing')
+
+  return True
diff --git a/framework/grid_view_helpers.py b/framework/grid_view_helpers.py
new file mode 100644
index 0000000..44af6b7
--- /dev/null
+++ b/framework/grid_view_helpers.py
@@ -0,0 +1,491 @@
+# 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
+
+"""Classes and functions for displaying grids of project artifacts.
+
+A grid is a two-dimensional display of items where the user can choose
+the X and Y axes.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import ezt
+
+import collections
+import logging
+import settings
+
+from features import features_constants
+from framework import framework_constants
+from framework import sorting
+from framework import table_view_helpers
+from framework import template_helpers
+from framework import urls
+from proto import tracker_pb2
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+
+
+# We shorten long attribute values to fit into the table cells.
+_MAX_CELL_DISPLAY_CHARS = 70
+
+
+def SortGridHeadings(col_name, heading_value_list, users_by_id, config,
+                     asc_accessors):
+  """Sort the grid headings according to well-known status and label order.
+
+  Args:
+    col_name: String column name that is used on that grid axis.
+    heading_value_list: List of grid row or column heading values.
+    users_by_id: Dict mapping user_ids to UserViews.
+    config: ProjectIssueConfig PB for the current project.
+    asc_accessors: Dict (col_name -> function()) for special columns.
+
+  Returns:
+    The same heading values, but sorted in a logical order.
+  """
+  decorated_list = []
+  fd = tracker_bizobj.FindFieldDef(col_name, config)
+  if fd and fd.field_type != tracker_pb2.FieldTypes.ENUM_TYPE:  # Handle fields.
+    for value in heading_value_list:
+      field_value = tracker_bizobj.GetFieldValueWithRawValue(
+          fd.field_type, None, users_by_id, value)
+      decorated_list.append([field_value, field_value])
+  elif col_name == 'status':
+    wk_statuses = [wks.status.lower()
+                   for wks in config.well_known_statuses]
+    decorated_list = [(_WKSortingValue(value.lower(), wk_statuses), value)
+                      for value in heading_value_list]
+
+  elif col_name in asc_accessors:  # Special cols still sort alphabetically.
+    decorated_list = [(value, value)
+                      for value in heading_value_list]
+
+  else:  # Anything else is assumed to be a label prefix
+    col_name_dash = col_name + '-'
+    wk_labels = []
+    for wkl in config.well_known_labels:
+      lab_lower = wkl.label.lower()
+      if lab_lower.startswith(col_name_dash):
+        wk_labels.append(lab_lower.split('-', 1)[-1])
+    decorated_list = [(_WKSortingValue(value.lower(), wk_labels), value)
+                      for value in heading_value_list]
+
+  decorated_list.sort()
+  result = [decorated_tuple[1] for decorated_tuple in decorated_list]
+  logging.info('Headers for %s are: %r', col_name, result)
+  return result
+
+
+def _WKSortingValue(value, well_known_list):
+  """Return a value used to sort headings so that well-known ones are first."""
+  if not value:
+    return sorting.MAX_STRING  # Undefined values sort last.
+  try:
+    # well-known values sort by index
+    return well_known_list.index(value)
+  except ValueError:
+    return value  # odd-ball values lexicographically after all well-known ones
+
+
+def MakeGridData(
+    artifacts, x_attr, x_headings, y_attr, y_headings, users_by_id,
+    artifact_view_factory, all_label_values, config, related_issues,
+    hotlist_context_dict=None):
+  """Return a list of grid row items for display by EZT.
+
+  Args:
+    artifacts: a list of issues to consider showing.
+    x_attr: lowercase name of the attribute that defines the x-axis.
+    x_headings: list of values for column headings.
+    y_attr: lowercase name of the attribute that defines the y-axis.
+    y_headings: list of values for row headings.
+    users_by_id: dict {user_id: user_view, ...} for referenced users.
+    artifact_view_factory: constructor for grid tiles.
+    all_label_values: pre-parsed dictionary of values from the key-value
+        labels on each issue: {issue_id: {key: [val,...], ...}, ...}
+    config: ProjectIssueConfig PB for the current project.
+    related_issues: dict {issue_id: issue} of pre-fetched related issues.
+    hotlist_context_dict: dict{issue_id: {hotlist_item_field: field_value, ..}}
+
+  Returns:
+    A list of EZTItems, each representing one grid row, and each having
+    a nested list of grid cells.
+
+  Each grid row has a row name, and a list of cells.  Each cell has a
+  list of tiles.  Each tile represents one artifact.  Artifacts are
+  represented once in each cell that they match, so one artifact that
+  has multiple values for a certain attribute can occur in multiple cells.
+  """
+  x_attr = x_attr.lower()
+  y_attr = y_attr.lower()
+
+  # A flat dictionary {(x, y): [cell, ...], ...] for the whole grid.
+  x_y_data = collections.defaultdict(list)
+
+  # Put each issue into the grid cell(s) where it belongs.
+  for art in artifacts:
+    if hotlist_context_dict:
+      hotlist_issues_context = hotlist_context_dict[art.issue_id]
+    else:
+      hotlist_issues_context = None
+    label_value_dict = all_label_values[art.local_id]
+    x_vals = GetArtifactAttr(
+        art, x_attr, users_by_id, label_value_dict, config, related_issues,
+        hotlist_issue_context=hotlist_issues_context)
+    y_vals = GetArtifactAttr(
+        art, y_attr, users_by_id, label_value_dict, config, related_issues,
+        hotlist_issue_context=hotlist_issues_context)
+    tile = artifact_view_factory(art)
+
+    # Put the current issue into each cell where it belongs, which will usually
+    # be exactly 1 cell, but it could be a few.
+    if x_attr != '--' and y_attr != '--':  # User specified both axes.
+      for x in x_vals:
+        for y in y_vals:
+          x_y_data[x, y].append(tile)
+    elif y_attr != '--':  # User only specified Y axis.
+      for y in y_vals:
+        x_y_data['All', y].append(tile)
+    elif x_attr != '--':  # User only specified X axis.
+      for x in x_vals:
+        x_y_data[x, 'All'].append(tile)
+    else:  # User specified neither axis.
+      x_y_data['All', 'All'].append(tile)
+
+  # Convert the dictionary to a list-of-lists so that EZT can iterate over it.
+  grid_data = []
+  i = 0
+  for y in y_headings:
+    cells_in_row = []
+    for x in x_headings:
+      tiles = x_y_data[x, y]
+      for tile in tiles:
+        tile.data_idx = i
+        i += 1
+
+      drill_down = ''
+      if x_attr != '--':
+        drill_down = MakeDrillDownSearch(x_attr, x)
+      if y_attr != '--':
+        drill_down += MakeDrillDownSearch(y_attr, y)
+
+      cells_in_row.append(template_helpers.EZTItem(
+          tiles=tiles, count=len(tiles), drill_down=drill_down))
+    grid_data.append(template_helpers.EZTItem(
+        grid_y_heading=y, cells_in_row=cells_in_row))
+
+  return grid_data
+
+
+def MakeDrillDownSearch(attr, value):
+  """Constructs search term for drill-down.
+
+  Args:
+    attr: lowercase name of the attribute to narrow the search on.
+    value: value to narrow the search to.
+
+  Returns:
+    String with user-query term to narrow a search to the given attr value.
+  """
+  if value == framework_constants.NO_VALUES:
+    return '-has:%s ' % attr
+  else:
+    return '%s=%s ' % (attr, value)
+
+
+def MakeLabelValuesDict(art):
+  """Return a dict of label values and a list of one-word labels.
+
+  Args:
+    art: artifact object, e.g., an issue PB.
+
+  Returns:
+    A dict {prefix: [suffix,...], ...} for each key-value label.
+  """
+  label_values = collections.defaultdict(list)
+  for label_name in tracker_bizobj.GetLabels(art):
+    if '-' in label_name:
+      key, value = label_name.split('-', 1)
+      label_values[key.lower()].append(value)
+
+  return label_values
+
+
+def GetArtifactAttr(
+    art, attribute_name, users_by_id, label_attr_values_dict,
+    config, related_issues, hotlist_issue_context=None):
+  """Return the requested attribute values of the given artifact.
+
+  Args:
+    art: a tracked artifact with labels, local_id, summary, stars, and owner.
+    attribute_name: lowercase string name of attribute to get.
+    users_by_id: dictionary of UserViews already created.
+    label_attr_values_dict: dictionary {'key': [value, ...], }.
+    config: ProjectIssueConfig PB for the current project.
+    related_issues: dict {issue_id: issue} of pre-fetched related issues.
+    hotlist_issue_context: dict of {hotlist_issue_field: field_value,..}
+
+  Returns:
+    A list of string attribute values, or [framework_constants.NO_VALUES]
+    if the artifact has no value for that attribute.
+  """
+  if attribute_name == '--':
+    return []
+  if attribute_name == 'id':
+    return [art.local_id]
+  if attribute_name == 'summary':
+    return [art.summary]
+  if attribute_name == 'status':
+    return [tracker_bizobj.GetStatus(art)]
+  if attribute_name == 'stars':
+    return [art.star_count]
+  if attribute_name == 'attachments':
+    return [art.attachment_count]
+  # TODO(jrobbins): support blocking
+  if attribute_name == 'project':
+    return [art.project_name]
+  if attribute_name == 'mergedinto':
+    if art.merged_into and art.merged_into != 0:
+      return [tracker_bizobj.FormatIssueRef((
+          related_issues[art.merged_into].project_name,
+          related_issues[art.merged_into].local_id))]
+    else:
+      return [framework_constants.NO_VALUES]
+  if attribute_name == 'blocked':
+    return ['Yes' if art.blocked_on_iids else 'No']
+  if attribute_name == 'blockedon':
+    if not art.blocked_on_iids:
+      return [framework_constants.NO_VALUES]
+    else:
+      return [tracker_bizobj.FormatIssueRef((
+          related_issues[blocked_on_iid].project_name,
+          related_issues[blocked_on_iid].local_id)) for
+              blocked_on_iid in art.blocked_on_iids]
+  if attribute_name == 'blocking':
+    if not art.blocking_iids:
+      return [framework_constants.NO_VALUES]
+    return [tracker_bizobj.FormatIssueRef((
+        related_issues[blocking_iid].project_name,
+        related_issues[blocking_iid].local_id)) for
+            blocking_iid in art.blocking_iids]
+  if attribute_name == 'adder':
+    if hotlist_issue_context:
+      adder_id = hotlist_issue_context['adder_id']
+      return [users_by_id[adder_id].display_name]
+    else:
+      return [framework_constants.NO_VALUES]
+  if attribute_name == 'added':
+    if hotlist_issue_context:
+      return [hotlist_issue_context['date_added']]
+    else:
+      return [framework_constants.NO_VALUES]
+  if attribute_name == 'reporter':
+    return [users_by_id[art.reporter_id].display_name]
+  if attribute_name == 'owner':
+    owner_id = tracker_bizobj.GetOwnerId(art)
+    if not owner_id:
+      return [framework_constants.NO_VALUES]
+    else:
+      return [users_by_id[owner_id].display_name]
+  if attribute_name == 'cc':
+    cc_ids = tracker_bizobj.GetCcIds(art)
+    if not cc_ids:
+      return [framework_constants.NO_VALUES]
+    else:
+      return [users_by_id[cc_id].display_name for cc_id in cc_ids]
+  if attribute_name == 'component':
+    comp_ids = list(art.component_ids) + list(art.derived_component_ids)
+    if not comp_ids:
+      return [framework_constants.NO_VALUES]
+    else:
+      paths = []
+      for comp_id in comp_ids:
+        cd = tracker_bizobj.FindComponentDefByID(comp_id, config)
+        if cd:
+          paths.append(cd.path)
+      return paths
+
+  # Check to see if it is a field. Process as field only if it is not an enum
+  # type because enum types are stored as key-value labels.
+  fd = tracker_bizobj.FindFieldDef(attribute_name, config)
+  if fd and fd.field_type != tracker_pb2.FieldTypes.ENUM_TYPE:
+    values = []
+    for fv in art.field_values:
+      if fv.field_id == fd.field_id:
+        value = tracker_bizobj.GetFieldValueWithRawValue(
+            fd.field_type, fv, users_by_id, None)
+        values.append(value)
+    return values
+
+  # Since it is not a built-in attribute or a field, it must be a key-value
+  # label.
+  return label_attr_values_dict.get(
+      attribute_name, [framework_constants.NO_VALUES])
+
+
+def AnyArtifactHasNoAttr(
+    artifacts, attr_name, users_by_id, all_label_values, config,
+    related_issues, hotlist_context_dict=None):
+  """Return true if any artifact does not have a value for attr_name."""
+  # TODO(jrobbins): all_label_values needs to be keyed by issue_id to allow
+  # cross-project grid views.
+  for art in artifacts:
+    if hotlist_context_dict:
+      hotlist_issue_context = hotlist_context_dict[art.issue_id]
+    else:
+      hotlist_issue_context = None
+    vals = GetArtifactAttr(
+        art, attr_name.lower(), users_by_id, all_label_values[art.local_id],
+        config, related_issues, hotlist_issue_context=hotlist_issue_context)
+    if framework_constants.NO_VALUES in vals:
+      return True
+
+  return False
+
+
+def GetGridViewData(
+    mr, results, config, users_by_id, starred_iid_set,
+    grid_limited, related_issues, hotlist_context_dict=None):
+  """EZT template values to render a Grid View of issues.
+  Args:
+    mr: commonly used info parsed from the request.
+    results: The Issue PBs that are the search results to be displayed.
+    config: The ProjectConfig PB for the project this view is in.
+    users_by_id: A dictionary {user_id: user_view,...} for all the users
+        involved in results.
+    starred_iid_set: Set of issues that the user has starred.
+    grid_limited: True if the results were limited to fit within the grid.
+    related_issues: dict {issue_id: issue} of pre-fetched related issues.
+    hotlist_context_dict: dict for building a hotlist grid table
+
+  Returns:
+    Dictionary for EZT template rendering of the Grid View.
+  """
+  # We need ordered_columns because EZT loops have no loop-counter available.
+  # And, we use column number in the Javascript to hide/show columns.
+  columns = mr.col_spec.split()
+  ordered_columns = [template_helpers.EZTItem(col_index=i, name=col)
+                     for i, col in enumerate(columns)]
+  other_built_in_cols = (features_constants.OTHER_BUILT_IN_COLS if
+                         hotlist_context_dict else
+                         tracker_constants.OTHER_BUILT_IN_COLS)
+  unshown_columns = table_view_helpers.ComputeUnshownColumns(
+      results, columns, config, other_built_in_cols)
+
+  grid_x_attr = (mr.x or config.default_x_attr or '--').lower()
+  grid_y_attr = (mr.y or config.default_y_attr or '--').lower()
+
+  # Prevent the user from using an axis that we don't support.
+  for bad_axis in tracker_constants.NOT_USED_IN_GRID_AXES:
+    lower_bad_axis = bad_axis.lower()
+    if grid_x_attr == lower_bad_axis:
+      grid_x_attr = '--'
+    if grid_y_attr == lower_bad_axis:
+      grid_y_attr = '--'
+  # Using the same attribute on both X and Y is not useful.
+  if grid_x_attr == grid_y_attr:
+    grid_x_attr = '--'
+
+  all_label_values = {}
+  for art in results:
+    all_label_values[art.local_id] = (
+        MakeLabelValuesDict(art))
+
+  if grid_x_attr == '--':
+    grid_x_headings = ['All']
+  else:
+    grid_x_items = table_view_helpers.ExtractUniqueValues(
+        [grid_x_attr], results, users_by_id, config, related_issues,
+        hotlist_context_dict=hotlist_context_dict)
+    grid_x_headings = grid_x_items[0].filter_values
+    if AnyArtifactHasNoAttr(
+        results, grid_x_attr, users_by_id, all_label_values,
+        config, related_issues, hotlist_context_dict= hotlist_context_dict):
+      grid_x_headings.append(framework_constants.NO_VALUES)
+    grid_x_headings = SortGridHeadings(
+        grid_x_attr, grid_x_headings, users_by_id, config,
+        tracker_helpers.SORTABLE_FIELDS)
+
+  if grid_y_attr == '--':
+    grid_y_headings = ['All']
+  else:
+    grid_y_items = table_view_helpers.ExtractUniqueValues(
+        [grid_y_attr], results, users_by_id, config, related_issues,
+        hotlist_context_dict=hotlist_context_dict)
+    grid_y_headings = grid_y_items[0].filter_values
+    if AnyArtifactHasNoAttr(
+        results, grid_y_attr, users_by_id, all_label_values,
+        config, related_issues, hotlist_context_dict= hotlist_context_dict):
+      grid_y_headings.append(framework_constants.NO_VALUES)
+    grid_y_headings = SortGridHeadings(
+        grid_y_attr, grid_y_headings, users_by_id, config,
+        tracker_helpers.SORTABLE_FIELDS)
+
+  logging.info('grid_x_headings = %s', grid_x_headings)
+  logging.info('grid_y_headings = %s', grid_y_headings)
+  grid_data = PrepareForMakeGridData(
+      results, starred_iid_set, grid_x_attr, grid_x_headings,
+      grid_y_attr, grid_y_headings, users_by_id, all_label_values,
+      config, related_issues, hotlist_context_dict=hotlist_context_dict)
+
+  grid_axis_choice_dict = {}
+  for oc in ordered_columns:
+    grid_axis_choice_dict[oc.name] = True
+  for uc in unshown_columns:
+    grid_axis_choice_dict[uc] = True
+  for bad_axis in tracker_constants.NOT_USED_IN_GRID_AXES:
+    if bad_axis in grid_axis_choice_dict:
+      del grid_axis_choice_dict[bad_axis]
+  grid_axis_choices = list(grid_axis_choice_dict.keys())
+  grid_axis_choices.sort()
+
+  grid_cell_mode = mr.cells
+  if len(results) > settings.max_tiles_in_grid and mr.cells == 'tiles':
+    grid_cell_mode = 'ids'
+
+  grid_view_data = {
+      'grid_limited': ezt.boolean(grid_limited),
+      'grid_shown': len(results),
+      'grid_x_headings': grid_x_headings,
+      'grid_y_headings': grid_y_headings,
+      'grid_data': grid_data,
+      'grid_axis_choices': grid_axis_choices,
+      'grid_cell_mode': grid_cell_mode,
+      'results': results,  # Really only useful in if-any.
+  }
+  return grid_view_data
+
+
+def PrepareForMakeGridData(
+    allowed_results, starred_iid_set, x_attr,
+    grid_col_values, y_attr, grid_row_values, users_by_id, all_label_values,
+    config, related_issues, hotlist_context_dict=None):
+  """Return all data needed for EZT to render the body of the grid view."""
+
+  def IssueViewFactory(issue):
+    return template_helpers.EZTItem(
+      summary=issue.summary, local_id=issue.local_id, issue_id=issue.issue_id,
+      status=issue.status or issue.derived_status, starred=None, data_idx=0,
+      project_name=issue.project_name)
+
+  grid_data = MakeGridData(
+      allowed_results, x_attr, grid_col_values, y_attr, grid_row_values,
+      users_by_id, IssueViewFactory, all_label_values, config, related_issues,
+      hotlist_context_dict=hotlist_context_dict)
+  issue_dict = {issue.issue_id: issue for issue in allowed_results}
+  for grid_row in grid_data:
+    for grid_cell in grid_row.cells_in_row:
+      for tile in grid_cell.tiles:
+        if tile.issue_id in starred_iid_set:
+          tile.starred = ezt.boolean(True)
+        issue = issue_dict[tile.issue_id]
+        tile.issue_url = tracker_helpers.FormatRelativeIssueURL(
+            issue.project_name, urls.ISSUE_DETAIL, id=tile.local_id)
+        tile.issue_ref = issue.project_name + ':' + str(tile.local_id)
+
+  return grid_data
diff --git a/framework/jsonfeed.py b/framework/jsonfeed.py
new file mode 100644
index 0000000..44e9cea
--- /dev/null
+++ b/framework/jsonfeed.py
@@ -0,0 +1,134 @@
+# 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
+
+"""This file defines a subclass of Servlet for JSON feeds.
+
+A "feed" is a servlet that is accessed by another part of our system and that
+responds with a JSON value rather than HTML to display in a browser.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import httplib
+import json
+import logging
+
+from google.appengine.api import app_identity
+
+import settings
+
+from framework import framework_constants
+from framework import permissions
+from framework import servlet
+from framework import xsrf
+from search import query2ast
+
+# This causes a JS error for a hacker trying to do a cross-site inclusion.
+XSSI_PREFIX = ")]}'\n"
+
+
+class JsonFeed(servlet.Servlet):
+  """A convenient base class for JSON feeds."""
+
+  # By default, JSON output is compact.  Subclasses can set this to
+  # an integer, like 4, for pretty-printed output.
+  JSON_INDENT = None
+
+  # Some JSON handlers can only be accessed from our own app.
+  CHECK_SAME_APP = False
+
+  def HandleRequest(self, _mr):
+    """Override this method to implement handling of the request.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+
+    Returns:
+      A dictionary of json data.
+    """
+    raise servlet.MethodNotSupportedError()
+
+  def _DoRequestHandling(self, request, mr):
+    """Do permission checking, page processing, and response formatting."""
+    try:
+      # TODO(jrobbins): check the XSRF token even for anon users
+      # after the next deployment.
+      if self.CHECK_SECURITY_TOKEN and mr.auth.user_id:
+        # Validate the XSRF token with the specific request path for this
+        # servlet.  But, not every XHR request has a distinct token, so just
+        # use 'xhr' for ones that don't.
+        # TODO(jrobbins): make specific tokens for:
+        # user and project stars, issue options, check names.
+        try:
+          logging.info('request in jsonfeed is %r', request)
+          xsrf.ValidateToken(mr.token, mr.auth.user_id, request.path)
+        except xsrf.TokenIncorrect:
+          logging.info('using token path "xhr"')
+          xsrf.ValidateToken(mr.token, mr.auth.user_id, xsrf.XHR_SERVLET_PATH)
+
+      if self.CHECK_SAME_APP and not settings.local_mode:
+        calling_app_id = request.headers.get('X-Appengine-Inbound-Appid')
+        if calling_app_id != app_identity.get_application_id():
+          self.response.status = httplib.FORBIDDEN
+          return
+
+      self._CheckForMovedProject(mr, request)
+      self.AssertBasePermission(mr)
+
+      json_data = self.HandleRequest(mr)
+
+      self._RenderJsonResponse(json_data)
+
+    except query2ast.InvalidQueryError as e:
+      logging.warning('Trapped InvalidQueryError: %s', e)
+      logging.exception(e)
+      msg = e.message if e.message else 'invalid query'
+      self.abort(400, msg)
+    except permissions.PermissionException as e:
+      logging.info('Trapped PermissionException %s', e)
+      self.response.status = httplib.FORBIDDEN
+
+  # pylint: disable=unused-argument
+  # pylint: disable=arguments-differ
+  # Note: unused arguments necessary because they are specified in
+  # registerpages.py as an extra URL validation step even though we
+  # do our own URL parsing in monorailrequest.py
+  def get(self, project_name=None, viewed_username=None, hotlist_id=None):
+    """Collect page-specific and generic info, then render the page.
+
+    Args:
+      project_name: string project name parsed from the URL by webapp2,
+        but we also parse it out in our code.
+      viewed_username: string user email parsed from the URL by webapp2,
+        but we also parse it out in our code.
+      hotlist_id: string hotlist id parsed from the URL by webapp2,
+        but we also parse it out in our code.
+    """
+    self._DoRequestHandling(self.mr.request, self.mr)
+
+  # pylint: disable=unused-argument
+  # pylint: disable=arguments-differ
+  def post(self, project_name=None, viewed_username=None, hotlist_id=None):
+    """Parse the request, check base perms, and call form-specific code."""
+    self._DoRequestHandling(self.mr.request, self.mr)
+
+  def _RenderJsonResponse(self, json_data):
+    """Serialize the data as JSON so that it can be sent to the browser."""
+    json_str = json.dumps(json_data, indent=self.JSON_INDENT)
+    logging.debug(
+      'Sending JSON response: %r length: %r',
+      json_str[:framework_constants.LOGGING_MAX_LENGTH], len(json_str))
+    self.response.content_type = framework_constants.CONTENT_TYPE_JSON
+    self.response.headers['X-Content-Type-Options'] = (
+        framework_constants.CONTENT_TYPE_JSON_OPTIONS)
+    self.response.write(XSSI_PREFIX)
+    self.response.write(json_str)
+
+
+class InternalTask(JsonFeed):
+  """Internal tasks are JSON feeds that can only be reached by our own code."""
+
+  CHECK_SECURITY_TOKEN = False
diff --git a/framework/monitoring.py b/framework/monitoring.py
new file mode 100644
index 0000000..6ddeeb9
--- /dev/null
+++ b/framework/monitoring.py
@@ -0,0 +1,109 @@
+# 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.
+
+"""Monitoring ts_mon custom to monorail."""
+
+from infra_libs import ts_mon
+from framework import framework_helpers
+
+
+def GetCommonFields(status, name, is_robot=False):
+  # type: (int, str, bool=False) -> Dict[str, Union[int, str, bool]]
+  return {
+      'status': status,
+      'name': name,
+      'is_robot': is_robot,
+  }
+
+
+API_REQUESTS_COUNT = ts_mon.CounterMetric(
+    'monorail/api_requests',
+    'Number of requests to Monorail APIs',
+    [ts_mon.StringField('client_id'),
+     ts_mon.StringField('client_email'),
+     ts_mon.StringField('version')])
+
+def IncrementAPIRequestsCount(version, client_id, client_email=None):
+  # type: (str, str, Optional[str]) -> None
+  """Increment the request count in ts_mon."""
+  if not client_email:
+    client_email = 'anonymous'
+  elif not framework_helpers.IsServiceAccount(client_email):
+    # Avoid value explosion and protect PII info
+    client_email = 'user@email.com'
+
+  fields = {
+      'client_id': client_id,
+      'client_email': client_email,
+      'version': version
+  }
+  API_REQUESTS_COUNT.increment_by(1, fields)
+
+
+# 90% of durations are in the range 11-1873ms.  Growth factor 10^0.06 puts that
+# range into 37 buckets.  Max finite bucket value is 12 minutes.
+DURATION_BUCKETER = ts_mon.GeometricBucketer(10**0.06)
+
+# 90% of sizes are in the range 0.17-217014 bytes.  Growth factor 10^0.1 puts
+# that range into 54 buckets.  Max finite bucket value is 6.3GB.
+SIZE_BUCKETER = ts_mon.GeometricBucketer(10**0.1)
+
+# TODO(https://crbug.com/monorail/9281): Differentiate internal/external calls.
+SERVER_DURATIONS = ts_mon.CumulativeDistributionMetric(
+    'monorail/server_durations',
+    'Time elapsed between receiving a request and sending a'
+    ' response (including parsing) in milliseconds.', [
+        ts_mon.IntegerField('status'),
+        ts_mon.StringField('name'),
+        ts_mon.BooleanField('is_robot'),
+    ],
+    bucketer=DURATION_BUCKETER)
+
+
+def AddServerDurations(elapsed_ms, fields):
+  # type: (int, Dict[str, Union[int, bool]]) -> None
+  SERVER_DURATIONS.add(elapsed_ms, fields=fields)
+
+
+SERVER_RESPONSE_STATUS = ts_mon.CounterMetric(
+    'monorail/server_response_status',
+    'Number of responses sent by HTTP status code.', [
+        ts_mon.IntegerField('status'),
+        ts_mon.StringField('name'),
+        ts_mon.BooleanField('is_robot'),
+    ])
+
+
+def IncrementServerResponseStatusCount(fields):
+  # type: (Dict[str, Union[int, bool]]) -> None
+  SERVER_RESPONSE_STATUS.increment(fields=fields)
+
+
+SERVER_REQUEST_BYTES = ts_mon.CumulativeDistributionMetric(
+    'monorail/server_request_bytes',
+    'Bytes received per http request (body only).', [
+        ts_mon.IntegerField('status'),
+        ts_mon.StringField('name'),
+        ts_mon.BooleanField('is_robot'),
+    ],
+    bucketer=SIZE_BUCKETER)
+
+
+def AddServerRequesteBytes(request_length, fields):
+  # type: (int, Dict[str, Union[int, bool]]) -> None
+  SERVER_REQUEST_BYTES.add(request_length, fields=fields)
+
+
+SERVER_RESPONSE_BYTES = ts_mon.CumulativeDistributionMetric(
+    'monorail/server_response_bytes',
+    'Bytes sent per http request (content only).', [
+        ts_mon.IntegerField('status'),
+        ts_mon.StringField('name'),
+        ts_mon.BooleanField('is_robot'),
+    ],
+    bucketer=SIZE_BUCKETER)
+
+
+def AddServerResponseBytes(response_length, fields):
+  SERVER_RESPONSE_BYTES.add(response_length, fields=fields)
diff --git a/framework/monorailcontext.py b/framework/monorailcontext.py
new file mode 100644
index 0000000..76ecff4
--- /dev/null
+++ b/framework/monorailcontext.py
@@ -0,0 +1,76 @@
+# Copyright 2018 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
+
+"""Context object to hold utility objects used during request processing.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from framework import authdata
+from framework import permissions
+from framework import profiler
+from framework import sql
+from framework import template_helpers
+
+
+class MonorailContext(object):
+  """Context with objects used in request handling mechanics.
+
+  Attrributes:
+    cnxn: MonorailConnection to the SQL DB.
+    auth: AuthData object that identifies the account making the request.
+    perms: PermissionSet for requesting user, set by LookupLoggedInUserPerms().
+    profiler: Profiler object.
+    warnings: A list of warnings to present to the user.
+    errors: A list of errors to present to the user.
+
+  Unlike MonorailRequest, this object does not parse any part of the request,
+  retrieve any business objects (other than the User PB for the requesting
+  user), or check any permissions.
+  """
+
+  def __init__(
+      self, services, cnxn=None, requester=None, auth=None, perms=None,
+      autocreate=True):
+    """Construct a MonorailContext.
+
+    Args:
+      services: Connection to backends.
+      cnxn: Optional connection to SQL database.
+      requester: String email address of user making the request or None.
+      auth: AuthData object used during testing.
+      perms: PermissionSet used during testing.
+      autocreate: Set to False to require that a row in the User table already
+          exists for this user, otherwise raise NoSuchUserException.
+    """
+    self.cnxn = cnxn or sql.MonorailConnection()
+    self.auth = auth or authdata.AuthData.FromEmail(
+        self.cnxn, requester, services, autocreate=autocreate)
+    self.perms = perms  # Usually None until LookupLoggedInUserPerms() called.
+    self.profiler = profiler.Profiler()
+
+    # TODO(jrobbins): make self.errors not be UI-centric.
+    self.warnings = []
+    self.errors = template_helpers.EZTError()
+
+  def LookupLoggedInUserPerms(self, project):
+    """Look up perms for user making a request in project (can be None)."""
+    with self.profiler.Phase('looking up signed in user permissions'):
+      self.perms = permissions.GetPermissions(
+          self.auth.user_pb, self.auth.effective_ids, project)
+
+  def CleanUp(self):
+    """Close the DB cnxn and any other clean up."""
+    if self.cnxn:
+      self.cnxn.Close()
+    self.cnxn = None
+
+  def __repr__(self):
+    """Return a string more useful for debugging."""
+    return '%s(cnxn=%r, auth=%r, perms=%r)' % (
+        self.__class__.__name__, self.cnxn, self.auth, self.perms)
diff --git a/framework/monorailrequest.py b/framework/monorailrequest.py
new file mode 100644
index 0000000..e51aa15
--- /dev/null
+++ b/framework/monorailrequest.py
@@ -0,0 +1,713 @@
+# 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
+
+"""Classes to hold information parsed from a request.
+
+To simplify our servlets and avoid duplication of code, we parse some
+info out of the request as soon as we get it and then pass a MonorailRequest
+object to the servlet-specific request handler methods.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import endpoints
+import logging
+import re
+import urllib
+
+import ezt
+import six
+
+from google.appengine.api import app_identity
+from google.appengine.api import oauth
+
+import webapp2
+
+import settings
+from businesslogic import work_env
+from features import features_constants
+from framework import authdata
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_views
+from framework import monorailcontext
+from framework import permissions
+from framework import profiler
+from framework import sql
+from framework import template_helpers
+from proto import api_pb2_v1
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+_HOSTPORT_RE = re.compile('^[-a-z0-9.]+(:\d+)?$', re.I)
+
+
+# TODO(jrobbins): Stop extending MonorailContext and change whole servlet
+# framework to pass around separate objects for mc and mr.
+class MonorailRequestBase(monorailcontext.MonorailContext):
+  """A base class with common attributes for internal and external requests."""
+
+  def __init__(self, services, requester=None, cnxn=None):
+    super(MonorailRequestBase, self).__init__(
+        services, cnxn=cnxn, requester=requester)
+
+    self.project_name = None
+    self.project = None
+    self.config = None
+
+  @property
+  def project_id(self):
+    return self.project.project_id if self.project else None
+
+
+class MonorailApiRequest(MonorailRequestBase):
+  """A class to hold information parsed from the Endpoints API request."""
+
+  # pylint: disable=attribute-defined-outside-init
+  def __init__(self, request, services, cnxn=None):
+    requester_object = (
+        endpoints.get_current_user() or
+        oauth.get_current_user(
+            framework_constants.OAUTH_SCOPE))
+    requester = requester_object.email().lower()
+    super(MonorailApiRequest, self).__init__(
+        services, requester=requester, cnxn=cnxn)
+    self.me_user_id = self.auth.user_id
+    self.viewed_username = None
+    self.viewed_user_auth = None
+    self.issue = None
+    self.granted_perms = set()
+
+    # query parameters
+    self.params = {
+        'can': 1,
+        'start': 0,
+        'num': tracker_constants.DEFAULT_RESULTS_PER_PAGE,
+        'q': '',
+        'sort': '',
+        'groupby': '',
+        'projects': [],
+        'hotlists': []
+    }
+    self.use_cached_searches = True
+    self.mode = None
+
+    if hasattr(request, 'projectId'):
+      self.project_name = request.projectId
+      with work_env.WorkEnv(self, services) as we:
+        self.project = we.GetProjectByName(self.project_name)
+        self.params['projects'].append(self.project_name)
+        self.config = we.GetProjectConfig(self.project_id)
+        if hasattr(request, 'additionalProject'):
+          self.params['projects'].extend(request.additionalProject)
+          self.params['projects'] = list(set(self.params['projects']))
+    self.LookupLoggedInUserPerms(self.project)
+    if hasattr(request, 'projectId'):
+      with work_env.WorkEnv(self, services) as we:
+        if hasattr(request, 'issueId'):
+          self.issue = we.GetIssueByLocalID(
+              self.project_id, request.issueId, use_cache=False)
+          self.granted_perms = tracker_bizobj.GetGrantedPerms(
+              self.issue, self.auth.effective_ids, self.config)
+    if hasattr(request, 'userId'):
+      self.viewed_username = request.userId.lower()
+      if self.viewed_username == 'me':
+        self.viewed_username = requester
+      self.viewed_user_auth = authdata.AuthData.FromEmail(
+          self.cnxn, self.viewed_username, services)
+    elif hasattr(request, 'groupName'):
+      self.viewed_username = request.groupName.lower()
+      try:
+        self.viewed_user_auth = authdata.AuthData.FromEmail(
+            self.cnxn, self.viewed_username, services)
+      except exceptions.NoSuchUserException:
+        self.viewed_user_auth = None
+
+    # Build q.
+    if hasattr(request, 'q') and request.q:
+      self.params['q'] = request.q
+    if hasattr(request, 'publishedMax') and request.publishedMax:
+      self.params['q'] += ' opened<=%d' % request.publishedMax
+    if hasattr(request, 'publishedMin') and request.publishedMin:
+      self.params['q'] += ' opened>=%d' % request.publishedMin
+    if hasattr(request, 'updatedMax') and request.updatedMax:
+      self.params['q'] += ' modified<=%d' % request.updatedMax
+    if hasattr(request, 'updatedMin') and request.updatedMin:
+      self.params['q'] += ' modified>=%d' % request.updatedMin
+    if hasattr(request, 'owner') and request.owner:
+      self.params['q'] += ' owner:%s' % request.owner
+    if hasattr(request, 'status') and request.status:
+      self.params['q'] += ' status:%s' % request.status
+    if hasattr(request, 'label') and request.label:
+      self.params['q'] += ' label:%s' % request.label
+
+    if hasattr(request, 'can') and request.can:
+      if request.can == api_pb2_v1.CannedQuery.all:
+        self.params['can'] = 1
+      elif request.can == api_pb2_v1.CannedQuery.new:
+        self.params['can'] = 6
+      elif request.can == api_pb2_v1.CannedQuery.open:
+        self.params['can'] = 2
+      elif request.can == api_pb2_v1.CannedQuery.owned:
+        self.params['can'] = 3
+      elif request.can == api_pb2_v1.CannedQuery.reported:
+        self.params['can'] = 4
+      elif request.can == api_pb2_v1.CannedQuery.starred:
+        self.params['can'] = 5
+      elif request.can == api_pb2_v1.CannedQuery.to_verify:
+        self.params['can'] = 7
+      else: # Endpoints should have caught this.
+        raise exceptions.InputException(
+            'Canned query %s is not supported.', request.can)
+    if hasattr(request, 'startIndex') and request.startIndex:
+      self.params['start'] = request.startIndex
+    if hasattr(request, 'maxResults') and request.maxResults:
+      self.params['num'] = request.maxResults
+    if hasattr(request, 'sort') and request.sort:
+      self.params['sort'] = request.sort
+
+    self.query_project_names = self.GetParam('projects')
+    self.group_by_spec = self.GetParam('groupby')
+    self.group_by_spec = ' '.join(ParseColSpec(
+        self.group_by_spec, ignore=tracker_constants.NOT_USED_IN_GRID_AXES))
+    self.sort_spec = self.GetParam('sort')
+    self.sort_spec = ' '.join(ParseColSpec(self.sort_spec))
+    self.query = self.GetParam('q')
+    self.can = self.GetParam('can')
+    self.start = self.GetParam('start')
+    self.num = self.GetParam('num')
+
+  def GetParam(self, query_param_name, default_value=None,
+               _antitamper_re=None):
+    return self.params.get(query_param_name, default_value)
+
+  def GetPositiveIntParam(self, query_param_name, default_value=None):
+    """Returns 0 if the user-provided value is less than 0."""
+    return max(self.GetParam(query_param_name, default_value=default_value),
+               0)
+
+
+class MonorailRequest(MonorailRequestBase):
+  """A class to hold information parsed from the HTTP request.
+
+  The goal of MonorailRequest is to do almost all URL path and query string
+  procesing in one place, which makes the servlet code simpler.
+
+  Attributes:
+   cnxn: connection to the SQL databases.
+   logged_in_user_id: int user ID of the signed-in user, or None.
+   effective_ids: set of signed-in user ID and all their user group IDs.
+   user_pb: User object for the signed in user.
+   project_name: string name of the current project.
+   project_id: int ID of the current projet.
+   viewed_username: string username of the user whose profile is being viewed.
+   can: int "canned query" number to scope the user's search.
+   num: int number of results to show per pagination page.
+   start: int position in result set to show on this pagination page.
+   etc: there are many more, all read-only.
+  """
+
+  # pylint: disable=attribute-defined-outside-init
+  def __init__(self, services, params=None):
+    """Initialize the MonorailRequest object."""
+    # Note: mr starts off assuming anon until ParseRequest() is called.
+    super(MonorailRequest, self).__init__(services)
+    self.form_overrides = {}
+    if params:
+      self.form_overrides.update(params)
+    self.debug_enabled = False
+    self.use_cached_searches = True
+
+    self.hotlist_id = None
+    self.hotlist = None
+    self.hotlist_name = None
+
+    self.viewed_username = None
+    self.viewed_user_auth = authdata.AuthData()
+
+  def ParseRequest(self, request, services, do_user_lookups=True):
+    """Parse tons of useful info from the given request object.
+
+    Args:
+      request: webapp2 Request object w/ path and query params.
+      services: connections to backend servers including DB.
+      do_user_lookups: Set to False to disable lookups during testing.
+    """
+    with self.profiler.Phase('basic parsing'):
+      self.request = request
+      self.current_page_url = request.url
+      self.current_page_url_encoded = urllib.quote_plus(self.current_page_url)
+
+      # Only accept a hostport from the request that looks valid.
+      if not _HOSTPORT_RE.match(request.host):
+        raise exceptions.InputException(
+            'request.host looks funny: %r', request.host)
+
+      logging.info('Request: %s', self.current_page_url)
+
+    with self.profiler.Phase('path parsing'):
+      (viewed_user_val, self.project_name,
+       self.hotlist_id, self.hotlist_name) = _ParsePathIdentifiers(
+           self.request.path)
+      self.viewed_username = _GetViewedEmail(
+          viewed_user_val, self.cnxn, services)
+    with self.profiler.Phase('qs parsing'):
+      self._ParseQueryParameters()
+    with self.profiler.Phase('overrides parsing'):
+      self._ParseFormOverrides()
+
+    if not self.project:  # It can be already set in unit tests.
+      self._LookupProject(services)
+    if self.project_id and services.config:
+      self.config = services.config.GetProjectConfig(self.cnxn, self.project_id)
+
+    if do_user_lookups:
+      if self.viewed_username:
+        self._LookupViewedUser(services)
+      self._LookupLoggedInUser(services)
+      # TODO(jrobbins): re-implement HandleLurkerViewingSelf()
+
+    if not self.hotlist:
+      self._LookupHotlist(services)
+
+    if self.query is None:
+      self.query = self._CalcDefaultQuery()
+
+    prod_debug_allowed = self.perms.HasPerm(
+        permissions.VIEW_DEBUG, self.auth.user_id, None)
+    self.debug_enabled = (request.params.get('debug') and
+                          (settings.local_mode or prod_debug_allowed))
+    # temporary option for perf testing on staging instance.
+    if request.params.get('disable_cache'):
+      if settings.local_mode or 'staging' in request.host:
+        self.use_cached_searches = False
+
+  def _CalcDefaultQuery(self):
+    """When URL has no q= param, return the default for members or ''."""
+    if (self.can == 2 and self.project and self.auth.effective_ids and
+        framework_bizobj.UserIsInProject(self.project, self.auth.effective_ids)
+        and self.config):
+      return self.config.member_default_query
+    else:
+      return ''
+
+  def _ParseQueryParameters(self):
+    """Parse and convert all the query string params used in any servlet."""
+    self.start = self.GetPositiveIntParam('start', default_value=0)
+    self.num = self.GetPositiveIntParam(
+        'num', default_value=tracker_constants.DEFAULT_RESULTS_PER_PAGE)
+    # Prevent DoS attacks that try to make us serve really huge result pages.
+    self.num = min(self.num, settings.max_artifact_search_results_per_page)
+
+    self.invalidation_timestep = self.GetIntParam(
+        'invalidation_timestep', default_value=0)
+
+    self.continue_issue_id = self.GetIntParam(
+        'continue_issue_id', default_value=0)
+    self.redir = self.GetParam('redir')
+
+    # Search scope, a.k.a., canned query ID
+    # TODO(jrobbins): make configurable
+    self.can = self.GetIntParam(
+        'can', default_value=tracker_constants.OPEN_ISSUES_CAN)
+
+    # Search query
+    self.query = self.GetParam('q')
+
+    # Sorting of search results (needed for result list and flipper)
+    self.sort_spec = self.GetParam(
+        'sort', default_value='',
+        antitamper_re=framework_constants.SORTSPEC_RE)
+    self.sort_spec = ' '.join(ParseColSpec(self.sort_spec))
+
+    # Note: This is set later in request handling by ComputeColSpec().
+    self.col_spec = None
+
+    # Grouping of search results (needed for result list and flipper)
+    self.group_by_spec = self.GetParam(
+        'groupby', default_value='',
+        antitamper_re=framework_constants.SORTSPEC_RE)
+    self.group_by_spec = ' '.join(ParseColSpec(
+        self.group_by_spec, ignore=tracker_constants.NOT_USED_IN_GRID_AXES))
+
+    # For issue list and grid mode.
+    self.cursor = self.GetParam('cursor')
+    self.preview = self.GetParam('preview')
+    self.mode = self.GetParam('mode') or 'list'
+    self.x = self.GetParam('x', default_value='')
+    self.y = self.GetParam('y', default_value='')
+    self.cells = self.GetParam('cells', default_value='ids')
+
+    # For the dashboard and issue lists included in the dashboard.
+    self.ajah = self.GetParam('ajah')  # AJAH = Asychronous Javascript And HTML
+    self.table_title = self.GetParam('table_title')
+    self.panel_id = self.GetIntParam('panel')
+
+    # For pagination of updates lists
+    self.before = self.GetPositiveIntParam('before')
+    self.after = self.GetPositiveIntParam('after')
+
+    # For cron tasks and backend calls
+    self.lower_bound = self.GetIntParam('lower_bound')
+    self.upper_bound = self.GetIntParam('upper_bound')
+    self.shard_id = self.GetIntParam('shard_id')
+
+    # For specifying which objects to operate on
+    self.local_id = self.GetIntParam('id')
+    self.local_id_list = self.GetIntListParam('ids')
+    self.seq = self.GetIntParam('seq')
+    self.aid = self.GetIntParam('aid')
+    self.signed_aid = self.GetParam('signed_aid')
+    self.specified_user_id = self.GetIntParam('u', default_value=0)
+    self.specified_logged_in_user_id = self.GetIntParam(
+        'logged_in_user_id', default_value=0)
+    self.specified_me_user_ids = self.GetIntListParam('me_user_ids')
+
+    # TODO(jrobbins): Phase this out after next deployment.  If an old
+    # version of the default GAE module sends a request with the old
+    # me_user_id= parameter, then accept it.
+    specified_me_user_id = self.GetIntParam(
+        'me_user_id', default_value=0)
+    if specified_me_user_id:
+      self.specified_me_user_ids = [specified_me_user_id]
+
+    self.specified_project = self.GetParam('project')
+    self.specified_project_id = self.GetIntParam('project_id')
+    self.query_project_names = self.GetListParam('projects', default_value=[])
+    self.template_name = self.GetParam('template')
+    self.component_path = self.GetParam('component')
+    self.field_name = self.GetParam('field')
+
+    # For image attachments
+    self.inline = bool(self.GetParam('inline'))
+    self.thumb = bool(self.GetParam('thumb'))
+
+    # For JS callbacks
+    self.token = self.GetParam('token')
+    self.starred = bool(self.GetIntParam('starred'))
+
+    # For issue reindexing utility servlet
+    self.auto_submit = self.GetParam('auto_submit')
+
+    # For issue dependency reranking servlet
+    self.parent_id = self.GetIntParam('parent_id')
+    self.target_id = self.GetIntParam('target_id')
+    self.moved_ids = self.GetIntListParam('moved_ids')
+    self.split_above = self.GetBoolParam('split_above')
+
+    # For adding issues to hotlists servlet
+    self.hotlist_ids_remove = self.GetIntListParam('hotlist_ids_remove')
+    self.hotlist_ids_add = self.GetIntListParam('hotlist_ids_add')
+    self.issue_refs = self.GetListParam('issue_refs')
+
+  def _ParseFormOverrides(self):
+    """Support deep linking by allowing the user to set form fields via QS."""
+    allowed_overrides = {
+        'template_name': self.GetParam('template_name'),
+        'initial_summary': self.GetParam('summary'),
+        'initial_description': (self.GetParam('description') or
+                                self.GetParam('comment')),
+        'initial_comment': self.GetParam('comment'),
+        'initial_status': self.GetParam('status'),
+        'initial_owner': self.GetParam('owner'),
+        'initial_cc': self.GetParam('cc'),
+        'initial_blocked_on': self.GetParam('blockedon'),
+        'initial_blocking': self.GetParam('blocking'),
+        'initial_merge_into': self.GetIntParam('mergeinto'),
+        'initial_components': self.GetParam('components'),
+        'initial_hotlists': self.GetParam('hotlists'),
+
+        # For the people pages
+        'initial_add_members': self.GetParam('add_members'),
+        'initially_expanded_form': ezt.boolean(self.GetParam('expand_form')),
+
+        # For user group admin pages
+        'initial_name': (self.GetParam('group_name') or
+                         self.GetParam('proposed_project_name')),
+        }
+
+    # Only keep the overrides that were actually provided in the query string.
+    self.form_overrides.update(
+        (k, v) for (k, v) in allowed_overrides.items()
+        if v is not None)
+
+  def _LookupViewedUser(self, services):
+    """Get information about the viewed user (if any) from the request."""
+    try:
+      with self.profiler.Phase('get viewed user, if any'):
+        self.viewed_user_auth = authdata.AuthData.FromEmail(
+            self.cnxn, self.viewed_username, services, autocreate=False)
+    except exceptions.NoSuchUserException:
+      logging.info('could not find user %r', self.viewed_username)
+      webapp2.abort(404, 'user not found')
+
+    if not self.viewed_user_auth.user_id:
+      webapp2.abort(404, 'user not found')
+
+  def _LookupProject(self, services):
+    """Get information about the current project (if any) from the request.
+
+    Raises:
+      NoSuchProjectException if there is no project with that name.
+    """
+    logging.info('project_name is %r', self.project_name)
+    if self.project_name:
+      self.project = services.project.GetProjectByName(
+          self.cnxn, self.project_name)
+      if not self.project:
+        raise exceptions.NoSuchProjectException()
+
+  def _LookupHotlist(self, services):
+    """Get information about the current hotlist (if any) from the request."""
+    with self.profiler.Phase('get current hotlist, if any'):
+      if self.hotlist_name:
+        hotlist_id_dict = services.features.LookupHotlistIDs(
+            self.cnxn, [self.hotlist_name], [self.viewed_user_auth.user_id])
+        try:
+          self.hotlist_id = hotlist_id_dict[(
+              self.hotlist_name, self.viewed_user_auth.user_id)]
+        except KeyError:
+          webapp2.abort(404, 'invalid hotlist')
+
+      if not self.hotlist_id:
+        logging.info('no hotlist_id or bad hotlist_name, so no hotlist')
+      else:
+        self.hotlist = services.features.GetHotlistByID(
+            self.cnxn, self.hotlist_id)
+        if not self.hotlist or (
+            self.viewed_user_auth.user_id and
+            self.viewed_user_auth.user_id not in self.hotlist.owner_ids):
+          webapp2.abort(404, 'invalid hotlist')
+
+  def _LookupLoggedInUser(self, services):
+    """Get information about the signed-in user (if any) from the request."""
+    self.auth = authdata.AuthData.FromRequest(self.cnxn, services)
+    self.me_user_id = (self.GetIntParam('me') or
+                       self.viewed_user_auth.user_id or self.auth.user_id)
+
+    self.LookupLoggedInUserPerms(self.project)
+
+  def ComputeColSpec(self, config):
+    """Set col_spec based on param, default in the config, or site default."""
+    if self.col_spec is not None:
+      return  # Already set.
+    default_col_spec = ''
+    if config:
+      default_col_spec = config.default_col_spec
+
+    col_spec = self.GetParam(
+        'colspec', default_value=default_col_spec,
+        antitamper_re=framework_constants.COLSPEC_RE)
+    cols_lower = col_spec.lower().split()
+    if self.project and any(
+        hotlist_col in cols_lower for hotlist_col in [
+            'rank', 'adder', 'added']):
+      # if the the list is a project list and the 'colspec' is a carry-over
+      # from hotlists, set col_spec to None so it will be set to default in
+      # in the next if statement
+      col_spec = None
+
+    if not col_spec:
+      # If col spec is still empty then default to the global col spec.
+      col_spec = tracker_constants.DEFAULT_COL_SPEC
+
+    self.col_spec = ' '.join(ParseColSpec(col_spec,
+                             max_parts=framework_constants.MAX_COL_PARTS))
+
+  def PrepareForReentry(self, echo_data):
+    """Expose the results of form processing as if it was a new GET.
+
+    This method is called only when the user submits a form with invalid
+    information which they are being asked to correct it.  Updating the MR
+    object allows the normal servlet get() method to populate the form with
+    the entered values and error messages.
+
+    Args:
+      echo_data: dict of {page_data_key: value_to_reoffer, ...} that will
+          override whatever HTML form values are nomally shown to the
+          user when they initially view the form.  This allows them to
+          fix user input that was not valid.
+    """
+    self.form_overrides.update(echo_data)
+
+  def GetParam(self, query_param_name, default_value=None,
+               antitamper_re=None):
+    """Get a query parameter from the URL as a utf8 string."""
+    value = self.request.params.get(query_param_name)
+    assert value is None or isinstance(value, six.text_type)
+    using_default = value is None
+    if using_default:
+      value = default_value
+
+    if antitamper_re and not antitamper_re.match(value):
+      if using_default:
+        logging.error('Default value fails antitamper for %s field: %s',
+                      query_param_name, value)
+      else:
+        logging.info('User seems to have tampered with %s field: %s',
+                     query_param_name, value)
+      raise exceptions.InputException()
+
+    return value
+
+  def GetIntParam(self, query_param_name, default_value=None):
+    """Get an integer param from the URL or default."""
+    value = self.request.params.get(query_param_name)
+    if value is None or value == '':
+      return default_value
+
+    try:
+      return int(value)
+    except (TypeError, ValueError):
+      raise exceptions.InputException(
+          'Invalid value for integer param: %r' % value)
+
+  def GetPositiveIntParam(self, query_param_name, default_value=None):
+    """Returns 0 if the user-provided value is less than 0."""
+    return max(self.GetIntParam(query_param_name, default_value=default_value),
+               0)
+
+  def GetListParam(self, query_param_name, default_value=None):
+    """Get a list of strings from the URL or default."""
+    params = self.request.params.get(query_param_name)
+    if params is None:
+      return default_value
+    if not params:
+      return []
+    return params.split(',')
+
+  def GetIntListParam(self, query_param_name, default_value=None):
+    """Get a list of ints from the URL or default."""
+    param_list = self.GetListParam(query_param_name)
+    if param_list is None:
+      return default_value
+
+    try:
+      return [int(p) for p in param_list]
+    except (TypeError, ValueError):
+      raise exceptions.InputException('Invalid value for integer list param')
+
+  def GetBoolParam(self, query_param_name, default_value=None):
+    """Get a boolean param from the URL or default."""
+    value = self.request.params.get(query_param_name)
+    if value is None:
+      return default_value
+
+    if (not value) or (value.lower() == 'false'):
+      return False
+    return True
+
+
+def _ParsePathIdentifiers(path):
+  """Parse out the workspace being requested (if any).
+
+  Args:
+    path: A string beginning with the request's path info.
+
+  Returns:
+    (viewed_user_val, project_name).
+  """
+  viewed_user_val = None
+  project_name = None
+  hotlist_id = None
+  hotlist_name = None
+
+  # Strip off any query params
+  split_path = path.lstrip('/').split('?')[0].split('/')
+  if len(split_path) >= 2:
+    if split_path[0] == 'hotlists':
+      if split_path[1].isdigit():
+        hotlist_id = int(split_path[1])
+    if split_path[0] == 'p':
+      project_name = split_path[1]
+    if split_path[0] == 'u' or split_path[0] == 'users':
+      viewed_user_val = urllib.unquote(split_path[1])
+      if len(split_path) >= 4 and split_path[2] == 'hotlists':
+        try:
+          hotlist_id = int(
+              urllib.unquote(split_path[3].split('.')[0]))
+        except ValueError:
+          raw_last_path = (split_path[3][:-3] if
+                        split_path[3].endswith('.do') else split_path[3])
+          last_path = urllib.unquote(raw_last_path)
+          match = framework_bizobj.RE_HOTLIST_NAME.match(
+              last_path)
+          if not match:
+            raise exceptions.InputException(
+                'Could not parse hotlist id or name')
+          else:
+            hotlist_name = last_path.lower()
+
+    if split_path[0] == 'g':
+      viewed_user_val = urllib.unquote(split_path[1])
+
+  return viewed_user_val, project_name, hotlist_id, hotlist_name
+
+
+def _GetViewedEmail(viewed_user_val, cnxn, services):
+  """Returns the viewed user's email.
+
+  Args:
+    viewed_user_val: Could be either int (user_id) or str (email).
+    cnxn: connection to the SQL database.
+    services: Interface to all persistence storage backends.
+
+  Returns:
+    viewed_email
+  """
+  if not viewed_user_val:
+    return None
+
+  try:
+    viewed_userid = int(viewed_user_val)
+    viewed_email = services.user.LookupUserEmail(cnxn, viewed_userid)
+    if not viewed_email:
+      logging.info('userID %s not found', viewed_userid)
+      webapp2.abort(404, 'user not found')
+  except ValueError:
+    viewed_email = viewed_user_val
+
+  return viewed_email
+
+
+def ParseColSpec(
+    col_spec, max_parts=framework_constants.MAX_SORT_PARTS,
+    ignore=None):
+  """Split a string column spec into a list of column names.
+
+  We dedup col parts because an attacker could try to DoS us or guess
+  zero or one result by measuring the time to process a request that
+  has a very long column list.
+
+  Args:
+    col_spec: a unicode string containing a list of labels.
+    max_parts: optional int maximum number of parts to consider.
+    ignore: optional list of column name parts to ignore.
+
+  Returns:
+    A list of the extracted labels. Non-alphanumeric
+    characters other than the period will be stripped from the text.
+  """
+  cols = framework_constants.COLSPEC_COL_RE.findall(col_spec)
+  result = []  # List of column headers with no duplicates.
+  # Set of column parts that we have processed so far.
+  seen = set()
+  if ignore:
+    seen = set(ignore_col.lower() for ignore_col in ignore)
+    max_parts += len(ignore)
+
+  for col in cols:
+    parts = []
+    for part in col.split('/'):
+      if (part.lower() not in seen and len(seen) < max_parts
+          and len(part) < framework_constants.MAX_COL_LEN):
+        parts.append(part)
+        seen.add(part.lower())
+    if parts:
+      result.append('/'.join(parts))
+  return result
diff --git a/framework/paginate.py b/framework/paginate.py
new file mode 100644
index 0000000..bbe0998
--- /dev/null
+++ b/framework/paginate.py
@@ -0,0 +1,202 @@
+# 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
+
+"""Classes that help display pagination widgets for result sets."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import base64
+import logging
+import hmac
+
+import ezt
+from google.protobuf import message
+
+import settings
+from framework import exceptions
+from framework import framework_helpers
+from services import secrets_svc
+from proto import secrets_pb2
+
+
+def GeneratePageToken(request_contents, start):
+  # type: (secrets_pb2.ListRequestContents, int) -> str
+  """Encrypts a List requests's contents and generates a next page token.
+
+  Args:
+    request_contents: ListRequestContents object that holds data given by the
+      request.
+    start: int start index that should be used for the subsequent request.
+
+  Returns:
+    String next_page_token that is a serialized PageTokenContents object.
+  """
+  digester = hmac.new(secrets_svc.GetPaginationKey())
+  digester.update(request_contents.SerializeToString())
+  token_contents = secrets_pb2.PageTokenContents(
+      start=start,
+      encrypted_list_request_contents=digester.digest())
+  serialized_token = token_contents.SerializeToString()
+  # Page tokens must be URL-safe strings (see aip.dev/158)
+  # and proto string fields must be utf-8 strings while
+  # `SerializeToString()` returns binary bytes contained in a str type.
+  # So we must encode with web-safe base64 format.
+  return base64.b64encode(serialized_token)
+
+
+def ValidateAndParsePageToken(token, request_contents):
+  # type: (str, secrets_pb2.ListRequestContents) -> int
+  """Returns the start index of the page if the token is valid.
+
+  Args:
+    token: String token given in a ListFoo API request.
+    request_contents: ListRequestContents object that holds data given by the
+      request.
+
+  Returns:
+    The start index that should be used when getting the requested page.
+
+  Raises:
+    PageTokenException: if the token is invalid or incorrect for the given
+      request_contents.
+  """
+  token_contents = secrets_pb2.PageTokenContents()
+  try:
+    decoded_serialized_token = base64.b64decode(token)
+    token_contents.ParseFromString(decoded_serialized_token)
+  except (message.DecodeError, TypeError):
+    raise exceptions.PageTokenException('Invalid page token.')
+
+  start = token_contents.start
+  expected_token = GeneratePageToken(request_contents, start)
+  if hmac.compare_digest(token, expected_token):
+    return start
+  raise exceptions.PageTokenException(
+      'Request parameters must match those from the previous request.')
+
+
+# If extracting items_per_page and start values from a MonorailRequest object,
+# keep in mind that mr.num and mr.GetPositiveIntParam may return different
+# values. mr.num is the result of calling mr.GetPositiveIntParam with a default
+# value.
+class VirtualPagination(object):
+  """Class to calc Prev and Next pagination links based on result counts."""
+
+  def __init__(self, total_count, items_per_page, start, list_page_url=None,
+               count_up=True, start_param_name='start', num_param_name='num',
+               max_num=None, url_params=None, project_name=None):
+    """Given 'num' and 'start' params, determine Prev and Next links.
+
+    Args:
+      total_count: total number of artifacts that satisfy the query.
+      items_per_page: number of items to display on each page, e.g., 25.
+      start: the start index of the pagination page.
+      list_page_url: URL of the web application page that is displaying
+        the list of artifacts.  Used to build the Prev and Next URLs.
+        If None, no URLs will be built.
+      count_up: if False, count down from total_count.
+      start_param_name: query string parameter name for the start value
+        of the pagination page.
+      num_param: query string parameter name for the number of items
+        to show on a pagination page.
+      max_num: optional limit on the value of the num param.  If not given,
+        settings.max_artifact_search_results_per_page is used.
+      url_params: list of (param_name, param_value) we want to keep
+        in any new urls.
+      project_name: the name of the project we are operating in.
+    """
+    self.total_count = total_count
+    self.prev_url = ''
+    self.reload_url = ''
+    self.next_url = ''
+
+    if max_num is None:
+      max_num = settings.max_artifact_search_results_per_page
+
+    self.num = items_per_page
+    self.num = min(self.num, max_num)
+
+    if count_up:
+      self.start = start or 0
+      self.last = min(self.total_count, self.start + self.num)
+      prev_start = max(0, self.start - self.num)
+      next_start = self.start + self.num
+    else:
+      self.start = start or self.total_count
+      self.last = max(0, self.start - self.num)
+      prev_start = min(self.total_count, self.start + self.num)
+      next_start = self.start - self.num
+
+    if list_page_url:
+      if project_name:
+        list_servlet_rel_url = '/p/%s%s' % (
+            project_name, list_page_url)
+      else:
+        list_servlet_rel_url = list_page_url
+
+      self.reload_url = framework_helpers.FormatURL(
+          url_params, list_servlet_rel_url,
+          **{start_param_name: self.start, num_param_name: self.num})
+
+      if prev_start != self.start:
+        self.prev_url = framework_helpers.FormatURL(
+             url_params, list_servlet_rel_url,
+            **{start_param_name: prev_start, num_param_name: self.num})
+      if ((count_up and next_start < self.total_count) or
+          (not count_up and next_start >= 1)):
+        self.next_url = framework_helpers.FormatURL(
+           url_params, list_servlet_rel_url,
+            **{start_param_name: next_start, num_param_name: self.num})
+
+    self.visible = ezt.boolean(self.last != self.start)
+
+    # Adjust indices to one-based values for display to users.
+    if count_up:
+      self.start += 1
+    else:
+      self.last += 1
+
+  def DebugString(self):
+    """Return a string that is useful in on-page debugging."""
+    return '%s - %s of %s; prev_url:%s; next_url:%s' % (
+        self.start, self.last, self.total_count, self.prev_url, self.next_url)
+
+
+class ArtifactPagination(VirtualPagination):
+  """Class to calc Prev and Next pagination links based on a results list."""
+
+  def __init__(
+      self, results, items_per_page, start, project_name, list_page_url,
+      total_count=None, limit_reached=False, skipped=0, url_params=None):
+    """Given 'num' and 'start' params, determine Prev and Next links.
+
+    Args:
+      results: a list of artifact ids that satisfy the query.
+      items_per_page: number of items to display on each page, e.g., 25.
+      start: the start index of the pagination page.
+      project_name: the name of the project we are operating in.
+      list_page_url: URL of the web application page that is displaying
+        the list of artifacts.  Used to build the Prev and Next URLs.
+      total_count: specify total result count rather than the length of results
+      limit_reached: optional boolean that indicates that more results could
+        not be fetched because a limit was reached.
+      skipped: optional int number of items that were skipped and left off the
+        front of results.
+      url_params: list of (param_name, param_value) we want to keep
+        in any new urls.
+    """
+    if total_count is None:
+      total_count = skipped + len(results)
+    super(ArtifactPagination, self).__init__(
+        total_count, items_per_page, start, list_page_url=list_page_url,
+        project_name=project_name, url_params=url_params)
+
+    self.limit_reached = ezt.boolean(limit_reached)
+    # Determine which of those results should be visible on the current page.
+    range_start = self.start - 1 - skipped
+    range_end = range_start + self.num
+    assert 0 <= range_start <= range_end
+    self.visible_results = results[range_start:range_end]
diff --git a/framework/pbproxy_test_pb2.py b/framework/pbproxy_test_pb2.py
new file mode 100644
index 0000000..3c47ae1
--- /dev/null
+++ b/framework/pbproxy_test_pb2.py
@@ -0,0 +1,24 @@
+# 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
+
+"""Message classes for use by template_helpers_test."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from protorpc import messages
+
+
+class PBProxyExample(messages.Message):
+  """A simple protocol buffer to test template_helpers.PBProxy."""
+  nickname = messages.StringField(1)
+  invited = messages.BooleanField(2, default=False)
+
+
+class PBProxyNested(messages.Message):
+  """A simple protocol buffer to test template_helpers.PBProxy."""
+  nested = messages.MessageField(PBProxyExample, 1)
+  multiple_strings = messages.StringField(2, repeated=True)
+  multiple_pbes = messages.MessageField(PBProxyExample, 3, repeated=True)
diff --git a/framework/permissions.py b/framework/permissions.py
new file mode 100644
index 0000000..eb40dc7
--- /dev/null
+++ b/framework/permissions.py
@@ -0,0 +1,1242 @@
+# 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
+
+"""Classes and functions to implement permission checking.
+
+The main data structure is a simple map from (user role, project status,
+project_access_level) to specific perms.
+
+A perm is simply a string that indicates that the user has a given
+permission.  The servlets and templates can test whether the current
+user has permission to see a UI element or perform an action by
+testing for the presence of the corresponding perm in the user's
+permission set.
+
+The user role is one of admin, owner, member, outsider user, or anon.
+The project status is one of the project states defined in project_pb2,
+or a special constant defined below.  Likewise for access level.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import bisect
+import collections
+import logging
+import time
+
+import ezt
+
+import settings
+from framework import framework_bizobj
+from framework import framework_constants
+from proto import project_pb2
+from proto import site_pb2
+from proto import tracker_pb2
+from proto import usergroup_pb2
+from tracker import tracker_bizobj
+
+# Constants that define permissions.
+# Note that perms with a leading "_" can never be granted
+# to users who are not site admins.
+VIEW = 'View'
+EDIT_PROJECT = 'EditProject'
+CREATE_PROJECT = 'CreateProject'
+PUBLISH_PROJECT = '_PublishProject'  # for making "doomed" projects LIVE
+VIEW_DEBUG = '_ViewDebug'  # on-page debugging info
+EDIT_OTHER_USERS = '_EditOtherUsers'  # can edit other user's prefs, ban, etc.
+CUSTOMIZE_PROCESS = 'CustomizeProcess'  # can use some enterprise features
+VIEW_EXPIRED_PROJECT = '_ViewExpiredProject'  # view long-deleted projects
+# View the list of contributors even in hub-and-spoke projects.
+VIEW_CONTRIBUTOR_LIST = 'ViewContributorList'
+
+# Quota
+VIEW_QUOTA = 'ViewQuota'
+EDIT_QUOTA = 'EditQuota'
+
+# Permissions for editing user groups
+CREATE_GROUP = 'CreateGroup'
+EDIT_GROUP = 'EditGroup'
+DELETE_GROUP = 'DeleteGroup'
+VIEW_GROUP = 'ViewGroup'
+
+# Perms for Source tools
+# TODO(jrobbins): Monorail is just issue tracking with no version control, so
+# phase out use of the term "Commit", sometime after Monorail's initial launch.
+COMMIT = 'Commit'
+
+# Perms for issue tracking
+CREATE_ISSUE = 'CreateIssue'
+EDIT_ISSUE = 'EditIssue'
+EDIT_ISSUE_OWNER = 'EditIssueOwner'
+EDIT_ISSUE_SUMMARY = 'EditIssueSummary'
+EDIT_ISSUE_STATUS = 'EditIssueStatus'
+EDIT_ISSUE_CC = 'EditIssueCc'
+EDIT_ISSUE_APPROVAL = 'EditIssueApproval'
+DELETE_ISSUE = 'DeleteIssue'
+# This allows certain API clients to attribute comments to other users.
+# The permission is not offered in the UI, but it can be typed in as
+# a custom permission name.  The ID of the API client is also recorded.
+IMPORT_COMMENT = 'ImportComment'
+ADD_ISSUE_COMMENT = 'AddIssueComment'
+VIEW_INBOUND_MESSAGES = 'ViewInboundMessages'
+CREATE_HOTLIST = 'CreateHotlist'
+# Note, there is no separate DELETE_ATTACHMENT perm.  We
+# allow a user to delete an attachment iff they could soft-delete
+# the comment that holds the attachment.
+
+# Note: the "_" in the perm name makes it impossible for a
+# project owner to grant it to anyone as an extra perm.
+ADMINISTER_SITE = '_AdministerSite'
+
+# Permissions to soft-delete artifact comment
+DELETE_ANY = 'DeleteAny'
+DELETE_OWN = 'DeleteOwn'
+
+# Granting this allows owners to delegate some team management work.
+EDIT_ANY_MEMBER_NOTES = 'EditAnyMemberNotes'
+
+# Permission to star/unstar any artifact.
+SET_STAR = 'SetStar'
+
+# Permission to flag any artifact as spam.
+FLAG_SPAM = 'FlagSpam'
+VERDICT_SPAM = 'VerdictSpam'
+MODERATE_SPAM = 'ModerateSpam'
+
+# Permissions for custom fields.
+EDIT_FIELD_DEF = 'EditFieldDef'
+EDIT_FIELD_DEF_VALUE = 'EditFieldDefValue'
+
+# Permissions for user hotlists.
+ADMINISTER_HOTLIST = 'AdministerHotlist'
+EDIT_HOTLIST = 'EditHotlist'
+VIEW_HOTLIST = 'ViewHotlist'
+HOTLIST_OWNER_PERMISSIONS = [ADMINISTER_HOTLIST, EDIT_HOTLIST]
+HOTLIST_EDITOR_PERMISSIONS = [EDIT_HOTLIST]
+
+RESTRICTED_APPROVAL_STATUSES = [
+    tracker_pb2.ApprovalStatus.NA,
+    tracker_pb2.ApprovalStatus.APPROVED,
+    tracker_pb2.ApprovalStatus.NOT_APPROVED]
+
+STANDARD_ADMIN_PERMISSIONS = [
+    EDIT_PROJECT, CREATE_PROJECT, PUBLISH_PROJECT, VIEW_DEBUG,
+    EDIT_OTHER_USERS, CUSTOMIZE_PROCESS,
+    VIEW_QUOTA, EDIT_QUOTA, ADMINISTER_SITE,
+    EDIT_ANY_MEMBER_NOTES, VERDICT_SPAM, MODERATE_SPAM]
+
+STANDARD_ISSUE_PERMISSIONS = [
+    VIEW, EDIT_ISSUE, ADD_ISSUE_COMMENT, DELETE_ISSUE, FLAG_SPAM]
+
+# Monorail has no source control, but keep COMMIT for backward compatability.
+STANDARD_SOURCE_PERMISSIONS = [COMMIT]
+
+STANDARD_COMMENT_PERMISSIONS = [DELETE_OWN, DELETE_ANY]
+
+STANDARD_OTHER_PERMISSIONS = [CREATE_ISSUE, FLAG_SPAM, SET_STAR]
+
+STANDARD_PERMISSIONS = (STANDARD_ADMIN_PERMISSIONS +
+                        STANDARD_ISSUE_PERMISSIONS +
+                        STANDARD_SOURCE_PERMISSIONS +
+                        STANDARD_COMMENT_PERMISSIONS +
+                        STANDARD_OTHER_PERMISSIONS)
+
+# roles
+SITE_ADMIN_ROLE = 'admin'
+OWNER_ROLE = 'owner'
+COMMITTER_ROLE = 'committer'
+CONTRIBUTOR_ROLE = 'contributor'
+USER_ROLE = 'user'
+ANON_ROLE = 'anon'
+
+# Project state out-of-band values for keys
+UNDEFINED_STATUS = 'undefined_status'
+UNDEFINED_ACCESS = 'undefined_access'
+WILDCARD_ACCESS = 'wildcard_access'
+
+
+class PermissionSet(object):
+  """Class to represent the set of permissions available to the user."""
+
+  def __init__(self, perm_names, consider_restrictions=True):
+    """Create a PermissionSet with the given permissions.
+
+    Args:
+      perm_names: a list of permission name strings.
+      consider_restrictions: if true, the user's permissions can be blocked
+          by restriction labels on an artifact.  Project owners and site
+          admins do not consider restrictions so that they cannot
+          "lock themselves out" of editing an issue.
+    """
+    self.perm_names = frozenset(p.lower() for p in perm_names)
+    self.consider_restrictions = consider_restrictions
+
+  def __getattr__(self, perm_name):
+    """Easy permission testing in EZT.  E.g., [if-any perms.format_drive]."""
+    return ezt.boolean(self.HasPerm(perm_name, None, None))
+
+  def CanUsePerm(
+      self, perm_name, effective_ids, project, restriction_labels,
+      granted_perms=None):
+    """Return True if the user can use the given permission.
+
+    Args:
+      perm_name: string name of permission, e.g., 'EditIssue'.
+      effective_ids: set of int user IDs for the user (including any groups),
+          or an empty set if user is not signed in.
+      project: Project PB for the project being accessed, or None if not
+          in a project.
+      restriction_labels: list of strings that restrict permission usage.
+      granted_perms: optional list of lowercase strings of permissions that the
+          user is granted only within the scope of one issue, e.g., by being
+          named in a user-type custom field that grants permissions.
+
+    Restriction labels have 3 parts, e.g.:
+    'Restrict-EditIssue-InnerCircle' blocks the use of just the
+    EditIssue permission, unless the user also has the InnerCircle
+    permission.  This allows fine-grained restrictions on specific
+    actions, such as editing, commenting, or deleting.
+
+    Restriction labels and permissions are case-insensitive.
+
+    Returns:
+      True if the user can use the given permission, or False
+      if they cannot (either because they don't have that permission
+      or because it is blocked by a relevant restriction label).
+    """
+    # TODO(jrobbins): room for performance improvement: avoid set creation and
+    # repeated string operations.
+    granted_perms = granted_perms or set()
+    perm_lower = perm_name.lower()
+    if perm_lower in granted_perms:
+      return True
+
+    needed_perms = {perm_lower}
+    if self.consider_restrictions:
+      for label in restriction_labels:
+        label = label.lower()
+        # format: Restrict-Action-ToThisPerm
+        _kw, requested_perm, needed_perm = label.split('-', 2)
+        if requested_perm == perm_lower and needed_perm not in granted_perms:
+          needed_perms.add(needed_perm)
+
+    if not effective_ids:
+      effective_ids = {framework_constants.NO_USER_SPECIFIED}
+
+    # Get all extra perms for all effective ids.
+    # Id X might have perm A and Y might have B, if both A and B are needed
+    # True should be returned.
+    extra_perms = set()
+    for user_id in effective_ids:
+      extra_perms.update(p.lower() for p in GetExtraPerms(project, user_id))
+    return all(self.HasPerm(perm, None, None, extra_perms)
+               for perm in needed_perms)
+
+  def HasPerm(self, perm_name, user_id, project, extra_perms=None):
+    """Return True if the user has the given permission (ignoring user groups).
+
+    Args:
+      perm_name: string name of permission, e.g., 'EditIssue'.
+      user_id: int user id of the user, or None if user is not signed in.
+      project: Project PB for the project being accessed, or None if not
+          in a project.
+      extra_perms: list of extra perms. If not given, GetExtraPerms will be
+          called to get them.
+
+    Returns:
+      True if the user has the given perm.
+    """
+    perm_name = perm_name.lower()
+
+    # Return early if possible.
+    if perm_name in self.perm_names:
+      return True
+
+    if extra_perms is None:
+      # TODO(jrobbins): room for performance improvement: pre-compute
+      # extra perms (maybe merge them into the perms object), avoid
+      # redundant call to lower().
+      return any(
+          p.lower() == perm_name
+          for p in GetExtraPerms(project, user_id))
+
+    return perm_name in extra_perms
+
+  def DebugString(self):
+    """Return a useful string to show when debugging."""
+    return 'PermissionSet(%s)' % ', '.join(sorted(self.perm_names))
+
+  def __repr__(self):
+    return '%s(%r)' % (self.__class__.__name__, self.perm_names)
+
+
+EMPTY_PERMISSIONSET = PermissionSet([])
+
+READ_ONLY_PERMISSIONSET = PermissionSet([VIEW])
+
+USER_PERMISSIONSET = PermissionSet([
+    VIEW, FLAG_SPAM, SET_STAR,
+    CREATE_ISSUE, ADD_ISSUE_COMMENT,
+    DELETE_OWN])
+
+CONTRIBUTOR_ACTIVE_PERMISSIONSET = PermissionSet(
+    [VIEW,
+     FLAG_SPAM, VERDICT_SPAM, SET_STAR,
+     CREATE_ISSUE, ADD_ISSUE_COMMENT,
+     DELETE_OWN])
+
+CONTRIBUTOR_INACTIVE_PERMISSIONSET = PermissionSet(
+    [VIEW])
+
+COMMITTER_ACTIVE_PERMISSIONSET = PermissionSet(
+    [VIEW, COMMIT, VIEW_CONTRIBUTOR_LIST,
+     FLAG_SPAM, VERDICT_SPAM, SET_STAR, VIEW_QUOTA,
+     CREATE_ISSUE, ADD_ISSUE_COMMENT, EDIT_ISSUE, VIEW_INBOUND_MESSAGES,
+     DELETE_OWN])
+
+COMMITTER_INACTIVE_PERMISSIONSET = PermissionSet(
+    [VIEW, VIEW_CONTRIBUTOR_LIST,
+     VIEW_INBOUND_MESSAGES, VIEW_QUOTA])
+
+OWNER_ACTIVE_PERMISSIONSET = PermissionSet(
+    [VIEW, VIEW_CONTRIBUTOR_LIST, EDIT_PROJECT, COMMIT,
+     FLAG_SPAM, VERDICT_SPAM, SET_STAR, VIEW_QUOTA,
+     CREATE_ISSUE, ADD_ISSUE_COMMENT, EDIT_ISSUE, DELETE_ISSUE,
+     VIEW_INBOUND_MESSAGES,
+     DELETE_ANY, EDIT_ANY_MEMBER_NOTES],
+    consider_restrictions=False)
+
+OWNER_INACTIVE_PERMISSIONSET = PermissionSet(
+    [VIEW, VIEW_CONTRIBUTOR_LIST, EDIT_PROJECT,
+     VIEW_INBOUND_MESSAGES, VIEW_QUOTA],
+    consider_restrictions=False)
+
+ADMIN_PERMISSIONSET = PermissionSet(
+    [VIEW, VIEW_CONTRIBUTOR_LIST,
+     CREATE_PROJECT, EDIT_PROJECT, PUBLISH_PROJECT, VIEW_DEBUG,
+     COMMIT, CUSTOMIZE_PROCESS, FLAG_SPAM, VERDICT_SPAM, SET_STAR,
+     ADMINISTER_SITE, VIEW_EXPIRED_PROJECT, EDIT_OTHER_USERS,
+     VIEW_QUOTA, EDIT_QUOTA,
+     CREATE_ISSUE, ADD_ISSUE_COMMENT, EDIT_ISSUE, DELETE_ISSUE,
+     EDIT_ISSUE_APPROVAL,
+     VIEW_INBOUND_MESSAGES,
+     DELETE_ANY, EDIT_ANY_MEMBER_NOTES,
+     CREATE_GROUP, EDIT_GROUP, DELETE_GROUP, VIEW_GROUP,
+     MODERATE_SPAM, CREATE_HOTLIST],
+     consider_restrictions=False)
+
+GROUP_IMPORT_BORG_PERMISSIONSET = PermissionSet(
+    [CREATE_GROUP, VIEW_GROUP, EDIT_GROUP])
+
+# Permissions for project pages, e.g., the project summary page
+_PERMISSIONS_TABLE = {
+
+    # Project owners can view and edit artifacts in a LIVE project.
+    (OWNER_ROLE, project_pb2.ProjectState.LIVE, WILDCARD_ACCESS):
+      OWNER_ACTIVE_PERMISSIONSET,
+
+    # Project owners can view, but not edit artifacts in ARCHIVED.
+    # Note: EDIT_PROJECT is not enough permission to change an ARCHIVED project
+    # back to LIVE if a delete_time was set.
+    (OWNER_ROLE, project_pb2.ProjectState.ARCHIVED, WILDCARD_ACCESS):
+      OWNER_INACTIVE_PERMISSIONSET,
+
+    # Project members can view their own project, regardless of state.
+    (COMMITTER_ROLE, project_pb2.ProjectState.LIVE, WILDCARD_ACCESS):
+      COMMITTER_ACTIVE_PERMISSIONSET,
+    (COMMITTER_ROLE, project_pb2.ProjectState.ARCHIVED, WILDCARD_ACCESS):
+      COMMITTER_INACTIVE_PERMISSIONSET,
+
+    # Project contributors can view their own project, regardless of state.
+    (CONTRIBUTOR_ROLE, project_pb2.ProjectState.LIVE, WILDCARD_ACCESS):
+      CONTRIBUTOR_ACTIVE_PERMISSIONSET,
+    (CONTRIBUTOR_ROLE, project_pb2.ProjectState.ARCHIVED, WILDCARD_ACCESS):
+      CONTRIBUTOR_INACTIVE_PERMISSIONSET,
+
+    # Non-members users can read and comment in projects with access == ANYONE
+    (USER_ROLE, project_pb2.ProjectState.LIVE,
+     project_pb2.ProjectAccess.ANYONE):
+      USER_PERMISSIONSET,
+
+    # Anonymous users can only read projects with access == ANYONE.
+    (ANON_ROLE, project_pb2.ProjectState.LIVE,
+     project_pb2.ProjectAccess.ANYONE):
+      READ_ONLY_PERMISSIONSET,
+
+    # Permissions for site pages, e.g., creating a new project
+    (USER_ROLE, UNDEFINED_STATUS, UNDEFINED_ACCESS):
+      PermissionSet([CREATE_PROJECT, CREATE_GROUP, CREATE_HOTLIST]),
+    }
+
+def GetPermissions(user, effective_ids, project):
+  """Return a permission set appropriate for the user and project.
+
+  Args:
+    user: The User PB for the signed-in user, or None for anon users.
+    effective_ids: set of int user IDs for the current user and all user
+        groups that they are a member of.  This will be an empty set for
+        anonymous users.
+    project: either a Project protobuf, or None for a page whose scope is
+        wider than a single project.
+
+  Returns:
+    a PermissionSet object for the current user and project (or for
+    site-wide operations if project is None).
+
+  If an exact match for the user's role and project status is found, that is
+  returned. Otherwise, we look for permissions for the user's role that is
+  not specific to any project status, or not specific to any project access
+  level.  If neither of those are defined, we give the user an empty
+  permission set.
+  """
+  # Site admins get ADMIN_PERMISSIONSET regardless of groups or projects.
+  if user and user.is_site_admin:
+    return ADMIN_PERMISSIONSET
+
+  # Grant the borg job permission to view/edit groups
+  if user and user.email == settings.borg_service_account:
+    return GROUP_IMPORT_BORG_PERMISSIONSET
+
+  # Anon users don't need to accumulate anything.
+  if not effective_ids:
+    role, status, access = _GetPermissionKey(None, project)
+    return _LookupPermset(role, status, access)
+
+  effective_perms = set()
+  consider_restrictions = True
+
+  # Check for signed-in user with no roles in the current project.
+  if not project or not framework_bizobj.UserIsInProject(
+      project, effective_ids):
+    role, status, access = _GetPermissionKey(None, project)
+    return _LookupPermset(USER_ROLE, status, access)
+
+  # Signed-in user gets the union of all their PermissionSets from the table.
+  for user_id in effective_ids:
+    role, status, access = _GetPermissionKey(user_id, project)
+    role_perms = _LookupPermset(role, status, access)
+    # Accumulate a union of all the user's permissions.
+    effective_perms.update(role_perms.perm_names)
+    # If any role allows the user to ignore restriction labels, then
+    # ignore them overall.
+    if not role_perms.consider_restrictions:
+      consider_restrictions = False
+
+  return PermissionSet(
+      effective_perms, consider_restrictions=consider_restrictions)
+
+
+def UpdateIssuePermissions(
+    perms, project, issue, effective_ids, granted_perms=None, config=None):
+  """Update the PermissionSet for an specific issue.
+
+  Take into account granted permissions and label restrictions to filter the
+  permissions, and updates the VIEW and EDIT_ISSUE permissions depending on the
+  role of the user in the issue (i.e. owner, reporter, cc or approver).
+
+  Args:
+    perms: The PermissionSet to update.
+    project: The Project PB for the issue project.
+    issue: The Issue PB.
+    effective_ids: Set of int user IDs for the current user and all user
+        groups that they are a member of.  This will be an empty set for
+        anonymous users.
+    granted_perms: optional list of strings of permissions that the user is
+        granted only within the scope of one issue, e.g., by being named in
+        a user-type custom field that grants permissions.
+    config: optional ProjectIssueConfig PB where granted perms should be
+        extracted from, if granted_perms is not given.
+  """
+  if config:
+    granted_perms = tracker_bizobj.GetGrantedPerms(
+        issue, effective_ids, config)
+  elif granted_perms is None:
+    granted_perms = []
+
+  # If the user has no permission to view the project, it has no permissions on
+  # this issue.
+  if not perms.HasPerm(VIEW, None, None):
+    return EMPTY_PERMISSIONSET
+
+  # Compute the restrictions for the given issue and store them in a dictionary
+  # of {perm: set(needed_perms)}.
+  restrictions = collections.defaultdict(set)
+  if perms.consider_restrictions:
+    for label in GetRestrictions(issue):
+      label = label.lower()
+      # format: Restrict-Action-ToThisPerm
+      _, requested_perm, needed_perm = label.split('-', 2)
+      restrictions[requested_perm.lower()].add(needed_perm.lower())
+
+  # Store the user permissions, and the extra permissions of all effective IDs
+  # in the given project.
+  all_perms = set(perms.perm_names)
+  for effective_id in effective_ids:
+    all_perms.update(p.lower() for p in GetExtraPerms(project, effective_id))
+
+  # And filter them applying the restriction labels.
+  filtered_perms = set()
+  for perm_name in all_perms:
+    perm_name = perm_name.lower()
+    restricted = any(
+        restriction not in all_perms and restriction not in granted_perms
+        for restriction in restrictions.get(perm_name, []))
+    if not restricted:
+      filtered_perms.add(perm_name)
+
+  # Add any granted permissions.
+  filtered_perms.update(granted_perms)
+
+  # The VIEW perm might have been removed due to restrictions, but the issue
+  # owner, reporter, cc and approvers can always be an issue.
+  allowed_ids = set(
+      tracker_bizobj.GetCcIds(issue)
+      + tracker_bizobj.GetApproverIds(issue)
+      + [issue.reporter_id, tracker_bizobj.GetOwnerId(issue)])
+  if effective_ids and not allowed_ids.isdisjoint(effective_ids):
+    filtered_perms.add(VIEW.lower())
+
+  # If the issue is deleted, only the VIEW and DELETE_ISSUE permissions are
+  # relevant.
+  if issue.deleted:
+    if VIEW.lower() not in filtered_perms:
+      return EMPTY_PERMISSIONSET
+    if DELETE_ISSUE.lower() in filtered_perms:
+      return PermissionSet([VIEW, DELETE_ISSUE], perms.consider_restrictions)
+    return PermissionSet([VIEW], perms.consider_restrictions)
+
+  # The EDIT_ISSUE permission might have been removed due to restrictions, but
+  # the owner always has permission to edit it.
+  if effective_ids and tracker_bizobj.GetOwnerId(issue) in effective_ids:
+    filtered_perms.add(EDIT_ISSUE.lower())
+
+  return PermissionSet(filtered_perms, perms.consider_restrictions)
+
+
+def _LookupPermset(role, status, access):
+  """Lookup the appropriate PermissionSet in _PERMISSIONS_TABLE.
+
+  Args:
+    role: a string indicating the user's role in the project.
+    status: a Project PB status value, or UNDEFINED_STATUS.
+    access: a Project PB access value, or UNDEFINED_ACCESS.
+
+  Returns:
+    A PermissionSet that is appropriate for that kind of user in that
+    project context.
+  """
+  if (role, status, access) in _PERMISSIONS_TABLE:
+    return _PERMISSIONS_TABLE[(role, status, access)]
+  elif (role, status, WILDCARD_ACCESS) in _PERMISSIONS_TABLE:
+    return _PERMISSIONS_TABLE[(role, status, WILDCARD_ACCESS)]
+  else:
+    return EMPTY_PERMISSIONSET
+
+
+def _GetPermissionKey(user_id, project, expired_before=None):
+  """Return a permission lookup key appropriate for the user and project."""
+  if user_id is None:
+    role = ANON_ROLE
+  elif project and IsExpired(project, expired_before=expired_before):
+    role = USER_ROLE  # Do not honor roles in expired projects.
+  elif project and user_id in project.owner_ids:
+    role = OWNER_ROLE
+  elif project and user_id in project.committer_ids:
+    role = COMMITTER_ROLE
+  elif project and user_id in project.contributor_ids:
+    role = CONTRIBUTOR_ROLE
+  else:
+    role = USER_ROLE
+
+  if project is None:
+    status = UNDEFINED_STATUS
+  else:
+    status = project.state
+
+  if project is None:
+    access = UNDEFINED_ACCESS
+  else:
+    access = project.access
+
+  return role, status, access
+
+
+def GetExtraPerms(project, member_id):
+  """Return a list of extra perms for the user in the project.
+
+  Args:
+    project: Project PB for the current project.
+    member_id: user id of a project owner, member, or contributor.
+
+  Returns:
+    A list of strings for the extra perms granted to the
+    specified user in this project.  The list will often be empty.
+  """
+
+  _, extra_perms = FindExtraPerms(project, member_id)
+
+  if extra_perms:
+    return list(extra_perms.perms)
+  else:
+    return []
+
+
+def FindExtraPerms(project, member_id):
+  """Return a ExtraPerms PB for the given user in the project.
+
+  Args:
+    project: Project PB for the current project, or None if the user is
+      not currently in a project.
+    member_id: user ID of a project owner, member, or contributor.
+
+  Returns:
+    A pair (idx, extra_perms).
+    * If project is None or member_id is not part of the project, both are None.
+    * If member_id has no extra_perms, extra_perms is None, and idx points to
+      the position where it should go to keep the ExtraPerms sorted in project.
+    * Otherwise, idx is the position of member_id in the project's extra_perms,
+      and extra_perms is an ExtraPerms PB.
+  """
+  class ExtraPermsView(object):
+    def __len__(self):
+      return len(project.extra_perms)
+    def __getitem__(self, idx):
+      return project.extra_perms[idx].member_id
+
+  if not project:
+    # TODO(jrobbins): maybe define extra perms for site-wide operations.
+    return None, None
+
+  # Users who have no current role cannot have any extra perms.  Don't
+  # consider effective_ids (which includes user groups) for this check.
+  if not framework_bizobj.UserIsInProject(project, {member_id}):
+    return None, None
+
+  extra_perms_view = ExtraPermsView()
+  # Find the index of the first extra_perms.member_id greater than or equal to
+  # member_id.
+  idx = bisect.bisect_left(extra_perms_view, member_id)
+  if idx >= len(project.extra_perms) or extra_perms_view[idx] > member_id:
+    return idx, None
+  return idx, project.extra_perms[idx]
+
+
+def GetCustomPermissions(project):
+  """Return a sorted iterable of custom perms granted in a project."""
+  custom_permissions = set()
+  for extra_perms in project.extra_perms:
+    for perm in extra_perms.perms:
+      if perm not in STANDARD_PERMISSIONS:
+        custom_permissions.add(perm)
+
+  return sorted(custom_permissions)
+
+
+def UserCanViewProject(user, effective_ids, project, expired_before=None):
+  """Return True if the user can view the given project.
+
+  Args:
+    user: User protobuf for the user trying to view the project.
+    effective_ids: set of int user IDs of the user trying to view the project
+        (including any groups), or an empty set for anonymous users.
+    project: the Project protobuf to check.
+    expired_before: option time value for testing.
+
+  Returns:
+    True if the user should be allowed to view the project.
+  """
+  perms = GetPermissions(user, effective_ids, project)
+
+  if IsExpired(project, expired_before=expired_before):
+    needed_perm = VIEW_EXPIRED_PROJECT
+  else:
+    needed_perm = VIEW
+
+  return perms.CanUsePerm(needed_perm, effective_ids, project, [])
+
+
+def IsExpired(project, expired_before=None):
+  """Return True if a project deletion has been pending long enough already.
+
+  Args:
+    project: The project being viewed.
+    expired_before: If supplied, this method will return True only if the
+      project expired before the given time.
+
+  Returns:
+    True if the project is eligible for reaping.
+  """
+  if project.state != project_pb2.ProjectState.ARCHIVED:
+    return False
+
+  if expired_before is None:
+    expired_before = int(time.time())
+
+  return project.delete_time and project.delete_time < expired_before
+
+
+def CanDeleteComment(comment, commenter, user_id, perms):
+  """Returns true if the user can (un)delete the given comment.
+
+  UpdateIssuePermissions must have been called first.
+
+  Args:
+    comment: An IssueComment PB object.
+    commenter: An User PB object with the user who created the comment.
+    user_id: The ID of the user whose permission we want to check.
+    perms: The PermissionSet with the issue permissions.
+
+  Returns:
+    True if the user can (un)delete the comment.
+  """
+  # User is not logged in or has no permissions.
+  if not user_id or not perms:
+    return False
+
+  # Nobody can (un)delete comments by banned users or spam comments, which
+  # should be un-flagged instead.
+  if commenter.banned or comment.is_spam:
+    return False
+
+  # Site admin or project owners can delete any comment.
+  permit_delete_any = perms.HasPerm(DELETE_ANY, None, None, [])
+  if permit_delete_any:
+    return True
+
+  # Users cannot undelete unless they deleted.
+  if comment.deleted_by and comment.deleted_by != user_id:
+    return False
+
+  # Users can delete their own items.
+  permit_delete_own = perms.HasPerm(DELETE_OWN, None, None, [])
+  if permit_delete_own and comment.user_id == user_id:
+    return True
+
+  return False
+
+
+def CanFlagComment(comment, commenter, comment_reporters, user_id, perms):
+  """Returns true if the user can flag the given comment.
+
+  UpdateIssuePermissions must have been called first.
+  Assumes that the user has permission to view the issue.
+
+  Args:
+    comment: An IssueComment PB object.
+    commenter: An User PB object with the user who created the comment.
+    comment_reporters: A collection of user IDs who flagged the comment as spam.
+    user_id: The ID of the user for whom we're checking permissions.
+    perms: The PermissionSet with the issue permissions.
+
+  Returns:
+    A tuple (can_flag, is_flagged).
+    can_flag is True if the user can flag the comment. and is_flagged is True
+    if the user sees the comment marked as spam.
+  """
+  # Nobody can flag comments by banned users.
+  if commenter.banned:
+    return False, comment.is_spam
+
+  # If a comment was deleted for a reason other than being spam, nobody can
+  # flag or un-flag it.
+  if comment.deleted_by and not comment.is_spam:
+    return False, comment.is_spam
+
+  # A user with the VerdictSpam permission sees whether the comment is flagged
+  # as spam or not, and can mark it as flagged or un-flagged.
+  # If the comment is flagged as spam, all users see it as flagged, but only
+  # those with the VerdictSpam can un-flag it.
+  permit_verdict_spam = perms.HasPerm(VERDICT_SPAM, None, None, [])
+  if permit_verdict_spam or comment.is_spam:
+    return permit_verdict_spam, comment.is_spam
+
+  # Otherwise, the comment is not marked as flagged and the user doesn't have
+  # the VerdictSpam permission.
+  # They are able to report a comment as spam if they have the FlagSpam
+  # permission, and they see the comment as flagged if the have previously
+  # reported it as spam.
+  permit_flag_spam = perms.HasPerm(FLAG_SPAM, None, None, [])
+  return permit_flag_spam, user_id in comment_reporters
+
+
+def CanViewComment(comment, commenter, user_id, perms):
+  """Returns true if the user can view the given comment.
+
+  UpdateIssuePermissions must have been called first.
+  Assumes that the user has permission to view the issue.
+
+  Args:
+    comment: An IssueComment PB object.
+    commenter: An User PB object with the user who created the comment.
+    user_id: The ID of the user whose permission we want to check.
+    perms: The PermissionSet with the issue permissions.
+
+  Returns:
+    True if the user can view the comment.
+  """
+  # Nobody can view comments by banned users.
+  if commenter.banned:
+    return False
+
+  # Only users with the permission to un-flag comments can view flagged
+  # comments.
+  if comment.is_spam:
+    # If the comment is marked as spam, whether the user can un-flag the comment
+    # or not doesn't depend on who reported it as spam.
+    can_flag, _ = CanFlagComment(comment, commenter, [], user_id, perms)
+    return can_flag
+
+  # Only users with the permission to un-delete comments can view deleted
+  # comments.
+  if comment.deleted_by:
+    return CanDeleteComment(comment, commenter, user_id, perms)
+
+  return True
+
+
+def CanViewInboundMessage(comment, user_id, perms):
+  """Returns true if the user can view the given comment's inbound message.
+
+  UpdateIssuePermissions must have been called first.
+  Assumes that the user has permission to view the comment.
+
+  Args:
+    comment: An IssueComment PB object.
+    commenter: An User PB object with the user who created the comment.
+    user_id: The ID of the user whose permission we want to check.
+    perms: The PermissionSet with the issue permissions.
+
+  Returns:
+    True if the user can view the comment's inbound message.
+  """
+  return (perms.HasPerm(VIEW_INBOUND_MESSAGES, None, None, [])
+          or comment.user_id == user_id)
+
+
+def CanView(effective_ids, perms, project, restrictions, granted_perms=None):
+  """Checks if user has permission to view an issue."""
+  return perms.CanUsePerm(
+      VIEW, effective_ids, project, restrictions, granted_perms=granted_perms)
+
+
+def CanCreateProject(perms):
+  """Return True if the given user may create a project.
+
+  Args:
+    perms: Permissionset for the current user.
+
+  Returns:
+    True if the user should be allowed to create a project.
+  """
+  # "ANYONE" means anyone who has the needed perm.
+  if (settings.project_creation_restriction ==
+      site_pb2.UserTypeRestriction.ANYONE):
+    return perms.HasPerm(CREATE_PROJECT, None, None)
+
+  if (settings.project_creation_restriction ==
+      site_pb2.UserTypeRestriction.ADMIN_ONLY):
+    return perms.HasPerm(ADMINISTER_SITE, None, None)
+
+  return False
+
+
+def CanCreateGroup(perms):
+  """Return True if the given user may create a user group.
+
+  Args:
+    perms: Permissionset for the current user.
+
+  Returns:
+    True if the user should be allowed to create a group.
+  """
+  # "ANYONE" means anyone who has the needed perm.
+  if (settings.group_creation_restriction ==
+      site_pb2.UserTypeRestriction.ANYONE):
+    return perms.HasPerm(CREATE_GROUP, None, None)
+
+  if (settings.group_creation_restriction ==
+      site_pb2.UserTypeRestriction.ADMIN_ONLY):
+    return perms.HasPerm(ADMINISTER_SITE, None, None)
+
+  return False
+
+
+def CanEditGroup(perms, effective_ids, group_owner_ids):
+  """Return True if the given user may edit a user group.
+
+  Args:
+    perms: Permissionset for the current user.
+    effective_ids: set of user IDs for the logged in user.
+    group_owner_ids: set of user IDs of the user group owners.
+
+  Returns:
+    True if the user should be allowed to edit the group.
+  """
+  return (perms.HasPerm(EDIT_GROUP, None, None) or
+          not effective_ids.isdisjoint(group_owner_ids))
+
+
+def CanViewGroupMembers(perms, effective_ids, group_settings, member_ids,
+                        owner_ids, user_project_ids):
+  """Return True if the given user may view a user group's members.
+
+  Args:
+    perms: Permissionset for the current user.
+    effective_ids: set of user IDs for the logged in user.
+    group_settings: PB of UserGroupSettings.
+    member_ids: A list of member ids of this user group.
+    owner_ids: A list of owner ids of this user group.
+    user_project_ids: A list of project ids which the user has a role.
+
+  Returns:
+    True if the user should be allowed to view the group's members.
+  """
+  if perms.HasPerm(VIEW_GROUP, None, None):
+    return True
+  # The user could view this group with membership of some projects which are
+  # friends of the group.
+  if (group_settings.friend_projects and user_project_ids
+      and (set(group_settings.friend_projects) & set(user_project_ids))):
+    return True
+  visibility = group_settings.who_can_view_members
+  if visibility == usergroup_pb2.MemberVisibility.OWNERS:
+    return not effective_ids.isdisjoint(owner_ids)
+  elif visibility == usergroup_pb2.MemberVisibility.MEMBERS:
+    return (not effective_ids.isdisjoint(member_ids) or
+            not effective_ids.isdisjoint(owner_ids))
+  else:
+    return True
+
+
+def IsBanned(user, user_view):
+  """Return True if this user is banned from using our site."""
+  if user is None:
+    return False  # Anyone is welcome to browse
+
+  if user.banned:
+    return True  # We checked the "Banned" checkbox for this user.
+
+  if user_view:
+    if user_view.domain in settings.banned_user_domains:
+      return True  # Some spammers create many accounts with the same domain.
+
+  if '+' in (user.email or ''):
+    # Spammers can make plus-addr Google accounts in unexpected domains.
+    return True
+
+  return False
+
+
+def CanBan(mr, services):
+  """Return True if the user is allowed to ban other users, site-wide."""
+  if mr.perms.HasPerm(ADMINISTER_SITE, None, None):
+    return True
+
+  owned, _, _ = services.project.GetUserRolesInAllProjects(mr.cnxn,
+      mr.auth.effective_ids)
+  return len(owned) > 0
+
+
+def CanExpungeUsers(mr):
+  """Return True is the user is allowed to delete user accounts."""
+  return mr.perms.HasPerm(ADMINISTER_SITE, None, None)
+
+
+def CanViewContributorList(mr, project):
+  """Return True if we should display the list project contributors.
+
+  This is used on the project summary page, when deciding to offer the
+  project People page link, and when generating autocomplete options
+  that include project members.
+
+  Args:
+    mr: commonly used info parsed from the request.
+    project: the Project we're interested in.
+
+  Returns:
+    True if we should display the project contributor list.
+  """
+  if not project:
+    return False  # We are not even in a project context.
+
+  if not project.only_owners_see_contributors:
+    return True  # Contributor list is not resticted.
+
+  # If it is hub-and-spoke, check for the perm that allows the user to
+  # view it anyway.
+  return mr.perms.HasPerm(
+      VIEW_CONTRIBUTOR_LIST, mr.auth.user_id, project)
+
+
+def ShouldCheckForAbandonment(mr):
+  """Return True if user should be warned before changing/deleting their role.
+
+  Args:
+    mr: common info parsed from the user's request.
+
+  Returns:
+    True if user should be warned before changing/deleting their role.
+  """
+  # Note: No need to warn admins because they won't lose access anyway.
+  if mr.perms.CanUsePerm(
+      ADMINISTER_SITE, mr.auth.effective_ids, mr.project, []):
+    return False
+
+  return mr.perms.CanUsePerm(
+      EDIT_PROJECT, mr.auth.effective_ids, mr.project, [])
+
+
+# For speed, we remember labels that we have already classified as being
+# restriction labels or not being restriction labels.  These sets are for
+# restrictions in general, not for any particular perm.
+_KNOWN_RESTRICTION_LABELS = set()
+_KNOWN_NON_RESTRICTION_LABELS = set()
+
+
+def IsRestrictLabel(label, perm=''):
+  """Returns True if a given label is a restriction label.
+
+  Args:
+    label: string for the label to examine.
+    perm: a permission that can be restricted (e.g. 'View' or 'Edit').
+        Defaults to '' to mean 'any'.
+
+  Returns:
+    True if a given label is a restriction label (of the specified perm)
+  """
+  if label in _KNOWN_NON_RESTRICTION_LABELS:
+    return False
+  if not perm and label in _KNOWN_RESTRICTION_LABELS:
+    return True
+
+  prefix = ('restrict-%s-' % perm.lower()) if perm else 'restrict-'
+  is_restrict = label.lower().startswith(prefix) and label.count('-') >= 2
+
+  if is_restrict:
+    _KNOWN_RESTRICTION_LABELS.add(label)
+  elif not perm:
+    _KNOWN_NON_RESTRICTION_LABELS.add(label)
+
+  return is_restrict
+
+
+def HasRestrictions(issue, perm=''):
+  """Return True if the issue has any restrictions (on the specified perm)."""
+  return (
+      any(IsRestrictLabel(lab, perm=perm) for lab in issue.labels) or
+      any(IsRestrictLabel(lab, perm=perm) for lab in issue.derived_labels))
+
+
+def GetRestrictions(issue, perm=''):
+  """Return a list of restriction labels on the given issue."""
+  if not issue:
+    return []
+
+  return [lab.lower() for lab in tracker_bizobj.GetLabels(issue)
+          if IsRestrictLabel(lab, perm=perm)]
+
+
+def CanViewIssue(
+    effective_ids, perms, project, issue, allow_viewing_deleted=False,
+    granted_perms=None):
+  """Checks if user has permission to view an artifact.
+
+  Args:
+    effective_ids: set of user IDs for the logged in user and any user
+        group memberships.  Should be an empty set for anon users.
+    perms: PermissionSet for the user.
+    project: Project PB for the project that contains this issue.
+    issue: Issue PB for the issue being viewed.
+    allow_viewing_deleted: True if the user should be allowed to view
+        deleted artifacts.
+    granted_perms: optional list of strings of permissions that the user is
+        granted only within the scope of one issue, e.g., by being named in
+        a user-type custom field that grants permissions.
+
+  Returns:
+    True iff the user can view the specified issue.
+  """
+  if issue.deleted and not allow_viewing_deleted:
+    return False
+
+  perms = UpdateIssuePermissions(
+      perms, project, issue, effective_ids, granted_perms=granted_perms)
+  return perms.HasPerm(VIEW, None, None)
+
+
+def CanEditIssue(effective_ids, perms, project, issue, granted_perms=None):
+  """Return True if a user can edit an issue.
+
+  Args:
+    effective_ids: set of user IDs for the logged in user and any user
+        group memberships.  Should be an empty set for anon users.
+    perms: PermissionSet for the user.
+    project: Project PB for the project that contains this issue.
+    issue: Issue PB for the issue being viewed.
+    granted_perms: optional list of strings of permissions that the user is
+        granted only within the scope of one issue, e.g., by being named in
+        a user-type custom field that grants permissions.
+
+  Returns:
+    True iff the user can edit the specified issue.
+  """
+  perms = UpdateIssuePermissions(
+      perms, project, issue, effective_ids, granted_perms=granted_perms)
+  return perms.HasPerm(EDIT_ISSUE, None, None)
+
+
+def CanCommentIssue(effective_ids, perms, project, issue, granted_perms=None):
+  """Return True if a user can comment on an issue."""
+
+  return perms.CanUsePerm(
+      ADD_ISSUE_COMMENT, effective_ids, project,
+      GetRestrictions(issue), granted_perms=granted_perms)
+
+
+def CanUpdateApprovalStatus(
+    effective_ids, perms, project, approver_ids, new_status):
+  """Return True if a user can change the approval status to the new status."""
+  if not effective_ids.isdisjoint(approver_ids):
+    return True # Approval approvers can always change the approval status
+
+  if new_status not in RESTRICTED_APPROVAL_STATUSES:
+    return True
+
+  return perms.CanUsePerm(EDIT_ISSUE_APPROVAL, effective_ids, project, [])
+
+
+def CanUpdateApprovers(effective_ids, perms, project, current_approver_ids):
+  """Return True if a user can edit the list of approvers for an approval."""
+  if not effective_ids.isdisjoint(current_approver_ids):
+    return True
+
+  return perms.CanUsePerm(EDIT_ISSUE_APPROVAL, effective_ids, project, [])
+
+
+def CanViewComponentDef(effective_ids, perms, project, component_def):
+  """Return True if a user can view the given component definition."""
+  if not effective_ids.isdisjoint(component_def.admin_ids):
+    return True  # Component admins can view that component.
+
+  # TODO(jrobbins): check restrictions on the component definition.
+  return perms.CanUsePerm(VIEW, effective_ids, project, [])
+
+
+def CanEditComponentDef(effective_ids, perms, project, component_def, config):
+  """Return True if a user can edit the given component definition."""
+  if not effective_ids.isdisjoint(component_def.admin_ids):
+    return True  # Component admins can edit that component.
+
+  # Check to see if user is admin of any parent component.
+  parent_components = tracker_bizobj.FindAncestorComponents(
+      config, component_def)
+  for parent in parent_components:
+    if not effective_ids.isdisjoint(parent.admin_ids):
+      return True
+
+  return perms.CanUsePerm(EDIT_PROJECT, effective_ids, project, [])
+
+
+def CanViewFieldDef(effective_ids, perms, project, field_def):
+  """Return True if a user can view the given field definition."""
+  if not effective_ids.isdisjoint(field_def.admin_ids):
+    return True  # Field admins can view that field.
+
+  # TODO(jrobbins): check restrictions on the field definition.
+  return perms.CanUsePerm(VIEW, effective_ids, project, [])
+
+
+def CanEditFieldDef(effective_ids, perms, project, field_def):
+  """Return True if a user can edit the given field definition."""
+  if not effective_ids.isdisjoint(field_def.admin_ids):
+    return True  # Field admins can edit that field.
+
+  return perms.CanUsePerm(EDIT_PROJECT, effective_ids, project, [])
+
+
+def CanEditValueForFieldDef(effective_ids, perms, project, field_def):
+  """Return True if a user can edit the given field definition value.
+     This method does not check that a user can edit the project issues."""
+  if not effective_ids:
+    return False
+  if not field_def.is_restricted_field:
+    return True
+  if not effective_ids.isdisjoint(field_def.editor_ids):
+    return True
+  return CanEditFieldDef(effective_ids, perms, project, field_def)
+
+
+def CanViewTemplate(effective_ids, perms, project, template):
+  """Return True if a user can view the given issue template."""
+  if not effective_ids.isdisjoint(template.admin_ids):
+    return True  # template admins can view that template.
+
+  # Members-only templates are only shown to members, other templates are
+  # shown to any user that is generally allowed to view project content.
+  if template.members_only:
+    return framework_bizobj.UserIsInProject(project, effective_ids)
+  else:
+    return perms.CanUsePerm(VIEW, effective_ids, project, [])
+
+
+def CanEditTemplate(effective_ids, perms, project, template):
+  """Return True if a user can edit the given field definition."""
+  if not effective_ids.isdisjoint(template.admin_ids):
+    return True  # Template admins can edit that template.
+
+  return perms.CanUsePerm(EDIT_PROJECT, effective_ids, project, [])
+
+
+def CanViewHotlist(effective_ids, perms, hotlist):
+  """Return True if a user can view the given hotlist."""
+  if not hotlist.is_private or perms.HasPerm(ADMINISTER_SITE, None, None):
+    return True
+
+  return any([user_id in (hotlist.owner_ids + hotlist.editor_ids)
+              for user_id in effective_ids])
+
+
+def CanEditHotlist(effective_ids, perms, hotlist):
+  """Return True if a user is editor(add/remove issues and change rankings)."""
+  return perms.HasPerm(ADMINISTER_SITE, None, None) or any(
+      [user_id in (hotlist.owner_ids + hotlist.editor_ids)
+       for user_id in effective_ids])
+
+
+def CanAdministerHotlist(effective_ids, perms, hotlist):
+  """Return True if user is owner(add/remove members, edit/delete hotlist)."""
+  return perms.HasPerm(ADMINISTER_SITE, None, None) or any(
+      [user_id in hotlist.owner_ids for user_id in effective_ids])
+
+
+def CanCreateHotlist(perms):
+  """Return True if the given user may create a hotlist.
+
+  Args:
+    perms: Permissionset for the current user.
+
+  Returns:
+    True if the user should be allowed to create a hotlist.
+  """
+  if (settings.hotlist_creation_restriction ==
+      site_pb2.UserTypeRestriction.ANYONE):
+    return perms.HasPerm(CREATE_HOTLIST, None, None)
+
+  if (settings.hotlist_creation_restriction ==
+      site_pb2.UserTypeRestriction.ADMIN_ONLY):
+    return perms.HasPerm(ADMINISTER_SITE, None, None)
+
+
+class Error(Exception):
+  """Base class for errors from this module."""
+
+
+class PermissionException(Error):
+  """The user is not authorized to make the current request."""
+
+
+class BannedUserException(Error):
+  """The user has been banned from using our service."""
diff --git a/framework/profiler.py b/framework/profiler.py
new file mode 100644
index 0000000..362585f
--- /dev/null
+++ b/framework/profiler.py
@@ -0,0 +1,200 @@
+# 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
+
+"""A simple profiler object to track how time is spent on a request.
+
+The profiler is called from application code at the begining and
+end of each major phase and subphase of processing.  The profiler
+object keeps track of how much time was spent on each phase or subphase.
+
+This class is useful when developers need to understand where
+server-side time is being spent.  It includes durations in
+milliseconds, and a simple bar chart on the HTML page.
+
+On-page debugging and performance info is useful because it makes it easier
+to explore performance interactively.
+"""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import datetime
+import logging
+import random
+import re
+import threading
+import time
+
+from infra_libs import ts_mon
+
+from contextlib import contextmanager
+
+from google.appengine.api import app_identity
+
+PHASE_TIME = ts_mon.CumulativeDistributionMetric(
+    'monorail/servlet/phase_time',
+    'Time spent in profiler phases, in ms',
+    [ts_mon.StringField('phase')])
+
+# trace_service requires names less than 128 bytes
+# https://cloud.google.com/trace/docs/reference/v1/rest/v1/projects.traces#Trace
+MAX_PHASE_NAME_LENGTH = 128
+
+
+class Profiler(object):
+  """Object to record and help display request processing profiling info.
+
+  The Profiler class holds a list of phase objects, which can hold additional
+  phase objects (which are subphases).  Each phase or subphase represents some
+  meaningful part of this application's HTTP request processing.
+  """
+
+  _COLORS = ['900', '090', '009', '360', '306', '036',
+             '630', '630', '063', '333']
+
+  def __init__(self, opt_trace_context=None, opt_trace_service=None):
+    """Each request processing profile begins with an empty list of phases."""
+    self.top_phase = _Phase('overall profile', -1, None)
+    self.current_phase = self.top_phase
+    self.next_color = 0
+    self.original_thread_id = threading.current_thread().ident
+    self.trace_context = opt_trace_context
+    self.trace_service = opt_trace_service
+    self.project_id = app_identity.get_application_id()
+
+  def StartPhase(self, name='unspecified phase'):
+    """Begin a (sub)phase by pushing a new phase onto a stack."""
+    if self.original_thread_id != threading.current_thread().ident:
+      return  # We only profile the main thread.
+    color = self._COLORS[self.next_color % len(self._COLORS)]
+    self.next_color += 1
+    self.current_phase = _Phase(name, color, self.current_phase)
+
+  def EndPhase(self):
+    """End a (sub)phase by poping the phase stack."""
+    if self.original_thread_id != threading.current_thread().ident:
+      return  # We only profile the main thread.
+    self.current_phase = self.current_phase.End()
+
+  @contextmanager
+  def Phase(self, name='unspecified phase'):
+    """Context manager to automatically begin and end (sub)phases."""
+    self.StartPhase(name)
+    try:
+      yield
+    finally:
+      self.EndPhase()
+
+  def LogStats(self):
+    """Log sufficiently-long phases and subphases, for debugging purposes."""
+    self.top_phase.End()
+    lines = ['Stats:']
+    self.top_phase.AccumulateStatLines(self.top_phase.elapsed_seconds, lines)
+    logging.info('\n'.join(lines))
+
+  def ReportTrace(self):
+    """Send a profile trace to Google Cloud Tracing."""
+    self.top_phase.End()
+    spans = self.top_phase.SpanJson()
+    if not self.trace_service or not self.trace_context:
+      logging.info('would have sent trace: %s', spans)
+      return
+
+    # Format of trace_context: 'TRACE_ID/SPAN_ID;o=TRACE_TRUE'
+    # (from https://cloud.google.com/trace/docs/troubleshooting#force-trace)
+    # TODO(crbug/monorail:7086): Respect the o=TRACE_TRUE part.
+    # Note: on Appngine it seems ';o=1' is omitted rather than set to 0.
+    trace_id, root_span_id = self.trace_context.split(';')[0].split('/')
+    for s in spans:
+      # TODO(crbug/monorail:7087): Consider setting `parentSpanId` to
+      # `root_span_id` for the children of `top_phase`.
+      if not 'parentSpanId' in s:
+        s['parentSpanId'] = root_span_id
+    traces_body = {
+      'projectId': self.project_id,
+      'traceId': trace_id,
+      'spans': spans,
+    }
+    body = {
+      'traces': [traces_body]
+    }
+    # TODO(crbug/monorail:7088): Do this async so it doesn't delay the response.
+    request = self.trace_service.projects().patchTraces(
+        projectId=self.project_id, body=body)
+    _res = request.execute()
+
+
+class _Phase(object):
+  """A _Phase instance represents a period of time during request processing."""
+
+  def __init__(self, name, color, parent):
+    """Initialize a (sub)phase with the given name and current system clock."""
+    self.start = time.time()
+    self.name = name[:MAX_PHASE_NAME_LENGTH]
+    self.color = color
+    self.subphases = []
+    self.elapsed_seconds = None
+    self.ms = 'in_progress'  # shown if the phase never records a finish.
+    self.uncategorized_ms = None
+    self.parent = parent
+    if self.parent is not None:
+      self.parent._RegisterSubphase(self)
+
+    self.id = str(random.getrandbits(64))
+
+
+  def _RegisterSubphase(self, subphase):
+    """Add a subphase to this phase."""
+    self.subphases.append(subphase)
+
+  def End(self):
+    """Record the time between the start and end of this (sub)phase."""
+    self.elapsed_seconds = time.time() - self.start
+    self.ms = int(self.elapsed_seconds * 1000)
+    for sub in self.subphases:
+      if sub.elapsed_seconds is None:
+        logging.warn('issue3182: subphase is %r', sub and sub.name)
+    categorized = sum(sub.elapsed_seconds or 0.0 for sub in self.subphases)
+    self.uncategorized_ms = int((self.elapsed_seconds - categorized) * 1000)
+    return self.parent
+
+  def AccumulateStatLines(self, total_seconds, lines, indent=''):
+    # Only phases that took longer than 30ms are interesting.
+    if self.ms <= 30:
+      return
+
+    percent = self.elapsed_seconds // total_seconds * 100
+    lines.append('%s%5d ms (%2d%%): %s' % (indent, self.ms, percent, self.name))
+
+    # Remove IDs etc to reduce the phase name cardinality for ts_mon.
+    normalized_phase = re.sub('[0-9]+', '', self.name)
+    PHASE_TIME.add(self.ms, {'phase': normalized_phase})
+
+    for subphase in self.subphases:
+      subphase.AccumulateStatLines(total_seconds, lines, indent=indent + '   ')
+
+  def SpanJson(self):
+    """Return a json representation of this phase as a GCP Cloud Trace object.
+    """
+    endTime = self.start + self.elapsed_seconds
+
+    span = {
+      'kind': 'RPC_SERVER',
+      'name': self.name,
+      'spanId': self.id,
+      'startTime':
+          datetime.datetime.fromtimestamp(self.start).isoformat() + 'Z',
+      'endTime': datetime.datetime.fromtimestamp(endTime).isoformat() + 'Z',
+    }
+
+    if self.parent is not None and self.parent.id is not None:
+      span['parentSpanId'] = self.parent.id
+
+    spans = [span]
+    for s in self.subphases:
+      spans.extend(s.SpanJson())
+
+    return spans
diff --git a/framework/ratelimiter.py b/framework/ratelimiter.py
new file mode 100644
index 0000000..b2bbb25
--- /dev/null
+++ b/framework/ratelimiter.py
@@ -0,0 +1,292 @@
+# 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
+
+"""Request rate limiting implementation.
+
+This is intented to be used for automatic DDoS protection.
+
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import datetime
+import logging
+import os
+import settings
+import time
+
+from infra_libs import ts_mon
+
+from google.appengine.api import memcache
+from google.appengine.api.modules import modules
+from google.appengine.api import users
+
+from services import client_config_svc
+
+
+N_MINUTES = 5
+EXPIRE_AFTER_SECS = 60 * 60
+DEFAULT_LIMIT = 60 * N_MINUTES  # 300 page requests in 5 minutes is 1 QPS.
+DEFAULT_API_QPM = 1000  # For example, chromiumdash uses ~64 per page, 8s each.
+
+ANON_USER = 'anon'
+
+COUNTRY_HEADER = 'X-AppEngine-Country'
+
+COUNTRY_LIMITS = {
+  # Two-letter country code: max requests per N_MINUTES
+  # This limit will apply to all requests coming
+  # from this country.
+  # To add a country code, see GAE logs and use the
+  # appropriate code from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
+  # E.g., 'cn': 300,  # Limit to 1 QPS.
+}
+
+# Modules not in this list will not have rate limiting applied by this
+# class.
+MODULE_ALLOWLIST = ['default', 'api']
+
+
+def _CacheKeys(request, now_sec):
+  """ Returns an array of arrays. Each array contains strings with
+      the same prefix and a timestamp suffix, starting with the most
+      recent and decrementing by 1 minute each time.
+  """
+  now = datetime.datetime.fromtimestamp(now_sec)
+  country = request.headers.get(COUNTRY_HEADER, 'ZZ')
+  ip = request.remote_addr
+  minute_buckets = [now - datetime.timedelta(minutes=m) for m in
+                    range(N_MINUTES)]
+  user = users.get_current_user()
+  user_email = user.email() if user else ANON_USER
+
+  # <IP, country, user_email> to be rendered into each key prefix.
+  prefixes = []
+
+  # All logged-in users get a per-user rate limit, regardless of IP and country.
+  if user:
+    prefixes.append(['ALL', 'ALL', user.email()])
+  else:
+    # All anon requests get a per-IP ratelimit.
+    prefixes.append([ip, 'ALL', 'ALL'])
+
+  # All requests from a problematic country get a per-country rate limit,
+  # regardless of the user (even a non-logged-in one) or IP.
+  if country in COUNTRY_LIMITS:
+    prefixes.append(['ALL', country, 'ALL'])
+
+  keysets = []
+  for prefix in prefixes:
+    keysets.append(['ratelimit-%s-%s' % ('-'.join(prefix),
+        str(minute_bucket.replace(second=0, microsecond=0)))
+        for minute_bucket in minute_buckets])
+
+  return keysets, country, ip, user_email
+
+
+def _CreateApiCacheKeys(client_id, client_email, now_sec):
+  country = os.environ.get('HTTP_X_APPENGINE_COUNTRY')
+  ip = os.environ.get('REMOTE_ADDR')
+  now = datetime.datetime.fromtimestamp(now_sec)
+  minute_buckets = [now - datetime.timedelta(minutes=m) for m in
+                    range(N_MINUTES)]
+  minute_strs = [str(minute_bucket.replace(second=0, microsecond=0))
+                 for minute_bucket in minute_buckets]
+  keys = []
+
+  if client_id and client_id != 'anonymous':
+    keys.append(['apiratelimit-%s-%s' % (client_id, minute_str)
+                 for minute_str in minute_strs])
+  if client_email:
+    keys.append(['apiratelimit-%s-%s' % (client_email, minute_str)
+                 for minute_str in minute_strs])
+  else:
+    keys.append(['apiratelimit-%s-%s' % (ip, minute_str)
+                 for minute_str in minute_strs])
+    if country in COUNTRY_LIMITS:
+      keys.append(['apiratelimit-%s-%s' % (country, minute_str)
+                   for minute_str in minute_strs])
+
+  return keys
+
+
+class RateLimiter(object):
+
+  blocked_requests = ts_mon.CounterMetric(
+      'monorail/ratelimiter/blocked_request',
+      'Count of requests that exceeded the rate limit and were blocked.',
+      None)
+  limit_exceeded = ts_mon.CounterMetric(
+      'monorail/ratelimiter/rate_exceeded',
+      'Count of requests that exceeded the rate limit.',
+      None)
+  cost_thresh_exceeded = ts_mon.CounterMetric(
+      'monorail/ratelimiter/cost_thresh_exceeded',
+      'Count of requests that were expensive to process',
+      None)
+  checks = ts_mon.CounterMetric(
+      'monorail/ratelimiter/check',
+      'Count of checks done, by fail/success type.',
+      [ts_mon.StringField('type')])
+
+  def __init__(self, _cache=memcache, fail_open=True, **_kwargs):
+    self.fail_open = fail_open
+
+  def CheckStart(self, request, now=None):
+    if (modules.get_current_module_name() not in MODULE_ALLOWLIST or
+        users.is_current_user_admin()):
+      return
+    logging.info('X-AppEngine-Country: %s' %
+      request.headers.get(COUNTRY_HEADER, 'ZZ'))
+
+    if now is None:
+      now = time.time()
+
+    keysets, country, ip, user_email  = _CacheKeys(request, now)
+    # There are either two or three sets of keys in keysets.
+    # Three if the user's country is in COUNTRY_LIMITS, otherwise two.
+    self._AuxCheckStart(
+        keysets, COUNTRY_LIMITS.get(country, DEFAULT_LIMIT),
+        settings.ratelimiting_enabled,
+        RateLimitExceeded(country=country, ip=ip, user_email=user_email))
+
+  def _AuxCheckStart(self, keysets, limit, ratelimiting_enabled,
+                     exception_obj):
+    for keys in keysets:
+      count = 0
+      try:
+        counters = memcache.get_multi(keys)
+        count = sum(counters.values())
+        self.checks.increment({'type': 'success'})
+      except Exception as e:
+        logging.error(e)
+        if not self.fail_open:
+          self.checks.increment({'type': 'fail_closed'})
+          raise exception_obj
+        self.checks.increment({'type': 'fail_open'})
+
+      if count > limit:
+        # Since webapp2 won't let us return a 429 error code
+        # <http://tools.ietf.org/html/rfc6585#section-4>, we can't
+        # monitor rate limit exceeded events with our standard tools.
+        # We return a 400 with a custom error message to the client,
+        # and this logging is so we can monitor it internally.
+        logging.info('%s, %d' % (exception_obj.message, count))
+
+        self.limit_exceeded.increment()
+
+        if ratelimiting_enabled:
+          self.blocked_requests.increment()
+          raise exception_obj
+
+      k = keys[0]
+      # Only update the latest *time* bucket for each prefix (reverse chron).
+      memcache.add(k, 0, time=EXPIRE_AFTER_SECS)
+      memcache.incr(k, initial_value=0)
+
+  def CheckEnd(self, request, now, start_time):
+    """If a request was expensive to process, charge some extra points
+    against this set of buckets.
+    We pass in both now and start_time so we can update the buckets
+    based on keys created from start_time instead of now.
+    now and start_time are float seconds.
+    """
+    if (modules.get_current_module_name() not in MODULE_ALLOWLIST):
+      return
+
+    elapsed_ms = int((now - start_time) * 1000)
+    # Would it kill the python lib maintainers to have timedelta.total_ms()?
+    penalty = elapsed_ms // settings.ratelimiting_ms_per_count - 1
+    if penalty >= 1:
+      # TODO: Look into caching the keys instead of generating them twice
+      # for every request. Say, return them from CheckStart so they can
+      # be passed back in here later.
+      keysets, country, ip, user_email = _CacheKeys(request, start_time)
+
+      self._AuxCheckEnd(
+          keysets,
+          'Rate Limit Cost Threshold Exceeded: %s, %s, %s' % (
+              country, ip, user_email),
+          penalty)
+
+  def _AuxCheckEnd(self, keysets, log_str, penalty):
+    self.cost_thresh_exceeded.increment()
+    for keys in keysets:
+      logging.info(log_str)
+
+      # Only update the latest *time* bucket for each prefix (reverse chron).
+      k = keys[0]
+      memcache.add(k, 0, time=EXPIRE_AFTER_SECS)
+      memcache.incr(k, delta=penalty, initial_value=0)
+
+
+class ApiRateLimiter(RateLimiter):
+
+  blocked_requests = ts_mon.CounterMetric(
+      'monorail/apiratelimiter/blocked_request',
+      'Count of requests that exceeded the rate limit and were blocked.',
+      None)
+  limit_exceeded = ts_mon.CounterMetric(
+      'monorail/apiratelimiter/rate_exceeded',
+      'Count of requests that exceeded the rate limit.',
+      None)
+  cost_thresh_exceeded = ts_mon.CounterMetric(
+      'monorail/apiratelimiter/cost_thresh_exceeded',
+      'Count of requests that were expensive to process',
+      None)
+  checks = ts_mon.CounterMetric(
+      'monorail/apiratelimiter/check',
+      'Count of checks done, by fail/success type.',
+      [ts_mon.StringField('type')])
+
+  #pylint: disable=arguments-differ
+  def CheckStart(self, client_id, client_email, now=None):
+    if now is None:
+      now = time.time()
+
+    keysets = _CreateApiCacheKeys(client_id, client_email, now)
+    qpm_limit = client_config_svc.GetQPMDict().get(
+        client_email, DEFAULT_API_QPM)
+    if qpm_limit < DEFAULT_API_QPM:
+      qpm_limit = DEFAULT_API_QPM
+    window_limit = qpm_limit * N_MINUTES
+    self._AuxCheckStart(
+        keysets, window_limit,
+        settings.api_ratelimiting_enabled,
+        ApiRateLimitExceeded(client_id, client_email))
+
+  #pylint: disable=arguments-differ
+  def CheckEnd(self, client_id, client_email, now, start_time):
+
+    elapsed_ms = int((now - start_time) * 1000)
+    penalty = elapsed_ms // settings.ratelimiting_ms_per_count - 1
+
+    if penalty >= 1:
+      keysets = _CreateApiCacheKeys(client_id, client_email, start_time)
+      self._AuxCheckEnd(
+          keysets,
+          'API Rate Limit Cost Threshold Exceeded: %s, %s' % (
+              client_id, client_email),
+          penalty)
+
+
+class RateLimitExceeded(Exception):
+  def __init__(self, country=None, ip=None, user_email=None, **_kwargs):
+    self.country = country
+    self.ip = ip
+    self.user_email = user_email
+    message = 'RateLimitExceeded: %s, %s, %s' % (
+        self.country, self.ip, self.user_email)
+    super(RateLimitExceeded, self).__init__(message)
+
+
+class ApiRateLimitExceeded(Exception):
+  def __init__(self, client_id, client_email):
+    self.client_id = client_id
+    self.client_email = client_email
+    message = 'RateLimitExceeded: %s, %s' % (
+        self.client_id, self.client_email)
+    super(ApiRateLimitExceeded, self).__init__(message)
diff --git a/framework/reap.py b/framework/reap.py
new file mode 100644
index 0000000..6bc5cf0
--- /dev/null
+++ b/framework/reap.py
@@ -0,0 +1,125 @@
+# 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
+
+"""A class to handle cron requests to expunge doomed and deletable projects."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+from framework import jsonfeed
+
+RUN_DURATION_LIMIT = 50 * 60  # 50 minutes
+
+
+class Reap(jsonfeed.InternalTask):
+  """Look for doomed and deletable projects and delete them."""
+
+  def HandleRequest(self, mr):
+    """Update/Delete doomed and deletable projects as needed.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+
+    Returns:
+      Results dictionary in JSON format. The JSON will look like this:
+      {
+        'doomed_project_ids': <int>,
+        'expunged_project_ids': <int>
+      }
+      doomed_project_ids are the projects which have been marked as deletable.
+      expunged_project_ids are the projects that have either been completely
+      expunged or are in the midst of being expunged.
+    """
+    doomed_project_ids = self._MarkDoomedProjects(mr.cnxn)
+    expunged_project_ids = self._ExpungeDeletableProjects(mr.cnxn)
+    return {
+        'doomed_project_ids': doomed_project_ids,
+        'expunged_project_ids': expunged_project_ids,
+        }
+
+  def _MarkDoomedProjects(self, cnxn):
+    """No longer needed projects get doomed, and this marks them deletable."""
+    now = int(time.time())
+    doomed_project_rows = self.services.project.project_tbl.Select(
+        cnxn, cols=['project_id'],
+        # We only match projects with real timestamps and not delete_time = 0.
+        where=[('delete_time < %s', [now]), ('delete_time != %s', [0])],
+        state='archived', limit=1000)
+    doomed_project_ids = [row[0] for row in doomed_project_rows]
+    for project_id in doomed_project_ids:
+      # Note: We go straight to services layer because this is an internal
+      # request, not a request from a user.
+      self.services.project.MarkProjectDeletable(
+          cnxn, project_id, self.services.config)
+
+    return doomed_project_ids
+
+  def _ExpungeDeletableProjects(self, cnxn):
+    """Chip away at deletable projects until they are gone."""
+    request_deadline = time.time() + RUN_DURATION_LIMIT
+
+    deletable_project_rows = self.services.project.project_tbl.Select(
+        cnxn, cols=['project_id'], state='deletable', limit=100)
+    deletable_project_ids = [row[0] for row in deletable_project_rows]
+    # expunged_project_ids will contain projects that have either been
+    # completely expunged or are in the midst of being expunged.
+    expunged_project_ids = set()
+    for project_id in deletable_project_ids:
+      for _part in self._ExpungeParts(cnxn, project_id):
+        expunged_project_ids.add(project_id)
+        if time.time() > request_deadline:
+          return list(expunged_project_ids)
+
+    return list(expunged_project_ids)
+
+  def _ExpungeParts(self, cnxn, project_id):
+    """Delete all data from the specified project, one part at a time.
+
+    This method purges all data associated with the specified project. The
+    following is purged:
+    * All issues of the project.
+    * Project config.
+    * Saved queries.
+    * Filter rules.
+    * Former locations.
+    * Local ID counters.
+    * Quick edit history.
+    * Item stars.
+    * Project from the DB.
+
+    Returns a generator whose return values can be either issue
+    ids or the specified project id. The returned values are intended to be
+    iterated over and not read.
+    """
+    # Purge all issues of the project.
+    while True:
+      issue_id_rows = self.services.issue.issue_tbl.Select(
+          cnxn, cols=['id'], project_id=project_id, limit=1000)
+      issue_ids = [row[0] for row in issue_id_rows]
+      for issue_id in issue_ids:
+        self.services.issue_star.ExpungeStars(cnxn, issue_id)
+      self.services.issue.ExpungeIssues(cnxn, issue_ids)
+      yield issue_ids
+      break
+
+    # All project purge functions are called with cnxn and project_id.
+    project_purge_functions = (
+      self.services.config.ExpungeConfig,
+      self.services.template.ExpungeProjectTemplates,
+      self.services.features.ExpungeSavedQueriesExecuteInProject,
+      self.services.features.ExpungeFilterRules,
+      self.services.issue.ExpungeFormerLocations,
+      self.services.issue.ExpungeLocalIDCounters,
+      self.services.features.ExpungeQuickEditHistory,
+      self.services.project_star.ExpungeStars,
+      self.services.project.ExpungeProject,
+    )
+
+    for f in project_purge_functions:
+      f(cnxn, project_id)
+      yield project_id
diff --git a/framework/redis_utils.py b/framework/redis_utils.py
new file mode 100644
index 0000000..440603b
--- /dev/null
+++ b/framework/redis_utils.py
@@ -0,0 +1,125 @@
+# Copyright 2020 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.
+"""A utility module for interfacing with Redis conveniently. """
+import json
+import logging
+import threading
+
+import redis
+
+import settings
+from protorpc import protobuf
+
+connection_pool = None
+
+def CreateRedisClient():
+  # type: () -> redis.Redis
+  """Creates a Redis object which implements Redis protocol and connection.
+
+  Returns:
+    redis.Redis object initialized with a connection pool.
+    None on failure.
+  """
+  global connection_pool
+  if not connection_pool:
+    connection_pool = redis.BlockingConnectionPool(
+        host=settings.redis_host,
+        port=settings.redis_port,
+        max_connections=1,
+        # When Redis is not available, calls hang indefinitely without these.
+        socket_connect_timeout=2,
+        socket_timeout=2,
+    )
+  return redis.Redis(connection_pool=connection_pool)
+
+
+def AsyncVerifyRedisConnection():
+  # type: () -> None
+  """Verifies the redis connection in a separate thread.
+
+  Note that although an exception in the thread won't kill the main thread,
+  it is not risk free.
+
+  AppEngine joins with any running threads before finishing the request.
+  If this thread were to hang indefinitely, then it would cause the request
+  to hit DeadlineExceeded, thus still causing a user facing failure.
+
+  We mitigate this risk by setting socket timeouts on our connection pool.
+
+  # TODO(crbug/monorail/8221): Remove this code during this milestone.
+  """
+
+  def _AsyncVerifyRedisConnection():
+    logging.info('AsyncVerifyRedisConnection thread started.')
+    redis_client = CreateRedisClient()
+    VerifyRedisConnection(redis_client)
+
+  logging.info('Starting thread for AsyncVerifyRedisConnection.')
+  threading.Thread(target=_AsyncVerifyRedisConnection).start()
+
+
+def FormatRedisKey(key, prefix=None):
+  # type: (int, str) -> str
+  """Converts key to string and prepends the prefix.
+
+  Args:
+    key: Integer key.
+    prefix: String to prepend to the key.
+
+  Returns:
+    Formatted key with the format: "namespace:prefix:key".
+  """
+  formatted_key = ''
+  if prefix:
+    if prefix[-1] != ':':
+      prefix += ':'
+    formatted_key += prefix
+  return formatted_key + str(key)
+
+def VerifyRedisConnection(redis_client, msg=None):
+  # type: (redis.Redis, Optional[str]) -> bool
+  """Checks the connection to Redis to ensure a connection can be established.
+
+  Args:
+    redis_client: client to connect and ping redis server. This can be a redis
+      or fakeRedis object.
+    msg: string for used logging information.
+
+  Returns:
+    True when connection to server is valid.
+    False when an error occurs or redis_client is None.
+  """
+  if not redis_client:
+    logging.info('Redis client is set to None on connect in %s', msg)
+    return False
+  try:
+    redis_client.ping()
+    logging.info('Redis client successfully connected to Redis in %s', msg)
+    return True
+  except redis.RedisError as identifier:
+    # TODO(crbug/monorail/8224): We can downgrade this to warning once we are
+    # done with the switchover from memcache. Before that, log it to ensure we
+    # see it.
+    logging.exception(
+        'Redis error occurred while connecting to server in %s: %s', msg,
+        identifier)
+    return False
+
+
+def SerializeValue(value, pb_class=None):
+  # type: (Any, Optional[type|classobj]) -> str
+  """Serialize object as for storage in Redis. """
+  if pb_class and pb_class is not int:
+    return protobuf.encode_message(value)
+  else:
+    return json.dumps(value)
+
+
+def DeserializeValue(value, pb_class=None):
+  # type: (str, Optional[type|classobj]) -> Any
+  """Deserialize a string to create a python object. """
+  if pb_class and pb_class is not int:
+    return protobuf.decode_message(pb_class, value)
+  else:
+    return json.loads(value)
diff --git a/framework/registerpages_helpers.py b/framework/registerpages_helpers.py
new file mode 100644
index 0000000..9982639
--- /dev/null
+++ b/framework/registerpages_helpers.py
@@ -0,0 +1,81 @@
+# 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
+
+"""This file sets up all the urls for monorail pages."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+
+import httplib
+import logging
+
+import webapp2
+
+
+def MakeRedirect(redirect_to_this_uri, permanent=True):
+  """Return a new request handler class that redirects to the given URL."""
+
+  class Redirect(webapp2.RequestHandler):
+    """Redirect is a response handler that issues a redirect to another URI."""
+
+    def get(self, **_kw):
+      """Send the 301/302 response code and write the Location: redirect."""
+      self.response.location = redirect_to_this_uri
+      self.response.headers.add('Strict-Transport-Security',
+          'max-age=31536000; includeSubDomains')
+      self.response.status = (
+          httplib.MOVED_PERMANENTLY if permanent else httplib.FOUND)
+
+  return Redirect
+
+
+def MakeRedirectInScope(uri_in_scope, scope, permanent=True, keep_qs=False):
+  """Redirect to a URI within a given scope, e.g., per project or user.
+
+  Args:
+    uri_in_scope: a uri within a project or user starting with a slash.
+    scope: a string indicating the uri-space scope:
+      p for project pages
+      u for user pages
+      g for group pages
+    permanent: True for a HTTP 301 permanently moved response code,
+      otherwise a HTTP 302 temporarily moved response will be used.
+    keep_qs: set to True to make the redirect retain the query string.
+      When true, permanent is ignored.
+
+  Example:
+    self._SetupProjectPage(
+      redirect.MakeRedirectInScope('/newpage', 'p'), '/oldpage')
+
+  Returns:
+    A class that can be used with webapp2.
+  """
+  assert uri_in_scope.startswith('/')
+
+  class RedirectInScope(webapp2.RequestHandler):
+    """A handler that redirects to another URI in the same scope."""
+
+    def get(self, **_kw):
+      """Send the 301/302 response code and write the Location: redirect."""
+      split_path = self.request.path.lstrip('/').split('/')
+      if len(split_path) > 1:
+        project_or_user = split_path[1]
+        url = '//%s/%s/%s%s' % (
+            self.request.host, scope, project_or_user, uri_in_scope)
+      else:
+        url = '/'
+      if keep_qs and self.request.query_string:
+        url += '?' + self.request.query_string
+      self.response.location = url
+
+      self.response.headers.add('Strict-Transport-Security',
+          'max-age=31536000; includeSubDomains')
+      if permanent and not keep_qs:
+        self.response.status = httplib.MOVED_PERMANENTLY
+      else:
+        self.response.status = httplib.FOUND
+
+  return RedirectInScope
diff --git a/framework/servlet.py b/framework/servlet.py
new file mode 100644
index 0000000..1ed6935
--- /dev/null
+++ b/framework/servlet.py
@@ -0,0 +1,1047 @@
+# 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
+
+"""Base classes for Monorail servlets.
+
+This base class provides HTTP get() and post() methods that
+conveniently drive the process of parsing the request, checking base
+permissions, gathering common page information, gathering
+page-specific information, and adding on-page debugging information
+(when appropriate).  Subclasses can simply implement the page-specific
+logic.
+
+Summary of page classes:
+  Servlet: abstract base class for all Monorail servlets.
+  _ContextDebugItem: displays page_data elements for on-page debugging.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import gc
+import httplib
+import json
+import logging
+import os
+import random
+import time
+import urllib
+
+import ezt
+from third_party import httpagentparser
+
+from google.appengine.api import app_identity
+from google.appengine.api import modules
+from google.appengine.api import users
+from oauth2client.client import GoogleCredentials
+
+import webapp2
+
+import settings
+from businesslogic import work_env
+from features import savedqueries_helpers
+from features import features_bizobj
+from features import hotlist_views
+from framework import alerts
+from framework import exceptions
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import monorailrequest
+from framework import permissions
+from framework import ratelimiter
+from framework import servlet_helpers
+from framework import template_helpers
+from framework import urls
+from framework import xsrf
+from project import project_constants
+from proto import project_pb2
+from search import query2ast
+from tracker import tracker_views
+
+from infra_libs import ts_mon
+
+NONCE_LENGTH = 32
+
+if not settings.unit_test_mode:
+  import MySQLdb
+
+GC_COUNT = ts_mon.NonCumulativeDistributionMetric(
+    'monorail/servlet/gc_count',
+    'Count of objects in each generation tracked by the GC',
+    [ts_mon.IntegerField('generation')])
+
+GC_EVENT_REQUEST = ts_mon.CounterMetric(
+    'monorail/servlet/gc_event_request',
+    'Counts of requests that triggered at least one GC event',
+    [])
+
+# TODO(crbug/monorail:7084): Find a better home for this code.
+trace_service = None
+# TOD0(crbug/monorail:7082): Re-enable this once we have a solution that doesn't
+# inur clatency, or when we're actively using Cloud Tracing data.
+# if app_identity.get_application_id() != 'testing-app':
+#   logging.warning('app id: %s', app_identity.get_application_id())
+#   try:
+#     credentials = GoogleCredentials.get_application_default()
+#     trace_service = discovery.build(
+#         'cloudtrace', 'v1', credentials=credentials)
+#   except Exception as e:
+#     logging.warning('could not get trace service: %s', e)
+
+
+class MethodNotSupportedError(NotImplementedError):
+  """An exception class for indicating that the method is not supported.
+
+  Used by GatherPageData and ProcessFormData to indicate that GET and POST,
+  respectively, are not supported methods on the given Servlet.
+  """
+  pass
+
+
+class Servlet(webapp2.RequestHandler):
+  """Base class for all Monorail servlets.
+
+  Defines a framework of methods that build up parts of the EZT page data.
+
+  Subclasses should override GatherPageData and/or ProcessFormData to
+  handle requests.
+  """
+
+  _MAIN_TAB_MODE = None  # Normally overriden in subclasses to be one of these:
+
+  MAIN_TAB_NONE = 't0'
+  MAIN_TAB_DASHBOARD = 't1'
+  MAIN_TAB_ISSUES = 't2'
+  MAIN_TAB_PEOPLE = 't3'
+  MAIN_TAB_PROCESS = 't4'
+  MAIN_TAB_UPDATES = 't5'
+  MAIN_TAB_ADMIN = 't6'
+  MAIN_TAB_DETAILS = 't7'
+  PROCESS_TAB_SUMMARY = 'st1'
+  PROCESS_TAB_STATUSES = 'st3'
+  PROCESS_TAB_LABELS = 'st4'
+  PROCESS_TAB_RULES = 'st5'
+  PROCESS_TAB_TEMPLATES = 'st6'
+  PROCESS_TAB_COMPONENTS = 'st7'
+  PROCESS_TAB_VIEWS = 'st8'
+  ADMIN_TAB_META = 'st1'
+  ADMIN_TAB_ADVANCED = 'st9'
+  HOTLIST_TAB_ISSUES = 'ht2'
+  HOTLIST_TAB_PEOPLE = 'ht3'
+  HOTLIST_TAB_DETAILS = 'ht4'
+
+  # Most forms require a security token, however if a form is really
+  # just redirecting to a search GET request without writing any data,
+  # subclass can override this to allow anonymous use.
+  CHECK_SECURITY_TOKEN = True
+
+  # Some pages might be posted to by clients outside of Monorail.
+  # ie: The issue entry page, by the issue filing wizard. In these cases,
+  # we can allow an xhr-scoped XSRF token to be used to post to the page.
+  ALLOW_XHR = False
+
+  # Most forms just ignore fields that have value "".  Subclasses can override
+  # if needed.
+  KEEP_BLANK_FORM_VALUES = False
+
+  # Most forms use regular forms, but subclasses that accept attached files can
+  # override this to be True.
+  MULTIPART_POST_BODY = False
+
+  # This value should not typically be overridden.
+  _TEMPLATE_PATH = framework_constants.TEMPLATE_PATH
+
+  _PAGE_TEMPLATE = None  # Normally overriden in subclasses.
+  _ELIMINATE_BLANK_LINES = False
+
+  _MISSING_PERMISSIONS_TEMPLATE = 'sitewide/403-page.ezt'
+
+  def __init__(self, request, response, services=None,
+               content_type='text/html; charset=UTF-8'):
+    """Load and parse the template, saving it for later use."""
+    super(Servlet, self).__init__(request, response)
+    if self._PAGE_TEMPLATE:  # specified in subclasses
+      template_path = self._TEMPLATE_PATH + self._PAGE_TEMPLATE
+      self.template = template_helpers.GetTemplate(
+          template_path, eliminate_blank_lines=self._ELIMINATE_BLANK_LINES)
+    else:
+      self.template = None
+
+    self._missing_permissions_template = template_helpers.MonorailTemplate(
+        self._TEMPLATE_PATH + self._MISSING_PERMISSIONS_TEMPLATE)
+    self.services = services or self.app.config.get('services')
+    self.content_type = content_type
+    self.mr = None
+    self.ratelimiter = ratelimiter.RateLimiter()
+
+  def dispatch(self):
+    """Do common stuff then dispatch the request to get() or put() methods."""
+    handler_start_time = time.time()
+
+    logging.info('\n\n\nRequest handler: %r', self)
+    count0, count1, count2 = gc.get_count()
+    logging.info('gc counts: %d %d %d', count0, count1, count2)
+    GC_COUNT.add(count0, {'generation': 0})
+    GC_COUNT.add(count1, {'generation': 1})
+    GC_COUNT.add(count2, {'generation': 2})
+
+    self.mr = monorailrequest.MonorailRequest(self.services)
+
+    self.response.headers.add('Strict-Transport-Security',
+        'max-age=31536000; includeSubDomains')
+
+    if 'X-Cloud-Trace-Context' in self.request.headers:
+      self.mr.profiler.trace_context = (
+          self.request.headers.get('X-Cloud-Trace-Context'))
+    # TOD0(crbug/monorail:7082): Re-enable tracing.
+    # if trace_service is not None:
+    #   self.mr.profiler.trace_service = trace_service
+
+    if self.services.cache_manager:
+      # TODO(jrobbins): don't do this step if invalidation_timestep was
+      # passed via the request and matches our last timestep
+      try:
+        with self.mr.profiler.Phase('distributed invalidation'):
+          self.services.cache_manager.DoDistributedInvalidation(self.mr.cnxn)
+
+      except MySQLdb.OperationalError as e:
+        logging.exception(e)
+        page_data = {
+          'http_response_code': httplib.SERVICE_UNAVAILABLE,
+          'requested_url': self.request.url,
+        }
+        self.template = template_helpers.GetTemplate(
+            'templates/framework/database-maintenance.ezt',
+            eliminate_blank_lines=self._ELIMINATE_BLANK_LINES)
+        self.template.WriteResponse(
+          self.response, page_data, content_type='text/html')
+        return
+
+    try:
+      self.ratelimiter.CheckStart(self.request)
+
+      with self.mr.profiler.Phase('parsing request and doing lookups'):
+        self.mr.ParseRequest(self.request, self.services)
+
+      self.response.headers['X-Frame-Options'] = 'SAMEORIGIN'
+      webapp2.RequestHandler.dispatch(self)
+
+    except exceptions.NoSuchUserException as e:
+      logging.warning('Trapped NoSuchUserException %s', e)
+      self.abort(404, 'user not found')
+
+    except exceptions.NoSuchGroupException as e:
+      logging.warning('Trapped NoSuchGroupException %s', e)
+      self.abort(404, 'user group not found')
+
+    except exceptions.InputException as e:
+      logging.info('Rejecting invalid input: %r', e)
+      self.response.status = httplib.BAD_REQUEST
+
+    except exceptions.NoSuchProjectException as e:
+      logging.info('Rejecting invalid request: %r', e)
+      self.response.status = httplib.NOT_FOUND
+
+    except xsrf.TokenIncorrect as e:
+      logging.info('Bad XSRF token: %r', e.message)
+      self.response.status = httplib.BAD_REQUEST
+
+    except permissions.BannedUserException as e:
+      logging.warning('The user has been banned')
+      url = framework_helpers.FormatAbsoluteURL(
+          self.mr, urls.BANNED, include_project=False, copy_params=False)
+      self.redirect(url, abort=True)
+
+    except ratelimiter.RateLimitExceeded as e:
+      logging.info('RateLimitExceeded Exception %s', e)
+      self.response.status = httplib.BAD_REQUEST
+      self.response.body = 'Slow your roll.'
+
+    finally:
+      self.mr.CleanUp()
+      self.ratelimiter.CheckEnd(self.request, time.time(), handler_start_time)
+
+    total_processing_time = time.time() - handler_start_time
+    logging.info(
+        'Processed request in %d ms', int(total_processing_time * 1000))
+
+    end_count0, end_count1, end_count2 = gc.get_count()
+    logging.info('gc counts: %d %d %d', end_count0, end_count1, end_count2)
+    if (end_count0 < count0) or (end_count1 < count1) or (end_count2 < count2):
+      GC_EVENT_REQUEST.increment()
+
+    if settings.enable_profiler_logging:
+      self.mr.profiler.LogStats()
+
+    # TOD0(crbug/monorail:7082, crbug/monorail:7088): Re-enable this when we
+    # have solved the latency, or when we really need the profiler data.
+    # if self.mr.profiler.trace_context is not None:
+    #   try:
+    #     self.mr.profiler.ReportTrace()
+    #   except Exception as ex:
+    #     # We never want Cloud Tracing to cause a user-facing error.
+    #     logging.warning('Ignoring exception reporting Cloud Trace %s', ex)
+
+  def _AddHelpDebugPageData(self, page_data):
+    with self.mr.profiler.Phase('help and debug data'):
+      page_data.update(self.GatherHelpData(self.mr, page_data))
+      page_data.update(self.GatherDebugData(self.mr, page_data))
+
+  # pylint: disable=unused-argument
+  def get(self, **kwargs):
+    """Collect page-specific and generic info, then render the page.
+
+    Args:
+      Any path components parsed by webapp2 will be in kwargs, but we do
+        our own parsing later anyway, so igore them for now.
+    """
+    page_data = {}
+    nonce = framework_helpers.MakeRandomKey(length=NONCE_LENGTH)
+    try:
+      csp_header = 'Content-Security-Policy'
+      csp_scheme = 'https:'
+      if settings.local_mode:
+        csp_header = 'Content-Security-Policy-Report-Only'
+        csp_scheme = 'http:'
+      user_agent_str = self.mr.request.headers.get('User-Agent', '')
+      ua = httpagentparser.detect(user_agent_str)
+      browser, browser_major_version = 'Unknown browser', 0
+      if ua.has_key('browser'):
+        browser = ua['browser']['name']
+        try:
+          browser_major_version = int(ua['browser']['version'].split('.')[0])
+        except ValueError:
+          logging.warn('Could not parse version: %r', ua['browser']['version'])
+      csp_supports_report_sample = (
+        (browser == 'Chrome' and browser_major_version >= 59) or
+        (browser == 'Opera' and browser_major_version >= 46))
+      version_base = _VersionBaseURL(self.mr.request)
+      self.response.headers.add(csp_header,
+           ("default-src %(scheme)s ; "
+            "script-src"
+            " %(rep_samp)s"  # Report 40 chars of any inline violation.
+            " 'unsafe-inline'"  # Only counts in browsers that lack CSP2.
+            " 'strict-dynamic'"  # Allows <script nonce> to load more.
+            " %(version_base)s/static/dist/"
+            " 'self' 'nonce-%(nonce)s'; "
+            "child-src 'none'; "
+            "frame-src accounts.google.com" # All used by gapi.js auth.
+            " content-issuetracker.corp.googleapis.com"
+            " login.corp.google.com up.corp.googleapis.com"
+            # Used by Google Feedback
+            " feedback.googleusercontent.com"
+            " www.google.com; "
+            "img-src %(scheme)s data: blob: ; "
+            "style-src %(scheme)s 'unsafe-inline'; "
+            "object-src 'none'; "
+            "base-uri 'self'; " # Used by Google Feedback
+            "report-uri /csp.do" % {
+            'nonce': nonce,
+            'scheme': csp_scheme,
+            'rep_samp': "'report-sample'" if csp_supports_report_sample else '',
+            'version_base': version_base,
+            }))
+
+      page_data.update(self._GatherFlagData(self.mr))
+
+      # Page-specific work happens in this call.
+      page_data.update(self._DoPageProcessing(self.mr, nonce))
+
+      self._AddHelpDebugPageData(page_data)
+
+      with self.mr.profiler.Phase('rendering template'):
+        self._RenderResponse(page_data)
+
+    except (MethodNotSupportedError, NotImplementedError) as e:
+      # Instead of these pages throwing 500s display the 404 message and log.
+      # The motivation of this is to minimize 500s on the site to keep alerts
+      # meaningful during fuzzing. For more context see
+      # https://bugs.chromium.org/p/monorail/issues/detail?id=659
+      logging.warning('Trapped NotImplementedError %s', e)
+      self.abort(404, 'invalid page')
+    except query2ast.InvalidQueryError as e:
+      logging.warning('Trapped InvalidQueryError: %s', e)
+      logging.exception(e)
+      msg = e.message if e.message else 'invalid query'
+      self.abort(400, msg)
+    except permissions.PermissionException as e:
+      logging.warning('Trapped PermissionException %s', e)
+      logging.warning('mr.auth.user_id is %s', self.mr.auth.user_id)
+      logging.warning('mr.auth.effective_ids is %s', self.mr.auth.effective_ids)
+      logging.warning('mr.perms is %s', self.mr.perms)
+      if not self.mr.auth.user_id:
+        # If not logged in, let them log in
+        url = _SafeCreateLoginURL(self.mr)
+        self.redirect(url, abort=True)
+      else:
+        # Display the missing permissions template.
+        page_data = {
+            'reason': e.message,
+            'http_response_code': httplib.FORBIDDEN,
+            }
+        with self.mr.profiler.Phase('gather base data'):
+          page_data.update(self.GatherBaseData(self.mr, nonce))
+        self._AddHelpDebugPageData(page_data)
+        self._missing_permissions_template.WriteResponse(
+            self.response, page_data, content_type=self.content_type)
+
+  def SetCacheHeaders(self, response):
+    """Set headers to allow the response to be cached."""
+    headers = framework_helpers.StaticCacheHeaders()
+    for name, value in headers:
+      response.headers[name] = value
+
+  def GetTemplate(self, _page_data):
+    """Get the template to use for writing the http response.
+
+    Defaults to self.template.  This method can be overwritten in subclasses
+    to allow dynamic template selection based on page_data.
+
+    Args:
+      _page_data: A dict of data for ezt rendering, containing base ezt
+      data, page data, and debug data.
+
+    Returns:
+      The template to be used for writing the http response.
+    """
+    return self.template
+
+  def _GatherFlagData(self, mr):
+    page_data = {
+        'project_stars_enabled': ezt.boolean(
+            settings.enable_project_stars),
+        'user_stars_enabled': ezt.boolean(settings.enable_user_stars),
+        'can_create_project': ezt.boolean(
+            permissions.CanCreateProject(mr.perms)),
+        'can_create_group': ezt.boolean(
+            permissions.CanCreateGroup(mr.perms)),
+        }
+
+    return page_data
+
+  def _RenderResponse(self, page_data):
+    logging.info('rendering response len(page_data) is %r', len(page_data))
+    self.GetTemplate(page_data).WriteResponse(
+        self.response, page_data, content_type=self.content_type)
+
+  def ProcessFormData(self, mr, post_data):
+    """Handle form data and redirect appropriately.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: HTML form data from the request.
+
+    Returns:
+      String URL to redirect the user to, or None if response was already sent.
+    """
+    raise MethodNotSupportedError()
+
+  def post(self, **kwargs):
+    """Parse the request, check base perms, and call form-specific code."""
+    try:
+      # Page-specific work happens in this call.
+      self._DoFormProcessing(self.request, self.mr)
+
+    except permissions.PermissionException as e:
+      logging.warning('Trapped permission-related exception "%s".', e)
+      # TODO(jrobbins): can we do better than an error page? not much.
+      self.response.status = httplib.BAD_REQUEST
+
+  def _DoCommonRequestProcessing(self, request, mr):
+    """Do common processing dependent on having the user and project pbs."""
+    with mr.profiler.Phase('basic processing'):
+      self._CheckForMovedProject(mr, request)
+      self.AssertBasePermission(mr)
+
+  def _DoPageProcessing(self, mr, nonce):
+    """Do user lookups and gather page-specific ezt data."""
+    with mr.profiler.Phase('common request data'):
+      self._DoCommonRequestProcessing(self.request, mr)
+      self._MaybeRedirectToBrandedDomain(self.request, mr.project_name)
+      page_data = self.GatherBaseData(mr, nonce)
+
+    with mr.profiler.Phase('page processing'):
+      page_data.update(self.GatherPageData(mr))
+      page_data.update(mr.form_overrides)
+      template_helpers.ExpandLabels(page_data)
+      self._RecordVisitTime(mr)
+
+    return page_data
+
+  def _DoFormProcessing(self, request, mr):
+    """Do user lookups and handle form data."""
+    self._DoCommonRequestProcessing(request, mr)
+
+    if self.CHECK_SECURITY_TOKEN:
+      try:
+        xsrf.ValidateToken(
+            request.POST.get('token'), mr.auth.user_id, request.path)
+      except xsrf.TokenIncorrect as err:
+        if self.ALLOW_XHR:
+          xsrf.ValidateToken(request.POST.get('token'), mr.auth.user_id, 'xhr')
+        else:
+          raise err
+
+    redirect_url = self.ProcessFormData(mr, request.POST)
+
+    # Most forms redirect the user to a new URL on success.  If no
+    # redirect_url was returned, the form handler must have already
+    # sent a response.  E.g., bounced the user back to the form with
+    # invalid form fields higlighted.
+    if redirect_url:
+      self.redirect(redirect_url, abort=True)
+    else:
+      assert self.response.body
+
+  def _CheckForMovedProject(self, mr, request):
+    """If the project moved, redirect there or to an informational page."""
+    if not mr.project:
+      return  # We are on a site-wide or user page.
+    if not mr.project.moved_to:
+      return  # This project has not moved.
+    admin_url = '/p/%s%s' % (mr.project_name, urls.ADMIN_META)
+    if request.path.startswith(admin_url):
+      return  # It moved, but we are near the page that can un-move it.
+
+    logging.info('project %s has moved: %s', mr.project.project_name,
+                 mr.project.moved_to)
+
+    moved_to = mr.project.moved_to
+    if project_constants.RE_PROJECT_NAME.match(moved_to):
+      # Use the redir query parameter to avoid redirect loops.
+      if mr.redir is None:
+        url = framework_helpers.FormatMovedProjectURL(mr, moved_to)
+        if '?' in url:
+          url += '&redir=1'
+        else:
+          url += '?redir=1'
+        logging.info('trusted move to a new project on our site')
+        self.redirect(url, abort=True)
+
+    logging.info('not a trusted move, will display link to user to click')
+    # Attach the project name as a url param instead of generating a /p/
+    # link to the destination project.
+    url = framework_helpers.FormatAbsoluteURL(
+        mr, urls.PROJECT_MOVED,
+        include_project=False, copy_params=False, project=mr.project_name)
+    self.redirect(url, abort=True)
+
+  def _MaybeRedirectToBrandedDomain(self, request, project_name):
+    """If we are live and the project should be branded, check request host."""
+    if request.params.get('redir'):
+      return  # Avoid any chance of a redirect loop.
+    if not project_name:
+      return
+    needed_domain = framework_helpers.GetNeededDomain(
+        project_name, request.host)
+    if not needed_domain:
+      return
+
+    url = 'https://%s%s' % (needed_domain, request.path_qs)
+    if '?' in url:
+      url += '&redir=1'
+    else:
+      url += '?redir=1'
+    logging.info('branding redirect to url %r', url)
+    self.redirect(url, abort=True)
+
+  def CheckPerm(self, mr, perm, art=None, granted_perms=None):
+    """Return True if the user can use the requested permission."""
+    return servlet_helpers.CheckPerm(
+        mr, perm, art=art, granted_perms=granted_perms)
+
+  def MakePagePerms(self, mr, art, *perm_list, **kwargs):
+    """Make an EZTItem with a set of permissions needed in a given template.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      art: a project artifact, such as an issue.
+      *perm_list: any number of permission names that are referenced
+          in the EZT template.
+      **kwargs: dictionary that may include 'granted_perms' list of permissions
+          granted to the current user specifically on the current page.
+
+    Returns:
+      An EZTItem with one attribute for each permission and the value
+      of each attribute being an ezt.boolean().  True if the user
+      is permitted to do that action on the given artifact, or
+      False if not.
+    """
+    granted_perms = kwargs.get('granted_perms')
+    page_perms = template_helpers.EZTItem()
+    for perm in perm_list:
+      setattr(
+          page_perms, perm,
+          ezt.boolean(self.CheckPerm(
+              mr, perm, art=art, granted_perms=granted_perms)))
+
+    return page_perms
+
+  def AssertBasePermission(self, mr):
+    """Make sure that the logged in user has permission to view this page.
+
+    Subclasses should call super, then check additional permissions
+    and raise a PermissionException if the user is not authorized to
+    do something.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Raises:
+      PermissionException: If the user does not have permisssion to view
+        the current page.
+    """
+    servlet_helpers.AssertBasePermission(mr)
+
+  def GatherBaseData(self, mr, nonce):
+    """Return a dict of info used on almost all pages."""
+    project = mr.project
+
+    project_summary = ''
+    project_alert = None
+    project_read_only = False
+    project_home_page = ''
+    project_thumbnail_url = ''
+    if project:
+      project_summary = project.summary
+      project_alert = _CalcProjectAlert(project)
+      project_read_only = project.read_only_reason
+      project_home_page = project.home_page
+      project_thumbnail_url = tracker_views.LogoView(project).thumbnail_url
+
+    with work_env.WorkEnv(mr, self.services) as we:
+      is_project_starred = False
+      project_view = None
+      if mr.project:
+        if permissions.UserCanViewProject(
+            mr.auth.user_pb, mr.auth.effective_ids, mr.project):
+          is_project_starred = we.IsProjectStarred(mr.project_id)
+          # TODO(jrobbins): should this be a ProjectView?
+          project_view = template_helpers.PBProxy(mr.project)
+
+    grid_x_attr = None
+    grid_y_attr = None
+    hotlist_view = None
+    if mr.hotlist:
+      users_by_id = framework_views.MakeAllUserViews(
+          mr.cnxn, self.services.user,
+          features_bizobj.UsersInvolvedInHotlists([mr.hotlist]))
+      hotlist_view = hotlist_views.HotlistView(
+          mr.hotlist, mr.perms, mr.auth, mr.viewed_user_auth.user_id,
+          users_by_id, self.services.hotlist_star.IsItemStarredBy(
+            mr.cnxn, mr.hotlist.hotlist_id, mr.auth.user_id))
+      grid_x_attr = mr.x.lower()
+      grid_y_attr = mr.y.lower()
+
+    app_version = os.environ.get('CURRENT_VERSION_ID')
+
+    viewed_username = None
+    if mr.viewed_user_auth.user_view:
+      viewed_username = mr.viewed_user_auth.user_view.username
+
+    config = None
+    if mr.project_id and self.services.config:
+      with mr.profiler.Phase('getting config'):
+        config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+      grid_x_attr = (mr.x or config.default_x_attr).lower()
+      grid_y_attr = (mr.y or config.default_y_attr).lower()
+
+    viewing_self = mr.auth.user_id == mr.viewed_user_auth.user_id
+    offer_saved_queries_subtab = (
+        viewing_self or mr.auth.user_pb and mr.auth.user_pb.is_site_admin)
+
+    login_url = _SafeCreateLoginURL(mr)
+    logout_url = _SafeCreateLogoutURL(mr)
+    logout_url_goto_home = users.create_logout_url('/')
+    version_base = _VersionBaseURL(mr.request)
+
+    base_data = {
+        # EZT does not have constants for True and False, so we pass them in.
+        'True':
+            ezt.boolean(True),
+        'False':
+            ezt.boolean(False),
+        'local_mode':
+            ezt.boolean(settings.local_mode),
+        'site_name':
+            settings.site_name,
+        'show_search_metadata':
+            ezt.boolean(False),
+        'page_template':
+            self._PAGE_TEMPLATE,
+        'main_tab_mode':
+            self._MAIN_TAB_MODE,
+        'project_summary':
+            project_summary,
+        'project_home_page':
+            project_home_page,
+        'project_thumbnail_url':
+            project_thumbnail_url,
+        'hotlist_id':
+            mr.hotlist_id,
+        'hotlist':
+            hotlist_view,
+        'hostport':
+            mr.request.host,
+        'absolute_base_url':
+            '%s://%s' % (mr.request.scheme, mr.request.host),
+        'project_home_url':
+            None,
+        'link_rel_canonical':
+            None,  # For specifying <link rel="canonical">
+        'projectname':
+            mr.project_name,
+        'project':
+            project_view,
+        'project_is_restricted':
+            ezt.boolean(_ProjectIsRestricted(mr)),
+        'offer_contributor_list':
+            ezt.boolean(permissions.CanViewContributorList(mr, mr.project)),
+        'logged_in_user':
+            mr.auth.user_view,
+        'form_token':
+            None,  # Set to a value below iff the user is logged in.
+        'form_token_path':
+            None,
+        'token_expires_sec':
+            None,
+        'xhr_token':
+            None,  # Set to a value below iff the user is logged in.
+        'flag_spam_token':
+            None,
+        'nonce':
+            nonce,
+        'perms':
+            mr.perms,
+        'warnings':
+            mr.warnings,
+        'errors':
+            mr.errors,
+        'viewed_username':
+            viewed_username,
+        'viewed_user':
+            mr.viewed_user_auth.user_view,
+        'viewed_user_pb':
+            template_helpers.PBProxy(mr.viewed_user_auth.user_pb),
+        'viewing_self':
+            ezt.boolean(viewing_self),
+        'viewed_user_id':
+            mr.viewed_user_auth.user_id,
+        'offer_saved_queries_subtab':
+            ezt.boolean(offer_saved_queries_subtab),
+        'currentPageURL':
+            mr.current_page_url,
+        'currentPageURLEncoded':
+            mr.current_page_url_encoded,
+        'login_url':
+            login_url,
+        'logout_url':
+            logout_url,
+        'logout_url_goto_home':
+            logout_url_goto_home,
+        'continue_issue_id':
+            mr.continue_issue_id,
+        'feedback_email':
+            settings.feedback_email,
+        'category_css':
+            None,  # Used to specify a category of stylesheet
+        'category2_css':
+            None,  # specify a 2nd category of stylesheet if needed.
+        'page_css':
+            None,  # Used to add a stylesheet to a specific page.
+        'can':
+            mr.can,
+        'query':
+            mr.query,
+        'colspec':
+            None,
+        'sortspec':
+            mr.sort_spec,
+
+        # Options for issuelist display
+        'grid_x_attr':
+            grid_x_attr,
+        'grid_y_attr':
+            grid_y_attr,
+        'grid_cell_mode':
+            mr.cells,
+        'grid_mode':
+            None,
+        'list_mode':
+            None,
+        'chart_mode':
+            None,
+        'is_cross_project':
+            ezt.boolean(False),
+
+        # for project search (some also used in issue search)
+        'start':
+            mr.start,
+        'num':
+            mr.num,
+        'groupby':
+            mr.group_by_spec,
+        'q_field_size': (min(
+            framework_constants.MAX_ARTIFACT_SEARCH_FIELD_SIZE,
+            max(framework_constants.MIN_ARTIFACT_SEARCH_FIELD_SIZE,
+                len(mr.query) + framework_constants.AUTOSIZE_STEP))),
+        'mode':
+            None,  # Display mode, e.g., grid mode.
+        'ajah':
+            mr.ajah,
+        'table_title':
+            mr.table_title,
+        'alerts':
+            alerts.AlertsView(mr),  # For alert.ezt
+        'project_alert':
+            project_alert,
+        'title':
+            None,  # First part of page title
+        'title_summary':
+            None,  # Appended to title on artifact detail pages
+
+        # TODO(jrobbins): make sure that the templates use
+        # project_read_only for project-mutative actions and if any
+        # uses of read_only remain.
+        'project_read_only':
+            ezt.boolean(project_read_only),
+        'site_read_only':
+            ezt.boolean(settings.read_only),
+        'banner_time':
+            servlet_helpers.GetBannerTime(settings.banner_time),
+        'read_only':
+            ezt.boolean(settings.read_only or project_read_only),
+        'site_banner_message':
+            settings.banner_message,
+        'robots_no_index':
+            None,
+        'analytics_id':
+            settings.analytics_id,
+        'is_project_starred':
+            ezt.boolean(is_project_starred),
+        'version_base':
+            version_base,
+        'app_version':
+            app_version,
+        'gapi_client_id':
+            settings.gapi_client_id,
+        'viewing_user_page':
+            ezt.boolean(False),
+        'old_ui_url':
+            None,
+        'new_ui_url':
+            None,
+        'is_member':
+            ezt.boolean(False),
+    }
+
+    if mr.project:
+      base_data['project_home_url'] = '/p/%s' % mr.project_name
+
+    # Always add xhr-xsrf token because even anon users need some
+    # pRPC methods, e.g., autocomplete, flipper, and charts.
+    base_data['token_expires_sec'] = xsrf.TokenExpiresSec()
+    base_data['xhr_token'] = xsrf.GenerateToken(
+        mr.auth.user_id, xsrf.XHR_SERVLET_PATH)
+    # Always add other anti-xsrf tokens when the user is logged in.
+    if mr.auth.user_id:
+      form_token_path = self._FormHandlerURL(mr.request.path)
+      base_data['form_token'] = xsrf.GenerateToken(
+        mr.auth.user_id, form_token_path)
+      base_data['form_token_path'] = form_token_path
+
+    return base_data
+
+  def _FormHandlerURL(self, path):
+    """Return the form handler for the main form on a page."""
+    if path.endswith('/'):
+      return path + 'edit.do'
+    elif path.endswith('.do'):
+      return path  # This happens as part of PleaseCorrect().
+    else:
+      return path + '.do'
+
+  def GatherPageData(self, mr):
+    """Return a dict of page-specific ezt data."""
+    raise MethodNotSupportedError()
+
+  # pylint: disable=unused-argument
+  def GatherHelpData(self, mr, page_data):
+    """Return a dict of values to drive on-page user help.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+      page_data: Dictionary of base and page template data.
+
+    Returns:
+      A dict of values to drive on-page user help, to be added to page_data.
+    """
+    help_data = {
+        'cue': None,  # for cues.ezt
+        'account_cue': None,  # for cues.ezt
+        }
+    dismissed = []
+    if mr.auth.user_pb:
+      with work_env.WorkEnv(mr, self.services) as we:
+        userprefs = we.GetUserPrefs(mr.auth.user_id)
+      dismissed = [
+          pv.name for pv in userprefs.prefs if pv.value == 'true']
+      if (mr.auth.user_pb.vacation_message and
+          'you_are_on_vacation' not in dismissed):
+        help_data['cue'] = 'you_are_on_vacation'
+      if (mr.auth.user_pb.email_bounce_timestamp and
+          'your_email_bounced' not in dismissed):
+        help_data['cue'] = 'your_email_bounced'
+      if mr.auth.user_pb.linked_parent_id:
+        # This one is not dismissable.
+        help_data['account_cue'] = 'switch_to_parent_account'
+        parent_email = self.services.user.LookupUserEmail(
+            mr.cnxn, mr.auth.user_pb.linked_parent_id)
+        help_data['parent_email'] = parent_email
+
+    return help_data
+
+  def GatherDebugData(self, mr, page_data):
+    """Return debugging info for display at the very bottom of the page."""
+    if mr.debug_enabled:
+      debug = [_ContextDebugCollection('Page data', page_data)]
+      return {
+          'dbg': 'on',
+          'debug': debug,
+          'profiler': mr.profiler,
+          }
+    else:
+      if '?' in mr.current_page_url:
+        debug_url = mr.current_page_url + '&debug=1'
+      else:
+        debug_url = mr.current_page_url + '?debug=1'
+
+      return {
+          'debug_uri': debug_url,
+          'dbg': 'off',
+          'debug': [('none', 'recorded')],
+          }
+
+  def PleaseCorrect(self, mr, **echo_data):
+    """Show the same form again so that the user can correct their input."""
+    mr.PrepareForReentry(echo_data)
+    self.get()
+
+  def _RecordVisitTime(self, mr, now=None):
+    """Record the signed in user's last visit time, if possible."""
+    now = now or int(time.time())
+    if not settings.read_only and mr.auth.user_id:
+      user_pb = mr.auth.user_pb
+      if (user_pb.last_visit_timestamp <
+          now - framework_constants.VISIT_RESOLUTION):
+        user_pb.last_visit_timestamp = now
+        self.services.user.UpdateUser(mr.cnxn, user_pb.user_id, user_pb)
+
+
+def _CalcProjectAlert(project):
+  """Return a string to be shown as red text explaning the project state."""
+
+  project_alert = None
+
+  if project.read_only_reason:
+    project_alert = 'READ-ONLY: %s.' % project.read_only_reason
+  if project.moved_to:
+    project_alert = 'This project has moved to: %s.' % project.moved_to
+  elif project.delete_time:
+    delay_seconds = project.delete_time - time.time()
+    delay_days = delay_seconds // framework_constants.SECS_PER_DAY
+    if delay_days <= 0:
+      project_alert = 'Scheduled for deletion today.'
+    else:
+      days_word = 'day' if delay_days == 1 else 'days'
+      project_alert = (
+          'Scheduled for deletion in %d %s.' % (delay_days, days_word))
+  elif project.state == project_pb2.ProjectState.ARCHIVED:
+    project_alert = 'Project is archived: read-only by members only.'
+
+  return project_alert
+
+
+class _ContextDebugItem(object):
+  """Wrapper class to generate on-screen debugging output."""
+
+  def __init__(self, key, val):
+    """Store the key and generate a string for the value."""
+    self.key = key
+    if isinstance(val, list):
+      nested_debug_strs = [self.StringRep(v) for v in val]
+      self.val = '[%s]' % ', '.join(nested_debug_strs)
+    else:
+      self.val = self.StringRep(val)
+
+  def StringRep(self, val):
+    """Make a useful string representation of the given value."""
+    try:
+      return val.DebugString()
+    except Exception:
+      try:
+        return str(val.__dict__)
+      except Exception:
+        return repr(val)
+
+
+class _ContextDebugCollection(object):
+  """Attach a title to a dictionary for exporting as a table of debug info."""
+
+  def __init__(self, title, collection):
+    self.title = title
+    self.collection = [_ContextDebugItem(key, collection[key])
+                       for key in sorted(collection.keys())]
+
+
+def _ProjectIsRestricted(mr):
+  """Return True if the mr has a 'private' project."""
+  return (mr.project and
+          mr.project.access != project_pb2.ProjectAccess.ANYONE)
+
+
+def _SafeCreateLoginURL(mr, continue_url=None):
+  """Make a login URL w/ a detailed continue URL, otherwise use a short one."""
+  continue_url = continue_url or mr.current_page_url
+  try:
+    url = users.create_login_url(continue_url)
+  except users.RedirectTooLongError:
+    if mr.project_name:
+      url = users.create_login_url('/p/%s' % mr.project_name)
+    else:
+      url = users.create_login_url('/')
+
+  # Give the user a choice of existing accounts in their session
+  # or the option to add an account, even if they are currently
+  # signed in to exactly one account.
+  if mr.auth.user_id:
+    # Notice: this makes assuptions about the output of users.create_login_url,
+    # which can change at any time. See https://crbug.com/monorail/3352.
+    url = url.replace('/ServiceLogin', '/AccountChooser', 1)
+  return url
+
+
+def _SafeCreateLogoutURL(mr):
+  """Make a logout URL w/ a detailed continue URL, otherwise use a short one."""
+  try:
+    return users.create_logout_url(mr.current_page_url)
+  except users.RedirectTooLongError:
+    if mr.project_name:
+      return users.create_logout_url('/p/%s' % mr.project_name)
+    else:
+      return users.create_logout_url('/')
+
+
+def _VersionBaseURL(request):
+  """Return a version-specific URL that we use to load static assets."""
+  if settings.local_mode:
+    version_base = '%s://%s' % (request.scheme, request.host)
+  else:
+    version_base = '%s://%s-dot-%s' % (
+      request.scheme, modules.get_current_version_name(),
+      app_identity.get_default_version_hostname())
+
+  return version_base
diff --git a/framework/servlet_helpers.py b/framework/servlet_helpers.py
new file mode 100644
index 0000000..68eb0c4
--- /dev/null
+++ b/framework/servlet_helpers.py
@@ -0,0 +1,160 @@
+# 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
+
+"""Helper functions used by the Monorail servlet base class."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import calendar
+import datetime
+import logging
+import urllib
+
+from framework import framework_bizobj
+from framework import framework_helpers
+from framework import permissions
+from framework import template_helpers
+from framework import urls
+from framework import xsrf
+
+_ZERO = datetime.timedelta(0)
+
+class _UTCTimeZone(datetime.tzinfo):
+    """UTC"""
+    def utcoffset(self, _dt):
+        return _ZERO
+    def tzname(self, _dt):
+        return "UTC"
+    def dst(self, _dt):
+        return _ZERO
+
+_UTC = _UTCTimeZone()
+
+
+def GetBannerTime(timestamp):
+  """Converts a timestamp into EZT-ready data so it can appear in the banner.
+
+  Args:
+    timestamp: timestamp expressed in the following format:
+         [year,month,day,hour,minute,second]
+         e.g. [2009,3,20,21,45,50] represents March 20 2009 9:45:50 PM
+
+  Returns:
+    EZT-ready data used to display the time inside the banner message.
+  """
+  if timestamp is None:
+    return None
+
+  ts = datetime.datetime(*timestamp, tzinfo=_UTC)
+  return calendar.timegm(ts.timetuple())
+
+
+def AssertBasePermissionForUser(user, user_view):
+  """Verify user permissions and state.
+
+  Args:
+    user: user_pb2.User protocol buffer for the user
+    user_view: framework.views.UserView for the user
+  """
+  if permissions.IsBanned(user, user_view):
+    raise permissions.BannedUserException(
+        'You have been banned from using this site')
+
+
+def AssertBasePermission(mr):
+  """Make sure that the logged in user can view the requested page.
+
+  Args:
+    mr: common information parsed from the HTTP request.
+
+  Returns:
+    Nothing
+
+  Raises:
+    BannedUserException: If the user is banned.
+    PermissionException: If the user does not have permisssion to view.
+  """
+  AssertBasePermissionForUser(mr.auth.user_pb, mr.auth.user_view)
+
+  if mr.project_name and not CheckPerm(mr, permissions.VIEW):
+    logging.info('your perms are %r', mr.perms)
+    raise permissions.PermissionException(
+        'User is not allowed to view this project')
+
+
+def CheckPerm(mr, perm, art=None, granted_perms=None):
+  """Convenience method that makes permission checks easier.
+
+  Args:
+    mr: common information parsed from the HTTP request.
+    perm: A permission constant, defined in module framework.permissions
+    art: Optional artifact pb
+    granted_perms: optional set of perms granted specifically in that artifact.
+
+  Returns:
+    A boolean, whether the request can be satisfied, given the permission.
+  """
+  return mr.perms.CanUsePerm(
+      perm, mr.auth.effective_ids, mr.project,
+      permissions.GetRestrictions(art), granted_perms=granted_perms)
+
+
+def CheckPermForProject(mr, perm, project, art=None):
+  """Convenience method that makes permission checks for projects easier.
+
+  Args:
+    mr: common information parsed from the HTTP request.
+    perm: A permission constant, defined in module framework.permissions
+    project: The project to enforce permissions for.
+    art: Optional artifact pb
+
+  Returns:
+    A boolean, whether the request can be satisfied, given the permission.
+  """
+  perms = permissions.GetPermissions(
+      mr.auth.user_pb, mr.auth.effective_ids, project)
+  return perms.CanUsePerm(
+      perm, mr.auth.effective_ids, project, permissions.GetRestrictions(art))
+
+
+def ComputeIssueEntryURL(mr, config):
+  """Compute the URL to use for the "New issue" subtab.
+
+  Args:
+    mr: commonly used info parsed from the request.
+    config: ProjectIssueConfig for the current project.
+
+  Returns:
+    A URL string to use.  It will be simply "entry" in the non-customized
+    case. Otherewise it will be a fully qualified URL that includes some
+    query string parameters.
+  """
+  if not config.custom_issue_entry_url:
+    return '/p/%s/issues/entry' % (mr.project_name)
+
+  base_url = config.custom_issue_entry_url
+  sep = '&' if '?' in base_url else '?'
+  token = xsrf.GenerateToken(
+    mr.auth.user_id, '/p/%s%s%s' % (mr.project_name, urls.ISSUE_ENTRY, '.do'))
+  role_name = framework_helpers.GetRoleName(mr.auth.effective_ids, mr.project)
+
+  continue_url = urllib.quote(framework_helpers.FormatAbsoluteURL(
+      mr, urls.ISSUE_ENTRY + '.do'))
+
+  return '%s%stoken=%s&role=%s&continue=%s' % (
+      base_url, sep, urllib.quote(token),
+      urllib.quote(role_name or ''), continue_url)
+
+
+def IssueListURL(mr, config, query_string=None):
+  """Make an issue list URL for non-members or members."""
+  url = '/p/%s%s' % (mr.project_name, urls.ISSUE_LIST)
+  if query_string:
+    url += '?' + query_string
+  elif framework_bizobj.UserIsInProject(mr.project, mr.auth.effective_ids):
+    if config and config.member_default_query:
+      url += '?q=' + urllib.quote_plus(config.member_default_query)
+  return url
diff --git a/framework/sorting.py b/framework/sorting.py
new file mode 100644
index 0000000..558044c
--- /dev/null
+++ b/framework/sorting.py
@@ -0,0 +1,575 @@
+# 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
+
+"""Helper functions for sorting lists of project artifacts.
+
+This module exports the SortArtifacts function that does sorting of
+Monorail business objects (e.g., an issue).  The sorting is done by
+extracting relevant values from the PB using a dictionary of
+accessor functions.
+
+The desired sorting directives are specified in part of the user's
+HTTP request.  This sort spec consists of the names of the columns
+with optional minus signs to indicate descending sort order.
+
+The tool configuration object also affects sorting.  When sorting by
+key-value labels, the well-known labels are considered to come
+before any non-well-known labels, and those well-known labels sort in
+the order in which they are defined in the tool config PB.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from functools import total_ordering
+
+import settings
+from proto import tracker_pb2
+from services import caches
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+@total_ordering
+class DescendingValue(object):
+  """A wrapper which reverses the sort order of values."""
+
+  @classmethod
+  def MakeDescendingValue(cls, obj):
+    """Make a value that sorts in the reverse order as obj."""
+    if isinstance(obj, int):
+      return -obj
+    if obj == MAX_STRING:
+      return MIN_STRING
+    if obj == MIN_STRING:
+      return MAX_STRING
+    if isinstance(obj, list):
+      return [cls.MakeDescendingValue(item) for item in reversed(obj)]
+    return DescendingValue(obj)
+
+  def __init__(self, val):
+    self.val = val
+
+  def __eq__(self, other):
+    if isinstance(other, DescendingValue):
+      return self.val == other.val
+    return self.val == other
+
+  def __ne__(self, other):
+    if isinstance(other, DescendingValue):
+      return self.val != other.val
+    return self.val != other
+
+  def __lt__(self, other):
+    if isinstance(other, DescendingValue):
+      return other.val < self.val
+    return other < self.val
+
+  def __repr__(self):
+    return 'DescendingValue(%r)' % self.val
+
+
+# A string that sorts after every other string, and one that sorts before them.
+MAX_STRING = '~~~'
+MIN_STRING = DescendingValue(MAX_STRING)
+
+
+# RAMCache {issue_id: {column_name: sort_key, ...}, ...}
+art_values_cache = None
+
+
+def InitializeArtValues(services):
+  global art_values_cache
+  art_values_cache = caches.RamCache(
+      services.cache_manager, 'issue', max_size=settings.issue_cache_max_size)
+
+
+def InvalidateArtValuesKeys(cnxn, keys):
+  art_values_cache.InvalidateKeys(cnxn, keys)
+
+
+def SortArtifacts(
+    artifacts, config, accessors, postprocessors, group_by_spec, sort_spec,
+    users_by_id=None, tie_breakers=None):
+  """Return a list of artifacts sorted by the user's sort specification.
+
+  In the following, an "accessor" is a function(art) -> [field_value, ...].
+
+  Args:
+    artifacts: an unsorted list of project artifact PBs.
+    config: Project config PB instance that defines the sort order for
+        labels and statuses in this project.
+    accessors: dict {column_name: accessor} to get values from the artifacts.
+    postprocessors: dict {column_name: postprocessor} to get user emails
+        and timestamps.
+    group_by_spec: string that lists the grouping order
+    sort_spec: string that lists the sort order
+    users_by_id: optional dictionary {user_id: user_view,...} for all users
+        who participate in the list of artifacts.
+    tie_breakers: list of column names to add to the end of the sort
+        spec if they are not already somewhere in the sort spec.
+
+  Returns:
+    A sorted list of artifacts.
+
+  Note: if username_cols is supplied, then users_by_id should be too.
+
+  The approach to sorting is to construct a comprehensive sort key for
+  each artifact. To create the sort key, we (a) build lists with a
+  variable number of fields to sort on, and (b) allow individual
+  fields to be sorted in descending order.  Even with the time taken
+  to build the sort keys, calling sorted() with the key seems to be
+  faster overall than doing multiple stable-sorts or doing one sort
+  using a multi-field comparison function.
+  """
+  sort_directives = ComputeSortDirectives(
+      config, group_by_spec, sort_spec, tie_breakers=tie_breakers)
+
+  # Build a list of accessors that will extract sort keys from the issues.
+  accessor_pairs = [
+      (sd, _MakeCombinedSortKeyAccessor(
+          sd, config, accessors, postprocessors, users_by_id))
+      for sd in sort_directives]
+
+  def SortKey(art):
+    """Make a sort_key for the given artifact, used by sorted() below."""
+    if art_values_cache.HasItem(art.issue_id):
+      art_values = art_values_cache.GetItem(art.issue_id)
+    else:
+      art_values = {}
+
+    sort_key = []
+    for sd, accessor in accessor_pairs:
+      if sd not in art_values:
+        art_values[sd] = accessor(art)
+      sort_key.append(art_values[sd])
+
+    art_values_cache.CacheItem(art.issue_id, art_values)
+    return sort_key
+
+  return sorted(artifacts, key=SortKey)
+
+
+def ComputeSortDirectives(config, group_by_spec, sort_spec, tie_breakers=None):
+  """Return a list with sort directives to be used in sorting.
+
+  Args:
+    config: Project config PB instance that defines the sort order for
+        labels and statuses in this project.
+    group_by_spec: string that lists the grouping order
+    sort_spec: string that lists the sort order
+    tie_breakers: list of column names to add to the end of the sort
+        spec if they are not already somewhere in the sort spec.
+
+  Returns:
+    A list of lower-case column names, each one may have a leading
+    minus-sign.
+  """
+  # Prepend the end-user's sort spec to any project default sort spec.
+  if tie_breakers is None:
+    tie_breakers = ['id']
+  sort_spec = '%s %s %s' % (
+      group_by_spec, sort_spec, config.default_sort_spec)
+  # Sort specs can have interfering sort orders, so remove any duplicates.
+  field_names = set()
+  sort_directives = []
+  for sort_directive in sort_spec.lower().split():
+    field_name = sort_directive.lstrip('-')
+    if field_name not in field_names:
+      sort_directives.append(sort_directive)
+      field_names.add(field_name)
+
+  # Add in the project name so that the overall ordering is completely
+  # defined in cross-project search. Otherwise, issues jump up and
+  # down on each reload of the same query, and prev/next links get
+  # messed up.  It's a no-op in single projects.
+  if 'project' not in sort_directives:
+    sort_directives.append('project')
+
+  for tie_breaker in tie_breakers:
+    if tie_breaker not in sort_directives:
+      sort_directives.append(tie_breaker)
+
+  return sort_directives
+
+
+def _MakeCombinedSortKeyAccessor(
+    sort_directive, config, accessors, postprocessors, users_by_id):
+  """Return an accessor that extracts a sort key for a UI table column.
+
+  Args:
+    sort_directive: string with column name and optional leading minus sign,
+        for combined columns, it may have slashes, e.g., "-priority/pri".
+    config: ProjectIssueConfig instance that defines the sort order for
+        labels and statuses in this project.
+    accessors: dictionary of (column_name -> accessor) to get values
+        from the artifacts.
+    postprocessors: dict {column_name: postprocessor} to get user emails
+        and timestamps.
+    users_by_id: dictionary {user_id: user_view,...} for all users
+        who participate in the list of artifacts (e.g., owners, reporters, cc).
+
+  Returns:
+    A list of accessor functions that can be applied to an issue to extract
+    the relevant sort key value.
+
+  The strings for status and labels are converted to lower case in
+  this method so that they sort like case-insensitive enumerations.
+  Any component-specific field of the artifact is sorted according to the
+  value returned by the accessors defined in that component.  Those
+  accessor functions should lower case string values for fields where
+  case-insensitive sorting is desired.
+  """
+  if sort_directive.startswith('-'):
+    combined_col_name = sort_directive[1:]
+    descending = True
+  else:
+    combined_col_name = sort_directive
+    descending = False
+
+  wk_labels = [wkl.label for wkl in config.well_known_labels]
+  accessors = [
+      _MakeSingleSortKeyAccessor(
+          col_name, config, accessors, postprocessors, users_by_id, wk_labels)
+      for col_name in combined_col_name.split('/')]
+
+  # The most common case is that we sort on a single column, like "priority".
+  if len(accessors) == 1:
+    return _MaybeMakeDescending(accessors[0], descending)
+
+  # Less commonly, we are sorting on a combined column like "priority/pri".
+  def CombinedAccessor(art):
+    """Flatten and sort the values for each column in a combined column."""
+    key_part = []
+    for single_accessor in accessors:
+      value = single_accessor(art)
+      if isinstance(value, list):
+        key_part.extend(value)
+      else:
+        key_part.append(value)
+    return sorted(key_part)
+
+  return _MaybeMakeDescending(CombinedAccessor, descending)
+
+
+def _MaybeMakeDescending(accessor, descending):
+  """If descending is True, return a new function that reverses accessor."""
+  if not descending:
+    return accessor
+
+  def DescendingAccessor(art):
+    asc_value = accessor(art)
+    return DescendingValue.MakeDescendingValue(asc_value)
+
+  return DescendingAccessor
+
+
+def _MakeSingleSortKeyAccessor(
+    col_name, config, accessors, postprocessors, users_by_id, wk_labels):
+  """Return an accessor function for a single simple UI column."""
+  # Case 1. Handle built-in fields: status, component.
+  if col_name == 'status':
+    wk_statuses = [wks.status for wks in config.well_known_statuses]
+    return _IndexOrLexical(wk_statuses, accessors[col_name])
+
+  if col_name == 'component':
+    comp_defs = sorted(config.component_defs, key=lambda cd: cd.path.lower())
+    comp_ids = [cd.component_id for cd in comp_defs]
+    return _IndexListAccessor(comp_ids, accessors[col_name])
+
+  # Case 2. Any other defined accessor functions.
+  if col_name in accessors:
+    if postprocessors and col_name in postprocessors:
+      # sort users by email address or timestamp rather than user ids.
+      return _MakeAccessorWithPostProcessor(
+          users_by_id, accessors[col_name], postprocessors[col_name])
+    else:
+      return accessors[col_name]
+
+  # Case 3. Anything else is assumed to be a label prefix or custom field.
+  return _IndexOrLexicalList(
+      wk_labels, config.field_defs, col_name, users_by_id)
+
+
+IGNORABLE_INDICATOR = -1
+
+
+def _PrecomputeSortIndexes(values, col_name):
+  """Precompute indexes of strings in the values list for fast lookup later."""
+  # Make a dictionary that immediately gives us the index of any value
+  # in the list, and also add the same values in all-lower letters.  In
+  # the case where two values differ only by case, the later value wins,
+  # which is fine.
+  indexes = {}
+  if col_name:
+    prefix = col_name + '-'
+  else:
+    prefix = ''
+  for idx, val in enumerate(values):
+    if val.lower().startswith(prefix):
+      indexes[val] = idx
+      indexes[val.lower()] = idx
+    else:
+      indexes[val] = IGNORABLE_INDICATOR
+      indexes[val.lower()] = IGNORABLE_INDICATOR
+
+  return indexes
+
+
+def _MakeAccessorWithPostProcessor(users_by_id, base_accessor, postprocessor):
+  """Make an accessor that returns a list of user_view properties for sorting.
+
+  Args:
+    users_by_id: dictionary {user_id: user_view, ...} for all participants
+        in the entire list of artifacts.
+    base_accessor: an accessor function f(artifact) -> user_id.
+    postprocessor: function f(user_view) -> single sortable value.
+
+  Returns:
+    An accessor f(artifact) -> value that can be used in sorting
+    the decorated list.
+  """
+
+  def Accessor(art):
+    """Return a user edit name for the given artifact's base_accessor."""
+    id_or_id_list = base_accessor(art)
+    if isinstance(id_or_id_list, list):
+      values = [postprocessor(users_by_id[user_id])
+                for user_id in id_or_id_list]
+    else:
+      values = [postprocessor(users_by_id[id_or_id_list])]
+
+    return sorted(values) or MAX_STRING
+
+  return Accessor
+
+
+def _MakeColumnAccessor(col_name):
+  """Make an accessor for an issue's labels that have col_name as a prefix.
+
+  Args:
+    col_name: string column name.
+
+  Returns:
+    An accessor that can be applied to an artifact to return a list of
+    labels that have col_name as a prefix.
+
+  For example, _MakeColumnAccessor('priority')(issue) could result in
+  [], or ['priority-high'], or a longer list for multi-valued labels.
+  """
+  prefix = col_name + '-'
+
+  def Accessor(art):
+    """Return a list of label values on the given artifact."""
+    result = [label.lower() for label in tracker_bizobj.GetLabels(art)
+              if label.lower().startswith(prefix)]
+    return result
+
+  return Accessor
+
+
+def _IndexOrLexical(wk_values, base_accessor):
+  """Return an accessor to score an artifact based on a user-defined ordering.
+
+  Args:
+    wk_values: a list of well-known status values from the config.
+    base_accessor: function that gets a field from a given issue.
+
+  Returns:
+    An accessor that can be applied to an issue to return a suitable
+    sort key.
+
+  For example, when used to sort issue statuses, these accessors return an
+  integer for well-known statuses, a string for odd-ball statuses, and an
+  extreme value key for issues with no status.  That causes issues to appear
+  in the expected order with odd-ball issues sorted lexicographically after
+  the ones with well-known status values, and issues with no defined status at
+  the very end.
+  """
+  well_known_value_indexes = _PrecomputeSortIndexes(wk_values, '')
+
+  def Accessor(art):
+    """Custom-made function to return a specific value of any issue."""
+    value = base_accessor(art)
+    if not value:
+      # Undefined values sort last.
+      return MAX_STRING
+
+    try:
+      # Well-known values sort by index.  Ascending sorting has positive ints
+      # in well_known_value_indexes.
+      return well_known_value_indexes[value]
+    except KeyError:
+      # Odd-ball values after well-known and lexicographically.
+      return value.lower()
+
+  return Accessor
+
+
+def _IndexListAccessor(wk_values, base_accessor):
+  """Return an accessor to score an artifact based on a user-defined ordering.
+
+  Args:
+    wk_values: a list of well-known values from the config.
+    base_accessor: function that gets a field from a given issue.
+
+  Returns:
+    An accessor that can be applied to an issue to return a suitable
+    sort key.
+  """
+  well_known_value_indexes = {
+    val: idx for idx, val in enumerate(wk_values)}
+
+  def Accessor(art):
+    """Custom-made function to return a specific value of any issue."""
+    values = base_accessor(art)
+    if not values:
+      # Undefined values sort last.
+      return MAX_STRING
+
+    indexes = [well_known_value_indexes.get(val, MAX_STRING) for val in values]
+    return sorted(indexes)
+
+  return Accessor
+
+
+def _IndexOrLexicalList(wk_values, full_fd_list, col_name, users_by_id):
+  """Return an accessor to score an artifact based on a user-defined ordering.
+
+  Args:
+    wk_values: A list of well-known labels from the config.
+    full_fd_list: list of FieldDef PBs that belong to the config.
+    col_name: lowercase string name of the column that will be sorted on.
+    users_by_id: A dictionary {user_id: user_view}.
+
+  Returns:
+    An accessor that can be applied to an issue to return a suitable
+    sort key.
+  """
+  well_known_value_indexes = _PrecomputeSortIndexes(wk_values, col_name)
+
+  if col_name.endswith(tracker_constants.APPROVER_COL_SUFFIX):
+    # Custom field names cannot end with the APPROVER_COL_SUFFIX. So the only
+    # possible relevant values are approvers for an APPROVAL_TYPE named
+    # field_name and any values from labels with the key 'field_name-approvers'.
+    field_name = col_name[:-len(tracker_constants.APPROVER_COL_SUFFIX)]
+    approval_fds = [fd for fd in full_fd_list
+                    if (fd.field_name.lower() == field_name and
+                        fd.field_type == tracker_pb2.FieldTypes.APPROVAL_TYPE)]
+
+    def ApproverAccessor(art):
+      """Custom-made function to return a sort value or an issue's approvers."""
+      idx_or_lex_list = (
+          _SortableApprovalApproverValues(art, approval_fds, users_by_id) +
+          _SortableLabelValues(art, col_name, well_known_value_indexes))
+      if not idx_or_lex_list:
+        return MAX_STRING  # issues with no value sort to the end of the list.
+      return sorted(idx_or_lex_list)
+
+    return ApproverAccessor
+
+  # Column name does not end with APPROVER_COL_SUFFIX, so relevant values
+  # are Approval statuses or Field Values for fields named col_name and
+  # values from labels with the key equal to col_name.
+  field_name = col_name
+  phase_name = None
+  if '.' in col_name:
+    phase_name, field_name = col_name.split('.', 1)
+
+  fd_list = [fd for fd in full_fd_list
+             if (fd.field_name.lower() == field_name and
+                 fd.field_type != tracker_pb2.FieldTypes.ENUM_TYPE and
+                 bool(phase_name) == fd.is_phase_field)]
+  approval_fds = []
+  if not phase_name:
+    approval_fds = [fd for fd in fd_list if
+                    fd.field_type == tracker_pb2.FieldTypes.APPROVAL_TYPE]
+
+  def Accessor(art):
+    """Custom-made function to return a sort value for any issue."""
+    idx_or_lex_list = (
+        _SortableApprovalStatusValues(art, approval_fds) +
+        _SortableFieldValues(art, fd_list, users_by_id, phase_name) +
+        _SortableLabelValues(art, col_name, well_known_value_indexes))
+    if not idx_or_lex_list:
+      return MAX_STRING  # issues with no value sort to the end of the list.
+    return sorted(idx_or_lex_list)
+
+  return Accessor
+
+
+def _SortableApprovalStatusValues(art, fd_list):
+  """Return a list of approval statuses relevant to one UI table column."""
+  sortable_value_list = []
+  for fd in fd_list:
+    for av in art.approval_values:
+      if av.approval_id == fd.field_id:
+        # Order approval statuses by life cycle.
+        # NOT_SET == 8 but should be before all other statuses.
+        sortable_value_list.append(
+            0 if av.status.number == 8 else av.status.number)
+
+  return sortable_value_list
+
+
+def _SortableApprovalApproverValues(art, fd_list, users_by_id):
+  """Return a list of approval approvers relevant to one UI table column."""
+  sortable_value_list = []
+  for fd in fd_list:
+    for av in art.approval_values:
+      if av.approval_id == fd.field_id:
+        sortable_value_list.extend(
+          [users_by_id.get(approver_id).email
+           for approver_id in av.approver_ids
+           if users_by_id.get(approver_id)])
+
+  return sortable_value_list
+
+
+def _SortableFieldValues(art, fd_list, users_by_id, phase_name):
+  """Return a list of field values relevant to one UI table column."""
+  phase_id = None
+  if phase_name:
+    phase_id = next((
+        phase.phase_id for phase in art.phases
+        if phase.name.lower() == phase_name), None)
+  sortable_value_list = []
+  for fd in fd_list:
+    for fv in art.field_values:
+      if fv.field_id == fd.field_id and fv.phase_id == phase_id:
+        sortable_value_list.append(
+            tracker_bizobj.GetFieldValue(fv, users_by_id))
+
+  return sortable_value_list
+
+
+def _SortableLabelValues(art, col_name, well_known_value_indexes):
+  """Return a list of ints and strings for labels relevant to one UI column."""
+  col_name_dash = col_name + '-'
+  sortable_value_list = []
+  for label in tracker_bizobj.GetLabels(art):
+    idx_or_lex = well_known_value_indexes.get(label)
+    if idx_or_lex == IGNORABLE_INDICATOR:
+      continue  # Label is known to not have the desired prefix.
+    if idx_or_lex is None:
+      if '-' not in label:
+        # Skip an irrelevant OneWord label and remember to ignore it later.
+        well_known_value_indexes[label] = IGNORABLE_INDICATOR
+        continue
+      label_lower = label.lower()
+      if label_lower.startswith(col_name_dash):
+        # Label is a key-value label with an odd-ball value, remember it
+        value = label_lower[len(col_name_dash):]
+        idx_or_lex = value
+        well_known_value_indexes[label] = value
+      else:
+        # Label was a key-value label that is not relevant to this column.
+        # Remember to ignore it later.
+        well_known_value_indexes[label] = IGNORABLE_INDICATOR
+        continue
+
+    sortable_value_list.append(idx_or_lex)
+
+  return sortable_value_list
diff --git a/framework/sql.py b/framework/sql.py
new file mode 100644
index 0000000..d99b045
--- /dev/null
+++ b/framework/sql.py
@@ -0,0 +1,1048 @@
+# 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
+
+"""A set of classes for interacting with tables in SQL."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import random
+import re
+import sys
+import time
+
+from six import string_types
+
+import settings
+
+if not settings.unit_test_mode:
+  import MySQLdb
+
+from framework import exceptions
+from framework import framework_helpers
+
+from infra_libs import ts_mon
+
+from Queue import Queue
+
+
+class ConnectionPool(object):
+  """Manage a set of database connections such that they may be re-used.
+  """
+
+  def __init__(self, poolsize=1):
+    self.poolsize = poolsize
+    self.queues = {}
+
+  def get(self, instance, database):
+    """Retun a database connection, or throw an exception if none can
+    be made.
+    """
+    key = instance + '/' + database
+
+    if not key in self.queues:
+      queue = Queue(self.poolsize)
+      self.queues[key] = queue
+
+    queue = self.queues[key]
+
+    if queue.empty():
+      cnxn = cnxn_ctor(instance, database)
+    else:
+      cnxn = queue.get()
+      # Make sure the connection is still good.
+      cnxn.ping()
+      cnxn.commit()
+
+    return cnxn
+
+  def release(self, cnxn):
+    if not cnxn.pool_key in self.queues:
+      raise BaseException('unknown pool key: %s' % cnxn.pool_key)
+
+    q = self.queues[cnxn.pool_key]
+    if q.full():
+      cnxn.close()
+    else:
+      q.put(cnxn)
+
+
+@framework_helpers.retry(1, delay=1, backoff=2)
+def cnxn_ctor(instance, database):
+  logging.info('About to connect to SQL instance %r db %r', instance, database)
+  if settings.unit_test_mode:
+    raise ValueError('unit tests should not need real database connections')
+  try:
+    if settings.local_mode:
+      start_time = time.time()
+      cnxn = MySQLdb.connect(
+        host='127.0.0.1', port=3306, db=database, user='root', charset='utf8')
+    else:
+      start_time = time.time()
+      cnxn = MySQLdb.connect(
+        unix_socket='/cloudsql/' + instance, db=database, user='root',
+        charset='utf8')
+    duration = int((time.time() - start_time) * 1000)
+    DB_CNXN_LATENCY.add(duration)
+    CONNECTION_COUNT.increment({'success': True})
+  except MySQLdb.OperationalError:
+    CONNECTION_COUNT.increment({'success': False})
+    raise
+  cnxn.pool_key = instance + '/' + database
+  cnxn.is_bad = False
+  return cnxn
+
+
+# One connection pool per database instance (primary, replicas are each an
+# instance). We'll have four connections per instance because we fetch
+# issue comments, stars, spam verdicts and spam verdict history in parallel
+# with promises.
+cnxn_pool = ConnectionPool(settings.db_cnxn_pool_size)
+
+# MonorailConnection maintains a dictionary of connections to SQL databases.
+# Each is identified by an int shard ID.
+# And there is one connection to the primary DB identified by key PRIMARY_CNXN.
+PRIMARY_CNXN = 'primary_cnxn'
+
+# When one replica is temporarily unresponseive, we can use a different one.
+BAD_SHARD_AVOIDANCE_SEC = 45
+
+
+CONNECTION_COUNT = ts_mon.CounterMetric(
+    'monorail/sql/connection_count',
+    'Count of connections made to the SQL database.',
+    [ts_mon.BooleanField('success')])
+
+DB_CNXN_LATENCY = ts_mon.CumulativeDistributionMetric(
+    'monorail/sql/db_cnxn_latency',
+    'Time needed to establish a DB connection.',
+    None)
+
+DB_QUERY_LATENCY = ts_mon.CumulativeDistributionMetric(
+    'monorail/sql/db_query_latency',
+    'Time needed to make a DB query.',
+    [ts_mon.StringField('type')])
+
+DB_COMMIT_LATENCY = ts_mon.CumulativeDistributionMetric(
+    'monorail/sql/db_commit_latency',
+    'Time needed to make a DB commit.',
+    None)
+
+DB_ROLLBACK_LATENCY = ts_mon.CumulativeDistributionMetric(
+    'monorail/sql/db_rollback_latency',
+    'Time needed to make a DB rollback.',
+    None)
+
+DB_RETRY_COUNT = ts_mon.CounterMetric(
+    'monorail/sql/db_retry_count',
+    'Count of queries retried.',
+    None)
+
+DB_QUERY_COUNT = ts_mon.CounterMetric(
+    'monorail/sql/db_query_count',
+    'Count of queries sent to the DB.',
+    [ts_mon.StringField('type')])
+
+DB_COMMIT_COUNT = ts_mon.CounterMetric(
+    'monorail/sql/db_commit_count',
+    'Count of commits sent to the DB.',
+    None)
+
+DB_ROLLBACK_COUNT = ts_mon.CounterMetric(
+    'monorail/sql/db_rollback_count',
+    'Count of rollbacks sent to the DB.',
+    None)
+
+DB_RESULT_ROWS = ts_mon.CumulativeDistributionMetric(
+    'monorail/sql/db_result_rows',
+    'Number of results returned by a DB query.',
+    None)
+
+
+def RandomShardID():
+  """Return a random shard ID to load balance across replicas."""
+  return random.randint(0, settings.num_logical_shards - 1)
+
+
+class MonorailConnection(object):
+  """Create and manage connections to the SQL servers.
+
+  We only store connections in the context of a single user request, not
+  across user requests.  The main purpose of this class is to make using
+  sharded tables easier.
+  """
+  unavailable_shards = {}  # {shard_id: timestamp of failed attempt}
+
+  def __init__(self):
+    self.sql_cnxns = {}  # {PRIMARY_CNXN: cnxn, shard_id: cnxn, ...}
+
+  @framework_helpers.retry(1, delay=0.1, backoff=2)
+  def GetPrimaryConnection(self):
+    """Return a connection to the primary SQL DB."""
+    if PRIMARY_CNXN not in self.sql_cnxns:
+      self.sql_cnxns[PRIMARY_CNXN] = cnxn_pool.get(
+          settings.db_instance, settings.db_database_name)
+      logging.info(
+          'created a primary connection %r', self.sql_cnxns[PRIMARY_CNXN])
+
+    return self.sql_cnxns[PRIMARY_CNXN]
+
+  @framework_helpers.retry(1, delay=0.1, backoff=2)
+  def GetConnectionForShard(self, shard_id):
+    """Return a connection to the DB replica that will be used for shard_id."""
+    if shard_id not in self.sql_cnxns:
+      physical_shard_id = shard_id % settings.num_logical_shards
+
+      replica_name = settings.db_replica_names[
+          physical_shard_id % len(settings.db_replica_names)]
+      shard_instance_name = (
+          settings.physical_db_name_format % replica_name)
+      self.unavailable_shards[shard_id] = int(time.time())
+      self.sql_cnxns[shard_id] = cnxn_pool.get(
+          shard_instance_name, settings.db_database_name)
+      del self.unavailable_shards[shard_id]
+      logging.info('created a replica connection for shard %d', shard_id)
+
+    return self.sql_cnxns[shard_id]
+
+  def Execute(self, stmt_str, stmt_args, shard_id=None, commit=True, retries=2):
+    """Execute the given SQL statement on one of the relevant databases."""
+    if shard_id is None:
+      # No shard was specified, so hit the primary.
+      sql_cnxn = self.GetPrimaryConnection()
+    else:
+      if shard_id in self.unavailable_shards:
+        bad_age_sec = int(time.time()) - self.unavailable_shards[shard_id]
+        if bad_age_sec < BAD_SHARD_AVOIDANCE_SEC:
+          logging.info('Avoiding bad replica %r, age %r', shard_id, bad_age_sec)
+          shard_id = (shard_id + 1) % settings.num_logical_shards
+      sql_cnxn = self.GetConnectionForShard(shard_id)
+
+    try:
+      return self._ExecuteWithSQLConnection(
+          sql_cnxn, stmt_str, stmt_args, commit=commit)
+    except MySQLdb.OperationalError as e:
+      logging.exception(e)
+      logging.info('retries: %r', retries)
+      if retries > 0:
+        DB_RETRY_COUNT.increment()
+        self.sql_cnxns = {}  # Drop all old mysql connections and make new.
+        return self.Execute(
+            stmt_str, stmt_args, shard_id=shard_id, commit=commit,
+            retries=retries - 1)
+      else:
+        raise e
+
+  def _ExecuteWithSQLConnection(
+      self, sql_cnxn, stmt_str, stmt_args, commit=True):
+    """Execute a statement on the given database and return a cursor."""
+
+    start_time = time.time()
+    cursor = sql_cnxn.cursor()
+    cursor.execute('SET NAMES utf8mb4')
+    if stmt_str.startswith('INSERT') or stmt_str.startswith('REPLACE'):
+      cursor.executemany(stmt_str, stmt_args)
+      duration = (time.time() - start_time) * 1000
+      DB_QUERY_LATENCY.add(duration, {'type': 'write'})
+      DB_QUERY_COUNT.increment({'type': 'write'})
+    else:
+      cursor.execute(stmt_str, args=stmt_args)
+      duration = (time.time() - start_time) * 1000
+      DB_QUERY_LATENCY.add(duration, {'type': 'read'})
+      DB_QUERY_COUNT.increment({'type': 'read'})
+    DB_RESULT_ROWS.add(cursor.rowcount)
+
+    if stmt_str.startswith('INSERT') or stmt_str.startswith('REPLACE'):
+      formatted_statement = '%s %s' % (stmt_str, stmt_args)
+    else:
+      formatted_statement = stmt_str % tuple(stmt_args)
+    logging.info(
+        '%d rows in %d ms: %s', cursor.rowcount, int(duration),
+        formatted_statement.replace('\n', ' '))
+
+    if commit and not stmt_str.startswith('SELECT'):
+      try:
+        sql_cnxn.commit()
+        duration = (time.time() - start_time) * 1000
+        DB_COMMIT_LATENCY.add(duration)
+        DB_COMMIT_COUNT.increment()
+      except MySQLdb.DatabaseError:
+        sql_cnxn.rollback()
+        duration = (time.time() - start_time) * 1000
+        DB_ROLLBACK_LATENCY.add(duration)
+        DB_ROLLBACK_COUNT.increment()
+
+    return cursor
+
+  def Commit(self):
+    """Explicitly commit any pending txns.  Normally done automatically."""
+    sql_cnxn = self.GetPrimaryConnection()
+    try:
+      sql_cnxn.commit()
+    except MySQLdb.DatabaseError:
+      logging.exception('Commit failed for cnxn, rolling back')
+      sql_cnxn.rollback()
+
+  def Close(self):
+    """Safely close any connections that are still open."""
+    for sql_cnxn in self.sql_cnxns.values():
+      try:
+        sql_cnxn.rollback()  # Abandon any uncommitted changes.
+        cnxn_pool.release(sql_cnxn)
+      except MySQLdb.DatabaseError:
+        # This might happen if the cnxn is somehow already closed.
+        logging.exception('ProgrammingError when trying to close cnxn')
+
+
+class SQLTableManager(object):
+  """Helper class to make it easier to deal with an SQL table."""
+
+  def __init__(self, table_name):
+    self.table_name = table_name
+
+  def Select(
+      self, cnxn, distinct=False, cols=None, left_joins=None,
+      joins=None, where=None, or_where_conds=False, group_by=None,
+      order_by=None, limit=None, offset=None, shard_id=None, use_clause=None,
+      having=None, **kwargs):
+    """Compose and execute an SQL SELECT statement on this table.
+
+    Args:
+      cnxn: MonorailConnection to the databases.
+      distinct: If True, add DISTINCT keyword.
+      cols: List of columns to retrieve, defaults to '*'.
+      left_joins: List of LEFT JOIN (str, args) pairs.
+      joins: List of regular JOIN (str, args) pairs.
+      where: List of (str, args) for WHERE clause.
+      or_where_conds: Set to True to use OR in the WHERE conds.
+      group_by: List of strings for GROUP BY clause.
+      order_by: List of (str, args) for ORDER BY clause.
+      limit: Optional LIMIT on the number of rows returned.
+      offset: Optional OFFSET when using LIMIT.
+      shard_id: Int ID of the shard to query.
+      use_clause: Optional string USE clause to tell the DB which index to use.
+      having: List of (str, args) for Optional HAVING clause
+      **kwargs: WHERE-clause equality and set-membership conditions.
+
+    Keyword args are used to build up more WHERE conditions that compare
+    column values to constants.  Key word Argument foo='bar' translates to 'foo
+    = "bar"', and foo=[3, 4, 5] translates to 'foo IN (3, 4, 5)'.
+
+    Returns:
+      A list of rows, each row is a tuple of values for the requested cols.
+    """
+    cols = cols or ['*']  # If columns not specified, retrieve all columns.
+    stmt = Statement.MakeSelect(
+        self.table_name, cols, distinct=distinct,
+        or_where_conds=or_where_conds)
+    if use_clause:
+      stmt.AddUseClause(use_clause)
+    if having:
+      stmt.AddHavingTerms(having)
+    stmt.AddJoinClauses(left_joins or [], left=True)
+    stmt.AddJoinClauses(joins or [])
+    stmt.AddWhereTerms(where or [], **kwargs)
+    stmt.AddGroupByTerms(group_by or [])
+    stmt.AddOrderByTerms(order_by or [])
+    stmt.SetLimitAndOffset(limit, offset)
+    stmt_str, stmt_args = stmt.Generate()
+
+    cursor = cnxn.Execute(stmt_str, stmt_args, shard_id=shard_id)
+    rows = cursor.fetchall()
+    cursor.close()
+    return rows
+
+  def SelectRow(
+      self, cnxn, cols=None, default=None, where=None, **kwargs):
+    """Run a query that is expected to return just one row."""
+    rows = self.Select(cnxn, distinct=True, cols=cols, where=where, **kwargs)
+    if len(rows) == 1:
+      return rows[0]
+    elif not rows:
+      logging.info('SelectRow got 0 results, so using default %r', default)
+      return default
+    else:
+      raise ValueError('SelectRow got %d results, expected only 1', len(rows))
+
+  def SelectValue(self, cnxn, col, default=None, where=None, **kwargs):
+    """Run a query that is expected to return just one row w/ one value."""
+    row = self.SelectRow(
+        cnxn, cols=[col], default=[default], where=where, **kwargs)
+    return row[0]
+
+  def InsertRows(
+      self, cnxn, cols, row_values, replace=False, ignore=False,
+      commit=True, return_generated_ids=False):
+    """Insert all the given rows.
+
+    Args:
+      cnxn: MonorailConnection object.
+      cols: List of column names to set.
+      row_values: List of lists with values to store.  The length of each
+          nested list should be equal to len(cols).
+      replace: Set to True if inserted values should replace existing DB rows
+          that have the same DB keys.
+      ignore: Set to True to ignore rows that would duplicate existing DB keys.
+      commit: Set to False if this operation is part of a series of operations
+          that should not be committed until the final one is done.
+      return_generated_ids: Set to True to return a list of generated
+          autoincrement IDs for inserted rows.  This requires us to insert rows
+          one at a time.
+
+    Returns:
+      If return_generated_ids is set to True, this method returns a list of the
+      auto-increment IDs generated by the DB.  Otherwise, [] is returned.
+    """
+    if not row_values:
+      return None  # Nothing to insert
+
+    generated_ids = []
+    if return_generated_ids:
+      # We must insert the rows one-at-a-time to know the generated IDs.
+      for row_value in row_values:
+        stmt = Statement.MakeInsert(
+            self.table_name, cols, [row_value], replace=replace, ignore=ignore)
+        stmt_str, stmt_args = stmt.Generate()
+        cursor = cnxn.Execute(stmt_str, stmt_args, commit=commit)
+        if cursor.lastrowid:
+          generated_ids.append(cursor.lastrowid)
+        cursor.close()
+      return generated_ids
+
+    stmt = Statement.MakeInsert(
+      self.table_name, cols, row_values, replace=replace, ignore=ignore)
+    stmt_str, stmt_args = stmt.Generate()
+    cnxn.Execute(stmt_str, stmt_args, commit=commit)
+    return []
+
+
+  def InsertRow(
+      self, cnxn, replace=False, ignore=False, commit=True, **kwargs):
+    """Insert a single row into the table.
+
+    Args:
+      cnxn: MonorailConnection object.
+      replace: Set to True if inserted values should replace existing DB rows
+          that have the same DB keys.
+      ignore: Set to True to ignore rows that would duplicate existing DB keys.
+      commit: Set to False if this operation is part of a series of operations
+          that should not be committed until the final one is done.
+      **kwargs: column=value assignments to specify what to store in the DB.
+
+    Returns:
+      The generated autoincrement ID of the key column if one was generated.
+      Otherwise, return None.
+    """
+    cols = sorted(kwargs.keys())
+    row = tuple(kwargs[col] for col in cols)
+    generated_ids = self.InsertRows(
+        cnxn, cols, [row], replace=replace, ignore=ignore,
+        commit=commit, return_generated_ids=True)
+    if generated_ids:
+      return generated_ids[0]
+    else:
+      return None
+
+  def Update(self, cnxn, delta, where=None, commit=True, limit=None, **kwargs):
+    """Update one or more rows.
+
+    Args:
+      cnxn: MonorailConnection object.
+      delta: Dictionary of {column: new_value} assignments.
+      where: Optional list of WHERE conditions saying which rows to update.
+      commit: Set to False if this operation is part of a series of operations
+          that should not be committed until the final one is done.
+      limit: Optional LIMIT on the number of rows updated.
+      **kwargs: WHERE-clause equality and set-membership conditions.
+
+    Returns:
+      Int number of rows updated.
+    """
+    if not delta:
+      return 0   # Nothing is being changed
+
+    stmt = Statement.MakeUpdate(self.table_name, delta)
+    stmt.AddWhereTerms(where, **kwargs)
+    stmt.SetLimitAndOffset(limit, None)
+    stmt_str, stmt_args = stmt.Generate()
+
+    cursor = cnxn.Execute(stmt_str, stmt_args, commit=commit)
+    result = cursor.rowcount
+    cursor.close()
+    return result
+
+  def IncrementCounterValue(self, cnxn, col_name, where=None, **kwargs):
+    """Atomically increment a counter stored in MySQL, return new value.
+
+    Args:
+      cnxn: MonorailConnection object.
+      col_name: int column to increment.
+      where: Optional list of WHERE conditions saying which rows to update.
+      **kwargs: WHERE-clause equality and set-membership conditions.  The
+          where and kwargs together should narrow the update down to exactly
+          one row.
+
+    Returns:
+      The new, post-increment value of the counter.
+    """
+    stmt = Statement.MakeIncrement(self.table_name, col_name)
+    stmt.AddWhereTerms(where, **kwargs)
+    stmt_str, stmt_args = stmt.Generate()
+
+    cursor = cnxn.Execute(stmt_str, stmt_args)
+    assert cursor.rowcount == 1, (
+        'missing or ambiguous counter: %r' % cursor.rowcount)
+    result = cursor.lastrowid
+    cursor.close()
+    return result
+
+  def Delete(self, cnxn, where=None, or_where_conds=False, commit=True,
+             limit=None, **kwargs):
+    """Delete the specified table rows.
+
+    Args:
+      cnxn: MonorailConnection object.
+      where: Optional list of WHERE conditions saying which rows to update.
+      or_where_conds: Set to True to use OR in the WHERE conds.
+      commit: Set to False if this operation is part of a series of operations
+          that should not be committed until the final one is done.
+      limit: Optional LIMIT on the number of rows deleted.
+      **kwargs: WHERE-clause equality and set-membership conditions.
+
+    Returns:
+      Int number of rows updated.
+    """
+    # Deleting the whole table is never intended in Monorail.
+    assert where or kwargs
+
+    stmt = Statement.MakeDelete(self.table_name, or_where_conds=or_where_conds)
+    stmt.AddWhereTerms(where, **kwargs)
+    stmt.SetLimitAndOffset(limit, None)
+    stmt_str, stmt_args = stmt.Generate()
+
+    cursor = cnxn.Execute(stmt_str, stmt_args, commit=commit)
+    result = cursor.rowcount
+    cursor.close()
+    return result
+
+
+class Statement(object):
+  """A class to help build complex SQL statements w/ full escaping.
+
+  Start with a Make*() method, then fill in additional clauses as needed,
+  then call Generate() to return the SQL string and argument list.  We pass
+  the string and args to MySQLdb separately so that it can do escaping on
+  the arg values as appropriate to prevent SQL-injection attacks.
+
+  The only values that are not escaped by MySQLdb are the table names
+  and column names, and bits of SQL syntax, all of which is hard-coded
+  in our application.
+  """
+
+  @classmethod
+  def MakeSelect(cls, table_name, cols, distinct=False, or_where_conds=False):
+    """Construct a SELECT statement."""
+    assert _IsValidTableName(table_name)
+    assert all(_IsValidColumnName(col) for col in cols)
+    main_clause = 'SELECT%s %s FROM %s' % (
+        (' DISTINCT' if distinct else ''), ', '.join(cols), table_name)
+    return cls(main_clause, or_where_conds=or_where_conds)
+
+  @classmethod
+  def MakeInsert(
+      cls, table_name, cols, new_values, replace=False, ignore=False):
+    """Construct an INSERT statement."""
+    if replace == True:
+      return cls.MakeReplace(table_name, cols, new_values, ignore)
+    assert _IsValidTableName(table_name)
+    assert all(_IsValidColumnName(col) for col in cols)
+    ignore_word = ' IGNORE' if ignore else ''
+    main_clause = 'INSERT%s INTO %s (%s)' % (
+        ignore_word, table_name, ', '.join(cols))
+    return cls(main_clause, insert_args=new_values)
+
+  @classmethod
+  def MakeReplace(
+      cls, table_name, cols, new_values, ignore=False):
+    """Construct an INSERT...ON DUPLICATE KEY UPDATE... statement.
+
+    Uses the INSERT/UPDATE syntax because REPLACE is literally a DELETE
+    followed by an INSERT, which doesn't play well with foreign keys.
+    INSERT/UPDATE is an atomic check of whether the primary key exists,
+    followed by an INSERT if it doesn't or an UPDATE if it does.
+    """
+    assert _IsValidTableName(table_name)
+    assert all(_IsValidColumnName(col) for col in cols)
+    ignore_word = ' IGNORE' if ignore else ''
+    main_clause = 'INSERT%s INTO %s (%s)' % (
+        ignore_word, table_name, ', '.join(cols))
+    return cls(main_clause, insert_args=new_values, duplicate_update_cols=cols)
+
+  @classmethod
+  def MakeUpdate(cls, table_name, delta):
+    """Construct an UPDATE statement."""
+    assert _IsValidTableName(table_name)
+    assert all(_IsValidColumnName(col) for col in delta.keys())
+    update_strs = []
+    update_args = []
+    for col, val in delta.items():
+      update_strs.append(col + '=%s')
+      update_args.append(val)
+
+    main_clause = 'UPDATE %s SET %s' % (
+        table_name, ', '.join(update_strs))
+    return cls(main_clause, update_args=update_args)
+
+  @classmethod
+  def MakeIncrement(cls, table_name, col_name, step=1):
+    """Construct an UPDATE statement that increments and returns a counter."""
+    assert _IsValidTableName(table_name)
+    assert _IsValidColumnName(col_name)
+
+    main_clause = (
+        'UPDATE %s SET %s = LAST_INSERT_ID(%s + %%s)' % (
+            table_name, col_name, col_name))
+    update_args = [step]
+    return cls(main_clause, update_args=update_args)
+
+  @classmethod
+  def MakeDelete(cls, table_name, or_where_conds=False):
+    """Construct a DELETE statement."""
+    assert _IsValidTableName(table_name)
+    main_clause = 'DELETE FROM %s' % table_name
+    return cls(main_clause, or_where_conds=or_where_conds)
+
+  def __init__(
+      self, main_clause, insert_args=None, update_args=None,
+      duplicate_update_cols=None, or_where_conds=False):
+    self.main_clause = main_clause  # E.g., SELECT or DELETE
+    self.or_where_conds = or_where_conds
+    self.insert_args = insert_args or []  # For INSERT statements
+    for row_value in self.insert_args:
+      if not all(_IsValidDBValue(val) for val in row_value):
+        raise exceptions.InputException('Invalid DB value %r' % (row_value,))
+    self.update_args = update_args or []  # For UPDATEs
+    for val in self.update_args:
+      if not _IsValidDBValue(val):
+        raise exceptions.InputException('Invalid DB value %r' % val)
+    self.duplicate_update_cols = duplicate_update_cols or []  # For REPLACE-ish
+
+    self.use_clauses = []
+    self.join_clauses, self.join_args = [], []
+    self.where_conds, self.where_args = [], []
+    self.having_conds, self.having_args = [], []
+    self.group_by_terms, self.group_by_args = [], []
+    self.order_by_terms, self.order_by_args = [], []
+    self.limit, self.offset = None, None
+
+  def Generate(self):
+    """Return an SQL string having %s placeholders and args to fill them in."""
+    clauses = [self.main_clause] + self.use_clauses + self.join_clauses
+    if self.where_conds:
+      if self.or_where_conds:
+        clauses.append('WHERE ' + '\n  OR '.join(self.where_conds))
+      else:
+        clauses.append('WHERE ' + '\n  AND '.join(self.where_conds))
+    if self.group_by_terms:
+      clauses.append('GROUP BY ' + ', '.join(self.group_by_terms))
+    if self.having_conds:
+      assert self.group_by_terms
+      clauses.append('HAVING %s' % ','.join(self.having_conds))
+    if self.order_by_terms:
+      clauses.append('ORDER BY ' + ', '.join(self.order_by_terms))
+
+    if self.limit and self.offset:
+      clauses.append('LIMIT %d OFFSET %d' % (self.limit, self.offset))
+    elif self.limit:
+      clauses.append('LIMIT %d' % self.limit)
+    elif self.offset:
+      clauses.append('LIMIT %d OFFSET %d' % (sys.maxint, self.offset))
+
+    if self.insert_args:
+      clauses.append('VALUES (' + PlaceHolders(self.insert_args[0]) + ')')
+      args = self.insert_args
+      if self.duplicate_update_cols:
+        clauses.append('ON DUPLICATE KEY UPDATE %s' % (
+            ', '.join(['%s=VALUES(%s)' % (col, col)
+                       for col in self.duplicate_update_cols])))
+      assert not (self.join_args + self.update_args + self.where_args +
+                  self.group_by_args + self.order_by_args + self.having_args)
+    else:
+      args = (self.join_args + self.update_args + self.where_args +
+              self.group_by_args + self.having_args + self.order_by_args)
+      assert not (self.insert_args + self.duplicate_update_cols)
+
+    args = _BoolsToInts(args)
+    stmt_str = '\n'.join(clause for clause in clauses if clause)
+
+    assert _IsValidStatement(stmt_str), stmt_str
+    return stmt_str, args
+
+  def AddUseClause(self, use_clause):
+    """Add a USE clause (giving the DB a hint about which indexes to use)."""
+    assert _IsValidUseClause(use_clause), use_clause
+    self.use_clauses.append(use_clause)
+
+  def AddJoinClauses(self, join_pairs, left=False):
+    """Save JOIN clauses based on the given list of join conditions."""
+    for join, args in join_pairs:
+      assert _IsValidJoin(join), join
+      assert join.count('%s') == len(args), join
+      self.join_clauses.append(
+          '  %sJOIN %s' % (('LEFT ' if left else ''), join))
+      self.join_args.extend(args)
+
+  def AddGroupByTerms(self, group_by_term_list):
+    """Save info needed to generate the GROUP BY clause."""
+    assert all(_IsValidGroupByTerm(term) for term in group_by_term_list)
+    self.group_by_terms.extend(group_by_term_list)
+
+  def AddOrderByTerms(self, order_by_pairs):
+    """Save info needed to generate the ORDER BY clause."""
+    for term, args in order_by_pairs:
+      assert _IsValidOrderByTerm(term), term
+      assert term.count('%s') == len(args), term
+      self.order_by_terms.append(term)
+      self.order_by_args.extend(args)
+
+  def SetLimitAndOffset(self, limit, offset):
+    """Save info needed to generate the LIMIT OFFSET clause."""
+    self.limit = limit
+    self.offset = offset
+
+  def AddWhereTerms(self, where_cond_pairs, **kwargs):
+    """Generate a WHERE clause."""
+    where_cond_pairs = where_cond_pairs or []
+
+    for cond, args in where_cond_pairs:
+      assert _IsValidWhereCond(cond), cond
+      assert cond.count('%s') == len(args), cond
+      self.where_conds.append(cond)
+      self.where_args.extend(args)
+
+    for col, val in sorted(kwargs.items()):
+      assert _IsValidColumnName(col), col
+      eq = True
+      if col.endswith('_not'):
+        col = col[:-4]
+        eq = False
+
+      if isinstance(val, set):
+        val = list(val)  # MySQL inteface cannot handle sets.
+
+      if val is None or val == []:
+        if val == [] and self.main_clause and self.main_clause.startswith(
+            'UPDATE'):
+          # https://crbug.com/monorail/6735: Avoid empty arrays for UPDATE.
+          raise exceptions.InputException('Invalid update DB value %r' % col)
+        op = 'IS' if eq else 'IS NOT'
+        self.where_conds.append(col + ' ' + op + ' NULL')
+      elif isinstance(val, list):
+        op = 'IN' if eq else 'NOT IN'
+        # Sadly, MySQLdb cannot escape lists, so we flatten to multiple "%s"s
+        self.where_conds.append(
+            col + ' ' + op + ' (' + PlaceHolders(val) + ')')
+        self.where_args.extend(val)
+      else:
+        op = '=' if eq else '!='
+        self.where_conds.append(col + ' ' + op + ' %s')
+        self.where_args.append(val)
+
+  def AddHavingTerms(self, having_cond_pairs):
+    """Generate a HAVING clause."""
+    for cond, args in having_cond_pairs:
+      assert _IsValidHavingCond(cond), cond
+      assert cond.count('%s') == len(args), cond
+      self.having_conds.append(cond)
+      self.having_args.extend(args)
+
+
+def PlaceHolders(sql_args):
+  """Return a comma-separated list of %s placeholders for the given args."""
+  return ','.join('%s' for _ in sql_args)
+
+
+TABLE_PAT = '[A-Z][_a-zA-Z0-9]+'
+COLUMN_PAT = '[a-z][_a-z]+'
+COMPARE_OP_PAT = '(<|>|=|!=|>=|<=|LIKE|NOT LIKE)'
+SHORTHAND = {
+    'table': TABLE_PAT,
+    'column': COLUMN_PAT,
+    'tab_col': r'(%s\.)?%s' % (TABLE_PAT, COLUMN_PAT),
+    'placeholder': '%s',  # That's a literal %s that gets passed to MySQLdb
+    'multi_placeholder': '%s(, ?%s)*',
+    'compare_op': COMPARE_OP_PAT,
+    'opt_asc_desc': '( ASC| DESC)?',
+    'opt_alias': '( AS %s)?' % TABLE_PAT,
+    'email_cond': (r'\(?'
+                   r'('
+                   r'(LOWER\(Spare\d+\.email\) IS NULL OR )?'
+                   r'LOWER\(Spare\d+\.email\) '
+                   r'(%s %%s|IN \(%%s(, ?%%s)*\))'
+                   r'( (AND|OR) )?'
+                   r')+'
+                   r'\)?' % COMPARE_OP_PAT),
+    'hotlist_cond': (r'\(?'
+                     r'('
+                     r'(LOWER\(Cond\d+\.name\) IS NULL OR )?'
+                     r'LOWER\(Cond\d+\.name\) '
+                     r'(%s %%s|IN \(%%s(, ?%%s)*\))'
+                     r'( (AND|OR) )?'
+                     r')+'
+                     r'\)?' % COMPARE_OP_PAT),
+    'phase_cond': (r'\(?'
+                   r'('
+                   r'(LOWER\(Phase\d+\.name\) IS NULL OR )?'
+                   r'LOWER\(Phase\d+\.name\) '
+                   r'(%s %%s|IN \(%%s(, ?%%s)*\))?'
+                   r'( (AND|OR) )?'
+                   r')+'
+                   r'\)?' % COMPARE_OP_PAT),
+    'approval_cond': (r'\(?'
+                      r'('
+                      r'(LOWER\(Cond\d+\.status\) IS NULL OR )?'
+                      r'LOWER\(Cond\d+\.status\) '
+                      r'(%s %%s|IN \(%%s(, ?%%s)*\))'
+                      r'( (AND|OR) )?'
+                      r')+'
+                      r'\)?' % COMPARE_OP_PAT),
+    }
+
+
+def _MakeRE(regex_str):
+  """Return a regular expression object, expanding our shorthand as needed."""
+  return re.compile(regex_str.format(**SHORTHAND))
+
+
+TABLE_RE = _MakeRE('^{table}$')
+TAB_COL_RE = _MakeRE('^{tab_col}$')
+USE_CLAUSE_RE = _MakeRE(
+    r'^USE INDEX \({column}\) USE INDEX FOR ORDER BY \({column}\)$')
+HAVING_RE_LIST = [
+    _MakeRE(r'^COUNT\(\*\) {compare_op} {placeholder}$')]
+COLUMN_RE_LIST = [
+    TAB_COL_RE,
+    _MakeRE(r'\*'),
+    _MakeRE(r'COUNT\(\*\)'),
+    _MakeRE(r'COUNT\({tab_col}\)'),
+    _MakeRE(r'COUNT\(DISTINCT\({tab_col}\)\)'),
+    _MakeRE(r'MAX\({tab_col}\)'),
+    _MakeRE(r'MIN\({tab_col}\)'),
+    _MakeRE(r'GROUP_CONCAT\((DISTINCT )?{tab_col}( ORDER BY {tab_col})?' \
+                        r'( SEPARATOR \'.*\')?\)'),
+    ]
+JOIN_RE_LIST = [
+    TABLE_RE,
+    _MakeRE(
+        r'^{table}{opt_alias} ON {tab_col} = {tab_col}'
+        r'( AND {tab_col} = {tab_col})?'
+        r'( AND {tab_col} IN \({multi_placeholder}\))?$'),
+    _MakeRE(
+        r'^{table}{opt_alias} ON {tab_col} = {tab_col}'
+        r'( AND {tab_col} = {tab_col})?'
+        r'( AND {tab_col} = {placeholder})?'
+        r'( AND {tab_col} IN \({multi_placeholder}\))?'
+        r'( AND {tab_col} = {tab_col})?$'),
+    _MakeRE(
+        r'^{table}{opt_alias} ON {tab_col} = {tab_col}'
+        r'( AND {tab_col} = {tab_col})?'
+        r'( AND {tab_col} = {placeholder})?'
+        r'( AND {tab_col} IN \({multi_placeholder}\))?'
+        r'( AND {tab_col} IS NULL)?'
+        r'( AND \({tab_col} IS NULL'
+        r' OR {tab_col} NOT IN \({multi_placeholder}\)\))?$'),
+    _MakeRE(
+        r'^{table}{opt_alias} ON {tab_col} = {tab_col}'
+        r'( AND {tab_col} = {tab_col})?'
+        r'( AND {tab_col} = {placeholder})?'
+        r' AND \(?{tab_col} {compare_op} {placeholder}\)?'
+        r'( AND {tab_col} = {tab_col})?$'),
+    _MakeRE(
+        r'^{table}{opt_alias} ON {tab_col} = {tab_col}'
+        r'( AND {tab_col} = {tab_col})?'
+        r'( AND {tab_col} = {placeholder})?'
+        r' AND {tab_col} = {tab_col}$'),
+    _MakeRE(
+        r'^{table}{opt_alias} ON {tab_col} = {tab_col}'
+        r'( AND {tab_col} = {tab_col})?'
+        r'( AND {tab_col} = {placeholder})?'
+        r' AND \({tab_col} IS NULL OR'
+        r' {tab_col} {compare_op} {placeholder}\)$'),
+    _MakeRE(
+        r'^{table}{opt_alias} ON {tab_col} = {tab_col}'
+        r' AND \({tab_col} IS NOT NULL AND {tab_col} != {placeholder}\)'),
+    _MakeRE(
+        r'^{table}{opt_alias} ON {tab_col} = {tab_col}'
+        r' AND LOWER\({tab_col}\) = LOWER\({placeholder}\)'),
+    _MakeRE(
+        r'^{table}{opt_alias} ON {tab_col} = {tab_col} AND {email_cond}$'),
+    _MakeRE(
+        r'^{table}{opt_alias} ON {email_cond}$'),
+    _MakeRE(
+        r'^{table}{opt_alias} ON '
+        r'\({tab_col} = {tab_col} OR {tab_col} = {tab_col}\)$'),
+    _MakeRE(
+        r'^\({table} AS {table} JOIN User AS {table} '
+        r'ON {tab_col} = {tab_col} AND {email_cond}\) '
+        r'ON Issue(Snapshot)?.id = {tab_col}'
+        r'( AND {tab_col} IS NULL)?'),
+    _MakeRE(
+        r'^\({table} JOIN Hotlist AS {table} '
+        r'ON {tab_col} = {tab_col} AND {hotlist_cond}\) '
+        r'ON Issue.id = {tab_col}?'),
+    _MakeRE(
+        r'^\({table} AS {table} JOIN IssuePhaseDef AS {table} '
+        r'ON {tab_col} = {tab_col} AND {phase_cond}\) '
+        r'ON Issue.id = {tab_col}?'),
+    _MakeRE(
+        r'^IssuePhaseDef AS {table} ON {phase_cond}'),
+    _MakeRE(
+        r'^Issue2ApprovalValue AS {table} ON {tab_col} = {tab_col} '
+        r'AND {tab_col} = {placeholder} AND {approval_cond}'),
+    _MakeRE(
+        r'^{table} AS {table} ON {tab_col} = {tab_col} '
+        r'LEFT JOIN {table} AS {table} ON {tab_col} = {tab_col}'),
+    ]
+ORDER_BY_RE_LIST = [
+    _MakeRE(r'^{tab_col}{opt_asc_desc}$'),
+    _MakeRE(r'^LOWER\({tab_col}\){opt_asc_desc}$'),
+    _MakeRE(r'^ISNULL\({tab_col}\){opt_asc_desc}$'),
+    _MakeRE(r'^\(ISNULL\({tab_col}\) AND ISNULL\({tab_col}\)\){opt_asc_desc}$'),
+    _MakeRE(r'^FIELD\({tab_col}, {multi_placeholder}\){opt_asc_desc}$'),
+    _MakeRE(r'^FIELD\(IF\(ISNULL\({tab_col}\), {tab_col}, {tab_col}\), '
+            r'{multi_placeholder}\){opt_asc_desc}$'),
+    _MakeRE(r'^CONCAT\({tab_col}, {tab_col}\){opt_asc_desc}$'),
+    ]
+GROUP_BY_RE_LIST = [
+    TAB_COL_RE,
+    ]
+WHERE_COND_RE_LIST = [
+    _MakeRE(r'^TRUE$'),
+    _MakeRE(r'^FALSE$'),
+    _MakeRE(r'^{tab_col} IS NULL$'),
+    _MakeRE(r'^{tab_col} IS NOT NULL$'),
+    _MakeRE(r'^{tab_col} {compare_op} {tab_col}$'),
+    _MakeRE(r'^{tab_col} {compare_op} {placeholder}$'),
+    _MakeRE(r'^{tab_col} %% {placeholder} = {placeholder}$'),
+    _MakeRE(r'^{tab_col} IN \({multi_placeholder}\)$'),
+    _MakeRE(r'^{tab_col} NOT IN \({multi_placeholder}\)$'),
+    _MakeRE(r'^LOWER\({tab_col}\) IS NULL$'),
+    _MakeRE(r'^LOWER\({tab_col}\) IS NOT NULL$'),
+    _MakeRE(r'^LOWER\({tab_col}\) {compare_op} {placeholder}$'),
+    _MakeRE(r'^LOWER\({tab_col}\) IN \({multi_placeholder}\)$'),
+    _MakeRE(r'^LOWER\({tab_col}\) NOT IN \({multi_placeholder}\)$'),
+    _MakeRE(r'^LOWER\({tab_col}\) LIKE {placeholder}$'),
+    _MakeRE(r'^LOWER\({tab_col}\) NOT LIKE {placeholder}$'),
+    _MakeRE(r'^timestep < \(SELECT MAX\(j.timestep\) FROM Invalidate AS j '
+            r'WHERE j.kind = %s '
+            r'AND j.cache_key = Invalidate.cache_key\)$'),
+    _MakeRE(r'^\({tab_col} IS NULL OR {tab_col} {compare_op} {placeholder}\) '
+             'AND \({tab_col} IS NULL OR {tab_col} {compare_op} {placeholder}'
+             '\)$'),
+    _MakeRE(r'^\({tab_col} IS NOT NULL AND {tab_col} {compare_op} '
+             '{placeholder}\) OR \({tab_col} IS NOT NULL AND {tab_col} '
+             '{compare_op} {placeholder}\)$'),
+    ]
+
+# Note: We never use ';' for multiple statements, '@' for SQL variables, or
+# any quoted strings in stmt_str (quotes are put in my MySQLdb for args).
+STMT_STR_RE = re.compile(
+    r'\A(SELECT|UPDATE|DELETE|INSERT|REPLACE) [\'-+=!<>%*.,()\w\s]+\Z',
+    re.MULTILINE)
+
+
+def _IsValidDBValue(val):
+  if isinstance(val, string_types):
+    return '\x00' not in val
+  return True
+
+
+def _IsValidTableName(table_name):
+  return TABLE_RE.match(table_name)
+
+
+def _IsValidColumnName(column_expr):
+  return any(regex.match(column_expr) for regex in COLUMN_RE_LIST)
+
+
+def _IsValidUseClause(use_clause):
+  return USE_CLAUSE_RE.match(use_clause)
+
+def _IsValidHavingCond(cond):
+  if cond.startswith('(') and cond.endswith(')'):
+    cond = cond[1:-1]
+
+  if ' OR ' in cond:
+    return all(_IsValidHavingCond(c) for c in cond.split(' OR '))
+
+  if ' AND ' in cond:
+    return all(_IsValidHavingCond(c) for c in cond.split(' AND '))
+
+  return any(regex.match(cond) for regex in HAVING_RE_LIST)
+
+
+def _IsValidJoin(join):
+  return any(regex.match(join) for regex in JOIN_RE_LIST)
+
+
+def _IsValidOrderByTerm(term):
+  return any(regex.match(term) for regex in ORDER_BY_RE_LIST)
+
+
+def _IsValidGroupByTerm(term):
+  return any(regex.match(term) for regex in GROUP_BY_RE_LIST)
+
+
+def _IsValidWhereCond(cond):
+  if cond.startswith('NOT '):
+    cond = cond[4:]
+  if cond.startswith('(') and cond.endswith(')'):
+    cond = cond[1:-1]
+
+  if any(regex.match(cond) for regex in WHERE_COND_RE_LIST):
+    return True
+
+  if ' OR ' in cond:
+    return all(_IsValidWhereCond(c) for c in cond.split(' OR '))
+
+  if ' AND ' in cond:
+    return all(_IsValidWhereCond(c) for c in cond.split(' AND '))
+
+  return False
+
+
+def _IsValidStatement(stmt_str):
+  """Final check to make sure there is no funny junk sneaking in somehow."""
+  return (STMT_STR_RE.match(stmt_str) and
+          '--' not in stmt_str)
+
+
+def _BoolsToInts(arg_list):
+  """Convert any True values to 1s and Falses to 0s.
+
+  Google's copy of MySQLdb has bool-to-int conversion disabled,
+  and yet it seems to be needed otherwise they are converted
+  to strings and always interpreted as 0 (which is FALSE).
+
+  Args:
+    arg_list: (nested) list of SQL statment argument values, which may
+        include some boolean values.
+
+  Returns:
+    The same list, but with True replaced by 1 and False replaced by 0.
+  """
+  result = []
+  for arg in arg_list:
+    if isinstance(arg, (list, tuple)):
+      result.append(_BoolsToInts(arg))
+    elif arg is True:
+      result.append(1)
+    elif arg is False:
+      result.append(0)
+    else:
+      result.append(arg)
+
+  return result
diff --git a/framework/table_view_helpers.py b/framework/table_view_helpers.py
new file mode 100644
index 0000000..3fa07c2
--- /dev/null
+++ b/framework/table_view_helpers.py
@@ -0,0 +1,793 @@
+# 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
+
+"""Classes and functions for displaying lists of project artifacts.
+
+This file exports classes TableRow and TableCell that help
+represent HTML table rows and cells.  These classes make rendering
+HTML tables that list project artifacts much easier to do with EZT.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import itertools
+import logging
+
+from functools import total_ordering
+
+import ezt
+
+from framework import framework_constants
+from framework import template_helpers
+from framework import timestr
+from proto import tracker_pb2
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+def ComputeUnshownColumns(results, shown_columns, config, built_in_cols):
+  """Return a list of unshown columns that the user could add.
+
+  Args:
+    results: list of search result PBs. Each must have labels.
+    shown_columns: list of column names to be used in results table.
+    config: harmonized config for the issue search, including all
+        well known labels and custom fields.
+    built_in_cols: list of other column names that are built into the tool.
+      E.g., star count, or creation date.
+
+  Returns:
+    List of column names to append to the "..." menu.
+  """
+  unshown_set = set()  # lowercases column names
+  unshown_list = []  # original-case column names
+  shown_set = {col.lower() for col in shown_columns}
+  labels_already_seen = set()  # whole labels, original case
+
+  def _MaybeAddLabel(label_name):
+    """Add the key part of the given label if needed."""
+    if label_name.lower() in labels_already_seen:
+      return
+    labels_already_seen.add(label_name.lower())
+    if '-' in label_name:
+      col, _value = label_name.split('-', 1)
+      _MaybeAddCol(col)
+
+  def _MaybeAddCol(col):
+    if col.lower() not in shown_set and col.lower() not in unshown_set:
+      unshown_list.append(col)
+      unshown_set.add(col.lower())
+
+  # The user can always add any of the default columns.
+  for col in config.default_col_spec.split():
+    _MaybeAddCol(col)
+
+  # The user can always add any of the built-in columns.
+  for col in built_in_cols:
+    _MaybeAddCol(col)
+
+  # The user can add a column for any well-known labels
+  for wkl in config.well_known_labels:
+    _MaybeAddLabel(wkl.label)
+
+  phase_names = set(itertools.chain.from_iterable(
+      (phase.name.lower() for phase in result.phases) for result in results))
+  # The user can add a column for any custom field
+  field_ids_alread_seen = set()
+  for fd in config.field_defs:
+    field_lower = fd.field_name.lower()
+    field_ids_alread_seen.add(fd.field_id)
+    if fd.is_phase_field:
+      for name in phase_names:
+        phase_field_col = name + '.' + field_lower
+        if (phase_field_col not in shown_set and
+            phase_field_col not in unshown_set):
+          unshown_list.append(phase_field_col)
+          unshown_set.add(phase_field_col)
+    elif field_lower not in shown_set and field_lower not in unshown_set:
+      unshown_list.append(fd.field_name)
+      unshown_set.add(field_lower)
+
+    if fd.field_type == tracker_pb2.FieldTypes.APPROVAL_TYPE:
+      approval_lower_approver = (
+          field_lower + tracker_constants.APPROVER_COL_SUFFIX)
+      if (approval_lower_approver not in shown_set and
+          approval_lower_approver not in unshown_set):
+        unshown_list.append(
+            fd.field_name + tracker_constants.APPROVER_COL_SUFFIX)
+        unshown_set.add(approval_lower_approver)
+
+  # The user can add a column for any key-value label or field in the results.
+  for r in results:
+    for label_name in tracker_bizobj.GetLabels(r):
+      _MaybeAddLabel(label_name)
+    for field_value in r.field_values:
+      if field_value.field_id not in field_ids_alread_seen:
+        field_ids_alread_seen.add(field_value.field_id)
+        fd = tracker_bizobj.FindFieldDefByID(field_value.field_id, config)
+        if fd:  # could be None for a foreign field, which we don't display.
+          field_lower = fd.field_name.lower()
+          if field_lower not in shown_set and field_lower not in unshown_set:
+            unshown_list.append(fd.field_name)
+            unshown_set.add(field_lower)
+
+  return sorted(unshown_list)
+
+
+def ExtractUniqueValues(columns, artifact_list, users_by_id,
+                        config, related_issues, hotlist_context_dict=None):
+  """Build a nested list of unique values so the user can auto-filter.
+
+  Args:
+    columns: a list of lowercase column name strings, which may contain
+        combined columns like "priority/pri".
+    artifact_list: a list of artifacts in the complete set of search results.
+    users_by_id: dict mapping user_ids to UserViews.
+    config: ProjectIssueConfig PB for the current project.
+    related_issues: dict {issue_id: issue} of pre-fetched related issues.
+    hotlist_context_dict: dict for building a hotlist grid table
+
+  Returns:
+    [EZTItem(col1, colname1, [val11, val12,...]), ...]
+    A list of EZTItems, each of which has a col_index, column_name,
+    and a list of unique values that appear in that column.
+  """
+  column_values = {col_name: {} for col_name in columns}
+
+  # For each combined column "a/b/c", add entries that point from "a" back
+  # to "a/b/c", from "b" back to "a/b/c", and from "c" back to "a/b/c".
+  combined_column_parts = collections.defaultdict(list)
+  for col in columns:
+    if '/' in col:
+      for col_part in col.split('/'):
+        combined_column_parts[col_part].append(col)
+
+  unique_labels = set()
+  for art in artifact_list:
+    unique_labels.update(tracker_bizobj.GetLabels(art))
+
+  for label in unique_labels:
+    if '-' in label:
+      col, val = label.split('-', 1)
+      col = col.lower()
+      if col in column_values:
+        column_values[col][val.lower()] = val
+      if col in combined_column_parts:
+        for combined_column in combined_column_parts[col]:
+          column_values[combined_column][val.lower()] = val
+    else:
+      if 'summary' in column_values:
+        column_values['summary'][label.lower()] = label
+
+  # TODO(jrobbins): Consider refacting some of this to tracker_bizobj
+  # or a new builtins.py to reduce duplication.
+  if 'reporter' in column_values:
+    for art in artifact_list:
+      reporter_id = art.reporter_id
+      if reporter_id and reporter_id in users_by_id:
+        reporter_username = users_by_id[reporter_id].display_name
+        column_values['reporter'][reporter_username] = reporter_username
+
+  if 'owner' in column_values:
+    for art in artifact_list:
+      owner_id = tracker_bizobj.GetOwnerId(art)
+      if owner_id and owner_id in users_by_id:
+        owner_username = users_by_id[owner_id].display_name
+        column_values['owner'][owner_username] = owner_username
+
+  if 'cc' in column_values:
+    for art in artifact_list:
+      cc_ids = tracker_bizobj.GetCcIds(art)
+      for cc_id in cc_ids:
+        if cc_id and cc_id in users_by_id:
+          cc_username = users_by_id[cc_id].display_name
+          column_values['cc'][cc_username] = cc_username
+
+  if 'component' in column_values:
+    for art in artifact_list:
+      all_comp_ids = list(art.component_ids) + list(art.derived_component_ids)
+      for component_id in all_comp_ids:
+        cd = tracker_bizobj.FindComponentDefByID(component_id, config)
+        if cd:
+          column_values['component'][cd.path] = cd.path
+
+  if 'stars' in column_values:
+    for art in artifact_list:
+      star_count = art.star_count
+      column_values['stars'][star_count] = star_count
+
+  if 'status' in column_values:
+    for art in artifact_list:
+      status = tracker_bizobj.GetStatus(art)
+      if status:
+        column_values['status'][status.lower()] = status
+
+  if 'project' in column_values:
+    for art in artifact_list:
+      project_name = art.project_name
+      column_values['project'][project_name] = project_name
+
+  if 'mergedinto' in column_values:
+    for art in artifact_list:
+      if art.merged_into and art.merged_into != 0:
+        merged_issue = related_issues[art.merged_into]
+        merged_issue_ref = tracker_bizobj.FormatIssueRef((
+            merged_issue.project_name, merged_issue.local_id))
+        column_values['mergedinto'][merged_issue_ref] = merged_issue_ref
+
+  if 'blocked' in column_values:
+    for art in artifact_list:
+      if art.blocked_on_iids:
+        column_values['blocked']['is_blocked'] = 'Yes'
+      else:
+        column_values['blocked']['is_not_blocked'] = 'No'
+
+  if 'blockedon' in column_values:
+    for art in artifact_list:
+      if art.blocked_on_iids:
+        for blocked_on_iid in art.blocked_on_iids:
+          blocked_on_issue = related_issues[blocked_on_iid]
+          blocked_on_ref = tracker_bizobj.FormatIssueRef((
+              blocked_on_issue.project_name, blocked_on_issue.local_id))
+          column_values['blockedon'][blocked_on_ref] = blocked_on_ref
+
+  if 'blocking' in column_values:
+    for art in artifact_list:
+      if art.blocking_iids:
+        for blocking_iid in art.blocking_iids:
+          blocking_issue = related_issues[blocking_iid]
+          blocking_ref = tracker_bizobj.FormatIssueRef((
+              blocking_issue.project_name, blocking_issue.local_id))
+          column_values['blocking'][blocking_ref] = blocking_ref
+
+  if 'added' in column_values:
+    for art in artifact_list:
+      if hotlist_context_dict and hotlist_context_dict[art.issue_id]:
+        issue_dict = hotlist_context_dict[art.issue_id]
+        date_added = issue_dict['date_added']
+        column_values['added'][date_added] = date_added
+
+  if 'adder' in column_values:
+    for art in artifact_list:
+      if hotlist_context_dict and hotlist_context_dict[art.issue_id]:
+        issue_dict = hotlist_context_dict[art.issue_id]
+        adder_id = issue_dict['adder_id']
+        adder = users_by_id[adder_id].display_name
+        column_values['adder'][adder] = adder
+
+  if 'note' in column_values:
+    for art in artifact_list:
+      if hotlist_context_dict and hotlist_context_dict[art.issue_id]:
+        issue_dict = hotlist_context_dict[art.issue_id]
+        note = issue_dict['note']
+        if issue_dict['note']:
+          column_values['note'][note] = note
+
+  if 'attachments' in column_values:
+    for art in artifact_list:
+      attachment_count = art.attachment_count
+      column_values['attachments'][attachment_count] = attachment_count
+
+  # Add all custom field values if the custom field name is a shown column.
+  field_id_to_col = {}
+  for art in artifact_list:
+    for fv in art.field_values:
+      field_col, field_type = field_id_to_col.get(fv.field_id, (None, None))
+      if field_col == 'NOT_SHOWN':
+        continue
+      if field_col is None:
+        fd = tracker_bizobj.FindFieldDefByID(fv.field_id, config)
+        if not fd:
+          field_id_to_col[fv.field_id] = 'NOT_SHOWN', None
+          continue
+        field_col = fd.field_name.lower()
+        field_type = fd.field_type
+        if field_col not in column_values:
+          field_id_to_col[fv.field_id] = 'NOT_SHOWN', None
+          continue
+        field_id_to_col[fv.field_id] = field_col, field_type
+
+      if field_type == tracker_pb2.FieldTypes.ENUM_TYPE:
+        continue  # Already handled by label parsing
+      elif field_type == tracker_pb2.FieldTypes.INT_TYPE:
+        val = fv.int_value
+      elif field_type == tracker_pb2.FieldTypes.STR_TYPE:
+        val = fv.str_value
+      elif field_type == tracker_pb2.FieldTypes.USER_TYPE:
+        user = users_by_id.get(fv.user_id)
+        val = user.email if user else framework_constants.NO_USER_NAME
+      elif field_type == tracker_pb2.FieldTypes.DATE_TYPE:
+        val = fv.int_value  # TODO(jrobbins): convert to date
+      elif field_type == tracker_pb2.FieldTypes.BOOL_TYPE:
+        val = 'Yes' if fv.int_value else 'No'
+
+      column_values[field_col][val] = val
+
+  # TODO(jrobbins): make the capitalization of well-known unique label and
+  # status values match the way it is written in the issue config.
+
+  # Return EZTItems for each column in left-to-right display order.
+  result = []
+  for i, col_name in enumerate(columns):
+    # TODO(jrobbins): sort each set of column values top-to-bottom, by the
+    # order specified in the project artifact config. For now, just sort
+    # lexicographically to make expected output defined.
+    sorted_col_values = sorted(column_values[col_name].values())
+    result.append(template_helpers.EZTItem(
+        col_index=i, column_name=col_name, filter_values=sorted_col_values))
+
+  return result
+
+
+def MakeTableData(
+    visible_results, starred_items, lower_columns, lower_group_by,
+    users_by_id, cell_factories, id_accessor, related_issues,
+    viewable_iids_set, config, context_for_all_issues=None):
+  """Return a list of list row objects for display by EZT.
+
+  Args:
+    visible_results: list of artifacts to display on one pagination page.
+    starred_items: list of IDs/names of items in the current project
+        that the signed in user has starred.
+    lower_columns: list of column names to display, all lowercase.  These can
+        be combined column names, e.g., 'priority/pri'.
+    lower_group_by: list of column names that define row groups, all lowercase.
+    users_by_id: dict mapping user IDs to UserViews.
+    cell_factories: dict of functions that each create TableCell objects.
+    id_accessor: function that maps from an artifact to the ID/name that might
+        be in the starred items list.
+    related_issues: dict {issue_id: issue} of pre-fetched related issues.
+    viewable_iids_set: set of issue ids that can be viewed by the user.
+    config: ProjectIssueConfig PB for the current project.
+    context_for_all_issues: A dictionary of dictionaries containing values
+        passed in to cell factory functions to create TableCells. Dictionary
+        form: {issue_id: {'rank': issue_rank, 'issue_info': info_value, ..},
+        issue_id: {'rank': issue_rank}, ..}
+
+  Returns:
+    A list of TableRow objects, one for each visible result.
+  """
+  table_data = []
+
+  group_cell_factories = [
+      ChooseCellFactory(group.strip('-'), cell_factories, config)
+      for group in lower_group_by]
+
+  # Make a list of cell factories, one for each column.
+  factories_to_use = [
+      ChooseCellFactory(col, cell_factories, config) for col in lower_columns]
+
+  current_group = None
+  for idx, art in enumerate(visible_results):
+    row = MakeRowData(
+        art, lower_columns, users_by_id, factories_to_use, related_issues,
+        viewable_iids_set, config, context_for_all_issues)
+    row.starred = ezt.boolean(id_accessor(art) in starred_items)
+    row.idx = idx  # EZT does not have loop counters, so add idx.
+    table_data.append(row)
+    row.group = None
+
+    # Also include group information for the first row in each group.
+    # TODO(jrobbins): This seems like more overhead than we need for the
+    # common case where no new group heading row is to be inserted.
+    group = MakeRowData(
+        art, [group_name.strip('-') for group_name in lower_group_by],
+        users_by_id, group_cell_factories, related_issues, viewable_iids_set,
+        config, context_for_all_issues)
+    for cell, group_name in zip(group.cells, lower_group_by):
+      cell.group_name = group_name
+    if group == current_group:
+      current_group.rows_in_group += 1
+    else:
+      row.group = group
+      current_group = group
+      current_group.rows_in_group = 1
+
+  return table_data
+
+
+def MakeRowData(
+    art, columns, users_by_id, cell_factory_list, related_issues,
+    viewable_iids_set, config, context_for_all_issues):
+  """Make a TableRow for use by EZT when rendering HTML table of results.
+
+  Args:
+    art: a project artifact PB
+    columns: list of lower-case column names
+    users_by_id: dictionary {user_id: UserView} with each UserView having
+        a "display_name" member.
+    cell_factory_list: list of functions that each create TableCell
+        objects for a given column.
+    related_issues: dict {issue_id: issue} of pre-fetched related issues.
+    viewable_iids_set: set of issue ids that can be viewed by the user.
+    config: ProjectIssueConfig PB for the current project.
+    context_for_all_issues: A dictionary of dictionaries containing values
+        passed in to cell factory functions to create TableCells. Dictionary
+        form: {issue_id: {'rank': issue_rank, 'issue_info': info_value, ..},
+        issue_id: {'rank': issue_rank}, ..}
+
+  Returns:
+    A TableRow object for use by EZT to render a table of results.
+  """
+  if context_for_all_issues is None:
+    context_for_all_issues = {}
+  ordered_row_data = []
+  non_col_labels = []
+  label_values = collections.defaultdict(list)
+
+  flattened_columns = set()
+  for col in columns:
+    if '/' in col:
+      flattened_columns.update(col.split('/'))
+    else:
+      flattened_columns.add(col)
+
+  # Group all "Key-Value" labels by key, and separate the "OneWord" labels.
+  _AccumulateLabelValues(
+      art.labels, flattened_columns, label_values, non_col_labels)
+
+  _AccumulateLabelValues(
+      art.derived_labels, flattened_columns, label_values,
+      non_col_labels, is_derived=True)
+
+  # Build up a list of TableCell objects for this row.
+  for i, col in enumerate(columns):
+    factory = cell_factory_list[i]
+    kw = {
+        'col': col,
+        'users_by_id': users_by_id,
+        'non_col_labels': non_col_labels,
+        'label_values': label_values,
+        'related_issues': related_issues,
+        'viewable_iids_set': viewable_iids_set,
+        'config': config,
+        }
+    kw.update(context_for_all_issues.get(art.issue_id, {}))
+    new_cell = factory(art, **kw)
+    new_cell.col_index = i
+    ordered_row_data.append(new_cell)
+
+  return TableRow(ordered_row_data)
+
+
+def _AccumulateLabelValues(
+    labels, columns, label_values, non_col_labels, is_derived=False):
+  """Parse OneWord and Key-Value labels for display in a list page.
+
+  Args:
+    labels: a list of label strings.
+    columns: a list of column names.
+    label_values: mutable dictionary {key: [value, ...]} of label values
+        seen so far.
+    non_col_labels: mutable list of OneWord labels seen so far.
+    is_derived: true if these labels were derived via rules.
+
+  Returns:
+    Nothing.  But, the given label_values dictionary will grow to hold
+    the values of the key-value labels passed in, and the non_col_labels
+    list will grow to hold the OneWord labels passed in.  These are shown
+    in label columns, and in the summary column, respectively
+  """
+  for label_name in labels:
+    if '-' in label_name:
+      parts = label_name.split('-')
+      for pivot in range(1, len(parts)):
+        column_name = '-'.join(parts[:pivot])
+        value = '-'.join(parts[pivot:])
+        column_name = column_name.lower()
+        if column_name in columns:
+          label_values[column_name].append((value, is_derived))
+    else:
+      non_col_labels.append((label_name, is_derived))
+
+
+@total_ordering
+class TableRow(object):
+  """A tiny auxiliary class to represent a row in an HTML table."""
+
+  def __init__(self, cells):
+    """Initialize the table row with the given data."""
+    self.cells = cells
+    # Used by MakeTableData for layout.
+    self.idx = None
+    self.group = None
+    self.rows_in_group = None
+    self.starred = None
+
+  def __eq__(self, other):
+    """A row is == if each cell is == to the cells in the other row."""
+    return other and self.cells == other.cells
+
+  def __ne__(self, other):
+    return not other and self.cells != other.cells
+
+  def __lt__(self, other):
+    return other and self.cells < other.cells
+
+  def DebugString(self):
+    """Return a string that is useful for on-page debugging."""
+    return 'TR(%s)' % self.cells
+
+
+# TODO(jrobbins): also add unsortable... or change this to a list of operations
+# that can be done.
+CELL_TYPE_ID = 'ID'
+CELL_TYPE_SUMMARY = 'summary'
+CELL_TYPE_ATTR = 'attr'
+CELL_TYPE_UNFILTERABLE = 'unfilterable'
+CELL_TYPE_NOTE = 'note'
+CELL_TYPE_PROJECT = 'project'
+CELL_TYPE_URL = 'url'
+CELL_TYPE_ISSUES = 'issues'
+
+
+@total_ordering
+class TableCell(object):
+  """Helper class to represent a table cell when rendering using EZT."""
+
+  # Should instances of this class be rendered with whitespace:nowrap?
+  # Subclasses can override this constant.
+  NOWRAP = ezt.boolean(True)
+
+  def __init__(self, cell_type, explicit_values,
+               derived_values=None, non_column_labels=None, align='',
+               sort_values=True):
+    """Store all the given data for later access by EZT."""
+    self.type = cell_type
+    self.align = align
+    self.col_index = 0  # Is set afterward
+    self.values = []
+    if non_column_labels:
+      self.non_column_labels = [
+          template_helpers.EZTItem(value=v, is_derived=ezt.boolean(d))
+          for v, d in non_column_labels]
+    else:
+      self.non_column_labels = []
+
+    for v in (sorted(explicit_values) if sort_values else explicit_values):
+      self.values.append(CellItem(v))
+
+    if derived_values:
+      for v in (sorted(derived_values) if sort_values else derived_values):
+        self.values.append(CellItem(v, is_derived=True))
+
+  def __eq__(self, other):
+    """A row is == if each cell is == to the cells in the other row."""
+    return other and self.values == other.values
+
+  def __ne__(self, other):
+    return not other and self.values != other.values
+
+  def __lt__(self, other):
+    return other and self.values < other.values
+
+  def DebugString(self):
+    return 'TC(%r, %r, %r)' % (
+        self.type,
+        [v.DebugString() for v in self.values],
+        self.non_column_labels)
+
+
+def CompositeFactoryTableCell(factory_col_list_arg):
+  """Cell factory that combines multiple cells in a combined column."""
+
+  class FactoryClass(TableCell):
+    factory_col_list = factory_col_list_arg
+
+    def __init__(self, art, **kw):
+      TableCell.__init__(self, CELL_TYPE_UNFILTERABLE, [])
+
+      for sub_factory, sub_col in self.factory_col_list:
+        kw['col'] = sub_col
+        sub_cell = sub_factory(art, **kw)
+        self.non_column_labels.extend(sub_cell.non_column_labels)
+        self.values.extend(sub_cell.values)
+  return FactoryClass
+
+
+def CompositeColTableCell(columns_to_combine, cell_factories, config):
+  """Cell factory that combines multiple cells in a combined column."""
+  factory_col_list = []
+  for sub_col in columns_to_combine:
+    sub_factory = ChooseCellFactory(sub_col, cell_factories, config)
+    factory_col_list.append((sub_factory, sub_col))
+  return CompositeFactoryTableCell(factory_col_list)
+
+
+@total_ordering
+class CellItem(object):
+  """Simple class to display one part of a table cell's value, with style."""
+
+  def __init__(self, item, is_derived=False):
+    self.item = item
+    self.is_derived = ezt.boolean(is_derived)
+
+  def __eq__(self, other):
+    """A row is == if each cell is == to the item in the other row."""
+    return other and self.item == other.item
+
+  def __ne__(self, other):
+    return not other and self.item != other.item
+
+  def __lt__(self, other):
+    return other and self.item < other.item
+
+  def DebugString(self):
+    if self.is_derived:
+      return 'CI(derived: %r)' % self.item
+    else:
+      return 'CI(%r)' % self.item
+
+
+class TableCellKeyLabels(TableCell):
+  """TableCell subclass specifically for showing user-defined label values."""
+
+  def __init__(self, _art, col=None, label_values=None,  **_kw):
+    label_value_pairs = label_values.get(col, [])
+    explicit_values = [value for value, is_derived in label_value_pairs
+                       if not is_derived]
+    derived_values = [value for value, is_derived in label_value_pairs
+                      if is_derived]
+    TableCell.__init__(self, CELL_TYPE_ATTR, explicit_values,
+                       derived_values=derived_values)
+
+
+class TableCellProject(TableCell):
+  """TableCell subclass for showing an artifact's project name."""
+
+  def __init__(self, art, **_kw):
+    TableCell.__init__(
+        self, CELL_TYPE_PROJECT, [art.project_name])
+
+
+class TableCellStars(TableCell):
+  """TableCell subclass for showing an artifact's star count."""
+
+  def __init__(self, art, **_kw):
+    TableCell.__init__(
+        self, CELL_TYPE_ATTR, [art.star_count], align='right')
+
+
+class TableCellSummary(TableCell):
+  """TableCell subclass for showing an artifact's summary."""
+
+  def __init__(self, art, non_col_labels=None, **_kw):
+    TableCell.__init__(
+        self, CELL_TYPE_SUMMARY, [art.summary],
+        non_column_labels=non_col_labels)
+
+
+class TableCellDate(TableCell):
+  """TableCell subclass for showing any kind of date timestamp."""
+
+  # Make instances of this class render with whitespace:nowrap.
+  NOWRAP = ezt.boolean(True)
+
+  def __init__(self, timestamp, days_only=False):
+    values = []
+    if timestamp:
+      date_str = timestr.FormatRelativeDate(timestamp, days_only=days_only)
+      if not date_str:
+        date_str = timestr.FormatAbsoluteDate(timestamp)
+      values = [date_str]
+
+    TableCell.__init__(self, CELL_TYPE_UNFILTERABLE, values)
+
+
+class TableCellCustom(TableCell):
+  """Abstract TableCell subclass specifically for showing custom fields."""
+
+  def __init__(self, art, col=None, users_by_id=None, config=None, **_kw):
+    explicit_values = []
+    derived_values = []
+    cell_type = CELL_TYPE_ATTR
+    phase_names_by_id = {
+        phase.phase_id: phase.name.lower() for phase in art.phases}
+    phase_name = None
+    # Check if col represents a phase field value in the form <phase>.<field>
+    if '.' in col:
+      phase_name, col = col.split('.', 1)
+    for fv in art.field_values:
+      # TODO(jrobbins): for cross-project search this could be a list.
+      fd = tracker_bizobj.FindFieldDefByID(fv.field_id, config)
+      if not fd:
+        # TODO(jrobbins): This can happen if an issue with a custom
+        # field value is moved to a different project.
+        logging.warn('Issue ID %r has undefined field value %r',
+                     art.issue_id, fv)
+      elif fd.field_name.lower() == col and (
+          phase_names_by_id.get(fv.phase_id) == phase_name):
+        if fd.field_type == tracker_pb2.FieldTypes.URL_TYPE:
+          cell_type = CELL_TYPE_URL
+        if fd.field_type == tracker_pb2.FieldTypes.STR_TYPE:
+          self.NOWRAP = ezt.boolean(False)
+        val = tracker_bizobj.GetFieldValue(fv, users_by_id)
+        if fv.derived:
+          derived_values.append(val)
+        else:
+          explicit_values.append(val)
+
+    TableCell.__init__(self, cell_type, explicit_values,
+                       derived_values=derived_values)
+
+  def ExtractValue(self, fv, _users_by_id):
+    return 'field-id-%d-not-implemented-yet' % fv.field_id
+
+class TableCellApprovalStatus(TableCell):
+  """Abstract TableCell subclass specifically for showing approval fields."""
+
+  def __init__(self, art, col=None, config=None, **_kw):
+    explicit_values = []
+    for av in art.approval_values:
+      fd = tracker_bizobj.FindFieldDef(col, config)
+      ad = tracker_bizobj.FindApprovalDef(col, config)
+      if not (ad and fd):
+        logging.warn('Issue ID %r has undefined field value %r',
+                     art.issue_id, av)
+      elif av.approval_id == fd.field_id:
+        explicit_values.append(av.status.name)
+        break
+
+    TableCell.__init__(self, CELL_TYPE_ATTR, explicit_values)
+
+
+class TableCellApprovalApprover(TableCell):
+  """TableCell subclass specifically for showing approval approvers."""
+
+  def __init__(self, art, col=None, config=None, users_by_id=None, **_kw):
+    explicit_values = []
+    approval_name = col[:-len(tracker_constants.APPROVER_COL_SUFFIX)]
+    for av in art.approval_values:
+      fd = tracker_bizobj.FindFieldDef(approval_name, config)
+      ad = tracker_bizobj.FindApprovalDef(approval_name, config)
+      if not (ad and fd):
+        logging.warn('Issue ID %r has undefined field value %r',
+                     art.issue_id, av)
+      elif av.approval_id == fd.field_id:
+        explicit_values = [users_by_id.get(approver_id).display_name
+                           for approver_id in av.approver_ids
+                           if users_by_id.get(approver_id)]
+        break
+
+    TableCell.__init__(self, CELL_TYPE_ATTR, explicit_values)
+
+def ChooseCellFactory(col, cell_factories, config):
+  """Return the CellFactory to use for the given column."""
+  if col in cell_factories:
+    return cell_factories[col]
+
+  if '/' in col:
+    return CompositeColTableCell(col.split('/'), cell_factories, config)
+
+  is_approver_col = False
+  possible_field_name = col
+  if col.endswith(tracker_constants.APPROVER_COL_SUFFIX):
+    possible_field_name = col[:-len(tracker_constants.APPROVER_COL_SUFFIX)]
+    is_approver_col = True
+  # Check if col represents a phase field value in the form <phase>.<field>
+  elif '.' in possible_field_name:
+    possible_field_name = possible_field_name.split('.')[-1]
+
+  fd = tracker_bizobj.FindFieldDef(possible_field_name, config)
+  if fd:
+    # We cannot assume that non-enum_type field defs do not share their
+    # names with label prefixes. So we need to group them with
+    # TableCellKeyLabels to make sure we catch appropriate labels values.
+    if fd.field_type == tracker_pb2.FieldTypes.APPROVAL_TYPE:
+      if is_approver_col:
+        # Combined cell for 'FieldName-approver' to hold approvers
+        # belonging to FieldName and values belonging to labels with
+        # 'FieldName-approver' as the key.
+        return CompositeFactoryTableCell(
+          [(TableCellApprovalApprover, col), (TableCellKeyLabels, col)])
+      return CompositeFactoryTableCell(
+          [(TableCellApprovalStatus, col), (TableCellKeyLabels, col)])
+    elif fd.field_type != tracker_pb2.FieldTypes.ENUM_TYPE:
+      return CompositeFactoryTableCell(
+          [(TableCellCustom, col), (TableCellKeyLabels, col)])
+
+  return TableCellKeyLabels
diff --git a/framework/template_helpers.py b/framework/template_helpers.py
new file mode 100644
index 0000000..5f383c3
--- /dev/null
+++ b/framework/template_helpers.py
@@ -0,0 +1,326 @@
+# 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
+
+"""Some utility classes for interacting with templates."""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import cgi
+import cStringIO
+import httplib
+import logging
+import time
+import types
+
+import ezt
+import six
+
+from protorpc import messages
+
+import settings
+from framework import framework_constants
+
+
+_DISPLAY_VALUE_TRAILING_CHARS = 8
+_DISPLAY_VALUE_TIP_CHARS = 120
+
+
+class PBProxy(object):
+  """Wraps a Protocol Buffer so it is easy to acceess from a template."""
+
+  def __init__(self, pb):
+    self.__pb = pb
+
+  def __getattr__(self, name):
+    """Make the getters template friendly.
+
+    Psudo-hack alert: When attributes end with _bool, they are converted in
+    to EZT style bools. I.e., if false return None, if true return True.
+
+    Args:
+      name: the name of the attribute to get.
+
+    Returns:
+      The value of that attribute (as an EZT bool if the name ends with _bool).
+    """
+    if name.endswith('_bool'):
+      bool_name = name
+      name = name[0:-5]
+    else:
+      bool_name = None
+
+    # Make it possible for a PBProxy-local attribute to override the protocol
+    # buffer field, or even to allow attributes to be added to the PBProxy that
+    # the protocol buffer does not even have.
+    if name in self.__dict__:
+      if callable(self.__dict__[name]):
+        val = self.__dict__[name]()
+      else:
+        val = self.__dict__[name]
+
+      if bool_name:
+        return ezt.boolean(val)
+      return val
+
+    if bool_name:
+      # return an ezt.boolean for the named field.
+      return ezt.boolean(getattr(self.__pb, name))
+
+    val = getattr(self.__pb, name)
+
+    if isinstance(val, messages.Enum):
+      return int(val)  # TODO(jrobbins): use str() instead
+
+    if isinstance(val, messages.Message):
+      return PBProxy(val)
+
+    # Return a list of values whose Message entries
+    # have been wrapped in PBProxies.
+    if isinstance(val, (list, messages.FieldList)):
+      list_to_return = []
+      for v in val:
+        if isinstance(v, messages.Message):
+          list_to_return.append(PBProxy(v))
+        else:
+          list_to_return.append(v)
+      return list_to_return
+
+    return val
+
+  def DebugString(self):
+    """Return a string representation that is useful in debugging."""
+    return 'PBProxy(%s)' % self.__pb
+
+  def __eq__(self, other):
+    # Disable warning about accessing other.__pb.
+    # pylint: disable=protected-access
+    return isinstance(other, PBProxy) and self.__pb == other.__pb
+
+
+_templates = {}
+
+
+def GetTemplate(
+    template_path, compress_whitespace=True, eliminate_blank_lines=False,
+    base_format=ezt.FORMAT_HTML):
+  """Make a MonorailTemplate if needed, or reuse one if possible."""
+  key = template_path, compress_whitespace, base_format
+  if key in _templates:
+    return _templates[key]
+
+  template = MonorailTemplate(
+      template_path, compress_whitespace=compress_whitespace,
+      eliminate_blank_lines=eliminate_blank_lines, base_format=base_format)
+  _templates[key] = template
+  return template
+
+
+class cStringIOUnicodeWrapper(object):
+  """Wrapper on cStringIO.StringIO that encodes unicode as UTF-8 as it goes."""
+
+  def __init__(self):
+    self.buffer = cStringIO.StringIO()
+
+  def write(self, s):
+    if isinstance(s, six.text_type):
+      utf8_s = s.encode('utf-8')
+    else:
+      utf8_s = s
+    self.buffer.write(utf8_s)
+
+  def getvalue(self):
+    return self.buffer.getvalue()
+
+
+SNIFFABLE_PATTERNS = {
+  '%PDF-': '%NoNoNo-',
+}
+
+
+class MonorailTemplate(object):
+  """A template with additional functionality."""
+
+  def __init__(self, template_path, compress_whitespace=True,
+               eliminate_blank_lines=False, base_format=ezt.FORMAT_HTML):
+    self.template_path = template_path
+    self.template = None
+    self.compress_whitespace = compress_whitespace
+    self.base_format = base_format
+    self.eliminate_blank_lines = eliminate_blank_lines
+
+  def WriteResponse(self, response, data, content_type=None):
+    """Write the parsed and filled in template to http server."""
+    if content_type:
+      response.content_type = content_type
+
+    response.status = data.get('http_response_code', httplib.OK)
+    whole_page = self.GetResponse(data)
+    if data.get('prevent_sniffing'):
+      for sniff_pattern, sniff_replacement in SNIFFABLE_PATTERNS.items():
+        whole_page = whole_page.replace(sniff_pattern, sniff_replacement)
+    start = time.time()
+    response.write(whole_page)
+    logging.info('wrote response in %dms', int((time.time() - start) * 1000))
+
+  def GetResponse(self, data):
+    """Generate the text from the template and return it as a string."""
+    template = self.GetTemplate()
+    start = time.time()
+    buf = cStringIOUnicodeWrapper()
+    template.generate(buf, data)
+    whole_page = buf.getvalue()
+    logging.info('rendering took %dms', int((time.time() - start) * 1000))
+    logging.info('whole_page len is %r', len(whole_page))
+    if self.eliminate_blank_lines:
+      lines = whole_page.split('\n')
+      whole_page = '\n'.join(line for line in lines if line.strip())
+      logging.info('smaller whole_page len is %r', len(whole_page))
+      logging.info('smaller rendering took %dms',
+                   int((time.time() - start) * 1000))
+    return whole_page
+
+  def GetTemplate(self):
+    """Parse the EZT template, or return an already parsed one."""
+    # We don't operate directly on self.template to avoid races.
+    template = self.template
+
+    if template is None or settings.local_mode:
+      start = time.time()
+      template = ezt.Template(
+          fname=self.template_path,
+          compress_whitespace=self.compress_whitespace,
+          base_format=self.base_format)
+      logging.info('parsed in %dms', int((time.time() - start) * 1000))
+      self.template = template
+
+    return template
+
+  def GetTemplatePath(self):
+    """Accessor for the template path specified in the constructor.
+
+    Returns:
+      The string path for the template file provided to the constructor.
+    """
+    return self.template_path
+
+
+class EZTError(object):
+  """This class is a helper class to pass errors to EZT.
+
+  This class is used to hold information that will be passed to EZT but might
+  be unset. All unset values return None (ie EZT False)
+  Example: page errors
+  """
+
+  def __getattr__(self, _name):
+    """This is the EZT retrieval function."""
+    return None
+
+  def AnyErrors(self):
+    return len(self.__dict__) != 0
+
+  def DebugString(self):
+    return 'EZTError(%s)' % self.__dict__
+
+  def SetError(self, name, value):
+    self.__setattr__(name, value)
+
+  def SetCustomFieldError(self, field_id, value):
+    # This access works because of the custom __getattr__.
+    # pylint: disable=access-member-before-definition
+    # pylint: disable=attribute-defined-outside-init
+    if self.custom_fields is None:
+      self.custom_fields = []
+    self.custom_fields.append(EZTItem(field_id=field_id, message=value))
+
+  any_errors = property(AnyErrors, None)
+
+def FitUnsafeText(text, length):
+  """Trim some unsafe (unescaped) text to a specific length.
+
+  Three periods are appended if trimming occurs. Note that we cannot use
+  the ellipsis character (&hellip) because this is unescaped text.
+
+  Args:
+    text: the string to fit (ASCII or unicode).
+    length: the length to trim to.
+
+  Returns:
+    An ASCII or unicode string fitted to the given length.
+  """
+  if not text:
+    return ""
+
+  if len(text) <= length:
+    return text
+
+  return text[:length] + '...'
+
+
+def BytesKbOrMb(num_bytes):
+  """Return a human-readable string representation of a number of bytes."""
+  if num_bytes < 1024:
+    return '%d bytes' % num_bytes  # e.g., 128 bytes
+  if num_bytes < 99 * 1024:
+    return '%.1f KB' % (num_bytes / 1024.0)  # e.g. 23.4 KB
+  if num_bytes < 1024 * 1024:
+    return '%d KB' % (num_bytes / 1024)  # e.g., 219 KB
+  if num_bytes < 99 * 1024 * 1024:
+    return '%.1f MB' % (num_bytes / 1024.0 / 1024.0)  # e.g., 21.9 MB
+  return '%d MB' % (num_bytes / 1024 / 1024)  # e.g., 100 MB
+
+
+class EZTItem(object):
+  """A class that makes a collection of fields easily accessible in EZT."""
+
+  def __init__(self, **kwargs):
+    """Store all the given key-value pairs as fields of this object."""
+    vars(self).update(kwargs)
+
+  def __repr__(self):
+    fields = ', '.join('%r: %r' % (k, v) for k, v in
+                       sorted(vars(self).items()))
+    return '%s({%s})' % (self.__class__.__name__, fields)
+
+  def __eq__(self, other):
+    return self.__dict__ == other.__dict__
+
+
+def ExpandLabels(page_data):
+  """If page_data has a 'labels' list, expand it into 'label1', etc.
+
+  Args:
+    page_data: Template data which may include a 'labels' field.
+  """
+  label_list = page_data.get('labels', [])
+  if isinstance(label_list, types.StringTypes):
+    label_list = [label.strip() for label in page_data['labels'].split(',')]
+
+  for i in range(len(label_list)):
+    page_data['label%d' % i] = label_list[i]
+  for i in range(len(label_list), framework_constants.MAX_LABELS):
+    page_data['label%d' % i] = ''
+
+
+class TextRun(object):
+  """A fragment of user-entered text that needs to be safely displyed."""
+
+  def __init__(self, content, tag=None, href=None):
+    self.content = content
+    self.tag = tag
+    self.href = href
+    self.title = None
+    self.css_class = None
+
+  def FormatForHTMLEmail(self):
+    """Return a string that can be used in an HTML email body."""
+    if self.tag == 'a' and self.href:
+      return '<a href="%s">%s</a>' % (
+          cgi.escape(self.href, quote=True),
+          cgi.escape(self.content, quote=True))
+
+    return cgi.escape(self.content, quote=True)
diff --git a/framework/test/__init__.py b/framework/test/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/framework/test/__init__.py
diff --git a/framework/test/alerts_test.py b/framework/test/alerts_test.py
new file mode 100644
index 0000000..0c398c1
--- /dev/null
+++ b/framework/test/alerts_test.py
@@ -0,0 +1,43 @@
+# 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
+
+"""Tests for alert display helpers."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+import unittest
+
+import ezt
+
+from framework import alerts
+from testing import fake
+from testing import testing_helpers
+
+
+class AlertsViewTest(unittest.TestCase):
+
+  def testTimestamp(self):
+    """Tests that alerts are only shown when the timestamp is valid."""
+    project = fake.Project(project_name='testproj')
+
+    now = int(time.time())
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/testproj/?updated=10&ts=%s' % now, project=project)
+    alerts_view = alerts.AlertsView(mr)
+    self.assertEqual(10, alerts_view.updated)
+    self.assertEqual(ezt.boolean(True), alerts_view.show)
+
+    now -= 10
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/testproj/?updated=10&ts=%s' % now, project=project)
+    alerts_view = alerts.AlertsView(mr)
+    self.assertEqual(ezt.boolean(False), alerts_view.show)
+
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/testproj/?updated=10', project=project)
+    alerts_view = alerts.AlertsView(mr)
+    self.assertEqual(ezt.boolean(False), alerts_view.show)
diff --git a/framework/test/authdata_test.py b/framework/test/authdata_test.py
new file mode 100644
index 0000000..a0e7313
--- /dev/null
+++ b/framework/test/authdata_test.py
@@ -0,0 +1,55 @@
+# Copyright 2017 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
+
+"""Unit tests for the authdata module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+
+from google.appengine.api import users
+
+from framework import authdata
+from services import service_manager
+from testing import fake
+
+
+class AuthDataTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.user_1 = self.services.user.TestAddUser('test@example.com', 111)
+
+  def testFromRequest(self):
+
+    class FakeUser(object):
+      email = lambda _: self.user_1.email
+
+    with mock.patch.object(users, 'get_current_user',
+                           autospec=True) as mock_get_current_user:
+      mock_get_current_user.return_value = FakeUser()
+      auth = authdata.AuthData.FromRequest(self.cnxn, self.services)
+    self.assertEqual(auth.user_id, 111)
+
+  def testFromEmail(self):
+    auth = authdata.AuthData.FromEmail(
+        self.cnxn, self.user_1.email, self.services)
+    self.assertEqual(auth.user_id, 111)
+    self.assertEqual(auth.user_pb.email, self.user_1.email)
+
+  def testFromuserId(self):
+    auth = authdata.AuthData.FromUserID(self.cnxn, 111, self.services)
+    self.assertEqual(auth.user_id, 111)
+    self.assertEqual(auth.user_pb.email, self.user_1.email)
+
+  def testFromUser(self):
+    auth = authdata.AuthData.FromUser(self.cnxn, self.user_1, self.services)
+    self.assertEqual(auth.user_id, 111)
+    self.assertEqual(auth.user_pb.email, self.user_1.email)
diff --git a/framework/test/banned_test.py b/framework/test/banned_test.py
new file mode 100644
index 0000000..73b9f03
--- /dev/null
+++ b/framework/test/banned_test.py
@@ -0,0 +1,58 @@
+# 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
+
+"""Unittests for monorail.framework.banned."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import webapp2
+
+from framework import banned
+from framework import monorailrequest
+from services import service_manager
+from testing import testing_helpers
+
+
+class BannedTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services()
+
+  def testAssertBasePermission(self):
+    servlet = banned.Banned('request', 'response', services=self.services)
+
+    mr = monorailrequest.MonorailRequest(self.services)
+    mr.auth.user_id = 0  # Anon user cannot see banned page.
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      servlet.AssertBasePermission(mr)
+    self.assertEqual(404, cm.exception.code)
+
+    mr.auth.user_id = 111  # User who is not banned cannot view banned page.
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      servlet.AssertBasePermission(mr)
+    self.assertEqual(404, cm.exception.code)
+
+    # This should not throw exception.
+    mr.auth.user_pb.banned = 'spammer'
+    servlet.AssertBasePermission(mr)
+
+  def testGatherPageData(self):
+    servlet = banned.Banned('request', 'response', services=self.services)
+    self.assertNotEqual(servlet.template, None)
+
+    _request, mr = testing_helpers.GetRequestObjects()
+    page_data = servlet.GatherPageData(mr)
+
+    self.assertFalse(page_data['is_plus_address'])
+    self.assertEqual(None, page_data['currentPageURLEncoded'])
+
+    mr.auth.user_pb.email = 'user+shadystuff@example.com'
+    page_data = servlet.GatherPageData(mr)
+
+    self.assertTrue(page_data['is_plus_address'])
+    self.assertEqual(None, page_data['currentPageURLEncoded'])
diff --git a/framework/test/cloud_tasks_helpers_test.py b/framework/test/cloud_tasks_helpers_test.py
new file mode 100644
index 0000000..09ad2cd
--- /dev/null
+++ b/framework/test/cloud_tasks_helpers_test.py
@@ -0,0 +1,88 @@
+# Copyright 2020 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.
+"""Tests for the cloud tasks helper module."""
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+from google.api_core import exceptions
+
+import mock
+import unittest
+
+from framework import cloud_tasks_helpers
+import settings
+
+
+class CloudTasksHelpersTest(unittest.TestCase):
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def test_create_task(self, get_client_mock):
+
+    queue = 'somequeue'
+    task = {
+        'app_engine_http_request':
+            {
+                'http_method': 'GET',
+                'relative_uri': '/some_url'
+            }
+    }
+    cloud_tasks_helpers.create_task(task, queue=queue)
+
+    get_client_mock().queue_path.assert_called_with(
+        settings.app_id, settings.CLOUD_TASKS_REGION, queue)
+    get_client_mock().create_task.assert_called_once()
+    ((_parent, called_task), _kwargs) = get_client_mock().create_task.call_args
+    self.assertEqual(called_task, task)
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def test_create_task_raises(self, get_client_mock):
+    task = {'app_engine_http_request': {}}
+
+    get_client_mock().create_task.side_effect = exceptions.GoogleAPICallError(
+        'oh no!')
+
+    with self.assertRaises(exceptions.GoogleAPICallError):
+      cloud_tasks_helpers.create_task(task)
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def test_create_task_retries(self, get_client_mock):
+    task = {'app_engine_http_request': {}}
+
+    cloud_tasks_helpers.create_task(task)
+
+    (_args, kwargs) = get_client_mock().create_task.call_args
+    self.assertEqual(kwargs.get('retry'), cloud_tasks_helpers._DEFAULT_RETRY)
+
+  def test_generate_simple_task(self):
+    actual = cloud_tasks_helpers.generate_simple_task(
+        '/alphabet/letters', {
+            'a': 'a',
+            'b': 'b'
+        })
+    expected = {
+        'app_engine_http_request':
+            {
+                'relative_uri': '/alphabet/letters',
+                'body': 'a=a&b=b',
+                'headers': {
+                    'Content-type': 'application/x-www-form-urlencoded'
+                }
+            }
+    }
+    self.assertEqual(actual, expected)
+
+    actual = cloud_tasks_helpers.generate_simple_task('/alphabet/letters', {})
+    expected = {
+        'app_engine_http_request':
+            {
+                'relative_uri': '/alphabet/letters',
+                'body': '',
+                'headers': {
+                    'Content-type': 'application/x-www-form-urlencoded'
+                }
+            }
+    }
+    self.assertEqual(actual, expected)
diff --git a/framework/test/csv_helpers_test.py b/framework/test/csv_helpers_test.py
new file mode 100644
index 0000000..19c89c5
--- /dev/null
+++ b/framework/test/csv_helpers_test.py
@@ -0,0 +1,61 @@
+# 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
+
+"""Unit tests for csv_helpers functions."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import csv_helpers
+
+
+class IssueListCSVFunctionsTest(unittest.TestCase):
+
+  def testRewriteColspec(self):
+    self.assertEqual('', csv_helpers.RewriteColspec(''))
+
+    self.assertEqual('a B c', csv_helpers.RewriteColspec('a B c'))
+
+    self.assertEqual('a Summary AllLabels B Opened OpenedTimestamp c',
+                     csv_helpers.RewriteColspec('a summary B opened c'))
+
+    self.assertEqual('Closed ClosedTimestamp Modified ModifiedTimestamp',
+                     csv_helpers.RewriteColspec('Closed Modified'))
+
+    self.assertEqual('OwnerModified OwnerModifiedTimestamp',
+                     csv_helpers.RewriteColspec('OwnerModified'))
+
+  def testReformatRowsForCSV(self):
+    # TODO(jojwang): write this test
+    pass
+
+  def testEscapeCSV(self):
+    self.assertEqual('', csv_helpers.EscapeCSV(None))
+    self.assertEqual(0, csv_helpers.EscapeCSV(0))
+    self.assertEqual('', csv_helpers.EscapeCSV(''))
+    self.assertEqual('hello', csv_helpers.EscapeCSV('hello'))
+    self.assertEqual('hello', csv_helpers.EscapeCSV('  hello '))
+
+    # Double quotes are escaped as two double quotes.
+    self.assertEqual("say 'hello'", csv_helpers.EscapeCSV("say 'hello'"))
+    self.assertEqual('say ""hello""', csv_helpers.EscapeCSV('say "hello"'))
+
+    # Things that look like formulas are prefixed with a single quote because
+    # some formula functions can have side-effects.  See:
+    # https://www.contextis.com/resources/blog/comma-separated-vulnerabilities/
+    self.assertEqual("'=2+2", csv_helpers.EscapeCSV('=2+2'))
+    self.assertEqual("'=CMD| del *.*", csv_helpers.EscapeCSV('=CMD| del *.*'))
+
+    # Some spreadsheets apparently allow formula cells that start with
+    # plus, minus, and at-signs.
+    self.assertEqual("'+2+2", csv_helpers.EscapeCSV('+2+2'))
+    self.assertEqual("'-2+2", csv_helpers.EscapeCSV('-2+2'))
+    self.assertEqual("'@2+2", csv_helpers.EscapeCSV('@2+2'))
+
+    self.assertEqual(
+      u'division\xc3\xb7sign',
+      csv_helpers.EscapeCSV(u'division\xc3\xb7sign'))
diff --git a/framework/test/deleteusers_test.py b/framework/test/deleteusers_test.py
new file mode 100644
index 0000000..4cadbbd
--- /dev/null
+++ b/framework/test/deleteusers_test.py
@@ -0,0 +1,214 @@
+# Copyright 2019 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
+
+"""Unit tests for deleteusers classes."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import mock
+import unittest
+import urllib
+
+from framework import cloud_tasks_helpers
+from framework import deleteusers
+from framework import framework_constants
+from framework import urls
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+class TestWipeoutSyncCron(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(user=fake.UserService())
+    self.task = deleteusers.WipeoutSyncCron(
+        request=None, response=None, services=self.services)
+    self.user_1 = self.services.user.TestAddUser('user1@example.com', 111)
+    self.user_2 = self.services.user.TestAddUser('user2@example.com', 222)
+    self.user_3 = self.services.user.TestAddUser('user3@example.com', 333)
+
+  def generate_simple_task(self, url, body):
+    return {
+        'app_engine_http_request':
+            {
+                'relative_uri': url,
+                'body': body,
+                'headers': {
+                    'Content-type': 'application/x-www-form-urlencoded'
+                }
+            }
+    }
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def testHandleRequest(self, get_client_mock):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='url/url?batchsize=2',
+        services=self.services)
+    self.task.HandleRequest(mr)
+
+    self.assertEqual(get_client_mock().create_task.call_count, 3)
+
+    expected_task = self.generate_simple_task(
+        urls.SEND_WIPEOUT_USER_LISTS_TASK + '.do', 'limit=2&offset=0')
+    get_client_mock().create_task.assert_any_call(
+        get_client_mock().queue_path(),
+        expected_task,
+        retry=cloud_tasks_helpers._DEFAULT_RETRY)
+
+    expected_task = self.generate_simple_task(
+        urls.SEND_WIPEOUT_USER_LISTS_TASK + '.do', 'limit=2&offset=2')
+    get_client_mock().create_task.assert_any_call(
+        get_client_mock().queue_path(),
+        expected_task,
+        retry=cloud_tasks_helpers._DEFAULT_RETRY)
+
+    expected_task = self.generate_simple_task(
+        urls.DELETE_WIPEOUT_USERS_TASK + '.do', '')
+    get_client_mock().create_task.assert_any_call(
+        get_client_mock().queue_path(),
+        expected_task,
+        retry=cloud_tasks_helpers._DEFAULT_RETRY)
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def testHandleRequest_NoBatchSizeParam(self, get_client_mock):
+    mr = testing_helpers.MakeMonorailRequest(services=self.services)
+    self.task.HandleRequest(mr)
+
+    expected_task = self.generate_simple_task(
+        urls.SEND_WIPEOUT_USER_LISTS_TASK + '.do',
+        'limit={}&offset=0'.format(deleteusers.MAX_BATCH_SIZE))
+    get_client_mock().create_task.assert_any_call(
+        get_client_mock().queue_path(),
+        expected_task,
+        retry=cloud_tasks_helpers._DEFAULT_RETRY)
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def testHandleRequest_NoUsers(self, get_client_mock):
+    mr = testing_helpers.MakeMonorailRequest()
+    self.services.user.users_by_id = {}
+    self.task.HandleRequest(mr)
+
+    calls = get_client_mock().create_task.call_args_list
+    self.assertEqual(len(calls), 0)
+
+
+class SendWipeoutUserListsTaskTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(user=fake.UserService())
+    self.task = deleteusers.SendWipeoutUserListsTask(
+        request=None, response=None, services=self.services)
+    self.task.sendUserLists = mock.Mock()
+    deleteusers.authorize = mock.Mock(return_value='service')
+    self.user_1 = self.services.user.TestAddUser('user1@example.com', 111)
+    self.user_2 = self.services.user.TestAddUser('user2@example.com', 222)
+    self.user_3 = self.services.user.TestAddUser('user3@example.com', 333)
+
+  def testHandleRequest_NoBatchSizeParam(self):
+    mr = testing_helpers.MakeMonorailRequest(path='url/url?limit=2&offset=1')
+    self.task.HandleRequest(mr)
+    deleteusers.authorize.assert_called_once_with()
+    self.task.sendUserLists.assert_called_once_with(
+        'service', [
+            {'id': self.user_2.email},
+            {'id': self.user_3.email}])
+
+  def testHandleRequest_NoLimit(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    self.services.user.users_by_id = {}
+    with self.assertRaisesRegexp(AssertionError, 'Missing param limit'):
+      self.task.HandleRequest(mr)
+
+  def testHandleRequest_NoOffset(self):
+    mr = testing_helpers.MakeMonorailRequest(path='url/url?limit=3')
+    self.services.user.users_by_id = {}
+    with self.assertRaisesRegexp(AssertionError, 'Missing param offset'):
+      self.task.HandleRequest(mr)
+
+  def testHandleRequest_ZeroOffset(self):
+    mr = testing_helpers.MakeMonorailRequest(path='url/url?limit=2&offset=0')
+    self.task.HandleRequest(mr)
+    self.task.sendUserLists.assert_called_once_with(
+        'service', [
+            {'id': self.user_1.email},
+            {'id': self.user_2.email}])
+
+
+class DeleteWipeoutUsersTaskTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services()
+    deleteusers.authorize = mock.Mock(return_value='service')
+    self.task = deleteusers.DeleteWipeoutUsersTask(
+        request=None, response=None, services=self.services)
+    deleted_users = [
+        {'id': 'user1@gmail.com'}, {'id': 'user2@gmail.com'},
+        {'id': 'user3@gmail.com'}, {'id': 'user4@gmail.com'}]
+    self.task.fetchDeletedUsers = mock.Mock(return_value=deleted_users)
+
+  def generate_simple_task(self, url, body):
+    return {
+        'app_engine_http_request':
+            {
+                'relative_uri': url,
+                'body': body,
+                'headers': {
+                    'Content-type': 'application/x-www-form-urlencoded'
+                }
+            }
+    }
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def testHandleRequest(self, get_client_mock):
+    mr = testing_helpers.MakeMonorailRequest(path='url/url?limit=3')
+    self.task.HandleRequest(mr)
+
+    deleteusers.authorize.assert_called_once_with()
+    self.task.fetchDeletedUsers.assert_called_once_with('service')
+    ((_app_id, _region, queue),
+     _kwargs) = get_client_mock().queue_path.call_args
+    self.assertEqual(queue, framework_constants.QUEUE_DELETE_USERS)
+
+    self.assertEqual(get_client_mock().create_task.call_count, 2)
+
+    query = urllib.urlencode(
+        {'emails': 'user1@gmail.com,user2@gmail.com,user3@gmail.com'})
+    expected_task = self.generate_simple_task(
+        urls.DELETE_USERS_TASK + '.do', query)
+
+    get_client_mock().create_task.assert_any_call(
+        get_client_mock().queue_path(),
+        expected_task,
+        retry=cloud_tasks_helpers._DEFAULT_RETRY)
+
+    query = urllib.urlencode({'emails': 'user4@gmail.com'})
+    expected_task = self.generate_simple_task(
+        urls.DELETE_USERS_TASK + '.do', query)
+
+    get_client_mock().create_task.assert_any_call(
+        get_client_mock().queue_path(),
+        expected_task,
+        retry=cloud_tasks_helpers._DEFAULT_RETRY)
+
+  @mock.patch('framework.cloud_tasks_helpers._get_client')
+  def testHandleRequest_DefaultMax(self, get_client_mock):
+    mr = testing_helpers.MakeMonorailRequest(path='url/url')
+    self.task.HandleRequest(mr)
+
+    deleteusers.authorize.assert_called_once_with()
+    self.task.fetchDeletedUsers.assert_called_once_with('service')
+    self.assertEqual(get_client_mock().create_task.call_count, 1)
+
+    emails = 'user1@gmail.com,user2@gmail.com,user3@gmail.com,user4@gmail.com'
+    query = urllib.urlencode({'emails': emails})
+    expected_task = self.generate_simple_task(
+        urls.DELETE_USERS_TASK + '.do', query)
+
+    get_client_mock().create_task.assert_any_call(
+        get_client_mock().queue_path(),
+        expected_task,
+        retry=cloud_tasks_helpers._DEFAULT_RETRY)
diff --git a/framework/test/emailfmt_test.py b/framework/test/emailfmt_test.py
new file mode 100644
index 0000000..dd7cca3
--- /dev/null
+++ b/framework/test/emailfmt_test.py
@@ -0,0 +1,821 @@
+# 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
+
+"""Tests for monorail.framework.emailfmt."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+
+from google.appengine.ext import testbed
+
+import settings
+from framework import emailfmt
+from framework import framework_views
+from proto import project_pb2
+from testing import testing_helpers
+
+from google.appengine.api import apiproxy_stub_map
+
+
+class EmailFmtTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_datastore_v3_stub()
+    self.testbed.init_memcache_stub()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  def testValidateReferencesHeader(self):
+    project = project_pb2.Project()
+    project.project_name = 'open-open'
+    subject = 'slipped disk'
+    expected = emailfmt.MakeMessageID(
+        'jrobbins@gmail.com', subject,
+        '%s@%s' % (project.project_name, emailfmt.MailDomain()))
+    self.assertTrue(
+        emailfmt.ValidateReferencesHeader(
+            expected, project, 'jrobbins@gmail.com', subject))
+
+    self.assertFalse(
+        emailfmt.ValidateReferencesHeader(
+            expected, project, 'jrobbins@gmail.com', 'something else'))
+
+    self.assertFalse(
+        emailfmt.ValidateReferencesHeader(
+            expected, project, 'someoneelse@gmail.com', subject))
+
+    project.project_name = 'other-project'
+    self.assertFalse(
+        emailfmt.ValidateReferencesHeader(
+            expected, project, 'jrobbins@gmail.com', subject))
+
+  def testParseEmailMessage(self):
+    msg = testing_helpers.MakeMessage(testing_helpers.HEADER_LINES, 'awesome!')
+
+    (from_addr, to_addrs, cc_addrs, references, incident_id,
+     subject, body) = emailfmt.ParseEmailMessage(msg)
+
+    self.assertEqual('user@example.com', from_addr)
+    self.assertEqual(['proj@monorail.example.com'], to_addrs)
+    self.assertEqual(['ningerso@chromium.org'], cc_addrs)
+    # Expected msg-id was generated from a previous known-good test run.
+    self.assertEqual(['<0=969704940193871313=13442892928193434663='
+                      'proj@monorail.example.com>'],
+                     references)
+    self.assertEqual('', incident_id)
+    self.assertEqual('Issue 123 in proj: broken link', subject)
+    self.assertEqual('awesome!', body)
+
+    references_header = ('References', '<1234@foo.com> <5678@bar.com>')
+    msg = testing_helpers.MakeMessage(
+        testing_helpers.HEADER_LINES + [references_header], 'awesome!')
+    (from_addr, to_addrs, cc_addrs, references, incident_id, subject,
+     body) = emailfmt.ParseEmailMessage(msg)
+    self.assertItemsEqual(
+        ['<5678@bar.com>',
+         '<0=969704940193871313=13442892928193434663='
+         'proj@monorail.example.com>',
+         '<1234@foo.com>'],
+        references)
+
+  def testParseEmailMessage_Bulk(self):
+    for precedence in ['Bulk', 'Junk']:
+      msg = testing_helpers.MakeMessage(
+          testing_helpers.HEADER_LINES + [('Precedence', precedence)],
+          'I am on vacation!')
+
+      (from_addr, to_addrs, cc_addrs, references, incident_id, subject,
+       body) = emailfmt.ParseEmailMessage(msg)
+
+      self.assertEqual('', from_addr)
+      self.assertEqual([], to_addrs)
+      self.assertEqual([], cc_addrs)
+      self.assertEqual('', references)
+      self.assertEqual('', incident_id)
+      self.assertEqual('', subject)
+      self.assertEqual('', body)
+
+  def testExtractAddrs(self):
+    header_val = ''
+    self.assertEqual(
+        [], emailfmt._ExtractAddrs(header_val))
+
+    header_val = 'J. Robbins <a@b.com>, c@d.com,\n Nick "Name" Dude <e@f.com>'
+    self.assertEqual(
+        ['a@b.com', 'c@d.com', 'e@f.com'],
+        emailfmt._ExtractAddrs(header_val))
+
+    header_val = ('hot: J. O\'Robbins <a@b.com>; '
+                  'cool: "friendly" <e.g-h@i-j.k-L.com>')
+    self.assertEqual(
+        ['a@b.com', 'e.g-h@i-j.k-L.com'],
+        emailfmt._ExtractAddrs(header_val))
+
+  def CheckIdentifiedValues(
+      self, project_addr, subject, expected_project_name, expected_local_id,
+      expected_verb=None, expected_label=None):
+    """Testing helper function to check 3 results against expected values."""
+    project_name, verb, label = emailfmt.IdentifyProjectVerbAndLabel(
+        project_addr)
+    local_id = emailfmt.IdentifyIssue(project_name, subject)
+    self.assertEqual(expected_project_name, project_name)
+    self.assertEqual(expected_local_id, local_id)
+    self.assertEqual(expected_verb, verb)
+    self.assertEqual(expected_label, label)
+
+  def testIdentifyProjectAndIssues_Normal(self):
+    """Parse normal issue notification subject lines."""
+    self.CheckIdentifiedValues(
+        'proj@monorail.example.com',
+        'Issue 123 in proj: the dogs wont eat the dogfood',
+        'proj', 123)
+
+    self.CheckIdentifiedValues(
+        'Proj@MonoRail.Example.Com',
+        'Issue 123 in proj: the dogs wont eat the dogfood',
+        'proj', 123)
+
+    self.CheckIdentifiedValues(
+        'proj-4-u@test-example3.com',
+        'Issue 123 in proj-4-u: this one goes to: 11',
+        'proj-4-u', 123)
+
+    self.CheckIdentifiedValues(
+        'night@monorail.example.com',
+        'Issue 451 in day: something is fishy',
+        'night', None)
+
+  def testIdentifyProjectAndIssues_Compact(self):
+    """Parse compact subject lines."""
+    self.CheckIdentifiedValues(
+        'proj@monorail.example.com',
+        'proj:123: the dogs wont eat the dogfood',
+        'proj', 123)
+
+    self.CheckIdentifiedValues(
+        'Proj@MonoRail.Example.Com',
+        'proj:123: the dogs wont eat the dogfood',
+        'proj', 123)
+
+    self.CheckIdentifiedValues(
+        'proj-4-u@test-example3.com',
+        'proj-4-u:123: this one goes to: 11',
+        'proj-4-u', 123)
+
+    self.CheckIdentifiedValues(
+        'night@monorail.example.com',
+        'day:451: something is fishy',
+        'night', None)
+
+  def testIdentifyProjectAndIssues_NotAMatch(self):
+    """These subject lines do not match the ones we send."""
+    self.CheckIdentifiedValues(
+        'no_reply@chromium.org',
+        'Issue 234 in project foo: ignore this one',
+        None, None)
+
+    self.CheckIdentifiedValues(
+        'no_reply@chromium.org',
+        'foo-234: ignore this one',
+        None, None)
+
+  def testStripSubjectPrefixes(self):
+    self.assertEqual(
+        '',
+        emailfmt._StripSubjectPrefixes(''))
+
+    self.assertEqual(
+        'this is it',
+        emailfmt._StripSubjectPrefixes('this is it'))
+
+    self.assertEqual(
+        'this is it',
+        emailfmt._StripSubjectPrefixes('re: this is it'))
+
+    self.assertEqual(
+        'this is it',
+        emailfmt._StripSubjectPrefixes('Re: Fwd: aw:this is it'))
+
+    self.assertEqual(
+        'This - . IS it',
+        emailfmt._StripSubjectPrefixes('This - . IS it'))
+
+
+class MailDomainTest(unittest.TestCase):
+
+  def testTrivialCases(self):
+    self.assertEqual(
+        'testbed-test.appspotmail.com',
+        emailfmt.MailDomain())
+
+
+class NoReplyAddressTest(unittest.TestCase):
+
+  def testNoCommenter(self):
+    self.assertEqual(
+        'no_reply@testbed-test.appspotmail.com',
+        emailfmt.NoReplyAddress())
+
+  def testWithCommenter(self):
+    commenter_view = framework_views.StuffUserView(
+        111, 'user@example.com', True)
+    self.assertEqual(
+        'user via monorail '
+        '<no_reply+v2.111@testbed-test.appspotmail.com>',
+        emailfmt.NoReplyAddress(
+            commenter_view=commenter_view, reveal_addr=True))
+
+  def testObscuredCommenter(self):
+    commenter_view = framework_views.StuffUserView(
+        111, 'user@example.com', True)
+    self.assertEqual(
+        u'u\u2026 via monorail '
+        '<no_reply+v2.111@testbed-test.appspotmail.com>',
+        emailfmt.NoReplyAddress(
+            commenter_view=commenter_view, reveal_addr=False))
+
+
+class FormatFromAddrTest(unittest.TestCase):
+
+  def setUp(self):
+    self.project = project_pb2.Project(project_name='monorail')
+    self.old_send_email_as_format = settings.send_email_as_format
+    settings.send_email_as_format = 'monorail@%(domain)s'
+    self.old_send_noreply_email_as_format = (
+        settings.send_noreply_email_as_format)
+    settings.send_noreply_email_as_format = 'monorail+noreply@%(domain)s'
+
+  def tearDown(self):
+    self.old_send_email_as_format = settings.send_email_as_format
+    self.old_send_noreply_email_as_format = (
+        settings.send_noreply_email_as_format)
+
+  def testNoCommenter(self):
+    self.assertEqual('monorail@chromium.org',
+                     emailfmt.FormatFromAddr(self.project))
+
+  @mock.patch('settings.branded_domains',
+              {'monorail': 'bugs.branded.com', '*': 'bugs.chromium.org'})
+  def testNoCommenter_Branded(self):
+    self.assertEqual('monorail@branded.com',
+                     emailfmt.FormatFromAddr(self.project))
+
+  def testNoCommenterWithNoReply(self):
+    self.assertEqual('monorail+noreply@chromium.org',
+                     emailfmt.FormatFromAddr(self.project, can_reply_to=False))
+
+  @mock.patch('settings.branded_domains',
+              {'monorail': 'bugs.branded.com', '*': 'bugs.chromium.org'})
+  def testNoCommenterWithNoReply_Branded(self):
+    self.assertEqual('monorail+noreply@branded.com',
+                     emailfmt.FormatFromAddr(self.project, can_reply_to=False))
+
+  def testWithCommenter(self):
+    commenter_view = framework_views.StuffUserView(
+        111, 'user@example.com', True)
+    self.assertEqual(
+        u'user via monorail <monorail+v2.111@chromium.org>',
+        emailfmt.FormatFromAddr(
+            self.project, commenter_view=commenter_view, reveal_addr=True))
+
+  @mock.patch('settings.branded_domains',
+              {'monorail': 'bugs.branded.com', '*': 'bugs.chromium.org'})
+  def testWithCommenter_Branded(self):
+    commenter_view = framework_views.StuffUserView(
+        111, 'user@example.com', True)
+    self.assertEqual(
+        u'user via monorail <monorail+v2.111@branded.com>',
+        emailfmt.FormatFromAddr(
+            self.project, commenter_view=commenter_view, reveal_addr=True))
+
+  def testObscuredCommenter(self):
+    commenter_view = framework_views.StuffUserView(
+        111, 'user@example.com', True)
+    self.assertEqual(
+        u'u\u2026 via monorail <monorail+v2.111@chromium.org>',
+        emailfmt.FormatFromAddr(
+            self.project, commenter_view=commenter_view, reveal_addr=False))
+
+  def testServiceAccountCommenter(self):
+    johndoe_bot = '123456789@developer.gserviceaccount.com'
+    commenter_view = framework_views.StuffUserView(
+        111, johndoe_bot, True)
+    self.assertEqual(
+        ('johndoe via monorail <monorail+v2.111@chromium.org>'),
+        emailfmt.FormatFromAddr(
+            self.project, commenter_view=commenter_view, reveal_addr=False))
+
+
+class NormalizeHeaderWhitespaceTest(unittest.TestCase):
+
+  def testTrivialCases(self):
+    self.assertEqual(
+        '',
+        emailfmt.NormalizeHeader(''))
+
+    self.assertEqual(
+        '',
+        emailfmt.NormalizeHeader(' \t\n'))
+
+    self.assertEqual(
+        'a',
+        emailfmt.NormalizeHeader('a'))
+
+    self.assertEqual(
+        'a b',
+        emailfmt.NormalizeHeader(' a  b '))
+
+  def testLongSummary(self):
+    big_string = 'x' * 500
+    self.assertEqual(
+        big_string[:emailfmt.MAX_HEADER_CHARS_CONSIDERED],
+        emailfmt.NormalizeHeader(big_string))
+
+    big_string = 'x y ' * 500
+    self.assertEqual(
+        big_string[:emailfmt.MAX_HEADER_CHARS_CONSIDERED],
+        emailfmt.NormalizeHeader(big_string))
+
+    big_string = 'x   ' * 100
+    self.assertEqual(
+        'x ' * 99 + 'x',
+        emailfmt.NormalizeHeader(big_string))
+
+  def testNormalCase(self):
+    self.assertEqual(
+        '[a] b: c d',
+        emailfmt.NormalizeHeader('[a]  b:\tc\n\td'))
+
+
+class MakeMessageIDTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_datastore_v3_stub()
+    self.testbed.init_memcache_stub()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  def testMakeMessageIDTest(self):
+    message_id = emailfmt.MakeMessageID(
+        'to@to.com', 'subject', 'from@from.com')
+    self.assertTrue(message_id.startswith('<0='))
+    self.assertEqual('testbed-test.appspotmail.com>',
+                     message_id.split('@')[-1])
+
+    settings.mail_domain = None
+    message_id = emailfmt.MakeMessageID(
+        'to@to.com', 'subject', 'from@from.com')
+    self.assertTrue(message_id.startswith('<0='))
+    self.assertEqual('testbed-test.appspotmail.com>',
+                     message_id.split('@')[-1])
+
+    message_id = emailfmt.MakeMessageID(
+        'to@to.com', 'subject', 'from@from.com')
+    self.assertTrue(message_id.startswith('<0='))
+    self.assertEqual('testbed-test.appspotmail.com>',
+                     message_id.split('@')[-1])
+
+    message_id_ws_1 = emailfmt.MakeMessageID(
+        'to@to.com',
+        'this is a very long subject that is sure to be wordwrapped by gmail',
+        'from@from.com')
+    message_id_ws_2 = emailfmt.MakeMessageID(
+        'to@to.com',
+        'this is a  very   long subject   that \n\tis sure to be '
+        'wordwrapped \t\tby gmail',
+        'from@from.com')
+    self.assertEqual(message_id_ws_1, message_id_ws_2)
+
+
+class GetReferencesTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_datastore_v3_stub()
+    self.testbed.init_memcache_stub()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  def testNotPartOfThread(self):
+    refs = emailfmt.GetReferences(
+        'a@a.com', 'hi', None, emailfmt.NoReplyAddress())
+    self.assertEqual(0, len(refs))
+
+  def testAnywhereInThread(self):
+    refs = emailfmt.GetReferences(
+        'a@a.com', 'hi', 0, emailfmt.NoReplyAddress())
+    self.assertTrue(len(refs))
+    self.assertTrue(refs.startswith('<0='))
+
+
+class StripQuotedTextTest(unittest.TestCase):
+
+  def CheckExpected(self, expected_output, test_input):
+    actual_output = emailfmt.StripQuotedText(test_input)
+    self.assertEqual(expected_output, actual_output)
+
+  def testAllNewText(self):
+    self.CheckExpected('', '')
+    self.CheckExpected('', '\n')
+    self.CheckExpected('', '\n\n')
+    self.CheckExpected('new', 'new')
+    self.CheckExpected('new', '\nnew\n')
+    self.CheckExpected('new\ntext', '\nnew\ntext\n')
+    self.CheckExpected('new\n\ntext', '\nnew\n\ntext\n')
+
+  def testQuotedLines(self):
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '\n'
+         '> something you said\n'
+         '> that took two lines'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '\n'
+         '> something you said\n'
+         '> that took two lines'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('> something you said\n'
+         '> that took two lines\n'
+         'new\n'
+         'text\n'
+         '\n'))
+
+    self.CheckExpected(
+        ('newtext'),
+        ('> something you said\n'
+         '> that took two lines\n'
+         'newtext'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         'On Mon, Jan 1, 2023, So-and-so <so@and-so.com> Wrote:\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         'On Mon, Jan 1, 2023, So-and-so <so@and-so.com> Wrote:\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         'On Mon, Jan 1, 2023, user@example.com via Monorail\n'
+         '<monorail@chromium.com> Wrote:\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         'On Jan 14, 2016 6:19 AM, "user@example.com via Monorail" <\n'
+         'monorail@chromium.com> Wrote:\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         'On Jan 14, 2016 6:19 AM, "user@example.com via Monorail" <\n'
+         'monorail@monorail-prod.appspotmail.com> wrote:\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         'On Mon, Jan 1, 2023, So-and-so so@and-so.com wrote:\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         'On Wed, Sep 8, 2010 at 6:56 PM, So =AND= <so@gmail.com>wrote:\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         'On Mon, Jan 1, 2023, So-and-so <so@and-so.com> Wrote:\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         'project-name@testbed-test.appspotmail.com wrote:\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         'project-name@testbed-test.appspotmail.com a \xc3\xa9crit :\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         'project.domain.com@testbed-test.appspotmail.com a \xc3\xa9crit :\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         '2023/01/4 <so@and-so.com>\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         '\n'
+         'text'),
+        ('new\n'
+         '2023/01/4 <so-and@so.com>\n'
+         '\n'
+         '> something you said\n'
+         '> > in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+  def testBoundaryLines(self):
+
+    self.CheckExpected(
+        ('new'),
+        ('new\n'
+         '---- forwarded message ======\n'
+         '\n'
+         'something you said\n'
+         '> in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new'),
+        ('new\n'
+         '-----Original Message-----\n'
+         '\n'
+         'something you said\n'
+         '> in response to some other junk\n'
+         '\n'
+         'text\n'))
+
+    self.CheckExpected(
+        ('new'),
+        ('new\n'
+         '\n'
+         'Updates:\n'
+         '\tStatus: Fixed\n'
+         '\n'
+         'notification text\n'))
+
+    self.CheckExpected(
+        ('new'),
+        ('new\n'
+         '\n'
+         'Comment #1 on issue 9 by username: Is there ...'
+         'notification text\n'))
+
+  def testSignatures(self):
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '-- \n'
+         'Name\n'
+         'phone\n'
+         'funny quote, or legal disclaimers\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '--\n'
+         'Name\n'
+         'phone\n'
+         'funny quote, or legal disclaimers\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '--\n'
+         'Name\n'
+         'ginormous signature\n'
+         'phone\n'
+         'address\n'
+         'address\n'
+         'address\n'
+         'homepage\n'
+         'social network A\n'
+         'social network B\n'
+         'social network C\n'
+         'funny quote\n'
+         '4 lines about why email should be short\n'
+         'legal disclaimers\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '_______________\n'
+         'Name\n'
+         'phone\n'
+         'funny quote, or legal disclaimers\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '\n'
+         'Thanks,\n'
+         'Name\n'
+         '\n'
+         '_______________\n'
+         'Name\n'
+         'phone\n'
+         'funny quote, or legal disclaimers\n'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '\n'
+         'Thanks,\n'
+         'Name'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '\n'
+         'Cheers,\n'
+         'Name'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '\n'
+         'Regards\n'
+         'Name'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '\n'
+         'best regards'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '\n'
+         'THX'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '\n'
+         'Thank you,\n'
+         'Name'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '\n'
+         'Sent from my iPhone'))
+
+    self.CheckExpected(
+        ('new\n'
+         'text'),
+        ('new\n'
+         'text\n'
+         '\n'
+         'Sent from my iPod'))
diff --git a/framework/test/exceptions_test.py b/framework/test/exceptions_test.py
new file mode 100644
index 0000000..8fe2295
--- /dev/null
+++ b/framework/test/exceptions_test.py
@@ -0,0 +1,64 @@
+# Copyright 2020 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.
+"""Unittest for the exceptions module."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import exceptions
+from framework import permissions
+
+
+class ErrorsManagerTest(unittest.TestCase):
+
+  def testRaiseIfErrors_Errors(self):
+    """We raise the given exception if there are errors."""
+    err_aggregator = exceptions.ErrorAggregator(exceptions.InputException)
+
+    err_aggregator.AddErrorMessage('The chickens are missing.')
+    err_aggregator.AddErrorMessage('The foxes are free.')
+    with self.assertRaisesRegexp(
+        exceptions.InputException,
+        'The chickens are missing.\nThe foxes are free.'):
+      err_aggregator.RaiseIfErrors()
+
+  def testErrorsManager_NoErrors(self):
+    """ We don't raise exceptions if there are not errors. """
+    err_aggregator = exceptions.ErrorAggregator(exceptions.InputException)
+    err_aggregator.RaiseIfErrors()
+
+  def testWithinContext_ExceptionPassedIn(self):
+    """We do not suppress exceptions raised within wrapped code."""
+
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 'We should raise this'):
+      with exceptions.ErrorAggregator(exceptions.InputException) as errors:
+        errors.AddErrorMessage('We should ignore this error.')
+        raise exceptions.InputException('We should raise this')
+
+  def testWithinContext_NoExceptionPassedIn(self):
+    """We raise an exception for any errors if no exceptions are passed in."""
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 'We can raise this now.'):
+      with exceptions.ErrorAggregator(exceptions.InputException) as errors:
+        errors.AddErrorMessage('We can raise this now.')
+        return True
+
+  def testAddErrorMessage(self):
+    """We properly handle string formatting when needed."""
+    err_aggregator = exceptions.ErrorAggregator(exceptions.InputException)
+    err_aggregator.AddErrorMessage('No args')
+    err_aggregator.AddErrorMessage('No args2', 'unused', unused2=1)
+    err_aggregator.AddErrorMessage('{}', 'One arg')
+    err_aggregator.AddErrorMessage('{}, {two}', '1', two='2')
+
+    # Verify exceptions formatting a message don't clear the earlier messages.
+    with self.assertRaises(IndexError):
+      err_aggregator.AddErrorMessage('{}')
+
+    expected = ['No args', 'No args2', 'One arg', '1, 2']
+    self.assertEqual(err_aggregator.error_messages, expected)
diff --git a/framework/test/filecontent_test.py b/framework/test/filecontent_test.py
new file mode 100644
index 0000000..4843b47
--- /dev/null
+++ b/framework/test/filecontent_test.py
@@ -0,0 +1,188 @@
+# 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
+
+"""Tests for the filecontent module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import filecontent
+
+
+class MimeTest(unittest.TestCase):
+  """Test methods for the mime module."""
+
+  _TEST_EXTENSIONS_TO_CTYPES = {
+      'html': 'text/plain',
+      'htm': 'text/plain',
+      'jpg': 'image/jpeg',
+      'jpeg': 'image/jpeg',
+      'pdf': 'application/pdf',
+  }
+
+  _CODE_EXTENSIONS = [
+      'py', 'java', 'mf', 'bat', 'sh', 'php', 'vb', 'pl', 'sql',
+      'patch', 'diff',
+  ]
+
+  def testCommonExtensions(self):
+    """Tests some common extensions for their expected content types."""
+    for ext, ctype in self._TEST_EXTENSIONS_TO_CTYPES.items():
+      self.assertEqual(
+          filecontent.GuessContentTypeFromFilename('file.%s' % ext),
+          ctype)
+
+  def testCaseDoesNotMatter(self):
+    """Ensure that case (upper/lower) of extension does not matter."""
+    for ext, ctype in self._TEST_EXTENSIONS_TO_CTYPES.items():
+      ext = ext.upper()
+      self.assertEqual(
+          filecontent.GuessContentTypeFromFilename('file.%s' % ext),
+          ctype)
+
+    for ext in self._CODE_EXTENSIONS:
+      ext = ext.upper()
+      self.assertEqual(
+          filecontent.GuessContentTypeFromFilename('code.%s' % ext),
+          'text/plain')
+
+  def testCodeIsText(self):
+    """Ensure that code extensions are text/plain."""
+    for ext in self._CODE_EXTENSIONS:
+      self.assertEqual(
+          filecontent.GuessContentTypeFromFilename('code.%s' % ext),
+          'text/plain')
+
+  def testNoExtensionIsText(self):
+    """Ensure that no extension indicates text/plain."""
+    self.assertEqual(
+        filecontent.GuessContentTypeFromFilename('noextension'),
+        'text/plain')
+
+  def testUnknownExtension(self):
+    """Ensure that an obviously unknown extension returns is binary."""
+    self.assertEqual(
+        filecontent.GuessContentTypeFromFilename('f.madeupextension'),
+        'application/octet-stream')
+
+  def testNoShockwaveFlash(self):
+    """Ensure that Shockwave files will NOT be served w/ that content type."""
+    self.assertEqual(
+        filecontent.GuessContentTypeFromFilename('bad.swf'),
+        'application/octet-stream')
+
+
+class DecodeFileContentsTest(unittest.TestCase):
+
+  def IsBinary(self, contents):
+    _contents, is_binary, _is_long = (
+        filecontent.DecodeFileContents(contents))
+    return is_binary
+
+  def testFileIsBinaryEmpty(self):
+    self.assertFalse(self.IsBinary(''))
+
+  def testFileIsBinaryShortText(self):
+    self.assertFalse(self.IsBinary('This is some plain text.'))
+
+  def testLineLengthDetection(self):
+    unicode_str = (
+        u'Some non-ascii chars - '
+        u'\xa2\xfa\xb6\xe7\xfc\xea\xd0\xf4\xe6\xf0\xce\xf6\xbe')
+    short_line = unicode_str.encode('iso-8859-1')
+    long_line = (unicode_str * 100)[:filecontent._MAX_SOURCE_LINE_LEN_LOWER+1]
+    long_line = long_line.encode('iso-8859-1')
+
+    lines = [short_line] * 100
+    lines.append(long_line)
+
+    # High lower ratio - text
+    self.assertFalse(self.IsBinary('\n'.join(lines)))
+
+    lines.extend([long_line] * 99)
+
+    # 50/50 lower/upper ratio - binary
+    self.assertTrue(self.IsBinary('\n'.join(lines)))
+
+    # Single line too long - binary
+    lines = [short_line] * 100
+    lines.append(short_line * 100)  # Very long line
+    self.assertTrue(self.IsBinary('\n'.join(lines)))
+
+  def testFileIsBinaryLongText(self):
+    self.assertFalse(self.IsBinary('This is plain text. \n' * 100))
+    # long utf-8 lines are OK
+    self.assertFalse(self.IsBinary('This one long line. ' * 100))
+
+  def testFileIsBinaryLongBinary(self):
+    bin_string = ''.join([chr(c) for c in range(122, 252)])
+    self.assertTrue(self.IsBinary(bin_string * 100))
+
+  def testFileIsTextByPath(self):
+    bin_string = ''.join([chr(c) for c in range(122, 252)] * 100)
+    unicode_str = (
+        u'Some non-ascii chars - '
+        u'\xa2\xfa\xb6\xe7\xfc\xea\xd0\xf4\xe6\xf0\xce\xf6\xbe')
+    long_line = (unicode_str * 100)[:filecontent._MAX_SOURCE_LINE_LEN_LOWER+1]
+    long_line = long_line.encode('iso-8859-1')
+
+    for contents in [bin_string, long_line]:
+      self.assertTrue(filecontent.DecodeFileContents(contents, path=None)[1])
+      self.assertTrue(filecontent.DecodeFileContents(contents, path='')[1])
+      self.assertTrue(filecontent.DecodeFileContents(contents, path='foo')[1])
+      self.assertTrue(
+          filecontent.DecodeFileContents(contents, path='foo.bin')[1])
+      self.assertTrue(
+          filecontent.DecodeFileContents(contents, path='foo.zzz')[1])
+      for path in ['a/b/Makefile.in', 'README', 'a/file.js', 'b.txt']:
+        self.assertFalse(
+            filecontent.DecodeFileContents(contents, path=path)[1])
+
+  def testFileIsBinaryByCommonExtensions(self):
+    contents = 'this is not examined'
+    self.assertTrue(filecontent.DecodeFileContents(
+        contents, path='junk.zip')[1])
+    self.assertTrue(filecontent.DecodeFileContents(
+        contents, path='JUNK.ZIP')[1])
+    self.assertTrue(filecontent.DecodeFileContents(
+        contents, path='/build/HelloWorld.o')[1])
+    self.assertTrue(filecontent.DecodeFileContents(
+        contents, path='/build/Hello.class')[1])
+    self.assertTrue(filecontent.DecodeFileContents(
+        contents, path='/trunk/libs.old/swing.jar')[1])
+
+    self.assertFalse(filecontent.DecodeFileContents(
+        contents, path='HelloWorld.cc')[1])
+    self.assertFalse(filecontent.DecodeFileContents(
+        contents, path='Hello.java')[1])
+    self.assertFalse(filecontent.DecodeFileContents(
+        contents, path='README')[1])
+    self.assertFalse(filecontent.DecodeFileContents(
+        contents, path='READ.ME')[1])
+    self.assertFalse(filecontent.DecodeFileContents(
+        contents, path='README.txt')[1])
+    self.assertFalse(filecontent.DecodeFileContents(
+        contents, path='README.TXT')[1])
+    self.assertFalse(filecontent.DecodeFileContents(
+        contents, path='/trunk/src/com/monorail/Hello.java')[1])
+    self.assertFalse(filecontent.DecodeFileContents(
+        contents, path='/branches/1.2/resource.el')[1])
+    self.assertFalse(filecontent.DecodeFileContents(
+        contents, path='/wiki/PageName.wiki')[1])
+
+  def testUnreasonablyLongFile(self):
+    contents = '\n' * (filecontent.SOURCE_FILE_MAX_LINES + 2)
+    _contents, is_binary, is_long = filecontent.DecodeFileContents(
+        contents)
+    self.assertFalse(is_binary)
+    self.assertTrue(is_long)
+
+    contents = '\n' * 100
+    _contents, is_binary, is_long = filecontent.DecodeFileContents(
+        contents)
+    self.assertFalse(is_binary)
+    self.assertFalse(is_long)
diff --git a/framework/test/framework_bizobj_test.py b/framework/test/framework_bizobj_test.py
new file mode 100644
index 0000000..131ebb5
--- /dev/null
+++ b/framework/test/framework_bizobj_test.py
@@ -0,0 +1,696 @@
+# 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
+
+"""Tests for monorail.framework.framework_bizobj."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+import mock
+
+import settings
+from framework import authdata
+from framework import framework_bizobj
+from framework import framework_constants
+from proto import project_pb2
+from proto import tracker_pb2
+from proto import user_pb2
+from services import service_manager
+from services import client_config_svc
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+
+
+class CreateUserDisplayNamesAndEmailsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+
+    self.user_1 = self.services.user.TestAddUser(
+        'user_1@test.com', 111, obscure_email=True)
+    self.user_2 = self.services.user.TestAddUser(
+        'user_2@test.com', 222, obscure_email=False)
+    self.user_3 = self.services.user.TestAddUser(
+        'user_3@test.com', 333, obscure_email=True)
+    self.user_4 = self.services.user.TestAddUser(
+        'user_4@test.com', 444, obscure_email=False)
+    self.service_account = self.services.user.TestAddUser(
+        'service@account.com', 999, obscure_email=True)
+    self.user_deleted = self.services.user.TestAddUser(
+        '', framework_constants.DELETED_USER_ID)
+    self.requester = self.services.user.TestAddUser('user_5@test.com', 555)
+    self.user_auth = authdata.AuthData(
+        user_id=self.requester.user_id, email=self.requester.email)
+    self.project = self.services.project.TestAddProject(
+        'proj',
+        project_id=789,
+        owner_ids=[self.user_1.user_id],
+        committer_ids=[self.user_2.user_id, self.service_account.user_id])
+
+  @mock.patch('services.client_config_svc.GetServiceAccountMap')
+  def testUserCreateDisplayNamesAndEmails_NonProjectMembers(
+      self, fake_account_map):
+    fake_account_map.return_value = {'service@account.com': 'Service'}
+    users = [self.user_1, self.user_2, self.user_3, self.user_4,
+             self.service_account, self.user_deleted]
+    (display_names_by_id,
+     display_emails_by_id) = framework_bizobj.CreateUserDisplayNamesAndEmails(
+         self.cnxn, self.services, self.user_auth, users)
+    expected_display_names = {
+        self.user_1.user_id: testing_helpers.ObscuredEmail(self.user_1.email),
+        self.user_2.user_id: self.user_2.email,
+        self.user_3.user_id: testing_helpers.ObscuredEmail(self.user_3.email),
+        self.user_4.user_id: self.user_4.email,
+        self.service_account.user_id: 'Service',
+        self.user_deleted.user_id: framework_constants.DELETED_USER_NAME}
+    expected_display_emails = {
+        self.user_1.user_id:
+            testing_helpers.ObscuredEmail(self.user_1.email),
+        self.user_2.user_id:
+            self.user_2.email,
+        self.user_3.user_id:
+            testing_helpers.ObscuredEmail(self.user_3.email),
+        self.user_4.user_id:
+            self.user_4.email,
+        self.service_account.user_id:
+            testing_helpers.ObscuredEmail(self.service_account.email),
+        self.user_deleted.user_id: '',
+    }
+    self.assertEqual(display_names_by_id, expected_display_names)
+    self.assertEqual(display_emails_by_id, expected_display_emails)
+
+  @mock.patch('services.client_config_svc.GetServiceAccountMap')
+  def testUserCreateDisplayNamesAndEmails_ProjectMember(self, fake_account_map):
+    fake_account_map.return_value = {'service@account.com': 'Service'}
+    users = [self.user_1, self.user_2, self.user_3, self.user_4,
+             self.service_account, self.user_deleted]
+    self.project.committer_ids.append(self.requester.user_id)
+    (display_names_by_id,
+     display_emails_by_id) = framework_bizobj.CreateUserDisplayNamesAndEmails(
+         self.cnxn, self.services, self.user_auth, users)
+    expected_display_names = {
+        self.user_1.user_id: self.user_1.email,  # Project member
+        self.user_2.user_id: self.user_2.email,  # Project member and unobscured
+        self.user_3.user_id: testing_helpers.ObscuredEmail(self.user_3.email),
+        self.user_4.user_id: self.user_4.email,  # Unobscured email
+        self.service_account.user_id: 'Service',
+        self.user_deleted.user_id: framework_constants.DELETED_USER_NAME
+    }
+    expected_display_emails = {
+        self.user_1.user_id: self.user_1.email,  # Project member
+        self.user_2.user_id: self.user_2.email,  # Project member and unobscured
+        self.user_3.user_id: testing_helpers.ObscuredEmail(self.user_3.email),
+        self.user_4.user_id: self.user_4.email,  # Unobscured email
+        self.service_account.user_id: self.service_account.email,
+        self.user_deleted.user_id: ''
+    }
+    self.assertEqual(display_names_by_id, expected_display_names)
+    self.assertEqual(display_emails_by_id, expected_display_emails)
+
+  @mock.patch('services.client_config_svc.GetServiceAccountMap')
+  def testUserCreateDisplayNamesAndEmails_Admin(self, fake_account_map):
+    fake_account_map.return_value = {'service@account.com': 'Service'}
+    users = [self.user_1, self.user_2, self.user_3, self.user_4,
+             self.service_account, self.user_deleted]
+    self.user_auth.user_pb.is_site_admin = True
+    (display_names_by_id,
+     display_emails_by_id) = framework_bizobj.CreateUserDisplayNamesAndEmails(
+         self.cnxn, self.services, self.user_auth, users)
+    expected_display_names = {
+        self.user_1.user_id: self.user_1.email,
+        self.user_2.user_id: self.user_2.email,
+        self.user_3.user_id: self.user_3.email,
+        self.user_4.user_id: self.user_4.email,
+        self.service_account.user_id: 'Service',
+        self.user_deleted.user_id: framework_constants.DELETED_USER_NAME}
+    expected_display_emails = {
+        self.user_1.user_id: self.user_1.email,
+        self.user_2.user_id: self.user_2.email,
+        self.user_3.user_id: self.user_3.email,
+        self.user_4.user_id: self.user_4.email,
+        self.service_account.user_id: self.service_account.email,
+        self.user_deleted.user_id: ''
+    }
+
+    self.assertEqual(display_names_by_id, expected_display_names)
+    self.assertEqual(display_emails_by_id, expected_display_emails)
+
+
+class ParseAndObscureAddressTest(unittest.TestCase):
+
+  def testParseAndObscureAddress(self):
+    email = 'sir.chicken@farm.test'
+    (username, user_domain, obscured_username,
+     obscured_email) = framework_bizobj.ParseAndObscureAddress(email)
+
+    self.assertEqual(username, 'sir.chicken')
+    self.assertEqual(user_domain, 'farm.test')
+    self.assertEqual(obscured_username, 'sir.c')
+    self.assertEqual(obscured_email, 'sir.c...@farm.test')
+
+
+class FilterViewableEmailsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.user_1 = self.services.user.TestAddUser(
+        'user_1@test.com', 111, obscure_email=True)
+    self.user_2 = self.services.user.TestAddUser(
+        'user_2@test.com', 222, obscure_email=False)
+    self.requester = self.services.user.TestAddUser(
+        'user_5@test.com', 555, obscure_email=True)
+    self.user_auth = authdata.AuthData(
+        user_id=self.requester.user_id, email=self.requester.email)
+    self.user_auth.user_pb.email = self.user_auth.email
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=789, owner_ids=[111], committer_ids=[222])
+
+  def testFilterViewableEmail_Anon(self):
+    anon = authdata.AuthData()
+    other_users = [self.user_1, self.user_2]
+    filtered_users = framework_bizobj.FilterViewableEmails(
+        self.cnxn, self.services, anon, other_users)
+    self.assertEqual(filtered_users, [])
+
+  def testFilterViewableEmail_Self(self):
+    filtered_users = framework_bizobj.FilterViewableEmails(
+        self.cnxn, self.services, self.user_auth, [self.user_auth.user_pb])
+    self.assertEqual(filtered_users, [self.user_auth.user_pb])
+
+  def testFilterViewableEmail_SiteAdmin(self):
+    self.user_auth.user_pb.is_site_admin = True
+    other_users = [self.user_1, self.user_2]
+    filtered_users = framework_bizobj.FilterViewableEmails(
+        self.cnxn, self.services, self.user_auth, other_users)
+    self.assertEqual(filtered_users, other_users)
+
+  def testFilterViewableEmail_InDisplayNameGroup(self):
+    display_name_group_id = 666
+    self.services.usergroup.TestAddGroupSettings(
+        display_name_group_id, 'display-perm-perm@email.com')
+    settings.full_emails_perm_groups = ['display-perm-perm@email.com']
+    self.user_auth.effective_ids.add(display_name_group_id)
+
+    other_users = [self.user_1, self.user_2]
+    filtered_users = framework_bizobj.FilterViewableEmails(
+        self.cnxn, self.services, self.user_auth, other_users)
+    self.assertEqual(filtered_users, other_users)
+
+  def testFilterViewableEmail_NonMember(self):
+    other_users = [self.user_1, self.user_2]
+    filtered_users = framework_bizobj.FilterViewableEmails(
+        self.cnxn, self.services, self.user_auth, other_users)
+    self.assertEqual(filtered_users, [])
+
+  def testFilterViewableEmail_ProjectMember(self):
+    self.project.committer_ids.append(self.requester.user_id)
+    other_users = [self.user_1, self.user_2]
+    filtered_users = framework_bizobj.FilterViewableEmails(
+        self.cnxn, self.services, self.user_auth, other_users)
+    self.assertEqual(filtered_users, other_users)
+
+
+# TODO(https://crbug.com/monorail/8192): Remove deprecated tests.
+class DeprecatedShouldRevealEmailTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.user_1 = self.services.user.TestAddUser(
+        'user_1@test.com', 111, obscure_email=True)
+    self.user_2 = self.services.user.TestAddUser(
+        'user_2@test.com', 222, obscure_email=False)
+    self.requester = self.services.user.TestAddUser(
+        'user_5@test.com', 555, obscure_email=True)
+    self.user_auth = authdata.AuthData(
+        user_id=self.requester.user_id, email=self.requester.email)
+    self.user_auth.user_pb.email = self.user_auth.email
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=789, owner_ids=[111], committer_ids=[222])
+
+  def testDeprecatedShouldRevealEmail_Anon(self):
+    anon = authdata.AuthData()
+    self.assertFalse(
+        framework_bizobj.DeprecatedShouldRevealEmail(
+            anon, self.project, self.user_1.email))
+    self.assertFalse(
+        framework_bizobj.DeprecatedShouldRevealEmail(
+            anon, self.project, self.user_2.email))
+
+  def testDeprecatedShouldRevealEmail_Self(self):
+    self.assertTrue(
+        framework_bizobj.DeprecatedShouldRevealEmail(
+            self.user_auth, self.project, self.user_auth.user_pb.email))
+
+  def testDeprecatedShouldRevealEmail_SiteAdmin(self):
+    self.user_auth.user_pb.is_site_admin = True
+    self.assertTrue(
+        framework_bizobj.DeprecatedShouldRevealEmail(
+            self.user_auth, self.project, self.user_1.email))
+    self.assertTrue(
+        framework_bizobj.DeprecatedShouldRevealEmail(
+            self.user_auth, self.project, self.user_2.email))
+
+  def testDeprecatedShouldRevealEmail_ProjectMember(self):
+    self.project.committer_ids.append(self.requester.user_id)
+    self.assertTrue(
+        framework_bizobj.DeprecatedShouldRevealEmail(
+            self.user_auth, self.project, self.user_1.email))
+    self.assertTrue(
+        framework_bizobj.DeprecatedShouldRevealEmail(
+            self.user_auth, self.project, self.user_2.email))
+
+  def testDeprecatedShouldRevealEmail_NonMember(self):
+    self.assertFalse(
+        framework_bizobj.DeprecatedShouldRevealEmail(
+            self.user_auth, self.project, self.user_1.email))
+    self.assertFalse(
+        framework_bizobj.DeprecatedShouldRevealEmail(
+            self.user_auth, self.project, self.user_2.email))
+
+
+class ArtifactTest(unittest.TestCase):
+
+  def setUp(self):
+    # No custom fields.  Exclusive prefixes: Type, Priority, Milestone.
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+
+  def testMergeLabels_Labels(self):
+    # Empty case.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        [], [], [], self.config)
+    self.assertEqual(merged_labels, [])
+    self.assertEqual(update_add, [])
+    self.assertEqual(update_remove, [])
+
+    # No-op case.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['a', 'b'], [], [], self.config)
+    self.assertEqual(merged_labels, ['a', 'b'])
+    self.assertEqual(update_add, [])
+    self.assertEqual(update_remove, [])
+
+    # Adding and removing at the same time.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['a', 'b', 'd'], ['c'], ['d'], self.config)
+    self.assertEqual(merged_labels, ['a', 'b', 'c'])
+    self.assertEqual(update_add, ['c'])
+    self.assertEqual(update_remove, ['d'])
+
+    # Removing a non-matching label has no effect.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['a', 'b', 'd'], ['d'], ['e'], self.config)
+    self.assertEqual(merged_labels, ['a', 'b', 'd'])
+    self.assertEqual(update_add, [])  # d was already there.
+    self.assertEqual(update_remove, [])  # there was no e.
+
+    # We can add and remove at the same time.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Priority-Medium', 'OpSys-OSX'], ['Hot'], ['OpSys-OSX'], self.config)
+    self.assertEqual(merged_labels, ['Priority-Medium', 'Hot'])
+    self.assertEqual(update_add, ['Hot'])
+    self.assertEqual(update_remove, ['OpSys-OSX'])
+
+    # Adding Priority-High replaces Priority-Medium.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Priority-Medium', 'OpSys-OSX'], ['Priority-High', 'OpSys-Win'], [],
+        self.config)
+    self.assertEqual(merged_labels, ['OpSys-OSX', 'Priority-High', 'OpSys-Win'])
+    self.assertEqual(update_add, ['Priority-High', 'OpSys-Win'])
+    self.assertEqual(update_remove, [])
+
+    # Adding Priority-High and Priority-Low replaces with High only.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Priority-Medium', 'OpSys-OSX'],
+        ['Priority-High', 'Priority-Low'], [], self.config)
+    self.assertEqual(merged_labels, ['OpSys-OSX', 'Priority-High'])
+    self.assertEqual(update_add, ['Priority-High'])
+    self.assertEqual(update_remove, [])
+
+    # Removing a mix of matching and non-matching labels only does matching.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Priority-Medium', 'OpSys-OSX'], [], ['Priority-Medium', 'OpSys-Win'],
+        self.config)
+    self.assertEqual(merged_labels, ['OpSys-OSX'])
+    self.assertEqual(update_add, [])
+    self.assertEqual(update_remove, ['Priority-Medium'])
+
+    # Multi-part labels work as expected.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Priority-Medium', 'OpSys-OSX-11'],
+        ['Priority-Medium-Rare', 'OpSys-OSX-13'], [], self.config)
+    self.assertEqual(
+        merged_labels, ['OpSys-OSX-11', 'Priority-Medium-Rare', 'OpSys-OSX-13'])
+    self.assertEqual(update_add, ['Priority-Medium-Rare', 'OpSys-OSX-13'])
+    self.assertEqual(update_remove, [])
+
+    # Multi-part exclusive prefixes only filter labels that match whole prefix.
+    self.config.exclusive_label_prefixes.append('Branch-Name')
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Branch-Name-xyz'],
+        ['Branch-Prediction', 'Branch-Name-Beta'], [], self.config)
+    self.assertEqual(merged_labels, ['Branch-Prediction', 'Branch-Name-Beta'])
+    self.assertEqual(update_add, ['Branch-Prediction', 'Branch-Name-Beta'])
+    self.assertEqual(update_remove, [])
+
+  def testMergeLabels_SingleValuedEnums(self):
+    self.config.field_defs.append(tracker_pb2.FieldDef(
+        field_id=1, field_name='Size',
+        field_type=tracker_pb2.FieldTypes.ENUM_TYPE,
+        is_multivalued=False))
+    self.config.field_defs.append(tracker_pb2.FieldDef(
+        field_id=1, field_name='Branch-Name',
+        field_type=tracker_pb2.FieldTypes.ENUM_TYPE,
+        is_multivalued=False))
+
+    # We can add a label for a single-valued enum.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Priority-Medium', 'OpSys-OSX'], ['Size-L'], [], self.config)
+    self.assertEqual(merged_labels, ['Priority-Medium', 'OpSys-OSX', 'Size-L'])
+    self.assertEqual(update_add, ['Size-L'])
+    self.assertEqual(update_remove, [])
+
+    # Adding and removing the same label adds it.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Priority-Medium'], ['Size-M'], ['Size-M'], self.config)
+    self.assertEqual(merged_labels, ['Priority-Medium', 'Size-M'])
+    self.assertEqual(update_add, ['Size-M'])
+    self.assertEqual(update_remove, [])
+
+    # Adding Size-L replaces Size-M.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Priority-Medium', 'Size-M'], ['Size-L', 'OpSys-Win'], [],
+        self.config)
+    self.assertEqual(merged_labels, ['Priority-Medium', 'Size-L', 'OpSys-Win'])
+    self.assertEqual(update_add, ['Size-L', 'OpSys-Win'])
+    self.assertEqual(update_remove, [])
+
+    # Adding Size-L and Size-XL replaces with L only.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Size-M', 'OpSys-OSX'], ['Size-L', 'Size-XL'], [], self.config)
+    self.assertEqual(merged_labels, ['OpSys-OSX', 'Size-L'])
+    self.assertEqual(update_add, ['Size-L'])
+    self.assertEqual(update_remove, [])
+
+    # Multi-part labels work as expected.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Size-M', 'OpSys-OSX'], ['Size-M-USA'], [], self.config)
+    self.assertEqual(merged_labels, ['OpSys-OSX', 'Size-M-USA'])
+    self.assertEqual(update_add, ['Size-M-USA'])
+    self.assertEqual(update_remove, [])
+
+    # Multi-part enum names only filter labels that match whole name.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Branch-Name-xyz'],
+        ['Branch-Prediction', 'Branch-Name-Beta'], [], self.config)
+    self.assertEqual(merged_labels, ['Branch-Prediction', 'Branch-Name-Beta'])
+    self.assertEqual(update_add, ['Branch-Prediction', 'Branch-Name-Beta'])
+    self.assertEqual(update_remove, [])
+
+  def testMergeLabels_MultiValuedEnums(self):
+    self.config.field_defs.append(tracker_pb2.FieldDef(
+        field_id=1, field_name='OpSys',
+        field_type=tracker_pb2.FieldTypes.ENUM_TYPE,
+        is_multivalued=True))
+    self.config.field_defs.append(tracker_pb2.FieldDef(
+        field_id=1, field_name='Branch-Name',
+        field_type=tracker_pb2.FieldTypes.ENUM_TYPE,
+        is_multivalued=True))
+
+    # We can add a label for a multi-valued enum.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Priority-Medium'], ['OpSys-Win'], [], self.config)
+    self.assertEqual(merged_labels, ['Priority-Medium', 'OpSys-Win'])
+    self.assertEqual(update_add, ['OpSys-Win'])
+    self.assertEqual(update_remove, [])
+
+    # We can remove a matching label for a multi-valued enum.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Priority-Medium', 'OpSys-Win'], [], ['OpSys-Win'], self.config)
+    self.assertEqual(merged_labels, ['Priority-Medium'])
+    self.assertEqual(update_add, [])
+    self.assertEqual(update_remove, ['OpSys-Win'])
+
+    # We can remove a non-matching label and it is a no-op.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Priority-Medium', 'OpSys-OSX'], [], ['OpSys-Win'], self.config)
+    self.assertEqual(merged_labels, ['Priority-Medium', 'OpSys-OSX'])
+    self.assertEqual(update_add, [])
+    self.assertEqual(update_remove, [])
+
+    # Adding and removing the same label adds it.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Priority-Medium'], ['OpSys-Win'], ['OpSys-Win'], self.config)
+    self.assertEqual(merged_labels, ['Priority-Medium', 'OpSys-Win'])
+    self.assertEqual(update_add, ['OpSys-Win'])
+    self.assertEqual(update_remove, [])
+
+    # We can add a label for a multi-valued enum, even if matching exists.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Priority-Medium', 'OpSys-OSX'], ['OpSys-Win'], [], self.config)
+    self.assertEqual(
+        merged_labels, ['Priority-Medium', 'OpSys-OSX', 'OpSys-Win'])
+    self.assertEqual(update_add, ['OpSys-Win'])
+    self.assertEqual(update_remove, [])
+
+    # Adding two at the same time is fine.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Size-M', 'OpSys-OSX'], ['OpSys-Win', 'OpSys-Vax'], [], self.config)
+    self.assertEqual(
+        merged_labels, ['Size-M', 'OpSys-OSX', 'OpSys-Win', 'OpSys-Vax'])
+    self.assertEqual(update_add, ['OpSys-Win', 'OpSys-Vax'])
+    self.assertEqual(update_remove, [])
+
+    # Multi-part labels work as expected.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Size-M', 'OpSys-OSX'], ['OpSys-Win-10'], [], self.config)
+    self.assertEqual(merged_labels, ['Size-M', 'OpSys-OSX', 'OpSys-Win-10'])
+    self.assertEqual(update_add, ['OpSys-Win-10'])
+    self.assertEqual(update_remove, [])
+
+    # Multi-part enum names don't mess up anything.
+    (merged_labels, update_add, update_remove) = framework_bizobj.MergeLabels(
+        ['Branch-Name-xyz'],
+        ['Branch-Prediction', 'Branch-Name-Beta'], [], self.config)
+    self.assertEqual(
+        merged_labels,
+        ['Branch-Name-xyz', 'Branch-Prediction', 'Branch-Name-Beta'])
+    self.assertEqual(update_add, ['Branch-Prediction', 'Branch-Name-Beta'])
+    self.assertEqual(update_remove, [])
+
+
+class CanonicalizeLabelTest(unittest.TestCase):
+
+  def testCanonicalizeLabel(self):
+    self.assertEqual(None, framework_bizobj.CanonicalizeLabel(None))
+    self.assertEqual('FooBar', framework_bizobj.CanonicalizeLabel('Foo  Bar '))
+    self.assertEqual('Foo.Bar',
+                     framework_bizobj.CanonicalizeLabel('Foo . Bar '))
+    self.assertEqual('Foo-Bar',
+                     framework_bizobj.CanonicalizeLabel('Foo - Bar '))
+
+
+class UserIsInProjectTest(unittest.TestCase):
+
+  def testUserIsInProject(self):
+    p = project_pb2.Project()
+    self.assertFalse(framework_bizobj.UserIsInProject(p, {10}))
+    self.assertFalse(framework_bizobj.UserIsInProject(p, set()))
+
+    p.owner_ids.extend([1, 2, 3])
+    p.committer_ids.extend([4, 5, 6])
+    p.contributor_ids.extend([7, 8, 9])
+    self.assertTrue(framework_bizobj.UserIsInProject(p, {1}))
+    self.assertTrue(framework_bizobj.UserIsInProject(p, {4}))
+    self.assertTrue(framework_bizobj.UserIsInProject(p, {7}))
+    self.assertFalse(framework_bizobj.UserIsInProject(p, {10}))
+
+    # Membership via group membership
+    self.assertTrue(framework_bizobj.UserIsInProject(p, {10, 4}))
+
+    # Membership via several group memberships
+    self.assertTrue(framework_bizobj.UserIsInProject(p, {1, 4}))
+
+    # Several irrelevant group memberships
+    self.assertFalse(framework_bizobj.UserIsInProject(p, {10, 11, 12}))
+
+
+class IsValidColumnSpecTest(unittest.TestCase):
+
+  def testIsValidColumnSpec(self):
+    self.assertTrue(
+        framework_bizobj.IsValidColumnSpec('some columns hey-honk hay.honk'))
+
+    self.assertTrue(framework_bizobj.IsValidColumnSpec('some'))
+
+    self.assertTrue(framework_bizobj.IsValidColumnSpec(''))
+
+  def testIsValidColumnSpec_NotValid(self):
+    self.assertFalse(
+        framework_bizobj.IsValidColumnSpec('some columns hey-honk hay.'))
+
+    self.assertFalse(framework_bizobj.IsValidColumnSpec('some columns hey-'))
+
+    self.assertFalse(framework_bizobj.IsValidColumnSpec('-some columns hey'))
+
+    self.assertFalse(framework_bizobj.IsValidColumnSpec('some .columns hey'))
+
+
+class ValidatePrefTest(unittest.TestCase):
+
+  def testUnknown(self):
+    msg = framework_bizobj.ValidatePref('shoe_size', 'true')
+    self.assertIn('shoe_size', msg)
+    self.assertIn('Unknown', msg)
+
+    msg = framework_bizobj.ValidatePref('', 'true')
+    self.assertIn('Unknown', msg)
+
+  def testTooLong(self):
+    msg = framework_bizobj.ValidatePref('code_font', 'x' * 100)
+    self.assertIn('code_font', msg)
+    self.assertIn('too long', msg)
+
+  def testKnownValid(self):
+    self.assertIsNone(framework_bizobj.ValidatePref('code_font', 'true'))
+    self.assertIsNone(framework_bizobj.ValidatePref('code_font', 'false'))
+
+  def testKnownInvalid(self):
+    msg = framework_bizobj.ValidatePref('code_font', '')
+    self.assertIn('Invalid', msg)
+
+    msg = framework_bizobj.ValidatePref('code_font', 'sometimes')
+    self.assertIn('Invalid', msg)
+
+
+class IsRestrictNewIssuesUserTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.services.user.TestAddUser('corp_user@example.com', 111)
+    self.services.user.TestAddUser('corp_group@example.com', 888)
+    self.services.usergroup.TestAddGroupSettings(888, 'corp_group@example.com')
+
+  @mock.patch(
+      'settings.restrict_new_issues_user_groups', ['corp_group@example.com'])
+  def testNonRestrictNewIssuesUser(self):
+    """We detect when a user is not part of a corp user group."""
+    self.assertFalse(
+        framework_bizobj.IsRestrictNewIssuesUser(self.cnxn, self.services, 111))
+
+  @mock.patch(
+      'settings.restrict_new_issues_user_groups', ['corp_group@example.com'])
+  def testRestrictNewIssuesUser(self):
+    """We detect when a user is a member of such a group."""
+    self.services.usergroup.TestAddMembers(888, [111, 222])
+    self.assertTrue(
+        framework_bizobj.IsRestrictNewIssuesUser(self.cnxn, self.services, 111))
+
+
+class IsPublicIssueNoticeUserTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        user=fake.UserService(), usergroup=fake.UserGroupService())
+    self.services.user.TestAddUser('corp_user@example.com', 111)
+    self.services.user.TestAddUser('corp_group@example.com', 888)
+    self.services.usergroup.TestAddGroupSettings(888, 'corp_group@example.com')
+
+  @mock.patch(
+      'settings.public_issue_notice_user_groups', ['corp_group@example.com'])
+  def testNonPublicIssueNoticeUser(self):
+    """We detect when a user is not part of a corp user group."""
+    self.assertFalse(
+        framework_bizobj.IsPublicIssueNoticeUser(self.cnxn, self.services, 111))
+
+  @mock.patch(
+      'settings.public_issue_notice_user_groups', ['corp_group@example.com'])
+  def testPublicIssueNoticeUser(self):
+    """We detect when a user is a member of such a group."""
+    self.services.usergroup.TestAddMembers(888, [111, 222])
+    self.assertTrue(
+        framework_bizobj.IsPublicIssueNoticeUser(self.cnxn, self.services, 111))
+
+
+class GetEffectiveIdsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        user=fake.UserService(), usergroup=fake.UserGroupService())
+    self.services.user.TestAddUser('test@example.com', 111)
+
+  def testNoMemberships(self):
+    """No user groups means effective_ids == {user_id}."""
+    effective_ids = framework_bizobj.GetEffectiveIds(
+        self.cnxn, self.services, [111])
+    self.assertEqual(effective_ids, {111: {111}})
+
+  def testNormalMemberships(self):
+    """effective_ids should be {user_id, group_id...}."""
+    self.services.usergroup.TestAddMembers(888, [111])
+    self.services.usergroup.TestAddMembers(999, [111])
+    effective_ids = framework_bizobj.GetEffectiveIds(
+        self.cnxn, self.services, [111])
+    self.assertEqual(effective_ids, {111: {111, 888, 999}})
+
+  def testComputedUserGroup(self):
+    """effective_ids should be {user_id, group_id...}."""
+    self.services.usergroup.TestAddGroupSettings(888, 'everyone@example.com')
+    effective_ids = framework_bizobj.GetEffectiveIds(
+        self.cnxn, self.services, [111])
+    self.assertEqual(effective_ids, {111: {111, 888}})
+
+  def testAccountHasParent(self):
+    """The parent's effective_ids are added to child's."""
+    child = self.services.user.TestAddUser('child@example.com', 111)
+    child.linked_parent_id = 222
+    parent = self.services.user.TestAddUser('parent@example.com', 222)
+    parent.linked_child_ids = [111]
+    effective_ids = framework_bizobj.GetEffectiveIds(
+        self.cnxn, self.services, [111])
+    self.assertEqual(effective_ids, {111: {111, 222}})
+
+    self.services.usergroup.TestAddMembers(888, [111])
+    self.services.usergroup.TestAddMembers(999, [222])
+    effective_ids = framework_bizobj.GetEffectiveIds(
+        self.cnxn, self.services, [111])
+    self.assertEqual(effective_ids, {111: {111, 222, 888, 999}})
+
+  def testAccountHasChildren(self):
+    """All linked child effective_ids are added to parent's."""
+    child1 = self.services.user.TestAddUser('child1@example.com', 111)
+    child1.linked_parent_id = 333
+    child2 = self.services.user.TestAddUser('child3@example.com', 222)
+    child2.linked_parent_id = 333
+    parent = self.services.user.TestAddUser('parent@example.com', 333)
+    parent.linked_child_ids = [111, 222]
+
+    effective_ids = framework_bizobj.GetEffectiveIds(
+        self.cnxn, self.services, [333])
+    self.assertEqual(effective_ids, {333: {111, 222, 333}})
+
+    self.services.usergroup.TestAddMembers(888, [111])
+    self.services.usergroup.TestAddMembers(999, [222])
+    effective_ids = framework_bizobj.GetEffectiveIds(
+        self.cnxn, self.services, [333])
+    self.assertEqual(effective_ids, {333: {111, 222, 333, 888, 999}})
diff --git a/framework/test/framework_helpers_test.py b/framework/test/framework_helpers_test.py
new file mode 100644
index 0000000..1d0146c
--- /dev/null
+++ b/framework/test/framework_helpers_test.py
@@ -0,0 +1,563 @@
+# 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
+
+"""Unit tests for the framework_helpers module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+
+import mox
+import time
+
+from businesslogic import work_env
+from framework import framework_helpers
+from framework import framework_views
+from proto import features_pb2
+from proto import project_pb2
+from proto import user_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class HelperFunctionsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.time = self.mox.CreateMock(framework_helpers.time)
+    framework_helpers.time = self.time  # Point to a mocked out time module.
+
+  def tearDown(self):
+    framework_helpers.time = time  # Point back to the time module.
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testRetryDecorator_ExceedFailures(self):
+    class Tracker(object):
+      func_called = 0
+    tracker = Tracker()
+
+    # Use a function that always fails.
+    @framework_helpers.retry(2, delay=1, backoff=2)
+    def testFunc(tracker):
+      tracker.func_called += 1
+      raise Exception('Failed')
+
+    self.time.sleep(1).AndReturn(None)
+    self.time.sleep(2).AndReturn(None)
+    self.mox.ReplayAll()
+    with self.assertRaises(Exception):
+      testFunc(tracker)
+    self.mox.VerifyAll()
+    self.assertEqual(3, tracker.func_called)
+
+  def testRetryDecorator_EventuallySucceed(self):
+    class Tracker(object):
+      func_called = 0
+    tracker = Tracker()
+
+    # Use a function that succeeds on the 2nd attempt.
+    @framework_helpers.retry(2, delay=1, backoff=2)
+    def testFunc(tracker):
+      tracker.func_called += 1
+      if tracker.func_called < 2:
+        raise Exception('Failed')
+
+    self.time.sleep(1).AndReturn(None)
+    self.mox.ReplayAll()
+    testFunc(tracker)
+    self.mox.VerifyAll()
+    self.assertEqual(2, tracker.func_called)
+
+  def testGetRoleName(self):
+    proj = project_pb2.Project()
+    proj.owner_ids.append(111)
+    proj.committer_ids.append(222)
+    proj.contributor_ids.append(333)
+
+    self.assertEqual(None, framework_helpers.GetRoleName(set(), proj))
+
+    self.assertEqual('Owner', framework_helpers.GetRoleName({111}, proj))
+    self.assertEqual('Committer', framework_helpers.GetRoleName({222}, proj))
+    self.assertEqual('Contributor', framework_helpers.GetRoleName({333}, proj))
+
+    self.assertEqual(
+        'Owner', framework_helpers.GetRoleName({111, 222, 999}, proj))
+    self.assertEqual(
+        'Committer', framework_helpers.GetRoleName({222, 333, 999}, proj))
+    self.assertEqual(
+        'Contributor', framework_helpers.GetRoleName({333, 999}, proj))
+
+  def testGetHotlistRoleName(self):
+    hotlist = features_pb2.Hotlist()
+    hotlist.owner_ids.append(111)
+    hotlist.editor_ids.append(222)
+    hotlist.follower_ids.append(333)
+
+    self.assertEqual(None, framework_helpers.GetHotlistRoleName(set(), hotlist))
+
+    self.assertEqual(
+        'Owner', framework_helpers.GetHotlistRoleName({111}, hotlist))
+    self.assertEqual(
+        'Editor', framework_helpers.GetHotlistRoleName({222}, hotlist))
+    self.assertEqual(
+        'Follower', framework_helpers.GetHotlistRoleName({333}, hotlist))
+
+    self.assertEqual(
+        'Owner', framework_helpers.GetHotlistRoleName({111, 222, 999}, hotlist))
+    self.assertEqual(
+        'Editor', framework_helpers.GetHotlistRoleName(
+            {222, 333, 999}, hotlist))
+    self.assertEqual(
+        'Follower', framework_helpers.GetHotlistRoleName({333, 999}, hotlist))
+
+
+class UrlFormattingTest(unittest.TestCase):
+  """Tests for URL formatting."""
+
+  def setUp(self):
+    self.services = service_manager.Services(user=fake.UserService())
+
+  def testFormatMovedProjectURL(self):
+    """Project foo has been moved to bar.  User is visiting /p/foo/..."""
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.current_page_url = '/p/foo/'
+    self.assertEqual(
+      '/p/bar/',
+      framework_helpers.FormatMovedProjectURL(mr, 'bar'))
+
+    mr.current_page_url = '/p/foo/issues/list'
+    self.assertEqual(
+      '/p/bar/issues/list',
+      framework_helpers.FormatMovedProjectURL(mr, 'bar'))
+
+    mr.current_page_url = '/p/foo/issues/detail?id=123'
+    self.assertEqual(
+      '/p/bar/issues/detail?id=123',
+      framework_helpers.FormatMovedProjectURL(mr, 'bar'))
+
+    mr.current_page_url = '/p/foo/issues/detail?id=123#c7'
+    self.assertEqual(
+      '/p/bar/issues/detail?id=123#c7',
+      framework_helpers.FormatMovedProjectURL(mr, 'bar'))
+
+  def testFormatURL(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    path = '/dude/wheres/my/car'
+    recognized_params = [(name, mr.GetParam(name)) for name in
+                         framework_helpers.RECOGNIZED_PARAMS]
+    url = framework_helpers.FormatURL(recognized_params, path)
+    self.assertEqual(path, url)
+
+  def testFormatURLWithRecognizedParams(self):
+    params = {}
+    query = []
+    for name in framework_helpers.RECOGNIZED_PARAMS:
+      params[name] = name
+      query.append('%s=%s' % (name, 123))
+    path = '/dude/wheres/my/car'
+    expected = '%s?%s' % (path, '&'.join(query))
+    mr = testing_helpers.MakeMonorailRequest(path=expected)
+    recognized_params = [(name, mr.GetParam(name)) for name in
+                         framework_helpers.RECOGNIZED_PARAMS]
+    # No added params.
+    url = framework_helpers.FormatURL(recognized_params, path)
+    self.assertEqual(expected, url)
+
+  def testFormatURLWithKeywordArgs(self):
+    params = {}
+    query_pairs = []
+    for name in framework_helpers.RECOGNIZED_PARAMS:
+      params[name] = name
+      if name != 'can' and name != 'start':
+        query_pairs.append('%s=%s' % (name, 123))
+    path = '/dude/wheres/my/car'
+    mr = testing_helpers.MakeMonorailRequest(
+        path='%s?%s' % (path, '&'.join(query_pairs)))
+    query_pairs.append('can=yep')
+    query_pairs.append('start=486')
+    query_string = '&'.join(query_pairs)
+    expected = '%s?%s' % (path, query_string)
+    recognized_params = [(name, mr.GetParam(name)) for name in
+                         framework_helpers.RECOGNIZED_PARAMS]
+    url = framework_helpers.FormatURL(
+        recognized_params, path, can='yep', start=486)
+    self.assertEqual(expected, url)
+
+  def testFormatURLWithKeywordArgsAndID(self):
+    params = {}
+    query_pairs = []
+    query_pairs.append('id=200')  # id should be the first parameter.
+    for name in framework_helpers.RECOGNIZED_PARAMS:
+      params[name] = name
+      if name != 'can' and name != 'start':
+        query_pairs.append('%s=%s' % (name, 123))
+    path = '/dude/wheres/my/car'
+    mr = testing_helpers.MakeMonorailRequest(
+        path='%s?%s' % (path, '&'.join(query_pairs)))
+    query_pairs.append('can=yep')
+    query_pairs.append('start=486')
+    query_string = '&'.join(query_pairs)
+    expected = '%s?%s' % (path, query_string)
+    recognized_params = [(name, mr.GetParam(name)) for name in
+                         framework_helpers.RECOGNIZED_PARAMS]
+    url = framework_helpers.FormatURL(
+        recognized_params, path, can='yep', start=486, id=200)
+    self.assertEqual(expected, url)
+
+  def testFormatURLWithStrangeParams(self):
+    mr = testing_helpers.MakeMonorailRequest(path='/foo?start=0')
+    recognized_params = [(name, mr.GetParam(name)) for name in
+                         framework_helpers.RECOGNIZED_PARAMS]
+    url = framework_helpers.FormatURL(
+        recognized_params, '/foo',
+        r=0, path='/foo/bar', sketchy='/foo/ bar baz ')
+    self.assertEqual(
+        '/foo?start=0&path=/foo/bar&r=0&sketchy=/foo/%20bar%20baz%20',
+        url)
+
+  def testFormatAbsoluteURL(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/some-path',
+        headers={'Host': 'www.test.com'})
+    self.assertEqual(
+        'http://www.test.com/p/proj/some/path',
+        framework_helpers.FormatAbsoluteURL(mr, '/some/path'))
+
+  def testFormatAbsoluteURL_CommonRequestParams(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/some-path?foo=bar&can=1',
+        headers={'Host': 'www.test.com'})
+    self.assertEqual(
+        'http://www.test.com/p/proj/some/path?can=1',
+        framework_helpers.FormatAbsoluteURL(mr, '/some/path'))
+    self.assertEqual(
+        'http://www.test.com/p/proj/some/path',
+        framework_helpers.FormatAbsoluteURL(
+            mr, '/some/path', copy_params=False))
+
+  def testFormatAbsoluteURL_NoProject(self):
+    path = '/some/path'
+    _request, mr = testing_helpers.GetRequestObjects(
+        headers={'Host': 'www.test.com'}, path=path)
+    url = framework_helpers.FormatAbsoluteURL(mr, path, include_project=False)
+    self.assertEqual(url, 'http://www.test.com/some/path')
+
+  def testGetHostPort_Local(self):
+    """We use testing-app.appspot.com when running locally."""
+    self.assertEqual('testing-app.appspot.com',
+                     framework_helpers.GetHostPort())
+    self.assertEqual('testing-app.appspot.com',
+                     framework_helpers.GetHostPort(project_name='proj'))
+
+  @mock.patch('settings.preferred_domains',
+              {'testing-app.appspot.com': 'example.com'})
+  def testGetHostPort_PreferredDomain(self):
+    """A prod server can have a preferred domain."""
+    self.assertEqual('example.com',
+                     framework_helpers.GetHostPort())
+    self.assertEqual('example.com',
+                     framework_helpers.GetHostPort(project_name='proj'))
+
+  @mock.patch('settings.branded_domains',
+              {'proj': 'branded.com', '*': 'unbranded.com'})
+  @mock.patch('settings.preferred_domains',
+              {'testing-app.appspot.com': 'example.com'})
+  def testGetHostPort_BrandedDomain(self):
+    """A prod server can have a preferred domain."""
+    self.assertEqual('example.com',
+                     framework_helpers.GetHostPort())
+    self.assertEqual('branded.com',
+                     framework_helpers.GetHostPort(project_name='proj'))
+    self.assertEqual('unbranded.com',
+                     framework_helpers.GetHostPort(project_name='other-proj'))
+
+  def testIssueCommentURL(self):
+    hostport = 'port.someplex.com'
+    proj = project_pb2.Project()
+    proj.project_name = 'proj'
+
+    url = 'https://port.someplex.com/p/proj/issues/detail?id=2'
+    actual_url = framework_helpers.IssueCommentURL(
+        hostport, proj, 2)
+    self.assertEqual(actual_url, url)
+
+    url = 'https://port.someplex.com/p/proj/issues/detail?id=2#c2'
+    actual_url = framework_helpers.IssueCommentURL(
+        hostport, proj, 2, seq_num=2)
+    self.assertEqual(actual_url, url)
+
+
+class WordWrapSuperLongLinesTest(unittest.TestCase):
+
+  def testEmptyLogMessage(self):
+    msg = ''
+    wrapped_msg = framework_helpers.WordWrapSuperLongLines(msg)
+    self.assertEqual(wrapped_msg, '')
+
+  def testShortLines(self):
+    msg = 'one\ntwo\nthree\n'
+    wrapped_msg = framework_helpers.WordWrapSuperLongLines(msg)
+    expected = 'one\ntwo\nthree\n'
+    self.assertEqual(wrapped_msg, expected)
+
+  def testOneLongLine(self):
+    msg = ('This is a super long line that just goes on and on '
+           'and it seems like it will never stop because it is '
+           'super long and it was entered by a user who had no '
+           'familiarity with the return key.')
+    wrapped_msg = framework_helpers.WordWrapSuperLongLines(msg)
+    expected = ('This is a super long line that just goes on and on and it '
+                'seems like it will never stop because it\n'
+                'is super long and it was entered by a user who had no '
+                'familiarity with the return key.')
+    self.assertEqual(wrapped_msg, expected)
+
+    msg2 = ('This is a super long line that just goes on and on '
+            'and it seems like it will never stop because it is '
+            'super long and it was entered by a user who had no '
+            'familiarity with the return key. '
+            'This is a super long line that just goes on and on '
+            'and it seems like it will never stop because it is '
+            'super long and it was entered by a user who had no '
+            'familiarity with the return key.')
+    wrapped_msg2 = framework_helpers.WordWrapSuperLongLines(msg2)
+    expected2 = ('This is a super long line that just goes on and on and it '
+                 'seems like it will never stop because it\n'
+                 'is super long and it was entered by a user who had no '
+                 'familiarity with the return key. This is a\n'
+                 'super long line that just goes on and on and it seems like '
+                 'it will never stop because it is super\n'
+                 'long and it was entered by a user who had no familiarity '
+                 'with the return key.')
+    self.assertEqual(wrapped_msg2, expected2)
+
+  def testMixOfShortAndLong(self):
+    msg = ('[Author: mpcomplete]\n'
+           '\n'
+           # Description on one long line
+           'Fix a memory leak in JsArray and JsObject for the IE and NPAPI '
+           'ports.  Each time you call GetElement* or GetProperty* to '
+           'retrieve string or object token, the token would be leaked.  '
+           'I added a JsScopedToken to ensure that the right thing is '
+           'done when the object leaves scope, depending on the platform.\n'
+           '\n'
+           'R=zork\n'
+           'CC=google-gears-eng@googlegroups.com\n'
+           'DELTA=108  (52 added, 36 deleted, 20 changed)\n'
+           'OCL=5932446\n'
+           'SCL=5933728\n')
+    wrapped_msg = framework_helpers.WordWrapSuperLongLines(msg)
+    expected = (
+        '[Author: mpcomplete]\n'
+        '\n'
+        'Fix a memory leak in JsArray and JsObject for the IE and NPAPI '
+        'ports.  Each time you call\n'
+        'GetElement* or GetProperty* to retrieve string or object token, the '
+        'token would be leaked.  I added\n'
+        'a JsScopedToken to ensure that the right thing is done when the '
+        'object leaves scope, depending on\n'
+        'the platform.\n'
+        '\n'
+        'R=zork\n'
+        'CC=google-gears-eng@googlegroups.com\n'
+        'DELTA=108  (52 added, 36 deleted, 20 changed)\n'
+        'OCL=5932446\n'
+        'SCL=5933728\n')
+    self.assertEqual(wrapped_msg, expected)
+
+
+class ComputeListDeltasTest(unittest.TestCase):
+
+  def DoOne(self, old=None, new=None, added=None, removed=None):
+    """Run one call to the target method and check expected results."""
+    actual_added, actual_removed = framework_helpers.ComputeListDeltas(
+        old, new)
+    self.assertItemsEqual(added, actual_added)
+    self.assertItemsEqual(removed, actual_removed)
+
+  def testEmptyLists(self):
+    self.DoOne(old=[], new=[], added=[], removed=[])
+    self.DoOne(old=[1, 2], new=[], added=[], removed=[1, 2])
+    self.DoOne(old=[], new=[1, 2], added=[1, 2], removed=[])
+
+  def testUnchanged(self):
+    self.DoOne(old=[1], new=[1], added=[], removed=[])
+    self.DoOne(old=[1, 2], new=[1, 2], added=[], removed=[])
+    self.DoOne(old=[1, 2], new=[2, 1], added=[], removed=[])
+
+  def testCompleteChange(self):
+    self.DoOne(old=[1, 2], new=[3, 4], added=[3, 4], removed=[1, 2])
+
+  def testGeneralChange(self):
+    self.DoOne(old=[1, 2], new=[2], added=[], removed=[1])
+    self.DoOne(old=[1], new=[1, 2], added=[2], removed=[])
+    self.DoOne(old=[1, 2], new=[2, 3], added=[3], removed=[1])
+
+
+class UserSettingsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mr = testing_helpers.MakeMonorailRequest()
+    self.cnxn = 'cnxn'
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+
+  def testGatherUnifiedSettingsPageData(self):
+    mr = self.mr
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    mr.auth.user_view.profile_url = '/u/profile/url'
+    userprefs = user_pb2.UserPrefs(
+      prefs=[user_pb2.UserPrefValue(name='public_issue_notice', value='true')])
+    page_data = framework_helpers.UserSettings.GatherUnifiedSettingsPageData(
+        mr.auth.user_id, mr.auth.user_view, mr.auth.user_pb, userprefs)
+
+    expected_keys = [
+        'settings_user',
+        'settings_user_pb',
+        'settings_user_is_banned',
+        'self',
+        'profile_url_fragment',
+        'preview_on_hover',
+        'settings_user_prefs',
+        ]
+    self.assertItemsEqual(expected_keys, list(page_data.keys()))
+
+    self.assertEqual('profile/url', page_data['profile_url_fragment'])
+    self.assertTrue(page_data['settings_user_prefs'].public_issue_notice)
+    self.assertFalse(page_data['settings_user_prefs'].restrict_new_issues)
+
+  def testGatherUnifiedSettingsPageData_NoUserPrefs(self):
+    """If UserPrefs were not loaded, consider them all false."""
+    mr = self.mr
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    userprefs = None
+
+    page_data = framework_helpers.UserSettings.GatherUnifiedSettingsPageData(
+        mr.auth.user_id, mr.auth.user_view, mr.auth.user_pb, userprefs)
+
+    self.assertFalse(page_data['settings_user_prefs'].public_issue_notice)
+    self.assertFalse(page_data['settings_user_prefs'].restrict_new_issues)
+
+  def testProcessBanForm(self):
+    """We can ban and unban users."""
+    user = self.services.user.TestAddUser('one@example.com', 111)
+    post_data = {'banned': 1, 'banned_reason': 'rude'}
+    framework_helpers.UserSettings.ProcessBanForm(
+      self.cnxn, self.services.user, post_data, 111, user)
+    self.assertEqual('rude', user.banned)
+
+    post_data = {}  # not banned
+    framework_helpers.UserSettings.ProcessBanForm(
+      self.cnxn, self.services.user, post_data, 111, user)
+    self.assertEqual('', user.banned)
+
+  def testProcessSettingsForm_OldStylePrefs(self):
+    """We can set prefs that are stored in the User PB."""
+    user = self.services.user.TestAddUser('one@example.com', 111)
+    post_data = {'obscure_email': 1, 'notify': 1}
+    with work_env.WorkEnv(self.mr, self.services) as we:
+      framework_helpers.UserSettings.ProcessSettingsForm(
+          we, post_data, user)
+
+    self.assertTrue(user.obscure_email)
+    self.assertTrue(user.notify_issue_change)
+    self.assertFalse(user.notify_starred_ping)
+
+  def testProcessSettingsForm_NewStylePrefs(self):
+    """We can set prefs that are stored in the UserPrefs PB."""
+    user = self.services.user.TestAddUser('one@example.com', 111)
+    post_data = {'restrict_new_issues': 1}
+    with work_env.WorkEnv(self.mr, self.services) as we:
+      framework_helpers.UserSettings.ProcessSettingsForm(
+          we, post_data, user)
+      userprefs = we.GetUserPrefs(111)
+
+    actual = {upv.name: upv.value
+              for upv in userprefs.prefs}
+    expected = {
+      'restrict_new_issues': 'true',
+      'public_issue_notice': 'false',
+      }
+    self.assertEqual(expected, actual)
+
+
+class MurmurHash3Test(unittest.TestCase):
+
+  def testMurmurHash(self):
+    test_data = [
+        ('', 0),
+        ('agable@chromium.org', 4092810879),
+        (u'jrobbins@chromium.org', 904770043),
+        ('seanmccullough%google.com@gtempaccount.com', 1301269279),
+        ('rmistry+monorail@chromium.org', 4186878788),
+        ('jparent+foo@', 2923900874),
+        ('@example.com', 3043483168),
+    ]
+    hashes = [framework_helpers.MurmurHash3_x86_32(x)
+              for (x, _) in test_data]
+    self.assertListEqual(hashes, [e for (_, e) in test_data])
+
+  def testMurmurHashWithSeed(self):
+    test_data = [
+        ('', 1113155926, 2270882445),
+        ('agable@chromium.org', 772936925, 3995066671),
+        (u'jrobbins@chromium.org', 1519359761, 1273489513),
+        ('seanmccullough%google.com@gtempaccount.com', 49913829, 1202521153),
+        ('rmistry+monorail@chromium.org', 314860298, 3636123309),
+        ('jparent+foo@', 195791379, 332453977),
+        ('@example.com', 521490555, 257496459),
+    ]
+    hashes = [framework_helpers.MurmurHash3_x86_32(x, s)
+              for (x, s, _) in test_data]
+    self.assertListEqual(hashes, [e for (_, _, e) in test_data])
+
+
+class MakeRandomKeyTest(unittest.TestCase):
+
+  def testMakeRandomKey_Normal(self):
+    key1 = framework_helpers.MakeRandomKey()
+    key2 = framework_helpers.MakeRandomKey()
+    self.assertEqual(128, len(key1))
+    self.assertEqual(128, len(key2))
+    self.assertNotEqual(key1, key2)
+
+  def testMakeRandomKey_Length(self):
+    key = framework_helpers.MakeRandomKey()
+    self.assertEqual(128, len(key))
+    key16 = framework_helpers.MakeRandomKey(length=16)
+    self.assertEqual(16, len(key16))
+
+  def testMakeRandomKey_Chars(self):
+    key = framework_helpers.MakeRandomKey(chars='a', length=4)
+    self.assertEqual('aaaa', key)
+
+
+class IsServiceAccountTest(unittest.TestCase):
+
+  def testIsServiceAccount(self):
+    appspot = 'abc@appspot.gserviceaccount.com'
+    developer = '@developer.gserviceaccount.com'
+    bugdroid = 'bugdroid1@chromium.org'
+    user = 'test@example.com'
+
+    self.assertTrue(framework_helpers.IsServiceAccount(appspot))
+    self.assertTrue(framework_helpers.IsServiceAccount(developer))
+    self.assertTrue(framework_helpers.IsServiceAccount(bugdroid))
+    self.assertFalse(framework_helpers.IsServiceAccount(user))
+
+    client_emails = set([appspot, developer, bugdroid])
+    self.assertTrue(framework_helpers.IsServiceAccount(
+        appspot, client_emails=client_emails))
+    self.assertTrue(framework_helpers.IsServiceAccount(
+        developer, client_emails=client_emails))
+    self.assertTrue(framework_helpers.IsServiceAccount(
+        bugdroid, client_emails=client_emails))
+    self.assertFalse(framework_helpers.IsServiceAccount(
+        user, client_emails=client_emails))
diff --git a/framework/test/framework_views_test.py b/framework/test/framework_views_test.py
new file mode 100644
index 0000000..57f9fd1
--- /dev/null
+++ b/framework/test/framework_views_test.py
@@ -0,0 +1,326 @@
+# 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
+
+"""Unit tests for framework_views classes."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+import unittest
+
+from framework import framework_constants
+from framework import framework_views
+from framework import monorailrequest
+from proto import project_pb2
+from proto import tracker_pb2
+from proto import user_pb2
+import settings
+from services import service_manager
+from testing import fake
+
+
+LONG_STR = 'VeryLongStringThatCertainlyWillNotFit'
+LONG_PART_STR = 'OnePartThatWillNotFit-OneShort'
+
+
+class LabelViewTest(unittest.TestCase):
+
+  def testLabelView(self):
+    view = framework_views.LabelView('', None)
+    self.assertEqual('', view.name)
+
+    view = framework_views.LabelView('Priority-High', None)
+    self.assertEqual('Priority-High', view.name)
+    self.assertIsNone(view.is_restrict)
+    self.assertEqual('', view.docstring)
+    self.assertEqual('Priority', view.prefix)
+    self.assertEqual('High', view.value)
+
+    view = framework_views.LabelView('%s-%s' % (LONG_STR, LONG_STR), None)
+    self.assertEqual('%s-%s' % (LONG_STR, LONG_STR), view.name)
+    self.assertEqual('', view.docstring)
+    self.assertEqual(LONG_STR, view.prefix)
+    self.assertEqual(LONG_STR, view.value)
+
+    view = framework_views.LabelView(LONG_PART_STR, None)
+    self.assertEqual(LONG_PART_STR, view.name)
+    self.assertEqual('', view.docstring)
+    self.assertEqual('OnePartThatWillNotFit', view.prefix)
+    self.assertEqual('OneShort', view.value)
+
+    config = tracker_pb2.ProjectIssueConfig()
+    config.well_known_labels.append(tracker_pb2.LabelDef(
+        label='Priority-High', label_docstring='Must ship in this milestone'))
+
+    view = framework_views.LabelView('Priority-High', config)
+    self.assertEqual('Must ship in this milestone', view.docstring)
+
+    view = framework_views.LabelView('Priority-Foo', config)
+    self.assertEqual('', view.docstring)
+
+    view = framework_views.LabelView('Restrict-View-Commit', None)
+    self.assertTrue(view.is_restrict)
+
+
+class StatusViewTest(unittest.TestCase):
+
+  def testStatusView(self):
+    view = framework_views.StatusView('', None)
+    self.assertEqual('', view.name)
+
+    view = framework_views.StatusView('Accepted', None)
+    self.assertEqual('Accepted', view.name)
+    self.assertEqual('', view.docstring)
+    self.assertEqual('yes', view.means_open)
+
+    view = framework_views.StatusView(LONG_STR, None)
+    self.assertEqual(LONG_STR, view.name)
+    self.assertEqual('', view.docstring)
+    self.assertEqual('yes', view.means_open)
+
+    config = tracker_pb2.ProjectIssueConfig()
+    config.well_known_statuses.append(tracker_pb2.StatusDef(
+        status='SlamDunk', status_docstring='Code fixed and taught a lesson',
+        means_open=False))
+
+    view = framework_views.StatusView('SlamDunk', config)
+    self.assertEqual('Code fixed and taught a lesson', view.docstring)
+    self.assertFalse(view.means_open)
+
+    view = framework_views.StatusView('SlammedBack', config)
+    self.assertEqual('', view.docstring)
+
+
+class UserViewTest(unittest.TestCase):
+
+  def setUp(self):
+    self.user = user_pb2.User(user_id=111)
+
+  def testGetAvailablity_Anon(self):
+    self.user.user_id = 0
+    user_view = framework_views.UserView(self.user)
+    self.assertEqual(None, user_view.avail_message)
+    self.assertEqual(None, user_view.avail_state)
+
+  def testGetAvailablity_Banned(self):
+    self.user.banned = 'spamming'
+    user_view = framework_views.UserView(self.user)
+    self.assertEqual('Banned', user_view.avail_message)
+    self.assertEqual('banned', user_view.avail_state)
+
+  def testGetAvailablity_Vacation(self):
+    self.user.vacation_message = 'gone fishing'
+    user_view = framework_views.UserView(self.user)
+    self.assertEqual('gone fishing', user_view.avail_message)
+    self.assertEqual('none', user_view.avail_state)
+
+    self.user.vacation_message = (
+      'Gone fishing as really long time with lots of friends and reading '
+      'a long novel by a famous author.  I wont have internet access but '
+      'If you urgently need anything you can call Alice or Bob for most '
+      'things otherwise call Charlie.  Wish me luck! ')
+    user_view = framework_views.UserView(self.user)
+    self.assertTrue(len(user_view.avail_message) >= 50)
+    self.assertTrue(len(user_view.avail_message_short) < 50)
+    self.assertEqual('none', user_view.avail_state)
+
+  def testGetAvailablity_Bouncing(self):
+    self.user.email_bounce_timestamp = 1234567890
+    user_view = framework_views.UserView(self.user)
+    self.assertEqual('Email to this user bounced', user_view.avail_message)
+    self.assertEqual(user_view.avail_message_short, user_view.avail_message)
+    self.assertEqual('none', user_view.avail_state)
+
+  def testGetAvailablity_Groups(self):
+    user_view = framework_views.UserView(self.user, is_group=True)
+    self.assertEqual(None, user_view.avail_message)
+    self.assertEqual(None, user_view.avail_state)
+
+    self.user.email = 'likely-user-group@example.com'
+    user_view = framework_views.UserView(self.user)
+    self.assertEqual(None, user_view.avail_message)
+    self.assertEqual(None, user_view.avail_state)
+
+  def testGetAvailablity_NeverVisitied(self):
+    self.user.last_visit_timestamp = 0
+    user_view = framework_views.UserView(self.user)
+    self.assertEqual('User never visited', user_view.avail_message)
+    self.assertEqual('never', user_view.avail_state)
+
+  def testGetAvailablity_NotRecent(self):
+    now = int(time.time())
+    self.user.last_visit_timestamp = now - 20 * framework_constants.SECS_PER_DAY
+    user_view = framework_views.UserView(self.user)
+    self.assertEqual('Last visit 20 days ago', user_view.avail_message)
+    self.assertEqual('unsure', user_view.avail_state)
+
+  def testGetAvailablity_ReallyLongTime(self):
+    now = int(time.time())
+    self.user.last_visit_timestamp = now - 99 * framework_constants.SECS_PER_DAY
+    user_view = framework_views.UserView(self.user)
+    self.assertEqual('Last visit > 30 days ago', user_view.avail_message)
+    self.assertEqual('none', user_view.avail_state)
+
+  def testDeletedUser(self):
+    deleted_user = user_pb2.User(user_id=1)
+    user_view = framework_views.UserView(deleted_user)
+    self.assertEqual(
+        user_view.display_name, framework_constants.DELETED_USER_NAME)
+    self.assertEqual(user_view.email, '')
+    self.assertEqual(user_view.obscure_email, '')
+    self.assertEqual(user_view.profile_url, '')
+
+class RevealEmailsToMembersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.mr = monorailrequest.MonorailRequest(None)
+    self.mr.project = self.services.project.TestAddProject(
+        'proj',
+        project_id=789,
+        owner_ids=[111],
+        committer_ids=[222],
+        contrib_ids=[333, 888])
+    user = self.services.user.TestAddUser('test@example.com', 1000)
+    self.mr.auth.user_pb = user
+
+  def CheckRevealAllToMember(
+      self, logged_in_user_id, expected, viewed_user_id=333, group_id=None):
+    user_view = framework_views.StuffUserView(
+        viewed_user_id, 'user@example.com', True)
+
+    if group_id:
+      pass  # xxx re-implement groups
+
+    users_by_id = {333: user_view}
+    self.mr.auth.user_id = logged_in_user_id
+    self.mr.auth.effective_ids = {logged_in_user_id}
+    # Assert display name is obscured before the reveal.
+    self.assertEqual('u...@example.com', user_view.display_name)
+    # Assert profile url contains user ID before the reveal.
+    self.assertEqual('/u/%s/' % viewed_user_id, user_view.profile_url)
+    framework_views.RevealAllEmailsToMembers(
+        self.cnxn, self.services, self.mr.auth, users_by_id)
+    self.assertEqual(expected, not user_view.obscure_email)
+    if expected:
+      # Assert display name is now revealed.
+      self.assertEqual('user@example.com', user_view.display_name)
+      # Assert profile url contains the email.
+      self.assertEqual('/u/user@example.com/', user_view.profile_url)
+    else:
+      # Assert display name is still hidden.
+      self.assertEqual('u...@example.com', user_view.display_name)
+      # Assert profile url still contains user ID.
+      self.assertEqual('/u/%s/' % viewed_user_id, user_view.profile_url)
+
+  # TODO(https://crbug.com/monorail/8192): Remove this method and related test.
+  def DeprecatedCheckRevealAllToMember(
+      self, logged_in_user_id, expected, viewed_user_id=333, group_id=None):
+    user_view = framework_views.StuffUserView(
+        viewed_user_id, 'user@example.com', True)
+
+    if group_id:
+      pass  # xxx re-implement groups
+
+    users_by_id = {333: user_view}
+    self.mr.auth.user_id = logged_in_user_id
+    self.mr.auth.effective_ids = {logged_in_user_id}
+    # Assert display name is obscured before the reveal.
+    self.assertEqual('u...@example.com', user_view.display_name)
+    # Assert profile url contains user ID before the reveal.
+    self.assertEqual('/u/%s/' % viewed_user_id, user_view.profile_url)
+    framework_views.RevealAllEmailsToMembers(
+        self.cnxn, self.services, self.mr.auth, users_by_id, self.mr.project)
+    self.assertEqual(expected, not user_view.obscure_email)
+    if expected:
+      # Assert display name is now revealed.
+      self.assertEqual('user@example.com', user_view.display_name)
+      # Assert profile url contains the email.
+      self.assertEqual('/u/user@example.com/', user_view.profile_url)
+    else:
+      # Assert display name is still hidden.
+      self.assertEqual('u...@example.com', user_view.display_name)
+      # Assert profile url still contains user ID.
+      self.assertEqual('/u/%s/' % viewed_user_id, user_view.profile_url)
+
+  def testDontRevealEmailsToPriviledgedDomain(self):
+    """We no longer give this advantage based on email address domain."""
+    for priviledged_user_domain in settings.priviledged_user_domains:
+      self.mr.auth.user_pb.email = 'test@' + priviledged_user_domain
+      self.CheckRevealAllToMember(100001, False)
+
+  def testRevealEmailToSelf(self):
+    logged_in_user = self.services.user.TestAddUser('user@example.com', 333)
+    self.mr.auth.user_pb = logged_in_user
+    self.CheckRevealAllToMember(333, True)
+
+  def testRevealAllEmailsToMembers_Collaborators(self):
+    self.CheckRevealAllToMember(0, False)
+    self.CheckRevealAllToMember(111, True)
+    self.CheckRevealAllToMember(222, True)
+    self.CheckRevealAllToMember(333, True)
+    self.CheckRevealAllToMember(444, False)
+
+    # Viewed user has indirect role in the project via a group.
+    self.CheckRevealAllToMember(0, False, group_id=888)
+    self.CheckRevealAllToMember(111, True, group_id=888)
+    # xxx re-implement
+    # self.CheckRevealAllToMember(
+    #     111, True, viewed_user_id=444, group_id=888)
+
+    # Logged in user has indirect role in the project via a group.
+    self.CheckRevealAllToMember(888, True)
+
+  def testDeprecatedRevealAllEmailsToMembers_Collaborators(self):
+    self.DeprecatedCheckRevealAllToMember(0, False)
+    self.DeprecatedCheckRevealAllToMember(111, True)
+    self.DeprecatedCheckRevealAllToMember(222, True)
+    self.DeprecatedCheckRevealAllToMember(333, True)
+    self.DeprecatedCheckRevealAllToMember(444, False)
+
+    # Viewed user has indirect role in the project via a group.
+    self.DeprecatedCheckRevealAllToMember(0, False, group_id=888)
+    self.DeprecatedCheckRevealAllToMember(111, True, group_id=888)
+
+    # Logged in user has indirect role in the project via a group.
+    self.DeprecatedCheckRevealAllToMember(888, True)
+
+  def testRevealAllEmailsToMembers_Admins(self):
+    self.CheckRevealAllToMember(555, False)
+    self.mr.auth.user_pb.is_site_admin = True
+    self.CheckRevealAllToMember(555, True)
+
+
+class RevealAllEmailsTest(unittest.TestCase):
+
+  def testRevealAllEmail(self):
+    users_by_id = {
+        111: framework_views.StuffUserView(111, 'a@a.com', True),
+        222: framework_views.StuffUserView(222, 'b@b.com', True),
+        333: framework_views.StuffUserView(333, 'c@c.com', True),
+        999: framework_views.StuffUserView(999, 'z@z.com', True),
+        }
+    # Assert display names are obscured before the reveal.
+    self.assertEqual('a...@a.com', users_by_id[111].display_name)
+    self.assertEqual('b...@b.com', users_by_id[222].display_name)
+    self.assertEqual('c...@c.com', users_by_id[333].display_name)
+    self.assertEqual('z...@z.com', users_by_id[999].display_name)
+
+    framework_views.RevealAllEmails(users_by_id)
+
+    self.assertFalse(users_by_id[111].obscure_email)
+    self.assertFalse(users_by_id[222].obscure_email)
+    self.assertFalse(users_by_id[333].obscure_email)
+    self.assertFalse(users_by_id[999].obscure_email)
+    # Assert display names are now revealed.
+    self.assertEqual('a@a.com', users_by_id[111].display_name)
+    self.assertEqual('b@b.com', users_by_id[222].display_name)
+    self.assertEqual('c@c.com', users_by_id[333].display_name)
+    self.assertEqual('z@z.com', users_by_id[999].display_name)
diff --git a/framework/test/gcs_helpers_test.py b/framework/test/gcs_helpers_test.py
new file mode 100644
index 0000000..3500e40
--- /dev/null
+++ b/framework/test/gcs_helpers_test.py
@@ -0,0 +1,185 @@
+# 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
+
+"""Unit tests for the framework_helpers module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+import uuid
+
+import mox
+
+from google.appengine.api import app_identity
+from google.appengine.api import images
+from google.appengine.api import urlfetch
+from google.appengine.ext import testbed
+from third_party import cloudstorage
+
+from framework import filecontent
+from framework import gcs_helpers
+from testing import fake
+from testing import testing_helpers
+
+
+class GcsHelpersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+    self.testbed.deactivate()
+
+  def testDeleteObjectFromGCS(self):
+    object_id = 'aaaaa'
+    bucket_name = 'test_bucket'
+    object_path = '/' + bucket_name + object_id
+
+    self.mox.StubOutWithMock(app_identity, 'get_default_gcs_bucket_name')
+    app_identity.get_default_gcs_bucket_name().AndReturn(bucket_name)
+
+    self.mox.StubOutWithMock(cloudstorage, 'delete')
+    cloudstorage.delete(object_path)
+
+    self.mox.ReplayAll()
+
+    gcs_helpers.DeleteObjectFromGCS(object_id)
+    self.mox.VerifyAll()
+
+  def testStoreObjectInGCS_ResizableMimeType(self):
+    guid = 'aaaaa'
+    project_id = 100
+    object_id = '/%s/attachments/%s' % (project_id, guid)
+    bucket_name = 'test_bucket'
+    object_path = '/' + bucket_name + object_id
+    mime_type = 'image/png'
+    content = 'content'
+    thumb_content = 'thumb_content'
+
+    self.mox.StubOutWithMock(app_identity, 'get_default_gcs_bucket_name')
+    app_identity.get_default_gcs_bucket_name().AndReturn(bucket_name)
+
+    self.mox.StubOutWithMock(uuid, 'uuid4')
+    uuid.uuid4().AndReturn(guid)
+
+    self.mox.StubOutWithMock(cloudstorage, 'open')
+    cloudstorage.open(
+        object_path, 'w', mime_type, options={}
+        ).AndReturn(fake.FakeFile())
+    cloudstorage.open(object_path + '-thumbnail', 'w', mime_type).AndReturn(
+        fake.FakeFile())
+
+    self.mox.StubOutWithMock(images, 'resize')
+    images.resize(content, gcs_helpers.DEFAULT_THUMB_WIDTH,
+                  gcs_helpers.DEFAULT_THUMB_HEIGHT).AndReturn(thumb_content)
+
+    self.mox.ReplayAll()
+
+    ret_id = gcs_helpers.StoreObjectInGCS(
+        content, mime_type, project_id, gcs_helpers.DEFAULT_THUMB_WIDTH,
+        gcs_helpers.DEFAULT_THUMB_HEIGHT)
+    self.mox.VerifyAll()
+    self.assertEqual(object_id, ret_id)
+
+  def testStoreObjectInGCS_NotResizableMimeType(self):
+    guid = 'aaaaa'
+    project_id = 100
+    object_id = '/%s/attachments/%s' % (project_id, guid)
+    bucket_name = 'test_bucket'
+    object_path = '/' + bucket_name + object_id
+    mime_type = 'not_resizable_mime_type'
+    content = 'content'
+
+    self.mox.StubOutWithMock(app_identity, 'get_default_gcs_bucket_name')
+    app_identity.get_default_gcs_bucket_name().AndReturn(bucket_name)
+
+    self.mox.StubOutWithMock(uuid, 'uuid4')
+    uuid.uuid4().AndReturn(guid)
+
+    self.mox.StubOutWithMock(cloudstorage, 'open')
+    options = {'Content-Disposition': 'inline; filename="file.ext"'}
+    cloudstorage.open(
+        object_path, 'w', mime_type, options=options
+        ).AndReturn(fake.FakeFile())
+
+    self.mox.ReplayAll()
+
+    ret_id = gcs_helpers.StoreObjectInGCS(
+        content, mime_type, project_id, gcs_helpers.DEFAULT_THUMB_WIDTH,
+        gcs_helpers.DEFAULT_THUMB_HEIGHT, filename='file.ext')
+    self.mox.VerifyAll()
+    self.assertEqual(object_id, ret_id)
+
+  def testCheckMemeTypeResizable(self):
+    for resizable_mime_type in gcs_helpers.RESIZABLE_MIME_TYPES:
+      gcs_helpers.CheckMimeTypeResizable(resizable_mime_type)
+
+    with self.assertRaises(gcs_helpers.UnsupportedMimeType):
+      gcs_helpers.CheckMimeTypeResizable('not_resizable_mime_type')
+
+  def testStoreLogoInGCS(self):
+    file_name = 'test_file.png'
+    mime_type = 'image/png'
+    content = 'test content'
+    project_id = 100
+    object_id = 123
+
+    self.mox.StubOutWithMock(filecontent, 'GuessContentTypeFromFilename')
+    filecontent.GuessContentTypeFromFilename(file_name).AndReturn(mime_type)
+
+    self.mox.StubOutWithMock(gcs_helpers, 'StoreObjectInGCS')
+    gcs_helpers.StoreObjectInGCS(
+        content, mime_type, project_id,
+        thumb_width=gcs_helpers.LOGO_THUMB_WIDTH,
+        thumb_height=gcs_helpers.LOGO_THUMB_HEIGHT).AndReturn(object_id)
+
+    self.mox.ReplayAll()
+
+    ret_id = gcs_helpers.StoreLogoInGCS(file_name, content, project_id)
+    self.mox.VerifyAll()
+    self.assertEqual(object_id, ret_id)
+
+  @mock.patch('google.appengine.api.urlfetch.fetch')
+  def testFetchSignedURL_Success(self, mock_fetch):
+    mock_fetch.return_value = testing_helpers.Blank(
+        headers={'Location': 'signed url'})
+    actual = gcs_helpers._FetchSignedURL('signing req url')
+    mock_fetch.assert_called_with('signing req url', follow_redirects=False)
+    self.assertEqual('signed url', actual)
+
+  @mock.patch('google.appengine.api.urlfetch.fetch')
+  def testFetchSignedURL_UnderpopulatedResult(self, mock_fetch):
+    mock_fetch.return_value = testing_helpers.Blank(headers={})
+    self.assertRaises(
+        KeyError, gcs_helpers._FetchSignedURL, 'signing req url')
+
+  @mock.patch('google.appengine.api.urlfetch.fetch')
+  def testFetchSignedURL_DownloadError(self, mock_fetch):
+    mock_fetch.side_effect = urlfetch.DownloadError
+    self.assertRaises(
+        urlfetch.DownloadError,
+        gcs_helpers._FetchSignedURL, 'signing req url')
+
+  @mock.patch('framework.gcs_helpers._FetchSignedURL')
+  def testSignUrl_Success(self, mock_FetchSignedURL):
+    with mock.patch(
+        'google.appengine.api.app_identity.get_access_token') as gat:
+      gat.return_value = ['token']
+      mock_FetchSignedURL.return_value = 'signed url'
+      signed_url = gcs_helpers.SignUrl('bucket', '/object')
+      self.assertEqual('signed url', signed_url)
+
+  @mock.patch('framework.gcs_helpers._FetchSignedURL')
+  def testSignUrl_DownloadError(self, mock_FetchSignedURL):
+    mock_FetchSignedURL.side_effect = urlfetch.DownloadError
+    self.assertEqual(
+        '/missing-gcs-url', gcs_helpers.SignUrl('bucket', '/object'))
diff --git a/framework/test/grid_view_helpers_test.py b/framework/test/grid_view_helpers_test.py
new file mode 100644
index 0000000..df3ecc6
--- /dev/null
+++ b/framework/test/grid_view_helpers_test.py
@@ -0,0 +1,201 @@
+# 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
+
+"""Unit tests for grid_view_helpers classes and functions."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import framework_constants
+from framework import framework_views
+from framework import grid_view_helpers
+from proto import tracker_pb2
+from testing import fake
+from tracker import tracker_bizobj
+
+
+class GridViewHelpersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.default_cols = 'a b c'
+    self.builtin_cols = 'a b x y z'
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+
+    self.art1 = fake.MakeTestIssue(
+        789, 1, 'a summary', '', 0, derived_owner_id=111, star_count=12,
+        derived_labels='Priority-Medium Hot Mstone-1 Mstone-2',
+        derived_status='Overdue')
+    self.art2 = fake.MakeTestIssue(
+        789, 1, 'a summary', 'New', 111, star_count=12, merged_into=200001,
+        labels='Priority-Medium Type-DEFECT Hot Mstone-1 Mstone-2')
+    self.users_by_id = {
+        111: framework_views.StuffUserView(111, 'foo@example.com', True),
+        }
+
+  def testSortGridHeadings(self):
+    config = fake.MakeTestConfig(
+        789, labels=('Priority-High Priority-Medium Priority-Low Hot Cold '
+                     'Milestone-Near Milestone-Far '
+                     'Day-Sun Day-Mon Day-Tue Day-Wed Day-Thu Day-Fri Day-Sat'),
+        statuses=('New Accepted Started Fixed WontFix Invalid Duplicate'))
+    config.field_defs = [
+        tracker_pb2.FieldDef(field_id=1, project_id=789, field_name='Day',
+                             field_type=tracker_pb2.FieldTypes.ENUM_TYPE)]
+    asc_accessors = {
+        'id': 'some function that is not called',
+        'reporter': 'some function that is not called',
+        'opened': 'some function that is not called',
+        'modified': 'some function that is not called',
+        }
+
+    # Verify that status headings are sorted according to the status
+    # values defined in the config.
+    col_name = 'status'
+    headings = ['Duplicate', 'Limbo', 'New', 'OnHold', 'Accepted', 'Fixed']
+    sorted_headings = grid_view_helpers.SortGridHeadings(
+        col_name, headings, self.users_by_id, config, asc_accessors)
+    self.assertEqual(
+        sorted_headings,
+        ['New', 'Accepted', 'Fixed', 'Duplicate', 'Limbo', 'OnHold'])
+
+    # Verify that special columns are sorted alphabetically or numerically.
+    col_name = 'id'
+    headings = [1, 2, 5, 3, 4]
+    sorted_headings = grid_view_helpers.SortGridHeadings(
+        col_name, headings, self.users_by_id, config, asc_accessors)
+    self.assertEqual(sorted_headings,
+                     [1, 2, 3, 4, 5])
+
+    # Verify that label value headings are sorted according to the labels
+    # values defined in the config.
+    col_name = 'priority'
+    headings = ['Medium', 'High', 'Low', 'dont-care']
+    sorted_headings = grid_view_helpers.SortGridHeadings(
+        col_name, headings, self.users_by_id, config, asc_accessors)
+    self.assertEqual(sorted_headings,
+                     ['High', 'Medium', 'Low', 'dont-care'])
+
+    # Verify that enum headings are sorted according to the labels
+    # values defined in the config.
+    col_name = 'day'
+    headings = ['Tue', 'Fri', 'Sun', 'Dogday', 'Wed', 'Caturday', 'Low']
+    sorted_headings = grid_view_helpers.SortGridHeadings(
+        col_name, headings, self.users_by_id, config, asc_accessors)
+    self.assertEqual(sorted_headings,
+                     ['Sun', 'Tue', 'Wed', 'Fri',
+                      'Caturday', 'Dogday', 'Low'])
+
+  def testGetArtifactAttr_Explicit(self):
+    label_values = grid_view_helpers.MakeLabelValuesDict(self.art2)
+
+    id_vals = grid_view_helpers.GetArtifactAttr(
+        self.art2, 'id', self.users_by_id, label_values, self.config, {})
+    self.assertEqual([1], id_vals)
+    summary_vals = grid_view_helpers.GetArtifactAttr(
+        self.art2, 'summary', self.users_by_id, label_values, self.config, {})
+    self.assertEqual(['a summary'], summary_vals)
+    status_vals = grid_view_helpers.GetArtifactAttr(
+        self.art2, 'status', self.users_by_id, label_values, self.config, {})
+    self.assertEqual(['New'], status_vals)
+    stars_vals = grid_view_helpers.GetArtifactAttr(
+        self.art2, 'stars', self.users_by_id, label_values, self.config, {})
+    self.assertEqual([12], stars_vals)
+    owner_vals = grid_view_helpers.GetArtifactAttr(
+        self.art2, 'owner', self.users_by_id, label_values, self.config, {})
+    self.assertEqual(['f...@example.com'], owner_vals)
+    priority_vals = grid_view_helpers.GetArtifactAttr(
+        self.art2, 'priority', self.users_by_id, label_values, self.config, {})
+    self.assertEqual(['Medium'], priority_vals)
+    mstone_vals = grid_view_helpers.GetArtifactAttr(
+        self.art2, 'mstone', self.users_by_id, label_values, self.config, {})
+    self.assertEqual(['1', '2'], mstone_vals)
+    foo_vals = grid_view_helpers.GetArtifactAttr(
+        self.art2, 'foo', self.users_by_id, label_values, self.config, {})
+    self.assertEqual([framework_constants.NO_VALUES], foo_vals)
+    art3 = fake.MakeTestIssue(
+        987, 5, 'unecessary summary', 'New', 111, star_count=12,
+        issue_id=200001, project_name='other-project')
+    related_issues = {200001: art3}
+    merged_into_vals = grid_view_helpers.GetArtifactAttr(
+        self.art2, 'mergedinto', self.users_by_id, label_values,
+        self.config, related_issues)
+    self.assertEqual(['other-project:5'], merged_into_vals)
+
+  def testGetArtifactAttr_Derived(self):
+    label_values = grid_view_helpers.MakeLabelValuesDict(self.art1)
+    status_vals = grid_view_helpers.GetArtifactAttr(
+        self.art1, 'status', self.users_by_id, label_values, self.config, {})
+    self.assertEqual(['Overdue'], status_vals)
+    owner_vals = grid_view_helpers.GetArtifactAttr(
+        self.art1, 'owner', self.users_by_id, label_values, self.config, {})
+    self.assertEqual(['f...@example.com'], owner_vals)
+    priority_vals = grid_view_helpers.GetArtifactAttr(
+        self.art1, 'priority', self.users_by_id, label_values, self.config, {})
+    self.assertEqual(['Medium'], priority_vals)
+    mstone_vals = grid_view_helpers.GetArtifactAttr(
+        self.art1, 'mstone', self.users_by_id, label_values, self.config, {})
+    self.assertEqual(['1', '2'], mstone_vals)
+
+  def testMakeLabelValuesDict_Empty(self):
+    art = fake.MakeTestIssue(
+        789, 1, 'a summary', '', 0, derived_owner_id=111, star_count=12)
+    label_values = grid_view_helpers.MakeLabelValuesDict(art)
+    self.assertEqual({}, label_values)
+
+  def testMakeLabelValuesDict(self):
+    art = fake.MakeTestIssue(
+        789, 1, 'a summary', '', 0, derived_owner_id=111, star_count=12,
+        labels=['Priority-Medium', 'Hot', 'Mstone-1', 'Mstone-2'])
+    label_values = grid_view_helpers.MakeLabelValuesDict(art)
+    self.assertEqual(
+        {'priority': ['Medium'], 'mstone': ['1', '2']},
+        label_values)
+
+    art = fake.MakeTestIssue(
+        789, 1, 'a summary', '', 0, derived_owner_id=111, star_count=12,
+        labels='Priority-Medium Hot Mstone-1'.split(),
+        derived_labels=['Mstone-2'])
+    label_values = grid_view_helpers.MakeLabelValuesDict(art)
+    self.assertEqual(
+        {'priority': ['Medium'], 'mstone': ['1', '2']},
+        label_values)
+
+  def testMakeDrillDownSearch(self):
+    self.assertEqual('-has:milestone ',
+                     grid_view_helpers.MakeDrillDownSearch('milestone', '----'))
+    self.assertEqual('milestone=22 ',
+                     grid_view_helpers.MakeDrillDownSearch('milestone', '22'))
+    self.assertEqual(
+        'owner=a@example.com ',
+        grid_view_helpers.MakeDrillDownSearch('owner', 'a@example.com'))
+
+  def testAnyArtifactHasNoAttr_Empty(self):
+    artifacts = []
+    all_label_values = {}
+    self.assertFalse(grid_view_helpers.AnyArtifactHasNoAttr(
+        artifacts, 'milestone', self.users_by_id, all_label_values,
+        self.config, {}))
+
+  def testAnyArtifactHasNoAttr(self):
+    artifacts = [self.art1]
+    all_label_values = {
+        self.art1.local_id: grid_view_helpers.MakeLabelValuesDict(self.art1),
+        }
+    self.assertFalse(grid_view_helpers.AnyArtifactHasNoAttr(
+        artifacts, 'mstone', self.users_by_id, all_label_values,
+        self.config, {}))
+    self.assertTrue(grid_view_helpers.AnyArtifactHasNoAttr(
+        artifacts, 'milestone', self.users_by_id, all_label_values,
+        self.config, {}))
+
+  def testGetGridViewData(self):
+    # TODO(jojwang): write this test
+    pass
+
+  def testPrepareForMakeGridData(self):
+    # TODO(jojwang): write this test
+    pass
diff --git a/framework/test/jsonfeed_test.py b/framework/test/jsonfeed_test.py
new file mode 100644
index 0000000..0a569e2
--- /dev/null
+++ b/framework/test/jsonfeed_test.py
@@ -0,0 +1,141 @@
+# 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
+
+"""Unit tests for jsonfeed module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import httplib
+import logging
+import unittest
+
+from google.appengine.api import app_identity
+
+from framework import jsonfeed
+from framework import servlet
+from framework import xsrf
+from services import service_manager
+from testing import testing_helpers
+
+
+class JsonFeedTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+
+  def testGet(self):
+    """Tests handling of GET requests."""
+    feed = TestableJsonFeed()
+
+    # all expected args are present + a bonus arg that should be ignored
+    feed.mr = testing_helpers.MakeMonorailRequest(
+        path='/foo/bar/wee?sna=foo', method='POST',
+        params={'a': '123', 'z': 'zebra'})
+    feed.get()
+
+    self.assertEqual(True, feed.handle_request_called)
+    self.assertEqual(1, len(feed.json_data))
+
+  def testPost(self):
+    """Tests handling of POST requests."""
+    feed = TestableJsonFeed()
+    feed.mr = testing_helpers.MakeMonorailRequest(
+        path='/foo/bar/wee?sna=foo', method='POST',
+        params={'a': '123', 'z': 'zebra'})
+
+    feed.post()
+
+    self.assertEqual(True, feed.handle_request_called)
+    self.assertEqual(1, len(feed.json_data))
+
+  def testSecurityTokenChecked_BadToken(self):
+    feed = TestableJsonFeed()
+    feed.mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 555})
+    # Note that feed.mr has no token set.
+    self.assertRaises(xsrf.TokenIncorrect, feed.get)
+    self.assertRaises(xsrf.TokenIncorrect, feed.post)
+
+    feed.mr.token = 'bad token'
+    self.assertRaises(xsrf.TokenIncorrect, feed.get)
+    self.assertRaises(xsrf.TokenIncorrect, feed.post)
+
+  def testSecurityTokenChecked_HandlerDoesNotNeedToken(self):
+    feed = TestableJsonFeed()
+    feed.mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 555})
+    # Note that feed.mr has no token set.
+    feed.CHECK_SECURITY_TOKEN = False
+    feed.get()
+    feed.post()
+
+  def testSecurityTokenChecked_AnonUserDoesNotNeedToken(self):
+    feed = TestableJsonFeed()
+    feed.mr = testing_helpers.MakeMonorailRequest()
+    # Note that feed.mr has no token set, but also no auth.user_id.
+    feed.get()
+    feed.post()
+
+  def testSameAppOnly_ExternallyAccessible(self):
+    feed = TestableJsonFeed()
+    feed.mr = testing_helpers.MakeMonorailRequest()
+    # Note that request has no X-Appengine-Inbound-Appid set.
+    feed.get()
+    feed.post()
+
+  def testSameAppOnly_InternalOnlyCalledFromSameApp(self):
+    feed = TestableJsonFeed()
+    feed.CHECK_SAME_APP = True
+    feed.mr = testing_helpers.MakeMonorailRequest()
+    app_id = app_identity.get_application_id()
+    feed.mr.request.headers['X-Appengine-Inbound-Appid'] = app_id
+    feed.get()
+    feed.post()
+
+  def testSameAppOnly_InternalOnlyCalledExternally(self):
+    feed = TestableJsonFeed()
+    feed.CHECK_SAME_APP = True
+    feed.mr = testing_helpers.MakeMonorailRequest()
+    # Note that request has no X-Appengine-Inbound-Appid set.
+    self.assertIsNone(feed.get())
+    self.assertFalse(feed.handle_request_called)
+    self.assertEqual(httplib.FORBIDDEN, feed.response.status)
+    self.assertIsNone(feed.post())
+    self.assertFalse(feed.handle_request_called)
+    self.assertEqual(httplib.FORBIDDEN, feed.response.status)
+
+  def testSameAppOnly_InternalOnlyCalledFromWrongApp(self):
+    feed = TestableJsonFeed()
+    feed.CHECK_SAME_APP = True
+    feed.mr = testing_helpers.MakeMonorailRequest()
+    feed.mr.request.headers['X-Appengine-Inbound-Appid'] = 'wrong'
+    self.assertIsNone(feed.get())
+    self.assertFalse(feed.handle_request_called)
+    self.assertEqual(httplib.FORBIDDEN, feed.response.status)
+    self.assertIsNone(feed.post())
+    self.assertFalse(feed.handle_request_called)
+    self.assertEqual(httplib.FORBIDDEN, feed.response.status)
+
+
+class TestableJsonFeed(jsonfeed.JsonFeed):
+
+  def __init__(self, request=None):
+    response = testing_helpers.Blank()
+    super(TestableJsonFeed, self).__init__(
+        request or 'req', response, services=service_manager.Services())
+
+    self.response_data = None
+    self.handle_request_called = False
+    self.json_data = None
+
+  def HandleRequest(self, mr):
+    self.handle_request_called = True
+    return {'a': mr.GetParam('a')}
+
+  # The output chain is hard to double so we pass on that phase,
+  # but save the response data for inspection
+  def _RenderJsonResponse(self, json_data):
+    self.json_data = json_data
diff --git a/framework/test/monitoring_test.py b/framework/test/monitoring_test.py
new file mode 100644
index 0000000..edbd15d
--- /dev/null
+++ b/framework/test/monitoring_test.py
@@ -0,0 +1,86 @@
+# Copyright 2020 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.
+
+"""Unit tests for the monitoring module."""
+
+import unittest
+from framework import monitoring
+
+COMMON_TEST_FIELDS = monitoring.GetCommonFields(200, 'monorail.v3.MethodName')
+
+
+class MonitoringTest(unittest.TestCase):
+
+  def testIncrementAPIRequestsCount(self):
+    # Non-service account email gets hidden.
+    monitoring.IncrementAPIRequestsCount(
+        'v3', 'monorail-prod', client_email='client-email@chicken.com')
+    self.assertEqual(
+        1,
+        monitoring.API_REQUESTS_COUNT.get(
+            fields={
+                'client_id': 'monorail-prod',
+                'client_email': 'user@email.com',
+                'version': 'v3'
+            }))
+
+    # None email address gets replaced by 'anonymous'.
+    monitoring.IncrementAPIRequestsCount('v3', 'monorail-prod')
+    self.assertEqual(
+        1,
+        monitoring.API_REQUESTS_COUNT.get(
+            fields={
+                'client_id': 'monorail-prod',
+                'client_email': 'anonymous',
+                'version': 'v3'
+            }))
+
+    # Service account email is not hidden
+    monitoring.IncrementAPIRequestsCount(
+        'endpoints',
+        'monorail-prod',
+        client_email='123456789@developer.gserviceaccount.com')
+    self.assertEqual(
+        1,
+        monitoring.API_REQUESTS_COUNT.get(
+            fields={
+                'client_id': 'monorail-prod',
+                'client_email': '123456789@developer.gserviceaccount.com',
+                'version': 'endpoints'
+            }))
+
+  def testGetCommonFields(self):
+    fields = monitoring.GetCommonFields(200, 'monorail.v3.TestName')
+    self.assertEqual(
+        {
+            'status': 200,
+            'name': 'monorail.v3.TestName',
+            'is_robot': False
+        }, fields)
+
+  def testAddServerDurations(self):
+    self.assertIsNone(
+        monitoring.SERVER_DURATIONS.get(fields=COMMON_TEST_FIELDS))
+    monitoring.AddServerDurations(500, COMMON_TEST_FIELDS)
+    self.assertIsNotNone(
+        monitoring.SERVER_DURATIONS.get(fields=COMMON_TEST_FIELDS))
+
+  def testIncrementServerResponseStatusCount(self):
+    monitoring.IncrementServerResponseStatusCount(COMMON_TEST_FIELDS)
+    self.assertEqual(
+        1, monitoring.SERVER_RESPONSE_STATUS.get(fields=COMMON_TEST_FIELDS))
+
+  def testAddServerRequesteBytes(self):
+    self.assertIsNone(
+        monitoring.SERVER_REQUEST_BYTES.get(fields=COMMON_TEST_FIELDS))
+    monitoring.AddServerRequesteBytes(1234, COMMON_TEST_FIELDS)
+    self.assertIsNotNone(
+        monitoring.SERVER_REQUEST_BYTES.get(fields=COMMON_TEST_FIELDS))
+
+  def testAddServerResponseBytes(self):
+    self.assertIsNone(
+        monitoring.SERVER_RESPONSE_BYTES.get(fields=COMMON_TEST_FIELDS))
+    monitoring.AddServerResponseBytes(9876, COMMON_TEST_FIELDS)
+    self.assertIsNotNone(
+        monitoring.SERVER_RESPONSE_BYTES.get(fields=COMMON_TEST_FIELDS))
diff --git a/framework/test/monorailcontext_test.py b/framework/test/monorailcontext_test.py
new file mode 100644
index 0000000..ed93920
--- /dev/null
+++ b/framework/test/monorailcontext_test.py
@@ -0,0 +1,89 @@
+# Copyright 2018 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
+
+"""Tests for MonorailContext."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mox
+
+from framework import authdata
+from framework import monorailcontext
+from framework import permissions
+from framework import profiler
+from framework import template_helpers
+from framework import sql
+from services import service_manager
+from testing import fake
+
+
+class MonorailContextTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.cnxn = fake.MonorailConnection()
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService())
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=789, owner_ids=[111])
+    self.user = self.services.user.TestAddUser('owner@example.com', 111)
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testConstructor_PassingAuthAndPerms(self):
+    """We can easily make an mc for testing."""
+    auth = authdata.AuthData(user_id=111, email='owner@example.com')
+    mc = monorailcontext.MonorailContext(
+      None, cnxn=self.cnxn, auth=auth, perms=permissions.USER_PERMISSIONSET)
+    self.assertEqual(self.cnxn, mc.cnxn)
+    self.assertEqual(auth, mc.auth)
+    self.assertEqual(permissions.USER_PERMISSIONSET, mc.perms)
+    self.assertTrue(isinstance(mc.profiler, profiler.Profiler))
+    self.assertEqual([], mc.warnings)
+    self.assertTrue(isinstance(mc.errors, template_helpers.EZTError))
+
+    mc.CleanUp()
+    self.assertIsNone(mc.cnxn)
+
+  def testConstructor_AsUsedInApp(self):
+    """We can make an mc like it is done in the app or a test."""
+    self.mox.StubOutClassWithMocks(sql, 'MonorailConnection')
+    mock_cnxn = sql.MonorailConnection()
+    mock_cnxn.Close()
+    requester = 'new-user@example.com'
+    self.mox.ReplayAll()
+
+    mc = monorailcontext.MonorailContext(self.services, requester=requester)
+    mc.LookupLoggedInUserPerms(self.project)
+    self.assertEqual(mock_cnxn, mc.cnxn)
+    self.assertEqual(requester, mc.auth.email)
+    self.assertEqual(permissions.USER_PERMISSIONSET, mc.perms)
+    self.assertTrue(isinstance(mc.profiler, profiler.Profiler))
+    self.assertEqual([], mc.warnings)
+    self.assertTrue(isinstance(mc.errors, template_helpers.EZTError))
+
+    mc.CleanUp()
+    self.assertIsNone(mc.cnxn)
+
+    # Double Cleanup or Cleanup with no cnxn is not a crash.
+    mc.CleanUp()
+    self.assertIsNone(mc.cnxn)
+
+  def testRepr(self):
+    """We get nice debugging strings."""
+    auth = authdata.AuthData(user_id=111, email='owner@example.com')
+    mc = monorailcontext.MonorailContext(
+      None, cnxn=self.cnxn, auth=auth, perms=permissions.USER_PERMISSIONSET)
+    repr_str = '%r' % mc
+    self.assertTrue(repr_str.startswith('MonorailContext('))
+    self.assertIn('owner@example.com', repr_str)
+    self.assertIn('view', repr_str)
diff --git a/framework/test/monorailrequest_test.py b/framework/test/monorailrequest_test.py
new file mode 100644
index 0000000..fcd30c3
--- /dev/null
+++ b/framework/test/monorailrequest_test.py
@@ -0,0 +1,613 @@
+# 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
+
+"""Unit tests for the monorailrequest module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import endpoints
+import mock
+import re
+import unittest
+
+import mox
+import six
+
+from google.appengine.api import oauth
+from google.appengine.api import users
+
+import webapp2
+
+from framework import exceptions
+from framework import monorailrequest
+from framework import permissions
+from proto import project_pb2
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_constants
+
+
+class HostportReTest(unittest.TestCase):
+
+  def testGood(self):
+    test_data = [
+      'localhost:8080',
+      'app.appspot.com',
+      'bugs-staging.chromium.org',
+      'vers10n-h3x-dot-app-id.appspot.com',
+      ]
+    for hostport in test_data:
+      self.assertTrue(monorailrequest._HOSTPORT_RE.match(hostport),
+                      msg='Incorrectly rejected %r' % hostport)
+
+  def testBad(self):
+    test_data = [
+      '',
+      ' ',
+      '\t',
+      '\n',
+      '\'',
+      '"',
+      'version"cruft-dot-app-id.appspot.com',
+      '\nother header',
+      'version&cruft-dot-app-id.appspot.com',
+      ]
+    for hostport in test_data:
+      self.assertFalse(monorailrequest._HOSTPORT_RE.match(hostport),
+                       msg='Incorrectly accepted %r' % hostport)
+
+
+class MonorailApiRequestUnitTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=789)
+    self.services.user.TestAddUser('requester@example.com', 111)
+    self.issue = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111)
+    self.services.issue.TestAddIssue(self.issue)
+
+    self.patcher_1 = mock.patch('endpoints.get_current_user')
+    self.mock_endpoints_gcu = self.patcher_1.start()
+    self.mock_endpoints_gcu.return_value = None
+    self.patcher_2 = mock.patch('google.appengine.api.oauth.get_current_user')
+    self.mock_oauth_gcu = self.patcher_2.start()
+    self.mock_oauth_gcu.return_value = testing_helpers.Blank(
+        email=lambda: 'requester@example.com')
+
+  def tearDown(self):
+    mock.patch.stopall()
+
+  def testInit_NoProjectIssueOrViewedUser(self):
+    request = testing_helpers.Blank()
+    mar = monorailrequest.MonorailApiRequest(
+        request, self.services, cnxn=self.cnxn)
+    self.assertIsNone(mar.project)
+    self.assertIsNone(mar.issue)
+
+  def testInit_WithProject(self):
+    request = testing_helpers.Blank(projectId='proj')
+    mar = monorailrequest.MonorailApiRequest(
+        request, self.services, cnxn=self.cnxn)
+    self.assertEqual(self.project, mar.project)
+    self.assertIsNone(mar.issue)
+
+  def testInit_WithProjectAndIssue(self):
+    request = testing_helpers.Blank(
+        projectId='proj', issueId=1)
+    mar = monorailrequest.MonorailApiRequest(
+        request, self.services, cnxn=self.cnxn)
+    self.assertEqual(self.project, mar.project)
+    self.assertEqual(self.issue, mar.issue)
+
+  def testGetParam_Normal(self):
+    request = testing_helpers.Blank(q='owner:me')
+    mar = monorailrequest.MonorailApiRequest(
+        request, self.services, cnxn=self.cnxn)
+    self.assertEqual(None, mar.GetParam('unknown'))
+    self.assertEqual(100, mar.GetParam('num'))
+    self.assertEqual('owner:me', mar.GetParam('q'))
+
+    request = testing_helpers.Blank(q='owner:me', maxResults=200)
+    mar = monorailrequest.MonorailApiRequest(
+        request, self.services, cnxn=self.cnxn)
+    self.assertEqual(200, mar.GetParam('num'))
+
+
+class MonorailRequestUnitTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        features=fake.FeaturesService())
+    self.project = self.services.project.TestAddProject('proj')
+    self.hotlist = self.services.features.TestAddHotlist(
+        'TestHotlist', owner_ids=[111])
+    self.services.user.TestAddUser('jrobbins@example.com', 111)
+
+    self.mox = mox.Mox()
+    self.mox.StubOutWithMock(users, 'get_current_user')
+    users.get_current_user().AndReturn(None)
+    self.mox.ReplayAll()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+
+  def testGetIntParam_ConvertsQueryParamToInt(self):
+    notice_id = 12345
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/foo?notice=%s' % notice_id)
+
+    value = mr.GetIntParam('notice')
+    self.assertTrue(isinstance(value, int))
+    self.assertEqual(notice_id, value)
+
+  def testGetIntParam_ConvertsQueryParamToLong(self):
+    notice_id = 12345678901234567890
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/foo?notice=%s' % notice_id)
+
+    value = mr.GetIntParam('notice')
+    self.assertTrue(isinstance(value, six.integer_types))
+    self.assertEqual(notice_id, value)
+
+  def testGetIntListParam_NoParam(self):
+    mr = monorailrequest.MonorailRequest(self.services)
+    mr.ParseRequest(webapp2.Request.blank('servlet'), self.services)
+    self.assertEqual(mr.GetIntListParam('ids'), None)
+    self.assertEqual(mr.GetIntListParam('ids', default_value=['test']),
+                      ['test'])
+
+  def testGetIntListParam_OneValue(self):
+    mr = monorailrequest.MonorailRequest(self.services)
+    mr.ParseRequest(webapp2.Request.blank('servlet?ids=11'), self.services)
+    self.assertEqual(mr.GetIntListParam('ids'), [11])
+    self.assertEqual(mr.GetIntListParam('ids', default_value=['test']),
+                      [11])
+
+  def testGetIntListParam_MultiValue(self):
+    mr = monorailrequest.MonorailRequest(self.services)
+    mr.ParseRequest(
+        webapp2.Request.blank('servlet?ids=21,22,23'), self.services)
+    self.assertEqual(mr.GetIntListParam('ids'), [21, 22, 23])
+    self.assertEqual(mr.GetIntListParam('ids', default_value=['test']),
+                      [21, 22, 23])
+
+  def testGetIntListParam_BogusValue(self):
+    mr = monorailrequest.MonorailRequest(self.services)
+    with self.assertRaises(exceptions.InputException):
+      mr.ParseRequest(
+          webapp2.Request.blank('servlet?ids=not_an_int'), self.services)
+
+  def testGetIntListParam_Malformed(self):
+    mr = monorailrequest.MonorailRequest(self.services)
+    with self.assertRaises(exceptions.InputException):
+      mr.ParseRequest(
+          webapp2.Request.blank('servlet?ids=31,32,,'), self.services)
+
+  def testDefaultValuesNoUrl(self):
+    """If request has no param, default param values should be used."""
+    mr = monorailrequest.MonorailRequest(self.services)
+    mr.ParseRequest(webapp2.Request.blank('servlet'), self.services)
+    self.assertEqual(mr.GetParam('r', 3), 3)
+    self.assertEqual(mr.GetIntParam('r', 3), 3)
+    self.assertEqual(mr.GetPositiveIntParam('r', 3), 3)
+    self.assertEqual(mr.GetIntListParam('r', [3, 4]), [3, 4])
+
+  def _MRWithMockRequest(
+      self, path, headers=None, *mr_args, **mr_kwargs):
+    request = webapp2.Request.blank(path, headers=headers)
+    mr = monorailrequest.MonorailRequest(self.services, *mr_args, **mr_kwargs)
+    mr.ParseRequest(request, self.services)
+    return mr
+
+  def testParseQueryParameters(self):
+    mr = self._MRWithMockRequest(
+        '/p/proj/issues/list?q=foo+OR+bar&num=50')
+    self.assertEqual('foo OR bar', mr.query)
+    self.assertEqual(50, mr.num)
+
+  def testParseQueryParameters_ModeMissing(self):
+    mr = self._MRWithMockRequest(
+        '/p/proj/issues/list?q=foo+OR+bar&num=50')
+    self.assertEqual('list', mr.mode)
+
+  def testParseQueryParameters_ModeList(self):
+    mr = self._MRWithMockRequest(
+        '/p/proj/issues/list?q=foo+OR+bar&num=50&mode=')
+    self.assertEqual('list', mr.mode)
+
+  def testParseQueryParameters_ModeGrid(self):
+    mr = self._MRWithMockRequest(
+        '/p/proj/issues/list?q=foo+OR+bar&num=50&mode=grid')
+    self.assertEqual('grid', mr.mode)
+
+  def testParseQueryParameters_ModeChart(self):
+    mr = self._MRWithMockRequest(
+        '/p/proj/issues/list?q=foo+OR+bar&num=50&mode=chart')
+    self.assertEqual('chart', mr.mode)
+
+  def testParseRequest_Scheme(self):
+    mr = self._MRWithMockRequest('/p/proj/')
+    self.assertEqual('http', mr.request.scheme)
+
+  def testParseRequest_HostportAndCurrentPageURL(self):
+    mr = self._MRWithMockRequest('/p/proj/', headers={
+        'Host': 'example.com',
+        'Cookie': 'asdf',
+        })
+    self.assertEqual('http', mr.request.scheme)
+    self.assertEqual('example.com', mr.request.host)
+    self.assertEqual('http://example.com/p/proj/', mr.current_page_url)
+
+  def testParseRequest_ProjectFound(self):
+    mr = self._MRWithMockRequest('/p/proj/')
+    self.assertEqual(mr.project, self.project)
+
+  def testParseRequest_ProjectNotFound(self):
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      self._MRWithMockRequest('/p/no-such-proj/')
+
+  def testViewedUser_WithEmail(self):
+    mr = self._MRWithMockRequest('/u/jrobbins@example.com/')
+    self.assertEqual('jrobbins@example.com', mr.viewed_username)
+    self.assertEqual(111, mr.viewed_user_auth.user_id)
+    self.assertEqual(
+        self.services.user.GetUser('fake cnxn', 111),
+        mr.viewed_user_auth.user_pb)
+
+  def testViewedUser_WithUserID(self):
+    mr = self._MRWithMockRequest('/u/111/')
+    self.assertEqual('jrobbins@example.com', mr.viewed_username)
+    self.assertEqual(111, mr.viewed_user_auth.user_id)
+    self.assertEqual(
+        self.services.user.GetUser('fake cnxn', 111),
+        mr.viewed_user_auth.user_pb)
+
+  def testViewedUser_NoSuchEmail(self):
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self._MRWithMockRequest('/u/unknownuser@example.com/')
+    self.assertEqual(404, cm.exception.code)
+
+  def testViewedUser_NoSuchUserID(self):
+    with self.assertRaises(exceptions.NoSuchUserException):
+      self._MRWithMockRequest('/u/234521111/')
+
+  def testGetParam(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/foo?syn=error!&a=a&empty=',
+        params=dict(over1='over_value1', over2='over_value2'))
+
+    # test tampering
+    self.assertRaises(exceptions.InputException, mr.GetParam, 'a',
+                      antitamper_re=re.compile(r'^$'))
+    self.assertRaises(exceptions.InputException, mr.GetParam,
+                      'undefined', default_value='default',
+                      antitamper_re=re.compile(r'^$'))
+
+    # test empty value
+    self.assertEqual('', mr.GetParam(
+        'empty', default_value='default', antitamper_re=re.compile(r'^$')))
+
+    # test default
+    self.assertEqual('default', mr.GetParam(
+        'undefined', default_value='default'))
+
+  def testComputeColSpec(self):
+    # No config passed, and nothing in URL
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/detail?id=123')
+    mr.ComputeColSpec(None)
+    self.assertEqual(tracker_constants.DEFAULT_COL_SPEC, mr.col_spec)
+
+    # No config passed, but set in URL
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/detail?id=123&colspec=a b C')
+    mr.ComputeColSpec(None)
+    self.assertEqual('a b C', mr.col_spec)
+
+    config = tracker_pb2.ProjectIssueConfig()
+
+    # No default in the config, and nothing in URL
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/detail?id=123')
+    mr.ComputeColSpec(config)
+    self.assertEqual(tracker_constants.DEFAULT_COL_SPEC, mr.col_spec)
+
+    # No default in the config, but set in URL
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/detail?id=123&colspec=a b C')
+    mr.ComputeColSpec(config)
+    self.assertEqual('a b C', mr.col_spec)
+
+    config.default_col_spec = 'd e f'
+
+    # Default in the config, and nothing in URL
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/detail?id=123')
+    mr.ComputeColSpec(config)
+    self.assertEqual('d e f', mr.col_spec)
+
+    # Default in the config, but overrided via URL
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/detail?id=123&colspec=a b C')
+    mr.ComputeColSpec(config)
+    self.assertEqual('a b C', mr.col_spec)
+
+    # project colspec contains hotlist columns
+    mr = testing_helpers.MakeMonorailRequest(
+        path='p/proj/issues/detail?id=123&colspec=Rank Adder Adder Owner')
+    mr.ComputeColSpec(None)
+    self.assertEqual(tracker_constants.DEFAULT_COL_SPEC, mr.col_spec)
+
+    # hotlist columns are not deleted when page is a hotlist page
+    mr = testing_helpers.MakeMonorailRequest(
+        path='u/jrobbins@example.com/hotlists/TestHotlist?colspec=Rank Adder',
+        hotlist=self.hotlist)
+    mr.ComputeColSpec(None)
+    self.assertEqual('Rank Adder', mr.col_spec)
+
+  def testComputeColSpec_XSS(self):
+    config_1 = tracker_pb2.ProjectIssueConfig()
+    config_2 = tracker_pb2.ProjectIssueConfig()
+    config_2.default_col_spec = "id '+alert(1)+'"
+    mr_1 = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/detail?id=123')
+    mr_2 = testing_helpers.MakeMonorailRequest(
+        path="/p/proj/issues/detail?id=123&colspec=id '+alert(1)+'")
+
+    # Normal colspec in config but malicious request
+    self.assertRaises(
+        exceptions.InputException,
+        mr_2.ComputeColSpec, config_1)
+
+    # Malicious colspec in config but normal request
+    self.assertRaises(
+        exceptions.InputException,
+        mr_1.ComputeColSpec, config_2)
+
+    # Malicious colspec in config and malicious request
+    self.assertRaises(
+        exceptions.InputException,
+        mr_2.ComputeColSpec, config_2)
+
+
+class CalcDefaultQueryTest(unittest.TestCase):
+
+  def setUp(self):
+    self.project = project_pb2.Project()
+    self.project.project_name = 'proj'
+    self.project.owner_ids = [111]
+    self.config = tracker_pb2.ProjectIssueConfig()
+
+  def testIssueListURL_NotDefaultCan(self):
+    mr = monorailrequest.MonorailRequest(None)
+    mr.query = None
+    mr.can = 1
+    self.assertEqual('', mr._CalcDefaultQuery())
+
+  def testIssueListURL_NoProject(self):
+    mr = monorailrequest.MonorailRequest(None)
+    mr.query = None
+    mr.can = 2
+    self.assertEqual('', mr._CalcDefaultQuery())
+
+  def testIssueListURL_NoConfig(self):
+    mr = monorailrequest.MonorailRequest(None)
+    mr.query = None
+    mr.can = 2
+    mr.project = self.project
+    self.assertEqual('', mr._CalcDefaultQuery())
+
+  def testIssueListURL_NotCustomized(self):
+    mr = monorailrequest.MonorailRequest(None)
+    mr.query = None
+    mr.can = 2
+    mr.project = self.project
+    mr.config = self.config
+    self.assertEqual('', mr._CalcDefaultQuery())
+
+  def testIssueListURL_Customized_Nonmember(self):
+    mr = monorailrequest.MonorailRequest(None)
+    mr.query = None
+    mr.can = 2
+    mr.project = self.project
+    mr.config = self.config
+    mr.config.member_default_query = 'owner:me'
+    self.assertEqual('', mr._CalcDefaultQuery())
+
+    mr.auth = testing_helpers.Blank(effective_ids=set())
+    self.assertEqual('', mr._CalcDefaultQuery())
+
+    mr.auth = testing_helpers.Blank(effective_ids={999})
+    self.assertEqual('', mr._CalcDefaultQuery())
+
+  def testIssueListURL_Customized_Member(self):
+    mr = monorailrequest.MonorailRequest(None)
+    mr.query = None
+    mr.can = 2
+    mr.project = self.project
+    mr.config = self.config
+    mr.config.member_default_query = 'owner:me'
+    mr.auth = testing_helpers.Blank(effective_ids={111})
+    self.assertEqual('owner:me', mr._CalcDefaultQuery())
+
+
+class TestMonorailRequestFunctions(unittest.TestCase):
+
+  def testExtractPathIdentifiers_ProjectOnly(self):
+    (username, project_name, hotlist_id,
+     hotlist_name) = monorailrequest._ParsePathIdentifiers(
+         '/p/proj/issues/list?q=foo+OR+bar&ts=1234')
+    self.assertIsNone(username)
+    self.assertIsNone(hotlist_id)
+    self.assertIsNone(hotlist_name)
+    self.assertEqual('proj', project_name)
+
+  def testExtractPathIdentifiers_ViewedUserOnly(self):
+    (username, project_name, hotlist_id,
+     hotlist_name) = monorailrequest._ParsePathIdentifiers(
+         '/u/jrobbins@example.com/')
+    self.assertEqual('jrobbins@example.com', username)
+    self.assertIsNone(project_name)
+    self.assertIsNone(hotlist_id)
+    self.assertIsNone(hotlist_name)
+
+  def testExtractPathIdentifiers_ViewedUserURLSpace(self):
+    (username, project_name, hotlist_id,
+     hotlist_name) = monorailrequest._ParsePathIdentifiers(
+         '/u/jrobbins@example.com/updates')
+    self.assertEqual('jrobbins@example.com', username)
+    self.assertIsNone(project_name)
+    self.assertIsNone(hotlist_id)
+    self.assertIsNone(hotlist_name)
+
+  def testExtractPathIdentifiers_ViewedGroupURLSpace(self):
+    (username, project_name, hotlist_id,
+     hotlist_name) = monorailrequest._ParsePathIdentifiers(
+        '/g/user-group@example.com/updates')
+    self.assertEqual('user-group@example.com', username)
+    self.assertIsNone(project_name)
+    self.assertIsNone(hotlist_id)
+    self.assertIsNone(hotlist_name)
+
+  def testExtractPathIdentifiers_HotlistIssuesURLSpaceById(self):
+    (username, project_name, hotlist_id,
+     hotlist_name) = monorailrequest._ParsePathIdentifiers(
+         '/u/jrobbins@example.com/hotlists/13124?q=stuff&ts=more')
+    self.assertIsNone(hotlist_name)
+    self.assertIsNone(project_name)
+    self.assertEqual('jrobbins@example.com', username)
+    self.assertEqual(13124, hotlist_id)
+
+  def testExtractPathIdentifiers_HotlistIssuesURLSpaceByName(self):
+    (username, project_name, hotlist_id,
+     hotlist_name) = monorailrequest._ParsePathIdentifiers(
+         '/u/jrobbins@example.com/hotlists/testname?q=stuff&ts=more')
+    self.assertIsNone(project_name)
+    self.assertIsNone(hotlist_id)
+    self.assertEqual('jrobbins@example.com', username)
+    self.assertEqual('testname', hotlist_name)
+
+  def testParseColSpec(self):
+    parse = monorailrequest.ParseColSpec
+    self.assertEqual(['PageName', 'Summary', 'Changed', 'ChangedBy'],
+                     parse(u'PageName Summary Changed ChangedBy'))
+    self.assertEqual(['Foo-Bar', 'Foo-Bar-Baz', 'Release-1.2', 'Hey', 'There'],
+                     parse('Foo-Bar Foo-Bar-Baz Release-1.2 Hey!There'))
+    self.assertEqual(
+        ['\xe7\xaa\xbf\xe8\x8b\xa5\xe7\xb9\xb9'.decode('utf-8'),
+         '\xe5\x9f\xba\xe5\x9c\xb0\xe3\x81\xaf'.decode('utf-8')],
+        parse('\xe7\xaa\xbf\xe8\x8b\xa5\xe7\xb9\xb9 '
+              '\xe5\x9f\xba\xe5\x9c\xb0\xe3\x81\xaf'.decode('utf-8')))
+
+  def testParseColSpec_Dedup(self):
+    """An attacker cannot inflate response size by repeating a column."""
+    parse = monorailrequest.ParseColSpec
+    self.assertEqual([], parse(''))
+    self.assertEqual(
+      ['Aa', 'b', 'c/d'],
+      parse(u'Aa Aa AA AA AA b Aa aa c/d d c aA b aa B C/D D/aa/c'))
+    self.assertEqual(
+      ['A', 'b', 'c/d', 'e', 'f'],
+      parse(u'A b c/d e f g h i j a/k l m/c/a n/o'))
+
+  def testParseColSpec_Huge(self):
+    """An attacker cannot inflate response size with a huge column name."""
+    parse = monorailrequest.ParseColSpec
+    self.assertEqual(
+      ['Aa', 'b', 'c/d'],
+      parse(u'Aa Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa b c/d'))
+
+  def testParseColSpec_Ignore(self):
+    """We ignore groupby and grid axes that would be useless."""
+    parse = monorailrequest.ParseColSpec
+    self.assertEqual(
+      ['Aa', 'b', 'c/d'],
+      parse(u'Aa AllLabels alllabels Id b opened/summary c/d',
+            ignore=tracker_constants.NOT_USED_IN_GRID_AXES))
+
+
+class TestPermissionLookup(unittest.TestCase):
+  OWNER_ID = 1
+  OTHER_USER_ID = 2
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.services.user.TestAddUser('owner@gmail.com', self.OWNER_ID)
+    self.services.user.TestAddUser('user@gmail.com', self.OTHER_USER_ID)
+    self.live_project = self.services.project.TestAddProject(
+        'live', owner_ids=[self.OWNER_ID])
+    self.archived_project = self.services.project.TestAddProject(
+        'archived', owner_ids=[self.OWNER_ID],
+        state=project_pb2.ProjectState.ARCHIVED)
+    self.members_only_project = self.services.project.TestAddProject(
+        'members-only', owner_ids=[self.OWNER_ID],
+        access=project_pb2.ProjectAccess.MEMBERS_ONLY)
+
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+
+  def CheckPermissions(self, perms, expect_view, expect_commit, expect_edit):
+    may_view = perms.HasPerm(permissions.VIEW, None, None)
+    self.assertEqual(expect_view, may_view)
+    may_commit = perms.HasPerm(permissions.COMMIT, None, None)
+    self.assertEqual(expect_commit, may_commit)
+    may_edit = perms.HasPerm(permissions.EDIT_PROJECT, None, None)
+    self.assertEqual(expect_edit, may_edit)
+
+  def MakeRequestAsUser(self, project_name, email):
+    self.mox.StubOutWithMock(users, 'get_current_user')
+    users.get_current_user().AndReturn(testing_helpers.Blank(
+        email=lambda: email))
+    self.mox.ReplayAll()
+
+    request = webapp2.Request.blank('/p/' + project_name)
+    mr = monorailrequest.MonorailRequest(self.services)
+    with mr.profiler.Phase('parse user info'):
+      mr.ParseRequest(request, self.services)
+      print('mr.auth is %r' % mr.auth)
+    return mr
+
+  def testOwnerPermissions_Live(self):
+    mr = self.MakeRequestAsUser('live', 'owner@gmail.com')
+    self.CheckPermissions(mr.perms, True, True, True)
+
+  def testOwnerPermissions_Archived(self):
+    mr = self.MakeRequestAsUser('archived', 'owner@gmail.com')
+    self.CheckPermissions(mr.perms, True, False, True)
+
+  def testOwnerPermissions_MembersOnly(self):
+    mr = self.MakeRequestAsUser('members-only', 'owner@gmail.com')
+    self.CheckPermissions(mr.perms, True, True, True)
+
+  def testExternalUserPermissions_Live(self):
+    mr = self.MakeRequestAsUser('live', 'user@gmail.com')
+    self.CheckPermissions(mr.perms, True, False, False)
+
+  def testExternalUserPermissions_Archived(self):
+    mr = self.MakeRequestAsUser('archived', 'user@gmail.com')
+    self.CheckPermissions(mr.perms, False, False, False)
+
+  def testExternalUserPermissions_MembersOnly(self):
+    mr = self.MakeRequestAsUser('members-only', 'user@gmail.com')
+    self.CheckPermissions(mr.perms, False, False, False)
diff --git a/framework/test/paginate_test.py b/framework/test/paginate_test.py
new file mode 100644
index 0000000..99adaa9
--- /dev/null
+++ b/framework/test/paginate_test.py
@@ -0,0 +1,145 @@
+# 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
+
+"""Unit tests for pagination classes."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from google.appengine.ext import testbed
+
+from framework import exceptions
+from framework import paginate
+from testing import testing_helpers
+from proto import secrets_pb2
+
+
+class PageTokenTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+
+  def testGeneratePageToken_DiffRequests(self):
+    request_cont_1 = secrets_pb2.ListRequestContents(
+        parent='same', page_size=1, order_by='same', query='same')
+    request_cont_2 = secrets_pb2.ListRequestContents(
+        parent='same', page_size=2, order_by='same', query='same')
+    start = 10
+    self.assertNotEqual(
+        paginate.GeneratePageToken(request_cont_1, start),
+        paginate.GeneratePageToken(request_cont_2, start))
+
+  def testValidateAndParsePageToken(self):
+    request_cont_1 = secrets_pb2.ListRequestContents(
+        parent='projects/chicken', page_size=1, order_by='boks', query='hay')
+    start = 2
+    token = paginate.GeneratePageToken(request_cont_1, start)
+    self.assertEqual(
+        start,
+        paginate.ValidateAndParsePageToken(token, request_cont_1))
+
+  def testValidateAndParsePageToken_InvalidContents(self):
+    request_cont_1 = secrets_pb2.ListRequestContents(
+        parent='projects/chicken', page_size=1, order_by='boks', query='hay')
+    start = 2
+    token = paginate.GeneratePageToken(request_cont_1, start)
+
+    request_cont_diff = secrets_pb2.ListRequestContents(
+        parent='projects/goose', page_size=1, order_by='boks', query='hay')
+    with self.assertRaises(exceptions.PageTokenException):
+      paginate.ValidateAndParsePageToken(token, request_cont_diff)
+
+  def testValidateAndParsePageToken_InvalidSerializedToken(self):
+    request_cont = secrets_pb2.ListRequestContents()
+    with self.assertRaises(exceptions.PageTokenException):
+      paginate.ValidateAndParsePageToken('sldkfj87', request_cont)
+
+  def testValidateAndParsePageToken_InvalidTokenFormat(self):
+    request_cont = secrets_pb2.ListRequestContents()
+    with self.assertRaises(exceptions.PageTokenException):
+      paginate.ValidateAndParsePageToken('///sldkfj87', request_cont)
+
+
+class PaginateTest(unittest.TestCase):
+
+  def testVirtualPagination(self):
+    # Paginating 0 results on a page that can hold 100.
+    mr = testing_helpers.MakeMonorailRequest(path='/issues/list')
+    total_count = 0
+    items_per_page = 100
+    start = 0
+    vp = paginate.VirtualPagination(total_count, items_per_page, start)
+    self.assertEqual(vp.num, 100)
+    self.assertEqual(vp.start, 1)
+    self.assertEqual(vp.last, 0)
+    self.assertFalse(vp.visible)
+
+    # Paginating 12 results on a page that can hold 100.
+    mr = testing_helpers.MakeMonorailRequest(path='/issues/list')
+    vp = paginate.VirtualPagination(12, 100, 0)
+    self.assertEqual(vp.num, 100)
+    self.assertEqual(vp.start, 1)
+    self.assertEqual(vp.last, 12)
+    self.assertTrue(vp.visible)
+
+    # Paginating 12 results on a page that can hold 10.
+    mr = testing_helpers.MakeMonorailRequest(path='/issues/list?num=10')
+    vp = paginate.VirtualPagination(12, 10, 0)
+    self.assertEqual(vp.num, 10)
+    self.assertEqual(vp.start, 1)
+    self.assertEqual(vp.last, 10)
+    self.assertTrue(vp.visible)
+
+    # Paginating 12 results starting at 5 on page that can hold 10.
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/issues/list?start=5&num=10')
+    vp = paginate.VirtualPagination(12, 10, 5)
+    self.assertEqual(vp.num, 10)
+    self.assertEqual(vp.start, 6)
+    self.assertEqual(vp.last, 12)
+    self.assertTrue(vp.visible)
+
+    # Paginating 123 results on a page that can hold 100.
+    mr = testing_helpers.MakeMonorailRequest(path='/issues/list')
+    vp = paginate.VirtualPagination(123, 100, 0)
+    self.assertEqual(vp.num, 100)
+    self.assertEqual(vp.start, 1)
+    self.assertEqual(vp.last, 100)
+    self.assertTrue(vp.visible)
+
+    # Paginating 123 results on second page that can hold 100.
+    mr = testing_helpers.MakeMonorailRequest(path='/issues/list?start=100')
+    vp = paginate.VirtualPagination(123, 100, 100)
+    self.assertEqual(vp.num, 100)
+    self.assertEqual(vp.start, 101)
+    self.assertEqual(vp.last, 123)
+    self.assertTrue(vp.visible)
+
+    # Paginating a huge number of objects will show at most 1000 per page.
+    mr = testing_helpers.MakeMonorailRequest(path='/issues/list?num=9999')
+    vp = paginate.VirtualPagination(12345, 9999, 0)
+    self.assertEqual(vp.num, 1000)
+    self.assertEqual(vp.start, 1)
+    self.assertEqual(vp.last, 1000)
+    self.assertTrue(vp.visible)
+
+    # Test urls for a hotlist pagination
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/u/hotlists/17?num=5&start=4')
+    mr.hotlist_id = 17
+    mr.auth.user_id = 112
+    vp = paginate.VirtualPagination(12, 5, 4,
+                                    list_page_url='/u/112/hotlists/17')
+    self.assertEqual(vp.num, 5)
+    self.assertEqual(vp.start, 5)
+    self.assertEqual(vp.last, 9)
+    self.assertTrue(vp.visible)
+    self.assertEqual('/u/112/hotlists/17?num=5&start=9', vp.next_url)
+    self.assertEqual('/u/112/hotlists/17?num=5&start=0', vp.prev_url)
diff --git a/framework/test/permissions_test.py b/framework/test/permissions_test.py
new file mode 100644
index 0000000..0917b53
--- /dev/null
+++ b/framework/test/permissions_test.py
@@ -0,0 +1,1860 @@
+# 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
+
+"""Tests for permissions.py."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+import unittest
+
+import mox
+
+import settings
+from framework import authdata
+from framework import framework_constants
+from framework import framework_views
+from framework import permissions
+from proto import features_pb2
+from proto import project_pb2
+from proto import site_pb2
+from proto import tracker_pb2
+from proto import user_pb2
+from proto import usergroup_pb2
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+
+
+class PermissionSetTest(unittest.TestCase):
+
+  def setUp(self):
+    self.perms = permissions.PermissionSet(['A', 'b', 'Cc'])
+    self.proj = project_pb2.Project()
+    self.proj.contributor_ids.append(111)
+    self.proj.contributor_ids.append(222)
+    self.proj.extra_perms.append(project_pb2.Project.ExtraPerms(
+        member_id=111, perms=['Cc', 'D', 'e', 'Ff']))
+    self.proj.extra_perms.append(project_pb2.Project.ExtraPerms(
+        member_id=222, perms=['G', 'H']))
+    # user 3 used to be a member and had extra perms, but no longer in project.
+    self.proj.extra_perms.append(project_pb2.Project.ExtraPerms(
+        member_id=333, perms=['G', 'H']))
+
+  def testGetAttr(self):
+    self.assertTrue(self.perms.a)
+    self.assertTrue(self.perms.A)
+    self.assertTrue(self.perms.b)
+    self.assertTrue(self.perms.Cc)
+    self.assertTrue(self.perms.CC)
+
+    self.assertFalse(self.perms.z)
+    self.assertFalse(self.perms.Z)
+
+  def testCanUsePerm_Anonymous(self):
+    effective_ids = set()
+    self.assertTrue(self.perms.CanUsePerm('A', effective_ids, self.proj, []))
+    self.assertFalse(self.perms.CanUsePerm('D', effective_ids, self.proj, []))
+    self.assertFalse(self.perms.CanUsePerm('Z', effective_ids, self.proj, []))
+
+  def testCanUsePerm_SignedInNoGroups(self):
+    effective_ids = {111}
+    self.assertTrue(self.perms.CanUsePerm('A', effective_ids, self.proj, []))
+    self.assertTrue(self.perms.CanUsePerm('D', effective_ids, self.proj, []))
+    self.assertTrue(self.perms.CanUsePerm(
+        'D', effective_ids, self.proj, ['Restrict-D-A']))
+    self.assertFalse(self.perms.CanUsePerm('G', effective_ids, self.proj, []))
+    self.assertFalse(self.perms.CanUsePerm('Z', effective_ids, self.proj, []))
+
+    effective_ids = {222}
+    self.assertTrue(self.perms.CanUsePerm('A', effective_ids, self.proj, []))
+    self.assertFalse(self.perms.CanUsePerm('D', effective_ids, self.proj, []))
+    self.assertTrue(self.perms.CanUsePerm('G', effective_ids, self.proj, []))
+    self.assertFalse(self.perms.CanUsePerm('Z', effective_ids, self.proj, []))
+    self.assertFalse(self.perms.CanUsePerm(
+        'Z', effective_ids, self.proj, ['Restrict-Z-A']))
+
+  def testCanUsePerm_SignedInWithGroups(self):
+    effective_ids = {111, 222, 333}
+    self.assertTrue(self.perms.CanUsePerm('A', effective_ids, self.proj, []))
+    self.assertTrue(self.perms.CanUsePerm('D', effective_ids, self.proj, []))
+    self.assertTrue(self.perms.CanUsePerm('G', effective_ids, self.proj, []))
+    self.assertTrue(self.perms.CanUsePerm(
+        'G', effective_ids, self.proj, ['Restrict-G-D']))
+    self.assertFalse(self.perms.CanUsePerm('Z', effective_ids, self.proj, []))
+    self.assertFalse(self.perms.CanUsePerm(
+        'G', effective_ids, self.proj, ['Restrict-G-Z']))
+
+  def testCanUsePerm_FormerMember(self):
+    effective_ids = {333}
+    self.assertTrue(self.perms.CanUsePerm('A', effective_ids, self.proj, []))
+    self.assertFalse(self.perms.CanUsePerm('D', effective_ids, self.proj, []))
+    self.assertFalse(self.perms.CanUsePerm('G', effective_ids, self.proj, []))
+    self.assertFalse(self.perms.CanUsePerm('Z', effective_ids, self.proj, []))
+
+  def testHasPerm_InPermSet(self):
+    self.assertTrue(self.perms.HasPerm('a', 0, None))
+    self.assertTrue(self.perms.HasPerm('a', 0, self.proj))
+    self.assertTrue(self.perms.HasPerm('A', 0, None))
+    self.assertTrue(self.perms.HasPerm('A', 0, self.proj))
+    self.assertFalse(self.perms.HasPerm('Z', 0, None))
+    self.assertFalse(self.perms.HasPerm('Z', 0, self.proj))
+
+  def testHasPerm_InExtraPerms(self):
+    self.assertTrue(self.perms.HasPerm('d', 111, self.proj))
+    self.assertTrue(self.perms.HasPerm('D', 111, self.proj))
+    self.assertTrue(self.perms.HasPerm('Cc', 111, self.proj))
+    self.assertTrue(self.perms.HasPerm('CC', 111, self.proj))
+    self.assertFalse(self.perms.HasPerm('Z', 111, self.proj))
+
+    self.assertFalse(self.perms.HasPerm('d', 222, self.proj))
+    self.assertFalse(self.perms.HasPerm('D', 222, self.proj))
+
+    # Only current members can have extra permissions
+    self.proj.contributor_ids = []
+    self.assertFalse(self.perms.HasPerm('d', 111, self.proj))
+
+    # TODO(jrobbins): also test consider_restrictions=False and
+    # restriction labels directly in this class.
+
+  def testHasPerm_OverrideExtraPerms(self):
+    # D is an extra perm for 111...
+    self.assertTrue(self.perms.HasPerm('d', 111, self.proj))
+    self.assertTrue(self.perms.HasPerm('D', 111, self.proj))
+    # ...unless we tell HasPerm it isn't.
+    self.assertFalse(self.perms.HasPerm('d', 111, self.proj, []))
+    self.assertFalse(self.perms.HasPerm('D', 111, self.proj, []))
+    # Perms in self.perms are still considered
+    self.assertTrue(self.perms.HasPerm('Cc', 111, self.proj, []))
+    self.assertTrue(self.perms.HasPerm('CC', 111, self.proj, []))
+    # Z is not an extra perm...
+    self.assertFalse(self.perms.HasPerm('Z', 111, self.proj))
+    # ...unless we tell HasPerm it is.
+    self.assertTrue(self.perms.HasPerm('Z', 111, self.proj, ['z']))
+
+  def testHasPerm_GrantedPerms(self):
+    self.assertTrue(self.perms.CanUsePerm(
+        'A', {111}, self.proj, [], granted_perms=['z']))
+    self.assertTrue(self.perms.CanUsePerm(
+        'a', {111}, self.proj, [], granted_perms=['z']))
+    self.assertTrue(self.perms.CanUsePerm(
+        'a', {111}, self.proj, [], granted_perms=['a']))
+    self.assertTrue(self.perms.CanUsePerm(
+        'Z', {111}, self.proj, [], granted_perms=['y', 'z']))
+    self.assertTrue(self.perms.CanUsePerm(
+        'z', {111}, self.proj, [], granted_perms=['y', 'z']))
+    self.assertFalse(self.perms.CanUsePerm(
+        'z', {111}, self.proj, [], granted_perms=['y']))
+
+  def testDebugString(self):
+    self.assertEqual('PermissionSet()',
+                     permissions.PermissionSet([]).DebugString())
+    self.assertEqual('PermissionSet(a)',
+                     permissions.PermissionSet(['A']).DebugString())
+    self.assertEqual('PermissionSet(a, b, cc)', self.perms.DebugString())
+
+  def testRepr(self):
+    self.assertEqual('PermissionSet(frozenset([]))',
+                     permissions.PermissionSet([]).__repr__())
+    self.assertEqual('PermissionSet(frozenset([\'a\']))',
+                     permissions.PermissionSet(['A']).__repr__())
+
+
+class PermissionsTest(unittest.TestCase):
+
+  NOW = 1277762224  # Any timestamp will do, we only compare it to itself +/- 1
+  COMMITTER_USER_ID = 111
+  OWNER_USER_ID = 222
+  CONTRIB_USER_ID = 333
+  SITE_ADMIN_USER_ID = 444
+
+  def MakeProject(self, project_name, state, add_members=True, access=None):
+    args = dict(project_name=project_name, state=state)
+    if add_members:
+      args.update(owner_ids=[self.OWNER_USER_ID],
+                  committer_ids=[self.COMMITTER_USER_ID],
+                  contributor_ids=[self.CONTRIB_USER_ID])
+
+    if access:
+      args.update(access=access)
+
+    return fake.Project(**args)
+
+  def setUp(self):
+    self.live_project = self.MakeProject('live', project_pb2.ProjectState.LIVE)
+    self.archived_project = self.MakeProject(
+        'archived', project_pb2.ProjectState.ARCHIVED)
+    self.other_live_project = self.MakeProject(
+        'other_live', project_pb2.ProjectState.LIVE, add_members=False)
+    self.members_only_project = self.MakeProject(
+        's3kr3t', project_pb2.ProjectState.LIVE,
+        access=project_pb2.ProjectAccess.MEMBERS_ONLY)
+
+    self.nonmember = user_pb2.User()
+    self.member = user_pb2.User()
+    self.owner = user_pb2.User()
+    self.contrib = user_pb2.User()
+    self.site_admin = user_pb2.User()
+    self.site_admin.is_site_admin = True
+    self.borg_user = user_pb2.User(email=settings.borg_service_account)
+
+    self.normal_artifact = tracker_pb2.Issue()
+    self.normal_artifact.labels.extend(['hot', 'Key-Value'])
+    self.normal_artifact.reporter_id = 111
+
+    # Two PermissionSets w/ permissions outside of any project.
+    self.normal_user_perms = permissions.GetPermissions(
+        None, {111}, None)
+    self.admin_perms = permissions.PermissionSet(
+        [permissions.ADMINISTER_SITE,
+         permissions.CREATE_PROJECT])
+
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+
+  def testGetPermissions_Admin(self):
+    self.assertEqual(
+        permissions.ADMIN_PERMISSIONSET,
+        permissions.GetPermissions(self.site_admin, None, None))
+
+  def testGetPermissions_BorgServiceAccount(self):
+    self.assertEqual(
+        permissions.GROUP_IMPORT_BORG_PERMISSIONSET,
+        permissions.GetPermissions(self.borg_user, None, None))
+
+  def CheckPermissions(self, perms, expected_list):
+    expect_view, expect_commit, expect_edit_project = expected_list
+    self.assertEqual(
+        expect_view, perms.HasPerm(permissions.VIEW, None, None))
+    self.assertEqual(
+        expect_commit, perms.HasPerm(permissions.COMMIT, None, None))
+    self.assertEqual(
+        expect_edit_project,
+        perms.HasPerm(permissions.EDIT_PROJECT, None, None))
+
+  def testAnonPermissions(self):
+    perms = permissions.GetPermissions(None, set(), self.live_project)
+    self.CheckPermissions(perms, [True, False, False])
+
+    perms = permissions.GetPermissions(None, set(), self.members_only_project)
+    self.CheckPermissions(perms, [False, False, False])
+
+  def testNonmemberPermissions(self):
+    perms = permissions.GetPermissions(
+        self.nonmember, {123}, self.live_project)
+    self.CheckPermissions(perms, [True, False, False])
+
+    perms = permissions.GetPermissions(
+        self.nonmember, {123}, self.members_only_project)
+    self.CheckPermissions(perms, [False, False, False])
+
+  def testMemberPermissions(self):
+    perms = permissions.GetPermissions(
+        self.member, {self.COMMITTER_USER_ID}, self.live_project)
+    self.CheckPermissions(perms, [True, True, False])
+
+    perms = permissions.GetPermissions(
+        self.member, {self.COMMITTER_USER_ID}, self.other_live_project)
+    self.CheckPermissions(perms, [True, False, False])
+
+    perms = permissions.GetPermissions(
+        self.member, {self.COMMITTER_USER_ID}, self.members_only_project)
+    self.CheckPermissions(perms, [True, True, False])
+
+  def testOwnerPermissions(self):
+    perms = permissions.GetPermissions(
+        self.owner, {self.OWNER_USER_ID}, self.live_project)
+    self.CheckPermissions(perms, [True, True, True])
+
+    perms = permissions.GetPermissions(
+        self.owner, {self.OWNER_USER_ID}, self.other_live_project)
+    self.CheckPermissions(perms, [True, False, False])
+
+    perms = permissions.GetPermissions(
+        self.owner, {self.OWNER_USER_ID}, self.members_only_project)
+    self.CheckPermissions(perms, [True, True, True])
+
+  def testContributorPermissions(self):
+    perms = permissions.GetPermissions(
+        self.contrib, {self.CONTRIB_USER_ID}, self.live_project)
+    self.CheckPermissions(perms, [True, False, False])
+
+    perms = permissions.GetPermissions(
+        self.contrib, {self.CONTRIB_USER_ID}, self.other_live_project)
+    self.CheckPermissions(perms, [True, False, False])
+
+    perms = permissions.GetPermissions(
+        self.contrib, {self.CONTRIB_USER_ID}, self.members_only_project)
+    self.CheckPermissions(perms, [True, False, False])
+
+  def testLookupPermset_ExactMatch(self):
+    self.assertEqual(
+        permissions.USER_PERMISSIONSET,
+        permissions._LookupPermset(
+            permissions.USER_ROLE, project_pb2.ProjectState.LIVE,
+            project_pb2.ProjectAccess.ANYONE))
+
+  def testLookupPermset_WildcardAccess(self):
+    self.assertEqual(
+        permissions.OWNER_ACTIVE_PERMISSIONSET,
+        permissions._LookupPermset(
+            permissions.OWNER_ROLE, project_pb2.ProjectState.LIVE,
+            project_pb2.ProjectAccess.MEMBERS_ONLY))
+
+  def testGetPermissionKey_AnonUser(self):
+    self.assertEqual(
+        (permissions.ANON_ROLE, permissions.UNDEFINED_STATUS,
+         permissions.UNDEFINED_ACCESS),
+        permissions._GetPermissionKey(None, None))
+    self.assertEqual(
+        (permissions.ANON_ROLE, project_pb2.ProjectState.LIVE,
+         project_pb2.ProjectAccess.ANYONE),
+        permissions._GetPermissionKey(None, self.live_project))
+
+  def testGetPermissionKey_ExpiredProject(self):
+    self.archived_project.delete_time = self.NOW
+    # In an expired project, the user's committe role does not count.
+    self.assertEqual(
+        (permissions.USER_ROLE, project_pb2.ProjectState.ARCHIVED,
+         project_pb2.ProjectAccess.ANYONE),
+        permissions._GetPermissionKey(
+            self.COMMITTER_USER_ID, self.archived_project,
+            expired_before=self.NOW + 1))
+    # If not expired yet, the user's committe role still counts.
+    self.assertEqual(
+        (permissions.COMMITTER_ROLE, project_pb2.ProjectState.ARCHIVED,
+         project_pb2.ProjectAccess.ANYONE),
+        permissions._GetPermissionKey(
+            self.COMMITTER_USER_ID, self.archived_project,
+            expired_before=self.NOW - 1))
+
+  def testGetPermissionKey_DefinedRoles(self):
+    self.assertEqual(
+        (permissions.OWNER_ROLE, project_pb2.ProjectState.LIVE,
+         project_pb2.ProjectAccess.ANYONE),
+        permissions._GetPermissionKey(
+            self.OWNER_USER_ID, self.live_project))
+    self.assertEqual(
+        (permissions.COMMITTER_ROLE, project_pb2.ProjectState.LIVE,
+         project_pb2.ProjectAccess.ANYONE),
+        permissions._GetPermissionKey(
+            self.COMMITTER_USER_ID, self.live_project))
+    self.assertEqual(
+        (permissions.CONTRIBUTOR_ROLE, project_pb2.ProjectState.LIVE,
+         project_pb2.ProjectAccess.ANYONE),
+        permissions._GetPermissionKey(
+            self.CONTRIB_USER_ID, self.live_project))
+
+  def testGetPermissionKey_Nonmember(self):
+    self.assertEqual(
+        (permissions.USER_ROLE, project_pb2.ProjectState.LIVE,
+         project_pb2.ProjectAccess.ANYONE),
+        permissions._GetPermissionKey(
+            999, self.live_project))
+
+  def testPermissionsImmutable(self):
+    self.assertTrue(isinstance(
+        permissions.EMPTY_PERMISSIONSET.perm_names, frozenset))
+    self.assertTrue(isinstance(
+        permissions.READ_ONLY_PERMISSIONSET.perm_names, frozenset))
+    self.assertTrue(isinstance(
+        permissions.COMMITTER_ACTIVE_PERMISSIONSET.perm_names, frozenset))
+    self.assertTrue(isinstance(
+        permissions.OWNER_ACTIVE_PERMISSIONSET.perm_names, frozenset))
+
+  def testGetExtraPerms(self):
+    project = project_pb2.Project()
+    project.committer_ids.append(222)
+    # User 1 is a former member with left-over extra perms that don't count.
+    project.extra_perms.append(project_pb2.Project.ExtraPerms(
+        member_id=111, perms=['a', 'b', 'c']))
+    project.extra_perms.append(project_pb2.Project.ExtraPerms(
+        member_id=222, perms=['a', 'b', 'c']))
+
+    self.assertListEqual(
+        [],
+        permissions.GetExtraPerms(project, 111))
+    self.assertListEqual(
+        ['a', 'b', 'c'],
+        permissions.GetExtraPerms(project, 222))
+    self.assertListEqual(
+        [],
+        permissions.GetExtraPerms(project, 333))
+
+  def testCanDeleteComment_NoPermissionSet(self):
+    """Test that if no PermissionSet is given, we can't delete comments."""
+    comment = tracker_pb2.IssueComment()
+    commenter = user_pb2.User()
+    # If no PermissionSet is given, the user cannot delete the comment.
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, 111, None))
+    # Same, with no user specified.
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, framework_constants.NO_USER_SPECIFIED, None))
+
+  def testCanDeleteComment_AnonUsersCannotDelete(self):
+    """Test that anon users can't delete comments."""
+    comment = tracker_pb2.IssueComment()
+    commenter = user_pb2.User()
+    perms = permissions.PermissionSet([permissions.DELETE_ANY])
+
+    # No logged in user, even with perms from somewhere.
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, framework_constants.NO_USER_SPECIFIED, perms))
+
+    # No logged in user, even if artifact was already deleted.
+    comment.deleted_by = 111
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, framework_constants.NO_USER_SPECIFIED, perms))
+
+  def testCanDeleteComment_DeleteAny(self):
+    """Test that users with DeleteAny permission can delete any comment.
+
+    Except for spam comments or comments by banned users.
+    """
+    comment = tracker_pb2.IssueComment(user_id=111)
+    commenter = user_pb2.User()
+    perms = permissions.PermissionSet([permissions.DELETE_ANY])
+
+    # Users with DeleteAny permission can delete their own comments.
+    self.assertTrue(permissions.CanDeleteComment(
+        comment, commenter, 111, perms))
+
+    # And also comments by other users
+    comment.user_id = 999
+    self.assertTrue(permissions.CanDeleteComment(
+        comment, commenter, 111, perms))
+
+    # As well as undelete comments they deleted.
+    comment.deleted_by = 111
+    self.assertTrue(permissions.CanDeleteComment(
+        comment, commenter, 111, perms))
+
+    # Or that other users deleted.
+    comment.deleted_by = 222
+    self.assertTrue(permissions.CanDeleteComment(
+        comment, commenter, 111, perms))
+
+  def testCanDeleteComment_DeleteOwn(self):
+    """Test that users with DeleteOwn permission can delete any comment.
+
+    Except for spam comments or comments by banned users.
+    """
+    comment = tracker_pb2.IssueComment(user_id=111)
+    commenter = user_pb2.User()
+    perms = permissions.PermissionSet([permissions.DELETE_OWN])
+
+    # Users with DeleteOwn permission can delete their own comments.
+    self.assertTrue(permissions.CanDeleteComment(
+        comment, commenter, 111, perms))
+
+    # But not comments by other users
+    comment.user_id = 999
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, 111, perms))
+
+    # They can undelete comments they deleted.
+    comment.user_id = 111
+    comment.deleted_by = 111
+    self.assertTrue(permissions.CanDeleteComment(
+        comment, commenter, 111, perms))
+
+    # But not comments that other users deleted.
+    comment.deleted_by = 222
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, 111, perms))
+
+  def testCanDeleteComment_CannotDeleteSpamComments(self):
+    """Test that nobody can (un)delete comments marked as spam."""
+    comment = tracker_pb2.IssueComment(user_id=111, is_spam=True)
+    commenter = user_pb2.User()
+
+    # Nobody can delete comments marked as spam.
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, 111,
+        permissions.PermissionSet([permissions.DELETE_OWN])))
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, 222,
+        permissions.PermissionSet([permissions.DELETE_ANY])))
+
+    # Nobody can undelete comments marked as spam.
+    comment.deleted_by = 222
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, 111,
+        permissions.PermissionSet([permissions.DELETE_OWN])))
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, 222,
+        permissions.PermissionSet([permissions.DELETE_ANY])))
+
+  def testCanDeleteComment_CannotDeleteCommentsByBannedUser(self):
+    """Test that nobody can (un)delete comments by banned users."""
+    comment = tracker_pb2.IssueComment(user_id=111)
+    commenter = user_pb2.User(banned='Some reason')
+
+    # Nobody can delete comments by banned users.
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, 111,
+        permissions.PermissionSet([permissions.DELETE_OWN])))
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, 222,
+        permissions.PermissionSet([permissions.DELETE_ANY])))
+
+    # Nobody can undelete comments by banned users.
+    comment.deleted_by = 222
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, 111,
+        permissions.PermissionSet([permissions.DELETE_OWN])))
+    self.assertFalse(permissions.CanDeleteComment(
+        comment, commenter, 222,
+        permissions.PermissionSet([permissions.DELETE_ANY])))
+
+  def testCanFlagComment_FlagSpamCanReport(self):
+    """Test that users with FlagSpam permissions can report comments."""
+    comment = tracker_pb2.IssueComment()
+    commenter = user_pb2.User()
+
+    can_flag, is_flagged = permissions.CanFlagComment(
+        comment, commenter, [], 111,
+        permissions.PermissionSet([permissions.FLAG_SPAM]))
+
+    self.assertTrue(can_flag)
+    self.assertFalse(is_flagged)
+
+  def testCanFlagComment_FlagSpamCanUnReportOwn(self):
+    """Test that users with FlagSpam permission can un-report comments they
+    previously reported."""
+    comment = tracker_pb2.IssueComment()
+    commenter = user_pb2.User()
+
+    can_flag, is_flagged = permissions.CanFlagComment(
+        comment, commenter, [111], 111,
+        permissions.PermissionSet([permissions.FLAG_SPAM]))
+
+    self.assertTrue(can_flag)
+    self.assertTrue(is_flagged)
+
+  def testCanFlagComment_FlagSpamCannotUnReportOthers(self):
+    """Test that users with FlagSpam permission doesn't know if other users have
+    reported a comment as spam."""
+    comment = tracker_pb2.IssueComment()
+    commenter = user_pb2.User()
+
+    can_flag, is_flagged = permissions.CanFlagComment(
+        comment, commenter, [222], 111,
+        permissions.PermissionSet([permissions.FLAG_SPAM]))
+
+    self.assertTrue(can_flag)
+    self.assertFalse(is_flagged)
+
+  def testCanFlagComment_FlagSpamCannotUnFlag(self):
+    comment = tracker_pb2.IssueComment(is_spam=True)
+    commenter = user_pb2.User()
+
+    can_flag, is_flagged = permissions.CanFlagComment(
+        comment, commenter, [111], 111,
+        permissions.PermissionSet([permissions.FLAG_SPAM]))
+
+    self.assertFalse(can_flag)
+    self.assertTrue(is_flagged)
+
+  def testCanFlagComment_VerdictSpamCanFlag(self):
+    """Test that users with FlagSpam permissions can flag comments."""
+    comment = tracker_pb2.IssueComment()
+    commenter = user_pb2.User()
+
+    can_flag, is_flagged = permissions.CanFlagComment(
+        comment, commenter, [], 111,
+        permissions.PermissionSet([permissions.VERDICT_SPAM]))
+
+    self.assertTrue(can_flag)
+    self.assertFalse(is_flagged)
+
+  def testCanFlagComment_VerdictSpamCanUnFlag(self):
+    """Test that users with FlagSpam permissions can un-flag comments."""
+    comment = tracker_pb2.IssueComment(is_spam=True)
+    commenter = user_pb2.User()
+
+    can_flag, is_flagged = permissions.CanFlagComment(
+        comment, commenter, [], 111,
+        permissions.PermissionSet([permissions.VERDICT_SPAM]))
+
+    self.assertTrue(can_flag)
+    self.assertTrue(is_flagged)
+
+  def testCanFlagComment_CannotFlagNoPermission(self):
+    """Test that users without permission cannot flag comments."""
+    comment = tracker_pb2.IssueComment()
+    commenter = user_pb2.User()
+
+    can_flag, is_flagged = permissions.CanFlagComment(
+        comment, commenter, [], 111,
+        permissions.PermissionSet([permissions.DELETE_ANY]))
+
+    self.assertFalse(can_flag)
+    self.assertFalse(is_flagged)
+
+  def testCanFlagComment_CannotUnFlagNoPermission(self):
+    """Test that users without permission cannot un-flag comments."""
+    comment = tracker_pb2.IssueComment(is_spam=True)
+    commenter = user_pb2.User()
+
+    can_flag, is_flagged = permissions.CanFlagComment(
+        comment, commenter, [], 111,
+        # Users need the VerdictSpam permission to be able to un-flag comments.
+        permissions.PermissionSet([
+            permissions.DELETE_ANY, permissions.FLAG_SPAM]))
+
+    self.assertFalse(can_flag)
+    self.assertTrue(is_flagged)
+
+  def testCanFlagComment_CannotFlagCommentByBannedUser(self):
+    """Test that nobady can flag comments by banned users."""
+    comment = tracker_pb2.IssueComment()
+    commenter = user_pb2.User(banned='Some reason')
+
+    can_flag, is_flagged = permissions.CanFlagComment(
+        comment, commenter, [], 111,
+        permissions.PermissionSet([
+            permissions.FLAG_SPAM, permissions.VERDICT_SPAM]))
+
+    self.assertFalse(can_flag)
+    self.assertFalse(is_flagged)
+
+  def testCanFlagComment_CannotUnFlagCommentByBannedUser(self):
+    """Test that nobady can un-flag comments by banned users."""
+    comment = tracker_pb2.IssueComment(is_spam=True)
+    commenter = user_pb2.User(banned='Some reason')
+
+    can_flag, is_flagged = permissions.CanFlagComment(
+        comment, commenter, [], 111,
+        permissions.PermissionSet([
+            permissions.FLAG_SPAM, permissions.VERDICT_SPAM]))
+
+    self.assertFalse(can_flag)
+    self.assertTrue(is_flagged)
+
+  def testCanFlagComment_CanUnFlagDeletedSpamComment(self):
+    """Test that we can un-flag a deleted comment that is spam."""
+    comment = tracker_pb2.IssueComment(is_spam=True, deleted_by=111)
+    commenter = user_pb2.User()
+
+    can_flag, is_flagged = permissions.CanFlagComment(
+        comment, commenter, [], 222,
+        permissions.PermissionSet([permissions.VERDICT_SPAM]))
+
+    self.assertTrue(can_flag)
+    self.assertTrue(is_flagged)
+
+  def testCanFlagComment_CannotFlagDeletedComment(self):
+    """Test that nobody can flag a deleted comment that is not spam."""
+    comment = tracker_pb2.IssueComment(deleted_by=111)
+    commenter = user_pb2.User()
+
+    can_flag, is_flagged = permissions.CanFlagComment(
+        comment, commenter, [], 111,
+        permissions.PermissionSet([
+            permissions.FLAG_SPAM, permissions.VERDICT_SPAM,
+            permissions.DELETE_ANY, permissions.DELETE_OWN]))
+
+    self.assertFalse(can_flag)
+    self.assertFalse(is_flagged)
+
+  def testCanViewComment_Normal(self):
+    """Test that we can view comments."""
+    comment = tracker_pb2.IssueComment()
+    commenter = user_pb2.User()
+    # We assume that CanViewIssue was already called. There are no further
+    # restrictions to view this comment.
+    self.assertTrue(permissions.CanViewComment(
+        comment, commenter, 111, None))
+
+  def testCanViewComment_CannotViewCommentsByBannedUser(self):
+    """Test that nobody can view comments by banned users."""
+    comment = tracker_pb2.IssueComment(user_id=111)
+    commenter = user_pb2.User(banned='Some reason')
+
+    # Nobody can view comments by banned users.
+    self.assertFalse(permissions.CanViewComment(
+        comment, commenter, 111, permissions.ADMIN_PERMISSIONSET))
+
+  def testCanViewComment_OnlyModeratorsCanViewSpamComments(self):
+    """Test that only users with VerdictSpam can view spam comments."""
+    comment = tracker_pb2.IssueComment(user_id=111, is_spam=True)
+    commenter = user_pb2.User()
+
+    # Users with VerdictSpam permission can view comments marked as spam.
+    self.assertTrue(permissions.CanViewComment(
+        comment, commenter, 222,
+        permissions.PermissionSet([permissions.VERDICT_SPAM])))
+
+    # Other users cannot view comments marked as spam, even if it is their own
+    # comment.
+    self.assertFalse(permissions.CanViewComment(
+        comment, commenter, 111,
+        permissions.PermissionSet([
+            permissions.FLAG_SPAM, permissions.DELETE_ANY,
+            permissions.DELETE_OWN])))
+
+  def testCanViewComment_DeletedComment(self):
+    """Test that for deleted comments, only the users that can undelete it can
+    view it.
+    """
+    comment = tracker_pb2.IssueComment(user_id=111, deleted_by=222)
+    commenter = user_pb2.User()
+
+    # Users with DeleteAny permission can view all deleted comments.
+    self.assertTrue(permissions.CanViewComment(
+        comment, commenter, 333,
+        permissions.PermissionSet([permissions.DELETE_ANY])))
+
+    # Users with DeleteOwn permissions can only see their own comments if they
+    # deleted them.
+    comment.user_id = comment.deleted_by = 333
+    self.assertTrue(permissions.CanViewComment(
+        comment, commenter, 333,
+        permissions.PermissionSet([permissions.DELETE_OWN])))
+
+    # But not comments they didn't delete.
+    comment.deleted_by = 111
+    self.assertFalse(permissions.CanViewComment(
+        comment, commenter, 333,
+        permissions.PermissionSet([permissions.DELETE_OWN])))
+
+  def testCanViewInboundMessage(self):
+    comment = tracker_pb2.IssueComment(user_id=111)
+
+    # Users can view their own inbound messages
+    self.assertTrue(permissions.CanViewInboundMessage(
+        comment, 111, permissions.EMPTY_PERMISSIONSET))
+
+    # Users with the ViewInboundMessages permissions can view inbound messages.
+    self.assertTrue(permissions.CanViewInboundMessage(
+        comment, 333,
+        permissions.PermissionSet([permissions.VIEW_INBOUND_MESSAGES])))
+
+    # Other users cannot view inbound messages.
+    self.assertFalse(permissions.CanViewInboundMessage(
+        comment, 333,
+        permissions.PermissionSet([permissions.VIEW])))
+
+  def testCanViewNormalArifact(self):
+    # Anyone can view a non-restricted artifact.
+    self.assertTrue(permissions.CanView(
+        {111}, permissions.READ_ONLY_PERMISSIONSET,
+        self.live_project, []))
+
+  def testCanCreateProject_NoPerms(self):
+    """Signed out users cannot create projects."""
+    self.assertFalse(permissions.CanCreateProject(
+        permissions.EMPTY_PERMISSIONSET))
+
+    self.assertFalse(permissions.CanCreateProject(
+        permissions.READ_ONLY_PERMISSIONSET))
+
+  def testCanCreateProject_Admin(self):
+    """Site admins can create projects."""
+    self.assertTrue(permissions.CanCreateProject(
+        permissions.ADMIN_PERMISSIONSET))
+
+  def testCanCreateProject_RegularUser(self):
+    """Signed in non-admins can create a project if settings allow ANYONE."""
+    try:
+      orig_restriction = settings.project_creation_restriction
+      ANYONE = site_pb2.UserTypeRestriction.ANYONE
+      ADMIN_ONLY = site_pb2.UserTypeRestriction.ADMIN_ONLY
+      NO_ONE = site_pb2.UserTypeRestriction.NO_ONE
+      perms = permissions.PermissionSet([permissions.CREATE_PROJECT])
+
+      settings.project_creation_restriction = ANYONE
+      self.assertTrue(permissions.CanCreateProject(perms))
+
+      settings.project_creation_restriction = ADMIN_ONLY
+      self.assertFalse(permissions.CanCreateProject(perms))
+
+      settings.project_creation_restriction = NO_ONE
+      self.assertFalse(permissions.CanCreateProject(perms))
+      self.assertFalse(permissions.CanCreateProject(
+          permissions.ADMIN_PERMISSIONSET))
+    finally:
+      settings.project_creation_restriction = orig_restriction
+
+  def testCanCreateGroup_AnyoneWithCreateGroup(self):
+    orig_setting = settings.group_creation_restriction
+    try:
+      settings.group_creation_restriction = site_pb2.UserTypeRestriction.ANYONE
+      self.assertTrue(permissions.CanCreateGroup(
+          permissions.PermissionSet([permissions.CREATE_GROUP])))
+      self.assertFalse(permissions.CanCreateGroup(
+          permissions.PermissionSet([])))
+    finally:
+      settings.group_creation_restriction = orig_setting
+
+  def testCanCreateGroup_AdminOnly(self):
+    orig_setting = settings.group_creation_restriction
+    try:
+      ADMIN_ONLY = site_pb2.UserTypeRestriction.ADMIN_ONLY
+      settings.group_creation_restriction = ADMIN_ONLY
+      self.assertTrue(permissions.CanCreateGroup(
+          permissions.PermissionSet([permissions.ADMINISTER_SITE])))
+      self.assertFalse(permissions.CanCreateGroup(
+          permissions.PermissionSet([permissions.CREATE_GROUP])))
+      self.assertFalse(permissions.CanCreateGroup(
+          permissions.PermissionSet([])))
+    finally:
+      settings.group_creation_restriction = orig_setting
+
+  def testCanCreateGroup_UnspecifiedSetting(self):
+    orig_setting = settings.group_creation_restriction
+    try:
+      settings.group_creation_restriction = None
+      self.assertFalse(permissions.CanCreateGroup(
+          permissions.PermissionSet([permissions.ADMINISTER_SITE])))
+      self.assertFalse(permissions.CanCreateGroup(
+          permissions.PermissionSet([permissions.CREATE_GROUP])))
+      self.assertFalse(permissions.CanCreateGroup(
+          permissions.PermissionSet([])))
+    finally:
+      settings.group_creation_restriction = orig_setting
+
+  def testCanEditGroup_HasPerm(self):
+    self.assertTrue(permissions.CanEditGroup(
+        permissions.PermissionSet([permissions.EDIT_GROUP]), None, None))
+
+  def testCanEditGroup_IsOwner(self):
+    self.assertTrue(permissions.CanEditGroup(
+        permissions.PermissionSet([]), {111}, {111}))
+
+  def testCanEditGroup_Otherwise(self):
+    self.assertFalse(permissions.CanEditGroup(
+        permissions.PermissionSet([]), {111}, {222}))
+
+  def testCanViewGroupMembers_HasPerm(self):
+    self.assertTrue(permissions.CanViewGroupMembers(
+        permissions.PermissionSet([permissions.VIEW_GROUP]),
+        None, None, None, None, None))
+
+  def testCanViewGroupMembers_IsMemberOfFriendProject(self):
+    group_settings = usergroup_pb2.MakeSettings('owners', friend_projects=[890])
+    self.assertFalse(permissions.CanViewGroupMembers(
+        permissions.PermissionSet([]),
+        {111}, group_settings, {222}, {333}, {789}))
+    self.assertTrue(permissions.CanViewGroupMembers(
+        permissions.PermissionSet([]),
+        {111}, group_settings, {222}, {333}, {789, 890}))
+
+  def testCanViewGroupMembers_VisibleToOwner(self):
+    group_settings = usergroup_pb2.MakeSettings('owners')
+    self.assertFalse(permissions.CanViewGroupMembers(
+        permissions.PermissionSet([]),
+        {111}, group_settings, {222}, {333}, {789}))
+    self.assertFalse(permissions.CanViewGroupMembers(
+        permissions.PermissionSet([]),
+        {222}, group_settings, {222}, {333}, {789}))
+    self.assertTrue(permissions.CanViewGroupMembers(
+        permissions.PermissionSet([]),
+        {333}, group_settings, {222}, {333}, {789}))
+
+  def testCanViewGroupMembers_IsVisibleToMember(self):
+    group_settings = usergroup_pb2.MakeSettings('members')
+    self.assertFalse(permissions.CanViewGroupMembers(
+        permissions.PermissionSet([]),
+        {111}, group_settings, {222}, {333}, {789}))
+    self.assertTrue(permissions.CanViewGroupMembers(
+        permissions.PermissionSet([]),
+        {222}, group_settings, {222}, {333}, {789}))
+    self.assertTrue(permissions.CanViewGroupMembers(
+        permissions.PermissionSet([]),
+        {333}, group_settings, {222}, {333}, {789}))
+
+  def testCanViewGroupMembers_AnyoneCanView(self):
+    group_settings = usergroup_pb2.MakeSettings('anyone')
+    self.assertTrue(permissions.CanViewGroupMembers(
+        permissions.PermissionSet([]),
+        {111}, group_settings, {222}, {333}, {789}))
+
+  def testIsBanned_AnonUser(self):
+    user_view = framework_views.StuffUserView(None, None, True)
+    self.assertFalse(permissions.IsBanned(None, user_view))
+
+  def testIsBanned_NormalUser(self):
+    user = user_pb2.User()
+    user_view = framework_views.StuffUserView(None, None, True)
+    self.assertFalse(permissions.IsBanned(user, user_view))
+
+  def testIsBanned_BannedUser(self):
+    user = user_pb2.User()
+    user.banned = 'spammer'
+    user_view = framework_views.StuffUserView(None, None, True)
+    self.assertTrue(permissions.IsBanned(user, user_view))
+
+  def testIsBanned_BadDomainUser(self):
+    user = user_pb2.User()
+    self.assertFalse(permissions.IsBanned(user, None))
+
+    user_view = framework_views.StuffUserView(None, None, True)
+    user_view.domain = 'spammer.com'
+    self.assertFalse(permissions.IsBanned(user, user_view))
+
+    orig_banned_user_domains = settings.banned_user_domains
+    settings.banned_user_domains = ['spammer.com', 'phisher.com']
+    self.assertTrue(permissions.IsBanned(user, user_view))
+    settings.banned_user_domains = orig_banned_user_domains
+
+  def testIsBanned_PlusAddressUser(self):
+    """We don't allow users who have + in their email address."""
+    user = user_pb2.User(email='user@example.com')
+    self.assertFalse(permissions.IsBanned(user, None))
+
+    user.email = 'user+shadystuff@example.com'
+    self.assertTrue(permissions.IsBanned(user, None))
+
+  def testCanExpungeUser_Admin(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.perms = permissions.ADMIN_PERMISSIONSET
+    self.assertTrue(permissions.CanExpungeUsers(mr))
+
+  def testGetCustomPermissions(self):
+    project = project_pb2.Project()
+    self.assertListEqual([], permissions.GetCustomPermissions(project))
+
+    project.extra_perms.append(project_pb2.Project.ExtraPerms(
+        perms=['Core', 'Elite', 'Gold']))
+    self.assertListEqual(['Core', 'Elite', 'Gold'],
+                         permissions.GetCustomPermissions(project))
+
+    project.extra_perms.append(project_pb2.Project.ExtraPerms(
+        perms=['Silver', 'Gold', 'Bronze']))
+    self.assertListEqual(['Bronze', 'Core', 'Elite', 'Gold', 'Silver'],
+                         permissions.GetCustomPermissions(project))
+
+    # View is not returned because it is a starndard permission.
+    project.extra_perms.append(project_pb2.Project.ExtraPerms(
+        perms=['Bronze', permissions.VIEW]))
+    self.assertListEqual(['Bronze', 'Core', 'Elite', 'Gold', 'Silver'],
+                         permissions.GetCustomPermissions(project))
+
+  def testUserCanViewProject(self):
+    self.mox.StubOutWithMock(time, 'time')
+    for _ in range(8):
+      time.time().AndReturn(self.NOW)
+    self.mox.ReplayAll()
+
+    self.assertTrue(permissions.UserCanViewProject(
+        self.member, {self.COMMITTER_USER_ID}, self.live_project))
+    self.assertTrue(permissions.UserCanViewProject(
+        None, None, self.live_project))
+
+    self.archived_project.delete_time = self.NOW + 1
+    self.assertFalse(permissions.UserCanViewProject(
+        None, None, self.archived_project))
+    self.assertTrue(permissions.UserCanViewProject(
+        self.owner, {self.OWNER_USER_ID}, self.archived_project))
+    self.assertTrue(permissions.UserCanViewProject(
+        self.site_admin, {self.SITE_ADMIN_USER_ID},
+        self.archived_project))
+
+    self.archived_project.delete_time = self.NOW - 1
+    self.assertFalse(permissions.UserCanViewProject(
+        None, None, self.archived_project))
+    self.assertFalse(permissions.UserCanViewProject(
+        self.owner, {self.OWNER_USER_ID}, self.archived_project))
+    self.assertTrue(permissions.UserCanViewProject(
+        self.site_admin, {self.SITE_ADMIN_USER_ID},
+        self.archived_project))
+
+    self.mox.VerifyAll()
+
+  def CheckExpired(self, state, expected_to_be_reapable):
+    proj = project_pb2.Project()
+    proj.state = state
+    proj.delete_time = self.NOW + 1
+    self.assertFalse(permissions.IsExpired(proj))
+
+    proj.delete_time = self.NOW - 1
+    self.assertEqual(expected_to_be_reapable, permissions.IsExpired(proj))
+
+    proj.delete_time = self.NOW - 1
+    self.assertFalse(permissions.IsExpired(proj, expired_before=self.NOW - 2))
+
+  def testIsExpired_Live(self):
+    self.CheckExpired(project_pb2.ProjectState.LIVE, False)
+
+  def testIsExpired_Archived(self):
+    self.mox.StubOutWithMock(time, 'time')
+    for _ in range(2):
+      time.time().AndReturn(self.NOW)
+    self.mox.ReplayAll()
+
+    self.CheckExpired(project_pb2.ProjectState.ARCHIVED, True)
+
+    self.mox.VerifyAll()
+
+
+class PermissionsCheckTest(unittest.TestCase):
+
+  def setUp(self):
+    self.perms = permissions.PermissionSet(['a', 'b', 'c'])
+
+    self.proj = project_pb2.Project()
+    self.proj.committer_ids.append(111)
+    self.proj.extra_perms.append(project_pb2.Project.ExtraPerms(
+        member_id=111, perms=['d']))
+
+    # Note: z is an example of a perm that the user does not have.
+    # Note: q is an example of an irrelevant perm that the user does not have.
+
+  def DoCanUsePerm(self, perm, project='default', user_id=None, restrict=''):
+    """Wrapper function to call CanUsePerm()."""
+    if project == 'default':
+      project = self.proj
+    return self.perms.CanUsePerm(
+        perm, {user_id or 111}, project, restrict.split())
+
+  def testHasPermNoRestrictions(self):
+    self.assertTrue(self.DoCanUsePerm('a'))
+    self.assertTrue(self.DoCanUsePerm('A'))
+    self.assertFalse(self.DoCanUsePerm('z'))
+    self.assertTrue(self.DoCanUsePerm('d'))
+    self.assertFalse(self.DoCanUsePerm('d', user_id=222))
+    self.assertFalse(self.DoCanUsePerm('d', project=project_pb2.Project()))
+
+  def testHasPermOperationRestrictions(self):
+    self.assertTrue(self.DoCanUsePerm('a', restrict='Restrict-a-b'))
+    self.assertTrue(self.DoCanUsePerm('a', restrict='Restrict-b-z'))
+    self.assertTrue(self.DoCanUsePerm('a', restrict='Restrict-a-d'))
+    self.assertTrue(self.DoCanUsePerm('d', restrict='Restrict-d-a'))
+    self.assertTrue(self.DoCanUsePerm(
+        'd', restrict='Restrict-q-z Restrict-q-d Restrict-d-a'))
+
+    self.assertFalse(self.DoCanUsePerm('a', restrict='Restrict-a-z'))
+    self.assertFalse(self.DoCanUsePerm('d', restrict='Restrict-d-z'))
+    self.assertFalse(self.DoCanUsePerm(
+        'd', restrict='Restrict-d-a Restrict-d-z'))
+
+  def testHasPermOutsideProjectScope(self):
+    self.assertTrue(self.DoCanUsePerm('a', project=None))
+    self.assertTrue(self.DoCanUsePerm(
+        'a', project=None, restrict='Restrict-a-c'))
+    self.assertTrue(self.DoCanUsePerm(
+        'a', project=None, restrict='Restrict-q-z'))
+
+    self.assertFalse(self.DoCanUsePerm('z', project=None))
+    self.assertFalse(self.DoCanUsePerm(
+        'a', project=None, restrict='Restrict-a-d'))
+
+
+class CanViewProjectContributorListTest(unittest.TestCase):
+
+  def testCanViewProjectContributorList_NoProject(self):
+    mr = testing_helpers.MakeMonorailRequest(path='/')
+    self.assertFalse(permissions.CanViewContributorList(mr, mr.project))
+
+  def testCanViewProjectContributorList_NormalProject(self):
+    project = project_pb2.Project()
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/', project=project)
+    self.assertTrue(permissions.CanViewContributorList(mr, mr.project))
+
+  def testCanViewProjectContributorList_ProjectWithOptionSet(self):
+    project = project_pb2.Project()
+    project.only_owners_see_contributors = True
+
+    for perms in [permissions.READ_ONLY_PERMISSIONSET,
+                  permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET,
+                  permissions.CONTRIBUTOR_INACTIVE_PERMISSIONSET]:
+      mr = testing_helpers.MakeMonorailRequest(
+          path='/p/proj/', project=project, perms=perms)
+      self.assertFalse(permissions.CanViewContributorList(mr, mr.project))
+
+    for perms in [permissions.COMMITTER_ACTIVE_PERMISSIONSET,
+                  permissions.COMMITTER_INACTIVE_PERMISSIONSET,
+                  permissions.OWNER_ACTIVE_PERMISSIONSET,
+                  permissions.OWNER_INACTIVE_PERMISSIONSET,
+                  permissions.ADMIN_PERMISSIONSET]:
+      mr = testing_helpers.MakeMonorailRequest(
+          path='/p/proj/', project=project, perms=perms)
+      self.assertTrue(permissions.CanViewContributorList(mr, mr.project))
+
+
+class ShouldCheckForAbandonmentTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mr = testing_helpers.Blank(
+        project=project_pb2.Project(),
+        auth=authdata.AuthData())
+
+  def testOwner(self):
+    self.mr.auth.effective_ids = {111}
+    self.mr.perms = permissions.OWNER_ACTIVE_PERMISSIONSET
+    self.assertTrue(permissions.ShouldCheckForAbandonment(self.mr))
+
+  def testNonOwner(self):
+    self.mr.auth.effective_ids = {222}
+    self.mr.perms = permissions.COMMITTER_ACTIVE_PERMISSIONSET
+    self.assertFalse(permissions.ShouldCheckForAbandonment(self.mr))
+    self.mr.perms = permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET
+    self.assertFalse(permissions.ShouldCheckForAbandonment(self.mr))
+    self.mr.perms = permissions.USER_PERMISSIONSET
+    self.assertFalse(permissions.ShouldCheckForAbandonment(self.mr))
+    self.mr.perms = permissions.EMPTY_PERMISSIONSET
+    self.assertFalse(permissions.ShouldCheckForAbandonment(self.mr))
+
+  def testSiteAdmin(self):
+    self.mr.auth.effective_ids = {111}
+    self.mr.perms = permissions.ADMIN_PERMISSIONSET
+    self.assertFalse(permissions.ShouldCheckForAbandonment(self.mr))
+
+
+class RestrictionLabelsTest(unittest.TestCase):
+
+  ORIG_SUMMARY = 'this is the orginal summary'
+  ORIG_LABELS = ['one', 'two']
+
+  def testIsRestrictLabel(self):
+    self.assertFalse(permissions.IsRestrictLabel('Usability'))
+    self.assertTrue(permissions.IsRestrictLabel('Restrict-View-CoreTeam'))
+    # Doing it again will test the cached results.
+    self.assertFalse(permissions.IsRestrictLabel('Usability'))
+    self.assertTrue(permissions.IsRestrictLabel('Restrict-View-CoreTeam'))
+
+    self.assertFalse(permissions.IsRestrictLabel('Usability', perm='View'))
+    self.assertTrue(permissions.IsRestrictLabel(
+        'Restrict-View-CoreTeam', perm='View'))
+
+    # This one is a restriction label, but not the kind that we want.
+    self.assertFalse(permissions.IsRestrictLabel(
+        'Restrict-View-CoreTeam', perm='Delete'))
+
+  def testGetRestrictions_NoIssue(self):
+    self.assertEqual([], permissions.GetRestrictions(None))
+
+  def testGetRestrictions_PermSpecified(self):
+    """We can return restiction labels related to the given perm."""
+    art = fake.MakeTestIssue(
+        789, 1, self.ORIG_SUMMARY, 'New', 0, labels=self.ORIG_LABELS)
+    self.assertEqual([], permissions.GetRestrictions(art, perm='view'))
+
+    art = fake.MakeTestIssue(
+        789, 1, self.ORIG_SUMMARY, 'New', 0,
+        labels=['Restrict-View-Core', 'Hot',
+                'Restrict-EditIssue-Commit', 'Restrict-EditIssue-Core'])
+    self.assertEqual(
+        ['restrict-view-core'],
+        permissions.GetRestrictions(art, perm='view'))
+    self.assertEqual(
+        ['restrict-view-core'],
+        permissions.GetRestrictions(art, perm='View'))
+    self.assertEqual(
+        ['restrict-editissue-commit', 'restrict-editissue-core'],
+        permissions.GetRestrictions(art, perm='EditIssue'))
+
+  def testGetRestrictions_NoPerm(self):
+    art = fake.MakeTestIssue(
+        789, 1, self.ORIG_SUMMARY, 'New', 0, labels=self.ORIG_LABELS)
+    self.assertEqual([], permissions.GetRestrictions(art))
+
+    art = fake.MakeTestIssue(
+        789, 1, self.ORIG_SUMMARY, 'New', 0,
+        labels=['Restrict-MissingThirdPart', 'Hot'])
+    self.assertEqual([], permissions.GetRestrictions(art))
+
+    art = fake.MakeTestIssue(
+        789, 1, self.ORIG_SUMMARY, 'New', 0,
+        labels=['Restrict-View-Core', 'Hot'])
+    self.assertEqual(['restrict-view-core'], permissions.GetRestrictions(art))
+
+    art = fake.MakeTestIssue(
+        789, 1, self.ORIG_SUMMARY, 'New', 0,
+        labels=['Restrict-View-Core', 'Hot'],
+        derived_labels=['Color-Red', 'Restrict-EditIssue-GoldMembers'])
+    self.assertEqual(
+        ['restrict-view-core', 'restrict-editissue-goldmembers'],
+        permissions.GetRestrictions(art))
+
+    art = fake.MakeTestIssue(
+        789, 1, self.ORIG_SUMMARY, 'New', 0,
+        labels=['restrict-view-core', 'hot'],
+        derived_labels=['Color-Red', 'RESTRICT-EDITISSUE-GOLDMEMBERS'])
+    self.assertEqual(
+        ['restrict-view-core', 'restrict-editissue-goldmembers'],
+        permissions.GetRestrictions(art))
+
+
+REPORTER_ID = 111
+OWNER_ID = 222
+CC_ID = 333
+OTHER_ID = 444
+APPROVER_ID = 555
+
+
+class IssuePermissionsTest(unittest.TestCase):
+
+  REGULAR_ISSUE = tracker_pb2.Issue()
+  REGULAR_ISSUE.reporter_id = REPORTER_ID
+
+  DELETED_ISSUE = tracker_pb2.Issue()
+  DELETED_ISSUE.deleted = True
+  DELETED_ISSUE.reporter_id = REPORTER_ID
+
+  RESTRICTED_ISSUE = tracker_pb2.Issue()
+  RESTRICTED_ISSUE.reporter_id = REPORTER_ID
+  RESTRICTED_ISSUE.owner_id = OWNER_ID
+  RESTRICTED_ISSUE.cc_ids.append(CC_ID)
+  RESTRICTED_ISSUE.approval_values.append(
+      tracker_pb2.ApprovalValue(approver_ids=[APPROVER_ID])
+  )
+  RESTRICTED_ISSUE.labels.append('Restrict-View-Commit')
+
+  RESTRICTED_ISSUE2 = tracker_pb2.Issue()
+  RESTRICTED_ISSUE2.reporter_id = REPORTER_ID
+  # RESTRICTED_ISSUE2 has no owner
+  RESTRICTED_ISSUE2.cc_ids.append(CC_ID)
+  RESTRICTED_ISSUE2.labels.append('Restrict-View-Commit')
+
+  RESTRICTED_ISSUE3 = tracker_pb2.Issue()
+  RESTRICTED_ISSUE3.reporter_id = REPORTER_ID
+  RESTRICTED_ISSUE3.owner_id = OWNER_ID
+  # Restrict to a permission that no one has.
+  RESTRICTED_ISSUE3.labels.append('Restrict-EditIssue-Foo')
+
+  PROJECT = project_pb2.Project()
+
+  ADMIN_PERMS = permissions.ADMIN_PERMISSIONSET
+  PERMS = permissions.EMPTY_PERMISSIONSET
+
+  def testUpdateIssuePermissions_Normal(self):
+    perms = permissions.UpdateIssuePermissions(
+        permissions.COMMITTER_ACTIVE_PERMISSIONSET, self.PROJECT,
+        self.REGULAR_ISSUE, {})
+
+    self.assertEqual(
+        ['addissuecomment',
+         'commit',
+         'createissue',
+         'deleteown',
+         'editissue',
+         'flagspam',
+         'setstar',
+         'verdictspam',
+         'view',
+         'viewcontributorlist',
+         'viewinboundmessages',
+         'viewquota'],
+        sorted(perms.perm_names))
+
+  def testUpdateIssuePermissions_FromConfig(self):
+    config = tracker_pb2.ProjectIssueConfig(
+        field_defs=[tracker_pb2.FieldDef(field_id=123, grants_perm='Granted')])
+    issue = tracker_pb2.Issue(
+        field_values=[tracker_pb2.FieldValue(field_id=123, user_id=111)])
+    perms = permissions.UpdateIssuePermissions(
+        permissions.USER_PERMISSIONSET, self.PROJECT, issue, {111},
+        config=config)
+    self.assertIn('granted', perms.perm_names)
+
+  def testUpdateIssuePermissions_ExtraPerms(self):
+    project = project_pb2.Project()
+    project.committer_ids.append(999)
+    project.extra_perms.append(
+        project_pb2.Project.ExtraPerms(member_id=999, perms=['EditIssue']))
+    perms = permissions.UpdateIssuePermissions(
+        permissions.USER_PERMISSIONSET, project,
+        self.REGULAR_ISSUE, {999})
+    self.assertIn('editissue', perms.perm_names)
+
+  def testUpdateIssuePermissions_ExtraPermsAreSubjectToRestrictions(self):
+    project = project_pb2.Project()
+    project.committer_ids.append(999)
+    project.extra_perms.append(
+        project_pb2.Project.ExtraPerms(member_id=999, perms=['EditIssue']))
+    perms = permissions.UpdateIssuePermissions(
+        permissions.USER_PERMISSIONSET, project,
+        self.RESTRICTED_ISSUE3, {999})
+    self.assertNotIn('editissue', perms.perm_names)
+
+  def testUpdateIssuePermissions_GrantedPermsAreNotSubjectToRestrictions(self):
+    perms = permissions.UpdateIssuePermissions(
+        permissions.USER_PERMISSIONSET, self.PROJECT, self.RESTRICTED_ISSUE3,
+        {}, granted_perms=['EditIssue'])
+    self.assertIn('editissue', perms.perm_names)
+
+  def testUpdateIssuePermissions_RespectConsiderRestrictions(self):
+    perms = permissions.UpdateIssuePermissions(
+        permissions.ADMIN_PERMISSIONSET, self.PROJECT, self.RESTRICTED_ISSUE3,
+        {})
+    self.assertIn('editissue', perms.perm_names)
+
+  def testUpdateIssuePermissions_RestrictionsAreConsideredIndividually(self):
+    issue = tracker_pb2.Issue(
+        labels=[
+            'Restrict-Perm1-Perm2',
+            'Restrict-Perm2-Perm3'])
+    perms = permissions.UpdateIssuePermissions(
+        permissions.PermissionSet(['Perm1', 'Perm2', 'View']),
+        self.PROJECT, issue, {})
+    self.assertIn('perm1', perms.perm_names)
+    self.assertNotIn('perm2', perms.perm_names)
+
+  def testUpdateIssuePermissions_DeletedNoPermissions(self):
+    issue = tracker_pb2.Issue(
+        labels=['Restrict-View-Foo'],
+        deleted=True)
+    perms = permissions.UpdateIssuePermissions(
+        permissions.COMMITTER_ACTIVE_PERMISSIONSET, self.PROJECT, issue, {})
+    self.assertEqual([], sorted(perms.perm_names))
+
+  def testUpdateIssuePermissions_ViewDeleted(self):
+    perms = permissions.UpdateIssuePermissions(
+        permissions.COMMITTER_ACTIVE_PERMISSIONSET, self.PROJECT,
+        self.DELETED_ISSUE, {})
+    self.assertEqual(['view'], sorted(perms.perm_names))
+
+  def testUpdateIssuePermissions_ViewAndDeleteDeleted(self):
+    perms = permissions.UpdateIssuePermissions(
+        permissions.OWNER_ACTIVE_PERMISSIONSET, self.PROJECT,
+        self.DELETED_ISSUE, {})
+    self.assertEqual(['deleteissue', 'view'], sorted(perms.perm_names))
+
+  def testUpdateIssuePermissions_ViewRestrictions(self):
+    perms = permissions.UpdateIssuePermissions(
+        permissions.USER_PERMISSIONSET, self.PROJECT, self.RESTRICTED_ISSUE, {})
+    self.assertNotIn('view', perms.perm_names)
+
+  def testUpdateIssuePermissions_RolesBypassViewRestrictions(self):
+    for role in {OWNER_ID, REPORTER_ID, CC_ID, APPROVER_ID}:
+      perms = permissions.UpdateIssuePermissions(
+          permissions.USER_PERMISSIONSET, self.PROJECT, self.RESTRICTED_ISSUE,
+          {role})
+      self.assertIn('view', perms.perm_names)
+
+  def testUpdateIssuePermissions_RolesAllowViewingDeleted(self):
+    issue = tracker_pb2.Issue(
+        reporter_id=REPORTER_ID,
+        owner_id=OWNER_ID,
+        cc_ids=[CC_ID],
+        approval_values=[tracker_pb2.ApprovalValue(approver_ids=[APPROVER_ID])],
+        labels=['Restrict-View-Foo'],
+        deleted=True)
+    for role in {OWNER_ID, REPORTER_ID, CC_ID, APPROVER_ID}:
+      perms = permissions.UpdateIssuePermissions(
+          permissions.USER_PERMISSIONSET, self.PROJECT, issue, {role})
+      self.assertIn('view', perms.perm_names)
+
+  def testUpdateIssuePermissions_GrantedViewPermission(self):
+    perms = permissions.UpdateIssuePermissions(
+        permissions.USER_PERMISSIONSET, self.PROJECT, self.RESTRICTED_ISSUE,
+        {}, ['commit'])
+    self.assertIn('view', perms.perm_names)
+
+  def testUpdateIssuePermissions_EditRestrictions(self):
+    perms = permissions.UpdateIssuePermissions(
+        permissions.COMMITTER_ACTIVE_PERMISSIONSET, self.PROJECT,
+        self.RESTRICTED_ISSUE3, {REPORTER_ID, CC_ID, APPROVER_ID})
+    self.assertNotIn('editissue', perms.perm_names)
+
+  def testUpdateIssuePermissions_OwnerBypassEditRestrictions(self):
+    perms = permissions.UpdateIssuePermissions(
+        permissions.COMMITTER_ACTIVE_PERMISSIONSET, self.PROJECT,
+        self.RESTRICTED_ISSUE3, {OWNER_ID})
+    self.assertIn('editissue', perms.perm_names)
+
+  def testUpdateIssuePermissions_CustomPermissionGrantsEditPermission(self):
+    project = project_pb2.Project()
+    project.committer_ids.append(999)
+    project.extra_perms.append(
+        project_pb2.Project.ExtraPerms(member_id=999, perms=['Foo']))
+    perms = permissions.UpdateIssuePermissions(
+        permissions.COMMITTER_ACTIVE_PERMISSIONSET, project,
+        self.RESTRICTED_ISSUE3, {999})
+    self.assertIn('editissue', perms.perm_names)
+
+  def testCanViewIssue_Deleted(self):
+    self.assertFalse(permissions.CanViewIssue(
+        {REPORTER_ID}, permissions.OWNER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.DELETED_ISSUE))
+    self.assertTrue(permissions.CanViewIssue(
+        {REPORTER_ID}, permissions.OWNER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.DELETED_ISSUE, allow_viewing_deleted=True))
+    self.assertTrue(permissions.CanViewIssue(
+        {REPORTER_ID}, permissions.OWNER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+
+  def testCanViewIssue_Regular(self):
+    self.assertTrue(permissions.CanViewIssue(
+        {REPORTER_ID}, permissions.OWNER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    self.assertTrue(permissions.CanViewIssue(
+        {REPORTER_ID}, permissions.COMMITTER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    self.assertTrue(permissions.CanViewIssue(
+        {REPORTER_ID},
+        permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    self.assertTrue(permissions.CanViewIssue(
+        {REPORTER_ID}, permissions.USER_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    self.assertTrue(permissions.CanViewIssue(
+        {REPORTER_ID}, permissions.READ_ONLY_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    self.assertTrue(permissions.CanViewIssue(
+        set(), permissions.READ_ONLY_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+
+  def testCanViewIssue_Restricted(self):
+    # Project owner can always view issue.
+    self.assertTrue(permissions.CanViewIssue(
+        {OTHER_ID}, permissions.OWNER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE))
+    # Member can view because they have Commit perm.
+    self.assertTrue(permissions.CanViewIssue(
+        {OTHER_ID}, permissions.COMMITTER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE))
+    # Contributors normally do not have Commit perm.
+    self.assertFalse(permissions.CanViewIssue(
+        {OTHER_ID}, permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE))
+    # Non-members do not have Commit perm.
+    self.assertFalse(permissions.CanViewIssue(
+        {OTHER_ID}, permissions.USER_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE))
+    # Anon user's do not have Commit perm.
+    self.assertFalse(permissions.CanViewIssue(
+        set(), permissions.READ_ONLY_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE))
+
+  def testCanViewIssue_RestrictedParticipants(self):
+    # Reporter can always view issue
+    self.assertTrue(permissions.CanViewIssue(
+        {REPORTER_ID}, permissions.READ_ONLY_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE))
+    # Issue owner can always view issue
+    self.assertTrue(permissions.CanViewIssue(
+        {OWNER_ID}, permissions.READ_ONLY_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE))
+    # CC'd user can always view issue
+    self.assertTrue(permissions.CanViewIssue(
+        {CC_ID}, permissions.READ_ONLY_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE))
+    # Non-participants cannot view issue if they don't have the needed perm.
+    self.assertFalse(permissions.CanViewIssue(
+        {OTHER_ID}, permissions.READ_ONLY_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE))
+    # Anon user's do not have Commit perm.
+    self.assertFalse(permissions.CanViewIssue(
+        set(), permissions.READ_ONLY_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE))
+    # Anon user's cannot match owner 0.
+    self.assertFalse(permissions.CanViewIssue(
+        set(), permissions.READ_ONLY_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE2))
+    # Approvers can always view issue
+    self.assertTrue(permissions.CanViewIssue(
+        {APPROVER_ID}, permissions.READ_ONLY_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE))
+
+  def testCannotViewIssueIfCannotViewProject(self):
+    """Cross-project search should not be a backdoor to viewing issues."""
+    # Reporter cannot view issue if they not long have access to the project.
+    self.assertFalse(permissions.CanViewIssue(
+        {REPORTER_ID}, permissions.EMPTY_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    # Issue owner cannot always view issue
+    self.assertFalse(permissions.CanViewIssue(
+        {OWNER_ID}, permissions.EMPTY_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    # CC'd user cannot always view issue
+    self.assertFalse(permissions.CanViewIssue(
+        {CC_ID}, permissions.EMPTY_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    # Non-participants cannot view issue if they don't have the needed perm.
+    self.assertFalse(permissions.CanViewIssue(
+        {OTHER_ID}, permissions.EMPTY_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    # Anon user's do not have Commit perm.
+    self.assertFalse(permissions.CanViewIssue(
+        set(), permissions.EMPTY_PERMISSIONSET, self.PROJECT,
+        self.REGULAR_ISSUE))
+    # Anon user's cannot match owner 0.
+    self.assertFalse(permissions.CanViewIssue(
+        set(), permissions.EMPTY_PERMISSIONSET, self.PROJECT,
+        self.REGULAR_ISSUE))
+
+  def testCanEditIssue(self):
+    # Anon users cannot edit issues.
+    self.assertFalse(permissions.CanEditIssue(
+        {}, permissions.READ_ONLY_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+
+    # Non-members and contributors cannot edit issues,
+    # even if they reported them.
+    self.assertFalse(permissions.CanEditIssue(
+        {REPORTER_ID}, permissions.READ_ONLY_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    self.assertFalse(permissions.CanEditIssue(
+        {REPORTER_ID}, permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+
+    # Project committers and project owners can edit issues, regardless
+    # of their role in the issue.
+    self.assertTrue(permissions.CanEditIssue(
+        {REPORTER_ID}, permissions.COMMITTER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    self.assertTrue(permissions.CanEditIssue(
+        {REPORTER_ID}, permissions.OWNER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    self.assertTrue(permissions.CanEditIssue(
+        {OWNER_ID}, permissions.COMMITTER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    self.assertTrue(permissions.CanEditIssue(
+        {OWNER_ID}, permissions.OWNER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    self.assertTrue(permissions.CanEditIssue(
+        {OTHER_ID}, permissions.COMMITTER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+    self.assertTrue(permissions.CanEditIssue(
+        {OTHER_ID}, permissions.OWNER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.REGULAR_ISSUE))
+
+  def testCanEditIssue_Restricted(self):
+    # Anon users cannot edit restricted issues.
+    self.assertFalse(permissions.CanEditIssue(
+        {}, permissions.COMMITTER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE3))
+
+    # Project committers cannot edit issues with a restriction to a custom
+    # permission that they don't have.
+    self.assertFalse(permissions.CanEditIssue(
+        {OTHER_ID}, permissions.COMMITTER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE3))
+
+    # *Issue* owners can always edit the issues that they own, even if
+    # those issues are restricted to perms that they don't have.
+    self.assertTrue(permissions.CanEditIssue(
+        {OWNER_ID}, permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE3))
+
+    # Project owners can always edit, they cannot lock themselves out.
+    self.assertTrue(permissions.CanEditIssue(
+        {OTHER_ID}, permissions.OWNER_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE3))
+
+    # A committer with edit permission but not view permission
+    # should not be able to edit the issue.
+    self.assertFalse(permissions.CanEditIssue(
+        {OTHER_ID}, permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET,
+        self.PROJECT, self.RESTRICTED_ISSUE2))
+
+  def testCanCommentIssue_HasPerm(self):
+    self.assertTrue(permissions.CanCommentIssue(
+        {111}, permissions.PermissionSet([permissions.ADD_ISSUE_COMMENT]),
+        None, None))
+    self.assertFalse(permissions.CanCommentIssue(
+        {111}, permissions.PermissionSet([]),
+        None, None))
+
+  def testCanCommentIssue_HasExtraPerm(self):
+    project = project_pb2.Project()
+    project.committer_ids.append(111)
+    extra_perm = project_pb2.Project.ExtraPerms(
+        member_id=111, perms=[permissions.ADD_ISSUE_COMMENT])
+    project.extra_perms.append(extra_perm)
+    self.assertTrue(permissions.CanCommentIssue(
+        {111}, permissions.PermissionSet([]),
+        project, None))
+    self.assertFalse(permissions.CanCommentIssue(
+        {222}, permissions.PermissionSet([]),
+        project, None))
+
+  def testCanCommentIssue_Restricted(self):
+    issue = tracker_pb2.Issue(labels=['Restrict-AddIssueComment-CoreTeam'])
+    # User is granted exactly the perm they need specifically in this issue.
+    self.assertTrue(permissions.CanCommentIssue(
+        {111}, permissions.PermissionSet([]),
+        None, issue, granted_perms=['addissuecomment']))
+    # User is granted CoreTeam, which satifies the restriction, and allows
+    # them to use the AddIssueComment permission that they have and would
+    # normally be able to use in an unrestricted issue.
+    self.assertTrue(permissions.CanCommentIssue(
+        {111}, permissions.PermissionSet([permissions.ADD_ISSUE_COMMENT]),
+        None, issue, granted_perms=['coreteam']))
+    # User was granted CoreTeam, but never had AddIssueComment.
+    self.assertFalse(permissions.CanCommentIssue(
+        {111}, permissions.PermissionSet([]),
+        None, issue, granted_perms=['coreteam']))
+    # User has AddIssueComment, but cannot satisfy restriction.
+    self.assertFalse(permissions.CanCommentIssue(
+        {111}, permissions.PermissionSet([permissions.ADD_ISSUE_COMMENT]),
+        None, issue))
+
+  def testCanCommentIssue_Granted(self):
+    self.assertTrue(permissions.CanCommentIssue(
+        {111}, permissions.PermissionSet([]),
+        None, None, granted_perms=['addissuecomment']))
+    self.assertFalse(permissions.CanCommentIssue(
+        {111}, permissions.PermissionSet([]),
+        None, None))
+
+  def testCanUpdateApprovalStatus_Approver(self):
+    # restricted status
+    self.assertTrue(permissions.CanUpdateApprovalStatus(
+        {111, 222}, permissions.PermissionSet([]), self.PROJECT,
+        [222], tracker_pb2.ApprovalStatus.APPROVED))
+
+    # non-restricted status
+    self.assertTrue(permissions.CanUpdateApprovalStatus(
+        {111, 222}, permissions.PermissionSet([]), self.PROJECT,
+        [222], tracker_pb2.ApprovalStatus.NEEDS_REVIEW))
+
+  def testCanUpdateApprovalStatus_SiteAdmin(self):
+    # restricted status
+    self.assertTrue(permissions.CanUpdateApprovalStatus(
+        {444}, permissions.PermissionSet([permissions.EDIT_ISSUE_APPROVAL]),
+        self.PROJECT, [222], tracker_pb2.ApprovalStatus.NOT_APPROVED))
+
+    # non-restricted status
+    self.assertTrue(permissions.CanUpdateApprovalStatus(
+        {444}, permissions.PermissionSet([permissions.EDIT_ISSUE_APPROVAL]),
+        self.PROJECT, [222], tracker_pb2.ApprovalStatus.NEEDS_REVIEW))
+
+  def testCanUpdateApprovalStatus_NonApprover(self):
+    # non-restricted status
+    self.assertTrue(permissions.CanUpdateApprovalStatus(
+        {111, 222}, permissions.PermissionSet([]), self.PROJECT,
+        [333], tracker_pb2.ApprovalStatus.NEED_INFO))
+
+    # restricted status
+    self.assertFalse(permissions.CanUpdateApprovalStatus(
+        {111, 222}, permissions.PermissionSet([]), self.PROJECT,
+        [333], tracker_pb2.ApprovalStatus.NA))
+
+  def testCanUpdateApprovers_Approver(self):
+    self.assertTrue(permissions.CanUpdateApprovers(
+        {111, 222}, permissions.PermissionSet([]), self.PROJECT,
+        [222]))
+
+  def testCanUpdateApprovers_SiteAdmins(self):
+    self.assertTrue(permissions.CanUpdateApprovers(
+        {444}, permissions.PermissionSet([permissions.EDIT_ISSUE_APPROVAL]),
+        self.PROJECT, [222]))
+
+  def testCanUpdateApprovers_NonApprover(self):
+    self.assertFalse(permissions.CanUpdateApprovers(
+        {111, 222}, permissions.PermissionSet([]), self.PROJECT,
+        [333]))
+
+  def testCanViewComponentDef_ComponentAdmin(self):
+    cd = tracker_pb2.ComponentDef(admin_ids=[111])
+    perms = permissions.PermissionSet([])
+    self.assertTrue(permissions.CanViewComponentDef(
+        {111}, perms, None, cd))
+    self.assertFalse(permissions.CanViewComponentDef(
+        {999}, perms, None, cd))
+
+  def testCanViewComponentDef_NormalUser(self):
+    cd = tracker_pb2.ComponentDef()
+    self.assertTrue(permissions.CanViewComponentDef(
+        {111}, permissions.PermissionSet([permissions.VIEW]),
+        None, cd))
+    self.assertFalse(permissions.CanViewComponentDef(
+        {111}, permissions.PermissionSet([]),
+        None, cd))
+
+  def testCanEditComponentDef_ComponentAdmin(self):
+    cd = tracker_pb2.ComponentDef(admin_ids=[111], path='Whole')
+    sub_cd = tracker_pb2.ComponentDef(admin_ids=[222], path='Whole>Part')
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.component_defs.append(cd)
+    config.component_defs.append(sub_cd)
+    perms = permissions.PermissionSet([])
+    self.assertTrue(permissions.CanEditComponentDef(
+        {111}, perms, None, cd, config))
+    self.assertFalse(permissions.CanEditComponentDef(
+        {222}, perms, None, cd, config))
+    self.assertFalse(permissions.CanEditComponentDef(
+        {999}, perms, None, cd, config))
+    self.assertTrue(permissions.CanEditComponentDef(
+        {111}, perms, None, sub_cd, config))
+    self.assertTrue(permissions.CanEditComponentDef(
+        {222}, perms, None, sub_cd, config))
+    self.assertFalse(permissions.CanEditComponentDef(
+        {999}, perms, None, sub_cd, config))
+
+  def testCanEditComponentDef_ProjectOwners(self):
+    cd = tracker_pb2.ComponentDef(path='Whole')
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.component_defs.append(cd)
+    self.assertTrue(permissions.CanEditComponentDef(
+        {111}, permissions.PermissionSet([permissions.EDIT_PROJECT]),
+        None, cd, config))
+    self.assertFalse(permissions.CanEditComponentDef(
+        {111}, permissions.PermissionSet([]),
+        None, cd, config))
+
+  def testCanViewFieldDef_FieldAdmin(self):
+    fd = tracker_pb2.FieldDef(admin_ids=[111])
+    perms = permissions.PermissionSet([])
+    self.assertTrue(permissions.CanViewFieldDef(
+        {111}, perms, None, fd))
+    self.assertFalse(permissions.CanViewFieldDef(
+        {999}, perms, None, fd))
+
+  def testCanViewFieldDef_NormalUser(self):
+    fd = tracker_pb2.FieldDef()
+    self.assertTrue(permissions.CanViewFieldDef(
+        {111}, permissions.PermissionSet([permissions.VIEW]),
+        None, fd))
+    self.assertFalse(permissions.CanViewFieldDef(
+        {111}, permissions.PermissionSet([]),
+        None, fd))
+
+  def testCanEditFieldDef_FieldAdmin(self):
+    fd = tracker_pb2.FieldDef(admin_ids=[111])
+    perms = permissions.PermissionSet([])
+    self.assertTrue(permissions.CanEditFieldDef(
+        {111}, perms, None, fd))
+    self.assertFalse(permissions.CanEditFieldDef(
+        {999}, perms, None, fd))
+
+  def testCanEditFieldDef_ProjectOwners(self):
+    fd = tracker_pb2.FieldDef()
+    self.assertTrue(permissions.CanEditFieldDef(
+        {111}, permissions.PermissionSet([permissions.EDIT_PROJECT]),
+        None, fd))
+    self.assertFalse(permissions.CanEditFieldDef(
+        {111}, permissions.PermissionSet([]),
+        None, fd))
+
+  def testCanEditValueForFieldDef_NotRestrictedField(self):
+    fd = tracker_pb2.FieldDef()
+    perms = permissions.PermissionSet([])
+    self.assertTrue(permissions.CanEditValueForFieldDef({111}, perms, None, fd))
+
+  def testCanEditValueForFieldDef_RestrictedFieldEditor(self):
+    fd = tracker_pb2.FieldDef(is_restricted_field=True, editor_ids=[111])
+    perms = permissions.PermissionSet([])
+    self.assertTrue(permissions.CanEditValueForFieldDef({111}, perms, None, fd))
+    self.assertFalse(
+        permissions.CanEditValueForFieldDef({999}, perms, None, fd))
+
+  def testCanEditValueForFieldDef_RestrictedFieldAdmin(self):
+    fd = tracker_pb2.FieldDef(is_restricted_field=True, admin_ids=[111])
+    perms = permissions.PermissionSet([])
+    self.assertTrue(permissions.CanEditValueForFieldDef({111}, perms, None, fd))
+    self.assertFalse(
+        permissions.CanEditValueForFieldDef({999}, perms, None, fd))
+
+  def testCanEditValueForFieldDef_ProjectOwners(self):
+    fd = tracker_pb2.FieldDef(is_restricted_field=True)
+    self.assertTrue(
+        permissions.CanEditValueForFieldDef(
+            {111}, permissions.PermissionSet([permissions.EDIT_PROJECT]), None,
+            fd))
+    self.assertFalse(
+        permissions.CanEditValueForFieldDef(
+            {111}, permissions.PermissionSet([]), None, fd))
+
+  def testCanViewTemplate_TemplateAdmin(self):
+    td = tracker_pb2.TemplateDef(admin_ids=[111])
+    perms = permissions.PermissionSet([])
+    self.assertTrue(permissions.CanViewTemplate(
+        {111}, perms, None, td))
+    self.assertFalse(permissions.CanViewTemplate(
+        {999}, perms, None, td))
+
+  def testCanViewTemplate_MembersOnly(self):
+    td = tracker_pb2.TemplateDef(members_only=True)
+    project = project_pb2.Project(committer_ids=[111])
+    self.assertTrue(permissions.CanViewTemplate(
+        {111}, permissions.PermissionSet([]),
+        project, td))
+    self.assertFalse(permissions.CanViewTemplate(
+        {999}, permissions.PermissionSet([]),
+        project, td))
+
+  def testCanViewTemplate_AnyoneWhoCanViewProject(self):
+    td = tracker_pb2.TemplateDef()
+    self.assertTrue(permissions.CanViewTemplate(
+        {111}, permissions.PermissionSet([permissions.VIEW]),
+        None, td))
+    self.assertFalse(permissions.CanViewTemplate(
+        {111}, permissions.PermissionSet([]),
+        None, td))
+
+  def testCanEditTemplate_TemplateAdmin(self):
+    td = tracker_pb2.TemplateDef(admin_ids=[111])
+    perms = permissions.PermissionSet([])
+    self.assertTrue(permissions.CanEditTemplate(
+        {111}, perms, None, td))
+    self.assertFalse(permissions.CanEditTemplate(
+        {999}, perms, None, td))
+
+  def testCanEditTemplate_ProjectOwners(self):
+    td = tracker_pb2.TemplateDef()
+    self.assertTrue(permissions.CanEditTemplate(
+        {111}, permissions.PermissionSet([permissions.EDIT_PROJECT]),
+        None, td))
+    self.assertFalse(permissions.CanEditTemplate(
+        {111}, permissions.PermissionSet([]),
+        None, td))
+
+  def testCanViewHotlist_Private(self):
+    hotlist = features_pb2.Hotlist()
+    hotlist.is_private = True
+    hotlist.owner_ids.append(111)
+    hotlist.editor_ids.append(222)
+
+    self.assertTrue(permissions.CanViewHotlist({222}, self.PERMS, hotlist))
+    self.assertTrue(permissions.CanViewHotlist({111, 333}, self.PERMS, hotlist))
+    self.assertTrue(
+        permissions.CanViewHotlist({111, 333}, self.ADMIN_PERMS, hotlist))
+    self.assertFalse(
+        permissions.CanViewHotlist({333, 444}, self.PERMS, hotlist))
+    self.assertTrue(
+        permissions.CanViewHotlist({333, 444}, self.ADMIN_PERMS, hotlist))
+
+  def testCanViewHotlist_Public(self):
+    hotlist = features_pb2.Hotlist()
+    hotlist.is_private = False
+    hotlist.owner_ids.append(111)
+    hotlist.editor_ids.append(222)
+
+    self.assertTrue(permissions.CanViewHotlist({222}, self.PERMS, hotlist))
+    self.assertTrue(permissions.CanViewHotlist({111, 333}, self.PERMS, hotlist))
+    self.assertTrue(permissions.CanViewHotlist({333, 444}, self.PERMS, hotlist))
+    self.assertTrue(
+        permissions.CanViewHotlist({333, 444}, self.ADMIN_PERMS, hotlist))
+
+  def testCanEditHotlist(self):
+    hotlist = features_pb2.Hotlist()
+    hotlist.owner_ids.append(111)
+    hotlist.editor_ids.append(222)
+
+    self.assertTrue(permissions.CanEditHotlist({222}, self.PERMS, hotlist))
+    self.assertTrue(permissions.CanEditHotlist({111, 333}, self.PERMS, hotlist))
+    self.assertTrue(
+        permissions.CanEditHotlist({111, 333}, self.ADMIN_PERMS, hotlist))
+    self.assertFalse(
+        permissions.CanEditHotlist({333, 444}, self.PERMS, hotlist))
+    self.assertTrue(
+        permissions.CanEditHotlist({333, 444}, self.ADMIN_PERMS, hotlist))
+
+  def testCanAdministerHotlist(self):
+    hotlist = features_pb2.Hotlist()
+    hotlist.owner_ids.append(111)
+    hotlist.editor_ids.append(222)
+
+    self.assertFalse(
+        permissions.CanAdministerHotlist({222}, self.PERMS, hotlist))
+    self.assertTrue(
+        permissions.CanAdministerHotlist({111, 333}, self.PERMS, hotlist))
+    self.assertTrue(
+        permissions.CanAdministerHotlist({111, 333}, self.ADMIN_PERMS, hotlist))
+    self.assertFalse(
+        permissions.CanAdministerHotlist({333, 444}, self.PERMS, hotlist))
+    self.assertTrue(
+        permissions.CanAdministerHotlist({333, 444}, self.ADMIN_PERMS, hotlist))
diff --git a/framework/test/profiler_test.py b/framework/test/profiler_test.py
new file mode 100644
index 0000000..3cc7e85
--- /dev/null
+++ b/framework/test/profiler_test.py
@@ -0,0 +1,138 @@
+# 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
+
+"""Test for monorail.framework.profiler."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import profiler
+
+
+class MockPatchResponse(object):
+  def execute(self):
+    pass
+
+
+class MockCloudTraceProjects(object):
+  def __init__(self):
+    self.patch_response = MockPatchResponse()
+    self.project_id = None
+    self.body = None
+
+  def patchTraces(self, projectId, body):
+    self.project_id = projectId
+    self.body = body
+    return self.patch_response
+
+
+class MockCloudTraceApi(object):
+  def __init__(self):
+    self.mock_projects = MockCloudTraceProjects()
+
+  def projects(self):
+    return self.mock_projects
+
+
+class ProfilerTest(unittest.TestCase):
+
+  def testTopLevelPhase(self):
+    prof = profiler.Profiler()
+    self.assertEqual(prof.current_phase.name, 'overall profile')
+    self.assertEqual(prof.current_phase.parent, None)
+    self.assertEqual(prof.current_phase, prof.top_phase)
+    self.assertEqual(prof.next_color, 0)
+
+  def testSinglePhase(self):
+    prof = profiler.Profiler()
+    self.assertEqual(prof.current_phase.name, 'overall profile')
+    with prof.Phase('test'):
+      self.assertEqual(prof.current_phase.name, 'test')
+      self.assertEqual(prof.current_phase.parent.name, 'overall profile')
+    self.assertEqual(prof.current_phase.name, 'overall profile')
+    self.assertEqual(prof.next_color, 1)
+
+  def testSinglePhase_SuperLongName(self):
+    prof = profiler.Profiler()
+    self.assertEqual(prof.current_phase.name, 'overall profile')
+    long_name = 'x' * 1000
+    with prof.Phase(long_name):
+      self.assertEqual(
+          'x' * profiler.MAX_PHASE_NAME_LENGTH, prof.current_phase.name)
+
+  def testSubphaseExecption(self):
+    prof = profiler.Profiler()
+    try:
+      with prof.Phase('foo'):
+        with prof.Phase('bar'):
+          pass
+        with prof.Phase('baz'):
+          raise Exception('whoops')
+    except Exception as e:
+      self.assertEqual(e.message, 'whoops')
+    finally:
+      self.assertEqual(prof.current_phase.name, 'overall profile')
+      self.assertEqual(prof.top_phase.subphases[0].subphases[1].name, 'baz')
+
+  def testSpanJson(self):
+    mock_trace_api = MockCloudTraceApi()
+    mock_trace_context = '1234/5678;xxxxx'
+
+    prof = profiler.Profiler(mock_trace_context, mock_trace_api)
+    with prof.Phase('foo'):
+      with prof.Phase('bar'):
+        pass
+      with prof.Phase('baz'):
+        pass
+
+    # Shouldn't this be automatic?
+    prof.current_phase.End()
+
+    self.assertEqual(prof.current_phase.name, 'overall profile')
+    self.assertEqual(prof.top_phase.subphases[0].subphases[1].name, 'baz')
+    span_json = prof.top_phase.SpanJson()
+    self.assertEqual(len(span_json), 4)
+
+    for span in span_json:
+      self.assertTrue(span['endTime'] > span['startTime'])
+
+    # pylint: disable=unbalanced-tuple-unpacking
+    span1, span2, span3, span4 = span_json
+
+    self.assertEqual(span1['name'], 'overall profile')
+    self.assertEqual(span2['name'], 'foo')
+    self.assertEqual(span3['name'], 'bar')
+    self.assertEqual(span4['name'], 'baz')
+
+    self.assertTrue(span1['startTime'] < span2['startTime'])
+    self.assertTrue(span1['startTime'] < span3['startTime'])
+    self.assertTrue(span1['startTime'] < span4['startTime'])
+
+    self.assertTrue(span1['endTime'] > span2['endTime'])
+    self.assertTrue(span1['endTime'] > span3['endTime'])
+    self.assertTrue(span1['endTime'] > span4['endTime'])
+
+
+  def testReportCloudTrace(self):
+    mock_trace_api = MockCloudTraceApi()
+    mock_trace_context = '1234/5678;xxxxx'
+
+    prof = profiler.Profiler(mock_trace_context, mock_trace_api)
+    with prof.Phase('foo'):
+      with prof.Phase('bar'):
+        pass
+      with prof.Phase('baz'):
+        pass
+
+    # Shouldn't this be automatic?
+    prof.current_phase.End()
+
+    self.assertEqual(prof.current_phase.name, 'overall profile')
+    self.assertEqual(prof.top_phase.subphases[0].subphases[1].name, 'baz')
+
+    prof.ReportTrace()
+    self.assertEqual(mock_trace_api.mock_projects.project_id, 'testing-app')
diff --git a/framework/test/ratelimiter_test.py b/framework/test/ratelimiter_test.py
new file mode 100644
index 0000000..b351f8c
--- /dev/null
+++ b/framework/test/ratelimiter_test.py
@@ -0,0 +1,398 @@
+# 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
+
+"""Unit tests for RateLimiter.
+"""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import unittest
+
+from google.appengine.api import memcache
+from google.appengine.ext import testbed
+
+import mox
+import os
+import settings
+
+from framework import ratelimiter
+from services import service_manager
+from services import client_config_svc
+from testing import fake
+from testing import testing_helpers
+
+
+class RateLimiterTest(unittest.TestCase):
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_user_stub()
+
+    self.mox = mox.Mox()
+    self.services = service_manager.Services(
+      config=fake.ConfigService(),
+      issue=fake.IssueService(),
+      user=fake.UserService(),
+      project=fake.ProjectService(),
+    )
+    self.project = self.services.project.TestAddProject('proj', project_id=987)
+
+    self.ratelimiter = ratelimiter.RateLimiter()
+    ratelimiter.COUNTRY_LIMITS = {}
+    os.environ['USER_EMAIL'] = ''
+    settings.ratelimiting_enabled = True
+    ratelimiter.DEFAULT_LIMIT = 10
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+    # settings.ratelimiting_enabled = True
+
+  def testCheckStart_pass(self):
+    request, _ = testing_helpers.GetRequestObjects(
+      project=self.project)
+    request.headers['X-AppEngine-Country'] = 'US'
+    request.remote_addr = '192.168.1.0'
+    self.ratelimiter.CheckStart(request)
+    # Should not throw an exception.
+
+  def testCheckStart_fail(self):
+    request, _ = testing_helpers.GetRequestObjects(
+      project=self.project)
+    request.headers['X-AppEngine-Country'] = 'US'
+    request.remote_addr = '192.168.1.0'
+    now = 0.0
+    cachekeysets, _, _, _ = ratelimiter._CacheKeys(request, now)
+    values = [{key: ratelimiter.DEFAULT_LIMIT for key in cachekeys} for
+              cachekeys in cachekeysets]
+    for value in values:
+      memcache.add_multi(value)
+    with self.assertRaises(ratelimiter.RateLimitExceeded):
+      self.ratelimiter.CheckStart(request, now)
+
+  def testCheckStart_expiredEntries(self):
+    request, _ = testing_helpers.GetRequestObjects(
+      project=self.project)
+    request.headers['X-AppEngine-Country'] = 'US'
+    request.remote_addr = '192.168.1.0'
+    now = 0.0
+    cachekeysets, _, _, _ = ratelimiter._CacheKeys(request, now)
+    values = [{key: ratelimiter.DEFAULT_LIMIT for key in cachekeys} for
+              cachekeys in cachekeysets]
+    for value in values:
+      memcache.add_multi(value)
+
+    now = now + 2 * ratelimiter.EXPIRE_AFTER_SECS
+    self.ratelimiter.CheckStart(request, now)
+    # Should not throw an exception.
+
+  def testCheckStart_repeatedCalls(self):
+    request, _ = testing_helpers.GetRequestObjects(
+      project=self.project)
+    request.headers['X-AppEngine-Country'] = 'US'
+    request.remote_addr = '192.168.1.0'
+    now = 0.0
+
+    # Call CheckStart once every minute.  Should be ok.
+    for _ in range(ratelimiter.N_MINUTES):
+      self.ratelimiter.CheckStart(request, now)
+      now = now + 120.0
+
+    # Call CheckStart more than DEFAULT_LIMIT times in the same minute.
+    with self.assertRaises(ratelimiter.RateLimitExceeded):
+      for _ in range(ratelimiter.DEFAULT_LIMIT + 2):  # pragma: no branch
+        now = now + 0.001
+        self.ratelimiter.CheckStart(request, now)
+
+  def testCheckStart_differentIPs(self):
+    now = 0.0
+
+    ratelimiter.COUNTRY_LIMITS = {}
+    # Exceed DEFAULT_LIMIT calls, but vary remote_addr so different
+    # remote addresses aren't ratelimited together.
+    for m in range(ratelimiter.DEFAULT_LIMIT * 2):
+      request, _ = testing_helpers.GetRequestObjects(
+        project=self.project)
+      request.headers['X-AppEngine-Country'] = 'US'
+      request.remote_addr = '192.168.1.%d' % (m % 16)
+      ratelimiter._CacheKeys(request, now)
+      self.ratelimiter.CheckStart(request, now)
+      now = now + 0.001
+
+    # Exceed the limit, but only for one IP address. The
+    # others should be fine.
+    with self.assertRaises(ratelimiter.RateLimitExceeded):
+      for m in range(ratelimiter.DEFAULT_LIMIT):  # pragma: no branch
+        request, _ = testing_helpers.GetRequestObjects(
+          project=self.project)
+        request.headers['X-AppEngine-Country'] = 'US'
+        request.remote_addr = '192.168.1.0'
+        ratelimiter._CacheKeys(request, now)
+        self.ratelimiter.CheckStart(request, now)
+        now = now + 0.001
+
+    # Now proceed to make requests for all of the other IP
+    # addresses besides .0.
+    for m in range(ratelimiter.DEFAULT_LIMIT * 2):
+      request, _ = testing_helpers.GetRequestObjects(
+        project=self.project)
+      request.headers['X-AppEngine-Country'] = 'US'
+      # Skip .0 since it's already exceeded the limit.
+      request.remote_addr = '192.168.1.%d' % (m + 1)
+      ratelimiter._CacheKeys(request, now)
+      self.ratelimiter.CheckStart(request, now)
+      now = now + 0.001
+
+  def testCheckStart_sameIPDifferentUserIDs(self):
+    # Behind a NAT, e.g.
+    now = 0.0
+
+    # Exceed DEFAULT_LIMIT calls, but vary user_id so different
+    # users behind the same IP aren't ratelimited together.
+    for m in range(ratelimiter.DEFAULT_LIMIT * 2):
+      request, _ = testing_helpers.GetRequestObjects(
+        project=self.project)
+      request.remote_addr = '192.168.1.0'
+      os.environ['USER_EMAIL'] = '%s@example.com' % m
+      request.headers['X-AppEngine-Country'] = 'US'
+      ratelimiter._CacheKeys(request, now)
+      self.ratelimiter.CheckStart(request, now)
+      now = now + 0.001
+
+    # Exceed the limit, but only for one userID+IP address. The
+    # others should be fine.
+    with self.assertRaises(ratelimiter.RateLimitExceeded):
+      for m in range(ratelimiter.DEFAULT_LIMIT + 2):  # pragma: no branch
+        request, _ = testing_helpers.GetRequestObjects(
+          project=self.project)
+        request.headers['X-AppEngine-Country'] = 'US'
+        request.remote_addr = '192.168.1.0'
+        os.environ['USER_EMAIL'] = '42@example.com'
+        ratelimiter._CacheKeys(request, now)
+        self.ratelimiter.CheckStart(request, now)
+        now = now + 0.001
+
+    # Now proceed to make requests for other user IDs
+    # besides 42.
+    for m in range(ratelimiter.DEFAULT_LIMIT * 2):
+      request, _ = testing_helpers.GetRequestObjects(
+        project=self.project)
+      request.headers['X-AppEngine-Country'] = 'US'
+      # Skip .0 since it's already exceeded the limit.
+      request.remote_addr = '192.168.1.0'
+      os.environ['USER_EMAIL'] = '%s@example.com' % (43 + m)
+      ratelimiter._CacheKeys(request, now)
+      self.ratelimiter.CheckStart(request, now)
+      now = now + 0.001
+
+  def testCheckStart_ratelimitingDisabled(self):
+    settings.ratelimiting_enabled = False
+    request, _ = testing_helpers.GetRequestObjects(
+      project=self.project)
+    request.headers['X-AppEngine-Country'] = 'US'
+    request.remote_addr = '192.168.1.0'
+    now = 0.0
+
+    # Call CheckStart a lot.  Should be ok.
+    for _ in range(ratelimiter.DEFAULT_LIMIT):
+      self.ratelimiter.CheckStart(request, now)
+      now = now + 0.001
+
+  def testCheckStart_perCountryLoggedOutLimit(self):
+    ratelimiter.COUNTRY_LIMITS['US'] = 10
+
+    request, _ = testing_helpers.GetRequestObjects(
+      project=self.project)
+    request.headers[ratelimiter.COUNTRY_HEADER] = 'US'
+    request.remote_addr = '192.168.1.1'
+    now = 0.0
+
+    with self.assertRaises(ratelimiter.RateLimitExceeded):
+      for m in range(ratelimiter.DEFAULT_LIMIT + 2):  # pragma: no branch
+        self.ratelimiter.CheckStart(request, now)
+        # Vary remote address to make sure the limit covers
+        # the whole country, regardless of IP.
+        request.remote_addr = '192.168.1.%d' % m
+        now = now + 0.001
+
+    # CheckStart for a country that isn't covered by a country-specific limit.
+    request.headers['X-AppEngine-Country'] = 'UK'
+    for m in range(11):
+      self.ratelimiter.CheckStart(request, now)
+      # Vary remote address to make sure the limit covers
+      # the whole country, regardless of IP.
+      request.remote_addr = '192.168.1.%d' % m
+      now = now + 0.001
+
+    # And regular rate limits work per-IP.
+    request.remote_addr = '192.168.1.1'
+    with self.assertRaises(ratelimiter.RateLimitExceeded):
+      for m in range(ratelimiter.DEFAULT_LIMIT):  # pragma: no branch
+        self.ratelimiter.CheckStart(request, now)
+        # Vary remote address to make sure the limit covers
+        # the whole country, regardless of IP.
+        now = now + 0.001
+
+  def testCheckEnd_SlowRequest(self):
+    """We count one request for each 1000ms."""
+    request, _ = testing_helpers.GetRequestObjects(
+      project=self.project)
+    request.headers[ratelimiter.COUNTRY_HEADER] = 'US'
+    request.remote_addr = '192.168.1.1'
+    start_time = 0.0
+
+    # Send some requests, all under the limit.
+    for _ in range(ratelimiter.DEFAULT_LIMIT-1):
+      start_time = start_time + 0.001
+      self.ratelimiter.CheckStart(request, start_time)
+      now = start_time + 0.010
+      self.ratelimiter.CheckEnd(request, now, start_time)
+
+    # Now issue some more request, this time taking long
+    # enough to get the cost threshold penalty.
+    # Fast forward enough to impact a later bucket than the
+    # previous requests.
+    start_time = now + 120.0
+    self.ratelimiter.CheckStart(request, start_time)
+
+    # Take longer than the threshold to process the request.
+    elapsed_ms = settings.ratelimiting_ms_per_count * 2
+    now = start_time + elapsed_ms / 1000
+
+    # The request finished, taking long enough to count as two.
+    self.ratelimiter.CheckEnd(request, now, start_time)
+
+    with self.assertRaises(ratelimiter.RateLimitExceeded):
+      # One more request after the expensive query should
+      # throw an excpetion.
+      self.ratelimiter.CheckStart(request, start_time)
+
+  def testCheckEnd_FastRequest(self):
+    request, _ = testing_helpers.GetRequestObjects(
+      project=self.project)
+    request.headers[ratelimiter.COUNTRY_HEADER] = 'asdasd'
+    request.remote_addr = '192.168.1.1'
+    start_time = 0.0
+
+    # Send some requests, all under the limit.
+    for _ in range(ratelimiter.DEFAULT_LIMIT):
+      self.ratelimiter.CheckStart(request, start_time)
+      now = start_time + 0.01
+      self.ratelimiter.CheckEnd(request, now, start_time)
+      start_time = now + 0.01
+
+
+class ApiRateLimiterTest(unittest.TestCase):
+
+  def setUp(self):
+    settings.ratelimiting_enabled = True
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.services = service_manager.Services(
+      config=fake.ConfigService(),
+      issue=fake.IssueService(),
+      user=fake.UserService(),
+      project=fake.ProjectService(),
+    )
+
+    self.client_id = '123456789'
+    self.client_email = 'test@example.com'
+
+    self.ratelimiter = ratelimiter.ApiRateLimiter()
+    settings.api_ratelimiting_enabled = True
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  def testCheckStart_Allowed(self):
+    now = 0.0
+    self.ratelimiter.CheckStart(self.client_id, self.client_email, now)
+    self.ratelimiter.CheckStart(self.client_id, None, now)
+    self.ratelimiter.CheckStart(None, None, now)
+    self.ratelimiter.CheckStart('anonymous', None, now)
+
+  def testCheckStart_Rejected(self):
+    now = 0.0
+    keysets = ratelimiter._CreateApiCacheKeys(
+        self.client_id, self.client_email, now)
+    values = [{key: ratelimiter.DEFAULT_API_QPM + 1 for key in keyset} for
+              keyset in keysets]
+    for value in values:
+      memcache.add_multi(value)
+    with self.assertRaises(ratelimiter.ApiRateLimitExceeded):
+      self.ratelimiter.CheckStart(self.client_id, self.client_email, now)
+
+  def testCheckStart_Allowed_HigherQPMSpecified(self):
+    """Client goes over the default, but has a higher QPM set."""
+    now = 0.0
+    keysets = ratelimiter._CreateApiCacheKeys(
+        self.client_id, self.client_email, now)
+    qpm_dict = client_config_svc.GetQPMDict()
+    qpm_dict[self.client_email] = ratelimiter.DEFAULT_API_QPM + 10
+    # The client used 1 request more than the default limit in each of the
+    # 5 minutes in our 5 minute sample window, so 5 over to the total.
+    values = [{key: ratelimiter.DEFAULT_API_QPM + 1 for key in keyset} for
+              keyset in keysets]
+    for value in values:
+      memcache.add_multi(value)
+    self.ratelimiter.CheckStart(self.client_id, self.client_email, now)
+    del qpm_dict[self.client_email]
+
+  def testCheckStart_Allowed_LowQPMIgnored(self):
+    """Client specifies a QPM lower than the default and default is used."""
+    now = 0.0
+    keysets = ratelimiter._CreateApiCacheKeys(
+        self.client_id, self.client_email, now)
+    qpm_dict = client_config_svc.GetQPMDict()
+    qpm_dict[self.client_email] = ratelimiter.DEFAULT_API_QPM - 10
+    values = [{key: ratelimiter.DEFAULT_API_QPM for key in keyset} for
+              keyset in keysets]
+    for value in values:
+      memcache.add_multi(value)
+    self.ratelimiter.CheckStart(self.client_id, self.client_email, now)
+    del qpm_dict[self.client_email]
+
+  def testCheckStart_Rejected_LowQPMIgnored(self):
+    """Client specifies a QPM lower than the default and default is used."""
+    now = 0.0
+    keysets = ratelimiter._CreateApiCacheKeys(
+        self.client_id, self.client_email, now)
+    qpm_dict = client_config_svc.GetQPMDict()
+    qpm_dict[self.client_email] = ratelimiter.DEFAULT_API_QPM - 10
+    values = [{key: ratelimiter.DEFAULT_API_QPM + 1 for key in keyset} for
+              keyset in keysets]
+    for value in values:
+      memcache.add_multi(value)
+    with self.assertRaises(ratelimiter.ApiRateLimitExceeded):
+      self.ratelimiter.CheckStart(self.client_id, self.client_email, now)
+    del qpm_dict[self.client_email]
+
+  def testCheckEnd(self):
+    start_time = 0.0
+    keysets = ratelimiter._CreateApiCacheKeys(
+        self.client_id, self.client_email, start_time)
+
+    now = 0.1
+    self.ratelimiter.CheckEnd(
+        self.client_id, self.client_email, now, start_time)
+    counters = memcache.get_multi(keysets[0])
+    count = sum(counters.values())
+    # No extra cost charged
+    self.assertEqual(0, count)
+
+    elapsed_ms = settings.ratelimiting_ms_per_count * 2
+    now = start_time + elapsed_ms / 1000
+    self.ratelimiter.CheckEnd(
+        self.client_id, self.client_email, now, start_time)
+    counters = memcache.get_multi(keysets[0])
+    count = sum(counters.values())
+    # Extra cost charged
+    self.assertEqual(1, count)
diff --git a/framework/test/reap_test.py b/framework/test/reap_test.py
new file mode 100644
index 0000000..f1a907d
--- /dev/null
+++ b/framework/test/reap_test.py
@@ -0,0 +1,131 @@
+# 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
+
+"""Tests for the reap module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mock
+import mox
+
+from mock import Mock
+
+from framework import reap
+from framework import sql
+from proto import project_pb2
+from services import service_manager
+from services import template_svc
+from testing import fake
+from testing import testing_helpers
+
+
+class ReapTest(unittest.TestCase):
+
+  def setUp(self):
+    self.project_service = fake.ProjectService()
+    self.issue_service = fake.IssueService()
+    self.issue_star_service = fake.IssueStarService()
+    self.config_service = fake.ConfigService()
+    self.features_service = fake.FeaturesService()
+    self.project_star_service = fake.ProjectStarService()
+    self.services = service_manager.Services(
+        project=self.project_service,
+        issue=self.issue_service,
+        issue_star=self.issue_star_service,
+        config=self.config_service,
+        features=self.features_service,
+        project_star=self.project_star_service,
+        template=Mock(spec=template_svc.TemplateService),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+
+    self.proj1_id = 1001
+    self.proj1_issue_id = 111
+    self.proj1 = self.project_service.TestAddProject(
+        name='proj1', project_id=self.proj1_id)
+    self.proj2_id = 1002
+    self.proj2_issue_id = 112
+    self.proj2 = self.project_service.TestAddProject(
+        name='proj2', project_id=self.proj2_id)
+
+    self.mox = mox.Mox()
+    self.cnxn = self.mox.CreateMock(sql.MonorailConnection)
+    self.project_service.project_tbl = self.mox.CreateMock(sql.SQLTableManager)
+    self.issue_service.issue_tbl = self.mox.CreateMock(sql.SQLTableManager)
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def setUpMarkDoomedProjects(self):
+    self.project_service.project_tbl.Select(
+        self.cnxn, cols=['project_id'], limit=1000, state='archived',
+        where=mox.IgnoreArg()).AndReturn([[self.proj1_id]])
+
+  def testMarkDoomedProjects(self):
+    self.setUpMarkDoomedProjects()
+    reaper = reap.Reap('req', 'resp', services=self.services)
+
+    self.mox.ReplayAll()
+    doomed_project_ids = reaper._MarkDoomedProjects(self.cnxn)
+    self.mox.VerifyAll()
+
+    self.assertEqual([self.proj1_id], doomed_project_ids)
+    self.assertEqual(project_pb2.ProjectState.DELETABLE, self.proj1.state)
+    self.assertEqual('DELETABLE_%s' % self.proj1_id, self.proj1.project_name)
+
+  def setUpExpungeParts(self):
+    self.project_service.project_tbl.Select(
+        self.cnxn, cols=['project_id'], limit=100,
+        state='deletable').AndReturn([[self.proj1_id], [self.proj2_id]])
+    self.issue_service.issue_tbl.Select(
+        self.cnxn, cols=['id'], limit=1000,
+        project_id=self.proj1_id).AndReturn([[self.proj1_issue_id]])
+    self.issue_service.issue_tbl.Select(
+        self.cnxn, cols=['id'], limit=1000,
+        project_id=self.proj2_id).AndReturn([[self.proj2_issue_id]])
+
+  def testExpungeDeletableProjects(self):
+    self.setUpExpungeParts()
+    reaper = reap.Reap('req', 'resp', services=self.services)
+
+    self.mox.ReplayAll()
+    expunged_project_ids = reaper._ExpungeDeletableProjects(self.cnxn)
+    self.mox.VerifyAll()
+
+    self.assertEqual([self.proj1_id, self.proj2_id], expunged_project_ids)
+    # Verify all expected expunge methods were called.
+    self.assertEqual(
+        [self.proj1_issue_id, self.proj2_issue_id],
+        self.services.issue_star.expunged_item_ids)
+    self.assertEqual(
+        [self.proj1_issue_id, self.proj2_issue_id],
+        self.services.issue.expunged_issues)
+    self.assertEqual(
+        [self.proj1_id, self.proj2_id], self.services.config.expunged_configs)
+    self.assertEqual(
+        [self.proj1_id, self.proj2_id],
+        self.services.features.expunged_saved_queries)
+    self.assertEqual(
+        [self.proj1_id, self.proj2_id],
+        self.services.features.expunged_filter_rules)
+    self.assertEqual(
+        [self.proj1_id, self.proj2_id],
+        self.services.issue.expunged_former_locations)
+    self.assertEqual(
+        [self.proj1_id, self.proj2_id], self.services.issue.expunged_local_ids)
+    self.assertEqual(
+        [self.proj1_id, self.proj2_id],
+        self.services.features.expunged_quick_edit)
+    self.assertEqual(
+        [self.proj1_id, self.proj2_id],
+        self.services.project_star.expunged_item_ids)
+    self.assertEqual(0, len(self.services.project.test_projects))
+    self.services.template.ExpungeProjectTemplates.assert_has_calls([
+        mock.call(self.cnxn, 1001),
+        mock.call(self.cnxn, 1002)])
diff --git a/framework/test/redis_utils_test.py b/framework/test/redis_utils_test.py
new file mode 100644
index 0000000..a4128ce
--- /dev/null
+++ b/framework/test/redis_utils_test.py
@@ -0,0 +1,64 @@
+# Copyright 2020 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.
+"""Tests for the Redis utility module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import fakeredis
+import unittest
+
+from framework import redis_utils
+from proto import features_pb2
+
+
+class RedisHelperTest(unittest.TestCase):
+
+  def testFormatRedisKey(self):
+    redis_key = redis_utils.FormatRedisKey(111)
+    self.assertEqual('111', redis_key)
+    redis_key = redis_utils.FormatRedisKey(222, prefix='foo:')
+    self.assertEqual('foo:222', redis_key)
+    redis_key = redis_utils.FormatRedisKey(333, prefix='bar')
+    self.assertEqual('bar:333', redis_key)
+
+  def testCreateRedisClient(self):
+    self.assertIsNone(redis_utils.connection_pool)
+    redis_client_1 = redis_utils.CreateRedisClient()
+    self.assertIsNotNone(redis_client_1)
+    self.assertIsNotNone(redis_utils.connection_pool)
+    redis_client_2 = redis_utils.CreateRedisClient()
+    self.assertIsNotNone(redis_client_2)
+    self.assertIsNot(redis_client_1, redis_client_2)
+
+  def testConnectionVerification(self):
+    server = fakeredis.FakeServer()
+    client = None
+    self.assertFalse(redis_utils.VerifyRedisConnection(client))
+    server.connected = True
+    client = fakeredis.FakeRedis(server=server)
+    self.assertTrue(redis_utils.VerifyRedisConnection(client))
+    server.connected = False
+    self.assertFalse(redis_utils.VerifyRedisConnection(client))
+
+  def testSerializeDeserializeInt(self):
+    serialized_int = redis_utils.SerializeValue(123)
+    self.assertEqual('123', serialized_int)
+    self.assertEquals(123, redis_utils.DeserializeValue(serialized_int))
+
+  def testSerializeDeserializeStr(self):
+    serialized = redis_utils.SerializeValue('123')
+    self.assertEqual('"123"', serialized)
+    self.assertEquals('123', redis_utils.DeserializeValue(serialized))
+
+  def testSerializeDeserializePB(self):
+    features = features_pb2.Hotlist.HotlistItem(
+        issue_id=7949, rank=0, adder_id=333, date_added=1525)
+    serialized = redis_utils.SerializeValue(
+        features, pb_class=features_pb2.Hotlist.HotlistItem)
+    self.assertIsInstance(serialized, str)
+    deserialized = redis_utils.DeserializeValue(
+        serialized, pb_class=features_pb2.Hotlist.HotlistItem)
+    self.assertIsInstance(deserialized, features_pb2.Hotlist.HotlistItem)
+    self.assertEquals(deserialized, features)
diff --git a/framework/test/registerpages_helpers_test.py b/framework/test/registerpages_helpers_test.py
new file mode 100644
index 0000000..61c489e
--- /dev/null
+++ b/framework/test/registerpages_helpers_test.py
@@ -0,0 +1,59 @@
+# 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
+
+"""Tests for URL handler registration helper functions."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import webapp2
+
+from framework import registerpages_helpers
+
+
+class SendRedirectInScopeTest(unittest.TestCase):
+
+  def testMakeRedirectInScope_Error(self):
+    self.assertRaises(
+        AssertionError,
+        registerpages_helpers.MakeRedirectInScope, 'no/initial/slash', 'p')
+    self.assertRaises(
+        AssertionError,
+        registerpages_helpers.MakeRedirectInScope, '', 'p')
+
+  def testMakeRedirectInScope_Normal(self):
+    factory = registerpages_helpers.MakeRedirectInScope('/', 'p')
+    # Non-dasher, normal case
+    request = webapp2.Request.blank(
+        path='/p/foo', headers={'Host': 'example.com'})
+    response = webapp2.Response()
+    redirector = factory(request, response)
+    redirector.get()
+    self.assertEqual(response.location, '//example.com/p/foo/')
+    self.assertEqual(response.status, '301 Moved Permanently')
+
+  def testMakeRedirectInScope_Temporary(self):
+    factory = registerpages_helpers.MakeRedirectInScope(
+        '/', 'p', permanent=False)
+    request = webapp2.Request.blank(
+        path='/p/foo', headers={'Host': 'example.com'})
+    response = webapp2.Response()
+    redirector = factory(request, response)
+    redirector.get()
+    self.assertEqual(response.location, '//example.com/p/foo/')
+    self.assertEqual(response.status, '302 Moved Temporarily')
+
+  def testMakeRedirectInScope_KeepQueryString(self):
+    factory = registerpages_helpers.MakeRedirectInScope(
+        '/', 'p', keep_qs=True)
+    request = webapp2.Request.blank(
+        path='/p/foo?q=1', headers={'Host': 'example.com'})
+    response = webapp2.Response()
+    redirector = factory(request, response)
+    redirector.get()
+    self.assertEqual(response.location, '//example.com/p/foo/?q=1')
+    self.assertEqual(response.status, '302 Moved Temporarily')
diff --git a/framework/test/servlet_helpers_test.py b/framework/test/servlet_helpers_test.py
new file mode 100644
index 0000000..a2fe687
--- /dev/null
+++ b/framework/test/servlet_helpers_test.py
@@ -0,0 +1,168 @@
+# 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
+
+"""Unit tests for servlet base class helper functions."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from google.appengine.ext import testbed
+
+
+from framework import permissions
+from framework import servlet_helpers
+from proto import project_pb2
+from proto import tracker_pb2
+from testing import testing_helpers
+
+
+class EztDataTest(unittest.TestCase):
+
+  def testGetBannerTime(self):
+    """Tests GetBannerTime method."""
+    timestamp = [2019, 6, 13, 18, 30]
+
+    banner_time = servlet_helpers.GetBannerTime(timestamp)
+    self.assertEqual(1560450600, banner_time)
+
+
+class AssertBasePermissionTest(unittest.TestCase):
+
+  def testAccessGranted(self):
+    _, mr = testing_helpers.GetRequestObjects(path='/hosting')
+    # No exceptions should be raised.
+    servlet_helpers.AssertBasePermission(mr)
+
+    mr.auth.user_id = 123
+    # No exceptions should be raised.
+    servlet_helpers.AssertBasePermission(mr)
+    servlet_helpers.AssertBasePermissionForUser(
+        mr.auth.user_pb, mr.auth.user_view)
+
+  def testBanned(self):
+    _, mr = testing_helpers.GetRequestObjects(path='/hosting')
+    mr.auth.user_pb.banned = 'spammer'
+    self.assertRaises(
+        permissions.BannedUserException,
+        servlet_helpers.AssertBasePermissionForUser,
+        mr.auth.user_pb, mr.auth.user_view)
+    self.assertRaises(
+        permissions.BannedUserException,
+        servlet_helpers.AssertBasePermission, mr)
+
+  def testPlusAddressAccount(self):
+    _, mr = testing_helpers.GetRequestObjects(path='/hosting')
+    mr.auth.user_pb.email = 'mailinglist+spammer@chromium.org'
+    self.assertRaises(
+        permissions.BannedUserException,
+        servlet_helpers.AssertBasePermissionForUser,
+        mr.auth.user_pb, mr.auth.user_view)
+    self.assertRaises(
+        permissions.BannedUserException,
+        servlet_helpers.AssertBasePermission, mr)
+
+  def testNoAccessToProject(self):
+    project = project_pb2.Project()
+    project.project_name = 'proj'
+    project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    _, mr = testing_helpers.GetRequestObjects(path='/p/proj/', project=project)
+    mr.perms = permissions.EMPTY_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        servlet_helpers.AssertBasePermission, mr)
+
+
+FORM_URL = 'http://example.com/issues/form.php'
+
+
+class ComputeIssueEntryURLTest(unittest.TestCase):
+
+  def setUp(self):
+    self.project = project_pb2.Project()
+    self.project.project_name = 'proj'
+    self.config = tracker_pb2.ProjectIssueConfig()
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_user_stub()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  def testComputeIssueEntryURL_Normal(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/detail?id=123&q=term',
+        project=self.project)
+
+    url = servlet_helpers.ComputeIssueEntryURL(mr, self.config)
+    self.assertEqual('/p/proj/issues/entry', url)
+
+  def testComputeIssueEntryURL_Customized(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/detail?id=123&q=term',
+        project=self.project)
+    mr.auth.user_id = 111
+    self.config.custom_issue_entry_url = FORM_URL
+
+    url = servlet_helpers.ComputeIssueEntryURL(mr, self.config)
+    self.assertTrue(url.startswith(FORM_URL))
+    self.assertIn('token=', url)
+    self.assertIn('role=', url)
+    self.assertIn('continue=', url)
+
+class IssueListURLTest(unittest.TestCase):
+
+  def setUp(self):
+    self.project = project_pb2.Project()
+    self.project.project_name = 'proj'
+    self.project.owner_ids = [111]
+    self.config = tracker_pb2.ProjectIssueConfig()
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_user_stub()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  def testIssueListURL_NotCustomized(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues', project=self.project)
+
+    url = servlet_helpers.IssueListURL(mr, self.config)
+    self.assertEqual('/p/proj/issues/list', url)
+
+  def testIssueListURL_Customized_Nonmember(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues', project=self.project)
+    self.config.member_default_query = 'owner:me'
+
+    url = servlet_helpers.IssueListURL(mr, self.config)
+    self.assertEqual('/p/proj/issues/list', url)
+
+  def testIssueListURL_Customized_Member(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues', project=self.project,
+        user_info={'effective_ids': {111}})
+    self.config.member_default_query = 'owner:me'
+
+    url = servlet_helpers.IssueListURL(mr, self.config)
+    self.assertEqual('/p/proj/issues/list?q=owner%3Ame', url)
+
+  def testIssueListURL_Customized_RetainQS(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues', project=self.project,
+        user_info={'effective_ids': {111}})
+    self.config.member_default_query = 'owner:me'
+
+    url = servlet_helpers.IssueListURL(mr, self.config, query_string='')
+    self.assertEqual('/p/proj/issues/list?q=owner%3Ame', url)
+
+    url = servlet_helpers.IssueListURL(mr, self.config, query_string='q=Pri=1')
+    self.assertEqual('/p/proj/issues/list?q=Pri=1', url)
diff --git a/framework/test/servlet_test.py b/framework/test/servlet_test.py
new file mode 100644
index 0000000..40d5ed2
--- /dev/null
+++ b/framework/test/servlet_test.py
@@ -0,0 +1,474 @@
+# 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
+
+"""Unit tests for servlet base class module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+import mock
+import unittest
+
+from google.appengine.api import app_identity
+from google.appengine.ext import testbed
+
+import webapp2
+
+from framework import framework_constants
+from framework import servlet
+from framework import xsrf
+from proto import project_pb2
+from proto import tracker_pb2
+from proto import user_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class TestableServlet(servlet.Servlet):
+  """A tiny concrete subclass of abstract class Servlet."""
+
+  def __init__(self, request, response, services=None, do_post_redirect=True):
+    super(TestableServlet, self).__init__(request, response, services=services)
+    self.do_post_redirect = do_post_redirect
+    self.seen_post_data = None
+
+  def ProcessFormData(self, _mr, post_data):
+    self.seen_post_data = post_data
+    if self.do_post_redirect:
+      return '/This/Is?The=Next#Page'
+    else:
+      self.response.write('sending raw data to browser')
+
+
+class ServletTest(unittest.TestCase):
+
+  def setUp(self):
+    services = service_manager.Services(
+        project=fake.ProjectService(),
+        project_star=fake.ProjectStarService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    services.user.TestAddUser('user@example.com', 111)
+    self.page_class = TestableServlet(
+        webapp2.Request.blank('/'), webapp2.Response(), services=services)
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_user_stub()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  def testDefaultValues(self):
+    self.assertEqual(None, self.page_class._MAIN_TAB_MODE)
+    self.assertTrue(self.page_class._TEMPLATE_PATH.endswith('/templates/'))
+    self.assertEqual(None, self.page_class._PAGE_TEMPLATE)
+
+  def testGatherBaseData(self):
+    project = self.page_class.services.project.TestAddProject(
+        'testproj', state=project_pb2.ProjectState.LIVE)
+    project.cached_content_timestamp = 12345
+
+    (_request, mr) = testing_helpers.GetRequestObjects(
+        path='/p/testproj/feeds', project=project)
+    nonce = '1a2b3c4d5e6f7g'
+
+    base_data = self.page_class.GatherBaseData(mr, nonce)
+
+    self.assertEqual(base_data['nonce'], nonce)
+    self.assertEqual(base_data['projectname'], 'testproj')
+    self.assertEqual(base_data['project'].cached_content_timestamp, 12345)
+    self.assertEqual(base_data['project_alert'], None)
+
+    self.assertTrue(base_data['currentPageURL'].endswith('/p/testproj/feeds'))
+    self.assertTrue(
+        base_data['currentPageURLEncoded'].endswith('%2Fp%2Ftestproj%2Ffeeds'))
+
+  def testFormHandlerURL(self):
+    self.assertEqual('/edit.do', self.page_class._FormHandlerURL('/'))
+    self.assertEqual(
+      '/something/edit.do',
+      self.page_class._FormHandlerURL('/something/'))
+    self.assertEqual(
+      '/something/edit.do',
+      self.page_class._FormHandlerURL('/something/edit.do'))
+    self.assertEqual(
+      '/something/detail_ezt.do',
+      self.page_class._FormHandlerURL('/something/detail_ezt'))
+
+  def testProcessForm_BadToken(self):
+    user_id = 111
+    token = 'no soup for you'
+
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/we/we/we?so=excited',
+        params={
+            'yesterday': 'thursday',
+            'today': 'friday',
+            'token': token
+        },
+        user_info={'user_id': user_id},
+        method='POST',
+    )
+    self.assertRaises(
+        xsrf.TokenIncorrect, self.page_class._DoFormProcessing, request, mr)
+    self.assertEqual(None, self.page_class.seen_post_data)
+
+  def testProcessForm_XhrAllowed_BadToken(self):
+    user_id = 111
+    token = 'no soup for you'
+
+    self.page_class.ALLOW_XHR = True
+
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/we/we/we?so=excited',
+        params={
+            'yesterday': 'thursday',
+            'today': 'friday',
+            'token': token
+        },
+        user_info={'user_id': user_id},
+        method='POST',
+    )
+    self.assertRaises(
+        xsrf.TokenIncorrect, self.page_class._DoFormProcessing, request, mr)
+    self.assertEqual(None, self.page_class.seen_post_data)
+
+  def testProcessForm_XhrAllowed_AcceptsPathToken(self):
+    user_id = 111
+    token = xsrf.GenerateToken(user_id, '/we/we/we')
+
+    self.page_class.ALLOW_XHR = True
+
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/we/we/we?so=excited',
+        params={
+            'yesterday': 'thursday',
+            'today': 'friday',
+            'token': token
+        },
+        user_info={'user_id': user_id},
+        method='POST',
+    )
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.page_class._DoFormProcessing(request, mr)
+    self.assertEqual(302, cm.exception.code)  # forms redirect on success
+
+    self.assertDictEqual(
+        {
+            'yesterday': 'thursday',
+            'today': 'friday',
+            'token': token
+        }, dict(self.page_class.seen_post_data))
+
+  def testProcessForm_XhrAllowed_AcceptsXhrToken(self):
+    user_id = 111
+    token = xsrf.GenerateToken(user_id, 'xhr')
+
+    self.page_class.ALLOW_XHR = True
+
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/we/we/we?so=excited',
+        params={'yesterday': 'thursday', 'today': 'friday', 'token': token},
+        user_info={'user_id': user_id},
+        method='POST',
+    )
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.page_class._DoFormProcessing(request, mr)
+    self.assertEqual(302, cm.exception.code)  # forms redirect on success
+
+    self.assertDictEqual(
+        {
+            'yesterday': 'thursday',
+            'today': 'friday',
+            'token': token
+        }, dict(self.page_class.seen_post_data))
+
+  def testProcessForm_RawResponse(self):
+    user_id = 111
+    token = xsrf.GenerateToken(user_id, '/we/we/we')
+
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/we/we/we?so=excited',
+        params={'yesterday': 'thursday', 'today': 'friday', 'token': token},
+        user_info={'user_id': user_id},
+        method='POST',
+    )
+    self.page_class.do_post_redirect = False
+    self.page_class._DoFormProcessing(request, mr)
+    self.assertEqual(
+        'sending raw data to browser',
+        self.page_class.response.body)
+
+  def testProcessForm_Normal(self):
+    user_id = 111
+    token = xsrf.GenerateToken(user_id, '/we/we/we')
+
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/we/we/we?so=excited',
+        params={'yesterday': 'thursday', 'today': 'friday', 'token': token},
+        user_info={'user_id': user_id},
+        method='POST',
+    )
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.page_class._DoFormProcessing(request, mr)
+    self.assertEqual(302, cm.exception.code)  # forms redirect on success
+
+    self.assertDictEqual(
+        {'yesterday': 'thursday', 'today': 'friday', 'token': token},
+        dict(self.page_class.seen_post_data))
+
+  def testCalcProjectAlert(self):
+    project = fake.Project(
+        project_name='alerttest', state=project_pb2.ProjectState.LIVE)
+
+    project_alert = servlet._CalcProjectAlert(project)
+    self.assertEqual(project_alert, None)
+
+    project.state = project_pb2.ProjectState.ARCHIVED
+    project_alert = servlet._CalcProjectAlert(project)
+    self.assertEqual(
+        project_alert,
+        'Project is archived: read-only by members only.')
+
+    delete_time = int(time.time() + framework_constants.SECS_PER_DAY * 1.5)
+    project.delete_time = delete_time
+    project_alert = servlet._CalcProjectAlert(project)
+    self.assertEqual(project_alert, 'Scheduled for deletion in 1 day.')
+
+    delete_time = int(time.time() + framework_constants.SECS_PER_DAY * 2.5)
+    project.delete_time = delete_time
+    project_alert = servlet._CalcProjectAlert(project)
+    self.assertEqual(project_alert, 'Scheduled for deletion in 2 days.')
+
+  def testCheckForMovedProject_NoRedirect(self):
+    project = fake.Project(
+        project_name='proj', state=project_pb2.ProjectState.LIVE)
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj', project=project)
+    self.page_class._CheckForMovedProject(mr, request)
+
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/source/browse/p/adminAdvanced', project=project)
+    self.page_class._CheckForMovedProject(mr, request)
+
+  def testCheckForMovedProject_Redirect(self):
+    project = fake.Project(project_name='proj', moved_to='http://example.com')
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj', project=project)
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.page_class._CheckForMovedProject(mr, request)
+    self.assertEqual(302, cm.exception.code)  # redirect because project moved
+
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/source/browse/p/adminAdvanced', project=project)
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.page_class._CheckForMovedProject(mr, request)
+    self.assertEqual(302, cm.exception.code)  # redirect because project moved
+
+  def testCheckForMovedProject_AdminAdvanced(self):
+    """We do not redirect away from the page that edits project state."""
+    project = fake.Project(project_name='proj', moved_to='http://example.com')
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/adminAdvanced', project=project)
+    self.page_class._CheckForMovedProject(mr, request)
+
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/adminAdvanced?ts=123234', project=project)
+    self.page_class._CheckForMovedProject(mr, request)
+
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/adminAdvanced.do', project=project)
+    self.page_class._CheckForMovedProject(mr, request)
+
+  @mock.patch('settings.branded_domains',
+              {'proj': 'branded.example.com', '*': 'bugs.chromium.org'})
+  def testMaybeRedirectToBrandedDomain_RedirBrandedProject(self):
+    """We redirect for a branded project if the user typed a different host."""
+    project = fake.Project(project_name='proj')
+    request, _mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/path', project=project)
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.page_class._MaybeRedirectToBrandedDomain(request, 'proj')
+    self.assertEqual(302, cm.exception.code)  # forms redirect on success
+    self.assertEqual('https://branded.example.com/p/proj/path?redir=1',
+                     cm.exception.location)
+
+    request, _mr = testing_helpers.GetRequestObjects(
+      path='/p/proj/path?query', project=project)
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.page_class._MaybeRedirectToBrandedDomain(request, 'proj')
+    self.assertEqual(302, cm.exception.code)  # forms redirect on success
+    self.assertEqual('https://branded.example.com/p/proj/path?query&redir=1',
+                     cm.exception.location)
+
+  @mock.patch('settings.branded_domains',
+              {'proj': 'branded.example.com', '*': 'bugs.chromium.org'})
+  def testMaybeRedirectToBrandedDomain_AvoidRedirLoops(self):
+    """Don't redirect for a branded project if already redirected."""
+    project = fake.Project(project_name='proj')
+    request, _mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/path?redir=1', project=project)
+    # No redirect happens.
+    self.page_class._MaybeRedirectToBrandedDomain(request, 'proj')
+
+  @mock.patch('settings.branded_domains',
+              {'proj': 'branded.example.com', '*': 'bugs.chromium.org'})
+  def testMaybeRedirectToBrandedDomain_NonProjectPage(self):
+    """Don't redirect for a branded project if not in any project."""
+    request, _mr = testing_helpers.GetRequestObjects(
+        path='/u/user@example.com')
+    # No redirect happens.
+    self.page_class._MaybeRedirectToBrandedDomain(request, None)
+
+  @mock.patch('settings.branded_domains',
+              {'proj': 'branded.example.com', '*': 'bugs.chromium.org'})
+  def testMaybeRedirectToBrandedDomain_AlreadyOnBrandedHost(self):
+    """Don't redirect for a branded project if already on branded domain."""
+    project = fake.Project(project_name='proj')
+    request, _mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/path', project=project)
+    request.host = 'branded.example.com'
+    # No redirect happens.
+    self.page_class._MaybeRedirectToBrandedDomain(request, 'proj')
+
+  @mock.patch('settings.branded_domains',
+              {'proj': 'branded.example.com', '*': 'bugs.chromium.org'})
+  def testMaybeRedirectToBrandedDomain_Localhost(self):
+    """Don't redirect for a branded project on localhost."""
+    project = fake.Project(project_name='proj')
+    request, _mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/path', project=project)
+    request.host = 'localhost:8080'
+    # No redirect happens.
+    self.page_class._MaybeRedirectToBrandedDomain(request, 'proj')
+
+    request.host = '0.0.0.0:8080'
+    # No redirect happens.
+    self.page_class._MaybeRedirectToBrandedDomain(request, 'proj')
+
+  @mock.patch('settings.branded_domains',
+              {'proj': 'branded.example.com', '*': 'bugs.chromium.org'})
+  def testMaybeRedirectToBrandedDomain_NotBranded(self):
+    """Don't redirect for a non-branded project."""
+    project = fake.Project(project_name='other')
+    request, _mr = testing_helpers.GetRequestObjects(
+        path='/p/other/path?query', project=project)
+    request.host = 'branded.example.com'  # But other project is unbranded.
+
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.page_class._MaybeRedirectToBrandedDomain(request, 'other')
+    self.assertEqual(302, cm.exception.code)  # forms redirect on success
+    self.assertEqual('https://bugs.chromium.org/p/other/path?query&redir=1',
+                     cm.exception.location)
+
+  def testGatherHelpData_Normal(self):
+    project = fake.Project(project_name='proj')
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj', project=project)
+    help_data = self.page_class.GatherHelpData(mr, {})
+    self.assertEqual(None, help_data['cue'])
+    self.assertEqual(None, help_data['account_cue'])
+
+  def testGatherHelpData_VacationReminder(self):
+    project = fake.Project(project_name='proj')
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj', project=project)
+    mr.auth.user_id = 111
+    mr.auth.user_pb.vacation_message = 'Gone skiing'
+    help_data = self.page_class.GatherHelpData(mr, {})
+    self.assertEqual('you_are_on_vacation', help_data['cue'])
+
+    self.page_class.services.user.SetUserPrefs(
+        'cnxn', 111,
+        [user_pb2.UserPrefValue(name='you_are_on_vacation', value='true')])
+    help_data = self.page_class.GatherHelpData(mr, {})
+    self.assertEqual(None, help_data['cue'])
+    self.assertEqual(None, help_data['account_cue'])
+
+  def testGatherHelpData_YouAreBouncing(self):
+    project = fake.Project(project_name='proj')
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj', project=project)
+    mr.auth.user_id = 111
+    mr.auth.user_pb.email_bounce_timestamp = 1497647529
+    help_data = self.page_class.GatherHelpData(mr, {})
+    self.assertEqual('your_email_bounced', help_data['cue'])
+
+    self.page_class.services.user.SetUserPrefs(
+        'cnxn', 111,
+        [user_pb2.UserPrefValue(name='your_email_bounced', value='true')])
+    help_data = self.page_class.GatherHelpData(mr, {})
+    self.assertEqual(None, help_data['cue'])
+    self.assertEqual(None, help_data['account_cue'])
+
+  def testGatherHelpData_ChildAccount(self):
+    """Display a warning when user is signed in to a child account."""
+    project = fake.Project(project_name='proj')
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj', project=project)
+    mr.auth.user_pb.linked_parent_id = 111
+    help_data = self.page_class.GatherHelpData(mr, {})
+    self.assertEqual(None, help_data['cue'])
+    self.assertEqual('switch_to_parent_account', help_data['account_cue'])
+    self.assertEqual('user@example.com', help_data['parent_email'])
+
+  def testGatherDebugData_Visibility(self):
+    project = fake.Project(
+        project_name='testtest', state=project_pb2.ProjectState.LIVE)
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/foo/servlet_path', project=project)
+    debug_data = self.page_class.GatherDebugData(mr, {})
+    self.assertEqual('off', debug_data['dbg'])
+
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/foo/servlet_path?debug=1', project=project)
+    debug_data = self.page_class.GatherDebugData(mr, {})
+    self.assertEqual('on', debug_data['dbg'])
+
+
+class ProjectIsRestrictedTest(unittest.TestCase):
+
+  def testNonRestrictedProject(self):
+    proj = project_pb2.Project()
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.project = proj
+
+    proj.access = project_pb2.ProjectAccess.ANYONE
+    proj.state = project_pb2.ProjectState.LIVE
+    self.assertFalse(servlet._ProjectIsRestricted(mr))
+
+    proj.state = project_pb2.ProjectState.ARCHIVED
+    self.assertFalse(servlet._ProjectIsRestricted(mr))
+
+  def testRestrictedProject(self):
+    proj = project_pb2.Project()
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.project = proj
+
+    proj.state = project_pb2.ProjectState.LIVE
+    proj.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    self.assertTrue(servlet._ProjectIsRestricted(mr))
+
+class VersionBaseTest(unittest.TestCase):
+
+  @mock.patch('settings.local_mode', True)
+  def testLocalhost(self):
+    request = webapp2.Request.blank('/', base_url='http://localhost:8080')
+    actual = servlet._VersionBaseURL(request)
+    expected = 'http://localhost:8080'
+    self.assertEqual(expected, actual)
+
+  @mock.patch('settings.local_mode', False)
+  @mock.patch('google.appengine.api.app_identity.get_default_version_hostname')
+  def testProd(self, mock_gdvh):
+    mock_gdvh.return_value = 'monorail-prod.appspot.com'
+    request = webapp2.Request.blank('/', base_url='https://bugs.chromium.org')
+    actual = servlet._VersionBaseURL(request)
+    expected = 'https://test-dot-monorail-prod.appspot.com'
+    self.assertEqual(expected, actual)
diff --git a/framework/test/sorting_test.py b/framework/test/sorting_test.py
new file mode 100644
index 0000000..4b1feb3
--- /dev/null
+++ b/framework/test/sorting_test.py
@@ -0,0 +1,360 @@
+# 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
+
+"""Unit tests for sorting.py functions."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+# For convenient debugging
+import logging
+
+import mox
+
+from framework import sorting
+from framework import framework_views
+from proto import tracker_pb2
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+
+
+def MakeDescending(accessor):
+  return sorting._MaybeMakeDescending(accessor, True)
+
+
+class DescendingValueTest(unittest.TestCase):
+
+  def testMinString(self):
+    """When sorting desc, a min string will sort last instead of first."""
+    actual = sorting.DescendingValue.MakeDescendingValue(sorting.MIN_STRING)
+    self.assertEqual(sorting.MAX_STRING, actual)
+
+  def testMaxString(self):
+    """When sorting desc, a max string will sort first instead of last."""
+    actual = sorting.DescendingValue.MakeDescendingValue(sorting.MAX_STRING)
+    self.assertEqual(sorting.MIN_STRING, actual)
+
+  def testDescValues(self):
+    """The point of DescendingValue is to reverse the sort order."""
+    anti_a = sorting.DescendingValue.MakeDescendingValue('a')
+    anti_b = sorting.DescendingValue.MakeDescendingValue('b')
+    self.assertTrue(anti_a > anti_b)
+
+  def testMaybeMakeDescending(self):
+    """It returns an accessor that makes DescendingValue iff arg is True."""
+    asc_accessor = sorting._MaybeMakeDescending(lambda issue: 'a', False)
+    asc_value = asc_accessor('fake issue')
+    self.assertTrue(asc_value is 'a')
+
+    desc_accessor = sorting._MaybeMakeDescending(lambda issue: 'a', True)
+    print(desc_accessor)
+    desc_value = desc_accessor('fake issue')
+    self.assertTrue(isinstance(desc_value, sorting.DescendingValue))
+
+
+class SortingTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.default_cols = 'a b c'
+    self.builtin_cols = 'a b x y z'
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.config.component_defs.append(tracker_bizobj.MakeComponentDef(
+        11, 789, 'Database', 'doc', False, [], [], 0, 0))
+    self.config.component_defs.append(tracker_bizobj.MakeComponentDef(
+        22, 789, 'User Interface', 'doc', True, [], [], 0, 0))
+    self.config.component_defs.append(tracker_bizobj.MakeComponentDef(
+        33, 789, 'Installer', 'doc', False, [], [], 0, 0))
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testMakeSingleSortKeyAccessor_Status(self):
+    """Sorting by status should create an accessor for that column."""
+    self.mox.StubOutWithMock(sorting, '_IndexOrLexical')
+    status_names = [wks.status for wks in self.config.well_known_statuses]
+    sorting._IndexOrLexical(status_names, 'status accessor')
+    self.mox.ReplayAll()
+
+    sorting._MakeSingleSortKeyAccessor(
+      'status', self.config, {'status': 'status accessor'}, [], {}, [])
+    self.mox.VerifyAll()
+
+  def testMakeSingleSortKeyAccessor_Component(self):
+    """Sorting by component should create an accessor for that column."""
+    self.mox.StubOutWithMock(sorting, '_IndexListAccessor')
+    component_ids = [11, 33, 22]
+    sorting._IndexListAccessor(component_ids, 'component accessor')
+    self.mox.ReplayAll()
+
+    sorting._MakeSingleSortKeyAccessor(
+      'component', self.config, {'component': 'component accessor'}, [], {}, [])
+    self.mox.VerifyAll()
+
+  def testMakeSingleSortKeyAccessor_OtherBuiltInColunms(self):
+    """Sorting a built-in column should create an accessor for that column."""
+    accessor = sorting._MakeSingleSortKeyAccessor(
+      'buildincol', self.config, {'buildincol': 'accessor'}, [], {}, [])
+    self.assertEqual('accessor', accessor)
+
+  def testMakeSingleSortKeyAccessor_WithPostProcessor(self):
+    """Sorting a built-in user column should create a user accessor."""
+    self.mox.StubOutWithMock(sorting, '_MakeAccessorWithPostProcessor')
+    users_by_id = {111: 'fake user'}
+    sorting._MakeAccessorWithPostProcessor(
+        users_by_id, 'mock owner accessor', 'mock postprocessor')
+    self.mox.ReplayAll()
+
+    sorting._MakeSingleSortKeyAccessor(
+      'owner', self.config, {'owner': 'mock owner accessor'},
+      {'owner': 'mock postprocessor'}, users_by_id, [])
+    self.mox.VerifyAll()
+
+  def testIndexOrLexical(self):
+    well_known_values = ['x-a', 'x-b', 'x-c', 'x-d']
+    art = 'this is a fake artifact'
+
+    # Case 1: accessor generates no values.
+    base_accessor = lambda art: None
+    accessor = sorting._IndexOrLexical(well_known_values, base_accessor)
+    self.assertEqual(sorting.MAX_STRING, accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual(sorting.DescendingValue(sorting.MAX_STRING),
+                     neg_accessor(art))
+
+    # Case 2: accessor generates a value, but it is an empty value.
+    base_accessor = lambda art: ''
+    accessor = sorting._IndexOrLexical(well_known_values, base_accessor)
+    self.assertEqual(sorting.MAX_STRING, accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual(sorting.DescendingValue(sorting.MAX_STRING),
+                     neg_accessor(art))
+
+    # Case 3: A single well-known value
+    base_accessor = lambda art: 'x-c'
+    accessor = sorting._IndexOrLexical(well_known_values, base_accessor)
+    self.assertEqual(2, accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual(-2, neg_accessor(art))
+
+    # Case 4: A single odd-ball value
+    base_accessor = lambda art: 'x-zzz'
+    accessor = sorting._IndexOrLexical(well_known_values, base_accessor)
+    self.assertEqual('x-zzz', accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual(
+        sorting.DescendingValue('x-zzz'), neg_accessor(art))
+
+  def testIndexListAccessor_SomeWellKnownValues(self):
+    """Values sort according to their position in the well-known list."""
+    well_known_values = [11, 33, 22]  # These represent component IDs.
+    art = fake.MakeTestIssue(789, 1, 'sum 1', 'New', 111)
+    base_accessor = lambda issue: issue.component_ids
+    accessor = sorting._IndexListAccessor(well_known_values, base_accessor)
+
+    # Case 1: accessor generates no values.
+    self.assertEqual(sorting.MAX_STRING, accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual(sorting.MAX_STRING, neg_accessor(art))
+
+    # Case 2: A single well-known value
+    art.component_ids = [33]
+    self.assertEqual([1], accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual([-1], neg_accessor(art))
+
+    # Case 3: Multiple well-known and odd-ball values
+    art.component_ids = [33, 11, 99]
+    self.assertEqual([0, 1, sorting.MAX_STRING], accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual([sorting.MAX_STRING, -1, 0],
+                     neg_accessor(art))
+
+  def testIndexListAccessor_NoWellKnownValues(self):
+    """When there are no well-known values, all values sort last."""
+    well_known_values = []  # Nothing pre-defined, so everything is oddball
+    art = fake.MakeTestIssue(789, 1, 'sum 1', 'New', 111)
+    base_accessor = lambda issue: issue.component_ids
+    accessor = sorting._IndexListAccessor(well_known_values, base_accessor)
+
+    # Case 1: accessor generates no values.
+    self.assertEqual(sorting.MAX_STRING, accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual(sorting.MAX_STRING, neg_accessor(art))
+
+    # Case 2: A single oddball value
+    art.component_ids = [33]
+    self.assertEqual([sorting.MAX_STRING], accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual([sorting.MAX_STRING], neg_accessor(art))
+
+    # Case 3: Multiple odd-ball values
+    art.component_ids = [33, 11, 99]
+    self.assertEqual(
+      [sorting.MAX_STRING, sorting.MAX_STRING, sorting.MAX_STRING],
+      accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual(
+      [sorting.MAX_STRING, sorting.MAX_STRING, sorting.MAX_STRING],
+      neg_accessor(art))
+
+  def testIndexOrLexicalList(self):
+    well_known_values = ['Pri-High', 'Pri-Med', 'Pri-Low']
+    art = fake.MakeTestIssue(789, 1, 'sum 1', 'New', 111, merged_into=200001)
+
+    # Case 1: accessor generates no values.
+    accessor = sorting._IndexOrLexicalList(well_known_values, [], 'pri', {})
+    self.assertEqual(sorting.MAX_STRING, accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual(sorting.MAX_STRING, neg_accessor(art))
+
+    # Case 2: A single well-known value
+    art.labels = ['Pri-Med']
+    accessor = sorting._IndexOrLexicalList(well_known_values, [], 'pri', {})
+    self.assertEqual([1], accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual([-1], neg_accessor(art))
+
+    # Case 3: Multiple well-known and odd-ball values
+    art.labels = ['Pri-zzz', 'Pri-Med', 'yyy', 'Pri-High']
+    accessor = sorting._IndexOrLexicalList(well_known_values, [], 'pri', {})
+    self.assertEqual([0, 1, 'zzz'], accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual([sorting.DescendingValue('zzz'), -1, 0],
+                     neg_accessor(art))
+
+    # Case 4: Multi-part prefix.
+    well_known_values.extend(['X-Y-Header', 'X-Y-Footer'])
+    art.labels = ['X-Y-Footer', 'X-Y-Zone', 'X-Y-Header', 'X-Y-Area']
+    accessor = sorting._IndexOrLexicalList(well_known_values, [], 'x-y', {})
+    self.assertEqual([3, 4, 'area', 'zone'], accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual([sorting.DescendingValue('zone'),
+                      sorting.DescendingValue('area'), -4, -3],
+                     neg_accessor(art))
+
+  def testIndexOrLexicalList_CustomFields(self):
+    art = fake.MakeTestIssue(789, 1, 'sum 2', 'New', 111)
+    art.labels = ['samename-value1']
+    art.field_values = [tracker_bizobj.MakeFieldValue(
+        3, 6078, None, None, None, None, False)]
+
+    all_field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            3, 789, 'samename', tracker_pb2.FieldTypes.INT_TYPE,
+            None, None, False, False, False, None, None, None, False, None,
+            None, None, None, 'cow spots', False),
+        tracker_bizobj.MakeFieldDef(
+            4, 788, 'samename', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+            None, None, False, False, False, None, None, None, False, None,
+            None, None, None, 'cow spots', False),
+        tracker_bizobj.MakeFieldDef(
+            4, 788, 'notsamename', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+            None, None, False, False, False, None, None, None, False, None,
+            None, None, None, 'should get filtered out', False)
+    ]
+
+    accessor = sorting._IndexOrLexicalList([], all_field_defs, 'samename', {})
+    self.assertEqual([6078, 'value1'], accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual(
+        [sorting.DescendingValue('value1'), -6078], neg_accessor(art))
+
+  def testIndexOrLexicalList_PhaseCustomFields(self):
+    art = fake.MakeTestIssue(789, 1, 'sum 2', 'New', 111)
+    art.labels = ['summer.goats-value1']
+    art.field_values = [
+        tracker_bizobj.MakeFieldValue(
+            3, 33, None, None, None, None, False, phase_id=77),
+        tracker_bizobj.MakeFieldValue(
+            3, 34, None, None, None, None, False, phase_id=77),
+        tracker_bizobj.MakeFieldValue(
+            3, 1000, None, None, None, None, False, phase_id=78)]
+    art.phases = [tracker_pb2.Phase(phase_id=77, name='summer'),
+                  tracker_pb2.Phase(phase_id=78, name='winter')]
+
+    all_field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            3, 789, 'goats', tracker_pb2.FieldTypes.INT_TYPE,
+            None, None, False, False, True, None, None, None, False, None,
+            None, None, None, 'goats love mineral', False, is_phase_field=True),
+        tracker_bizobj.MakeFieldDef(
+            4, 788, 'boo', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+            None, None, False, False, False, None, None, None, False, None,
+            None, None, None, 'ahh', False),
+        ]
+
+    accessor = sorting._IndexOrLexicalList(
+        [], all_field_defs, 'summer.goats', {})
+    self.assertEqual([33, 34, 'value1'], accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual(
+        [sorting.DescendingValue('value1'), -34, -33], neg_accessor(art))
+
+  def testIndexOrLexicalList_ApprovalStatus(self):
+    art = fake.MakeTestIssue(789, 1, 'sum 2', 'New', 111)
+    art.labels = ['samename-value1']
+    art.approval_values = [tracker_pb2.ApprovalValue(approval_id=4)]
+
+    all_field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            3, 789, 'samename', tracker_pb2.FieldTypes.INT_TYPE,
+            None, None, False, False, False, None, None, None, False, None,
+            None, None, None, 'cow spots', False),
+        tracker_bizobj.MakeFieldDef(
+            4, 788, 'samename', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+            None, None, False, False, False, None, None, None, False, None,
+            None, None, None, 'cow spots', False)
+    ]
+
+    accessor = sorting._IndexOrLexicalList([], all_field_defs, 'samename', {})
+    self.assertEqual([0, 'value1'], accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual([sorting.DescendingValue('value1'),
+                      sorting.DescendingValue(0)],
+                     neg_accessor(art))
+
+  def testIndexOrLexicalList_ApprovalApprover(self):
+    art = art = fake.MakeTestIssue(789, 1, 'sum 2', 'New', 111)
+    art.labels = ['samename-approver-value1']
+    art.approval_values = [
+        tracker_pb2.ApprovalValue(approval_id=4, approver_ids=[333])]
+
+    all_field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            4, 788, 'samename', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+            None, None, False, False, False, None, None, None, False, None,
+            None, None, None, 'cow spots', False)
+    ]
+    users_by_id = {333: framework_views.StuffUserView(333, 'a@test.com', True)}
+
+    accessor = sorting._IndexOrLexicalList(
+        [], all_field_defs, 'samename-approver', users_by_id)
+    self.assertEqual(['a@test.com', 'value1'], accessor(art))
+    neg_accessor = MakeDescending(accessor)
+    self.assertEqual([sorting.DescendingValue('value1'),
+                      sorting.DescendingValue('a@test.com')],
+                     neg_accessor(art))
+
+  def testComputeSortDirectives(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    self.assertEqual(
+        ['project', 'id'], sorting.ComputeSortDirectives(config, '', ''))
+
+    self.assertEqual(
+        ['a', 'b', 'c', 'project', 'id'],
+        sorting.ComputeSortDirectives(config, '', 'a b C'))
+
+    config.default_sort_spec = 'id -reporter Owner'
+    self.assertEqual(
+        ['id', '-reporter', 'owner', 'project'],
+        sorting.ComputeSortDirectives(config, '', ''))
+
+    self.assertEqual(
+        ['x', '-b', 'a', 'c', '-owner', 'id', '-reporter', 'project'],
+        sorting.ComputeSortDirectives(config, 'x -b', 'A -b c -owner'))
diff --git a/framework/test/sql_test.py b/framework/test/sql_test.py
new file mode 100644
index 0000000..f073e24
--- /dev/null
+++ b/framework/test/sql_test.py
@@ -0,0 +1,681 @@
+# 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
+
+"""Unit tests for the sql module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import mock
+import time
+import unittest
+
+import settings
+from framework import exceptions
+from framework import sql
+
+
+class MockSQLCnxn(object):
+  """This class mocks the connection and cursor classes."""
+
+  def __init__(self, instance, database):
+    self.instance = instance
+    self.database = database
+    self.last_executed = None
+    self.last_executed_args = None
+    self.result_rows = None
+    self.rowcount = 0
+    self.lastrowid = None
+    self.pool_key = instance + '/' + database
+    self.is_bad = False
+    self.has_uncommitted = False
+
+  def execute(self, stmt_str, args=None):
+    self.last_executed = stmt_str % tuple(args or [])
+    if not stmt_str.startswith(('SET', 'SELECT')):
+      self.has_uncommitted = True
+
+  def executemany(self, stmt_str, args):
+    # We cannot format the string because args has many values for each %s.
+    self.last_executed = stmt_str
+    self.last_executed_args = tuple(args)
+
+    # sql.py only calls executemany() for INSERT.
+    assert stmt_str.startswith('INSERT')
+    self.lastrowid = 123
+
+  def fetchall(self):
+    return self.result_rows
+
+  def cursor(self):
+    return self
+
+  def commit(self):
+    self.has_uncommitted = False
+
+  def close(self):
+    assert not self.has_uncommitted
+
+  def rollback(self):
+    self.has_uncommitted = False
+
+  def ping(self):
+    if self.is_bad:
+      raise BaseException('connection error!')
+
+
+sql.cnxn_ctor = MockSQLCnxn
+
+
+class ConnectionPoolingTest(unittest.TestCase):
+
+  def testGet(self):
+    pool_size = 2
+    num_dbs = 2
+    p = sql.ConnectionPool(pool_size)
+
+    for i in range(num_dbs):
+      for _ in range(pool_size):
+        c = p.get('test', 'db%d' % i)
+        self.assertIsNotNone(c)
+        p.release(c)
+
+    cnxn1 = p.get('test', 'db0')
+    q = p.queues[cnxn1.pool_key]
+    self.assertIs(q.qsize(), 0)
+
+    p.release(cnxn1)
+    self.assertIs(q.qsize(), pool_size - 1)
+    self.assertIs(q.full(), False)
+    self.assertIs(q.empty(), False)
+
+    cnxn2 = p.get('test', 'db0')
+    q = p.queues[cnxn2.pool_key]
+    self.assertIs(q.qsize(), 0)
+    self.assertIs(q.full(), False)
+    self.assertIs(q.empty(), True)
+
+  def testGetAndReturnPooledCnxn(self):
+    p = sql.ConnectionPool(2)
+
+    cnxn1 = p.get('test', 'db1')
+    self.assertIs(len(p.queues), 1)
+
+    cnxn2 = p.get('test', 'db2')
+    self.assertIs(len(p.queues), 2)
+
+    # Should use the existing pool.
+    cnxn3 = p.get('test', 'db1')
+    self.assertIs(len(p.queues), 2)
+
+    p.release(cnxn3)
+    p.release(cnxn2)
+
+    cnxn1.is_bad = True
+    p.release(cnxn1)
+    # cnxn1 should not be returned from the pool if we
+    # ask for a connection to its database.
+
+    cnxn4 = p.get('test', 'db1')
+
+    self.assertIsNot(cnxn1, cnxn4)
+    self.assertIs(len(p.queues), 2)
+    self.assertIs(cnxn4.is_bad, False)
+
+  def testGetAndReturnPooledCnxn_badCnxn(self):
+    p = sql.ConnectionPool(2)
+
+    cnxn1 = p.get('test', 'db1')
+    cnxn2 = p.get('test', 'db2')
+    cnxn3 = p.get('test', 'db1')
+
+    cnxn3.is_bad = True
+
+    p.release(cnxn3)
+    q = p.queues[cnxn3.pool_key]
+    self.assertIs(q.qsize(), 1)
+
+    with self.assertRaises(BaseException):
+      cnxn3 = p.get('test', 'db1')
+
+    q = p.queues[cnxn2.pool_key]
+    self.assertIs(q.qsize(), 0)
+    p.release(cnxn2)
+    self.assertIs(q.qsize(), 1)
+
+    p.release(cnxn1)
+    q = p.queues[cnxn1.pool_key]
+    self.assertIs(q.qsize(), 1)
+
+
+class MonorailConnectionTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = sql.MonorailConnection()
+    self.orig_local_mode = settings.local_mode
+    self.orig_num_logical_shards = settings.num_logical_shards
+    settings.local_mode = False
+
+  def tearDown(self):
+    settings.local_mode = self.orig_local_mode
+    settings.num_logical_shards = self.orig_num_logical_shards
+
+  def testGetPrimaryConnection(self):
+    sql_cnxn = self.cnxn.GetPrimaryConnection()
+    self.assertEqual(settings.db_instance, sql_cnxn.instance)
+    self.assertEqual(settings.db_database_name, sql_cnxn.database)
+
+    sql_cnxn2 = self.cnxn.GetPrimaryConnection()
+    self.assertIs(sql_cnxn2, sql_cnxn)
+
+  def testGetConnectionForShard(self):
+    sql_cnxn = self.cnxn.GetConnectionForShard(1)
+    replica_name = settings.db_replica_names[
+      1 % len(settings.db_replica_names)]
+    self.assertEqual(settings.physical_db_name_format % replica_name,
+                      sql_cnxn.instance)
+    self.assertEqual(settings.db_database_name, sql_cnxn.database)
+
+    sql_cnxn2 = self.cnxn.GetConnectionForShard(1)
+    self.assertIs(sql_cnxn2, sql_cnxn)
+
+  def testClose(self):
+    sql_cnxn = self.cnxn.GetPrimaryConnection()
+    self.cnxn.Close()
+    self.assertFalse(sql_cnxn.has_uncommitted)
+
+  def testExecute_Primary(self):
+    """Execute() with no shard passes the statement to the primary sql cnxn."""
+    sql_cnxn = self.cnxn.GetPrimaryConnection()
+    with mock.patch.object(self.cnxn, '_ExecuteWithSQLConnection') as ewsc:
+      ewsc.return_value = 'db result'
+      actual_result = self.cnxn.Execute('statement', [])
+      self.assertEqual('db result', actual_result)
+      ewsc.assert_called_once_with(sql_cnxn, 'statement', [], commit=True)
+
+  def testExecute_Shard(self):
+    """Execute() with a shard passes the statement to the shard sql cnxn."""
+    shard_id = 1
+    sql_cnxn_1 = self.cnxn.GetConnectionForShard(shard_id)
+    with mock.patch.object(self.cnxn, '_ExecuteWithSQLConnection') as ewsc:
+      ewsc.return_value = 'db result'
+      actual_result = self.cnxn.Execute('statement', [], shard_id=shard_id)
+      self.assertEqual('db result', actual_result)
+      ewsc.assert_called_once_with(sql_cnxn_1, 'statement', [], commit=True)
+
+  def testExecute_Shard_Unavailable(self):
+    """If a shard is unavailable, we try the next one."""
+    shard_id = 1
+    sql_cnxn_1 = self.cnxn.GetConnectionForShard(shard_id)
+    sql_cnxn_2 = self.cnxn.GetConnectionForShard(shard_id + 1)
+
+    # Simulate a recent failure on shard 1.
+    self.cnxn.unavailable_shards[1] = int(time.time()) - 3
+
+    with mock.patch.object(self.cnxn, '_ExecuteWithSQLConnection') as ewsc:
+      ewsc.return_value = 'db result'
+      actual_result = self.cnxn.Execute('statement', [], shard_id=shard_id)
+      self.assertEqual('db result', actual_result)
+      ewsc.assert_called_once_with(sql_cnxn_2, 'statement', [], commit=True)
+
+    # Even a new MonorailConnection instance shares the same state.
+    other_cnxn = sql.MonorailConnection()
+    other_sql_cnxn_2 = other_cnxn.GetConnectionForShard(shard_id + 1)
+
+    with mock.patch.object(other_cnxn, '_ExecuteWithSQLConnection') as ewsc:
+      ewsc.return_value = 'db result'
+      actual_result = other_cnxn.Execute('statement', [], shard_id=shard_id)
+      self.assertEqual('db result', actual_result)
+      ewsc.assert_called_once_with(
+          other_sql_cnxn_2, 'statement', [], commit=True)
+
+    # Simulate an old failure on shard 1, allowing us to try using it again.
+    self.cnxn.unavailable_shards[1] = (
+        int(time.time()) - sql.BAD_SHARD_AVOIDANCE_SEC - 2)
+
+    with mock.patch.object(self.cnxn, '_ExecuteWithSQLConnection') as ewsc:
+      ewsc.return_value = 'db result'
+      actual_result = self.cnxn.Execute('statement', [], shard_id=shard_id)
+      self.assertEqual('db result', actual_result)
+      ewsc.assert_called_once_with(sql_cnxn_1, 'statement', [], commit=True)
+
+
+class TableManagerTest(unittest.TestCase):
+
+  def setUp(self):
+    self.emp_tbl = sql.SQLTableManager('Employee')
+    self.cnxn = sql.MonorailConnection()
+    self.primary_cnxn = self.cnxn.GetPrimaryConnection()
+
+  def testSelect_Trivial(self):
+    self.primary_cnxn.result_rows = [(111, True), (222, False)]
+    rows = self.emp_tbl.Select(self.cnxn)
+    self.assertEqual('SELECT * FROM Employee', self.primary_cnxn.last_executed)
+    self.assertEqual([(111, True), (222, False)], rows)
+
+  def testSelect_Conditions(self):
+    self.primary_cnxn.result_rows = [(111,)]
+    rows = self.emp_tbl.Select(
+        self.cnxn, cols=['emp_id'], fulltime=True, dept_id=[10, 20])
+    self.assertEqual(
+        'SELECT emp_id FROM Employee'
+        '\nWHERE dept_id IN (10,20)'
+        '\n  AND fulltime = 1', self.primary_cnxn.last_executed)
+    self.assertEqual([(111,)], rows)
+
+  def testSelectRow(self):
+    self.primary_cnxn.result_rows = [(111,)]
+    row = self.emp_tbl.SelectRow(
+        self.cnxn, cols=['emp_id'], fulltime=True, dept_id=[10, 20])
+    self.assertEqual(
+        'SELECT DISTINCT emp_id FROM Employee'
+        '\nWHERE dept_id IN (10,20)'
+        '\n  AND fulltime = 1', self.primary_cnxn.last_executed)
+    self.assertEqual((111,), row)
+
+  def testSelectRow_NoMatches(self):
+    self.primary_cnxn.result_rows = []
+    row = self.emp_tbl.SelectRow(
+        self.cnxn, cols=['emp_id'], fulltime=True, dept_id=[99])
+    self.assertEqual(
+        'SELECT DISTINCT emp_id FROM Employee'
+        '\nWHERE dept_id IN (99)'
+        '\n  AND fulltime = 1', self.primary_cnxn.last_executed)
+    self.assertEqual(None, row)
+
+    row = self.emp_tbl.SelectRow(
+        self.cnxn, cols=['emp_id'], fulltime=True, dept_id=[99],
+        default=(-1,))
+    self.assertEqual((-1,), row)
+
+  def testSelectValue(self):
+    self.primary_cnxn.result_rows = [(111,)]
+    val = self.emp_tbl.SelectValue(
+        self.cnxn, 'emp_id', fulltime=True, dept_id=[10, 20])
+    self.assertEqual(
+        'SELECT DISTINCT emp_id FROM Employee'
+        '\nWHERE dept_id IN (10,20)'
+        '\n  AND fulltime = 1', self.primary_cnxn.last_executed)
+    self.assertEqual(111, val)
+
+  def testSelectValue_NoMatches(self):
+    self.primary_cnxn.result_rows = []
+    val = self.emp_tbl.SelectValue(
+        self.cnxn, 'emp_id', fulltime=True, dept_id=[99])
+    self.assertEqual(
+        'SELECT DISTINCT emp_id FROM Employee'
+        '\nWHERE dept_id IN (99)'
+        '\n  AND fulltime = 1', self.primary_cnxn.last_executed)
+    self.assertEqual(None, val)
+
+    val = self.emp_tbl.SelectValue(
+        self.cnxn, 'emp_id', fulltime=True, dept_id=[99],
+        default=-1)
+    self.assertEqual(-1, val)
+
+  def testInsertRow(self):
+    self.primary_cnxn.rowcount = 1
+    generated_id = self.emp_tbl.InsertRow(self.cnxn, emp_id=111, fulltime=True)
+    self.assertEqual(
+        'INSERT INTO Employee (emp_id, fulltime)'
+        '\nVALUES (%s,%s)', self.primary_cnxn.last_executed)
+    self.assertEqual(([111, 1],), self.primary_cnxn.last_executed_args)
+    self.assertEqual(123, generated_id)
+
+  def testInsertRows_Empty(self):
+    generated_id = self.emp_tbl.InsertRows(
+        self.cnxn, ['emp_id', 'fulltime'], [])
+    self.assertIsNone(self.primary_cnxn.last_executed)
+    self.assertIsNone(self.primary_cnxn.last_executed_args)
+    self.assertEqual(None, generated_id)
+
+  def testInsertRows(self):
+    self.primary_cnxn.rowcount = 2
+    generated_ids = self.emp_tbl.InsertRows(
+        self.cnxn, ['emp_id', 'fulltime'], [(111, True), (222, False)])
+    self.assertEqual(
+        'INSERT INTO Employee (emp_id, fulltime)'
+        '\nVALUES (%s,%s)', self.primary_cnxn.last_executed)
+    self.assertEqual(([111, 1], [222, 0]), self.primary_cnxn.last_executed_args)
+    self.assertEqual([], generated_ids)
+
+  def testUpdate(self):
+    self.primary_cnxn.rowcount = 2
+    rowcount = self.emp_tbl.Update(
+        self.cnxn, {'fulltime': True}, emp_id=[111, 222])
+    self.assertEqual(
+        'UPDATE Employee SET fulltime=1'
+        '\nWHERE emp_id IN (111,222)', self.primary_cnxn.last_executed)
+    self.assertEqual(2, rowcount)
+
+  def testUpdate_Limit(self):
+    self.emp_tbl.Update(
+        self.cnxn, {'fulltime': True}, limit=8, emp_id=[111, 222])
+    self.assertEqual(
+        'UPDATE Employee SET fulltime=1'
+        '\nWHERE emp_id IN (111,222)'
+        '\nLIMIT 8', self.primary_cnxn.last_executed)
+
+  def testIncrementCounterValue(self):
+    self.primary_cnxn.rowcount = 1
+    self.primary_cnxn.lastrowid = 9
+    new_counter_val = self.emp_tbl.IncrementCounterValue(
+        self.cnxn, 'years_worked', emp_id=111)
+    self.assertEqual(
+        'UPDATE Employee SET years_worked = LAST_INSERT_ID(years_worked + 1)'
+        '\nWHERE emp_id = 111', self.primary_cnxn.last_executed)
+    self.assertEqual(9, new_counter_val)
+
+  def testDelete(self):
+    self.primary_cnxn.rowcount = 1
+    rowcount = self.emp_tbl.Delete(self.cnxn, fulltime=True)
+    self.assertEqual(
+        'DELETE FROM Employee'
+        '\nWHERE fulltime = 1', self.primary_cnxn.last_executed)
+    self.assertEqual(1, rowcount)
+
+  def testDelete_Limit(self):
+    self.emp_tbl.Delete(self.cnxn, fulltime=True, limit=3)
+    self.assertEqual(
+        'DELETE FROM Employee'
+        '\nWHERE fulltime = 1'
+        '\nLIMIT 3', self.primary_cnxn.last_executed)
+
+
+class StatementTest(unittest.TestCase):
+
+  def testMakeSelect(self):
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee',
+        stmt_str)
+    self.assertEqual([], args)
+
+    stmt = sql.Statement.MakeSelect(
+        'Employee', ['emp_id', 'fulltime'], distinct=True)
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT DISTINCT emp_id, fulltime FROM Employee',
+        stmt_str)
+    self.assertEqual([], args)
+
+  def testMakeInsert(self):
+    stmt = sql.Statement.MakeInsert(
+        'Employee', ['emp_id', 'fulltime'], [(111, True), (222, False)])
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'INSERT INTO Employee (emp_id, fulltime)'
+        '\nVALUES (%s,%s)',
+        stmt_str)
+    self.assertEqual([[111, 1], [222, 0]], args)
+
+    stmt = sql.Statement.MakeInsert(
+        'Employee', ['emp_id', 'fulltime'], [(111, False)], replace=True)
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'INSERT INTO Employee (emp_id, fulltime)'
+        '\nVALUES (%s,%s)'
+        '\nON DUPLICATE KEY UPDATE '
+        'emp_id=VALUES(emp_id), fulltime=VALUES(fulltime)',
+        stmt_str)
+    self.assertEqual([[111, 0]], args)
+
+    stmt = sql.Statement.MakeInsert(
+        'Employee', ['emp_id', 'fulltime'], [(111, False)], ignore=True)
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'INSERT IGNORE INTO Employee (emp_id, fulltime)'
+        '\nVALUES (%s,%s)',
+        stmt_str)
+    self.assertEqual([[111, 0]], args)
+
+  def testMakeInsert_InvalidString(self):
+    with self.assertRaises(exceptions.InputException):
+      sql.Statement.MakeInsert(
+          'Employee', ['emp_id', 'name'], [(111, 'First \x00 Last')])
+
+  def testMakeUpdate(self):
+    stmt = sql.Statement.MakeUpdate('Employee', {'fulltime': True})
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'UPDATE Employee SET fulltime=%s',
+        stmt_str)
+    self.assertEqual([1], args)
+
+  def testMakeUpdate_InvalidString(self):
+    with self.assertRaises(exceptions.InputException):
+      sql.Statement.MakeUpdate('Employee', {'name': 'First \x00 Last'})
+
+  def testMakeIncrement(self):
+    stmt = sql.Statement.MakeIncrement('Employee', 'years_worked')
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'UPDATE Employee SET years_worked = LAST_INSERT_ID(years_worked + %s)',
+        stmt_str)
+    self.assertEqual([1], args)
+
+    stmt = sql.Statement.MakeIncrement('Employee', 'years_worked', step=5)
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'UPDATE Employee SET years_worked = LAST_INSERT_ID(years_worked + %s)',
+        stmt_str)
+    self.assertEqual([5], args)
+
+  def testMakeDelete(self):
+    stmt = sql.Statement.MakeDelete('Employee')
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'DELETE FROM Employee',
+        stmt_str)
+    self.assertEqual([], args)
+
+  def testAddUseClause(self):
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt.AddUseClause('USE INDEX (emp_id) USE INDEX FOR ORDER BY (emp_id)')
+    stmt.AddOrderByTerms([('emp_id', [])])
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee'
+        '\nUSE INDEX (emp_id) USE INDEX FOR ORDER BY (emp_id)'
+        '\nORDER BY emp_id',
+        stmt_str)
+    self.assertEqual([], args)
+
+  def testAddJoinClause_Empty(self):
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt.AddJoinClauses([])
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee',
+        stmt_str)
+    self.assertEqual([], args)
+
+  def testAddJoinClause(self):
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt.AddJoinClauses([('CorporateHoliday', [])])
+    stmt.AddJoinClauses(
+        [('Product ON Project.inventor_id = emp_id', [])], left=True)
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee'
+        '\n  JOIN CorporateHoliday'
+        '\n  LEFT JOIN Product ON Project.inventor_id = emp_id',
+        stmt_str)
+    self.assertEqual([], args)
+
+  def testAddGroupByTerms_Empty(self):
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt.AddGroupByTerms([])
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee',
+        stmt_str)
+    self.assertEqual([], args)
+
+  def testAddGroupByTerms(self):
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt.AddGroupByTerms(['dept_id', 'location_id'])
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee'
+        '\nGROUP BY dept_id, location_id',
+        stmt_str)
+    self.assertEqual([], args)
+
+  def testAddOrderByTerms_Empty(self):
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt.AddOrderByTerms([])
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee',
+        stmt_str)
+    self.assertEqual([], args)
+
+  def testAddOrderByTerms(self):
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt.AddOrderByTerms([('dept_id', []), ('emp_id DESC', [])])
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee'
+        '\nORDER BY dept_id, emp_id DESC',
+        stmt_str)
+    self.assertEqual([], args)
+
+  def testSetLimitAndOffset(self):
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt.SetLimitAndOffset(100, 0)
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee'
+        '\nLIMIT 100',
+        stmt_str)
+    self.assertEqual([], args)
+
+    stmt.SetLimitAndOffset(100, 500)
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee'
+        '\nLIMIT 100 OFFSET 500',
+        stmt_str)
+    self.assertEqual([], args)
+
+  def testAddWhereTerms_Select(self):
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt.AddWhereTerms([], emp_id=[111, 222])
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee'
+        '\nWHERE emp_id IN (%s,%s)',
+        stmt_str)
+    self.assertEqual([111, 222], args)
+
+  def testAddWhereTerms_Update(self):
+    stmt = sql.Statement.MakeUpdate('Employee', {'fulltime': True})
+    stmt.AddWhereTerms([], emp_id=[111, 222])
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'UPDATE Employee SET fulltime=%s'
+        '\nWHERE emp_id IN (%s,%s)',
+        stmt_str)
+    self.assertEqual([1, 111, 222], args)
+
+  def testAddWhereTerms_Delete(self):
+    stmt = sql.Statement.MakeDelete('Employee')
+    stmt.AddWhereTerms([], emp_id=[111, 222])
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'DELETE FROM Employee'
+        '\nWHERE emp_id IN (%s,%s)',
+        stmt_str)
+    self.assertEqual([111, 222], args)
+
+  def testAddWhereTerms_Empty(self):
+    """Add empty terms should have no effect."""
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt.AddWhereTerms([])
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee',
+        stmt_str)
+    self.assertEqual([], args)
+
+  def testAddWhereTerms_UpdateEmptyArray(self):
+    """Add empty array should throw an exception."""
+    stmt = sql.Statement.MakeUpdate('SpamVerdict', {'user_id': 1})
+    # See https://crbug.com/monorail/6735.
+    with self.assertRaises(exceptions.InputException):
+      stmt.AddWhereTerms([], user_id=[])
+      mock_log.assert_called_once_with('Invalid update DB value %r', 'user_id')
+
+  def testAddWhereTerms_MulitpleTerms(self):
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt.AddWhereTerms(
+        [('emp_id %% %s = %s', [2, 0])], fulltime=True, emp_id_not=222)
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee'
+        '\nWHERE emp_id %% %s = %s'
+        '\n  AND emp_id != %s'
+        '\n  AND fulltime = %s',
+        stmt_str)
+    self.assertEqual([2, 0, 222, 1], args)
+
+  def testAddHavingTerms_NoGroupBy(self):
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt.AddHavingTerms([('COUNT(*) > %s', [10])])
+    self.assertRaises(AssertionError, stmt.Generate)
+
+  def testAddHavingTerms_WithGroupBy(self):
+    stmt = sql.Statement.MakeSelect('Employee', ['emp_id', 'fulltime'])
+    stmt.AddGroupByTerms(['dept_id', 'location_id'])
+    stmt.AddHavingTerms([('COUNT(*) > %s', [10])])
+    stmt_str, args = stmt.Generate()
+    self.assertEqual(
+        'SELECT emp_id, fulltime FROM Employee'
+        '\nGROUP BY dept_id, location_id'
+        '\nHAVING COUNT(*) > %s',
+        stmt_str)
+    self.assertEqual([10], args)
+
+
+class FunctionsTest(unittest.TestCase):
+
+  def testIsValidDBValue_NonString(self):
+    self.assertTrue(sql._IsValidDBValue(12))
+    self.assertTrue(sql._IsValidDBValue(True))
+    self.assertTrue(sql._IsValidDBValue(False))
+    self.assertTrue(sql._IsValidDBValue(None))
+
+  def testIsValidDBValue_String(self):
+    self.assertTrue(sql._IsValidDBValue(''))
+    self.assertTrue(sql._IsValidDBValue('hello'))
+    self.assertTrue(sql._IsValidDBValue(u'hello'))
+    self.assertFalse(sql._IsValidDBValue('null \x00 byte'))
+
+  def testBoolsToInts_NoChanges(self):
+    self.assertEqual(['hello'], sql._BoolsToInts(['hello']))
+    self.assertEqual([['hello']], sql._BoolsToInts([['hello']]))
+    self.assertEqual([['hello']], sql._BoolsToInts([('hello',)]))
+    self.assertEqual([12], sql._BoolsToInts([12]))
+    self.assertEqual([[12]], sql._BoolsToInts([[12]]))
+    self.assertEqual([[12]], sql._BoolsToInts([(12,)]))
+    self.assertEqual(
+        [12, 13, 'hi', [99, 'yo']],
+        sql._BoolsToInts([12, 13, 'hi', [99, 'yo']]))
+
+  def testBoolsToInts_WithChanges(self):
+    self.assertEqual([1, 0], sql._BoolsToInts([True, False]))
+    self.assertEqual([[1, 0]], sql._BoolsToInts([[True, False]]))
+    self.assertEqual([[1, 0]], sql._BoolsToInts([(True, False)]))
+    self.assertEqual(
+        [12, 1, 'hi', [0, 'yo']],
+        sql._BoolsToInts([12, True, 'hi', [False, 'yo']]))
+
+  def testRandomShardID(self):
+    """A random shard ID must always be a valid shard ID."""
+    shard_id = sql.RandomShardID()
+    self.assertTrue(0 <= shard_id < settings.num_logical_shards)
diff --git a/framework/test/table_view_helpers_test.py b/framework/test/table_view_helpers_test.py
new file mode 100644
index 0000000..0260308
--- /dev/null
+++ b/framework/test/table_view_helpers_test.py
@@ -0,0 +1,753 @@
+# 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
+
+"""Unit tests for table_view_helpers classes and functions."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import unittest
+import logging
+
+from framework import framework_views
+from framework import table_view_helpers
+from proto import tracker_pb2
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+
+
+EMPTY_SEARCH_RESULTS = []
+
+SEARCH_RESULTS_WITH_LABELS = [
+    fake.MakeTestIssue(
+        789, 1, 'sum 1', 'New', 111, labels='Priority-High Mstone-1',
+        merged_into=200001, star_count=1),
+    fake.MakeTestIssue(
+        789, 2, 'sum 2', 'New', 111, labels='Priority-High Mstone-1',
+        merged_into=1, star_count=1),
+    fake.MakeTestIssue(
+        789, 3, 'sum 3', 'New', 111, labels='Priority-Low Mstone-1.1',
+        merged_into=1, star_count=1),
+    # 'Visibility-Super-High' tests that only first dash counts
+    fake.MakeTestIssue(
+        789, 4, 'sum 4', 'New', 111, labels='Visibility-Super-High',
+        star_count=1),
+    ]
+
+
+def MakeTestIssue(local_id, issue_id, summary):
+  issue = tracker_pb2.Issue()
+  issue.local_id = local_id
+  issue.issue_id = issue_id
+  issue.summary = summary
+  return issue
+
+
+class TableCellTest(unittest.TestCase):
+
+  USERS_BY_ID = {}
+
+  def setUp(self):
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.config.field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            1, 789, 'Goats', tracker_pb2.FieldTypes.INT_TYPE, None, None,
+            False, False, False, None, None, None, False, None, None, None,
+            None, 'Num of Goats in the season', False, is_phase_field=True),
+        tracker_bizobj.MakeFieldDef(
+            2, 789, 'DogNames', tracker_pb2.FieldTypes.STR_TYPE, None, None,
+            False, False, False, None, None, None, False, None, None, None,
+            None, 'good dog names', False),
+        tracker_bizobj.MakeFieldDef(
+            3, 789, 'Approval', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+            None, None, False, False, False, None, None, None, False, None,
+            None, None, None, 'Tracks review from cows', False)
+    ]
+    self.config.approval_defs = [tracker_pb2.ApprovalDef(approval_id=3)]
+    self.issue = MakeTestIssue(
+        local_id=1, issue_id=100001, summary='One')
+    self.issue.field_values = [
+        tracker_bizobj.MakeFieldValue(
+            1, 34, None, None, None, None, False, phase_id=23),
+        tracker_bizobj.MakeFieldValue(
+            1, 35, None, None, None, None, False, phase_id=24),
+        tracker_bizobj.MakeFieldValue(
+            2, None, 'Waffles', None, None, None, False),
+    ]
+    self.issue.phases = [
+        tracker_pb2.Phase(phase_id=23, name='winter'),
+        tracker_pb2.Phase(phase_id=24, name='summer')]
+    self.issue.approval_values = [
+        tracker_pb2.ApprovalValue(
+            approval_id=3, approver_ids=[111, 222, 333])]
+    self.users_by_id = {
+        111: framework_views.StuffUserView(111, 'foo@example.com', False),
+        222: framework_views.StuffUserView(222, 'foo2@example.com', True),
+    }
+
+    self.summary_table_cell_kws = {
+        'col': None,
+        'users_by_id': {},
+        'non_col_labels': [('lab', False)],
+        'label_values': {},
+        'related_issues': {},
+        'config': 'fake_config',
+        }
+
+  def testTableCellSummary(self):
+    """TableCellSummary stores the data given to it."""
+    cell = table_view_helpers.TableCellSummary(
+        MakeTestIssue(4, 4, 'Lame default summary.'),
+        **self.summary_table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_SUMMARY)
+    self.assertEqual(cell.values[0].item, 'Lame default summary.')
+    self.assertEqual(cell.non_column_labels[0].value, 'lab')
+
+  def testTableCellSummary_NoPythonEscaping(self):
+    """TableCellSummary stores the summary without escaping it in python."""
+    cell = table_view_helpers.TableCellSummary(
+        MakeTestIssue(4, 4, '<b>bold</b> "summary".'),
+        **self.summary_table_cell_kws)
+    self.assertEqual(cell.values[0].item,'<b>bold</b> "summary".')
+
+  def testTableCellCustom_normal(self):
+    """TableCellCustom stores the value of a custom FieldValue."""
+    cell_dognames = table_view_helpers.TableCellCustom(
+        self.issue, col='dognames', config=self.config)
+    self.assertEqual(cell_dognames.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell_dognames.values[0].item, 'Waffles')
+
+  def testTableCellCustom_phasefields(self):
+    """TableCellCustom stores the value of a custom FieldValue."""
+    cell_winter = table_view_helpers.TableCellCustom(
+        self.issue, col='winter.goats', config=self.config)
+    self.assertEqual(cell_winter.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell_winter.values[0].item, 34)
+
+    cell_summer = table_view_helpers.TableCellCustom(
+        self.issue, col='summer.goats', config=self.config)
+    self.assertEqual(cell_summer.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell_summer.values[0].item, 35)
+
+  def testTableCellApprovalStatus(self):
+    """TableCellApprovalStatus stores the status of an ApprovalValue."""
+    cell = table_view_helpers.TableCellApprovalStatus(
+        self.issue, col='Approval', config=self.config)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell.values[0].item, 'NOT_SET')
+
+  def testTableCellApprovalApprover(self):
+    """TableCellApprovalApprover stores the approvers of an ApprovalValue."""
+    cell = table_view_helpers.TableCellApprovalApprover(
+        self.issue, col='Approval-approver', config=self.config,
+        users_by_id=self.users_by_id)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(len(cell.values), 2)
+    self.assertItemsEqual([cell.values[0].item, cell.values[1].item],
+                          ['foo@example.com', 'f...@example.com'])
+
+  # TODO(jrobbins): TableCellProject, TableCellStars
+
+
+
+class TableViewHelpersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.default_cols = 'a b c'
+    self.builtin_cols = ['a', 'b', 'x', 'y', 'z']
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+
+  def testComputeUnshownColumns_CommonCase(self):
+    shown_cols = ['a', 'b', 'c']
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.default_col_spec = self.default_cols
+    config.well_known_labels = []
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        EMPTY_SEARCH_RESULTS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(unshown, ['x', 'y', 'z'])
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        SEARCH_RESULTS_WITH_LABELS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(
+        unshown, ['Mstone', 'Priority', 'Visibility', 'x', 'y', 'z'])
+
+  def testComputeUnshownColumns_MoreBuiltins(self):
+    shown_cols = ['a', 'b', 'c', 'x', 'y']
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.default_col_spec = self.default_cols
+    config.well_known_labels = []
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        EMPTY_SEARCH_RESULTS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(unshown, ['z'])
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        SEARCH_RESULTS_WITH_LABELS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(unshown, ['Mstone', 'Priority', 'Visibility', 'z'])
+
+  def testComputeUnshownColumns_NotAllDefaults(self):
+    shown_cols = ['a', 'b']
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.default_col_spec = self.default_cols
+    config.well_known_labels = []
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        EMPTY_SEARCH_RESULTS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(unshown, ['c', 'x', 'y', 'z'])
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        SEARCH_RESULTS_WITH_LABELS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(
+        unshown, ['Mstone', 'Priority', 'Visibility', 'c', 'x', 'y', 'z'])
+
+  def testComputeUnshownColumns_ExtraNonDefaults(self):
+    shown_cols = ['a', 'b', 'c', 'd', 'e', 'f']
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.default_col_spec = self.default_cols
+    config.well_known_labels = []
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        EMPTY_SEARCH_RESULTS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(unshown, ['x', 'y', 'z'])
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        SEARCH_RESULTS_WITH_LABELS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(
+        unshown, ['Mstone', 'Priority', 'Visibility', 'x', 'y', 'z'])
+
+  def testComputeUnshownColumns_UserColumnsShown(self):
+    shown_cols = ['a', 'b', 'c', 'Priority']
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.default_col_spec = self.default_cols
+    config.well_known_labels = []
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        EMPTY_SEARCH_RESULTS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(unshown, ['x', 'y', 'z'])
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        SEARCH_RESULTS_WITH_LABELS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(unshown, ['Mstone', 'Visibility', 'x', 'y', 'z'])
+
+  def testComputeUnshownColumns_EverythingShown(self):
+    shown_cols = [
+        'a', 'b', 'c', 'x', 'y', 'z', 'Priority', 'Mstone', 'Visibility']
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.default_col_spec = self.default_cols
+    config.well_known_labels = []
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        EMPTY_SEARCH_RESULTS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(unshown, [])
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        SEARCH_RESULTS_WITH_LABELS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(unshown, [])
+
+  def testComputeUnshownColumns_NothingShown(self):
+    shown_cols = []
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.default_col_spec = self.default_cols
+    config.well_known_labels = []
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        EMPTY_SEARCH_RESULTS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(unshown, ['a', 'b', 'c', 'x', 'y', 'z'])
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        SEARCH_RESULTS_WITH_LABELS, shown_cols, config, self.builtin_cols)
+    self.assertEqual(
+        unshown,
+        ['Mstone', 'Priority', 'Visibility', 'a', 'b', 'c', 'x', 'y', 'z'])
+
+  def testComputeUnshownColumns_NoBuiltins(self):
+    shown_cols = ['a', 'b', 'c']
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.default_col_spec = ''
+    config.well_known_labels = []
+    builtin_cols = []
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        EMPTY_SEARCH_RESULTS, shown_cols, config, builtin_cols)
+    self.assertEqual(unshown, [])
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        SEARCH_RESULTS_WITH_LABELS, shown_cols, config, builtin_cols)
+    self.assertEqual(unshown, ['Mstone', 'Priority', 'Visibility'])
+
+  def testComputeUnshownColumns_FieldDefs(self):
+    search_results = [
+        fake.MakeTestIssue(
+            789, 1, 'sum 1', 'New', 111,
+            field_values=[
+                tracker_bizobj.MakeFieldValue(
+                    5, 74, None, None, None, None, False, phase_id=4),
+                tracker_bizobj.MakeFieldValue(
+                    6, 78, None, None, None, None, False, phase_id=5)],
+            phases=[
+                tracker_pb2.Phase(phase_id=4, name='goats'),
+                tracker_pb2.Phase(phase_id=5, name='sheep')]),
+        fake.MakeTestIssue(
+            789, 2, 'sum 2', 'New', 111,
+            field_values=[
+                tracker_bizobj.MakeFieldValue(
+                    5, 74, None, None, None, None, False, phase_id=3),
+                tracker_bizobj.MakeFieldValue(
+                    6, 77, None, None, None, None, False, phase_id=3)],
+            phases=[
+                tracker_pb2.Phase(phase_id=3, name='Goats'),
+                tracker_pb2.Phase(phase_id=3, name='Goats-Exp')]),
+    ]
+
+    shown_cols = ['a', 'b', 'a1', 'a2-approver', 'f3', 'goats.g1', 'sheep.g2']
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.default_col_spec = ''
+    config.well_known_labels = []
+    config.field_defs = [
+      tracker_bizobj.MakeFieldDef(
+          1, 789, 'a1', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+          None, None, False, False, False, None, None, None, False, None,
+          None, None, None, 'Tracks review from cows', False),
+      tracker_bizobj.MakeFieldDef(
+          2, 789, 'a2', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+          None, None, False, False, False, None, None, None, False, None,
+          None, None, None, 'Tracks review from chickens', False),
+      tracker_bizobj.MakeFieldDef(
+          3, 789, 'f3', tracker_pb2.FieldTypes.STR_TYPE,
+          None, None, False, False, False, None, None, None, False, None,
+          None, None, None, 'cow names', False),
+      tracker_bizobj.MakeFieldDef(
+          4, 789, 'f4', tracker_pb2.FieldTypes.INT_TYPE,
+          None, None, False, False, False, None, None, None, False, None,
+          None, None, None, 'chicken gobbles', False),
+      tracker_bizobj.MakeFieldDef(
+          5, 789, 'g1', tracker_pb2.FieldTypes.INT_TYPE,
+          None, None, False, False, False, None, None, None, False, None,
+          None, None, None, 'fluff', False, is_phase_field=True),
+      tracker_bizobj.MakeFieldDef(
+          6, 789, 'g2', tracker_pb2.FieldTypes.INT_TYPE,
+          None, None, False, False, False, None, None, None, False, None,
+          None, None, None, 'poof', False, is_phase_field=True),
+    ]
+    builtin_cols = []
+
+    unshown = table_view_helpers.ComputeUnshownColumns(
+        search_results, shown_cols, config, builtin_cols)
+    self.assertEqual(unshown, [
+        'a1-approver', 'a2', 'f4',
+        'goats-exp.g1', 'goats-exp.g2', 'goats.g2', 'sheep.g1'])
+
+  def testExtractUniqueValues_NoColumns(self):
+    column_values = table_view_helpers.ExtractUniqueValues(
+        [], SEARCH_RESULTS_WITH_LABELS, {}, self.config, {})
+    self.assertEqual([], column_values)
+
+  def testExtractUniqueValues_NoResults(self):
+    cols = ['type', 'priority', 'owner', 'status', 'stars', 'attachments']
+    column_values = table_view_helpers.ExtractUniqueValues(
+        cols, EMPTY_SEARCH_RESULTS, {}, self.config, {})
+    self.assertEqual(6, len(column_values))
+    for index, col in enumerate(cols):
+      self.assertEqual(index, column_values[index].col_index)
+      self.assertEqual(col, column_values[index].column_name)
+      self.assertEqual([], column_values[index].filter_values)
+
+  def testExtractUniqueValues_ExplicitResults(self):
+    cols = ['priority', 'owner', 'status', 'stars', 'mstone', 'foo']
+    users_by_id = {
+        111: framework_views.StuffUserView(111, 'foo@example.com', True),
+        }
+    column_values = table_view_helpers.ExtractUniqueValues(
+        cols, SEARCH_RESULTS_WITH_LABELS, users_by_id, self.config, {})
+    self.assertEqual(len(cols), len(column_values))
+
+    self.assertEqual('priority', column_values[0].column_name)
+    self.assertEqual(['High', 'Low'], column_values[0].filter_values)
+
+    self.assertEqual('owner', column_values[1].column_name)
+    self.assertEqual(['f...@example.com'], column_values[1].filter_values)
+
+    self.assertEqual('status', column_values[2].column_name)
+    self.assertEqual(['New'], column_values[2].filter_values)
+
+    self.assertEqual('stars', column_values[3].column_name)
+    self.assertEqual([1], column_values[3].filter_values)
+
+    self.assertEqual('mstone', column_values[4].column_name)
+    self.assertEqual(['1', '1.1'], column_values[4].filter_values)
+
+    self.assertEqual('foo', column_values[5].column_name)
+    self.assertEqual([], column_values[5].filter_values)
+
+    # self.assertEquals('mergedinto', column_values[6].column_name)
+    # self.assertEquals(
+    #    ['1', 'other-project:1'], column_values[6].filter_values)
+
+  def testExtractUniqueValues_CombinedColumns(self):
+    cols = ['priority/pri', 'owner', 'status', 'stars', 'mstone/milestone']
+    users_by_id = {
+        111: framework_views.StuffUserView(111, 'foo@example.com', True),
+        }
+    issue = fake.MakeTestIssue(
+        789, 5, 'sum 5', 'New', 111, merged_into=200001,
+        labels='Priority-High Pri-0 Milestone-1.0 mstone-1',
+        star_count=15)
+
+    column_values = table_view_helpers.ExtractUniqueValues(
+        cols, SEARCH_RESULTS_WITH_LABELS + [issue], users_by_id,
+        self.config, {})
+    self.assertEqual(5, len(column_values))
+
+    self.assertEqual('priority/pri', column_values[0].column_name)
+    self.assertEqual(['0', 'High', 'Low'], column_values[0].filter_values)
+
+    self.assertEqual('owner', column_values[1].column_name)
+    self.assertEqual(['f...@example.com'], column_values[1].filter_values)
+
+    self.assertEqual('status', column_values[2].column_name)
+    self.assertEqual(['New'], column_values[2].filter_values)
+
+    self.assertEqual('stars', column_values[3].column_name)
+    self.assertEqual([1, 15], column_values[3].filter_values)
+
+    self.assertEqual('mstone/milestone', column_values[4].column_name)
+    self.assertEqual(['1', '1.0', '1.1'], column_values[4].filter_values)
+
+  def testExtractUniqueValues_DerivedValues(self):
+    cols = ['priority', 'milestone', 'owner', 'status']
+    users_by_id = {
+        111: framework_views.StuffUserView(111, 'foo@example.com', True),
+        222: framework_views.StuffUserView(222, 'bar@example.com', True),
+        333: framework_views.StuffUserView(333, 'lol@example.com', True),
+        }
+    search_results = [
+        fake.MakeTestIssue(
+            789, 1, 'sum 1', '', 111, labels='Priority-High Milestone-1.0',
+            derived_labels='Milestone-2.0 Foo', derived_status='Started'),
+        fake.MakeTestIssue(
+            789, 2, 'sum 2', 'New', 111, labels='Priority-High Milestone-1.0',
+            derived_owner_id=333),  # Not seen because of owner_id
+        fake.MakeTestIssue(
+            789, 3, 'sum 3', 'New', 0, labels='Priority-Low Milestone-1.1',
+            derived_owner_id=222),
+        ]
+
+    column_values = table_view_helpers.ExtractUniqueValues(
+        cols, search_results, users_by_id, self.config, {})
+    self.assertEqual(4, len(column_values))
+
+    self.assertEqual('priority', column_values[0].column_name)
+    self.assertEqual(['High', 'Low'], column_values[0].filter_values)
+
+    self.assertEqual('milestone', column_values[1].column_name)
+    self.assertEqual(['1.0', '1.1', '2.0'], column_values[1].filter_values)
+
+    self.assertEqual('owner', column_values[2].column_name)
+    self.assertEqual(
+        ['b...@example.com', 'f...@example.com'],
+        column_values[2].filter_values)
+
+    self.assertEqual('status', column_values[3].column_name)
+    self.assertEqual(['New', 'Started'], column_values[3].filter_values)
+
+  def testExtractUniqueValues_ColumnsRobustness(self):
+    cols = ['reporter', 'cc', 'owner', 'status', 'attachments']
+    search_results = [
+        tracker_pb2.Issue(),
+        ]
+    column_values = table_view_helpers.ExtractUniqueValues(
+        cols, search_results, {}, self.config, {})
+
+    self.assertEqual(5, len(column_values))
+    for col_val in column_values:
+      if col_val.column_name == 'attachments':
+        self.assertEqual([0], col_val.filter_values)
+      else:
+        self.assertEqual([], col_val.filter_values)
+
+  def testMakeTableData_Empty(self):
+    visible_results = []
+    lower_columns = []
+    cell_factories = {}
+    table_data = table_view_helpers.MakeTableData(
+        visible_results, [], lower_columns, lower_columns,
+        cell_factories, [], 'unused function', {}, set(), self.config)
+    self.assertEqual([], table_data)
+
+    lower_columns = ['type', 'priority', 'summary', 'stars']
+    cell_factories = {
+        'summary': table_view_helpers.TableCellSummary,
+        'stars': table_view_helpers.TableCellStars,
+        }
+
+    table_data = table_view_helpers.MakeTableData(
+        visible_results, [], lower_columns, [], {},
+        cell_factories, 'unused function', {}, set(), self.config)
+    self.assertEqual([], table_data)
+
+  def testMakeTableData_Normal(self):
+    art = fake.MakeTestIssue(
+        789, 1, 'sum 1', 'New', 111, labels='Type-Defect Priority-Medium')
+    visible_results = [art]
+    lower_columns = ['type', 'priority', 'summary', 'stars']
+    cell_factories = {
+        'summary': table_view_helpers.TableCellSummary,
+        'stars': table_view_helpers.TableCellStars,
+        }
+
+    table_data = table_view_helpers.MakeTableData(
+        visible_results, [], lower_columns, lower_columns, {},
+        cell_factories, lambda art: 'id', {}, set(), self.config)
+    self.assertEqual(1, len(table_data))
+    row = table_data[0]
+    self.assertEqual(4, len(row.cells))
+    self.assertEqual('Defect', row.cells[0].values[0].item)
+
+  def testMakeTableData_Groups(self):
+    art = fake.MakeTestIssue(
+        789, 1, 'sum 1', 'New', 111, labels='Type-Defect Priority-Medium')
+    visible_results = [art]
+    lower_columns = ['type', 'priority', 'summary', 'stars']
+    lower_group_by = ['priority']
+    cell_factories = {
+        'summary': table_view_helpers.TableCellSummary,
+        'stars': table_view_helpers.TableCellStars,
+        }
+
+    table_data = table_view_helpers.MakeTableData(
+        visible_results, [], lower_columns, lower_group_by, {},
+        cell_factories, lambda art: 'id', {}, set(), self.config)
+    self.assertEqual(1, len(table_data))
+    row = table_data[0]
+    self.assertEqual(1, len(row.group.cells))
+    self.assertEqual('Medium', row.group.cells[0].values[0].item)
+
+  def testMakeRowData(self):
+    art = fake.MakeTestIssue(
+        789, 1, 'sum 1', 'New', 111, labels='Type-Defect Priority-Medium',
+        star_count=1)
+    columns = ['type', 'priority', 'summary', 'stars']
+
+    cell_factories = [table_view_helpers.TableCellKeyLabels,
+                      table_view_helpers.TableCellKeyLabels,
+                      table_view_helpers.TableCellSummary,
+                      table_view_helpers.TableCellStars]
+
+    # a result is an table_view_helpers.TableRow object with a "cells" field
+    # containing a list of table_view_helpers.TableCell objects.
+    result = table_view_helpers.MakeRowData(
+        art, columns, {}, cell_factories, {}, set(), self.config, {})
+
+    self.assertEqual(len(columns), len(result.cells))
+
+    for i in range(len(columns)):
+      cell = result.cells[i]
+      self.assertEqual(i, cell.col_index)
+
+    self.assertEqual(table_view_helpers.CELL_TYPE_ATTR, result.cells[0].type)
+    self.assertEqual('Defect', result.cells[0].values[0].item)
+    self.assertFalse(result.cells[0].values[0].is_derived)
+
+    self.assertEqual(table_view_helpers.CELL_TYPE_ATTR, result.cells[1].type)
+    self.assertEqual('Medium', result.cells[1].values[0].item)
+    self.assertFalse(result.cells[1].values[0].is_derived)
+
+    self.assertEqual(
+        table_view_helpers.CELL_TYPE_SUMMARY, result.cells[2].type)
+    self.assertEqual('sum 1', result.cells[2].values[0].item)
+    self.assertFalse(result.cells[2].values[0].is_derived)
+
+    self.assertEqual(table_view_helpers.CELL_TYPE_ATTR, result.cells[3].type)
+    self.assertEqual(1, result.cells[3].values[0].item)
+    self.assertFalse(result.cells[3].values[0].is_derived)
+
+  def testAccumulateLabelValues_Empty(self):
+    label_values, non_col_labels = collections.defaultdict(list), []
+    table_view_helpers._AccumulateLabelValues(
+        [], [], label_values, non_col_labels)
+    self.assertEqual({}, label_values)
+    self.assertEqual([], non_col_labels)
+
+    label_values, non_col_labels = collections.defaultdict(list), []
+    table_view_helpers._AccumulateLabelValues(
+        [], ['Type', 'Priority'], label_values, non_col_labels)
+    self.assertEqual({}, label_values)
+    self.assertEqual([], non_col_labels)
+
+  def testAccumulateLabelValues_OneWordLabels(self):
+    label_values, non_col_labels = collections.defaultdict(list), []
+    table_view_helpers._AccumulateLabelValues(
+        ['HelloThere'], [], label_values, non_col_labels)
+    self.assertEqual({}, label_values)
+    self.assertEqual([('HelloThere', False)], non_col_labels)
+
+    label_values, non_col_labels = collections.defaultdict(list), []
+    table_view_helpers._AccumulateLabelValues(
+        ['HelloThere'], [], label_values, non_col_labels, is_derived=True)
+    self.assertEqual({}, label_values)
+    self.assertEqual([('HelloThere', True)], non_col_labels)
+
+  def testAccumulateLabelValues_KeyValueLabels(self):
+    label_values, non_col_labels = collections.defaultdict(list), []
+    table_view_helpers._AccumulateLabelValues(
+        ['Type-Defect', 'Milestone-Soon'], ['type', 'milestone'],
+        label_values, non_col_labels)
+    self.assertEqual(
+        {'type': [('Defect', False)],
+         'milestone': [('Soon', False)]},
+        label_values)
+    self.assertEqual([], non_col_labels)
+
+  def testAccumulateLabelValues_MultiValueLabels(self):
+    label_values, non_col_labels = collections.defaultdict(list), []
+    table_view_helpers._AccumulateLabelValues(
+        ['OS-Mac', 'OS-Linux'], ['os', 'arch'],
+        label_values, non_col_labels)
+    self.assertEqual(
+        {'os': [('Mac', False), ('Linux', False)]},
+        label_values)
+    self.assertEqual([], non_col_labels)
+
+  def testAccumulateLabelValues_MultiPartLabels(self):
+    label_values, non_col_labels = collections.defaultdict(list), []
+    table_view_helpers._AccumulateLabelValues(
+        ['OS-Mac-Server', 'OS-Mac-Laptop'], ['os', 'os-mac'],
+        label_values, non_col_labels)
+    self.assertEqual(
+        {'os': [('Mac-Server', False), ('Mac-Laptop', False)],
+         'os-mac': [('Server', False), ('Laptop', False)],
+         },
+        label_values)
+    self.assertEqual([], non_col_labels)
+
+  def testChooseCellFactory(self):
+    """We choose the right kind of table cell for the specified column."""
+    cell_factories = {
+      'summary': table_view_helpers.TableCellSummary,
+      'stars': table_view_helpers.TableCellStars,
+      }
+    os_fd = tracker_bizobj.MakeFieldDef(
+        1, 789, 'os', tracker_pb2.FieldTypes.ENUM_TYPE, None, None, False,
+        False, False, None, None, None, False, None, None, None, None,
+        'Operating system', False)
+    deadline_fd = tracker_bizobj.MakeFieldDef(
+        2, 789, 'deadline', tracker_pb2.FieldTypes.DATE_TYPE, None, None, False,
+        False, False, None, None, None, False, None, None, None, None,
+        'Deadline to resolve issue', False)
+    approval_fd = tracker_bizobj.MakeFieldDef(
+        3, 789, 'CowApproval', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        None, None, False,
+        False, False, None, None, None, False, None, None, None, None,
+        'Tracks reviews from cows', False)
+    goats_fd = tracker_bizobj.MakeFieldDef(
+        4, 789, 'goats', tracker_pb2.FieldTypes.INT_TYPE, None, None, False,
+        False, False, None, None, None, False, None, None, None, None,
+        'Num goats in each phase', False, is_phase_field=True)
+    self.config.field_defs = [os_fd, deadline_fd, approval_fd, goats_fd]
+
+    # The column is defined in cell_factories.
+    actual = table_view_helpers.ChooseCellFactory(
+        'summary', cell_factories, self.config)
+    self.assertEqual(table_view_helpers.TableCellSummary, actual)
+
+    # The column is a composite column.
+    actual = table_view_helpers.ChooseCellFactory(
+        'summary/stars', cell_factories, self.config)
+    self.assertEqual('FactoryClass', actual.__name__)
+
+    # The column is a enum custom field, so it is treated like a label.
+    actual = table_view_helpers.ChooseCellFactory(
+        'os', cell_factories, self.config)
+    self.assertEqual(table_view_helpers.TableCellKeyLabels, actual)
+
+    # The column is a non-enum custom field.
+    actual = table_view_helpers.ChooseCellFactory(
+        'deadline', cell_factories, self.config)
+    self.assertEqual(
+      [(table_view_helpers.TableCellCustom, 'deadline'),
+       (table_view_helpers.TableCellKeyLabels, 'deadline')],
+      actual.factory_col_list)
+
+    # The column is an approval custom field.
+    actual = table_view_helpers.ChooseCellFactory(
+        'CowApproval', cell_factories, self.config)
+    self.assertEqual(
+        [(table_view_helpers.TableCellApprovalStatus, 'CowApproval'),
+         (table_view_helpers.TableCellKeyLabels, 'CowApproval')],
+        actual.factory_col_list)
+
+    # The column is an approval custom field with '-approver'.
+    actual = table_view_helpers.ChooseCellFactory(
+        'CowApproval-approver', cell_factories, self.config)
+    self.assertEqual(
+        [(table_view_helpers.TableCellApprovalApprover, 'CowApproval-approver'),
+         (table_view_helpers.TableCellKeyLabels, 'CowApproval-approver')],
+        actual.factory_col_list)
+
+    # The column specifies a phase custom field.
+    actual = table_view_helpers.ChooseCellFactory(
+        'winter.goats', cell_factories, self.config)
+    self.assertEqual(
+         [(table_view_helpers.TableCellCustom, 'winter.goats'),
+          (table_view_helpers.TableCellKeyLabels, 'winter.goats')],
+         actual.factory_col_list)
+
+
+    # Column that don't match one of the other cases is assumed to be a label.
+    actual = table_view_helpers.ChooseCellFactory(
+        'reward', cell_factories, self.config)
+    self.assertEqual(table_view_helpers.TableCellKeyLabels, actual)
+
+  def testCompositeFactoryTableCell_Empty(self):
+    """If we made a composite of zero columns, it would have no values."""
+    composite = table_view_helpers.CompositeFactoryTableCell([])
+    cell = composite('artifact')
+    self.assertEqual([], cell.values)
+
+  def testCompositeFactoryTableCell_Normal(self):
+    """If we make a composite, it has values from each of the sub cells."""
+    composite = table_view_helpers.CompositeFactoryTableCell(
+        [(sub_factory_1, 'col1'),
+         (sub_factory_2, 'col2')])
+
+    cell = composite('artifact')
+    self.assertEqual(
+        ['sub_cell_1_col1',
+         'sub_cell_2_col2'],
+        cell.values)
+
+  def testCompositeColTableCell_Empty(self):
+    """If we made a composite of zero columns, it would have no values."""
+    composite = table_view_helpers.CompositeColTableCell([], {}, self.config)
+    cell = composite('artifact')
+    self.assertEqual([], cell.values)
+
+
+  def testCompositeColTableCell_Normal(self):
+    """If we make a composite, it has values from each of the sub cells."""
+    composite = table_view_helpers.CompositeColTableCell(
+      ['col1', 'col2'],
+      {'col1': sub_factory_1, 'col2': sub_factory_2},
+      self.config)
+    cell = composite('artifact')
+    self.assertEqual(
+        ['sub_cell_1_col1',
+         'sub_cell_2_col2'],
+        cell.values)
+
+
+def sub_factory_1(_art, **kw):
+  return testing_helpers.Blank(
+      values=['sub_cell_1_%s' % kw['col']],
+      non_column_labels=[])
+
+
+def sub_factory_2(_art, **kw):
+  return testing_helpers.Blank(
+      values=['sub_cell_2_%s' % kw['col']],
+      non_column_labels=[])
diff --git a/framework/test/template_helpers_test.py b/framework/test/template_helpers_test.py
new file mode 100644
index 0000000..85296fa
--- /dev/null
+++ b/framework/test/template_helpers_test.py
@@ -0,0 +1,216 @@
+# 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
+
+"""Unit tests for template_helpers module."""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import unittest
+
+from framework import pbproxy_test_pb2
+from framework import template_helpers
+
+
+class HelpersUnitTest(unittest.TestCase):
+
+  def testDictionaryProxy(self):
+
+    # basic in 'n out test
+    item = template_helpers.EZTItem(label='foo', group_name='bar')
+
+    self.assertEqual('foo', item.label)
+    self.assertEqual('bar', item.group_name)
+
+    # be sure the __str__ returns the fields
+    self.assertEqual(
+        "EZTItem({'group_name': 'bar', 'label': 'foo'})", str(item))
+
+  def testPBProxy(self):
+    """Checks that PBProxy wraps protobuf objects as expected."""
+    # check that protobuf fields are accessible in ".attribute" form
+    pbe = pbproxy_test_pb2.PBProxyExample()
+    pbe.nickname = 'foo'
+    pbe.invited = False
+    pbep = template_helpers.PBProxy(pbe)
+    self.assertEqual(pbep.nickname, 'foo')
+    # _bool suffix converts protobuf field 'bar' to None (EZT boolean false)
+    self.assertEqual(pbep.invited_bool, None)
+
+    # check that a new field can be added to the PBProxy
+    pbep.baz = 'bif'
+    self.assertEqual(pbep.baz, 'bif')
+
+    # check that a PBProxy-local field can hide a protobuf field
+    pbep.nickname = 'local foo'
+    self.assertEqual(pbep.nickname, 'local foo')
+
+    # check that a nested protobuf is recursively wrapped with a PBProxy
+    pbn = pbproxy_test_pb2.PBProxyNested()
+    pbn.nested = pbproxy_test_pb2.PBProxyExample()
+    pbn.nested.nickname = 'bar'
+    pbn.nested.invited = True
+    pbnp = template_helpers.PBProxy(pbn)
+    self.assertEqual(pbnp.nested.nickname, 'bar')
+    # _bool suffix converts protobuf field 'bar' to 'yes' (EZT boolean true)
+    self.assertEqual(pbnp.nested.invited_bool, 'yes')
+
+    # check that 'repeated' lists of items produce a list of strings
+    pbn.multiple_strings.append('1')
+    pbn.multiple_strings.append('2')
+    self.assertEqual(pbnp.multiple_strings, ['1', '2'])
+
+    # check that 'repeated' messages produce lists of PBProxy instances
+    pbe1 = pbproxy_test_pb2.PBProxyExample()
+    pbn.multiple_pbes.append(pbe1)
+    pbe1.nickname = '1'
+    pbe1.invited = True
+    pbe2 = pbproxy_test_pb2.PBProxyExample()
+    pbn.multiple_pbes.append(pbe2)
+    pbe2.nickname = '2'
+    pbe2.invited = False
+    self.assertEqual(pbnp.multiple_pbes[0].nickname, '1')
+    self.assertEqual(pbnp.multiple_pbes[0].invited_bool, 'yes')
+    self.assertEqual(pbnp.multiple_pbes[1].nickname, '2')
+    self.assertEqual(pbnp.multiple_pbes[1].invited_bool, None)
+
+  def testFitTextMethods(self):
+    """Tests both FitUnsafeText with an eye on i18n."""
+    # pylint: disable=anomalous-unicode-escape-in-string
+    test_data = (
+        u'This is a short string.',
+
+        u'This is a much longer string. '
+        u'This is a much longer string. '
+        u'This is a much longer string. '
+        u'This is a much longer string. '
+        u'This is a much longer string. '
+        u'This is a much longer string. '
+        u'This is a much longer string. '
+        u'This is a much longer string. '
+        u'This is a much longer string. '
+        u'This is a much longer string. ',
+
+        # This is a short escaped i18n string
+        '\xd5\xa1\xd5\xba\xd5\xa1\xd5\xaf\xd5\xab'.decode('utf-8'),
+
+        # This is a longer i18n string
+        '\xd5\xa1\xd5\xba\xd5\xa1\xd5\xaf\xd5\xab '
+        '\xe6\x88\x91\xe8\x83\xbd\xe5\x90\x9e '
+        '\xd5\xa1\xd5\xba\xd5\xa1\xd5\xaf\xd5\xab '
+        '\xe6\x88\x91\xe8\x83\xbd\xe5\x90\x9e '
+        '\xd5\xa1\xd5\xba\xd5\xa1\xd5\xaf\xd5\xab '
+        '\xe6\x88\x91\xe8\x83\xbd\xe5\x90\x9e '
+        '\xd5\xa1\xd5\xba\xd5\xa1\xd5\xaf\xd5\xab '
+        '\xe6\x88\x91\xe8\x83\xbd\xe5\x90\x9e '.decode('utf-8'),
+
+        # This is a longer i18n string that was causing trouble.
+        '\u041d\u0430 \u0431\u0435\u0440\u0435\u0433\u0443'
+        ' \u043f\u0443\u0441\u0442\u044b\u043d\u043d\u044b\u0445'
+        ' \u0432\u043e\u043b\u043d \u0421\u0442\u043e\u044f\u043b'
+        ' \u043e\u043d, \u0434\u0443\u043c'
+        ' \u0432\u0435\u043b\u0438\u043a\u0438\u0445'
+        ' \u043f\u043e\u043b\u043d, \u0418'
+        ' \u0432\u0434\u0430\u043b\u044c'
+        ' \u0433\u043b\u044f\u0434\u0435\u043b.'
+        ' \u041f\u0440\u0435\u0434 \u043d\u0438\u043c'
+        ' \u0448\u0438\u0440\u043e\u043a\u043e'
+        ' \u0420\u0435\u043a\u0430'
+        ' \u043d\u0435\u0441\u043b\u0430\u0441\u044f;'
+        ' \u0431\u0435\u0434\u043d\u044b\u0439'
+        ' \u0447\u0451\u043b\u043d \u041f\u043e'
+        ' \u043d\u0435\u0439'
+        ' \u0441\u0442\u0440\u0435\u043c\u0438\u043b\u0441\u044f'
+        ' \u043e\u0434\u0438\u043d\u043e\u043a\u043e.'
+        ' \u041f\u043e \u043c\u0448\u0438\u0441\u0442\u044b\u043c,'
+        ' \u0442\u043e\u043f\u043a\u0438\u043c'
+        ' \u0431\u0435\u0440\u0435\u0433\u0430\u043c'
+        ' \u0427\u0435\u0440\u043d\u0435\u043b\u0438'
+        ' \u0438\u0437\u0431\u044b \u0437\u0434\u0435\u0441\u044c'
+        ' \u0438 \u0442\u0430\u043c, \u041f\u0440\u0438\u044e\u0442'
+        ' \u0443\u0431\u043e\u0433\u043e\u0433\u043e'
+        ' \u0447\u0443\u0445\u043e\u043d\u0446\u0430;'
+        ' \u0418 \u043b\u0435\u0441,'
+        ' \u043d\u0435\u0432\u0435\u0434\u043e\u043c\u044b\u0439'
+        ' \u043b\u0443\u0447\u0430\u043c \u0412'
+        ' \u0442\u0443\u043c\u0430\u043d\u0435'
+        ' \u0441\u043f\u0440\u044f\u0442\u0430\u043d\u043d\u043e'
+        '\u0433\u043e \u0441\u043e\u043b\u043d\u0446\u0430,'
+        ' \u041a\u0440\u0443\u0433\u043e\u043c'
+        ' \u0448\u0443\u043c\u0435\u043b.'.decode('utf-8'))
+
+    for unicode_s in test_data:
+      # Get the length in characters, not bytes.
+      length = len(unicode_s)
+
+      # Test the FitUnsafeText method at the length boundary.
+      fitted_unsafe_text = template_helpers.FitUnsafeText(unicode_s, length)
+      self.assertEqual(fitted_unsafe_text, unicode_s)
+
+      # Set some values that test FitString well.
+      available_space = length // 2
+      max_trailing = length // 4
+      # Break the string at various places - symmetric range around 0
+      for i in range(1-max_trailing, max_trailing):
+        # Test the FitUnsafeText method.
+        fitted_unsafe_text = template_helpers.FitUnsafeText(
+            unicode_s, available_space - i)
+        self.assertEqual(fitted_unsafe_text[:available_space - i],
+                         unicode_s[:available_space - i])
+
+      # Test a string that is already unicode
+      u_string = u'This is already unicode'
+      fitted_unsafe_text = template_helpers.FitUnsafeText(u_string, 100)
+      self.assertEqual(u_string, fitted_unsafe_text)
+
+      # Test a string that is already unicode, and has non-ascii in it.
+      u_string = u'This is already unicode este\\u0301tico'
+      fitted_unsafe_text = template_helpers.FitUnsafeText(u_string, 100)
+      self.assertEqual(u_string, fitted_unsafe_text)
+
+  def testEZTError(self):
+    errors = template_helpers.EZTError()
+    self.assertFalse(errors.AnyErrors())
+
+    errors.error_a = 'A'
+    self.assertTrue(errors.AnyErrors())
+    self.assertEqual('A', errors.error_a)
+
+    errors.SetError('error_b', 'B')
+    self.assertTrue(errors.AnyErrors())
+    self.assertEqual('A', errors.error_a)
+    self.assertEqual('B', errors.error_b)
+
+  def testBytesKbOrMb(self):
+    self.assertEqual('1023 bytes', template_helpers.BytesKbOrMb(1023))
+    self.assertEqual('1.0 KB', template_helpers.BytesKbOrMb(1024))
+    self.assertEqual('1023 KB', template_helpers.BytesKbOrMb(1024 * 1023))
+    self.assertEqual('1.0 MB', template_helpers.BytesKbOrMb(1024 * 1024))
+    self.assertEqual('98.0 MB', template_helpers.BytesKbOrMb(98 * 1024 * 1024))
+    self.assertEqual('99 MB', template_helpers.BytesKbOrMb(99 * 1024 * 1024))
+
+
+class TextRunTest(unittest.TestCase):
+
+  def testLink(self):
+    run = template_helpers.TextRun(
+        'content', tag='a', href='http://example.com')
+    expected = '<a href="http://example.com">content</a>'
+    self.assertEqual(expected, run.FormatForHTMLEmail())
+
+    run = template_helpers.TextRun(
+      'con<tent>', tag='a', href='http://exa"mple.com')
+    expected = '<a href="http://exa&quot;mple.com">con&lt;tent&gt;</a>'
+    self.assertEqual(expected, run.FormatForHTMLEmail())
+
+  def testText(self):
+    run = template_helpers.TextRun('content')
+    expected = 'content'
+    self.assertEqual(expected, run.FormatForHTMLEmail())
+
+    run = template_helpers.TextRun('con<tent>')
+    expected = 'con&lt;tent&gt;'
+    self.assertEqual(expected, run.FormatForHTMLEmail())
diff --git a/framework/test/timestr_test.py b/framework/test/timestr_test.py
new file mode 100644
index 0000000..ad11249
--- /dev/null
+++ b/framework/test/timestr_test.py
@@ -0,0 +1,95 @@
+# 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
+
+"""Unittest for timestr module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import calendar
+import datetime
+import time
+import unittest
+
+from framework import timestr
+
+
+class TimeStrTest(unittest.TestCase):
+  """Unit tests for timestr routines."""
+
+  def testFormatAbsoluteDate(self):
+    now = datetime.datetime(2008, 1, 1)
+
+    def GetDate(*args):
+      date = datetime.datetime(*args)
+      return timestr.FormatAbsoluteDate(
+          calendar.timegm(date.utctimetuple()), clock=lambda: now)
+
+    self.assertEqual(GetDate(2008, 1, 1), 'Today')
+    self.assertEqual(GetDate(2007, 12, 31), 'Yesterday')
+    self.assertEqual(GetDate(2007, 12, 30), 'Dec 30')
+    self.assertEqual(GetDate(2007, 1, 1), 'Jan 2007')
+    self.assertEqual(GetDate(2007, 1, 2), 'Jan 2007')
+    self.assertEqual(GetDate(2007, 12, 31), 'Yesterday')
+    self.assertEqual(GetDate(2006, 12, 31), 'Dec 2006')
+    self.assertEqual(GetDate(2007, 7, 1), 'Jul 1')
+    self.assertEqual(GetDate(2007, 6, 30), 'Jun 2007')
+    self.assertEqual(GetDate(2008, 1, 3), 'Jan 2008')
+
+    # Leap year fun
+    now = datetime.datetime(2008, 3, 1)
+    self.assertEqual(GetDate(2008, 2, 29), 'Yesterday')
+
+    # Clock skew
+    now = datetime.datetime(2008, 1, 1, 23, 59, 59)
+    self.assertEqual(GetDate(2008, 1, 2), 'Today')
+    now = datetime.datetime(2007, 12, 31, 23, 59, 59)
+    self.assertEqual(GetDate(2008, 1, 1), 'Today')
+    self.assertEqual(GetDate(2008, 1, 2), 'Jan 2008')
+
+  def testFormatRelativeDate(self):
+    now = time.mktime(datetime.datetime(2008, 1, 1).timetuple())
+
+    def TestSecsAgo(secs_ago, expected, expected_days_only):
+      test_time = now - secs_ago
+      actual = timestr.FormatRelativeDate(
+          test_time, clock=lambda: now)
+      self.assertEqual(actual, expected)
+      actual_days_only = timestr.FormatRelativeDate(
+          test_time, clock=lambda: now, days_only=True)
+      self.assertEqual(actual_days_only, expected_days_only)
+
+    TestSecsAgo(10 * 24 * 60 * 60, '', '10 days ago')
+    TestSecsAgo(5 * 24 * 60 * 60 - 1, '4 days ago', '4 days ago')
+    TestSecsAgo(5 * 60 * 60 - 1, '4 hours ago', '')
+    TestSecsAgo(5 * 60 - 1, '4 minutes ago', '')
+    TestSecsAgo(2 * 60 - 1, '1 minute ago', '')
+    TestSecsAgo(60 - 1, 'moments ago', '')
+    TestSecsAgo(0, 'moments ago', '')
+    TestSecsAgo(-10, 'moments ago', '')
+    TestSecsAgo(-100, '', '')
+
+  def testGetHumanScaleDate(self):
+    """Tests GetHumanScaleDate()."""
+    now = time.mktime(datetime.datetime(2008, 4, 10, 20, 50, 30).timetuple())
+
+    def GetDate(*args):
+      date = datetime.datetime(*args)
+      timestamp = time.mktime(date.timetuple())
+      return timestr.GetHumanScaleDate(timestamp, now=now)
+
+    self.assertEqual(GetDate(2008, 4, 10, 15), ('Today', '5 hours ago'))
+    self.assertEqual(GetDate(2008, 4, 10, 19, 55), ('Today', '55 min ago'))
+    self.assertEqual(GetDate(2008, 4, 10, 20, 48, 35), ('Today', '1 min ago'))
+    self.assertEqual(GetDate(2008, 4, 10, 20, 49, 35), ('Today', 'moments ago'))
+    self.assertEqual(GetDate(2008, 4, 10, 20, 50, 55), ('Today', 'moments ago'))
+    self.assertEqual(GetDate(2008, 4, 9, 15), ('Yesterday', '29 hours ago'))
+    self.assertEqual(GetDate(2008, 4, 5, 15), ('Last 7 days', 'Apr 05, 2008'))
+    self.assertEqual(GetDate(2008, 3, 22, 15), ('Last 30 days', 'Mar 22, 2008'))
+    self.assertEqual(
+        GetDate(2008, 1, 2, 15), ('Earlier this year', 'Jan 02, 2008'))
+    self.assertEqual(
+        GetDate(2007, 12, 31, 15), ('Before this year', 'Dec 31, 2007'))
+    self.assertEqual(GetDate(2008, 4, 11, 20, 49, 35), ('Future', 'Later'))
diff --git a/framework/test/ts_mon_js_test.py b/framework/test/ts_mon_js_test.py
new file mode 100644
index 0000000..bcd4060
--- /dev/null
+++ b/framework/test/ts_mon_js_test.py
@@ -0,0 +1,73 @@
+# Copyright 2018 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
+
+"""Tests for MonorailTSMonJSHandler."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import json
+import unittest
+from mock import patch
+
+import webapp2
+from google.appengine.ext import testbed
+
+from framework.ts_mon_js import MonorailTSMonJSHandler
+from services import service_manager
+
+
+class MonorailTSMonJSHandlerTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_user_stub()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  @patch('framework.xsrf.ValidateToken')
+  @patch('time.time')
+  def testSubmitMetrics(self, _mockTime, _mockValidateToken):
+    """Test normal case POSTing metrics."""
+    _mockTime.return_value = 1537821859
+    req = webapp2.Request.blank('/_/ts_mon_js')
+    req.body = json.dumps({
+      'metrics': [{
+        'MetricInfo': {
+          'Name': 'monorail/frontend/issue_update_latency',
+          'ValueType': 2,
+        },
+        'Cells': [{
+          'value': {
+            'sum': 1234,
+            'count': 4321,
+            'buckets': {
+              0: 123,
+              1: 321,
+              2: 213,
+            },
+          },
+          'fields': {
+            'client_id': '789',
+            'host_name': 'rutabaga',
+            'document_visible': True,
+          },
+          'start_time': 1537821859 - 60,
+        }],
+      }],
+    })
+    res = webapp2.Response()
+    ts_mon_handler = MonorailTSMonJSHandler(request=req, response=res)
+    class MockApp(object):
+      def __init__(self):
+        self.config = {'services': service_manager.Services()}
+    ts_mon_handler.app = MockApp()
+
+    ts_mon_handler.post()
+
+    self.assertEqual(res.status_int, 201)
+    self.assertEqual(res.body, 'Ok.')
diff --git a/framework/test/validate_test.py b/framework/test/validate_test.py
new file mode 100644
index 0000000..9ea17fe
--- /dev/null
+++ b/framework/test/validate_test.py
@@ -0,0 +1,128 @@
+# 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
+
+"""This file provides unit tests for Validate functions."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import validate
+
+
+class ValidateUnitTest(unittest.TestCase):
+  """Set of unit tests for validation functions."""
+
+  GOOD_EMAIL_ADDRESSES = [
+      'user@example.com',
+      'user@e.com',
+      'user+tag@example.com',
+      'u.ser@example.com',
+      'us.er@example.com',
+      'u.s.e.r@example.com',
+      'user@ex-ample.com',
+      'user@ex.ample.com',
+      'user@e.x.ample.com',
+      'user@exampl.e.com',
+      'user@e-x-ample.com',
+      'user@e-x-a-m-p-l-e.com',
+      'user@e-x.am-ple.com',
+      'user@e--xample.com',
+  ]
+
+  BAD_EMAIL_ADDRESSES = [
+      ' leading.whitespace@example.com',
+      'trailing.whitespace@example.com ',
+      '(paren.quoted@example.com)',
+      '<angle.quoted@example.com>',
+      'trailing.@example.com',
+      'trailing.dot.@example.com',
+      '.leading@example.com',
+      '.leading.dot@example.com',
+      'user@example.com.',
+      'us..er@example.com',
+      'user@ex..ample.com',
+      'user@example..com',
+      'user@ex-.ample.com',
+      'user@-example.com',
+      'user@.example.com',
+      'user@example-.com',
+      'user@example',
+      'user@example.',
+      'user@example.c',
+      'user@example.comcomcomc',
+      'user@example.co-m',
+      'user@exa_mple.com',
+      'user@exa-_mple.com',
+      'user@example.c0m',
+  ]
+
+  def testIsValidEmail(self):
+    """Tests the Email validator class."""
+    for email in self.GOOD_EMAIL_ADDRESSES:
+      self.assertTrue(validate.IsValidEmail(email), msg='Rejected:%r' % email)
+
+    for email in self.BAD_EMAIL_ADDRESSES:
+      self.assertFalse(validate.IsValidEmail(email), msg='Accepted:%r' % email)
+
+  def testIsValidMailTo(self):
+    for email in self.GOOD_EMAIL_ADDRESSES:
+      self.assertTrue(
+          validate.IsValidMailTo('mailto:' + email),
+          msg='Rejected:%r' % ('mailto:' + email))
+
+    for email in self.BAD_EMAIL_ADDRESSES:
+      self.assertFalse(
+          validate.IsValidMailTo('mailto:' + email),
+          msg='Accepted:%r' % ('mailto:' + email))
+
+  GOOD_URLS = [
+      'http://google.com',
+      'http://maps.google.com/',
+      'https://secure.protocol.com',
+      'https://dash-domain.com',
+      'http://www.google.com/search?q=foo&hl=en',
+      'https://a.very.long.domain.name.net/with/a/long/path/inf0/too',
+      'http://funny.ws/',
+      'http://we.love.anchors.info/page.html#anchor',
+      'http://redundant-slashes.com//in/path//info',
+      'http://trailingslashe.com/in/path/info/',
+      'http://domain.with.port.com:8080',
+      'http://domain.with.port.com:8080/path/info',
+      'ftp://ftp.gnu.org',
+      'ftp://some.server.some.place.com',
+      'http://b/123456',
+      'http://cl/123456/',
+  ]
+
+  BAD_URLS = [
+      ' http://leading.whitespace.com',
+      'http://trailing.domain.whitespace.com ',
+      'http://trailing.whitespace.com/after/path/info ',
+      'http://underscore_domain.com/',
+      'http://space in domain.com',
+      'http://user@example.com',  # standard, but we purposely don't accept it.
+      'http://user:pass@ex.com',  # standard, but we purposely don't accept it.
+      'http://:password@ex.com',  # standard, but we purposely don't accept it.
+      'missing-http.com',
+      'http:missing-slashes.com',
+      'http:/only-one-slash.com',
+      'http://trailing.dot.',
+      'mailto:bad.scheme',
+      'javascript:attempt-to-inject',
+      'http://short-with-no-final-slash',
+      'http:///',
+      'http:///no.host.name',
+      'http://:8080/',
+      'http://badport.com:808a0/ ',
+  ]
+
+  def testURL(self):
+    for url in self.GOOD_URLS:
+      self.assertTrue(validate.IsValidURL(url), msg='Rejected:%r' % url)
+
+    for url in self.BAD_URLS:
+      self.assertFalse(validate.IsValidURL(url), msg='Accepted:%r' % url)
diff --git a/framework/test/warmup_test.py b/framework/test/warmup_test.py
new file mode 100644
index 0000000..d8ddb65
--- /dev/null
+++ b/framework/test/warmup_test.py
@@ -0,0 +1,36 @@
+# Copyright 2017 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
+
+"""Tests for the warmup servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from testing import testing_helpers
+
+from framework import sql
+from framework import warmup
+from services import service_manager
+
+
+class WarmupTest(unittest.TestCase):
+
+  def setUp(self):
+    #self.cache_manager = cachemanager_svc.CacheManager()
+    #self.services = service_manager.Services(
+    #    cache_manager=self.cache_manager)
+    self.services = service_manager.Services()
+    self.servlet = warmup.Warmup(
+        'req', 'res', services=self.services)
+
+
+  def testHandleRequest_NothingToDo(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    actual_json_data = self.servlet.HandleRequest(mr)
+    self.assertEqual(
+        {'success': 1},
+        actual_json_data)
diff --git a/framework/test/xsrf_test.py b/framework/test/xsrf_test.py
new file mode 100644
index 0000000..aa04570
--- /dev/null
+++ b/framework/test/xsrf_test.py
@@ -0,0 +1,113 @@
+# 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
+
+"""Tests for XSRF utility functions."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+import unittest
+
+from mock import patch
+
+from google.appengine.ext import testbed
+
+import settings
+from framework import xsrf
+
+
+class XsrfTest(unittest.TestCase):
+  """Set of unit tests for blocking XSRF attacks."""
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  def testGenerateToken_AnonUserGetsAToken(self):
+    self.assertNotEqual('', xsrf.GenerateToken(0, '/path'))
+
+  def testGenerateToken_DifferentUsersGetDifferentTokens(self):
+    self.assertNotEqual(
+        xsrf.GenerateToken(111, '/path'),
+        xsrf.GenerateToken(222, '/path'))
+
+    self.assertNotEqual(
+        xsrf.GenerateToken(111, '/path'),
+        xsrf.GenerateToken(0, '/path'))
+
+  def testGenerateToken_DifferentPathsGetDifferentTokens(self):
+    self.assertNotEqual(
+        xsrf.GenerateToken(111, '/path/one'),
+        xsrf.GenerateToken(111, '/path/two'))
+
+  def testValidToken(self):
+    token = xsrf.GenerateToken(111, '/path')
+    xsrf.ValidateToken(token, 111, '/path')  # no exception raised
+
+  def testMalformedToken(self):
+    self.assertRaises(
+      xsrf.TokenIncorrect,
+      xsrf.ValidateToken, 'bad', 111, '/path')
+    self.assertRaises(
+      xsrf.TokenIncorrect,
+      xsrf.ValidateToken, '', 111, '/path')
+
+    self.assertRaises(
+        xsrf.TokenIncorrect,
+        xsrf.ValidateToken, '098a08fe08b08c08a05e:9721973123', 111, '/path')
+
+  def testWrongUser(self):
+    token = xsrf.GenerateToken(111, '/path')
+    self.assertRaises(
+      xsrf.TokenIncorrect,
+      xsrf.ValidateToken, token, 222, '/path')
+
+  def testWrongPath(self):
+    token = xsrf.GenerateToken(111, '/path/one')
+    self.assertRaises(
+      xsrf.TokenIncorrect,
+      xsrf.ValidateToken, token, 111, '/path/two')
+
+  @patch('time.time')
+  def testValidateToken_Expiration(self, mockTime):
+    test_time = 1526671379
+    mockTime.return_value = test_time
+    token = xsrf.GenerateToken(111, '/path')
+    xsrf.ValidateToken(token, 111, '/path')
+
+    mockTime.return_value = test_time + 1
+    xsrf.ValidateToken(token, 111, '/path')
+
+    mockTime.return_value = test_time + xsrf.TOKEN_TIMEOUT_SEC
+    xsrf.ValidateToken(token, 111, '/path')
+
+    mockTime.return_value = test_time + xsrf.TOKEN_TIMEOUT_SEC + 1
+    self.assertRaises(
+      xsrf.TokenIncorrect,
+      xsrf.ValidateToken, token, 11, '/path')
+
+  @patch('time.time')
+  def testValidateToken_Future(self, mockTime):
+    """We reject tokens from the future."""
+    test_time = 1526671379
+    mockTime.return_value = test_time
+    token = xsrf.GenerateToken(111, '/path')
+    xsrf.ValidateToken(token, 111, '/path')
+
+    # The clock of the GAE instance doing the checking might be slightly slow.
+    mockTime.return_value = test_time - 1
+    xsrf.ValidateToken(token, 111, '/path')
+
+    # But, if the difference is too much, someone is trying to fake a token.
+    mockTime.return_value = test_time - xsrf.CLOCK_SKEW_SEC - 1
+    self.assertRaises(
+      xsrf.TokenIncorrect,
+      xsrf.ValidateToken, token, 111, '/path')
diff --git a/framework/timestr.py b/framework/timestr.py
new file mode 100644
index 0000000..2b32e8c
--- /dev/null
+++ b/framework/timestr.py
@@ -0,0 +1,188 @@
+# 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
+
+"""Time-to-string and time-from-string routines."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import calendar
+import datetime
+import time
+
+
+class Error(Exception):
+  """Exception used to indicate problems with time routines."""
+  pass
+
+
+HTML_TIME_FMT = '%a, %d %b %Y %H:%M:%S GMT'
+HTML_DATE_WIDGET_FORMAT = '%Y-%m-%d'
+
+MONTH_YEAR_FMT = '%b %Y'
+MONTH_DAY_FMT = '%b %d'
+MONTH_DAY_YEAR_FMT = '%b %d %Y'
+
+# We assume that all server clocks are synchronized within this amount.
+MAX_CLOCK_SKEW_SEC = 30
+
+
+def TimeForHTMLHeader(when=None):
+  """Return the given time (or now) in HTML header format."""
+  if when is None:
+    when = int(time.time())
+  return time.strftime(HTML_TIME_FMT, time.gmtime(when))
+
+
+def TimestampToDateWidgetStr(when):
+  """Format a timestamp int for use by HTML <input type="date">."""
+  return time.strftime(HTML_DATE_WIDGET_FORMAT, time.gmtime(when))
+
+
+def DateWidgetStrToTimestamp(val_str):
+  """Parse the HTML <input type="date"> string into a timestamp int."""
+  return int(calendar.timegm(time.strptime(val_str, HTML_DATE_WIDGET_FORMAT)))
+
+
+def FormatAbsoluteDate(
+    timestamp, clock=datetime.datetime.utcnow,
+    recent_format=MONTH_DAY_FMT, old_format=MONTH_YEAR_FMT):
+  """Format timestamp like 'Sep 5', or 'Yesterday', or 'Today'.
+
+  Args:
+    timestamp: Seconds since the epoch in UTC.
+    clock: callable that returns a datetime.datetime object when called with no
+      arguments, giving the current time to use when computing what to display.
+    recent_format: Format string to pass to strftime to present dates between
+      six months ago and yesterday.
+    old_format: Format string to pass to strftime to present dates older than
+      six months or more than skew_tolerance in the future.
+
+  Returns:
+    If timestamp's date is today, "Today". If timestamp's date is yesterday,
+    "Yesterday". If timestamp is within six months before today, return the
+    time as formatted by recent_format. Otherwise, return the time as formatted
+    by old_format.
+  """
+  ts = datetime.datetime.utcfromtimestamp(timestamp)
+  now = clock()
+  month_delta = 12 * now.year + now.month - (12 * ts.year + ts.month)
+  delta = now - ts
+
+  if ts > now:
+    # If the time is slightly in the future due to clock skew, treat as today.
+    skew_tolerance = datetime.timedelta(seconds=MAX_CLOCK_SKEW_SEC)
+    if -delta <= skew_tolerance:
+      return 'Today'
+    # Otherwise treat it like an old date.
+    else:
+      fmt = old_format
+  elif month_delta > 6 or delta.days >= 365:
+    fmt = old_format
+  elif delta.days == 1:
+    return 'Yesterday'
+  elif delta.days == 0:
+    return 'Today'
+  else:
+    fmt = recent_format
+
+  return time.strftime(fmt, time.gmtime(timestamp)).replace(' 0', ' ')
+
+
+def FormatRelativeDate(timestamp, days_only=False, clock=None):
+  """Return a short string that makes timestamp more meaningful to the user.
+
+  Describe the timestamp relative to the current time, e.g., '4
+  hours ago'.  In cases where the timestamp is more than 6 days ago,
+  we return '' so that an alternative display can be used instead.
+
+  Args:
+    timestamp: Seconds since the epoch in UTC.
+    days_only: If True, return 'N days ago' even for more than 6 days.
+    clock: optional function to return an int time, like int(time.time()).
+
+  Returns:
+    String describing relative time.
+  """
+  if clock:
+    now = clock()
+  else:
+    now = int(time.time())
+
+  # TODO(jrobbins): i18n of date strings
+  delta = int(now - timestamp)
+  d_minutes = delta // 60
+  d_hours = d_minutes // 60
+  d_days = d_hours // 24
+  if days_only:
+    if d_days > 1:
+      return '%s days ago' % d_days
+    else:
+      return ''
+
+  if d_days > 6:
+    return ''
+  if d_days > 1:
+    return '%s days ago' % d_days  # starts at 2 days
+  if d_hours > 1:
+    return '%s hours ago' % d_hours  # starts at 2 hours
+  if d_minutes > 1:
+    return '%s minutes ago' % d_minutes
+  if d_minutes > 0:
+    return '1 minute ago'
+  if delta > -MAX_CLOCK_SKEW_SEC:
+    return 'moments ago'
+  return ''
+
+
+def GetHumanScaleDate(timestamp, now=None):
+  """Formats a timestamp to a course-grained and fine-grained time phrase.
+
+  Args:
+    timestamp: Seconds since the epoch in UTC.
+    now: Current time in seconds since the epoch in UTC.
+
+  Returns:
+    A pair (course_grain, fine_grain) where course_grain is a string
+    such as 'Today', 'Yesterday', etc.; and fine_grained is a string describing
+    relative hours for Today and Yesterday, or an exact date for longer ago.
+  """
+  if now is None:
+    now = int(time.time())
+
+  now_year = datetime.datetime.fromtimestamp(now).year
+  then_year = datetime.datetime.fromtimestamp(timestamp).year
+  delta = int(now - timestamp)
+  delta_minutes = delta // 60
+  delta_hours = delta_minutes // 60
+  delta_days = delta_hours // 24
+
+  if 0 <= delta_hours < 24:
+    if delta_hours > 1:
+      return 'Today', '%s hours ago' % delta_hours
+    if delta_minutes > 1:
+      return 'Today', '%s min ago' % delta_minutes
+    if delta_minutes > 0:
+      return 'Today', '1 min ago'
+    if delta > 0:
+      return 'Today', 'moments ago'
+  if 0 <= delta_hours < 48:
+    return 'Yesterday', '%s hours ago' % delta_hours
+  if 0 <= delta_days < 7:
+    return 'Last 7 days', time.strftime(
+        '%b %d, %Y', (time.localtime(timestamp)))
+  if 0 <= delta_days < 30:
+    return 'Last 30 days', time.strftime(
+        '%b %d, %Y', (time.localtime(timestamp)))
+  if delta > 0:
+    if now_year == then_year:
+      return 'Earlier this year', time.strftime(
+          '%b %d, %Y', (time.localtime(timestamp)))
+    return ('Before this year',
+            time.strftime('%b %d, %Y', (time.localtime(timestamp))))
+  if delta > -MAX_CLOCK_SKEW_SEC:
+    return 'Today', 'moments ago'
+  # Only say something is in the future if it is more than just clock skew.
+  return 'Future', 'Later'
diff --git a/framework/trimvisitedpages.py b/framework/trimvisitedpages.py
new file mode 100644
index 0000000..8d6ec23
--- /dev/null
+++ b/framework/trimvisitedpages.py
@@ -0,0 +1,19 @@
+# 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
+
+"""Classes to handle cron requests to trim users' hotlists/issues visited."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from framework import jsonfeed
+
+class TrimVisitedPages(jsonfeed.InternalTask):
+
+  """Look for users with more than 10 visited hotlists and deletes extras."""
+
+  def HandleRequest(self, mr):
+    """Delete old RecentHotlist2User rows when there are too many"""
+    self.services.user.TrimUserVisitedHotlists(mr.cnxn)
diff --git a/framework/ts_mon_js.py b/framework/ts_mon_js.py
new file mode 100644
index 0000000..61be1a8
--- /dev/null
+++ b/framework/ts_mon_js.py
@@ -0,0 +1,110 @@
+# Copyright 2018 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
+
+"""ts_mon JavaScript proxy handler."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from framework import authdata
+from framework import sql
+from framework import xsrf
+
+from gae_ts_mon.handlers import TSMonJSHandler
+
+from google.appengine.api import users
+
+from infra_libs import ts_mon
+
+
+STANDARD_FIELDS = [
+  ts_mon.StringField('client_id'),
+  ts_mon.StringField('host_name'),
+  ts_mon.BooleanField('document_visible'),
+]
+
+
+# User action metrics.
+ISSUE_CREATE_LATENCY_METRIC = ts_mon.CumulativeDistributionMetric(
+  'monorail/frontend/issue_create_latency', (
+    'Latency between Issue Entry form submission and page load of '
+    'the subsequent issue page.'
+  ), field_spec=STANDARD_FIELDS,
+  units=ts_mon.MetricsDataUnits.MILLISECONDS)
+ISSUE_UPDATE_LATENCY_METRIC = ts_mon.CumulativeDistributionMetric(
+  'monorail/frontend/issue_update_latency', (
+    'Latency between Issue Update form submission and page load of '
+    'the subsequent issue page.'
+  ), field_spec=STANDARD_FIELDS,
+  units=ts_mon.MetricsDataUnits.MILLISECONDS)
+AUTOCOMPLETE_POPULATE_LATENCY_METRIC = ts_mon.CumulativeDistributionMetric(
+  'monorail/frontend/autocomplete_populate_latency', (
+    'Latency between page load and autocomplete options loading.'
+  ), field_spec=STANDARD_FIELDS,
+  units=ts_mon.MetricsDataUnits.MILLISECONDS)
+CHARTS_SWITCH_DATE_RANGE_METRIC = ts_mon.CounterMetric(
+  'monorail/frontend/charts/switch_date_range', (
+    'Number of times user clicks frequency button.'
+  ), field_spec=STANDARD_FIELDS + [ts_mon.IntegerField('date_range')])
+
+# Page load metrics.
+ISSUE_COMMENTS_LOAD_EXTRA_FIELDS = [
+  ts_mon.StringField('template_name'),
+  ts_mon.BooleanField('full_app_load'),
+]
+ISSUE_COMMENTS_LOAD_LATENCY_METRIC = ts_mon.CumulativeDistributionMetric(
+  'monorail/frontend/issue_comments_load_latency', (
+    'Time from navigation or click to issue comments loaded.'
+  ), field_spec=STANDARD_FIELDS + ISSUE_COMMENTS_LOAD_EXTRA_FIELDS,
+  units=ts_mon.MetricsDataUnits.MILLISECONDS)
+DOM_CONTENT_LOADED_EXTRA_FIELDS = [
+  ts_mon.StringField('template_name')]
+DOM_CONTENT_LOADED_METRIC = ts_mon.CumulativeDistributionMetric(
+  'frontend/dom_content_loaded', (
+    'domContentLoaded performance timing.'
+  ), field_spec=STANDARD_FIELDS + DOM_CONTENT_LOADED_EXTRA_FIELDS,
+  units=ts_mon.MetricsDataUnits.MILLISECONDS)
+
+
+ISSUE_LIST_LOAD_EXTRA_FIELDS = [
+  ts_mon.StringField('template_name'),
+  ts_mon.BooleanField('full_app_load'),
+]
+ISSUE_LIST_LOAD_LATENCY_METRIC = ts_mon.CumulativeDistributionMetric(
+  'monorail/frontend/issue_list_load_latency', (
+    'Time from navigation or click to search issues list loaded.'
+  ), field_spec=STANDARD_FIELDS + ISSUE_LIST_LOAD_EXTRA_FIELDS,
+  units=ts_mon.MetricsDataUnits.MILLISECONDS)
+
+
+class MonorailTSMonJSHandler(TSMonJSHandler):
+
+  def __init__(self, request=None, response=None):
+    super(MonorailTSMonJSHandler, self).__init__(request, response)
+    self.register_metrics([
+        ISSUE_CREATE_LATENCY_METRIC,
+        ISSUE_UPDATE_LATENCY_METRIC,
+        AUTOCOMPLETE_POPULATE_LATENCY_METRIC,
+        CHARTS_SWITCH_DATE_RANGE_METRIC,
+        ISSUE_COMMENTS_LOAD_LATENCY_METRIC,
+        DOM_CONTENT_LOADED_METRIC,
+        ISSUE_LIST_LOAD_LATENCY_METRIC])
+
+  def xsrf_is_valid(self, body):
+    """This method expects the body dictionary to include two fields:
+    `token` and `user_id`.
+    """
+    cnxn = sql.MonorailConnection()
+    token = body.get('token')
+    user = users.get_current_user()
+    email = user.email() if user else None
+
+    services = self.app.config.get('services')
+    auth = authdata.AuthData.FromEmail(cnxn, email, services, autocreate=False)
+    try:
+      xsrf.ValidateToken(token, auth.user_id, xsrf.XHR_SERVLET_PATH)
+      return True
+    except xsrf.TokenIncorrect:
+      return False
diff --git a/framework/urls.py b/framework/urls.py
new file mode 100644
index 0000000..d7e5e3a
--- /dev/null
+++ b/framework/urls.py
@@ -0,0 +1,157 @@
+# 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
+
+"""Constants that define the Monorail URL space."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+# URLs of site-wide Monorail pages
+HOSTING_HOME = '/hosting_old/'
+PROJECT_CREATE = '/hosting/createProject'
+USER_SETTINGS = '/hosting/settings'
+PROJECT_MOVED = '/hosting/moved'
+GROUP_LIST = '/g/'
+GROUP_CREATE = '/hosting/createGroup'
+GROUP_DELETE = '/hosting/deleteGroup'
+
+# URLs of project pages
+SUMMARY = '/'  # Now just a redirect to /issues/list
+UPDATES_LIST = '/updates/list'
+PEOPLE_LIST = '/people/list'
+PEOPLE_DETAIL = '/people/detail'
+ADMIN_META = '/admin'
+ADMIN_ADVANCED = '/adminAdvanced'
+
+# URLs of user pages, relative to either /u/userid or /u/username
+# TODO(jrobbins): Add /u/userid as the canonical URL in metadata.
+USER_PROFILE = '/'
+USER_PROFILE_POLYMER = '/polymer'
+USER_CLEAR_BOUNCING = '/clearBouncing'
+BAN_USER = '/ban'
+BAN_SPAMMER = '/banSpammer'
+
+# URLs for User Updates pages
+USER_UPDATES_PROJECTS = '/updates/projects'
+USER_UPDATES_DEVELOPERS = '/updates/developers'
+USER_UPDATES_MINE = '/updates'
+
+# URLs of user group pages, relative to /g/groupname.
+GROUP_DETAIL = '/'
+GROUP_ADMIN = '/groupadmin'
+
+# URLs of issue tracker backend request handlers.  Called from the frontends.
+BACKEND_SEARCH = '/_backend/search'
+BACKEND_NONVIEWABLE = '/_backend/nonviewable'
+
+# URLs of task queue request handlers.  Called asynchronously from frontends.
+RECOMPUTE_DERIVED_FIELDS_TASK = '/_task/recomputeDerivedFields'
+NOTIFY_ISSUE_CHANGE_TASK = '/_task/notifyIssueChange'
+NOTIFY_BLOCKING_CHANGE_TASK = '/_task/notifyBlockingChange'
+NOTIFY_BULK_CHANGE_TASK = '/_task/notifyBulkEdit'
+NOTIFY_APPROVAL_CHANGE_TASK = '/_task/notifyApprovalChange'
+NOTIFY_RULES_DELETED_TASK = '/_task/notifyRulesDeleted'
+OUTBOUND_EMAIL_TASK = '/_task/outboundEmail'
+SPAM_DATA_EXPORT_TASK = '/_task/spamDataExport'
+BAN_SPAMMER_TASK = '/_task/banSpammer'
+ISSUE_DATE_ACTION_TASK = '/_task/issueDateAction'
+COMPONENT_DATA_EXPORT_TASK = '/_task/componentDataExportTask'
+SEND_WIPEOUT_USER_LISTS_TASK = '/_task/sendWipeoutUserListsTask'
+DELETE_WIPEOUT_USERS_TASK = '/_task/deleteWipeoutUsersTask'
+DELETE_USERS_TASK = '/_task/deleteUsersTask'
+
+# URL for publishing issue changes to a pubsub topic.
+PUBLISH_PUBSUB_ISSUE_CHANGE_TASK = '/_task/publishPubsubIssueChange'
+
+# URL for manually triggered FLT launch issue conversion job.
+FLT_ISSUE_CONVERSION_TASK = '/_task/fltConversionTask'
+
+# URLs of cron job request handlers.  Called from GAE via cron.yaml.
+REINDEX_QUEUE_CRON = '/_cron/reindexQueue'
+RAMCACHE_CONSOLIDATE_CRON = '/_cron/ramCacheConsolidate'
+REAP_CRON = '/_cron/reap'
+SPAM_DATA_EXPORT_CRON = '/_cron/spamDataExport'
+LOAD_API_CLIENT_CONFIGS_CRON = '/_cron/loadApiClientConfigs'
+TRIM_VISITED_PAGES_CRON = '/_cron/trimVisitedPages'
+DATE_ACTION_CRON = '/_cron/dateAction'
+SPAM_TRAINING_CRON = '/_cron/spamTraining'
+COMPONENT_DATA_EXPORT_CRON = '/_cron/componentDataExport'
+WIPEOUT_SYNC_CRON = '/_cron/wipeoutSync'
+
+# URLs of handlers needed for GAE instance management.
+WARMUP = '/_ah/warmup'
+START = '/_ah/start'
+STOP = '/_ah/stop'
+
+# URLs of User pages
+SAVED_QUERIES = '/queries'
+DASHBOARD = '/dashboard'
+HOTLISTS = '/hotlists'
+
+# URLS of User hotlist pages
+HOTLIST_ISSUES = ''
+HOTLIST_ISSUES_CSV = '/csv'
+HOTLIST_PEOPLE = '/people'
+HOTLIST_DETAIL = '/details'
+HOTLIST_RERANK_JSON = '/rerank'
+
+# URLs of issue tracker project pages
+ISSUE_APPROVAL = '/issues/approval'
+ISSUE_LIST = '/issues/list'
+ISSUE_LIST_NEW_TEMP = '/issues/list_new'
+ISSUE_DETAIL = '/issues/detail'
+ISSUE_DETAIL_LEGACY = '/issues/detail_ezt'
+ISSUE_DETAIL_FLIPPER_NEXT = '/issues/detail/next'
+ISSUE_DETAIL_FLIPPER_PREV = '/issues/detail/previous'
+ISSUE_DETAIL_FLIPPER_LIST = '/issues/detail/list'
+ISSUE_DETAIL_FLIPPER_INDEX = '/issues/detail/flipper'
+ISSUE_WIZARD = '/issues/wizard'
+ISSUE_ENTRY = '/issues/entry'
+ISSUE_ENTRY_NEW = '/issues/entry_new'
+ISSUE_ENTRY_AFTER_LOGIN = '/issues/entryafterlogin'
+ISSUE_BULK_EDIT = '/issues/bulkedit'
+ISSUE_ADVSEARCH = '/issues/advsearch'
+ISSUE_TIPS = '/issues/searchtips'
+ISSUE_ATTACHMENT = '/issues/attachment'
+ISSUE_ATTACHMENT_TEXT = '/issues/attachmentText'
+ISSUE_LIST_CSV = '/issues/csv'
+COMPONENT_CREATE = '/components/create'
+COMPONENT_DETAIL = '/components/detail'
+FIELD_CREATE = '/fields/create'
+FIELD_DETAIL = '/fields/detail'
+TEMPLATE_CREATE ='/templates/create'
+TEMPLATE_DETAIL = '/templates/detail'
+WIKI_LIST = '/w/list'  # Wiki urls are just redirects to project.docs_url
+WIKI_PAGE = '/wiki/<wiki_page:.*>'
+SOURCE_PAGE = '/source/<source_page:.*>'
+ADMIN_INTRO = '/adminIntro'
+# TODO(jrobbins): move some editing from /admin to /adminIntro.
+ADMIN_COMPONENTS = '/adminComponents'
+ADMIN_LABELS = '/adminLabels'
+ADMIN_RULES = '/adminRules'
+ADMIN_TEMPLATES = '/adminTemplates'
+ADMIN_STATUSES = '/adminStatuses'
+ADMIN_VIEWS = '/adminViews'
+ADMIN_EXPORT = '/projectExport'
+ADMIN_EXPORT_JSON = '/projectExport/json'
+ISSUE_ORIGINAL = '/issues/original'
+ISSUE_REINDEX = '/issues/reindex'
+ISSUE_EXPORT = '/issues/export'
+ISSUE_EXPORT_JSON = '/issues/export/json'
+ISSUE_IMPORT = '/issues/import'
+
+# URLs for hotlist features
+HOTLIST_CREATE = '/hosting/createHotlist'
+
+# URLs of site-wide pages referenced from the framework directory.
+CAPTCHA_QUESTION = '/hosting/captcha'
+EXCESSIVE_ACTIVITY = '/hosting/excessiveActivity'
+BANNED = '/hosting/noAccess'
+CLIENT_MON = '/_/clientmon'
+TS_MON_JS = '/_/jstsmon'
+
+CSP_REPORT = '/csp'
+
+SPAM_MODERATION_QUEUE = '/spamqueue'
diff --git a/framework/validate.py b/framework/validate.py
new file mode 100644
index 0000000..ee26396
--- /dev/null
+++ b/framework/validate.py
@@ -0,0 +1,112 @@
+# 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
+
+"""A set of Python input field validators."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import re
+
+# RFC 2821-compliant email address regex
+#
+# Please see sections "4.1.2 Command Argument Syntax" and
+# "4.1.3 Address Literals" of:  http://www.faqs.org/rfcs/rfc2821.html
+#
+# The following implementation is still a subset of RFC 2821.  Fully
+# double-quoted <user> parts are not supported (since the RFC discourages
+# their use anyway), and using the backslash to escape other characters
+# that are normally invalid, such as commas, is not supported.
+#
+# The groups in this regular expression are:
+#
+# <user>: all of the valid non-quoted portion of the email address before
+#   the @ sign (not including the @ sign)
+#
+# <domain>: all of the domain name between the @ sign (but not including it)
+#   and the dot before the TLD (but not including that final dot)
+#
+# <tld>: the top-level domain after the last dot (but not including that
+#   final dot)
+#
+_RFC_2821_EMAIL_REGEX = r"""(?x)
+  (?P<user>
+    # Part of the username that comes before any dots that may occur in it.
+    # At least one of the listed non-dot characters is required before the
+    # first dot.
+    [-a-zA-Z0-9!#$%&'*+/=?^_`{|}~]+
+
+    # Remaining part of the username that starts with the dot and
+    # which may have other dots, if such a part exists.  Only one dot
+    # is permitted between each "Atom", and a trailing dot is not permitted.
+    (?:[.][-a-zA-Z0-9!#$%&'*+/=?^_`{|}~]+)*
+  )
+
+  # Domain name, where subdomains are allowed.  Also, dashes are allowed
+  # given that they are preceded and followed by at least one character.
+  @(?P<domain>
+    (?:[0-9a-zA-Z]       # at least one non-dash
+       (?:[-]*           # plus zero or more dashes
+          [0-9a-zA-Z]+   # plus at least one non-dash
+       )*                # zero or more of dashes followed by non-dashes
+    )                    # one required domain part (may be a sub-domain)
+
+    (?:\.                # dot separator before additional sub-domain part
+       [0-9a-zA-Z]       # at least one non-dash
+       (?:[-]*           # plus zero or more dashes
+          [0-9a-zA-Z]+   # plus at least one non-dash
+       )*                # zero or more of dashes followed by non-dashes
+    )*                   # at least one sub-domain part and a dot
+   )
+  \.                     # dot separator before TLD
+
+  # TLD, the part after 'usernames@domain.' which can consist of 2-9
+  # letters.
+  (?P<tld>[a-zA-Z]{2,9})
+  """
+
+# object used with <re>.search() or <re>.sub() to find email addresses
+# within a string (or with <re>.match() to find email addresses at the
+# beginning of a string that may be followed by trailing characters,
+# since <re>.match() implicitly anchors at the beginning of the string)
+RE_EMAIL_SEARCH = re.compile(_RFC_2821_EMAIL_REGEX)
+
+# object used with <re>.match to find strings that contain *only* a single
+# email address (by adding the end-of-string anchor $)
+RE_EMAIL_ONLY = re.compile('^%s$' % _RFC_2821_EMAIL_REGEX)
+
+_SCHEME_PATTERN = r'(?:https?|ftp)://'
+_SHORT_HOST_PATTERN = (
+    r'(?=[a-zA-Z])[-a-zA-Z0-9]*[a-zA-Z0-9](:[0-9]+)?'
+    r'/'  # Slash is manditory for short host names.
+    r'[^\s]*'
+    )
+_DOTTED_HOST_PATTERN = (
+    r'[-a-zA-Z0-9.]+\.[a-zA-Z]{2,9}(:[0-9]+)?'
+    r'(/[^\s]*)?'
+    )
+_URL_REGEX = r'%s(%s|%s)' % (
+    _SCHEME_PATTERN, _SHORT_HOST_PATTERN, _DOTTED_HOST_PATTERN)
+
+# A more complete URL regular expression based on a combination of the
+# existing _URL_REGEX and the pattern found for URI regular expressions
+# found in the URL RFC document. It's detailed here:
+# http://www.ietf.org/rfc/rfc2396.txt
+RE_COMPLEX_URL = re.compile(r'^%s(\?([^# ]*))?(#(.*))?$' % _URL_REGEX)
+
+
+def IsValidEmail(s):
+  """Return true iff the string is a properly formatted email address."""
+  return RE_EMAIL_ONLY.match(s)
+
+
+def IsValidMailTo(s):
+  """Return true iff the string is a properly formatted mailto:."""
+  return s.startswith('mailto:') and RE_EMAIL_ONLY.match(s[7:])
+
+
+def IsValidURL(s):
+  """Return true iff the string is a properly formatted web or ftp URL."""
+  return RE_COMPLEX_URL.match(s)
diff --git a/framework/warmup.py b/framework/warmup.py
new file mode 100644
index 0000000..ef8a53d
--- /dev/null
+++ b/framework/warmup.py
@@ -0,0 +1,51 @@
+# Copyright 2017 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
+
+"""A class to handle the initial warmup request from AppEngine."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from framework import jsonfeed
+
+
+class Warmup(jsonfeed.InternalTask):
+  """Placeholder for warmup work.  Used only to enable min_idle_instances."""
+
+  def HandleRequest(self, _mr):
+    """Don't do anything that could cause a jam when many instances start."""
+    logging.info('/_ah/startup does nothing in Monorail.')
+    logging.info('However it is needed for min_idle_instances in app.yaml.')
+
+    return {
+      'success': 1,
+      }
+
+class Start(jsonfeed.InternalTask):
+  """Placeholder for start work.  Used only to enable manual_scaling."""
+
+  def HandleRequest(self, _mr):
+    """Don't do anything that could cause a jam when many instances start."""
+    logging.info('/_ah/start does nothing in Monorail.')
+    logging.info('However it is needed for manual_scaling in app.yaml.')
+
+    return {
+      'success': 1,
+      }
+
+
+class Stop(jsonfeed.InternalTask):
+  """Placeholder for stop work.  Used only to enable manual_scaling."""
+
+  def HandleRequest(self, _mr):
+    """Don't do anything that could cause a jam when many instances start."""
+    logging.info('/_ah/stop does nothing in Monorail.')
+    logging.info('However it is needed for manual_scaling in app.yaml.')
+
+    return {
+      'success': 1,
+      }
diff --git a/framework/xsrf.py b/framework/xsrf.py
new file mode 100644
index 0000000..75581ef
--- /dev/null
+++ b/framework/xsrf.py
@@ -0,0 +1,138 @@
+# 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
+
+"""Utility routines for avoiding cross-site-request-forgery."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import base64
+import hmac
+import logging
+import time
+
+# This is a file in the top-level directory that you must edit before deploying
+import settings
+from framework import framework_constants
+from services import secrets_svc
+
+# This is how long tokens are valid.
+TOKEN_TIMEOUT_SEC = 2 * framework_constants.SECS_PER_HOUR
+
+# The token refresh servlet accepts old tokens to generate new ones, but
+# we still impose a limit on how old they can be.
+REFRESH_TOKEN_TIMEOUT_SEC = 10 * framework_constants.SECS_PER_DAY
+
+# When the JS on a page decides whether or not it needs to refresh the
+# XSRF token before submitting a form, there could be some clock skew,
+# so we subtract a little time to avoid having the JS use an existing
+# token that the server might consider expired already.
+TOKEN_TIMEOUT_MARGIN_SEC = 5 * framework_constants.SECS_PER_MINUTE
+
+# When checking that the token is not from the future, allow a little
+# margin for the possibliity that the clock of the GAE instance that
+# generated the token could be a little ahead of the one checking.
+CLOCK_SKEW_SEC = 5
+
+# Form tokens and issue stars are limited to only work with the specific
+# servlet path for the servlet that processes them.  There are several
+# XHR handlers that mainly read data without making changes, so we just
+# use 'xhr' with all of them.
+XHR_SERVLET_PATH = 'xhr'
+
+
+DELIMITER = ':'
+
+
+def GenerateToken(user_id, servlet_path, token_time=None):
+  """Return a security token specifically for the given user.
+
+  Args:
+    user_id: int user ID of the user viewing an HTML form.
+    servlet_path: string URI path to limit the use of the token.
+    token_time: Time at which the token is generated in seconds since the epoch.
+
+  Returns:
+    A url-safe security token.  The token is a string with the digest
+    the user_id and time, followed by plain-text copy of the time that is
+    used in validation.
+
+  Raises:
+    ValueError: if the XSRF secret was not configured.
+  """
+  token_time = token_time or int(time.time())
+  digester = hmac.new(secrets_svc.GetXSRFKey())
+  digester.update(str(user_id))
+  digester.update(DELIMITER)
+  digester.update(servlet_path)
+  digester.update(DELIMITER)
+  digester.update(str(token_time))
+  digest = digester.digest()
+
+  token = base64.urlsafe_b64encode('%s%s%d' % (digest, DELIMITER, token_time))
+  return token
+
+
+def ValidateToken(
+  token, user_id, servlet_path, timeout=TOKEN_TIMEOUT_SEC):
+  """Return True if the given token is valid for the given scope.
+
+  Args:
+    token: String token that was presented by the user.
+    user_id: int user ID.
+    servlet_path: string URI path to limit the use of the token.
+
+  Raises:
+    TokenIncorrect: if the token is missing or invalid.
+  """
+  if not token:
+    raise TokenIncorrect('missing token')
+
+  try:
+    decoded = base64.urlsafe_b64decode(str(token))
+    token_time = int(decoded.split(DELIMITER)[-1])
+  except (TypeError, ValueError):
+    raise TokenIncorrect('could not decode token')
+  now = int(time.time())
+
+  # The given token should match the generated one with the same time.
+  expected_token = GenerateToken(user_id, servlet_path, token_time=token_time)
+  if len(token) != len(expected_token):
+    raise TokenIncorrect('presented token is wrong size')
+
+  # Perform constant time comparison to avoid timing attacks
+  different = 0
+  for x, y in zip(token, expected_token):
+    different |= ord(x) ^ ord(y)
+  if different:
+    raise TokenIncorrect(
+        'presented token does not match expected token: %r != %r' % (
+            token, expected_token))
+
+  # We reject tokens from the future.
+  if token_time > now + CLOCK_SKEW_SEC:
+    raise TokenIncorrect('token is from future')
+
+  # We check expiration last so that we only raise the expriration error
+  # if the token would have otherwise been valid.
+  if now - token_time > timeout:
+    raise TokenIncorrect('token has expired')
+
+
+def TokenExpiresSec():
+  """Return timestamp when current tokens will expire, minus a safety margin."""
+  now = int(time.time())
+  return now + TOKEN_TIMEOUT_SEC - TOKEN_TIMEOUT_MARGIN_SEC
+
+
+class Error(Exception):
+  """Base class for errors from this module."""
+  pass
+
+
+# Caught separately in servlet.py
+class TokenIncorrect(Error):
+  """The POST body has an incorrect URL Command Attack token."""
+  pass
diff --git a/gae.py b/gae.py
new file mode 120000
index 0000000..92451c2
--- /dev/null
+++ b/gae.py
@@ -0,0 +1 @@
+../../../infra/luci/appengine/components/tools/gae.py
\ No newline at end of file
diff --git a/gae_ts_mon b/gae_ts_mon
new file mode 120000
index 0000000..822e4ad
--- /dev/null
+++ b/gae_ts_mon
@@ -0,0 +1 @@
+../../../infra/appengine_module/gae_ts_mon
\ No newline at end of file
diff --git a/google/api/field_behavior.proto b/google/api/field_behavior.proto
new file mode 100644
index 0000000..540dbb9
--- /dev/null
+++ b/google/api/field_behavior.proto
@@ -0,0 +1,79 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/protobuf/descriptor.proto";
+
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "FieldBehaviorProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+extend google.protobuf.FieldOptions {
+  // A designation of a specific field behavior (required, output only, etc.)
+  // in protobuf messages.
+  //
+  // Examples:
+  //
+  //   string name = 1 [(google.api.field_behavior) = REQUIRED];
+  //   State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
+  //   google.protobuf.Duration ttl = 1
+  //     [(google.api.field_behavior) = INPUT_ONLY];
+  //   google.protobuf.Timestamp expire_time = 1
+  //     [(google.api.field_behavior) = OUTPUT_ONLY,
+  //      (google.api.field_behavior) = IMMUTABLE];
+  repeated google.api.FieldBehavior field_behavior = 1052;
+}
+
+// An indicator of the behavior of a given field (for example, that a field
+// is required in requests, or given as output but ignored as input).
+// This **does not** change the behavior in protocol buffers itself; it only
+// denotes the behavior and may affect how API tooling handles the field.
+//
+// Note: This enum **may** receive new values in the future.
+enum FieldBehavior {
+  // Conventional default for enums. Do not use this.
+  FIELD_BEHAVIOR_UNSPECIFIED = 0;
+
+  // Specifically denotes a field as optional.
+  // While all fields in protocol buffers are optional, this may be specified
+  // for emphasis if appropriate.
+  OPTIONAL = 1;
+
+  // Denotes a field as required.
+  // This indicates that the field **must** be provided as part of the request,
+  // and failure to do so will cause an error (usually `INVALID_ARGUMENT`).
+  REQUIRED = 2;
+
+  // Denotes a field as output only.
+  // This indicates that the field is provided in responses, but including the
+  // field in a request does nothing (the server *must* ignore it and
+  // *must not* throw an error as a result of the field's presence).
+  OUTPUT_ONLY = 3;
+
+  // Denotes a field as input only.
+  // This indicates that the field is provided in requests, and the
+  // corresponding field is not included in output.
+  INPUT_ONLY = 4;
+
+  // Denotes a field as immutable.
+  // This indicates that the field may be set once in a request to create a
+  // resource, but may not be changed thereafter.
+  IMMUTABLE = 5;
+}
\ No newline at end of file
diff --git a/google/api/resource.proto b/google/api/resource.proto
new file mode 100644
index 0000000..96c83b2
--- /dev/null
+++ b/google/api/resource.proto
@@ -0,0 +1,264 @@
+// Copyright 2019 Google LLC.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+syntax = "proto3";
+
+package google.api;
+
+import "google/protobuf/descriptor.proto";
+
+option cc_enable_arenas = true;
+option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations";
+option java_multiple_files = true;
+option java_outer_classname = "ResourceProto";
+option java_package = "com.google.api";
+option objc_class_prefix = "GAPI";
+
+extend google.protobuf.FieldOptions {
+  // An annotation that describes a resource reference, see
+  // [ResourceReference][].
+  google.api.ResourceReference resource_reference = 1055;
+}
+
+extend google.protobuf.FileOptions {
+  // An annotation that describes a resource definition without a corresponding
+  // message; see [ResourceDescriptor][].
+  repeated google.api.ResourceDescriptor resource_definition = 1053;
+}
+
+extend google.protobuf.MessageOptions {
+  // An annotation that describes a resource definition, see
+  // [ResourceDescriptor][].
+  google.api.ResourceDescriptor resource = 1053;
+}
+
+// A simple descriptor of a resource type.
+//
+// ResourceDescriptor annotates a resource message (either by means of a
+// protobuf annotation or use in the service config), and associates the
+// resource's schema, the resource type, and the pattern of the resource name.
+//
+// Example:
+//
+//     message Topic {
+//       // Indicates this message defines a resource schema.
+//       // Declares the resource type in the format of {service}/{kind}.
+//       // For Kubernetes resources, the format is {api group}/{kind}.
+//       option (google.api.resource) = {
+//         type: "pubsub.googleapis.com/Topic"
+//         name_descriptor: {
+//           pattern: "projects/{project}/topics/{topic}"
+//           parent_type: "cloudresourcemanager.googleapis.com/Project"
+//           parent_name_extractor: "projects/{project}"
+//         }
+//       };
+//     }
+//
+// The ResourceDescriptor Yaml config will look like:
+//
+//    resources:
+//    - type: "pubsub.googleapis.com/Topic"
+//      name_descriptor:
+//        - pattern: "projects/{project}/topics/{topic}"
+//          parent_type: "cloudresourcemanager.googleapis.com/Project"
+//          parent_name_extractor: "projects/{project}"
+//
+// Sometimes, resources have multiple patterns, typically because they can
+// live under multiple parents.
+//
+// Example:
+//
+//     message LogEntry {
+//       option (google.api.resource) = {
+//         type: "logging.googleapis.com/LogEntry"
+//         name_descriptor: {
+//           pattern: "projects/{project}/logs/{log}"
+//           parent_type: "cloudresourcemanager.googleapis.com/Project"
+//           parent_name_extractor: "projects/{project}"
+//         }
+//         name_descriptor: {
+//           pattern: "folders/{folder}/logs/{log}"
+//           parent_type: "cloudresourcemanager.googleapis.com/Folder"
+//           parent_name_extractor: "folders/{folder}"
+//         }
+//         name_descriptor: {
+//           pattern: "organizations/{organization}/logs/{log}"
+//           parent_type: "cloudresourcemanager.googleapis.com/Organization"
+//           parent_name_extractor: "organizations/{organization}"
+//         }
+//         name_descriptor: {
+//           pattern: "billingAccounts/{billing_account}/logs/{log}"
+//           parent_type: "billing.googleapis.com/BillingAccount"
+//           parent_name_extractor: "billingAccounts/{billing_account}"
+//         }
+//       };
+//     }
+//
+// The ResourceDescriptor Yaml config will look like:
+//
+//     resources:
+//     - type: 'logging.googleapis.com/LogEntry'
+//       name_descriptor:
+//         - pattern: "projects/{project}/logs/{log}"
+//           parent_type: "cloudresourcemanager.googleapis.com/Project"
+//           parent_name_extractor: "projects/{project}"
+//         - pattern: "folders/{folder}/logs/{log}"
+//           parent_type: "cloudresourcemanager.googleapis.com/Folder"
+//           parent_name_extractor: "folders/{folder}"
+//         - pattern: "organizations/{organization}/logs/{log}"
+//           parent_type: "cloudresourcemanager.googleapis.com/Organization"
+//           parent_name_extractor: "organizations/{organization}"
+//         - pattern: "billingAccounts/{billing_account}/logs/{log}"
+//           parent_type: "billing.googleapis.com/BillingAccount"
+//           parent_name_extractor: "billingAccounts/{billing_account}"
+//
+// For flexible resources, the resource name doesn't contain parent names, but
+// the resource itself has parents for policy evaluation.
+//
+// Example:
+//
+//     message Shelf {
+//       option (google.api.resource) = {
+//         type: "library.googleapis.com/Shelf"
+//         name_descriptor: {
+//           pattern: "shelves/{shelf}"
+//           parent_type: "cloudresourcemanager.googleapis.com/Project"
+//         }
+//         name_descriptor: {
+//           pattern: "shelves/{shelf}"
+//           parent_type: "cloudresourcemanager.googleapis.com/Folder"
+//         }
+//       };
+//     }
+//
+// The ResourceDescriptor Yaml config will look like:
+//
+//     resources:
+//     - type: 'library.googleapis.com/Shelf'
+//       name_descriptor:
+//         - pattern: "shelves/{shelf}"
+//           parent_type: "cloudresourcemanager.googleapis.com/Project"
+//         - pattern: "shelves/{shelf}"
+//           parent_type: "cloudresourcemanager.googleapis.com/Folder"
+message ResourceDescriptor {
+  // A description of the historical or future-looking state of the
+  // resource pattern.
+  enum History {
+    // The "unset" value.
+    HISTORY_UNSPECIFIED = 0;
+
+    // The resource originally had one pattern and launched as such, and
+    // additional patterns were added later.
+    ORIGINALLY_SINGLE_PATTERN = 1;
+
+    // The resource has one pattern, but the API owner expects to add more
+    // later. (This is the inverse of ORIGINALLY_SINGLE_PATTERN, and prevents
+    // that from being necessary once there are multiple patterns.)
+    FUTURE_MULTI_PATTERN = 2;
+  }
+
+  // The resource type. It must be in the format of
+  // {service_name}/{resource_type_kind}. The `resource_type_kind` must be
+  // singular and must not include version numbers.
+  //
+  // Example: `storage.googleapis.com/Bucket`
+  //
+  // The value of the resource_type_kind must follow the regular expression
+  // /[A-Za-z][a-zA-Z0-9]+/. It should start with an upper case character and
+  // should use PascalCase (UpperCamelCase). The maximum number of
+  // characters allowed for the `resource_type_kind` is 100.
+  string type = 1;
+
+  // Optional. The relative resource name pattern associated with this resource
+  // type. The DNS prefix of the full resource name shouldn't be specified here.
+  //
+  // The path pattern must follow the syntax, which aligns with HTTP binding
+  // syntax:
+  //
+  //     Template = Segment { "/" Segment } ;
+  //     Segment = LITERAL | Variable ;
+  //     Variable = "{" LITERAL "}" ;
+  //
+  // Examples:
+  //
+  //     - "projects/{project}/topics/{topic}"
+  //     - "projects/{project}/knowledgeBases/{knowledge_base}"
+  //
+  // The components in braces correspond to the IDs for each resource in the
+  // hierarchy. It is expected that, if multiple patterns are provided,
+  // the same component name (e.g. "project") refers to IDs of the same
+  // type of resource.
+  repeated string pattern = 2;
+
+  // Optional. The field on the resource that designates the resource name
+  // field. If omitted, this is assumed to be "name".
+  string name_field = 3;
+
+  // Optional. The historical or future-looking state of the resource pattern.
+  //
+  // Example:
+  //
+  //     // The InspectTemplate message originally only supported resource
+  //     // names with organization, and project was added later.
+  //     message InspectTemplate {
+  //       option (google.api.resource) = {
+  //         type: "dlp.googleapis.com/InspectTemplate"
+  //         pattern:
+  //         "organizations/{organization}/inspectTemplates/{inspect_template}"
+  //         pattern: "projects/{project}/inspectTemplates/{inspect_template}"
+  //         history: ORIGINALLY_SINGLE_PATTERN
+  //       };
+  //     }
+  History history = 4;
+
+  // The plural name used in the resource name, such as 'projects' for
+  // the name of 'projects/{project}'. It is the same concept of the `plural`
+  // field in k8s CRD spec
+  // https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
+  string plural = 5;
+
+  // The same concept of the `singular` field in k8s CRD spec
+  // https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions/
+  // Such as "project" for the `resourcemanager.googleapis.com/Project` type.
+  string singular = 6;
+}
+
+// Defines a proto annotation that describes a string field that refers to
+// an API resource.
+message ResourceReference {
+  // The resource type that the annotated field references.
+  //
+  // Example:
+  //
+  //     message Subscription {
+  //       string topic = 2 [(google.api.resource_reference) = {
+  //         type: "pubsub.googleapis.com/Topic"
+  //       }];
+  //     }
+  string type = 1;
+
+  // The resource type of a child collection that the annotated field
+  // references. This is useful for annotating the `parent` field that
+  // doesn't have a fixed resource type.
+  //
+  // Example:
+  //
+  //   message ListLogEntriesRequest {
+  //     string parent = 1 [(google.api.resource_reference) = {
+  //       child_type: "logging.googleapis.com/LogEntry"
+  //     };
+  //   }
+  string child_type = 2;
+}
\ No newline at end of file
diff --git a/jsconfig.json b/jsconfig.json
new file mode 100644
index 0000000..abebe19
--- /dev/null
+++ b/jsconfig.json
@@ -0,0 +1,9 @@
+{
+  "compilerOptions": {
+    "baseUrl": "static_src",
+    "checkJs": true,
+    "moduleResolution": "node",
+    "target": "es2015"
+  },
+  "include": ["static_src/**/*"]
+}
diff --git a/karma.conf.js b/karma.conf.js
new file mode 100644
index 0000000..0a12584
--- /dev/null
+++ b/karma.conf.js
@@ -0,0 +1,209 @@
+/* Copyright 2019 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.
+ */
+
+const path = require('path');
+
+process.env.CHROME_BIN = require('puppeteer').executablePath();
+
+module.exports = function(config) {
+  const isDebug = process.argv.some((arg) => arg === '--debug');
+  const coverage = process.argv.some((arg) => arg === '--coverage');
+  config.set({
+
+    // base path that will be used to resolve all patterns (eg. files, exclude)
+    basePath: '',
+
+
+    client: {
+      mocha: {
+        reporter: 'html',
+        ui: 'bdd',
+        checkLeaks: true,
+        globals: [
+          'CS_env',
+          // __tsMonClient probably shouldn't be allowed to
+          // leak between tests, but locating the current source of these
+          // leaks has proven quite difficult.
+          '__tsMonClient',
+          'ga',
+          'Color',
+          'Chart',
+          // TODO(ehmaldonado): Remove once the old autocomplete code is
+          // deprecated.
+          'TKR_populateAutocomplete',
+          // All of the below are necessary for loading gapi.js.
+          'gapi',
+          '__gapiLoadPromise',
+          '___jsl',
+          'osapi',
+          'gadgets',
+          'shindig',
+          'googleapis',
+          'iframer',
+          'ToolbarApi',
+          'iframes',
+          'IframeBase',
+          'Iframe',
+          'IframeProxy',
+          'IframeWindow',
+          '__gapi_jstiming__',
+        ],
+        timeout: 5000,
+      },
+    },
+
+    mochaReporter: {
+      showDiff: true,
+    },
+
+
+    // frameworks to use
+    // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
+    frameworks: ['parallel', 'mocha', 'sinon'],
+
+
+    // list of files / patterns to load in the browser
+    files: [
+      'static_src/test/setup.js',
+      'static_src/test/index.js',
+    ],
+
+
+    // list of files / patterns to exclude
+    exclude: [
+    ],
+
+
+    // preprocess matching files before serving them to the browser
+    // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
+    preprocessors: {
+      'static_src/test/setup.js': ['webpack', 'sourcemap'],
+      'static_src/test/index.js': ['webpack', 'sourcemap'],
+    },
+
+    plugins: [
+      'karma-chrome-launcher',
+      'karma-coverage',
+      'karma-mocha',
+      'karma-mocha-reporter',
+      'karma-parallel',
+      'karma-sinon',
+      'karma-sourcemap-loader',
+      'karma-webpack',
+      '@chopsui/karma-reporter',
+    ],
+
+    parallelOptions: {
+      // Our builder is on a VM with 8 CPUs, so force this
+      // to run the same number of shards locally too.
+      // Vary this number to stress test order dependencies.
+      executors: isDebug ? 1 : 7, // Defaults to cpu-count - 1
+      shardStrategy: 'round-robin',
+    },
+
+    webpack: {
+      // webpack configuration
+      devtool: 'inline-source-map',
+      mode: 'development',
+      resolve: {
+        modules: ['node_modules', 'static_src'],
+      },
+      module: {
+        rules: [
+          {
+            test: /\.(ts|tsx)$/,
+            exclude: /node_modules/,
+            use: ['babel-loader'],
+          },
+          {
+            test: /\.js$/,
+            loader: 'istanbul-instrumenter-loader',
+            include: path.resolve('static_src/'),
+            exclude: [/\.test.(js|ts|tsx)$/],
+            query: {esModules: true},
+          },
+          {
+            test: /\.css$/i,
+            use: [
+              {loader: 'style-loader', options: {injectType: 'styleTag'}},
+              {
+                loader: 'css-loader',
+                options: {
+                  modules: true,
+                  importLoaders: 1,
+                },
+              },
+              'postcss-loader',
+            ],
+          },
+        ],
+      },
+    },
+
+
+    // test results reporter to use
+    // possible values: 'dots', 'progress'
+    // available reporters: https://npmjs.org/browse/keyword/karma-reporter
+    reporters: ['mocha', 'chopsui-json'].concat(
+      coverage ? ['coverage'] : []),
+
+
+    // configure coverage reporter
+    coverageReporter: {
+      dir: 'coverage',
+      reporters: [
+        {type: 'lcovonly', subdir: '.'},
+        {type: 'json', subdir: '.', file: 'coverage.json'},
+        {type: 'html'},
+        {type: 'text'},
+      ],
+    },
+
+    chopsUiReporter: {
+      stdout: false,
+      buildNumber: String(new Date().getTime()),
+      outputFile: 'full_results.json',
+    },
+
+    // web server port
+    port: 9876,
+
+
+    // enable / disable colors in the output (reporters and logs)
+    colors: true,
+
+
+    // level of logging
+    // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
+    logLevel: config.LOG_INFO,
+
+
+    // enable / disable watching file and executing tests whenever any file changes
+    autoWatch: true,
+
+
+    // start these browsers
+    // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
+    browsers: isDebug ? ['Chrome_latest'] : ['ChromeHeadless'],
+
+
+    customLaunchers: {
+      Chrome_latest: {
+        base: 'Chrome',
+        version: 'latest',
+      },
+    },
+
+
+    // Continuous Integration mode
+    // if true, Karma captures browsers, runs the tests and exits
+    singleRun: isDebug ? false : true,
+
+    // Concurrency level
+    // how many browser should be started simultaneous
+    concurrency: Infinity,
+  });
+};
diff --git a/module-api.yaml.m4 b/module-api.yaml.m4
new file mode 100644
index 0000000..b865d5b
--- /dev/null
+++ b/module-api.yaml.m4
@@ -0,0 +1,88 @@
+# Copyright 2019 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
+
+service: api
+runtime: python27
+api_version: 1
+threadsafe: no
+
+define(`_VERSION', `syscmd(`echo $_VERSION')')
+
+ifdef(`PROD', `
+instance_class: F4
+automatic_scaling:
+  min_idle_instances: 25
+  max_pending_latency: 0.2s
+')
+
+ifdef(`STAGING', `
+instance_class: F4
+automatic_scaling:
+  min_idle_instances: 5
+  max_pending_latency: 0.2s
+')
+
+ifdef(`DEV', `
+instance_class: F4
+automatic_scaling:
+  min_idle_instances: 5
+')
+
+handlers:
+- url: /prpc/.*
+  script: monorailapp.app
+  secure: always
+- url: /_ah/warmup
+  script: monorailapp.app
+  login: admin
+
+inbound_services:
+ifdef(`PROD', `
+- warmup
+')
+ifdef(`STAGING', `
+- warmup
+')
+
+libraries:
+- name: endpoints
+  version: 1.0
+- name: grpcio
+  version: 1.0.0
+- name: MySQLdb
+  version: "latest"
+- name: ssl  # needed for google.auth.transport
+  version: "2.7.11"
+
+includes:
+- gae_ts_mon
+
+env_variables:
+  VERSION_ID: '_VERSION'
+  GAE_USE_SOCKETS_HTTPLIB : ''
+
+vpc_access_connector:
+ifdef(`DEV',`
+  name: "projects/monorail-dev/locations/us-central1/connectors/redis-connector"
+')
+ifdef(`STAGING',`
+  name: "projects/monorail-staging/locations/us-central1/connectors/redis-connector"
+')
+ifdef(`PROD', `
+  name: "projects/monorail-prod/locations/us-central1/connectors/redis-connector"
+')
+
+skip_files:
+- ^(.*/)?#.*#$
+- ^(.*/)?.*~$
+- ^(.*/)?.*\.py[co]$
+- ^(.*/)?.*/RCS/.*$
+- ^(.*/)?\..*$
+- node_modules/
+- static/
+- schema/
+- doc/
+- tools/
+- venv/
diff --git a/module-besearch.yaml.m4 b/module-besearch.yaml.m4
new file mode 100644
index 0000000..9a62871
--- /dev/null
+++ b/module-besearch.yaml.m4
@@ -0,0 +1,90 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is govered by a BSD-style
+# license that can be found in the LICENSE file or at
+# https://developers.google.com/open-source/licenses/bsd
+
+define(`_VERSION', `syscmd(`echo $_VERSION')')
+
+service: besearch
+runtime: python27
+api_version: 1
+threadsafe: no
+
+ifdef(`PROD', `
+instance_class: F4
+automatic_scaling:
+  min_idle_instances: 40
+  max_pending_latency: 0.2s
+')
+
+ifdef(`STAGING', `
+instance_class: F4
+automatic_scaling:
+  min_idle_instances: 5
+  max_pending_latency: 0.2s
+')
+
+ifdef(`DEV', `
+instance_class: F4
+automatic_scaling:
+  min_idle_instances: 5
+')
+
+handlers:
+- url: /_ah/warmup
+  script: monorailapp.app
+  login: admin
+
+- url: /_backend/.*
+  script: monorailapp.app
+
+- url: /_ah/start
+  script: monorailapp.app
+  login: admin
+
+- url: /_ah/stop
+  script: monorailapp.app
+  login: admin
+
+ifdef(`PROD', `
+inbound_services:
+- warmup
+')
+ifdef(`STAGING', `
+inbound_services:
+- warmup
+')
+
+libraries:
+- name: endpoints
+  version: 1.0
+- name: grpcio
+  version: 1.0.0
+- name: MySQLdb
+  version: "latest"
+- name: ssl
+  version: latest
+
+env_variables:
+  VERSION_ID: '_VERSION'
+  GAE_USE_SOCKETS_HTTPLIB : ''
+
+vpc_access_connector:
+ifdef(`DEV',`
+  name: "projects/monorail-dev/locations/us-central1/connectors/redis-connector"
+')
+ifdef(`STAGING',`
+  name: "projects/monorail-staging/locations/us-central1/connectors/redis-connector"
+')
+ifdef(`PROD', `
+  name: "projects/monorail-prod/locations/us-central1/connectors/redis-connector"
+')
+
+skip_files:
+- ^(.*/)?#.*#$
+- ^(.*/)?.*~$
+- ^(.*/)?.*\.py[co]$
+- ^(.*/)?.*/RCS/.*$
+- ^(.*/)?\..*$
+- node_modules/
+- venv/
diff --git a/module-latency-insensitive.yaml.m4 b/module-latency-insensitive.yaml.m4
new file mode 100644
index 0000000..554562e
--- /dev/null
+++ b/module-latency-insensitive.yaml.m4
@@ -0,0 +1,100 @@
+# Copyright 2018 The Chromium Authors. All rights reserved.
+# Use of this source code is govered by a BSD-style
+# license that can be found in the LICENSE file or at
+# https://developers.google.com/open-source/licenses/bsd
+
+define(`_VERSION', `syscmd(`echo $_VERSION')')
+
+service: latency-insensitive
+runtime: python27
+api_version: 1
+threadsafe: no
+
+default_expiration: "3600d"
+
+ifdef(`PROD', `
+instance_class: F4
+automatic_scaling:
+  min_idle_instances: 5
+  max_pending_latency: 0.2s
+')
+
+ifdef(`STAGING', `
+instance_class: F4
+automatic_scaling:
+  min_idle_instances: 5
+  max_pending_latency: 0.2s
+')
+
+ifdef(`DEV', `
+instance_class: F4
+automatic_scaling:
+  min_idle_instances: 1
+')
+
+handlers:
+- url: /_ah/warmup
+  script: monorailapp.app
+  login: admin
+
+- url: /_ah/api/.*
+  script: monorailapp.endpoints
+
+- url: /_task/.*
+  script: monorailapp.app
+  login: admin
+
+- url: /_cron/.*
+  script: monorailapp.app
+  login: admin
+
+- url: /_ah/mail/.*
+  script: monorailapp.app
+  login: admin
+
+inbound_services:
+- mail
+- mail_bounce
+ifdef(`PROD', `
+- warmup
+')
+ifdef(`STAGING', `
+- warmup
+')
+
+libraries:
+- name: endpoints
+  version: 1.0
+- name: grpcio
+  version: 1.0.0
+- name: MySQLdb
+  version: "latest"
+- name: ssl
+  version: latest
+
+includes:
+- gae_ts_mon
+
+env_variables:
+  VERSION_ID: '_VERSION'
+  GAE_USE_SOCKETS_HTTPLIB: ''
+
+vpc_access_connector:
+ifdef(`DEV',`
+  name: "projects/monorail-dev/locations/us-central1/connectors/redis-connector"
+')
+ifdef(`STAGING',`
+  name: "projects/monorail-staging/locations/us-central1/connectors/redis-connector"
+')
+ifdef(`PROD', `
+  name: "projects/monorail-prod/locations/us-central1/connectors/redis-connector"
+')
+
+skip_files:
+- ^(.*/)?#.*#$
+- ^(.*/)?.*~$
+- ^(.*/)?.*\.py[co]$
+- ^(.*/)?.*/RCS/.*$
+- ^(.*/)?\..*$
+- node_modules/
+- venv/
diff --git a/monorailapp.py b/monorailapp.py
new file mode 100644
index 0000000..6d89472
--- /dev/null
+++ b/monorailapp.py
@@ -0,0 +1,47 @@
+# 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
+
+"""Main program for Monorail.
+
+Monorail is an issue tracking tool that is based on the code.google.com
+issue tracker, but it has been ported to Google AppEngine and Google Cloud SQL.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import webapp2
+
+from components import endpoints_webapp2
+
+import gae_ts_mon
+
+import registerpages
+from framework import sorting
+from services import api_svc_v1
+from services import service_manager
+
+
+services = service_manager.set_up_services()
+sorting.InitializeArtValues(services)
+registry = registerpages.ServletRegistry()
+app_routes = registry.Register(services)
+app = webapp2.WSGIApplication(
+    app_routes, config={'services': services})
+gae_ts_mon.initialize(app)
+
+endpoints = endpoints_webapp2.api_server(
+    [api_svc_v1.MonorailApi, api_svc_v1.ClientConfigApi])
+
+# TODO(crbug/monorail/8221): Remove this code during this milestone.
+# It only serves as a safe way to begin connecting to redis without risking
+# user facing problems.
+try:
+  logging.info('Starting initial redis connection verification.')
+  from framework import redis_utils
+  redis_utils.AsyncVerifyRedisConnection()
+except:  # pylint: disable=bare-except
+  logging.exception('Exception when instantiating redis connection.')
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 0000000..3ff3827
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,13670 @@
+{
+  "name": "monorail",
+  "version": "1.0.0",
+  "lockfileVersion": 1,
+  "requires": true,
+  "dependencies": {
+    "@babel/code-frame": {
+      "version": "7.12.13",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz",
+      "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==",
+      "requires": {
+        "@babel/highlight": "^7.12.13"
+      }
+    },
+    "@babel/compat-data": {
+      "version": "7.14.7",
+      "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.7.tgz",
+      "integrity": "sha512-nS6dZaISCXJ3+518CWiBfEr//gHyMO02uDxBkXTKZDN5POruCnOZ1N4YBRZDCabwF8nZMWBpRxIicmXtBs+fvw==",
+      "dev": true
+    },
+    "@babel/core": {
+      "version": "7.14.6",
+      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.6.tgz",
+      "integrity": "sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.14.5",
+        "@babel/generator": "^7.14.5",
+        "@babel/helper-compilation-targets": "^7.14.5",
+        "@babel/helper-module-transforms": "^7.14.5",
+        "@babel/helpers": "^7.14.6",
+        "@babel/parser": "^7.14.6",
+        "@babel/template": "^7.14.5",
+        "@babel/traverse": "^7.14.5",
+        "@babel/types": "^7.14.5",
+        "convert-source-map": "^1.7.0",
+        "debug": "^4.1.0",
+        "gensync": "^1.0.0-beta.2",
+        "json5": "^2.1.2",
+        "semver": "^6.3.0",
+        "source-map": "^0.5.0"
+      },
+      "dependencies": {
+        "@babel/code-frame": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
+          "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==",
+          "dev": true,
+          "requires": {
+            "@babel/highlight": "^7.14.5"
+          }
+        },
+        "@babel/generator": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.5.tgz",
+          "integrity": "sha512-y3rlP+/G25OIX3mYKKIOlQRcqj7YgrvHxOLbVmyLJ9bPmi5ttvUmpydVjcFjZphOktWuA7ovbx91ECloWTfjIA==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5",
+            "jsesc": "^2.5.1",
+            "source-map": "^0.5.0"
+          }
+        },
+        "@babel/helper-function-name": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz",
+          "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-get-function-arity": "^7.14.5",
+            "@babel/template": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-get-function-arity": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz",
+          "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-split-export-declaration": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz",
+          "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/highlight": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz",
+          "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "chalk": "^2.0.0",
+            "js-tokens": "^4.0.0"
+          }
+        },
+        "@babel/parser": {
+          "version": "7.14.7",
+          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.7.tgz",
+          "integrity": "sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==",
+          "dev": true
+        },
+        "@babel/template": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz",
+          "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.14.5",
+            "@babel/parser": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/traverse": {
+          "version": "7.14.7",
+          "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.7.tgz",
+          "integrity": "sha512-9vDr5NzHu27wgwejuKL7kIOm4bwEtaPQ4Z6cpCmjSuaRqpH/7xc4qcGEscwMqlkwgcXl6MvqoAjZkQ24uSdIZQ==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.14.5",
+            "@babel/generator": "^7.14.5",
+            "@babel/helper-function-name": "^7.14.5",
+            "@babel/helper-hoist-variables": "^7.14.5",
+            "@babel/helper-split-export-declaration": "^7.14.5",
+            "@babel/parser": "^7.14.7",
+            "@babel/types": "^7.14.5",
+            "debug": "^4.1.0",
+            "globals": "^11.1.0"
+          }
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        },
+        "json5": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
+          "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
+          "dev": true,
+          "requires": {
+            "minimist": "^1.2.5"
+          }
+        }
+      }
+    },
+    "@babel/generator": {
+      "version": "7.13.9",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz",
+      "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.13.0",
+        "jsesc": "^2.5.1",
+        "source-map": "^0.5.0"
+      }
+    },
+    "@babel/helper-annotate-as-pure": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz",
+      "integrity": "sha512-EivH9EgBIb+G8ij1B2jAwSH36WnGvkQSEC6CkX/6v6ZFlw5fVOHvsgGF4uiEHO2GzMvunZb6tDLQEQSdrdocrA==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helper-builder-binary-assignment-operator-visitor": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz",
+      "integrity": "sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-explode-assignable-expression": "^7.14.5",
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helper-compilation-targets": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.5.tgz",
+      "integrity": "sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw==",
+      "dev": true,
+      "requires": {
+        "@babel/compat-data": "^7.14.5",
+        "@babel/helper-validator-option": "^7.14.5",
+        "browserslist": "^4.16.6",
+        "semver": "^6.3.0"
+      }
+    },
+    "@babel/helper-create-class-features-plugin": {
+      "version": "7.14.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.6.tgz",
+      "integrity": "sha512-Z6gsfGofTxH/+LQXqYEK45kxmcensbzmk/oi8DmaQytlQCgqNZt9XQF8iqlI/SeXWVjaMNxvYvzaYw+kh42mDg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-annotate-as-pure": "^7.14.5",
+        "@babel/helper-function-name": "^7.14.5",
+        "@babel/helper-member-expression-to-functions": "^7.14.5",
+        "@babel/helper-optimise-call-expression": "^7.14.5",
+        "@babel/helper-replace-supers": "^7.14.5",
+        "@babel/helper-split-export-declaration": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/code-frame": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
+          "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==",
+          "dev": true,
+          "requires": {
+            "@babel/highlight": "^7.14.5"
+          }
+        },
+        "@babel/helper-function-name": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz",
+          "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-get-function-arity": "^7.14.5",
+            "@babel/template": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-get-function-arity": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz",
+          "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-split-export-declaration": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz",
+          "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/highlight": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz",
+          "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "chalk": "^2.0.0",
+            "js-tokens": "^4.0.0"
+          }
+        },
+        "@babel/parser": {
+          "version": "7.14.7",
+          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.7.tgz",
+          "integrity": "sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==",
+          "dev": true
+        },
+        "@babel/template": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz",
+          "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.14.5",
+            "@babel/parser": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helper-create-regexp-features-plugin": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz",
+      "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-annotate-as-pure": "^7.14.5",
+        "regexpu-core": "^4.7.1"
+      }
+    },
+    "@babel/helper-define-polyfill-provider": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz",
+      "integrity": "sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-compilation-targets": "^7.13.0",
+        "@babel/helper-module-imports": "^7.12.13",
+        "@babel/helper-plugin-utils": "^7.13.0",
+        "@babel/traverse": "^7.13.0",
+        "debug": "^4.1.1",
+        "lodash.debounce": "^4.0.8",
+        "resolve": "^1.14.2",
+        "semver": "^6.1.2"
+      }
+    },
+    "@babel/helper-explode-assignable-expression": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz",
+      "integrity": "sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helper-function-name": {
+      "version": "7.12.13",
+      "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz",
+      "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-get-function-arity": "^7.12.13",
+        "@babel/template": "^7.12.13",
+        "@babel/types": "^7.12.13"
+      }
+    },
+    "@babel/helper-get-function-arity": {
+      "version": "7.12.13",
+      "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz",
+      "integrity": "sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.12.13"
+      }
+    },
+    "@babel/helper-hoist-variables": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz",
+      "integrity": "sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helper-member-expression-to-functions": {
+      "version": "7.14.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.14.7.tgz",
+      "integrity": "sha512-TMUt4xKxJn6ccjcOW7c4hlwyJArizskAhoSTOCkA0uZ+KghIaci0Qg9R043kUMWI9mtQfgny+NQ5QATnZ+paaA==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helper-module-imports": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz",
+      "integrity": "sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==",
+      "requires": {
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg=="
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helper-module-transforms": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.5.tgz",
+      "integrity": "sha512-iXpX4KW8LVODuAieD7MzhNjmM6dzYY5tfRqT+R9HDXWl0jPn/djKmA+G9s/2C2T9zggw5tK1QNqZ70USfedOwA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-module-imports": "^7.14.5",
+        "@babel/helper-replace-supers": "^7.14.5",
+        "@babel/helper-simple-access": "^7.14.5",
+        "@babel/helper-split-export-declaration": "^7.14.5",
+        "@babel/helper-validator-identifier": "^7.14.5",
+        "@babel/template": "^7.14.5",
+        "@babel/traverse": "^7.14.5",
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/code-frame": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
+          "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==",
+          "dev": true,
+          "requires": {
+            "@babel/highlight": "^7.14.5"
+          }
+        },
+        "@babel/generator": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.5.tgz",
+          "integrity": "sha512-y3rlP+/G25OIX3mYKKIOlQRcqj7YgrvHxOLbVmyLJ9bPmi5ttvUmpydVjcFjZphOktWuA7ovbx91ECloWTfjIA==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5",
+            "jsesc": "^2.5.1",
+            "source-map": "^0.5.0"
+          }
+        },
+        "@babel/helper-function-name": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz",
+          "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-get-function-arity": "^7.14.5",
+            "@babel/template": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-get-function-arity": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz",
+          "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-split-export-declaration": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz",
+          "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/highlight": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz",
+          "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "chalk": "^2.0.0",
+            "js-tokens": "^4.0.0"
+          }
+        },
+        "@babel/parser": {
+          "version": "7.14.7",
+          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.7.tgz",
+          "integrity": "sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==",
+          "dev": true
+        },
+        "@babel/template": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz",
+          "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.14.5",
+            "@babel/parser": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/traverse": {
+          "version": "7.14.7",
+          "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.7.tgz",
+          "integrity": "sha512-9vDr5NzHu27wgwejuKL7kIOm4bwEtaPQ4Z6cpCmjSuaRqpH/7xc4qcGEscwMqlkwgcXl6MvqoAjZkQ24uSdIZQ==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.14.5",
+            "@babel/generator": "^7.14.5",
+            "@babel/helper-function-name": "^7.14.5",
+            "@babel/helper-hoist-variables": "^7.14.5",
+            "@babel/helper-split-export-declaration": "^7.14.5",
+            "@babel/parser": "^7.14.7",
+            "@babel/types": "^7.14.5",
+            "debug": "^4.1.0",
+            "globals": "^11.1.0"
+          }
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helper-optimise-call-expression": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz",
+      "integrity": "sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helper-plugin-utils": {
+      "version": "7.13.0",
+      "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz",
+      "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==",
+      "dev": true
+    },
+    "@babel/helper-remap-async-to-generator": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz",
+      "integrity": "sha512-rLQKdQU+HYlxBwQIj8dk4/0ENOUEhA/Z0l4hN8BexpvmSMN9oA9EagjnhnDpNsRdWCfjwa4mn/HyBXO9yhQP6A==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-annotate-as-pure": "^7.14.5",
+        "@babel/helper-wrap-function": "^7.14.5",
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helper-replace-supers": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.14.5.tgz",
+      "integrity": "sha512-3i1Qe9/8x/hCHINujn+iuHy+mMRLoc77b2nI9TB0zjH1hvn9qGlXjWlggdwUcju36PkPCy/lpM7LLUdcTyH4Ow==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-member-expression-to-functions": "^7.14.5",
+        "@babel/helper-optimise-call-expression": "^7.14.5",
+        "@babel/traverse": "^7.14.5",
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/code-frame": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
+          "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==",
+          "dev": true,
+          "requires": {
+            "@babel/highlight": "^7.14.5"
+          }
+        },
+        "@babel/generator": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.5.tgz",
+          "integrity": "sha512-y3rlP+/G25OIX3mYKKIOlQRcqj7YgrvHxOLbVmyLJ9bPmi5ttvUmpydVjcFjZphOktWuA7ovbx91ECloWTfjIA==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5",
+            "jsesc": "^2.5.1",
+            "source-map": "^0.5.0"
+          }
+        },
+        "@babel/helper-function-name": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz",
+          "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-get-function-arity": "^7.14.5",
+            "@babel/template": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-get-function-arity": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz",
+          "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-split-export-declaration": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz",
+          "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/highlight": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz",
+          "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "chalk": "^2.0.0",
+            "js-tokens": "^4.0.0"
+          }
+        },
+        "@babel/parser": {
+          "version": "7.14.7",
+          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.7.tgz",
+          "integrity": "sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==",
+          "dev": true
+        },
+        "@babel/template": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz",
+          "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.14.5",
+            "@babel/parser": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/traverse": {
+          "version": "7.14.7",
+          "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.7.tgz",
+          "integrity": "sha512-9vDr5NzHu27wgwejuKL7kIOm4bwEtaPQ4Z6cpCmjSuaRqpH/7xc4qcGEscwMqlkwgcXl6MvqoAjZkQ24uSdIZQ==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.14.5",
+            "@babel/generator": "^7.14.5",
+            "@babel/helper-function-name": "^7.14.5",
+            "@babel/helper-hoist-variables": "^7.14.5",
+            "@babel/helper-split-export-declaration": "^7.14.5",
+            "@babel/parser": "^7.14.7",
+            "@babel/types": "^7.14.5",
+            "debug": "^4.1.0",
+            "globals": "^11.1.0"
+          }
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helper-simple-access": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz",
+      "integrity": "sha512-nfBN9xvmCt6nrMZjfhkl7i0oTV3yxR4/FztsbOASyTvVcoYd0TRHh7eMLdlEcCqobydC0LAF3LtC92Iwxo0wyw==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helper-skip-transparent-expression-wrappers": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz",
+      "integrity": "sha512-dmqZB7mrb94PZSAOYtr+ZN5qt5owZIAgqtoTuqiFbHFtxgEcmQlRJVI+bO++fciBunXtB6MK7HrzrfcAzIz2NQ==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helper-split-export-declaration": {
+      "version": "7.12.13",
+      "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz",
+      "integrity": "sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==",
+      "dev": true,
+      "requires": {
+        "@babel/types": "^7.12.13"
+      }
+    },
+    "@babel/helper-validator-identifier": {
+      "version": "7.12.11",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
+      "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw=="
+    },
+    "@babel/helper-validator-option": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz",
+      "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==",
+      "dev": true
+    },
+    "@babel/helper-wrap-function": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.14.5.tgz",
+      "integrity": "sha512-YEdjTCq+LNuNS1WfxsDCNpgXkJaIyqco6DAelTUjT4f2KIWC1nBcaCaSdHTBqQVLnTBexBcVcFhLSU1KnYuePQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-function-name": "^7.14.5",
+        "@babel/template": "^7.14.5",
+        "@babel/traverse": "^7.14.5",
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/code-frame": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
+          "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==",
+          "dev": true,
+          "requires": {
+            "@babel/highlight": "^7.14.5"
+          }
+        },
+        "@babel/generator": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.5.tgz",
+          "integrity": "sha512-y3rlP+/G25OIX3mYKKIOlQRcqj7YgrvHxOLbVmyLJ9bPmi5ttvUmpydVjcFjZphOktWuA7ovbx91ECloWTfjIA==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5",
+            "jsesc": "^2.5.1",
+            "source-map": "^0.5.0"
+          }
+        },
+        "@babel/helper-function-name": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz",
+          "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-get-function-arity": "^7.14.5",
+            "@babel/template": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-get-function-arity": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz",
+          "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-split-export-declaration": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz",
+          "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/highlight": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz",
+          "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "chalk": "^2.0.0",
+            "js-tokens": "^4.0.0"
+          }
+        },
+        "@babel/parser": {
+          "version": "7.14.7",
+          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.7.tgz",
+          "integrity": "sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==",
+          "dev": true
+        },
+        "@babel/template": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz",
+          "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.14.5",
+            "@babel/parser": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/traverse": {
+          "version": "7.14.7",
+          "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.7.tgz",
+          "integrity": "sha512-9vDr5NzHu27wgwejuKL7kIOm4bwEtaPQ4Z6cpCmjSuaRqpH/7xc4qcGEscwMqlkwgcXl6MvqoAjZkQ24uSdIZQ==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.14.5",
+            "@babel/generator": "^7.14.5",
+            "@babel/helper-function-name": "^7.14.5",
+            "@babel/helper-hoist-variables": "^7.14.5",
+            "@babel/helper-split-export-declaration": "^7.14.5",
+            "@babel/parser": "^7.14.7",
+            "@babel/types": "^7.14.5",
+            "debug": "^4.1.0",
+            "globals": "^11.1.0"
+          }
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/helpers": {
+      "version": "7.14.6",
+      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.6.tgz",
+      "integrity": "sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA==",
+      "dev": true,
+      "requires": {
+        "@babel/template": "^7.14.5",
+        "@babel/traverse": "^7.14.5",
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/code-frame": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
+          "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==",
+          "dev": true,
+          "requires": {
+            "@babel/highlight": "^7.14.5"
+          }
+        },
+        "@babel/generator": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.5.tgz",
+          "integrity": "sha512-y3rlP+/G25OIX3mYKKIOlQRcqj7YgrvHxOLbVmyLJ9bPmi5ttvUmpydVjcFjZphOktWuA7ovbx91ECloWTfjIA==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5",
+            "jsesc": "^2.5.1",
+            "source-map": "^0.5.0"
+          }
+        },
+        "@babel/helper-function-name": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz",
+          "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-get-function-arity": "^7.14.5",
+            "@babel/template": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-get-function-arity": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz",
+          "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-split-export-declaration": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz",
+          "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/highlight": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz",
+          "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "chalk": "^2.0.0",
+            "js-tokens": "^4.0.0"
+          }
+        },
+        "@babel/parser": {
+          "version": "7.14.7",
+          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.7.tgz",
+          "integrity": "sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==",
+          "dev": true
+        },
+        "@babel/template": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz",
+          "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.14.5",
+            "@babel/parser": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/traverse": {
+          "version": "7.14.7",
+          "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.7.tgz",
+          "integrity": "sha512-9vDr5NzHu27wgwejuKL7kIOm4bwEtaPQ4Z6cpCmjSuaRqpH/7xc4qcGEscwMqlkwgcXl6MvqoAjZkQ24uSdIZQ==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.14.5",
+            "@babel/generator": "^7.14.5",
+            "@babel/helper-function-name": "^7.14.5",
+            "@babel/helper-hoist-variables": "^7.14.5",
+            "@babel/helper-split-export-declaration": "^7.14.5",
+            "@babel/parser": "^7.14.7",
+            "@babel/types": "^7.14.5",
+            "debug": "^4.1.0",
+            "globals": "^11.1.0"
+          }
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/highlight": {
+      "version": "7.13.8",
+      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz",
+      "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==",
+      "requires": {
+        "@babel/helper-validator-identifier": "^7.12.11",
+        "chalk": "^2.0.0",
+        "js-tokens": "^4.0.0"
+      }
+    },
+    "@babel/parser": {
+      "version": "7.13.13",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz",
+      "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==",
+      "dev": true
+    },
+    "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.14.5.tgz",
+      "integrity": "sha512-ZoJS2XCKPBfTmL122iP6NM9dOg+d4lc9fFk3zxc8iDjvt8Pk4+TlsHSKhIPf6X+L5ORCdBzqMZDjL/WHj7WknQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5",
+        "@babel/plugin-proposal-optional-chaining": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-async-generator-functions": {
+      "version": "7.14.7",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.7.tgz",
+      "integrity": "sha512-RK8Wj7lXLY3bqei69/cc25gwS5puEc3dknoFPFbqfy3XxYQBQFvu4ioWpafMBAB+L9NyptQK4nMOa5Xz16og8Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/helper-remap-async-to-generator": "^7.14.5",
+        "@babel/plugin-syntax-async-generators": "^7.8.4"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-class-properties": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz",
+      "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-class-features-plugin": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-class-static-block": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.14.5.tgz",
+      "integrity": "sha512-KBAH5ksEnYHCegqseI5N9skTdxgJdmDoAOc0uXa+4QMYKeZD0w5IARh4FMlTNtaHhbB8v+KzMdTgxMMzsIy6Yg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-class-features-plugin": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/plugin-syntax-class-static-block": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-decorators": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.14.5.tgz",
+      "integrity": "sha512-LYz5nvQcvYeRVjui1Ykn28i+3aUiXwQ/3MGoEy0InTaz1pJo/lAzmIDXX+BQny/oufgHzJ6vnEEiXQ8KZjEVFg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-class-features-plugin": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/plugin-syntax-decorators": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-dynamic-import": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz",
+      "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/plugin-syntax-dynamic-import": "^7.8.3"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-export-namespace-from": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz",
+      "integrity": "sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/plugin-syntax-export-namespace-from": "^7.8.3"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-json-strings": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz",
+      "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/plugin-syntax-json-strings": "^7.8.3"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-logical-assignment-operators": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz",
+      "integrity": "sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-nullish-coalescing-operator": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz",
+      "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-numeric-separator": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz",
+      "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/plugin-syntax-numeric-separator": "^7.10.4"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-object-rest-spread": {
+      "version": "7.14.7",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.7.tgz",
+      "integrity": "sha512-082hsZz+sVabfmDWo1Oct1u1AgbKbUAyVgmX4otIc7bdsRgHBXwTwb3DpDmD4Eyyx6DNiuz5UAATT655k+kL5g==",
+      "dev": true,
+      "requires": {
+        "@babel/compat-data": "^7.14.7",
+        "@babel/helper-compilation-targets": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
+        "@babel/plugin-transform-parameters": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-optional-catch-binding": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz",
+      "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/plugin-syntax-optional-catch-binding": "^7.8.3"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-optional-chaining": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz",
+      "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5",
+        "@babel/plugin-syntax-optional-chaining": "^7.8.3"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-private-methods": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz",
+      "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-class-features-plugin": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-private-property-in-object": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.14.5.tgz",
+      "integrity": "sha512-62EyfyA3WA0mZiF2e2IV9mc9Ghwxcg8YTu8BS4Wss4Y3PY725OmS9M0qLORbJwLqFtGh+jiE4wAmocK2CTUK2Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-annotate-as-pure": "^7.14.5",
+        "@babel/helper-create-class-features-plugin": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/plugin-syntax-private-property-in-object": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-proposal-unicode-property-regex": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz",
+      "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-regexp-features-plugin": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-syntax-async-generators": {
+      "version": "7.8.4",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
+      "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-class-properties": {
+      "version": "7.12.13",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz",
+      "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.12.13"
+      }
+    },
+    "@babel/plugin-syntax-class-static-block": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz",
+      "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-syntax-decorators": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.14.5.tgz",
+      "integrity": "sha512-c4sZMRWL4GSvP1EXy0woIP7m4jkVcEuG8R1TOZxPBPtp4FSM/kiPZub9UIs/Jrb5ZAOzvTUSGYrWsrSu1JvoPw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-syntax-dynamic-import": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
+      "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-export-namespace-from": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz",
+      "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.3"
+      }
+    },
+    "@babel/plugin-syntax-json-strings": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
+      "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-jsx": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.14.5.tgz",
+      "integrity": "sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==",
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ=="
+        }
+      }
+    },
+    "@babel/plugin-syntax-logical-assignment-operators": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
+      "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-syntax-nullish-coalescing-operator": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
+      "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-numeric-separator": {
+      "version": "7.10.4",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz",
+      "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.10.4"
+      }
+    },
+    "@babel/plugin-syntax-object-rest-spread": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
+      "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-optional-catch-binding": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
+      "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-optional-chaining": {
+      "version": "7.8.3",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz",
+      "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.8.0"
+      }
+    },
+    "@babel/plugin-syntax-private-property-in-object": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz",
+      "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-syntax-top-level-await": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz",
+      "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-syntax-typescript": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.14.5.tgz",
+      "integrity": "sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-arrow-functions": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz",
+      "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-async-to-generator": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz",
+      "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-module-imports": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/helper-remap-async-to-generator": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-block-scoped-functions": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz",
+      "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-block-scoping": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.5.tgz",
+      "integrity": "sha512-LBYm4ZocNgoCqyxMLoOnwpsmQ18HWTQvql64t3GvMUzLQrNoV1BDG0lNftC8QKYERkZgCCT/7J5xWGObGAyHDw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-classes": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.5.tgz",
+      "integrity": "sha512-J4VxKAMykM06K/64z9rwiL6xnBHgB1+FVspqvlgCdwD1KUbQNfszeKVVOMh59w3sztHYIZDgnhOC4WbdEfHFDA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-annotate-as-pure": "^7.14.5",
+        "@babel/helper-function-name": "^7.14.5",
+        "@babel/helper-optimise-call-expression": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/helper-replace-supers": "^7.14.5",
+        "@babel/helper-split-export-declaration": "^7.14.5",
+        "globals": "^11.1.0"
+      },
+      "dependencies": {
+        "@babel/code-frame": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
+          "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==",
+          "dev": true,
+          "requires": {
+            "@babel/highlight": "^7.14.5"
+          }
+        },
+        "@babel/helper-function-name": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz",
+          "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-get-function-arity": "^7.14.5",
+            "@babel/template": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-get-function-arity": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz",
+          "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        },
+        "@babel/helper-split-export-declaration": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz",
+          "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/highlight": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz",
+          "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "chalk": "^2.0.0",
+            "js-tokens": "^4.0.0"
+          }
+        },
+        "@babel/parser": {
+          "version": "7.14.7",
+          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.7.tgz",
+          "integrity": "sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==",
+          "dev": true
+        },
+        "@babel/template": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz",
+          "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.14.5",
+            "@babel/parser": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/plugin-transform-computed-properties": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz",
+      "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-destructuring": {
+      "version": "7.14.7",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz",
+      "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-dotall-regex": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz",
+      "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-regexp-features-plugin": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-duplicate-keys": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz",
+      "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-exponentiation-operator": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz",
+      "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-for-of": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz",
+      "integrity": "sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-function-name": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz",
+      "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-function-name": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/code-frame": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz",
+          "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==",
+          "dev": true,
+          "requires": {
+            "@babel/highlight": "^7.14.5"
+          }
+        },
+        "@babel/helper-function-name": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz",
+          "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-get-function-arity": "^7.14.5",
+            "@babel/template": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-get-function-arity": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz",
+          "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==",
+          "dev": true,
+          "requires": {
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        },
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/highlight": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz",
+          "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "chalk": "^2.0.0",
+            "js-tokens": "^4.0.0"
+          }
+        },
+        "@babel/parser": {
+          "version": "7.14.7",
+          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.7.tgz",
+          "integrity": "sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA==",
+          "dev": true
+        },
+        "@babel/template": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz",
+          "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.14.5",
+            "@babel/parser": "^7.14.5",
+            "@babel/types": "^7.14.5"
+          }
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/plugin-transform-literals": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz",
+      "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-member-expression-literals": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz",
+      "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-modules-amd": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz",
+      "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-module-transforms": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "babel-plugin-dynamic-import-node": "^2.3.3"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-modules-commonjs": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.5.tgz",
+      "integrity": "sha512-en8GfBtgnydoao2PS+87mKyw62k02k7kJ9ltbKe0fXTHrQmG6QZZflYuGI1VVG7sVpx4E1n7KBpNlPb8m78J+A==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-module-transforms": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/helper-simple-access": "^7.14.5",
+        "babel-plugin-dynamic-import-node": "^2.3.3"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-modules-systemjs": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz",
+      "integrity": "sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-hoist-variables": "^7.14.5",
+        "@babel/helper-module-transforms": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/helper-validator-identifier": "^7.14.5",
+        "babel-plugin-dynamic-import-node": "^2.3.3"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        },
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-modules-umd": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz",
+      "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-module-transforms": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-named-capturing-groups-regex": {
+      "version": "7.14.7",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.7.tgz",
+      "integrity": "sha512-DTNOTaS7TkW97xsDMrp7nycUVh6sn/eq22VaxWfEdzuEbRsiaOU0pqU7DlyUGHVsbQbSghvjKRpEl+nUCKGQSg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-regexp-features-plugin": "^7.14.5"
+      }
+    },
+    "@babel/plugin-transform-new-target": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz",
+      "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-object-super": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz",
+      "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/helper-replace-supers": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-parameters": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz",
+      "integrity": "sha512-Tl7LWdr6HUxTmzQtzuU14SqbgrSKmaR77M0OKyq4njZLQTPfOvzblNKyNkGwOfEFCEx7KeYHQHDI0P3F02IVkA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-property-literals": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz",
+      "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-react-display-name": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.14.5.tgz",
+      "integrity": "sha512-07aqY1ChoPgIxsuDviptRpVkWCSbXWmzQqcgy65C6YSFOfPFvb/DX3bBRHh7pCd/PMEEYHYWUTSVkCbkVainYQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-react-jsx": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.5.tgz",
+      "integrity": "sha512-7RylxNeDnxc1OleDm0F5Q/BSL+whYRbOAR+bwgCxIr0L32v7UFh/pz1DLMZideAUxKT6eMoS2zQH6fyODLEi8Q==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-annotate-as-pure": "^7.14.5",
+        "@babel/helper-module-imports": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/plugin-syntax-jsx": "^7.14.5",
+        "@babel/types": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        },
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/plugin-transform-react-jsx-development": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.14.5.tgz",
+      "integrity": "sha512-rdwG/9jC6QybWxVe2UVOa7q6cnTpw8JRRHOxntG/h6g/guAOe6AhtQHJuJh5FwmnXIT1bdm5vC2/5huV8ZOorQ==",
+      "dev": true,
+      "requires": {
+        "@babel/plugin-transform-react-jsx": "^7.14.5"
+      }
+    },
+    "@babel/plugin-transform-react-pure-annotations": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.14.5.tgz",
+      "integrity": "sha512-3X4HpBJimNxW4rhUy/SONPyNQHp5YRr0HhJdT2OH1BRp0of7u3Dkirc7x9FRJMKMqTBI079VZ1hzv7Ouuz///g==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-annotate-as-pure": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-regenerator": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz",
+      "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==",
+      "dev": true,
+      "requires": {
+        "regenerator-transform": "^0.14.2"
+      }
+    },
+    "@babel/plugin-transform-reserved-words": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz",
+      "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-shorthand-properties": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz",
+      "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-spread": {
+      "version": "7.14.6",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz",
+      "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-sticky-regex": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz",
+      "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-template-literals": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz",
+      "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-typeof-symbol": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz",
+      "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-typescript": {
+      "version": "7.14.6",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.14.6.tgz",
+      "integrity": "sha512-XlTdBq7Awr4FYIzqhmYY80WN0V0azF74DMPyFqVHBvf81ZUgc4X7ZOpx6O8eLDK6iM5cCQzeyJw0ynTaefixRA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-class-features-plugin": "^7.14.6",
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/plugin-syntax-typescript": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-unicode-escapes": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz",
+      "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/plugin-transform-unicode-regex": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz",
+      "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-create-regexp-features-plugin": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/preset-env": {
+      "version": "7.14.7",
+      "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.14.7.tgz",
+      "integrity": "sha512-itOGqCKLsSUl0Y+1nSfhbuuOlTs0MJk2Iv7iSH+XT/mR8U1zRLO7NjWlYXB47yhK4J/7j+HYty/EhFZDYKa/VA==",
+      "dev": true,
+      "requires": {
+        "@babel/compat-data": "^7.14.7",
+        "@babel/helper-compilation-targets": "^7.14.5",
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/helper-validator-option": "^7.14.5",
+        "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.14.5",
+        "@babel/plugin-proposal-async-generator-functions": "^7.14.7",
+        "@babel/plugin-proposal-class-properties": "^7.14.5",
+        "@babel/plugin-proposal-class-static-block": "^7.14.5",
+        "@babel/plugin-proposal-dynamic-import": "^7.14.5",
+        "@babel/plugin-proposal-export-namespace-from": "^7.14.5",
+        "@babel/plugin-proposal-json-strings": "^7.14.5",
+        "@babel/plugin-proposal-logical-assignment-operators": "^7.14.5",
+        "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
+        "@babel/plugin-proposal-numeric-separator": "^7.14.5",
+        "@babel/plugin-proposal-object-rest-spread": "^7.14.7",
+        "@babel/plugin-proposal-optional-catch-binding": "^7.14.5",
+        "@babel/plugin-proposal-optional-chaining": "^7.14.5",
+        "@babel/plugin-proposal-private-methods": "^7.14.5",
+        "@babel/plugin-proposal-private-property-in-object": "^7.14.5",
+        "@babel/plugin-proposal-unicode-property-regex": "^7.14.5",
+        "@babel/plugin-syntax-async-generators": "^7.8.4",
+        "@babel/plugin-syntax-class-properties": "^7.12.13",
+        "@babel/plugin-syntax-class-static-block": "^7.14.5",
+        "@babel/plugin-syntax-dynamic-import": "^7.8.3",
+        "@babel/plugin-syntax-export-namespace-from": "^7.8.3",
+        "@babel/plugin-syntax-json-strings": "^7.8.3",
+        "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
+        "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
+        "@babel/plugin-syntax-numeric-separator": "^7.10.4",
+        "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
+        "@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
+        "@babel/plugin-syntax-optional-chaining": "^7.8.3",
+        "@babel/plugin-syntax-private-property-in-object": "^7.14.5",
+        "@babel/plugin-syntax-top-level-await": "^7.14.5",
+        "@babel/plugin-transform-arrow-functions": "^7.14.5",
+        "@babel/plugin-transform-async-to-generator": "^7.14.5",
+        "@babel/plugin-transform-block-scoped-functions": "^7.14.5",
+        "@babel/plugin-transform-block-scoping": "^7.14.5",
+        "@babel/plugin-transform-classes": "^7.14.5",
+        "@babel/plugin-transform-computed-properties": "^7.14.5",
+        "@babel/plugin-transform-destructuring": "^7.14.7",
+        "@babel/plugin-transform-dotall-regex": "^7.14.5",
+        "@babel/plugin-transform-duplicate-keys": "^7.14.5",
+        "@babel/plugin-transform-exponentiation-operator": "^7.14.5",
+        "@babel/plugin-transform-for-of": "^7.14.5",
+        "@babel/plugin-transform-function-name": "^7.14.5",
+        "@babel/plugin-transform-literals": "^7.14.5",
+        "@babel/plugin-transform-member-expression-literals": "^7.14.5",
+        "@babel/plugin-transform-modules-amd": "^7.14.5",
+        "@babel/plugin-transform-modules-commonjs": "^7.14.5",
+        "@babel/plugin-transform-modules-systemjs": "^7.14.5",
+        "@babel/plugin-transform-modules-umd": "^7.14.5",
+        "@babel/plugin-transform-named-capturing-groups-regex": "^7.14.7",
+        "@babel/plugin-transform-new-target": "^7.14.5",
+        "@babel/plugin-transform-object-super": "^7.14.5",
+        "@babel/plugin-transform-parameters": "^7.14.5",
+        "@babel/plugin-transform-property-literals": "^7.14.5",
+        "@babel/plugin-transform-regenerator": "^7.14.5",
+        "@babel/plugin-transform-reserved-words": "^7.14.5",
+        "@babel/plugin-transform-shorthand-properties": "^7.14.5",
+        "@babel/plugin-transform-spread": "^7.14.6",
+        "@babel/plugin-transform-sticky-regex": "^7.14.5",
+        "@babel/plugin-transform-template-literals": "^7.14.5",
+        "@babel/plugin-transform-typeof-symbol": "^7.14.5",
+        "@babel/plugin-transform-unicode-escapes": "^7.14.5",
+        "@babel/plugin-transform-unicode-regex": "^7.14.5",
+        "@babel/preset-modules": "^0.1.4",
+        "@babel/types": "^7.14.5",
+        "babel-plugin-polyfill-corejs2": "^0.2.2",
+        "babel-plugin-polyfill-corejs3": "^0.2.2",
+        "babel-plugin-polyfill-regenerator": "^0.2.2",
+        "core-js-compat": "^3.15.0",
+        "semver": "^6.3.0"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        },
+        "@babel/helper-validator-identifier": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.5.tgz",
+          "integrity": "sha512-5lsetuxCLilmVGyiLEfoHBRX8UCFD+1m2x3Rj97WrW3V7H3u4RWRXA4evMjImCsin2J2YT0QaVDGf+z8ondbAg==",
+          "dev": true
+        },
+        "@babel/types": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.5.tgz",
+          "integrity": "sha512-M/NzBpEL95I5Hh4dwhin5JlE7EzO5PHMAuzjxss3tiOBD46KfQvVedN/3jEPZvdRvtsK2222XfdHogNIttFgcg==",
+          "dev": true,
+          "requires": {
+            "@babel/helper-validator-identifier": "^7.14.5",
+            "to-fast-properties": "^2.0.0"
+          }
+        }
+      }
+    },
+    "@babel/preset-modules": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz",
+      "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.0.0",
+        "@babel/plugin-proposal-unicode-property-regex": "^7.4.4",
+        "@babel/plugin-transform-dotall-regex": "^7.4.4",
+        "@babel/types": "^7.4.4",
+        "esutils": "^2.0.2"
+      }
+    },
+    "@babel/preset-react": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.14.5.tgz",
+      "integrity": "sha512-XFxBkjyObLvBaAvkx1Ie95Iaq4S/GUEIrejyrntQ/VCMKUYvKLoyKxOBzJ2kjA3b6rC9/KL6KXfDC2GqvLiNqQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/helper-validator-option": "^7.14.5",
+        "@babel/plugin-transform-react-display-name": "^7.14.5",
+        "@babel/plugin-transform-react-jsx": "^7.14.5",
+        "@babel/plugin-transform-react-jsx-development": "^7.14.5",
+        "@babel/plugin-transform-react-pure-annotations": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/preset-typescript": {
+      "version": "7.14.5",
+      "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.14.5.tgz",
+      "integrity": "sha512-u4zO6CdbRKbS9TypMqrlGH7sd2TAJppZwn3c/ZRLeO/wGsbddxgbPDUZVNrie3JWYLQ9vpineKlsrWFvO6Pwkw==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-plugin-utils": "^7.14.5",
+        "@babel/helper-validator-option": "^7.14.5",
+        "@babel/plugin-transform-typescript": "^7.14.5"
+      },
+      "dependencies": {
+        "@babel/helper-plugin-utils": {
+          "version": "7.14.5",
+          "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz",
+          "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/runtime": {
+      "version": "7.13.8",
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.8.tgz",
+      "integrity": "sha512-CwQljpw6qSayc0fRG1soxHAKs1CnQMOChm4mlQP6My0kf9upVGizj/KhlTTgyUnETmHpcUXjaluNAkteRFuafg==",
+      "requires": {
+        "regenerator-runtime": "^0.13.4"
+      },
+      "dependencies": {
+        "regenerator-runtime": {
+          "version": "0.13.7",
+          "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
+          "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
+        }
+      }
+    },
+    "@babel/runtime-corejs3": {
+      "version": "7.13.8",
+      "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.13.8.tgz",
+      "integrity": "sha512-iaInhjy1BbDnqc7pZiIXAfWvBnczgWobHceR4Wkhs5tWZG8aIazBYH0Vo73lixecHKh3Vy9yqbQBqVDrmcVDlQ==",
+      "dev": true,
+      "requires": {
+        "core-js-pure": "^3.0.0",
+        "regenerator-runtime": "^0.13.4"
+      },
+      "dependencies": {
+        "regenerator-runtime": {
+          "version": "0.13.7",
+          "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
+          "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==",
+          "dev": true
+        }
+      }
+    },
+    "@babel/template": {
+      "version": "7.12.13",
+      "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz",
+      "integrity": "sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.12.13",
+        "@babel/parser": "^7.12.13",
+        "@babel/types": "^7.12.13"
+      }
+    },
+    "@babel/traverse": {
+      "version": "7.13.13",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz",
+      "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.12.13",
+        "@babel/generator": "^7.13.9",
+        "@babel/helper-function-name": "^7.12.13",
+        "@babel/helper-split-export-declaration": "^7.12.13",
+        "@babel/parser": "^7.13.13",
+        "@babel/types": "^7.13.13",
+        "debug": "^4.1.0",
+        "globals": "^11.1.0"
+      }
+    },
+    "@babel/types": {
+      "version": "7.13.14",
+      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.14.tgz",
+      "integrity": "sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-validator-identifier": "^7.12.11",
+        "lodash": "^4.17.19",
+        "to-fast-properties": "^2.0.0"
+      }
+    },
+    "@chopsui/chops-signin": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/@chopsui/chops-signin/-/chops-signin-0.3.2.tgz",
+      "integrity": "sha512-6jL+Bsfma3UtcDkwhh7uEbUSbPJS6reWvL9UlrRcyMq97qQf7GGr4WtAU4rDFRkeOB5W4+dld2YGf3dNomILnQ==",
+      "requires": {
+        "lit-element": "^2.0.0"
+      }
+    },
+    "@chopsui/karma-reporter": {
+      "version": "1.1.5",
+      "resolved": "https://registry.npmjs.org/@chopsui/karma-reporter/-/karma-reporter-1.1.5.tgz",
+      "integrity": "sha512-vYj8Yrovgqi4lHHB3BSeyGVntS2Ov5KoluSttVTVC862jvtSSflPO58wnWNVgQUJIKxmG5bTA71D1bFC1rUXoQ==",
+      "requires": {
+        "axe-core": "^3.4.1"
+      },
+      "dependencies": {
+        "axe-core": {
+          "version": "3.5.5",
+          "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-3.5.5.tgz",
+          "integrity": "sha512-5P0QZ6J5xGikH780pghEdbEKijCTrruK9KxtPZCFWUpef0f6GipO+xEZ5GKCb020mmqgbiNO6TcA55CriL784Q=="
+        }
+      }
+    },
+    "@chopsui/prpc-client": {
+      "version": "0.0.2",
+      "resolved": "https://registry.npmjs.org/@chopsui/prpc-client/-/prpc-client-0.0.2.tgz",
+      "integrity": "sha512-PKWMkcqNMZTw0tYVIYchGzNqgxLhnf/xjQVxvDUHASgCleryVj4oEs6p28WvY1ZEHTPEONWjnNPN1RhZHdqpHA=="
+    },
+    "@chopsui/tsmon-client": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/@chopsui/tsmon-client/-/tsmon-client-1.0.1.tgz",
+      "integrity": "sha512-snatoVhzUH7B78sNIAbnfnN4DB3qHSD8HC0bdAhGzDGPOEMqm4/PPEDyDk3gyPHtpr1Gomh7sEBoNAY6+RL17A=="
+    },
+    "@discoveryjs/json-ext": {
+      "version": "0.5.3",
+      "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz",
+      "integrity": "sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g==",
+      "dev": true
+    },
+    "@emotion/babel-plugin": {
+      "version": "11.3.0",
+      "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.3.0.tgz",
+      "integrity": "sha512-UZKwBV2rADuhRp+ZOGgNWg2eYgbzKzQXfQPtJbu/PLy8onurxlNCLvxMQEvlr1/GudguPI5IU9qIY1+2z1M5bA==",
+      "requires": {
+        "@babel/helper-module-imports": "^7.12.13",
+        "@babel/plugin-syntax-jsx": "^7.12.13",
+        "@babel/runtime": "^7.13.10",
+        "@emotion/hash": "^0.8.0",
+        "@emotion/memoize": "^0.7.5",
+        "@emotion/serialize": "^1.0.2",
+        "babel-plugin-macros": "^2.6.1",
+        "convert-source-map": "^1.5.0",
+        "escape-string-regexp": "^4.0.0",
+        "find-root": "^1.1.0",
+        "source-map": "^0.5.7",
+        "stylis": "^4.0.3"
+      },
+      "dependencies": {
+        "@babel/runtime": {
+          "version": "7.14.6",
+          "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.6.tgz",
+          "integrity": "sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg==",
+          "requires": {
+            "regenerator-runtime": "^0.13.4"
+          }
+        },
+        "escape-string-regexp": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+          "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="
+        },
+        "regenerator-runtime": {
+          "version": "0.13.7",
+          "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
+          "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
+        }
+      }
+    },
+    "@emotion/cache": {
+      "version": "11.4.0",
+      "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.4.0.tgz",
+      "integrity": "sha512-Zx70bjE7LErRO9OaZrhf22Qye1y4F7iDl+ITjet0J+i+B88PrAOBkKvaAWhxsZf72tDLajwCgfCjJ2dvH77C3g==",
+      "requires": {
+        "@emotion/memoize": "^0.7.4",
+        "@emotion/sheet": "^1.0.0",
+        "@emotion/utils": "^1.0.0",
+        "@emotion/weak-memoize": "^0.2.5",
+        "stylis": "^4.0.3"
+      }
+    },
+    "@emotion/hash": {
+      "version": "0.8.0",
+      "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.8.0.tgz",
+      "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow=="
+    },
+    "@emotion/is-prop-valid": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.1.0.tgz",
+      "integrity": "sha512-9RkilvXAufQHsSsjQ3PIzSns+pxuX4EW8EbGeSPjZMHuMx6z/MOzb9LpqNieQX4F3mre3NWS2+X3JNRHTQztUQ==",
+      "requires": {
+        "@emotion/memoize": "^0.7.4"
+      }
+    },
+    "@emotion/memoize": {
+      "version": "0.7.5",
+      "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz",
+      "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ=="
+    },
+    "@emotion/react": {
+      "version": "11.4.0",
+      "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.4.0.tgz",
+      "integrity": "sha512-4XklWsl9BdtatLoJpSjusXhpKv9YVteYKh9hPKP1Sxl+mswEFoUe0WtmtWjxEjkA51DQ2QRMCNOvKcSlCQ7ivg==",
+      "requires": {
+        "@babel/runtime": "^7.13.10",
+        "@emotion/cache": "^11.4.0",
+        "@emotion/serialize": "^1.0.2",
+        "@emotion/sheet": "^1.0.1",
+        "@emotion/utils": "^1.0.0",
+        "@emotion/weak-memoize": "^0.2.5",
+        "hoist-non-react-statics": "^3.3.1"
+      },
+      "dependencies": {
+        "@babel/runtime": {
+          "version": "7.14.6",
+          "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.6.tgz",
+          "integrity": "sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg==",
+          "requires": {
+            "regenerator-runtime": "^0.13.4"
+          }
+        },
+        "regenerator-runtime": {
+          "version": "0.13.7",
+          "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
+          "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
+        }
+      }
+    },
+    "@emotion/serialize": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.0.2.tgz",
+      "integrity": "sha512-95MgNJ9+/ajxU7QIAruiOAdYNjxZX7G2mhgrtDWswA21VviYIRP1R5QilZ/bDY42xiKsaktP4egJb3QdYQZi1A==",
+      "requires": {
+        "@emotion/hash": "^0.8.0",
+        "@emotion/memoize": "^0.7.4",
+        "@emotion/unitless": "^0.7.5",
+        "@emotion/utils": "^1.0.0",
+        "csstype": "^3.0.2"
+      }
+    },
+    "@emotion/sheet": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.0.1.tgz",
+      "integrity": "sha512-GbIvVMe4U+Zc+929N1V7nW6YYJtidj31lidSmdYcWozwoBIObXBnaJkKNDjZrLm9Nc0BR+ZyHNaRZxqNZbof5g=="
+    },
+    "@emotion/styled": {
+      "version": "11.3.0",
+      "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.3.0.tgz",
+      "integrity": "sha512-fUoLcN3BfMiLlRhJ8CuPUMEyKkLEoM+n+UyAbnqGEsCd5IzKQ7VQFLtzpJOaCD2/VR2+1hXQTnSZXVJeiTNltA==",
+      "requires": {
+        "@babel/runtime": "^7.13.10",
+        "@emotion/babel-plugin": "^11.3.0",
+        "@emotion/is-prop-valid": "^1.1.0",
+        "@emotion/serialize": "^1.0.2",
+        "@emotion/utils": "^1.0.0"
+      },
+      "dependencies": {
+        "@babel/runtime": {
+          "version": "7.14.6",
+          "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.6.tgz",
+          "integrity": "sha512-/PCB2uJ7oM44tz8YhC4Z/6PeOKXp4K588f+5M3clr1M4zbqztlo0XEfJ2LEzj/FgwfgGcIdl8n7YYjTCI0BYwg==",
+          "requires": {
+            "regenerator-runtime": "^0.13.4"
+          }
+        },
+        "regenerator-runtime": {
+          "version": "0.13.7",
+          "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
+          "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew=="
+        }
+      }
+    },
+    "@emotion/unitless": {
+      "version": "0.7.5",
+      "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz",
+      "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg=="
+    },
+    "@emotion/utils": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.0.0.tgz",
+      "integrity": "sha512-mQC2b3XLDs6QCW+pDQDiyO/EdGZYOygE8s5N5rrzjSI4M3IejPE/JPndCBwRT9z982aqQNi6beWs1UeayrQxxA=="
+    },
+    "@emotion/weak-memoize": {
+      "version": "0.2.5",
+      "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz",
+      "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA=="
+    },
+    "@eslint/eslintrc": {
+      "version": "0.4.2",
+      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.2.tgz",
+      "integrity": "sha512-8nmGq/4ycLpIwzvhI4tNDmQztZ8sp+hI7cyG8i1nQDhkAbRzHpXPidRAHlNvCZQpJTKw5ItIpMw9RSToGF00mg==",
+      "dev": true,
+      "requires": {
+        "ajv": "^6.12.4",
+        "debug": "^4.1.1",
+        "espree": "^7.3.0",
+        "globals": "^13.9.0",
+        "ignore": "^4.0.6",
+        "import-fresh": "^3.2.1",
+        "js-yaml": "^3.13.1",
+        "minimatch": "^3.0.4",
+        "strip-json-comments": "^3.1.1"
+      },
+      "dependencies": {
+        "globals": {
+          "version": "13.10.0",
+          "resolved": "https://registry.npmjs.org/globals/-/globals-13.10.0.tgz",
+          "integrity": "sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g==",
+          "dev": true,
+          "requires": {
+            "type-fest": "^0.20.2"
+          }
+        },
+        "ignore": {
+          "version": "4.0.6",
+          "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
+          "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
+          "dev": true
+        }
+      }
+    },
+    "@humanwhocodes/config-array": {
+      "version": "0.5.0",
+      "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz",
+      "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==",
+      "dev": true,
+      "requires": {
+        "@humanwhocodes/object-schema": "^1.2.0",
+        "debug": "^4.1.1",
+        "minimatch": "^3.0.4"
+      }
+    },
+    "@humanwhocodes/object-schema": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz",
+      "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==",
+      "dev": true
+    },
+    "@istanbuljs/schema": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz",
+      "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==",
+      "dev": true
+    },
+    "@jest/types": {
+      "version": "27.0.6",
+      "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.0.6.tgz",
+      "integrity": "sha512-aSquT1qa9Pik26JK5/3rvnYb4bGtm1VFNesHKmNTwmPIgOrixvhL2ghIvFRNEpzy3gU+rUgjIF/KodbkFAl++g==",
+      "dev": true,
+      "requires": {
+        "@types/istanbul-lib-coverage": "^2.0.0",
+        "@types/istanbul-reports": "^3.0.0",
+        "@types/node": "*",
+        "@types/yargs": "^16.0.0",
+        "chalk": "^4.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+          "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
+    "@material-ui/core": {
+      "version": "5.0.0-beta.2",
+      "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-5.0.0-beta.2.tgz",
+      "integrity": "sha512-lZzZAXzRCb+bbALA8SkLly9LFVAgexOli7FYoTM8EyQnwPWl1pEgntnRGd2WBB42/llRtCX0TRv8h3k9rfrTdg==",
+      "requires": {
+        "@babel/runtime": "^7.4.4",
+        "@material-ui/system": "5.0.0-beta.2",
+        "@material-ui/types": "6.0.1",
+        "@material-ui/unstyled": "5.0.0-alpha.41",
+        "@material-ui/utils": "5.0.0-beta.1",
+        "@popperjs/core": "^2.4.4",
+        "@types/react-transition-group": "^4.2.0",
+        "clsx": "^1.0.4",
+        "csstype": "^3.0.2",
+        "hoist-non-react-statics": "^3.3.2",
+        "prop-types": "^15.7.2",
+        "react-is": "^17.0.0",
+        "react-transition-group": "^4.4.0"
+      },
+      "dependencies": {
+        "@material-ui/types": {
+          "version": "6.0.1",
+          "resolved": "https://registry.npmjs.org/@material-ui/types/-/types-6.0.1.tgz",
+          "integrity": "sha512-t53C2BZE59e8ao38EDIZdM2smPDSEo5Xx9XxQ/MNM9Ph63Mu4vj5pmECiXkYp0y2OrvFiiZhcqRWV34SBOA18g=="
+        },
+        "@material-ui/utils": {
+          "version": "5.0.0-beta.1",
+          "resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-5.0.0-beta.1.tgz",
+          "integrity": "sha512-63E5b1iW79T6dga7Ao1turX4s5P8jipCMVw1tDjKHMiauILb8C6TmUPde+NoM+fQ6OTppC9JxdOXzuotxNRWNA==",
+          "requires": {
+            "@babel/runtime": "^7.4.4",
+            "@types/prop-types": "^15.7.3",
+            "@types/react-is": "^16.7.1 || ^17.0.0",
+            "prop-types": "^15.7.2",
+            "react-is": "^17.0.0"
+          }
+        },
+        "react-is": {
+          "version": "17.0.2",
+          "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+          "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
+        }
+      }
+    },
+    "@material-ui/icons": {
+      "version": "4.11.2",
+      "resolved": "https://registry.npmjs.org/@material-ui/icons/-/icons-4.11.2.tgz",
+      "integrity": "sha512-fQNsKX2TxBmqIGJCSi3tGTO/gZ+eJgWmMJkgDiOfyNaunNaxcklJQFaFogYcFl0qFuaEz1qaXYXboa/bUXVSOQ==",
+      "requires": {
+        "@babel/runtime": "^7.4.4"
+      }
+    },
+    "@material-ui/private-theming": {
+      "version": "5.0.0-beta.2",
+      "resolved": "https://registry.npmjs.org/@material-ui/private-theming/-/private-theming-5.0.0-beta.2.tgz",
+      "integrity": "sha512-qLlUeRdiLCT57sgVWprtPPENU4ZSVlUK6C/aERzlgu+oN7VdKzkz9r07K7bcUau/wHXusP+u1UKNp6TpPr2XVg==",
+      "requires": {
+        "@babel/runtime": "^7.4.4",
+        "@material-ui/utils": "5.0.0-beta.1",
+        "prop-types": "^15.7.2"
+      },
+      "dependencies": {
+        "@material-ui/utils": {
+          "version": "5.0.0-beta.1",
+          "resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-5.0.0-beta.1.tgz",
+          "integrity": "sha512-63E5b1iW79T6dga7Ao1turX4s5P8jipCMVw1tDjKHMiauILb8C6TmUPde+NoM+fQ6OTppC9JxdOXzuotxNRWNA==",
+          "requires": {
+            "@babel/runtime": "^7.4.4",
+            "@types/prop-types": "^15.7.3",
+            "@types/react-is": "^16.7.1 || ^17.0.0",
+            "prop-types": "^15.7.2",
+            "react-is": "^17.0.0"
+          }
+        },
+        "react-is": {
+          "version": "17.0.2",
+          "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+          "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
+        }
+      }
+    },
+    "@material-ui/styled-engine": {
+      "version": "5.0.0-beta.1",
+      "resolved": "https://registry.npmjs.org/@material-ui/styled-engine/-/styled-engine-5.0.0-beta.1.tgz",
+      "integrity": "sha512-BSVsgVQ1cv+Eaf2FFhVahaEw7UeBaLBn0yAM8uWbLxi+LhuNN+HVv/Echv70MDMLW4fna3L2S6u1NXUoGd+7Hw==",
+      "requires": {
+        "@babel/runtime": "^7.4.4",
+        "@emotion/cache": "^11.0.0",
+        "prop-types": "^15.7.2"
+      }
+    },
+    "@material-ui/styles": {
+      "version": "5.0.0-alpha.27",
+      "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-5.0.0-alpha.27.tgz",
+      "integrity": "sha512-J4rM0DwQBlKQfj5SoJP8D2p3ApEJ7xq8aMyABxxLOOx2YfeEdR+Dho3M9WB7mYvIXRq2FTk2EASbw93f38mOpQ==",
+      "requires": {
+        "@babel/runtime": "^7.4.4",
+        "@emotion/hash": "^0.8.0",
+        "@material-ui/types": "5.1.7",
+        "@material-ui/utils": "5.0.0-alpha.27",
+        "clsx": "^1.0.4",
+        "csstype": "^3.0.2",
+        "hoist-non-react-statics": "^3.3.2",
+        "jss": "^10.0.3",
+        "jss-plugin-camel-case": "^10.0.3",
+        "jss-plugin-default-unit": "^10.0.3",
+        "jss-plugin-global": "^10.0.3",
+        "jss-plugin-nested": "^10.0.3",
+        "jss-plugin-props-sort": "^10.0.3",
+        "jss-plugin-rule-value-function": "^10.0.3",
+        "jss-plugin-vendor-prefixer": "^10.0.3",
+        "prop-types": "^15.7.2"
+      }
+    },
+    "@material-ui/system": {
+      "version": "5.0.0-beta.2",
+      "resolved": "https://registry.npmjs.org/@material-ui/system/-/system-5.0.0-beta.2.tgz",
+      "integrity": "sha512-dGx8+fk97GGj0Q0uh8sHgf86PsPfRsB2MO3wuBTZoRHtnqDrKoQPgsm6tiWmhOUl6d2nRpQL3la9k91diVWWeA==",
+      "requires": {
+        "@babel/runtime": "^7.4.4",
+        "@material-ui/private-theming": "5.0.0-beta.2",
+        "@material-ui/styled-engine": "5.0.0-beta.1",
+        "@material-ui/types": "6.0.1",
+        "@material-ui/utils": "5.0.0-beta.1",
+        "clsx": "^1.0.4",
+        "csstype": "^3.0.2",
+        "prop-types": "^15.7.2"
+      },
+      "dependencies": {
+        "@material-ui/types": {
+          "version": "6.0.1",
+          "resolved": "https://registry.npmjs.org/@material-ui/types/-/types-6.0.1.tgz",
+          "integrity": "sha512-t53C2BZE59e8ao38EDIZdM2smPDSEo5Xx9XxQ/MNM9Ph63Mu4vj5pmECiXkYp0y2OrvFiiZhcqRWV34SBOA18g=="
+        },
+        "@material-ui/utils": {
+          "version": "5.0.0-beta.1",
+          "resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-5.0.0-beta.1.tgz",
+          "integrity": "sha512-63E5b1iW79T6dga7Ao1turX4s5P8jipCMVw1tDjKHMiauILb8C6TmUPde+NoM+fQ6OTppC9JxdOXzuotxNRWNA==",
+          "requires": {
+            "@babel/runtime": "^7.4.4",
+            "@types/prop-types": "^15.7.3",
+            "@types/react-is": "^16.7.1 || ^17.0.0",
+            "prop-types": "^15.7.2",
+            "react-is": "^17.0.0"
+          }
+        },
+        "react-is": {
+          "version": "17.0.2",
+          "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+          "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
+        }
+      }
+    },
+    "@material-ui/types": {
+      "version": "5.1.7",
+      "resolved": "https://registry.npmjs.org/@material-ui/types/-/types-5.1.7.tgz",
+      "integrity": "sha512-OSpB0gEKZm5h4izTLyipb34PkfazpvusgQMDTmFkSuqcKoChTshfGejEYX6uaZ+4m5xlT5qzihE6eKA+JnjELg=="
+    },
+    "@material-ui/unstyled": {
+      "version": "5.0.0-alpha.41",
+      "resolved": "https://registry.npmjs.org/@material-ui/unstyled/-/unstyled-5.0.0-alpha.41.tgz",
+      "integrity": "sha512-o8zxhFLHi0rEJlneJRUSwP0WLWrstEQDmSzgJ87NZ/KvQn5xO0fYMZ0sSuHjZX5fQdGnCXN6nQvu48MGVJitqg==",
+      "requires": {
+        "@babel/runtime": "^7.4.4",
+        "@emotion/is-prop-valid": "^1.1.0",
+        "@material-ui/utils": "5.0.0-beta.1",
+        "clsx": "^1.0.4",
+        "prop-types": "^15.7.2",
+        "react-is": "^17.0.0"
+      },
+      "dependencies": {
+        "@material-ui/utils": {
+          "version": "5.0.0-beta.1",
+          "resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-5.0.0-beta.1.tgz",
+          "integrity": "sha512-63E5b1iW79T6dga7Ao1turX4s5P8jipCMVw1tDjKHMiauILb8C6TmUPde+NoM+fQ6OTppC9JxdOXzuotxNRWNA==",
+          "requires": {
+            "@babel/runtime": "^7.4.4",
+            "@types/prop-types": "^15.7.3",
+            "@types/react-is": "^16.7.1 || ^17.0.0",
+            "prop-types": "^15.7.2",
+            "react-is": "^17.0.0"
+          }
+        },
+        "react-is": {
+          "version": "17.0.2",
+          "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+          "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
+        }
+      }
+    },
+    "@material-ui/utils": {
+      "version": "5.0.0-alpha.27",
+      "resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-5.0.0-alpha.27.tgz",
+      "integrity": "sha512-58B978wD2zon+hEtZIj9uW500JXBXfwgUd3TFN0qoRZ/A+T18fPR6YYbcMpzm8/7Hoh/Xr04jqzzvY4gfNUmUg==",
+      "requires": {
+        "@babel/runtime": "^7.4.4",
+        "@types/prop-types": "^15.7.3",
+        "@types/react-is": "^16.7.1 || ^17.0.0",
+        "prop-types": "^15.7.2",
+        "react-is": "^16.8.0 || ^17.0.0"
+      }
+    },
+    "@nodelib/fs.scandir": {
+      "version": "2.1.5",
+      "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+      "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+      "dev": true,
+      "requires": {
+        "@nodelib/fs.stat": "2.0.5",
+        "run-parallel": "^1.1.9"
+      }
+    },
+    "@nodelib/fs.stat": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+      "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+      "dev": true
+    },
+    "@nodelib/fs.walk": {
+      "version": "1.2.8",
+      "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+      "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+      "dev": true,
+      "requires": {
+        "@nodelib/fs.scandir": "2.1.5",
+        "fastq": "^1.6.0"
+      }
+    },
+    "@polka/url": {
+      "version": "1.0.0-next.15",
+      "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.15.tgz",
+      "integrity": "sha512-15spi3V28QdevleWBNXE4pIls3nFZmBbUGrW9IVPwiQczuSb9n76TCB4bsk8TSel+I1OkHEdPhu5QKMfY6rQHA==",
+      "dev": true
+    },
+    "@popperjs/core": {
+      "version": "2.9.2",
+      "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.2.tgz",
+      "integrity": "sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q=="
+    },
+    "@sinonjs/commons": {
+      "version": "1.8.2",
+      "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.2.tgz",
+      "integrity": "sha512-sruwd86RJHdsVf/AtBoijDmUqJp3B6hF/DGC23C+JaegnDHaZyewCjoVGTdg3J0uz3Zs7NnIT05OBOmML72lQw==",
+      "dev": true,
+      "requires": {
+        "type-detect": "4.0.8"
+      }
+    },
+    "@sinonjs/fake-timers": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz",
+      "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==",
+      "dev": true,
+      "requires": {
+        "@sinonjs/commons": "^1.7.0"
+      }
+    },
+    "@sinonjs/samsam": {
+      "version": "5.3.1",
+      "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-5.3.1.tgz",
+      "integrity": "sha512-1Hc0b1TtyfBu8ixF/tpfSHTVWKwCBLY4QJbkgnE7HcwyvT2xArDxb4K7dMgqRm3szI+LJbzmW/s4xxEhv6hwDg==",
+      "dev": true,
+      "requires": {
+        "@sinonjs/commons": "^1.6.0",
+        "lodash.get": "^4.4.2",
+        "type-detect": "^4.0.8"
+      }
+    },
+    "@sinonjs/text-encoding": {
+      "version": "0.7.1",
+      "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz",
+      "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==",
+      "dev": true
+    },
+    "@testing-library/dom": {
+      "version": "8.1.0",
+      "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.1.0.tgz",
+      "integrity": "sha512-kmW9alndr19qd6DABzQ978zKQ+J65gU2Rzkl8hriIetPnwpesRaK4//jEQyYh8fEALmGhomD/LBQqt+o+DL95Q==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.10.4",
+        "@babel/runtime": "^7.12.5",
+        "@types/aria-query": "^4.2.0",
+        "aria-query": "^4.2.2",
+        "chalk": "^4.1.0",
+        "dom-accessibility-api": "^0.5.6",
+        "lz-string": "^1.4.4",
+        "pretty-format": "^27.0.2"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+          "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
+    "@testing-library/react": {
+      "version": "11.2.7",
+      "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-11.2.7.tgz",
+      "integrity": "sha512-tzRNp7pzd5QmbtXNG/mhdcl7Awfu/Iz1RaVHY75zTdOkmHCuzMhRL83gWHSgOAcjS3CCbyfwUHMZgRJb4kAfpA==",
+      "dev": true,
+      "requires": {
+        "@babel/runtime": "^7.12.5",
+        "@testing-library/dom": "^7.28.1"
+      },
+      "dependencies": {
+        "@jest/types": {
+          "version": "26.6.2",
+          "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz",
+          "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==",
+          "dev": true,
+          "requires": {
+            "@types/istanbul-lib-coverage": "^2.0.0",
+            "@types/istanbul-reports": "^3.0.0",
+            "@types/node": "*",
+            "@types/yargs": "^15.0.0",
+            "chalk": "^4.0.0"
+          }
+        },
+        "@testing-library/dom": {
+          "version": "7.31.2",
+          "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-7.31.2.tgz",
+          "integrity": "sha512-3UqjCpey6HiTZT92vODYLPxTBWlM8ZOOjr3LX5F37/VRipW2M1kX6I/Cm4VXzteZqfGfagg8yXywpcOgQBlNsQ==",
+          "dev": true,
+          "requires": {
+            "@babel/code-frame": "^7.10.4",
+            "@babel/runtime": "^7.12.5",
+            "@types/aria-query": "^4.2.0",
+            "aria-query": "^4.2.2",
+            "chalk": "^4.1.0",
+            "dom-accessibility-api": "^0.5.6",
+            "lz-string": "^1.4.4",
+            "pretty-format": "^26.6.2"
+          }
+        },
+        "@types/yargs": {
+          "version": "15.0.14",
+          "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.14.tgz",
+          "integrity": "sha512-yEJzHoxf6SyQGhBhIYGXQDSCkJjB6HohDShto7m8vaKg9Yp0Yn8+71J9eakh2bnPg6BfsH9PRMhiRTZnd4eXGQ==",
+          "dev": true,
+          "requires": {
+            "@types/yargs-parser": "*"
+          }
+        },
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+          "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true
+        },
+        "pretty-format": {
+          "version": "26.6.2",
+          "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz",
+          "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==",
+          "dev": true,
+          "requires": {
+            "@jest/types": "^26.6.2",
+            "ansi-regex": "^5.0.0",
+            "ansi-styles": "^4.0.0",
+            "react-is": "^17.0.1"
+          }
+        },
+        "react-is": {
+          "version": "17.0.2",
+          "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+          "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
+    "@testing-library/user-event": {
+      "version": "13.2.1",
+      "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-13.2.1.tgz",
+      "integrity": "sha512-cczlgVl+krjOb3j1625usarNEibI0IFRJrSWX9UsJ1HKYFgCQv9Nb7QAipUDXl3Xdz8NDTsiS78eAkPSxlzTlw==",
+      "dev": true,
+      "requires": {
+        "@babel/runtime": "^7.12.5"
+      }
+    },
+    "@types/anymatch": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/@types/anymatch/-/anymatch-1.3.1.tgz",
+      "integrity": "sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA==",
+      "dev": true
+    },
+    "@types/aria-query": {
+      "version": "4.2.2",
+      "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz",
+      "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==",
+      "dev": true
+    },
+    "@types/chai": {
+      "version": "4.2.21",
+      "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.21.tgz",
+      "integrity": "sha512-yd+9qKmJxm496BOV9CMNaey8TWsikaZOwMRwPHQIjcOJM9oV+fi9ZMNw3JsVnbEEbo2gRTDnGEBv8pjyn67hNg==",
+      "dev": true
+    },
+    "@types/component-emitter": {
+      "version": "1.2.10",
+      "resolved": "https://registry.npmjs.org/@types/component-emitter/-/component-emitter-1.2.10.tgz",
+      "integrity": "sha512-bsjleuRKWmGqajMerkzox19aGbscQX5rmmvvXl3wlIp5gMG1HgkiwPxsN5p070fBDKTNSPgojVbuY1+HWMbFhg==",
+      "dev": true
+    },
+    "@types/cookie": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz",
+      "integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==",
+      "dev": true
+    },
+    "@types/cors": {
+      "version": "2.8.12",
+      "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz",
+      "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==",
+      "dev": true
+    },
+    "@types/gapi": {
+      "version": "0.0.39",
+      "resolved": "https://registry.npmjs.org/@types/gapi/-/gapi-0.0.39.tgz",
+      "integrity": "sha512-R1TZeZbvvbIC60DBJMhuOEivQHzOQtzl3uMDOOENTYQTSSDB6oEMpJo8HVPOTWivdUTbyEcB5qQOVr/JCKRlCQ=="
+    },
+    "@types/gapi.auth2": {
+      "version": "0.0.54",
+      "resolved": "https://registry.npmjs.org/@types/gapi.auth2/-/gapi.auth2-0.0.54.tgz",
+      "integrity": "sha512-4HEphaKsGndb9+tnd2PBBmxloaij04iYXVsjgHpFxqbPFt5Le6pasoh5g5BEtwp/YEm9xDbzssp44BYR2/7RcQ==",
+      "requires": {
+        "@types/gapi": "*"
+      }
+    },
+    "@types/hoist-non-react-statics": {
+      "version": "3.3.1",
+      "resolved": "https://registry.npmjs.org/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
+      "integrity": "sha512-iMIqiko6ooLrTh1joXodJK5X9xeEALT1kM5G3ZLhD3hszxBdIEd5C75U834D9mLcINgD4OyZf5uQXjkuYydWvA==",
+      "requires": {
+        "@types/react": "*",
+        "hoist-non-react-statics": "^3.3.0"
+      }
+    },
+    "@types/html-minifier-terser": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz",
+      "integrity": "sha512-giAlZwstKbmvMk1OO7WXSj4OZ0keXAcl2TQq4LWHiiPH2ByaH7WeUzng+Qej8UPxxv+8lRTuouo0iaNDBuzIBA==",
+      "dev": true
+    },
+    "@types/istanbul-lib-coverage": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz",
+      "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==",
+      "dev": true
+    },
+    "@types/istanbul-lib-report": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz",
+      "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==",
+      "dev": true,
+      "requires": {
+        "@types/istanbul-lib-coverage": "*"
+      }
+    },
+    "@types/istanbul-reports": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz",
+      "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==",
+      "dev": true,
+      "requires": {
+        "@types/istanbul-lib-report": "*"
+      }
+    },
+    "@types/json-schema": {
+      "version": "7.0.9",
+      "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz",
+      "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==",
+      "dev": true
+    },
+    "@types/mocha": {
+      "version": "8.2.3",
+      "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz",
+      "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==",
+      "dev": true
+    },
+    "@types/node": {
+      "version": "14.14.20",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz",
+      "integrity": "sha512-Y93R97Ouif9JEOWPIUyU+eyIdyRqQR0I8Ez1dzku4hDx34NWh4HbtIc3WNzwB1Y9ULvNGeu5B8h8bVL5cAk4/A==",
+      "dev": true
+    },
+    "@types/parse-json": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
+      "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="
+    },
+    "@types/prop-types": {
+      "version": "15.7.4",
+      "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz",
+      "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ=="
+    },
+    "@types/react": {
+      "version": "17.0.14",
+      "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.14.tgz",
+      "integrity": "sha512-0WwKHUbWuQWOce61UexYuWTGuGY/8JvtUe/dtQ6lR4sZ3UiylHotJeWpf3ArP9+DSGUoLY3wbU59VyMrJps5VQ==",
+      "requires": {
+        "@types/prop-types": "*",
+        "@types/scheduler": "*",
+        "csstype": "^3.0.2"
+      }
+    },
+    "@types/react-dom": {
+      "version": "17.0.9",
+      "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.9.tgz",
+      "integrity": "sha512-wIvGxLfgpVDSAMH5utdL9Ngm5Owu0VsGmldro3ORLXV8CShrL8awVj06NuEXFQ5xyaYfdca7Sgbk/50Ri1GdPg==",
+      "dev": true,
+      "requires": {
+        "@types/react": "*"
+      }
+    },
+    "@types/react-is": {
+      "version": "17.0.2",
+      "resolved": "https://registry.npmjs.org/@types/react-is/-/react-is-17.0.2.tgz",
+      "integrity": "sha512-2+L0ilcAEG8udkDnvx8B0upwXFBbNnVwOsSCTxW3SDOkmar9NyEeLG0ZLa3uOEw9zyYf/fQapcnfXAVmDKlyHw==",
+      "requires": {
+        "@types/react": "*"
+      }
+    },
+    "@types/react-redux": {
+      "version": "7.1.18",
+      "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.18.tgz",
+      "integrity": "sha512-9iwAsPyJ9DLTRH+OFeIrm9cAbIj1i2ANL3sKQFATqnPWRbg+jEFXyZOKHiQK/N86pNRXbb4HRxAxo0SIX1XwzQ==",
+      "requires": {
+        "@types/hoist-non-react-statics": "^3.3.0",
+        "@types/react": "*",
+        "hoist-non-react-statics": "^3.3.0",
+        "redux": "^4.0.0"
+      }
+    },
+    "@types/react-transition-group": {
+      "version": "4.4.2",
+      "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.2.tgz",
+      "integrity": "sha512-KibDWL6nshuOJ0fu8ll7QnV/LVTo3PzQ9aCPnRUYPfX7eZohHwLIdNHj7pftanREzHNP4/nJa8oeM73uSiavMQ==",
+      "requires": {
+        "@types/react": "*"
+      }
+    },
+    "@types/scheduler": {
+      "version": "0.16.2",
+      "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz",
+      "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew=="
+    },
+    "@types/source-list-map": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/@types/source-list-map/-/source-list-map-0.1.2.tgz",
+      "integrity": "sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA==",
+      "dev": true
+    },
+    "@types/tapable": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-1.0.6.tgz",
+      "integrity": "sha512-W+bw9ds02rAQaMvaLYxAbJ6cvguW/iJXNT6lTssS1ps6QdrMKttqEAMEG/b5CR8TZl3/L7/lH0ZV5nNR1LXikA==",
+      "dev": true
+    },
+    "@types/uglify-js": {
+      "version": "3.11.1",
+      "resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-3.11.1.tgz",
+      "integrity": "sha512-7npvPKV+jINLu1SpSYVWG8KvyJBhBa8tmzMMdDoVc2pWUYHN8KIXlPJhjJ4LT97c4dXJA2SHL/q6ADbDriZN+Q==",
+      "dev": true,
+      "requires": {
+        "source-map": "^0.6.1"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "@types/webpack": {
+      "version": "4.41.26",
+      "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.26.tgz",
+      "integrity": "sha512-7ZyTfxjCRwexh+EJFwRUM+CDB2XvgHl4vfuqf1ZKrgGvcS5BrNvPQqJh3tsZ0P6h6Aa1qClVHaJZszLPzpqHeA==",
+      "dev": true,
+      "requires": {
+        "@types/anymatch": "*",
+        "@types/node": "*",
+        "@types/tapable": "*",
+        "@types/uglify-js": "*",
+        "@types/webpack-sources": "*",
+        "source-map": "^0.6.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "@types/webpack-sources": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/@types/webpack-sources/-/webpack-sources-2.1.0.tgz",
+      "integrity": "sha512-LXn/oYIpBeucgP1EIJbKQ2/4ZmpvRl+dlrFdX7+94SKRUV3Evy3FsfMZY318vGhkWUS5MPhtOM3w1/hCOAOXcg==",
+      "dev": true,
+      "requires": {
+        "@types/node": "*",
+        "@types/source-list-map": "*",
+        "source-map": "^0.7.3"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.7.3",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
+          "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
+          "dev": true
+        }
+      }
+    },
+    "@types/yargs": {
+      "version": "16.0.4",
+      "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz",
+      "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==",
+      "dev": true,
+      "requires": {
+        "@types/yargs-parser": "*"
+      }
+    },
+    "@types/yargs-parser": {
+      "version": "20.2.1",
+      "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz",
+      "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==",
+      "dev": true
+    },
+    "@types/yauzl": {
+      "version": "2.9.1",
+      "resolved": "https://registry.npmjs.org/@types/yauzl/-/yauzl-2.9.1.tgz",
+      "integrity": "sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "@types/node": "*"
+      }
+    },
+    "@typescript-eslint/eslint-plugin": {
+      "version": "4.28.3",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.28.3.tgz",
+      "integrity": "sha512-jW8sEFu1ZeaV8xzwsfi6Vgtty2jf7/lJmQmDkDruBjYAbx5DA8JtbcMnP0rNPUG+oH5GoQBTSp+9613BzuIpYg==",
+      "dev": true,
+      "requires": {
+        "@typescript-eslint/experimental-utils": "4.28.3",
+        "@typescript-eslint/scope-manager": "4.28.3",
+        "debug": "^4.3.1",
+        "functional-red-black-tree": "^1.0.1",
+        "regexpp": "^3.1.0",
+        "semver": "^7.3.5",
+        "tsutils": "^3.21.0"
+      },
+      "dependencies": {
+        "semver": {
+          "version": "7.3.5",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+          "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+          "dev": true,
+          "requires": {
+            "lru-cache": "^6.0.0"
+          }
+        }
+      }
+    },
+    "@typescript-eslint/experimental-utils": {
+      "version": "4.28.3",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.28.3.tgz",
+      "integrity": "sha512-zZYl9TnrxwEPi3FbyeX0ZnE8Hp7j3OCR+ELoUfbwGHGxWnHg9+OqSmkw2MoCVpZksPCZYpQzC559Ee9pJNHTQw==",
+      "dev": true,
+      "requires": {
+        "@types/json-schema": "^7.0.7",
+        "@typescript-eslint/scope-manager": "4.28.3",
+        "@typescript-eslint/types": "4.28.3",
+        "@typescript-eslint/typescript-estree": "4.28.3",
+        "eslint-scope": "^5.1.1",
+        "eslint-utils": "^3.0.0"
+      }
+    },
+    "@typescript-eslint/parser": {
+      "version": "4.28.3",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.28.3.tgz",
+      "integrity": "sha512-ZyWEn34bJexn/JNYvLQab0Mo5e+qqQNhknxmc8azgNd4XqspVYR5oHq9O11fLwdZMRcj4by15ghSlIEq+H5ltQ==",
+      "dev": true,
+      "requires": {
+        "@typescript-eslint/scope-manager": "4.28.3",
+        "@typescript-eslint/types": "4.28.3",
+        "@typescript-eslint/typescript-estree": "4.28.3",
+        "debug": "^4.3.1"
+      }
+    },
+    "@typescript-eslint/scope-manager": {
+      "version": "4.28.3",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.28.3.tgz",
+      "integrity": "sha512-/8lMisZ5NGIzGtJB+QizQ5eX4Xd8uxedFfMBXOKuJGP0oaBBVEMbJVddQKDXyyB0bPlmt8i6bHV89KbwOelJiQ==",
+      "dev": true,
+      "requires": {
+        "@typescript-eslint/types": "4.28.3",
+        "@typescript-eslint/visitor-keys": "4.28.3"
+      }
+    },
+    "@typescript-eslint/types": {
+      "version": "4.28.3",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.28.3.tgz",
+      "integrity": "sha512-kQFaEsQBQVtA9VGVyciyTbIg7S3WoKHNuOp/UF5RG40900KtGqfoiETWD/v0lzRXc+euVE9NXmfer9dLkUJrkA==",
+      "dev": true
+    },
+    "@typescript-eslint/typescript-estree": {
+      "version": "4.28.3",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.28.3.tgz",
+      "integrity": "sha512-YAb1JED41kJsqCQt1NcnX5ZdTA93vKFCMP4lQYG6CFxd0VzDJcKttRlMrlG+1qiWAw8+zowmHU1H0OzjWJzR2w==",
+      "dev": true,
+      "requires": {
+        "@typescript-eslint/types": "4.28.3",
+        "@typescript-eslint/visitor-keys": "4.28.3",
+        "debug": "^4.3.1",
+        "globby": "^11.0.3",
+        "is-glob": "^4.0.1",
+        "semver": "^7.3.5",
+        "tsutils": "^3.21.0"
+      },
+      "dependencies": {
+        "semver": {
+          "version": "7.3.5",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+          "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+          "dev": true,
+          "requires": {
+            "lru-cache": "^6.0.0"
+          }
+        }
+      }
+    },
+    "@typescript-eslint/visitor-keys": {
+      "version": "4.28.3",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.28.3.tgz",
+      "integrity": "sha512-ri1OzcLnk1HH4gORmr1dllxDzzrN6goUIz/P4MHFV0YZJDCADPR3RvYNp0PW2SetKTThar6wlbFTL00hV2Q+fg==",
+      "dev": true,
+      "requires": {
+        "@typescript-eslint/types": "4.28.3",
+        "eslint-visitor-keys": "^2.0.0"
+      },
+      "dependencies": {
+        "eslint-visitor-keys": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
+          "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
+          "dev": true
+        }
+      }
+    },
+    "@webassemblyjs/ast": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz",
+      "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==",
+      "dev": true,
+      "requires": {
+        "@webassemblyjs/helper-module-context": "1.9.0",
+        "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
+        "@webassemblyjs/wast-parser": "1.9.0"
+      }
+    },
+    "@webassemblyjs/floating-point-hex-parser": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz",
+      "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==",
+      "dev": true
+    },
+    "@webassemblyjs/helper-api-error": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz",
+      "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==",
+      "dev": true
+    },
+    "@webassemblyjs/helper-buffer": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz",
+      "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==",
+      "dev": true
+    },
+    "@webassemblyjs/helper-code-frame": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz",
+      "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==",
+      "dev": true,
+      "requires": {
+        "@webassemblyjs/wast-printer": "1.9.0"
+      }
+    },
+    "@webassemblyjs/helper-fsm": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz",
+      "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==",
+      "dev": true
+    },
+    "@webassemblyjs/helper-module-context": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz",
+      "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==",
+      "dev": true,
+      "requires": {
+        "@webassemblyjs/ast": "1.9.0"
+      }
+    },
+    "@webassemblyjs/helper-wasm-bytecode": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz",
+      "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==",
+      "dev": true
+    },
+    "@webassemblyjs/helper-wasm-section": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz",
+      "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==",
+      "dev": true,
+      "requires": {
+        "@webassemblyjs/ast": "1.9.0",
+        "@webassemblyjs/helper-buffer": "1.9.0",
+        "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
+        "@webassemblyjs/wasm-gen": "1.9.0"
+      }
+    },
+    "@webassemblyjs/ieee754": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz",
+      "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==",
+      "dev": true,
+      "requires": {
+        "@xtuc/ieee754": "^1.2.0"
+      }
+    },
+    "@webassemblyjs/leb128": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz",
+      "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==",
+      "dev": true,
+      "requires": {
+        "@xtuc/long": "4.2.2"
+      }
+    },
+    "@webassemblyjs/utf8": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz",
+      "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==",
+      "dev": true
+    },
+    "@webassemblyjs/wasm-edit": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz",
+      "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==",
+      "dev": true,
+      "requires": {
+        "@webassemblyjs/ast": "1.9.0",
+        "@webassemblyjs/helper-buffer": "1.9.0",
+        "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
+        "@webassemblyjs/helper-wasm-section": "1.9.0",
+        "@webassemblyjs/wasm-gen": "1.9.0",
+        "@webassemblyjs/wasm-opt": "1.9.0",
+        "@webassemblyjs/wasm-parser": "1.9.0",
+        "@webassemblyjs/wast-printer": "1.9.0"
+      }
+    },
+    "@webassemblyjs/wasm-gen": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz",
+      "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==",
+      "dev": true,
+      "requires": {
+        "@webassemblyjs/ast": "1.9.0",
+        "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
+        "@webassemblyjs/ieee754": "1.9.0",
+        "@webassemblyjs/leb128": "1.9.0",
+        "@webassemblyjs/utf8": "1.9.0"
+      }
+    },
+    "@webassemblyjs/wasm-opt": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz",
+      "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==",
+      "dev": true,
+      "requires": {
+        "@webassemblyjs/ast": "1.9.0",
+        "@webassemblyjs/helper-buffer": "1.9.0",
+        "@webassemblyjs/wasm-gen": "1.9.0",
+        "@webassemblyjs/wasm-parser": "1.9.0"
+      }
+    },
+    "@webassemblyjs/wasm-parser": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz",
+      "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==",
+      "dev": true,
+      "requires": {
+        "@webassemblyjs/ast": "1.9.0",
+        "@webassemblyjs/helper-api-error": "1.9.0",
+        "@webassemblyjs/helper-wasm-bytecode": "1.9.0",
+        "@webassemblyjs/ieee754": "1.9.0",
+        "@webassemblyjs/leb128": "1.9.0",
+        "@webassemblyjs/utf8": "1.9.0"
+      }
+    },
+    "@webassemblyjs/wast-parser": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz",
+      "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==",
+      "dev": true,
+      "requires": {
+        "@webassemblyjs/ast": "1.9.0",
+        "@webassemblyjs/floating-point-hex-parser": "1.9.0",
+        "@webassemblyjs/helper-api-error": "1.9.0",
+        "@webassemblyjs/helper-code-frame": "1.9.0",
+        "@webassemblyjs/helper-fsm": "1.9.0",
+        "@xtuc/long": "4.2.2"
+      }
+    },
+    "@webassemblyjs/wast-printer": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz",
+      "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==",
+      "dev": true,
+      "requires": {
+        "@webassemblyjs/ast": "1.9.0",
+        "@webassemblyjs/wast-parser": "1.9.0",
+        "@xtuc/long": "4.2.2"
+      }
+    },
+    "@webpack-cli/configtest": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.4.tgz",
+      "integrity": "sha512-cs3XLy+UcxiP6bj0A6u7MLLuwdXJ1c3Dtc0RkKg+wiI1g/Ti1om8+/2hc2A2B60NbBNAbMgyBMHvyymWm/j4wQ==",
+      "dev": true
+    },
+    "@webpack-cli/info": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.3.0.tgz",
+      "integrity": "sha512-ASiVB3t9LOKHs5DyVUcxpraBXDOKubYu/ihHhU+t1UPpxsivg6Od2E2qU4gJCekfEddzRBzHhzA/Acyw/mlK/w==",
+      "dev": true,
+      "requires": {
+        "envinfo": "^7.7.3"
+      }
+    },
+    "@webpack-cli/serve": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.1.tgz",
+      "integrity": "sha512-4vSVUiOPJLmr45S8rMGy7WDvpWxfFxfP/Qx/cxZFCfvoypTYpPPL1X8VIZMe0WTA+Jr7blUxwUSEZNkjoMTgSw==",
+      "dev": true
+    },
+    "@xtuc/ieee754": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
+      "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==",
+      "dev": true
+    },
+    "@xtuc/long": {
+      "version": "4.2.2",
+      "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
+      "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==",
+      "dev": true
+    },
+    "abbrev": {
+      "version": "1.0.9",
+      "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz",
+      "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=",
+      "dev": true
+    },
+    "accepts": {
+      "version": "1.3.7",
+      "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
+      "integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
+      "dev": true,
+      "requires": {
+        "mime-types": "~2.1.24",
+        "negotiator": "0.6.2"
+      }
+    },
+    "acorn": {
+      "version": "7.4.1",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
+      "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
+      "dev": true
+    },
+    "acorn-jsx": {
+      "version": "5.3.2",
+      "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+      "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
+      "dev": true
+    },
+    "acorn-walk": {
+      "version": "8.1.1",
+      "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.1.tgz",
+      "integrity": "sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w==",
+      "dev": true
+    },
+    "agent-base": {
+      "version": "6.0.2",
+      "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
+      "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
+      "dev": true,
+      "requires": {
+        "debug": "4"
+      }
+    },
+    "ajv": {
+      "version": "6.12.6",
+      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+      "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+      "dev": true,
+      "requires": {
+        "fast-deep-equal": "^3.1.1",
+        "fast-json-stable-stringify": "^2.0.0",
+        "json-schema-traverse": "^0.4.1",
+        "uri-js": "^4.2.2"
+      }
+    },
+    "ajv-errors": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz",
+      "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==",
+      "dev": true
+    },
+    "ajv-keywords": {
+      "version": "3.5.2",
+      "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
+      "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
+      "dev": true
+    },
+    "amdefine": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz",
+      "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
+      "dev": true,
+      "optional": true
+    },
+    "ansi-colors": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
+      "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
+      "dev": true
+    },
+    "ansi-regex": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+      "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
+      "dev": true
+    },
+    "ansi-styles": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+      "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+      "requires": {
+        "color-convert": "^1.9.0"
+      }
+    },
+    "anymatch": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
+      "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
+      "dev": true,
+      "requires": {
+        "normalize-path": "^3.0.0",
+        "picomatch": "^2.0.4"
+      }
+    },
+    "aproba": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
+      "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
+      "dev": true
+    },
+    "argparse": {
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+      "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+      "dev": true,
+      "requires": {
+        "sprintf-js": "~1.0.2"
+      }
+    },
+    "aria-query": {
+      "version": "4.2.2",
+      "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz",
+      "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==",
+      "dev": true,
+      "requires": {
+        "@babel/runtime": "^7.10.2",
+        "@babel/runtime-corejs3": "^7.10.2"
+      }
+    },
+    "arr-diff": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+      "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
+      "dev": true
+    },
+    "arr-flatten": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
+      "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
+      "dev": true
+    },
+    "arr-union": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
+      "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
+      "dev": true
+    },
+    "array-filter": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/array-filter/-/array-filter-1.0.0.tgz",
+      "integrity": "sha1-uveeYubvTCpMC4MSMtr/7CUfnYM=",
+      "dev": true
+    },
+    "array-includes": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz",
+      "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.18.0-next.2",
+        "get-intrinsic": "^1.1.1",
+        "is-string": "^1.0.5"
+      },
+      "dependencies": {
+        "es-abstract": {
+          "version": "1.18.0-next.2",
+          "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.2.tgz",
+          "integrity": "sha512-Ih4ZMFHEtZupnUh6497zEL4y2+w8+1ljnCyaTa+adcoafI1GOvMwFlDjBLfWR7y9VLfrjRJe9ocuHY1PSR9jjw==",
+          "dev": true,
+          "requires": {
+            "call-bind": "^1.0.2",
+            "es-to-primitive": "^1.2.1",
+            "function-bind": "^1.1.1",
+            "get-intrinsic": "^1.0.2",
+            "has": "^1.0.3",
+            "has-symbols": "^1.0.1",
+            "is-callable": "^1.2.2",
+            "is-negative-zero": "^2.0.1",
+            "is-regex": "^1.1.1",
+            "object-inspect": "^1.9.0",
+            "object-keys": "^1.1.1",
+            "object.assign": "^4.1.2",
+            "string.prototype.trimend": "^1.0.3",
+            "string.prototype.trimstart": "^1.0.3"
+          }
+        }
+      }
+    },
+    "array-union": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
+      "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
+      "dev": true
+    },
+    "array-unique": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+      "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
+      "dev": true
+    },
+    "array.prototype.flatmap": {
+      "version": "1.2.4",
+      "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.4.tgz",
+      "integrity": "sha512-r9Z0zYoxqHz60vvQbWEdXIEtCwHF0yxaWfno9qzXeNHvfyl3BZqygmGzb84dsubyaXLH4husF+NFgMSdpZhk2Q==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.18.0-next.1",
+        "function-bind": "^1.1.1"
+      }
+    },
+    "asn1.js": {
+      "version": "5.4.1",
+      "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz",
+      "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^4.0.0",
+        "inherits": "^2.0.1",
+        "minimalistic-assert": "^1.0.0",
+        "safer-buffer": "^2.1.0"
+      },
+      "dependencies": {
+        "bn.js": {
+          "version": "4.12.0",
+          "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+          "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
+          "dev": true
+        }
+      }
+    },
+    "assert": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz",
+      "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==",
+      "dev": true,
+      "requires": {
+        "object-assign": "^4.1.1",
+        "util": "0.10.3"
+      },
+      "dependencies": {
+        "inherits": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz",
+          "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=",
+          "dev": true
+        },
+        "util": {
+          "version": "0.10.3",
+          "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz",
+          "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=",
+          "dev": true,
+          "requires": {
+            "inherits": "2.0.1"
+          }
+        }
+      }
+    },
+    "assertion-error": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
+      "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
+      "dev": true
+    },
+    "assign-symbols": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
+      "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
+      "dev": true
+    },
+    "ast-types-flow": {
+      "version": "0.0.7",
+      "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz",
+      "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=",
+      "dev": true
+    },
+    "astral-regex": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
+      "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
+      "dev": true
+    },
+    "async": {
+      "version": "1.5.2",
+      "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
+      "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=",
+      "dev": true
+    },
+    "async-each": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
+      "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
+      "dev": true,
+      "optional": true
+    },
+    "atob": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
+      "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
+      "dev": true
+    },
+    "autoprefixer": {
+      "version": "10.3.1",
+      "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.3.1.tgz",
+      "integrity": "sha512-L8AmtKzdiRyYg7BUXJTzigmhbQRCXFKz6SA1Lqo0+AR2FBbQ4aTAPFSDlOutnFkjhiz8my4agGXog1xlMjPJ6A==",
+      "dev": true,
+      "requires": {
+        "browserslist": "^4.16.6",
+        "caniuse-lite": "^1.0.30001243",
+        "colorette": "^1.2.2",
+        "fraction.js": "^4.1.1",
+        "normalize-range": "^0.1.2",
+        "postcss-value-parser": "^4.1.0"
+      }
+    },
+    "available-typed-arrays": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz",
+      "integrity": "sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ==",
+      "dev": true,
+      "requires": {
+        "array-filter": "^1.0.0"
+      }
+    },
+    "axe-core": {
+      "version": "4.3.1",
+      "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.3.1.tgz",
+      "integrity": "sha512-3WVgVPs/7OnKU3s+lqMtkv3wQlg3WxK1YifmpJSDO0E1aPBrZWlrrTO6cxRqCXLuX2aYgCljqXIQd0VnRidV0g==",
+      "dev": true
+    },
+    "axobject-query": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz",
+      "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==",
+      "dev": true
+    },
+    "babel-code-frame": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
+      "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
+      "dev": true,
+      "requires": {
+        "chalk": "^1.1.3",
+        "esutils": "^2.0.2",
+        "js-tokens": "^3.0.2"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+          "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+          "dev": true
+        },
+        "ansi-styles": {
+          "version": "2.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
+          "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
+          "dev": true
+        },
+        "chalk": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
+          "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^2.2.1",
+            "escape-string-regexp": "^1.0.2",
+            "has-ansi": "^2.0.0",
+            "strip-ansi": "^3.0.0",
+            "supports-color": "^2.0.0"
+          }
+        },
+        "js-tokens": {
+          "version": "3.0.2",
+          "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
+          "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
+          "dev": true
+        },
+        "strip-ansi": {
+          "version": "3.0.1",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
+          "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^2.0.0"
+          }
+        },
+        "supports-color": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
+          "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
+          "dev": true
+        }
+      }
+    },
+    "babel-eslint": {
+      "version": "10.1.0",
+      "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz",
+      "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "^7.0.0",
+        "@babel/parser": "^7.7.0",
+        "@babel/traverse": "^7.7.0",
+        "@babel/types": "^7.7.0",
+        "eslint-visitor-keys": "^1.0.0",
+        "resolve": "^1.12.0"
+      }
+    },
+    "babel-generator": {
+      "version": "6.26.1",
+      "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz",
+      "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==",
+      "dev": true,
+      "requires": {
+        "babel-messages": "^6.23.0",
+        "babel-runtime": "^6.26.0",
+        "babel-types": "^6.26.0",
+        "detect-indent": "^4.0.0",
+        "jsesc": "^1.3.0",
+        "lodash": "^4.17.4",
+        "source-map": "^0.5.7",
+        "trim-right": "^1.0.1"
+      },
+      "dependencies": {
+        "jsesc": {
+          "version": "1.3.0",
+          "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
+          "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
+          "dev": true
+        }
+      }
+    },
+    "babel-loader": {
+      "version": "8.2.2",
+      "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz",
+      "integrity": "sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g==",
+      "dev": true,
+      "requires": {
+        "find-cache-dir": "^3.3.1",
+        "loader-utils": "^1.4.0",
+        "make-dir": "^3.1.0",
+        "schema-utils": "^2.6.5"
+      },
+      "dependencies": {
+        "find-cache-dir": {
+          "version": "3.3.1",
+          "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz",
+          "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==",
+          "dev": true,
+          "requires": {
+            "commondir": "^1.0.1",
+            "make-dir": "^3.0.2",
+            "pkg-dir": "^4.1.0"
+          }
+        },
+        "schema-utils": {
+          "version": "2.7.1",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz",
+          "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==",
+          "dev": true,
+          "requires": {
+            "@types/json-schema": "^7.0.5",
+            "ajv": "^6.12.4",
+            "ajv-keywords": "^3.5.2"
+          }
+        }
+      }
+    },
+    "babel-messages": {
+      "version": "6.23.0",
+      "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
+      "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
+      "dev": true,
+      "requires": {
+        "babel-runtime": "^6.22.0"
+      }
+    },
+    "babel-plugin-dynamic-import-node": {
+      "version": "2.3.3",
+      "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
+      "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==",
+      "dev": true,
+      "requires": {
+        "object.assign": "^4.1.0"
+      }
+    },
+    "babel-plugin-macros": {
+      "version": "2.8.0",
+      "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz",
+      "integrity": "sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg==",
+      "requires": {
+        "@babel/runtime": "^7.7.2",
+        "cosmiconfig": "^6.0.0",
+        "resolve": "^1.12.0"
+      }
+    },
+    "babel-plugin-polyfill-corejs2": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz",
+      "integrity": "sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ==",
+      "dev": true,
+      "requires": {
+        "@babel/compat-data": "^7.13.11",
+        "@babel/helper-define-polyfill-provider": "^0.2.2",
+        "semver": "^6.1.1"
+      }
+    },
+    "babel-plugin-polyfill-corejs3": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.3.tgz",
+      "integrity": "sha512-rCOFzEIJpJEAU14XCcV/erIf/wZQMmMT5l5vXOpL5uoznyOGfDIjPj6FVytMvtzaKSTSVKouOCTPJ5OMUZH30g==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-define-polyfill-provider": "^0.2.2",
+        "core-js-compat": "^3.14.0"
+      }
+    },
+    "babel-plugin-polyfill-regenerator": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz",
+      "integrity": "sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg==",
+      "dev": true,
+      "requires": {
+        "@babel/helper-define-polyfill-provider": "^0.2.2"
+      }
+    },
+    "babel-runtime": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
+      "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
+      "dev": true,
+      "requires": {
+        "core-js": "^2.4.0",
+        "regenerator-runtime": "^0.11.0"
+      }
+    },
+    "babel-template": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
+      "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
+      "dev": true,
+      "requires": {
+        "babel-runtime": "^6.26.0",
+        "babel-traverse": "^6.26.0",
+        "babel-types": "^6.26.0",
+        "babylon": "^6.18.0",
+        "lodash": "^4.17.4"
+      }
+    },
+    "babel-traverse": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
+      "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
+      "dev": true,
+      "requires": {
+        "babel-code-frame": "^6.26.0",
+        "babel-messages": "^6.23.0",
+        "babel-runtime": "^6.26.0",
+        "babel-types": "^6.26.0",
+        "babylon": "^6.18.0",
+        "debug": "^2.6.8",
+        "globals": "^9.18.0",
+        "invariant": "^2.2.2",
+        "lodash": "^4.17.4"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "globals": {
+          "version": "9.18.0",
+          "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
+          "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
+          "dev": true
+        },
+        "ms": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+          "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+          "dev": true
+        }
+      }
+    },
+    "babel-types": {
+      "version": "6.26.0",
+      "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
+      "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
+      "dev": true,
+      "requires": {
+        "babel-runtime": "^6.26.0",
+        "esutils": "^2.0.2",
+        "lodash": "^4.17.4",
+        "to-fast-properties": "^1.0.3"
+      },
+      "dependencies": {
+        "to-fast-properties": {
+          "version": "1.0.3",
+          "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
+          "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
+          "dev": true
+        }
+      }
+    },
+    "babylon": {
+      "version": "6.18.0",
+      "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
+      "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
+      "dev": true
+    },
+    "balanced-match": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+      "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
+      "dev": true
+    },
+    "base": {
+      "version": "0.11.2",
+      "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
+      "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
+      "dev": true,
+      "requires": {
+        "cache-base": "^1.0.1",
+        "class-utils": "^0.3.5",
+        "component-emitter": "^1.2.1",
+        "define-property": "^1.0.0",
+        "isobject": "^3.0.1",
+        "mixin-deep": "^1.2.0",
+        "pascalcase": "^0.1.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^1.0.0"
+          }
+        }
+      }
+    },
+    "base64-arraybuffer": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.4.tgz",
+      "integrity": "sha1-mBjHngWbE1X5fgQooBfIOOkLqBI=",
+      "dev": true
+    },
+    "base64-js": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
+      "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
+      "dev": true
+    },
+    "base64id": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz",
+      "integrity": "sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==",
+      "dev": true
+    },
+    "big.js": {
+      "version": "5.2.2",
+      "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
+      "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
+      "dev": true
+    },
+    "binary-extensions": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
+      "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+      "dev": true
+    },
+    "bindings": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+      "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "file-uri-to-path": "1.0.0"
+      }
+    },
+    "bl": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz",
+      "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==",
+      "dev": true,
+      "requires": {
+        "buffer": "^5.5.0",
+        "inherits": "^2.0.4",
+        "readable-stream": "^3.4.0"
+      }
+    },
+    "bluebird": {
+      "version": "3.7.2",
+      "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
+      "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
+      "dev": true
+    },
+    "bn.js": {
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz",
+      "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==",
+      "dev": true
+    },
+    "body-parser": {
+      "version": "1.19.0",
+      "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
+      "integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
+      "dev": true,
+      "requires": {
+        "bytes": "3.1.0",
+        "content-type": "~1.0.4",
+        "debug": "2.6.9",
+        "depd": "~1.1.2",
+        "http-errors": "1.7.2",
+        "iconv-lite": "0.4.24",
+        "on-finished": "~2.3.0",
+        "qs": "6.7.0",
+        "raw-body": "2.4.0",
+        "type-is": "~1.6.17"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "ms": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+          "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+          "dev": true
+        },
+        "qs": {
+          "version": "6.7.0",
+          "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
+          "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==",
+          "dev": true
+        }
+      }
+    },
+    "boolbase": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
+      "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
+      "dev": true
+    },
+    "brace-expansion": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+      "dev": true,
+      "requires": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "braces": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
+      "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+      "dev": true,
+      "requires": {
+        "fill-range": "^7.0.1"
+      }
+    },
+    "brorand": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz",
+      "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=",
+      "dev": true
+    },
+    "browser-stdout": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
+      "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
+      "dev": true
+    },
+    "browserify-aes": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz",
+      "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==",
+      "dev": true,
+      "requires": {
+        "buffer-xor": "^1.0.3",
+        "cipher-base": "^1.0.0",
+        "create-hash": "^1.1.0",
+        "evp_bytestokey": "^1.0.3",
+        "inherits": "^2.0.1",
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "browserify-cipher": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz",
+      "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==",
+      "dev": true,
+      "requires": {
+        "browserify-aes": "^1.0.4",
+        "browserify-des": "^1.0.0",
+        "evp_bytestokey": "^1.0.0"
+      }
+    },
+    "browserify-des": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz",
+      "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==",
+      "dev": true,
+      "requires": {
+        "cipher-base": "^1.0.1",
+        "des.js": "^1.0.0",
+        "inherits": "^2.0.1",
+        "safe-buffer": "^5.1.2"
+      }
+    },
+    "browserify-rsa": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz",
+      "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^5.0.0",
+        "randombytes": "^2.0.1"
+      }
+    },
+    "browserify-sign": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz",
+      "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^5.1.1",
+        "browserify-rsa": "^4.0.1",
+        "create-hash": "^1.2.0",
+        "create-hmac": "^1.1.7",
+        "elliptic": "^6.5.3",
+        "inherits": "^2.0.4",
+        "parse-asn1": "^5.1.5",
+        "readable-stream": "^3.6.0",
+        "safe-buffer": "^5.2.0"
+      }
+    },
+    "browserify-zlib": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz",
+      "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==",
+      "dev": true,
+      "requires": {
+        "pako": "~1.0.5"
+      }
+    },
+    "browserslist": {
+      "version": "4.16.6",
+      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz",
+      "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==",
+      "dev": true,
+      "requires": {
+        "caniuse-lite": "^1.0.30001219",
+        "colorette": "^1.2.2",
+        "electron-to-chromium": "^1.3.723",
+        "escalade": "^3.1.1",
+        "node-releases": "^1.1.71"
+      }
+    },
+    "buffer": {
+      "version": "5.7.1",
+      "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
+      "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
+      "dev": true,
+      "requires": {
+        "base64-js": "^1.3.1",
+        "ieee754": "^1.1.13"
+      }
+    },
+    "buffer-crc32": {
+      "version": "0.2.13",
+      "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz",
+      "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=",
+      "dev": true
+    },
+    "buffer-from": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
+      "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
+      "dev": true
+    },
+    "buffer-xor": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz",
+      "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=",
+      "dev": true
+    },
+    "builtin-status-codes": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz",
+      "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=",
+      "dev": true
+    },
+    "bytes": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
+      "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==",
+      "dev": true
+    },
+    "cacache": {
+      "version": "12.0.4",
+      "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz",
+      "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==",
+      "dev": true,
+      "requires": {
+        "bluebird": "^3.5.5",
+        "chownr": "^1.1.1",
+        "figgy-pudding": "^3.5.1",
+        "glob": "^7.1.4",
+        "graceful-fs": "^4.1.15",
+        "infer-owner": "^1.0.3",
+        "lru-cache": "^5.1.1",
+        "mississippi": "^3.0.0",
+        "mkdirp": "^0.5.1",
+        "move-concurrently": "^1.0.1",
+        "promise-inflight": "^1.0.1",
+        "rimraf": "^2.6.3",
+        "ssri": "^6.0.1",
+        "unique-filename": "^1.1.1",
+        "y18n": "^4.0.0"
+      },
+      "dependencies": {
+        "lru-cache": {
+          "version": "5.1.1",
+          "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+          "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+          "dev": true,
+          "requires": {
+            "yallist": "^3.0.2"
+          }
+        },
+        "rimraf": {
+          "version": "2.7.1",
+          "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+          "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+          "dev": true,
+          "requires": {
+            "glob": "^7.1.3"
+          }
+        },
+        "yallist": {
+          "version": "3.1.1",
+          "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+          "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+          "dev": true
+        }
+      }
+    },
+    "cache-base": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
+      "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
+      "dev": true,
+      "requires": {
+        "collection-visit": "^1.0.0",
+        "component-emitter": "^1.2.1",
+        "get-value": "^2.0.6",
+        "has-value": "^1.0.0",
+        "isobject": "^3.0.1",
+        "set-value": "^2.0.0",
+        "to-object-path": "^0.3.0",
+        "union-value": "^1.0.0",
+        "unset-value": "^1.0.0"
+      }
+    },
+    "call-bind": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+      "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+      "requires": {
+        "function-bind": "^1.1.1",
+        "get-intrinsic": "^1.0.2"
+      }
+    },
+    "callsites": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+      "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ=="
+    },
+    "camel-case": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz",
+      "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==",
+      "dev": true,
+      "requires": {
+        "pascal-case": "^3.1.2",
+        "tslib": "^2.0.3"
+      }
+    },
+    "camelcase": {
+      "version": "5.3.1",
+      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+      "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
+      "dev": true
+    },
+    "caniuse-lite": {
+      "version": "1.0.30001245",
+      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001245.tgz",
+      "integrity": "sha512-768fM9j1PKXpOCKws6eTo3RHmvTUsG9UrpT4WoREFeZgJBTi4/X9g565azS/rVUGtqb8nt7FjLeF5u4kukERnA==",
+      "dev": true
+    },
+    "chai": {
+      "version": "4.3.4",
+      "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.4.tgz",
+      "integrity": "sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA==",
+      "dev": true,
+      "requires": {
+        "assertion-error": "^1.1.0",
+        "check-error": "^1.0.2",
+        "deep-eql": "^3.0.1",
+        "get-func-name": "^2.0.0",
+        "pathval": "^1.1.1",
+        "type-detect": "^4.0.5"
+      }
+    },
+    "chai-dom": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/chai-dom/-/chai-dom-1.9.0.tgz",
+      "integrity": "sha512-UXSbhcGVBWv/5qVqbJY/giTDRyo3wKapUsWluEuVvxcJLFXkyf8l4D2PTd6trzrmca6WWnGdpaFkYdl1P0WjtA==",
+      "dev": true
+    },
+    "chai-string": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/chai-string/-/chai-string-1.5.0.tgz",
+      "integrity": "sha512-sydDC3S3pNAQMYwJrs6dQX0oBQ6KfIPuOZ78n7rocW0eJJlsHPh2t3kwW7xfwYA/1Bf6/arGtSUo16rxR2JFlw==",
+      "dev": true
+    },
+    "chalk": {
+      "version": "2.4.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+      "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+      "requires": {
+        "ansi-styles": "^3.2.1",
+        "escape-string-regexp": "^1.0.5",
+        "supports-color": "^5.3.0"
+      }
+    },
+    "chart.js": {
+      "version": "2.9.4",
+      "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-2.9.4.tgz",
+      "integrity": "sha512-B07aAzxcrikjAPyV+01j7BmOpxtQETxTSlQ26BEYJ+3iUkbNKaOJ/nDbT6JjyqYxseM0ON12COHYdU2cTIjC7A==",
+      "requires": {
+        "chartjs-color": "^2.1.0",
+        "moment": "^2.10.2"
+      }
+    },
+    "chartjs-color": {
+      "version": "2.4.1",
+      "resolved": "https://registry.npmjs.org/chartjs-color/-/chartjs-color-2.4.1.tgz",
+      "integrity": "sha512-haqOg1+Yebys/Ts/9bLo/BqUcONQOdr/hoEr2LLTRl6C5LXctUdHxsCYfvQVg5JIxITrfCNUDr4ntqmQk9+/0w==",
+      "requires": {
+        "chartjs-color-string": "^0.6.0",
+        "color-convert": "^1.9.3"
+      }
+    },
+    "chartjs-color-string": {
+      "version": "0.6.0",
+      "resolved": "https://registry.npmjs.org/chartjs-color-string/-/chartjs-color-string-0.6.0.tgz",
+      "integrity": "sha512-TIB5OKn1hPJvO7JcteW4WY/63v6KwEdt6udfnDE9iCAZgy+V4SrbSxoIbTw/xkUIapjEI4ExGtD0+6D3KyFd7A==",
+      "requires": {
+        "color-name": "^1.0.0"
+      }
+    },
+    "check-error": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
+      "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
+      "dev": true
+    },
+    "chokidar": {
+      "version": "3.5.2",
+      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz",
+      "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==",
+      "dev": true,
+      "requires": {
+        "anymatch": "~3.1.2",
+        "braces": "~3.0.2",
+        "fsevents": "~2.3.2",
+        "glob-parent": "~5.1.2",
+        "is-binary-path": "~2.1.0",
+        "is-glob": "~4.0.1",
+        "normalize-path": "~3.0.0",
+        "readdirp": "~3.6.0"
+      }
+    },
+    "chownr": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
+      "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
+      "dev": true
+    },
+    "chrome-trace-event": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz",
+      "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==",
+      "dev": true,
+      "requires": {
+        "tslib": "^1.9.0"
+      },
+      "dependencies": {
+        "tslib": {
+          "version": "1.14.1",
+          "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+          "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+          "dev": true
+        }
+      }
+    },
+    "cipher-base": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz",
+      "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.1",
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "circular-dependency-plugin": {
+      "version": "5.2.2",
+      "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.2.2.tgz",
+      "integrity": "sha512-g38K9Cm5WRwlaH6g03B9OEz/0qRizI+2I7n+Gz+L5DxXJAPAiWQvwlYNm1V1jkdpUv95bOe/ASm2vfi/G560jQ==",
+      "dev": true
+    },
+    "class-utils": {
+      "version": "0.3.6",
+      "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
+      "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
+      "dev": true,
+      "requires": {
+        "arr-union": "^3.1.0",
+        "define-property": "^0.2.5",
+        "isobject": "^3.0.0",
+        "static-extend": "^0.1.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "0.1.6",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+          "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "is-buffer": {
+          "version": "1.1.6",
+          "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+          "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+          "dev": true
+        },
+        "is-data-descriptor": {
+          "version": "0.1.4",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+          "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "is-descriptor": {
+          "version": "0.1.6",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+          "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^0.1.6",
+            "is-data-descriptor": "^0.1.4",
+            "kind-of": "^5.0.0"
+          }
+        },
+        "kind-of": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+          "dev": true
+        }
+      }
+    },
+    "clean-css": {
+      "version": "4.2.3",
+      "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz",
+      "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==",
+      "dev": true,
+      "requires": {
+        "source-map": "~0.6.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "cliui": {
+      "version": "7.0.4",
+      "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
+      "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
+      "dev": true,
+      "requires": {
+        "string-width": "^4.2.0",
+        "strip-ansi": "^6.0.0",
+        "wrap-ansi": "^7.0.0"
+      }
+    },
+    "clone-deep": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz",
+      "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==",
+      "dev": true,
+      "requires": {
+        "is-plain-object": "^2.0.4",
+        "kind-of": "^6.0.2",
+        "shallow-clone": "^3.0.0"
+      }
+    },
+    "clsx": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/clsx/-/clsx-1.1.1.tgz",
+      "integrity": "sha512-6/bPho624p3S2pMyvP5kKBPXnI3ufHLObBFCfgx+LkeR5lg2XYy2hqZqUf45ypD8COn2bhgGJSUE+l5dhNBieA=="
+    },
+    "co": {
+      "version": "4.6.0",
+      "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
+      "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
+      "dev": true
+    },
+    "collection-visit": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
+      "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
+      "dev": true,
+      "requires": {
+        "map-visit": "^1.0.0",
+        "object-visit": "^1.0.0"
+      }
+    },
+    "color-convert": {
+      "version": "1.9.3",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+      "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+      "requires": {
+        "color-name": "1.1.3"
+      },
+      "dependencies": {
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
+        }
+      }
+    },
+    "color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+    },
+    "colorette": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz",
+      "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==",
+      "dev": true
+    },
+    "colors": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
+      "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
+      "dev": true
+    },
+    "commander": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
+      "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
+      "dev": true
+    },
+    "commondir": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
+      "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=",
+      "dev": true
+    },
+    "component-emitter": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
+      "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
+      "dev": true
+    },
+    "concat-map": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+      "dev": true
+    },
+    "concat-stream": {
+      "version": "1.6.2",
+      "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
+      "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
+      "dev": true,
+      "requires": {
+        "buffer-from": "^1.0.0",
+        "inherits": "^2.0.3",
+        "readable-stream": "^2.2.2",
+        "typedarray": "^0.0.6"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "dev": true,
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        }
+      }
+    },
+    "connect": {
+      "version": "3.7.0",
+      "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz",
+      "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==",
+      "dev": true,
+      "requires": {
+        "debug": "2.6.9",
+        "finalhandler": "1.1.2",
+        "parseurl": "~1.3.3",
+        "utils-merge": "1.0.1"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "ms": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+          "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+          "dev": true
+        }
+      }
+    },
+    "console-browserify": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz",
+      "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==",
+      "dev": true
+    },
+    "constants-browserify": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz",
+      "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=",
+      "dev": true
+    },
+    "content-type": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
+      "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
+      "dev": true
+    },
+    "convert-source-map": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
+      "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
+      "requires": {
+        "safe-buffer": "~5.1.1"
+      },
+      "dependencies": {
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+        }
+      }
+    },
+    "cookie": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz",
+      "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==",
+      "dev": true
+    },
+    "copy-concurrently": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz",
+      "integrity": "sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A==",
+      "dev": true,
+      "requires": {
+        "aproba": "^1.1.1",
+        "fs-write-stream-atomic": "^1.0.8",
+        "iferr": "^0.1.5",
+        "mkdirp": "^0.5.1",
+        "rimraf": "^2.5.4",
+        "run-queue": "^1.0.0"
+      },
+      "dependencies": {
+        "rimraf": {
+          "version": "2.7.1",
+          "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+          "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+          "dev": true,
+          "requires": {
+            "glob": "^7.1.3"
+          }
+        }
+      }
+    },
+    "copy-descriptor": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
+      "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
+      "dev": true
+    },
+    "core-js": {
+      "version": "2.6.12",
+      "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
+      "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
+      "dev": true
+    },
+    "core-js-compat": {
+      "version": "3.15.2",
+      "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.15.2.tgz",
+      "integrity": "sha512-Wp+BJVvwopjI+A1EFqm2dwUmWYXrvucmtIB2LgXn/Rb+gWPKYxtmb4GKHGKG/KGF1eK9jfjzT38DITbTOCX/SQ==",
+      "dev": true,
+      "requires": {
+        "browserslist": "^4.16.6",
+        "semver": "7.0.0"
+      },
+      "dependencies": {
+        "semver": {
+          "version": "7.0.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
+          "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
+          "dev": true
+        }
+      }
+    },
+    "core-js-pure": {
+      "version": "3.9.0",
+      "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.9.0.tgz",
+      "integrity": "sha512-3pEcmMZC9Cq0D4ZBh3pe2HLtqxpGNJBLXF/kZ2YzK17RbKp94w0HFbdbSx8H8kAlZG5k76hvLrkPm57Uyef+kg==",
+      "dev": true
+    },
+    "core-util-is": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
+      "dev": true
+    },
+    "cors": {
+      "version": "2.8.5",
+      "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz",
+      "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==",
+      "dev": true,
+      "requires": {
+        "object-assign": "^4",
+        "vary": "^1"
+      }
+    },
+    "cosmiconfig": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz",
+      "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==",
+      "requires": {
+        "@types/parse-json": "^4.0.0",
+        "import-fresh": "^3.1.0",
+        "parse-json": "^5.0.0",
+        "path-type": "^4.0.0",
+        "yaml": "^1.7.2"
+      }
+    },
+    "create-ecdh": {
+      "version": "4.0.4",
+      "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz",
+      "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^4.1.0",
+        "elliptic": "^6.5.3"
+      },
+      "dependencies": {
+        "bn.js": {
+          "version": "4.12.0",
+          "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+          "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
+          "dev": true
+        }
+      }
+    },
+    "create-hash": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz",
+      "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==",
+      "dev": true,
+      "requires": {
+        "cipher-base": "^1.0.1",
+        "inherits": "^2.0.1",
+        "md5.js": "^1.3.4",
+        "ripemd160": "^2.0.1",
+        "sha.js": "^2.4.0"
+      }
+    },
+    "create-hmac": {
+      "version": "1.1.7",
+      "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz",
+      "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==",
+      "dev": true,
+      "requires": {
+        "cipher-base": "^1.0.3",
+        "create-hash": "^1.1.0",
+        "inherits": "^2.0.1",
+        "ripemd160": "^2.0.0",
+        "safe-buffer": "^5.0.1",
+        "sha.js": "^2.4.8"
+      }
+    },
+    "cross-spawn": {
+      "version": "7.0.3",
+      "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+      "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+      "dev": true,
+      "requires": {
+        "path-key": "^3.1.0",
+        "shebang-command": "^2.0.0",
+        "which": "^2.0.1"
+      }
+    },
+    "crypto-browserify": {
+      "version": "3.12.0",
+      "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz",
+      "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==",
+      "dev": true,
+      "requires": {
+        "browserify-cipher": "^1.0.0",
+        "browserify-sign": "^4.0.0",
+        "create-ecdh": "^4.0.0",
+        "create-hash": "^1.1.0",
+        "create-hmac": "^1.1.0",
+        "diffie-hellman": "^5.0.0",
+        "inherits": "^2.0.1",
+        "pbkdf2": "^3.0.3",
+        "public-encrypt": "^4.0.0",
+        "randombytes": "^2.0.0",
+        "randomfill": "^1.0.3"
+      }
+    },
+    "css-loader": {
+      "version": "5.2.7",
+      "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-5.2.7.tgz",
+      "integrity": "sha512-Q7mOvpBNBG7YrVGMxRxcBJZFL75o+cH2abNASdibkj/fffYD8qWbInZrD0S9ccI6vZclF3DsHE7njGlLtaHbhg==",
+      "dev": true,
+      "requires": {
+        "icss-utils": "^5.1.0",
+        "loader-utils": "^2.0.0",
+        "postcss": "^8.2.15",
+        "postcss-modules-extract-imports": "^3.0.0",
+        "postcss-modules-local-by-default": "^4.0.0",
+        "postcss-modules-scope": "^3.0.0",
+        "postcss-modules-values": "^4.0.0",
+        "postcss-value-parser": "^4.1.0",
+        "schema-utils": "^3.0.0",
+        "semver": "^7.3.5"
+      },
+      "dependencies": {
+        "json5": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
+          "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
+          "dev": true,
+          "requires": {
+            "minimist": "^1.2.5"
+          }
+        },
+        "loader-utils": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
+          "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
+          "dev": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
+        "schema-utils": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
+          "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
+          "dev": true,
+          "requires": {
+            "@types/json-schema": "^7.0.7",
+            "ajv": "^6.12.5",
+            "ajv-keywords": "^3.5.2"
+          }
+        },
+        "semver": {
+          "version": "7.3.5",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+          "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+          "dev": true,
+          "requires": {
+            "lru-cache": "^6.0.0"
+          }
+        }
+      }
+    },
+    "css-select": {
+      "version": "4.1.3",
+      "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz",
+      "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==",
+      "dev": true,
+      "requires": {
+        "boolbase": "^1.0.0",
+        "css-what": "^5.0.0",
+        "domhandler": "^4.2.0",
+        "domutils": "^2.6.0",
+        "nth-check": "^2.0.0"
+      }
+    },
+    "css-vendor": {
+      "version": "2.0.8",
+      "resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-2.0.8.tgz",
+      "integrity": "sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ==",
+      "requires": {
+        "@babel/runtime": "^7.8.3",
+        "is-in-browser": "^1.0.2"
+      }
+    },
+    "css-what": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz",
+      "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==",
+      "dev": true
+    },
+    "cssesc": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
+      "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
+      "dev": true
+    },
+    "csstype": {
+      "version": "3.0.8",
+      "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz",
+      "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw=="
+    },
+    "custom-event": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz",
+      "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=",
+      "dev": true
+    },
+    "cyclist": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz",
+      "integrity": "sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=",
+      "dev": true
+    },
+    "damerau-levenshtein": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.6.tgz",
+      "integrity": "sha512-JVrozIeElnj3QzfUIt8tB8YMluBJom4Vw9qTPpjGYQ9fYlB3D/rb6OordUxf3xeFB35LKWs0xqcO5U6ySvBtug==",
+      "dev": true
+    },
+    "date-format": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/date-format/-/date-format-3.0.0.tgz",
+      "integrity": "sha512-eyTcpKOcamdhWJXj56DpQMo1ylSQpcGtGKXcU0Tb97+K56/CF5amAqqqNj0+KvA0iw2ynxtHWFsPDSClCxe48w==",
+      "dev": true
+    },
+    "debounce": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz",
+      "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug=="
+    },
+    "debug": {
+      "version": "4.3.1",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
+      "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
+      "dev": true,
+      "requires": {
+        "ms": "2.1.2"
+      }
+    },
+    "decamelize": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+      "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
+      "dev": true
+    },
+    "decode-uri-component": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
+      "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
+      "dev": true
+    },
+    "deep-eql": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
+      "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
+      "dev": true,
+      "requires": {
+        "type-detect": "^4.0.0"
+      }
+    },
+    "deep-equal": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.0.5.tgz",
+      "integrity": "sha512-nPiRgmbAtm1a3JsnLCf6/SLfXcjyN5v8L1TXzdCmHrXJ4hx+gW/w1YCcn7z8gJtSiDArZCgYtbao3QqLm/N1Sw==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "es-get-iterator": "^1.1.1",
+        "get-intrinsic": "^1.0.1",
+        "is-arguments": "^1.0.4",
+        "is-date-object": "^1.0.2",
+        "is-regex": "^1.1.1",
+        "isarray": "^2.0.5",
+        "object-is": "^1.1.4",
+        "object-keys": "^1.1.1",
+        "object.assign": "^4.1.2",
+        "regexp.prototype.flags": "^1.3.0",
+        "side-channel": "^1.0.3",
+        "which-boxed-primitive": "^1.0.1",
+        "which-collection": "^1.0.1",
+        "which-typed-array": "^1.1.2"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "2.0.5",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+          "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+          "dev": true
+        }
+      }
+    },
+    "deep-is": {
+      "version": "0.1.3",
+      "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
+      "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
+      "dev": true
+    },
+    "define-properties": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+      "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+      "dev": true,
+      "requires": {
+        "object-keys": "^1.0.12"
+      }
+    },
+    "define-property": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
+      "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
+      "dev": true,
+      "requires": {
+        "is-descriptor": "^1.0.2",
+        "isobject": "^3.0.1"
+      }
+    },
+    "depd": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
+      "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
+      "dev": true
+    },
+    "des.js": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz",
+      "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.1",
+        "minimalistic-assert": "^1.0.0"
+      }
+    },
+    "detect-indent": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
+      "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
+      "dev": true,
+      "requires": {
+        "repeating": "^2.0.0"
+      }
+    },
+    "devtools-protocol": {
+      "version": "0.0.854822",
+      "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.854822.tgz",
+      "integrity": "sha512-xd4D8kHQtB0KtWW0c9xBZD5LVtm9chkMOfs/3Yn01RhT/sFIsVtzTtypfKoFfWBaL+7xCYLxjOLkhwPXaX/Kcg==",
+      "dev": true
+    },
+    "di": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz",
+      "integrity": "sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw=",
+      "dev": true
+    },
+    "diff": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz",
+      "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w=="
+    },
+    "diffie-hellman": {
+      "version": "5.0.3",
+      "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
+      "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^4.1.0",
+        "miller-rabin": "^4.0.0",
+        "randombytes": "^2.0.0"
+      },
+      "dependencies": {
+        "bn.js": {
+          "version": "4.12.0",
+          "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+          "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
+          "dev": true
+        }
+      }
+    },
+    "dir-glob": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
+      "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
+      "dev": true,
+      "requires": {
+        "path-type": "^4.0.0"
+      }
+    },
+    "doctrine": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+      "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
+      "dev": true,
+      "requires": {
+        "esutils": "^2.0.2"
+      }
+    },
+    "dom-accessibility-api": {
+      "version": "0.5.6",
+      "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.6.tgz",
+      "integrity": "sha512-DplGLZd8L1lN64jlT27N9TVSESFR5STaEJvX+thCby7fuCHonfPpAlodYc3vuUYbDuDec5w8AMP7oCM5TWFsqw==",
+      "dev": true
+    },
+    "dom-converter": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz",
+      "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==",
+      "dev": true,
+      "requires": {
+        "utila": "~0.4"
+      }
+    },
+    "dom-helpers": {
+      "version": "5.2.1",
+      "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz",
+      "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==",
+      "requires": {
+        "@babel/runtime": "^7.8.7",
+        "csstype": "^3.0.2"
+      }
+    },
+    "dom-serialize": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz",
+      "integrity": "sha1-ViromZ9Evl6jB29UGdzVnrQ6yVs=",
+      "dev": true,
+      "requires": {
+        "custom-event": "~1.0.0",
+        "ent": "~2.2.0",
+        "extend": "^3.0.0",
+        "void-elements": "^2.0.0"
+      }
+    },
+    "dom-serializer": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz",
+      "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==",
+      "dev": true,
+      "requires": {
+        "domelementtype": "^2.0.1",
+        "domhandler": "^4.2.0",
+        "entities": "^2.0.0"
+      }
+    },
+    "domain-browser": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz",
+      "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==",
+      "dev": true
+    },
+    "domelementtype": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
+      "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==",
+      "dev": true
+    },
+    "domhandler": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz",
+      "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==",
+      "dev": true,
+      "requires": {
+        "domelementtype": "^2.2.0"
+      }
+    },
+    "dompurify": {
+      "version": "2.2.7",
+      "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.2.7.tgz",
+      "integrity": "sha512-jdtDffdGNY+C76jvodNTu9jt5yYj59vuTUyx+wXdzcSwAGTYZDAQkQ7Iwx9zcGrA4ixC1syU4H3RZROqRxokxg=="
+    },
+    "domutils": {
+      "version": "2.7.0",
+      "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.7.0.tgz",
+      "integrity": "sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg==",
+      "dev": true,
+      "requires": {
+        "dom-serializer": "^1.0.1",
+        "domelementtype": "^2.2.0",
+        "domhandler": "^4.2.0"
+      }
+    },
+    "dot-case": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz",
+      "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==",
+      "dev": true,
+      "requires": {
+        "no-case": "^3.0.4",
+        "tslib": "^2.0.3"
+      }
+    },
+    "duplexer": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
+      "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==",
+      "dev": true
+    },
+    "duplexify": {
+      "version": "3.7.1",
+      "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz",
+      "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==",
+      "dev": true,
+      "requires": {
+        "end-of-stream": "^1.0.0",
+        "inherits": "^2.0.1",
+        "readable-stream": "^2.0.0",
+        "stream-shift": "^1.0.0"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "dev": true,
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        }
+      }
+    },
+    "ee-first": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+      "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=",
+      "dev": true
+    },
+    "electron-to-chromium": {
+      "version": "1.3.775",
+      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.775.tgz",
+      "integrity": "sha512-EGuiJW4yBPOTj2NtWGZcX93ZE8IGj33HJAx4d3ouE2zOfW2trbWU+t1e0yzLr1qQIw81++txbM3BH52QwSRE6Q==",
+      "dev": true
+    },
+    "elliptic": {
+      "version": "6.5.4",
+      "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz",
+      "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^4.11.9",
+        "brorand": "^1.1.0",
+        "hash.js": "^1.0.0",
+        "hmac-drbg": "^1.0.1",
+        "inherits": "^2.0.4",
+        "minimalistic-assert": "^1.0.1",
+        "minimalistic-crypto-utils": "^1.0.1"
+      },
+      "dependencies": {
+        "bn.js": {
+          "version": "4.12.0",
+          "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+          "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
+          "dev": true
+        }
+      }
+    },
+    "emoji-regex": {
+      "version": "8.0.0",
+      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+      "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+      "dev": true
+    },
+    "emojis-list": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
+      "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
+      "dev": true
+    },
+    "encodeurl": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
+      "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
+      "dev": true
+    },
+    "end-of-stream": {
+      "version": "1.4.4",
+      "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz",
+      "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==",
+      "dev": true,
+      "requires": {
+        "once": "^1.4.0"
+      }
+    },
+    "engine.io": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/engine.io/-/engine.io-4.1.1.tgz",
+      "integrity": "sha512-t2E9wLlssQjGw0nluF6aYyfX8LwYU8Jj0xct+pAhfWfv/YrBn6TSNtEYsgxHIfaMqfrLx07czcMg9bMN6di+3w==",
+      "dev": true,
+      "requires": {
+        "accepts": "~1.3.4",
+        "base64id": "2.0.0",
+        "cookie": "~0.4.1",
+        "cors": "~2.8.5",
+        "debug": "~4.3.1",
+        "engine.io-parser": "~4.0.0",
+        "ws": "~7.4.2"
+      }
+    },
+    "engine.io-parser": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-4.0.2.tgz",
+      "integrity": "sha512-sHfEQv6nmtJrq6TKuIz5kyEKH/qSdK56H/A+7DnAuUPWosnIZAS2NHNcPLmyjtY3cGS/MqJdZbUjW97JU72iYg==",
+      "dev": true,
+      "requires": {
+        "base64-arraybuffer": "0.1.4"
+      }
+    },
+    "enhanced-resolve": {
+      "version": "4.5.0",
+      "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.5.0.tgz",
+      "integrity": "sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.2",
+        "memory-fs": "^0.5.0",
+        "tapable": "^1.0.0"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true
+        },
+        "memory-fs": {
+          "version": "0.5.0",
+          "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.5.0.tgz",
+          "integrity": "sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==",
+          "dev": true,
+          "requires": {
+            "errno": "^0.1.3",
+            "readable-stream": "^2.0.1"
+          }
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "dev": true,
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        }
+      }
+    },
+    "enquirer": {
+      "version": "2.3.6",
+      "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
+      "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==",
+      "dev": true,
+      "requires": {
+        "ansi-colors": "^4.1.1"
+      }
+    },
+    "ent": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz",
+      "integrity": "sha1-6WQhkyWiHQX0RGai9obtbOX13R0=",
+      "dev": true
+    },
+    "entities": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
+      "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==",
+      "dev": true
+    },
+    "envinfo": {
+      "version": "7.8.1",
+      "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz",
+      "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==",
+      "dev": true
+    },
+    "errno": {
+      "version": "0.1.8",
+      "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
+      "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
+      "dev": true,
+      "requires": {
+        "prr": "~1.0.1"
+      }
+    },
+    "error-ex": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+      "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+      "requires": {
+        "is-arrayish": "^0.2.1"
+      }
+    },
+    "es-abstract": {
+      "version": "1.18.3",
+      "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz",
+      "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "es-to-primitive": "^1.2.1",
+        "function-bind": "^1.1.1",
+        "get-intrinsic": "^1.1.1",
+        "has": "^1.0.3",
+        "has-symbols": "^1.0.2",
+        "is-callable": "^1.2.3",
+        "is-negative-zero": "^2.0.1",
+        "is-regex": "^1.1.3",
+        "is-string": "^1.0.6",
+        "object-inspect": "^1.10.3",
+        "object-keys": "^1.1.1",
+        "object.assign": "^4.1.2",
+        "string.prototype.trimend": "^1.0.4",
+        "string.prototype.trimstart": "^1.0.4",
+        "unbox-primitive": "^1.0.1"
+      },
+      "dependencies": {
+        "has-symbols": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
+          "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
+          "dev": true
+        },
+        "is-callable": {
+          "version": "1.2.3",
+          "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz",
+          "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==",
+          "dev": true
+        },
+        "is-regex": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz",
+          "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==",
+          "dev": true,
+          "requires": {
+            "call-bind": "^1.0.2",
+            "has-symbols": "^1.0.2"
+          }
+        },
+        "is-string": {
+          "version": "1.0.6",
+          "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz",
+          "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==",
+          "dev": true
+        },
+        "object-inspect": {
+          "version": "1.11.0",
+          "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz",
+          "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==",
+          "dev": true
+        },
+        "string.prototype.trimend": {
+          "version": "1.0.4",
+          "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz",
+          "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==",
+          "dev": true,
+          "requires": {
+            "call-bind": "^1.0.2",
+            "define-properties": "^1.1.3"
+          }
+        },
+        "string.prototype.trimstart": {
+          "version": "1.0.4",
+          "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz",
+          "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==",
+          "dev": true,
+          "requires": {
+            "call-bind": "^1.0.2",
+            "define-properties": "^1.1.3"
+          }
+        }
+      }
+    },
+    "es-get-iterator": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.1.tgz",
+      "integrity": "sha512-qorBw8Y7B15DVLaJWy6WdEV/ZkieBcu6QCq/xzWzGOKJqgG1j754vXRfZ3NY7HSShneqU43mPB4OkQBTkvHhFw==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "get-intrinsic": "^1.0.1",
+        "has-symbols": "^1.0.1",
+        "is-arguments": "^1.0.4",
+        "is-map": "^2.0.1",
+        "is-set": "^2.0.1",
+        "is-string": "^1.0.5",
+        "isarray": "^2.0.5"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "2.0.5",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+          "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+          "dev": true
+        }
+      }
+    },
+    "es-to-primitive": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+      "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+      "dev": true,
+      "requires": {
+        "is-callable": "^1.1.4",
+        "is-date-object": "^1.0.1",
+        "is-symbol": "^1.0.2"
+      }
+    },
+    "escalade": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
+      "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
+      "dev": true
+    },
+    "escape-html": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+      "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=",
+      "dev": true
+    },
+    "escape-string-regexp": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+      "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
+    },
+    "escodegen": {
+      "version": "1.8.1",
+      "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz",
+      "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=",
+      "dev": true,
+      "requires": {
+        "esprima": "^2.7.1",
+        "estraverse": "^1.9.1",
+        "esutils": "^2.0.2",
+        "optionator": "^0.8.1",
+        "source-map": "~0.2.0"
+      },
+      "dependencies": {
+        "esprima": {
+          "version": "2.7.3",
+          "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
+          "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=",
+          "dev": true
+        },
+        "estraverse": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz",
+          "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=",
+          "dev": true
+        },
+        "levn": {
+          "version": "0.3.0",
+          "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+          "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+          "dev": true,
+          "requires": {
+            "prelude-ls": "~1.1.2",
+            "type-check": "~0.3.2"
+          }
+        },
+        "optionator": {
+          "version": "0.8.3",
+          "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
+          "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
+          "dev": true,
+          "requires": {
+            "deep-is": "~0.1.3",
+            "fast-levenshtein": "~2.0.6",
+            "levn": "~0.3.0",
+            "prelude-ls": "~1.1.2",
+            "type-check": "~0.3.2",
+            "word-wrap": "~1.2.3"
+          }
+        },
+        "prelude-ls": {
+          "version": "1.1.2",
+          "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+          "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
+          "dev": true
+        },
+        "source-map": {
+          "version": "0.2.0",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz",
+          "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "amdefine": ">=0.0.4"
+          }
+        },
+        "type-check": {
+          "version": "0.3.2",
+          "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+          "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+          "dev": true,
+          "requires": {
+            "prelude-ls": "~1.1.2"
+          }
+        }
+      }
+    },
+    "eslint": {
+      "version": "7.30.0",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.30.0.tgz",
+      "integrity": "sha512-VLqz80i3as3NdloY44BQSJpFw534L9Oh+6zJOUaViV4JPd+DaHwutqP7tcpkW3YiXbK6s05RZl7yl7cQn+lijg==",
+      "dev": true,
+      "requires": {
+        "@babel/code-frame": "7.12.11",
+        "@eslint/eslintrc": "^0.4.2",
+        "@humanwhocodes/config-array": "^0.5.0",
+        "ajv": "^6.10.0",
+        "chalk": "^4.0.0",
+        "cross-spawn": "^7.0.2",
+        "debug": "^4.0.1",
+        "doctrine": "^3.0.0",
+        "enquirer": "^2.3.5",
+        "escape-string-regexp": "^4.0.0",
+        "eslint-scope": "^5.1.1",
+        "eslint-utils": "^2.1.0",
+        "eslint-visitor-keys": "^2.0.0",
+        "espree": "^7.3.1",
+        "esquery": "^1.4.0",
+        "esutils": "^2.0.2",
+        "fast-deep-equal": "^3.1.3",
+        "file-entry-cache": "^6.0.1",
+        "functional-red-black-tree": "^1.0.1",
+        "glob-parent": "^5.1.2",
+        "globals": "^13.6.0",
+        "ignore": "^4.0.6",
+        "import-fresh": "^3.0.0",
+        "imurmurhash": "^0.1.4",
+        "is-glob": "^4.0.0",
+        "js-yaml": "^3.13.1",
+        "json-stable-stringify-without-jsonify": "^1.0.1",
+        "levn": "^0.4.1",
+        "lodash.merge": "^4.6.2",
+        "minimatch": "^3.0.4",
+        "natural-compare": "^1.4.0",
+        "optionator": "^0.9.1",
+        "progress": "^2.0.0",
+        "regexpp": "^3.1.0",
+        "semver": "^7.2.1",
+        "strip-ansi": "^6.0.0",
+        "strip-json-comments": "^3.1.0",
+        "table": "^6.0.9",
+        "text-table": "^0.2.0",
+        "v8-compile-cache": "^2.0.3"
+      },
+      "dependencies": {
+        "@babel/code-frame": {
+          "version": "7.12.11",
+          "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz",
+          "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==",
+          "dev": true,
+          "requires": {
+            "@babel/highlight": "^7.10.4"
+          }
+        },
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+          "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "escape-string-regexp": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
+          "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
+          "dev": true
+        },
+        "eslint-utils": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
+          "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
+          "dev": true,
+          "requires": {
+            "eslint-visitor-keys": "^1.1.0"
+          },
+          "dependencies": {
+            "eslint-visitor-keys": {
+              "version": "1.3.0",
+              "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
+              "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
+              "dev": true
+            }
+          }
+        },
+        "eslint-visitor-keys": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
+          "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
+          "dev": true
+        },
+        "globals": {
+          "version": "13.10.0",
+          "resolved": "https://registry.npmjs.org/globals/-/globals-13.10.0.tgz",
+          "integrity": "sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g==",
+          "dev": true,
+          "requires": {
+            "type-fest": "^0.20.2"
+          }
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true
+        },
+        "ignore": {
+          "version": "4.0.6",
+          "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
+          "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
+          "dev": true
+        },
+        "semver": {
+          "version": "7.3.5",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+          "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+          "dev": true,
+          "requires": {
+            "lru-cache": "^6.0.0"
+          }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
+    "eslint-config-google": {
+      "version": "0.14.0",
+      "resolved": "https://registry.npmjs.org/eslint-config-google/-/eslint-config-google-0.14.0.tgz",
+      "integrity": "sha512-WsbX4WbjuMvTdeVL6+J3rK1RGhCTqjsFjX7UMSMgZiyxxaNLkoJENbrGExzERFeoTpGw3F3FypTiWAP9ZXzkEw==",
+      "dev": true
+    },
+    "eslint-config-prettier": {
+      "version": "8.3.0",
+      "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz",
+      "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==",
+      "dev": true
+    },
+    "eslint-plugin-css-modules": {
+      "version": "2.11.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-css-modules/-/eslint-plugin-css-modules-2.11.0.tgz",
+      "integrity": "sha512-CLvQvJOMlCywZzaI4HVu7QH/ltgNXvCg7giJGiE+sA9wh5zQ+AqTgftAzrERV22wHe1p688wrU/Zwxt1Ry922w==",
+      "dev": true,
+      "requires": {
+        "gonzales-pe": "^4.0.3",
+        "lodash": "^4.17.2"
+      }
+    },
+    "eslint-plugin-jsx-a11y": {
+      "version": "6.4.1",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz",
+      "integrity": "sha512-0rGPJBbwHoGNPU73/QCLP/vveMlM1b1Z9PponxO87jfr6tuH5ligXbDT6nHSSzBC8ovX2Z+BQu7Bk5D/Xgq9zg==",
+      "dev": true,
+      "requires": {
+        "@babel/runtime": "^7.11.2",
+        "aria-query": "^4.2.2",
+        "array-includes": "^3.1.1",
+        "ast-types-flow": "^0.0.7",
+        "axe-core": "^4.0.2",
+        "axobject-query": "^2.2.0",
+        "damerau-levenshtein": "^1.0.6",
+        "emoji-regex": "^9.0.0",
+        "has": "^1.0.3",
+        "jsx-ast-utils": "^3.1.0",
+        "language-tags": "^1.0.5"
+      },
+      "dependencies": {
+        "emoji-regex": {
+          "version": "9.2.1",
+          "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.1.tgz",
+          "integrity": "sha512-117l1H6U4X3Krn+MrzYrL57d5H7siRHWraBs7s+LjRuFK7Fe7hJqnJ0skWlinqsycVLU5YAo6L8CsEYQ0V5prg==",
+          "dev": true
+        }
+      }
+    },
+    "eslint-plugin-react": {
+      "version": "7.24.0",
+      "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.24.0.tgz",
+      "integrity": "sha512-KJJIx2SYx7PBx3ONe/mEeMz4YE0Lcr7feJTCMyyKb/341NcjuAgim3Acgan89GfPv7nxXK2+0slu0CWXYM4x+Q==",
+      "dev": true,
+      "requires": {
+        "array-includes": "^3.1.3",
+        "array.prototype.flatmap": "^1.2.4",
+        "doctrine": "^2.1.0",
+        "has": "^1.0.3",
+        "jsx-ast-utils": "^2.4.1 || ^3.0.0",
+        "minimatch": "^3.0.4",
+        "object.entries": "^1.1.4",
+        "object.fromentries": "^2.0.4",
+        "object.values": "^1.1.4",
+        "prop-types": "^15.7.2",
+        "resolve": "^2.0.0-next.3",
+        "string.prototype.matchall": "^4.0.5"
+      },
+      "dependencies": {
+        "doctrine": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
+          "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
+          "dev": true,
+          "requires": {
+            "esutils": "^2.0.2"
+          }
+        },
+        "resolve": {
+          "version": "2.0.0-next.3",
+          "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz",
+          "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==",
+          "dev": true,
+          "requires": {
+            "is-core-module": "^2.2.0",
+            "path-parse": "^1.0.6"
+          }
+        }
+      }
+    },
+    "eslint-scope": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
+      "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
+      "dev": true,
+      "requires": {
+        "esrecurse": "^4.3.0",
+        "estraverse": "^4.1.1"
+      }
+    },
+    "eslint-utils": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
+      "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==",
+      "dev": true,
+      "requires": {
+        "eslint-visitor-keys": "^2.0.0"
+      },
+      "dependencies": {
+        "eslint-visitor-keys": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
+          "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
+          "dev": true
+        }
+      }
+    },
+    "eslint-visitor-keys": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
+      "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
+      "dev": true
+    },
+    "espree": {
+      "version": "7.3.1",
+      "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz",
+      "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==",
+      "dev": true,
+      "requires": {
+        "acorn": "^7.4.0",
+        "acorn-jsx": "^5.3.1",
+        "eslint-visitor-keys": "^1.3.0"
+      }
+    },
+    "esprima": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+      "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+      "dev": true
+    },
+    "esquery": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz",
+      "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==",
+      "dev": true,
+      "requires": {
+        "estraverse": "^5.1.0"
+      },
+      "dependencies": {
+        "estraverse": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
+          "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
+          "dev": true
+        }
+      }
+    },
+    "esrecurse": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+      "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+      "dev": true,
+      "requires": {
+        "estraverse": "^5.2.0"
+      },
+      "dependencies": {
+        "estraverse": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
+          "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
+          "dev": true
+        }
+      }
+    },
+    "estraverse": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
+      "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
+      "dev": true
+    },
+    "esutils": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+      "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+      "dev": true
+    },
+    "eventemitter3": {
+      "version": "4.0.7",
+      "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
+      "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
+      "dev": true
+    },
+    "events": {
+      "version": "3.3.0",
+      "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
+      "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
+      "dev": true
+    },
+    "evp_bytestokey": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz",
+      "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==",
+      "dev": true,
+      "requires": {
+        "md5.js": "^1.3.4",
+        "safe-buffer": "^5.1.1"
+      }
+    },
+    "execa": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
+      "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
+      "dev": true,
+      "requires": {
+        "cross-spawn": "^7.0.3",
+        "get-stream": "^6.0.0",
+        "human-signals": "^2.1.0",
+        "is-stream": "^2.0.0",
+        "merge-stream": "^2.0.0",
+        "npm-run-path": "^4.0.1",
+        "onetime": "^5.1.2",
+        "signal-exit": "^3.0.3",
+        "strip-final-newline": "^2.0.0"
+      },
+      "dependencies": {
+        "get-stream": {
+          "version": "6.0.1",
+          "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
+          "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
+          "dev": true
+        }
+      }
+    },
+    "expand-brackets": {
+      "version": "2.1.4",
+      "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+      "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
+      "dev": true,
+      "requires": {
+        "debug": "^2.3.3",
+        "define-property": "^0.2.5",
+        "extend-shallow": "^2.0.1",
+        "posix-character-classes": "^0.1.0",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.1"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        },
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "dev": true,
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "0.1.6",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+          "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "is-buffer": {
+          "version": "1.1.6",
+          "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+          "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+          "dev": true
+        },
+        "is-data-descriptor": {
+          "version": "0.1.4",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+          "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "is-descriptor": {
+          "version": "0.1.6",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+          "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^0.1.6",
+            "is-data-descriptor": "^0.1.4",
+            "kind-of": "^5.0.0"
+          }
+        },
+        "is-extendable": {
+          "version": "0.1.1",
+          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+          "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
+          "dev": true
+        },
+        "kind-of": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+          "dev": true
+        },
+        "ms": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+          "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+          "dev": true
+        }
+      }
+    },
+    "extend": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
+      "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
+      "dev": true
+    },
+    "extend-shallow": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
+      "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
+      "dev": true,
+      "requires": {
+        "assign-symbols": "^1.0.0",
+        "is-extendable": "^1.0.1"
+      }
+    },
+    "extglob": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+      "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
+      "dev": true,
+      "requires": {
+        "array-unique": "^0.3.2",
+        "define-property": "^1.0.0",
+        "expand-brackets": "^2.1.4",
+        "extend-shallow": "^2.0.1",
+        "fragment-cache": "^0.2.1",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^1.0.0"
+          }
+        },
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "dev": true,
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        },
+        "is-extendable": {
+          "version": "0.1.1",
+          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+          "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
+          "dev": true
+        }
+      }
+    },
+    "extract-zip": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-2.0.1.tgz",
+      "integrity": "sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==",
+      "dev": true,
+      "requires": {
+        "@types/yauzl": "^2.9.1",
+        "debug": "^4.1.1",
+        "get-stream": "^5.1.0",
+        "yauzl": "^2.10.0"
+      }
+    },
+    "fast-deep-equal": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+      "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+      "dev": true
+    },
+    "fast-glob": {
+      "version": "3.2.7",
+      "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz",
+      "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==",
+      "dev": true,
+      "requires": {
+        "@nodelib/fs.stat": "^2.0.2",
+        "@nodelib/fs.walk": "^1.2.3",
+        "glob-parent": "^5.1.2",
+        "merge2": "^1.3.0",
+        "micromatch": "^4.0.4"
+      },
+      "dependencies": {
+        "micromatch": {
+          "version": "4.0.4",
+          "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
+          "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==",
+          "dev": true,
+          "requires": {
+            "braces": "^3.0.1",
+            "picomatch": "^2.2.3"
+          }
+        }
+      }
+    },
+    "fast-json-stable-stringify": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+      "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+      "dev": true
+    },
+    "fast-levenshtein": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+      "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
+      "dev": true
+    },
+    "fastest-levenshtein": {
+      "version": "1.0.12",
+      "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz",
+      "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==",
+      "dev": true
+    },
+    "fastq": {
+      "version": "1.11.1",
+      "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz",
+      "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==",
+      "dev": true,
+      "requires": {
+        "reusify": "^1.0.4"
+      }
+    },
+    "fd-slicer": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz",
+      "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=",
+      "dev": true,
+      "requires": {
+        "pend": "~1.2.0"
+      }
+    },
+    "figgy-pudding": {
+      "version": "3.5.2",
+      "resolved": "https://registry.npmjs.org/figgy-pudding/-/figgy-pudding-3.5.2.tgz",
+      "integrity": "sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw==",
+      "dev": true
+    },
+    "file-entry-cache": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
+      "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
+      "dev": true,
+      "requires": {
+        "flat-cache": "^3.0.4"
+      }
+    },
+    "file-uri-to-path": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+      "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+      "dev": true,
+      "optional": true
+    },
+    "fill-range": {
+      "version": "7.0.1",
+      "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
+      "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+      "dev": true,
+      "requires": {
+        "to-regex-range": "^5.0.1"
+      }
+    },
+    "finalhandler": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
+      "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
+      "dev": true,
+      "requires": {
+        "debug": "2.6.9",
+        "encodeurl": "~1.0.2",
+        "escape-html": "~1.0.3",
+        "on-finished": "~2.3.0",
+        "parseurl": "~1.3.3",
+        "statuses": "~1.5.0",
+        "unpipe": "~1.0.0"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "ms": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+          "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+          "dev": true
+        }
+      }
+    },
+    "find-cache-dir": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
+      "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==",
+      "dev": true,
+      "requires": {
+        "commondir": "^1.0.1",
+        "make-dir": "^2.0.0",
+        "pkg-dir": "^3.0.0"
+      },
+      "dependencies": {
+        "find-up": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+          "dev": true,
+          "requires": {
+            "locate-path": "^3.0.0"
+          }
+        },
+        "locate-path": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+          "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+          "dev": true,
+          "requires": {
+            "p-locate": "^3.0.0",
+            "path-exists": "^3.0.0"
+          }
+        },
+        "make-dir": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
+          "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
+          "dev": true,
+          "requires": {
+            "pify": "^4.0.1",
+            "semver": "^5.6.0"
+          }
+        },
+        "p-locate": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+          "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+          "dev": true,
+          "requires": {
+            "p-limit": "^2.0.0"
+          }
+        },
+        "path-exists": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+          "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+          "dev": true
+        },
+        "pkg-dir": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
+          "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==",
+          "dev": true,
+          "requires": {
+            "find-up": "^3.0.0"
+          }
+        },
+        "semver": {
+          "version": "5.7.1",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+          "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+          "dev": true
+        }
+      }
+    },
+    "find-root": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",
+      "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng=="
+    },
+    "find-up": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+      "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+      "dev": true,
+      "requires": {
+        "locate-path": "^5.0.0",
+        "path-exists": "^4.0.0"
+      }
+    },
+    "flat": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz",
+      "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==",
+      "dev": true,
+      "requires": {
+        "is-buffer": "~2.0.3"
+      }
+    },
+    "flat-cache": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
+      "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
+      "dev": true,
+      "requires": {
+        "flatted": "^3.1.0",
+        "rimraf": "^3.0.2"
+      }
+    },
+    "flatted": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.1.tgz",
+      "integrity": "sha512-OMQjaErSFHmHqZe+PSidH5n8j3O0F2DdnVh8JB4j4eUQ2k6KvB0qGfrKIhapvez5JerBbmWkaLYUYWISaESoXg==",
+      "dev": true
+    },
+    "flush-write-stream": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz",
+      "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.3",
+        "readable-stream": "^2.3.6"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "dev": true,
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        }
+      }
+    },
+    "follow-redirects": {
+      "version": "1.14.1",
+      "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz",
+      "integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg==",
+      "dev": true
+    },
+    "for-in": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
+      "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
+      "dev": true
+    },
+    "foreach": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz",
+      "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=",
+      "dev": true
+    },
+    "fraction.js": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.1.1.tgz",
+      "integrity": "sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg==",
+      "dev": true
+    },
+    "fragment-cache": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
+      "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
+      "dev": true,
+      "requires": {
+        "map-cache": "^0.2.2"
+      }
+    },
+    "from2": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz",
+      "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.1",
+        "readable-stream": "^2.0.0"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "dev": true,
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        }
+      }
+    },
+    "fs-constants": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
+      "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
+      "dev": true
+    },
+    "fs-extra": {
+      "version": "8.1.0",
+      "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz",
+      "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.2.0",
+        "jsonfile": "^4.0.0",
+        "universalify": "^0.1.0"
+      }
+    },
+    "fs-write-stream-atomic": {
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz",
+      "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.2",
+        "iferr": "^0.1.5",
+        "imurmurhash": "^0.1.4",
+        "readable-stream": "1 || 2"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "dev": true,
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        }
+      }
+    },
+    "fs.realpath": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+      "dev": true
+    },
+    "fsevents": {
+      "version": "2.3.2",
+      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz",
+      "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
+      "dev": true,
+      "optional": true
+    },
+    "function-bind": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+    },
+    "functional-red-black-tree": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
+      "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
+      "dev": true
+    },
+    "gensync": {
+      "version": "1.0.0-beta.2",
+      "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
+      "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
+      "dev": true
+    },
+    "get-caller-file": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+      "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+      "dev": true
+    },
+    "get-func-name": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
+      "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
+      "dev": true
+    },
+    "get-intrinsic": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
+      "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
+      "requires": {
+        "function-bind": "^1.1.1",
+        "has": "^1.0.3",
+        "has-symbols": "^1.0.1"
+      }
+    },
+    "get-stream": {
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
+      "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
+      "dev": true,
+      "requires": {
+        "pump": "^3.0.0"
+      }
+    },
+    "get-value": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
+      "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
+      "dev": true
+    },
+    "glob": {
+      "version": "7.1.6",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+      "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+      "dev": true,
+      "requires": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.0.4",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      }
+    },
+    "glob-parent": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
+      "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+      "dev": true,
+      "requires": {
+        "is-glob": "^4.0.1"
+      }
+    },
+    "globals": {
+      "version": "11.12.0",
+      "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
+      "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
+      "dev": true
+    },
+    "globby": {
+      "version": "11.0.4",
+      "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz",
+      "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==",
+      "dev": true,
+      "requires": {
+        "array-union": "^2.1.0",
+        "dir-glob": "^3.0.1",
+        "fast-glob": "^3.1.1",
+        "ignore": "^5.1.4",
+        "merge2": "^1.3.0",
+        "slash": "^3.0.0"
+      }
+    },
+    "gonzales-pe": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz",
+      "integrity": "sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==",
+      "dev": true,
+      "requires": {
+        "minimist": "^1.2.5"
+      }
+    },
+    "graceful-fs": {
+      "version": "4.2.4",
+      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
+      "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==",
+      "dev": true
+    },
+    "growl": {
+      "version": "1.10.5",
+      "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
+      "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
+      "dev": true
+    },
+    "gzip-size": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz",
+      "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==",
+      "dev": true,
+      "requires": {
+        "duplexer": "^0.1.2"
+      }
+    },
+    "handlebars": {
+      "version": "4.7.7",
+      "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz",
+      "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==",
+      "dev": true,
+      "requires": {
+        "minimist": "^1.2.5",
+        "neo-async": "^2.6.0",
+        "source-map": "^0.6.1",
+        "uglify-js": "^3.1.4",
+        "wordwrap": "^1.0.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "has": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+      "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+      "requires": {
+        "function-bind": "^1.1.1"
+      }
+    },
+    "has-ansi": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
+      "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
+      "dev": true,
+      "requires": {
+        "ansi-regex": "^2.0.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
+          "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
+          "dev": true
+        }
+      }
+    },
+    "has-bigints": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
+      "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==",
+      "dev": true
+    },
+    "has-flag": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+      "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
+    },
+    "has-symbols": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
+      "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg=="
+    },
+    "has-value": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
+      "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
+      "dev": true,
+      "requires": {
+        "get-value": "^2.0.6",
+        "has-values": "^1.0.0",
+        "isobject": "^3.0.0"
+      }
+    },
+    "has-values": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
+      "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
+      "dev": true,
+      "requires": {
+        "is-number": "^3.0.0",
+        "kind-of": "^4.0.0"
+      },
+      "dependencies": {
+        "is-buffer": {
+          "version": "1.1.6",
+          "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+          "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+          "dev": true
+        },
+        "is-number": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "kind-of": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
+          "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
+          "dev": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "hash-base": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz",
+      "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.4",
+        "readable-stream": "^3.6.0",
+        "safe-buffer": "^5.2.0"
+      }
+    },
+    "hash.js": {
+      "version": "1.1.7",
+      "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz",
+      "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.3",
+        "minimalistic-assert": "^1.0.1"
+      }
+    },
+    "he": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
+      "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
+      "dev": true
+    },
+    "hmac-drbg": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
+      "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=",
+      "dev": true,
+      "requires": {
+        "hash.js": "^1.0.3",
+        "minimalistic-assert": "^1.0.0",
+        "minimalistic-crypto-utils": "^1.0.1"
+      }
+    },
+    "hoist-non-react-statics": {
+      "version": "3.3.2",
+      "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
+      "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
+      "requires": {
+        "react-is": "^16.7.0"
+      }
+    },
+    "html-escaper": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
+      "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
+      "dev": true
+    },
+    "html-minifier-terser": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz",
+      "integrity": "sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg==",
+      "dev": true,
+      "requires": {
+        "camel-case": "^4.1.1",
+        "clean-css": "^4.2.3",
+        "commander": "^4.1.1",
+        "he": "^1.2.0",
+        "param-case": "^3.0.3",
+        "relateurl": "^0.2.7",
+        "terser": "^4.6.3"
+      }
+    },
+    "html-webpack-plugin": {
+      "version": "4.5.2",
+      "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-4.5.2.tgz",
+      "integrity": "sha512-q5oYdzjKUIPQVjOosjgvCHQOv9Ett9CYYHlgvJeXG0qQvdSojnBq4vAdQBwn1+yGveAwHCoe/rMR86ozX3+c2A==",
+      "dev": true,
+      "requires": {
+        "@types/html-minifier-terser": "^5.0.0",
+        "@types/tapable": "^1.0.5",
+        "@types/webpack": "^4.41.8",
+        "html-minifier-terser": "^5.0.1",
+        "loader-utils": "^1.2.3",
+        "lodash": "^4.17.20",
+        "pretty-error": "^2.1.1",
+        "tapable": "^1.1.3",
+        "util.promisify": "1.0.0"
+      }
+    },
+    "htmlparser2": {
+      "version": "6.1.0",
+      "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz",
+      "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==",
+      "dev": true,
+      "requires": {
+        "domelementtype": "^2.0.1",
+        "domhandler": "^4.0.0",
+        "domutils": "^2.5.2",
+        "entities": "^2.0.0"
+      }
+    },
+    "http-errors": {
+      "version": "1.7.2",
+      "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
+      "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
+      "dev": true,
+      "requires": {
+        "depd": "~1.1.2",
+        "inherits": "2.0.3",
+        "setprototypeof": "1.1.1",
+        "statuses": ">= 1.5.0 < 2",
+        "toidentifier": "1.0.0"
+      },
+      "dependencies": {
+        "inherits": {
+          "version": "2.0.3",
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+          "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
+          "dev": true
+        }
+      }
+    },
+    "http-proxy": {
+      "version": "1.18.1",
+      "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
+      "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
+      "dev": true,
+      "requires": {
+        "eventemitter3": "^4.0.0",
+        "follow-redirects": "^1.0.0",
+        "requires-port": "^1.0.0"
+      }
+    },
+    "https-browserify": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
+      "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=",
+      "dev": true
+    },
+    "https-proxy-agent": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
+      "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",
+      "dev": true,
+      "requires": {
+        "agent-base": "6",
+        "debug": "4"
+      }
+    },
+    "human-signals": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
+      "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
+      "dev": true
+    },
+    "hyphenate-style-name": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz",
+      "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ=="
+    },
+    "iconv-lite": {
+      "version": "0.4.24",
+      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
+      "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
+      "dev": true,
+      "requires": {
+        "safer-buffer": ">= 2.1.2 < 3"
+      }
+    },
+    "icss-utils": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
+      "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
+      "dev": true
+    },
+    "ieee754": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
+      "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
+      "dev": true
+    },
+    "iferr": {
+      "version": "0.1.5",
+      "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz",
+      "integrity": "sha1-xg7taebY/bazEEofy8ocGS3FtQE=",
+      "dev": true
+    },
+    "ignore": {
+      "version": "5.1.8",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz",
+      "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==",
+      "dev": true
+    },
+    "import-fresh": {
+      "version": "3.3.0",
+      "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+      "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
+      "requires": {
+        "parent-module": "^1.0.0",
+        "resolve-from": "^4.0.0"
+      }
+    },
+    "import-local": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz",
+      "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==",
+      "dev": true,
+      "requires": {
+        "pkg-dir": "^4.2.0",
+        "resolve-cwd": "^3.0.0"
+      }
+    },
+    "imurmurhash": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+      "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
+      "dev": true
+    },
+    "infer-owner": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz",
+      "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==",
+      "dev": true
+    },
+    "inflight": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+      "dev": true,
+      "requires": {
+        "once": "^1.3.0",
+        "wrappy": "1"
+      }
+    },
+    "inherits": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+      "dev": true
+    },
+    "internal-slot": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz",
+      "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==",
+      "dev": true,
+      "requires": {
+        "get-intrinsic": "^1.1.0",
+        "has": "^1.0.3",
+        "side-channel": "^1.0.4"
+      }
+    },
+    "interpret": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz",
+      "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==",
+      "dev": true
+    },
+    "invariant": {
+      "version": "2.2.4",
+      "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz",
+      "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==",
+      "dev": true,
+      "requires": {
+        "loose-envify": "^1.0.0"
+      }
+    },
+    "is-accessor-descriptor": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+      "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+      "dev": true,
+      "requires": {
+        "kind-of": "^6.0.0"
+      }
+    },
+    "is-arguments": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz",
+      "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0"
+      }
+    },
+    "is-arrayish": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+      "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
+    },
+    "is-bigint": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.1.tgz",
+      "integrity": "sha512-J0ELF4yHFxHy0cmSxZuheDOz2luOdVvqjwmEcj8H/L1JHeuEDSDbeRP+Dk9kFVk5RTFzbucJ2Kb9F7ixY2QaCg==",
+      "dev": true
+    },
+    "is-binary-path": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
+      "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+      "dev": true,
+      "requires": {
+        "binary-extensions": "^2.0.0"
+      }
+    },
+    "is-boolean-object": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz",
+      "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0"
+      }
+    },
+    "is-buffer": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz",
+      "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==",
+      "dev": true
+    },
+    "is-callable": {
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz",
+      "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==",
+      "dev": true
+    },
+    "is-core-module": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz",
+      "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==",
+      "requires": {
+        "has": "^1.0.3"
+      }
+    },
+    "is-data-descriptor": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+      "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+      "dev": true,
+      "requires": {
+        "kind-of": "^6.0.0"
+      }
+    },
+    "is-date-object": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
+      "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
+      "dev": true
+    },
+    "is-descriptor": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+      "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+      "dev": true,
+      "requires": {
+        "is-accessor-descriptor": "^1.0.0",
+        "is-data-descriptor": "^1.0.0",
+        "kind-of": "^6.0.2"
+      }
+    },
+    "is-extendable": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+      "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+      "dev": true,
+      "requires": {
+        "is-plain-object": "^2.0.4"
+      }
+    },
+    "is-extglob": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+      "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+      "dev": true
+    },
+    "is-finite": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz",
+      "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==",
+      "dev": true
+    },
+    "is-fullwidth-code-point": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+      "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+      "dev": true
+    },
+    "is-glob": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+      "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
+      "dev": true,
+      "requires": {
+        "is-extglob": "^2.1.1"
+      }
+    },
+    "is-in-browser": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz",
+      "integrity": "sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU="
+    },
+    "is-map": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.2.tgz",
+      "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==",
+      "dev": true
+    },
+    "is-negative-zero": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz",
+      "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==",
+      "dev": true
+    },
+    "is-number": {
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
+      "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+      "dev": true
+    },
+    "is-number-object": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz",
+      "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==",
+      "dev": true
+    },
+    "is-plain-object": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+      "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+      "dev": true,
+      "requires": {
+        "isobject": "^3.0.1"
+      }
+    },
+    "is-regex": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz",
+      "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==",
+      "dev": true,
+      "requires": {
+        "has-symbols": "^1.0.1"
+      }
+    },
+    "is-set": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz",
+      "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==",
+      "dev": true
+    },
+    "is-stream": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz",
+      "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==",
+      "dev": true
+    },
+    "is-string": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz",
+      "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==",
+      "dev": true
+    },
+    "is-symbol": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
+      "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
+      "dev": true,
+      "requires": {
+        "has-symbols": "^1.0.1"
+      }
+    },
+    "is-typed-array": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.4.tgz",
+      "integrity": "sha512-ILaRgn4zaSrVNXNGtON6iFNotXW3hAPF3+0fB1usg2jFlWqo5fEDdmJkz0zBfoi7Dgskr8Khi2xZ8cXqZEfXNA==",
+      "dev": true,
+      "requires": {
+        "available-typed-arrays": "^1.0.2",
+        "call-bind": "^1.0.0",
+        "es-abstract": "^1.18.0-next.1",
+        "foreach": "^2.0.5",
+        "has-symbols": "^1.0.1"
+      },
+      "dependencies": {
+        "es-abstract": {
+          "version": "1.18.0-next.1",
+          "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
+          "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+          "dev": true,
+          "requires": {
+            "es-to-primitive": "^1.2.1",
+            "function-bind": "^1.1.1",
+            "has": "^1.0.3",
+            "has-symbols": "^1.0.1",
+            "is-callable": "^1.2.2",
+            "is-negative-zero": "^2.0.0",
+            "is-regex": "^1.1.1",
+            "object-inspect": "^1.8.0",
+            "object-keys": "^1.1.1",
+            "object.assign": "^4.1.1",
+            "string.prototype.trimend": "^1.0.1",
+            "string.prototype.trimstart": "^1.0.1"
+          }
+        }
+      }
+    },
+    "is-weakmap": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz",
+      "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==",
+      "dev": true
+    },
+    "is-weakset": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.1.tgz",
+      "integrity": "sha512-pi4vhbhVHGLxohUw7PhGsueT4vRGFoXhP7+RGN0jKIv9+8PWYCQTqtADngrxOm2g46hoH0+g8uZZBzMrvVGDmw==",
+      "dev": true
+    },
+    "is-windows": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
+      "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
+      "dev": true
+    },
+    "is-wsl": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz",
+      "integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=",
+      "dev": true
+    },
+    "isarray": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+      "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
+    },
+    "isbinaryfile": {
+      "version": "4.0.8",
+      "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.8.tgz",
+      "integrity": "sha512-53h6XFniq77YdW+spoRrebh0mnmTxRPTlcuIArO57lmMdq4uBKFKaeTjnb92oYWrSn/LVL+LT+Hap2tFQj8V+w==",
+      "dev": true
+    },
+    "isexe": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+      "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
+      "dev": true
+    },
+    "isobject": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+      "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+      "dev": true
+    },
+    "istanbul": {
+      "version": "0.4.5",
+      "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz",
+      "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=",
+      "dev": true,
+      "requires": {
+        "abbrev": "1.0.x",
+        "async": "1.x",
+        "escodegen": "1.8.x",
+        "esprima": "2.7.x",
+        "glob": "^5.0.15",
+        "handlebars": "^4.0.1",
+        "js-yaml": "3.x",
+        "mkdirp": "0.5.x",
+        "nopt": "3.x",
+        "once": "1.x",
+        "resolve": "1.1.x",
+        "supports-color": "^3.1.0",
+        "which": "^1.1.1",
+        "wordwrap": "^1.0.0"
+      },
+      "dependencies": {
+        "esprima": {
+          "version": "2.7.3",
+          "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz",
+          "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=",
+          "dev": true
+        },
+        "glob": {
+          "version": "5.0.15",
+          "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz",
+          "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=",
+          "dev": true,
+          "requires": {
+            "inflight": "^1.0.4",
+            "inherits": "2",
+            "minimatch": "2 || 3",
+            "once": "^1.3.0",
+            "path-is-absolute": "^1.0.0"
+          }
+        },
+        "has-flag": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz",
+          "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=",
+          "dev": true
+        },
+        "resolve": {
+          "version": "1.1.7",
+          "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz",
+          "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "3.2.3",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz",
+          "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=",
+          "dev": true,
+          "requires": {
+            "has-flag": "^1.0.0"
+          }
+        },
+        "which": {
+          "version": "1.3.1",
+          "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+          "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+          "dev": true,
+          "requires": {
+            "isexe": "^2.0.0"
+          }
+        }
+      }
+    },
+    "istanbul-instrumenter-loader": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/istanbul-instrumenter-loader/-/istanbul-instrumenter-loader-3.0.1.tgz",
+      "integrity": "sha512-a5SPObZgS0jB/ixaKSMdn6n/gXSrK2S6q/UfRJBT3e6gQmVjwZROTODQsYW5ZNwOu78hG62Y3fWlebaVOL0C+w==",
+      "dev": true,
+      "requires": {
+        "convert-source-map": "^1.5.0",
+        "istanbul-lib-instrument": "^1.7.3",
+        "loader-utils": "^1.1.0",
+        "schema-utils": "^0.3.0"
+      }
+    },
+    "istanbul-lib-coverage": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz",
+      "integrity": "sha512-PzITeunAgyGbtY1ibVIUiV679EFChHjoMNRibEIobvmrCRaIgwLxNucOSimtNWUhEib/oO7QY2imD75JVgCJWQ==",
+      "dev": true
+    },
+    "istanbul-lib-instrument": {
+      "version": "1.10.2",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz",
+      "integrity": "sha512-aWHxfxDqvh/ZlxR8BBaEPVSWDPUkGD63VjGQn3jcw8jCp7sHEMKcrj4xfJn/ABzdMEHiQNyvDQhqm5o8+SQg7A==",
+      "dev": true,
+      "requires": {
+        "babel-generator": "^6.18.0",
+        "babel-template": "^6.16.0",
+        "babel-traverse": "^6.18.0",
+        "babel-types": "^6.18.0",
+        "babylon": "^6.18.0",
+        "istanbul-lib-coverage": "^1.2.1",
+        "semver": "^5.3.0"
+      },
+      "dependencies": {
+        "semver": {
+          "version": "5.7.1",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+          "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+          "dev": true
+        }
+      }
+    },
+    "istanbul-lib-report": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz",
+      "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==",
+      "dev": true,
+      "requires": {
+        "istanbul-lib-coverage": "^3.0.0",
+        "make-dir": "^3.0.0",
+        "supports-color": "^7.1.0"
+      },
+      "dependencies": {
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true
+        },
+        "istanbul-lib-coverage": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz",
+          "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
+    "istanbul-lib-source-maps": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz",
+      "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==",
+      "dev": true,
+      "requires": {
+        "debug": "^4.1.1",
+        "istanbul-lib-coverage": "^3.0.0",
+        "source-map": "^0.6.1"
+      },
+      "dependencies": {
+        "istanbul-lib-coverage": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz",
+          "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==",
+          "dev": true
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "istanbul-reports": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz",
+      "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==",
+      "dev": true,
+      "requires": {
+        "html-escaper": "^2.0.0",
+        "istanbul-lib-report": "^3.0.0"
+      }
+    },
+    "js-tokens": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+      "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
+    },
+    "js-yaml": {
+      "version": "3.14.1",
+      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
+      "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
+      "dev": true,
+      "requires": {
+        "argparse": "^1.0.7",
+        "esprima": "^4.0.0"
+      }
+    },
+    "jsesc": {
+      "version": "2.5.2",
+      "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
+      "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
+      "dev": true
+    },
+    "json-parse-better-errors": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
+      "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
+      "dev": true
+    },
+    "json-parse-even-better-errors": {
+      "version": "2.3.1",
+      "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
+      "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="
+    },
+    "json-schema-traverse": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+      "dev": true
+    },
+    "json-stable-stringify-without-jsonify": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+      "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
+      "dev": true
+    },
+    "json5": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
+      "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
+      "dev": true,
+      "requires": {
+        "minimist": "^1.2.0"
+      }
+    },
+    "jsonfile": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
+      "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.6"
+      }
+    },
+    "jss": {
+      "version": "10.7.1",
+      "resolved": "https://registry.npmjs.org/jss/-/jss-10.7.1.tgz",
+      "integrity": "sha512-5QN8JSVZR6cxpZNeGfzIjqPEP+ZJwJJfZbXmeABNdxiExyO+eJJDy6WDtqTf8SDKnbL5kZllEpAP71E/Lt7PXg==",
+      "requires": {
+        "@babel/runtime": "^7.3.1",
+        "csstype": "^3.0.2",
+        "is-in-browser": "^1.1.3",
+        "tiny-warning": "^1.0.2"
+      }
+    },
+    "jss-plugin-camel-case": {
+      "version": "10.7.1",
+      "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.7.1.tgz",
+      "integrity": "sha512-+ioIyWvmAfgDCWXsQcW1NMnLBvRinOVFkSYJUgewQ6TynOcSj5F1bSU23B7z0p1iqK0PPHIU62xY1iNJD33WGA==",
+      "requires": {
+        "@babel/runtime": "^7.3.1",
+        "hyphenate-style-name": "^1.0.3",
+        "jss": "10.7.1"
+      }
+    },
+    "jss-plugin-default-unit": {
+      "version": "10.7.1",
+      "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.7.1.tgz",
+      "integrity": "sha512-tW+dfYVNARBQb/ONzBwd8uyImigyzMiAEDai+AbH5rcHg5h3TtqhAkxx06iuZiT/dZUiFdSKlbe3q9jZGAPIwA==",
+      "requires": {
+        "@babel/runtime": "^7.3.1",
+        "jss": "10.7.1"
+      }
+    },
+    "jss-plugin-global": {
+      "version": "10.7.1",
+      "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.7.1.tgz",
+      "integrity": "sha512-FbxCnu44IkK/bw8X3CwZKmcAnJqjAb9LujlAc/aP0bMSdVa3/MugKQRyeQSu00uGL44feJJDoeXXiHOakBr/Zw==",
+      "requires": {
+        "@babel/runtime": "^7.3.1",
+        "jss": "10.7.1"
+      }
+    },
+    "jss-plugin-nested": {
+      "version": "10.7.1",
+      "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.7.1.tgz",
+      "integrity": "sha512-RNbICk7FlYKaJyv9tkMl7s6FFfeLA3ubNIFKvPqaWtADK0KUaPsPXVYBkAu4x1ItgsWx67xvReMrkcKA0jSXfA==",
+      "requires": {
+        "@babel/runtime": "^7.3.1",
+        "jss": "10.7.1",
+        "tiny-warning": "^1.0.2"
+      }
+    },
+    "jss-plugin-props-sort": {
+      "version": "10.7.1",
+      "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.7.1.tgz",
+      "integrity": "sha512-eyd5FhA+J0QrpqXxO7YNF/HMSXXl4pB0EmUdY4vSJI4QG22F59vQ6AHtP6fSwhmBdQ98Qd9gjfO+RMxcE39P1A==",
+      "requires": {
+        "@babel/runtime": "^7.3.1",
+        "jss": "10.7.1"
+      }
+    },
+    "jss-plugin-rule-value-function": {
+      "version": "10.7.1",
+      "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.7.1.tgz",
+      "integrity": "sha512-fGAAImlbaHD3fXAHI3ooX6aRESOl5iBt3LjpVjxs9II5u9tzam7pqFUmgTcrip9VpRqYHn8J3gA7kCtm8xKwHg==",
+      "requires": {
+        "@babel/runtime": "^7.3.1",
+        "jss": "10.7.1",
+        "tiny-warning": "^1.0.2"
+      }
+    },
+    "jss-plugin-vendor-prefixer": {
+      "version": "10.7.1",
+      "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.7.1.tgz",
+      "integrity": "sha512-1UHFmBn7hZNsHXTkLLOL8abRl8vi+D1EVzWD4WmLFj55vawHZfnH1oEz6TUf5Y61XHv0smdHabdXds6BgOXe3A==",
+      "requires": {
+        "@babel/runtime": "^7.3.1",
+        "css-vendor": "^2.0.8",
+        "jss": "10.7.1"
+      }
+    },
+    "jsx-ast-utils": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.0.tgz",
+      "integrity": "sha512-EIsmt3O3ljsU6sot/J4E1zDRxfBNrhjyf/OKjlydwgEimQuznlM4Wv7U+ueONJMyEn1WRE0K8dhi3dVAXYT24Q==",
+      "dev": true,
+      "requires": {
+        "array-includes": "^3.1.2",
+        "object.assign": "^4.1.2"
+      }
+    },
+    "just-extend": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz",
+      "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==",
+      "dev": true
+    },
+    "karma": {
+      "version": "6.3.4",
+      "resolved": "https://registry.npmjs.org/karma/-/karma-6.3.4.tgz",
+      "integrity": "sha512-hbhRogUYIulfkBTZT7xoPrCYhRBnBoqbbL4fszWD0ReFGUxU+LYBr3dwKdAluaDQ/ynT9/7C+Lf7pPNW4gSx4Q==",
+      "dev": true,
+      "requires": {
+        "body-parser": "^1.19.0",
+        "braces": "^3.0.2",
+        "chokidar": "^3.5.1",
+        "colors": "^1.4.0",
+        "connect": "^3.7.0",
+        "di": "^0.0.1",
+        "dom-serialize": "^2.2.1",
+        "glob": "^7.1.7",
+        "graceful-fs": "^4.2.6",
+        "http-proxy": "^1.18.1",
+        "isbinaryfile": "^4.0.8",
+        "lodash": "^4.17.21",
+        "log4js": "^6.3.0",
+        "mime": "^2.5.2",
+        "minimatch": "^3.0.4",
+        "qjobs": "^1.2.0",
+        "range-parser": "^1.2.1",
+        "rimraf": "^3.0.2",
+        "socket.io": "^3.1.0",
+        "source-map": "^0.6.1",
+        "tmp": "^0.2.1",
+        "ua-parser-js": "^0.7.28",
+        "yargs": "^16.1.1"
+      },
+      "dependencies": {
+        "glob": {
+          "version": "7.1.7",
+          "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz",
+          "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==",
+          "dev": true,
+          "requires": {
+            "fs.realpath": "^1.0.0",
+            "inflight": "^1.0.4",
+            "inherits": "2",
+            "minimatch": "^3.0.4",
+            "once": "^1.3.0",
+            "path-is-absolute": "^1.0.0"
+          }
+        },
+        "graceful-fs": {
+          "version": "4.2.6",
+          "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz",
+          "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==",
+          "dev": true
+        },
+        "mime": {
+          "version": "2.5.2",
+          "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz",
+          "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==",
+          "dev": true
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "karma-chrome-launcher": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.1.0.tgz",
+      "integrity": "sha512-3dPs/n7vgz1rxxtynpzZTvb9y/GIaW8xjAwcIGttLbycqoFtI7yo1NGnQi6oFTherRE+GIhCAHZC4vEqWGhNvg==",
+      "dev": true,
+      "requires": {
+        "which": "^1.2.1"
+      },
+      "dependencies": {
+        "which": {
+          "version": "1.3.1",
+          "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+          "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+          "dev": true,
+          "requires": {
+            "isexe": "^2.0.0"
+          }
+        }
+      }
+    },
+    "karma-coverage": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/karma-coverage/-/karma-coverage-2.0.3.tgz",
+      "integrity": "sha512-atDvLQqvPcLxhED0cmXYdsPMCQuh6Asa9FMZW1bhNqlVEhJoB9qyZ2BY1gu7D/rr5GLGb5QzYO4siQskxaWP/g==",
+      "dev": true,
+      "requires": {
+        "istanbul-lib-coverage": "^3.0.0",
+        "istanbul-lib-instrument": "^4.0.1",
+        "istanbul-lib-report": "^3.0.0",
+        "istanbul-lib-source-maps": "^4.0.0",
+        "istanbul-reports": "^3.0.0",
+        "minimatch": "^3.0.4"
+      },
+      "dependencies": {
+        "istanbul-lib-coverage": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz",
+          "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==",
+          "dev": true
+        },
+        "istanbul-lib-instrument": {
+          "version": "4.0.3",
+          "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz",
+          "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==",
+          "dev": true,
+          "requires": {
+            "@babel/core": "^7.7.5",
+            "@istanbuljs/schema": "^0.1.2",
+            "istanbul-lib-coverage": "^3.0.0",
+            "semver": "^6.3.0"
+          }
+        },
+        "semver": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+          "dev": true
+        }
+      }
+    },
+    "karma-mocha": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/karma-mocha/-/karma-mocha-2.0.1.tgz",
+      "integrity": "sha512-Tzd5HBjm8his2OA4bouAsATYEpZrp9vC7z5E5j4C5Of5Rrs1jY67RAwXNcVmd/Bnk1wgvQRou0zGVLey44G4tQ==",
+      "dev": true,
+      "requires": {
+        "minimist": "^1.2.3"
+      }
+    },
+    "karma-mocha-reporter": {
+      "version": "2.2.5",
+      "resolved": "https://registry.npmjs.org/karma-mocha-reporter/-/karma-mocha-reporter-2.2.5.tgz",
+      "integrity": "sha1-FRIAlejtgZGG5HoLAS8810GJVWA=",
+      "dev": true,
+      "requires": {
+        "chalk": "^2.1.0",
+        "log-symbols": "^2.1.0",
+        "strip-ansi": "^4.0.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+          "dev": true
+        },
+        "strip-ansi": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^3.0.0"
+          }
+        }
+      }
+    },
+    "karma-parallel": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/karma-parallel/-/karma-parallel-0.3.1.tgz",
+      "integrity": "sha512-64jxNYamYi/9Y67h4+FfViSYhwDgod3rLuq+ZdZ0c3XeZFp/3q3v3HVkd8b5Czp3hCB+LLF8DIv4zlR4xFqbRw==",
+      "dev": true,
+      "requires": {
+        "istanbul": "^0.4.5",
+        "lodash": "^4.17.11"
+      }
+    },
+    "karma-sinon": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/karma-sinon/-/karma-sinon-1.0.5.tgz",
+      "integrity": "sha1-TjRD8oMP3s/2JNN0cWPxIX2qKpo=",
+      "dev": true
+    },
+    "karma-sourcemap-loader": {
+      "version": "0.3.8",
+      "resolved": "https://registry.npmjs.org/karma-sourcemap-loader/-/karma-sourcemap-loader-0.3.8.tgz",
+      "integrity": "sha512-zorxyAakYZuBcHRJE+vbrK2o2JXLFWK8VVjiT/6P+ltLBUGUvqTEkUiQ119MGdOrK7mrmxXHZF1/pfT6GgIZ6g==",
+      "dev": true,
+      "requires": {
+        "graceful-fs": "^4.1.2"
+      }
+    },
+    "karma-webpack": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/karma-webpack/-/karma-webpack-4.0.2.tgz",
+      "integrity": "sha512-970/okAsdUOmiMOCY8sb17A2I8neS25Ad9uhyK3GHgmRSIFJbDcNEFE8dqqUhNe9OHiCC9k3DMrSmtd/0ymP1A==",
+      "dev": true,
+      "requires": {
+        "clone-deep": "^4.0.1",
+        "loader-utils": "^1.1.0",
+        "neo-async": "^2.6.1",
+        "schema-utils": "^1.0.0",
+        "source-map": "^0.7.3",
+        "webpack-dev-middleware": "^3.7.0"
+      },
+      "dependencies": {
+        "schema-utils": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
+          "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==",
+          "dev": true,
+          "requires": {
+            "ajv": "^6.1.0",
+            "ajv-errors": "^1.0.0",
+            "ajv-keywords": "^3.1.0"
+          }
+        },
+        "source-map": {
+          "version": "0.7.3",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
+          "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
+          "dev": true
+        }
+      }
+    },
+    "kind-of": {
+      "version": "6.0.3",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+      "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+      "dev": true
+    },
+    "klona": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz",
+      "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==",
+      "dev": true
+    },
+    "language-subtag-registry": {
+      "version": "0.3.21",
+      "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz",
+      "integrity": "sha512-L0IqwlIXjilBVVYKFT37X9Ih11Um5NEl9cbJIuU/SwP/zEEAbBPOnEeeuxVMf45ydWQRDQN3Nqc96OgbH1K+Pg==",
+      "dev": true
+    },
+    "language-tags": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz",
+      "integrity": "sha1-0yHbxNowuovzAk4ED6XBRmH5GTo=",
+      "dev": true,
+      "requires": {
+        "language-subtag-registry": "~0.3.2"
+      }
+    },
+    "levn": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+      "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
+      "dev": true,
+      "requires": {
+        "prelude-ls": "^1.2.1",
+        "type-check": "~0.4.0"
+      }
+    },
+    "lines-and-columns": {
+      "version": "1.1.6",
+      "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz",
+      "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA="
+    },
+    "lit-element": {
+      "version": "2.5.1",
+      "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-2.5.1.tgz",
+      "integrity": "sha512-ogu7PiJTA33bEK0xGu1dmaX5vhcRjBXCFexPja0e7P7jqLhTpNKYRPmE+GmiCaRVAbiQKGkUgkh/i6+bh++dPQ==",
+      "requires": {
+        "lit-html": "^1.1.1"
+      }
+    },
+    "lit-html": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-1.4.1.tgz",
+      "integrity": "sha512-B9btcSgPYb1q4oSOb/PrOT6Z/H+r6xuNzfH4lFli/AWhYwdtrgQkQWBbIc6mdnf6E2IL3gDXdkkqNktpU0OZQA=="
+    },
+    "loader-runner": {
+      "version": "2.4.0",
+      "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz",
+      "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==",
+      "dev": true
+    },
+    "loader-utils": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz",
+      "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==",
+      "dev": true,
+      "requires": {
+        "big.js": "^5.2.2",
+        "emojis-list": "^3.0.0",
+        "json5": "^1.0.1"
+      }
+    },
+    "locate-path": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+      "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+      "dev": true,
+      "requires": {
+        "p-locate": "^4.1.0"
+      }
+    },
+    "lodash": {
+      "version": "4.17.21",
+      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+      "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+      "dev": true
+    },
+    "lodash.clonedeep": {
+      "version": "4.5.0",
+      "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
+      "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
+      "dev": true
+    },
+    "lodash.debounce": {
+      "version": "4.0.8",
+      "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
+      "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=",
+      "dev": true
+    },
+    "lodash.get": {
+      "version": "4.4.2",
+      "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
+      "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
+      "dev": true
+    },
+    "lodash.merge": {
+      "version": "4.6.2",
+      "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+      "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+      "dev": true
+    },
+    "lodash.truncate": {
+      "version": "4.4.2",
+      "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz",
+      "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=",
+      "dev": true
+    },
+    "log-symbols": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
+      "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
+      "dev": true,
+      "requires": {
+        "chalk": "^2.0.1"
+      }
+    },
+    "log4js": {
+      "version": "6.3.0",
+      "resolved": "https://registry.npmjs.org/log4js/-/log4js-6.3.0.tgz",
+      "integrity": "sha512-Mc8jNuSFImQUIateBFwdOQcmC6Q5maU0VVvdC2R6XMb66/VnT+7WS4D/0EeNMZu1YODmJe5NIn2XftCzEocUgw==",
+      "dev": true,
+      "requires": {
+        "date-format": "^3.0.0",
+        "debug": "^4.1.1",
+        "flatted": "^2.0.1",
+        "rfdc": "^1.1.4",
+        "streamroller": "^2.2.4"
+      },
+      "dependencies": {
+        "flatted": {
+          "version": "2.0.2",
+          "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz",
+          "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==",
+          "dev": true
+        }
+      }
+    },
+    "loose-envify": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
+      "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+      "requires": {
+        "js-tokens": "^3.0.0 || ^4.0.0"
+      }
+    },
+    "lower-case": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
+      "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
+      "dev": true,
+      "requires": {
+        "tslib": "^2.0.3"
+      }
+    },
+    "lru-cache": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+      "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+      "dev": true,
+      "requires": {
+        "yallist": "^4.0.0"
+      }
+    },
+    "lz-string": {
+      "version": "1.4.4",
+      "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz",
+      "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=",
+      "dev": true
+    },
+    "make-dir": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
+      "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
+      "dev": true,
+      "requires": {
+        "semver": "^6.0.0"
+      },
+      "dependencies": {
+        "semver": {
+          "version": "6.3.0",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+          "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+          "dev": true
+        }
+      }
+    },
+    "map-cache": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
+      "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
+      "dev": true
+    },
+    "map-visit": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
+      "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
+      "dev": true,
+      "requires": {
+        "object-visit": "^1.0.0"
+      }
+    },
+    "marked": {
+      "version": "2.0.7",
+      "resolved": "https://registry.npmjs.org/marked/-/marked-2.0.7.tgz",
+      "integrity": "sha512-BJXxkuIfJchcXOJWTT2DOL+yFWifFv2yGYOUzvXg8Qz610QKw+sHCvTMYwA+qWGhlA2uivBezChZ/pBy1tWdkQ=="
+    },
+    "md5.js": {
+      "version": "1.3.5",
+      "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",
+      "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==",
+      "dev": true,
+      "requires": {
+        "hash-base": "^3.0.0",
+        "inherits": "^2.0.1",
+        "safe-buffer": "^5.1.2"
+      }
+    },
+    "media-typer": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
+      "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
+      "dev": true
+    },
+    "memory-fs": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz",
+      "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=",
+      "dev": true,
+      "requires": {
+        "errno": "^0.1.3",
+        "readable-stream": "^2.0.1"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "dev": true,
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        }
+      }
+    },
+    "merge-stream": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
+      "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
+      "dev": true
+    },
+    "merge2": {
+      "version": "1.4.1",
+      "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
+      "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
+      "dev": true
+    },
+    "micromatch": {
+      "version": "3.1.10",
+      "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+      "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+      "dev": true,
+      "requires": {
+        "arr-diff": "^4.0.0",
+        "array-unique": "^0.3.2",
+        "braces": "^2.3.1",
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "extglob": "^2.0.4",
+        "fragment-cache": "^0.2.1",
+        "kind-of": "^6.0.2",
+        "nanomatch": "^1.2.9",
+        "object.pick": "^1.3.0",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.2"
+      },
+      "dependencies": {
+        "braces": {
+          "version": "2.3.2",
+          "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+          "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+          "dev": true,
+          "requires": {
+            "arr-flatten": "^1.1.0",
+            "array-unique": "^0.3.2",
+            "extend-shallow": "^2.0.1",
+            "fill-range": "^4.0.0",
+            "isobject": "^3.0.1",
+            "repeat-element": "^1.1.2",
+            "snapdragon": "^0.8.1",
+            "snapdragon-node": "^2.0.1",
+            "split-string": "^3.0.2",
+            "to-regex": "^3.0.1"
+          },
+          "dependencies": {
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "^0.1.0"
+              }
+            }
+          }
+        },
+        "fill-range": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+          "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+          "dev": true,
+          "requires": {
+            "extend-shallow": "^2.0.1",
+            "is-number": "^3.0.0",
+            "repeat-string": "^1.6.1",
+            "to-regex-range": "^2.1.0"
+          },
+          "dependencies": {
+            "extend-shallow": {
+              "version": "2.0.1",
+              "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+              "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+              "dev": true,
+              "requires": {
+                "is-extendable": "^0.1.0"
+              }
+            }
+          }
+        },
+        "is-buffer": {
+          "version": "1.1.6",
+          "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+          "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+          "dev": true
+        },
+        "is-extendable": {
+          "version": "0.1.1",
+          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+          "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
+          "dev": true
+        },
+        "is-number": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "to-regex-range": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+          "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+          "dev": true,
+          "requires": {
+            "is-number": "^3.0.0",
+            "repeat-string": "^1.6.1"
+          }
+        }
+      }
+    },
+    "miller-rabin": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",
+      "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^4.0.0",
+        "brorand": "^1.0.1"
+      },
+      "dependencies": {
+        "bn.js": {
+          "version": "4.12.0",
+          "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+          "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
+          "dev": true
+        }
+      }
+    },
+    "mime": {
+      "version": "2.4.7",
+      "resolved": "https://registry.npmjs.org/mime/-/mime-2.4.7.tgz",
+      "integrity": "sha512-dhNd1uA2u397uQk3Nv5LM4lm93WYDUXFn3Fu291FJerns4jyTudqhIWe4W04YLy7Uk1tm1Ore04NpjRvQp/NPA==",
+      "dev": true
+    },
+    "mime-db": {
+      "version": "1.48.0",
+      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.48.0.tgz",
+      "integrity": "sha512-FM3QwxV+TnZYQ2aRqhlKBMHxk10lTbMt3bBkMAp54ddrNeVSfcQYOOKuGuy3Ddrm38I04If834fOUSq1yzslJQ==",
+      "dev": true
+    },
+    "mime-types": {
+      "version": "2.1.31",
+      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.31.tgz",
+      "integrity": "sha512-XGZnNzm3QvgKxa8dpzyhFTHmpP3l5YNusmne07VUOXxou9CqUqYa/HBy124RqtVh/O2pECas/MOcsDgpilPOPg==",
+      "dev": true,
+      "requires": {
+        "mime-db": "1.48.0"
+      }
+    },
+    "mimic-fn": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+      "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+      "dev": true
+    },
+    "minimalistic-assert": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
+      "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==",
+      "dev": true
+    },
+    "minimalistic-crypto-utils": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz",
+      "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=",
+      "dev": true
+    },
+    "minimatch": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+      "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+      "dev": true,
+      "requires": {
+        "brace-expansion": "^1.1.7"
+      }
+    },
+    "minimist": {
+      "version": "1.2.5",
+      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+      "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
+      "dev": true
+    },
+    "mississippi": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz",
+      "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==",
+      "dev": true,
+      "requires": {
+        "concat-stream": "^1.5.0",
+        "duplexify": "^3.4.2",
+        "end-of-stream": "^1.1.0",
+        "flush-write-stream": "^1.0.0",
+        "from2": "^2.1.0",
+        "parallel-transform": "^1.1.0",
+        "pump": "^3.0.0",
+        "pumpify": "^1.3.3",
+        "stream-each": "^1.1.0",
+        "through2": "^2.0.0"
+      }
+    },
+    "mixin-deep": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
+      "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
+      "dev": true,
+      "requires": {
+        "for-in": "^1.0.2",
+        "is-extendable": "^1.0.1"
+      }
+    },
+    "mkdirp": {
+      "version": "0.5.5",
+      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
+      "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
+      "dev": true,
+      "requires": {
+        "minimist": "^1.2.5"
+      }
+    },
+    "mkdirp-classic": {
+      "version": "0.5.3",
+      "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
+      "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
+      "dev": true
+    },
+    "mocha": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/mocha/-/mocha-7.2.0.tgz",
+      "integrity": "sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ==",
+      "dev": true,
+      "requires": {
+        "ansi-colors": "3.2.3",
+        "browser-stdout": "1.3.1",
+        "chokidar": "3.3.0",
+        "debug": "3.2.6",
+        "diff": "3.5.0",
+        "escape-string-regexp": "1.0.5",
+        "find-up": "3.0.0",
+        "glob": "7.1.3",
+        "growl": "1.10.5",
+        "he": "1.2.0",
+        "js-yaml": "3.13.1",
+        "log-symbols": "3.0.0",
+        "minimatch": "3.0.4",
+        "mkdirp": "0.5.5",
+        "ms": "2.1.1",
+        "node-environment-flags": "1.0.6",
+        "object.assign": "4.1.0",
+        "strip-json-comments": "2.0.1",
+        "supports-color": "6.0.0",
+        "which": "1.3.1",
+        "wide-align": "1.1.3",
+        "yargs": "13.3.2",
+        "yargs-parser": "13.1.2",
+        "yargs-unparser": "1.6.0"
+      },
+      "dependencies": {
+        "ansi-colors": {
+          "version": "3.2.3",
+          "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
+          "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
+          "dev": true
+        },
+        "ansi-regex": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+          "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+          "dev": true
+        },
+        "chokidar": {
+          "version": "3.3.0",
+          "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.3.0.tgz",
+          "integrity": "sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A==",
+          "dev": true,
+          "requires": {
+            "anymatch": "~3.1.1",
+            "braces": "~3.0.2",
+            "fsevents": "~2.1.1",
+            "glob-parent": "~5.1.0",
+            "is-binary-path": "~2.1.0",
+            "is-glob": "~4.0.1",
+            "normalize-path": "~3.0.0",
+            "readdirp": "~3.2.0"
+          }
+        },
+        "cliui": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
+          "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
+          "dev": true,
+          "requires": {
+            "string-width": "^3.1.0",
+            "strip-ansi": "^5.2.0",
+            "wrap-ansi": "^5.1.0"
+          }
+        },
+        "debug": {
+          "version": "3.2.6",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
+          "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
+          "dev": true,
+          "requires": {
+            "ms": "^2.1.1"
+          }
+        },
+        "diff": {
+          "version": "3.5.0",
+          "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
+          "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
+          "dev": true
+        },
+        "emoji-regex": {
+          "version": "7.0.3",
+          "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+          "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+          "dev": true
+        },
+        "find-up": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+          "dev": true,
+          "requires": {
+            "locate-path": "^3.0.0"
+          }
+        },
+        "fsevents": {
+          "version": "2.1.3",
+          "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
+          "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
+          "dev": true,
+          "optional": true
+        },
+        "glob": {
+          "version": "7.1.3",
+          "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
+          "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
+          "dev": true,
+          "requires": {
+            "fs.realpath": "^1.0.0",
+            "inflight": "^1.0.4",
+            "inherits": "2",
+            "minimatch": "^3.0.4",
+            "once": "^1.3.0",
+            "path-is-absolute": "^1.0.0"
+          }
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+          "dev": true
+        },
+        "js-yaml": {
+          "version": "3.13.1",
+          "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
+          "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
+          "dev": true,
+          "requires": {
+            "argparse": "^1.0.7",
+            "esprima": "^4.0.0"
+          }
+        },
+        "locate-path": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+          "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+          "dev": true,
+          "requires": {
+            "p-locate": "^3.0.0",
+            "path-exists": "^3.0.0"
+          }
+        },
+        "log-symbols": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-3.0.0.tgz",
+          "integrity": "sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ==",
+          "dev": true,
+          "requires": {
+            "chalk": "^2.4.2"
+          }
+        },
+        "ms": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
+          "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
+          "dev": true
+        },
+        "object.assign": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
+          "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
+          "dev": true,
+          "requires": {
+            "define-properties": "^1.1.2",
+            "function-bind": "^1.1.1",
+            "has-symbols": "^1.0.0",
+            "object-keys": "^1.0.11"
+          }
+        },
+        "p-locate": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+          "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+          "dev": true,
+          "requires": {
+            "p-limit": "^2.0.0"
+          }
+        },
+        "path-exists": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+          "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+          "dev": true
+        },
+        "readdirp": {
+          "version": "3.2.0",
+          "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.2.0.tgz",
+          "integrity": "sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ==",
+          "dev": true,
+          "requires": {
+            "picomatch": "^2.0.4"
+          }
+        },
+        "string-width": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+          "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+          "dev": true,
+          "requires": {
+            "emoji-regex": "^7.0.1",
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^5.1.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+          "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^4.1.0"
+          }
+        },
+        "strip-json-comments": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
+          "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "6.0.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz",
+          "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        },
+        "which": {
+          "version": "1.3.1",
+          "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+          "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+          "dev": true,
+          "requires": {
+            "isexe": "^2.0.0"
+          }
+        },
+        "wrap-ansi": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
+          "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.0",
+            "string-width": "^3.0.0",
+            "strip-ansi": "^5.0.0"
+          }
+        },
+        "yargs": {
+          "version": "13.3.2",
+          "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
+          "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
+          "dev": true,
+          "requires": {
+            "cliui": "^5.0.0",
+            "find-up": "^3.0.0",
+            "get-caller-file": "^2.0.1",
+            "require-directory": "^2.1.1",
+            "require-main-filename": "^2.0.0",
+            "set-blocking": "^2.0.0",
+            "string-width": "^3.0.0",
+            "which-module": "^2.0.0",
+            "y18n": "^4.0.0",
+            "yargs-parser": "^13.1.2"
+          }
+        },
+        "yargs-parser": {
+          "version": "13.1.2",
+          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
+          "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
+          "dev": true,
+          "requires": {
+            "camelcase": "^5.0.0",
+            "decamelize": "^1.2.0"
+          }
+        }
+      }
+    },
+    "moment": {
+      "version": "2.29.1",
+      "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
+      "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
+    },
+    "mousetrap": {
+      "version": "1.6.5",
+      "resolved": "https://registry.npmjs.org/mousetrap/-/mousetrap-1.6.5.tgz",
+      "integrity": "sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA=="
+    },
+    "move-concurrently": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
+      "integrity": "sha1-viwAX9oy4LKa8fBdfEszIUxwH5I=",
+      "dev": true,
+      "requires": {
+        "aproba": "^1.1.1",
+        "copy-concurrently": "^1.0.0",
+        "fs-write-stream-atomic": "^1.0.8",
+        "mkdirp": "^0.5.1",
+        "rimraf": "^2.5.4",
+        "run-queue": "^1.0.3"
+      },
+      "dependencies": {
+        "rimraf": {
+          "version": "2.7.1",
+          "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
+          "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
+          "dev": true,
+          "requires": {
+            "glob": "^7.1.3"
+          }
+        }
+      }
+    },
+    "ms": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+      "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+      "dev": true
+    },
+    "nan": {
+      "version": "2.14.2",
+      "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
+      "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
+      "dev": true,
+      "optional": true
+    },
+    "nanoid": {
+      "version": "3.1.23",
+      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz",
+      "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==",
+      "dev": true
+    },
+    "nanomatch": {
+      "version": "1.2.13",
+      "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
+      "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
+      "dev": true,
+      "requires": {
+        "arr-diff": "^4.0.0",
+        "array-unique": "^0.3.2",
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "fragment-cache": "^0.2.1",
+        "is-windows": "^1.0.2",
+        "kind-of": "^6.0.2",
+        "object.pick": "^1.3.0",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.1"
+      }
+    },
+    "natural-compare": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+      "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
+      "dev": true
+    },
+    "negotiator": {
+      "version": "0.6.2",
+      "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
+      "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==",
+      "dev": true
+    },
+    "neo-async": {
+      "version": "2.6.2",
+      "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
+      "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
+      "dev": true
+    },
+    "nise": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/nise/-/nise-4.1.0.tgz",
+      "integrity": "sha512-eQMEmGN/8arp0xsvGoQ+B1qvSkR73B1nWSCh7nOt5neMCtwcQVYQGdzQMhcNscktTsWB54xnlSQFzOAPJD8nXA==",
+      "dev": true,
+      "requires": {
+        "@sinonjs/commons": "^1.7.0",
+        "@sinonjs/fake-timers": "^6.0.0",
+        "@sinonjs/text-encoding": "^0.7.1",
+        "just-extend": "^4.0.2",
+        "path-to-regexp": "^1.7.0"
+      },
+      "dependencies": {
+        "path-to-regexp": {
+          "version": "1.8.0",
+          "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
+          "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
+          "dev": true,
+          "requires": {
+            "isarray": "0.0.1"
+          }
+        }
+      }
+    },
+    "no-case": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
+      "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
+      "dev": true,
+      "requires": {
+        "lower-case": "^2.0.2",
+        "tslib": "^2.0.3"
+      }
+    },
+    "node-environment-flags": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.6.tgz",
+      "integrity": "sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw==",
+      "dev": true,
+      "requires": {
+        "object.getownpropertydescriptors": "^2.0.3",
+        "semver": "^5.7.0"
+      },
+      "dependencies": {
+        "semver": {
+          "version": "5.7.1",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+          "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+          "dev": true
+        }
+      }
+    },
+    "node-fetch": {
+      "version": "2.6.1",
+      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
+      "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
+      "dev": true
+    },
+    "node-libs-browser": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz",
+      "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==",
+      "dev": true,
+      "requires": {
+        "assert": "^1.1.1",
+        "browserify-zlib": "^0.2.0",
+        "buffer": "^4.3.0",
+        "console-browserify": "^1.1.0",
+        "constants-browserify": "^1.0.0",
+        "crypto-browserify": "^3.11.0",
+        "domain-browser": "^1.1.1",
+        "events": "^3.0.0",
+        "https-browserify": "^1.0.0",
+        "os-browserify": "^0.3.0",
+        "path-browserify": "0.0.1",
+        "process": "^0.11.10",
+        "punycode": "^1.2.4",
+        "querystring-es3": "^0.2.0",
+        "readable-stream": "^2.3.3",
+        "stream-browserify": "^2.0.1",
+        "stream-http": "^2.7.2",
+        "string_decoder": "^1.0.0",
+        "timers-browserify": "^2.0.4",
+        "tty-browserify": "0.0.0",
+        "url": "^0.11.0",
+        "util": "^0.11.0",
+        "vm-browserify": "^1.0.1"
+      },
+      "dependencies": {
+        "buffer": {
+          "version": "4.9.2",
+          "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz",
+          "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==",
+          "dev": true,
+          "requires": {
+            "base64-js": "^1.0.2",
+            "ieee754": "^1.1.4",
+            "isarray": "^1.0.0"
+          }
+        },
+        "inherits": {
+          "version": "2.0.3",
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+          "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
+          "dev": true
+        },
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true
+        },
+        "punycode": {
+          "version": "1.4.1",
+          "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
+          "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "dev": true,
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        },
+        "util": {
+          "version": "0.11.1",
+          "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz",
+          "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==",
+          "dev": true,
+          "requires": {
+            "inherits": "2.0.3"
+          }
+        }
+      }
+    },
+    "node-releases": {
+      "version": "1.1.73",
+      "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.73.tgz",
+      "integrity": "sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg==",
+      "dev": true
+    },
+    "nopt": {
+      "version": "3.0.6",
+      "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
+      "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=",
+      "dev": true,
+      "requires": {
+        "abbrev": "1"
+      }
+    },
+    "normalize-path": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+      "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+      "dev": true
+    },
+    "normalize-range": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
+      "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=",
+      "dev": true
+    },
+    "npm-run-path": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
+      "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
+      "dev": true,
+      "requires": {
+        "path-key": "^3.0.0"
+      }
+    },
+    "nth-check": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz",
+      "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==",
+      "dev": true,
+      "requires": {
+        "boolbase": "^1.0.0"
+      }
+    },
+    "object-assign": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
+    },
+    "object-copy": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
+      "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
+      "dev": true,
+      "requires": {
+        "copy-descriptor": "^0.1.0",
+        "define-property": "^0.2.5",
+        "kind-of": "^3.0.3"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "0.1.6",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+          "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          }
+        },
+        "is-buffer": {
+          "version": "1.1.6",
+          "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+          "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+          "dev": true
+        },
+        "is-data-descriptor": {
+          "version": "0.1.4",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+          "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          }
+        },
+        "is-descriptor": {
+          "version": "0.1.6",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+          "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^0.1.6",
+            "is-data-descriptor": "^0.1.4",
+            "kind-of": "^5.0.0"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "5.1.0",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+              "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+              "dev": true
+            }
+          }
+        },
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "dev": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "object-inspect": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz",
+      "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw=="
+    },
+    "object-is": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.4.tgz",
+      "integrity": "sha512-1ZvAZ4wlF7IyPVOcE1Omikt7UpaFlOQq0HlSti+ZvDH3UiD2brwGMwDbyV43jao2bKJ+4+WdPJHSd7kgzKYVqg==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3"
+      }
+    },
+    "object-keys": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+      "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+      "dev": true
+    },
+    "object-visit": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
+      "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
+      "dev": true,
+      "requires": {
+        "isobject": "^3.0.0"
+      }
+    },
+    "object.assign": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
+      "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "has-symbols": "^1.0.1",
+        "object-keys": "^1.1.1"
+      }
+    },
+    "object.entries": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.4.tgz",
+      "integrity": "sha512-h4LWKWE+wKQGhtMjZEBud7uLGhqyLwj8fpHOarZhD2uY3C9cRtk57VQ89ke3moByLXMedqs3XCHzyb4AmA2DjA==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.18.2"
+      }
+    },
+    "object.fromentries": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.4.tgz",
+      "integrity": "sha512-EsFBshs5RUUpQEY1D4q/m59kMfz4YJvxuNCJcv/jWwOJr34EaVnG11ZrZa0UHB3wnzV1wx8m58T4hQL8IuNXlQ==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.18.0-next.2",
+        "has": "^1.0.3"
+      }
+    },
+    "object.getownpropertydescriptors": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz",
+      "integrity": "sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.18.0-next.1"
+      },
+      "dependencies": {
+        "es-abstract": {
+          "version": "1.18.0-next.1",
+          "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
+          "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+          "dev": true,
+          "requires": {
+            "es-to-primitive": "^1.2.1",
+            "function-bind": "^1.1.1",
+            "has": "^1.0.3",
+            "has-symbols": "^1.0.1",
+            "is-callable": "^1.2.2",
+            "is-negative-zero": "^2.0.0",
+            "is-regex": "^1.1.1",
+            "object-inspect": "^1.8.0",
+            "object-keys": "^1.1.1",
+            "object.assign": "^4.1.1",
+            "string.prototype.trimend": "^1.0.1",
+            "string.prototype.trimstart": "^1.0.1"
+          }
+        }
+      }
+    },
+    "object.pick": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
+      "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
+      "dev": true,
+      "requires": {
+        "isobject": "^3.0.1"
+      }
+    },
+    "object.values": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz",
+      "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.18.2"
+      }
+    },
+    "on-finished": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
+      "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
+      "dev": true,
+      "requires": {
+        "ee-first": "1.1.1"
+      }
+    },
+    "once": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+      "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+      "dev": true,
+      "requires": {
+        "wrappy": "1"
+      }
+    },
+    "onetime": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
+      "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
+      "dev": true,
+      "requires": {
+        "mimic-fn": "^2.1.0"
+      }
+    },
+    "opener": {
+      "version": "1.5.2",
+      "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz",
+      "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==",
+      "dev": true
+    },
+    "optionator": {
+      "version": "0.9.1",
+      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
+      "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
+      "dev": true,
+      "requires": {
+        "deep-is": "^0.1.3",
+        "fast-levenshtein": "^2.0.6",
+        "levn": "^0.4.1",
+        "prelude-ls": "^1.2.1",
+        "type-check": "^0.4.0",
+        "word-wrap": "^1.2.3"
+      }
+    },
+    "os-browserify": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz",
+      "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=",
+      "dev": true
+    },
+    "p-limit": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+      "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+      "dev": true,
+      "requires": {
+        "p-try": "^2.0.0"
+      }
+    },
+    "p-locate": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+      "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+      "dev": true,
+      "requires": {
+        "p-limit": "^2.2.0"
+      }
+    },
+    "p-try": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+      "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+      "dev": true
+    },
+    "page": {
+      "version": "1.11.6",
+      "resolved": "https://registry.npmjs.org/page/-/page-1.11.6.tgz",
+      "integrity": "sha512-P6e2JfzkBrPeFCIPplLP7vDDiU84RUUZMrWdsH4ZBGJ8OosnwFkcUkBHp1DTIjuipLliw9yQn/ZJsXZvarsO+g==",
+      "requires": {
+        "path-to-regexp": "~1.2.1"
+      }
+    },
+    "pako": {
+      "version": "1.0.11",
+      "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
+      "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
+      "dev": true
+    },
+    "parallel-transform": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz",
+      "integrity": "sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg==",
+      "dev": true,
+      "requires": {
+        "cyclist": "^1.0.1",
+        "inherits": "^2.0.3",
+        "readable-stream": "^2.1.5"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "dev": true,
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        }
+      }
+    },
+    "param-case": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz",
+      "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==",
+      "dev": true,
+      "requires": {
+        "dot-case": "^3.0.4",
+        "tslib": "^2.0.3"
+      }
+    },
+    "parent-module": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+      "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+      "requires": {
+        "callsites": "^3.0.0"
+      }
+    },
+    "parse-asn1": {
+      "version": "5.1.6",
+      "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz",
+      "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==",
+      "dev": true,
+      "requires": {
+        "asn1.js": "^5.2.0",
+        "browserify-aes": "^1.0.0",
+        "evp_bytestokey": "^1.0.0",
+        "pbkdf2": "^3.0.3",
+        "safe-buffer": "^5.1.1"
+      }
+    },
+    "parse-json": {
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+      "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
+      "requires": {
+        "@babel/code-frame": "^7.0.0",
+        "error-ex": "^1.3.1",
+        "json-parse-even-better-errors": "^2.3.0",
+        "lines-and-columns": "^1.1.6"
+      }
+    },
+    "parseurl": {
+      "version": "1.3.3",
+      "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+      "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+      "dev": true
+    },
+    "pascal-case": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
+      "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==",
+      "dev": true,
+      "requires": {
+        "no-case": "^3.0.4",
+        "tslib": "^2.0.3"
+      }
+    },
+    "pascalcase": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
+      "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
+      "dev": true
+    },
+    "path": {
+      "version": "0.12.7",
+      "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
+      "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
+      "dev": true,
+      "requires": {
+        "process": "^0.11.1",
+        "util": "^0.10.3"
+      }
+    },
+    "path-browserify": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz",
+      "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==",
+      "dev": true
+    },
+    "path-dirname": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
+      "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=",
+      "dev": true,
+      "optional": true
+    },
+    "path-exists": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+      "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+      "dev": true
+    },
+    "path-is-absolute": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+      "dev": true
+    },
+    "path-key": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+      "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+      "dev": true
+    },
+    "path-parse": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
+      "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
+    },
+    "path-to-regexp": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.2.1.tgz",
+      "integrity": "sha1-szcFwUAjTYc8hyHHuf2LVB7Tr/k=",
+      "requires": {
+        "isarray": "0.0.1"
+      }
+    },
+    "path-type": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+      "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="
+    },
+    "pathval": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
+      "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
+      "dev": true
+    },
+    "pbkdf2": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz",
+      "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==",
+      "dev": true,
+      "requires": {
+        "create-hash": "^1.1.2",
+        "create-hmac": "^1.1.4",
+        "ripemd160": "^2.0.1",
+        "safe-buffer": "^5.0.1",
+        "sha.js": "^2.4.8"
+      }
+    },
+    "pend": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz",
+      "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=",
+      "dev": true
+    },
+    "picomatch": {
+      "version": "2.2.3",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz",
+      "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==",
+      "dev": true
+    },
+    "pify": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
+      "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
+      "dev": true
+    },
+    "pkg-dir": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
+      "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
+      "dev": true,
+      "requires": {
+        "find-up": "^4.0.0"
+      }
+    },
+    "posix-character-classes": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
+      "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
+      "dev": true
+    },
+    "postcss": {
+      "version": "8.3.5",
+      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.5.tgz",
+      "integrity": "sha512-NxTuJocUhYGsMiMFHDUkmjSKT3EdH4/WbGF6GCi1NDGk+vbcUTun4fpbOqaPtD8IIsztA2ilZm2DhYCuyN58gA==",
+      "dev": true,
+      "requires": {
+        "colorette": "^1.2.2",
+        "nanoid": "^3.1.23",
+        "source-map-js": "^0.6.2"
+      }
+    },
+    "postcss-loader": {
+      "version": "4.3.0",
+      "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-4.3.0.tgz",
+      "integrity": "sha512-M/dSoIiNDOo8Rk0mUqoj4kpGq91gcxCfb9PoyZVdZ76/AuhxylHDYZblNE8o+EQ9AMSASeMFEKxZf5aU6wlx1Q==",
+      "dev": true,
+      "requires": {
+        "cosmiconfig": "^7.0.0",
+        "klona": "^2.0.4",
+        "loader-utils": "^2.0.0",
+        "schema-utils": "^3.0.0",
+        "semver": "^7.3.4"
+      },
+      "dependencies": {
+        "cosmiconfig": {
+          "version": "7.0.0",
+          "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz",
+          "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==",
+          "dev": true,
+          "requires": {
+            "@types/parse-json": "^4.0.0",
+            "import-fresh": "^3.2.1",
+            "parse-json": "^5.0.0",
+            "path-type": "^4.0.0",
+            "yaml": "^1.10.0"
+          }
+        },
+        "json5": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
+          "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
+          "dev": true,
+          "requires": {
+            "minimist": "^1.2.5"
+          }
+        },
+        "loader-utils": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
+          "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
+          "dev": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
+        "schema-utils": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
+          "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
+          "dev": true,
+          "requires": {
+            "@types/json-schema": "^7.0.7",
+            "ajv": "^6.12.5",
+            "ajv-keywords": "^3.5.2"
+          }
+        },
+        "semver": {
+          "version": "7.3.5",
+          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
+          "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+          "dev": true,
+          "requires": {
+            "lru-cache": "^6.0.0"
+          }
+        }
+      }
+    },
+    "postcss-modules-extract-imports": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
+      "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
+      "dev": true
+    },
+    "postcss-modules-local-by-default": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz",
+      "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==",
+      "dev": true,
+      "requires": {
+        "icss-utils": "^5.0.0",
+        "postcss-selector-parser": "^6.0.2",
+        "postcss-value-parser": "^4.1.0"
+      }
+    },
+    "postcss-modules-scope": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz",
+      "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==",
+      "dev": true,
+      "requires": {
+        "postcss-selector-parser": "^6.0.4"
+      }
+    },
+    "postcss-modules-values": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz",
+      "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==",
+      "dev": true,
+      "requires": {
+        "icss-utils": "^5.0.0"
+      }
+    },
+    "postcss-selector-parser": {
+      "version": "6.0.6",
+      "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz",
+      "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==",
+      "dev": true,
+      "requires": {
+        "cssesc": "^3.0.0",
+        "util-deprecate": "^1.0.2"
+      }
+    },
+    "postcss-value-parser": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz",
+      "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==",
+      "dev": true
+    },
+    "prelude-ls": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+      "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
+      "dev": true
+    },
+    "prettier": {
+      "version": "2.3.2",
+      "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.2.tgz",
+      "integrity": "sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ==",
+      "dev": true
+    },
+    "pretty-error": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.2.tgz",
+      "integrity": "sha512-EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw==",
+      "dev": true,
+      "requires": {
+        "lodash": "^4.17.20",
+        "renderkid": "^2.0.4"
+      }
+    },
+    "pretty-format": {
+      "version": "27.0.6",
+      "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.0.6.tgz",
+      "integrity": "sha512-8tGD7gBIENgzqA+UBzObyWqQ5B778VIFZA/S66cclyd5YkFLYs2Js7gxDKf0MXtTc9zcS7t1xhdfcElJ3YIvkQ==",
+      "dev": true,
+      "requires": {
+        "@jest/types": "^27.0.6",
+        "ansi-regex": "^5.0.0",
+        "ansi-styles": "^5.0.0",
+        "react-is": "^17.0.1"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
+          "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
+          "dev": true
+        },
+        "react-is": {
+          "version": "17.0.2",
+          "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
+          "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==",
+          "dev": true
+        }
+      }
+    },
+    "process": {
+      "version": "0.11.10",
+      "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+      "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
+      "dev": true
+    },
+    "process-nextick-args": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+      "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
+      "dev": true
+    },
+    "progress": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+      "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+      "dev": true
+    },
+    "promise-inflight": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz",
+      "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=",
+      "dev": true
+    },
+    "prop-types": {
+      "version": "15.7.2",
+      "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
+      "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
+      "requires": {
+        "loose-envify": "^1.4.0",
+        "object-assign": "^4.1.1",
+        "react-is": "^16.8.1"
+      }
+    },
+    "proxy-from-env": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+      "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
+      "dev": true
+    },
+    "prr": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
+      "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
+      "dev": true
+    },
+    "public-encrypt": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz",
+      "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==",
+      "dev": true,
+      "requires": {
+        "bn.js": "^4.1.0",
+        "browserify-rsa": "^4.0.0",
+        "create-hash": "^1.1.0",
+        "parse-asn1": "^5.0.0",
+        "randombytes": "^2.0.1",
+        "safe-buffer": "^5.1.2"
+      },
+      "dependencies": {
+        "bn.js": {
+          "version": "4.12.0",
+          "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz",
+          "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==",
+          "dev": true
+        }
+      }
+    },
+    "pump": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
+      "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
+      "dev": true,
+      "requires": {
+        "end-of-stream": "^1.1.0",
+        "once": "^1.3.1"
+      }
+    },
+    "pumpify": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz",
+      "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==",
+      "dev": true,
+      "requires": {
+        "duplexify": "^3.6.0",
+        "inherits": "^2.0.3",
+        "pump": "^2.0.0"
+      },
+      "dependencies": {
+        "pump": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
+          "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
+          "dev": true,
+          "requires": {
+            "end-of-stream": "^1.1.0",
+            "once": "^1.3.1"
+          }
+        }
+      }
+    },
+    "punycode": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+      "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+      "dev": true
+    },
+    "puppeteer": {
+      "version": "8.0.0",
+      "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-8.0.0.tgz",
+      "integrity": "sha512-D0RzSWlepeWkxPPdK3xhTcefj8rjah1791GE82Pdjsri49sy11ci/JQsAO8K2NRukqvwEtcI+ImP5F4ZiMvtIQ==",
+      "dev": true,
+      "requires": {
+        "debug": "^4.1.0",
+        "devtools-protocol": "0.0.854822",
+        "extract-zip": "^2.0.0",
+        "https-proxy-agent": "^5.0.0",
+        "node-fetch": "^2.6.1",
+        "pkg-dir": "^4.2.0",
+        "progress": "^2.0.1",
+        "proxy-from-env": "^1.1.0",
+        "rimraf": "^3.0.2",
+        "tar-fs": "^2.0.0",
+        "unbzip2-stream": "^1.3.3",
+        "ws": "^7.2.3"
+      }
+    },
+    "pwa-helpers": {
+      "version": "0.9.1",
+      "resolved": "https://registry.npmjs.org/pwa-helpers/-/pwa-helpers-0.9.1.tgz",
+      "integrity": "sha512-4sP/C9sSxQ3w80AATmvCEI3R+MHzCwr2RSZEbLyMkeJgV3cRk7ySZRUrQnBDSA7A0/z6dkYtjuXlkhN1ZFw3iA=="
+    },
+    "qjobs": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz",
+      "integrity": "sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg==",
+      "dev": true
+    },
+    "qs": {
+      "version": "6.10.1",
+      "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz",
+      "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==",
+      "requires": {
+        "side-channel": "^1.0.4"
+      }
+    },
+    "querystring": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
+      "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=",
+      "dev": true
+    },
+    "querystring-es3": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz",
+      "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=",
+      "dev": true
+    },
+    "queue-microtask": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+      "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+      "dev": true
+    },
+    "randombytes": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+      "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+      "dev": true,
+      "requires": {
+        "safe-buffer": "^5.1.0"
+      }
+    },
+    "randomfill": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz",
+      "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==",
+      "dev": true,
+      "requires": {
+        "randombytes": "^2.0.5",
+        "safe-buffer": "^5.1.0"
+      }
+    },
+    "range-parser": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
+      "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
+      "dev": true
+    },
+    "raw-body": {
+      "version": "2.4.0",
+      "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
+      "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
+      "dev": true,
+      "requires": {
+        "bytes": "3.1.0",
+        "http-errors": "1.7.2",
+        "iconv-lite": "0.4.24",
+        "unpipe": "1.0.0"
+      }
+    },
+    "react": {
+      "version": "17.0.2",
+      "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
+      "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
+      "requires": {
+        "loose-envify": "^1.1.0",
+        "object-assign": "^4.1.1"
+      }
+    },
+    "react-dom": {
+      "version": "17.0.2",
+      "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
+      "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
+      "requires": {
+        "loose-envify": "^1.1.0",
+        "object-assign": "^4.1.1",
+        "scheduler": "^0.20.2"
+      }
+    },
+    "react-is": {
+      "version": "16.13.1",
+      "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+      "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
+    },
+    "react-redux": {
+      "version": "7.2.4",
+      "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.4.tgz",
+      "integrity": "sha512-hOQ5eOSkEJEXdpIKbnRyl04LhaWabkDPV+Ix97wqQX3T3d2NQ8DUblNXXtNMavc7DpswyQM6xfaN4HQDKNY2JA==",
+      "requires": {
+        "@babel/runtime": "^7.12.1",
+        "@types/react-redux": "^7.1.16",
+        "hoist-non-react-statics": "^3.3.2",
+        "loose-envify": "^1.4.0",
+        "prop-types": "^15.7.2",
+        "react-is": "^16.13.1"
+      }
+    },
+    "react-transition-group": {
+      "version": "4.4.2",
+      "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.2.tgz",
+      "integrity": "sha512-/RNYfRAMlZwDSr6z4zNKV6xu53/e2BuaBbGhbyYIXTrmgu/bGHzmqOs7mJSJBHy9Ud+ApHx3QjrkKSp1pxvlFg==",
+      "requires": {
+        "@babel/runtime": "^7.5.5",
+        "dom-helpers": "^5.0.1",
+        "loose-envify": "^1.4.0",
+        "prop-types": "^15.6.2"
+      }
+    },
+    "readable-stream": {
+      "version": "3.6.0",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
+      "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.3",
+        "string_decoder": "^1.1.1",
+        "util-deprecate": "^1.0.1"
+      }
+    },
+    "readdirp": {
+      "version": "3.6.0",
+      "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
+      "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+      "dev": true,
+      "requires": {
+        "picomatch": "^2.2.1"
+      }
+    },
+    "rechoir": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz",
+      "integrity": "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==",
+      "dev": true,
+      "requires": {
+        "resolve": "^1.9.0"
+      }
+    },
+    "redux": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/redux/-/redux-4.1.0.tgz",
+      "integrity": "sha512-uI2dQN43zqLWCt6B/BMGRMY6db7TTY4qeHHfGeKb3EOhmOKjU3KdWvNLJyqaHRksv/ErdNH7cFZWg9jXtewy4g==",
+      "requires": {
+        "@babel/runtime": "^7.9.2"
+      }
+    },
+    "redux-thunk": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-2.3.0.tgz",
+      "integrity": "sha512-km6dclyFnmcvxhAcrQV2AkZmPQjzPDjgVlQtR0EQjxZPyJ0BnMf3in1ryuR8A2qU0HldVRfxYXbFSKlI3N7Slw=="
+    },
+    "regenerate": {
+      "version": "1.4.2",
+      "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz",
+      "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==",
+      "dev": true
+    },
+    "regenerate-unicode-properties": {
+      "version": "8.2.0",
+      "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz",
+      "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==",
+      "dev": true,
+      "requires": {
+        "regenerate": "^1.4.0"
+      }
+    },
+    "regenerator-runtime": {
+      "version": "0.11.1",
+      "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz",
+      "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==",
+      "dev": true
+    },
+    "regenerator-transform": {
+      "version": "0.14.5",
+      "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz",
+      "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==",
+      "dev": true,
+      "requires": {
+        "@babel/runtime": "^7.8.4"
+      }
+    },
+    "regex-not": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
+      "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
+      "dev": true,
+      "requires": {
+        "extend-shallow": "^3.0.2",
+        "safe-regex": "^1.1.0"
+      }
+    },
+    "regexp.prototype.flags": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz",
+      "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.1.3"
+      }
+    },
+    "regexpp": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
+      "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==",
+      "dev": true
+    },
+    "regexpu-core": {
+      "version": "4.7.1",
+      "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz",
+      "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==",
+      "dev": true,
+      "requires": {
+        "regenerate": "^1.4.0",
+        "regenerate-unicode-properties": "^8.2.0",
+        "regjsgen": "^0.5.1",
+        "regjsparser": "^0.6.4",
+        "unicode-match-property-ecmascript": "^1.0.4",
+        "unicode-match-property-value-ecmascript": "^1.2.0"
+      }
+    },
+    "regjsgen": {
+      "version": "0.5.2",
+      "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz",
+      "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==",
+      "dev": true
+    },
+    "regjsparser": {
+      "version": "0.6.9",
+      "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz",
+      "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==",
+      "dev": true,
+      "requires": {
+        "jsesc": "~0.5.0"
+      },
+      "dependencies": {
+        "jsesc": {
+          "version": "0.5.0",
+          "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
+          "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
+          "dev": true
+        }
+      }
+    },
+    "relateurl": {
+      "version": "0.2.7",
+      "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
+      "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=",
+      "dev": true
+    },
+    "remove-trailing-separator": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
+      "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
+      "dev": true,
+      "optional": true
+    },
+    "renderkid": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-2.0.6.tgz",
+      "integrity": "sha512-GIis2GBr/ho0pFNf57D4XM4+PgnQuTii0WCPjEZmZfKivzUfGuRdjN2aQYtYMiNggHmNyBve+thFnNR1iBRcKg==",
+      "dev": true,
+      "requires": {
+        "css-select": "^4.1.3",
+        "dom-converter": "^0.2.0",
+        "htmlparser2": "^6.1.0",
+        "lodash": "^4.17.21",
+        "strip-ansi": "^6.0.0"
+      }
+    },
+    "repeat-element": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz",
+      "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==",
+      "dev": true
+    },
+    "repeat-string": {
+      "version": "1.6.1",
+      "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
+      "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
+      "dev": true
+    },
+    "repeating": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz",
+      "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=",
+      "dev": true,
+      "requires": {
+        "is-finite": "^1.0.0"
+      }
+    },
+    "require-directory": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+      "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
+      "dev": true
+    },
+    "require-from-string": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+      "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+      "dev": true
+    },
+    "require-main-filename": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+      "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
+      "dev": true
+    },
+    "requires-port": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
+      "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
+      "dev": true
+    },
+    "reselect": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/reselect/-/reselect-4.0.0.tgz",
+      "integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA=="
+    },
+    "resolve": {
+      "version": "1.19.0",
+      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz",
+      "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==",
+      "requires": {
+        "is-core-module": "^2.1.0",
+        "path-parse": "^1.0.6"
+      }
+    },
+    "resolve-cwd": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
+      "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
+      "dev": true,
+      "requires": {
+        "resolve-from": "^5.0.0"
+      },
+      "dependencies": {
+        "resolve-from": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
+          "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
+          "dev": true
+        }
+      }
+    },
+    "resolve-from": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+      "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g=="
+    },
+    "resolve-url": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
+      "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
+      "dev": true
+    },
+    "ret": {
+      "version": "0.1.15",
+      "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
+      "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
+      "dev": true
+    },
+    "reusify": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
+      "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+      "dev": true
+    },
+    "rfdc": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz",
+      "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==",
+      "dev": true
+    },
+    "rimraf": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+      "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+      "dev": true,
+      "requires": {
+        "glob": "^7.1.3"
+      }
+    },
+    "ripemd160": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz",
+      "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==",
+      "dev": true,
+      "requires": {
+        "hash-base": "^3.0.0",
+        "inherits": "^2.0.1"
+      }
+    },
+    "run-parallel": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+      "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+      "dev": true,
+      "requires": {
+        "queue-microtask": "^1.2.2"
+      }
+    },
+    "run-queue": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz",
+      "integrity": "sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec=",
+      "dev": true,
+      "requires": {
+        "aproba": "^1.1.1"
+      }
+    },
+    "safe-buffer": {
+      "version": "5.2.1",
+      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+      "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+      "dev": true
+    },
+    "safe-regex": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
+      "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
+      "dev": true,
+      "requires": {
+        "ret": "~0.1.10"
+      }
+    },
+    "safer-buffer": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+      "dev": true
+    },
+    "scheduler": {
+      "version": "0.20.2",
+      "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
+      "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
+      "requires": {
+        "loose-envify": "^1.1.0",
+        "object-assign": "^4.1.1"
+      }
+    },
+    "schema-utils": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.3.0.tgz",
+      "integrity": "sha1-9YdyIs4+kx7a4DnxfrNxbnE3+M8=",
+      "dev": true,
+      "requires": {
+        "ajv": "^5.0.0"
+      },
+      "dependencies": {
+        "ajv": {
+          "version": "5.5.2",
+          "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz",
+          "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=",
+          "dev": true,
+          "requires": {
+            "co": "^4.6.0",
+            "fast-deep-equal": "^1.0.0",
+            "fast-json-stable-stringify": "^2.0.0",
+            "json-schema-traverse": "^0.3.0"
+          }
+        },
+        "fast-deep-equal": {
+          "version": "1.1.0",
+          "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
+          "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=",
+          "dev": true
+        },
+        "json-schema-traverse": {
+          "version": "0.3.1",
+          "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz",
+          "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=",
+          "dev": true
+        }
+      }
+    },
+    "script-ext-html-webpack-plugin": {
+      "version": "2.1.5",
+      "resolved": "https://registry.npmjs.org/script-ext-html-webpack-plugin/-/script-ext-html-webpack-plugin-2.1.5.tgz",
+      "integrity": "sha512-nMjd5dtsnoB8dS+pVM9ZL4mC9O1uVtTxrDS99OGZsZxFbkZE6pw0HCMued/cncDrKivIShO9vwoyOTvsGqQHEQ==",
+      "dev": true,
+      "requires": {
+        "debug": "^4.2.0"
+      }
+    },
+    "semver": {
+      "version": "6.3.0",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+      "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+      "dev": true
+    },
+    "serialize-javascript": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz",
+      "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==",
+      "dev": true,
+      "requires": {
+        "randombytes": "^2.1.0"
+      }
+    },
+    "set-blocking": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
+      "dev": true
+    },
+    "set-value": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
+      "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
+      "dev": true,
+      "requires": {
+        "extend-shallow": "^2.0.1",
+        "is-extendable": "^0.1.1",
+        "is-plain-object": "^2.0.3",
+        "split-string": "^3.0.1"
+      },
+      "dependencies": {
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "dev": true,
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        },
+        "is-extendable": {
+          "version": "0.1.1",
+          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+          "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
+          "dev": true
+        }
+      }
+    },
+    "setimmediate": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
+      "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=",
+      "dev": true
+    },
+    "setprototypeof": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
+      "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==",
+      "dev": true
+    },
+    "sha.js": {
+      "version": "2.4.11",
+      "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz",
+      "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==",
+      "dev": true,
+      "requires": {
+        "inherits": "^2.0.1",
+        "safe-buffer": "^5.0.1"
+      }
+    },
+    "shallow-clone": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz",
+      "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==",
+      "dev": true,
+      "requires": {
+        "kind-of": "^6.0.2"
+      }
+    },
+    "shebang-command": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+      "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+      "dev": true,
+      "requires": {
+        "shebang-regex": "^3.0.0"
+      }
+    },
+    "shebang-regex": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+      "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+      "dev": true
+    },
+    "side-channel": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+      "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+      "requires": {
+        "call-bind": "^1.0.0",
+        "get-intrinsic": "^1.0.2",
+        "object-inspect": "^1.9.0"
+      }
+    },
+    "signal-exit": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
+      "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==",
+      "dev": true
+    },
+    "sinon": {
+      "version": "10.0.0",
+      "resolved": "https://registry.npmjs.org/sinon/-/sinon-10.0.0.tgz",
+      "integrity": "sha512-XAn5DxtGVJBlBWYrcYKEhWCz7FLwZGdyvANRyK06419hyEpdT0dMc5A8Vcxg5SCGHc40CsqoKsc1bt1CbJPfNw==",
+      "dev": true,
+      "requires": {
+        "@sinonjs/commons": "^1.8.1",
+        "@sinonjs/fake-timers": "^6.0.1",
+        "@sinonjs/samsam": "^5.3.1",
+        "diff": "^4.0.2",
+        "nise": "^4.1.0",
+        "supports-color": "^7.1.0"
+      },
+      "dependencies": {
+        "diff": {
+          "version": "4.0.2",
+          "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
+          "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
+    "sirv": {
+      "version": "1.0.12",
+      "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.12.tgz",
+      "integrity": "sha512-+jQoCxndz7L2tqQL4ZyzfDhky0W/4ZJip3XoOuxyQWnAwMxindLl3Xv1qT4x1YX/re0leShvTm8Uk0kQspGhBg==",
+      "dev": true,
+      "requires": {
+        "@polka/url": "^1.0.0-next.15",
+        "mime": "^2.3.1",
+        "totalist": "^1.0.0"
+      }
+    },
+    "slash": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
+      "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
+      "dev": true
+    },
+    "slice-ansi": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
+      "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
+      "dev": true,
+      "requires": {
+        "ansi-styles": "^4.0.0",
+        "astral-regex": "^2.0.0",
+        "is-fullwidth-code-point": "^3.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        }
+      }
+    },
+    "snapdragon": {
+      "version": "0.8.2",
+      "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
+      "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
+      "dev": true,
+      "requires": {
+        "base": "^0.11.1",
+        "debug": "^2.2.0",
+        "define-property": "^0.2.5",
+        "extend-shallow": "^2.0.1",
+        "map-cache": "^0.2.2",
+        "source-map": "^0.5.6",
+        "source-map-resolve": "^0.5.0",
+        "use": "^3.1.0"
+      },
+      "dependencies": {
+        "debug": {
+          "version": "2.6.9",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+          "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+          "dev": true,
+          "requires": {
+            "ms": "2.0.0"
+          }
+        },
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        },
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "dev": true,
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "0.1.6",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+          "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "is-buffer": {
+          "version": "1.1.6",
+          "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+          "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+          "dev": true
+        },
+        "is-data-descriptor": {
+          "version": "0.1.4",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+          "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "is-descriptor": {
+          "version": "0.1.6",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+          "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^0.1.6",
+            "is-data-descriptor": "^0.1.4",
+            "kind-of": "^5.0.0"
+          }
+        },
+        "is-extendable": {
+          "version": "0.1.1",
+          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+          "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
+          "dev": true
+        },
+        "kind-of": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+          "dev": true
+        },
+        "ms": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+          "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
+          "dev": true
+        }
+      }
+    },
+    "snapdragon-node": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
+      "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
+      "dev": true,
+      "requires": {
+        "define-property": "^1.0.0",
+        "isobject": "^3.0.0",
+        "snapdragon-util": "^3.0.1"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^1.0.0"
+          }
+        }
+      }
+    },
+    "snapdragon-util": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
+      "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
+      "dev": true,
+      "requires": {
+        "kind-of": "^3.2.0"
+      },
+      "dependencies": {
+        "is-buffer": {
+          "version": "1.1.6",
+          "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+          "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+          "dev": true
+        },
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "dev": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "socket.io": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/socket.io/-/socket.io-3.1.2.tgz",
+      "integrity": "sha512-JubKZnTQ4Z8G4IZWtaAZSiRP3I/inpy8c/Bsx2jrwGrTbKeVU5xd6qkKMHpChYeM3dWZSO0QACiGK+obhBNwYw==",
+      "dev": true,
+      "requires": {
+        "@types/cookie": "^0.4.0",
+        "@types/cors": "^2.8.8",
+        "@types/node": ">=10.0.0",
+        "accepts": "~1.3.4",
+        "base64id": "~2.0.0",
+        "debug": "~4.3.1",
+        "engine.io": "~4.1.0",
+        "socket.io-adapter": "~2.1.0",
+        "socket.io-parser": "~4.0.3"
+      }
+    },
+    "socket.io-adapter": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.1.0.tgz",
+      "integrity": "sha512-+vDov/aTsLjViYTwS9fPy5pEtTkrbEKsw2M+oVSoFGw6OD1IpvlV1VPhUzNbofCQ8oyMbdYJqDtGdmHQK6TdPg==",
+      "dev": true
+    },
+    "socket.io-parser": {
+      "version": "4.0.4",
+      "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.4.tgz",
+      "integrity": "sha512-t+b0SS+IxG7Rxzda2EVvyBZbvFPBCjJoyHuE0P//7OAsN23GItzDRdWa6ALxZI/8R5ygK7jAR6t028/z+7295g==",
+      "dev": true,
+      "requires": {
+        "@types/component-emitter": "^1.2.10",
+        "component-emitter": "~1.3.0",
+        "debug": "~4.3.1"
+      }
+    },
+    "source-list-map": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
+      "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==",
+      "dev": true
+    },
+    "source-map": {
+      "version": "0.5.7",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+      "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w="
+    },
+    "source-map-js": {
+      "version": "0.6.2",
+      "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz",
+      "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==",
+      "dev": true
+    },
+    "source-map-resolve": {
+      "version": "0.5.3",
+      "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
+      "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
+      "dev": true,
+      "requires": {
+        "atob": "^2.1.2",
+        "decode-uri-component": "^0.2.0",
+        "resolve-url": "^0.2.1",
+        "source-map-url": "^0.4.0",
+        "urix": "^0.1.0"
+      }
+    },
+    "source-map-support": {
+      "version": "0.5.19",
+      "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
+      "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
+      "dev": true,
+      "requires": {
+        "buffer-from": "^1.0.0",
+        "source-map": "^0.6.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "source-map-url": {
+      "version": "0.4.1",
+      "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz",
+      "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==",
+      "dev": true
+    },
+    "split-string": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
+      "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
+      "dev": true,
+      "requires": {
+        "extend-shallow": "^3.0.0"
+      }
+    },
+    "sprintf-js": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+      "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
+      "dev": true
+    },
+    "ssri": {
+      "version": "6.0.2",
+      "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.2.tgz",
+      "integrity": "sha512-cepbSq/neFK7xB6A50KHN0xHDotYzq58wWCa5LeWqnPrHG8GzfEjO/4O8kpmcGW+oaxkvhEJCWgbgNk4/ZV93Q==",
+      "dev": true,
+      "requires": {
+        "figgy-pudding": "^3.5.1"
+      }
+    },
+    "static-extend": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
+      "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
+      "dev": true,
+      "requires": {
+        "define-property": "^0.2.5",
+        "object-copy": "^0.1.0"
+      },
+      "dependencies": {
+        "define-property": {
+          "version": "0.2.5",
+          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+          "dev": true,
+          "requires": {
+            "is-descriptor": "^0.1.0"
+          }
+        },
+        "is-accessor-descriptor": {
+          "version": "0.1.6",
+          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+          "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "is-buffer": {
+          "version": "1.1.6",
+          "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+          "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+          "dev": true
+        },
+        "is-data-descriptor": {
+          "version": "0.1.4",
+          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+          "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+          "dev": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          },
+          "dependencies": {
+            "kind-of": {
+              "version": "3.2.2",
+              "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+              "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+              "dev": true,
+              "requires": {
+                "is-buffer": "^1.1.5"
+              }
+            }
+          }
+        },
+        "is-descriptor": {
+          "version": "0.1.6",
+          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+          "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+          "dev": true,
+          "requires": {
+            "is-accessor-descriptor": "^0.1.6",
+            "is-data-descriptor": "^0.1.4",
+            "kind-of": "^5.0.0"
+          }
+        },
+        "kind-of": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+          "dev": true
+        }
+      }
+    },
+    "statuses": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
+      "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
+      "dev": true
+    },
+    "stream-browserify": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz",
+      "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==",
+      "dev": true,
+      "requires": {
+        "inherits": "~2.0.1",
+        "readable-stream": "^2.0.2"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "dev": true,
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        }
+      }
+    },
+    "stream-each": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz",
+      "integrity": "sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw==",
+      "dev": true,
+      "requires": {
+        "end-of-stream": "^1.1.0",
+        "stream-shift": "^1.0.0"
+      }
+    },
+    "stream-http": {
+      "version": "2.8.3",
+      "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz",
+      "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==",
+      "dev": true,
+      "requires": {
+        "builtin-status-codes": "^3.0.0",
+        "inherits": "^2.0.1",
+        "readable-stream": "^2.3.6",
+        "to-arraybuffer": "^1.0.0",
+        "xtend": "^4.0.0"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "dev": true,
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        }
+      }
+    },
+    "stream-shift": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz",
+      "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==",
+      "dev": true
+    },
+    "streamroller": {
+      "version": "2.2.4",
+      "resolved": "https://registry.npmjs.org/streamroller/-/streamroller-2.2.4.tgz",
+      "integrity": "sha512-OG79qm3AujAM9ImoqgWEY1xG4HX+Lw+yY6qZj9R1K2mhF5bEmQ849wvrb+4vt4jLMLzwXttJlQbOdPOQVRv7DQ==",
+      "dev": true,
+      "requires": {
+        "date-format": "^2.1.0",
+        "debug": "^4.1.1",
+        "fs-extra": "^8.1.0"
+      },
+      "dependencies": {
+        "date-format": {
+          "version": "2.1.0",
+          "resolved": "https://registry.npmjs.org/date-format/-/date-format-2.1.0.tgz",
+          "integrity": "sha512-bYQuGLeFxhkxNOF3rcMtiZxvCBAquGzZm6oWA1oZ0g2THUzivaRhv8uOhdr19LmoobSOLoIAxeUK2RdbM8IFTA==",
+          "dev": true
+        }
+      }
+    },
+    "string-width": {
+      "version": "4.2.2",
+      "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
+      "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
+      "dev": true,
+      "requires": {
+        "emoji-regex": "^8.0.0",
+        "is-fullwidth-code-point": "^3.0.0",
+        "strip-ansi": "^6.0.0"
+      }
+    },
+    "string.prototype.matchall": {
+      "version": "4.0.5",
+      "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.5.tgz",
+      "integrity": "sha512-Z5ZaXO0svs0M2xd/6By3qpeKpLKd9mO4v4q3oMEQrk8Ck4xOD5d5XeBOOjGrmVZZ/AHB1S0CgG4N5r1G9N3E2Q==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.2",
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.18.2",
+        "get-intrinsic": "^1.1.1",
+        "has-symbols": "^1.0.2",
+        "internal-slot": "^1.0.3",
+        "regexp.prototype.flags": "^1.3.1",
+        "side-channel": "^1.0.4"
+      },
+      "dependencies": {
+        "has-symbols": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
+          "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
+          "dev": true
+        }
+      }
+    },
+    "string.prototype.trimend": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz",
+      "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3"
+      }
+    },
+    "string.prototype.trimstart": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz",
+      "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==",
+      "dev": true,
+      "requires": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3"
+      }
+    },
+    "string_decoder": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
+      "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
+      "dev": true,
+      "requires": {
+        "safe-buffer": "~5.2.0"
+      }
+    },
+    "strip-ansi": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+      "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+      "dev": true,
+      "requires": {
+        "ansi-regex": "^5.0.0"
+      }
+    },
+    "strip-final-newline": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
+      "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
+      "dev": true
+    },
+    "strip-json-comments": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
+      "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
+      "dev": true
+    },
+    "style-loader": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-2.0.0.tgz",
+      "integrity": "sha512-Z0gYUJmzZ6ZdRUqpg1r8GsaFKypE+3xAzuFeMuoHgjc9KZv3wMyCRjQIWEbhoFSq7+7yoHXySDJyyWQaPajeiQ==",
+      "dev": true,
+      "requires": {
+        "loader-utils": "^2.0.0",
+        "schema-utils": "^3.0.0"
+      },
+      "dependencies": {
+        "json5": {
+          "version": "2.2.0",
+          "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
+          "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
+          "dev": true,
+          "requires": {
+            "minimist": "^1.2.5"
+          }
+        },
+        "loader-utils": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
+          "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
+          "dev": true,
+          "requires": {
+            "big.js": "^5.2.2",
+            "emojis-list": "^3.0.0",
+            "json5": "^2.1.2"
+          }
+        },
+        "schema-utils": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz",
+          "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==",
+          "dev": true,
+          "requires": {
+            "@types/json-schema": "^7.0.6",
+            "ajv": "^6.12.5",
+            "ajv-keywords": "^3.5.2"
+          }
+        }
+      }
+    },
+    "stylis": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.10.tgz",
+      "integrity": "sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg=="
+    },
+    "supports-color": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+      "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+      "requires": {
+        "has-flag": "^3.0.0"
+      }
+    },
+    "table": {
+      "version": "6.7.1",
+      "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz",
+      "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==",
+      "dev": true,
+      "requires": {
+        "ajv": "^8.0.1",
+        "lodash.clonedeep": "^4.5.0",
+        "lodash.truncate": "^4.4.2",
+        "slice-ansi": "^4.0.0",
+        "string-width": "^4.2.0",
+        "strip-ansi": "^6.0.0"
+      },
+      "dependencies": {
+        "ajv": {
+          "version": "8.6.1",
+          "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.1.tgz",
+          "integrity": "sha512-42VLtQUOLefAvKFAQIxIZDaThq6om/PrfP0CYk3/vn+y4BMNkKnbli8ON2QCiHov4KkzOSJ/xSoBJdayiiYvVQ==",
+          "dev": true,
+          "requires": {
+            "fast-deep-equal": "^3.1.1",
+            "json-schema-traverse": "^1.0.0",
+            "require-from-string": "^2.0.2",
+            "uri-js": "^4.2.2"
+          }
+        },
+        "json-schema-traverse": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+          "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+          "dev": true
+        }
+      }
+    },
+    "tapable": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz",
+      "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==",
+      "dev": true
+    },
+    "tar-fs": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz",
+      "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==",
+      "dev": true,
+      "requires": {
+        "chownr": "^1.1.1",
+        "mkdirp-classic": "^0.5.2",
+        "pump": "^3.0.0",
+        "tar-stream": "^2.1.4"
+      }
+    },
+    "tar-stream": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
+      "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
+      "dev": true,
+      "requires": {
+        "bl": "^4.0.3",
+        "end-of-stream": "^1.4.1",
+        "fs-constants": "^1.0.0",
+        "inherits": "^2.0.3",
+        "readable-stream": "^3.1.1"
+      }
+    },
+    "terser": {
+      "version": "4.8.0",
+      "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz",
+      "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==",
+      "dev": true,
+      "requires": {
+        "commander": "^2.20.0",
+        "source-map": "~0.6.1",
+        "source-map-support": "~0.5.12"
+      },
+      "dependencies": {
+        "commander": {
+          "version": "2.20.3",
+          "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+          "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+          "dev": true
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "terser-webpack-plugin": {
+      "version": "1.4.5",
+      "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.5.tgz",
+      "integrity": "sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw==",
+      "dev": true,
+      "requires": {
+        "cacache": "^12.0.2",
+        "find-cache-dir": "^2.1.0",
+        "is-wsl": "^1.1.0",
+        "schema-utils": "^1.0.0",
+        "serialize-javascript": "^4.0.0",
+        "source-map": "^0.6.1",
+        "terser": "^4.1.2",
+        "webpack-sources": "^1.4.0",
+        "worker-farm": "^1.7.0"
+      },
+      "dependencies": {
+        "schema-utils": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
+          "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==",
+          "dev": true,
+          "requires": {
+            "ajv": "^6.1.0",
+            "ajv-errors": "^1.0.0",
+            "ajv-keywords": "^3.1.0"
+          }
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "text-table": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+      "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
+      "dev": true
+    },
+    "through": {
+      "version": "2.3.8",
+      "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+      "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
+      "dev": true
+    },
+    "through2": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
+      "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
+      "dev": true,
+      "requires": {
+        "readable-stream": "~2.3.6",
+        "xtend": "~4.0.1"
+      },
+      "dependencies": {
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "dev": true,
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "dev": true,
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        }
+      }
+    },
+    "timers-browserify": {
+      "version": "2.0.12",
+      "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz",
+      "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==",
+      "dev": true,
+      "requires": {
+        "setimmediate": "^1.0.4"
+      }
+    },
+    "tiny-warning": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
+      "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
+    },
+    "tmp": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz",
+      "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==",
+      "dev": true,
+      "requires": {
+        "rimraf": "^3.0.0"
+      }
+    },
+    "to-arraybuffer": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz",
+      "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
+      "dev": true
+    },
+    "to-fast-properties": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+      "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
+    },
+    "to-object-path": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
+      "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
+      "dev": true,
+      "requires": {
+        "kind-of": "^3.0.2"
+      },
+      "dependencies": {
+        "is-buffer": {
+          "version": "1.1.6",
+          "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+          "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+          "dev": true
+        },
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "dev": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        }
+      }
+    },
+    "to-regex": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
+      "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
+      "dev": true,
+      "requires": {
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "regex-not": "^1.0.2",
+        "safe-regex": "^1.1.0"
+      }
+    },
+    "to-regex-range": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
+      "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+      "dev": true,
+      "requires": {
+        "is-number": "^7.0.0"
+      }
+    },
+    "toidentifier": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
+      "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==",
+      "dev": true
+    },
+    "totalist": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz",
+      "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==",
+      "dev": true
+    },
+    "trim-right": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
+      "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
+      "dev": true
+    },
+    "tslib": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
+      "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
+      "dev": true
+    },
+    "tsutils": {
+      "version": "3.21.0",
+      "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
+      "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
+      "dev": true,
+      "requires": {
+        "tslib": "^1.8.1"
+      },
+      "dependencies": {
+        "tslib": {
+          "version": "1.14.1",
+          "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
+          "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+          "dev": true
+        }
+      }
+    },
+    "tty-browserify": {
+      "version": "0.0.0",
+      "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz",
+      "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=",
+      "dev": true
+    },
+    "type-check": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+      "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+      "dev": true,
+      "requires": {
+        "prelude-ls": "^1.2.1"
+      }
+    },
+    "type-detect": {
+      "version": "4.0.8",
+      "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
+      "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
+      "dev": true
+    },
+    "type-fest": {
+      "version": "0.20.2",
+      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
+      "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
+      "dev": true
+    },
+    "type-is": {
+      "version": "1.6.18",
+      "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
+      "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
+      "dev": true,
+      "requires": {
+        "media-typer": "0.3.0",
+        "mime-types": "~2.1.24"
+      }
+    },
+    "typedarray": {
+      "version": "0.0.6",
+      "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
+      "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
+      "dev": true
+    },
+    "typescript": {
+      "version": "4.3.5",
+      "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",
+      "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==",
+      "dev": true
+    },
+    "ua-parser-js": {
+      "version": "0.7.28",
+      "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.28.tgz",
+      "integrity": "sha512-6Gurc1n//gjp9eQNXjD9O3M/sMwVtN5S8Lv9bvOYBfKfDNiIIhqiyi01vMBO45u4zkDE420w/e0se7Vs+sIg+g==",
+      "dev": true
+    },
+    "uglify-js": {
+      "version": "3.12.4",
+      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.4.tgz",
+      "integrity": "sha512-L5i5jg/SHkEqzN18gQMTWsZk3KelRsfD1wUVNqtq0kzqWQqcJjyL8yc1o8hJgRrWqrAl2mUFbhfznEIoi7zi2A==",
+      "dev": true,
+      "optional": true
+    },
+    "unbox-primitive": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
+      "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==",
+      "dev": true,
+      "requires": {
+        "function-bind": "^1.1.1",
+        "has-bigints": "^1.0.1",
+        "has-symbols": "^1.0.2",
+        "which-boxed-primitive": "^1.0.2"
+      },
+      "dependencies": {
+        "has-symbols": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
+          "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
+          "dev": true
+        }
+      }
+    },
+    "unbzip2-stream": {
+      "version": "1.4.3",
+      "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz",
+      "integrity": "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==",
+      "dev": true,
+      "requires": {
+        "buffer": "^5.2.1",
+        "through": "^2.3.8"
+      }
+    },
+    "unicode-canonical-property-names-ecmascript": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
+      "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==",
+      "dev": true
+    },
+    "unicode-match-property-ecmascript": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz",
+      "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==",
+      "dev": true,
+      "requires": {
+        "unicode-canonical-property-names-ecmascript": "^1.0.4",
+        "unicode-property-aliases-ecmascript": "^1.0.4"
+      }
+    },
+    "unicode-match-property-value-ecmascript": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz",
+      "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==",
+      "dev": true
+    },
+    "unicode-property-aliases-ecmascript": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz",
+      "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==",
+      "dev": true
+    },
+    "union-value": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
+      "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
+      "dev": true,
+      "requires": {
+        "arr-union": "^3.1.0",
+        "get-value": "^2.0.6",
+        "is-extendable": "^0.1.1",
+        "set-value": "^2.0.1"
+      },
+      "dependencies": {
+        "is-extendable": {
+          "version": "0.1.1",
+          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+          "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
+          "dev": true
+        }
+      }
+    },
+    "unique-filename": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz",
+      "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==",
+      "dev": true,
+      "requires": {
+        "unique-slug": "^2.0.0"
+      }
+    },
+    "unique-slug": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz",
+      "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==",
+      "dev": true,
+      "requires": {
+        "imurmurhash": "^0.1.4"
+      }
+    },
+    "universalify": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
+      "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
+      "dev": true
+    },
+    "unpipe": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+      "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
+      "dev": true
+    },
+    "unset-value": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
+      "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
+      "dev": true,
+      "requires": {
+        "has-value": "^0.3.1",
+        "isobject": "^3.0.0"
+      },
+      "dependencies": {
+        "has-value": {
+          "version": "0.3.1",
+          "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
+          "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
+          "dev": true,
+          "requires": {
+            "get-value": "^2.0.3",
+            "has-values": "^0.1.4",
+            "isobject": "^2.0.0"
+          },
+          "dependencies": {
+            "isobject": {
+              "version": "2.1.0",
+              "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
+              "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
+              "dev": true,
+              "requires": {
+                "isarray": "1.0.0"
+              }
+            }
+          }
+        },
+        "has-values": {
+          "version": "0.1.4",
+          "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
+          "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
+          "dev": true
+        },
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true
+        }
+      }
+    },
+    "upath": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",
+      "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==",
+      "dev": true,
+      "optional": true
+    },
+    "uri-js": {
+      "version": "4.4.1",
+      "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+      "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+      "dev": true,
+      "requires": {
+        "punycode": "^2.1.0"
+      }
+    },
+    "urix": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
+      "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
+      "dev": true
+    },
+    "url": {
+      "version": "0.11.0",
+      "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz",
+      "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=",
+      "dev": true,
+      "requires": {
+        "punycode": "1.3.2",
+        "querystring": "0.2.0"
+      },
+      "dependencies": {
+        "punycode": {
+          "version": "1.3.2",
+          "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz",
+          "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=",
+          "dev": true
+        }
+      }
+    },
+    "use": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
+      "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
+      "dev": true
+    },
+    "util": {
+      "version": "0.10.4",
+      "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
+      "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
+      "dev": true,
+      "requires": {
+        "inherits": "2.0.3"
+      },
+      "dependencies": {
+        "inherits": {
+          "version": "2.0.3",
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+          "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
+          "dev": true
+        }
+      }
+    },
+    "util-deprecate": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
+      "dev": true
+    },
+    "util.promisify": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz",
+      "integrity": "sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA==",
+      "dev": true,
+      "requires": {
+        "define-properties": "^1.1.2",
+        "object.getownpropertydescriptors": "^2.0.3"
+      }
+    },
+    "utila": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz",
+      "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw=",
+      "dev": true
+    },
+    "utils-merge": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
+      "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
+      "dev": true
+    },
+    "uuid": {
+      "version": "3.4.0",
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
+      "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
+      "dev": true
+    },
+    "v8-compile-cache": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
+      "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
+      "dev": true
+    },
+    "vary": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+      "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
+      "dev": true
+    },
+    "vm-browserify": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz",
+      "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==",
+      "dev": true
+    },
+    "void-elements": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz",
+      "integrity": "sha1-wGavtYK7HLQSjWDqkjkulNXp2+w=",
+      "dev": true
+    },
+    "watchpack": {
+      "version": "1.7.5",
+      "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.5.tgz",
+      "integrity": "sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ==",
+      "dev": true,
+      "requires": {
+        "chokidar": "^3.4.1",
+        "graceful-fs": "^4.1.2",
+        "neo-async": "^2.5.0",
+        "watchpack-chokidar2": "^2.0.1"
+      }
+    },
+    "watchpack-chokidar2": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz",
+      "integrity": "sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww==",
+      "dev": true,
+      "optional": true,
+      "requires": {
+        "chokidar": "^2.1.8"
+      },
+      "dependencies": {
+        "anymatch": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+          "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "micromatch": "^3.1.4",
+            "normalize-path": "^2.1.1"
+          },
+          "dependencies": {
+            "normalize-path": {
+              "version": "2.1.1",
+              "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+              "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "remove-trailing-separator": "^1.0.1"
+              }
+            }
+          }
+        },
+        "binary-extensions": {
+          "version": "1.13.1",
+          "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
+          "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
+          "dev": true,
+          "optional": true
+        },
+        "braces": {
+          "version": "2.3.2",
+          "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+          "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "arr-flatten": "^1.1.0",
+            "array-unique": "^0.3.2",
+            "extend-shallow": "^2.0.1",
+            "fill-range": "^4.0.0",
+            "isobject": "^3.0.1",
+            "repeat-element": "^1.1.2",
+            "snapdragon": "^0.8.1",
+            "snapdragon-node": "^2.0.1",
+            "split-string": "^3.0.2",
+            "to-regex": "^3.0.1"
+          }
+        },
+        "chokidar": {
+          "version": "2.1.8",
+          "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
+          "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "anymatch": "^2.0.0",
+            "async-each": "^1.0.1",
+            "braces": "^2.3.2",
+            "fsevents": "^1.2.7",
+            "glob-parent": "^3.1.0",
+            "inherits": "^2.0.3",
+            "is-binary-path": "^1.0.0",
+            "is-glob": "^4.0.0",
+            "normalize-path": "^3.0.0",
+            "path-is-absolute": "^1.0.0",
+            "readdirp": "^2.2.1",
+            "upath": "^1.1.1"
+          }
+        },
+        "extend-shallow": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "is-extendable": "^0.1.0"
+          }
+        },
+        "fill-range": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+          "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "extend-shallow": "^2.0.1",
+            "is-number": "^3.0.0",
+            "repeat-string": "^1.6.1",
+            "to-regex-range": "^2.1.0"
+          }
+        },
+        "fsevents": {
+          "version": "1.2.13",
+          "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+          "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "bindings": "^1.5.0",
+            "nan": "^2.12.1"
+          }
+        },
+        "glob-parent": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+          "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "is-glob": "^3.1.0",
+            "path-dirname": "^1.0.0"
+          },
+          "dependencies": {
+            "is-glob": {
+              "version": "3.1.0",
+              "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+              "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+              "dev": true,
+              "optional": true,
+              "requires": {
+                "is-extglob": "^2.1.0"
+              }
+            }
+          }
+        },
+        "is-binary-path": {
+          "version": "1.0.1",
+          "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
+          "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "binary-extensions": "^1.0.0"
+          }
+        },
+        "is-buffer": {
+          "version": "1.1.6",
+          "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+          "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
+          "dev": true,
+          "optional": true
+        },
+        "is-extendable": {
+          "version": "0.1.1",
+          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+          "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
+          "dev": true,
+          "optional": true
+        },
+        "is-number": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+          "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "kind-of": "^3.0.2"
+          }
+        },
+        "isarray": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+          "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
+          "dev": true,
+          "optional": true
+        },
+        "kind-of": {
+          "version": "3.2.2",
+          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "is-buffer": "^1.1.5"
+          }
+        },
+        "readable-stream": {
+          "version": "2.3.7",
+          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+          "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "core-util-is": "~1.0.0",
+            "inherits": "~2.0.3",
+            "isarray": "~1.0.0",
+            "process-nextick-args": "~2.0.0",
+            "safe-buffer": "~5.1.1",
+            "string_decoder": "~1.1.1",
+            "util-deprecate": "~1.0.1"
+          }
+        },
+        "readdirp": {
+          "version": "2.2.1",
+          "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
+          "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "graceful-fs": "^4.1.11",
+            "micromatch": "^3.1.10",
+            "readable-stream": "^2.0.2"
+          }
+        },
+        "safe-buffer": {
+          "version": "5.1.2",
+          "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+          "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
+          "dev": true,
+          "optional": true
+        },
+        "string_decoder": {
+          "version": "1.1.1",
+          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+          "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "safe-buffer": "~5.1.0"
+          }
+        },
+        "to-regex-range": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+          "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "is-number": "^3.0.0",
+            "repeat-string": "^1.6.1"
+          }
+        }
+      }
+    },
+    "webpack": {
+      "version": "4.46.0",
+      "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.46.0.tgz",
+      "integrity": "sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q==",
+      "dev": true,
+      "requires": {
+        "@webassemblyjs/ast": "1.9.0",
+        "@webassemblyjs/helper-module-context": "1.9.0",
+        "@webassemblyjs/wasm-edit": "1.9.0",
+        "@webassemblyjs/wasm-parser": "1.9.0",
+        "acorn": "^6.4.1",
+        "ajv": "^6.10.2",
+        "ajv-keywords": "^3.4.1",
+        "chrome-trace-event": "^1.0.2",
+        "enhanced-resolve": "^4.5.0",
+        "eslint-scope": "^4.0.3",
+        "json-parse-better-errors": "^1.0.2",
+        "loader-runner": "^2.4.0",
+        "loader-utils": "^1.2.3",
+        "memory-fs": "^0.4.1",
+        "micromatch": "^3.1.10",
+        "mkdirp": "^0.5.3",
+        "neo-async": "^2.6.1",
+        "node-libs-browser": "^2.2.1",
+        "schema-utils": "^1.0.0",
+        "tapable": "^1.1.3",
+        "terser-webpack-plugin": "^1.4.3",
+        "watchpack": "^1.7.4",
+        "webpack-sources": "^1.4.1"
+      },
+      "dependencies": {
+        "acorn": {
+          "version": "6.4.2",
+          "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz",
+          "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==",
+          "dev": true
+        },
+        "eslint-scope": {
+          "version": "4.0.3",
+          "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz",
+          "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==",
+          "dev": true,
+          "requires": {
+            "esrecurse": "^4.1.0",
+            "estraverse": "^4.1.1"
+          }
+        },
+        "schema-utils": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
+          "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==",
+          "dev": true,
+          "requires": {
+            "ajv": "^6.1.0",
+            "ajv-errors": "^1.0.0",
+            "ajv-keywords": "^3.1.0"
+          }
+        }
+      }
+    },
+    "webpack-bundle-analyzer": {
+      "version": "4.4.2",
+      "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.4.2.tgz",
+      "integrity": "sha512-PIagMYhlEzFfhMYOzs5gFT55DkUdkyrJi/SxJp8EF3YMWhS+T9vvs2EoTetpk5qb6VsCq02eXTlRDOydRhDFAQ==",
+      "dev": true,
+      "requires": {
+        "acorn": "^8.0.4",
+        "acorn-walk": "^8.0.0",
+        "chalk": "^4.1.0",
+        "commander": "^6.2.0",
+        "gzip-size": "^6.0.0",
+        "lodash": "^4.17.20",
+        "opener": "^1.5.2",
+        "sirv": "^1.0.7",
+        "ws": "^7.3.1"
+      },
+      "dependencies": {
+        "acorn": {
+          "version": "8.4.1",
+          "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz",
+          "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==",
+          "dev": true
+        },
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "chalk": {
+          "version": "4.1.1",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz",
+          "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        },
+        "commander": {
+          "version": "6.2.1",
+          "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz",
+          "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        }
+      }
+    },
+    "webpack-cli": {
+      "version": "4.7.2",
+      "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.7.2.tgz",
+      "integrity": "sha512-mEoLmnmOIZQNiRl0ebnjzQ74Hk0iKS5SiEEnpq3dRezoyR3yPaeQZCMCe+db4524pj1Pd5ghZXjT41KLzIhSLw==",
+      "dev": true,
+      "requires": {
+        "@discoveryjs/json-ext": "^0.5.0",
+        "@webpack-cli/configtest": "^1.0.4",
+        "@webpack-cli/info": "^1.3.0",
+        "@webpack-cli/serve": "^1.5.1",
+        "colorette": "^1.2.1",
+        "commander": "^7.0.0",
+        "execa": "^5.0.0",
+        "fastest-levenshtein": "^1.0.12",
+        "import-local": "^3.0.2",
+        "interpret": "^2.2.0",
+        "rechoir": "^0.7.0",
+        "v8-compile-cache": "^2.2.0",
+        "webpack-merge": "^5.7.3"
+      },
+      "dependencies": {
+        "commander": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+          "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+          "dev": true
+        }
+      }
+    },
+    "webpack-dev-middleware": {
+      "version": "3.7.3",
+      "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.7.3.tgz",
+      "integrity": "sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ==",
+      "dev": true,
+      "requires": {
+        "memory-fs": "^0.4.1",
+        "mime": "^2.4.4",
+        "mkdirp": "^0.5.1",
+        "range-parser": "^1.2.1",
+        "webpack-log": "^2.0.0"
+      }
+    },
+    "webpack-log": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz",
+      "integrity": "sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg==",
+      "dev": true,
+      "requires": {
+        "ansi-colors": "^3.0.0",
+        "uuid": "^3.3.2"
+      },
+      "dependencies": {
+        "ansi-colors": {
+          "version": "3.2.4",
+          "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz",
+          "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==",
+          "dev": true
+        }
+      }
+    },
+    "webpack-merge": {
+      "version": "5.8.0",
+      "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz",
+      "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==",
+      "dev": true,
+      "requires": {
+        "clone-deep": "^4.0.1",
+        "wildcard": "^2.0.0"
+      }
+    },
+    "webpack-sources": {
+      "version": "1.4.3",
+      "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz",
+      "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==",
+      "dev": true,
+      "requires": {
+        "source-list-map": "^2.0.0",
+        "source-map": "~0.6.1"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+          "dev": true
+        }
+      }
+    },
+    "which": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+      "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+      "dev": true,
+      "requires": {
+        "isexe": "^2.0.0"
+      }
+    },
+    "which-boxed-primitive": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
+      "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
+      "dev": true,
+      "requires": {
+        "is-bigint": "^1.0.1",
+        "is-boolean-object": "^1.1.0",
+        "is-number-object": "^1.0.4",
+        "is-string": "^1.0.5",
+        "is-symbol": "^1.0.3"
+      }
+    },
+    "which-collection": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.1.tgz",
+      "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==",
+      "dev": true,
+      "requires": {
+        "is-map": "^2.0.1",
+        "is-set": "^2.0.1",
+        "is-weakmap": "^2.0.1",
+        "is-weakset": "^2.0.1"
+      }
+    },
+    "which-module": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
+      "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
+      "dev": true
+    },
+    "which-typed-array": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.4.tgz",
+      "integrity": "sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA==",
+      "dev": true,
+      "requires": {
+        "available-typed-arrays": "^1.0.2",
+        "call-bind": "^1.0.0",
+        "es-abstract": "^1.18.0-next.1",
+        "foreach": "^2.0.5",
+        "function-bind": "^1.1.1",
+        "has-symbols": "^1.0.1",
+        "is-typed-array": "^1.1.3"
+      },
+      "dependencies": {
+        "es-abstract": {
+          "version": "1.18.0-next.1",
+          "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz",
+          "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==",
+          "dev": true,
+          "requires": {
+            "es-to-primitive": "^1.2.1",
+            "function-bind": "^1.1.1",
+            "has": "^1.0.3",
+            "has-symbols": "^1.0.1",
+            "is-callable": "^1.2.2",
+            "is-negative-zero": "^2.0.0",
+            "is-regex": "^1.1.1",
+            "object-inspect": "^1.8.0",
+            "object-keys": "^1.1.1",
+            "object.assign": "^4.1.1",
+            "string.prototype.trimend": "^1.0.1",
+            "string.prototype.trimstart": "^1.0.1"
+          }
+        }
+      }
+    },
+    "wide-align": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
+      "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
+      "dev": true,
+      "requires": {
+        "string-width": "^1.0.2 || 2"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
+          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
+          "dev": true
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+          "dev": true
+        },
+        "string-width": {
+          "version": "2.1.1",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
+          "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
+          "dev": true,
+          "requires": {
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^4.0.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
+          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^3.0.0"
+          }
+        }
+      }
+    },
+    "wildcard": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz",
+      "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==",
+      "dev": true
+    },
+    "word-wrap": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
+      "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
+      "dev": true
+    },
+    "wordwrap": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
+      "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
+      "dev": true
+    },
+    "worker-farm": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz",
+      "integrity": "sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw==",
+      "dev": true,
+      "requires": {
+        "errno": "~0.1.7"
+      }
+    },
+    "wrap-ansi": {
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+      "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+      "dev": true,
+      "requires": {
+        "ansi-styles": "^4.0.0",
+        "string-width": "^4.1.0",
+        "strip-ansi": "^6.0.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "4.3.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^2.0.1"
+          }
+        },
+        "color-convert": {
+          "version": "2.0.1",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+          "dev": true,
+          "requires": {
+            "color-name": "~1.1.4"
+          }
+        }
+      }
+    },
+    "wrappy": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+      "dev": true
+    },
+    "ws": {
+      "version": "7.4.6",
+      "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz",
+      "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==",
+      "dev": true
+    },
+    "xtend": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+      "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+      "dev": true
+    },
+    "y18n": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
+      "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==",
+      "dev": true
+    },
+    "yallist": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+      "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+      "dev": true
+    },
+    "yaml": {
+      "version": "1.10.2",
+      "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
+      "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg=="
+    },
+    "yargs": {
+      "version": "16.2.0",
+      "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
+      "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
+      "dev": true,
+      "requires": {
+        "cliui": "^7.0.2",
+        "escalade": "^3.1.1",
+        "get-caller-file": "^2.0.5",
+        "require-directory": "^2.1.1",
+        "string-width": "^4.2.0",
+        "y18n": "^5.0.5",
+        "yargs-parser": "^20.2.2"
+      },
+      "dependencies": {
+        "y18n": {
+          "version": "5.0.8",
+          "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+          "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+          "dev": true
+        }
+      }
+    },
+    "yargs-parser": {
+      "version": "20.2.9",
+      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
+      "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
+      "dev": true
+    },
+    "yargs-unparser": {
+      "version": "1.6.0",
+      "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz",
+      "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==",
+      "dev": true,
+      "requires": {
+        "flat": "^4.1.0",
+        "lodash": "^4.17.15",
+        "yargs": "^13.3.0"
+      },
+      "dependencies": {
+        "ansi-regex": {
+          "version": "4.1.0",
+          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+          "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+          "dev": true
+        },
+        "cliui": {
+          "version": "5.0.0",
+          "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
+          "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
+          "dev": true,
+          "requires": {
+            "string-width": "^3.1.0",
+            "strip-ansi": "^5.2.0",
+            "wrap-ansi": "^5.1.0"
+          }
+        },
+        "emoji-regex": {
+          "version": "7.0.3",
+          "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+          "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+          "dev": true
+        },
+        "find-up": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
+          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
+          "dev": true,
+          "requires": {
+            "locate-path": "^3.0.0"
+          }
+        },
+        "is-fullwidth-code-point": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+          "dev": true
+        },
+        "locate-path": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
+          "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
+          "dev": true,
+          "requires": {
+            "p-locate": "^3.0.0",
+            "path-exists": "^3.0.0"
+          }
+        },
+        "p-locate": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
+          "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
+          "dev": true,
+          "requires": {
+            "p-limit": "^2.0.0"
+          }
+        },
+        "path-exists": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
+          "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
+          "dev": true
+        },
+        "string-width": {
+          "version": "3.1.0",
+          "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+          "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+          "dev": true,
+          "requires": {
+            "emoji-regex": "^7.0.1",
+            "is-fullwidth-code-point": "^2.0.0",
+            "strip-ansi": "^5.1.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "5.2.0",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+          "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+          "dev": true,
+          "requires": {
+            "ansi-regex": "^4.1.0"
+          }
+        },
+        "wrap-ansi": {
+          "version": "5.1.0",
+          "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
+          "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.0",
+            "string-width": "^3.0.0",
+            "strip-ansi": "^5.0.0"
+          }
+        },
+        "yargs": {
+          "version": "13.3.2",
+          "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
+          "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
+          "dev": true,
+          "requires": {
+            "cliui": "^5.0.0",
+            "find-up": "^3.0.0",
+            "get-caller-file": "^2.0.1",
+            "require-directory": "^2.1.1",
+            "require-main-filename": "^2.0.0",
+            "set-blocking": "^2.0.0",
+            "string-width": "^3.0.0",
+            "which-module": "^2.0.0",
+            "y18n": "^4.0.0",
+            "yargs-parser": "^13.1.2"
+          }
+        },
+        "yargs-parser": {
+          "version": "13.1.2",
+          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
+          "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
+          "dev": true,
+          "requires": {
+            "camelcase": "^5.0.0",
+            "decamelize": "^1.2.0"
+          }
+        }
+      }
+    },
+    "yauzl": {
+      "version": "2.10.0",
+      "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz",
+      "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=",
+      "dev": true,
+      "requires": {
+        "buffer-crc32": "~0.2.3",
+        "fd-slicer": "~1.1.0"
+      }
+    }
+  }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..f446fb3
--- /dev/null
+++ b/package.json
@@ -0,0 +1,100 @@
+{
+  "description": "Monorail Issue Tracker",
+  "name": "monorail",
+  "version": "1.0.0",
+  "directories": {},
+  "devDependencies": {
+    "@babel/core": "^7.14.6",
+    "@babel/plugin-proposal-class-properties": "^7.14.5",
+    "@babel/plugin-proposal-decorators": "^7.14.5",
+    "@babel/plugin-proposal-object-rest-spread": "^7.14.7",
+    "@babel/plugin-syntax-dynamic-import": "^7.8.3",
+    "@babel/plugin-transform-react-jsx": "^7.14.5",
+    "@babel/preset-env": "^7.14.7",
+    "@babel/preset-react": "^7.14.5",
+    "@babel/preset-typescript": "^7.14.5",
+    "@testing-library/dom": "^8.1.0",
+    "@testing-library/react": "^11.2.7",
+    "@testing-library/user-event": "^13.2.1",
+    "@types/chai": "^4.2.21",
+    "@types/mocha": "^8.2.3",
+    "@types/react": "^17.0.14",
+    "@types/react-dom": "^17.0.9",
+    "@typescript-eslint/eslint-plugin": "^4.28.3",
+    "@typescript-eslint/parser": "^4.28.3",
+    "autoprefixer": "^10.3.1",
+    "axe-core": "^4.3.1",
+    "babel-eslint": "^10.1.0",
+    "babel-loader": "^8.2.2",
+    "chai": "^4.3.4",
+    "chai-dom": "^1.9.0",
+    "chai-string": "^1.5.0",
+    "circular-dependency-plugin": "^5.2.2",
+    "css-loader": "^5.2.7",
+    "deep-equal": "^2.0.5",
+    "eslint": "^7.30.0",
+    "eslint-config-google": "^0.14.0",
+    "eslint-config-prettier": "^8.3.0",
+    "eslint-plugin-css-modules": "^2.11.0",
+    "eslint-plugin-jsx-a11y": "^6.4.1",
+    "eslint-plugin-react": "^7.24.0",
+    "html-webpack-plugin": "^4.5.2",
+    "istanbul-instrumenter-loader": "^3.0.1",
+    "karma": "^6.3.4",
+    "karma-chrome-launcher": "^3.1.0",
+    "karma-coverage": "^2.0.3",
+    "karma-mocha": "^2.0.1",
+    "karma-mocha-reporter": "^2.2.5",
+    "karma-parallel": "^0.3.1",
+    "karma-sinon": "^1.0.5",
+    "karma-sourcemap-loader": "^0.3.8",
+    "karma-webpack": "^4.0.2",
+    "mocha": "^7.2.0",
+    "path": "^0.12.7",
+    "postcss-loader": "^4.3.0",
+    "prettier": "^2.3.2",
+    "puppeteer": "^8.0.0",
+    "script-ext-html-webpack-plugin": "^2.1.5",
+    "sinon": "^10.0.0",
+    "style-loader": "^2.0.0",
+    "typescript": "^4.3.5",
+    "webpack": "^4.46.0",
+    "webpack-bundle-analyzer": "^4.4.2",
+    "webpack-cli": "^4.7.2"
+  },
+  "scripts": {
+    "test": "karma start --coverage --no-colors && curl -F \"file=@full_results.json\" -F \"master=luci.infra.try\" -F \"builder=infra-try-frontend\" -F \"testtype=monorail\" --request POST https://test-results-test-hrd.appspot.com/testfile/upload --verbose"
+  },
+  "author": "",
+  "license": "ISC",
+  "dependencies": {
+    "@chopsui/chops-signin": "^0.3.2",
+    "@chopsui/karma-reporter": "^1.1.5",
+    "@chopsui/prpc-client": "0.0.2",
+    "@chopsui/tsmon-client": "1.0.1",
+    "@emotion/react": "^11.4.0",
+    "@emotion/styled": "^11.3.0",
+    "@material-ui/core": "^5.0.0-beta.2",
+    "@material-ui/icons": "^4.11.2",
+    "@material-ui/styles": "^5.0.0-alpha.27",
+    "@types/gapi": "0.0.39",
+    "@types/gapi.auth2": "0.0.54",
+    "chart.js": "^2.9.4",
+    "debounce": "^1.2.1",
+    "diff": "^5.0.0",
+    "dompurify": "2.2.7",
+    "lit-element": "^2.5.1",
+    "lit-html": "^1.4.1",
+    "marked": "^2.0.7",
+    "mousetrap": "^1.6.5",
+    "page": "^1.11.6",
+    "pwa-helpers": "^0.9.1",
+    "qs": "^6.10.1",
+    "react": "^17.0.2",
+    "react-dom": "^17.0.2",
+    "react-redux": "^7.2.4",
+    "redux": "^4.1.0",
+    "redux-thunk": "^2.3.0",
+    "reselect": "^4.0.0"
+  }
+}
diff --git a/project/__init__.py b/project/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/project/__init__.py
@@ -0,0 +1 @@
+
diff --git a/project/peopledetail.py b/project/peopledetail.py
new file mode 100644
index 0000000..3c4846b
--- /dev/null
+++ b/project/peopledetail.py
@@ -0,0 +1,271 @@
+# 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
+
+"""A class to display details about each project member."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_helpers
+from framework import framework_views
+from framework import jsonfeed
+from framework import permissions
+from framework import servlet
+from framework import template_helpers
+from framework import urls
+from project import project_helpers
+from project import project_views
+
+CHECKBOX_PERMS = [
+    permissions.VIEW,
+    permissions.COMMIT,
+    permissions.CREATE_ISSUE,
+    permissions.ADD_ISSUE_COMMENT,
+    permissions.EDIT_ISSUE,
+    permissions.EDIT_ISSUE_OWNER,
+    permissions.EDIT_ISSUE_SUMMARY,
+    permissions.EDIT_ISSUE_STATUS,
+    permissions.EDIT_ISSUE_CC,
+    permissions.DELETE_ISSUE,
+    permissions.DELETE_OWN,
+    permissions.DELETE_ANY,
+    permissions.EDIT_ANY_MEMBER_NOTES,
+    permissions.MODERATE_SPAM,
+    ]
+
+
+class PeopleDetail(servlet.Servlet):
+  """People detail page documents one partipant's involvement in a project."""
+
+  _PAGE_TEMPLATE = 'project/people-detail-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_PEOPLE
+
+  def AssertBasePermission(self, mr):
+    """Check that the user is allowed to access this servlet."""
+    super(PeopleDetail, self).AssertBasePermission(mr)
+    member_id = self.ValidateMemberID(mr.cnxn, mr.specified_user_id, mr.project)
+    # For now, contributors who cannot view other contributors are further
+    # restricted from viewing any part of the member list or detail pages.
+    if (not permissions.CanViewContributorList(mr, mr.project) and
+        member_id != mr.auth.user_id):
+      raise permissions.PermissionException(
+          'User is not allowed to view other people\'s details')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+
+    member_id = self.ValidateMemberID(mr.cnxn, mr.specified_user_id, mr.project)
+    group_ids = self.services.usergroup.DetermineWhichUserIDsAreGroups(
+        mr.cnxn, [member_id])
+    users_by_id = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user, [member_id])
+    framework_views.RevealAllEmailsToMembers(
+        mr.cnxn, self.services, mr.auth, users_by_id, mr.project)
+
+    project_commitments = self.services.project.GetProjectCommitments(
+        mr.cnxn, mr.project_id)
+    (ac_exclusion_ids, no_expand_ids
+     ) = self.services.project.GetProjectAutocompleteExclusion(
+        mr.cnxn, mr.project_id)
+    member_view = project_views.MemberView(
+        mr.auth.user_id, member_id, users_by_id[member_id], mr.project,
+        project_commitments,
+        ac_exclusion=(member_id in ac_exclusion_ids),
+        no_expand=(member_id in no_expand_ids),
+        is_group=(member_id in group_ids))
+
+    member_user = self.services.user.GetUser(mr.cnxn, member_id)
+    # This ignores indirect memberships, which is ok because we are viewing
+    # the page for a member directly involved in the project
+    role_perms = permissions.GetPermissions(
+        member_user, {member_id}, mr.project)
+
+    # TODO(jrobbins): clarify in the UI which permissions are built-in to
+    # the user's direct role, vs. which are granted via a group membership,
+    # vs. which ones are extra_perms that have been added specifically for
+    # this user.
+    member_perms = template_helpers.EZTItem()
+    for perm in CHECKBOX_PERMS:
+      setattr(member_perms, perm,
+              ezt.boolean(role_perms.HasPerm(perm, member_id, mr.project)))
+
+    displayed_extra_perms = [perm for perm in member_view.extra_perms
+                             if perm not in CHECKBOX_PERMS]
+
+    viewing_self = mr.auth.user_id == member_id
+    warn_abandonment = (viewing_self and
+                        permissions.ShouldCheckForAbandonment(mr))
+
+    return {
+        'subtab_mode': None,
+        'member': member_view,
+        'role_perms': role_perms,
+        'member_perms': member_perms,
+        'displayed_extra_perms': displayed_extra_perms,
+        'offer_edit_perms': ezt.boolean(self.CanEditPerms(mr)),
+        'offer_edit_member_notes': ezt.boolean(
+            self.CanEditMemberNotes(mr, member_id)),
+        'offer_remove_role': ezt.boolean(self.CanRemoveRole(mr, member_id)),
+        'expand_perms': ezt.boolean(mr.auth.user_pb.keep_people_perms_open),
+        'warn_abandonment': ezt.boolean(warn_abandonment),
+        'total_num_owners': len(mr.project.owner_ids),
+        }
+
+  def ValidateMemberID(self, cnxn, member_id, project):
+    """Lookup a project member by user_id.
+
+    Args:
+      cnxn: connection to SQL database.
+      member_id: int user_id, same format as user profile page.
+      project: the current Project PB.
+
+    Returns:
+      The user ID of the project member. Raises an exception if the username
+      cannot be looked up, or if that user is not in the project.
+    """
+    if not member_id:
+      self.abort(404, 'project member not specified')
+
+    member_username = None
+    try:
+      member_username = self.services.user.LookupUserEmail(cnxn, member_id)
+    except exceptions.NoSuchUserException:
+      logging.info('user_id %s not found', member_id)
+
+    if not member_username:
+      logging.info('There is no such user id %r', member_id)
+      self.abort(404, 'project member not found')
+
+    if not framework_bizobj.UserIsInProject(project, {member_id}):
+      logging.info('User %r is not a member of %r',
+                   member_username, project.project_name)
+      self.abort(404, 'project member not found')
+
+    return member_id
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    # 1. Parse and validate user input.
+    user_id, role, extra_perms, notes, ac_exclusion, no_expand = (
+        self.ParsePersonData(mr, post_data))
+    member_id = self.ValidateMemberID(mr.cnxn, user_id, mr.project)
+
+    # 2. Call services layer to save changes.
+    if 'remove' in post_data:
+      self.ProcessRemove(mr, member_id)
+    else:
+      self.ProcessSave(
+          mr, role, extra_perms, notes, member_id, ac_exclusion, no_expand)
+
+    # 3. Determine the next page in the UI flow.
+    if 'remove' in post_data:
+      return framework_helpers.FormatAbsoluteURL(
+          mr, urls.PEOPLE_LIST, saved=1, ts=int(time.time()))
+    else:
+      return framework_helpers.FormatAbsoluteURL(
+          mr, urls.PEOPLE_DETAIL, u=user_id, saved=1, ts=int(time.time()))
+
+  def ProcessRemove(self, mr, member_id):
+    """Process the posted form when the user pressed 'Remove'."""
+    if not self.CanRemoveRole(mr, member_id):
+      raise permissions.PermissionException(
+          'User is not allowed to remove this member from the project')
+
+    self.RemoveRole(mr.cnxn, mr.project, member_id)
+
+  def ProcessSave(
+      self, mr, role, extra_perms, notes, member_id, ac_exclusion,
+      no_expand):
+    """Process the posted form when the user pressed 'Save'."""
+    if (not self.CanEditPerms(mr) and
+        not self.CanEditMemberNotes(mr, member_id)):
+      raise permissions.PermissionException(
+          'User is not allowed to edit people in this project')
+
+    if self.CanEditPerms(mr):
+      self.services.project.UpdateExtraPerms(
+          mr.cnxn, mr.project_id, member_id, extra_perms)
+      self.UpdateRole(mr.cnxn, mr.project, role, member_id)
+
+    if self.CanEditMemberNotes(mr, member_id):
+      self.services.project.UpdateCommitments(
+          mr.cnxn, mr.project_id, member_id, notes)
+
+    if self.CanEditPerms(mr):
+      self.services.project.UpdateProjectAutocompleteExclusion(
+          mr.cnxn, mr.project_id, member_id, ac_exclusion, no_expand)
+
+  def CanEditMemberNotes(self, mr, member_id):
+    """Return true if the logged in user can edit the current user's notes."""
+    return (self.CheckPerm(mr, permissions.EDIT_ANY_MEMBER_NOTES) or
+            member_id == mr.auth.user_id)
+
+  def CanEditPerms(self, mr):
+    """Return true if the logged in user can edit the current user's perms."""
+    return self.CheckPerm(mr, permissions.EDIT_PROJECT)
+
+  def CanRemoveRole(self, mr, member_id):
+    """Return true if the logged in user can remove the current user's role."""
+    return (self.CheckPerm(mr, permissions.EDIT_PROJECT) or
+            member_id == mr.auth.user_id)
+
+  def ParsePersonData(self, mr, post_data):
+    """Parse the POST data for a project member.
+
+    Args:
+      mr: common information parsed from the user's request.
+      post_data: dictionary of lists of values for each HTML
+          form field.
+
+    Returns:
+      A tuple with user_id, role, extra_perms, and notes.
+    """
+    if not mr.specified_user_id:
+      raise exceptions.InputException('Field user_id is missing')
+
+    role = post_data.get('role', '').lower()
+    extra_perms = []
+    for ep in post_data.getall('extra_perms'):
+      perm = framework_bizobj.CanonicalizeLabel(ep)
+      # Perms with leading underscores are reserved.
+      perm = perm.strip('_')
+      if perm:
+        extra_perms.append(perm)
+
+    notes = post_data.get('notes', '').strip()
+    ac_exclusion = not post_data.get('ac_include', False)
+    no_expand = not post_data.get('ac_expand', False)
+    return (mr.specified_user_id, role, extra_perms, notes, ac_exclusion,
+            no_expand)
+
+  def RemoveRole(self, cnxn, project, member_id):
+    """Remove the given member from the project."""
+    (owner_ids, committer_ids,
+     contributor_ids) = project_helpers.MembersWithoutGivenIDs(
+         project, {member_id})
+    self.services.project.UpdateProjectRoles(
+        cnxn, project.project_id, owner_ids, committer_ids, contributor_ids)
+
+  def UpdateRole(self, cnxn, project, role, member_id):
+    """If the user's role was changed, update that in the Project."""
+    if not role:
+      return  # Role was not in the form data
+
+    if role == framework_helpers.GetRoleName({member_id}, project).lower():
+      return  # No change needed
+
+    (owner_ids, committer_ids,
+     contributor_ids) = project_helpers.MembersWithGivenIDs(
+         project, {member_id}, role)
+
+    self.services.project.UpdateProjectRoles(
+        cnxn, project.project_id, owner_ids, committer_ids, contributor_ids)
diff --git a/project/peoplelist.py b/project/peoplelist.py
new file mode 100644
index 0000000..0db5ee6
--- /dev/null
+++ b/project/peoplelist.py
@@ -0,0 +1,234 @@
+# 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
+
+"""A class to display a paginated list of project members.
+
+This page lists owners, members, and contribtors.  For each
+member, we display their username, permission system role + extra
+perms, and notes on their involvement in the project.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from businesslogic import work_env
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import paginate
+from framework import permissions
+from framework import servlet
+from framework import urls
+from project import project_helpers
+from project import project_views
+
+MEMBERS_PER_PAGE = 50
+
+
+class PeopleList(servlet.Servlet):
+  """People list page shows a paginatied list of project members."""
+
+  _PAGE_TEMPLATE = 'project/people-list-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_PEOPLE
+
+  def AssertBasePermission(self, mr):
+    super(PeopleList, self).AssertBasePermission(mr)
+    # For now, contributors who cannot view other contributors are further
+    # restricted from viewing any part of the member list or detail pages.
+    if not permissions.CanViewContributorList(mr, mr.project):
+      raise permissions.PermissionException(
+          'User is not allowed to view the project people list')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    all_members = (mr.project.owner_ids +
+                   mr.project.committer_ids +
+                   mr.project.contributor_ids)
+
+    with mr.profiler.Phase('gathering members on this page'):
+      users_by_id = framework_views.MakeAllUserViews(
+          mr.cnxn, self.services.user, all_members)
+      framework_views.RevealAllEmailsToMembers(
+          mr.cnxn, self.services, mr.auth, users_by_id, mr.project)
+
+    # TODO(jrobbins): re-implement FindUntrustedGroups()
+    untrusted_user_group_proxies = []
+
+    with mr.profiler.Phase('gathering commitments (notes)'):
+      project_commitments = self.services.project.GetProjectCommitments(
+          mr.cnxn, mr.project_id)
+
+    with mr.profiler.Phase('gathering autocomple exclusion ids'):
+      group_ids = set(self.services.usergroup.DetermineWhichUserIDsAreGroups(
+        mr.cnxn, all_members))
+      (ac_exclusion_ids, no_expand_ids
+       ) = self.services.project.GetProjectAutocompleteExclusion(
+          mr.cnxn, mr.project_id)
+
+    with mr.profiler.Phase('making member views'):
+      owner_views = self._MakeMemberViews(
+          mr.auth.user_id, users_by_id, mr.project.owner_ids, mr.project,
+          project_commitments, ac_exclusion_ids, no_expand_ids, group_ids)
+      committer_views = self._MakeMemberViews(
+          mr.auth.user_id, users_by_id, mr.project.committer_ids, mr.project,
+          project_commitments, ac_exclusion_ids, no_expand_ids, group_ids)
+      contributor_views = self._MakeMemberViews(
+          mr.auth.user_id, users_by_id, mr.project.contributor_ids, mr.project,
+          project_commitments, ac_exclusion_ids, no_expand_ids, group_ids)
+      all_member_views = owner_views + committer_views + contributor_views
+
+    url_params = [(name, mr.GetParam(name)) for name in
+                  framework_helpers.RECOGNIZED_PARAMS]
+    pagination = paginate.ArtifactPagination(
+        all_member_views, mr.GetPositiveIntParam('num', MEMBERS_PER_PAGE),
+        mr.GetPositiveIntParam('start'), mr.project_name, urls.PEOPLE_LIST,
+        url_params=url_params)
+
+    offer_membership_editing = mr.perms.HasPerm(
+        permissions.EDIT_PROJECT, mr.auth.user_id, mr.project)
+
+    check_abandonment = permissions.ShouldCheckForAbandonment(mr)
+
+    newly_added_views = [mv for mv in all_member_views
+                         if str(mv.user.user_id) in mr.GetParam('new', [])]
+
+    return {
+        'pagination': pagination,
+        'subtab_mode': None,
+        'offer_membership_editing': ezt.boolean(offer_membership_editing),
+        'initial_add_members': '',
+        'initially_expand_form': ezt.boolean(False),
+        'untrusted_user_groups': untrusted_user_group_proxies,
+        'check_abandonment': ezt.boolean(check_abandonment),
+        'total_num_owners': len(mr.project.owner_ids),
+        'newly_added_views': newly_added_views,
+        'is_hotlist': ezt.boolean(False),
+        }
+
+  def GatherHelpData(self, mr, page_data):
+    """Return a dict of values to drive on-page user help.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+      page_data: Dictionary of base and page template data.
+
+    Returns:
+      A dict of values to drive on-page user help, to be added to page_data.
+    """
+    help_data = super(PeopleList, self).GatherHelpData(mr, page_data)
+    with work_env.WorkEnv(mr, self.services) as we:
+      userprefs = we.GetUserPrefs(mr.auth.user_id)
+    dismissed = [
+        pv.name for pv in userprefs.prefs if pv.value == 'true']
+    if (mr.auth.user_id and
+        not framework_bizobj.UserIsInProject(
+            mr.project, mr.auth.effective_ids) and
+        'how_to_join_project' not in dismissed):
+      help_data['cue'] = 'how_to_join_project'
+
+    return help_data
+
+  def _MakeMemberViews(
+      self, logged_in_user_id, users_by_id, member_ids, project,
+      project_commitments, ac_exclusion_ids, no_expand_ids, group_ids):
+    """Return a sorted list of MemberViews for display by EZT."""
+    member_views = [
+        project_views.MemberView(
+            logged_in_user_id, member_id, users_by_id[member_id], project,
+            project_commitments,
+            ac_exclusion=(member_id in ac_exclusion_ids),
+            no_expand=(member_id in no_expand_ids),
+            is_group=(member_id in group_ids))
+        for member_id in member_ids]
+    member_views.sort(key=lambda mv: mv.user.email)
+    return member_views
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    permit_edit = mr.perms.HasPerm(
+        permissions.EDIT_PROJECT, mr.auth.user_id, mr.project)
+    if not permit_edit:
+      raise permissions.PermissionException(
+          'User is not permitted to edit project membership')
+
+    if 'addbtn' in post_data:
+      return self.ProcessAddMembers(mr, post_data)
+    elif 'removebtn' in post_data:
+      return self.ProcessRemoveMembers(mr, post_data)
+
+  def ProcessAddMembers(self, mr, post_data):
+    """Process the user's request to add members.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+      post_data: dictionary of form data.
+
+    Returns:
+      String URL to redirect the user to after processing.
+    """
+    # 1. Parse and validate user input.
+    new_member_ids = project_helpers.ParseUsernames(
+        mr.cnxn, self.services.user, post_data.get('addmembers'))
+    role = post_data['role']
+
+    (owner_ids, committer_ids,
+     contributor_ids) = project_helpers.MembersWithGivenIDs(
+        mr.project, new_member_ids, role)
+
+    total_people = len(owner_ids) + len(committer_ids) + len(contributor_ids)
+    if total_people > framework_constants.MAX_PROJECT_PEOPLE:
+      mr.errors.addmembers = (
+          'Too many project members.  The combined limit is %d.' %
+          framework_constants.MAX_PROJECT_PEOPLE)
+
+    # 2. Call services layer to save changes.
+    if not mr.errors.AnyErrors():
+      self.services.project.UpdateProjectRoles(
+          mr.cnxn, mr.project.project_id,
+          owner_ids, committer_ids, contributor_ids)
+
+    # 3. Determine the next page in the UI flow.
+    if mr.errors.AnyErrors():
+      add_members_str = post_data.get('addmembers', '')
+      self.PleaseCorrect(
+          mr, initial_add_members=add_members_str, initially_expand_form=True)
+    else:
+      return framework_helpers.FormatAbsoluteURL(
+          mr, urls.PEOPLE_LIST, saved=1, ts=int(time.time()),
+          new=','.join([str(u) for u in new_member_ids]))
+
+  def ProcessRemoveMembers(self, mr, post_data):
+    """Process the user's request to remove members.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+      post_data: dictionary of form data.
+
+    Returns:
+      String URL to redirect the user to after processing.
+    """
+    # 1. Parse and validate user input.
+    remove_strs = post_data.getall('remove')
+    logging.info('remove_strs = %r', remove_strs)
+    remove_ids = set(
+        self.services.user.LookupUserIDs(mr.cnxn, remove_strs).values())
+    (owner_ids, committer_ids,
+     contributor_ids) = project_helpers.MembersWithoutGivenIDs(
+        mr.project, remove_ids)
+
+    # 2. Call services layer to save changes.
+    self.services.project.UpdateProjectRoles(
+        mr.cnxn, mr.project.project_id, owner_ids, committer_ids,
+        contributor_ids)
+
+    # 3. Determine the next page in the UI flow.
+    return framework_helpers.FormatAbsoluteURL(
+        mr, urls.PEOPLE_LIST, saved=1, ts=int(time.time()))
diff --git a/project/project_constants.py b/project/project_constants.py
new file mode 100644
index 0000000..f483b1f
--- /dev/null
+++ b/project/project_constants.py
@@ -0,0 +1,30 @@
+# Copyright 2020 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
+
+"""Some constants used for managing Monorail Projects."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import re
+
+PROJECT_NAME_PATTERN = '[a-z0-9][-a-z0-9]*[a-z0-9]'
+
+MAX_PROJECT_NAME_LENGTH = 63
+
+# Pattern to match a valid project name.  Users of this pattern MUST use
+# the re.VERBOSE flag or the whitespace and comments we be considered
+# significant and the pattern will not work.  See "re" module documentation.
+_RE_PROJECT_NAME_PATTERN_VERBOSE = r"""
+  (?=[-a-z0-9]*[a-z][-a-z0-9]*)   # Lookahead to make sure there is at least
+                                  # one letter in the whole name.
+  [a-z0-9]                        # Start with a letter or digit.
+  [-a-z0-9]*                      # Follow with any number of valid characters.
+  [a-z0-9]                        # End with a letter or digit.
+"""
+
+# Compiled regexp to match the project name and nothing more before or after.
+RE_PROJECT_NAME = re.compile(
+    '^%s$' % _RE_PROJECT_NAME_PATTERN_VERBOSE, re.VERBOSE)
diff --git a/project/project_helpers.py b/project/project_helpers.py
new file mode 100644
index 0000000..23a2d46
--- /dev/null
+++ b/project/project_helpers.py
@@ -0,0 +1,236 @@
+# 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
+
+"""Helper functions and classes used by the project pages."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import re
+
+import settings
+
+from google.appengine.api import app_identity
+from framework import framework_bizobj
+from framework import framework_views
+from framework import gcs_helpers
+from framework import permissions
+from project import project_constants
+from project import project_views
+from proto import project_pb2
+
+
+_RE_EMAIL_SEPARATORS = re.compile(r'\s|,|;')
+
+
+def BuildProjectMembers(cnxn, project, user_service):
+  """Gather data for the members section of a project page.
+
+  Args:
+    cnxn: connection to SQL database.
+    project: Project PB of current project.
+    user_service: an instance of UserService for user persistence.
+
+  Returns:
+    A dictionary suitable for use with EZT.
+  """
+  # First, get all needed info on all users in one batch of requests.
+  users_by_id = framework_views.MakeAllUserViews(
+      cnxn, user_service, AllProjectMembers(project))
+
+  # Second, group the user proxies by role for display.
+  owner_proxies = [users_by_id[owner_id]
+                   for owner_id in project.owner_ids]
+  committer_proxies = [users_by_id[committer_id]
+                       for committer_id in project.committer_ids]
+  contributor_proxies = [users_by_id[contrib_id]
+                         for contrib_id in project.contributor_ids]
+
+  return {
+      'owners': owner_proxies,
+      'committers': committer_proxies,
+      'contributors': contributor_proxies,
+      'all_members': list(users_by_id.values()),
+      }
+
+
+def BuildProjectAccessOptions(project):
+  """Return a list of project access values for use in an HTML menu.
+
+  Args:
+    project: current Project PB, or None when creating a new project.
+
+  Returns:
+    A list of ProjectAccessView objects that can be used in EZT.
+  """
+  access_levels = [project_pb2.ProjectAccess.ANYONE,
+                   project_pb2.ProjectAccess.MEMBERS_ONLY]
+  access_views = []
+  for access in access_levels:
+    # Offer the allowed access levels.  When editing an existing project,
+    # its current access level may always be kept, even if it is no longer
+    # in the list of allowed access levels for new projects.
+    if (access in settings.allowed_access_levels or
+        (project and access == project.access)):
+      access_views.append(project_views.ProjectAccessView(access))
+
+  return access_views
+
+
+def ParseUsernames(cnxn, user_service, usernames_text):
+  """Parse all usernames from a text field and return a list of user IDs.
+
+  Args:
+    cnxn: connection to SQL database.
+    user_service: an instance of UserService for user persistence.
+    usernames_text: string that the user entered into a form field for a list
+        of email addresses.  Or, None if the browser did not send that value.
+
+  Returns:
+    A set of user IDs for the users named.  Or, an empty set if the
+    usernames_field was not in post_data.
+  """
+  if not usernames_text:  # The user did not enter any addresses.
+    return set()
+
+  email_list = _RE_EMAIL_SEPARATORS.split(usernames_text)
+  # skip empty strings between consecutive separators
+  email_list = [email for email in email_list if email]
+
+  id_dict = user_service.LookupUserIDs(cnxn, email_list, autocreate=True)
+  return set(id_dict.values())
+
+
+def ParseProjectAccess(project, access_num_str):
+  """Parse and validate the "access" field out of post_data.
+
+  Args:
+    project: Project PB for the project that was edited, or None if the
+        user is creating a new project.
+    access_num_str: string of digits from the users POST that identifies
+       the desired project access level.  Or, None if that widget was not
+       offered to the user.
+
+  Returns:
+    An enum project access level, or None if the user did not specify
+    any value or if the value specified was invalid.
+  """
+  access = None
+  if access_num_str:
+    access_number = int(access_num_str)
+    available_access_levels = BuildProjectAccessOptions(project)
+    allowed_access_choices = [access_view.key for access_view
+                              in available_access_levels]
+    if access_number in allowed_access_choices:
+      access = project_pb2.ProjectAccess(access_number)
+
+  return access
+
+
+def MembersWithoutGivenIDs(project, exclude_ids):
+  """Return three lists of member user IDs, with member_ids not in them."""
+  owner_ids = [user_id for user_id in project.owner_ids
+               if user_id not in exclude_ids]
+  committer_ids = [user_id for user_id in project.committer_ids
+                   if user_id not in exclude_ids]
+  contributor_ids = [user_id for user_id in project.contributor_ids
+                     if user_id not in exclude_ids]
+
+  return owner_ids, committer_ids, contributor_ids
+
+
+def MembersWithGivenIDs(project, new_member_ids, role):
+  """Return three lists of member IDs with the new IDs in the right one.
+
+  Args:
+    project: Project PB for the project to get current members from.
+    new_member_ids: set of user IDs for members being added.
+    role: string name of the role that new_member_ids should be granted.
+
+  Returns:
+    Three lists of member IDs with new_member_ids added to the appropriate
+    list and removed from any other role.
+
+  Raises:
+    ValueError: if the role is not one of owner, committer, or contributor.
+  """
+  owner_ids, committer_ids, contributor_ids = MembersWithoutGivenIDs(
+      project, new_member_ids)
+
+  if role == 'owner':
+    owner_ids.extend(new_member_ids)
+  elif role == 'committer':
+    committer_ids.extend(new_member_ids)
+  elif role == 'contributor':
+    contributor_ids.extend(new_member_ids)
+  else:
+    raise ValueError()
+
+  return owner_ids, committer_ids, contributor_ids
+
+
+def UsersInvolvedInProject(project):
+  """Return a set of all user IDs referenced in the Project."""
+  result = set()
+  result.update(project.owner_ids)
+  result.update(project.committer_ids)
+  result.update(project.contributor_ids)
+  result.update([perm.member_id for perm in project.extra_perms])
+  return result
+
+
+def UsersWithPermsInProject(project, perms_needed, users_by_id,
+                            effective_ids_by_user):
+  # Users that have the given permission are stored in direct_users_for_perm,
+  # users whose effective ids have the given permission are stored in
+  # indirect_users_for_perm.
+  direct_users_for_perm = {perm: set() for perm in perms_needed}
+  indirect_users_for_perm = {perm: set() for perm in perms_needed}
+
+  # Iterate only over users that have extra permissions, so we don't
+  # have to search the extra perms more than once for each user.
+  for extra_perm_pb in project.extra_perms:
+    extra_perms = set(perm.lower() for perm in extra_perm_pb.perms)
+    for perm, users in direct_users_for_perm.items():
+      if perm.lower() in extra_perms:
+        users.add(extra_perm_pb.member_id)
+
+  # Then, iterate over all users, but don't compute extra permissions.
+  for user_id, user_view in users_by_id.items():
+    effective_ids = effective_ids_by_user[user_id].union([user_id])
+    user_perms = permissions.GetPermissions(
+        user_view.user, effective_ids, project)
+    for perm, users in direct_users_for_perm.items():
+      if not effective_ids.isdisjoint(users):
+        indirect_users_for_perm[perm].add(user_id)
+      if user_perms.HasPerm(perm, None, None, []):
+        users.add(user_id)
+
+  for perm, users in direct_users_for_perm.items():
+    users.update(indirect_users_for_perm[perm])
+
+  return direct_users_for_perm
+
+
+def GetThumbnailUrl(gcs_id):
+  # type: (str) -> str
+  """Derive the thumbnail url for a given GCS object ID."""
+  bucket_name = app_identity.get_default_gcs_bucket_name()
+  return gcs_helpers.SignUrl(bucket_name, gcs_id + '-thumbnail')
+
+
+def IsValidProjectName(s):
+  # type: (string) -> bool
+  """Return true if the given string is a valid project name."""
+  return (
+      project_constants.RE_PROJECT_NAME.match(s) and
+      len(s) <= project_constants.MAX_PROJECT_NAME_LENGTH)
+
+
+def AllProjectMembers(project):
+  # type: (proto.project_pb2.Project) -> Sequence[int]
+  """Return a list of user IDs of all members in the given project."""
+  return project.owner_ids + project.committer_ids + project.contributor_ids
diff --git a/project/project_views.py b/project/project_views.py
new file mode 100644
index 0000000..e8698eb
--- /dev/null
+++ b/project/project_views.py
@@ -0,0 +1,125 @@
+# 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
+
+"""View objects to help display projects in EZT."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from framework import framework_constants
+from framework import framework_helpers
+from framework import permissions
+from framework import template_helpers
+from framework import timestr
+from framework import urls
+from proto import project_pb2
+
+
+class ProjectAccessView(object):
+  """Object for project access information that can be easily used in EZT."""
+
+  ACCESS_NAMES = {
+      project_pb2.ProjectAccess.ANYONE: 'Anyone on the Internet',
+      project_pb2.ProjectAccess.MEMBERS_ONLY: 'Project Members',
+      }
+
+  def __init__(self, project_access_enum):
+    self.key = int(project_access_enum)
+    self.name = self.ACCESS_NAMES[project_access_enum]
+
+
+class ProjectView(template_helpers.PBProxy):
+  """View object to make it easy to display a search result in EZT."""
+
+  _MAX_SUMMARY_CHARS = 70
+  _LIMITED_DESCRIPTION_CHARS = 500
+
+  def __init__(self, pb, starred=False, now=None, num_stars=None,
+               membership_desc=None):
+    super(ProjectView, self).__init__(pb)
+
+    self.limited_summary = template_helpers.FitUnsafeText(
+        pb.summary, self._MAX_SUMMARY_CHARS)
+
+    self.limited_description = template_helpers.FitUnsafeText(
+        pb.description, self._LIMITED_DESCRIPTION_CHARS)
+
+    self.state_name = str(pb.state)  # Gives the enum name
+    self.relative_home_url = '/p/%s' % pb.project_name
+
+    if now is None:
+      now = time.time()
+
+    last_full_hour = now - (now % framework_constants.SECS_PER_HOUR)
+    self.cached_content_timestamp = max(
+        pb.cached_content_timestamp, last_full_hour)
+    self.last_updated_exists = ezt.boolean(pb.recent_activity)
+    course_grain, fine_grain = timestr.GetHumanScaleDate(pb.recent_activity)
+    if course_grain == 'Older':
+      self.recent_activity = fine_grain
+    else:
+      self.recent_activity = course_grain
+
+    self.starred = ezt.boolean(starred)
+
+    self.num_stars = num_stars
+    self.plural = '' if num_stars == 1 else 's'
+    self.membership_desc = membership_desc
+
+
+class MemberView(object):
+  """EZT-view of details of how a person is participating in a project."""
+
+  def __init__(
+    self, logged_in_user_id, member_id, user_view, project,
+    project_commitments, effective_ids=None, ac_exclusion=False,
+    no_expand=False, is_group=False):
+    """Initialize a MemberView with the given information.
+
+    Args:
+      logged_in_user_id: int user ID of the viewing user, or 0 for anon.
+      member_id: int user ID of the project member being viewed.
+      user_view: UserView object for this member.
+      project: Project PB for the currently viewed project.
+      project_commitments: ProjectCommitments PB for the currently viewed
+          project, or None if commitments are not to be displayed.
+      effective_ids: optional set of user IDs for this user, if supplied
+          we show the highest role that they have via any group membership.
+      ac_exclusion: True when this member should not be in autocomplete.
+      no_expand: True for user groups that should not expand when generating
+          autocomplete options.
+      is_group: True if this user is actually a user group.
+    """
+    self.viewing_self = ezt.boolean(logged_in_user_id == member_id)
+
+    self.user = user_view
+    member_qs_param = user_view.user_id
+    self.detail_url = '/p/%s%s?u=%s' % (
+        project.project_name, urls.PEOPLE_DETAIL, member_qs_param)
+    self.role = framework_helpers.GetRoleName(
+        effective_ids or {member_id}, project)
+    self.extra_perms = permissions.GetExtraPerms(project, member_id)
+    self.notes = None
+    if project_commitments is not None:
+      for commitment in project_commitments.commitments:
+        if commitment.member_id == member_id:
+          self.notes = commitment.notes
+          break
+
+    # Attributes needed by table_view_helpers.py
+    self.labels = []
+    self.derived_labels = []
+
+    self.ac_include = ezt.boolean(not ac_exclusion)
+    self.ac_expand = ezt.boolean(not no_expand)
+
+    self.is_group = ezt.boolean(is_group)
+    self.is_service_account = ezt.boolean(framework_helpers.IsServiceAccount(
+        self.user.email))
diff --git a/project/projectadmin.py b/project/projectadmin.py
new file mode 100644
index 0000000..887d3fc
--- /dev/null
+++ b/project/projectadmin.py
@@ -0,0 +1,192 @@
+# 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
+
+"""Servlets for project administration main subtab."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+from six import string_types
+from third_party import cloudstorage
+import ezt
+
+from businesslogic import work_env
+from framework import emailfmt
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import gcs_helpers
+from framework import permissions
+from framework import servlet
+from framework import urls
+from framework import validate
+from project import project_helpers
+from project import project_views
+from tracker import tracker_views
+
+
+_MSG_INVALID_EMAIL_ADDRESS = 'Invalid email address'
+_MSG_DESCRIPTION_MISSING = 'Description is missing'
+_MSG_SUMMARY_MISSING = 'Summary is missing'
+
+
+class ProjectAdmin(servlet.Servlet):
+  """A page with project configuration options for the Project Owner(s)."""
+
+  _PAGE_TEMPLATE = 'project/project-admin-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_ADMIN
+
+  def AssertBasePermission(self, mr):
+    super(ProjectAdmin, self).AssertBasePermission(mr)
+    if not self.CheckPerm(mr, permissions.EDIT_PROJECT):
+      raise permissions.PermissionException(
+          'User is not allowed to administer this project')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    available_access_levels = project_helpers.BuildProjectAccessOptions(
+        mr.project)
+    offer_access_level = len(available_access_levels) > 1
+    access_view = project_views.ProjectAccessView(mr.project.access)
+
+    return {
+        'admin_tab_mode':
+            self.ADMIN_TAB_META,
+        'initial_summary':
+            mr.project.summary,
+        'initial_project_home':
+            mr.project.home_page,
+        'initial_docs_url':
+            mr.project.docs_url,
+        'initial_source_url':
+            mr.project.source_url,
+        'initial_logo_gcs_id':
+            mr.project.logo_gcs_id,
+        'initial_logo_file_name':
+            mr.project.logo_file_name,
+        'logo_view':
+            tracker_views.LogoView(mr.project),
+        'initial_description':
+            mr.project.description,
+        'issue_notify':
+            mr.project.issue_notify_address,
+        'process_inbound_email':
+            ezt.boolean(mr.project.process_inbound_email),
+        'email_from_addr':
+            emailfmt.FormatFromAddr(mr.project),
+        'only_owners_remove_restrictions':
+            ezt.boolean(mr.project.only_owners_remove_restrictions),
+        'only_owners_see_contributors':
+            ezt.boolean(mr.project.only_owners_see_contributors),
+        'offer_access_level':
+            ezt.boolean(offer_access_level),
+        'initial_access':
+            access_view,
+        'available_access_levels':
+            available_access_levels,
+        'issue_notify_always_detailed':
+            ezt.boolean(mr.project.issue_notify_always_detailed),
+    }
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    # 1. Parse and validate user input.
+    summary, description = self._ParseMeta(post_data, mr.errors)
+    access = project_helpers.ParseProjectAccess(
+        mr.project, post_data.get('access'))
+
+    only_owners_remove_restrictions = (
+        'only_owners_remove_restrictions' in post_data)
+    only_owners_see_contributors = 'only_owners_see_contributors' in post_data
+
+    issue_notify = post_data['issue_notify']
+    if issue_notify and not validate.IsValidEmail(issue_notify):
+      mr.errors.issue_notify = _MSG_INVALID_EMAIL_ADDRESS
+
+    process_inbound_email = 'process_inbound_email' in post_data
+    home_page = post_data.get('project_home')
+    if home_page and not (
+        home_page.startswith('http:') or home_page.startswith('https:')):
+      mr.errors.project_home = 'Home page link must start with http: or https:'
+    docs_url = post_data.get('docs_url')
+    if docs_url and not (
+        docs_url.startswith('http:') or docs_url.startswith('https:')):
+      mr.errors.docs_url = 'Documentation link must start with http: or https:'
+    source_url = post_data.get('source_url')
+    if source_url and not (
+        source_url.startswith('http:') or source_url.startswith('https:')):
+      mr.errors.source_url = 'Source link must start with http: or https:'
+
+    logo_gcs_id = ''
+    logo_file_name = ''
+    if 'logo' in post_data and not isinstance(post_data['logo'], string_types):
+      item = post_data['logo']
+      logo_file_name = item.filename
+      try:
+        logo_gcs_id = gcs_helpers.StoreLogoInGCS(
+            logo_file_name, item.value, mr.project.project_id)
+      except gcs_helpers.UnsupportedMimeType, e:
+        mr.errors.logo = e.message
+    elif mr.project.logo_gcs_id and mr.project.logo_file_name:
+      logo_gcs_id = mr.project.logo_gcs_id
+      logo_file_name = mr.project.logo_file_name
+      if post_data.get('delete_logo'):
+        try:
+          gcs_helpers.DeleteObjectFromGCS(logo_gcs_id)
+        except cloudstorage.NotFoundError:
+          pass
+        # Reset the GCS ID and file name.
+        logo_gcs_id = ''
+        logo_file_name = ''
+
+    issue_notify_always_detailed = 'issue_notify_always_detailed' in post_data
+
+    # 2. Call services layer to save changes.
+    if not mr.errors.AnyErrors():
+      with work_env.WorkEnv(mr, self.services) as we:
+        we.UpdateProject(
+            mr.project.project_id,
+            issue_notify_address=issue_notify,
+            summary=summary,
+            description=description,
+            only_owners_remove_restrictions=only_owners_remove_restrictions,
+            only_owners_see_contributors=only_owners_see_contributors,
+            process_inbound_email=process_inbound_email,
+            access=access,
+            home_page=home_page,
+            docs_url=docs_url,
+            source_url=source_url,
+            logo_gcs_id=logo_gcs_id,
+            logo_file_name=logo_file_name,
+            issue_notify_always_detailed=issue_notify_always_detailed)
+
+    # 3. Determine the next page in the UI flow.
+    if mr.errors.AnyErrors():
+      access_view = project_views.ProjectAccessView(access)
+      self.PleaseCorrect(
+          mr, initial_summary=summary, initial_description=description,
+          initial_access=access_view)
+    else:
+      return framework_helpers.FormatAbsoluteURL(
+          mr, urls.ADMIN_META, saved=1, ts=int(time.time()))
+
+  def _ParseMeta(self, post_data, errors):
+    """Process a POST on the project metadata section of the admin page."""
+    summary = None
+    description = None
+
+    if 'summary' in post_data:
+      summary = post_data['summary']
+      if not summary:
+        errors.summary = _MSG_SUMMARY_MISSING
+    if 'description' in post_data:
+      description = post_data['description']
+      if not description:
+        errors.description = _MSG_DESCRIPTION_MISSING
+
+    return summary, description
diff --git a/project/projectadminadvanced.py b/project/projectadminadvanced.py
new file mode 100644
index 0000000..9c5fc1b
--- /dev/null
+++ b/project/projectadminadvanced.py
@@ -0,0 +1,213 @@
+# 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
+
+"""Page and form handlers for project administration "advanced" subtab.
+
+The advanced subtab allows the project to be archived, unarchived, deleted, or
+marked as moved.  Site admins can use this page to "doom" a project, which is
+basically archiving it in a way that cannot be reversed by the project owners.
+
+The page also shows project data storage quota and usage values, and
+site admins can edit those quotas.
+"""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from businesslogic import work_env
+from framework import framework_constants
+from framework import framework_helpers
+from framework import permissions
+from framework import servlet
+from framework import template_helpers
+from framework import urls
+from proto import project_pb2
+from tracker import tracker_constants
+
+
+class ProjectAdminAdvanced(servlet.Servlet):
+  """A page with project state options for the Project Owner(s)."""
+
+  _PAGE_TEMPLATE = 'project/project-admin-advanced-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_ADMIN
+
+  def AssertBasePermission(self, mr):
+    """Make sure that the logged in user has permission to view this page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+    """
+    super(ProjectAdminAdvanced, self).AssertBasePermission(mr)
+    if not self.CheckPerm(mr, permissions.EDIT_PROJECT):
+      raise permissions.PermissionException(
+          'User is not allowed to administer this project')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the "Advanced" subtab.
+    """
+    page_data = {
+        'admin_tab_mode': self.ADMIN_TAB_ADVANCED,
+        }
+    page_data.update(self._GatherPublishingOptions(mr))
+    page_data.update(self._GatherQuotaData(mr))
+
+    return page_data
+
+  def _GatherPublishingOptions(self, mr):
+    """Gather booleans to control the publishing buttons to show in EZT."""
+    state = mr.project.state
+    offer_archive = state != project_pb2.ProjectState.ARCHIVED
+    offer_delete = state == project_pb2.ProjectState.ARCHIVED
+    offer_publish = (
+        state == project_pb2.ProjectState.ARCHIVED and
+        (self.CheckPerm(mr, permissions.PUBLISH_PROJECT) or
+         not mr.project.state_reason))
+    offer_move = state == project_pb2.ProjectState.LIVE
+    offer_doom = self.CheckPerm(mr, permissions.ADMINISTER_SITE)
+    moved_to = mr.project.moved_to or 'http://'
+
+    publishing_data = {
+        'offer_archive': ezt.boolean(offer_archive),
+        'offer_publish': ezt.boolean(offer_publish),
+        'offer_delete': ezt.boolean(offer_delete),
+        'offer_move': ezt.boolean(offer_move),
+        'moved_to': moved_to,
+        'offer_doom': ezt.boolean(offer_doom),
+        'default_doom_reason': framework_constants.DEFAULT_DOOM_REASON,
+        }
+
+    return publishing_data
+
+  def _GatherQuotaData(self, mr):
+    """Gather quota info from backends so that it can be passed to EZT."""
+    offer_quota_editing = self.CheckPerm(mr, permissions.EDIT_QUOTA)
+
+    quota_data = {
+        'offer_quota_editing': ezt.boolean(offer_quota_editing),
+        'attachment_quota': self._BuildAttachmentQuotaData(mr.project),
+        }
+
+    return quota_data
+
+  def _BuildComponentQuota(self, used_bytes, quota_bytes, field_name):
+    """Return an object to easily display quota info in EZT."""
+    if quota_bytes:
+      used_percent = 100 * used_bytes // quota_bytes
+    else:
+      used_percent = 0
+
+    quota_mb = quota_bytes // 1024 // 1024
+
+    return template_helpers.EZTItem(
+        used=template_helpers.BytesKbOrMb(used_bytes),
+        quota_mb=quota_mb,
+        used_percent=used_percent,
+        avail_percent=100 - used_percent,
+        field_name=field_name)
+
+  def _BuildAttachmentQuotaData(self, project):
+    return self._BuildComponentQuota(
+      project.attachment_bytes_used,
+      project.attachment_quota or
+      tracker_constants.ISSUE_ATTACHMENTS_QUOTA_HARD,
+      'attachment_quota_mb')
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: dictionary of HTML form data.
+
+    Returns:
+      String URL to redirect to after processing is completed.
+    """
+    if 'savechanges' in post_data:
+      self._ProcessQuota(mr, post_data)
+    else:
+      self._ProcessPublishingOptions(mr, post_data)
+
+    if 'deletebtn' in post_data:
+      url = framework_helpers.FormatAbsoluteURL(
+          mr, urls.HOSTING_HOME, include_project=False)
+    else:
+      url = framework_helpers.FormatAbsoluteURL(
+          mr, urls.ADMIN_ADVANCED, saved=1, ts=int(time.time()))
+
+    return url
+
+  def _ProcessQuota(self, mr, post_data):
+    """Process form data to update project quotas."""
+    if not self.CheckPerm(mr, permissions.EDIT_QUOTA):
+      raise permissions.PermissionException(
+          'User is not allowed to change project quotas')
+
+    try:
+      new_attachment_quota = int(post_data['attachment_quota_mb'])
+      new_attachment_quota *= 1024 * 1024
+    except ValueError:
+      mr.errors.attachment_quota = 'Invalid value'
+      self.PleaseCorrect(mr)  # Don't echo back the bad input, just start over.
+      return
+
+    with work_env.WorkEnv(mr, self.services) as we:
+      we.UpdateProject(
+          mr.project.project_id, attachment_quota=new_attachment_quota)
+
+  def _ProcessPublishingOptions(self, mr, post_data):
+    """Process form data to update project state."""
+    # Note that EDIT_PROJECT is the base permission for this servlet, but
+    # dooming and undooming projects also requires PUBLISH_PROJECT.
+
+    state = mr.project.state
+
+    with work_env.WorkEnv(mr, self.services) as we:
+      if 'archivebtn' in post_data and not mr.project.delete_time:
+        we.UpdateProject(
+            mr.project.project_id, state=project_pb2.ProjectState.ARCHIVED)
+
+      elif 'deletebtn' in post_data:  # Mark the project for immediate deletion.
+        if state != project_pb2.ProjectState.ARCHIVED:
+          raise permissions.PermissionException(
+              'Projects must be archived before being deleted')
+        we.DeleteProject(mr.project_id)
+
+      elif 'doombtn' in post_data:  # Go from any state to forced ARCHIVED.
+        if not self.CheckPerm(mr, permissions.PUBLISH_PROJECT):
+          raise permissions.PermissionException(
+              'User is not allowed to doom projects')
+        reason = post_data.get('reason')
+        delete_time = time.time() + framework_constants.DEFAULT_DOOM_PERIOD
+        we.UpdateProject(
+            mr.project.project_id, state=project_pb2.ProjectState.ARCHIVED,
+            state_reason=reason, delete_time=delete_time)
+
+      elif 'publishbtn' in post_data:  # Go from any state to LIVE
+        if (mr.project.delete_time and
+            not self.CheckPerm(mr, permissions.PUBLISH_PROJECT)):
+          raise permissions.PermissionException(
+              'User is not allowed to unarchive doomed projects')
+        we.UpdateProject(
+            mr.project.project_id, state=project_pb2.ProjectState.LIVE,
+            state_reason='', delete_time=0, read_only_reason='')
+
+      elif 'movedbtn' in post_data:  # Record the moved_to location.
+        if state != project_pb2.ProjectState.LIVE:
+          raise permissions.PermissionException(
+              'This project is not live, no user can move it')
+        moved_to = post_data.get('moved_to', '')
+        we.UpdateProject(mr.project.project_id, moved_to=moved_to)
diff --git a/project/projectexport.py b/project/projectexport.py
new file mode 100644
index 0000000..e315442
--- /dev/null
+++ b/project/projectexport.py
@@ -0,0 +1,203 @@
+# 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
+
+"""Servlet to export a project's config in JSON format.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from framework import permissions
+from framework import jsonfeed
+from framework import servlet
+from project import project_helpers
+from tracker import tracker_bizobj
+
+
+class ProjectExport(servlet.Servlet):
+  """Only site admins can export a project"""
+
+  _PAGE_TEMPLATE = 'project/project-export-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_ADMIN
+
+  def AssertBasePermission(self, mr):
+    """Make sure that the logged in user has permission to view this page."""
+    super(ProjectExport, self).AssertBasePermission(mr)
+    if not mr.auth.user_pb.is_site_admin:
+      raise permissions.PermissionException(
+          'Only site admins may export project configuration')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+
+    return {
+        'admin_tab_mode': None,
+        'page_perms': self.MakePagePerms(mr, None, permissions.CREATE_ISSUE),
+    }
+
+
+class ProjectExportJSON(jsonfeed.JsonFeed):
+  """ProjectExportJSON shows all configuration for a Project in JSON form."""
+
+  # Pretty-print the JSON output.
+  JSON_INDENT = 4
+
+  def AssertBasePermission(self, mr):
+    """Make sure that the logged in user has permission to view this page."""
+    super(ProjectExportJSON, self).AssertBasePermission(mr)
+    if not mr.auth.user_pb.is_site_admin:
+      raise permissions.PermissionException(
+          'Only site admins may export project configuration')
+
+  def HandleRequest(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    project = self.services.project.GetProject(mr.cnxn, mr.project.project_id)
+    user_id_set = project_helpers.UsersInvolvedInProject(project)
+
+    config = self.services.config.GetProjectConfig(
+        mr.cnxn, mr.project.project_id)
+    templates = self.services.template.GetProjectTemplates(
+        mr.cnxn, config.project_id)
+    involved_users = self.services.config.UsersInvolvedInConfig(
+        config, templates)
+    user_id_set.update(involved_users)
+
+    # The value 0 indicates "no user", e.g., that an issue has no owner.
+    # We don't need to create a User row to represent that.
+    user_id_set.discard(0)
+    email_dict = self.services.user.LookupUserEmails(mr.cnxn, user_id_set)
+
+    project_json = self._MakeProjectJSON(project, email_dict)
+    config_json = self._MakeConfigJSON(config, email_dict, templates)
+
+    json_data = {
+        'metadata': {
+            'version': 1,
+            'when': int(time.time()),
+            'who': mr.auth.email,
+        },
+        'project': project_json,
+        'config': config_json,
+        # This list could be derived from the others, but we provide it for
+        # ease of processing.
+        'emails': list(email_dict.values()),
+    }
+    return json_data
+
+  def _MakeProjectJSON(self, project, email_dict):
+    project_json = {
+      'name': project.project_name,
+      'summary': project.summary,
+      'description': project.description,
+      'state': project.state.name,
+      'access': project.access.name,
+      'owners': [email_dict.get(user) for user in project.owner_ids],
+      'committers': [email_dict.get(user) for user in project.committer_ids],
+      'contributors': [
+          email_dict.get(user) for user in project.contributor_ids],
+      'perms': [self._MakePermJSON(perm, email_dict)
+                for perm in project.extra_perms],
+      'issue_notify_address': project.issue_notify_address,
+      'attachment_bytes': project.attachment_bytes_used,
+      'attachment_quota': project.attachment_quota,
+      'recent_activity': project.recent_activity,
+      'process_inbound_email': project.process_inbound_email,
+      'only_owners_remove_restrictions':
+          project.only_owners_remove_restrictions,
+      'only_owners_see_contributors': project.only_owners_see_contributors,
+      'revision_url_format': project.revision_url_format,
+      'read_only_reason': project.read_only_reason,
+    }
+    return project_json
+
+  def _MakePermJSON(self, perm, email_dict):
+    perm_json = {
+      'member': email_dict.get(perm.member_id),
+      'perms': [p for p in perm.perms],
+    }
+    return perm_json
+
+  def _MakeConfigJSON(self, config, email_dict, project_templates):
+    config_json = {
+      'statuses':
+          [self._MakeStatusJSON(status)
+           for status in config.well_known_statuses],
+      'statuses_offer_merge':
+          [status for status in config.statuses_offer_merge],
+      'labels':
+          [self._MakeLabelJSON(label) for label in config.well_known_labels],
+      'exclusive_label_prefixes':
+          [label for label in config.exclusive_label_prefixes],
+      # TODO(http://crbug.com/monorail/7217): Export the project's FieldDefs.
+      'components':
+          [self._MakeComponentJSON(component, email_dict)
+           for component in config.component_defs],
+      'templates':
+          [self._MakeTemplateJSON(template, email_dict)
+           for template in project_templates],
+      'developer_template': config.default_template_for_developers,
+      'user_template': config.default_template_for_users,
+      'list_cols': config.default_col_spec,
+      'list_spec': config.default_sort_spec,
+      'grid_x': config.default_x_attr,
+      'grid_y': config.default_y_attr,
+      'only_known_values': config.restrict_to_known,
+    }
+    if config.custom_issue_entry_url:
+      config_json.update({'issue_entry_url': config.custom_issue_entry_url})
+    return config_json
+
+  def _MakeTemplateJSON(self, template, email_dict):
+    template_json = {
+      'name': template.name,
+      'summary': template.summary,
+      'content': template.content,
+      'summary_must_be_edited': template.summary_must_be_edited,
+      'owner': email_dict.get(template.owner_id),
+      'status': template.status,
+      'labels': [label for label in template.labels],
+      # TODO(http://crbug.com/monorail/7217): Export the template's Fields.
+      'members_only': template.members_only,
+      'owner_defaults_to_member': template.owner_defaults_to_member,
+      'component_required': template.component_required,
+      'admins': [email_dict(user) for user in template.admin_ids],
+    }
+    return template_json
+
+  def _MakeStatusJSON(self, status):
+    status_json = {
+      'status': status.status,
+      'open': status.means_open,
+      'docstring': status.status_docstring,
+    }
+    return status_json
+
+  def _MakeLabelJSON(self, label):
+    label_json = {
+      'label': label.label,
+      'docstring': label.label_docstring,
+    }
+    return label_json
+
+  def _MakeComponentJSON(self, component, email_dict):
+    component_json = {
+      'path': component.path,
+      'docstring': component.docstring,
+      'admins': [email_dict.get(user) for user in component.admin_ids],
+      'ccs': [email_dict.get(user) for user in component.cc_ids],
+    }
+    return component_json
diff --git a/project/projectsummary.py b/project/projectsummary.py
new file mode 100644
index 0000000..a07bbe5
--- /dev/null
+++ b/project/projectsummary.py
@@ -0,0 +1,75 @@
+# 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
+
+"""A class to display the project summary page."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from businesslogic import work_env
+from framework import permissions
+from framework import servlet
+from project import project_helpers
+from project import project_views
+
+from third_party import markdown
+
+
+class ProjectSummary(servlet.Servlet):
+  """Page to show brief project description and process documentation."""
+
+  _PAGE_TEMPLATE = 'project/project-summary-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_PROCESS
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+
+    with mr.profiler.Phase('getting project star count'):
+      num_stars = self.services.project_star.CountItemStars(
+          mr.cnxn, mr.project_id)
+      plural = '' if num_stars == 1 else 's'
+
+    page_data = {
+        'admin_tab_mode': self.PROCESS_TAB_SUMMARY,
+        'formatted_project_description':
+            markdown.Markdown(mr.project.description),
+        'access_level': project_views.ProjectAccessView(mr.project.access),
+        'num_stars': num_stars,
+        'plural': plural,
+        'home_page': mr.project.home_page,
+        'docs_url': mr.project.docs_url,
+        'source_url': mr.project.source_url,
+        }
+
+    return page_data
+
+  def GatherHelpData(self, mr, page_data):
+    """Return a dict of values to drive on-page user help.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+      page_data: Dictionary of base and page template data.
+
+    Returns:
+      A dict of values to drive on-page user help, to be added to page_data.
+    """
+    help_data = super(ProjectSummary, self).GatherHelpData(mr, page_data)
+    with work_env.WorkEnv(mr, self.services) as we:
+      userprefs = we.GetUserPrefs(mr.auth.user_id)
+    dismissed = [
+        pv.name for pv in userprefs.prefs if pv.value == 'true']
+    project = mr.project
+
+    # Cue cards for project owners.
+    if self.CheckPerm(mr, permissions.EDIT_PROJECT):
+      if ('document_team_duties' not in dismissed and
+          len(project_helpers.AllProjectMembers(project)) > 1 and
+          not self.services.project.GetProjectCommitments(
+              mr.cnxn, mr.project_id).commitments):
+        help_data['cue'] = 'document_team_duties'
+
+    return help_data
diff --git a/project/projectupdates.py b/project/projectupdates.py
new file mode 100644
index 0000000..bd1e316
--- /dev/null
+++ b/project/projectupdates.py
@@ -0,0 +1,42 @@
+# 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
+
+"""A class to display a paginated list of activity stream updates."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+import ezt
+
+from features import activities
+from framework import servlet
+from framework import urls
+
+
+class ProjectUpdates(servlet.Servlet):
+  """ProjectUpdates page shows a list of past activities."""
+
+  _PAGE_TEMPLATE = 'project/project-updates-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_UPDATES
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+
+    page_data = self._GatherUpdates(mr)
+    page_data['subtab_mode'] = None
+    page_data['user_updates_tab_mode'] = None
+    logging.info('project updates data is %r', page_data)
+    return page_data
+
+  def _GatherUpdates(self, mr):
+    """Gathers and returns activity streams data."""
+
+    url = '/p/%s%s' % (mr.project_name, urls.UPDATES_LIST)
+    return activities.GatherUpdatesData(
+        self.services, mr, project_ids=[mr.project_id],
+        ending='by_user', updates_page_url=url,
+        autolink=self.services.autolink)
diff --git a/project/redirects.py b/project/redirects.py
new file mode 100644
index 0000000..7813a56
--- /dev/null
+++ b/project/redirects.py
@@ -0,0 +1,52 @@
+# 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
+
+"""A class to forward requests to configured urls.
+
+This page handles the /wiki and /source urls which are forwarded from Codesite.
+If a project has defined appropriate urls, then the users are forwarded there.
+If not, they are redirected to adminIntro.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import httplib
+
+from framework import framework_helpers
+from framework import servlet
+from framework import urls
+
+
+class WikiRedirect(servlet.Servlet):
+  """Redirect to the wiki documentation, if provided."""
+
+  def get(self, **kwargs):
+    """Construct a 302 pointing at project.docs_url, or at adminIntro."""
+    if not self.mr.project:
+      self.response.status = httplib.NOT_FOUND
+      return
+    docs_url = self.mr.project.docs_url
+    if not docs_url:
+      docs_url = framework_helpers.FormatAbsoluteURL(
+          self.mr, urls.ADMIN_INTRO, include_project=True)
+    self.response.location = docs_url
+    self.response.status = httplib.MOVED_PERMANENTLY
+
+
+class SourceRedirect(servlet.Servlet):
+  """Redirect to the source browser, if provided."""
+
+  def get(self, **kwargs):
+    """Construct a 302 pointing at project.source_url, or at adminIntro."""
+    if not self.mr.project:
+      self.response.status = httplib.NOT_FOUND
+      return
+    source_url = self.mr.project.source_url
+    if not source_url:
+      source_url = framework_helpers.FormatAbsoluteURL(
+          self.mr, urls.ADMIN_INTRO, include_project=True)
+    self.response.location = source_url
+    self.response.status = httplib.MOVED_PERMANENTLY
diff --git a/project/test/__init__.py b/project/test/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/project/test/__init__.py
diff --git a/project/test/peopledetail_test.py b/project/test/peopledetail_test.py
new file mode 100644
index 0000000..547df80
--- /dev/null
+++ b/project/test/peopledetail_test.py
@@ -0,0 +1,262 @@
+# 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
+
+"""Unittest for the people detail page."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+import unittest
+
+import webapp2
+
+from framework import authdata
+from framework import exceptions
+from framework import permissions
+from project import peopledetail
+from proto import project_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class PeopleDetailTest(unittest.TestCase):
+
+  def setUp(self):
+    services = service_manager.Services(
+        project=fake.ProjectService(),
+        usergroup=fake.UserGroupService(),
+        user=fake.UserService())
+    services.user.TestAddUser('jrobbins', 111)
+    services.user.TestAddUser('jrobbins@jrobbins.org', 333)
+    services.user.TestAddUser('jrobbins@chromium.org', 555)
+    services.user.TestAddUser('imso31337@gmail.com', 999)
+    self.project = services.project.TestAddProject('proj')
+    self.project.owner_ids.extend([111, 222])
+    self.project.committer_ids.extend([333, 444])
+    self.project.contributor_ids.extend([555])
+    self.servlet = peopledetail.PeopleDetail('req', 'res', services=services)
+
+  def VerifyAccess(self, exception_expected):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=111',
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.servlet.AssertBasePermission(mr)
+    # Owner never raises PermissionException.
+
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=333',
+        project=self.project,
+        perms=permissions.COMMITTER_ACTIVE_PERMISSIONSET)
+    self.servlet.AssertBasePermission(mr)
+    # Committer never raises PermissionException.
+
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=555',
+        project=self.project,
+        perms=permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+    if exception_expected:
+      self.assertRaises(permissions.PermissionException,
+                        self.servlet.AssertBasePermission, mr)
+    else:
+      self.servlet.AssertBasePermission(mr)
+      # No PermissionException raised
+
+    # Sign-out users
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=555',
+        project=self.project,
+        perms=permissions.READ_ONLY_PERMISSIONSET)
+    if exception_expected:
+      self.assertRaises(permissions.PermissionException,
+                        self.servlet.AssertBasePermission, mr)
+    else:
+      self.servlet.AssertBasePermission(mr)
+
+    # Non-membr users
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=555',
+        project=self.project,
+        perms=permissions.USER_PERMISSIONSET)
+    if exception_expected:
+      self.assertRaises(permissions.PermissionException,
+                        self.servlet.AssertBasePermission, mr)
+    else:
+      self.servlet.AssertBasePermission(mr)
+
+  def testAssertBasePermission_Normal(self):
+    self.VerifyAccess(False)
+
+  def testAssertBasePermission_HubSpoke(self):
+    self.project.only_owners_see_contributors = True
+    self.VerifyAccess(True)
+
+  def testAssertBasePermission_HubSpokeViewingSelf(self):
+    self.project.only_owners_see_contributors = True
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=333',
+        project=self.project,
+        perms=permissions.COMMITTER_ACTIVE_PERMISSIONSET)
+    mr.auth.user_id = 333
+    self.servlet.AssertBasePermission(mr)
+    # No PermissionException raised
+
+  def testGatherPageData(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=111',
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    mr.auth = authdata.AuthData()
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertFalse(page_data['warn_abandonment'])
+    self.assertEqual(2, page_data['total_num_owners'])
+    # TODO(jrobbins): fill in tests for all other aspects.
+
+  def testValidateMemberID(self):
+    # We can validate owners
+    self.assertEqual(
+        111, self.servlet.ValidateMemberID('fake cnxn', 111, self.project))
+
+    # We can parse members
+    self.assertEqual(
+        333, self.servlet.ValidateMemberID('fake cnxn', 333, self.project))
+
+    # 404 for user that does not exist
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.servlet.ValidateMemberID('fake cnxn', 8933, self.project)
+    self.assertEqual(404, cm.exception.code)
+
+    # 404 for valid user that is not in this project
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.servlet.ValidateMemberID('fake cnxn', 999, self.project)
+    self.assertEqual(404, cm.exception.code)
+
+  def testParsePersonData_BadPost(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail',
+        project=self.project)
+    post_data = fake.PostData()
+    with self.assertRaises(exceptions.InputException):
+      _result = self.servlet.ParsePersonData(mr, post_data)
+
+  def testParsePersonData_NoDetails(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=111',
+        project=self.project)
+    post_data = fake.PostData(role=['owner'])
+    u, r, ac, n, _, _ = self.servlet.ParsePersonData(mr, post_data)
+    self.assertEqual(111, u)
+    self.assertEqual('owner', r)
+    self.assertEqual([], ac)
+    self.assertEqual('', n)
+
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=333',
+        project=self.project)
+    post_data = fake.PostData(role=['owner'])
+    u, r, ac, n, _, _ = self.servlet.ParsePersonData(mr, post_data)
+    self.assertEqual(333, u)
+
+  def testParsePersonData(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=111',
+        project=self.project)
+    post_data = fake.PostData(
+        role=['owner'], extra_perms=['ViewQuota', 'EditIssue'])
+    u, r, ac, n, _, _ = self.servlet.ParsePersonData(mr, post_data)
+    self.assertEqual(111, u)
+    self.assertEqual('owner', r)
+    self.assertEqual(['ViewQuota', 'EditIssue'], ac)
+    self.assertEqual('', n)
+
+    post_data = fake.PostData({
+        'role': ['owner'],
+        'extra_perms': [' ', '  \t'],
+        'notes': [''],
+        'ac_include': [123],
+        'ac_expand': [123],
+        })
+    (u, r, ac, n, ac_exclusion, no_expand
+     ) = self.servlet.ParsePersonData(mr, post_data)
+    self.assertEqual(111, u)
+    self.assertEqual('owner', r)
+    self.assertEqual([], ac)
+    self.assertEqual('', n)
+    self.assertFalse(ac_exclusion)
+    self.assertFalse(no_expand)
+
+    post_data = fake.PostData({
+        'username': ['jrobbins'],
+        'role': ['owner'],
+        'extra_perms': ['_ViewQuota', '  __EditIssue'],
+        'notes': [' Our local Python expert '],
+        })
+    (u, r, ac, n, ac_exclusion, no_expand
+     )= self.servlet.ParsePersonData(mr, post_data)
+    self.assertEqual(111, u)
+    self.assertEqual('owner', r)
+    self.assertEqual(['ViewQuota', 'EditIssue'], ac)
+    self.assertEqual('Our local Python expert', n)
+    self.assertTrue(ac_exclusion)
+    self.assertTrue(no_expand)
+
+  def testCanEditMemberNotes(self):
+    """Only owners can edit member notes."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=111',
+        project=self.project,
+        perms=permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+    result = self.servlet.CanEditMemberNotes(mr, 222)
+    self.assertFalse(result)
+
+    mr.auth.user_id = 222
+    result = self.servlet.CanEditMemberNotes(mr, 222)
+    self.assertTrue(result)
+
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=111',
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    result = self.servlet.CanEditMemberNotes(mr, 222)
+    self.assertTrue(result)
+
+  def testCanEditPerms(self):
+    """Only owners can edit member perms."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=111',
+        project=self.project,
+        perms=permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+    result = self.servlet.CanEditPerms(mr)
+    self.assertFalse(result)
+
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=111',
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    result = self.servlet.CanEditPerms(mr)
+    self.assertTrue(result)
+
+  def testCanRemoveRole(self):
+    """Owners can remove members. Users could also remove themselves."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=111',
+        project=self.project,
+        perms=permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+    result = self.servlet.CanRemoveRole(mr, 222)
+    self.assertFalse(result)
+
+    mr.auth.user_id = 111
+    result = self.servlet.CanRemoveRole(mr, 111)
+    self.assertTrue(result)
+
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=111',
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    result = self.servlet.CanRemoveRole(mr, 222)
+    self.assertTrue(result)
diff --git a/project/test/peoplelist_test.py b/project/test/peoplelist_test.py
new file mode 100644
index 0000000..6620df9
--- /dev/null
+++ b/project/test/peoplelist_test.py
@@ -0,0 +1,158 @@
+# 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
+
+"""Unittest for People List servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import authdata
+from framework import permissions
+from project import peoplelist
+from proto import user_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class PeopleListTest(unittest.TestCase):
+  """Tests for the PeopleList servlet."""
+
+  def setUp(self):
+    services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    services.user.TestAddUser('jrobbins@gmail.com', 111)
+    services.user.TestAddUser('jrobbins@jrobbins.org', 222)
+    services.user.TestAddUser('jrobbins@chromium.org', 333)
+    services.user.TestAddUser('imso31337@gmail.com', 999)
+    self.project = services.project.TestAddProject('proj')
+    self.project.owner_ids.extend([111])
+    self.project.committer_ids.extend([222])
+    self.project.contributor_ids.extend([333])
+    self.servlet = peoplelist.PeopleList('req', 'res', services=services)
+
+  def VerifyAccess(self, exception_expected):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/list',
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.servlet.AssertBasePermission(mr)
+    # Owner never raises PermissionException.
+
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/list',
+        project=self.project,
+        perms=permissions.COMMITTER_ACTIVE_PERMISSIONSET)
+    self.servlet.AssertBasePermission(mr)
+    # Committer never raises PermissionException.
+
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/list',
+        project=self.project,
+        perms=permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+    if exception_expected:
+      self.assertRaises(permissions.PermissionException,
+                        self.servlet.AssertBasePermission, mr)
+    else:
+      self.servlet.AssertBasePermission(mr)
+      # No PermissionException raised
+
+    # Sign-out users
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=555',
+        project=self.project,
+        perms=permissions.READ_ONLY_PERMISSIONSET)
+    if exception_expected:
+      self.assertRaises(permissions.PermissionException,
+                        self.servlet.AssertBasePermission, mr)
+    else:
+      self.servlet.AssertBasePermission(mr)
+
+    # Non-membr users
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/detail?u=555',
+        project=self.project,
+        perms=permissions.USER_PERMISSIONSET)
+    if exception_expected:
+      self.assertRaises(permissions.PermissionException,
+                        self.servlet.AssertBasePermission, mr)
+    else:
+      self.servlet.AssertBasePermission(mr)
+
+  def testAssertBasePermission_Normal(self):
+    self.VerifyAccess(False)
+
+  def testAssertBasePermission_HideMembers(self):
+    self.project.only_owners_see_contributors = True
+    self.VerifyAccess(True)
+
+  def testGatherPageData(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/list',
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    mr.auth = authdata.AuthData()
+    page_data = self.servlet.GatherPageData(mr)
+
+    self.assertEqual(1, page_data['total_num_owners'])
+    # TODO(jrobbins): fill in tests for all other aspects.
+
+  def testProcessFormData_Permission(self):
+    """Only owners could add/remove members."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/list',
+        project=self.project,
+        perms=permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.ProcessFormData, mr, {})
+
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/list',
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.servlet.ProcessFormData(mr, {})
+
+  def testGatherHelpData_Anon(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/list',
+        project=self.project)
+    help_data = self.servlet.GatherHelpData(mr, {})
+    self.assertEqual(
+        {'account_cue': None, 'cue': None},
+        help_data)
+
+  def testGatherHelpData_Nonmember(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/list',
+        project=self.project)
+    mr.auth.user_id = 999
+    mr.auth.effective_ids = {999}
+    help_data = self.servlet.GatherHelpData(mr, {})
+    self.assertEqual(
+        {'account_cue': None, 'cue': 'how_to_join_project'},
+        help_data)
+
+    self.servlet.services.user.SetUserPrefs(
+        'cnxn', 999,
+        [user_pb2.UserPrefValue(name='how_to_join_project', value='true')])
+    help_data = self.servlet.GatherHelpData(mr, {})
+    self.assertEqual(
+        {'account_cue': None, 'cue': None},
+        help_data)
+
+  def testGatherHelpData_Member(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/people/list',
+        project=self.project)
+    mr.auth.user_id = 111
+    mr.auth.effective_ids = {111}
+    help_data = self.servlet.GatherHelpData(mr, {})
+    self.assertEqual(
+        {'account_cue': None, 'cue': None},
+        help_data)
diff --git a/project/test/project_helpers_test.py b/project/test/project_helpers_test.py
new file mode 100644
index 0000000..4732895
--- /dev/null
+++ b/project/test/project_helpers_test.py
@@ -0,0 +1,179 @@
+# 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
+
+"""Unit tests for helpers module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from mock import patch
+
+from framework import framework_views
+from framework import permissions
+from project import project_constants
+from project import project_helpers
+from proto import project_pb2
+from services import service_manager
+from testing import fake
+
+
+class HelpersUnitTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake sql connection'
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService())
+    self.services.user.TestAddUser('a@example.com', 111)
+    self.services.user.TestAddUser('b@example.com', 222)
+    self.services.user.TestAddUser('c@example.com', 333)
+    self.users_by_id = framework_views.MakeAllUserViews(
+        'cnxn', self.services.user, [111, 222, 333])
+    self.effective_ids_by_user = {user: set() for user in {111, 222, 333}}
+
+  def testBuildProjectMembers(self):
+    project = project_pb2.MakeProject(
+        'proj', owner_ids=[111], committer_ids=[222],
+        contributor_ids=[333])
+    page_data = project_helpers.BuildProjectMembers(
+        self.cnxn, project, self.services.user)
+    self.assertEqual(111, page_data['owners'][0].user_id)
+    self.assertEqual(222, page_data['committers'][0].user_id)
+    self.assertEqual(333, page_data['contributors'][0].user_id)
+    self.assertEqual(3, len(page_data['all_members']))
+
+  def testParseUsernames(self):
+    # Form field was not present in post data.
+    id_set = project_helpers.ParseUsernames(
+        self.cnxn, self.services.user, None)
+    self.assertEqual(set(), id_set)
+
+    # Form field was present, but empty.
+    id_set = project_helpers.ParseUsernames(
+        self.cnxn, self.services.user, '')
+    self.assertEqual(set(), id_set)
+
+    # Parsing valid user names.
+    id_set = project_helpers.ParseUsernames(
+        self.cnxn, self.services.user, 'a@example.com, c@example.com')
+    self.assertEqual({111, 333}, id_set)
+
+  def testParseProjectAccess_NotOffered(self):
+    project = project_pb2.MakeProject('proj')
+    access = project_helpers.ParseProjectAccess(project, None)
+    self.assertEqual(None, access)
+
+  def testParseProjectAccess_AllowedChoice(self):
+    project = project_pb2.MakeProject('proj')
+    access = project_helpers.ParseProjectAccess(project, '1')
+    self.assertEqual(project_pb2.ProjectAccess.ANYONE, access)
+
+    access = project_helpers.ParseProjectAccess(project, '3')
+    self.assertEqual(project_pb2.ProjectAccess.MEMBERS_ONLY, access)
+
+  def testParseProjectAccess_BogusChoice(self):
+    project = project_pb2.MakeProject('proj')
+    access = project_helpers.ParseProjectAccess(project, '9')
+    self.assertEqual(None, access)
+
+  def testUsersWithPermsInProject_StandardPermission(self):
+    project = project_pb2.MakeProject('proj', committer_ids=[111])
+    perms_needed = {permissions.VIEW, permissions.EDIT_ISSUE}
+    actual = project_helpers.UsersWithPermsInProject(
+        project, perms_needed, self.users_by_id, self.effective_ids_by_user)
+    self.assertEqual(
+        {permissions.VIEW: {111, 222, 333},
+         permissions.EDIT_ISSUE: {111}},
+        actual)
+
+  def testUsersWithPermsInProject_IndirectPermission(self):
+    perms_needed = {permissions.EDIT_ISSUE}
+    # User 111 has the EDIT_ISSUE permission.
+    project = project_pb2.MakeProject('proj', committer_ids=[111])
+    # User 222 has the EDIT_ISSUE permission, because 111 is included in its
+    # effective IDs.
+    self.effective_ids_by_user[222] = {111}
+    # User 333 doesn't have the EDIT_ISSUE permission, since only direct
+    # effective IDs are taken into account.
+    self.effective_ids_by_user[333] = {222}
+    actual = project_helpers.UsersWithPermsInProject(
+        project, perms_needed, self.users_by_id, self.effective_ids_by_user)
+    self.assertEqual(
+        {permissions.EDIT_ISSUE: {111, 222}},
+        actual)
+
+  def testUsersWithPermsInProject_CustomPermission(self):
+    project = project_pb2.MakeProject('proj')
+    project.extra_perms = [
+        project_pb2.Project.ExtraPerms(
+            member_id=111,
+            perms=['FooPerm', 'BarPerm']),
+        project_pb2.Project.ExtraPerms(
+            member_id=222,
+            perms=['BarPerm'])]
+    perms_needed = {'FooPerm', 'BarPerm'}
+    actual = project_helpers.UsersWithPermsInProject(
+        project, perms_needed, self.users_by_id, self.effective_ids_by_user)
+    self.assertEqual(
+        {'FooPerm': {111},
+         'BarPerm': {111, 222}},
+        actual)
+
+  @patch('google.appengine.api.app_identity.get_default_gcs_bucket_name')
+  @patch('framework.gcs_helpers.SignUrl')
+  def testGetThumbnailUrl(self, mock_SignUrl, mock_get_default_gcs_bucket_name):
+    bucket_name = 'testbucket'
+    expected_url = 'signed/url'
+
+    mock_get_default_gcs_bucket_name.return_value = bucket_name
+    mock_SignUrl.return_value = expected_url
+
+    self.assertEqual(expected_url, project_helpers.GetThumbnailUrl('xyz'))
+    mock_get_default_gcs_bucket_name.assert_called_once()
+    mock_SignUrl.assert_called_once_with(bucket_name, 'xyz' + '-thumbnail')
+
+  def testIsValidProjectName_BadChars(self):
+    self.assertFalse(project_helpers.IsValidProjectName('spa ce'))
+    self.assertFalse(project_helpers.IsValidProjectName('under_score'))
+    self.assertFalse(project_helpers.IsValidProjectName('name.dot'))
+    self.assertFalse(project_helpers.IsValidProjectName('pie#sign$'))
+    self.assertFalse(project_helpers.IsValidProjectName('(who?)'))
+
+  def testIsValidProjectName_BadHyphen(self):
+    self.assertFalse(project_helpers.IsValidProjectName('name-'))
+    self.assertFalse(project_helpers.IsValidProjectName('-name'))
+    self.assertTrue(project_helpers.IsValidProjectName('project-name'))
+
+  def testIsValidProjectName_MinimumLength(self):
+    self.assertFalse(project_helpers.IsValidProjectName('x'))
+    self.assertTrue(project_helpers.IsValidProjectName('xy'))
+
+  def testIsValidProjectName_MaximumLength(self):
+    self.assertFalse(
+        project_helpers.IsValidProjectName(
+            'x' * (project_constants.MAX_PROJECT_NAME_LENGTH + 1)))
+    self.assertTrue(
+        project_helpers.IsValidProjectName(
+            'x' * (project_constants.MAX_PROJECT_NAME_LENGTH)))
+
+  def testIsValidProjectName_InvalidName(self):
+    self.assertFalse(project_helpers.IsValidProjectName(''))
+    self.assertFalse(project_helpers.IsValidProjectName('000'))
+
+  def testIsValidProjectName_ValidName(self):
+    self.assertTrue(project_helpers.IsValidProjectName('098asd'))
+    self.assertTrue(project_helpers.IsValidProjectName('one-two-three'))
+
+  def testAllProjectMembers(self):
+    p = project_pb2.Project()
+    self.assertEqual(project_helpers.AllProjectMembers(p), [])
+
+    p.owner_ids.extend([1, 2, 3])
+    p.committer_ids.extend([4, 5, 6])
+    p.contributor_ids.extend([7, 8, 9])
+    self.assertEqual(
+        project_helpers.AllProjectMembers(p), [1, 2, 3, 4, 5, 6, 7, 8, 9])
diff --git a/project/test/project_views_test.py b/project/test/project_views_test.py
new file mode 100644
index 0000000..940116e
--- /dev/null
+++ b/project/test/project_views_test.py
@@ -0,0 +1,112 @@
+# 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
+
+"""Unit tests for project_views module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import framework_views
+from project import project_views
+from proto import project_pb2
+from services import service_manager
+from testing import fake
+
+
+class ProjectAccessViewTest(unittest.TestCase):
+
+  def testAccessViews(self):
+    anyone_view = project_views.ProjectAccessView(
+        project_pb2.ProjectAccess.ANYONE)
+    self.assertEqual(anyone_view.key, int(project_pb2.ProjectAccess.ANYONE))
+
+    members_only_view = project_views.ProjectAccessView(
+        project_pb2.ProjectAccess.MEMBERS_ONLY)
+    self.assertEqual(members_only_view.key,
+                     int(project_pb2.ProjectAccess.MEMBERS_ONLY))
+
+
+class ProjectViewTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService())
+    self.services.project.TestAddProject('test')
+
+  def testNormalProject(self):
+    project = self.services.project.GetProjectByName('fake cnxn', 'test')
+    project_view = project_views.ProjectView(project)
+    self.assertEqual('test', project_view.project_name)
+    self.assertEqual('/p/test', project_view.relative_home_url)
+    self.assertEqual('LIVE', project_view.state_name)
+
+  def testCachedContentTimestamp(self):
+    project = self.services.project.GetProjectByName('fake cnxn', 'test')
+
+    # Project was never updated since we added cached_content_timestamp.
+    project.cached_content_timestamp = 0
+    view = project_views.ProjectView(project, now=1 * 60 * 60 + 234)
+    self.assertEqual(1 * 60 * 60, view.cached_content_timestamp)
+
+    # Project was updated within the last hour, use that timestamp.
+    project.cached_content_timestamp = 1 * 60 * 60 + 123
+    view = project_views.ProjectView(project, now=1 * 60 * 60 + 234)
+    self.assertEqual(1 * 60 * 60 + 123, view.cached_content_timestamp)
+
+    # Project was not updated within the last hour, but user groups
+    # could have been updated on groups.google.com without any
+    # notification to us, so the client will ask for an updated feed
+    # at least once an hour.
+    project.cached_content_timestamp = 1 * 60 * 60 + 123
+    view = project_views.ProjectView(project, now=2 * 60 * 60 + 234)
+    self.assertEqual(2 * 60 * 60, view.cached_content_timestamp)
+
+
+class MemberViewTest(unittest.TestCase):
+
+  def setUp(self):
+    self.alice_view = framework_views.StuffUserView(111, 'alice', True)
+    self.bob_view = framework_views.StuffUserView(222, 'bob', True)
+    self.carol_view = framework_views.StuffUserView(333, 'carol', True)
+
+    self.project = project_pb2.Project()
+    self.project.project_name = 'proj'
+    self.project.owner_ids.append(111)
+    self.project.committer_ids.append(222)
+    self.project.contributor_ids.append(333)
+
+  def testViewingSelf(self):
+    member_view = project_views.MemberView(
+        0, 111, self.alice_view, self.project, None)
+    self.assertFalse(member_view.viewing_self)
+    member_view = project_views.MemberView(
+        222, 111, self.alice_view, self.project, None)
+    self.assertFalse(member_view.viewing_self)
+
+    member_view = project_views.MemberView(
+        111, 111, self.alice_view, self.project, None)
+    self.assertTrue(member_view.viewing_self)
+
+  def testRoles(self):
+    member_view = project_views.MemberView(
+        0, 111, self.alice_view, self.project, None)
+    self.assertEqual('Owner', member_view.role)
+    self.assertEqual('/p/proj/people/detail?u=111',
+                     member_view.detail_url)
+
+    member_view = project_views.MemberView(
+        0, 222, self.bob_view, self.project, None)
+    self.assertEqual('Committer', member_view.role)
+    self.assertEqual('/p/proj/people/detail?u=222',
+                     member_view.detail_url)
+
+    member_view = project_views.MemberView(
+        0, 333, self.carol_view, self.project, None)
+    self.assertEqual('Contributor', member_view.role)
+    self.assertEqual('/p/proj/people/detail?u=333',
+                     member_view.detail_url)
diff --git a/project/test/projectadmin_test.py b/project/test/projectadmin_test.py
new file mode 100644
index 0000000..0257cd0
--- /dev/null
+++ b/project/test/projectadmin_test.py
@@ -0,0 +1,78 @@
+# 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
+
+"""Unit tests for projectadmin module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import permissions
+from project import projectadmin
+from proto import project_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class ProjectAdminTest(unittest.TestCase):
+  """Unit tests for the ProjectAdmin servlet class."""
+
+  def setUp(self):
+    services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService())
+    self.servlet = projectadmin.ProjectAdmin('req', 'res', services=services)
+    self.project = services.project.TestAddProject(
+        'proj', summary='a summary', description='a description')
+    self.request, self.mr = testing_helpers.GetRequestObjects(
+        project=self.project)
+
+  def testAssertBasePermission(self):
+    # Contributors cannot edit the project
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+
+    # Signed-out users cannot edit the project
+    mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+
+    # Non-member users cannot edit the project
+    mr.perms = permissions.USER_PERMISSIONSET
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+
+    # Owners can edit the project
+    mr.perms = permissions.OWNER_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(mr)
+
+  def testGatherPageData(self):
+    # Project has all default values.
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual('a summary', page_data['initial_summary'])
+    self.assertEqual('a description', page_data['initial_description'])
+    self.assertEqual(
+        int(project_pb2.ProjectAccess.ANYONE), page_data['initial_access'].key)
+
+    self.assertFalse(page_data['process_inbound_email'])
+    self.assertFalse(page_data['only_owners_remove_restrictions'])
+    self.assertFalse(page_data['only_owners_see_contributors'])
+    self.assertFalse(page_data['issue_notify_always_detailed'])
+
+    # Now try some alternate Project field values.
+    self.project.only_owners_remove_restrictions = True
+    self.project.only_owners_see_contributors = True
+    self.project.issue_notify_always_detailed = True
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertTrue(page_data['only_owners_remove_restrictions'])
+    self.assertTrue(page_data['only_owners_see_contributors'])
+    self.assertTrue(page_data['issue_notify_always_detailed'])
+
+    # TODO(jrobbins): many more tests needed.
diff --git a/project/test/projectadminadvanced_test.py b/project/test/projectadminadvanced_test.py
new file mode 100644
index 0000000..a654d98
--- /dev/null
+++ b/project/test/projectadminadvanced_test.py
@@ -0,0 +1,128 @@
+# 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
+
+"""Unit tests for projectadminadvanced module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+import unittest
+from mock import patch
+
+from framework import permissions
+from project import projectadminadvanced
+from proto import project_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+NOW = 1277762224
+
+
+class ProjectAdminAdvancedTest(unittest.TestCase):
+  """Unit tests for the ProjectAdminAdvanced servlet class."""
+
+  def setUp(self):
+    services = service_manager.Services(
+        project=fake.ProjectService())
+    self.servlet = projectadminadvanced.ProjectAdminAdvanced(
+        'req', 'res', services=services)
+    self.project = services.project.TestAddProject('proj', owner_ids=[111])
+    self.mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+
+  def testAssertBasePermission(self):
+    # Signed-out users cannot edit the project
+    self.mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, self.mr)
+
+    # Non-member users cannot edit the project
+    self.mr.perms = permissions.USER_PERMISSIONSET
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, self.mr)
+
+    # Contributors cannot edit the project
+    self.mr.perms = permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+
+    self.mr.perms = permissions.OWNER_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+
+  def testGatherPageData(self):
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(self.servlet.ADMIN_TAB_ADVANCED,
+                     page_data['admin_tab_mode'])
+
+  def testGatherPublishingOptions_Live(self):
+    pub_data = self.servlet._GatherPublishingOptions(self.mr)
+    self.assertTrue(pub_data['offer_archive'])
+    self.assertTrue(pub_data['offer_move'])
+    self.assertFalse(pub_data['offer_publish'])
+    self.assertFalse(pub_data['offer_delete'])
+    self.assertEqual('http://', pub_data['moved_to'])
+
+  def testGatherPublishingOptions_Moved(self):
+    self.project.moved_to = 'other location'
+    pub_data = self.servlet._GatherPublishingOptions(self.mr)
+    self.assertTrue(pub_data['offer_archive'])
+    self.assertTrue(pub_data['offer_move'])
+    self.assertFalse(pub_data['offer_publish'])
+    self.assertFalse(pub_data['offer_delete'])
+    self.assertEqual('other location', pub_data['moved_to'])
+
+  def testGatherPublishingOptions_Archived(self):
+    self.project.state = project_pb2.ProjectState.ARCHIVED
+    pub_data = self.servlet._GatherPublishingOptions(self.mr)
+    self.assertFalse(pub_data['offer_archive'])
+    self.assertFalse(pub_data['offer_move'])
+    self.assertTrue(pub_data['offer_publish'])
+    self.assertTrue(pub_data['offer_delete'])
+
+  def testGatherPublishingOptions_Doomed(self):
+    self.project.state = project_pb2.ProjectState.ARCHIVED
+    self.project.state_reason = 'you are a spammer'
+    pub_data = self.servlet._GatherPublishingOptions(self.mr)
+    self.assertFalse(pub_data['offer_archive'])
+    self.assertFalse(pub_data['offer_move'])
+    self.assertFalse(pub_data['offer_publish'])
+    self.assertTrue(pub_data['offer_delete'])
+
+  def testGatherQuotaData(self):
+    self.mr.perms = permissions.OWNER_ACTIVE_PERMISSIONSET
+    quota_data = self.servlet._GatherQuotaData(self.mr)
+    self.assertFalse(quota_data['offer_quota_editing'])
+
+    self.mr.perms = permissions.ADMIN_PERMISSIONSET
+    quota_data = self.servlet._GatherQuotaData(self.mr)
+    self.assertTrue(quota_data['offer_quota_editing'])
+
+  def testBuildComponentQuota(self):
+    ezt_item = self.servlet._BuildComponentQuota(
+        5000, 10000, 'attachments')
+    self.assertEqual(50, ezt_item.used_percent)
+    self.assertEqual('attachments', ezt_item.field_name)
+
+  @patch('time.time')
+  def testProcessFormData_NotDeleted(self, mock_time):
+    mock_time.return_value = NOW
+    self.mr.project_name = 'proj'
+    post_data = fake.PostData()
+    next_url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertEqual(
+        'http://127.0.0.1/p/proj/adminAdvanced?saved=1&ts=%s' % NOW,
+        next_url)
+
+  def testProcessFormData_AfterDeletion(self):
+    self.mr.project_name = 'proj'
+    self.project.state = project_pb2.ProjectState.ARCHIVED
+    post_data = fake.PostData(deletebtn='1')
+    next_url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertEqual('http://127.0.0.1/hosting_old/', next_url)
diff --git a/project/test/projectexport_test.py b/project/test/projectexport_test.py
new file mode 100644
index 0000000..6dbe990
--- /dev/null
+++ b/project/test/projectexport_test.py
@@ -0,0 +1,148 @@
+# 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
+
+"""Unittests for the projectexport servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from mock import Mock, patch
+
+from framework import permissions
+from project import projectexport
+from proto import tracker_pb2
+from services import service_manager
+from services.template_svc import TemplateService
+from testing import fake
+from testing import testing_helpers
+
+
+class ProjectExportTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services()
+    self.servlet = projectexport.ProjectExport(
+        'req', 'res', services=self.services)
+
+  def testAssertBasePermission(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+    mr.auth.user_pb.is_site_admin = True
+    self.servlet.AssertBasePermission(mr)
+
+
+class ProjectExportJSONTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        template=Mock(spec=TemplateService))
+    self.services.user.TestAddUser('user1@example.com', 111)
+    self.servlet = projectexport.ProjectExportJSON(
+        'req', 'res', services=self.services)
+    self.project = fake.Project(project_id=789)
+    self.mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.mr.auth.user_pb.is_site_admin = True
+    self.mr.project = self.project
+
+  @patch('time.time')
+  def testHandleRequest_Normal(self, mockTime):
+    mockTime.return_value = 123456789
+    self.services.project.GetProject = Mock(return_value=self.project)
+    test_config = fake.MakeTestConfig(project_id=789, labels=[], statuses=[])
+    self.services.config.GetProjectConfig = Mock(return_value=test_config)
+    test_templates = testing_helpers.DefaultTemplates()
+    self.services.template.GetProjectTemplates = Mock(
+        return_value=test_templates)
+    self.services.config.UsersInvolvedInConfig = Mock(return_value=[111])
+
+    json_data = self.servlet.HandleRequest(self.mr)
+
+    expected = {
+      'project': {
+        'committers': [],
+        'owners': [],
+        'recent_activity': 0,
+        'name': 'proj',
+        'contributors': [],
+        'perms': [],
+        'attachment_quota': None,
+        'process_inbound_email': False,
+        'revision_url_format': None,
+        'summary': '',
+        'access': 'ANYONE',
+        'state': 'LIVE',
+        'read_only_reason': None,
+        'only_owners_remove_restrictions': False,
+        'only_owners_see_contributors': False,
+        'attachment_bytes': 0,
+        'issue_notify_address': None,
+        'description': ''
+      },
+      'config': {
+        'templates': [{
+          'status': 'Accepted',
+          'members_only': True,
+          'labels': [],
+          'summary_must_be_edited': True,
+          'owner': None,
+          'owner_defaults_to_member': True,
+          'component_required': False,
+          'name': 'Defect report from developer',
+          'summary': 'Enter one-line summary',
+          'content': 'What steps will reproduce the problem?\n1. \n2. \n3. \n'
+            '\n'
+            'What is the expected output?\n\n\nWhat do you see instead?\n'
+            '\n\n'
+            'Please use labels and text to provide additional information.\n',
+          'admins': []
+        }, {
+          'status': 'New',
+          'members_only': False,
+          'labels': [],
+          'summary_must_be_edited': True,
+          'owner': None,
+          'owner_defaults_to_member': True,
+          'component_required': False,
+          'name': 'Defect report from user',
+          'summary': 'Enter one-line summary', 'content': 'What steps will '
+            'reproduce the problem?\n1. \n2. \n3. \n\nWhat is the expected '
+            'output?\n\n\nWhat do you see instead?\n\n\nWhat version of the '
+            'product are you using? On what operating system?\n\n\nPlease '
+            'provide any additional information below.\n',
+          'admins': []
+        }],
+        'labels': [],
+        'statuses_offer_merge': ['Duplicate'],
+        'exclusive_label_prefixes': ['Type', 'Priority', 'Milestone'],
+        'only_known_values': False,
+        'statuses': [],
+        'list_spec': '',
+        'developer_template': 0,
+        'user_template': 0,
+        'grid_y': '',
+        'grid_x': '',
+        'components': [],
+        'list_cols': 'ID Type Status Priority Milestone Owner Summary'
+      },
+      'emails': ['user1@example.com'],
+      'metadata': {
+        'version': 1,
+        'when': 123456789,
+        'who': None,
+      }
+    }
+    self.assertDictEqual(expected, json_data)
+    self.services.template.GetProjectTemplates.assert_called_once_with(
+        self.mr.cnxn, 789)
+    self.services.config.UsersInvolvedInConfig.assert_called_once_with(
+        test_config, test_templates)
diff --git a/project/test/projectsummary_test.py b/project/test/projectsummary_test.py
new file mode 100644
index 0000000..033664d
--- /dev/null
+++ b/project/test/projectsummary_test.py
@@ -0,0 +1,85 @@
+# 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
+
+"""Unittests for Project Summary servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import permissions
+from project import projectsummary
+from proto import project_pb2
+from proto import user_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class ProjectSummaryTest(unittest.TestCase):
+
+  def setUp(self):
+    services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project_star=fake.ProjectStarService())
+    self.project = services.project.TestAddProject(
+        'proj', project_id=123, summary='sum',
+        description='desc')
+    self.servlet = projectsummary.ProjectSummary(
+        'req', 'res', services=services)
+
+  def testGatherPageData(self):
+    mr = testing_helpers.MakeMonorailRequest(project=self.project)
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(
+        '<p>desc</p>', page_data['formatted_project_description'])
+    self.assertEqual(
+        int(project_pb2.ProjectAccess.ANYONE), page_data['access_level'].key)
+    self.assertEqual(0, page_data['num_stars'])
+    self.assertEqual('s', page_data['plural'])
+
+  def testGatherHelpData(self):
+    mr = testing_helpers.MakeMonorailRequest(project=self.project)
+
+    # Non-members cannot edit project, so cue is not relevant.
+    mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    help_data = self.servlet.GatherHelpData(mr, {})
+    self.assertEqual(None, help_data['cue'])
+
+    # Members (not owners) cannot edit project, so cue is not relevant.
+    mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    help_data = self.servlet.GatherHelpData(mr, {})
+    self.assertEqual(None, help_data['cue'])
+
+    # This is a project member who has set up mailing lists and added
+    # members, but has not noted any duties.
+    mr = testing_helpers.MakeMonorailRequest(project=self.project)
+    self.project.issue_notify_address = 'example@domain.com'
+    self.project.committer_ids.extend([111, 222])
+    help_data = self.servlet.GatherHelpData(mr, {})
+    self.assertEqual('document_team_duties', help_data['cue'])
+
+    # Now help set up notes too.
+    project_commitments = project_pb2.ProjectCommitments()
+    project_commitments.project_id = self.project.project_id
+    project_commitments.commitments.append(
+        project_pb2.ProjectCommitments.MemberCommitment())
+    self.servlet.services.project.TestStoreProjectCommitments(
+        project_commitments)
+    help_data = self.servlet.GatherHelpData(mr, {})
+    self.assertEqual(None, help_data['cue'])
+
+  def testGatherHelpData_Dismissed(self):
+    mr = testing_helpers.MakeMonorailRequest(project=self.project)
+    mr.auth.user_id = 111
+    self.project.committer_ids.extend([111, 222])
+    self.servlet.services.user.SetUserPrefs(
+        'cnxn', 111,
+        [user_pb2.UserPrefValue(name='document_team_duties', value='true')])
+    help_data = self.servlet.GatherHelpData(mr, {})
+    self.assertEqual(None, help_data['cue'])
diff --git a/project/test/projectupdates_test.py b/project/test/projectupdates_test.py
new file mode 100644
index 0000000..c2542e8
--- /dev/null
+++ b/project/test/projectupdates_test.py
@@ -0,0 +1,60 @@
+# 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
+
+"""Unittests for monorail.project.projectupdates."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mox
+
+from features import activities
+from project import projectupdates
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class ProjectUpdatesTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(project=fake.ProjectService())
+
+    self.project_name = 'proj'
+    self.project_id = 987
+    self.project = self.services.project.TestAddProject(
+        self.project_name, project_id=self.project_id,
+        process_inbound_email=True)
+
+    self.mr = testing_helpers.MakeMonorailRequest(
+        services=self.services, project=self.project)
+    self.mr.project_name = self.project_name
+    self.project_updates = projectupdates.ProjectUpdates(
+        None, None, self.services)
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testGatherPageData(self):
+    self.mox.StubOutWithMock(activities, 'GatherUpdatesData')
+    activities.GatherUpdatesData(
+        self.services, self.mr, project_ids=[self.project_id],
+        ending='by_user',
+        updates_page_url='/p/%s/updates/list' % self.project_name,
+        autolink=self.services.autolink).AndReturn({'test': 'testing'})
+    self.mox.ReplayAll()
+
+    page_data = self.project_updates.GatherPageData(self.mr)
+    self.mox.VerifyAll()
+    self.assertEqual(
+        {
+            'subtab_mode': None,
+            'user_updates_tab_mode': None,
+            'test': 'testing'
+        }, page_data)
diff --git a/project/test/redirects_test.py b/project/test/redirects_test.py
new file mode 100644
index 0000000..2f51495
--- /dev/null
+++ b/project/test/redirects_test.py
@@ -0,0 +1,90 @@
+# 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
+
+"""Tests for project handlers that redirect."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import httplib
+import unittest
+
+import webapp2
+
+from framework import urls
+from project import redirects
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class WikiRedirectTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services()
+    self.servlet = redirects.WikiRedirect(
+        webapp2.Request.blank('url'), webapp2.Response(),
+        services=self.services)
+    self.project = fake.Project()
+    self.servlet.mr = testing_helpers.MakeMonorailRequest(
+        project=self.project)
+
+  def testRedirect_NoSuchProject(self):
+    """Visiting a project that we don't host is 404."""
+    self.servlet.mr.project = None
+    self.servlet.get()
+    self.assertEqual(
+        httplib.NOT_FOUND, self.servlet.response.status_code)
+
+  def testRedirect_NoDocsSpecified(self):
+    """Visiting any old wiki URL goes to admin intro by default."""
+    self.servlet.get()
+    self.assertEqual(
+        httplib.MOVED_PERMANENTLY, self.servlet.response.status_code)
+    self.assertTrue(
+        self.servlet.response.location.endswith(urls.ADMIN_INTRO))
+
+  def testRedirect_DocsSpecified(self):
+    """Visiting any old wiki URL goes to project docs URL."""
+    self.project.docs_url = 'some_url'
+    self.servlet.get()
+    self.assertEqual(
+        httplib.MOVED_PERMANENTLY, self.servlet.response.status_code)
+    self.assertEqual('some_url', self.servlet.response.location)
+
+
+class SourceRedirectTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services()
+    self.servlet = redirects.SourceRedirect(
+        webapp2.Request.blank('url'), webapp2.Response(),
+        services=self.services)
+    self.project = fake.Project()
+    self.servlet.mr = testing_helpers.MakeMonorailRequest(
+        project=self.project)
+
+  def testRedirect_NoSuchProject(self):
+    """Visiting a project that we don't host is 404."""
+    self.servlet.mr.project = None
+    self.servlet.get()
+    self.assertEqual(
+        httplib.NOT_FOUND, self.servlet.response.status_code)
+
+  def testRedirect_NoSrcSpecified(self):
+    """Visiting any old source code URL goes to admin intro by default."""
+    self.servlet.get()
+    self.assertEqual(
+        httplib.MOVED_PERMANENTLY, self.servlet.response.status_code)
+    self.assertTrue(
+        self.servlet.response.location.endswith(urls.ADMIN_INTRO))
+
+  def testRedirect_SrcSpecified(self):
+    """Visiting any old source code URL goes to project source URL."""
+    self.project.source_url = 'some_url'
+    self.servlet.get()
+    self.assertEqual(
+        httplib.MOVED_PERMANENTLY, self.servlet.response.status_code)
+    self.assertEqual('some_url', self.servlet.response.location)
diff --git a/proto/__init__.py b/proto/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/proto/__init__.py
@@ -0,0 +1 @@
+
diff --git a/proto/api_clients_config.proto b/proto/api_clients_config.proto
new file mode 100644
index 0000000..d17d704
--- /dev/null
+++ b/proto/api_clients_config.proto
@@ -0,0 +1,41 @@
+// Copyright 2016 The Chromium Authors. All Rights Reserved.
+// Use of this source code is governed by the Apache v2.0 license that can be
+// found in the LICENSE file.
+
+// Schemas for monorail api client configs.
+// Command to generate api_clients_config_pb2.py: in monorail/ directory:
+// protoc ./proto/api_clients_config.proto --proto_path=./proto/ --python_out=./proto
+
+
+syntax = "proto2";
+
+package monorail;
+
+message ProjectPermission {
+  enum Role {
+    committer = 1;
+    contributor = 2;
+  }
+
+  optional string project = 1;
+  optional Role role = 2 [default = contributor];
+  repeated string extra_permissions = 3;
+}
+
+// Next available tag: 11
+message Client {
+  optional string client_email = 1;
+  optional string display_name = 2;
+  optional string client_id = 3;
+  repeated string allowed_origins = 10;
+  optional string description = 4;
+  repeated ProjectPermission project_permissions = 5;
+  optional int32 period_limit = 6 [default = 100000];
+  optional int32 lifetime_limit = 7 [default = 1000000];
+  repeated string contacts = 8;
+  optional int32 qpm_limit = 9 [default = 100];
+}
+
+message ClientCfg {
+  repeated Client clients = 1;
+}
diff --git a/proto/api_clients_config_pb2.py b/proto/api_clients_config_pb2.py
new file mode 100644
index 0000000..54aabb4
--- /dev/null
+++ b/proto/api_clients_config_pb2.py
@@ -0,0 +1,257 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: api_clients_config.proto
+
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='api_clients_config.proto',
+  package='monorail',
+  syntax='proto2',
+  serialized_options=None,
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n\x18\x61pi_clients_config.proto\x12\x08monorail\"\xa4\x01\n\x11ProjectPermission\x12\x0f\n\x07project\x18\x01 \x01(\t\x12;\n\x04role\x18\x02 \x01(\x0e\x32 .monorail.ProjectPermission.Role:\x0b\x63ontributor\x12\x19\n\x11\x65xtra_permissions\x18\x03 \x03(\t\"&\n\x04Role\x12\r\n\tcommitter\x10\x01\x12\x0f\n\x0b\x63ontributor\x10\x02\"\x98\x02\n\x06\x43lient\x12\x14\n\x0c\x63lient_email\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x11\n\tclient_id\x18\x03 \x01(\t\x12\x17\n\x0f\x61llowed_origins\x18\n \x03(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x38\n\x13project_permissions\x18\x05 \x03(\x0b\x32\x1b.monorail.ProjectPermission\x12\x1c\n\x0cperiod_limit\x18\x06 \x01(\x05:\x06\x31\x30\x30\x30\x30\x30\x12\x1f\n\x0elifetime_limit\x18\x07 \x01(\x05:\x07\x31\x30\x30\x30\x30\x30\x30\x12\x10\n\x08\x63ontacts\x18\x08 \x03(\t\x12\x16\n\tqpm_limit\x18\t \x01(\x05:\x03\x31\x30\x30\".\n\tClientCfg\x12!\n\x07\x63lients\x18\x01 \x03(\x0b\x32\x10.monorail.Client'
+)
+
+
+
+_PROJECTPERMISSION_ROLE = _descriptor.EnumDescriptor(
+  name='Role',
+  full_name='monorail.ProjectPermission.Role',
+  filename=None,
+  file=DESCRIPTOR,
+  create_key=_descriptor._internal_create_key,
+  values=[
+    _descriptor.EnumValueDescriptor(
+      name='committer', index=0, number=1,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+    _descriptor.EnumValueDescriptor(
+      name='contributor', index=1, number=2,
+      serialized_options=None,
+      type=None,
+      create_key=_descriptor._internal_create_key),
+  ],
+  containing_type=None,
+  serialized_options=None,
+  serialized_start=165,
+  serialized_end=203,
+)
+_sym_db.RegisterEnumDescriptor(_PROJECTPERMISSION_ROLE)
+
+
+_PROJECTPERMISSION = _descriptor.Descriptor(
+  name='ProjectPermission',
+  full_name='monorail.ProjectPermission',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='project', full_name='monorail.ProjectPermission.project', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='role', full_name='monorail.ProjectPermission.role', index=1,
+      number=2, type=14, cpp_type=8, label=1,
+      has_default_value=True, default_value=2,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='extra_permissions', full_name='monorail.ProjectPermission.extra_permissions', index=2,
+      number=3, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+    _PROJECTPERMISSION_ROLE,
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=39,
+  serialized_end=203,
+)
+
+
+_CLIENT = _descriptor.Descriptor(
+  name='Client',
+  full_name='monorail.Client',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='client_email', full_name='monorail.Client.client_email', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='display_name', full_name='monorail.Client.display_name', index=1,
+      number=2, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='client_id', full_name='monorail.Client.client_id', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='allowed_origins', full_name='monorail.Client.allowed_origins', index=3,
+      number=10, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='description', full_name='monorail.Client.description', index=4,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='project_permissions', full_name='monorail.Client.project_permissions', index=5,
+      number=5, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='period_limit', full_name='monorail.Client.period_limit', index=6,
+      number=6, type=5, cpp_type=1, label=1,
+      has_default_value=True, default_value=100000,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='lifetime_limit', full_name='monorail.Client.lifetime_limit', index=7,
+      number=7, type=5, cpp_type=1, label=1,
+      has_default_value=True, default_value=1000000,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='contacts', full_name='monorail.Client.contacts', index=8,
+      number=8, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='qpm_limit', full_name='monorail.Client.qpm_limit', index=9,
+      number=9, type=5, cpp_type=1, label=1,
+      has_default_value=True, default_value=100,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=206,
+  serialized_end=486,
+)
+
+
+_CLIENTCFG = _descriptor.Descriptor(
+  name='ClientCfg',
+  full_name='monorail.ClientCfg',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='clients', full_name='monorail.ClientCfg.clients', index=0,
+      number=1, type=11, cpp_type=10, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto2',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=488,
+  serialized_end=534,
+)
+
+_PROJECTPERMISSION.fields_by_name['role'].enum_type = _PROJECTPERMISSION_ROLE
+_PROJECTPERMISSION_ROLE.containing_type = _PROJECTPERMISSION
+_CLIENT.fields_by_name['project_permissions'].message_type = _PROJECTPERMISSION
+_CLIENTCFG.fields_by_name['clients'].message_type = _CLIENT
+DESCRIPTOR.message_types_by_name['ProjectPermission'] = _PROJECTPERMISSION
+DESCRIPTOR.message_types_by_name['Client'] = _CLIENT
+DESCRIPTOR.message_types_by_name['ClientCfg'] = _CLIENTCFG
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+ProjectPermission = _reflection.GeneratedProtocolMessageType('ProjectPermission', (_message.Message,), {
+  'DESCRIPTOR' : _PROJECTPERMISSION,
+  '__module__' : 'api_clients_config_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ProjectPermission)
+  })
+_sym_db.RegisterMessage(ProjectPermission)
+
+Client = _reflection.GeneratedProtocolMessageType('Client', (_message.Message,), {
+  'DESCRIPTOR' : _CLIENT,
+  '__module__' : 'api_clients_config_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.Client)
+  })
+_sym_db.RegisterMessage(Client)
+
+ClientCfg = _reflection.GeneratedProtocolMessageType('ClientCfg', (_message.Message,), {
+  'DESCRIPTOR' : _CLIENTCFG,
+  '__module__' : 'api_clients_config_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.ClientCfg)
+  })
+_sym_db.RegisterMessage(ClientCfg)
+
+
+# @@protoc_insertion_point(module_scope)
diff --git a/proto/api_pb2_v1.py b/proto/api_pb2_v1.py
new file mode 100644
index 0000000..1135320
--- /dev/null
+++ b/proto/api_pb2_v1.py
@@ -0,0 +1,651 @@
+# 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
+
+"""Protocol buffers for Monorail API."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from endpoints import ResourceContainer
+from protorpc import messages
+from protorpc import message_types
+
+from proto import usergroup_pb2
+
+
+########################## Helper Message ##########################
+
+
+class ErrorMessage(messages.Message):
+  """Request error."""
+  code = messages.IntegerField(
+      1, required=True, variant=messages.Variant.INT32)
+  reason = messages.StringField(2, required=True)
+  message = messages.StringField(3, required=True)
+
+
+class Status(messages.Message):
+  """Issue status."""
+  status = messages.StringField(1, required=True)
+  meansOpen = messages.BooleanField(2, required=True)
+  description = messages.StringField(3)
+
+
+class Label(messages.Message):
+  """Issue label."""
+  label = messages.StringField(1, required=True)
+  description = messages.StringField(2)
+
+
+class Prompt(messages.Message):
+  """Default issue template values."""
+  name = messages.StringField(1, required=True)
+  title = messages.StringField(2)
+  description = messages.StringField(3)
+  titleMustBeEdited = messages.BooleanField(4)
+  status = messages.StringField(5)
+  labels = messages.StringField(6, repeated=True)
+  membersOnly = messages.BooleanField(7)
+  defaultToMember = messages.BooleanField(8)
+  componentRequired = messages.BooleanField(9)
+
+
+class Role(messages.Enum):
+  """User role."""
+  owner = 1
+  member = 2
+  contributor = 3
+
+
+class IssueState(messages.Enum):
+  """Issue state."""
+  closed = 0
+  open = 1
+
+
+class CannedQuery(messages.Enum):
+  """Canned query to search issues."""
+  all = 0
+  new = 1
+  open = 2
+  owned = 3
+  reported = 4
+  starred = 5
+  to_verify = 6
+
+
+class AtomPerson(messages.Message):
+  """Atomic person."""
+  name = messages.StringField(1, required=True)
+  htmlLink = messages.StringField(2)
+  kind = messages.StringField(3)
+  last_visit_days_ago = messages.IntegerField(4)
+  email_bouncing = messages.BooleanField(5)
+  vacation_message = messages.StringField(6)
+
+
+class Attachment(messages.Message):
+  """Issue attachment."""
+  attachmentId = messages.IntegerField(
+      1, variant=messages.Variant.INT64, required=True)
+  fileName = messages.StringField(2, required=True)
+  fileSize = messages.IntegerField(
+      3, required=True, variant=messages.Variant.INT32)
+  mimetype = messages.StringField(4, required=True)
+  isDeleted = messages.BooleanField(5)
+
+
+class IssueRef(messages.Message):
+  "Issue reference."
+  issueId = messages.IntegerField(
+      1, required=True, variant=messages.Variant.INT32)
+  projectId = messages.StringField(2)
+  kind = messages.StringField(3)
+
+
+class FieldValueOperator(messages.Enum):
+  """Operator of field values."""
+  add = 1
+  remove = 2
+  clear = 3
+
+
+class FieldValue(messages.Message):
+  """Custom field values."""
+  fieldName = messages.StringField(1, required=True)
+  fieldValue = messages.StringField(2)
+  derived = messages.BooleanField(3, default=False)
+  operator = messages.EnumField(FieldValueOperator, 4, default='add')
+  phaseName = messages.StringField(5)
+  approvalName = messages.StringField(6)
+
+
+class Update(messages.Message):
+  """Issue update."""
+  summary = messages.StringField(1)
+  status = messages.StringField(2)
+  owner = messages.StringField(3)
+  labels = messages.StringField(4, repeated=True)
+  cc = messages.StringField(5, repeated=True)
+  blockedOn = messages.StringField(6, repeated=True)
+  blocking = messages.StringField(7, repeated=True)
+  mergedInto = messages.StringField(8)
+  kind = messages.StringField(9)
+  components = messages.StringField(10, repeated=True)
+  moveToProject = messages.StringField(11)
+  fieldValues = messages.MessageField(FieldValue, 12, repeated=True)
+  is_description = messages.BooleanField(13)
+
+
+class ApprovalUpdate(messages.Message):
+  """Approval update."""
+  approvers = messages.StringField(1, repeated=True)
+  status = messages.StringField(2)
+  kind = messages.StringField(3)
+  fieldValues = messages.MessageField(FieldValue, 4, repeated=True)
+
+
+class ProjectIssueConfig(messages.Message):
+  """Issue configuration of project."""
+  kind = messages.StringField(1)
+  restrictToKnown = messages.BooleanField(2)
+  defaultColumns = messages.StringField(3, repeated=True)
+  defaultSorting = messages.StringField(4, repeated=True)
+  statuses = messages.MessageField(Status, 5, repeated=True)
+  labels = messages.MessageField(Label, 6, repeated=True)
+  prompts = messages.MessageField(Prompt, 7, repeated=True)
+  defaultPromptForMembers = messages.IntegerField(
+      8, variant=messages.Variant.INT32)
+  defaultPromptForNonMembers = messages.IntegerField(
+      9, variant=messages.Variant.INT32)
+  usersCanSetLabels = messages.BooleanField(10)
+
+
+class Phase(messages.Message):
+  """Issue phase details."""
+  phaseName = messages.StringField(1)
+  rank = messages.IntegerField(2)
+
+
+class IssueCommentWrapper(messages.Message):
+  """Issue comment details."""
+  attachments = messages.MessageField(Attachment, 1, repeated=True)
+  author = messages.MessageField(AtomPerson, 2)
+  canDelete = messages.BooleanField(3)
+  content = messages.StringField(4)
+  deletedBy = messages.MessageField(AtomPerson, 5)
+  id = messages.IntegerField(6, variant=messages.Variant.INT32)
+  published = message_types.DateTimeField(7)
+  updates = messages.MessageField(Update, 8)
+  kind = messages.StringField(9)
+  is_description = messages.BooleanField(10)
+
+
+class ApprovalCommentWrapper(messages.Message):
+  """Approval comment details."""
+  attachments = messages.MessageField(Attachment, 1, repeated=True)
+  author = messages.MessageField(AtomPerson, 2)
+  canDelete = messages.BooleanField(3)
+  content = messages.StringField(4)
+  deletedBy = messages.MessageField(AtomPerson, 5)
+  id = messages.IntegerField(6, variant=messages.Variant.INT32)
+  published = message_types.DateTimeField(7)
+  approvalUpdates = messages.MessageField(ApprovalUpdate, 8)
+  kind = messages.StringField(9)
+  is_description = messages.BooleanField(10)
+
+
+class ApprovalStatus(messages.Enum):
+  """Allowed Approval Statuses."""
+  needsReview = 1
+  nA = 2
+  reviewRequested = 3
+  reviewStarted = 4
+  needInfo = 5
+  approved = 6
+  notApproved = 7
+  notSet = 8
+
+
+class Approval(messages.Message):
+  """Approval Value details"""
+  approvalName = messages.StringField(1)
+  approvers = messages.MessageField(AtomPerson, 2, repeated=True)
+  status = messages.EnumField(ApprovalStatus, 3)
+  setter = messages.MessageField(AtomPerson, 4)
+  setOn = message_types.DateTimeField(5)
+  phaseName = messages.StringField(6)
+
+
+class IssueWrapper(messages.Message):
+  """Issue details."""
+  author = messages.MessageField(AtomPerson, 1)
+  blockedOn = messages.MessageField(IssueRef, 2, repeated=True)
+  blocking = messages.MessageField(IssueRef, 3, repeated=True)
+  canComment = messages.BooleanField(4)
+  canEdit = messages.BooleanField(5)
+  cc = messages.MessageField(AtomPerson, 6, repeated=True)
+  closed = message_types.DateTimeField(7)
+  description = messages.StringField(8)
+  id = messages.IntegerField(9, variant=messages.Variant.INT32)
+  kind = messages.StringField(10)
+  labels = messages.StringField(11, repeated=True)
+  owner = messages.MessageField(AtomPerson, 12)
+  published = message_types.DateTimeField(13)
+  starred = messages.BooleanField(14)
+  stars = messages.IntegerField(15, variant=messages.Variant.INT32)
+  state = messages.EnumField(IssueState, 16)
+  status = messages.StringField(17, required=True)
+  summary = messages.StringField(18, required=True)
+  title = messages.StringField(19)
+  updated = message_types.DateTimeField(20)
+  components = messages.StringField(21, repeated=True)
+  projectId = messages.StringField(22, required=True)
+  mergedInto = messages.MessageField(IssueRef, 23)
+  fieldValues = messages.MessageField(FieldValue, 24, repeated=True)
+  owner_modified = message_types.DateTimeField(25)
+  status_modified = message_types.DateTimeField(26)
+  component_modified = message_types.DateTimeField(27)
+  approvalValues = messages.MessageField(Approval, 28, repeated=True)
+  phases = messages.MessageField(Phase, 29, repeated=True)
+
+
+class ProjectWrapper(messages.Message):
+  """Project details."""
+  kind = messages.StringField(1)
+  name = messages.StringField(2)
+  externalId = messages.StringField(3, required=True)
+  htmlLink = messages.StringField(4, required=True)
+  summary = messages.StringField(5)
+  description = messages.StringField(6)
+  versionControlSystem = messages.StringField(7)
+  repositoryUrls = messages.StringField(8, repeated=True)
+  issuesConfig = messages.MessageField(ProjectIssueConfig, 9)
+  role = messages.EnumField(Role, 10)
+  members = messages.MessageField(AtomPerson, 11, repeated=True)
+
+
+class UserGroupSettingsWrapper(messages.Message):
+  """User group settings."""
+  groupName = messages.StringField(1, required=True)
+  who_can_view_members = messages.EnumField(
+      usergroup_pb2.MemberVisibility, 2,
+      default=usergroup_pb2.MemberVisibility.MEMBERS)
+  ext_group_type = messages.EnumField(usergroup_pb2.GroupType, 3)
+  last_sync_time = messages.IntegerField(
+      4, default=0, variant=messages.Variant.INT32)
+
+
+class GroupCitizens(messages.Message):
+  """Group members and owners."""
+  groupOwners = messages.StringField(1, repeated=True)
+  groupMembers = messages.StringField(2, repeated=True)
+
+
+########################## Comments Message ##########################
+
+# pylint: disable=pointless-string-statement
+
+"""Request to delete/undelete an issue's comments."""
+ISSUES_COMMENTS_DELETE_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    message_types.VoidMessage,
+    projectId=messages.StringField(1, required=True),
+    issueId=messages.IntegerField(
+        2, required=True, variant=messages.Variant.INT32),
+    commentId=messages.IntegerField(
+        3, required=True, variant=messages.Variant.INT32)
+)
+
+
+class IssuesCommentsDeleteResponse(messages.Message):
+  """Response message of request to delete/undelete an issue's comments."""
+  error = messages.MessageField(ErrorMessage, 1)
+
+
+"""Request to insert an issue's comments."""
+ISSUES_COMMENTS_INSERT_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    IssueCommentWrapper,
+    projectId=messages.StringField(1, required=True),
+    issueId=messages.IntegerField(
+        2, required=True, variant=messages.Variant.INT32),
+    sendEmail=messages.BooleanField(3)
+)
+
+
+class IssuesCommentsInsertResponse(messages.Message):
+  """Response message of request to insert an issue's comments."""
+  error = messages.MessageField(ErrorMessage, 1)
+  id = messages.IntegerField(2, variant=messages.Variant.INT32)
+  kind = messages.StringField(3)
+  author = messages.MessageField(AtomPerson, 4)
+  content = messages.StringField(5)
+  published = message_types.DateTimeField(6)
+  updates = messages.MessageField(Update, 7)
+  canDelete = messages.BooleanField(8)
+
+
+"""Request to list an issue's comments."""
+ISSUES_COMMENTS_LIST_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    message_types.VoidMessage,
+    projectId=messages.StringField(1, required=True),
+    issueId=messages.IntegerField(
+        2, required=True, variant=messages.Variant.INT32),
+    maxResults=messages.IntegerField(
+        3, default=100, variant=messages.Variant.INT32),
+    startIndex=messages.IntegerField(
+        4, default=0, variant=messages.Variant.INT32)
+)
+
+
+class IssuesCommentsListResponse(messages.Message):
+  """Response message of request to list an issue's comments."""
+  error = messages.MessageField(ErrorMessage, 1)
+  items = messages.MessageField(IssueCommentWrapper, 2, repeated=True)
+  totalResults = messages.IntegerField(3, variant=messages.Variant.INT32)
+  kind = messages.StringField(4)
+
+########################## ApprovalComments Message ################
+
+"""Request to insert an issue approval's comments."""
+APPROVALS_COMMENTS_INSERT_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    ApprovalCommentWrapper,
+    projectId=messages.StringField(1, required=True),
+    issueId=messages.IntegerField(
+        2, required=True, variant=messages.Variant.INT32),
+    approvalName=messages.StringField(3, required=True),
+    sendEmail=messages.BooleanField(4)
+)
+
+
+class ApprovalsCommentsInsertResponse(messages.Message):
+  """Response message of request to insert an isuse's comments."""
+  error = messages.MessageField(ErrorMessage, 1)
+  id = messages.IntegerField(2, variant=messages.Variant.INT32)
+  kind = messages.StringField(3)
+  author = messages.MessageField(AtomPerson, 4)
+  content = messages.StringField(5)
+  published = message_types.DateTimeField(6)
+  approvalUpdates = messages.MessageField(ApprovalUpdate, 7)
+  canDelete = messages.BooleanField(8)
+  approvalName = messages.StringField(9)
+
+
+"""Requests to list an approval's comments."""
+APPROVALS_COMMENTS_LIST_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    message_types.VoidMessage,
+    projectId=messages.StringField(1, required=True),
+    issueId=messages.IntegerField(
+        2, required=True, variant=messages.Variant.INT32),
+    approvalName=messages.StringField(3, required=True),
+    maxResults=messages.IntegerField(
+        4, default=100, variant=messages.Variant.INT32),
+    startIndex=messages.IntegerField(
+        5, default=0, variant=messages.Variant.INT32)
+)
+
+
+class ApprovalsCommentsListResponse(messages.Message):
+  """Response message of request to list an approval's comments."""
+  error = messages.MessageField(ErrorMessage, 1)
+  items = messages.MessageField(ApprovalCommentWrapper, 2, repeated=True)
+  totalResults = messages.IntegerField(3, variant=messages.Variant.INT32)
+  kind = messages.StringField(4)
+
+########################## Users Message ##########################
+
+"""Request to get a user."""
+USERS_GET_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    message_types.VoidMessage,
+    userId=messages.StringField(1, required=True),
+    ownerProjectsOnly=messages.BooleanField(2, default=False)
+)
+
+
+class UsersGetResponse(messages.Message):
+  """Response message of request to get a user."""
+  error = messages.MessageField(ErrorMessage, 1)
+  id = messages.StringField(2)
+  kind = messages.StringField(3)
+  projects = messages.MessageField(ProjectWrapper, 4, repeated=True)
+
+
+########################## Issues Message ##########################
+
+"""Request to get an issue."""
+ISSUES_GET_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    message_types.VoidMessage,
+    projectId=messages.StringField(1, required=True),
+    issueId=messages.IntegerField(
+        2, required=True, variant=messages.Variant.INT32)
+)
+
+
+"""Request to insert an issue."""
+ISSUES_INSERT_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    IssueWrapper,
+    projectId=messages.StringField(1, required=True),
+    sendEmail=messages.BooleanField(2, default=True)
+)
+
+
+class IssuesGetInsertResponse(messages.Message):
+  """Response message of request to get/insert an issue."""
+  error = messages.MessageField(ErrorMessage, 1)
+  kind = messages.StringField(2)
+  id = messages.IntegerField(3, variant=messages.Variant.INT32)
+  title = messages.StringField(4)
+  summary = messages.StringField(5)
+  stars = messages.IntegerField(6, variant=messages.Variant.INT32)
+  starred = messages.BooleanField(7)
+  status = messages.StringField(8)
+  state = messages.EnumField(IssueState, 9)
+  labels = messages.StringField(10, repeated=True)
+  author = messages.MessageField(AtomPerson, 11)
+  owner = messages.MessageField(AtomPerson, 12)
+  cc = messages.MessageField(AtomPerson, 13, repeated=True)
+  updated = message_types.DateTimeField(14)
+  published = message_types.DateTimeField(15)
+  closed = message_types.DateTimeField(16)
+  blockedOn = messages.MessageField(IssueRef, 17, repeated=True)
+  blocking = messages.MessageField(IssueRef, 18, repeated=True)
+  projectId = messages.StringField(19)
+  canComment = messages.BooleanField(20)
+  canEdit = messages.BooleanField(21)
+  components = messages.StringField(22, repeated=True)
+  mergedInto = messages.MessageField(IssueRef, 23)
+  fieldValues = messages.MessageField(FieldValue, 24, repeated=True)
+  owner_modified = message_types.DateTimeField(25)
+  status_modified = message_types.DateTimeField(26)
+  component_modified = message_types.DateTimeField(27)
+  approvalValues = messages.MessageField(Approval, 28, repeated=True)
+  phases = messages.MessageField(Phase, 29, repeated=True)
+
+
+"""Request to list issues."""
+ISSUES_LIST_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    message_types.VoidMessage,
+    projectId=messages.StringField(1, required=True),
+    additionalProject=messages.StringField(2, repeated=True),
+    can=messages.EnumField(CannedQuery, 3, default='all'),
+    label=messages.StringField(4),
+    maxResults=messages.IntegerField(
+        5, default=100, variant=messages.Variant.INT32),
+    owner=messages.StringField(6),
+    publishedMax=messages.IntegerField(7, variant=messages.Variant.INT64),
+    publishedMin=messages.IntegerField(8, variant=messages.Variant.INT64),
+    q=messages.StringField(9),
+    sort=messages.StringField(10),
+    startIndex=messages.IntegerField(
+        11, default=0, variant=messages.Variant.INT32),
+    status=messages.StringField(12),
+    updatedMax=messages.IntegerField(13, variant=messages.Variant.INT64),
+    updatedMin=messages.IntegerField(14, variant=messages.Variant.INT64)
+)
+
+
+class IssuesListResponse(messages.Message):
+  """Response message of request to list issues."""
+  error = messages.MessageField(ErrorMessage, 1)
+  items = messages.MessageField(IssueWrapper, 2, repeated=True)
+  totalResults = messages.IntegerField(3, variant=messages.Variant.INT32)
+  kind = messages.StringField(4)
+
+
+"""Request to list group settings."""
+GROUPS_SETTINGS_LIST_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    message_types.VoidMessage,
+    importedGroupsOnly=messages.BooleanField(1, default=False)
+)
+
+
+class GroupsSettingsListResponse(messages.Message):
+  """Response message of request to list group settings."""
+  error = messages.MessageField(ErrorMessage, 1)
+  groupSettings = messages.MessageField(
+      UserGroupSettingsWrapper, 2, repeated=True)
+
+
+"""Request to create a group."""
+GROUPS_CREATE_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    message_types.VoidMessage,
+    groupName = messages.StringField(1, required=True),
+    who_can_view_members = messages.EnumField(
+        usergroup_pb2.MemberVisibility, 2,
+        default=usergroup_pb2.MemberVisibility.MEMBERS, required=True),
+    ext_group_type = messages.EnumField(usergroup_pb2.GroupType, 3)
+)
+
+
+class GroupsCreateResponse(messages.Message):
+  """Response message of request to create a group."""
+  error = messages.MessageField(ErrorMessage, 1)
+  groupID = messages.IntegerField(
+      2, variant=messages.Variant.INT32)
+
+
+"""Request to get a group."""
+GROUPS_GET_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    message_types.VoidMessage,
+    groupName = messages.StringField(1, required=True)
+)
+
+
+class GroupsGetResponse(messages.Message):
+  """Response message of request to create a group."""
+  error = messages.MessageField(ErrorMessage, 1)
+  groupID = messages.IntegerField(
+      2, variant=messages.Variant.INT32)
+  groupSettings = messages.MessageField(
+      UserGroupSettingsWrapper, 3)
+  groupOwners = messages.StringField(4, repeated=True)
+  groupMembers = messages.StringField(5, repeated=True)
+
+
+"""Request to update a group."""
+GROUPS_UPDATE_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    GroupCitizens,
+    groupName = messages.StringField(1, required=True),
+    who_can_view_members = messages.EnumField(
+        usergroup_pb2.MemberVisibility, 2),
+    ext_group_type = messages.EnumField(usergroup_pb2.GroupType, 3),
+    last_sync_time = messages.IntegerField(
+        4, default=0, variant=messages.Variant.INT32),
+    friend_projects = messages.StringField(5, repeated=True),
+)
+
+
+class GroupsUpdateResponse(messages.Message):
+  """Response message of request to update a group."""
+  error = messages.MessageField(ErrorMessage, 1)
+
+
+########################## Component Message ##########################
+
+class Component(messages.Message):
+  """Component PB."""
+  componentId = messages.IntegerField(
+      1, required=True, variant=messages.Variant.INT32)
+  projectName = messages.StringField(2, required=True)
+  componentPath = messages.StringField(3, required=True)
+  description = messages.StringField(4)
+  admin = messages.StringField(5, repeated=True)
+  cc = messages.StringField(6, repeated=True)
+  deprecated = messages.BooleanField(7, default=False)
+  created = message_types.DateTimeField(8)
+  creator = messages.StringField(9)
+  modified = message_types.DateTimeField(10)
+  modifier = messages.StringField(11)
+
+
+"""Request to get components of a project."""
+COMPONENTS_LIST_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    message_types.VoidMessage,
+    projectId=messages.StringField(1, required=True),
+)
+
+
+class ComponentsListResponse(messages.Message):
+  """Response to list components."""
+  components = messages.MessageField(
+      Component, 1, repeated=True)
+
+
+class ComponentCreateRequestBody(messages.Message):
+  """Request body to create a component."""
+  parentPath = messages.StringField(1)
+  description = messages.StringField(2)
+  admin = messages.StringField(3, repeated=True)
+  cc = messages.StringField(4, repeated=True)
+  deprecated = messages.BooleanField(5, default=False)
+
+
+"""Request to create component of a project."""
+COMPONENTS_CREATE_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    ComponentCreateRequestBody,
+    projectId=messages.StringField(1, required=True),
+    componentName=messages.StringField(2, required=True),
+)
+
+
+"""Request to delete a component."""
+COMPONENTS_DELETE_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    message_types.VoidMessage,
+    projectId=messages.StringField(1, required=True),
+    componentPath=messages.StringField(2, required=True),
+)
+
+
+class ComponentUpdateFieldID(messages.Enum):
+  """Possible fields that can be updated in a component."""
+  LEAF_NAME = 1
+  DESCRIPTION = 2
+  ADMIN = 3
+  CC = 4
+  DEPRECATED = 5
+
+
+class ComponentUpdate(messages.Message):
+  """Component update."""
+  # 'field' allows a field to be cleared
+  field = messages.EnumField(ComponentUpdateFieldID, 1, required=True)
+  leafName = messages.StringField(2)
+  description = messages.StringField(3)
+  admin = messages.StringField(4, repeated=True)
+  cc = messages.StringField(5, repeated=True)
+  deprecated = messages.BooleanField(6)
+
+
+class ComponentUpdateRequestBody(messages.Message):
+  """Request body to update a component."""
+  updates = messages.MessageField(ComponentUpdate, 1, repeated=True)
+
+
+"""Request to update a component."""
+COMPONENTS_UPDATE_REQUEST_RESOURCE_CONTAINER = ResourceContainer(
+    ComponentUpdateRequestBody,
+    projectId=messages.StringField(1, required=True),
+    componentPath=messages.StringField(2, required=True),
+)
diff --git a/proto/ast_pb2.py b/proto/ast_pb2.py
new file mode 100644
index 0000000..2b77ca9
--- /dev/null
+++ b/proto/ast_pb2.py
@@ -0,0 +1,111 @@
+# 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
+
+"""Protocol buffers for user queries parsed into abstract syntax trees.
+
+A user issue query can look like [Type=Defect owner:jrobbins "memory leak"].
+In that simple form, all the individual search conditions are simply ANDed
+together.  In the code, a list of conditions to be ANDed is called a
+conjunction.
+
+Monorail also supports a quick-or feature: [Type=Defect,Enhancement].  That
+will match any issue that has labels Type-Defect or Type-Enhancement, or both.
+
+Monorail supports a top-level "OR" keyword that can
+be used to logically OR a series of conjunctions.  For example:
+[Type=Defect stars>10 OR Type=Enhancement stars>50].
+
+Parentheses groups and "OR" statements are preprocessed before the final
+QueryAST is constructed.
+
+So, QueryAST is always exactly two levels:  the overall tree
+consists of a list of conjunctions, and each conjunction consists of a list
+of conditions.
+
+A condition can look like [stars>10] or [summary:memory] or
+[Type=Defect,Enhancement].  Each condition has a single comparison operator.
+Most conditions refer to a single field definition, but in the case of
+cross-project search a single condition can have a list of field definitions
+from the different projects being searched.  Each condition can have a list
+of constant values to compare against.  The values may be all strings or all
+integers.
+
+Some conditions are procesed by the SQL database and others by the GAE
+search API.  All conditions are passed to each module and it is up to
+the module to decide which conditions to handle and which to ignore.
+"""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from protorpc import messages
+
+from proto import tracker_pb2
+
+
+# This is a special field_name for a FieldDef that means to do a fulltext
+# search for words that occur in any part of the issue.
+ANY_FIELD = 'any_field'
+
+
+class QueryOp(messages.Enum):
+  """Enumeration of possible query condition operators."""
+  EQ = 1
+  NE = 2
+  LT = 3
+  GT = 4
+  LE = 5
+  GE = 6
+  TEXT_HAS = 7
+  NOT_TEXT_HAS = 8
+  IS_DEFINED = 11
+  IS_NOT_DEFINED = 12
+  KEY_HAS = 13
+
+
+class TokenType(messages.Enum):
+  """Enumeration of query tokens used for parentheses parsing."""
+  SUBQUERY = 1
+  LEFT_PAREN = 2
+  RIGHT_PAREN = 3
+  OR = 4
+
+
+class QueryToken(messages.Message):
+  """Data structure to represent a single token for parentheses parsing."""
+  token_type = messages.EnumField(TokenType, 1, required=True)
+  value = messages.StringField(2)
+
+
+class Condition(messages.Message):
+  """Representation of one query condition.  E.g., [Type=Defect,Task]."""
+  op = messages.EnumField(QueryOp, 1, required=True)
+  field_defs = messages.MessageField(tracker_pb2.FieldDef, 2, repeated=True)
+  str_values = messages.StringField(3, repeated=True)
+  int_values = messages.IntegerField(4, repeated=True)
+  # The suffix of a search field
+  # eg. the 'approver' in 'UXReview-approver:user@mail.com'
+  key_suffix = messages.StringField(5)
+  # The name of the phase this field value should belong to.
+  phase_name = messages.StringField(6)
+
+
+class Conjunction(messages.Message):
+  """A list of conditions that are implicitly ANDed together."""
+  conds = messages.MessageField(Condition, 1, repeated=True)
+
+
+class QueryAST(messages.Message):
+  """Abstract syntax tree for the user's query."""
+  conjunctions = messages.MessageField(Conjunction, 1, repeated=True)
+
+
+def MakeCond(op, field_defs, str_values, int_values,
+             key_suffix=None, phase_name=None):
+  """Shorthand function to construct a Condition PB."""
+  return Condition(
+      op=op, field_defs=field_defs, str_values=str_values,
+      int_values=int_values, key_suffix=key_suffix, phase_name=phase_name)
diff --git a/proto/features_pb2.py b/proto/features_pb2.py
new file mode 100644
index 0000000..d2e4d4c
--- /dev/null
+++ b/proto/features_pb2.py
@@ -0,0 +1,86 @@
+# 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
+
+"""Protocol buffers for Monorail features."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from features import features_constants
+from protorpc import messages
+
+
+class Hotlist(messages.Message):
+  """This protocol buffer holds all the metadata associated with a hotlist."""
+  # A numeric identifier for this hotlist.
+  hotlist_id = messages.IntegerField(1, required=True)
+
+  # The short identifier for this hotlist.
+  name = messages.StringField(2, required=True)
+
+  # A one-line summary (human-readable) of the hotlist.
+  summary = messages.StringField(3, default='')
+
+  # A detailed description of the hotlist.
+  description = messages.StringField(4, default='')
+
+  # Hotlists can be marked private to prevent unwanted users from seeing them.
+  is_private = messages.BooleanField(5, default=False)
+
+  # Note that these lists are disjoint (a user ID will not appear twice).
+  owner_ids = messages.IntegerField(6, repeated=True)
+  editor_ids = messages.IntegerField(8, repeated=True)
+  follower_ids = messages.IntegerField(9, repeated=True)
+
+
+  class HotlistItem(messages.Message):
+    """Nested message for a hotlist to issue relation."""
+    issue_id = messages.IntegerField(1, required=True)
+    rank = messages.IntegerField(2, required=True)
+    adder_id = messages.IntegerField(3)
+    date_added = messages.IntegerField(4)
+    note = messages.StringField(5, default='')
+
+  items = messages.MessageField(HotlistItem, 10, repeated=True)
+
+  # The default columns to show on hotlist issues page
+  default_col_spec = messages.StringField(
+      11, default=features_constants.DEFAULT_COL_SPEC)
+
+def MakeHotlist(name, hotlist_item_fields=None, **kwargs):
+  """Returns a hotlist protocol buffer with the given attributes.
+    Args:
+      hotlist_item_fields: tuple of (iid, rank, user, date, note)
+  kwargs should only include the following:
+    hotlist_id, summary, description, is_private, owner_ids, editor_ids,
+    follower_ids, default_col_spec"""
+  hotlist = Hotlist(name=name, **kwargs)
+
+  if hotlist_item_fields is not None:
+    for iid, rank, user, date, note in hotlist_item_fields:
+      hotlist.items.append(Hotlist.HotlistItem(
+          issue_id=iid, rank=rank, adder_id=user, date_added=date, note=note))
+
+  return hotlist
+
+
+# For any issues that were added to hotlists before we started storing that
+# timestamp, just use the launch date of the feature as a default.
+ADDED_TS_FEATURE_LAUNCH_TS = 1484350000  # Jan 13, 2017
+
+
+def MakeHotlistItem(
+    issue_id, rank=None, adder_id=None, date_added=None, note=None):
+  item = Hotlist.HotlistItem(
+      issue_id=issue_id,
+      date_added=date_added or ADDED_TS_FEATURE_LAUNCH_TS)
+  if rank is not None:
+    item.rank = rank
+  if adder_id is not None:
+    item.adder_id = adder_id
+  if note is not None:
+    item.note = note
+  return item
diff --git a/proto/project_pb2.py b/proto/project_pb2.py
new file mode 100644
index 0000000..269b89b
--- /dev/null
+++ b/proto/project_pb2.py
@@ -0,0 +1,239 @@
+# 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
+
+"""Protocol buffers for Monorail projects."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from protorpc import messages
+
+# Project state affects permissions in that project, and project deletion.
+# It is edited on the project admin page.  If it is anything other that LIVE
+# it triggers a notice at the top of every project page.
+# For more info, see the "Project deletion in Monorail" design doc.
+class ProjectState(messages.Enum):
+  """Enum for states in the project lifecycle."""
+  # Project is visible and indexed. This is the typical state.
+  #
+  # If moved_to is set, this project is live but has been moved
+  # to another location, so redirects will be used or links shown.
+  LIVE = 1
+
+  # Project owner has requested the project be archived. Project is
+  # read-only to members only, off-limits to non-members.  Issues
+  # can be searched when in the project, but should not appear in
+  # site-wide searches.  The project name is still in-use by this
+  # project.
+  #
+  # If a delete_time is set, then the project is doomed: (1) the
+  # state can only be changed by a site admin, and (2) the project
+  # will automatically transition to DELETABLE after that time is
+  # reached.
+  ARCHIVED = 2
+
+  # Project can be deleted at any time.  The project name should
+  # have already been changed to a generated string, so it's
+  # impossible to navigate to this project, and the original name
+  # can be reused by a new project.
+  DELETABLE = 3
+
+
+# Project access affects permissions in that project.
+# It is edited on the project admin page.
+class ProjectAccess(messages.Enum):
+  """Enum for possible project access levels."""
+  # Anyone may view this project, even anonymous users.
+  ANYONE = 1
+
+  # Only project members may view the project.
+  MEMBERS_ONLY = 3
+
+
+# A Project PB represents a project in Monorail, which is a workspace for
+# project members to collaborate on issues.
+# A project is created on the project creation page, searched on the project
+# list page, and edited on the project admin page.
+# Next message: 74
+class Project(messages.Message):
+  """This protocol buffer holds all the metadata associated with a project."""
+  state = messages.EnumField(ProjectState, 1, required=True)
+  access = messages.EnumField(ProjectAccess, 18, default=ProjectAccess.ANYONE)
+
+  # The short identifier for this project. This value is lower-cased,
+  # and must be between 3 and 20 characters (inclusive). Alphanumeric
+  # and dashes are allowed, and it must start with an alpha character.
+  # Project names must be unique.
+  project_name = messages.StringField(2, required=True)
+
+  # A numeric identifier for this project.
+  project_id = messages.IntegerField(3, required=True)
+
+  # A one-line summary (human-readable) name of the project.
+  summary = messages.StringField(4, default='')
+
+  # A detailed description of the project.
+  description = messages.StringField(5, default='')
+
+  # Description of why this project has the state set as it is.
+  # This is used for administrative purposes to notify Owners that we
+  # are going to delete their project unless they can provide a good
+  # reason to not do so.
+  state_reason = messages.StringField(9)
+
+  # Time (in seconds) at which an ARCHIVED project may automatically
+  # be changed to state DELETABLE.  The state change is done by a
+  # cron job.
+  delete_time = messages.IntegerField(10)
+
+  # Note that these lists are disjoint (a user ID will not appear twice).
+  owner_ids = messages.IntegerField(11, repeated=True)
+  committer_ids = messages.IntegerField(12, repeated=True)
+  contributor_ids = messages.IntegerField(15, repeated=True)
+
+  class ExtraPerms(messages.Message):
+    """Nested message for each member's extra permissions in a project."""
+    member_id = messages.IntegerField(1, required=True)
+    # Each custom perm is a single word [a-zA-Z0-9].
+    perms = messages.StringField(2, repeated=True)
+
+  extra_perms = messages.MessageField(ExtraPerms, 16, repeated=True)
+
+  # Project owners may choose to have ALL issue change notifications go to a
+  # mailing list (in addition to going directly to the users interested
+  # in that issue).
+  issue_notify_address = messages.StringField(14)
+
+  # These fields keep track of the cumulative size of all issue attachments
+  # in a given project.  Normally, the number of bytes used is compared
+  # to a constant defined in the web application.  However, if a custom
+  # quota is specified here, it will be used instead.  An issue attachment
+  # will fail if its size would put the project over its quota.  Not all
+  # projects have these fields: they are only set when the first attachment
+  # is uploaded.
+  attachment_bytes_used = messages.IntegerField(38, default=0)
+  # If quota is not set, default from tracker_constants.py is used.
+  attachment_quota = messages.IntegerField(39)
+
+  # NOTE: open slots 40, 41
+
+  # Recent_activity is a timestamp (in seconds since the Epoch) of the
+  # last time that an issue was entered, updated, or commented on.
+  recent_activity = messages.IntegerField(42, default=0)
+
+  # NOTE: open slots 43...
+
+  # Timestamp (in seconds since the Epoch) of the most recent change
+  # to this project that would invalidate cached content.  It is set
+  # whenever project membership is edited, or any component config PB
+  # is edited.  HTTP requests for auto-complete feeds include this
+  # value in the URL.
+  cached_content_timestamp = messages.IntegerField(53, default=0)
+
+  # If set, this project has been moved elsewhere.  This can
+  # be an absolute URL, the name of another project on the same site.
+  moved_to = messages.StringField(60)
+
+  # Enable inbound email processing for issues.
+  process_inbound_email = messages.BooleanField(63, default=False)
+
+  # Limit removal of Restrict-* labels to project owners.
+  only_owners_remove_restrictions = messages.BooleanField(64, default=False)
+
+  # A per-project read-only lock. This lock (1) is meant to be
+  # long-lived (lasting as long as migration operations, project
+  # deletion, or anything else might take and (2) is meant to only
+  # limit user mutations; whether or not it limits automated actions
+  # that would change project data (such as workflow items) is
+  # determined based on the action.
+  #
+  # This lock is implemented as a user-visible string describing the
+  # reason for the project being in a read-only state. An absent or empty
+  # value indicates that the project is read-write; a present and
+  # non-empty value indicates that the project is read-only for the
+  # reason described.
+  read_only_reason = messages.StringField(65)
+
+  # This option is rarely used, but it makes sense for projects that aim for
+  # hub-and-spoke collaboration bewtween a vendor organization (like Google)
+  # and representatives of partner companies who are not supposed to know
+  # about each other.
+  # When true, it prevents project committers, contributors, and visitors
+  # from seeing the list of project members on the project summary page,
+  # on the People list page, and in autocomplete for issue owner and Cc.
+  # Project owners can always see the complete list of project members.
+  only_owners_see_contributors = messages.BooleanField(66, default=False)
+
+  # This configures the URLs generated when autolinking revision numbers.
+  # E.g., gitiles, viewvc, or crrev.com.
+  revision_url_format = messages.StringField(67)
+
+  # The home page of the Project.
+  home_page = messages.StringField(68)
+  # The url to redirect to for wiki/documentation links.
+  docs_url = messages.StringField(71)
+  # The url to redirect to for wiki/documentation links.
+  source_url = messages.StringField(72)
+  # The GCS object ID of the Project's logo.
+  logo_gcs_id = messages.StringField(69)
+  # The uploaded file name of the Project's logo.
+  logo_file_name = messages.StringField(70)
+
+  # Always send the full content of update in notifications.
+  issue_notify_always_detailed = messages.BooleanField(73, default=False)
+
+
+# This PB documents some of the duties of some of the members
+# in a given project.  This info is displayed on the project People page.
+class ProjectCommitments(messages.Message):
+  project_id = messages.IntegerField(50)
+
+  class MemberCommitment(messages.Message):
+    member_id = messages.IntegerField(11, required=True)
+    notes = messages.StringField(13)
+
+  commitments = messages.MessageField(MemberCommitment, 2, repeated=True)
+
+
+def MakeProject(
+    project_name, project_id=None, state=ProjectState.LIVE,
+    access=ProjectAccess.ANYONE, summary=None, description=None,
+    moved_to=None, cached_content_timestamp=None,
+    owner_ids=None, committer_ids=None, contributor_ids=None,
+    read_only_reason=None, home_page=None, docs_url=None, source_url=None,
+    logo_gcs_id=None, logo_file_name=None):
+  """Returns a project protocol buffer with the given attributes."""
+  project = Project(
+      project_name=project_name, access=access, state=state)
+  if project_id:
+    project.project_id = project_id
+  if moved_to:
+    project.moved_to = moved_to
+  if cached_content_timestamp:
+    project.cached_content_timestamp = cached_content_timestamp
+  if summary:
+    project.summary = summary
+  if description:
+    project.description = description
+  if home_page:
+    project.home_page = home_page
+  if docs_url:
+    project.docs_url = docs_url
+  if source_url:
+    project.source_url = source_url
+  if logo_gcs_id:
+    project.logo_gcs_id = logo_gcs_id
+  if logo_file_name:
+    project.logo_file_name = logo_file_name
+
+  project.owner_ids.extend(owner_ids or [])
+  project.committer_ids.extend(committer_ids or [])
+  project.contributor_ids.extend(contributor_ids or [])
+
+  if read_only_reason is not None:
+    project.read_only_reason = read_only_reason
+
+  return project
diff --git a/proto/secrets.proto b/proto/secrets.proto
new file mode 100644
index 0000000..be98361
--- /dev/null
+++ b/proto/secrets.proto
@@ -0,0 +1,36 @@
+// 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.
+
+// This file defines protobufs needed for handling Monorail secrets.
+
+syntax = "proto3";
+
+package monorail.secrets;
+
+
+// Next available tag: 7
+message ListRequestContents {
+  // The parent resource of the requested resources.
+  string parent = 1;
+  // The requested page size for listing the resources.
+  int32 page_size = 2;
+  // The requested sort order of the list of resources.
+  string order_by = 3;
+  // The query that may be used to filter which resources to show.
+  string query = 4;
+  // The resource names of projects to query within.
+  repeated string projects = 5;
+  // The string that may be used to filter which resources to show.
+  // See AIP-160.
+  string filter = 6;
+}
+
+
+// Next available tag: 3
+message PageTokenContents {
+  // The index of where the requested resource list should start.
+  int32 start = 1;
+  // An encrypted ListRequestContents message.
+  bytes encrypted_list_request_contents = 2;
+}
diff --git a/proto/secrets_pb2.py b/proto/secrets_pb2.py
new file mode 100644
index 0000000..1638848
--- /dev/null
+++ b/proto/secrets_pb2.py
@@ -0,0 +1,152 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: proto/secrets.proto
+
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor.FileDescriptor(
+  name='proto/secrets.proto',
+  package='monorail.secrets',
+  syntax='proto3',
+  serialized_options=None,
+  create_key=_descriptor._internal_create_key,
+  serialized_pb=b'\n\x13proto/secrets.proto\x12\x10monorail.secrets\"{\n\x13ListRequestContents\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x10\n\x08order_by\x18\x03 \x01(\t\x12\r\n\x05query\x18\x04 \x01(\t\x12\x10\n\x08projects\x18\x05 \x03(\t\x12\x0e\n\x06\x66ilter\x18\x06 \x01(\t\"K\n\x11PageTokenContents\x12\r\n\x05start\x18\x01 \x01(\x05\x12\'\n\x1f\x65ncrypted_list_request_contents\x18\x02 \x01(\x0c\x62\x06proto3'
+)
+
+
+
+
+_LISTREQUESTCONTENTS = _descriptor.Descriptor(
+  name='ListRequestContents',
+  full_name='monorail.secrets.ListRequestContents',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='parent', full_name='monorail.secrets.ListRequestContents.parent', index=0,
+      number=1, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='page_size', full_name='monorail.secrets.ListRequestContents.page_size', index=1,
+      number=2, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='order_by', full_name='monorail.secrets.ListRequestContents.order_by', index=2,
+      number=3, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='query', full_name='monorail.secrets.ListRequestContents.query', index=3,
+      number=4, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='projects', full_name='monorail.secrets.ListRequestContents.projects', index=4,
+      number=5, type=9, cpp_type=9, label=3,
+      has_default_value=False, default_value=[],
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='filter', full_name='monorail.secrets.ListRequestContents.filter', index=5,
+      number=6, type=9, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"".decode('utf-8'),
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=41,
+  serialized_end=164,
+)
+
+
+_PAGETOKENCONTENTS = _descriptor.Descriptor(
+  name='PageTokenContents',
+  full_name='monorail.secrets.PageTokenContents',
+  filename=None,
+  file=DESCRIPTOR,
+  containing_type=None,
+  create_key=_descriptor._internal_create_key,
+  fields=[
+    _descriptor.FieldDescriptor(
+      name='start', full_name='monorail.secrets.PageTokenContents.start', index=0,
+      number=1, type=5, cpp_type=1, label=1,
+      has_default_value=False, default_value=0,
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+    _descriptor.FieldDescriptor(
+      name='encrypted_list_request_contents', full_name='monorail.secrets.PageTokenContents.encrypted_list_request_contents', index=1,
+      number=2, type=12, cpp_type=9, label=1,
+      has_default_value=False, default_value=b"",
+      message_type=None, enum_type=None, containing_type=None,
+      is_extension=False, extension_scope=None,
+      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
+  ],
+  extensions=[
+  ],
+  nested_types=[],
+  enum_types=[
+  ],
+  serialized_options=None,
+  is_extendable=False,
+  syntax='proto3',
+  extension_ranges=[],
+  oneofs=[
+  ],
+  serialized_start=166,
+  serialized_end=241,
+)
+
+DESCRIPTOR.message_types_by_name['ListRequestContents'] = _LISTREQUESTCONTENTS
+DESCRIPTOR.message_types_by_name['PageTokenContents'] = _PAGETOKENCONTENTS
+_sym_db.RegisterFileDescriptor(DESCRIPTOR)
+
+ListRequestContents = _reflection.GeneratedProtocolMessageType('ListRequestContents', (_message.Message,), {
+  'DESCRIPTOR' : _LISTREQUESTCONTENTS,
+  '__module__' : 'proto.secrets_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.secrets.ListRequestContents)
+  })
+_sym_db.RegisterMessage(ListRequestContents)
+
+PageTokenContents = _reflection.GeneratedProtocolMessageType('PageTokenContents', (_message.Message,), {
+  'DESCRIPTOR' : _PAGETOKENCONTENTS,
+  '__module__' : 'proto.secrets_pb2'
+  # @@protoc_insertion_point(class_scope:monorail.secrets.PageTokenContents)
+  })
+_sym_db.RegisterMessage(PageTokenContents)
+
+
+# @@protoc_insertion_point(module_scope)
diff --git a/proto/site_pb2.py b/proto/site_pb2.py
new file mode 100644
index 0000000..363c2f6
--- /dev/null
+++ b/proto/site_pb2.py
@@ -0,0 +1,26 @@
+# 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
+
+"""Protocol buffers for Monorail site-wide features."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from protorpc import messages
+
+
+class UserTypeRestriction(messages.Enum):
+  """An enum for site-wide settings about who can take an action."""
+  # Anyone may do it.
+  ANYONE = 1
+
+  # Only domain admins may do it.
+  ADMIN_ONLY = 2
+
+  # No one may do it, the feature is basically disabled.
+  NO_ONE = 3
+
+  # TODO(jrobbins): implement same-domain users
diff --git a/proto/test/__init__.py b/proto/test/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/proto/test/__init__.py
@@ -0,0 +1 @@
+
diff --git a/proto/test/ast_pb2_test.py b/proto/test/ast_pb2_test.py
new file mode 100644
index 0000000..f82453d
--- /dev/null
+++ b/proto/test/ast_pb2_test.py
@@ -0,0 +1,28 @@
+# 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
+
+"""Tests for ast_pb2 functions."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from proto import ast_pb2
+from proto import tracker_pb2
+
+
+class ASTPb2Test(unittest.TestCase):
+
+  def testCond(self):
+    fd = tracker_pb2.FieldDef(field_id=1, field_name='Size')
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.EQ, [fd], ['XL'], [], key_suffix='-approver')
+    self.assertEqual(ast_pb2.QueryOp.EQ, cond.op)
+    self.assertEqual([fd], cond.field_defs)
+    self.assertEqual(['XL'], cond.str_values)
+    self.assertEqual([], cond.int_values)
+    self.assertEqual(cond.key_suffix, '-approver')
diff --git a/proto/test/features_pb2_test.py b/proto/test/features_pb2_test.py
new file mode 100644
index 0000000..60e344b
--- /dev/null
+++ b/proto/test/features_pb2_test.py
@@ -0,0 +1,56 @@
+# 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
+
+"""Tests for features_pb2 functions."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from proto import features_pb2
+
+
+class FeaturesPb2Test(unittest.TestCase):
+
+  def testMakeHotlist_Defaults(self):
+    hotlist = features_pb2.MakeHotlist('summer-issues')
+    self.assertEqual('summer-issues', hotlist.name)
+    self.assertEqual([], hotlist.items)
+
+  def testMakeHotlist_Everything(self):
+    ts = 20011111111111
+    hotlist = features_pb2.MakeHotlist(
+        'summer-issues', [(1000, 1, 444, ts, ''), (1001, 2, 333, ts, ''),
+                          (1009, None, None, ts, '')],
+        description='desc')
+    self.assertEqual('summer-issues', hotlist.name)
+    self.assertEqual(
+        [features_pb2.MakeHotlistItem(
+            1000, rank=1, adder_id=444, date_added=ts, note=''),
+         features_pb2.MakeHotlistItem(
+             1001, rank=2, adder_id=333, date_added=ts, note=''),
+         features_pb2.MakeHotlistItem(1009, date_added=ts, note=''),
+         ],
+        hotlist.items)
+    self.assertEqual('desc', hotlist.description)
+
+  def testMakeHotlistItem(self):
+    ts = 20011111111111
+    item_1 = features_pb2.MakeHotlistItem(
+        1000, rank=1, adder_id=111, date_added=ts, note='short note')
+    self.assertEqual(1000, item_1.issue_id)
+    self.assertEqual(1, item_1.rank)
+    self.assertEqual(111, item_1.adder_id)
+    self.assertEqual(ts, item_1.date_added)
+    self.assertEqual('short note', item_1.note)
+
+    item_2 = features_pb2.MakeHotlistItem(1001)
+    self.assertEqual(1001, item_2.issue_id)
+    self.assertEqual(None, item_2.rank)
+    self.assertEqual(None, item_2.adder_id)
+    self.assertEqual('', item_2.note)
+    self.assertEqual(features_pb2.ADDED_TS_FEATURE_LAUNCH_TS, item_2.date_added)
diff --git a/proto/test/project_pb2_test.py b/proto/test/project_pb2_test.py
new file mode 100644
index 0000000..1fa099d
--- /dev/null
+++ b/proto/test/project_pb2_test.py
@@ -0,0 +1,53 @@
+# 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
+
+"""Tests for project_pb2 functions."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from proto import project_pb2
+
+
+class ProjectPb2Test(unittest.TestCase):
+
+  def testMakeProject_Defaults(self):
+    project = project_pb2.MakeProject('proj')
+    self.assertEqual('proj', project.project_name)
+    self.assertEqual(project_pb2.ProjectState.LIVE, project.state)
+    self.assertEqual(project_pb2.ProjectAccess.ANYONE, project.access)
+    self.assertFalse(project.read_only_reason)
+
+  def testMakeProject_Everything(self):
+    project = project_pb2.MakeProject(
+        'proj', project_id=789, state=project_pb2.ProjectState.ARCHIVED,
+        access=project_pb2.ProjectAccess.MEMBERS_ONLY, summary='sum',
+        description='desc', moved_to='example.com',
+        cached_content_timestamp=1234567890, owner_ids=[111],
+        committer_ids=[222], contributor_ids=[333],
+        read_only_reason='being migrated',
+        home_page='example.com', docs_url='example.com/docs',
+        source_url='example.com/src', logo_gcs_id='logo_id',
+        logo_file_name='logo.gif')
+    self.assertEqual('proj', project.project_name)
+    self.assertEqual(789, project.project_id)
+    self.assertEqual(project_pb2.ProjectState.ARCHIVED, project.state)
+    self.assertEqual(project_pb2.ProjectAccess.MEMBERS_ONLY, project.access)
+    self.assertEqual('sum', project.summary)
+    self.assertEqual('desc', project.description)
+    self.assertEqual('example.com', project.moved_to)
+    self.assertEqual(1234567890, project.cached_content_timestamp)
+    self.assertEqual([111], project.owner_ids)
+    self.assertEqual([222], project.committer_ids)
+    self.assertEqual([333], project.contributor_ids)
+    self.assertEqual('being migrated', project.read_only_reason)
+    self.assertEqual('example.com', project.home_page)
+    self.assertEqual('example.com/docs', project.docs_url)
+    self.assertEqual('example.com/src', project.source_url)
+    self.assertEqual('logo_id', project.logo_gcs_id)
+    self.assertEqual('logo.gif', project.logo_file_name)
diff --git a/proto/test/user_pb2_test.py b/proto/test/user_pb2_test.py
new file mode 100644
index 0000000..c02b719
--- /dev/null
+++ b/proto/test/user_pb2_test.py
@@ -0,0 +1,29 @@
+# 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
+
+"""Tests for user_pb2 functions."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from proto import user_pb2
+
+
+class UserPb2Test(unittest.TestCase):
+
+  def testUser_Defaults(self):
+    user = user_pb2.MakeUser(111)
+    self.assertEqual(111, user.user_id)
+    self.assertFalse(user.obscure_email)
+    self.assertIsNone(user.email)
+
+  def testUser_Everything(self):
+    user = user_pb2.MakeUser(111, email='user@example.com', obscure_email=True)
+    self.assertEqual(111, user.user_id)
+    self.assertTrue(user.obscure_email)
+    self.assertEqual('user@example.com', user.email)
diff --git a/proto/test/usergroup_pb2_test.py b/proto/test/usergroup_pb2_test.py
new file mode 100644
index 0000000..c7ab1e7
--- /dev/null
+++ b/proto/test/usergroup_pb2_test.py
@@ -0,0 +1,37 @@
+# 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
+
+"""Tests for usergroup_pb2 functions."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from proto import usergroup_pb2
+
+
+class UserGroupPb2Test(unittest.TestCase):
+
+  def testMakeSettings_Defaults(self):
+    usergroup = usergroup_pb2.MakeSettings('anyone')
+    self.assertEqual(
+        usergroup_pb2.MemberVisibility.ANYONE,
+        usergroup.who_can_view_members)
+    self.assertIsNone(usergroup.ext_group_type)
+    self.assertEqual(0, usergroup.last_sync_time)
+    self.assertEqual([], usergroup.friend_projects)
+
+  def testMakeSettings_Everything(self):
+    usergroup = usergroup_pb2.MakeSettings(
+        'Members', ext_group_type_str='mdb',
+        last_sync_time=1234567890, friend_projects=[789])
+    self.assertEqual(
+        usergroup_pb2.MemberVisibility.MEMBERS,
+        usergroup.who_can_view_members)
+    self.assertEqual(usergroup_pb2.GroupType.MDB, usergroup.ext_group_type)
+    self.assertEqual(1234567890, usergroup.last_sync_time)
+    self.assertEqual([789], usergroup.friend_projects)
diff --git a/proto/tracker_pb2.py b/proto/tracker_pb2.py
new file mode 100644
index 0000000..88044cb
--- /dev/null
+++ b/proto/tracker_pb2.py
@@ -0,0 +1,545 @@
+# 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
+
+"""The Monorail issue tracker uses ProtoRPC for storing business objects."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from protorpc import messages
+
+
+class FieldValue(messages.Message):
+  """Holds a single custom field value in an issue.
+
+  Multi-valued custom fields will have multiple such FieldValues on a given
+  issue. Note that enumerated type custom fields are represented as key-value
+  labels.
+  """
+  field_id = messages.IntegerField(1, required=True)
+  # Only one of the following fields will hve any value.
+  int_value = messages.IntegerField(2)
+  str_value = messages.StringField(3)
+  user_id = messages.IntegerField(4)
+  date_value = messages.IntegerField(6)
+  url_value = messages.StringField(7)
+
+  derived = messages.BooleanField(5, default=False)
+
+  # None if field is not a phse field.
+  phase_id = messages.IntegerField(8)
+
+
+class ApprovalStatus(messages.Enum):
+  """Statuses that an approval field could be set to."""
+  NEEDS_REVIEW = 1
+  NA = 2
+  REVIEW_REQUESTED = 3
+  REVIEW_STARTED = 4
+  NEED_INFO = 5
+  APPROVED = 6
+  NOT_APPROVED = 7
+  NOT_SET = 8
+
+
+class ApprovalValue(messages.Message):
+  """Holds a single approval field value in an issue."""
+  approval_id = messages.IntegerField(1)
+  status = messages.EnumField(ApprovalStatus, 2, default='NOT_SET')
+  setter_id = messages.IntegerField(3)
+  set_on = messages.IntegerField(4)
+  approver_ids = messages.IntegerField(5, repeated=True)
+  phase_id = messages.IntegerField(7)
+
+
+class ApprovalDelta(messages.Message):
+  """In-memory representation of requested changes to an issue's approval."""
+  status = messages.EnumField(ApprovalStatus, 1)
+  set_on = messages.IntegerField(2)
+  setter_id = messages.IntegerField(3)
+  approver_ids_add = messages.IntegerField(4, repeated=True)
+  approver_ids_remove = messages.IntegerField(5, repeated=True)
+  subfield_vals_add = messages.MessageField(FieldValue, 6, repeated=True)
+  subfield_vals_remove = messages.MessageField(FieldValue, 7, repeated=True)
+  subfields_clear = messages.IntegerField(8, repeated=True)
+  # Stores Approval's Enum subfield changes.
+  labels_add = messages.StringField(9, repeated=True)
+  labels_remove = messages.StringField(10, repeated=True)
+
+
+class Phase(messages.Message):
+  """Holds a single launch review phase."""
+  phase_id = messages.IntegerField(1)
+  name = messages.StringField(2)
+  rank = messages.IntegerField(4)
+
+
+class DanglingIssueRef(messages.Message):
+  """Holds a reference to an issue on Codesite or an external tracker."""
+  project = messages.StringField(1, required=True)
+  issue_id = messages.IntegerField(2, required=True)
+  ext_issue_identifier = messages.StringField(3, required=False)
+
+
+class Issue(messages.Message):
+  """Holds all the current metadata about an issue.
+
+  The most frequent searches can work by consulting solely the issue metadata.
+  Display of the issue list is done solely with this issue metadata.
+  Displaying one issue in detail with description and comments requires
+  more info from other objects.
+
+  The issue_id field is the unique primary key for retrieving issues.  Local ID
+  is a small integer that counts up in each project.
+
+  Summary, Status, Owner, CC, reporter, and opened_timestamp are hard
+  fields that are always there.  All other metadata is stored as
+  labels or custom fields.
+  Next available tag: 62.
+  """
+  # Globally unique issue ID.
+  issue_id = messages.IntegerField(42)
+  # project_name is not stored in the DB, only the project_id is stored.
+  # project_name is used in RAM to simplify formatting logic in lots of places.
+  project_name = messages.StringField(1, required=True)
+  project_id = messages.IntegerField(50)
+  local_id = messages.IntegerField(2, required=True)
+  summary = messages.StringField(3, default='')
+  status = messages.StringField(4, default='')
+  owner_id = messages.IntegerField(5)
+  cc_ids = messages.IntegerField(6, repeated=True)
+  labels = messages.StringField(7, repeated=True)
+  component_ids = messages.IntegerField(39, repeated=True)
+
+  # Denormalized count of stars on this Issue.
+  star_count = messages.IntegerField(8, required=True, default=0)
+  reporter_id = messages.IntegerField(9, required=True, default=0)
+  # Time that the issue was opened, in seconds since the Epoch.
+  opened_timestamp = messages.IntegerField(10, required=True, default=0)
+
+  # This should be set when an issue is closed and cleared when a
+  # closed issue is reopened.  Measured in seconds since the Epoch.
+  closed_timestamp = messages.IntegerField(12, default=0)
+
+  # This should be updated every time an issue is modified.  Measured
+  # in seconds since the Epoch.
+  modified_timestamp = messages.IntegerField(13, default=0)
+
+  # These timestamps are updated whenever owner, status, or components
+  # change, including when altered by a filter rule.
+  owner_modified_timestamp = messages.IntegerField(19, default=0)
+  status_modified_timestamp = messages.IntegerField(20, default=0)
+  component_modified_timestamp = messages.IntegerField(21, default=0)
+
+  # Issue IDs of issues that this issue is blocked on.
+  blocked_on_iids = messages.IntegerField(16, repeated=True)
+
+  # Rank values of issue relations that are blocking this issue. The issue
+  # with id blocked_on_iids[i] has rank value blocked_on_ranks[i]
+  blocked_on_ranks = messages.IntegerField(54, repeated=True)
+
+  # Issue IDs of issues that this issue is blocking.
+  blocking_iids = messages.IntegerField(17, repeated=True)
+
+  # References to 'dangling' (still in codesite) issue relations.
+  dangling_blocked_on_refs = messages.MessageField(
+      DanglingIssueRef, 52, repeated=True)
+  dangling_blocking_refs = messages.MessageField(
+      DanglingIssueRef, 53, repeated=True)
+
+  # Issue ID of issue that this issue was merged into most recently.  When it
+  # is missing or 0, it is considered to be not merged into any other issue.
+  merged_into = messages.IntegerField(18)
+  # Use this when an issue is a duplicate of an issue in an external tracker.
+  merged_into_external = messages.StringField(61)
+
+  # Default derived via rules, used iff status == ''.
+  derived_status = messages.StringField(30, default='')
+  # Default derived via rules, used iff owner_id == 0.
+  derived_owner_id = messages.IntegerField(31, default=0)
+  # Additional CCs derived via rules.
+  derived_cc_ids = messages.IntegerField(32, repeated=True)
+  # Additional labels derived via rules.
+  derived_labels = messages.StringField(33, repeated=True)
+  # Additional notification email addresses derived via rules.
+  derived_notify_addrs = messages.StringField(34, repeated=True)
+  # Additional components derived via rules.
+  derived_component_ids = messages.IntegerField(40, repeated=True)
+  # Software development process warnings and errors generated by filter rules.
+  # TODO(jrobbins): these are not yet stored in the DB, they are only in RAM.
+  derived_warnings = messages.StringField(55, repeated=True)
+  derived_errors = messages.StringField(56, repeated=True)
+
+  # Soft delete of the entire issue.
+  deleted = messages.BooleanField(35, default=False)
+
+  # Total number of attachments in the issue
+  attachment_count = messages.IntegerField(36, default=0)
+
+  # Total number of comments on the issue (not counting the initial comment
+  # created when the issue is created).
+  comment_count = messages.IntegerField(37, default=0)
+
+  # Custom field values (other than enums)
+  field_values = messages.MessageField(FieldValue, 41, repeated=True)
+
+  is_spam = messages.BooleanField(51, default=False)
+  # assume_stale is used in RAM to ensure that a value saved to the DB was
+  # loaded from the DB in the same request handler (not via the cache).
+  assume_stale = messages.BooleanField(57, default=True)
+
+  phases = messages.MessageField(Phase, 59, repeated=True)
+  approval_values = messages.MessageField(ApprovalValue, 60, repeated=True)
+
+
+class FieldID(messages.Enum):
+  """Possible fields that can be updated in an Amendment."""
+  # The spelling of these names must match enum values in tracker.sql.
+  SUMMARY = 1
+  STATUS = 2
+  OWNER = 3
+  CC = 4
+  LABELS = 5
+  BLOCKEDON = 6
+  BLOCKING = 7
+  MERGEDINTO = 8
+  PROJECT = 9
+  COMPONENTS = 10
+  CUSTOM = 11
+  WARNING = 12
+  ERROR = 13
+
+
+class IssueDelta(messages.Message):
+  """In-memory representation of requested changes to an issue.
+
+  Next available tag: 23
+  """
+  status = messages.StringField(1)
+  owner_id = messages.IntegerField(2)
+  cc_ids_add = messages.IntegerField(3, repeated=True)
+  cc_ids_remove = messages.IntegerField(4, repeated=True)
+  comp_ids_add = messages.IntegerField(5, repeated=True)
+  comp_ids_remove = messages.IntegerField(6, repeated=True)
+  labels_add = messages.StringField(7, repeated=True)
+  labels_remove = messages.StringField(8, repeated=True)
+  field_vals_add = messages.MessageField(FieldValue, 9, repeated=True)
+  field_vals_remove = messages.MessageField(FieldValue, 10, repeated=True)
+  fields_clear = messages.IntegerField(11, repeated=True)
+  blocked_on_add = messages.IntegerField(12, repeated=True)
+  blocked_on_remove = messages.IntegerField(13, repeated=True)
+  blocking_add = messages.IntegerField(14, repeated=True)
+  blocking_remove = messages.IntegerField(15, repeated=True)
+  merged_into = messages.IntegerField(16)
+  merged_into_external = messages.StringField(22)
+  summary = messages.StringField(17)
+  ext_blocked_on_add = messages.StringField(18, repeated=True)
+  ext_blocked_on_remove = messages.StringField(19, repeated=True)
+  ext_blocking_add = messages.StringField(20, repeated=True)
+  ext_blocking_remove = messages.StringField(21, repeated=True)
+
+
+class Amendment(messages.Message):
+  """Holds info about one issue field change."""
+  field = messages.EnumField(FieldID, 11, required=True)
+  # User-visible string describing the change
+  newvalue = messages.StringField(12)
+  # Newvalue could have + or - characters to indicate that labels and CCs
+  # were added or removed
+  # Users added to owner or cc field
+  added_user_ids = messages.IntegerField(29, repeated=True)
+  # Users removed from owner or cc
+  removed_user_ids = messages.IntegerField(30, repeated=True)
+  custom_field_name = messages.StringField(31)
+  # When having newvalue be a +/- string doesn't make sense (e.g. status),
+  # store the old value here so that it can still be displayed.
+  oldvalue = messages.StringField(32)
+
+
+class Attachment(messages.Message):
+  """Holds info about one attachment."""
+  attachment_id = messages.IntegerField(21, required=True)
+  # Client-side filename
+  filename = messages.StringField(22, required=True)
+  filesize = messages.IntegerField(23, required=True)
+  # File mime-type, or at least our best guess.
+  mimetype = messages.StringField(24, required=True)
+  deleted = messages.BooleanField(27, default=False)
+  gcs_object_id = messages.StringField(29, required=False)
+
+
+class IssueComment(messages.Message):
+  # TODO(lukasperaza): update first comment to is_description=True
+  """Holds one issue description or one additional comment on an issue.
+
+  The IssueComment with the lowest timestamp is the issue description,
+  if there is no IssueComment with is_description=True; otherwise, the
+  IssueComment with is_description=True and the highest timestamp is
+  the issue description.
+  Next available tag: 56
+  """
+  id = messages.IntegerField(32)
+  # Issue ID of the issue that was commented on.
+  issue_id = messages.IntegerField(31, required=True)
+  project_id = messages.IntegerField(50)
+  # User who entered the comment
+  user_id = messages.IntegerField(4, required=True, default=0)
+  # id of the APPROVAL_TYPE fielddef, if this is an approval comment.
+  approval_id = messages.IntegerField(54)
+  # Time when comment was entered (seconds).
+  timestamp = messages.IntegerField(5, required=True)
+  # Text of the comment
+  content = messages.StringField(6, required=True)
+  # Audit trail of changes made w/ this comment
+  amendments = messages.MessageField(Amendment, 10, repeated=True)
+
+  # Soft delete that can be undeleted.
+  # Deleted comments should not be shown to average users.
+  # If deleted, deleted_by contains the user id of user who deleted.
+  deleted_by = messages.IntegerField(13)
+
+  attachments = messages.MessageField(Attachment, 20, repeated=True)
+
+  # Sequence number of the comment
+  # The field is optional for compatibility with code existing before
+  # this field was added.
+  # In practice, issue_svc sets this for all comments in GetCommentsForIssue.
+  sequence = messages.IntegerField(26)
+
+  # The body text of the inbound email that caused this issue comment
+  # to be automatically entered.  If this field is non-empty, it means
+  # that the comment was added via an inbound email.  Headers and attachments
+  # are not included.
+  inbound_message = messages.StringField(28)
+
+  is_spam = messages.BooleanField(51, default=False)
+
+  is_description = messages.BooleanField(52, default=False)
+  description_num = messages.StringField(53)
+
+  # User ID of script that imported the comment on behalf of a user.
+  importer_id = messages.IntegerField(55, default=0)
+
+
+class SavedQuery(messages.Message):
+  """Store a saved query, for either a project or a user."""
+  query_id = messages.IntegerField(1)
+  name = messages.StringField(2)
+  base_query_id = messages.IntegerField(3)
+  query = messages.StringField(4, required=True)
+
+  # For personal cross-project queries.
+  executes_in_project_ids = messages.IntegerField(5, repeated=True)
+
+  # For user saved queries.
+  subscription_mode = messages.StringField(6)
+
+
+class NotifyTriggers(messages.Enum):
+  """Issue tracker events that can trigger notification emails."""
+  NEVER = 0
+  ANY_COMMENT = 1
+  # TODO(jrobbins): ANY_CHANGE, OPENED_CLOSED, ETC.
+
+
+class FieldTypes(messages.Enum):
+  """Types of custom fields that Monorail supports."""
+  ENUM_TYPE = 1
+  INT_TYPE = 2
+  STR_TYPE = 3
+  USER_TYPE = 4
+  DATE_TYPE = 5
+  BOOL_TYPE = 6
+  URL_TYPE = 7
+  APPROVAL_TYPE = 8
+  # TODO(jrobbins): more types, see tracker.sql for all TODOs.
+
+
+class DateAction(messages.Enum):
+  """What to do when a date field value arrives."""
+  NO_ACTION = 0
+  PING_OWNER_ONLY = 1
+  PING_PARTICIPANTS = 2
+
+
+class FieldDef(messages.Message):
+  """This PB stores info about one custom field definition."""
+  field_id = messages.IntegerField(1, required=True)
+  project_id = messages.IntegerField(2, required=True)
+  field_name = messages.StringField(3, required=True)
+  field_type = messages.EnumField(FieldTypes, 4, required=True)
+  applicable_type = messages.StringField(11)
+  applicable_predicate = messages.StringField(10)
+  is_required = messages.BooleanField(5, default=False)
+  is_niche = messages.BooleanField(19, default=False)
+  is_multivalued = messages.BooleanField(6, default=False)
+  docstring = messages.StringField(7)
+  is_deleted = messages.BooleanField(8, default=False)
+  admin_ids = messages.IntegerField(9, repeated=True)
+  editor_ids = messages.IntegerField(24, repeated=True)
+
+  # validation details for int_type
+  min_value = messages.IntegerField(12)
+  max_value = messages.IntegerField(13)
+  # validation details for str_type
+  regex = messages.StringField(14)
+  # validation details for user_type
+  needs_member = messages.BooleanField(15, default=False)
+  needs_perm = messages.StringField(16)
+
+  # semantics for user_type fields
+  grants_perm = messages.StringField(17)
+  notify_on = messages.EnumField(NotifyTriggers, 18)
+
+  # semantics for date_type fields
+  date_action = messages.EnumField(DateAction, 20)
+
+  # field_id of the approval this FieldDef belongs to
+  approval_id = messages.IntegerField(21)
+
+  # These fields should only be associated with issue phases
+  is_phase_field = messages.BooleanField(22, default=False)
+
+  # boolean that indicates if this field is restricted
+  is_restricted_field = messages.BooleanField(23, default=False)
+
+
+class ComponentDef(messages.Message):
+  """This stores info about a component in a project."""
+  component_id = messages.IntegerField(1, required=True)
+  project_id = messages.IntegerField(2, required=True)
+  path = messages.StringField(3, required=True)
+  docstring = messages.StringField(4)
+  admin_ids = messages.IntegerField(5, repeated=True)
+  cc_ids = messages.IntegerField(6, repeated=True)
+  deprecated = messages.BooleanField(7, default=False)
+  created = messages.IntegerField(8)
+  creator_id = messages.IntegerField(9)
+  modified = messages.IntegerField(10)
+  modifier_id = messages.IntegerField(11)
+  label_ids = messages.IntegerField(12, repeated=True)
+
+
+class FilterRule(messages.Message):
+  """Filter rules implement semantics as project-specific if-then rules."""
+  predicate = messages.StringField(10, required=True)
+
+  # If the predicate is satisfied, these actions set some of the derived_*
+  # fields on the issue: labels, status, owner, or CCs.
+  add_labels = messages.StringField(20, repeated=True)
+  default_status = messages.StringField(21)
+  default_owner_id = messages.IntegerField(22)
+  add_cc_ids = messages.IntegerField(23, repeated=True)
+  add_notify_addrs = messages.StringField(24, repeated=True)
+  warning = messages.StringField(25)
+  error = messages.StringField(26)
+
+
+class StatusDef(messages.Message):
+  """Definition of one well-known issue status."""
+  status = messages.StringField(11, required=True)
+  means_open = messages.BooleanField(12, default=False)
+  status_docstring = messages.StringField(13)
+  deprecated = messages.BooleanField(14, default=False)
+
+
+class LabelDef(messages.Message):
+  """Definition of one well-known issue label."""
+  label = messages.StringField(21, required=True)
+  label_docstring = messages.StringField(22)
+  deprecated = messages.BooleanField(23, default=False)
+
+
+class ApprovalDef(messages.Message):
+  """Definition of an approval type field def."""
+  # Note: approval_id is semantically required
+  approval_id = messages.IntegerField(1)
+  approver_ids = messages.IntegerField(4, repeated=True)
+  survey = messages.StringField(5)
+
+# Next available tag: 48
+class TemplateDef(messages.Message):
+  """Definition of one issue template."""
+  template_id = messages.IntegerField(57)
+  name = messages.StringField(31, required=True)
+  content = messages.StringField(32, required=True)
+  summary = messages.StringField(33)
+  summary_must_be_edited = messages.BooleanField(34, default=False)
+  owner_id = messages.IntegerField(35)
+  status = messages.StringField(36)
+  # Note: labels field is considered to have been set iff summary was set.
+  labels = messages.StringField(37, repeated=True)
+  # This controls what is listed in the template drop-down menu. Users
+  # could still select any template by editing the URL, and that's OK.
+  members_only = messages.BooleanField(38, default=False)
+  # If no owner_id is specified, and owner_defaults_to_member is
+  # true, then when an issue is entered by a member, fill in the initial
+  # owner field with the signed in user's name.
+  owner_defaults_to_member = messages.BooleanField(39, default=True)
+  admin_ids = messages.IntegerField(41, repeated=True)
+
+  # Custom field values (other than enums)
+  field_values = messages.MessageField(FieldValue, 42, repeated=True)
+  # Components.
+  component_ids = messages.IntegerField(43, repeated=True)
+  component_required = messages.BooleanField(44, default=False)
+  phases = messages.MessageField(Phase, 46, repeated=True)
+  approval_values = messages.MessageField(ApprovalValue, 47, repeated=True)
+
+
+class ProjectIssueConfig(messages.Message):
+  """This holds all configuration info for one project.
+
+  That includes canned queries, well-known issue statuses,
+  and well-known issue labels.
+
+  "Well-known" means that they are always offered to the user in
+  drop-downs, even if there are currently no open issues that have
+  that label or status value.  Deleting a well-known value from the
+  configuration does not change any issues that may still reference
+  that old label, and users are still free to use it.
+
+  Exclusive label prefixes mean that a given issue may only have one
+  label that begins with that prefix.  E.g., Priority should be
+  exclusive so that no issue can be labeled with both Priority-High
+  and Priority-Low.
+  Next available tag: 62
+  """
+
+  project_id = messages.IntegerField(60)
+  well_known_statuses = messages.MessageField(StatusDef, 10, repeated=True)
+  # If an issue's status is being set to one of these, show "Merge with:".
+  statuses_offer_merge = messages.StringField(14, repeated=True)
+
+  well_known_labels = messages.MessageField(LabelDef, 20, repeated=True)
+  exclusive_label_prefixes = messages.StringField(2, repeated=True)
+
+  approval_defs = messages.MessageField(ApprovalDef, 61, repeated=True)
+
+  field_defs = messages.MessageField(FieldDef, 5, repeated=True)
+  component_defs = messages.MessageField(ComponentDef, 6, repeated=True)
+
+  default_template_for_developers = messages.IntegerField(3, required=True)
+  default_template_for_users = messages.IntegerField(4, required=True)
+
+  # These options control the default appearance of the issue list or grid
+  # for non-members.
+  default_col_spec = messages.StringField(50, default='')
+  default_sort_spec = messages.StringField(51, default='')
+  default_x_attr = messages.StringField(52, default='')
+  default_y_attr = messages.StringField(53, default='')
+
+  # These options control the default appearance of the issue list or grid
+  # for project members.
+  member_default_query = messages.StringField(57, default='')
+
+  # This bool controls whether users are able to enter odd-ball
+  # labels and status values, or whether they are limited to only the
+  # well-known labels and status values defined on the admin subtab.
+  restrict_to_known = messages.BooleanField(16, default=False)
+
+  # Allow special projects to have a custom URL for the "New issue" link.
+  custom_issue_entry_url = messages.StringField(56)
diff --git a/proto/user_pb2.py b/proto/user_pb2.py
new file mode 100644
index 0000000..c3191ed
--- /dev/null
+++ b/proto/user_pb2.py
@@ -0,0 +1,97 @@
+# 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
+
+"""Protocol buffers for Monorail users."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from protorpc import messages
+
+
+class IssueUpdateNav(messages.Enum):
+  """Pref for where a project member goes after an issue update."""
+  UP_TO_LIST = 0       # Back to issue list or grid view.
+  STAY_SAME_ISSUE = 1  # Show the same issue with the update.
+  NEXT_IN_LIST = 2     # Triage mode: go to next issue, if any.
+
+
+class User(messages.Message):
+  """In-memory busines object for representing users."""
+  user_id = messages.IntegerField(1)  # TODO(jrobbins): make it required.
+
+  # Is this user a site administer?
+  is_site_admin = messages.BooleanField(4, required=True, default=False)
+
+  # User notification preferences.  These preferences describe when
+  # a user is sent a email notification after an issue has changed.
+  # The user is notified if either of the following is true:
+  # 1. notify_issue_change is True and the user is named in the
+  # issue's Owner or CC field.
+  # 2. notify_starred_issue_change is True and the user has starred
+  # the issue.
+  notify_issue_change = messages.BooleanField(5, default=True)
+  notify_starred_issue_change = messages.BooleanField(6, default=True)
+  # Opt-in to email subject lines like "proj:123: issue summary".
+  email_compact_subject = messages.BooleanField(14, default=False)
+  # Opt-out of "View Issue" button in Gmail inbox.
+  email_view_widget = messages.BooleanField(15, default=True)
+  # Opt-in to ping emails from issues that the user starred.
+  notify_starred_ping = messages.BooleanField(16, default=False)
+
+  # This user has been banned, and this string describes why. All access
+  # to Monorail pages should be disabled.
+  banned = messages.StringField(7, default='')
+
+  # Fields 8-13 are no longer used: they were User action counts and limits.
+
+  after_issue_update = messages.EnumField(
+      IssueUpdateNav, 29, default=IssueUpdateNav.STAY_SAME_ISSUE)
+
+  # Should we obfuscate the user's email address and require solving a captcha
+  # to reveal it entirely? The default value corresponds to requiring users to
+  # opt into publishing their identities, but our code ensures that the
+  # opposite takes place for Gmail accounts.
+  obscure_email = messages.BooleanField(26, default=True)
+
+  # The email address chosen by the user to reveal on the site.
+  email = messages.StringField(27)
+
+  # Sticky state for show/hide widget on people details page.
+  keep_people_perms_open = messages.BooleanField(33, default=False)
+
+  deleted = messages.BooleanField(39, default=False)
+  deleted_timestamp = messages.IntegerField(40, default=0)
+
+  preview_on_hover = messages.BooleanField(42, default=True)
+
+  last_visit_timestamp = messages.IntegerField(45, default=0)
+  email_bounce_timestamp = messages.IntegerField(46, default=0)
+  vacation_message = messages.StringField(47)
+
+  linked_parent_id = messages.IntegerField(48)
+  linked_child_ids = messages.IntegerField(49, repeated=True)
+
+
+class UserPrefValue(messages.Message):
+  """Holds a single non-default user pref."""
+  name = messages.StringField(1, required=True)
+  value = messages.StringField(2)
+
+
+class UserPrefs(messages.Message):
+  """In-memory business object for representing user preferences."""
+  user_id = messages.IntegerField(1, required=True)
+  prefs = messages.MessageField(UserPrefValue, 2, repeated=True)
+
+
+
+def MakeUser(user_id, email=None, obscure_email=False):
+  """Create and return a new user record in RAM."""
+  user = User(user_id=user_id, obscure_email=bool(obscure_email))
+  if email:
+    user.email = email
+  return user
diff --git a/proto/usergroup_pb2.py b/proto/usergroup_pb2.py
new file mode 100644
index 0000000..b6ef76f
--- /dev/null
+++ b/proto/usergroup_pb2.py
@@ -0,0 +1,55 @@
+# 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
+
+"""Protocol buffers for Monorail usergroups."""
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from protorpc import messages
+
+
+class MemberVisibility(messages.Enum):
+  """Enum controlling who can see the members of a user group."""
+  OWNERS = 0
+  MEMBERS = 1
+  ANYONE = 2
+
+
+class GroupType(messages.Enum):
+  """Type of external group to import."""
+  CHROME_INFRA_AUTH = 0
+  MDB = 1
+  BAGGINS = 3
+  COMPUTED = 4
+
+
+class UserGroupSettings(messages.Message):
+  """In-memory busines object for representing user group settings."""
+  who_can_view_members = messages.EnumField(
+      MemberVisibility, 1, default=MemberVisibility.MEMBERS)
+  ext_group_type = messages.EnumField(GroupType, 2)
+  last_sync_time = messages.IntegerField(
+      3, default=0, variant=messages.Variant.INT32)
+  friend_projects = messages.IntegerField(
+      4, repeated=True, variant=messages.Variant.INT32)
+  notify_members = messages.BooleanField(5, default=True)
+  notify_group = messages.BooleanField(6, default=False)
+# TODO(jrobbins): add settings to control who can join, etc.
+
+
+def MakeSettings(who_can_view_members_str, ext_group_type_str=None,
+                 last_sync_time=0, friend_projects=None, notify_members=True,
+                 notify_group=False):
+  """Create and return a new user record in RAM."""
+  settings = UserGroupSettings(
+      who_can_view_members=MemberVisibility(who_can_view_members_str.upper()),
+      notify_members=notify_members, notify_group=notify_group)
+  if ext_group_type_str:
+    settings.ext_group_type = GroupType(ext_group_type_str.upper())
+  settings.last_sync_time = last_sync_time
+  settings.friend_projects = friend_projects or []
+  return settings
diff --git a/queue.yaml b/queue.yaml
new file mode 100644
index 0000000..7b3e7d9
--- /dev/null
+++ b/queue.yaml
@@ -0,0 +1,73 @@
+# 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
+
+queue:
+
+- name: componentexport
+  rate: 1/d
+  max_concurrent_requests: 1
+  retry_parameters:
+    task_retry_limit: 6
+    task_age_limit: 24h
+    min_backoff_seconds: 60
+
+- name: default
+  rate: 5/s
+  max_concurrent_requests: 30
+  retry_parameters:
+    task_age_limit: 24h
+    min_backoff_seconds: 60
+
+- name: notifications
+  rate: 5/s
+  max_concurrent_requests: 50
+  retry_parameters:
+    task_age_limit: 24h
+    min_backoff_seconds: 60
+
+- name: outboundemail
+  rate: 5/s
+  retry_parameters:
+    task_age_limit: 24h
+    min_backoff_seconds: 60
+
+- name: recomputederivedfields
+  rate: 1/s
+  max_concurrent_requests: 5
+  retry_parameters:
+    task_age_limit: 24h
+    min_backoff_seconds: 60
+
+- name: spamexport
+  rate: 1/d
+  max_concurrent_requests: 1
+
+- name: wipeoutsendusers
+  rate: 5/s
+  retry_parameters:
+    task_retry_limit: 6
+    task_age_limit: 1h
+    min_backoff_seconds: 30
+
+- name: wipeoutdeleteusers
+  rate: 5/s
+  retry_parameters:
+    task_retry_limit: 6
+    task_age_limit: 1h
+    min_backoff_seconds: 30
+
+- name: deleteusers
+  rate: 5/s
+  retry_parameters:
+    task_retry_limit: 3
+    task_age_limit: 1h
+    min_backoff_seconds: 30
+
+- name: pubsub-issueupdates
+  rate: 5/s
+  retry_parameters:
+    task_retry_limit: 3
+    task_age_limit: 24h
+    min_backoff_seconds: 60
diff --git a/registerpages.py b/registerpages.py
new file mode 100644
index 0000000..db3dd75
--- /dev/null
+++ b/registerpages.py
@@ -0,0 +1,474 @@
+# 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
+
+"""This file sets up all the urls for monorail pages."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import webapp2
+import settings
+
+from components import prpc
+
+from features import autolink
+from features import dateaction
+from features import banspammer
+from features import hotlistcreate
+from features import hotlistdetails
+from features import hotlistissues
+from features import hotlistissuescsv
+from features import hotlistpeople
+from features import filterrules
+from features import pubsub
+from features import userhotlists
+from features import inboundemail
+from features import notify
+from features import rerankhotlist
+from features import savedqueries
+from features import spammodel
+from features import spamtraining
+from features import componentexport
+
+from framework import banned
+from framework import clientmon
+from framework import csp_report
+from framework import deleteusers
+from framework import excessiveactivity
+from framework import trimvisitedpages
+from framework import framework_bizobj
+from framework import reap
+from framework import registerpages_helpers
+from framework import ts_mon_js
+from framework import urls
+from framework import warmup
+
+from project import peopledetail
+from project import peoplelist
+from project import project_constants
+from project import projectadmin
+from project import projectadminadvanced
+from project import projectexport
+from project import projectsummary
+from project import projectupdates
+from project import redirects
+
+from search import backendnonviewable
+from search import backendsearch
+
+from services import cachemanager_svc
+from services import client_config_svc
+
+from sitewide import custom_404
+from sitewide import groupadmin
+from sitewide import groupcreate
+from sitewide import groupdetail
+from sitewide import grouplist
+from sitewide import hostinghome
+from sitewide import moved
+from sitewide import projectcreate
+from sitewide import userprofile
+from sitewide import usersettings
+from sitewide import userclearbouncing
+from sitewide import userupdates
+
+from tracker import componentcreate
+from tracker import componentdetail
+from tracker import fieldcreate
+from tracker import fielddetail
+from tracker import issueadmin
+from tracker import issueadvsearch
+from tracker import issueattachment
+from tracker import issueattachmenttext
+from tracker import issuebulkedit
+from tracker import webcomponentspage
+from tracker import issuedetailezt
+from tracker import issueentry
+from tracker import issueentryafterlogin
+from tracker import issueexport
+from tracker import issueimport
+from tracker import issueoriginal
+from tracker import issuereindex
+from tracker import issuetips
+from tracker import spam
+from tracker import templatecreate
+from tracker import templatedetail
+from tracker import fltconversion
+
+from api import api_routes as api_routes_v0
+from api.v3 import api_routes as api_routes_v3
+
+
+class ServletRegistry(object):
+
+  _PROJECT_NAME_REGEX = project_constants.PROJECT_NAME_PATTERN
+  _USERNAME_REGEX = r'[-+\w=.%]+(@([-a-z0-9]+\.)*[a-z0-9]+)?'
+  _HOTLIST_ID_NAME_REGEX = r'\d+|[a-zA-Z][-0-9a-zA-Z\.]*'
+
+  def __init__(self):
+    self.routes = []
+
+  def _AddRoute(self, path_regex, servlet_class, method, does_write=False):
+    """Add a GET or POST handler to our webapp2 route list.
+
+    Args:
+      path_regex: string with webapp2 URL template regex.
+      servlet_class: a subclass of class Servlet.
+      method: string 'GET' or 'POST'.
+      does_write: True if the servlet could write to the database, we skip
+          registering such servlets when the site is in read_only mode. GET
+          handlers never write. Most, but not all, POST handlers do write.
+    """
+    if settings.read_only and does_write:
+      logging.info('Not registring %r because site is read-only', path_regex)
+      # TODO(jrobbins): register a helpful error page instead.
+    else:
+      self.routes.append(
+          webapp2.Route(path_regex, handler=servlet_class, methods=[method]))
+
+  def _SetupServlets(self, spec_dict, base='', post_does_write=True):
+    """Register each of the given servlets."""
+    for get_uri, servlet_class in spec_dict.items():
+      self._AddRoute(base + get_uri, servlet_class, 'GET')
+      post_uri = get_uri + ('edit.do' if get_uri.endswith('/') else '.do')
+      self._AddRoute(base + post_uri, servlet_class, 'POST',
+                     does_write=post_does_write)
+
+  def _SetupProjectServlets(self, spec_dict, post_does_write=True):
+    """Register each of the given servlets in the project URI space."""
+    self._SetupServlets(
+        spec_dict, base='/p/<project_name:%s>' % self._PROJECT_NAME_REGEX,
+        post_does_write=post_does_write)
+
+  def _SetupUserServlets(self, spec_dict, post_does_write=True):
+    """Register each of the given servlets in the user URI space."""
+    self._SetupServlets(
+        spec_dict, base='/u/<viewed_username:%s>' % self._USERNAME_REGEX,
+        post_does_write=post_does_write)
+
+  def _SetupGroupServlets(self, spec_dict, post_does_write=True):
+    """Register each of the given servlets in the user group URI space."""
+    self._SetupServlets(
+        spec_dict, base='/g/<viewed_username:%s>' % self._USERNAME_REGEX,
+        post_does_write=post_does_write)
+
+  def _SetupUserHotlistServlets(self, spec_dict, post_does_write=True):
+    """ Register given user hotlist servlets in the user URI space."""
+    self._SetupServlets(
+        spec_dict,
+        base ='/u/<viewed_username:%s>/hotlists/<hotlist_id:%s>'
+        % (self._USERNAME_REGEX, self._HOTLIST_ID_NAME_REGEX),
+        post_does_write=post_does_write)
+
+  def Register(self, services):
+    """Register all the monorail request handlers."""
+    self._RegisterFrameworkHandlers()
+    self._RegisterSitewideHandlers()
+    self._RegisterProjectHandlers()
+    self._RegisterIssueHandlers()
+    self._RegisterWebComponentsHanders()
+    self._RegisterRedirects()
+    self._RegisterInboundMail()
+
+    # Register pRPC API routes
+    prpc_server = prpc.Server(
+        allowed_origins=client_config_svc.GetAllowedOriginsSet())
+    api_routes_v0.RegisterApiHandlers(prpc_server, services)
+    api_routes_v3.RegisterApiHandlers(prpc_server, services)
+    self.routes.extend(prpc_server.get_routes())
+
+    autolink.RegisterAutolink(services)
+    # Error pages should be the last to register.
+    self._RegisterErrorPages()
+    return self.routes
+
+  def _RegisterProjectHandlers(self):
+    """Register page and form handlers that operate within a project."""
+
+    self._SetupServlets({
+        # Note: the following are at URLS that are not externally accessible.
+        urls.NOTIFY_RULES_DELETED_TASK: notify.NotifyRulesDeletedTask,
+    })
+    self._SetupProjectServlets({
+        urls.ADMIN_INTRO: projectsummary.ProjectSummary,
+        urls.PEOPLE_LIST: peoplelist.PeopleList,
+        urls.PEOPLE_DETAIL: peopledetail.PeopleDetail,
+        urls.UPDATES_LIST: projectupdates.ProjectUpdates,
+        urls.ADMIN_META: projectadmin.ProjectAdmin,
+        urls.ADMIN_ADVANCED: projectadminadvanced.ProjectAdminAdvanced,
+        urls.ADMIN_EXPORT: projectexport.ProjectExport,
+        urls.ADMIN_EXPORT_JSON: projectexport.ProjectExportJSON,
+        })
+
+  def _RegisterIssueHandlers(self):
+    """Register page and form handlers for the issue tracker."""
+    self._SetupServlets({
+        # Note: the following are at URLs that are not externaly accessible.
+        urls.BACKEND_SEARCH: backendsearch.BackendSearch,
+        urls.BACKEND_NONVIEWABLE: backendnonviewable.BackendNonviewable,
+        urls.RECOMPUTE_DERIVED_FIELDS_TASK:
+            filterrules.RecomputeDerivedFieldsTask,
+        urls.REINDEX_QUEUE_CRON: filterrules.ReindexQueueCron,
+        urls.NOTIFY_ISSUE_CHANGE_TASK: notify.NotifyIssueChangeTask,
+        urls.NOTIFY_BLOCKING_CHANGE_TASK: notify.NotifyBlockingChangeTask,
+        urls.NOTIFY_BULK_CHANGE_TASK: notify.NotifyBulkChangeTask,
+        urls.NOTIFY_APPROVAL_CHANGE_TASK: notify.NotifyApprovalChangeTask,
+        urls.OUTBOUND_EMAIL_TASK: notify.OutboundEmailTask,
+        urls.SPAM_DATA_EXPORT_TASK: spammodel.TrainingDataExportTask,
+        urls.DATE_ACTION_CRON: dateaction.DateActionCron,
+        urls.SPAM_TRAINING_CRON: spamtraining.TrainSpamModelCron,
+        urls.PUBLISH_PUBSUB_ISSUE_CHANGE_TASK:
+            pubsub.PublishPubsubIssueChangeTask,
+        urls.ISSUE_DATE_ACTION_TASK: dateaction.IssueDateActionTask,
+        urls.COMPONENT_DATA_EXPORT_CRON:
+          componentexport.ComponentTrainingDataExport,
+        urls.COMPONENT_DATA_EXPORT_TASK:
+          componentexport.ComponentTrainingDataExportTask,
+        urls.FLT_ISSUE_CONVERSION_TASK: fltconversion.FLTConvertTask,
+        })
+
+    self._SetupProjectServlets(
+        {
+            urls.ISSUE_APPROVAL:
+                registerpages_helpers.MakeRedirectInScope(
+                    urls.ISSUE_DETAIL, 'p', keep_qs=True),
+            urls.ISSUE_LIST:
+                webcomponentspage.WebComponentsPage,
+            urls.ISSUE_LIST_NEW_TEMP:
+                registerpages_helpers.MakeRedirectInScope(
+                    urls.ISSUE_LIST, 'p', keep_qs=True),
+            urls.ISSUE_REINDEX:
+                issuereindex.IssueReindex,
+            urls.ISSUE_DETAIL_FLIPPER_NEXT:
+                issuedetailezt.FlipperNext,
+            urls.ISSUE_DETAIL_FLIPPER_PREV:
+                issuedetailezt.FlipperPrev,
+            urls.ISSUE_DETAIL_FLIPPER_LIST:
+                issuedetailezt.FlipperList,
+            urls.ISSUE_DETAIL_FLIPPER_INDEX:
+                issuedetailezt.FlipperIndex,
+            urls.ISSUE_DETAIL_LEGACY:
+                registerpages_helpers.MakeRedirectInScope(
+                    urls.ISSUE_DETAIL, 'p', keep_qs=True),
+            urls.ISSUE_WIZARD:
+                webcomponentspage.WebComponentsPage,
+            urls.ISSUE_ENTRY:
+                issueentry.IssueEntry,
+            urls.ISSUE_ENTRY_NEW:
+                webcomponentspage.WebComponentsPage,
+            urls.ISSUE_ENTRY_AFTER_LOGIN:
+                issueentryafterlogin.IssueEntryAfterLogin,
+            urls.ISSUE_TIPS:
+                issuetips.IssueSearchTips,
+            urls.ISSUE_ATTACHMENT:
+                issueattachment.AttachmentPage,
+            urls.ISSUE_ATTACHMENT_TEXT:
+                issueattachmenttext.AttachmentText,
+            urls.ISSUE_BULK_EDIT:
+                issuebulkedit.IssueBulkEdit,
+            urls.COMPONENT_CREATE:
+                componentcreate.ComponentCreate,
+            urls.COMPONENT_DETAIL:
+                componentdetail.ComponentDetail,
+            urls.FIELD_CREATE:
+                fieldcreate.FieldCreate,
+            urls.FIELD_DETAIL:
+                fielddetail.FieldDetail,
+            urls.TEMPLATE_CREATE:
+                templatecreate.TemplateCreate,
+            urls.TEMPLATE_DETAIL:
+                templatedetail.TemplateDetail,
+            urls.WIKI_LIST:
+                redirects.WikiRedirect,
+            urls.WIKI_PAGE:
+                redirects.WikiRedirect,
+            urls.SOURCE_PAGE:
+                redirects.SourceRedirect,
+            urls.ADMIN_STATUSES:
+                issueadmin.AdminStatuses,
+            urls.ADMIN_LABELS:
+                issueadmin.AdminLabels,
+            urls.ADMIN_RULES:
+                issueadmin.AdminRules,
+            urls.ADMIN_TEMPLATES:
+                issueadmin.AdminTemplates,
+            urls.ADMIN_COMPONENTS:
+                issueadmin.AdminComponents,
+            urls.ADMIN_VIEWS:
+                issueadmin.AdminViews,
+            urls.ISSUE_ORIGINAL:
+                issueoriginal.IssueOriginal,
+            urls.ISSUE_EXPORT:
+                issueexport.IssueExport,
+            urls.ISSUE_EXPORT_JSON:
+                issueexport.IssueExportJSON,
+            urls.ISSUE_IMPORT:
+                issueimport.IssueImport,
+            urls.SPAM_MODERATION_QUEUE:
+                spam.ModerationQueue,
+        })
+
+    # GETs for /issues/detail are now handled by the web components page.
+    base = '/p/<project_name:%s>' % self._PROJECT_NAME_REGEX
+    self._AddRoute(base + urls.ISSUE_DETAIL,
+                   webcomponentspage.WebComponentsPage, 'GET')
+
+    self._SetupUserServlets({
+        urls.SAVED_QUERIES: savedqueries.SavedQueries,
+        urls.HOTLISTS: userhotlists.UserHotlists,
+        })
+
+    user_hotlists_redir = registerpages_helpers.MakeRedirectInScope(
+        urls.HOTLISTS, 'u', keep_qs=True)
+    self._SetupUserServlets({
+        '/hotlists/': user_hotlists_redir,
+        })
+
+    # These servlets accept POST, but never write to the database, so they can
+    # still be used when the site is read-only.
+    self._SetupProjectServlets({
+        urls.ISSUE_ADVSEARCH: issueadvsearch.IssueAdvancedSearch,
+        }, post_does_write=False)
+
+    list_redir = registerpages_helpers.MakeRedirectInScope(
+        urls.ISSUE_LIST, 'p', keep_qs=True)
+    self._SetupProjectServlets({
+        '': list_redir,
+        '/': list_redir,
+        '/issues': list_redir,
+        '/issues/': list_redir,
+        })
+
+    list_redir = registerpages_helpers.MakeRedirect(urls.ISSUE_LIST)
+    self._SetupServlets({
+        '/issues': list_redir,
+        '/issues/': list_redir,
+        })
+
+  def _RegisterFrameworkHandlers(self):
+    """Register page and form handlers for framework functionality."""
+    self._SetupServlets({
+        urls.CSP_REPORT: csp_report.CSPReportPage,
+
+        # These are only shown to users if specific conditions are met.
+        urls.EXCESSIVE_ACTIVITY: excessiveactivity.ExcessiveActivity,
+        urls.BANNED: banned.Banned,
+        urls.PROJECT_MOVED: moved.ProjectMoved,
+
+        # These are not externally accessible
+        urls.RAMCACHE_CONSOLIDATE_CRON: cachemanager_svc.RamCacheConsolidate,
+        urls.REAP_CRON: reap.Reap,
+        urls.SPAM_DATA_EXPORT_CRON: spammodel.TrainingDataExport,
+        urls.LOAD_API_CLIENT_CONFIGS_CRON: (
+            client_config_svc.LoadApiClientConfigs),
+        urls.CLIENT_MON: clientmon.ClientMonitor,
+        urls.TRIM_VISITED_PAGES_CRON: trimvisitedpages.TrimVisitedPages,
+        urls.TS_MON_JS: ts_mon_js.MonorailTSMonJSHandler,
+        urls.WARMUP: warmup.Warmup,
+        urls.START: warmup.Start,
+        urls.STOP: warmup.Stop
+        })
+
+  def _RegisterSitewideHandlers(self):
+    """Register page and form handlers that aren't associated with projects."""
+    self._SetupServlets({
+        urls.PROJECT_CREATE: projectcreate.ProjectCreate,
+        # The user settings page is a site-wide servlet, not under /u/.
+        urls.USER_SETTINGS: usersettings.UserSettings,
+        urls.HOSTING_HOME: hostinghome.HostingHome,
+        urls.GROUP_CREATE: groupcreate.GroupCreate,
+        urls.GROUP_LIST: grouplist.GroupList,
+        urls.GROUP_DELETE: grouplist.GroupList,
+        urls.HOTLIST_CREATE: hotlistcreate.HotlistCreate,
+        urls.BAN_SPAMMER_TASK: banspammer.BanSpammerTask,
+        urls.WIPEOUT_SYNC_CRON: deleteusers.WipeoutSyncCron,
+        urls.SEND_WIPEOUT_USER_LISTS_TASK: deleteusers.SendWipeoutUserListsTask,
+        urls.DELETE_WIPEOUT_USERS_TASK: deleteusers.DeleteWipeoutUsersTask,
+        urls.DELETE_USERS_TASK: deleteusers.DeleteUsersTask,
+        })
+
+    self._SetupUserServlets({
+        urls.USER_PROFILE: userprofile.UserProfile,
+        urls.USER_PROFILE_POLYMER: userprofile.UserProfilePolymer,
+        urls.BAN_USER: userprofile.BanUser,
+        urls.BAN_SPAMMER: banspammer.BanSpammer,
+        urls.USER_CLEAR_BOUNCING: userclearbouncing.UserClearBouncing,
+        urls.USER_UPDATES_PROJECTS: userupdates.UserUpdatesProjects,
+        urls.USER_UPDATES_DEVELOPERS: userupdates.UserUpdatesDevelopers,
+        urls.USER_UPDATES_MINE: userupdates.UserUpdatesIndividual,
+        })
+
+    self._SetupUserHotlistServlets({
+        urls.HOTLIST_ISSUES: hotlistissues.HotlistIssues,
+        urls.HOTLIST_ISSUES_CSV: hotlistissuescsv.HotlistIssuesCsv,
+        urls.HOTLIST_PEOPLE: hotlistpeople.HotlistPeopleList,
+        urls.HOTLIST_DETAIL: hotlistdetails.HotlistDetails,
+        urls.HOTLIST_RERANK_JSON: rerankhotlist.RerankHotlistIssue,
+    })
+
+    profile_redir = registerpages_helpers.MakeRedirectInScope(
+        urls.USER_PROFILE, 'u')
+    self._SetupUserServlets({'': profile_redir})
+
+    self._SetupGroupServlets({
+        urls.GROUP_DETAIL: groupdetail.GroupDetail,
+        urls.GROUP_ADMIN: groupadmin.GroupAdmin,
+        })
+
+  def _RegisterWebComponentsHanders(self):
+    """Register page handlers that are handled by WebComponentsPage."""
+    self._AddRoute('/', webcomponentspage.ProjectListPage, 'GET')
+    self._AddRoute(
+        '/hotlists<unused:.*>', webcomponentspage.WebComponentsPage, 'GET')
+    self._AddRoute('/users<unused:.*>', webcomponentspage.WebComponentsPage,
+                   'GET')
+
+  def _RegisterRedirects(self):
+    """Register redirects among pages inside monorail."""
+    redirect = registerpages_helpers.MakeRedirect('/')
+    self._SetupServlets(
+        {
+            '/projects/': redirect,
+            '/projects': redirect,
+            '/hosting/': redirect,
+            '/hosting': redirect,
+            '/p': redirect,
+            '/p/': redirect,
+            '/u': redirect,
+            '/u/': redirect,
+            '/': redirect,
+        })
+
+    redirect = registerpages_helpers.MakeRedirectInScope(
+        urls.PEOPLE_LIST, 'p')
+    self._SetupProjectServlets({
+        '/people': redirect,
+        '/people/': redirect,
+        })
+
+    redirect = registerpages_helpers.MakeRedirect(urls.GROUP_LIST)
+    self._SetupServlets({'/g': redirect})
+
+    group_redir = registerpages_helpers.MakeRedirectInScope(
+        urls.USER_PROFILE, 'g')
+    self._SetupGroupServlets({'': group_redir})
+
+  def _RegisterInboundMail(self):
+    """Register a handler for inbound email and email bounces."""
+    self.routes.append(webapp2.Route(
+        '/_ah/mail/<project_addr:.+>',
+        handler=inboundemail.InboundEmail,
+        methods=['POST', 'GET']))
+    self.routes.append(webapp2.Route(
+        '/_ah/bounce',
+        handler=inboundemail.BouncedEmail,
+        methods=['POST', 'GET']))
+
+  def _RegisterErrorPages(self):
+    """Register handlers for errors."""
+    self._AddRoute(
+        '/p/<project_name:%s>/<unrecognized:.+>' % self._PROJECT_NAME_REGEX,
+        custom_404.ErrorPage, 'GET')
diff --git a/requirements.dev.txt b/requirements.dev.txt
new file mode 100644
index 0000000..e8edf25
--- /dev/null
+++ b/requirements.dev.txt
@@ -0,0 +1,24 @@
+# Python 2 packages needed for dev_appserver.py. During deployment, these
+# packages are built into App Engine and included by declaring them in app.yaml.
+# https://cloud.google.com/appengine/docs/standard/python/tools/using-libraries-python-27#local_development
+# All packages must be at least 3 weeks old, crbug.com/1117193#c5
+# For hash-checking mode, all nested dependencies must be included.
+
+# For binary dependencies, we'll have to provide one for each platform. We're targeting:
+# * Python: cp27m, but prefer cp27mu (CPython 2.7)
+# * OS: macosx_10_* and manylinux*
+# * Architecture: x86_64
+
+mysqlclient==1.4.6 --hash=sha256:f3fdaa9a38752a3b214a6fe79d7cae3653731a53e577821f9187e67cbecb2e16
+
+# Required by grpc-google-iam-v1 <-- google-cloud-tasks
+# first sha is for cp27m-macosx_10_9_x86
+# second sha is for cp27mu-manylinux2010_x86
+# third sha is for cp27m-manylinux2010_x86
+grpcio==1.31.0 --hash=sha256:e8c3264b0fd728aadf3f0324471843f65bd3b38872bdab2a477e31ffb685dd5b \
+               --hash=sha256:92e54ab65e782f227e751c7555918afaba8d1229601687e89b80c2b65d2f6642 \
+               --hash=sha256:58d7121f48cb94535a4cedcce32921d0d0a78563c7372a143dedeec196d1c637
+
+# Required by google-cloud-tasks
+protobuf==3.12.4 --hash=sha256:3d59825cba9447e8f4fcacc1f3c892cafd28b964e152629b3f420a2fb5918b5a \
+                 --hash=sha256:6009f3ebe761fad319b52199a49f1efa7a3729302947a78a3f5ea8e7e89e3ac2
diff --git a/requirements.py2.txt b/requirements.py2.txt
new file mode 100644
index 0000000..d09804e
--- /dev/null
+++ b/requirements.py2.txt
@@ -0,0 +1,42 @@
+# Python 2 packages needed for production.
+# All packages must be at least 3 weeks old, crbug.com/1117193#c5
+# For hash-checking mode, all nested dependencies must be included.
+
+# Production packages.
+ezt==1.1 --hash=sha256:2131c2aa34d395433410b4e3cb71b22ab1471fae9da1c60e4426f74c86cb0104
+google-auth==1.20.1 --hash=sha256:ce1fb80b5c6d3dd038babcc43e221edeafefc72d983b3dc28b67b996f76f00b9
+google-cloud-tasks==1.5.0 --hash=sha256:36aa16f0c52aa9a292b1f919d2582725731e9760393c9ca98ce599c68cbf9996
+redis==3.5.3 --hash=sha256:432b788c4530cfe16d8d943a09d40ca6c16149727e4afe8c2c9d5580c59d9f24
+
+# Development packages.
+fakeredis==1.1.1 --hash=sha256:b8cf9c19fbcd53fe0512ece75b2df9430c46f75898111f50cff309c3a35b921d
+
+# Required by fakeredis
+sortedcontainers==2.3.0 --hash=sha256:37257a32add0a3ee490bb170b599e93095eed89a55da91fa9f48753ea12fd73f
+
+# Required by google-cloud-tasks
+enum34==1.1.10 --hash=sha256:a98a201d6de3f2ab3db284e70a33b0f896fbf35f8086594e8c9e74b909058d53
+googleapis-common-protos==1.52.0 --hash=sha256:c8961760f5aad9a711d37b675be103e0cc4e9a39327e0d6d857872f698403e24
+google-api-core==1.22.0 --hash=sha256:c4e3b3d914e09d181287abb7101b42f308204fa5e8f89efc4839f607303caa2f
+grpc-google-iam-v1==0.12.3 --hash=sha256:0bfb5b56f648f457021a91c0df0db4934b6e0c300bd0f2de2333383fe958aa72
+
+# Required by google-api-core
+futures==3.3.0 --hash=sha256:49b3f5b064b6e3afc3316421a3f25f66c137ae88f068abbf72830170033c5e16
+pytz==2020.1 --hash=sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed
+requests==2.24.0 --hash=sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898
+setuptools==44.1.1 --hash=sha256:27a714c09253134e60a6fa68130f78c7037e5562c4f21f8f318f2ae900d152d5
+six==1.15.0 --hash=sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced
+
+# Required by requests
+certifi==2020.6.20 --hash=sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41
+chardet==3.0.4 --hash=sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691
+idna==2.10 --hash=sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0
+urllib3==1.25.10 --hash=sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461
+
+# Required by google-auth
+cachetools==3.1.1 --hash=sha256:428266a1c0d36dc5aca63a2d7c5942e88c2c898d72139fca0e97fdd2380517ae
+pyasn1-modules==0.2.8 --hash=sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74
+rsa==4.5 --hash=sha256:35c5b5f6675ac02120036d97cf96f1fde4d49670543db2822ba5015e21a18032
+
+# Required by pyasn1-modules
+pyasn1==0.4.8 --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..ef58a25
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,17 @@
+# Python 3 packages.
+# All packages must be at least 3 weeks old, crbug.com/1117193#c5
+# For hash-checking mode, all nested dependencies must be included.
+
+# Production packages.
+appengine-python-standard==0.1.1
+ezt==1.1
+google-api-python-client==2.11.0
+google-auth==1.34.0
+google-cloud-tasks==1.5.0
+httplib2==0.19.1
+mysqlclient==2.0.1
+oauth2client==4.1.3
+redis==3.5.3
+
+# Development packages.
+fakeredis==1.5.2
diff --git a/schema/PRESUBMIT.py b/schema/PRESUBMIT.py
new file mode 100644
index 0000000..e07745c
--- /dev/null
+++ b/schema/PRESUBMIT.py
@@ -0,0 +1,35 @@
+# 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
+
+"""Presubmit script just for Monorail's SQL files."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+
+def AlterTableCheck(input_api, output_api):  # pragma: no cover
+  this_dir = input_api.PresubmitLocalPath()
+  sql_files = set(x for x in input_api.os_listdir(this_dir)
+                  if (x.endswith('.sql') and x != 'queries.sql'))
+  log_file = input_api.os_path.join(this_dir, 'alter-table-log.txt')
+  affected_files = set(f.LocalPath() for f in input_api.AffectedTextFiles())
+
+  if (any(f in affected_files for f in sql_files) ^
+      (log_file in affected_files)):
+    return [output_api.PresubmitPromptOrNotify(
+        'It looks like you have modified the sql schema without updating\n'
+        'the alter-table-log, or vice versa. Are you sure you want to do this?')
+    ]
+  return []
+
+
+def CheckChangeOnUpload(input_api, output_api):  # pragma: no cover
+  output = AlterTableCheck(input_api, output_api)
+  return output
+
+
+def CheckChangeOnCommit(input_api, output_api):  # pragma: no cover
+  output = AlterTableCheck(input_api, output_api)
+  return output
diff --git a/schema/alter-table-log.txt b/schema/alter-table-log.txt
new file mode 100644
index 0000000..26c21dd
--- /dev/null
+++ b/schema/alter-table-log.txt
@@ -0,0 +1,1744 @@
+# 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
+
+This file contains a log of ALTER TABLE statements that need to be executed
+to bring a Monorail SQL database up to the current schema.
+
+================================================================
+2012-05-24: Added more Project fields.
+
+ALTER TABLE Project ADD COLUMN read_only_reason VARCHAR(80);
+ALTER TABLE Project ADD COLUMN issue_notify_address VARCHAR(80);
+ALTER TABLE Project ADD COLUMN attachment_bytes_used INT DEFAULT 0;
+ALTER TABLE Project ADD COLUMN attachment_quota INT DEFAULT 52428800;
+ALTER TABLE Project ADD COLUMN moved_to VARCHAR(250);
+ALTER TABLE Project ADD COLUMN process_inbound_email BOOLEAN DEFAULT FALSE;
+
+================================================================
+2012-06-01: Added inbound_message for issue comments
+
+ALTER TABLE Comment ADD COLUMN inbound_message TEXT;
+
+
+================================================================
+2012-06-05: Removed send_notifications_from_user because Monorail will
+not offer that feature any time soon.
+
+ALTER TABLE ProjectIssueConfig DROP COLUMN send_notifications_from_user;
+
+
+================================================================
+2012-06-05: Add initial subscription options.
+
+ALTER TABLE User2SavedQuery ADD COLUMN subscription_mode
+    ENUM ('noemail', 'immediate') DEFAULT 'noemail' NOT NULL;
+
+
+================================================================
+2012-07-02: Revised project states and added state_reason and delete_time
+
+ALTER TABLE Project MODIFY COLUMN state ENUM ('live', 'archived', 'deletable')
+NOT NULL;
+
+ALTER TABLE Project ADD COLUMN state_reason VARCHAR(80);
+ALTER TABLE Project ADD COLUMN delete_time INT;
+
+
+================================================================
+2012-07-05: Added action limits and dismissed cues
+
+CREATE TABLE ActionLimit (
+  user_id INT NOT NULL AUTO_INCREMENT,
+  action_kind ENUM (
+      'project_creation', 'issue_comment', 'issue_attachment',
+      'issue_bulk_edit'),
+  recent_count INT,
+  reset_timestamp INT,
+  lifetime_count INT,
+  lifetime_limit INT,
+
+  PRIMARY KEY (user_id, action_kind)
+) ENGINE=INNODB;
+
+
+CREATE TABLE DismissedCues (
+  user_id INT NOT NULL AUTO_INCREMENT,
+  cue VARCHAR(40),  -- names of the cue cards that the user has dismissed.
+
+  INDEX (user_id)
+) ENGINE=INNODB;
+
+
+ALTER TABLE User ADD COLUMN ignore_action_limits BOOLEAN DEFAULT FALSE;
+
+================================================================
+2012-07-11: No longer using Counter table.
+
+DROP TABLE Counter;
+
+================================================================
+2012-09-06: Drop AttachmentContent, put blobkey in Attachment
+and drop some redundant columns.
+
+Note: This loses attachment data that might currently be in your
+instance. Good thing these schema refinements are getting done
+before launch.
+
+ALTER TABLE Attachment DROP COLUMN attachment_id;
+ALTER TABLE Attachment DROP COLUMN comment_created;
+ALTER TABLE Attachment ADD COLUMN blobkey VARCHAR(1024) NOT NULL;
+
+DROP TABLE AttachmentContent;
+
+ALTER TABLE IssueUpdate  DROP COLUMN comment_created;
+
+
+================================================================
+2012-11-01: Add Components to IssueUpdate enum.
+
+alter table IssueUpdate modify field ENUM ('summary', 'status', 'owner',
+'cc', 'labels', 'blockedon', 'blocking', 'mergedinto', 'project',
+'components') NOT NULL;
+
+
+================================================================
+2012-12-10: Add template admins and field admins
+
+
+CREATE TABLE FieldDef2Admin (
+  field_id INT NOT NULL,
+  admin_id INT NOT NULL,
+
+  PRIMARY KEY (field_id, admin_id),
+  FOREIGN KEY (field_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (admin_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+CREATE TABLE Template2Admin (
+  template_id INT NOT NULL,
+  admin_id INT NOT NULL,
+
+  PRIMARY KEY (template_id, admin_id),
+  FOREIGN KEY (template_id) REFERENCES Template(id),
+  FOREIGN KEY (admin_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+================================================================
+2012-12-14: Add a table of custom field values
+
+ALTER TABLE FieldDef MODIFY field_type ENUM (
+  'enum_type', 'int_type', 'str_type', 'user_type') NOT NULL;
+
+CREATE TABLE Issue2FieldValue (
+  iid INT NOT NULL,
+  field_id INT NOT NULL,
+
+  int_value INT,
+  str_value VARCHAR(1024),
+  user_id INT,
+
+  derived BOOLEAN DEFAULT FALSE,
+
+  INDEX (iid, field_id),
+  INDEX (field_id, int_value),
+  INDEX (field_id, str_value),
+  INDEX (field_id, user_id),
+
+  FOREIGN KEY (iid) REFERENCES Issue(id),
+  -- FOREIGN KEY (field_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+================================================================
+2012-12-18: persistence for update objects on custom fields
+
+ALTER TABLE IssueUpdate MODIFY field ENUM (
+  'summary', 'status', 'owner', 'cc', 'labels', 'blockedon', 'blocking', 'mergedinto',
+  'project', 'components', 'custom' ) NOT NULL;
+
+ALTER TABLE IssueUpdate ADD custom_field_name VARCHAR(255);
+
+
+================================================================
+2012-12-27: Rename component owner to component admin
+
+DROP TABLE Component2Owner;
+
+CREATE TABLE Component2Admin (
+  component_id SMALLINT UNSIGNED NOT NULL,
+  admin_id INT NOT NULL,
+
+  PRIMARY KEY (component_id, admin_id),
+
+  FOREIGN KEY (component_id) REFERENCES ComponentDef(id),
+  FOREIGN KEY (admin_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+================================================================
+2013-01-20: add field applicability predicate
+
+ALTER TABLE FieldDef ADD applicable_type VARCHAR(80);
+ALTER TABLE FieldDef ADD applicable_predicate TEXT;
+
+================================================================
+2013-01-25: add field validation details
+
+ALTER TABLE FieldDef ADD max_value INT;
+ALTER TABLE FieldDef ADD min_value INT;
+ALTER TABLE FieldDef ADD regex VARCHAR(80);
+ALTER TABLE FieldDef ADD needs_member BOOLEAN;
+ALTER TABLE FieldDef ADD needs_perm VARCHAR(80);
+
+
+================================================================
+2013-02-11: add grant and notify to user-valued fields
+
+ALTER TABLE FieldDef ADD grants_perm VARCHAR(80);
+ALTER TABLE FieldDef ADD notify_on ENUM ('never', 'any_comment') DEFAULT 'never' NOT NULL;
+
+
+================================================================
+2013-03-17: Add Template2FieldValue
+
+CREATE TABLE Template2FieldValue (
+  template_id INT NOT NULL,
+  field_id INT NOT NULL,
+
+  int_value INT,
+  str_value VARCHAR(1024),
+  user_id INT,
+
+  INDEX (template_id, field_id),
+
+  FOREIGN KEY (template_id) REFERENCES Template(id),
+  -- FOREIGN KEY (field_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+================================================================
+2013-05-08: eliminated same_org_only
+
+-- This needs to be done on all shards.
+UPDATE Project SET access = 'members_only' WHERE access = 'same_org_only';
+ALTER TABLE Project MODIFY COLUMN access ENUM ('anyone', 'members_only');
+
+================================================================
+2013-05-08: implemented recent activity timestamp
+
+-- This needs to be done on all shards.
+ALTER TABLE Project ADD recent_activity_timestamp INT;
+
+================================================================
+2013-07-01: use BIGINT for Invalidate timesteps
+
+ALTER TABLE Invalidate MODIFY COLUMN timestep BIGINT NOT NULL AUTO_INCREMENT;
+
+
+================================================================
+2013-07-23: renamed to avoid "participant"
+
+RENAME TABLE ParticipantDuty TO MemberDuty;
+RENAME TABLE ParticipantNotes TO MemberNotes;
+
+================================================================
+2013-08-22: renamed issue_id to local_id
+
+-- On primary and all shards
+ALTER TABLE Issue CHANGE issue_id local_id INT NOT NULL;
+
+-- On primary only
+ALTER TABLE IssueFormerLocations CHANGE issue_id local_id INT NOT NULL;
+
+================================================================
+2013-08-24: renamed iid to issue_id
+
+-- On primary and all shards
+
+ALTER TABLE IssueSummary DROP FOREIGN KEY IssueSummary_ibfk_1;
+ALTER TABLE IssueSummary CHANGE iid issue_id INT NOT NULL;
+ALTER TABLE IssueSummary ADD FOREIGN KEY (issue_id) REFERENCES Issue(id);
+
+ALTER TABLE Issue2Label DROP FOREIGN KEY Issue2Label_ibfk_1;
+ALTER TABLE Issue2Label CHANGE iid issue_id INT NOT NULL;
+ALTER TABLE Issue2Label ADD FOREIGN KEY (issue_id) REFERENCES Issue(id);
+
+ALTER TABLE Issue2Component DROP FOREIGN KEY Issue2Component_ibfk_1;
+ALTER TABLE Issue2Component CHANGE iid issue_id INT NOT NULL;
+ALTER TABLE Issue2Component ADD FOREIGN KEY (issue_id) REFERENCES Issue(id);
+
+ALTER TABLE Issue2Cc DROP FOREIGN KEY Issue2Cc_ibfk_1;
+ALTER TABLE Issue2Cc CHANGE iid issue_id INT NOT NULL;
+ALTER TABLE Issue2Cc ADD FOREIGN KEY (issue_id) REFERENCES Issue(id);
+
+ALTER TABLE Issue2Notify DROP FOREIGN KEY Issue2Notify_ibfk_1;
+ALTER TABLE Issue2Notify CHANGE iid issue_id INT NOT NULL;
+ALTER TABLE Issue2Notify ADD FOREIGN KEY (issue_id) REFERENCES Issue(id);
+
+ALTER TABLE IssueStar DROP FOREIGN KEY IssueStar_ibfk_1;
+ALTER TABLE IssueStar CHANGE iid issue_id INT NOT NULL;
+ALTER TABLE IssueStar ADD FOREIGN KEY (issue_id) REFERENCES Issue(id);
+
+ALTER TABLE IssueRelation DROP FOREIGN KEY IssueRelation_ibfk_1;
+ALTER TABLE IssueRelation CHANGE iid issue_id INT NOT NULL;
+ALTER TABLE IssueRelation ADD FOREIGN KEY (issue_id) REFERENCES Issue(id);
+
+ALTER TABLE IssueRelation CHANGE dst_iid dst_issue_id INT NOT NULL;
+
+ALTER TABLE Issue2FieldValue DROP FOREIGN KEY Issue2FieldValue_ibfk_1;
+ALTER TABLE Issue2FieldValue CHANGE iid issue_id INT NOT NULL;
+ALTER TABLE Issue2FieldValue ADD FOREIGN KEY (issue_id) REFERENCES Issue(id);
+
+-- On primary only
+ALTER TABLE Comment DROP FOREIGN KEY Comment_ibfk_2;
+ALTER TABLE Comment CHANGE iid issue_id INT NOT NULL;
+ALTER TABLE Comment ADD FOREIGN KEY (issue_id) REFERENCES Issue(id);
+
+ALTER TABLE Attachment DROP FOREIGN KEY Attachment_ibfk_1;
+ALTER TABLE Attachment CHANGE iid issue_id INT NOT NULL;
+ALTER TABLE Attachment ADD FOREIGN KEY (issue_id) REFERENCES Issue(id);
+
+ALTER TABLE IssueUpdate DROP FOREIGN KEY IssueUpdate_ibfk_1;
+ALTER TABLE IssueUpdate CHANGE iid issue_id INT NOT NULL;
+ALTER TABLE IssueUpdate ADD FOREIGN KEY (issue_id) REFERENCES Issue(id);
+
+-- I was missing a foreign key constraint here.  Adding now.
+ALTER TABLE IssueFormerLocations CHANGE iid issue_id INT NOT NULL;
+ALTER TABLE IssueFormerLocations ADD FOREIGN KEY (issue_id) REFERENCES Issue(id);
+
+-- I was missing a foreign key constraint here.  Adding now.
+ALTER TABLE ReindexQueue CHANGE iid issue_id INT NOT NULL;
+ALTER TABLE ReindexQueue ADD FOREIGN KEY (issue_id) REFERENCES Issue(id);
+
+
+================================================================
+2013-08-30: added per-project email sending flag
+
+-- On primary and all shards
+ALTER TABLE Project ADD COLUMN deliver_outbound_email BOOLEAN DEFAULT FALSE;
+
+
+================================================================
+2013-10-30: renamed prompts to templates
+
+ALTER TABLE ProjectIssueConfig
+CHANGE default_prompt_for_developers default_template_for_developers INT NOT NULL;
+
+ALTER TABLE ProjectIssueConfig
+CHANGE default_prompt_for_users default_template_for_users INT NOT NULL;
+
+ALTER TABLE Template
+CHANGE prompt_name name VARCHAR(255) NOT NULL,
+CHANGE prompt_text content TEXT,
+CHANGE prompt_summary summary TEXT,
+CHANGE prompt_summary_must_be_edited summary_must_be_edited BOOLEAN,
+CHANGE prompt_owner_id owner_id INT,
+CHANGE prompt_status status VARCHAR(255),
+CHANGE prompt_members_only members_only BOOLEAN;
+
+
+================================================================
+2013-11-18: add LocalIDCounter to primary DB only, and fill in values.
+
+CREATE TABLE LocalIDCounter (
+  project_id SMALLINT UNSIGNED NOT NULL,
+  used_local_id INT NOT NULL,
+
+  PRIMARY KEY (project_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+
+-- Note: this ignores former issue locations, so it can only be run
+-- now, before the "move issue" feature is offered.
+REPLACE INTO LocalIDCounter
+SELECT project_id, MAX(local_id)
+FROM Issue
+GROUP BY project_id;
+
+================================================================
+2015-06-12: add issue_id to Invalidate's enum for kind.
+
+ALTER TABLE Invalidate CHANGE kind kind ENUM('user', 'project', 'issue', 'issue_id');
+
+================================================================
+2015-07-24: Rename blobkey to gcs_object_id because we are using
+Google Cloud storage now.
+
+ALTER TABLE Attachment CHANGE blobkey gcs_object_id VARCHAR(1024) NOT NULL;
+
+===============================================================
+2015-08-14: Use MurmurHash3 to deterministically generate user ids.
+
+-- First, drop foreign key constraints, then alter the keys, then
+-- add back the foreign key constraints.
+
+ALTER TABLE User2Project DROP FOREIGN KEY user2project_ibfk_2;
+ALTER TABLE ExtraPerm DROP FOREIGN KEY extraperm_ibfk_2;
+ALTER TABLE MemberNotes DROP FOREIGN KEY membernotes_ibfk_2;
+ALTER TABLE UserStar DROP FOREIGN KEY userstar_ibfk_1;
+ALTER TABLE UserStar DROP FOREIGN KEY userstar_ibfk_2;
+ALTER TABLE ProjectStar DROP FOREIGN KEY projectstar_ibfk_1;
+ALTER TABLE UserGroup DROP FOREIGN KEY usergroup_ibfk_1;
+ALTER TABLE UserGroup DROP FOREIGN KEY usergroup_ibfk_2;
+ALTER TABLE UserGroupSettings DROP FOREIGN KEY usergroupsettings_ibfk_1;
+ALTER TABLE QuickEditHistory DROP FOREIGN KEY quickedithistory_ibfk_2;
+ALTER TABLE QuickEditMostRecent DROP FOREIGN KEY quickeditmostrecent_ibfk_2;
+ALTER TABLE Issue DROP FOREIGN KEY issue_ibfk_2;
+ALTER TABLE Issue DROP FOREIGN KEY issue_ibfk_3;
+ALTER TABLE Issue DROP FOREIGN KEY issue_ibfk_4;
+ALTER TABLE Issue2Cc DROP FOREIGN KEY issue2cc_ibfk_2;
+ALTER TABLE IssueStar DROP FOREIGN KEY issuestar_ibfk_1;  -- ?
+ALTER TABLE Issue2FieldValue DROP FOREIGN KEY issue2fieldvalue_ibfk_2;
+ALTER TABLE Comment DROP FOREIGN KEY comment_ibfk_3;
+ALTER TABLE Comment DROP FOREIGN KEY comment_ibfk_4;
+ALTER TABLE FieldDef2Admin DROP FOREIGN KEY fielddef2admin_ibfk_2;
+ALTER TABLE Template2Admin DROP FOREIGN KEY template2admin_ibfk_2;
+ALTER TABLE Template2FieldValue DROP FOREIGN KEY template2fieldvalue_ibfk_2;
+ALTER TABLE Component2Admin DROP FOREIGN KEY component2admin_ibfk_2;
+ALTER TABLE Component2Cc DROP FOREIGN KEY component2cc_ibfk_2;
+ALTER TABLE User2SavedQuery DROP FOREIGN KEY user2savedquery_ibfk_1;
+
+
+ALTER TABLE User MODIFY user_id INT UNSIGNED NOT NULL;
+ALTER TABLE ActionLimit MODIFY user_id INT UNSIGNED NOT NULL;
+ALTER TABLE DismissedCues MODIFY user_id INT UNSIGNED NOT NULL;
+ALTER TABLE User2Project MODIFY user_id INT UNSIGNED NOT NULL;
+ALTER TABLE ExtraPerm MODIFY user_id INT UNSIGNED NOT NULL;
+ALTER TABLE MemberNotes MODIFY user_id INT UNSIGNED NOT NULL;
+ALTER TABLE UserStar MODIFY starred_user_id INT UNSIGNED NOT NULL,
+                     MODIFY user_id INT UNSIGNED NOT NULL;
+ALTER TABLE ProjectStar MODIFY user_id INT UNSIGNED NOT NULL;
+ALTER TABLE UserGroup MODIFY user_id INT UNSIGNED NOT NULL;
+ALTER TABLE UserGroup MODIFY group_id INT UNSIGNED NOT NULL;
+ALTER TABLE UserGroupSettings MODIFY group_id INT UNSIGNED NOT NULL;
+ALTER TABLE QuickEditHistory MODIFY user_id INT UNSIGNED NOT NULL;
+ALTER TABLE QuickEditMostRecent MODIFY user_id INT UNSIGNED NOT NULL;
+ALTER TABLE Issue MODIFY reporter_id INT UNSIGNED NOT NULL,
+                  MODIFY owner_id INT UNSIGNED,
+                  MODIFY derived_owner_id INT UNSIGNED;
+ALTER TABLE Issue2Cc MODIFY cc_id INT UNSIGNED NOT NULL;
+ALTER TABLE IssueStar MODIFY user_id INT UNSIGNED NOT NULL;
+ALTER TABLE Issue2FieldValue MODIFY user_id INT UNSIGNED;
+ALTER TABLE Comment MODIFY commenter_id INT UNSIGNED NOT NULL;
+ALTER TABLE Comment MODIFY deleted_by INT UNSIGNED;
+ALTER TABLE IssueUpdate MODIFY added_user_id INT UNSIGNED,
+                        MODIFY removed_user_id INT UNSIGNED;
+ALTER TABLE Template MODIFY owner_id INT UNSIGNED;
+ALTER TABLE FieldDef2Admin MODIFY admin_id INT UNSIGNED NOT NULL;
+ALTER TABLE Template2Admin MODIFY admin_id INT UNSIGNED NOT NULL;
+ALTER TABLE Template2FieldValue MODIFY user_id INT UNSIGNED;
+ALTER TABLE Component2Admin MODIFY admin_id INT UNSIGNED NOT NULL;
+ALTER TABLE Component2Cc MODIFY cc_id INT UNSIGNED NOT NULL;
+ALTER TABLE User2SavedQuery MODIFY user_id INT UNSIGNED NOT NULL;
+
+ALTER TABLE User2Project ADD CONSTRAINT user2project_ibfk_2 FOREIGN KEY (user_id) REFERENCES User(user_id);
+ALTER TABLE ExtraPerm ADD CONSTRAINT extraperm_ibfk_2  FOREIGN KEY (user_id) REFERENCES User(user_id);
+ALTER TABLE MemberNotes ADD CONSTRAINT membernotes_ibfk_2  FOREIGN KEY (user_id) REFERENCES User(user_id);
+ALTER TABLE UserStar ADD CONSTRAINT userstar_ibfk_1  FOREIGN KEY (user_id) REFERENCES User(user_id);
+ALTER TABLE UserStar ADD CONSTRAINT userstar_ibfk_2  FOREIGN KEY (starred_user_id) REFERENCES User(user_id);
+ALTER TABLE ProjectStar ADD CONSTRAINT projectstar_ibfk_1  FOREIGN KEY (user_id) REFERENCES User(user_id);
+ALTER TABLE UserGroup ADD CONSTRAINT usergroup_ibfk_1  FOREIGN KEY (user_id) REFERENCES User(user_id);
+ALTER TABLE UserGroup ADD CONSTRAINT usergroup_ibfk_2  FOREIGN KEY (group_id) REFERENCES User(user_id);
+ALTER TABLE UserGroupSettings ADD CONSTRAINT usergroupsettings_ibfk_1  FOREIGN KEY (group_id) REFERENCES User(user_id);
+ALTER TABLE QuickEditHistory ADD CONSTRAINT quickedithistory_ibfk_2  FOREIGN KEY (user_id) REFERENCES User(user_id);
+ALTER TABLE QuickEditMostRecent ADD CONSTRAINT quickeditmostrecent_ibfk_2  FOREIGN KEY (user_id) REFERENCES User(user_id);
+ALTER TABLE Issue ADD CONSTRAINT issue_ibfk_2  FOREIGN KEY (reporter_id) REFERENCES User(user_id);
+ALTER TABLE Issue ADD CONSTRAINT issue_ibfk_3  FOREIGN KEY (owner_id) REFERENCES User(user_id);
+ALTER TABLE Issue ADD CONSTRAINT issue_ibfk_4  FOREIGN KEY (derived_owner_id) REFERENCES User(user_id);
+ALTER TABLE Issue2Cc ADD CONSTRAINT issue2cc_ibfk_2  FOREIGN KEY (cc_id) REFERENCES User(user_id);
+ALTER TABLE IssueStar ADD CONSTRAINT issuestar_ibfk_1  FOREIGN KEY (user_id) REFERENCES User(user_id);
+ALTER TABLE Issue2FieldValue ADD CONSTRAINT issue2fieldvalue_ibfk_2  FOREIGN KEY (user_id) REFERENCES User(user_id);
+ALTER TABLE Comment ADD CONSTRAINT comment_ibfk_3  FOREIGN KEY (commenter_id) REFERENCES User(user_id);
+ALTER TABLE Comment ADD CONSTRAINT comment_ibfk_4  FOREIGN KEY (deleted_by) REFERENCES User(user_id);
+ALTER TABLE FieldDef2Admin ADD CONSTRAINT fielddef2admin_ibfk_2  FOREIGN KEY (admin_id) REFERENCES User(user_id);
+ALTER TABLE Template2Admin ADD CONSTRAINT template2admin_ibfk_2  FOREIGN KEY (admin_id) REFERENCES User(user_id);
+ALTER TABLE Template2FieldValue ADD CONSTRAINT template2fieldvalue_ibfk_2  FOREIGN KEY (user_id) REFERENCES User(user_id);
+ALTER TABLE Component2Admin ADD CONSTRAINT component2admin_ibfk_2  FOREIGN KEY (admin_id) REFERENCES User(user_id);
+ALTER TABLE Component2Cc ADD CONSTRAINT component2cc_ibfk_2  FOREIGN KEY (cc_id) REFERENCES User(user_id);
+ALTER TABLE User2SavedQuery ADD CONSTRAINT user2savedquery_ibfk_1  FOREIGN KEY (user_id) REFERENCES User(user_id);
+
+================================================================
+2015-08-20: Add obscure_email column to User.
+
+ALTER TABLE User ADD obscure_email BOOLEAN DEFAULT TRUE;
+
+================================================================
+2015-09-14: Add role column to UserGroup.
+
+ALTER TABLE UserGroup ADD COLUMN role ENUM ('owner', 'member') NOT NULL DEFAULT 'member';
+
+================================================================
+2015-09-14: Remove via_id column from UserGroup.
+
+ALTER TABLE UserGroup DROP COLUMN via_id;
+
+================================================================
+2015-09-14: Add foreign key constraints to Issue2Foo tables
+
+ALTER TABLE Issue ADD CONSTRAINT issue_ibfk_5  FOREIGN KEY (status_id) REFERENCES StatusDef(id);
+ALTER TABLE Issue2Component ADD CONSTRAINT issue2component_ibfk_2  FOREIGN KEY (component_id) REFERENCES ComponentDef(id);
+ALTER TABLE Issue2Label ADD CONSTRAINT issue2label_ibfk_2  FOREIGN KEY (label_id) REFERENCES LabelDef(id);
+ALTER TABLE Issue2FieldValue ADD CONSTRAINT issue2fieldvalue_ibfk_3  FOREIGN KEY (field_id) REFERENCES FieldDef(id);
+
+================================================================
+2015-09-16: Use Binary collation on Varchar unique keys
+
+ALTER TABLE StatusDef MODIFY status VARCHAR(80) BINARY NOT NULL;
+ALTER TABLE ComponentDef MODIFY path VARCHAR(255) BINARY NOT NULL;
+ALTER TABLE LabelDef MODIFY label VARCHAR(80) BINARY NOT NULL;
+ALTER TABLE FieldDef MODIFY field_name VARCHAR(80) BINARY NOT NULL;
+ALTER TABLE Template MODIFY name VARCHAR(255) BINARY NOT NULL;
+
+================================================================
+2015-09-16: Have components use the same ID schema as Labels/Statuses
+
+ALTER TABLE ComponentDef MODIFY id INT NOT NULL AUTO_INCREMENT;
+ALTER TABLE Component2Admin MODIFY component_id INT NOT NULL;
+ALTER TABLE Component2Cc MODIFY component_id INT NOT NULL;
+ALTER TABLE Issue2Component MODIFY component_id INT NOT NULL;
+
+================================================================
+2015-09-17: Introduce DanglingIssueRelation table
+
+ALTER TABLE IssueRelation ADD CONSTRAINT issuerelation_ibfk_2  FOREIGN KEY (dst_issue_id) REFERENCES Issue(id);
+
+CREATE TABLE DanglingIssueRelation (
+  issue_id INT NOT NULL,
+  dst_issue_project VARCHAR(80),
+  dst_issue_local_id INT,
+
+  -- This table uses 'blocking' so that it can guarantee the src issue
+  -- always exists, while the dst issue is always the dangling one.
+  kind ENUM ('blockedon', 'blocking', 'mergedinto') NOT NULL,
+
+  PRIMARY KEY (issue_id, dst_issue_project, dst_issue_local_id),
+  INDEX (issue_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id)
+) ENGINE=INNODB;
+
+================================================================
+2015-09-18: Convert table char encodings to utf8.
+
+ALTER DATABASE monorail CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;
+ALTER TABLE Comment CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
+ALTER TABLE ComponentDef CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
+ALTER TABLE FieldDef CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
+ALTER TABLE IssueSummary CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
+ALTER TABLE LabelDef CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
+ALTER TABLE MemberNotes CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
+ALTER TABLE Project CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
+ALTER TABLE StatusDef CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
+
+================================================================
+2015-09-22: Make IssueRelation primary key more specific
+
+ALTER TABLE IssueRelation DROP PRIMARY KEY, ADD PRIMARY KEY (issue_id, dst_issue_id, kind);
+ALTER TABLE DanglingIssueRelation DROP PRIMARY KEY, ADD PRIMARY KEY (issue_id, dst_issue_project, dst_issue_local_id, kind);
+
+================================================================
+2015-09-29: Make cache_key unsigned so unsigned user ids can be invalidated.
+
+ALTER TABLE Invalidate MODIFY cache_key INT UNSIGNED NOT NULL;
+
+================================================================
+2015-09-29: Add external_group_type and external_group_name to UserGroupSettings
+
+ALTER TABLE UserGroupSettings ADD COLUMN external_group_type ENUM ('chrome_infra_auth', 'mdb');
+ALTER TABLE UserGroupSettings ADD COLUMN last_sync_time INT;
+
+================================================================
+2015-10-27: Eliminate Project.deliver_outbound_email because we have separate staging and prod instances.
+
+ALTER TABLE Project DROP COLUMN deliver_outbound_email;
+
+================================================================
+2015-10-27: Add SpamReport and is_spam fields to Issue and Comment
+
+ALTER TABLE Issue ADD COLUMN is_spam BOOL DEFAULT FALSE;
+ALTER TABLE Issue ADD INDEX (is_spam, project_id);
+
+ALTER TABLE Comment ADD COLUMN is_spam BOOL DEFAULT FALSE;
+ALTER TABLE Comment ADD INDEX (is_spam, project_id, created);
+
+-- Created whenever a user reports an issue or comment as spam.
+-- Note this is distinct from a SpamVerdict, which is issued by
+-- the system rather than a human user.
+CREATE TABLE SpamReport (
+  -- when this report was generated
+  created TIMESTAMP NOT NULL,
+  -- when the reported content was generated
+  content_created TIMESTAMP NOT NULL,
+	-- id of the reporting user
+  user_id INT UNSIGNED NOT NULL,
+	-- id of the reported user
+  reported_user_id INT UNSIGNED NOT NULL,
+  -- either this or issue_id must be set
+  comment_id INT,
+  -- either this or comment_id must be set
+  issue_id INT,
+
+  INDEX (issue_id),
+  INDEX (comment_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (comment_id) REFERENCES Comment(id)
+);
+
+================================================================
+2015-11-03: Add new external group type chromium_committers
+
+ALTER TABLE UserGroupSettings MODIFY COLUMN external_group_type ENUM ('chrome_infra_auth', 'mdb', 'chromium_committers');
+
+================================================================
+2015-11-4: Add SpamVerdict table.
+
+-- Any time a human or the system sets is_spam to true,
+-- or changes it from true to false, we want to have a
+-- record of who did it and why.
+CREATE TABLE SpamVerdict (
+  -- when this verdict was generated
+  created TIMESTAMP NOT NULL,
+
+	-- id of the reporting user, may be null if it was
+  -- an automatic classification.
+  user_id INT UNSIGNED,
+
+  -- either this or issue_id must be set
+  comment_id INT,
+
+  -- either this or comment_id must be set
+  issue_id INT,
+
+  INDEX (issue_id),
+  INDEX (comment_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (comment_id) REFERENCES Comment(id),
+
+  -- If the classifier issued the verdict, this should
+  -- be set.
+  classifier_confidence FLOAT,
+
+  -- This should reflect the new is_spam value that was applied
+  -- by this verdict, not the value it had prior.
+  is_spam BOOLEAN NOT NULL,
+
+  -- owner: a project owner marked it as spam
+  -- threshhold: number of SpamReports from non-members was exceeded.
+  -- classifier: the automatic classifier reports it as spam.
+  reason ENUM ("manual", "threshold", "classifier") NOT NULL
+);
+
+ALTER TABLE LocalIDCounter ADD used_spam_id int(11) NOT NULL;
+
+================================================================
+2015-11-13: Add Template2Component table.
+
+CREATE TABLE Template2Component (
+  template_id INT NOT NULL,
+  component_id INT NOT NULL,
+
+  PRIMARY KEY (template_id, component_id),
+
+  FOREIGN KEY (template_id) REFERENCES Template(id),
+  FOREIGN KEY (component_id) REFERENCES ComponentDef(id)
+) ENGINE=INNODB;
+
+================================================================
+2015-11-13: Add new external group type baggins
+
+ALTER TABLE UserGroupSettings MODIFY COLUMN external_group_type ENUM ('chrome_infra_auth', 'mdb', 'chromium_committers', 'baggins');
+
+================================================================
+2015-11-18: Add new action kind api_request in ActionLimit
+
+ALTER TABLE ActionLimit MODIFY COLUMN action_kind ENUM ('project_creation', 'issue_comment', 'issue_attachment', 'issue_bulk_edit', 'api_request');
+
+================================================================
+2015-11-24: Add shard column to Issue, add indexes, and UPDATE existing rows.
+
+ALTER TABLE Issue ADD COLUMN shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL;
+
+UPDATE Issue set shard = id % 10;
+
+ALTER TABLE Issue ADD INDEX (shard, status_id);
+ALTER TABLE Issue ADD INDEX (shard, project_id);
+
+================================================================
+2015-11-25: Remove external group type chromium_committers
+
+ALTER TABLE UserGroupSettings MODIFY COLUMN external_group_type ENUM ('chrome_infra_auth', 'mdb', 'baggins');
+
+================================================================
+2015-12-08: Modify handling of hidden well-known labels/statuses
+
+ALTER TABLE StatusDef ADD COLUMN hidden BOOLEAN DEFAULT FALSE;
+ALTER TABLE LabelDef ADD COLUMN hidden BOOLEAN DEFAULT FALSE;
+
+UPDATE StatusDef SET status=TRIM(LEADING '#' FROM status), hidden=TRUE WHERE status COLLATE UTF8_GENERAL_CI LIKE '#%';
+UPDATE LabelDef SET label=TRIM(LEADING '#' FROM label), hidden=TRUE WHERE label COLLATE UTF8_GENERAL_CI LIKE '#%';
+
+================================================================
+2015-12-11: Speed up moderation queue queries.
+
+ALTER TABLE SpamVerdict ADD INDEX(classifier_confidence);
+
+================================================================
+2015-12-14: Give components 'deprecated' col to match labels/statuses
+
+ALTER TABLE StatusDef CHANGE hidden deprecated BOOLEAN DEFAULT FALSE;
+ALTER TABLE LabelDef CHANGE hidden deprecated BOOLEAN DEFAULT FALSE;
+ALTER TABLE ComponentDef ADD COLUMN deprecated BOOLEAN DEFAULT FALSE;
+
+================================================================
+2015-12-14: Add table Group2Project
+
+CREATE TABLE Group2Project (
+  group_id INT UNSIGNED NOT NULL,
+  project_id SMALLINT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (group_id, project_id),
+
+  FOREIGN KEY (group_id) REFERENCES UserGroupSettings(group_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+================================================================
+2015-12-15: Increase maximum attachment quota bytes
+
+ALTER TABLE Project MODIFY attachment_bytes_used BIGINT DEFAULT 0;
+ALTER TABLE Project MODIFY attachment_quota BIGINT DEFAULT 0;
+
+================================================================
+2015-12-15: Simplify moderation queue queries.
+
+ALTER TABLE SpamVerdict ADD COLUMN overruled BOOL NOT NULL;
+ALTER TABLE SpamVerdict ADD COLUMN project_id INT NOT NULL;
+UPDATE SpamVerdict s JOIN Issue i ON i.id=s.issue_id SET s.project_id=i.project_id;
+
+================================================================
+2015-12-17: Add cols home_page and logo to table Project
+
+ALTER TABLE Project ADD COLUMN home_page VARCHAR(250);
+ALTER TABLE Project ADD COLUMN logo_gcs_id VARCHAR(250);
+ALTER TABLE Project ADD COLUMN logo_file_name VARCHAR(250);
+
+================================================================
+2015-12-28: Add component_required col to table Template;
+
+ALTER TABLE Template ADD component_required BOOLEAN DEFAULT FALSE;
+
+================================================================
+2016-01-05: Add issue_shard column to Issue2Label, Issue2Component,
+add indexes, and UPDATE existing rows.
+
+ALTER TABLE Issue2Component ADD COLUMN issue_shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL;
+UPDATE Issue2Component set issue_shard = issue_id % 10;
+ALTER TABLE Issue2Component ADD INDEX (component_id, issue_shard);
+
+ALTER TABLE Issue2Label ADD COLUMN issue_shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL;
+UPDATE Issue2Label set issue_shard = issue_id % 10;
+ALTER TABLE Issue2Label ADD INDEX (label_id, issue_shard);
+
+================================================================
+2016-01-06: Add period_soft_limit and period_hard_limit columns to ActionLimit
+
+ALTER TABLE ActionLimit ADD COLUMN period_soft_limit INT;
+ALTER TABLE ActionLimit ADD COLUMN period_hard_limit INT;
+
+================================================================
+2016-01-08: Add issue_shard column to Issue2FieldValue, Issue2Cc,
+add indexes, and UPDATE existing rows.
+
+ALTER TABLE Issue2FieldValue ADD COLUMN issue_shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL;
+UPDATE Issue2FieldValue SET issue_shard = issue_id % 10;
+ALTER TABLE Issue2FieldValue ADD INDEX (field_id, issue_shard, int_value);
+ALTER TABLE Issue2FieldValue ADD INDEX (field_id, issue_shard, str_value(255));
+ALTER TABLE Issue2FieldValue ADD INDEX (field_id, issue_shard, user_id);
+
+ALTER TABLE Issue2Cc ADD COLUMN issue_shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL;
+UPDATE Issue2Cc SET issue_shard = issue_id % 10;
+ALTER TABLE Issue2Cc ADD INDEX (cc_id, issue_shard);
+
+================================================================
+2015-12-17: Add documentation forwarding for /wiki urls
+
+ALTER TABLE Project ADD COLUMN docs_url VARCHAR(250);
+
+================================================================
+2015-12-17: Ensure SavedQueries never have null ids
+
+ALTER TABLE SavedQuery MODIFY id INT NOT NULL AUTO INCREMENT;
+
+================================================================
+2016-02-04: Add created, creator_id, modified, modifier_id for components
+
+ALTER TABLE ComponentDef ADD COLUMN created INT;
+ALTER TABLE ComponentDef ADD COLUMN creator_id INT UNSIGNED;
+ALTER TABLE ComponentDef ADD FOREIGN KEY (creator_id) REFERENCES User(user_id);
+ALTER TABLE ComponentDef ADD COLUMN modified INT;
+ALTER TABLE ComponentDef ADD COLUMN modifier_id INT UNSIGNED;
+ALTER TABLE ComponentDef ADD FOREIGN KEY (modifier_id) REFERENCES User(user_id);
+
+================================================================
+2016-02-19: Opt all privileged accounts into displaying full email.
+
+UPDATE User SET obscure_email = FALSE WHERE email LIKE "%@chromium.org";
+UPDATE User SET obscure_email = FALSE WHERE email LIKE "%@webrtc.org";
+UPDATE User SET obscure_email = FALSE WHERE email LIKE "%@google.com";
+
+================================================================
+2016-04-11: Increase email length limit to 255
+
+ALTER TABLE User MODIFY email VARCHAR(255);
+
+================================================================
+2016-04-14: Add forwarding for /source urls
+
+ALTER TABLE Project ADD COLUMN source_url VARCHAR(250);
+
+================================================================
+2016-04-27: Add prefs for compact email subject lines
+
+ALTER TABLE User ADD COLUMN email_compact_subject BOOLEAN DEFAULT FALSE;
+ALTER TABLE User ADD COLUMN email_view_widget BOOLEAN DEFAULT TRUE;
+
+================================================================
+2016-05-13: Add component labels
+
+CREATE TABLE Component2Label (
+  component_id INT NOT NULL,
+  label_id INT NOT NULL,
+
+  PRIMARY KEY (component_id, label_id),
+
+  FOREIGN KEY (component_id) REFERENCES ComponentDef(id),
+  FOREIGN KEY (label_id) REFERENCES LabelDef(id)
+) ENGINE=INNODB;
+
+================================================================
+2016-05-23: Add default search for members
+
+ALTER TABLE ProjectIssueConfig ADD COLUMN member_default_query TEXT;
+
+================================================================
+2016-06-17: Add is_description column to Comment
+
+Local:
+% pt-online-schema-change --alter "ADD COLUMN is_description BOOLEAN DEFAULT FALSE" D=monorail,t=Comment --host=localhost --user=root --alter-foreign-keys-method=rebuild_constraints --execute
+
+Staging/Production:
+% pt-online-schema-change --alter "ADD COLUMN is_description BOOLEAN DEFAULT FALSE" D=monorail,t=Comment,h=<primary IP address>,u=$USER,p=test --alter-forieign-keys-method=rebuild_constraints --recursion-method=hosts --execute
+
+================================================================
+2016-05-13: Add table AutocompleteExclusion
+
+CREATE TABLE AutocompleteExclusion (
+  project_id SMALLINT UNSIGNED NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (project_id, user_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+===============================================================
+2016-06-30: Update table character encodings to allow Emoji support.
+
+/* DO NOT RUN THESE STATEMENTS ON PROD OR STAGING. They are fine for localhost
+but be warned they will lock the db for some time if you have gigs of data in
+these tables */
+
+ALTER TABLE `monorail`.`Comment` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `monorail`.`IssueUpdate` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `monorail`.`IssueSummary` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+/* This is what I ran on production: */
+% pt-online-schema-change --alter "CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci" D=monorail,t=Comment,h=<primary IP> --alter-foreign-keys-method=rebuild_constraints --no-drop-old-table --recursion-method=hosts --check-slave-lag=h=<one of the replicas' IP> --print --execute
+
+% pt-online-schema-change --alter "CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci" D=monorail,t=IssueUpdate,h=<primary IP> --alter-foreign-keys-method=rebuild_constraints --no-drop-old-table --recursion-method=hosts --check-slave-lag=h=<one of the replicas' IP> --print --execute
+
+% pt-online-schema-change --alter "CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci" D=monorail,t=IssueSummary,h=<primary IP> --alter-foreign-keys-method=rebuild_constraints --no-drop-old-table --recursion-method=hosts --check-slave-lag=h=<one of the replicas' IP> --print --execute
+
+/* And then these two which ran very quickly: */
+ALTER TABLE `monorail`.`Template` CHANGE `content` `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `monorail`.`Template` CHANGE `summary` `summary` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+===============================================================
+2016-07-07: Add rank to IssueRelation
+
+ALTER TABLE IssueRelation ADD COLUMN rank BIGINT;
+
+==============================================================
+2016-07-13: Set default rank for blockedon relations
+
+UPDATE IssueRelation SET rank = 0 WHERE kind = 'blockedon';
+
+================================================================
+2016-08-01: Add timestamps for issue field changes
+
+DO NOT RUN THIS STATEMENT ON PROD OR STAGING.  It is fine for localhost
+but be warned that it will lock the db for some time if you have gigs of data in
+these tables.
+ALTER TABLE Issue
+  ADD COLUMN owner_modified INT,
+  ADD COLUMN status_modified INT,
+  ADD COLUMN component_modified INT;
+
+Staging/Production:
+% pt-online-schema-change \
+  --alter "ADD COLUMN owner_modified INT, ADD COLUMN status_modified INT, ADD COLUMN component_modified INT" \
+  D=monorail,t=Issue,h=<primary IP address>,u=$USER,p=<your mysql password> \
+  --alter-foreign-keys-method=rebuild_constraints --recursion-method=hosts --execute
+
+==============================================================
+2016-08-05: Add tables Hotlist, Hotlist2Issue, Hotlist2User
+
+CREATE TABLE Hotlist (
+  id INT UNSIGNED NOT NULL AUTO_INCREMENT,
+  name VARCHAR(80) NOT NULL,
+
+  summary TEXT,
+  description TEXT,
+
+  is_private BOOLEAN DEFAULT FALSE,
+
+  PRIMARY KEY (id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Hotlist2Issue (
+  hotlist_id INT UNSIGNED NOT NULL,
+  issue_id INT NOT NULL,
+
+  rank BIGINT NOT NULL,
+
+  PRIMARY KEY (hotlist_id, issue_id),
+  INDEX (hotlist_id),
+  INDEX (issue_id),
+  FOREIGN KEY (hotlist_id) REFERENCES Hotlist(id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Hotlist2User (
+  hotlist_id INT UNSIGNED NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+
+  role_name ENUM ('owner', 'member', 'follower') NOT NULL,
+
+  PRIMARY KEY (hotlist_id, user_id),
+  INDEX (hotlist_id),
+  INDEX (user_id),
+  FOREIGN KEY (hotlist_id) REFERENCES Hotlist(id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+==============================================================
+2016-08-10: Improve Hotlist schema
+
+ALTER TABLE Hotlist ADD COLUMN default_col_spec TEXT;
+
+ALTER TABLE Hotlist2User CHANGE role_name
+  role_name ENUM('owner', 'editor', 'follower');
+
+==============================================================
+2016-08-15: Add hotlist to Invalidate table
+
+ALTER TABLE Invalidate CHANGE kind
+  kind ENUM('user', 'project', 'issue', 'issue_id', 'hotlist');
+
+================================================================
+2016-09-21: Create the CommentContent table with emoji support.
+
+CREATE TABLE CommentContent (
+  id INT NOT NULL AUTO_INCREMENT,
+  -- TODO(jrobbins): drop comment_id after Comment.commentcontent_id is added.
+  comment_id INT NOT NULL,  -- Note: no forign key reference.
+  content MEDIUMTEXT COLLATE utf8mb4_unicode_ci,
+  inbound_message MEDIUMTEXT COLLATE utf8mb4_unicode_ci,
+
+  PRIMARY KEY (id),
+  UNIQUE KEY (comment_id)  -- TODO: drop this too.
+) ENGINE=INNODB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+To copy comment strings from Comment to CommentContent, use
+the SQL procedure in monorail/tools/copy-comment-to-commentcontent.sql.
+
+If you need to roll back, you can reverse the process by reading
+and carefully using the SQL procedure in
+monorail/tools/copy-new-commentcontent-back-to-comment.sql.
+
+Optionally, after you have all comment content strings in
+CommentContent, you can reduce the size of the Comment table by using
+the procedure in monorail/tools/null-comment-table-strings.sql.
+This can make it faster to make more changes to the Comment table.
+
+================================================================
+2016-09-29: Drop was_escaped after Comment table is made smaller
+
+ALTER TABLE Comment DROP COLUMN was_escaped;
+
+================================================================
+2016-10-03: Add date-type custom fields
+
+ALTER TABLE Issue2FieldValue ADD date_value INT;
+ALTER TABLE Issue2FieldValue ADD INDEX (field_id, issue_shard, date_value);
+ALTER TABLE Template2FieldValue ADD date_value INT;
+ALTER TABLE FieldDef CHANGE field_type field_type ENUM (
+    'enum_type', 'int_type', 'str_type', 'user_type', 'date_type') NOT NULL;
+
+================================================================
+2016-10-13: Follow-up on splitting the Comment table
+
+ALTER TABLE Comment
+    DROP COLUMN content,
+    DROP COLUMN inbound_message,
+    ADD COLUMN commentcontent_id INT;
+
+ALTER TABLE Comment
+     ADD FOREIGN KEY (commentcontent_id) REFERENCES CommentContent(id);
+
+After making those schema changes, run the commands in
+tools/backfill-commentcontent-id.sql to fill in commentcontent_id
+for existing comments.
+
+================================================================
+2016-10-13: Add new User fields
+
+ALTER TABLE User
+    ADD COLUMN last_visit_timestamp INT,
+    ADD COLUMN email_bounce_timestamp INT,
+    ADD COLUMN vacation_message VARCHAR(80);
+
+================================================================
+2016-11-30: Drop unique key constraint on CommentContent.comment_id.
+This is a prerequiste for deleting the code that sets a value for
+that column.  This resolves one TODO from 2016-09-21.  Later the
+column itself can be dropped, which is the other TODO from 2016-09-21.
+
+ALTER TABLE CommentContent DROP INDEX comment_id;
+
+================================================================
+2016-12-20: Add a table to keep track of hotlists that users have
+starred.
+
+CREATE TABLE HotlistStar (
+  hotlist_id INT UNSIGNED NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (hotlist_id, user_id),
+  INDEX (user_id),
+  FOREIGN KEY (hotlist_id) REFERENCES Hotlist(id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+================================================================
+2017-12-04: Add two new columns to Hotlist2Issue.
+
+ALTER TABLE Hotlist2Issue
+      ADD COLUMN adder_id INT UNSIGNED,
+      ADD COLUMN added INT,
+      ADD FOREIGN KEY (adder_id) REFERENCES User(user_id);
+
+================================================================
+2017-01-30: Add one new column to SpamVerdict.
+
+ALTER TABLE SpamVerdict CHANGE reason
+  reason ENUM ("manual", "threshold", "classifier", "fail_open") NOT NULL;
+
+================================================================
+2017-02-1: Add two tables to keep track of hotlists and bugs
+that users have visited
+
+CREATE TABLE HotlistVisitHistory (
+  hotlist_id INT UNSIGNED NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+  viewed INT NOT NULL,
+
+  PRIMARY KEY (user_id, hotlist_id),
+  FOREIGN KEY (hotlist_id) REFERENCES Hotlist(id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+CREATE TABLE IssueVisitHistory (
+  issue_id INT NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+  viewed INT NOT NULL,
+
+  PRIMARY KEY (user_id, issue_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+================================================================
+2017-02-16: Add 'note' column to Hotlist2Issue table.
+
+ALTER TABLE Hotlist2Issue ADD COLUMN note TEXT;
+
+
+================================================================
+2017-02-23: Add 'is_niche' column to FieldDef table.
+
+ALTER TABLE FieldDef ADD COLUMN is_niche BOOLEAN;
+
+
+================================================================
+2017-03-05: Add 'ping_who' column to FieldDef table.
+
+ALTER TABLE FieldDef
+  ADD COLUMN date_action ENUM ('no_action', 'ping_owner_only', 'ping_participants');
+
+
+================================================================
+2017-05-02: Add index to make commentby: query term faster.
+
+ALTER TABLE Comment ADD INDEX (commenter_id, deleted_by, issue_id);
+
+
+================================================================
+2017-05-12: Add user preference to ping issue starrers.
+
+ALTER TABLE User ADD COLUMN notify_starred_ping BOOLEAN DEFAULT FALSE;
+
+================================================================
+2017-06-15: Add table to map @google.com to @chromium.org accounts.
+
+CREATE TABLE LinkedAccount (
+  parent_email VARCHAR(255) NOT NULL,  -- lowercase
+  child_email VARCHAR(255) NOT NULL,  -- lowercase
+
+  KEY (parent_email),
+  UNIQUE KEY (child_email)
+) ENGINE=INNODB;
+
+================================================================
+2017-11-14: Add field_type ENUM url_type to FieldDef.
+
+ALTER TABLE FieldDef MODIFY field_type ENUM (
+  'enum_type', 'int_type', 'str_type', 'user_type', 'date_type', 'url_type') NOT NULL;
+
+ALTER TABLE Issue2FieldValue ADD COLUMN url_value VARCHAR(1024);
+ALTER TABLE Issue2FieldValue ADD INDEX (field_id, url_value);
+
+================================================================
+2017-11-22: Add url_value column to Template2FieldValue table.
+
+ALTER TABLE Template2FieldValue ADD COLUMN url_value VARCHAR(1024);
+
+================================================================
+2018-01-22: Add table to keep track of the latest timestamp that issues with
+their component data were collected and uploaded to GCS.
+
+CREATE TABLE ComponentIssueClosedIndex (
+  closed_index INT NOT NULL,
+  PRIMARY KEY (closed_index)
+) ENGINE=INNODB;
+
+================================================================
+2018-01-22: Add approval tables and approval_type to FieldDef.
+
+ALTER TABLE FieldDef MODIFY field_type ENUM (
+  'enum_type', 'int_type', 'str_type', 'user_type', 'date_type', 'url_type', 'approval_type') NOT NULL;
+
+CREATE TABLE ApprovalStatusDef (
+  id INT NOT NULL AUTO_INCREMENT,
+  field_id INT NOT NULL,
+  status VARCHAR(80) BINARY NOT NULL,
+  docstring TEXT,
+
+  PRIMARY KEY (id),
+  UNIQUE KEY (field_id, status),
+  FOREIGN KEY (field_id) REFERENCES FieldDef(id)
+) ENGINE=INNODB;
+
+CREATE TABLE Issue2ApprovalValue (
+  issue_id INT NOT NULL,
+  issue_shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL,
+  field_id INT NOT NULL,
+  status_id INT NOT NULL,
+  setter_id INT UNSIGNED,
+  set_on INT,
+
+  PRIMARY KEY (issue_id, field_id),
+  INDEX (field_id, issue_shard, status_id),
+  INDEX (field_id, issue_shard, setter_id),
+  INDEX (field_id, issue_shard, set_on),
+
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (field_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (status_id) REFERENCES ApprovalStatusDef(id),
+  FOREIGN KEY (setter_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+CREATE TABLE Approval2Approvers (
+  field_id INT NOT NULL,
+  approver_id INT UNSIGNED NOT NULL,
+  issue_id INT,
+  issue_shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL,
+
+  PRIMARY KEY (issue_id, field_id, approver_id),
+  INDEX (approver_id, field_id, issue_shard),
+
+  FOREIGN KEY (field_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (approver_id) REFERENCES User(user_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id)
+) ENGINE=INNODB;
+
+================================================================
+2018-01-29: Add is_deleted column to ComponentDef table and remove
+uniqueness constraint for component names in a project.
+
+ALTER TABLE ComponentDef ADD COLUMN is_deleted BOOLEAN DEFAULT FALSE;
+ALTER TABLE ComponentDef ADD INDEX project_id2 (project_id, path);
+ALTER TABLE ComponentDef DROP INDEX project_id;
+
+================================================================
+2018-01-30: Add IssueSnapshot table and join tables
+
+CREATE TABLE IssueSnapshot (
+  id INT NOT NULL AUTO_INCREMENT,
+  issue_id INT NOT NULL,
+  shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL,
+  project_id SMALLINT UNSIGNED NOT NULL,
+  local_id INT NOT NULL,
+  reporter_id INT UNSIGNED NOT NULL,
+  owner_id INT UNSIGNED,
+  status_id INT NOT NULL,
+  period_start INT NOT NULL,
+  period_end INT NOT NULL,
+  is_open BOOLEAN DEFAULT TRUE,
+
+  PRIMARY KEY (id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (reporter_id) REFERENCES User(user_id),
+  FOREIGN KEY (owner_id) REFERENCES User(user_id),
+  FOREIGN KEY (status_id) REFERENCES StatusDef(id),
+  INDEX (shard, project_id, period_start, period_end),
+  UNIQUE KEY (issue_id, period_start, period_end)
+) ENGINE=INNODB;
+
+CREATE TABLE IssueSnapshot2Component (
+  issuesnapshot_id INT NOT NULL,
+  component_id INT NOT NULL,
+
+  PRIMARY KEY (issuesnapshot_id, component_id),
+  FOREIGN KEY (issuesnapshot_id) REFERENCES IssueSnapshot(id),
+  FOREIGN KEY (component_id) REFERENCES ComponentDef(id)
+) ENGINE=INNODB;
+
+CREATE TABLE IssueSnapshot2Label(
+  issuesnapshot_id INT NOT NULL,
+  label_id INT NOT NULL,
+
+  PRIMARY KEY (issuesnapshot_id, label_id),
+  FOREIGN KEY (issuesnapshot_id) REFERENCES IssueSnapshot(id),
+  FOREIGN KEY (label_id) REFERENCES LabelDef(id)
+) ENGINE=INNODB;
+
+CREATE TABLE IssueSnapshot2Cc(
+  issuesnapshot_id INT NOT NULL,
+  cc_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (issuesnapshot_id, cc_id),
+  FOREIGN KEY (issuesnapshot_id) REFERENCES IssueSnapshot(id),
+  FOREIGN KEY (cc_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+===============================================================
+2018-01-29: Add approval_id column to FieldDef table
+
+ALTER TABLE FieldDef ADD COLUMN approval_id INT;
+
+===============================================================
+2018-02-08: Drop previous approval tables and add default approvers table
+
+DROP TABLE ApprovalStatusDef;
+DROP TABLE Approval2Approver;
+DROP TABLE Issue2ApprovalValue;
+
+CREATE TABLE ApprovalDef2Approver (
+  approval_id INT NOT NULL,
+  approver_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (approval_id, approver_id),
+
+  FOREIGN KEY (approval_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (approver_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+==================================================================
+2018-02-09: Add project_id column to default approvers table
+
+ALTER TABLE ApprovalDef2Approver ADD project_id SMALLINT UNSIGNED NOT NULL;
+ALTER TABLE ApprovalDef2Approver ADD CONSTRAINT ApprovalDef2Approver_ibfk_3 FOREIGN KEY (project_id) REFERENCES Project(project_id);
+
+==================================================================
+2018-02-14: Expand IssueSnapshot time columns from INT to INT UNSIGNED
+ALTER TABLE IssueSnapshot MODIFY period_start INT UNSIGNED NOT NULL;
+ALTER TABLE IssueSnapshot MODIFY period_end INT UNSIGNED NOT NULL;
+
+
+================================================================
+2018-02-22: Relax some constraints on issue snapshots
+
+ALTER TABLE IssueSnapshot MODIFY status_id int;
+ALTER TABLE IssueSnapshot DROP INDEX issue_id;
+ALTER TABLE IssueSnapshot ADD INDEX (`issue_id`,`period_start`,`period_end`);
+
+================================================================
+2018-03-12: Add launch template milestones and approval tables
+
+CREATE TABLE Template2Milestone (
+  id INT NOT NULL AUTO_INCREMENT,
+  template_id INT NOT NULL,
+  name VARCHAR(255) BINARY NOT NULL,
+  rank SMALLINT UNSIGNED,
+
+  PRIMARY KEY (id, template_id),
+  FOREIGN KEY (template_id) REFERENCES Template(id)
+) ENGINE=INNODB;
+
+CREATE TABLE Template2ApprovalValue (
+  approval_id INT NOT NULL,
+  template_id INT NOT NULL,
+  milestone_id INT NOT NULL,
+  launch_status ENUM ('NA', 'review_requested', 'started', 'need_info', 'approved', 'not_approved'),
+
+  PRIMARY KEY (approval_id, template_id, milestone_id),
+
+  FOREIGN KEY (approval_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (template_id) REFERENCES Template(id),
+  FOREIGN KEY (milestone_id) REFERENCES Template2Milestone(id)
+) ENGINE=INNODB;
+
+
+================================================================
+2018-03-13: Edit approval state enum
+
+ALTER TABLE Template2ApprovalValue CHANGE launch_status status ENUM (
+  'needs_review', 'na', 'review_requested', 'started', 'need_info', 'approved', 'not_approved');
+
+
+================================================================
+2018-03-14: Edit approval state enum *AGAIN*
+
+ALTER TABLE Template2ApprovalValue MODIFY status ENUM (
+  'needs_review', 'na', 'review_requested', 'started', 'need_info', 'approved', 'not_approved', 'not_set');
+
+
+================================================================
+2018-03-15: Add Issue Approval and Mileston tables
+
+DROP TABLE IF EXISTS Approval2Approver;
+DROP TABLE IF EXISTS Issue2ApprovalValue;
+
+CREATE TABLE Issue2Milestone (
+  id INT NOT NULL AUTO_INCREMENT,
+  issue_id INT NOT NULL,
+  name VARCHAR(255) BINARY NOT NULL,
+  rank SMALLINT UNSIGNED,
+
+  PRIMARY KEY (id, issue_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id)
+) ENGINE=INNODB;
+
+CREATE TABLE Issue2ApprovalValue (
+  issue_id INT NOT NULL,
+  approval_id INT NOT NULL,
+  milestone_id INT NOT NULL,
+  status ENUM ('needs_review', 'na', 'review_requested', 'started', 'need_info', 'approved', 'not_approved', 'not_set') DEFAULT 'not_set' NOT NULL,
+  setter_id INT UNSIGNED,
+  set_on INT,
+
+  PRIMARY KEY (issue_id, approval_id, milestone_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (approval_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (milestone_id) REFERENCES Issue2Milestone(id),
+  FOREIGN KEY (setter_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+CREATE TABLE IssueApproval2Approvers (
+  issue_id INT NOT NULL,
+  approval_id INT NOT NULL,
+  approver_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (issue_id, approval_id, approver_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (approval_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (approver_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+ALTER TABLE Template2ApprovalValue MODIFY status ENUM (
+  'needs_review', 'na', 'review_requested', 'started', 'need_info', 'approved', 'not_approved', 'not_set') DEFAULT 'not_set' NOT NULL;
+
+================================================================
+2018-03-15: Soft-delete Hotlists.
+ALTER TABLE Hotlist ADD COLUMN is_deleted BOOLEAN DEFAULT FALSE;
+
+===============================================================
+2018-03-19: Rename issue approvers table.
+
+RENAME TABLE IssueApproval2Approvers TO IssueApproval2Approver;
+
+================================================================
+2018-03-22: Add Hotlist support to IssueSnapshots.
+
+CREATE TABLE IssueSnapshot2Hotlist(
+  issuesnapshot_id INT NOT NULL,
+  hotlist_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (issuesnapshot_id, hotlist_id),
+  FOREIGN KEY (issuesnapshot_id) REFERENCES IssueSnapshot(id),
+  FOREIGN KEY (hotlist_id) REFERENCES Hotlist(id)
+) ENGINE=INNODB;
+
+================================================================
+2018-03-23: Add ApprovalDef2Survey table.
+
+CREATE TABLE ApprovalDef2Survey (
+  approval_id INT NOT NULL,
+  survey TEXT,
+  project_id SMALLINT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (approval_id, project_id),
+
+  FOREIGN KEY (approval_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+===============================================================
+2018-03-24: Add IssueApproval2Comment table.
+
+CREATE TABLE IssueApproval2Comment (
+  approval_id INT NOT NULL,
+  comment_id INT NOT NULL,
+
+  PRIMARY KEY (comment_id),
+  INDEX (approval_id),
+  FOREIGN KEY (approval_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (comment_id) REFERENCES Comment(id)
+) ENGINE=INNODB;
+
+===============================================================
+2018-03-29: Rename Milestones to Phases.
+
+CREATE TABLE Issue2Phase (
+  id INT NOT NULL AUTO_INCREMENT,
+  issue_id INT NOT NULL,
+  name VARCHAR(255) BINARY NOT NULL,
+  rank SMALLINT UNSIGNED,
+
+  PRIMARY KEY (id, issue_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id)
+) ENGINE=INNODB;
+
+CREATE TABLE Template2Phase (
+  id INT NOT NULL AUTO_INCREMENT,
+  template_id INT NOT NULL,
+  name VARCHAR(255) BINARY NOT NULL,
+  rank SMALLINT UNSIGNED,
+
+  PRIMARY KEY (id, template_id),
+  FOREIGN KEY (template_id) REFERENCES Template(id)
+) ENGINE=INNODB;
+
+ALTER TABLE Issue2ApprovalValue DROP FOREIGN KEY Issue2ApprovalValue_ibfk_4;
+ALTER TABLE Issue2ApprovalValue ADD COLUMN phase_id int NOT NULL;
+CREATE INDEX IF NOT EXISTS phase_id ON Issue2ApprovalValue (phase_id);
+ALTER TABLE Issue2ApprovalValue ADD FOREIGN KEY (phase_id) REFERENCES Issue2Phase(id);
+
+ALTER TABLE Template2ApprovalValue DROP FOREIGN KEY Template2ApprovalValue_ibfk_3;
+ALTER TABLE Template2ApprovalValue ADD COLUMN phase_id int NOT NULL;
+CREATE INDEX IF NOT EXISTS phase_id ON Template2ApprovalValue (phase_id);
+ALTER TABLE Template2ApprovalValue ADD FOREIGN KEY (phase_id) REFERENCES Template2Phase(id);
+
+================================================================
+2018-04-18: Drop all milestone schema.
+
+ALTER TABLE Template2ApprovalValue DROP COLUMN milestone_id;
+ALTER TABLE Issue2ApprovalValue DROP COLUMN milestone_id;
+
+DROP TABLE Template2Milestone;
+DROP TABLE Issue2Milestone;
+
+================================================================
+2018-04-25: Add phase_id to X2ApprovalValue tables' primary keys.
+
+ALTER TABLE Template2ApprovalValue DROP PRIMARY KEY, ADD PRIMARY KEY(approval_id, template_id, phase_id);
+ALTER TABLE Issue2ApprovalValue DROP PRIMARY KEY, ADD PRIMARY KEY(issue_id, approval_id, phase_id);
+
+==================================================================
+2018-04-30: Rename Issue2Phase table to IssuePhaseDef: Part One
+
+CREATE TABLE IssuePhaseDef (
+  id INT NOT NULL AUTO_INCREMENT,
+  name VARCHAR(255) BINARY NOT NULL,
+  rank SMALLINT UNSIGNED,
+
+  PRIMARY KEY (id)
+) ENGINE=INNODB;
+
+ALTER TABLE Issue2ApprovalValue DROP FOREIGN KEY Issue2ApprovalValue_ibfk_4;
+ALTER TABLE Issue2ApprovalValue ADD FOREIGN KEY (phase_id) REFERENCES IssuePhaseDef(id);
+
+==================================================================
+2018-05-02: Add phase_id to Issue2FieldValue table.
+
+ALTER TABLE Issue2FieldValue ADD COLUMN phase_id INT;
+ALTER TABLE Issue2FieldValue ADD FOREIGN KEY (phase_id) REFERENCES IssuePhaseDef(id);
+
+===================================================================
+2018-5-01: Add is_phase_field to FieldDef.
+
+ALTER TABLE FieldDef ADD COLUMN is_phase_field BOOLEAN DEFAULT FALSE;
+
+===================================================================
+2018-5-11: Rename Issue2Phase table to IssuePhaseDef: Part Two, drop Issue2Phase
+
+DROP TABLE Issue2Phase;
+==================================================================
+2018-05-11: Restrict size of index field in Issue2FieldValue
+
+ALTER TABLE Issue2FieldValue DROP INDEX field_id_5;
+ALTER TABLE Issue2FieldValue ADD INDEX (field_id, issue_shard, url_value(255));
+
+==================================================================
+2018-05-18: Replace Template2Phase FK with IssuePhaseDef.
+
+TRUNCATE TABLE Template2ApprovalValue;
+ALTER TABLE Template2ApprovalValue DROP FOREIGN KEY Template2ApprovalValue_ibfk_3;
+ALTER TABLE Template2ApprovalValue ADD FOREIGN KEY (phase_id) REFERENCES IssuePhaseDef(id);
+
+================================================================
+2018-05-22: Add boolean columns to control autocomplete exclusions.
+
+ALTER TABLE AutocompleteExclusion
+  ADD COLUMN ac_exclude BOOLEAN DEFAULT TRUE,
+  ADD COLUMN no_expand BOOLEAN DEFAULT FALSE;
+
+==================================================================
+2018-05-30: Add comment to Invalidate table
+
+ALTER TABLE Invalidate CHANGE kind
+  kind ENUM('user', 'project', 'issue', 'issue_id', 'hotlist',
+      'comment');
+
+=================================================================
+2018-06-05: Drop Template2Phase tbl and NOT NULL constraint for approval value phase_id columns.
+
+DROP TABLE Template2Phase;
+
+ALTER TABLE Issue2ApprovalValue DROP PRIMARY KEY, ADD PRIMARY KEY(issue_id, approval_id);
+ALTER TABLE Issue2ApprovalValue MODIFY COLUMN phase_id INT;
+
+ALTER TABLE Template2ApprovalValue DROP PRIMARY KEY, ADD PRIMARY KEY(approval_id, template_id);
+ALTER TABLE Template2ApprovalValue MODIFY COLUMN phase_id INT;
+
+=================================================================
+2018-06-22: Add 'template' to Invalidate.kind_enum
+
+ALTER TABLE Invalidate MODIFY COLUMN kind enum('user', 'project', 'issue', 'issue_id', 'hotlist', 'comment', 'template') NOT NULL;
+
+=================================================================
+2018-07-02: Add UserCommits table to keep track of commits.
+
+CREATE TABLE UserCommits (
+  commit_sha VARCHAR(40),
+  parent_sha VARCHAR(40),
+  author_id INT UNSIGNED NOT NULL,
+  commit_time INT NOT NULL,
+  commit_message TEXT,
+  commit_repo VARCHAR(255),
+
+  PRIMARY KEY (commit_sha),
+  INDEX (author_id, commit_time),
+  INDEX (commit_time)
+) ENGINE=INNODB;
+
+
+=================================================================
+2018-07-16: Drop parent_sha because it isn't needed in this table and give commit_repo a clearer name.
+
+ALTER TABLE UserCommits DROP COLUMN parent_sha;
+ALTER TABLE UserCommits CHANGE commit_repo commit_repo_url VARCHAR(255);
+
+
+================================================================
+2018-08-27: Allow computed external user groups, e.g., everyone@google.com.
+
+ALTER TABLE UserGroupSettings
+  MODIFY COLUMN
+  external_group_type ENUM ('chrome_infra_auth', 'mdb', 'baggins', 'computed');
+
+
+================================================================
+2018-09-24: Add 'usergroup to Invalidate.kind enum
+
+ALTER TABLE Invalidate MODIFY COLUMN kind enum(
+    'user', 'usergroup', 'project', 'issue', 'issue_id',
+    'hotlist', 'comment', 'template') NOT NULL;
+
+================================================================
+2018-10-30: Fix ApprovalValue status enum for 'review_started'
+
+ALTER TABLE Template2ApprovalValue MODIFY status ENUM (
+  'needs_review', 'na', 'review_requested', 'review_started', 'need_info', 'approved', 'not_approved', 'not_set') DEFAULT 'not_set' NOT NULL;
+
+ALTER TABLE Issue2ApprovalValue MODIFY status ENUM (
+  'needs_review', 'na', 'review_requested', 'review_started', 'need_info', 'approved', 'not_approved', 'not_set') DEFAULT 'not_set' NOT NULL;
+
+
+================================================================
+2018-11-02: Redo LinkedAccount table.
+
+DROP TABLE LinkedAccount;
+CREATE TABLE LinkedAccount (
+  parent_id INT UNSIGNED NOT NULL,
+  child_id INT UNSIGNED NOT NULL,
+
+  KEY (parent_id),
+  UNIQUE KEY (child_id),
+  FOREIGN KEY (parent_id) REFERENCES User(user_id),
+  FOREIGN KEY (child_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+================================================================
+2018-12-03: Create LinkedAccountInvite table.
+
+CREATE TABLE LinkedAccountInvite (
+  parent_id INT UNSIGNED NOT NULL,
+  child_id INT UNSIGNED NOT NULL,
+
+  KEY (parent_id),
+  UNIQUE KEY (child_id),
+  FOREIGN KEY (parent_id) REFERENCES User(user_id),
+  FOREIGN KEY (child_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+==================================================================================
+2018-1-15: Add notify_group and notify_members bool col to UserGroupSettings table.
+
+ALTER TABLE UserGroupSettings ADD COLUMN notify_members BOOLEAN DEFAULT TRUE;
+ALTER TABLE UserGroupSettings ADD COLUMN notify_group BOOLEAN DEFAULT FALSE;
+
+=================================================================
+2019-01-23: Add two new indexes to IssueSnapshot for performance.
+
+CREATE INDEX by_period_start ON IssueSnapshot (shard, project_id, status_id, period_start);
+CREATE INDEX by_period_end ON IssueSnapshot (shard, project_id, status_id, period_end);
+
+
+================================================================
+2019-01-25: Start a more flexible way of storing user preferences.
+
+CREATE TABLE UserPrefs (
+  user_id INT UNSIGNED NOT NULL,
+  name VARCHAR(40),
+  value VARCHAR(80),
+
+  UNIQUE KEY (user_id, name)
+) ENGINE=INNODB;
+
+================================================================
+2019-04-10: Set UserPrefs that indicate that privacy click-through was seen.
+This is part of phasing out DismissedCues.
+
+INSERT IGNORE INTO UserPrefs (user_id, name, value)
+SELECT user_id, cue, 'true'
+FROM DismissedCues;
+
+================================================================
+2019-05-13: Drop unused ActionLimit table.
+
+DROP TABLE ActionLimit;
+
+================================================================
+2019-05-24: Add ext_issue_identifier column to DanglingIssueRelation table.
+
+ALTER TABLE DanglingIssueRelation ADD COLUMN ext_issue_identifier VARCHAR(2048);
+ALTER TABLE DanglingIssueRelation ADD INDEX (ext_issue_identifier);
+
+================================================================
+2019-06-06: Allow full unicode labels.
+
+ALTER TABLE LabelDef CHANGE label label VARCHAR(80) BINARY NOT NULL COLLATE utf8mb4_unicode_ci;
+
+================================================================
+2019-06-07: Add indexes to reduce cases of using filesort
+
+ALTER TABLE HotlistVisitHistory ADD INDEX (user_id, viewed);
+ALTER TABLE ReindexQueue ADD INDEX (created);
+
+================================================================
+2019-06-13: Add ext_issue_identifier to DanglingIssueRelation PRIMARY KEY.
+
+ALTER TABLE DanglingIssueRelation MODIFY COLUMN ext_issue_identifier VARCHAR(255);
+ALTER TABLE DanglingIssueRelation DROP PRIMARY KEY, ADD PRIMARY KEY(issue_id, dst_issue_project, dst_issue_local_id, kind, ext_issue_identifier);
+
+================================================================
+2019-06-25: Add unique constraint on SpamReport.
+
+ALTER IGNORE TABLE SpamReport ADD UNIQUE (user_id, comment_id, issue_id);
+
+================================================================
+2019-07-03: Add CommentImporter table.
+
+CREATE TABLE CommentImporter (
+  comment_id INT NOT NULL,
+  importer_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (comment_id),
+  FOREIGN KEY (comment_id) REFERENCES Comment(id),
+  FOREIGN KEY (importer_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+================================================================
+2019-10-09: Drop DismissedCues because that data has been in UserPrefs since April.
+
+DROP TABLE DismissedCues;
+
+================================================================
+2019-10-24: Insert row representing deleted user.
+
+INSERT IGNORE INTO User (user_id, email) VALUES (1, '');
+
+==================================================================
+2019-11-21: Add hotlist_id to Invalidate table.
+
+ALTER TABLE Invalidate CHANGE kind
+  kind ENUM('user', 'usergroup', 'project', 'issue', 'issue_id', 'hotlist', 'comment', 'template', 'hotlist_id');
+
+
+================================================================
+2019-12-30: Set custom revision_url_format for pigweed project.
+
+UPDATE Project SET revision_url_format = 'https://pigweed-review.git.corp.google.com/q/{revnum}' WHERE project_name='pigweed';
+
+================================================================
+2020-02-19: Create table for editors of a field. Also, add column in FieldDef
+to indicate if the editors of that field are being restricted.
+
+CREATE TABLE FieldDef2Editor (
+  field_id INT NOT NULL,
+  editor_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (field_id, editor_id),
+  FOREIGN KEY (field_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (editor_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+ALTER TABLE FieldDef ADD COLUMN is_restricted_field BOOL DEFAULT FALSE;
+
+================================================================
+2020-05-14: Add option to force detailed notifications for projects.
+
+ALTER TABLE Project ADD COLUMN issue_notify_always_detailed BOOLEAN DEFAULT FALSE;
+
diff --git a/schema/framework.sql b/schema/framework.sql
new file mode 100644
index 0000000..4a35106
--- /dev/null
+++ b/schema/framework.sql
@@ -0,0 +1,36 @@
+-- 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
+
+
+-- Create app framework tables in the monorail DB.
+
+ALTER DATABASE monorail CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;
+
+-- This table allows frontends to selectively invalidate their RAM caches.
+-- On each incoming request, the frontend queries this table to get all rows
+-- that are newer than the last row that it saw. Then it processes each such
+-- row by dropping entries from its RAM caches, and remembers the new highest
+-- timestep that it has seen.
+CREATE TABLE Invalidate (
+  -- The time at which the invalidation took effect, by that time new data
+  -- should be available to retrieve to fill local caches as needed.
+  -- This is not a clock value, it is just an integer that counts up by one
+  -- on each change.
+  timestep BIGINT NOT NULL AUTO_INCREMENT,
+
+  -- Which kind of entity was invalidated?  Each kind is broad, e.g.,
+  -- invalidating a project also invalidates all issue tracker config within
+  -- that project.  But, they do not nest.  E.g., invalidating a project does
+  -- not invalidate all issues in the project.
+  kind enum('user', 'usergroup', 'project', 'issue', 'issue_id',
+            'hotlist', 'comment', 'template', 'hotlist_id') NOT NULL,
+
+  -- Which cache entry should be invalidated?  Special value 0 indicates
+  -- that all entries should be invalidated.
+  cache_key INT UNSIGNED,
+
+  INDEX (timestep)
+) ENGINE=INNODB;
diff --git a/schema/project.sql b/schema/project.sql
new file mode 100644
index 0000000..cb3cd42
--- /dev/null
+++ b/schema/project.sql
@@ -0,0 +1,267 @@
+-- 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
+
+
+-- Create project-related tables in monorail db.
+
+
+-- The User table has the mapping from user_id to email addresses, and
+-- user settings information that is needed almost every time that
+-- we load a user.  E.g., when showing issue owners on the list page.
+CREATE TABLE User (
+  user_id INT UNSIGNED NOT NULL,
+  email VARCHAR(255) NOT NULL,  -- lowercase
+
+  is_site_admin BOOLEAN DEFAULT FALSE,
+  obscure_email BOOLEAN DEFAULT TRUE,
+
+  -- TODO(jrobbins): Move some of these to UserPrefs.
+  notify_issue_change BOOLEAN DEFAULT TRUE,  -- Pref
+  notify_starred_issue_change BOOLEAN DEFAULT TRUE,  -- Pref
+  email_compact_subject BOOLEAN DEFAULT FALSE,  -- Pref
+  email_view_widget BOOLEAN DEFAULT TRUE,  -- Pref
+  notify_starred_ping BOOLEAN DEFAULT FALSE,  -- Pref
+  banned VARCHAR(80),
+  after_issue_update ENUM (
+      'up_to_list', 'stay_same_issue', 'next_in_list'),  -- Pref
+  keep_people_perms_open BOOLEAN DEFAULT FALSE,  -- Pref
+  preview_on_hover BOOLEAN DEFAULT TRUE,  -- Pref
+  ignore_action_limits BOOLEAN DEFAULT FALSE,
+  last_visit_timestamp INT,
+  email_bounce_timestamp INT,
+  vacation_message VARCHAR(80),
+
+  PRIMARY KEY (user_id),
+  UNIQUE KEY (email)
+) ENGINE=INNODB;
+
+-- Row to represent all deleted users i Monorail.
+INSERT IGNORE INTO User (user_id, email) VALUES (1, '');
+
+-- The UserPrefs table has open-ended key/value pairs that affect how
+-- we present information to that user when we generate a web page for
+-- that user or send an email to that user.  E.g., ("code_font",
+-- "true") would mean that issue content should be shown to that user
+-- in a monospace font.  Only non-default preference values are
+-- stored: users who have never set any preferences will have no rows.
+CREATE TABLE UserPrefs (
+  user_id INT UNSIGNED NOT NULL,
+  name VARCHAR(40),
+  value VARCHAR(80),
+
+  UNIQUE KEY (user_id, name)
+) ENGINE=INNODB;
+
+
+CREATE TABLE UserCommits (
+  commit_sha VARCHAR(40),
+  author_id INT UNSIGNED NOT NULL,
+  commit_time INT NOT NULL,
+  commit_message TEXT,
+  commit_repo_url VARCHAR(255),
+
+  PRIMARY KEY (commit_sha),
+  INDEX (author_id, commit_time),
+  INDEX (commit_time)
+) ENGINE=INNODB;
+
+CREATE TABLE Project (
+  project_id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
+  project_name VARCHAR(80) NOT NULL,
+
+  summary TEXT,
+  description TEXT,
+
+  state ENUM ('live', 'archived', 'deletable') NOT NULL,
+  access ENUM ('anyone', 'members_only') NOT NULL,
+  read_only_reason VARCHAR(80),  -- normally empty for read-write.
+  state_reason VARCHAR(80),  -- optional reason for doomed project.
+  delete_time INT,  -- if set, automatically transition to state deletable.
+
+  issue_notify_address VARCHAR(80),
+  attachment_bytes_used BIGINT DEFAULT 0,
+  attachment_quota BIGINT DEFAULT 0,  -- 50 MB default set in python code.
+
+  cached_content_timestamp INT,
+  recent_activity_timestamp INT,
+  moved_to VARCHAR(250),
+  process_inbound_email BOOLEAN DEFAULT FALSE,
+
+  only_owners_remove_restrictions BOOLEAN DEFAULT FALSE,
+  only_owners_see_contributors BOOLEAN DEFAULT FALSE,
+
+  revision_url_format VARCHAR(250),
+
+  home_page VARCHAR(250),
+  docs_url VARCHAR(250),
+  source_url VARCHAR(250),
+  logo_gcs_id VARCHAR(250),
+  logo_file_name VARCHAR(250),
+
+  issue_notify_always_detailed BOOLEAN DEFAULT FALSE,
+
+  PRIMARY KEY (project_id),
+  UNIQUE KEY (project_name)
+) ENGINE=INNODB;
+
+
+CREATE TABLE User2Project (
+  project_id SMALLINT UNSIGNED NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+  role_name ENUM ('owner', 'committer', 'contributor'),
+
+  PRIMARY KEY (project_id, user_id),
+  INDEX (user_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE LinkedAccount (
+  parent_id INT UNSIGNED NOT NULL,
+  child_id INT UNSIGNED NOT NULL,
+
+  KEY (parent_id),
+  UNIQUE KEY (child_id),
+  FOREIGN KEY (parent_id) REFERENCES User(user_id),
+  FOREIGN KEY (child_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE LinkedAccountInvite (
+  parent_id INT UNSIGNED NOT NULL,
+  child_id INT UNSIGNED NOT NULL,
+
+  KEY (parent_id),
+  UNIQUE KEY (child_id),
+  FOREIGN KEY (parent_id) REFERENCES User(user_id),
+  FOREIGN KEY (child_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE ExtraPerm (
+  project_id SMALLINT UNSIGNED NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+  perm VARCHAR(80),
+
+  PRIMARY KEY (project_id, user_id, perm),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE MemberNotes (
+  project_id SMALLINT UNSIGNED NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+  notes TEXT,
+
+  PRIMARY KEY (project_id, user_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE AutocompleteExclusion (
+  project_id SMALLINT UNSIGNED NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+  ac_exclude BOOLEAN DEFAULT TRUE,
+  no_expand BOOLEAN DEFAULT FALSE,
+
+  PRIMARY KEY (project_id, user_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE UserStar (
+  starred_user_id INT UNSIGNED NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (starred_user_id, user_id),
+  INDEX (user_id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id),
+  FOREIGN KEY (starred_user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE ProjectStar (
+  project_id SMALLINT UNSIGNED NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (project_id, user_id),
+  INDEX (user_id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE UserGroup (
+  user_id INT UNSIGNED NOT NULL,
+  group_id INT UNSIGNED NOT NULL,
+  role ENUM ('owner', 'member') NOT NULL DEFAULT 'member',
+
+  PRIMARY KEY (user_id, group_id),
+  INDEX (group_id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id),
+  FOREIGN KEY (group_id) REFERENCES User(user_id)
+
+) ENGINE=INNODB;
+
+
+CREATE TABLE UserGroupSettings (
+  group_id INT UNSIGNED NOT NULL,
+
+  who_can_view_members ENUM ('owners', 'members', 'anyone'),
+
+  external_group_type ENUM (
+      'chrome_infra_auth', 'mdb', 'baggins', 'computed'),
+  -- timestamps in seconds since the epoch.
+  last_sync_time INT,
+  notify_members BOOL DEFAULT TRUE,
+  notify_group BOOL DEFAULT FALSE,
+
+  PRIMARY KEY (group_id),
+  FOREIGN KEY (group_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Group2Project (
+  group_id INT UNSIGNED NOT NULL,
+  project_id SMALLINT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (group_id, project_id),
+
+  FOREIGN KEY (group_id) REFERENCES UserGroupSettings(group_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+
+-- These are quick-edit commands that the user can easily repeat.
+CREATE TABLE QuickEditHistory (
+  user_id INT UNSIGNED NOT NULL,
+  project_id SMALLINT UNSIGNED NOT NULL,
+  slot_num SMALLINT UNSIGNED NOT NULL,
+
+  command VARCHAR(255) NOT NULL,
+  comment TEXT NOT NULL,
+
+  PRIMARY KEY (user_id, project_id, slot_num),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+-- This allows us to offer the most recent command to the user again
+-- as the default quick-edit command for next time.
+CREATE TABLE QuickEditMostRecent (
+  user_id INT UNSIGNED NOT NULL,
+  project_id SMALLINT UNSIGNED NOT NULL,
+  slot_num SMALLINT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (user_id, project_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
diff --git a/schema/tracker.sql b/schema/tracker.sql
new file mode 100644
index 0000000..b445129
--- /dev/null
+++ b/schema/tracker.sql
@@ -0,0 +1,956 @@
+-- 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
+
+
+-- Create issue-realted tables in monorail db.
+
+
+CREATE TABLE StatusDef (
+  id INT NOT NULL AUTO_INCREMENT,
+  project_id SMALLINT UNSIGNED NOT NULL,
+  status VARCHAR(80) BINARY NOT NULL,
+  rank SMALLINT UNSIGNED,
+  means_open BOOLEAN,
+  docstring TEXT,
+  deprecated BOOLEAN DEFAULT FALSE,
+
+  PRIMARY KEY (id),
+  UNIQUE KEY (project_id, status),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE ComponentDef (
+  id INT NOT NULL AUTO_INCREMENT,
+  project_id SMALLINT UNSIGNED NOT NULL,
+
+  -- Note: parent components have paths that are prefixes of child components.
+  path VARCHAR(255) BINARY NOT NULL,
+  docstring TEXT,
+  deprecated BOOLEAN DEFAULT FALSE,
+  created INT,
+  creator_id INT UNSIGNED,
+  modified INT,
+  modifier_id INT UNSIGNED,
+  is_deleted BOOLEAN DEFAULT FALSE,
+
+  PRIMARY KEY (id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (creator_id) REFERENCES User(user_id),
+  FOREIGN KEY (modifier_id) REFERENCES User(user_id),
+  INDEX project_id2 (project_id, path)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Component2Admin (
+  component_id INT NOT NULL,
+  admin_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (component_id, admin_id),
+
+  FOREIGN KEY (component_id) REFERENCES ComponentDef(id),
+  FOREIGN KEY (admin_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Component2Cc (
+  component_id INT NOT NULL,
+  cc_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (component_id, cc_id),
+
+  FOREIGN KEY (component_id) REFERENCES ComponentDef(id),
+  FOREIGN KEY (cc_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE LabelDef (
+  id INT NOT NULL AUTO_INCREMENT,
+  project_id SMALLINT UNSIGNED NOT NULL,
+  label VARCHAR(80) BINARY NOT NULL COLLATE utf8mb4_unicode_ci,
+  rank SMALLINT UNSIGNED,
+  docstring TEXT,
+  deprecated BOOLEAN DEFAULT FALSE,
+
+  PRIMARY KEY (id),
+  UNIQUE KEY (project_id, label),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Component2Label (
+  component_id INT NOT NULL,
+  label_id INT NOT NULL,
+
+  PRIMARY KEY (component_id, label_id),
+
+  FOREIGN KEY (component_id) REFERENCES ComponentDef(id),
+  FOREIGN KEY (label_id) REFERENCES LabelDef(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE FieldDef (
+  id INT NOT NULL AUTO_INCREMENT,
+  project_id SMALLINT UNSIGNED NOT NULL,
+  rank SMALLINT UNSIGNED,
+
+  field_name VARCHAR(80) BINARY NOT NULL,
+  -- TODO(jrobbins): more types
+  field_type ENUM ('enum_type', 'int_type', 'str_type', 'user_type', 'date_type', 'url_type', 'approval_type') NOT NULL,
+  applicable_type VARCHAR(80),   -- No value means: offered for all issue types
+  applicable_predicate TEXT,   -- No value means: TRUE
+  is_required BOOLEAN,  -- true means required if applicable
+  is_niche BOOLEAN,  -- true means user must click to reveal widget
+  is_multivalued BOOLEAN,
+  -- TODO(jrobbins): access controls: restrict, grant
+  -- Validation for int_type fields
+  min_value INT,
+  max_value INT,
+  -- Validation for str_type fields
+  regex VARCHAR(80),
+  -- Validation for user_type fields
+  needs_member BOOLEAN,  -- User value can only be set to users who are members
+  needs_perm VARCHAR(80),  -- User value can only be set to users w/ that perm
+  grants_perm VARCHAR(80),  -- User named in this field gains this perm in the issue
+  -- notification options for user_type fields
+  notify_on ENUM ('never', 'any_comment') DEFAULT 'never' NOT NULL,
+  -- notification options for date_type fields
+  date_action ENUM ('no_action', 'ping_owner_only', 'ping_participants'),
+
+  -- TODO(jrobbins): default value
+  -- TODO(jrobbins): deprecated boolean?
+  docstring TEXT,
+  is_deleted BOOLEAN,  -- If true, reap this field def after all values reaped.
+  approval_id INT,
+  is_phase_field BOOLEAN DEFAULT FALSE,
+  is_restricted_field BOOLEAN DEFAULT FALSE, -- If true, editors are restricted to the FieldDef2Editors tbl.
+
+  PRIMARY KEY (id),
+  UNIQUE KEY (project_id, field_name),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE FieldDef2Admin (
+  field_id INT NOT NULL,
+  admin_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (field_id, admin_id),
+  FOREIGN KEY (field_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (admin_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE FieldDef2Editor (
+  field_id INT NOT NULL,
+  editor_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (field_id, editor_id),
+  FOREIGN KEY (field_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (editor_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Issue (
+  id INT NOT NULL AUTO_INCREMENT,
+  shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL,
+  project_id SMALLINT UNSIGNED NOT NULL,
+  local_id INT NOT NULL,
+
+  reporter_id INT UNSIGNED NOT NULL,
+  owner_id INT UNSIGNED,
+  status_id INT,
+
+  -- These are each timestamps in seconds since the epoch.
+  modified INT NOT NULL,
+  opened INT,
+  closed INT,
+  owner_modified INT,
+  status_modified INT,
+  component_modified INT,
+
+  derived_owner_id INT UNSIGNED,
+  derived_status_id INT,
+
+  deleted BOOLEAN,
+
+  -- These are denormalized fields that should be updated when child
+  -- records are added or removed for stars or attachments.  If they
+  -- get out of sync, they can be updated via an UPDATE ... SELECT statement.
+  star_count INT DEFAULT 0,
+  attachment_count INT DEFAULT 0,
+
+  is_spam BOOLEAN DEFAULT FALSE,
+
+  PRIMARY KEY(id),
+  UNIQUE KEY (project_id, local_id),
+  INDEX (shard, status_id),
+  INDEX (shard, project_id),
+
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (reporter_id) REFERENCES User(user_id),
+  FOREIGN KEY (owner_id) REFERENCES User(user_id),
+  FOREIGN KEY (status_id) REFERENCES StatusDef(id),
+  FOREIGN KEY (derived_owner_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+-- This is a parallel table to the Issue table because we don't want
+-- any very wide columns in the Issue table that would slow it down.
+CREATE TABLE IssueSummary (
+  issue_id INT NOT NULL,
+  summary mediumtext COLLATE utf8mb4_unicode_ci,
+
+  PRIMARY KEY (issue_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id)
+) ENGINE=INNODB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+
+CREATE TABLE Issue2Component (
+  issue_id INT NOT NULL,
+  issue_shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL,
+  component_id INT NOT NULL,
+  derived BOOLEAN DEFAULT FALSE,
+
+  PRIMARY KEY (issue_id, component_id, derived),
+  INDEX (component_id, issue_shard),
+
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (component_id) REFERENCES ComponentDef(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Issue2Label (
+  issue_id INT NOT NULL,
+  issue_shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL,
+  label_id INT NOT NULL,
+  derived BOOLEAN DEFAULT FALSE,
+
+  PRIMARY KEY (issue_id, label_id, derived),
+  INDEX (label_id, issue_shard),
+
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (label_id) REFERENCES LabelDef(id)
+) ENGINE=INNODB;
+
+CREATE TABLE IssuePhaseDef (
+  id INT NOT NULL AUTO_INCREMENT,
+  name VARCHAR(255) BINARY NOT NULL,
+  rank SMALLINT UNSIGNED,
+
+  PRIMARY KEY (id)
+) ENGINE=INNODB;
+
+CREATE TABLE Issue2FieldValue (
+  issue_id INT NOT NULL,
+  issue_shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL,
+  field_id INT NOT NULL,
+
+  int_value INT,
+  str_value VARCHAR(1024),
+  user_id INT UNSIGNED,
+  date_value INT,
+  url_value VARCHAR(1024),
+
+  derived BOOLEAN DEFAULT FALSE,
+  phase_id INT,
+
+  INDEX (issue_id, field_id),
+  INDEX (field_id, issue_shard, int_value),
+  INDEX (field_id, issue_shard, str_value(255)),
+  INDEX (field_id, issue_shard, user_id),
+  INDEX (field_id, issue_shard, date_value),
+  INDEX (field_id, issue_shard, url_value(255)),
+
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (field_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id),
+  FOREIGN KEY (phase_id) REFERENCES IssuePhaseDef(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Issue2Cc (
+  issue_id INT NOT NULL,
+  issue_shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL,
+  cc_id INT UNSIGNED NOT NULL,
+  derived BOOLEAN DEFAULT FALSE,
+
+  PRIMARY KEY (issue_id, cc_id),
+  INDEX (cc_id, issue_shard),
+
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (cc_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Issue2Notify (
+  issue_id INT NOT NULL,
+  email VARCHAR(80) NOT NULL,
+
+  PRIMARY KEY (issue_id, email),
+
+  FOREIGN KEY (issue_id) REFERENCES Issue(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE IssueVisitHistory (
+  issue_id INT NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+  viewed INT NOT NULL,
+
+  PRIMARY KEY (user_id, issue_id),
+  INDEX (user_id, viewed),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE IssueStar (
+  issue_id INT NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (issue_id, user_id),
+  INDEX (user_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE IssueRelation (
+  issue_id INT NOT NULL,
+  dst_issue_id INT NOT NULL,
+
+  -- Read as: src issue is blocked on dst issue.
+  kind ENUM ('blockedon', 'mergedinto') NOT NULL,
+
+  rank BIGINT,
+
+  PRIMARY KEY (issue_id, dst_issue_id, kind),
+  INDEX (issue_id),
+  INDEX (dst_issue_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (dst_issue_id) REFERENCES Issue(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE DanglingIssueRelation (
+  issue_id INT NOT NULL,
+  dst_issue_project VARCHAR(80),
+  dst_issue_local_id INT,
+  ext_issue_identifier VARCHAR(255),
+
+  -- This table uses 'blocking' so that it can guarantee the src issue
+  -- always exists, while the dst issue is always the dangling one.
+  kind ENUM ('blockedon', 'blocking', 'mergedinto') NOT NULL,
+
+  PRIMARY KEY (issue_id, dst_issue_project, dst_issue_local_id, kind, ext_issue_identifier),
+  INDEX (issue_id),
+  INDEX (ext_issue_identifier),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE CommentContent (
+  id INT NOT NULL AUTO_INCREMENT,
+  -- TODO(jrobbins): drop comment_id after Comment.commentcontent_id is added.
+  comment_id INT NOT NULL,  -- Note: no forign key reference.
+  content MEDIUMTEXT COLLATE utf8mb4_unicode_ci,
+  inbound_message MEDIUMTEXT COLLATE utf8mb4_unicode_ci,
+
+  PRIMARY KEY (id)
+) ENGINE=INNODB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+
+CREATE TABLE Comment (
+  id INT NOT NULL AUTO_INCREMENT,
+  issue_id INT NOT NULL,
+  created INT NOT NULL,
+  project_id SMALLINT UNSIGNED NOT NULL,
+
+  commenter_id INT UNSIGNED NOT NULL,
+  commentcontent_id INT,  -- TODO(jrobbins) make this NOT NULL.
+
+  deleted_by INT UNSIGNED,
+  is_spam BOOLEAN DEFAULT FALSE,
+  -- TODO(lukasperaza) Update first comments SET is_description=TRUE
+  is_description BOOLEAN DEFAULT FALSE,
+
+  PRIMARY KEY(id),
+  INDEX (is_spam, project_id, created),
+  INDEX (commenter_id, created),
+  INDEX (commenter_id, deleted_by, issue_id),
+
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (commenter_id) REFERENCES User(user_id),
+  FOREIGN KEY (deleted_by) REFERENCES User(user_id),
+  FOREIGN KEY (commentcontent_id) REFERENCES CommentContent(id)
+) ENGINE=INNODB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+
+CREATE TABLE CommentImporter (
+  comment_id INT NOT NULL,
+  importer_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (comment_id),
+  FOREIGN KEY (comment_id) REFERENCES Comment(id),
+  FOREIGN KEY (importer_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Attachment (
+  id INT NOT NULL AUTO_INCREMENT,
+
+  issue_id INT NOT NULL,
+  comment_id INT,
+
+  filename VARCHAR(255) NOT NULL,
+  filesize INT NOT NULL,
+  mimetype VARCHAR(255) NOT NULL,
+  deleted BOOLEAN,
+  gcs_object_id VARCHAR(1024) NOT NULL,
+
+  PRIMARY KEY (id),
+  INDEX (issue_id),
+  INDEX (comment_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE IssueUpdate (
+  id INT NOT NULL AUTO_INCREMENT,
+  issue_id INT NOT NULL,
+  comment_id INT,
+
+  field ENUM (
+  'summary', 'status', 'owner', 'cc', 'labels', 'blockedon', 'blocking', 'mergedinto',
+  'project', 'components', 'custom', 'is_spam' ) NOT NULL,
+  old_value MEDIUMTEXT COLLATE utf8mb4_unicode_ci,
+  new_value MEDIUMTEXT COLLATE utf8mb4_unicode_ci,
+  added_user_id INT UNSIGNED,
+  removed_user_id INT UNSIGNED,
+  custom_field_name VARCHAR(255),
+  is_spam BOOLEAN DEFAULT FALSE,
+
+  PRIMARY KEY (id),
+  INDEX (issue_id),
+  INDEX (comment_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id)
+  -- FOREIGN KEY (added_user_id) REFERENCES User(user_id),
+  -- FOREIGN KEY (removed_user_id) REFERENCES User(user_id)
+) ENGINE=INNODB CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+
+CREATE TABLE IssueFormerLocations (
+  issue_id INT NOT NULL,
+  project_id SMALLINT UNSIGNED NOT NULL,
+  local_id INT NOT NULL,
+
+  INDEX (issue_id),
+  UNIQUE KEY (project_id, local_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Template (
+  id INT NOT NULL AUTO_INCREMENT,
+  project_id SMALLINT UNSIGNED NOT NULL,
+  name VARCHAR(255) BINARY NOT NULL,
+
+  content TEXT,
+  summary TEXT,
+  summary_must_be_edited BOOLEAN,
+  owner_id INT UNSIGNED,
+  status VARCHAR(255),
+  members_only BOOLEAN,
+  owner_defaults_to_member BOOLEAN,
+  component_required BOOLEAN DEFAULT FALSE,
+
+  PRIMARY KEY (id),
+  UNIQUE KEY (project_id, name),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Template2Label (
+  template_id INT NOT NULL,
+  label VARCHAR(255) NOT NULL,
+
+  PRIMARY KEY (template_id, label),
+  FOREIGN KEY (template_id) REFERENCES Template(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Template2Admin (
+  template_id INT NOT NULL,
+  admin_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (template_id, admin_id),
+  FOREIGN KEY (template_id) REFERENCES Template(id),
+  FOREIGN KEY (admin_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Template2FieldValue (
+  template_id INT NOT NULL,
+  field_id INT NOT NULL,
+
+  int_value INT,
+  str_value VARCHAR(1024),
+  user_id INT UNSIGNED,
+  date_value INT,
+  url_value VARCHAR(1024),
+
+  INDEX (template_id, field_id),
+
+  FOREIGN KEY (template_id) REFERENCES Template(id),
+  FOREIGN KEY (field_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Template2Component (
+  template_id INT NOT NULL,
+  component_id INT NOT NULL,
+
+  PRIMARY KEY (template_id, component_id),
+
+  FOREIGN KEY (template_id) REFERENCES Template(id),
+  FOREIGN KEY (component_id) REFERENCES ComponentDef(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Template2ApprovalValue (
+  approval_id INT NOT NULL,
+  template_id INT NOT NULL,
+  phase_id INT,
+  status ENUM ('needs_review', 'na', 'review_requested', 'review_started', 'need_info', 'approved', 'not_approved', 'not_set') DEFAULT 'not_set' NOT NULL,
+
+  PRIMARY KEY (approval_id, template_id),
+
+  FOREIGN KEY (approval_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (template_id) REFERENCES Template(id),
+  FOREIGN KEY (phase_id) REFERENCES IssuePhaseDef(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE ProjectIssueConfig (
+  project_id SMALLINT UNSIGNED NOT NULL,
+
+  statuses_offer_merge VARCHAR(255) NOT NULL,
+  exclusive_label_prefixes VARCHAR(255) NOT NULL,
+  default_template_for_developers INT NOT NULL,
+  default_template_for_users INT NOT NULL,
+  default_col_spec TEXT,
+  default_sort_spec TEXT,
+  default_x_attr TEXT,
+  default_y_attr TEXT,
+
+  member_default_query TEXT,
+  custom_issue_entry_url TEXT,
+
+  PRIMARY KEY (project_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE FilterRule (
+  project_id SMALLINT UNSIGNED NOT NULL,
+  rank SMALLINT UNSIGNED,
+
+  -- TODO: or should this be broken down into structured fields?
+  predicate TEXT NOT NULL,
+  -- TODO: or should this be broken down into structured fields?
+  consequence TEXT NOT NULL,
+
+  INDEX (project_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+
+-- Each row in this table indicates an issue that needs to be reindexed
+-- in the GAE fulltext index by our batch indexing cron job.
+CREATE TABLE ReindexQueue (
+  issue_id INT NOT NULL,
+  created TIMESTAMP,
+
+  PRIMARY KEY (issue_id),
+  INDEX (created),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id)
+) ENGINE=INNODB;
+
+
+-- This holds counters with the highest issue local_id that is
+-- already used in each project.  Clients should atomically increment
+-- the value for current project and then use the new counter value
+-- when creating an issue.
+CREATE TABLE LocalIDCounter (
+  project_id SMALLINT UNSIGNED NOT NULL,
+  used_local_id INT NOT NULL,
+  used_spam_id INT NOT NULL,
+
+  PRIMARY KEY (project_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+
+-- This is a saved query.  It can be configured by a project owner to
+-- be used by all visitors to that project.  Or, it can be a a
+-- personal saved query that appears on a user's "Saved queries" page
+-- and executes in the scope of one or more projects.
+CREATE TABLE SavedQuery (
+  id INT NOT NULL AUTO_INCREMENT,
+  name VARCHAR(80) NOT NULL,
+
+  -- For now, we only allow saved queries to be based off ane of the built-in
+  -- query scopes, and those can never be deleted, so there can be no nesting,
+  -- dangling references, and thus no need for cascading deletes.
+  base_query_id INT,
+  query TEXT NOT NULL,
+
+  PRIMARY KEY (id)
+) ENGINE=INNODB;
+
+
+-- Rows for built-in queries.  These are in the database soley so that
+-- foreign key constraints are satisfied. These rows ar never read or updated.
+INSERT IGNORE INTO SavedQuery VALUES
+  (1, 'All issues', 0, ''),
+  (2, 'Open issues', 0, 'is:open'),
+  (3, 'Open and owned by me', 0, 'is:open owner:me'),
+  (4, 'Open and reported by me', 0, 'is:open reporter:me'),
+  (5, 'Open and starred by me', 0, 'is:open is:starred'),
+  (6, 'New issues', 0, 'status:new'),
+  (7, 'Issues to verify', 0, 'status=fixed,done'),
+  (8, 'Open with comment by me', 0, 'is:open commentby:me');
+
+-- The sole purpose of this statement is to force user defined saved queries
+-- to have IDs greater than 100 so that 1-100 are reserved for built-ins.
+INSERT IGNORE INTO SavedQuery VALUES (100, '', 0, '');
+
+
+-- User personal queries default to executing in the context of the
+-- project where they were created, but the user can edit them to make
+-- them into cross-project queries.  Project saved queries always
+-- implicitly execute in the context of a project.
+CREATE TABLE SavedQueryExecutesInProject (
+  query_id INT NOT NULL,
+  project_id SMALLINT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (query_id, project_id),
+  INDEX (project_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (query_id) REFERENCES SavedQuery(id)
+) ENGINE=INNODB;
+
+
+-- These are the queries edited by the project owner on the project
+-- admin pages.
+CREATE TABLE Project2SavedQuery (
+  project_id SMALLINT UNSIGNED NOT NULL,
+  rank SMALLINT UNSIGNED NOT NULL,
+  query_id INT NOT NULL,
+
+  -- TODO(jrobbins): visibility: owners, committers, contributors, anyone
+
+  PRIMARY KEY (project_id, rank),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (query_id) REFERENCES SavedQuery(id)
+) ENGINE=INNODB;
+
+
+-- These are personal saved queries.
+CREATE TABLE User2SavedQuery (
+  user_id INT UNSIGNED NOT NULL,
+  rank SMALLINT UNSIGNED NOT NULL,
+  query_id INT NOT NULL,
+
+  -- TODO(jrobbins): daily and weekly digests, and the ability to have
+  -- certain subscriptions go to username+SOMETHING@example.com.
+  subscription_mode ENUM ('noemail', 'immediate') DEFAULT 'noemail' NOT NULL,
+
+  PRIMARY KEY (user_id, rank),
+  FOREIGN KEY (user_id) REFERENCES User(user_id),
+  FOREIGN KEY (query_id) REFERENCES SavedQuery(id)
+) ENGINE=INNODB;
+
+
+-- Created whenever a user reports an issue or comment as spam.
+-- Note this is distinct from a SpamVerdict, which is issued by
+-- the system rather than a human user.
+CREATE TABLE SpamReport (
+  -- when this report was generated
+  created TIMESTAMP NOT NULL,
+  -- when the reported content was generated
+  -- TODO(jrobbins): needs default current_time in MySQL 5.7.
+  content_created TIMESTAMP NOT NULL,
+  -- id of the reporting user
+  user_id INT UNSIGNED NOT NULL,
+  -- id of the reported user
+  reported_user_id INT UNSIGNED NOT NULL,
+  -- either this or issue_id must be set
+  comment_id INT,
+  -- either this or comment_id must be set
+  issue_id INT,
+
+  INDEX (issue_id),
+  INDEX (comment_id),
+  UNIQUE (user_id, comment_id, issue_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (comment_id) REFERENCES Comment(id)
+) ENGINE=INNODB;
+
+
+-- Any time a human or the system sets is_spam to true,
+-- or changes it from true to false, we want to have a
+-- record of who did it and why.
+CREATE TABLE SpamVerdict (
+  -- when this verdict was generated
+  created TIMESTAMP NOT NULL,
+
+  -- id of the reporting user, may be null if it was
+  -- an automatic classification.
+  user_id INT UNSIGNED,
+
+  -- id of the containing project.
+  project_id INT NOT NULL,
+
+  -- either this or issue_id must be set.
+  comment_id INT,
+
+  -- either this or comment_id must be set.
+  issue_id INT,
+
+  -- If the classifier issued the verdict, this should be set.
+  classifier_confidence FLOAT,
+
+  -- This should reflect the new is_spam value that was applied
+  -- by this verdict, not the value it had prior.
+  is_spam BOOLEAN NOT NULL,
+
+  -- manual: a project owner marked it as spam.
+  -- threshhold: number of SpamReports from non-members was exceeded.
+  -- classifier: the automatic classifier reports it as spam.
+  -- fail_open: the classifier failed, resulting in a ham decision.
+  reason ENUM ("manual", "threshold", "classifier", "fail_open") NOT NULL,
+
+  overruled BOOL NOT NULL,
+
+  -- True indicates that the prediction service PRC failed and we gave up.
+  fail_open BOOL DEFAULT FALSE,
+
+  INDEX (issue_id),
+  INDEX (comment_id),
+  INDEX (classifier_confidence),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (comment_id) REFERENCES Comment(id)
+
+) ENGINE=INNODB;
+
+
+-- These are user-curated lists of issues which can be re-ordered to
+-- prioritize work.
+CREATE TABLE Hotlist (
+  id INT UNSIGNED NOT NULL AUTO_INCREMENT,
+  name VARCHAR(80) NOT NULL,
+
+  summary TEXT,
+  description TEXT,
+
+  is_private BOOLEAN DEFAULT FALSE,
+  is_deleted BOOLEAN DEFAULT FALSE,
+  default_col_spec TEXT,
+
+  PRIMARY KEY (id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Hotlist2Issue (
+  hotlist_id INT UNSIGNED NOT NULL,
+  issue_id INT NOT NULL,
+
+  rank BIGINT NOT NULL,
+  adder_id INT UNSIGNED,
+  added INT,
+  note TEXT,
+
+  PRIMARY KEY (hotlist_id, issue_id),
+  INDEX (hotlist_id),
+  INDEX (issue_id),
+  FOREIGN KEY (hotlist_id) REFERENCES Hotlist(id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (adder_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE Hotlist2User (
+  hotlist_id INT UNSIGNED NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+
+  role_name ENUM ('owner', 'editor', 'follower') NOT NULL,
+
+  PRIMARY KEY (hotlist_id, user_id),
+  INDEX (hotlist_id),
+  INDEX (user_id),
+  FOREIGN KEY (hotlist_id) REFERENCES Hotlist(id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE HotlistStar (
+  hotlist_id INT UNSIGNED NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (hotlist_id, user_id),
+  INDEX (user_id),
+  FOREIGN KEY (hotlist_id) REFERENCES Hotlist(id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE HotlistVisitHistory (
+  hotlist_id INT UNSIGNED NOT NULL,
+  user_id INT UNSIGNED NOT NULL,
+  viewed INT NOT NULL,
+
+  PRIMARY KEY (user_id, hotlist_id),
+  FOREIGN KEY (hotlist_id) REFERENCES Hotlist(id),
+  FOREIGN KEY (user_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE ComponentIssueClosedIndex (
+  closed_index INT NOT NULL,
+  PRIMARY KEY (closed_index)
+) ENGINE=INNODB;
+
+
+CREATE TABLE ApprovalDef2Approver (
+  approval_id INT NOT NULL,
+  approver_id INT UNSIGNED NOT NULL,
+  project_id SMALLINT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (approval_id, approver_id),
+
+  FOREIGN KEY (approval_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (approver_id) REFERENCES User(user_id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE ApprovalDef2Survey (
+  approval_id INT NOT NULL,
+  survey TEXT,
+  project_id SMALLINT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (approval_id),
+
+  FOREIGN KEY (approval_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id)
+) ENGINE=INNODB;
+
+CREATE TABLE Issue2ApprovalValue (
+  issue_id INT NOT NULL,
+  approval_id INT NOT NULL,
+  phase_id INT,
+  status ENUM ('needs_review', 'na', 'review_requested', 'review_started', 'need_info', 'approved', 'not_approved', 'not_set') DEFAULT 'not_set' NOT NULL,
+  setter_id INT UNSIGNED,
+  set_on INT,
+
+  PRIMARY KEY (issue_id, approval_id),
+  FOREIGN KEY (setter_id) REFERENCES User(user_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (approval_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (phase_id) REFERENCES IssuePhaseDef(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE IssueApproval2Approver (
+  issue_id INT NOT NULL,
+  approval_id INT NOT NULL,
+  approver_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (issue_id, approval_id, approver_id),
+  FOREIGN KEY (issue_id) REFERENCES Issue(id),
+  FOREIGN KEY (approval_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (approver_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE IssueApproval2Comment (
+  approval_id INT NOT NULL,
+  comment_id INT NOT NULL,
+
+  PRIMARY KEY (comment_id),
+  INDEX (approval_id),
+  FOREIGN KEY (approval_id) REFERENCES FieldDef(id),
+  FOREIGN KEY (comment_id) REFERENCES Comment(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE IssueSnapshot (
+  id INT NOT NULL AUTO_INCREMENT,
+  issue_id INT NOT NULL,
+  shard SMALLINT UNSIGNED DEFAULT 0 NOT NULL,
+  project_id SMALLINT UNSIGNED NOT NULL,
+  local_id INT NOT NULL,
+  reporter_id INT UNSIGNED NOT NULL,
+  owner_id INT UNSIGNED,
+  status_id INT,
+  period_start INT UNSIGNED NOT NULL,
+  period_end INT UNSIGNED NOT NULL,
+  is_open BOOLEAN DEFAULT TRUE,
+
+  PRIMARY KEY (id),
+  FOREIGN KEY (project_id) REFERENCES Project(project_id),
+  FOREIGN KEY (reporter_id) REFERENCES User(user_id),
+  FOREIGN KEY (owner_id) REFERENCES User(user_id),
+  FOREIGN KEY (status_id) REFERENCES StatusDef(id),
+  INDEX (shard, project_id, period_start, period_end),
+  INDEX by_period_start (shard, project_id, status_id, period_start),
+  INDEX by_period_end (shard, project_id, status_id, period_end),
+  KEY (issue_id, period_start, period_end)
+) ENGINE=INNODB;
+
+
+CREATE TABLE IssueSnapshot2Component (
+  issuesnapshot_id INT NOT NULL,
+  component_id INT NOT NULL,
+
+  PRIMARY KEY (issuesnapshot_id, component_id),
+  FOREIGN KEY (issuesnapshot_id) REFERENCES IssueSnapshot(id),
+  FOREIGN KEY (component_id) REFERENCES ComponentDef(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE IssueSnapshot2Label(
+  issuesnapshot_id INT NOT NULL,
+  label_id INT NOT NULL,
+
+  PRIMARY KEY (issuesnapshot_id, label_id),
+  FOREIGN KEY (issuesnapshot_id) REFERENCES IssueSnapshot(id),
+  FOREIGN KEY (label_id) REFERENCES LabelDef(id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE IssueSnapshot2Cc(
+  issuesnapshot_id INT NOT NULL,
+  cc_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (issuesnapshot_id, cc_id),
+  FOREIGN KEY (issuesnapshot_id) REFERENCES IssueSnapshot(id),
+  FOREIGN KEY (cc_id) REFERENCES User(user_id)
+) ENGINE=INNODB;
+
+
+CREATE TABLE IssueSnapshot2Hotlist(
+  issuesnapshot_id INT NOT NULL,
+  hotlist_id INT UNSIGNED NOT NULL,
+
+  PRIMARY KEY (issuesnapshot_id, hotlist_id),
+  FOREIGN KEY (issuesnapshot_id) REFERENCES IssueSnapshot(id),
+  FOREIGN KEY (hotlist_id) REFERENCES Hotlist(id)
+) ENGINE=INNODB;
diff --git a/search/__init__.py b/search/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/search/__init__.py
@@ -0,0 +1 @@
+
diff --git a/search/ast2ast.py b/search/ast2ast.py
new file mode 100644
index 0000000..bf4de4f
--- /dev/null
+++ b/search/ast2ast.py
@@ -0,0 +1,558 @@
+# 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
+
+"""Convert a user's issue search AST into a simplified AST.
+
+This phase of query processing simplifies the user's query by looking up
+the int IDs of any labels, statuses, or components that are mentioned by
+name in the original query.  The data needed for lookups is typically cached
+in RAM in each backend job, so this will not put much load on the DB.  The
+simplified ASTs are later converted into SQL which is simpler and has
+fewer joins.
+
+The simplified main query is better because:
+  + It is clearly faster, especially in the most common case where config
+    data is in RAM.
+  + Since less RAM is used to process the main query on each shard, query
+    execution time is more consistent with less variability under load.  Less
+    variability is good because the user must wait for the slowest shard.
+  + The config tables (LabelDef, StatusDef, etc.) exist only on the primary DB,
+    so they cannot be mentioned in a query that runs on a shard.
+  + The query string itself is shorter when numeric IDs are substituted, which
+    means that we can handle user queries with long lists of labels in a
+    reasonable-sized query.
+  + It bisects the complexity of the operation: it's easier to test and debug
+    the lookup and simplification logic plus the main query logic this way
+    than it would be to deal with an even more complex SQL main query.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+import re
+
+from framework import exceptions
+from proto import ast_pb2
+from proto import tracker_pb2
+# TODO(jrobbins): if BUILTIN_ISSUE_FIELDS was passed through, I could
+# remove this dep.
+from search import query2ast
+from tracker import tracker_bizobj
+from features import federated
+
+
+def PreprocessAST(
+    cnxn, query_ast, project_ids, services, harmonized_config, is_member=True):
+  """Preprocess the query by doing lookups so that the SQL query is simpler.
+
+  Args:
+    cnxn: connection to SQL database.
+    query_ast: user query abstract syntax tree parsed by query2ast.py.
+    project_ids: collection of int project IDs to use to look up status values
+        and labels.
+    services: Connections to persistence layer for users and configs.
+    harmonized_config: harmonized config for all projects being searched.
+    is_member: True if user is a member of all the projects being searched,
+        so they can do user substring searches.
+
+  Returns:
+    A new QueryAST PB with simplified conditions.  Specifically, string values
+    for labels, statuses, and components are replaced with the int IDs of
+    those items.  Also, is:open is distilled down to
+    status_id != closed_status_ids.
+  """
+  new_conjs = []
+  for conj in query_ast.conjunctions:
+    new_conds = [
+        _PreprocessCond(
+            cnxn, cond, project_ids, services, harmonized_config, is_member)
+        for cond in conj.conds]
+    new_conjs.append(ast_pb2.Conjunction(conds=new_conds))
+
+  return ast_pb2.QueryAST(conjunctions=new_conjs)
+
+
+def _PreprocessIsOpenCond(
+    cnxn, cond, project_ids, services, _harmonized_config, _is_member):
+  """Preprocess an is:open cond into status_id != closed_status_ids."""
+  if project_ids:
+    closed_status_ids = []
+    for project_id in project_ids:
+      closed_status_ids.extend(services.config.LookupClosedStatusIDs(
+          cnxn, project_id))
+  else:
+    closed_status_ids = services.config.LookupClosedStatusIDsAnyProject(cnxn)
+
+  # Invert the operator, because we're comparing against *closed* statuses.
+  if cond.op == ast_pb2.QueryOp.EQ:
+    op = ast_pb2.QueryOp.NE
+  elif cond.op == ast_pb2.QueryOp.NE:
+    op = ast_pb2.QueryOp.EQ
+  else:
+    raise MalformedQuery('Open condition got nonsensical op %r' % cond.op)
+
+  return ast_pb2.Condition(
+      op=op, field_defs=[query2ast.BUILTIN_ISSUE_FIELDS['status_id']],
+      int_values=closed_status_ids)
+
+
+def _PreprocessIsBlockedCond(
+    _cnxn, cond, _project_ids, _services, _harmonized_config, _is_member):
+  """Preprocess an is:blocked cond into issues that are blocked."""
+  if cond.op == ast_pb2.QueryOp.EQ:
+    op = ast_pb2.QueryOp.IS_DEFINED
+  elif cond.op == ast_pb2.QueryOp.NE:
+    op = ast_pb2.QueryOp.IS_NOT_DEFINED
+  else:
+    raise MalformedQuery('Blocked condition got nonsensical op %r' % cond.op)
+
+  return ast_pb2.Condition(
+      op=op, field_defs=[query2ast.BUILTIN_ISSUE_FIELDS['blockedon_id']])
+
+
+def _PreprocessIsSpamCond(
+    _cnxn, cond, _project_ids, _services, _harmonized_config, _is_member):
+  """Preprocess an is:spam cond into is_spam == 1."""
+  if cond.op == ast_pb2.QueryOp.EQ:
+    int_values = [1]
+  elif cond.op == ast_pb2.QueryOp.NE:
+    int_values = [0]
+  else:
+    raise MalformedQuery('Spam condition got nonsensical op %r' % cond.op)
+
+  return ast_pb2.Condition(
+      op=ast_pb2.QueryOp.EQ,
+      field_defs=[query2ast.BUILTIN_ISSUE_FIELDS['is_spam']],
+      int_values=int_values)
+
+
+def _PreprocessBlockedOnCond(
+    cnxn, cond, project_ids, services, _harmonized_config, _is_member):
+  """Preprocess blockedon=xyz and has:blockedon conds.
+
+  Preprocesses blockedon=xyz cond into blockedon_id:issue_ids.
+  Preprocesses has:blockedon cond into issues that are blocked on other issues.
+  """
+  issue_ids, ext_issue_ids = _GetIssueIDsFromLocalIdsCond(cnxn,
+    cond, project_ids, services)
+  return ast_pb2.Condition(
+      op=_TextOpToIntOp(cond.op),
+      field_defs=[query2ast.BUILTIN_ISSUE_FIELDS['blockedon_id']],
+      int_values=issue_ids,
+      str_values=ext_issue_ids)
+
+
+def _PreprocessBlockingCond(
+    cnxn, cond, project_ids, services, _harmonized_config, _is_member):
+  """Preprocess blocking=xyz and has:blocking conds.
+
+  Preprocesses blocking=xyz cond into blocking_id:issue_ids.
+  Preprocesses has:blocking cond into issues that are blocking other issues.
+  """
+  issue_ids, ext_issue_ids = _GetIssueIDsFromLocalIdsCond(cnxn,
+    cond, project_ids, services)
+  return ast_pb2.Condition(
+      op=_TextOpToIntOp(cond.op),
+      field_defs=[query2ast.BUILTIN_ISSUE_FIELDS['blocking_id']],
+      int_values=issue_ids,
+      str_values=ext_issue_ids)
+
+
+def _PreprocessMergedIntoCond(
+    cnxn, cond, project_ids, services, _harmonized_config, _is_member):
+  """Preprocess mergedinto=xyz and has:mergedinto conds.
+
+  Preprocesses mergedinto=xyz cond into mergedinto_id:issue_ids.
+  Preprocesses has:mergedinto cond into has:mergedinto_id.
+  """
+  issue_ids, ext_issue_ids = _GetIssueIDsFromLocalIdsCond(cnxn,
+    cond, project_ids, services)
+  return ast_pb2.Condition(
+      op=_TextOpToIntOp(cond.op),
+      field_defs=[query2ast.BUILTIN_ISSUE_FIELDS['mergedinto_id']],
+      int_values=issue_ids,
+      str_values=ext_issue_ids)
+
+
+def _GetIssueIDsFromLocalIdsCond(cnxn, cond, project_ids, services):
+  """Returns global IDs from the local IDs provided in the cond."""
+  # Get {project_name: project} for all projects in project_ids.
+  ids_to_projects = services.project.GetProjects(cnxn, project_ids)
+  ref_projects = {pb.project_name: pb for pb in ids_to_projects.values()}
+  # Populate default_project_name if there is only one project id provided.
+  default_project_name = None
+  if len(ref_projects) == 1:
+    default_project_name = list(ref_projects.values())[0].project_name
+
+  # Populate refs with (project_name, local_id) pairs.
+  refs = []
+  # Populate ext_issue_ids with strings like 'b/1234'.
+  ext_issue_ids = []
+  for val in cond.str_values:
+    try:
+      project_name, local_id = tracker_bizobj.ParseIssueRef(val)
+      if not project_name:
+        if not default_project_name:
+          # TODO(rmistry): Support the below.
+          raise MalformedQuery(
+              'Searching for issues accross multiple/all projects without '
+              'project prefixes is ambiguous and is currently not supported.')
+        project_name = default_project_name
+      refs.append((project_name, int(local_id)))
+    except MalformedQuery as e:
+      raise e
+    # Can't parse issue id, try external issue pattern.
+    except ValueError as e:
+      if federated.FromShortlink(val):
+        ext_issue_ids.append(val)
+      else:
+        raise MalformedQuery('Could not parse issue reference: %s' % val)
+
+  issue_ids, _misses =  services.issue.ResolveIssueRefs(
+      cnxn, ref_projects, default_project_name, refs)
+  return issue_ids, ext_issue_ids
+
+
+def _PreprocessStatusCond(
+    cnxn, cond, project_ids, services, _harmonized_config, _is_member):
+  """Preprocess a status=names cond into status_id=IDs."""
+  if project_ids:
+    status_ids = []
+    for project_id in project_ids:
+      status_ids.extend(services.config.LookupStatusIDs(
+          cnxn, project_id, cond.str_values))
+  else:
+    status_ids = services.config.LookupStatusIDsAnyProject(
+        cnxn, cond.str_values)
+
+  return ast_pb2.Condition(
+      op=_TextOpToIntOp(cond.op),
+      field_defs=[query2ast.BUILTIN_ISSUE_FIELDS['status_id']],
+      int_values=status_ids)
+
+
+def _IsEqualityOp(op):
+  """Return True for EQ and NE."""
+  return op in (ast_pb2.QueryOp.EQ, ast_pb2.QueryOp.NE)
+
+
+def _IsDefinedOp(op):
+  """Return True for IS_DEFINED and IS_NOT_DEFINED."""
+  return op in (ast_pb2.QueryOp.IS_DEFINED, ast_pb2.QueryOp.IS_NOT_DEFINED)
+
+
+def _TextOpToIntOp(op):
+  """If a query is optimized from string to ID matching, use an equality op."""
+  if op == ast_pb2.QueryOp.TEXT_HAS or op == ast_pb2.QueryOp.KEY_HAS:
+    return ast_pb2.QueryOp.EQ
+  elif op == ast_pb2.QueryOp.NOT_TEXT_HAS:
+    return ast_pb2.QueryOp.NE
+  return op
+
+
+def _MakePrefixRegex(cond):
+  """Return a regex to match strings that start with cond values."""
+  all_prefixes = '|'.join(map(re.escape, cond.str_values))
+  return re.compile(r'(%s)-.+' % all_prefixes, re.I)
+
+
+def _MakeKeyValueRegex(cond):
+  """Return a regex to match the first token and remaining text separately."""
+  keys, values = list(zip(*[x.split('-', 1) for x in cond.str_values]))
+  if len(set(keys)) != 1:
+    raise MalformedQuery(
+        "KeyValue query with multiple different keys: %r" % cond.str_values)
+  all_values = '|'.join(map(re.escape, values))
+  return re.compile(r'%s-.*\b(%s)\b.*' % (keys[0], all_values), re.I)
+
+
+def _MakeWordBoundaryRegex(cond):
+  """Return a regex to match the cond values as whole words."""
+  all_words = '|'.join(map(re.escape, cond.str_values))
+  return re.compile(r'.*\b(%s)\b.*' % all_words, re.I)
+
+
+def _PreprocessLabelCond(
+    cnxn, cond, project_ids, services, _harmonized_config, _is_member):
+  """Preprocess a label=names cond into label_id=IDs."""
+  if project_ids:
+    label_ids = []
+    for project_id in project_ids:
+      if _IsEqualityOp(cond.op):
+        label_ids.extend(services.config.LookupLabelIDs(
+            cnxn, project_id, cond.str_values))
+      elif _IsDefinedOp(cond.op):
+        label_ids.extend(services.config.LookupIDsOfLabelsMatching(
+            cnxn, project_id, _MakePrefixRegex(cond)))
+      elif cond.op == ast_pb2.QueryOp.KEY_HAS:
+        label_ids.extend(services.config.LookupIDsOfLabelsMatching(
+            cnxn, project_id, _MakeKeyValueRegex(cond)))
+      else:
+        label_ids.extend(services.config.LookupIDsOfLabelsMatching(
+            cnxn, project_id, _MakeWordBoundaryRegex(cond)))
+  else:
+    if _IsEqualityOp(cond.op):
+      label_ids = services.config.LookupLabelIDsAnyProject(
+          cnxn, cond.str_values)
+    elif _IsDefinedOp(cond.op):
+      label_ids = services.config.LookupIDsOfLabelsMatchingAnyProject(
+          cnxn, _MakePrefixRegex(cond))
+    elif cond.op == ast_pb2.QueryOp.KEY_HAS:
+      label_ids = services.config.LookupIDsOfLabelsMatchingAnyProject(
+          cnxn, _MakeKeyValueRegex(cond))
+    else:
+      label_ids = services.config.LookupIDsOfLabelsMatchingAnyProject(
+          cnxn, _MakeWordBoundaryRegex(cond))
+
+  return ast_pb2.Condition(
+      op=_TextOpToIntOp(cond.op),
+      field_defs=[query2ast.BUILTIN_ISSUE_FIELDS['label_id']],
+      int_values=label_ids)
+
+
+def _PreprocessComponentCond(
+    cnxn, cond, project_ids, services, harmonized_config, _is_member):
+  """Preprocess a component= or component:name cond into component_id=IDs."""
+  exact = _IsEqualityOp(cond.op)
+  component_ids = []
+  if project_ids:
+    # We are searching within specific projects, so harmonized_config
+    # holds the config data for all those projects.
+    for comp_path in cond.str_values:
+      component_ids.extend(tracker_bizobj.FindMatchingComponentIDs(
+          comp_path, harmonized_config, exact=exact))
+  else:
+    # We are searching across the whole site, so we have no harmonized_config
+    # to use.
+    component_ids = services.config.FindMatchingComponentIDsAnyProject(
+        cnxn, cond.str_values, exact=exact)
+
+  return ast_pb2.Condition(
+      op=_TextOpToIntOp(cond.op),
+      field_defs=[query2ast.BUILTIN_ISSUE_FIELDS['component_id']],
+      int_values=component_ids)
+
+
+def _PreprocessExactUsers(
+    cnxn, cond, user_service, id_fields, is_member):
+  """Preprocess a foo=emails cond into foo_id=IDs, if exact user match.
+
+  This preprocesing step converts string conditions to int ID conditions.
+  E.g., [owner=email] to [owner_id=ID].  It only does it in cases
+  where (a) the email was "me", so it was already converted to an string of
+  digits in the search pipeline, or (b) it is "user@domain" which resolves to
+  a known Monorail user.  It is also possible to search for, e.g.,
+  [owner:substring], but such searches remain 'owner' field searches rather
+  than 'owner_id', and they cannot be combined with the "me" keyword.
+
+  Args:
+    cnxn: connection to the DB.
+    cond: original parsed query Condition PB.
+    user_service: connection to user persistence layer.
+    id_fields: list of the search fields to use if the conversion to IDs
+        succeed.
+    is_member: True if user is a member of all the projects being searchers,
+        so they can do user substring searches.
+
+  Returns:
+    A new Condition PB that checks the id_field.  Or, the original cond.
+
+  Raises:
+    MalformedQuery: A non-member used a query term that could be used to
+        guess full user email addresses.
+  """
+  op = _TextOpToIntOp(cond.op)
+  if _IsDefinedOp(op):
+    # No need to look up any IDs if we are just testing for any defined value.
+    return ast_pb2.Condition(op=op, field_defs=id_fields,
+                             key_suffix=cond.key_suffix,
+                             phase_name=cond.phase_name)
+
+  # This preprocessing step is only for ops that compare whole values, not
+  # substrings.
+  if not _IsEqualityOp(op):
+    logging.info('could not convert to IDs because op is %r', op)
+    if not is_member:
+      raise MalformedQuery('Only project members may compare user strings')
+    return cond
+
+  user_ids = []
+  for val in cond.str_values:
+    try:
+      user_ids.append(int(val))
+    except ValueError:
+      try:
+        user_ids.append(user_service.LookupUserID(cnxn, val))
+      except exceptions.NoSuchUserException:
+        if not is_member and val != 'me' and not val.startswith('@'):
+          logging.info('could not convert user %r to int ID', val)
+          if '@' in val:
+            raise MalformedQuery('User email address not found')
+          else:
+            raise MalformedQuery(
+                'Only project members may search for user substrings')
+        return cond  # preprocessing failed, stick with the original cond.
+
+  return ast_pb2.MakeCond(
+      op, id_fields, [], user_ids, key_suffix=cond.key_suffix,
+      phase_name=cond.phase_name)
+
+
+def _PreprocessOwnerCond(
+    cnxn, cond, _project_ids, services, _harmonized_config, is_member):
+  """Preprocess a owner=emails cond into owner_id=IDs, if exact user match."""
+  return _PreprocessExactUsers(
+      cnxn, cond, services.user, [query2ast.BUILTIN_ISSUE_FIELDS['owner_id']],
+      is_member)
+
+
+def _PreprocessCcCond(
+    cnxn, cond, _project_ids, services, _harmonized_config, is_member):
+  """Preprocess a cc=emails cond into cc_id=IDs, if exact user match."""
+  return _PreprocessExactUsers(
+      cnxn, cond, services.user, [query2ast.BUILTIN_ISSUE_FIELDS['cc_id']],
+      is_member)
+
+
+def _PreprocessReporterCond(
+    cnxn, cond, _project_ids, services, _harmonized_config, is_member):
+  """Preprocess a reporter=emails cond into reporter_id=IDs, if exact."""
+  return _PreprocessExactUsers(
+      cnxn, cond, services.user,
+      [query2ast.BUILTIN_ISSUE_FIELDS['reporter_id']], is_member)
+
+
+def _PreprocessStarredByCond(
+    cnxn, cond, _project_ids, services, _harmonized_config, is_member):
+  """Preprocess a starredby=emails cond into starredby_id=IDs, if exact."""
+  return _PreprocessExactUsers(
+      cnxn, cond, services.user,
+      [query2ast.BUILTIN_ISSUE_FIELDS['starredby_id']], is_member)
+
+
+def _PreprocessCommentByCond(
+    cnxn, cond, _project_ids, services, _harmonized_config, is_member):
+  """Preprocess a commentby=emails cond into commentby_id=IDs, if exact."""
+  return _PreprocessExactUsers(
+      cnxn, cond, services.user,
+      [query2ast.BUILTIN_ISSUE_FIELDS['commentby_id']], is_member)
+
+
+def _PreprocessHotlistCond(
+    cnxn, cond, _project_ids, services, _harmonized_config, _is_member):
+  """Preprocess hotlist query
+
+  Preprocesses a hotlist query in the form:
+  'hotlist=<user_email>:<hotlist-name>,<hotlist-name>,<user2_email>:...
+  into hotlist_id=IDs, if exact.
+  """
+  # TODO(jojwang): add support for searches that don't contain domain names.
+  # eg jojwang:hotlist-name
+  users_to_hotlists = collections.defaultdict(list)
+  cur_user = ''
+  for val in cond.str_values:
+    if ':' in val:
+      cur_user, hotlists_str = val.split(':', 1)
+    else:
+      hotlists_str = val
+    try:
+      users_to_hotlists[int(cur_user)].append(hotlists_str)
+    except ValueError:
+      try:
+        user_id = services.user.LookupUserID(cnxn, cur_user)
+        users_to_hotlists[user_id].append(hotlists_str)
+      except exceptions.NoSuchUserException:
+        logging.info('could not convert user %r to int ID', val)
+        return cond
+  hotlist_ids = set()
+  for user_id, hotlists in users_to_hotlists.items():
+    if not hotlists[0]:
+      user_hotlists = services.features.GetHotlistsByUserID(cnxn, user_id)
+      user_hotlist_ids = [hotlist.hotlist_id for hotlist in user_hotlists if
+                          user_id in hotlist.owner_ids]
+    else:
+      user_hotlist_ids = list(services.features.LookupHotlistIDs(
+          cnxn, hotlists, [user_id]).values())
+    for hotlist_id in user_hotlist_ids:
+      hotlist_ids.add(hotlist_id)
+  return ast_pb2.Condition(
+      op=_TextOpToIntOp(cond.op),
+      field_defs=[query2ast.BUILTIN_ISSUE_FIELDS['hotlist_id']],
+      int_values=list(hotlist_ids))
+
+
+def _PreprocessCustomCond(cnxn, cond, services, is_member):
+  """Preprocess a custom_user_field=emails cond into IDs, if exact matches."""
+  # TODO(jrobbins): better support for ambiguous fields.
+  # For now, if any field is USER_TYPE and the value being searched
+  # for is the email address of an existing account, it will convert
+  # to a user ID and we go with exact ID matching.  Otherwise, we
+  # leave the cond as-is for ast2select to do string matching on.
+  user_field_defs = [fd for fd in cond.field_defs
+                     if fd.field_type == tracker_pb2.FieldTypes.USER_TYPE]
+  if user_field_defs:
+    return _PreprocessExactUsers(
+        cnxn, cond, services.user, user_field_defs, is_member)
+
+  approval_field_defs = [fd for fd in cond.field_defs
+                         if (fd.field_type ==
+                             tracker_pb2.FieldTypes.APPROVAL_TYPE)]
+  if approval_field_defs:
+    if cond.key_suffix in [query2ast.APPROVER_SUFFIX, query2ast.SET_BY_SUFFIX]:
+      return _PreprocessExactUsers(
+          cnxn, cond, services.user, approval_field_defs, is_member)
+
+  return cond
+
+
+_PREPROCESSORS = {
+    'open': _PreprocessIsOpenCond,
+    'blocked': _PreprocessIsBlockedCond,
+    'spam': _PreprocessIsSpamCond,
+    'blockedon': _PreprocessBlockedOnCond,
+    'blocking': _PreprocessBlockingCond,
+    'mergedinto': _PreprocessMergedIntoCond,
+    'status': _PreprocessStatusCond,
+    'label': _PreprocessLabelCond,
+    'component': _PreprocessComponentCond,
+    'owner': _PreprocessOwnerCond,
+    'cc': _PreprocessCcCond,
+    'reporter': _PreprocessReporterCond,
+    'starredby': _PreprocessStarredByCond,
+    'commentby': _PreprocessCommentByCond,
+    'hotlist': _PreprocessHotlistCond,
+    }
+
+
+def _PreprocessCond(
+    cnxn, cond, project_ids, services, harmonized_config, is_member):
+  """Preprocess query by looking up status, label and component IDs."""
+  # All the fields in a cond share the same name because they are parsed
+  # from a user query term, and the term syntax allows just one field name.
+  field_name = cond.field_defs[0].field_name
+  assert all(fd.field_name == field_name for fd in cond.field_defs)
+
+  # Case 1: The user is searching custom fields.
+  if any(fd.field_id for fd in cond.field_defs):
+    # There can't be a mix of custom and built-in fields because built-in
+    # field names are reserved and take priority over any conflicting ones.
+    assert all(fd.field_id for fd in cond.field_defs)
+    return _PreprocessCustomCond(cnxn, cond, services, is_member)
+
+  # Case 2: The user is searching a built-in field.
+  preproc = _PREPROCESSORS.get(field_name)
+  if preproc:
+    # We have a preprocessor for that built-in field.
+    return preproc(
+        cnxn, cond, project_ids, services, harmonized_config, is_member)
+  else:
+    # We don't have a preprocessor for it.
+    return cond
+
+
+class MalformedQuery(ValueError):
+  pass
diff --git a/search/ast2select.py b/search/ast2select.py
new file mode 100644
index 0000000..a6e5f17
--- /dev/null
+++ b/search/ast2select.py
@@ -0,0 +1,957 @@
+# 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
+
+"""Convert a user's issue search AST into SQL clauses.
+
+The main query is done on the Issues table.
+ + Some simple conditions are implemented as WHERE conditions on the Issue
+   table rows.  These are generated by the _Compare() function.
+ + More complex conditions are implemented via a "LEFT JOIN ... ON ..." clause
+   plus a check in the WHERE clause to select only rows where the join's ON
+   condition was satisfied.  These are generated by appending a clause to
+   the left_joins list plus calling _CompareAlreadyJoined().  Each such left
+   join defines a unique alias to keep it separate from other conditions.
+
+The functions that generate SQL snippets need to insert table names, column
+names, alias names, and value placeholders into the generated string.  These
+functions use the string format() method and the "{varname}" syntax to avoid
+confusion with the "%s" syntax used for SQL value placeholders.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from framework import sql
+from proto import ast_pb2
+from proto import tracker_pb2
+from search import query2ast
+from services import tracker_fulltext
+
+
+NATIVE_SEARCHABLE_FIELDS = {
+    'id': 'local_id',
+    'is_spam': 'is_spam',
+    'stars': 'star_count',
+    'attachments': 'attachment_count',
+    'opened': 'opened',
+    'closed': 'closed',
+    'modified': 'modified',
+    'ownermodified': 'owner_modified',
+    'statusmodified': 'status_modified',
+    'componentmodified': 'component_modified',
+    }
+
+
+def BuildSQLQuery(query_ast, snapshot_mode=False):
+  """Translate the user's query into an SQL query.
+
+  Args:
+    query_ast: user query abstract syntax tree parsed by query2ast.py.
+
+  Returns:
+    A pair of lists (left_joins, where) to use when building the SQL SELECT
+    statement.  Each of them is a list of (str, [val, ...]) pairs.
+  """
+  left_joins = []
+  where = []
+  unsupported_conds = []
+  # OR-queries are broken down into multiple simpler queries before they
+  # are sent to the backends, so we should never see an "OR"..
+  assert len(query_ast.conjunctions) == 1, 'OR-query should have been split'
+  conj = query_ast.conjunctions[0]
+
+  for cond_num, cond in enumerate(conj.conds):
+    cond_left_joins, cond_where, unsupported = _ProcessCond(cond_num, cond,
+        snapshot_mode)
+    left_joins.extend(cond_left_joins)
+    where.extend(cond_where)
+    unsupported_conds.extend(unsupported)
+
+  return left_joins, where, unsupported_conds
+
+
+def _ProcessBlockedOnIDCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert a blockedon_id=issue_id cond to SQL."""
+  return _ProcessRelatedIDCond(cond, alias, 'blockedon',
+      snapshot_mode=snapshot_mode)
+
+
+def _ProcessBlockingIDCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert a blocking_id:1,2 cond to SQL."""
+  return _ProcessRelatedIDCond(cond, alias, 'blockedon', reverse_relation=True,
+      snapshot_mode=snapshot_mode)
+
+
+def _ProcessMergedIntoIDCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert a mergedinto:1,2 cond to SQL."""
+  return _ProcessRelatedIDCond(cond, alias, 'mergedinto',
+      snapshot_mode=snapshot_mode)
+
+
+def _ProcessRelatedIDCond(cond, alias, kind, reverse_relation=False,
+                          snapshot_mode=False):
+  """Convert either blocking_id, blockedon_id, or mergedinto_id cond to SQL.
+
+  Normally, we query for issue_id values where the dst_issue_id matches the
+  IDs specified in the cond.  However, when reverse_relation is True, we
+  query for dst_issue_id values where issue_id matches.  This is done for
+  blockedon_id.
+  """
+  if snapshot_mode:
+    return [], [], [cond]
+
+  matching_issue_col = 'issue_id' if reverse_relation else 'dst_issue_id'
+  ret_issue_col = 'dst_issue_id' if reverse_relation else 'issue_id'
+  ext_kind = 'blocking' if reverse_relation else kind
+  left_join = []
+  where = []
+
+  issue_ids = cond.int_values
+  ext_issue_ids = cond.str_values
+  # Filter has:blockedon and has:blocking.
+  if (not issue_ids) and (not ext_issue_ids):
+    kind_cond_str, kind_cond_args = _Compare(
+      alias, ast_pb2.QueryOp.EQ, tracker_pb2.FieldTypes.STR_TYPE, 'kind',
+      [kind])
+    left_join_str = (
+        'IssueRelation AS {alias} ON Issue.id = {alias}.{ret_issue_col} AND '
+         '{kind_cond}').format(
+             alias=alias, ret_issue_col=ret_issue_col, kind_cond=kind_cond_str)
+    left_join_args = kind_cond_args
+    left_join.append((left_join_str, left_join_args))
+    kind_cond_str, kind_cond_args = _Compare(
+      'DIR', ast_pb2.QueryOp.EQ, tracker_pb2.FieldTypes.STR_TYPE, 'kind',
+      [ext_kind])
+    ext_left_join_str = ('DanglingIssueRelation AS DIR ON '
+        'Issue.id = DIR.issue_id AND {kind_cond}').format(
+            kind_cond=kind_cond_str)
+    left_join.append((ext_left_join_str, kind_cond_args))
+    where_str, where_args = _CompareAlreadyJoined(alias,
+      cond.op, ret_issue_col)
+    ext_where_str, ext_where_args = _CompareAlreadyJoined('DIR',
+      cond.op, 'issue_id')
+    where.append(('({where} OR {ext_where})'.format(
+      where=where_str, ext_where=ext_where_str),
+      where_args + ext_where_args))
+  # Filter kind using provided issue ids.
+  if issue_ids:
+    kind_cond_str, kind_cond_args = _Compare(
+      alias, ast_pb2.QueryOp.EQ, tracker_pb2.FieldTypes.STR_TYPE, 'kind',
+      [kind])
+    left_join_str = (
+        'IssueRelation AS {alias} ON Issue.id = {alias}.{ret_issue_col} AND '
+         '{kind_cond}').format(
+             alias=alias, ret_issue_col=ret_issue_col, kind_cond=kind_cond_str)
+    left_join_args = kind_cond_args
+    related_cond_str, related_cond_args = _Compare(
+        alias, ast_pb2.QueryOp.EQ, tracker_pb2.FieldTypes.INT_TYPE,
+        matching_issue_col, issue_ids)
+    left_join_str += ' AND {related_cond}'.format(related_cond=related_cond_str)
+    left_join_args += related_cond_args
+
+    left_join.append((left_join_str, left_join_args))
+    where.append(_CompareAlreadyJoined(alias, cond.op, ret_issue_col))
+  # Filter kind using provided external issue ids.
+  if ext_issue_ids:
+    kind_cond_str, kind_cond_args = _Compare(
+      'DIR', ast_pb2.QueryOp.EQ, tracker_pb2.FieldTypes.STR_TYPE, 'kind',
+      [ext_kind])
+    ext_left_join_str = ('DanglingIssueRelation AS DIR ON '
+        'Issue.id = DIR.issue_id AND {kind_cond}').format(
+            kind_cond=kind_cond_str)
+    related_cond_str, related_cond_args = _Compare(
+        'DIR', ast_pb2.QueryOp.EQ, tracker_pb2.FieldTypes.INT_TYPE,
+        'ext_issue_identifier', ext_issue_ids)
+    ext_left_join_str += ' AND {related_cond}'.format(
+        related_cond=related_cond_str)
+    kind_cond_args += related_cond_args
+
+    left_join.append((ext_left_join_str, kind_cond_args))
+    where.append(_CompareAlreadyJoined('DIR', cond.op, 'issue_id'))
+  return left_join, where, []
+
+
+def _GetFieldTypeAndValues(cond):
+  """Returns the field type and values to use from the condition.
+
+  This function should be used when we do not know what values are present on
+  the condition. Eg: cond.int_values could be set if ast2ast.py preprocessing is
+  first done. If that preprocessing is not done then str_values could be set
+  instead.
+  If both int values and str values exist on the condition then the int values
+  are returned.
+  """
+  if cond.int_values:
+    return tracker_pb2.FieldTypes.INT_TYPE, cond.int_values
+  else:
+    return tracker_pb2.FieldTypes.STR_TYPE, cond.str_values
+
+
+def _ProcessOwnerCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert an owner:substring cond to SQL."""
+  if snapshot_mode:
+    left_joins = [(
+        'User AS {alias} ON '
+        'IssueSnapshot.owner_id = {alias}.user_id'.format(alias=alias),
+        [])]
+  else:
+    left_joins = [(
+        'User AS {alias} ON (Issue.owner_id = {alias}.user_id '
+        'OR Issue.derived_owner_id = {alias}.user_id)'.format(alias=alias),
+        [])]
+  where = [_Compare(alias, cond.op, tracker_pb2.FieldTypes.STR_TYPE, 'email',
+                    cond.str_values)]
+
+  return left_joins, where, []
+
+
+def _ProcessOwnerIDCond(cond, _alias, _spare_alias, snapshot_mode):
+  """Convert an owner_id=user_id cond to SQL."""
+  if snapshot_mode:
+    field_type, field_values = _GetFieldTypeAndValues(cond)
+    explicit_str, explicit_args = _Compare(
+        'IssueSnapshot', cond.op, field_type, 'owner_id', field_values)
+    where = [(explicit_str, explicit_args)]
+  else:
+    field_type, field_values = _GetFieldTypeAndValues(cond)
+    explicit_str, explicit_args = _Compare(
+        'Issue', cond.op, field_type, 'owner_id', field_values)
+    derived_str, derived_args = _Compare(
+        'Issue', cond.op, field_type, 'derived_owner_id', field_values)
+    if cond.op in (ast_pb2.QueryOp.NE, ast_pb2.QueryOp.NOT_TEXT_HAS):
+      where = [(explicit_str, explicit_args), (derived_str, derived_args)]
+    else:
+      if cond.op == ast_pb2.QueryOp.IS_NOT_DEFINED:
+        op = ' AND '
+      else:
+        op = ' OR '
+      where = [
+          ('(' + explicit_str + op + derived_str + ')',
+           explicit_args + derived_args)]
+
+  return [], where, []
+
+
+def _ProcessOwnerLastVisitCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert an ownerlastvisit<timestamp cond to SQL."""
+  # TODO(jeffcarp): It is possible to support this on snapshots.
+  if snapshot_mode:
+    return [], [], [cond]
+
+  left_joins = [(
+      'User AS {alias} '
+      'ON (Issue.owner_id = {alias}.user_id OR '
+      'Issue.derived_owner_id = {alias}.user_id)'.format(alias=alias),
+      [])]
+  where = [_Compare(alias, cond.op, tracker_pb2.FieldTypes.INT_TYPE,
+                    'last_visit_timestamp', cond.int_values)]
+  return left_joins, where, []
+
+
+def _ProcessIsOwnerBouncing(cond, alias, _spare_alias, snapshot_mode):
+  """Convert an is:ownerbouncing cond to SQL."""
+  if snapshot_mode:
+    return [], [], [cond]
+
+  left_joins = [(
+      'User AS {alias} '
+      'ON (Issue.owner_id = {alias}.user_id OR '
+      'Issue.derived_owner_id = {alias}.user_id)'.format(alias=alias),
+      [])]
+  if cond.op == ast_pb2.QueryOp.EQ:
+    op = ast_pb2.QueryOp.IS_DEFINED
+  else:
+    op = ast_pb2.QueryOp.IS_NOT_DEFINED
+
+  where = [_Compare(alias, op, tracker_pb2.FieldTypes.INT_TYPE,
+                    'email_bounce_timestamp', [])]
+  return left_joins, where, []
+
+
+def _ProcessReporterCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert a reporter:substring cond to SQL."""
+  if snapshot_mode:
+    left_joins = [(
+        'User AS {alias} ON IssueSnapshot.reporter_id = {alias}.user_id'.format(
+            alias=alias), [])]
+  else:
+    left_joins = [(
+        'User AS {alias} ON Issue.reporter_id = {alias}.user_id'.format(
+            alias=alias), [])]
+  where = [_Compare(alias, cond.op, tracker_pb2.FieldTypes.STR_TYPE, 'email',
+                    cond.str_values)]
+
+  return left_joins, where, []
+
+
+def _ProcessReporterIDCond(cond, _alias, _spare_alias, snapshot_mode):
+  """Convert a reporter_ID=user_id cond to SQL."""
+  field_type, field_values = _GetFieldTypeAndValues(cond)
+
+  if snapshot_mode:
+    where = [_Compare(
+        'IssueSnapshot', cond.op, field_type, 'reporter_id', field_values)]
+  else:
+    where = [_Compare(
+        'Issue', cond.op, field_type, 'reporter_id', field_values)]
+  return [], where, []
+
+
+def _ProcessCcCond(cond, alias, user_alias, snapshot_mode):
+  """Convert a cc:substring cond to SQL."""
+  email_cond_str, email_cond_args = _Compare(
+      user_alias, ast_pb2.QueryOp.TEXT_HAS, tracker_pb2.FieldTypes.STR_TYPE,
+      'email', cond.str_values)
+
+  if snapshot_mode:
+    left_joins = [(
+        '(IssueSnapshot2Cc AS {alias} JOIN User AS {user_alias} '
+        'ON {alias}.cc_id = {user_alias}.user_id AND {email_cond}) '
+        'ON IssueSnapshot.id = {alias}.issuesnapshot_id'.format(
+            alias=alias, user_alias=user_alias, email_cond=email_cond_str),
+        email_cond_args)]
+  else:
+    # Note: email_cond_str will have parens, if needed.
+    left_joins = [(
+        '(Issue2Cc AS {alias} JOIN User AS {user_alias} '
+        'ON {alias}.cc_id = {user_alias}.user_id AND {email_cond}) '
+        'ON Issue.id = {alias}.issue_id AND '
+        'Issue.shard = {alias}.issue_shard'.format(
+            alias=alias, user_alias=user_alias, email_cond=email_cond_str),
+        email_cond_args)]
+  where = [_CompareAlreadyJoined(user_alias, cond.op, 'email')]
+
+  return left_joins, where, []
+
+
+def _ProcessCcIDCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert a cc_id=user_id cond to SQL."""
+  if snapshot_mode:
+    join_str = (
+        'IssueSnapshot2Cc AS {alias} '
+        'ON IssueSnapshot.id = {alias}.issuesnapshot_id'.format(alias=alias))
+  else:
+    join_str = (
+        'Issue2Cc AS {alias} ON Issue.id = {alias}.issue_id AND '
+        'Issue.shard = {alias}.issue_shard'.format(
+            alias=alias))
+  if cond.op in (ast_pb2.QueryOp.IS_DEFINED, ast_pb2.QueryOp.IS_NOT_DEFINED):
+    left_joins = [(join_str, [])]
+  else:
+    field_type, field_values = _GetFieldTypeAndValues(cond)
+    cond_str, cond_args = _Compare(
+        alias, ast_pb2.QueryOp.EQ, field_type, 'cc_id', field_values)
+    left_joins = [(join_str + ' AND ' + cond_str, cond_args)]
+
+  where = [_CompareAlreadyJoined(alias, cond.op, 'cc_id')]
+  return left_joins, where, []
+
+
+def _ProcessStarredByCond(cond, alias, user_alias, snapshot_mode):
+  """Convert a starredby:substring cond to SQL."""
+  if snapshot_mode:
+    return [], [], [cond]
+
+  email_cond_str, email_cond_args = _Compare(
+      user_alias, cond.op, tracker_pb2.FieldTypes.STR_TYPE, 'email',
+      cond.str_values)
+  # Note: email_cond_str will have parens, if needed.
+  left_joins = [(
+      '(IssueStar AS {alias} JOIN User AS {user_alias} '
+      'ON {alias}.user_id = {user_alias}.user_id AND {email_cond}) '
+      'ON Issue.id = {alias}.issue_id'.format(
+          alias=alias, user_alias=user_alias, email_cond=email_cond_str),
+      email_cond_args)]
+  where = [_CompareAlreadyJoined(user_alias, cond.op, 'email')]
+
+  return left_joins, where, []
+
+
+def _ProcessStarredByIDCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert a starredby_id=user_id cond to SQL."""
+  if snapshot_mode:
+    return [], [], [cond]
+
+  join_str = 'IssueStar AS {alias} ON Issue.id = {alias}.issue_id'.format(
+      alias=alias)
+  if cond.op in (ast_pb2.QueryOp.IS_DEFINED, ast_pb2.QueryOp.IS_NOT_DEFINED):
+    left_joins = [(join_str, [])]
+  else:
+    field_type, field_values = _GetFieldTypeAndValues(cond)
+    cond_str, cond_args = _Compare(
+        alias, ast_pb2.QueryOp.EQ, field_type, 'user_id', field_values)
+    left_joins = [(join_str + ' AND ' + cond_str, cond_args)]
+
+  where = [_CompareAlreadyJoined(alias, cond.op, 'user_id')]
+  return left_joins, where, []
+
+
+def _ProcessCommentByCond(cond, alias, user_alias, snapshot_mode):
+  """Convert a commentby:substring cond to SQL."""
+  if snapshot_mode:
+    return [], [], [cond]
+
+  email_cond_str, email_cond_args = _Compare(
+      user_alias, ast_pb2.QueryOp.TEXT_HAS, tracker_pb2.FieldTypes.STR_TYPE,
+      'email', cond.str_values)
+  # Note: email_cond_str will have parens, if needed.
+  left_joins = [(
+      '(Comment AS {alias} JOIN User AS {user_alias} '
+      'ON {alias}.commenter_id = {user_alias}.user_id AND {email_cond}) '
+      'ON Issue.id = {alias}.issue_id AND '
+      '{alias}.deleted_by IS NULL'.format(
+          alias=alias, user_alias=user_alias, email_cond=email_cond_str),
+      email_cond_args)]
+  where = [_CompareAlreadyJoined(user_alias, cond.op, 'email')]
+
+  return left_joins, where, []
+
+
+def _ProcessCommentByIDCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert a commentby_id=user_id cond to SQL."""
+  if snapshot_mode:
+    return [], [], [cond]
+
+  field_type, field_values = _GetFieldTypeAndValues(cond)
+  commenter_cond_str, commenter_cond_args = _Compare(
+      alias, ast_pb2.QueryOp.EQ, field_type, 'commenter_id', field_values)
+  left_joins = [(
+      'Comment AS {alias} ON Issue.id = {alias}.issue_id AND '
+      '{commenter_cond} AND '
+      '{alias}.deleted_by IS NULL'.format(
+          alias=alias, commenter_cond=commenter_cond_str),
+      commenter_cond_args)]
+  where = [_CompareAlreadyJoined(alias, cond.op, 'commenter_id')]
+
+  return left_joins, where, []
+
+
+def _ProcessStatusIDCond(cond, _alias, _spare_alias, snapshot_mode):
+  """Convert a status_id=ID cond to SQL."""
+  field_type, field_values = _GetFieldTypeAndValues(cond)
+  if snapshot_mode:
+    explicit_str, explicit_args = _Compare(
+        'IssueSnapshot', cond.op, field_type, 'status_id', field_values)
+    where = [(explicit_str, explicit_args)]
+  else:
+    explicit_str, explicit_args = _Compare(
+        'Issue', cond.op, field_type, 'status_id', field_values)
+    derived_str, derived_args = _Compare(
+        'Issue', cond.op, field_type, 'derived_status_id', field_values)
+    if cond.op in (ast_pb2.QueryOp.IS_NOT_DEFINED, ast_pb2.QueryOp.NE):
+      where = [(explicit_str, explicit_args), (derived_str, derived_args)]
+    else:
+      where = [
+          ('(' + explicit_str + ' OR ' + derived_str + ')',
+           explicit_args + derived_args)]
+
+  return [], where, []
+
+
+def _ProcessSummaryCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert a summary="exact string" cond to SQL."""
+  left_joins = []
+  where = []
+  field_type, field_values = _GetFieldTypeAndValues(cond)
+  if snapshot_mode:
+    return [], [], [cond]
+  elif cond.op in (ast_pb2.QueryOp.EQ, ast_pb2.QueryOp.NE,
+                   ast_pb2.QueryOp.GT, ast_pb2.QueryOp.LT,
+                   ast_pb2.QueryOp.GE, ast_pb2.QueryOp.LE,
+                   ast_pb2.QueryOp.IS_DEFINED, ast_pb2.QueryOp.IS_NOT_DEFINED):
+    summary_cond_str, summary_cond_args = _Compare(
+        alias, cond.op, field_type, 'summary', field_values)
+    left_joins = [(
+        'IssueSummary AS {alias} ON Issue.id = {alias}.issue_id AND '
+        '{summary_cond}'.format(
+          alias=alias, summary_cond=summary_cond_str),
+        summary_cond_args)]
+    where = [_CompareAlreadyJoined(alias, ast_pb2.QueryOp.EQ, 'issue_id')]
+
+  return left_joins, where, []
+
+
+def _ProcessLabelIDCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert a label_id=ID cond to SQL."""
+  if snapshot_mode:
+    join_str = (
+        'IssueSnapshot2Label AS {alias} '
+        'ON IssueSnapshot.id = {alias}.issuesnapshot_id'.format(alias=alias))
+  else:
+    join_str = (
+        'Issue2Label AS {alias} ON Issue.id = {alias}.issue_id AND '
+        'Issue.shard = {alias}.issue_shard'.format(alias=alias))
+
+  field_type, field_values = _GetFieldTypeAndValues(cond)
+  if not field_values and cond.op == ast_pb2.QueryOp.NE:
+    return [], [], []
+  cond_str, cond_args = _Compare(
+      alias, ast_pb2.QueryOp.EQ, field_type, 'label_id', field_values)
+  left_joins = [(join_str + ' AND ' + cond_str, cond_args)]
+  where = [_CompareAlreadyJoined(alias, cond.op, 'label_id')]
+  return left_joins, where, []
+
+
+def _ProcessComponentIDCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert a component_id=ID cond to SQL."""
+  # This is a built-in field, so it shadows any other fields w/ the same name.
+  if snapshot_mode:
+    join_str = (
+        'IssueSnapshot2Component AS {alias} '
+        'ON IssueSnapshot.id = {alias}.issuesnapshot_id'.format(alias=alias))
+  else:
+    join_str = (
+        'Issue2Component AS {alias} ON Issue.id = {alias}.issue_id AND '
+        'Issue.shard = {alias}.issue_shard'.format(alias=alias))
+  if cond.op in (ast_pb2.QueryOp.IS_DEFINED, ast_pb2.QueryOp.IS_NOT_DEFINED):
+    left_joins = [(join_str, [])]
+  else:
+    field_type, field_values = _GetFieldTypeAndValues(cond)
+    cond_str, cond_args = _Compare(
+        alias, ast_pb2.QueryOp.EQ, field_type, 'component_id', field_values)
+    left_joins = [(join_str + ' AND ' + cond_str, cond_args)]
+
+  where = [_CompareAlreadyJoined(alias, cond.op, 'component_id')]
+  return left_joins, where, []
+
+
+# TODO(jojang): monorail:3819, check for cond.phase_name and process
+# appropriately so users can search 'Canary.UXReview-status:Approved'
+def _ProcessApprovalFieldCond(cond, alias, user_alias, snapshot_mode):
+  """Convert a custom approval field cond to SQL."""
+  if snapshot_mode:
+    return [], [], [cond]
+
+  approval_fd = cond.field_defs[0]
+  left_joins = []
+
+  join_str_tmpl = (
+    '{tbl_name} AS {alias} ON Issue.id = {alias}.issue_id AND '
+    '{alias}.approval_id = %s')
+
+  join_args = [approval_fd.field_id]
+
+  val_type, values = _GetFieldTypeAndValues(cond)
+  if val_type is tracker_pb2.FieldTypes.STR_TYPE:
+    values = [val.lower() for val in values]
+  # TODO(jojwang):monorail:3809, check if there is a cond.key_suffx.
+  # status, approver should always have a value, so 'has:UXReview-approver'
+  # should return the same issues as 'has:UXReview'.
+  # There will not always be values approval.setter_id and approval.set_on
+  # and the current code would not process 'has:UXReview-by' correctly.
+  if cond.op in (
+      ast_pb2.QueryOp.IS_DEFINED, ast_pb2.QueryOp.IS_NOT_DEFINED):
+    join_str = join_str_tmpl.format(
+        tbl_name='Issue2ApprovalValue', alias=alias)
+    left_joins = [(join_str, join_args)]
+  else:
+    op = cond.op
+    if op == ast_pb2.QueryOp.NE:
+      op = ast_pb2.QueryOp.EQ  # Negation is done in WHERE clause.
+    elif op == ast_pb2.QueryOp.NOT_TEXT_HAS:
+      op = ast_pb2.QueryOp.TEXT_HAS
+
+    if (not cond.key_suffix) or cond.key_suffix == query2ast.STATUS_SUFFIX:
+      tbl_str = 'Issue2ApprovalValue'
+      cond_str, cond_args = _Compare(
+          alias, op, val_type, 'status', values)
+    elif cond.key_suffix == query2ast.SET_ON_SUFFIX:
+      tbl_str = 'Issue2ApprovalValue'
+      cond_str, cond_args = _Compare(
+          alias, op, val_type, 'set_on', values)
+    elif cond.key_suffix in [
+        query2ast.APPROVER_SUFFIX, query2ast.SET_BY_SUFFIX]:
+      if cond.key_suffix == query2ast.SET_BY_SUFFIX:
+        tbl_str = 'Issue2ApprovalValue'
+        col_name = 'setter_id'
+      else:
+        tbl_str = 'IssueApproval2Approver'
+        col_name = 'approver_id'
+
+      if val_type == tracker_pb2.FieldTypes.INT_TYPE:
+        cond_str, cond_args = _Compare(
+            alias, op, val_type, col_name, values)
+      else:
+        email_cond_str, email_cond_args = _Compare(
+            user_alias, op, val_type, 'email', values)
+        left_joins.append((
+          'User AS {user_alias} ON {email_cond}'.format(
+              user_alias=user_alias, email_cond=email_cond_str),
+          email_cond_args))
+
+        cond_str = '{alias}.{col_name} = {user_alias}.user_id'.format(
+            alias=alias, col_name=col_name, user_alias=user_alias)
+        cond_args = []
+    if cond_str or cond_args:
+      join_str = join_str_tmpl.format(tbl_name=tbl_str, alias=alias)
+      join_str += ' AND ' + cond_str
+      join_args.extend(cond_args)
+    left_joins.append((join_str, join_args))
+
+  where = [_CompareAlreadyJoined(alias, cond.op, 'approval_id')]
+  return left_joins, where, []
+
+
+def _ProcessCustomFieldCond(
+    cond, alias, user_alias, phase_alias, snapshot_mode):
+  """Convert a custom field cond to SQL."""
+  if snapshot_mode:
+    return [], [], [cond]
+
+  # TODO(jrobbins): handle ambiguous field names that map to multiple
+  # field definitions, especially for cross-project search.
+  field_def = cond.field_defs[0]
+  field_type = field_def.field_type
+  left_joins = []
+
+  join_str = (
+      'Issue2FieldValue AS {alias} ON Issue.id = {alias}.issue_id AND '
+      'Issue.shard = {alias}.issue_shard AND '
+      '{alias}.field_id = %s'.format(alias=alias))
+  join_args = [field_def.field_id]
+
+  if cond.op not in (
+      ast_pb2.QueryOp.IS_DEFINED, ast_pb2.QueryOp.IS_NOT_DEFINED):
+    op = cond.op
+    if op == ast_pb2.QueryOp.NE:
+      op = ast_pb2.QueryOp.EQ  # Negation is done in WHERE clause.
+    if field_type == tracker_pb2.FieldTypes.INT_TYPE:
+      cond_str, cond_args = _Compare(
+          alias, op, field_type, 'int_value', cond.int_values)
+    elif field_type == tracker_pb2.FieldTypes.STR_TYPE:
+      cond_str, cond_args = _Compare(
+          alias, op, field_type, 'str_value', cond.str_values)
+    elif field_type == tracker_pb2.FieldTypes.USER_TYPE:
+      if cond.int_values:
+        cond_str, cond_args = _Compare(
+            alias, op, field_type, 'user_id', cond.int_values)
+      else:
+        email_cond_str, email_cond_args = _Compare(
+            user_alias, op, field_type, 'email', cond.str_values)
+        left_joins.append((
+            'User AS {user_alias} ON {email_cond}'.format(
+                user_alias=user_alias, email_cond=email_cond_str),
+            email_cond_args))
+        cond_str = '{alias}.user_id = {user_alias}.user_id'.format(
+            alias=alias, user_alias=user_alias)
+        cond_args = []
+    elif field_type == tracker_pb2.FieldTypes.URL_TYPE:
+      cond_str, cond_args = _Compare(
+          alias, op, field_type, 'url_value', cond.str_values)
+    if field_type == tracker_pb2.FieldTypes.DATE_TYPE:
+      cond_str, cond_args = _Compare(
+          alias, op, field_type, 'date_value', cond.int_values)
+    if cond_str or cond_args:
+      join_str += ' AND ' + cond_str
+      join_args.extend(cond_args)
+
+  if cond.phase_name:
+    phase_cond_str, phase_cond_args = _Compare(
+        phase_alias, ast_pb2.QueryOp.EQ, tracker_pb2.FieldTypes.STR_TYPE,
+        'name', [cond.phase_name])
+    left_joins.append((
+        'IssuePhaseDef AS {phase_alias} ON {phase_cond}'.format(
+            phase_alias=phase_alias, phase_cond=phase_cond_str),
+        phase_cond_args))
+    cond_str = '{alias}.phase_id = {phase_alias}.id'.format(
+        alias=alias, phase_alias=phase_alias)
+    cond_args = []
+    join_str += ' AND ' + cond_str
+    join_args.extend(cond_args)
+
+  left_joins.append((join_str, join_args))
+  where = [_CompareAlreadyJoined(alias, cond.op, 'field_id')]
+  return left_joins, where, []
+
+
+def _ProcessAttachmentCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert has:attachment and -has:attachment cond to SQL."""
+  if snapshot_mode:
+    return [], [], [cond]
+
+  if cond.op in (ast_pb2.QueryOp.IS_DEFINED, ast_pb2.QueryOp.IS_NOT_DEFINED):
+    left_joins = []
+    where = [_Compare('Issue', cond.op, tracker_pb2.FieldTypes.INT_TYPE,
+                      'attachment_count', cond.int_values)]
+  else:
+    field_def = cond.field_defs[0]
+    field_type = field_def.field_type
+    left_joins = [
+      ('Attachment AS {alias} ON Issue.id = {alias}.issue_id AND '
+       '{alias}.deleted = %s'.format(alias=alias),
+       [False])]
+    where = [_Compare(alias, cond.op, field_type, 'filename', cond.str_values)]
+
+  return left_joins, where, []
+
+
+def _ProcessHotlistIDCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert hotlist_id=IDS cond to SQL."""
+  if snapshot_mode:
+    join_str = (
+      'IssueSnapshot2Hotlist AS {alias} '
+      'ON IssueSnapshot.id = {alias}.issuesnapshot_id'.format(alias=alias))
+  else:
+    join_str = (
+      'Hotlist2Issue AS {alias} ON Issue.id = {alias}.issue_id'.format(
+          alias=alias))
+
+  field_type, field_values = _GetFieldTypeAndValues(cond)
+  if not field_values and cond.op == ast_pb2.QueryOp.NE:
+    return [], [], []
+  cond_str, cond_args = _Compare(
+      alias, ast_pb2.QueryOp.EQ, field_type, 'hotlist_id', field_values)
+  left_joins = [(join_str + ' AND ' + cond_str, cond_args)]
+  where = [_CompareAlreadyJoined(alias, cond.op, 'hotlist_id')]
+
+  return left_joins, where, []
+
+
+def _ProcessHotlistCond(cond, alias, _spare_alias, snapshot_mode):
+  """Convert hotlist=user:hotlist-name to SQL"""
+  # hotlist conditions that reach this function definitely have invalid
+  # user_name/id/email. This validity was determined in
+  # ast2ast._PreprocessHotlistCond. Any possible user identification is ignored.
+  hotlist_substrings = []
+  for val in cond.str_values:
+    substring = val.split(':')[-1]
+    if substring:
+      hotlist_substrings.append(substring)
+  hotlist_cond_str, hotlist_cond_args = _Compare(
+      alias, ast_pb2.QueryOp.TEXT_HAS, tracker_pb2.FieldTypes.STR_TYPE,
+      'name', hotlist_substrings)
+  if snapshot_mode:
+    left_joins = [(
+        '(IssueSnapshot2Hotlist JOIN Hotlist AS {alias} '
+        'ON IssueSnapshot2Hotlist.hotlist_id = {alias}.id AND {hotlist_cond}) '
+        'ON IssueSnapshot.id = IssueSnapshot2Hotlist.issuesnapshot_id'.format(
+            alias=alias, hotlist_cond=hotlist_cond_str), hotlist_cond_args)]
+  else:
+    left_joins = [(
+        '(Hotlist2Issue JOIN Hotlist AS {alias} '
+        'ON Hotlist2Issue.hotlist_id = {alias}.id AND {hotlist_cond}) '
+        'ON Issue.id = Hotlist2Issue.issue_id'.format(
+            alias=alias, hotlist_cond=hotlist_cond_str), hotlist_cond_args)]
+  where = [_CompareAlreadyJoined(alias, cond.op, 'name')]
+
+  return left_joins, where, []
+
+
+def _ProcessPhaseCond(cond, alias, phase_alias, _snapshot_mode):
+  """Convert gate:<phase_name> to SQL."""
+
+  op = cond.op
+  if cond.op == ast_pb2.QueryOp.NE:
+    op = ast_pb2.QueryOp.EQ
+  elif cond.op == ast_pb2.QueryOp.NOT_TEXT_HAS:
+    op = ast_pb2.QueryOp.TEXT_HAS
+
+  cond_str, cond_args = _Compare(
+      phase_alias, op, tracker_pb2.FieldTypes.STR_TYPE,
+      'name', cond.str_values)
+  left_joins = [(
+      '(Issue2ApprovalValue AS {alias} JOIN IssuePhaseDef AS {phase_alias} '
+      'ON {alias}.phase_id = {phase_alias}.id AND {name_cond}) '
+      'ON Issue.id = {alias}.issue_id'.format(
+          alias=alias, phase_alias=phase_alias, name_cond=cond_str),
+      cond_args)]
+  where = [_CompareAlreadyJoined(phase_alias, cond.op, 'name')]
+
+  return left_joins, where, []
+
+
+_PROCESSORS = {
+    'owner': _ProcessOwnerCond,
+    'owner_id': _ProcessOwnerIDCond,
+    'ownerlastvisit': _ProcessOwnerLastVisitCond,
+    'ownerbouncing': _ProcessIsOwnerBouncing,
+    'reporter': _ProcessReporterCond,
+    'reporter_id': _ProcessReporterIDCond,
+    'cc': _ProcessCcCond,
+    'cc_id': _ProcessCcIDCond,
+    'starredby': _ProcessStarredByCond,
+    'starredby_id': _ProcessStarredByIDCond,
+    'commentby': _ProcessCommentByCond,
+    'commentby_id': _ProcessCommentByIDCond,
+    'status_id': _ProcessStatusIDCond,
+    'summary': _ProcessSummaryCond,
+    'label_id': _ProcessLabelIDCond,
+    'component_id': _ProcessComponentIDCond,
+    'blockedon_id': _ProcessBlockedOnIDCond,
+    'blocking_id': _ProcessBlockingIDCond,
+    'mergedinto_id': _ProcessMergedIntoIDCond,
+    'attachment': _ProcessAttachmentCond,
+    'hotlist_id': _ProcessHotlistIDCond,
+    'hotlist': _ProcessHotlistCond,
+    }
+
+
+def _ProcessCond(cond_num, cond, snapshot_mode):
+  """Translate one term of the user's search into an SQL query.
+
+  Args:
+    cond_num: integer cond number used to make distinct local variable names.
+    cond: user query cond parsed by query2ast.py.
+
+  Returns:
+    A pair of lists (left_joins, where) to use when building the SQL SELECT
+    statement.  Each of them is a list of (str, [val, ...]) pairs.
+  """
+  alias = 'Cond%d' % cond_num
+  spare_alias = 'Spare%d' % cond_num
+  # Note: a condition like [x=y] has field_name "x", there may be multiple
+  # field definitions that match "x", but they will all have field_name "x".
+  field_def = cond.field_defs[0]
+  assert all(field_def.field_name == fd.field_name for fd in cond.field_defs)
+
+  if field_def.field_name in NATIVE_SEARCHABLE_FIELDS:
+    # TODO(jeffcarp): Support local_id search here.
+    if snapshot_mode:
+      return [], [], [cond]
+    else:
+      col = NATIVE_SEARCHABLE_FIELDS[field_def.field_name]
+      where = [_Compare(
+          'Issue', cond.op, field_def.field_type, col,
+          cond.str_values or cond.int_values)]
+      return [], where, []
+
+  elif field_def.field_name in _PROCESSORS:
+    proc = _PROCESSORS[field_def.field_name]
+    return proc(cond, alias, spare_alias, snapshot_mode)
+
+  #  Any phase conditions use the sql.SHORTHAND['phase_cond'], which expects a
+  # 'Phase' alias. 'phase_cond' cannot expect a 'Spare' alias because
+  # _ProcessCustomFieldCond also creates a phase_cond string where it uses the
+  # 'Phase' alias because it needs the 'Spare' alias for other conditions.
+  elif field_def.field_name == 'gate':
+    phase_alias = 'Phase%d' % cond_num
+    return _ProcessPhaseCond(cond, alias, phase_alias, snapshot_mode)
+
+  elif field_def.field_id:  # it is a search on a custom field
+    phase_alias = 'Phase%d' % cond_num
+    if field_def.field_type == tracker_pb2.FieldTypes.APPROVAL_TYPE:
+      return _ProcessApprovalFieldCond(cond, alias, spare_alias, snapshot_mode)
+    return _ProcessCustomFieldCond(
+        cond, alias, spare_alias, phase_alias, snapshot_mode)
+
+  elif (cond.op in (ast_pb2.QueryOp.TEXT_HAS, ast_pb2.QueryOp.NOT_TEXT_HAS) and
+        (field_def.field_name in tracker_fulltext.ISSUE_FULLTEXT_FIELDS or
+         field_def.field_name == 'any_field')):
+    if snapshot_mode:
+      return [], [], [cond]
+    # This case handled by full-text search.
+
+  else:
+    logging.error('untranslated search cond %r', cond)
+
+  return [], [], []
+
+
+def _Compare(alias, op, val_type, col, vals):
+  """Return an SQL comparison for the given values. For use in WHERE or ON.
+
+  Args:
+    alias: String name of the table or alias defined in a JOIN clause.
+    op: One of the operators defined in ast_pb2.py.
+    val_type: One of the value types defined in ast_pb2.py.
+    col: string column name to compare to vals.
+    vals: list of values that the user is searching for.
+
+  Returns:
+    (cond_str, cond_args) where cond_str is a SQL condition that may contain
+    some %s placeholders, and cond_args is the list of values that fill those
+    placeholders.  If the condition string contains any AND or OR operators,
+    the whole expression is put inside parens.
+
+  Raises:
+    NoPossibleResults: The user's query is impossible to ever satisfy, e.g.,
+        it requires matching an empty set of labels.
+  """
+  vals_ph = sql.PlaceHolders(vals)
+  if col in ['label', 'status', 'email', 'name']:
+    alias_col = 'LOWER(%s.%s)' % (alias, col)
+  else:
+    alias_col = '%s.%s' % (alias, col)
+
+  def Fmt(cond_str):
+    return cond_str.format(alias_col=alias_col, vals_ph=vals_ph)
+
+  no_value = (0 if val_type in [tracker_pb2.FieldTypes.DATE_TYPE,
+                                tracker_pb2.FieldTypes.INT_TYPE] else '')
+  if op == ast_pb2.QueryOp.IS_DEFINED:
+    return Fmt('({alias_col} IS NOT NULL AND {alias_col} != %s)'), [no_value]
+  if op == ast_pb2.QueryOp.IS_NOT_DEFINED:
+    return Fmt('({alias_col} IS NULL OR {alias_col} = %s)'), [no_value]
+
+  if val_type in [tracker_pb2.FieldTypes.DATE_TYPE,
+                  tracker_pb2.FieldTypes.INT_TYPE]:
+    if op == ast_pb2.QueryOp.TEXT_HAS:
+      op = ast_pb2.QueryOp.EQ
+    if op == ast_pb2.QueryOp.NOT_TEXT_HAS:
+      op = ast_pb2.QueryOp.NE
+
+  if op == ast_pb2.QueryOp.EQ:
+    if not vals:
+      raise NoPossibleResults('Column %s has no possible value' % alias_col)
+    elif len(vals) == 1:
+      cond_str = Fmt('{alias_col} = %s')
+    else:
+      cond_str = Fmt('{alias_col} IN ({vals_ph})')
+    return cond_str, vals
+
+  if op == ast_pb2.QueryOp.NE:
+    if not vals:
+      return 'TRUE', []  # a no-op that matches every row.
+    elif len(vals) == 1:
+      comp = Fmt('{alias_col} != %s')
+    else:
+      comp = Fmt('{alias_col} NOT IN ({vals_ph})')
+    return '(%s IS NULL OR %s)' % (alias_col, comp), vals
+
+  wild_vals = ['%%%s%%' % val for val in vals]
+  if op == ast_pb2.QueryOp.TEXT_HAS:
+    cond_str = ' OR '.join(Fmt('{alias_col} LIKE %s') for v in vals)
+    return ('(%s)' % cond_str), wild_vals
+  if op == ast_pb2.QueryOp.NOT_TEXT_HAS:
+    cond_str = (Fmt('{alias_col} IS NULL OR ') +
+                ' AND '.join(Fmt('{alias_col} NOT LIKE %s') for v in vals))
+    return ('(%s)' % cond_str), wild_vals
+
+
+  # Note: These operators do not support quick-OR
+  val = vals[0]
+
+  if op == ast_pb2.QueryOp.GT:
+    return Fmt('{alias_col} > %s'), [val]
+  if op == ast_pb2.QueryOp.LT:
+    return Fmt('{alias_col} < %s'), [val]
+  if op == ast_pb2.QueryOp.GE:
+    return Fmt('{alias_col} >= %s'), [val]
+  if op == ast_pb2.QueryOp.LE:
+    return Fmt('{alias_col} <= %s'), [val]
+
+  logging.error('unknown op: %r', op)
+
+
+def _CompareAlreadyJoined(alias, op, col):
+  """Return a WHERE clause comparison that checks that a join succeeded."""
+  def Fmt(cond_str):
+    return cond_str.format(alias_col='%s.%s' % (alias, col))
+
+  if op in (ast_pb2.QueryOp.NE, ast_pb2.QueryOp.NOT_TEXT_HAS,
+            ast_pb2.QueryOp.IS_NOT_DEFINED):
+    return Fmt('{alias_col} IS NULL'), []
+  else:
+    return Fmt('{alias_col} IS NOT NULL'), []
+
+
+class Error(Exception):
+  """Base class for errors from this module."""
+
+
+class NoPossibleResults(Error):
+  """The query could never match any rows from the database, so don't try.."""
diff --git a/search/ast2sort.py b/search/ast2sort.py
new file mode 100644
index 0000000..08ed346
--- /dev/null
+++ b/search/ast2sort.py
@@ -0,0 +1,451 @@
+# 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
+
+"""Convert a user's issue sorting directives into SQL clauses.
+
+Some sort directives translate into simple ORDER BY column specifications.
+Other sort directives require that a LEFT JOIN be done to bring in
+relevant information that is then used in the ORDER BY.
+
+Sorting based on strings can slow down the DB because long sort-keys
+must be loaded into RAM, which means that fewer sort-keys fit into the
+DB's sorting buffers at a time.  Also, Monorail defines the sorting
+order of well-known labels and statuses based on the order in which
+they are defined in the project's config.  So, we determine the sort order of
+labels and status values before executing the query and then use the MySQL
+FIELD() function to sort their IDs in the desired order, without sorting
+strings.
+
+For more info, see the "Sorting in Monorail" and "What makes Monorail Fast?"
+design docs.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from framework import sql
+from proto import tracker_pb2
+from tracker import tracker_constants
+
+
+NATIVE_SORTABLE_FIELDS = [
+    'id', 'stars', 'attachments', 'opened', 'closed', 'modified',
+    'ownermodified', 'statusmodified', 'componentmodified',
+    ]
+
+FIELDS_TO_COLUMNS = {
+    'id': 'local_id',
+    'stars': 'star_count',
+    'attachments': 'attachment_count',
+    'ownermodified': 'owner_modified',
+    'statusmodified': 'status_modified',
+    'componentmodified': 'component_modified',
+    }
+
+APPROVAL_STATUS_SORT_ORDER = [
+    '\'not_set\'', '\'needs_review\'', '\'na\'', '\'review_requested\'',
+    '\'review_started\'', '\'need_info\'', '\'approved\'', '\'not_approved\'']
+
+
+def BuildSortClauses(
+    sort_directives, harmonized_labels, harmonized_statuses,
+    harmonized_fields):
+  """Return LEFT JOIN and ORDER BY clauses needed to sort the results."""
+  if not sort_directives:
+    return [], []
+
+  all_left_joins = []
+  all_order_by = []
+  for i, sd in enumerate(sort_directives):
+    left_join_parts, order_by_parts = _OneSortDirective(
+        i, sd, harmonized_labels, harmonized_statuses, harmonized_fields)
+    all_left_joins.extend(left_join_parts)
+    all_order_by.extend(order_by_parts)
+
+  return all_left_joins, all_order_by
+
+
+def _ProcessProjectSD(fmt):
+  """Convert a 'project' sort directive into SQL."""
+  left_joins = []
+  order_by = [(fmt('Issue.project_id {sort_dir}'), [])]
+  return left_joins, order_by
+
+
+def _ProcessReporterSD(fmt):
+  """Convert a 'reporter' sort directive into SQL."""
+  left_joins = [
+      (fmt('User AS {alias} ON Issue.reporter_id = {alias}.user_id'), [])]
+  order_by = [
+      (fmt('ISNULL({alias}.email) {sort_dir}'), []),
+      (fmt('{alias}.email {sort_dir}'), [])]
+  return left_joins, order_by
+
+
+def _ProcessOwnerSD(fmt):
+  """Convert a 'owner' sort directive into SQL."""
+  left_joins = [
+      (fmt('User AS {alias}_exp ON Issue.owner_id = {alias}_exp.user_id'), []),
+      (fmt('User AS {alias}_der ON '
+           'Issue.derived_owner_id = {alias}_der.user_id'), [])]
+  order_by = [
+      (fmt('(ISNULL({alias}_exp.email) AND ISNULL({alias}_der.email)) '
+           '{sort_dir}'), []),
+      (fmt('CONCAT({alias}_exp.email, {alias}_der.email) {sort_dir}'), [])]
+  return left_joins, order_by
+
+
+def _ProcessCcSD(fmt):
+  """Convert a 'cc' sort directive into SQL."""
+  # Note: derived cc's are included automatically.
+  # Note: This sorts on the best Cc, not all Cc addresses.
+  # Being more exact might require GROUP BY and GROUP_CONCAT().
+  left_joins = [
+      (fmt('Issue2Cc AS {alias} ON Issue.id = {alias}.issue_id '
+           'LEFT JOIN User AS {alias}_user '
+           'ON {alias}.cc_id = {alias}_user.user_id'), [])]
+  order_by = [
+      (fmt('ISNULL({alias}_user.email) {sort_dir}'), []),
+      (fmt('{alias}_user.email {sort_dir}'), [])]
+  return left_joins, order_by
+
+
+def _ProcessComponentSD(fmt):
+  """Convert a 'component' sort directive into SQL."""
+  # Note: derived components are included automatically.
+  # Note: This sorts on the best component, not all of them.
+  # Being more exact might require GROUP BY and GROUP_CONCAT().
+  left_joins = [
+      (fmt('Issue2Component AS {alias} ON Issue.id = {alias}.issue_id '
+           'LEFT JOIN ComponentDef AS {alias}_component '
+           'ON {alias}.component_id = {alias}_component.id'), [])]
+  order_by = [
+      (fmt('ISNULL({alias}_component.path) {sort_dir}'), []),
+      (fmt('{alias}_component.path {sort_dir}'), [])]
+  return left_joins, order_by
+
+
+def _ProcessSummarySD(fmt):
+  """Convert a 'summary' sort directive into SQL."""
+  left_joins = [
+      (fmt('IssueSummary AS {alias} ON Issue.id = {alias}.issue_id'), [])]
+  order_by = [(fmt('{alias}.summary {sort_dir}'), [])]
+  return left_joins, order_by
+
+
+def _ProcessStatusSD(fmt, harmonized_statuses):
+  """Convert a 'status' sort directive into SQL."""
+  left_joins = []
+  # Note: status_def_rows are already ordered by REVERSED rank.
+  wk_status_ids = [
+      stat_id for stat_id, rank, _ in harmonized_statuses
+      if rank is not None]
+  odd_status_ids = [
+      stat_id for stat_id, rank, _ in harmonized_statuses
+      if rank is None]
+  wk_status_ph = sql.PlaceHolders(wk_status_ids)
+  # Even though oddball statuses sort lexographically, use FIELD to determine
+  # the order so that the database sorts ints rather than strings for speed.
+  odd_status_ph = sql.PlaceHolders(odd_status_ids)
+
+  order_by = []  # appended to below: both well-known and oddball can apply
+  sort_col = ('IF(ISNULL(Issue.status_id), Issue.derived_status_id, '
+              'Issue.status_id)')
+  # Reverse sort by using rev_sort_dir because we want NULLs at the end.
+  if wk_status_ids:
+    order_by.append(
+        (fmt('FIELD({sort_col}, {wk_status_ph}) {rev_sort_dir}',
+             sort_col=sort_col, wk_status_ph=wk_status_ph),
+         wk_status_ids))
+  if odd_status_ids:
+    order_by.append(
+        (fmt('FIELD({sort_col}, {odd_status_ph}) {rev_sort_dir}',
+             sort_col=sort_col, odd_status_ph=odd_status_ph),
+         odd_status_ids))
+
+  return left_joins, order_by
+
+
+def _ProcessBlockedSD(fmt):
+  """Convert a 'blocked' sort directive into SQL."""
+  left_joins = [
+      (fmt('IssueRelation AS {alias} ON Issue.id = {alias}.issue_id '
+           'AND {alias}.kind = %s'),
+       ['blockedon'])]
+  order_by = [(fmt('ISNULL({alias}.dst_issue_id) {sort_dir}'), [])]
+  return left_joins, order_by
+
+
+def _ProcessBlockedOnSD(fmt):
+  """Convert a 'blockedon' sort directive into SQL."""
+  left_joins = [
+      (fmt('IssueRelation AS {alias} ON Issue.id = {alias}.issue_id '
+           'AND {alias}.kind = %s'),
+       ['blockedon'])]
+  order_by = [(fmt('ISNULL({alias}.dst_issue_id) {sort_dir}'), []),
+              (fmt('{alias}.dst_issue_id {sort_dir}'), [])]
+  return left_joins, order_by
+
+
+def _ProcessBlockingSD(fmt):
+  """Convert a 'blocking' sort directive into SQL."""
+  left_joins = [
+      (fmt('IssueRelation AS {alias} ON Issue.id = {alias}.dst_issue_id '
+           'AND {alias}.kind = %s'),
+       ['blockedon'])]
+  order_by = [(fmt('ISNULL({alias}.issue_id) {sort_dir}'), []),
+              (fmt('{alias}.issue_id {sort_dir}'), [])]
+  return left_joins, order_by
+
+
+def _ProcessMergedIntoSD(fmt):
+  """Convert a 'mergedinto' sort directive into SQL."""
+  left_joins = [
+      (fmt('IssueRelation AS {alias} ON Issue.id = {alias}.issue_id '
+           'AND {alias}.kind = %s'),
+       ['mergedinto'])]
+  order_by = [(fmt('ISNULL({alias}.dst_issue_id) {sort_dir}'), []),
+              (fmt('{alias}.dst_issue_id {sort_dir}'), [])]
+  return left_joins, order_by
+
+
+def _ProcessOwnerLastVisitSD(fmt):
+  """Convert a 'ownerlastvisit' sort directive into SQL."""
+  left_joins = [
+      (fmt('User AS {alias} ON (Issue.owner_id = {alias}.user_id OR '
+           'Issue.derived_owner_id = {alias}.user_id)'), [])]
+  order_by = [
+      (fmt('ISNULL({alias}.last_visit_timestamp) {sort_dir}'), []),
+      (fmt('{alias}.last_visit_timestamp {sort_dir}'), [])]
+  return left_joins, order_by
+
+
+def _ProcessCustomAndLabelSD(
+    sd, harmonized_labels, harmonized_fields, alias, sort_dir, fmt):
+  """Convert a label or custom field sort directive into SQL."""
+  left_joins = []
+  order_by = []
+  phase_name = None
+  # If a custom field is an approval_type with no suffix, the
+  # approvals should be sorted by status.
+  approval_suffix = '-status'
+  approval_fd_list = []
+
+  # Check for reserved suffixes in col_name sd.
+  # TODO(jojwang): check for other suffixes in
+  # tracker_constants.RESERVED_COL_NAME_SUFFIXES
+  if sd.endswith(tracker_constants.APPROVER_COL_SUFFIX):
+    field_name = sd[:-len(tracker_constants.APPROVER_COL_SUFFIX)]
+    fd_list = []
+    approval_fd_list = [fd for fd in harmonized_fields
+                        if fd.field_name.lower() == field_name]
+    approval_suffix = tracker_constants.APPROVER_COL_SUFFIX
+  else:
+    field_name = sd
+    if '.' in sd:
+      phase_name, field_name = sd.split('.', 1)
+
+    fd_list = [fd for fd in harmonized_fields
+               if fd.field_name.lower() == field_name]
+    if not phase_name:
+      approval_fd_list = [fd for fd in fd_list if
+                          fd.field_type == tracker_pb2.FieldTypes.APPROVAL_TYPE]
+
+  # 'alias' is used for all the CustomField, Approval, and Label sort clauses.
+  # Custom field aliases are alwyas appended by the value_col name.
+  # Approval aliases are always appended with 'approval'.
+  # Label clauses use 'alias' as-is.
+  if fd_list:
+    int_left_joins, int_order_by = _CustomFieldSortClauses(
+        fd_list, tracker_pb2.FieldTypes.INT_TYPE, 'int_value',
+        alias, sort_dir, phase_name=phase_name)
+    str_left_joins, str_order_by = _CustomFieldSortClauses(
+        fd_list, tracker_pb2.FieldTypes.STR_TYPE, 'str_value',
+        alias, sort_dir, phase_name=phase_name)
+    user_left_joins, user_order_by = _CustomFieldSortClauses(
+        fd_list, tracker_pb2.FieldTypes.USER_TYPE, 'user_id',
+        alias, sort_dir, phase_name=phase_name)
+    left_joins.extend(int_left_joins + str_left_joins + user_left_joins)
+    order_by.extend(int_order_by + str_order_by + user_order_by)
+
+  if approval_fd_list:
+    approval_left_joins, approval_order_by = _ApprovalFieldSortClauses(
+        approval_fd_list, approval_suffix, fmt)
+    left_joins.extend(approval_left_joins)
+    order_by.extend(approval_order_by)
+
+  label_left_joinss, label_order_by = _LabelSortClauses(
+      sd, harmonized_labels, fmt)
+  left_joins.extend(label_left_joinss)
+  order_by.extend(label_order_by)
+
+  return left_joins, order_by
+
+
+def _ApprovalFieldSortClauses(
+    approval_fd_list, approval_suffix, fmt):
+  """Give LEFT JOIN and ORDER BY terms for approval sort directives."""
+  approver_left_joins = None
+  if approval_suffix == tracker_constants.APPROVER_COL_SUFFIX:
+    tbl_name = 'IssueApproval2Approver'
+    approver_left_joins = (
+        fmt('User AS {alias}_approval_user '
+            'ON {alias}_approval.approver_id = {alias}_approval_user.user_id'),
+        [])
+    order_by = [
+        (fmt('ISNULL({alias}_approval_user.email) {sort_dir}'), []),
+        (fmt('{alias}_approval_user.email {sort_dir}'), [])]
+  else:
+    tbl_name = 'Issue2ApprovalValue'
+    order_by = [
+        (fmt('FIELD({alias}_approval.status, {approval_status_ph}) '
+             '{rev_sort_dir}',
+             approval_status_ph=sql.PlaceHolders(APPROVAL_STATUS_SORT_ORDER)),
+         APPROVAL_STATUS_SORT_ORDER
+        )]
+
+  left_joins = [(
+      fmt('{tbl_name} AS {alias}_approval '
+          'ON Issue.id = {alias}_approval.issue_id '
+          'AND {alias}_approval.approval_id IN ({approval_ids_ph})',
+          approval_ids_ph=sql.PlaceHolders(approval_fd_list),
+          tbl_name=tbl_name),
+      [fd.field_id for fd in approval_fd_list]
+  )]
+
+  if approver_left_joins:
+    left_joins.append(approver_left_joins)
+
+  return left_joins, order_by
+
+
+def _LabelSortClauses(sd, harmonized_labels, fmt):
+  """Give LEFT JOIN and ORDER BY terms for label sort directives."""
+  # Note: derived labels should work automatically.
+
+  # label_def_rows are already ordered by REVERSED rank.
+  wk_label_ids = [
+      label_id for label_id, rank, label in harmonized_labels
+      if label.lower().startswith('%s-' % sd) and rank is not None]
+  odd_label_ids = [
+      label_id for label_id, rank, label in harmonized_labels
+      if label.lower().startswith('%s-' % sd) and rank is None]
+  all_label_ids = wk_label_ids + odd_label_ids
+
+  if all_label_ids:
+    left_joins = [
+        (fmt('Issue2Label AS {alias} ON Issue.id = {alias}.issue_id '
+             'AND {alias}.label_id IN ({all_label_ph})',
+             all_label_ph=sql.PlaceHolders(all_label_ids)),
+         all_label_ids)]
+  else:
+    left_joins = []
+
+  order_by = []
+  # Reverse sort by using rev_sort_dir because we want NULLs at the end.
+  if wk_label_ids:
+    order_by.append(
+        (fmt('FIELD({alias}.label_id, {wk_label_ph}) {rev_sort_dir}',
+             wk_label_ph=sql.PlaceHolders(wk_label_ids)),
+         wk_label_ids))
+  if odd_label_ids:
+    # Even though oddball labels sort lexographically, use FIELD to determine
+    # the order so that the database sorts ints rather than strings for speed
+    order_by.append(
+        (fmt('FIELD({alias}.label_id, {odd_label_ph}) {rev_sort_dir}',
+             odd_label_ph=sql.PlaceHolders(odd_label_ids)),
+         odd_label_ids))
+
+  return left_joins, order_by
+
+
+def _CustomFieldSortClauses(
+    fd_list, value_type, value_column, alias, sort_dir, phase_name=None):
+  """Give LEFT JOIN and ORDER BY terms for custom fields of the given type."""
+  relevant_fd_list = [fd for fd in fd_list if fd.field_type == value_type]
+  if not relevant_fd_list:
+    return [], []
+
+  field_ids_ph = sql.PlaceHolders(relevant_fd_list)
+  def Fmt(sql_str):
+    return sql_str.format(
+        value_column=value_column, sort_dir=sort_dir,
+        field_ids_ph=field_ids_ph, alias=alias + '_' + value_column,
+        phase_name=phase_name)
+
+  left_joins = [
+      (Fmt('Issue2FieldValue AS {alias} ON Issue.id = {alias}.issue_id '
+           'AND {alias}.field_id IN ({field_ids_ph})'),
+       [fd.field_id for fd in relevant_fd_list])]
+
+  if phase_name:
+    left_joins.append(
+        (Fmt('IssuePhaseDef AS {alias}_phase '
+             'ON {alias}.phase_id = {alias}_phase.id '
+             'AND LOWER({alias}_phase.name) = LOWER(%s)'),
+         [phase_name]))
+
+  if value_type == tracker_pb2.FieldTypes.USER_TYPE:
+    left_joins.append(
+        (Fmt('User AS {alias}_user ON {alias}.user_id = {alias}_user.user_id'),
+         []))
+    order_by = [
+        (Fmt('ISNULL({alias}_user.email) {sort_dir}'), []),
+        (Fmt('{alias}_user.email {sort_dir}'), [])]
+  else:
+    # Unfortunately, this sorts on the best field value, not all of them.
+    order_by = [
+        (Fmt('ISNULL({alias}.{value_column}) {sort_dir}'), []),
+        (Fmt('{alias}.{value_column} {sort_dir}'), [])]
+
+  return left_joins, order_by
+
+
+_PROCESSORS = {
+    'component': _ProcessComponentSD,
+    'project': _ProcessProjectSD,
+    'reporter': _ProcessReporterSD,
+    'owner': _ProcessOwnerSD,
+    'cc': _ProcessCcSD,
+    'summary': _ProcessSummarySD,
+    'blocked': _ProcessBlockedSD,
+    'blockedon': _ProcessBlockedOnSD,
+    'blocking': _ProcessBlockingSD,
+    'mergedinto': _ProcessMergedIntoSD,
+    'ownerlastvisit': _ProcessOwnerLastVisitSD,
+    }
+
+
+def _OneSortDirective(
+    i, sd, harmonized_labels, harmonized_statuses, harmonized_fields):
+  """Return SQL clauses to do the sorting for one sort directive."""
+  alias = 'Sort%d' % i
+  if sd.startswith('-'):
+    sort_dir, rev_sort_dir = 'DESC', 'ASC'
+    sd = sd[1:]
+  else:
+    sort_dir, rev_sort_dir = 'ASC', 'DESC'
+
+  def Fmt(sql_str, **kwargs):
+    return sql_str.format(
+        sort_dir=sort_dir, rev_sort_dir=rev_sort_dir, alias=alias,
+        sd=sd, col=FIELDS_TO_COLUMNS.get(sd, sd), **kwargs)
+
+  if sd in NATIVE_SORTABLE_FIELDS:
+    left_joins = []
+    order_by = [(Fmt('Issue.{col} {sort_dir}'), [])]
+    return left_joins, order_by
+
+  elif sd in _PROCESSORS:
+    proc = _PROCESSORS[sd]
+    return proc(Fmt)
+
+  elif sd == 'status':
+    return _ProcessStatusSD(Fmt, harmonized_statuses)
+  else:  # otherwise, it must be a field or label, or both
+    return _ProcessCustomAndLabelSD(
+        sd, harmonized_labels, harmonized_fields, alias, sort_dir, Fmt)
diff --git a/search/backendnonviewable.py b/search/backendnonviewable.py
new file mode 100644
index 0000000..d76eeef
--- /dev/null
+++ b/search/backendnonviewable.py
@@ -0,0 +1,137 @@
+# 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
+
+"""Servlet that searches for issues that the specified user cannot view.
+
+The GET request to a backend has query string parameters for the
+shard_id, a user_id, and list of project IDs.  It returns a
+JSON-formatted dict with issue_ids that that user is not allowed to
+view.  As a side-effect, this servlet updates multiple entries
+in memcache, including each "nonviewable:USER_ID;PROJECT_ID;SHARD_ID".
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from google.appengine.api import memcache
+
+import settings
+from framework import authdata
+from framework import framework_constants
+from framework import framework_helpers
+from framework import jsonfeed
+from framework import permissions
+from framework import sql
+from search import search_helpers
+
+
+
+# We cache the set of IIDs that a given user cannot view, and we invalidate
+# that set when the issues are changed via Monorail.  Also, we limit the live
+# those cache entries so that changes in a user's (direct or indirect) roles
+# in a project will take effect.
+NONVIEWABLE_MEMCACHE_EXPIRATION = 15 * framework_constants.SECS_PER_MINUTE
+
+
+class BackendNonviewable(jsonfeed.InternalTask):
+  """JSON servlet for getting issue IDs that the specified user cannot view."""
+
+  CHECK_SAME_APP = True
+
+  def HandleRequest(self, mr):
+    """Get all the user IDs that the specified user cannot view.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+
+    Returns:
+      Results dictionary {project_id: [issue_id]} in JSON format.
+    """
+    if mr.shard_id is None:
+      return {'message': 'Cannot proceed without a valid shard_id.'}
+    user_id = mr.specified_logged_in_user_id
+    auth = authdata.AuthData.FromUserID(mr.cnxn, user_id, self.services)
+    project_id = mr.specified_project_id
+    project = self.services.project.GetProject(mr.cnxn, project_id)
+
+    perms = permissions.GetPermissions(
+        auth.user_pb, auth.effective_ids, project)
+
+    nonviewable_iids = self.GetNonviewableIIDs(
+      mr.cnxn, auth.user_pb, auth.effective_ids, project, perms, mr.shard_id)
+
+    cached_ts = mr.invalidation_timestep
+    if mr.specified_project_id:
+      memcache.set(
+        'nonviewable:%d;%d;%d' % (project_id, user_id, mr.shard_id),
+        (nonviewable_iids, cached_ts),
+        time=NONVIEWABLE_MEMCACHE_EXPIRATION,
+        namespace=settings.memcache_namespace)
+    else:
+      memcache.set(
+        'nonviewable:all;%d;%d' % (user_id, mr.shard_id),
+        (nonviewable_iids, cached_ts),
+        time=NONVIEWABLE_MEMCACHE_EXPIRATION,
+        namespace=settings.memcache_namespace)
+
+    logging.info('set nonviewable:%s;%d;%d to %r', project_id, user_id,
+                 mr.shard_id, nonviewable_iids)
+
+    return {
+      'nonviewable': nonviewable_iids,
+
+      # These are not used in the frontend, but useful for debugging.
+      'project_id': project_id,
+      'user_id': user_id,
+      'shard_id': mr.shard_id,
+      }
+
+  def GetNonviewableIIDs(
+    self, cnxn, user, effective_ids, project, perms, shard_id):
+    """Return a list of IIDs that the user cannot view in the project shard."""
+    # Project owners and site admins can see all issues.
+    if not perms.consider_restrictions:
+      return []
+
+    # There are two main parts to the computation that we do in parallel:
+    # getting at-risk IIDs and getting OK-iids.
+    cnxn_2 = sql.MonorailConnection()
+    at_risk_iids_promise = framework_helpers.Promise(
+      self.GetAtRiskIIDs, cnxn_2, user, effective_ids, project, perms, shard_id)
+    ok_iids = self.GetViewableIIDs(
+      cnxn, effective_ids, project.project_id, shard_id)
+    at_risk_iids = at_risk_iids_promise.WaitAndGetValue()
+
+    # The set of non-viewable issues is the at-risk ones minus the ones where
+    # the user is the reporter, owner, CC'd, or granted "View" permission.
+    nonviewable_iids = set(at_risk_iids).difference(ok_iids)
+
+    return list(nonviewable_iids)
+
+  def GetAtRiskIIDs(
+    self, cnxn, user, effective_ids, project, perms, shard_id):
+    # type: (MonorailConnection, proto.user_pb2.User, Sequence[int], Project,
+    #     permission_objects_pb2.PermissionSet, int) -> Sequence[int]
+    """Return IIDs of restricted issues that user might not be able to view."""
+    at_risk_label_ids = search_helpers.GetPersonalAtRiskLabelIDs(
+      cnxn, user, self.services.config, effective_ids, project, perms)
+    at_risk_iids = self.services.issue.GetIIDsByLabelIDs(
+      cnxn, at_risk_label_ids, project.project_id, shard_id)
+
+    return at_risk_iids
+
+
+  def GetViewableIIDs(self, cnxn, effective_ids, project_id, shard_id):
+    """Return IIDs of issues that user can view because they participate."""
+    # Anon user is never reporter, owner, CC'd or granted perms.
+    if not effective_ids:
+      return []
+
+    ok_iids = self.services.issue.GetIIDsByParticipant(
+      cnxn, effective_ids, [project_id], shard_id)
+
+    return ok_iids
diff --git a/search/backendsearch.py b/search/backendsearch.py
new file mode 100644
index 0000000..53e87ec
--- /dev/null
+++ b/search/backendsearch.py
@@ -0,0 +1,76 @@
+# 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
+
+"""A servlet that implements the backend of issues search.
+
+The GET request to a backend search has the same query string
+parameters as the issue list servlet.  But, instead of rendering a
+HTML page, the backend search handler returns a JSON response with a
+list of matching, sorted issue IID numbers from this shard that are
+viewable by the requesting user.
+
+Each backend search request works within a single shard.  Each
+besearch backend job can access any single shard while processing a request.
+
+The current user ID must be passed in from the frontend for permission
+checking.  The user ID for the special "me" term can also be passed in
+(so that you can view another user's dashboard and "me" will refer to
+them).
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+from framework import jsonfeed
+from search import backendsearchpipeline
+from tracker import tracker_constants
+
+
+class BackendSearch(jsonfeed.InternalTask):
+  """JSON servlet for issue search in a GAE backend."""
+
+  CHECK_SAME_APP = True
+  _DEFAULT_RESULTS_PER_PAGE = tracker_constants.DEFAULT_RESULTS_PER_PAGE
+
+  def HandleRequest(self, mr):
+    """Search for issues and respond with the IIDs of matching issues.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+
+    Returns:
+      Results dictionary in JSON format.
+    """
+    # Users are never logged into backends, so the frontends tell us.
+    logging.info('query_project_names is %r', mr.query_project_names)
+    pipeline = backendsearchpipeline.BackendSearchPipeline(
+        mr, self.services, self._DEFAULT_RESULTS_PER_PAGE,
+        mr.query_project_names, mr.specified_logged_in_user_id,
+        mr.specified_me_user_ids)
+    pipeline.SearchForIIDs()
+
+    start = time.time()
+    # Backends work in parallel to precache issues that the
+    # frontend is very likely to need.
+    _prefetched_issues = self.services.issue.GetIssues(
+        mr.cnxn, pipeline.result_iids[:mr.start + mr.num],
+        shard_id=mr.shard_id)
+    logging.info('prefetched and memcached %d issues in %d ms',
+                 len(pipeline.result_iids[:mr.start + mr.num]),
+                 int(1000 * (time.time() - start)))
+
+    if pipeline.error:
+      error_message = pipeline.error.message
+    else:
+      error_message = None
+
+    return {
+        'unfiltered_iids': pipeline.result_iids,
+        'search_limit_reached': pipeline.search_limit_reached,
+        'error': error_message,
+    }
diff --git a/search/backendsearchpipeline.py b/search/backendsearchpipeline.py
new file mode 100644
index 0000000..69fdc6b
--- /dev/null
+++ b/search/backendsearchpipeline.py
@@ -0,0 +1,325 @@
+# 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
+
+"""Backend issue issue search and sorting.
+
+Each of several "besearch" backend jobs manages one shard of the overall set
+of issues in the system. The backend search pipeline retrieves the issues
+that match the user query, puts them into memcache, and returns them to
+the frontend search pipeline.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import re
+import time
+
+from google.appengine.api import memcache
+
+import settings
+from features import savedqueries_helpers
+from framework import authdata
+from framework import framework_constants
+from framework import framework_helpers
+from framework import sorting
+from framework import sql
+from proto import ast_pb2
+from proto import tracker_pb2
+from search import ast2ast
+from search import ast2select
+from search import ast2sort
+from search import query2ast
+from search import searchpipeline
+from services import tracker_fulltext
+from services import fulltext_helpers
+from tracker import tracker_bizobj
+
+
+# Used in constructing the at-risk query.
+AT_RISK_LABEL_RE = re.compile(r'^(restrict-view-.+)$', re.IGNORECASE)
+
+# Limit on the number of list items to show in debug log statements
+MAX_LOG = 200
+
+
+class BackendSearchPipeline(object):
+  """Manage the process of issue search, including Promises and caching.
+
+  Even though the code is divided into several methods, the public
+  methods should be called in sequence, so the execution of the code
+  is pretty much in the order of the source code lines here.
+  """
+
+  def __init__(
+      self, mr, services, default_results_per_page,
+      query_project_names, logged_in_user_id, me_user_ids):
+
+    self.mr = mr
+    self.services = services
+    self.default_results_per_page = default_results_per_page
+
+    self.query_project_list = list(services.project.GetProjectsByName(
+        mr.cnxn, query_project_names).values())
+    self.query_project_ids = [
+        p.project_id for p in self.query_project_list]
+
+    self.me_user_ids = me_user_ids
+    self.mr.auth = authdata.AuthData.FromUserID(
+        mr.cnxn, logged_in_user_id, services)
+
+    # The following fields are filled in as the pipeline progresses.
+    # The value None means that we still need to compute that value.
+    self.result_iids = None  # Sorted issue IDs that match the query
+    self.search_limit_reached = False  # True if search results limit is hit.
+    self.error = None
+
+    self._MakePromises()
+
+  def _MakePromises(self):
+    config_dict = self.services.config.GetProjectConfigs(
+        self.mr.cnxn, self.query_project_ids)
+    self.harmonized_config = tracker_bizobj.HarmonizeConfigs(
+        list(config_dict.values()))
+
+    self.canned_query = savedqueries_helpers.SavedQueryIDToCond(
+        self.mr.cnxn, self.services.features, self.mr.can)
+
+    self.canned_query, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+        self.me_user_ids, self.canned_query)
+    self.mr.warnings.extend(warnings)
+    self.user_query, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+        self.me_user_ids, self.mr.query)
+    self.mr.warnings.extend(warnings)
+    logging.debug('Searching query: %s %s', self.canned_query, self.user_query)
+
+    slice_term = ('Issue.shard = %s', [self.mr.shard_id])
+
+    sd = sorting.ComputeSortDirectives(
+        self.harmonized_config, self.mr.group_by_spec, self.mr.sort_spec)
+
+    self.result_iids_promise = framework_helpers.Promise(
+        _GetQueryResultIIDs, self.mr.cnxn,
+        self.services, self.canned_query, self.user_query,
+        self.query_project_ids, self.harmonized_config, sd,
+        slice_term, self.mr.shard_id, self.mr.invalidation_timestep)
+
+  def SearchForIIDs(self):
+    """Wait for the search Promises and store their results."""
+    with self.mr.profiler.Phase('WaitOnPromises'):
+      self.result_iids, self.search_limit_reached, self.error = (
+          self.result_iids_promise.WaitAndGetValue())
+
+
+def SearchProjectCan(
+    cnxn, services, project_ids, query_ast, shard_id, harmonized_config,
+    left_joins=None, where=None, sort_directives=None, query_desc=''):
+  """Return a list of issue global IDs in the projects that satisfy the query.
+
+  Args:
+    cnxn: Regular database connection to the primary DB.
+    services: interface to issue storage backends.
+    project_ids: list of int IDs of the project to search
+    query_ast: A QueryAST PB with conjunctions and conditions.
+    shard_id: limit search to the specified shard ID int.
+    harmonized_config: harmonized config for all projects being searched.
+    left_joins: SQL LEFT JOIN clauses that are needed in addition to
+        anything generated from the query_ast.
+    where: SQL WHERE clauses that are needed in addition to
+        anything generated from the query_ast.
+    sort_directives: list of strings specifying the columns to sort on.
+    query_desc: descriptive string for debugging.
+
+  Returns:
+    (issue_ids, capped, error) where issue_ids is a list of issue issue_ids
+    that satisfy the query, capped is True if the number of results were
+    capped due to an implementation limit, and error is any well-known error
+    (probably a query parsing error) encountered during search.
+  """
+  logging.info('searching projects %r for AST %r', project_ids, query_ast)
+  start_time = time.time()
+  left_joins = left_joins or []
+  where = where or []
+  if project_ids:
+    cond_str = 'Issue.project_id IN (%s)' % sql.PlaceHolders(project_ids)
+    where.append((cond_str, project_ids))
+
+  try:
+    query_ast = ast2ast.PreprocessAST(
+        cnxn, query_ast, project_ids, services, harmonized_config)
+    logging.info('simplified AST is %r', query_ast)
+    query_left_joins, query_where, _ = ast2select.BuildSQLQuery(query_ast)
+    left_joins.extend(query_left_joins)
+    where.extend(query_where)
+  except ast2ast.MalformedQuery as e:
+    # TODO(jrobbins): inform the user that their query had invalid tokens.
+    logging.info('Invalid query tokens %s.\n %r\n\n', e.message, query_ast)
+    return [], False, e
+  except ast2select.NoPossibleResults as e:
+    # TODO(jrobbins): inform the user that their query was impossible.
+    logging.info('Impossible query %s.\n %r\n\n', e.message, query_ast)
+    return [], False, e
+  logging.info('translated to left_joins %r', left_joins)
+  logging.info('translated to where %r', where)
+
+  fts_capped = False
+  if query_ast.conjunctions:
+    # TODO(jrobbins): Handle "OR" in queries.  For now, we just process the
+    # first conjunction.
+    assert len(query_ast.conjunctions) == 1
+    conj = query_ast.conjunctions[0]
+    full_text_iids, fts_capped = tracker_fulltext.SearchIssueFullText(
+        project_ids, conj, shard_id)
+    if full_text_iids is not None:
+      if not full_text_iids:
+        return [], False, None  # No match on fulltext, so don't bother DB.
+      cond_str = 'Issue.id IN (%s)' % sql.PlaceHolders(full_text_iids)
+      where.append((cond_str, full_text_iids))
+
+  label_def_rows = []
+  status_def_rows = []
+  if sort_directives:
+    if project_ids:
+      for pid in project_ids:
+        label_def_rows.extend(services.config.GetLabelDefRows(cnxn, pid))
+        status_def_rows.extend(services.config.GetStatusDefRows(cnxn, pid))
+    else:
+      label_def_rows = services.config.GetLabelDefRowsAnyProject(cnxn)
+      status_def_rows = services.config.GetStatusDefRowsAnyProject(cnxn)
+
+  harmonized_labels = tracker_bizobj.HarmonizeLabelOrStatusRows(
+      label_def_rows)
+  harmonized_statuses = tracker_bizobj.HarmonizeLabelOrStatusRows(
+      status_def_rows)
+  harmonized_fields = harmonized_config.field_defs
+  sort_left_joins, order_by = ast2sort.BuildSortClauses(
+      sort_directives, harmonized_labels, harmonized_statuses,
+      harmonized_fields)
+  logging.info('translated to sort left_joins %r', sort_left_joins)
+  logging.info('translated to order_by %r', order_by)
+
+  issue_ids, db_capped = services.issue.RunIssueQuery(
+      cnxn, left_joins + sort_left_joins, where, order_by, shard_id=shard_id)
+  logging.warn('executed "%s" query %r for %d issues in %dms',
+               query_desc, query_ast, len(issue_ids),
+               int((time.time() - start_time) * 1000))
+  capped = fts_capped or db_capped
+  return issue_ids, capped, None
+
+def _FilterSpam(query_ast):
+  uses_spam = False
+  # TODO(jrobbins): Handle "OR" in queries.  For now, we just modify the
+  # first conjunction.
+  conjunction = query_ast.conjunctions[0]
+  for condition in conjunction.conds:
+    for field in condition.field_defs:
+      if field.field_name == 'spam':
+        uses_spam = True
+
+  if not uses_spam:
+    query_ast.conjunctions[0].conds.append(
+        ast_pb2.MakeCond(
+            ast_pb2.QueryOp.NE,
+            [tracker_pb2.FieldDef(
+                field_name='spam',
+                field_type=tracker_pb2.FieldTypes.BOOL_TYPE)
+             ],
+        [], []))
+
+  return query_ast
+
+def _GetQueryResultIIDs(
+    cnxn, services, canned_query, user_query,
+    query_project_ids, harmonized_config, sd, slice_term,
+    shard_id, invalidation_timestep):
+  """Do a search and return a list of matching issue IDs.
+
+  Args:
+    cnxn: connection to the database.
+    services: interface to issue storage backends.
+    canned_query: string part of the query from the drop-down menu.
+    user_query: string part of the query that the user typed in.
+    query_project_ids: list of project IDs to search.
+    harmonized_config: combined configs for all the queried projects.
+    sd: list of sort directives.
+    slice_term: additional query term to narrow results to a logical shard
+        within a physical shard.
+    shard_id: int number of the database shard to search.
+    invalidation_timestep: int timestep to use keep memcached items fresh.
+
+  Returns:
+    Tuple consisting of:
+      A list of issue issue_ids that match the user's query.  An empty list, [],
+      is returned if no issues match the query.
+      Boolean that is set to True if the search results limit of this shard is
+      hit.
+      An error (subclass of Exception) encountered during query processing. None
+      means that no error was encountered.
+  """
+  query_ast = _FilterSpam(query2ast.ParseUserQuery(
+      user_query, canned_query, query2ast.BUILTIN_ISSUE_FIELDS,
+      harmonized_config))
+
+  logging.info('query_project_ids is %r', query_project_ids)
+
+  is_fulltext_query = bool(
+    query_ast.conjunctions and
+    fulltext_helpers.BuildFTSQuery(
+      query_ast.conjunctions[0], tracker_fulltext.ISSUE_FULLTEXT_FIELDS))
+  expiration = framework_constants.CACHE_EXPIRATION
+  if is_fulltext_query:
+    expiration = framework_constants.FULLTEXT_MEMCACHE_EXPIRATION
+
+  # Might raise ast2ast.MalformedQuery or ast2select.NoPossibleResults.
+  result_iids, search_limit_reached, error = SearchProjectCan(
+      cnxn, services, query_project_ids, query_ast, shard_id,
+      harmonized_config, sort_directives=sd, where=[slice_term],
+      query_desc='getting query issue IDs')
+  logging.info('Found %d result_iids', len(result_iids))
+  if error:
+    logging.warn('Got error %r', error)
+
+  projects_str = ','.join(str(pid) for pid in sorted(query_project_ids))
+  projects_str = projects_str or 'all'
+  memcache_key = ';'.join([
+      projects_str, canned_query, user_query, ' '.join(sd), str(shard_id)])
+  memcache.set(memcache_key, (result_iids, invalidation_timestep),
+               time=expiration, namespace=settings.memcache_namespace)
+  logging.info('set memcache key %r', memcache_key)
+
+  search_limit_memcache_key = ';'.join([
+      projects_str, canned_query, user_query, ' '.join(sd),
+      'search_limit_reached', str(shard_id)])
+  memcache.set(search_limit_memcache_key,
+               (search_limit_reached, invalidation_timestep),
+               time=expiration, namespace=settings.memcache_namespace)
+  logging.info('set search limit memcache key %r',
+               search_limit_memcache_key)
+
+  timestamps_for_projects = memcache.get_multi(
+      keys=(['%d;%d' % (pid, shard_id) for pid in query_project_ids] +
+            ['all:%d' % shard_id]),
+      namespace=settings.memcache_namespace)
+
+  if query_project_ids:
+    for pid in query_project_ids:
+      key = '%d;%d' % (pid, shard_id)
+      if key not in timestamps_for_projects:
+        memcache.set(
+            key,
+            invalidation_timestep,
+            time=framework_constants.CACHE_EXPIRATION,
+            namespace=settings.memcache_namespace)
+  else:
+    key = 'all;%d' % shard_id
+    if key not in timestamps_for_projects:
+      memcache.set(
+          key,
+          invalidation_timestep,
+          time=framework_constants.CACHE_EXPIRATION,
+          namespace=settings.memcache_namespace)
+
+  return result_iids, search_limit_reached, error
diff --git a/search/frontendsearchpipeline.py b/search/frontendsearchpipeline.py
new file mode 100644
index 0000000..367c52f
--- /dev/null
+++ b/search/frontendsearchpipeline.py
@@ -0,0 +1,1237 @@
+# 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
+
+"""The FrontendSearchPipeline class manages issue search and sorting.
+
+The frontend pipeline checks memcache for cached results in each shard.  It
+then calls backend jobs to do any shards that had a cache miss.  On cache hit,
+the cached results must be filtered by permissions, so the at-risk cache and
+backends are consulted.  Next, the sharded results are combined into an overall
+list of IIDs.  Then, that list is paginated and the issues on the current
+pagination page can be shown.  Alternatively, this class can determine just the
+position the currently shown issue would occupy in the overall sorted list.
+"""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import json
+
+import collections
+import logging
+import math
+import random
+import time
+
+from google.appengine.api import apiproxy_stub_map
+from google.appengine.api import memcache
+from google.appengine.api import modules
+from google.appengine.api import urlfetch
+
+import settings
+from features import savedqueries_helpers
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import paginate
+from framework import permissions
+from framework import sorting
+from framework import urls
+from search import ast2ast
+from search import query2ast
+from search import searchpipeline
+from services import fulltext_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+
+
+# Fail-fast responses usually finish in less than 50ms.  If we see a failure
+# in under that amount of time, we don't bother logging it.
+FAIL_FAST_LIMIT_SEC = 0.1
+
+DELAY_BETWEEN_RPC_COMPLETION_POLLS = 0.04  # 40 milliseconds
+
+# The choices help balance the cost of choosing samples vs. the cost of
+# selecting issues that are in a range bounded by neighboring samples.
+# Preferred chunk size parameters were determined by experimentation.
+MIN_SAMPLE_CHUNK_SIZE = int(
+    math.sqrt(tracker_constants.DEFAULT_RESULTS_PER_PAGE))
+MAX_SAMPLE_CHUNK_SIZE = int(math.sqrt(settings.search_limit_per_shard))
+PREFERRED_NUM_CHUNKS = 50
+
+
+# TODO(jojwang): monorail:4127: combine some url parameters info or
+# query info into dicts or tuples to make argument manager easier.
+class FrontendSearchPipeline(object):
+  """Manage the process of issue search, including backends and caching.
+
+  Even though the code is divided into several methods, the public
+  methods should be called in sequence, so the execution of the code
+  is pretty much in the order of the source code lines here.
+  """
+
+  def __init__(
+      self,
+      cnxn,
+      services,
+      auth,
+      me_user_ids,
+      query,
+      query_project_names,
+      items_per_page,
+      paginate_start,
+      can,
+      group_by_spec,
+      sort_spec,
+      warnings,
+      errors,
+      use_cached_searches,
+      profiler,
+      project=None):
+    self.cnxn = cnxn
+    self.me_user_ids = me_user_ids
+    self.auth = auth
+    self.logged_in_user_id = auth.user_id or 0
+    self.can = can
+    self.items_per_page = items_per_page
+    self.paginate_start = paginate_start
+    self.group_by_spec = group_by_spec
+    self.sort_spec = sort_spec
+    self.warnings = warnings
+    self.use_cached_searches = use_cached_searches
+    self.profiler = profiler
+
+    self.services = services
+    self.pagination = None
+    self.num_skipped_at_start = 0
+    self.total_count = 0
+    self.errors = errors
+
+    self.project_name = ''
+    if project:
+      self.project_name = project.project_name
+    self.query_projects = []
+    if query_project_names:
+      consider_projects = list(services.project.GetProjectsByName(
+        self.cnxn, query_project_names).values())
+      self.query_projects = [
+          p for p in consider_projects
+          if permissions.UserCanViewProject(
+              self.auth.user_pb, self.auth.effective_ids, p)]
+    if project:
+      self.query_projects.append(project)
+    member_of_all_projects = self.auth.user_pb.is_site_admin or all(
+        framework_bizobj.UserIsInProject(p, self.auth.effective_ids)
+        for p in self.query_projects)
+    self.query_project_ids = sorted([
+        p.project_id for p in self.query_projects])
+    self.query_project_names = sorted([
+        p.project_name for p in self.query_projects])
+
+    config_dict = self.services.config.GetProjectConfigs(
+        self.cnxn, self.query_project_ids)
+    self.harmonized_config = tracker_bizobj.HarmonizeConfigs(
+        list(config_dict.values()))
+
+    # The following fields are filled in as the pipeline progresses.
+    # The value None means that we still need to compute that value.
+    # A shard_key is a tuple (shard_id, subquery).
+    self.users_by_id = {}
+    self.nonviewable_iids = {}  # {shard_id: set(iid)}
+    self.unfiltered_iids = {}  # {shard_key: [iid, ...]} needing perm checks.
+    self.filtered_iids = {}  # {shard_key: [iid, ...]} already perm checked.
+    self.search_limit_reached = {}  # {shard_key: [bool, ...]}.
+    self.allowed_iids = []  # Matching iids that user is permitted to view.
+    self.allowed_results = None  # results that the user is permitted to view.
+    self.visible_results = None  # allowed_results on current pagination page.
+    self.error_responses = set()
+
+    error_msg = _CheckQuery(
+        self.cnxn, self.services, query, self.harmonized_config,
+        self.query_project_ids, member_of_all_projects,
+        warnings=self.warnings)
+    if error_msg:
+      self.errors.query = error_msg
+
+    # Split up query into smaller subqueries that would get the same results
+    # to improve performance. Smaller queries are more likely to get cache
+    # hits and subqueries can be parallelized by querying for them across
+    # multiple shards.
+    self.subqueries = []
+    try:
+      self.subqueries = query2ast.QueryToSubqueries(query)
+    except query2ast.InvalidQueryError:
+      # Ignore errors because they've already been recorded in
+      # self.errors.query.
+      pass
+
+  def SearchForIIDs(self):
+    """Use backends to search each shard and store their results."""
+    with self.profiler.Phase('Checking cache and calling Backends'):
+      rpc_tuples = _StartBackendSearch(
+          self.cnxn, self.query_project_names, self.query_project_ids,
+          self.harmonized_config, self.unfiltered_iids,
+          self.search_limit_reached, self.nonviewable_iids,
+          self.error_responses, self.services, self.me_user_ids,
+          self.logged_in_user_id, self.items_per_page + self.paginate_start,
+          self.subqueries, self.can, self.group_by_spec, self.sort_spec,
+          self.warnings, self.use_cached_searches)
+
+    with self.profiler.Phase('Waiting for Backends'):
+      try:
+        _FinishBackendSearch(rpc_tuples)
+      except Exception as e:
+        logging.exception(e)
+        raise
+
+    if self.error_responses:
+      logging.error('%r error responses. Incomplete search results.',
+                    self.error_responses)
+
+    with self.profiler.Phase('Filtering cached results'):
+      for shard_key in self.unfiltered_iids:
+        shard_id, _subquery = shard_key
+        if shard_id not in self.nonviewable_iids:
+          logging.error(
+            'Not displaying shard %r because of no nonviewable_iids', shard_id)
+          self.error_responses.add(shard_id)
+          filtered_shard_iids = []
+        else:
+          unfiltered_shard_iids = self.unfiltered_iids[shard_key]
+          nonviewable_shard_iids = self.nonviewable_iids[shard_id]
+          # TODO(jrobbins): avoid creating large temporary lists.
+          filtered_shard_iids = [iid for iid in unfiltered_shard_iids
+                                 if iid not in nonviewable_shard_iids]
+        self.filtered_iids[shard_key] = filtered_shard_iids
+
+    seen_iids_by_shard_id = collections.defaultdict(set)
+    with self.profiler.Phase('Dedupping result IIDs across shards'):
+      for shard_key in self.filtered_iids:
+        shard_id, _subquery = shard_key
+        deduped = [iid for iid in self.filtered_iids[shard_key]
+                   if iid not in seen_iids_by_shard_id[shard_id]]
+        self.filtered_iids[shard_key] = deduped
+        seen_iids_by_shard_id[shard_id].update(deduped)
+
+    with self.profiler.Phase('Counting all filtered results'):
+      for shard_key in self.filtered_iids:
+        self.total_count += len(self.filtered_iids[shard_key])
+
+    with self.profiler.Phase('Trimming results beyond pagination page'):
+      for shard_key in self.filtered_iids:
+        self.filtered_iids[shard_key] = self.filtered_iids[
+            shard_key][:self.paginate_start + self.items_per_page]
+
+  def MergeAndSortIssues(self):
+    """Merge and sort results from all shards into one combined list."""
+    with self.profiler.Phase('selecting issues to merge and sort'):
+      self._NarrowFilteredIIDs()
+      self.allowed_iids = []
+      for filtered_shard_iids in self.filtered_iids.values():
+        self.allowed_iids.extend(filtered_shard_iids)
+
+    with self.profiler.Phase('getting allowed results'):
+      self.allowed_results = self.services.issue.GetIssues(
+          self.cnxn, self.allowed_iids)
+
+    # Note: At this point, we have results that are only sorted within
+    # each backend's shard.  We still need to sort the merged result.
+    self._LookupNeededUsers(self.allowed_results)
+    with self.profiler.Phase('merging and sorting issues'):
+      self.allowed_results = _SortIssues(
+          self.allowed_results, self.harmonized_config, self.users_by_id,
+          self.group_by_spec, self.sort_spec)
+
+  def _NarrowFilteredIIDs(self):
+    """Combine filtered shards into a range of IIDs for issues to sort.
+
+    The niave way is to concatenate shard_iids[:start + num] for all
+    shards then select [start:start + num].  We do better by sampling
+    issues and then determining which of those samples are known to
+    come before start or after start+num.  We then trim off all those IIDs
+    and sort a smaller range of IIDs that might actuall be displayed.
+    See the design doc at go/monorail-sorting.
+
+    This method modifies self.fitered_iids and self.num_skipped_at_start.
+    """
+    # Sample issues and skip those that are known to come before start.
+    # See the "Sorting in Monorail" design doc.
+
+    # If the result set is small, don't bother optimizing it.
+    orig_length = _TotalLength(self.filtered_iids)
+    if orig_length < self.items_per_page * 4:
+      return
+
+    # 1. Get sample issues in each shard and sort them all together.
+    last = self.paginate_start + self.items_per_page
+
+    samples_by_shard, sample_iids_to_shard = self._FetchAllSamples(
+        self.filtered_iids)
+    sample_issues = []
+    for issue_dict in samples_by_shard.values():
+      sample_issues.extend(list(issue_dict.values()))
+
+    self._LookupNeededUsers(sample_issues)
+    sample_issues = _SortIssues(
+        sample_issues, self.harmonized_config, self.users_by_id,
+        self.group_by_spec, self.sort_spec)
+    sample_iid_tuples = [
+        (issue.issue_id, sample_iids_to_shard[issue.issue_id])
+        for issue in sample_issues]
+
+    # 2. Trim off some IIDs that are sure to be positioned after last.
+    num_trimmed_end = _TrimEndShardedIIDs(
+        self.filtered_iids, sample_iid_tuples, last)
+    logging.info('Trimmed %r issues from the end of shards', num_trimmed_end)
+
+    # 3. Trim off some IIDs that are sure to be posiitoned before start.
+    keep = _TotalLength(self.filtered_iids) - self.paginate_start
+    # Reverse the sharded lists.
+    _ReverseShards(self.filtered_iids)
+    sample_iid_tuples.reverse()
+    self.num_skipped_at_start = _TrimEndShardedIIDs(
+        self.filtered_iids, sample_iid_tuples, keep)
+    logging.info('Trimmed %r issues from the start of shards',
+                 self.num_skipped_at_start)
+    # Reverse sharded lists again to get back into forward order.
+    _ReverseShards(self.filtered_iids)
+
+  def DetermineIssuePosition(self, issue):
+    """Calculate info needed to show the issue flipper.
+
+    Args:
+      issue: The issue currently being viewed.
+
+    Returns:
+      A 3-tuple (prev_iid, index, next_iid) were prev_iid is the
+      IID of the previous issue in the total ordering (or None),
+      index is the index that the current issue has in the total
+      ordering, and next_iid is the next issue (or None).  If the current
+      issue is not in the list of results at all, returns None, None, None.
+    """
+    # 1. If the current issue is not in the results at all, then exit.
+    if not any(issue.issue_id in filtered_shard_iids
+               for filtered_shard_iids in self.filtered_iids.values()):
+      return None, None, None
+
+    # 2. Choose and retrieve sample issues in each shard.
+    samples_by_shard, _ = self._FetchAllSamples(self.filtered_iids)
+
+    # 3. Build up partial results for each shard.
+    preceeding_counts = {}  # dict {shard_key: num_issues_preceeding_current}
+    prev_candidates, next_candidates = [], []
+    for shard_key in self.filtered_iids:
+      prev_candidate, index_in_shard, next_candidate = (
+          self._DetermineIssuePositionInShard(
+              shard_key, issue, samples_by_shard[shard_key]))
+      preceeding_counts[shard_key] = index_in_shard
+      if prev_candidate:
+        prev_candidates.append(prev_candidate)
+      if next_candidate:
+        next_candidates.append(next_candidate)
+
+    # 4. Combine the results.
+    index = sum(preceeding_counts.values())
+    prev_candidates = _SortIssues(
+        prev_candidates, self.harmonized_config, self.users_by_id,
+        self.group_by_spec, self.sort_spec)
+    prev_iid = prev_candidates[-1].issue_id if prev_candidates else None
+    next_candidates = _SortIssues(
+        next_candidates, self.harmonized_config, self.users_by_id,
+        self.group_by_spec, self.sort_spec)
+    next_iid = next_candidates[0].issue_id if next_candidates else None
+
+    return prev_iid, index, next_iid
+
+  def _DetermineIssuePositionInShard(self, shard_key, issue, sample_dict):
+    """Determine where the given issue would fit into results from a shard."""
+    # See the design doc for details.  Basically, it first surveys the results
+    # to bound a range where the given issue would belong, then it fetches the
+    # issues in that range and sorts them.
+
+    filtered_shard_iids = self.filtered_iids[shard_key]
+
+    # 1. Select a sample of issues, leveraging ones we have in RAM already.
+    issues_on_hand = list(sample_dict.values())
+    if issue.issue_id not in sample_dict:
+      issues_on_hand.append(issue)
+
+    self._LookupNeededUsers(issues_on_hand)
+    sorted_on_hand = _SortIssues(
+        issues_on_hand, self.harmonized_config, self.users_by_id,
+        self.group_by_spec, self.sort_spec)
+    sorted_on_hand_iids = [soh.issue_id for soh in sorted_on_hand]
+    index_in_on_hand = sorted_on_hand_iids.index(issue.issue_id)
+
+    # 2. Bound the gap around where issue belongs.
+    if index_in_on_hand == 0:
+      fetch_start = 0
+    else:
+      prev_on_hand_iid = sorted_on_hand_iids[index_in_on_hand - 1]
+      fetch_start = filtered_shard_iids.index(prev_on_hand_iid) + 1
+
+    if index_in_on_hand == len(sorted_on_hand) - 1:
+      fetch_end = len(filtered_shard_iids)
+    else:
+      next_on_hand_iid = sorted_on_hand_iids[index_in_on_hand + 1]
+      fetch_end = filtered_shard_iids.index(next_on_hand_iid)
+
+    # 3. Retrieve all the issues in that gap to get an exact answer.
+    fetched_issues = self.services.issue.GetIssues(
+        self.cnxn, filtered_shard_iids[fetch_start:fetch_end])
+    if issue.issue_id not in filtered_shard_iids[fetch_start:fetch_end]:
+      fetched_issues.append(issue)
+    self._LookupNeededUsers(fetched_issues)
+    sorted_fetched = _SortIssues(
+        fetched_issues, self.harmonized_config, self.users_by_id,
+        self.group_by_spec, self.sort_spec)
+    sorted_fetched_iids = [sf.issue_id for sf in sorted_fetched]
+    index_in_fetched = sorted_fetched_iids.index(issue.issue_id)
+
+    # 4. Find the issues that come immediately before and after the place where
+    # the given issue would belong in this shard.
+    if index_in_fetched > 0:
+      prev_candidate = sorted_fetched[index_in_fetched - 1]
+    elif index_in_on_hand > 0:
+      prev_candidate = sorted_on_hand[index_in_on_hand - 1]
+    else:
+      prev_candidate = None
+
+    if index_in_fetched < len(sorted_fetched) - 1:
+      next_candidate = sorted_fetched[index_in_fetched + 1]
+    elif index_in_on_hand < len(sorted_on_hand) - 1:
+      next_candidate = sorted_on_hand[index_in_on_hand + 1]
+    else:
+      next_candidate = None
+
+    return prev_candidate, fetch_start + index_in_fetched, next_candidate
+
+  def _FetchAllSamples(self, filtered_iids):
+    """Return a dict {shard_key: {iid: sample_issue}}."""
+    samples_by_shard = {}  # {shard_key: {iid: sample_issue}}
+    sample_iids_to_shard = {}  # {iid: shard_key}
+    all_needed_iids = []  # List of iids to retrieve.
+
+    for shard_key in filtered_iids:
+      on_hand_issues, shard_needed_iids = self._ChooseSampleIssues(
+          filtered_iids[shard_key])
+      samples_by_shard[shard_key] = on_hand_issues
+      for iid in on_hand_issues:
+        sample_iids_to_shard[iid] = shard_key
+      for iid in shard_needed_iids:
+        sample_iids_to_shard[iid] = shard_key
+      all_needed_iids.extend(shard_needed_iids)
+
+    retrieved_samples, _misses = self.services.issue.GetIssuesDict(
+        self.cnxn, all_needed_iids)
+    for retrieved_iid, retrieved_issue in retrieved_samples.items():
+      retr_shard_key = sample_iids_to_shard[retrieved_iid]
+      samples_by_shard[retr_shard_key][retrieved_iid] = retrieved_issue
+
+    return samples_by_shard, sample_iids_to_shard
+
+  def _ChooseSampleIssues(self, issue_ids):
+    """Select a scattering of issues from the list, leveraging RAM cache.
+
+    Args:
+      issue_ids: A list of issue IDs that comprise the results in a shard.
+
+    Returns:
+      A pair (on_hand_issues, needed_iids) where on_hand_issues is
+      an issue dict {iid: issue} of issues already in RAM, and
+      shard_needed_iids is a list of iids of issues that need to be retrieved.
+    """
+    on_hand_issues = {}  # {iid: issue} of sample issues already in RAM.
+    needed_iids = []  # [iid, ...] of sample issues not in RAM yet.
+    chunk_size = max(MIN_SAMPLE_CHUNK_SIZE, min(MAX_SAMPLE_CHUNK_SIZE,
+        int(len(issue_ids) // PREFERRED_NUM_CHUNKS)))
+    for i in range(chunk_size, len(issue_ids), chunk_size):
+      issue = self.services.issue.GetAnyOnHandIssue(
+          issue_ids, start=i, end=min(i + chunk_size, len(issue_ids)))
+      if issue:
+        on_hand_issues[issue.issue_id] = issue
+      else:
+        needed_iids.append(issue_ids[i])
+
+    return on_hand_issues, needed_iids
+
+  def _LookupNeededUsers(self, issues):
+    """Look up user info needed to sort issues, if any."""
+    with self.profiler.Phase('lookup of owner, reporter, and cc'):
+      additional_user_views_by_id = (
+          tracker_helpers.MakeViewsForUsersInIssues(
+              self.cnxn, issues, self.services.user,
+              omit_ids=list(self.users_by_id.keys())))
+      self.users_by_id.update(additional_user_views_by_id)
+
+  def Paginate(self):
+    """Fetch matching issues and paginate the search results.
+
+    These two actions are intertwined because we try to only
+    retrieve the Issues on the current pagination page.
+    """
+    # We already got the issues, just display a slice of the visible ones.
+    limit_reached = False
+    for shard_limit_reached in self.search_limit_reached.values():
+      limit_reached |= shard_limit_reached
+    self.pagination = paginate.ArtifactPagination(
+        self.allowed_results,
+        self.items_per_page,
+        self.paginate_start,
+        self.project_name,
+        urls.ISSUE_LIST,
+        total_count=self.total_count,
+        limit_reached=limit_reached,
+        skipped=self.num_skipped_at_start)
+    self.visible_results = self.pagination.visible_results
+
+    # If we were not forced to look up visible users already, do it now.
+    self._LookupNeededUsers(self.visible_results)
+
+  def __repr__(self):
+    """Return a string that shows the internal state of this pipeline."""
+    if self.allowed_iids:
+      shown_allowed_iids = self.allowed_iids[:200]
+    else:
+      shown_allowed_iids = self.allowed_iids
+
+    if self.allowed_results:
+      shown_allowed_results = self.allowed_results[:200]
+    else:
+      shown_allowed_results = self.allowed_results
+
+    parts = [
+        'allowed_iids: %r' % shown_allowed_iids,
+        'allowed_results: %r' % shown_allowed_results,
+        'len(visible_results): %r' % (
+            self.visible_results and len(self.visible_results))]
+    return '%s(%s)' % (self.__class__.__name__, '\n'.join(parts))
+
+
+def _CheckQuery(
+    cnxn, services, query, harmonized_config, project_ids,
+    member_of_all_projects, warnings=None):
+  """Parse the given query and report the first error or None."""
+  try:
+    query_ast = query2ast.ParseUserQuery(
+        query, '', query2ast.BUILTIN_ISSUE_FIELDS, harmonized_config,
+        warnings=warnings)
+    query_ast = ast2ast.PreprocessAST(
+        cnxn, query_ast, project_ids, services, harmonized_config,
+        is_member=member_of_all_projects)
+  except query2ast.InvalidQueryError as e:
+    return e.message
+  except ast2ast.MalformedQuery as e:
+    return e.message
+
+  return None
+
+
+def _MakeBackendCallback(func, *args):
+  # type: (Callable[[*Any], Any], *Any) -> Callable[[*Any], Any]
+  """Helper to store a particular function and argument set into a callback.
+
+  Args:
+    func: Function to callback.
+    *args: The arguments to pass into the function.
+
+  Returns:
+    Callback function based on specified arguments.
+  """
+  return lambda: func(*args)
+
+
+def _StartBackendSearch(
+    cnxn, query_project_names, query_project_ids, harmonized_config,
+    unfiltered_iids_dict, search_limit_reached_dict, nonviewable_iids,
+    error_responses, services, me_user_ids, logged_in_user_id, new_url_num,
+    subqueries, can, group_by_spec, sort_spec, warnings, use_cached_searches):
+  # type: (MonorailConnection, Sequence[str], Sequence[int],
+  #     proto.tracker_pb2.ProjectIssueConfig,
+  #     Mapping[Tuple(int, str), Sequence[int]],
+  #     Mapping[Tuple(int, str), Sequence[bool]],
+  #     Mapping[Tuple(int, str), Collection[int]], Sequence[Tuple(int, str)],
+  #     Services, Sequence[int], int, int, Sequence[str], int, str, str,
+  #     Sequence[Tuple(str, Sequence[str])], bool) ->
+  #     Sequence[Tuple(int, Tuple(int, str),
+  #         google.appengine.api.apiproxy_stub_map.UserRPC)]
+  """Request that our backends search and return a list of matching issue IDs.
+
+  Args:
+    cnxn: monorail connection to the database.
+    query_project_names: set of project names to search.
+    query_project_ids: list of project IDs to search.
+    harmonized_config: combined ProjectIssueConfig for all projects being
+        searched.
+    unfiltered_iids_dict: dict {shard_key: [iid, ...]} of unfiltered search
+        results to accumulate into.  They need to be later filtered by
+        permissions and merged into filtered_iids_dict.
+    search_limit_reached_dict: dict {shard_key: [bool, ...]} to determine if
+        the search limit of any shard was reached.
+    nonviewable_iids: dict {shard_id: set(iid)} of restricted issues in the
+        projects being searched that the signed in user cannot view.
+    error_responses: shard_iids of shards that encountered errors.
+    services: connections to backends.
+    me_user_ids: Empty list when no user is logged in, or user ID of the logged
+        in user when doing an interactive search, or the viewed user ID when
+        viewing someone else's dashboard, or the subscribing user's ID when
+        evaluating subscriptions.  And, any linked accounts.
+    logged_in_user_id: user_id of the logged in user, 0 otherwise
+    new_url_num: the number of issues for BackendSearchPipeline to query.
+        Computed based on pagination offset + number of items per page.
+    subqueries: split up list of query string segments.
+    can: "canned query" number to scope the user's search.
+    group_by_spec: string that lists the grouping order.
+    sort_spec: string that lists the sort order.
+    warnings: list to accumulate warning messages.
+    use_cached_searches: Bool for whether to use cached searches.
+
+  Returns:
+    A list of rpc_tuples that can be passed to _FinishBackendSearch to wait
+    on any remaining backend calls.
+
+  SIDE-EFFECTS:
+    Any data found in memcache is immediately put into unfiltered_iids_dict.
+    As the backends finish their work, _HandleBackendSearchResponse will update
+    unfiltered_iids_dict for those shards.
+
+    Any warnings produced throughout this process will be added to the list
+    warnings.
+  """
+  rpc_tuples = []
+  needed_shard_keys = set()
+  for subquery in subqueries:
+    subquery, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+        me_user_ids, subquery)
+    warnings.extend(warnings)
+    for shard_id in range(settings.num_logical_shards):
+      needed_shard_keys.add((shard_id, subquery))
+
+  # 1. Get whatever we can from memcache.  Cache hits are only kept if they are
+  # not already expired.
+  project_shard_timestamps = _GetProjectTimestamps(
+      query_project_ids, needed_shard_keys)
+
+  if use_cached_searches:
+    cached_unfiltered_iids_dict, cached_search_limit_reached_dict = (
+        _GetCachedSearchResults(
+            cnxn, query_project_ids, needed_shard_keys,
+            harmonized_config, project_shard_timestamps, services, me_user_ids,
+            can, group_by_spec, sort_spec, warnings))
+    unfiltered_iids_dict.update(cached_unfiltered_iids_dict)
+    search_limit_reached_dict.update(cached_search_limit_reached_dict)
+  for cache_hit_shard_key in unfiltered_iids_dict:
+    needed_shard_keys.remove(cache_hit_shard_key)
+
+  # 2. Each kept cache hit will have unfiltered IIDs, so we filter them by
+  # removing non-viewable IDs.
+  _GetNonviewableIIDs(
+    query_project_ids, logged_in_user_id,
+    set(range(settings.num_logical_shards)),
+    rpc_tuples, nonviewable_iids, project_shard_timestamps,
+    services.cache_manager.processed_invalidations_up_to,
+    use_cached_searches)
+
+  # 3. Hit backends for any shards that are still needed.  When these results
+  # come back, they are also put into unfiltered_iids_dict.
+  for shard_key in needed_shard_keys:
+    rpc = _StartBackendSearchCall(
+        query_project_names,
+        shard_key,
+        services.cache_manager.processed_invalidations_up_to,
+        me_user_ids,
+        logged_in_user_id,
+        new_url_num,
+        can=can,
+        sort_spec=sort_spec,
+        group_by_spec=group_by_spec)
+    rpc_tuple = (time.time(), shard_key, rpc)
+    rpc.callback = _MakeBackendCallback(
+        _HandleBackendSearchResponse, query_project_names, rpc_tuple,
+        rpc_tuples, settings.backend_retries, unfiltered_iids_dict,
+        search_limit_reached_dict,
+        services.cache_manager.processed_invalidations_up_to, error_responses,
+        me_user_ids, logged_in_user_id, new_url_num, can, sort_spec,
+        group_by_spec)
+    rpc_tuples.append(rpc_tuple)
+
+  return rpc_tuples
+
+
+def _FinishBackendSearch(rpc_tuples):
+  """Wait for all backend calls to complete, including any retries."""
+  while rpc_tuples:
+    active_rpcs = [rpc for (_time, _shard_key, rpc) in rpc_tuples]
+    # Wait for any active RPC to complete.  It's callback function will
+    # automatically be called.
+    finished_rpc = real_wait_any(active_rpcs)
+    # Figure out which rpc_tuple finished and remove it from our list.
+    for rpc_tuple in rpc_tuples:
+      _time, _shard_key, rpc = rpc_tuple
+      if rpc == finished_rpc:
+        rpc_tuples.remove(rpc_tuple)
+        break
+    else:
+      raise ValueError('We somehow finished an RPC that is not in rpc_tuples')
+
+
+def real_wait_any(active_rpcs):
+  """Work around the blocking nature of wait_any().
+
+  wait_any() checks for any finished RPCs, and returns one if found.
+  If no RPC is finished, it simply blocks on the last RPC in the list.
+  This is not the desired behavior because we are not able to detect
+  FAST-FAIL RPC results and retry them if wait_any() is blocked on a
+  request that is taking a long time to do actual work.
+
+  Instead, we do the same check, without blocking on any individual RPC.
+  """
+  if settings.local_mode:
+    # The development server has very different code for RPCs than the
+    # code used in the hosted environment.
+    return apiproxy_stub_map.UserRPC.wait_any(active_rpcs)
+  while True:
+    finished, _ = apiproxy_stub_map.UserRPC._UserRPC__check_one(active_rpcs)
+    if finished:
+      return finished
+    time.sleep(DELAY_BETWEEN_RPC_COMPLETION_POLLS)
+
+def _GetProjectTimestamps(query_project_ids, needed_shard_keys):
+  """Get a dict of modified_ts values for all specified project-shards."""
+  project_shard_timestamps = {}
+  if query_project_ids:
+    keys = []
+    for pid in query_project_ids:
+      for sid, _subquery in needed_shard_keys:
+        keys.append('%d;%d' % (pid, sid))
+  else:
+    keys = [('all;%d' % sid)
+            for sid, _subquery in needed_shard_keys]
+
+  timestamps_for_project = memcache.get_multi(
+      keys=keys, namespace=settings.memcache_namespace)
+  for key, timestamp in timestamps_for_project.items():
+    pid_str, sid_str = key.split(';')
+    if pid_str == 'all':
+      project_shard_timestamps['all', int(sid_str)] = timestamp
+    else:
+      project_shard_timestamps[int(pid_str), int(sid_str)] = timestamp
+
+  return project_shard_timestamps
+
+
+def _GetNonviewableIIDs(
+    query_project_ids, logged_in_user_id, needed_shard_ids, rpc_tuples,
+    nonviewable_iids, project_shard_timestamps, invalidation_timestep,
+    use_cached_searches):
+  """Build a set of at-risk IIDs, and accumulate RPCs to get uncached ones."""
+  if query_project_ids:
+    keys = []
+    for pid in query_project_ids:
+      for sid in needed_shard_ids:
+        keys.append('%d;%d;%d' % (pid, logged_in_user_id, sid))
+  else:
+    keys = [
+        ('all;%d;%d' % (logged_in_user_id, sid)) for sid in needed_shard_ids
+    ]
+
+  if use_cached_searches:
+    cached_dict = memcache.get_multi(
+        keys, key_prefix='nonviewable:', namespace=settings.memcache_namespace)
+  else:
+    cached_dict = {}
+
+  for sid in needed_shard_ids:
+    if query_project_ids:
+      for pid in query_project_ids:
+        _AccumulateNonviewableIIDs(
+            pid, logged_in_user_id, sid, cached_dict, nonviewable_iids,
+            project_shard_timestamps, rpc_tuples, invalidation_timestep)
+    else:
+      _AccumulateNonviewableIIDs(
+          None, logged_in_user_id, sid, cached_dict, nonviewable_iids,
+          project_shard_timestamps, rpc_tuples, invalidation_timestep)
+
+
+def _AccumulateNonviewableIIDs(
+    pid, logged_in_user_id, sid, cached_dict, nonviewable_iids,
+    project_shard_timestamps, rpc_tuples, invalidation_timestep):
+  """Use one of the retrieved cache entries or call a backend if needed."""
+  if pid is None:
+    key = 'all;%d;%d' % (logged_in_user_id, sid)
+  else:
+    key = '%d;%d;%d' % (pid, logged_in_user_id, sid)
+
+  if key in cached_dict:
+    issue_ids, cached_ts = cached_dict.get(key)
+    modified_ts = project_shard_timestamps.get((pid, sid))
+    if modified_ts is None or modified_ts > cached_ts:
+      logging.info('nonviewable too stale on (project %r, shard %r)',
+                   pid, sid)
+    else:
+      logging.info('adding %d nonviewable issue_ids', len(issue_ids))
+      nonviewable_iids[sid] = set(issue_ids)
+
+  if sid not in nonviewable_iids:
+    logging.info('nonviewable for %r not found', key)
+    logging.info('starting backend call for nonviewable iids %r', key)
+    rpc = _StartBackendNonviewableCall(
+      pid, logged_in_user_id, sid, invalidation_timestep)
+    rpc_tuple = (time.time(), sid, rpc)
+    rpc.callback = _MakeBackendCallback(
+        _HandleBackendNonviewableResponse, pid, logged_in_user_id, sid,
+        rpc_tuple, rpc_tuples, settings.backend_retries, nonviewable_iids,
+        invalidation_timestep)
+    rpc_tuples.append(rpc_tuple)
+
+
+def _GetCachedSearchResults(
+    cnxn, query_project_ids, needed_shard_keys, harmonized_config,
+    project_shard_timestamps, services, me_user_ids, can, group_by_spec,
+    sort_spec, warnings):
+  """Return a dict of cached search results that are not already stale.
+
+  If it were not for cross-project search, we would simply cache when we do a
+  search and then invalidate when an issue is modified.  But, with
+  cross-project search we don't know all the memcache entries that would
+  need to be invalidated.  So, instead, we write the search result cache
+  entries and then an initial modified_ts value for each project if it was
+  not already there. And, when we update an issue we write a new
+  modified_ts entry, which implicitly invalidate all search result
+  cache entries that were written earlier because they are now stale.  When
+  reading from the cache, we ignore any query project with modified_ts
+  after its search result cache timestamp, because it is stale.
+
+  Args:
+    cnxn: monorail connection to the database.
+    query_project_ids: list of project ID numbers for all projects being
+        searched.
+    needed_shard_keys: set of shard keys that need to be checked.
+    harmonized_config: ProjectIsueConfig with combined information for all
+        projects involved in this search.
+    project_shard_timestamps: a dict {(project_id, shard_id): timestamp, ...}
+        that tells when each shard was last invalidated.
+    services: connections to backends.
+    me_user_ids: Empty list when no user is logged in, or user ID of the logged
+        in user when doing an interactive search, or the viewed user ID when
+        viewing someone else's dashboard, or the subscribing user's ID when
+        evaluating subscriptions.  And, any linked accounts.
+    can: "canned query" number to scope the user's search.
+    group_by_spec: string that lists the grouping order.
+    sort_spec: string that lists the sort order.
+    warnings: list to accumulate warning messages.
+
+
+  Returns:
+    Tuple consisting of:
+      A dictionary {shard_id: [issue_id, ...], ...} of unfiltered search result
+      issue IDs. Only shard_ids found in memcache will be in that dictionary.
+      The result issue IDs must be permission checked before they can be
+      considered to be part of the user's result set.
+      A dictionary {shard_id: bool, ...}. The boolean is set to True if
+      the search results limit of the shard is hit.
+  """
+  projects_str = ','.join(str(pid) for pid in sorted(query_project_ids))
+  projects_str = projects_str or 'all'
+  canned_query = savedqueries_helpers.SavedQueryIDToCond(
+      cnxn, services.features, can)
+  canned_query, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+      me_user_ids, canned_query)
+  warnings.extend(warnings)
+
+  sd = sorting.ComputeSortDirectives(
+      harmonized_config, group_by_spec, sort_spec)
+  sd_str = ' '.join(sd)
+  memcache_key_prefix = '%s;%s' % (projects_str, canned_query)
+  limit_reached_key_prefix = '%s;%s' % (projects_str, canned_query)
+
+  cached_dict = memcache.get_multi(
+      ['%s;%s;%s;%d' % (memcache_key_prefix, subquery, sd_str, sid)
+       for sid, subquery in needed_shard_keys],
+      namespace=settings.memcache_namespace)
+  cached_search_limit_reached_dict = memcache.get_multi(
+      ['%s;%s;%s;search_limit_reached;%d' % (
+          limit_reached_key_prefix, subquery, sd_str, sid)
+       for sid, subquery in needed_shard_keys],
+      namespace=settings.memcache_namespace)
+
+  unfiltered_dict = {}
+  search_limit_reached_dict = {}
+  for shard_key in needed_shard_keys:
+    shard_id, subquery = shard_key
+    memcache_key = '%s;%s;%s;%d' % (
+        memcache_key_prefix, subquery, sd_str, shard_id)
+    limit_reached_key = '%s;%s;%s;search_limit_reached;%d' % (
+        limit_reached_key_prefix, subquery, sd_str, shard_id)
+    if memcache_key not in cached_dict:
+      logging.info('memcache miss on shard %r', shard_key)
+      continue
+
+    cached_iids, cached_ts = cached_dict[memcache_key]
+    if cached_search_limit_reached_dict.get(limit_reached_key):
+      search_limit_reached, _ = cached_search_limit_reached_dict[
+          limit_reached_key]
+    else:
+      search_limit_reached = False
+
+    stale = False
+    if query_project_ids:
+      for project_id in query_project_ids:
+        modified_ts = project_shard_timestamps.get((project_id, shard_id))
+        if modified_ts is None or modified_ts > cached_ts:
+          stale = True
+          logging.info('memcache too stale on shard %r because of %r',
+                       shard_id, project_id)
+          break
+    else:
+      modified_ts = project_shard_timestamps.get(('all', shard_id))
+      if modified_ts is None or modified_ts > cached_ts:
+        stale = True
+        logging.info('memcache too stale on shard %r because of all',
+                     shard_id)
+
+    if not stale:
+      unfiltered_dict[shard_key] = cached_iids
+      search_limit_reached_dict[shard_key] = search_limit_reached
+
+  return unfiltered_dict, search_limit_reached_dict
+
+
+def _MakeBackendRequestHeaders(failfast):
+  headers = {
+    # This is needed to allow frontends to talk to backends without going
+    # through a login screen on googleplex.com.
+    # http://wiki/Main/PrometheusInternal#Internal_Applications_and_APIs
+    'X-URLFetch-Service-Id': 'GOOGLEPLEX',
+    }
+  if failfast:
+    headers['X-AppEngine-FailFast'] = 'Yes'
+  return headers
+
+
+def _StartBackendSearchCall(
+    query_project_names,
+    shard_key,
+    invalidation_timestep,
+    me_user_ids,
+    logged_in_user_id,
+    new_url_num,
+    can=None,
+    sort_spec=None,
+    group_by_spec=None,
+    deadline=None,
+    failfast=True):
+  # type: (Sequence[str], Tuple(int, str), int, Sequence[int], int,
+  #     int, str, str, int, bool) ->
+  #     google.appengine.api.apiproxy_stub_map.UserRPC
+  """Ask a backend to query one shard of the database.
+
+  Args:
+    query_project_names: List of project names queried.
+    shard_key: Tuple specifying which DB shard to query.
+    invalidation_timestep: int timestep to use keep cached items fresh.
+    me_user_ids: Empty list when no user is logged in, or user ID of the logged
+        in user when doing an interactive search, or the viewed user ID when
+        viewing someone else's dashboard, or the subscribing user's ID when
+        evaluating subscriptions.  And, any linked accounts.
+    logged_in_user_id: Id of the logged in user.
+    new_url_num: the number of issues for BackendSearchPipeline to query.
+        Computed based on pagination offset + number of items per page.
+    can: Id of th canned query to use.
+    sort_spec: Str specifying how issues should be sorted.
+    group_by_spec: Str specifying how issues should be grouped.
+    deadline: Max time for the RPC to take before failing.
+    failfast: Whether to set the X-AppEngine-FailFast request header.
+
+  Returns:
+    UserRPC for the created RPC call.
+  """
+  shard_id, subquery = shard_key
+  backend_host = modules.get_hostname(module='besearch')
+  url = 'http://%s%s' % (
+      backend_host,
+      framework_helpers.FormatURL(
+          [],
+          urls.BACKEND_SEARCH,
+          projects=','.join(query_project_names),
+          q=subquery,
+          start=0,
+          num=new_url_num,
+          can=can,
+          sort=sort_spec,
+          groupby=group_by_spec,
+          logged_in_user_id=logged_in_user_id,
+          me_user_ids=','.join(str(uid) for uid in me_user_ids),
+          shard_id=shard_id,
+          invalidation_timestep=invalidation_timestep))
+  logging.info('\n\nCalling backend: %s', url)
+  rpc = urlfetch.create_rpc(
+      deadline=deadline or settings.backend_deadline)
+  headers = _MakeBackendRequestHeaders(failfast)
+  # follow_redirects=False is needed to avoid a login screen on googleplex.
+  urlfetch.make_fetch_call(rpc, url, follow_redirects=False, headers=headers)
+  return rpc
+
+
+def _StartBackendNonviewableCall(
+    project_id, logged_in_user_id, shard_id, invalidation_timestep,
+    deadline=None, failfast=True):
+  """Ask a backend to query one shard of the database."""
+  backend_host = modules.get_hostname(module='besearch')
+  url = 'http://%s%s' % (backend_host, framework_helpers.FormatURL(
+      None, urls.BACKEND_NONVIEWABLE,
+      project_id=project_id or '',
+      logged_in_user_id=logged_in_user_id or '',
+      shard_id=shard_id,
+      invalidation_timestep=invalidation_timestep))
+  logging.info('Calling backend nonviewable: %s', url)
+  rpc = urlfetch.create_rpc(deadline=deadline or settings.backend_deadline)
+  headers = _MakeBackendRequestHeaders(failfast)
+  # follow_redirects=False is needed to avoid a login screen on googleplex.
+  urlfetch.make_fetch_call(rpc, url, follow_redirects=False, headers=headers)
+  return rpc
+
+
+def _HandleBackendSearchResponse(
+    query_project_names, rpc_tuple, rpc_tuples, remaining_retries,
+    unfiltered_iids, search_limit_reached, invalidation_timestep,
+    error_responses, me_user_ids, logged_in_user_id, new_url_num, can,
+    sort_spec, group_by_spec):
+  # type: (Sequence[str], Tuple(int, Tuple(int, str),
+  #         google.appengine.api.apiproxy_stub_map.UserRPC),
+  #     Sequence[Tuple(int, Tuple(int, str),
+  #         google.appengine.api.apiproxy_stub_map.UserRPC)],
+  #     int, Mapping[Tuple(int, str), Sequence[int]],
+  #     Mapping[Tuple(int, str), bool], int, Collection[Tuple(int, str)],
+  #     Sequence[int], int, int, int, str, str) -> None
+  #
+  """Process one backend response and retry if there was an error.
+
+  SIDE EFFECTS: This function edits many of the passed in parameters in place.
+    For example, search_limit_reached and unfiltered_iids are updated with
+    response data from the RPC, keyed by shard_key.
+
+  Args:
+    query_project_names: List of projects to query.
+    rpc_tuple: Tuple containing an RPC response object, the time it happened,
+      and what shard the RPC was queried against.
+    rpc_tuples: List of RPC responses to mutate with any retry responses that
+      heppened.
+    remaining_retries: Number of times left to retry.
+    unfiltered_iids: Dict of Issue ids, before they've been filtered by
+      permissions.
+    search_limit_reached: Dict of whether the search limit for a particular
+      shard has been hit.
+    invalidation_timestep: int timestep to use keep cached items fresh.
+    error_responses:
+    me_user_ids: List of relevant user IDs. ie: the currently logged in user
+      and linked account IDs if applicable.
+    logged_in_user_id: Logged in user's ID.
+    new_url_num: the number of issues for BackendSearchPipeline to query.
+        Computed based on pagination offset + number of items per page.
+    can: Canned query ID to use.
+    sort_spec: str specifying how issues should be sorted.
+    group_by_spec: str specifying how issues should be grouped.
+  """
+  start_time, shard_key, rpc = rpc_tuple
+  duration_sec = time.time() - start_time
+
+  try:
+    response = rpc.get_result()
+    logging.info('call to backend took %d sec', duration_sec)
+    # Note that response.content has "})]'\n" prepended to it.
+    json_content = response.content[5:]
+    logging.info('got json text: %r length %r',
+                 json_content[:framework_constants.LOGGING_MAX_LENGTH],
+                 len(json_content))
+    if json_content == '':
+      raise Exception('Fast fail')
+    json_data = json.loads(json_content)
+    unfiltered_iids[shard_key] = json_data['unfiltered_iids']
+    search_limit_reached[shard_key] = json_data['search_limit_reached']
+    if json_data.get('error'):
+      # Don't raise an exception, just log, because these errors are more like
+      # 400s than 500s, and shouldn't be retried.
+      logging.error('Backend shard %r returned error "%r"' % (
+          shard_key, json_data.get('error')))
+      error_responses.add(shard_key)
+
+  except Exception as e:
+    if duration_sec > FAIL_FAST_LIMIT_SEC:  # Don't log fail-fast exceptions.
+      logging.exception(e)
+    if not remaining_retries:
+      logging.error('backend search retries exceeded')
+      error_responses.add(shard_key)
+      return  # Used all retries, so give up.
+
+    if duration_sec >= settings.backend_deadline:
+      logging.error('backend search on %r took too long', shard_key)
+      error_responses.add(shard_key)
+      return  # That backend shard is overloaded, so give up.
+
+    logging.error('backend call for shard %r failed, retrying', shard_key)
+    retry_rpc = _StartBackendSearchCall(
+        query_project_names,
+        shard_key,
+        invalidation_timestep,
+        me_user_ids,
+        logged_in_user_id,
+        new_url_num,
+        can=can,
+        sort_spec=sort_spec,
+        group_by_spec=group_by_spec,
+        failfast=remaining_retries > 2)
+    retry_rpc_tuple = (time.time(), shard_key, retry_rpc)
+    retry_rpc.callback = _MakeBackendCallback(
+        _HandleBackendSearchResponse, query_project_names, retry_rpc_tuple,
+        rpc_tuples, remaining_retries - 1, unfiltered_iids,
+        search_limit_reached, invalidation_timestep, error_responses,
+        me_user_ids, logged_in_user_id, new_url_num, can, sort_spec,
+        group_by_spec)
+    rpc_tuples.append(retry_rpc_tuple)
+
+
+def _HandleBackendNonviewableResponse(
+    project_id, logged_in_user_id, shard_id, rpc_tuple, rpc_tuples,
+    remaining_retries, nonviewable_iids, invalidation_timestep):
+  """Process one backend response and retry if there was an error."""
+  start_time, shard_id, rpc = rpc_tuple
+  duration_sec = time.time() - start_time
+
+  try:
+    response = rpc.get_result()
+    logging.info('call to backend nonviewable took %d sec', duration_sec)
+    # Note that response.content has "})]'\n" prepended to it.
+    json_content = response.content[5:]
+    logging.info('got json text: %r length %r',
+                 json_content[:framework_constants.LOGGING_MAX_LENGTH],
+                 len(json_content))
+    if json_content == '':
+      raise Exception('Fast fail')
+    json_data = json.loads(json_content)
+    nonviewable_iids[shard_id] = set(json_data['nonviewable'])
+
+  except Exception as e:
+    if duration_sec > FAIL_FAST_LIMIT_SEC:  # Don't log fail-fast exceptions.
+      logging.exception(e)
+
+    if not remaining_retries:
+      logging.warn('Used all retries, so give up on shard %r', shard_id)
+      return
+
+    if duration_sec >= settings.backend_deadline:
+      logging.error('nonviewable call on %r took too long', shard_id)
+      return  # That backend shard is overloaded, so give up.
+
+    logging.error(
+      'backend nonviewable call for shard %r;%r;%r failed, retrying',
+      project_id, logged_in_user_id, shard_id)
+    retry_rpc = _StartBackendNonviewableCall(
+        project_id, logged_in_user_id, shard_id, invalidation_timestep,
+        failfast=remaining_retries > 2)
+    retry_rpc_tuple = (time.time(), shard_id, retry_rpc)
+    retry_rpc.callback = _MakeBackendCallback(
+        _HandleBackendNonviewableResponse, project_id, logged_in_user_id,
+        shard_id, retry_rpc_tuple, rpc_tuples, remaining_retries - 1,
+        nonviewable_iids, invalidation_timestep)
+    rpc_tuples.append(retry_rpc_tuple)
+
+
+def _TotalLength(sharded_iids):
+  """Return the total length of all issue_iids lists."""
+  return sum(len(issue_iids) for issue_iids in sharded_iids.values())
+
+
+def _ReverseShards(sharded_iids):
+  """Reverse each issue_iids list in place."""
+  for shard_key in sharded_iids:
+    sharded_iids[shard_key].reverse()
+
+
+def _TrimEndShardedIIDs(sharded_iids, sample_iid_tuples, num_needed):
+  """Trim the IIDs to keep at least num_needed items.
+
+  Args:
+    sharded_iids: dict {shard_key: issue_id_list} for search results.  This is
+        modified in place to remove some trailing issue IDs.
+    sample_iid_tuples: list of (iid, shard_key) from a sorted list of sample
+        issues.
+    num_needed: int minimum total number of items to keep.  Some IIDs that are
+        known to belong in positions > num_needed will be trimmed off.
+
+  Returns:
+    The total number of IIDs removed from the IID lists.
+  """
+  # 1. Get (sample_iid, position_in_shard) for each sample.
+  sample_positions = _CalcSamplePositions(sharded_iids, sample_iid_tuples)
+
+  # 2. Walk through the samples, computing a combined lower bound at each
+  # step until we know that we have passed at least num_needed IIDs.
+  lower_bound_per_shard = {}
+  excess_samples = []
+  for i in range(len(sample_positions)):
+    _sample_iid, sample_shard_key, pos = sample_positions[i]
+    lower_bound_per_shard[sample_shard_key] = pos
+    overall_lower_bound = sum(lower_bound_per_shard.values())
+    if overall_lower_bound >= num_needed:
+      excess_samples = sample_positions[i + 1:]
+      break
+  else:
+    return 0  # We went through all samples and never reached num_needed.
+
+  # 3. Truncate each shard at the first excess sample in that shard.
+  already_trimmed = set()
+  num_trimmed = 0
+  for _sample_iid, sample_shard_key, pos in excess_samples:
+    if sample_shard_key not in already_trimmed:
+      num_trimmed += len(sharded_iids[sample_shard_key]) - pos
+      sharded_iids[sample_shard_key] = sharded_iids[sample_shard_key][:pos]
+      already_trimmed.add(sample_shard_key)
+
+  return num_trimmed
+
+
+# TODO(jrobbins): Convert this to a python generator.
+def _CalcSamplePositions(sharded_iids, sample_iids):
+  """Return [(iid, shard_key, position_in_shard), ...] for each sample."""
+  # We keep track of how far index() has scanned in each shard to avoid
+  # starting over at position 0 when looking for the next sample in
+  # the same shard.
+  scan_positions = collections.defaultdict(lambda: 0)
+  sample_positions = []
+  for sample_iid, sample_shard_key in sample_iids:
+    try:
+      pos = sharded_iids.get(sample_shard_key, []).index(
+          sample_iid, scan_positions[sample_shard_key])
+      scan_positions[sample_shard_key] = pos
+      sample_positions.append((sample_iid, sample_shard_key, pos))
+    except ValueError:
+      pass
+
+  return sample_positions
+
+
+def _SortIssues(issues, config, users_by_id, group_by_spec, sort_spec):
+  """Sort the found issues based on the request and config values.
+
+  Args:
+    issues: A list of issues to be sorted.
+    config: A ProjectIssueConfig that could impact sort order.
+    users_by_id: dictionary {user_id: user_view,...} for all users who
+      participate in any issue in the entire list.
+    group_by_spec: string that lists the grouping order
+    sort_spec: string that lists the sort order
+
+
+  Returns:
+    A sorted list of issues, based on parameters from mr and config.
+  """
+  issues = sorting.SortArtifacts(
+      issues, config, tracker_helpers.SORTABLE_FIELDS,
+      tracker_helpers.SORTABLE_FIELDS_POSTPROCESSORS, group_by_spec,
+      sort_spec, users_by_id=users_by_id)
+  return issues
diff --git a/search/query2ast.py b/search/query2ast.py
new file mode 100644
index 0000000..235f9b3
--- /dev/null
+++ b/search/query2ast.py
@@ -0,0 +1,899 @@
+# 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
+
+"""A set of functions that integrate the GAE search index with Monorail."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import datetime
+import logging
+import re
+import time
+
+from google.appengine.api import search
+
+from proto import ast_pb2
+from proto import tracker_pb2
+
+
+# TODO(jrobbins): Consider re-implementing this whole file by using a
+# BNF syntax specification and a parser generator or library.
+
+# encodings
+UTF8 = 'utf-8'
+
+# Operator used for OR statements.
+OR_SYMBOL = ' OR '
+
+# Token types used for parentheses parsing.
+SUBQUERY = ast_pb2.TokenType.SUBQUERY
+LEFT_PAREN = ast_pb2.TokenType.LEFT_PAREN
+RIGHT_PAREN = ast_pb2.TokenType.RIGHT_PAREN
+OR = ast_pb2.TokenType.OR
+
+# Field types and operators
+BOOL = tracker_pb2.FieldTypes.BOOL_TYPE
+DATE = tracker_pb2.FieldTypes.DATE_TYPE
+NUM = tracker_pb2.FieldTypes.INT_TYPE
+TXT = tracker_pb2.FieldTypes.STR_TYPE
+APPROVAL = tracker_pb2.FieldTypes.APPROVAL_TYPE
+
+EQ = ast_pb2.QueryOp.EQ
+NE = ast_pb2.QueryOp.NE
+LT = ast_pb2.QueryOp.LT
+GT = ast_pb2.QueryOp.GT
+LE = ast_pb2.QueryOp.LE
+GE = ast_pb2.QueryOp.GE
+TEXT_HAS = ast_pb2.QueryOp.TEXT_HAS
+NOT_TEXT_HAS = ast_pb2.QueryOp.NOT_TEXT_HAS
+IS_DEFINED = ast_pb2.QueryOp.IS_DEFINED
+IS_NOT_DEFINED = ast_pb2.QueryOp.IS_NOT_DEFINED
+KEY_HAS = ast_pb2.QueryOp.KEY_HAS
+
+# Mapping from user query comparison operators to our internal representation.
+OPS = {
+    ':': TEXT_HAS,
+    '=': EQ,
+    '!=': NE,
+    '<': LT,
+    '>': GT,
+    '<=': LE,
+    '>=': GE,
+}
+
+# When the query has a leading minus, switch the operator for its opposite.
+NEGATED_OPS = {
+    EQ: NE,
+    NE: EQ,
+    LT: GE,
+    GT: LE,
+    LE: GT,
+    GE: LT,
+    TEXT_HAS: NOT_TEXT_HAS,
+    # IS_DEFINED is handled separately.
+    }
+
+# This is a partial regular expression that matches all of our comparison
+# operators, such as =, 1=, >, and <.  Longer ones listed first so that the
+# shorter ones don't cause premature matches.
+OPS_PATTERN = '|'.join(
+    map(re.escape, sorted(list(OPS.keys()), key=lambda op: -len(op))))
+
+# This RE extracts search terms from a subquery string.
+TERM_RE = re.compile(
+    r'(-?"[^"]+")|'  # E.g., ["division by zero"]
+    r'(\S+(%s)[^ "]+)|'  # E.g., [stars>10]
+    r'(\w+(%s)"[^"]+")|'  # E.g., [summary:"memory leak"]
+    r'(-?[._\*\w][-._\*\w]+)'  # E.g., [-workaround]
+    % (OPS_PATTERN, OPS_PATTERN), flags=re.UNICODE)
+
+# This RE is used to further decompose a comparison term into prefix, op, and
+# value.  E.g., [stars>10] or [is:open] or [summary:"memory leak"].  The prefix
+# can include a leading "-" to negate the comparison.
+OP_RE = re.compile(
+    r'^(?P<prefix>[-_.\w]*?)'
+    r'(?P<op>%s)'
+    r'(?P<value>([-@\w][-\*,./:<=>@\w]*|"[^"]*"))$' %
+    OPS_PATTERN,
+    flags=re.UNICODE)
+
+
+# Predefined issue fields passed to the query parser.
+_ISSUE_FIELDS_LIST = [
+    (ast_pb2.ANY_FIELD, TXT),
+    ('attachment', TXT),  # attachment file names
+    ('attachments', NUM),  # number of attachment files
+    ('blocked', BOOL),
+    ('blockedon', TXT),
+    ('blockedon_id', NUM),
+    ('blocking', TXT),
+    ('blocking_id', NUM),
+    ('cc', TXT),
+    ('cc_id', NUM),
+    ('comment', TXT),
+    ('commentby', TXT),
+    ('commentby_id', NUM),
+    ('component', TXT),
+    ('component_id', NUM),
+    ('description', TXT),
+    ('gate', TXT),
+    ('hotlist', TXT),
+    ('hotlist_id', NUM),
+    ('id', NUM),
+    ('is_spam', BOOL),
+    ('label', TXT),
+    ('label_id', NUM),
+    ('mergedinto', NUM),
+    ('mergedinto_id', NUM),
+    ('open', BOOL),
+    ('owner', TXT),
+    ('ownerbouncing', BOOL),
+    ('owner_id', NUM),
+    ('project', TXT),
+    ('reporter', TXT),
+    ('reporter_id', NUM),
+    ('spam', BOOL),
+    ('stars', NUM),
+    ('starredby', TXT),
+    ('starredby_id', NUM),
+    ('status', TXT),
+    ('status_id', NUM),
+    ('summary', TXT),
+    ]
+
+_DATE_FIELDS = (
+    'closed',
+    'modified',
+    'opened',
+    'ownermodified',
+    'ownerlastvisit',
+    'statusmodified',
+    'componentmodified',
+    )
+
+# Add all _DATE_FIELDS to _ISSUE_FIELDS_LIST.
+_ISSUE_FIELDS_LIST.extend((date_field, DATE) for date_field in _DATE_FIELDS)
+
+_DATE_FIELD_SUFFIX_TO_OP = {
+    '-after': '>',
+    '-before': '<',
+}
+
+SET_BY_SUFFIX = '-by'
+SET_ON_SUFFIX = '-on'
+APPROVER_SUFFIX = '-approver'
+STATUS_SUFFIX = '-status'
+
+_APPROVAL_SUFFIXES = (
+    SET_BY_SUFFIX,
+    SET_ON_SUFFIX,
+    APPROVER_SUFFIX,
+    STATUS_SUFFIX,
+)
+
+BUILTIN_ISSUE_FIELDS = {
+    f_name: tracker_pb2.FieldDef(field_name=f_name, field_type=f_type)
+    for f_name, f_type in _ISSUE_FIELDS_LIST}
+
+
+# Do not treat strings that start with the below as key:value search terms.
+# See bugs.chromium.org/p/monorail/issues/detail?id=419 for more detail.
+NON_OP_PREFIXES = (
+    'http:',
+    'https:',
+)
+
+
+def ParseUserQuery(
+    query, scope, builtin_fields, harmonized_config, warnings=None,
+    now=None):
+  # type: (str, str, Mapping[str, proto.tracker_pb2.FieldDef],
+  #   proto.tracker_pb2.ProjectIssueConfig, Sequence[str], int) ->
+  #     proto.ast_pb2.QueryAST
+  """Parse a user query and return a set of structure terms.
+
+  Args:
+    query: string with user's query.  E.g., 'Priority=High'.
+    scope: string search terms that define the scope in which the
+        query should be executed.  They are expressed in the same
+        user query language.  E.g., adding the canned query.
+    builtin_fields: dict {field_name: FieldDef(field_name, type)}
+        mapping field names to FieldDef objects for built-in fields.
+    harmonized_config: config for all the projects being searched.
+        @@@ custom field name is not unique in cross project search.
+         - custom_fields = {field_name: [fd, ...]}
+         - query build needs to OR each possible interpretation
+         - could be label in one project and field in another project.
+        @@@ what about searching across all projects?
+    warnings: optional list to accumulate warning messages.
+    now: optional timestamp for tests, otherwise time.time() is used.
+
+  Returns:
+    A QueryAST with conjunctions (usually just one), where each has a list of
+    Condition PBs with op, fields, str_values and int_values.  E.g., the query
+    [priority=high leak OR stars>100] over open issues would return
+    QueryAST(
+      Conjunction(Condition(EQ, [open_fd], [], [1]),
+                  Condition(EQ, [label_fd], ['priority-high'], []),
+                  Condition(TEXT_HAS, any_field_fd, ['leak'], [])),
+      Conjunction(Condition(EQ, [open_fd], [], [1]),
+                  Condition(GT, [stars_fd], [], [100])))
+
+  Raises:
+    InvalidQueryError: If a problem was detected in the user's query.
+  """
+  if warnings is None:
+    warnings = []
+
+  # Convert the overall query into one or more OR'd subqueries.
+  subqueries = QueryToSubqueries(query)
+
+  # Make a dictionary of all fields: built-in + custom in each project.
+  combined_fields = collections.defaultdict(
+      list, {field_name: [field_def]
+             for field_name, field_def in builtin_fields.items()})
+  for fd in harmonized_config.field_defs:
+    if fd.field_type != tracker_pb2.FieldTypes.ENUM_TYPE:
+      # Only do non-enum fields because enums are stored as labels
+      combined_fields[fd.field_name.lower()].append(fd)
+      if fd.field_type == APPROVAL:
+        for approval_suffix in _APPROVAL_SUFFIXES:
+          combined_fields[fd.field_name.lower() + approval_suffix].append(fd)
+
+  conjunctions = [
+      _ParseConjunction(sq, scope, combined_fields, warnings, now=now)
+      for sq in subqueries]
+  return ast_pb2.QueryAST(conjunctions=conjunctions)
+
+
+def _ParseConjunction(subquery, scope, fields, warnings, now=None):
+  # type: (str, str, Mapping[str, proto.tracker_pb2.FieldDef], Sequence[str],
+  #     int) -> proto.ast_pb2.Condition
+  """Parse part of a user query into a Conjunction PB."""
+  scoped_query = ('%s %s' % (scope, subquery)).lower()
+  cond_strs = _ExtractConds(scoped_query, warnings)
+  conds = [_ParseCond(cond_str, fields, warnings, now=now)
+           for cond_str in cond_strs]
+  conds = [cond for cond in conds if cond]
+  return ast_pb2.Conjunction(conds=conds)
+
+
+def _ParseCond(cond_str, fields, warnings, now=None):
+  # type: (str, Mapping[str, proto.tracker_pb2.FieldDef], Sequence[str],
+  #     int) -> proto.ast_pb2.Condition
+  """Parse one user query condition string into a Condition PB."""
+  op_match = OP_RE.match(cond_str)
+  # Do not treat as key:value search terms if any of the special prefixes match.
+  special_prefixes_match = any(
+      cond_str.startswith(p) for p in NON_OP_PREFIXES)
+  if op_match and not special_prefixes_match:
+    prefix = op_match.group('prefix')
+    op = op_match.group('op')
+    val = op_match.group('value')
+    # Special case handling to continue to support old date query terms from
+    # code.google.com. See monorail:151 for more details.
+    if prefix.startswith(_DATE_FIELDS):
+      for date_suffix in _DATE_FIELD_SUFFIX_TO_OP:
+        if prefix.endswith(date_suffix):
+          prefix = prefix.rstrip(date_suffix)
+          op = _DATE_FIELD_SUFFIX_TO_OP[date_suffix]
+    return _ParseStructuredTerm(prefix, op, val, fields, now=now)
+
+  # Treat the cond as a full-text search term, which might be negated.
+  if cond_str.startswith('-'):
+    op = NOT_TEXT_HAS
+    cond_str = cond_str[1:]
+  else:
+    op = TEXT_HAS
+
+  # Construct a full-text Query object as a dry-run to validate that
+  # the syntax is acceptable.
+  try:
+    _fts_query = search.Query(cond_str)
+  except search.QueryError:
+    warnings.append('Ignoring full-text term: %s' % cond_str)
+    return None
+
+  # Flag a potential user misunderstanding.
+  if cond_str.lower() in ('and', 'or', 'not'):
+    warnings.append(
+        'The only supported boolean operator is OR (all capitals).')
+
+  return ast_pb2.MakeCond(
+      op, [BUILTIN_ISSUE_FIELDS[ast_pb2.ANY_FIELD]], [cond_str], [])
+
+
+def _ParseStructuredTerm(prefix, op_str, value, fields, now=None):
+  # type: (str, str, str, Mapping[str, proto.tracker_pb2.FieldDef]) ->
+  #     proto.ast_pb2.Condition
+  """Parse one user structured query term into an internal representation.
+
+  Args:
+    prefix: The query operator, usually a field name.  E.g., summary. It can
+      also be special operators like "is" to test boolean fields.
+    op_str: the comparison operator.  Usually ":" or "=", but can be any OPS.
+    value: the value to compare against, e.g., term to find in that field.
+    fields: dict {name_lower: [FieldDef, ...]} for built-in and custom fields.
+    now: optional timestamp for tests, otherwise time.time() is used.
+
+  Returns:
+    A Condition PB.
+  """
+  unquoted_value = value.strip('"')
+  # Quick-OR is a convenient way to write one condition that matches any one of
+  # multiple values, like set membership.  E.g., [Priority=High,Critical].
+  # Ignore empty values caused by duplicated or trailing commas. E.g.,
+  # [Priority=High,,Critical,] is equivalent to [Priority=High,Critical].
+  quick_or_vals = [v.strip() for v in unquoted_value.split(',') if v.strip()]
+
+  op = OPS[op_str]
+  negate = False
+  if prefix.startswith('-'):
+    negate = True
+    op = NEGATED_OPS.get(op, op)
+    prefix = prefix[1:]
+
+  if prefix == 'is' and unquoted_value in [
+      'open', 'blocked', 'spam', 'ownerbouncing']:
+    return ast_pb2.MakeCond(
+        NE if negate else EQ, fields[unquoted_value], [], [])
+
+  # Search entries with or without any value in the specified field.
+  if prefix == 'has':
+    op = IS_NOT_DEFINED if negate else IS_DEFINED
+    if '.' in unquoted_value:  # Possible search for phase field with any value.
+      phase_name, possible_field = unquoted_value.split('.', 1)
+      if possible_field in fields:
+        return ast_pb2.MakeCond(
+            op, fields[possible_field], [], [], phase_name=phase_name)
+    elif unquoted_value in fields:  # Look for that field with any value.
+      return ast_pb2.MakeCond(op, fields[unquoted_value], [], [])
+    else:  # Look for any label with that prefix.
+      return ast_pb2.MakeCond(op, fields['label'], [unquoted_value], [])
+
+  # Search entries with certain gates.
+  if prefix == 'gate':
+    return ast_pb2.MakeCond(op, fields['gate'], quick_or_vals, [])
+
+  # Determine hotlist query type.
+  # If prefix is not 'hotlist', quick_or_vals is empty, or qov
+  # does not contain ':', is_fields will remain True
+  is_fields = True
+  if prefix == 'hotlist':
+    try:
+      if ':' not in quick_or_vals[0]:
+        is_fields = False
+    except IndexError:
+      is_fields = False
+
+  phase_name = None
+  if '.' in prefix and is_fields:
+    split_prefix = prefix.split('.', 1)
+    if split_prefix[1] in fields:
+      phase_name, prefix = split_prefix
+
+  # search built-in and custom fields. E.g., summary.
+  if prefix in fields and is_fields:
+    # Note: if first matching field is date-type, we assume they all are.
+    # TODO(jrobbins): better handling for rare case where multiple projects
+    # define the same custom field name, and one is a date and another is not.
+    first_field = fields[prefix][0]
+    if first_field.field_type == DATE:
+      date_values = [_ParseDateValue(val, now=now) for val in quick_or_vals]
+      return ast_pb2.MakeCond(op, fields[prefix], [], date_values)
+    elif first_field.field_type == APPROVAL and prefix.endswith(SET_ON_SUFFIX):
+      date_values = [_ParseDateValue(val, now=now) for val in quick_or_vals]
+      return ast_pb2.MakeCond(
+          op,
+          fields[prefix], [],
+          date_values,
+          key_suffix=SET_ON_SUFFIX,
+          phase_name=phase_name)
+    else:
+      quick_or_ints = []
+      for qov in quick_or_vals:
+        try:
+          quick_or_ints.append(int(qov))
+        except ValueError:
+          pass
+      if first_field.field_type == APPROVAL:
+        for approval_suffix in _APPROVAL_SUFFIXES:
+          if prefix.endswith(approval_suffix):
+            return ast_pb2.MakeCond(op, fields[prefix], quick_or_vals,
+                                    quick_or_ints, key_suffix=approval_suffix,
+                                    phase_name=phase_name)
+      return ast_pb2.MakeCond(op, fields[prefix], quick_or_vals,
+                              quick_or_ints, phase_name=phase_name)
+
+  # Since it is not a field, treat it as labels, E.g., Priority.
+  quick_or_labels = ['%s-%s' % (prefix, v) for v in quick_or_vals]
+  # Convert substring match to key-value match if user typed 'foo:bar'.
+  if op == TEXT_HAS:
+    op = KEY_HAS
+  return ast_pb2.MakeCond(op, fields['label'], quick_or_labels, [])
+
+
+def _ExtractConds(query, warnings):
+  # type: (str, Sequence[str]) -> Sequence[str]
+  """Parse a query string into a list of individual condition strings.
+
+  Args:
+    query: UTF-8 encoded search query string.
+    warnings: list to accumulate warning messages.
+
+  Returns:
+    A list of query condition strings.
+  """
+  # Convert to unicode then search for distinct terms.
+  term_matches = TERM_RE.findall(query)
+
+  terms = []
+  for (phrase, word_label, _op1, phrase_label, _op2,
+       word) in term_matches:
+    # Case 1: Quoted phrases, e.g., ["hot dog"].
+    if phrase_label or phrase:
+      terms.append(phrase_label or phrase)
+
+    # Case 2: Comparisons
+    elif word_label:
+      special_prefixes_match = any(
+          word_label.startswith(p) for p in NON_OP_PREFIXES)
+      match = OP_RE.match(word_label)
+      if match and not special_prefixes_match:
+        label = match.group('prefix')
+        op = match.group('op')
+        word = match.group('value')
+        terms.append('%s%s"%s"' % (label, op, word))
+      else:
+        # It looked like a key:value cond, but not exactly, so treat it
+        # as fulltext search.  It is probably a tiny bit of source code.
+        terms.append('"%s"' % word_label)
+
+    # Case 3: Simple words.
+    elif word:
+      terms.append(word)
+
+    else:  # pragma: no coverage
+      warnings.append('Unparsable search term')
+
+  return terms
+
+
+def _ParseDateValue(val, now=None):
+  # type: (str, int) -> int
+  """Convert the user-entered date into timestamp."""
+  # Support timestamp value such as opened>1437671476
+  try:
+    return int(val)
+  except ValueError:
+    pass
+
+  # TODO(jrobbins): future: take timezones into account.
+  # TODO(jrobbins): for now, explain to users that "today" is
+  # actually now: the current time, not 12:01am in their timezone.
+  # In fact, it is not very useful because everything in the system
+  # happened before the current time.
+  if val == 'today':
+    return _CalculatePastDate(0, now=now)
+  elif val.startswith('today-'):
+    try:
+      days_ago = int(val.split('-')[1])
+    except ValueError:
+      raise InvalidQueryError('Could not parse date: ' + val)
+    return _CalculatePastDate(days_ago, now=now)
+
+  try:
+    if '/' in val:
+      year, month, day = [int(x) for x in val.split('/')]
+    elif '-' in val:
+      year, month, day = [int(x) for x in val.split('-')]
+    else:
+      raise InvalidQueryError('Could not parse date: ' + val)
+  except ValueError:
+    raise InvalidQueryError('Could not parse date: ' + val)
+
+  try:
+    return int(time.mktime(datetime.datetime(year, month, day).timetuple()))
+  except ValueError:
+    raise InvalidQueryError('Could not parse date: ' + val)
+
+
+def _CalculatePastDate(days_ago, now=None):
+  # type: (int, int) -> int
+  """Calculates the timestamp N days ago from now."""
+  if now is None:
+    now = int(time.time())
+  ts = now - days_ago * 24 * 60 * 60
+  return ts
+
+
+def QueryToSubqueries(query):
+  # type (str) -> Sequence[str]
+  """Splits a query into smaller queries based on Monorail's search syntax.
+
+  This function handles parsing parentheses and OR statements in Monorail's
+  search syntax. By doing this parsing for OR statements and parentheses up
+  front in FrontendSearchPipeline, we are able to convert complex queries
+  with lots of ORs into smaller, more easily cacheable query terms.
+
+  These outputted subqueries should collectively return the same query results
+  as the initial input query without containing any ORs or parentheses,
+  allowing later search layers to parse queries without worrying about ORs
+  or parentheses.
+
+  Some examples of possible queries and their expected output:
+
+  - '(A OR B) (C OR D) OR (E OR F)' -> ['A C', 'A D', 'B C', 'B D', 'E', 'F']
+  - '(A) OR (B)' -> ['A', 'B']
+  - '(A ((C) OR (D OR (E OR F))))' -> ['A C', 'A D', 'A E', 'A F']
+
+  Where A, B, C, D, etc could be any list of conjunctions. ie: "owner:me",
+  "Pri=1", "hello world Hotlist=test", "label!=a11y", etc
+
+  Note: Monorail implicitly ANDs any query terms separated by a space. For
+  the most part, AND functionality is handled at a later layer in search
+  processing. However, this case becomes important here when considering the
+  fact that a prentheses group can either be ANDed or ORed with terms that
+  surround it.
+
+  The _MultiplySubqueries helper is used to AND the results of different
+  groups together whereas concatenating lists is used to OR subqueries
+  together.
+
+  Args:
+    query: The initial query that was sent to the search.
+
+  Returns:
+    List of query fragments to be independently processed as search terms.
+
+  Raises:
+    InvalidQueryError if parentheses are unmatched.
+  """
+  tokens = _ValidateAndTokenizeQuery(query)
+
+  # Using an iterator allows us to keep our current loop position across
+  # helpers. This makes recursion a lot easier.
+  token_iterator = PeekIterator(tokens)
+
+  subqueries = _ParseQuery(token_iterator)
+
+  if not len(subqueries):
+    # Several cases, such as an empty query or a query with only parentheses
+    # will result in an empty set of subqueries. In these cases, we still want
+    # to give the search pipeline a single empty query to process.
+    return ['']
+
+  return subqueries
+
+
+def _ParseQuery(token_iterator):
+  # type (Sequence[proto.ast_pb2.QueryToken]) -> Sequence[str]
+  """Recursive helper to convert query tokens into a list of subqueries.
+
+  Parses a Query based on the following grammar (EBNF):
+
+    Query             := OrGroup { [OrOperator] OrGroup }
+    OrGroup           := AndGroup { AndGroup }
+    AndGroup          := Subquery | ParenthesesGroup
+    ParenthesesGroup  := "(" Query ")"
+    Subquery          := /.+/
+    OrOperator        := " OR "
+
+  An important nuance is that two groups can be next to each other, separated
+  only by a word boundary (ie: space or parentheses). In this case, they are
+  implicitly ANDed. In practice, because unparenthesized fragments ANDed by
+  spaces are stored as single tokens, we only need to handle the AND case when
+  a parentheses group is implicitly ANDed with an adjacent group.
+
+  Order of precedence is implemented by recursing through OR groups before
+  recursing through AND groups.
+
+  Args:
+    token_iterator: Iterator over a list of query tokens.
+
+  Returns:
+    List of query fragments to be processed as search terms.
+
+  Raises:
+    InvalidQueryError if tokens were inputted in a format that does not follow
+    our search grammar.
+  """
+  subqueries = []
+  try:
+    if token_iterator.peek().token_type == OR:
+      # Edge case: Ignore empty OR groups at the starte of a ParenthesesGroup.
+      # ie: "(OR A)" will be processed as "A"
+      next(token_iterator)
+
+    subqueries = _ParseOrGroup(token_iterator)
+
+    while token_iterator.peek().token_type == OR:
+      # Consume the OR tokens without doing anything with it.
+      next(token_iterator)
+
+      next_token = token_iterator.peek()
+      if next_token.token_type == RIGHT_PAREN:
+        # Edge case: Ignore empty OR groups at the end of a ParenthesesGroup.
+        # ie: "(A OR)" will be processed as "A"
+        return subqueries
+
+      next_subqueries = _ParseOrGroup(token_iterator)
+
+      # Concatenate results of OR groups together.
+      subqueries = subqueries + next_subqueries
+
+  except StopIteration:
+    pass
+  # Return when we've reached the end of the string.
+  return subqueries
+
+
+def _ParseOrGroup(token_iterator):
+  # type (Sequence[proto.ast_pb2.QueryToken]) -> Sequence[str]
+  """Recursive helper to convert a single "OrGroup" into subqueries.
+
+  An OrGroup here is based on the following grammar:
+
+    Query             := OrGroup { [OrOperator] OrGroup }
+    OrGroup           := AndGroup { AndGroup }
+    AndGroup          := Subquery | ParenthesesGroup
+    ParenthesesGroup  := "(" Query ")"
+    Subquery          := /.+/
+    OrOperator        := " OR "
+
+  Args:
+    token_iterator: Iterator over a list of query tokens.
+
+  Returns:
+    List of query fragments to be processed as search terms.
+
+  Raises:
+    InvalidQueryError if tokens were inputted in a format that does not follow
+    our search grammar.
+  """
+  subqueries = _ParseAndGroup(token_iterator)
+
+  try:
+    # Iterate until there are no more AND groups left to see.
+    # Subquery or left parentheses are the possible starts of an AndGroup.
+    while (token_iterator.peek().token_type == SUBQUERY or
+           token_iterator.peek().token_type == LEFT_PAREN):
+
+      # Find subqueries from the next AND group.
+      next_subqueries = _ParseAndGroup(token_iterator)
+
+      # Multiply all results across AND groups together.
+      subqueries = _MultiplySubqueries(subqueries, next_subqueries)
+  except StopIteration:
+    pass
+
+  return subqueries
+
+
+def _ParseAndGroup(token_iterator):
+  # type (Sequence[proto.ast_pb2.QueryToken]) -> Sequence[str]
+  """Recursive helper to convert a single "AndGroup" into subqueries.
+
+  An OrGroup here is based on the following grammar:
+
+    Query             := OrGroup { [OrOperator] OrGroup }
+    OrGroup           := AndGroup { AndGroup }
+    AndGroup          := Subquery | ParenthesesGroup
+    ParenthesesGroup  := "(" Query ")"
+    Subquery          := /.+/
+    OrOperator        := " OR "
+
+  Args:
+    token_iterator: Iterator over a list of query tokens.
+
+  Returns:
+    List of query fragments to be processed as search terms.
+
+  Raises:
+    InvalidQueryError if tokens were inputted in a format that does not follow
+    our search grammar.
+  """
+  try:
+    token = next(token_iterator)
+    if token.token_type == LEFT_PAREN:
+      if token_iterator.peek().token_type == RIGHT_PAREN:
+        # Don't recurse into the ParenthesesGroup if there's nothing inside.
+        next(token_iterator)
+        return []
+
+      # Recurse into the ParenthesesGroup.
+      subqueries = _ParseQuery(token_iterator)
+
+      # Next token should be a right parenthesis.
+      next(token_iterator)
+
+      return subqueries
+    elif token.token_type == SUBQUERY:
+      return [token.value]
+    else:
+      # This should not happen if other QueryToSubqueries helpers are working
+      # properly.
+      raise InvalidQueryError('Inputted tokens do not follow grammar.')
+  except StopIteration:
+    pass
+  return []
+
+
+def _ValidateAndTokenizeQuery(query):
+  # type: (str) -> Sequence[proto.ast_pb2.QueryToken]
+  """Converts the input query into a set of tokens for easier parsing.
+
+  Tokenizing the query string before parsing allows us to not have to as many
+  string manipulations while parsing, which simplifies our later code.
+
+  Args:
+    query: Query to tokenize.
+
+  Returns:
+    List of Token objects for use in query processing.
+
+  Raises:
+    InvalidQueryError if parentheses are unmatched.
+  """
+  tokens = []  # Function result
+  count = 0  # Used for checking if parentheses are balanced
+  s = ''  # Records current string fragment. Cleared when a token is added.
+
+  for ch in query:
+    if ch == '(':
+      count += 1
+
+      # Add subquery from before we hit this parenthesis.
+      tokens.extend(_TokenizeSubqueryOnOr(s))
+      s = ''
+
+      tokens.append(ast_pb2.QueryToken(token_type=LEFT_PAREN))
+    elif ch == ')':
+      count -= 1
+
+      if count < 0:
+        # More closing parentheses then open parentheses.
+        raise InvalidQueryError('Search query has unbalanced parentheses.')
+
+      # Add subquery from before we hit this parenthesis.
+      tokens.extend(_TokenizeSubqueryOnOr(s))
+      s = ''
+
+      tokens.append(ast_pb2.QueryToken(token_type=RIGHT_PAREN))
+    else:
+      s += ch
+
+  if count != 0:
+    raise InvalidQueryError('Search query has unbalanced parentheses.')
+
+  # Add any trailing tokens.
+  tokens.extend(_TokenizeSubqueryOnOr(s))
+
+  return tokens
+
+
+def _TokenizeSubqueryOnOr(subquery):
+  # type: (str) -> Sequence[proto.ast_pb2.QueryToken]
+  """Helper to split a subquery by OR and convert the result into tokens.
+
+  Args:
+    subquery: A string without parentheses to tokenize.
+
+  Returns:
+    Tokens for the subquery with OR tokens separating query strings if
+    applicable.
+  """
+  if len(subquery) == 0:
+    return []
+
+  result = []
+  fragments = subquery.split(OR_SYMBOL)
+  for f in fragments:
+    # Interleave the string fragments with OR tokens.
+    result.append(ast_pb2.QueryToken(token_type=SUBQUERY, value=f.strip()))
+    result.append(ast_pb2.QueryToken(token_type=OR))
+
+  # Remove trailing OR.
+  result.pop()
+
+  # Trim empty strings at the beginning or end. ie: if subquery is ' OR ',
+  # we want the list to be ['OR'], not ['', 'OR', ''].
+  if len(result) > 1 and result[0].value == '':
+    result.pop(0)
+  if len(result) > 1 and result[-1].value == '':
+    result.pop()
+  return result
+
+
+def _MultiplySubqueries(a, b):
+  # type: (Sequence[str], Sequence[str]) -> Sequence[str]
+  """Helper to AND subqueries from two separate lists.
+
+  Args:
+    a: First list of subqueries.
+    b: Second list of subqueries.
+
+  Returns:
+    List with n x m subqueries.
+  """
+  if not len(a):
+    return b
+  if not len(b):
+    return a
+  res = []
+  for q1 in a:
+    for q2 in b:
+      # AND two subqueries together by concatenating them.
+      query = (q1.strip() + ' ' + q2.strip()).strip()
+      res.append(query)
+  return res
+
+
+class PeekIterator:
+  """Simple iterator with peek() functionality.
+
+  Used by QueryToSubqueries to maintain state easily across recursive calls.
+  """
+
+  def __init__(self, source):
+    # type: (Sequence[Any])
+    self.__source = source
+    self.__i = 0
+
+  def peek(self):
+    # type: () -> Any
+    """Gets the next value in the iterator without side effects.
+
+    Returns:
+      Next value in iterator.
+
+    Raises:
+      StopIteration if you're at the end of the iterator.
+    """
+    if self.__i >= len(self.__source):
+      raise StopIteration
+    return self.__source[self.__i]
+
+  def __iter__(self):
+    # type: () -> Sequence[Any]
+    """Return self to make iterator iterable."""
+    return self
+
+  def __repr__(self):
+    # type: () -> str
+    """Allow logging current iterator value for debugging."""
+    try:
+      return str(self.peek())
+    except StopIteration:
+      pass
+    return 'End of PeekIterator'
+
+  def next(self):
+    # type: () -> Any
+    """Gets the next value in the iterator and increments pointer.
+
+    Returns:
+      Next value in iterator.
+
+    Raises:
+      StopIteration if you're at the end of the iterator.
+    """
+    if self.__i >= len(self.__source):
+      raise StopIteration
+    value = self.__source[self.__i]
+    self.__i += 1
+    return value
+
+
+class Error(Exception):
+  """Base exception class for this package."""
+  pass
+
+
+class InvalidQueryError(Error):
+  """Error raised when an invalid query is requested."""
+  pass
diff --git a/search/search_helpers.py b/search/search_helpers.py
new file mode 100644
index 0000000..0b3beb8
--- /dev/null
+++ b/search/search_helpers.py
@@ -0,0 +1,41 @@
+# Copyright 2018 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+RESTRICT_VIEW_PATTERN = 'restrict-view-%'
+
+
+def GetPersonalAtRiskLabelIDs(
+  cnxn, user, config_svc, effective_ids, project, perms):
+  """Return list of label_ids for restriction labels that user can't view.
+
+  Args:
+    cnxn: An instance of MonorailConnection.
+    user: User PB for the signed in user making the request, or None for anon.
+    config_svc: An instance of ConfigService.
+    effective_ids: The effective IDs of the current user.
+    project: A project object for the current project.
+    perms: A PermissionSet for the current user.
+  Returns:
+    A list of LabelDef IDs the current user is forbidden to access.
+  """
+  if user and user.is_site_admin:
+    return []
+
+  at_risk_label_ids = []
+  label_def_rows = config_svc.GetLabelDefRowsAnyProject(
+    cnxn, where=[('LOWER(label) LIKE %s', [RESTRICT_VIEW_PATTERN])])
+
+  for label_id, _pid, _rank, label, _docstring, _hidden in label_def_rows:
+    label_lower = label.lower()
+    needed_perm = label_lower.split('-', 2)[-1]
+
+    if not perms.CanUsePerm(needed_perm, effective_ids, project, []):
+      at_risk_label_ids.append(label_id)
+
+  return at_risk_label_ids
diff --git a/search/searchpipeline.py b/search/searchpipeline.py
new file mode 100644
index 0000000..422a619
--- /dev/null
+++ b/search/searchpipeline.py
@@ -0,0 +1,90 @@
+# 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
+
+"""Helper functions and classes used in issue search and sorting."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import re
+
+from features import savedqueries_helpers
+from search import query2ast
+from services import tracker_fulltext
+from services import fulltext_helpers
+from tracker import tracker_helpers
+
+
+# Users can use "is:starred" in queries to limit
+# search results to issues starred by that user.
+IS_STARRED_RE = re.compile(r'\b(?![-@.:])is:starred\b(?![-@.:])', re.I)
+
+# Users can use "me" in other fields to refer to the logged in user name.
+KEYWORD_ME_RE = re.compile(r'\b[-_a-z0-9]+[=:]me\b(?![-@.:=])', re.I)
+ME_RE = re.compile(r'(?<=[=:])me\b(?![-@.:=])', re.I)
+
+
+def _AccumulateIssueProjectsAndConfigs(
+    cnxn, project_dict, config_dict, services, issues):
+  """Fetch any projects and configs that we need but haven't already loaded.
+
+  Args:
+    cnxn: connection to SQL database.
+    project_dict: dict {project_id: project} of projects that we have
+        already retrieved.
+    config_dict: dict {project_id: project} of configs that we have
+        already retrieved.
+    services: connections to backends.
+    issues: list of issues, which may be parts of different projects.
+
+  Returns:
+    Nothing, but projects_dict will be updated to include all the projects that
+    contain the given issues, and config_dicts will be updated to incude all
+    the corresponding configs.
+  """
+  new_ids = {issue.project_id for issue in issues}
+  new_ids.difference_update(iter(project_dict.keys()))
+  new_projects_dict = services.project.GetProjects(cnxn, new_ids)
+  project_dict.update(new_projects_dict)
+  new_configs_dict = services.config.GetProjectConfigs(cnxn, new_ids)
+  config_dict.update(new_configs_dict)
+
+
+def ReplaceKeywordsWithUserIDs(me_user_ids, query):
+  """Substitutes User ID in terms such as is:starred and me.
+
+  This is done on the query string before it is parsed because the query string
+  is used as a key for cached search results in memcache.  A search for by one
+  user for owner:me should not retrieve results stored for some other user.
+
+  Args:
+    me_user_ids: [] when no user is logged in, or user ID of the logged in
+        user when doing an interactive search, or the viewed user ID when
+        viewing someone else's dashboard, or the subscribing user's ID when
+        evaluating subscriptions.  Also contains linked account IDs.
+    query: The query string.
+
+  Returns:
+    A pair (query, warnings) where query is a string with "me" and "is:starred"
+    removed or replaced by new terms that use the numeric user ID provided,
+    and warnings is a list of warning strings to display to the user.
+  """
+  warnings = []
+  if me_user_ids:
+    me_user_ids_str = ','.join(str(uid) for uid in me_user_ids)
+    star_term = 'starredby:%s' % me_user_ids_str
+    query = IS_STARRED_RE.sub(star_term, query)
+    if KEYWORD_ME_RE.search(query):
+      query = ME_RE.sub(me_user_ids_str, query)
+  else:
+    if IS_STARRED_RE.search(query):
+      warnings.append('"is:starred" ignored because you are not signed in.')
+      query = IS_STARRED_RE.sub('', query)
+    if KEYWORD_ME_RE.search(query):
+      warnings.append('"me" keyword ignored because you are not signed in.')
+      query = KEYWORD_ME_RE.sub('', query)
+
+  return query, warnings
diff --git a/search/test/__init__.py b/search/test/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/search/test/__init__.py
diff --git a/search/test/ast2ast_test.py b/search/test/ast2ast_test.py
new file mode 100644
index 0000000..9edeaf1
--- /dev/null
+++ b/search/test/ast2ast_test.py
@@ -0,0 +1,785 @@
+# 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
+
+"""Tests for the ast2ast module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from proto import ast_pb2
+from proto import tracker_pb2
+from search import ast2ast
+from search import query2ast
+from services import service_manager
+from testing import fake
+from tracker import tracker_bizobj
+
+
+BUILTIN_ISSUE_FIELDS = query2ast.BUILTIN_ISSUE_FIELDS
+ANY_FIELD = query2ast.BUILTIN_ISSUE_FIELDS['any_field']
+OWNER_FIELD = query2ast.BUILTIN_ISSUE_FIELDS['owner']
+OWNER_ID_FIELD = query2ast.BUILTIN_ISSUE_FIELDS['owner_id']
+
+
+class AST2ASTTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.config.component_defs.append(
+        tracker_bizobj.MakeComponentDef(
+            101, 789, 'UI', 'doc', False, [], [], 0, 0))
+    self.config.component_defs.append(
+        tracker_bizobj.MakeComponentDef(
+            102, 789, 'UI>Search', 'doc', False, [], [], 0, 0))
+    self.config.component_defs.append(
+        tracker_bizobj.MakeComponentDef(
+            201, 789, 'DB', 'doc', False, [], [], 0, 0))
+    self.config.component_defs.append(
+        tracker_bizobj.MakeComponentDef(
+            301, 789, 'Search', 'doc', False, [], [], 0, 0))
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        project=fake.ProjectService(),
+        issue=fake.IssueService(),
+        config=fake.ConfigService(),
+        features=fake.FeaturesService())
+    self.services.user.TestAddUser('a@example.com', 111)
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=100)
+
+  def testPreprocessAST_EmptyAST(self):
+    ast = ast_pb2.QueryAST()  # No conjunctions in it.
+    new_ast = ast2ast.PreprocessAST(
+        self.cnxn, ast, [789], self.services, self.config)
+    self.assertEqual(ast, new_ast)
+
+  def testPreprocessAST_Normal(self):
+    open_field = BUILTIN_ISSUE_FIELDS['open']
+    label_field = BUILTIN_ISSUE_FIELDS['label']
+    label_id_field = BUILTIN_ISSUE_FIELDS['label_id']
+    status_id_field = BUILTIN_ISSUE_FIELDS['status_id']
+    conds = [
+        ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [open_field], [], []),
+        ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [label_field], ['Hot'], [])]
+    self.services.config.TestAddLabelsDict({'Hot': 0})
+
+    ast = ast_pb2.QueryAST()
+    ast.conjunctions.append(ast_pb2.Conjunction(conds=conds))
+    new_ast = ast2ast.PreprocessAST(
+        self.cnxn, ast, [789], self.services, self.config)
+    self.assertEqual(2, len(new_ast.conjunctions[0].conds))
+    new_cond_1, new_cond_2 = new_ast.conjunctions[0].conds
+    self.assertEqual(ast_pb2.QueryOp.NE, new_cond_1.op)
+    self.assertEqual([status_id_field], new_cond_1.field_defs)
+    self.assertEqual([7, 8, 9], new_cond_1.int_values)
+    self.assertEqual([], new_cond_1.str_values)
+    self.assertEqual(ast_pb2.QueryOp.EQ, new_cond_2.op)
+    self.assertEqual([label_id_field], new_cond_2.field_defs)
+    self.assertEqual([0], new_cond_2.int_values)
+    self.assertEqual([], new_cond_2.str_values)
+
+  def testPreprocessIsOpenCond(self):
+    open_field = BUILTIN_ISSUE_FIELDS['open']
+    status_id_field = BUILTIN_ISSUE_FIELDS['status_id']
+
+    # is:open  -> status_id!=closed_status_ids
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.EQ, [open_field], [], [])
+    new_cond = ast2ast._PreprocessIsOpenCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual(ast_pb2.QueryOp.NE, new_cond.op)
+    self.assertEqual([status_id_field], new_cond.field_defs)
+    self.assertEqual([7, 8, 9], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+    # -is:open  -> status_id=closed_status_ids
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.NE, [open_field], [], [])
+    new_cond = ast2ast._PreprocessIsOpenCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+    self.assertEqual([status_id_field], new_cond.field_defs)
+    self.assertEqual([7, 8, 9], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+  def testPreprocessBlockedOnCond_WithSingleProjectID(self):
+    blockedon_field = BUILTIN_ISSUE_FIELDS['blockedon']
+    blockedon_id_field = BUILTIN_ISSUE_FIELDS['blockedon_id']
+    self.services.project.TestAddProject('Project1', project_id=1)
+    issue1 = fake.MakeTestIssue(
+        project_id=1, local_id=1, summary='sum', status='new', owner_id=2,
+        issue_id=101)
+    issue2 = fake.MakeTestIssue(
+        project_id=1, local_id=2, summary='sum', status='new', owner_id=2,
+        issue_id=102)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.issue.TestAddIssue(issue2)
+
+    for local_ids, expected in (
+        (['1'], [101]),  # One existing issue.
+        (['Project1:1'], [101]),  # One existing issue with project prefix.
+        (['1', '2'], [101, 102]),  # Two existing issues.
+        (['3'], [])):  # Non-existant issue.
+      cond = ast_pb2.MakeCond(
+          ast_pb2.QueryOp.TEXT_HAS, [blockedon_field], local_ids, [])
+      new_cond = ast2ast._PreprocessBlockedOnCond(
+          self.cnxn, cond, [1], self.services, None, True)
+      self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+      self.assertEqual([blockedon_id_field], new_cond.field_defs)
+      self.assertEqual(expected, new_cond.int_values)
+      self.assertEqual([], new_cond.str_values)
+
+  def testPreprocessBlockedOnCond_WithMultipleProjectIDs(self):
+    blockedon_field = BUILTIN_ISSUE_FIELDS['blockedon']
+    blockedon_id_field = BUILTIN_ISSUE_FIELDS['blockedon_id']
+    self.services.project.TestAddProject('Project1', project_id=1)
+    self.services.project.TestAddProject('Project2', project_id=2)
+    issue1 = fake.MakeTestIssue(
+        project_id=1, local_id=1, summary='sum', status='new', owner_id=2,
+        issue_id=101)
+    issue2 = fake.MakeTestIssue(
+        project_id=2, local_id=2, summary='sum', status='new', owner_id=2,
+        issue_id=102)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.issue.TestAddIssue(issue2)
+
+    for local_ids, expected in (
+        (['Project1:1'], [101]),
+        (['Project1:1', 'Project2:2'], [101, 102])):
+      cond = ast_pb2.MakeCond(
+          ast_pb2.QueryOp.TEXT_HAS, [blockedon_field], local_ids, [])
+      new_cond = ast2ast._PreprocessBlockedOnCond(
+          self.cnxn, cond, [1, 2], self.services, None, True)
+      self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+      self.assertEqual([blockedon_id_field], new_cond.field_defs)
+      self.assertEqual(expected, new_cond.int_values)
+      self.assertEqual([], new_cond.str_values)
+
+  def testPreprocessBlockedOnCond_WithMultipleProjectIDs_NoPrefix(self):
+    blockedon_field = BUILTIN_ISSUE_FIELDS['blockedon']
+    self.services.project.TestAddProject('Project1', project_id=1)
+    self.services.project.TestAddProject('Project2', project_id=2)
+    issue1 = fake.MakeTestIssue(
+        project_id=1, local_id=1, summary='sum', status='new', owner_id=2,
+        issue_id=101)
+    issue2 = fake.MakeTestIssue(
+        project_id=2, local_id=2, summary='sum', status='new', owner_id=2,
+        issue_id=102)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.issue.TestAddIssue(issue2)
+
+    for local_ids in (['1'], ['1', '2'], ['3']):
+      cond = ast_pb2.MakeCond(
+          ast_pb2.QueryOp.TEXT_HAS, [blockedon_field], local_ids, [])
+      with self.assertRaises(ValueError) as cm:
+        ast2ast._PreprocessBlockedOnCond(
+            self.cnxn, cond, [1, 2], self.services, None, True)
+      self.assertEqual(
+          'Searching for issues accross multiple/all projects without '
+          'project prefixes is ambiguous and is currently not supported.',
+          cm.exception.message)
+
+  def testPreprocessBlockedOnCond_WithExternalIssues(self):
+    blockedon_field = BUILTIN_ISSUE_FIELDS['blockedon']
+    blockedon_id_field = BUILTIN_ISSUE_FIELDS['blockedon_id']
+    self.services.project.TestAddProject('Project1', project_id=1)
+    issue1 = fake.MakeTestIssue(
+        project_id=1, local_id=1, summary='sum', status='new', owner_id=2,
+        issue_id=101)
+    issue2 = fake.MakeTestIssue(
+        project_id=1, local_id=2, summary='sum', status='new', owner_id=2,
+        issue_id=102)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.issue.TestAddIssue(issue2)
+
+    for local_ids, expected_issues, expected_ext_issues in (
+        (['b/1234'], [], ['b/1234']),
+        (['Project1:1', 'b/1234'], [101], ['b/1234']),
+        (['1', 'b/1234', 'b/1551', 'Project1:2'],
+        [101, 102], ['b/1234', 'b/1551'])):
+      cond = ast_pb2.MakeCond(
+          ast_pb2.QueryOp.TEXT_HAS, [blockedon_field], local_ids, [])
+      new_cond = ast2ast._PreprocessBlockedOnCond(
+          self.cnxn, cond, [1], self.services, None, True)
+      self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+      self.assertEqual([blockedon_id_field], new_cond.field_defs)
+      self.assertEqual(expected_issues, new_cond.int_values)
+      self.assertEqual(expected_ext_issues, new_cond.str_values)
+
+  def testPreprocessIsBlockedCond(self):
+    blocked_field = BUILTIN_ISSUE_FIELDS['blockedon_id']
+    for input_op, expected_op in (
+        (ast_pb2.QueryOp.EQ, ast_pb2.QueryOp.IS_DEFINED),
+        (ast_pb2.QueryOp.NE, ast_pb2.QueryOp.IS_NOT_DEFINED)):
+      cond = ast_pb2.MakeCond(
+          input_op, [blocked_field], [], [])
+      new_cond = ast2ast._PreprocessIsBlockedCond(
+          self.cnxn, cond, [100], self.services, None, True)
+      self.assertEqual(expected_op, new_cond.op)
+      self.assertEqual([blocked_field], new_cond.field_defs)
+      self.assertEqual([], new_cond.int_values)
+      self.assertEqual([], new_cond.str_values)
+
+  def testPreprocessHasBlockedOnCond(self):
+    blocked_field = BUILTIN_ISSUE_FIELDS['blockedon_id']
+    for op in (ast_pb2.QueryOp.IS_DEFINED, ast_pb2.QueryOp.IS_NOT_DEFINED):
+      cond = ast_pb2.MakeCond(op, [blocked_field], [], [])
+      new_cond = ast2ast._PreprocessBlockedOnCond(
+          self.cnxn, cond, [100], self.services, None, True)
+      self.assertEqual(op, op)
+      self.assertEqual([blocked_field], new_cond.field_defs)
+      self.assertEqual([], new_cond.int_values)
+      self.assertEqual([], new_cond.str_values)
+
+  def testPreprocessHasBlockingCond(self):
+    blocking_field = BUILTIN_ISSUE_FIELDS['blocking_id']
+    for op in (ast_pb2.QueryOp.IS_DEFINED, ast_pb2.QueryOp.IS_NOT_DEFINED):
+      cond = ast_pb2.MakeCond(op, [blocking_field], [], [])
+      new_cond = ast2ast._PreprocessBlockingCond(
+          self.cnxn, cond, [100], self.services, None, True)
+      self.assertEqual(op, op)
+      self.assertEqual([blocking_field], new_cond.field_defs)
+      self.assertEqual([], new_cond.int_values)
+      self.assertEqual([], new_cond.str_values)
+
+  def testPreprocessBlockingCond_WithSingleProjectID(self):
+    blocking_field = BUILTIN_ISSUE_FIELDS['blocking']
+    blocking_id_field = BUILTIN_ISSUE_FIELDS['blocking_id']
+    self.services.project.TestAddProject('Project1', project_id=1)
+    issue1 = fake.MakeTestIssue(
+        project_id=1, local_id=1, summary='sum', status='new', owner_id=2,
+        issue_id=101)
+    issue2 = fake.MakeTestIssue(
+        project_id=1, local_id=2, summary='sum', status='new', owner_id=2,
+        issue_id=102)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.issue.TestAddIssue(issue2)
+
+    for local_ids, expected in (
+        (['1'], [101]),  # One existing issue.
+        (['Project1:1'], [101]),  # One existing issue with project prefix.
+        (['1', '2'], [101, 102]),  # Two existing issues.
+        (['3'], [])):  # Non-existant issue.
+      cond = ast_pb2.MakeCond(
+          ast_pb2.QueryOp.TEXT_HAS, [blocking_field], local_ids, [])
+      new_cond = ast2ast._PreprocessBlockingCond(
+          self.cnxn, cond, [1], self.services, None, True)
+      self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+      self.assertEqual([blocking_id_field], new_cond.field_defs)
+      self.assertEqual(expected, new_cond.int_values)
+      self.assertEqual([], new_cond.str_values)
+
+  def testPreprocessBlockingCond_WithMultipleProjectIDs(self):
+    blocking_field = BUILTIN_ISSUE_FIELDS['blocking']
+    blocking_id_field = BUILTIN_ISSUE_FIELDS['blocking_id']
+    self.services.project.TestAddProject('Project1', project_id=1)
+    self.services.project.TestAddProject('Project2', project_id=2)
+    issue1 = fake.MakeTestIssue(
+        project_id=1, local_id=1, summary='sum', status='new', owner_id=2,
+        issue_id=101)
+    issue2 = fake.MakeTestIssue(
+        project_id=2, local_id=2, summary='sum', status='new', owner_id=2,
+        issue_id=102)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.issue.TestAddIssue(issue2)
+
+    for local_ids, expected in (
+        (['Project1:1'], [101]),
+        (['Project1:1', 'Project2:2'], [101, 102])):
+      cond = ast_pb2.MakeCond(
+          ast_pb2.QueryOp.TEXT_HAS, [blocking_field], local_ids, [])
+      new_cond = ast2ast._PreprocessBlockingCond(
+          self.cnxn, cond, [1, 2], self.services, None, True)
+      self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+      self.assertEqual([blocking_id_field], new_cond.field_defs)
+      self.assertEqual(expected, new_cond.int_values)
+      self.assertEqual([], new_cond.str_values)
+
+  def testPreprocessBlockingCond_WithMultipleProjectIDs_NoPrefix(self):
+    blocking_field = BUILTIN_ISSUE_FIELDS['blocking']
+    self.services.project.TestAddProject('Project1', project_id=1)
+    self.services.project.TestAddProject('Project2', project_id=2)
+    issue1 = fake.MakeTestIssue(
+        project_id=1, local_id=1, summary='sum', status='new', owner_id=2,
+        issue_id=101)
+    issue2 = fake.MakeTestIssue(
+        project_id=2, local_id=2, summary='sum', status='new', owner_id=2,
+        issue_id=102)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.issue.TestAddIssue(issue2)
+
+    for local_ids in (['1'], ['1', '2'], ['3']):
+      cond = ast_pb2.MakeCond(
+          ast_pb2.QueryOp.TEXT_HAS, [blocking_field], local_ids, [])
+      with self.assertRaises(ValueError) as cm:
+        ast2ast._PreprocessBlockingCond(
+            self.cnxn, cond, [1, 2], self.services, None, True)
+      self.assertEqual(
+          'Searching for issues accross multiple/all projects without '
+          'project prefixes is ambiguous and is currently not supported.',
+          cm.exception.message)
+
+  def testPreprocessBlockingCond_WithExternalIssues(self):
+    blocking_field = BUILTIN_ISSUE_FIELDS['blocking']
+    blocking_id_field = BUILTIN_ISSUE_FIELDS['blocking_id']
+    self.services.project.TestAddProject('Project1', project_id=1)
+    issue1 = fake.MakeTestIssue(
+        project_id=1, local_id=1, summary='sum', status='new', owner_id=2,
+        issue_id=101)
+    issue2 = fake.MakeTestIssue(
+        project_id=1, local_id=2, summary='sum', status='new', owner_id=2,
+        issue_id=102)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.issue.TestAddIssue(issue2)
+
+    for local_ids, expected_issues, expected_ext_issues in (
+        (['b/1234'], [], ['b/1234']),
+        (['Project1:1', 'b/1234'], [101], ['b/1234']),
+        (['1', 'b/1234', 'b/1551', 'Project1:2'],
+        [101, 102], ['b/1234', 'b/1551'])):
+      cond = ast_pb2.MakeCond(
+          ast_pb2.QueryOp.TEXT_HAS, [blocking_field], local_ids, [])
+      new_cond = ast2ast._PreprocessBlockingCond(
+          self.cnxn, cond, [1], self.services, None, True)
+      self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+      self.assertEqual([blocking_id_field], new_cond.field_defs)
+      self.assertEqual(expected_issues, new_cond.int_values)
+      self.assertEqual(expected_ext_issues, new_cond.str_values)
+
+  def testPreprocessMergedIntoCond_WithSingleProjectID(self):
+    field = BUILTIN_ISSUE_FIELDS['mergedinto']
+    id_field = BUILTIN_ISSUE_FIELDS['mergedinto_id']
+    self.services.project.TestAddProject('Project1', project_id=1)
+    issue1 = fake.MakeTestIssue(
+        project_id=1, local_id=1, summary='sum', status='new', owner_id=2,
+        issue_id=101)
+    issue2 = fake.MakeTestIssue(
+        project_id=1, local_id=2, summary='sum', status='new', owner_id=2,
+        issue_id=102)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.issue.TestAddIssue(issue2)
+
+    for local_ids, expected in (
+        (['1'], [101]),  # One existing issue.
+        (['Project1:1'], [101]),  # One existing issue with project prefix.
+        (['1', '2'], [101, 102]),  # Two existing issues.
+        (['3'], [])):  # Non-existant issue.
+      cond = ast_pb2.MakeCond(
+          ast_pb2.QueryOp.TEXT_HAS, [field], local_ids, [])
+      new_cond = ast2ast._PreprocessMergedIntoCond(
+          self.cnxn, cond, [1], self.services, None, True)
+      self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+      self.assertEqual([id_field], new_cond.field_defs)
+      self.assertEqual(expected, new_cond.int_values)
+      self.assertEqual([], new_cond.str_values)
+
+  def testPreprocessMergedIntoCond_WithExternalIssues(self):
+    blocking_field = BUILTIN_ISSUE_FIELDS['mergedinto']
+    blocking_id_field = BUILTIN_ISSUE_FIELDS['mergedinto_id']
+    self.services.project.TestAddProject('Project1', project_id=1)
+    issue1 = fake.MakeTestIssue(
+        project_id=1, local_id=1, summary='sum', status='new', owner_id=2,
+        issue_id=101)
+    issue2 = fake.MakeTestIssue(
+        project_id=1, local_id=2, summary='sum', status='new', owner_id=2,
+        issue_id=102)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.issue.TestAddIssue(issue2)
+
+    for local_ids, expected_issues, expected_ext_issues in (
+        (['b/1234'], [], ['b/1234']),
+        (['Project1:1', 'b/1234'], [101], ['b/1234']),
+        (['1', 'b/1234', 'b/1551', 'Project1:2'],
+        [101, 102], ['b/1234', 'b/1551'])):
+      cond = ast_pb2.MakeCond(
+          ast_pb2.QueryOp.TEXT_HAS, [blocking_field], local_ids, [])
+      new_cond = ast2ast._PreprocessMergedIntoCond(
+          self.cnxn, cond, [1], self.services, None, True)
+      self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+      self.assertEqual([blocking_id_field], new_cond.field_defs)
+      self.assertEqual(expected_issues, new_cond.int_values)
+      self.assertEqual(expected_ext_issues, new_cond.str_values)
+
+  def testPreprocessIsSpamCond(self):
+    spam_field = BUILTIN_ISSUE_FIELDS['spam']
+    is_spam_field = BUILTIN_ISSUE_FIELDS['is_spam']
+    for input_op, int_values in (
+        (ast_pb2.QueryOp.EQ, [1]), (ast_pb2.QueryOp.NE, [0])):
+      cond = ast_pb2.MakeCond(
+          input_op, [spam_field], [], [])
+      new_cond = ast2ast._PreprocessIsSpamCond(
+          self.cnxn, cond, [789], self.services, None, True)
+      self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+      self.assertEqual([is_spam_field], new_cond.field_defs)
+      self.assertEqual(int_values, new_cond.int_values)
+      self.assertEqual([], new_cond.str_values)
+
+  def testPreprocessStatusCond(self):
+    status_field = BUILTIN_ISSUE_FIELDS['status']
+    status_id_field = BUILTIN_ISSUE_FIELDS['status_id']
+
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.IS_DEFINED, [status_field], [], [])
+    new_cond = ast2ast._PreprocessStatusCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual(ast_pb2.QueryOp.IS_DEFINED, new_cond.op)
+    self.assertEqual([status_id_field], new_cond.field_defs)
+    self.assertEqual([], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.EQ, [status_field], ['New', 'Assigned'], [])
+    new_cond = ast2ast._PreprocessStatusCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+    self.assertEqual([status_id_field], new_cond.field_defs)
+    self.assertEqual([0, 1], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [status_field], [], [])
+    new_cond = ast2ast._PreprocessStatusCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual([], new_cond.int_values)
+
+  def testPrefixRegex(self):
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.IS_DEFINED, [BUILTIN_ISSUE_FIELDS['label']],
+        ['Priority', 'Severity'], [])
+    regex = ast2ast._MakePrefixRegex(cond)
+    self.assertRegexpMatches('Priority-1', regex)
+    self.assertRegexpMatches('Severity-3', regex)
+    self.assertNotRegexpMatches('My-Priority', regex)
+
+  def testKeyValueRegex(self):
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.KEY_HAS, [BUILTIN_ISSUE_FIELDS['label']],
+        ['Type-Feature', 'Type-Security'], [])
+    regex = ast2ast._MakeKeyValueRegex(cond)
+    self.assertRegexpMatches('Type-Feature', regex)
+    self.assertRegexpMatches('Type-Bug-Security', regex)
+    self.assertNotRegexpMatches('Type-Bug', regex)
+    self.assertNotRegexpMatches('Security-Feature', regex)
+
+  def testKeyValueRegex_multipleKeys(self):
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.KEY_HAS, [BUILTIN_ISSUE_FIELDS['label']],
+        ['Type-Bug', 'Security-Bug'], [])
+    with self.assertRaises(ValueError):
+      ast2ast._MakeKeyValueRegex(cond)
+
+  def testWordBoundryRegex(self):
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [BUILTIN_ISSUE_FIELDS['label']],
+        ['Type-Bug'], [])
+    regex = ast2ast._MakeKeyValueRegex(cond)
+    self.assertRegexpMatches('Type-Bug-Security', regex)
+    self.assertNotRegexpMatches('Type-BugSecurity', regex)
+
+  def testPreprocessLabelCond(self):
+    label_field = BUILTIN_ISSUE_FIELDS['label']
+    label_id_field = BUILTIN_ISSUE_FIELDS['label_id']
+
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.IS_DEFINED, [label_field], ['Priority'], [])
+    new_cond = ast2ast._PreprocessLabelCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual(ast_pb2.QueryOp.IS_DEFINED, new_cond.op)
+    self.assertEqual([label_id_field], new_cond.field_defs)
+    self.assertEqual([1, 2, 3], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+    self.services.config.TestAddLabelsDict(
+        {
+            'Priority-Low': 0,
+            'Priority-High': 1
+        })
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.EQ, [label_field],
+        ['Priority-Low', 'Priority-High'], [])
+    self.services.config.TestAddLabelsDict(
+        {
+            'Priority-Low': 0,
+            'Priority-High': 1
+        })
+    new_cond = ast2ast._PreprocessLabelCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+    self.assertEqual([label_id_field], new_cond.field_defs)
+    self.assertEqual([0, 1], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.KEY_HAS, [label_field],
+        ['Priority-Low', 'Priority-High'], [])
+    new_cond = ast2ast._PreprocessLabelCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+    self.assertEqual([label_id_field], new_cond.field_defs)
+    self.assertEqual([1, 2, 3], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+  def testPreprocessComponentCond_QuickOR(self):
+    component_field = BUILTIN_ISSUE_FIELDS['component']
+    component_id_field = BUILTIN_ISSUE_FIELDS['component_id']
+
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.IS_DEFINED, [component_field], ['UI', 'DB'], [])
+    new_cond = ast2ast._PreprocessComponentCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual(ast_pb2.QueryOp.IS_DEFINED, new_cond.op)
+    self.assertEqual([component_id_field], new_cond.field_defs)
+    self.assertEqual([101, 102, 201], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [component_field], ['UI', 'DB'], [])
+    new_cond = ast2ast._PreprocessComponentCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+    self.assertEqual([component_id_field], new_cond.field_defs)
+    self.assertEqual([101, 102, 201], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [component_field], [], [])
+    new_cond = ast2ast._PreprocessComponentCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual([], new_cond.int_values)
+
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [component_field], ['unknown@example.com'],
+        [])
+    new_cond = ast2ast._PreprocessComponentCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual([], new_cond.int_values)
+
+  def testPreprocessComponentCond_RootedAndNonRooted(self):
+    component_field = BUILTIN_ISSUE_FIELDS['component']
+    component_id_field = BUILTIN_ISSUE_FIELDS['component_id']
+
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [component_field], ['UI'], [])
+    new_cond = ast2ast._PreprocessComponentCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+    self.assertEqual([component_id_field], new_cond.field_defs)
+    self.assertEqual([101, 102], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.EQ, [component_field], ['UI'], [])
+    new_cond = ast2ast._PreprocessComponentCond(
+        self.cnxn, cond, [789], self.services, self.config, True)
+    self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+    self.assertEqual([component_id_field], new_cond.field_defs)
+    self.assertEqual([101], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+  def testPreprocessExactUsers_IsDefined(self):
+    """Anyone can search for [has:owner]."""
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.IS_DEFINED, [OWNER_FIELD], ['a@example.com'], [])
+    new_cond = ast2ast._PreprocessExactUsers(
+        self.cnxn, cond, self.services.user, [OWNER_ID_FIELD], True)
+    self.assertEqual(ast_pb2.QueryOp.IS_DEFINED, new_cond.op)
+    self.assertEqual([OWNER_ID_FIELD], new_cond.field_defs)
+    self.assertEqual([], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+    # Non-members do not raise an exception.
+    ast2ast._PreprocessExactUsers(
+        self.cnxn, cond, self.services.user, [OWNER_ID_FIELD], False)
+
+
+  def testPreprocessExactUsers_UserFound(self):
+    """Anyone can search for a know user, [owner:user@example.com]."""
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [OWNER_FIELD], ['a@example.com'], [])
+    new_cond = ast2ast._PreprocessExactUsers(
+        self.cnxn, cond, self.services.user, [OWNER_ID_FIELD], True)
+    self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+    self.assertEqual([OWNER_ID_FIELD], new_cond.field_defs)
+    self.assertEqual([111], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+    # Non-members do not raise an exception.
+    ast2ast._PreprocessExactUsers(
+        self.cnxn, cond, self.services.user, [OWNER_ID_FIELD], False)
+
+  def testPreprocessExactUsers_UserSpecifiedByID(self):
+    """Anyone may search for users by ID, [owner:1234]."""
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [OWNER_FIELD], ['123'], [])
+    new_cond = ast2ast._PreprocessExactUsers(
+        self.cnxn, cond, self.services.user, [OWNER_ID_FIELD], True)
+    self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+    self.assertEqual([OWNER_ID_FIELD], new_cond.field_defs)
+    self.assertEqual([123], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+    # Non-members do not raise an exception.
+    ast2ast._PreprocessExactUsers(
+        self.cnxn, cond, self.services.user, [OWNER_ID_FIELD], False)
+
+  def testPreprocessExactUsers_NonEquality(self):
+    """Project members may search for [owner_id>111]."""
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.GE, [OWNER_ID_FIELD], ['111'], [])
+    new_cond = ast2ast._PreprocessExactUsers(
+        self.cnxn, cond, self.services.user, [OWNER_ID_FIELD], True)
+    self.assertEqual(cond, new_cond)
+
+    with self.assertRaises(ast2ast.MalformedQuery):
+      ast2ast._PreprocessExactUsers(
+          self.cnxn, cond, self.services.user, [OWNER_ID_FIELD], False)
+
+  def testPreprocessExactUsers_UserNotFound(self):
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [OWNER_FIELD], ['unknown@example.com'], [])
+    new_cond = ast2ast._PreprocessExactUsers(
+        self.cnxn, cond, self.services.user, [OWNER_ID_FIELD], True)
+    self.assertEqual(cond, new_cond)
+
+    with self.assertRaises(ast2ast.MalformedQuery):
+      ast2ast._PreprocessExactUsers(
+          self.cnxn, cond, self.services.user, [OWNER_ID_FIELD], False)
+
+  def testPreprocessExactUsers_KeywordMe(self):
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [OWNER_FIELD], ['me'], [])
+    new_cond = ast2ast._PreprocessExactUsers(
+        self.cnxn, cond, self.services.user, [OWNER_ID_FIELD], True)
+    self.assertEqual(cond, new_cond)
+
+    new_cond = ast2ast._PreprocessExactUsers(
+          self.cnxn, cond, self.services.user, [OWNER_ID_FIELD], False)
+    self.assertEqual(cond, new_cond)
+
+  def testPreprocessHotlistCond(self):
+    hotlist_field = BUILTIN_ISSUE_FIELDS['hotlist']
+    hotlist_id_field = BUILTIN_ISSUE_FIELDS['hotlist_id']
+
+    self.services.user.TestAddUser('gatsby@example.org', 111)
+    self.services.user.TestAddUser('daisy@example.com', 222)
+    self.services.user.TestAddUser('nick@example.org', 333)
+
+    # Setup hotlists
+    self.services.features.TestAddHotlist(
+        'Hotlist1', owner_ids=[111], hotlist_id=10)
+    self.services.features.TestAddHotlist(
+        'Hotlist2', owner_ids=[111], hotlist_id=20)
+    self.services.features.TestAddHotlist(
+        'Hotlist3', owner_ids=[222], hotlist_id=30)
+    self.services.features.TestAddHotlist(
+        'Hotlist4', owner_ids=[222], hotlist_id=40)
+    self.services.features.TestAddHotlist(
+        'Hotlist5', owner_ids=[333], hotlist_id=50)
+    self.services.features.TestAddHotlist(
+        'Hotlist6', owner_ids=[333], hotlist_id=60)
+
+    hotlist_query_vals = [
+        'gatsby@example.org:Hotlist1',
+        'nick@example.org:',
+        'daisy@example.com:Hotlist3', 'Hotlist4']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [hotlist_field], hotlist_query_vals, [])
+    actual = ast2ast._PreprocessHotlistCond(
+        self.cnxn, cond, [1], self.services, None, True)
+    self.assertEqual(ast_pb2.QueryOp.EQ, actual.op)
+    self.assertEqual([hotlist_id_field], actual.field_defs)
+    self.assertItemsEqual([10, 30, 40, 50, 60], actual.int_values)
+
+  def testPreprocessHotlistCond_UserNotFound(self):
+    hotlist_field = BUILTIN_ISSUE_FIELDS['hotlist']
+    hotlist_query_vals = ['gatsby@chromium.org:Hotlist1', 'Hotlist3']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [hotlist_field], hotlist_query_vals, [])
+    actual = ast2ast._PreprocessHotlistCond(
+        self.cnxn, cond, [1], self.services, None, True)
+    self.assertEqual(cond, actual)
+
+  def testPreprocessCustomCond_User(self):
+    fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='TPM',
+        field_type=tracker_pb2.FieldTypes.USER_TYPE)
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['a@example.com'], [])
+    new_cond = ast2ast._PreprocessCustomCond(
+        self.cnxn, cond, self.services, True)
+    self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+    self.assertEqual(cond.field_defs, new_cond.field_defs)
+    self.assertEqual([111], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['111'], [])
+    new_cond = ast2ast._PreprocessCustomCond(
+        self.cnxn, cond, self.services, True)
+    self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+    self.assertEqual(cond.field_defs, new_cond.field_defs)
+    self.assertEqual([111], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['unknown@example.com'], [])
+    new_cond = ast2ast._PreprocessCustomCond(
+        self.cnxn, cond, self.services, True)
+    self.assertEqual(cond, new_cond)
+
+  def testPreprocessCustomCond_NonUser(self):
+    fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='TPM',
+        field_type=tracker_pb2.FieldTypes.INT_TYPE)
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['foo'], [123])
+    new_cond = ast2ast._PreprocessCustomCond(
+        self.cnxn, cond, self.services, True)
+    self.assertEqual(cond, new_cond)
+
+    fd.field_type = tracker_pb2.FieldTypes.STR_TYPE
+    new_cond = ast2ast._PreprocessCustomCond(
+        self.cnxn, cond, self.services, True)
+    self.assertEqual(cond, new_cond)
+
+  def testPreprocessCustomCond_ApprovalUser(self):
+    fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='UXReview',
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['a@example.com'], [],
+        key_suffix=query2ast.APPROVER_SUFFIX)
+    new_cond = ast2ast._PreprocessCustomCond(
+        self.cnxn, cond, self.services, True)
+    self.assertEqual(ast_pb2.QueryOp.EQ, new_cond.op)
+    self.assertEqual(cond.field_defs, new_cond.field_defs)
+    self.assertEqual([111], new_cond.int_values)
+    self.assertEqual([], new_cond.str_values)
+    self.assertEqual(query2ast.APPROVER_SUFFIX, new_cond.key_suffix)
+
+  def testPreprocessCond_NoChange(self):
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.TEXT_HAS, [ANY_FIELD], ['foo'], [])
+    self.assertEqual(
+        cond, ast2ast._PreprocessCond(self.cnxn, cond, [], None, None, True))
+
+  def testTextOpToIntOp(self):
+    self.assertEqual(ast_pb2.QueryOp.EQ,
+                     ast2ast._TextOpToIntOp(ast_pb2.QueryOp.TEXT_HAS))
+    self.assertEqual(ast_pb2.QueryOp.EQ,
+                     ast2ast._TextOpToIntOp(ast_pb2.QueryOp.KEY_HAS))
+    self.assertEqual(ast_pb2.QueryOp.NE,
+                     ast2ast._TextOpToIntOp(ast_pb2.QueryOp.NOT_TEXT_HAS))
+
+    for enum_name, _enum_id in ast_pb2.QueryOp.to_dict().items():
+      no_change_op = ast_pb2.QueryOp(enum_name)
+      if no_change_op not in (
+          ast_pb2.QueryOp.TEXT_HAS,
+          ast_pb2.QueryOp.NOT_TEXT_HAS,
+          ast_pb2.QueryOp.KEY_HAS):
+        self.assertEqual(no_change_op,
+                         ast2ast._TextOpToIntOp(no_change_op))
diff --git a/search/test/ast2select_test.py b/search/test/ast2select_test.py
new file mode 100644
index 0000000..f20d524
--- /dev/null
+++ b/search/test/ast2select_test.py
@@ -0,0 +1,1731 @@
+# 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
+
+"""Tests for the ast2select module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import datetime
+import time
+import unittest
+
+from framework import sql
+from proto import ast_pb2
+from proto import tracker_pb2
+from search import ast2select
+from search import query2ast
+from tracker import tracker_bizobj
+
+
+BUILTIN_ISSUE_FIELDS = query2ast.BUILTIN_ISSUE_FIELDS
+ANY_FIELD = query2ast.BUILTIN_ISSUE_FIELDS['any_field']
+
+
+class AST2SelectTest(unittest.TestCase):
+
+  def setUp(self):
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+
+  def testBuildSQLQuery_EmptyAST(self):
+    ast = ast_pb2.QueryAST(conjunctions=[ast_pb2.Conjunction()])  # No conds
+    left_joins, where, unsupported = ast2select.BuildSQLQuery(ast)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([], unsupported)
+
+  def testBuildSQLQuery_Normal(self):
+    owner_field = BUILTIN_ISSUE_FIELDS['owner']
+    reporter_id_field = BUILTIN_ISSUE_FIELDS['reporter_id']
+    conds = [
+        ast_pb2.MakeCond(
+            ast_pb2.QueryOp.TEXT_HAS, [owner_field], ['example.com'], []),
+        ast_pb2.MakeCond(
+            ast_pb2.QueryOp.EQ, [reporter_id_field], [], [111])]
+    ast = ast_pb2.QueryAST(conjunctions=[ast_pb2.Conjunction(conds=conds)])
+    left_joins, where, unsupported = ast2select.BuildSQLQuery(ast)
+    self.assertEqual(
+        [('User AS Cond0 ON (Issue.owner_id = Cond0.user_id '
+          'OR Issue.derived_owner_id = Cond0.user_id)', [])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('(LOWER(Cond0.email) LIKE %s)', ['%example.com%']),
+         ('Issue.reporter_id = %s', [111])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testBlockingIDCond_SingleValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['blocking_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [1])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockingIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=False)
+    self.assertEqual(
+        [('IssueRelation AS Cond1 ON Issue.id = Cond1.dst_issue_id AND '
+          'Cond1.kind = %s AND Cond1.issue_id = %s',
+          ['blockedon', 1])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.dst_issue_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testBlockingIDCond_NegatedSingleValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['blocking_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], [], [1])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockingIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=False)
+    self.assertEqual(
+        [('IssueRelation AS Cond1 ON Issue.id = Cond1.dst_issue_id AND '
+          'Cond1.kind = %s AND Cond1.issue_id = %s',
+          ['blockedon', 1])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.dst_issue_id IS NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testBlockingIDCond_MultiValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['blocking_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [1, 2, 3])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockingIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=False)
+    self.assertEqual(
+        [('IssueRelation AS Cond1 ON Issue.id = Cond1.dst_issue_id AND '
+          'Cond1.kind = %s AND Cond1.issue_id IN (%s,%s,%s)',
+          ['blockedon', 1, 2, 3])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.dst_issue_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testBlockingIDCond_NegatedMultiValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['blocking_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], [], [1, 2, 3])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockingIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=False)
+    self.assertEqual(
+        [('IssueRelation AS Cond1 ON Issue.id = Cond1.dst_issue_id AND '
+          'Cond1.kind = %s AND Cond1.issue_id IN (%s,%s,%s)',
+          ['blockedon', 1, 2, 3])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.dst_issue_id IS NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testBlockingIDCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['blocking_id']
+    txt_cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.EQ, [fd], ['b/1'], [])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockingIDCond(
+        txt_cond, 'Cond1', 'Issue1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([txt_cond], unsupported)
+
+  def testBlockingIDCond_ExtIssues(self):
+    fd = BUILTIN_ISSUE_FIELDS['blocking_id']
+    ne_cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], ['b/1', 'b/2'], [])
+    eq_cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], ['b/1', 'b/2'], [])
+
+    for cond, where_str in [(eq_cond, 'DIR.issue_id IS NOT NULL'),
+      (ne_cond, 'DIR.issue_id IS NULL')]:
+      left_joins, where, unsupported = ast2select._ProcessBlockingIDCond(
+          cond, 'DIR', 'Issue1', snapshot_mode=False)
+      self.assertEqual(
+          [('DanglingIssueRelation AS DIR ON Issue.id = DIR.issue_id AND '
+            'DIR.kind = %s AND DIR.ext_issue_identifier IN (%s,%s)',
+            ['blocking', 'b/1', 'b/2'])],
+          left_joins)
+      self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+      self.assertEqual(
+          [(where_str, [])],
+          where)
+      self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+      self.assertEqual([], unsupported)
+
+  def testBlockingIDCond_CombinedIssues(self):
+    fd = BUILTIN_ISSUE_FIELDS['blocking_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], ['b/1', 'b/2'], [1, 2])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockingIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=False)
+    self.assertEqual(
+        ('IssueRelation AS Cond1 ON Issue.id = Cond1.dst_issue_id AND '
+          'Cond1.kind = %s AND Cond1.issue_id IN (%s,%s)',
+          ['blockedon', 1, 2]), left_joins[0])
+    self.assertEqual(
+         ('DanglingIssueRelation AS DIR ON Issue.id = DIR.issue_id AND '
+          'DIR.kind = %s AND DIR.ext_issue_identifier IN (%s,%s)',
+          ['blocking', 'b/1', 'b/2']), left_joins[1])
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertTrue(sql._IsValidJoin(left_joins[1][0]))
+    self.assertEqual(
+        [('Cond1.dst_issue_id IS NOT NULL', []),
+        ('DIR.issue_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertTrue(sql._IsValidWhereCond(where[1][0]))
+    self.assertEqual([], unsupported)
+
+  def testBlockedOnIDCond_SingleValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['blockedon_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [1])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockedOnIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=False)
+    self.assertEqual(
+        [('IssueRelation AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.kind = %s AND Cond1.dst_issue_id = %s',
+          ['blockedon', 1])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.issue_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testBlockedOnIDCond_NegatedSingleValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['blockedon_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], [], [1])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockedOnIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=False)
+    self.assertEqual(
+        [('IssueRelation AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.kind = %s AND Cond1.dst_issue_id = %s',
+          ['blockedon', 1])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.issue_id IS NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testBlockedOnIDCond_MultiValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['blockedon_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [1, 2, 3])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockedOnIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=False)
+    self.assertEqual(
+        [('IssueRelation AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.kind = %s AND Cond1.dst_issue_id IN (%s,%s,%s)',
+          ['blockedon', 1, 2, 3])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.issue_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testBlockedOnIDCond_NegatedMultiValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['blockedon_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], [], [1, 2, 3])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockedOnIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=False)
+    self.assertEqual(
+        [('IssueRelation AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.kind = %s AND Cond1.dst_issue_id IN (%s,%s,%s)',
+          ['blockedon', 1, 2, 3])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.issue_id IS NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testBlockedOnIDCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['blockedon_id']
+    txt_cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.EQ, [fd], ['b/1'], [])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockedOnIDCond(
+        txt_cond, 'Cond1', 'Issue1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([txt_cond], unsupported)
+
+  def testBlockedOnIDCond_ExtIssues(self):
+    fd = BUILTIN_ISSUE_FIELDS['blockedon_id']
+    eq_cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], ['b/1', 'b/2'], [])
+    ne_cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], ['b/1', 'b/2'], [])
+
+    for cond, where_str in [(eq_cond, 'DIR.issue_id IS NOT NULL'),
+      (ne_cond, 'DIR.issue_id IS NULL')]:
+      left_joins, where, unsupported = ast2select._ProcessBlockedOnIDCond(
+          cond, 'DIR', 'Issue1', snapshot_mode=False)
+      self.assertEqual(
+          [('DanglingIssueRelation AS DIR ON Issue.id = DIR.issue_id AND '
+            'DIR.kind = %s AND DIR.ext_issue_identifier IN (%s,%s)',
+            ['blockedon', 'b/1', 'b/2'])],
+          left_joins)
+      self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+      self.assertEqual(
+          [(where_str, [])],
+          where)
+      self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+      self.assertEqual([], unsupported)
+
+  def testBlockedOnIDCond_CombinedIssues(self):
+    fd = BUILTIN_ISSUE_FIELDS['blockedon_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], ['b/1', 'b/2'], [1, 2])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockedOnIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=False)
+    self.assertEqual(
+        ('IssueRelation AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.kind = %s AND Cond1.dst_issue_id IN (%s,%s)',
+          ['blockedon', 1, 2]), left_joins[0])
+    self.assertEqual(
+         ('DanglingIssueRelation AS DIR ON Issue.id = DIR.issue_id AND '
+          'DIR.kind = %s AND DIR.ext_issue_identifier IN (%s,%s)',
+          ['blockedon', 'b/1', 'b/2']), left_joins[1])
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertTrue(sql._IsValidJoin(left_joins[1][0]))
+    self.assertEqual(
+        [('Cond1.issue_id IS NOT NULL', []),
+        ('DIR.issue_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertTrue(sql._IsValidWhereCond(where[1][0]))
+    self.assertEqual([], unsupported)
+
+  def testMergedIntoIDCond_MultiValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['mergedinto_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [1, 2, 3])
+
+    left_joins, where, unsupported = ast2select._ProcessMergedIntoIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=False)
+    self.assertEqual(
+        [('IssueRelation AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.kind = %s AND Cond1.dst_issue_id IN (%s,%s,%s)',
+          ['mergedinto', 1, 2, 3])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.issue_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testMergedIntoIDCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['mergedinto_id']
+    txt_cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.EQ, [fd], ['b/1', 'b/2', 'b/3'], [])
+
+    left_joins, where, unsupported = ast2select._ProcessMergedIntoIDCond(
+        txt_cond, 'Cond1', 'Issue1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([txt_cond], unsupported)
+
+  def testMergedIntoIDCond_ExtIssues(self):
+    fd = BUILTIN_ISSUE_FIELDS['mergedinto_id']
+    eq_cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], ['b/1', 'b/2'], [])
+    ne_cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], ['b/1', 'b/2'], [])
+
+    for cond, expected in [(eq_cond, ['b/1', 'b/2']),
+      (ne_cond, ['b/1', 'b/2'])]:
+      left_joins, where, unsupported = ast2select._ProcessMergedIntoIDCond(
+          cond, 'Cond1', 'Issue1', snapshot_mode=False)
+      self.assertEqual(
+          [('DanglingIssueRelation AS DIR ON Issue.id = DIR.issue_id AND '
+            'DIR.kind = %s AND DIR.ext_issue_identifier IN (%s,%s)',
+            ['mergedinto'] + expected)],
+          left_joins)
+      self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+      self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+      self.assertEqual([], unsupported)
+
+  def testMergedIntoIDCond_CombinedIssues(self):
+    fd = BUILTIN_ISSUE_FIELDS['mergedinto_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], ['b/1', 'b/2'], [1, 2])
+
+    left_joins, where, unsupported = ast2select._ProcessMergedIntoIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=False)
+    self.assertEqual(
+        [('IssueRelation AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.kind = %s AND Cond1.dst_issue_id IN (%s,%s)',
+          ['mergedinto', 1, 2]),
+         ('DanglingIssueRelation AS DIR ON Issue.id = DIR.issue_id AND '
+          'DIR.kind = %s AND DIR.ext_issue_identifier IN (%s,%s)',
+          ['mergedinto', 'b/1', 'b/2'])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.issue_id IS NOT NULL', []),
+        ('DIR.issue_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testHasBlockedCond(self):
+    for op, expected in ((ast_pb2.QueryOp.IS_DEFINED, 'IS NOT NULL'),
+                         (ast_pb2.QueryOp.IS_NOT_DEFINED, 'IS NULL')):
+      fd = BUILTIN_ISSUE_FIELDS['blockedon_id']
+      cond = ast_pb2.MakeCond(op, [fd], [], [])
+
+      left_joins, where, unsupported = ast2select._ProcessBlockedOnIDCond(
+          cond, 'Cond1', None, snapshot_mode=False)
+      self.assertEqual(
+          ('IssueRelation AS Cond1 ON Issue.id = Cond1.issue_id AND '
+            'Cond1.kind = %s', ['blockedon']),
+          left_joins[0])
+      self.assertEqual(
+          ('DanglingIssueRelation AS DIR ON Issue.id = DIR.issue_id AND '
+            'DIR.kind = %s', ['blockedon']),
+          left_joins[1])
+      self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+      self.assertTrue(sql._IsValidJoin(left_joins[1][0]))
+      self.assertEqual([('(Cond1.issue_id %s OR DIR.issue_id %s)'
+          % (expected, expected), [])], where)
+      self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+      self.assertEqual([], unsupported)
+
+  def testHasBlockedCond_SnapshotMode(self):
+    op = ast_pb2.QueryOp.IS_DEFINED
+    fd = BUILTIN_ISSUE_FIELDS['blockedon_id']
+    cond = ast_pb2.MakeCond(op, [fd], [], [])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockingIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([cond], unsupported)
+
+  def testHasBlockingCond(self):
+    for op, expected in ((ast_pb2.QueryOp.IS_DEFINED, 'IS NOT NULL'),
+                         (ast_pb2.QueryOp.IS_NOT_DEFINED, 'IS NULL')):
+      fd = BUILTIN_ISSUE_FIELDS['blocking_id']
+      cond = ast_pb2.MakeCond(op, [fd], [], [])
+
+      left_joins, where, unsupported = ast2select._ProcessBlockingIDCond(cond,
+          'Cond1', None, snapshot_mode=False)
+      self.assertEqual(
+          ('IssueRelation AS Cond1 ON Issue.id = Cond1.dst_issue_id AND '
+            'Cond1.kind = %s', ['blockedon']),
+          left_joins[0])
+      self.assertEqual(
+          ('DanglingIssueRelation AS DIR ON Issue.id = DIR.issue_id AND '
+            'DIR.kind = %s', ['blocking']),
+          left_joins[1])
+      self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+      self.assertTrue(sql._IsValidJoin(left_joins[1][0]))
+      self.assertEqual([('(Cond1.dst_issue_id %s OR DIR.issue_id %s)'
+          % (expected, expected), [])], where)
+      self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+      self.assertEqual([], unsupported)
+
+  def testHasBlockingCond_SnapshotMode(self):
+    op = ast_pb2.QueryOp.IS_DEFINED
+    fd = BUILTIN_ISSUE_FIELDS['blocking_id']
+    cond = ast_pb2.MakeCond(op, [fd], [], [])
+
+    left_joins, where, unsupported = ast2select._ProcessBlockingIDCond(
+        cond, 'Cond1', 'Issue1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([cond], unsupported)
+
+  def testProcessOwnerCond(self):
+    fd = BUILTIN_ISSUE_FIELDS['owner']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['example.com'], [])
+    left_joins, where, unsupported = ast2select._ProcessOwnerCond(cond, 'Cond1',
+        'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('User AS Cond1 ON (Issue.owner_id = Cond1.user_id '
+          'OR Issue.derived_owner_id = Cond1.user_id)', [])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('(LOWER(Cond1.email) LIKE %s)', ['%example.com%'])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessOwnerCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['owner']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['example.com'], [])
+    left_joins, where, unsupported = ast2select._ProcessOwnerCond(cond, 'Cond1',
+        'Spare1', snapshot_mode=True)
+    self.assertEqual(
+        [('User AS Cond1 ON IssueSnapshot.owner_id = Cond1.user_id', [])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('(LOWER(Cond1.email) LIKE %s)', ['%example.com%'])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessOwnerIDCond(self):
+    fd = BUILTIN_ISSUE_FIELDS['owner_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [111])
+    left_joins, where, unsupported = ast2select._ProcessOwnerIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual([], left_joins)
+    self.assertEqual(
+        [('(Issue.owner_id = %s OR Issue.derived_owner_id = %s)',
+          [111, 111])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessOwnerIDCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['owner_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [111])
+    left_joins, where, unsupported = ast2select._ProcessOwnerIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([('IssueSnapshot.owner_id = %s', [111])], where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessOwnerLastVisitCond(self):
+    fd = BUILTIN_ISSUE_FIELDS['ownerlastvisit']
+    NOW = 1234567890
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.LT, [fd], [], [NOW])
+    left_joins, where, unsupported = ast2select._ProcessOwnerLastVisitCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('User AS Cond1 ON (Issue.owner_id = Cond1.user_id OR '
+          'Issue.derived_owner_id = Cond1.user_id)',
+          [])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.last_visit_timestamp < %s',
+          [NOW])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessOwnerLastVisitCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['ownerlastvisit']
+    NOW = 1234567890
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.LT, [fd], [], [NOW])
+    left_joins, where, unsupported = ast2select._ProcessOwnerLastVisitCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([cond], unsupported)
+
+  def testProcessIsOwnerBouncing(self):
+    fd = BUILTIN_ISSUE_FIELDS['ownerbouncing']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [])
+    left_joins, where, unsupported = ast2select._ProcessIsOwnerBouncing(
+        cond, 'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('User AS Cond1 ON (Issue.owner_id = Cond1.user_id OR '
+          'Issue.derived_owner_id = Cond1.user_id)',
+          [])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('(Cond1.email_bounce_timestamp IS NOT NULL AND'
+          ' Cond1.email_bounce_timestamp != %s)',
+          [0])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessIsOwnerBouncing_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['ownerbouncing']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [])
+    left_joins, where, unsupported = ast2select._ProcessIsOwnerBouncing(
+        cond, 'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([cond], unsupported)
+
+  def testProcessReporterCond(self):
+    fd = BUILTIN_ISSUE_FIELDS['reporter']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['example.com'], [])
+    left_joins, where, unsupported = ast2select._ProcessReporterCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('User AS Cond1 ON Issue.reporter_id = Cond1.user_id', [])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('(LOWER(Cond1.email) LIKE %s)', ['%example.com%'])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessReporterCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['reporter']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['example.com'], [])
+    left_joins, where, unsupported = ast2select._ProcessReporterCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual(
+        [('User AS Cond1 ON IssueSnapshot.reporter_id = Cond1.user_id', [])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('(LOWER(Cond1.email) LIKE %s)', ['%example.com%'])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessReporterIDCond(self):
+    fd = BUILTIN_ISSUE_FIELDS['reporter_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [111])
+    left_joins, where, unsupported = ast2select._ProcessReporterIDCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual([], left_joins)
+    self.assertEqual(
+        [('Issue.reporter_id = %s', [111])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessReporterIDCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['reporter_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [111])
+    left_joins, where, unsupported = ast2select._ProcessReporterIDCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual(
+        [('IssueSnapshot.reporter_id = %s', [111])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCcCond_SinglePositive(self):
+    fd = BUILTIN_ISSUE_FIELDS['cc']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['example.com'], [])
+    left_joins, where, unsupported = ast2select._ProcessCcCond(cond, 'Cond1',
+        'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('(Issue2Cc AS Cond1 JOIN User AS Spare1 '
+          'ON Cond1.cc_id = Spare1.user_id AND (LOWER(Spare1.email) LIKE %s)) '
+          'ON Issue.id = Cond1.issue_id AND Issue.shard = Cond1.issue_shard',
+          ['%example.com%'])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Spare1.email IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCcCond_SinglePositive_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['cc']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['example.com'], [])
+    left_joins, where, unsupported = ast2select._ProcessCcCond(cond, 'Cond1',
+        'Spare1', snapshot_mode=True)
+    self.assertEqual(
+        [('(IssueSnapshot2Cc AS Cond1 JOIN User AS Spare1 '
+          'ON Cond1.cc_id = Spare1.user_id AND (LOWER(Spare1.email) LIKE %s)) '
+          'ON IssueSnapshot.id = Cond1.issuesnapshot_id',
+          ['%example.com%'])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Spare1.email IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCcCond_MultiplePositive(self):
+    fd = BUILTIN_ISSUE_FIELDS['cc']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['.com', '.org'], [])
+    left_joins, where, unsupported = ast2select._ProcessCcCond(cond, 'Cond1',
+        'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('(Issue2Cc AS Cond1 JOIN User AS Spare1 '
+          'ON Cond1.cc_id = Spare1.user_id AND '
+          '(LOWER(Spare1.email) LIKE %s OR LOWER(Spare1.email) LIKE %s)) '
+          'ON Issue.id = Cond1.issue_id AND Issue.shard = Cond1.issue_shard',
+          ['%.com%', '%.org%'])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Spare1.email IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCcCond_MultiplePositive_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['cc']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['.com', '.org'], [])
+    left_joins, where, unsupported = ast2select._ProcessCcCond(cond, 'Cond1',
+        'Spare1', snapshot_mode=True)
+    self.assertEqual(
+        [('(IssueSnapshot2Cc AS Cond1 JOIN User AS Spare1 '
+          'ON Cond1.cc_id = Spare1.user_id AND '
+          '(LOWER(Spare1.email) LIKE %s OR LOWER(Spare1.email) LIKE %s)) '
+          'ON IssueSnapshot.id = Cond1.issuesnapshot_id',
+          ['%.com%', '%.org%'])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Spare1.email IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCcCond_SingleNegative(self):
+    fd = BUILTIN_ISSUE_FIELDS['cc']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.NOT_TEXT_HAS, [fd], ['example.com'], [])
+    left_joins, where, unsupported = ast2select._ProcessCcCond(cond, 'Cond1',
+        'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('(Issue2Cc AS Cond1 JOIN User AS Spare1 '
+          'ON Cond1.cc_id = Spare1.user_id AND (LOWER(Spare1.email) LIKE %s)) '
+          'ON Issue.id = Cond1.issue_id AND Issue.shard = Cond1.issue_shard',
+          ['%example.com%'])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Spare1.email IS NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCcCond_SingleNegative_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['cc']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.NOT_TEXT_HAS, [fd], ['example.com'], [])
+    left_joins, where, unsupported = ast2select._ProcessCcCond(cond, 'Cond1',
+        'Spare1', snapshot_mode=True)
+    self.assertEqual(
+        [('(IssueSnapshot2Cc AS Cond1 JOIN User AS Spare1 '
+          'ON Cond1.cc_id = Spare1.user_id AND (LOWER(Spare1.email) LIKE %s)) '
+          'ON IssueSnapshot.id = Cond1.issuesnapshot_id',
+          ['%example.com%'])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Spare1.email IS NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCcCond_Multiplenegative(self):
+    fd = BUILTIN_ISSUE_FIELDS['cc']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.NOT_TEXT_HAS, [fd], ['.com', '.org'], [])
+    left_joins, where, unsupported = ast2select._ProcessCcCond(cond, 'Cond1',
+        'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('(Issue2Cc AS Cond1 JOIN User AS Spare1 '
+          'ON Cond1.cc_id = Spare1.user_id AND '
+          '(LOWER(Spare1.email) LIKE %s OR LOWER(Spare1.email) LIKE %s)) '
+          'ON Issue.id = Cond1.issue_id AND Issue.shard = Cond1.issue_shard',
+          ['%.com%', '%.org%'])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Spare1.email IS NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCcCond_Multiplenegative_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['cc']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.NOT_TEXT_HAS, [fd], ['.com', '.org'], [])
+    left_joins, where, unsupported = ast2select._ProcessCcCond(cond, 'Cond1',
+        'Spare1', snapshot_mode=True)
+    self.assertEqual(
+        [('(IssueSnapshot2Cc AS Cond1 JOIN User AS Spare1 '
+          'ON Cond1.cc_id = Spare1.user_id AND '
+          '(LOWER(Spare1.email) LIKE %s OR LOWER(Spare1.email) LIKE %s)) '
+          'ON IssueSnapshot.id = Cond1.issuesnapshot_id',
+          ['%.com%', '%.org%'])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Spare1.email IS NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCcIDCond(self):
+    fd = BUILTIN_ISSUE_FIELDS['cc_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [111])
+    left_joins, where, unsupported = ast2select._ProcessCcIDCond(cond, 'Cond1',
+        'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Issue2Cc AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Issue.shard = Cond1.issue_shard AND '
+          'Cond1.cc_id = %s',
+         [111])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.cc_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCcIDCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['cc_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [111])
+    left_joins, where, unsupported = ast2select._ProcessCcIDCond(cond, 'Cond1',
+        'Spare1', snapshot_mode=True)
+    self.assertEqual(
+        [('IssueSnapshot2Cc AS Cond1 '
+          'ON IssueSnapshot.id = Cond1.issuesnapshot_id '
+          'AND Cond1.cc_id = %s',
+         [111])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.cc_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessStarredByCond(self):
+    fd = BUILTIN_ISSUE_FIELDS['starredby']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['example.com'], [])
+    left_joins, where, unsupported = ast2select._ProcessStarredByCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('(IssueStar AS Cond1 JOIN User AS Spare1 '
+          'ON Cond1.user_id = Spare1.user_id AND '
+          '(LOWER(Spare1.email) LIKE %s)) '
+          'ON Issue.id = Cond1.issue_id', ['%example.com%'])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Spare1.email IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessStarredByCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['starredby']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['example.com'], [])
+    left_joins, where, unsupported = ast2select._ProcessStarredByCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([cond], unsupported)
+
+  def testProcessStarredByIDCond(self):
+    fd = BUILTIN_ISSUE_FIELDS['starredby_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [111])
+    left_joins, where, unsupported = ast2select._ProcessStarredByIDCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('IssueStar AS Cond1 ON Issue.id = Cond1.issue_id '
+          'AND Cond1.user_id = %s', [111])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.user_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessStarredByIDCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['starredby_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [111])
+    left_joins, where, unsupported = ast2select._ProcessStarredByIDCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([cond], unsupported)
+
+  def testProcessCommentByCond(self):
+    fd = BUILTIN_ISSUE_FIELDS['commentby']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['example.com'], [])
+    left_joins, where, unsupported = ast2select._ProcessCommentByCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('(Comment AS Cond1 JOIN User AS Spare1 '
+          'ON Cond1.commenter_id = Spare1.user_id '
+          'AND (LOWER(Spare1.email) LIKE %s)) '
+          'ON Issue.id = Cond1.issue_id AND Cond1.deleted_by IS NULL',
+          ['%example.com%'])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Spare1.email IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCommentByCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['commentby']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.TEXT_HAS, [fd], ['example.com'], [])
+    left_joins, where, unsupported = ast2select._ProcessCommentByCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([cond], unsupported)
+
+  def testProcessCommentByIDCond_EqualsUserID(self):
+    fd = BUILTIN_ISSUE_FIELDS['commentby_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [111])
+    left_joins, where, unsupported = ast2select._ProcessCommentByIDCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Comment AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.commenter_id = %s AND Cond1.deleted_by IS NULL',
+          [111])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.commenter_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCommentByIDCond_EqualsUserID_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['commentby_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [111])
+    left_joins, where, unsupported = ast2select._ProcessCommentByIDCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([cond], unsupported)
+
+  def testProcessCommentByIDCond_QuickOr(self):
+    fd = BUILTIN_ISSUE_FIELDS['commentby_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [111, 222])
+    left_joins, where, unsupported = ast2select._ProcessCommentByIDCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Comment AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.commenter_id IN (%s,%s) '
+          'AND Cond1.deleted_by IS NULL',
+          [111, 222])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.commenter_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCommentByIDCond_NotEqualsUserID(self):
+    fd = BUILTIN_ISSUE_FIELDS['commentby_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], [], [111])
+    left_joins, where, unsupported = ast2select._ProcessCommentByIDCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Comment AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.commenter_id = %s AND Cond1.deleted_by IS NULL',
+          [111])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.commenter_id IS NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessStatusIDCond(self):
+    fd = BUILTIN_ISSUE_FIELDS['status_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [2])
+    left_joins, where, unsupported = ast2select._ProcessStatusIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual([], left_joins)
+    self.assertEqual(
+        [('(Issue.status_id = %s OR Issue.derived_status_id = %s)', [2, 2])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessStatusIDCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['status_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [2])
+    left_joins, where, unsupported = ast2select._ProcessStatusIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([('IssueSnapshot.status_id = %s', [2])], where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessSummaryCond(self):
+    fd = BUILTIN_ISSUE_FIELDS['summary']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], ['sum'], [])
+    left_joins, where, unsupported = ast2select._ProcessSummaryCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('IssueSummary AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.summary = %s', ['sum'])],
+        left_joins)
+    self.assertEqual(
+        [('Cond1.issue_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessSummaryCond_SnapshotMode(self):
+    """Issue summary is not currently included in issue snapshot, so ignore."""
+    fd = BUILTIN_ISSUE_FIELDS['summary']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], ['sum'], [])
+    left_joins, where, unsupported = ast2select._ProcessSummaryCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([cond], unsupported)
+
+  def testProcessLabelIDCond_NoValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['label_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [])
+    with self.assertRaises(ast2select.NoPossibleResults):
+      ast2select._ProcessLabelIDCond(cond, 'Cond1', 'Spare1',
+          snapshot_mode=False)
+
+  def testProcessLabelIDCond_SingleValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['label_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [1])
+    left_joins, where, unsupported = ast2select._ProcessLabelIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Issue2Label AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Issue.shard = Cond1.issue_shard AND '
+          'Cond1.label_id = %s', [1])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.label_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessLabelIDCond_SingleValue_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['label_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [1])
+    left_joins, where, unsupported = ast2select._ProcessLabelIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual(
+        [('IssueSnapshot2Label AS Cond1 '
+          'ON IssueSnapshot.id = Cond1.issuesnapshot_id AND '
+          'Cond1.label_id = %s', [1])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.label_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessLabelIDCond_MultipleValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['label_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [1, 2])
+    left_joins, where, unsupported = ast2select._ProcessLabelIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Issue2Label AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Issue.shard = Cond1.issue_shard AND '
+          'Cond1.label_id IN (%s,%s)', [1, 2])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.label_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessLabelIDCond_NegatedNoValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['label_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], [], [])
+    left_joins, where, unsupported = ast2select._ProcessLabelIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([], unsupported)
+
+  def testProcessLabelIDCond_NegatedSingleValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['label_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], [], [1])
+    left_joins, where, unsupported = ast2select._ProcessLabelIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Issue2Label AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Issue.shard = Cond1.issue_shard AND '
+          'Cond1.label_id = %s', [1])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.label_id IS NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessLabelIDCond_NegatedSingleValue_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['label_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], [], [1])
+    left_joins, where, unsupported = ast2select._ProcessLabelIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual(
+        [('IssueSnapshot2Label AS Cond1 '
+          'ON IssueSnapshot.id = Cond1.issuesnapshot_id AND '
+          'Cond1.label_id = %s', [1])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.label_id IS NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessLabelIDCond_NegatedMultipleValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['label_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], [], [1, 2])
+    left_joins, where, unsupported = ast2select._ProcessLabelIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Issue2Label AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Issue.shard = Cond1.issue_shard AND '
+          'Cond1.label_id IN (%s,%s)', [1, 2])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.label_id IS NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessComponentIDCond(self):
+    fd = BUILTIN_ISSUE_FIELDS['component_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [101])
+    left_joins, where, unsupported = ast2select._ProcessComponentIDCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Issue2Component AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Issue.shard = Cond1.issue_shard AND '
+          'Cond1.component_id = %s', [101])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.component_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessComponentIDCond_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['component_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [101])
+    left_joins, where, unsupported = ast2select._ProcessComponentIDCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual(
+        [('IssueSnapshot2Component AS Cond1 '
+          'ON IssueSnapshot.id = Cond1.issuesnapshot_id AND '
+          'Cond1.component_id = %s', [101])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.component_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessApprovalFieldCond_Status(self):
+    approval_fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='UXReview',
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.EQ, [approval_fd], ['Approved'], [],
+        key_suffix=query2ast.STATUS_SUFFIX)
+    left_joins, where, _unsupported = ast2select._ProcessApprovalFieldCond(
+        cond, 'Cond1', 'Spare1', False)
+    self.assertEqual(
+        [('Issue2ApprovalValue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.approval_id = %s AND LOWER(Cond1.status) = %s',
+          [1, 'approved'])],
+        left_joins)
+    self.assertEqual(
+        [('Cond1.approval_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+
+  def testProcessApprovalFieldCond_SetOn(self):
+    approval_fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='UXReview',
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    int_time = int(time.mktime(datetime.datetime(2016, 10, 5).timetuple()))
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.NOT_TEXT_HAS, [approval_fd], [], [int_time],
+        key_suffix=query2ast.SET_ON_SUFFIX)
+    left_joins, where, _unsupported = ast2select._ProcessApprovalFieldCond(
+        cond, 'Cond1', 'Spare1', False)
+    self.assertEqual(
+        [('Issue2ApprovalValue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.approval_id = %s AND Cond1.set_on = %s',
+          [1, int_time])],
+        left_joins)
+    self.assertEqual(
+        [('Cond1.approval_id IS NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+
+  def testProcessApprovalFieldCond_SetBy(self):
+    approval_fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='UXReview',
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.EQ, [approval_fd], ['user2@email.com'], [],
+        key_suffix=query2ast.SET_BY_SUFFIX)
+    left_joins, where, _unsupported = ast2select._ProcessApprovalFieldCond(
+        cond, 'Cond1', 'Spare1', False)
+    self.assertEqual(
+        [('User AS Spare1 ON LOWER(Spare1.email) = %s', ['user2@email.com']),
+         ('Issue2ApprovalValue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.approval_id = %s AND Cond1.setter_id = Spare1.user_id',
+          [1])],
+        left_joins)
+    self.assertEqual(
+        [('Cond1.approval_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+
+  def testProcessApprovalFieldCond_ApproverID(self):
+    approval_fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='UXReview',
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.EQ, [approval_fd], [], [111],
+        key_suffix=query2ast.APPROVER_SUFFIX)
+    left_joins, where, _unsupported = ast2select._ProcessApprovalFieldCond(
+        cond, 'Cond1', 'Spare1', False)
+    self.assertEqual(
+        [('IssueApproval2Approver AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.approval_id = %s AND Cond1.approver_id = %s',
+          [1, 111])], left_joins)
+    self.assertEqual(
+        [('Cond1.approval_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+
+
+  def testProcessApprovalFieldCond_IsDefined(self):
+    approval_fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='UXReview',
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.IS_DEFINED, [approval_fd], [], [])
+    left_joins, where, _unsupported = ast2select._ProcessApprovalFieldCond(
+        cond, 'Cond1', 'Spare1', False)
+    self.assertEqual(
+        [('Issue2ApprovalValue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.approval_id = %s',
+          [1])], left_joins)
+    self.assertEqual(
+        [('Cond1.approval_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+
+  def testProcessCustomFieldCond_IntType(self):
+    fd = tracker_pb2.FieldDef(
+      field_id=1, project_id=789, field_name='EstDays',
+      field_type=tracker_pb2.FieldTypes.INT_TYPE)
+    val = 42
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [val])
+    left_joins, where, unsupported = ast2select._ProcessCustomFieldCond(
+        cond, 'Cond1', 'Spare1', 'Phase', snapshot_mode=False)
+    self.assertEqual(
+        [('Issue2FieldValue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Issue.shard = Cond1.issue_shard AND '
+          'Cond1.field_id = %s AND '
+          'Cond1.int_value = %s', [1, val])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.field_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCustomFieldCond_StrType(self):
+    fd = tracker_pb2.FieldDef(
+      field_id=1, project_id=789, field_name='Nickname',
+      field_type=tracker_pb2.FieldTypes.STR_TYPE)
+    val = 'Fuzzy'
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [val], [])
+    left_joins, where, unsupported = ast2select._ProcessCustomFieldCond(
+        cond, 'Cond1', 'Spare1','Phase1', snapshot_mode=False)
+    self.assertEqual(
+        [('Issue2FieldValue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Issue.shard = Cond1.issue_shard AND '
+          'Cond1.field_id = %s AND '
+          'Cond1.str_value = %s', [1, val])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.field_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCustomFieldCond_StrType_SnapshotMode(self):
+    fd = tracker_pb2.FieldDef(
+      field_id=1, project_id=789, field_name='Nickname',
+      field_type=tracker_pb2.FieldTypes.STR_TYPE)
+    val = 'Fuzzy'
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [val], [])
+    left_joins, where, unsupported = ast2select._ProcessCustomFieldCond(
+        cond, 'Cond1', 'Spare1', 'Phase1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([cond], unsupported)
+
+  def testProcessCustomFieldCond_UserType_ByID(self):
+    fd = tracker_pb2.FieldDef(
+      field_id=1, project_id=789, field_name='ExecutiveProducer',
+      field_type=tracker_pb2.FieldTypes.USER_TYPE)
+    val = 111
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [val])
+    left_joins, where, unsupported = ast2select._ProcessCustomFieldCond(
+        cond, 'Cond1', 'Spare1', 'Phase1', snapshot_mode=False)
+    self.assertEqual(
+        [('Issue2FieldValue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Issue.shard = Cond1.issue_shard AND '
+          'Cond1.field_id = %s AND '
+          'Cond1.user_id = %s', [1, val])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.field_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCustomFieldCond_UserType_ByEmail(self):
+    fd = tracker_pb2.FieldDef(
+      field_id=1, project_id=789, field_name='ExecutiveProducer',
+      field_type=tracker_pb2.FieldTypes.USER_TYPE)
+    val = 'exec@example.com'
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [val], [])
+    left_joins, where, unsupported = ast2select._ProcessCustomFieldCond(
+        cond, 'Cond1', 'Spare1', 'Phase1',  snapshot_mode=False)
+    self.assertEqual(
+        [('User AS Spare1 ON '
+          'LOWER(Spare1.email) = %s', [val]),
+         ('Issue2FieldValue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Issue.shard = Cond1.issue_shard AND '
+          'Cond1.field_id = %s AND '
+          'Cond1.user_id = Spare1.user_id', [1])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertTrue(sql._IsValidJoin(left_joins[1][0]))
+    self.assertEqual(
+        [('Cond1.field_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCustomFieldCond_DateType(self):
+    fd = tracker_pb2.FieldDef(
+      field_id=1, project_id=789, field_name='Deadline',
+      field_type=tracker_pb2.FieldTypes.DATE_TYPE)
+    val = int(time.mktime(datetime.datetime(2016, 10, 5).timetuple()))
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [val])
+    left_joins, where, unsupported = ast2select._ProcessCustomFieldCond(
+        cond, 'Cond1', 'Spare1', 'Phase1', snapshot_mode=False)
+    self.assertEqual(
+        [('Issue2FieldValue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Issue.shard = Cond1.issue_shard AND '
+          'Cond1.field_id = %s AND '
+          'Cond1.date_value = %s', [1, val])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('Cond1.field_id IS NOT NULL', [])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessCustomFieldCond_PhaseName(self):
+    fd = tracker_pb2.FieldDef(
+      field_id=1, project_id=789, field_name='Milestone',
+      field_type=tracker_pb2.FieldTypes.INT_TYPE)
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [72],
+                            phase_name='Canary')
+    left_joins, where, unsupported = ast2select._ProcessCustomFieldCond(
+        cond, 'Cond1', 'User1', 'Phase1', snapshot_mode=False)
+    self.assertEqual(
+        [('IssuePhaseDef AS Phase1 ON LOWER(Phase1.name) = %s', ['Canary']),
+        ('Issue2FieldValue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+         'Issue.shard = Cond1.issue_shard AND '
+         'Cond1.field_id = %s AND Cond1.int_value = %s AND '
+         'Cond1.phase_id = Phase1.id', [1, 72])],
+        left_joins)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessAttachmentCond_HasAttachment(self):
+    fd = BUILTIN_ISSUE_FIELDS['attachment']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.IS_DEFINED, [fd], [], [])
+    left_joins, where, unsupported = ast2select._ProcessAttachmentCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual([], left_joins)
+    self.assertEqual(
+        [('(Issue.attachment_count IS NOT NULL AND '
+          'Issue.attachment_count != %s)',
+          [0])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.IS_NOT_DEFINED, [fd], [], [])
+    left_joins, where, unsupported = ast2select._ProcessAttachmentCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual([], left_joins)
+    self.assertEqual(
+        [('(Issue.attachment_count IS NULL OR '
+          'Issue.attachment_count = %s)',
+          [0])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessAttachmentCond_HasAttachment_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['attachment']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.IS_DEFINED, [fd], [], [])
+    left_joins, where, unsupported = ast2select._ProcessAttachmentCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], where)
+    self.assertEqual([cond], unsupported)
+
+  def testProcessAttachmentCond_TextHas(self):
+    fd = BUILTIN_ISSUE_FIELDS['attachment']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.TEXT_HAS, [fd], ['jpg'], [])
+    left_joins, where, unsupported = ast2select._ProcessAttachmentCond(
+        cond, 'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Attachment AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.deleted = %s',
+          [False])],
+        left_joins)
+    self.assertTrue(sql._IsValidJoin(left_joins[0][0]))
+    self.assertEqual(
+        [('(Cond1.filename LIKE %s)', ['%jpg%'])],
+        where)
+    self.assertTrue(sql._IsValidWhereCond(where[0][0]))
+    self.assertEqual([], unsupported)
+
+  def testProcessHotlistIDCond_MultiValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['hotlist_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [1, 2])
+    left_joins, where, unsupported = ast2select._ProcessHotlistIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Hotlist2Issue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.hotlist_id IN (%s,%s)', [1, 2])],
+        left_joins)
+    self.assertEqual(
+        [('Cond1.hotlist_id IS NOT NULL', [])],
+        where)
+    self.assertEqual([], unsupported)
+
+  def testProcessHotlistIDCond_MultiValue_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['hotlist_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [1, 2])
+    left_joins, where, unsupported = ast2select._ProcessHotlistIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual(
+        [('IssueSnapshot2Hotlist AS Cond1 '
+          'ON IssueSnapshot.id = Cond1.issuesnapshot_id AND '
+          'Cond1.hotlist_id IN (%s,%s)', [1, 2])],
+        left_joins)
+    self.assertEqual(
+        [('Cond1.hotlist_id IS NOT NULL', [])],
+        where)
+    self.assertEqual([], unsupported)
+
+  def testProcessHotlistIDCond_SingleValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['hotlist_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], [], [1])
+    left_joins, where, unsupported = ast2select._ProcessHotlistIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Hotlist2Issue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.hotlist_id = %s', [1])],
+        left_joins)
+    self.assertEqual(
+        [('Cond1.hotlist_id IS NOT NULL', [])],
+        where)
+    self.assertEqual([], unsupported)
+
+  def testProcessHotlistIDCond_NegatedMultiValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['hotlist_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], [], [1, 2])
+    left_joins, where, unsupported = ast2select._ProcessHotlistIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Hotlist2Issue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.hotlist_id IN (%s,%s)', [1, 2])],
+        left_joins)
+    self.assertEqual(
+        [('Cond1.hotlist_id IS NULL', [])],
+        where)
+    self.assertEqual([], unsupported)
+
+  def testProcessHotlistIDCond_NegatedMultiValue_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['hotlist_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], [], [1, 2])
+    left_joins, where, unsupported = ast2select._ProcessHotlistIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual(
+        [('IssueSnapshot2Hotlist AS Cond1 '
+          'ON IssueSnapshot.id = Cond1.issuesnapshot_id AND '
+          'Cond1.hotlist_id IN (%s,%s)', [1, 2])],
+        left_joins)
+    self.assertEqual(
+        [('Cond1.hotlist_id IS NULL', [])],
+        where)
+    self.assertEqual([], unsupported)
+
+  def testProcessHotlistIDCond_NegatedSingleValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['hotlist_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], [], [1])
+    left_joins, where, unsupported = ast2select._ProcessHotlistIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+        [('Hotlist2Issue AS Cond1 ON Issue.id = Cond1.issue_id AND '
+          'Cond1.hotlist_id = %s', [1])],
+        left_joins)
+    self.assertEqual(
+        [('Cond1.hotlist_id IS NULL', [])],
+        where)
+    self.assertEqual([], unsupported)
+
+  def testProcessHotlistIDCond_NegatedSingleValue_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['hotlist_id']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], [], [1])
+    left_joins, where, unsupported = ast2select._ProcessHotlistIDCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual(
+        [('IssueSnapshot2Hotlist AS Cond1 '
+          'ON IssueSnapshot.id = Cond1.issuesnapshot_id AND '
+          'Cond1.hotlist_id = %s', [1])],
+        left_joins)
+    self.assertEqual(
+        [('Cond1.hotlist_id IS NULL', [])],
+        where)
+    self.assertEqual([], unsupported)
+
+  def testProcessHotlistCond_SingleValue(self):
+    fd = BUILTIN_ISSUE_FIELDS['hotlist']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], ['invalid:spa'], [])
+    left_joins, where, unsupported = ast2select._ProcessHotlistCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+      [('(Hotlist2Issue JOIN Hotlist AS Cond1 ON '
+        'Hotlist2Issue.hotlist_id = Cond1.id AND (LOWER(Cond1.name) LIKE %s))'
+        ' ON Issue.id = Hotlist2Issue.issue_id', ['%spa%'])],
+      left_joins)
+    self.assertEqual([('Cond1.name IS NOT NULL', [])], where)
+    self.assertEqual([], unsupported)
+
+  def testProcessHotlistCond_SingleValue_SnapshotMode(self):
+    fd = BUILTIN_ISSUE_FIELDS['hotlist']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd], ['invalid:spa'], [])
+    left_joins, where, unsupported = ast2select._ProcessHotlistCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=True)
+    self.assertEqual(
+      [('(IssueSnapshot2Hotlist JOIN Hotlist AS Cond1 ON '
+        'IssueSnapshot2Hotlist.hotlist_id = Cond1.id '
+        'AND (LOWER(Cond1.name) LIKE %s)) '
+        'ON IssueSnapshot.id = IssueSnapshot2Hotlist.issuesnapshot_id',
+        ['%spa%'])],
+      left_joins)
+    self.assertEqual([('Cond1.name IS NOT NULL', [])], where)
+    self.assertEqual([], unsupported)
+
+  def testProcessHotlistCond_SingleValue2(self):
+    fd = BUILTIN_ISSUE_FIELDS['hotlist']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.EQ, [fd],
+                            ['invalid:spa', 'port', 'invalid2:barc'], [])
+    left_joins, where, unsupported = ast2select._ProcessHotlistCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+      [('(Hotlist2Issue JOIN Hotlist AS Cond1 ON '
+        'Hotlist2Issue.hotlist_id = Cond1.id AND (LOWER(Cond1.name) LIKE %s OR '
+        'LOWER(Cond1.name) LIKE %s OR LOWER(Cond1.name) LIKE %s)) ON '
+        'Issue.id = Hotlist2Issue.issue_id', ['%spa%', '%port%', '%barc%'])],
+      left_joins)
+    self.assertEqual([('Cond1.name IS NOT NULL', [])], where)
+    self.assertEqual([], unsupported)
+
+  def testProcessHotlistCond_SingleValue3(self):
+    fd = BUILTIN_ISSUE_FIELDS['hotlist']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NE, [fd], ['invalid:spa'], [])
+    left_joins, where, unsupported = ast2select._ProcessHotlistCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+      [('(Hotlist2Issue JOIN Hotlist AS Cond1 ON '
+        'Hotlist2Issue.hotlist_id = Cond1.id AND (LOWER(Cond1.name) LIKE %s))'
+        ' ON Issue.id = Hotlist2Issue.issue_id', ['%spa%'])],
+      left_joins)
+    self.assertEqual([('Cond1.name IS NULL', [])], where)
+    self.assertEqual([], unsupported)
+
+  def testProcessHotlistCond_SingleValue4(self):
+    fd = BUILTIN_ISSUE_FIELDS['hotlist']
+    cond = ast_pb2.MakeCond(ast_pb2.QueryOp.NOT_TEXT_HAS, [fd],
+                            ['invalid:spa', 'port', 'invalid2:barc'], [])
+    left_joins, where, unsupported = ast2select._ProcessHotlistCond(cond,
+        'Cond1', 'Spare1', snapshot_mode=False)
+    self.assertEqual(
+      [('(Hotlist2Issue JOIN Hotlist AS Cond1 ON '
+        'Hotlist2Issue.hotlist_id = Cond1.id AND (LOWER(Cond1.name) LIKE %s OR '
+        'LOWER(Cond1.name) LIKE %s OR LOWER(Cond1.name) LIKE %s)) ON '
+        'Issue.id = Hotlist2Issue.issue_id', ['%spa%', '%port%', '%barc%'])],
+      left_joins)
+    self.assertEqual([('Cond1.name IS NULL', [])], where)
+    self.assertEqual([], unsupported)
+
+  def testProcessPhaseCond_HasGateEQ(self):
+    fd = BUILTIN_ISSUE_FIELDS['gate']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.EQ, [fd], ['canary', 'stable'], [])
+    left_joins, where, unsupported = ast2select._ProcessPhaseCond(
+        cond, 'Cond1', 'Phase1', False)
+    self.assertEqual(
+        [('(Issue2ApprovalValue AS Cond1 JOIN IssuePhaseDef AS Phase1 '
+          'ON Cond1.phase_id = Phase1.id AND '
+          'LOWER(Phase1.name) IN (%s,%s)) '
+          'ON Issue.id = Cond1.issue_id', ['canary', 'stable'])],
+        left_joins)
+    self.assertEqual([('Phase1.name IS NOT NULL', [])], where)
+    self.assertEqual([], unsupported)
+
+  def testProcessPhaseCond_NoGateTEXT(self):
+    fd = BUILTIN_ISSUE_FIELDS['gate']
+    cond = ast_pb2.MakeCond(
+        ast_pb2.QueryOp.NOT_TEXT_HAS, [fd], ['canary', 'stable'], [])
+    left_joins, where, unsupported = ast2select._ProcessPhaseCond(
+        cond, 'Cond1', 'Phase1', False)
+    self.assertEqual(
+        [('(Issue2ApprovalValue AS Cond1 JOIN IssuePhaseDef AS Phase1 '
+          'ON Cond1.phase_id = Phase1.id AND '
+          '(LOWER(Phase1.name) LIKE %s '
+          'OR LOWER(Phase1.name) LIKE %s)) '
+          'ON Issue.id = Cond1.issue_id', ['%canary%', '%stable%'])],
+        left_joins)
+    self.assertEqual([('Phase1.name IS NULL', [])], where)
+    self.assertEqual([], unsupported)
+
+  def testCompare_IntTypes(self):
+    val_type = tracker_pb2.FieldTypes.INT_TYPE
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.IS_DEFINED, val_type, 'col', [1, 2])
+    self.assertEqual('(Alias.col IS NOT NULL AND Alias.col != %s)', cond_str)
+    self.assertEqual([0], cond_args)
+
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.EQ, val_type, 'col', [1])
+    self.assertEqual('Alias.col = %s', cond_str)
+    self.assertEqual([1], cond_args)
+
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.EQ, val_type, 'col', [1, 2])
+    self.assertEqual('Alias.col IN (%s,%s)', cond_str)
+    self.assertEqual([1, 2], cond_args)
+
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.NE, val_type, 'col', [])
+    self.assertEqual('TRUE', cond_str)
+    self.assertEqual([], cond_args)
+
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.NE, val_type, 'col', [1])
+    self.assertEqual('(Alias.col IS NULL OR Alias.col != %s)', cond_str)
+    self.assertEqual([1], cond_args)
+
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.NE, val_type, 'col', [1, 2])
+    self.assertEqual('(Alias.col IS NULL OR Alias.col NOT IN (%s,%s))',
+                     cond_str)
+    self.assertEqual([1, 2], cond_args)
+
+  def testCompare_STRTypes(self):
+    val_type = tracker_pb2.FieldTypes.STR_TYPE
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.IS_DEFINED, val_type, 'col', ['a', 'b'])
+    self.assertEqual('(Alias.col IS NOT NULL AND Alias.col != %s)', cond_str)
+    self.assertEqual([''], cond_args)
+
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.EQ, val_type, 'col', ['a'])
+    self.assertEqual('Alias.col = %s', cond_str)
+    self.assertEqual(['a'], cond_args)
+
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.EQ, val_type, 'col', ['a', 'b'])
+    self.assertEqual('Alias.col IN (%s,%s)', cond_str)
+    self.assertEqual(['a', 'b'], cond_args)
+
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.NE, val_type, 'col', [])
+    self.assertEqual('TRUE', cond_str)
+    self.assertEqual([], cond_args)
+
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.NE, val_type, 'col', ['a'])
+    self.assertEqual('(Alias.col IS NULL OR Alias.col != %s)', cond_str)
+    self.assertEqual(['a'], cond_args)
+
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.NE, val_type, 'col', ['a', 'b'])
+    self.assertEqual('(Alias.col IS NULL OR Alias.col NOT IN (%s,%s))',
+                     cond_str)
+    self.assertEqual(['a', 'b'], cond_args)
+
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.TEXT_HAS, val_type, 'col', ['a'])
+    self.assertEqual('(Alias.col LIKE %s)', cond_str)
+    self.assertEqual(['%a%'], cond_args)
+
+    cond_str, cond_args = ast2select._Compare(
+        'Alias', ast_pb2.QueryOp.NOT_TEXT_HAS, val_type, 'col', ['a'])
+    self.assertEqual('(Alias.col IS NULL OR Alias.col NOT LIKE %s)', cond_str)
+    self.assertEqual(['%a%'], cond_args)
+
+  def testCompareAlreadyJoined(self):
+    cond_str, cond_args = ast2select._CompareAlreadyJoined(
+        'Alias', ast_pb2.QueryOp.EQ, 'col')
+    self.assertEqual('Alias.col IS NOT NULL', cond_str)
+    self.assertEqual([], cond_args)
+
+    cond_str, cond_args = ast2select._CompareAlreadyJoined(
+        'Alias', ast_pb2.QueryOp.NE, 'col')
+    self.assertEqual('Alias.col IS NULL', cond_str)
+    self.assertEqual([], cond_args)
diff --git a/search/test/ast2sort_test.py b/search/test/ast2sort_test.py
new file mode 100644
index 0000000..9d365e8
--- /dev/null
+++ b/search/test/ast2sort_test.py
@@ -0,0 +1,373 @@
+# 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
+
+"""Tests for the ast2sort module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from proto import tracker_pb2
+from search import ast2sort
+from search import query2ast
+
+
+BUILTIN_ISSUE_FIELDS = query2ast.BUILTIN_ISSUE_FIELDS
+ANY_FIELD = query2ast.BUILTIN_ISSUE_FIELDS['any_field']
+
+
+class AST2SortTest(unittest.TestCase):
+
+  def setUp(self):
+    self.harmonized_labels = [
+        (101, 0, 'Hot'), (102, 1, 'Cold'), (103, None, 'Odd')]
+    self.harmonized_statuses = [
+        (201, 0, 'New'), (202, 1, 'Assigned'), (203, None, 'OnHold')]
+    self.harmonized_fields = []
+    self.fmt = lambda string, **kwords: string
+
+  def testBuildSortClauses_EmptySortDirectives(self):
+    left_joins, order_by = ast2sort.BuildSortClauses(
+        [], self.harmonized_labels, self.harmonized_statuses,
+        self.harmonized_fields)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], order_by)
+
+  def testBuildSortClauses_Normal(self):
+    left_joins, order_by = ast2sort.BuildSortClauses(
+        ['stars', 'status', 'pri', 'reporter', 'id'], self.harmonized_labels,
+        self.harmonized_statuses, self.harmonized_fields)
+    expected_left_joins = [
+        ('User AS Sort3 ON Issue.reporter_id = Sort3.user_id', [])]
+    expected_order_by = [
+        ('Issue.star_count ASC', []),
+        ('FIELD(IF(ISNULL(Issue.status_id), Issue.derived_status_id, '
+         'Issue.status_id), %s,%s) DESC', [201, 202]),
+        ('FIELD(IF(ISNULL(Issue.status_id), Issue.derived_status_id, '
+         'Issue.status_id), %s) DESC', [203]),
+        ('ISNULL(Sort3.email) ASC', []),
+        ('Sort3.email ASC', []),
+        ('Issue.local_id ASC', [])]
+    self.assertEqual(expected_left_joins, left_joins)
+    self.assertEqual(expected_order_by, order_by)
+
+  def testProcessProjectSD(self):
+    left_joins, order_by = ast2sort._ProcessProjectSD(self.fmt)
+    self.assertEqual([], left_joins)
+    self.assertEqual(
+        [('Issue.project_id {sort_dir}', [])],
+        order_by)
+
+  def testProcessReporterSD(self):
+    left_joins, order_by = ast2sort._ProcessReporterSD(self.fmt)
+    self.assertEqual(
+        [('User AS {alias} ON Issue.reporter_id = {alias}.user_id', [])],
+        left_joins)
+    self.assertEqual(
+        [('ISNULL({alias}.email) {sort_dir}', []),
+         ('{alias}.email {sort_dir}', [])],
+        order_by)
+
+  def testProcessOwnerSD(self):
+    left_joins, order_by = ast2sort._ProcessOwnerSD(self.fmt)
+    self.assertEqual(
+        [('User AS {alias}_exp ON Issue.owner_id = {alias}_exp.user_id', []),
+         ('User AS {alias}_der ON '
+          'Issue.derived_owner_id = {alias}_der.user_id', [])],
+        left_joins)
+    self.assertEqual(
+        [('(ISNULL({alias}_exp.email) AND ISNULL({alias}_der.email)) '
+          '{sort_dir}', []),
+         ('CONCAT({alias}_exp.email, {alias}_der.email) {sort_dir}', [])],
+        order_by)
+
+  def testProcessCcSD(self):
+    left_joins, order_by = ast2sort._ProcessCcSD(self.fmt)
+    self.assertEqual(
+        [('Issue2Cc AS {alias} ON Issue.id = {alias}.issue_id '
+          'LEFT JOIN User AS {alias}_user '
+          'ON {alias}.cc_id = {alias}_user.user_id', [])],
+        left_joins)
+    self.assertEqual(
+        [('ISNULL({alias}_user.email) {sort_dir}', []),
+         ('{alias}_user.email {sort_dir}', [])],
+        order_by)
+
+  def testProcessComponentSD(self):
+    left_joins, order_by = ast2sort._ProcessComponentSD(self.fmt)
+    self.assertEqual(
+        [('Issue2Component AS {alias} ON Issue.id = {alias}.issue_id '
+          'LEFT JOIN ComponentDef AS {alias}_component '
+          'ON {alias}.component_id = {alias}_component.id', [])],
+        left_joins)
+    self.assertEqual(
+        [('ISNULL({alias}_component.path) {sort_dir}', []),
+         ('{alias}_component.path {sort_dir}', [])],
+        order_by)
+
+  def testProcessSummarySD(self):
+    left_joins, order_by = ast2sort._ProcessSummarySD(self.fmt)
+    self.assertEqual(
+        [('IssueSummary AS {alias} ON Issue.id = {alias}.issue_id', [])],
+        left_joins)
+    self.assertEqual(
+        [('{alias}.summary {sort_dir}', [])],
+        order_by)
+
+  def testProcessStatusSD(self):
+    pass  # TODO(jrobbins): fill in this test case
+
+  def testProcessBlockedSD(self):
+    left_joins, order_by = ast2sort._ProcessBlockedSD(self.fmt)
+    self.assertEqual(
+        [('IssueRelation AS {alias} ON Issue.id = {alias}.issue_id '
+          'AND {alias}.kind = %s', ['blockedon'])],
+        left_joins)
+    self.assertEqual(
+        [('ISNULL({alias}.dst_issue_id) {sort_dir}', [])],
+        order_by)
+
+  def testProcessBlockedOnSD(self):
+    left_joins, order_by = ast2sort._ProcessBlockedOnSD(self.fmt)
+    self.assertEqual(
+        [('IssueRelation AS {alias} ON Issue.id = {alias}.issue_id '
+          'AND {alias}.kind = %s', ['blockedon'])],
+        left_joins)
+    self.assertEqual(
+        [('ISNULL({alias}.dst_issue_id) {sort_dir}', []),
+         ('{alias}.dst_issue_id {sort_dir}', [])],
+        order_by)
+
+  def testProcessBlockingSD(self):
+    left_joins, order_by = ast2sort._ProcessBlockingSD(self.fmt)
+    self.assertEqual(
+        [('IssueRelation AS {alias} ON Issue.id = {alias}.dst_issue_id '
+          'AND {alias}.kind = %s', ['blockedon'])],
+        left_joins)
+    self.assertEqual(
+        [('ISNULL({alias}.issue_id) {sort_dir}', []),
+         ('{alias}.issue_id {sort_dir}', [])],
+        order_by)
+
+  def testProcessMergedIntoSD(self):
+    left_joins, order_by = ast2sort._ProcessMergedIntoSD(self.fmt)
+    self.assertEqual(
+        [('IssueRelation AS {alias} ON Issue.id = {alias}.issue_id '
+          'AND {alias}.kind = %s', ['mergedinto'])],
+        left_joins)
+    self.assertEqual(
+        [('ISNULL({alias}.dst_issue_id) {sort_dir}', []),
+         ('{alias}.dst_issue_id {sort_dir}', [])],
+        order_by)
+
+  def testProcessCustomAndLabelSD(self):
+    pass  # TODO(jrobbins): fill in this test case
+
+  def testProcessCustomAndLabelSD_PhaseField(self):
+    harmonized_labels = []
+    bear_fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='DropBear', project_id=789,
+        field_type=tracker_pb2.FieldTypes.INT_TYPE)
+    bear2_fd = tracker_pb2.FieldDef(
+        field_id=2, field_name='DropBear', project_id=788,
+        field_type=tracker_pb2.FieldTypes.STR_TYPE)
+    koala_fd = tracker_pb2.FieldDef(
+        field_id=3, field_name='koala', project_id=789,
+        field_type=tracker_pb2.FieldTypes.INT_TYPE)
+    bear_app_fd = tracker_pb2.FieldDef(
+        field_id=4, field_name='dropbear', project_id=789,
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    harmonized_fields = [bear_fd, bear2_fd, koala_fd, bear_app_fd]
+    phase_name = 'stable'
+    alias = 'Sort0'
+    sort_dir = 'DESC'
+    sd = 'stable.dropbear'
+    left_joins, order_by = ast2sort._ProcessCustomAndLabelSD(
+        sd, harmonized_labels, harmonized_fields, alias, sort_dir,
+        self.fmt)
+
+    expected_joins = []
+    expected_order = []
+    int_left_joins, int_order_by = ast2sort._CustomFieldSortClauses(
+        [bear_fd, bear2_fd], tracker_pb2.FieldTypes.INT_TYPE, 'int_value',
+        alias, sort_dir, phase_name=phase_name)
+    str_left_joins, str_order_by = ast2sort._CustomFieldSortClauses(
+        [bear_fd, bear2_fd], tracker_pb2.FieldTypes.STR_TYPE, 'str_value',
+        alias, sort_dir, phase_name=phase_name)
+    user_left_joins, user_order_by = ast2sort._CustomFieldSortClauses(
+        [bear_fd, bear2_fd], tracker_pb2.FieldTypes.USER_TYPE, 'user_id',
+        alias, sort_dir, phase_name=phase_name)
+    label_left_joinss, label_order_by = ast2sort._LabelSortClauses(
+        sd, harmonized_labels, self.fmt)
+    expected_joins.extend(
+        int_left_joins + str_left_joins + user_left_joins + label_left_joinss)
+    expected_order.extend(
+        int_order_by + str_order_by + user_order_by + label_order_by)
+    self.assertEqual(left_joins, expected_joins)
+    self.assertEqual(order_by, expected_order)
+
+  def testApprovalFieldSortClauses_Status(self):
+    approval_fd_list = [
+        tracker_pb2.FieldDef(field_id=2, project_id=789,
+                             field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE),
+        tracker_pb2.FieldDef(field_id=4, project_id=788,
+                             field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    ]
+    left_joins, order_by = ast2sort._ApprovalFieldSortClauses(
+        approval_fd_list, '-status', self.fmt)
+
+    self.assertEqual(
+        [('{tbl_name} AS {alias}_approval '
+          'ON Issue.id = {alias}_approval.issue_id '
+          'AND {alias}_approval.approval_id IN ({approval_ids_ph})', [2, 4])],
+        left_joins)
+
+    self.assertEqual(
+        [('FIELD({alias}_approval.status, {approval_status_ph}) {rev_sort_dir}',
+          ast2sort.APPROVAL_STATUS_SORT_ORDER)],
+        order_by)
+
+  def testApprovalFieldSortClauses_Approver(self):
+    approval_fd_list = [
+        tracker_pb2.FieldDef(field_id=2, project_id=789,
+                             field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE),
+        tracker_pb2.FieldDef(field_id=4, project_id=788,
+                             field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    ]
+    left_joins, order_by = ast2sort._ApprovalFieldSortClauses(
+        approval_fd_list, '-approver', self.fmt)
+
+    self.assertEqual(
+        [('{tbl_name} AS {alias}_approval '
+          'ON Issue.id = {alias}_approval.issue_id '
+          'AND {alias}_approval.approval_id IN ({approval_ids_ph})', [2, 4]),
+         ('User AS {alias}_approval_user '
+          'ON {alias}_approval.approver_id = {alias}_approval_user.user_id',
+          [])],
+        left_joins)
+
+    self.assertEqual(
+        [('ISNULL({alias}_approval_user.email) {sort_dir}', []),
+         ('{alias}_approval_user.email {sort_dir}', [])],
+        order_by)
+
+  def testLabelSortClauses_NoSuchLabels(self):
+    sd = 'somethingelse'
+    harmonized_labels = [
+      (101, 0, 'Type-Defect'),
+      (102, 1, 'Type-Enhancement'),
+      (103, 2, 'Type-Task'),
+      (104, 0, 'Priority-High'),
+      (199, None, 'Type-Laundry'),
+      ]
+    left_joins, order_by = ast2sort._LabelSortClauses(
+      sd, harmonized_labels, self.fmt)
+    self.assertEqual([], left_joins)
+    self.assertEqual([], order_by)
+
+  def testLabelSortClauses_Normal(self):
+    sd = 'type'
+    harmonized_labels = [
+      (101, 0, 'Type-Defect'),
+      (102, 1, 'Type-Enhancement'),
+      (103, 2, 'Type-Task'),
+      (104, 0, 'Priority-High'),
+      (199, None, 'Type-Laundry'),
+      ]
+    left_joins, order_by = ast2sort._LabelSortClauses(
+      sd, harmonized_labels, self.fmt)
+    self.assertEqual(1, len(left_joins))
+    self.assertEqual(
+      ('Issue2Label AS {alias} ON Issue.id = {alias}.issue_id AND '
+       '{alias}.label_id IN ({all_label_ph})',
+       [101, 102, 103, 199]),
+      left_joins[0])
+    self.assertEqual(2, len(order_by))
+    self.assertEqual(
+      ('FIELD({alias}.label_id, {wk_label_ph}) {rev_sort_dir}',
+       [101, 102, 103]),
+      order_by[0])
+    self.assertEqual(
+      ('FIELD({alias}.label_id, {odd_label_ph}) {rev_sort_dir}',
+       [199]),
+      order_by[1])
+
+  def testCustomFieldSortClauses_Normal(self):
+    fd_list = [
+      tracker_pb2.FieldDef(field_id=1, project_id=789,
+                           field_type=tracker_pb2.FieldTypes.INT_TYPE),
+      tracker_pb2.FieldDef(field_id=2, project_id=788,
+                           field_type=tracker_pb2.FieldTypes.STR_TYPE),
+    ]
+    left_joins, order_by = ast2sort._CustomFieldSortClauses(
+        fd_list, tracker_pb2.FieldTypes.INT_TYPE, 'int_value', 'Sort0', 'DESC')
+
+    self.assertEqual(
+        left_joins, [
+            ('Issue2FieldValue AS Sort0_int_value '
+             'ON Issue.id = Sort0_int_value.issue_id '
+             'AND Sort0_int_value.field_id IN (%s)', [1]),
+        ])
+    self.assertEqual(
+        order_by, [
+            ('ISNULL(Sort0_int_value.int_value) DESC', []),
+            ('Sort0_int_value.int_value DESC', []),
+        ])
+
+  def testCustomFieldSortClauses_PhaseUser(self):
+    fd_list = [
+      tracker_pb2.FieldDef(field_id=1, project_id=789,
+                           field_type=tracker_pb2.FieldTypes.INT_TYPE),
+      tracker_pb2.FieldDef(field_id=2, project_id=788,
+                           field_type=tracker_pb2.FieldTypes.STR_TYPE),
+      tracker_pb2.FieldDef(field_id=3, project_id=788,
+                           field_type=tracker_pb2.FieldTypes.USER_TYPE),
+    ]
+    left_joins, order_by = ast2sort._CustomFieldSortClauses(
+        fd_list, tracker_pb2.FieldTypes.USER_TYPE, 'user_id', 'Sort0', 'DESC',
+        phase_name='Stable')
+
+    self.assertEqual(
+        left_joins, [
+            ('Issue2FieldValue AS Sort0_user_id '
+             'ON Issue.id = Sort0_user_id.issue_id '
+             'AND Sort0_user_id.field_id IN (%s)', [3]),
+            ('IssuePhaseDef AS Sort0_user_id_phase '
+             'ON Sort0_user_id.phase_id = Sort0_user_id_phase.id '
+             'AND LOWER(Sort0_user_id_phase.name) = LOWER(%s)', ['Stable']),
+            ('User AS Sort0_user_id_user '
+             'ON Sort0_user_id.user_id = Sort0_user_id_user.user_id', []),
+        ])
+    self.assertEqual(
+        order_by, [
+            ('ISNULL(Sort0_user_id_user.email) DESC', []),
+            ('Sort0_user_id_user.email DESC', []),
+        ])
+
+  def testOneSortDirective_NativeSortable(self):
+    left_joins, order_by = ast2sort._OneSortDirective(
+        1, 'opened', self.harmonized_labels, self.harmonized_statuses,
+        self.harmonized_fields)
+    self.assertEqual([], left_joins)
+    self.assertEqual([('Issue.opened ASC', [])], order_by)
+
+    left_joins, order_by = ast2sort._OneSortDirective(
+        1, 'stars', self.harmonized_labels, self.harmonized_statuses,
+        self.harmonized_fields)
+    self.assertEqual([], left_joins)
+    self.assertEqual([('Issue.star_count ASC', [])], order_by)
+
+    left_joins, order_by = ast2sort._OneSortDirective(
+        1, '-stars', self.harmonized_labels, self.harmonized_statuses,
+        self.harmonized_fields)
+    self.assertEqual([], left_joins)
+    self.assertEqual([('Issue.star_count DESC', [])], order_by)
+
+    left_joins, order_by = ast2sort._OneSortDirective(
+        1, 'componentmodified', self.harmonized_labels,
+        self.harmonized_statuses, self.harmonized_fields)
+    self.assertEqual([], left_joins)
+    self.assertEqual([('Issue.component_modified ASC', [])], order_by)
diff --git a/search/test/backendnonviewable_test.py b/search/test/backendnonviewable_test.py
new file mode 100644
index 0000000..6c50fb7
--- /dev/null
+++ b/search/test/backendnonviewable_test.py
@@ -0,0 +1,165 @@
+# 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
+
+"""Unittests for monorail.search.backendnonviewable."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+import mox
+
+from google.appengine.api import memcache
+from google.appengine.ext import testbed
+
+from framework import permissions
+from search import backendnonviewable
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class BackendNonviewableTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        )
+    self.project = self.services.project.TestAddProject(
+      'proj', project_id=789)
+    self.mr = testing_helpers.MakeMonorailRequest()
+    self.mr.specified_project_id = 789
+    self.mr.shard_id = 2
+    self.mr.invalidation_timestep = 12345
+
+    self.servlet = backendnonviewable.BackendNonviewable(
+        'req', 'res', services=self.services)
+
+    self.mox = mox.Mox()
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testHandleRequest(self):
+    pass  # TODO(jrobbins): fill in this test.
+
+  def testGetNonviewableIIDs_OwnerOrAdmin(self):
+    """Check the special case for users who are never restricted."""
+    perms = permissions.OWNER_ACTIVE_PERMISSIONSET
+    nonviewable_iids = self.servlet.GetNonviewableIIDs(
+      self.mr.cnxn, self.mr.auth.user_pb, {111}, self.project, perms, 2)
+    self.assertEqual([], nonviewable_iids)
+
+  def testGetNonviewableIIDs_RegularUser(self):
+    pass  # TODO(jrobbins)
+
+  def testGetNonviewableIIDs_Anon(self):
+    pass  # TODO(jrobbins)
+
+  def testGetAtRiskIIDs_NothingEverAtRisk(self):
+    """Handle the case where the site has no restriction labels."""
+    fake_restriction_label_rows = []
+    fake_restriction_label_ids = []
+    fake_at_risk_iids = []
+    self.mox.StubOutWithMock(self.services.config, 'GetLabelDefRowsAnyProject')
+    self.services.config.GetLabelDefRowsAnyProject(
+        self.mr.cnxn, where=[('LOWER(label) LIKE %s', ['restrict-view-%'])]
+        ).AndReturn(fake_restriction_label_rows)
+    self.mox.StubOutWithMock(self.services.issue, 'GetIIDsByLabelIDs')
+    self.services.issue.GetIIDsByLabelIDs(
+        self.mr.cnxn, fake_restriction_label_ids, 789, 2
+        ).AndReturn(fake_at_risk_iids)
+    self.mox.ReplayAll()
+
+    at_risk_iids = self.servlet.GetAtRiskIIDs(
+        self.mr.cnxn, self.mr.auth.user_pb, self.mr.auth.effective_ids,
+        self.project, self.mr.perms, self.mr.shard_id)
+    self.mox.VerifyAll()
+    self.assertEqual([], at_risk_iids)
+
+  def testGetAtRiskIIDs_NoIssuesAtRiskRightNow(self):
+    """Handle the case where the project has no restricted issues."""
+    fake_restriction_label_rows = [
+        (123, 789, 1, 'Restrict-View-A', 'doc', False),
+        (234, 789, 2, 'Restrict-View-B', 'doc', False),
+        ]
+    fake_restriction_label_ids = [123, 234]
+    fake_at_risk_iids = []
+    self.mox.StubOutWithMock(self.services.config, 'GetLabelDefRowsAnyProject')
+    self.services.config.GetLabelDefRowsAnyProject(
+        self.mr.cnxn, where=[('LOWER(label) LIKE %s', ['restrict-view-%'])]
+        ).AndReturn(fake_restriction_label_rows)
+    self.mox.StubOutWithMock(self.services.issue, 'GetIIDsByLabelIDs')
+    self.services.issue.GetIIDsByLabelIDs(
+        self.mr.cnxn, fake_restriction_label_ids, 789, 2
+        ).AndReturn(fake_at_risk_iids)
+    self.mox.ReplayAll()
+
+    at_risk_iids = self.servlet.GetAtRiskIIDs(
+        self.mr.cnxn, self.mr.auth.user_pb, self.mr.auth.effective_ids,
+        self.project, self.mr.perms, self.mr.shard_id)
+    self.mox.VerifyAll()
+    self.assertEqual([], at_risk_iids)
+
+  def testGetAtRiskIIDs_SomeAtRisk(self):
+    """Handle the case where the project has some restricted issues."""
+    fake_restriction_label_rows = [
+        (123, 789, 1, 'Restrict-View-A', 'doc', False),
+        (234, 789, 2, 'Restrict-View-B', 'doc', False),
+        ]
+    fake_restriction_label_ids = [123, 234]
+    fake_at_risk_iids = [432, 543]
+    self.mox.StubOutWithMock(self.services.config, 'GetLabelDefRowsAnyProject')
+    self.services.config.GetLabelDefRowsAnyProject(
+      self.mr.cnxn, where=[('LOWER(label) LIKE %s', ['restrict-view-%'])]
+      ).AndReturn(fake_restriction_label_rows)
+    self.mox.StubOutWithMock(self.services.issue, 'GetIIDsByLabelIDs')
+    self.services.issue.GetIIDsByLabelIDs(
+      self.mr.cnxn, fake_restriction_label_ids, 789, 2
+      ).AndReturn(fake_at_risk_iids)
+    self.mox.ReplayAll()
+
+    at_risk_iids = self.servlet.GetAtRiskIIDs(
+        self.mr.cnxn, self.mr.auth.user_pb, self.mr.auth.effective_ids,
+        self.project, self.mr.perms, self.mr.shard_id)
+    self.mox.VerifyAll()
+    self.assertEqual([432, 543], at_risk_iids)
+
+  def testGetViewableIIDs_Anon(self):
+    """Anon users are never participants in any issues."""
+    ok_iids = self.servlet.GetViewableIIDs(
+      self.mr.cnxn, set(), 789, 2)
+    self.assertEqual([], ok_iids)
+
+  def testGetViewableIIDs_NoIssues(self):
+    """This visitor does not participate in any issues."""
+    self.mox.StubOutWithMock(self.services.issue, 'GetIIDsByParticipant')
+    self.services.issue.GetIIDsByParticipant(
+      self.mr.cnxn, {111}, [789], 2).AndReturn([])
+    self.mox.ReplayAll()
+
+    ok_iids = self.servlet.GetViewableIIDs(
+      self.mr.cnxn, {111}, 789, 2)
+    self.mox.VerifyAll()
+    self.assertEqual([], ok_iids)
+
+  def testGetViewableIIDs_SomeIssues(self):
+    """This visitor  participates in some issues."""
+    self.mox.StubOutWithMock(self.services.issue, 'GetIIDsByParticipant')
+    self.services.issue.GetIIDsByParticipant(
+      self.mr.cnxn, {111}, [789], 2).AndReturn([543, 654])
+    self.mox.ReplayAll()
+
+    ok_iids = self.servlet.GetViewableIIDs(
+      self.mr.cnxn, {111}, 789, 2)
+    self.mox.VerifyAll()
+    self.assertEqual([543, 654], ok_iids)
diff --git a/search/test/backendsearch_test.py b/search/test/backendsearch_test.py
new file mode 100644
index 0000000..dd5ed18
--- /dev/null
+++ b/search/test/backendsearch_test.py
@@ -0,0 +1,126 @@
+# 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
+
+"""Unittests for monorail.search.backendsearch."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+import mox
+
+import settings
+from search import backendsearch
+from search import backendsearchpipeline
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class BackendSearchTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        issue=fake.IssueService(),
+        )
+    self.mr = testing_helpers.MakeMonorailRequest(
+        path='/_backend/besearch?q=Priority:High&shard=2')
+    self.mr.query_project_names = ['proj']
+    self.mr.specified_logged_in_user_id = 111
+    self.mr.specified_me_user_ids = [222]
+    self.mr.shard_id = 2
+    self.servlet = backendsearch.BackendSearch(
+        'req', 'res', services=self.services)
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testHandleRequest_NoResults(self):
+    """Handle the case where the search has no results."""
+    pipeline = testing_helpers.Blank(
+        SearchForIIDs=lambda: None,
+        result_iids=[],
+        search_limit_reached=False,
+        error=None)
+    self.mox.StubOutWithMock(backendsearchpipeline, 'BackendSearchPipeline')
+    backendsearchpipeline.BackendSearchPipeline(
+      self.mr, self.services, 100, ['proj'], 111, [222]
+      ).AndReturn(pipeline)
+    self.mox.ReplayAll()
+
+    json_data = self.servlet.HandleRequest(self.mr)
+    self.mox.VerifyAll()
+    self.assertEqual([], json_data['unfiltered_iids'])
+    self.assertFalse(json_data['search_limit_reached'])
+    self.assertEqual(None, json_data['error'])
+
+  def testHandleRequest_ResultsInOnePagainationPage(self):
+    """Prefetch all result issues and return them."""
+    allowed_iids = [1, 2, 3, 4, 5, 6, 7, 8]
+    pipeline = testing_helpers.Blank(
+        SearchForIIDs=lambda: None,
+        result_iids=allowed_iids,
+        search_limit_reached=False,
+        error=None)
+    self.mox.StubOutWithMock(backendsearchpipeline, 'BackendSearchPipeline')
+    backendsearchpipeline.BackendSearchPipeline(
+      self.mr, self.services, 100, ['proj'], 111, [222]
+      ).AndReturn(pipeline)
+    self.mox.StubOutWithMock(self.services.issue, 'GetIssues')
+    # All issues are prefetched because they fit  on the first pagination page.
+    self.services.issue.GetIssues(self.mr.cnxn, allowed_iids, shard_id=2)
+    self.mox.ReplayAll()
+
+    json_data = self.servlet.HandleRequest(self.mr)
+    self.mox.VerifyAll()
+    self.assertEqual([1, 2, 3, 4, 5, 6, 7, 8], json_data['unfiltered_iids'])
+    self.assertFalse(json_data['search_limit_reached'])
+    self.assertEqual(None, json_data['error'])
+
+  def testHandleRequest_ResultsExceedPagainationPage(self):
+    """Return all result issue IDs, but only prefetch the first page."""
+    self.mr.num = 5
+    pipeline = testing_helpers.Blank(
+        SearchForIIDs=lambda: None,
+        result_iids=[1, 2, 3, 4, 5, 6, 7, 8],
+        search_limit_reached=False,
+        error=None)
+    self.mox.StubOutWithMock(backendsearchpipeline, 'BackendSearchPipeline')
+    backendsearchpipeline.BackendSearchPipeline(
+      self.mr, self.services, 100, ['proj'], 111, [222]
+      ).AndReturn(pipeline)
+    self.mox.StubOutWithMock(self.services.issue, 'GetIssues')
+    # First 5 issues are prefetched because num=5
+    self.services.issue.GetIssues(self.mr.cnxn, [1, 2, 3, 4, 5], shard_id=2)
+    self.mox.ReplayAll()
+
+    json_data = self.servlet.HandleRequest(self.mr)
+    self.mox.VerifyAll()
+    # All are IDs are returned to the frontend.
+    self.assertEqual([1, 2, 3, 4, 5, 6, 7, 8], json_data['unfiltered_iids'])
+    self.assertFalse(json_data['search_limit_reached'])
+    self.assertEqual(None, json_data['error'])
+
+  def testHandleRequest_QueryError(self):
+    """Handle the case where the search has no results."""
+    error = ValueError('Malformed query')
+    pipeline = testing_helpers.Blank(
+        SearchForIIDs=lambda: None,
+        result_iids=[],
+        search_limit_reached=False,
+        error=error)
+    self.mox.StubOutWithMock(backendsearchpipeline, 'BackendSearchPipeline')
+    backendsearchpipeline.BackendSearchPipeline(
+      self.mr, self.services, 100, ['proj'], 111, [222]
+      ).AndReturn(pipeline)
+    self.mox.ReplayAll()
+
+    json_data = self.servlet.HandleRequest(self.mr)
+    self.mox.VerifyAll()
+    self.assertEqual([], json_data['unfiltered_iids'])
+    self.assertFalse(json_data['search_limit_reached'])
+    self.assertEqual(error.message, json_data['error'])
diff --git a/search/test/backendsearchpipeline_test.py b/search/test/backendsearchpipeline_test.py
new file mode 100644
index 0000000..212f5a6
--- /dev/null
+++ b/search/test/backendsearchpipeline_test.py
@@ -0,0 +1,250 @@
+# 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
+
+"""Tests for the backendsearchpipeline module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mox
+import unittest
+
+from google.appengine.api import memcache
+from google.appengine.ext import testbed
+
+import settings
+from framework import framework_helpers
+from framework import sorting
+from framework import sql
+from proto import ast_pb2
+from proto import tracker_pb2
+from search import backendsearchpipeline
+from search import ast2ast
+from search import query2ast
+from services import service_manager
+from services import tracker_fulltext
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+
+
+class BackendSearchPipelineTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService(),
+        issue=fake.IssueService(),
+        config=fake.ConfigService(),
+        cache_manager=fake.CacheManager())
+    self.services.user.TestAddUser('a@example.com', 111)
+    self.project = self.services.project.TestAddProject('proj', project_id=789)
+    self.mr = testing_helpers.MakeMonorailRequest(
+      path='/p/proj/issues/list?q=Priority:High',
+      project=self.project)
+    self.mr.me_user_id = 999  # This value is not used by backend search
+    self.mr.shard_id = 2
+    self.mr.invalidation_timestep = 12345
+
+    self.mox = mox.Mox()
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_user_stub()
+    self.testbed.init_memcache_stub()
+    sorting.InitializeArtValues(self.services)
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def SetUpPromises(self, exp_query):
+    self.mox.StubOutWithMock(framework_helpers, 'Promise')
+    framework_helpers.Promise(
+        backendsearchpipeline._GetQueryResultIIDs, self.mr.cnxn,
+        self.services, 'is:open', exp_query, [789],
+        mox.IsA(tracker_pb2.ProjectIssueConfig), ['project', 'id'],
+        ('Issue.shard = %s', [2]), 2, self.mr.invalidation_timestep
+        ).AndReturn('fake promise 1')
+
+  def testMakePromises_Anon(self):
+    """A backend pipeline does not personalize the query of anon users."""
+    self.SetUpPromises('Priority:High')
+    self.mox.ReplayAll()
+    backendsearchpipeline.BackendSearchPipeline(
+      self.mr, self.services, 100, ['proj'], None, [])
+    self.mox.VerifyAll()
+
+  def testMakePromises_SignedIn(self):
+    """A backend pipeline immediately personalizes and runs the query."""
+    self.mr.query = 'owner:me'
+    self.SetUpPromises('owner:111')
+    self.mox.ReplayAll()
+    backendsearchpipeline.BackendSearchPipeline(
+      self.mr, self.services, 100, ['proj'], 111, [111])
+    self.mox.VerifyAll()
+
+  def testSearchForIIDs(self):
+    self.SetUpPromises('Priority:High')
+    self.mox.ReplayAll()
+    be_pipeline = backendsearchpipeline.BackendSearchPipeline(
+      self.mr, self.services, 100, ['proj'], 111, [111])
+    be_pipeline.result_iids_promise = testing_helpers.Blank(
+      WaitAndGetValue=lambda: ([10002, 10052], False, None))
+    be_pipeline.SearchForIIDs()
+    self.mox.VerifyAll()
+    self.assertEqual([10002, 10052], be_pipeline.result_iids)
+    self.assertEqual(False, be_pipeline.search_limit_reached)
+
+
+class BackendSearchPipelineMethodsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService(),
+        issue=fake.IssueService(),
+        config=fake.ConfigService(),
+        cache_manager=fake.CacheManager())
+    self.services.user.TestAddUser('a@example.com', 111)
+    self.project = self.services.project.TestAddProject('proj', project_id=789)
+    self.mr = testing_helpers.MakeMonorailRequest(
+      path='/p/proj/issues/list?q=Priority:High',
+      project=self.project)
+
+    self.mox = mox.Mox()
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_user_stub()
+    self.testbed.init_memcache_stub()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testSearchProjectCan_Normal(self):
+    query_ast = query2ast.ParseUserQuery(
+      'Priority:High', 'is:open', query2ast.BUILTIN_ISSUE_FIELDS,
+      self.config)
+    simplified_query_ast = ast2ast.PreprocessAST(
+      self.cnxn, query_ast, [789], self.services, self.config)
+    conj = simplified_query_ast.conjunctions[0]
+    self.mox.StubOutWithMock(tracker_fulltext, 'SearchIssueFullText')
+    tracker_fulltext.SearchIssueFullText(
+      [789], conj, 2).AndReturn((None, False))
+    self.mox.StubOutWithMock(self.services.issue, 'RunIssueQuery')
+    self.services.issue.RunIssueQuery(
+      self.cnxn, mox.IsA(list), mox.IsA(list), mox.IsA(list),
+      shard_id=2).AndReturn(([10002, 10052], False))
+    self.mox.ReplayAll()
+    result, capped, err = backendsearchpipeline.SearchProjectCan(
+      self.cnxn, self.services, [789], query_ast, 2, self.config)
+    self.mox.VerifyAll()
+    self.assertEqual([10002, 10052], result)
+    self.assertFalse(capped)
+    self.assertEqual(None, err)
+
+  def testSearchProjectCan_DBCapped(self):
+    query_ast = query2ast.ParseUserQuery(
+      'Priority:High', 'is:open', query2ast.BUILTIN_ISSUE_FIELDS,
+      self.config)
+    simplified_query_ast = ast2ast.PreprocessAST(
+      self.cnxn, query_ast, [789], self.services, self.config)
+    conj = simplified_query_ast.conjunctions[0]
+    self.mox.StubOutWithMock(tracker_fulltext, 'SearchIssueFullText')
+    tracker_fulltext.SearchIssueFullText(
+      [789], conj, 2).AndReturn((None, False))
+    self.mox.StubOutWithMock(self.services.issue, 'RunIssueQuery')
+    self.services.issue.RunIssueQuery(
+      self.cnxn, mox.IsA(list), mox.IsA(list), mox.IsA(list),
+      shard_id=2).AndReturn(([10002, 10052], True))
+    self.mox.ReplayAll()
+    result, capped, err = backendsearchpipeline.SearchProjectCan(
+      self.cnxn, self.services, [789], query_ast, 2, self.config)
+    self.mox.VerifyAll()
+    self.assertEqual([10002, 10052], result)
+    self.assertTrue(capped)
+    self.assertEqual(None, err)
+
+  def testSearchProjectCan_FTSCapped(self):
+    query_ast = query2ast.ParseUserQuery(
+      'Priority:High', 'is:open', query2ast.BUILTIN_ISSUE_FIELDS,
+      self.config)
+    simplified_query_ast = ast2ast.PreprocessAST(
+      self.cnxn, query_ast, [789], self.services, self.config)
+    conj = simplified_query_ast.conjunctions[0]
+    self.mox.StubOutWithMock(tracker_fulltext, 'SearchIssueFullText')
+    tracker_fulltext.SearchIssueFullText(
+      [789], conj, 2).AndReturn(([10002, 10052], True))
+    self.mox.StubOutWithMock(self.services.issue, 'RunIssueQuery')
+    self.services.issue.RunIssueQuery(
+      self.cnxn, mox.IsA(list), mox.IsA(list), mox.IsA(list),
+      shard_id=2).AndReturn(([10002, 10052], False))
+    self.mox.ReplayAll()
+    result, capped, err = backendsearchpipeline.SearchProjectCan(
+      self.cnxn, self.services, [789], query_ast, 2, self.config)
+    self.mox.VerifyAll()
+    self.assertEqual([10002, 10052], result)
+    self.assertTrue(capped)
+    self.assertEqual(None, err)
+
+  def testGetQueryResultIIDs(self):
+    sd = ['project', 'id']
+    slice_term = ('Issue.shard = %s', [2])
+    query_ast = query2ast.ParseUserQuery(
+      'Priority:High', 'is:open', query2ast.BUILTIN_ISSUE_FIELDS,
+      self.config)
+    query_ast = backendsearchpipeline._FilterSpam(query_ast)
+
+    self.mox.StubOutWithMock(backendsearchpipeline, 'SearchProjectCan')
+    backendsearchpipeline.SearchProjectCan(
+      self.cnxn, self.services, [789], query_ast, 2, self.config,
+      sort_directives=sd, where=[slice_term],
+      query_desc='getting query issue IDs'
+      ).AndReturn(([10002, 10052], False, None))
+    self.mox.ReplayAll()
+    result, capped, err = backendsearchpipeline._GetQueryResultIIDs(
+      self.cnxn, self.services, 'is:open', 'Priority:High',
+      [789], self.config, sd, slice_term, 2, 12345)
+    self.mox.VerifyAll()
+    self.assertEqual([10002, 10052], result)
+    self.assertFalse(capped)
+    self.assertEqual(None, err)
+    self.assertEqual(
+      ([10002, 10052], 12345),
+      memcache.get('789;is:open;Priority:High;project id;2'))
+
+  def testGetSpamQueryResultIIDs(self):
+    sd = ['project', 'id']
+    slice_term = ('Issue.shard = %s', [2])
+    query_ast = query2ast.ParseUserQuery(
+      'Priority:High is:spam', 'is:open', query2ast.BUILTIN_ISSUE_FIELDS,
+      self.config)
+
+    query_ast = backendsearchpipeline._FilterSpam(query_ast)
+
+    self.mox.StubOutWithMock(backendsearchpipeline, 'SearchProjectCan')
+    backendsearchpipeline.SearchProjectCan(
+      self.cnxn, self.services, [789], query_ast, 2, self.config,
+      sort_directives=sd, where=[slice_term],
+      query_desc='getting query issue IDs'
+      ).AndReturn(([10002, 10052], False, None))
+    self.mox.ReplayAll()
+    result, capped, err = backendsearchpipeline._GetQueryResultIIDs(
+      self.cnxn, self.services, 'is:open', 'Priority:High is:spam',
+      [789], self.config, sd, slice_term, 2, 12345)
+    self.mox.VerifyAll()
+    self.assertEqual([10002, 10052], result)
+    self.assertFalse(capped)
+    self.assertEqual(None, err)
+    self.assertEqual(
+      ([10002, 10052], 12345),
+      memcache.get('789;is:open;Priority:High is:spam;project id;2'))
diff --git a/search/test/frontendsearchpipeline_test.py b/search/test/frontendsearchpipeline_test.py
new file mode 100644
index 0000000..b2e7fb3
--- /dev/null
+++ b/search/test/frontendsearchpipeline_test.py
@@ -0,0 +1,1339 @@
+# 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
+
+"""Tests for the frontendsearchpipeline module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mox
+import unittest
+
+from google.appengine.api import memcache
+from google.appengine.api import modules
+from google.appengine.ext import testbed
+from google.appengine.api import urlfetch
+
+import settings
+from framework import framework_helpers
+from framework import sorting
+from framework import urls
+from proto import ast_pb2
+from proto import project_pb2
+from proto import tracker_pb2
+from search import frontendsearchpipeline
+from search import searchpipeline
+from search import query2ast
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+
+
+# Just an example timestamp.  The value does not matter.
+NOW = 2444950132
+
+
+class FrontendSearchPipelineTest(unittest.TestCase):
+
+  def setUp(self):
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        project=fake.ProjectService(),
+        issue=fake.IssueService(),
+        config=fake.ConfigService(),
+        cache_manager=fake.CacheManager())
+    self.services.user.TestAddUser('a@example.com', 111)
+    self.project = self.services.project.TestAddProject('proj', project_id=789)
+    self.mr = testing_helpers.MakeMonorailRequest(
+      path='/p/proj/issues/list', project=self.project)
+    self.mr.me_user_id = 111
+
+    self.issue_1 = fake.MakeTestIssue(
+      789, 1, 'one', 'New', 111, labels=['Priority-High'])
+    self.services.issue.TestAddIssue(self.issue_1)
+    self.issue_2 = fake.MakeTestIssue(
+      789, 2, 'two', 'New', 111, labels=['Priority-Low'])
+    self.services.issue.TestAddIssue(self.issue_2)
+    self.issue_3 = fake.MakeTestIssue(
+      789, 3, 'three', 'New', 111, labels=['Priority-Medium'])
+    self.services.issue.TestAddIssue(self.issue_3)
+    self.mr.sort_spec = 'Priority'
+
+    self.cnxn = self.mr.cnxn
+    self.project = self.mr.project
+    self.auth = self.mr.auth
+    self.me_user_id = self.mr.me_user_id
+    self.query = self.mr.query
+    self.query_project_names = self.mr.query_project_names
+    self.items_per_page = self.mr.num # defaults to 100
+    self.paginate_start = self.mr.start
+    self.paginate_end = self.paginate_start + self.items_per_page
+    self.can = self.mr.can
+    self.group_by_spec = self.mr.group_by_spec
+    self.sort_spec = self.mr.sort_spec
+    self.warnings = self.mr.warnings
+    self.errors = self.mr.errors
+    self.use_cached_searches = self.mr.use_cached_searches
+    self.profiler = self.mr.profiler
+
+    self.mox = mox.Mox()
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_user_stub()
+    self.testbed.init_memcache_stub()
+    sorting.InitializeArtValues(self.services)
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testSearchForIIDs_AllResultsCached_AllAtRiskCached(self):
+    unfiltered_iids = {(1, 'p:v'): [1001, 1011]}
+    nonviewable_iids = {1: set()}
+    self.mox.StubOutWithMock(frontendsearchpipeline, '_StartBackendSearch')
+    frontendsearchpipeline._StartBackendSearch(
+        self.cnxn, ['proj'], [789], mox.IsA(tracker_pb2.ProjectIssueConfig),
+        unfiltered_iids, {}, nonviewable_iids, set(), self.services,
+        self.me_user_id, self.auth.user_id or 0, self.paginate_end,
+        self.query.split(' OR '), self.can, self.group_by_spec, self.sort_spec,
+        self.warnings, self.use_cached_searches).AndReturn([])
+    self.mox.StubOutWithMock(frontendsearchpipeline, '_FinishBackendSearch')
+    frontendsearchpipeline._FinishBackendSearch([])
+    self.mox.ReplayAll()
+
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+    pipeline.unfiltered_iids = unfiltered_iids
+    pipeline.nonviewable_iids = nonviewable_iids
+    pipeline.SearchForIIDs()
+    self.mox.VerifyAll()
+    self.assertEqual(2, pipeline.total_count)
+    self.assertEqual([1001, 1011], pipeline.filtered_iids[(1, 'p:v')])
+
+  def testSearchForIIDs_CrossProject_AllViewable(self):
+    self.services.project.TestAddProject('other', project_id=790)
+    unfiltered_iids = {(1, 'p:v'): [1001, 1011, 2001]}
+    nonviewable_iids = {1: set()}
+    self.query_project_names = ['other']
+    self.mox.StubOutWithMock(frontendsearchpipeline, '_StartBackendSearch')
+    frontendsearchpipeline._StartBackendSearch(
+        self.cnxn, ['other', 'proj'], [789, 790],
+        mox.IsA(tracker_pb2.ProjectIssueConfig), unfiltered_iids, {},
+        nonviewable_iids, set(), self.services,
+        self.me_user_id, self.auth.user_id or 0, self.paginate_end,
+        self.query.split(' OR '), self.can, self.group_by_spec, self.sort_spec,
+        self.warnings, self.use_cached_searches).AndReturn([])
+    self.mox.StubOutWithMock(frontendsearchpipeline, '_FinishBackendSearch')
+    frontendsearchpipeline._FinishBackendSearch([])
+    self.mox.ReplayAll()
+
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+
+    pipeline.unfiltered_iids = unfiltered_iids
+    pipeline.nonviewable_iids = nonviewable_iids
+    pipeline.SearchForIIDs()
+    self.mox.VerifyAll()
+    self.assertEqual(3, pipeline.total_count)
+    self.assertEqual([1001, 1011, 2001], pipeline.filtered_iids[(1, 'p:v')])
+
+  def testSearchForIIDs_CrossProject_MembersOnlyOmitted(self):
+    self.services.project.TestAddProject(
+        'other', project_id=790, access=project_pb2.ProjectAccess.MEMBERS_ONLY)
+    unfiltered_iids = {(1, 'p:v'): [1001, 1011]}
+    nonviewable_iids = {1: set()}
+    # project 'other' gets filtered out before the backend call.
+    self.mr.query_project_names = ['other']
+    self.mox.StubOutWithMock(frontendsearchpipeline, '_StartBackendSearch')
+    frontendsearchpipeline._StartBackendSearch(
+        self.cnxn, ['proj'], [789], mox.IsA(tracker_pb2.ProjectIssueConfig),
+        unfiltered_iids, {}, nonviewable_iids, set(), self.services,
+        self.me_user_id, self.auth.user_id or 0, self.paginate_end,
+        self.query.split(' OR '), self.can, self.group_by_spec, self.sort_spec,
+        self.warnings, self.use_cached_searches).AndReturn([])
+    self.mox.StubOutWithMock(frontendsearchpipeline, '_FinishBackendSearch')
+    frontendsearchpipeline._FinishBackendSearch([])
+    self.mox.ReplayAll()
+
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+    pipeline.unfiltered_iids = unfiltered_iids
+    pipeline.nonviewable_iids = nonviewable_iids
+    pipeline.SearchForIIDs()
+    self.mox.VerifyAll()
+    self.assertEqual(2, pipeline.total_count)
+    self.assertEqual([1001, 1011], pipeline.filtered_iids[(1, 'p:v')])
+
+  def testMergeAndSortIssues_EmptyResult(self):
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+    pipeline.filtered_iids = {0: [], 1: [], 2: []}
+
+    pipeline.MergeAndSortIssues()
+    self.assertEqual([], pipeline.allowed_iids)
+    self.assertEqual([], pipeline.allowed_results)
+    self.assertEqual({}, pipeline.users_by_id)
+
+  def testMergeAndSortIssues_Normal(self):
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+    # In this unit test case we are not calling SearchForIIDs(), instead just
+    # set pipeline.filtered_iids directly.
+    pipeline.filtered_iids = {
+      0: [],
+      1: [self.issue_1.issue_id],
+      2: [self.issue_2.issue_id],
+      3: [self.issue_3.issue_id]
+      }
+
+    pipeline.MergeAndSortIssues()
+    self.assertEqual(
+      [self.issue_1.issue_id, self.issue_2.issue_id, self.issue_3.issue_id],
+      pipeline.allowed_iids)
+    self.assertEqual(
+      [self.issue_1, self.issue_3, self.issue_2],  # high, medium, low.
+      pipeline.allowed_results)
+    self.assertEqual([0, 111], list(pipeline.users_by_id.keys()))
+
+  def testDetermineIssuePosition_Normal(self):
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+    # In this unit test case we are not calling SearchForIIDs(), instead just
+    # set pipeline.filtered_iids directly.
+    pipeline.filtered_iids = {
+      0: [],
+      1: [self.issue_1.issue_id],
+      2: [self.issue_2.issue_id],
+      3: [self.issue_3.issue_id]
+      }
+
+    prev_iid, index, next_iid = pipeline.DetermineIssuePosition(self.issue_3)
+    # The total ordering is issue_1, issue_3, issue_2 for high, med, low.
+    self.assertEqual(self.issue_1.issue_id, prev_iid)
+    self.assertEqual(1, index)
+    self.assertEqual(self.issue_2.issue_id, next_iid)
+
+  def testDetermineIssuePosition_NotInResults(self):
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+    # In this unit test case we are not calling SearchForIIDs(), instead just
+    # set pipeline.filtered_iids directly.
+    pipeline.filtered_iids = {
+      0: [],
+      1: [self.issue_1.issue_id],
+      2: [self.issue_2.issue_id],
+      3: []
+      }
+
+    prev_iid, index, next_iid = pipeline.DetermineIssuePosition(self.issue_3)
+    # The total ordering is issue_1, issue_3, issue_2 for high, med, low.
+    self.assertEqual(None, prev_iid)
+    self.assertEqual(None, index)
+    self.assertEqual(None, next_iid)
+
+  def testDetermineIssuePositionInShard_IssueIsInShard(self):
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+    # Let's assume issues 1, 2, and 3 are all in the same shard.
+    pipeline.filtered_iids = {
+      0: [self.issue_1.issue_id, self.issue_2.issue_id, self.issue_3.issue_id],
+      }
+
+    # The total ordering is issue_1, issue_3, issue_2 for high, med, low.
+    prev_cand, index, next_cand = pipeline._DetermineIssuePositionInShard(
+      0, self.issue_1, {})
+    self.assertEqual(None, prev_cand)
+    self.assertEqual(0, index)
+    self.assertEqual(self.issue_3, next_cand)
+
+    prev_cand, index, next_cand = pipeline._DetermineIssuePositionInShard(
+      0, self.issue_3, {})
+    self.assertEqual(self.issue_1, prev_cand)
+    self.assertEqual(1, index)
+    self.assertEqual(self.issue_2, next_cand)
+
+    prev_cand, index, next_cand = pipeline._DetermineIssuePositionInShard(
+      0, self.issue_2, {})
+    self.assertEqual(self.issue_3, prev_cand)
+    self.assertEqual(2, index)
+    self.assertEqual(None, next_cand)
+
+  def testDetermineIssuePositionInShard_IssueIsNotInShard(self):
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+
+    # The total ordering is issue_1, issue_3, issue_2 for high, med, low.
+    pipeline.filtered_iids = {
+      0: [self.issue_2.issue_id, self.issue_3.issue_id],
+      }
+    prev_cand, index, next_cand = pipeline._DetermineIssuePositionInShard(
+      0, self.issue_1, {})
+    self.assertEqual(None, prev_cand)
+    self.assertEqual(0, index)
+    self.assertEqual(self.issue_3, next_cand)
+
+    pipeline.filtered_iids = {
+      0: [self.issue_1.issue_id, self.issue_2.issue_id],
+      }
+    prev_cand, index, next_cand = pipeline._DetermineIssuePositionInShard(
+      0, self.issue_3, {})
+    self.assertEqual(self.issue_1, prev_cand)
+    self.assertEqual(1, index)
+    self.assertEqual(self.issue_2, next_cand)
+
+    pipeline.filtered_iids = {
+      0: [self.issue_1.issue_id, self.issue_3.issue_id],
+      }
+    prev_cand, index, next_cand = pipeline._DetermineIssuePositionInShard(
+      0, self.issue_2, {})
+    self.assertEqual(self.issue_3, prev_cand)
+    self.assertEqual(2, index)
+    self.assertEqual(None, next_cand)
+
+  def testFetchAllSamples_Empty(self):
+    filtered_iids = {}
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+    samples_by_shard, sample_iids_to_shard = pipeline._FetchAllSamples(
+        filtered_iids)
+    self.assertEqual({}, samples_by_shard)
+    self.assertEqual({}, sample_iids_to_shard)
+
+  def testFetchAllSamples_SmallResultsPerShard(self):
+    filtered_iids = {
+        0: [100, 110, 120],
+        1: [101, 111, 121],
+        }
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+
+    samples_by_shard, sample_iids_to_shard = pipeline._FetchAllSamples(
+        filtered_iids)
+    self.assertEqual(2, len(samples_by_shard))
+    self.assertEqual(0, len(sample_iids_to_shard))
+
+  def testFetchAllSamples_Normal(self):
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+    issues = self.MakeIssues(23)
+    filtered_iids = {
+        0: [issue.issue_id for issue in issues],
+        }
+
+    samples_by_shard, sample_iids_to_shard = pipeline._FetchAllSamples(
+        filtered_iids)
+    self.assertEqual(1, len(samples_by_shard))
+    self.assertEqual(2, len(samples_by_shard[0]))
+    self.assertEqual(2, len(sample_iids_to_shard))
+    for sample_iid in sample_iids_to_shard:
+      shard_key = sample_iids_to_shard[sample_iid]
+      self.assertIn(sample_iid, filtered_iids[shard_key])
+
+  def testChooseSampleIssues_Empty(self):
+    """When the search gave no results, there cannot be any samples."""
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+    issue_ids = []
+    on_hand_issues, needed_iids = pipeline._ChooseSampleIssues(issue_ids)
+    self.assertEqual({}, on_hand_issues)
+    self.assertEqual([], needed_iids)
+
+  def testChooseSampleIssues_Small(self):
+    """When the search gave few results, don't bother with samples."""
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+    issue_ids = [78901, 78902]
+    on_hand_issues, needed_iids = pipeline._ChooseSampleIssues(issue_ids)
+    self.assertEqual({}, on_hand_issues)
+    self.assertEqual([], needed_iids)
+
+  def MakeIssues(self, num_issues):
+    issues = []
+    for i in range(num_issues):
+      issue = fake.MakeTestIssue(789, 100 + i, 'samp test', 'New', 111)
+      issues.append(issue)
+      self.services.issue.TestAddIssue(issue)
+    return issues
+
+  def testChooseSampleIssues_Normal(self):
+    """We will choose at least one sample for every 10 results in a shard."""
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+    issues = self.MakeIssues(23)
+    issue_ids = [issue.issue_id for issue in issues]
+    on_hand_issues, needed_iids = pipeline._ChooseSampleIssues(issue_ids)
+    self.assertEqual({}, on_hand_issues)
+    self.assertEqual(2, len(needed_iids))
+    for sample_iid in needed_iids:
+      self.assertIn(sample_iid, issue_ids)
+
+  def testLookupNeededUsers(self):
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+
+    pipeline._LookupNeededUsers([])
+    self.assertEqual([], list(pipeline.users_by_id.keys()))
+
+    pipeline._LookupNeededUsers([self.issue_1, self.issue_2, self.issue_3])
+    self.assertEqual([0, 111], list(pipeline.users_by_id.keys()))
+
+  def testPaginate_List(self):
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        self.cnxn,
+        self.services,
+        self.auth,
+        self.me_user_id,
+        self.query,
+        self.query_project_names,
+        self.items_per_page,
+        self.paginate_start,
+        self.can,
+        self.group_by_spec,
+        self.sort_spec,
+        self.warnings,
+        self.errors,
+        self.use_cached_searches,
+        self.profiler,
+        project=self.project)
+    pipeline.allowed_iids = [
+      self.issue_1.issue_id, self.issue_2.issue_id, self.issue_3.issue_id]
+    pipeline.allowed_results = [self.issue_1, self.issue_2, self.issue_3]
+    pipeline.total_count = len(pipeline.allowed_results)
+    pipeline.Paginate()
+    self.assertEqual(
+      [self.issue_1, self.issue_2, self.issue_3],
+      pipeline.visible_results)
+    self.assertFalse(pipeline.pagination.limit_reached)
+
+
+class FrontendSearchPipelineMethodsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_user_stub()
+    self.testbed.init_memcache_stub()
+
+    self.project_id = 789
+    self.default_config = tracker_bizobj.MakeDefaultProjectIssueConfig(
+        self.project_id)
+    self.services = service_manager.Services(
+        project=fake.ProjectService())
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=self.project_id)
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testMakeBackendCallback(self):
+    called_with = []
+
+    def func(a, b):
+      called_with.append((a, b))
+
+    callback = frontendsearchpipeline._MakeBackendCallback(func, 10, 20)
+    callback()
+    self.assertEqual([(10, 20)], called_with)
+
+  def testParseUserQuery_CheckQuery(self):
+    warnings = []
+    msg = frontendsearchpipeline._CheckQuery(
+        'cnxn', self.services, 'ok query', self.default_config,
+        [self.project_id], True, warnings=warnings)
+    self.assertIsNone(msg)
+    self.assertEqual([], warnings)
+
+    warnings = []
+    msg = frontendsearchpipeline._CheckQuery(
+        'cnxn', self.services, 'modified:0-0-0', self.default_config,
+        [self.project_id], True, warnings=warnings)
+    self.assertEqual(
+        'Could not parse date: 0-0-0',
+        msg)
+
+    warnings = []
+    msg = frontendsearchpipeline._CheckQuery(
+        'cnxn', self.services, 'blocking:3.14', self.default_config,
+        [self.project_id], True, warnings=warnings)
+    self.assertEqual(
+        'Could not parse issue reference: 3.14',
+        msg)
+    self.assertEqual([], warnings)
+
+  def testStartBackendSearch(self):
+    # TODO(jrobbins): write this test.
+    pass
+
+  def testFinishBackendSearch(self):
+    # TODO(jrobbins): write this test.
+    pass
+
+  def testGetProjectTimestamps_NoneSet(self):
+    project_shard_timestamps = frontendsearchpipeline._GetProjectTimestamps(
+      [], [])
+    self.assertEqual({}, project_shard_timestamps)
+
+    project_shard_timestamps = frontendsearchpipeline._GetProjectTimestamps(
+      [], [(0, (0, 'p:v')), (1, (1, 'p:v')), (2, (2, 'p:v'))])
+    self.assertEqual({}, project_shard_timestamps)
+
+    project_shard_timestamps = frontendsearchpipeline._GetProjectTimestamps(
+      [789], [(0, (0, 'p:v')), (1, (1, 'p:v')), (2, (2, 'p:v'))])
+    self.assertEqual({}, project_shard_timestamps)
+
+  def testGetProjectTimestamps_SpecificProjects(self):
+    memcache.set('789;0', NOW)
+    memcache.set('789;1', NOW - 1000)
+    memcache.set('789;2', NOW - 3000)
+    project_shard_timestamps = frontendsearchpipeline._GetProjectTimestamps(
+      [789], [(0, (0, 'p:v')), (1, (1, 'p:v')), (2, (2, 'p:v'))])
+    self.assertEqual(
+      { (789, 0): NOW,
+        (789, 1): NOW - 1000,
+        (789, 2): NOW - 3000,
+        },
+      project_shard_timestamps)
+
+    memcache.set('790;0', NOW)
+    memcache.set('790;1', NOW - 10000)
+    memcache.set('790;2', NOW - 30000)
+    project_shard_timestamps = frontendsearchpipeline._GetProjectTimestamps(
+      [789, 790], [(0, (0, 'p:v')), (1, (1, 'p:v')), (2, (2, 'p:v'))])
+    self.assertEqual(
+      { (789, 0): NOW,
+        (789, 1): NOW - 1000,
+        (789, 2): NOW - 3000,
+        (790, 0): NOW,
+        (790, 1): NOW - 10000,
+        (790, 2): NOW - 30000,
+        },
+      project_shard_timestamps)
+
+  def testGetProjectTimestamps_SiteWide(self):
+    memcache.set('all;0', NOW)
+    memcache.set('all;1', NOW - 10000)
+    memcache.set('all;2', NOW - 30000)
+    project_shard_timestamps = frontendsearchpipeline._GetProjectTimestamps(
+      [], [(0, (0, 'p:v')), (1, (1, 'p:v')), (2, (2, 'p:v'))])
+    self.assertEqual(
+      { ('all', 0): NOW,
+        ('all', 1): NOW - 10000,
+        ('all', 2): NOW - 30000,
+        },
+      project_shard_timestamps)
+
+  def testGetNonviewableIIDs_SearchMissSoNoOp(self):
+    """If search cache missed, don't bother looking up nonviewable IIDs."""
+    unfiltered_iids_dict = {}  # No cached search results found.
+    rpc_tuples = []  # Nothing should accumulate here in this case.
+    nonviewable_iids = {}  # Nothing should accumulate here in this case.
+    processed_invalidations_up_to = 12345
+    frontendsearchpipeline._GetNonviewableIIDs(
+        [789], 111, list(unfiltered_iids_dict.keys()), rpc_tuples,
+        nonviewable_iids, {}, processed_invalidations_up_to, True)
+    self.assertEqual([], rpc_tuples)
+    self.assertEqual({}, nonviewable_iids)
+
+  def testGetNonviewableIIDs_SearchHitThenNonviewableHit(self):
+    """If search cache hit, get nonviewable info from cache."""
+    unfiltered_iids_dict = {
+      1: [10001, 10021],
+      2: ['the search result issue_ids do not matter'],
+      }
+    rpc_tuples = []  # Nothing should accumulate here in this case.
+    nonviewable_iids = {}  # Our mock results should end up here.
+    processed_invalidations_up_to = 12345
+    memcache.set('nonviewable:789;111;1',
+                 ([10001, 10031], processed_invalidations_up_to - 10))
+    memcache.set('nonviewable:789;111;2',
+                 ([10002, 10042], processed_invalidations_up_to - 30))
+
+    project_shard_timestamps = {
+      (789, 1): 0,  # not stale
+      (789, 2): 0,  # not stale
+      }
+    frontendsearchpipeline._GetNonviewableIIDs(
+        [789], 111, list(unfiltered_iids_dict.keys()), rpc_tuples,
+        nonviewable_iids, project_shard_timestamps,
+        processed_invalidations_up_to, True)
+    self.assertEqual([], rpc_tuples)
+    self.assertEqual({1: {10001, 10031}, 2: {10002, 10042}}, nonviewable_iids)
+
+  def testGetNonviewableIIDs_SearchHitNonviewableMissSoStartRPC(self):
+    """If search hit and n-v miss, create RPCs to get nonviewable info."""
+    self.mox.StubOutWithMock(
+        frontendsearchpipeline, '_StartBackendNonviewableCall')
+    unfiltered_iids_dict = {
+      2: ['the search result issue_ids do not matter'],
+      }
+    rpc_tuples = []  # One RPC object should accumulate here.
+    nonviewable_iids = {}  # This will stay empty until RPCs complete.
+    processed_invalidations_up_to = 12345
+    # Nothing is set in memcache for this case.
+    a_fake_rpc = testing_helpers.Blank(callback=None)
+    frontendsearchpipeline._StartBackendNonviewableCall(
+      789, 111, 2, processed_invalidations_up_to).AndReturn(a_fake_rpc)
+    self.mox.ReplayAll()
+
+    frontendsearchpipeline._GetNonviewableIIDs(
+        [789], 111, list(unfiltered_iids_dict.keys()), rpc_tuples,
+        nonviewable_iids, {}, processed_invalidations_up_to, True)
+    self.mox.VerifyAll()
+    _, sid_0, rpc_0 = rpc_tuples[0]
+    self.assertEqual(2, sid_0)
+    self.assertEqual({}, nonviewable_iids)
+    self.assertEqual(a_fake_rpc, rpc_0)
+    self.assertIsNotNone(a_fake_rpc.callback)
+
+  def testAccumulateNonviewableIIDs_MemcacheHitForProject(self):
+    processed_invalidations_up_to = 12345
+    cached_dict = {
+      '789;111;2': ([10002, 10042], processed_invalidations_up_to - 10),
+      '789;111;3': ([10003, 10093], processed_invalidations_up_to - 30),
+      }
+    rpc_tuples = []  # Nothing should accumulate here.
+    nonviewable_iids = {1: {10001}}  # This will gain the shard 2 values.
+    project_shard_timestamps = {
+      (789, 1): 0,  # not stale
+      (789, 2): 0,  # not stale
+      }
+    frontendsearchpipeline._AccumulateNonviewableIIDs(
+      789, 111, 2, cached_dict, nonviewable_iids, project_shard_timestamps,
+      rpc_tuples, processed_invalidations_up_to)
+    self.assertEqual([], rpc_tuples)
+    self.assertEqual({1: {10001}, 2: {10002, 10042}}, nonviewable_iids)
+
+  def testAccumulateNonviewableIIDs_MemcacheStaleForProject(self):
+    self.mox.StubOutWithMock(
+      frontendsearchpipeline, '_StartBackendNonviewableCall')
+    processed_invalidations_up_to = 12345
+    cached_dict = {
+      '789;111;2': ([10002, 10042], processed_invalidations_up_to - 10),
+      '789;111;3': ([10003, 10093], processed_invalidations_up_to - 30),
+      }
+    rpc_tuples = []  # Nothing should accumulate here.
+    nonviewable_iids = {1: {10001}}  # Nothing added here until RPC completes
+    project_shard_timestamps = {
+      (789, 1): 0,  # not stale
+      (789, 2): processed_invalidations_up_to,  # stale!
+      }
+    a_fake_rpc = testing_helpers.Blank(callback=None)
+    frontendsearchpipeline._StartBackendNonviewableCall(
+      789, 111, 2, processed_invalidations_up_to).AndReturn(a_fake_rpc)
+    self.mox.ReplayAll()
+
+    frontendsearchpipeline._AccumulateNonviewableIIDs(
+      789, 111, 2, cached_dict, nonviewable_iids, project_shard_timestamps,
+      rpc_tuples, processed_invalidations_up_to)
+    self.mox.VerifyAll()
+    _, sid_0, rpc_0 = rpc_tuples[0]
+    self.assertEqual(2, sid_0)
+    self.assertEqual(a_fake_rpc, rpc_0)
+    self.assertIsNotNone(a_fake_rpc.callback)
+    self.assertEqual({1: {10001}}, nonviewable_iids)
+
+  def testAccumulateNonviewableIIDs_MemcacheHitForWholeSite(self):
+    processed_invalidations_up_to = 12345
+    cached_dict = {
+      'all;111;2': ([10002, 10042], processed_invalidations_up_to - 10),
+      'all;111;3': ([10003, 10093], processed_invalidations_up_to - 30),
+      }
+    rpc_tuples = []  # Nothing should accumulate here.
+    nonviewable_iids = {1: {10001}}  # This will gain the shard 2 values.
+    project_shard_timestamps = {
+      (None, 1): 0,  # not stale
+      (None, 2): 0,  # not stale
+      }
+    frontendsearchpipeline._AccumulateNonviewableIIDs(
+      None, 111, 2, cached_dict, nonviewable_iids, project_shard_timestamps,
+      rpc_tuples, processed_invalidations_up_to)
+    self.assertEqual([], rpc_tuples)
+    self.assertEqual({1: {10001}, 2: {10002, 10042}}, nonviewable_iids)
+
+  def testAccumulateNonviewableIIDs_MemcacheMissSoStartRPC(self):
+    self.mox.StubOutWithMock(
+        frontendsearchpipeline, '_StartBackendNonviewableCall')
+    cached_dict = {}  # Nothing here, so it is an at-risk cache miss.
+    rpc_tuples = []  # One RPC should accumulate here.
+    nonviewable_iids = {1: {10001}}  # Nothing added here until RPC completes.
+    processed_invalidations_up_to = 12345
+    a_fake_rpc = testing_helpers.Blank(callback=None)
+    frontendsearchpipeline._StartBackendNonviewableCall(
+      789, 111, 2, processed_invalidations_up_to).AndReturn(a_fake_rpc)
+    self.mox.ReplayAll()
+
+    frontendsearchpipeline._AccumulateNonviewableIIDs(
+      789, 111, 2, cached_dict, nonviewable_iids, {}, rpc_tuples,
+      processed_invalidations_up_to)
+    self.mox.VerifyAll()
+    _, sid_0, rpc_0 = rpc_tuples[0]
+    self.assertEqual(2, sid_0)
+    self.assertEqual(a_fake_rpc, rpc_0)
+    self.assertIsNotNone(a_fake_rpc.callback)
+    self.assertEqual({1: {10001}}, nonviewable_iids)
+
+  def testGetCachedSearchResults(self):
+    # TODO(jrobbins): Write this test.
+    pass
+
+  def testMakeBackendRequestHeaders(self):
+    headers = frontendsearchpipeline._MakeBackendRequestHeaders(False)
+    self.assertNotIn('X-AppEngine-FailFast', headers)
+    headers = frontendsearchpipeline._MakeBackendRequestHeaders(True)
+    self.assertEqual('Yes', headers['X-AppEngine-FailFast'])
+
+  def testStartBackendSearchCall(self):
+    self.mox.StubOutWithMock(urlfetch, 'create_rpc')
+    self.mox.StubOutWithMock(urlfetch, 'make_fetch_call')
+    self.mox.StubOutWithMock(modules, 'get_hostname')
+    a_fake_rpc = testing_helpers.Blank(callback=None)
+    urlfetch.create_rpc(deadline=settings.backend_deadline).AndReturn(
+      a_fake_rpc)
+    modules.get_hostname(module='besearch')
+    urlfetch.make_fetch_call(
+      a_fake_rpc, mox.StrContains(
+          urls.BACKEND_SEARCH + '?groupby=cc&invalidation_timestep=12345&'
+          +'logged_in_user_id=777&me_user_ids=555&'
+          +'num=201&projects=proj&q=priority%3Dhigh&shard_id=2&start=0'),
+          follow_redirects=False,
+      headers=mox.IsA(dict))
+    self.mox.ReplayAll()
+
+    processed_invalidations_up_to = 12345
+    me_user_ids = [555]
+    logged_in_user_id = 777
+    new_url_num = 201
+    frontendsearchpipeline._StartBackendSearchCall(
+        ['proj'], (2, 'priority=high'),
+        processed_invalidations_up_to,
+        me_user_ids,
+        logged_in_user_id,
+        new_url_num,
+        group_by_spec='cc')
+    self.mox.VerifyAll()
+
+  def testStartBackendSearchCall_SortAndGroup(self):
+    self.mox.StubOutWithMock(urlfetch, 'create_rpc')
+    self.mox.StubOutWithMock(urlfetch, 'make_fetch_call')
+    self.mox.StubOutWithMock(modules, 'get_hostname')
+    a_fake_rpc = testing_helpers.Blank(callback=None)
+    urlfetch.create_rpc(deadline=settings.backend_deadline).AndReturn(
+      a_fake_rpc)
+    modules.get_hostname(module='besearch')
+    urlfetch.make_fetch_call(
+        a_fake_rpc,
+        mox.StrContains(
+            urls.BACKEND_SEARCH + '?groupby=bar&' +
+            'invalidation_timestep=12345&' +
+            'logged_in_user_id=777&me_user_ids=555&num=201&projects=proj&' +
+            'q=priority%3Dhigh&shard_id=2&sort=foo&start=0'),
+        follow_redirects=False,
+        headers=mox.IsA(dict))
+    self.mox.ReplayAll()
+
+    processed_invalidations_up_to = 12345
+    me_user_ids = [555]
+    logged_in_user_id = 777
+    new_url_num = 201
+    sort_spec = 'foo'
+    group_by_spec = 'bar'
+    frontendsearchpipeline._StartBackendSearchCall(
+        ['proj'], (2, 'priority=high'),
+        processed_invalidations_up_to,
+        me_user_ids,
+        logged_in_user_id,
+        new_url_num,
+        sort_spec=sort_spec,
+        group_by_spec=group_by_spec)
+    self.mox.VerifyAll()
+
+  def testStartBackendNonviewableCall(self):
+    self.mox.StubOutWithMock(urlfetch, 'create_rpc')
+    self.mox.StubOutWithMock(urlfetch, 'make_fetch_call')
+    self.mox.StubOutWithMock(modules, 'get_hostname')
+    a_fake_rpc = testing_helpers.Blank(callback=None)
+    urlfetch.create_rpc(deadline=settings.backend_deadline).AndReturn(
+      a_fake_rpc)
+    modules.get_hostname(module='besearch')
+    urlfetch.make_fetch_call(
+      a_fake_rpc, mox.StrContains(urls.BACKEND_NONVIEWABLE),
+      follow_redirects=False, headers=mox.IsA(dict))
+    self.mox.ReplayAll()
+
+    processed_invalidations_up_to = 12345
+    frontendsearchpipeline._StartBackendNonviewableCall(
+      789, 111, 2, processed_invalidations_up_to)
+    self.mox.VerifyAll()
+
+  def testHandleBackendSearchResponse_500(self):
+    response_str = 'There was a problem processing the query.'
+    rpc = testing_helpers.Blank(
+      get_result=lambda: testing_helpers.Blank(
+          content=response_str, status_code=500))
+    rpc_tuple = (NOW, 2, rpc)
+    rpc_tuples = []  # Nothing should be added for this case.
+    filtered_iids = {}  # Search results should accumlate here, per-shard.
+    search_limit_reached = {}  # Booleans accumulate here, per-shard.
+    processed_invalidations_up_to = 12345
+
+    me_user_ids = [111]
+    logged_in_user_id = 0
+    new_url_num = 100
+    error_responses = set()
+
+    self.mox.StubOutWithMock(frontendsearchpipeline, '_StartBackendSearchCall')
+    frontendsearchpipeline._HandleBackendSearchResponse(
+        ['proj'], rpc_tuple, rpc_tuples, 0, filtered_iids, search_limit_reached,
+        processed_invalidations_up_to, error_responses, me_user_ids,
+        logged_in_user_id, new_url_num, 1, None, None)
+    self.assertEqual([], rpc_tuples)
+    self.assertIn(2, error_responses)
+
+  def testHandleBackendSearchResponse_Error(self):
+    response_str = (
+      '})]\'\n'
+      '{'
+      ' "unfiltered_iids": [],'
+      ' "search_limit_reached": false,'
+      ' "error": "Invalid query"'
+      '}'
+      )
+    rpc = testing_helpers.Blank(
+      get_result=lambda: testing_helpers.Blank(
+          content=response_str, status_code=200))
+    rpc_tuple = (NOW, 2, rpc)
+    rpc_tuples = []  # Nothing should be added for this case.
+    filtered_iids = {}  # Search results should accumlate here, per-shard.
+    search_limit_reached = {}  # Booleans accumulate here, per-shard.
+    processed_invalidations_up_to = 12345
+
+    me_user_ids = [111]
+    logged_in_user_id = 0
+    new_url_num = 100
+    error_responses = set()
+    frontendsearchpipeline._HandleBackendSearchResponse(
+        ['proj'], rpc_tuple, rpc_tuples, 2, filtered_iids, search_limit_reached,
+        processed_invalidations_up_to, error_responses, me_user_ids,
+        logged_in_user_id, new_url_num, 1, None, None)
+    self.assertEqual([], rpc_tuples)
+    self.assertEqual({2: []}, filtered_iids)
+    self.assertEqual({2: False}, search_limit_reached)
+    self.assertEqual({2}, error_responses)
+
+  def testHandleBackendSearchResponse_Normal(self):
+    response_str = (
+      '})]\'\n'
+      '{'
+      ' "unfiltered_iids": [10002, 10042],'
+      ' "search_limit_reached": false'
+      '}'
+      )
+    rpc = testing_helpers.Blank(
+      get_result=lambda: testing_helpers.Blank(
+          content=response_str, status_code=200))
+    rpc_tuple = (NOW, 2, rpc)
+    rpc_tuples = []  # Nothing should be added for this case.
+    filtered_iids = {}  # Search results should accumlate here, per-shard.
+    search_limit_reached = {}  # Booleans accumulate here, per-shard.
+    processed_invalidations_up_to = 12345
+
+    me_user_ids = [111]
+    logged_in_user_id = 0
+    new_url_num = 100
+    error_responses = set()
+    frontendsearchpipeline._HandleBackendSearchResponse(
+        ['proj'], rpc_tuple, rpc_tuples, 2, filtered_iids, search_limit_reached,
+        processed_invalidations_up_to, error_responses, me_user_ids,
+        logged_in_user_id, new_url_num, 1, None, None)
+    self.assertEqual([], rpc_tuples)
+    self.assertEqual({2: [10002, 10042]}, filtered_iids)
+    self.assertEqual({2: False}, search_limit_reached)
+
+  def testHandleBackendSearchResponse_TriggersRetry(self):
+    response_str = None
+    rpc = testing_helpers.Blank(
+      get_result=lambda: testing_helpers.Blank(content=response_str))
+    rpc_tuple = (NOW, 2, rpc)
+    rpc_tuples = []  # New RPC should be appended here
+    filtered_iids = {}  # No change here until retry completes.
+    search_limit_reached = {}  # No change here until retry completes.
+    processed_invalidations_up_to = 12345
+    error_responses = set()
+
+    me_user_ids = [111]
+    logged_in_user_id = 0
+    new_url_num = 100
+
+    self.mox.StubOutWithMock(frontendsearchpipeline, '_StartBackendSearchCall')
+    a_fake_rpc = testing_helpers.Blank(callback=None)
+    rpc = frontendsearchpipeline._StartBackendSearchCall(
+        ['proj'],
+        2,
+        processed_invalidations_up_to,
+        me_user_ids,
+        logged_in_user_id,
+        new_url_num,
+        can=1,
+        group_by_spec=None,
+        sort_spec=None,
+        failfast=False).AndReturn(a_fake_rpc)
+    self.mox.ReplayAll()
+
+    frontendsearchpipeline._HandleBackendSearchResponse(
+        ['proj'], rpc_tuple, rpc_tuples, 2, filtered_iids, search_limit_reached,
+        processed_invalidations_up_to, error_responses, me_user_ids,
+        logged_in_user_id, new_url_num, 1, None, None)
+    self.mox.VerifyAll()
+    _, retry_shard_id, retry_rpc = rpc_tuples[0]
+    self.assertEqual(2, retry_shard_id)
+    self.assertEqual(a_fake_rpc, retry_rpc)
+    self.assertIsNotNone(retry_rpc.callback)
+    self.assertEqual({}, filtered_iids)
+    self.assertEqual({}, search_limit_reached)
+
+  def testHandleBackendNonviewableResponse_Error(self):
+    response_str = 'There was an error.'
+    rpc = testing_helpers.Blank(
+      get_result=lambda: testing_helpers.Blank(
+          content=response_str,
+          status_code=500
+      ))
+    rpc_tuple = (NOW, 2, rpc)
+    rpc_tuples = []  # Nothing should be added for this case.
+    nonviewable_iids = {}  # At-risk issue IDs should accumlate here, per-shard.
+    processed_invalidations_up_to = 12345
+
+    self.mox.StubOutWithMock(
+        frontendsearchpipeline, '_StartBackendNonviewableCall')
+    frontendsearchpipeline._HandleBackendNonviewableResponse(
+      789, 111, 2, rpc_tuple, rpc_tuples, 0, nonviewable_iids,
+      processed_invalidations_up_to)
+    self.assertEqual([], rpc_tuples)
+    self.assertNotEqual({2: {10002, 10042}}, nonviewable_iids)
+
+  def testHandleBackendNonviewableResponse_Normal(self):
+    response_str = (
+      '})]\'\n'
+      '{'
+      ' "nonviewable": [10002, 10042]'
+      '}'
+      )
+    rpc = testing_helpers.Blank(
+      get_result=lambda: testing_helpers.Blank(
+          content=response_str,
+          status_code=200
+      ))
+    rpc_tuple = (NOW, 2, rpc)
+    rpc_tuples = []  # Nothing should be added for this case.
+    nonviewable_iids = {}  # At-risk issue IDs should accumlate here, per-shard.
+    processed_invalidations_up_to = 12345
+
+    frontendsearchpipeline._HandleBackendNonviewableResponse(
+      789, 111, 2, rpc_tuple, rpc_tuples, 2, nonviewable_iids,
+      processed_invalidations_up_to)
+    self.assertEqual([], rpc_tuples)
+    self.assertEqual({2: {10002, 10042}}, nonviewable_iids)
+
+  def testHandleBackendAtRiskResponse_TriggersRetry(self):
+    response_str = None
+    rpc = testing_helpers.Blank(
+      get_result=lambda: testing_helpers.Blank(content=response_str))
+    rpc_tuple = (NOW, 2, rpc)
+    rpc_tuples = []  # New RPC should be appended here
+    nonviewable_iids = {}  # No change here until retry completes.
+    processed_invalidations_up_to = 12345
+
+    self.mox.StubOutWithMock(
+      frontendsearchpipeline, '_StartBackendNonviewableCall')
+    a_fake_rpc = testing_helpers.Blank(callback=None)
+    rpc = frontendsearchpipeline._StartBackendNonviewableCall(
+      789, 111, 2, processed_invalidations_up_to, failfast=False
+      ).AndReturn(a_fake_rpc)
+    self.mox.ReplayAll()
+
+    frontendsearchpipeline._HandleBackendNonviewableResponse(
+      789, 111, 2, rpc_tuple, rpc_tuples, 2, nonviewable_iids,
+      processed_invalidations_up_to)
+    self.mox.VerifyAll()
+    _, retry_shard_id, retry_rpc = rpc_tuples[0]
+    self.assertEqual(2, retry_shard_id)
+    self.assertIsNotNone(retry_rpc.callback)
+    self.assertEqual(a_fake_rpc, retry_rpc)
+    self.assertEqual({}, nonviewable_iids)
+
+  def testSortIssues(self):
+    services = service_manager.Services(
+        cache_manager=fake.CacheManager())
+    sorting.InitializeArtValues(services)
+
+    issue_1 = fake.MakeTestIssue(
+      789, 1, 'one', 'New', 111, labels=['Priority-High'])
+    issue_2 = fake.MakeTestIssue(
+      789, 2, 'two', 'New', 111, labels=['Priority-Low'])
+    issue_3 = fake.MakeTestIssue(
+      789, 3, 'three', 'New', 111, labels=['Priority-Medium'])
+    issues = [issue_1, issue_2, issue_3]
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+
+    sorted_issues = frontendsearchpipeline._SortIssues(
+        issues, config, {}, '', 'priority')
+
+    self.assertEqual(
+      [issue_1, issue_3, issue_2],  # Order is high, medium, low.
+      sorted_issues)
+
+
+class FrontendSearchPipelineShardMethodsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.sharded_iids = {
+      (0, 'p:v'): [10, 20, 30, 40, 50],
+      (1, 'p:v'): [21, 41, 61, 81],
+      (2, 'p:v'): [42, 52, 62, 72, 102],
+      (3, 'p:v'): [],
+      }
+
+  def testTotalLength_Empty(self):
+    """If there were no results, the length of the sharded list is zero."""
+    self.assertEqual(0, frontendsearchpipeline._TotalLength({}))
+
+  def testTotalLength_Normal(self):
+    """The length of the sharded list is the sum of the shard lengths."""
+    self.assertEqual(
+        14, frontendsearchpipeline._TotalLength(self.sharded_iids))
+
+  def testReverseShards_Empty(self):
+    """Reversing an empty sharded list is still empty."""
+    empty_sharded_iids = {}
+    frontendsearchpipeline._ReverseShards(empty_sharded_iids)
+    self.assertEqual({}, empty_sharded_iids)
+
+  def testReverseShards_Normal(self):
+    """Reversing a sharded list reverses each shard."""
+    frontendsearchpipeline._ReverseShards(self.sharded_iids)
+    self.assertEqual(
+        {(0, 'p:v'): [50, 40, 30, 20, 10],
+         (1, 'p:v'): [81, 61, 41, 21],
+         (2, 'p:v'): [102, 72, 62, 52, 42],
+         (3, 'p:v'): [],
+         },
+        self.sharded_iids)
+
+  def testTrimShardedIIDs_Empty(self):
+    """If the sharded list is empty, trimming it makes no change."""
+    empty_sharded_iids = {}
+    frontendsearchpipeline._TrimEndShardedIIDs(empty_sharded_iids, [], 12)
+    self.assertEqual({}, empty_sharded_iids)
+
+    frontendsearchpipeline._TrimEndShardedIIDs(
+        empty_sharded_iids,
+        [(100, (0, 'p:v')), (88, (8, 'p:v')), (99, (9, 'p:v'))],
+        12)
+    self.assertEqual({}, empty_sharded_iids)
+
+  def testTrimShardedIIDs_NoSamples(self):
+    """If there are no samples, we don't trim off any IIDs."""
+    orig_sharded_iids = {
+      shard_id: iids[:] for shard_id, iids in self.sharded_iids.items()}
+    num_trimmed = frontendsearchpipeline._TrimEndShardedIIDs(
+        self.sharded_iids, [], 12)
+    self.assertEqual(0, num_trimmed)
+    self.assertEqual(orig_sharded_iids, self.sharded_iids)
+
+    num_trimmed = frontendsearchpipeline._TrimEndShardedIIDs(
+        self.sharded_iids, [], 1)
+    self.assertEqual(0, num_trimmed)
+    self.assertEqual(orig_sharded_iids, self.sharded_iids)
+
+  def testTrimShardedIIDs_Normal(self):
+    """The first 3 samples contribute all needed IIDs, so trim off the rest."""
+    samples = [(30, (0, 'p:v')), (41, (1, 'p:v')), (62, (2, 'p:v')),
+               (40, (0, 'p:v')), (81, (1, 'p:v'))]
+    num_trimmed = frontendsearchpipeline._TrimEndShardedIIDs(
+        self.sharded_iids, samples, 5)
+    self.assertEqual(2 + 1 + 0 + 0, num_trimmed)
+    self.assertEqual(
+        {  # shard_id: iids before lower-bound + iids before 1st excess sample.
+         (0, 'p:v'): [10, 20] + [30],
+         (1, 'p:v'): [21] + [41, 61],
+         (2, 'p:v'): [42, 52] + [62, 72, 102],
+         (3, 'p:v'): [] + []},
+        self.sharded_iids)
+
+  def testCalcSamplePositions_Empty(self):
+    sharded_iids = {0: []}
+    samples = []
+    self.assertEqual(
+      [], frontendsearchpipeline._CalcSamplePositions(sharded_iids, samples))
+
+    sharded_iids = {0: [10, 20, 30, 40]}
+    samples = []
+    self.assertEqual(
+      [], frontendsearchpipeline._CalcSamplePositions(sharded_iids, samples))
+
+    sharded_iids = {0: []}
+    # E.g., the IIDs 2 and 4 might have been trimmed out in the forward phase.
+    # But we still have them in the list for the backwards phase, and they
+    # should just not contribute anything to the result.
+    samples = [(2, (2, 'p:v')), (4, (4, 'p:v'))]
+    self.assertEqual(
+      [], frontendsearchpipeline._CalcSamplePositions(sharded_iids, samples))
+
+  def testCalcSamplePositions_Normal(self):
+    samples = [(30, (0, 'p:v')), (41, (1, 'p:v')), (62, (2, 'p:v')),
+               (40, (0, 'p:v')), (81, (1, 'p:v'))]
+    self.assertEqual(
+      [(30, (0, 'p:v'), 2),
+       (41, (1, 'p:v'), 1),
+       (62, (2, 'p:v'), 2),
+       (40, (0, 'p:v'), 3),
+       (81, (1, 'p:v'), 3)],
+      frontendsearchpipeline._CalcSamplePositions(self.sharded_iids, samples))
diff --git a/search/test/query2ast_test.py b/search/test/query2ast_test.py
new file mode 100644
index 0000000..fc92e72
--- /dev/null
+++ b/search/test/query2ast_test.py
@@ -0,0 +1,1041 @@
+# 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
+
+"""Tests for the query2ast module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import datetime
+import time
+import unittest
+import mock
+
+from proto import ast_pb2
+from proto import tracker_pb2
+from search import query2ast
+from tracker import tracker_bizobj
+
+BOOL = query2ast.BOOL
+DATE = query2ast.DATE
+NUM = query2ast.NUM
+TXT = query2ast.TXT
+
+SUBQUERY = query2ast.SUBQUERY
+LEFT_PAREN = query2ast.LEFT_PAREN
+RIGHT_PAREN = query2ast.RIGHT_PAREN
+OR = query2ast.OR
+
+BUILTIN_ISSUE_FIELDS = query2ast.BUILTIN_ISSUE_FIELDS
+ANY_FIELD = query2ast.BUILTIN_ISSUE_FIELDS['any_field']
+
+EQ = query2ast.EQ
+NE = query2ast.NE
+LT = query2ast.LT
+GT = query2ast.GT
+LE = query2ast.LE
+GE = query2ast.GE
+TEXT_HAS = query2ast.TEXT_HAS
+NOT_TEXT_HAS = query2ast.NOT_TEXT_HAS
+IS_DEFINED = query2ast.IS_DEFINED
+IS_NOT_DEFINED = query2ast.IS_NOT_DEFINED
+KEY_HAS = query2ast.KEY_HAS
+
+MakeCond = ast_pb2.MakeCond
+NOW = 1277762224
+
+
+class QueryParsingUnitTest(unittest.TestCase):
+
+  def setUp(self):
+    self.project_id = 789
+    self.default_config = tracker_bizobj.MakeDefaultProjectIssueConfig(
+        self.project_id)
+
+  def testParseUserQuery_OrClause(self):
+    # an "OR" query, which should look like two separate simple querys
+    # joined together by a pipe.
+    ast = query2ast.ParseUserQuery(
+        'ham OR fancy', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    conj1 = ast.conjunctions[0]
+    conj2 = ast.conjunctions[1]
+    self.assertEqual([MakeCond(TEXT_HAS, [ANY_FIELD], ['ham'], [])],
+                     conj1.conds)
+    self.assertEqual([MakeCond(TEXT_HAS, [ANY_FIELD], ['fancy'], [])],
+                     conj2.conds)
+
+  def testParseUserQuery_Words(self):
+    # an "ORTerm" is actually anything appearing on either side of an
+    # "OR" operator. So this could be thought of as "simple" query parsing.
+
+    # a simple query with no spaces
+    ast = query2ast.ParseUserQuery(
+        'hamfancy', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    fulltext_cond = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [ANY_FIELD], ['hamfancy'], []), fulltext_cond)
+
+    # negative word
+    ast = query2ast.ParseUserQuery(
+        '-hamfancy', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    fulltext_cond = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        # note: not NOT_TEXT_HAS.
+        MakeCond(NOT_TEXT_HAS, [ANY_FIELD], ['hamfancy'], []),
+        fulltext_cond)
+
+    # invalid fulltext term
+    ast = query2ast.ParseUserQuery(
+        'ham=fancy\\', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    self.assertEqual([], ast.conjunctions[0].conds)
+
+    # an explicit "AND" query in the "featured" context
+    warnings = []
+    query2ast.ParseUserQuery(
+        'ham AND fancy', 'label:featured', BUILTIN_ISSUE_FIELDS,
+        self.default_config, warnings=warnings)
+    self.assertEqual(
+      ['The only supported boolean operator is OR (all capitals).'],
+      warnings)
+
+    # an implicit "AND" query
+    ast = query2ast.ParseUserQuery(
+        'ham fancy', '-label:deprecated', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    scope_cond1, ft_cond1, ft_cond2 = ast.conjunctions[0].conds
+    self.assertEqual(
+        MakeCond(NOT_TEXT_HAS, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['deprecated'], []),
+        scope_cond1)
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [ANY_FIELD], ['ham'], []), ft_cond1)
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [ANY_FIELD], ['fancy'], []), ft_cond2)
+
+    # Use word with non-operator prefix.
+    word_with_non_op_prefix = '%stest' % query2ast.NON_OP_PREFIXES[0]
+    ast = query2ast.ParseUserQuery(
+        word_with_non_op_prefix, '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    fulltext_cond = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [ANY_FIELD], ['"%s"' % word_with_non_op_prefix], []),
+        fulltext_cond)
+
+    # mix positive and negative words
+    ast = query2ast.ParseUserQuery(
+        'ham -fancy', '-label:deprecated', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    scope_cond1, ft_cond1, ft_cond2 = ast.conjunctions[0].conds
+    self.assertEqual(
+        MakeCond(NOT_TEXT_HAS, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['deprecated'], []),
+        scope_cond1)
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [ANY_FIELD], ['ham'], []), ft_cond1)
+    self.assertEqual(
+        MakeCond(NOT_TEXT_HAS, [ANY_FIELD], ['fancy'], []), ft_cond2)
+
+    # converts terms to lower case
+    ast = query2ast.ParseUserQuery(
+        'AmDude', '-label:deprecated', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    scope_cond1, fulltext_cond = ast.conjunctions[0].conds
+    self.assertEqual(
+        MakeCond(NOT_TEXT_HAS, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['deprecated'], []),
+        scope_cond1)
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [ANY_FIELD], ['amdude'], []), fulltext_cond)
+
+  def testParseUserQuery_Phrases(self):
+    # positive phrases
+    ast = query2ast.ParseUserQuery(
+        '"one two"', '-label:deprecated', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    scope_cond1, fulltext_cond = ast.conjunctions[0].conds
+    self.assertEqual(
+        MakeCond(NOT_TEXT_HAS, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['deprecated'], []),
+        scope_cond1)
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [ANY_FIELD], ['"one two"'], []), fulltext_cond)
+
+    # negative phrases
+    ast = query2ast.ParseUserQuery(
+        '-"one two"', '-label:deprecated', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    scope_cond1, fulltext_cond = ast.conjunctions[0].conds
+    self.assertEqual(
+        MakeCond(NOT_TEXT_HAS, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['deprecated'], []),
+        scope_cond1)
+    self.assertEqual(
+        MakeCond(NOT_TEXT_HAS, [ANY_FIELD], ['"one two"'], []), fulltext_cond)
+
+    # multiple phrases
+    ast = query2ast.ParseUserQuery(
+        '-"a b" "x y"', '-label:deprecated', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    scope_cond1, ft_cond1, ft_cond2 = ast.conjunctions[0].conds
+    self.assertEqual(
+        MakeCond(NOT_TEXT_HAS, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['deprecated'], []),
+        scope_cond1)
+    self.assertEqual(
+        MakeCond(NOT_TEXT_HAS, [ANY_FIELD], ['"a b"'], []), ft_cond1)
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [ANY_FIELD], ['"x y"'], []), ft_cond2)
+
+  def testParseUserQuery_CodeSyntaxThatWeNeedToCopeWith(self):
+    # positive phrases
+    ast = query2ast.ParseUserQuery(
+        'Base::Tuple', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [ANY_FIELD],
+                 ['"base::tuple"'], []),
+        cond)
+
+    # stuff we just ignore
+    ast = query2ast.ParseUserQuery(
+        ':: - -- .', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    self.assertEqual([], ast.conjunctions[0].conds)
+
+  def testParseUserQuery_IsOperator(self):
+    """Test is:open, is:spam, and is:blocked."""
+    for keyword in ['open', 'spam', 'blocked']:
+      ast = query2ast.ParseUserQuery(
+          'is:' + keyword, '', BUILTIN_ISSUE_FIELDS, self.default_config)
+      cond1 = ast.conjunctions[0].conds[0]
+      self.assertEqual(
+          MakeCond(EQ, [BUILTIN_ISSUE_FIELDS[keyword]], [], []),
+          cond1)
+      ast = query2ast.ParseUserQuery(
+          '-is:' + keyword, '', BUILTIN_ISSUE_FIELDS, self.default_config)
+      cond1 = ast.conjunctions[0].conds[0]
+      self.assertEqual(
+          MakeCond(NE, [BUILTIN_ISSUE_FIELDS[keyword]], [], []),
+          cond1)
+
+  def testParseUserQuery_HasOperator(self):
+    # Search for issues with at least one attachment
+    ast = query2ast.ParseUserQuery(
+        'has:attachment', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(IS_DEFINED, [BUILTIN_ISSUE_FIELDS['attachment']], [], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        '-has:attachment', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(IS_NOT_DEFINED, [BUILTIN_ISSUE_FIELDS['attachment']], [], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'has=attachment', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(IS_DEFINED, [BUILTIN_ISSUE_FIELDS['attachment']], [], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        '-has=attachment', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(IS_NOT_DEFINED, [BUILTIN_ISSUE_FIELDS['attachment']], [], []),
+        cond1)
+
+    # Search for numeric fields for searches with 'has' prefix
+    ast = query2ast.ParseUserQuery(
+        'has:attachments', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(IS_DEFINED, [BUILTIN_ISSUE_FIELDS['attachments']], [], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        '-has:attachments', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(IS_NOT_DEFINED, [BUILTIN_ISSUE_FIELDS['attachments']],
+                 [], []),
+        cond1)
+
+    # If it is not a field, look for any key-value label.
+    ast = query2ast.ParseUserQuery(
+        'has:Size', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(IS_DEFINED, [BUILTIN_ISSUE_FIELDS['label']], ['size'], []),
+        cond1)
+
+  def testParseUserQuery_Phase(self):
+    ast = query2ast.ParseUserQuery(
+        'gate:Canary,Stable', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [BUILTIN_ISSUE_FIELDS['gate']],
+                 ['canary', 'stable'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        '-gate:Canary,Stable', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(NOT_TEXT_HAS, [BUILTIN_ISSUE_FIELDS['gate']],
+                 ['canary', 'stable'], []),
+        cond1)
+
+  def testParseUserQuery_Components(self):
+    """Parse user queries for components"""
+    ast = query2ast.ParseUserQuery(
+        'component:UI', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [BUILTIN_ISSUE_FIELDS['component']],
+                 ['ui'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'Component:UI>AboutBox', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [BUILTIN_ISSUE_FIELDS['component']],
+                 ['ui>aboutbox'], []),
+        cond1)
+
+  def testParseUserQuery_OwnersReportersAndCc(self):
+    """Parse user queries for owner:, reporter: and cc:."""
+    ast = query2ast.ParseUserQuery(
+        'owner:user', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [BUILTIN_ISSUE_FIELDS['owner']],
+                 ['user'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'owner:user@example.com', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [BUILTIN_ISSUE_FIELDS['owner']],
+                 ['user@example.com'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'owner=user@example.com', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(EQ, [BUILTIN_ISSUE_FIELDS['owner']],
+                 ['user@example.com'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        '-reporter=user@example.com', '', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(NE, [BUILTIN_ISSUE_FIELDS['reporter']],
+                 ['user@example.com'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'cc=user@example.com,user2@example.com', '', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(EQ, [BUILTIN_ISSUE_FIELDS['cc']],
+                 ['user@example.com', 'user2@example.com'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'cc:user,user2', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [BUILTIN_ISSUE_FIELDS['cc']],
+                 ['user', 'user2'], []),
+        cond1)
+
+  def testParseUserQuery_SearchWithinFields(self):
+    # Search for issues with certain filenames
+    ast = query2ast.ParseUserQuery(
+        'attachment:filename', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [BUILTIN_ISSUE_FIELDS['attachment']],
+                 ['filename'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        '-attachment:filename', '', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(NOT_TEXT_HAS, [BUILTIN_ISSUE_FIELDS['attachment']],
+                 ['filename'], []),
+        cond1)
+
+    # Search for issues with a certain number of attachments
+    ast = query2ast.ParseUserQuery(
+        'attachments:2', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [BUILTIN_ISSUE_FIELDS['attachments']],
+                 ['2'], [2]),
+        cond1)
+
+    # Searches with '=' syntax
+    ast = query2ast.ParseUserQuery(
+        'attachment=filename', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(EQ, [BUILTIN_ISSUE_FIELDS['attachment']],
+                 ['filename'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        '-attachment=filename', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(NE, [BUILTIN_ISSUE_FIELDS['attachment']],
+                 ['filename'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'milestone=2009', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(EQ, [BUILTIN_ISSUE_FIELDS['label']], ['milestone-2009'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        '-milestone=2009', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(NE, [BUILTIN_ISSUE_FIELDS['label']], ['milestone-2009'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'milestone=2009-Q1', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(EQ, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['milestone-2009-q1'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        '-milestone=2009-Q1', '', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(NE, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['milestone-2009-q1'], []),
+        cond1)
+
+    # Searches with ':' syntax
+    ast = query2ast.ParseUserQuery(
+        'summary:foo', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS,
+                 [BUILTIN_ISSUE_FIELDS['summary']], ['foo'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'summary:"greetings programs"', '', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS,
+                 [BUILTIN_ISSUE_FIELDS['summary']], ['greetings programs'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'summary:"&#1234;"', '', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS,
+                 [BUILTIN_ISSUE_FIELDS['summary']], ['&#1234;'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'priority:high', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(KEY_HAS,
+                 [BUILTIN_ISSUE_FIELDS['label']], ['priority-high'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'type:security', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(KEY_HAS,
+                 [BUILTIN_ISSUE_FIELDS['label']], ['type-security'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'label:priority-high', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS,
+                 [BUILTIN_ISSUE_FIELDS['label']], ['priority-high'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'blockedon:other:123', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [BUILTIN_ISSUE_FIELDS['blockedon']],
+                 ['other:123'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'cost=-2', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(EQ, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['cost--2'], []),
+        cond1)
+
+    # Searches with ':' and an email domain only.
+    ast = query2ast.ParseUserQuery(
+        'reporter:@google.com', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS,
+                 [BUILTIN_ISSUE_FIELDS['reporter']], ['@google.com'], []),
+        cond1)
+
+    # Search for issues in certain user hotlists.
+    ast = query2ast.ParseUserQuery(
+        'hotlist=gatsby@chromium.org:Hotlist1', '',
+        BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(
+            EQ, [BUILTIN_ISSUE_FIELDS['hotlist']],
+            ['gatsby@chromium.org:hotlist1'], []),
+        cond1)
+
+    # Search for 'Hotlist' labels.
+    ast = query2ast.ParseUserQuery(
+        'hotlist:sublabel', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(KEY_HAS, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['hotlist-sublabel'], []),
+        cond1)
+
+  def testParseUserQuery_SearchWithinCustomFields(self):
+    """Enums are treated as labels, other fields are kept as fields."""
+    fd1 = tracker_bizobj.MakeFieldDef(
+        1, self.project_id, 'Size', tracker_pb2.FieldTypes.ENUM_TYPE,
+        'applic', 'applic', False, False, False, None, None, None, False, None,
+        None, None, 'no_action', 'doc', False)
+    fd2 = tracker_bizobj.MakeFieldDef(
+        1, self.project_id, 'EstDays', tracker_pb2.FieldTypes.INT_TYPE,
+        'applic', 'applic', False, False, False, None, None, None, False, None,
+        None, None, 'no_action', 'doc', False)
+    self.default_config.field_defs.extend([fd1, fd2])
+    ast = query2ast.ParseUserQuery(
+        'Size:Small EstDays>3', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    cond2 = ast.conjunctions[0].conds[1]
+    self.assertEqual(
+        MakeCond(KEY_HAS, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['size-small'], []),
+        cond1)
+    self.assertEqual(
+        MakeCond(GT, [fd2], ['3'], [3]),
+        cond2)
+
+  @mock.patch('time.time', return_value=NOW)
+  def testParseUserQuery_Approvals(self, _mock_time):
+    """Test approval queries are parsed correctly."""
+    fd1 = tracker_bizobj.MakeFieldDef(
+        1, self.project_id, 'UIReview', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        'applic', 'applic', False, False, False, None, None, None, False, None,
+        None, None, 'no_action', 'doc', False)
+    fd2 = tracker_bizobj.MakeFieldDef(
+        2, self.project_id, 'EstDays', tracker_pb2.FieldTypes.INT_TYPE,
+        'applic', 'applic', False, False, False, None, None, None, False, None,
+        None, None, 'no_action', 'doc', False)
+    fd3 = tracker_bizobj.MakeFieldDef(
+        3, self.project_id, 'UXReview', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        'applic', 'applic', False, False, False, None, None, None, False, None,
+        None, None, 'no_action', 'doc', False)
+    self.default_config.field_defs.extend([fd1, fd2, fd3])
+    ast = query2ast.ParseUserQuery(
+        'UXReview-approver:user1@mail.com,user2@mail.com UIReview:Approved '
+        'UIReview-on>today-7', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    cond2 = ast.conjunctions[0].conds[1]
+    cond3 = ast.conjunctions[0].conds[2]
+    self.assertEqual(MakeCond(TEXT_HAS, [fd3],
+                              ['user1@mail.com', 'user2@mail.com'], [],
+                              key_suffix='-approver'), cond1)
+    self.assertEqual(MakeCond(TEXT_HAS, [fd1], ['approved'], []), cond2)
+    self.assertEqual(
+        cond3,
+        MakeCond(
+            GT, [fd1], [], [query2ast._CalculatePastDate(7, NOW)],
+            key_suffix='-on'))
+
+  def testParseUserQuery_PhaseFields(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        1, self.project_id, 'EstDays', tracker_pb2.FieldTypes.INT_TYPE,
+        'applic', 'applic', False, False, False, None, None, None, False, None,
+        None, None, 'no_action', 'doc', False, is_phase_field=True)
+    self.default_config.field_defs.append(fd)
+    ast = query2ast.ParseUserQuery(
+        'UXReview.EstDays>3', '', BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(GT, [fd], ['3'], [3], phase_name='uxreview'),
+        cond1)
+
+  def testParseUserQuery_QuickOr(self):
+    # quick-or searches
+    ast = query2ast.ParseUserQuery(
+        'milestone:2008,2009,2010', '', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(KEY_HAS, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['milestone-2008', 'milestone-2009', 'milestone-2010'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'label:milestone-2008,milestone-2009,milestone-2010', '',
+        BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['milestone-2008', 'milestone-2009', 'milestone-2010'], []),
+        cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'milestone=2008,2009,2010', '', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(EQ, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['milestone-2008', 'milestone-2009', 'milestone-2010'], []),
+        cond1)
+
+    # Duplicated and trailing commas are ignored.
+    ast = query2ast.ParseUserQuery(
+        'milestone=2008,,2009,2010,', '', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    self.assertEqual(
+        MakeCond(EQ, [BUILTIN_ISSUE_FIELDS['label']],
+                 ['milestone-2008', 'milestone-2009', 'milestone-2010'], []),
+        cond1)
+
+  def testParseUserQuery_Dates(self):
+    # query with a daterange
+    ast = query2ast.ParseUserQuery(
+        'modified>=2009-5-12', '', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    ts1 = int(time.mktime(datetime.datetime(2009, 5, 12).timetuple()))
+    self.assertEqual(
+        MakeCond(GE, [BUILTIN_ISSUE_FIELDS['modified']], [], [ts1]), cond1)
+
+    # query with quick-or
+    ast = query2ast.ParseUserQuery(
+        'modified=2009-5-12,2009-5-13', '', BUILTIN_ISSUE_FIELDS,
+        self.default_config)
+    cond1 = ast.conjunctions[0].conds[0]
+    ts1 = int(time.mktime(datetime.datetime(2009, 5, 12).timetuple()))
+    ts2 = int(time.mktime(datetime.datetime(2009, 5, 13).timetuple()))
+    self.assertEqual(
+        MakeCond(EQ, [BUILTIN_ISSUE_FIELDS['modified']], [], [ts1, ts2]), cond1)
+
+    # query with multiple dateranges
+    ast = query2ast.ParseUserQuery(
+        'modified>=2009-5-12 opened<2008/1/1', '',
+        BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1, cond2 = ast.conjunctions[0].conds
+    ts1 = int(time.mktime(datetime.datetime(2009, 5, 12).timetuple()))
+    self.assertEqual(
+        MakeCond(GE, [BUILTIN_ISSUE_FIELDS['modified']], [], [ts1]), cond1)
+    ts2 = int(time.mktime(datetime.datetime(2008, 1, 1).timetuple()))
+    self.assertEqual(
+        MakeCond(LT, [BUILTIN_ISSUE_FIELDS['opened']], [], [ts2]), cond2)
+
+    # query with multiple dateranges plus a search term
+    ast = query2ast.ParseUserQuery(
+        'one two modified>=2009-5-12 opened<2008/1/1', '',
+        BUILTIN_ISSUE_FIELDS, self.default_config)
+    ft_cond1, ft_cond2, cond1, cond2 = ast.conjunctions[0].conds
+    ts1 = int(time.mktime(datetime.datetime(2009, 5, 12).timetuple()))
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [ANY_FIELD], ['one'], []), ft_cond1)
+    self.assertEqual(
+        MakeCond(TEXT_HAS, [ANY_FIELD], ['two'], []), ft_cond2)
+    self.assertEqual(
+        MakeCond(GE, [BUILTIN_ISSUE_FIELDS['modified']], [], [ts1]), cond1)
+    ts2 = int(time.mktime(datetime.datetime(2008, 1, 1).timetuple()))
+    self.assertEqual(
+        MakeCond(LT, [BUILTIN_ISSUE_FIELDS['opened']], [], [ts2]), cond2)
+
+    # query with a date field compared to "today"
+    ast = query2ast.ParseUserQuery(
+        'modified<today', '', BUILTIN_ISSUE_FIELDS,
+        self.default_config, now=NOW)
+    cond1 = ast.conjunctions[0].conds[0]
+    ts1 = query2ast._CalculatePastDate(0, now=NOW)
+    self.assertEqual(MakeCond(LT, [BUILTIN_ISSUE_FIELDS['modified']],
+                              [], [ts1]),
+                     cond1)
+
+    # query with a daterange using today-N alias
+    ast = query2ast.ParseUserQuery(
+        'modified>=today-13', '', BUILTIN_ISSUE_FIELDS,
+        self.default_config, now=NOW)
+    cond1 = ast.conjunctions[0].conds[0]
+    ts1 = query2ast._CalculatePastDate(13, now=NOW)
+    self.assertEqual(MakeCond(GE, [BUILTIN_ISSUE_FIELDS['modified']],
+                              [], [ts1]),
+                     cond1)
+
+    ast = query2ast.ParseUserQuery(
+        'modified>today-13', '', BUILTIN_ISSUE_FIELDS, self.default_config,
+        now=NOW)
+    cond1 = ast.conjunctions[0].conds[0]
+    ts1 = query2ast._CalculatePastDate(13, now=NOW)
+    self.assertEqual(MakeCond(GT, [BUILTIN_ISSUE_FIELDS['modified']],
+                              [], [ts1]),
+                     cond1)
+
+    # query with multiple old date query terms.
+    ast = query2ast.ParseUserQuery(
+        'modified-after:2009-5-12 opened-before:2008/1/1 '
+        'closed-after:2007-2-1', '',
+        BUILTIN_ISSUE_FIELDS, self.default_config)
+    cond1, cond2, cond3 = ast.conjunctions[0].conds
+    ts1 = int(time.mktime(datetime.datetime(2009, 5, 12).timetuple()))
+    self.assertEqual(
+        MakeCond(GT, [BUILTIN_ISSUE_FIELDS['modified']], [], [ts1]), cond1)
+    ts2 = int(time.mktime(datetime.datetime(2008, 1, 1).timetuple()))
+    self.assertEqual(
+        MakeCond(LT, [BUILTIN_ISSUE_FIELDS['opened']], [], [ts2]), cond2)
+    ts3 = int(time.mktime(datetime.datetime(2007, 2, 1).timetuple()))
+    self.assertEqual(
+        MakeCond(GT, [BUILTIN_ISSUE_FIELDS['closed']], [], [ts3]), cond3)
+
+  def testCalculatePastDate(self):
+    ts1 = query2ast._CalculatePastDate(0, now=NOW)
+    self.assertEqual(NOW, ts1)
+
+    ts2 = query2ast._CalculatePastDate(13, now=NOW)
+    self.assertEqual(ts2, NOW - 13 * 24 * 60 * 60)
+
+    # Try it once with time.time() instead of a known timestamp.
+    ts_system_clock = query2ast._CalculatePastDate(13)
+    self.assertTrue(ts_system_clock < int(time.time()))
+
+  def testParseUserQuery_BadDates(self):
+    bad_dates = ['today-13h', 'yesterday', '2/2', 'm/y/d',
+                 '99/99/1999', '0-0-0']
+    for val in bad_dates:
+      with self.assertRaises(query2ast.InvalidQueryError) as cm:
+        query2ast.ParseUserQuery(
+            'modified>=' + val, '', BUILTIN_ISSUE_FIELDS,
+            self.default_config)
+      self.assertEqual('Could not parse date: ' + val, cm.exception.message)
+
+  def testQueryToSubqueries_BasicQuery(self):
+    self.assertEqual(['owner:me'], query2ast.QueryToSubqueries('owner:me'))
+
+  def testQueryToSubqueries_EmptyQuery(self):
+    self.assertEqual([''], query2ast.QueryToSubqueries(''))
+
+  def testQueryToSubqueries_UnmatchedParenthesesThrowsError(self):
+    with self.assertRaises(query2ast.InvalidQueryError):
+      self.assertEqual(['Pri=1'], query2ast.QueryToSubqueries('Pri=1))'))
+    with self.assertRaises(query2ast.InvalidQueryError):
+      self.assertEqual(
+          ['label:Hello'], query2ast.QueryToSubqueries('((label:Hello'))
+
+    with self.assertRaises(query2ast.InvalidQueryError):
+      self.assertEqual(
+          ['owner:me'], query2ast.QueryToSubqueries('((((owner:me)))'))
+
+    with self.assertRaises(query2ast.InvalidQueryError):
+      self.assertEqual(
+          ['test=What'], query2ast.QueryToSubqueries('(((test=What))))'))
+
+  def testQueryToSubqueries_IgnoresEmptyGroups(self):
+    self.assertEqual([''], query2ast.QueryToSubqueries('()(()(()))()()'))
+
+    self.assertEqual(
+        ['owner:me'], query2ast.QueryToSubqueries('()(()owner:me)()()'))
+
+  def testQueryToSubqueries_BasicOr(self):
+    self.assertEqual(
+        ['owner:me', 'status:New', 'Pri=1'],
+        query2ast.QueryToSubqueries('owner:me OR status:New OR Pri=1'))
+
+  def testQueryToSubqueries_OrAtStartOrEnd(self):
+    self.assertEqual(
+        ['owner:me OR'], query2ast.QueryToSubqueries('owner:me OR'))
+
+    self.assertEqual(
+        ['OR owner:me'], query2ast.QueryToSubqueries('OR owner:me'))
+
+  def testQueryToSubqueries_BasicParentheses(self):
+    self.assertEqual(
+        ['owner:me status:New'],
+        query2ast.QueryToSubqueries('owner:me (status:New)'))
+
+    self.assertEqual(
+        ['owner:me status:New'],
+        query2ast.QueryToSubqueries('(owner:me) status:New'))
+
+    self.assertEqual(
+        ['owner:me status:New'],
+        query2ast.QueryToSubqueries('((owner:me) (status:New))'))
+
+  def testQueryToSubqueries_ParenthesesWithOr(self):
+    self.assertEqual(
+        ['Pri=1 owner:me', 'Pri=1 status:New'],
+        query2ast.QueryToSubqueries('Pri=1 (owner:me OR status:New)'))
+
+    self.assertEqual(
+        ['owner:me component:OhNo', 'status:New component:OhNo'],
+        query2ast.QueryToSubqueries('(owner:me OR status:New) component:OhNo'))
+
+  def testQueryToSubqueries_ParenthesesWithOr_Multiple(self):
+    self.assertEqual(
+        [
+            'Pri=1 test owner:me', 'Pri=1 test status:New',
+            'Pri=2 test owner:me', 'Pri=2 test status:New'
+        ],
+        query2ast.QueryToSubqueries(
+            '(Pri=1 OR Pri=2)(test (owner:me OR status:New))'))
+
+  def testQueryToSubqueries_OrNextToParentheses(self):
+    self.assertEqual(['A', 'B'], query2ast.QueryToSubqueries('(A) OR (B)'))
+
+    self.assertEqual(
+        ['A B', 'A C E', 'A D E'],
+        query2ast.QueryToSubqueries('A (B OR (C OR D) E)'))
+
+    self.assertEqual(
+        ['A B C', 'A B D', 'A E'],
+        query2ast.QueryToSubqueries('A (B (C OR D) OR E)'))
+
+  def testQueryToSubqueries_ExtraSpaces(self):
+    self.assertEqual(
+        ['A', 'B'], query2ast.QueryToSubqueries(' ( A )   OR  ( B ) '))
+
+    self.assertEqual(
+        ['A B', 'A C E', 'A D E'],
+        query2ast.QueryToSubqueries(' A  ( B   OR   ( C  OR  D )  E )'))
+
+  def testQueryToSubqueries_OrAtEndOfParentheses(self):
+    self.assertEqual(['A B'], query2ast.QueryToSubqueries('(A OR )(B)'))
+    self.assertEqual(
+        ['A B', 'A C'], query2ast.QueryToSubqueries('( OR A)(B OR C)'))
+    self.assertEqual(
+        ['A B', 'A C'], query2ast.QueryToSubqueries(' OR A (B OR C)'))
+
+  def testQueryToSubqueries_EmptyOrGroup(self):
+    self.assertEqual(
+        ['A C', 'C', 'B C'], query2ast.QueryToSubqueries('(A OR  OR B)(C)'))
+
+  def testParseQuery_Basic(self):
+    self.assertEqual(
+        [
+            'owner:me',
+        ],
+        query2ast._ParseQuery(
+            query2ast.PeekIterator(
+                [ast_pb2.QueryToken(token_type=SUBQUERY, value='owner:me')])))
+
+  def testParseQuery_Complex(self):
+    self.assertEqual(
+        [
+            'owner:me',
+            'Pri=1',
+            'label=test',
+        ],
+        query2ast._ParseQuery(
+            query2ast.PeekIterator(
+                [
+                    ast_pb2.QueryToken(token_type=SUBQUERY, value='owner:me'),
+                    ast_pb2.QueryToken(token_type=OR),
+                    ast_pb2.QueryToken(token_type=LEFT_PAREN),
+                    ast_pb2.QueryToken(token_type=SUBQUERY, value='Pri=1'),
+                    ast_pb2.QueryToken(token_type=RIGHT_PAREN),
+                    ast_pb2.QueryToken(token_type=OR),
+                    ast_pb2.QueryToken(token_type=SUBQUERY, value='label=test'),
+                ])))
+
+  def testParseOrGroup_Basic(self):
+    self.assertEqual(
+        [
+            'owner:me',
+        ],
+        query2ast._ParseOrGroup(
+            query2ast.PeekIterator(
+                [ast_pb2.QueryToken(token_type=SUBQUERY, value='owner:me')])))
+
+  def testParseOrGroup_TwoAdjacentAndGroups(self):
+    self.assertEqual(
+        [
+            'owner:me Pri=1',
+            'owner:me label=test',
+        ],
+        query2ast._ParseOrGroup(
+            query2ast.PeekIterator(
+                [
+                    ast_pb2.QueryToken(token_type=SUBQUERY, value='owner:me'),
+                    ast_pb2.QueryToken(token_type=LEFT_PAREN),
+                    ast_pb2.QueryToken(token_type=SUBQUERY, value='Pri=1'),
+                    ast_pb2.QueryToken(token_type=OR),
+                    ast_pb2.QueryToken(token_type=SUBQUERY, value='label=test'),
+                    ast_pb2.QueryToken(token_type=RIGHT_PAREN),
+                ])))
+
+  def testParseAndGroup_Subquery(self):
+    self.assertEqual(
+        [
+            'owner:me',
+        ],
+        query2ast._ParseAndGroup(
+            query2ast.PeekIterator(
+                [ast_pb2.QueryToken(token_type=SUBQUERY, value='owner:me')])))
+
+  def testParseAndGroup_ParenthesesGroup(self):
+    self.assertEqual(
+        [
+            'owner:me',
+            'Pri=1',
+        ],
+        query2ast._ParseAndGroup(
+            query2ast.PeekIterator(
+                [
+                    ast_pb2.QueryToken(token_type=LEFT_PAREN),
+                    ast_pb2.QueryToken(token_type=SUBQUERY, value='owner:me'),
+                    ast_pb2.QueryToken(token_type=OR),
+                    ast_pb2.QueryToken(token_type=SUBQUERY, value='Pri=1'),
+                    ast_pb2.QueryToken(token_type=RIGHT_PAREN),
+                ])))
+
+  def testParseAndGroup_Empty(self):
+    self.assertEqual([], query2ast._ParseAndGroup(query2ast.PeekIterator([])))
+
+  def testParseAndGroup_InvalidTokens(self):
+    with self.assertRaises(query2ast.InvalidQueryError):
+      query2ast._ParseAndGroup(
+          query2ast.PeekIterator(
+              [
+                  ast_pb2.QueryToken(token_type=OR),
+                  ast_pb2.QueryToken(token_type=SUBQUERY, value='Pri=1'),
+                  ast_pb2.QueryToken(token_type=RIGHT_PAREN),
+              ]))
+
+    with self.assertRaises(query2ast.InvalidQueryError):
+      query2ast._ParseAndGroup(
+          query2ast.PeekIterator(
+              [
+                  ast_pb2.QueryToken(token_type=RIGHT_PAREN),
+                  ast_pb2.QueryToken(token_type=OR),
+                  ast_pb2.QueryToken(token_type=SUBQUERY, value='Pri=1'),
+              ]))
+
+  def testValidateAndTokenizeQuery_Basic(self):
+    self.assertEqual(
+        [
+            ast_pb2.QueryToken(token_type=LEFT_PAREN),
+            ast_pb2.QueryToken(token_type=SUBQUERY, value='owner:me'),
+            ast_pb2.QueryToken(token_type=OR),
+            ast_pb2.QueryToken(token_type=SUBQUERY, value='Pri=1'),
+            ast_pb2.QueryToken(token_type=RIGHT_PAREN),
+        ], query2ast._ValidateAndTokenizeQuery('(owner:me OR Pri=1)'))
+
+  def testValidateAndTokenizeQuery_UnmatchedParentheses(self):
+    with self.assertRaises(query2ast.InvalidQueryError):
+      query2ast._ValidateAndTokenizeQuery('(owner:me')
+
+    with self.assertRaises(query2ast.InvalidQueryError):
+      query2ast._ValidateAndTokenizeQuery('owner:me)')
+
+    with self.assertRaises(query2ast.InvalidQueryError):
+      query2ast._ValidateAndTokenizeQuery('(()owner:me))')
+
+    with self.assertRaises(query2ast.InvalidQueryError):
+      query2ast._ValidateAndTokenizeQuery('(()owner:me)())')
+
+  def testTokenizeSubqueryOnOr_NoOrOperator(self):
+    self.assertEqual(
+        [ast_pb2.QueryToken(token_type=SUBQUERY, value='owner:me')],
+        query2ast._TokenizeSubqueryOnOr('owner:me'))
+
+  def testTokenizeSubqueryOnOr_BasicOrOperator(self):
+    self.assertEqual(
+        [
+            ast_pb2.QueryToken(token_type=SUBQUERY, value='A'),
+            ast_pb2.QueryToken(token_type=OR),
+            ast_pb2.QueryToken(token_type=SUBQUERY, value='B'),
+            ast_pb2.QueryToken(token_type=OR),
+            ast_pb2.QueryToken(token_type=SUBQUERY, value='C'),
+        ], query2ast._TokenizeSubqueryOnOr('A OR B OR C'))
+
+  def testTokenizeSubqueryOnOr_EmptyOrOperator(self):
+    self.assertEqual(
+        [ast_pb2.QueryToken(token_type=OR)],
+        query2ast._TokenizeSubqueryOnOr(' OR '))
+
+    self.assertEqual(
+        [
+            ast_pb2.QueryToken(token_type=SUBQUERY, value='A'),
+            ast_pb2.QueryToken(token_type=OR),
+        ], query2ast._TokenizeSubqueryOnOr('A OR '))
+
+  def testMultiplySubqueries_Basic(self):
+    self.assertEqual(
+        ['owner:me Pri=1', 'owner:me Pri=2', 'test Pri=1', 'test Pri=2'],
+        query2ast._MultiplySubqueries(['owner:me', 'test'], ['Pri=1', 'Pri=2']))
+
+  def testMultiplySubqueries_OneEmpty(self):
+    self.assertEqual(
+        ['Pri=1', 'Pri=2'],
+        query2ast._MultiplySubqueries([], ['Pri=1', 'Pri=2']))
+    self.assertEqual(
+        ['Pri=1', 'Pri=2'],
+        query2ast._MultiplySubqueries([''], ['Pri=1', 'Pri=2']))
+
+    self.assertEqual(
+        ['Pri=1', 'Pri=2'],
+        query2ast._MultiplySubqueries(['Pri=1', 'Pri=2'], []))
+    self.assertEqual(
+        ['Pri=1', 'Pri=2'],
+        query2ast._MultiplySubqueries(['Pri=1', 'Pri=2'], ['']))
+
+  def testPeekIterator_Basic(self):
+    iterator = query2ast.PeekIterator([1, 2, 3])
+
+    self.assertEqual(1, iterator.peek())
+    self.assertEqual(1, iterator.next())
+
+    self.assertEqual(2, iterator.next())
+
+    self.assertEqual(3, iterator.peek())
+    self.assertEqual(3, iterator.next())
+
+    with self.assertRaises(StopIteration):
+      iterator.peek()
+
+    with self.assertRaises(StopIteration):
+      iterator.next()
diff --git a/search/test/search_helpers_test.py b/search/test/search_helpers_test.py
new file mode 100644
index 0000000..5905234
--- /dev/null
+++ b/search/test/search_helpers_test.py
@@ -0,0 +1,130 @@
+# Copyright 2018 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
+
+"""Unit tests for monorail.search.search_helpers."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mox
+import unittest
+
+from search import search_helpers
+
+from google.appengine.ext import testbed
+from framework import permissions
+from framework import sql
+from proto import user_pb2
+from services import chart_svc
+from services import service_manager
+from testing import fake
+
+
+def MakeChartService(my_mox, config):
+  chart_service = chart_svc.ChartService(config)
+  for table_var in ['issuesnapshot_tbl', 'labeldef_tbl']:
+    setattr(chart_service, table_var, my_mox.CreateMock(sql.SQLTableManager))
+  return chart_service
+
+
+class SearchHelpersTest(unittest.TestCase):
+  """Tests for functions in search_helpers.
+
+  Also covered by search.backendnonviewable.GetAtRiskIIDs cases.
+  """
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.mox = mox.Mox()
+    self.cnxn = self.mox.CreateMock(sql.MonorailConnection)
+    self.services = service_manager.Services()
+    self.services.chart = MakeChartService(self.mox, self.services.config)
+    self.config_service = fake.ConfigService()
+    self.user = user_pb2.User()
+
+  def testGetPersonalAtRiskLabelIDs_ReadOnly(self):
+    """Test returns risky IDs a read-only user cannot access."""
+    self.mox.StubOutWithMock(self.config_service, 'GetLabelDefRowsAnyProject')
+    self.config_service.GetLabelDefRowsAnyProject(
+      self.cnxn, where=[('LOWER(label) LIKE %s', ['restrict-view-%'])]
+    ).AndReturn([
+      (123, 789, 0, 'Restrict-View-Google', 'docstring', 0),
+      (124, 789, 0, 'Restrict-View-SecurityTeam', 'docstring', 0),
+    ])
+
+    self.mox.ReplayAll()
+    ids = search_helpers.GetPersonalAtRiskLabelIDs(
+      self.cnxn,
+      self.user,
+      self.config_service,
+      effective_ids=[10, 20],
+      project=fake.Project(project_id=789),
+      perms=permissions.READ_ONLY_PERMISSIONSET)
+    self.mox.VerifyAll()
+
+    self.assertEqual(ids, [123, 124])
+
+  def testGetPersonalAtRiskLabelIDs_LoggedInUser(self):
+    """Test returns restricted label IDs a logged in user cannot access."""
+    self.mox.StubOutWithMock(self.config_service, 'GetLabelDefRowsAnyProject')
+    self.config_service.GetLabelDefRowsAnyProject(
+      self.cnxn, where=[('LOWER(label) LIKE %s', ['restrict-view-%'])]
+    ).AndReturn([
+      (123, 789, 0, 'Restrict-View-Google', 'docstring', 0),
+      (124, 789, 0, 'Restrict-View-SecurityTeam', 'docstring', 0),
+    ])
+
+    self.mox.ReplayAll()
+    ids = search_helpers.GetPersonalAtRiskLabelIDs(
+      self.cnxn,
+      self.user,
+      self.config_service,
+      effective_ids=[10, 20],
+      project=fake.Project(project_id=789),
+      perms=permissions.USER_PERMISSIONSET)
+    self.mox.VerifyAll()
+
+    self.assertEqual(ids, [123, 124])
+
+  def testGetPersonalAtRiskLabelIDs_UserWithRVG(self):
+    """Test returns restricted label IDs a logged in user cannot access."""
+    self.mox.StubOutWithMock(self.config_service, 'GetLabelDefRowsAnyProject')
+    self.config_service.GetLabelDefRowsAnyProject(
+      self.cnxn, where=[('LOWER(label) LIKE %s', ['restrict-view-%'])]
+    ).AndReturn([
+      (123, 789, 0, 'Restrict-View-Google', 'docstring', 0),
+      (124, 789, 0, 'Restrict-View-SecurityTeam', 'docstring', 0),
+    ])
+
+    self.mox.ReplayAll()
+    perms = permissions.PermissionSet(['Google'])
+    ids = search_helpers.GetPersonalAtRiskLabelIDs(
+      self.cnxn,
+      self.user,
+      self.config_service,
+      effective_ids=[10, 20],
+      project=fake.Project(project_id=789),
+      perms=perms)
+    self.mox.VerifyAll()
+
+    self.assertEqual(ids, [124])
+
+  def testGetPersonalAtRiskLabelIDs_Admin(self):
+    """Test returns nothing for an admin (who can view everything)."""
+    self.user.is_site_admin = True
+    self.mox.ReplayAll()
+    ids = search_helpers.GetPersonalAtRiskLabelIDs(
+      self.cnxn,
+      self.user,
+      self.config_service,
+      effective_ids=[10, 20],
+      project=fake.Project(project_id=789),
+      perms=permissions.ADMIN_PERMISSIONSET)
+    self.mox.VerifyAll()
+
+    self.assertEqual(ids, [])
diff --git a/search/test/searchpipeline_test.py b/search/test/searchpipeline_test.py
new file mode 100644
index 0000000..5d23316
--- /dev/null
+++ b/search/test/searchpipeline_test.py
@@ -0,0 +1,121 @@
+# 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
+
+"""Tests for the searchpipeline module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from proto import ast_pb2
+from proto import tracker_pb2
+from search import searchpipeline
+from services import service_manager
+from testing import fake
+from tracker import tracker_bizobj
+
+
+class SearchPipelineTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        project=fake.ProjectService(),
+        issue=fake.IssueService(),
+        config=fake.ConfigService())
+    self.services.user.TestAddUser('a@example.com', 111)
+
+  def testIsStarredRE(self):
+    """IS_STARRED_RE matches only the is:starred term."""
+    input_output = {
+      'something:else': 'something:else',
+      'genesis:starred': 'genesis:starred',
+      'is:starred-in-bookmarks': 'is:starred-in-bookmarks',
+      'is:starred': 'foo',
+      'Is:starred': 'foo',
+      'is:STARRED': 'foo',
+      'is:starred is:open': 'foo is:open',
+      'is:open is:starred': 'is:open foo',
+      }
+    for i, o in input_output.items():
+      self.assertEqual(o, searchpipeline.IS_STARRED_RE.sub('foo', i))
+
+  def testMeRE(self):
+    """ME_RE matches only the 'me' value keyword."""
+    input_output = {
+      'something:else': 'something:else',
+      'else:some': 'else:some',
+      'me': 'me',  # It needs to have a ":" in front.
+      'cc:me-team': 'cc:me-team',
+      'cc:me=domain@otherdomain': 'cc:me=domain@otherdomain',
+      'cc:me@example.com': 'cc:me@example.com',
+      'me:the-boss': 'me:the-boss',
+      'cc:me': 'cc:foo',
+      'cc=me': 'cc=foo',
+      'owner:Me': 'owner:foo',
+      'reporter:ME': 'reporter:foo',
+      'cc:me is:open': 'cc:foo is:open',
+      'is:open cc:me': 'is:open cc:foo',
+      }
+    for i, o in input_output.items():
+      self.assertEqual(o, searchpipeline.ME_RE.sub('foo', i))
+
+  def testAccumulateIssueProjectsAndConfigs(self):
+    pass  # TODO(jrobbins): write tests
+
+  def testReplaceKeywordsWithUserIDs_IsStarred(self):
+    """The term is:starred is replaced with starredby:USERID."""
+    actual, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+        [111], 'is:starred')
+    self.assertEqual('starredby:111', actual)
+    self.assertEqual([], warnings)
+
+    actual, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+        [111], 'Pri=1 is:starred M=61')
+    self.assertEqual('Pri=1 starredby:111 M=61', actual)
+    self.assertEqual([], warnings)
+
+    actual, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+        [], 'Pri=1 is:starred M=61')
+    self.assertEqual('Pri=1  M=61', actual)
+    self.assertEqual(
+        ['"is:starred" ignored because you are not signed in.'],
+        warnings)
+
+  def testReplaceKeywordsWithUserIDs_IsStarred_linked(self):
+    """is:starred is replaced by starredby:uid1,uid2 for linked accounts."""
+    actual, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+        [111, 222], 'is:starred')
+    self.assertEqual('starredby:111,222', actual)
+    self.assertEqual([], warnings)
+
+  def testReplaceKeywordsWithUserIDs_Me(self):
+    """Terms like owner:me are replaced with owner:USERID."""
+    actual, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+        [111], 'owner:me')
+    self.assertEqual('owner:111', actual)
+    self.assertEqual([], warnings)
+
+    actual, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+        [111], 'Pri=1 cc:me M=61')
+    self.assertEqual('Pri=1 cc:111 M=61', actual)
+    self.assertEqual([], warnings)
+
+    actual, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+        [], 'Pri=1 reporter:me M=61')
+    self.assertEqual('Pri=1  M=61', actual)
+    self.assertEqual(
+        ['"me" keyword ignored because you are not signed in.'],
+        warnings)
+
+  def testReplaceKeywordsWithUserIDs_Me_LinkedAccounts(self):
+    """owner:me is replaced with owner:uid,uid for each linked account."""
+    actual, warnings = searchpipeline.ReplaceKeywordsWithUserIDs(
+        [111, 222], 'owner:me')
+    self.assertEqual('owner:111,222', actual)
+    self.assertEqual([], warnings)
diff --git a/services/__init__.py b/services/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/services/__init__.py
@@ -0,0 +1 @@
+
diff --git a/services/api_pb2_v1_helpers.py b/services/api_pb2_v1_helpers.py
new file mode 100644
index 0000000..dcdea66
--- /dev/null
+++ b/services/api_pb2_v1_helpers.py
@@ -0,0 +1,628 @@
+# 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
+
+"""Convert Monorail PB objects to API PB objects"""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import datetime
+import logging
+import time
+
+from six import string_types
+
+from businesslogic import work_env
+from framework import exceptions
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import permissions
+from framework import timestr
+from proto import api_pb2_v1
+from proto import project_pb2
+from proto import tracker_pb2
+from services import project_svc
+from tracker import field_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_helpers
+
+
+def convert_project(project, config, role, templates):
+  """Convert Monorail Project PB to API ProjectWrapper PB."""
+
+  return api_pb2_v1.ProjectWrapper(
+      kind='monorail#project',
+      name=project.project_name,
+      externalId=project.project_name,
+      htmlLink='/p/%s/' % project.project_name,
+      summary=project.summary,
+      description=project.description,
+      role=role,
+      issuesConfig=convert_project_config(config, templates))
+
+
+def convert_project_config(config, templates):
+  """Convert Monorail ProjectIssueConfig PB to API ProjectIssueConfig PB."""
+
+  return api_pb2_v1.ProjectIssueConfig(
+      kind='monorail#projectIssueConfig',
+      restrictToKnown=config.restrict_to_known,
+      defaultColumns=config.default_col_spec.split(),
+      defaultSorting=config.default_sort_spec.split(),
+      statuses=[convert_status(s) for s in config.well_known_statuses],
+      labels=[convert_label(l) for l in config.well_known_labels],
+      prompts=[convert_template(t) for t in templates],
+      defaultPromptForMembers=config.default_template_for_developers,
+      defaultPromptForNonMembers=config.default_template_for_users)
+
+
+def convert_status(status):
+  """Convert Monorail StatusDef PB to API Status PB."""
+
+  return api_pb2_v1.Status(
+      status=status.status,
+      meansOpen=status.means_open,
+      description=status.status_docstring)
+
+
+def convert_label(label):
+  """Convert Monorail LabelDef PB to API Label PB."""
+
+  return api_pb2_v1.Label(
+      label=label.label,
+      description=label.label_docstring)
+
+
+def convert_template(template):
+  """Convert Monorail TemplateDef PB to API Prompt PB."""
+
+  return api_pb2_v1.Prompt(
+      name=template.name,
+      title=template.summary,
+      description=template.content,
+      titleMustBeEdited=template.summary_must_be_edited,
+      status=template.status,
+      labels=template.labels,
+      membersOnly=template.members_only,
+      defaultToMember=template.owner_defaults_to_member,
+      componentRequired=template.component_required)
+
+
+def convert_person(user_id, cnxn, services, trap_exception=False):
+  """Convert user id to API AtomPerson PB or None if user_id is None."""
+
+  if not user_id:
+    # convert_person should handle 'converting' optional user values,
+    # like issue.owner, where user_id may be None.
+    return None
+  if user_id == framework_constants.DELETED_USER_ID:
+    return api_pb2_v1.AtomPerson(
+        kind='monorail#issuePerson',
+        name=framework_constants.DELETED_USER_NAME)
+  try:
+    user = services.user.GetUser(cnxn, user_id)
+  except exceptions.NoSuchUserException as ex:
+    if trap_exception:
+      logging.warning(str(ex))
+      return None
+    else:
+      raise ex
+
+  days_ago = None
+  if user.last_visit_timestamp:
+    secs_ago = int(time.time()) - user.last_visit_timestamp
+    days_ago = secs_ago // framework_constants.SECS_PER_DAY
+  return api_pb2_v1.AtomPerson(
+      kind='monorail#issuePerson',
+      name=user.email,
+      htmlLink='https://%s/u/%d' % (framework_helpers.GetHostPort(), user_id),
+      last_visit_days_ago=days_ago,
+      email_bouncing=bool(user.email_bounce_timestamp),
+      vacation_message=user.vacation_message)
+
+
+def convert_issue_ids(issue_ids, mar, services):
+  """Convert global issue ids to API IssueRef PB."""
+
+  # missed issue ids are filtered out.
+  issues = services.issue.GetIssues(mar.cnxn, issue_ids)
+  result = []
+  for issue in issues:
+    issue_ref = api_pb2_v1.IssueRef(
+      issueId=issue.local_id,
+      projectId=issue.project_name,
+      kind='monorail#issueRef')
+    result.append(issue_ref)
+  return result
+
+
+def convert_issueref_pbs(issueref_pbs, mar, services):
+  """Convert API IssueRef PBs to global issue ids."""
+
+  if issueref_pbs:
+    result = []
+    for ir in issueref_pbs:
+      project_id = mar.project_id
+      if ir.projectId:
+        project = services.project.GetProjectByName(
+          mar.cnxn, ir.projectId)
+        if project:
+          project_id = project.project_id
+      try:
+        issue = services.issue.GetIssueByLocalID(
+            mar.cnxn, project_id, ir.issueId)
+        result.append(issue.issue_id)
+      except exceptions.NoSuchIssueException:
+        logging.warning(
+            'Issue (%s:%d) does not exist.' % (ir.projectId, ir.issueId))
+    return result
+  else:
+    return None
+
+
+def convert_approvals(cnxn, approval_values, services, config, phases):
+  """Convert an Issue's Monorail ApprovalValue PBs to API Approval"""
+  fds_by_id = {fd.field_id: fd for fd in config.field_defs}
+  phases_by_id = {phase.phase_id: phase for phase in phases}
+  approvals = []
+  for av in approval_values:
+    approval_fd = fds_by_id.get(av.approval_id)
+    if approval_fd is None:
+      logging.warning(
+          'Approval (%d) does not exist' % av.approval_id)
+      continue
+    if approval_fd.field_type is not tracker_pb2.FieldTypes.APPROVAL_TYPE:
+      logging.warning(
+          'field %s has unexpected field_type: %s' % (
+              approval_fd.field_name, approval_fd.field_type.name))
+      continue
+
+    approval = api_pb2_v1.Approval()
+    approval.approvalName = approval_fd.field_name
+    approvers = [convert_person(approver_id, cnxn, services)
+                 for approver_id in av.approver_ids]
+    approval.approvers = [approver for approver in approvers if approver]
+
+    approval.status = api_pb2_v1.ApprovalStatus(av.status.number)
+    if av.setter_id:
+      approval.setter = convert_person(av.setter_id, cnxn, services)
+    if av.set_on:
+      approval.setOn = datetime.datetime.fromtimestamp(av.set_on)
+    if av.phase_id:
+      try:
+        approval.phaseName = phases_by_id[av.phase_id].name
+      except KeyError:
+        logging.warning('phase %d not found in given phases list' % av.phase_id)
+    approvals.append(approval)
+  return approvals
+
+
+def convert_phases(phases):
+  """Convert an Issue's Monorail Phase PBs to API Phase."""
+  converted_phases = []
+  for idx, phase in enumerate(phases):
+    if not phase.name:
+      try:
+        logging.warning(
+            'Phase %d has no name, skipping conversion.' % phase.phase_id)
+      except TypeError:
+        logging.warning(
+            'Phase #%d (%s) has no name or id, skipping conversion.' % (
+                idx, phase))
+      continue
+    converted = api_pb2_v1.Phase(phaseName=phase.name, rank=phase.rank)
+    converted_phases.append(converted)
+  return converted_phases
+
+
+def convert_issue(cls, issue, mar, services):
+  """Convert Monorail Issue PB to API IssuesGetInsertResponse."""
+
+  config = services.config.GetProjectConfig(mar.cnxn, issue.project_id)
+  granted_perms = tracker_bizobj.GetGrantedPerms(
+      issue, mar.auth.effective_ids, config)
+  issue_project = services.project.GetProject(mar.cnxn, issue.project_id)
+  component_list = []
+  for cd in config.component_defs:
+    cid = cd.component_id
+    if cid in issue.component_ids:
+      component_list.append(cd.path)
+  cc_list = [convert_person(p, mar.cnxn, services) for p in issue.cc_ids]
+  cc_list = [p for p in cc_list if p is not None]
+  field_values_list = []
+  fds_by_id = {
+      fd.field_id: fd for fd in config.field_defs}
+  phases_by_id = {phase.phase_id: phase for phase in issue.phases}
+  for fv in issue.field_values:
+    fd = fds_by_id.get(fv.field_id)
+    if not fd:
+      logging.warning('Custom field %d of project %s does not exist',
+                      fv.field_id, issue_project.project_name)
+      continue
+    val = None
+    if fv.user_id:
+      val = _get_user_email(
+          services.user, mar.cnxn, fv.user_id)
+    else:
+      val = tracker_bizobj.GetFieldValue(fv, {})
+      if not isinstance(val, string_types):
+        val = str(val)
+    new_fv = api_pb2_v1.FieldValue(
+        fieldName=fd.field_name,
+        fieldValue=val,
+        derived=fv.derived)
+    if fd.approval_id:  # Attach parent approval name
+      approval_fd = fds_by_id.get(fd.approval_id)
+      if not approval_fd:
+        logging.warning('Parent approval field %d of field %s does not exist',
+                        fd.approval_id, fd.field_name)
+      else:
+        new_fv.approvalName = approval_fd.field_name
+    elif fv.phase_id:  # Attach phase name
+      phase = phases_by_id.get(fv.phase_id)
+      if not phase:
+        logging.warning('Phase %d for field %s does not exist',
+                        fv.phase_id, fd.field_name)
+      else:
+        new_fv.phaseName = phase.name
+    field_values_list.append(new_fv)
+  approval_values_list = convert_approvals(
+      mar.cnxn, issue.approval_values, services, config, issue.phases)
+  phases_list = convert_phases(issue.phases)
+  with work_env.WorkEnv(mar, services) as we:
+    starred = we.IsIssueStarred(issue)
+  resp = cls(
+      kind='monorail#issue',
+      id=issue.local_id,
+      title=issue.summary,
+      summary=issue.summary,
+      projectId=issue_project.project_name,
+      stars=issue.star_count,
+      starred=starred,
+      status=issue.status,
+      state=(api_pb2_v1.IssueState.open if
+             tracker_helpers.MeansOpenInProject(
+                 tracker_bizobj.GetStatus(issue), config)
+             else api_pb2_v1.IssueState.closed),
+      labels=issue.labels,
+      components=component_list,
+      author=convert_person(issue.reporter_id, mar.cnxn, services),
+      owner=convert_person(issue.owner_id, mar.cnxn, services),
+      cc=cc_list,
+      updated=datetime.datetime.fromtimestamp(issue.modified_timestamp),
+      published=datetime.datetime.fromtimestamp(issue.opened_timestamp),
+      blockedOn=convert_issue_ids(issue.blocked_on_iids, mar, services),
+      blocking=convert_issue_ids(issue.blocking_iids, mar, services),
+      canComment=permissions.CanCommentIssue(
+          mar.auth.effective_ids, mar.perms, issue_project, issue,
+          granted_perms=granted_perms),
+      canEdit=permissions.CanEditIssue(
+          mar.auth.effective_ids, mar.perms, issue_project, issue,
+          granted_perms=granted_perms),
+      fieldValues=field_values_list,
+      approvalValues=approval_values_list,
+      phases=phases_list
+  )
+  if issue.closed_timestamp > 0:
+    resp.closed = datetime.datetime.fromtimestamp(issue.closed_timestamp)
+  if issue.merged_into:
+    resp.mergedInto=convert_issue_ids([issue.merged_into], mar, services)[0]
+  if issue.owner_modified_timestamp:
+    resp.owner_modified = datetime.datetime.fromtimestamp(
+        issue.owner_modified_timestamp)
+  if issue.status_modified_timestamp:
+    resp.status_modified = datetime.datetime.fromtimestamp(
+        issue.status_modified_timestamp)
+  if issue.component_modified_timestamp:
+    resp.component_modified = datetime.datetime.fromtimestamp(
+        issue.component_modified_timestamp)
+  return resp
+
+
+def convert_comment(issue, comment, mar, services, granted_perms):
+  """Convert Monorail IssueComment PB to API IssueCommentWrapper."""
+
+  perms = permissions.UpdateIssuePermissions(
+      mar.perms, mar.project, issue, mar.auth.effective_ids,
+      granted_perms=granted_perms)
+  commenter = services.user.GetUser(mar.cnxn, comment.user_id)
+  can_delete = permissions.CanDeleteComment(
+      comment, commenter, mar.auth.user_id, perms)
+
+  return api_pb2_v1.IssueCommentWrapper(
+      attachments=[convert_attachment(a) for a in comment.attachments],
+      author=convert_person(comment.user_id, mar.cnxn, services,
+                            trap_exception=True),
+      canDelete=can_delete,
+      content=comment.content,
+      deletedBy=convert_person(comment.deleted_by, mar.cnxn, services,
+                               trap_exception=True),
+      id=comment.sequence,
+      published=datetime.datetime.fromtimestamp(comment.timestamp),
+      updates=convert_amendments(issue, comment.amendments, mar, services),
+      kind='monorail#issueComment',
+      is_description=comment.is_description)
+
+def convert_approval_comment(issue, comment, mar, services, granted_perms):
+  perms = permissions.UpdateIssuePermissions(
+      mar.perms, mar.project, issue, mar.auth.effective_ids,
+      granted_perms=granted_perms)
+  commenter = services.user.GetUser(mar.cnxn, comment.user_id)
+  can_delete = permissions.CanDeleteComment(
+      comment, commenter, mar.auth.user_id, perms)
+
+  return api_pb2_v1.ApprovalCommentWrapper(
+      attachments=[convert_attachment(a) for a in comment.attachments],
+      author=convert_person(
+          comment.user_id, mar.cnxn, services, trap_exception=True),
+      canDelete=can_delete,
+      content=comment.content,
+      deletedBy=convert_person(comment.deleted_by, mar.cnxn, services,
+                               trap_exception=True),
+      id=comment.sequence,
+      published=datetime.datetime.fromtimestamp(comment.timestamp),
+      approvalUpdates=convert_approval_amendments(
+          comment.amendments, mar, services),
+      kind='monorail#approvalComment',
+      is_description=comment.is_description)
+
+
+def convert_attachment(attachment):
+  """Convert Monorail Attachment PB to API Attachment."""
+
+  return api_pb2_v1.Attachment(
+      attachmentId=attachment.attachment_id,
+      fileName=attachment.filename,
+      fileSize=attachment.filesize,
+      mimetype=attachment.mimetype,
+      isDeleted=attachment.deleted)
+
+
+def convert_amendments(issue, amendments, mar, services):
+  """Convert a list of Monorail Amendment PBs to API Update."""
+  amendments_user_ids = tracker_bizobj.UsersInvolvedInAmendments(amendments)
+  users_by_id = framework_views.MakeAllUserViews(
+      mar.cnxn, services.user, amendments_user_ids)
+  framework_views.RevealAllEmailsToMembers(
+      mar.cnxn, services, mar.auth, users_by_id, mar.project)
+
+  result = api_pb2_v1.Update(kind='monorail#issueCommentUpdate')
+  for amendment in amendments:
+    if amendment.field == tracker_pb2.FieldID.SUMMARY:
+      result.summary = amendment.newvalue
+    elif amendment.field == tracker_pb2.FieldID.STATUS:
+      result.status = amendment.newvalue
+    elif amendment.field == tracker_pb2.FieldID.OWNER:
+      if len(amendment.added_user_ids) == 0:
+        result.owner = framework_constants.NO_USER_NAME
+      else:
+        result.owner = _get_user_email(
+            services.user, mar.cnxn, amendment.added_user_ids[0])
+    elif amendment.field == tracker_pb2.FieldID.LABELS:
+      result.labels = amendment.newvalue.split()
+    elif amendment.field == tracker_pb2.FieldID.CC:
+      for user_id in amendment.added_user_ids:
+        user_email = _get_user_email(
+            services.user, mar.cnxn, user_id)
+        result.cc.append(user_email)
+      for user_id in amendment.removed_user_ids:
+        user_email = _get_user_email(
+            services.user, mar.cnxn, user_id)
+        result.cc.append('-%s' % user_email)
+    elif amendment.field == tracker_pb2.FieldID.BLOCKEDON:
+      result.blockedOn = _append_project(
+          amendment.newvalue, issue.project_name)
+    elif amendment.field == tracker_pb2.FieldID.BLOCKING:
+      result.blocking = _append_project(
+          amendment.newvalue, issue.project_name)
+    elif amendment.field == tracker_pb2.FieldID.MERGEDINTO:
+      result.mergedInto = amendment.newvalue
+    elif amendment.field == tracker_pb2.FieldID.COMPONENTS:
+      result.components = amendment.newvalue.split()
+    elif amendment.field == tracker_pb2.FieldID.CUSTOM:
+      fv = api_pb2_v1.FieldValue()
+      fv.fieldName = amendment.custom_field_name
+      fv.fieldValue = tracker_bizobj.AmendmentString(amendment, users_by_id)
+      result.fieldValues.append(fv)
+
+  return result
+
+
+def convert_approval_amendments(amendments, mar, services):
+  """Convert a list of Monorail Amendment PBs API ApprovalUpdate."""
+  amendments_user_ids = tracker_bizobj.UsersInvolvedInAmendments(amendments)
+  users_by_id = framework_views.MakeAllUserViews(
+      mar.cnxn, services.user, amendments_user_ids)
+  framework_views.RevealAllEmailsToMembers(
+      mar.cnxn, services, mar.auth, users_by_id, mar.project)
+
+  result = api_pb2_v1.ApprovalUpdate(kind='monorail#approvalCommentUpdate')
+  for amendment in amendments:
+    if amendment.field == tracker_pb2.FieldID.CUSTOM:
+      if amendment.custom_field_name == 'Status':
+        status_number = tracker_pb2.ApprovalStatus(
+            amendment.newvalue.upper()).number
+        result.status = api_pb2_v1.ApprovalStatus(status_number).name
+      elif amendment.custom_field_name == 'Approvers':
+        for user_id in amendment.added_user_ids:
+          user_email = _get_user_email(
+              services.user, mar.cnxn, user_id)
+          result.approvers.append(user_email)
+        for user_id in amendment.removed_user_ids:
+          user_email = _get_user_email(
+              services.user, mar.cnxn, user_id)
+          result.approvers.append('-%s' % user_email)
+      else:
+        fv = api_pb2_v1.FieldValue()
+        fv.fieldName = amendment.custom_field_name
+        fv.fieldValue = tracker_bizobj.AmendmentString(amendment, users_by_id)
+        # TODO(jojwang): monorail:4229, add approvalName field to FieldValue
+        result.fieldValues.append(fv)
+
+  return result
+
+
+def _get_user_email(user_service, cnxn, user_id):
+  """Get user email."""
+
+  if user_id == framework_constants.DELETED_USER_ID:
+    return framework_constants.DELETED_USER_NAME
+  if not user_id:
+    # _get_user_email should handle getting emails for optional user values,
+    # like issue.owner where user_id may be None.
+    return framework_constants.NO_USER_NAME
+  try:
+    user_email = user_service.LookupUserEmail(
+            cnxn, user_id)
+  except exceptions.NoSuchUserException:
+    user_email = framework_constants.USER_NOT_FOUND_NAME
+  return user_email
+
+
+def _append_project(issue_ids, project_name):
+  """Append project name to convert <id> to <project>:<id> format."""
+
+  result = []
+  id_list = issue_ids.split()
+  for id_str in id_list:
+    if ':' in id_str:
+      result.append(id_str)
+    # '-' means this issue is being removed
+    elif id_str.startswith('-'):
+      result.append('-%s:%s' % (project_name, id_str[1:]))
+    else:
+      result.append('%s:%s' % (project_name, id_str))
+  return result
+
+
+def split_remove_add(item_list):
+  """Split one list of items into two: items to add and items to remove."""
+
+  list_to_add = []
+  list_to_remove = []
+
+  for item in item_list:
+    if item.startswith('-'):
+      list_to_remove.append(item[1:])
+    else:
+      list_to_add.append(item)
+
+  return list_to_add, list_to_remove
+
+
+# TODO(sheyang): batch the SQL queries to fetch projects/issues.
+def issue_global_ids(project_local_id_pairs, project_id, mar, services):
+  """Find global issues ids given <project_name>:<issue_local_id> pairs."""
+
+  result = []
+  for pair in project_local_id_pairs:
+    issue_project_id = None
+    local_id = None
+    if ':' in pair:
+      pair_ary = pair.split(':')
+      project_name = pair_ary[0]
+      local_id = int(pair_ary[1])
+      project = services.project.GetProjectByName(mar.cnxn, project_name)
+      if not project:
+        raise exceptions.NoSuchProjectException(
+            'Project %s does not exist' % project_name)
+      issue_project_id = project.project_id
+    else:
+      issue_project_id = project_id
+      local_id = int(pair)
+    result.append(
+        services.issue.LookupIssueID(mar.cnxn, issue_project_id, local_id))
+
+  return result
+
+
+def convert_group_settings(group_name, setting):
+  """Convert UserGroupSettings to UserGroupSettingsWrapper."""
+  return api_pb2_v1.UserGroupSettingsWrapper(
+      groupName=group_name,
+      who_can_view_members=setting.who_can_view_members,
+      ext_group_type=setting.ext_group_type,
+      last_sync_time=setting.last_sync_time)
+
+
+def convert_component_def(cd, mar, services):
+  """Convert ComponentDef PB to Component PB."""
+  project_name = services.project.LookupProjectNames(
+      mar.cnxn, [cd.project_id])[cd.project_id]
+  user_ids = set()
+  user_ids.update(
+      cd.admin_ids + cd.cc_ids + [cd.creator_id] + [cd.modifier_id])
+  user_names_dict = services.user.LookupUserEmails(mar.cnxn, list(user_ids))
+  component = api_pb2_v1.Component(
+      componentId=cd.component_id,
+      projectName=project_name,
+      componentPath=cd.path,
+      description=cd.docstring,
+      admin=sorted([user_names_dict[uid] for uid in cd.admin_ids]),
+      cc=sorted([user_names_dict[uid] for uid in cd.cc_ids]),
+      deprecated=cd.deprecated)
+  if cd.created:
+    component.created = datetime.datetime.fromtimestamp(cd.created)
+    component.creator = user_names_dict[cd.creator_id]
+  if cd.modified:
+    component.modified = datetime.datetime.fromtimestamp(cd.modified)
+    component.modifier = user_names_dict[cd.modifier_id]
+  return component
+
+
+def convert_component_ids(config, component_names):
+  """Convert a list of component names to ids."""
+  component_names_lower = [name.lower() for name in component_names]
+  result = []
+  for cd in config.component_defs:
+    cpath = cd.path
+    if cpath.lower() in component_names_lower:
+      result.append(cd.component_id)
+  return result
+
+
+def convert_field_values(field_values, mar, services):
+  """Convert user passed in field value list to FieldValue PB, or labels."""
+  fv_list_add = []
+  fv_list_remove = []
+  fv_list_clear = []
+  label_list_add = []
+  label_list_remove = []
+  field_name_dict = {
+      fd.field_name: fd for fd in mar.config.field_defs}
+
+  for fv in field_values:
+    field_def = field_name_dict.get(fv.fieldName)
+    if not field_def:
+      logging.warning('Custom field %s of does not exist', fv.fieldName)
+      continue
+
+    if fv.operator == api_pb2_v1.FieldValueOperator.clear:
+      fv_list_clear.append(field_def.field_id)
+      continue
+
+    # Enum fields are stored as labels
+    if field_def.field_type == tracker_pb2.FieldTypes.ENUM_TYPE:
+      raw_val = '%s-%s' % (fv.fieldName, fv.fieldValue)
+      if fv.operator == api_pb2_v1.FieldValueOperator.remove:
+        label_list_remove.append(raw_val)
+      elif fv.operator == api_pb2_v1.FieldValueOperator.add:
+        label_list_add.append(raw_val)
+      else:  # pragma: no cover
+        logging.warning('Unsupported field value operater %s', fv.operator)
+    else:
+      new_fv = field_helpers.ParseOneFieldValue(
+          mar.cnxn, services.user, field_def, fv.fieldValue)
+      if fv.operator == api_pb2_v1.FieldValueOperator.remove:
+        fv_list_remove.append(new_fv)
+      elif fv.operator == api_pb2_v1.FieldValueOperator.add:
+        fv_list_add.append(new_fv)
+      else:  # pragma: no cover
+        logging.warning('Unsupported field value operater %s', fv.operator)
+
+  return (fv_list_add, fv_list_remove, fv_list_clear,
+          label_list_add, label_list_remove)
diff --git a/services/api_svc_v1.py b/services/api_svc_v1.py
new file mode 100644
index 0000000..20a9c8b
--- /dev/null
+++ b/services/api_svc_v1.py
@@ -0,0 +1,1511 @@
+# 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
+
+"""API service.
+
+To manually test this API locally, use the following steps:
+1. Start the development server via 'make serve'.
+2. Start a new Chrome session via the command-line:
+  PATH_TO_CHROME --user-data-dir=/tmp/test \
+  --unsafely-treat-insecure-origin-as-secure=http://localhost:8080
+3. Visit http://localhost:8080/_ah/api/explorer
+4. Click shield icon in the omnibar and allow unsafe scripts.
+5. Click on the "Services" menu item in the API Explorer.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import calendar
+import datetime
+import endpoints
+import functools
+import logging
+import re
+import time
+from google.appengine.api import oauth
+from protorpc import message_types
+from protorpc import protojson
+from protorpc import remote
+
+import settings
+from businesslogic import work_env
+from features import filterrules_helpers
+from features import send_notifications
+from framework import authdata
+from framework import exceptions
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import monitoring
+from framework import monorailrequest
+from framework import permissions
+from framework import ratelimiter
+from framework import sql
+from project import project_helpers
+from proto import api_pb2_v1
+from proto import project_pb2
+from proto import tracker_pb2
+from search import frontendsearchpipeline
+from services import api_pb2_v1_helpers
+from services import client_config_svc
+from services import service_manager
+from services import tracker_fulltext
+from sitewide import sitewide_helpers
+from tracker import field_helpers
+from tracker import issuedetailezt
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+
+from infra_libs import ts_mon
+
+
+ENDPOINTS_API_NAME = 'monorail'
+DOC_URL = (
+    'https://chromium.googlesource.com/infra/infra/+/main/'
+    'appengine/monorail/doc/api.md')
+
+
+def monorail_api_method(
+    request_message, response_message, **kwargs):
+  """Extends endpoints.method by performing base checks."""
+  time_fn = kwargs.pop('time_fn', time.time)
+  method_name = kwargs.get('name', '')
+  method_path = kwargs.get('path', '')
+  http_method = kwargs.get('http_method', '')
+  def new_decorator(func):
+    @endpoints.method(request_message, response_message, **kwargs)
+    @functools.wraps(func)
+    def wrapper(self, *args, **kwargs):
+      start_time = time_fn()
+      approximate_http_status = 200
+      request = args[0]
+      ret = None
+      c_id = None
+      c_email = None
+      mar = None
+      try:
+        if settings.read_only and http_method.lower() != 'get':
+          raise permissions.PermissionException(
+              'This request is not allowed in read-only mode')
+        requester = endpoints.get_current_user()
+        logging.info('requester is %r', requester)
+        logging.info('args is %r', args)
+        logging.info('kwargs is %r', kwargs)
+        auth_client_ids, auth_emails = (
+            client_config_svc.GetClientConfigSvc().GetClientIDEmails())
+        if settings.local_mode:
+          auth_client_ids.append(endpoints.API_EXPLORER_CLIENT_ID)
+        if self._services is None:
+          self._set_services(service_manager.set_up_services())
+        cnxn = sql.MonorailConnection()
+        c_id, c_email = api_base_checks(
+            request, requester, self._services, cnxn,
+            auth_client_ids, auth_emails)
+        mar = self.mar_factory(request, cnxn)
+        self.ratelimiter.CheckStart(c_id, c_email, start_time)
+        monitoring.IncrementAPIRequestsCount(
+            'endpoints', c_id, client_email=c_email)
+        ret = func(self, mar, *args, **kwargs)
+      except exceptions.NoSuchUserException as e:
+        approximate_http_status = 404
+        raise endpoints.NotFoundException(
+            'The user does not exist: %s' % str(e))
+      except (exceptions.NoSuchProjectException,
+              exceptions.NoSuchIssueException,
+              exceptions.NoSuchComponentException) as e:
+        approximate_http_status = 404
+        raise endpoints.NotFoundException(str(e))
+      except (permissions.BannedUserException,
+              permissions.PermissionException) as e:
+        approximate_http_status = 403
+        logging.info('Allowlist ID %r email %r', auth_client_ids, auth_emails)
+        raise endpoints.ForbiddenException(str(e))
+      except endpoints.BadRequestException:
+        approximate_http_status = 400
+        raise
+      except endpoints.UnauthorizedException:
+        approximate_http_status = 401
+        # Client will refresh token and retry.
+        raise
+      except oauth.InvalidOAuthTokenError:
+        approximate_http_status = 401
+        # Client will refresh token and retry.
+        raise endpoints.UnauthorizedException(
+            'Auth error: InvalidOAuthTokenError')
+      except (exceptions.GroupExistsException,
+              exceptions.InvalidComponentNameException,
+              ratelimiter.ApiRateLimitExceeded) as e:
+        approximate_http_status = 400
+        raise endpoints.BadRequestException(str(e))
+      except Exception as e:
+        approximate_http_status = 500
+        logging.exception('Unexpected error in monorail API')
+        raise
+      finally:
+        if mar:
+          mar.CleanUp()
+        now = time_fn()
+        if c_id and c_email:
+          self.ratelimiter.CheckEnd(c_id, c_email, now, start_time)
+        _RecordMonitoringStats(
+            start_time, request, ret, (method_name or func.__name__),
+            (method_path or func.__name__), approximate_http_status, now)
+
+      return ret
+
+    return wrapper
+  return new_decorator
+
+
+def _RecordMonitoringStats(
+    start_time,
+    request,
+    response,
+    method_name,
+    method_path,
+    approximate_http_status,
+    now=None):
+  now = now or time.time()
+  elapsed_ms = int((now - start_time) * 1000)
+  # Use the api name, not the request path, to prevent an explosion in
+  # possible field values.
+  method_identifier = (
+      ENDPOINTS_API_NAME + '.endpoints.' + method_name + '/' + method_path)
+
+  # Endpoints APIs don't return the full set of http status values.
+  fields = monitoring.GetCommonFields(
+      approximate_http_status, method_identifier)
+
+  monitoring.AddServerDurations(elapsed_ms, fields)
+  monitoring.IncrementServerResponseStatusCount(fields)
+  request_length = len(protojson.encode_message(request))
+  monitoring.AddServerRequesteBytes(request_length, fields)
+  response_length = 0
+  if response:
+    response_length = len(protojson.encode_message(response))
+  monitoring.AddServerResponseBytes(response_length, fields)
+
+
+def _is_requester_in_allowed_domains(requester):
+  if requester.email().endswith(settings.api_allowed_email_domains):
+    if framework_constants.MONORAIL_SCOPE in oauth.get_authorized_scopes(
+        framework_constants.MONORAIL_SCOPE):
+      return True
+    else:
+      logging.info("User is not authenticated with monorail scope")
+  return False
+
+def api_base_checks(request, requester, services, cnxn,
+                    auth_client_ids, auth_emails):
+  """Base checks for API users.
+
+  Args:
+    request: The HTTP request from Cloud Endpoints.
+    requester: The user who sends the request.
+    services: Services object.
+    cnxn: connection to the SQL database.
+    auth_client_ids: authorized client ids.
+    auth_emails: authorized emails when client is anonymous.
+
+  Returns:
+    Client ID and client email.
+
+  Raises:
+    endpoints.UnauthorizedException: If the requester is anonymous.
+    exceptions.NoSuchUserException: If the requester does not exist in Monorail.
+    NoSuchProjectException: If the project does not exist in Monorail.
+    permissions.BannedUserException: If the requester is banned.
+    permissions.PermissionException: If the requester does not have
+        permisssion to view.
+  """
+  valid_user = False
+  auth_err = ''
+  client_id = None
+
+  try:
+    client_id = oauth.get_client_id(framework_constants.OAUTH_SCOPE)
+    logging.info('Oauth client ID %s', client_id)
+  except oauth.Error as ex:
+    auth_err = 'oauth.Error: %s' % ex
+
+  if not requester:
+    try:
+      requester = oauth.get_current_user(framework_constants.OAUTH_SCOPE)
+      logging.info('Oauth requester %s', requester.email())
+    except oauth.Error as ex:
+      logging.info('Got oauth error: %r', ex)
+      auth_err = 'oauth.Error: %s' % ex
+
+  if client_id and requester:
+    if client_id in auth_client_ids:
+      # A allowlisted client app can make requests for any user or anon.
+      logging.info('Client ID %r is allowlisted', client_id)
+      valid_user = True
+    elif requester.email() in auth_emails:
+      # A allowlisted user account can make requests via any client app.
+      logging.info('Client email %r is allowlisted', requester.email())
+      valid_user = True
+    elif _is_requester_in_allowed_domains(requester):
+      # A user with an allowed-domain email and authenticated with the
+      # monorail scope is allowed to make requests via any client app.
+      logging.info(
+          'User email %r is within the allowed domains', requester.email())
+      valid_user = True
+    else:
+      auth_err = (
+          'Neither client ID %r nor email %r is allowlisted' %
+          (client_id, requester.email()))
+
+  if not valid_user:
+    raise endpoints.UnauthorizedException('Auth error: %s' % auth_err)
+  else:
+    logging.info('API request from user %s:%s', client_id, requester.email())
+
+  project_name = None
+  if hasattr(request, 'projectId'):
+    project_name = request.projectId
+  issue_local_id = None
+  if hasattr(request, 'issueId'):
+    issue_local_id = request.issueId
+  # This could raise exceptions.NoSuchUserException
+  requester_id = services.user.LookupUserID(cnxn, requester.email())
+  auth = authdata.AuthData.FromUserID(cnxn, requester_id, services)
+  if permissions.IsBanned(auth.user_pb, auth.user_view):
+    raise permissions.BannedUserException(
+        'The user %s has been banned from using Monorail' %
+        requester.email())
+  if project_name:
+    project = services.project.GetProjectByName(
+        cnxn, project_name)
+    if not project:
+      raise exceptions.NoSuchProjectException(
+          'Project %s does not exist' % project_name)
+    if project.state != project_pb2.ProjectState.LIVE:
+      raise permissions.PermissionException(
+          'API may not access project %s because it is not live'
+          % project_name)
+    if not permissions.UserCanViewProject(
+        auth.user_pb, auth.effective_ids, project):
+      raise permissions.PermissionException(
+          'The user %s has no permission for project %s' %
+          (requester.email(), project_name))
+    if issue_local_id:
+      # This may raise a NoSuchIssueException.
+      issue = services.issue.GetIssueByLocalID(
+          cnxn, project.project_id, issue_local_id)
+      perms = permissions.GetPermissions(
+          auth.user_pb, auth.effective_ids, project)
+      config = services.config.GetProjectConfig(cnxn, project.project_id)
+      granted_perms = tracker_bizobj.GetGrantedPerms(
+          issue, auth.effective_ids, config)
+      if not permissions.CanViewIssue(
+          auth.effective_ids, perms, project, issue,
+          granted_perms=granted_perms):
+        raise permissions.PermissionException(
+            'User is not allowed to view this issue %s:%d' %
+            (project_name, issue_local_id))
+
+  return client_id, requester.email()
+
+
+@endpoints.api(name=ENDPOINTS_API_NAME, version='v1',
+               description='Monorail API to manage issues.',
+               auth_level=endpoints.AUTH_LEVEL.NONE,
+               allowed_client_ids=endpoints.SKIP_CLIENT_ID_CHECK,
+               documentation=DOC_URL)
+class MonorailApi(remote.Service):
+
+  # Class variables. Handy to mock.
+  _services = None
+  _mar = None
+
+  ratelimiter = ratelimiter.ApiRateLimiter()
+
+  @classmethod
+  def _set_services(cls, services):
+    cls._services = services
+
+  def mar_factory(self, request, cnxn):
+    if not self._mar:
+      self._mar = monorailrequest.MonorailApiRequest(
+          request, self._services, cnxn=cnxn)
+    return self._mar
+
+  def aux_delete_comment(self, mar, request, delete=True):
+    action_name = 'delete' if delete else 'undelete'
+
+    with work_env.WorkEnv(mar, self._services) as we:
+      issue = we.GetIssueByLocalID(
+          mar.project_id, request.issueId, use_cache=False)
+      all_comments = we.ListIssueComments(issue)
+      try:
+        issue_comment = all_comments[request.commentId]
+      except IndexError:
+        raise exceptions.NoSuchIssueException(
+              'The issue %s:%d does not have comment %d.' %
+              (mar.project_name, request.issueId, request.commentId))
+
+      issue_perms = permissions.UpdateIssuePermissions(
+          mar.perms, mar.project, issue, mar.auth.effective_ids,
+          granted_perms=mar.granted_perms)
+      commenter = we.GetUser(issue_comment.user_id)
+
+      if not permissions.CanDeleteComment(
+          issue_comment, commenter, mar.auth.user_id, issue_perms):
+        raise permissions.PermissionException(
+              'User is not allowed to %s the comment %d of issue %s:%d' %
+              (action_name, request.commentId, mar.project_name,
+               request.issueId))
+
+      we.DeleteComment(issue, issue_comment, delete=delete)
+    return api_pb2_v1.IssuesCommentsDeleteResponse()
+
+  @monorail_api_method(
+      api_pb2_v1.ISSUES_COMMENTS_DELETE_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.IssuesCommentsDeleteResponse,
+      path='projects/{projectId}/issues/{issueId}/comments/{commentId}',
+      http_method='DELETE',
+      name='issues.comments.delete')
+  def issues_comments_delete(self, mar, request):
+    """Delete a comment."""
+    return self.aux_delete_comment(mar, request, True)
+
+  def parse_imported_reporter(self, mar, request):
+    """Handle the case where an API client is importing issues for users.
+
+    Args:
+      mar: monorail API request object including auth and perms.
+      request: A request PB that defines author and published fields.
+
+    Returns:
+      A pair (reporter_id, timestamp) with the user ID of the user to
+      attribute the comment to and timestamp of the original comment.
+      If the author field is not set, this is not an import request
+      and the comment is attributed to the API client as per normal.
+      An API client that is attempting to post on behalf of other
+      users must have the ImportComment permission in the current
+      project.
+    """
+    reporter_id = mar.auth.user_id
+    timestamp = None
+    if (request.author and request.author.name and
+        request.author.name != mar.auth.email):
+      if not mar.perms.HasPerm(
+          permissions.IMPORT_COMMENT, mar.auth.user_id, mar.project):
+        logging.info('name is %r', request.author.name)
+        raise permissions.PermissionException(
+            'User is not allowed to attribue comments to others')
+      reporter_id = self._services.user.LookupUserID(
+              mar.cnxn, request.author.name, autocreate=True)
+      logging.info('Importing issue or comment.')
+      if request.published:
+        timestamp = calendar.timegm(request.published.utctimetuple())
+
+    return reporter_id, timestamp
+
+  @monorail_api_method(
+      api_pb2_v1.ISSUES_COMMENTS_INSERT_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.IssuesCommentsInsertResponse,
+      path='projects/{projectId}/issues/{issueId}/comments',
+      http_method='POST',
+      name='issues.comments.insert')
+  def issues_comments_insert(self, mar, request):
+    # type (...) -> proto.api_pb2_v1.IssuesCommentsInsertResponse
+    """Add a comment."""
+    # Because we will modify issues, load from DB rather than cache.
+    issue = self._services.issue.GetIssueByLocalID(
+        mar.cnxn, mar.project_id, request.issueId, use_cache=False)
+    old_owner_id = tracker_bizobj.GetOwnerId(issue)
+    if not permissions.CanCommentIssue(
+        mar.auth.effective_ids, mar.perms, mar.project, issue,
+        mar.granted_perms):
+      raise permissions.PermissionException(
+          'User is not allowed to comment this issue (%s, %d)' %
+          (request.projectId, request.issueId))
+
+    # Temporary block on updating approval subfields.
+    if request.updates and request.updates.fieldValues:
+      fds_by_name = {fd.field_name.lower():fd for fd in mar.config.field_defs}
+      for fv in request.updates.fieldValues:
+        # Checking for fv.approvalName is unreliable since it can be removed.
+        fd = fds_by_name.get(fv.fieldName.lower())
+        if fd and fd.approval_id:
+          raise exceptions.ActionNotSupported(
+              'No API support for approval field changes: (approval %s owns %s)'
+              % (fd.approval_id, fd.field_name))
+        # if fd was None, that gets dealt with later.
+
+    if request.content and len(
+        request.content) > tracker_constants.MAX_COMMENT_CHARS:
+      raise endpoints.BadRequestException(
+          'Comment is too long on this issue (%s, %d' %
+          (request.projectId, request.issueId))
+
+    updates_dict = {}
+    move_to_project = None
+    if request.updates:
+      if not permissions.CanEditIssue(
+          mar.auth.effective_ids, mar.perms, mar.project, issue,
+          mar.granted_perms):
+        raise permissions.PermissionException(
+            'User is not allowed to edit this issue (%s, %d)' %
+            (request.projectId, request.issueId))
+      if request.updates.moveToProject:
+        move_to = request.updates.moveToProject.lower()
+        move_to_project = issuedetailezt.CheckMoveIssueRequest(
+            self._services, mar, issue, True, move_to, mar.errors)
+        if mar.errors.AnyErrors():
+          raise endpoints.BadRequestException(mar.errors.move_to)
+
+      updates_dict['summary'] = request.updates.summary
+      updates_dict['status'] = request.updates.status
+      updates_dict['is_description'] = request.updates.is_description
+      if request.updates.owner:
+        # A current issue owner can be removed via the API with a
+        # NO_USER_NAME('----') input.
+        if request.updates.owner == framework_constants.NO_USER_NAME:
+          updates_dict['owner'] = framework_constants.NO_USER_SPECIFIED
+        else:
+          new_owner_id = self._services.user.LookupUserID(
+              mar.cnxn, request.updates.owner)
+          valid, msg = tracker_helpers.IsValidIssueOwner(
+              mar.cnxn, mar.project, new_owner_id, self._services)
+          if not valid:
+            raise endpoints.BadRequestException(msg)
+          updates_dict['owner'] = new_owner_id
+      updates_dict['cc_add'], updates_dict['cc_remove'] = (
+          api_pb2_v1_helpers.split_remove_add(request.updates.cc))
+      updates_dict['cc_add'] = list(self._services.user.LookupUserIDs(
+          mar.cnxn, updates_dict['cc_add'], autocreate=True).values())
+      updates_dict['cc_remove'] = list(self._services.user.LookupUserIDs(
+          mar.cnxn, updates_dict['cc_remove']).values())
+      updates_dict['labels_add'], updates_dict['labels_remove'] = (
+          api_pb2_v1_helpers.split_remove_add(request.updates.labels))
+      blocked_on_add_strs, blocked_on_remove_strs = (
+          api_pb2_v1_helpers.split_remove_add(request.updates.blockedOn))
+      updates_dict['blocked_on_add'] = api_pb2_v1_helpers.issue_global_ids(
+          blocked_on_add_strs, issue.project_id, mar,
+          self._services)
+      updates_dict['blocked_on_remove'] = api_pb2_v1_helpers.issue_global_ids(
+          blocked_on_remove_strs, issue.project_id, mar,
+          self._services)
+      blocking_add_strs, blocking_remove_strs = (
+          api_pb2_v1_helpers.split_remove_add(request.updates.blocking))
+      updates_dict['blocking_add'] = api_pb2_v1_helpers.issue_global_ids(
+          blocking_add_strs, issue.project_id, mar,
+          self._services)
+      updates_dict['blocking_remove'] = api_pb2_v1_helpers.issue_global_ids(
+          blocking_remove_strs, issue.project_id, mar,
+          self._services)
+      components_add_strs, components_remove_strs = (
+          api_pb2_v1_helpers.split_remove_add(request.updates.components))
+      updates_dict['components_add'] = (
+          api_pb2_v1_helpers.convert_component_ids(
+              mar.config, components_add_strs))
+      updates_dict['components_remove'] = (
+          api_pb2_v1_helpers.convert_component_ids(
+              mar.config, components_remove_strs))
+      if request.updates.mergedInto:
+        merge_project_name, merge_local_id = tracker_bizobj.ParseIssueRef(
+            request.updates.mergedInto)
+        merge_into_project = self._services.project.GetProjectByName(
+            mar.cnxn, merge_project_name or issue.project_name)
+        # Because we will modify issues, load from DB rather than cache.
+        merge_into_issue = self._services.issue.GetIssueByLocalID(
+            mar.cnxn, merge_into_project.project_id, merge_local_id,
+            use_cache=False)
+        merge_allowed = tracker_helpers.IsMergeAllowed(
+            merge_into_issue, mar, self._services)
+        if not merge_allowed:
+          raise permissions.PermissionException(
+            'User is not allowed to merge into issue %s:%s' %
+            (merge_into_issue.project_name, merge_into_issue.local_id))
+        updates_dict['merged_into'] = merge_into_issue.issue_id
+      (updates_dict['field_vals_add'], updates_dict['field_vals_remove'],
+       updates_dict['fields_clear'], updates_dict['fields_labels_add'],
+       updates_dict['fields_labels_remove']) = (
+          api_pb2_v1_helpers.convert_field_values(
+              request.updates.fieldValues, mar, self._services))
+
+    field_helpers.ValidateCustomFields(
+        mar.cnxn, self._services,
+        (updates_dict.get('field_vals_add', []) +
+         updates_dict.get('field_vals_remove', [])),
+        mar.config, mar.project, ezt_errors=mar.errors)
+    if mar.errors.AnyErrors():
+      raise endpoints.BadRequestException(
+          'Invalid field values: %s' % mar.errors.custom_fields)
+
+    updates_dict['labels_add'] = (
+        updates_dict.get('labels_add', []) +
+        updates_dict.get('fields_labels_add', []))
+    updates_dict['labels_remove'] = (
+        updates_dict.get('labels_remove', []) +
+        updates_dict.get('fields_labels_remove', []))
+
+    # TODO(jrobbins): Stop using updates_dict in the first place.
+    delta = tracker_bizobj.MakeIssueDelta(
+        updates_dict.get('status'),
+        updates_dict.get('owner'),
+        updates_dict.get('cc_add', []),
+        updates_dict.get('cc_remove', []),
+        updates_dict.get('components_add', []),
+        updates_dict.get('components_remove', []),
+        (updates_dict.get('labels_add', []) +
+         updates_dict.get('fields_labels_add', [])),
+        (updates_dict.get('labels_remove', []) +
+         updates_dict.get('fields_labels_remove', [])),
+        updates_dict.get('field_vals_add', []),
+        updates_dict.get('field_vals_remove', []),
+        updates_dict.get('fields_clear', []),
+        updates_dict.get('blocked_on_add', []),
+        updates_dict.get('blocked_on_remove', []),
+        updates_dict.get('blocking_add', []),
+        updates_dict.get('blocking_remove', []),
+        updates_dict.get('merged_into'),
+        updates_dict.get('summary'))
+
+    importer_id = None
+    reporter_id, timestamp = self.parse_imported_reporter(mar, request)
+    if reporter_id != mar.auth.user_id:
+      importer_id = mar.auth.user_id
+
+    # TODO(jrobbins): Finish refactoring to make everything go through work_env.
+    _, comment = self._services.issue.DeltaUpdateIssue(
+        cnxn=mar.cnxn, services=self._services,
+        reporter_id=reporter_id, project_id=mar.project_id, config=mar.config,
+        issue=issue, delta=delta, index_now=False, comment=request.content,
+        is_description=updates_dict.get('is_description'),
+        timestamp=timestamp, importer_id=importer_id)
+
+    move_comment = None
+    if move_to_project:
+      old_text_ref = 'issue %s:%s' % (issue.project_name, issue.local_id)
+      tracker_fulltext.UnindexIssues([issue.issue_id])
+      moved_back_iids = self._services.issue.MoveIssues(
+          mar.cnxn, move_to_project, [issue], self._services.user)
+      new_text_ref = 'issue %s:%s' % (issue.project_name, issue.local_id)
+      if issue.issue_id in moved_back_iids:
+        content = 'Moved %s back to %s again.' % (old_text_ref, new_text_ref)
+      else:
+        content = 'Moved %s to now be %s.' % (old_text_ref, new_text_ref)
+      move_comment = self._services.issue.CreateIssueComment(
+        mar.cnxn, issue, mar.auth.user_id, content, amendments=[
+            tracker_bizobj.MakeProjectAmendment(move_to_project.project_name)])
+
+    if 'merged_into' in updates_dict:
+      new_starrers = tracker_helpers.GetNewIssueStarrers(
+          mar.cnxn, self._services, [issue.issue_id], merge_into_issue.issue_id)
+      tracker_helpers.AddIssueStarrers(
+          mar.cnxn, self._services, mar,
+          merge_into_issue.issue_id, merge_into_project, new_starrers)
+      # Load target issue again to get the updated star count.
+      merge_into_issue = self._services.issue.GetIssue(
+        mar.cnxn, merge_into_issue.issue_id, use_cache=False)
+      merge_comment_pb = tracker_helpers.MergeCCsAndAddComment(
+        self._services, mar, issue, merge_into_issue)
+      hostport = framework_helpers.GetHostPort(
+          project_name=merge_into_issue.project_name)
+      send_notifications.PrepareAndSendIssueChangeNotification(
+          merge_into_issue.issue_id, hostport,
+          mar.auth.user_id, send_email=True, comment_id=merge_comment_pb.id)
+
+    tracker_fulltext.IndexIssues(
+        mar.cnxn, [issue], self._services.user, self._services.issue,
+        self._services.config)
+
+    comment = comment or move_comment
+    if comment is None:
+      return api_pb2_v1.IssuesCommentsInsertResponse()
+
+    cmnts = self._services.issue.GetCommentsForIssue(mar.cnxn, issue.issue_id)
+    seq = len(cmnts) - 1
+
+    if request.sendEmail:
+      hostport = framework_helpers.GetHostPort(project_name=issue.project_name)
+      send_notifications.PrepareAndSendIssueChangeNotification(
+          issue.issue_id, hostport, comment.user_id, send_email=True,
+          old_owner_id=old_owner_id, comment_id=comment.id)
+
+    issue_perms = permissions.UpdateIssuePermissions(
+        mar.perms, mar.project, issue, mar.auth.effective_ids,
+        granted_perms=mar.granted_perms)
+    commenter = self._services.user.GetUser(mar.cnxn, comment.user_id)
+    can_delete = permissions.CanDeleteComment(
+        comment, commenter, mar.auth.user_id, issue_perms)
+    return api_pb2_v1.IssuesCommentsInsertResponse(
+        id=seq,
+        kind='monorail#issueComment',
+        author=api_pb2_v1_helpers.convert_person(
+            comment.user_id, mar.cnxn, self._services),
+        content=comment.content,
+        published=datetime.datetime.fromtimestamp(comment.timestamp),
+        updates=api_pb2_v1_helpers.convert_amendments(
+            issue, comment.amendments, mar, self._services),
+        canDelete=can_delete)
+
+  @monorail_api_method(
+      api_pb2_v1.ISSUES_COMMENTS_LIST_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.IssuesCommentsListResponse,
+      path='projects/{projectId}/issues/{issueId}/comments',
+      http_method='GET',
+      name='issues.comments.list')
+  def issues_comments_list(self, mar, request):
+    """List all comments for an issue."""
+    issue = self._services.issue.GetIssueByLocalID(
+        mar.cnxn, mar.project_id, request.issueId)
+    comments = self._services.issue.GetCommentsForIssue(
+        mar.cnxn, issue.issue_id)
+    comments = [comment for comment in comments if not comment.approval_id]
+    visible_comments = []
+    for comment in comments[
+        request.startIndex:(request.startIndex + request.maxResults)]:
+      visible_comments.append(
+          api_pb2_v1_helpers.convert_comment(
+              issue, comment, mar, self._services, mar.granted_perms))
+
+    return api_pb2_v1.IssuesCommentsListResponse(
+        kind='monorail#issueCommentList',
+        totalResults=len(comments),
+        items=visible_comments)
+
+  @monorail_api_method(
+      api_pb2_v1.ISSUES_COMMENTS_DELETE_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.IssuesCommentsDeleteResponse,
+      path='projects/{projectId}/issues/{issueId}/comments/{commentId}',
+      http_method='POST',
+      name='issues.comments.undelete')
+  def issues_comments_undelete(self, mar, request):
+    """Restore a deleted comment."""
+    return self.aux_delete_comment(mar, request, False)
+
+  @monorail_api_method(
+      api_pb2_v1.APPROVALS_COMMENTS_LIST_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.ApprovalsCommentsListResponse,
+      path='projects/{projectId}/issues/{issueId}/'
+            'approvals/{approvalName}/comments',
+      http_method='GET',
+      name='approvals.comments.list')
+  def approvals_comments_list(self, mar, request):
+    """List all comments for an issue approval."""
+    issue = self._services.issue.GetIssueByLocalID(
+        mar.cnxn, mar.project_id, request.issueId)
+    if not permissions.CanViewIssue(
+        mar.auth.effective_ids, mar.perms, mar.project, issue,
+        mar.granted_perms):
+      raise permissions.PermissionException(
+          'User is not allowed to view this issue (%s, %d)' %
+          (request.projectId, request.issueId))
+    config = self._services.config.GetProjectConfig(mar.cnxn, issue.project_id)
+    approval_fd = tracker_bizobj.FindFieldDef(request.approvalName, config)
+    if not approval_fd:
+      raise endpoints.BadRequestException(
+          'Field definition for %s not found in project config' %
+          request.approvalName)
+    comments = self._services.issue.GetCommentsForIssue(
+        mar.cnxn, issue.issue_id)
+    comments = [comment for comment in comments
+                if comment.approval_id == approval_fd.field_id]
+    visible_comments = []
+    for comment in comments[
+        request.startIndex:(request.startIndex + request.maxResults)]:
+      visible_comments.append(
+          api_pb2_v1_helpers.convert_approval_comment(
+              issue, comment, mar, self._services, mar.granted_perms))
+
+    return api_pb2_v1.ApprovalsCommentsListResponse(
+        kind='monorail#approvalCommentList',
+        totalResults=len(comments),
+        items=visible_comments)
+
+  @monorail_api_method(
+      api_pb2_v1.APPROVALS_COMMENTS_INSERT_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.ApprovalsCommentsInsertResponse,
+      path=("projects/{projectId}/issues/{issueId}/"
+            "approvals/{approvalName}/comments"),
+      http_method='POST',
+      name='approvals.comments.insert')
+  def approvals_comments_insert(self, mar, request):
+    # type (...) -> proto.api_pb2_v1.ApprovalsCommentsInsertResponse
+    """Add an approval comment."""
+    approval_fd = tracker_bizobj.FindFieldDef(
+        request.approvalName, mar.config)
+    if not approval_fd or (
+        approval_fd.field_type != tracker_pb2.FieldTypes.APPROVAL_TYPE):
+      raise endpoints.BadRequestException(
+          'Field definition for %s not found in project config' %
+          request.approvalName)
+    try:
+      issue = self._services.issue.GetIssueByLocalID(
+          mar.cnxn, mar.project_id, request.issueId)
+    except exceptions.NoSuchIssueException:
+      raise endpoints.BadRequestException(
+          'Issue %s:%s not found' % (request.projectId, request.issueId))
+    approval = tracker_bizobj.FindApprovalValueByID(
+        approval_fd.field_id, issue.approval_values)
+    if not approval:
+      raise endpoints.BadRequestException(
+          'Approval %s not found in issue.' % request.approvalName)
+
+    if not permissions.CanCommentIssue(
+        mar.auth.effective_ids, mar.perms, mar.project, issue,
+        mar.granted_perms):
+      raise permissions.PermissionException(
+          'User is not allowed to comment on this issue (%s, %d)' %
+          (request.projectId, request.issueId))
+
+    if request.content and len(
+        request.content) > tracker_constants.MAX_COMMENT_CHARS:
+      raise endpoints.BadRequestException(
+          'Comment is too long on this issue (%s, %d' %
+          (request.projectId, request.issueId))
+
+    updates_dict = {}
+    if request.approvalUpdates:
+      if request.approvalUpdates.fieldValues:
+        # Block updating field values that don't belong to the approval.
+        approvals_fds_by_name = {
+            fd.field_name.lower():fd for fd in mar.config.field_defs
+            if fd.approval_id == approval_fd.field_id}
+        for fv in request.approvalUpdates.fieldValues:
+          if approvals_fds_by_name.get(fv.fieldName.lower()) is None:
+            raise endpoints.BadRequestException(
+              'Field defition for %s not found in %s subfields.' %
+              (fv.fieldName, request.approvalName))
+        (updates_dict['field_vals_add'], updates_dict['field_vals_remove'],
+         updates_dict['fields_clear'], updates_dict['fields_labels_add'],
+         updates_dict['fields_labels_remove']) = (
+             api_pb2_v1_helpers.convert_field_values(
+                 request.approvalUpdates.fieldValues, mar, self._services))
+      if request.approvalUpdates.approvers:
+        if not permissions.CanUpdateApprovers(
+            mar.auth.effective_ids, mar.perms, mar.project,
+            approval.approver_ids):
+          raise permissions.PermissionException(
+              'User is not allowed to update approvers')
+        approvers_add, approvers_remove = api_pb2_v1_helpers.split_remove_add(
+            request.approvalUpdates.approvers)
+        updates_dict['approver_ids_add'] = list(
+            self._services.user.LookupUserIDs(mar.cnxn, approvers_add,
+              autocreate=True).values())
+        updates_dict['approver_ids_remove'] = list(
+            self._services.user.LookupUserIDs(mar.cnxn, approvers_remove,
+              autocreate=True).values())
+      if request.approvalUpdates.status:
+        status = tracker_pb2.ApprovalStatus(
+            api_pb2_v1.ApprovalStatus(request.approvalUpdates.status).number)
+        if not permissions.CanUpdateApprovalStatus(
+            mar.auth.effective_ids, mar.perms, mar.project,
+            approval.approver_ids, status):
+          raise permissions.PermissionException(
+              'User is not allowed to make this status change')
+        updates_dict['status'] = status
+    logging.info(time.time)
+    approval_delta = tracker_bizobj.MakeApprovalDelta(
+        updates_dict.get('status'), mar.auth.user_id,
+        updates_dict.get('approver_ids_add', []),
+        updates_dict.get('approver_ids_remove', []),
+        updates_dict.get('field_vals_add', []),
+        updates_dict.get('field_vals_remove', []),
+        updates_dict.get('fields_clear', []),
+        updates_dict.get('fields_labels_add', []),
+        updates_dict.get('fields_labels_remove', []))
+    comment = self._services.issue.DeltaUpdateIssueApproval(
+        mar.cnxn, mar.auth.user_id, mar.config, issue, approval, approval_delta,
+        comment_content=request.content,
+        is_description=request.is_description)
+
+    cmnts = self._services.issue.GetCommentsForIssue(mar.cnxn, issue.issue_id)
+    seq = len(cmnts) - 1
+
+    if request.sendEmail:
+      hostport = framework_helpers.GetHostPort(project_name=issue.project_name)
+      send_notifications.PrepareAndSendApprovalChangeNotification(
+          issue.issue_id, approval.approval_id,
+          hostport, comment.id, send_email=True)
+
+    issue_perms = permissions.UpdateIssuePermissions(
+        mar.perms, mar.project, issue, mar.auth.effective_ids,
+        granted_perms=mar.granted_perms)
+    commenter = self._services.user.GetUser(mar.cnxn, comment.user_id)
+    can_delete = permissions.CanDeleteComment(
+        comment, commenter, mar.auth.user_id, issue_perms)
+    return api_pb2_v1.ApprovalsCommentsInsertResponse(
+        id=seq,
+        kind='monorail#approvalComment',
+        author=api_pb2_v1_helpers.convert_person(
+            comment.user_id, mar.cnxn, self._services),
+        content=comment.content,
+        published=datetime.datetime.fromtimestamp(comment.timestamp),
+        approvalUpdates=api_pb2_v1_helpers.convert_approval_amendments(
+            comment.amendments, mar, self._services),
+        canDelete=can_delete)
+
+  @monorail_api_method(
+      api_pb2_v1.USERS_GET_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.UsersGetResponse,
+      path='users/{userId}',
+      http_method='GET',
+      name='users.get')
+  def users_get(self, mar, request):
+    """Get a user."""
+    owner_project_only = request.ownerProjectsOnly
+    with work_env.WorkEnv(mar, self._services) as we:
+      (visible_ownership, visible_deleted, visible_membership,
+       visible_contrib) = we.GetUserProjects(
+           mar.viewed_user_auth.effective_ids)
+
+    project_list = []
+    for proj in (visible_ownership + visible_deleted):
+      config = self._services.config.GetProjectConfig(
+          mar.cnxn, proj.project_id)
+      templates = self._services.template.GetProjectTemplates(
+          mar.cnxn, config.project_id)
+      proj_result = api_pb2_v1_helpers.convert_project(
+          proj, config, api_pb2_v1.Role.owner, templates)
+      project_list.append(proj_result)
+    if not owner_project_only:
+      for proj in visible_membership:
+        config = self._services.config.GetProjectConfig(
+            mar.cnxn, proj.project_id)
+        templates = self._services.template.GetProjectTemplates(
+            mar.cnxn, config.project_id)
+        proj_result = api_pb2_v1_helpers.convert_project(
+            proj, config, api_pb2_v1.Role.member, templates)
+        project_list.append(proj_result)
+      for proj in visible_contrib:
+        config = self._services.config.GetProjectConfig(
+            mar.cnxn, proj.project_id)
+        templates = self._services.template.GetProjectTemplates(
+            mar.cnxn, config.project_id)
+        proj_result = api_pb2_v1_helpers.convert_project(
+            proj, config, api_pb2_v1.Role.contributor, templates)
+        project_list.append(proj_result)
+
+    return api_pb2_v1.UsersGetResponse(
+        id=str(mar.viewed_user_auth.user_id),
+        kind='monorail#user',
+        projects=project_list,
+    )
+
+  @monorail_api_method(
+      api_pb2_v1.ISSUES_GET_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.IssuesGetInsertResponse,
+      path='projects/{projectId}/issues/{issueId}',
+      http_method='GET',
+      name='issues.get')
+  def issues_get(self, mar, request):
+    """Get an issue."""
+    issue = self._services.issue.GetIssueByLocalID(
+        mar.cnxn, mar.project_id, request.issueId)
+
+    return api_pb2_v1_helpers.convert_issue(
+        api_pb2_v1.IssuesGetInsertResponse, issue, mar, self._services)
+
+  @monorail_api_method(
+      api_pb2_v1.ISSUES_INSERT_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.IssuesGetInsertResponse,
+      path='projects/{projectId}/issues',
+      http_method='POST',
+      name='issues.insert')
+  def issues_insert(self, mar, request):
+    """Add a new issue."""
+    if not mar.perms.CanUsePerm(
+        permissions.CREATE_ISSUE, mar.auth.effective_ids, mar.project, []):
+      raise permissions.PermissionException(
+          'The requester %s is not allowed to create issues for project %s.' %
+          (mar.auth.email, mar.project_name))
+
+    with work_env.WorkEnv(mar, self._services) as we:
+      owner_id = framework_constants.NO_USER_SPECIFIED
+      if request.owner and request.owner.name:
+        try:
+          owner_id = self._services.user.LookupUserID(
+              mar.cnxn, request.owner.name)
+        except exceptions.NoSuchUserException:
+          raise endpoints.BadRequestException(
+              'The specified owner %s does not exist.' % request.owner.name)
+
+      cc_ids = []
+      request.cc = [cc for cc in request.cc if cc]
+      if request.cc:
+        cc_ids = list(self._services.user.LookupUserIDs(
+            mar.cnxn, [ap.name for ap in request.cc],
+            autocreate=True).values())
+      comp_ids = api_pb2_v1_helpers.convert_component_ids(
+          mar.config, request.components)
+      fields_add, _, _, fields_labels, _ = (
+          api_pb2_v1_helpers.convert_field_values(
+              request.fieldValues, mar, self._services))
+      field_helpers.ValidateCustomFields(
+          mar.cnxn, self._services, fields_add, mar.config, mar.project,
+          ezt_errors=mar.errors)
+      if mar.errors.AnyErrors():
+        raise endpoints.BadRequestException(
+            'Invalid field values: %s' % mar.errors.custom_fields)
+
+      logging.info('request.author is %r', request.author)
+      reporter_id, timestamp = self.parse_imported_reporter(mar, request)
+      # To preserve previous behavior, do not raise filter rule errors.
+      try:
+        new_issue, _ = we.CreateIssue(
+            mar.project_id,
+            request.summary,
+            request.status,
+            owner_id,
+            cc_ids,
+            request.labels + fields_labels,
+            fields_add,
+            comp_ids,
+            request.description,
+            blocked_on=api_pb2_v1_helpers.convert_issueref_pbs(
+                request.blockedOn, mar, self._services),
+            blocking=api_pb2_v1_helpers.convert_issueref_pbs(
+                request.blocking, mar, self._services),
+            reporter_id=reporter_id,
+            timestamp=timestamp,
+            send_email=request.sendEmail,
+            raise_filter_errors=False)
+        we.StarIssue(new_issue, True)
+      except exceptions.InputException as e:
+        raise endpoints.BadRequestException(str(e))
+
+    return api_pb2_v1_helpers.convert_issue(
+        api_pb2_v1.IssuesGetInsertResponse, new_issue, mar, self._services)
+
+  @monorail_api_method(
+      api_pb2_v1.ISSUES_LIST_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.IssuesListResponse,
+      path='projects/{projectId}/issues',
+      http_method='GET',
+      name='issues.list')
+  def issues_list(self, mar, request):
+    """List issues for projects."""
+    if request.additionalProject:
+      for project_name in request.additionalProject:
+        project = self._services.project.GetProjectByName(
+            mar.cnxn, project_name)
+        if project and not permissions.UserCanViewProject(
+            mar.auth.user_pb, mar.auth.effective_ids, project):
+          raise permissions.PermissionException(
+              'The user %s has no permission for project %s' %
+              (mar.auth.email, project_name))
+    # TODO(jrobbins): This should go through work_env.
+    pipeline = frontendsearchpipeline.FrontendSearchPipeline(
+        mar.cnxn,
+        self._services,
+        mar.auth, [mar.me_user_id],
+        mar.query,
+        mar.query_project_names,
+        mar.num,
+        mar.start,
+        mar.can,
+        mar.group_by_spec,
+        mar.sort_spec,
+        mar.warnings,
+        mar.errors,
+        mar.use_cached_searches,
+        mar.profiler,
+        project=mar.project)
+    if not mar.errors.AnyErrors():
+      pipeline.SearchForIIDs()
+      pipeline.MergeAndSortIssues()
+      pipeline.Paginate()
+    else:
+      raise endpoints.BadRequestException(mar.errors.query)
+
+    issue_list = [
+        api_pb2_v1_helpers.convert_issue(
+            api_pb2_v1.IssueWrapper, r, mar, self._services)
+        for r in pipeline.visible_results]
+    return api_pb2_v1.IssuesListResponse(
+        kind='monorail#issueList',
+        totalResults=pipeline.total_count,
+        items=issue_list)
+
+  @monorail_api_method(
+      api_pb2_v1.GROUPS_SETTINGS_LIST_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.GroupsSettingsListResponse,
+      path='groupsettings',
+      http_method='GET',
+      name='groups.settings.list')
+  def groups_settings_list(self, mar, request):
+    """List all group settings."""
+    all_groups = self._services.usergroup.GetAllUserGroupsInfo(mar.cnxn)
+    group_settings = []
+    for g in all_groups:
+      setting = g[2]
+      wrapper = api_pb2_v1_helpers.convert_group_settings(g[0], setting)
+      if not request.importedGroupsOnly or wrapper.ext_group_type:
+        group_settings.append(wrapper)
+    return api_pb2_v1.GroupsSettingsListResponse(
+        groupSettings=group_settings)
+
+  @monorail_api_method(
+      api_pb2_v1.GROUPS_CREATE_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.GroupsCreateResponse,
+      path='groups',
+      http_method='POST',
+      name='groups.create')
+  def groups_create(self, mar, request):
+    """Create a new user group."""
+    if not permissions.CanCreateGroup(mar.perms):
+      raise permissions.PermissionException(
+          'The user is not allowed to create groups.')
+
+    user_dict = self._services.user.LookupExistingUserIDs(
+        mar.cnxn, [request.groupName])
+    if request.groupName.lower() in user_dict:
+      raise exceptions.GroupExistsException(
+          'group %s already exists' % request.groupName)
+
+    if request.ext_group_type:
+      ext_group_type = str(request.ext_group_type).lower()
+    else:
+      ext_group_type = None
+    group_id = self._services.usergroup.CreateGroup(
+        mar.cnxn, self._services, request.groupName,
+        str(request.who_can_view_members).lower(),
+        ext_group_type)
+
+    return api_pb2_v1.GroupsCreateResponse(
+        groupID=group_id)
+
+  @monorail_api_method(
+      api_pb2_v1.GROUPS_GET_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.GroupsGetResponse,
+      path='groups/{groupName}',
+      http_method='GET',
+      name='groups.get')
+  def groups_get(self, mar, request):
+    """Get a group's settings and users."""
+    if not mar.viewed_user_auth:
+      raise exceptions.NoSuchUserException(request.groupName)
+    group_id = mar.viewed_user_auth.user_id
+    group_settings = self._services.usergroup.GetGroupSettings(
+        mar.cnxn, group_id)
+    member_ids, owner_ids = self._services.usergroup.LookupAllMembers(
+          mar.cnxn, [group_id])
+    (owned_project_ids, membered_project_ids,
+     contrib_project_ids) = self._services.project.GetUserRolesInAllProjects(
+         mar.cnxn, mar.auth.effective_ids)
+    project_ids = owned_project_ids.union(
+        membered_project_ids).union(contrib_project_ids)
+    if not permissions.CanViewGroupMembers(
+        mar.perms, mar.auth.effective_ids, group_settings, member_ids[group_id],
+        owner_ids[group_id], project_ids):
+      raise permissions.PermissionException(
+          'The user is not allowed to view this group.')
+
+    member_ids, owner_ids = self._services.usergroup.LookupMembers(
+        mar.cnxn, [group_id])
+
+    member_emails = list(self._services.user.LookupUserEmails(
+        mar.cnxn, member_ids[group_id]).values())
+    owner_emails = list(self._services.user.LookupUserEmails(
+        mar.cnxn, owner_ids[group_id]).values())
+
+    return api_pb2_v1.GroupsGetResponse(
+      groupID=group_id,
+      groupSettings=api_pb2_v1_helpers.convert_group_settings(
+          request.groupName, group_settings),
+      groupOwners=owner_emails,
+      groupMembers=member_emails)
+
+  @monorail_api_method(
+      api_pb2_v1.GROUPS_UPDATE_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.GroupsUpdateResponse,
+      path='groups/{groupName}',
+      http_method='POST',
+      name='groups.update')
+  def groups_update(self, mar, request):
+    """Update a group's settings and users."""
+    group_id = mar.viewed_user_auth.user_id
+    member_ids_dict, owner_ids_dict = self._services.usergroup.LookupMembers(
+        mar.cnxn, [group_id])
+    owner_ids = owner_ids_dict.get(group_id, [])
+    member_ids = member_ids_dict.get(group_id, [])
+    if not permissions.CanEditGroup(
+        mar.perms, mar.auth.effective_ids, owner_ids):
+      raise permissions.PermissionException(
+          'The user is not allowed to edit this group.')
+
+    group_settings = self._services.usergroup.GetGroupSettings(
+        mar.cnxn, group_id)
+    if (request.who_can_view_members or request.ext_group_type
+        or request.last_sync_time or request.friend_projects):
+      group_settings.who_can_view_members = (
+          request.who_can_view_members or group_settings.who_can_view_members)
+      group_settings.ext_group_type = (
+          request.ext_group_type or group_settings.ext_group_type)
+      group_settings.last_sync_time = (
+          request.last_sync_time or group_settings.last_sync_time)
+      if framework_constants.NO_VALUES in request.friend_projects:
+        group_settings.friend_projects = []
+      else:
+        id_dict = self._services.project.LookupProjectIDs(
+            mar.cnxn, request.friend_projects)
+        group_settings.friend_projects = (
+            list(id_dict.values()) or group_settings.friend_projects)
+      self._services.usergroup.UpdateSettings(
+          mar.cnxn, group_id, group_settings)
+
+    if request.groupOwners or request.groupMembers:
+      self._services.usergroup.RemoveMembers(
+          mar.cnxn, group_id, owner_ids + member_ids)
+      owners_dict = self._services.user.LookupUserIDs(
+          mar.cnxn, request.groupOwners, autocreate=True)
+      self._services.usergroup.UpdateMembers(
+          mar.cnxn, group_id, list(owners_dict.values()), 'owner')
+      members_dict = self._services.user.LookupUserIDs(
+          mar.cnxn, request.groupMembers, autocreate=True)
+      self._services.usergroup.UpdateMembers(
+          mar.cnxn, group_id, list(members_dict.values()), 'member')
+
+    return api_pb2_v1.GroupsUpdateResponse()
+
+  @monorail_api_method(
+      api_pb2_v1.COMPONENTS_LIST_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.ComponentsListResponse,
+      path='projects/{projectId}/components',
+      http_method='GET',
+      name='components.list')
+  def components_list(self, mar, _request):
+    """List all components of a given project."""
+    config = self._services.config.GetProjectConfig(mar.cnxn, mar.project_id)
+    components = [api_pb2_v1_helpers.convert_component_def(
+        cd, mar, self._services) for cd in config.component_defs]
+    return api_pb2_v1.ComponentsListResponse(
+        components=components)
+
+  @monorail_api_method(
+      api_pb2_v1.COMPONENTS_CREATE_REQUEST_RESOURCE_CONTAINER,
+      api_pb2_v1.Component,
+      path='projects/{projectId}/components',
+      http_method='POST',
+      name='components.create')
+  def components_create(self, mar, request):
+    """Create a component."""
+    if not mar.perms.CanUsePerm(
+        permissions.EDIT_PROJECT, mar.auth.effective_ids, mar.project, []):
+      raise permissions.PermissionException(
+          'User is not allowed to create components for this project')
+
+    config = self._services.config.GetProjectConfig(mar.cnxn, mar.project_id)
+    leaf_name = request.componentName
+    if not tracker_constants.COMPONENT_NAME_RE.match(leaf_name):
+      raise exceptions.InvalidComponentNameException(
+          'The component name %s is invalid.' % leaf_name)
+
+    parent_path = request.parentPath
+    if parent_path:
+      parent_def = tracker_bizobj.FindComponentDef(parent_path, config)
+      if not parent_def:
+        raise exceptions.NoSuchComponentException(
+            'Parent component %s does not exist.' % parent_path)
+      if not permissions.CanEditComponentDef(
+          mar.auth.effective_ids, mar.perms, mar.project, parent_def, config):
+        raise permissions.PermissionException(
+            'User is not allowed to add a subcomponent to component %s' %
+            parent_path)
+
+      path = '%s>%s' % (parent_path, leaf_name)
+    else:
+      path = leaf_name
+
+    if tracker_bizobj.FindComponentDef(path, config):
+      raise exceptions.InvalidComponentNameException(
+          'The name %s is already in use.' % path)
+
+    created = int(time.time())
+    user_emails = set()
+    user_emails.update([mar.auth.email] + request.admin + request.cc)
+    user_ids_dict = self._services.user.LookupUserIDs(
+        mar.cnxn, list(user_emails), autocreate=False)
+    request.admin = [admin for admin in request.admin if admin]
+    admin_ids = [user_ids_dict[uname] for uname in request.admin]
+    request.cc = [cc for cc in request.cc if cc]
+    cc_ids = [user_ids_dict[uname] for uname in request.cc]
+    label_ids = []  # TODO(jrobbins): allow API clients to specify this too.
+
+    component_id = self._services.config.CreateComponentDef(
+        mar.cnxn, mar.project_id, path, request.description, request.deprecated,
+        admin_ids, cc_ids, created, user_ids_dict[mar.auth.email], label_ids)
+
+    return api_pb2_v1.Component(
+        componentId=component_id,
+        projectName=request.projectId,
+        componentPath=path,
+        description=request.description,
+        admin=request.admin,
+        cc=request.cc,
+        deprecated=request.deprecated,
+        created=datetime.datetime.fromtimestamp(created),
+        creator=mar.auth.email)
+
+  @monorail_api_method(
+      api_pb2_v1.COMPONENTS_DELETE_REQUEST_RESOURCE_CONTAINER,
+      message_types.VoidMessage,
+      path='projects/{projectId}/components/{componentPath}',
+      http_method='DELETE',
+      name='components.delete')
+  def components_delete(self, mar, request):
+    """Delete a component."""
+    config = self._services.config.GetProjectConfig(mar.cnxn, mar.project_id)
+    component_path = request.componentPath
+    component_def = tracker_bizobj.FindComponentDef(
+        component_path, config)
+    if not component_def:
+      raise exceptions.NoSuchComponentException(
+          'The component %s does not exist.' % component_path)
+    if not permissions.CanViewComponentDef(
+        mar.auth.effective_ids, mar.perms, mar.project, component_def):
+      raise permissions.PermissionException(
+          'User is not allowed to view this component %s' % component_path)
+    if not permissions.CanEditComponentDef(
+        mar.auth.effective_ids, mar.perms, mar.project, component_def, config):
+      raise permissions.PermissionException(
+          'User is not allowed to delete this component %s' % component_path)
+
+    allow_delete = not tracker_bizobj.FindDescendantComponents(
+        config, component_def)
+    if not allow_delete:
+      raise permissions.PermissionException(
+          'User tried to delete component that had subcomponents')
+
+    self._services.issue.DeleteComponentReferences(
+        mar.cnxn, component_def.component_id)
+    self._services.config.DeleteComponentDef(
+        mar.cnxn, mar.project_id, component_def.component_id)
+    return message_types.VoidMessage()
+
+  @monorail_api_method(
+      api_pb2_v1.COMPONENTS_UPDATE_REQUEST_RESOURCE_CONTAINER,
+      message_types.VoidMessage,
+      path='projects/{projectId}/components/{componentPath}',
+      http_method='POST',
+      name='components.update')
+  def components_update(self, mar, request):
+    """Update a component."""
+    config = self._services.config.GetProjectConfig(mar.cnxn, mar.project_id)
+    component_path = request.componentPath
+    component_def = tracker_bizobj.FindComponentDef(
+        component_path, config)
+    if not component_def:
+      raise exceptions.NoSuchComponentException(
+          'The component %s does not exist.' % component_path)
+    if not permissions.CanViewComponentDef(
+        mar.auth.effective_ids, mar.perms, mar.project, component_def):
+      raise permissions.PermissionException(
+          'User is not allowed to view this component %s' % component_path)
+    if not permissions.CanEditComponentDef(
+        mar.auth.effective_ids, mar.perms, mar.project, component_def, config):
+      raise permissions.PermissionException(
+          'User is not allowed to edit this component %s' % component_path)
+
+    original_path = component_def.path
+    new_path = component_def.path
+    new_docstring = component_def.docstring
+    new_deprecated = component_def.deprecated
+    new_admin_ids = component_def.admin_ids
+    new_cc_ids = component_def.cc_ids
+    update_filterrule = False
+    for update in request.updates:
+      if update.field == api_pb2_v1.ComponentUpdateFieldID.LEAF_NAME:
+        leaf_name = update.leafName
+        if not tracker_constants.COMPONENT_NAME_RE.match(leaf_name):
+          raise exceptions.InvalidComponentNameException(
+              'The component name %s is invalid.' % leaf_name)
+
+        if '>' in original_path:
+          parent_path = original_path[:original_path.rindex('>')]
+          new_path = '%s>%s' % (parent_path, leaf_name)
+        else:
+          new_path = leaf_name
+
+        conflict = tracker_bizobj.FindComponentDef(new_path, config)
+        if conflict and conflict.component_id != component_def.component_id:
+          raise exceptions.InvalidComponentNameException(
+              'The name %s is already in use.' % new_path)
+        update_filterrule = True
+      elif update.field == api_pb2_v1.ComponentUpdateFieldID.DESCRIPTION:
+        new_docstring = update.description
+      elif update.field == api_pb2_v1.ComponentUpdateFieldID.ADMIN:
+        user_ids_dict = self._services.user.LookupUserIDs(
+            mar.cnxn, list(update.admin), autocreate=True)
+        new_admin_ids = list(set(user_ids_dict.values()))
+      elif update.field == api_pb2_v1.ComponentUpdateFieldID.CC:
+        user_ids_dict = self._services.user.LookupUserIDs(
+            mar.cnxn, list(update.cc), autocreate=True)
+        new_cc_ids = list(set(user_ids_dict.values()))
+        update_filterrule = True
+      elif update.field == api_pb2_v1.ComponentUpdateFieldID.DEPRECATED:
+        new_deprecated = update.deprecated
+      else:
+        logging.error('Unknown component field %r', update.field)
+
+    new_modified = int(time.time())
+    new_modifier_id = self._services.user.LookupUserID(
+        mar.cnxn, mar.auth.email, autocreate=False)
+    logging.info(
+        'Updating component id %d: path-%s, docstring-%s, deprecated-%s,'
+        ' admin_ids-%s, cc_ids-%s modified by %s', component_def.component_id,
+        new_path, new_docstring, new_deprecated, new_admin_ids, new_cc_ids,
+        new_modifier_id)
+    self._services.config.UpdateComponentDef(
+        mar.cnxn, mar.project_id, component_def.component_id,
+        path=new_path, docstring=new_docstring, deprecated=new_deprecated,
+        admin_ids=new_admin_ids, cc_ids=new_cc_ids, modified=new_modified,
+        modifier_id=new_modifier_id)
+
+    # TODO(sheyang): reuse the code in componentdetails
+    if original_path != new_path:
+      # If the name changed then update all of its subcomponents as well.
+      subcomponent_ids = tracker_bizobj.FindMatchingComponentIDs(
+          original_path, config, exact=False)
+      for subcomponent_id in subcomponent_ids:
+        if subcomponent_id == component_def.component_id:
+          continue
+        subcomponent_def = tracker_bizobj.FindComponentDefByID(
+            subcomponent_id, config)
+        subcomponent_new_path = subcomponent_def.path.replace(
+            original_path, new_path, 1)
+        self._services.config.UpdateComponentDef(
+            mar.cnxn, mar.project_id, subcomponent_def.component_id,
+            path=subcomponent_new_path)
+
+    if update_filterrule:
+      filterrules_helpers.RecomputeAllDerivedFields(
+          mar.cnxn, self._services, mar.project, config)
+
+    return message_types.VoidMessage()
+
+
+@endpoints.api(name='monorail_client_configs', version='v1',
+               description='Monorail API client configs.')
+class ClientConfigApi(remote.Service):
+
+  # Class variables. Handy to mock.
+  _services = None
+  _mar = None
+
+  @classmethod
+  def _set_services(cls, services):
+    cls._services = services
+
+  def mar_factory(self, request, cnxn):
+    if not self._mar:
+      self._mar = monorailrequest.MonorailApiRequest(
+          request, self._services, cnxn=cnxn)
+    return self._mar
+
+  @endpoints.method(
+      message_types.VoidMessage,
+      message_types.VoidMessage,
+      path='client_configs',
+      http_method='POST',
+      name='client_configs.update')
+  def client_configs_update(self, request):
+    if self._services is None:
+      self._set_services(service_manager.set_up_services())
+    mar = self.mar_factory(request, sql.MonorailConnection())
+    if not mar.perms.HasPerm(permissions.ADMINISTER_SITE, None, None):
+      raise permissions.PermissionException(
+          'The requester %s is not allowed to update client configs.' %
+           mar.auth.email)
+
+    ROLE_DICT = {
+        1: permissions.COMMITTER_ROLE,
+        2: permissions.CONTRIBUTOR_ROLE,
+    }
+
+    client_config = client_config_svc.GetClientConfigSvc()
+
+    cfg = client_config.GetConfigs()
+    if not cfg:
+      msg = 'Failed to fetch client configs.'
+      logging.error(msg)
+      raise endpoints.InternalServerErrorException(msg)
+
+    for client in cfg.clients:
+      if not client.client_email:
+        continue
+      # 1: create the user if non-existent
+      user_id = self._services.user.LookupUserID(
+          mar.cnxn, client.client_email, autocreate=True)
+      user_pb = self._services.user.GetUser(mar.cnxn, user_id)
+
+      logging.info('User ID %d for email %s', user_id, client.client_email)
+
+      # 2: set period and lifetime limit
+      # new_soft_limit, new_hard_limit, new_lifetime_limit
+      new_limit_tuple = (
+          client.period_limit, client.period_limit, client.lifetime_limit)
+      action_limit_updates = {'api_request': new_limit_tuple}
+      self._services.user.UpdateUserSettings(
+          mar.cnxn, user_id, user_pb, action_limit_updates=action_limit_updates)
+
+      logging.info('Updated api request limit %r', new_limit_tuple)
+
+      # 3: Update project role and extra perms
+      projects_dict = self._services.project.GetAllProjects(mar.cnxn)
+      project_name_to_ids = {
+          p.project_name: p.project_id for p in projects_dict.values()}
+
+      # Set project role and extra perms
+      for perm in client.project_permissions:
+        project_ids = self._GetProjectIDs(perm.project, project_name_to_ids)
+        logging.info('Matching projects %r for name %s',
+                     project_ids, perm.project)
+
+        role = ROLE_DICT[perm.role]
+        for p_id in project_ids:
+          project = projects_dict[p_id]
+          people_list = []
+          if role == 'owner':
+            people_list = project.owner_ids
+          elif role == 'committer':
+            people_list = project.committer_ids
+          elif role == 'contributor':
+            people_list = project.contributor_ids
+          # Onlu update role/extra perms iff changed
+          if not user_id in people_list:
+            logging.info('Update project %s role %s for user %s',
+                         project.project_name, role, client.client_email)
+            owner_ids, committer_ids, contributor_ids = (
+                project_helpers.MembersWithGivenIDs(project, {user_id}, role))
+            self._services.project.UpdateProjectRoles(
+                mar.cnxn, p_id, owner_ids, committer_ids,
+                contributor_ids)
+          if perm.extra_permissions:
+            logging.info('Update project %s extra perm %s for user %s',
+                         project.project_name, perm.extra_permissions,
+                         client.client_email)
+            self._services.project.UpdateExtraPerms(
+                mar.cnxn, p_id, user_id, list(perm.extra_permissions))
+
+    mar.CleanUp()
+    return message_types.VoidMessage()
+
+  def _GetProjectIDs(self, project_str, project_name_to_ids):
+    result = []
+    if any(ch in project_str for ch in ['*', '+', '?', '.']):
+      pattern = re.compile(project_str)
+      for p_name in project_name_to_ids.keys():
+        if pattern.match(p_name):
+          project_id = project_name_to_ids.get(p_name)
+          if project_id:
+            result.append(project_id)
+    else:
+      project_id = project_name_to_ids.get(project_str)
+      if project_id:
+        result.append(project_id)
+
+    if not result:
+      logging.warning('Cannot find projects for specified name %s',
+                      project_str)
+    return result
diff --git a/services/cachemanager_svc.py b/services/cachemanager_svc.py
new file mode 100644
index 0000000..8dc5753
--- /dev/null
+++ b/services/cachemanager_svc.py
@@ -0,0 +1,166 @@
+# 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
+
+"""A simple in-RAM cache with distributed invalidation.
+
+Here's how it works:
+ + Each frontend or backend job has one CacheManager which
+   owns a set of RamCache objects, which are basically dictionaries.
+ + Each job can put objects in its own local cache, and retrieve them.
+ + When an item is modified, the item at the corresponding cache key
+   is invalidated, which means two things: (a) it is dropped from the
+   local RAM cache, and (b) the key is written to the Invalidate table.
+ + On each incoming request, the job checks the Invalidate table for
+   any entries added since the last time that it checked.  If it finds
+   any, it drops all RamCache entries for the corresponding key.
+ + There is also a cron task that truncates old Invalidate entries
+   when the table is too large.  If a frontend job sees more than the
+   max Invalidate rows, it will drop everything from all caches,
+   because it does not know what it missed due to truncation.
+ + The special key 0 means to drop all cache entries.
+
+This approach makes jobs use cached values that are not stale at the
+time that processing of each request begins.  There is no guarantee that
+an item will not be modified by some other job and that the cached entry
+could become stale during the lifetime of that same request.
+
+TODO(jrobbins): Listener hook so that client code can register its own
+handler for invalidation events.  E.g., the sorting code has a cache that
+is correctly invalidated on each issue change, but needs to be completely
+dropped when a config is modified.
+
+TODO(jrobbins): If this part of the system becomes a bottleneck, consider
+some optimizations: (a) splitting the table into multiple tables by
+kind, or (b) sharding the table by cache_key.  Or, maybe leverage memcache
+to avoid even hitting the DB in the frequent case where nothing has changed.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+
+from framework import jsonfeed
+from framework import sql
+
+
+INVALIDATE_TABLE_NAME = 'Invalidate'
+INVALIDATE_COLS = ['timestep', 'kind', 'cache_key']
+# Note: *_id invalidations should happen only when there's a change
+# in one of the values used to look up the internal ID number.
+# E.g. hotlist_id_2lc should only be invalidated when the hotlist
+# name or owner changes.
+INVALIDATE_KIND_VALUES = [
+    'user', 'usergroup', 'project', 'project_id', 'issue', 'issue_id',
+    'hotlist', 'hotlist_id', 'comment', 'template'
+]
+INVALIDATE_ALL_KEYS = 0
+MAX_INVALIDATE_ROWS_TO_CONSIDER = 1000
+
+
+class CacheManager(object):
+  """Service class to manage RAM caches and shared Invalidate table."""
+
+  def __init__(self):
+    self.cache_registry = collections.defaultdict(list)
+    self.processed_invalidations_up_to = 0
+    self.invalidate_tbl = sql.SQLTableManager(INVALIDATE_TABLE_NAME)
+
+  def RegisterCache(self, cache, kind):
+    """Register a cache to be notified of future invalidations."""
+    assert kind in INVALIDATE_KIND_VALUES
+    self.cache_registry[kind].append(cache)
+
+  def _InvalidateAllCaches(self):
+    """Invalidate all cache entries."""
+    for cache_list in self.cache_registry.values():
+      for cache in cache_list:
+        cache.LocalInvalidateAll()
+
+  def _ProcessInvalidationRows(self, rows):
+    """Invalidate cache entries indicated by database rows."""
+    already_done = set()
+    for timestep, kind, key in rows:
+      self.processed_invalidations_up_to = max(
+          self.processed_invalidations_up_to, timestep)
+      if (kind, key) in already_done:
+        continue
+      already_done.add((kind, key))
+      for cache in self.cache_registry[kind]:
+        if key == INVALIDATE_ALL_KEYS:
+          cache.LocalInvalidateAll()
+        else:
+          cache.LocalInvalidate(key)
+
+  def DoDistributedInvalidation(self, cnxn):
+    """Drop any cache entries that were invalidated by other jobs."""
+    # Only consider a reasonable number of rows so that we can never
+    # get bogged down on this step.  If there are too many rows to
+    # process, just invalidate all caches, and process the last group
+    # of rows to update processed_invalidations_up_to.
+    rows = self.invalidate_tbl.Select(
+        cnxn, cols=INVALIDATE_COLS,
+        where=[('timestep > %s', [self.processed_invalidations_up_to])],
+        order_by=[('timestep DESC', [])],
+        limit=MAX_INVALIDATE_ROWS_TO_CONSIDER)
+
+    cnxn.Commit()
+
+    if len(rows) == MAX_INVALIDATE_ROWS_TO_CONSIDER:
+      logging.info('Invaliditing all caches: there are too many invalidations')
+      self._InvalidateAllCaches()
+
+    logging.info('Saw %d invalidation rows', len(rows))
+    self._ProcessInvalidationRows(rows)
+
+  def StoreInvalidateRows(self, cnxn, kind, keys):
+    """Store rows to let all jobs know to invalidate the given keys."""
+    assert kind in INVALIDATE_KIND_VALUES
+    self.invalidate_tbl.InsertRows(
+        cnxn, ['kind', 'cache_key'], [(kind, key) for key in keys])
+
+  def StoreInvalidateAll(self, cnxn, kind):
+    """Store a value to tell all jobs to invalidate all items of this kind."""
+    last_timestep = self.invalidate_tbl.InsertRow(
+        cnxn, kind=kind, cache_key=INVALIDATE_ALL_KEYS)
+    self.invalidate_tbl.Delete(
+        cnxn, kind=kind, where=[('timestep < %s', [last_timestep])])
+
+
+class RamCacheConsolidate(jsonfeed.InternalTask):
+  """Drop old Invalidate rows when there are too many of them."""
+
+  def HandleRequest(self, mr):
+    """Drop excessive rows in the Invalidate table and return some stats.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+
+    Returns:
+      Results dictionary in JSON format.  The stats are just for debugging,
+      they are not used by any other part of the system.
+    """
+    tbl = self.services.cache_manager.invalidate_tbl
+    old_count = tbl.SelectValue(mr.cnxn, 'COUNT(*)')
+
+    # Delete anything other than the last 1000 rows because we won't
+    # look at them anyway.  If a job gets a request and sees 1000 new
+    # rows, it will drop all caches of all types, so it is as if there
+    # were INVALIDATE_ALL_KEYS entries.
+    if old_count > MAX_INVALIDATE_ROWS_TO_CONSIDER:
+      kept_timesteps = tbl.Select(
+        mr.cnxn, ['timestep'],
+        order_by=[('timestep DESC', [])],
+        limit=MAX_INVALIDATE_ROWS_TO_CONSIDER)
+      earliest_kept = kept_timesteps[-1][0]
+      tbl.Delete(mr.cnxn, where=[('timestep < %s', [earliest_kept])])
+
+    new_count = tbl.SelectValue(mr.cnxn, 'COUNT(*)')
+
+    return {
+      'old_count': old_count,
+      'new_count': new_count,
+      }
diff --git a/services/caches.py b/services/caches.py
new file mode 100644
index 0000000..07702bf
--- /dev/null
+++ b/services/caches.py
@@ -0,0 +1,514 @@
+# Copyright 2020 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.
+"""Classes to manage cached values.
+
+Monorail makes full use of the RAM of GAE frontends to reduce latency
+and load on the database.
+
+Even though these caches do invalidation, there are rare race conditions
+that can cause a somewhat stale object to be retrieved from memcache and
+then put into a RAM cache and used by a given GAE instance for some time.
+So, we only use these caches for operations that can tolerate somewhat
+stale data.  For example, displaying issues in a list or displaying brief
+info about related issues.  We never use the cache to load objects as
+part of a read-modify-save sequence because that could cause stored data
+to revert to a previous state.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import redis
+
+from protorpc import protobuf
+
+from google.appengine.api import memcache
+
+import settings
+from framework import framework_constants
+from framework import redis_utils
+from proto import tracker_pb2
+
+
+DEFAULT_MAX_SIZE = 10000
+
+
+class RamCache(object):
+  """An in-RAM cache with distributed invalidation."""
+
+  def __init__(self, cache_manager, kind, max_size=None):
+    self.cache_manager = cache_manager
+    self.kind = kind
+    self.cache = {}
+    self.max_size = max_size or DEFAULT_MAX_SIZE
+    cache_manager.RegisterCache(self, kind)
+
+  def CacheItem(self, key, item):
+    """Store item at key in this cache, discarding a random item if needed."""
+    if len(self.cache) >= self.max_size:
+      self.cache.popitem()
+
+    self.cache[key] = item
+
+  def CacheAll(self, new_item_dict):
+    """Cache all items in the given dict, dropping old items if needed."""
+    if len(new_item_dict) >= self.max_size:
+      logging.warn('Dumping the entire cache! %s', self.kind)
+      self.cache = {}
+    else:
+      while len(self.cache) + len(new_item_dict) > self.max_size:
+        self.cache.popitem()
+
+    self.cache.update(new_item_dict)
+
+  def GetItem(self, key):
+    """Return the cached item if present, otherwise None."""
+    return self.cache.get(key)
+
+  def HasItem(self, key):
+    """Return True if there is a value cached at the given key."""
+    return key in self.cache
+
+  def GetAll(self, keys):
+    """Look up the given keys.
+
+    Args:
+      keys: a list of cache keys to look up.
+
+    Returns:
+      A pair: (hits_dict, misses_list) where hits_dict is a dictionary of
+      all the given keys and the values that were found in the cache, and
+      misses_list is a list of given keys that were not in the cache.
+    """
+    hits, misses = {}, []
+    for key in keys:
+      try:
+        hits[key] = self.cache[key]
+      except KeyError:
+        misses.append(key)
+
+    return hits, misses
+
+  def LocalInvalidate(self, key):
+    """Drop the given key from this cache, without distributed notification."""
+    if key in self.cache:
+      logging.info('Locally invalidating %r in kind=%r', key, self.kind)
+    self.cache.pop(key, None)
+
+  def Invalidate(self, cnxn, key):
+    """Drop key locally, and append it to the Invalidate DB table."""
+    self.InvalidateKeys(cnxn, [key])
+
+  def InvalidateKeys(self, cnxn, keys):
+    """Drop keys locally, and append them to the Invalidate DB table."""
+    for key in keys:
+      self.LocalInvalidate(key)
+    if self.cache_manager:
+      self.cache_manager.StoreInvalidateRows(cnxn, self.kind, keys)
+
+  def LocalInvalidateAll(self):
+    """Invalidate all keys locally: just start over with an empty dict."""
+    logging.info('Locally invalidating all in kind=%r', self.kind)
+    self.cache = {}
+
+  def InvalidateAll(self, cnxn):
+    """Invalidate all keys in this cache."""
+    self.LocalInvalidateAll()
+    if self.cache_manager:
+      self.cache_manager.StoreInvalidateAll(cnxn, self.kind)
+
+
+class ShardedRamCache(RamCache):
+  """Specialized version of RamCache that stores values in parts.
+
+  Instead of the cache keys being simple integers, they are pairs, e.g.,
+  (project_id, shard_id).  Invalidation will invalidate all shards for
+  a given main key, e.g, invalidating project_id 16 will drop keys
+  (16, 0), (16, 1), (16, 2), ... (16, 9).
+  """
+
+  def __init__(self, cache_manager, kind, max_size=None, num_shards=10):
+    super(ShardedRamCache, self).__init__(
+        cache_manager, kind, max_size=max_size)
+    self.num_shards = num_shards
+
+  def LocalInvalidate(self, key):
+    """Use the specified value to drop entries from the local cache."""
+    logging.info('About to invalidate shared RAM keys %r',
+                 [(key, shard_id) for shard_id in range(self.num_shards)
+                  if (key, shard_id) in self.cache])
+    for shard_id in range(self.num_shards):
+      self.cache.pop((key, shard_id), None)
+
+
+class ValueCentricRamCache(RamCache):
+  """Specialized version of RamCache that stores values in InvalidateTable.
+
+  This is useful for caches that have non integer keys.
+  """
+
+  def LocalInvalidate(self, value):
+    """Use the specified value to drop entries from the local cache."""
+    keys_to_drop = []
+    # Loop through and collect all keys with the specified value.
+    for k, v in self.cache.items():
+      if v == value:
+        keys_to_drop.append(k)
+    for k in keys_to_drop:
+      self.cache.pop(k, None)
+
+  def InvalidateKeys(self, cnxn, keys):
+    """Drop keys locally, and append their values to the Invalidate DB table."""
+    # Find values to invalidate.
+    values = [self.cache[key] for key in keys if self.cache.has_key(key)]
+    if len(values) == len(keys):
+      for value in values:
+        self.LocalInvalidate(value)
+      if self.cache_manager:
+        self.cache_manager.StoreInvalidateRows(cnxn, self.kind, values)
+    else:
+      # If a value is not found in the cache then invalidate the whole cache.
+      # This is done to ensure that we are not in an inconsistent state or in a
+      # race condition.
+      self.InvalidateAll(cnxn)
+
+
+class AbstractTwoLevelCache(object):
+  """A class to manage both RAM and secondary-caching layer to retrieve objects.
+
+  Subclasses must implement the FetchItems() method to get objects from
+  the database when both caches miss.
+  """
+
+  # When loading a huge number of issues from the database, do it in chunks
+  # so as to avoid timeouts.
+  _FETCH_BATCH_SIZE = 10000
+
+  def __init__(
+      self,
+      cache_manager,
+      kind,
+      prefix,
+      pb_class,
+      max_size=None,
+      use_redis=False,
+      redis_client=None):
+
+    self.cache = self._MakeCache(cache_manager, kind, max_size=max_size)
+    self.prefix = prefix
+    self.pb_class = pb_class
+
+    if use_redis:
+      self.redis_client = redis_client or redis_utils.CreateRedisClient()
+      self.use_redis = redis_utils.VerifyRedisConnection(
+          self.redis_client, msg=kind)
+    else:
+      self.redis_client = None
+      self.use_redis = False
+
+  def _MakeCache(self, cache_manager, kind, max_size=None):
+    """Make the RAM cache and register it with the cache_manager."""
+    return RamCache(cache_manager, kind, max_size=max_size)
+
+  def CacheItem(self, key, value):
+    """Add the given key-value pair to RAM and L2 cache."""
+    self.cache.CacheItem(key, value)
+    self._WriteToCache({key: value})
+
+  def HasItem(self, key):
+    """Return True if the given key is in the RAM cache."""
+    return self.cache.HasItem(key)
+
+  def GetAnyOnHandItem(self, keys, start=None, end=None):
+    """Try to find one of the specified items in RAM."""
+    if start is None:
+      start = 0
+    if end is None:
+      end = len(keys)
+    for i in range(start, end):
+      key = keys[i]
+      if self.cache.HasItem(key):
+        return self.cache.GetItem(key)
+
+    # Note: We could check L2 here too, but the round-trips to L2
+    # are kind of slow. And, getting too many hits from L2 actually
+    # fills our RAM cache too quickly and could lead to thrashing.
+
+    return None
+
+  def GetAll(self, cnxn, keys, use_cache=True, **kwargs):
+    """Get values for the given keys from RAM, the L2 cache, or the DB.
+
+    Args:
+      cnxn: connection to the database.
+      keys: list of integer keys to look up.
+      use_cache: set to False to always hit the database.
+      **kwargs: any additional keywords are passed to FetchItems().
+
+    Returns:
+      A pair: hits, misses.  Where hits is {key: value} and misses is
+        a list of any keys that were not found anywhere.
+    """
+    if use_cache:
+      result_dict, missed_keys = self.cache.GetAll(keys)
+    else:
+      result_dict, missed_keys = {}, list(keys)
+
+    if missed_keys:
+      if use_cache:
+        cache_hits, missed_keys = self._ReadFromCache(missed_keys)
+        result_dict.update(cache_hits)
+        self.cache.CacheAll(cache_hits)
+
+    while missed_keys:
+      missed_batch = missed_keys[:self._FETCH_BATCH_SIZE]
+      missed_keys = missed_keys[self._FETCH_BATCH_SIZE:]
+      retrieved_dict = self.FetchItems(cnxn, missed_batch, **kwargs)
+      result_dict.update(retrieved_dict)
+      if use_cache:
+        self.cache.CacheAll(retrieved_dict)
+        self._WriteToCache(retrieved_dict)
+
+    still_missing_keys = [key for key in keys if key not in result_dict]
+    return result_dict, still_missing_keys
+
+  def LocalInvalidateAll(self):
+    self.cache.LocalInvalidateAll()
+
+  def LocalInvalidate(self, key):
+    self.cache.LocalInvalidate(key)
+
+  def InvalidateKeys(self, cnxn, keys):
+    """Drop the given keys from both RAM and L2 cache."""
+    self.cache.InvalidateKeys(cnxn, keys)
+    self._DeleteFromCache(keys)
+
+  def InvalidateAllKeys(self, cnxn, keys):
+    """Drop the given keys from L2 cache and invalidate all keys in RAM.
+
+    Useful for avoiding inserting many rows into the Invalidate table when
+    invalidating a large group of keys all at once. Only use when necessary.
+    """
+    self.cache.InvalidateAll(cnxn)
+    self._DeleteFromCache(keys)
+
+  def GetAllAlreadyInRam(self, keys):
+    """Look only in RAM to return {key: values}, missed_keys."""
+    result_dict, missed_keys = self.cache.GetAll(keys)
+    return result_dict, missed_keys
+
+  def InvalidateAllRamEntries(self, cnxn):
+    """Drop all RAM cache entries. It will refill as needed from L2 cache."""
+    self.cache.InvalidateAll(cnxn)
+
+  def FetchItems(self, cnxn, keys, **kwargs):
+    """On RAM and L2 cache miss, hit the database."""
+    raise NotImplementedError()
+
+  def _ReadFromCache(self, keys):
+    # type: (Sequence[int]) -> Mapping[str, Any], Sequence[int]
+    """Reads a list of keys from secondary caching service.
+
+    Redis will be used if Redis is enabled and connection is valid;
+    otherwise, memcache will be used.
+
+    Args:
+      keys: List of integer keys to look up in L2 cache.
+
+    Returns:
+      A pair: hits, misses.  Where hits is {key: value} and misses is
+        a list of any keys that were not found anywhere.
+    """
+    if self.use_redis:
+      return self._ReadFromRedis(keys)
+    else:
+      return self._ReadFromMemcache(keys)
+
+  def _WriteToCache(self, retrieved_dict):
+    # type: (Mapping[int, Any]) -> None
+    """Writes a set of key-value pairs to secondary caching service.
+
+    Redis will be used if Redis is enabled and connection is valid;
+    otherwise, memcache will be used.
+
+    Args:
+      retrieved_dict: Dictionary contains pairs of key-values to write to cache.
+    """
+    if self.use_redis:
+      return self._WriteToRedis(retrieved_dict)
+    else:
+      return self._WriteToMemcache(retrieved_dict)
+
+  def _DeleteFromCache(self, keys):
+    # type: (Sequence[int]) -> None
+    """Selects which cache to delete from.
+
+    Redis will be used if Redis is enabled and connection is valid;
+    otherwise, memcache will be used.
+
+    Args:
+      keys: List of integer keys to delete from cache.
+    """
+    if self.use_redis:
+      return self._DeleteFromRedis(keys)
+    else:
+      return self._DeleteFromMemcache(keys)
+
+  def _ReadFromMemcache(self, keys):
+    # type: (Sequence[int]) -> Mapping[str, Any], Sequence[int]
+    """Read the given keys from memcache, return {key: value}, missing_keys."""
+    cache_hits = {}
+    cached_dict = memcache.get_multi(
+        [self._KeyToStr(key) for key in keys],
+        key_prefix=self.prefix,
+        namespace=settings.memcache_namespace)
+
+    for key_str, serialized_value in cached_dict.items():
+      value = self._StrToValue(serialized_value)
+      key = self._StrToKey(key_str)
+      cache_hits[key] = value
+      self.cache.CacheItem(key, value)
+
+    still_missing_keys = [key for key in keys if key not in cache_hits]
+    return cache_hits, still_missing_keys
+
+  def _WriteToMemcache(self, retrieved_dict):
+    # type: (Mapping[int, int]) -> None
+    """Write entries for each key-value pair to memcache.  Encode PBs."""
+    strs_to_cache = {
+        self._KeyToStr(key): self._ValueToStr(value)
+        for key, value in retrieved_dict.items()}
+
+    try:
+      memcache.add_multi(
+          strs_to_cache,
+          key_prefix=self.prefix,
+          time=framework_constants.CACHE_EXPIRATION,
+          namespace=settings.memcache_namespace)
+    except ValueError as identifier:
+      # If memcache does not accept the values, ensure that no stale
+      # values are left, then bail out.
+      logging.error('Got memcache error: %r', identifier)
+      self._DeleteFromMemcache(list(strs_to_cache.keys()))
+      return
+
+  def _DeleteFromMemcache(self, keys):
+    # type: (Sequence[str]) -> None
+    """Delete key-values from memcache. """
+    memcache.delete_multi(
+        [self._KeyToStr(key) for key in keys],
+        seconds=5,
+        key_prefix=self.prefix,
+        namespace=settings.memcache_namespace)
+
+  def _WriteToRedis(self, retrieved_dict):
+    # type: (Mapping[int, Any]) -> None
+    """Write entries for each key-value pair to Redis.  Encode PBs.
+
+    Args:
+      retrieved_dict: Dictionary of key-value pairs to write to Redis.
+    """
+    try:
+      for key, value in retrieved_dict.items():
+        redis_key = redis_utils.FormatRedisKey(key, prefix=self.prefix)
+        redis_value = self._ValueToStr(value)
+
+        self.redis_client.setex(
+            redis_key, framework_constants.CACHE_EXPIRATION, redis_value)
+    except redis.RedisError as identifier:
+      logging.error(
+          'Redis error occurred during write operation: %s', identifier)
+      self._DeleteFromRedis(list(retrieved_dict.keys()))
+      return
+    logging.info(
+        'cached batch of %d values in redis %s', len(retrieved_dict),
+        self.prefix)
+
+  def _ReadFromRedis(self, keys):
+    # type: (Sequence[int]) -> Mapping[str, Any], Sequence[int]
+    """Read the given keys from Redis, return {key: value}, missing keys.
+
+    Args:
+      keys: List of integer keys to read from Redis.
+
+    Returns:
+      A pair: hits, misses.  Where hits is {key: value} and misses is
+        a list of any keys that were not found anywhere.
+    """
+    cache_hits = {}
+    missing_keys = []
+    try:
+      values_list = self.redis_client.mget(
+          [redis_utils.FormatRedisKey(key, prefix=self.prefix) for key in keys])
+    except redis.RedisError as identifier:
+      logging.error(
+          'Redis error occurred during read operation: %s', identifier)
+      values_list = [None] * len(keys)
+
+    for key, serialized_value in zip(keys, values_list):
+      if serialized_value:
+        value = self._StrToValue(serialized_value)
+        cache_hits[key] = value
+        self.cache.CacheItem(key, value)
+      else:
+        missing_keys.append(key)
+    logging.info(
+        'decoded %d values from redis %s, missing %d', len(cache_hits),
+        self.prefix, len(missing_keys))
+    return cache_hits, missing_keys
+
+  def _DeleteFromRedis(self, keys):
+    # type: (Sequence[int]) -> None
+    """Delete key-values from redis.
+
+    Args:
+      keys: List of integer keys to delete.
+    """
+    try:
+      self.redis_client.delete(
+          *[
+              redis_utils.FormatRedisKey(key, prefix=self.prefix)
+              for key in keys
+          ])
+    except redis.RedisError as identifier:
+      logging.error(
+          'Redis error occurred during delete operation %s', identifier)
+
+  def _KeyToStr(self, key):
+    # type: (int) -> str
+    """Convert our int IDs to strings for use as memcache keys."""
+    return str(key)
+
+  def _StrToKey(self, key_str):
+    # type: (str) -> int
+    """Convert memcache keys back to the ints that we use as IDs."""
+    return int(key_str)
+
+  def _ValueToStr(self, value):
+    # type: (Any) -> str
+    """Serialize an application object so that it can be stored in L2 cache."""
+    if self.use_redis:
+      return redis_utils.SerializeValue(value, pb_class=self.pb_class)
+    else:
+      if not self.pb_class:
+        return value
+      elif self.pb_class == int:
+        return str(value)
+      else:
+        return protobuf.encode_message(value)
+
+  def _StrToValue(self, serialized_value):
+    # type: (str) -> Any
+    """Deserialize L2 cache string into an application object."""
+    if self.use_redis:
+      return redis_utils.DeserializeValue(
+          serialized_value, pb_class=self.pb_class)
+    else:
+      if not self.pb_class:
+        return serialized_value
+      elif self.pb_class == int:
+        return int(serialized_value)
+      else:
+        return protobuf.decode_message(self.pb_class, serialized_value)
diff --git a/services/chart_svc.py b/services/chart_svc.py
new file mode 100644
index 0000000..49ccb51
--- /dev/null
+++ b/services/chart_svc.py
@@ -0,0 +1,411 @@
+# Copyright 2018 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
+
+"""A service for querying data for charts.
+
+Functions for querying the IssueSnapshot table and associated join tables.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import settings
+import time
+
+from features import hotlist_helpers
+from framework import framework_helpers
+from framework import sql
+from search import search_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_helpers
+from search import query2ast
+from search import ast2select
+from search import ast2ast
+
+
+ISSUESNAPSHOT_TABLE_NAME = 'IssueSnapshot'
+ISSUESNAPSHOT2CC_TABLE_NAME = 'IssueSnapshot2Cc'
+ISSUESNAPSHOT2COMPONENT_TABLE_NAME = 'IssueSnapshot2Component'
+ISSUESNAPSHOT2LABEL_TABLE_NAME = 'IssueSnapshot2Label'
+
+ISSUESNAPSHOT_COLS = ['id', 'issue_id', 'shard', 'project_id', 'local_id',
+    'reporter_id', 'owner_id', 'status_id', 'period_start', 'period_end',
+    'is_open']
+ISSUESNAPSHOT2CC_COLS = ['issuesnapshot_id', 'cc_id']
+ISSUESNAPSHOT2COMPONENT_COLS = ['issuesnapshot_id', 'component_id']
+ISSUESNAPSHOT2LABEL_COLS = ['issuesnapshot_id', 'label_id']
+
+
+class ChartService(object):
+  """Class for querying chart data."""
+
+  def __init__(self, config_service):
+    """Constructor for ChartService.
+
+    Args:
+      config_service (ConfigService): An instance of ConfigService.
+    """
+    self.config_service = config_service
+
+    # Set up SQL table objects.
+    self.issuesnapshot_tbl = sql.SQLTableManager(ISSUESNAPSHOT_TABLE_NAME)
+    self.issuesnapshot2cc_tbl = sql.SQLTableManager(
+        ISSUESNAPSHOT2CC_TABLE_NAME)
+    self.issuesnapshot2component_tbl = sql.SQLTableManager(
+        ISSUESNAPSHOT2COMPONENT_TABLE_NAME)
+    self.issuesnapshot2label_tbl = sql.SQLTableManager(
+        ISSUESNAPSHOT2LABEL_TABLE_NAME)
+
+  def QueryIssueSnapshots(self, cnxn, services, unixtime, effective_ids,
+                          project, perms, group_by=None, label_prefix=None,
+                          query=None, canned_query=None, hotlist=None):
+    """Queries historical issue counts grouped by label or component.
+
+    Args:
+      cnxn: A MonorailConnection instance.
+      services: A Services instance.
+      unixtime: An integer representing the Unix time in seconds.
+      effective_ids: The effective User IDs associated with the current user.
+      project: A project object representing the current project.
+      perms: A permissions object associated with the current user.
+      group_by (str, optional): Which dimension to group by. Values can
+        be 'label', 'component', or None, in which case no grouping will
+        be applied.
+      label_prefix: Required when group_by is 'label.' Will limit the query to
+        only labels with the specified prefix (for example 'Pri').
+      query (str, optional): A query string from the request to apply to
+        the snapshot query.
+      canned_query (str, optional): Parsed canned query applied to the query
+        scope.
+      hotlist (Hotlist, optional): Hotlist to search under (in lieu of project).
+
+    Returns:
+      1. A dict of {'2nd dimension or "total"': number of occurences}.
+      2. A list of any unsupported query conditions in query.
+      3. A boolean that is true if any results were capped.
+    """
+    if hotlist:
+      # TODO(jeffcarp): Get project_ids in a more efficient manner. We can
+      #   query for "SELECT DISTINCT(project_id)" for all issues in hotlist.
+      issues_list = services.issue.GetIssues(cnxn,
+          [hotlist_issue.issue_id for hotlist_issue in hotlist.items])
+      hotlist_issues_project_ids = hotlist_helpers.GetAllProjectsOfIssues(
+          [issue for issue in issues_list])
+      config_list = hotlist_helpers.GetAllConfigsOfProjects(
+          cnxn, hotlist_issues_project_ids, services)
+      project_config = tracker_bizobj.HarmonizeConfigs(config_list)
+    else:
+      project_config = services.config.GetProjectConfig(cnxn,
+          project.project_id)
+
+    if project:
+      project_ids = [project.project_id]
+    else:
+      project_ids = hotlist_issues_project_ids
+
+    try:
+      query_left_joins, query_where, unsupported_conds = self._QueryToWhere(
+          cnxn, services, project_config, query, canned_query, project_ids)
+    except ast2select.NoPossibleResults:
+      return {}, ['Invalid query.'], False
+
+    restricted_label_ids = search_helpers.GetPersonalAtRiskLabelIDs(
+      cnxn, None, self.config_service, effective_ids, project, perms)
+
+    left_joins = [
+      ('Issue ON IssueSnapshot.issue_id = Issue.id', []),
+    ]
+
+    if restricted_label_ids:
+      left_joins.append(
+        (('Issue2Label AS Forbidden_label'
+          ' ON Issue.id = Forbidden_label.issue_id'
+          ' AND Forbidden_label.label_id IN (%s)' % (
+            sql.PlaceHolders(restricted_label_ids)
+        )), restricted_label_ids))
+
+    if effective_ids:
+      left_joins.append(
+        ('Issue2Cc AS I2cc'
+         ' ON Issue.id = I2cc.issue_id'
+         ' AND I2cc.cc_id IN (%s)' % sql.PlaceHolders(effective_ids),
+         effective_ids))
+
+    # TODO(jeffcarp): Handle case where there are issues with no labels.
+    where = [
+      ('IssueSnapshot.period_start <= %s', [unixtime]),
+      ('IssueSnapshot.period_end > %s', [unixtime]),
+      ('Issue.is_spam = %s', [False]),
+      ('Issue.deleted = %s', [False]),
+    ]
+    if project_ids:
+      where.append(
+        ('IssueSnapshot.project_id IN (%s)' % sql.PlaceHolders(project_ids),
+          project_ids))
+
+    forbidden_label_clause = 'Forbidden_label.label_id IS NULL'
+    if effective_ids:
+      if restricted_label_ids:
+        forbidden_label_clause = ' OR %s' % forbidden_label_clause
+      else:
+        forbidden_label_clause =  ''
+
+      where.append(
+        ((
+          '(Issue.reporter_id IN (%s)'
+          ' OR Issue.owner_id IN (%s)'
+          ' OR I2cc.cc_id IS NOT NULL'
+          '%s)'
+        ) % (
+          sql.PlaceHolders(effective_ids), sql.PlaceHolders(effective_ids),
+          forbidden_label_clause
+        ),
+          list(effective_ids) + list(effective_ids)
+        ))
+    else:
+      where.append((forbidden_label_clause, []))
+
+    if group_by == 'component':
+      cols = ['Comp.path', 'COUNT(IssueSnapshot.issue_id)']
+      left_joins.extend([
+        (('IssueSnapshot2Component AS Is2c ON'
+          ' Is2c.issuesnapshot_id = IssueSnapshot.id'), []),
+        ('ComponentDef AS Comp ON Comp.id = Is2c.component_id', []),
+      ])
+      group_by = ['Comp.path']
+    elif group_by == 'label':
+      cols = ['Lab.label', 'COUNT(IssueSnapshot.issue_id)']
+      left_joins.extend([
+        (('IssueSnapshot2Label AS Is2l'
+          ' ON Is2l.issuesnapshot_id = IssueSnapshot.id'), []),
+        ('LabelDef AS Lab ON Lab.id = Is2l.label_id', []),
+      ])
+
+      if not label_prefix:
+        raise ValueError('`label_prefix` required when grouping by label.')
+
+      # TODO(jeffcarp): If LookupIDsOfLabelsMatching() is called on output,
+      # ensure regex is case-insensitive.
+      where.append(('LOWER(Lab.label) LIKE %s', [label_prefix.lower() + '-%']))
+      group_by = ['Lab.label']
+    elif group_by == 'open':
+      cols = ['IssueSnapshot.is_open',
+        'COUNT(IssueSnapshot.issue_id) AS issue_count']
+      group_by = ['IssueSnapshot.is_open']
+    elif group_by == 'status':
+      left_joins.append(('StatusDef AS Stats ON ' \
+        'Stats.id = IssueSnapshot.status_id', []))
+      cols = ['Stats.status', 'COUNT(IssueSnapshot.issue_id)']
+      group_by = ['Stats.status']
+    elif group_by == 'owner':
+      cols = ['IssueSnapshot.owner_id', 'COUNT(IssueSnapshot.issue_id)']
+      group_by = ['IssueSnapshot.owner_id']
+    elif not group_by:
+      cols = ['IssueSnapshot.issue_id']
+    else:
+      raise ValueError('`group_by` must be label, component, ' \
+        'open, status, owner or None.')
+
+    if query_left_joins:
+      left_joins.extend(query_left_joins)
+
+    if query_where:
+      where.extend(query_where)
+
+    if hotlist:
+      left_joins.extend([
+        (('IssueSnapshot2Hotlist AS Is2h'
+          ' ON Is2h.issuesnapshot_id = IssueSnapshot.id'
+          ' AND Is2h.hotlist_id = %s'), [hotlist.hotlist_id]),
+      ])
+      where.append(
+        ('Is2h.hotlist_id = %s', [hotlist.hotlist_id]))
+
+    promises = []
+
+    for shard_id in range(settings.num_logical_shards):
+      count_stmt, stmt_args = self._BuildSnapshotQuery(cols=cols,
+          where=where, joins=left_joins, group_by=group_by,
+          shard_id=shard_id)
+      promises.append(framework_helpers.Promise(cnxn.Execute,
+          count_stmt, stmt_args, shard_id=shard_id))
+
+    shard_values_dict = {}
+
+    search_limit_reached = False
+
+    for promise in promises:
+      # Wait for each query to complete and add it to the dict.
+      shard_values = list(promise.WaitAndGetValue())
+
+      if not shard_values:
+        continue
+      if group_by:
+        for name, count in shard_values:
+          if count >= settings.chart_query_max_rows:
+            search_limit_reached = True
+
+          shard_values_dict.setdefault(name, 0)
+          shard_values_dict[name] += count
+      else:
+        if shard_values[0][0] >= settings.chart_query_max_rows:
+            search_limit_reached = True
+
+        shard_values_dict.setdefault('total', 0)
+        shard_values_dict['total'] += shard_values[0][0]
+
+    unsupported_field_names = list(set([
+        field.field_name
+        for cond in unsupported_conds
+        for field in cond.field_defs
+    ]))
+
+    return shard_values_dict, unsupported_field_names, search_limit_reached
+
+  def StoreIssueSnapshots(self, cnxn, issues, commit=True):
+    """Adds an IssueSnapshot and updates the previous one for each issue."""
+    for issue in issues:
+      right_now = self._currentTime()
+
+      # Update previous snapshot of current issue's end time to right now.
+      self.issuesnapshot_tbl.Update(cnxn,
+          delta={'period_end': right_now},
+          where=[('IssueSnapshot.issue_id = %s', [issue.issue_id]),
+            ('IssueSnapshot.period_end = %s',
+              [settings.maximum_snapshot_period_end])],
+          commit=commit)
+
+      config = self.config_service.GetProjectConfig(cnxn, issue.project_id)
+      period_end = settings.maximum_snapshot_period_end
+      is_open = tracker_helpers.MeansOpenInProject(
+        tracker_bizobj.GetStatus(issue), config)
+      shard = issue.issue_id % settings.num_logical_shards
+      status = tracker_bizobj.GetStatus(issue)
+      status_id = self.config_service.LookupStatusID(
+          cnxn, issue.project_id, status) or None
+      owner_id = tracker_bizobj.GetOwnerId(issue) or None
+
+      issuesnapshot_rows = [(issue.issue_id, shard, issue.project_id,
+        issue.local_id, issue.reporter_id, owner_id, status_id, right_now,
+        period_end, is_open)]
+
+      ids = self.issuesnapshot_tbl.InsertRows(
+          cnxn, ISSUESNAPSHOT_COLS[1:],
+          issuesnapshot_rows,
+          replace=True, commit=commit,
+          return_generated_ids=True)
+      issuesnapshot_id = ids[0]
+
+      # Add all labels to IssueSnapshot2Label.
+      label_rows = [
+          (issuesnapshot_id,
+           self.config_service.LookupLabelID(cnxn, issue.project_id, label))
+          for label in tracker_bizobj.GetLabels(issue)
+      ]
+      self.issuesnapshot2label_tbl.InsertRows(
+          cnxn, ISSUESNAPSHOT2LABEL_COLS,
+          label_rows, replace=True, commit=commit)
+
+      # Add all CCs to IssueSnapshot2Cc.
+      cc_rows = [
+        (issuesnapshot_id, cc_id)
+        for cc_id in tracker_bizobj.GetCcIds(issue)
+      ]
+      self.issuesnapshot2cc_tbl.InsertRows(
+          cnxn, ISSUESNAPSHOT2CC_COLS,
+          cc_rows,
+          replace=True, commit=commit)
+
+      # Add all components to IssueSnapshot2Component.
+      component_rows = [
+        (issuesnapshot_id, component_id)
+        for component_id in issue.component_ids
+      ]
+      self.issuesnapshot2component_tbl.InsertRows(
+          cnxn, ISSUESNAPSHOT2COMPONENT_COLS,
+          component_rows,
+          replace=True, commit=commit)
+
+      # Add all components to IssueSnapshot2Hotlist.
+      # This is raw SQL to obviate passing FeaturesService down through
+      #   the call stack wherever this function is called.
+      # TODO(jrobbins): sort out dependencies between service classes.
+      cnxn.Execute('''
+        INSERT INTO IssueSnapshot2Hotlist (issuesnapshot_id, hotlist_id)
+        SELECT %s, hotlist_id FROM Hotlist2Issue WHERE issue_id = %s
+      ''', [issuesnapshot_id, issue.issue_id])
+
+  def ExpungeHotlistsFromIssueSnapshots(self, cnxn, hotlist_ids, commit=True):
+    """Expunge the existence of hotlists from issue snapshots.
+
+    Args:
+      cnxn: connection to SQL database.
+      hotlist_ids: list of hotlist_ids for hotlists we want to delete.
+      commit: set to False to skip the DB commit and do it in a caller.
+    """
+    vals_ph = sql.PlaceHolders(hotlist_ids)
+    cnxn.Execute(
+        'DELETE FROM IssueSnapshot2Hotlist '
+        'WHERE hotlist_id IN ({vals_ph})'.format(vals_ph=vals_ph),
+        hotlist_ids,
+        commit=commit)
+
+  def _currentTime(self):
+    """This is a separate method so it can be mocked by tests."""
+    return time.time()
+
+  def _QueryToWhere(self, cnxn, services, project_config, query, canned_query,
+                    project_ids):
+    """Parses a query string into LEFT JOIN and WHERE conditions.
+
+    Args:
+      cnxn: A MonorailConnection instance.
+      services: A Services instance.
+      project_config: The configuration for the given project.
+      query (string): The query to parse.
+      canned_query (string): The supplied canned query.
+      project_ids: The current project ID(s).
+
+    Returns:
+      1. A list of LEFT JOIN clauses for the SQL query.
+      2. A list of WHERE clases for the SQL query.
+      3. A list of query conditions that are unsupported with snapshots.
+    """
+    if not (query or canned_query):
+      return [], [], []
+
+    query = query or ''
+    scope = canned_query or ''
+
+    query_ast = query2ast.ParseUserQuery(query, scope,
+        query2ast.BUILTIN_ISSUE_FIELDS, project_config)
+    query_ast = ast2ast.PreprocessAST(cnxn, query_ast, project_ids,
+        services, project_config)
+    left_joins, where, unsupported = ast2select.BuildSQLQuery(query_ast,
+        snapshot_mode=True)
+
+    return left_joins, where, unsupported
+
+  def _BuildSnapshotQuery(self, cols, where, joins, group_by, shard_id):
+    """Given SQL arguments, executes a snapshot COUNT query."""
+    stmt = sql.Statement.MakeSelect('IssueSnapshot', cols, distinct=True)
+    stmt.AddJoinClauses(joins, left=True)
+    stmt.AddWhereTerms(where + [('IssueSnapshot.shard = %s', [shard_id])])
+    if group_by:
+      stmt.AddGroupByTerms(group_by)
+    stmt.SetLimitAndOffset(limit=settings.chart_query_max_rows, offset=0)
+    stmt_str, stmt_args = stmt.Generate()
+    if group_by:
+      if group_by[0] == 'IssueSnapshot.is_open':
+        count_stmt = ('SELECT IF(results.is_open = 1, "Opened", "Closed") ' \
+          'AS bool_open, results.issue_count ' \
+          'FROM (%s) AS results' % stmt_str)
+      else:
+        count_stmt = stmt_str
+    else:
+      count_stmt = 'SELECT COUNT(results.issue_id) FROM (%s) AS results' % (
+        stmt_str)
+    return count_stmt, stmt_args
diff --git a/services/client_config_svc.py b/services/client_config_svc.py
new file mode 100644
index 0000000..c0acf03
--- /dev/null
+++ b/services/client_config_svc.py
@@ -0,0 +1,236 @@
+# 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import base64
+import json
+import logging
+import os
+import time
+import urllib
+import webapp2
+
+from google.appengine.api import app_identity
+from google.appengine.api import urlfetch
+from google.appengine.ext import db
+from google.protobuf import text_format
+
+from infra_libs import ts_mon
+
+import settings
+from framework import framework_constants
+from proto import api_clients_config_pb2
+
+
+CONFIG_FILE_PATH = os.path.join(
+    os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
+    'testing', 'api_clients.cfg')
+LUCI_CONFIG_URL = (
+    'https://luci-config.appspot.com/_ah/api/config/v1/config_sets'
+    '/services/monorail-prod/config/api_clients.cfg')
+
+
+client_config_svc = None
+service_account_map = None
+qpm_dict = None
+allowed_origins_set = None
+
+
+class ClientConfig(db.Model):
+  configs = db.TextProperty()
+
+
+# Note: The cron job must have hit the servlet before this will work.
+class LoadApiClientConfigs(webapp2.RequestHandler):
+
+  config_loads = ts_mon.CounterMetric(
+      'monorail/client_config_svc/loads',
+      'Results of fetches from luci-config.',
+      [ts_mon.BooleanField('success'), ts_mon.StringField('type')])
+
+  def get(self):
+    global service_account_map
+    global qpm_dict
+    authorization_token, _ = app_identity.get_access_token(
+      framework_constants.OAUTH_SCOPE)
+    response = urlfetch.fetch(
+      LUCI_CONFIG_URL,
+      method=urlfetch.GET,
+      follow_redirects=False,
+      headers={'Content-Type': 'application/json; charset=UTF-8',
+              'Authorization': 'Bearer ' + authorization_token})
+
+    if response.status_code != 200:
+      logging.error('Invalid response from luci-config: %r', response)
+      self.config_loads.increment({'success': False, 'type': 'luci-cfg-error'})
+      self.abort(500, 'Invalid response from luci-config')
+
+    try:
+      content_text = self._process_response(response)
+    except Exception as e:
+      self.abort(500, str(e))
+
+    logging.info('luci-config content decoded: %r.', content_text)
+    configs = ClientConfig(configs=content_text,
+                            key_name='api_client_configs')
+    configs.put()
+    service_account_map = None
+    qpm_dict = None
+    self.config_loads.increment({'success': True, 'type': 'success'})
+
+  def _process_response(self, response):
+    try:
+      content = json.loads(response.content)
+    except ValueError:
+      logging.error('Response was not JSON: %r', response.content)
+      self.config_loads.increment({'success': False, 'type': 'json-load-error'})
+      raise
+
+    try:
+      config_content = content['content']
+    except KeyError:
+      logging.error('JSON contained no content: %r', content)
+      self.config_loads.increment({'success': False, 'type': 'json-key-error'})
+      raise
+
+    try:
+      content_text = base64.b64decode(config_content)
+    except TypeError:
+      logging.error('Content was not b64: %r', config_content)
+      self.config_loads.increment({'success': False,
+                                   'type': 'b64-decode-error'})
+      raise
+
+    try:
+      cfg = api_clients_config_pb2.ClientCfg()
+      text_format.Merge(content_text, cfg)
+    except:
+      logging.error('Content was not a valid ClientCfg proto: %r', content_text)
+      self.config_loads.increment({'success': False,
+                                   'type': 'proto-load-error'})
+      raise
+
+    return content_text
+
+
+class ClientConfigService(object):
+  """The persistence layer for client config data."""
+
+  # Reload no more than once every 15 minutes.
+  # Different GAE instances can load it at different times,
+  # so clients may get inconsistence responses shortly after allowlisting.
+  EXPIRES_IN = 15 * framework_constants.SECS_PER_MINUTE
+
+  def __init__(self):
+    self.client_configs = None
+    self.load_time = 0
+
+  def GetConfigs(self, use_cache=True, cur_time=None):
+    """Read client configs."""
+
+    cur_time = cur_time or int(time.time())
+    force_load = False
+    if not self.client_configs:
+      force_load = True
+    elif not use_cache:
+      force_load = True
+    elif cur_time - self.load_time > self.EXPIRES_IN:
+      force_load = True
+
+    if force_load:
+      if settings.local_mode or settings.unit_test_mode:
+        self._ReadFromFilesystem()
+      else:
+        self._ReadFromDatastore()
+
+    return self.client_configs
+
+  def _ReadFromFilesystem(self):
+    try:
+      with open(CONFIG_FILE_PATH, 'r') as f:
+        content_text = f.read()
+      logging.info('Read client configs from local file.')
+      cfg = api_clients_config_pb2.ClientCfg()
+      text_format.Merge(content_text, cfg)
+      self.client_configs = cfg
+      self.load_time = int(time.time())
+    except Exception as e:
+      logging.exception('Failed to read client configs: %s', e)
+
+  def _ReadFromDatastore(self):
+    entity = ClientConfig.get_by_key_name('api_client_configs')
+    if entity:
+      cfg = api_clients_config_pb2.ClientCfg()
+      text_format.Merge(entity.configs, cfg)
+      self.client_configs = cfg
+      self.load_time = int(time.time())
+    else:
+      logging.error('Failed to get api client configs from datastore.')
+
+  def GetClientIDEmails(self):
+    """Get client IDs and Emails."""
+    self.GetConfigs(use_cache=True)
+    client_ids = [c.client_id for c in self.client_configs.clients]
+    client_emails = [c.client_email for c in self.client_configs.clients]
+    return client_ids, client_emails
+
+  def GetDisplayNames(self):
+    """Get client display names."""
+    self.GetConfigs(use_cache=True)
+    names_dict = {}
+    for client in self.client_configs.clients:
+      if client.display_name:
+        names_dict[client.client_email] = client.display_name
+    return names_dict
+
+  def GetQPM(self):
+    """Get client qpm limit."""
+    self.GetConfigs(use_cache=True)
+    qpm_map = {}
+    for client in self.client_configs.clients:
+      if client.HasField('qpm_limit'):
+        qpm_map[client.client_email] = client.qpm_limit
+    return qpm_map
+
+  def GetAllowedOriginsSet(self):
+    """Get the set of all allowed origins."""
+    self.GetConfigs(use_cache=True)
+    origins = set()
+    for client in self.client_configs.clients:
+      origins.update(client.allowed_origins)
+    return origins
+
+
+def GetClientConfigSvc():
+  global client_config_svc
+  if client_config_svc is None:
+    client_config_svc = ClientConfigService()
+  return client_config_svc
+
+
+def GetServiceAccountMap():
+  # typ: () -> Mapping[str, str]
+  """Returns only service accounts that have specified display_names."""
+  global service_account_map
+  if service_account_map is None:
+    service_account_map = GetClientConfigSvc().GetDisplayNames()
+  return service_account_map
+
+
+def GetQPMDict():
+  global qpm_dict
+  if qpm_dict is None:
+    qpm_dict = GetClientConfigSvc().GetQPM()
+  return qpm_dict
+
+
+def GetAllowedOriginsSet():
+  global allowed_origins_set
+  if allowed_origins_set is None:
+    allowed_origins_set = GetClientConfigSvc().GetAllowedOriginsSet()
+  return allowed_origins_set
diff --git a/services/config_svc.py b/services/config_svc.py
new file mode 100644
index 0000000..27c1d3a
--- /dev/null
+++ b/services/config_svc.py
@@ -0,0 +1,1499 @@
+# 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
+
+"""Classes and functions for persistence of issue tracker configuration.
+
+This module provides functions to get, update, create, and (in some
+cases) delete each type of business object.  It provides a logical
+persistence layer on top of an SQL database.
+
+Business objects are described in tracker_pb2.py and tracker_bizobj.py.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+
+from google.appengine.api import memcache
+
+import settings
+from framework import exceptions
+from framework import framework_constants
+from framework import sql
+from proto import tracker_pb2
+from services import caches
+from services import project_svc
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+PROJECTISSUECONFIG_TABLE_NAME = 'ProjectIssueConfig'
+LABELDEF_TABLE_NAME = 'LabelDef'
+FIELDDEF_TABLE_NAME = 'FieldDef'
+FIELDDEF2ADMIN_TABLE_NAME = 'FieldDef2Admin'
+FIELDDEF2EDITOR_TABLE_NAME = 'FieldDef2Editor'
+COMPONENTDEF_TABLE_NAME = 'ComponentDef'
+COMPONENT2ADMIN_TABLE_NAME = 'Component2Admin'
+COMPONENT2CC_TABLE_NAME = 'Component2Cc'
+COMPONENT2LABEL_TABLE_NAME = 'Component2Label'
+STATUSDEF_TABLE_NAME = 'StatusDef'
+APPROVALDEF2APPROVER_TABLE_NAME = 'ApprovalDef2Approver'
+APPROVALDEF2SURVEY_TABLE_NAME = 'ApprovalDef2Survey'
+
+PROJECTISSUECONFIG_COLS = [
+    'project_id', 'statuses_offer_merge', 'exclusive_label_prefixes',
+    'default_template_for_developers', 'default_template_for_users',
+    'default_col_spec', 'default_sort_spec', 'default_x_attr',
+    'default_y_attr', 'member_default_query', 'custom_issue_entry_url']
+STATUSDEF_COLS = [
+    'id', 'project_id', 'rank', 'status', 'means_open', 'docstring',
+    'deprecated']
+LABELDEF_COLS = [
+    'id', 'project_id', 'rank', 'label', 'docstring', 'deprecated']
+FIELDDEF_COLS = [
+    'id', 'project_id', 'rank', 'field_name', 'field_type', 'applicable_type',
+    'applicable_predicate', 'is_required', 'is_niche', 'is_multivalued',
+    'min_value', 'max_value', 'regex', 'needs_member', 'needs_perm',
+    'grants_perm', 'notify_on', 'date_action', 'docstring', 'is_deleted',
+    'approval_id', 'is_phase_field', 'is_restricted_field'
+]
+FIELDDEF2ADMIN_COLS = ['field_id', 'admin_id']
+FIELDDEF2EDITOR_COLS = ['field_id', 'editor_id']
+COMPONENTDEF_COLS = ['id', 'project_id', 'path', 'docstring', 'deprecated',
+                     'created', 'creator_id', 'modified', 'modifier_id']
+COMPONENT2ADMIN_COLS = ['component_id', 'admin_id']
+COMPONENT2CC_COLS = ['component_id', 'cc_id']
+COMPONENT2LABEL_COLS = ['component_id', 'label_id']
+APPROVALDEF2APPROVER_COLS = ['approval_id', 'approver_id', 'project_id']
+APPROVALDEF2SURVEY_COLS = ['approval_id', 'survey', 'project_id']
+
+NOTIFY_ON_ENUM = ['never', 'any_comment']
+DATE_ACTION_ENUM = ['no_action', 'ping_owner_only', 'ping_participants']
+
+# Some projects have tons of label rows, so we retrieve them in shards
+# to avoid huge DB results or exceeding the memcache size limit.
+LABEL_ROW_SHARDS = 10
+
+
+class LabelRowTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage RAM and memcache for label rows.
+
+  Label rows exist for every label used in a project, even those labels
+  that were added to issues in an ad hoc way without being defined in the
+  config ahead of time.
+
+  The set of all labels in a project can be very large, so we shard them
+  into 10 parts so that each part can be cached in memcache with < 1MB.
+  """
+
+  def __init__(self, cache_manager, config_service):
+    super(LabelRowTwoLevelCache, self).__init__(
+        cache_manager, 'project', 'label_rows:', None)
+    self.config_service = config_service
+
+  def _MakeCache(self, cache_manager, kind, max_size=None):
+    """Make the RAM cache and registier it with the cache_manager."""
+    return caches.ShardedRamCache(
+      cache_manager, kind, max_size=max_size, num_shards=LABEL_ROW_SHARDS)
+
+  def _DeserializeLabelRows(self, label_def_rows):
+    """Convert DB result rows into a dict {project_id: [row, ...]}."""
+    result_dict = collections.defaultdict(list)
+    for label_id, project_id, rank, label, docstr, deprecated in label_def_rows:
+      shard_id = label_id % LABEL_ROW_SHARDS
+      result_dict[(project_id, shard_id)].append(
+          (label_id, project_id, rank, label, docstr, deprecated))
+
+    return result_dict
+
+  def FetchItems(self, cnxn, keys):
+    """On RAM and memcache miss, hit the database."""
+    # Make sure that every requested project is represented in the result
+    label_rows_dict = {}
+    for key in keys:
+      label_rows_dict.setdefault(key, [])
+
+    for project_id, shard_id in keys:
+      shard_clause = [('id %% %s = %s', [LABEL_ROW_SHARDS, shard_id])]
+
+      label_def_rows = self.config_service.labeldef_tbl.Select(
+          cnxn, cols=LABELDEF_COLS, project_id=project_id,
+          where=shard_clause)
+      label_rows_dict.update(self._DeserializeLabelRows(label_def_rows))
+
+    for rows_in_shard in label_rows_dict.values():
+      rows_in_shard.sort(key=lambda row: (row[2], row[3]), reverse=True)
+
+    return label_rows_dict
+
+  def InvalidateKeys(self, cnxn, project_ids):
+    """Drop the given keys from both RAM and memcache."""
+    self.cache.InvalidateKeys(cnxn, project_ids)
+    memcache.delete_multi(
+        [
+            self._KeyToStr((project_id, shard_id))
+            for project_id in project_ids
+            for shard_id in range(0, LABEL_ROW_SHARDS)
+        ],
+        seconds=5,
+        key_prefix=self.prefix,
+        namespace=settings.memcache_namespace)
+
+  def InvalidateAllKeys(self, cnxn, project_ids):
+    """Drop the given keys from memcache and invalidate all keys in RAM.
+
+    Useful for avoiding inserting many rows into the Invalidate table when
+    invalidating a large group of keys all at once. Only use when necessary.
+    """
+    self.cache.InvalidateAll(cnxn)
+    memcache.delete_multi(
+        [
+            self._KeyToStr((project_id, shard_id))
+            for project_id in project_ids
+            for shard_id in range(0, LABEL_ROW_SHARDS)
+        ],
+        seconds=5,
+        key_prefix=self.prefix,
+        namespace=settings.memcache_namespace)
+
+  def _KeyToStr(self, key):
+    """Convert our tuple IDs to strings for use as memcache keys."""
+    project_id, shard_id = key
+    return '%d-%d' % (project_id, shard_id)
+
+  def _StrToKey(self, key_str):
+    """Convert memcache keys back to the tuples that we use as IDs."""
+    project_id_str, shard_id_str = key_str.split('-')
+    return int(project_id_str), int(shard_id_str)
+
+
+class StatusRowTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage RAM and memcache for status rows."""
+
+  def __init__(self, cache_manager, config_service):
+    super(StatusRowTwoLevelCache, self).__init__(
+        cache_manager, 'project', 'status_rows:', None)
+    self.config_service = config_service
+
+  def _DeserializeStatusRows(self, def_rows):
+    """Convert status definition rows into {project_id: [row, ...]}."""
+    result_dict = collections.defaultdict(list)
+    for (status_id, project_id, rank, status,
+         means_open, docstr, deprecated) in def_rows:
+      result_dict[project_id].append(
+          (status_id, project_id, rank, status, means_open, docstr, deprecated))
+
+    return result_dict
+
+  def FetchItems(self, cnxn, keys):
+    """On cache miss, get status definition rows from the DB."""
+    status_def_rows = self.config_service.statusdef_tbl.Select(
+        cnxn, cols=STATUSDEF_COLS, project_id=keys,
+        order_by=[('rank DESC', []), ('status DESC', [])])
+    status_rows_dict = self._DeserializeStatusRows(status_def_rows)
+
+    # Make sure that every requested project is represented in the result
+    for project_id in keys:
+      status_rows_dict.setdefault(project_id, [])
+
+    return status_rows_dict
+
+
+class FieldRowTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage RAM and memcache for field rows.
+
+  Field rows exist for every field used in a project, since they cannot be
+  created through ad-hoc means.
+  """
+
+  def __init__(self, cache_manager, config_service):
+    super(FieldRowTwoLevelCache, self).__init__(
+        cache_manager, 'project', 'field_rows:', None)
+    self.config_service = config_service
+
+  def _DeserializeFieldRows(self, field_def_rows):
+    """Convert DB result rows into a dict {project_id: [row, ...]}."""
+    result_dict = collections.defaultdict(list)
+    # TODO: Actually process the rest of the items.
+    for (field_id, project_id, rank, field_name, _field_type, _applicable_type,
+         _applicable_predicate, _is_required, _is_niche, _is_multivalued,
+         _min_value, _max_value, _regex, _needs_member, _needs_perm,
+         _grants_perm, _notify_on, _date_action, docstring, _is_deleted,
+         _approval_id, _is_phase_field, _is_restricted_field) in field_def_rows:
+      result_dict[project_id].append(
+          (field_id, project_id, rank, field_name, docstring))
+
+    return result_dict
+
+  def FetchItems(self, cnxn, keys):
+    """On RAM and memcache miss, hit the database."""
+    field_def_rows = self.config_service.fielddef_tbl.Select(
+        cnxn, cols=FIELDDEF_COLS, project_id=keys,
+        order_by=[('rank DESC', []), ('field_name DESC', [])])
+    field_rows_dict = self._DeserializeFieldRows(field_def_rows)
+
+    # Make sure that every requested project is represented in the result
+    for project_id in keys:
+      field_rows_dict.setdefault(project_id, [])
+
+    return field_rows_dict
+
+
+class ConfigTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage RAM and memcache for IssueProjectConfig PBs."""
+
+  def __init__(self, cache_manager, config_service):
+    super(ConfigTwoLevelCache, self).__init__(
+        cache_manager, 'project', 'config:', tracker_pb2.ProjectIssueConfig)
+    self.config_service = config_service
+
+  def _UnpackProjectIssueConfig(self, config_row):
+    """Partially construct a config object using info from a DB row."""
+    (project_id, statuses_offer_merge, exclusive_label_prefixes,
+     default_template_for_developers, default_template_for_users,
+     default_col_spec, default_sort_spec, default_x_attr, default_y_attr,
+     member_default_query, custom_issue_entry_url) = config_row
+    config = tracker_pb2.ProjectIssueConfig()
+    config.project_id = project_id
+    config.statuses_offer_merge.extend(statuses_offer_merge.split())
+    config.exclusive_label_prefixes.extend(exclusive_label_prefixes.split())
+    config.default_template_for_developers = default_template_for_developers
+    config.default_template_for_users = default_template_for_users
+    config.default_col_spec = default_col_spec
+    config.default_sort_spec = default_sort_spec
+    config.default_x_attr = default_x_attr
+    config.default_y_attr = default_y_attr
+    config.member_default_query = member_default_query
+    if custom_issue_entry_url is not None:
+      config.custom_issue_entry_url = custom_issue_entry_url
+
+    return config
+
+  def _UnpackFieldDef(self, fielddef_row):
+    """Partially construct a FieldDef object using info from a DB row."""
+    (
+        field_id, project_id, _rank, field_name, field_type, applic_type,
+        applic_pred, is_required, is_niche, is_multivalued, min_value,
+        max_value, regex, needs_member, needs_perm, grants_perm, notify_on_str,
+        date_action_str, docstring, is_deleted, approval_id, is_phase_field,
+        is_restricted_field) = fielddef_row
+    if notify_on_str == 'any_comment':
+      notify_on = tracker_pb2.NotifyTriggers.ANY_COMMENT
+    else:
+      notify_on = tracker_pb2.NotifyTriggers.NEVER
+    try:
+      date_action = DATE_ACTION_ENUM.index(date_action_str)
+    except ValueError:
+      date_action = DATE_ACTION_ENUM.index('no_action')
+
+    return tracker_bizobj.MakeFieldDef(
+        field_id, project_id, field_name,
+        tracker_pb2.FieldTypes(field_type.upper()), applic_type, applic_pred,
+        is_required, is_niche, is_multivalued, min_value, max_value, regex,
+        needs_member, needs_perm, grants_perm, notify_on, date_action,
+        docstring, is_deleted, approval_id, is_phase_field, is_restricted_field)
+
+  def _UnpackComponentDef(
+      self, cd_row, component2admin_rows, component2cc_rows,
+      component2label_rows):
+    """Partially construct a FieldDef object using info from a DB row."""
+    (component_id, project_id, path, docstring, deprecated, created,
+     creator_id, modified, modifier_id) = cd_row
+    cd = tracker_bizobj.MakeComponentDef(
+        component_id, project_id, path, docstring, deprecated,
+        [admin_id for comp_id, admin_id in component2admin_rows
+         if comp_id == component_id],
+        [cc_id for comp_id, cc_id in component2cc_rows
+         if comp_id == component_id],
+        created, creator_id,
+        modified=modified, modifier_id=modifier_id,
+        label_ids=[label_id for comp_id, label_id in component2label_rows
+                   if comp_id == component_id])
+
+    return cd
+
+  def _DeserializeIssueConfigs(
+      self, config_rows, statusdef_rows, labeldef_rows, fielddef_rows,
+      fielddef2admin_rows, fielddef2editor_rows, componentdef_rows,
+      component2admin_rows, component2cc_rows, component2label_rows,
+      approvaldef2approver_rows, approvaldef2survey_rows):
+    """Convert the given row tuples into a dict of ProjectIssueConfig PBs."""
+    result_dict = {}
+    fielddef_dict = {}
+    approvaldef_dict = {}
+
+    for config_row in config_rows:
+      config = self._UnpackProjectIssueConfig(config_row)
+      result_dict[config.project_id] = config
+
+    for statusdef_row in statusdef_rows:
+      (_, project_id, _rank, status,
+       means_open, docstring, deprecated) = statusdef_row
+      if project_id in result_dict:
+        wks = tracker_pb2.StatusDef(
+            status=status, means_open=bool(means_open),
+            status_docstring=docstring or '', deprecated=bool(deprecated))
+        result_dict[project_id].well_known_statuses.append(wks)
+
+    for labeldef_row in labeldef_rows:
+      _, project_id, _rank, label, docstring, deprecated = labeldef_row
+      if project_id in result_dict:
+        wkl = tracker_pb2.LabelDef(
+            label=label, label_docstring=docstring or '',
+            deprecated=bool(deprecated))
+        result_dict[project_id].well_known_labels.append(wkl)
+
+    for approver_row in approvaldef2approver_rows:
+      approval_id, approver_id, project_id = approver_row
+      if project_id in result_dict:
+        approval_def = approvaldef_dict.get(approval_id)
+        if approval_def is None:
+          approval_def = tracker_pb2.ApprovalDef(
+              approval_id=approval_id)
+          result_dict[project_id].approval_defs.append(approval_def)
+          approvaldef_dict[approval_id] = approval_def
+        approval_def.approver_ids.append(approver_id)
+
+    for survey_row in approvaldef2survey_rows:
+      approval_id, survey, project_id = survey_row
+      if project_id in result_dict:
+        approval_def = approvaldef_dict.get(approval_id)
+        if approval_def is None:
+          approval_def = tracker_pb2.ApprovalDef(
+              approval_id=approval_id)
+          result_dict[project_id].approval_defs.append(approval_def)
+          approvaldef_dict[approval_id] = approval_def
+        approval_def.survey = survey
+
+    for fd_row in fielddef_rows:
+      fd = self._UnpackFieldDef(fd_row)
+      result_dict[fd.project_id].field_defs.append(fd)
+      fielddef_dict[fd.field_id] = fd
+
+    for fd2admin_row in fielddef2admin_rows:
+      field_id, admin_id = fd2admin_row
+      fd = fielddef_dict.get(field_id)
+      if fd:
+        fd.admin_ids.append(admin_id)
+
+    for fd2editor_row in fielddef2editor_rows:
+      field_id, editor_id = fd2editor_row
+      fd = fielddef_dict.get(field_id)
+      if fd:
+        fd.editor_ids.append(editor_id)
+
+    for cd_row in componentdef_rows:
+      cd = self._UnpackComponentDef(
+          cd_row, component2admin_rows, component2cc_rows, component2label_rows)
+      result_dict[cd.project_id].component_defs.append(cd)
+
+    return result_dict
+
+  def _FetchConfigs(self, cnxn, project_ids):
+    """On RAM and memcache miss, hit the database."""
+    config_rows = self.config_service.projectissueconfig_tbl.Select(
+        cnxn, cols=PROJECTISSUECONFIG_COLS, project_id=project_ids)
+    statusdef_rows = self.config_service.statusdef_tbl.Select(
+        cnxn, cols=STATUSDEF_COLS, project_id=project_ids,
+        where=[('rank IS NOT NULL', [])], order_by=[('rank', [])])
+
+    labeldef_rows = self.config_service.labeldef_tbl.Select(
+        cnxn, cols=LABELDEF_COLS, project_id=project_ids,
+        where=[('rank IS NOT NULL', [])], order_by=[('rank', [])])
+
+    approver_rows = self.config_service.approvaldef2approver_tbl.Select(
+        cnxn, cols=APPROVALDEF2APPROVER_COLS, project_id=project_ids)
+    survey_rows = self.config_service.approvaldef2survey_tbl.Select(
+        cnxn, cols=APPROVALDEF2SURVEY_COLS, project_id=project_ids)
+
+    # TODO(jrobbins): For now, sort by field name, but someday allow admins
+    # to adjust the rank to group and order field definitions logically.
+    fielddef_rows = self.config_service.fielddef_tbl.Select(
+        cnxn, cols=FIELDDEF_COLS, project_id=project_ids,
+        order_by=[('field_name', [])])
+    field_ids = [row[0] for row in fielddef_rows]
+    fielddef2admin_rows = []
+    fielddef2editor_rows = []
+    if field_ids:
+      fielddef2admin_rows = self.config_service.fielddef2admin_tbl.Select(
+          cnxn, cols=FIELDDEF2ADMIN_COLS, field_id=field_ids)
+      fielddef2editor_rows = self.config_service.fielddef2editor_tbl.Select(
+          cnxn, cols=FIELDDEF2EDITOR_COLS, field_id=field_ids)
+
+    componentdef_rows = self.config_service.componentdef_tbl.Select(
+        cnxn, cols=COMPONENTDEF_COLS, project_id=project_ids,
+        is_deleted=False, order_by=[('path', [])])
+    component_ids = [cd_row[0] for cd_row in componentdef_rows]
+    component2admin_rows = []
+    component2cc_rows = []
+    component2label_rows = []
+    if component_ids:
+      component2admin_rows = self.config_service.component2admin_tbl.Select(
+          cnxn, cols=COMPONENT2ADMIN_COLS, component_id=component_ids)
+      component2cc_rows = self.config_service.component2cc_tbl.Select(
+          cnxn, cols=COMPONENT2CC_COLS, component_id=component_ids)
+      component2label_rows = self.config_service.component2label_tbl.Select(
+          cnxn, cols=COMPONENT2LABEL_COLS, component_id=component_ids)
+
+    retrieved_dict = self._DeserializeIssueConfigs(
+        config_rows, statusdef_rows, labeldef_rows, fielddef_rows,
+        fielddef2admin_rows, fielddef2editor_rows, componentdef_rows,
+        component2admin_rows, component2cc_rows, component2label_rows,
+        approver_rows, survey_rows)
+    return retrieved_dict
+
+  def FetchItems(self, cnxn, keys):
+    """On RAM and memcache miss, hit the database."""
+    retrieved_dict = self._FetchConfigs(cnxn, keys)
+
+    # Any projects which don't have stored configs should use a default
+    # config instead.
+    for project_id in keys:
+      if project_id not in retrieved_dict:
+        config = tracker_bizobj.MakeDefaultProjectIssueConfig(project_id)
+        retrieved_dict[project_id] = config
+
+    return retrieved_dict
+
+
+class ConfigService(object):
+  """The persistence layer for Monorail's issue tracker configuration data."""
+
+  def __init__(self, cache_manager):
+    """Initialize this object so that it is ready to use.
+
+    Args:
+      cache_manager: manages local caches with distributed invalidation.
+    """
+    self.projectissueconfig_tbl = sql.SQLTableManager(
+        PROJECTISSUECONFIG_TABLE_NAME)
+    self.statusdef_tbl = sql.SQLTableManager(STATUSDEF_TABLE_NAME)
+    self.labeldef_tbl = sql.SQLTableManager(LABELDEF_TABLE_NAME)
+    self.fielddef_tbl = sql.SQLTableManager(FIELDDEF_TABLE_NAME)
+    self.fielddef2admin_tbl = sql.SQLTableManager(FIELDDEF2ADMIN_TABLE_NAME)
+    self.fielddef2editor_tbl = sql.SQLTableManager(FIELDDEF2EDITOR_TABLE_NAME)
+    self.componentdef_tbl = sql.SQLTableManager(COMPONENTDEF_TABLE_NAME)
+    self.component2admin_tbl = sql.SQLTableManager(COMPONENT2ADMIN_TABLE_NAME)
+    self.component2cc_tbl = sql.SQLTableManager(COMPONENT2CC_TABLE_NAME)
+    self.component2label_tbl = sql.SQLTableManager(COMPONENT2LABEL_TABLE_NAME)
+    self.approvaldef2approver_tbl = sql.SQLTableManager(
+        APPROVALDEF2APPROVER_TABLE_NAME)
+    self.approvaldef2survey_tbl = sql.SQLTableManager(
+        APPROVALDEF2SURVEY_TABLE_NAME)
+
+    self.config_2lc = ConfigTwoLevelCache(cache_manager, self)
+    self.label_row_2lc = LabelRowTwoLevelCache(cache_manager, self)
+    self.label_cache = caches.RamCache(cache_manager, 'project')
+    self.status_row_2lc = StatusRowTwoLevelCache(cache_manager, self)
+    self.status_cache = caches.RamCache(cache_manager, 'project')
+    self.field_row_2lc = FieldRowTwoLevelCache(cache_manager, self)
+    self.field_cache = caches.RamCache(cache_manager, 'project')
+
+  ### Label lookups
+
+  def GetLabelDefRows(self, cnxn, project_id, use_cache=True):
+    """Get SQL result rows for all labels used in the specified project."""
+    result = []
+    for shard_id in range(0, LABEL_ROW_SHARDS):
+      key = (project_id, shard_id)
+      pids_to_label_rows_shard, _misses = self.label_row_2lc.GetAll(
+        cnxn, [key], use_cache=use_cache)
+      result.extend(pids_to_label_rows_shard[key])
+    # Sort in python to reduce DB load and integrate results from shards.
+    # row[2] is rank, row[3] is label name.
+    result.sort(key=lambda row: (row[2], row[3]), reverse=True)
+    return result
+
+  def GetLabelDefRowsAnyProject(self, cnxn, where=None):
+    """Get all LabelDef rows for the whole site. Used in whole-site search."""
+    # TODO(jrobbins): maybe add caching for these too.
+    label_def_rows = self.labeldef_tbl.Select(
+        cnxn, cols=LABELDEF_COLS, where=where,
+        order_by=[('rank DESC', []), ('label DESC', [])])
+    return label_def_rows
+
+  def _DeserializeLabels(self, def_rows):
+    """Convert label defs into bi-directional mappings of names and IDs."""
+    label_id_to_name = {
+        label_id: label for
+        label_id, _pid, _rank, label, _doc, _deprecated
+        in def_rows}
+    label_name_to_id = {
+        label.lower(): label_id
+        for label_id, label in label_id_to_name.items()}
+
+    return label_id_to_name, label_name_to_id
+
+  def _EnsureLabelCacheEntry(self, cnxn, project_id, use_cache=True):
+    """Make sure that self.label_cache has an entry for project_id."""
+    if not use_cache or not self.label_cache.HasItem(project_id):
+      def_rows = self.GetLabelDefRows(cnxn, project_id, use_cache=use_cache)
+      self.label_cache.CacheItem(project_id, self._DeserializeLabels(def_rows))
+
+  def LookupLabel(self, cnxn, project_id, label_id):
+    """Lookup a label string given the label_id.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project where the label is defined or used.
+      label_id: int label ID.
+
+    Returns:
+      Label name string for the given label_id, or None.
+    """
+    self._EnsureLabelCacheEntry(cnxn, project_id)
+    label_id_to_name, _label_name_to_id = self.label_cache.GetItem(
+        project_id)
+    if label_id in label_id_to_name:
+      return label_id_to_name[label_id]
+
+    logging.info('Label %r not found. Getting fresh from DB.', label_id)
+    self._EnsureLabelCacheEntry(cnxn, project_id, use_cache=False)
+    label_id_to_name, _label_name_to_id = self.label_cache.GetItem(
+        project_id)
+    return label_id_to_name.get(label_id)
+
+  def LookupLabelID(self, cnxn, project_id, label, autocreate=True):
+    """Look up a label ID, optionally interning it.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project where the statuses are defined.
+      label: label string.
+      autocreate: if not already in the DB, store it and generate a new ID.
+
+    Returns:
+      The label ID for the given label string.
+    """
+    self._EnsureLabelCacheEntry(cnxn, project_id)
+    _label_id_to_name, label_name_to_id = self.label_cache.GetItem(
+        project_id)
+    if label.lower() in label_name_to_id:
+      return label_name_to_id[label.lower()]
+
+    # Double check that the label does not already exist in the DB.
+    rows = self.labeldef_tbl.Select(
+        cnxn, cols=['id'], project_id=project_id,
+        where=[('LOWER(label) = %s', [label.lower()])],
+        limit=1)
+    logging.info('Double checking for %r gave %r', label, rows)
+    if rows:
+      self.label_row_2lc.cache.LocalInvalidate(project_id)
+      self.label_cache.LocalInvalidate(project_id)
+      return rows[0][0]
+
+    if autocreate:
+      logging.info('No label %r is known in project %d, so intern it.',
+                   label, project_id)
+      label_id = self.labeldef_tbl.InsertRow(
+          cnxn, project_id=project_id, label=label)
+      self.label_row_2lc.InvalidateKeys(cnxn, [project_id])
+      self.label_cache.Invalidate(cnxn, project_id)
+      return label_id
+
+    return None  # It was not found and we don't want to create it.
+
+  def LookupLabelIDs(self, cnxn, project_id, labels, autocreate=False):
+    """Look up several label IDs.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project where the statuses are defined.
+      labels: list of label strings.
+      autocreate: if not already in the DB, store it and generate a new ID.
+
+    Returns:
+      Returns a list of int label IDs for the given label strings.
+    """
+    result = []
+    for lab in labels:
+      label_id = self.LookupLabelID(
+          cnxn, project_id, lab, autocreate=autocreate)
+      if label_id is not None:
+        result.append(label_id)
+
+    return result
+
+  def LookupIDsOfLabelsMatching(self, cnxn, project_id, regex):
+    """Look up the IDs of all labels in a project that match the regex.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project where the statuses are defined.
+      regex: regular expression object to match against the label strings.
+
+    Returns:
+      List of label IDs for labels that match the regex.
+    """
+    self._EnsureLabelCacheEntry(cnxn, project_id)
+    label_id_to_name, _label_name_to_id = self.label_cache.GetItem(
+        project_id)
+    result = [label_id for label_id, label in label_id_to_name.items()
+              if regex.match(label)]
+
+    return result
+
+  def LookupLabelIDsAnyProject(self, cnxn, label):
+    """Return the IDs of labels with the given name in any project.
+
+    Args:
+      cnxn: connection to SQL database.
+      label: string label to look up.  Case sensitive.
+
+    Returns:
+      A list of int label IDs of all labels matching the given string.
+    """
+    # TODO(jrobbins): maybe add caching for these too.
+    label_id_rows = self.labeldef_tbl.Select(
+        cnxn, cols=['id'], label=label)
+    label_ids = [row[0] for row in label_id_rows]
+    return label_ids
+
+  def LookupIDsOfLabelsMatchingAnyProject(self, cnxn, regex):
+    """Return the IDs of matching labels in any project."""
+    label_rows = self.labeldef_tbl.Select(
+        cnxn, cols=['id', 'label'])
+    matching_ids = [
+        label_id for label_id, label in label_rows if regex.match(label)]
+    return matching_ids
+
+  ### Status lookups
+
+  def GetStatusDefRows(self, cnxn, project_id):
+    """Return a list of status definition rows for the specified project."""
+    pids_to_status_rows, misses = self.status_row_2lc.GetAll(
+        cnxn, [project_id])
+    assert not misses
+    return pids_to_status_rows[project_id]
+
+  def GetStatusDefRowsAnyProject(self, cnxn):
+    """Return all status definition rows on the whole site."""
+    # TODO(jrobbins): maybe add caching for these too.
+    status_def_rows = self.statusdef_tbl.Select(
+        cnxn, cols=STATUSDEF_COLS,
+        order_by=[('rank DESC', []), ('status DESC', [])])
+    return status_def_rows
+
+  def _DeserializeStatuses(self, def_rows):
+    """Convert status defs into bi-directional mappings of names and IDs."""
+    status_id_to_name = {
+        status_id: status
+        for (status_id, _pid, _rank, status, _means_open,
+             _doc, _deprecated) in def_rows}
+    status_name_to_id = {
+        status.lower(): status_id
+        for status_id, status in status_id_to_name.items()}
+    closed_status_ids = [
+        status_id
+        for (status_id, _pid, _rank, _status, means_open,
+             _doc, _deprecated) in def_rows
+        if means_open == 0]  # Only 0 means closed. NULL/None means open.
+
+    return status_id_to_name, status_name_to_id, closed_status_ids
+
+  def _EnsureStatusCacheEntry(self, cnxn, project_id):
+    """Make sure that self.status_cache has an entry for project_id."""
+    if not self.status_cache.HasItem(project_id):
+      def_rows = self.GetStatusDefRows(cnxn, project_id)
+      self.status_cache.CacheItem(
+          project_id, self._DeserializeStatuses(def_rows))
+
+  def LookupStatus(self, cnxn, project_id, status_id):
+    """Look up a status string for the given status ID.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project where the statuses are defined.
+      status_id: int ID of the status value.
+
+    Returns:
+      A status string, or None.
+    """
+    if status_id == 0:
+      return ''
+
+    self._EnsureStatusCacheEntry(cnxn, project_id)
+    (status_id_to_name, _status_name_to_id,
+     _closed_status_ids) = self.status_cache.GetItem(project_id)
+
+    return status_id_to_name.get(status_id)
+
+  def LookupStatusID(self, cnxn, project_id, status, autocreate=True):
+    """Look up a status ID for the given status string.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project where the statuses are defined.
+      status: status string.
+      autocreate: if not already in the DB, store it and generate a new ID.
+
+    Returns:
+      The status ID for the given status string, or None.
+    """
+    if not status:
+      return None
+
+    self._EnsureStatusCacheEntry(cnxn, project_id)
+    (_status_id_to_name, status_name_to_id,
+     _closed_status_ids) = self.status_cache.GetItem(project_id)
+    if status.lower() in status_name_to_id:
+      return status_name_to_id[status.lower()]
+
+    if autocreate:
+      logging.info('No status %r is known in project %d, so intern it.',
+                   status, project_id)
+      status_id = self.statusdef_tbl.InsertRow(
+          cnxn, project_id=project_id, status=status)
+      self.status_row_2lc.InvalidateKeys(cnxn, [project_id])
+      self.status_cache.Invalidate(cnxn, project_id)
+      return status_id
+
+    return None  # It was not found and we don't want to create it.
+
+  def LookupStatusIDs(self, cnxn, project_id, statuses):
+    """Look up several status IDs for the given status strings.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project where the statuses are defined.
+      statuses: list of status strings.
+
+    Returns:
+      A list of int status IDs.
+    """
+    result = []
+    for stat in statuses:
+      status_id = self.LookupStatusID(cnxn, project_id, stat, autocreate=False)
+      if status_id:
+        result.append(status_id)
+
+    return result
+
+  def LookupClosedStatusIDs(self, cnxn, project_id):
+    """Return the IDs of closed statuses defined in the given project."""
+    self._EnsureStatusCacheEntry(cnxn, project_id)
+    (_status_id_to_name, _status_name_to_id,
+     closed_status_ids) = self.status_cache.GetItem(project_id)
+
+    return closed_status_ids
+
+  def LookupClosedStatusIDsAnyProject(self, cnxn):
+    """Return the IDs of closed statuses defined in any project."""
+    status_id_rows = self.statusdef_tbl.Select(
+        cnxn, cols=['id'], means_open=False)
+    status_ids = [row[0] for row in status_id_rows]
+    return status_ids
+
+  def LookupStatusIDsAnyProject(self, cnxn, status):
+    """Return the IDs of statues with the given name in any project."""
+    status_id_rows = self.statusdef_tbl.Select(
+        cnxn, cols=['id'], status=status)
+    status_ids = [row[0] for row in status_id_rows]
+    return status_ids
+
+  # TODO(jrobbins): regex matching for status values.
+
+  ### Issue tracker configuration objects
+
+  def GetProjectConfigs(self, cnxn, project_ids, use_cache=True):
+    # type: (MonorailConnection, Collection[int], Optional[bool])
+    #     -> Mapping[int, ProjectConfig]
+    """Get several project issue config objects."""
+    config_dict, missed_ids = self.config_2lc.GetAll(
+        cnxn, project_ids, use_cache=use_cache)
+    if missed_ids:
+      raise exceptions.NoSuchProjectException()
+    return config_dict
+
+  def GetProjectConfig(self, cnxn, project_id, use_cache=True):
+    """Load a ProjectIssueConfig for the specified project from the database.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the current project.
+      use_cache: if False, always hit the database.
+
+    Returns:
+      A ProjectIssueConfig describing how the issue tracker in the specified
+      project is configured.  Projects only have a stored ProjectIssueConfig if
+      a project owner has edited the configuration.  Other projects use a
+      default configuration.
+    """
+    config_dict = self.GetProjectConfigs(
+        cnxn, [project_id], use_cache=use_cache)
+    return config_dict[project_id]
+
+  def StoreConfig(self, cnxn, config):
+    """Update an issue config in the database.
+
+    Args:
+      cnxn: connection to SQL database.
+      config: ProjectIssueConfig PB to update.
+    """
+    # TODO(jrobbins): Convert default template index values into foreign
+    # key references.  Updating an entire config might require (1) adding
+    # new templates, (2) updating the config with new foreign key values,
+    # and finally (3) deleting only the specific templates that should be
+    # deleted.
+    self.projectissueconfig_tbl.InsertRow(
+        cnxn, replace=True,
+        project_id=config.project_id,
+        statuses_offer_merge=' '.join(config.statuses_offer_merge),
+        exclusive_label_prefixes=' '.join(config.exclusive_label_prefixes),
+        default_template_for_developers=config.default_template_for_developers,
+        default_template_for_users=config.default_template_for_users,
+        default_col_spec=config.default_col_spec,
+        default_sort_spec=config.default_sort_spec,
+        default_x_attr=config.default_x_attr,
+        default_y_attr=config.default_y_attr,
+        member_default_query=config.member_default_query,
+        custom_issue_entry_url=config.custom_issue_entry_url,
+        commit=False)
+
+    self._UpdateWellKnownLabels(cnxn, config)
+    self._UpdateWellKnownStatuses(cnxn, config)
+    self._UpdateApprovals(cnxn, config)
+    cnxn.Commit()
+
+  def _UpdateWellKnownLabels(self, cnxn, config):
+    """Update the labels part of a project's issue configuration.
+
+    Args:
+      cnxn: connection to SQL database.
+      config: ProjectIssueConfig PB to update in the DB.
+    """
+    update_labeldef_rows = []
+    new_labeldef_rows = []
+    labels_seen = set()
+    for rank, wkl in enumerate(config.well_known_labels):
+      # Prevent duplicate key errors
+      if wkl.label in labels_seen:
+        raise exceptions.InputException('Defined label "%s" twice' % wkl.label)
+      labels_seen.add(wkl.label)
+      # We must specify label ID when replacing, otherwise a new ID is made.
+      label_id = self.LookupLabelID(
+          cnxn, config.project_id, wkl.label, autocreate=False)
+      if label_id:
+        row = (label_id, config.project_id, rank, wkl.label,
+               wkl.label_docstring, wkl.deprecated)
+        update_labeldef_rows.append(row)
+      else:
+        row = (
+            config.project_id, rank, wkl.label, wkl.label_docstring,
+            wkl.deprecated)
+        new_labeldef_rows.append(row)
+
+    self.labeldef_tbl.Update(
+        cnxn, {'rank': None}, project_id=config.project_id, commit=False)
+    self.labeldef_tbl.InsertRows(
+        cnxn, LABELDEF_COLS, update_labeldef_rows, replace=True, commit=False)
+    self.labeldef_tbl.InsertRows(
+        cnxn, LABELDEF_COLS[1:], new_labeldef_rows, commit=False)
+    self.label_row_2lc.InvalidateKeys(cnxn, [config.project_id])
+    self.label_cache.Invalidate(cnxn, config.project_id)
+
+  def _UpdateWellKnownStatuses(self, cnxn, config):
+    """Update the status part of a project's issue configuration.
+
+    Args:
+      cnxn: connection to SQL database.
+      config: ProjectIssueConfig PB to update in the DB.
+    """
+    update_statusdef_rows = []
+    new_statusdef_rows = []
+    for rank, wks in enumerate(config.well_known_statuses):
+      # We must specify label ID when replacing, otherwise a new ID is made.
+      status_id = self.LookupStatusID(cnxn, config.project_id, wks.status,
+                                      autocreate=False)
+      if status_id is not None:
+        row = (status_id, config.project_id, rank, wks.status,
+               bool(wks.means_open), wks.status_docstring, wks.deprecated)
+        update_statusdef_rows.append(row)
+      else:
+        row = (config.project_id, rank, wks.status,
+               bool(wks.means_open), wks.status_docstring, wks.deprecated)
+        new_statusdef_rows.append(row)
+
+    self.statusdef_tbl.Update(
+        cnxn, {'rank': None}, project_id=config.project_id, commit=False)
+    self.statusdef_tbl.InsertRows(
+        cnxn, STATUSDEF_COLS, update_statusdef_rows, replace=True,
+        commit=False)
+    self.statusdef_tbl.InsertRows(
+        cnxn, STATUSDEF_COLS[1:], new_statusdef_rows, commit=False)
+    self.status_row_2lc.InvalidateKeys(cnxn, [config.project_id])
+    self.status_cache.Invalidate(cnxn, config.project_id)
+
+  def _UpdateApprovals(self, cnxn, config):
+    """Update the approvals part of a project's issue configuration.
+
+    Args:
+      cnxn: connection to SQL database.
+      config: ProjectIssueConfig PB to update in the DB.
+    """
+    ids_to_field_def = {fd.field_id: fd for fd in config.field_defs}
+    for approval_def in config.approval_defs:
+      try:
+        approval_fd = ids_to_field_def[approval_def.approval_id]
+        if approval_fd.field_type != tracker_pb2.FieldTypes.APPROVAL_TYPE:
+          raise exceptions.InvalidFieldTypeException()
+      except KeyError:
+        raise exceptions.NoSuchFieldDefException()
+
+      self.approvaldef2approver_tbl.Delete(
+          cnxn, approval_id=approval_def.approval_id, commit=False)
+
+      self.approvaldef2approver_tbl.InsertRows(
+          cnxn, APPROVALDEF2APPROVER_COLS,
+          [(approval_def.approval_id, approver_id, config.project_id) for
+           approver_id in approval_def.approver_ids],
+          commit=False)
+
+      self.approvaldef2survey_tbl.Delete(
+          cnxn, approval_id=approval_def.approval_id, commit=False)
+      self.approvaldef2survey_tbl.InsertRow(
+          cnxn, approval_id=approval_def.approval_id,
+          survey=approval_def.survey, project_id=config.project_id,
+          commit=False)
+
+  def UpdateConfig(
+      self, cnxn, project, well_known_statuses=None,
+      statuses_offer_merge=None, well_known_labels=None,
+      excl_label_prefixes=None, default_template_for_developers=None,
+      default_template_for_users=None, list_prefs=None, restrict_to_known=None,
+      approval_defs=None):
+    """Update project's issue tracker configuration with the given info.
+
+    Args:
+      cnxn: connection to SQL database.
+      project: the project in which to update the issue tracker config.
+      well_known_statuses: [(status_name, docstring, means_open, deprecated),..]
+      statuses_offer_merge: list of status values that trigger UI to merge.
+      well_known_labels: [(label_name, docstring, deprecated),...]
+      excl_label_prefixes: list of prefix strings.  Each issue should
+          have only one label with each of these prefixed.
+      default_template_for_developers: int ID of template to use for devs.
+      default_template_for_users: int ID of template to use for non-members.
+      list_prefs: defaults for columns and sorting.
+      restrict_to_known: optional bool to allow project owners
+          to limit issue status and label values to only the well-known ones.
+      approval_defs: [(approval_id, approver_ids, survey), ..]
+
+    Returns:
+      The updated ProjectIssueConfig PB.
+    """
+    project_id = project.project_id
+    project_config = self.GetProjectConfig(cnxn, project_id, use_cache=False)
+
+    if well_known_statuses is not None:
+      tracker_bizobj.SetConfigStatuses(project_config, well_known_statuses)
+
+    if statuses_offer_merge is not None:
+      project_config.statuses_offer_merge = statuses_offer_merge
+
+    if well_known_labels is not None:
+      tracker_bizobj.SetConfigLabels(project_config, well_known_labels)
+
+    if excl_label_prefixes is not None:
+      project_config.exclusive_label_prefixes = excl_label_prefixes
+
+    if approval_defs is not None:
+      tracker_bizobj.SetConfigApprovals(project_config, approval_defs)
+
+    if default_template_for_developers is not None:
+      project_config.default_template_for_developers = (
+          default_template_for_developers)
+    if default_template_for_users is not None:
+      project_config.default_template_for_users = default_template_for_users
+
+    if list_prefs:
+      (default_col_spec, default_sort_spec, default_x_attr, default_y_attr,
+       member_default_query) = list_prefs
+      project_config.default_col_spec = default_col_spec
+      project_config.default_col_spec = default_col_spec
+      project_config.default_sort_spec = default_sort_spec
+      project_config.default_x_attr = default_x_attr
+      project_config.default_y_attr = default_y_attr
+      project_config.member_default_query = member_default_query
+
+    if restrict_to_known is not None:
+      project_config.restrict_to_known = restrict_to_known
+
+    self.StoreConfig(cnxn, project_config)
+    self.config_2lc.InvalidateKeys(cnxn, [project_id])
+    self.InvalidateMemcacheForEntireProject(project_id)
+    # Invalidate all issue caches in all frontends to clear out
+    # sorting.art_values_cache which now has wrong sort orders.
+    cache_manager = self.config_2lc.cache.cache_manager
+    cache_manager.StoreInvalidateAll(cnxn, 'issue')
+
+    return project_config
+
+  def ExpungeConfig(self, cnxn, project_id):
+    """Completely delete the specified project config from the database."""
+    logging.info('expunging the config for %r', project_id)
+    self.statusdef_tbl.Delete(cnxn, project_id=project_id)
+    self.labeldef_tbl.Delete(cnxn, project_id=project_id)
+    self.projectissueconfig_tbl.Delete(cnxn, project_id=project_id)
+
+    self.config_2lc.InvalidateKeys(cnxn, [project_id])
+
+  def ExpungeUsersInConfigs(self, cnxn, user_ids, limit=None):
+    """Wipes specified users from the configs system.
+
+      This method will not commit the operation. This method will
+      not make changes to in-memory data.
+    """
+    self.component2admin_tbl.Delete(
+        cnxn, admin_id=user_ids, commit=False, limit=limit)
+    self.component2cc_tbl.Delete(
+        cnxn, cc_id=user_ids, commit=False, limit=limit)
+    self.componentdef_tbl.Update(
+        cnxn, {'creator_id': framework_constants.DELETED_USER_ID},
+        creator_id=user_ids, commit=False, limit=limit)
+    self.componentdef_tbl.Update(
+        cnxn, {'modifier_id': framework_constants.DELETED_USER_ID},
+        modifier_id=user_ids, commit=False, limit=limit)
+    self.fielddef2admin_tbl.Delete(
+        cnxn, admin_id=user_ids, commit=False, limit=limit)
+    self.fielddef2editor_tbl.Delete(
+        cnxn, editor_id=user_ids, commit=False, limit=limit)
+    self.approvaldef2approver_tbl.Delete(
+        cnxn, approver_id=user_ids, commit=False, limit=limit)
+
+  ### Custom field definitions
+
+  def CreateFieldDef(
+      self,
+      cnxn,
+      project_id,
+      field_name,
+      field_type_str,
+      applic_type,
+      applic_pred,
+      is_required,
+      is_niche,
+      is_multivalued,
+      min_value,
+      max_value,
+      regex,
+      needs_member,
+      needs_perm,
+      grants_perm,
+      notify_on,
+      date_action_str,
+      docstring,
+      admin_ids,
+      editor_ids,
+      approval_id=None,
+      is_phase_field=False,
+      is_restricted_field=False):
+    """Create a new field definition with the given info.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the current project.
+      field_name: name of the new custom field.
+      field_type_str: string identifying the type of the custom field.
+      applic_type: string specifying issue type the field is applicable to.
+      applic_pred: string condition to test if the field is applicable.
+      is_required: True if the field should be required on issues.
+      is_niche: True if the field is not initially offered for editing, so users
+          must click to reveal such special-purpose or experimental fields.
+      is_multivalued: True if the field can occur multiple times on one issue.
+      min_value: optional validation for int_type fields.
+      max_value: optional validation for int_type fields.
+      regex: optional validation for str_type fields.
+      needs_member: optional validation for user_type fields.
+      needs_perm: optional validation for user_type fields.
+      grants_perm: optional string for perm to grant any user named in field.
+      notify_on: int enum of when to notify users named in field.
+      date_action_str: string saying who to notify when a date arrives.
+      docstring: string describing this field.
+      admin_ids: list of additional user IDs who can edit this field def.
+      editor_ids: list of additional user IDs
+          who can edit a restricted field value.
+      approval_id: field_id of approval field this field belongs to.
+      is_phase_field: True if field should only be associated with issue phases.
+      is_restricted_field: True if field has its edition restricted.
+
+    Returns:
+      Integer field_id of the new field definition.
+    """
+    field_id = self.fielddef_tbl.InsertRow(
+        cnxn,
+        project_id=project_id,
+        field_name=field_name,
+        field_type=field_type_str,
+        applicable_type=applic_type,
+        applicable_predicate=applic_pred,
+        is_required=is_required,
+        is_niche=is_niche,
+        is_multivalued=is_multivalued,
+        min_value=min_value,
+        max_value=max_value,
+        regex=regex,
+        needs_member=needs_member,
+        needs_perm=needs_perm,
+        grants_perm=grants_perm,
+        notify_on=NOTIFY_ON_ENUM[notify_on],
+        date_action=date_action_str,
+        docstring=docstring,
+        approval_id=approval_id,
+        is_phase_field=is_phase_field,
+        is_restricted_field=is_restricted_field,
+        commit=False)
+    self.fielddef2admin_tbl.InsertRows(
+        cnxn, FIELDDEF2ADMIN_COLS,
+        [(field_id, admin_id) for admin_id in admin_ids],
+        commit=False)
+    self.fielddef2editor_tbl.InsertRows(
+        cnxn,
+        FIELDDEF2EDITOR_COLS,
+        [(field_id, editor_id) for editor_id in editor_ids],
+        commit=False)
+    cnxn.Commit()
+    self.config_2lc.InvalidateKeys(cnxn, [project_id])
+    self.field_row_2lc.InvalidateKeys(cnxn, [project_id])
+    self.InvalidateMemcacheForEntireProject(project_id)
+    return field_id
+
+  def _DeserializeFields(self, def_rows):
+    """Convert field defs into bi-directional mappings of names and IDs."""
+    field_id_to_name = {
+        field_id: field
+        for field_id, _pid, _rank, field, _doc in def_rows}
+    field_name_to_id = {
+        field.lower(): field_id
+        for field_id, field in field_id_to_name.items()}
+
+    return field_id_to_name, field_name_to_id
+
+  def GetFieldDefRows(self, cnxn, project_id):
+    """Get SQL result rows for all fields used in the specified project."""
+    pids_to_field_rows, misses = self.field_row_2lc.GetAll(cnxn, [project_id])
+    assert not misses
+    return pids_to_field_rows[project_id]
+
+  def _EnsureFieldCacheEntry(self, cnxn, project_id):
+    """Make sure that self.field_cache has an entry for project_id."""
+    if not self.field_cache.HasItem(project_id):
+      def_rows = self.GetFieldDefRows(cnxn, project_id)
+      self.field_cache.CacheItem(
+          project_id, self._DeserializeFields(def_rows))
+
+  def LookupField(self, cnxn, project_id, field_id):
+    """Lookup a field string given the field_id.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project where the label is defined or used.
+      field_id: int field ID.
+
+    Returns:
+      Field name string for the given field_id, or None.
+    """
+    self._EnsureFieldCacheEntry(cnxn, project_id)
+    field_id_to_name, _field_name_to_id = self.field_cache.GetItem(
+        project_id)
+    return field_id_to_name.get(field_id)
+
+  def LookupFieldID(self, cnxn, project_id, field):
+    """Look up a field ID.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project where the fields are defined.
+      field: field string.
+
+    Returns:
+      The field ID for the given field string.
+    """
+    self._EnsureFieldCacheEntry(cnxn, project_id)
+    _field_id_to_name, field_name_to_id = self.field_cache.GetItem(
+        project_id)
+    return field_name_to_id.get(field.lower())
+
+  def SoftDeleteFieldDefs(self, cnxn, project_id, field_ids):
+    """Mark the specified field as deleted, it will be reaped later."""
+    self.fielddef_tbl.Update(cnxn, {'is_deleted': True}, id=field_ids)
+    self.config_2lc.InvalidateKeys(cnxn, [project_id])
+    self.InvalidateMemcacheForEntireProject(project_id)
+
+  # TODO(jrobbins): GC deleted field defs after field values are gone.
+
+  def UpdateFieldDef(
+      self,
+      cnxn,
+      project_id,
+      field_id,
+      field_name=None,
+      applicable_type=None,
+      applicable_predicate=None,
+      is_required=None,
+      is_niche=None,
+      is_multivalued=None,
+      min_value=None,
+      max_value=None,
+      regex=None,
+      needs_member=None,
+      needs_perm=None,
+      grants_perm=None,
+      notify_on=None,
+      date_action=None,
+      docstring=None,
+      admin_ids=None,
+      editor_ids=None,
+      is_restricted_field=None):
+    """Update the specified field definition."""
+    new_values = {}
+    if field_name is not None:
+      new_values['field_name'] = field_name
+    if applicable_type is not None:
+      new_values['applicable_type'] = applicable_type
+    if applicable_predicate is not None:
+      new_values['applicable_predicate'] = applicable_predicate
+    if is_required is not None:
+      new_values['is_required'] = bool(is_required)
+    if is_niche is not None:
+      new_values['is_niche'] = bool(is_niche)
+    if is_multivalued is not None:
+      new_values['is_multivalued'] = bool(is_multivalued)
+    if min_value is not None:
+      new_values['min_value'] = min_value
+    if max_value is not None:
+      new_values['max_value'] = max_value
+    if regex is not None:
+      new_values['regex'] = regex
+    if needs_member is not None:
+      new_values['needs_member'] = needs_member
+    if needs_perm is not None:
+      new_values['needs_perm'] = needs_perm
+    if grants_perm is not None:
+      new_values['grants_perm'] = grants_perm
+    if notify_on is not None:
+      new_values['notify_on'] = NOTIFY_ON_ENUM[notify_on]
+    if date_action is not None:
+      new_values['date_action'] = date_action
+    if docstring is not None:
+      new_values['docstring'] = docstring
+    if is_restricted_field is not None:
+      new_values['is_restricted_field'] = is_restricted_field
+
+    self.fielddef_tbl.Update(cnxn, new_values, id=field_id, commit=False)
+    if admin_ids is not None:
+      self.fielddef2admin_tbl.Delete(cnxn, field_id=field_id, commit=False)
+      self.fielddef2admin_tbl.InsertRows(
+          cnxn,
+          FIELDDEF2ADMIN_COLS, [(field_id, admin_id) for admin_id in admin_ids],
+          commit=False)
+    if editor_ids is not None:
+      self.fielddef2editor_tbl.Delete(cnxn, field_id=field_id, commit=False)
+      self.fielddef2editor_tbl.InsertRows(
+          cnxn,
+          FIELDDEF2EDITOR_COLS,
+          [(field_id, editor_id) for editor_id in editor_ids],
+          commit=False)
+    cnxn.Commit()
+    self.config_2lc.InvalidateKeys(cnxn, [project_id])
+    self.InvalidateMemcacheForEntireProject(project_id)
+
+  ### Component definitions
+
+  def FindMatchingComponentIDsAnyProject(self, cnxn, path_list, exact=True):
+    """Look up component IDs across projects.
+
+    Args:
+      cnxn: connection to SQL database.
+      path_list: list of component path prefixes.
+      exact: set to False to include all components which have one of the
+          given paths as their ancestor, instead of exact matches.
+
+    Returns:
+      A list of component IDs of component's whose paths match path_list.
+    """
+    or_terms = []
+    args = []
+    for path in path_list:
+      or_terms.append('path = %s')
+      args.append(path)
+
+    if not exact:
+      for path in path_list:
+        or_terms.append('path LIKE %s')
+        args.append(path + '>%')
+
+    cond_str = '(' + ' OR '.join(or_terms) + ')'
+    rows = self.componentdef_tbl.Select(
+        cnxn, cols=['id'], where=[(cond_str, args)])
+    return [row[0] for row in rows]
+
+  def CreateComponentDef(
+      self, cnxn, project_id, path, docstring, deprecated, admin_ids, cc_ids,
+      created, creator_id, label_ids):
+    """Create a new component definition with the given info.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the current project.
+      path: string pathname of the new component.
+      docstring: string describing this field.
+      deprecated: whether or not this should be autocompleted
+      admin_ids: list of int IDs of users who can administer.
+      cc_ids: list of int IDs of users to notify when an issue in
+          this component is updated.
+      created: timestamp this component was created at.
+      creator_id: int ID of user who created this component.
+      label_ids: list of int IDs of labels to add when an issue is
+          in this component.
+
+    Returns:
+      Integer component_id of the new component definition.
+    """
+    component_id = self.componentdef_tbl.InsertRow(
+        cnxn, project_id=project_id, path=path, docstring=docstring,
+        deprecated=deprecated, created=created, creator_id=creator_id,
+        commit=False)
+    self.component2admin_tbl.InsertRows(
+        cnxn, COMPONENT2ADMIN_COLS,
+        [(component_id, admin_id) for admin_id in admin_ids],
+        commit=False)
+    self.component2cc_tbl.InsertRows(
+        cnxn, COMPONENT2CC_COLS,
+        [(component_id, cc_id) for cc_id in cc_ids],
+        commit=False)
+    self.component2label_tbl.InsertRows(
+        cnxn, COMPONENT2LABEL_COLS,
+        [(component_id, label_id) for label_id in label_ids],
+        commit=False)
+    cnxn.Commit()
+    self.config_2lc.InvalidateKeys(cnxn, [project_id])
+    self.InvalidateMemcacheForEntireProject(project_id)
+    return component_id
+
+  def UpdateComponentDef(
+      self, cnxn, project_id, component_id, path=None, docstring=None,
+      deprecated=None, admin_ids=None, cc_ids=None, created=None,
+      creator_id=None, modified=None, modifier_id=None,
+      label_ids=None):
+    """Update the specified component definition."""
+    new_values = {}
+    if path is not None:
+      assert path
+      new_values['path'] = path
+    if docstring is not None:
+      new_values['docstring'] = docstring
+    if deprecated is not None:
+      new_values['deprecated'] = deprecated
+    if created is not None:
+      new_values['created'] = created
+    if creator_id is not None:
+      new_values['creator_id'] = creator_id
+    if modified is not None:
+      new_values['modified'] = modified
+    if modifier_id is not None:
+      new_values['modifier_id'] = modifier_id
+
+    if admin_ids is not None:
+      self.component2admin_tbl.Delete(
+          cnxn, component_id=component_id, commit=False)
+      self.component2admin_tbl.InsertRows(
+          cnxn, COMPONENT2ADMIN_COLS,
+          [(component_id, admin_id) for admin_id in admin_ids],
+          commit=False)
+
+    if cc_ids is not None:
+      self.component2cc_tbl.Delete(
+          cnxn, component_id=component_id, commit=False)
+      self.component2cc_tbl.InsertRows(
+          cnxn, COMPONENT2CC_COLS,
+          [(component_id, cc_id) for cc_id in cc_ids],
+          commit=False)
+
+    if label_ids is not None:
+      self.component2label_tbl.Delete(
+          cnxn, component_id=component_id, commit=False)
+      self.component2label_tbl.InsertRows(
+          cnxn, COMPONENT2LABEL_COLS,
+          [(component_id, label_id) for label_id in label_ids],
+          commit=False)
+
+    self.componentdef_tbl.Update(
+        cnxn, new_values, id=component_id, commit=False)
+    cnxn.Commit()
+    self.config_2lc.InvalidateKeys(cnxn, [project_id])
+    self.InvalidateMemcacheForEntireProject(project_id)
+
+  def DeleteComponentDef(self, cnxn, project_id, component_id):
+    """Delete the specified component definition."""
+    self.componentdef_tbl.Update(
+        cnxn, {'is_deleted': True}, id=component_id, commit=False)
+
+    cnxn.Commit()
+    self.config_2lc.InvalidateKeys(cnxn, [project_id])
+    self.InvalidateMemcacheForEntireProject(project_id)
+
+  ### Memcache management
+
+  def InvalidateMemcache(self, issues, key_prefix=''):
+    """Delete the memcache entries for issues and their project-shard pairs."""
+    memcache.delete_multi(
+        [str(issue.issue_id) for issue in issues], key_prefix='issue:',
+        seconds=5, namespace=settings.memcache_namespace)
+    project_shards = set(
+        (issue.project_id, issue.issue_id % settings.num_logical_shards)
+        for issue in issues)
+    self._InvalidateMemcacheShards(project_shards, key_prefix=key_prefix)
+
+  def _InvalidateMemcacheShards(self, project_shards, key_prefix=''):
+    """Delete the memcache entries for the given project-shard pairs.
+
+    Deleting these rows does not delete the actual cached search results
+    but it does mean that they will be considered stale and thus not used.
+
+    Args:
+      project_shards: list of (pid, sid) pairs.
+      key_prefix: string to pass as memcache key prefix.
+    """
+    cache_entries = ['%d;%d' % ps for ps in project_shards]
+    # Whenever any project is invalidated, also invalidate the 'all'
+    # entry that is used in site-wide searches.
+    shard_id_set = {sid for _pid, sid in project_shards}
+    cache_entries.extend(('all;%d' % sid) for sid in shard_id_set)
+
+    memcache.delete_multi(
+        cache_entries, key_prefix=key_prefix,
+        namespace=settings.memcache_namespace)
+
+  def InvalidateMemcacheForEntireProject(self, project_id):
+    """Delete the memcache entries for all searches in a project."""
+    project_shards = set((project_id, shard_id)
+                         for shard_id in range(settings.num_logical_shards))
+    self._InvalidateMemcacheShards(project_shards)
+    memcache.delete_multi(
+        [str(project_id)], key_prefix='config:',
+        namespace=settings.memcache_namespace)
+    memcache.delete_multi(
+        [str(project_id)], key_prefix='label_rows:',
+        namespace=settings.memcache_namespace)
+    memcache.delete_multi(
+        [str(project_id)], key_prefix='status_rows:',
+        namespace=settings.memcache_namespace)
+    memcache.delete_multi(
+        [str(project_id)], key_prefix='field_rows:',
+        namespace=settings.memcache_namespace)
+
+  def UsersInvolvedInConfig(self, config, project_templates):
+    """Return a set of all user IDs referenced in the ProjectIssueConfig."""
+    result = set()
+    for template in project_templates:
+      result.update(tracker_bizobj.UsersInvolvedInTemplate(template))
+    for field in config.field_defs:
+      result.update(field.admin_ids)
+      result.update(field.editor_ids)
+    # TODO(jrobbins): add component owners, auto-cc, and admins.
+    return result
diff --git a/services/features_svc.py b/services/features_svc.py
new file mode 100644
index 0000000..471a513
--- /dev/null
+++ b/services/features_svc.py
@@ -0,0 +1,1381 @@
+# 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
+
+"""A class that provides persistence for Monorail's additional features.
+
+Business objects are described in tracker_pb2.py, features_pb2.py, and
+tracker_bizobj.py.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+import re
+import time
+
+import settings
+
+from features import features_constants
+from features import filterrules_helpers
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import sql
+from proto import features_pb2
+from services import caches
+from services import config_svc
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+QUICKEDITHISTORY_TABLE_NAME = 'QuickEditHistory'
+QUICKEDITMOSTRECENT_TABLE_NAME = 'QuickEditMostRecent'
+SAVEDQUERY_TABLE_NAME = 'SavedQuery'
+PROJECT2SAVEDQUERY_TABLE_NAME = 'Project2SavedQuery'
+SAVEDQUERYEXECUTESINPROJECT_TABLE_NAME = 'SavedQueryExecutesInProject'
+USER2SAVEDQUERY_TABLE_NAME = 'User2SavedQuery'
+FILTERRULE_TABLE_NAME = 'FilterRule'
+HOTLIST_TABLE_NAME = 'Hotlist'
+HOTLIST2ISSUE_TABLE_NAME = 'Hotlist2Issue'
+HOTLIST2USER_TABLE_NAME = 'Hotlist2User'
+
+
+QUICKEDITHISTORY_COLS = [
+    'user_id', 'project_id', 'slot_num', 'command', 'comment']
+QUICKEDITMOSTRECENT_COLS = ['user_id', 'project_id', 'slot_num']
+SAVEDQUERY_COLS = ['id', 'name', 'base_query_id', 'query']
+PROJECT2SAVEDQUERY_COLS = ['project_id', 'rank', 'query_id']
+SAVEDQUERYEXECUTESINPROJECT_COLS = ['query_id', 'project_id']
+USER2SAVEDQUERY_COLS = ['user_id', 'rank', 'query_id', 'subscription_mode']
+FILTERRULE_COLS = ['project_id', 'rank', 'predicate', 'consequence']
+HOTLIST_COLS = [
+    'id', 'name', 'summary', 'description', 'is_private', 'default_col_spec']
+HOTLIST_ABBR_COLS = ['id', 'name', 'summary', 'is_private']
+HOTLIST2ISSUE_COLS = [
+    'hotlist_id', 'issue_id', 'rank', 'adder_id', 'added', 'note']
+HOTLIST2USER_COLS = ['hotlist_id', 'user_id', 'role_name']
+
+
+# Regex for parsing one action in the filter rule consequence storage syntax.
+CONSEQUENCE_RE = re.compile(
+    r'(default_status:(?P<default_status>[-.\w]+))|'
+    r'(default_owner_id:(?P<default_owner_id>\d+))|'
+    r'(add_cc_id:(?P<add_cc_id>\d+))|'
+    r'(add_label:(?P<add_label>[-.\w]+))|'
+    r'(add_notify:(?P<add_notify>[-.@\w]+))|'
+    r'(warning:(?P<warning>.+))|'  # Warnings consume the rest of the string.
+    r'(error:(?P<error>.+))'  # Errors consume the rest of the string.
+    )
+
+class HotlistTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage both RAM and memcache for Hotlist PBs."""
+
+  def __init__(self, cachemanager, features_service):
+    super(HotlistTwoLevelCache, self).__init__(
+        cachemanager, 'hotlist', 'hotlist:', features_pb2.Hotlist)
+    self.features_service = features_service
+
+  def _DeserializeHotlists(
+      self, hotlist_rows, issue_rows, role_rows):
+    """Convert database rows into a dictionary of Hotlist PB keyed by ID.
+
+    Args:
+      hotlist_rows: a list of hotlist rows from HOTLIST_TABLE_NAME.
+      issue_rows: a list of issue rows from HOTLIST2ISSUE_TABLE_NAME,
+        ordered by rank DESC, issue_id.
+      role_rows: a list of role rows from HOTLIST2USER_TABLE_NAME.
+
+    Returns:
+      a dict mapping hotlist_id to hotlist PB"""
+    hotlist_dict = {}
+
+    for hotlist_row in hotlist_rows:
+      (hotlist_id, hotlist_name, summary, description, is_private,
+       default_col_spec) = hotlist_row
+      hotlist = features_pb2.MakeHotlist(
+          hotlist_name, hotlist_id=hotlist_id, summary=summary,
+          description=description, is_private=bool(is_private),
+          default_col_spec=default_col_spec)
+      hotlist_dict[hotlist_id] = hotlist
+
+    for (hotlist_id, issue_id, rank, adder_id, added, note) in issue_rows:
+      hotlist = hotlist_dict.get(hotlist_id)
+      if hotlist:
+        hotlist.items.append(
+            features_pb2.MakeHotlistItem(issue_id=issue_id, rank=rank,
+                                         adder_id=adder_id , date_added=added,
+                                         note=note))
+      else:
+        logging.warn('hotlist %d not found', hotlist_id)
+
+    for (hotlist_id, user_id, role_name) in role_rows:
+      hotlist = hotlist_dict.get(hotlist_id)
+      if not hotlist:
+        logging.warn('hotlist %d not found', hotlist_id)
+      elif role_name == 'owner':
+        hotlist.owner_ids.append(user_id)
+      elif role_name == 'editor':
+        hotlist.editor_ids.append(user_id)
+      elif role_name == 'follower':
+        hotlist.follower_ids.append(user_id)
+      else:
+        logging.info('unknown role name %s', role_name)
+
+    return hotlist_dict
+
+  def FetchItems(self, cnxn, keys):
+    """On RAM and memcache miss, hit the database to get missing hotlists."""
+    hotlist_rows = self.features_service.hotlist_tbl.Select(
+        cnxn, cols=HOTLIST_COLS, is_deleted=False, id=keys)
+    issue_rows = self.features_service.hotlist2issue_tbl.Select(
+        cnxn, cols=HOTLIST2ISSUE_COLS, hotlist_id=keys,
+        order_by=[('rank DESC', []), ('issue_id', [])])
+    role_rows = self.features_service.hotlist2user_tbl.Select(
+        cnxn, cols=HOTLIST2USER_COLS, hotlist_id=keys)
+    retrieved_dict = self._DeserializeHotlists(
+        hotlist_rows, issue_rows, role_rows)
+    return retrieved_dict
+
+
+class HotlistIDTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage both RAM and memcache for hotlist_ids.
+
+     Keys for this cache are tuples (hotlist_name.lower(), owner_id).
+     This cache should be used to fetch hotlist_ids owned by users or
+     to check if a user owns a hotlist with a certain name, so the
+     hotlist_names in keys will always be in lowercase.
+  """
+
+  def __init__(self, cachemanager, features_service):
+    super(HotlistIDTwoLevelCache, self).__init__(
+        cachemanager, 'hotlist_id', 'hotlist_id:', int,
+        max_size=settings.issue_cache_max_size)
+    self.features_service = features_service
+
+  def _MakeCache(self, cache_manager, kind, max_size=None):
+    """Override normal RamCache creation with ValueCentricRamCache."""
+    return caches.ValueCentricRamCache(cache_manager, kind, max_size=max_size)
+
+  def _KeyToStr(self, key):
+    """This cache uses pairs of (str, int) as keys. Convert them to strings."""
+    return '%s,%d' % key
+
+  def _StrToKey(self, key_str):
+    """This cache uses pairs of (str, int) as keys.
+       Convert them from strings.
+    """
+    hotlist_name_str, owner_id_str = key_str.split(',')
+    return (hotlist_name_str, int(owner_id_str))
+
+  def _DeserializeHotlistIDs(
+      self, hotlist_rows, owner_rows, wanted_names_for_owners):
+    """Convert database rows into a dictionary of hotlist_ids keyed by (
+       hotlist_name, owner_id).
+
+    Args:
+      hotlist_rows: a list of hotlist rows [id, name] from HOTLIST for
+        with names we are interested in.
+      owner_rows: a list of role rows [hotlist_id, uwer_id] from HOTLIST2USER
+        for owners that we are interested in that own hotlists with names that
+        we are interested in.
+      wanted_names_for_owners: a dict of
+        {owner_id: [hotlist_name.lower(), ...], ...}
+        so we know which (hotlist_name, owner_id) keys to return.
+
+    Returns:
+      A dict mapping (hotlist_name.lower(), owner_id) keys to hotlist_id values.
+    """
+    hotlist_ids_dict = {}
+    if not hotlist_rows or not owner_rows:
+      return hotlist_ids_dict
+
+    hotlist_to_owner_id = {}
+
+    # Note: owner_rows contains hotlist owners that we are interested in, but
+    # may not own hotlists with names we are interested in.
+    for (hotlist_id, user_id) in owner_rows:
+      found_owner_id = hotlist_to_owner_id.get(hotlist_id)
+      if found_owner_id:
+        logging.warn(
+            'hotlist %d has more than one owner: %d, %d',
+            hotlist_id, user_id, found_owner_id)
+      hotlist_to_owner_id[hotlist_id] = user_id
+
+    # Note: hotlist_rows hotlists found in the owner_rows that have names
+    # we're interested in.
+    # We use wanted_names_for_owners to filter out hotlists in hotlist_rows
+    # that have a (hotlist_name, owner_id) pair we are not interested in.
+    for (hotlist_id, hotlist_name) in hotlist_rows:
+      owner_id = hotlist_to_owner_id.get(hotlist_id)
+      if owner_id:
+        if hotlist_name.lower() in wanted_names_for_owners.get(owner_id, []):
+          hotlist_ids_dict[(hotlist_name.lower(), owner_id)] = hotlist_id
+
+    return hotlist_ids_dict
+
+  def FetchItems(self, cnxn, keys):
+    """On RAM and memcache miss, hit the database."""
+    hotlist_names, _owner_ids = zip(*keys)
+    # Keys may contain [(name1, user1), (name1, user2)] so we cast this to
+    # a set to make sure 'name1' is not repeated.
+    hotlist_names_set = set(hotlist_names)
+    # Pass this dict to _DeserializeHotlistIDs so it knows what hotlist names
+    # we're interested in for each owner.
+    wanted_names_for_owner = collections.defaultdict(list)
+    for hotlist_name, owner_id in keys:
+      wanted_names_for_owner[owner_id].append(hotlist_name.lower())
+
+    role_rows = self.features_service.hotlist2user_tbl.Select(
+        cnxn, cols=['hotlist_id', 'user_id'],
+        user_id=wanted_names_for_owner.keys(), role_name='owner')
+
+    hotlist_ids = [row[0] for row in role_rows]
+    hotlist_rows = self.features_service.hotlist_tbl.Select(
+        cnxn, cols=['id', 'name'], id=hotlist_ids, is_deleted=False,
+        where=[('LOWER(name) IN (%s)' % sql.PlaceHolders(hotlist_names_set),
+                [name.lower() for name in hotlist_names_set])])
+
+    return self._DeserializeHotlistIDs(
+        hotlist_rows, role_rows, wanted_names_for_owner)
+
+
+class FeaturesService(object):
+  """The persistence layer for servlets in the features directory."""
+
+  def __init__(self, cache_manager, config_service):
+    """Initialize this object so that it is ready to use.
+
+    Args:
+      cache_manager: local cache with distributed invalidation.
+      config_service: an instance of ConfigService.
+    """
+    self.quickedithistory_tbl = sql.SQLTableManager(QUICKEDITHISTORY_TABLE_NAME)
+    self.quickeditmostrecent_tbl = sql.SQLTableManager(
+        QUICKEDITMOSTRECENT_TABLE_NAME)
+
+    self.savedquery_tbl = sql.SQLTableManager(SAVEDQUERY_TABLE_NAME)
+    self.project2savedquery_tbl = sql.SQLTableManager(
+        PROJECT2SAVEDQUERY_TABLE_NAME)
+    self.savedqueryexecutesinproject_tbl = sql.SQLTableManager(
+        SAVEDQUERYEXECUTESINPROJECT_TABLE_NAME)
+    self.user2savedquery_tbl = sql.SQLTableManager(USER2SAVEDQUERY_TABLE_NAME)
+
+    self.filterrule_tbl = sql.SQLTableManager(FILTERRULE_TABLE_NAME)
+
+    self.hotlist_tbl = sql.SQLTableManager(HOTLIST_TABLE_NAME)
+    self.hotlist2issue_tbl = sql.SQLTableManager(HOTLIST2ISSUE_TABLE_NAME)
+    self.hotlist2user_tbl = sql.SQLTableManager(HOTLIST2USER_TABLE_NAME)
+
+    self.saved_query_cache = caches.RamCache(
+        cache_manager, 'user', max_size=1000)
+    self.canned_query_cache = caches.RamCache(
+        cache_manager, 'project', max_size=1000)
+
+    self.hotlist_2lc = HotlistTwoLevelCache(cache_manager, self)
+    self.hotlist_id_2lc = HotlistIDTwoLevelCache(cache_manager, self)
+    self.hotlist_user_to_ids = caches.RamCache(cache_manager, 'hotlist')
+
+    self.config_service = config_service
+
+  ### QuickEdit command history
+
+  def GetRecentCommands(self, cnxn, user_id, project_id):
+    """Return recent command items for the "Redo" menu.
+
+    Args:
+      cnxn: Connection to SQL database.
+      user_id: int ID of the current user.
+      project_id: int ID of the current project.
+
+    Returns:
+      A pair (cmd_slots, recent_slot_num).  cmd_slots is a list of
+      3-tuples that can be used to populate the "Redo" menu of the
+      quick-edit dialog.  recent_slot_num indicates which of those
+      slots should initially populate the command and comment fields.
+    """
+    # Always start with the standard 5 commands.
+    history = tracker_constants.DEFAULT_RECENT_COMMANDS[:]
+    # If the user has modified any, then overwrite some standard ones.
+    history_rows = self.quickedithistory_tbl.Select(
+        cnxn, cols=['slot_num', 'command', 'comment'],
+        user_id=user_id, project_id=project_id)
+    for slot_num, command, comment in history_rows:
+      if slot_num < len(history):
+        history[slot_num - 1] = (command, comment)
+
+    slots = []
+    for idx, (command, comment) in enumerate(history):
+      slots.append((idx + 1, command, comment))
+
+    recent_slot_num = self.quickeditmostrecent_tbl.SelectValue(
+        cnxn, 'slot_num', default=1, user_id=user_id, project_id=project_id)
+
+    return slots, recent_slot_num
+
+  def StoreRecentCommand(
+      self, cnxn, user_id, project_id, slot_num, command, comment):
+    """Store the given command and comment in the user's command history."""
+    self.quickedithistory_tbl.InsertRow(
+        cnxn, replace=True, user_id=user_id, project_id=project_id,
+        slot_num=slot_num, command=command, comment=comment)
+    self.quickeditmostrecent_tbl.InsertRow(
+        cnxn, replace=True, user_id=user_id, project_id=project_id,
+        slot_num=slot_num)
+
+  def ExpungeQuickEditHistory(self, cnxn, project_id):
+    """Completely delete every users' quick edit history for this project."""
+    self.quickeditmostrecent_tbl.Delete(cnxn, project_id=project_id)
+    self.quickedithistory_tbl.Delete(cnxn, project_id=project_id)
+
+  def ExpungeQuickEditsByUsers(self, cnxn, user_ids, limit=None):
+    """Completely delete every given users' quick edits.
+
+    This method will not commit the operations. This method will
+    not make changes to in-memory data.
+    """
+    commit = False
+    self.quickeditmostrecent_tbl.Delete(
+        cnxn, user_id=user_ids, commit=commit, limit=limit)
+    self.quickedithistory_tbl.Delete(
+        cnxn, user_id=user_ids, commit=commit, limit=limit)
+
+  ### Saved User and Project Queries
+
+  def GetSavedQueries(self, cnxn, query_ids):
+    """Retrieve the specified SaveQuery PBs."""
+    # TODO(jrobbins): RAM cache
+    if not query_ids:
+      return {}
+    saved_queries = {}
+    savedquery_rows = self.savedquery_tbl.Select(
+        cnxn, cols=SAVEDQUERY_COLS, id=query_ids)
+    for saved_query_tuple in savedquery_rows:
+      qid, name, base_id, query = saved_query_tuple
+      saved_queries[qid] = tracker_bizobj.MakeSavedQuery(
+          qid, name, base_id, query)
+
+    sqeip_rows = self.savedqueryexecutesinproject_tbl.Select(
+        cnxn, cols=SAVEDQUERYEXECUTESINPROJECT_COLS, query_id=query_ids)
+    for query_id, project_id in sqeip_rows:
+      saved_queries[query_id].executes_in_project_ids.append(project_id)
+
+    return saved_queries
+
+  def GetSavedQuery(self, cnxn, query_id):
+    """Retrieve the specified SaveQuery PB."""
+    saved_queries = self.GetSavedQueries(cnxn, [query_id])
+    return saved_queries.get(query_id)
+
+  def _GetUsersSavedQueriesDict(self, cnxn, user_ids):
+    """Return a dict of all SavedQuery PBs for the specified users."""
+    results_dict, missed_uids = self.saved_query_cache.GetAll(user_ids)
+
+    if missed_uids:
+      savedquery_rows = self.user2savedquery_tbl.Select(
+          cnxn, cols=SAVEDQUERY_COLS + ['user_id', 'subscription_mode'],
+          left_joins=[('SavedQuery ON query_id = id', [])],
+          order_by=[('rank', [])], user_id=missed_uids)
+      sqeip_dict = {}
+      if savedquery_rows:
+        query_ids = {row[0] for row in savedquery_rows}
+        sqeip_rows = self.savedqueryexecutesinproject_tbl.Select(
+            cnxn, cols=SAVEDQUERYEXECUTESINPROJECT_COLS, query_id=query_ids)
+        for qid, pid in sqeip_rows:
+          sqeip_dict.setdefault(qid, []).append(pid)
+
+      for saved_query_tuple in savedquery_rows:
+        query_id, name, base_id, query, uid, sub_mode = saved_query_tuple
+        sq = tracker_bizobj.MakeSavedQuery(
+            query_id, name, base_id, query, subscription_mode=sub_mode,
+            executes_in_project_ids=sqeip_dict.get(query_id, []))
+        results_dict.setdefault(uid, []).append(sq)
+
+    self.saved_query_cache.CacheAll(results_dict)
+    return results_dict
+
+  # TODO(jrobbins): change this termonology to "canned query" rather than
+  # "saved" throughout the application.
+  def GetSavedQueriesByUserID(self, cnxn, user_id):
+    """Return a list of SavedQuery PBs for the specified user."""
+    saved_queries_dict = self._GetUsersSavedQueriesDict(cnxn, [user_id])
+    saved_queries = saved_queries_dict.get(user_id, [])
+    return saved_queries[:]
+
+  def GetCannedQueriesForProjects(self, cnxn, project_ids):
+    """Return a dict {project_id: [saved_query]} for the specified projects."""
+    results_dict, missed_pids = self.canned_query_cache.GetAll(project_ids)
+
+    if missed_pids:
+      cannedquery_rows = self.project2savedquery_tbl.Select(
+          cnxn, cols=['project_id'] + SAVEDQUERY_COLS,
+          left_joins=[('SavedQuery ON query_id = id', [])],
+          order_by=[('rank', [])], project_id=project_ids)
+
+      for cq_row in cannedquery_rows:
+        project_id = cq_row[0]
+        canned_query_tuple = cq_row[1:]
+        results_dict.setdefault(project_id ,[]).append(
+            tracker_bizobj.MakeSavedQuery(*canned_query_tuple))
+
+    self.canned_query_cache.CacheAll(results_dict)
+    return results_dict
+
+  def GetCannedQueriesByProjectID(self, cnxn, project_id):
+    """Return the list of SavedQueries for the specified project."""
+    project_ids_to_canned_queries = self.GetCannedQueriesForProjects(
+        cnxn, [project_id])
+    return project_ids_to_canned_queries.get(project_id, [])
+
+  def _UpdateSavedQueries(self, cnxn, saved_queries, commit=True):
+    """Store the given SavedQueries to the DB."""
+    savedquery_rows = [
+        (sq.query_id or None, sq.name, sq.base_query_id, sq.query)
+        for sq in saved_queries]
+    existing_query_ids = [sq.query_id for sq in saved_queries if sq.query_id]
+    if existing_query_ids:
+      self.savedquery_tbl.Delete(cnxn, id=existing_query_ids, commit=commit)
+
+    generated_ids = self.savedquery_tbl.InsertRows(
+        cnxn, SAVEDQUERY_COLS, savedquery_rows, commit=commit,
+        return_generated_ids=True)
+    if generated_ids:
+      logging.info('generated_ids are %r', generated_ids)
+      for sq in saved_queries:
+        generated_id = generated_ids.pop(0)
+        if not sq.query_id:
+          sq.query_id = generated_id
+
+  def UpdateCannedQueries(self, cnxn, project_id, canned_queries):
+    """Update the canned queries for a project.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int project ID of the project that contains these queries.
+      canned_queries: list of SavedQuery PBs to update.
+    """
+    self.project2savedquery_tbl.Delete(
+        cnxn, project_id=project_id, commit=False)
+    self._UpdateSavedQueries(cnxn, canned_queries, commit=False)
+    project2savedquery_rows = [
+        (project_id, rank, sq.query_id)
+        for rank, sq in enumerate(canned_queries)]
+    self.project2savedquery_tbl.InsertRows(
+        cnxn, PROJECT2SAVEDQUERY_COLS, project2savedquery_rows,
+        commit=False)
+    cnxn.Commit()
+
+    self.canned_query_cache.Invalidate(cnxn, project_id)
+
+  def UpdateUserSavedQueries(self, cnxn, user_id, saved_queries):
+    """Store the given saved_queries for the given user."""
+    saved_query_ids = [sq.query_id for sq in saved_queries if sq.query_id]
+    self.savedqueryexecutesinproject_tbl.Delete(
+        cnxn, query_id=saved_query_ids, commit=False)
+    self.user2savedquery_tbl.Delete(cnxn, user_id=user_id, commit=False)
+
+    self._UpdateSavedQueries(cnxn, saved_queries, commit=False)
+    user2savedquery_rows = []
+    for rank, sq in enumerate(saved_queries):
+      user2savedquery_rows.append(
+          (user_id, rank, sq.query_id, sq.subscription_mode or 'noemail'))
+
+    self.user2savedquery_tbl.InsertRows(
+        cnxn, USER2SAVEDQUERY_COLS, user2savedquery_rows, commit=False)
+
+    sqeip_rows = []
+    for sq in saved_queries:
+      for pid in sq.executes_in_project_ids:
+        sqeip_rows.append((sq.query_id, pid))
+
+    self.savedqueryexecutesinproject_tbl.InsertRows(
+        cnxn, SAVEDQUERYEXECUTESINPROJECT_COLS, sqeip_rows, commit=False)
+    cnxn.Commit()
+
+    self.saved_query_cache.Invalidate(cnxn, user_id)
+
+  ### Subscriptions
+
+  def GetSubscriptionsInProjects(self, cnxn, project_ids):
+    """Return all saved queries for users that have any subscription there.
+
+    Args:
+      cnxn: Connection to SQL database.
+      project_ids: list of int project IDs that contain the modified issues.
+
+    Returns:
+      A dict {user_id: all_saved_queries, ...} for all users that have any
+      subscription in any of the specified projects.
+    """
+    sqeip_join_str = (
+        'SavedQueryExecutesInProject ON '
+        'SavedQueryExecutesInProject.query_id = User2SavedQuery.query_id')
+    user_join_str = (
+        'User ON '
+        'User.user_id = User2SavedQuery.user_id')
+    now = int(time.time())
+    absence_threshold = now - settings.subscription_timeout_secs
+    where = [
+        ('(User.banned IS NULL OR User.banned = %s)', ['']),
+        ('User.last_visit_timestamp >= %s', [absence_threshold]),
+        ('(User.email_bounce_timestamp IS NULL OR '
+         'User.email_bounce_timestamp = %s)', [0]),
+        ]
+    # TODO(jrobbins): cache this since it rarely changes.
+    subscriber_rows = self.user2savedquery_tbl.Select(
+        cnxn, cols=['User2SavedQuery.user_id'], distinct=True,
+        joins=[(sqeip_join_str, []), (user_join_str, [])],
+        subscription_mode='immediate', project_id=project_ids,
+        where=where)
+    subscriber_ids = [row[0] for row in subscriber_rows]
+    logging.info('subscribers relevant to projects %r are %r',
+                 project_ids, subscriber_ids)
+    user_ids_to_saved_queries = self._GetUsersSavedQueriesDict(
+        cnxn, subscriber_ids)
+    return user_ids_to_saved_queries
+
+  def ExpungeSavedQueriesExecuteInProject(self, cnxn, project_id):
+    """Remove any references from saved queries to projects in the database."""
+    self.savedqueryexecutesinproject_tbl.Delete(cnxn, project_id=project_id)
+
+    savedquery_rows = self.project2savedquery_tbl.Select(
+        cnxn, cols=['query_id'], project_id=project_id)
+    savedquery_ids = [row[0] for row in savedquery_rows]
+    self.project2savedquery_tbl.Delete(cnxn, project_id=project_id)
+    self.savedquery_tbl.Delete(cnxn, id=savedquery_ids)
+
+  def ExpungeSavedQueriesByUsers(self, cnxn, user_ids, limit=None):
+    """Completely delete every given users' saved queries.
+
+    This method will not commit the operations. This method will
+    not make changes to in-memory data.
+    """
+    commit = False
+    savedquery_rows = self.user2savedquery_tbl.Select(
+        cnxn, cols=['query_id'], user_id=user_ids, limit=limit)
+    savedquery_ids = [row[0] for row in savedquery_rows]
+    self.user2savedquery_tbl.Delete(
+        cnxn, query_id=savedquery_ids, commit=commit)
+    self.savedqueryexecutesinproject_tbl.Delete(
+        cnxn, query_id=savedquery_ids, commit=commit)
+    self.savedquery_tbl.Delete(cnxn, id=savedquery_ids, commit=commit)
+
+
+  ### Filter rules
+
+  def _DeserializeFilterRules(self, filterrule_rows):
+    """Convert the given DB row tuples into PBs."""
+    result_dict = collections.defaultdict(list)
+
+    for filterrule_row in sorted(filterrule_rows):
+      project_id, _rank, predicate, consequence = filterrule_row
+      (default_status, default_owner_id, add_cc_ids, add_labels,
+       add_notify, warning, error) = self._DeserializeRuleConsequence(
+          consequence)
+      rule = filterrules_helpers.MakeRule(
+          predicate, default_status=default_status,
+          default_owner_id=default_owner_id, add_cc_ids=add_cc_ids,
+          add_labels=add_labels, add_notify=add_notify, warning=warning,
+          error=error)
+      result_dict[project_id].append(rule)
+
+    return result_dict
+
+  def _DeserializeRuleConsequence(self, consequence):
+    """Decode the THEN-part of a filter rule."""
+    (default_status, default_owner_id, add_cc_ids, add_labels,
+     add_notify, warning, error) = None, None, [], [], [], None, None
+    for match in CONSEQUENCE_RE.finditer(consequence):
+      if match.group('default_status'):
+        default_status = match.group('default_status')
+      elif match.group('default_owner_id'):
+        default_owner_id = int(match.group('default_owner_id'))
+      elif match.group('add_cc_id'):
+        add_cc_ids.append(int(match.group('add_cc_id')))
+      elif match.group('add_label'):
+        add_labels.append(match.group('add_label'))
+      elif match.group('add_notify'):
+        add_notify.append(match.group('add_notify'))
+      elif match.group('warning'):
+        warning = match.group('warning')
+      elif match.group('error'):
+        error = match.group('error')
+
+    return (default_status, default_owner_id, add_cc_ids, add_labels,
+            add_notify, warning, error)
+
+  def _GetFilterRulesByProjectIDs(self, cnxn, project_ids):
+    """Return {project_id: [FilterRule, ...]} for the specified projects."""
+    # TODO(jrobbins): caching
+    filterrule_rows = self.filterrule_tbl.Select(
+        cnxn, cols=FILTERRULE_COLS, project_id=project_ids)
+    return self._DeserializeFilterRules(filterrule_rows)
+
+  def GetFilterRules(self, cnxn, project_id):
+    """Return a list of FilterRule PBs for the specified project."""
+    rules_by_project_id = self._GetFilterRulesByProjectIDs(cnxn, [project_id])
+    return rules_by_project_id[project_id]
+
+  def _SerializeRuleConsequence(self, rule):
+    """Put all actions of a filter rule into one string."""
+    assignments = []
+    for add_lab in rule.add_labels:
+      assignments.append('add_label:%s' % add_lab)
+    if rule.default_status:
+      assignments.append('default_status:%s' % rule.default_status)
+    if rule.default_owner_id:
+      assignments.append('default_owner_id:%d' % rule.default_owner_id)
+    for add_cc_id in rule.add_cc_ids:
+      assignments.append('add_cc_id:%d' % add_cc_id)
+    for add_notify in rule.add_notify_addrs:
+      assignments.append('add_notify:%s' % add_notify)
+    if rule.warning:
+      assignments.append('warning:%s' % rule.warning)
+    if rule.error:
+      assignments.append('error:%s' % rule.error)
+
+    return ' '.join(assignments)
+
+  def UpdateFilterRules(self, cnxn, project_id, rules):
+    """Update the filter rules part of a project's issue configuration.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the current project.
+      rules: a list of FilterRule PBs.
+    """
+    rows = []
+    for rank, rule in enumerate(rules):
+      predicate = rule.predicate
+      consequence = self._SerializeRuleConsequence(rule)
+      if predicate and consequence:
+        rows.append((project_id, rank, predicate, consequence))
+
+    self.filterrule_tbl.Delete(cnxn, project_id=project_id)
+    self.filterrule_tbl.InsertRows(cnxn, FILTERRULE_COLS, rows)
+
+  def ExpungeFilterRules(self, cnxn, project_id):
+    """Completely destroy filter rule info for the specified project."""
+    self.filterrule_tbl.Delete(cnxn, project_id=project_id)
+
+  def ExpungeFilterRulesByUser(self, cnxn, user_ids_by_email):
+    """Wipes any Filter Rules containing the given users.
+
+    This method will not commit the operation. This method will not make
+    changes to in-memory data.
+    Args:
+      cnxn: connection to SQL database.
+      user_ids_by_email: dict of {email: user_id ..} of all users we want to
+        expunge
+
+    Returns:
+      Dictionary of {project_id: [(predicate, consequence), ..]} for Filter
+      Rules that will be deleted for containing the given emails.
+    """
+    deleted_project_rules_dict = collections.defaultdict(list)
+    if user_ids_by_email:
+      deleted_rows = []
+      emails = user_ids_by_email.keys()
+      all_rules_rows = self.filterrule_tbl.Select(cnxn, FILTERRULE_COLS)
+      logging.info('Fetched all filter rules: %s' % (all_rules_rows,))
+      for rule_row in all_rules_rows:
+        project_id, _rank, predicate, consequence = rule_row
+        if any(email in predicate for email in emails):
+          deleted_rows.append(rule_row)
+          continue
+        if any(
+            (('add_notify:%s' % email) in consequence or
+             ('add_cc_id:%s' % user_id) in consequence or
+             ('default_owner_id:%s' % user_id) in consequence)
+            for email, user_id in user_ids_by_email.iteritems()):
+          deleted_rows.append(rule_row)
+          continue
+
+      for deleted_row in deleted_rows:
+        project_id, rank, predicate, consequence = deleted_row
+        self.filterrule_tbl.Delete(
+            cnxn, project_id=project_id, rank=rank, predicate=predicate,
+            consequence=consequence, commit=False)
+      deleted_project_rules_dict = self._DeserializeFilterRules(deleted_rows)
+
+    return deleted_project_rules_dict
+
+  ### Creating hotlists
+
+  def CreateHotlist(
+      self, cnxn, name, summary, description, owner_ids, editor_ids,
+      issue_ids=None, is_private=None, default_col_spec=None, ts=None):
+    # type: (MonorailConnection, string, string, string, Collection[int],
+    #     Optional[Collection[int]], Optional[Boolean], Optional[string],
+    #     Optional[int] -> int
+    """Create and store a Hotlist with the given attributes.
+
+    Args:
+      cnxn: connection to SQL database.
+      name: a valid hotlist name.
+      summary: one-line explanation of the hotlist.
+      description: one-page explanation of the hotlist.
+      owner_ids: a list of user IDs for the hotlist owners.
+      editor_ids: a list of user IDs for the hotlist editors.
+      issue_ids: a list of issue IDs for the hotlist issues.
+      is_private: True if the hotlist can only be viewed by owners and editors.
+      default_col_spec: the default columns that show in list view.
+      ts: a timestamp for when this hotlist was created.
+
+    Returns:
+      The int id of the new hotlist.
+
+    Raises:
+      InputException: if the hotlist name is invalid.
+      HotlistAlreadyExists: if any of the owners already own a hotlist with
+        the same name.
+      UnownedHotlistException: if owner_ids is empty.
+    """
+    # TODO(crbug.com/monorail/7677): These checks should be done in the
+    # the business layer.
+    # Remove when calls from non-business layer code are removed.
+    if not owner_ids:  # Should never happen.
+      logging.error('Attempt to create unowned Hotlist: name:%r', name)
+      raise UnownedHotlistException()
+    if not framework_bizobj.IsValidHotlistName(name):
+      raise exceptions.InputException(
+          '%s is not a valid name for a Hotlist' % name)
+    if self.LookupHotlistIDs(cnxn, [name], owner_ids):
+      raise HotlistAlreadyExists()
+    # TODO(crbug.com/monorail/7677): We are not setting a
+    # default default_col_spec in v3.
+    if default_col_spec is None:
+      default_col_spec = features_constants.DEFAULT_COL_SPEC
+
+    hotlist_item_fields = [
+        (issue_id, rank*100, owner_ids[0], ts, '') for
+        rank, issue_id in enumerate(issue_ids or [])]
+    hotlist = features_pb2.MakeHotlist(
+        name, hotlist_item_fields=hotlist_item_fields, summary=summary,
+        description=description, is_private=is_private, owner_ids=owner_ids,
+        editor_ids=editor_ids, default_col_spec=default_col_spec)
+    hotlist.hotlist_id = self._InsertHotlist(cnxn, hotlist)
+    return hotlist
+
+  def UpdateHotlist(
+      self, cnxn, hotlist_id, name=None, summary=None, description=None,
+      is_private=None, default_col_spec=None, owner_id=None,
+      add_editor_ids=None):
+    """Update the DB with the given hotlist information."""
+    # Note: If something is None, it does not get changed to None,
+    # it just does not get updated.
+    hotlist = self.GetHotlist(cnxn, hotlist_id, use_cache=False)
+    if not hotlist:
+      raise NoSuchHotlistException()
+
+    delta = {}
+    if name is not None:
+      delta['name'] = name
+    if summary is not None:
+      delta['summary'] = summary
+    if description is not None:
+      delta['description'] = description
+    if is_private is not None:
+      delta['is_private'] = is_private
+    if default_col_spec is not None:
+      delta['default_col_spec'] = default_col_spec
+
+    self.hotlist_tbl.Update(cnxn, delta, id=hotlist_id, commit=False)
+    insert_rows = []
+    if owner_id is not None:
+      insert_rows.append((hotlist_id, owner_id, 'owner'))
+      self.hotlist2user_tbl.Delete(
+          cnxn, hotlist_id=hotlist_id, role='owner', commit=False)
+    if add_editor_ids:
+      insert_rows.extend(
+          [(hotlist_id, user_id, 'editor') for user_id in add_editor_ids])
+    if insert_rows:
+      self.hotlist2user_tbl.InsertRows(
+          cnxn, HOTLIST2USER_COLS, insert_rows, commit=False)
+
+    cnxn.Commit()
+
+    self.hotlist_2lc.InvalidateKeys(cnxn, [hotlist_id])
+    if not hotlist.owner_ids:  # Should never happen.
+      logging.warn('Modifying unowned Hotlist: id:%r, name:%r',
+        hotlist_id, hotlist.name)
+    elif hotlist.name:
+      self.hotlist_id_2lc.InvalidateKeys(
+          cnxn, [(hotlist.name.lower(), owner_id) for
+                 owner_id in hotlist.owner_ids])
+
+    # Update the hotlist PB in RAM
+    if name is not None:
+      hotlist.name = name
+    if summary is not None:
+      hotlist.summary = summary
+    if description is not None:
+      hotlist.description = description
+    if is_private is not None:
+      hotlist.is_private = is_private
+    if default_col_spec is not None:
+      hotlist.default_col_spec = default_col_spec
+    if owner_id is not None:
+      hotlist.owner_ids = [owner_id]
+    if add_editor_ids:
+      hotlist.editor_ids.extend(add_editor_ids)
+
+  def RemoveHotlistEditors(self, cnxn, hotlist_id, remove_editor_ids):
+    # type: MonorailConnection, int, Collection[int]
+    """Remove given editors from the specified hotlist.
+
+    Args:
+      cnxn: MonorailConnection object.
+      hotlist_id: int ID of the Hotlist we want to update.
+      remove_editor_ids: collection of existing hotlist editor User IDs
+        that we want to remove from the hotlist.
+
+    Raises:
+      NoSuchHotlistException: if the hotlist is not found.
+      InputException: if there are not editors to remove.
+    """
+    if not remove_editor_ids:
+      raise exceptions.InputException
+    hotlist = self.GetHotlist(cnxn, hotlist_id, use_cache=False)
+    if not hotlist:
+      raise NoSuchHotlistException()
+
+    self.hotlist2user_tbl.Delete(
+        cnxn, hotlist_id=hotlist_id, user_id=remove_editor_ids)
+    self.hotlist_2lc.InvalidateKeys(cnxn, [hotlist_id])
+
+    # Update in-memory data
+    for remove_id in remove_editor_ids:
+      hotlist.editor_ids.remove(remove_id)
+
+  def UpdateHotlistIssues(
+      self,
+      cnxn,  # type: sql.MonorailConnection
+      hotlist_id,  # type: int
+      updated_items,  # type: Collection[features_pb2.HotlistItem]
+      remove_issue_ids,  # type: Collection[int]
+      issue_svc,  # type: issue_svc.IssueService
+      chart_svc,  # type: chart_svc.ChartService
+      commit=True  # type: Optional[bool]
+  ):
+    # type: (...) -> None
+    """Update the Issues in a Hotlist.
+       This method removes the given remove_issue_ids from a Hotlist then
+       updates or adds the HotlistItems found in updated_items. HotlistItems
+       in updated_items may exist in the hotlist and just need to be updated
+       or they may be new items that should be added to the Hotlist.
+
+    Args:
+      cnxn: MonorailConnection object.
+      hotlist_id: int ID of the Hotlist to update.
+      updated_items: Collection of HotlistItems that either already exist in
+        the hotlist and need to be updated or needed to be added to the hotlist.
+      remove_issue_ids: Collection of Issue IDs that should be removed from the
+        hotlist.
+      issue_svc: IssueService object.
+      chart_svc: ChartService object.
+
+    Raises:
+      NoSuchHotlistException if a hotlist with the given ID is not found.
+      InputException if no changes were given.
+    """
+    if not updated_items and not remove_issue_ids:
+      raise exceptions.InputException('No changes to make')
+
+    hotlist = self.GetHotlist(cnxn, hotlist_id, use_cache=False)
+    if not hotlist:
+      raise NoSuchHotlistException()
+
+    # Used to hold the updated Hotlist.items to use when updating
+    # the in-memory hotlist.
+    all_hotlist_items = list(hotlist.items)
+
+    # Used to hold ids of issues affected by this change for storing
+    # Issue Snapshots.
+    affected_issue_ids = set()
+
+    if remove_issue_ids:
+      affected_issue_ids.update(remove_issue_ids)
+      self.hotlist2issue_tbl.Delete(
+          cnxn, hotlist_id=hotlist_id, issue_id=remove_issue_ids, commit=False)
+      all_hotlist_items = filter(
+          lambda item: item.issue_id not in remove_issue_ids, all_hotlist_items)
+
+    if updated_items:
+      updated_issue_ids = [item.issue_id for item in updated_items]
+      affected_issue_ids.update(updated_issue_ids)
+      self.hotlist2issue_tbl.Delete(
+          cnxn, hotlist_id=hotlist_id, issue_id=updated_issue_ids, commit=False)
+      insert_rows = []
+      for item in updated_items:
+        insert_rows.append(
+            (
+                hotlist_id, item.issue_id, item.rank, item.adder_id,
+                item.date_added, item.note))
+      self.hotlist2issue_tbl.InsertRows(
+          cnxn, cols=HOTLIST2ISSUE_COLS, row_values=insert_rows, commit=False)
+      all_hotlist_items = filter(
+          lambda item: item.issue_id not in updated_issue_ids,
+          all_hotlist_items)
+      all_hotlist_items.extend(updated_items)
+
+    if commit:
+      cnxn.Commit()
+    self.hotlist_2lc.InvalidateKeys(cnxn, [hotlist_id])
+
+    # Update in-memory hotlist items.
+    hotlist.items = sorted(all_hotlist_items, key=lambda item: item.rank)
+
+    issues = issue_svc.GetIssues(cnxn, list(affected_issue_ids))
+    chart_svc.StoreIssueSnapshots(cnxn, issues, commit=commit)
+
+  # TODO(crbug/monorail/7104): {Add|Remove}IssuesToHotlists both call
+  # UpdateHotlistItems to add/remove issues from a hotlist.
+  # UpdateHotlistItemsFields is called by methods for reranking existing issues
+  # and updating HotlistItem notes.
+  # (1) We are removing notes from HotlistItems. crbug/monorail/####
+  # (2) our v3 AddHotlistItems will allow for inserting new issues to
+  # non-last ranks of a hotlist. So there could be some shared code
+  # for the reranking path and the adding issues path.
+  # UpdateHotlistIssues will be handling adding, removing, and reranking issues.
+  # {Add|Remove}IssueToHotlists, UpdateHotlistItems, UpdateHotlistItemFields
+  # should be removed, once all methods are updated to call UpdateHotlistIssues.
+
+  def AddIssueToHotlists(self, cnxn, hotlist_ids, issue_tuple, issue_svc,
+                         chart_svc, commit=True):
+    """Add a single issue, specified in the issue_tuple, to the given hotlists.
+
+    Args:
+      cnxn: connection to SQL database.
+      hotlist_ids: a list of hotlist_ids to add the issues to.
+      issue_tuple: (issue_id, user_id, ts, note) of the issue to be added.
+      issue_svc: an instance of IssueService.
+      chart_svc: an instance of ChartService.
+    """
+    self.AddIssuesToHotlists(cnxn, hotlist_ids, [issue_tuple], issue_svc,
+        chart_svc, commit=commit)
+
+  def AddIssuesToHotlists(self, cnxn, hotlist_ids, added_tuples, issue_svc,
+                          chart_svc, commit=True):
+    """Add the issues given in the added_tuples list to the given hotlists.
+
+    Args:
+      cnxn: connection to SQL database.
+      hotlist_ids: a list of hotlist_ids to add the issues to.
+      added_tuples: a list of (issue_id, user_id, ts, note)
+        for issues to be added.
+      issue_svc: an instance of IssueService.
+      chart_svc: an instance of ChartService.
+    """
+    for hotlist_id in hotlist_ids:
+      self.UpdateHotlistItems(cnxn, hotlist_id, [], added_tuples, commit=commit)
+
+    issues = issue_svc.GetIssues(cnxn,
+        [added_tuple[0] for added_tuple in added_tuples])
+    chart_svc.StoreIssueSnapshots(cnxn, issues, commit=commit)
+
+  def RemoveIssuesFromHotlists(self, cnxn, hotlist_ids, issue_ids, issue_svc,
+                               chart_svc, commit=True):
+    """Remove the issues given in issue_ids from the given hotlists.
+
+    Args:
+      cnxn: connection to SQL database.
+      hotlist_ids: a list of hotlist ids to remove the issues from.
+      issue_ids: a list of issue_ids to be removed.
+      issue_svc: an instance of IssueService.
+      chart_svc: an instance of ChartService.
+    """
+    for hotlist_id in hotlist_ids:
+      self.UpdateHotlistItems(cnxn, hotlist_id, issue_ids, [], commit=commit)
+
+    issues = issue_svc.GetIssues(cnxn, issue_ids)
+    chart_svc.StoreIssueSnapshots(cnxn, issues, commit=commit)
+
+  def UpdateHotlistItems(
+      self, cnxn, hotlist_id, remove, added_tuples, commit=True):
+    """Updates a hotlist's list of hotlistissues.
+
+    Args:
+      cnxn: connection to SQL database.
+      hotlist_id: the ID of the hotlist to update.
+      remove: a list of issue_ids for be removed.
+      added_tuples: a list of (issue_id, user_id, ts, note)
+        for issues to be added.
+    """
+    hotlist = self.GetHotlist(cnxn, hotlist_id, use_cache=False)
+    if not hotlist:
+      raise NoSuchHotlistException()
+
+    # adding new Hotlistissues, ignoring pairs where issue_id is already in
+    # hotlist's iid_rank_pairs
+    current_issues_ids = {
+        item.issue_id for item in hotlist.items}
+
+    self.hotlist2issue_tbl.Delete(
+        cnxn, hotlist_id=hotlist_id,
+        issue_id=[remove_id for remove_id in remove
+                  if remove_id in current_issues_ids],
+        commit=False)
+    if hotlist.items:
+      items_sorted = sorted(hotlist.items, key=lambda item: item.rank)
+      rank_base = items_sorted[-1].rank + 10
+    else:
+      rank_base = 1
+    insert_rows = [
+        (hotlist_id, issue_id, rank*10 + rank_base, user_id, ts, note)
+        for (rank, (issue_id, user_id, ts, note)) in enumerate(added_tuples)
+        if issue_id not in current_issues_ids]
+    self.hotlist2issue_tbl.InsertRows(
+        cnxn, cols=HOTLIST2ISSUE_COLS, row_values=insert_rows, commit=commit)
+    self.hotlist_2lc.InvalidateKeys(cnxn, [hotlist_id])
+
+    # removing an issue that was never in the hotlist would not cause any
+    # problems.
+    items = [
+        item for item in hotlist.items if
+        item.issue_id not in remove]
+
+    new_hotlist_items = [
+        features_pb2.MakeHotlistItem(issue_id, rank, user_id, ts, note)
+        for (_hid, issue_id, rank, user_id, ts, note) in insert_rows]
+    items.extend(new_hotlist_items)
+    hotlist.items = items
+
+  def UpdateHotlistItemsFields(
+      self, cnxn, hotlist_id, new_ranks=None, new_notes=None, commit=True):
+    """Updates rankings or notes of hotlistissues.
+
+    Args:
+      cnxn: connection to SQL database.
+      hotlist_id: the ID of the hotlist to update.
+      new_ranks : This should be a dictionary of {issue_id: rank}.
+      new_notes: This should be a diciontary of {issue_id: note}.
+      commit: set to False to skip the DB commit and do it in the caller.
+    """
+    hotlist = self.GetHotlist(cnxn, hotlist_id, use_cache=False)
+    if not hotlist:
+      raise NoSuchHotlistException()
+    if new_ranks is None:
+      new_ranks = {}
+    if new_notes is None:
+      new_notes = {}
+    issue_ids = []
+    insert_rows = []
+
+    # Update the hotlist PB in RAM
+    for hotlist_item in hotlist.items:
+      item_updated = False
+      if hotlist_item.issue_id in new_ranks:
+        # Update rank before adding it to insert_rows
+        hotlist_item.rank = new_ranks[hotlist_item.issue_id]
+        item_updated = True
+      if hotlist_item.issue_id in new_notes:
+        # Update note before adding it to insert_rows
+        hotlist_item.note = new_notes[hotlist_item.issue_id]
+        item_updated = True
+      if item_updated:
+        issue_ids.append(hotlist_item.issue_id)
+        insert_rows.append((
+            hotlist_id, hotlist_item.issue_id, hotlist_item.rank,
+            hotlist_item.adder_id, hotlist_item.date_added, hotlist_item.note))
+    hotlist.items = sorted(hotlist.items, key=lambda item: item.rank)
+    self.hotlist2issue_tbl.Delete(
+        cnxn, hotlist_id=hotlist_id, issue_id=issue_ids, commit=False)
+
+    self.hotlist2issue_tbl.InsertRows(
+        cnxn, cols=HOTLIST2ISSUE_COLS , row_values=insert_rows, commit=commit)
+    self.hotlist_2lc.InvalidateKeys(cnxn, [hotlist_id])
+
+  def _InsertHotlist(self, cnxn, hotlist):
+    """Insert the given hotlist into the database."""
+    hotlist_id = self.hotlist_tbl.InsertRow(
+        cnxn, name=hotlist.name, summary=hotlist.summary,
+        description=hotlist.description, is_private=hotlist.is_private,
+        default_col_spec=hotlist.default_col_spec)
+    logging.info('stored hotlist was given id %d', hotlist_id)
+
+    self.hotlist2issue_tbl.InsertRows(
+        cnxn, HOTLIST2ISSUE_COLS,
+        [(hotlist_id, issue.issue_id, issue.rank,
+          issue.adder_id, issue.date_added, issue.note)
+         for issue in hotlist.items],
+        commit=False)
+    self.hotlist2user_tbl.InsertRows(
+        cnxn, HOTLIST2USER_COLS,
+        [(hotlist_id, user_id, 'owner')
+         for user_id in hotlist.owner_ids] +
+        [(hotlist_id, user_id, 'editor')
+         for user_id in hotlist.editor_ids] +
+        [(hotlist_id, user_id, 'follower')
+         for user_id in hotlist.follower_ids])
+
+    self.hotlist_user_to_ids.InvalidateKeys(cnxn, hotlist.owner_ids)
+
+    return hotlist_id
+
+  def TransferHotlistOwnership(
+      self, cnxn, hotlist, new_owner_id, remain_editor, commit=True):
+    """Transfers ownership of a hotlist to a new owner."""
+    new_editor_ids = hotlist.editor_ids
+    if remain_editor:
+      new_editor_ids.extend(hotlist.owner_ids)
+    if new_owner_id in new_editor_ids:
+      new_editor_ids.remove(new_owner_id)
+    new_follower_ids = hotlist.follower_ids
+    if new_owner_id in new_follower_ids:
+      new_follower_ids.remove(new_owner_id)
+    self.UpdateHotlistRoles(
+        cnxn, hotlist.hotlist_id, [new_owner_id], new_editor_ids,
+        new_follower_ids, commit=commit)
+
+  ### Lookup hotlist IDs
+
+  def LookupHotlistIDs(self, cnxn, hotlist_names, owner_ids):
+    """Return a dict of (name, owner_id) mapped to hotlist_id for all hotlists
+    with one of the given names and any of the given owners. Hotlists that
+    match multiple owners will be in the dict multiple times."""
+    id_dict, _missed_keys = self.hotlist_id_2lc.GetAll(
+        cnxn, [(name.lower(), owner_id)
+               for name in hotlist_names for owner_id in owner_ids])
+    return id_dict
+
+  def LookupUserHotlists(self, cnxn, user_ids):
+    """Return a dict of {user_id: [hotlist_id,...]} for all user_ids."""
+    id_dict, missed_ids = self.hotlist_user_to_ids.GetAll(user_ids)
+    if missed_ids:
+      retrieved_dict = {user_id: [] for user_id in missed_ids}
+      id_rows = self.hotlist2user_tbl.Select(
+          cnxn, cols=['user_id', 'hotlist_id'], user_id=user_ids,
+          left_joins=[('Hotlist ON hotlist_id = id', [])],
+          where=[('Hotlist.is_deleted = %s', [False])])
+      for (user_id, hotlist_id) in id_rows:
+        retrieved_dict[user_id].append(hotlist_id)
+      self.hotlist_user_to_ids.CacheAll(retrieved_dict)
+      id_dict.update(retrieved_dict)
+
+    return id_dict
+
+  def LookupIssueHotlists(self, cnxn, issue_ids):
+    """Return a dict of {issue_id: [hotlist_id,...]} for all issue_ids."""
+    # TODO(jojwang): create hotlist_issue_to_ids cache
+    retrieved_dict = {issue_id: [] for issue_id in issue_ids}
+    id_rows = self.hotlist2issue_tbl.Select(
+        cnxn, cols=['hotlist_id', 'issue_id'], issue_id=issue_ids,
+        left_joins=[('Hotlist ON hotlist_id = id', [])],
+        where=[('Hotlist.is_deleted = %s', [False])])
+    for hotlist_id, issue_id in id_rows:
+      retrieved_dict[issue_id].append(hotlist_id)
+    return retrieved_dict
+
+  def GetProjectIDsFromHotlist(self, cnxn, hotlist_id):
+    project_id_rows = self.hotlist2issue_tbl.Select(cnxn,
+        cols=['Issue.project_id'], hotlist_id=hotlist_id, distinct=True,
+        left_joins=[('Issue ON issue_id = id', [])])
+    return [row[0] for row in project_id_rows]
+
+  ### Get hotlists
+  def GetHotlists(self, cnxn, hotlist_ids, use_cache=True):
+    """Returns dict of {hotlist_id: hotlist PB}."""
+    hotlists_dict, missed_ids = self.hotlist_2lc.GetAll(
+        cnxn, hotlist_ids, use_cache=use_cache)
+
+    if missed_ids:
+      raise NoSuchHotlistException()
+
+    return hotlists_dict
+
+  def GetHotlistsByUserID(self, cnxn, user_id, use_cache=True):
+    """Get a list of hotlist PBs for a given user."""
+    hotlist_id_dict = self.LookupUserHotlists(cnxn, [user_id])
+    hotlists = self.GetHotlists(
+        cnxn, hotlist_id_dict.get(user_id, []), use_cache=use_cache)
+    return list(hotlists.values())
+
+  def GetHotlistsByIssueID(self, cnxn, issue_id, use_cache=True):
+    """Get a list of hotlist PBs for a given issue."""
+    hotlist_id_dict = self.LookupIssueHotlists(cnxn, [issue_id])
+    hotlists = self.GetHotlists(
+        cnxn, hotlist_id_dict.get(issue_id, []), use_cache=use_cache)
+    return list(hotlists.values())
+
+  def GetHotlist(self, cnxn, hotlist_id, use_cache=True):
+    """Returns hotlist PB."""
+    hotlist_dict = self.GetHotlists(cnxn, [hotlist_id], use_cache=use_cache)
+    return hotlist_dict[hotlist_id]
+
+  def GetHotlistsByID(self, cnxn, hotlist_ids, use_cache=True):
+    """Load all the Hotlist PBs for the given hotlists.
+
+    Args:
+      cnxn: connection to SQL database.
+      hotlist_ids: list of hotlist ids.
+      use_cache: specifiy False to force database query.
+
+    Returns:
+      A dict mapping ids to the corresponding Hotlist protocol buffers and
+      a list of any hotlist_ids that were not found.
+    """
+    hotlists_dict, missed_ids = self.hotlist_2lc.GetAll(
+        cnxn, hotlist_ids, use_cache=use_cache)
+    return hotlists_dict, missed_ids
+
+  def GetHotlistByID(self, cnxn, hotlist_id, use_cache=True):
+    """Load the specified hotlist from the database, None if does not exist."""
+    hotlist_dict, _ = self.GetHotlistsByID(
+        cnxn, [hotlist_id], use_cache=use_cache)
+    return hotlist_dict.get(hotlist_id)
+
+  def UpdateHotlistRoles(
+      self, cnxn, hotlist_id, owner_ids, editor_ids, follower_ids, commit=True):
+    """"Store the hotlist's roles in the DB."""
+    # This will be a newly contructed object, not from the cache and not
+    # shared with any other thread.
+    hotlist = self.GetHotlist(cnxn, hotlist_id, use_cache=False)
+    if not hotlist:
+      raise NoSuchHotlistException()
+
+    self.hotlist2user_tbl.Delete(
+        cnxn, hotlist_id=hotlist_id, commit=False)
+
+    insert_rows = [(hotlist_id, user_id, 'owner') for user_id in owner_ids]
+    insert_rows.extend(
+        [(hotlist_id, user_id, 'editor') for user_id in editor_ids])
+    insert_rows.extend(
+        [(hotlist_id, user_id, 'follower') for user_id in follower_ids])
+    self.hotlist2user_tbl.InsertRows(
+        cnxn, HOTLIST2USER_COLS, insert_rows, commit=False)
+
+    if commit:
+      cnxn.Commit()
+    self.hotlist_2lc.InvalidateKeys(cnxn, [hotlist_id])
+    self.hotlist_user_to_ids.InvalidateKeys(cnxn, hotlist.owner_ids)
+    hotlist.owner_ids = owner_ids
+    hotlist.editor_ids = editor_ids
+    hotlist.follower_ids = follower_ids
+
+  def DeleteHotlist(self, cnxn, hotlist_id, commit=True):
+    hotlist = self.GetHotlist(cnxn, hotlist_id, use_cache=False)
+    if not hotlist:
+      raise NoSuchHotlistException()
+
+    # Fetch all associated project IDs in order to invalidate their cache.
+    project_ids = self.GetProjectIDsFromHotlist(cnxn, hotlist_id)
+
+    delta = {'is_deleted': True}
+    self.hotlist_tbl.Update(cnxn, delta, id=hotlist_id, commit=commit)
+
+    self.hotlist_2lc.InvalidateKeys(cnxn, [hotlist_id])
+    self.hotlist_user_to_ids.InvalidateKeys(cnxn, hotlist.owner_ids)
+    self.hotlist_user_to_ids.InvalidateKeys(cnxn, hotlist.editor_ids)
+    if not hotlist.owner_ids:  # Should never happen.
+      logging.warn('Soft-deleting unowned Hotlist: id:%r, name:%r',
+        hotlist_id, hotlist.name)
+    elif hotlist.name:
+      self.hotlist_id_2lc.InvalidateKeys(
+          cnxn, [(hotlist.name.lower(), owner_id) for
+                 owner_id in hotlist.owner_ids])
+
+    for project_id in project_ids:
+      self.config_service.InvalidateMemcacheForEntireProject(project_id)
+
+  def ExpungeHotlists(
+      self, cnxn, hotlist_ids, star_svc, user_svc, chart_svc, commit=True):
+    """Wipes the given hotlists from the DB tables.
+
+    This method will only do cache invalidation if commit is set to True.
+
+    Args:
+      cnxn: connection to SQL database.
+      hotlist_ids: the ID of the hotlists to Expunge.
+      star_svc: an instance of a HotlistStarService.
+      user_svc: an instance of a UserService.
+      chart_svc: an instance of a ChartService.
+      commit: set to False to skip the DB commit and do it in the caller.
+    """
+
+    hotlists_by_id = self.GetHotlists(cnxn, hotlist_ids)
+
+    for hotlist_id in hotlist_ids:
+      star_svc.ExpungeStars(cnxn, hotlist_id, commit=commit)
+    chart_svc.ExpungeHotlistsFromIssueSnapshots(
+        cnxn, hotlist_ids, commit=commit)
+    user_svc.ExpungeHotlistsFromHistory(cnxn, hotlist_ids, commit=commit)
+    self.hotlist2user_tbl.Delete(cnxn, hotlist_id=hotlist_ids, commit=commit)
+    self.hotlist2issue_tbl.Delete(cnxn, hotlist_id=hotlist_ids, commit=commit)
+    self.hotlist_tbl.Delete(cnxn, id=hotlist_ids, commit=commit)
+
+    # Invalidate cache for deleted hotlists.
+    self.hotlist_2lc.InvalidateKeys(cnxn, hotlist_ids)
+    users_to_invalidate = set()
+    for hotlist in hotlists_by_id.values():
+      users_to_invalidate.update(
+          hotlist.owner_ids + hotlist.editor_ids + hotlist.follower_ids)
+      self.hotlist_id_2lc.InvalidateKeys(
+          cnxn, [(hotlist.name, owner_id) for owner_id in hotlist.owner_ids])
+    self.hotlist_user_to_ids.InvalidateKeys(cnxn, list(users_to_invalidate))
+    hotlist_project_ids = set()
+    for hotlist_id in hotlist_ids:
+      hotlist_project_ids.update(self.GetProjectIDsFromHotlist(
+          cnxn, hotlist_id))
+    for project_id in hotlist_project_ids:
+      self.config_service.InvalidateMemcacheForEntireProject(project_id)
+
+  def ExpungeUsersInHotlists(
+      self, cnxn, user_ids, star_svc, user_svc, chart_svc):
+    """Wipes the given users and any hotlists they owned from the
+       hotlists system.
+
+    This method will not commit the operation. This method will not make
+    changes to in-memory data.
+    """
+    # Transfer hotlist ownership to editors, if possible.
+    hotlist_ids_by_user_id = self.LookupUserHotlists(cnxn, user_ids)
+    hotlist_ids = [hotlist_id for hotlist_ids in hotlist_ids_by_user_id.values()
+                   for hotlist_id in hotlist_ids]
+    hotlists_by_id, missed = self.GetHotlistsByID(
+        cnxn, list(set(hotlist_ids)), use_cache=False)
+    logging.info('Missed hotlists: %s', missed)
+
+    hotlists_to_delete = []
+    for hotlist_id, hotlist in hotlists_by_id.items():
+      # One of the users to be deleted is an owner of hotlist.
+      if not set(hotlist.owner_ids).isdisjoint(user_ids):
+        hotlists_to_delete.append(hotlist_id)
+        candidate_new_owners = [user_id for user_id in hotlist.editor_ids
+                                if user_id not in user_ids]
+        for candidate_id in candidate_new_owners:
+          if not self.LookupHotlistIDs(cnxn, [hotlist.name], [candidate_id]):
+            self.TransferHotlistOwnership(
+                cnxn, hotlist, candidate_id, False, commit=False)
+            # Hotlist transferred successfully. No need to delete it.
+            hotlists_to_delete.remove(hotlist_id)
+            break
+
+    # Delete users
+    self.hotlist2user_tbl.Delete(cnxn, user_id=user_ids, commit=False)
+    self.hotlist2issue_tbl.Update(
+        cnxn, {'adder_id': framework_constants.DELETED_USER_ID},
+        adder_id=user_ids, commit=False)
+    user_svc.ExpungeUsersHotlistsHistory(cnxn, user_ids, commit=False)
+    # Delete hotlists
+    if hotlists_to_delete:
+      self.ExpungeHotlists(
+          cnxn, hotlists_to_delete, star_svc, user_svc, chart_svc, commit=False)
+
+
+class HotlistAlreadyExists(Exception):
+  """Tried to create a hotlist with the same name as another hotlist
+  with the same owner."""
+  pass
+
+
+class NoSuchHotlistException(Exception):
+  """The requested hotlist was not found."""
+  pass
+
+
+class UnownedHotlistException(Exception):
+  """Tried to create a hotlist with no owner."""
+  pass
diff --git a/services/fulltext_helpers.py b/services/fulltext_helpers.py
new file mode 100644
index 0000000..80d4264
--- /dev/null
+++ b/services/fulltext_helpers.py
@@ -0,0 +1,126 @@
+# 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
+
+"""A set of helpers functions for fulltext search."""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import logging
+
+from google.appengine.api import search
+
+import settings
+from proto import ast_pb2
+from proto import tracker_pb2
+from search import query2ast
+
+# GAE search API can only respond with 500 results per call.
+_SEARCH_RESULT_CHUNK_SIZE = 500
+
+
+def BuildFTSQuery(query_ast_conj, fulltext_fields):
+  """Convert a Monorail query AST into a GAE search query string.
+
+  Args:
+    query_ast_conj: a Conjunction PB with a list of Comparison PBs that each
+        have operator, field definitions, string values, and int values.
+        All Conditions should be AND'd together.
+    fulltext_fields: a list of string names of fields that may exist in the
+        fulltext documents.  E.g., issue fulltext documents have a "summary"
+        field.
+
+  Returns:
+    A string that can be passed to AppEngine's search API. Or, None if there
+    were no fulltext conditions, so no fulltext search should be done.
+  """
+  fulltext_parts = [
+      _BuildFTSCondition(cond, fulltext_fields)
+      for cond in query_ast_conj.conds]
+  if any(fulltext_parts):
+    return ' '.join(fulltext_parts)
+  else:
+    return None
+
+
+def _BuildFTSCondition(cond, fulltext_fields):
+  """Convert one query AST condition into a GAE search query string."""
+  if cond.op == ast_pb2.QueryOp.NOT_TEXT_HAS:
+    neg = 'NOT '
+  elif cond.op == ast_pb2.QueryOp.TEXT_HAS:
+    neg = ''
+  else:
+    return ''  # FTS only looks at TEXT_HAS and NOT_TEXT_HAS
+
+  parts = []
+
+  for fd in cond.field_defs:
+    if fd.field_name in fulltext_fields:
+      pattern = fd.field_name + ':"%s"'
+    elif fd.field_name == ast_pb2.ANY_FIELD:
+      pattern = '"%s"'
+    elif fd.field_id and fd.field_type == tracker_pb2.FieldTypes.STR_TYPE:
+      pattern = 'custom_' + str(fd.field_id) + ':"%s"'
+    else:
+      pattern = 'pylint does not handle else-continue'
+      continue  # This issue field is searched via SQL.
+
+    for value in cond.str_values:
+      # Strip out quotes around the value.
+      value = value.strip('"')
+      special_prefixes_match = any(
+          value.startswith(p) for p in query2ast.NON_OP_PREFIXES)
+      if not special_prefixes_match:
+        value = value.replace(':', ' ')
+        assert ('"' not in value), 'Value %r has a quote in it' % value
+      parts.append(pattern % value)
+
+  if parts:
+    return neg + '(%s)' % ' OR '.join(parts)
+  else:
+    return ''  # None of the fields were fulltext fields.
+
+
+def ComprehensiveSearch(fulltext_query, index_name):
+  """Call the GAE search API, and keep calling it to get all results.
+
+  Args:
+    fulltext_query: string in the GAE search API query language.
+    index_name: string name of the GAE fulltext index to hit.
+
+  Returns:
+    A list of integer issue IIDs or project IDs.
+  """
+  search_index = search.Index(name=index_name)
+
+  try:
+    response = search_index.search(search.Query(
+        fulltext_query,
+        options=search.QueryOptions(
+            limit=_SEARCH_RESULT_CHUNK_SIZE, returned_fields=[], ids_only=True,
+            cursor=search.Cursor())))
+  except ValueError as e:
+    raise query2ast.InvalidQueryError(e.message)
+
+  logging.info('got %d initial results', len(response.results))
+  ids = [int(result.doc_id) for result in response]
+
+  remaining_iterations = int(
+      (settings.fulltext_limit_per_shard - 1) // _SEARCH_RESULT_CHUNK_SIZE)
+  for _ in range(remaining_iterations):
+    if not response.cursor:
+      break
+    response = search_index.search(search.Query(
+        fulltext_query,
+        options=search.QueryOptions(
+            limit=_SEARCH_RESULT_CHUNK_SIZE, returned_fields=[], ids_only=True,
+            cursor=response.cursor)))
+    logging.info(
+        'got %d more results: %r', len(response.results), response.results)
+    ids.extend(int(result.doc_id) for result in response)
+
+  logging.info('FTS result ids %d', len(ids))
+  return ids
diff --git a/services/issue_svc.py b/services/issue_svc.py
new file mode 100644
index 0000000..eab85ab
--- /dev/null
+++ b/services/issue_svc.py
@@ -0,0 +1,2901 @@
+# 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
+
+"""A set of functions that provide persistence for Monorail issue tracking.
+
+This module provides functions to get, update, create, and (in some
+cases) delete each type of business object.  It provides a logical
+persistence layer on top of an SQL database.
+
+Business objects are described in tracker_pb2.py and tracker_bizobj.py.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import json
+import logging
+import os
+import time
+import uuid
+
+from google.appengine.api import app_identity
+from google.appengine.api import images
+from third_party import cloudstorage
+
+import settings
+from features import filterrules_helpers
+from framework import authdata
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import gcs_helpers
+from framework import permissions
+from framework import sql
+from infra_libs import ts_mon
+from proto import project_pb2
+from proto import tracker_pb2
+from services import caches
+from services import tracker_fulltext
+from tracker import tracker_bizobj
+from tracker import tracker_helpers
+
+# TODO(jojwang): monorail:4693, remove this after all 'stable-full'
+# gates have been renamed to 'stable'.
+FLT_EQUIVALENT_GATES = {'stable-full': 'stable',
+                        'stable': 'stable-full'}
+
+ISSUE_TABLE_NAME = 'Issue'
+ISSUESUMMARY_TABLE_NAME = 'IssueSummary'
+ISSUE2LABEL_TABLE_NAME = 'Issue2Label'
+ISSUE2COMPONENT_TABLE_NAME = 'Issue2Component'
+ISSUE2CC_TABLE_NAME = 'Issue2Cc'
+ISSUE2NOTIFY_TABLE_NAME = 'Issue2Notify'
+ISSUE2FIELDVALUE_TABLE_NAME = 'Issue2FieldValue'
+COMMENT_TABLE_NAME = 'Comment'
+COMMENTCONTENT_TABLE_NAME = 'CommentContent'
+COMMENTIMPORTER_TABLE_NAME = 'CommentImporter'
+ATTACHMENT_TABLE_NAME = 'Attachment'
+ISSUERELATION_TABLE_NAME = 'IssueRelation'
+DANGLINGRELATION_TABLE_NAME = 'DanglingIssueRelation'
+ISSUEUPDATE_TABLE_NAME = 'IssueUpdate'
+ISSUEFORMERLOCATIONS_TABLE_NAME = 'IssueFormerLocations'
+REINDEXQUEUE_TABLE_NAME = 'ReindexQueue'
+LOCALIDCOUNTER_TABLE_NAME = 'LocalIDCounter'
+ISSUESNAPSHOT_TABLE_NAME = 'IssueSnapshot'
+ISSUESNAPSHOT2CC_TABLE_NAME = 'IssueSnapshot2Cc'
+ISSUESNAPSHOT2COMPONENT_TABLE_NAME = 'IssueSnapshot2Component'
+ISSUESNAPSHOT2LABEL_TABLE_NAME = 'IssueSnapshot2Label'
+ISSUEPHASEDEF_TABLE_NAME = 'IssuePhaseDef'
+ISSUE2APPROVALVALUE_TABLE_NAME = 'Issue2ApprovalValue'
+ISSUEAPPROVAL2APPROVER_TABLE_NAME = 'IssueApproval2Approver'
+ISSUEAPPROVAL2COMMENT_TABLE_NAME = 'IssueApproval2Comment'
+
+
+ISSUE_COLS = [
+    'id', 'project_id', 'local_id', 'status_id', 'owner_id', 'reporter_id',
+    'opened', 'closed', 'modified',
+    'owner_modified', 'status_modified', 'component_modified',
+    'derived_owner_id', 'derived_status_id',
+    'deleted', 'star_count', 'attachment_count', 'is_spam']
+ISSUESUMMARY_COLS = ['issue_id', 'summary']
+ISSUE2LABEL_COLS = ['issue_id', 'label_id', 'derived']
+ISSUE2COMPONENT_COLS = ['issue_id', 'component_id', 'derived']
+ISSUE2CC_COLS = ['issue_id', 'cc_id', 'derived']
+ISSUE2NOTIFY_COLS = ['issue_id', 'email']
+ISSUE2FIELDVALUE_COLS = [
+    'issue_id', 'field_id', 'int_value', 'str_value', 'user_id', 'date_value',
+    'url_value', 'derived', 'phase_id']
+# Explicitly specify column 'Comment.id' to allow joins on other tables that
+# have an 'id' column.
+COMMENT_COLS = [
+    'Comment.id', 'issue_id', 'created', 'Comment.project_id', 'commenter_id',
+    'deleted_by', 'Comment.is_spam', 'is_description',
+    'commentcontent_id']  # Note: commentcontent_id must be last.
+COMMENTCONTENT_COLS = [
+    'CommentContent.id', 'content', 'inbound_message']
+COMMENTIMPORTER_COLS = ['comment_id', 'importer_id']
+ABBR_COMMENT_COLS = ['Comment.id', 'commenter_id', 'deleted_by',
+    'is_description']
+ATTACHMENT_COLS = [
+    'id', 'issue_id', 'comment_id', 'filename', 'filesize', 'mimetype',
+    'deleted', 'gcs_object_id']
+ISSUERELATION_COLS = ['issue_id', 'dst_issue_id', 'kind', 'rank']
+ABBR_ISSUERELATION_COLS = ['dst_issue_id', 'rank']
+DANGLINGRELATION_COLS = [
+    'issue_id', 'dst_issue_project', 'dst_issue_local_id',
+    'ext_issue_identifier', 'kind']
+ISSUEUPDATE_COLS = [
+    'id', 'issue_id', 'comment_id', 'field', 'old_value', 'new_value',
+    'added_user_id', 'removed_user_id', 'custom_field_name']
+ISSUEFORMERLOCATIONS_COLS = ['issue_id', 'project_id', 'local_id']
+REINDEXQUEUE_COLS = ['issue_id', 'created']
+ISSUESNAPSHOT_COLS = ['id', 'issue_id', 'shard', 'project_id', 'local_id',
+    'reporter_id', 'owner_id', 'status_id', 'period_start', 'period_end',
+    'is_open']
+ISSUESNAPSHOT2CC_COLS = ['issuesnapshot_id', 'cc_id']
+ISSUESNAPSHOT2COMPONENT_COLS = ['issuesnapshot_id', 'component_id']
+ISSUESNAPSHOT2LABEL_COLS = ['issuesnapshot_id', 'label_id']
+ISSUEPHASEDEF_COLS = ['id', 'name', 'rank']
+ISSUE2APPROVALVALUE_COLS = ['approval_id', 'issue_id', 'phase_id',
+                            'status', 'setter_id', 'set_on']
+ISSUEAPPROVAL2APPROVER_COLS = ['approval_id', 'approver_id', 'issue_id']
+ISSUEAPPROVAL2COMMENT_COLS = ['approval_id', 'comment_id']
+
+CHUNK_SIZE = 1000
+
+
+class IssueIDTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage RAM and memcache for Issue IDs."""
+
+  def __init__(self, cache_manager, issue_service):
+    super(IssueIDTwoLevelCache, self).__init__(
+        cache_manager, 'issue_id', 'issue_id:', int,
+        max_size=settings.issue_cache_max_size)
+    self.issue_service = issue_service
+
+  def _MakeCache(self, cache_manager, kind, max_size=None):
+    """Override normal RamCache creation with ValueCentricRamCache."""
+    return caches.ValueCentricRamCache(cache_manager, kind, max_size=max_size)
+
+  def _DeserializeIssueIDs(self, project_local_issue_ids):
+    """Convert database rows into a dict {(project_id, local_id): issue_id}."""
+    return {(project_id, local_id): issue_id
+            for (project_id, local_id, issue_id) in project_local_issue_ids}
+
+  def FetchItems(self, cnxn, keys):
+    """On RAM and memcache miss, hit the database."""
+    local_ids_by_pid = collections.defaultdict(list)
+    for project_id, local_id in keys:
+      local_ids_by_pid[project_id].append(local_id)
+
+    where = []  # We OR per-project pairs of conditions together.
+    for project_id, local_ids_in_project in local_ids_by_pid.items():
+      term_str = ('(Issue.project_id = %%s AND Issue.local_id IN (%s))' %
+                  sql.PlaceHolders(local_ids_in_project))
+      where.append((term_str, [project_id] + local_ids_in_project))
+
+    rows = self.issue_service.issue_tbl.Select(
+        cnxn, cols=['project_id', 'local_id', 'id'],
+        where=where, or_where_conds=True)
+    return self._DeserializeIssueIDs(rows)
+
+  def _KeyToStr(self, key):
+    """This cache uses pairs of ints as keys. Convert them to strings."""
+    return '%d,%d' % key
+
+  def _StrToKey(self, key_str):
+    """This cache uses pairs of ints as keys. Convert them from strings."""
+    project_id_str, local_id_str = key_str.split(',')
+    return int(project_id_str), int(local_id_str)
+
+
+class IssueTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage RAM and memcache for Issue PBs."""
+
+  def __init__(
+      self, cache_manager, issue_service, project_service, config_service):
+    super(IssueTwoLevelCache, self).__init__(
+        cache_manager, 'issue', 'issue:', tracker_pb2.Issue,
+        max_size=settings.issue_cache_max_size)
+    self.issue_service = issue_service
+    self.project_service = project_service
+    self.config_service = config_service
+
+  def _UnpackIssue(self, cnxn, issue_row):
+    """Partially construct an issue object using info from a DB row."""
+    (issue_id, project_id, local_id, status_id, owner_id, reporter_id,
+     opened, closed, modified, owner_modified, status_modified,
+     component_modified, derived_owner_id, derived_status_id,
+     deleted, star_count, attachment_count, is_spam) = issue_row
+
+    issue = tracker_pb2.Issue()
+    project = self.project_service.GetProject(cnxn, project_id)
+    issue.project_name = project.project_name
+    issue.issue_id = issue_id
+    issue.project_id = project_id
+    issue.local_id = local_id
+    if status_id is not None:
+      status = self.config_service.LookupStatus(cnxn, project_id, status_id)
+      issue.status = status
+    issue.owner_id = owner_id or 0
+    issue.reporter_id = reporter_id or 0
+    issue.derived_owner_id = derived_owner_id or 0
+    if derived_status_id is not None:
+      derived_status = self.config_service.LookupStatus(
+          cnxn, project_id, derived_status_id)
+      issue.derived_status = derived_status
+    issue.deleted = bool(deleted)
+    if opened:
+      issue.opened_timestamp = opened
+    if closed:
+      issue.closed_timestamp = closed
+    if modified:
+      issue.modified_timestamp = modified
+    if owner_modified:
+      issue.owner_modified_timestamp = owner_modified
+    if status_modified:
+      issue.status_modified_timestamp = status_modified
+    if component_modified:
+      issue.component_modified_timestamp = component_modified
+    issue.star_count = star_count
+    issue.attachment_count = attachment_count
+    issue.is_spam = bool(is_spam)
+    return issue
+
+  def _UnpackFieldValue(self, fv_row):
+    """Construct a field value object from a DB row."""
+    (issue_id, field_id, int_value, str_value, user_id, date_value, url_value,
+     derived, phase_id) = fv_row
+    fv = tracker_bizobj.MakeFieldValue(
+        field_id, int_value, str_value, user_id, date_value, url_value,
+        bool(derived), phase_id=phase_id)
+    return fv, issue_id
+
+  def _UnpackApprovalValue(self, av_row):
+    """Contruct an ApprovalValue PB from a DB row."""
+    (approval_id, issue_id, phase_id, status, setter_id, set_on) = av_row
+    if status:
+      status_enum = tracker_pb2.ApprovalStatus(status.upper())
+    else:
+      status_enum = tracker_pb2.ApprovalStatus.NOT_SET
+    av = tracker_pb2.ApprovalValue(
+        approval_id=approval_id, setter_id=setter_id, set_on=set_on,
+        status=status_enum, phase_id=phase_id)
+    return av, issue_id
+
+  def _UnpackPhase(self, phase_row):
+    """Construct a Phase PB from a DB row."""
+    (phase_id, name, rank) = phase_row
+    phase = tracker_pb2.Phase(
+        phase_id=phase_id, name=name, rank=rank)
+    return phase
+
+  def _DeserializeIssues(
+      self, cnxn, issue_rows, summary_rows, label_rows, component_rows,
+      cc_rows, notify_rows, fieldvalue_rows, relation_rows,
+      dangling_relation_rows, phase_rows, approvalvalue_rows,
+      av_approver_rows):
+    """Convert the given DB rows into a dict of Issue PBs."""
+    results_dict = {}
+    for issue_row in issue_rows:
+      issue = self._UnpackIssue(cnxn, issue_row)
+      results_dict[issue.issue_id] = issue
+
+    for issue_id, summary in summary_rows:
+      results_dict[issue_id].summary = summary
+
+    # TODO(jrobbins): it would be nice to order labels by rank and name.
+    for issue_id, label_id, derived in label_rows:
+      issue = results_dict.get(issue_id)
+      if not issue:
+        logging.info('Got label for an unknown issue: %r %r',
+                     label_rows, issue_rows)
+        continue
+      label = self.config_service.LookupLabel(cnxn, issue.project_id, label_id)
+      assert label, ('Label ID %r on IID %r not found in project %r' %
+                     (label_id, issue_id, issue.project_id))
+      if derived:
+        results_dict[issue_id].derived_labels.append(label)
+      else:
+        results_dict[issue_id].labels.append(label)
+
+    for issue_id, component_id, derived in component_rows:
+      if derived:
+        results_dict[issue_id].derived_component_ids.append(component_id)
+      else:
+        results_dict[issue_id].component_ids.append(component_id)
+
+    for issue_id, user_id, derived in cc_rows:
+      if derived:
+        results_dict[issue_id].derived_cc_ids.append(user_id)
+      else:
+        results_dict[issue_id].cc_ids.append(user_id)
+
+    for issue_id, email in notify_rows:
+      results_dict[issue_id].derived_notify_addrs.append(email)
+
+    for fv_row in fieldvalue_rows:
+      fv, issue_id = self._UnpackFieldValue(fv_row)
+      results_dict[issue_id].field_values.append(fv)
+
+    phases_by_id = {}
+    for phase_row in phase_rows:
+      phase = self._UnpackPhase(phase_row)
+      phases_by_id[phase.phase_id] = phase
+
+    approvers_dict = collections.defaultdict(list)
+    for approver_row in av_approver_rows:
+      approval_id, approver_id, issue_id = approver_row
+      approvers_dict[approval_id, issue_id].append(approver_id)
+
+    for av_row in approvalvalue_rows:
+      av, issue_id = self._UnpackApprovalValue(av_row)
+      av.approver_ids = approvers_dict[av.approval_id, issue_id]
+      results_dict[issue_id].approval_values.append(av)
+      if av.phase_id:
+        phase = phases_by_id[av.phase_id]
+        issue_phases = results_dict[issue_id].phases
+        if phase not in issue_phases:
+          issue_phases.append(phase)
+    # Order issue phases
+    for issue in results_dict.values():
+      if issue.phases:
+        issue.phases.sort(key=lambda phase: phase.rank)
+
+    for issue_id, dst_issue_id, kind, rank in relation_rows:
+      src_issue = results_dict.get(issue_id)
+      dst_issue = results_dict.get(dst_issue_id)
+      assert src_issue or dst_issue, (
+          'Neither source issue %r nor dest issue %r was found' %
+          (issue_id, dst_issue_id))
+      if src_issue:
+        if kind == 'blockedon':
+          src_issue.blocked_on_iids.append(dst_issue_id)
+          src_issue.blocked_on_ranks.append(rank)
+        elif kind == 'mergedinto':
+          src_issue.merged_into = dst_issue_id
+        else:
+          logging.info('unknown relation kind %r', kind)
+          continue
+
+      if dst_issue:
+        if kind == 'blockedon':
+          dst_issue.blocking_iids.append(issue_id)
+
+    for row in dangling_relation_rows:
+      issue_id, dst_issue_proj, dst_issue_id, ext_id, kind = row
+      src_issue = results_dict.get(issue_id)
+      if kind == 'blockedon':
+        src_issue.dangling_blocked_on_refs.append(
+            tracker_bizobj.MakeDanglingIssueRef(dst_issue_proj,
+                dst_issue_id, ext_id))
+      elif kind == 'blocking':
+        src_issue.dangling_blocking_refs.append(
+            tracker_bizobj.MakeDanglingIssueRef(dst_issue_proj, dst_issue_id,
+                ext_id))
+      elif kind == 'mergedinto':
+        src_issue.merged_into_external = ext_id
+      else:
+        logging.warn('unhandled danging relation kind %r', kind)
+        continue
+
+    return results_dict
+
+  # Note: sharding is used to here to allow us to load issues from the replicas
+  # without placing load on the primary DB. Writes are not sharded.
+  # pylint: disable=arguments-differ
+  def FetchItems(self, cnxn, issue_ids, shard_id=None):
+    """Retrieve and deserialize issues."""
+    issue_rows = self.issue_service.issue_tbl.Select(
+        cnxn, cols=ISSUE_COLS, id=issue_ids, shard_id=shard_id)
+
+    summary_rows = self.issue_service.issuesummary_tbl.Select(
+        cnxn, cols=ISSUESUMMARY_COLS, shard_id=shard_id, issue_id=issue_ids)
+    label_rows = self.issue_service.issue2label_tbl.Select(
+        cnxn, cols=ISSUE2LABEL_COLS, shard_id=shard_id, issue_id=issue_ids)
+    component_rows = self.issue_service.issue2component_tbl.Select(
+        cnxn, cols=ISSUE2COMPONENT_COLS, shard_id=shard_id, issue_id=issue_ids)
+    cc_rows = self.issue_service.issue2cc_tbl.Select(
+        cnxn, cols=ISSUE2CC_COLS, shard_id=shard_id, issue_id=issue_ids)
+    notify_rows = self.issue_service.issue2notify_tbl.Select(
+        cnxn, cols=ISSUE2NOTIFY_COLS, shard_id=shard_id, issue_id=issue_ids)
+    fieldvalue_rows = self.issue_service.issue2fieldvalue_tbl.Select(
+        cnxn, cols=ISSUE2FIELDVALUE_COLS, shard_id=shard_id,
+        issue_id=issue_ids)
+    approvalvalue_rows = self.issue_service.issue2approvalvalue_tbl.Select(
+        cnxn, cols=ISSUE2APPROVALVALUE_COLS, issue_id=issue_ids)
+    phase_ids = [av_row[2] for av_row in approvalvalue_rows]
+    phase_rows = []
+    if phase_ids:
+      phase_rows = self.issue_service.issuephasedef_tbl.Select(
+          cnxn, cols=ISSUEPHASEDEF_COLS, id=list(set(phase_ids)))
+    av_approver_rows = self.issue_service.issueapproval2approver_tbl.Select(
+        cnxn, cols=ISSUEAPPROVAL2APPROVER_COLS, issue_id=issue_ids)
+    if issue_ids:
+      ph = sql.PlaceHolders(issue_ids)
+      blocked_on_rows = self.issue_service.issuerelation_tbl.Select(
+          cnxn, cols=ISSUERELATION_COLS, issue_id=issue_ids, kind='blockedon',
+          order_by=[('issue_id', []), ('rank DESC', []), ('dst_issue_id', [])])
+      blocking_rows = self.issue_service.issuerelation_tbl.Select(
+          cnxn, cols=ISSUERELATION_COLS, dst_issue_id=issue_ids,
+          kind='blockedon', order_by=[('issue_id', []), ('dst_issue_id', [])])
+      unique_blocking = tuple(
+          row for row in blocking_rows if row not in blocked_on_rows)
+      merge_rows = self.issue_service.issuerelation_tbl.Select(
+          cnxn, cols=ISSUERELATION_COLS,
+          where=[('(issue_id IN (%s) OR dst_issue_id IN (%s))' % (ph, ph),
+                  issue_ids + issue_ids),
+                 ('kind != %s', ['blockedon'])])
+      relation_rows = blocked_on_rows + unique_blocking + merge_rows
+      dangling_relation_rows = self.issue_service.danglingrelation_tbl.Select(
+          cnxn, cols=DANGLINGRELATION_COLS, issue_id=issue_ids)
+    else:
+      relation_rows = []
+      dangling_relation_rows = []
+
+    issue_dict = self._DeserializeIssues(
+        cnxn, issue_rows, summary_rows, label_rows, component_rows, cc_rows,
+        notify_rows, fieldvalue_rows, relation_rows, dangling_relation_rows,
+        phase_rows, approvalvalue_rows, av_approver_rows)
+    logging.info('IssueTwoLevelCache.FetchItems returning: %r', issue_dict)
+    return issue_dict
+
+
+class CommentTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage RAM and memcache for IssueComment PBs."""
+
+  def __init__(self, cache_manager, issue_svc):
+    super(CommentTwoLevelCache, self).__init__(
+        cache_manager, 'comment', 'comment:', tracker_pb2.IssueComment,
+        max_size=settings.comment_cache_max_size)
+    self.issue_svc = issue_svc
+
+  # pylint: disable=arguments-differ
+  def FetchItems(self, cnxn, keys, shard_id=None):
+    comment_rows = self.issue_svc.comment_tbl.Select(cnxn,
+        cols=COMMENT_COLS, id=keys, shard_id=shard_id)
+
+    if len(comment_rows) < len(keys):
+      self.issue_svc.replication_lag_retries.increment()
+      logging.info('issue3755: expected %d, but got %d rows from shard %d',
+                   len(keys), len(comment_rows), shard_id)
+      shard_id = None  # Will use Primary DB.
+      comment_rows = self.issue_svc.comment_tbl.Select(
+          cnxn, cols=COMMENT_COLS, id=keys, shard_id=None)
+      logging.info(
+          'Retry got %d comment rows from the primary DB', len(comment_rows))
+
+    cids = [row[0] for row in comment_rows]
+    commentcontent_ids = [row[-1] for row in comment_rows]
+    content_rows = self.issue_svc.commentcontent_tbl.Select(
+        cnxn, cols=COMMENTCONTENT_COLS, id=commentcontent_ids,
+        shard_id=shard_id)
+    approval_rows = self.issue_svc.issueapproval2comment_tbl.Select(
+        cnxn, cols=ISSUEAPPROVAL2COMMENT_COLS, comment_id=cids)
+    amendment_rows = self.issue_svc.issueupdate_tbl.Select(
+        cnxn, cols=ISSUEUPDATE_COLS, comment_id=cids, shard_id=shard_id)
+    attachment_rows = self.issue_svc.attachment_tbl.Select(
+        cnxn, cols=ATTACHMENT_COLS, comment_id=cids, shard_id=shard_id)
+    importer_rows = self.issue_svc.commentimporter_tbl.Select(
+        cnxn, cols=COMMENTIMPORTER_COLS, comment_id=cids, shard_id=shard_id)
+
+    comments = self.issue_svc._DeserializeComments(
+        comment_rows, content_rows, amendment_rows, attachment_rows,
+        approval_rows, importer_rows)
+
+    comments_dict = {}
+    for comment in comments:
+      comments_dict[comment.id] = comment
+
+    return comments_dict
+
+
+class IssueService(object):
+  """The persistence layer for Monorail's issues, comments, and attachments."""
+  spam_labels = ts_mon.CounterMetric(
+      'monorail/issue_svc/spam_label',
+      'Issues created, broken down by spam label.',
+      [ts_mon.StringField('type')])
+  replication_lag_retries = ts_mon.CounterMetric(
+      'monorail/issue_svc/replication_lag_retries',
+      'Counts times that loading comments from a replica failed',
+      [])
+  issue_creations = ts_mon.CounterMetric(
+      'monorail/issue_svc/issue_creations',
+      'Counts times that issues were created',
+      [])
+  comment_creations = ts_mon.CounterMetric(
+      'monorail/issue_svc/comment_creations',
+      'Counts times that comments were created',
+      [])
+
+  def __init__(self, project_service, config_service, cache_manager,
+      chart_service):
+    """Initialize this object so that it is ready to use.
+
+    Args:
+      project_service: services object for project info.
+      config_service: services object for tracker configuration info.
+      cache_manager: local cache with distributed invalidation.
+      chart_service (ChartService): An instance of ChartService.
+    """
+    # Tables that represent issue data.
+    self.issue_tbl = sql.SQLTableManager(ISSUE_TABLE_NAME)
+    self.issuesummary_tbl = sql.SQLTableManager(ISSUESUMMARY_TABLE_NAME)
+    self.issue2label_tbl = sql.SQLTableManager(ISSUE2LABEL_TABLE_NAME)
+    self.issue2component_tbl = sql.SQLTableManager(ISSUE2COMPONENT_TABLE_NAME)
+    self.issue2cc_tbl = sql.SQLTableManager(ISSUE2CC_TABLE_NAME)
+    self.issue2notify_tbl = sql.SQLTableManager(ISSUE2NOTIFY_TABLE_NAME)
+    self.issue2fieldvalue_tbl = sql.SQLTableManager(ISSUE2FIELDVALUE_TABLE_NAME)
+    self.issuerelation_tbl = sql.SQLTableManager(ISSUERELATION_TABLE_NAME)
+    self.danglingrelation_tbl = sql.SQLTableManager(DANGLINGRELATION_TABLE_NAME)
+    self.issueformerlocations_tbl = sql.SQLTableManager(
+        ISSUEFORMERLOCATIONS_TABLE_NAME)
+    self.issuesnapshot_tbl = sql.SQLTableManager(ISSUESNAPSHOT_TABLE_NAME)
+    self.issuesnapshot2cc_tbl = sql.SQLTableManager(
+        ISSUESNAPSHOT2CC_TABLE_NAME)
+    self.issuesnapshot2component_tbl = sql.SQLTableManager(
+        ISSUESNAPSHOT2COMPONENT_TABLE_NAME)
+    self.issuesnapshot2label_tbl = sql.SQLTableManager(
+        ISSUESNAPSHOT2LABEL_TABLE_NAME)
+    self.issuephasedef_tbl = sql.SQLTableManager(ISSUEPHASEDEF_TABLE_NAME)
+    self.issue2approvalvalue_tbl = sql.SQLTableManager(
+        ISSUE2APPROVALVALUE_TABLE_NAME)
+    self.issueapproval2approver_tbl = sql.SQLTableManager(
+        ISSUEAPPROVAL2APPROVER_TABLE_NAME)
+    self.issueapproval2comment_tbl = sql.SQLTableManager(
+        ISSUEAPPROVAL2COMMENT_TABLE_NAME)
+
+    # Tables that represent comments.
+    self.comment_tbl = sql.SQLTableManager(COMMENT_TABLE_NAME)
+    self.commentcontent_tbl = sql.SQLTableManager(COMMENTCONTENT_TABLE_NAME)
+    self.commentimporter_tbl = sql.SQLTableManager(COMMENTIMPORTER_TABLE_NAME)
+    self.issueupdate_tbl = sql.SQLTableManager(ISSUEUPDATE_TABLE_NAME)
+    self.attachment_tbl = sql.SQLTableManager(ATTACHMENT_TABLE_NAME)
+
+    # Tables for cron tasks.
+    self.reindexqueue_tbl = sql.SQLTableManager(REINDEXQUEUE_TABLE_NAME)
+
+    # Tables for generating sequences of local IDs.
+    self.localidcounter_tbl = sql.SQLTableManager(LOCALIDCOUNTER_TABLE_NAME)
+
+    # Like a dictionary {(project_id, local_id): issue_id}
+    # Use value centric cache here because we cannot store a tuple in the
+    # Invalidate table.
+    self.issue_id_2lc = IssueIDTwoLevelCache(cache_manager, self)
+    # Like a dictionary {issue_id: issue}
+    self.issue_2lc = IssueTwoLevelCache(
+        cache_manager, self, project_service, config_service)
+
+    # Like a dictionary {comment_id: comment)
+    self.comment_2lc = CommentTwoLevelCache(
+        cache_manager, self)
+
+    self._config_service = config_service
+    self.chart_service = chart_service
+
+  ### Issue ID lookups
+
+  def LookupIssueIDsFollowMoves(self, cnxn, project_local_id_pairs):
+    # type: (MonorailConnection, Sequence[Tuple(int, int)]) ->
+    #     (Sequence[int], Sequence[Tuple(int, int)])
+    """Find the global issue IDs given the project ID and local ID of each.
+
+    If any (project_id, local_id) pairs refer to an issue that has been moved,
+    the issue ID will still be returned.
+
+    Args:
+      cnxn: Monorail connection.
+      project_local_id_pairs: (project_id, local_id) pairs to look up.
+
+    Returns:
+      A tuple of two items.
+      1. A sequence of global issue IDs in the `project_local_id_pairs` order.
+      2. A sequence of (project_id, local_id) containing each pair provided
+         for which no matching issue is found.
+    """
+
+    issue_id_dict, misses = self.issue_id_2lc.GetAll(
+        cnxn, project_local_id_pairs)
+    for miss in misses:
+      project_id, local_id = miss
+      issue_id = int(
+          self.issueformerlocations_tbl.SelectValue(
+              cnxn,
+              'issue_id',
+              default=0,
+              project_id=project_id,
+              local_id=local_id))
+      if issue_id:
+        misses.remove(miss)
+        issue_id_dict[miss] = issue_id
+    # Put the Issue IDs in the order specified by project_local_id_pairs
+    issue_ids = [
+        issue_id_dict[pair]
+        for pair in project_local_id_pairs
+        if pair in issue_id_dict
+    ]
+
+    return issue_ids, misses
+
+  def LookupIssueIDs(self, cnxn, project_local_id_pairs):
+    """Find the global issue IDs given the project ID and local ID of each."""
+    issue_id_dict, misses = self.issue_id_2lc.GetAll(
+        cnxn, project_local_id_pairs)
+
+    # Put the Issue IDs in the order specified by project_local_id_pairs
+    issue_ids = [issue_id_dict[pair] for pair in project_local_id_pairs
+                 if pair in issue_id_dict]
+
+    return issue_ids, misses
+
+  def LookupIssueID(self, cnxn, project_id, local_id):
+    """Find the global issue ID given the project ID and local ID."""
+    issue_ids, _misses = self.LookupIssueIDs(cnxn, [(project_id, local_id)])
+    try:
+      return issue_ids[0]
+    except IndexError:
+      raise exceptions.NoSuchIssueException()
+
+  def ResolveIssueRefs(
+      self, cnxn, ref_projects, default_project_name, refs):
+    """Look up all the referenced issues and return their issue_ids.
+
+    Args:
+      cnxn: connection to SQL database.
+      ref_projects: pre-fetched dict {project_name: project} of all projects
+          mentioned in the refs as well as the default project.
+      default_project_name: string name of the current project, this is used
+          when the project_name in a ref is None.
+      refs: list of (project_name, local_id) pairs.  These are parsed from
+          textual references in issue descriptions, comments, and the input
+          in the blocked-on field.
+
+    Returns:
+      A list of issue_ids for all the referenced issues.  References to issues
+      in deleted projects and any issues not found are simply ignored.
+    """
+    if not refs:
+      return [], []
+
+    project_local_id_pairs = []
+    for project_name, local_id in refs:
+      project = ref_projects.get(project_name or default_project_name)
+      if not project or project.state == project_pb2.ProjectState.DELETABLE:
+        continue  # ignore any refs to issues in deleted projects
+      project_local_id_pairs.append((project.project_id, local_id))
+
+    return self.LookupIssueIDs(cnxn, project_local_id_pairs)  # tuple
+
+  def LookupIssueRefs(self, cnxn, issue_ids):
+    """Return {issue_id: (project_name, local_id)} for each issue_id."""
+    issue_dict, _misses = self.GetIssuesDict(cnxn, issue_ids)
+    return {
+      issue_id: (issue.project_name, issue.local_id)
+      for issue_id, issue in issue_dict.items()}
+
+  ### Issue objects
+
+  def CreateIssue(
+      self,
+      cnxn,
+      services,
+      issue,
+      marked_description,
+      attachments=None,
+      index_now=False,
+      importer_id=None):
+    """Create and store a new issue with all the given information.
+
+    Args:
+      cnxn: connection to SQL database.
+      services: persistence layer for users, issues, and projects.
+      issue: Issue PB to create.
+      marked_description: issue description with initial HTML markup.
+      attachments: [(filename, contents, mimetype),...] attachments uploaded at
+          the time the comment was made.
+      index_now: True if the issue should be updated in the full text index.
+      importer_id: optional user ID of API client importing issues for users.
+
+    Returns:
+      A tuple (the newly created Issue PB and Comment PB for the
+      issue description).
+    """
+    project_id = issue.project_id
+    reporter_id = issue.reporter_id
+    timestamp = issue.opened_timestamp
+    config = self._config_service.GetProjectConfig(cnxn, project_id)
+
+    iids_to_invalidate = set()
+    if len(issue.blocked_on_iids) != 0:
+      iids_to_invalidate.update(issue.blocked_on_iids)
+    if len(issue.blocking_iids) != 0:
+      iids_to_invalidate.update(issue.blocking_iids)
+
+    comment = self._MakeIssueComment(
+        project_id, reporter_id, marked_description,
+        attachments=attachments, timestamp=timestamp,
+        is_description=True, importer_id=importer_id)
+
+    reporter = services.user.GetUser(cnxn, reporter_id)
+    project = services.project.GetProject(cnxn, project_id)
+    reporter_auth = authdata.AuthData.FromUserID(cnxn, reporter_id, services)
+    is_project_member = framework_bizobj.UserIsInProject(
+        project, reporter_auth.effective_ids)
+    classification = services.spam.ClassifyIssue(
+        issue, comment, reporter, is_project_member)
+
+    if classification['confidence_is_spam'] > settings.classifier_spam_thresh:
+      issue.is_spam = True
+      predicted_label = 'spam'
+    else:
+      predicted_label = 'ham'
+
+    logging.info('classified new issue as %s' % predicted_label)
+    self.spam_labels.increment({'type': predicted_label})
+
+    # Create approval surveys
+    approval_comments = []
+    if len(issue.approval_values) != 0:
+      approval_defs_by_id = {ad.approval_id: ad for ad in config.approval_defs}
+      for av in issue.approval_values:
+        ad = approval_defs_by_id.get(av.approval_id)
+        if ad:
+          survey = ''
+          if ad.survey:
+            questions = ad.survey.split('\n')
+            survey = '\n'.join(['<b>' + q + '</b>' for q in questions])
+          approval_comments.append(self._MakeIssueComment(
+              project_id, reporter_id, survey, timestamp=timestamp,
+              is_description=True, approval_id=ad.approval_id))
+        else:
+          logging.info('Could not find ApprovalDef with approval_id %r',
+              av.approval_id)
+
+    issue.local_id = self.AllocateNextLocalID(cnxn, project_id)
+    self.issue_creations.increment()
+    issue_id = self.InsertIssue(cnxn, issue)
+    comment.issue_id = issue_id
+    self.InsertComment(cnxn, comment)
+    for approval_comment in approval_comments:
+      approval_comment.issue_id = issue_id
+      self.InsertComment(cnxn, approval_comment)
+
+    issue.issue_id = issue_id
+
+    # ClassifyIssue only returns confidence_is_spam, but
+    # RecordClassifierIssueVerdict records confidence of
+    # ham or spam. Therefore if ham, invert score.
+    confidence = classification['confidence_is_spam']
+    if not issue.is_spam:
+      confidence = 1.0 - confidence
+
+    services.spam.RecordClassifierIssueVerdict(
+      cnxn, issue, predicted_label=='spam',
+      confidence, classification['failed_open'])
+
+    if permissions.HasRestrictions(issue, 'view'):
+      self._config_service.InvalidateMemcache(
+          [issue], key_prefix='nonviewable:')
+
+    # Add a comment to existing issues saying they are now blocking or
+    # blocked on this issue.
+    blocked_add_issues = self.GetIssues(cnxn, issue.blocked_on_iids)
+    for add_issue in blocked_add_issues:
+      self.CreateIssueComment(
+          cnxn, add_issue, reporter_id, content='',
+          amendments=[tracker_bizobj.MakeBlockingAmendment(
+              [(issue.project_name, issue.local_id)], [],
+              default_project_name=add_issue.project_name)])
+    blocking_add_issues = self.GetIssues(cnxn, issue.blocking_iids)
+    for add_issue in blocking_add_issues:
+      self.CreateIssueComment(
+          cnxn, add_issue, reporter_id, content='',
+          amendments=[tracker_bizobj.MakeBlockedOnAmendment(
+              [(issue.project_name, issue.local_id)], [],
+              default_project_name=add_issue.project_name)])
+
+    self._UpdateIssuesModified(
+        cnxn, iids_to_invalidate, modified_timestamp=timestamp)
+
+    if index_now:
+      tracker_fulltext.IndexIssues(
+          cnxn, [issue], services.user, self, self._config_service)
+    else:
+      self.EnqueueIssuesForIndexing(cnxn, [issue.issue_id])
+
+    return issue, comment
+
+  def AllocateNewLocalIDs(self, cnxn, issues):
+    # Filter to just the issues that need new local IDs.
+    issues = [issue for issue in issues if issue.local_id < 0]
+
+    for issue in issues:
+      if issue.local_id < 0:
+        issue.local_id = self.AllocateNextLocalID(cnxn, issue.project_id)
+
+    self.UpdateIssues(cnxn, issues)
+
+    logging.info("AllocateNewLocalIDs")
+
+  def GetAllIssuesInProject(
+      self, cnxn, project_id, min_local_id=None, use_cache=True):
+    """Special query to efficiently get ALL issues in a project.
+
+    This is not done while the user is waiting, only by backround tasks.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: the ID of the project.
+      min_local_id: optional int to start at.
+      use_cache: optional boolean to turn off using the cache.
+
+    Returns:
+      A list of Issue protocol buffers for all issues.
+    """
+    all_local_ids = self.GetAllLocalIDsInProject(
+        cnxn, project_id, min_local_id=min_local_id)
+    return self.GetIssuesByLocalIDs(
+        cnxn, project_id, all_local_ids, use_cache=use_cache)
+
+  def GetAnyOnHandIssue(self, issue_ids, start=None, end=None):
+    """Get any one issue from RAM or memcache, otherwise return None."""
+    return self.issue_2lc.GetAnyOnHandItem(issue_ids, start=start, end=end)
+
+  def GetIssuesDict(self, cnxn, issue_ids, use_cache=True, shard_id=None):
+    # type: (MonorailConnection, Collection[int], Optional[Boolean],
+    #     Optional[int]) -> (Dict[int, Issue], Sequence[int])
+    """Get a dict {iid: issue} from the DB or cache.
+
+    Returns:
+      A dict {iid: issue} from the DB or cache.
+      A sequence of iid that could not be found.
+    """
+    issue_dict, missed_iids = self.issue_2lc.GetAll(
+        cnxn, issue_ids, use_cache=use_cache, shard_id=shard_id)
+    if not use_cache:
+      for issue in issue_dict.values():
+        issue.assume_stale = False
+    return issue_dict, missed_iids
+
+  def GetIssues(self, cnxn, issue_ids, use_cache=True, shard_id=None):
+    # type: (MonorailConnection, Sequence[int], Optional[Boolean],
+    #     Optional[int]) -> (Sequence[int])
+    """Get a list of Issue PBs from the DB or cache.
+
+    Args:
+      cnxn: connection to SQL database.
+      issue_ids: integer global issue IDs of the issues.
+      use_cache: optional boolean to turn off using the cache.
+      shard_id: optional int shard_id to limit retrieval.
+
+    Returns:
+      A list of Issue PBs in the same order as the given issue_ids.
+    """
+    issue_dict, _misses = self.GetIssuesDict(
+        cnxn, issue_ids, use_cache=use_cache, shard_id=shard_id)
+
+    # Return a list that is ordered the same as the given issue_ids.
+    issue_list = [issue_dict[issue_id] for issue_id in issue_ids
+                  if issue_id in issue_dict]
+
+    return issue_list
+
+  def GetIssue(self, cnxn, issue_id, use_cache=True):
+    """Get one Issue PB from the DB.
+
+    Args:
+      cnxn: connection to SQL database.
+      issue_id: integer global issue ID of the issue.
+      use_cache: optional boolean to turn off using the cache.
+
+    Returns:
+      The requested Issue protocol buffer.
+
+    Raises:
+      NoSuchIssueException: the issue was not found.
+    """
+    issues = self.GetIssues(cnxn, [issue_id], use_cache=use_cache)
+    try:
+      return issues[0]
+    except IndexError:
+      raise exceptions.NoSuchIssueException()
+
+  def GetIssuesByLocalIDs(
+      self, cnxn, project_id, local_id_list, use_cache=True, shard_id=None):
+    """Get all the requested issues.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project to which the issues belong.
+      local_id_list: list of integer local IDs for the requested issues.
+      use_cache: optional boolean to turn off using the cache.
+      shard_id: optional int shard_id to choose a replica.
+
+    Returns:
+      List of Issue PBs for the requested issues.  The result Issues
+      will be ordered in the same order as local_id_list.
+    """
+    issue_ids_to_fetch, _misses = self.LookupIssueIDs(
+        cnxn, [(project_id, local_id) for local_id in local_id_list])
+    issues = self.GetIssues(
+        cnxn, issue_ids_to_fetch, use_cache=use_cache, shard_id=shard_id)
+    return issues
+
+  def GetIssueByLocalID(self, cnxn, project_id, local_id, use_cache=True):
+    """Get one Issue PB from the DB.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: the ID of the project to which the issue belongs.
+      local_id: integer local ID of the issue.
+      use_cache: optional boolean to turn off using the cache.
+
+    Returns:
+      The requested Issue protocol buffer.
+    """
+    issues = self.GetIssuesByLocalIDs(
+        cnxn, project_id, [local_id], use_cache=use_cache)
+    try:
+      return issues[0]
+    except IndexError:
+      raise exceptions.NoSuchIssueException(
+          'The issue %s:%d does not exist.' % (project_id, local_id))
+
+  def GetOpenAndClosedIssues(self, cnxn, issue_ids):
+    """Return the requested issues in separate open and closed lists.
+
+    Args:
+      cnxn: connection to SQL database.
+      issue_ids: list of int issue issue_ids.
+
+    Returns:
+      A pair of lists, the first with open issues, second with closed issues.
+    """
+    if not issue_ids:
+      return [], []  # make one common case efficient
+
+    issues = self.GetIssues(cnxn, issue_ids)
+    project_ids = {issue.project_id for issue in issues}
+    configs = self._config_service.GetProjectConfigs(cnxn, project_ids)
+    open_issues = []
+    closed_issues = []
+    for issue in issues:
+      config = configs[issue.project_id]
+      if tracker_helpers.MeansOpenInProject(
+          tracker_bizobj.GetStatus(issue), config):
+        open_issues.append(issue)
+      else:
+        closed_issues.append(issue)
+
+    return open_issues, closed_issues
+
+  # TODO(crbug.com/monorail/7822): Delete this method when V0 API retired.
+  def GetCurrentLocationOfMovedIssue(self, cnxn, project_id, local_id):
+    """Return the current location of a moved issue based on old location."""
+    issue_id = int(self.issueformerlocations_tbl.SelectValue(
+        cnxn, 'issue_id', default=0, project_id=project_id, local_id=local_id))
+    if not issue_id:
+      return None, None
+    project_id, local_id = self.issue_tbl.SelectRow(
+        cnxn, cols=['project_id', 'local_id'], id=issue_id)
+    return project_id, local_id
+
+  def GetPreviousLocations(self, cnxn, issue):
+    """Get all the previous locations of an issue."""
+    location_rows = self.issueformerlocations_tbl.Select(
+        cnxn, cols=['project_id', 'local_id'], issue_id=issue.issue_id)
+    locations = [(pid, local_id) for (pid, local_id) in location_rows
+                 if pid != issue.project_id or local_id != issue.local_id]
+    return locations
+
+  def GetCommentsByUser(self, cnxn, user_id):
+    """Get all comments created by a user"""
+    comments = self.GetComments(cnxn, commenter_id=user_id,
+        is_description=False, limit=10000)
+    return comments
+
+  def GetIssueActivity(self, cnxn, num=50, before=None, after=None,
+      project_ids=None, user_ids=None, ascending=False):
+
+    if project_ids:
+      use_clause = (
+        'USE INDEX (project_id) USE INDEX FOR ORDER BY (project_id)')
+    elif user_ids:
+      use_clause = (
+        'USE INDEX (commenter_id) USE INDEX FOR ORDER BY (commenter_id)')
+    else:
+      use_clause = ''
+
+    # TODO(jrobbins): make this into a persist method.
+    # TODO(jrobbins): this really needs permission checking in SQL, which
+    # will be slow.
+    where_conds = [('Issue.id = Comment.issue_id', [])]
+    if project_ids is not None:
+      cond_str = 'Comment.project_id IN (%s)' % sql.PlaceHolders(project_ids)
+      where_conds.append((cond_str, project_ids))
+    if user_ids is not None:
+      cond_str = 'Comment.commenter_id IN (%s)' % sql.PlaceHolders(user_ids)
+      where_conds.append((cond_str, user_ids))
+
+    if before:
+      where_conds.append(('created < %s', [before]))
+    if after:
+      where_conds.append(('created > %s', [after]))
+    if ascending:
+      order_by = [('created', [])]
+    else:
+      order_by = [('created DESC', [])]
+
+    comments = self.GetComments(
+      cnxn, joins=[('Issue', [])], deleted_by=None, where=where_conds,
+      use_clause=use_clause, order_by=order_by, limit=num + 1)
+    return comments
+
+  def GetIssueIDsReportedByUser(self, cnxn, user_id):
+    """Get all issue IDs created by a user"""
+    rows = self.issue_tbl.Select(cnxn, cols=['id'], reporter_id=user_id,
+        limit=10000)
+    return [row[0] for row in rows]
+
+  def InsertIssue(self, cnxn, issue):
+    """Store the given issue in SQL.
+
+    Args:
+      cnxn: connection to SQL database.
+      issue: Issue PB to insert into the database.
+
+    Returns:
+      The int issue_id of the newly created issue.
+    """
+    status_id = self._config_service.LookupStatusID(
+        cnxn, issue.project_id, issue.status)
+    row = (issue.project_id, issue.local_id, status_id,
+           issue.owner_id or None,
+           issue.reporter_id,
+           issue.opened_timestamp,
+           issue.closed_timestamp,
+           issue.modified_timestamp,
+           issue.owner_modified_timestamp,
+           issue.status_modified_timestamp,
+           issue.component_modified_timestamp,
+           issue.derived_owner_id or None,
+           self._config_service.LookupStatusID(
+               cnxn, issue.project_id, issue.derived_status),
+           bool(issue.deleted),
+           issue.star_count, issue.attachment_count,
+           issue.is_spam)
+    # ISSUE_COLs[1:] to skip setting the ID
+    # Insert into the Primary DB.
+    generated_ids = self.issue_tbl.InsertRows(
+        cnxn, ISSUE_COLS[1:], [row], commit=False, return_generated_ids=True)
+    issue_id = generated_ids[0]
+    issue.issue_id = issue_id
+    self.issue_tbl.Update(
+      cnxn, {'shard': issue_id % settings.num_logical_shards},
+      id=issue.issue_id, commit=False)
+
+    self._UpdateIssuesSummary(cnxn, [issue], commit=False)
+    self._UpdateIssuesLabels(cnxn, [issue], commit=False)
+    self._UpdateIssuesFields(cnxn, [issue], commit=False)
+    self._UpdateIssuesComponents(cnxn, [issue], commit=False)
+    self._UpdateIssuesCc(cnxn, [issue], commit=False)
+    self._UpdateIssuesNotify(cnxn, [issue], commit=False)
+    self._UpdateIssuesRelation(cnxn, [issue], commit=False)
+    self._UpdateIssuesApprovals(cnxn, issue, commit=False)
+    self.chart_service.StoreIssueSnapshots(cnxn, [issue], commit=False)
+    cnxn.Commit()
+    self._config_service.InvalidateMemcache([issue])
+
+    return issue_id
+
+  def UpdateIssues(
+      self, cnxn, issues, update_cols=None, just_derived=False, commit=True,
+      invalidate=True):
+    """Update the given issues in SQL.
+
+    Args:
+      cnxn: connection to SQL database.
+      issues: list of issues to update, these must have been loaded with
+          use_cache=False so that issue.assume_stale is False.
+      update_cols: optional list of just the field names to update.
+      just_derived: set to True when only updating derived fields.
+      commit: set to False to skip the DB commit and do it in the caller.
+      invalidate: set to False to leave cache invalidatation to the caller.
+    """
+    if not issues:
+      return
+
+    for issue in issues:  # slow, but mysql will not allow REPLACE rows.
+      assert not issue.assume_stale, (
+          'issue2514: Storing issue that might be stale: %r' % issue)
+      delta = {
+          'project_id': issue.project_id,
+          'local_id': issue.local_id,
+          'owner_id': issue.owner_id or None,
+          'status_id': self._config_service.LookupStatusID(
+              cnxn, issue.project_id, issue.status) or None,
+          'opened': issue.opened_timestamp,
+          'closed': issue.closed_timestamp,
+          'modified': issue.modified_timestamp,
+          'owner_modified': issue.owner_modified_timestamp,
+          'status_modified': issue.status_modified_timestamp,
+          'component_modified': issue.component_modified_timestamp,
+          'derived_owner_id': issue.derived_owner_id or None,
+          'derived_status_id': self._config_service.LookupStatusID(
+              cnxn, issue.project_id, issue.derived_status) or None,
+          'deleted': bool(issue.deleted),
+          'star_count': issue.star_count,
+          'attachment_count': issue.attachment_count,
+          'is_spam': issue.is_spam,
+          }
+      if update_cols is not None:
+        delta = {key: val for key, val in delta.items()
+                 if key in update_cols}
+      self.issue_tbl.Update(cnxn, delta, id=issue.issue_id, commit=False)
+
+    if not update_cols:
+      self._UpdateIssuesLabels(cnxn, issues, commit=False)
+      self._UpdateIssuesCc(cnxn, issues, commit=False)
+      self._UpdateIssuesFields(cnxn, issues, commit=False)
+      self._UpdateIssuesComponents(cnxn, issues, commit=False)
+      self._UpdateIssuesNotify(cnxn, issues, commit=False)
+      if not just_derived:
+        self._UpdateIssuesSummary(cnxn, issues, commit=False)
+        self._UpdateIssuesRelation(cnxn, issues, commit=False)
+
+    self.chart_service.StoreIssueSnapshots(cnxn, issues, commit=False)
+
+    iids_to_invalidate = [issue.issue_id for issue in issues]
+    if just_derived and invalidate:
+      self.issue_2lc.InvalidateAllKeys(cnxn, iids_to_invalidate)
+    elif invalidate:
+      self.issue_2lc.InvalidateKeys(cnxn, iids_to_invalidate)
+    if commit:
+      cnxn.Commit()
+    if invalidate:
+      self._config_service.InvalidateMemcache(issues)
+
+  def UpdateIssue(
+      self, cnxn, issue, update_cols=None, just_derived=False, commit=True,
+      invalidate=True):
+    """Update the given issue in SQL.
+
+    Args:
+      cnxn: connection to SQL database.
+      issue: the issue to update.
+      update_cols: optional list of just the field names to update.
+      just_derived: set to True when only updating derived fields.
+      commit: set to False to skip the DB commit and do it in the caller.
+      invalidate: set to False to leave cache invalidatation to the caller.
+    """
+    self.UpdateIssues(
+        cnxn, [issue], update_cols=update_cols, just_derived=just_derived,
+        commit=commit, invalidate=invalidate)
+
+  def _UpdateIssuesSummary(self, cnxn, issues, commit=True):
+    """Update the IssueSummary table rows for the given issues."""
+    self.issuesummary_tbl.InsertRows(
+        cnxn, ISSUESUMMARY_COLS,
+        [(issue.issue_id, issue.summary) for issue in issues],
+        replace=True, commit=commit)
+
+  def _UpdateIssuesLabels(self, cnxn, issues, commit=True):
+    """Update the Issue2Label table rows for the given issues."""
+    label_rows = []
+    for issue in issues:
+      issue_shard = issue.issue_id % settings.num_logical_shards
+      # TODO(jrobbins): If the user adds many novel labels in one issue update,
+      # that could be slow. Solution is to add all new labels in a batch first.
+      label_rows.extend(
+          (issue.issue_id,
+           self._config_service.LookupLabelID(cnxn, issue.project_id, label),
+           False,
+           issue_shard)
+          for label in issue.labels)
+      label_rows.extend(
+          (issue.issue_id,
+           self._config_service.LookupLabelID(cnxn, issue.project_id, label),
+           True,
+           issue_shard)
+          for label in issue.derived_labels)
+
+    self.issue2label_tbl.Delete(
+        cnxn, issue_id=[issue.issue_id for issue in issues],
+        commit=False)
+    self.issue2label_tbl.InsertRows(
+        cnxn, ISSUE2LABEL_COLS + ['issue_shard'],
+        label_rows, ignore=True, commit=commit)
+
+  def _UpdateIssuesFields(self, cnxn, issues, commit=True):
+    """Update the Issue2FieldValue table rows for the given issues."""
+    fieldvalue_rows = []
+    for issue in issues:
+      issue_shard = issue.issue_id % settings.num_logical_shards
+      for fv in issue.field_values:
+        fieldvalue_rows.append(
+            (issue.issue_id, fv.field_id, fv.int_value, fv.str_value,
+             fv.user_id or None, fv.date_value, fv.url_value, fv.derived,
+             fv.phase_id or None, issue_shard))
+
+    self.issue2fieldvalue_tbl.Delete(
+        cnxn, issue_id=[issue.issue_id for issue in issues], commit=False)
+    self.issue2fieldvalue_tbl.InsertRows(
+        cnxn, ISSUE2FIELDVALUE_COLS + ['issue_shard'],
+        fieldvalue_rows, commit=commit)
+
+  def _UpdateIssuesComponents(self, cnxn, issues, commit=True):
+    """Update the Issue2Component table rows for the given issues."""
+    issue2component_rows = []
+    for issue in issues:
+      issue_shard = issue.issue_id % settings.num_logical_shards
+      issue2component_rows.extend(
+          (issue.issue_id, component_id, False, issue_shard)
+          for component_id in issue.component_ids)
+      issue2component_rows.extend(
+          (issue.issue_id, component_id, True, issue_shard)
+          for component_id in issue.derived_component_ids)
+
+    self.issue2component_tbl.Delete(
+        cnxn, issue_id=[issue.issue_id for issue in issues], commit=False)
+    self.issue2component_tbl.InsertRows(
+        cnxn, ISSUE2COMPONENT_COLS + ['issue_shard'],
+        issue2component_rows, ignore=True, commit=commit)
+
+  def _UpdateIssuesCc(self, cnxn, issues, commit=True):
+    """Update the Issue2Cc table rows for the given issues."""
+    cc_rows = []
+    for issue in issues:
+      issue_shard = issue.issue_id % settings.num_logical_shards
+      cc_rows.extend(
+          (issue.issue_id, cc_id, False, issue_shard)
+          for cc_id in issue.cc_ids)
+      cc_rows.extend(
+          (issue.issue_id, cc_id, True, issue_shard)
+          for cc_id in issue.derived_cc_ids)
+
+    self.issue2cc_tbl.Delete(
+        cnxn, issue_id=[issue.issue_id for issue in issues], commit=False)
+    self.issue2cc_tbl.InsertRows(
+        cnxn, ISSUE2CC_COLS + ['issue_shard'],
+        cc_rows, ignore=True, commit=commit)
+
+  def _UpdateIssuesNotify(self, cnxn, issues, commit=True):
+    """Update the Issue2Notify table rows for the given issues."""
+    notify_rows = []
+    for issue in issues:
+      derived_rows = [[issue.issue_id, email]
+                      for email in issue.derived_notify_addrs]
+      notify_rows.extend(derived_rows)
+
+    self.issue2notify_tbl.Delete(
+        cnxn, issue_id=[issue.issue_id for issue in issues], commit=False)
+    self.issue2notify_tbl.InsertRows(
+        cnxn, ISSUE2NOTIFY_COLS, notify_rows, ignore=True, commit=commit)
+
+  def _UpdateIssuesRelation(self, cnxn, issues, commit=True):
+    """Update the IssueRelation table rows for the given issues."""
+    relation_rows = []
+    blocking_rows = []
+    dangling_relation_rows = []
+    for issue in issues:
+      for i, dst_issue_id in enumerate(issue.blocked_on_iids):
+        rank = issue.blocked_on_ranks[i]
+        relation_rows.append((issue.issue_id, dst_issue_id, 'blockedon', rank))
+      for dst_issue_id in issue.blocking_iids:
+        blocking_rows.append((dst_issue_id, issue.issue_id, 'blockedon'))
+      for dst_ref in issue.dangling_blocked_on_refs:
+        if dst_ref.ext_issue_identifier:
+          dangling_relation_rows.append((
+              issue.issue_id, None, None,
+              dst_ref.ext_issue_identifier, 'blockedon'))
+        else:
+          dangling_relation_rows.append((
+              issue.issue_id, dst_ref.project, dst_ref.issue_id,
+              None, 'blockedon'))
+      for dst_ref in issue.dangling_blocking_refs:
+        if dst_ref.ext_issue_identifier:
+          dangling_relation_rows.append((
+              issue.issue_id, None, None,
+              dst_ref.ext_issue_identifier, 'blocking'))
+        else:
+          dangling_relation_rows.append((
+              issue.issue_id, dst_ref.project, dst_ref.issue_id,
+              dst_ref.ext_issue_identifier, 'blocking'))
+      if issue.merged_into:
+        relation_rows.append((
+            issue.issue_id, issue.merged_into, 'mergedinto', None))
+      if issue.merged_into_external:
+        dangling_relation_rows.append((
+            issue.issue_id, None, None,
+            issue.merged_into_external, 'mergedinto'))
+
+    old_blocking = self.issuerelation_tbl.Select(
+        cnxn, cols=ISSUERELATION_COLS[:-1],
+        dst_issue_id=[issue.issue_id for issue in issues], kind='blockedon')
+    relation_rows.extend([
+      (row + (0,)) for row in blocking_rows if row not in old_blocking])
+    delete_rows = [row for row in old_blocking if row not in blocking_rows]
+
+    for issue_id, dst_issue_id, kind in delete_rows:
+      self.issuerelation_tbl.Delete(cnxn, issue_id=issue_id,
+          dst_issue_id=dst_issue_id, kind=kind, commit=False)
+    self.issuerelation_tbl.Delete(
+        cnxn, issue_id=[issue.issue_id for issue in issues], commit=False)
+    self.issuerelation_tbl.InsertRows(
+        cnxn, ISSUERELATION_COLS, relation_rows, ignore=True, commit=commit)
+    self.danglingrelation_tbl.Delete(
+        cnxn, issue_id=[issue.issue_id for issue in issues], commit=False)
+    self.danglingrelation_tbl.InsertRows(
+        cnxn, DANGLINGRELATION_COLS, dangling_relation_rows, ignore=True,
+        commit=commit)
+
+  def _UpdateIssuesModified(
+      self, cnxn, iids, modified_timestamp=None, invalidate=True):
+    """Store a modified timestamp for each of the specified issues."""
+    if not iids:
+      return
+    delta = {'modified': modified_timestamp or int(time.time())}
+    self.issue_tbl.Update(cnxn, delta, id=iids, commit=False)
+    if invalidate:
+      self.InvalidateIIDs(cnxn, iids)
+
+  def _UpdateIssuesApprovals(self, cnxn, issue, commit=True):
+    """Update the Issue2ApprovalValue table rows for the given issue."""
+    self.issue2approvalvalue_tbl.Delete(
+        cnxn, issue_id=issue.issue_id, commit=commit)
+    av_rows = [(av.approval_id, issue.issue_id, av.phase_id,
+                av.status.name.lower(), av.setter_id, av.set_on) for
+               av in issue.approval_values]
+    self.issue2approvalvalue_tbl.InsertRows(
+        cnxn, ISSUE2APPROVALVALUE_COLS, av_rows, commit=commit)
+
+    approver_rows = []
+    for av in issue.approval_values:
+      approver_rows.extend([(av.approval_id, approver_id, issue.issue_id)
+                            for approver_id in av.approver_ids])
+    self.issueapproval2approver_tbl.Delete(
+        cnxn, issue_id=issue.issue_id, commit=commit)
+    self.issueapproval2approver_tbl.InsertRows(
+        cnxn, ISSUEAPPROVAL2APPROVER_COLS, approver_rows, commit=commit)
+
+  def UpdateIssueStructure(self, cnxn, config, issue, template, reporter_id,
+                            comment_content, commit=True, invalidate=True):
+    """Converts the phases and approvals structure of the issue into the
+       structure of the given template."""
+    # TODO(jojwang): Remove Field defs that belong to any removed approvals.
+    approval_defs_by_id = {ad.approval_id: ad for ad in config.approval_defs}
+    issue_avs_by_id = {av.approval_id: av for av in issue.approval_values}
+
+    new_approval_surveys = []
+    new_issue_approvals = []
+
+    for template_av in template.approval_values:
+      existing_issue_av = issue_avs_by_id.get(template_av.approval_id)
+
+      # Update all approval surveys so latest ApprovalDef survey changes
+      # appear in the converted issue's approval values.
+      ad = approval_defs_by_id.get(template_av.approval_id)
+      new_av_approver_ids = []
+      if ad:
+        new_av_approver_ids = ad.approver_ids
+        new_approval_surveys.append(
+            self._MakeIssueComment(
+                issue.project_id, reporter_id, ad.survey,
+                is_description=True, approval_id=ad.approval_id))
+      else:
+        logging.info('ApprovalDef not found for approval %r', template_av)
+
+      # Keep approval values as-is if it exists in issue and template
+      if existing_issue_av:
+        new_av = tracker_bizobj.MakeApprovalValue(
+            existing_issue_av.approval_id,
+            approver_ids=existing_issue_av.approver_ids,
+            status=existing_issue_av.status,
+            setter_id=existing_issue_av.setter_id,
+            set_on=existing_issue_av.set_on,
+            phase_id=template_av.phase_id)
+        new_issue_approvals.append(new_av)
+      else:
+        new_av = tracker_bizobj.MakeApprovalValue(
+            template_av.approval_id, approver_ids=new_av_approver_ids,
+            status=template_av.status, phase_id=template_av.phase_id)
+        new_issue_approvals.append(new_av)
+
+    template_phase_by_name = {
+        phase.name.lower(): phase for phase in template.phases}
+    issue_phase_by_id = {phase.phase_id: phase for phase in issue.phases}
+    updated_fvs = []
+    # Trim issue FieldValues or update FieldValue phase_ids
+    for fv in issue.field_values:
+      # If a fv's phase has the same name as a template's phase, update
+      # the fv's phase_id to that of the template phase's. Otherwise,
+      # remove the fv.
+      if fv.phase_id:
+        issue_phase = issue_phase_by_id.get(fv.phase_id)
+        if issue_phase and issue_phase.name:
+          template_phase = template_phase_by_name.get(issue_phase.name.lower())
+          # TODO(jojwang): monorail:4693, remove this after all 'stable-full'
+          # gates have been renamed to 'stable'.
+          if not template_phase:
+            template_phase = template_phase_by_name.get(
+                FLT_EQUIVALENT_GATES.get(issue_phase.name.lower()))
+          if template_phase:
+            fv.phase_id = template_phase.phase_id
+            updated_fvs.append(fv)
+      # keep all fvs that do not belong to phases.
+      else:
+        updated_fvs.append(fv)
+
+    fd_names_by_id = {fd.field_id: fd.field_name for fd in config.field_defs}
+    amendment = tracker_bizobj.MakeApprovalStructureAmendment(
+        [fd_names_by_id.get(av.approval_id) for av in new_issue_approvals],
+        [fd_names_by_id.get(av.approval_id) for av in issue.approval_values])
+
+    # Update issue structure in RAM.
+    issue.approval_values = new_issue_approvals
+    issue.phases = template.phases
+    issue.field_values = updated_fvs
+
+    # Update issue structure in DB.
+    for survey in new_approval_surveys:
+      survey.issue_id = issue.issue_id
+      self.InsertComment(cnxn, survey, commit=False)
+    self._UpdateIssuesApprovals(cnxn, issue, commit=False)
+    self._UpdateIssuesFields(cnxn, [issue], commit=False)
+    comment_pb = self.CreateIssueComment(
+        cnxn, issue, reporter_id, comment_content,
+        amendments=[amendment], commit=False)
+
+    if commit:
+      cnxn.Commit()
+
+    if invalidate:
+      self.InvalidateIIDs(cnxn, [issue.issue_id])
+
+    return comment_pb
+
+  def DeltaUpdateIssue(
+      self, cnxn, services, reporter_id, project_id,
+      config, issue, delta, index_now=False, comment=None, attachments=None,
+      iids_to_invalidate=None, rules=None, predicate_asts=None,
+      is_description=False, timestamp=None, kept_attachments=None,
+      importer_id=None, inbound_message=None):
+    """Update the issue in the database and return a set of update tuples.
+
+    Args:
+      cnxn: connection to SQL database.
+      services: connections to persistence layer.
+      reporter_id: user ID of the user making this change.
+      project_id: int ID for the current project.
+      config: ProjectIssueConfig PB for this project.
+      issue: Issue PB of issue to update.
+      delta: IssueDelta object of fields to update.
+      index_now: True if the issue should be updated in the full text index.
+      comment: This should be the content of the comment
+          corresponding to this change.
+      attachments: List [(filename, contents, mimetype),...] of attachments.
+      iids_to_invalidate: optional set of issue IDs that need to be invalidated.
+          If provided, affected issues will be accumulated here and, the caller
+          must call InvalidateIIDs() afterwards.
+      rules: optional list of preloaded FilterRule PBs for this project.
+      predicate_asts: optional list of QueryASTs for the rules.  If rules are
+          provided, then predicate_asts should also be provided.
+      is_description: True if the comment is a new description for the issue.
+      timestamp: int timestamp set during testing, otherwise defaults to
+          int(time.time()).
+      kept_attachments: This should be a list of int attachment ids for
+          attachments kept from previous descriptions, if the comment is
+          a change to the issue description
+      importer_id: optional ID of user ID for an API client that is importing
+          issues and attributing them to other users.
+      inbound_message: optional string full text of an email that caused
+          this comment to be added.
+
+    Returns:
+      A tuple (amendments, comment_pb) with a list of Amendment PBs that
+      describe the set of metadata updates that the user made, and the
+      resulting IssueComment (or None if no comment was created).
+    """
+    timestamp = timestamp or int(time.time())
+    old_effective_owner = tracker_bizobj.GetOwnerId(issue)
+    old_effective_status = tracker_bizobj.GetStatus(issue)
+    old_components = set(issue.component_ids)
+
+    logging.info(
+        'Bulk edit to project_id %s issue.local_id %s, comment %r',
+        project_id, issue.local_id, comment)
+    if iids_to_invalidate is None:
+      iids_to_invalidate = set([issue.issue_id])
+      invalidate = True
+    else:
+      iids_to_invalidate.add(issue.issue_id)
+      invalidate = False  # Caller will do it.
+
+    # Store each updated value in the issue PB, and compute Update PBs
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        cnxn, self, issue, delta, config)
+    iids_to_invalidate.update(impacted_iids)
+
+    # If this was a no-op with no comment, bail out and don't save,
+    # invalidate, or re-index anything.
+    if (not amendments and (not comment or not comment.strip()) and
+        not attachments):
+      logging.info('No amendments, comment, attachments: this is a no-op.')
+      return [], None
+
+    # Note: no need to check for collisions when the user is doing a delta.
+
+    # update the modified_timestamp for any comment added, even if it was
+    # just a text comment with no issue fields changed.
+    issue.modified_timestamp = timestamp
+
+    # Update the closed timestamp before filter rules so that rules
+    # can test for closed_timestamp, and also after filter rules
+    # so that closed_timestamp will be set if the issue is closed by the rule.
+    tracker_helpers.UpdateClosedTimestamp(config, issue, old_effective_status)
+    if rules is None:
+      logging.info('Rules were not given')
+      rules = services.features.GetFilterRules(cnxn, config.project_id)
+      predicate_asts = filterrules_helpers.ParsePredicateASTs(
+          rules, config, [])
+
+    filterrules_helpers.ApplyGivenRules(
+        cnxn, services, issue, config, rules, predicate_asts)
+    tracker_helpers.UpdateClosedTimestamp(config, issue, old_effective_status)
+    if old_effective_owner != tracker_bizobj.GetOwnerId(issue):
+      issue.owner_modified_timestamp = timestamp
+    if old_effective_status != tracker_bizobj.GetStatus(issue):
+      issue.status_modified_timestamp = timestamp
+    if old_components != set(issue.component_ids):
+      issue.component_modified_timestamp = timestamp
+
+    # Store the issue in SQL.
+    self.UpdateIssue(cnxn, issue, commit=False, invalidate=False)
+
+    comment_pb = self.CreateIssueComment(
+        cnxn, issue, reporter_id, comment, amendments=amendments,
+        is_description=is_description, attachments=attachments, commit=False,
+        kept_attachments=kept_attachments, timestamp=timestamp,
+        importer_id=importer_id, inbound_message=inbound_message)
+    self._UpdateIssuesModified(
+        cnxn, iids_to_invalidate, modified_timestamp=issue.modified_timestamp,
+        invalidate=invalidate)
+
+    # Add a comment to the newly added issues saying they are now blocking
+    # this issue.
+    for add_issue in self.GetIssues(cnxn, delta.blocked_on_add):
+      self.CreateIssueComment(
+          cnxn, add_issue, reporter_id, content='',
+          amendments=[tracker_bizobj.MakeBlockingAmendment(
+              [(issue.project_name, issue.local_id)], [],
+              default_project_name=add_issue.project_name)],
+          timestamp=timestamp, importer_id=importer_id)
+    # Add a comment to the newly removed issues saying they are no longer
+    # blocking this issue.
+    for remove_issue in self.GetIssues(cnxn, delta.blocked_on_remove):
+      self.CreateIssueComment(
+          cnxn, remove_issue, reporter_id, content='',
+          amendments=[tracker_bizobj.MakeBlockingAmendment(
+              [], [(issue.project_name, issue.local_id)],
+              default_project_name=remove_issue.project_name)],
+           timestamp=timestamp, importer_id=importer_id)
+
+    # Add a comment to the newly added issues saying they are now blocked on
+    # this issue.
+    for add_issue in self.GetIssues(cnxn, delta.blocking_add):
+      self.CreateIssueComment(
+          cnxn, add_issue, reporter_id, content='',
+          amendments=[tracker_bizobj.MakeBlockedOnAmendment(
+              [(issue.project_name, issue.local_id)], [],
+              default_project_name=add_issue.project_name)],
+          timestamp=timestamp, importer_id=importer_id)
+    # Add a comment to the newly removed issues saying they are no longer
+    # blocked on this issue.
+    for remove_issue in self.GetIssues(cnxn, delta.blocking_remove):
+      self.CreateIssueComment(
+          cnxn, remove_issue, reporter_id, content='',
+          amendments=[tracker_bizobj.MakeBlockedOnAmendment(
+              [], [(issue.project_name, issue.local_id)],
+              default_project_name=remove_issue.project_name)],
+          timestamp=timestamp, importer_id=importer_id)
+
+    if not invalidate:
+      cnxn.Commit()
+
+    if index_now:
+      tracker_fulltext.IndexIssues(
+          cnxn, [issue], services.user_service, self, self._config_service)
+    else:
+      self.EnqueueIssuesForIndexing(cnxn, [issue.issue_id])
+
+    return amendments, comment_pb
+
+  def InvalidateIIDs(self, cnxn, iids_to_invalidate):
+    """Invalidate the specified issues in the Invalidate table and memcache."""
+    issues_to_invalidate = self.GetIssues(cnxn, iids_to_invalidate)
+    self.InvalidateIssues(cnxn, issues_to_invalidate)
+
+  def InvalidateIssues(self, cnxn, issues):
+    """Invalidate the specified issues in the Invalidate table and memcache."""
+    iids = [issue.issue_id for issue in issues]
+    self.issue_2lc.InvalidateKeys(cnxn, iids)
+    self._config_service.InvalidateMemcache(issues)
+
+  def RelateIssues(self, cnxn, issue_relation_dict, commit=True):
+    """Update the IssueRelation table rows for the given relationships.
+
+    issue_relation_dict is a mapping of 'source' issues to 'destination' issues,
+    paired with the kind of relationship connecting the two.
+    """
+    relation_rows = []
+    for src_iid, dests in issue_relation_dict.items():
+      for dst_iid, kind in dests:
+        if kind == 'blocking':
+          relation_rows.append((dst_iid, src_iid, 'blockedon', 0))
+        elif kind == 'blockedon':
+          relation_rows.append((src_iid, dst_iid, 'blockedon', 0))
+        elif kind == 'mergedinto':
+          relation_rows.append((src_iid, dst_iid, 'mergedinto', None))
+
+    self.issuerelation_tbl.InsertRows(
+        cnxn, ISSUERELATION_COLS, relation_rows, ignore=True, commit=commit)
+
+  def CopyIssues(self, cnxn, dest_project, issues, user_service, copier_id):
+    """Copy the given issues into the destination project."""
+    created_issues = []
+    iids_to_invalidate = set()
+
+    for target_issue in issues:
+      assert not target_issue.assume_stale, (
+          'issue2514: Copying issue that might be stale: %r' % target_issue)
+      new_issue = tracker_pb2.Issue()
+      new_issue.project_id = dest_project.project_id
+      new_issue.project_name = dest_project.project_name
+      new_issue.summary = target_issue.summary
+      new_issue.labels.extend(target_issue.labels)
+      new_issue.field_values.extend(target_issue.field_values)
+      new_issue.reporter_id = copier_id
+
+      timestamp = int(time.time())
+      new_issue.opened_timestamp = timestamp
+      new_issue.modified_timestamp = timestamp
+
+      target_comments = self.GetCommentsForIssue(cnxn, target_issue.issue_id)
+      initial_summary_comment = target_comments[0]
+
+      # Note that blocking and merge_into are not copied.
+      if target_issue.blocked_on_iids:
+        blocked_on = target_issue.blocked_on_iids
+        iids_to_invalidate.update(blocked_on)
+        new_issue.blocked_on_iids = blocked_on
+
+      # Gather list of attachments from the target issue's summary comment.
+      # MakeIssueComments expects a list of [(filename, contents, mimetype),...]
+      attachments = []
+      for attachment in initial_summary_comment.attachments:
+        object_path = ('/' + app_identity.get_default_gcs_bucket_name() +
+                       attachment.gcs_object_id)
+        with cloudstorage.open(object_path, 'r') as f:
+          content = f.read()
+          attachments.append(
+              [attachment.filename, content, attachment.mimetype])
+
+      if attachments:
+        new_issue.attachment_count = len(attachments)
+
+      # Create the same summary comment as the target issue.
+      comment = self._MakeIssueComment(
+          dest_project.project_id, copier_id, initial_summary_comment.content,
+          attachments=attachments, timestamp=timestamp, is_description=True)
+
+      new_issue.local_id = self.AllocateNextLocalID(
+          cnxn, dest_project.project_id)
+      issue_id = self.InsertIssue(cnxn, new_issue)
+      comment.issue_id = issue_id
+      self.InsertComment(cnxn, comment)
+
+      if permissions.HasRestrictions(new_issue, 'view'):
+        self._config_service.InvalidateMemcache(
+            [new_issue], key_prefix='nonviewable:')
+
+      tracker_fulltext.IndexIssues(
+          cnxn, [new_issue], user_service, self, self._config_service)
+      created_issues.append(new_issue)
+
+    # The referenced issues are all modified when the relationship is added.
+    self._UpdateIssuesModified(
+      cnxn, iids_to_invalidate, modified_timestamp=timestamp)
+
+    return created_issues
+
+  def MoveIssues(self, cnxn, dest_project, issues, user_service):
+    """Move the given issues into the destination project."""
+    old_location_rows = [
+        (issue.issue_id, issue.project_id, issue.local_id)
+        for issue in issues]
+    moved_back_iids = set()
+
+    former_locations_in_project = self.issueformerlocations_tbl.Select(
+        cnxn, cols=ISSUEFORMERLOCATIONS_COLS,
+        project_id=dest_project.project_id,
+        issue_id=[issue.issue_id for issue in issues])
+    former_locations = {
+        issue_id: local_id
+        for issue_id, project_id, local_id in former_locations_in_project}
+
+    # Remove the issue id from issue_id_2lc so that it does not stay
+    # around in cache and memcache.
+    # The Key of IssueIDTwoLevelCache is (project_id, local_id).
+    self.issue_id_2lc.InvalidateKeys(
+        cnxn, [(issue.project_id, issue.local_id) for issue in issues])
+    self.InvalidateIssues(cnxn, issues)
+
+    for issue in issues:
+      if issue.issue_id in former_locations:
+        dest_id = former_locations[issue.issue_id]
+        moved_back_iids.add(issue.issue_id)
+      else:
+        dest_id = self.AllocateNextLocalID(cnxn, dest_project.project_id)
+
+      issue.local_id = dest_id
+      issue.project_id = dest_project.project_id
+      issue.project_name = dest_project.project_name
+
+    # Rewrite each whole issue so that status and label IDs are looked up
+    # in the context of the destination project.
+    self.UpdateIssues(cnxn, issues)
+
+    # Comments also have the project_id because it is needed for an index.
+    self.comment_tbl.Update(
+        cnxn, {'project_id': dest_project.project_id},
+        issue_id=[issue.issue_id for issue in issues], commit=False)
+
+    # Record old locations so that we can offer links if the user looks there.
+    self.issueformerlocations_tbl.InsertRows(
+        cnxn, ISSUEFORMERLOCATIONS_COLS, old_location_rows, ignore=True,
+        commit=False)
+    cnxn.Commit()
+
+    tracker_fulltext.IndexIssues(
+        cnxn, issues, user_service, self, self._config_service)
+
+    return moved_back_iids
+
+  def ExpungeFormerLocations(self, cnxn, project_id):
+    """Delete history of issues that were in this project but moved out."""
+    self.issueformerlocations_tbl.Delete(cnxn, project_id=project_id)
+
+  def ExpungeIssues(self, cnxn, issue_ids):
+    """Completely delete the specified issues from the database."""
+    logging.info('expunging the issues %r', issue_ids)
+    tracker_fulltext.UnindexIssues(issue_ids)
+
+    remaining_iids = issue_ids[:]
+
+    # Note: these are purposely not done in a transaction to allow
+    # incremental progress in what might be a very large change.
+    # We are not concerned about non-atomic deletes because all
+    # this data will be gone eventually anyway.
+    while remaining_iids:
+      iids_in_chunk = remaining_iids[:CHUNK_SIZE]
+      remaining_iids = remaining_iids[CHUNK_SIZE:]
+      self.issuesummary_tbl.Delete(cnxn, issue_id=iids_in_chunk)
+      self.issue2label_tbl.Delete(cnxn, issue_id=iids_in_chunk)
+      self.issue2component_tbl.Delete(cnxn, issue_id=iids_in_chunk)
+      self.issue2cc_tbl.Delete(cnxn, issue_id=iids_in_chunk)
+      self.issue2notify_tbl.Delete(cnxn, issue_id=iids_in_chunk)
+      self.issueupdate_tbl.Delete(cnxn, issue_id=iids_in_chunk)
+      self.attachment_tbl.Delete(cnxn, issue_id=iids_in_chunk)
+      self.comment_tbl.Delete(cnxn, issue_id=iids_in_chunk)
+      self.issuerelation_tbl.Delete(cnxn, issue_id=iids_in_chunk)
+      self.issuerelation_tbl.Delete(cnxn, dst_issue_id=iids_in_chunk)
+      self.danglingrelation_tbl.Delete(cnxn, issue_id=iids_in_chunk)
+      self.issueformerlocations_tbl.Delete(cnxn, issue_id=iids_in_chunk)
+      self.reindexqueue_tbl.Delete(cnxn, issue_id=iids_in_chunk)
+      self.issue_tbl.Delete(cnxn, id=iids_in_chunk)
+
+  def SoftDeleteIssue(self, cnxn, project_id, local_id, deleted, user_service):
+    """Set the deleted boolean on the indicated issue and store it.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int project ID for the current project.
+      local_id: int local ID of the issue to freeze/unfreeze.
+      deleted: boolean, True to soft-delete, False to undelete.
+      user_service: persistence layer for users, used to lookup user IDs.
+    """
+    issue = self.GetIssueByLocalID(cnxn, project_id, local_id, use_cache=False)
+    issue.deleted = deleted
+    self.UpdateIssue(cnxn, issue, update_cols=['deleted'])
+    tracker_fulltext.IndexIssues(
+        cnxn, [issue], user_service, self, self._config_service)
+
+  def DeleteComponentReferences(self, cnxn, component_id):
+    """Delete any references to the specified component."""
+    # TODO(jrobbins): add tasks to re-index any affected issues.
+    # Note: if this call fails, some data could be left
+    # behind, but it would not be displayed, and it could always be
+    # GC'd from the DB later.
+    self.issue2component_tbl.Delete(cnxn, component_id=component_id)
+
+  ### Local ID generation
+
+  def InitializeLocalID(self, cnxn, project_id):
+    """Initialize the local ID counter for the specified project to zero.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project.
+    """
+    self.localidcounter_tbl.InsertRow(
+        cnxn, project_id=project_id, used_local_id=0, used_spam_id=0)
+
+  def SetUsedLocalID(self, cnxn, project_id):
+    """Set the local ID counter based on existing issues.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project.
+    """
+    highest_id = self.GetHighestLocalID(cnxn, project_id)
+    self.localidcounter_tbl.InsertRow(
+        cnxn, replace=True, used_local_id=highest_id, project_id=project_id)
+    return highest_id
+
+  def AllocateNextLocalID(self, cnxn, project_id):
+    """Return the next available issue ID in the specified project.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project.
+
+    Returns:
+      The next local ID.
+    """
+    try:
+      next_local_id = self.localidcounter_tbl.IncrementCounterValue(
+          cnxn, 'used_local_id', project_id=project_id)
+    except AssertionError as e:
+      logging.info('exception incrementing local_id counter: %s', e)
+      next_local_id = self.SetUsedLocalID(cnxn, project_id) + 1
+    return next_local_id
+
+  def GetHighestLocalID(self, cnxn, project_id):
+    """Return the highest used issue ID in the specified project.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project.
+
+    Returns:
+      The highest local ID for an active or moved issues.
+    """
+    highest = self.issue_tbl.SelectValue(
+        cnxn, 'MAX(local_id)', project_id=project_id)
+    highest = highest or 0  # It will be None if the project has no issues.
+    highest_former = self.issueformerlocations_tbl.SelectValue(
+        cnxn, 'MAX(local_id)', project_id=project_id)
+    highest_former = highest_former or 0
+    return max(highest, highest_former)
+
+  def GetAllLocalIDsInProject(self, cnxn, project_id, min_local_id=None):
+    """Return the list of local IDs only, not the actual issues.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: the ID of the project to which the issue belongs.
+      min_local_id: point to start at.
+
+    Returns:
+      A range object of local IDs from 1 to N, or from min_local_id to N.  It
+      may be the case that some of those local IDs are no longer used, e.g.,
+      if some issues were moved out of this project.
+    """
+    if not min_local_id:
+      min_local_id = 1
+    highest_local_id = self.GetHighestLocalID(cnxn, project_id)
+    return list(range(min_local_id, highest_local_id + 1))
+
+  def ExpungeLocalIDCounters(self, cnxn, project_id):
+    """Delete history of local ids that were in this project."""
+    self.localidcounter_tbl.Delete(cnxn, project_id=project_id)
+
+  ### Comments
+
+  def _UnpackComment(
+      self, comment_row, content_dict, inbound_message_dict, approval_dict,
+      importer_dict):
+    """Partially construct a Comment PB from a DB row."""
+    (comment_id, issue_id, created, project_id, commenter_id,
+     deleted_by, is_spam, is_description, commentcontent_id) = comment_row
+    comment = tracker_pb2.IssueComment()
+    comment.id = comment_id
+    comment.issue_id = issue_id
+    comment.timestamp = created
+    comment.project_id = project_id
+    comment.user_id = commenter_id
+    comment.content = content_dict.get(commentcontent_id, '')
+    comment.inbound_message = inbound_message_dict.get(commentcontent_id, '')
+    comment.deleted_by = deleted_by or 0
+    comment.is_spam = bool(is_spam)
+    comment.is_description = bool(is_description)
+    comment.approval_id = approval_dict.get(comment_id)
+    comment.importer_id = importer_dict.get(comment_id)
+    return comment
+
+  def _UnpackAmendment(self, amendment_row):
+    """Construct an Amendment PB from a DB row."""
+    (_id, _issue_id, comment_id, field_name,
+     old_value, new_value, added_user_id, removed_user_id,
+     custom_field_name) = amendment_row
+    amendment = tracker_pb2.Amendment()
+    field_enum = tracker_pb2.FieldID(field_name.upper())
+    amendment.field = field_enum
+
+    # TODO(jrobbins): display old values in more cases.
+    if new_value is not None:
+      amendment.newvalue = new_value
+    if old_value is not None:
+      amendment.oldvalue = old_value
+    if added_user_id:
+      amendment.added_user_ids.append(added_user_id)
+    if removed_user_id:
+      amendment.removed_user_ids.append(removed_user_id)
+    if custom_field_name:
+      amendment.custom_field_name = custom_field_name
+    return amendment, comment_id
+
+  def _ConsolidateAmendments(self, amendments):
+    """Consoliodate amendments of the same field in one comment into one
+    amendment PB."""
+
+    fields_dict = {}
+    result = []
+
+    for amendment in amendments:
+      key = amendment.field, amendment.custom_field_name
+      fields_dict.setdefault(key, []).append(amendment)
+    for (field, _custom_name), sorted_amendments in sorted(fields_dict.items()):
+      new_amendment = tracker_pb2.Amendment()
+      new_amendment.field = field
+      for amendment in sorted_amendments:
+        if amendment.newvalue is not None:
+          if new_amendment.newvalue is not None:
+            # NOTE: see crbug/monorail/8272. BLOCKEDON and BLOCKING changes
+            # are all stored in newvalue e.g. (newvalue = -b/123 b/124) and
+            # external bugs and monorail bugs are stored in separate amendments.
+            # Without this, the values of external bug amendments and monorail
+            # blocker bug amendments may overwrite each other.
+            new_amendment.newvalue += (' ' + amendment.newvalue)
+          else:
+            new_amendment.newvalue = amendment.newvalue
+        if amendment.oldvalue is not None:
+          new_amendment.oldvalue = amendment.oldvalue
+        if amendment.added_user_ids:
+          new_amendment.added_user_ids.extend(amendment.added_user_ids)
+        if amendment.removed_user_ids:
+          new_amendment.removed_user_ids.extend(amendment.removed_user_ids)
+        if amendment.custom_field_name:
+          new_amendment.custom_field_name = amendment.custom_field_name
+      result.append(new_amendment)
+    return result
+
+  def _UnpackAttachment(self, attachment_row):
+    """Construct an Attachment PB from a DB row."""
+    (attachment_id, _issue_id, comment_id, filename, filesize, mimetype,
+     deleted, gcs_object_id) = attachment_row
+    attach = tracker_pb2.Attachment()
+    attach.attachment_id = attachment_id
+    attach.filename = filename
+    attach.filesize = filesize
+    attach.mimetype = mimetype
+    attach.deleted = bool(deleted)
+    attach.gcs_object_id = gcs_object_id
+    return attach, comment_id
+
+  def _DeserializeComments(
+      self, comment_rows, commentcontent_rows, amendment_rows, attachment_rows,
+      approval_rows, importer_rows):
+    """Turn rows into IssueComment PBs."""
+    results = []  # keep objects in the same order as the rows
+    results_dict = {}  # for fast access when joining.
+
+    content_dict = dict(
+        (commentcontent_id, content) for
+        commentcontent_id, content, _ in commentcontent_rows)
+    inbound_message_dict = dict(
+        (commentcontent_id, inbound_message) for
+        commentcontent_id, _, inbound_message in commentcontent_rows)
+    approval_dict = dict(
+        (comment_id, approval_id) for approval_id, comment_id in
+        approval_rows)
+    importer_dict = dict(importer_rows)
+
+    for comment_row in comment_rows:
+      comment = self._UnpackComment(
+          comment_row, content_dict, inbound_message_dict, approval_dict,
+          importer_dict)
+      results.append(comment)
+      results_dict[comment.id] = comment
+
+    for amendment_row in amendment_rows:
+      amendment, comment_id = self._UnpackAmendment(amendment_row)
+      try:
+        results_dict[comment_id].amendments.extend([amendment])
+      except KeyError:
+        logging.error('Found amendment for missing comment: %r', comment_id)
+
+    for attachment_row in attachment_rows:
+      attach, comment_id = self._UnpackAttachment(attachment_row)
+      try:
+        results_dict[comment_id].attachments.append(attach)
+      except KeyError:
+        logging.error('Found attachment for missing comment: %r', comment_id)
+
+    for c in results:
+      c.amendments = self._ConsolidateAmendments(c.amendments)
+
+    return results
+
+  # TODO(jrobbins): make this a private method and expose just the interface
+  # needed by activities.py.
+  def GetComments(
+      self, cnxn, where=None, order_by=None, content_only=False, **kwargs):
+    """Retrieve comments from SQL."""
+    shard_id = sql.RandomShardID()
+    order_by = order_by or [('created', [])]
+    comment_rows = self.comment_tbl.Select(
+        cnxn, cols=COMMENT_COLS, where=where,
+        order_by=order_by, shard_id=shard_id, **kwargs)
+    cids = [row[0] for row in comment_rows]
+    commentcontent_ids = [row[-1] for row in comment_rows]
+    content_rows = self.commentcontent_tbl.Select(
+        cnxn, cols=COMMENTCONTENT_COLS, id=commentcontent_ids,
+        shard_id=shard_id)
+    approval_rows = self.issueapproval2comment_tbl.Select(
+        cnxn, cols=ISSUEAPPROVAL2COMMENT_COLS, comment_id=cids)
+    amendment_rows = []
+    attachment_rows = []
+    importer_rows = []
+    if not content_only:
+      amendment_rows = self.issueupdate_tbl.Select(
+          cnxn, cols=ISSUEUPDATE_COLS, comment_id=cids, shard_id=shard_id)
+      attachment_rows = self.attachment_tbl.Select(
+          cnxn, cols=ATTACHMENT_COLS, comment_id=cids, shard_id=shard_id)
+      importer_rows = self.commentimporter_tbl.Select(
+          cnxn, cols=COMMENTIMPORTER_COLS, comment_id=cids, shard_id=shard_id)
+
+    comments = self._DeserializeComments(
+        comment_rows, content_rows, amendment_rows, attachment_rows,
+        approval_rows, importer_rows)
+    return comments
+
+  def GetComment(self, cnxn, comment_id):
+    """Get the requested comment, or raise an exception."""
+    comments = self.GetComments(cnxn, id=comment_id)
+    try:
+      return comments[0]
+    except IndexError:
+      raise exceptions.NoSuchCommentException()
+
+  def GetCommentsForIssue(self, cnxn, issue_id):
+    """Return all IssueComment PBs for the specified issue.
+
+    Args:
+      cnxn: connection to SQL database.
+      issue_id: int global ID of the issue.
+
+    Returns:
+      A list of the IssueComment protocol buffers for the description
+      and comments on this issue.
+    """
+    comments = self.GetComments(cnxn, issue_id=[issue_id])
+    for i, comment in enumerate(comments):
+      comment.sequence = i
+
+    return comments
+
+
+  def GetCommentsByID(self, cnxn, comment_ids, sequences, use_cache=True,
+      shard_id=None):
+    """Return all IssueComment PBs by comment ids.
+
+    Args:
+      cnxn: connection to SQL database.
+      comment_ids: a list of comment ids.
+      sequences: sequence of the comments.
+      use_cache: optional boolean to enable the cache.
+      shard_id: optional int shard_id to limit retrieval.
+
+    Returns:
+      A list of the IssueComment protocol buffers for comment_ids.
+    """
+    # Try loading issue comments from a random shard to reduce load on
+    # primary DB.
+    if shard_id is None:
+      shard_id = sql.RandomShardID()
+
+    comment_dict, _missed_comments = self.comment_2lc.GetAll(cnxn, comment_ids,
+          use_cache=use_cache, shard_id=shard_id)
+
+    comments = sorted(list(comment_dict.values()), key=lambda x: x.timestamp)
+
+    for i in range(len(comment_ids)):
+      comments[i].sequence = sequences[i]
+
+    return comments
+
+  # TODO(jrobbins): remove this method because it is too slow when an issue
+  # has a huge number of comments.
+  def GetCommentsForIssues(self, cnxn, issue_ids, content_only=False):
+    """Return all IssueComment PBs for each issue ID in the given list.
+
+    Args:
+      cnxn: connection to SQL database.
+      issue_ids: list of integer global issue IDs.
+      content_only: optional boolean, set true for faster loading of
+          comment content without attachments and amendments.
+
+    Returns:
+      Dict {issue_id: [IssueComment, ...]} with IssueComment protocol
+      buffers for the description and comments on each issue.
+    """
+    comments = self.GetComments(
+        cnxn, issue_id=issue_ids, content_only=content_only)
+
+    comments_dict = collections.defaultdict(list)
+    for comment in comments:
+      comment.sequence = len(comments_dict[comment.issue_id])
+      comments_dict[comment.issue_id].append(comment)
+
+    return comments_dict
+
+  def InsertComment(self, cnxn, comment, commit=True):
+    """Store the given issue comment in SQL.
+
+    Args:
+      cnxn: connection to SQL database.
+      comment: IssueComment PB to insert into the database.
+      commit: set to False to avoid doing the commit for now.
+    """
+    commentcontent_id = self.commentcontent_tbl.InsertRow(
+        cnxn, content=comment.content,
+        inbound_message=comment.inbound_message, commit=False)
+    comment_id = self.comment_tbl.InsertRow(
+        cnxn, issue_id=comment.issue_id, created=comment.timestamp,
+        project_id=comment.project_id,
+        commenter_id=comment.user_id,
+        deleted_by=comment.deleted_by or None,
+        is_spam=comment.is_spam, is_description=comment.is_description,
+        commentcontent_id=commentcontent_id,
+        commit=False)
+    comment.id = comment_id
+    if comment.importer_id:
+      self.commentimporter_tbl.InsertRow(
+          cnxn, comment_id=comment_id, importer_id=comment.importer_id)
+
+    amendment_rows = []
+    for amendment in comment.amendments:
+      field_enum = str(amendment.field).lower()
+      if (amendment.get_assigned_value('newvalue') is not None and
+          not amendment.added_user_ids and not amendment.removed_user_ids):
+        amendment_rows.append((
+            comment.issue_id, comment_id, field_enum,
+            amendment.oldvalue, amendment.newvalue,
+            None, None, amendment.custom_field_name))
+      for added_user_id in amendment.added_user_ids:
+        amendment_rows.append((
+            comment.issue_id, comment_id, field_enum, None, None,
+            added_user_id, None, amendment.custom_field_name))
+      for removed_user_id in amendment.removed_user_ids:
+        amendment_rows.append((
+            comment.issue_id, comment_id, field_enum, None, None,
+            None, removed_user_id, amendment.custom_field_name))
+    # ISSUEUPDATE_COLS[1:] to skip id column.
+    self.issueupdate_tbl.InsertRows(
+        cnxn, ISSUEUPDATE_COLS[1:], amendment_rows, commit=False)
+
+    attachment_rows = []
+    for attach in comment.attachments:
+      attachment_rows.append([
+          comment.issue_id, comment.id, attach.filename, attach.filesize,
+          attach.mimetype, attach.deleted, attach.gcs_object_id])
+    self.attachment_tbl.InsertRows(
+        cnxn, ATTACHMENT_COLS[1:], attachment_rows, commit=False)
+
+    if comment.approval_id:
+      self.issueapproval2comment_tbl.InsertRows(
+          cnxn, ISSUEAPPROVAL2COMMENT_COLS,
+          [(comment.approval_id, comment_id)], commit=False)
+
+    if commit:
+      cnxn.Commit()
+
+  def _UpdateComment(self, cnxn, comment, update_cols=None):
+    """Update the given issue comment in SQL.
+
+    Args:
+      cnxn: connection to SQL database.
+      comment: IssueComment PB to update in the database.
+      update_cols: optional list of just the field names to update.
+    """
+    delta = {
+        'commenter_id': comment.user_id,
+        'deleted_by': comment.deleted_by or None,
+        'is_spam': comment.is_spam,
+        }
+    if update_cols is not None:
+      delta = {key: val for key, val in delta.items()
+               if key in update_cols}
+
+    self.comment_tbl.Update(cnxn, delta, id=comment.id)
+    self.comment_2lc.InvalidateKeys(cnxn, [comment.id])
+
+  def _MakeIssueComment(
+      self, project_id, user_id, content, inbound_message=None,
+      amendments=None, attachments=None, kept_attachments=None, timestamp=None,
+      is_spam=False, is_description=False, approval_id=None, importer_id=None):
+    """Create in IssueComment protocol buffer in RAM.
+
+    Args:
+      project_id: Project with the issue.
+      user_id: the user ID of the user who entered the comment.
+      content: string body of the comment.
+      inbound_message: optional string full text of an email that
+          caused this comment to be added.
+      amendments: list of Amendment PBs describing the
+          metadata changes that the user made along w/ comment.
+      attachments: [(filename, contents, mimetype),...] attachments uploaded at
+          the time the comment was made.
+      kept_attachments: list of Attachment PBs for attachments kept from
+          previous descriptions, if the comment is a description
+      timestamp: time at which the comment was made, defaults to now.
+      is_spam: True if the comment was classified as spam.
+      is_description: True if the comment is a description for the issue.
+      approval_id: id, if any, of the APPROVAL_TYPE FieldDef this comment
+          belongs to.
+      importer_id: optional User ID of script that imported the comment on
+          behalf of a user.
+
+    Returns:
+      The new IssueComment protocol buffer.
+
+    The content may have some markup done during input processing.
+
+    Any attachments are immediately stored.
+    """
+    comment = tracker_pb2.IssueComment()
+    comment.project_id = project_id
+    comment.user_id = user_id
+    comment.content = content or ''
+    comment.is_spam = is_spam
+    comment.is_description = is_description
+    if not timestamp:
+      timestamp = int(time.time())
+    comment.timestamp = int(timestamp)
+    if inbound_message:
+      comment.inbound_message = inbound_message
+    if amendments:
+      logging.info('amendments is %r', amendments)
+      comment.amendments.extend(amendments)
+    if approval_id:
+      comment.approval_id = approval_id
+
+    if attachments:
+      for filename, body, mimetype in attachments:
+        gcs_object_id = gcs_helpers.StoreObjectInGCS(
+            body, mimetype, project_id, filename=filename)
+        attach = tracker_pb2.Attachment()
+        # attachment id is determined later by the SQL DB.
+        attach.filename = filename
+        attach.filesize = len(body)
+        attach.mimetype = mimetype
+        attach.gcs_object_id = gcs_object_id
+        comment.attachments.extend([attach])
+        logging.info("Save attachment with object_id: %s" % gcs_object_id)
+
+    if kept_attachments:
+      for kept_attach in kept_attachments:
+        (filename, filesize, mimetype, deleted,
+         gcs_object_id) = kept_attach[3:]
+        new_attach = tracker_pb2.Attachment(
+            filename=filename, filesize=filesize, mimetype=mimetype,
+            deleted=bool(deleted), gcs_object_id=gcs_object_id)
+        comment.attachments.append(new_attach)
+        logging.info("Copy attachment with object_id: %s" % gcs_object_id)
+
+    if importer_id:
+      comment.importer_id = importer_id
+
+    return comment
+
+  def CreateIssueComment(
+      self, cnxn, issue, user_id, content, inbound_message=None,
+      amendments=None, attachments=None, kept_attachments=None, timestamp=None,
+      is_spam=False, is_description=False, approval_id=None, commit=True,
+      importer_id=None):
+    """Create and store a new comment on the specified issue.
+
+    Args:
+      cnxn: connection to SQL database.
+      issue: the issue on which to add the comment, must be loaded from
+          database with use_cache=False so that assume_stale == False.
+      user_id: the user ID of the user who entered the comment.
+      content: string body of the comment.
+      inbound_message: optional string full text of an email that caused
+          this comment to be added.
+      amendments: list of Amendment PBs describing the
+          metadata changes that the user made along w/ comment.
+      attachments: [(filename, contents, mimetype),...] attachments uploaded at
+          the time the comment was made.
+      kept_attachments: list of attachment ids for attachments kept from
+          previous descriptions, if the comment is an update to the description
+      timestamp: time at which the comment was made, defaults to now.
+      is_spam: True if the comment is classified as spam.
+      is_description: True if the comment is a description for the issue.
+      approval_id: id, if any, of the APPROVAL_TYPE FieldDef this comment
+          belongs to.
+      commit: set to False to not commit to DB yet.
+      importer_id: user ID of an API client that is importing issues.
+
+    Returns:
+      The new IssueComment protocol buffer.
+
+    Note that we assume that the content is safe to echo out
+    again. The content may have some markup done during input
+    processing.
+    """
+    if is_description:
+      kept_attachments = self.GetAttachmentsByID(cnxn, kept_attachments)
+    else:
+      kept_attachments = []
+
+    comment = self._MakeIssueComment(
+        issue.project_id, user_id, content, amendments=amendments,
+        inbound_message=inbound_message, attachments=attachments,
+        timestamp=timestamp, is_spam=is_spam, is_description=is_description,
+        kept_attachments=kept_attachments, approval_id=approval_id,
+        importer_id=importer_id)
+    comment.issue_id = issue.issue_id
+
+    if attachments or kept_attachments:
+      issue.attachment_count = (
+          issue.attachment_count + len(attachments) + len(kept_attachments))
+      self.UpdateIssue(cnxn, issue, update_cols=['attachment_count'])
+
+    self.comment_creations.increment()
+    self.InsertComment(cnxn, comment, commit=commit)
+
+    return comment
+
+  def SoftDeleteComment(
+      self, cnxn, issue, issue_comment, deleted_by_user_id,
+      user_service, delete=True, reindex=False, is_spam=False):
+    """Mark comment as un/deleted, which shows/hides it from average users."""
+    # Update number of attachments
+    attachments = 0
+    if issue_comment.attachments:
+      for attachment in issue_comment.attachments:
+        if not attachment.deleted:
+          attachments += 1
+
+    # Delete only if it's not in deleted state
+    if delete:
+      if not issue_comment.deleted_by:
+        issue_comment.deleted_by = deleted_by_user_id
+        issue.attachment_count = issue.attachment_count - attachments
+
+    # Undelete only if it's in deleted state
+    elif issue_comment.deleted_by:
+      issue_comment.deleted_by = 0
+      issue.attachment_count = issue.attachment_count + attachments
+
+    issue_comment.is_spam = is_spam
+    self._UpdateComment(
+        cnxn, issue_comment, update_cols=['deleted_by', 'is_spam'])
+    self.UpdateIssue(cnxn, issue, update_cols=['attachment_count'])
+
+    # Reindex the issue to take the comment deletion/undeletion into account.
+    if reindex:
+      tracker_fulltext.IndexIssues(
+          cnxn, [issue], user_service, self, self._config_service)
+    else:
+      self.EnqueueIssuesForIndexing(cnxn, [issue.issue_id])
+
+  ### Approvals
+
+  def GetIssueApproval(self, cnxn, issue_id, approval_id, use_cache=True):
+    """Retrieve the specified approval for the specified issue."""
+    issue = self.GetIssue(cnxn, issue_id, use_cache=use_cache)
+    approval = tracker_bizobj.FindApprovalValueByID(
+        approval_id, issue.approval_values)
+    if approval:
+      return issue, approval
+    raise exceptions.NoSuchIssueApprovalException()
+
+  def DeltaUpdateIssueApproval(
+      self, cnxn, modifier_id, config, issue, approval, approval_delta,
+      comment_content=None, is_description=False, attachments=None,
+      commit=True, kept_attachments=None):
+    """Update the issue's approval in the database."""
+    amendments = []
+
+    # Update status in RAM and DB and create status amendment.
+    if approval_delta.status:
+      approval.status = approval_delta.status
+      approval.set_on = approval_delta.set_on or int(time.time())
+      approval.setter_id = modifier_id
+      status_amendment = tracker_bizobj.MakeApprovalStatusAmendment(
+          approval_delta.status)
+      amendments.append(status_amendment)
+
+      self._UpdateIssueApprovalStatus(
+        cnxn, issue.issue_id, approval.approval_id, approval.status,
+        approval.setter_id, approval.set_on)
+
+    # Update approver_ids in RAM and DB and create approver amendment.
+    approvers_add = [approver for approver in approval_delta.approver_ids_add
+                     if approver not in approval.approver_ids]
+    approvers_remove = [approver for approver in
+                        approval_delta.approver_ids_remove
+                        if approver in approval.approver_ids]
+    if approvers_add or approvers_remove:
+      approver_ids = [approver for approver in
+                      list(approval.approver_ids) + approvers_add
+                      if approver not in approvers_remove]
+      approval.approver_ids = approver_ids
+      approvers_amendment = tracker_bizobj.MakeApprovalApproversAmendment(
+          approvers_add, approvers_remove)
+      amendments.append(approvers_amendment)
+
+      self._UpdateIssueApprovalApprovers(
+          cnxn, issue.issue_id, approval.approval_id, approver_ids)
+
+    fv_amendments = tracker_bizobj.ApplyFieldValueChanges(
+        issue, config, approval_delta.subfield_vals_add,
+        approval_delta.subfield_vals_remove, approval_delta.subfields_clear)
+    amendments.extend(fv_amendments)
+    if fv_amendments:
+      self._UpdateIssuesFields(cnxn, [issue], commit=False)
+
+    label_amendment = tracker_bizobj.ApplyLabelChanges(
+        issue, config, approval_delta.labels_add, approval_delta.labels_remove)
+    if label_amendment:
+      amendments.append(label_amendment)
+      self._UpdateIssuesLabels(cnxn, [issue], commit=False)
+
+    comment_pb = self.CreateIssueComment(
+        cnxn, issue, modifier_id, comment_content, amendments=amendments,
+        approval_id=approval.approval_id, is_description=is_description,
+        attachments=attachments, commit=False,
+        kept_attachments=kept_attachments)
+
+    if commit:
+      cnxn.Commit()
+    self.issue_2lc.InvalidateKeys(cnxn, [issue.issue_id])
+
+    return comment_pb
+
+  def _UpdateIssueApprovalStatus(
+      self, cnxn, issue_id, approval_id, status, setter_id, set_on):
+    """Update the approvalvalue for the given issue_id's issue."""
+    set_on = set_on or int(time.time())
+    delta = {
+        'status': status.name.lower(),
+        'setter_id': setter_id,
+        'set_on': set_on,
+        }
+    self.issue2approvalvalue_tbl.Update(
+        cnxn, delta, approval_id=approval_id, issue_id=issue_id,
+        commit=False)
+
+  def _UpdateIssueApprovalApprovers(
+      self, cnxn, issue_id, approval_id, approver_ids):
+    """Update the list of approvers allowed to approve an issue's approval."""
+    self.issueapproval2approver_tbl.Delete(
+        cnxn, issue_id=issue_id, approval_id=approval_id, commit=False)
+    self.issueapproval2approver_tbl.InsertRows(
+        cnxn, ISSUEAPPROVAL2APPROVER_COLS, [(approval_id, approver_id, issue_id)
+                                            for approver_id in approver_ids],
+        commit=False)
+
+  ### Attachments
+
+  def GetAttachmentAndContext(self, cnxn, attachment_id):
+    """Load a IssueAttachment from database, and its comment ID and IID.
+
+    Args:
+      cnxn: connection to SQL database.
+      attachment_id: long integer unique ID of desired issue attachment.
+
+    Returns:
+      An Attachment protocol buffer that contains metadata about the attached
+      file, or None if it doesn't exist.  Also, the comment ID and issue IID
+      of the comment and issue that contain this attachment.
+
+    Raises:
+      NoSuchAttachmentException: the attachment was not found.
+    """
+    if attachment_id is None:
+      raise exceptions.NoSuchAttachmentException()
+
+    attachment_row = self.attachment_tbl.SelectRow(
+        cnxn, cols=ATTACHMENT_COLS, id=attachment_id)
+    if attachment_row:
+      (attach_id, issue_id, comment_id, filename, filesize, mimetype,
+       deleted, gcs_object_id) = attachment_row
+      if not deleted:
+        attachment = tracker_pb2.Attachment(
+            attachment_id=attach_id, filename=filename, filesize=filesize,
+            mimetype=mimetype, deleted=bool(deleted),
+            gcs_object_id=gcs_object_id)
+        return attachment, comment_id, issue_id
+
+    raise exceptions.NoSuchAttachmentException()
+
+  def GetAttachmentsByID(self, cnxn, attachment_ids):
+    """Return all Attachment PBs by attachment ids.
+
+    Args:
+      cnxn: connection to SQL database.
+      attachment_ids: a list of comment ids.
+
+    Returns:
+      A list of the Attachment protocol buffers for the attachments with
+      these ids.
+    """
+    attachment_rows = self.attachment_tbl.Select(
+        cnxn, cols=ATTACHMENT_COLS, id=attachment_ids)
+
+    return attachment_rows
+
+  def _UpdateAttachment(self, cnxn, comment, attach, update_cols=None):
+    """Update attachment metadata in the DB.
+
+    Args:
+      cnxn: connection to SQL database.
+      comment: IssueComment PB to invalidate in the cache.
+      attach: IssueAttachment PB to update in the DB.
+      update_cols: optional list of just the field names to update.
+    """
+    delta = {
+        'filename': attach.filename,
+        'filesize': attach.filesize,
+        'mimetype': attach.mimetype,
+        'deleted': bool(attach.deleted),
+        }
+    if update_cols is not None:
+      delta = {key: val for key, val in delta.items()
+               if key in update_cols}
+
+    self.attachment_tbl.Update(cnxn, delta, id=attach.attachment_id)
+    self.comment_2lc.InvalidateKeys(cnxn, [comment.id])
+
+  def SoftDeleteAttachment(
+      self, cnxn, issue, issue_comment, attach_id, user_service, delete=True,
+      index_now=False):
+    """Mark attachment as un/deleted, which shows/hides it from avg users."""
+    attachment = None
+    for attach in issue_comment.attachments:
+      if attach.attachment_id == attach_id:
+        attachment = attach
+
+    if not attachment:
+      logging.warning(
+          'Tried to (un)delete non-existent attachment #%s in project '
+          '%s issue %s', attach_id, issue.project_id, issue.local_id)
+      return
+
+    if not issue_comment.deleted_by:
+      # Decrement attachment count only if it's not in deleted state
+      if delete:
+        if not attachment.deleted:
+          issue.attachment_count = issue.attachment_count - 1
+
+      # Increment attachment count only if it's in deleted state
+      elif attachment.deleted:
+        issue.attachment_count = issue.attachment_count + 1
+
+    logging.info('attachment.deleted was %s', attachment.deleted)
+
+    attachment.deleted = delete
+
+    logging.info('attachment.deleted is %s', attachment.deleted)
+
+    self._UpdateAttachment(
+        cnxn, issue_comment, attachment, update_cols=['deleted'])
+    self.UpdateIssue(cnxn, issue, update_cols=['attachment_count'])
+
+    if index_now:
+      tracker_fulltext.IndexIssues(
+          cnxn, [issue], user_service, self, self._config_service)
+    else:
+      self.EnqueueIssuesForIndexing(cnxn, [issue.issue_id])
+
+  ### Reindex queue
+
+  def EnqueueIssuesForIndexing(self, cnxn, issue_ids, commit=True):
+    # type: (MonorailConnection, Collection[int], Optional[bool]) -> None
+    """Add the given issue IDs to the ReindexQueue table."""
+    reindex_rows = [(issue_id,) for issue_id in issue_ids]
+    self.reindexqueue_tbl.InsertRows(
+        cnxn, ['issue_id'], reindex_rows, ignore=True, commit=commit)
+
+  def ReindexIssues(self, cnxn, num_to_reindex, user_service):
+    """Reindex some issues specified in the IndexQueue table."""
+    rows = self.reindexqueue_tbl.Select(
+        cnxn, order_by=[('created', [])], limit=num_to_reindex)
+    issue_ids = [row[0] for row in rows]
+
+    if issue_ids:
+      issues = self.GetIssues(cnxn, issue_ids)
+      tracker_fulltext.IndexIssues(
+          cnxn, issues, user_service, self, self._config_service)
+      self.reindexqueue_tbl.Delete(cnxn, issue_id=issue_ids)
+
+    return len(issue_ids)
+
+  ### Search functions
+
+  def RunIssueQuery(
+      self, cnxn, left_joins, where, order_by, shard_id=None, limit=None):
+    """Run a SQL query to find matching issue IDs.
+
+    Args:
+      cnxn: connection to SQL database.
+      left_joins: list of SQL LEFT JOIN clauses.
+      where: list of SQL WHERE clauses.
+      order_by: list of SQL ORDER BY clauses.
+      shard_id: int shard ID to focus the search.
+      limit: int maximum number of results, defaults to
+          settings.search_limit_per_shard.
+
+    Returns:
+      (issue_ids, capped) where issue_ids is a list of the result issue IDs,
+      and capped is True if the number of results reached the limit.
+    """
+    limit = limit or settings.search_limit_per_shard
+    where = where + [('Issue.deleted = %s', [False])]
+    rows = self.issue_tbl.Select(
+        cnxn, shard_id=shard_id, distinct=True, cols=['Issue.id'],
+        left_joins=left_joins, where=where, order_by=order_by,
+        limit=limit)
+    issue_ids = [row[0] for row in rows]
+    capped = len(issue_ids) >= limit
+    return issue_ids, capped
+
+  def GetIIDsByLabelIDs(self, cnxn, label_ids, project_id, shard_id):
+    """Return a list of IIDs for issues with any of the given label IDs."""
+    if not label_ids:
+      return []
+    where = []
+    if shard_id is not None:
+      slice_term = ('shard = %s', [shard_id])
+      where.append(slice_term)
+
+    rows = self.issue_tbl.Select(
+        cnxn, shard_id=shard_id, cols=['id'],
+        left_joins=[('Issue2Label ON Issue.id = Issue2Label.issue_id', [])],
+        label_id=label_ids, project_id=project_id, where=where)
+    return [row[0] for row in rows]
+
+  def GetIIDsByParticipant(self, cnxn, user_ids, project_ids, shard_id):
+    """Return IIDs for issues where any of the given users participate."""
+    iids = []
+    where = []
+    if shard_id is not None:
+      where.append(('shard = %s', [shard_id]))
+    if project_ids:
+      cond_str = 'Issue.project_id IN (%s)' % sql.PlaceHolders(project_ids)
+      where.append((cond_str, project_ids))
+
+    # TODO(jrobbins): Combine these 3 queries into one with ORs.   It currently
+    # is not the bottleneck.
+    rows = self.issue_tbl.Select(
+        cnxn, cols=['id'], reporter_id=user_ids,
+        where=where, shard_id=shard_id)
+    for row in rows:
+      iids.append(row[0])
+
+    rows = self.issue_tbl.Select(
+        cnxn, cols=['id'], owner_id=user_ids,
+        where=where, shard_id=shard_id)
+    for row in rows:
+      iids.append(row[0])
+
+    rows = self.issue_tbl.Select(
+        cnxn, cols=['id'], derived_owner_id=user_ids,
+        where=where, shard_id=shard_id)
+    for row in rows:
+      iids.append(row[0])
+
+    rows = self.issue_tbl.Select(
+        cnxn, cols=['id'],
+        left_joins=[('Issue2Cc ON Issue2Cc.issue_id = Issue.id', [])],
+        cc_id=user_ids,
+        where=where + [('cc_id IS NOT NULL', [])],
+        shard_id=shard_id)
+    for row in rows:
+      iids.append(row[0])
+
+    rows = self.issue_tbl.Select(
+        cnxn, cols=['Issue.id'],
+        left_joins=[
+            ('Issue2FieldValue ON Issue.id = Issue2FieldValue.issue_id', []),
+            ('FieldDef ON Issue2FieldValue.field_id = FieldDef.id', [])],
+        user_id=user_ids, grants_perm='View',
+        where=where + [('user_id IS NOT NULL', [])],
+        shard_id=shard_id)
+    for row in rows:
+      iids.append(row[0])
+
+    return iids
+
+  ### Issue Dependency Rankings
+
+  def SortBlockedOn(self, cnxn, issue, blocked_on_iids):
+    """Sort blocked_on dependencies by rank and dst_issue_id.
+
+    Args:
+      cnxn: connection to SQL database.
+      issue: the issue being blocked.
+      blocked_on_iids: the iids of all the issue's blockers
+
+    Returns:
+      a tuple (ids, ranks), where ids is the sorted list of
+      blocked_on_iids and ranks is the list of corresponding ranks
+    """
+    rows = self.issuerelation_tbl.Select(
+        cnxn, cols=ISSUERELATION_COLS, issue_id=issue.issue_id,
+        dst_issue_id=blocked_on_iids, kind='blockedon',
+        order_by=[('rank DESC', []), ('dst_issue_id', [])])
+    ids = [row[1] for row in rows]
+    ids.extend([iid for iid in blocked_on_iids if iid not in ids])
+    ranks = [row[3] for row in rows]
+    ranks.extend([0] * (len(blocked_on_iids) - len(ranks)))
+    return ids, ranks
+
+  def ApplyIssueRerank(
+      self, cnxn, parent_id, relations_to_change, commit=True, invalidate=True):
+    """Updates rankings of blocked on issue relations to new values
+
+    Args:
+      cnxn: connection to SQL database.
+      parent_id: the global ID of the blocked issue to update
+      relations_to_change: This should be a list of
+        [(blocker_id, new_rank),...] of relations that need to be changed
+      commit: set to False to skip the DB commit and do it in the caller.
+      invalidate: set to False to leave cache invalidatation to the caller.
+    """
+    blocker_ids = [blocker for (blocker, rank) in relations_to_change]
+    self.issuerelation_tbl.Delete(
+        cnxn, issue_id=parent_id, dst_issue_id=blocker_ids, commit=False)
+    insert_rows = [(parent_id, blocker, 'blockedon', rank)
+                   for (blocker, rank) in relations_to_change]
+    self.issuerelation_tbl.InsertRows(
+        cnxn, cols=ISSUERELATION_COLS, row_values=insert_rows, commit=commit)
+    if invalidate:
+      self.InvalidateIIDs(cnxn, [parent_id])
+
+  # Expunge Users from Issues system.
+  def ExpungeUsersInIssues(self, cnxn, user_ids_by_email, limit=None):
+    """Removes all references to given users from issue DB tables.
+
+    This method will not commit the operations. This method will
+    not make changes to in-memory data.
+
+    Args:
+      cnxn: connection to SQL database.
+      user_ids_by_email: dict of {email: user_id} of all users we want
+        to expunge.
+      limit: Optional, the limit for each operation.
+
+    Returns:
+      A list of issue_ids that need to be reindexed.
+    """
+    commit = False
+    user_ids = list(user_ids_by_email.values())
+    user_emails = list(user_ids_by_email.keys())
+    # Track issue_ids for issues that will have different search documents
+    # as a result of removing users.
+    affected_issue_ids = []
+
+    # Reassign commenter_id and delete inbound_messages.
+    shard_id = sql.RandomShardID()
+    comment_content_id_rows = self.comment_tbl.Select(
+        cnxn, cols=['Comment.id', 'Comment.issue_id', 'commentcontent_id'],
+        commenter_id=user_ids, shard_id=shard_id, limit=limit)
+    comment_ids = [row[0] for row in comment_content_id_rows]
+    commentcontent_ids = [row[2] for row in comment_content_id_rows]
+    if commentcontent_ids:
+      self.commentcontent_tbl.Update(
+          cnxn, {'inbound_message': None}, id=commentcontent_ids, commit=commit)
+    if comment_ids:
+      self.comment_tbl.Update(
+          cnxn, {'commenter_id': framework_constants.DELETED_USER_ID},
+          id=comment_ids,
+          commit=commit)
+    affected_issue_ids.extend([row[1] for row in comment_content_id_rows])
+
+    # Reassign deleted_by comments deleted_by.
+    self.comment_tbl.Update(
+        cnxn,
+        {'deleted_by': framework_constants.DELETED_USER_ID},
+        deleted_by=user_ids,
+        commit=commit, limit=limit)
+
+    # Remove users in field values.
+    fv_issue_id_rows = self.issue2fieldvalue_tbl.Select(
+        cnxn, cols=['issue_id'], user_id=user_ids, limit=limit)
+    fv_issue_ids = [row[0] for row in fv_issue_id_rows]
+    self.issue2fieldvalue_tbl.Delete(
+        cnxn, user_id=user_ids, limit=limit, commit=commit)
+    affected_issue_ids.extend(fv_issue_ids)
+
+    # Remove users in approval values.
+    self.issueapproval2approver_tbl.Delete(
+        cnxn, approver_id=user_ids, commit=commit, limit=limit)
+    self.issue2approvalvalue_tbl.Update(
+        cnxn,
+        {'setter_id': framework_constants.DELETED_USER_ID},
+        setter_id=user_ids,
+        commit=commit, limit=limit)
+
+    # Remove users in issue Ccs.
+    cc_issue_id_rows = self.issue2cc_tbl.Select(
+        cnxn, cols=['issue_id'], cc_id=user_ids, limit=limit)
+    cc_issue_ids = [row[0] for row in cc_issue_id_rows]
+    self.issue2cc_tbl.Delete(
+        cnxn, cc_id=user_ids, limit=limit, commit=commit)
+    affected_issue_ids.extend(cc_issue_ids)
+
+    # Remove users in issue owners.
+    owner_issue_id_rows = self.issue_tbl.Select(
+        cnxn, cols=['id'], owner_id=user_ids, limit=limit)
+    owner_issue_ids = [row[0] for row in owner_issue_id_rows]
+    if owner_issue_ids:
+      self.issue_tbl.Update(
+          cnxn, {'owner_id': None}, id=owner_issue_ids, commit=commit)
+    affected_issue_ids.extend(owner_issue_ids)
+    derived_owner_issue_id_rows = self.issue_tbl.Select(
+        cnxn, cols=['id'], derived_owner_id=user_ids, limit=limit)
+    derived_owner_issue_ids = [row[0] for row in derived_owner_issue_id_rows]
+    if derived_owner_issue_ids:
+      self.issue_tbl.Update(
+          cnxn, {'derived_owner_id': None},
+          id=derived_owner_issue_ids,
+          commit=commit)
+    affected_issue_ids.extend(derived_owner_issue_ids)
+
+    # Remove users in issue reporters.
+    reporter_issue_id_rows = self.issue_tbl.Select(
+        cnxn, cols=['id'], reporter_id=user_ids, limit=limit)
+    reporter_issue_ids = [row[0] for row in reporter_issue_id_rows]
+    if reporter_issue_ids:
+      self.issue_tbl.Update(
+          cnxn, {'reporter_id': framework_constants.DELETED_USER_ID},
+          id=reporter_issue_ids,
+          commit=commit)
+    affected_issue_ids.extend(reporter_issue_ids)
+
+    # Note: issueupdate_tbl's and issue2notify's user_id columns do not
+    # reference the User table. So all values need to updated here before
+    # User rows can be deleted safely. No limit will be applied.
+
+    # Remove users in issue updates.
+    self.issueupdate_tbl.Update(
+        cnxn,
+        {'added_user_id': framework_constants.DELETED_USER_ID},
+        added_user_id=user_ids,
+        commit=commit)
+    self.issueupdate_tbl.Update(
+        cnxn,
+        {'removed_user_id': framework_constants.DELETED_USER_ID},
+        removed_user_id=user_ids,
+        commit=commit)
+
+    # Remove users in issue notify.
+    self.issue2notify_tbl.Delete(
+        cnxn, email=user_emails, commit=commit)
+
+    # Remove users in issue snapshots.
+    self.issuesnapshot_tbl.Update(
+        cnxn,
+        {'owner_id': framework_constants.DELETED_USER_ID},
+        owner_id=user_ids,
+        commit=commit, limit=limit)
+    self.issuesnapshot_tbl.Update(
+        cnxn,
+        {'reporter_id': framework_constants.DELETED_USER_ID},
+        reporter_id=user_ids,
+        commit=commit, limit=limit)
+    self.issuesnapshot2cc_tbl.Delete(
+        cnxn, cc_id=user_ids, commit=commit, limit=limit)
+
+    return list(set(affected_issue_ids))
diff --git a/services/ml_helpers.py b/services/ml_helpers.py
new file mode 100644
index 0000000..c4650b4
--- /dev/null
+++ b/services/ml_helpers.py
@@ -0,0 +1,181 @@
+# Copyright 2018 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
+
+"""
+Helper functions for spam and component classification. These are mostly for
+feature extraction, so that the serving code and training code both use the same
+set of features.
+"""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import csv
+import hashlib
+import httplib2
+import logging
+import re
+import sys
+
+from six import text_type
+
+from apiclient.discovery import build
+from apiclient.errors import Error as ApiClientError
+from oauth2client.client import GoogleCredentials
+from oauth2client.client import Error as Oauth2ClientError
+
+
+SPAM_COLUMNS = ['verdict', 'subject', 'content', 'email']
+LEGACY_CSV_COLUMNS = ['verdict', 'subject', 'content']
+DELIMITERS = ['\s', '\,', '\.', '\?', '!', '\:', '\(', '\)']
+
+# Must be identical to settings.spam_feature_hashes.
+SPAM_FEATURE_HASHES = 500
+# Must be identical to settings.component_features.
+COMPONENT_FEATURES = 5000
+
+
+def _ComponentFeatures(content, num_features, top_words):
+  """
+    This uses the most common words in the entire dataset as features.
+    The count of common words in the issue comments makes up the features.
+  """
+
+  features = [0] * num_features
+  for blob in content:
+    words = blob.split()
+    for word in words:
+      if word in top_words:
+        features[top_words[word]] += 1
+
+  return features
+
+
+def _SpamHashFeatures(content, num_features):
+  """
+    Feature hashing is a fast and compact way to turn a string of text into a
+    vector of feature values for classification and training.
+    See also: https://en.wikipedia.org/wiki/Feature_hashing
+    This is a simple implementation that doesn't try to minimize collisions
+    or anything else fancy.
+  """
+  features = [0] * num_features
+  total = 0.0
+  for blob in content:
+    words = re.split('|'.join(DELIMITERS), blob)
+    for word in words:
+      encoded_word = word
+      # If we've been passed real unicode strings, convert them to bytestrings.
+      if isinstance(word, text_type):
+        encoded_word = word.encode('utf-8')
+      feature_index = int(
+          int(hashlib.sha1(encoded_word).hexdigest(), 16) % num_features)
+      features[feature_index] += 1.0
+      total += 1.0
+
+  if total > 0:
+    features = [ f / total for f in features ]
+
+  return features
+
+
+def GenerateFeaturesRaw(content, num_features, top_words=None):
+  """Generates a vector of features for a given issue or comment.
+
+  Args:
+    content: The content of the issue's description and comments.
+    num_features: The number of features to generate.
+  """
+  if top_words:
+    return { 'word_features': _ComponentFeatures(content,
+                                                   num_features,
+                                                   top_words)}
+
+  return { 'word_hashes': _SpamHashFeatures(content, num_features)}
+
+
+def transform_spam_csv_to_features(csv_training_data):
+  X = []
+  y = []
+
+  # Handle if the list is double-wrapped.
+  if csv_training_data and len(csv_training_data[0]) > 4:
+    csv_training_data = csv_training_data[0]
+
+  for row in csv_training_data:
+    if len(row) == 4:
+      verdict, subject, content, _email = row
+    else:
+      verdict, subject, content = row
+    X.append(GenerateFeaturesRaw([str(subject), str(content)],
+                                 SPAM_FEATURE_HASHES))
+    y.append(1 if verdict == 'spam' else 0)
+  return X, y
+
+
+def transform_component_csv_to_features(csv_training_data, top_list):
+  X = []
+  y = []
+  top_words = {}
+
+  for i in range(len(top_list)):
+    top_words[top_list[i]] = i
+
+  component_to_index = {}
+  index_to_component = {}
+  component_index = 0
+
+  for row in csv_training_data:
+    component, content = row
+    component = str(component).split(",")[0]
+
+    if component not in component_to_index:
+      component_to_index[component] = component_index
+      index_to_component[component_index] = component
+      component_index += 1
+
+    X.append(GenerateFeaturesRaw([content],
+                                 COMPONENT_FEATURES,
+                                 top_words))
+    y.append(component_to_index[component])
+
+  return X, y, index_to_component
+
+
+def spam_from_file(f):
+  """Reads a training data file and returns an array."""
+  rows = []
+  skipped_rows = 0
+  for row in csv.reader(f):
+    if len(row) == len(SPAM_COLUMNS):
+      # Throw out email field.
+      rows.append(row[:3])
+    elif len(row) == len(LEGACY_CSV_COLUMNS):
+      rows.append(row)
+    else:
+      skipped_rows += 1
+  return rows, skipped_rows
+
+
+def component_from_file(f):
+  """Reads a training data file and returns an array."""
+  rows = []
+  csv.field_size_limit(sys.maxsize)
+  for row in csv.reader(f):
+    rows.append(row)
+
+  return rows
+
+
+def setup_ml_engine():
+  """Sets up an instance of ml engine for ml classes."""
+  try:
+    credentials = GoogleCredentials.get_application_default()
+    ml_engine = build('ml', 'v1', http=httplib2.Http(), credentials=credentials)
+    return ml_engine
+
+  except (Oauth2ClientError, ApiClientError):
+    logging.error("Error setting up ML Engine API: %s" % sys.exc_info()[0])
diff --git a/services/project_svc.py b/services/project_svc.py
new file mode 100644
index 0000000..e92f6a9
--- /dev/null
+++ b/services/project_svc.py
@@ -0,0 +1,799 @@
+# 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
+
+"""A set of functions that provide persistence for projects.
+
+This module provides functions to get, update, create, and (in some
+cases) delete each type of project business object.  It provides
+a logical persistence layer on top of the database.
+
+Business objects are described in project_pb2.py.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+import time
+
+import settings
+from framework import exceptions
+from framework import framework_constants
+from framework import framework_helpers
+from framework import permissions
+from framework import sql
+from services import caches
+from project import project_helpers
+from proto import project_pb2
+
+
+PROJECT_TABLE_NAME = 'Project'
+USER2PROJECT_TABLE_NAME = 'User2Project'
+EXTRAPERM_TABLE_NAME = 'ExtraPerm'
+MEMBERNOTES_TABLE_NAME = 'MemberNotes'
+USERGROUPPROJECTS_TABLE_NAME = 'Group2Project'
+AUTOCOMPLETEEXCLUSION_TABLE_NAME = 'AutocompleteExclusion'
+
+PROJECT_COLS = [
+    'project_id', 'project_name', 'summary', 'description', 'state', 'access',
+    'read_only_reason', 'state_reason', 'delete_time', 'issue_notify_address',
+    'attachment_bytes_used', 'attachment_quota', 'cached_content_timestamp',
+    'recent_activity_timestamp', 'moved_to', 'process_inbound_email',
+    'only_owners_remove_restrictions', 'only_owners_see_contributors',
+    'revision_url_format', 'home_page', 'docs_url', 'source_url', 'logo_gcs_id',
+    'logo_file_name', 'issue_notify_always_detailed'
+]
+USER2PROJECT_COLS = ['project_id', 'user_id', 'role_name']
+EXTRAPERM_COLS = ['project_id', 'user_id', 'perm']
+MEMBERNOTES_COLS = ['project_id', 'user_id', 'notes']
+AUTOCOMPLETEEXCLUSION_COLS = [
+    'project_id', 'user_id', 'ac_exclude', 'no_expand']
+
+RECENT_ACTIVITY_THRESHOLD = framework_constants.SECS_PER_HOUR
+
+
+class ProjectTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage both RAM and memcache for Project PBs."""
+
+  def __init__(self, cachemanager, project_service):
+    super(ProjectTwoLevelCache, self).__init__(
+        cachemanager, 'project', 'project:', project_pb2.Project)
+    self.project_service = project_service
+
+  def _DeserializeProjects(
+      self, project_rows, role_rows, extraperm_rows):
+    """Convert database rows into a dictionary of Project PB keyed by ID."""
+    project_dict = {}
+
+    for project_row in project_rows:
+      (
+          project_id, project_name, summary, description, state_name,
+          access_name, read_only_reason, state_reason, delete_time,
+          issue_notify_address, attachment_bytes_used, attachment_quota, cct,
+          recent_activity_timestamp, moved_to, process_inbound_email, oorr,
+          oosc, revision_url_format, home_page, docs_url, source_url,
+          logo_gcs_id, logo_file_name,
+          issue_notify_always_detailed) = project_row
+      project = project_pb2.Project()
+      project.project_id = project_id
+      project.project_name = project_name
+      project.summary = summary
+      project.description = description
+      project.state = project_pb2.ProjectState(state_name.upper())
+      project.state_reason = state_reason or ''
+      project.access = project_pb2.ProjectAccess(access_name.upper())
+      project.read_only_reason = read_only_reason or ''
+      project.issue_notify_address = issue_notify_address or ''
+      project.attachment_bytes_used = attachment_bytes_used or 0
+      project.attachment_quota = attachment_quota
+      project.recent_activity = recent_activity_timestamp or 0
+      project.cached_content_timestamp = cct or 0
+      project.delete_time = delete_time or 0
+      project.moved_to = moved_to or ''
+      project.process_inbound_email = bool(process_inbound_email)
+      project.only_owners_remove_restrictions = bool(oorr)
+      project.only_owners_see_contributors = bool(oosc)
+      project.revision_url_format = revision_url_format or ''
+      project.home_page = home_page or ''
+      project.docs_url = docs_url or ''
+      project.source_url = source_url or ''
+      project.logo_gcs_id = logo_gcs_id or ''
+      project.logo_file_name = logo_file_name or ''
+      project.issue_notify_always_detailed = bool(issue_notify_always_detailed)
+      project_dict[project_id] = project
+
+    for project_id, user_id, role_name in role_rows:
+      project = project_dict[project_id]
+      if role_name == 'owner':
+        project.owner_ids.append(user_id)
+      elif role_name == 'committer':
+        project.committer_ids.append(user_id)
+      elif role_name == 'contributor':
+        project.contributor_ids.append(user_id)
+
+    perms = {}
+    for project_id, user_id, perm in extraperm_rows:
+      perms.setdefault(project_id, {}).setdefault(user_id, []).append(perm)
+
+    for project_id, perms_by_user in perms.items():
+      project = project_dict[project_id]
+      for user_id, extra_perms in sorted(perms_by_user.items()):
+        project.extra_perms.append(project_pb2.Project.ExtraPerms(
+            member_id=user_id, perms=extra_perms))
+
+    return project_dict
+
+  def FetchItems(self, cnxn, keys):
+    """On RAM and memcache miss, hit the database to get missing projects."""
+    project_rows = self.project_service.project_tbl.Select(
+        cnxn, cols=PROJECT_COLS, project_id=keys)
+    role_rows = self.project_service.user2project_tbl.Select(
+        cnxn, cols=['project_id', 'user_id', 'role_name'],
+        project_id=keys)
+    extraperm_rows = self.project_service.extraperm_tbl.Select(
+        cnxn, cols=EXTRAPERM_COLS, project_id=keys)
+    retrieved_dict = self._DeserializeProjects(
+        project_rows, role_rows, extraperm_rows)
+    return retrieved_dict
+
+
+class UserToProjectIdTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage both RAM and memcache for project_ids.
+
+  Keys for this cache are int, user_ids, which might correspond to a group.
+  This cache should be used to fetch a set of project_ids that the user_id
+  is a member of.
+  """
+
+  def __init__(self, cachemanager, project_service):
+    # type: cachemanager_svc.CacheManager, ProjectService -> None
+    super(UserToProjectIdTwoLevelCache, self).__init__(
+        cachemanager, 'project_id', 'project_id:', pb_class=None)
+    self.project_service = project_service
+
+    # Store the last time the table was fetched for rate limit purposes.
+    self.last_fetched = 0
+
+  def FetchItems(self, cnxn, keys):
+    # type MonorailConnection, Collection[int] -> Mapping[int, Collection[int]]
+    """On RAM and memcache miss, hit the database to get missing user_ids."""
+
+    # Unlike with other caches, we fetch and store the entire table.
+    # Thus, for cache misses we limit the rate we re-fetch the table to 60s.
+    now = self._GetCurrentTime()
+    result_dict = collections.defaultdict(set)
+
+    if (now - self.last_fetched) > 60:
+      project_to_user_rows = self.project_service.user2project_tbl.Select(
+          cnxn, cols=['project_id', 'user_id'])
+      self.last_fetched = now
+      # Cache the whole User2Project table.
+      for project_id, user_id in project_to_user_rows:
+        result_dict[user_id].add(project_id)
+
+    # Assume any requested user missing from result is not in any project.
+    result_dict.update(
+        (user_id, set()) for user_id in keys if user_id not in result_dict)
+
+    return result_dict
+
+  def _GetCurrentTime(self):
+    """ Returns the current time. We made a separate method for this to make it
+    easier to unit test. This was a better solution than @mock.patch because
+    the test had several unrelated time.time() calls. Modifying those calls
+    would be more onerous, having to fix calls for this test.
+    """
+    return time.time()
+
+
+class ProjectService(object):
+  """The persistence layer for project data."""
+
+  def __init__(self, cache_manager):
+    """Initialize this module so that it is ready to use.
+
+    Args:
+      cache_manager: local cache with distributed invalidation.
+    """
+    self.project_tbl = sql.SQLTableManager(PROJECT_TABLE_NAME)
+    self.user2project_tbl = sql.SQLTableManager(USER2PROJECT_TABLE_NAME)
+    self.extraperm_tbl = sql.SQLTableManager(EXTRAPERM_TABLE_NAME)
+    self.membernotes_tbl = sql.SQLTableManager(MEMBERNOTES_TABLE_NAME)
+    self.usergroupprojects_tbl = sql.SQLTableManager(
+        USERGROUPPROJECTS_TABLE_NAME)
+    self.acexclusion_tbl = sql.SQLTableManager(
+        AUTOCOMPLETEEXCLUSION_TABLE_NAME)
+
+    # Like a dictionary {project_id: project}
+    self.project_2lc = ProjectTwoLevelCache(cache_manager, self)
+    # A dictionary of user_id to a set of project ids.
+    # Mapping[int, Collection[int]]
+    self.user_to_project_2lc = UserToProjectIdTwoLevelCache(cache_manager, self)
+
+    # The project name to ID cache can never be invalidated by individual
+    # project changes because it is keyed by strings instead of ints.  In
+    # the case of rare operations like deleting a project (or a future
+    # project renaming feature), we just InvalidateAll().
+    self.project_names_to_ids = caches.RamCache(cache_manager, 'project')
+
+  ### Creating projects
+
+  def CreateProject(
+      self, cnxn, project_name, owner_ids, committer_ids, contributor_ids,
+      summary, description, state=project_pb2.ProjectState.LIVE,
+      access=None, read_only_reason=None, home_page=None, docs_url=None,
+      source_url=None, logo_gcs_id=None, logo_file_name=None):
+    """Create and store a Project with the given attributes.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_name: a valid project name, all lower case.
+      owner_ids: a list of user IDs for the project owners.
+      committer_ids: a list of user IDs for the project members.
+      contributor_ids: a list of user IDs for the project contributors.
+      summary: one-line explanation of the project.
+      description: one-page explanation of the project.
+      state: a project state enum defined in project_pb2.
+      access: optional project access enum defined in project.proto.
+      read_only_reason: if given, provides a status message and marks
+        the project as read-only.
+      home_page: home page of the project
+      docs_url: url to redirect to for wiki/documentation links
+      source_url: url to redirect to for source browser links
+      logo_gcs_id: google storage object id of the project's logo
+      logo_file_name: uploaded file name of the project's logo
+
+    Returns:
+      The int project_id of the new project.
+
+    Raises:
+      ProjectAlreadyExists: if a project with that name already exists.
+    """
+    assert project_helpers.IsValidProjectName(project_name)
+    if self.LookupProjectIDs(cnxn, [project_name]):
+      raise exceptions.ProjectAlreadyExists()
+
+    project = project_pb2.MakeProject(
+        project_name, state=state, access=access,
+        description=description, summary=summary,
+        owner_ids=owner_ids, committer_ids=committer_ids,
+        contributor_ids=contributor_ids, read_only_reason=read_only_reason,
+        home_page=home_page, docs_url=docs_url, source_url=source_url,
+        logo_gcs_id=logo_gcs_id, logo_file_name=logo_file_name)
+
+    project.project_id = self._InsertProject(cnxn, project)
+    return project.project_id
+
+  def _InsertProject(self, cnxn, project):
+    """Insert the given project into the database."""
+    # Note: project_id is not specified because it is auto_increment.
+    project_id = self.project_tbl.InsertRow(
+        cnxn, project_name=project.project_name,
+        summary=project.summary, description=project.description,
+        state=str(project.state), access=str(project.access),
+        home_page=project.home_page, docs_url=project.docs_url,
+        source_url=project.source_url,
+        logo_gcs_id=project.logo_gcs_id, logo_file_name=project.logo_file_name)
+    logging.info('stored project was given project_id %d', project_id)
+
+    self.user2project_tbl.InsertRows(
+        cnxn, ['project_id', 'user_id', 'role_name'],
+        [(project_id, user_id, 'owner')
+         for user_id in project.owner_ids] +
+        [(project_id, user_id, 'committer')
+         for user_id in project.committer_ids] +
+        [(project_id, user_id, 'contributor')
+         for user_id in project.contributor_ids])
+
+    return project_id
+
+  ### Lookup project names and IDs
+
+  def LookupProjectIDs(self, cnxn, project_names):
+    """Return a list of project IDs for the specified projects."""
+    id_dict, missed_names = self.project_names_to_ids.GetAll(project_names)
+    if missed_names:
+      rows = self.project_tbl.Select(
+          cnxn, cols=['project_name', 'project_id'], project_name=missed_names)
+      retrieved_dict = dict(rows)
+      self.project_names_to_ids.CacheAll(retrieved_dict)
+      id_dict.update(retrieved_dict)
+
+    return id_dict
+
+  def LookupProjectNames(self, cnxn, project_ids):
+    """Lookup the names of the projects with the given IDs."""
+    projects_dict = self.GetProjects(cnxn, project_ids)
+    return {p.project_id: p.project_name
+            for p in projects_dict.values()}
+
+  ### Retrieving projects
+
+  def GetAllProjects(self, cnxn, use_cache=True):
+    """Return A dict mapping IDs to all live project PBs."""
+    project_rows = self.project_tbl.Select(
+        cnxn, cols=['project_id'], state=project_pb2.ProjectState.LIVE)
+    project_ids = [row[0] for row in project_rows]
+    projects_dict = self.GetProjects(cnxn, project_ids, use_cache=use_cache)
+
+    return projects_dict
+
+  def GetVisibleLiveProjects(
+      self, cnxn, logged_in_user, effective_ids, domain=None, use_cache=True):
+    """Return all user visible live project ids.
+
+    Args:
+      cnxn: connection to SQL database.
+      logged_in_user: protocol buffer of the logged in user. Can be None.
+      effective_ids: set of user IDs for this user. Can be None.
+      domain: optional string with HTTP request hostname.
+      use_cache: pass False to force database query to find Project protocol
+                 buffers.
+
+    Returns:
+      A list of project ids of user visible live projects sorted by the names
+      of the projects.  If host was provided, only projects with that host
+      as their branded domain will be returned.
+    """
+    project_rows = self.project_tbl.Select(
+        cnxn, cols=['project_id'], state=project_pb2.ProjectState.LIVE)
+    project_ids = [row[0] for row in project_rows]
+    projects_dict = self.GetProjects(cnxn, project_ids, use_cache=use_cache)
+    projects_on_host = {
+      project_id: project for project_id, project in projects_dict.items()
+      if not framework_helpers.GetNeededDomain(project.project_name, domain)}
+    visible_projects = []
+    for project in projects_on_host.values():
+      if permissions.UserCanViewProject(logged_in_user, effective_ids, project):
+        visible_projects.append(project)
+    visible_projects.sort(key=lambda p: p.project_name)
+
+    return [project.project_id for project in visible_projects]
+
+  def GetProjects(self, cnxn, project_ids, use_cache=True):
+    """Load all the Project PBs for the given projects.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_ids: list of int project IDs
+      use_cache: pass False to force database query.
+
+    Returns:
+      A dict mapping IDs to the corresponding Project protocol buffers.
+
+    Raises:
+      NoSuchProjectException: if any of the projects was not found.
+    """
+    project_dict, missed_ids = self.project_2lc.GetAll(
+        cnxn, project_ids, use_cache=use_cache)
+
+    # Also, update the project name cache.
+    self.project_names_to_ids.CacheAll(
+        {p.project_name: p.project_id for p in project_dict.values()})
+
+    if missed_ids:
+      raise exceptions.NoSuchProjectException()
+
+    return project_dict
+
+  def GetProject(self, cnxn, project_id, use_cache=True):
+    """Load the specified project from the database."""
+    project_id_dict = self.GetProjects(cnxn, [project_id], use_cache=use_cache)
+    return project_id_dict[project_id]
+
+  def GetProjectsByName(self, cnxn, project_names, use_cache=True):
+    """Load all the Project PBs for the given projects.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_names: list of project names.
+      use_cache: specifify False to force database query.
+
+    Returns:
+      A dict mapping names to the corresponding Project protocol buffers.
+    """
+    project_ids = list(self.LookupProjectIDs(cnxn, project_names).values())
+    projects = self.GetProjects(cnxn, project_ids, use_cache=use_cache)
+    return {p.project_name: p for p in projects.values()}
+
+  def GetProjectByName(self, cnxn, project_name, use_cache=True):
+    """Load the specified project from the database, None if does not exist."""
+    project_dict = self.GetProjectsByName(
+        cnxn, [project_name], use_cache=use_cache)
+    return project_dict.get(project_name)
+
+  ### Deleting projects
+
+  def ExpungeProject(self, cnxn, project_id):
+    """Wipes a project from the system."""
+    logging.info('expunging project %r', project_id)
+    self.user2project_tbl.Delete(cnxn, project_id=project_id)
+    self.usergroupprojects_tbl.Delete(cnxn, project_id=project_id)
+    self.extraperm_tbl.Delete(cnxn, project_id=project_id)
+    self.membernotes_tbl.Delete(cnxn, project_id=project_id)
+    self.acexclusion_tbl.Delete(cnxn, project_id=project_id)
+    self.project_tbl.Delete(cnxn, project_id=project_id)
+
+  ### Updating projects
+
+  def UpdateProject(
+      self,
+      cnxn,
+      project_id,
+      summary=None,
+      description=None,
+      state=None,
+      state_reason=None,
+      access=None,
+      issue_notify_address=None,
+      attachment_bytes_used=None,
+      attachment_quota=None,
+      moved_to=None,
+      process_inbound_email=None,
+      only_owners_remove_restrictions=None,
+      read_only_reason=None,
+      cached_content_timestamp=None,
+      only_owners_see_contributors=None,
+      delete_time=None,
+      recent_activity=None,
+      revision_url_format=None,
+      home_page=None,
+      docs_url=None,
+      source_url=None,
+      logo_gcs_id=None,
+      logo_file_name=None,
+      issue_notify_always_detailed=None,
+      commit=True):
+    """Update the DB with the given project information."""
+    exists = self.project_tbl.SelectValue(
+      cnxn, 'project_name', project_id=project_id)
+    if not exists:
+      raise exceptions.NoSuchProjectException()
+
+    delta = {}
+    if summary is not None:
+      delta['summary'] = summary
+    if description is not None:
+      delta['description'] = description
+    if state is not None:
+      delta['state'] = str(state).lower()
+    if state is not None:
+      delta['state_reason'] = state_reason
+    if access is not None:
+      delta['access'] = str(access).lower()
+    if read_only_reason is not None:
+      delta['read_only_reason'] = read_only_reason
+    if issue_notify_address is not None:
+      delta['issue_notify_address'] = issue_notify_address
+    if attachment_bytes_used is not None:
+      delta['attachment_bytes_used'] = attachment_bytes_used
+    if attachment_quota is not None:
+      delta['attachment_quota'] = attachment_quota
+    if moved_to is not None:
+      delta['moved_to'] = moved_to
+    if process_inbound_email is not None:
+      delta['process_inbound_email'] = process_inbound_email
+    if only_owners_remove_restrictions is not None:
+      delta['only_owners_remove_restrictions'] = (
+          only_owners_remove_restrictions)
+    if only_owners_see_contributors is not None:
+      delta['only_owners_see_contributors'] = only_owners_see_contributors
+    if delete_time is not None:
+      delta['delete_time'] = delete_time
+    if recent_activity is not None:
+      delta['recent_activity_timestamp'] = recent_activity
+    if revision_url_format is not None:
+      delta['revision_url_format'] = revision_url_format
+    if home_page is not None:
+      delta['home_page'] = home_page
+    if docs_url is not None:
+      delta['docs_url'] = docs_url
+    if source_url is not None:
+      delta['source_url'] = source_url
+    if logo_gcs_id is not None:
+      delta['logo_gcs_id'] = logo_gcs_id
+    if logo_file_name is not None:
+      delta['logo_file_name'] = logo_file_name
+    if issue_notify_always_detailed is not None:
+      delta['issue_notify_always_detailed'] = issue_notify_always_detailed
+    if cached_content_timestamp is not None:
+      delta['cached_content_timestamp'] = cached_content_timestamp
+    self.project_tbl.Update(cnxn, delta, project_id=project_id, commit=False)
+    self.project_2lc.InvalidateKeys(cnxn, [project_id])
+    if commit:
+      cnxn.Commit()
+
+  def UpdateCachedContentTimestamp(self, cnxn, project_id, now=None):
+    now = now or int(time.time())
+    self.project_tbl.Update(
+        cnxn, {'cached_content_timestamp': now},
+        project_id=project_id, commit=False)
+    return now
+
+  def UpdateProjectRoles(
+      self, cnxn, project_id, owner_ids, committer_ids, contributor_ids,
+      now=None):
+    """Store the project's roles in the DB and set cached_content_timestamp."""
+    exists = self.project_tbl.SelectValue(
+      cnxn, 'project_name', project_id=project_id)
+    if not exists:
+      raise exceptions.NoSuchProjectException()
+
+    self.UpdateCachedContentTimestamp(cnxn, project_id, now=now)
+
+    self.user2project_tbl.Delete(
+        cnxn, project_id=project_id, role_name='owner', commit=False)
+    self.user2project_tbl.Delete(
+        cnxn, project_id=project_id, role_name='committer', commit=False)
+    self.user2project_tbl.Delete(
+        cnxn, project_id=project_id, role_name='contributor', commit=False)
+
+    self.user2project_tbl.InsertRows(
+        cnxn, ['project_id', 'user_id', 'role_name'],
+        [(project_id, user_id, 'owner') for user_id in owner_ids],
+        commit=False)
+    self.user2project_tbl.InsertRows(
+        cnxn, ['project_id', 'user_id', 'role_name'],
+        [(project_id, user_id, 'committer')
+         for user_id in committer_ids], commit=False)
+
+    self.user2project_tbl.InsertRows(
+        cnxn, ['project_id', 'user_id', 'role_name'],
+        [(project_id, user_id, 'contributor')
+         for user_id in contributor_ids], commit=False)
+
+    cnxn.Commit()
+    self.project_2lc.InvalidateKeys(cnxn, [project_id])
+    updated_user_ids = owner_ids + committer_ids + contributor_ids
+    self.user_to_project_2lc.InvalidateKeys(cnxn, updated_user_ids)
+
+  def MarkProjectDeletable(self, cnxn, project_id, config_service):
+    """Update the project's state to make it DELETABLE and free up the name.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the project that will be deleted soon.
+      config_service: issue tracker configuration persistence service, needed
+          to invalidate cached issue tracker results.
+    """
+    generated_name = 'DELETABLE_%d' % project_id
+    delta = {'project_name': generated_name, 'state': 'deletable'}
+    self.project_tbl.Update(cnxn, delta, project_id=project_id)
+
+    self.project_2lc.InvalidateKeys(cnxn, [project_id])
+    # We cannot invalidate a specific part of the name->proj cache by name,
+    # So, tell every job to just drop the whole cache.  It should refill
+    # efficiently and incrementally from memcache.
+    self.project_2lc.InvalidateAllRamEntries(cnxn)
+    self.user_to_project_2lc.InvalidateAllRamEntries(cnxn)
+    config_service.InvalidateMemcacheForEntireProject(project_id)
+
+  def UpdateRecentActivity(self, cnxn, project_id, now=None):
+    """Set the project's recent_activity to the current time."""
+    now = now or int(time.time())
+    project = self.GetProject(cnxn, project_id)
+    if now > project.recent_activity + RECENT_ACTIVITY_THRESHOLD:
+      self.UpdateProject(cnxn, project_id, recent_activity=now)
+
+  ### Roles, memberships, and extra perms
+
+  def GetUserRolesInAllProjects(self, cnxn, effective_ids):
+    """Return three sets of project IDs where the user has a role."""
+    owned_project_ids = set()
+    membered_project_ids = set()
+    contrib_project_ids = set()
+
+    rows = []
+    if effective_ids:
+      rows = self.user2project_tbl.Select(
+          cnxn, cols=['project_id', 'role_name'], user_id=effective_ids)
+
+    for project_id, role_name in rows:
+      if role_name == 'owner':
+        owned_project_ids.add(project_id)
+      elif role_name == 'committer':
+        membered_project_ids.add(project_id)
+      elif role_name == 'contributor':
+        contrib_project_ids.add(project_id)
+      else:
+        logging.warn('Unexpected role name %r', role_name)
+
+    return owned_project_ids, membered_project_ids, contrib_project_ids
+
+  def GetProjectMemberships(self, cnxn, effective_ids, use_cache=True):
+    # type: MonorailConnection, Collection[int], Optional[bool] ->
+    #     Mapping[int, Collection[int]]
+    """Return a list of project IDs where the user has a membership."""
+    project_id_dict, missed_ids = self.user_to_project_2lc.GetAll(
+        cnxn, effective_ids, use_cache=use_cache)
+
+    # Users that were missed are assumed to not have any projects.
+    assert not missed_ids
+
+    return project_id_dict
+
+  def UpdateExtraPerms(
+      self, cnxn, project_id, member_id, extra_perms, now=None):
+    """Load the project, update the member's extra perms, and store.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the current project.
+      member_id: int user id of the user that was edited.
+      extra_perms: list of strings for perms that the member
+          should have over-and-above what their role gives them.
+      now: fake int(time.time()) value passed in during unit testing.
+    """
+    # This will be a newly constructed object, not from the cache and not
+    # shared with any other thread.
+    project = self.GetProject(cnxn, project_id, use_cache=False)
+
+    idx, member_extra_perms = permissions.FindExtraPerms(project, member_id)
+    if not member_extra_perms and not extra_perms:
+      return
+    if member_extra_perms and list(member_extra_perms.perms) == extra_perms:
+      return
+    # Either project is None or member_id is not a member of the project.
+    if idx is None:
+      return
+
+    if member_extra_perms:
+      member_extra_perms.perms = extra_perms
+    else:
+      member_extra_perms = project_pb2.Project.ExtraPerms(
+          member_id=member_id, perms=extra_perms)
+      # Keep the list of extra_perms sorted by member id.
+      project.extra_perms.insert(idx, member_extra_perms)
+
+    self.extraperm_tbl.Delete(
+        cnxn, project_id=project_id, user_id=member_id, commit=False)
+    self.extraperm_tbl.InsertRows(
+        cnxn, EXTRAPERM_COLS,
+        [(project_id, member_id, perm) for perm in extra_perms],
+        commit=False)
+    project.cached_content_timestamp = self.UpdateCachedContentTimestamp(
+        cnxn, project_id, now=now)
+    cnxn.Commit()
+
+    self.project_2lc.InvalidateKeys(cnxn, [project_id])
+
+  ### Project Commitments
+
+  def GetProjectCommitments(self, cnxn, project_id):
+    """Get the project commitments (notes) from the DB.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int project ID.
+
+    Returns:
+      A the specified project's ProjectCommitments instance, or an empty one,
+        if the project doesn't exist, or has not documented member
+        commitments.
+    """
+    # Get the notes.  Don't get the project_id column
+    # since we already know that value.
+    notes_rows = self.membernotes_tbl.Select(
+        cnxn, cols=['user_id', 'notes'], project_id=project_id)
+    notes_dict = dict(notes_rows)
+
+    project_commitments = project_pb2.ProjectCommitments()
+    project_commitments.project_id = project_id
+    for user_id in notes_dict.keys():
+      commitment = project_pb2.ProjectCommitments.MemberCommitment(
+          member_id=user_id,
+          notes=notes_dict.get(user_id, ''))
+      project_commitments.commitments.append(commitment)
+
+    return project_commitments
+
+  def _StoreProjectCommitments(self, cnxn, project_commitments):
+    """Store an updated set of project commitments in the DB.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_commitments: ProjectCommitments PB
+    """
+    project_id = project_commitments.project_id
+    notes_rows = []
+    for commitment in project_commitments.commitments:
+      notes_rows.append(
+          (project_id, commitment.member_id, commitment.notes))
+
+    # TODO(jrobbins): this should be in a transaction.
+    self.membernotes_tbl.Delete(cnxn, project_id=project_id)
+    self.membernotes_tbl.InsertRows(
+        cnxn, MEMBERNOTES_COLS, notes_rows, ignore=True)
+
+  def UpdateCommitments(self, cnxn, project_id, member_id, notes):
+    """Update the member's commitments in the specified project.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the current project.
+      member_id: int user ID of the user that was edited.
+      notes: further notes on the member's expected involvment
+        in the project.
+    """
+    project_commitments = self.GetProjectCommitments(cnxn, project_id)
+
+    commitment = None
+    for c in project_commitments.commitments:
+      if c.member_id == member_id:
+        commitment = c
+        break
+    else:
+      commitment = project_pb2.ProjectCommitments.MemberCommitment(
+          member_id=member_id)
+      project_commitments.commitments.append(commitment)
+
+    dirty = False
+
+    if commitment.notes != notes:
+      commitment.notes = notes
+      dirty = True
+
+    if dirty:
+      self._StoreProjectCommitments(cnxn, project_commitments)
+
+  def GetProjectAutocompleteExclusion(self, cnxn, project_id):
+    """Get user ids who are excluded from autocomplete list.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the current project.
+
+    Returns:
+      A pair containing: a list of user IDs who are excluded from the
+      autocomplete list for given project, and a list of group IDs to
+      not expand.
+    """
+    ac_exclusion_rows = self.acexclusion_tbl.Select(
+        cnxn, cols=['user_id'], project_id=project_id, ac_exclude=True)
+    ac_exclusion_ids = [row[0] for row in ac_exclusion_rows]
+    no_expand_rows = self.acexclusion_tbl.Select(
+        cnxn, cols=['user_id'], project_id=project_id, no_expand=True)
+    no_expand_ids = [row[0] for row in no_expand_rows]
+    return ac_exclusion_ids, no_expand_ids
+
+  def UpdateProjectAutocompleteExclusion(
+      self, cnxn, project_id, member_id, ac_exclude, no_expand):
+    """Update autocomplete exclusion for given user.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the current project.
+      member_id: int user ID of the user that was edited.
+      ac_exclude: Whether this user should be excluded.
+      no_expand: Whether this group should not be expanded.
+    """
+    if ac_exclude or no_expand:
+      self.acexclusion_tbl.InsertRows(
+        cnxn, AUTOCOMPLETEEXCLUSION_COLS,
+        [(project_id, member_id, ac_exclude, no_expand)],
+        replace=True)
+    else:
+      self.acexclusion_tbl.Delete(
+          cnxn, project_id=project_id, user_id=member_id)
+
+    self.UpdateCachedContentTimestamp(cnxn, project_id)
+    cnxn.Commit()
+
+    self.project_2lc.InvalidateKeys(cnxn, [project_id])
+
+  def ExpungeUsersInProjects(self, cnxn, user_ids, limit=None):
+    """Wipes the given users from the projects system.
+
+    This method will not commit the operation. This method will
+    not make changes to in-memory data.
+    """
+    self.extraperm_tbl.Delete(cnxn, user_id=user_ids, limit=limit, commit=False)
+    self.acexclusion_tbl.Delete(
+        cnxn, user_id=user_ids, limit=limit, commit=False)
+    self.membernotes_tbl.Delete(
+        cnxn, user_id=user_ids, limit=limit, commit=False)
+    self.user2project_tbl.Delete(
+        cnxn, user_id=user_ids, limit=limit, commit=False)
diff --git a/services/secrets_svc.py b/services/secrets_svc.py
new file mode 100644
index 0000000..7b861ce
--- /dev/null
+++ b/services/secrets_svc.py
@@ -0,0 +1,87 @@
+# 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
+
+"""A set of functions that provide persistence for secret keys.
+
+These keys are used in generating XSRF tokens, calling the CAPTCHA API,
+and validating that inbound emails are replies to notifications that
+we sent.
+
+Unlike other data stored in Monorail, this is kept in the GAE
+datastore rather than SQL because (1) it never needs to be used in
+combination with other SQL data, and (2) we may want to replicate
+issue content for various off-line reporting functionality, but we
+will never want to do that with these keys.  A copy is also kept in
+memcache for faster access.
+
+When no secrets are found, a new Secrets entity is created and initialized
+with randomly generated values for XSRF and email keys.
+
+If these secret values ever need to change:
+(1) Make the change on the Google Cloud Console in the Cloud Datastore tab.
+(2) Flush memcache.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from google.appengine.api import memcache
+from google.appengine.ext import ndb
+
+import settings
+from framework import framework_helpers
+
+
+GLOBAL_KEY = 'secrets_singleton_key'
+
+
+class Secrets(ndb.Model):
+  """Model for representing secret keys."""
+  # Keys we use to generate tokens.
+  xsrf_key = ndb.StringProperty(required=True)
+  email_key = ndb.StringProperty(required=True)
+  pagination_key = ndb.StringProperty(required=True)
+
+
+def MakeSecrets():
+  """Make a new Secrets model with random values for keys."""
+  secrets = Secrets(id=GLOBAL_KEY)
+  secrets.xsrf_key = framework_helpers.MakeRandomKey()
+  secrets.email_key = framework_helpers.MakeRandomKey()
+  secrets.pagination_key = framework_helpers.MakeRandomKey()
+  return secrets
+
+
+def GetSecrets():
+  """Get secret keys from memcache or datastore. Or, make new ones."""
+  secrets = memcache.get(GLOBAL_KEY)
+  if secrets:
+    return secrets
+
+  secrets = Secrets.get_by_id(GLOBAL_KEY)
+  if not secrets:
+    secrets = MakeSecrets()
+    secrets.put()
+
+  memcache.set(GLOBAL_KEY, secrets)
+  return secrets
+
+
+def GetXSRFKey():
+  """Return a secret key string used to generate XSRF tokens."""
+  return GetSecrets().xsrf_key
+
+
+def GetEmailKey():
+  """Return a secret key string used to generate email tokens."""
+  return GetSecrets().email_key
+
+
+def GetPaginationKey():
+  """Return a secret key string used to generate pagination tokens."""
+  return GetSecrets().pagination_key
+
diff --git a/services/service_manager.py b/services/service_manager.py
new file mode 100644
index 0000000..1cb886a
--- /dev/null
+++ b/services/service_manager.py
@@ -0,0 +1,84 @@
+# 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
+
+"""Service manager to initialize all services."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from features import autolink
+from services import cachemanager_svc
+from services import chart_svc
+from services import config_svc
+from services import features_svc
+from services import issue_svc
+from services import project_svc
+from services import spam_svc
+from services import star_svc
+from services import template_svc
+from services import user_svc
+from services import usergroup_svc
+
+
+svcs = None
+
+
+class Services(object):
+  """A simple container for widely-used service objects."""
+
+  def __init__(
+      self, project=None, user=None, issue=None, config=None,
+      usergroup=None, cache_manager=None, autolink_obj=None,
+      user_star=None, project_star=None, issue_star=None, features=None,
+      spam=None, hotlist_star=None, chart=None, template=None):
+    # Persistence services
+    self.project = project
+    self.user = user
+    self.usergroup = usergroup
+    self.issue = issue
+    self.config = config
+    self.user_star = user_star
+    self.project_star = project_star
+    self.hotlist_star = hotlist_star
+    self.issue_star = issue_star
+    self.features = features
+    self.template = template
+
+    # Misc. services
+    self.cache_manager = cache_manager
+    self.autolink = autolink_obj
+    self.spam = spam
+    self.chart = chart
+
+
+def set_up_services():
+  """Set up all services."""
+
+  global svcs
+  if svcs is None:
+    # Sorted as: cache_manager first, everything which depends on it,
+    # issue (which depends on project and config), things with no deps.
+    cache_manager = cachemanager_svc.CacheManager()
+    config = config_svc.ConfigService(cache_manager)
+    features = features_svc.FeaturesService(cache_manager, config)
+    hotlist_star = star_svc.HotlistStarService(cache_manager)
+    issue_star = star_svc.IssueStarService(cache_manager)
+    project = project_svc.ProjectService(cache_manager)
+    project_star = star_svc.ProjectStarService(cache_manager)
+    user = user_svc.UserService(cache_manager)
+    user_star = star_svc.UserStarService(cache_manager)
+    usergroup = usergroup_svc.UserGroupService(cache_manager)
+    chart = chart_svc.ChartService(config)
+    issue = issue_svc.IssueService(project, config, cache_manager, chart)
+    autolink_obj = autolink.Autolink()
+    spam = spam_svc.SpamService()
+    template = template_svc.TemplateService(cache_manager)
+    svcs = Services(
+      cache_manager=cache_manager, config=config, features=features,
+      issue_star=issue_star, project=project, project_star=project_star,
+      user=user, user_star=user_star, usergroup=usergroup, issue=issue,
+      autolink_obj=autolink_obj, spam=spam, hotlist_star=hotlist_star,
+      chart=chart, template=template)
+  return svcs
diff --git a/services/spam_svc.py b/services/spam_svc.py
new file mode 100644
index 0000000..9a62cb9
--- /dev/null
+++ b/services/spam_svc.py
@@ -0,0 +1,697 @@
+# 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
+
+""" Set of functions for detaling with spam reports.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+import settings
+import sys
+
+from collections import defaultdict
+from features import filterrules_helpers
+from framework import sql
+from framework import framework_constants
+from infra_libs import ts_mon
+from services import ml_helpers
+
+
+SPAMREPORT_TABLE_NAME = 'SpamReport'
+SPAMVERDICT_TABLE_NAME = 'SpamVerdict'
+ISSUE_TABLE = 'Issue'
+
+REASON_MANUAL = 'manual'
+REASON_THRESHOLD = 'threshold'
+REASON_CLASSIFIER = 'classifier'
+REASON_FAIL_OPEN = 'fail_open'
+SPAM_CLASS_LABEL = '1'
+
+SPAMREPORT_ISSUE_COLS = ['issue_id', 'reported_user_id', 'user_id']
+SPAMVERDICT_ISSUE_COL = ['created', 'content_created', 'user_id',
+                         'reported_user_id', 'comment_id', 'issue_id']
+MANUALVERDICT_ISSUE_COLS = ['user_id', 'issue_id', 'is_spam', 'reason',
+    'project_id']
+THRESHVERDICT_ISSUE_COLS = ['issue_id', 'is_spam', 'reason', 'project_id']
+
+SPAMREPORT_COMMENT_COLS = ['comment_id', 'reported_user_id', 'user_id']
+MANUALVERDICT_COMMENT_COLS = ['user_id', 'comment_id', 'is_spam', 'reason',
+    'project_id']
+THRESHVERDICT_COMMENT_COLS = ['comment_id', 'is_spam', 'reason', 'project_id']
+
+
+class SpamService(object):
+  """The persistence layer for spam reports."""
+  issue_actions = ts_mon.CounterMetric(
+      'monorail/spam_svc/issue', 'Count of things that happen to issues.', [
+          ts_mon.StringField('type'),
+          ts_mon.StringField('reporter_id'),
+          ts_mon.StringField('issue')
+      ])
+  comment_actions = ts_mon.CounterMetric(
+      'monorail/spam_svc/comment', 'Count of things that happen to comments.', [
+          ts_mon.StringField('type'),
+          ts_mon.StringField('reporter_id'),
+          ts_mon.StringField('issue'),
+          ts_mon.StringField('comment_id')
+      ])
+  ml_engine_failures = ts_mon.CounterMetric(
+      'monorail/spam_svc/ml_engine_failure',
+      'Failures calling the ML Engine API',
+      None)
+
+  def __init__(self):
+    self.report_tbl = sql.SQLTableManager(SPAMREPORT_TABLE_NAME)
+    self.verdict_tbl = sql.SQLTableManager(SPAMVERDICT_TABLE_NAME)
+    self.issue_tbl = sql.SQLTableManager(ISSUE_TABLE)
+
+    # ML Engine library is lazy loaded below.
+    self.ml_engine = None
+
+  def LookupIssuesFlaggers(self, cnxn, issue_ids):
+    """Returns users who've reported the issues or their comments as spam.
+
+    Returns a dictionary {issue_id: (issue_reporters, comment_reporters)}
+    issue_reportes is a list of users who flagged the issue;
+    comment_reporters element is a dictionary {comment_id: [user_ids]} where
+    user_ids are the users who flagged that comment.
+    """
+    rows = self.report_tbl.Select(
+        cnxn, cols=['issue_id', 'user_id', 'comment_id'],
+        issue_id=issue_ids)
+
+    reporters = collections.defaultdict(
+        # Return a tuple of (issue_reporters, comment_reporters) as described
+        # above.
+        lambda: ([], collections.defaultdict(list)))
+
+    for row in rows:
+      issue_id = int(row[0])
+      user_id = row[1]
+      if row[2]:
+        comment_id = row[2]
+        reporters[issue_id][1][comment_id].append(user_id)
+      else:
+        reporters[issue_id][0].append(user_id)
+
+    return reporters
+
+  def LookupIssueFlaggers(self, cnxn, issue_id):
+    """Returns users who've reported the issue or its comments as spam.
+
+    Returns a tuple. First element is a list of users who flagged the issue;
+    second element is a dictionary of comment id to a list of users who flagged
+    that comment.
+    """
+    return self.LookupIssuesFlaggers(cnxn, [issue_id])[issue_id]
+
+  def LookupIssueFlagCounts(self, cnxn, issue_ids):
+    """Returns a map of issue_id to flag counts"""
+    rows = self.report_tbl.Select(cnxn, cols=['issue_id', 'COUNT(*)'],
+                                  issue_id=issue_ids, group_by=['issue_id'])
+    counts = {}
+    for row in rows:
+      counts[int(row[0])] = row[1]
+    return counts
+
+  def LookupIssueVerdicts(self, cnxn, issue_ids):
+    """Returns a map of issue_id to most recent spam verdicts"""
+    rows = self.verdict_tbl.Select(cnxn,
+                                   cols=['issue_id', 'reason', 'MAX(created)'],
+                                   issue_id=issue_ids, comment_id=None,
+                                   group_by=['issue_id'])
+    counts = {}
+    for row in rows:
+      counts[int(row[0])] = row[1]
+    return counts
+
+  def LookupIssueVerdictHistory(self, cnxn, issue_ids):
+    """Returns a map of issue_id to most recent spam verdicts"""
+    rows = self.verdict_tbl.Select(cnxn, cols=[
+        'issue_id', 'reason', 'created', 'is_spam', 'classifier_confidence',
+            'user_id', 'overruled'],
+        issue_id=issue_ids, order_by=[('issue_id', []), ('created', [])])
+
+    # TODO: group by issue_id, make class instead of dict for verdict.
+    verdicts = []
+    for row in rows:
+      verdicts.append({
+        'issue_id': row[0],
+        'reason': row[1],
+        'created': row[2],
+        'is_spam': row[3],
+        'classifier_confidence': row[4],
+        'user_id': row[5],
+        'overruled': row[6],
+      })
+
+    return verdicts
+
+  def LookupCommentVerdictHistory(self, cnxn, comment_ids):
+    """Returns a map of issue_id to most recent spam verdicts"""
+    rows = self.verdict_tbl.Select(cnxn, cols=[
+        'comment_id', 'reason', 'created', 'is_spam', 'classifier_confidence',
+            'user_id', 'overruled'],
+        comment_id=comment_ids, order_by=[('comment_id', []), ('created', [])])
+
+    # TODO: group by comment_id, make class instead of dict for verdict.
+    verdicts = []
+    for row in rows:
+      verdicts.append({
+        'comment_id': row[0],
+        'reason': row[1],
+        'created': row[2],
+        'is_spam': row[3],
+        'classifier_confidence': row[4],
+        'user_id': row[5],
+        'overruled': row[6],
+      })
+
+    return verdicts
+
+  def FlagIssues(self, cnxn, issue_service, issues, reporting_user_id,
+                 flagged_spam):
+    """Creates or deletes a spam report on an issue."""
+    verdict_updates = []
+    if flagged_spam:
+      rows = [(issue.issue_id, issue.reporter_id, reporting_user_id)
+          for issue in issues]
+      self.report_tbl.InsertRows(cnxn, SPAMREPORT_ISSUE_COLS, rows,
+          ignore=True)
+    else:
+      issue_ids = [issue.issue_id for issue in issues]
+      self.report_tbl.Delete(
+          cnxn, issue_id=issue_ids, user_id=reporting_user_id,
+          comment_id=None)
+
+    project_id = issues[0].project_id
+
+    # Now record new verdicts and update issue.is_spam, if they've changed.
+    ids = [issue.issue_id for issue in issues]
+    counts = self.LookupIssueFlagCounts(cnxn, ids)
+    previous_verdicts = self.LookupIssueVerdicts(cnxn, ids)
+
+    for issue_id in counts:
+      # If the flag counts changed enough to toggle the is_spam bit, need to
+      # record a new verdict and update the Issue.
+
+      # No number of user spam flags can overturn an admin's verdict.
+      if previous_verdicts.get(issue_id) == REASON_MANUAL:
+        continue
+
+      # If enough spam flags come in, mark the issue as spam.
+      if (flagged_spam and counts[issue_id] >= settings.spam_flag_thresh):
+        verdict_updates.append(issue_id)
+
+    if len(verdict_updates) == 0:
+      return
+
+    # Some of the issues may have exceed the flag threshold, so issue verdicts
+    # and mark as spam in those cases.
+    rows = [(issue_id, flagged_spam, REASON_THRESHOLD, project_id)
+        for issue_id in verdict_updates]
+    self.verdict_tbl.InsertRows(cnxn, THRESHVERDICT_ISSUE_COLS, rows,
+        ignore=True)
+    update_issues = []
+    for issue in issues:
+      if issue.issue_id in verdict_updates:
+        issue.is_spam = flagged_spam
+        update_issues.append(issue)
+
+    if flagged_spam:
+      for issue in update_issues:
+        issue_ref = '%s:%s' % (issue.project_name, issue.local_id)
+        self.issue_actions.increment(
+            {
+                'type': 'flag',
+                'reporter_id': str(reporting_user_id),
+                'issue': issue_ref
+            })
+
+    issue_service.UpdateIssues(cnxn, update_issues, update_cols=['is_spam'])
+
+  def FlagComment(
+      self, cnxn, issue, comment_id, reported_user_id, reporting_user_id,
+      flagged_spam):
+    """Creates or deletes a spam report on a comment."""
+    # TODO(seanmccullough): Bulk comment flagging? There's no UI for that.
+    if flagged_spam:
+      self.report_tbl.InsertRow(
+          cnxn,
+          ignore=True,
+          issue_id=issue.issue_id,
+          comment_id=comment_id,
+          reported_user_id=reported_user_id,
+          user_id=reporting_user_id)
+      issue_ref = '%s:%s' % (issue.project_name, issue.local_id)
+      self.comment_actions.increment(
+          {
+              'type': 'flag',
+              'reporter_id': str(reporting_user_id),
+              'issue': issue_ref,
+              'comment_id': str(comment_id)
+          })
+    else:
+      self.report_tbl.Delete(
+          cnxn,
+          issue_id=issue.issue_id,
+          comment_id=comment_id,
+          user_id=reporting_user_id)
+
+  def RecordClassifierIssueVerdict(self, cnxn, issue, is_spam, confidence,
+        fail_open):
+    reason = REASON_FAIL_OPEN if fail_open else REASON_CLASSIFIER
+    self.verdict_tbl.InsertRow(cnxn, issue_id=issue.issue_id, is_spam=is_spam,
+        reason=reason, classifier_confidence=confidence,
+        project_id=issue.project_id)
+    if is_spam:
+      issue_ref = '%s:%s' % (issue.project_name, issue.local_id)
+      self.issue_actions.increment(
+          {
+              'type': 'classifier',
+              'reporter_id': 'classifier',
+              'issue': issue_ref
+          })
+    # This is called at issue creation time, so there's nothing else to do here.
+
+  def RecordManualIssueVerdicts(self, cnxn, issue_service, issues, user_id,
+                                is_spam):
+    rows = [(user_id, issue.issue_id, is_spam, REASON_MANUAL, issue.project_id)
+        for issue in issues]
+    issue_ids = [issue.issue_id for issue in issues]
+
+    # Overrule all previous verdicts.
+    self.verdict_tbl.Update(cnxn, {'overruled': True}, [
+        ('issue_id IN (%s)' % sql.PlaceHolders(issue_ids), issue_ids)
+        ], commit=False)
+
+    self.verdict_tbl.InsertRows(cnxn, MANUALVERDICT_ISSUE_COLS, rows,
+        ignore=True)
+
+    for issue in issues:
+      issue.is_spam = is_spam
+
+    if is_spam:
+      for issue in issues:
+        issue_ref = '%s:%s' % (issue.project_name, issue.local_id)
+      self.issue_actions.increment(
+          {
+              'type': 'manual',
+              'reporter_id': str(user_id),
+              'issue': issue_ref
+          })
+    else:
+      issue_service.AllocateNewLocalIDs(cnxn, issues)
+
+    # This will commit the transaction.
+    issue_service.UpdateIssues(cnxn, issues, update_cols=['is_spam'])
+
+  def RecordManualCommentVerdict(self, cnxn, issue_service, user_service,
+        comment_id, user_id, is_spam):
+    # TODO(seanmccullough): Bulk comment verdicts? There's no UI for that.
+    self.verdict_tbl.InsertRow(cnxn, ignore=True,
+      user_id=user_id, comment_id=comment_id, is_spam=is_spam,
+      reason=REASON_MANUAL)
+    comment = issue_service.GetComment(cnxn, comment_id)
+    comment.is_spam = is_spam
+    issue = issue_service.GetIssue(cnxn, comment.issue_id, use_cache=False)
+    issue_service.SoftDeleteComment(
+        cnxn, issue, comment, user_id, user_service, is_spam, True, is_spam)
+    if is_spam:
+      issue_ref = '%s:%s' % (issue.project_name, issue.local_id)
+      self.comment_actions.increment(
+          {
+              'type': 'manual',
+              'reporter_id': str(user_id),
+              'issue': issue_ref,
+              'comment_id': str(comment_id)
+          })
+
+  def RecordClassifierCommentVerdict(
+      self, cnxn, issue_service, comment, is_spam, confidence, fail_open):
+    reason = REASON_FAIL_OPEN if fail_open else REASON_CLASSIFIER
+    self.verdict_tbl.InsertRow(cnxn, comment_id=comment.id, is_spam=is_spam,
+        reason=reason, classifier_confidence=confidence,
+        project_id=comment.project_id)
+    if is_spam:
+      issue = issue_service.GetIssue(cnxn, comment.issue_id, use_cache=False)
+      issue_ref = '%s:%s' % (issue.project_name, issue.local_id)
+      self.comment_actions.increment(
+          {
+              'type': 'classifier',
+              'reporter_id': 'classifier',
+              'issue': issue_ref,
+              'comment_id': str(comment.id)
+          })
+
+  def _predict(self, instance):
+    """Requests a prediction from the ML Engine API.
+
+    Sample API response:
+      {'predictions': [{
+        'classes': ['0', '1'],
+        'scores': [0.4986788034439087, 0.5013211965560913]
+      }]}
+
+    This hits the default model.
+
+    Returns:
+      A floating point number representing the confidence
+      the instance is spam.
+    """
+    model_name = 'projects/%s/models/%s' % (
+      settings.classifier_project_id, settings.spam_model_name)
+    body = {'instances': [{"inputs": instance["word_hashes"]}]}
+
+    if not self.ml_engine:
+      self.ml_engine = ml_helpers.setup_ml_engine()
+
+    request = self.ml_engine.projects().predict(name=model_name, body=body)
+    response = request.execute()
+    logging.info('ML Engine API response: %r' % response)
+    prediction = response['predictions'][0]
+
+    # Ensure the class confidence we return is for the spam, not the ham label.
+    # The spam label, '1', is usually at index 1 but I'm not sure of any
+    # guarantees around label order.
+    if prediction['classes'][1] == SPAM_CLASS_LABEL:
+      return prediction['scores'][1]
+    elif prediction['classes'][0] == SPAM_CLASS_LABEL:
+      return prediction['scores'][0]
+    else:
+      raise Exception('No predicted classes found.')
+
+  def _IsExempt(self, author, is_project_member):
+    """Return True if the user is exempt from spam checking."""
+    if author.email is not None and author.email.endswith(
+        settings.spam_allowlisted_suffixes):
+      logging.info('%s allowlisted from spam filtering', author.email)
+      return True
+
+    if is_project_member:
+      logging.info('%s is a project member, assuming ham', author.email)
+      return True
+
+    return False
+
+  def ClassifyIssue(self, issue, firstComment, reporter, is_project_member):
+    """Classify an issue as either spam or ham.
+
+    Args:
+      issue: the Issue.
+      firstComment: the first Comment on issue.
+      reporter: User PB for the Issue reporter.
+      is_project_member: True if reporter is a member of issue's project.
+
+    Returns a JSON dict of classifier prediction results from
+    the ML Engine API.
+    """
+    instance = ml_helpers.GenerateFeaturesRaw(
+        [issue.summary, firstComment.content],
+        settings.spam_feature_hashes)
+    return self._classify(instance, reporter, is_project_member)
+
+  def ClassifyComment(self, comment_content, commenter, is_project_member=True):
+    """Classify a comment as either spam or ham.
+
+    Args:
+      comment: the comment text.
+      commenter: User PB for the user who authored the comment.
+
+    Returns a JSON dict of classifier prediction results from
+    the ML Engine API.
+    """
+    instance = ml_helpers.GenerateFeaturesRaw(
+        ['', comment_content],
+        settings.spam_feature_hashes)
+    return self._classify(instance, commenter, is_project_member)
+
+
+  def _classify(self, instance, author, is_project_member):
+    # Fail-safe: not spam.
+    result = self.ham_classification()
+
+    if self._IsExempt(author, is_project_member):
+      return result
+
+    if not self.ml_engine:
+      self.ml_engine = ml_helpers.setup_ml_engine()
+
+    # If setup_ml_engine returns None, it failed to init.
+    if not self.ml_engine:
+      logging.error("ML Engine not initialized.")
+      self.ml_engine_failures.increment()
+      result['failed_open'] = True
+      return result
+
+    remaining_retries = 3
+    while remaining_retries > 0:
+      try:
+        result['confidence_is_spam'] = self._predict(instance)
+        result['failed_open'] = False
+        return result
+      except Exception as ex:
+        remaining_retries = remaining_retries - 1
+        self.ml_engine_failures.increment()
+        logging.error('Error calling ML Engine API: %s' % ex)
+
+      result['failed_open'] = True
+    return result
+
+  def ham_classification(self):
+    return {'confidence_is_spam': 0.0,
+            'failed_open': False}
+
+  def GetIssueClassifierQueue(
+      self, cnxn, _issue_service, project_id, offset=0, limit=10):
+    """Returns list of recent issues with spam verdicts,
+     ranked in ascending order of confidence (so uncertain items are first).
+     """
+    # TODO(seanmccullough): Optimize pagination. This query probably gets
+    # slower as the number of SpamVerdicts grows, regardless of offset
+    # and limit values used here.  Using offset,limit in general may not
+    # be the best way to do this.
+    issue_results = self.verdict_tbl.Select(
+        cnxn,
+        cols=[
+            'issue_id', 'is_spam', 'reason', 'classifier_confidence', 'created'
+        ],
+        where=[
+            ('project_id = %s', [project_id]),
+            (
+                'classifier_confidence <= %s',
+                [settings.classifier_moderation_thresh]),
+            ('overruled = %s', [False]),
+            ('issue_id IS NOT NULL', []),
+        ],
+        order_by=[
+            ('classifier_confidence ASC', []),
+            ('created ASC', []),
+        ],
+        group_by=['issue_id'],
+        offset=offset,
+        limit=limit,
+    )
+
+    ret = []
+    for row in issue_results:
+      ret.append(
+          ModerationItem(
+              issue_id=int(row[0]),
+              is_spam=row[1] == 1,
+              reason=row[2],
+              classifier_confidence=row[3],
+              verdict_time='%s' % row[4],
+          ))
+
+    count = self.verdict_tbl.SelectValue(
+        cnxn,
+        col='COUNT(*)',
+        where=[
+            ('project_id = %s', [project_id]),
+            (
+                'classifier_confidence <= %s',
+                [settings.classifier_moderation_thresh]),
+            ('overruled = %s', [False]),
+            ('issue_id IS NOT NULL', []),
+        ])
+
+    return ret, count
+
+  def GetIssueFlagQueue(
+      self, cnxn, _issue_service, project_id, offset=0, limit=10):
+    """Returns list of recent issues that have been flagged by users"""
+    issue_flags = self.report_tbl.Select(
+        cnxn,
+        cols=[
+            "Issue.project_id", "Report.issue_id", "count(*) as count",
+            "max(Report.created) as latest",
+            "count(distinct Report.user_id) as users"
+        ],
+        left_joins=["Issue ON Issue.id = Report.issue_id"],
+        where=[
+            ('Report.issue_id IS NOT NULL', []),
+            ("Issue.project_id == %v", [project_id])
+        ],
+        order_by=[('count DESC', [])],
+        group_by=['Report.issue_id'],
+        offset=offset,
+        limit=limit)
+    ret = []
+    for row in issue_flags:
+      ret.append(
+          ModerationItem(
+              project_id=row[0],
+              issue_id=row[1],
+              count=row[2],
+              latest_report=row[3],
+              num_users=row[4],
+          ))
+
+    count = self.verdict_tbl.SelectValue(
+        cnxn,
+        col='COUNT(DISTINCT Report.issue_id)',
+        where=[('Issue.project_id = %s', [project_id])],
+        left_joins=["Issue ON Issue.id = SpamReport.issue_id"])
+    return ret, count
+
+
+  def GetCommentClassifierQueue(
+      self, cnxn, _issue_service, project_id, offset=0, limit=10):
+    """Returns list of recent comments with spam verdicts,
+     ranked in ascending order of confidence (so uncertain items are first).
+     """
+    # TODO(seanmccullough): Optimize pagination. This query probably gets
+    # slower as the number of SpamVerdicts grows, regardless of offset
+    # and limit values used here.  Using offset,limit in general may not
+    # be the best way to do this.
+    comment_results = self.verdict_tbl.Select(
+        cnxn,
+        cols=[
+            'issue_id', 'is_spam', 'reason', 'classifier_confidence', 'created'
+        ],
+        where=[
+            ('project_id = %s', [project_id]),
+            (
+                'classifier_confidence <= %s',
+                [settings.classifier_moderation_thresh]),
+            ('overruled = %s', [False]),
+            ('comment_id IS NOT NULL', []),
+        ],
+        order_by=[
+            ('classifier_confidence ASC', []),
+            ('created ASC', []),
+        ],
+        group_by=['comment_id'],
+        offset=offset,
+        limit=limit,
+    )
+
+    ret = []
+    for row in comment_results:
+      ret.append(
+          ModerationItem(
+              comment_id=int(row[0]),
+              is_spam=row[1] == 1,
+              reason=row[2],
+              classifier_confidence=row[3],
+              verdict_time='%s' % row[4],
+          ))
+
+    count = self.verdict_tbl.SelectValue(
+        cnxn,
+        col='COUNT(*)',
+        where=[
+            ('project_id = %s', [project_id]),
+            (
+                'classifier_confidence <= %s',
+                [settings.classifier_moderation_thresh]),
+            ('overruled = %s', [False]),
+            ('comment_id IS NOT NULL', []),
+        ])
+
+    return ret, count
+
+
+  def GetTrainingIssues(self, cnxn, issue_service, since, offset=0, limit=100):
+    """Returns list of recent issues with human-labeled spam/ham verdicts.
+    """
+
+    # get all of the manual verdicts in the past day.
+    results = self.verdict_tbl.Select(cnxn,
+        cols=['issue_id'],
+        where=[
+            ('overruled = %s', [False]),
+            ('reason = %s', ['manual']),
+            ('issue_id IS NOT NULL', []),
+            ('created > %s', [since.isoformat()]),
+        ],
+        offset=offset,
+        limit=limit,
+        )
+
+    issue_ids = [int(row[0]) for row in results if row[0]]
+    issues = issue_service.GetIssues(cnxn, issue_ids)
+    comments = issue_service.GetCommentsForIssues(cnxn, issue_ids)
+    first_comments = {}
+    for issue in issues:
+      first_comments[issue.issue_id] = (comments[issue.issue_id][0].content
+          if issue.issue_id in comments else "[Empty]")
+
+    count = self.verdict_tbl.SelectValue(cnxn,
+        col='COUNT(*)',
+        where=[
+            ('overruled = %s', [False]),
+            ('reason = %s', ['manual']),
+            ('issue_id IS NOT NULL', []),
+            ('created > %s', [since.isoformat()]),
+        ])
+
+    return issues, first_comments, count
+
+  def GetTrainingComments(self, cnxn, issue_service, since, offset=0,
+      limit=100):
+    """Returns list of recent comments with human-labeled spam/ham verdicts.
+    """
+
+    # get all of the manual verdicts in the past day.
+    results = self.verdict_tbl.Select(
+        cnxn,
+        distinct=True,
+        cols=['comment_id'],
+        where=[
+            ('overruled = %s', [False]),
+            ('reason = %s', ['manual']),
+            ('comment_id IS NOT NULL', []),
+            ('created > %s', [since.isoformat()]),
+        ],
+        offset=offset,
+        limit=limit,
+        )
+
+    comment_ids = [int(row[0]) for row in results if row[0]]
+    # Don't care about sequence numbers in this context yet.
+    comments = issue_service.GetCommentsByID(cnxn, comment_ids,
+        defaultdict(int))
+    return comments
+
+  def ExpungeUsersInSpam(self, cnxn, user_ids):
+    """Removes all references to given users from Spam DB tables.
+
+    This method will not commit the operations. This method will
+    not make changes to in-memory data.
+    """
+    commit = False
+    self.report_tbl.Delete(cnxn, reported_user_id=user_ids, commit=commit)
+    self.report_tbl.Delete(cnxn, user_id=user_ids, commit=commit)
+    self.verdict_tbl.Delete(cnxn, user_id=user_ids, commit=commit)
+
+
+class ModerationItem:
+  def __init__(self, **kwargs):
+    self.__dict__ = kwargs
diff --git a/services/star_svc.py b/services/star_svc.py
new file mode 100644
index 0000000..bb92e73
--- /dev/null
+++ b/services/star_svc.py
@@ -0,0 +1,264 @@
+# 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
+
+"""A set of functions that provide persistence for stars.
+
+Stars can be on users, projects, or issues.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+import settings
+from features import filterrules_helpers
+from framework import sql
+from services import caches
+
+
+USERSTAR_TABLE_NAME = 'UserStar'
+PROJECTSTAR_TABLE_NAME = 'ProjectStar'
+ISSUESTAR_TABLE_NAME = 'IssueStar'
+HOTLISTSTAR_TABLE_NAME = 'HotlistStar'
+
+# TODO(jrobbins): Consider adding memcache here if performance testing shows
+# that stars are a bottleneck.  Keep in mind that issue star counts are
+# already denormalized and stored in the Issue, which is cached in memcache.
+
+
+class AbstractStarService(object):
+  """The persistence layer for any kind of star data."""
+
+  def __init__(self, cache_manager, tbl, item_col, user_col, cache_kind):
+    """Constructor.
+
+    Args:
+      cache_manager: local cache with distributed invalidation.
+      tbl: SQL table that stores star data.
+      item_col: string SQL column name that holds int item IDs.
+      user_col: string SQL column name that holds int user IDs
+          of the user who starred the item.
+      cache_kind: string saying the kind of RAM cache.
+    """
+    self.tbl = tbl
+    self.item_col = item_col
+    self.user_col = user_col
+
+    # Items starred by users, keyed by user who did the starring.
+    self.star_cache = caches.RamCache(cache_manager, 'user')
+    # Users that starred an item, keyed by item ID.
+    self.starrer_cache = caches.RamCache(cache_manager, cache_kind)
+    # Counts of the users that starred an item, keyed by item ID.
+    self.star_count_cache = caches.RamCache(cache_manager, cache_kind)
+
+  def ExpungeStars(self, cnxn, item_id, commit=True, limit=None):
+    """Wipes an item's stars from the system."""
+    self.tbl.Delete(
+        cnxn, commit=commit, limit=limit, **{self.item_col: item_id})
+
+  def ExpungeStarsByUsers(self, cnxn, user_ids, limit=None):
+    """Wipes a user's stars from the system.
+    This method will not commit the operation. This method will
+    not make changes to in-memory data.
+    """
+    self.tbl.Delete(cnxn, user_id=user_ids, commit=False, limit=limit)
+
+  def LookupItemStarrers(self, cnxn, item_id):
+    """Returns list of users having stars on the specified item."""
+    starrer_list_dict = self.LookupItemsStarrers(cnxn, [item_id])
+    return starrer_list_dict[item_id]
+
+  def LookupItemsStarrers(self, cnxn, items_ids):
+    """Returns {item_id: [uid, ...]} of users who starred these items."""
+    starrer_list_dict, missed_ids = self.starrer_cache.GetAll(items_ids)
+
+    if missed_ids:
+      rows = self.tbl.Select(
+          cnxn, cols=[self.item_col, self.user_col],
+          **{self.item_col: missed_ids})
+      # Ensure that every requested item_id has an entry so that even
+      # zero-star items get cached.
+      retrieved_starrers = {item_id: [] for item_id in missed_ids}
+      for item_id, starrer_id in rows:
+        retrieved_starrers[item_id].append(starrer_id)
+      starrer_list_dict.update(retrieved_starrers)
+      self.starrer_cache.CacheAll(retrieved_starrers)
+
+    return starrer_list_dict
+
+  def LookupStarredItemIDs(self, cnxn, starrer_user_id):
+    """Returns list of item IDs that were starred by the specified user."""
+    if not starrer_user_id:
+      return []  # Anon user cannot star anything.
+
+    cached_item_ids = self.star_cache.GetItem(starrer_user_id)
+    if cached_item_ids is not None:
+      return cached_item_ids
+
+    rows = self.tbl.Select(cnxn, cols=[self.item_col], user_id=starrer_user_id)
+    starred_ids = [row[0] for row in rows]
+    self.star_cache.CacheItem(starrer_user_id, starred_ids)
+    return starred_ids
+
+  def IsItemStarredBy(self, cnxn, item_id, starrer_user_id):
+    """Return True if the given issue is starred by the given user."""
+    starred_ids = self.LookupStarredItemIDs(cnxn, starrer_user_id)
+    return item_id in starred_ids
+
+  def CountItemStars(self, cnxn, item_id):
+    """Returns the number of stars on the specified item."""
+    count_dict = self.CountItemsStars(cnxn, [item_id])
+    return count_dict.get(item_id, 0)
+
+  def CountItemsStars(self, cnxn, item_ids):
+    """Get a dict {item_id: count} for the given items."""
+    item_count_dict, missed_ids = self.star_count_cache.GetAll(item_ids)
+
+    if missed_ids:
+      rows = self.tbl.Select(
+          cnxn, cols=[self.item_col, 'COUNT(%s)' % self.user_col],
+          group_by=[self.item_col],
+          **{self.item_col: missed_ids})
+      # Ensure that every requested item_id has an entry so that even
+      # zero-star items get cached.
+      retrieved_counts = {item_id: 0 for item_id in missed_ids}
+      retrieved_counts.update(rows)
+      item_count_dict.update(retrieved_counts)
+      self.star_count_cache.CacheAll(retrieved_counts)
+
+    return item_count_dict
+
+  def _SetStarsBatch(
+      self, cnxn, item_id, starrer_user_ids, starred, commit=True):
+    """Sets or unsets stars for the specified item and users."""
+    if starred:
+      rows = [(item_id, user_id) for user_id in starrer_user_ids]
+      self.tbl.InsertRows(
+          cnxn, [self.item_col, self.user_col], rows, ignore=True,
+          commit=commit)
+    else:
+      self.tbl.Delete(
+          cnxn, commit=commit,
+          **{self.item_col: item_id, self.user_col: starrer_user_ids})
+
+    self.star_cache.InvalidateKeys(cnxn, starrer_user_ids)
+    self.starrer_cache.Invalidate(cnxn, item_id)
+    self.star_count_cache.Invalidate(cnxn, item_id)
+
+  def SetStarsBatch(
+      self, cnxn, item_id, starrer_user_ids, starred, commit=True):
+    """Sets or unsets stars for the specified item and users."""
+    self._SetStarsBatch(
+        cnxn, item_id, starrer_user_ids, starred, commit=commit)
+
+  def SetStar(self, cnxn, item_id, starrer_user_id, starred):
+    """Sets or unsets a star for the specified item and user."""
+    self._SetStarsBatch(cnxn, item_id, [starrer_user_id], starred)
+
+
+
+class UserStarService(AbstractStarService):
+  """Star service for stars on users."""
+
+  def __init__(self, cache_manager):
+    tbl = sql.SQLTableManager(USERSTAR_TABLE_NAME)
+    super(UserStarService, self).__init__(
+        cache_manager, tbl, 'starred_user_id', 'user_id', 'user')
+
+
+class ProjectStarService(AbstractStarService):
+  """Star service for stars on projects."""
+
+  def __init__(self, cache_manager):
+    tbl = sql.SQLTableManager(PROJECTSTAR_TABLE_NAME)
+    super(ProjectStarService, self).__init__(
+        cache_manager, tbl, 'project_id', 'user_id', 'project')
+
+
+class HotlistStarService(AbstractStarService):
+  """Star service for stars on hotlists."""
+
+  def __init__(self, cache_manager):
+    tbl = sql.SQLTableManager(HOTLISTSTAR_TABLE_NAME)
+    super(HotlistStarService, self).__init__(
+        cache_manager, tbl, 'hotlist_id', 'user_id', 'hotlist')
+
+
+class IssueStarService(AbstractStarService):
+  """Star service for stars on issues."""
+
+  def __init__(self, cache_manager):
+    tbl = sql.SQLTableManager(ISSUESTAR_TABLE_NAME)
+    super(IssueStarService, self).__init__(
+        cache_manager, tbl, 'issue_id', 'user_id', 'issue')
+
+  # pylint: disable=arguments-differ
+  def SetStar(
+      self, cnxn, services, config, issue_id, starrer_user_id, starred):
+    """Add or remove a star on the given issue for the given user.
+
+    Args:
+      cnxn: connection to SQL database.
+      services: connections to persistence layer.
+      config: ProjectIssueConfig PB for the project containing the issue.
+      issue_id: integer global ID of an issue.
+      starrer_user_id: user ID of the user who starred the issue.
+      starred: boolean True for adding a star, False when removing one.
+    """
+    self.SetStarsBatch(
+        cnxn, services, config, issue_id, [starrer_user_id], starred)
+
+  # pylint: disable=arguments-differ
+  def SetStarsBatch(
+      self, cnxn, services, config, issue_id, starrer_user_ids, starred):
+    """Add or remove a star on the given issue for the given users.
+
+    Args:
+      cnxn: connection to SQL database.
+      services: connections to persistence layer.
+      config: ProjectIssueConfig PB for the project containing the issue.
+      issue_id: integer global ID of an issue.
+      starrer_user_id: user ID of the user who starred the issue.
+      starred: boolean True for adding a star, False when removing one.
+    """
+    logging.info(
+        'SetStarsBatch:%r, %r, %r', issue_id, starrer_user_ids, starred)
+    super(IssueStarService, self).SetStarsBatch(
+        cnxn, issue_id, starrer_user_ids, starred)
+
+    # Because we will modify issues, load from DB rather than cache.
+    issue = services.issue.GetIssue(cnxn, issue_id, use_cache=False)
+    issue.star_count = self.CountItemStars(cnxn, issue_id)
+    filterrules_helpers.ApplyFilterRules(cnxn, services, issue, config)
+    # Note: only star_count could change due to the starring, but any
+    # field could have changed as a result of filter rules.
+    services.issue.UpdateIssue(cnxn, issue)
+
+    self.star_cache.InvalidateKeys(cnxn, starrer_user_ids)
+    self.starrer_cache.Invalidate(cnxn, issue_id)
+
+  # TODO(crbug.com/monorail/8098): This method should replace SetStarsBatch.
+  # New code should be calling SetStarsBatch_SkipIssueUpdate.
+  # SetStarsBatch, does issue.star_count updating that should be done
+  # in the business logic layer instead. E.g. We can create a
+  # WorkEnv.BatchSetStars() that includes the star_count updating work.
+  def SetStarsBatch_SkipIssueUpdate(
+      self, cnxn, issue_id, starrer_user_ids, starred, commit=True):
+    # type: (MonorailConnection, int, Sequence[int], bool, Optional[bool])
+    #   -> None
+    """Add or remove a star on the given issue for the given users.
+
+    Note: unlike SetStarsBatch above, does not make any updates to the
+      the issue itself e.g. updating issue.star_count.
+
+    """
+    logging.info(
+        'SetStarsBatch:%r, %r, %r', issue_id, starrer_user_ids, starred)
+    super(IssueStarService, self).SetStarsBatch(
+        cnxn, issue_id, starrer_user_ids, starred, commit=commit)
+
+    self.star_cache.InvalidateKeys(cnxn, starrer_user_ids)
+    self.starrer_cache.Invalidate(cnxn, issue_id)
diff --git a/services/template_svc.py b/services/template_svc.py
new file mode 100644
index 0000000..edfde05
--- /dev/null
+++ b/services/template_svc.py
@@ -0,0 +1,550 @@
+# Copyright 2018 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
+
+"""The TemplateService class providing methods for template persistence."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+
+import settings
+
+from framework import exceptions
+from framework import sql
+from proto import tracker_pb2
+from services import caches
+from services import project_svc
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+TEMPLATE_COLS = [
+    'id', 'project_id', 'name', 'content', 'summary', 'summary_must_be_edited',
+    'owner_id', 'status', 'members_only', 'owner_defaults_to_member',
+    'component_required']
+TEMPLATE2LABEL_COLS = ['template_id', 'label']
+TEMPLATE2COMPONENT_COLS = ['template_id', 'component_id']
+TEMPLATE2ADMIN_COLS = ['template_id', 'admin_id']
+TEMPLATE2FIELDVALUE_COLS = [
+    'template_id', 'field_id', 'int_value', 'str_value', 'user_id',
+    'date_value', 'url_value']
+ISSUEPHASEDEF_COLS = ['id', 'name', 'rank']
+TEMPLATE2APPROVALVALUE_COLS = [
+    'approval_id', 'template_id', 'phase_id', 'status']
+
+
+TEMPLATE_TABLE_NAME = 'Template'
+TEMPLATE2LABEL_TABLE_NAME = 'Template2Label'
+TEMPLATE2ADMIN_TABLE_NAME = 'Template2Admin'
+TEMPLATE2COMPONENT_TABLE_NAME = 'Template2Component'
+TEMPLATE2FIELDVALUE_TABLE_NAME = 'Template2FieldValue'
+ISSUEPHASEDEF_TABLE_NAME = 'IssuePhaseDef'
+TEMPLATE2APPROVALVALUE_TABLE_NAME = 'Template2ApprovalValue'
+
+
+class TemplateSetTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage RAM and memcache for templates.
+
+  Holds a dictionary of {project_id: templateset} key value pairs,
+  where a templateset is a list of all templates in a project.
+  """
+
+  def __init__(self, cache_manager, template_service):
+    super(TemplateSetTwoLevelCache, self).__init__(
+        cache_manager, 'project', prefix='templateset:', pb_class=None)
+    self.template_service = template_service
+
+  def _MakeCache(self, cache_manager, kind, max_size=None):
+    """Make the RAM cache and register it with the cache_manager."""
+    return caches.RamCache(cache_manager, kind, max_size=max_size)
+
+  def FetchItems(self, cnxn, keys):
+    """On RAM and memcache miss, hit the database."""
+    template_set_dict = {}
+
+    for project_id in keys:
+      template_set_dict.setdefault(project_id, [])
+      template_rows = self.template_service.template_tbl.Select(
+          cnxn, cols=TEMPLATE_COLS, project_id=project_id,
+          order_by=[('name', [])])
+      for (template_id, _project_id, template_name, _content, _summary,
+           _summary_must_be_edited, _owner_id, _status, members_only,
+           _owner_defaults_to_member, _component_required) in template_rows:
+        template_set_row = (template_id, template_name, members_only)
+        template_set_dict[project_id].append(template_set_row)
+
+    return template_set_dict
+
+
+class TemplateDefTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage RAM and memcache for individual TemplateDef.
+
+  Holds a dictionary of {template_id: TemplateDef} key value pairs.
+  """
+  def __init__(self, cache_manager, template_service):
+    super(TemplateDefTwoLevelCache, self).__init__(
+        cache_manager,
+        'template',
+        prefix='templatedef:',
+        pb_class=tracker_pb2.TemplateDef)
+    self.template_service = template_service
+
+  def _MakeCache(self, cache_manager, kind, max_size=None):
+    """Make the RAM cache and register it with the cache_manager."""
+    return caches.RamCache(cache_manager, kind, max_size=max_size)
+
+  def FetchItems(self, cnxn, keys):
+    """On RAM and memcache miss, hit the database.
+
+    Args:
+      cnxn: A MonorailConnection.
+      keys: A list of template IDs (ints).
+
+    Returns:
+      A dict of {template_id: TemplateDef}.
+    """
+    template_dict = {}
+
+    # Fetch template rows and relations.
+    template_rows = self.template_service.template_tbl.Select(
+        cnxn, cols=TEMPLATE_COLS, id=keys,
+        order_by=[('name', [])])
+
+    template2label_rows = self.template_service.\
+        template2label_tbl.Select(
+            cnxn, cols=TEMPLATE2LABEL_COLS, template_id=keys)
+    template2component_rows = self.template_service.\
+        template2component_tbl.Select(
+            cnxn, cols=TEMPLATE2COMPONENT_COLS, template_id=keys)
+    template2admin_rows = self.template_service.template2admin_tbl.Select(
+        cnxn, cols=TEMPLATE2ADMIN_COLS, template_id=keys)
+    template2fieldvalue_rows = self.template_service.\
+        template2fieldvalue_tbl.Select(
+            cnxn, cols=TEMPLATE2FIELDVALUE_COLS, template_id=keys)
+    template2approvalvalue_rows = self.template_service.\
+        template2approvalvalue_tbl.Select(
+            cnxn, cols=TEMPLATE2APPROVALVALUE_COLS, template_id=keys)
+    phase_ids = [av_row[2] for av_row in template2approvalvalue_rows]
+    phase_rows = []
+    if phase_ids:
+      phase_rows = self.template_service.issuephasedef_tbl.Select(
+          cnxn, cols=ISSUEPHASEDEF_COLS, id=list(set(phase_ids)))
+
+    # Build TemplateDef with all related data.
+    for template_row in template_rows:
+      template = UnpackTemplate(template_row)
+      template_dict[template.template_id] = template
+
+    for template2label_row in template2label_rows:
+      template_id, label = template2label_row
+      template = template_dict.get(template_id)
+      if template:
+        template.labels.append(label)
+
+    for template2component_row in template2component_rows:
+      template_id, component_id = template2component_row
+      template = template_dict.get(template_id)
+      if template:
+        template.component_ids.append(component_id)
+
+    for template2admin_row in template2admin_rows:
+      template_id, admin_id = template2admin_row
+      template = template_dict.get(template_id)
+      if template:
+        template.admin_ids.append(admin_id)
+
+    for fv_row in template2fieldvalue_rows:
+      (template_id, field_id, int_value, str_value, user_id,
+       date_value, url_value) = fv_row
+      fv = tracker_bizobj.MakeFieldValue(
+          field_id, int_value, str_value, user_id, date_value, url_value,
+          False)
+      template = template_dict.get(template_id)
+      if template:
+        template.field_values.append(fv)
+
+    phases_by_id = {}
+    for phase_row in phase_rows:
+      (phase_id, name, rank) = phase_row
+      phase = tracker_pb2.Phase(
+          phase_id=phase_id, name=name, rank=rank)
+      phases_by_id[phase_id] = phase
+
+    # Note: there is no templateapproval2approver_tbl.
+    for av_row in template2approvalvalue_rows:
+      (approval_id, template_id, phase_id, status) = av_row
+      approval_value = tracker_pb2.ApprovalValue(
+          approval_id=approval_id, phase_id=phase_id,
+          status=tracker_pb2.ApprovalStatus(status.upper()))
+      template = template_dict.get(template_id)
+      if template:
+        template.approval_values.append(approval_value)
+        phase = phases_by_id.get(phase_id)
+        if phase and phase not in template.phases:
+          template_dict.get(template_id).phases.append(phase)
+
+    return template_dict
+
+
+class TemplateService(object):
+
+  def __init__(self, cache_manager):
+    self.template_tbl = sql.SQLTableManager(TEMPLATE_TABLE_NAME)
+    self.template2label_tbl = sql.SQLTableManager(TEMPLATE2LABEL_TABLE_NAME)
+    self.template2component_tbl = sql.SQLTableManager(
+        TEMPLATE2COMPONENT_TABLE_NAME)
+    self.template2admin_tbl = sql.SQLTableManager(TEMPLATE2ADMIN_TABLE_NAME)
+    self.template2fieldvalue_tbl = sql.SQLTableManager(
+        TEMPLATE2FIELDVALUE_TABLE_NAME)
+    self.issuephasedef_tbl = sql.SQLTableManager(
+        ISSUEPHASEDEF_TABLE_NAME)
+    self.template2approvalvalue_tbl = sql.SQLTableManager(
+        TEMPLATE2APPROVALVALUE_TABLE_NAME)
+
+    self.template_set_2lc = TemplateSetTwoLevelCache(cache_manager, self)
+    self.template_def_2lc = TemplateDefTwoLevelCache(cache_manager, self)
+
+  def CreateDefaultProjectTemplates(self, cnxn, project_id):
+    """Create the default templates for a project.
+
+    Used only when creating a new project.
+
+    Args:
+      cnxn: A MonorailConnection instance.
+      project_id: The project ID under which to create the templates.
+    """
+    for tpl in tracker_constants.DEFAULT_TEMPLATES:
+      tpl = tracker_bizobj.ConvertDictToTemplate(tpl)
+      self.CreateIssueTemplateDef(cnxn, project_id, tpl.name, tpl.content,
+          tpl.summary, tpl.summary_must_be_edited, tpl.status, tpl.members_only,
+          tpl.owner_defaults_to_member, tpl.component_required, tpl.owner_id,
+          tpl.labels, tpl.component_ids, tpl.admin_ids, tpl.field_values,
+          tpl.phases)
+
+  def GetTemplateByName(self, cnxn, template_name, project_id):
+    """Retrieves a template by name and project_id.
+
+    Args:
+      template_name (string): name of template.
+      project_id (int): ID of project template is under.
+
+    Returns:
+      A Template PB if found, otherwise None.
+    """
+    template_set = self.GetTemplateSetForProject(cnxn, project_id)
+    for tpl_id, name, _members_only in template_set:
+      if template_name == name:
+        return self.GetTemplateById(cnxn, tpl_id)
+
+  def GetTemplateById(self, cnxn, template_id):
+    """Retrieves one template.
+
+    Args:
+      template_id (int): ID of the template.
+
+    Returns:
+      A TemplateDef PB if found, otherwise None.
+    """
+    result_dict, _ = self.template_def_2lc.GetAll(cnxn, [template_id])
+    try:
+      return result_dict[template_id]
+    except KeyError:
+      return None
+
+  def GetTemplatesById(self, cnxn, template_ids):
+    """Retrieves one or more templates by ID.
+
+    Args:
+      template_id (list<int>): IDs of the templates.
+
+    Returns:
+      A list containing any found TemplateDef PBs.
+    """
+    result_dict, _ = self.template_def_2lc.GetAll(cnxn, template_ids)
+    return list(result_dict.values())
+
+  def GetTemplateSetForProject(self, cnxn, project_id):
+    """Get the TemplateSet for a project."""
+    result_dict, _ = self.template_set_2lc.GetAll(cnxn, [project_id])
+    return result_dict[project_id]
+
+  def GetProjectTemplates(self, cnxn, project_id):
+    """Gets all templates in a given project.
+
+    Args:
+      cnxn: A MonorailConnection instance.
+      project_id: All templates for this project will be returned.
+
+    Returns:
+      A list of TemplateDefs.
+    """
+    template_set = self.GetTemplateSetForProject(cnxn, project_id)
+    template_ids = [row[0] for row in template_set]
+    return self.GetTemplatesById(cnxn, template_ids)
+
+  def TemplatesWithComponent(self, cnxn, component_id):
+    """Returns all templates with the specified component.
+
+    Args:
+      cnxn: connection to SQL database.
+      component_id: int component id.
+
+    Returns:
+      A list of TemplateDefs.
+    """
+    template2component_rows = self.template2component_tbl.Select(
+        cnxn, cols=['template_id'], component_id=component_id)
+    template_ids = [r[0] for r in template2component_rows]
+    return self.GetTemplatesById(cnxn, template_ids)
+
+  def CreateIssueTemplateDef(
+      self, cnxn, project_id, name, content, summary, summary_must_be_edited,
+      status, members_only, owner_defaults_to_member, component_required,
+      owner_id=None, labels=None, component_ids=None, admin_ids=None,
+      field_values=None, phases=None, approval_values=None):
+    """Create a new issue template definition with the given info.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the current project.
+      name: name of the new issue template.
+      content: string content of the issue template.
+      summary: string summary of the issue template.
+      summary_must_be_edited: True if the summary must be edited when this
+          issue template is used to make a new issue.
+      status: string default status of a new issue created with this template.
+      members_only: True if only members can view this issue template.
+      owner_defaults_to_member: True is issue owner should be set to member
+          creating the issue.
+      component_required: True if a component is required.
+      owner_id: user_id of default owner, if any.
+      labels: list of string labels for the new issue, if any.
+      component_ids: list of component_ids, if any.
+      admin_ids: list of admin_ids, if any.
+      field_values: list of FieldValue PBs, if any.
+      phases: list of Phase PBs, if any.
+      approval_values: list of ApprovalValue PBs, if any.
+
+    Returns:
+      Integer template_id of the new issue template definition.
+    """
+    template_id = self.template_tbl.InsertRow(
+        cnxn, project_id=project_id, name=name, content=content,
+        summary=summary, summary_must_be_edited=summary_must_be_edited,
+        owner_id=owner_id, status=status, members_only=members_only,
+        owner_defaults_to_member=owner_defaults_to_member,
+        component_required=component_required, commit=False)
+
+    if labels:
+      self.template2label_tbl.InsertRows(
+          cnxn, TEMPLATE2LABEL_COLS, [(template_id, label) for label in labels],
+          commit=False)
+    if component_ids:
+      self.template2component_tbl.InsertRows(
+          cnxn, TEMPLATE2COMPONENT_COLS, [(template_id, c_id) for
+                                          c_id in component_ids], commit=False)
+    if admin_ids:
+      self.template2admin_tbl.InsertRows(
+          cnxn, TEMPLATE2ADMIN_COLS, [(template_id, admin_id) for
+                                      admin_id in admin_ids], commit=False)
+    if field_values:
+      self.template2fieldvalue_tbl.InsertRows(
+          cnxn, TEMPLATE2FIELDVALUE_COLS, [
+              (template_id, fv.field_id, fv.int_value, fv.str_value, fv.user_id,
+               fv.date_value, fv.url_value) for fv in field_values],
+          commit=False)
+
+    # current phase_ids in approval_values and phases are temporary and were
+    # assigned based on the order of the phases. These temporary phase_ids are
+    # used to keep track of which approvals belong to which phases and are
+    # updated once all phases have their real phase_ids returned from InsertRow.
+    phase_id_by_tmp = {}
+    if phases:
+      for phase in phases:
+        phase_id = self.issuephasedef_tbl.InsertRow(
+            cnxn, name=phase.name, rank=phase.rank, commit=False)
+        phase_id_by_tmp[phase.phase_id] = phase_id
+
+    if approval_values:
+      self.template2approvalvalue_tbl.InsertRows(
+          cnxn, TEMPLATE2APPROVALVALUE_COLS,
+          [(av.approval_id, template_id,
+            phase_id_by_tmp.get(av.phase_id), av.status.name.lower())
+           for av in approval_values],
+          commit=False)
+
+    cnxn.Commit()
+    self.template_set_2lc.InvalidateKeys(cnxn, [project_id])
+    return template_id
+
+  def UpdateIssueTemplateDef(
+      self, cnxn, project_id, template_id, name=None, content=None,
+      summary=None, summary_must_be_edited=None, status=None, members_only=None,
+      owner_defaults_to_member=None, component_required=None, owner_id=None,
+      labels=None, component_ids=None, admin_ids=None, field_values=None,
+      phases=None, approval_values=None):
+    """Update an existing issue template definition with the given info.
+
+    Args:
+      cnxn: connection to SQL database.
+      project_id: int ID of the current project.
+      template_id: int ID of the issue template to update.
+      name: updated name of the new issue template.
+      content: updated string content of the issue template.
+      summary: updated string summary of the issue template.
+      summary_must_be_edited: True if the summary must be edited when this
+          issue template is used to make a new issue.
+      status: updated string default status of a new issue created with this
+          template.
+      members_only: True if only members can view this issue template.
+      owner_defaults_to_member: True is issue owner should be set to member
+          creating the issue.
+      component_required: True if a component is required.
+      owner_id: updated user_id of default owner, if any.
+      labels: updated list of string labels for the new issue, if any.
+      component_ids: updated list of component_ids, if any.
+      admin_ids: updated list of admin_ids, if any.
+      field_values: updated list of FieldValue PBs, if any.
+      phases: updated list of Phase PBs, if any.
+      approval_values: updated list of ApprovalValue PBs, if any.
+    """
+    new_values = {}
+    if name is not None:
+      new_values['name'] = name
+    if content is not None:
+      new_values['content'] = content
+    if summary is not None:
+      new_values['summary'] = summary
+    if summary_must_be_edited is not None:
+      new_values['summary_must_be_edited'] = bool(summary_must_be_edited)
+    if status is not None:
+      new_values['status'] = status
+    if members_only is not None:
+      new_values['members_only'] = bool(members_only)
+    if owner_defaults_to_member is not None:
+      new_values['owner_defaults_to_member'] = bool(owner_defaults_to_member)
+    if component_required is not None:
+      new_values['component_required'] = bool(component_required)
+    if owner_id is not None:
+      new_values['owner_id'] = owner_id
+
+    self.template_tbl.Update(cnxn, new_values, id=template_id, commit=False)
+
+    if labels is not None:
+      self.template2label_tbl.Delete(
+          cnxn, template_id=template_id, commit=False)
+      self.template2label_tbl.InsertRows(
+          cnxn, TEMPLATE2LABEL_COLS, [(template_id, label) for label in labels],
+          commit=False)
+    if component_ids is not None:
+      self.template2component_tbl.Delete(
+          cnxn, template_id=template_id, commit=False)
+      self.template2component_tbl.InsertRows(
+          cnxn, TEMPLATE2COMPONENT_COLS, [(template_id, c_id) for
+                                          c_id in component_ids],
+          commit=False)
+    if admin_ids is not None:
+      self.template2admin_tbl.Delete(
+          cnxn, template_id=template_id, commit=False)
+      self.template2admin_tbl.InsertRows(
+          cnxn, TEMPLATE2ADMIN_COLS, [(template_id, admin_id) for
+                                      admin_id in admin_ids],
+          commit=False)
+    if field_values is not None:
+      self.template2fieldvalue_tbl.Delete(
+          cnxn, template_id=template_id, commit=False)
+      self.template2fieldvalue_tbl.InsertRows(
+          cnxn, TEMPLATE2FIELDVALUE_COLS, [
+              (template_id, fv.field_id, fv.int_value, fv.str_value, fv.user_id,
+               fv.date_value, fv.url_value) for fv in field_values],
+          commit=False)
+
+    # we need to keep track of tmp phase_ids created at the servlet.
+    phase_id_by_tmp = {}
+    if phases is not None:
+      self.template2approvalvalue_tbl.Delete(
+          cnxn, template_id=template_id, commit=False)
+      for phase in phases:
+        phase_id = self.issuephasedef_tbl.InsertRow(
+            cnxn, name=phase.name, rank=phase.rank, commit=False)
+        phase_id_by_tmp[phase.phase_id] = phase_id
+
+      self.template2approvalvalue_tbl.InsertRows(
+          cnxn, TEMPLATE2APPROVALVALUE_COLS,
+          [(av.approval_id, template_id,
+            phase_id_by_tmp.get(av.phase_id), av.status.name.lower())
+           for av in approval_values], commit=False)
+
+    cnxn.Commit()
+    self.template_set_2lc.InvalidateKeys(cnxn, [project_id])
+    self.template_def_2lc.InvalidateKeys(cnxn, [template_id])
+
+  def DeleteIssueTemplateDef(self, cnxn, project_id, template_id):
+    """Delete the specified issue template definition."""
+    self.template2label_tbl.Delete(cnxn, template_id=template_id, commit=False)
+    self.template2component_tbl.Delete(
+        cnxn, template_id=template_id, commit=False)
+    self.template2admin_tbl.Delete(cnxn, template_id=template_id, commit=False)
+    self.template2fieldvalue_tbl.Delete(
+        cnxn, template_id=template_id, commit=False)
+    self.template2approvalvalue_tbl.Delete(
+        cnxn, template_id=template_id, commit=False)
+    # We do not delete issuephasedef rows becuase these rows will be used by
+    # issues that were created with this template. template2approvalvalue rows
+    # can be deleted because those rows are copied over to issue2approvalvalue
+    # during issue creation.
+    self.template_tbl.Delete(cnxn, id=template_id, commit=False)
+
+    cnxn.Commit()
+    self.template_set_2lc.InvalidateKeys(cnxn, [project_id])
+    self.template_def_2lc.InvalidateKeys(cnxn, [template_id])
+
+  def ExpungeProjectTemplates(self, cnxn, project_id):
+    template_id_rows = self.template_tbl.Select(
+        cnxn, cols=['id'], project_id=project_id)
+    template_ids = [row[0] for row in template_id_rows]
+    self.template2label_tbl.Delete(cnxn, template_id=template_ids)
+    self.template2component_tbl.Delete(cnxn, template_id=template_ids)
+    # TODO(3816): Delete all other relations here.
+    self.template_tbl.Delete(cnxn, project_id=project_id)
+
+  def ExpungeUsersInTemplates(self, cnxn, user_ids, limit=None):
+    """Wipes a user from the templates system.
+
+      This method will not commit the operation. This method will
+      not make changes to in-memory data.
+    """
+    self.template2admin_tbl.Delete(
+        cnxn, admin_id=user_ids, commit=False, limit=limit)
+    self.template2fieldvalue_tbl.Delete(
+        cnxn, user_id=user_ids, commit=False, limit=limit)
+    # template_tbl's owner_id does not reference User. All appropriate rows
+    # should be deleted before rows can be safely deleted from User. No limit
+    # will be applied.
+    self.template_tbl.Update(
+        cnxn, {'owner_id': None}, owner_id=user_ids, commit=False)
+
+
+def UnpackTemplate(template_row):
+  """Partially construct a template object using info from a DB row."""
+  (template_id, _project_id, name, content, summary,
+   summary_must_be_edited, owner_id, status,
+   members_only, owner_defaults_to_member, component_required) = template_row
+  template = tracker_pb2.TemplateDef()
+  template.template_id = template_id
+  template.name = name
+  template.content = content
+  template.summary = summary
+  template.summary_must_be_edited = bool(
+      summary_must_be_edited)
+  template.owner_id = owner_id or 0
+  template.status = status
+  template.members_only = bool(members_only)
+  template.owner_defaults_to_member = bool(owner_defaults_to_member)
+  template.component_required = bool(component_required)
+
+  return template
diff --git a/services/test/__init__.py b/services/test/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/services/test/__init__.py
diff --git a/services/test/api_pb2_v1_helpers_test.py b/services/test/api_pb2_v1_helpers_test.py
new file mode 100644
index 0000000..460f5c3
--- /dev/null
+++ b/services/test/api_pb2_v1_helpers_test.py
@@ -0,0 +1,786 @@
+# 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
+
+"""Tests for the API v1 helpers."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import datetime
+import mock
+import unittest
+
+from framework import framework_constants
+from framework import permissions
+from framework import profiler
+from services import api_pb2_v1_helpers
+from services import service_manager
+from proto import api_pb2_v1
+from proto import project_pb2
+from proto import tracker_pb2
+from proto import usergroup_pb2
+from testing import fake
+from tracker import tracker_bizobj
+
+
+def MakeTemplate(prefix):
+  return tracker_pb2.TemplateDef(
+      name='%s-template' % prefix,
+      content='%s-content' % prefix,
+      summary='%s-summary' % prefix,
+      summary_must_be_edited=True,
+      status='New',
+      labels=['%s-label1' % prefix, '%s-label2' % prefix],
+      members_only=True,
+      owner_defaults_to_member=True,
+      component_required=True,
+  )
+
+
+def MakeLabel(prefix):
+  return tracker_pb2.LabelDef(
+      label='%s-label' % prefix,
+      label_docstring='%s-description' % prefix
+  )
+
+
+def MakeStatus(prefix):
+  return tracker_pb2.StatusDef(
+      status='%s-New' % prefix,
+      means_open=True,
+      status_docstring='%s-status' % prefix
+  )
+
+
+def MakeProjectIssueConfig(prefix):
+  return tracker_pb2.ProjectIssueConfig(
+      restrict_to_known=True,
+      default_col_spec='ID Type Priority Summary',
+      default_sort_spec='ID Priority',
+      well_known_statuses=[
+          MakeStatus('%s-status1' % prefix),
+          MakeStatus('%s-status2' % prefix),
+      ],
+      well_known_labels=[
+          MakeLabel('%s-label1' % prefix),
+          MakeLabel('%s-label2' % prefix),
+      ],
+      default_template_for_developers=1,
+      default_template_for_users=2
+  )
+
+
+def MakeProject(prefix):
+  return project_pb2.MakeProject(
+      project_name='%s-project' % prefix,
+      summary='%s-summary' % prefix,
+      description='%s-description' % prefix,
+  )
+
+
+class ApiV1HelpersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue_star=fake.IssueStarService())
+    self.services.user.TestAddUser('user@example.com', 111)
+    self.person_1 = api_pb2_v1_helpers.convert_person(111, None, self.services)
+
+  def testConvertTemplate(self):
+    """Test convert_template."""
+    template = MakeTemplate('test')
+    prompt = api_pb2_v1_helpers.convert_template(template)
+    self.assertEqual(template.name, prompt.name)
+    self.assertEqual(template.summary, prompt.title)
+    self.assertEqual(template.content, prompt.description)
+    self.assertEqual(template.summary_must_be_edited, prompt.titleMustBeEdited)
+    self.assertEqual(template.status, prompt.status)
+    self.assertEqual(template.labels, prompt.labels)
+    self.assertEqual(template.members_only, prompt.membersOnly)
+    self.assertEqual(template.owner_defaults_to_member, prompt.defaultToMember)
+    self.assertEqual(template.component_required, prompt.componentRequired)
+
+  def testConvertLabel(self):
+    """Test convert_label."""
+    labeldef = MakeLabel('test')
+    label = api_pb2_v1_helpers.convert_label(labeldef)
+    self.assertEqual(labeldef.label, label.label)
+    self.assertEqual(labeldef.label_docstring, label.description)
+
+  def testConvertStatus(self):
+    """Test convert_status."""
+    statusdef = MakeStatus('test')
+    status = api_pb2_v1_helpers.convert_status(statusdef)
+    self.assertEqual(statusdef.status, status.status)
+    self.assertEqual(statusdef.means_open, status.meansOpen)
+    self.assertEqual(statusdef.status_docstring, status.description)
+
+  def testConvertProjectIssueConfig(self):
+    """Test convert_project_config."""
+    prefix = 'test'
+    config = MakeProjectIssueConfig(prefix)
+    templates = [
+        MakeTemplate('%s-template1' % prefix),
+        MakeTemplate('%s-template2' % prefix),
+    ]
+    config_api = api_pb2_v1_helpers.convert_project_config(config, templates)
+    self.assertEqual(config.restrict_to_known, config_api.restrictToKnown)
+    self.assertEqual(config.default_col_spec.split(), config_api.defaultColumns)
+    self.assertEqual(
+        config.default_sort_spec.split(), config_api.defaultSorting)
+    self.assertEqual(2, len(config_api.statuses))
+    self.assertEqual(2, len(config_api.labels))
+    self.assertEqual(2, len(config_api.prompts))
+    self.assertEqual(
+        config.default_template_for_developers,
+        config_api.defaultPromptForMembers)
+    self.assertEqual(
+        config.default_template_for_users,
+        config_api.defaultPromptForNonMembers)
+
+  def testConvertProject(self):
+    """Test convert_project."""
+    project = MakeProject('testprj')
+    prefix = 'testconfig'
+    config = MakeProjectIssueConfig(prefix)
+    role = api_pb2_v1.Role.owner
+    templates = [
+        MakeTemplate('%s-template1' % prefix),
+        MakeTemplate('%s-template2' % prefix),
+    ]
+    project_api = api_pb2_v1_helpers.convert_project(project, config, role,
+        templates)
+    self.assertEqual(project.project_name, project_api.name)
+    self.assertEqual(project.project_name, project_api.externalId)
+    self.assertEqual('/p/%s/' % project.project_name, project_api.htmlLink)
+    self.assertEqual(project.summary, project_api.summary)
+    self.assertEqual(project.description, project_api.description)
+    self.assertEqual(role, project_api.role)
+    self.assertIsInstance(
+        project_api.issuesConfig, api_pb2_v1.ProjectIssueConfig)
+
+  def testConvertPerson(self):
+    """Test convert_person."""
+    result = api_pb2_v1_helpers.convert_person(111, None, self.services)
+    self.assertIsInstance(result, api_pb2_v1.AtomPerson)
+    self.assertEqual('user@example.com', result.name)
+
+    none_user = api_pb2_v1_helpers.convert_person(None, '', self.services)
+    self.assertIsNone(none_user)
+
+    deleted_user = api_pb2_v1_helpers.convert_person(
+        framework_constants.DELETED_USER_ID, '', self.services)
+    self.assertEqual(
+        deleted_user,
+        api_pb2_v1.AtomPerson(
+            kind='monorail#issuePerson',
+            name=framework_constants.DELETED_USER_NAME))
+
+  def testConvertIssueIDs(self):
+    """Test convert_issue_ids."""
+    issue1 = fake.MakeTestIssue(789, 1, 'one', 'New', 111)
+    self.services.issue.TestAddIssue(issue1)
+    issue_ids = [100001]
+    mar = mock.Mock()
+    mar.cnxn = None
+    mar.project_name = 'test-project'
+    result = api_pb2_v1_helpers.convert_issue_ids(issue_ids, mar, self.services)
+    self.assertEqual(1, len(result))
+    self.assertEqual(1, result[0].issueId)
+
+  def testConvertIssueRef(self):
+    """Test convert_issueref_pbs."""
+    issue1 = fake.MakeTestIssue(12345, 1, 'one', 'New', 111)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[2],
+        project_id=12345)
+    mar = mock.Mock()
+    mar.cnxn = None
+    mar.project_name = 'test-project'
+    mar.project_id = 12345
+    ir = api_pb2_v1.IssueRef(
+        issueId=1,
+        projectId='test-project'
+    )
+    result = api_pb2_v1_helpers.convert_issueref_pbs([ir], mar, self.services)
+    self.assertEqual(1, len(result))
+    self.assertEqual(100001, result[0])
+
+  def testConvertIssue(self):
+    """Convert an internal Issue PB to an IssueWrapper API PB."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[2], project_id=12345)
+    self.services.user.TestAddUser('user@example.com', 111)
+
+    mar = mock.Mock()
+    mar.cnxn = None
+    mar.project_name = 'test-project'
+    mar.project_id = 12345
+    mar.auth.effective_ids = {111}
+    mar.perms = permissions.READ_ONLY_PERMISSIONSET
+    mar.profiler = profiler.Profiler()
+    mar.config = tracker_bizobj.MakeDefaultProjectIssueConfig(12345)
+    mar.config.field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            1, 12345, 'EstDays', tracker_pb2.FieldTypes.INT_TYPE, None, None,
+            False, False, False, None, None, None, False, None, None, None,
+            None, 'doc', False, approval_id=2),
+        tracker_bizobj.MakeFieldDef(
+            2, 12345, 'DesignReview', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+            None, None, False, False, False, None, None, None, False, None,
+            None, None, None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            3, 12345, 'StringField', tracker_pb2.FieldTypes.STR_TYPE, None,
+            None, False, False, False, None, None, None, False, None, None,
+            None, None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            4, 12345, 'DressReview', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+            None, None, False, False, False, None, None, None, False, None,
+            None, None, None, 'doc', False),
+        ]
+    self.services.config.StoreConfig(mar.cnxn, mar.config)
+
+    now = 1472067725
+    now_dt = datetime.datetime.fromtimestamp(now)
+
+    fvs = [
+      tracker_bizobj.MakeFieldValue(
+          1, 4, None, None, None, None, False, phase_id=4),
+      tracker_bizobj.MakeFieldValue(
+          3, None, 'string', None, None, None, False, phase_id=4),
+      # missing phase
+      tracker_bizobj.MakeFieldValue(
+          3, None, u'\xe2\x9d\xa4\xef\xb8\x8f', None, None, None, False,
+          phase_id=2),
+    ]
+    phases = [
+        tracker_pb2.Phase(phase_id=3, name="JustAPhase", rank=4),
+        tracker_pb2.Phase(phase_id=4, name="NotAPhase", rank=9)
+        ]
+    approval_values = [
+        tracker_pb2.ApprovalValue(
+            approval_id=2, phase_id=3, approver_ids=[111]),
+        tracker_pb2.ApprovalValue(approval_id=4, approver_ids=[111])
+    ]
+    issue = fake.MakeTestIssue(
+        12345, 1, 'one', 'New', 111, field_values=fvs,
+        approval_values=approval_values, phases=phases)
+    issue.opened_timestamp = now
+    issue.owner_modified_timestamp = now
+    issue.status_modified_timestamp = now
+    issue.component_modified_timestamp = now
+    # TODO(jrobbins): set up a lot more fields.
+
+    for cls in [api_pb2_v1.IssueWrapper, api_pb2_v1.IssuesGetInsertResponse]:
+      result = api_pb2_v1_helpers.convert_issue(cls, issue, mar, self.services)
+      self.assertEqual(1, result.id)
+      self.assertEqual('one', result.title)
+      self.assertEqual('one', result.summary)
+      self.assertEqual(now_dt, result.published)
+      self.assertEqual(now_dt, result.owner_modified)
+      self.assertEqual(now_dt, result.status_modified)
+      self.assertEqual(now_dt, result.component_modified)
+      self.assertEqual(
+          result.fieldValues, [
+              api_pb2_v1.FieldValue(
+                  fieldName='EstDays',
+                  fieldValue='4',
+                  approvalName='DesignReview',
+                  derived=False),
+              api_pb2_v1.FieldValue(
+                  fieldName='StringField',
+                  fieldValue='string',
+                  phaseName="NotAPhase",
+                  derived=False),
+              api_pb2_v1.FieldValue(
+                  fieldName='StringField',
+                  fieldValue=u'\xe2\x9d\xa4\xef\xb8\x8f',
+                  derived=False),
+          ])
+      self.assertEqual(
+          result.approvalValues,
+          [api_pb2_v1.Approval(
+            approvalName="DesignReview",
+            approvers=[self.person_1],
+            status=api_pb2_v1.ApprovalStatus.notSet,
+            phaseName="JustAPhase",
+          ),
+           api_pb2_v1.Approval(
+               approvalName="DressReview",
+               approvers=[self.person_1],
+               status=api_pb2_v1.ApprovalStatus.notSet,
+           )]
+      )
+      self.assertEqual(
+          result.phases,
+          [api_pb2_v1.Phase(phaseName="JustAPhase", rank=4),
+           api_pb2_v1.Phase(phaseName="NotAPhase", rank=9)
+          ])
+
+      # TODO(jrobbins): check a lot more fields.
+
+  def testConvertAttachment(self):
+    """Test convert_attachment."""
+
+    attachment = tracker_pb2.Attachment(
+        attachment_id=1,
+        filename='stats.txt',
+        filesize=12345,
+        mimetype='text/plain',
+        deleted=False)
+
+    result = api_pb2_v1_helpers.convert_attachment(attachment)
+    self.assertEqual(attachment.attachment_id, result.attachmentId)
+    self.assertEqual(attachment.filename, result.fileName)
+    self.assertEqual(attachment.filesize, result.fileSize)
+    self.assertEqual(attachment.mimetype, result.mimetype)
+    self.assertEqual(attachment.deleted, result.isDeleted)
+
+  def testConvertAmendments(self):
+    """Test convert_amendments."""
+    self.services.user.TestAddUser('user2@example.com', 222)
+    mar = mock.Mock()
+    mar.cnxn = None
+    issue = mock.Mock()
+    issue.project_name = 'test-project'
+
+    amendment_summary = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.SUMMARY,
+        newvalue='new summary')
+    amendment_status = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.STATUS,
+        newvalue='new status')
+    amendment_owner = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.OWNER,
+        added_user_ids=[111])
+    amendment_labels = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.LABELS,
+        newvalue='label1 -label2')
+    amendment_cc_add = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.CC,
+        added_user_ids=[111])
+    amendment_cc_remove = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.CC,
+        removed_user_ids=[222])
+    amendment_blockedon = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.BLOCKEDON,
+        newvalue='1')
+    amendment_blocking = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.BLOCKING,
+        newvalue='other:2 -3')
+    amendment_mergedinto = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.MERGEDINTO,
+        newvalue='4')
+    amendments = [
+        amendment_summary, amendment_status, amendment_owner,
+        amendment_labels, amendment_cc_add, amendment_cc_remove,
+        amendment_blockedon, amendment_blocking, amendment_mergedinto]
+
+    result = api_pb2_v1_helpers.convert_amendments(
+        issue, amendments, mar, self.services)
+    self.assertEqual(amendment_summary.newvalue, result.summary)
+    self.assertEqual(amendment_status.newvalue, result.status)
+    self.assertEqual('user@example.com', result.owner)
+    self.assertEqual(['label1', '-label2'], result.labels)
+    self.assertEqual(['user@example.com', '-user2@example.com'], result.cc)
+    self.assertEqual(['test-project:1'], result.blockedOn)
+    self.assertEqual(['other:2', '-test-project:3'], result.blocking)
+    self.assertEqual(amendment_mergedinto.newvalue, result.mergedInto)
+
+  def testConvertApprovalAmendments(self):
+    """Test convert_approval_comment."""
+    self.services.user.TestAddUser('user1@example.com', 111)
+    self.services.user.TestAddUser('user2@example.com', 222)
+    self.services.user.TestAddUser('user3@example.com', 333)
+    mar = mock.Mock()
+    mar.cnxn = None
+    amendment_status = tracker_bizobj.MakeApprovalStatusAmendment(
+        tracker_pb2.ApprovalStatus.APPROVED)
+    amendment_approvers = tracker_bizobj.MakeApprovalApproversAmendment(
+        [111, 222], [333])
+    amendments = [amendment_status, amendment_approvers]
+    result = api_pb2_v1_helpers.convert_approval_amendments(
+        amendments, mar, self.services)
+    self.assertEqual(amendment_status.newvalue, result.status)
+    self.assertEqual(
+        ['user1@example.com', 'user2@example.com', '-user3@example.com'],
+        result.approvers)
+
+  def testConvertComment(self):
+    """Test convert_comment."""
+    mar = mock.Mock()
+    mar.cnxn = None
+    mar.perms = permissions.PermissionSet([])
+    issue = fake.MakeTestIssue(project_id=12345, local_id=1, summary='sum',
+                               status='New', owner_id=1001)
+
+    comment = tracker_pb2.IssueComment(
+        user_id=111,
+        content='test content',
+        sequence=1,
+        deleted_by=111,
+        timestamp=1437700000,
+    )
+    result = api_pb2_v1_helpers.convert_comment(
+        issue, comment, mar, self.services, None)
+    self.assertEqual('user@example.com', result.author.name)
+    self.assertEqual(comment.content, result.content)
+    self.assertEqual('user@example.com', result.deletedBy.name)
+    self.assertEqual(1, result.id)
+    # Ensure that the published timestamp falls in a timestamp range to account
+    # for the test being run in different timezones.
+    # Using "Fri, 23 Jul 2015 00:00:00" and "Fri, 25 Jul 2015 00:00:00".
+    self.assertTrue(
+        datetime.datetime(2015, 7, 23, 0, 0, 0) <= result.published <=
+        datetime.datetime(2015, 7, 25, 0, 0, 0))
+    self.assertEqual(result.kind, 'monorail#issueComment')
+
+  def testConvertApprovalComment(self):
+    """Test convert_approval_comment."""
+    mar = mock.Mock()
+    mar.cnxn = None
+    mar.perms = permissions.PermissionSet([])
+    issue = fake.MakeTestIssue(project_id=12345, local_id=1, summary='sum',
+                               status='New', owner_id=1001)
+    comment = tracker_pb2.IssueComment(
+        user_id=111,
+        content='test content',
+        sequence=1,
+        deleted_by=111,
+        timestamp=1437700000,
+    )
+    result = api_pb2_v1_helpers.convert_approval_comment(
+        issue, comment, mar, self.services, None)
+    self.assertEqual('user@example.com', result.author.name)
+    self.assertEqual(comment.content, result.content)
+    self.assertEqual('user@example.com', result.deletedBy.name)
+    self.assertEqual(1, result.id)
+    # Ensure that the published timestamp falls in a timestamp range to account
+    # for the test being run in different timezones.
+    # Using "Fri, 23 Jul 2015 00:00:00" and "Fri, 25 Jul 2015 00:00:00".
+    self.assertTrue(
+        datetime.datetime(2015, 7, 23, 0, 0, 0) <= result.published <=
+        datetime.datetime(2015, 7, 25, 0, 0, 0))
+    self.assertEqual(result.kind, 'monorail#approvalComment')
+
+
+  def testGetUserEmail(self):
+    email = api_pb2_v1_helpers._get_user_email(self.services.user, '', 111)
+    self.assertEqual('user@example.com', email)
+
+    no_user_found = api_pb2_v1_helpers._get_user_email(
+        self.services.user, '', 222)
+    self.assertEqual(framework_constants.USER_NOT_FOUND_NAME, no_user_found)
+
+    deleted = api_pb2_v1_helpers._get_user_email(
+        self.services.user, '', framework_constants.DELETED_USER_ID)
+    self.assertEqual(framework_constants.DELETED_USER_NAME, deleted)
+
+    none_user_id = api_pb2_v1_helpers._get_user_email(
+        self.services.user, '', None)
+    self.assertEqual(framework_constants.NO_USER_NAME, none_user_id)
+
+  def testSplitRemoveAdd(self):
+    """Test split_remove_add."""
+
+    items = ['1', '-2', '-3', '4']
+    list_to_add, list_to_remove = api_pb2_v1_helpers.split_remove_add(items)
+
+    self.assertEqual(['1', '4'], list_to_add)
+    self.assertEqual(['2', '3'], list_to_remove)
+
+  def testIssueGlobalIDs(self):
+    """Test issue_global_ids."""
+    issue1 = fake.MakeTestIssue(12345, 1, 'one', 'New', 111)
+    self.services.issue.TestAddIssue(issue1)
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[2],
+        project_id=12345)
+    mar = mock.Mock()
+    mar.cnxn = None
+    mar.project_name = 'test-project'
+    mar.project_id = 12345
+    pairs = ['test-project:1']
+    result = api_pb2_v1_helpers.issue_global_ids(
+        pairs, 12345, mar, self.services)
+    self.assertEqual(100001, result[0])
+
+  def testConvertGroupSettings(self):
+    """Test convert_group_settings."""
+
+    setting = usergroup_pb2.MakeSettings('owners', 'mdb', 0)
+    result = api_pb2_v1_helpers.convert_group_settings('test-group', setting)
+    self.assertEqual('test-group', result.groupName)
+    self.assertEqual(setting.who_can_view_members, result.who_can_view_members)
+    self.assertEqual(setting.ext_group_type, result.ext_group_type)
+    self.assertEqual(setting.last_sync_time, result.last_sync_time)
+
+  def testConvertComponentDef(self):
+    pass  # TODO(jrobbins): Fill in this test.
+
+  def testConvertComponentIDs(self):
+    pass  # TODO(jrobbins): Fill in this test.
+
+  def testConvertFieldValues_Empty(self):
+    """The client's request might not have any field edits."""
+    mar = mock.Mock()
+    mar.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+
+    field_values = []
+    actual = api_pb2_v1_helpers.convert_field_values(
+        field_values, mar, self.services)
+    (fv_list_add, fv_list_remove, fv_list_clear,
+     label_list_add, label_list_remove) = actual
+    self.assertEqual([], fv_list_add)
+    self.assertEqual([], fv_list_remove)
+    self.assertEqual([], fv_list_clear)
+    self.assertEqual([], label_list_add)
+    self.assertEqual([], label_list_remove)
+
+  def testConvertFieldValues_Normal(self):
+    """The client wants to edit a custom field."""
+    mar = mock.Mock()
+    mar.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    mar.config.field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            1, 789, 'Priority', tracker_pb2.FieldTypes.ENUM_TYPE, None, None,
+            False, False, False, None, None, None, False, None, None, None,
+            None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            2, 789, 'EstDays', tracker_pb2.FieldTypes.INT_TYPE, None, None,
+            False, False, False, 0, 99, None, False, None, None, None,
+            None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            3, 789, 'Nickname', tracker_pb2.FieldTypes.STR_TYPE, None, None,
+            False, False, False, None, None, None, False, None, None, None,
+            None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            4, 789, 'Verifier', tracker_pb2.FieldTypes.USER_TYPE, None, None,
+            False, False, False, None, None, None, False, None, None, None,
+            None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            5, 789, 'Deadline', tracker_pb2.FieldTypes.DATE_TYPE, None, None,
+            False, False, False, None, None, None, False, None, None, None,
+            None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            6, 789, 'Homepage', tracker_pb2.FieldTypes.URL_TYPE, None, None,
+            False, False, False, None, None, None, False, None, None, None,
+            None, 'doc', False),
+        ]
+    field_values = [
+        api_pb2_v1.FieldValue(fieldName='Priority', fieldValue='High'),
+        api_pb2_v1.FieldValue(fieldName='EstDays', fieldValue='4'),
+        api_pb2_v1.FieldValue(fieldName='Nickname', fieldValue='Scout'),
+        api_pb2_v1.FieldValue(
+            fieldName='Verifier', fieldValue='user@example.com'),
+        api_pb2_v1.FieldValue(fieldName='Deadline', fieldValue='2017-12-06'),
+        api_pb2_v1.FieldValue(
+            fieldName='Homepage', fieldValue='http://example.com'),
+        ]
+    actual = api_pb2_v1_helpers.convert_field_values(
+        field_values, mar, self.services)
+    (fv_list_add, fv_list_remove, fv_list_clear,
+     label_list_add, label_list_remove) = actual
+    self.assertEqual(
+        [
+            tracker_bizobj.MakeFieldValue(2, 4, None, None, None, None, False),
+            tracker_bizobj.MakeFieldValue(
+                3, None, 'Scout', None, None, None, False),
+            tracker_bizobj.MakeFieldValue(
+                4, None, None, 111, None, None, False),
+            tracker_bizobj.MakeFieldValue(
+                5, None, None, None, 1512518400, None, False),
+            tracker_bizobj.MakeFieldValue(
+                6, None, None, None, None, 'http://example.com', False),
+        ], fv_list_add)
+    self.assertEqual([], fv_list_remove)
+    self.assertEqual([], fv_list_clear)
+    self.assertEqual(['Priority-High'], label_list_add)
+    self.assertEqual([], label_list_remove)
+
+  def testConvertFieldValues_ClearAndRemove(self):
+    """The client wants to clear and remove some custom fields."""
+    mar = mock.Mock()
+    mar.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    mar.config.field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            1, 789, 'Priority', tracker_pb2.FieldTypes.ENUM_TYPE, None, None,
+            False, False, False, None, None, None, False, None, None, None,
+            None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            11, 789, 'OS', tracker_pb2.FieldTypes.ENUM_TYPE, None, None,
+            False, False, False, None, None, None, False, None, None, None,
+            None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            2, 789, 'EstDays', tracker_pb2.FieldTypes.INT_TYPE, None, None,
+            False, False, False, 0, 99, None, False, None, None, None,
+            None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            3, 789, 'Nickname', tracker_pb2.FieldTypes.STR_TYPE, None, None,
+            False, False, False, None, None, None, False, None, None, None,
+            None, 'doc', False),
+        ]
+    field_values = [
+        api_pb2_v1.FieldValue(
+            fieldName='Priority', fieldValue='High',
+            operator=api_pb2_v1.FieldValueOperator.remove),
+        api_pb2_v1.FieldValue(
+            fieldName='OS', operator=api_pb2_v1.FieldValueOperator.clear),
+        api_pb2_v1.FieldValue(
+            fieldName='EstDays', operator=api_pb2_v1.FieldValueOperator.clear),
+        api_pb2_v1.FieldValue(
+            fieldName='Nickname', fieldValue='Scout',
+            operator=api_pb2_v1.FieldValueOperator.remove),
+        ]
+    actual = api_pb2_v1_helpers.convert_field_values(
+        field_values, mar, self.services)
+    (fv_list_add, fv_list_remove, fv_list_clear,
+     label_list_add, label_list_remove) = actual
+    self.assertEqual([], fv_list_add)
+    self.assertEqual(
+        [
+            tracker_bizobj.MakeFieldValue(
+                3, None, 'Scout', None, None, None, False)
+        ], fv_list_remove)
+    self.assertEqual([11, 2], fv_list_clear)
+    self.assertEqual([], label_list_add)
+    self.assertEqual(['Priority-High'], label_list_remove)
+
+  def testConvertFieldValues_Errors(self):
+    """We don't crash on bad requests."""
+    mar = mock.Mock()
+    mar.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    mar.config.field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            2, 789, 'EstDays', tracker_pb2.FieldTypes.INT_TYPE, None, None,
+            False, False, False, 0, 99, None, False, None, None, None,
+            None, 'doc', False),
+        ]
+    field_values = [
+        api_pb2_v1.FieldValue(
+            fieldName='Unknown', operator=api_pb2_v1.FieldValueOperator.clear),
+        ]
+    actual = api_pb2_v1_helpers.convert_field_values(
+        field_values, mar, self.services)
+    (fv_list_add, fv_list_remove, fv_list_clear,
+     label_list_add, label_list_remove) = actual
+    self.assertEqual([], fv_list_add)
+    self.assertEqual([], fv_list_remove)
+    self.assertEqual([], fv_list_clear)
+    self.assertEqual([], label_list_add)
+    self.assertEqual([], label_list_remove)
+
+  def testConvertApprovals(self):
+    """Test we can convert ApprovalValues."""
+    cnxn = None
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.field_defs = [
+      tracker_bizobj.MakeFieldDef(
+            1, 789, 'DesignReview', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+            None, False, False, False, None, None, None, False, None, None,
+            None, None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            2, 789, 'PrivacyReview', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+            None, False, False, False, 0, 99, None, False, None, None, None,
+            None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            5, 789, 'UXReview', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+            None, False, False, False, None, None, None, False, None, None,
+            None, None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            6, 789, 'Homepage', tracker_pb2.FieldTypes.URL_TYPE, None, None,
+            False, False, False, None, None, None, False, None, None, None,
+            None, 'doc', False),
+        ]
+    phases = [
+        tracker_pb2.Phase(phase_id=1),
+        tracker_pb2.Phase(phase_id=2, name="JustAPhase", rank=3),
+    ]
+    ts = 1536260059
+    expected = [
+        api_pb2_v1.Approval(
+            approvalName="DesignReview",
+            approvers=[self.person_1],
+            setter=self.person_1,
+            status=api_pb2_v1.ApprovalStatus.needsReview,
+            setOn=datetime.datetime.fromtimestamp(ts),
+        ),
+        api_pb2_v1.Approval(
+            approvalName="UXReview",
+            approvers=[self.person_1],
+            status=api_pb2_v1.ApprovalStatus.notSet,
+            phaseName="JustAPhase",
+        ),
+    ]
+    avs = [
+        tracker_pb2.ApprovalValue(
+            approval_id=1, approver_ids=[111], setter_id=111,
+            status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW, set_on=ts),
+        tracker_pb2.ApprovalValue(
+            approval_id=5, approver_ids=[111], phase_id=2)
+    ]
+    actual = api_pb2_v1_helpers.convert_approvals(
+        cnxn, avs, self.services, config, phases)
+
+    self.assertEqual(actual, expected)
+
+  def testConvertApprovals_errors(self):
+    """we dont crash on bad requests."""
+    cnxn = None
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            1, 789, 'DesignReview', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+            None, False, False, False, None, None, None, False, None, None,
+            None, None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            5, 789, 'UXReview', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+            None, False, False, False, None, None, None, False, None, None,
+            None, None, 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            3, 789, 'DesignDoc', tracker_pb2.FieldTypes.URL_TYPE, None, None,
+            False, False, False, 0, 99, None, False, None, None, None,
+            None, 'doc', False),
+    ]
+    phases = []
+    avs = [
+        tracker_pb2.ApprovalValue(approval_id=1, approver_ids=[111]),
+        # phase does not exist
+        tracker_pb2.ApprovalValue(approval_id=2, phase_id=2),
+        tracker_pb2.ApprovalValue(approval_id=3),  # field 3 is not an approval
+        tracker_pb2.ApprovalValue(approval_id=4),  # field 4 does not exist
+    ]
+    expected = [
+        api_pb2_v1.Approval(
+            approvalName="DesignReview",
+            approvers=[self.person_1],
+            status=api_pb2_v1.ApprovalStatus.notSet)
+    ]
+
+    actual = api_pb2_v1_helpers.convert_approvals(
+        cnxn, avs, self.services, config, phases)
+    self.assertEqual(actual, expected)
+
+  def testConvertPhases(self):
+    """We can convert Phases."""
+    phases = [
+        tracker_pb2.Phase(name="JustAPhase", rank=1),
+        tracker_pb2.Phase(name="Can'tPhaseMe", rank=4),
+        tracker_pb2.Phase(phase_id=11, rank=5),
+        tracker_pb2.Phase(rank=3),
+        tracker_pb2.Phase(name="Phase"),
+    ]
+    expected = [
+        api_pb2_v1.Phase(phaseName="JustAPhase", rank=1),
+        api_pb2_v1.Phase(phaseName="Can'tPhaseMe", rank=4),
+        api_pb2_v1.Phase(phaseName="Phase"),
+    ]
+    actual = api_pb2_v1_helpers.convert_phases(phases)
+    self.assertEqual(actual, expected)
diff --git a/services/test/api_svc_v1_test.py b/services/test/api_svc_v1_test.py
new file mode 100644
index 0000000..b7cd9b1
--- /dev/null
+++ b/services/test/api_svc_v1_test.py
@@ -0,0 +1,1898 @@
+# 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
+
+"""Tests for the API v1."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import datetime
+import endpoints
+import logging
+from mock import Mock, patch, ANY
+import time
+import unittest
+import webtest
+
+from google.appengine.api import oauth
+from protorpc import messages
+from protorpc import message_types
+
+from features import send_notifications
+from framework import authdata
+from framework import exceptions
+from framework import framework_constants
+from framework import permissions
+from framework import profiler
+from framework import template_helpers
+from proto import api_pb2_v1
+from proto import project_pb2
+from proto import tracker_pb2
+from search import frontendsearchpipeline
+from services import api_svc_v1
+from services import service_manager
+from services import template_svc
+from services import tracker_fulltext
+from testing import fake
+from testing import testing_helpers
+from testing_utils import testing
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+def MakeFakeServiceManager():
+  return service_manager.Services(
+      user=fake.UserService(),
+      usergroup=fake.UserGroupService(),
+      project=fake.ProjectService(),
+      config=fake.ConfigService(),
+      issue=fake.IssueService(),
+      issue_star=fake.IssueStarService(),
+      features=fake.FeaturesService(),
+      template=Mock(spec=template_svc.TemplateService),
+      cache_manager=fake.CacheManager())
+
+
+class FakeMonorailApiRequest(object):
+
+  def __init__(self, request, services, perms=None):
+    self.profiler = profiler.Profiler()
+    self.cnxn = None
+    self.auth = authdata.AuthData.FromEmail(
+        self.cnxn, request['requester'], services)
+    self.me_user_id = self.auth.user_id
+    self.project_name = None
+    self.project = None
+    self.viewed_username = None
+    self.viewed_user_auth = None
+    self.config = None
+    if 'userId' in request:
+      self.viewed_username = request['userId']
+      self.viewed_user_auth = authdata.AuthData.FromEmail(
+          self.cnxn, self.viewed_username, services)
+    else:
+      assert 'groupName' in request
+      self.viewed_username = request['groupName']
+      try:
+        self.viewed_user_auth = authdata.AuthData.FromEmail(
+          self.cnxn, self.viewed_username, services)
+      except exceptions.NoSuchUserException:
+        self.viewed_user_auth = None
+    if 'projectId' in request:
+      self.project_name = request['projectId']
+      self.project = services.project.GetProjectByName(
+        self.cnxn, self.project_name)
+      self.config = services.config.GetProjectConfig(
+          self.cnxn, self.project_id)
+    self.perms = perms or permissions.GetPermissions(
+        self.auth.user_pb, self.auth.effective_ids, self.project)
+    self.granted_perms = set()
+
+    self.params = {
+      'can': request.get('can', 1),
+      'start': request.get('startIndex', 0),
+      'num': request.get('maxResults', 100),
+      'q': request.get('q', ''),
+      'sort': request.get('sort', ''),
+      'groupby': '',
+      'projects': request.get('additionalProject', []) + [self.project_name]}
+    self.use_cached_searches = True
+    self.errors = template_helpers.EZTError()
+    self.mode = None
+
+    self.query_project_names = self.GetParam('projects')
+    self.group_by_spec = self.GetParam('groupby')
+    self.sort_spec = self.GetParam('sort')
+    self.query = self.GetParam('q')
+    self.can = self.GetParam('can')
+    self.start = self.GetParam('start')
+    self.num = self.GetParam('num')
+    self.warnings = []
+
+  def CleanUp(self):
+    self.cnxn = None
+
+  @property
+  def project_id(self):
+    return self.project.project_id if self.project else None
+
+  def GetParam(self, query_param_name, default_value=None,
+               _antitamper_re=None):
+    return self.params.get(query_param_name, default_value)
+
+
+class FakeFrontendSearchPipeline(object):
+
+  def __init__(self):
+    issue1 = fake.MakeTestIssue(
+        project_id=12345, local_id=1, owner_id=222, status='New', summary='sum')
+    issue2 = fake.MakeTestIssue(
+        project_id=12345, local_id=2, owner_id=222, status='New', summary='sum')
+    self.allowed_results = [issue1, issue2]
+    self.visible_results = [issue1]
+    self.total_count = len(self.allowed_results)
+    self.config = None
+    self.projectId = 0
+
+  def SearchForIIDs(self):
+    pass
+
+  def MergeAndSortIssues(self):
+    pass
+
+  def Paginate(self):
+    pass
+
+
+class MonorailApiBadAuthTest(testing.EndpointsTestCase):
+
+  api_service_cls = api_svc_v1.MonorailApi
+
+  def setUp(self):
+    super(MonorailApiBadAuthTest, self).setUp()
+    self.requester = RequesterMock(email='requester@example.com')
+    self.mock(endpoints, 'get_current_user', lambda: None)
+    self.request = {'userId': 'user@example.com'}
+
+  def testUsersGet_BadOAuth(self):
+    """The requester's token is invalid, e.g., because it expired."""
+    oauth.get_current_user = Mock(
+        return_value=RequesterMock(email='test@example.com'))
+    oauth.get_current_user.side_effect = oauth.Error()
+    with self.assertRaises(webtest.AppError) as cm:
+      self.call_api('users_get', self.request)
+    self.assertTrue(cm.exception.message.startswith('Bad response: 401'))
+
+
+class MonorailApiTest(testing.EndpointsTestCase):
+
+  api_service_cls = api_svc_v1.MonorailApi
+
+  def setUp(self):
+    super(MonorailApiTest, self).setUp()
+    # Load queue.yaml.
+    self.requester = RequesterMock(email='requester@example.com')
+    self.mock(endpoints, 'get_current_user', lambda: self.requester)
+    self.config = None
+    self.services = MakeFakeServiceManager()
+    self.mock(api_svc_v1.MonorailApi, '_services', self.services)
+    self.services.user.TestAddUser('requester@example.com', 111)
+    self.services.user.TestAddUser('user@example.com', 222)
+    self.services.user.TestAddUser('group@example.com', 123)
+    self.services.usergroup.TestAddGroupSettings(123, 'group@example.com')
+    self.request = {
+          'userId': 'user@example.com',
+          'ownerProjectsOnly': False,
+          'requester': 'requester@example.com',
+          'projectId': 'test-project',
+          'issueId': 1}
+    self.mock(api_svc_v1.MonorailApi, 'mar_factory',
+              lambda x, y, z: FakeMonorailApiRequest(
+                  self.request, self.services))
+
+    # api_base_checks is tested in AllBaseChecksTest,
+    # so mock it to reduce noise.
+    self.mock(api_svc_v1, 'api_base_checks',
+              lambda x, y, z, u, v, w: ('id', 'email'))
+
+    self.mock(tracker_fulltext, 'IndexIssues', lambda x, y, z, u, v: None)
+
+  def SetUpComponents(
+      self, project_id, component_id, component_name, component_doc='doc',
+      deprecated=False, admin_ids=None, cc_ids=None, created=100000,
+      creator=111):
+    admin_ids = admin_ids or []
+    cc_ids = cc_ids or []
+    self.config = self.services.config.GetProjectConfig(
+        'fake cnxn', project_id)
+    self.services.config.StoreConfig('fake cnxn', self.config)
+    cd = tracker_bizobj.MakeComponentDef(
+        component_id, project_id, component_name, component_doc, deprecated,
+        admin_ids, cc_ids, created, creator, modifier_id=creator)
+    self.config.component_defs.append(cd)
+
+  def SetUpFieldDefs(
+      self, field_id, project_id, field_name, field_type_int,
+      min_value=0, max_value=100, needs_member=False, docstring='doc',
+      approval_id=None, is_phase_field=False):
+    self.config = self.services.config.GetProjectConfig(
+        'fake cnxn', project_id)
+    self.services.config.StoreConfig('fake cnxn', self.config)
+    fd = tracker_bizobj.MakeFieldDef(
+        field_id, project_id, field_name, field_type_int, '',
+        '', False, False, False, min_value, max_value, None, needs_member,
+        None, '', tracker_pb2.NotifyTriggers.NEVER, 'no_action', docstring,
+        False, approval_id=approval_id, is_phase_field=is_phase_field)
+    self.config.field_defs.append(fd)
+
+  def testUsersGet_NoProject(self):
+    """The viewed user has no projects."""
+
+    self.services.project.TestAddProject(
+        'public-project', owner_ids=[111])
+    resp = self.call_api('users_get', self.request).json_body
+    expected = {
+        'id': '222',
+        'kind': 'monorail#user'}
+    self.assertEqual(expected, resp)
+
+  def testUsersGet_PublicProject(self):
+    """The viewed user has one public project."""
+    self.services.template.GetProjectTemplates.return_value = \
+        testing_helpers.DefaultTemplates()
+    self.services.project.TestAddProject(
+        'public-project', owner_ids=[222])
+    resp = self.call_api('users_get', self.request).json_body
+
+    self.assertEqual(1, len(resp['projects']))
+    self.assertEqual('public-project', resp['projects'][0]['name'])
+
+  def testUsersGet_PrivateProject(self):
+    """The viewed user has one project but the requester cannot view."""
+
+    self.services.project.TestAddProject(
+        'private-project', owner_ids=[222],
+        access=project_pb2.ProjectAccess.MEMBERS_ONLY)
+    resp = self.call_api('users_get', self.request).json_body
+    self.assertNotIn('projects', resp)
+
+  def testUsersGet_OwnerProjectOnly(self):
+    """The viewed user has different roles of projects."""
+    self.services.template.GetProjectTemplates.return_value = \
+        testing_helpers.DefaultTemplates()
+    self.services.project.TestAddProject(
+        'owner-project', owner_ids=[222])
+    self.services.project.TestAddProject(
+        'member-project', owner_ids=[111], committer_ids=[222])
+    resp = self.call_api('users_get', self.request).json_body
+    self.assertEqual(2, len(resp['projects']))
+
+    self.request['ownerProjectsOnly'] = True
+    resp = self.call_api('users_get', self.request).json_body
+    self.assertEqual(1, len(resp['projects']))
+    self.assertEqual('owner-project', resp['projects'][0]['name'])
+
+  def testIssuesGet_GetIssue(self):
+    """Get the requested issue."""
+
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+    self.SetUpComponents(12345, 1, 'API')
+    self.SetUpFieldDefs(1, 12345, 'Field1', tracker_pb2.FieldTypes.INT_TYPE)
+
+    fv = tracker_pb2.FieldValue(
+        field_id=1,
+        int_value=11)
+    issue1 = fake.MakeTestIssue(
+        project_id=12345, local_id=1, owner_id=222, reporter_id=111,
+        status='New', summary='sum', component_ids=[1], field_values=[fv])
+    self.services.issue.TestAddIssue(issue1)
+
+    resp = self.call_api('issues_get', self.request).json_body
+    self.assertEqual(1, resp['id'])
+    self.assertEqual('New', resp['status'])
+    self.assertEqual('open', resp['state'])
+    self.assertFalse(resp['canEdit'])
+    self.assertTrue(resp['canComment'])
+    self.assertEqual('requester@example.com', resp['author']['name'])
+    self.assertEqual('user@example.com', resp['owner']['name'])
+    self.assertEqual('API', resp['components'][0])
+    self.assertEqual('Field1', resp['fieldValues'][0]['fieldName'])
+    self.assertEqual('11', resp['fieldValues'][0]['fieldValue'])
+
+  def testIssuesInsert_BadRequest(self):
+    """The request does not specify summary or status."""
+
+    with self.assertRaises(webtest.AppError):
+      self.call_api('issues_insert', self.request)
+
+    issue_dict = {
+      'status': 'New',
+      'summary': 'Test issue',
+      'owner': {'name': 'notexist@example.com'}}
+    self.request.update(issue_dict)
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+    with self.call_should_fail(400):
+      self.call_api('issues_insert', self.request)
+
+    # Invalid field value
+    self.SetUpFieldDefs(1, 12345, 'Field1', tracker_pb2.FieldTypes.INT_TYPE)
+    issue_dict = {
+      'status': 'New',
+      'summary': 'Test issue',
+      'owner': {'name': 'requester@example.com'},
+      'fieldValues': [{'fieldName': 'Field1', 'fieldValue': '111'}]}
+    self.request.update(issue_dict)
+    with self.call_should_fail(400):
+      self.call_api('issues_insert', self.request)
+
+  def testIssuesInsert_NoPermission(self):
+    """The requester has no permission to create issues."""
+
+    issue_dict = {
+      'status': 'New',
+      'summary': 'Test issue'}
+    self.request.update(issue_dict)
+
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        access=project_pb2.ProjectAccess.MEMBERS_ONLY,
+        project_id=12345)
+    with self.call_should_fail(403):
+      self.call_api('issues_insert', self.request)
+
+  @patch('framework.cloud_tasks_helpers.create_task')
+  def testIssuesInsert_CreateIssue(self, _create_task_mock):
+    """Create an issue as requested."""
+
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222], committer_ids=[111], project_id=12345)
+    self.SetUpFieldDefs(1, 12345, 'Field1', tracker_pb2.FieldTypes.INT_TYPE)
+
+    issue1 = fake.MakeTestIssue(
+        project_id=12345, local_id=1, owner_id=222, reporter_id=111,
+        status='New', summary='Test issue')
+    self.services.issue.TestAddIssue(issue1)
+
+    issue_dict = {
+      'blockedOn': [{'issueId': 1}],
+      'cc': [{'name': 'user@example.com'}, {'name': ''}, {'name': ' '}],
+      'description': 'description',
+      'labels': ['label1', 'label2'],
+      'owner': {'name': 'requester@example.com'},
+      'status': 'New',
+      'summary': 'Test issue',
+      'fieldValues': [{'fieldName': 'Field1', 'fieldValue': '11'}]}
+    self.request.update(issue_dict)
+
+    resp = self.call_api('issues_insert', self.request).json_body
+    self.assertEqual('New', resp['status'])
+    self.assertEqual('requester@example.com', resp['author']['name'])
+    self.assertEqual('requester@example.com', resp['owner']['name'])
+    self.assertEqual('user@example.com', resp['cc'][0]['name'])
+    self.assertEqual(1, resp['blockedOn'][0]['issueId'])
+    self.assertEqual([u'label1', u'label2'], resp['labels'])
+    self.assertEqual('Test issue', resp['summary'])
+    self.assertEqual('Field1', resp['fieldValues'][0]['fieldName'])
+    self.assertEqual('11', resp['fieldValues'][0]['fieldValue'])
+
+    new_issue = self.services.issue.GetIssueByLocalID(
+        'fake cnxn', 12345, resp['id'])
+
+    starrers = self.services.issue_star.LookupItemStarrers(
+        'fake cnxn', new_issue.issue_id)
+    self.assertIn(111, starrers)
+
+  @patch('framework.cloud_tasks_helpers.create_task')
+  def testIssuesInsert_EmptyOwnerCcNames(self, _create_task_mock):
+    """Create an issue as requested."""
+
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+    self.SetUpFieldDefs(1, 12345, 'Field1', tracker_pb2.FieldTypes.INT_TYPE)
+
+    issue_dict = {
+      'cc': [{'name': 'user@example.com'}, {'name': ''}],
+      'description': 'description',
+      'owner': {'name': ''},
+      'status': 'New',
+      'summary': 'Test issue'}
+    self.request.update(issue_dict)
+
+    resp = self.call_api('issues_insert', self.request).json_body
+    self.assertEqual('New', resp['status'])
+    self.assertEqual('requester@example.com', resp['author']['name'])
+    self.assertTrue('owner' not in resp)
+    self.assertEqual('user@example.com', resp['cc'][0]['name'])
+    self.assertEqual(len(resp['cc']), 1)
+    self.assertEqual('Test issue', resp['summary'])
+
+    new_issue = self.services.issue.GetIssueByLocalID(
+        'fake cnxn', 12345, resp['id'])
+    self.assertEqual(new_issue.owner_id, 0)
+
+  def testIssuesList_NoPermission(self):
+    """No permission for additional projects."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+
+    self.services.project.TestAddProject(
+        'test-project2', owner_ids=[222],
+        access=project_pb2.ProjectAccess.MEMBERS_ONLY,
+        project_id=123456)
+    self.request['additionalProject'] = ['test-project2']
+    with self.call_should_fail(403):
+      self.call_api('issues_list', self.request)
+
+  def testIssuesList_SearchIssues(self):
+    """Find issues of one project."""
+
+    self.mock(
+        frontendsearchpipeline,
+        'FrontendSearchPipeline', lambda cnxn, serv, auth, me, q, q_proj_names,
+        num, start, can, group_spec, sort_spec, warnings, errors, use_cache,
+        profiler, project: FakeFrontendSearchPipeline())
+
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[111],  # requester
+        access=project_pb2.ProjectAccess.MEMBERS_ONLY,
+        project_id=12345)
+    resp = self.call_api('issues_list', self.request).json_body
+    self.assertEqual(2, int(resp['totalResults']))
+    self.assertEqual(1, len(resp['items']))
+    self.assertEqual(1, resp['items'][0]['id'])
+
+  def testIssuesCommentsList_GetComments(self):
+    """Get comments of requested issue."""
+
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+
+    issue1 = fake.MakeTestIssue(
+        project_id=12345, local_id=1, summary='test summary', status='New',
+        issue_id=10001, owner_id=222, reporter_id=111)
+    self.services.issue.TestAddIssue(issue1)
+
+    comment = tracker_pb2.IssueComment(
+        id=123, issue_id=10001,
+        project_id=12345, user_id=222,
+        content='this is a comment',
+        timestamp=1437700000)
+    self.services.issue.TestAddComment(comment, 1)
+
+    resp = self.call_api('issues_comments_list', self.request).json_body
+    self.assertEqual(2, resp['totalResults'])
+    comment1 = resp['items'][0]
+    comment2 = resp['items'][1]
+    self.assertEqual('requester@example.com', comment1['author']['name'])
+    self.assertEqual('test summary', comment1['content'])
+    self.assertEqual('user@example.com', comment2['author']['name'])
+    self.assertEqual('this is a comment', comment2['content'])
+
+  def testParseImportedReporter_Normal(self):
+    """Normal attempt to post a comment under the requester's name."""
+    mar = FakeMonorailApiRequest(self.request, self.services)
+    container = api_pb2_v1.ISSUES_COMMENTS_INSERT_REQUEST_RESOURCE_CONTAINER
+    request = container.body_message_class()
+
+    monorail_api = self.api_service_cls()
+    monorail_api._set_services(self.services)
+    reporter_id, timestamp = monorail_api.parse_imported_reporter(mar, request)
+    self.assertEqual(111, reporter_id)
+    self.assertIsNone(timestamp)
+
+    # API users should not need to specify anything for author when posting
+    # as the signed-in user, but it is OK if they specify their own email.
+    request.author = api_pb2_v1.AtomPerson(name='requester@example.com')
+    request.published = datetime.datetime.now()  # Ignored
+    monorail_api = self.api_service_cls()
+    monorail_api._set_services(self.services)
+    reporter_id, timestamp = monorail_api.parse_imported_reporter(mar, request)
+    self.assertEqual(111, reporter_id)
+    self.assertIsNone(timestamp)
+
+  def testParseImportedReporter_Import_Allowed(self):
+    """User is importing a comment posted by a different user."""
+    project = self.services.project.TestAddProject(
+        'test-project', owner_ids=[222], contrib_ids=[111],
+        project_id=12345)
+    project.extra_perms = [project_pb2.Project.ExtraPerms(
+      member_id=111, perms=['ImportComment'])]
+    mar = FakeMonorailApiRequest(self.request, self.services)
+    container = api_pb2_v1.ISSUES_COMMENTS_INSERT_REQUEST_RESOURCE_CONTAINER
+    request = container.body_message_class()
+    request.author = api_pb2_v1.AtomPerson(name='user@example.com')
+    NOW = 1234567890
+    request.published = datetime.datetime.utcfromtimestamp(NOW)
+    monorail_api = self.api_service_cls()
+    monorail_api._set_services(self.services)
+
+    reporter_id, timestamp = monorail_api.parse_imported_reporter(mar, request)
+
+    self.assertEqual(222, reporter_id)  # that is user@
+    self.assertEqual(NOW, timestamp)
+
+  def testParseImportedReporter_Import_NotAllowed(self):
+    """User is importing a comment posted by a different user without perm."""
+    mar = FakeMonorailApiRequest(self.request, self.services)
+    container = api_pb2_v1.ISSUES_COMMENTS_INSERT_REQUEST_RESOURCE_CONTAINER
+    request = container.body_message_class()
+    request.author = api_pb2_v1.AtomPerson(name='user@example.com')
+    NOW = 1234567890
+    request.published = datetime.datetime.fromtimestamp(NOW)
+    monorail_api = self.api_service_cls()
+    monorail_api._set_services(self.services)
+
+    with self.assertRaises(permissions.PermissionException):
+      monorail_api.parse_imported_reporter(mar, request)
+
+  def testIssuesCommentsInsert_ApprovalFields(self):
+    """Attempts to update approval field values are blocked."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        access=project_pb2.ProjectAccess.MEMBERS_ONLY,
+        project_id=12345)
+
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 2, issue_id=1234501)
+    self.services.issue.TestAddIssue(issue1)
+
+    self.SetUpFieldDefs(
+        1, 12345, 'Field_int', tracker_pb2.FieldTypes.INT_TYPE)
+    self.SetUpFieldDefs(
+        2, 12345, 'ApprovalChild', tracker_pb2.FieldTypes.STR_TYPE,
+        approval_id=1)
+
+    self.request['updates'] = {
+        'fieldValues':  [{'fieldName': 'Field_int', 'fieldValue': '11'},
+                        {'fieldName': 'ApprovalChild', 'fieldValue': 'str'}]}
+
+    with self.call_should_fail(403):
+      self.call_api('issues_comments_insert', self.request)
+
+  def testIssuesCommentsInsert_NoCommentPermission(self):
+    """No permission to comment an issue."""
+
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        access=project_pb2.ProjectAccess.MEMBERS_ONLY,
+        project_id=12345)
+
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 2)
+    self.services.issue.TestAddIssue(issue1)
+
+    with self.call_should_fail(403):
+      self.call_api('issues_comments_insert', self.request)
+
+  def testIssuesCommentsInsert_CommentPermissionOnly(self):
+    """User has permission to comment, even though they cannot edit."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[], project_id=12345)
+
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222)
+    self.services.issue.TestAddIssue(issue1)
+
+    self.request['content'] = 'This is just a comment'
+    resp = self.call_api('issues_comments_insert', self.request).json_body
+    self.assertEqual('requester@example.com', resp['author']['name'])
+    self.assertEqual('This is just a comment', resp['content'])
+
+  def testIssuesCommentsInsert_TooLongComment(self):
+    """Too long of a comment to add."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[], project_id=12345)
+
+    issue1 = fake.MakeTestIssue(12345, 1, 'Issue 1', 'New', 222)
+    self.services.issue.TestAddIssue(issue1)
+
+    long_comment = '   ' + 'c' * tracker_constants.MAX_COMMENT_CHARS + '  '
+    self.request['content'] = long_comment
+    with self.call_should_fail(400):
+      self.call_api('issues_comments_insert', self.request)
+
+  def testIssuesCommentsInsert_Amendments_Normal(self):
+    """Insert comments with amendments."""
+
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[111],
+        project_id=12345)
+
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, project_name='test-project')
+    issue2 = fake.MakeTestIssue(
+        12345, 2, 'Issue 2', 'New', 222, project_name='test-project')
+    issue3 = fake.MakeTestIssue(
+        12345, 3, 'Issue 3', 'New', 222, project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+    self.services.issue.TestAddIssue(issue2)
+    self.services.issue.TestAddIssue(issue3)
+
+    self.request['updates'] = {
+        'summary': 'new summary',
+        'status': 'Started',
+        'owner': 'requester@example.com',
+        'cc': ['user@example.com'],
+        'labels': ['add_label', '-remove_label'],
+        'blockedOn': ['2'],
+        'blocking': ['3'],
+        }
+    resp = self.call_api('issues_comments_insert', self.request).json_body
+    self.assertEqual('requester@example.com', resp['author']['name'])
+    self.assertEqual('Started', resp['updates']['status'])
+    self.assertEqual(0, issue1.merged_into)
+
+  def testIssuesCommentsInsert_Amendments_NoPerms(self):
+    """Can't insert comments using account that lacks permissions."""
+
+    project1 = self.services.project.TestAddProject(
+        'test-project', owner_ids=[], project_id=12345)
+
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+
+    self.request['updates'] = {
+        'summary': 'new summary',
+        }
+    with self.call_should_fail(403):
+      self.call_api('issues_comments_insert', self.request)
+
+    project1.contributor_ids = [1]  # Does not grant edit perm.
+    with self.call_should_fail(403):
+      self.call_api('issues_comments_insert', self.request)
+
+  def testIssuesCommentsInsert_Amendments_BadOwner(self):
+    """Can't set owner to someone who is not a project member."""
+
+    _project1 = self.services.project.TestAddProject(
+        'test-project', owner_ids=[111], project_id=12345)
+
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+
+    self.request['updates'] = {
+        'owner': 'user@example.com',
+        }
+    with self.call_should_fail(400):
+      self.call_api('issues_comments_insert', self.request)
+
+  @patch('framework.cloud_tasks_helpers.create_task')
+  def testIssuesCommentsInsert_MergeInto(self, _create_task_mock):
+    """Insert comment that merges an issue into another issue."""
+
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222], committer_ids=[111],
+        project_id=12345)
+
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, project_name='test-project')
+    issue2 = fake.MakeTestIssue(
+        12345, 2, 'Issue 2', 'New', 222, project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+    self.services.issue.TestAddIssue(issue2)
+    self.services.issue_star.SetStarsBatch(
+        'cnxn', 'service', 'config', issue1.issue_id, [111, 222, 333], True)
+    self.services.issue_star.SetStarsBatch(
+        'cnxn', 'service', 'config', issue2.issue_id, [555], True)
+
+    self.request['updates'] = {
+        'summary': 'new summary',
+        'status': 'Duplicate',
+        'owner': 'requester@example.com',
+        'cc': ['user@example.com'],
+        'labels': ['add_label', '-remove_label'],
+        'mergedInto': '2',
+        }
+    resp = self.call_api('issues_comments_insert', self.request).json_body
+    self.assertEqual('requester@example.com', resp['author']['name'])
+    self.assertEqual('Duplicate', resp['updates']['status'])
+    self.assertEqual(issue2.issue_id, issue1.merged_into)
+    issue2_comments = self.services.issue.GetCommentsForIssue(
+      'cnxn', issue2.issue_id)
+    self.assertEqual(2, len(issue2_comments))  # description and merge
+    source_starrers = self.services.issue_star.LookupItemStarrers(
+        'cnxn', issue1.issue_id)
+    self.assertItemsEqual([111, 222, 333], source_starrers)
+    target_starrers = self.services.issue_star.LookupItemStarrers(
+        'cnxn', issue2.issue_id)
+    self.assertItemsEqual([111, 222, 333, 555], target_starrers)
+
+  def testIssuesCommentsInsert_CustomFields(self):
+    """Update custom field values."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[111],
+        project_id=12345)
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222,
+        project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+    self.SetUpFieldDefs(
+        1, 12345, 'Field_int', tracker_pb2.FieldTypes.INT_TYPE)
+    self.SetUpFieldDefs(
+        2, 12345, 'Field_enum', tracker_pb2.FieldTypes.ENUM_TYPE)
+
+    self.request['updates'] = {
+        'fieldValues': [{'fieldName': 'Field_int', 'fieldValue': '11'},
+                        {'fieldName': 'Field_enum', 'fieldValue': 'str'}]}
+    resp = self.call_api('issues_comments_insert', self.request).json_body
+    self.assertEqual(
+        {'fieldName': 'Field_int', 'fieldValue': '11'},
+        resp['updates']['fieldValues'][0])
+
+  def testIssuesCommentsInsert_IsDescription(self):
+    """Add a new issue description."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[111], project_id=12345)
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+    # Note: the initially issue description will be "Issue 1".
+
+    self.request['content'] = 'new desc'
+    self.request['updates'] = {'is_description': True}
+    resp = self.call_api('issues_comments_insert', self.request).json_body
+    self.assertEqual('new desc', resp['content'])
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue1.issue_id)
+    self.assertEqual(2, len(comments))
+    self.assertTrue(comments[1].is_description)
+    self.assertEqual('new desc', comments[1].content)
+
+  def testIssuesCommentsInsert_MoveToProject_NoPermsSrc(self):
+    """Don't move issue when user has no perms to edit issue."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[], project_id=12345)
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, labels=[],
+        project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+    self.services.project.TestAddProject(
+        'test-project2', owner_ids=[111], project_id=12346)
+
+    # The user has no permission in test-project.
+    self.request['projectId'] = 'test-project'
+    self.request['updates'] = {
+        'moveToProject': 'test-project2'}
+    with self.call_should_fail(403):
+      self.call_api('issues_comments_insert', self.request)
+
+  def testIssuesCommentsInsert_MoveToProject_NoPermsDest(self):
+    """Don't move issue to a different project where user has no perms."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[111], project_id=12345)
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, labels=[],
+        project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+    self.services.project.TestAddProject(
+        'test-project2', owner_ids=[], project_id=12346)
+
+    # The user has no permission in test-project2.
+    self.request['projectId'] = 'test-project'
+    self.request['updates'] = {
+        'moveToProject': 'test-project2'}
+    with self.call_should_fail(400):
+      self.call_api('issues_comments_insert', self.request)
+
+  def testIssuesCommentsInsert_MoveToProject_NoSuchProject(self):
+    """Don't move issue to a different project that does not exist."""
+    project1 = self.services.project.TestAddProject(
+        'test-project', owner_ids=[222], project_id=12345)
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, labels=[],
+        project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+
+    # Project doesn't exist.
+    project1.owner_ids = [111, 222]
+    self.request['updates'] = {
+        'moveToProject': 'not exist'}
+    with self.call_should_fail(400):
+      self.call_api('issues_comments_insert', self.request)
+
+  def testIssuesCommentsInsert_MoveToProject_SameProject(self):
+    """Don't move issue to the project it is already in."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[111], project_id=12345)
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, labels=[],
+        project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+
+    # The issue is already in destination
+    self.request['updates'] = {
+        'moveToProject': 'test-project'}
+    with self.call_should_fail(400):
+      self.call_api('issues_comments_insert', self.request)
+
+  def testIssuesCommentsInsert_MoveToProject_Restricted(self):
+    """Don't move restricted issue to a different project."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[111], project_id=12345)
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, labels=['Restrict-View-Google'],
+        project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+    self.services.project.TestAddProject(
+        'test-project2', owner_ids=[111],
+        project_id=12346)
+
+    #  Issue has restrict labels, so it cannot move.
+    self.request['projectId'] = 'test-project'
+    self.request['updates'] = {
+        'moveToProject': 'test-project2'}
+    with self.call_should_fail(400):
+      self.call_api('issues_comments_insert', self.request)
+
+  def testIssuesCommentsInsert_MoveToProject_Normal(self):
+    """Move issue."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[111, 222],
+        project_id=12345)
+    self.services.project.TestAddProject(
+        'test-project2', owner_ids=[111, 222],
+        project_id=12346)
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+    issue2 = fake.MakeTestIssue(
+        12346, 1, 'Issue 1', 'New', 222, project_name='test-project2')
+    self.services.issue.TestAddIssue(issue2)
+
+    self.request['updates'] = {
+        'moveToProject': 'test-project2'}
+    resp = self.call_api('issues_comments_insert', self.request).json_body
+
+    self.assertEqual(
+        'Moved issue test-project:1 to now be issue test-project2:2.',
+        resp['content'])
+
+  def testIssuesCommentsInsert_Import_Allowed(self):
+    """Post a comment attributed to another user, with permission."""
+    project = self.services.project.TestAddProject(
+        'test-project', committer_ids=[111, 222], project_id=12345)
+    project.extra_perms = [project_pb2.Project.ExtraPerms(
+      member_id=111, perms=['ImportComment'])]
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+
+    self.request['author'] = {'name': 'user@example.com'}  # 222
+    self.request['content'] = 'a comment'
+    self.request['updates'] = {
+        'owner': 'user@example.com',
+        }
+
+    resp = self.call_api('issues_comments_insert', self.request).json_body
+
+    self.assertEqual('a comment', resp['content'])
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue1.issue_id)
+    self.assertEqual(2, len(comments))
+    self.assertEqual(222, comments[1].user_id)
+    self.assertEqual('a comment', comments[1].content)
+
+
+  def testIssuesCommentsInsert_Import_Self(self):
+    """Specifying the comment author is OK if it is the requester."""
+    self.services.project.TestAddProject(
+        'test-project', committer_ids=[111, 222], project_id=12345)
+    # Note: No ImportComment permission has been granted.
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+
+    self.request['author'] = {'name': 'requester@example.com'}  # 111
+    self.request['content'] = 'a comment'
+    self.request['updates'] = {
+        'owner': 'user@example.com',
+        }
+
+    resp = self.call_api('issues_comments_insert', self.request).json_body
+
+    self.assertEqual('a comment', resp['content'])
+    comments = self.services.issue.GetCommentsForIssue('cnxn', issue1.issue_id)
+    self.assertEqual(2, len(comments))
+    self.assertEqual(111, comments[1].user_id)
+    self.assertEqual('a comment', comments[1].content)
+
+  def testIssuesCommentsInsert_Import_Denied(self):
+    """Cannot post a comment attributed to another user without permission."""
+    self.services.project.TestAddProject(
+        'test-project', committer_ids=[111, 222], project_id=12345)
+    # Note: No ImportComment permission has been granted.
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, project_name='test-project')
+    self.services.issue.TestAddIssue(issue1)
+
+    self.request['author'] = {'name': 'user@example.com'}  # 222
+    self.request['content'] = 'a comment'
+    self.request['updates'] = {
+        'owner': 'user@example.com',
+        }
+
+    with self.call_should_fail(403):
+      self.call_api('issues_comments_insert', self.request)
+
+  def testIssuesCommentsDelete_NoComment(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+    issue1 = fake.MakeTestIssue(
+        project_id=12345, local_id=1, summary='test summary',
+        issue_id=10001, status='New', owner_id=222, reporter_id=222)
+    self.services.issue.TestAddIssue(issue1)
+    self.request['commentId'] = 1
+    with self.call_should_fail(404):
+      self.call_api('issues_comments_delete', self.request)
+
+  def testIssuesCommentsDelete_NoDeletePermission(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+    issue1 = fake.MakeTestIssue(
+        project_id=12345, local_id=1, summary='test summary',
+        issue_id=10001, status='New', owner_id=222, reporter_id=222)
+    self.services.issue.TestAddIssue(issue1)
+    self.request['commentId'] = 0
+    with self.call_should_fail(403):
+      self.call_api('issues_comments_delete', self.request)
+
+  def testIssuesCommentsDelete_DeleteUndelete(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+    issue1 = fake.MakeTestIssue(
+        project_id=12345, local_id=1, summary='test summary',
+        issue_id=10001, status='New', owner_id=222, reporter_id=111)
+    self.services.issue.TestAddIssue(issue1)
+    comment = tracker_pb2.IssueComment(
+        id=123, issue_id=10001,
+        project_id=12345, user_id=111,
+        content='this is a comment',
+        timestamp=1437700000)
+    self.services.issue.TestAddComment(comment, 1)
+    self.request['commentId'] = 1
+
+    comments = self.services.issue.GetCommentsForIssue(None, 10001)
+
+    self.call_api('issues_comments_delete', self.request)
+    self.assertEqual(111, comments[1].deleted_by)
+
+    self.call_api('issues_comments_undelete', self.request)
+    self.assertIsNone(comments[1].deleted_by)
+
+  def approvalRequest(self, approval, request_fields=None, comment=None,
+                      issue_labels=None):
+    request = {'userId': 'user@example.com',
+               'requester': 'requester@example.com',
+               'projectId': 'test-project',
+               'issueId': 1,
+               'approvalName': 'Legal-Review',
+               'sendEmail': False,
+    }
+    if request_fields:
+      request.update(request_fields)
+
+    self.SetUpFieldDefs(
+        1, 12345, 'Legal-Review', tracker_pb2.FieldTypes.APPROVAL_TYPE)
+
+    issue1 = fake.MakeTestIssue(
+        12345, 1, 'Issue 1', 'New', 222, approval_values=[approval],
+        labels=issue_labels)
+    self.services.issue.TestAddIssue(issue1)
+
+    self.services.issue.DeltaUpdateIssueApproval = Mock(return_value=comment)
+
+    self.mock(api_svc_v1.MonorailApi, 'mar_factory',
+              lambda x, y, z: FakeMonorailApiRequest(
+                  request, self.services))
+    return request, issue1
+
+  def getFakeComments(self):
+    return [
+        tracker_pb2.IssueComment(
+            id=123, issue_id=1234501, project_id=12345, user_id=111,
+            content='1st comment', timestamp=1437700000, approval_id=1),
+        tracker_pb2.IssueComment(
+            id=223, issue_id=1234501, project_id=12345, user_id=111,
+            content='2nd comment', timestamp=1437700000, approval_id=2),
+        tracker_pb2.IssueComment(
+            id=323, issue_id=1234501, project_id=12345, user_id=111,
+            content='3rd comment', timestamp=1437700000, approval_id=1,
+            is_description=True),
+        tracker_pb2.IssueComment(
+            id=423, issue_id=1234501, project_id=12345, user_id=111,
+            content='4th comment', timestamp=1437700000)]
+
+  def testApprovalsCommentsList_NoViewPermission(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+
+    approval = tracker_pb2.ApprovalValue(approval_id=1)
+    request, _issue = self.approvalRequest(
+        approval, issue_labels=['Restrict-View-Google'])
+
+    with self.call_should_fail(403):
+      self.call_api('approvals_comments_list', request)
+
+  def testApprovalsCommentsList_NoApprovalFound(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+
+    approval = tracker_pb2.ApprovalValue(approval_id=1)
+    request, _issue = self.approvalRequest(approval)
+    self.config.field_defs = []  # empty field_defs of approval fd
+
+    with self.call_should_fail(400):
+      self.call_api('approvals_comments_list', request)
+
+  def testApprovalsCommentsList(self):
+    """Get comments of requested issue approval."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222], project_id=12345)
+    self.services.issue.GetCommentsForIssue = Mock(
+        return_value=self.getFakeComments())
+
+    approval = tracker_pb2.ApprovalValue(approval_id=1)
+    request, _issue = self.approvalRequest(approval)
+
+    response = self.call_api('approvals_comments_list', request).json_body
+    self.assertEqual(response['kind'], 'monorail#approvalCommentList')
+    self.assertEqual(response['totalResults'], 2)
+    self.assertEqual(len(response['items']), 2)
+
+  def testApprovalsCommentsList_MaxResults(self):
+    """get comments of requested issue approval with maxResults."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222], project_id=12345)
+    self.services.issue.GetCommentsForIssue = Mock(
+        return_value=self.getFakeComments())
+
+    approval = tracker_pb2.ApprovalValue(approval_id=1)
+    request, _issue = self.approvalRequest(
+        approval, request_fields={'maxResults': 1})
+
+    response = self.call_api('approvals_comments_list', request).json_body
+    self.assertEqual(response['kind'], 'monorail#approvalCommentList')
+    self.assertEqual(response['totalResults'], 2)
+    self.assertEqual(len(response['items']), 1)
+    self.assertEqual(response['items'][0]['content'], '1st comment')
+
+  @patch('testing.fake.IssueService.GetCommentsForIssue')
+  def testApprovalsCommentsList_StartIndex(self, mockGetComments):
+    """get comments of requested issue approval with maxResults."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222], project_id=12345)
+    mockGetComments.return_value = self.getFakeComments()
+
+    approval = tracker_pb2.ApprovalValue(approval_id=1)
+    request, _issue = self.approvalRequest(
+        approval, request_fields={'startIndex': 1})
+
+    response = self.call_api('approvals_comments_list', request).json_body
+    self.assertEqual(response['kind'], 'monorail#approvalCommentList')
+    self.assertEqual(response['totalResults'], 2)
+    self.assertEqual(len(response['items']), 1)
+    self.assertEqual(response['items'][0]['content'], '3rd comment')
+
+  def testApprovalsCommentsInsert_NoCommentPermission(self):
+    """No permission to comment on an issue, including approvals."""
+
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        access=project_pb2.ProjectAccess.MEMBERS_ONLY,
+        project_id=12345)
+
+    approval = tracker_pb2.ApprovalValue(approval_id=1)
+    request, _issue = self.approvalRequest(approval)
+
+    with self.call_should_fail(403):
+      self.call_api('approvals_comments_insert', request)
+
+  def testApprovalsCommentsInsert_TooLongComment(self):
+    """Too long of a comment when comments on approvals."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222], project_id=12345)
+
+    approval = tracker_pb2.ApprovalValue(approval_id=1)
+    request, _issue = self.approvalRequest(approval)
+
+    long_comment = '   ' + 'c' * tracker_constants.MAX_COMMENT_CHARS + '  '
+    request['content'] = long_comment
+    with self.call_should_fail(400):
+      self.call_api('approvals_comments_insert', request)
+
+  def testApprovalsCommentsInsert_NoApprovalDefFound(self):
+    """No approval with approvalName found."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+
+    approval = tracker_pb2.ApprovalValue(approval_id=1)
+    request, _issue = self.approvalRequest(approval)
+    self.config.field_defs = []
+
+    with self.call_should_fail(400):
+      self.call_api('approvals_comments_insert', request)
+
+    # Test wrong field_type is also caught.
+    self.SetUpFieldDefs(
+        1, 12345, 'Legal-Review', tracker_pb2.FieldTypes.STR_TYPE)
+    with self.call_should_fail(400):
+      self.call_api('approvals_comments_insert', request)
+
+  def testApprovalscommentsInsert_NoIssueFound(self):
+    """No issue found in project."""
+    request = {'userId': 'user@example.com',
+               'requester': 'requester@example.com',
+               'projectId': 'test-project',
+               'issueId': 1,
+               'approvalName': 'Legal-Review',
+    }
+    # No issue created.
+    with self.call_should_fail(400):
+      self.call_api('approvals_comments_insert', request)
+
+  def testApprovalsCommentsInsert_NoIssueApprovalFound(self):
+    """No approval with the given name found in the issue."""
+
+    request = {'userId': 'user@example.com',
+               'requester': 'requester@example.com',
+               'projectId': 'test-project',
+               'issueId': 1,
+               'approvalName': 'Legal-Review',
+               'sendEmail': False,
+    }
+
+    self.SetUpFieldDefs(
+        1, 12345, 'Legal-Review', tracker_pb2.FieldTypes.APPROVAL_TYPE)
+
+    # issue 1 does not contain the Legal-Review approval.
+    issue1 = fake.MakeTestIssue(12345, 1, 'Issue 1', 'New', 222)
+    self.services.issue.TestAddIssue(issue1)
+
+    with self.call_should_fail(400):
+      self.call_api('approvals_comments_insert', request)
+
+  def testApprovalsCommentsInsert_FieldValueChanges_NotFound(self):
+    """Approval's subfield value not found."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+    approval = tracker_pb2.ApprovalValue(approval_id=1)
+
+    request, _issue = self.approvalRequest(
+        approval,
+        request_fields={
+            'approvalUpdates': {
+                'fieldValues': [
+                    {'fieldName': 'DoesNotExist', 'fieldValue': 'cow'}]
+            },
+        })
+    with self.call_should_fail(400):
+      self.call_api('approvals_comments_insert', request)
+
+    # Test field belongs to another approval
+    self.config.field_defs.append(
+        tracker_bizobj.MakeFieldDef(
+            2, 12345, 'DoesNotExist', tracker_pb2.FieldTypes.STR_TYPE,
+            '', '', False, False, False, None, None, None, False,
+            None, '', tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+            'parent approval is wrong', False, approval_id=4))
+    with self.call_should_fail(400):
+      self.call_api('approvals_comments_insert', request)
+
+  @patch('time.time')
+  def testApprovalCommentsInsert_FieldValueChanges(self, mock_time):
+    """Field value changes are properly processed."""
+    test_time = 6789
+    mock_time.return_value = test_time
+    comment = tracker_pb2.IssueComment(
+        id=123, issue_id=10001,
+        project_id=12345, user_id=111,
+        content='cows moo',
+        timestamp=143770000)
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222], project_id=12345)
+    approval = tracker_pb2.ApprovalValue(
+        approval_id=1, approver_ids=[444])
+
+    request, issue = self.approvalRequest(
+        approval,
+        request_fields={'approvalUpdates': {
+            'fieldValues': [
+                {'fieldName': 'CowLayerName', 'fieldValue': 'cow'},
+                {'fieldName': 'CowType', 'fieldValue': 'skim'},
+                {'fieldName': 'CowType', 'fieldValue': 'milk'},
+                {'fieldName': 'CowType', 'fieldValue': 'chocolate',
+                 'operator': 'remove'}]
+        }},
+        comment=comment)
+    self.config.field_defs.extend(
+        [tracker_bizobj.MakeFieldDef(
+            2, 12345, 'CowLayerName', tracker_pb2.FieldTypes.STR_TYPE,
+            '', '', False, False, False, None, None, None, False,
+            None, '', tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+            'sub field value of approval 1', False, approval_id=1),
+        tracker_bizobj.MakeFieldDef(
+            3, 12345, 'CowType', tracker_pb2.FieldTypes.ENUM_TYPE,
+            '', '', False, False, True, None, None, None, False,
+            None, '', tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+            'enum sub field value of approval 1', False, approval_id=1)])
+
+    response = self.call_api('approvals_comments_insert', request).json_body
+    fvs_add = [tracker_bizobj.MakeFieldValue(
+        2, None, 'cow', None, None, None, False)]
+    labels_add = ['CowType-skim', 'CowType-milk']
+    labels_remove = ['CowType-chocolate']
+    approval_delta = tracker_bizobj.MakeApprovalDelta(
+        None, 111, [], [], fvs_add, [], [],
+        labels_add, labels_remove, set_on=test_time)
+    self.services.issue.DeltaUpdateIssueApproval.assert_called_with(
+        None, 111, self.config, issue, approval, approval_delta,
+        comment_content=None, is_description=None)
+    self.assertEqual(response['content'], comment.content)
+
+  @patch('time.time')
+  def testApprovalsCommentsInsert_StatusChanges_Normal(self, mock_time):
+    test_time = 6789
+    mock_time.return_value = test_time
+    comment = tracker_pb2.IssueComment(
+        id=123, issue_id=10001,
+        project_id=12345, user_id=111,  # requester
+        content='this is a comment',
+        timestamp=1437700000,
+        amendments=[tracker_bizobj.MakeApprovalStatusAmendment(
+            tracker_pb2.ApprovalStatus.REVIEW_REQUESTED)])
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222], project_id=12345)
+    approval = tracker_pb2.ApprovalValue(
+        approval_id=1, approver_ids=[444],
+        status=tracker_pb2.ApprovalStatus.NOT_SET)
+
+    request, issue = self.approvalRequest(
+        approval,
+        request_fields={'approvalUpdates': {'status': 'reviewRequested'}},
+        comment=comment)
+    response = self.call_api('approvals_comments_insert', request).json_body
+    approval_delta = tracker_bizobj.MakeApprovalDelta(
+        tracker_pb2.ApprovalStatus.REVIEW_REQUESTED, 111, [], [], [], [], [],
+        [], [], set_on=test_time)
+    self.services.issue.DeltaUpdateIssueApproval.assert_called_with(
+        None, 111, self.config, issue, approval, approval_delta,
+        comment_content=None, is_description=None)
+
+    self.assertEqual(response['author']['name'], 'requester@example.com')
+    self.assertEqual(response['content'], comment.content)
+    self.assertTrue(response['canDelete'])
+    self.assertEqual(response['approvalUpdates'],
+                     {'kind': 'monorail#approvalCommentUpdate',
+                      'status': 'reviewRequested'})
+
+  def testApprovalsCommentsInsert_StatusChanges_NoPerms(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+    approval = tracker_pb2.ApprovalValue(
+        approval_id=1, approver_ids=[444],
+        status=tracker_pb2.ApprovalStatus.NOT_SET)
+    request, _issue = self.approvalRequest(
+        approval,
+        request_fields={'approvalUpdates': {'status': 'approved'}})
+    with self.call_should_fail(403):
+      self.call_api('approvals_comments_insert', request)
+
+  @patch('time.time')
+  def testApprovalsCommentsInsert_StatusChanges_ApproverPerms(self, mock_time):
+    test_time = 6789
+    mock_time.return_value = test_time
+    comment = tracker_pb2.IssueComment(
+        id=123, issue_id=1234501,
+        project_id=12345, user_id=111,
+        content='this is a comment',
+        timestamp=1437700000,
+        amendments=[tracker_bizobj.MakeApprovalStatusAmendment(
+            tracker_pb2.ApprovalStatus.NOT_APPROVED)])
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+    approval = tracker_pb2.ApprovalValue(
+        approval_id=1, approver_ids=[111],  # requester
+        status=tracker_pb2.ApprovalStatus.NOT_SET)
+    request, issue = self.approvalRequest(
+        approval,
+        request_fields={'approvalUpdates': {'status': 'notApproved'}},
+        comment=comment)
+    response = self.call_api('approvals_comments_insert', request).json_body
+
+    approval_delta = tracker_bizobj.MakeApprovalDelta(
+        tracker_pb2.ApprovalStatus.NOT_APPROVED, 111, [], [], [], [], [],
+        [], [], set_on=test_time)
+    self.services.issue.DeltaUpdateIssueApproval.assert_called_with(
+        None, 111, self.config, issue, approval, approval_delta,
+        comment_content=None, is_description=None)
+    self.assertEqual(response['author']['name'], 'requester@example.com')
+    self.assertEqual(response['content'], comment.content)
+    self.assertTrue(response['canDelete'])
+    self.assertEqual(response['approvalUpdates'],
+                     {'kind': 'monorail#approvalCommentUpdate',
+                      'status': 'notApproved'})
+
+  def testApprovalsCommentsInsert_ApproverChanges_NoPerms(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+
+    approval = tracker_pb2.ApprovalValue(
+        approval_id=1, approver_ids=[444],
+        status=tracker_pb2.ApprovalStatus.NOT_SET)
+    request, _issue = self.approvalRequest(
+        approval,
+        request_fields={'approvalUpdates': {'approvers': 'someone@test.com'}})
+    with self.call_should_fail(403):
+      self.call_api('approvals_comments_insert', request)
+
+  @patch('time.time')
+  def testApprovalsCommentsInsert_ApproverChanges_ApproverPerms(
+      self, mock_time):
+    test_time = 6789
+    mock_time.return_value = test_time
+    comment = tracker_pb2.IssueComment(
+        id=123, issue_id=1234501,
+        project_id=12345, user_id=111,
+        content='this is a comment',
+        timestamp=1437700000,
+        amendments=[tracker_bizobj.MakeApprovalApproversAmendment(
+            [222], [123])])
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+
+    approval = tracker_pb2.ApprovalValue(
+        approval_id=1, approver_ids=[111],  # requester
+        status=tracker_pb2.ApprovalStatus.NOT_SET)
+    request, issue = self.approvalRequest(
+        approval,
+        request_fields={
+            'approvalUpdates':
+            {'approvers': ['user@example.com', '-group@example.com']}},
+        comment=comment)
+    response = self.call_api('approvals_comments_insert', request).json_body
+
+    approval_delta = tracker_bizobj.MakeApprovalDelta(
+        None, 111, [222], [123], [], [], [], [], [], set_on=test_time)
+    self.services.issue.DeltaUpdateIssueApproval.assert_called_with(
+        None, 111, self.config, issue, approval, approval_delta,
+        comment_content=None, is_description=None)
+    self.assertEqual(response['author']['name'], 'requester@example.com')
+    self.assertEqual(response['content'], comment.content)
+    self.assertTrue(response['canDelete'])
+    self.assertEqual(response['approvalUpdates'],
+                     {'kind': 'monorail#approvalCommentUpdate',
+                      'approvers': ['user@example.com', '-group@example.com']})
+
+  @patch('time.time')
+  def testApprovalsCommentsInsert_IsSurvey(self, mock_time):
+    test_time = 6789
+    mock_time.return_value = test_time
+    comment = tracker_pb2.IssueComment(
+        id=123, issue_id=10001,
+        project_id=12345, user_id=111,
+        content='this is a comment',
+        timestamp=1437700000)
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+
+    approval = tracker_pb2.ApprovalValue(
+        approval_id=1, approver_ids=[111],  # requester
+        status=tracker_pb2.ApprovalStatus.NOT_SET)
+    request, issue = self.approvalRequest(
+        approval,
+        request_fields={'content': 'updated survey', 'is_description': True},
+        comment=comment)
+    response = self.call_api('approvals_comments_insert', request).json_body
+
+    approval_delta = tracker_bizobj.MakeApprovalDelta(
+        None, 111, [], [], [], [], [], [], [], set_on=test_time)
+    self.services.issue.DeltaUpdateIssueApproval.assert_called_with(
+        None, 111, self.config, issue, approval, approval_delta,
+        comment_content='updated survey', is_description=True)
+    self.assertEqual(response['author']['name'], 'requester@example.com')
+    self.assertTrue(response['canDelete'])
+
+  @patch('time.time')
+  @patch('features.send_notifications.PrepareAndSendApprovalChangeNotification')
+  def testApprovalsCommentsInsert_SendEmail(
+      self, mockPrepareAndSend, mock_time,):
+    test_time = 6789
+    mock_time.return_value = test_time
+    comment = tracker_pb2.IssueComment(
+        id=123, issue_id=10001,
+        project_id=12345, user_id=111,
+        content='this is a comment',
+        timestamp=1437700000)
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+
+    approval = tracker_pb2.ApprovalValue(
+        approval_id=1, approver_ids=[111],  # requester
+        status=tracker_pb2.ApprovalStatus.NOT_SET)
+    request, issue = self.approvalRequest(
+        approval,
+        request_fields={'content': comment.content, 'sendEmail': True},
+        comment=comment)
+
+    response = self.call_api('approvals_comments_insert', request).json_body
+
+    mockPrepareAndSend.assert_called_with(
+        issue.issue_id, approval.approval_id, ANY, comment.id, send_email=True)
+
+    approval_delta = tracker_bizobj.MakeApprovalDelta(
+        None, 111, [], [], [], [], [], [], [], set_on=test_time)
+    self.services.issue.DeltaUpdateIssueApproval.assert_called_with(
+        None, 111, self.config, issue, approval, approval_delta,
+        comment_content=comment.content, is_description=None)
+    self.assertEqual(response['author']['name'], 'requester@example.com')
+    self.assertTrue(response['canDelete'])
+
+  def testGroupsSettingsList_AllSettings(self):
+    resp = self.call_api('groups_settings_list', self.request).json_body
+    all_settings = resp['groupSettings']
+    self.assertEqual(1, len(all_settings))
+    self.assertEqual('group@example.com', all_settings[0]['groupName'])
+
+  def testGroupsSettingsList_ImportedSettings(self):
+    self.services.user.TestAddUser('imported@example.com', 234)
+    self.services.usergroup.TestAddGroupSettings(
+        234, 'imported@example.com', external_group_type='mdb')
+    self.request['importedGroupsOnly'] = True
+    resp = self.call_api('groups_settings_list', self.request).json_body
+    all_settings = resp['groupSettings']
+    self.assertEqual(1, len(all_settings))
+    self.assertEqual('imported@example.com', all_settings[0]['groupName'])
+
+  def testGroupsCreate_NoPermission(self):
+    self.request['groupName'] = 'group'
+    with self.call_should_fail(403):
+      self.call_api('groups_create', self.request)
+
+  def SetUpGroupRequest(self, group_name, who_can_view_members='MEMBERS',
+                        ext_group_type=None, perms=None,
+                        requester='requester@example.com'):
+    request = {
+        'groupName': group_name,
+        'requester': requester,
+        'who_can_view_members': who_can_view_members,
+        'ext_group_type': ext_group_type}
+    self.request.pop("userId", None)
+    self.mock(api_svc_v1.MonorailApi, 'mar_factory',
+              lambda x, y, z: FakeMonorailApiRequest(
+                  request, self.services, perms=perms))
+    return request
+
+  def testGroupsCreate_Normal(self):
+    request = self.SetUpGroupRequest('newgroup@example.com', 'MEMBERS',
+                                     'MDB', permissions.ADMIN_PERMISSIONSET)
+
+    resp = self.call_api('groups_create', request).json_body
+    self.assertIn('groupID', resp)
+
+  def testGroupsGet_NoPermission(self):
+    request = self.SetUpGroupRequest('group@example.com')
+    with self.call_should_fail(403):
+      self.call_api('groups_get', request)
+
+  def testGroupsGet_Normal(self):
+    request = self.SetUpGroupRequest('group@example.com',
+                                     perms=permissions.ADMIN_PERMISSIONSET)
+    self.services.usergroup.TestAddMembers(123, [111], 'member')
+    self.services.usergroup.TestAddMembers(123, [222], 'owner')
+    resp = self.call_api('groups_get', request).json_body
+    self.assertEqual(123, resp['groupID'])
+    self.assertEqual(['requester@example.com'], resp['groupMembers'])
+    self.assertEqual(['user@example.com'], resp['groupOwners'])
+    self.assertEqual('group@example.com', resp['groupSettings']['groupName'])
+
+  def testGroupsUpdate_NoPermission(self):
+    request = self.SetUpGroupRequest('group@example.com')
+    with self.call_should_fail(403):
+      self.call_api('groups_update', request)
+
+  def testGroupsUpdate_Normal(self):
+    request = self.SetUpGroupRequest('group@example.com')
+    request = self.SetUpGroupRequest('group@example.com',
+                                     perms=permissions.ADMIN_PERMISSIONSET)
+    request['last_sync_time'] = 123456789
+    request['groupOwners'] = ['requester@example.com']
+    request['groupMembers'] = ['user@example.com']
+    resp = self.call_api('groups_update', request).json_body
+    self.assertFalse(resp.get('error'))
+
+  def testComponentsList(self):
+    """Get components for a project."""
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+    self.SetUpComponents(12345, 1, 'API')
+    resp = self.call_api('components_list', self.request).json_body
+
+    self.assertEqual(1, len(resp['components']))
+    cd = resp['components'][0]
+    self.assertEqual(1, cd['componentId'])
+    self.assertEqual('API', cd['componentPath'])
+    self.assertEqual(1, cd['componentId'])
+    self.assertEqual('test-project', cd['projectName'])
+
+  def testComponentsCreate_NoPermission(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+    self.SetUpComponents(12345, 1, 'API')
+
+    cd_dict = {
+      'componentName': 'Test'}
+    self.request.update(cd_dict)
+
+    with self.call_should_fail(403):
+      self.call_api('components_create', self.request)
+
+  def testComponentsCreate_Invalid(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[111],
+        project_id=12345)
+    self.SetUpComponents(12345, 1, 'API')
+
+    # Component with invalid name
+    cd_dict = {
+      'componentName': 'c>d>e'}
+    self.request.update(cd_dict)
+    with self.call_should_fail(400):
+      self.call_api('components_create', self.request)
+
+    # Name already in use
+    cd_dict = {
+      'componentName': 'API'}
+    self.request.update(cd_dict)
+    with self.call_should_fail(400):
+      self.call_api('components_create', self.request)
+
+    # Parent component does not exist
+    cd_dict = {
+      'componentName': 'test',
+      'parentPath': 'NotExist'}
+    self.request.update(cd_dict)
+    with self.call_should_fail(404):
+      self.call_api('components_create', self.request)
+
+
+  def testComponentsCreate_Normal(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[111],
+        project_id=12345)
+    self.SetUpComponents(12345, 1, 'API')
+
+    cd_dict = {
+        'componentName': 'Test',
+        'description': 'test comp',
+        'cc': ['requester@example.com', '']
+    }
+    self.request.update(cd_dict)
+
+    resp = self.call_api('components_create', self.request).json_body
+    self.assertEqual('test comp', resp['description'])
+    self.assertEqual('requester@example.com', resp['creator'])
+    self.assertEqual([u'requester@example.com'], resp['cc'])
+    self.assertEqual('Test', resp['componentPath'])
+
+    cd_dict = {
+      'componentName': 'TestChild',
+      'parentPath': 'API'}
+    self.request.update(cd_dict)
+    resp = self.call_api('components_create', self.request).json_body
+
+    self.assertEqual('API>TestChild', resp['componentPath'])
+
+  def testComponentsDelete_Invalid(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+    self.SetUpComponents(12345, 1, 'API')
+
+    # Fail to delete a non-existent component
+    cd_dict = {
+      'componentPath': 'NotExist'}
+    self.request.update(cd_dict)
+    with self.call_should_fail(404):
+      self.call_api('components_delete', self.request)
+
+    # The user has no permission to delete component
+    cd_dict = {
+      'componentPath': 'API'}
+    self.request.update(cd_dict)
+    with self.call_should_fail(403):
+      self.call_api('components_delete', self.request)
+
+    # The user tries to delete component that had subcomponents
+    self.services.project.TestAddProject(
+        'test-project2', owner_ids=[111],
+        project_id=123456)
+    self.SetUpComponents(123456, 1, 'Parent')
+    self.SetUpComponents(123456, 2, 'Parent>Child')
+    cd_dict = {
+      'componentPath': 'Parent',
+      'projectId': 'test-project2',}
+    self.request.update(cd_dict)
+    with self.call_should_fail(403):
+      self.call_api('components_delete', self.request)
+
+  def testComponentsDelete_Normal(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[111],
+        project_id=12345)
+    self.SetUpComponents(12345, 1, 'API')
+
+    cd_dict = {
+      'componentPath': 'API'}
+    self.request.update(cd_dict)
+    _ = self.call_api('components_delete', self.request).json_body
+    self.assertEqual(0, len(self.config.component_defs))
+
+  def testComponentsUpdate_Invalid(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[222],
+        project_id=12345)
+    self.SetUpComponents(12345, 1, 'API')
+    self.SetUpComponents(12345, 2, 'Test', admin_ids=[111])
+
+    # Fail to update a non-existent component
+    cd_dict = {
+      'componentPath': 'NotExist'}
+    self.request.update(cd_dict)
+    with self.call_should_fail(404):
+      self.call_api('components_update', self.request)
+
+    # The user has no permission to edit component
+    cd_dict = {
+      'componentPath': 'API'}
+    self.request.update(cd_dict)
+    with self.call_should_fail(403):
+      self.call_api('components_update', self.request)
+
+    # The user tries an invalid component name
+    cd_dict = {
+      'componentPath': 'Test',
+      'updates': [{'field': 'LEAF_NAME', 'leafName': 'c>e'}]}
+    self.request.update(cd_dict)
+    with self.call_should_fail(400):
+      self.call_api('components_update', self.request)
+
+    # The user tries a name already in use
+    cd_dict = {
+      'componentPath': 'Test',
+      'updates': [{'field': 'LEAF_NAME', 'leafName': 'API'}]}
+    self.request.update(cd_dict)
+    with self.call_should_fail(400):
+      self.call_api('components_update', self.request)
+
+  def testComponentsUpdate_Normal(self):
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[111],
+        project_id=12345)
+    self.SetUpComponents(12345, 1, 'API')
+    self.SetUpComponents(12345, 2, 'Parent')
+    self.SetUpComponents(12345, 3, 'Parent>Child')
+
+    cd_dict = {
+      'componentPath': 'API',
+      'updates': [
+          {'field': 'DESCRIPTION', 'description': ''},
+          {'field': 'CC', 'cc': [
+              'requester@example.com', 'user@example.com', '', ' ']},
+          {'field': 'DEPRECATED', 'deprecated': True}]}
+    self.request.update(cd_dict)
+    _ = self.call_api('components_update', self.request).json_body
+    component_def = tracker_bizobj.FindComponentDef(
+        'API', self.config)
+    self.assertIsNotNone(component_def)
+    self.assertEqual('', component_def.docstring)
+    self.assertItemsEqual([111, 222], component_def.cc_ids)
+    self.assertTrue(component_def.deprecated)
+
+    cd_dict = {
+      'componentPath': 'Parent',
+      'updates': [
+          {'field': 'LEAF_NAME', 'leafName': 'NewParent'}]}
+    self.request.update(cd_dict)
+    _ = self.call_api('components_update', self.request).json_body
+    cd_parent = tracker_bizobj.FindComponentDef(
+        'NewParent', self.config)
+    cd_child = tracker_bizobj.FindComponentDef(
+        'NewParent>Child', self.config)
+    self.assertIsNotNone(cd_parent)
+    self.assertIsNotNone(cd_child)
+
+
+class RequestMock(object):
+
+  def __init__(self):
+    self.projectId = None
+    self.issueId = None
+
+
+class RequesterMock(object):
+
+  def __init__(self, email=None):
+    self._email = email
+
+  def email(self):
+    return self._email
+
+
+class AllBaseChecksTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = MakeFakeServiceManager()
+    self.services.user.TestAddUser('test@example.com', 111)
+    self.user_2 = self.services.user.TestAddUser('test@google.com', 222)
+    self.services.project.TestAddProject(
+        'test-project', owner_ids=[111], project_id=123,
+        access=project_pb2.ProjectAccess.MEMBERS_ONLY)
+    self.auth_client_ids = ['123456789.apps.googleusercontent.com']
+    oauth.get_client_id = Mock(return_value=self.auth_client_ids[0])
+    oauth.get_current_user = Mock(
+        return_value=RequesterMock(email='test@example.com'))
+    oauth.get_authorized_scopes = Mock()
+
+  def testUnauthorizedRequester(self):
+    with self.assertRaises(endpoints.UnauthorizedException):
+      api_svc_v1.api_base_checks(None, None, None, None, [], [])
+
+  def testNoUser(self):
+    requester = RequesterMock(email='notexist@example.com')
+    with self.assertRaises(exceptions.NoSuchUserException):
+      api_svc_v1.api_base_checks(
+          None, requester, self.services, None, self.auth_client_ids, [])
+
+  def testAllowedDomain_MonorailScope(self):
+    oauth.get_authorized_scopes.return_value = [
+        framework_constants.MONORAIL_SCOPE]
+    oauth.get_current_user.return_value = RequesterMock(
+        email=self.user_2.email)
+    allowlisted_client_ids = []
+    allowlisted_emails = []
+    client_id, email = api_svc_v1.api_base_checks(
+        None, None, self.services, None, allowlisted_client_ids,
+        allowlisted_emails)
+    self.assertEqual(client_id, self.auth_client_ids[0])
+    self.assertEqual(email, self.user_2.email)
+
+  def testAllowedDomain_NoMonorailScope(self):
+    oauth.get_authorized_scopes.return_value = []
+    oauth.get_current_user.return_value = RequesterMock(
+        email=self.user_2.email)
+    allowlisted_client_ids = []
+    allowlisted_emails = []
+    with self.assertRaises(endpoints.UnauthorizedException):
+      api_svc_v1.api_base_checks(
+          None, None, self.services, None, allowlisted_client_ids,
+          allowlisted_emails)
+
+  def testAllowedDomain_BadEmail(self):
+    oauth.get_authorized_scopes.return_value = [
+        framework_constants.MONORAIL_SCOPE]
+    oauth.get_current_user.return_value = RequesterMock(
+        email='chicken@chicken.test')
+    allowlisted_client_ids = []
+    allowlisted_emails = []
+    self.services.user.TestAddUser('chicken@chicken.test', 333)
+    with self.assertRaises(endpoints.UnauthorizedException):
+      api_svc_v1.api_base_checks(
+          None, None, self.services, None, allowlisted_client_ids,
+          allowlisted_emails)
+
+  def testNoOauthUser(self):
+    oauth.get_current_user.side_effect = oauth.Error()
+    with self.assertRaises(endpoints.UnauthorizedException):
+      api_svc_v1.api_base_checks(
+          None, None, self.services, None, [], [])
+
+  def testBannedUser(self):
+    banned_email = 'banned@example.com'
+    self.services.user.TestAddUser(banned_email, 222, banned=True)
+    requester = RequesterMock(email=banned_email)
+    with self.assertRaises(permissions.BannedUserException):
+      api_svc_v1.api_base_checks(
+          None, requester, self.services, None, self.auth_client_ids, [])
+
+  def testNoProject(self):
+    request = RequestMock()
+    request.projectId = 'notexist-project'
+    requester = RequesterMock(email='test@example.com')
+    with self.assertRaises(exceptions.NoSuchProjectException):
+      api_svc_v1.api_base_checks(
+          request, requester, self.services, None, self.auth_client_ids, [])
+
+  def testNonLiveProject(self):
+    archived_project = 'archived-project'
+    self.services.project.TestAddProject(
+        archived_project, owner_ids=[111],
+        state=project_pb2.ProjectState.ARCHIVED)
+    request = RequestMock()
+    request.projectId = archived_project
+    requester = RequesterMock(email='test@example.com')
+    with self.assertRaises(permissions.PermissionException):
+      api_svc_v1.api_base_checks(
+          request, requester, self.services, None, self.auth_client_ids, [])
+
+  def testNoViewProjectPermission(self):
+    nonmember_email = 'nonmember@example.com'
+    self.services.user.TestAddUser(nonmember_email, 222)
+    requester = RequesterMock(email=nonmember_email)
+    request = RequestMock()
+    request.projectId = 'test-project'
+    with self.assertRaises(permissions.PermissionException):
+      api_svc_v1.api_base_checks(
+          request, requester, self.services, None, self.auth_client_ids, [])
+
+  def testAllPass(self):
+    requester = RequesterMock(email='test@example.com')
+    request = RequestMock()
+    request.projectId = 'test-project'
+    api_svc_v1.api_base_checks(
+        request, requester, self.services, None, self.auth_client_ids, [])
+
+  def testNoIssue(self):
+    requester = RequesterMock(email='test@example.com')
+    request = RequestMock()
+    request.projectId = 'test-project'
+    request.issueId = 12345
+    with self.assertRaises(exceptions.NoSuchIssueException):
+      api_svc_v1.api_base_checks(
+          request, requester, self.services, None, self.auth_client_ids, [])
+
+  def testNoViewIssuePermission(self):
+    requester = RequesterMock(email='test@example.com')
+    request = RequestMock()
+    request.projectId = 'test-project'
+    request.issueId = 1
+    issue1 = fake.MakeTestIssue(
+        project_id=123, local_id=1, summary='test summary',
+        status='New', owner_id=111, reporter_id=111)
+    issue1.deleted = True
+    self.services.issue.TestAddIssue(issue1)
+    with self.assertRaises(permissions.PermissionException):
+      api_svc_v1.api_base_checks(
+          request, requester, self.services, None, self.auth_client_ids, [])
+
+  def testAnonymousClients(self):
+    # Some clients specifically pass "anonymous" as the client ID.
+    oauth.get_client_id = Mock(return_value='anonymous')
+    requester = RequesterMock(email='test@example.com')
+    request = RequestMock()
+    request.projectId = 'test-project'
+    api_svc_v1.api_base_checks(
+        request, requester, self.services, None, [], ['test@example.com'])
+
+    # Any client_id is OK if the email is allowlisted.
+    oauth.get_client_id = Mock(return_value='anything')
+    api_svc_v1.api_base_checks(
+        request, requester, self.services, None, [], ['test@example.com'])
+
+    # Reject request when neither client ID nor email is allowlisted.
+    with self.assertRaises(endpoints.UnauthorizedException):
+      api_svc_v1.api_base_checks(
+          request, requester, self.services, None, [], [])
diff --git a/services/test/cachemanager_svc_test.py b/services/test/cachemanager_svc_test.py
new file mode 100644
index 0000000..20956e0
--- /dev/null
+++ b/services/test/cachemanager_svc_test.py
@@ -0,0 +1,205 @@
+# 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
+
+"""Tests for the cachemanager service."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mox
+
+from framework import sql
+from services import cachemanager_svc
+from services import caches
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+
+
+class CacheManagerServiceTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.cnxn = fake.MonorailConnection()
+    self.cache_manager = cachemanager_svc.CacheManager()
+    self.cache_manager.invalidate_tbl = self.mox.CreateMock(
+        sql.SQLTableManager)
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testRegisterCache(self):
+    ram_cache = 'fake ramcache'
+    self.cache_manager.RegisterCache(ram_cache, 'issue')
+    self.assertTrue(ram_cache in self.cache_manager.cache_registry['issue'])
+
+  def testRegisterCache_UnknownKind(self):
+    ram_cache = 'fake ramcache'
+    self.assertRaises(
+      AssertionError,
+      self.cache_manager.RegisterCache, ram_cache, 'foo')
+
+  def testProcessInvalidateRows_Empty(self):
+    rows = []
+    self.cache_manager._ProcessInvalidationRows(rows)
+    self.assertEqual(0, self.cache_manager.processed_invalidations_up_to)
+
+  def testProcessInvalidateRows_Some(self):
+    ram_cache = caches.RamCache(self.cache_manager, 'issue')
+    ram_cache.CacheAll({
+        33: 'issue 33',
+        34: 'issue 34',
+        })
+    rows = [(1, 'issue', 34),
+            (2, 'project', 789),
+            (3, 'issue', 39)]
+    self.cache_manager._ProcessInvalidationRows(rows)
+    self.assertEqual(3, self.cache_manager.processed_invalidations_up_to)
+    self.assertTrue(ram_cache.HasItem(33))
+    self.assertFalse(ram_cache.HasItem(34))
+
+  def testProcessInvalidateRows_All(self):
+    ram_cache = caches.RamCache(self.cache_manager, 'issue')
+    ram_cache.CacheAll({
+        33: 'issue 33',
+        34: 'issue 34',
+        })
+    rows = [(991, 'issue', 34),
+            (992, 'project', 789),
+            (993, 'issue', cachemanager_svc.INVALIDATE_ALL_KEYS)]
+    self.cache_manager._ProcessInvalidationRows(rows)
+    self.assertEqual(993, self.cache_manager.processed_invalidations_up_to)
+    self.assertEqual({}, ram_cache.cache)
+
+  def SetUpDoDistributedInvalidation(self, rows):
+    self.cache_manager.invalidate_tbl.Select(
+        self.cnxn, cols=['timestep', 'kind', 'cache_key'],
+        where=[('timestep > %s', [0])],
+        order_by=[('timestep DESC', [])],
+        limit=cachemanager_svc.MAX_INVALIDATE_ROWS_TO_CONSIDER
+        ).AndReturn(rows)
+
+  def testDoDistributedInvalidation_Empty(self):
+    rows = []
+    self.SetUpDoDistributedInvalidation(rows)
+    self.mox.ReplayAll()
+    self.cache_manager.DoDistributedInvalidation(self.cnxn)
+    self.mox.VerifyAll()
+    self.assertEqual(0, self.cache_manager.processed_invalidations_up_to)
+
+  def testDoDistributedInvalidation_Some(self):
+    ram_cache = caches.RamCache(self.cache_manager, 'issue')
+    ram_cache.CacheAll({
+        33: 'issue 33',
+        34: 'issue 34',
+        })
+    rows = [(1, 'issue', 34),
+            (2, 'project', 789),
+            (3, 'issue', 39)]
+    self.SetUpDoDistributedInvalidation(rows)
+    self.mox.ReplayAll()
+    self.cache_manager.DoDistributedInvalidation(self.cnxn)
+    self.mox.VerifyAll()
+    self.assertEqual(3, self.cache_manager.processed_invalidations_up_to)
+    self.assertTrue(ram_cache.HasItem(33))
+    self.assertFalse(ram_cache.HasItem(34))
+
+  def testDoDistributedInvalidation_Redundant(self):
+    ram_cache = caches.RamCache(self.cache_manager, 'issue')
+    ram_cache.CacheAll({
+        33: 'issue 33',
+        34: 'issue 34',
+        })
+    rows = [(1, 'issue', 34),
+            (2, 'project', 789),
+            (3, 'issue', 39),
+            (4, 'project', 789),
+            (5, 'issue', 39)]
+    self.SetUpDoDistributedInvalidation(rows)
+    self.mox.ReplayAll()
+    self.cache_manager.DoDistributedInvalidation(self.cnxn)
+    self.mox.VerifyAll()
+    self.assertEqual(5, self.cache_manager.processed_invalidations_up_to)
+    self.assertTrue(ram_cache.HasItem(33))
+    self.assertFalse(ram_cache.HasItem(34))
+
+  def testStoreInvalidateRows_UnknownKind(self):
+    self.assertRaises(
+        AssertionError,
+        self.cache_manager.StoreInvalidateRows, self.cnxn, 'foo', [1, 2])
+
+  def SetUpStoreInvalidateRows(self, rows):
+    self.cache_manager.invalidate_tbl.InsertRows(
+        self.cnxn, ['kind', 'cache_key'], rows)
+
+  def testStoreInvalidateRows(self):
+    rows = [('issue', 1), ('issue', 2)]
+    self.SetUpStoreInvalidateRows(rows)
+    self.mox.ReplayAll()
+    self.cache_manager.StoreInvalidateRows(self.cnxn, 'issue', [1, 2])
+    self.mox.VerifyAll()
+
+  def SetUpStoreInvalidateAll(self, kind):
+    self.cache_manager.invalidate_tbl.InsertRow(
+        self.cnxn, kind=kind, cache_key=cachemanager_svc.INVALIDATE_ALL_KEYS,
+        ).AndReturn(44)
+    self.cache_manager.invalidate_tbl.Delete(
+        self.cnxn, kind=kind, where=[('timestep < %s', [44])])
+
+  def testStoreInvalidateAll(self):
+    self.SetUpStoreInvalidateAll('issue')
+    self.mox.ReplayAll()
+    self.cache_manager.StoreInvalidateAll(self.cnxn, 'issue')
+    self.mox.VerifyAll()
+
+
+class RamCacheConsolidateTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.cnxn = 'fake connection'
+    self.cache_manager = cachemanager_svc.CacheManager()
+    self.cache_manager.invalidate_tbl = self.mox.CreateMock(
+        sql.SQLTableManager)
+    self.services = service_manager.Services(
+        cache_manager=self.cache_manager)
+    self.servlet = cachemanager_svc.RamCacheConsolidate(
+        'req', 'res', services=self.services)
+
+  def testHandleRequest_NothingToDo(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    self.cache_manager.invalidate_tbl.SelectValue(
+        mr.cnxn, 'COUNT(*)').AndReturn(112)
+    self.cache_manager.invalidate_tbl.SelectValue(
+        mr.cnxn, 'COUNT(*)').AndReturn(112)
+    self.mox.ReplayAll()
+
+    json_data = self.servlet.HandleRequest(mr)
+    self.mox.VerifyAll()
+    self.assertEqual(json_data['old_count'], 112)
+    self.assertEqual(json_data['new_count'], 112)
+
+  def testHandleRequest_Truncate(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    self.cache_manager.invalidate_tbl.SelectValue(
+        mr.cnxn, 'COUNT(*)').AndReturn(4012)
+    self.cache_manager.invalidate_tbl.Select(
+        mr.cnxn, ['timestep'],
+        order_by=[('timestep DESC', [])],
+        limit=cachemanager_svc.MAX_INVALIDATE_ROWS_TO_CONSIDER
+        ).AndReturn([[3012]])  # Actual would be 1000 rows ending with 3012.
+    self.cache_manager.invalidate_tbl.Delete(
+        mr.cnxn, where=[('timestep < %s', [3012])])
+    self.cache_manager.invalidate_tbl.SelectValue(
+        mr.cnxn, 'COUNT(*)').AndReturn(1000)
+    self.mox.ReplayAll()
+
+    json_data = self.servlet.HandleRequest(mr)
+    self.mox.VerifyAll()
+    self.assertEqual(json_data['old_count'], 4012)
+    self.assertEqual(json_data['new_count'], 1000)
diff --git a/services/test/caches_test.py b/services/test/caches_test.py
new file mode 100644
index 0000000..4ced369
--- /dev/null
+++ b/services/test/caches_test.py
@@ -0,0 +1,418 @@
+# 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
+
+"""Tests for the cache classes."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import fakeredis
+import unittest
+
+from google.appengine.api import memcache
+from google.appengine.ext import testbed
+
+import settings
+from services import caches
+from testing import fake
+
+
+class RamCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake connection'
+    self.cache_manager = fake.CacheManager()
+    self.ram_cache = caches.RamCache(self.cache_manager, 'issue', max_size=3)
+
+  def testInit(self):
+    self.assertEqual('issue', self.ram_cache.kind)
+    self.assertEqual(3, self.ram_cache.max_size)
+    self.assertEqual(
+        [self.ram_cache],
+        self.cache_manager.cache_registry['issue'])
+
+  def testCacheItem(self):
+    self.ram_cache.CacheItem(123, 'foo')
+    self.assertEqual('foo', self.ram_cache.cache[123])
+
+  def testCacheItem_DropsOldItems(self):
+    self.ram_cache.CacheItem(123, 'foo')
+    self.ram_cache.CacheItem(234, 'foo')
+    self.ram_cache.CacheItem(345, 'foo')
+    self.ram_cache.CacheItem(456, 'foo')
+    # The cache does not get bigger than its limit.
+    self.assertEqual(3, len(self.ram_cache.cache))
+    # An old value is dropped, not the newly added one.
+    self.assertIn(456, self.ram_cache.cache)
+
+  def testCacheAll(self):
+    self.ram_cache.CacheAll({123: 'foo'})
+    self.assertEqual('foo', self.ram_cache.cache[123])
+
+  def testCacheAll_DropsOldItems(self):
+    self.ram_cache.CacheAll({1: 'a', 2: 'b', 3: 'c'})
+    self.ram_cache.CacheAll({4: 'x', 5: 'y'})
+    # The cache does not get bigger than its limit.
+    self.assertEqual(3, len(self.ram_cache.cache))
+    # An old value is dropped, not the newly added one.
+    self.assertIn(4, self.ram_cache.cache)
+    self.assertIn(5, self.ram_cache.cache)
+    self.assertEqual('y', self.ram_cache.cache[5])
+
+  def testHasItem(self):
+    self.ram_cache.CacheItem(123, 'foo')
+    self.assertTrue(self.ram_cache.HasItem(123))
+    self.assertFalse(self.ram_cache.HasItem(999))
+
+  def testGetItem(self):
+    self.ram_cache.CacheItem(123, 'foo')
+    self.assertEqual('foo', self.ram_cache.GetItem(123))
+    self.assertEqual(None, self.ram_cache.GetItem(456))
+
+  def testGetAll(self):
+    self.ram_cache.CacheItem(123, 'foo')
+    self.ram_cache.CacheItem(124, 'bar')
+    hits, misses = self.ram_cache.GetAll([123, 124, 999])
+    self.assertEqual({123: 'foo', 124: 'bar'}, hits)
+    self.assertEqual([999], misses)
+
+  def testLocalInvalidate(self):
+    self.ram_cache.CacheAll({123: 'a', 124: 'b', 125: 'c'})
+    self.ram_cache.LocalInvalidate(124)
+    self.assertEqual(2, len(self.ram_cache.cache))
+    self.assertNotIn(124, self.ram_cache.cache)
+
+    self.ram_cache.LocalInvalidate(999)
+    self.assertEqual(2, len(self.ram_cache.cache))
+
+  def testInvalidate(self):
+    self.ram_cache.CacheAll({123: 'a', 124: 'b', 125: 'c'})
+    self.ram_cache.Invalidate(self.cnxn, 124)
+    self.assertEqual(2, len(self.ram_cache.cache))
+    self.assertNotIn(124, self.ram_cache.cache)
+    self.assertEqual(self.cache_manager.last_call,
+                     ('StoreInvalidateRows', self.cnxn, 'issue', [124]))
+
+  def testInvalidateKeys(self):
+    self.ram_cache.CacheAll({123: 'a', 124: 'b', 125: 'c'})
+    self.ram_cache.InvalidateKeys(self.cnxn, [124])
+    self.assertEqual(2, len(self.ram_cache.cache))
+    self.assertNotIn(124, self.ram_cache.cache)
+    self.assertEqual(self.cache_manager.last_call,
+                     ('StoreInvalidateRows', self.cnxn, 'issue', [124]))
+
+  def testLocalInvalidateAll(self):
+    self.ram_cache.CacheAll({123: 'a', 124: 'b', 125: 'c'})
+    self.ram_cache.LocalInvalidateAll()
+    self.assertEqual(0, len(self.ram_cache.cache))
+
+  def testInvalidateAll(self):
+    self.ram_cache.CacheAll({123: 'a', 124: 'b', 125: 'c'})
+    self.ram_cache.InvalidateAll(self.cnxn)
+    self.assertEqual(0, len(self.ram_cache.cache))
+    self.assertEqual(self.cache_manager.last_call,
+                     ('StoreInvalidateAll', self.cnxn, 'issue'))
+
+
+class ShardedRamCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake connection'
+    self.cache_manager = fake.CacheManager()
+    self.sharded_ram_cache = caches.ShardedRamCache(
+        self.cache_manager, 'issue', max_size=3, num_shards=3)
+
+  def testLocalInvalidate(self):
+    self.sharded_ram_cache.CacheAll({
+        (123, 0): 'a',
+        (123, 1): 'aa',
+        (123, 2): 'aaa',
+        (124, 0): 'b',
+        (124, 1): 'bb',
+        (124, 2): 'bbb',
+        })
+    self.sharded_ram_cache.LocalInvalidate(124)
+    self.assertEqual(3, len(self.sharded_ram_cache.cache))
+    self.assertNotIn((124, 0), self.sharded_ram_cache.cache)
+    self.assertNotIn((124, 1), self.sharded_ram_cache.cache)
+    self.assertNotIn((124, 2), self.sharded_ram_cache.cache)
+
+    self.sharded_ram_cache.LocalInvalidate(999)
+    self.assertEqual(3, len(self.sharded_ram_cache.cache))
+
+
+class TestableTwoLevelCache(caches.AbstractTwoLevelCache):
+
+  def __init__(
+      self,
+      cache_manager,
+      kind,
+      max_size=None,
+      use_redis=False,
+      redis_client=None):
+    super(TestableTwoLevelCache, self).__init__(
+        cache_manager,
+        kind,
+        'testable:',
+        None,
+        max_size=max_size,
+        use_redis=use_redis,
+        redis_client=redis_client)
+
+  # pylint: disable=unused-argument
+  def FetchItems(self, cnxn, keys, **kwargs):
+    """On RAM and memcache miss, hit the database."""
+    return {key: key for key in keys if key < 900}
+
+
+class AbstractTwoLevelCacheTest_Memcache(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.cnxn = 'fake connection'
+    self.cache_manager = fake.CacheManager()
+    self.testable_2lc = TestableTwoLevelCache(self.cache_manager, 'issue')
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  def testCacheItem(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.assertEqual(12300, self.testable_2lc.cache.cache[123])
+
+  def testHasItem(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.assertTrue(self.testable_2lc.HasItem(123))
+    self.assertFalse(self.testable_2lc.HasItem(444))
+    self.assertFalse(self.testable_2lc.HasItem(999))
+
+  def testWriteToMemcache_Normal(self):
+    retrieved_dict = {123: 12300, 124: 12400}
+    self.testable_2lc._WriteToMemcache(retrieved_dict)
+    actual_123, _ = self.testable_2lc._ReadFromMemcache([123])
+    self.assertEqual(12300, actual_123[123])
+    actual_124, _ = self.testable_2lc._ReadFromMemcache([124])
+    self.assertEqual(12400, actual_124[124])
+
+  def testWriteToMemcache_String(self):
+    retrieved_dict = {123: 'foo', 124: 'bar'}
+    self.testable_2lc._WriteToMemcache(retrieved_dict)
+    actual_123, _ = self.testable_2lc._ReadFromMemcache([123])
+    self.assertEqual('foo', actual_123[123])
+    actual_124, _ = self.testable_2lc._ReadFromMemcache([124])
+    self.assertEqual('bar', actual_124[124])
+
+  def testWriteToMemcache_ProtobufInt(self):
+    self.testable_2lc.pb_class = int
+    retrieved_dict = {123: 12300, 124: 12400}
+    self.testable_2lc._WriteToMemcache(retrieved_dict)
+    actual_123, _ = self.testable_2lc._ReadFromMemcache([123])
+    self.assertEqual(12300, actual_123[123])
+    actual_124, _ = self.testable_2lc._ReadFromMemcache([124])
+    self.assertEqual(12400, actual_124[124])
+
+  def testWriteToMemcache_List(self):
+    retrieved_dict = {123: [1, 2, 3], 124: [1, 2, 4]}
+    self.testable_2lc._WriteToMemcache(retrieved_dict)
+    actual_123, _ = self.testable_2lc._ReadFromMemcache([123])
+    self.assertEqual([1, 2, 3], actual_123[123])
+    actual_124, _ = self.testable_2lc._ReadFromMemcache([124])
+    self.assertEqual([1, 2, 4], actual_124[124])
+
+  def testWriteToMemcache_Dict(self):
+    retrieved_dict = {123: {'ham': 2, 'spam': 3}, 124: {'eggs': 2, 'bean': 4}}
+    self.testable_2lc._WriteToMemcache(retrieved_dict)
+    actual_123, _ = self.testable_2lc._ReadFromMemcache([123])
+    self.assertEqual({'ham': 2, 'spam': 3}, actual_123[123])
+    actual_124, _ = self.testable_2lc._ReadFromMemcache([124])
+    self.assertEqual({'eggs': 2, 'bean': 4}, actual_124[124])
+
+  def testWriteToMemcache_HugeValue(self):
+    """If memcache refuses to store a huge value, we don't store any."""
+    self.testable_2lc._WriteToMemcache({124: 124999})  # Gets deleted.
+    huge_str = 'huge' * 260000
+    retrieved_dict = {123: huge_str, 124: 12400}
+    self.testable_2lc._WriteToMemcache(retrieved_dict)
+    actual_123 = memcache.get('testable:123')
+    self.assertEqual(None, actual_123)
+    actual_124 = memcache.get('testable:124')
+    self.assertEqual(None, actual_124)
+
+  def testGetAll_FetchGetsIt(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.testable_2lc.CacheItem(124, 12400)
+    # Clear the RAM cache so that we find items in memcache.
+    self.testable_2lc.cache.LocalInvalidateAll()
+    self.testable_2lc.CacheItem(125, 12500)
+    hits, misses = self.testable_2lc.GetAll(self.cnxn, [123, 124, 333, 444])
+    self.assertEqual({123: 12300, 124: 12400, 333: 333, 444: 444}, hits)
+    self.assertEqual([], misses)
+    # The RAM cache now has items found in memcache and DB.
+    self.assertItemsEqual(
+        [123, 124, 125, 333, 444], list(self.testable_2lc.cache.cache.keys()))
+
+  def testGetAll_FetchGetsItFromDB(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.testable_2lc.CacheItem(124, 12400)
+    hits, misses = self.testable_2lc.GetAll(self.cnxn, [123, 124, 333, 444])
+    self.assertEqual({123: 12300, 124: 12400, 333: 333, 444: 444}, hits)
+    self.assertEqual([], misses)
+
+  def testGetAll_FetchDoesNotFindIt(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.testable_2lc.CacheItem(124, 12400)
+    hits, misses = self.testable_2lc.GetAll(self.cnxn, [123, 124, 999])
+    self.assertEqual({123: 12300, 124: 12400}, hits)
+    self.assertEqual([999], misses)
+
+  def testInvalidateKeys(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.testable_2lc.CacheItem(124, 12400)
+    self.testable_2lc.CacheItem(125, 12500)
+    self.testable_2lc.InvalidateKeys(self.cnxn, [124])
+    self.assertEqual(2, len(self.testable_2lc.cache.cache))
+    self.assertNotIn(124, self.testable_2lc.cache.cache)
+    self.assertEqual(
+        self.cache_manager.last_call,
+        ('StoreInvalidateRows', self.cnxn, 'issue', [124]))
+
+  def testGetAllAlreadyInRam(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.testable_2lc.CacheItem(124, 12400)
+    hits, misses = self.testable_2lc.GetAllAlreadyInRam(
+        [123, 124, 333, 444, 999])
+    self.assertEqual({123: 12300, 124: 12400}, hits)
+    self.assertEqual([333, 444, 999], misses)
+
+  def testInvalidateAllRamEntries(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.testable_2lc.CacheItem(124, 12400)
+    self.testable_2lc.InvalidateAllRamEntries(self.cnxn)
+    self.assertFalse(self.testable_2lc.HasItem(123))
+    self.assertFalse(self.testable_2lc.HasItem(124))
+
+
+class AbstractTwoLevelCacheTest_Redis(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake connection'
+    self.cache_manager = fake.CacheManager()
+
+    self.server = fakeredis.FakeServer()
+    self.fake_redis_client = fakeredis.FakeRedis(server=self.server)
+    self.testable_2lc = TestableTwoLevelCache(
+        self.cache_manager,
+        'issue',
+        use_redis=True,
+        redis_client=self.fake_redis_client)
+
+  def tearDown(self):
+    self.fake_redis_client.flushall()
+
+  def testCacheItem(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.assertEqual(12300, self.testable_2lc.cache.cache[123])
+
+  def testHasItem(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.assertTrue(self.testable_2lc.HasItem(123))
+    self.assertFalse(self.testable_2lc.HasItem(444))
+    self.assertFalse(self.testable_2lc.HasItem(999))
+
+  def testWriteToRedis_Normal(self):
+    retrieved_dict = {123: 12300, 124: 12400}
+    self.testable_2lc._WriteToRedis(retrieved_dict)
+    actual_123, _ = self.testable_2lc._ReadFromRedis([123])
+    self.assertEqual(12300, actual_123[123])
+    actual_124, _ = self.testable_2lc._ReadFromRedis([124])
+    self.assertEqual(12400, actual_124[124])
+
+  def testWriteToRedis_str(self):
+    retrieved_dict = {111: 'foo', 222: 'bar'}
+    self.testable_2lc._WriteToRedis(retrieved_dict)
+    actual_111, _ = self.testable_2lc._ReadFromRedis([111])
+    self.assertEqual('foo', actual_111[111])
+    actual_222, _ = self.testable_2lc._ReadFromRedis([222])
+    self.assertEqual('bar', actual_222[222])
+
+  def testWriteToRedis_ProtobufInt(self):
+    self.testable_2lc.pb_class = int
+    retrieved_dict = {123: 12300, 124: 12400}
+    self.testable_2lc._WriteToRedis(retrieved_dict)
+    actual_123, _ = self.testable_2lc._ReadFromRedis([123])
+    self.assertEqual(12300, actual_123[123])
+    actual_124, _ = self.testable_2lc._ReadFromRedis([124])
+    self.assertEqual(12400, actual_124[124])
+
+  def testWriteToRedis_List(self):
+    retrieved_dict = {123: [1, 2, 3], 124: [1, 2, 4]}
+    self.testable_2lc._WriteToRedis(retrieved_dict)
+    actual_123, _ = self.testable_2lc._ReadFromRedis([123])
+    self.assertEqual([1, 2, 3], actual_123[123])
+    actual_124, _ = self.testable_2lc._ReadFromRedis([124])
+    self.assertEqual([1, 2, 4], actual_124[124])
+
+  def testWriteToRedis_Dict(self):
+    retrieved_dict = {123: {'ham': 2, 'spam': 3}, 124: {'eggs': 2, 'bean': 4}}
+    self.testable_2lc._WriteToRedis(retrieved_dict)
+    actual_123, _ = self.testable_2lc._ReadFromRedis([123])
+    self.assertEqual({'ham': 2, 'spam': 3}, actual_123[123])
+    actual_124, _ = self.testable_2lc._ReadFromRedis([124])
+    self.assertEqual({'eggs': 2, 'bean': 4}, actual_124[124])
+
+  def testGetAll_FetchGetsIt(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.testable_2lc.CacheItem(124, 12400)
+    # Clear the RAM cache so that we find items in redis.
+    self.testable_2lc.cache.LocalInvalidateAll()
+    self.testable_2lc.CacheItem(125, 12500)
+    hits, misses = self.testable_2lc.GetAll(self.cnxn, [123, 124, 333, 444])
+    self.assertEqual({123: 12300, 124: 12400, 333: 333, 444: 444}, hits)
+    self.assertEqual([], misses)
+    # The RAM cache now has items found in redis and DB.
+    self.assertItemsEqual(
+        [123, 124, 125, 333, 444], list(self.testable_2lc.cache.cache.keys()))
+
+  def testGetAll_FetchGetsItFromDB(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.testable_2lc.CacheItem(124, 12400)
+    hits, misses = self.testable_2lc.GetAll(self.cnxn, [123, 124, 333, 444])
+    self.assertEqual({123: 12300, 124: 12400, 333: 333, 444: 444}, hits)
+    self.assertEqual([], misses)
+
+  def testGetAll_FetchDoesNotFindIt(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.testable_2lc.CacheItem(124, 12400)
+    hits, misses = self.testable_2lc.GetAll(self.cnxn, [123, 124, 999])
+    self.assertEqual({123: 12300, 124: 12400}, hits)
+    self.assertEqual([999], misses)
+
+  def testInvalidateKeys(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.testable_2lc.CacheItem(124, 12400)
+    self.testable_2lc.CacheItem(125, 12500)
+    self.testable_2lc.InvalidateKeys(self.cnxn, [124])
+    self.assertEqual(2, len(self.testable_2lc.cache.cache))
+    self.assertNotIn(124, self.testable_2lc.cache.cache)
+    self.assertEqual(self.cache_manager.last_call,
+                     ('StoreInvalidateRows', self.cnxn, 'issue', [124]))
+
+  def testGetAllAlreadyInRam(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.testable_2lc.CacheItem(124, 12400)
+    hits, misses = self.testable_2lc.GetAllAlreadyInRam(
+        [123, 124, 333, 444, 999])
+    self.assertEqual({123: 12300, 124: 12400}, hits)
+    self.assertEqual([333, 444, 999], misses)
+
+  def testInvalidateAllRamEntries(self):
+    self.testable_2lc.CacheItem(123, 12300)
+    self.testable_2lc.CacheItem(124, 12400)
+    self.testable_2lc.InvalidateAllRamEntries(self.cnxn)
+    self.assertFalse(self.testable_2lc.HasItem(123))
+    self.assertFalse(self.testable_2lc.HasItem(124))
diff --git a/services/test/chart_svc_test.py b/services/test/chart_svc_test.py
new file mode 100644
index 0000000..fbd87df
--- /dev/null
+++ b/services/test/chart_svc_test.py
@@ -0,0 +1,713 @@
+# -*- coding: utf-8 -*-
+# Copyright 2018 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
+
+"""Unit tests for chart_svc module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import datetime
+import mox
+import re
+import settings
+import unittest
+
+from google.appengine.ext import testbed
+
+from services import chart_svc
+from services import config_svc
+from services import service_manager
+from framework import permissions
+from framework import sql
+from proto import ast_pb2
+from proto import tracker_pb2
+from search import ast2select
+from search import search_helpers
+from testing import fake
+from tracker import tracker_bizobj
+
+
+def MakeChartService(my_mox, config):
+  chart_service = chart_svc.ChartService(config)
+  for table_var in ['issuesnapshot_tbl', 'issuesnapshot2label_tbl',
+      'issuesnapshot2component_tbl', 'issuesnapshot2cctbl', 'labeldef_tbl']:
+    setattr(chart_service, table_var, my_mox.CreateMock(sql.SQLTableManager))
+  return chart_service
+
+
+class ChartServiceTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.mox = mox.Mox()
+    self.cnxn = self.mox.CreateMock(sql.MonorailConnection)
+    self.services = service_manager.Services()
+    self.config_service = fake.ConfigService()
+    self.services.config = self.config_service
+    self.services.chart = MakeChartService(self.mox, self.config_service)
+    self.services.issue = fake.IssueService()
+    self.mox.StubOutWithMock(self.services.chart, '_QueryToWhere')
+    self.mox.StubOutWithMock(search_helpers, 'GetPersonalAtRiskLabelIDs')
+    self.mox.StubOutWithMock(settings, 'num_logical_shards')
+    settings.num_logical_shards = 1
+    self.mox.StubOutWithMock(self.services.chart, '_currentTime')
+
+    self.defaultLeftJoins = [
+      ('Issue ON IssueSnapshot.issue_id = Issue.id', []),
+      ('Issue2Label AS Forbidden_label'
+       ' ON Issue.id = Forbidden_label.issue_id'
+       ' AND Forbidden_label.label_id IN (%s,%s)', [91, 81]),
+      ('Issue2Cc AS I2cc'
+       ' ON Issue.id = I2cc.issue_id'
+       ' AND I2cc.cc_id IN (%s,%s)', [10, 20]),
+    ]
+    self.defaultWheres = [
+      ('IssueSnapshot.period_start <= %s', [1514764800]),
+      ('IssueSnapshot.period_end > %s', [1514764800]),
+      ('Issue.is_spam = %s', [False]),
+      ('Issue.deleted = %s', [False]),
+      ('IssueSnapshot.project_id IN (%s)', [789]),
+      ('(Issue.reporter_id IN (%s,%s)'
+       ' OR Issue.owner_id IN (%s,%s)'
+       ' OR I2cc.cc_id IS NOT NULL'
+       ' OR Forbidden_label.label_id IS NULL)',
+       [10, 20, 10, 20]
+      ),
+    ]
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def _verifySQL(self, cols, left_joins, where, group_by=None):
+    for col in cols:
+      self.assertTrue(sql._IsValidColumnName(col))
+    for join_str, _ in left_joins:
+      self.assertTrue(sql._IsValidJoin(join_str))
+    for where_str, _ in where:
+      self.assertTrue(sql._IsValidWhereCond(where_str))
+    if group_by:
+      for groupby_str in group_by:
+        self.assertTrue(sql._IsValidGroupByTerm(groupby_str))
+
+  def testQueryIssueSnapshots_InvalidGroupBy(self):
+    """Make sure the `group_by` argument is checked."""
+    project = fake.Project(project_id=789)
+    perms = permissions.USER_PERMISSIONSET
+    search_helpers.GetPersonalAtRiskLabelIDs(self.cnxn, None,
+        self.config_service, [10, 20], project,
+        perms).AndReturn([91, 81])
+    self.services.chart._QueryToWhere(mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(([], [], []))
+
+    self.mox.ReplayAll()
+    with self.assertRaises(ValueError):
+      self.services.chart.QueryIssueSnapshots(self.cnxn, self.services,
+          unixtime=1514764800, effective_ids=[10, 20], project=project,
+          perms=perms, group_by='rutabaga', label_prefix='rutabaga')
+    self.mox.VerifyAll()
+
+  def testQueryIssueSnapshots_NoLabelPrefix(self):
+    """Make sure the `label_prefix` argument is required."""
+    project = fake.Project(project_id=789)
+    perms = permissions.USER_PERMISSIONSET
+    search_helpers.GetPersonalAtRiskLabelIDs(self.cnxn, None,
+        self.config_service, [10, 20], project,
+        perms).AndReturn([91, 81])
+    self.services.chart._QueryToWhere(mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(([], [], []))
+
+    self.mox.ReplayAll()
+    with self.assertRaises(ValueError):
+      self.services.chart.QueryIssueSnapshots(self.cnxn, self.services,
+          unixtime=1514764800, effective_ids=[10, 20], project=project,
+          perms=perms, group_by='label')
+    self.mox.VerifyAll()
+
+  def testQueryIssueSnapshots_Impossible(self):
+    """We give an error message when a query could never have results."""
+    project = fake.Project(project_id=789)
+    perms = permissions.USER_PERMISSIONSET
+    self.services.chart._QueryToWhere(mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg()).AndRaise(ast2select.NoPossibleResults())
+    self.mox.ReplayAll()
+    total, errors, limit_reached = self.services.chart.QueryIssueSnapshots(
+        self.cnxn, self.services,
+        unixtime=1514764800, effective_ids=[10, 20], project=project,
+        perms=perms, query='prefix=')
+    self.mox.VerifyAll()
+    self.assertEqual({}, total)
+    self.assertEqual(['Invalid query.'], errors)
+    self.assertFalse(limit_reached)
+
+  def testQueryIssueSnapshots_Components(self):
+    """Test a burndown query from a regular user grouping by component."""
+    project = fake.Project(project_id=789)
+    perms = permissions.PermissionSet(['BarPerm'])
+    search_helpers.GetPersonalAtRiskLabelIDs(self.cnxn, None,
+        self.config_service, [10, 20], project,
+        perms).AndReturn([91, 81])
+
+    cols = [
+      'Comp.path',
+      'COUNT(IssueSnapshot.issue_id)'
+    ]
+    left_joins = self.defaultLeftJoins + [
+      ('IssueSnapshot2Component AS Is2c'
+       ' ON Is2c.issuesnapshot_id = IssueSnapshot.id', []),
+      ('ComponentDef AS Comp ON Comp.id = Is2c.component_id', [])
+    ]
+    where = self.defaultWheres
+    group_by = ['Comp.path']
+    stmt, stmt_args = self.services.chart._BuildSnapshotQuery(cols, where,
+        left_joins, group_by, shard_id=0)
+
+    self.services.chart._QueryToWhere(mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(([], [], []))
+    self.cnxn.Execute(stmt, stmt_args, shard_id=0).AndReturn([])
+
+    self._verifySQL(cols, left_joins, where, group_by)
+
+    self.mox.ReplayAll()
+    self.services.chart.QueryIssueSnapshots(self.cnxn, self.services,
+        unixtime=1514764800, effective_ids=[10, 20], project=project,
+        perms=perms, group_by='component')
+    self.mox.VerifyAll()
+
+  def testQueryIssueSnapshots_Labels(self):
+    """Test a burndown query from a regular user grouping by label."""
+    project = fake.Project(project_id=789)
+    perms = permissions.PermissionSet(['BarPerm'])
+    search_helpers.GetPersonalAtRiskLabelIDs(self.cnxn, None,
+        self.config_service, [10, 20], project,
+        perms).AndReturn([91, 81])
+
+    cols = [
+      'Lab.label',
+      'COUNT(IssueSnapshot.issue_id)',
+    ]
+    left_joins = self.defaultLeftJoins + [
+      ('IssueSnapshot2Label AS Is2l'
+       ' ON Is2l.issuesnapshot_id = IssueSnapshot.id', []),
+      ('LabelDef AS Lab ON Lab.id = Is2l.label_id', [])
+    ]
+    where = self.defaultWheres + [
+      ('LOWER(Lab.label) LIKE %s', ['foo-%']),
+    ]
+    group_by = ['Lab.label']
+    stmt, stmt_args = self.services.chart._BuildSnapshotQuery(cols, where,
+        left_joins, group_by, shard_id=0)
+
+    self.services.chart._QueryToWhere(mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(([], [], []))
+    self.cnxn.Execute(stmt, stmt_args, shard_id=0).AndReturn([])
+
+    self._verifySQL(cols, left_joins, where, group_by)
+
+    self.mox.ReplayAll()
+    self.services.chart.QueryIssueSnapshots(self.cnxn, self.services,
+        unixtime=1514764800, effective_ids=[10, 20], project=project,
+        perms=perms, group_by='label', label_prefix='Foo')
+    self.mox.VerifyAll()
+
+  def testQueryIssueSnapshots_Open(self):
+    """Test a burndown query from a regular user grouping
+        by status is open or closed."""
+    project = fake.Project(project_id=789)
+    perms = permissions.PermissionSet(['BarPerm'])
+    search_helpers.GetPersonalAtRiskLabelIDs(self.cnxn, None,
+        self.config_service, [10, 20], project,
+        perms).AndReturn([91, 81])
+
+    cols = [
+      'IssueSnapshot.is_open',
+      'COUNT(IssueSnapshot.issue_id) AS issue_count',
+    ]
+
+    left_joins = self.defaultLeftJoins
+    where = self.defaultWheres
+    group_by = ['IssueSnapshot.is_open']
+    stmt, stmt_args = self.services.chart._BuildSnapshotQuery(cols, where,
+        left_joins, group_by, shard_id=0)
+
+    self.services.chart._QueryToWhere(mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(([], [], []))
+    self.cnxn.Execute(stmt, stmt_args, shard_id=0).AndReturn([])
+
+    self._verifySQL(cols, left_joins, where, group_by)
+
+    self.mox.ReplayAll()
+    self.services.chart.QueryIssueSnapshots(self.cnxn, self.services,
+        unixtime=1514764800, effective_ids=[10, 20], project=project,
+        perms=perms, group_by='open')
+    self.mox.VerifyAll()
+
+  def testQueryIssueSnapshots_Status(self):
+    """Test a burndown query from a regular user grouping by open status."""
+    project = fake.Project(project_id=789)
+    perms = permissions.PermissionSet(['BarPerm'])
+    search_helpers.GetPersonalAtRiskLabelIDs(self.cnxn, None,
+        self.config_service, [10, 20], project,
+        perms).AndReturn([91, 81])
+
+    cols = [
+      'Stats.status',
+      'COUNT(IssueSnapshot.issue_id)',
+    ]
+    left_joins = self.defaultLeftJoins + [
+        ('StatusDef AS Stats ON ' \
+        'Stats.id = IssueSnapshot.status_id', [])
+    ]
+    where = self.defaultWheres
+    group_by = ['Stats.status']
+    stmt, stmt_args = self.services.chart._BuildSnapshotQuery(cols, where,
+        left_joins, group_by, shard_id=0)
+
+    self.services.chart._QueryToWhere(mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(([], [], []))
+    self.cnxn.Execute(stmt, stmt_args, shard_id=0).AndReturn([])
+
+    self._verifySQL(cols, left_joins, where, group_by)
+
+    self.mox.ReplayAll()
+    self.services.chart.QueryIssueSnapshots(self.cnxn, self.services,
+        unixtime=1514764800, effective_ids=[10, 20], project=project,
+        perms=perms, group_by='status')
+    self.mox.VerifyAll()
+
+  def testQueryIssueSnapshots_Hotlist(self):
+    """Test a QueryIssueSnapshots when a hotlist is passed."""
+    hotlist = fake.Hotlist('hotlist_rutabaga', 19191)
+    project = fake.Project(project_id=789)
+    perms = permissions.PermissionSet(['BarPerm'])
+    search_helpers.GetPersonalAtRiskLabelIDs(self.cnxn, None,
+        self.config_service, [10, 20], project,
+        perms).AndReturn([91, 81])
+
+    cols = [
+      'IssueSnapshot.issue_id',
+    ]
+    left_joins = self.defaultLeftJoins + [
+        (('IssueSnapshot2Hotlist AS Is2h'
+          ' ON Is2h.issuesnapshot_id = IssueSnapshot.id'
+          ' AND Is2h.hotlist_id = %s'), [hotlist.hotlist_id]),
+    ]
+    where = self.defaultWheres + [
+      ('Is2h.hotlist_id = %s', [hotlist.hotlist_id]),
+    ]
+    group_by = []
+    stmt, stmt_args = self.services.chart._BuildSnapshotQuery(cols, where,
+        left_joins, group_by, shard_id=0)
+
+    self.services.chart._QueryToWhere(mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(([], [], []))
+    self.cnxn.Execute(stmt, stmt_args, shard_id=0).AndReturn([])
+
+    self._verifySQL(cols, left_joins, where, group_by)
+
+    self.mox.ReplayAll()
+    self.services.chart.QueryIssueSnapshots(self.cnxn, self.services,
+        unixtime=1514764800, effective_ids=[10, 20], project=project,
+        perms=perms, hotlist=hotlist)
+    self.mox.VerifyAll()
+
+  def testQueryIssueSnapshots_Owner(self):
+    """Test a burndown query from a regular user grouping by owner."""
+    project = fake.Project(project_id=789)
+    perms = permissions.PermissionSet(['BarPerm'])
+    search_helpers.GetPersonalAtRiskLabelIDs(self.cnxn, None,
+        self.config_service, [10, 20], project,
+        perms).AndReturn([91, 81])
+    cols = [
+      'IssueSnapshot.owner_id',
+      'COUNT(IssueSnapshot.issue_id)',
+    ]
+    left_joins = self.defaultLeftJoins
+    where = self.defaultWheres
+    group_by = ['IssueSnapshot.owner_id']
+    stmt, stmt_args = self.services.chart._BuildSnapshotQuery(cols, where,
+        left_joins, group_by, shard_id=0)
+
+    self.services.chart._QueryToWhere(mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(([], [], []))
+    self.cnxn.Execute(stmt, stmt_args, shard_id=0).AndReturn([])
+
+    self._verifySQL(cols, left_joins, where, group_by)
+
+    self.mox.ReplayAll()
+    self.services.chart.QueryIssueSnapshots(self.cnxn, self.services,
+        unixtime=1514764800, effective_ids=[10, 20], project=project,
+        perms=perms, group_by='owner')
+    self.mox.VerifyAll()
+
+  def testQueryIssueSnapshots_NoGroupBy(self):
+    """Test a burndown query from a regular user with no grouping."""
+    project = fake.Project(project_id=789)
+    perms = permissions.PermissionSet(['BarPerm'])
+    search_helpers.GetPersonalAtRiskLabelIDs(self.cnxn, None,
+        self.config_service, [10, 20], project,
+        perms).AndReturn([91, 81])
+
+    cols = [
+      'IssueSnapshot.issue_id',
+    ]
+    left_joins = self.defaultLeftJoins
+    where = self.defaultWheres
+    group_by = None
+    stmt, stmt_args = self.services.chart._BuildSnapshotQuery(cols, where,
+        left_joins, group_by, shard_id=0)
+
+    self.services.chart._QueryToWhere(mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(([], [], []))
+    self.cnxn.Execute(stmt, stmt_args, shard_id=0).AndReturn([])
+
+    self._verifySQL(cols, left_joins, where)
+
+    self.mox.ReplayAll()
+    self.services.chart.QueryIssueSnapshots(self.cnxn, self.services,
+        unixtime=1514764800, effective_ids=[10, 20], project=project,
+        perms=perms, group_by=None, label_prefix='Foo')
+    self.mox.VerifyAll()
+
+  def testQueryIssueSnapshots_LabelsNotLoggedInUser(self):
+    """Tests fetching burndown snapshot counts grouped by labels
+    for a user who is not logged in. Also no restricted labels are
+    present.
+    """
+    project = fake.Project(project_id=789)
+    perms = permissions.READ_ONLY_PERMISSIONSET
+    search_helpers.GetPersonalAtRiskLabelIDs(self.cnxn, None,
+        self.config_service, set([]), project,
+        perms).AndReturn([91, 81])
+
+    cols = [
+      'Lab.label',
+      'COUNT(IssueSnapshot.issue_id)',
+    ]
+    left_joins = [
+      ('Issue ON IssueSnapshot.issue_id = Issue.id', []),
+      ('Issue2Label AS Forbidden_label'
+       ' ON Issue.id = Forbidden_label.issue_id'
+       ' AND Forbidden_label.label_id IN (%s,%s)', [91, 81]),
+      ('IssueSnapshot2Label AS Is2l'
+       ' ON Is2l.issuesnapshot_id = IssueSnapshot.id', []),
+      ('LabelDef AS Lab ON Lab.id = Is2l.label_id', []),
+    ]
+    where = [
+      ('IssueSnapshot.period_start <= %s', [1514764800]),
+      ('IssueSnapshot.period_end > %s', [1514764800]),
+      ('Issue.is_spam = %s', [False]),
+      ('Issue.deleted = %s', [False]),
+      ('IssueSnapshot.project_id IN (%s)', [789]),
+      ('Forbidden_label.label_id IS NULL', []),
+      ('LOWER(Lab.label) LIKE %s', ['foo-%']),
+    ]
+    group_by = ['Lab.label']
+    stmt, stmt_args = self.services.chart._BuildSnapshotQuery(cols, where,
+        left_joins, group_by, shard_id=0)
+
+    self.services.chart._QueryToWhere(mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(([], [], []))
+    self.cnxn.Execute(stmt, stmt_args, shard_id=0).AndReturn([])
+
+    self._verifySQL(cols, left_joins, where, group_by)
+
+    self.mox.ReplayAll()
+    self.services.chart.QueryIssueSnapshots(self.cnxn, self.services,
+        unixtime=1514764800, effective_ids=set([]), project=project,
+        perms=perms, group_by='label', label_prefix='Foo')
+    self.mox.VerifyAll()
+
+  def testQueryIssueSnapshots_NoRestrictedLabels(self):
+    """Test a label burndown query when the project has no restricted labels."""
+    project = fake.Project(project_id=789)
+    perms = permissions.USER_PERMISSIONSET
+    search_helpers.GetPersonalAtRiskLabelIDs(self.cnxn, None,
+        self.config_service, [10, 20], project,
+        perms).AndReturn([])
+
+    cols = [
+      'Lab.label',
+      'COUNT(IssueSnapshot.issue_id)',
+    ]
+    left_joins = [
+      ('Issue ON IssueSnapshot.issue_id = Issue.id', []),
+      ('Issue2Cc AS I2cc'
+       ' ON Issue.id = I2cc.issue_id'
+       ' AND I2cc.cc_id IN (%s,%s)', [10, 20]),
+      ('IssueSnapshot2Label AS Is2l'
+       ' ON Is2l.issuesnapshot_id = IssueSnapshot.id', []),
+      ('LabelDef AS Lab ON Lab.id = Is2l.label_id', []),
+    ]
+    where = [
+      ('IssueSnapshot.period_start <= %s', [1514764800]),
+      ('IssueSnapshot.period_end > %s', [1514764800]),
+      ('Issue.is_spam = %s', [False]),
+      ('Issue.deleted = %s', [False]),
+      ('IssueSnapshot.project_id IN (%s)', [789]),
+      ('(Issue.reporter_id IN (%s,%s)'
+       ' OR Issue.owner_id IN (%s,%s)'
+       ' OR I2cc.cc_id IS NOT NULL)',
+       [10, 20, 10, 20]
+      ),
+      ('LOWER(Lab.label) LIKE %s', ['foo-%']),
+    ]
+    group_by = ['Lab.label']
+    stmt, stmt_args = self.services.chart._BuildSnapshotQuery(cols, where,
+        left_joins, group_by, shard_id=0)
+
+    self.services.chart._QueryToWhere(mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn(([], [], []))
+    self.cnxn.Execute(stmt, stmt_args, shard_id=0).AndReturn([])
+
+    self._verifySQL(cols, left_joins, where, group_by)
+
+    self.mox.ReplayAll()
+    self.services.chart.QueryIssueSnapshots(self.cnxn, self.services,
+        unixtime=1514764800, effective_ids=[10, 20], project=project,
+        perms=perms, group_by='label', label_prefix='Foo')
+    self.mox.VerifyAll()
+
+  def SetUpStoreIssueSnapshots(self, replace_now=None,
+                               project_id=789, owner_id=111,
+                               component_ids=None, cc_rows=None):
+    """Set up all calls to mocks that StoreIssueSnapshots will call."""
+    now = self.services.chart._currentTime().AndReturn(replace_now or 12345678)
+
+    self.services.chart.issuesnapshot_tbl.Update(self.cnxn,
+        delta={'period_end': now},
+        where=[('IssueSnapshot.issue_id = %s', [78901]),
+          ('IssueSnapshot.period_end = %s',
+            [settings.maximum_snapshot_period_end])],
+        commit=False)
+
+    # Shard is 0 because len(shards) = 1 and 1 % 1 = 0.
+    shard = 0
+    self.services.chart.issuesnapshot_tbl.InsertRows(self.cnxn,
+      chart_svc.ISSUESNAPSHOT_COLS[1:],
+      [(78901, shard, project_id, 1, 111, owner_id, 1,
+        now, 4294967295, True)],
+      replace=True, commit=False, return_generated_ids=True).AndReturn([5678])
+
+    label_rows = [(5678, 1)]
+
+    self.services.chart.issuesnapshot2label_tbl.InsertRows(self.cnxn,
+        chart_svc.ISSUESNAPSHOT2LABEL_COLS,
+        label_rows,
+        replace=True, commit=False)
+
+    self.services.chart.issuesnapshot2cc_tbl.InsertRows(
+        self.cnxn, chart_svc.ISSUESNAPSHOT2CC_COLS,
+        [(5678, row[1]) for row in cc_rows],
+        replace=True, commit=False)
+
+    component_rows = [(5678, component_id) for component_id in component_ids]
+    self.services.chart.issuesnapshot2component_tbl.InsertRows(
+        self.cnxn, chart_svc.ISSUESNAPSHOT2COMPONENT_COLS,
+        component_rows,
+        replace=True, commit=False)
+
+    # Spacing of string must match.
+    self.cnxn.Execute((
+      '\n        INSERT INTO IssueSnapshot2Hotlist '
+      '(issuesnapshot_id, hotlist_id)\n        '
+      'SELECT %s, hotlist_id FROM Hotlist2Issue '
+      'WHERE issue_id = %s\n      '
+    ), [5678, 78901])
+
+  def testStoreIssueSnapshots_NoChange(self):
+    """Test that StoreIssueSnapshots inserts and updates previous
+    issue snapshots correctly."""
+
+    now_1 = 1517599888
+    now_2 = 1517599999
+
+    issue = fake.MakeTestIssue(issue_id=78901,
+        project_id=789, local_id=1, reporter_id=111, owner_id=111,
+        summary='sum', status='Status1',
+        labels=['Type-Defect'],
+        component_ids=[11], assume_stale=False,
+        opened_timestamp=123456789, modified_timestamp=123456789,
+        star_count=12, cc_ids=[222, 333], derived_cc_ids=[888])
+
+    # Snapshot #1
+    cc_rows = [(5678, 222), (5678, 333), (5678, 888)]
+    self.SetUpStoreIssueSnapshots(replace_now=now_1,
+      component_ids=[11], cc_rows=cc_rows)
+
+    # Snapshot #2
+    self.SetUpStoreIssueSnapshots(replace_now=now_2,
+      component_ids=[11], cc_rows=cc_rows)
+
+    self.mox.ReplayAll()
+    self.services.chart.StoreIssueSnapshots(self.cnxn, [issue], commit=False)
+    self.services.chart.StoreIssueSnapshots(self.cnxn, [issue], commit=False)
+    self.mox.VerifyAll()
+
+  def testStoreIssueSnapshots_AllFieldsChanged(self):
+    """Test that StoreIssueSnapshots inserts and updates previous
+    issue snapshots correctly. This tests that all relations (labels,
+    CCs, and components) are updated."""
+
+    now_1 = 1517599888
+    now_2 = 1517599999
+
+    issue_1 = fake.MakeTestIssue(issue_id=78901,
+        project_id=789, local_id=1, reporter_id=111, owner_id=111,
+        summary='sum', status='Status1',
+        labels=['Type-Defect'],
+        component_ids=[11, 12], assume_stale=False,
+        opened_timestamp=123456789, modified_timestamp=123456789,
+        star_count=12, cc_ids=[222, 333], derived_cc_ids=[888])
+
+    issue_2 = fake.MakeTestIssue(issue_id=78901,
+        project_id=123, local_id=1, reporter_id=111, owner_id=222,
+        summary='sum', status='Status2',
+        labels=['Type-Enhancement'],
+        component_ids=[13], assume_stale=False,
+        opened_timestamp=123456789, modified_timestamp=123456789,
+        star_count=12, cc_ids=[222, 444], derived_cc_ids=[888, 999])
+
+    # Snapshot #1
+    cc_rows_1 = [(5678, 222), (5678, 333), (5678, 888)]
+    self.SetUpStoreIssueSnapshots(replace_now=now_1,
+      component_ids=[11, 12], cc_rows=cc_rows_1)
+
+    # Snapshot #2
+    cc_rows_2 = [(5678, 222), (5678, 444), (5678, 888), (5678, 999)]
+    self.SetUpStoreIssueSnapshots(replace_now=now_2,
+      project_id=123, owner_id=222, component_ids=[13],
+      cc_rows=cc_rows_2)
+
+    self.mox.ReplayAll()
+    self.services.chart.StoreIssueSnapshots(self.cnxn, [issue_1], commit=False)
+    self.services.chart.StoreIssueSnapshots(self.cnxn, [issue_2], commit=False)
+    self.mox.VerifyAll()
+
+  def testQueryIssueSnapshots_WithQueryStringAndCannedQuery(self):
+    """Test the query param is parsed and used."""
+    project = fake.Project(project_id=789)
+    perms = permissions.USER_PERMISSIONSET
+    search_helpers.GetPersonalAtRiskLabelIDs(self.cnxn, None,
+      self.config_service, [10, 20], project, perms).AndReturn([])
+
+    cols = [
+      'Lab.label',
+      'COUNT(IssueSnapshot.issue_id)',
+    ]
+    left_joins = [
+      ('Issue ON IssueSnapshot.issue_id = Issue.id', []),
+      ('Issue2Cc AS I2cc'
+       ' ON Issue.id = I2cc.issue_id'
+       ' AND I2cc.cc_id IN (%s,%s)', [10, 20]),
+      ('IssueSnapshot2Label AS Is2l'
+       ' ON Is2l.issuesnapshot_id = IssueSnapshot.id', []),
+      ('LabelDef AS Lab ON Lab.id = Is2l.label_id', []),
+      ('IssueSnapshot2Label AS Cond0 '
+       'ON IssueSnapshot.id = Cond0.issuesnapshot_id '
+       'AND Cond0.label_id = %s', [15]),
+    ]
+    where = [
+      ('IssueSnapshot.period_start <= %s', [1514764800]),
+      ('IssueSnapshot.period_end > %s', [1514764800]),
+      ('Issue.is_spam = %s', [False]),
+      ('Issue.deleted = %s', [False]),
+      ('IssueSnapshot.project_id IN (%s)', [789]),
+      ('(Issue.reporter_id IN (%s,%s)'
+       ' OR Issue.owner_id IN (%s,%s)'
+       ' OR I2cc.cc_id IS NOT NULL)',
+       [10, 20, 10, 20]
+      ),
+      ('LOWER(Lab.label) LIKE %s', ['foo-%']),
+      ('Cond0.label_id IS NULL', []),
+      ('IssueSnapshot.is_open = %s', [True]),
+    ]
+    group_by = ['Lab.label']
+
+    query_left_joins = [(
+        'IssueSnapshot2Label AS Cond0 '
+        'ON IssueSnapshot.id = Cond0.issuesnapshot_id '
+        'AND Cond0.label_id = %s', [15])]
+    query_where = [
+      ('Cond0.label_id IS NULL', []),
+      ('IssueSnapshot.is_open = %s', [True]),
+    ]
+
+    unsupported_field_names = ['ownerbouncing']
+
+    unsupported_conds = [
+      ast_pb2.Condition(op=ast_pb2.QueryOp(1), field_defs=[
+        tracker_pb2.FieldDef(field_name='ownerbouncing',
+                             field_type=tracker_pb2.FieldTypes.BOOL_TYPE),
+      ])
+    ]
+
+    stmt, stmt_args = self.services.chart._BuildSnapshotQuery(cols, where,
+        left_joins, group_by, shard_id=0)
+
+    self.services.chart._QueryToWhere(mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg(), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg()).AndReturn((query_left_joins, query_where,
+        unsupported_conds))
+    self.cnxn.Execute(stmt, stmt_args, shard_id=0).AndReturn([])
+
+    self._verifySQL(cols, left_joins, where, group_by)
+
+    self.mox.ReplayAll()
+    _, unsupported, limit_reached = self.services.chart.QueryIssueSnapshots(
+        self.cnxn, self.services, unixtime=1514764800,
+        effective_ids=[10, 20], project=project, perms=perms,
+        group_by='label', label_prefix='Foo',
+        query='-label:Performance%20is:ownerbouncing', canned_query='is:open')
+    self.mox.VerifyAll()
+
+    self.assertEqual(unsupported_field_names, unsupported)
+    self.assertFalse(limit_reached)
+
+  def testQueryToWhere_AddsShardId(self):
+    """Test that shards are handled correctly."""
+    cols = []
+    where = []
+    joins = []
+    group_by = []
+    stmt, stmt_args = self.services.chart._BuildSnapshotQuery(cols=cols,
+        where=where, joins=joins, group_by=group_by, shard_id=9)
+
+    self.assertEqual(stmt, ('SELECT COUNT(results.issue_id) '
+        'FROM (SELECT DISTINCT  FROM IssueSnapshot\n'
+        'WHERE IssueSnapshot.shard = %s\nLIMIT 10000) AS results'))
+    self.assertEqual(stmt_args, [9])
+
+    # Test that shard_id is still correct on second invocation.
+    stmt, stmt_args = self.services.chart._BuildSnapshotQuery(cols=cols,
+        where=where, joins=joins, group_by=group_by, shard_id=8)
+
+    self.assertEqual(stmt, ('SELECT COUNT(results.issue_id) '
+        'FROM (SELECT DISTINCT  FROM IssueSnapshot\n'
+        'WHERE IssueSnapshot.shard = %s\nLIMIT 10000) AS results'))
+    self.assertEqual(stmt_args, [8])
+
+    # Test no parameters were modified.
+    self.assertEqual(cols, [])
+    self.assertEqual(where, [])
+    self.assertEqual(joins, [])
+    self.assertEqual(group_by, [])
diff --git a/services/test/client_config_svc_test.py b/services/test/client_config_svc_test.py
new file mode 100644
index 0000000..5e9b87a
--- /dev/null
+++ b/services/test/client_config_svc_test.py
@@ -0,0 +1,133 @@
+# 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
+
+"""Tests for the client config service."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import base64
+import unittest
+
+from services import client_config_svc
+
+
+class LoadApiClientConfigsTest(unittest.TestCase):
+
+  class FakeResponse(object):
+    def __init__(self, content):
+      self.content = content
+
+  def setUp(self):
+    self.handler = client_config_svc.LoadApiClientConfigs()
+
+  def testProcessResponse_InvalidJSON(self):
+    r = self.FakeResponse('}{')
+    with self.assertRaises(ValueError):
+      self.handler._process_response(r)
+
+  def testProcessResponse_NoContent(self):
+    r = self.FakeResponse('{"wrong-key": "some-value"}')
+    with self.assertRaises(KeyError):
+      self.handler._process_response(r)
+
+  def testProcessResponse_NotB64(self):
+    # 'asd' is not a valid base64-encoded string.
+    r = self.FakeResponse('{"content": "asd"}')
+    with self.assertRaises(TypeError):
+      self.handler._process_response(r)
+
+  def testProcessResponse_NotProto(self):
+    # 'asdf' is a valid base64-encoded string.
+    r = self.FakeResponse('{"content": "asdf"}')
+    with self.assertRaises(Exception):
+      self.handler._process_response(r)
+
+  def testProcessResponse_Success(self):
+    with open(client_config_svc.CONFIG_FILE_PATH) as f:
+      r = self.FakeResponse('{"content": "%s"}' % base64.b64encode(f.read()))
+    c = self.handler._process_response(r)
+    assert '123456789.apps.googleusercontent.com' in c
+
+
+class ClientConfigServiceTest(unittest.TestCase):
+
+  def setUp(self):
+    self.client_config_svc = client_config_svc.GetClientConfigSvc()
+    self.client_email = '123456789@developer.gserviceaccount.com'
+    self.client_id = '123456789.apps.googleusercontent.com'
+    self.allowed_origins = {'chicken.test', 'cow.test', 'goat.test'}
+
+  def testGetDisplayNames(self):
+    display_names_map = self.client_config_svc.GetDisplayNames()
+    self.assertIn(self.client_email, display_names_map)
+    self.assertEqual('johndoe@example.com',
+                     display_names_map[self.client_email])
+
+  def testGetQPMDict(self):
+    qpm_map = self.client_config_svc.GetQPM()
+    self.assertIn(self.client_email, qpm_map)
+    self.assertEqual(1, qpm_map[self.client_email])
+    self.assertNotIn('bugdroid1@chromium.org', qpm_map)
+
+  def testGetClientIDEmails(self):
+    auth_client_ids, auth_emails = self.client_config_svc.GetClientIDEmails()
+    self.assertIn(self.client_id, auth_client_ids)
+    self.assertIn(self.client_email, auth_emails)
+
+  def testGetAllowedOriginsSet(self):
+    origins = self.client_config_svc.GetAllowedOriginsSet()
+    self.assertEqual(self.allowed_origins, origins)
+
+  def testForceLoad(self):
+    EXPIRES_IN = client_config_svc.ClientConfigService.EXPIRES_IN
+    NOW = 1493007338
+    # First time it will always read the config
+    self.client_config_svc.load_time = NOW
+    self.client_config_svc.GetConfigs(use_cache=True)
+    self.assertNotEqual(NOW, self.client_config_svc.load_time)
+
+    # use_cache is false and it will read the config
+    self.client_config_svc.load_time = NOW
+    self.client_config_svc.GetConfigs(
+        use_cache=False, cur_time=NOW + 1)
+    self.assertNotEqual(NOW, self.client_config_svc.load_time)
+
+    # Cache expires after some time and it will read the config
+    self.client_config_svc.load_time = NOW
+    self.client_config_svc.GetConfigs(
+        use_cache=True, cur_time=NOW + EXPIRES_IN + 1)
+    self.assertNotEqual(NOW, self.client_config_svc.load_time)
+
+    # otherwise it should just use the cache
+    self.client_config_svc.load_time = NOW
+    self.client_config_svc.GetConfigs(
+        use_cache=True, cur_time=NOW + EXPIRES_IN - 1)
+    self.assertEqual(NOW, self.client_config_svc.load_time)
+
+
+class ClientConfigServiceFunctionsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.client_email = '123456789@developer.gserviceaccount.com'
+    self.allowed_origins = {'chicken.test', 'cow.test', 'goat.test'}
+
+  def testGetServiceAccountMap(self):
+    service_account_map = client_config_svc.GetServiceAccountMap()
+    self.assertIn(self.client_email, service_account_map)
+    self.assertEqual(
+        'johndoe@example.com',
+        service_account_map[self.client_email])
+    self.assertNotIn('bugdroid1@chromium.org', service_account_map)
+
+  def testGetQPMDict(self):
+    qpm_map = client_config_svc.GetQPMDict()
+    self.assertIn(self.client_email, qpm_map)
+    self.assertEqual(1, qpm_map[self.client_email])
+    self.assertNotIn('bugdroid1@chromium.org', qpm_map)
+
+  def testGetAllowedOriginsSet(self):
+    allowed_origins = client_config_svc.GetAllowedOriginsSet()
+    self.assertEqual(self.allowed_origins, allowed_origins)
diff --git a/services/test/config_svc_test.py b/services/test/config_svc_test.py
new file mode 100644
index 0000000..6d1d941
--- /dev/null
+++ b/services/test/config_svc_test.py
@@ -0,0 +1,1143 @@
+# 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
+
+"""Unit tests for config_svc module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import re
+import unittest
+import logging
+import mock
+
+import mox
+
+from google.appengine.api import memcache
+from google.appengine.ext import testbed
+
+from framework import exceptions
+from framework import framework_constants
+from framework import sql
+from proto import tracker_pb2
+from services import config_svc
+from services import template_svc
+from testing import fake
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+LABEL_ROW_SHARDS = config_svc.LABEL_ROW_SHARDS
+
+
+def MakeConfigService(cache_manager, my_mox):
+  config_service = config_svc.ConfigService(cache_manager)
+  for table_var in ['projectissueconfig_tbl', 'statusdef_tbl', 'labeldef_tbl',
+                    'fielddef_tbl', 'fielddef2admin_tbl', 'fielddef2editor_tbl',
+                    'componentdef_tbl', 'component2admin_tbl',
+                    'component2cc_tbl', 'component2label_tbl',
+                    'approvaldef2approver_tbl', 'approvaldef2survey_tbl']:
+    setattr(config_service, table_var, my_mox.CreateMock(sql.SQLTableManager))
+
+  return config_service
+
+
+class LabelRowTwoLevelCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.cnxn = 'fake connection'
+    self.cache_manager = fake.CacheManager()
+    self.config_service = MakeConfigService(self.cache_manager, self.mox)
+    self.label_row_2lc = self.config_service.label_row_2lc
+
+    self.rows = [(1, 789, 1, 'A', 'doc', False),
+                 (2, 789, 2, 'B', 'doc', False),
+                 (3, 678, 1, 'C', 'doc', True),
+                 (4, 678, None, 'D', 'doc', False)]
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testDeserializeLabelRows_Empty(self):
+    label_row_dict = self.label_row_2lc._DeserializeLabelRows([])
+    self.assertEqual({}, label_row_dict)
+
+  def testDeserializeLabelRows_Normal(self):
+    label_rows_dict = self.label_row_2lc._DeserializeLabelRows(self.rows)
+    expected = {
+        (789, 1): [(1, 789, 1, 'A', 'doc', False)],
+        (789, 2): [(2, 789, 2, 'B', 'doc', False)],
+        (678, 3): [(3, 678, 1, 'C', 'doc', True)],
+        (678, 4): [(4, 678, None, 'D', 'doc', False)],
+        }
+    self.assertEqual(expected, label_rows_dict)
+
+  def SetUpFetchItems(self, keys, rows):
+    for (project_id, shard_id) in keys:
+      sharded_rows = [row for row in rows
+                      if row[0] % LABEL_ROW_SHARDS == shard_id]
+      self.config_service.labeldef_tbl.Select(
+        self.cnxn, cols=config_svc.LABELDEF_COLS, project_id=project_id,
+        where=[('id %% %s = %s', [LABEL_ROW_SHARDS, shard_id])]).AndReturn(
+        sharded_rows)
+
+  def testFetchItems(self):
+    keys = [(567, 0), (678, 0), (789, 0),
+            (567, 1), (678, 1), (789, 1),
+            (567, 2), (678, 2), (789, 2),
+            (567, 3), (678, 3), (789, 3),
+            (567, 4), (678, 4), (789, 4),
+            ]
+    self.SetUpFetchItems(keys, self.rows)
+    self.mox.ReplayAll()
+    label_rows_dict = self.label_row_2lc.FetchItems(self.cnxn, keys)
+    self.mox.VerifyAll()
+    expected = {
+        (567, 0): [],
+        (678, 0): [],
+        (789, 0): [],
+        (567, 1): [],
+        (678, 1): [],
+        (789, 1): [(1, 789, 1, 'A', 'doc', False)],
+        (567, 2): [],
+        (678, 2): [],
+        (789, 2): [(2, 789, 2, 'B', 'doc', False)],
+        (567, 3): [],
+        (678, 3): [(3, 678, 1, 'C', 'doc', True)],
+        (789, 3): [],
+        (567, 4): [],
+        (678, 4): [(4, 678, None, 'D', 'doc', False)],
+        (789, 4): [],
+        }
+    self.assertEqual(expected, label_rows_dict)
+
+
+class StatusRowTwoLevelCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.cnxn = 'fake connection'
+    self.cache_manager = fake.CacheManager()
+    self.config_service = MakeConfigService(self.cache_manager, self.mox)
+    self.status_row_2lc = self.config_service.status_row_2lc
+
+    self.rows = [(1, 789, 1, 'A', True, 'doc', False),
+                 (2, 789, 2, 'B', False, 'doc', False),
+                 (3, 678, 1, 'C', True, 'doc', True),
+                 (4, 678, None, 'D', True, 'doc', False)]
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testDeserializeStatusRows_Empty(self):
+    status_row_dict = self.status_row_2lc._DeserializeStatusRows([])
+    self.assertEqual({}, status_row_dict)
+
+  def testDeserializeStatusRows_Normal(self):
+    status_rows_dict = self.status_row_2lc._DeserializeStatusRows(self.rows)
+    expected = {
+        678: [(3, 678, 1, 'C', True, 'doc', True),
+              (4, 678, None, 'D', True, 'doc', False)],
+        789: [(1, 789, 1, 'A', True, 'doc', False),
+              (2, 789, 2, 'B', False, 'doc', False)],
+        }
+    self.assertEqual(expected, status_rows_dict)
+
+  def SetUpFetchItems(self, keys, rows):
+    self.config_service.statusdef_tbl.Select(
+        self.cnxn, cols=config_svc.STATUSDEF_COLS, project_id=keys,
+        order_by=[('rank DESC', []), ('status DESC', [])]).AndReturn(
+            rows)
+
+  def testFetchItems(self):
+    keys = [567, 678, 789]
+    self.SetUpFetchItems(keys, self.rows)
+    self.mox.ReplayAll()
+    status_rows_dict = self.status_row_2lc.FetchItems(self.cnxn, keys)
+    self.mox.VerifyAll()
+    expected = {
+        567: [],
+        678: [(3, 678, 1, 'C', True, 'doc', True),
+              (4, 678, None, 'D', True, 'doc', False)],
+        789: [(1, 789, 1, 'A', True, 'doc', False),
+              (2, 789, 2, 'B', False, 'doc', False)],
+        }
+    self.assertEqual(expected, status_rows_dict)
+
+
+class ConfigRowTwoLevelCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.cnxn = 'fake connection'
+    self.cache_manager = fake.CacheManager()
+    self.config_service = MakeConfigService(self.cache_manager, self.mox)
+    self.config_2lc = self.config_service.config_2lc
+
+    self.config_rows = [
+      (789, 'Duplicate', 'Pri Type', 1, 2,
+       'Type Pri Summary', '-Pri', 'Mstone', 'Owner',
+       '', None)]
+    self.statusdef_rows = [(1, 789, 1, 'New', True, 'doc', False),
+                           (2, 789, 2, 'Fixed', False, 'doc', False)]
+    self.labeldef_rows = [(1, 789, 1, 'Security', 'doc', False),
+                          (2, 789, 2, 'UX', 'doc', False)]
+    self.fielddef_rows = [
+        (
+            1, 789, None, 'Field', 'INT_TYPE', 'Defect', '', False, False,
+            False, 1, 99, None, '', '', None, 'NEVER', 'no_action', 'doc',
+            False, None, False, False)
+    ]
+    self.approvaldef2approver_rows = [(2, 101, 789), (2, 102, 789)]
+    self.approvaldef2survey_rows = [(2, 'Q1\nQ2\nQ3', 789)]
+    self.fielddef2admin_rows = [(1, 111), (1, 222)]
+    self.fielddef2editor_rows = [(1, 111), (1, 222), (1, 333)]
+    self.componentdef_rows = []
+    self.component2admin_rows = []
+    self.component2cc_rows = []
+    self.component2label_rows = []
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testDeserializeIssueConfigs_Empty(self):
+    config_dict = self.config_2lc._DeserializeIssueConfigs(
+        [], [], [], [], [], [], [], [], [], [], [], [])
+    self.assertEqual({}, config_dict)
+
+  def testDeserializeIssueConfigs_Normal(self):
+    config_dict = self.config_2lc._DeserializeIssueConfigs(
+        self.config_rows, self.statusdef_rows, self.labeldef_rows,
+        self.fielddef_rows, self.fielddef2admin_rows, self.fielddef2editor_rows,
+        self.componentdef_rows, self.component2admin_rows,
+        self.component2cc_rows, self.component2label_rows,
+        self.approvaldef2approver_rows, self.approvaldef2survey_rows)
+    self.assertItemsEqual([789], list(config_dict.keys()))
+    config = config_dict[789]
+    self.assertEqual(789, config.project_id)
+    self.assertEqual(['Duplicate'], config.statuses_offer_merge)
+    self.assertEqual(len(self.labeldef_rows), len(config.well_known_labels))
+    self.assertEqual(len(self.statusdef_rows), len(config.well_known_statuses))
+    self.assertEqual(len(self.fielddef_rows), len(config.field_defs))
+    self.assertEqual(len(self.componentdef_rows), len(config.component_defs))
+    self.assertEqual(
+        len(self.fielddef2admin_rows), len(config.field_defs[0].admin_ids))
+    self.assertEqual(
+        len(self.fielddef2editor_rows), len(config.field_defs[0].editor_ids))
+    self.assertEqual(len(self.approvaldef2approver_rows),
+                     len(config.approval_defs[0].approver_ids))
+    self.assertEqual(config.approval_defs[0].survey, 'Q1\nQ2\nQ3')
+
+  def SetUpFetchConfigs(self, project_ids):
+    self.config_service.projectissueconfig_tbl.Select(
+        self.cnxn, cols=config_svc.PROJECTISSUECONFIG_COLS,
+        project_id=project_ids).AndReturn(self.config_rows)
+
+    self.config_service.statusdef_tbl.Select(
+        self.cnxn, cols=config_svc.STATUSDEF_COLS, project_id=project_ids,
+        where=[('rank IS NOT NULL', [])], order_by=[('rank', [])]).AndReturn(
+            self.statusdef_rows)
+
+    self.config_service.labeldef_tbl.Select(
+        self.cnxn, cols=config_svc.LABELDEF_COLS, project_id=project_ids,
+        where=[('rank IS NOT NULL', [])], order_by=[('rank', [])]).AndReturn(
+            self.labeldef_rows)
+
+    self.config_service.approvaldef2approver_tbl.Select(
+        self.cnxn, cols=config_svc.APPROVALDEF2APPROVER_COLS,
+        project_id=project_ids).AndReturn(self.approvaldef2approver_rows)
+    self.config_service.approvaldef2survey_tbl.Select(
+        self.cnxn, cols=config_svc.APPROVALDEF2SURVEY_COLS,
+        project_id=project_ids).AndReturn(self.approvaldef2survey_rows)
+
+    self.config_service.fielddef_tbl.Select(
+        self.cnxn, cols=config_svc.FIELDDEF_COLS, project_id=project_ids,
+        order_by=[('field_name', [])]).AndReturn(self.fielddef_rows)
+    field_ids = [row[0] for row in self.fielddef_rows]
+    self.config_service.fielddef2admin_tbl.Select(
+        self.cnxn, cols=config_svc.FIELDDEF2ADMIN_COLS,
+        field_id=field_ids).AndReturn(self.fielddef2admin_rows)
+    self.config_service.fielddef2editor_tbl.Select(
+        self.cnxn, cols=config_svc.FIELDDEF2EDITOR_COLS,
+        field_id=field_ids).AndReturn(self.fielddef2editor_rows)
+
+    self.config_service.componentdef_tbl.Select(
+        self.cnxn, cols=config_svc.COMPONENTDEF_COLS, project_id=project_ids,
+        is_deleted=False,
+        order_by=[('path', [])]).AndReturn(self.componentdef_rows)
+
+  def testFetchConfigs(self):
+    keys = [789]
+    self.SetUpFetchConfigs(keys)
+    self.mox.ReplayAll()
+    config_dict = self.config_2lc._FetchConfigs(self.cnxn, keys)
+    self.mox.VerifyAll()
+    self.assertItemsEqual(keys, list(config_dict.keys()))
+
+  def testFetchItems(self):
+    keys = [678, 789]
+    self.SetUpFetchConfigs(keys)
+    self.mox.ReplayAll()
+    config_dict = self.config_2lc.FetchItems(self.cnxn, keys)
+    self.mox.VerifyAll()
+    self.assertItemsEqual(keys, list(config_dict.keys()))
+
+
+class ConfigServiceTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.mox = mox.Mox()
+    self.cnxn = self.mox.CreateMock(sql.MonorailConnection)
+    self.cache_manager = fake.CacheManager()
+    self.config_service = MakeConfigService(self.cache_manager, self.mox)
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  ### Label lookups
+
+  def testGetLabelDefRows_Hit(self):
+    self.config_service.label_row_2lc.CacheItem((789, 0), [])
+    self.config_service.label_row_2lc.CacheItem((789, 1), [])
+    self.config_service.label_row_2lc.CacheItem((789, 2), [])
+    self.config_service.label_row_2lc.CacheItem(
+        (789, 3), [(3, 678, 1, 'C', 'doc', True)])
+    self.config_service.label_row_2lc.CacheItem(
+        (789, 4), [(4, 678, None, 'D', 'doc', False)])
+    self.config_service.label_row_2lc.CacheItem((789, 5), [])
+    self.config_service.label_row_2lc.CacheItem((789, 6), [])
+    self.config_service.label_row_2lc.CacheItem((789, 7), [])
+    self.config_service.label_row_2lc.CacheItem((789, 8), [])
+    self.config_service.label_row_2lc.CacheItem((789, 9), [])
+    actual = self.config_service.GetLabelDefRows(self.cnxn, 789)
+    expected = [
+      (3, 678, 1, 'C', 'doc', True),
+      (4, 678, None, 'D', 'doc', False)]
+    self.assertEqual(expected, actual)
+
+  def SetUpGetLabelDefRowsAnyProject(self, rows):
+    self.config_service.labeldef_tbl.Select(
+        self.cnxn, cols=config_svc.LABELDEF_COLS, where=None,
+        order_by=[('rank DESC', []), ('label DESC', [])]).AndReturn(
+            rows)
+
+  def testGetLabelDefRowsAnyProject(self):
+    rows = 'foo'
+    self.SetUpGetLabelDefRowsAnyProject(rows)
+    self.mox.ReplayAll()
+    actual = self.config_service.GetLabelDefRowsAnyProject(self.cnxn)
+    self.mox.VerifyAll()
+    self.assertEqual(rows, actual)
+
+  def testDeserializeLabels(self):
+    labeldef_rows = [(1, 789, 1, 'Security', 'doc', False),
+                     (2, 789, 2, 'UX', 'doc', True)]
+    id_to_name, name_to_id = self.config_service._DeserializeLabels(
+        labeldef_rows)
+    self.assertEqual({1: 'Security', 2: 'UX'}, id_to_name)
+    self.assertEqual({'security': 1, 'ux': 2}, name_to_id)
+
+  def testEnsureLabelCacheEntry_Hit(self):
+    label_dicts = 'foo'
+    self.config_service.label_cache.CacheItem(789, label_dicts)
+    # No mock calls set up because none are needed.
+    self.mox.ReplayAll()
+    self.config_service._EnsureLabelCacheEntry(self.cnxn, 789)
+    self.mox.VerifyAll()
+
+  def SetUpEnsureLabelCacheEntry_Miss(self, project_id, rows):
+    for shard_id in range(0, LABEL_ROW_SHARDS):
+      shard_rows = [row for row in rows
+                    if row[0] % LABEL_ROW_SHARDS == shard_id]
+      self.config_service.labeldef_tbl.Select(
+        self.cnxn, cols=config_svc.LABELDEF_COLS, project_id=project_id,
+        where=[('id %% %s = %s', [LABEL_ROW_SHARDS, shard_id])]).AndReturn(
+            shard_rows)
+
+  def testEnsureLabelCacheEntry_Miss(self):
+    labeldef_rows = [(1, 789, 1, 'Security', 'doc', False),
+                     (2, 789, 2, 'UX', 'doc', True)]
+    self.SetUpEnsureLabelCacheEntry_Miss(789, labeldef_rows)
+    self.mox.ReplayAll()
+    self.config_service._EnsureLabelCacheEntry(self.cnxn, 789)
+    self.mox.VerifyAll()
+    label_dicts = {1: 'Security', 2: 'UX'}, {'security': 1, 'ux': 2}
+    self.assertEqual(label_dicts, self.config_service.label_cache.GetItem(789))
+
+  def testLookupLabel_Hit(self):
+    label_dicts = {1: 'Security', 2: 'UX'}, {'security': 1, 'ux': 2}
+    self.config_service.label_cache.CacheItem(789, label_dicts)
+    # No mock calls set up because none are needed.
+    self.mox.ReplayAll()
+    self.assertEqual(
+        'Security', self.config_service.LookupLabel(self.cnxn, 789, 1))
+    self.assertEqual(
+        'UX', self.config_service.LookupLabel(self.cnxn, 789, 2))
+    self.mox.VerifyAll()
+
+  def testLookupLabelID_Hit(self):
+    label_dicts = {1: 'Security', 2: 'UX'}, {'security': 1, 'ux': 2}
+    self.config_service.label_cache.CacheItem(789, label_dicts)
+    # No mock calls set up because none are needed.
+    self.mox.ReplayAll()
+    self.assertEqual(
+        1, self.config_service.LookupLabelID(self.cnxn, 789, 'Security'))
+    self.assertEqual(
+        2, self.config_service.LookupLabelID(self.cnxn, 789, 'UX'))
+    self.mox.VerifyAll()
+
+  def testLookupLabelID_MissAndDoubleCheck(self):
+    label_dicts = {1: 'Security', 2: 'UX'}, {'security': 1, 'ux': 2}
+    self.config_service.label_cache.CacheItem(789, label_dicts)
+
+    self.config_service.labeldef_tbl.Select(
+        self.cnxn, cols=['id'], project_id=789,
+        where=[('LOWER(label) = %s', ['newlabel'])],
+        limit=1).AndReturn([(3,)])
+    self.mox.ReplayAll()
+    self.assertEqual(
+        3, self.config_service.LookupLabelID(self.cnxn, 789, 'NewLabel'))
+    self.mox.VerifyAll()
+
+  def testLookupLabelID_MissAutocreate(self):
+    label_dicts = {1: 'Security', 2: 'UX'}, {'security': 1, 'ux': 2}
+    self.config_service.label_cache.CacheItem(789, label_dicts)
+
+    self.config_service.labeldef_tbl.Select(
+        self.cnxn, cols=['id'], project_id=789,
+        where=[('LOWER(label) = %s', ['newlabel'])],
+        limit=1).AndReturn([])
+    self.config_service.labeldef_tbl.InsertRow(
+        self.cnxn, project_id=789, label='NewLabel').AndReturn(3)
+    self.mox.ReplayAll()
+    self.assertEqual(
+        3, self.config_service.LookupLabelID(self.cnxn, 789, 'NewLabel'))
+    self.mox.VerifyAll()
+
+  def testLookupLabelID_MissDontAutocreate(self):
+    label_dicts = {1: 'Security', 2: 'UX'}, {'security': 1, 'ux': 2}
+    self.config_service.label_cache.CacheItem(789, label_dicts)
+
+    self.config_service.labeldef_tbl.Select(
+        self.cnxn, cols=['id'], project_id=789,
+        where=[('LOWER(label) = %s', ['newlabel'])],
+        limit=1).AndReturn([])
+    self.mox.ReplayAll()
+    self.assertIsNone(self.config_service.LookupLabelID(
+        self.cnxn, 789, 'NewLabel', autocreate=False))
+    self.mox.VerifyAll()
+
+  def testLookupLabelIDs_Hit(self):
+    label_dicts = {1: 'Security', 2: 'UX'}, {'security': 1, 'ux': 2}
+    self.config_service.label_cache.CacheItem(789, label_dicts)
+    # No mock calls set up because none are needed.
+    self.mox.ReplayAll()
+    self.assertEqual(
+        [1, 2],
+        self.config_service.LookupLabelIDs(self.cnxn, 789, ['Security', 'UX']))
+    self.mox.VerifyAll()
+
+  def testLookupIDsOfLabelsMatching_Hit(self):
+    label_dicts = {1: 'Security', 2: 'UX'}, {'security': 1, 'ux': 2}
+    self.config_service.label_cache.CacheItem(789, label_dicts)
+    # No mock calls set up because none are needed.
+    self.mox.ReplayAll()
+    self.assertItemsEqual(
+        [1],
+        self.config_service.LookupIDsOfLabelsMatching(
+            self.cnxn, 789, re.compile('Sec.*')))
+    self.assertItemsEqual(
+        [1, 2],
+        self.config_service.LookupIDsOfLabelsMatching(
+            self.cnxn, 789, re.compile('.*')))
+    self.assertItemsEqual(
+        [],
+        self.config_service.LookupIDsOfLabelsMatching(
+            self.cnxn, 789, re.compile('Zzzzz.*')))
+    self.mox.VerifyAll()
+
+  def SetUpLookupLabelIDsAnyProject(self, label, id_rows):
+    self.config_service.labeldef_tbl.Select(
+        self.cnxn, cols=['id'], label=label).AndReturn(id_rows)
+
+  def testLookupLabelIDsAnyProject(self):
+    self.SetUpLookupLabelIDsAnyProject('Security', [(1,)])
+    self.mox.ReplayAll()
+    actual = self.config_service.LookupLabelIDsAnyProject(
+        self.cnxn, 'Security')
+    self.mox.VerifyAll()
+    self.assertEqual([1], actual)
+
+  def SetUpLookupIDsOfLabelsMatchingAnyProject(self, id_label_rows):
+    self.config_service.labeldef_tbl.Select(
+        self.cnxn, cols=['id', 'label']).AndReturn(id_label_rows)
+
+  def testLookupIDsOfLabelsMatchingAnyProject(self):
+    id_label_rows = [(1, 'Security'), (2, 'UX')]
+    self.SetUpLookupIDsOfLabelsMatchingAnyProject(id_label_rows)
+    self.mox.ReplayAll()
+    actual = self.config_service.LookupIDsOfLabelsMatchingAnyProject(
+        self.cnxn, re.compile('(Sec|Zzz).*'))
+    self.mox.VerifyAll()
+    self.assertEqual([1], actual)
+
+  ### Status lookups
+
+  def testGetStatusDefRows(self):
+    rows = 'foo'
+    self.config_service.status_row_2lc.CacheItem(789, rows)
+    actual = self.config_service.GetStatusDefRows(self.cnxn, 789)
+    self.assertEqual(rows, actual)
+
+  def SetUpGetStatusDefRowsAnyProject(self, rows):
+    self.config_service.statusdef_tbl.Select(
+        self.cnxn, cols=config_svc.STATUSDEF_COLS,
+        order_by=[('rank DESC', []), ('status DESC', [])]).AndReturn(
+            rows)
+
+  def testGetStatusDefRowsAnyProject(self):
+    rows = 'foo'
+    self.SetUpGetStatusDefRowsAnyProject(rows)
+    self.mox.ReplayAll()
+    actual = self.config_service.GetStatusDefRowsAnyProject(self.cnxn)
+    self.mox.VerifyAll()
+    self.assertEqual(rows, actual)
+
+  def testDeserializeStatuses(self):
+    statusdef_rows = [(1, 789, 1, 'New', True, 'doc', False),
+                      (2, 789, 2, 'Fixed', False, 'doc', True)]
+    actual = self.config_service._DeserializeStatuses(statusdef_rows)
+    id_to_name, name_to_id, closed_ids = actual
+    self.assertEqual({1: 'New', 2: 'Fixed'}, id_to_name)
+    self.assertEqual({'new': 1, 'fixed': 2}, name_to_id)
+    self.assertEqual([2], closed_ids)
+
+  def testEnsureStatusCacheEntry_Hit(self):
+    status_dicts = 'foo'
+    self.config_service.status_cache.CacheItem(789, status_dicts)
+    # No mock calls set up because none are needed.
+    self.mox.ReplayAll()
+    self.config_service._EnsureStatusCacheEntry(self.cnxn, 789)
+    self.mox.VerifyAll()
+
+  def SetUpEnsureStatusCacheEntry_Miss(self, keys, rows):
+    self.config_service.statusdef_tbl.Select(
+        self.cnxn, cols=config_svc.STATUSDEF_COLS, project_id=keys,
+        order_by=[('rank DESC', []), ('status DESC', [])]).AndReturn(
+            rows)
+
+  def testEnsureStatusCacheEntry_Miss(self):
+    statusdef_rows = [(1, 789, 1, 'New', True, 'doc', False),
+                      (2, 789, 2, 'Fixed', False, 'doc', True)]
+    self.SetUpEnsureStatusCacheEntry_Miss([789], statusdef_rows)
+    self.mox.ReplayAll()
+    self.config_service._EnsureStatusCacheEntry(self.cnxn, 789)
+    self.mox.VerifyAll()
+    status_dicts = {1: 'New', 2: 'Fixed'}, {'new': 1, 'fixed': 2}, [2]
+    self.assertEqual(
+        status_dicts, self.config_service.status_cache.GetItem(789))
+
+  def testLookupStatus_Hit(self):
+    status_dicts = {1: 'New', 2: 'Fixed'}, {'new': 1, 'fixed': 2}, [2]
+    self.config_service.status_cache.CacheItem(789, status_dicts)
+    # No mock calls set up because none are needed.
+    self.mox.ReplayAll()
+    self.assertEqual(
+        'New', self.config_service.LookupStatus(self.cnxn, 789, 1))
+    self.assertEqual(
+        'Fixed', self.config_service.LookupStatus(self.cnxn, 789, 2))
+    self.mox.VerifyAll()
+
+  def testLookupStatusID_Hit(self):
+    status_dicts = {1: 'New', 2: 'Fixed'}, {'new': 1, 'fixed': 2}, [2]
+    self.config_service.status_cache.CacheItem(789, status_dicts)
+    # No mock calls set up because none are needed.
+    self.mox.ReplayAll()
+    self.assertEqual(
+        1, self.config_service.LookupStatusID(self.cnxn, 789, 'New'))
+    self.assertEqual(
+        2, self.config_service.LookupStatusID(self.cnxn, 789, 'Fixed'))
+    self.mox.VerifyAll()
+
+  def testLookupStatusIDs_Hit(self):
+    status_dicts = {1: 'New', 2: 'Fixed'}, {'new': 1, 'fixed': 2}, [2]
+    self.config_service.status_cache.CacheItem(789, status_dicts)
+    # No mock calls set up because none are needed.
+    self.mox.ReplayAll()
+    self.assertEqual(
+        [1, 2],
+        self.config_service.LookupStatusIDs(self.cnxn, 789, ['New', 'Fixed']))
+    self.mox.VerifyAll()
+
+  def testLookupClosedStatusIDs_Hit(self):
+    status_dicts = {1: 'New', 2: 'Fixed'}, {'new': 1, 'fixed': 2}, [2]
+    self.config_service.status_cache.CacheItem(789, status_dicts)
+    # No mock calls set up because none are needed.
+    self.mox.ReplayAll()
+    self.assertEqual(
+        [2],
+        self.config_service.LookupClosedStatusIDs(self.cnxn, 789))
+    self.mox.VerifyAll()
+
+  def SetUpLookupClosedStatusIDsAnyProject(self, id_rows):
+    self.config_service.statusdef_tbl.Select(
+        self.cnxn, cols=['id'], means_open=False).AndReturn(
+            id_rows)
+
+  def testLookupClosedStatusIDsAnyProject(self):
+    self.SetUpLookupClosedStatusIDsAnyProject([(2,)])
+    self.mox.ReplayAll()
+    actual = self.config_service.LookupClosedStatusIDsAnyProject(self.cnxn)
+    self.mox.VerifyAll()
+    self.assertEqual([2], actual)
+
+  def SetUpLookupStatusIDsAnyProject(self, status, id_rows):
+    self.config_service.statusdef_tbl.Select(
+        self.cnxn, cols=['id'], status=status).AndReturn(id_rows)
+
+  def testLookupStatusIDsAnyProject(self):
+    self.SetUpLookupStatusIDsAnyProject('New', [(1,)])
+    self.mox.ReplayAll()
+    actual = self.config_service.LookupStatusIDsAnyProject(self.cnxn, 'New')
+    self.mox.VerifyAll()
+    self.assertEqual([1], actual)
+
+  ### Issue tracker configuration objects
+
+  def SetUpGetProjectConfigs(self, project_ids):
+    self.config_service.projectissueconfig_tbl.Select(
+        self.cnxn, cols=config_svc.PROJECTISSUECONFIG_COLS,
+        project_id=project_ids).AndReturn([])
+    self.config_service.statusdef_tbl.Select(
+        self.cnxn, cols=config_svc.STATUSDEF_COLS,
+        project_id=project_ids, where=[('rank IS NOT NULL', [])],
+        order_by=[('rank', [])]).AndReturn([])
+    self.config_service.labeldef_tbl.Select(
+        self.cnxn, cols=config_svc.LABELDEF_COLS,
+        project_id=project_ids, where=[('rank IS NOT NULL', [])],
+        order_by=[('rank', [])]).AndReturn([])
+    self.config_service.approvaldef2approver_tbl.Select(
+        self.cnxn, cols=config_svc.APPROVALDEF2APPROVER_COLS,
+        project_id=project_ids).AndReturn([])
+    self.config_service.approvaldef2survey_tbl.Select(
+        self.cnxn, cols=config_svc.APPROVALDEF2SURVEY_COLS,
+        project_id=project_ids).AndReturn([])
+    self.config_service.fielddef_tbl.Select(
+        self.cnxn, cols=config_svc.FIELDDEF_COLS,
+        project_id=project_ids, order_by=[('field_name', [])]).AndReturn([])
+    self.config_service.componentdef_tbl.Select(
+        self.cnxn, cols=config_svc.COMPONENTDEF_COLS,
+        is_deleted=False,
+        project_id=project_ids, order_by=[('path', [])]).AndReturn([])
+
+  def testGetProjectConfigs(self):
+    project_ids = [789, 679]
+    self.SetUpGetProjectConfigs(project_ids)
+
+    self.mox.ReplayAll()
+    config_dict = self.config_service.GetProjectConfigs(
+        self.cnxn, [789, 679], use_cache=False)
+    self.assertEqual(2, len(config_dict))
+    for pid in project_ids:
+      self.assertEqual(pid, config_dict[pid].project_id)
+    self.mox.VerifyAll()
+
+  def testGetProjectConfig_Hit(self):
+    project_id = 789
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(project_id)
+    self.config_service.config_2lc.CacheItem(project_id, config)
+
+    self.mox.ReplayAll()
+    actual = self.config_service.GetProjectConfig(self.cnxn, project_id)
+    self.assertEqual(config, actual)
+    self.mox.VerifyAll()
+
+  def testGetProjectConfig_Miss(self):
+    project_id = 789
+    self.SetUpGetProjectConfigs([project_id])
+
+    self.mox.ReplayAll()
+    config = self.config_service.GetProjectConfig(self.cnxn, project_id)
+    self.assertEqual(project_id, config.project_id)
+    self.mox.VerifyAll()
+
+  def SetUpStoreConfig_Default(self, project_id):
+    self.config_service.projectissueconfig_tbl.InsertRow(
+        self.cnxn, replace=True,
+        project_id=project_id,
+        statuses_offer_merge='Duplicate',
+        exclusive_label_prefixes='Type Priority Milestone',
+        default_template_for_developers=0,
+        default_template_for_users=0,
+        default_col_spec=tracker_constants.DEFAULT_COL_SPEC,
+        default_sort_spec='',
+        default_x_attr='',
+        default_y_attr='',
+        member_default_query='',
+        custom_issue_entry_url=None,
+        commit=False)
+
+    self.SetUpUpdateWellKnownLabels_Default(project_id)
+    self.SetUpUpdateWellKnownStatuses_Default(project_id)
+    self.cnxn.Commit()
+
+  def SetUpUpdateWellKnownLabels_JustCache(self, project_id):
+    by_id = {
+        idx + 1: label for idx, (label, _, _) in enumerate(
+            tracker_constants.DEFAULT_WELL_KNOWN_LABELS)}
+    by_name = {name.lower(): label_id
+               for label_id, name in by_id.items()}
+    label_dicts = by_id, by_name
+    self.config_service.label_cache.CacheAll({project_id: label_dicts})
+
+  def SetUpUpdateWellKnownLabels_Default(self, project_id):
+    self.SetUpUpdateWellKnownLabels_JustCache(project_id)
+    update_labeldef_rows = [
+        (idx + 1, project_id, idx, label, doc, deprecated)
+        for idx, (label, doc, deprecated) in enumerate(
+            tracker_constants.DEFAULT_WELL_KNOWN_LABELS)]
+    self.config_service.labeldef_tbl.Update(
+        self.cnxn, {'rank': None}, project_id=project_id, commit=False)
+    self.config_service.labeldef_tbl.InsertRows(
+        self.cnxn, config_svc.LABELDEF_COLS, update_labeldef_rows,
+        replace=True, commit=False)
+    self.config_service.labeldef_tbl.InsertRows(
+        self.cnxn, config_svc.LABELDEF_COLS[1:], [], commit=False)
+
+  def SetUpUpdateWellKnownStatuses_Default(self, project_id):
+    by_id = {
+        idx + 1: status for idx, (status, _, _, _) in enumerate(
+            tracker_constants.DEFAULT_WELL_KNOWN_STATUSES)}
+    by_name = {name.lower(): label_id
+               for label_id, name in by_id.items()}
+    closed_ids = [
+        idx + 1 for idx, (_, _, means_open, _) in enumerate(
+            tracker_constants.DEFAULT_WELL_KNOWN_STATUSES)
+        if not means_open]
+    status_dicts = by_id, by_name, closed_ids
+    self.config_service.status_cache.CacheAll({789: status_dicts})
+
+    update_statusdef_rows = [
+        (idx + 1, project_id, idx, status, means_open, doc, deprecated)
+        for idx, (status, doc, means_open, deprecated) in enumerate(
+            tracker_constants.DEFAULT_WELL_KNOWN_STATUSES)]
+    self.config_service.statusdef_tbl.Update(
+        self.cnxn, {'rank': None}, project_id=project_id, commit=False)
+    self.config_service.statusdef_tbl.InsertRows(
+        self.cnxn, config_svc.STATUSDEF_COLS, update_statusdef_rows,
+        replace=True, commit=False)
+    self.config_service.statusdef_tbl.InsertRows(
+        self.cnxn, config_svc.STATUSDEF_COLS[1:], [], commit=False)
+
+  def SetUpUpdateApprovals_Default(
+      self, approval_id, approver_rows, survey_row):
+    self.config_service.approvaldef2approver_tbl.Delete(
+        self.cnxn, approval_id=approval_id, commit=False)
+
+    self.config_service.approvaldef2approver_tbl.InsertRows(
+        self.cnxn,
+        config_svc.APPROVALDEF2APPROVER_COLS,
+        approver_rows,
+        commit=False)
+
+    approval_id, survey, project_id = survey_row
+    self.config_service.approvaldef2survey_tbl.Delete(
+        self.cnxn, approval_id=approval_id, commit=False)
+    self.config_service.approvaldef2survey_tbl.InsertRow(
+        self.cnxn,
+        approval_id=approval_id,
+        survey=survey,
+        project_id=project_id,
+        commit=False)
+
+  def testStoreConfig(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.SetUpStoreConfig_Default(789)
+
+    self.mox.ReplayAll()
+    self.config_service.StoreConfig(self.cnxn, config)
+    self.mox.VerifyAll()
+
+  def testUpdateWellKnownLabels(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.SetUpUpdateWellKnownLabels_Default(789)
+
+    self.mox.ReplayAll()
+    self.config_service._UpdateWellKnownLabels(self.cnxn, config)
+    self.mox.VerifyAll()
+
+  def testUpdateWellKnownLabels_Duplicate(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.well_known_labels.append(config.well_known_labels[0])
+    self.SetUpUpdateWellKnownLabels_JustCache(789)
+
+    self.mox.ReplayAll()
+    with self.assertRaises(exceptions.InputException) as cm:
+      self.config_service._UpdateWellKnownLabels(self.cnxn, config)
+    self.mox.VerifyAll()
+    self.assertEqual(
+      'Defined label "Type-Defect" twice',
+      cm.exception.message)
+
+  def testUpdateWellKnownStatuses(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.SetUpUpdateWellKnownStatuses_Default(789)
+
+    self.mox.ReplayAll()
+    self.config_service._UpdateWellKnownStatuses(self.cnxn, config)
+    self.mox.VerifyAll()
+
+  def testUpdateApprovals(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    approver_rows = [(123, 111, 789), (123, 222, 789)]
+    survey_row = (123, 'Q1\nQ2', 789)
+    first_approval = tracker_bizobj.MakeFieldDef(
+        123, 789, 'FirstApproval', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        None, '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'the first one', False)
+    config.field_defs = [first_approval]
+    config.approval_defs = [tracker_pb2.ApprovalDef(
+        approval_id=123, approver_ids=[111, 222], survey='Q1\nQ2')]
+    self.SetUpUpdateApprovals_Default(123, approver_rows, survey_row)
+
+    self.mox.ReplayAll()
+    self.config_service._UpdateApprovals(self.cnxn, config)
+    self.mox.VerifyAll()
+
+  def testUpdateConfig(self):
+    pass  # TODO(jrobbins): add a test for this
+
+  def SetUpExpungeConfig(self, project_id):
+    self.config_service.statusdef_tbl.Delete(self.cnxn, project_id=project_id)
+    self.config_service.labeldef_tbl.Delete(self.cnxn, project_id=project_id)
+    self.config_service.projectissueconfig_tbl.Delete(
+        self.cnxn, project_id=project_id)
+
+    self.config_service.config_2lc.InvalidateKeys(self.cnxn, [project_id])
+
+  def testExpungeConfig(self):
+    self.SetUpExpungeConfig(789)
+
+    self.mox.ReplayAll()
+    self.config_service.ExpungeConfig(self.cnxn, 789)
+    self.mox.VerifyAll()
+
+  def testExpungeUsersInConfigs(self):
+
+    self.config_service.component2admin_tbl.Delete = mock.Mock()
+    self.config_service.component2cc_tbl.Delete = mock.Mock()
+    self.config_service.componentdef_tbl.Update = mock.Mock()
+
+    self.config_service.fielddef2admin_tbl.Delete = mock.Mock()
+    self.config_service.fielddef2editor_tbl.Delete = mock.Mock()
+    self.config_service.approvaldef2approver_tbl.Delete = mock.Mock()
+
+    user_ids = [111, 222, 333]
+    self.config_service.ExpungeUsersInConfigs(self.cnxn, user_ids, limit=50)
+
+    self.config_service.component2admin_tbl.Delete.assert_called_once_with(
+        self.cnxn, admin_id=user_ids, commit=False, limit=50)
+    self.config_service.component2cc_tbl.Delete.assert_called_once_with(
+        self.cnxn, cc_id=user_ids, commit=False, limit=50)
+    cdef_calls = [
+        mock.call(
+            self.cnxn, {'creator_id': framework_constants.DELETED_USER_ID},
+            creator_id=user_ids, commit=False, limit=50),
+        mock.call(
+            self.cnxn, {'modifier_id': framework_constants.DELETED_USER_ID},
+            modifier_id=user_ids, commit=False, limit=50)]
+    self.config_service.componentdef_tbl.Update.assert_has_calls(cdef_calls)
+
+    self.config_service.fielddef2admin_tbl.Delete.assert_called_once_with(
+        self.cnxn, admin_id=user_ids, commit=False, limit=50)
+    self.config_service.fielddef2editor_tbl.Delete.assert_called_once_with(
+        self.cnxn, editor_id=user_ids, commit=False, limit=50)
+    self.config_service.approvaldef2approver_tbl.Delete.assert_called_once_with(
+        self.cnxn, approver_id=user_ids, commit=False, limit=50)
+
+  ### Custom field definitions
+
+  def SetUpCreateFieldDef(self, project_id):
+    self.config_service.fielddef_tbl.InsertRow(
+        self.cnxn,
+        project_id=project_id,
+        field_name='PercentDone',
+        field_type='int_type',
+        applicable_type='Defect',
+        applicable_predicate='',
+        is_required=False,
+        is_multivalued=False,
+        is_niche=False,
+        min_value=1,
+        max_value=100,
+        regex=None,
+        needs_member=None,
+        needs_perm=None,
+        grants_perm=None,
+        notify_on='never',
+        date_action='no_action',
+        docstring='doc',
+        approval_id=None,
+        is_phase_field=False,
+        is_restricted_field=True,
+        commit=False).AndReturn(1)
+    self.config_service.fielddef2admin_tbl.InsertRows(
+        self.cnxn, config_svc.FIELDDEF2ADMIN_COLS, [(1, 111)], commit=False)
+    self.config_service.fielddef2editor_tbl.InsertRows(
+        self.cnxn, config_svc.FIELDDEF2EDITOR_COLS, [(1, 222)], commit=False)
+    self.cnxn.Commit()
+
+  def testCreateFieldDef(self):
+    self.SetUpCreateFieldDef(789)
+
+    self.mox.ReplayAll()
+    field_id = self.config_service.CreateFieldDef(
+        self.cnxn,
+        789,
+        'PercentDone',
+        'int_type',
+        'Defect',
+        '',
+        False,
+        False,
+        False,
+        1,
+        100,
+        None,
+        None,
+        None,
+        None,
+        0,
+        'no_action',
+        'doc', [111], [222],
+        is_restricted_field=True)
+    self.mox.VerifyAll()
+    self.assertEqual(1, field_id)
+
+  def SetUpSoftDeleteFieldDefs(self, field_ids):
+    self.config_service.fielddef_tbl.Update(
+        self.cnxn, {'is_deleted': True}, id=field_ids)
+
+  def testSoftDeleteFieldDefs(self):
+    self.SetUpSoftDeleteFieldDefs([1])
+
+    self.mox.ReplayAll()
+    self.config_service.SoftDeleteFieldDefs(self.cnxn, 789, [1])
+    self.mox.VerifyAll()
+
+  def SetUpUpdateFieldDef(self, field_id, new_values, admin_rows, editor_rows):
+    self.config_service.fielddef_tbl.Update(
+        self.cnxn, new_values, id=field_id, commit=False)
+    self.config_service.fielddef2admin_tbl.Delete(
+        self.cnxn, field_id=field_id, commit=False)
+    self.config_service.fielddef2admin_tbl.InsertRows(
+        self.cnxn, config_svc.FIELDDEF2ADMIN_COLS, admin_rows, commit=False)
+    self.config_service.fielddef2editor_tbl.Delete(
+        self.cnxn, field_id=field_id, commit=False)
+    self.config_service.fielddef2editor_tbl.InsertRows(
+        self.cnxn, config_svc.FIELDDEF2EDITOR_COLS, editor_rows, commit=False)
+    self.cnxn.Commit()
+
+  def testUpdateFieldDef_NoOp(self):
+    new_values = {}
+    self.SetUpUpdateFieldDef(1, new_values, [], [])
+
+    self.mox.ReplayAll()
+    self.config_service.UpdateFieldDef(
+        self.cnxn, 789, 1, admin_ids=[], editor_ids=[])
+    self.mox.VerifyAll()
+
+  def testUpdateFieldDef_Normal(self):
+    new_values = dict(
+        field_name='newname',
+        applicable_type='defect',
+        applicable_predicate='pri:1',
+        is_required=True,
+        is_niche=True,
+        is_multivalued=True,
+        min_value=32,
+        max_value=212,
+        regex='a.*b',
+        needs_member=True,
+        needs_perm='EditIssue',
+        grants_perm='DeleteIssue',
+        notify_on='any_comment',
+        docstring='new doc',
+        is_restricted_field=True)
+    self.SetUpUpdateFieldDef(1, new_values, [(1, 111)], [(1, 222)])
+
+    self.mox.ReplayAll()
+    new_values = new_values.copy()
+    new_values['notify_on'] = 1
+    self.config_service.UpdateFieldDef(
+        self.cnxn, 789, 1, admin_ids=[111], editor_ids=[222], **new_values)
+    self.mox.VerifyAll()
+
+  ### Component definitions
+
+  def SetUpFindMatchingComponentIDsAnyProject(self, _exact, rows):
+    # TODO(jrobbins): more details here.
+    self.config_service.componentdef_tbl.Select(
+        self.cnxn, cols=['id'], where=mox.IsA(list)).AndReturn(rows)
+
+  def testFindMatchingComponentIDsAnyProject_Rooted(self):
+    self.SetUpFindMatchingComponentIDsAnyProject(True, [(1,), (2,), (3,)])
+
+    self.mox.ReplayAll()
+    comp_ids = self.config_service.FindMatchingComponentIDsAnyProject(
+        self.cnxn, ['WindowManager', 'NetworkLayer'])
+    self.mox.VerifyAll()
+    self.assertItemsEqual([1, 2, 3], comp_ids)
+
+  def testFindMatchingComponentIDsAnyProject_NonRooted(self):
+    self.SetUpFindMatchingComponentIDsAnyProject(False, [(1,), (2,), (3,)])
+
+    self.mox.ReplayAll()
+    comp_ids = self.config_service.FindMatchingComponentIDsAnyProject(
+        self.cnxn, ['WindowManager', 'NetworkLayer'], exact=False)
+    self.mox.VerifyAll()
+    self.assertItemsEqual([1, 2, 3], comp_ids)
+
+  def SetUpCreateComponentDef(self, comp_id):
+    self.config_service.componentdef_tbl.InsertRow(
+        self.cnxn, project_id=789, path='WindowManager',
+        docstring='doc', deprecated=False, commit=False,
+        created=0, creator_id=0).AndReturn(comp_id)
+    self.config_service.component2admin_tbl.InsertRows(
+        self.cnxn, config_svc.COMPONENT2ADMIN_COLS, [], commit=False)
+    self.config_service.component2cc_tbl.InsertRows(
+        self.cnxn, config_svc.COMPONENT2CC_COLS, [], commit=False)
+    self.config_service.component2label_tbl.InsertRows(
+        self.cnxn, config_svc.COMPONENT2LABEL_COLS, [], commit=False)
+    self.cnxn.Commit()
+
+  def testCreateComponentDef(self):
+    self.SetUpCreateComponentDef(1)
+
+    self.mox.ReplayAll()
+    comp_id = self.config_service.CreateComponentDef(
+        self.cnxn, 789, 'WindowManager', 'doc', False, [], [], 0, 0, [])
+    self.mox.VerifyAll()
+    self.assertEqual(1, comp_id)
+
+  def SetUpUpdateComponentDef(self, component_id):
+    self.config_service.component2admin_tbl.Delete(
+        self.cnxn, component_id=component_id, commit=False)
+    self.config_service.component2admin_tbl.InsertRows(
+        self.cnxn, config_svc.COMPONENT2ADMIN_COLS, [], commit=False)
+    self.config_service.component2cc_tbl.Delete(
+        self.cnxn, component_id=component_id, commit=False)
+    self.config_service.component2cc_tbl.InsertRows(
+        self.cnxn, config_svc.COMPONENT2CC_COLS, [], commit=False)
+    self.config_service.component2label_tbl.Delete(
+        self.cnxn, component_id=component_id, commit=False)
+    self.config_service.component2label_tbl.InsertRows(
+        self.cnxn, config_svc.COMPONENT2LABEL_COLS, [], commit=False)
+
+    self.config_service.componentdef_tbl.Update(
+        self.cnxn,
+        {'path': 'DisplayManager', 'docstring': 'doc', 'deprecated': True},
+        id=component_id, commit=False)
+    self.cnxn.Commit()
+
+  def testUpdateComponentDef(self):
+    self.SetUpUpdateComponentDef(1)
+
+    self.mox.ReplayAll()
+    self.config_service.UpdateComponentDef(
+        self.cnxn, 789, 1, path='DisplayManager', docstring='doc',
+        deprecated=True, admin_ids=[], cc_ids=[], label_ids=[])
+    self.mox.VerifyAll()
+
+  def SetUpSoftDeleteComponentDef(self, component_id):
+    self.config_service.componentdef_tbl.Update(
+        self.cnxn, {'is_deleted': True}, commit=False, id=component_id)
+    self.cnxn.Commit()
+
+  def testSoftDeleteComponentDef(self):
+    self.SetUpSoftDeleteComponentDef(1)
+
+    self.mox.ReplayAll()
+    self.config_service.DeleteComponentDef(self.cnxn, 789, 1)
+    self.mox.VerifyAll()
+
+  ### Memcache management
+
+  def testInvalidateMemcache(self):
+    pass  # TODO(jrobbins): write this
+
+  def testInvalidateMemcacheShards(self):
+    NOW = 1234567
+    memcache.set('789;1', NOW)
+    memcache.set('789;2', NOW - 1000)
+    memcache.set('789;3', NOW - 2000)
+    memcache.set('all;1', NOW)
+    memcache.set('all;2', NOW - 1000)
+    memcache.set('all;3', NOW - 2000)
+
+    # Delete some of them.
+    self.config_service._InvalidateMemcacheShards(
+        [(789, 1), (789, 2), (789,9)])
+
+    self.assertIsNone(memcache.get('789;1'))
+    self.assertIsNone(memcache.get('789;2'))
+    self.assertEqual(NOW - 2000, memcache.get('789;3'))
+    self.assertIsNone(memcache.get('all;1'))
+    self.assertIsNone(memcache.get('all;2'))
+    self.assertEqual(NOW - 2000, memcache.get('all;3'))
+
+  def testInvalidateMemcacheForEntireProject(self):
+    NOW = 1234567
+    memcache.set('789;1', NOW)
+    memcache.set('config:789', 'serialized config')
+    memcache.set('label_rows:789', 'serialized label rows')
+    memcache.set('status_rows:789', 'serialized status rows')
+    memcache.set('field_rows:789', 'serialized field rows')
+    memcache.set('890;1', NOW)  # Other projects will not be affected.
+
+    self.config_service.InvalidateMemcacheForEntireProject(789)
+
+    self.assertIsNone(memcache.get('789;1'))
+    self.assertIsNone(memcache.get('config:789'))
+    self.assertIsNone(memcache.get('status_rows:789'))
+    self.assertIsNone(memcache.get('label_rows:789'))
+    self.assertIsNone(memcache.get('field_rows:789'))
+    self.assertEqual(NOW, memcache.get('890;1'))
+
+  def testUsersInvolvedInConfig_Empty(self):
+    templates = []
+    config = tracker_pb2.ProjectIssueConfig()
+    self.assertEqual(set(), self.config_service.UsersInvolvedInConfig(
+        config, templates))
+
+  def testUsersInvolvedInConfig_Default(self):
+    templates = [
+        tracker_bizobj.ConvertDictToTemplate(t)
+        for t in tracker_constants.DEFAULT_TEMPLATES]
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.assertEqual(set(), self.config_service.UsersInvolvedInConfig(
+        config, templates))
+
+  def testUsersInvolvedInConfig_Normal(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    templates = [
+        tracker_bizobj.ConvertDictToTemplate(t)
+        for t in tracker_constants.DEFAULT_TEMPLATES]
+    templates[0].owner_id = 111
+    templates[0].admin_ids = [111, 222]
+    config.field_defs = [
+        tracker_pb2.FieldDef(admin_ids=[333], editor_ids=[444])
+    ]
+    actual = self.config_service.UsersInvolvedInConfig(config, templates)
+    self.assertEqual({111, 222, 333, 444}, actual)
diff --git a/services/test/features_svc_test.py b/services/test/features_svc_test.py
new file mode 100644
index 0000000..c80b819
--- /dev/null
+++ b/services/test/features_svc_test.py
@@ -0,0 +1,1431 @@
+# 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
+
+"""Unit tests for features_svc module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import mox
+import time
+import unittest
+import mock
+
+from google.appengine.api import memcache
+from google.appengine.ext import testbed
+
+import settings
+
+from features import filterrules_helpers
+from features import features_constants
+from framework import exceptions
+from framework import framework_constants
+from framework import sql
+from proto import tracker_pb2
+from proto import features_pb2
+from services import chart_svc
+from services import features_svc
+from services import star_svc
+from services import user_svc
+from testing import fake
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+# NOTE: we are in the process of moving away from mox towards mock.
+# This file is a mix of both. All new tests or big test updates should make
+# use of the mock package.
+def MakeFeaturesService(cache_manager, my_mox):
+  features_service = features_svc.FeaturesService(cache_manager,
+      fake.ConfigService())
+  features_service.hotlist_tbl = my_mox.CreateMock(sql.SQLTableManager)
+  features_service.hotlist2issue_tbl = my_mox.CreateMock(sql.SQLTableManager)
+  features_service.hotlist2user_tbl = my_mox.CreateMock(sql.SQLTableManager)
+  return features_service
+
+
+class HotlistTwoLevelCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.mox = mox.Mox()
+    self.cnxn = self.mox.CreateMock(sql.MonorailConnection)
+    self.cache_manager = fake.CacheManager()
+    self.features_service = MakeFeaturesService(self.cache_manager, self.mox)
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  def testDeserializeHotlists(self):
+    hotlist_rows = [
+        (123, 'hot1', 'test hot 1', 'test hotlist', False, ''),
+        (234, 'hot2', 'test hot 2', 'test hotlist', False, '')]
+
+    ts = 20021111111111
+    issue_rows = [
+        (123, 567, 10, 111, ts, ''), (123, 678, 9, 111, ts, ''),
+        (234, 567, 0, 111, ts, '')]
+    role_rows = [
+        (123, 111, 'owner'), (123, 444, 'owner'),
+        (123, 222, 'editor'),
+        (123, 333, 'follower'),
+        (234, 111, 'owner')]
+    hotlist_dict = self.features_service.hotlist_2lc._DeserializeHotlists(
+        hotlist_rows, issue_rows, role_rows)
+
+    self.assertItemsEqual([123, 234], list(hotlist_dict.keys()))
+    self.assertEqual(123, hotlist_dict[123].hotlist_id)
+    self.assertEqual('hot1', hotlist_dict[123].name)
+    self.assertItemsEqual([111, 444], hotlist_dict[123].owner_ids)
+    self.assertItemsEqual([222], hotlist_dict[123].editor_ids)
+    self.assertItemsEqual([333], hotlist_dict[123].follower_ids)
+    self.assertEqual(234, hotlist_dict[234].hotlist_id)
+    self.assertItemsEqual([111], hotlist_dict[234].owner_ids)
+
+
+class HotlistIDTwoLevelCache(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.mox = mox.Mox()
+    self.cnxn = self.mox.CreateMock(sql.MonorailConnection)
+    self.cache_manager = fake.CacheManager()
+    self.features_service = MakeFeaturesService(self.cache_manager, self.mox)
+    self.hotlist_id_2lc = self.features_service.hotlist_id_2lc
+
+  def tearDown(self):
+    memcache.flush_all()
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testGetAll(self):
+    cached_keys = [('name1', 111), ('name2', 222)]
+    self.hotlist_id_2lc.CacheItem(cached_keys[0], 121)
+    self.hotlist_id_2lc.CacheItem(cached_keys[1], 122)
+
+    # Set up DB query mocks.
+    # Test that a ('name1', 222) or ('name3', 333) hotlist
+    # does not get returned by GetAll even though these hotlists
+    # exist and are returned by the DB queries.
+    from_db_keys = [
+        ('name1', 333), ('name3', 222), ('name3', 555)]
+    self.features_service.hotlist2user_tbl.Select = mock.Mock(return_value=[
+        (123, 333),  # name1 hotlist
+        (124, 222),  # name3 hotlist
+        (125, 222),  # name1 hotlist, should be ignored
+        (126, 333),  # name3 hotlist, should be ignored
+        (127, 555),  # wrongname hotlist, should be ignored
+    ])
+    self.features_service.hotlist_tbl.Select = mock.Mock(
+        return_value=[(123, 'Name1'), (124, 'Name3'),
+                      (125, 'Name1'), (126, 'Name3')])
+
+    hit, misses = self.hotlist_id_2lc.GetAll(
+        self.cnxn, cached_keys + from_db_keys)
+
+    # Assertions
+    self.features_service.hotlist2user_tbl.Select.assert_called_once_with(
+        self.cnxn, cols=['hotlist_id', 'user_id'], user_id=[555, 333, 222],
+        role_name='owner')
+    hotlist_ids = [123, 124, 125, 126, 127]
+    self.features_service.hotlist_tbl.Select.assert_called_once_with(
+        self.cnxn, cols=['id', 'name'], id=hotlist_ids, is_deleted=False,
+        where=[('LOWER(name) IN (%s,%s)', ['name3', 'name1'])])
+
+    self.assertEqual(hit,{
+        ('name1', 111): 121,
+        ('name2', 222): 122,
+        ('name1', 333): 123,
+        ('name3', 222): 124})
+    self.assertEqual(from_db_keys[-1:], misses)
+
+
+class FeaturesServiceTest(unittest.TestCase):
+
+  def MakeMockTable(self):
+    return self.mox.CreateMock(sql.SQLTableManager)
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.mox = mox.Mox()
+    self.cnxn = self.mox.CreateMock(sql.MonorailConnection)
+    self.cache_manager = fake.CacheManager()
+    self.config_service = fake.ConfigService()
+
+    self.features_service = features_svc.FeaturesService(self.cache_manager,
+        self.config_service)
+    self.issue_service = fake.IssueService()
+    self.chart_service = self.mox.CreateMock(chart_svc.ChartService)
+
+    for table_var in [
+        'user2savedquery_tbl', 'quickedithistory_tbl',
+        'quickeditmostrecent_tbl', 'savedquery_tbl',
+        'savedqueryexecutesinproject_tbl', 'project2savedquery_tbl',
+        'filterrule_tbl', 'hotlist_tbl', 'hotlist2issue_tbl',
+        'hotlist2user_tbl']:
+      setattr(self.features_service, table_var, self.MakeMockTable())
+
+  def tearDown(self):
+    memcache.flush_all()
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  ### quickedit command history
+
+  def testGetRecentCommands(self):
+    self.features_service.quickedithistory_tbl.Select(
+        self.cnxn, cols=['slot_num', 'command', 'comment'],
+        user_id=1, project_id=12345).AndReturn(
+        [(1, 'status=New', 'Brand new issue')])
+    self.features_service.quickeditmostrecent_tbl.SelectValue(
+        self.cnxn, 'slot_num', default=1, user_id=1, project_id=12345
+        ).AndReturn(1)
+    self.mox.ReplayAll()
+    slots, recent_slot_num = self.features_service.GetRecentCommands(
+        self.cnxn, 1, 12345)
+    self.mox.VerifyAll()
+
+    self.assertEqual(1, recent_slot_num)
+    self.assertEqual(
+        len(tracker_constants.DEFAULT_RECENT_COMMANDS), len(slots))
+    self.assertEqual('status=New', slots[0][1])
+
+  def testStoreRecentCommand(self):
+    self.features_service.quickedithistory_tbl.InsertRow(
+        self.cnxn, replace=True, user_id=1, project_id=12345,
+        slot_num=1, command='status=New', comment='Brand new issue')
+    self.features_service.quickeditmostrecent_tbl.InsertRow(
+        self.cnxn, replace=True, user_id=1, project_id=12345,
+        slot_num=1)
+    self.mox.ReplayAll()
+    self.features_service.StoreRecentCommand(
+        self.cnxn, 1, 12345, 1, 'status=New', 'Brand new issue')
+    self.mox.VerifyAll()
+
+  def testExpungeQuickEditHistory(self):
+    self.features_service.quickeditmostrecent_tbl.Delete(
+        self.cnxn, project_id=12345)
+    self.features_service.quickedithistory_tbl.Delete(
+        self.cnxn, project_id=12345)
+    self.mox.ReplayAll()
+    self.features_service.ExpungeQuickEditHistory(
+        self.cnxn, 12345)
+    self.mox.VerifyAll()
+
+  def testExpungeQuickEditsByUsers(self):
+    user_ids = [333, 555, 777]
+    commit = False
+
+    self.features_service.quickeditmostrecent_tbl.Delete = mock.Mock()
+    self.features_service.quickedithistory_tbl.Delete = mock.Mock()
+
+    self.features_service.ExpungeQuickEditsByUsers(
+        self.cnxn, user_ids, limit=50)
+
+    self.features_service.quickeditmostrecent_tbl.Delete.\
+assert_called_once_with(self.cnxn, user_id=user_ids, commit=commit, limit=50)
+    self.features_service.quickedithistory_tbl.Delete.\
+assert_called_once_with(self.cnxn, user_id=user_ids, commit=commit, limit=50)
+
+  ### Saved User and Project Queries
+
+  def testGetSavedQuery_Valid(self):
+    self.features_service.savedquery_tbl.Select(
+        self.cnxn, cols=features_svc.SAVEDQUERY_COLS, id=[1]).AndReturn(
+        [(1, 'query1', 100, 'owner:me')])
+    self.features_service.savedqueryexecutesinproject_tbl.Select(
+        self.cnxn, cols=features_svc.SAVEDQUERYEXECUTESINPROJECT_COLS,
+        query_id=[1]).AndReturn([(1, 12345)])
+    self.mox.ReplayAll()
+    saved_query = self.features_service.GetSavedQuery(
+        self.cnxn, 1)
+    self.mox.VerifyAll()
+    self.assertEqual(1, saved_query.query_id)
+    self.assertEqual('query1', saved_query.name)
+    self.assertEqual(100, saved_query.base_query_id)
+    self.assertEqual('owner:me', saved_query.query)
+    self.assertEqual([12345], saved_query.executes_in_project_ids)
+
+  def testGetSavedQuery_Invalid(self):
+    self.features_service.savedquery_tbl.Select(
+        self.cnxn, cols=features_svc.SAVEDQUERY_COLS, id=[99]).AndReturn([])
+    self.features_service.savedqueryexecutesinproject_tbl.Select(
+        self.cnxn, cols=features_svc.SAVEDQUERYEXECUTESINPROJECT_COLS,
+        query_id=[99]).AndReturn([])
+    self.mox.ReplayAll()
+    saved_query = self.features_service.GetSavedQuery(
+        self.cnxn, 99)
+    self.mox.VerifyAll()
+    self.assertIsNone(saved_query)
+
+  def SetUpUsersSavedQueries(self, has_query_id=True):
+    query = tracker_bizobj.MakeSavedQuery(1, 'query1', 100, 'owner:me')
+    self.features_service.saved_query_cache.CacheItem(1, [query])
+
+    if has_query_id:
+      self.features_service.user2savedquery_tbl.Select(
+          self.cnxn,
+          cols=features_svc.SAVEDQUERY_COLS + ['user_id', 'subscription_mode'],
+          left_joins=[('SavedQuery ON query_id = id', [])],
+          order_by=[('rank', [])],
+          user_id=[2]).AndReturn(
+              [(2, 'query2', 100, 'status:New', 2, 'Sub_Mode')])
+      self.features_service.savedqueryexecutesinproject_tbl.Select(
+          self.cnxn,
+          cols=features_svc.SAVEDQUERYEXECUTESINPROJECT_COLS,
+          query_id=set([2])).AndReturn([(2, 12345)])
+    else:
+      self.features_service.user2savedquery_tbl.Select(
+          self.cnxn,
+          cols=features_svc.SAVEDQUERY_COLS + ['user_id', 'subscription_mode'],
+          left_joins=[('SavedQuery ON query_id = id', [])],
+          order_by=[('rank', [])],
+          user_id=[2]).AndReturn([])
+
+  def testGetUsersSavedQueriesDict(self):
+    self.SetUpUsersSavedQueries()
+    self.mox.ReplayAll()
+    results_dict = self.features_service._GetUsersSavedQueriesDict(
+        self.cnxn, [1, 2])
+    self.mox.VerifyAll()
+    self.assertIn(1, results_dict)
+    self.assertIn(2, results_dict)
+
+  def testGetUsersSavedQueriesDictWithoutSavedQueries(self):
+    self.SetUpUsersSavedQueries(False)
+    self.mox.ReplayAll()
+    results_dict = self.features_service._GetUsersSavedQueriesDict(
+        self.cnxn, [1, 2])
+    self.mox.VerifyAll()
+    self.assertIn(1, results_dict)
+    self.assertNotIn(2, results_dict)
+
+  def testGetSavedQueriesByUserID(self):
+    self.SetUpUsersSavedQueries()
+    self.mox.ReplayAll()
+    saved_queries = self.features_service.GetSavedQueriesByUserID(
+        self.cnxn, 2)
+    self.mox.VerifyAll()
+    self.assertEqual(1, len(saved_queries))
+    self.assertEqual(2, saved_queries[0].query_id)
+
+  def SetUpCannedQueriesForProjects(self, project_ids):
+    query = tracker_bizobj.MakeSavedQuery(
+        2, 'project-query-2', 110, 'owner:goose@chaos.honk')
+    self.features_service.canned_query_cache.CacheItem(12346, [query])
+    self.features_service.canned_query_cache.CacheAll = mock.Mock()
+    self.features_service.project2savedquery_tbl.Select(
+        self.cnxn, cols=['project_id'] + features_svc.SAVEDQUERY_COLS,
+        left_joins=[('SavedQuery ON query_id = id', [])],
+        order_by=[('rank', [])], project_id=project_ids).AndReturn(
+        [(12345, 1, 'query1', 100, 'owner:me')])
+
+  def testGetCannedQueriesForProjects(self):
+    project_ids = [12345, 12346]
+    self.SetUpCannedQueriesForProjects(project_ids)
+    self.mox.ReplayAll()
+    results_dict = self.features_service.GetCannedQueriesForProjects(
+        self.cnxn, project_ids)
+    self.mox.VerifyAll()
+    self.assertIn(12345, results_dict)
+    self.assertIn(12346, results_dict)
+    self.features_service.canned_query_cache.CacheAll.assert_called_once_with(
+        results_dict)
+
+  def testGetCannedQueriesByProjectID(self):
+    project_id= 12345
+    self.SetUpCannedQueriesForProjects([project_id])
+    self.mox.ReplayAll()
+    result = self.features_service.GetCannedQueriesByProjectID(
+        self.cnxn, project_id)
+    self.mox.VerifyAll()
+    self.assertEqual(1, len(result))
+    self.assertEqual(1, result[0].query_id)
+
+  def SetUpUpdateSavedQueries(self, commit=True):
+    query1 = tracker_bizobj.MakeSavedQuery(1, 'query1', 100, 'owner:me')
+    query2 = tracker_bizobj.MakeSavedQuery(None, 'query2', 100, 'status:New')
+    saved_queries = [query1, query2]
+    savedquery_rows = [
+        (sq.query_id or None, sq.name, sq.base_query_id, sq.query)
+        for sq in saved_queries]
+    self.features_service.savedquery_tbl.Delete(
+        self.cnxn, id=[1], commit=commit)
+    self.features_service.savedquery_tbl.InsertRows(
+        self.cnxn, features_svc.SAVEDQUERY_COLS, savedquery_rows, commit=commit,
+        return_generated_ids=True).AndReturn([11, 12])
+    return saved_queries
+
+  def testUpdateSavedQueries(self):
+    saved_queries = self.SetUpUpdateSavedQueries()
+    self.mox.ReplayAll()
+    self.features_service._UpdateSavedQueries(
+        self.cnxn, saved_queries, True)
+    self.mox.VerifyAll()
+
+  def testUpdateCannedQueries(self):
+    self.features_service.project2savedquery_tbl.Delete(
+        self.cnxn, project_id=12345, commit=False)
+    canned_queries = self.SetUpUpdateSavedQueries(False)
+    project2savedquery_rows = [(12345, 0, 1), (12345, 1, 12)]
+    self.features_service.project2savedquery_tbl.InsertRows(
+        self.cnxn, features_svc.PROJECT2SAVEDQUERY_COLS,
+        project2savedquery_rows, commit=False)
+    self.features_service.canned_query_cache.Invalidate = mock.Mock()
+    self.cnxn.Commit()
+    self.mox.ReplayAll()
+    self.features_service.UpdateCannedQueries(
+        self.cnxn, 12345, canned_queries)
+    self.mox.VerifyAll()
+    self.features_service.canned_query_cache.Invalidate.assert_called_once_with(
+        self.cnxn, 12345)
+
+  def testUpdateUserSavedQueries(self):
+    saved_queries = self.SetUpUpdateSavedQueries(False)
+    self.features_service.savedqueryexecutesinproject_tbl.Delete(
+        self.cnxn, query_id=[1], commit=False)
+    self.features_service.user2savedquery_tbl.Delete(
+        self.cnxn, user_id=1, commit=False)
+    user2savedquery_rows = [
+      (1, 0, 1, 'noemail'), (1, 1, 12, 'noemail')]
+    self.features_service.user2savedquery_tbl.InsertRows(
+        self.cnxn, features_svc.USER2SAVEDQUERY_COLS,
+        user2savedquery_rows, commit=False)
+    self.features_service.savedqueryexecutesinproject_tbl.InsertRows(
+        self.cnxn, features_svc.SAVEDQUERYEXECUTESINPROJECT_COLS, [],
+        commit=False)
+    self.cnxn.Commit()
+    self.mox.ReplayAll()
+    self.features_service.UpdateUserSavedQueries(
+        self.cnxn, 1, saved_queries)
+    self.mox.VerifyAll()
+
+  ### Subscriptions
+
+  def testGetSubscriptionsInProjects(self):
+    sqeip_join_str = (
+        'SavedQueryExecutesInProject ON '
+        'SavedQueryExecutesInProject.query_id = User2SavedQuery.query_id')
+    user_join_str = (
+        'User ON '
+        'User.user_id = User2SavedQuery.user_id')
+    now = 1519418530
+    self.mox.StubOutWithMock(time, 'time')
+    time.time().MultipleTimes().AndReturn(now)
+    absence_threshold = now - settings.subscription_timeout_secs
+    where = [
+        ('(User.banned IS NULL OR User.banned = %s)', ['']),
+        ('User.last_visit_timestamp >= %s', [absence_threshold]),
+        ('(User.email_bounce_timestamp IS NULL OR '
+         'User.email_bounce_timestamp = %s)', [0]),
+        ]
+    self.features_service.user2savedquery_tbl.Select(
+        self.cnxn, cols=['User2SavedQuery.user_id'], distinct=True,
+        joins=[(sqeip_join_str, []), (user_join_str, [])],
+        subscription_mode='immediate', project_id=12345,
+        where=where).AndReturn(
+        [(1, 'asd'), (2, 'efg')])
+    self.SetUpUsersSavedQueries()
+    self.mox.ReplayAll()
+    result = self.features_service.GetSubscriptionsInProjects(
+        self.cnxn, 12345)
+    self.mox.VerifyAll()
+    self.assertIn(1, result)
+    self.assertIn(2, result)
+
+  def testExpungeSavedQueriesExecuteInProject(self):
+    self.features_service.savedqueryexecutesinproject_tbl.Delete(
+        self.cnxn, project_id=12345)
+    self.features_service.project2savedquery_tbl.Select(
+        self.cnxn, cols=['query_id'], project_id=12345).AndReturn(
+        [(1, 'asd'), (2, 'efg')])
+    self.features_service.project2savedquery_tbl.Delete(
+        self.cnxn, project_id=12345)
+    self.features_service.savedquery_tbl.Delete(
+        self.cnxn, id=[1, 2])
+    self.mox.ReplayAll()
+    self.features_service.ExpungeSavedQueriesExecuteInProject(
+        self.cnxn, 12345)
+    self.mox.VerifyAll()
+
+  def testExpungeSavedQueriesByUsers(self):
+    user_ids = [222, 444, 666]
+    commit = False
+
+    sv_rows = [(8,), (9,)]
+    self.features_service.user2savedquery_tbl.Select = mock.Mock(
+        return_value=sv_rows)
+    self.features_service.user2savedquery_tbl.Delete = mock.Mock()
+    self.features_service.savedqueryexecutesinproject_tbl.Delete = mock.Mock()
+    self.features_service.savedquery_tbl.Delete = mock.Mock()
+
+    self.features_service.ExpungeSavedQueriesByUsers(
+        self.cnxn, user_ids, limit=50)
+
+    self.features_service.user2savedquery_tbl.Select.assert_called_once_with(
+        self.cnxn, cols=['query_id'], user_id=user_ids, limit=50)
+    self.features_service.user2savedquery_tbl.Delete.assert_called_once_with(
+        self.cnxn, query_id=[8, 9], commit=commit)
+    self.features_service.savedqueryexecutesinproject_tbl.\
+Delete.assert_called_once_with(
+        self.cnxn, query_id=[8, 9], commit=commit)
+    self.features_service.savedquery_tbl.Delete.assert_called_once_with(
+        self.cnxn, id=[8, 9], commit=commit)
+
+
+  ### Filter Rules
+
+  def testDeserializeFilterRules(self):
+    filterrule_rows = [
+        (12345, 0, 'predicate1', 'default_status:New'),
+        (12345, 1, 'predicate2', 'default_owner_id:1 add_cc_id:2'),
+    ]
+    result_dict = self.features_service._DeserializeFilterRules(
+        filterrule_rows)
+    self.assertIn(12345, result_dict)
+    self.assertEqual(2, len(result_dict[12345]))
+    self.assertEqual('New', result_dict[12345][0].default_status)
+    self.assertEqual(1, result_dict[12345][1].default_owner_id)
+    self.assertEqual([2], result_dict[12345][1].add_cc_ids)
+
+  def testDeserializeRuleConsequence_Multiple(self):
+    consequence = ('default_status:New default_owner_id:1 add_cc_id:2'
+                   ' add_label:label-1 add_label:label.2'
+                   ' add_notify:admin@example.com')
+    (default_status, default_owner_id, add_cc_ids, add_labels,
+     add_notify, warning, error
+     ) = self.features_service._DeserializeRuleConsequence(
+        consequence)
+    self.assertEqual('New', default_status)
+    self.assertEqual(1, default_owner_id)
+    self.assertEqual([2], add_cc_ids)
+    self.assertEqual(['label-1', 'label.2'], add_labels)
+    self.assertEqual(['admin@example.com'], add_notify)
+    self.assertEqual(None, warning)
+    self.assertEqual(None, error)
+
+  def testDeserializeRuleConsequence_Warning(self):
+    consequence = ('warning:Do not use status:New if there is an owner')
+    (_status, _owner_id, _cc_ids, _labels, _notify,
+     warning, _error) = self.features_service._DeserializeRuleConsequence(
+        consequence)
+    self.assertEqual(
+        'Do not use status:New if there is an owner',
+        warning)
+
+  def testDeserializeRuleConsequence_Error(self):
+    consequence = ('error:Pri-0 issues require an owner')
+    (_status, _owner_id, _cc_ids, _labels, _notify,
+     _warning, error) = self.features_service._DeserializeRuleConsequence(
+        consequence)
+    self.assertEqual(
+        'Pri-0 issues require an owner',
+        error)
+
+  def SetUpGetFilterRulesByProjectIDs(self):
+    filterrule_rows = [
+        (12345, 0, 'predicate1', 'default_status:New'),
+        (12345, 1, 'predicate2', 'default_owner_id:1 add_cc_id:2'),
+    ]
+
+    self.features_service.filterrule_tbl.Select(
+        self.cnxn, cols=features_svc.FILTERRULE_COLS,
+        project_id=[12345]).AndReturn(filterrule_rows)
+
+  def testGetFilterRulesByProjectIDs(self):
+    self.SetUpGetFilterRulesByProjectIDs()
+    self.mox.ReplayAll()
+    result = self.features_service._GetFilterRulesByProjectIDs(
+        self.cnxn, [12345])
+    self.mox.VerifyAll()
+    self.assertIn(12345, result)
+    self.assertEqual(2, len(result[12345]))
+
+  def testGetFilterRules(self):
+    self.SetUpGetFilterRulesByProjectIDs()
+    self.mox.ReplayAll()
+    result = self.features_service.GetFilterRules(
+        self.cnxn, 12345)
+    self.mox.VerifyAll()
+    self.assertEqual(2, len(result))
+
+  def testSerializeRuleConsequence(self):
+    rule = filterrules_helpers.MakeRule(
+        'predicate', 'New', 1, [1, 2], ['label1', 'label2'], ['admin'])
+    result = self.features_service._SerializeRuleConsequence(rule)
+    self.assertEqual('add_label:label1 add_label:label2 default_status:New'
+                     ' default_owner_id:1 add_cc_id:1 add_cc_id:2'
+                     ' add_notify:admin', result)
+
+  def testUpdateFilterRules(self):
+    self.features_service.filterrule_tbl.Delete(self.cnxn, project_id=12345)
+    rows = [
+        (12345, 0, 'predicate1', 'add_label:label1 add_label:label2'
+                                 ' default_status:New default_owner_id:1'
+                                 ' add_cc_id:1 add_cc_id:2 add_notify:admin'),
+        (12345, 1, 'predicate2', 'add_label:label2 add_label:label3'
+                                 ' default_status:Fixed default_owner_id:2'
+                                 ' add_cc_id:1 add_cc_id:2 add_notify:admin2')
+    ]
+    self.features_service.filterrule_tbl.InsertRows(
+        self.cnxn, features_svc.FILTERRULE_COLS, rows)
+    rule1 = filterrules_helpers.MakeRule(
+        'predicate1', 'New', 1, [1, 2], ['label1', 'label2'], ['admin'])
+    rule2 = filterrules_helpers.MakeRule(
+        'predicate2', 'Fixed', 2, [1, 2], ['label2', 'label3'], ['admin2'])
+    self.mox.ReplayAll()
+    self.features_service.UpdateFilterRules(
+        self.cnxn, 12345, [rule1, rule2])
+    self.mox.VerifyAll()
+
+  def testExpungeFilterRules(self):
+    self.features_service.filterrule_tbl.Delete(self.cnxn, project_id=12345)
+    self.mox.ReplayAll()
+    self.features_service.ExpungeFilterRules(
+        self.cnxn, 12345)
+    self.mox.VerifyAll()
+
+  def testExpungeFilterRulesByUser(self):
+    emails = {'chicken@farm.test': 333, 'cow@fart.test': 222}
+    project_1_keep_rows = [
+        (1, 1, 'label:no-match-here', 'add_label:should-be-deleted-inserted')]
+    project_16_keep_rows =[
+        (16, 20, 'label:no-match-here', 'add_label:should-be-deleted-inserted'),
+        (16, 21, 'owner:rainbow@test.com', 'add_label:delete-and-insert')]
+    random_row = [
+        (19, 9, 'label:no-match-in-project', 'add_label:no-DELETE-INSERTROW')]
+    rows_to_delete = [
+        (1, 45, 'owner:cow@fart.test', 'add_label:happy-cows'),
+        (1, 46, 'owner:cow@fart.test', 'add_label:balloon'),
+        (16, 47, 'label:queue-eggs', 'add_notify:chicken@farm.test'),
+        (17, 48, 'owner:farmer@farm.test', 'add_cc_id:111 add_cc_id:222'),
+        (17, 48, 'label:queue-chickens', 'default_owner_id:333'),
+    ]
+    rows = (rows_to_delete + project_1_keep_rows + project_16_keep_rows +
+            random_row)
+    self.features_service.filterrule_tbl.Select = mock.Mock(return_value=rows)
+    self.features_service.filterrule_tbl.Delete = mock.Mock()
+
+    rules_dict = self.features_service.ExpungeFilterRulesByUser(
+        self.cnxn, emails)
+    expected_dict = {
+        1: [tracker_pb2.FilterRule(
+            predicate=rows[0][2], add_labels=['happy-cows']),
+            tracker_pb2.FilterRule(
+                predicate=rows[1][2], add_labels=['balloon'])],
+        16: [tracker_pb2.FilterRule(
+            predicate=rows[2][2], add_notify_addrs=['chicken@farm.test'])],
+        17: [tracker_pb2.FilterRule(
+            predicate=rows[3][2], add_cc_ids=[111, 222])],
+    }
+    self.assertItemsEqual(rules_dict, expected_dict)
+
+    self.features_service.filterrule_tbl.Select.assert_called_once_with(
+        self.cnxn, features_svc.FILTERRULE_COLS)
+
+    calls = [mock.call(self.cnxn, project_id=project_id, rank=rank,
+                       predicate=predicate, consequence=consequence,
+                       commit=False)
+             for (project_id, rank, predicate, consequence) in rows_to_delete]
+    self.features_service.filterrule_tbl.Delete.assert_has_calls(
+        calls, any_order=True)
+
+  def testExpungeFilterRulesByUser_EmptyUsers(self):
+    self.features_service.filterrule_tbl.Select = mock.Mock()
+    self.features_service.filterrule_tbl.Delete = mock.Mock()
+
+    rules_dict = self.features_service.ExpungeFilterRulesByUser(self.cnxn, {})
+    self.assertEqual(rules_dict, {})
+    self.features_service.filterrule_tbl.Select.assert_not_called()
+    self.features_service.filterrule_tbl.Delete.assert_not_called()
+
+  def testExpungeFilterRulesByUser_NoMatch(self):
+    rows = [
+        (17, 48, 'owner:farmer@farm.test', 'add_cc_id:111 add_cc_id: 222'),
+        (19, 9, 'label:no-match-in-project', 'add_label:no-DELETE-INSERTROW'),
+        ]
+    self.features_service.filterrule_tbl.Select = mock.Mock(return_value=rows)
+    self.features_service.filterrule_tbl.Delete = mock.Mock()
+
+    emails = {'cow@fart.test': 222}
+    rules_dict = self.features_service.ExpungeFilterRulesByUser(
+        self.cnxn, emails)
+    self.assertItemsEqual(rules_dict, {})
+
+    self.features_service.filterrule_tbl.Select.assert_called_once_with(
+        self.cnxn, features_svc.FILTERRULE_COLS)
+    self.features_service.filterrule_tbl.Delete.assert_not_called()
+
+  ### Hotlists
+
+  def SetUpCreateHotlist(self):
+    # Check for the existing hotlist: there should be none.
+    # Two hotlists named 'hot1' exist but neither are owned by the user.
+    self.features_service.hotlist2user_tbl.Select(
+        self.cnxn, cols=['hotlist_id', 'user_id'],
+        user_id=[567], role_name='owner').AndReturn([])
+
+    self.features_service.hotlist_tbl.Select(
+        self.cnxn, cols=['id', 'name'], id=[], is_deleted=False,
+        where =[(('LOWER(name) IN (%s)'), ['hot1'])]).AndReturn([])
+
+    # Inserting the hotlist returns the id.
+    self.features_service.hotlist_tbl.InsertRow(
+        self.cnxn, name='hot1', summary='hot 1', description='test hotlist',
+        is_private=False,
+        default_col_spec=features_constants.DEFAULT_COL_SPEC).AndReturn(123)
+
+    # Insert the issues: there are none.
+    self.features_service.hotlist2issue_tbl.InsertRows(
+        self.cnxn, features_svc.HOTLIST2ISSUE_COLS,
+        [], commit=False)
+
+    # Insert the users: there is one owner and one editor.
+    self.features_service.hotlist2user_tbl.InsertRows(
+        self.cnxn, ['hotlist_id', 'user_id', 'role_name'],
+        [(123, 567, 'owner'), (123, 678, 'editor')])
+
+  def testCreateHotlist(self):
+    self.SetUpCreateHotlist()
+    self.mox.ReplayAll()
+    self.features_service.CreateHotlist(
+        self.cnxn, 'hot1', 'hot 1', 'test hotlist', [567], [678])
+    self.mox.VerifyAll()
+
+  def testCreateHotlist_InvalidName(self):
+    with self.assertRaises(exceptions.InputException):
+      self.features_service.CreateHotlist(
+          self.cnxn, '***Invalid name***', 'Misnamed Hotlist',
+          'A Hotlist with an invalid name', [567], [678])
+
+  def testCreateHotlist_NoOwner(self):
+    with self.assertRaises(features_svc.UnownedHotlistException):
+      self.features_service.CreateHotlist(
+          self.cnxn, 'unowned-hotlist', 'Unowned Hotlist',
+          'A Hotlist that is not owned', [], [])
+
+  def testCreateHotlist_HotlistAlreadyExists(self):
+    self.features_service.hotlist_id_2lc.CacheItem(('fake-hotlist', 567), 123)
+    with self.assertRaises(features_svc.HotlistAlreadyExists):
+      self.features_service.CreateHotlist(
+          self.cnxn, 'Fake-Hotlist', 'Misnamed Hotlist',
+          'This name is already in use', [567], [678])
+
+  def testTransferHotlistOwnership(self):
+    hotlist_id = 123
+    new_owner_id = 222
+    hotlist = fake.Hotlist(hotlist_name='unique', hotlist_id=hotlist_id,
+                           owner_ids=[111], editor_ids=[222, 333],
+                           follower_ids=[444])
+    # LookupHotlistIDs, proposed new owner, owns no hotlist with the same name.
+    self.features_service.hotlist2user_tbl.Select = mock.Mock(
+        return_value=[(223, new_owner_id), (567, new_owner_id)])
+    self.features_service.hotlist_tbl.Select = mock.Mock(return_value=[])
+
+    # UpdateHotlistRoles
+    self.features_service.GetHotlist = mock.Mock(return_value=hotlist)
+    self.features_service.hotlist2user_tbl.Delete = mock.Mock()
+    self.features_service.hotlist2user_tbl.InsertRows = mock.Mock()
+
+    self.features_service.TransferHotlistOwnership(
+        self.cnxn, hotlist, new_owner_id, True)
+
+    self.features_service.hotlist2user_tbl.Delete.assert_called_once_with(
+        self.cnxn, hotlist_id=hotlist_id, commit=False)
+
+    self.features_service.GetHotlist.assert_called_once_with(
+        self.cnxn, hotlist_id, use_cache=False)
+    insert_rows = [(hotlist_id, new_owner_id, 'owner'),
+                   (hotlist_id, 333, 'editor'),
+                   (hotlist_id, 111, 'editor'),
+                   (hotlist_id, 444, 'follower')]
+    self.features_service.hotlist2user_tbl.InsertRows.assert_called_once_with(
+        self.cnxn, features_svc.HOTLIST2USER_COLS, insert_rows, commit=False)
+
+  def testLookupHotlistIDs(self):
+    # Set up DB query mocks.
+    self.features_service.hotlist2user_tbl.Select = mock.Mock(return_value=[
+        (123, 222), (125, 333)])
+    self.features_service.hotlist_tbl.Select = mock.Mock(
+        return_value=[(123, 'q3-TODO'), (125, 'q4-TODO')])
+
+    self.features_service.hotlist_id_2lc.CacheItem(
+        ('q4-todo', 333), 124)
+
+    ret = self.features_service.LookupHotlistIDs(
+        self.cnxn, ['q3-todo', 'Q4-TODO'], [222, 333, 444])
+    self.assertEqual(ret, {('q3-todo', 222) : 123, ('q4-todo', 333): 124})
+    self.features_service.hotlist2user_tbl.Select.assert_called_once_with(
+        self.cnxn, cols=['hotlist_id', 'user_id'], user_id=[444, 333, 222],
+        role_name='owner')
+    self.features_service.hotlist_tbl.Select.assert_called_once_with(
+        self.cnxn, cols=['id', 'name'], id=[123, 125], is_deleted=False,
+        where=[
+            (('LOWER(name) IN (%s,%s)'), ['q3-todo', 'q4-todo'])])
+
+  def SetUpLookupUserHotlists(self):
+    self.features_service.hotlist2user_tbl.Select(
+        self.cnxn, cols=['user_id', 'hotlist_id'],
+        user_id=[111], left_joins=[('Hotlist ON hotlist_id = id', [])],
+        where=[('Hotlist.is_deleted = %s', [False])]).AndReturn([(111, 123)])
+
+  def testLookupUserHotlists(self):
+    self.SetUpLookupUserHotlists()
+    self.mox.ReplayAll()
+    ret = self.features_service.LookupUserHotlists(
+        self.cnxn, [111])
+    self.assertEqual(ret, {111: [123]})
+    self.mox.VerifyAll()
+
+  def SetUpLookupIssueHotlists(self):
+    self.features_service.hotlist2issue_tbl.Select(
+        self.cnxn, cols=['hotlist_id', 'issue_id'],
+        issue_id=[987], left_joins=[('Hotlist ON hotlist_id = id', [])],
+        where=[('Hotlist.is_deleted = %s', [False])]).AndReturn([(123, 987)])
+
+  def testLookupIssueHotlists(self):
+    self.SetUpLookupIssueHotlists()
+    self.mox.ReplayAll()
+    ret = self.features_service.LookupIssueHotlists(
+        self.cnxn, [987])
+    self.assertEqual(ret, {987: [123]})
+    self.mox.VerifyAll()
+
+  def SetUpGetHotlists(
+      self, hotlist_id, hotlist_rows=None, issue_rows=None, role_rows=None):
+    if not hotlist_rows:
+      hotlist_rows = [(hotlist_id, 'hotlist2', 'test hotlist 2',
+                       'test hotlist', False, '')]
+    if not issue_rows:
+      issue_rows=[]
+    if not role_rows:
+      role_rows=[]
+    self.features_service.hotlist_tbl.Select(
+        self.cnxn, cols=features_svc.HOTLIST_COLS,
+        id=[hotlist_id], is_deleted=False).AndReturn(hotlist_rows)
+    self.features_service.hotlist2user_tbl.Select(
+        self.cnxn, cols=['hotlist_id', 'user_id', 'role_name'],
+        hotlist_id=[hotlist_id]).AndReturn(role_rows)
+    self.features_service.hotlist2issue_tbl.Select(
+        self.cnxn, cols=features_svc.HOTLIST2ISSUE_COLS,
+        hotlist_id=[hotlist_id],
+        order_by=[('rank DESC', []), ('issue_id', [])]).AndReturn(issue_rows)
+
+  def SetUpUpdateHotlist(self, hotlist_id):
+    hotlist_rows = [
+        (hotlist_id, 'hotlist2', 'test hotlist 2', 'test hotlist', False, '')
+    ]
+    role_rows = [(hotlist_id, 111, 'owner')]
+
+    self.features_service.hotlist_tbl.Select = mock.Mock(
+        return_value=hotlist_rows)
+    self.features_service.hotlist2user_tbl.Select = mock.Mock(
+        return_value=role_rows)
+    self.features_service.hotlist2issue_tbl.Select = mock.Mock(return_value=[])
+
+    self.features_service.hotlist_tbl.Update = mock.Mock()
+    self.features_service.hotlist2user_tbl.Delete = mock.Mock()
+    self.features_service.hotlist2user_tbl.InsertRows = mock.Mock()
+
+  def testUpdateHotlist(self):
+    hotlist_id = 456
+    self.SetUpUpdateHotlist(hotlist_id)
+
+    self.features_service.UpdateHotlist(
+        self.cnxn,
+        hotlist_id,
+        summary='A better one-line summary',
+        owner_id=333,
+        add_editor_ids=[444, 555])
+    delta = {'summary': 'A better one-line summary'}
+    self.features_service.hotlist_tbl.Update.assert_called_once_with(
+        self.cnxn, delta, id=hotlist_id, commit=False)
+    self.features_service.hotlist2user_tbl.Delete.assert_called_once_with(
+        self.cnxn, hotlist_id=hotlist_id, role='owner', commit=False)
+    add_role_rows = [
+        (hotlist_id, 333, 'owner'), (hotlist_id, 444, 'editor'),
+        (hotlist_id, 555, 'editor')
+    ]
+    self.features_service.hotlist2user_tbl.InsertRows.assert_called_once_with(
+        self.cnxn, features_svc.HOTLIST2USER_COLS, add_role_rows, commit=False)
+
+  def testUpdateHotlist_NoRoleChanges(self):
+    hotlist_id = 456
+    self.SetUpUpdateHotlist(hotlist_id)
+
+    self.features_service.UpdateHotlist(self.cnxn, hotlist_id, name='chicken')
+    delta = {'name': 'chicken'}
+    self.features_service.hotlist_tbl.Update.assert_called_once_with(
+        self.cnxn, delta, id=hotlist_id, commit=False)
+    self.features_service.hotlist2user_tbl.Delete.assert_not_called()
+    self.features_service.hotlist2user_tbl.InsertRows.assert_not_called()
+
+  def testUpdateHotlist_NoOwnerChange(self):
+    hotlist_id = 456
+    self.SetUpUpdateHotlist(hotlist_id)
+
+    self.features_service.UpdateHotlist(
+        self.cnxn, hotlist_id, name='chicken', add_editor_ids=[
+            333,
+        ])
+    delta = {'name': 'chicken'}
+    self.features_service.hotlist_tbl.Update.assert_called_once_with(
+        self.cnxn, delta, id=hotlist_id, commit=False)
+    self.features_service.hotlist2user_tbl.Delete.assert_not_called()
+    self.features_service.hotlist2user_tbl.InsertRows.assert_called_once_with(
+        self.cnxn,
+        features_svc.HOTLIST2USER_COLS, [
+            (hotlist_id, 333, 'editor'),
+        ],
+        commit=False)
+
+  def SetUpRemoveHotlistEditors(self):
+    hotlist = fake.Hotlist(
+        hotlist_name='hotlist',
+        hotlist_id=456,
+        owner_ids=[111],
+        editor_ids=[222, 333, 444])
+    self.features_service.GetHotlist = mock.Mock(return_value=hotlist)
+    self.features_service.hotlist2user_tbl.Delete = mock.Mock()
+    return hotlist
+
+  def testRemoveHotlistEditors(self):
+    """We can remove editors from a hotlist."""
+    hotlist = self.SetUpRemoveHotlistEditors()
+    remove_editor_ids = [222, 333]
+    self.features_service.RemoveHotlistEditors(
+        self.cnxn, hotlist.hotlist_id, remove_editor_ids=remove_editor_ids)
+    self.features_service.hotlist2user_tbl.Delete.assert_called_once_with(
+        self.cnxn, hotlist_id=hotlist.hotlist_id, user_id=remove_editor_ids)
+    self.assertEqual(hotlist.editor_ids, [444])
+
+  def testRemoveHotlistEditors_NoOp(self):
+    """A NoOp update does not trigger and sql table calls."""
+    hotlist = self.SetUpRemoveHotlistEditors()
+    with self.assertRaises(exceptions.InputException):
+      self.features_service.RemoveHotlistEditors(
+          self.cnxn, hotlist.hotlist_id, remove_editor_ids=[])
+
+  def SetUpUpdateHotlistItemsFields(self, hotlist_id, issue_ids):
+    hotlist_rows = [(hotlist_id, 'hotlist', '', '', True, '')]
+    insert_rows = [(345, 11, 112, 333, 2002, ''),
+                   (345, 33, 332, 333, 2002, ''),
+                   (345, 55, 552, 333, 2002, '')]
+    issue_rows = [(345, 11, 1, 333, 2002, ''), (345, 33, 3, 333, 2002, ''),
+             (345, 55, 3, 333, 2002, '')]
+    self.SetUpGetHotlists(
+        hotlist_id, hotlist_rows=hotlist_rows, issue_rows=issue_rows)
+    self.features_service.hotlist2issue_tbl.Delete(
+        self.cnxn, hotlist_id=hotlist_id,
+        issue_id=issue_ids, commit=False)
+    self.features_service.hotlist2issue_tbl.InsertRows(
+        self.cnxn, cols=features_svc.HOTLIST2ISSUE_COLS,
+        row_values=insert_rows, commit=True)
+
+  def testUpdateHotlistItemsFields_Ranks(self):
+    hotlist_item_fields = [
+        (11, 1, 333, 2002, ''), (33, 3, 333, 2002, ''),
+        (55, 3, 333, 2002, '')]
+    hotlist = fake.Hotlist(hotlist_name='hotlist', hotlist_id=345,
+                           hotlist_item_fields=hotlist_item_fields)
+    self.features_service.hotlist_2lc.CacheItem(345, hotlist)
+    relations_to_change = {11: 112, 33: 332, 55: 552}
+    issue_ids = [11, 33, 55]
+    self.SetUpUpdateHotlistItemsFields(345, issue_ids)
+    self.mox.ReplayAll()
+    self.features_service.UpdateHotlistItemsFields(
+        self.cnxn, 345, new_ranks=relations_to_change)
+    self.mox.VerifyAll()
+
+  def testUpdateHotlistItemsFields_Notes(self):
+    pass
+
+  def testGetHotlists(self):
+    hotlist1 = fake.Hotlist(hotlist_name='hotlist1', hotlist_id=123)
+    self.features_service.hotlist_2lc.CacheItem(123, hotlist1)
+    self.SetUpGetHotlists(456)
+    self.mox.ReplayAll()
+    hotlist_dict = self.features_service.GetHotlists(
+        self.cnxn, [123, 456])
+    self.mox.VerifyAll()
+    self.assertItemsEqual([123, 456], list(hotlist_dict.keys()))
+    self.assertEqual('hotlist1', hotlist_dict[123].name)
+    self.assertEqual('hotlist2', hotlist_dict[456].name)
+
+  def testGetHotlistsByID(self):
+    hotlist1 = fake.Hotlist(hotlist_name='hotlist1', hotlist_id=123)
+    self.features_service.hotlist_2lc.CacheItem(123, hotlist1)
+    # NOTE: The setup function must take a hotlist_id that is different
+    # from what was used in previous tests, otherwise the methods in the
+    # setup function will never get called.
+    self.SetUpGetHotlists(456)
+    self.mox.ReplayAll()
+    _, actual_missed = self.features_service.GetHotlistsByID(
+        self.cnxn, [123, 456])
+    self.mox.VerifyAll()
+    self.assertEqual(actual_missed, [])
+
+  def testGetHotlistsByUserID(self):
+    self.SetUpLookupUserHotlists()
+    self.SetUpGetHotlists(123)
+    self.mox.ReplayAll()
+    hotlists = self.features_service.GetHotlistsByUserID(self.cnxn, 111)
+    self.assertEqual(len(hotlists), 1)
+    self.assertEqual(hotlists[0].hotlist_id, 123)
+    self.mox.VerifyAll()
+
+  def testGetHotlistsByIssueID(self):
+    self.SetUpLookupIssueHotlists()
+    self.SetUpGetHotlists(123)
+    self.mox.ReplayAll()
+    hotlists = self.features_service.GetHotlistsByIssueID(self.cnxn, 987)
+    self.assertEqual(len(hotlists), 1)
+    self.assertEqual(hotlists[0].hotlist_id, 123)
+    self.mox.VerifyAll()
+
+  def SetUpUpdateHotlistRoles(
+      self, hotlist_id, owner_ids, editor_ids, follower_ids):
+
+    self.features_service.hotlist2user_tbl.Delete(
+        self.cnxn, hotlist_id=hotlist_id, commit=False)
+
+    insert_rows = [(hotlist_id, user_id, 'owner') for user_id in owner_ids]
+    insert_rows.extend(
+        [(hotlist_id, user_id, 'editor') for user_id in editor_ids])
+    insert_rows.extend(
+        [(hotlist_id, user_id, 'follower') for user_id in follower_ids])
+    self.features_service.hotlist2user_tbl.InsertRows(
+        self.cnxn, ['hotlist_id', 'user_id', 'role_name'],
+        insert_rows, commit=False)
+
+    self.cnxn.Commit()
+
+  def testUpdateHotlistRoles(self):
+    self.SetUpGetHotlists(456)
+    self.SetUpUpdateHotlistRoles(456, [111, 222], [333], [])
+    self.mox.ReplayAll()
+    self.features_service.UpdateHotlistRoles(
+        self.cnxn, 456, [111, 222], [333], [])
+    self.mox.VerifyAll()
+
+  def SetUpUpdateHotlistIssues(self, items):
+    hotlist = fake.Hotlist(hotlist_name='hotlist', hotlist_id=456)
+    hotlist.items = items
+    self.features_service.GetHotlist = mock.Mock(return_value=hotlist)
+    self.features_service.hotlist2issue_tbl.Delete = mock.Mock()
+    self.features_service.hotlist2issue_tbl.InsertRows = mock.Mock()
+    self.issue_service.GetIssues = mock.Mock()
+    return hotlist
+
+  def testUpdateHotlistIssues_ChangeIssues(self):
+    original_items = [
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78902, rank=11, adder_id=333, date_added=2345),  # update
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78904, rank=0, adder_id=333, date_added=2345)  # same
+    ]
+    hotlist = self.SetUpUpdateHotlistIssues(original_items)
+    updated_items = [
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78902, rank=13, adder_id=333, date_added=2345),  # update
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78903, rank=23, adder_id=333, date_added=2345)  # new
+    ]
+
+    self.features_service.UpdateHotlistIssues(
+        self.cnxn, hotlist.hotlist_id, updated_items, [], self.issue_service,
+        self.chart_service)
+
+    insert_rows = [
+        (hotlist.hotlist_id, 78902, 13, 333, 2345, ''),
+        (hotlist.hotlist_id, 78903, 23, 333, 2345, '')
+    ]
+    self.features_service.hotlist2issue_tbl.InsertRows.assert_called_once_with(
+        self.cnxn,
+        cols=features_svc.HOTLIST2ISSUE_COLS,
+        row_values=insert_rows,
+        commit=False)
+    self.features_service.hotlist2issue_tbl.Delete.assert_called_once_with(
+        self.cnxn,
+        hotlist_id=hotlist.hotlist_id,
+        issue_id=[78902, 78903],
+        commit=False)
+
+    # New hotlist itmes includes updated_items and unchanged items.
+    expected_all_items = [
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78904, rank=0, adder_id=333, date_added=2345),
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78902, rank=13, adder_id=333, date_added=2345),
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78903, rank=23, adder_id=333, date_added=2345)
+    ]
+    self.assertEqual(hotlist.items, expected_all_items)
+
+    # Assert we're storing the new snapshots of the affected issues.
+    self.issue_service.GetIssues.assert_called_once_with(
+        self.cnxn, [78902, 78903])
+
+  def testUpdateHotlistIssues_RemoveIssues(self):
+    original_items = [
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78901, rank=10, adder_id=222, date_added=2348),  # remove
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78904, rank=0, adder_id=333, date_added=2345),  # same
+    ]
+    hotlist = self.SetUpUpdateHotlistIssues(original_items)
+    remove_issue_ids = [78901]
+
+    self.features_service.UpdateHotlistIssues(
+        self.cnxn, hotlist.hotlist_id, [], remove_issue_ids, self.issue_service,
+        self.chart_service)
+
+    self.features_service.hotlist2issue_tbl.Delete.assert_called_once_with(
+        self.cnxn,
+        hotlist_id=hotlist.hotlist_id,
+        issue_id=remove_issue_ids,
+        commit=False)
+
+    # New hotlist itmes includes updated_items and unchanged items.
+    expected_all_items = [
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78904, rank=0, adder_id=333, date_added=2345)
+    ]
+    self.assertEqual(hotlist.items, expected_all_items)
+
+    # Assert we're storing the new snapshots of the affected issues.
+    self.issue_service.GetIssues.assert_called_once_with(self.cnxn, [78901])
+
+  def testUpdateHotlistIssues_RemoveAndChange(self):
+    original_items = [
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78901, rank=10, adder_id=222, date_added=2348),  # remove
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78902, rank=11, adder_id=333, date_added=2345),  # update
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78904, rank=0, adder_id=333, date_added=2345)  # same
+    ]
+    hotlist = self.SetUpUpdateHotlistIssues(original_items)
+    # test 78902 gets added back with `updated_items`
+    remove_issue_ids = [78901, 78902]
+    updated_items = [
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78902, rank=13, adder_id=333, date_added=2345),
+    ]
+
+    self.features_service.UpdateHotlistIssues(
+        self.cnxn, hotlist.hotlist_id, updated_items, remove_issue_ids,
+        self.issue_service, self.chart_service)
+
+    delete_calls = [
+        mock.call(
+            self.cnxn,
+            hotlist_id=hotlist.hotlist_id,
+            issue_id=remove_issue_ids,
+            commit=False),
+        mock.call(
+            self.cnxn,
+            hotlist_id=hotlist.hotlist_id,
+            issue_id=[78902],
+            commit=False)
+    ]
+    self.assertEqual(
+        self.features_service.hotlist2issue_tbl.Delete.mock_calls, delete_calls)
+
+    insert_rows = [
+        (hotlist.hotlist_id, 78902, 13, 333, 2345, ''),
+    ]
+    self.features_service.hotlist2issue_tbl.InsertRows.assert_called_once_with(
+        self.cnxn,
+        cols=features_svc.HOTLIST2ISSUE_COLS,
+        row_values=insert_rows,
+        commit=False)
+
+    # New hotlist itmes includes updated_items and unchanged items.
+    expected_all_items = [
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78904, rank=0, adder_id=333, date_added=2345),
+        features_pb2.Hotlist.HotlistItem(
+            issue_id=78902, rank=13, adder_id=333, date_added=2345),
+    ]
+    self.assertEqual(hotlist.items, expected_all_items)
+
+    # Assert we're storing the new snapshots of the affected issues.
+    self.issue_service.GetIssues.assert_called_once_with(
+        self.cnxn, [78901, 78902])
+
+  def testUpdateHotlistIssues_NoChanges(self):
+    with self.assertRaises(exceptions.InputException):
+      self.features_service.UpdateHotlistIssues(
+          self.cnxn, 456, [], None, self.issue_service, self.chart_service)
+
+  def SetUpUpdateHotlistItems(self, cnxn, hotlist_id, remove, added_tuples):
+    self.features_service.hotlist2issue_tbl.Delete(
+        cnxn, hotlist_id=hotlist_id, issue_id=remove, commit=False)
+    rank = 1
+    added_tuples_with_rank = [(issue_id, rank+10*mult, user_id, ts, note) for
+                              mult, (issue_id, user_id, ts, note) in
+                              enumerate(added_tuples)]
+    insert_rows = [(hotlist_id, issue_id,
+                    rank, user_id, date, note) for
+                   (issue_id, rank, user_id, date, note) in
+                   added_tuples_with_rank]
+    self.features_service.hotlist2issue_tbl.InsertRows(
+        cnxn, cols=features_svc.HOTLIST2ISSUE_COLS,
+        row_values=insert_rows, commit=False)
+
+  def testAddIssuesToHotlists(self):
+    added_tuples = [
+            (111, None, None, ''),
+            (222, None, None, ''),
+            (333, None, None, '')]
+    issues = [
+      tracker_pb2.Issue(issue_id=issue_id)
+      for issue_id, _, _, _ in added_tuples
+    ]
+    self.SetUpGetHotlists(456)
+    self.SetUpUpdateHotlistItems(
+        self.cnxn, 456, [], added_tuples)
+    self.SetUpGetHotlists(567)
+    self.SetUpUpdateHotlistItems(
+        self.cnxn, 567, [], added_tuples)
+
+    self.mox.StubOutWithMock(self.issue_service, 'GetIssues')
+    self.issue_service.GetIssues(self.cnxn,
+        [111, 222, 333]).AndReturn(issues)
+    self.chart_service.StoreIssueSnapshots(self.cnxn, issues,
+        commit=False)
+    self.mox.ReplayAll()
+    self.features_service.AddIssuesToHotlists(
+        self.cnxn, [456, 567], added_tuples, self.issue_service,
+        self.chart_service, commit=False)
+    self.mox.VerifyAll()
+
+  def testRemoveIssuesFromHotlists(self):
+    issue_rows = [
+      (456, 555, 1, None, None, ''),
+      (456, 666, 11, None, None, ''),
+    ]
+    issues = [tracker_pb2.Issue(issue_id=issue_rows[0][1])]
+    self.SetUpGetHotlists(456, issue_rows=issue_rows)
+    self.SetUpUpdateHotlistItems(
+        self. cnxn, 456, [555], [])
+    issue_rows = [
+      (789, 555, 1, None, None, ''),
+      (789, 666, 11, None, None, ''),
+    ]
+    self.SetUpGetHotlists(789, issue_rows=issue_rows)
+    self.SetUpUpdateHotlistItems(
+        self. cnxn, 789, [555], [])
+    self.mox.StubOutWithMock(self.issue_service, 'GetIssues')
+    self.issue_service.GetIssues(self.cnxn,
+        [555]).AndReturn(issues)
+    self.chart_service.StoreIssueSnapshots(self.cnxn, issues, commit=False)
+    self.mox.ReplayAll()
+    self.features_service.RemoveIssuesFromHotlists(
+        self.cnxn, [456, 789], [555], self.issue_service, self.chart_service,
+        commit=False)
+    self.mox.VerifyAll()
+
+  def testUpdateHotlistItems(self):
+    self.SetUpGetHotlists(456)
+    self.SetUpUpdateHotlistItems(
+        self. cnxn, 456, [], [
+            (111, None, None, ''),
+            (222, None, None, ''),
+            (333, None, None, '')])
+    self.mox.ReplayAll()
+    self.features_service.UpdateHotlistItems(
+        self.cnxn, 456, [],
+        [(111, None, None, ''),
+         (222, None, None, ''),
+         (333, None, None, '')], commit=False)
+    self.mox.VerifyAll()
+
+  def SetUpDeleteHotlist(self, cnxn, hotlist_id):
+    hotlist_rows = [(hotlist_id, 'hotlist', 'test hotlist',
+        'test list', False, '')]
+    self.SetUpGetHotlists(678, hotlist_rows=hotlist_rows,
+        role_rows=[(hotlist_id, 111, 'owner', )])
+    self.features_service.hotlist2issue_tbl.Select(self.cnxn,
+        cols=['Issue.project_id'], hotlist_id=hotlist_id, distinct=True,
+        left_joins=[('Issue ON issue_id = id', [])]).AndReturn([(1,)])
+    self.features_service.hotlist_tbl.Update(cnxn, {'is_deleted': True},
+        commit=False, id=hotlist_id)
+
+  def testDeleteHotlist(self):
+    self.SetUpDeleteHotlist(self.cnxn, 678)
+    self.mox.ReplayAll()
+    self.features_service.DeleteHotlist(self.cnxn, 678, commit=False)
+    self.mox.VerifyAll()
+
+  def testExpungeHotlists(self):
+    hotliststar_tbl = mock.Mock()
+    star_service = star_svc.AbstractStarService(
+        self.cache_manager, hotliststar_tbl, 'hotlist_id', 'user_id', 'hotlist')
+    hotliststar_tbl.Delete = mock.Mock()
+    user_service = user_svc.UserService(self.cache_manager)
+    user_service.hotlistvisithistory_tbl.Delete = mock.Mock()
+    chart_service = chart_svc.ChartService(self.config_service)
+    self.cnxn.Execute = mock.Mock()
+
+    hotlist1 = fake.Hotlist(hotlist_name='unique', hotlist_id=678,
+                            owner_ids=[111], editor_ids=[222, 333])
+    hotlist2 = fake.Hotlist(hotlist_name='unique2', hotlist_id=679,
+                            owner_ids=[111])
+    hotlists_by_id = {hotlist1.hotlist_id: hotlist1,
+                      hotlist2.hotlist_id: hotlist2}
+    self.features_service.GetHotlists = mock.Mock(return_value=hotlists_by_id)
+    self.features_service.hotlist2user_tbl.Delete = mock.Mock()
+    self.features_service.hotlist2issue_tbl.Delete = mock.Mock()
+    self.features_service.hotlist_tbl.Delete = mock.Mock()
+    # cache invalidation mocks
+    self.features_service.hotlist_2lc.InvalidateKeys = mock.Mock()
+    self.features_service.hotlist_id_2lc.InvalidateKeys = mock.Mock()
+    self.features_service.hotlist_user_to_ids.InvalidateKeys = mock.Mock()
+    self.config_service.InvalidateMemcacheForEntireProject = mock.Mock()
+
+    hotlists_project_id = 787
+    self.features_service.GetProjectIDsFromHotlist = mock.Mock(
+        return_value=[hotlists_project_id])
+
+    hotlist_ids = hotlists_by_id.keys()
+    commit = True  # commit in ExpungeHotlists should be True by default.
+    self.features_service.ExpungeHotlists(
+        self.cnxn, hotlist_ids, star_service, user_service, chart_service)
+
+    star_calls = [
+        mock.call(
+            self.cnxn, commit=commit, limit=None, hotlist_id=hotlist_ids[0]),
+        mock.call(
+            self.cnxn, commit=commit, limit=None, hotlist_id=hotlist_ids[1])]
+    hotliststar_tbl.Delete.assert_has_calls(star_calls)
+
+    self.cnxn.Execute.assert_called_once_with(
+        'DELETE FROM IssueSnapshot2Hotlist WHERE hotlist_id IN (%s,%s)',
+        [678, 679], commit=commit)
+    user_service.hotlistvisithistory_tbl.Delete.assert_called_once_with(
+        self.cnxn, commit=commit, hotlist_id=hotlist_ids)
+
+    self.features_service.hotlist2user_tbl.Delete.assert_called_once_with(
+        self.cnxn, hotlist_id=hotlist_ids, commit=commit)
+    self.features_service.hotlist2issue_tbl.Delete.assert_called_once_with(
+        self.cnxn, hotlist_id=hotlist_ids, commit=commit)
+    self.features_service.hotlist_tbl.Delete.assert_called_once_with(
+        self.cnxn, id=hotlist_ids, commit=commit)
+    # cache invalidation checks
+    self.features_service.hotlist_2lc.InvalidateKeys.assert_called_once_with(
+        self.cnxn, hotlist_ids)
+    invalidate_owner_calls = [
+        mock.call(self.cnxn, [(hotlist1.name, hotlist1.owner_ids[0])]),
+        mock.call(self.cnxn, [(hotlist2.name, hotlist2.owner_ids[0])])]
+    self.features_service.hotlist_id_2lc.InvalidateKeys.assert_has_calls(
+      invalidate_owner_calls)
+    self.features_service.hotlist_user_to_ids.InvalidateKeys.\
+assert_called_once_with(
+        self.cnxn, [333, 222, 111])
+    self.config_service.InvalidateMemcacheForEntireProject.\
+assert_called_once_with(hotlists_project_id)
+
+  def testExpungeUsersInHotlists(self):
+    hotliststar_tbl = mock.Mock()
+    star_service = star_svc.AbstractStarService(
+        self.cache_manager, hotliststar_tbl, 'hotlist_id', 'user_id', 'hotlist')
+    user_service = user_svc.UserService(self.cache_manager)
+    chart_service = chart_svc.ChartService(self.config_service)
+    user_ids = [111, 222]
+
+    # hotlist1 will get transferred to 333
+    hotlist1 = fake.Hotlist(hotlist_name='unique', hotlist_id=123,
+                            owner_ids=[111], editor_ids=[222, 333])
+    # hotlist2 will get deleted
+    hotlist2 = fake.Hotlist(hotlist_name='name', hotlist_id=223,
+                            owner_ids=[222], editor_ids=[111, 333])
+    delete_hotlists = [hotlist2.hotlist_id]
+    delete_hotlist_project_id = 788
+    self.features_service.GetProjectIDsFromHotlist = mock.Mock(
+        return_value=[delete_hotlist_project_id])
+    self.config_service.InvalidateMemcacheForEntireProject = mock.Mock()
+    hotlists_by_user_id = {
+        111: [hotlist1.hotlist_id, hotlist2.hotlist_id],
+        222: [hotlist1.hotlist_id, hotlist2.hotlist_id],
+        333: [hotlist1.hotlist_id, hotlist2.hotlist_id]}
+    self.features_service.LookupUserHotlists = mock.Mock(
+        return_value=hotlists_by_user_id)
+    hotlists_by_id = {hotlist1.hotlist_id: hotlist1,
+                      hotlist2.hotlist_id: hotlist2}
+    self.features_service.GetHotlistsByID = mock.Mock(
+        return_value=(hotlists_by_id, []))
+
+    # User 333 already has a hotlist named 'name'.
+    def side_effect(_cnxn, hotlist_names, owner_ids):
+      if 333 in owner_ids and 'name' in hotlist_names:
+        return {('name', 333): 567}
+      return {}
+    self.features_service.LookupHotlistIDs = mock.Mock(
+        side_effect=side_effect)
+    # Called to transfer hotlist ownership
+    self.features_service.UpdateHotlistRoles = mock.Mock()
+
+    # Called to expunge users and hotlists
+    self.features_service.hotlist2user_tbl.Delete = mock.Mock()
+    self.features_service.hotlist2issue_tbl.Update = mock.Mock()
+    user_service.hotlistvisithistory_tbl.Delete = mock.Mock()
+
+    # Called to expunge hotlists
+    hotlists_by_id = {hotlist1.hotlist_id: hotlist1,
+                      hotlist2.hotlist_id: hotlist2}
+    self.features_service.GetHotlists = mock.Mock(
+        return_value=hotlists_by_id)
+    self.features_service.hotlist2issue_tbl.Delete = mock.Mock()
+    self.features_service.hotlist_tbl.Delete = mock.Mock()
+    hotliststar_tbl.Delete = mock.Mock()
+
+    self.features_service.ExpungeUsersInHotlists(
+        self.cnxn, user_ids, star_service, user_service, chart_service)
+
+    self.features_service.UpdateHotlistRoles.assert_called_once_with(
+        self.cnxn, hotlist1.hotlist_id, [333], [222], [], commit=False)
+
+    self.features_service.hotlist2user_tbl.Delete.assert_has_calls(
+        [mock.call(self.cnxn, user_id=user_ids, commit=False),
+         mock.call(self.cnxn, hotlist_id=delete_hotlists, commit=False)])
+    self.features_service.hotlist2issue_tbl.Update.assert_called_once_with(
+        self.cnxn, {'adder_id': framework_constants.DELETED_USER_ID},
+        adder_id=user_ids, commit=False)
+    user_service.hotlistvisithistory_tbl.Delete.assert_has_calls(
+        [mock.call(self.cnxn, user_id=user_ids, commit=False),
+         mock.call(self.cnxn, hotlist_id=delete_hotlists, commit=False)])
+
+    self.features_service.hotlist2issue_tbl.Delete.assert_called_once_with(
+        self.cnxn, hotlist_id=delete_hotlists, commit=False)
+    hotliststar_tbl.Delete.assert_called_once_with(
+        self.cnxn, commit=False, limit=None, hotlist_id=delete_hotlists[0])
+    self.features_service.hotlist_tbl.Delete.assert_called_once_with(
+        self.cnxn, id=delete_hotlists, commit=False)
+
+
+  def testGetProjectIDsFromHotlist(self):
+    self.features_service.hotlist2issue_tbl.Select(self.cnxn,
+        cols=['Issue.project_id'], hotlist_id=678, distinct=True,
+        left_joins=[('Issue ON issue_id = id', [])]).AndReturn(
+            [(789,), (787,), (788,)])
+
+    self.mox.ReplayAll()
+    project_ids = self.features_service.GetProjectIDsFromHotlist(self.cnxn, 678)
+    self.mox.VerifyAll()
+    self.assertEqual([789, 787, 788], project_ids)
diff --git a/services/test/fulltext_helpers_test.py b/services/test/fulltext_helpers_test.py
new file mode 100644
index 0000000..1e4f0c9
--- /dev/null
+++ b/services/test/fulltext_helpers_test.py
@@ -0,0 +1,247 @@
+# 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
+
+"""Tests for the fulltext_helpers module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mox
+
+from google.appengine.api import search
+
+from proto import ast_pb2
+from proto import tracker_pb2
+from search import query2ast
+from services import fulltext_helpers
+
+
+TEXT_HAS = ast_pb2.QueryOp.TEXT_HAS
+NOT_TEXT_HAS = ast_pb2.QueryOp.NOT_TEXT_HAS
+GE = ast_pb2.QueryOp.GE
+
+
+class MockResult(object):
+
+  def __init__(self, doc_id):
+    self.doc_id = doc_id
+
+
+class MockSearchResponse(object):
+  """Mock object that can be iterated over in batches."""
+
+  def __init__(self, results, cursor):
+    """Constructor.
+
+    Args:
+      results: list of strings for document IDs.
+      cursor: search.Cursor object, if there are more results to
+          retrieve in another round-trip. Or, None if there are not.
+    """
+    self.results = [MockResult(r) for r in results]
+    self.cursor = cursor
+
+  def __iter__(self):
+    """The response itself is an iterator over the results."""
+    return self.results.__iter__()
+
+
+class FulltextHelpersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.any_field_fd = tracker_pb2.FieldDef(
+        field_name='any_field', field_type=tracker_pb2.FieldTypes.STR_TYPE)
+    self.summary_fd = tracker_pb2.FieldDef(
+        field_name='summary', field_type=tracker_pb2.FieldTypes.STR_TYPE)
+    self.milestone_fd = tracker_pb2.FieldDef(
+        field_name='milestone', field_type=tracker_pb2.FieldTypes.STR_TYPE,
+        field_id=123)
+    self.fulltext_fields = ['summary']
+
+    self.mock_index = self.mox.CreateMockAnything()
+    self.mox.StubOutWithMock(search, 'Index')
+    self.query = None
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def RecordQuery(self, query):
+    self.query = query
+
+  def testBuildFTSQuery_EmptyQueryConjunction(self):
+    query_ast_conj = ast_pb2.Conjunction()
+    fulltext_query = fulltext_helpers.BuildFTSQuery(
+        query_ast_conj, self.fulltext_fields)
+    self.assertEqual(None, fulltext_query)
+
+  def testBuildFTSQuery_NoFullTextConditions(self):
+    estimated_hours_fd = tracker_pb2.FieldDef(
+        field_name='estimate', field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        field_id=124)
+    query_ast_conj = ast_pb2.Conjunction(conds=[
+        ast_pb2.MakeCond(TEXT_HAS, [estimated_hours_fd], [], [40])])
+    fulltext_query = fulltext_helpers.BuildFTSQuery(
+        query_ast_conj, self.fulltext_fields)
+    self.assertEqual(None, fulltext_query)
+
+  def testBuildFTSQuery_Normal(self):
+    query_ast_conj = ast_pb2.Conjunction(conds=[
+        ast_pb2.MakeCond(TEXT_HAS, [self.summary_fd], ['needle'], []),
+        ast_pb2.MakeCond(TEXT_HAS, [self.milestone_fd], ['Q3', 'Q4'], [])])
+    fulltext_query = fulltext_helpers.BuildFTSQuery(
+        query_ast_conj, self.fulltext_fields)
+    self.assertEqual(
+        '(summary:"needle") (custom_123:"Q3" OR custom_123:"Q4")',
+        fulltext_query)
+
+  def testBuildFTSQuery_WithQuotes(self):
+    query_ast_conj = ast_pb2.Conjunction(conds=[
+        ast_pb2.MakeCond(TEXT_HAS, [self.summary_fd], ['"needle haystack"'],
+                         [])])
+    fulltext_query = fulltext_helpers.BuildFTSQuery(
+        query_ast_conj, self.fulltext_fields)
+    self.assertEqual('(summary:"needle haystack")', fulltext_query)
+
+  def testBuildFTSQuery_IngoreColonInText(self):
+    query_ast_conj = ast_pb2.Conjunction(conds=[
+        ast_pb2.MakeCond(TEXT_HAS, [self.summary_fd], ['"needle:haystack"'],
+                         [])])
+    fulltext_query = fulltext_helpers.BuildFTSQuery(
+        query_ast_conj, self.fulltext_fields)
+    self.assertEqual('(summary:"needle haystack")', fulltext_query)
+
+  def testBuildFTSQuery_InvalidQuery(self):
+    query_ast_conj = ast_pb2.Conjunction(conds=[
+        ast_pb2.MakeCond(TEXT_HAS, [self.summary_fd], ['haystack"needle'], []),
+        ast_pb2.MakeCond(TEXT_HAS, [self.milestone_fd], ['Q3', 'Q4'], [])])
+    with self.assertRaises(AssertionError):
+      fulltext_helpers.BuildFTSQuery(
+          query_ast_conj, self.fulltext_fields)
+
+  def testBuildFTSQuery_SpecialPrefixQuery(self):
+    special_prefix = query2ast.NON_OP_PREFIXES[0]
+
+    # Test with summary field.
+    query_ast_conj = ast_pb2.Conjunction(conds=[
+        ast_pb2.MakeCond(TEXT_HAS, [self.summary_fd],
+                         ['%s//google.com' % special_prefix], []),
+        ast_pb2.MakeCond(TEXT_HAS, [self.milestone_fd], ['Q3', 'Q4'], [])])
+    fulltext_query = fulltext_helpers.BuildFTSQuery(
+        query_ast_conj, self.fulltext_fields)
+    self.assertEqual(
+        '(summary:"%s//google.com") (custom_123:"Q3" OR custom_123:"Q4")' % (
+            special_prefix),
+        fulltext_query)
+
+    # Test with any field.
+    any_fd = tracker_pb2.FieldDef(
+        field_name=ast_pb2.ANY_FIELD,
+        field_type=tracker_pb2.FieldTypes.STR_TYPE)
+    query_ast_conj = ast_pb2.Conjunction(conds=[
+        ast_pb2.MakeCond(
+            TEXT_HAS, [any_fd], ['%s//google.com' % special_prefix], []),
+        ast_pb2.MakeCond(TEXT_HAS, [self.milestone_fd], ['Q3', 'Q4'], [])])
+    fulltext_query = fulltext_helpers.BuildFTSQuery(
+        query_ast_conj, self.fulltext_fields)
+    self.assertEqual(
+        '("%s//google.com") (custom_123:"Q3" OR custom_123:"Q4")' % (
+            special_prefix),
+        fulltext_query)
+
+  def testBuildFTSCondition_IgnoredOperator(self):
+    query_cond = ast_pb2.MakeCond(
+        GE, [self.summary_fd], ['needle'], [])
+    fulltext_query_clause = fulltext_helpers._BuildFTSCondition(
+        query_cond, self.fulltext_fields)
+    self.assertEqual('', fulltext_query_clause)
+
+  def testBuildFTSCondition_BuiltinField(self):
+    query_cond = ast_pb2.MakeCond(
+        TEXT_HAS, [self.summary_fd], ['needle'], [])
+    fulltext_query_clause = fulltext_helpers._BuildFTSCondition(
+        query_cond, self.fulltext_fields)
+    self.assertEqual('(summary:"needle")', fulltext_query_clause)
+
+  def testBuildFTSCondition_NonStringField(self):
+    est_days_fd = tracker_pb2.FieldDef(
+      field_name='EstDays', field_id=123,
+      field_type=tracker_pb2.FieldTypes.INT_TYPE)
+    query_cond = ast_pb2.MakeCond(
+        TEXT_HAS, [est_days_fd], ['needle'], [])
+    fulltext_query_clause = fulltext_helpers._BuildFTSCondition(
+        query_cond, self.fulltext_fields)
+    # Ignore in FTS, this search condition is done in SQL.
+    self.assertEqual('', fulltext_query_clause)
+
+  def testBuildFTSCondition_Negatation(self):
+    query_cond = ast_pb2.MakeCond(
+        NOT_TEXT_HAS, [self.summary_fd], ['needle'], [])
+    fulltext_query_clause = fulltext_helpers._BuildFTSCondition(
+        query_cond, self.fulltext_fields)
+    self.assertEqual('NOT (summary:"needle")', fulltext_query_clause)
+
+  def testBuildFTSCondition_QuickOR(self):
+    query_cond = ast_pb2.MakeCond(
+        TEXT_HAS, [self.summary_fd], ['needle', 'pin'], [])
+    fulltext_query_clause = fulltext_helpers._BuildFTSCondition(
+        query_cond, self.fulltext_fields)
+    self.assertEqual(
+        '(summary:"needle" OR summary:"pin")',
+        fulltext_query_clause)
+
+  def testBuildFTSCondition_NegatedQuickOR(self):
+    query_cond = ast_pb2.MakeCond(
+        NOT_TEXT_HAS, [self.summary_fd], ['needle', 'pin'], [])
+    fulltext_query_clause = fulltext_helpers._BuildFTSCondition(
+        query_cond, self.fulltext_fields)
+    self.assertEqual(
+        'NOT (summary:"needle" OR summary:"pin")',
+        fulltext_query_clause)
+
+  def testBuildFTSCondition_AnyField(self):
+    query_cond = ast_pb2.MakeCond(
+        TEXT_HAS, [self.any_field_fd], ['needle'], [])
+    fulltext_query_clause = fulltext_helpers._BuildFTSCondition(
+        query_cond, self.fulltext_fields)
+    self.assertEqual('("needle")', fulltext_query_clause)
+
+  def testBuildFTSCondition_NegatedAnyField(self):
+    query_cond = ast_pb2.MakeCond(
+        NOT_TEXT_HAS, [self.any_field_fd], ['needle'], [])
+    fulltext_query_clause = fulltext_helpers._BuildFTSCondition(
+        query_cond, self.fulltext_fields)
+    self.assertEqual('NOT ("needle")', fulltext_query_clause)
+
+  def testBuildFTSCondition_CrossProjectWithMultipleFieldDescriptors(self):
+    other_milestone_fd = tracker_pb2.FieldDef(
+        field_name='milestone', field_type=tracker_pb2.FieldTypes.STR_TYPE,
+        field_id=456)
+    query_cond = ast_pb2.MakeCond(
+        TEXT_HAS, [self.milestone_fd, other_milestone_fd], ['needle'], [])
+    fulltext_query_clause = fulltext_helpers._BuildFTSCondition(
+        query_cond, self.fulltext_fields)
+    self.assertEqual(
+        '(custom_123:"needle" OR custom_456:"needle")', fulltext_query_clause)
+
+  def SetUpComprehensiveSearch(self):
+    search.Index(name='search index name').AndReturn(
+        self.mock_index)
+    self.mock_index.search(mox.IgnoreArg()).WithSideEffects(
+        self.RecordQuery).AndReturn(
+            MockSearchResponse(['123', '234'], search.Cursor()))
+    self.mock_index.search(mox.IgnoreArg()).WithSideEffects(
+        self.RecordQuery).AndReturn(MockSearchResponse(['345'], None))
+
+  def testComprehensiveSearch(self):
+    self.SetUpComprehensiveSearch()
+    self.mox.ReplayAll()
+    project_ids = fulltext_helpers.ComprehensiveSearch(
+        'browser', 'search index name')
+    self.mox.VerifyAll()
+    self.assertItemsEqual([123, 234, 345], project_ids)
diff --git a/services/test/issue_svc_test.py b/services/test/issue_svc_test.py
new file mode 100644
index 0000000..b6fe682
--- /dev/null
+++ b/services/test/issue_svc_test.py
@@ -0,0 +1,2754 @@
+# -*- coding: utf-8 -*-
+# 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
+
+"""Unit tests for issue_svc module."""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import logging
+import time
+import unittest
+from mock import patch, Mock, ANY
+
+import mox
+
+from google.appengine.api import search
+from google.appengine.ext import testbed
+
+import settings
+from framework import exceptions
+from framework import framework_constants
+from framework import sql
+from proto import tracker_pb2
+from services import caches
+from services import chart_svc
+from services import issue_svc
+from services import service_manager
+from services import spam_svc
+from services import tracker_fulltext
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+
+
+class MockIndex(object):
+
+  def delete(self, string_list):
+    pass
+
+
+def MakeIssueService(project_service, config_service, cache_manager,
+    chart_service, my_mox):
+  issue_service = issue_svc.IssueService(
+      project_service, config_service, cache_manager, chart_service)
+  for table_var in [
+      'issue_tbl', 'issuesummary_tbl', 'issue2label_tbl',
+      'issue2component_tbl', 'issue2cc_tbl', 'issue2notify_tbl',
+      'issue2fieldvalue_tbl', 'issuerelation_tbl', 'danglingrelation_tbl',
+      'issueformerlocations_tbl', 'comment_tbl', 'commentcontent_tbl',
+      'issueupdate_tbl', 'attachment_tbl', 'reindexqueue_tbl',
+      'localidcounter_tbl', 'issuephasedef_tbl', 'issue2approvalvalue_tbl',
+      'issueapproval2approver_tbl', 'issueapproval2comment_tbl',
+      'commentimporter_tbl']:
+    setattr(issue_service, table_var, my_mox.CreateMock(sql.SQLTableManager))
+
+  return issue_service
+
+
+class TestableIssueTwoLevelCache(issue_svc.IssueTwoLevelCache):
+
+  def __init__(self, issue_list):
+    cache_manager = fake.CacheManager()
+    super(TestableIssueTwoLevelCache, self).__init__(
+        cache_manager, None, None, None)
+    self.cache = caches.RamCache(cache_manager, 'issue')
+    self.memcache_prefix = 'issue:'
+    self.pb_class = tracker_pb2.Issue
+
+    self.issue_dict = {
+      issue.issue_id: issue
+      for issue in issue_list}
+
+  def FetchItems(self, cnxn, issue_ids, shard_id=None):
+    return {
+      issue_id: self.issue_dict[issue_id]
+      for issue_id in issue_ids
+      if issue_id in self.issue_dict}
+
+
+class IssueIDTwoLevelCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.cnxn = 'fake connection'
+    self.project_service = fake.ProjectService()
+    self.config_service = fake.ConfigService()
+    self.cache_manager = fake.CacheManager()
+    self.chart_service = chart_svc.ChartService(self.config_service)
+    self.issue_service = MakeIssueService(
+        self.project_service, self.config_service, self.cache_manager,
+        self.chart_service, self.mox)
+    self.issue_id_2lc = self.issue_service.issue_id_2lc
+    self.spam_service = fake.SpamService()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testDeserializeIssueIDs_Empty(self):
+    issue_id_dict = self.issue_id_2lc._DeserializeIssueIDs([])
+    self.assertEqual({}, issue_id_dict)
+
+  def testDeserializeIssueIDs_Normal(self):
+    rows = [(789, 1, 78901), (789, 2, 78902), (789, 3, 78903)]
+    issue_id_dict = self.issue_id_2lc._DeserializeIssueIDs(rows)
+    expected = {
+        (789, 1): 78901,
+        (789, 2): 78902,
+        (789, 3): 78903,
+        }
+    self.assertEqual(expected, issue_id_dict)
+
+  def SetUpFetchItems(self):
+    where = [
+        ('(Issue.project_id = %s AND Issue.local_id IN (%s,%s,%s))',
+         [789, 1, 2, 3])]
+    rows = [(789, 1, 78901), (789, 2, 78902), (789, 3, 78903)]
+    self.issue_service.issue_tbl.Select(
+        self.cnxn, cols=['project_id', 'local_id', 'id'],
+        where=where, or_where_conds=True).AndReturn(rows)
+
+  def testFetchItems(self):
+    project_local_ids_list = [(789, 1), (789, 2), (789, 3)]
+    issue_ids = [78901, 78902, 78903]
+    self.SetUpFetchItems()
+    self.mox.ReplayAll()
+    issue_dict = self.issue_id_2lc.FetchItems(
+        self.cnxn, project_local_ids_list)
+    self.mox.VerifyAll()
+    self.assertItemsEqual(project_local_ids_list, list(issue_dict.keys()))
+    self.assertItemsEqual(issue_ids, list(issue_dict.values()))
+
+  def testKeyToStr(self):
+    self.assertEqual('789,1', self.issue_id_2lc._KeyToStr((789, 1)))
+
+  def testStrToKey(self):
+    self.assertEqual((789, 1), self.issue_id_2lc._StrToKey('789,1'))
+
+
+class IssueTwoLevelCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.cnxn = 'fake connection'
+    self.project_service = fake.ProjectService()
+    self.config_service = fake.ConfigService()
+    self.cache_manager = fake.CacheManager()
+    self.chart_service = chart_svc.ChartService(self.config_service)
+    self.issue_service = MakeIssueService(
+        self.project_service, self.config_service, self.cache_manager,
+        self.chart_service, self.mox)
+    self.issue_2lc = self.issue_service.issue_2lc
+
+    now = int(time.time())
+    self.project_service.TestAddProject('proj', project_id=789)
+    self.issue_rows = [
+        (78901, 789, 1, 1, 111, 222,
+         now, now, now, now, now, now,
+         0, 0, 0, 1, 0, False)]
+    self.summary_rows = [(78901, 'sum')]
+    self.label_rows = [(78901, 1, 0)]
+    self.component_rows = []
+    self.cc_rows = [(78901, 333, 0)]
+    self.notify_rows = []
+    self.fieldvalue_rows = []
+    self.blocked_on_rows = (
+        (78901, 78902, 'blockedon', 20), (78903, 78901, 'blockedon', 10))
+    self.blocking_rows = ()
+    self.merged_rows = ()
+    self.relation_rows = (
+        self.blocked_on_rows + self.blocking_rows + self.merged_rows)
+    self.dangling_relation_rows = [
+        (78901, 'codesite', 5001, None, 'blocking'),
+        (78901, 'codesite', 5002, None, 'blockedon'),
+        (78901, None, None, 'b/1234567', 'blockedon')]
+    self.phase_rows = [(1, 'Canary', 1), (2, 'Stable', 11)]
+    self.approvalvalue_rows = [(22, 78901, 2, 'not_set', None, None),
+                               (21, 78901, 1, 'needs_review', None, None),
+                               (23, 78901, 1, 'not_set', None, None)]
+    self.av_approver_rows = [
+        (21, 111, 78901), (21, 222, 78901), (21, 333, 78901)]
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testUnpackApprovalValue(self):
+    row = next(
+        row for row in self.approvalvalue_rows if row[3] == 'needs_review')
+    av, issue_id = self.issue_2lc._UnpackApprovalValue(row)
+    self.assertEqual(av.status, tracker_pb2.ApprovalStatus.NEEDS_REVIEW)
+    self.assertIsNone(av.setter_id)
+    self.assertIsNone(av.set_on)
+    self.assertEqual(issue_id, 78901)
+    self.assertEqual(av.phase_id, 1)
+
+  def testUnpackApprovalValue_MissingStatus(self):
+    av, _issue_id = self.issue_2lc._UnpackApprovalValue(
+        (21, 78901, 1, '', None, None))
+    self.assertEqual(av.status, tracker_pb2.ApprovalStatus.NOT_SET)
+
+  def testUnpackPhase(self):
+    phase = self.issue_2lc._UnpackPhase(
+        self.phase_rows[0])
+    self.assertEqual(phase.name, 'Canary')
+    self.assertEqual(phase.phase_id, 1)
+    self.assertEqual(phase.rank, 1)
+
+  def testDeserializeIssues_Empty(self):
+    issue_dict = self.issue_2lc._DeserializeIssues(
+        self.cnxn, [], [], [], [], [], [], [], [], [], [], [], [])
+    self.assertEqual({}, issue_dict)
+
+  def testDeserializeIssues_Normal(self):
+    issue_dict = self.issue_2lc._DeserializeIssues(
+        self.cnxn, self.issue_rows, self.summary_rows, self.label_rows,
+        self.component_rows, self.cc_rows, self.notify_rows,
+        self.fieldvalue_rows, self.relation_rows, self.dangling_relation_rows,
+        self.phase_rows, self.approvalvalue_rows, self.av_approver_rows)
+    self.assertItemsEqual([78901], list(issue_dict.keys()))
+    issue = issue_dict[78901]
+    self.assertEqual(len(issue.phases), 2)
+    self.assertIsNotNone(tracker_bizobj.FindPhaseByID(1, issue.phases))
+    av_21 = tracker_bizobj.FindApprovalValueByID(
+        21, issue.approval_values)
+    self.assertEqual(av_21.phase_id, 1)
+    self.assertItemsEqual(av_21.approver_ids, [111, 222, 333])
+    self.assertIsNotNone(tracker_bizobj.FindPhaseByID(2, issue.phases))
+    self.assertEqual(issue.phases,
+                     [tracker_pb2.Phase(rank=1, phase_id=1, name='Canary'),
+                      tracker_pb2.Phase(rank=11, phase_id=2, name='Stable')])
+    av_22 = tracker_bizobj.FindApprovalValueByID(
+        22, issue.approval_values)
+    self.assertEqual(av_22.phase_id, 2)
+    self.assertEqual([
+        tracker_pb2.DanglingIssueRef(
+          project=row[1],
+          issue_id=row[2],
+          ext_issue_identifier=row[3])
+          for row in self.dangling_relation_rows
+          if row[4] == 'blockedon'
+        ], issue.dangling_blocked_on_refs)
+    self.assertEqual([
+        tracker_pb2.DanglingIssueRef(
+          project=row[1],
+          issue_id=row[2],
+          ext_issue_identifier=row[3])
+          for row in self.dangling_relation_rows
+          if row[4] == 'blocking'
+        ], issue.dangling_blocking_refs)
+
+  def testDeserializeIssues_UnexpectedLabel(self):
+    unexpected_label_rows = [
+      (78901, 999, 0)
+      ]
+    self.assertRaises(
+      AssertionError,
+      self.issue_2lc._DeserializeIssues,
+      self.cnxn, self.issue_rows, self.summary_rows, unexpected_label_rows,
+      self.component_rows, self.cc_rows, self.notify_rows,
+      self.fieldvalue_rows, self.relation_rows, self.dangling_relation_rows,
+      self.phase_rows, self.approvalvalue_rows, self.av_approver_rows)
+
+  def testDeserializeIssues_UnexpectedIssueRelation(self):
+    unexpected_relation_rows = [
+      (78990, 78999, 'blockedon', None)
+      ]
+    self.assertRaises(
+      AssertionError,
+      self.issue_2lc._DeserializeIssues,
+      self.cnxn, self.issue_rows, self.summary_rows, self.label_rows,
+      self.component_rows, self.cc_rows, self.notify_rows,
+      self.fieldvalue_rows, unexpected_relation_rows,
+      self.dangling_relation_rows, self.phase_rows, self.approvalvalue_rows,
+      self.av_approver_rows)
+
+  def testDeserializeIssues_ExternalMergedInto(self):
+    """_DeserializeIssues handles external mergedinto refs correctly."""
+    dangling_relation_rows = self.dangling_relation_rows + [
+        (78901, None, None, 'b/1234567', 'mergedinto')]
+    issue_dict = self.issue_2lc._DeserializeIssues(
+        self.cnxn, self.issue_rows, self.summary_rows, self.label_rows,
+        self.component_rows, self.cc_rows, self.notify_rows,
+        self.fieldvalue_rows, self.relation_rows, dangling_relation_rows,
+        self.phase_rows, self.approvalvalue_rows, self.av_approver_rows)
+    self.assertEqual('b/1234567', issue_dict[78901].merged_into_external)
+
+  def SetUpFetchItems(self, issue_ids, has_approvalvalues=True):
+    shard_id = None
+    self.issue_service.issue_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUE_COLS, id=issue_ids,
+        shard_id=shard_id).AndReturn(self.issue_rows)
+    self.issue_service.issuesummary_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUESUMMARY_COLS, shard_id=shard_id,
+        issue_id=issue_ids).AndReturn(self.summary_rows)
+    self.issue_service.issue2label_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUE2LABEL_COLS, shard_id=shard_id,
+        issue_id=issue_ids).AndReturn(self.label_rows)
+    self.issue_service.issue2component_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUE2COMPONENT_COLS, shard_id=shard_id,
+        issue_id=issue_ids).AndReturn(self.component_rows)
+    self.issue_service.issue2cc_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUE2CC_COLS, shard_id=shard_id,
+        issue_id=issue_ids).AndReturn(self.cc_rows)
+    self.issue_service.issue2notify_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUE2NOTIFY_COLS, shard_id=shard_id,
+        issue_id=issue_ids).AndReturn(self.notify_rows)
+    self.issue_service.issue2fieldvalue_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUE2FIELDVALUE_COLS, shard_id=shard_id,
+        issue_id=issue_ids).AndReturn(self.fieldvalue_rows)
+    if has_approvalvalues:
+      self.issue_service.issuephasedef_tbl.Select(
+          self.cnxn, cols=issue_svc.ISSUEPHASEDEF_COLS,
+          id=[1, 2]).AndReturn(self.phase_rows)
+      self.issue_service.issue2approvalvalue_tbl.Select(
+          self.cnxn,
+          cols=issue_svc.ISSUE2APPROVALVALUE_COLS,
+          issue_id=issue_ids).AndReturn(self.approvalvalue_rows)
+    else:
+      self.issue_service.issue2approvalvalue_tbl.Select(
+          self.cnxn,
+          cols=issue_svc.ISSUE2APPROVALVALUE_COLS,
+          issue_id=issue_ids).AndReturn([])
+    self.issue_service.issueapproval2approver_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUEAPPROVAL2APPROVER_COLS,
+        issue_id=issue_ids).AndReturn(self.av_approver_rows)
+    self.issue_service.issuerelation_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUERELATION_COLS,
+        issue_id=issue_ids, kind='blockedon',
+        order_by=[('issue_id', []), ('rank DESC', []),
+                  ('dst_issue_id', [])]).AndReturn(self.blocked_on_rows)
+    self.issue_service.issuerelation_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUERELATION_COLS,
+        dst_issue_id=issue_ids, kind='blockedon',
+        order_by=[('issue_id', []), ('dst_issue_id', [])]
+        ).AndReturn(self.blocking_rows)
+    self.issue_service.issuerelation_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUERELATION_COLS,
+        where=[('(issue_id IN (%s) OR dst_issue_id IN (%s))',
+                issue_ids + issue_ids),
+                ('kind != %s', ['blockedon'])]).AndReturn(self.merged_rows)
+    self.issue_service.danglingrelation_tbl.Select(
+        self.cnxn, cols=issue_svc.DANGLINGRELATION_COLS,  # Note: no shard
+        issue_id=issue_ids).AndReturn(self.dangling_relation_rows)
+
+  def testFetchItems(self):
+    issue_ids = [78901]
+    self.SetUpFetchItems(issue_ids)
+    self.mox.ReplayAll()
+    issue_dict = self.issue_2lc.FetchItems(self.cnxn, issue_ids)
+    self.mox.VerifyAll()
+    self.assertItemsEqual(issue_ids, list(issue_dict.keys()))
+    self.assertEqual(2, len(issue_dict[78901].phases))
+
+  def testFetchItemsNoApprovalValues(self):
+    issue_ids = [78901]
+    self.SetUpFetchItems(issue_ids, False)
+    self.mox.ReplayAll()
+    issue_dict = self.issue_2lc.FetchItems(self.cnxn, issue_ids)
+    self.mox.VerifyAll()
+    self.assertItemsEqual(issue_ids, list(issue_dict.keys()))
+    self.assertEqual([], issue_dict[78901].phases)
+
+
+class IssueServiceTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.mox = mox.Mox()
+    self.cnxn = self.mox.CreateMock(sql.MonorailConnection)
+    self.services = service_manager.Services()
+    self.services.user = fake.UserService()
+    self.reporter = self.services.user.TestAddUser('reporter@example.com', 111)
+    self.services.usergroup = fake.UserGroupService()
+    self.services.project = fake.ProjectService()
+    self.project = self.services.project.TestAddProject('proj', project_id=789)
+    self.services.config = fake.ConfigService()
+    self.services.features = fake.FeaturesService()
+    self.cache_manager = fake.CacheManager()
+    self.services.chart = chart_svc.ChartService(self.services.config)
+    self.services.issue = MakeIssueService(
+        self.services.project, self.services.config, self.cache_manager,
+        self.services.chart, self.mox)
+    self.services.spam = self.mox.CreateMock(spam_svc.SpamService)
+    self.now = int(time.time())
+    self.patcher = patch('services.tracker_fulltext.IndexIssues')
+    self.patcher.start()
+    self.mox.StubOutWithMock(self.services.chart, 'StoreIssueSnapshots')
+
+  def classifierResult(self, score, failed_open=False):
+    return {'confidence_is_spam': score,
+            'failed_open': failed_open}
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+    self.patcher.stop()
+
+  ### Issue ID lookups
+
+  def testLookupIssueIDsFollowMoves(self):
+    moved_issue_id = 78901
+    moved_pair = (789, 1)
+    missing_pair = (1, 1)
+    cached_issue_id = 78902
+    cached_pair = (789, 2)
+    uncached_issue_id = 78903
+    uncached_pair = (789, 3)
+    uncached_issue_id_2 = 78904
+    uncached_pair_2 = (789, 4)
+    self.services.issue.issue_id_2lc.CacheItem(cached_pair, cached_issue_id)
+
+    # Simulate rows returned in reverse order (to verify the method still
+    # returns them in the specified order).
+    uncached_rows = [
+        (uncached_pair_2[0], uncached_pair_2[1], uncached_issue_id_2),
+        (uncached_pair[0], uncached_pair[1], uncached_issue_id)
+    ]
+    self.services.issue.issue_tbl.Select(
+        self.cnxn,
+        cols=['project_id', 'local_id', 'id'],
+        or_where_conds=True,
+        where=mox.IgnoreArg()).AndReturn(uncached_rows)
+    # Moved issue is found.
+    self.services.issue.issueformerlocations_tbl.SelectValue(
+        self.cnxn,
+        'issue_id',
+        default=0,
+        project_id=moved_pair[0],
+        local_id=moved_pair[1]).AndReturn(moved_issue_id)
+
+    self.mox.ReplayAll()
+    found_ids, misses = self.services.issue.LookupIssueIDsFollowMoves(
+        self.cnxn,
+        [moved_pair, missing_pair, cached_pair, uncached_pair, uncached_pair_2])
+    self.mox.VerifyAll()
+
+    expected_found_ids = [
+        moved_issue_id, cached_issue_id, uncached_issue_id, uncached_issue_id_2
+    ]
+    self.assertListEqual(expected_found_ids, found_ids)
+    self.assertListEqual([missing_pair], misses)
+
+  def testLookupIssueIDs_Hit(self):
+    self.services.issue.issue_id_2lc.CacheItem((789, 1), 78901)
+    self.services.issue.issue_id_2lc.CacheItem((789, 2), 78902)
+    actual, _misses = self.services.issue.LookupIssueIDs(
+        self.cnxn, [(789, 1), (789, 2)])
+    self.assertEqual([78901, 78902], actual)
+
+  def testLookupIssueID(self):
+    self.services.issue.issue_id_2lc.CacheItem((789, 1), 78901)
+    actual = self.services.issue.LookupIssueID(self.cnxn, 789, 1)
+    self.assertEqual(78901, actual)
+
+  def testResolveIssueRefs(self):
+    self.services.issue.issue_id_2lc.CacheItem((789, 1), 78901)
+    self.services.issue.issue_id_2lc.CacheItem((789, 2), 78902)
+    prefetched_projects = {'proj': fake.Project('proj', project_id=789)}
+    refs = [('proj', 1), (None, 2)]
+    actual, misses = self.services.issue.ResolveIssueRefs(
+        self.cnxn, prefetched_projects, 'proj', refs)
+    self.assertEqual(misses, [])
+    self.assertEqual([78901, 78902], actual)
+
+  def testLookupIssueRefs_Empty(self):
+    actual = self.services.issue.LookupIssueRefs(self.cnxn, [])
+    self.assertEqual({}, actual)
+
+  def testLookupIssueRefs_Normal(self):
+    issue_1 = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901, project_name='proj')
+    self.services.issue.issue_2lc.CacheItem(78901, issue_1)
+    actual = self.services.issue.LookupIssueRefs(self.cnxn, [78901])
+    self.assertEqual(
+        {78901: ('proj', 1)},
+        actual)
+
+  ### Issue objects
+
+  def CheckCreateIssue(self, is_project_member):
+    settings.classifier_spam_thresh = 0.9
+    av_23 = tracker_pb2.ApprovalValue(
+        approval_id=23, phase_id=1, approver_ids=[111, 222],
+        status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW)
+    av_24 = tracker_pb2.ApprovalValue(
+        approval_id=24, phase_id=1, approver_ids=[111])
+    approval_values = [av_23, av_24]
+    av_rows = [(23, 78901, 1, 'needs_review', None, None),
+               (24, 78901, 1, 'not_set', None, None)]
+    approver_rows = [(23, 111, 78901), (23, 222, 78901), (24, 111, 78901)]
+    ad_23 = tracker_pb2.ApprovalDef(
+        approval_id=23, approver_ids=[111], survey='Question?')
+    ad_24 = tracker_pb2.ApprovalDef(
+        approval_id=24, approver_ids=[111], survey='Question?')
+    config = self.services.config.GetProjectConfig(
+        self.cnxn, 789)
+    config.approval_defs.extend([ad_23, ad_24])
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    self.SetUpAllocateNextLocalID(789, None, None)
+    self.SetUpInsertIssue(av_rows=av_rows, approver_rows=approver_rows)
+    self.SetUpInsertComment(7890101, is_description=True)
+    self.SetUpInsertComment(7890101, is_description=True, approval_id=23,
+        content='<b>Question?</b>')
+    self.SetUpInsertComment(7890101, is_description=True, approval_id=24,
+        content='<b>Question?</b>')
+    self.services.spam.ClassifyIssue(mox.IgnoreArg(),
+        mox.IgnoreArg(), self.reporter, is_project_member).AndReturn(
+        self.classifierResult(0.0))
+    self.services.spam.RecordClassifierIssueVerdict(self.cnxn,
+       mox.IsA(tracker_pb2.Issue), False, 1.0, False)
+    self.SetUpEnqueueIssuesForIndexing([78901])
+
+    self.mox.ReplayAll()
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'sum',
+        'New',
+        111,
+        reporter_id=111,
+        labels=['Type-Defect'],
+        opened_timestamp=self.now,
+        modified_timestamp=self.now,
+        approval_values=approval_values)
+    created_issue, _ = self.services.issue.CreateIssue(
+        self.cnxn, self.services, issue, 'content')
+    self.mox.VerifyAll()
+    self.assertEqual(1, created_issue.local_id)
+
+  def testCreateIssue_NonmemberSpamCheck(self):
+    """A non-member must pass a non-member spam check."""
+    self.CheckCreateIssue(False)
+
+  def testCreateIssue_DirectMemberSpamCheck(self):
+    """A direct member of a project gets a member spam check."""
+    self.project.committer_ids.append(self.reporter.user_id)
+    self.CheckCreateIssue(True)
+
+  def testCreateIssue_ComputedUsergroupSpamCheck(self):
+    """A member of a computed group in project gets a member spam check."""
+    group_id = self.services.usergroup.CreateGroup(
+        self.cnxn, self.services, 'everyone@example.com', 'ANYONE',
+        ext_group_type='COMPUTED')
+    self.project.committer_ids.append(group_id)
+    self.CheckCreateIssue(True)
+
+  def testCreateIssue_EmptyStringLabels(self):
+    settings.classifier_spam_thresh = 0.9
+    self.SetUpAllocateNextLocalID(789, None, None)
+    self.SetUpInsertIssue(label_rows=[])
+    self.SetUpInsertComment(7890101, is_description=True)
+    self.services.spam.ClassifyIssue(mox.IgnoreArg(),
+        mox.IgnoreArg(), self.reporter, False).AndReturn(
+        self.classifierResult(0.0))
+    self.services.spam.RecordClassifierIssueVerdict(self.cnxn,
+       mox.IsA(tracker_pb2.Issue), False, 1.0, False)
+    self.SetUpEnqueueIssuesForIndexing([78901])
+
+    self.mox.ReplayAll()
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'sum',
+        'New',
+        111,
+        reporter_id=111,
+        opened_timestamp=self.now,
+        modified_timestamp=self.now)
+    created_issue, _ = self.services.issue.CreateIssue(
+        self.cnxn, self.services, issue, 'content')
+    self.mox.VerifyAll()
+    self.assertEqual(1, created_issue.local_id)
+
+  def SetUpUpdateIssuesModified(self, iids, modified_timestamp=None):
+    self.services.issue.issue_tbl.Update(
+        self.cnxn, {'modified': modified_timestamp or self.now},
+        id=iids, commit=False)
+
+  def testCreateIssue_SpamPredictionFailed(self):
+    settings.classifier_spam_thresh = 0.9
+    self.SetUpAllocateNextLocalID(789, None, None)
+    self.SetUpInsertSpamIssue()
+    self.SetUpInsertComment(7890101, is_description=True)
+
+    self.services.spam.ClassifyIssue(mox.IsA(tracker_pb2.Issue),
+        mox.IsA(tracker_pb2.IssueComment), self.reporter, False).AndReturn(
+        self.classifierResult(1.0, True))
+    self.services.spam.RecordClassifierIssueVerdict(self.cnxn,
+       mox.IsA(tracker_pb2.Issue), True, 1.0, True)
+    self.SetUpUpdateIssuesApprovals([])
+    self.SetUpEnqueueIssuesForIndexing([78901])
+
+    self.mox.ReplayAll()
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'sum',
+        'New',
+        111,
+        reporter_id=111,
+        labels=['Type-Defect'],
+        opened_timestamp=self.now,
+        modified_timestamp=self.now)
+    created_issue, _ = self.services.issue.CreateIssue(
+        self.cnxn, self.services, issue, 'content')
+    self.mox.VerifyAll()
+    self.assertEqual(1, created_issue.local_id)
+
+  def testCreateIssue_Spam(self):
+    settings.classifier_spam_thresh = 0.9
+    self.SetUpAllocateNextLocalID(789, None, None)
+    self.SetUpInsertSpamIssue()
+    self.SetUpInsertComment(7890101, is_description=True)
+
+    self.services.spam.ClassifyIssue(mox.IsA(tracker_pb2.Issue),
+        mox.IsA(tracker_pb2.IssueComment), self.reporter, False).AndReturn(
+        self.classifierResult(1.0))
+    self.services.spam.RecordClassifierIssueVerdict(self.cnxn,
+       mox.IsA(tracker_pb2.Issue), True, 1.0, False)
+    self.SetUpUpdateIssuesApprovals([])
+    self.SetUpEnqueueIssuesForIndexing([78901])
+
+    self.mox.ReplayAll()
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'sum',
+        'New',
+        111,
+        reporter_id=111,
+        labels=['Type-Defect'],
+        opened_timestamp=self.now,
+        modified_timestamp=self.now)
+    created_issue, _ = self.services.issue.CreateIssue(
+        self.cnxn, self.services, issue, 'content')
+    self.mox.VerifyAll()
+    self.assertEqual(1, created_issue.local_id)
+
+  def testCreateIssue_FederatedReferences(self):
+    self.SetUpAllocateNextLocalID(789, None, None)
+    self.SetUpInsertIssue(dangling_relation_rows=[
+        (78901, None, None, 'b/1234', 'blockedon'),
+        (78901, None, None, 'b/5678', 'blockedon'),
+        (78901, None, None, 'b/9876', 'blocking'),
+        (78901, None, None, 'b/5432', 'blocking')])
+    self.SetUpInsertComment(7890101, is_description=True)
+    self.services.spam.ClassifyIssue(mox.IsA(tracker_pb2.Issue),
+        mox.IsA(tracker_pb2.IssueComment), self.reporter, False).AndReturn(
+        self.classifierResult(0.0))
+    self.services.spam.RecordClassifierIssueVerdict(self.cnxn,
+        mox.IsA(tracker_pb2.Issue), mox.IgnoreArg(), mox.IgnoreArg(),
+        mox.IgnoreArg())
+    self.SetUpEnqueueIssuesForIndexing([78901])
+
+    self.mox.ReplayAll()
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'sum',
+        'New',
+        111,
+        reporter_id=111,
+        labels=['Type-Defect'],
+        opened_timestamp=self.now,
+        modified_timestamp=self.now)
+    issue.dangling_blocked_on_refs = [
+        tracker_pb2.DanglingIssueRef(ext_issue_identifier=shortlink)
+        for shortlink in ['b/1234', 'b/5678']
+    ]
+    issue.dangling_blocking_refs = [
+        tracker_pb2.DanglingIssueRef(ext_issue_identifier=shortlink)
+        for shortlink in ['b/9876', 'b/5432']
+    ]
+    self.services.issue.CreateIssue(self.cnxn, self.services, issue, 'content')
+    self.mox.VerifyAll()
+
+  def testCreateIssue_Imported(self):
+    settings.classifier_spam_thresh = 0.9
+    self.SetUpAllocateNextLocalID(789, None, None)
+    self.SetUpInsertIssue(label_rows=[])
+    self.SetUpInsertComment(7890101, is_description=True)
+    self.services.issue.commentimporter_tbl.InsertRow(
+        self.cnxn, comment_id=7890101, importer_id=222)
+    self.services.spam.ClassifyIssue(mox.IgnoreArg(),
+        mox.IgnoreArg(), self.reporter, False).AndReturn(
+        self.classifierResult(0.0))
+    self.services.spam.RecordClassifierIssueVerdict(self.cnxn,
+       mox.IsA(tracker_pb2.Issue), False, 1.0, False)
+    self.SetUpEnqueueIssuesForIndexing([78901])
+    self.mox.ReplayAll()
+
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'sum',
+        'New',
+        111,
+        reporter_id=111,
+        opened_timestamp=self.now,
+        modified_timestamp=self.now)
+    created_issue, comment = self.services.issue.CreateIssue(
+        self.cnxn, self.services, issue, 'content', importer_id=222)
+
+    self.mox.VerifyAll()
+    self.assertEqual(1, created_issue.local_id)
+    self.assertEqual(111, comment.user_id)
+    self.assertEqual(222, comment.importer_id)
+    self.assertEqual(self.now, comment.timestamp)
+
+  def testGetAllIssuesInProject_NoIssues(self):
+    self.SetUpGetHighestLocalID(789, None, None)
+    self.mox.ReplayAll()
+    issues = self.services.issue.GetAllIssuesInProject(self.cnxn, 789)
+    self.mox.VerifyAll()
+    self.assertEqual([], issues)
+
+  def testGetAnyOnHandIssue(self):
+    issue_ids = [78901, 78902, 78903]
+    self.SetUpGetIssues()
+    issue = self.services.issue.GetAnyOnHandIssue(issue_ids)
+    self.assertEqual(78901, issue.issue_id)
+
+  def SetUpGetIssues(self):
+    issue_1 = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901)
+    issue_1.project_name = 'proj'
+    issue_2 = fake.MakeTestIssue(
+        project_id=789, local_id=2, owner_id=111, summary='sum',
+        status='Fixed', issue_id=78902)
+    issue_2.project_name = 'proj'
+    self.services.issue.issue_2lc.CacheItem(78901, issue_1)
+    self.services.issue.issue_2lc.CacheItem(78902, issue_2)
+    return issue_1, issue_2
+
+  def testGetIssuesDict(self):
+    issue_ids = [78901, 78902, 78903]
+    issue_1, issue_2 = self.SetUpGetIssues()
+    self.services.issue.issue_2lc = TestableIssueTwoLevelCache(
+        [issue_1, issue_2])
+    issues_dict, missed_iids = self.services.issue.GetIssuesDict(
+        self.cnxn, issue_ids)
+    self.assertEqual(
+        {78901: issue_1, 78902: issue_2},
+        issues_dict)
+    self.assertEqual([78903], missed_iids)
+
+  def testGetIssues(self):
+    issue_ids = [78901, 78902]
+    issue_1, issue_2 = self.SetUpGetIssues()
+    issues = self.services.issue.GetIssues(self.cnxn, issue_ids)
+    self.assertEqual([issue_1, issue_2], issues)
+
+  def testGetIssue(self):
+    issue_1, _issue_2 = self.SetUpGetIssues()
+    actual_issue = self.services.issue.GetIssue(self.cnxn, 78901)
+    self.assertEqual(issue_1, actual_issue)
+
+  def testGetIssuesByLocalIDs(self):
+    issue_1, issue_2 = self.SetUpGetIssues()
+    self.services.issue.issue_id_2lc.CacheItem((789, 1), 78901)
+    self.services.issue.issue_id_2lc.CacheItem((789, 2), 78902)
+    actual_issues = self.services.issue.GetIssuesByLocalIDs(
+        self.cnxn, 789, [1, 2])
+    self.assertEqual([issue_1, issue_2], actual_issues)
+
+  def testGetIssueByLocalID(self):
+    issue_1, _issue_2 = self.SetUpGetIssues()
+    self.services.issue.issue_id_2lc.CacheItem((789, 1), 78901)
+    actual_issues = self.services.issue.GetIssueByLocalID(self.cnxn, 789, 1)
+    self.assertEqual(issue_1, actual_issues)
+
+  def testGetOpenAndClosedIssues(self):
+    issue_1, issue_2 = self.SetUpGetIssues()
+    open_issues, closed_issues = self.services.issue.GetOpenAndClosedIssues(
+        self.cnxn, [78901, 78902])
+    self.assertEqual([issue_1], open_issues)
+    self.assertEqual([issue_2], closed_issues)
+
+  def SetUpGetCurrentLocationOfMovedIssue(self, project_id, local_id):
+    issue_id = project_id * 100 + local_id
+    self.services.issue.issueformerlocations_tbl.SelectValue(
+        self.cnxn, 'issue_id', default=0, project_id=project_id,
+        local_id=local_id).AndReturn(issue_id)
+    self.services.issue.issue_tbl.SelectRow(
+        self.cnxn, cols=['project_id', 'local_id'], id=issue_id).AndReturn(
+            (project_id + 1, local_id + 1))
+
+  def testGetCurrentLocationOfMovedIssue(self):
+    self.SetUpGetCurrentLocationOfMovedIssue(789, 1)
+    self.mox.ReplayAll()
+    new_project_id, new_local_id = (
+        self.services.issue.GetCurrentLocationOfMovedIssue(self.cnxn, 789, 1))
+    self.mox.VerifyAll()
+    self.assertEqual(789 + 1, new_project_id)
+    self.assertEqual(1 + 1, new_local_id)
+
+  def SetUpGetPreviousLocations(self, issue_id, location_rows):
+    self.services.issue.issueformerlocations_tbl.Select(
+        self.cnxn, cols=['project_id', 'local_id'],
+        issue_id=issue_id).AndReturn(location_rows)
+
+  def testGetPreviousLocations(self):
+    self.SetUpGetPreviousLocations(78901, [(781, 1), (782, 11), (789, 1)])
+    self.mox.ReplayAll()
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901)
+    locations = self.services.issue.GetPreviousLocations(self.cnxn, issue)
+    self.mox.VerifyAll()
+    self.assertEqual(locations, [(781, 1), (782, 11)])
+
+  def SetUpInsertIssue(
+      self, label_rows=None, av_rows=None, approver_rows=None,
+      dangling_relation_rows=None):
+    row = (789, 1, 1, 111, 111,
+           self.now, 0, self.now, self.now, self.now, self.now,
+           None, 0,
+           False, 0, 0, False)
+    self.services.issue.issue_tbl.InsertRows(
+        self.cnxn, issue_svc.ISSUE_COLS[1:], [row],
+        commit=False, return_generated_ids=True).AndReturn([78901])
+    self.cnxn.Commit()
+    self.services.issue.issue_tbl.Update(
+        self.cnxn, {'shard': 78901 % settings.num_logical_shards},
+        id=78901, commit=False)
+    self.SetUpUpdateIssuesSummary()
+    self.SetUpUpdateIssuesLabels(label_rows=label_rows)
+    self.SetUpUpdateIssuesFields()
+    self.SetUpUpdateIssuesComponents()
+    self.SetUpUpdateIssuesCc()
+    self.SetUpUpdateIssuesNotify()
+    self.SetUpUpdateIssuesRelation(
+        dangling_relation_rows=dangling_relation_rows)
+    self.SetUpUpdateIssuesApprovals(
+        av_rows=av_rows, approver_rows=approver_rows)
+    self.services.chart.StoreIssueSnapshots(self.cnxn, mox.IgnoreArg(),
+        commit=False)
+
+  def SetUpInsertSpamIssue(self):
+    row = (789, 1, 1, 111, 111,
+           self.now, 0, self.now, self.now, self.now, self.now,
+           None, 0, False, 0, 0, True)
+    self.services.issue.issue_tbl.InsertRows(
+        self.cnxn, issue_svc.ISSUE_COLS[1:], [row],
+        commit=False, return_generated_ids=True).AndReturn([78901])
+    self.cnxn.Commit()
+    self.services.issue.issue_tbl.Update(
+        self.cnxn, {'shard': 78901 % settings.num_logical_shards},
+        id=78901, commit=False)
+    self.SetUpUpdateIssuesSummary()
+    self.SetUpUpdateIssuesLabels()
+    self.SetUpUpdateIssuesFields()
+    self.SetUpUpdateIssuesComponents()
+    self.SetUpUpdateIssuesCc()
+    self.SetUpUpdateIssuesNotify()
+    self.SetUpUpdateIssuesRelation()
+    self.services.chart.StoreIssueSnapshots(self.cnxn, mox.IgnoreArg(),
+        commit=False)
+
+  def SetUpUpdateIssuesSummary(self):
+    self.services.issue.issuesummary_tbl.InsertRows(
+        self.cnxn, ['issue_id', 'summary'],
+        [(78901, 'sum')], replace=True, commit=False)
+
+  def SetUpUpdateIssuesLabels(self, label_rows=None):
+    if label_rows is None:
+      label_rows = [(78901, 1, False, 1)]
+    self.services.issue.issue2label_tbl.Delete(
+        self.cnxn, issue_id=[78901], commit=False)
+    self.services.issue.issue2label_tbl.InsertRows(
+        self.cnxn, ['issue_id', 'label_id', 'derived', 'issue_shard'],
+        label_rows, ignore=True, commit=False)
+
+  def SetUpUpdateIssuesFields(self, issue2fieldvalue_rows=None):
+    issue2fieldvalue_rows = issue2fieldvalue_rows or []
+    self.services.issue.issue2fieldvalue_tbl.Delete(
+        self.cnxn, issue_id=[78901], commit=False)
+    self.services.issue.issue2fieldvalue_tbl.InsertRows(
+        self.cnxn, issue_svc.ISSUE2FIELDVALUE_COLS + ['issue_shard'],
+        issue2fieldvalue_rows, commit=False)
+
+  def SetUpUpdateIssuesComponents(self, issue2component_rows=None):
+    issue2component_rows = issue2component_rows or []
+    self.services.issue.issue2component_tbl.Delete(
+        self.cnxn, issue_id=[78901], commit=False)
+    self.services.issue.issue2component_tbl.InsertRows(
+        self.cnxn, ['issue_id', 'component_id', 'derived', 'issue_shard'],
+        issue2component_rows, ignore=True, commit=False)
+
+  def SetUpUpdateIssuesCc(self, issue2cc_rows=None):
+    issue2cc_rows = issue2cc_rows or []
+    self.services.issue.issue2cc_tbl.Delete(
+        self.cnxn, issue_id=[78901], commit=False)
+    self.services.issue.issue2cc_tbl.InsertRows(
+        self.cnxn, ['issue_id', 'cc_id', 'derived', 'issue_shard'],
+        issue2cc_rows, ignore=True, commit=False)
+
+  def SetUpUpdateIssuesNotify(self, notify_rows=None):
+    notify_rows = notify_rows or []
+    self.services.issue.issue2notify_tbl.Delete(
+        self.cnxn, issue_id=[78901], commit=False)
+    self.services.issue.issue2notify_tbl.InsertRows(
+        self.cnxn, issue_svc.ISSUE2NOTIFY_COLS,
+        notify_rows, ignore=True, commit=False)
+
+  def SetUpUpdateIssuesRelation(
+    self, relation_rows=None, dangling_relation_rows=None):
+    relation_rows = relation_rows or []
+    dangling_relation_rows = dangling_relation_rows or []
+    self.services.issue.issuerelation_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUERELATION_COLS[:-1],
+        dst_issue_id=[78901], kind='blockedon').AndReturn([])
+    self.services.issue.issuerelation_tbl.Delete(
+        self.cnxn, issue_id=[78901], commit=False)
+    self.services.issue.issuerelation_tbl.InsertRows(
+        self.cnxn, issue_svc.ISSUERELATION_COLS, relation_rows,
+        ignore=True, commit=False)
+    self.services.issue.danglingrelation_tbl.Delete(
+        self.cnxn, issue_id=[78901], commit=False)
+    self.services.issue.danglingrelation_tbl.InsertRows(
+        self.cnxn, issue_svc.DANGLINGRELATION_COLS, dangling_relation_rows,
+        ignore=True, commit=False)
+
+  def SetUpUpdateIssuesApprovals(self, av_rows=None, approver_rows=None):
+    av_rows = av_rows or []
+    approver_rows = approver_rows or []
+    self.services.issue.issue2approvalvalue_tbl.Delete(
+        self.cnxn, issue_id=78901, commit=False)
+    self.services.issue.issue2approvalvalue_tbl.InsertRows(
+        self.cnxn, issue_svc.ISSUE2APPROVALVALUE_COLS, av_rows, commit=False)
+    self.services.issue.issueapproval2approver_tbl.Delete(
+        self.cnxn, issue_id=78901, commit=False)
+    self.services.issue.issueapproval2approver_tbl.InsertRows(
+        self.cnxn, issue_svc.ISSUEAPPROVAL2APPROVER_COLS, approver_rows,
+        commit=False)
+
+  def testInsertIssue(self):
+    self.SetUpInsertIssue()
+    self.mox.ReplayAll()
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, reporter_id=111,
+        summary='sum', status='New', labels=['Type-Defect'], issue_id=78901,
+        opened_timestamp=self.now, modified_timestamp=self.now)
+    actual_issue_id = self.services.issue.InsertIssue(self.cnxn, issue)
+    self.mox.VerifyAll()
+    self.assertEqual(78901, actual_issue_id)
+
+  def SetUpUpdateIssues(self, given_delta=None):
+    delta = given_delta or {
+        'project_id': 789,
+        'local_id': 1,
+        'owner_id': 111,
+        'status_id': 1,
+        'opened': 123456789,
+        'closed': 0,
+        'modified': 123456789,
+        'owner_modified': 123456789,
+        'status_modified': 123456789,
+        'component_modified': 123456789,
+        'derived_owner_id': None,
+        'derived_status_id': None,
+        'deleted': False,
+        'star_count': 12,
+        'attachment_count': 0,
+        'is_spam': False,
+        }
+    self.services.issue.issue_tbl.Update(
+        self.cnxn, delta, id=78901, commit=False)
+    if not given_delta:
+      self.SetUpUpdateIssuesLabels()
+      self.SetUpUpdateIssuesCc()
+      self.SetUpUpdateIssuesFields()
+      self.SetUpUpdateIssuesComponents()
+      self.SetUpUpdateIssuesNotify()
+      self.SetUpUpdateIssuesSummary()
+      self.SetUpUpdateIssuesRelation()
+      self.services.chart.StoreIssueSnapshots(self.cnxn, mox.IgnoreArg(),
+          commit=False)
+
+    if given_delta:
+      self.services.chart.StoreIssueSnapshots(self.cnxn, mox.IgnoreArg(),
+          commit=False)
+
+    self.cnxn.Commit()
+
+  def testUpdateIssues_Empty(self):
+    # Note: no setup because DB should not be called.
+    self.mox.ReplayAll()
+    self.services.issue.UpdateIssues(self.cnxn, [])
+    self.mox.VerifyAll()
+
+  def testUpdateIssues_Normal(self):
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', labels=['Type-Defect'], issue_id=78901,
+        opened_timestamp=123456789, modified_timestamp=123456789,
+        star_count=12)
+    issue.assume_stale = False
+    self.SetUpUpdateIssues()
+    self.mox.ReplayAll()
+    self.services.issue.UpdateIssues(self.cnxn, [issue])
+    self.mox.VerifyAll()
+
+  def testUpdateIssue_Normal(self):
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', labels=['Type-Defect'], issue_id=78901,
+        opened_timestamp=123456789, modified_timestamp=123456789,
+        star_count=12)
+    issue.assume_stale = False
+    self.SetUpUpdateIssues()
+    self.mox.ReplayAll()
+    self.services.issue.UpdateIssue(self.cnxn, issue)
+    self.mox.VerifyAll()
+
+  def testUpdateIssue_Stale(self):
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', labels=['Type-Defect'], issue_id=78901,
+        opened_timestamp=123456789, modified_timestamp=123456789,
+        star_count=12)
+    # Do not set issue.assume_stale = False
+    # Do not call self.SetUpUpdateIssues() because nothing should be updated.
+    self.mox.ReplayAll()
+    self.assertRaises(
+        AssertionError, self.services.issue.UpdateIssue, self.cnxn, issue)
+    self.mox.VerifyAll()
+
+  def testUpdateIssuesSummary(self):
+    issue = fake.MakeTestIssue(
+        local_id=1, issue_id=78901, owner_id=111, summary='sum', status='New',
+        project_id=789)
+    issue.assume_stale = False
+    self.SetUpUpdateIssuesSummary()
+    self.mox.ReplayAll()
+    self.services.issue._UpdateIssuesSummary(self.cnxn, [issue], commit=False)
+    self.mox.VerifyAll()
+
+  def testUpdateIssuesLabels(self):
+    issue = fake.MakeTestIssue(
+        local_id=1, issue_id=78901, owner_id=111, summary='sum', status='New',
+        labels=['Type-Defect'], project_id=789)
+    self.SetUpUpdateIssuesLabels()
+    self.mox.ReplayAll()
+    self.services.issue._UpdateIssuesLabels(
+      self.cnxn, [issue], commit=False)
+    self.mox.VerifyAll()
+
+  def testUpdateIssuesFields_Empty(self):
+    issue = fake.MakeTestIssue(
+        local_id=1, issue_id=78901, owner_id=111, summary='sum', status='New',
+        project_id=789)
+    self.SetUpUpdateIssuesFields()
+    self.mox.ReplayAll()
+    self.services.issue._UpdateIssuesFields(self.cnxn, [issue], commit=False)
+    self.mox.VerifyAll()
+
+  def testUpdateIssuesFields_Some(self):
+    issue = fake.MakeTestIssue(
+        local_id=1, issue_id=78901, owner_id=111, summary='sum', status='New',
+        project_id=789)
+    issue_shard = issue.issue_id % settings.num_logical_shards
+    fv1 = tracker_bizobj.MakeFieldValue(345, 679, '', 0, None, None, False)
+    issue.field_values.append(fv1)
+    fv2 = tracker_bizobj.MakeFieldValue(346, 0, 'Blue', 0, None, None, True)
+    issue.field_values.append(fv2)
+    fv3 = tracker_bizobj.MakeFieldValue(347, 0, '', 0, 1234567890, None, True)
+    issue.field_values.append(fv3)
+    fv4 = tracker_bizobj.MakeFieldValue(
+        348, 0, '', 0, None, 'www.google.com', True, phase_id=14)
+    issue.field_values.append(fv4)
+    self.SetUpUpdateIssuesFields(issue2fieldvalue_rows=[
+        (issue.issue_id, fv1.field_id, fv1.int_value, fv1.str_value,
+         None, fv1.date_value, fv1.url_value, fv1.derived, None,
+         issue_shard),
+        (issue.issue_id, fv2.field_id, fv2.int_value, fv2.str_value,
+         None, fv2.date_value, fv2.url_value, fv2.derived, None,
+         issue_shard),
+        (issue.issue_id, fv3.field_id, fv3.int_value, fv3.str_value,
+         None, fv3.date_value, fv3.url_value, fv3.derived, None,
+         issue_shard),
+        (issue.issue_id, fv4.field_id, fv4.int_value, fv4.str_value,
+         None, fv4.date_value, fv4.url_value, fv4.derived, 14,
+         issue_shard),
+        ])
+    self.mox.ReplayAll()
+    self.services.issue._UpdateIssuesFields(self.cnxn, [issue], commit=False)
+    self.mox.VerifyAll()
+
+  def testUpdateIssuesComponents_Empty(self):
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901)
+    self.SetUpUpdateIssuesComponents()
+    self.mox.ReplayAll()
+    self.services.issue._UpdateIssuesComponents(
+        self.cnxn, [issue], commit=False)
+    self.mox.VerifyAll()
+
+  def testUpdateIssuesCc_Empty(self):
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901)
+    self.SetUpUpdateIssuesCc()
+    self.mox.ReplayAll()
+    self.services.issue._UpdateIssuesCc(self.cnxn, [issue], commit=False)
+    self.mox.VerifyAll()
+
+  def testUpdateIssuesCc_Some(self):
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901)
+    issue.cc_ids = [222, 333]
+    issue.derived_cc_ids = [888]
+    issue_shard = issue.issue_id % settings.num_logical_shards
+    self.SetUpUpdateIssuesCc(issue2cc_rows=[
+        (issue.issue_id, 222, False, issue_shard),
+        (issue.issue_id, 333, False, issue_shard),
+        (issue.issue_id, 888, True, issue_shard),
+        ])
+    self.mox.ReplayAll()
+    self.services.issue._UpdateIssuesCc(self.cnxn, [issue], commit=False)
+    self.mox.VerifyAll()
+
+  def testUpdateIssuesNotify_Empty(self):
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901)
+    self.SetUpUpdateIssuesNotify()
+    self.mox.ReplayAll()
+    self.services.issue._UpdateIssuesNotify(self.cnxn, [issue], commit=False)
+    self.mox.VerifyAll()
+
+  def testUpdateIssuesRelation_Empty(self):
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901)
+    self.SetUpUpdateIssuesRelation()
+    self.mox.ReplayAll()
+    self.services.issue._UpdateIssuesRelation(self.cnxn, [issue], commit=False)
+    self.mox.VerifyAll()
+
+  def testUpdateIssuesRelation_MergedIntoExternal(self):
+    self.services.issue.issuerelation_tbl.Select = Mock(return_value=[])
+    self.services.issue.issuerelation_tbl.Delete = Mock()
+    self.services.issue.issuerelation_tbl.InsertRows = Mock()
+    self.services.issue.danglingrelation_tbl.Delete = Mock()
+    self.services.issue.danglingrelation_tbl.InsertRows = Mock()
+
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901, merged_into_external='b/5678')
+
+    self.services.issue._UpdateIssuesRelation(self.cnxn, [issue])
+
+    self.services.issue.danglingrelation_tbl.Delete.assert_called_once_with(
+        self.cnxn, commit=False, issue_id=[78901])
+    self.services.issue.danglingrelation_tbl.InsertRows\
+        .assert_called_once_with(
+          self.cnxn, ['issue_id', 'dst_issue_project', 'dst_issue_local_id',
+            'ext_issue_identifier', 'kind'],
+          [(78901, None, None, 'b/5678', 'mergedinto')],
+          ignore=True, commit=True)
+
+  @patch('time.time')
+  def testUpdateIssueStructure(self, mockTime):
+    mockTime.return_value = self.now
+    reporter_id = 111
+    comment_content = 'This issue is being converted'
+    # Set up config
+    config = self.services.config.GetProjectConfig(
+        self.cnxn, 789)
+    config.approval_defs = [
+        tracker_pb2.ApprovalDef(
+            approval_id=3, survey='Question3', approver_ids=[222]),
+        tracker_pb2.ApprovalDef(
+            approval_id=4, survey='Question4', approver_ids=[444]),
+        tracker_pb2.ApprovalDef(
+            approval_id=7, survey='Question7', approver_ids=[222]),
+    ]
+    config.field_defs = [
+      tracker_pb2.FieldDef(
+          field_id=3, project_id=789, field_name='Cow'),
+      tracker_pb2.FieldDef(
+          field_id=4, project_id=789, field_name='Chicken'),
+      tracker_pb2.FieldDef(
+          field_id=6, project_id=789, field_name='Llama'),
+      tracker_pb2.FieldDef(
+          field_id=7, project_id=789, field_name='Roo'),
+      tracker_pb2.FieldDef(
+          field_id=8, project_id=789, field_name='Salmon'),
+      tracker_pb2.FieldDef(
+          field_id=9, project_id=789, field_name='Tuna', is_phase_field=True),
+      tracker_pb2.FieldDef(
+          field_id=10, project_id=789, field_name='Clown', is_phase_field=True),
+      tracker_pb2.FieldDef(
+          field_id=11, project_id=789, field_name='Dory', is_phase_field=True),
+    ]
+
+    # Set up issue
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum', status='Open',
+        issue_id=78901, project_name='proj')
+    issue.approval_values = [
+        tracker_pb2.ApprovalValue(
+            approval_id=3,
+            phase_id=4,
+            status=tracker_pb2.ApprovalStatus.APPROVED,
+            approver_ids=[111],  # trumps approval_def approver_ids
+        ),
+        tracker_pb2.ApprovalValue(
+            approval_id=4,
+            phase_id=5,
+            approver_ids=[111]),  # trumps approval_def approver_ids
+        tracker_pb2.ApprovalValue(approval_id=6)]
+    issue.phases = [
+        tracker_pb2.Phase(name='Expired', phase_id=4),
+        tracker_pb2.Phase(name='canarY', phase_id=3),
+        tracker_pb2.Phase(name='Stable', phase_id=2)]
+    issue.field_values = [
+        tracker_bizobj.MakeFieldValue(8, None, 'Pink', None, None, None, False),
+        tracker_bizobj.MakeFieldValue(
+            9, None, 'Silver', None, None, None, False, phase_id=3),
+        tracker_bizobj.MakeFieldValue(
+            10, None, 'Orange', None, None, None, False, phase_id=4),
+        tracker_bizobj.MakeFieldValue(
+            11, None, 'Flat', None, None, None, False, phase_id=2),
+        ]
+
+    # Set up template
+    template = testing_helpers.DefaultTemplates()[0]
+    template.approval_values = [
+        tracker_pb2.ApprovalValue(
+            approval_id=3,
+            phase_id=6),  # Different phase. Nothing else affected.
+        # No phase. Nothing else affected.
+        tracker_pb2.ApprovalValue(approval_id=4),
+        # New approval not already found in issue.
+        tracker_pb2.ApprovalValue(
+            approval_id=7,
+            phase_id=5),
+    ]  # No approval 6
+    # TODO(jojwang): monorail:4693, rename 'Stable-Full' after all
+    # 'stable-full' gates have been renamed to 'stable'.
+    template.phases = [tracker_pb2.Phase(name='Canary', phase_id=5),
+                       tracker_pb2.Phase(name='Stable-Full', phase_id=6)]
+
+    self.SetUpInsertComment(
+        7890101, is_description=True, approval_id=3,
+        content=config.approval_defs[0].survey, commit=False)
+    self.SetUpInsertComment(
+        7890101, is_description=True, approval_id=4,
+        content=config.approval_defs[1].survey, commit=False)
+    self.SetUpInsertComment(
+        7890101, is_description=True, approval_id=7,
+        content=config.approval_defs[2].survey, commit=False)
+    amendment_row = (
+        78901, 7890101, 'custom', None, '-Llama Roo', None, None, 'Approvals')
+    self.SetUpInsertComment(
+        7890101, content=comment_content, amendment_rows=[amendment_row],
+        commit=False)
+    av_rows = [
+        (3, 78901, 6, 'approved', None, None),
+        (4, 78901, None, 'not_set', None, None),
+        (7, 78901, 5, 'not_set', None, None),
+    ]
+    approver_rows = [(3, 111, 78901), (4, 111, 78901), (7, 222, 78901)]
+    self.SetUpUpdateIssuesApprovals(
+        av_rows=av_rows, approver_rows=approver_rows)
+    issue_shard = issue.issue_id % settings.num_logical_shards
+    issue2fieldvalue_rows = [
+        (78901, 8, None, 'Pink', None, None, None, False, None, issue_shard),
+        (78901, 9, None, 'Silver', None, None, None, False, 5, issue_shard),
+        (78901, 11, None, 'Flat', None, None, None, False, 6, issue_shard),
+    ]
+    self.SetUpUpdateIssuesFields(issue2fieldvalue_rows=issue2fieldvalue_rows)
+
+    self.mox.ReplayAll()
+    comment = self.services.issue.UpdateIssueStructure(
+        self.cnxn, config, issue, template, reporter_id,
+        comment_content=comment_content, commit=False, invalidate=False)
+    self.mox.VerifyAll()
+
+    expected_avs = [
+        tracker_pb2.ApprovalValue(
+            approval_id=3,
+            phase_id=6,
+            status=tracker_pb2.ApprovalStatus.APPROVED,
+            approver_ids=[111],
+        ),
+        tracker_pb2.ApprovalValue(
+            approval_id=4,
+            status=tracker_pb2.ApprovalStatus.NOT_SET,
+            approver_ids=[111]),
+        tracker_pb2.ApprovalValue(
+            approval_id=7,
+            status=tracker_pb2.ApprovalStatus.NOT_SET,
+            phase_id=5,
+            approver_ids=[222]),
+    ]
+    self.assertEqual(issue.approval_values, expected_avs)
+    self.assertEqual(issue.phases, template.phases)
+    amendment = tracker_bizobj.MakeApprovalStructureAmendment(
+        ['Roo', 'Cow', 'Chicken'], ['Cow', 'Chicken', 'Llama'])
+    expected_comment = self.services.issue._MakeIssueComment(
+        789, reporter_id, content=comment_content, amendments=[amendment])
+    expected_comment.issue_id = 78901
+    expected_comment.id = 7890101
+    self.assertEqual(expected_comment, comment)
+
+  def testDeltaUpdateIssue(self):
+    pass  # TODO(jrobbins): write more tests
+
+  def testDeltaUpdateIssue_NoOp(self):
+    """If the user didn't provide any content, we don't make an IssueComment."""
+    commenter_id = 222
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901, project_name='proj')
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    delta = tracker_pb2.IssueDelta()
+
+    amendments, comment_pb = self.services.issue.DeltaUpdateIssue(
+        self.cnxn, self.services, commenter_id, issue.project_id, config,
+        issue, delta, comment='', index_now=False, timestamp=self.now)
+    self.assertEqual([], amendments)
+    self.assertIsNone(comment_pb)
+
+  def testDeltaUpdateIssue_MergedInto(self):
+    commenter_id = 222
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901, project_name='proj')
+    target_issue = fake.MakeTestIssue(
+        project_id=789, local_id=2, owner_id=111, summary='sum sum',
+        status='Live', issue_id=78902, project_name='proj')
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+
+    self.mox.StubOutWithMock(self.services.issue, 'GetIssue')
+    self.mox.StubOutWithMock(self.services.issue, 'UpdateIssue')
+    self.mox.StubOutWithMock(self.services.issue, 'CreateIssueComment')
+    self.mox.StubOutWithMock(self.services.issue, '_UpdateIssuesModified')
+
+    self.services.issue.GetIssue(
+        self.cnxn, 0).AndRaise(exceptions.NoSuchIssueException)
+    self.services.issue.GetIssue(
+        self.cnxn, target_issue.issue_id).AndReturn(target_issue)
+    self.services.issue.UpdateIssue(
+        self.cnxn, issue, commit=False, invalidate=False)
+    amendments = [
+        tracker_bizobj.MakeMergedIntoAmendment(
+            [('proj', 2)], [None], default_project_name='proj')]
+    self.services.issue.CreateIssueComment(
+        self.cnxn, issue, commenter_id, 'comment text', attachments=None,
+        amendments=amendments, commit=False, is_description=False,
+        kept_attachments=None, importer_id=None, timestamp=ANY,
+        inbound_message=None)
+    self.services.issue._UpdateIssuesModified(
+        self.cnxn, {issue.issue_id, target_issue.issue_id},
+        modified_timestamp=self.now, invalidate=True)
+    self.SetUpEnqueueIssuesForIndexing([78901])
+
+    self.mox.ReplayAll()
+    delta = tracker_pb2.IssueDelta(merged_into=target_issue.issue_id)
+    self.services.issue.DeltaUpdateIssue(
+        self.cnxn, self.services, commenter_id, issue.project_id, config,
+        issue, delta, comment='comment text',
+        index_now=False, timestamp=self.now)
+    self.mox.VerifyAll()
+
+  def testDeltaUpdateIssue_BlockedOn(self):
+    commenter_id = 222
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901, project_name='proj')
+    blockedon_issue = fake.MakeTestIssue(
+        project_id=789, local_id=2, owner_id=111, summary='sum sum',
+        status='Live', issue_id=78902, project_name='proj')
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+
+    self.mox.StubOutWithMock(self.services.issue, 'GetIssue')
+    self.mox.StubOutWithMock(self.services.issue, 'GetIssues')
+    self.mox.StubOutWithMock(self.services.issue, 'LookupIssueRefs')
+    self.mox.StubOutWithMock(self.services.issue, 'UpdateIssue')
+    self.mox.StubOutWithMock(self.services.issue, 'CreateIssueComment')
+    self.mox.StubOutWithMock(self.services.issue, '_UpdateIssuesModified')
+    self.mox.StubOutWithMock(self.services.issue, "SortBlockedOn")
+
+    # Calls in ApplyIssueDelta
+    # Call to find added blockedon issues.
+    issue_refs = {blockedon_issue.issue_id: (
+        blockedon_issue.project_name, blockedon_issue.local_id)}
+    self.services.issue.LookupIssueRefs(
+        self.cnxn, [blockedon_issue.issue_id]).AndReturn(issue_refs)
+
+    # Call to find removed blockedon issues.
+    self.services.issue.LookupIssueRefs(self.cnxn, []).AndReturn({})
+    # Call to sort blockedon issues.
+    self.services.issue.SortBlockedOn(
+        self.cnxn, issue, [blockedon_issue.issue_id]).AndReturn(([78902], [0]))
+
+    self.services.issue.UpdateIssue(
+        self.cnxn, issue, commit=False, invalidate=False)
+    amendments = [
+        tracker_bizobj.MakeBlockedOnAmendment(
+            [('proj', 2)], [], default_project_name='proj')]
+    self.services.issue.CreateIssueComment(
+        self.cnxn, issue, commenter_id, 'comment text', attachments=None,
+        amendments=amendments, commit=False, is_description=False,
+        kept_attachments=None, importer_id=None, timestamp=ANY,
+        inbound_message=None)
+    # Call to find added blockedon issues.
+    self.services.issue.GetIssues(
+        self.cnxn, [blockedon_issue.issue_id]).AndReturn([blockedon_issue])
+    self.services.issue.CreateIssueComment(
+        self.cnxn, blockedon_issue, commenter_id, content='',
+        amendments=[tracker_bizobj.MakeBlockingAmendment(
+            [(issue.project_name, issue.local_id)], [],
+            default_project_name='proj')],
+        importer_id=None, timestamp=ANY)
+    # Call to find removed blockedon issues.
+    self.services.issue.GetIssues(self.cnxn, []).AndReturn([])
+    # Call to find added blocking issues.
+    self.services.issue.GetIssues(self.cnxn, []).AndReturn([])
+    # Call to find removed blocking issues.
+    self.services.issue.GetIssues(self.cnxn, []).AndReturn([])
+
+    self.services.issue._UpdateIssuesModified(
+        self.cnxn, {issue.issue_id, blockedon_issue.issue_id},
+        modified_timestamp=self.now, invalidate=True)
+    self.SetUpEnqueueIssuesForIndexing([78901])
+
+    self.mox.ReplayAll()
+    delta = tracker_pb2.IssueDelta(blocked_on_add=[blockedon_issue.issue_id])
+    self.services.issue.DeltaUpdateIssue(
+        self.cnxn, self.services, commenter_id, issue.project_id, config,
+        issue, delta, comment='comment text',
+        index_now=False, timestamp=self.now)
+    self.mox.VerifyAll()
+
+  def testDeltaUpdateIssue_Blocking(self):
+    commenter_id = 222
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901, project_name='proj')
+    blocking_issue = fake.MakeTestIssue(
+        project_id=789, local_id=2, owner_id=111, summary='sum sum',
+        status='Live', issue_id=78902, project_name='proj')
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+
+    self.mox.StubOutWithMock(self.services.issue, 'GetIssue')
+    self.mox.StubOutWithMock(self.services.issue, 'GetIssues')
+    self.mox.StubOutWithMock(self.services.issue, 'LookupIssueRefs')
+    self.mox.StubOutWithMock(self.services.issue, 'UpdateIssue')
+    self.mox.StubOutWithMock(self.services.issue, 'CreateIssueComment')
+    self.mox.StubOutWithMock(self.services.issue, '_UpdateIssuesModified')
+    self.mox.StubOutWithMock(self.services.issue, "SortBlockedOn")
+
+    # Calls in ApplyIssueDelta
+    # Call to find added blocking issues.
+    issue_refs = {blocking_issue: (
+        blocking_issue.project_name, blocking_issue.local_id)}
+    self.services.issue.LookupIssueRefs(
+        self.cnxn, [blocking_issue.issue_id]).AndReturn(issue_refs)
+    # Call to find removed blocking issues.
+    self.services.issue.LookupIssueRefs(self.cnxn, []).AndReturn({})
+
+    self.services.issue.UpdateIssue(
+        self.cnxn, issue, commit=False, invalidate=False)
+    amendments = [
+        tracker_bizobj.MakeBlockingAmendment(
+            [('proj', 2)], [], default_project_name='proj')]
+    self.services.issue.CreateIssueComment(
+        self.cnxn, issue, commenter_id, 'comment text', attachments=None,
+        amendments=amendments, commit=False, is_description=False,
+        kept_attachments=None, importer_id=None, timestamp=ANY,
+        inbound_message=None)
+    # Call to find added blockedon issues.
+    self.services.issue.GetIssues(self.cnxn, []).AndReturn([])
+    # Call to find removed blockedon issues.
+    self.services.issue.GetIssues(self.cnxn, []).AndReturn([])
+    # Call to find added blocking issues.
+    self.services.issue.GetIssues(
+        self.cnxn, [blocking_issue.issue_id]).AndReturn([blocking_issue])
+    self.services.issue.CreateIssueComment(
+        self.cnxn, blocking_issue, commenter_id, content='',
+        amendments=[tracker_bizobj.MakeBlockedOnAmendment(
+            [(issue.project_name, issue.local_id)], [],
+            default_project_name='proj')],
+        importer_id=None, timestamp=ANY)
+    # Call to find removed blocking issues.
+    self.services.issue.GetIssues(self.cnxn, []).AndReturn([])
+    self.services.issue._UpdateIssuesModified(
+        self.cnxn, {issue.issue_id, blocking_issue.issue_id},
+        modified_timestamp=self.now, invalidate=True)
+    self.SetUpEnqueueIssuesForIndexing([78901])
+
+    self.mox.ReplayAll()
+    delta = tracker_pb2.IssueDelta(blocking_add=[blocking_issue.issue_id])
+    self.services.issue.DeltaUpdateIssue(
+        self.cnxn, self.services, commenter_id, issue.project_id, config,
+        issue, delta, comment='comment text',
+        index_now=False, timestamp=self.now)
+    self.mox.VerifyAll()
+
+  def testDeltaUpdateIssue_Imported(self):
+    """If importer_id is specified, store it."""
+    commenter_id = 222
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901, project_name='proj')
+    issue.assume_stale = False
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    delta = tracker_pb2.IssueDelta()
+
+    self.mox.StubOutWithMock(self.services.issue, 'GetIssue')
+    self.mox.StubOutWithMock(self.services.issue, 'GetIssues')
+    self.mox.StubOutWithMock(self.services.issue, 'UpdateIssue')
+    self.mox.StubOutWithMock(self.services.issue, 'CreateIssueComment')
+    self.mox.StubOutWithMock(self.services.issue, '_UpdateIssuesModified')
+    self.mox.StubOutWithMock(self.services.issue, "SortBlockedOn")
+    self.services.issue.UpdateIssue(
+        self.cnxn, issue, commit=False, invalidate=False)
+    # Call to find added blockedon issues.
+    self.services.issue.GetIssues(self.cnxn, []).AndReturn([])
+    # Call to find removed blockedon issues.
+    self.services.issue.GetIssues(self.cnxn, []).AndReturn([])
+    self.services.issue.CreateIssueComment(
+        self.cnxn, issue, commenter_id, 'a comment', attachments=None,
+        amendments=[], commit=False, is_description=False,
+        kept_attachments=None, importer_id=333, timestamp=ANY,
+        inbound_message=None).AndReturn(
+          tracker_pb2.IssueComment(content='a comment', importer_id=333))
+    self.services.issue.GetIssues(self.cnxn, []).AndReturn([])
+    self.services.issue.GetIssues(self.cnxn, []).AndReturn([])
+    self.services.issue._UpdateIssuesModified(
+        self.cnxn, {issue.issue_id},
+        modified_timestamp=self.now, invalidate=True)
+    self.SetUpEnqueueIssuesForIndexing([78901])
+    self.mox.ReplayAll()
+
+    amendments, comment_pb = self.services.issue.DeltaUpdateIssue(
+        self.cnxn, self.services, commenter_id, issue.project_id, config,
+        issue, delta, comment='a comment', index_now=False, timestamp=self.now,
+        importer_id=333)
+
+    self.mox.VerifyAll()
+    self.assertEqual([], amendments)
+    self.assertEqual('a comment', comment_pb.content)
+    self.assertEqual(333, comment_pb.importer_id)
+
+  def SetUpMoveIssues_NewProject(self):
+    self.services.issue.issueformerlocations_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUEFORMERLOCATIONS_COLS, project_id=789,
+        issue_id=[78901]).AndReturn([])
+    self.SetUpAllocateNextLocalID(789, None, None)
+    self.SetUpUpdateIssues()
+    self.services.issue.comment_tbl.Update(
+        self.cnxn, {'project_id': 789}, issue_id=[78901], commit=False)
+
+    old_location_rows = [(78901, 711, 2)]
+    self.services.issue.issueformerlocations_tbl.InsertRows(
+        self.cnxn, issue_svc.ISSUEFORMERLOCATIONS_COLS, old_location_rows,
+        ignore=True, commit=False)
+    self.cnxn.Commit()
+
+  def testMoveIssues_NewProject(self):
+    """Move project 711 issue 2 to become project 789 issue 1."""
+    dest_project = fake.Project(project_id=789)
+    issue = fake.MakeTestIssue(
+        project_id=711, local_id=2, owner_id=111, summary='sum',
+        status='Live', labels=['Type-Defect'], issue_id=78901,
+        opened_timestamp=123456789, modified_timestamp=123456789,
+        star_count=12)
+    issue.assume_stale = False
+    self.SetUpMoveIssues_NewProject()
+    self.mox.ReplayAll()
+    self.services.issue.MoveIssues(
+        self.cnxn, dest_project, [issue], self.services.user)
+    self.mox.VerifyAll()
+
+  # TODO(jrobbins): case where issue is moved back into former project
+
+  def testExpungeFormerLocations(self):
+    self.services.issue.issueformerlocations_tbl.Delete(
+      self.cnxn, project_id=789)
+
+    self.mox.ReplayAll()
+    self.services.issue.ExpungeFormerLocations(self.cnxn, 789)
+    self.mox.VerifyAll()
+
+  def testExpungeIssues(self):
+    issue_ids = [1, 2]
+
+    self.mox.StubOutWithMock(search, 'Index')
+    search.Index(name=settings.search_index_name_format % 1).AndReturn(
+        MockIndex())
+    search.Index(name=settings.search_index_name_format % 2).AndReturn(
+        MockIndex())
+
+    self.services.issue.issuesummary_tbl.Delete(self.cnxn, issue_id=[1, 2])
+    self.services.issue.issue2label_tbl.Delete(self.cnxn, issue_id=[1, 2])
+    self.services.issue.issue2component_tbl.Delete(self.cnxn, issue_id=[1, 2])
+    self.services.issue.issue2cc_tbl.Delete(self.cnxn, issue_id=[1, 2])
+    self.services.issue.issue2notify_tbl.Delete(self.cnxn, issue_id=[1, 2])
+    self.services.issue.issueupdate_tbl.Delete(self.cnxn, issue_id=[1, 2])
+    self.services.issue.attachment_tbl.Delete(self.cnxn, issue_id=[1, 2])
+    self.services.issue.comment_tbl.Delete(self.cnxn, issue_id=[1, 2])
+    self.services.issue.issuerelation_tbl.Delete(self.cnxn, issue_id=[1, 2])
+    self.services.issue.issuerelation_tbl.Delete(self.cnxn, dst_issue_id=[1, 2])
+    self.services.issue.danglingrelation_tbl.Delete(self.cnxn, issue_id=[1, 2])
+    self.services.issue.issueformerlocations_tbl.Delete(
+        self.cnxn, issue_id=[1, 2])
+    self.services.issue.reindexqueue_tbl.Delete(self.cnxn, issue_id=[1, 2])
+    self.services.issue.issue_tbl.Delete(self.cnxn, id=[1, 2])
+
+    self.mox.ReplayAll()
+    self.services.issue.ExpungeIssues(self.cnxn, issue_ids)
+    self.mox.VerifyAll()
+
+  def testSoftDeleteIssue(self):
+    project = fake.Project(project_id=789)
+    issue_1, issue_2 = self.SetUpGetIssues()
+    self.services.issue.issue_2lc = TestableIssueTwoLevelCache(
+        [issue_1, issue_2])
+    self.services.issue.issue_id_2lc.CacheItem((789, 1), 78901)
+    delta = {'deleted': True}
+    self.services.issue.issue_tbl.Update(
+        self.cnxn, delta, id=78901, commit=False)
+
+    self.services.chart.StoreIssueSnapshots(self.cnxn, mox.IgnoreArg(),
+        commit=False)
+
+    self.cnxn.Commit()
+    self.mox.ReplayAll()
+    self.services.issue.SoftDeleteIssue(
+        self.cnxn, project.project_id, 1, True, self.services.user)
+    self.mox.VerifyAll()
+    self.assertTrue(issue_1.deleted)
+
+  def SetUpDeleteComponentReferences(self, component_id):
+    self.services.issue.issue2component_tbl.Delete(
+      self.cnxn, component_id=component_id)
+
+  def testDeleteComponentReferences(self):
+    self.SetUpDeleteComponentReferences(123)
+    self.mox.ReplayAll()
+    self.services.issue.DeleteComponentReferences(self.cnxn, 123)
+    self.mox.VerifyAll()
+
+  ### Local ID generation
+
+  def SetUpInitializeLocalID(self, project_id):
+    self.services.issue.localidcounter_tbl.InsertRow(
+        self.cnxn, project_id=project_id, used_local_id=0, used_spam_id=0)
+
+  def testInitializeLocalID(self):
+    self.SetUpInitializeLocalID(789)
+    self.mox.ReplayAll()
+    self.services.issue.InitializeLocalID(self.cnxn, 789)
+    self.mox.VerifyAll()
+
+  def SetUpAllocateNextLocalID(
+      self, project_id, highest_in_use, highest_former):
+    highest_either = max(highest_in_use or 0, highest_former or 0)
+    self.services.issue.localidcounter_tbl.IncrementCounterValue(
+        self.cnxn, 'used_local_id', project_id=project_id).AndReturn(
+            highest_either + 1)
+
+  def testAllocateNextLocalID_NewProject(self):
+    self.SetUpAllocateNextLocalID(789, None, None)
+    self.mox.ReplayAll()
+    next_local_id = self.services.issue.AllocateNextLocalID(self.cnxn, 789)
+    self.mox.VerifyAll()
+    self.assertEqual(1, next_local_id)
+
+  def testAllocateNextLocalID_HighestInUse(self):
+    self.SetUpAllocateNextLocalID(789, 14, None)
+    self.mox.ReplayAll()
+    next_local_id = self.services.issue.AllocateNextLocalID(self.cnxn, 789)
+    self.mox.VerifyAll()
+    self.assertEqual(15, next_local_id)
+
+  def testAllocateNextLocalID_HighestWasMoved(self):
+    self.SetUpAllocateNextLocalID(789, 23, 66)
+    self.mox.ReplayAll()
+    next_local_id = self.services.issue.AllocateNextLocalID(self.cnxn, 789)
+    self.mox.VerifyAll()
+    self.assertEqual(67, next_local_id)
+
+  def SetUpGetHighestLocalID(self, project_id, highest_in_use, highest_former):
+    self.services.issue.issue_tbl.SelectValue(
+        self.cnxn, 'MAX(local_id)', project_id=project_id).AndReturn(
+            highest_in_use)
+    self.services.issue.issueformerlocations_tbl.SelectValue(
+        self.cnxn, 'MAX(local_id)', project_id=project_id).AndReturn(
+            highest_former)
+
+  def testGetHighestLocalID_OnlyActiveLocalIDs(self):
+    self.SetUpGetHighestLocalID(789, 14, None)
+    self.mox.ReplayAll()
+    highest_id = self.services.issue.GetHighestLocalID(self.cnxn, 789)
+    self.mox.VerifyAll()
+    self.assertEqual(14, highest_id)
+
+  def testGetHighestLocalID_OnlyFormerIDs(self):
+    self.SetUpGetHighestLocalID(789, None, 97)
+    self.mox.ReplayAll()
+    highest_id = self.services.issue.GetHighestLocalID(self.cnxn, 789)
+    self.mox.VerifyAll()
+    self.assertEqual(97, highest_id)
+
+  def testGetHighestLocalID_BothActiveAndFormer(self):
+    self.SetUpGetHighestLocalID(789, 345, 97)
+    self.mox.ReplayAll()
+    highest_id = self.services.issue.GetHighestLocalID(self.cnxn, 789)
+    self.mox.VerifyAll()
+    self.assertEqual(345, highest_id)
+
+  def testGetAllLocalIDsInProject(self):
+    self.SetUpGetHighestLocalID(789, 14, None)
+    self.mox.ReplayAll()
+    local_id_range = self.services.issue.GetAllLocalIDsInProject(self.cnxn, 789)
+    self.mox.VerifyAll()
+    self.assertEqual(list(range(1, 15)), local_id_range)
+
+  ### Comments
+
+  def testConsolidateAmendments_Empty(self):
+    amendments = []
+    actual = self.services.issue._ConsolidateAmendments(amendments)
+    self.assertEqual([], actual)
+
+  def testConsolidateAmendments_NoOp(self):
+    amendments = [
+      tracker_pb2.Amendment(field=tracker_pb2.FieldID('SUMMARY'),
+                            oldvalue='old sum', newvalue='new sum'),
+      tracker_pb2.Amendment(field=tracker_pb2.FieldID('STATUS'),
+                            oldvalue='New', newvalue='Accepted')]
+    actual = self.services.issue._ConsolidateAmendments(amendments)
+    self.assertEqual(amendments, actual)
+
+  def testConsolidateAmendments_StandardFields(self):
+    amendments = [
+      tracker_pb2.Amendment(field=tracker_pb2.FieldID('STATUS'),
+                            oldvalue='New'),
+      tracker_pb2.Amendment(field=tracker_pb2.FieldID('STATUS'),
+                            newvalue='Accepted'),
+      tracker_pb2.Amendment(field=tracker_pb2.FieldID('SUMMARY'),
+                            oldvalue='old sum'),
+      tracker_pb2.Amendment(field=tracker_pb2.FieldID('SUMMARY'),
+                            newvalue='new sum')]
+    actual = self.services.issue._ConsolidateAmendments(amendments)
+
+    expected = [
+      tracker_pb2.Amendment(field=tracker_pb2.FieldID('SUMMARY'),
+                            oldvalue='old sum', newvalue='new sum'),
+      tracker_pb2.Amendment(field=tracker_pb2.FieldID('STATUS'),
+                            oldvalue='New', newvalue='Accepted')]
+    self.assertEqual(expected, actual)
+
+  def testConsolidateAmendments_BlockerRelations(self):
+    amendments = [
+        tracker_pb2.Amendment(
+            field=tracker_pb2.FieldID('BLOCKEDON'), newvalue='78901'),
+        tracker_pb2.Amendment(
+            field=tracker_pb2.FieldID('BLOCKEDON'), newvalue='-b/3 b/1 b/2'),
+        tracker_pb2.Amendment(
+            field=tracker_pb2.FieldID('BLOCKING'), newvalue='78902'),
+        tracker_pb2.Amendment(
+            field=tracker_pb2.FieldID('BLOCKING'), newvalue='-b/33 b/11 b/22')
+    ]
+
+    actual = self.services.issue._ConsolidateAmendments(amendments)
+
+    expected = [
+        tracker_pb2.Amendment(
+            field=tracker_pb2.FieldID('BLOCKEDON'),
+            newvalue='78901 -b/3 b/1 b/2'),
+        tracker_pb2.Amendment(
+            field=tracker_pb2.FieldID('BLOCKING'),
+            newvalue='78902 -b/33 b/11 b/22')
+    ]
+    self.assertEqual(expected, actual)
+
+  def testConsolidateAmendments_CustomFields(self):
+    amendments = [
+      tracker_pb2.Amendment(field=tracker_pb2.FieldID('CUSTOM'),
+                            custom_field_name='a', oldvalue='old a'),
+      tracker_pb2.Amendment(field=tracker_pb2.FieldID('CUSTOM'),
+                            custom_field_name='b', oldvalue='old b')]
+    actual = self.services.issue._ConsolidateAmendments(amendments)
+    self.assertEqual(amendments, actual)
+
+  def testConsolidateAmendments_SortAmmendments(self):
+    amendments = [
+        tracker_pb2.Amendment(field=tracker_pb2.FieldID('STATUS'),
+                                oldvalue='New', newvalue='Accepted'),
+        tracker_pb2.Amendment(field=tracker_pb2.FieldID('SUMMARY'),
+                                oldvalue='old sum', newvalue='new sum'),
+        tracker_pb2.Amendment(field=tracker_pb2.FieldID('LABELS'),
+            oldvalue='Type-Defect', newvalue='-Type-Defect Type-Enhancement'),
+        tracker_pb2.Amendment(field=tracker_pb2.FieldID('CC'),
+                        oldvalue='a@google.com', newvalue='b@google.com')]
+    expected = [
+        tracker_pb2.Amendment(field=tracker_pb2.FieldID('SUMMARY'),
+                                oldvalue='old sum', newvalue='new sum'),
+        tracker_pb2.Amendment(field=tracker_pb2.FieldID('STATUS'),
+                                oldvalue='New', newvalue='Accepted'),
+        tracker_pb2.Amendment(field=tracker_pb2.FieldID('CC'),
+                        oldvalue='a@google.com', newvalue='b@google.com'),
+        tracker_pb2.Amendment(field=tracker_pb2.FieldID('LABELS'),
+            oldvalue='Type-Defect', newvalue='-Type-Defect Type-Enhancement')]
+    actual = self.services.issue._ConsolidateAmendments(amendments)
+    self.assertEqual(expected, actual)
+
+  def testDeserializeComments_Empty(self):
+    comments = self.services.issue._DeserializeComments([], [], [], [], [], [])
+    self.assertEqual([], comments)
+
+  def SetUpCommentRows(self):
+    comment_rows = [
+        (7890101, 78901, self.now, 789, 111,
+         None, False, False, 'unused_commentcontent_id'),
+        (7890102, 78901, self.now, 789, 111,
+         None, False, False, 'unused_commentcontent_id')]
+    commentcontent_rows = [(7890101, 'content', 'msg'),
+                           (7890102, 'content2', 'msg')]
+    amendment_rows = [
+        (1, 78901, 7890101, 'cc', 'old', 'new val', 222, None, None)]
+    attachment_rows = []
+    approval_rows = [(23, 7890102)]
+    importer_rows = []
+    return (comment_rows, commentcontent_rows, amendment_rows,
+            attachment_rows, approval_rows, importer_rows)
+
+  def testDeserializeComments_Normal(self):
+    (comment_rows, commentcontent_rows, amendment_rows,
+     attachment_rows, approval_rows, importer_rows) = self.SetUpCommentRows()
+    commentcontent_rows = [(7890101, 'content', 'msg')]
+    comments = self.services.issue._DeserializeComments(
+        comment_rows, commentcontent_rows, amendment_rows, attachment_rows,
+        approval_rows, importer_rows)
+    self.assertEqual(2, len(comments))
+
+  def testDeserializeComments_Imported(self):
+    (comment_rows, commentcontent_rows, amendment_rows,
+     attachment_rows, approval_rows, _) = self.SetUpCommentRows()
+    importer_rows = [(7890101, 222)]
+    commentcontent_rows = [(7890101, 'content', 'msg')]
+    comments = self.services.issue._DeserializeComments(
+        comment_rows, commentcontent_rows, amendment_rows, attachment_rows,
+        approval_rows, importer_rows)
+    self.assertEqual(2, len(comments))
+    self.assertEqual(222, comments[0].importer_id)
+
+  def MockTheRestOfGetCommentsByID(self, comment_ids):
+    self.services.issue.commentcontent_tbl.Select = Mock(
+        return_value=[
+            (cid + 5000, 'content', None) for cid in comment_ids])
+    self.services.issue.issueupdate_tbl.Select = Mock(
+        return_value=[])
+    self.services.issue.attachment_tbl.Select = Mock(
+        return_value=[])
+    self.services.issue.issueapproval2comment_tbl.Select = Mock(
+        return_value=[])
+    self.services.issue.commentimporter_tbl.Select = Mock(
+        return_value=[])
+
+  def testGetCommentsByID_Normal(self):
+    """We can load comments by comment_ids."""
+    comment_ids = [101001, 101002, 101003]
+    self.services.issue.comment_tbl.Select = Mock(
+        return_value=[
+            (cid, cid - cid % 100, self.now, 789, 111,
+             None, False, False, cid + 5000)
+            for cid in comment_ids])
+    self.MockTheRestOfGetCommentsByID(comment_ids)
+
+    comments = self.services.issue.GetCommentsByID(
+        self.cnxn, comment_ids, [0, 1, 2])
+
+    self.services.issue.comment_tbl.Select.assert_called_with(
+        self.cnxn, cols=issue_svc.COMMENT_COLS,
+        id=comment_ids, shard_id=ANY)
+
+    self.assertEqual(3, len(comments))
+
+  def testGetCommentsByID_CacheReplicationLag(self):
+    self._testGetCommentsByID_ReplicationLag(True)
+
+  def testGetCommentsByID_NoCacheReplicationLag(self):
+    self._testGetCommentsByID_ReplicationLag(False)
+
+  def _testGetCommentsByID_ReplicationLag(self, use_cache):
+    """If not all comments are on the replica, we try the primary DB."""
+    comment_ids = [101001, 101002, 101003]
+    replica_comment_ids = comment_ids[:-1]
+
+    return_value_1 = [
+      (cid, cid - cid % 100, self.now, 789, 111,
+       None, False, False, cid + 5000)
+      for cid in replica_comment_ids]
+    return_value_2 = [
+      (cid, cid - cid % 100, self.now, 789, 111,
+       None, False, False, cid + 5000)
+      for cid in comment_ids]
+    return_values = [return_value_1, return_value_2]
+    self.services.issue.comment_tbl.Select = Mock(
+        side_effect=lambda *_args, **_kwargs: return_values.pop(0))
+
+    self.MockTheRestOfGetCommentsByID(comment_ids)
+
+    comments = self.services.issue.GetCommentsByID(
+        self.cnxn, comment_ids, [0, 1, 2], use_cache=use_cache)
+
+    self.services.issue.comment_tbl.Select.assert_called_with(
+        self.cnxn, cols=issue_svc.COMMENT_COLS,
+        id=comment_ids, shard_id=ANY)
+    self.services.issue.comment_tbl.Select.assert_called_with(
+        self.cnxn, cols=issue_svc.COMMENT_COLS,
+        id=comment_ids, shard_id=ANY)
+    self.assertEqual(3, len(comments))
+
+  def SetUpGetComments(self, issue_ids):
+    # Assumes one comment per issue.
+    cids = [issue_id + 1000 for issue_id in issue_ids]
+    self.services.issue.comment_tbl.Select(
+        self.cnxn, cols=issue_svc.COMMENT_COLS,
+        where=None, issue_id=issue_ids, order_by=[('created', [])],
+        shard_id=mox.IsA(int)).AndReturn([
+            (issue_id + 1000, issue_id, self.now, 789, 111,
+             None, False, False, issue_id + 5000)
+            for issue_id in issue_ids])
+    self.services.issue.commentcontent_tbl.Select(
+        self.cnxn, cols=issue_svc.COMMENTCONTENT_COLS,
+        id=[issue_id + 5000 for issue_id in issue_ids],
+        shard_id=mox.IsA(int)).AndReturn([
+        (issue_id + 5000, 'content', None) for issue_id in issue_ids])
+    self.services.issue.issueapproval2comment_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUEAPPROVAL2COMMENT_COLS,
+        comment_id=cids).AndReturn([
+            (23, cid) for cid in cids])
+
+    # Assume no amendments or attachment for now.
+    self.services.issue.issueupdate_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUEUPDATE_COLS,
+        comment_id=cids, shard_id=mox.IsA(int)).AndReturn([])
+    attachment_rows = []
+    if issue_ids:
+      attachment_rows = [
+          (1234, issue_ids[0], cids[0], 'a_filename', 1024, 'text/plain',
+           False, None)]
+
+    self.services.issue.attachment_tbl.Select(
+        self.cnxn, cols=issue_svc.ATTACHMENT_COLS,
+        comment_id=cids, shard_id=mox.IsA(int)).AndReturn(attachment_rows)
+
+    self.services.issue.commentimporter_tbl.Select(
+        self.cnxn, cols=issue_svc.COMMENTIMPORTER_COLS,
+        comment_id=cids, shard_id=mox.IsA(int)).AndReturn([])
+
+  def testGetComments_Empty(self):
+    self.SetUpGetComments([])
+    self.mox.ReplayAll()
+    comments = self.services.issue.GetComments(
+        self.cnxn, issue_id=[])
+    self.mox.VerifyAll()
+    self.assertEqual(0, len(comments))
+
+  def testGetComments_Normal(self):
+    self.SetUpGetComments([100001, 100002])
+    self.mox.ReplayAll()
+    comments = self.services.issue.GetComments(
+        self.cnxn, issue_id=[100001, 100002])
+    self.mox.VerifyAll()
+    self.assertEqual(2, len(comments))
+    self.assertEqual('content', comments[0].content)
+    self.assertEqual('content', comments[1].content)
+    self.assertEqual(23, comments[0].approval_id)
+    self.assertEqual(23, comments[1].approval_id)
+
+  def SetUpGetComment_Found(self, comment_id):
+    # Assumes one comment per issue.
+    commentcontent_id = comment_id * 10
+    self.services.issue.comment_tbl.Select(
+        self.cnxn, cols=issue_svc.COMMENT_COLS,
+        where=None, id=comment_id, order_by=[('created', [])],
+        shard_id=mox.IsA(int)).AndReturn([
+            (comment_id, int(comment_id // 100), self.now, 789, 111,
+             None, False, True, commentcontent_id)])
+    self.services.issue.commentcontent_tbl.Select(
+        self.cnxn, cols=issue_svc.COMMENTCONTENT_COLS,
+        id=[commentcontent_id], shard_id=mox.IsA(int)).AndReturn([
+            (commentcontent_id, 'content', None)])
+    self.services.issue.issueapproval2comment_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUEAPPROVAL2COMMENT_COLS,
+        comment_id=[comment_id]).AndReturn([(23, comment_id)])
+    # Assume no amendments or attachment for now.
+    self.services.issue.issueupdate_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUEUPDATE_COLS,
+        comment_id=[comment_id], shard_id=mox.IsA(int)).AndReturn([])
+    self.services.issue.attachment_tbl.Select(
+        self.cnxn, cols=issue_svc.ATTACHMENT_COLS,
+        comment_id=[comment_id], shard_id=mox.IsA(int)).AndReturn([])
+    self.services.issue.commentimporter_tbl.Select(
+        self.cnxn, cols=issue_svc.COMMENTIMPORTER_COLS,
+        comment_id=[comment_id], shard_id=mox.IsA(int)).AndReturn([])
+
+  def testGetComment_Found(self):
+    self.SetUpGetComment_Found(7890101)
+    self.mox.ReplayAll()
+    comment = self.services.issue.GetComment(self.cnxn, 7890101)
+    self.mox.VerifyAll()
+    self.assertEqual('content', comment.content)
+    self.assertEqual(23, comment.approval_id)
+
+  def SetUpGetComment_Missing(self, comment_id):
+    # Assumes one comment per issue.
+    self.services.issue.comment_tbl.Select(
+        self.cnxn, cols=issue_svc.COMMENT_COLS,
+        where=None, id=comment_id, order_by=[('created', [])],
+        shard_id=mox.IsA(int)).AndReturn([])
+    self.services.issue.commentcontent_tbl.Select(
+        self.cnxn, cols=issue_svc.COMMENTCONTENT_COLS,
+        id=[], shard_id=mox.IsA(int)).AndReturn([])
+    self.services.issue.issueapproval2comment_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUEAPPROVAL2COMMENT_COLS,
+        comment_id=[]).AndReturn([])
+    # Assume no amendments or attachment for now.
+    self.services.issue.issueupdate_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUEUPDATE_COLS,
+        comment_id=[], shard_id=mox.IsA(int)).AndReturn([])
+    self.services.issue.attachment_tbl.Select(
+        self.cnxn, cols=issue_svc.ATTACHMENT_COLS, comment_id=[],
+        shard_id=mox.IsA(int)).AndReturn([])
+    self.services.issue.commentimporter_tbl.Select(
+        self.cnxn, cols=issue_svc.COMMENTIMPORTER_COLS,
+        comment_id=[], shard_id=mox.IsA(int)).AndReturn([])
+
+  def testGetComment_Missing(self):
+    self.SetUpGetComment_Missing(7890101)
+    self.mox.ReplayAll()
+    self.assertRaises(
+        exceptions.NoSuchCommentException,
+        self.services.issue.GetComment, self.cnxn, 7890101)
+    self.mox.VerifyAll()
+
+  def testGetCommentsForIssue(self):
+    issue = fake.MakeTestIssue(789, 1, 'Summary', 'New', 111)
+    self.SetUpGetComments([issue.issue_id])
+    self.mox.ReplayAll()
+    self.services.issue.GetCommentsForIssue(self.cnxn, issue.issue_id)
+    self.mox.VerifyAll()
+
+  def testGetCommentsForIssues(self):
+    self.SetUpGetComments([100001, 100002])
+    self.mox.ReplayAll()
+    self.services.issue.GetCommentsForIssues(
+        self.cnxn, issue_ids=[100001, 100002])
+    self.mox.VerifyAll()
+
+  def SetUpInsertComment(
+      self, comment_id, is_spam=False, is_description=False, approval_id=None,
+          content=None, amendment_rows=None, commit=True):
+    content = content or 'content'
+    commentcontent_id = comment_id * 10
+    self.services.issue.commentcontent_tbl.InsertRow(
+        self.cnxn, content=content,
+        inbound_message=None, commit=False).AndReturn(commentcontent_id)
+    self.services.issue.comment_tbl.InsertRow(
+        self.cnxn, issue_id=78901, created=self.now, project_id=789,
+        commenter_id=111, deleted_by=None, is_spam=is_spam,
+        is_description=is_description, commentcontent_id=commentcontent_id,
+        commit=False).AndReturn(comment_id)
+
+    amendment_rows = amendment_rows or []
+    self.services.issue.issueupdate_tbl.InsertRows(
+        self.cnxn, issue_svc.ISSUEUPDATE_COLS[1:], amendment_rows,
+        commit=False)
+
+    attachment_rows = []
+    self.services.issue.attachment_tbl.InsertRows(
+        self.cnxn, issue_svc.ATTACHMENT_COLS[1:], attachment_rows,
+        commit=False)
+
+    if approval_id:
+      self.services.issue.issueapproval2comment_tbl.InsertRows(
+          self.cnxn, issue_svc.ISSUEAPPROVAL2COMMENT_COLS,
+          [(approval_id, comment_id)], commit=False)
+
+    if commit:
+      self.cnxn.Commit()
+
+  def testInsertComment(self):
+    self.SetUpInsertComment(7890101, approval_id=23)
+    self.mox.ReplayAll()
+    comment = tracker_pb2.IssueComment(
+        issue_id=78901, timestamp=self.now, project_id=789, user_id=111,
+        content='content', approval_id=23)
+    self.services.issue.InsertComment(self.cnxn, comment, commit=True)
+    self.mox.VerifyAll()
+    self.assertEqual(7890101, comment.id)
+
+  def SetUpUpdateComment(self, comment_id, delta=None):
+    delta = delta or {
+        'commenter_id': 111,
+        'deleted_by': 222,
+        'is_spam': False,
+        }
+    self.services.issue.comment_tbl.Update(
+        self.cnxn, delta, id=comment_id)
+
+  def testUpdateComment(self):
+    self.SetUpUpdateComment(7890101)
+    self.mox.ReplayAll()
+    comment = tracker_pb2.IssueComment(
+        id=7890101, issue_id=78901, timestamp=self.now, project_id=789,
+        user_id=111, content='new content', deleted_by=222,
+        is_spam=False)
+    self.services.issue._UpdateComment(self.cnxn, comment)
+    self.mox.VerifyAll()
+
+  def testMakeIssueComment(self):
+    comment = self.services.issue._MakeIssueComment(
+        789, 111, 'content', timestamp=self.now, approval_id=23,
+        importer_id=222)
+    self.assertEqual('content', comment.content)
+    self.assertEqual([], comment.amendments)
+    self.assertEqual([], comment.attachments)
+    self.assertEqual(comment.approval_id, 23)
+    self.assertEqual(222, comment.importer_id)
+
+  def testMakeIssueComment_NonAscii(self):
+    _ = self.services.issue._MakeIssueComment(
+        789, 111, 'content', timestamp=self.now,
+        inbound_message=u'sent by написа')
+
+  def testCreateIssueComment_Normal(self):
+    issue_1, _issue_2 = self.SetUpGetIssues()
+    self.services.issue.issue_id_2lc.CacheItem((789, 1), 78901)
+    self.SetUpInsertComment(7890101, approval_id=24)
+    self.mox.ReplayAll()
+    comment = self.services.issue.CreateIssueComment(
+        self.cnxn, issue_1, 111, 'content', timestamp=self.now, approval_id=24)
+    self.mox.VerifyAll()
+    self.assertEqual('content', comment.content)
+
+  def testCreateIssueComment_EditDescription(self):
+    issue_1, _issue_2 = self.SetUpGetIssues()
+    self.services.issue.issue_id_2lc.CacheItem((789, 1), 78901)
+    self.services.issue.attachment_tbl.Select(
+        self.cnxn, cols=issue_svc.ATTACHMENT_COLS, id=[123])
+    self.SetUpInsertComment(7890101, is_description=True)
+    self.mox.ReplayAll()
+
+    comment = self.services.issue.CreateIssueComment(
+        self.cnxn, issue_1, 111, 'content', is_description=True,
+        kept_attachments=[123], timestamp=self.now)
+    self.mox.VerifyAll()
+    self.assertEqual('content', comment.content)
+
+  def testCreateIssueComment_Spam(self):
+    issue_1, _issue_2 = self.SetUpGetIssues()
+    self.services.issue.issue_id_2lc.CacheItem((789, 1), 78901)
+    self.SetUpInsertComment(7890101, is_spam=True)
+    self.mox.ReplayAll()
+    comment = self.services.issue.CreateIssueComment(
+        self.cnxn, issue_1, 111, 'content', timestamp=self.now, is_spam=True)
+    self.mox.VerifyAll()
+    self.assertEqual('content', comment.content)
+    self.assertTrue(comment.is_spam)
+
+  def testSoftDeleteComment(self):
+    """Deleting a comment with an attachment marks it and updates count."""
+    issue_1, issue_2 = self.SetUpGetIssues()
+    self.services.issue.issue_2lc = TestableIssueTwoLevelCache(
+        [issue_1, issue_2])
+    issue_1.attachment_count = 1
+    issue_1.assume_stale = False
+    comment = tracker_pb2.IssueComment(id=7890101)
+    comment.attachments = [tracker_pb2.Attachment()]
+    self.services.issue.issue_id_2lc.CacheItem((789, 1), 78901)
+    self.SetUpUpdateComment(
+        comment.id, delta={'deleted_by': 222, 'is_spam': False})
+    self.SetUpUpdateIssues(given_delta={'attachment_count': 0})
+    self.SetUpEnqueueIssuesForIndexing([78901])
+    self.mox.ReplayAll()
+    self.services.issue.SoftDeleteComment(
+        self.cnxn, issue_1, comment, 222, self.services.user)
+    self.mox.VerifyAll()
+
+  ### Approvals
+
+  def testGetIssueApproval(self):
+    av_24 = tracker_pb2.ApprovalValue(approval_id=24)
+    av_25 = tracker_pb2.ApprovalValue(approval_id=25)
+    issue_1 = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901, approval_values=[av_24, av_25])
+    issue_1.project_name = 'proj'
+    self.services.issue.issue_2lc.CacheItem(78901, issue_1)
+
+    issue, actual_approval_value = self.services.issue.GetIssueApproval(
+        self.cnxn, issue_1.issue_id, av_24.approval_id)
+
+    self.assertEqual(av_24, actual_approval_value)
+    self.assertEqual(issue, issue_1)
+
+  def testGetIssueApproval_NoSuchApproval(self):
+    issue_1 = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901)
+    issue_1.project_name = 'proj'
+    self.services.issue.issue_2lc.CacheItem(78901, issue_1)
+    self.assertRaises(
+        exceptions.NoSuchIssueApprovalException,
+        self.services.issue.GetIssueApproval,
+        self.cnxn, issue_1.issue_id, 24)
+
+  def testDeltaUpdateIssueApproval(self):
+    config = self.services.config.GetProjectConfig(
+        self.cnxn, 789)
+    config.field_defs = [
+      tracker_pb2.FieldDef(
+        field_id=1, project_id=789, field_name='EstDays',
+        field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        applicable_type=''),
+      tracker_pb2.FieldDef(
+        field_id=2, project_id=789, field_name='Tag',
+        field_type=tracker_pb2.FieldTypes.STR_TYPE,
+        applicable_type=''),
+        ]
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, summary='summary', status='New',
+        owner_id=999, issue_id=78901, labels=['noodle-puppies'])
+    av = tracker_pb2.ApprovalValue(approval_id=23)
+    final_av = tracker_pb2.ApprovalValue(
+        approval_id=23, setter_id=111, set_on=1234,
+        status=tracker_pb2.ApprovalStatus.REVIEW_REQUESTED,
+        approver_ids=[222, 444])
+    labels_add = ['snakes-are']
+    label_id = 1001
+    labels_remove = ['noodle-puppies']
+    amendments = [
+        tracker_bizobj.MakeApprovalStatusAmendment(
+            tracker_pb2.ApprovalStatus.REVIEW_REQUESTED),
+        tracker_bizobj.MakeApprovalApproversAmendment([222, 444], []),
+        tracker_bizobj.MakeFieldAmendment(1, config, [4], []),
+        tracker_bizobj.MakeFieldClearedAmendment(2, config),
+        tracker_bizobj.MakeLabelsAmendment(labels_add, labels_remove)
+    ]
+    approval_delta = tracker_pb2.ApprovalDelta(
+        status=tracker_pb2.ApprovalStatus.REVIEW_REQUESTED,
+        approver_ids_add=[222, 444], set_on=1234,
+        subfield_vals_add=[
+          tracker_bizobj.MakeFieldValue(1, 4, None, None, None, None, False)
+          ],
+        labels_add=labels_add,
+        labels_remove=labels_remove,
+        subfields_clear=[2]
+    )
+
+    self.services.issue.issue2approvalvalue_tbl.Update = Mock()
+    self.services.issue.issueapproval2approver_tbl.Delete = Mock()
+    self.services.issue.issueapproval2approver_tbl.InsertRows = Mock()
+    self.services.issue.issue2fieldvalue_tbl.Delete = Mock()
+    self.services.issue.issue2fieldvalue_tbl.InsertRows = Mock()
+    self.services.issue.issue2label_tbl.Delete = Mock()
+    self.services.issue.issue2label_tbl.InsertRows = Mock()
+    self.services.issue.CreateIssueComment = Mock()
+    self.services.config.LookupLabelID = Mock(return_value=label_id)
+    shard = issue.issue_id % settings.num_logical_shards
+    fv_rows = [(78901, 1, 4, None, None, None, None, False, None, shard)]
+    label_rows = [(78901, label_id, False, shard)]
+
+    self.services.issue.DeltaUpdateIssueApproval(
+        self.cnxn, 111, config, issue, av, approval_delta, 'some comment',
+        attachments=[], commit=False, kept_attachments=[1, 2, 3])
+
+    self.assertEqual(av, final_av)
+
+    self.services.issue.issue2approvalvalue_tbl.Update.assert_called_once_with(
+        self.cnxn,
+        {'status': 'review_requested', 'setter_id': 111, 'set_on': 1234},
+        approval_id=23, issue_id=78901, commit=False)
+    self.services.issue.issueapproval2approver_tbl.\
+        Delete.assert_called_once_with(
+            self.cnxn, issue_id=78901, approval_id=23, commit=False)
+    self.services.issue.issueapproval2approver_tbl.\
+        InsertRows.assert_called_once_with(
+            self.cnxn, issue_svc.ISSUEAPPROVAL2APPROVER_COLS,
+            [(23, 222, 78901), (23, 444, 78901)], commit=False)
+    self.services.issue.issue2fieldvalue_tbl.\
+        Delete.assert_called_once_with(
+            self.cnxn, issue_id=[78901], commit=False)
+    self.services.issue.issue2fieldvalue_tbl.\
+        InsertRows.assert_called_once_with(
+            self.cnxn, issue_svc.ISSUE2FIELDVALUE_COLS + ['issue_shard'],
+            fv_rows, commit=False)
+    self.services.issue.issue2label_tbl.\
+        Delete.assert_called_once_with(
+            self.cnxn, issue_id=[78901], commit=False)
+    self.services.issue.issue2label_tbl.\
+        InsertRows.assert_called_once_with(
+            self.cnxn, issue_svc.ISSUE2LABEL_COLS + ['issue_shard'],
+            label_rows, ignore=True, commit=False)
+    self.services.issue.CreateIssueComment.assert_called_once_with(
+        self.cnxn, issue, 111, 'some comment', amendments=amendments,
+        approval_id=23, is_description=False, attachments=[], commit=False,
+        kept_attachments=[1, 2, 3])
+
+  def testDeltaUpdateIssueApproval_IsDescription(self):
+    config = self.services.config.GetProjectConfig(
+        self.cnxn, 789)
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, summary='summary', status='New',
+        owner_id=999, issue_id=78901)
+    av = tracker_pb2.ApprovalValue(approval_id=23)
+    approval_delta = tracker_pb2.ApprovalDelta()
+
+    self.services.issue.CreateIssueComment = Mock()
+
+    self.services.issue.DeltaUpdateIssueApproval(
+        self.cnxn, 111, config, issue, av, approval_delta, 'better response',
+        is_description=True, commit=False)
+
+    self.services.issue.CreateIssueComment.assert_called_once_with(
+        self.cnxn, issue, 111, 'better response', amendments=[],
+        approval_id=23, is_description=True, attachments=None, commit=False,
+        kept_attachments=None)
+
+  def testUpdateIssueApprovalStatus(self):
+    av = tracker_pb2.ApprovalValue(approval_id=23, setter_id=111, set_on=1234)
+
+    self.services.issue.issue2approvalvalue_tbl.Update(
+        self.cnxn, {'status': 'not_set', 'setter_id': 111, 'set_on': 1234},
+        approval_id=23, issue_id=78901, commit=False)
+
+    self.mox.ReplayAll()
+    self.services.issue._UpdateIssueApprovalStatus(
+        self.cnxn, 78901, av.approval_id, av.status,
+        av.setter_id, av.set_on)
+    self.mox.VerifyAll()
+
+  def testUpdateIssueApprovalApprovers(self):
+    self.services.issue.issueapproval2approver_tbl.Delete(
+        self.cnxn, issue_id=78901, approval_id=23, commit=False)
+    self.services.issue.issueapproval2approver_tbl.InsertRows(
+        self.cnxn, issue_svc.ISSUEAPPROVAL2APPROVER_COLS,
+        [(23, 111, 78901), (23, 222, 78901), (23, 444, 78901)], commit=False)
+
+    self.mox.ReplayAll()
+    self.services.issue._UpdateIssueApprovalApprovers(
+        self.cnxn, 78901, 23, [111, 222, 444])
+    self.mox.VerifyAll()
+
+  ### Attachments
+
+  def testGetAttachmentAndContext(self):
+    # TODO(jrobbins): re-implemnent to use Google Cloud Storage.
+    pass
+
+  def SetUpUpdateAttachment(self, comment_id, attachment_id, delta):
+    self.services.issue.attachment_tbl.Update(
+        self.cnxn, delta, id=attachment_id)
+    self.services.issue.comment_2lc.InvalidateKeys(
+        self.cnxn, [comment_id])
+
+
+  def testUpdateAttachment(self):
+    delta = {
+        'filename': 'a_filename',
+        'filesize': 1024,
+        'mimetype': 'text/plain',
+        'deleted': False,
+        }
+    self.SetUpUpdateAttachment(5678, 1234, delta)
+    self.mox.ReplayAll()
+    attach = tracker_pb2.Attachment(
+        attachment_id=1234, filename='a_filename', filesize=1024,
+        mimetype='text/plain')
+    comment = tracker_pb2.IssueComment(id=5678)
+    self.services.issue._UpdateAttachment(self.cnxn, comment, attach)
+    self.mox.VerifyAll()
+
+  def testStoreAttachmentBlob(self):
+    # TODO(jrobbins): re-implemnent to use Google Cloud Storage.
+    pass
+
+  def testSoftDeleteAttachment(self):
+    issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    issue.assume_stale = False
+    issue.attachment_count = 1
+
+    comment = tracker_pb2.IssueComment(
+        project_id=789, content='soon to be deleted', user_id=111,
+        issue_id=issue.issue_id)
+    attachment = tracker_pb2.Attachment(
+        attachment_id=1234)
+    comment.attachments.append(attachment)
+
+    self.SetUpUpdateAttachment(179901, 1234, {'deleted': True})
+    self.SetUpUpdateIssues(given_delta={'attachment_count': 0})
+    self.SetUpEnqueueIssuesForIndexing([78901])
+
+    self.mox.ReplayAll()
+    self.services.issue.SoftDeleteAttachment(
+        self.cnxn, issue, comment, 1234, self.services.user)
+    self.mox.VerifyAll()
+
+  ### Reindex queue
+
+  def SetUpEnqueueIssuesForIndexing(self, issue_ids):
+    reindex_rows = [(issue_id,) for issue_id in issue_ids]
+    self.services.issue.reindexqueue_tbl.InsertRows(
+        self.cnxn, ['issue_id'], reindex_rows, ignore=True, commit=True)
+
+  def testEnqueueIssuesForIndexing(self):
+    self.SetUpEnqueueIssuesForIndexing([78901])
+    self.mox.ReplayAll()
+    self.services.issue.EnqueueIssuesForIndexing(self.cnxn, [78901])
+    self.mox.VerifyAll()
+
+  def SetUpReindexIssues(self, issue_ids):
+    self.services.issue.reindexqueue_tbl.Select(
+        self.cnxn, order_by=[('created', [])],
+        limit=50).AndReturn([(issue_id,) for issue_id in issue_ids])
+
+    if issue_ids:
+      _issue_1, _issue_2 = self.SetUpGetIssues()
+      self.services.issue.reindexqueue_tbl.Delete(
+          self.cnxn, issue_id=issue_ids)
+
+  def testReindexIssues_QueueEmpty(self):
+    self.SetUpReindexIssues([])
+    self.mox.ReplayAll()
+    self.services.issue.ReindexIssues(self.cnxn, 50, self.services.user)
+    self.mox.VerifyAll()
+
+  def testReindexIssues_QueueHasTwoIssues(self):
+    self.SetUpReindexIssues([78901, 78902])
+    self.mox.ReplayAll()
+    self.services.issue.ReindexIssues(self.cnxn, 50, self.services.user)
+    self.mox.VerifyAll()
+
+  ### Search functions
+
+  def SetUpRunIssueQuery(
+      self, rows, limit=settings.search_limit_per_shard):
+    self.services.issue.issue_tbl.Select(
+        self.cnxn, shard_id=1, distinct=True, cols=['Issue.id'],
+        left_joins=[], where=[('Issue.deleted = %s', [False])], order_by=[],
+        limit=limit).AndReturn(rows)
+
+  def testRunIssueQuery_NoResults(self):
+    self.SetUpRunIssueQuery([])
+    self.mox.ReplayAll()
+    result_iids, capped = self.services.issue.RunIssueQuery(
+      self.cnxn, [], [], [], shard_id=1)
+    self.mox.VerifyAll()
+    self.assertEqual([], result_iids)
+    self.assertFalse(capped)
+
+  def testRunIssueQuery_Normal(self):
+    self.SetUpRunIssueQuery([(1,), (11,), (21,)])
+    self.mox.ReplayAll()
+    result_iids, capped = self.services.issue.RunIssueQuery(
+      self.cnxn, [], [], [], shard_id=1)
+    self.mox.VerifyAll()
+    self.assertEqual([1, 11, 21], result_iids)
+    self.assertFalse(capped)
+
+  def testRunIssueQuery_Capped(self):
+    try:
+      orig = settings.search_limit_per_shard
+      settings.search_limit_per_shard = 3
+      self.SetUpRunIssueQuery([(1,), (11,), (21,)], limit=3)
+      self.mox.ReplayAll()
+      result_iids, capped = self.services.issue.RunIssueQuery(
+        self.cnxn, [], [], [], shard_id=1)
+      self.mox.VerifyAll()
+      self.assertEqual([1, 11, 21], result_iids)
+      self.assertTrue(capped)
+    finally:
+      settings.search_limit_per_shard = orig
+
+  def SetUpGetIIDsByLabelIDs(self):
+    self.services.issue.issue_tbl.Select(
+        self.cnxn, shard_id=1, cols=['id'],
+        left_joins=[('Issue2Label ON Issue.id = Issue2Label.issue_id', [])],
+        label_id=[123, 456], project_id=789,
+        where=[('shard = %s', [1])]
+        ).AndReturn([(1,), (2,), (3,)])
+
+  def testGetIIDsByLabelIDs(self):
+    self.SetUpGetIIDsByLabelIDs()
+    self.mox.ReplayAll()
+    iids = self.services.issue.GetIIDsByLabelIDs(self.cnxn, [123, 456], 789, 1)
+    self.mox.VerifyAll()
+    self.assertEqual([1, 2, 3], iids)
+
+  def testGetIIDsByLabelIDsWithEmptyLabelIds(self):
+    self.mox.ReplayAll()
+    iids = self.services.issue.GetIIDsByLabelIDs(self.cnxn, [], 789, 1)
+    self.mox.VerifyAll()
+    self.assertEqual([], iids)
+
+  def SetUpGetIIDsByParticipant(self):
+    self.services.issue.issue_tbl.Select(
+        self.cnxn, shard_id=1, cols=['id'],
+        reporter_id=[111, 888],
+        where=[('shard = %s', [1]), ('Issue.project_id IN (%s)', [789])]
+        ).AndReturn([(1,)])
+    self.services.issue.issue_tbl.Select(
+        self.cnxn, shard_id=1, cols=['id'],
+        owner_id=[111, 888],
+        where=[('shard = %s', [1]), ('Issue.project_id IN (%s)', [789])]
+        ).AndReturn([(2,)])
+    self.services.issue.issue_tbl.Select(
+        self.cnxn, shard_id=1, cols=['id'],
+        derived_owner_id=[111, 888],
+        where=[('shard = %s', [1]), ('Issue.project_id IN (%s)', [789])]
+        ).AndReturn([(3,)])
+    self.services.issue.issue_tbl.Select(
+        self.cnxn, shard_id=1, cols=['id'],
+        left_joins=[('Issue2Cc ON Issue2Cc.issue_id = Issue.id', [])],
+        cc_id=[111, 888],
+        where=[('shard = %s', [1]), ('Issue.project_id IN (%s)', [789]),
+               ('cc_id IS NOT NULL', [])]
+        ).AndReturn([(4,)])
+    self.services.issue.issue_tbl.Select(
+        self.cnxn, shard_id=1, cols=['Issue.id'],
+        left_joins=[
+            ('Issue2FieldValue ON Issue.id = Issue2FieldValue.issue_id', []),
+            ('FieldDef ON Issue2FieldValue.field_id = FieldDef.id', [])],
+        user_id=[111, 888], grants_perm='View',
+        where=[('shard = %s', [1]), ('Issue.project_id IN (%s)', [789]),
+               ('user_id IS NOT NULL', [])]
+        ).AndReturn([(5,)])
+
+  def testGetIIDsByParticipant(self):
+    self.SetUpGetIIDsByParticipant()
+    self.mox.ReplayAll()
+    iids = self.services.issue.GetIIDsByParticipant(
+        self.cnxn, [111, 888], [789], 1)
+    self.mox.VerifyAll()
+    self.assertEqual([1, 2, 3, 4, 5], iids)
+
+  ### Issue Dependency reranking
+
+  def testSortBlockedOn(self):
+    issue = self.SetUpSortBlockedOn()
+    self.mox.ReplayAll()
+    ret = self.services.issue.SortBlockedOn(
+        self.cnxn, issue, issue.blocked_on_iids)
+    self.mox.VerifyAll()
+    self.assertEqual(ret, ([78902, 78903], [20, 10]))
+
+  def SetUpSortBlockedOn(self):
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, owner_id=111, summary='sum',
+        status='Live', issue_id=78901)
+    issue.project_name = 'proj'
+    issue.blocked_on_iids = [78902, 78903]
+    issue.blocked_on_ranks = [20, 10]
+    self.services.issue.issue_2lc.CacheItem(78901, issue)
+    blocked_on_rows = (
+        (78901, 78902, 'blockedon', 20), (78901, 78903, 'blockedon', 10))
+    self.services.issue.issuerelation_tbl.Select(
+        self.cnxn, cols=issue_svc.ISSUERELATION_COLS,
+        issue_id=issue.issue_id, dst_issue_id=issue.blocked_on_iids,
+        kind='blockedon',
+        order_by=[('rank DESC', []), ('dst_issue_id', [])]).AndReturn(
+            blocked_on_rows)
+    return issue
+
+  def testApplyIssueRerank(self):
+    blocker_ids = [78902, 78903]
+    relations_to_change = list(zip(blocker_ids, [20, 10]))
+    self.services.issue.issuerelation_tbl.Delete(
+        self.cnxn, issue_id=78901, dst_issue_id=blocker_ids, commit=False)
+    insert_rows = [(78901, blocker_id, 'blockedon', rank)
+                   for blocker_id, rank in relations_to_change]
+    self.services.issue.issuerelation_tbl.InsertRows(
+        self.cnxn, cols=issue_svc.ISSUERELATION_COLS, row_values=insert_rows,
+        commit=True)
+
+    self.mox.StubOutWithMock(self.services.issue, "InvalidateIIDs")
+
+    self.services.issue.InvalidateIIDs(self.cnxn, [78901])
+    self.mox.ReplayAll()
+    self.services.issue.ApplyIssueRerank(self.cnxn, 78901, relations_to_change)
+    self.mox.VerifyAll()
+
+  def testExpungeUsersInIssues(self):
+    comment_id_rows = [(12, 78901, 112), (13, 78902, 113)]
+    comment_ids = [12, 13]
+    content_ids = [112, 113]
+    self.services.issue.comment_tbl.Select = Mock(
+        return_value=comment_id_rows)
+    self.services.issue.commentcontent_tbl.Update = Mock()
+    self.services.issue.comment_tbl.Update = Mock()
+
+    fv_issue_id_rows = [(78902,), (78903,), (78904,)]
+    self.services.issue.issue2fieldvalue_tbl.Select = Mock(
+        return_value=fv_issue_id_rows)
+    self.services.issue.issue2fieldvalue_tbl.Delete = Mock()
+    self.services.issue.issueapproval2approver_tbl.Delete = Mock()
+    self.services.issue.issue2approvalvalue_tbl.Update = Mock()
+
+    self.services.issue.issueupdate_tbl.Update = Mock()
+
+    self.services.issue.issue2notify_tbl.Delete = Mock()
+
+    cc_issue_id_rows = [(78904,), (78905,), (78906,)]
+    self.services.issue.issue2cc_tbl.Select = Mock(
+        return_value=cc_issue_id_rows)
+    self.services.issue.issue2cc_tbl.Delete = Mock()
+    owner_issue_id_rows = [(78907,), (78908,), (78909,)]
+    derived_owner_issue_id_rows = [(78910,), (78911,), (78912,)]
+    reporter_issue_id_rows = [(78912,), (78913,)]
+    self.services.issue.issue_tbl.Select = Mock(
+        side_effect=[owner_issue_id_rows, derived_owner_issue_id_rows,
+                     reporter_issue_id_rows])
+    self.services.issue.issue_tbl.Update = Mock()
+
+    self.services.issue.issuesnapshot_tbl.Update = Mock()
+    self.services.issue.issuesnapshot2cc_tbl.Delete = Mock()
+
+    emails = ['cow@farm.com', 'pig@farm.com', 'chicken@farm.com']
+    user_ids = [222, 888, 444]
+    user_ids_by_email = {
+        email: user_id for user_id, email in zip(user_ids, emails)}
+    commit = False
+    limit = 50
+
+    affected_user_ids = self.services.issue.ExpungeUsersInIssues(
+        self.cnxn, user_ids_by_email, limit=limit)
+    self.assertItemsEqual(
+        affected_user_ids,
+        [78901, 78902, 78903, 78904, 78905, 78906, 78907, 78908, 78909,
+         78910, 78911, 78912, 78913])
+
+    self.services.issue.comment_tbl.Select.assert_called_once()
+    _cnxn, kwargs = self.services.issue.comment_tbl.Select.call_args
+    self.assertEqual(
+        kwargs['cols'], ['Comment.id', 'Comment.issue_id', 'commentcontent_id'])
+    self.assertItemsEqual(kwargs['commenter_id'], user_ids)
+    self.assertEqual(kwargs['limit'], limit)
+
+    # since user_ids are passed to ExpungeUsersInIssues via a dictionary,
+    # we cannot know the order of the user_ids list that the method
+    # ends up using. To be able to use assert_called_with()
+    # rather than extract call_args, we are saving the order of user_ids
+    # used by the method after confirming that it has the correct items.
+    user_ids = kwargs['commenter_id']
+
+    self.services.issue.commentcontent_tbl.Update.assert_called_once_with(
+        self.cnxn, {'inbound_message': None}, id=content_ids, commit=commit)
+    self.assertEqual(
+        len(self.services.issue.comment_tbl.Update.call_args_list), 2)
+    self.services.issue.comment_tbl.Update.assert_any_call(
+        self.cnxn, {'commenter_id': framework_constants.DELETED_USER_ID},
+        id=comment_ids, commit=False)
+    self.services.issue.comment_tbl.Update.assert_any_call(
+        self.cnxn, {'deleted_by': framework_constants.DELETED_USER_ID},
+        deleted_by=user_ids, commit=False, limit=limit)
+
+    # field values
+    self.services.issue.issue2fieldvalue_tbl.Select.assert_called_once_with(
+        self.cnxn, cols=['issue_id'], user_id=user_ids, limit=limit)
+    self.services.issue.issue2fieldvalue_tbl.Delete.assert_called_once_with(
+        self.cnxn, user_id=user_ids, limit=limit, commit=commit)
+
+    # approval values
+    self.services.issue.issueapproval2approver_tbl.\
+Delete.assert_called_once_with(
+        self.cnxn, approver_id=user_ids, commit=commit, limit=limit)
+    self.services.issue.issue2approvalvalue_tbl.Update.assert_called_once_with(
+        self.cnxn, {'setter_id': framework_constants.DELETED_USER_ID},
+        setter_id=user_ids, commit=commit, limit=limit)
+
+    # issue ccs
+    self.services.issue.issue2cc_tbl.Select.assert_called_once_with(
+        self.cnxn, cols=['issue_id'], cc_id=user_ids, limit=limit)
+    self.services.issue.issue2cc_tbl.Delete.assert_called_once_with(
+        self.cnxn, cc_id=user_ids, limit=limit, commit=commit)
+
+    # issue owners
+    self.services.issue.issue_tbl.Select.assert_any_call(
+        self.cnxn, cols=['id'], owner_id=user_ids, limit=limit)
+    self.services.issue.issue_tbl.Update.assert_any_call(
+        self.cnxn, {'owner_id': None},
+        id=[row[0] for row in owner_issue_id_rows], commit=commit)
+    self.services.issue.issue_tbl.Select.assert_any_call(
+        self.cnxn, cols=['id'], derived_owner_id=user_ids, limit=limit)
+    self.services.issue.issue_tbl.Update.assert_any_call(
+        self.cnxn, {'derived_owner_id': None},
+        id=[row[0] for row in derived_owner_issue_id_rows], commit=commit)
+
+    # issue reporter
+    self.services.issue.issue_tbl.Select.assert_any_call(
+        self.cnxn, cols=['id'], reporter_id=user_ids, limit=limit)
+    self.services.issue.issue_tbl.Update.assert_any_call(
+        self.cnxn, {'reporter_id': framework_constants.DELETED_USER_ID},
+        id=[row[0] for row in reporter_issue_id_rows], commit=commit)
+
+    self.assertEqual(
+        3, len(self.services.issue.issue_tbl.Update.call_args_list))
+
+    # issue updates
+    self.services.issue.issueupdate_tbl.Update.assert_any_call(
+        self.cnxn, {'added_user_id': framework_constants.DELETED_USER_ID},
+        added_user_id=user_ids, commit=commit)
+    self.services.issue.issueupdate_tbl.Update.assert_any_call(
+        self.cnxn, {'removed_user_id': framework_constants.DELETED_USER_ID},
+        removed_user_id=user_ids, commit=commit)
+    self.assertEqual(
+        2, len(self.services.issue.issueupdate_tbl.Update.call_args_list))
+
+    # issue notify
+    call_args_list = self.services.issue.issue2notify_tbl.Delete.call_args_list
+    self.assertEqual(1, len(call_args_list))
+    _cnxn, kwargs = call_args_list[0]
+    self.assertItemsEqual(kwargs['email'], emails)
+    self.assertEqual(kwargs['commit'], commit)
+
+    # issue snapshots
+    self.services.issue.issuesnapshot_tbl.Update.assert_any_call(
+        self.cnxn, {'owner_id': framework_constants.DELETED_USER_ID},
+        owner_id=user_ids, commit=commit, limit=limit)
+    self.services.issue.issuesnapshot_tbl.Update.assert_any_call(
+        self.cnxn, {'reporter_id': framework_constants.DELETED_USER_ID},
+        reporter_id=user_ids, commit=commit, limit=limit)
+    self.assertEqual(
+        2, len(self.services.issue.issuesnapshot_tbl.Update.call_args_list))
+
+    self.services.issue.issuesnapshot2cc_tbl.Delete.assert_called_once_with(
+        self.cnxn, cc_id=user_ids, commit=commit, limit=limit)
diff --git a/services/test/ml_helpers_test.py b/services/test/ml_helpers_test.py
new file mode 100644
index 0000000..45a29cc
--- /dev/null
+++ b/services/test/ml_helpers_test.py
@@ -0,0 +1,120 @@
+# coding=utf-8
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import io
+import unittest
+
+from services import ml_helpers
+
+
+NUM_WORD_HASHES = 5
+
+TOP_WORDS = {'cat': 0, 'dog': 1, 'bunny': 2, 'chinchilla': 3, 'hamster': 4}
+NUM_COMPONENT_FEATURES = len(TOP_WORDS)
+
+
+class MLHelpersTest(unittest.TestCase):
+
+  def testSpamHashFeatures(self):
+    hashes = ml_helpers._SpamHashFeatures(tuple(), NUM_WORD_HASHES)
+    self.assertEqual([0, 0, 0, 0, 0], hashes)
+
+    hashes = ml_helpers._SpamHashFeatures(('', ''), NUM_WORD_HASHES)
+    self.assertEqual([1.0, 0, 0, 0, 0], hashes)
+
+    hashes = ml_helpers._SpamHashFeatures(('abc', 'abc def'), NUM_WORD_HASHES)
+    self.assertEqual([0, 0, 2 / 3, 0, 1 / 3], hashes)
+
+  def testComponentFeatures(self):
+
+    features = ml_helpers._ComponentFeatures(['cat dog is not bunny'
+                                              ' chinchilla hamster'],
+                                             NUM_COMPONENT_FEATURES,
+                                             TOP_WORDS)
+    self.assertEqual([1, 1, 1, 1, 1], features)
+
+    features = ml_helpers._ComponentFeatures(['none of these are features'],
+                                             NUM_COMPONENT_FEATURES,
+                                             TOP_WORDS)
+    self.assertEqual([0, 0, 0, 0, 0], features)
+
+    features = ml_helpers._ComponentFeatures(['do hamsters look like a'
+                                             ' chinchilla'],
+                                             NUM_COMPONENT_FEATURES,
+                                             TOP_WORDS)
+    self.assertEqual([0, 0, 0, 1, 0], features)
+
+    features = ml_helpers._ComponentFeatures([''],
+                                             NUM_COMPONENT_FEATURES,
+                                             TOP_WORDS)
+    self.assertEqual([0, 0, 0, 0, 0], features)
+
+  def testGenerateFeaturesRaw(self):
+
+    features = ml_helpers.GenerateFeaturesRaw(
+        ['abc', 'abc def http://www.google.com http://www.google.com'],
+      NUM_WORD_HASHES)
+    self.assertEqual(
+        [1 / 2.75, 0.0, 1 / 5.5, 0.0, 1 / 2.2], features['word_hashes'])
+
+    features = ml_helpers.GenerateFeaturesRaw(['abc', 'abc def'],
+      NUM_WORD_HASHES)
+    self.assertEqual([0.0, 0.0, 2 / 3, 0.0, 1 / 3], features['word_hashes'])
+
+    features = ml_helpers.GenerateFeaturesRaw(['do hamsters look like a'
+                                               ' chinchilla'],
+                                              NUM_COMPONENT_FEATURES,
+                                              TOP_WORDS)
+    self.assertEqual([0, 0, 0, 1, 0], features['word_features'])
+
+    # BMP Unicode
+    features = ml_helpers.GenerateFeaturesRaw(
+        [u'abc’', u'abc ’ def'], NUM_WORD_HASHES)
+    self.assertEqual([0.0, 0.0, 0.25, 0.25, 0.5], features['word_hashes'])
+
+    # Non-BMP Unicode
+    features = ml_helpers.GenerateFeaturesRaw([u'abc國', u'abc 國 def'],
+      NUM_WORD_HASHES)
+    self.assertEqual([0.0, 0.0, 0.25, 0.25, 0.5], features['word_hashes'])
+
+    # A non-unicode bytestring containing unicode characters
+    features = ml_helpers.GenerateFeaturesRaw(['abc…', 'abc … def'],
+      NUM_WORD_HASHES)
+    self.assertEqual([0.25, 0.0, 0.25, 0.25, 0.25], features['word_hashes'])
+
+    # Empty input
+    features = ml_helpers.GenerateFeaturesRaw(['', ''], NUM_WORD_HASHES)
+    self.assertEqual([1.0, 0.0, 0.0, 0.0, 0.0], features['word_hashes'])
+
+  def test_from_file(self):
+    csv_file = io.StringIO(
+        u'''
+      "spam","the subject 1","the contents 1","spammer@gmail.com"
+      "ham","the subject 2"
+      "spam","the subject 3","the contents 2","spammer2@gmail.com"
+    '''.strip())
+    samples, skipped = ml_helpers.spam_from_file(csv_file)
+    self.assertEqual(len(samples), 2)
+    self.assertEqual(skipped, 1)
+    self.assertEqual(len(samples[1]), 3, 'Strips email')
+    self.assertEqual(samples[1][2], 'the contents 2')
+
+  def test_transform_csv_to_features(self):
+    training_data = [
+      ['spam', 'subject 1', 'contents 1'],
+      ['ham', 'subject 2', 'contents 2'],
+      ['spam', 'subject 3', 'contents 3'],
+    ]
+    X, y = ml_helpers.transform_spam_csv_to_features(training_data)
+
+    self.assertIsInstance(X, list)
+    self.assertIsInstance(X[0], dict)
+    self.assertIsInstance(y, list)
+
+    self.assertEqual(len(X), 3)
+    self.assertEqual(len(y), 3)
+
+    self.assertEqual(len(X[0]['word_hashes']), 500)
+    self.assertEqual(y, [1, 0, 1])
diff --git a/services/test/project_svc_test.py b/services/test/project_svc_test.py
new file mode 100644
index 0000000..2eb7a2b
--- /dev/null
+++ b/services/test/project_svc_test.py
@@ -0,0 +1,631 @@
+# 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
+
+"""Tests for the project_svc module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+import unittest
+
+import mox
+import mock
+
+from google.appengine.ext import testbed
+
+from framework import framework_constants
+from framework import sql
+from proto import project_pb2
+from proto import user_pb2
+from services import config_svc
+from services import project_svc
+from testing import fake
+
+NOW = 12345678
+
+
+def MakeProjectService(cache_manager, my_mox):
+  project_service = project_svc.ProjectService(cache_manager)
+  project_service.project_tbl = my_mox.CreateMock(sql.SQLTableManager)
+  project_service.user2project_tbl = my_mox.CreateMock(sql.SQLTableManager)
+  project_service.extraperm_tbl = my_mox.CreateMock(sql.SQLTableManager)
+  project_service.membernotes_tbl = my_mox.CreateMock(sql.SQLTableManager)
+  project_service.usergroupprojects_tbl = my_mox.CreateMock(
+      sql.SQLTableManager)
+  project_service.acexclusion_tbl = my_mox.CreateMock(
+      sql.SQLTableManager)
+  return project_service
+
+
+class ProjectTwoLevelCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.mox = mox.Mox()
+    self.cnxn = self.mox.CreateMock(sql.MonorailConnection)
+    self.cache_manager = fake.CacheManager()
+    self.project_service = MakeProjectService(self.cache_manager, self.mox)
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  def testDeserializeProjects(self):
+    project_rows = [
+        (
+            123, 'proj1', 'test proj 1', 'test project', 'live', 'anyone', '',
+            '', None, '', 0, 50 * 1024 * 1024, NOW, NOW, None, True, False,
+            False, None, None, None, None, None, None, False),
+        (
+            234, 'proj2', 'test proj 2', 'test project', 'live', 'anyone', '',
+            '', None, '', 0, 50 * 1024 * 1024, NOW, NOW, None, True, False,
+            False, None, None, None, None, None, None, True)
+    ]
+    role_rows = [
+        (123, 111, 'owner'), (123, 444, 'owner'),
+        (123, 222, 'committer'),
+        (123, 333, 'contributor'),
+        (234, 111, 'owner')]
+    extraperm_rows = []
+
+    project_dict = self.project_service.project_2lc._DeserializeProjects(
+        project_rows, role_rows, extraperm_rows)
+
+    self.assertItemsEqual([123, 234], list(project_dict.keys()))
+    self.assertEqual(123, project_dict[123].project_id)
+    self.assertEqual('proj1', project_dict[123].project_name)
+    self.assertEqual(NOW, project_dict[123].recent_activity)
+    self.assertItemsEqual([111, 444], project_dict[123].owner_ids)
+    self.assertItemsEqual([222], project_dict[123].committer_ids)
+    self.assertItemsEqual([333], project_dict[123].contributor_ids)
+    self.assertEqual(234, project_dict[234].project_id)
+    self.assertItemsEqual([111], project_dict[234].owner_ids)
+    self.assertEqual(False, project_dict[123].issue_notify_always_detailed)
+    self.assertEqual(True, project_dict[234].issue_notify_always_detailed)
+
+
+class UserToProjectIdTwoLevelCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.cnxn = fake.MonorailConnection()
+    self.cache_manager = fake.CacheManager()
+    self.mox = mox.Mox()
+    self.project_service = MakeProjectService(self.cache_manager, self.mox)
+    self.user_to_project_2lc = self.project_service.user_to_project_2lc
+
+    # Set up DB query mocks.
+    self.cached_user_ids = [100, 101]
+    self.from_db_user_ids = [102, 103]
+    test_table = [
+        (900, self.cached_user_ids[0]),  # Project 900, User 100
+        (900, self.cached_user_ids[1]),  # Project 900, User 101
+        (901, self.cached_user_ids[0]),  # Project 901, User 101
+        (902, self.from_db_user_ids[0]),  # Project 902, User 102
+        (902, self.from_db_user_ids[1]),  # Project 902, User 103
+        (903, self.from_db_user_ids[0]),  # Project 903, User 102
+    ]
+    self.project_service.user2project_tbl.Select = mock.Mock(
+        return_value=test_table)
+
+  def tearDown(self):
+    # memcache.flush_all()
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testGetAll(self):
+    # Cache user 100 and 101.
+    self.user_to_project_2lc.CacheItem(self.cached_user_ids[0], set([900, 901]))
+    self.user_to_project_2lc.CacheItem(self.cached_user_ids[1], set([900]))
+    # Test that other project_ids and user_ids get returned by DB queries.
+    first_hit, first_misses = self.user_to_project_2lc.GetAll(
+        self.cnxn, self.cached_user_ids + self.from_db_user_ids)
+
+    self.project_service.user2project_tbl.Select.assert_called_once_with(
+        self.cnxn, cols=['project_id', 'user_id'])
+
+    self.assertEqual(
+        first_hit, {
+            100: set([900, 901]),
+            101: set([900]),
+            102: set([902, 903]),
+            103: set([902]),
+        })
+    self.assertEqual([], first_misses)
+
+  def testGetAllRateLimit(self):
+    test_now = time.time()
+    # Initial request that queries table.
+    self.user_to_project_2lc._GetCurrentTime = mock.Mock(
+        return_value=test_now + 60)
+    self.user_to_project_2lc.GetAll(
+        self.cnxn, self.cached_user_ids + self.from_db_user_ids)
+
+    # Request a user with no projects right after the last request.
+    self.user_to_project_2lc._GetCurrentTime = mock.Mock(
+        return_value=test_now + 61)
+    second_hit, second_misses = self.user_to_project_2lc.GetAll(
+        self.cnxn, [104])
+
+    # Request one more user without project that should make a DB request
+    # because the required rate limit time has passed.
+    self.user_to_project_2lc._GetCurrentTime = mock.Mock(
+        return_value=test_now + 121)
+    third_hit, third_misses = self.user_to_project_2lc.GetAll(self.cnxn, [105])
+
+    # Queried only twice because the second request was rate limited.
+    self.assertEqual(self.project_service.user2project_tbl.Select.call_count, 2)
+
+    # Rate limited response will not return the full table.
+    self.assertEqual(second_hit, {
+        104: set([]),
+    })
+    self.assertEqual([], second_misses)
+    self.assertEqual(
+        third_hit, {
+            100: set([900, 901]),
+            101: set([900]),
+            102: set([902, 903]),
+            103: set([902]),
+            105: set([]),
+        })
+    self.assertEqual([], third_misses)
+
+
+class ProjectServiceTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.mox = mox.Mox()
+    self.cnxn = self.mox.CreateMock(sql.MonorailConnection)
+    self.cache_manager = fake.CacheManager()
+    self.config_service = self.mox.CreateMock(config_svc.ConfigService)
+    self.project_service = MakeProjectService(self.cache_manager, self.mox)
+
+    self.proj1 = fake.Project(project_name='proj1', project_id=123)
+    self.proj2 = fake.Project(project_name='proj2', project_id=234)
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def SetUpCreateProject(self):
+    # Check for existing project: there should be none.
+    self.project_service.project_tbl.Select(
+        self.cnxn, cols=['project_name', 'project_id'],
+        project_name=['proj1']).AndReturn([])
+
+    # Inserting the project gives the project ID.
+    self.project_service.project_tbl.InsertRow(
+        self.cnxn, project_name='proj1',
+        summary='Test project summary', description='Test project description',
+        home_page=None, docs_url=None, source_url=None,
+        logo_file_name=None, logo_gcs_id=None,
+        state='LIVE', access='ANYONE').AndReturn(123)
+
+    # Insert the users.  There are none.
+    self.project_service.user2project_tbl.InsertRows(
+        self.cnxn, ['project_id', 'user_id', 'role_name'], [])
+
+  def testCreateProject(self):
+    self.SetUpCreateProject()
+    self.mox.ReplayAll()
+    self.project_service.CreateProject(
+        self.cnxn, 'proj1', owner_ids=[], committer_ids=[], contributor_ids=[],
+        summary='Test project summary', description='Test project description')
+    self.mox.VerifyAll()
+
+  def SetUpLookupProjectIDs(self):
+    self.project_service.project_tbl.Select(
+        self.cnxn, cols=['project_name', 'project_id'],
+        project_name=['proj2']).AndReturn([('proj2', 234)])
+
+  def testLookupProjectIDs(self):
+    self.SetUpLookupProjectIDs()
+    self.project_service.project_names_to_ids.CacheItem('proj1', 123)
+    self.mox.ReplayAll()
+    id_dict = self.project_service.LookupProjectIDs(
+        self.cnxn, ['proj1', 'proj2'])
+    self.mox.VerifyAll()
+    self.assertEqual({'proj1': 123, 'proj2': 234}, id_dict)
+
+  def testLookupProjectNames(self):
+    self.SetUpGetProjects()  # Same as testGetProjects()
+    self.project_service.project_2lc.CacheItem(123, self.proj1)
+    self.mox.ReplayAll()
+    name_dict = self.project_service.LookupProjectNames(
+        self.cnxn, [123, 234])
+    self.mox.VerifyAll()
+    self.assertEqual({123: 'proj1', 234: 'proj2'}, name_dict)
+
+  def SetUpGetProjects(self, roles=None, extra_perms=None):
+    project_rows = [
+        (
+            234, 'proj2', 'test proj 2', 'test project', 'live', 'anyone', '',
+            '', None, '', 0, 50 * 1024 * 1024, NOW, NOW, None, True, False,
+            False, None, None, None, None, None, None, False)
+    ]
+    self.project_service.project_tbl.Select(
+        self.cnxn, cols=project_svc.PROJECT_COLS,
+        project_id=[234]).AndReturn(project_rows)
+    self.project_service.user2project_tbl.Select(
+        self.cnxn, cols=['project_id', 'user_id', 'role_name'],
+        project_id=[234]).AndReturn(roles or [])
+    self.project_service.extraperm_tbl.Select(
+        self.cnxn, cols=project_svc.EXTRAPERM_COLS,
+        project_id=[234]).AndReturn(extra_perms or [])
+
+  def testGetProjects(self):
+    self.project_service.project_2lc.CacheItem(123, self.proj1)
+    self.SetUpGetProjects()
+    self.mox.ReplayAll()
+    project_dict = self.project_service.GetProjects(
+        self.cnxn, [123, 234])
+    self.mox.VerifyAll()
+    self.assertItemsEqual([123, 234], list(project_dict.keys()))
+    self.assertEqual('proj1', project_dict[123].project_name)
+    self.assertEqual('proj2', project_dict[234].project_name)
+
+  def testGetProjects_ExtraPerms(self):
+    self.SetUpGetProjects(extra_perms=[(234, 222, 'BarPerm'),
+                                       (234, 111, 'FooPerm')])
+    self.mox.ReplayAll()
+    project_dict = self.project_service.GetProjects(self.cnxn, [234])
+    self.mox.VerifyAll()
+    self.assertItemsEqual([234], list(project_dict.keys()))
+    self.assertEqual(
+        [project_pb2.Project.ExtraPerms(
+             member_id=111, perms=['FooPerm']),
+         project_pb2.Project.ExtraPerms(
+             member_id=222, perms=['BarPerm'])],
+        project_dict[234].extra_perms)
+
+
+  def testGetVisibleLiveProjects_AnyoneAccessWithUser(self):
+    project_rows = [
+        (
+            234, 'proj2', 'test proj 2', 'test project', 'live', 'anyone', '',
+            '', None, '', 0, 50 * 1024 * 1024, NOW, NOW, None, True, False,
+            False, None, None, None, False)
+    ]
+
+    self.project_service.project_tbl.Select(
+        self.cnxn, cols=['project_id'],
+        state=project_pb2.ProjectState.LIVE).AndReturn(project_rows)
+    self.SetUpGetProjects()
+    self.mox.ReplayAll()
+    user_a = user_pb2.User(email='a@example.com')
+    project_ids = self.project_service.GetVisibleLiveProjects(
+        self.cnxn, user_a, set([111]))
+
+    self.mox.VerifyAll()
+    self.assertItemsEqual([234], project_ids)
+
+  def testGetVisibleLiveProjects_AnyoneAccessWithAnon(self):
+    project_rows = [
+        (
+            234, 'proj2', 'test proj 2', 'test project', 'live', 'anyone', '',
+            '', None, '', 0, 50 * 1024 * 1024, NOW, NOW, None, True, False,
+            False, None, None, None, None, None, None, False)
+    ]
+
+    self.project_service.project_tbl.Select(
+        self.cnxn, cols=['project_id'],
+        state=project_pb2.ProjectState.LIVE).AndReturn(project_rows)
+    self.SetUpGetProjects()
+    self.mox.ReplayAll()
+    project_ids = self.project_service.GetVisibleLiveProjects(
+        self.cnxn, None, None)
+
+    self.mox.VerifyAll()
+    self.assertItemsEqual([234], project_ids)
+
+  def testGetVisibleLiveProjects_RestrictedAccessWithMember(self):
+    project_rows = [
+        (
+            234, 'proj2', 'test proj 2', 'test project', 'live', 'members_only',
+            '', '', None, '', 0, 50 * 1024 * 1024, NOW, NOW, None, True, False,
+            False, False, None, None, None, None, None, None, False)
+    ]
+    self.proj2.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    self.proj2.contributor_ids.append(111)
+    self.project_service.project_2lc.CacheItem(234, self.proj2)
+
+    self.project_service.project_tbl.Select(
+        self.cnxn, cols=['project_id'],
+        state=project_pb2.ProjectState.LIVE).AndReturn(project_rows)
+    self.mox.ReplayAll()
+    user_a = user_pb2.User(email='a@example.com')
+    project_ids = self.project_service.GetVisibleLiveProjects(
+        self.cnxn, user_a, set([111]))
+
+    self.mox.VerifyAll()
+    self.assertItemsEqual([234], project_ids)
+
+  def testGetVisibleLiveProjects_RestrictedAccessWithNonMember(self):
+    project_rows = [
+        (
+            234, 'proj2', 'test proj 2', 'test project', 'live', 'members_only',
+            '', '', None, '', 0, 50 * 1024 * 1024, NOW, NOW, None, True, False,
+            False, None, None, None, None, None, None, False)
+    ]
+    self.proj2.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    self.project_service.project_2lc.CacheItem(234, self.proj2)
+
+    self.project_service.project_tbl.Select(
+        self.cnxn, cols=['project_id'],
+        state=project_pb2.ProjectState.LIVE).AndReturn(project_rows)
+    self.mox.ReplayAll()
+    user_a = user_pb2.User(email='a@example.com')
+    project_ids = self.project_service.GetVisibleLiveProjects(
+        self.cnxn, user_a, set([111]))
+
+    self.mox.VerifyAll()
+    self.assertItemsEqual([], project_ids)
+
+  def testGetVisibleLiveProjects_RestrictedAccessWithAnon(self):
+    project_rows = [
+        (
+            234, 'proj2', 'test proj 2', 'test project', 'live', 'members_only',
+            '', '', None, '', 0, 50 * 1024 * 1024, NOW, NOW, None, True, False,
+            False, None, None, None, None, None, None, False)
+    ]
+    self.proj2.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    self.project_service.project_2lc.CacheItem(234, self.proj2)
+
+    self.project_service.project_tbl.Select(
+        self.cnxn, cols=['project_id'],
+        state=project_pb2.ProjectState.LIVE).AndReturn(project_rows)
+    self.mox.ReplayAll()
+    project_ids = self.project_service.GetVisibleLiveProjects(
+        self.cnxn, None, None)
+
+    self.mox.VerifyAll()
+    self.assertItemsEqual([], project_ids)
+
+  def testGetVisibleLiveProjects_RestrictedAccessWithSiteAdmin(self):
+    project_rows = [
+        (
+            234, 'proj2', 'test proj 2', 'test project', 'live', 'members_only',
+            '', '', None, '', 0, 50 * 1024 * 1024, NOW, NOW, None, True, False,
+            False, None, None, None, None, None, None, False)
+    ]
+    self.proj2.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    self.project_service.project_2lc.CacheItem(234, self.proj2)
+
+    self.project_service.project_tbl.Select(
+        self.cnxn, cols=['project_id'],
+        state=project_pb2.ProjectState.LIVE).AndReturn(project_rows)
+    self.mox.ReplayAll()
+    user_a = user_pb2.User(email='a@example.com')
+    user_a.is_site_admin = True
+    project_ids = self.project_service.GetVisibleLiveProjects(
+        self.cnxn, user_a, set([111]))
+
+    self.mox.VerifyAll()
+    self.assertItemsEqual([234], project_ids)
+
+  def testGetVisibleLiveProjects_ArchivedProject(self):
+    project_rows = [
+        (
+            234, 'proj2', 'test proj 2', 'test project', 'archived', 'anyone',
+            '', '', None, '', 0, 50 * 1024 * 1024, NOW, NOW, None, True, False,
+            False, None, None, None, None, None, None, False)
+    ]
+    self.proj2.state = project_pb2.ProjectState.ARCHIVED
+    self.project_service.project_2lc.CacheItem(234, self.proj2)
+
+    self.project_service.project_tbl.Select(
+        self.cnxn, cols=['project_id'],
+        state=project_pb2.ProjectState.LIVE).AndReturn(project_rows)
+    self.mox.ReplayAll()
+    user_a = user_pb2.User(email='a@example.com')
+    project_ids = self.project_service.GetVisibleLiveProjects(
+        self.cnxn, user_a, set([111]))
+
+    self.mox.VerifyAll()
+    self.assertItemsEqual([], project_ids)
+
+  def testGetProjectsByName(self):
+    self.project_service.project_names_to_ids.CacheItem('proj1', 123)
+    self.project_service.project_2lc.CacheItem(123, self.proj1)
+    self.SetUpLookupProjectIDs()
+    self.SetUpGetProjects()
+    self.mox.ReplayAll()
+    project_dict = self.project_service.GetProjectsByName(
+        self.cnxn, ['proj1', 'proj2'])
+    self.mox.VerifyAll()
+    self.assertItemsEqual(['proj1', 'proj2'], list(project_dict.keys()))
+    self.assertEqual(123, project_dict['proj1'].project_id)
+    self.assertEqual(234, project_dict['proj2'].project_id)
+
+  def SetUpExpungeProject(self):
+    self.project_service.user2project_tbl.Delete(
+        self.cnxn, project_id=234)
+    self.project_service.usergroupprojects_tbl.Delete(
+        self.cnxn, project_id=234)
+    self.project_service.extraperm_tbl.Delete(
+        self.cnxn, project_id=234)
+    self.project_service.membernotes_tbl.Delete(
+        self.cnxn, project_id=234)
+    self.project_service.acexclusion_tbl.Delete(
+        self.cnxn, project_id=234)
+    self.project_service.project_tbl.Delete(
+        self.cnxn, project_id=234)
+
+  def testExpungeProject(self):
+    self.SetUpExpungeProject()
+    self.mox.ReplayAll()
+    self.project_service.ExpungeProject(self.cnxn, 234)
+    self.mox.VerifyAll()
+
+  def SetUpUpdateProject(self, project_id, delta):
+    self.project_service.project_tbl.SelectValue(
+        self.cnxn, 'project_name', project_id=project_id).AndReturn('projN')
+    self.project_service.project_tbl.Update(
+        self.cnxn, delta, project_id=project_id, commit=False)
+    self.cnxn.Commit()
+
+  def testUpdateProject(self):
+    delta = {'summary': 'An even better one-line summary'}
+    self.SetUpUpdateProject(234, delta)
+    self.mox.ReplayAll()
+    self.project_service.UpdateProject(
+        self.cnxn, 234, summary='An even better one-line summary')
+    self.mox.VerifyAll()
+
+  def testUpdateProject_NotifyAlwaysDetailed(self):
+    delta = {'issue_notify_always_detailed': True}
+    self.SetUpUpdateProject(234, delta)
+    self.mox.ReplayAll()
+    self.project_service.UpdateProject(
+        self.cnxn, 234, issue_notify_always_detailed=True)
+    self.mox.VerifyAll()
+
+  def SetUpUpdateProjectRoles(
+      self, project_id, owner_ids, committer_ids, contributor_ids):
+    self.project_service.project_tbl.SelectValue(
+        self.cnxn, 'project_name', project_id=project_id).AndReturn('projN')
+    self.project_service.project_tbl.Update(
+        self.cnxn, {'cached_content_timestamp': NOW}, project_id=project_id,
+        commit=False)
+
+    self.project_service.user2project_tbl.Delete(
+        self.cnxn, project_id=project_id, role_name='owner', commit=False)
+    self.project_service.user2project_tbl.Delete(
+        self.cnxn, project_id=project_id, role_name='committer', commit=False)
+    self.project_service.user2project_tbl.Delete(
+        self.cnxn, project_id=project_id, role_name='contributor',
+        commit=False)
+
+    self.project_service.user2project_tbl.InsertRows(
+        self.cnxn, ['project_id', 'user_id', 'role_name'],
+        [(project_id, user_id, 'owner') for user_id in owner_ids],
+        commit=False)
+    self.project_service.user2project_tbl.InsertRows(
+        self.cnxn, ['project_id', 'user_id', 'role_name'],
+        [(project_id, user_id, 'committer') for user_id in committer_ids],
+        commit=False)
+    self.project_service.user2project_tbl.InsertRows(
+        self.cnxn, ['project_id', 'user_id', 'role_name'],
+        [(project_id, user_id, 'contributor') for user_id in contributor_ids],
+        commit=False)
+
+    self.cnxn.Commit()
+
+  def testUpdateProjectRoles(self):
+    self.SetUpUpdateProjectRoles(234, [111, 222], [333], [])
+    self.mox.ReplayAll()
+    self.project_service.UpdateProjectRoles(
+        self.cnxn, 234, [111, 222], [333], [], now=NOW)
+    self.mox.VerifyAll()
+
+  def SetUpMarkProjectDeletable(self):
+    delta = {
+        'project_name': 'DELETABLE_123',
+        'state': 'deletable',
+        }
+    self.project_service.project_tbl.Update(self.cnxn, delta, project_id=123)
+    self.config_service.InvalidateMemcacheForEntireProject(123)
+
+  def testMarkProjectDeletable(self):
+    self.SetUpMarkProjectDeletable()
+    self.mox.ReplayAll()
+    self.project_service.MarkProjectDeletable(
+        self.cnxn, 123, self.config_service)
+    self.mox.VerifyAll()
+
+  def testUpdateRecentActivity_SignificantlyLaterActivity(self):
+    activity_time = NOW + framework_constants.SECS_PER_HOUR * 3
+    delta = {'recent_activity_timestamp': activity_time}
+    self.SetUpGetProjects()
+    self.SetUpUpdateProject(234, delta)
+    self.mox.ReplayAll()
+    self.project_service.UpdateRecentActivity(self.cnxn, 234, now=activity_time)
+    self.mox.VerifyAll()
+
+  def testUpdateRecentActivity_NotSignificant(self):
+    activity_time = NOW + 123
+    self.SetUpGetProjects()
+    # ProjectUpdate is not called.
+    self.mox.ReplayAll()
+    self.project_service.UpdateRecentActivity(self.cnxn, 234, now=activity_time)
+    self.mox.VerifyAll()
+
+  def SetUpGetUserRolesInAllProjects(self):
+    rows = [
+        (123, 'committer'),
+        (234, 'owner'),
+        ]
+    self.project_service.user2project_tbl.Select(
+        self.cnxn, cols=['project_id', 'role_name'],
+        user_id={111, 888}).AndReturn(rows)
+
+  def testGetUserRolesInAllProjects(self):
+    self.SetUpGetUserRolesInAllProjects()
+    self.mox.ReplayAll()
+    actual = self.project_service.GetUserRolesInAllProjects(
+        self.cnxn, {111, 888})
+    owned_project_ids, membered_project_ids, contrib_project_ids = actual
+    self.mox.VerifyAll()
+    self.assertItemsEqual([234], owned_project_ids)
+    self.assertItemsEqual([123], membered_project_ids)
+    self.assertItemsEqual([], contrib_project_ids)
+
+  def testGetUserRolesInAllProjectsWithoutEffectiveIds(self):
+    self.mox.ReplayAll()
+    actual = self.project_service.GetUserRolesInAllProjects(self.cnxn, {})
+    owned_project_ids, membered_project_ids, contrib_project_ids = actual
+    self.mox.VerifyAll()
+    self.assertItemsEqual([], owned_project_ids)
+    self.assertItemsEqual([], membered_project_ids)
+    self.assertItemsEqual([], contrib_project_ids)
+
+  def SetUpUpdateExtraPerms(self):
+    self.project_service.extraperm_tbl.Delete(
+        self.cnxn, project_id=234, user_id=111, commit=False)
+    self.project_service.extraperm_tbl.InsertRows(
+        self.cnxn, project_svc.EXTRAPERM_COLS,
+        [(234, 111, 'SecurityTeam')], commit=False)
+    self.project_service.project_tbl.Update(
+        self.cnxn, {'cached_content_timestamp': NOW},
+        project_id=234, commit=False)
+    self.cnxn.Commit()
+
+  def testUpdateExtraPerms(self):
+    self.SetUpGetProjects(roles=[(234, 111, 'owner')])
+    self.SetUpUpdateExtraPerms()
+    self.mox.ReplayAll()
+    self.project_service.UpdateExtraPerms(
+        self.cnxn, 234, 111, ['SecurityTeam'], now=NOW)
+    self.mox.VerifyAll()
+
+  def testExpungeUsersInProjects(self):
+    self.project_service.extraperm_tbl.Delete = mock.Mock()
+    self.project_service.acexclusion_tbl.Delete = mock.Mock()
+    self.project_service.membernotes_tbl.Delete = mock.Mock()
+    self.project_service.user2project_tbl.Delete = mock.Mock()
+
+    user_ids = [111, 222]
+    limit= 16
+    self.project_service.ExpungeUsersInProjects(
+        self.cnxn, user_ids, limit=limit)
+
+    call = [mock.call(self.cnxn, user_id=user_ids, limit=limit, commit=False)]
+    self.project_service.extraperm_tbl.Delete.assert_has_calls(call)
+    self.project_service.acexclusion_tbl.Delete.assert_has_calls(call)
+    self.project_service.membernotes_tbl.Delete.assert_has_calls(call)
+    self.project_service.user2project_tbl.Delete.assert_has_calls(call)
diff --git a/services/test/service_manager_test.py b/services/test/service_manager_test.py
new file mode 100644
index 0000000..33c8706
--- /dev/null
+++ b/services/test/service_manager_test.py
@@ -0,0 +1,44 @@
+# 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
+
+"""Tests for the service_manager module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from features import autolink
+from services import cachemanager_svc
+from services import config_svc
+from services import features_svc
+from services import issue_svc
+from services import service_manager
+from services import project_svc
+from services import star_svc
+from services import user_svc
+from services import usergroup_svc
+
+
+class ServiceManagerTest(unittest.TestCase):
+
+  def testSetUpServices(self):
+    svcs = service_manager.set_up_services()
+    self.assertIsInstance(svcs, service_manager.Services)
+    self.assertIsInstance(svcs.autolink, autolink.Autolink)
+    self.assertIsInstance(svcs.cache_manager, cachemanager_svc.CacheManager)
+    self.assertIsInstance(svcs.user, user_svc.UserService)
+    self.assertIsInstance(svcs.user_star, star_svc.UserStarService)
+    self.assertIsInstance(svcs.project_star, star_svc.ProjectStarService)
+    self.assertIsInstance(svcs.issue_star, star_svc.IssueStarService)
+    self.assertIsInstance(svcs.project, project_svc.ProjectService)
+    self.assertIsInstance(svcs.usergroup, usergroup_svc.UserGroupService)
+    self.assertIsInstance(svcs.config, config_svc.ConfigService)
+    self.assertIsInstance(svcs.issue, issue_svc.IssueService)
+    self.assertIsInstance(svcs.features, features_svc.FeaturesService)
+
+    # Calling it again should give the same object
+    svcs2 = service_manager.set_up_services()
+    self.assertTrue(svcs is svcs2)
diff --git a/services/test/spam_svc_test.py b/services/test/spam_svc_test.py
new file mode 100644
index 0000000..3aeba13
--- /dev/null
+++ b/services/test/spam_svc_test.py
@@ -0,0 +1,433 @@
+# 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
+
+"""Tests for the spam service."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+
+import mox
+
+from google.appengine.ext import testbed
+
+import settings
+from framework import sql
+from framework import framework_constants
+from proto import user_pb2
+from proto import tracker_pb2
+from services import spam_svc
+from testing import fake
+from mock import Mock
+
+
+def assert_unreached():
+  raise Exception('This code should not have been called.')  # pragma: no cover
+
+
+class SpamServiceTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+
+    self.mox = mox.Mox()
+    self.mock_report_tbl = self.mox.CreateMock(sql.SQLTableManager)
+    self.mock_verdict_tbl = self.mox.CreateMock(sql.SQLTableManager)
+    self.mock_issue_tbl = self.mox.CreateMock(sql.SQLTableManager)
+    self.cnxn = self.mox.CreateMock(sql.MonorailConnection)
+    self.issue_service = fake.IssueService()
+    self.spam_service = spam_svc.SpamService()
+    self.spam_service.report_tbl = self.mock_report_tbl
+    self.spam_service.verdict_tbl = self.mock_verdict_tbl
+    self.spam_service.issue_tbl = self.mock_issue_tbl
+
+    self.spam_service.report_tbl.Delete = Mock()
+    self.spam_service.verdict_tbl.Delete = Mock()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testLookupIssuesFlaggers(self):
+    self.mock_report_tbl.Select(
+        self.cnxn, cols=['issue_id', 'user_id', 'comment_id'],
+        issue_id=[234, 567, 890]).AndReturn([
+            [234, 111, None],
+            [234, 222, 1],
+            [567, 333, None]])
+    self.mox.ReplayAll()
+
+    reporters = (
+        self.spam_service.LookupIssuesFlaggers(self.cnxn, [234, 567, 890]))
+    self.mox.VerifyAll()
+    self.assertEqual({
+        234: ([111], {1: [222]}),
+        567: ([333], {}),
+    }, reporters)
+
+  def testLookupIssueFlaggers(self):
+    self.mock_report_tbl.Select(
+        self.cnxn, cols=['issue_id', 'user_id', 'comment_id'],
+        issue_id=[234]).AndReturn(
+            [[234, 111, None], [234, 222, 1]])
+    self.mox.ReplayAll()
+
+    issue_reporters, comment_reporters = (
+        self.spam_service.LookupIssueFlaggers(self.cnxn, 234))
+    self.mox.VerifyAll()
+    self.assertItemsEqual([111], issue_reporters)
+    self.assertEqual({1: [222]}, comment_reporters)
+
+  def testFlagIssues_overThresh(self):
+    issue = fake.MakeTestIssue(
+        project_id=789,
+        local_id=1,
+        reporter_id=111,
+        owner_id=456,
+        summary='sum',
+        status='Live',
+        issue_id=78901,
+        project_name='proj')
+    issue.assume_stale = False  # We will store this issue.
+
+    self.mock_report_tbl.InsertRows(self.cnxn,
+        ['issue_id', 'reported_user_id', 'user_id'],
+        [(78901, 111, 111)], ignore=True)
+
+    self.mock_report_tbl.Select(self.cnxn,
+        cols=['issue_id', 'COUNT(*)'], group_by=['issue_id'],
+        issue_id=[78901]).AndReturn([(78901, settings.spam_flag_thresh)])
+    self.mock_verdict_tbl.Select(
+        self.cnxn, cols=['issue_id', 'reason', 'MAX(created)'],
+        group_by=['issue_id'], issue_id=[78901], comment_id=None).AndReturn([])
+    self.mock_verdict_tbl.InsertRows(
+        self.cnxn, ['issue_id', 'is_spam', 'reason', 'project_id'],
+        [(78901, True, 'threshold', 789)], ignore=True)
+
+    self.mox.ReplayAll()
+    self.spam_service.FlagIssues(
+        self.cnxn, self.issue_service, [issue], 111, True)
+    self.mox.VerifyAll()
+    self.assertIn(issue, self.issue_service.updated_issues)
+
+    self.assertEqual(
+        1,
+        self.spam_service.issue_actions.get(
+            fields={
+                'type': 'flag',
+                'reporter_id': str(111),
+                'issue': 'proj:1'
+            }))
+
+  def testFlagIssues_underThresh(self):
+    issue = fake.MakeTestIssue(
+        project_id=789,
+        local_id=1,
+        reporter_id=111,
+        owner_id=456,
+        summary='sum',
+        status='Live',
+        issue_id=78901,
+        project_name='proj')
+
+    self.mock_report_tbl.InsertRows(self.cnxn,
+        ['issue_id', 'reported_user_id', 'user_id'],
+        [(78901, 111, 111)], ignore=True)
+
+    self.mock_report_tbl.Select(self.cnxn,
+        cols=['issue_id', 'COUNT(*)'], group_by=['issue_id'],
+        issue_id=[78901]).AndReturn([(78901, settings.spam_flag_thresh - 1)])
+
+    self.mock_verdict_tbl.Select(
+        self.cnxn, cols=['issue_id', 'reason', 'MAX(created)'],
+        group_by=['issue_id'], issue_id=[78901], comment_id=None).AndReturn([])
+
+    self.mox.ReplayAll()
+    self.spam_service.FlagIssues(
+        self.cnxn, self.issue_service, [issue], 111, True)
+    self.mox.VerifyAll()
+
+    self.assertNotIn(issue, self.issue_service.updated_issues)
+    self.assertIsNone(
+        self.spam_service.issue_actions.get(
+            fields={
+                'type': 'flag',
+                'reporter_id': str(111),
+                'issue': 'proj:1'
+            }))
+
+  def testUnflagIssue_overThresh(self):
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, reporter_id=111, owner_id=456,
+        summary='sum', status='Live', issue_id=78901, is_spam=True)
+    self.mock_report_tbl.Delete(self.cnxn, issue_id=[issue.issue_id],
+        comment_id=None, user_id=111)
+    self.mock_report_tbl.Select(self.cnxn,
+        cols=['issue_id', 'COUNT(*)'], group_by=['issue_id'],
+        issue_id=[78901]).AndReturn([(78901, settings.spam_flag_thresh)])
+
+    self.mock_verdict_tbl.Select(
+        self.cnxn, cols=['issue_id', 'reason', 'MAX(created)'],
+        group_by=['issue_id'], issue_id=[78901], comment_id=None).AndReturn([])
+
+    self.mox.ReplayAll()
+    self.spam_service.FlagIssues(
+        self.cnxn, self.issue_service, [issue], 111, False)
+    self.mox.VerifyAll()
+
+    self.assertNotIn(issue, self.issue_service.updated_issues)
+    self.assertEqual(True, issue.is_spam)
+
+  def testUnflagIssue_underThresh(self):
+    """A non-member un-flagging an issue as spam should not be able
+    to overturn the verdict to ham. This is different from previous
+    behavior. See https://crbug.com/monorail/2232 for details."""
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, reporter_id=111, owner_id=456,
+        summary='sum', status='Live', issue_id=78901, is_spam=True)
+    issue.assume_stale = False  # We will store this issue.
+    self.mock_report_tbl.Delete(self.cnxn, issue_id=[issue.issue_id],
+        comment_id=None, user_id=111)
+    self.mock_report_tbl.Select(self.cnxn,
+        cols=['issue_id', 'COUNT(*)'], group_by=['issue_id'],
+        issue_id=[78901]).AndReturn([(78901, settings.spam_flag_thresh - 1)])
+
+    self.mock_verdict_tbl.Select(
+        self.cnxn, cols=['issue_id', 'reason', 'MAX(created)'],
+        group_by=['issue_id'], issue_id=[78901], comment_id=None).AndReturn([])
+
+    self.mox.ReplayAll()
+    self.spam_service.FlagIssues(
+        self.cnxn, self.issue_service, [issue], 111, False)
+    self.mox.VerifyAll()
+
+    self.assertNotIn(issue, self.issue_service.updated_issues)
+    self.assertEqual(True, issue.is_spam)
+
+  def testUnflagIssue_underThreshNoManualOverride(self):
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, reporter_id=111, owner_id=456,
+        summary='sum', status='Live', issue_id=78901, is_spam=True)
+    self.mock_report_tbl.Delete(self.cnxn, issue_id=[issue.issue_id],
+        comment_id=None, user_id=111)
+    self.mock_report_tbl.Select(self.cnxn,
+        cols=['issue_id', 'COUNT(*)'], group_by=['issue_id'],
+        issue_id=[78901]).AndReturn([(78901, settings.spam_flag_thresh - 1)])
+
+    self.mock_verdict_tbl.Select(
+        self.cnxn, cols=['issue_id', 'reason', 'MAX(created)'],
+        group_by=['issue_id'], comment_id=None,
+        issue_id=[78901]).AndReturn([(78901, 'manual', '')])
+
+    self.mox.ReplayAll()
+    self.spam_service.FlagIssues(
+        self.cnxn, self.issue_service, [issue], 111, False)
+    self.mox.VerifyAll()
+
+    self.assertNotIn(issue, self.issue_service.updated_issues)
+    self.assertEqual(True, issue.is_spam)
+
+  def testGetIssueClassifierQueue_noVerdicts(self):
+    self.mock_verdict_tbl.Select(self.cnxn,
+        cols=['issue_id', 'is_spam', 'reason', 'classifier_confidence',
+              'created'],
+        where=[
+             ('project_id = %s', [789]),
+             ('classifier_confidence <= %s',
+                 [settings.classifier_moderation_thresh]),
+             ('overruled = %s', [False]),
+             ('issue_id IS NOT NULL', []),
+        ],
+        order_by=[
+             ('classifier_confidence ASC', []),
+             ('created ASC', [])
+        ],
+        group_by=['issue_id'],
+        offset=0,
+        limit=10,
+    ).AndReturn([])
+
+    self.mock_verdict_tbl.SelectValue(self.cnxn,
+        col='COUNT(*)',
+        where=[
+            ('project_id = %s', [789]),
+            ('classifier_confidence <= %s',
+                [settings.classifier_moderation_thresh]),
+            ('overruled = %s', [False]),
+            ('issue_id IS NOT NULL', []),
+        ]).AndReturn(0)
+
+    self.mox.ReplayAll()
+    res, count = self.spam_service.GetIssueClassifierQueue(
+        self.cnxn, self.issue_service, 789)
+    self.mox.VerifyAll()
+
+    self.assertEqual([], res)
+    self.assertEqual(0, count)
+
+  def testGetIssueClassifierQueue_someVerdicts(self):
+    self.mock_verdict_tbl.Select(self.cnxn,
+        cols=['issue_id', 'is_spam', 'reason', 'classifier_confidence',
+              'created'],
+        where=[
+             ('project_id = %s', [789]),
+             ('classifier_confidence <= %s',
+                 [settings.classifier_moderation_thresh]),
+             ('overruled = %s', [False]),
+             ('issue_id IS NOT NULL', []),
+        ],
+        order_by=[
+             ('classifier_confidence ASC', []),
+             ('created ASC', [])
+        ],
+        group_by=['issue_id'],
+        offset=0,
+        limit=10,
+    ).AndReturn([[78901, 0, "classifier", 0.9, "2015-12-10 11:06:24"]])
+
+    self.mock_verdict_tbl.SelectValue(self.cnxn,
+        col='COUNT(*)',
+        where=[
+            ('project_id = %s', [789]),
+            ('classifier_confidence <= %s',
+                [settings.classifier_moderation_thresh]),
+            ('overruled = %s', [False]),
+            ('issue_id IS NOT NULL', []),
+        ]).AndReturn(10)
+
+    self.mox.ReplayAll()
+    res, count  = self.spam_service.GetIssueClassifierQueue(
+        self.cnxn, self.issue_service, 789)
+    self.mox.VerifyAll()
+    self.assertEqual(1, len(res))
+    self.assertEqual(10, count)
+    self.assertEqual(78901, res[0].issue_id)
+    self.assertEqual(False, res[0].is_spam)
+    self.assertEqual("classifier", res[0].reason)
+    self.assertEqual(0.9, res[0].classifier_confidence)
+    self.assertEqual("2015-12-10 11:06:24", res[0].verdict_time)
+
+  def testIsExempt_RegularUser(self):
+    author = user_pb2.MakeUser(111, email='test@example.com')
+    self.assertFalse(self.spam_service._IsExempt(author, False))
+    author = user_pb2.MakeUser(111, email='test@chromium.org.example.com')
+    self.assertFalse(self.spam_service._IsExempt(author, False))
+
+  def testIsExempt_ProjectMember(self):
+    author = user_pb2.MakeUser(111, email='test@example.com')
+    self.assertTrue(self.spam_service._IsExempt(author, True))
+
+  def testIsExempt_AllowlistedDomain(self):
+    author = user_pb2.MakeUser(111, email='test@google.com')
+    self.assertTrue(self.spam_service._IsExempt(author, False))
+
+  def testClassifyIssue_spam(self):
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, reporter_id=111, owner_id=456,
+        summary='sum', status='Live', issue_id=78901, is_spam=True)
+    self.spam_service._predict = lambda body: 1.0
+
+    # Prevent missing service inits to fail the test.
+    self.spam_service.ml_engine = True
+
+    comment_pb = tracker_pb2.IssueComment()
+    comment_pb.content = "this is spam"
+    reporter = user_pb2.MakeUser(111, email='test@test.com')
+    res = self.spam_service.ClassifyIssue(issue, comment_pb, reporter, False)
+    self.assertEqual(1.0, res['confidence_is_spam'])
+
+    reporter.email = 'test@chromium.org.spam.com'
+    res = self.spam_service.ClassifyIssue(issue, comment_pb, reporter, False)
+    self.assertEqual(1.0, res['confidence_is_spam'])
+
+    reporter.email = 'test.google.com@test.com'
+    res = self.spam_service.ClassifyIssue(issue, comment_pb, reporter, False)
+    self.assertEqual(1.0, res['confidence_is_spam'])
+
+  def testClassifyIssue_Allowlisted(self):
+    issue = fake.MakeTestIssue(
+        project_id=789, local_id=1, reporter_id=111, owner_id=456,
+        summary='sum', status='Live', issue_id=78901, is_spam=True)
+    self.spam_service._predict = assert_unreached
+
+    # Prevent missing service inits to fail the test.
+    self.spam_service.ml_engine = True
+
+    comment_pb = tracker_pb2.IssueComment()
+    comment_pb.content = "this is spam"
+    reporter = user_pb2.MakeUser(111, email='test@google.com')
+    res = self.spam_service.ClassifyIssue(issue, comment_pb, reporter, False)
+    self.assertEqual(0.0, res['confidence_is_spam'])
+    reporter.email = 'test@chromium.org'
+    res = self.spam_service.ClassifyIssue(issue, comment_pb, reporter, False)
+    self.assertEqual(0.0, res['confidence_is_spam'])
+
+  def testClassifyComment_spam(self):
+    self.spam_service._predict = lambda body: 1.0
+
+    # Prevent missing service inits to fail the test.
+    self.spam_service.ml_engine = True
+
+    commenter = user_pb2.MakeUser(111, email='test@test.com')
+    res = self.spam_service.ClassifyComment('this is spam', commenter, False)
+    self.assertEqual(1.0, res['confidence_is_spam'])
+
+    commenter.email = 'test@chromium.org.spam.com'
+    res = self.spam_service.ClassifyComment('this is spam', commenter, False)
+    self.assertEqual(1.0, res['confidence_is_spam'])
+
+    commenter.email = 'test.google.com@test.com'
+    res = self.spam_service.ClassifyComment('this is spam', commenter, False)
+    self.assertEqual(1.0, res['confidence_is_spam'])
+
+  def testClassifyComment_Allowlisted(self):
+    self.spam_service._predict = assert_unreached
+
+    # Prevent missing service inits to fail the test.
+    self.spam_service.ml_engine = True
+
+    commenter = user_pb2.MakeUser(111, email='test@google.com')
+    res = self.spam_service.ClassifyComment('this is spam', commenter, False)
+    self.assertEqual(0.0, res['confidence_is_spam'])
+
+    commenter.email = 'test@chromium.org'
+    res = self.spam_service.ClassifyComment('this is spam', commenter, False)
+    self.assertEqual(0.0, res['confidence_is_spam'])
+
+  def test_ham_classification(self):
+    actual = self.spam_service.ham_classification()
+    self.assertEqual(actual['confidence_is_spam'], 0.0)
+    self.assertEqual(actual['failed_open'], False)
+
+  def testExpungeUsersInSpam(self):
+    user_ids = [3, 4, 5]
+    self.spam_service.ExpungeUsersInSpam(self.cnxn, user_ids=user_ids)
+
+    self.spam_service.report_tbl.Delete.assert_has_calls(
+        [
+            mock.call(self.cnxn, reported_user_id=user_ids, commit=False),
+            mock.call(self.cnxn, user_id=user_ids, commit=False)
+        ])
+    self.spam_service.verdict_tbl.Delete.assert_called_once_with(
+        self.cnxn, user_id=user_ids, commit=False)
+
+  def testLookupIssueVerdicts(self):
+    self.spam_service.verdict_tbl.Select = Mock(return_value=[
+      [5, 10], [4, 11], [6, 12],
+    ])
+    actual = self.spam_service.LookupIssueVerdicts(self.cnxn, [4, 5, 6])
+
+    self.spam_service.verdict_tbl.Select.assert_called_once_with(
+        self.cnxn, cols=['issue_id', 'reason', 'MAX(created)'],
+        issue_id=[4, 5, 6], comment_id=None, group_by=['issue_id'])
+    self.assertEqual(actual, {
+      5: 10,
+      4: 11,
+      6: 12,
+    })
diff --git a/services/test/star_svc_test.py b/services/test/star_svc_test.py
new file mode 100644
index 0000000..03a0d23
--- /dev/null
+++ b/services/test/star_svc_test.py
@@ -0,0 +1,225 @@
+# 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
+
+"""Tests for the star service."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mox
+import mock
+
+from google.appengine.ext import testbed
+
+import settings
+from mock import Mock
+from framework import sql
+from proto import user_pb2
+from services import star_svc
+from testing import fake
+
+
+class AbstractStarServiceTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.mox = mox.Mox()
+    self.mock_tbl = self.mox.CreateMock(sql.SQLTableManager)
+    self.cnxn = 'fake connection'
+    self.cache_manager = fake.CacheManager()
+    self.star_service = star_svc.AbstractStarService(
+        self.cache_manager, self.mock_tbl, 'item_id', 'user_id', 'project')
+    self.mock_tbl.Delete = Mock()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def SetUpExpungeStars(self):
+    self.mock_tbl.Delete(self.cnxn, item_id=123, commit=True)
+
+  def testExpungeStars(self):
+    self.SetUpExpungeStars()
+    self.mox.ReplayAll()
+    self.star_service.ExpungeStars(self.cnxn, 123)
+    self.mox.VerifyAll()
+
+  def testExpungeStars_Limit(self):
+    self.star_service.ExpungeStars(self.cnxn, 123, limit=50)
+    self.mock_tbl.Delete.assert_called_once_with(
+        self.cnxn, commit=True, limit=50, item_id=123)
+
+  def testExpungeStarsByUsers(self):
+    user_ids = [2, 3, 4]
+    self.star_service.ExpungeStarsByUsers(self.cnxn, user_ids, limit=40)
+    self.mock_tbl.Delete.assert_called_once_with(
+        self.cnxn, user_id=user_ids, commit=False, limit=40)
+
+  def SetUpLookupItemsStarrers(self):
+    self.mock_tbl.Select(
+        self.cnxn, cols=['item_id', 'user_id'],
+        item_id=[234]).AndReturn([(234, 111), (234, 222)])
+
+  def testLookupItemsStarrers(self):
+    self.star_service.starrer_cache.CacheItem(123, [111, 333])
+    self.SetUpLookupItemsStarrers()
+    self.mox.ReplayAll()
+    starrer_list_dict = self.star_service.LookupItemsStarrers(
+        self.cnxn, [123, 234])
+    self.mox.VerifyAll()
+    self.assertItemsEqual([123, 234], list(starrer_list_dict.keys()))
+    self.assertItemsEqual([111, 333], starrer_list_dict[123])
+    self.assertItemsEqual([111, 222], starrer_list_dict[234])
+    self.assertItemsEqual([111, 333],
+                          self.star_service.starrer_cache.GetItem(123))
+    self.assertItemsEqual([111, 222],
+                          self.star_service.starrer_cache.GetItem(234))
+
+  def SetUpLookupStarredItemIDs(self):
+    self.mock_tbl.Select(
+        self.cnxn, cols=['item_id'], user_id=111).AndReturn(
+            [(123,), (234,)])
+
+  def testLookupStarredItemIDs(self):
+    self.SetUpLookupStarredItemIDs()
+    self.mox.ReplayAll()
+    item_ids = self.star_service.LookupStarredItemIDs(self.cnxn, 111)
+    self.mox.VerifyAll()
+    self.assertItemsEqual([123, 234], item_ids)
+    self.assertItemsEqual([123, 234],
+                          self.star_service.star_cache.GetItem(111))
+
+  def testIsItemStarredBy(self):
+    self.SetUpLookupStarredItemIDs()
+    self.mox.ReplayAll()
+    self.assertTrue(self.star_service.IsItemStarredBy(self.cnxn, 123, 111))
+    self.assertTrue(self.star_service.IsItemStarredBy(self.cnxn, 234, 111))
+    self.assertFalse(
+        self.star_service.IsItemStarredBy(self.cnxn, 435, 111))
+    self.mox.VerifyAll()
+
+  def SetUpCountItemStars(self):
+    self.mock_tbl.Select(
+        self.cnxn, cols=['item_id', 'COUNT(user_id)'], item_id=[234],
+        group_by=['item_id']).AndReturn([(234, 2)])
+
+  def testCountItemStars(self):
+    self.star_service.star_count_cache.CacheItem(123, 3)
+    self.SetUpCountItemStars()
+    self.mox.ReplayAll()
+    self.assertEqual(3, self.star_service.CountItemStars(self.cnxn, 123))
+    self.assertEqual(2, self.star_service.CountItemStars(self.cnxn, 234))
+    self.mox.VerifyAll()
+
+  def testCountItemsStars(self):
+    self.star_service.star_count_cache.CacheItem(123, 3)
+    self.SetUpCountItemStars()
+    self.mox.ReplayAll()
+    count_dict = self.star_service.CountItemsStars(
+        self.cnxn, [123, 234])
+    self.mox.VerifyAll()
+    self.assertItemsEqual([123, 234], list(count_dict.keys()))
+    self.assertEqual(3, count_dict[123])
+    self.assertEqual(2, count_dict[234])
+
+  def SetUpSetStar_Add(self):
+    self.mock_tbl.InsertRows(
+        self.cnxn, ['item_id', 'user_id'], [(123, 111)], ignore=True,
+        commit=True)
+
+  def testSetStar_Add(self):
+    self.SetUpSetStar_Add()
+    self.mox.ReplayAll()
+    self.star_service.SetStar(self.cnxn, 123, 111, True)
+    self.mox.VerifyAll()
+    self.assertFalse(self.star_service.star_cache.HasItem(123))
+    self.assertFalse(self.star_service.starrer_cache.HasItem(123))
+    self.assertFalse(self.star_service.star_count_cache.HasItem(123))
+
+  def SetUpSetStar_Remove(self):
+    self.mock_tbl.Delete(self.cnxn, item_id=123, user_id=[111])
+
+  def testSetStar_Remove(self):
+    self.SetUpSetStar_Remove()
+    self.mox.ReplayAll()
+    self.star_service.SetStar(self.cnxn, 123, 111, False)
+    self.mox.VerifyAll()
+    self.assertFalse(self.star_service.star_cache.HasItem(123))
+    self.assertFalse(self.star_service.starrer_cache.HasItem(123))
+    self.assertFalse(self.star_service.star_count_cache.HasItem(123))
+
+  def SetUpSetStarsBatch_Add(self):
+    self.mock_tbl.InsertRows(
+        self.cnxn, ['item_id', 'user_id'], [(123, 111), (123, 222)],
+        ignore=True, commit=True)
+
+  def testSetStarsBatch_Add(self):
+    self.SetUpSetStarsBatch_Add()
+    self.mox.ReplayAll()
+    self.star_service.SetStarsBatch(self.cnxn, 123, [111, 222], True)
+    self.mox.VerifyAll()
+    self.assertFalse(self.star_service.star_cache.HasItem(123))
+    self.assertFalse(self.star_service.starrer_cache.HasItem(123))
+    self.assertFalse(self.star_service.star_count_cache.HasItem(123))
+
+  def SetUpSetStarsBatch_Remove(self):
+    self.mock_tbl.Delete(self.cnxn, item_id=123, user_id=[111, 222])
+
+  def testSetStarsBatch_Remove(self):
+    self.SetUpSetStarsBatch_Remove()
+    self.mox.ReplayAll()
+    self.star_service.SetStarsBatch(self.cnxn, 123, [111, 222], False)
+    self.mox.VerifyAll()
+    self.assertFalse(self.star_service.star_cache.HasItem(123))
+    self.assertFalse(self.star_service.starrer_cache.HasItem(123))
+    self.assertFalse(self.star_service.star_count_cache.HasItem(123))
+
+
+class IssueStarServiceTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mock_tbl = mock.Mock()
+    self.mock_tbl.Delete = mock.Mock()
+    self.mock_tbl.InsertRows = mock.Mock()
+
+    self.cache_manager = fake.CacheManager()
+    with mock.patch(
+        'framework.sql.SQLTableManager', return_value=self.mock_tbl):
+      self.issue_star = star_svc.IssueStarService(
+          self.cache_manager)
+
+    self.cnxn = 'fake connection'
+
+  def testSetStarsBatch_SkipIssueUpdate_Remove(self):
+    self.issue_star.SetStarsBatch_SkipIssueUpdate(
+        self.cnxn, 78901, [111, 222], False)
+    self.mock_tbl.Delete.assert_called_once_with(
+        self.cnxn, issue_id=78901, user_id=[111, 222], commit=True)
+
+  def testSetStarsBatch_SkipIssueUpdate_Remove_NoCommit(self):
+    self.issue_star.SetStarsBatch_SkipIssueUpdate(
+        self.cnxn, 78901, [111, 222], False, commit=False)
+    self.mock_tbl.Delete.assert_called_once_with(
+        self.cnxn, issue_id=78901, user_id=[111, 222], commit=False)
+
+  def testSetStarsBatch_SkipIssueUpdate_Add(self):
+    self.issue_star.SetStarsBatch_SkipIssueUpdate(
+        self.cnxn, 78901, [111, 222], True)
+    self.mock_tbl.InsertRows.assert_called_once_with(
+        self.cnxn, ['issue_id', 'user_id'], [(78901, 111), (78901, 222)],
+        ignore=True, commit=True)
+
+  def testSetStarsBatch_SkipIssueUpdate_Add_NoCommit(self):
+    self.issue_star.SetStarsBatch_SkipIssueUpdate(
+        self.cnxn, 78901, [111, 222], True, commit=False)
+    self.mock_tbl.InsertRows.assert_called_once_with(
+        self.cnxn, ['issue_id', 'user_id'], [(78901, 111), (78901, 222)],
+        ignore=True, commit=False)
diff --git a/services/test/template_svc_test.py b/services/test/template_svc_test.py
new file mode 100644
index 0000000..964722d
--- /dev/null
+++ b/services/test/template_svc_test.py
@@ -0,0 +1,471 @@
+# Copyright 2018 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
+
+"""Unit tests for services.template_svc module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+
+from mock import Mock, patch
+
+from proto import tracker_pb2
+from services import template_svc
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+class TemplateSetTwoLevelCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.ts2lc = template_svc.TemplateSetTwoLevelCache(
+        cache_manager=fake.CacheManager(),
+        template_service=Mock(spec=template_svc.TemplateService))
+    self.ts2lc.template_service.template_tbl = Mock()
+
+  def testFetchItems_Empty(self):
+    self.ts2lc.template_service.template_tbl.Select .return_value = []
+    actual = self.ts2lc.FetchItems(cnxn=None, keys=[1, 2])
+    self.assertEqual({1: [], 2: []}, actual)
+
+  def testFetchItems_Normal(self):
+    # pylint: disable=unused-argument
+    def mockSelect(cnxn, cols, project_id, order_by):
+      assert project_id in (1, 2)
+      if project_id == 1:
+        return [
+          (8, 1, 'template-8', 'content', 'summary', False, 111, 'status',
+              False, False, False),
+          (9, 1, 'template-9', 'content', 'summary', False, 111, 'status',
+              True, False, False)]
+      else:
+        return [
+          (7, 2, 'template-7', 'content', 'summary', False, 111, 'status',
+              False, False, False)]
+
+    self.ts2lc.template_service.template_tbl.Select.side_effect = mockSelect
+    actual = self.ts2lc.FetchItems(cnxn=None, keys=[1, 2])
+    expected = {
+      1: [(8, 'template-8', False), (9, 'template-9', True)],
+      2: [(7, 'template-7', False)],
+    }
+    self.assertEqual(expected, actual)
+
+
+class TemplateDefTwoLevelCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.template_def_2lc = template_svc.TemplateDefTwoLevelCache(
+        cache_manager=fake.CacheManager(),
+        template_service=Mock(spec=template_svc.TemplateService))
+    self.template_def_2lc.template_service.template_tbl = Mock()
+    self.template_def_2lc.template_service.template2label_tbl = Mock()
+    self.template_def_2lc.template_service.template2component_tbl = Mock()
+    self.template_def_2lc.template_service.template2admin_tbl = Mock()
+    self.template_def_2lc.template_service.template2fieldvalue_tbl = Mock()
+    self.template_def_2lc.template_service.issuephasedef_tbl = Mock()
+    self.template_def_2lc.template_service.template2approvalvalue_tbl = Mock()
+
+  def testFetchItems_Empty(self):
+    self.template_def_2lc.template_service.template_tbl.Select\
+        .return_value = []
+    self.template_def_2lc.template_service.template2label_tbl.Select\
+        .return_value = []
+    self.template_def_2lc.template_service.template2component_tbl.Select\
+        .return_value = []
+    self.template_def_2lc.template_service.template2admin_tbl.Select\
+        .return_value = []
+    self.template_def_2lc.template_service.template2fieldvalue_tbl.Select\
+        .return_value = []
+    self.template_def_2lc.template_service.template2approvalvalue_tbl.Select\
+        .return_value = []
+
+    actual = self.template_def_2lc.FetchItems(cnxn=None, keys=[1, 2])
+    self.assertEqual({}, actual)
+
+  def testFetchItems_Normal(self):
+    template_9_row = (9, 1, 'template-9', 'content', 'summary',
+        False, 111, 'status',
+        False, False, False)
+    template_8_row = (8, 1, 'template-8', 'content', 'summary',
+        False, 111, 'status',
+        False, False, False)
+    template_7_row = (7, 2, 'template-7', 'content', 'summary',
+        False, 111, 'status',
+        False, False, False)
+
+    self.template_def_2lc.template_service.template_tbl.Select\
+        .return_value = [template_7_row, template_8_row,
+            template_9_row]
+    self.template_def_2lc.template_service.template2label_tbl.Select\
+        .return_value = [(9, 'label-1'), (7, 'label-2')]
+    self.template_def_2lc.template_service.template2component_tbl.Select\
+        .return_value = [(9, 13), (7, 14)]
+    self.template_def_2lc.template_service.template2admin_tbl.Select\
+        .return_value = [(9, 111), (7, 222)]
+
+    fv1_row = (15, None, 'fv-1', None, None, None, False)
+    fv2_row = (16, None, 'fv-2', None, None, None, False)
+    fv1 = tracker_bizobj.MakeFieldValue(*fv1_row)
+    fv2 = tracker_bizobj.MakeFieldValue(*fv2_row)
+    self.template_def_2lc.template_service.template2fieldvalue_tbl.Select\
+        .return_value = [((9,) + fv1_row[:-1]), ((7,) + fv2_row[:-1])]
+
+    av1_row = (17, 9, 19, 'na')
+    av2_row = (18, 7, 20, 'not_set')
+    av1 = tracker_pb2.ApprovalValue(approval_id=17, phase_id=19,
+                                    status=tracker_pb2.ApprovalStatus('NA'))
+    av2 = tracker_pb2.ApprovalValue(approval_id=18, phase_id=20,
+                                    status=tracker_pb2.ApprovalStatus(
+                                        'NOT_SET'))
+    phase1_row = (19, 'phase-1', 1)
+    phase2_row = (20, 'phase-2', 2)
+    phase1 = tracker_pb2.Phase(phase_id=19, name='phase-1', rank=1)
+    phase2 = tracker_pb2.Phase(phase_id=20, name='phase-2', rank=2)
+
+    self.template_def_2lc.template_service.template2approvalvalue_tbl.Select\
+        .return_value = [av1_row, av2_row]
+    self.template_def_2lc.template_service.issuephasedef_tbl.Select\
+        .return_value = [phase1_row, phase2_row]
+
+    actual = self.template_def_2lc.FetchItems(cnxn=None, keys=[7, 8, 9])
+    self.assertEqual(3, len(list(actual.keys())))
+    self.assertTrue(isinstance(actual[7], tracker_pb2.TemplateDef))
+    self.assertTrue(isinstance(actual[8], tracker_pb2.TemplateDef))
+    self.assertTrue(isinstance(actual[9], tracker_pb2.TemplateDef))
+
+    self.assertEqual(7, actual[7].template_id)
+    self.assertEqual(8, actual[8].template_id)
+    self.assertEqual(9, actual[9].template_id)
+
+    self.assertEqual(['label-2'], actual[7].labels)
+    self.assertEqual([], actual[8].labels)
+    self.assertEqual(['label-1'], actual[9].labels)
+
+    self.assertEqual([14], actual[7].component_ids)
+    self.assertEqual([], actual[8].component_ids)
+    self.assertEqual([13], actual[9].component_ids)
+
+    self.assertEqual([222], actual[7].admin_ids)
+    self.assertEqual([], actual[8].admin_ids)
+    self.assertEqual([111], actual[9].admin_ids)
+
+    self.assertEqual([fv2], actual[7].field_values)
+    self.assertEqual([], actual[8].field_values)
+    self.assertEqual([fv1], actual[9].field_values)
+
+    self.assertEqual([phase2], actual[7].phases)
+    self.assertEqual([], actual[8].phases)
+    self.assertEqual([phase1], actual[9].phases)
+
+    self.assertEqual([av2], actual[7].approval_values)
+    self.assertEqual([], actual[8].approval_values)
+    self.assertEqual([av1], actual[9].approval_values)
+
+
+class TemplateServiceTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = Mock()
+    self.template_service = template_svc.TemplateService(fake.CacheManager())
+    self.template_service.template_set_2lc = Mock()
+    self.template_service.template_def_2lc = Mock()
+
+  def testCreateDefaultProjectTemplates_Normal(self):
+    self.template_service.CreateIssueTemplateDef = Mock()
+    self.template_service.CreateDefaultProjectTemplates(self.cnxn, 789)
+
+    expected_calls = [
+        mock.call(self.cnxn, 789, tpl['name'], tpl['content'], tpl['summary'],
+          tpl['summary_must_be_edited'], tpl['status'],
+          tpl.get('members_only', False), True, False, None, tpl['labels'],
+          [], [], [], [])
+        for tpl in tracker_constants.DEFAULT_TEMPLATES]
+    self.template_service.CreateIssueTemplateDef.assert_has_calls(
+        expected_calls, any_order=True)
+
+  def testGetTemplateByName_Normal(self):
+    """GetTemplateByName returns a template that exists."""
+    result_dict = {789: [(1, 'one', 0)]}
+    template = tracker_pb2.TemplateDef(name='one')
+    self.template_service.template_set_2lc.GetAll.return_value = (
+        result_dict, None)
+    self.template_service.template_def_2lc.GetAll.return_value = (
+        {1: template}, None)
+    actual = self.template_service.GetTemplateByName(self.cnxn, 'one', 789)
+    self.assertEqual(actual.template_id, template.template_id)
+
+  def testGetTemplateByName_NotFound(self):
+    """When GetTemplateByName is given the name of a template that does not
+    exist."""
+    result_dict = {789: [(1, 'one', 0)]}
+    template = tracker_pb2.TemplateDef(name='one')
+    self.template_service.template_set_2lc.GetAll.return_value = (
+        result_dict, None)
+    self.template_service.template_def_2lc.GetAll.return_value = (
+        {1: template}, None)
+    actual = self.template_service.GetTemplateByName(self.cnxn, 'two', 789)
+    self.assertEqual(actual, None)
+
+  def testGetTemplateById_Normal(self):
+    """GetTemplateById_Normal returns a template that exists."""
+    template = tracker_pb2.TemplateDef(template_id=1, name='one')
+    self.template_service.template_def_2lc.GetAll.return_value = (
+        {1: template}, None)
+    actual = self.template_service.GetTemplateById(self.cnxn, 1)
+    self.assertEqual(actual.template_id, template.template_id)
+
+  def testGetTemplateById_NotFound(self):
+    """When GetTemplateById is given the ID of a template that does not
+    exist."""
+    self.template_service.template_def_2lc.GetAll.return_value = (
+        {}, None)
+    actual = self.template_service.GetTemplateById(self.cnxn, 1)
+    self.assertEqual(actual, None)
+
+  def testGetTemplatesById_Normal(self):
+    """GetTemplatesById_Normal returns a template that exists."""
+    template = tracker_pb2.TemplateDef(template_id=1, name='one')
+    self.template_service.template_def_2lc.GetAll.return_value = (
+        {1: template}, None)
+    actual = self.template_service.GetTemplatesById(self.cnxn, 1)
+    self.assertEqual(actual[0].template_id, template.template_id)
+
+  def testGetTemplatesById_NotFound(self):
+    """When GetTemplatesById is given the ID of a template that does not
+    exist."""
+    self.template_service.template_def_2lc.GetAll.return_value = (
+        {}, None)
+    actual = self.template_service.GetTemplatesById(self.cnxn, 1)
+    self.assertEqual(actual, [])
+
+  def testGetProjectTemplates_Normal(self):
+    template_set = [(1, 'one', 0), (2, 'two', 1)]
+    result_dict = {789: template_set}
+    self.template_service.template_set_2lc.GetAll.return_value = (
+        result_dict, None)
+    self.template_service.template_def_2lc.GetAll.return_value = (
+        {1: tracker_pb2.TemplateDef()}, None)
+
+    self.assertEqual([tracker_pb2.TemplateDef()],
+        self.template_service.GetProjectTemplates(self.cnxn, 789))
+    self.template_service.template_set_2lc.GetAll.assert_called_once_with(
+        self.cnxn, [789])
+
+  def testExpungeProjectTemplates(self):
+    template_id_rows = [(1,), (2,)]
+    self.template_service.template_tbl.Select = Mock(
+        return_value=template_id_rows)
+    self.template_service.template2label_tbl.Delete = Mock()
+    self.template_service.template2component_tbl.Delete = Mock()
+    self.template_service.template_tbl.Delete = Mock()
+
+    self.template_service.ExpungeProjectTemplates(self.cnxn, 789)
+
+    self.template_service.template_tbl.Select\
+        .assert_called_once_with(self.cnxn, project_id=789, cols=['id'])
+    self.template_service.template2label_tbl.Delete\
+        .assert_called_once_with(self.cnxn, template_id=[1, 2])
+    self.template_service.template2component_tbl.Delete\
+        .assert_called_once_with(self.cnxn, template_id=[1, 2])
+    self.template_service.template_tbl.Delete\
+        .assert_called_once_with(self.cnxn, project_id=789)
+
+
+class CreateIssueTemplateDefTest(TemplateServiceTest):
+
+  def setUp(self):
+    super(CreateIssueTemplateDefTest, self).setUp()
+
+    self.template_service.template_tbl.InsertRow = Mock(return_value=1)
+    self.template_service.template2label_tbl.InsertRows = Mock()
+    self.template_service.template2component_tbl.InsertRows = Mock()
+    self.template_service.template2admin_tbl.InsertRows = Mock()
+    self.template_service.template2fieldvalue_tbl.InsertRows = Mock()
+    self.template_service.issuephasedef_tbl.InsertRow = Mock(return_value=81)
+    self.template_service.template2approvalvalue_tbl.InsertRows = Mock()
+    self.template_service.template_set_2lc._StrToKey = Mock(return_value=789)
+
+  def testCreateIssueTemplateDef(self):
+    fv = tracker_bizobj.MakeFieldValue(
+        1, None, 'somestring', None, None, None, False)
+    av_23 = tracker_pb2.ApprovalValue(
+        approval_id=23, phase_id=11,
+        status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW)
+    av_24 = tracker_pb2.ApprovalValue(approval_id=24, phase_id=11)
+    approval_values = [av_23, av_24]
+    phases = [tracker_pb2.Phase(
+        name='Canary', rank=11, phase_id=11)]
+
+    actual_template_id = self.template_service.CreateIssueTemplateDef(
+        self.cnxn, 789, 'template', 'content', 'summary', True, 'Available',
+        True, True, True, owner_id=111, labels=['label'], component_ids=[3],
+        admin_ids=[222], field_values=[fv], phases=phases,
+        approval_values=approval_values)
+
+    self.assertEqual(1, actual_template_id)
+
+    self.template_service.template_tbl.InsertRow\
+        .assert_called_once_with(self.cnxn, project_id=789, name='template',
+            content='content', summary='summary', summary_must_be_edited=True,
+            owner_id=111, status='Available', members_only=True,
+            owner_defaults_to_member=True, component_required=True,
+            commit=False)
+    self.template_service.template2label_tbl.InsertRows\
+        .assert_called_once_with(self.cnxn, template_svc.TEMPLATE2LABEL_COLS,
+            [(1, 'label')], commit=False)
+    self.template_service.template2component_tbl.InsertRows\
+        .assert_called_once_with(self.cnxn,
+            template_svc.TEMPLATE2COMPONENT_COLS,
+            [(1, 3)], commit=False)
+    self.template_service.template2admin_tbl.InsertRows\
+        .assert_called_once_with(self.cnxn, template_svc.TEMPLATE2ADMIN_COLS,
+            [(1, 222)], commit=False)
+    self.template_service.template2fieldvalue_tbl.InsertRows\
+        .assert_called_once_with(self.cnxn,
+            template_svc.TEMPLATE2FIELDVALUE_COLS,
+            [(1, 1, None, 'somestring', None, None, None)], commit=False)
+    self.template_service.issuephasedef_tbl.InsertRow\
+        .assert_called_once_with(self.cnxn, name='Canary',
+            rank=11, commit=False)
+    self.template_service.template2approvalvalue_tbl.InsertRows\
+        .assert_called_once_with(self.cnxn,
+            template_svc.TEMPLATE2APPROVALVALUE_COLS,
+            [(23, 1, 81, 'needs_review'), (24, 1, 81, 'not_set')], commit=False)
+    self.cnxn.Commit.assert_called_once_with()
+    self.template_service.template_set_2lc.InvalidateKeys\
+        .assert_called_once_with(self.cnxn, [789])
+
+
+class UpdateIssueTemplateDefTest(TemplateServiceTest):
+
+  def setUp(self):
+    super(UpdateIssueTemplateDefTest, self).setUp()
+
+    self.template_service.template_tbl.Update = Mock()
+    self.template_service.template2label_tbl.Delete = Mock()
+    self.template_service.template2label_tbl.InsertRows = Mock()
+    self.template_service.template2admin_tbl.Delete = Mock()
+    self.template_service.template2admin_tbl.InsertRows = Mock()
+    self.template_service.template2approvalvalue_tbl.Delete = Mock()
+    self.template_service.issuephasedef_tbl.InsertRow = Mock(return_value=1)
+    self.template_service.template2approvalvalue_tbl.InsertRows = Mock()
+    self.template_service.template_set_2lc._StrToKey = Mock(return_value=789)
+
+  def testUpdateIssueTemplateDef(self):
+    av_20 = tracker_pb2.ApprovalValue(approval_id=20, phase_id=11)
+    av_21 = tracker_pb2.ApprovalValue(approval_id=21, phase_id=11)
+    approval_values = [av_20, av_21]
+    phases = [tracker_pb2.Phase(
+        name='Canary', phase_id=11, rank=11)]
+    self.template_service.UpdateIssueTemplateDef(
+        self.cnxn, 789, 1, content='content', summary='summary',
+        component_required=True, labels=[], admin_ids=[111],
+        phases=phases, approval_values=approval_values)
+
+    new_values = dict(
+        content='content', summary='summary', component_required=True)
+    self.template_service.template_tbl.Update\
+        .assert_called_once_with(self.cnxn, new_values, id=1, commit=False)
+    self.template_service.template2label_tbl.Delete\
+        .assert_called_once_with(self.cnxn, template_id=1, commit=False)
+    self.template_service.template2label_tbl.InsertRows\
+        .assert_called_once_with(self.cnxn, template_svc.TEMPLATE2LABEL_COLS,
+            [], commit=False)
+    self.template_service.template2admin_tbl.Delete\
+        .assert_called_once_with(self.cnxn, template_id=1, commit=False)
+    self.template_service.template2admin_tbl.InsertRows\
+        .assert_called_once_with(self.cnxn, template_svc.TEMPLATE2ADMIN_COLS,
+            [(1, 111)], commit=False)
+    self.template_service.template2approvalvalue_tbl.Delete\
+        .assert_called_once_with(self.cnxn, template_id=1, commit=False)
+    self.template_service.issuephasedef_tbl.InsertRow\
+        .assert_called_once_with(self.cnxn, name='Canary',
+            rank=11, commit=False)
+    self.template_service.template2approvalvalue_tbl.InsertRows\
+        .assert_called_once_with(self.cnxn,
+            template_svc.TEMPLATE2APPROVALVALUE_COLS,
+            [(20, 1, 1, 'not_set'), (21, 1, 1, 'not_set')], commit=False)
+    self.cnxn.Commit.assert_called_once_with()
+    self.template_service.template_set_2lc.InvalidateKeys\
+        .assert_called_once_with(self.cnxn, [789])
+    self.template_service.template_def_2lc.InvalidateKeys\
+        .assert_called_once_with(self.cnxn, [1])
+
+
+class DeleteTemplateTest(TemplateServiceTest):
+
+  def testDeleteIssueTemplateDef(self):
+    self.template_service.template2label_tbl.Delete = Mock()
+    self.template_service.template2component_tbl.Delete = Mock()
+    self.template_service.template2admin_tbl.Delete = Mock()
+    self.template_service.template2fieldvalue_tbl.Delete = Mock()
+    self.template_service.template2approvalvalue_tbl.Delete = Mock()
+    self.template_service.template_tbl.Delete = Mock()
+    self.template_service.template_set_2lc._StrToKey = Mock(return_value=789)
+
+    self.template_service.DeleteIssueTemplateDef(self.cnxn, 789, 1)
+
+    self.template_service.template2label_tbl.Delete\
+        .assert_called_once_with(self.cnxn, template_id=1, commit=False)
+    self.template_service.template2component_tbl.Delete\
+        .assert_called_once_with(self.cnxn, template_id=1, commit=False)
+    self.template_service.template2admin_tbl.Delete\
+        .assert_called_once_with(self.cnxn, template_id=1, commit=False)
+    self.template_service.template2fieldvalue_tbl.Delete\
+        .assert_called_once_with(self.cnxn, template_id=1, commit=False)
+    self.template_service.template2approvalvalue_tbl.Delete\
+        .assert_called_once_with(self.cnxn, template_id=1, commit=False)
+    self.template_service.template_tbl.Delete\
+        .assert_called_once_with(self.cnxn, id=1, commit=False)
+    self.cnxn.Commit.assert_called_once_with()
+    self.template_service.template_set_2lc.InvalidateKeys\
+        .assert_called_once_with(self.cnxn, [789])
+    self.template_service.template_def_2lc.InvalidateKeys\
+        .assert_called_once_with(self.cnxn, [1])
+
+
+class ExpungeUsersInTemplatesTest(TemplateServiceTest):
+
+  def setUp(self):
+    super(ExpungeUsersInTemplatesTest, self).setUp()
+
+    self.template_service.template2admin_tbl.Delete = Mock()
+    self.template_service.template2fieldvalue_tbl.Delete = Mock()
+    self.template_service.template_tbl.Update = Mock()
+
+  def testExpungeUsersInTemplates(self):
+    user_ids = [111, 222]
+    self.template_service.ExpungeUsersInTemplates(self.cnxn, user_ids, limit=60)
+
+    self.template_service.template2admin_tbl.Delete.assert_called_once_with(
+            self.cnxn, admin_id=user_ids, commit=False, limit=60)
+    self.template_service.template2fieldvalue_tbl\
+        .Delete.assert_called_once_with(
+            self.cnxn, user_id=user_ids, commit=False, limit=60)
+    self.template_service.template_tbl.Update.assert_called_once_with(
+        self.cnxn, {'owner_id': None}, owner_id=user_ids, commit=False)
+
+
+class UnpackTemplateTest(unittest.TestCase):
+
+  def testEmpty(self):
+    with self.assertRaises(ValueError):
+      template_svc.UnpackTemplate(())
+
+  def testNormal(self):
+    row = (1, 2, 'name', 'content', 'summary', False, 3, 'status', False,
+        False, False)
+    self.assertEqual(
+        tracker_pb2.TemplateDef(template_id=1, name='name',
+          content='content', summary='summary', summary_must_be_edited=False,
+          owner_id=3, status='status', members_only=False,
+          owner_defaults_to_member=False,
+          component_required=False),
+        template_svc.UnpackTemplate(row))
diff --git a/services/test/tracker_fulltext_test.py b/services/test/tracker_fulltext_test.py
new file mode 100644
index 0000000..db8a7a7
--- /dev/null
+++ b/services/test/tracker_fulltext_test.py
@@ -0,0 +1,283 @@
+# 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
+
+"""Unit tests for tracker_fulltext module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mox
+
+from google.appengine.api import search
+
+import settings
+from framework import framework_views
+from proto import ast_pb2
+from proto import tracker_pb2
+from services import fulltext_helpers
+from services import tracker_fulltext
+from testing import fake
+from tracker import tracker_bizobj
+
+
+class TrackerFulltextTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.mock_index = self.mox.CreateMockAnything()
+    self.mox.StubOutWithMock(search, 'Index')
+    self.docs = None
+    self.cnxn = 'fake connection'
+    self.user_service = fake.UserService()
+    self.user_service.TestAddUser('test@example.com', 111)
+    self.issue_service = fake.IssueService()
+    self.config_service = fake.ConfigService()
+
+    self.issue = fake.MakeTestIssue(
+        123, 1, 'test summary', 'New', 111)
+    self.issue_service.TestAddIssue(self.issue)
+    self.comment = tracker_pb2.IssueComment(
+        project_id=789, issue_id=self.issue.issue_id, user_id=111,
+        content='comment content',
+        attachments=[
+            tracker_pb2.Attachment(filename='hello.c'),
+            tracker_pb2.Attachment(filename='hello.h')])
+    self.issue_service.TestAddComment(self.comment, 1)
+    self.users_by_id = framework_views.MakeAllUserViews(
+        self.cnxn, self.user_service, [111])
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def RecordDocs(self, docs):
+    self.docs = docs
+
+  def SetUpIndexIssues(self):
+    search.Index(name=settings.search_index_name_format % 1).AndReturn(
+        self.mock_index)
+    self.mock_index.put(mox.IgnoreArg()).WithSideEffects(self.RecordDocs)
+
+  def testIndexIssues(self):
+    self.SetUpIndexIssues()
+    self.mox.ReplayAll()
+    tracker_fulltext.IndexIssues(
+        self.cnxn, [self.issue], self.user_service, self.issue_service,
+        self.config_service)
+    self.mox.VerifyAll()
+    self.assertEqual(1, len(self.docs))
+    issue_doc = self.docs[0]
+    self.assertEqual(123, issue_doc.fields[0].value)
+    self.assertEqual('test summary', issue_doc.fields[1].value)
+
+  def SetUpCreateIssueSearchDocuments(self):
+    self.mox.StubOutWithMock(tracker_fulltext, '_IndexDocsInShard')
+    tracker_fulltext._IndexDocsInShard(1, mox.IgnoreArg()).WithSideEffects(
+        lambda shard_id, docs: self.RecordDocs(docs))
+
+  def testCreateIssueSearchDocuments_Normal(self):
+    self.SetUpCreateIssueSearchDocuments()
+    self.mox.ReplayAll()
+    config_dict = {123: tracker_bizobj.MakeDefaultProjectIssueConfig(123)}
+    tracker_fulltext._CreateIssueSearchDocuments(
+        [self.issue], {self.issue.issue_id: [self.comment]}, self.users_by_id,
+        config_dict)
+    self.mox.VerifyAll()
+    self.assertEqual(1, len(self.docs))
+    issue_doc = self.docs[0]
+    self.assertEqual(5, len(issue_doc.fields))
+    self.assertEqual(123, issue_doc.fields[0].value)
+    self.assertEqual('test summary', issue_doc.fields[1].value)
+    self.assertEqual('test@example.com comment content hello.c hello.h',
+                     issue_doc.fields[3].value)
+    self.assertEqual('', issue_doc.fields[4].value)
+
+  def testCreateIssueSearchDocuments_NoIndexableComments(self):
+    """Sometimes all comments on a issue are spam or deleted."""
+    self.SetUpCreateIssueSearchDocuments()
+    self.mox.ReplayAll()
+    config_dict = {123: tracker_bizobj.MakeDefaultProjectIssueConfig(123)}
+    self.comment.deleted_by = 111
+    tracker_fulltext._CreateIssueSearchDocuments(
+        [self.issue], {self.issue.issue_id: [self.comment]}, self.users_by_id,
+        config_dict)
+    self.mox.VerifyAll()
+    self.assertEqual(1, len(self.docs))
+    issue_doc = self.docs[0]
+    self.assertEqual(5, len(issue_doc.fields))
+    self.assertEqual(123, issue_doc.fields[0].value)
+    self.assertEqual('test summary', issue_doc.fields[1].value)
+    self.assertEqual('', issue_doc.fields[3].value)
+    self.assertEqual('', issue_doc.fields[4].value)
+
+  def testCreateIssueSearchDocuments_CustomFields(self):
+    self.SetUpCreateIssueSearchDocuments()
+    self.mox.ReplayAll()
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(123)
+    config_dict = {123: tracker_bizobj.MakeDefaultProjectIssueConfig(123)}
+    int_field = tracker_bizobj.MakeFieldDef(
+        1, 123, 'CustomInt', tracker_pb2.FieldTypes.INT_TYPE, None, False,
+        False, False, None, None, None, None, False, None, None, None,
+        'no_action', 'A custom int field', False)
+    int_field_value = tracker_bizobj.MakeFieldValue(
+        1, 42, None, None, False, None, None)
+    str_field = tracker_bizobj.MakeFieldDef(
+        2, 123, 'CustomStr', tracker_pb2.FieldTypes.STR_TYPE, None, False,
+        False, False, None, None, None, None, False, None, None, None,
+        'no_action', 'A custom string field', False)
+    str_field_value = tracker_bizobj.MakeFieldValue(
+        2, None, u'\xf0\x9f\x92\x96\xef\xb8\x8f', None, None, None, False)
+    # TODO(jrobbins): user-type field 3
+    date_field = tracker_bizobj.MakeFieldDef(
+        4, 123, 'CustomDate', tracker_pb2.FieldTypes.DATE_TYPE, None, False,
+        False, False, None, None, None, None, False, None, None, None,
+        'no_action', 'A custom date field', False)
+    date_field_value = tracker_bizobj.MakeFieldValue(
+        4, None, None, None, 1234567890, None, False)
+    config.field_defs.extend([int_field, str_field, date_field])
+    self.issue.field_values.extend([
+        int_field_value, str_field_value, date_field_value])
+
+    tracker_fulltext._CreateIssueSearchDocuments(
+        [self.issue], {self.issue.issue_id: [self.comment]}, self.users_by_id,
+        config_dict)
+    self.mox.VerifyAll()
+    self.assertEqual(1, len(self.docs))
+    issue_doc = self.docs[0]
+    metadata = issue_doc.fields[2]
+    self.assertEqual(
+      u'New test@example.com []  42 \xf0\x9f\x92\x96\xef\xb8\x8f 2009-02-13 ',
+      metadata.value)
+
+  def testExtractCommentText(self):
+    extracted_text = tracker_fulltext._ExtractCommentText(
+        self.comment, self.users_by_id)
+    self.assertEqual(
+        'test@example.com comment content hello.c hello.h',
+        extracted_text)
+
+  def testIndexableComments_NumberOfComments(self):
+    """We consider at most 100 initial comments and 500 most recent comments."""
+    comments = [self.comment]
+    indexable = tracker_fulltext._IndexableComments(comments, self.users_by_id)
+    self.assertEqual(1, len(indexable))
+
+    comments = [self.comment] * 100
+    indexable = tracker_fulltext._IndexableComments(comments, self.users_by_id)
+    self.assertEqual(100, len(indexable))
+
+    comments = [self.comment] * 101
+    indexable = tracker_fulltext._IndexableComments(comments, self.users_by_id)
+    self.assertEqual(101, len(indexable))
+
+    comments = [self.comment] * 600
+    indexable = tracker_fulltext._IndexableComments(comments, self.users_by_id)
+    self.assertEqual(600, len(indexable))
+
+    comments = [self.comment] * 601
+    indexable = tracker_fulltext._IndexableComments(comments, self.users_by_id)
+    self.assertEqual(600, len(indexable))
+    self.assertNotIn(100, indexable)
+
+  def testIndexableComments_NumberOfChars(self):
+    """We consider comments that can fit into the search index document."""
+    self.comment.content = 'x' * 1000
+    comments = [self.comment] * 100
+
+    indexable = tracker_fulltext._IndexableComments(
+        comments, self.users_by_id, remaining_chars=100000)
+    self.assertEqual(100, len(indexable))
+
+    indexable = tracker_fulltext._IndexableComments(
+        comments, self.users_by_id, remaining_chars=50000)
+    self.assertEqual(50, len(indexable))
+    indexable = tracker_fulltext._IndexableComments(
+        comments, self.users_by_id, remaining_chars=50999)
+    self.assertEqual(50, len(indexable))
+
+    indexable = tracker_fulltext._IndexableComments(
+        comments, self.users_by_id, remaining_chars=999)
+    self.assertEqual(0, len(indexable))
+
+    indexable = tracker_fulltext._IndexableComments(
+      comments, self.users_by_id, remaining_chars=0)
+    self.assertEqual(0, len(indexable))
+
+    indexable = tracker_fulltext._IndexableComments(
+      comments, self.users_by_id, remaining_chars=-1)
+    self.assertEqual(0, len(indexable))
+
+  def SetUpUnindexIssues(self):
+    search.Index(name=settings.search_index_name_format % 1).AndReturn(
+        self.mock_index)
+    self.mock_index.delete(['1'])
+
+  def testUnindexIssues(self):
+    self.SetUpUnindexIssues()
+    self.mox.ReplayAll()
+    tracker_fulltext.UnindexIssues([1])
+    self.mox.VerifyAll()
+
+  def SetUpSearchIssueFullText(self):
+    self.mox.StubOutWithMock(fulltext_helpers, 'ComprehensiveSearch')
+    fulltext_helpers.ComprehensiveSearch(
+        '(project_id:789) (summary:"test")',
+        settings.search_index_name_format % 1).AndReturn([123, 234])
+
+  def testSearchIssueFullText_Normal(self):
+    self.SetUpSearchIssueFullText()
+    self.mox.ReplayAll()
+    summary_fd = tracker_pb2.FieldDef(
+        field_name='summary', field_type=tracker_pb2.FieldTypes.STR_TYPE)
+    query_ast_conj = ast_pb2.Conjunction(conds=[
+        ast_pb2.Condition(
+            op=ast_pb2.QueryOp.TEXT_HAS, field_defs=[summary_fd],
+            str_values=['test'])])
+    issue_ids, capped = tracker_fulltext.SearchIssueFullText(
+        [789], query_ast_conj, 1)
+    self.mox.VerifyAll()
+    self.assertItemsEqual([123, 234], issue_ids)
+    self.assertFalse(capped)
+
+  def testSearchIssueFullText_CrossProject(self):
+    self.mox.StubOutWithMock(fulltext_helpers, 'ComprehensiveSearch')
+    fulltext_helpers.ComprehensiveSearch(
+        '(project_id:789 OR project_id:678) (summary:"test")',
+        settings.search_index_name_format % 1).AndReturn([123, 234])
+    self.mox.ReplayAll()
+
+    summary_fd = tracker_pb2.FieldDef(
+        field_name='summary', field_type=tracker_pb2.FieldTypes.STR_TYPE)
+    query_ast_conj = ast_pb2.Conjunction(conds=[
+        ast_pb2.Condition(
+            op=ast_pb2.QueryOp.TEXT_HAS, field_defs=[summary_fd],
+            str_values=['test'])])
+    issue_ids, capped = tracker_fulltext.SearchIssueFullText(
+        [789, 678], query_ast_conj, 1)
+    self.mox.VerifyAll()
+    self.assertItemsEqual([123, 234], issue_ids)
+    self.assertFalse(capped)
+
+  def testSearchIssueFullText_Capped(self):
+    try:
+      orig = settings.fulltext_limit_per_shard
+      settings.fulltext_limit_per_shard = 1
+      self.SetUpSearchIssueFullText()
+      self.mox.ReplayAll()
+      summary_fd = tracker_pb2.FieldDef(
+        field_name='summary', field_type=tracker_pb2.FieldTypes.STR_TYPE)
+      query_ast_conj = ast_pb2.Conjunction(conds=[
+          ast_pb2.Condition(
+              op=ast_pb2.QueryOp.TEXT_HAS, field_defs=[summary_fd],
+              str_values=['test'])])
+      issue_ids, capped = tracker_fulltext.SearchIssueFullText(
+          [789], query_ast_conj, 1)
+      self.mox.VerifyAll()
+      self.assertItemsEqual([123, 234], issue_ids)
+      self.assertTrue(capped)
+    finally:
+      settings.fulltext_limit_per_shard = orig
diff --git a/services/test/user_svc_test.py b/services/test/user_svc_test.py
new file mode 100644
index 0000000..4a8eb16
--- /dev/null
+++ b/services/test/user_svc_test.py
@@ -0,0 +1,600 @@
+# 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
+
+"""Tests for the user service."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mock
+import mox
+import time
+
+from google.appengine.ext import testbed
+
+from framework import exceptions
+from framework import framework_constants
+from framework import sql
+from proto import user_pb2
+from services import user_svc
+from testing import fake
+
+
+def SetUpGetUsers(user_service, cnxn):
+  """Set up expected calls to SQL tables."""
+  user_service.user_tbl.Select(
+      cnxn, cols=user_svc.USER_COLS, user_id=[333]).AndReturn(
+          [(333, 'c@example.com', False, False, False, False, True,
+            False, 'Spammer',
+            'stay_same_issue', False, False, True, 0, 0, None)])
+  user_service.linkedaccount_tbl.Select(
+      cnxn, cols=user_svc.LINKEDACCOUNT_COLS, parent_id=[333], child_id=[333],
+      or_where_conds=True).AndReturn([])
+
+
+def MakeUserService(cache_manager, my_mox):
+  user_service = user_svc.UserService(cache_manager)
+  user_service.user_tbl = my_mox.CreateMock(sql.SQLTableManager)
+  user_service.hotlistvisithistory_tbl = my_mox.CreateMock(sql.SQLTableManager)
+  user_service.linkedaccount_tbl = my_mox.CreateMock(sql.SQLTableManager)
+  # Account linking invites are done with patch().
+  return user_service
+
+
+class UserTwoLevelCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.mox = mox.Mox()
+    self.cnxn = fake.MonorailConnection()
+    self.cache_manager = fake.CacheManager()
+    self.user_service = MakeUserService(self.cache_manager, self.mox)
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  def testDeserializeUsersByID(self):
+    user_rows = [
+        (111, 'a@example.com', False, False, False, False, True, False, '',
+         'stay_same_issue', False, False, True, 0, 0, None),
+        (222, 'b@example.com', False, False, False, False, True, False, '',
+         'next_in_list', False, False, True, 0, 0, None),
+        ]
+    linkedaccount_rows = []
+    user_dict = self.user_service.user_2lc._DeserializeUsersByID(
+        user_rows, linkedaccount_rows)
+    self.assertEqual(2, len(user_dict))
+    self.assertEqual('a@example.com', user_dict[111].email)
+    self.assertFalse(user_dict[111].is_site_admin)
+    self.assertEqual('', user_dict[111].banned)
+    self.assertFalse(user_dict[111].notify_issue_change)
+    self.assertEqual('b@example.com', user_dict[222].email)
+    self.assertIsNone(user_dict[111].linked_parent_id)
+    self.assertEqual([], user_dict[111].linked_child_ids)
+    self.assertIsNone(user_dict[222].linked_parent_id)
+    self.assertEqual([], user_dict[222].linked_child_ids)
+
+  def testDeserializeUsersByID_LinkedAccounts(self):
+    user_rows = [
+        (111, 'a@example.com', False, False, False, False, True, False, '',
+         'stay_same_issue', False, False, True, 0, 0, None),
+        ]
+    linkedaccount_rows = [(111, 222), (111, 333), (444, 111)]
+    user_dict = self.user_service.user_2lc._DeserializeUsersByID(
+        user_rows, linkedaccount_rows)
+    self.assertEqual(1, len(user_dict))
+    user_pb = user_dict[111]
+    self.assertEqual('a@example.com', user_pb.email)
+    self.assertEqual(444, user_pb.linked_parent_id)
+    self.assertEqual([222, 333], user_pb.linked_child_ids)
+
+  def testFetchItems(self):
+    SetUpGetUsers(self.user_service, self.cnxn)
+    self.mox.ReplayAll()
+    user_dict = self.user_service.user_2lc.FetchItems(self.cnxn, [333])
+    self.mox.VerifyAll()
+    self.assertEqual([333], list(user_dict.keys()))
+    self.assertEqual('c@example.com', user_dict[333].email)
+    self.assertFalse(user_dict[333].is_site_admin)
+    self.assertEqual('Spammer', user_dict[333].banned)
+
+
+class UserServiceTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.mox = mox.Mox()
+    self.cnxn = fake.MonorailConnection()
+    self.cache_manager = fake.CacheManager()
+    self.user_service = MakeUserService(self.cache_manager, self.mox)
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def SetUpCreateUsers(self):
+    self.user_service.user_tbl.InsertRows(
+        self.cnxn,
+        ['user_id', 'email', 'obscure_email'],
+        [(3035911623, 'a@example.com', True),
+         (2996997680, 'b@example.com', True)]
+    ).AndReturn(None)
+
+  def testCreateUsers(self):
+    self.SetUpCreateUsers()
+    self.mox.ReplayAll()
+    self.user_service._CreateUsers(
+        self.cnxn, ['a@example.com', 'b@example.com'])
+    self.mox.VerifyAll()
+
+  def SetUpLookupUserEmails(self):
+    self.user_service.user_tbl.Select(
+        self.cnxn, cols=['user_id', 'email'], user_id=[222]).AndReturn(
+            [(222, 'b@example.com')])
+
+  def testLookupUserEmails(self):
+    self.SetUpLookupUserEmails()
+    self.user_service.email_cache.CacheItem(
+        111, 'a@example.com')
+    self.mox.ReplayAll()
+    emails_dict = self.user_service.LookupUserEmails(
+        self.cnxn, [111, 222])
+    self.mox.VerifyAll()
+    self.assertEqual(
+        {111: 'a@example.com', 222: 'b@example.com'},
+        emails_dict)
+
+  def SetUpLookupUserEmails_Missed(self):
+    self.user_service.user_tbl.Select(
+        self.cnxn, cols=['user_id', 'email'], user_id=[222]).AndReturn([])
+    self.user_service.email_cache.CacheItem(
+        111, 'a@example.com')
+
+  def testLookupUserEmails_Missed(self):
+    self.SetUpLookupUserEmails_Missed()
+    self.mox.ReplayAll()
+    with self.assertRaises(exceptions.NoSuchUserException):
+      self.user_service.LookupUserEmails(self.cnxn, [111, 222])
+    self.mox.VerifyAll()
+
+  def testLookUpUserEmails_IgnoreMissed(self):
+    self.SetUpLookupUserEmails_Missed()
+    self.mox.ReplayAll()
+    emails_dict = self.user_service.LookupUserEmails(
+        self.cnxn, [111, 222], ignore_missed=True)
+    self.mox.VerifyAll()
+    self.assertEqual({111: 'a@example.com'}, emails_dict)
+
+  def testLookupUserEmail(self):
+    self.SetUpLookupUserEmails()  # Same as testLookupUserEmails()
+    self.mox.ReplayAll()
+    email_addr = self.user_service.LookupUserEmail(self.cnxn, 222)
+    self.mox.VerifyAll()
+    self.assertEqual('b@example.com', email_addr)
+
+  def SetUpLookupUserIDs(self):
+    self.user_service.user_tbl.Select(
+        self.cnxn, cols=['email', 'user_id'],
+        email=['b@example.com']).AndReturn([('b@example.com', 222)])
+
+  def testLookupUserIDs(self):
+    self.SetUpLookupUserIDs()
+    self.user_service.user_id_cache.CacheItem(
+        'a@example.com', 111)
+    self.mox.ReplayAll()
+    user_id_dict = self.user_service.LookupUserIDs(
+        self.cnxn, ['a@example.com', 'b@example.com'])
+    self.mox.VerifyAll()
+    self.assertEqual(
+        {'a@example.com': 111, 'b@example.com': 222},
+        user_id_dict)
+
+  def testLookupUserIDs_InvalidEmail(self):
+    self.user_service.user_tbl.Select(
+        self.cnxn, cols=['email', 'user_id'], email=['abc']).AndReturn([])
+    self.mox.ReplayAll()
+    user_id_dict = self.user_service.LookupUserIDs(
+        self.cnxn, ['abc'], autocreate=True)
+    self.mox.VerifyAll()
+    self.assertEqual({}, user_id_dict)
+
+  def testLookupUserIDs_NoUserValue(self):
+    self.user_service.user_tbl.Select = mock.Mock(
+        return_value=[('b@example.com', 222)])
+    user_id_dict = self.user_service.LookupUserIDs(
+        self.cnxn, [framework_constants.NO_VALUES, '', 'b@example.com'])
+    self.assertEqual({'b@example.com': 222}, user_id_dict)
+    self.user_service.user_tbl.Select.assert_called_once_with(
+        self.cnxn, cols=['email', 'user_id'], email=['b@example.com'])
+
+  def testLookupUserID(self):
+    self.SetUpLookupUserIDs()  # Same as testLookupUserIDs()
+    self.user_service.user_id_cache.CacheItem('a@example.com', 111)
+    self.mox.ReplayAll()
+    user_id = self.user_service.LookupUserID(self.cnxn, 'b@example.com')
+    self.mox.VerifyAll()
+    self.assertEqual(222, user_id)
+
+  def SetUpGetUsersByIDs(self):
+    self.user_service.user_tbl.Select(
+        self.cnxn, cols=user_svc.USER_COLS, user_id=[333, 444]).AndReturn(
+            [
+                (
+                    333, 'c@example.com', False, False, False, False, True,
+                    False, 'Spammer', 'stay_same_issue', False, False, True, 0,
+                    0, None)
+            ])
+    self.user_service.linkedaccount_tbl.Select(
+        self.cnxn,
+        cols=user_svc.LINKEDACCOUNT_COLS,
+        parent_id=[333, 444],
+        child_id=[333, 444],
+        or_where_conds=True).AndReturn([])
+
+
+  def testGetUsersByIDs(self):
+    self.SetUpGetUsersByIDs()
+    user_a = user_pb2.User(email='a@example.com')
+    self.user_service.user_2lc.CacheItem(111, user_a)
+    self.mox.ReplayAll()
+    # 444 user does not exist.
+    user_dict = self.user_service.GetUsersByIDs(self.cnxn, [111, 333, 444])
+    self.mox.VerifyAll()
+    self.assertEqual(3, len(user_dict))
+    self.assertEqual('a@example.com', user_dict[111].email)
+    self.assertFalse(user_dict[111].is_site_admin)
+    self.assertFalse(user_dict[111].banned)
+    self.assertTrue(user_dict[111].notify_issue_change)
+    self.assertEqual('c@example.com', user_dict[333].email)
+    self.assertEqual(user_dict[444], user_pb2.MakeUser(444))
+
+  def testGetUsersByIDs_SkipMissed(self):
+    self.SetUpGetUsersByIDs()
+    user_a = user_pb2.User(email='a@example.com')
+    self.user_service.user_2lc.CacheItem(111, user_a)
+    self.mox.ReplayAll()
+    # 444 user does not exist
+    user_dict = self.user_service.GetUsersByIDs(
+        self.cnxn, [111, 333, 444], skip_missed=True)
+    self.mox.VerifyAll()
+    self.assertEqual(2, len(user_dict))
+    self.assertEqual('a@example.com', user_dict[111].email)
+    self.assertFalse(user_dict[111].is_site_admin)
+    self.assertFalse(user_dict[111].banned)
+    self.assertTrue(user_dict[111].notify_issue_change)
+    self.assertEqual('c@example.com', user_dict[333].email)
+
+  def testGetUser(self):
+    SetUpGetUsers(self.user_service, self.cnxn)
+    user_a = user_pb2.User(email='a@example.com')
+    self.user_service.user_2lc.CacheItem(111, user_a)
+    self.mox.ReplayAll()
+    user = self.user_service.GetUser(self.cnxn, 333)
+    self.mox.VerifyAll()
+    self.assertEqual('c@example.com', user.email)
+
+  def SetUpUpdateUser(self):
+    delta = {
+        'keep_people_perms_open': False,
+        'preview_on_hover': True,
+        'notify_issue_change': True,
+        'after_issue_update': 'STAY_SAME_ISSUE',
+        'notify_starred_issue_change': True,
+        'notify_starred_ping': False,
+        'is_site_admin': False,
+        'banned': 'Turned spammer',
+        'obscure_email': True,
+        'email_compact_subject': False,
+        'email_view_widget': True,
+        'last_visit_timestamp': 0,
+        'email_bounce_timestamp': 0,
+        'vacation_message': None,
+    }
+    self.user_service.user_tbl.Update(
+        self.cnxn, delta, user_id=111, commit=False)
+
+  def testUpdateUser(self):
+    self.SetUpUpdateUser()
+    user_a = user_pb2.User(
+        email='a@example.com', banned='Turned spammer')
+    self.mox.ReplayAll()
+    self.user_service.UpdateUser(self.cnxn, 111, user_a)
+    self.mox.VerifyAll()
+    self.assertFalse(self.user_service.user_2lc.HasItem(111))
+
+  def SetUpGetRecentlyVisitedHotlists(self):
+    self.user_service.hotlistvisithistory_tbl.Select(
+        self.cnxn, cols=['hotlist_id'], user_id=[111],
+        order_by=[('viewed DESC', [])], limit=10).AndReturn(
+            ((123,), (234,)))
+
+  def testGetRecentlyVisitedHotlists(self):
+    self.SetUpGetRecentlyVisitedHotlists()
+    self.mox.ReplayAll()
+    recent_hotlist_rows = self.user_service.GetRecentlyVisitedHotlists(
+        self.cnxn, 111)
+    self.mox.VerifyAll()
+    self.assertEqual(recent_hotlist_rows, [123, 234])
+
+  def SetUpAddVisitedHotlist(self, ts):
+    self.user_service.hotlistvisithistory_tbl.Delete(
+        self.cnxn, hotlist_id=123, user_id=111, commit=False)
+    self.user_service.hotlistvisithistory_tbl.InsertRows(
+        self.cnxn, user_svc.HOTLISTVISITHISTORY_COLS,
+        [(123, 111, ts)],
+        commit=False)
+
+  @mock.patch('time.time')
+  def testAddVisitedHotlist(self, mockTime):
+    ts = 122333
+    mockTime.return_value = ts
+    self.SetUpAddVisitedHotlist(ts)
+    self.mox.ReplayAll()
+    self.user_service.AddVisitedHotlist(self.cnxn, 111, 123, commit=False)
+    self.mox.VerifyAll()
+
+  def testExpungeHotlistsFromHistory(self):
+    self.user_service.hotlistvisithistory_tbl.Delete = mock.Mock()
+    hotlist_ids = [123, 223]
+    self.user_service.ExpungeHotlistsFromHistory(
+        self.cnxn, hotlist_ids, commit=False)
+    self.user_service.hotlistvisithistory_tbl.Delete.assert_called_once_with(
+        self.cnxn, hotlist_id=hotlist_ids, commit=False)
+
+  def testExpungeUsersHotlistsHistory(self):
+    self.user_service.hotlistvisithistory_tbl.Delete = mock.Mock()
+    user_ids = [111, 222]
+    self.user_service.ExpungeUsersHotlistsHistory(
+        self.cnxn, user_ids, commit=False)
+    self.user_service.hotlistvisithistory_tbl.Delete.assert_called_once_with(
+        self.cnxn, user_id=user_ids, commit=False)
+
+  def SetUpTrimUserVisitedHotlists(self, user_ids, ts):
+    self.user_service.hotlistvisithistory_tbl.Select(
+        self.cnxn, cols=['user_id'], group_by=['user_id'],
+        having=[('COUNT(*) > %s', [10])], limit=1000).AndReturn((
+            (111,), (222,), (333,)))
+    for user_id in user_ids:
+      self.user_service.hotlistvisithistory_tbl.Select(
+          self.cnxn, cols=['viewed'], user_id=user_id,
+          order_by=[('viewed DESC', [])]).AndReturn([
+              (ts,), (ts,), (ts,), (ts,), (ts,), (ts,),
+              (ts,), (ts,), (ts,), (ts,), (ts+1,)])
+      self.user_service.hotlistvisithistory_tbl.Delete(
+          self.cnxn, user_id=user_id, where=[('viewed < %s', [ts])],
+          commit=False)
+
+  @mock.patch('time.time')
+  def testTrimUserVisitedHotlists(self, mockTime):
+    ts = 122333
+    mockTime.return_value = ts
+    self.SetUpTrimUserVisitedHotlists([111, 222, 333], ts)
+    self.mox.ReplayAll()
+    self.user_service.TrimUserVisitedHotlists(self.cnxn, commit=False)
+    self.mox.VerifyAll()
+
+  def testGetPendingLinkedInvites_Anon(self):
+    """An Anon user never has invites to link accounts."""
+    as_parent, as_child = self.user_service.GetPendingLinkedInvites(
+        self.cnxn, 0)
+    self.assertEqual([], as_parent)
+    self.assertEqual([], as_child)
+
+  def testGetPendingLinkedInvites_None(self):
+    """A user who has no link invites gets empty lists."""
+    self.user_service.linkedaccountinvite_tbl = mock.Mock()
+    self.user_service.linkedaccountinvite_tbl.Select.return_value = []
+    as_parent, as_child = self.user_service.GetPendingLinkedInvites(
+        self.cnxn, 111)
+    self.assertEqual([], as_parent)
+    self.assertEqual([], as_child)
+
+  def testGetPendingLinkedInvites_Some(self):
+    """A user who has link invites can get them."""
+    self.user_service.linkedaccountinvite_tbl = mock.Mock()
+    self.user_service.linkedaccountinvite_tbl.Select.return_value = [
+        (111, 222), (111, 333), (888, 999), (333, 111)]
+    as_parent, as_child = self.user_service.GetPendingLinkedInvites(
+        self.cnxn, 111)
+    self.assertEqual([222, 333], as_parent)
+    self.assertEqual([333], as_child)
+
+  def testAssertNotAlreadyLinked_NotLinked(self):
+    """No exception is raised when accounts are not already linked."""
+    self.user_service.linkedaccount_tbl = mock.Mock()
+    self.user_service.linkedaccount_tbl.Select.return_value = []
+    self.user_service._AssertNotAlreadyLinked(self.cnxn, 111, 222)
+
+  def testAssertNotAlreadyLinked_AlreadyLinked(self):
+    """Reject attempt to link any account that is already linked."""
+    self.user_service.linkedaccount_tbl = mock.Mock()
+    self.user_service.linkedaccount_tbl.Select.return_value = [
+        (111, 222)]
+    with self.assertRaises(exceptions.InputException):
+      self.user_service._AssertNotAlreadyLinked(self.cnxn, 111, 333)
+
+  def testInviteLinkedParent_Anon(self):
+    """Anon cannot invite anyone to link accounts."""
+    with self.assertRaises(exceptions.InputException):
+      self.user_service.InviteLinkedParent(self.cnxn, 0, 0)
+    with self.assertRaises(exceptions.InputException):
+      self.user_service.InviteLinkedParent(self.cnxn, 111, 0)
+    with self.assertRaises(exceptions.InputException):
+      self.user_service.InviteLinkedParent(self.cnxn, 0, 111)
+
+  def testInviteLinkedParent_Normal(self):
+    """One account can invite another to link."""
+    self.user_service.linkedaccount_tbl = mock.Mock()
+    self.user_service.linkedaccount_tbl.Select.return_value = []
+    self.user_service.linkedaccountinvite_tbl = mock.Mock()
+    self.user_service.InviteLinkedParent(
+        self.cnxn, 111, 222)
+    self.user_service.linkedaccountinvite_tbl.InsertRow.assert_called_once_with(
+        self.cnxn, parent_id=111, child_id=222)
+
+  def testAcceptLinkedChild_Anon(self):
+    """Reject attempts for anon to accept any invite."""
+    with self.assertRaises(exceptions.InputException):
+      self.user_service.AcceptLinkedChild(self.cnxn, 0, 333)
+    with self.assertRaises(exceptions.InputException):
+      self.user_service.AcceptLinkedChild(self.cnxn, 333, 0)
+
+  def testAcceptLinkedChild_Missing(self):
+    """Reject attempts to link without a matching invite."""
+    self.user_service.linkedaccountinvite_tbl = mock.Mock()
+    self.user_service.linkedaccountinvite_tbl.Select.return_value = []
+    self.user_service.linkedaccount_tbl = mock.Mock()
+    self.user_service.linkedaccount_tbl.Select.return_value = []
+    with self.assertRaises(exceptions.InputException) as cm:
+      self.user_service.AcceptLinkedChild(self.cnxn, 111, 333)
+    self.assertEqual('No such invite', cm.exception.message)
+
+  def testAcceptLinkedChild_Normal(self):
+    """Create linkage between accounts and remove invite."""
+    self.user_service.linkedaccountinvite_tbl = mock.Mock()
+    self.user_service.linkedaccountinvite_tbl.Select.return_value = [
+        (111, 222), (333, 444)]
+    self.user_service.linkedaccount_tbl = mock.Mock()
+    self.user_service.linkedaccount_tbl.Select.return_value = []
+
+    self.user_service.AcceptLinkedChild(self.cnxn, 111, 222)
+    self.user_service.linkedaccount_tbl.InsertRow.assert_called_once_with(
+        self.cnxn, parent_id=111, child_id=222)
+    self.user_service.linkedaccountinvite_tbl.Delete.assert_called_once_with(
+        self.cnxn, parent_id=111, child_id=222)
+
+  def testUnlinkAccounts_MissingIDs(self):
+    """Reject an attempt to unlink anon."""
+    with self.assertRaises(exceptions.InputException):
+      self.user_service.UnlinkAccounts(self.cnxn, 0, 0)
+    with self.assertRaises(exceptions.InputException):
+      self.user_service.UnlinkAccounts(self.cnxn, 0, 111)
+    with self.assertRaises(exceptions.InputException):
+      self.user_service.UnlinkAccounts(self.cnxn, 111, 0)
+
+  def testUnlinkAccounts_Normal(self):
+    """We can unlink accounts."""
+    self.user_service.linkedaccount_tbl = mock.Mock()
+    self.user_service.UnlinkAccounts(self.cnxn, 111, 222)
+    self.user_service.linkedaccount_tbl.Delete.assert_called_once_with(
+        self.cnxn, parent_id=111, child_id=222)
+
+  def testUpdateUserSettings(self):
+    self.SetUpUpdateUser()
+    user_a = user_pb2.User(email='a@example.com')
+    self.mox.ReplayAll()
+    self.user_service.UpdateUserSettings(
+        self.cnxn, 111, user_a, is_banned=True,
+        banned_reason='Turned spammer')
+    self.mox.VerifyAll()
+
+  def testGetUsersPrefs(self):
+    self.user_service.userprefs_tbl = mock.Mock()
+    self.user_service.userprefs_tbl.Select.return_value = [
+        (111, 'code_font', 'true'),
+        (111, 'keep_perms_open', 'true'),
+        # Note: user 222 has not set any prefs.
+        (333, 'code_font', 'false')]
+
+    prefs_dict = self.user_service.GetUsersPrefs(self.cnxn, [111, 222, 333])
+
+    expected = {
+      111: user_pb2.UserPrefs(
+          user_id=111,
+          prefs=[user_pb2.UserPrefValue(name='code_font', value='true'),
+                 user_pb2.UserPrefValue(name='keep_perms_open', value='true')]),
+      222: user_pb2.UserPrefs(user_id=222),
+      333: user_pb2.UserPrefs(
+          user_id=333,
+          prefs=[user_pb2.UserPrefValue(name='code_font', value='false')]),
+      }
+    self.assertEqual(expected, prefs_dict)
+
+  def testGetUserPrefs(self):
+    self.user_service.userprefs_tbl = mock.Mock()
+    self.user_service.userprefs_tbl.Select.return_value = [
+        (111, 'code_font', 'true'),
+        (111, 'keep_perms_open', 'true'),
+        # Note: user 222 has not set any prefs.
+        (333, 'code_font', 'false')]
+
+    userprefs = self.user_service.GetUserPrefs(self.cnxn, 111)
+    expected = user_pb2.UserPrefs(
+        user_id=111,
+        prefs=[user_pb2.UserPrefValue(name='code_font', value='true'),
+               user_pb2.UserPrefValue(name='keep_perms_open', value='true')])
+    self.assertEqual(expected, userprefs)
+
+    userprefs = self.user_service.GetUserPrefs(self.cnxn, 222)
+    expected = user_pb2.UserPrefs(user_id=222)
+    self.assertEqual(expected, userprefs)
+
+  def testSetUserPrefs(self):
+    self.user_service.userprefs_tbl = mock.Mock()
+    pref_values = [user_pb2.UserPrefValue(name='code_font', value='true'),
+                   user_pb2.UserPrefValue(name='keep_perms_open', value='true')]
+    self.user_service.SetUserPrefs(self.cnxn, 111, pref_values)
+    self.user_service.userprefs_tbl.InsertRows.assert_called_once_with(
+        self.cnxn, user_svc.USERPREFS_COLS,
+        [(111, 'code_font', 'true'),
+         (111, 'keep_perms_open', 'true')],
+        replace=True)
+
+  def testExpungeUsers(self):
+    self.user_service.linkedaccount_tbl.Delete = mock.Mock()
+    self.user_service.linkedaccountinvite_tbl.Delete = mock.Mock()
+    self.user_service.userprefs_tbl.Delete = mock.Mock()
+    self.user_service.user_tbl.Delete = mock.Mock()
+
+    user_ids = [222, 444]
+    self.user_service.ExpungeUsers(self.cnxn, user_ids)
+
+    linked_account_calls = [
+        mock.call(self.cnxn, parent_id=user_ids, commit=False),
+        mock.call(self.cnxn, child_id=user_ids, commit=False)]
+    self.user_service.linkedaccount_tbl.Delete.has_calls(linked_account_calls)
+    self.user_service.linkedaccountinvite_tbl.Delete.has_calls(
+        linked_account_calls)
+    user_calls = [mock.call(self.cnxn, user_id=user_ids, commit=False)]
+    self.user_service.userprefs_tbl.Delete.has_calls(user_calls)
+    self.user_service.user_tbl.Delete.has_calls(user_calls)
+
+  def testTotalUsersCount(self):
+    self.user_service.user_tbl.SelectValue = mock.Mock(return_value=10)
+    self.assertEqual(self.user_service.TotalUsersCount(self.cnxn), 9)
+    self.user_service.user_tbl.SelectValue.assert_called_once_with(
+        self.cnxn, col='COUNT(*)')
+
+  def testGetAllUserEmailsBatch(self):
+    rows = [('cow@test.com',), ('pig@test.com',), ('fox@test.com',)]
+    self.user_service.user_tbl.Select = mock.Mock(return_value=rows)
+    emails = self.user_service.GetAllUserEmailsBatch(self.cnxn)
+    self.user_service.user_tbl.Select.assert_called_once_with(
+        self.cnxn, cols=['email'], limit=1000, offset=0,
+        where=[('user_id != %s', [framework_constants.DELETED_USER_ID])],
+        order_by=[('user_id ASC', [])])
+    self.assertItemsEqual(
+        emails, ['cow@test.com', 'pig@test.com', 'fox@test.com'])
+
+  def testGetAllUserEmailsBatch_CustomLimit(self):
+    rows = [('cow@test.com',), ('pig@test.com',), ('fox@test.com',)]
+    self.user_service.user_tbl.Select = mock.Mock(return_value=rows)
+    emails = self.user_service.GetAllUserEmailsBatch(
+        self.cnxn, limit=30, offset=60)
+    self.user_service.user_tbl.Select.assert_called_once_with(
+        self.cnxn, cols=['email'], limit=30, offset=60,
+        where=[('user_id != %s', [framework_constants.DELETED_USER_ID])],
+        order_by=[('user_id ASC', [])])
+    self.assertItemsEqual(
+        emails, ['cow@test.com', 'pig@test.com', 'fox@test.com'])
diff --git a/services/test/usergroup_svc_test.py b/services/test/usergroup_svc_test.py
new file mode 100644
index 0000000..5bfd899
--- /dev/null
+++ b/services/test/usergroup_svc_test.py
@@ -0,0 +1,562 @@
+# 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
+
+"""Tests for the usergroup service."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import mock
+import unittest
+
+import mox
+
+from google.appengine.ext import testbed
+
+from framework import exceptions
+from framework import permissions
+from framework import sql
+from proto import usergroup_pb2
+from services import service_manager
+from services import usergroup_svc
+from testing import fake
+
+
+def MakeUserGroupService(cache_manager, my_mox):
+  usergroup_service = usergroup_svc.UserGroupService(cache_manager)
+  usergroup_service.usergroup_tbl = my_mox.CreateMock(sql.SQLTableManager)
+  usergroup_service.usergroupsettings_tbl = my_mox.CreateMock(
+      sql.SQLTableManager)
+  usergroup_service.usergroupprojects_tbl = my_mox.CreateMock(
+      sql.SQLTableManager)
+  return usergroup_service
+
+
+class MembershipTwoLevelCacheTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.cache_manager = fake.CacheManager()
+    self.usergroup_service = MakeUserGroupService(self.cache_manager, self.mox)
+
+  def testDeserializeMemberships(self):
+    memberships_rows = [(111, 777), (111, 888), (222, 888)]
+    actual = self.usergroup_service.memberships_2lc._DeserializeMemberships(
+        memberships_rows)
+    self.assertItemsEqual([111, 222], list(actual.keys()))
+    self.assertItemsEqual([777, 888], actual[111])
+    self.assertItemsEqual([888], actual[222])
+
+
+class UserGroupServiceTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+
+    self.mox = mox.Mox()
+    self.cnxn = 'fake connection'
+    self.cache_manager = fake.CacheManager()
+    self.usergroup_service = MakeUserGroupService(self.cache_manager, self.mox)
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=self.usergroup_service,
+        project=fake.ProjectService())
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def SetUpCreateGroup(
+      self, group_id, visiblity, external_group_type=None):
+    self.SetUpUpdateSettings(group_id, visiblity, external_group_type)
+
+  def testCreateGroup_Normal(self):
+    self.services.user.TestAddUser('group@example.com', 888)
+    self.SetUpCreateGroup(888, 'anyone')
+    self.mox.ReplayAll()
+    actual_group_id = self.usergroup_service.CreateGroup(
+        self.cnxn, self.services, 'group@example.com', 'anyone')
+    self.mox.VerifyAll()
+    self.assertEqual(888, actual_group_id)
+
+  def testCreateGroup_Import(self):
+    self.services.user.TestAddUser('troopers', 888)
+    self.SetUpCreateGroup(888, 'owners', 'mdb')
+    self.mox.ReplayAll()
+    actual_group_id = self.usergroup_service.CreateGroup(
+        self.cnxn, self.services, 'troopers', 'owners', 'mdb')
+    self.mox.VerifyAll()
+    self.assertEqual(888, actual_group_id)
+
+  def SetUpDetermineWhichUserIDsAreGroups(self, ids_to_query, mock_group_ids):
+    self.usergroup_service.usergroupsettings_tbl.Select(
+        self.cnxn, cols=['group_id'], group_id=ids_to_query).AndReturn(
+            (gid,) for gid in mock_group_ids)
+
+  def testDetermineWhichUserIDsAreGroups_NoGroups(self):
+    self.SetUpDetermineWhichUserIDsAreGroups([], [])
+    self.mox.ReplayAll()
+    actual_group_ids = self.usergroup_service.DetermineWhichUserIDsAreGroups(
+        self.cnxn, [])
+    self.mox.VerifyAll()
+    self.assertEqual([], actual_group_ids)
+
+  def testDetermineWhichUserIDsAreGroups_SomeGroups(self):
+    user_ids = [111, 222, 333]
+    group_ids = [888, 999]
+    self.SetUpDetermineWhichUserIDsAreGroups(user_ids + group_ids, group_ids)
+    self.mox.ReplayAll()
+    actual_group_ids = self.usergroup_service.DetermineWhichUserIDsAreGroups(
+        self.cnxn, user_ids + group_ids)
+    self.mox.VerifyAll()
+    self.assertEqual(group_ids, actual_group_ids)
+
+  def testLookupUserGroupID_Found(self):
+    mock_select = mock.MagicMock()
+    self.services.usergroup.usergroupsettings_tbl.Select = mock_select
+    mock_select.return_value = [('group@example.com', 888)]
+
+    actual = self.services.usergroup.LookupUserGroupID(
+        self.cnxn, 'group@example.com')
+
+    self.assertEqual(888, actual)
+    mock_select.assert_called_once_with(
+      self.cnxn, cols=['email', 'group_id'],
+      left_joins=[('User ON UserGroupSettings.group_id = User.user_id', [])],
+      email='group@example.com',
+      where=[('group_id IS NOT NULL', [])])
+
+  def testLookupUserGroupID_NotFound(self):
+    mock_select = mock.MagicMock()
+    self.services.usergroup.usergroupsettings_tbl.Select = mock_select
+    mock_select.return_value = []
+
+    actual = self.services.usergroup.LookupUserGroupID(
+        self.cnxn, 'user@example.com')
+
+    self.assertIsNone(actual)
+    mock_select.assert_called_once_with(
+      self.cnxn, cols=['email', 'group_id'],
+      left_joins=[('User ON UserGroupSettings.group_id = User.user_id', [])],
+      email='user@example.com',
+      where=[('group_id IS NOT NULL', [])])
+
+  def SetUpLookupAllMemberships(self, user_ids, mock_membership_rows):
+    self.usergroup_service.usergroup_tbl.Select(
+        self.cnxn, cols=['user_id', 'group_id'], distinct=True,
+        user_id=user_ids).AndReturn(mock_membership_rows)
+
+  def testLookupAllMemberships(self):
+    self.usergroup_service.group_dag.initialized = True
+    self.usergroup_service.memberships_2lc.CacheItem(111, {888, 999})
+    self.SetUpLookupAllMemberships([222], [(222, 777), (222, 999)])
+    self.usergroup_service.usergroupsettings_tbl.Select(
+          self.cnxn, cols=['group_id']).AndReturn([])
+    self.usergroup_service.usergroup_tbl.Select(
+          self.cnxn, cols=['user_id', 'group_id'], distinct=True,
+          user_id=[]).AndReturn([])
+    self.mox.ReplayAll()
+    actual_membership_dict = self.usergroup_service.LookupAllMemberships(
+        self.cnxn, [111, 222])
+    self.mox.VerifyAll()
+    self.assertEqual(
+        {111: {888, 999}, 222: {777, 999}},
+        actual_membership_dict)
+
+  def SetUpRemoveMembers(self, group_id, member_ids):
+    self.usergroup_service.usergroup_tbl.Delete(
+        self.cnxn, group_id=group_id, user_id=member_ids)
+
+  def testRemoveMembers(self):
+    self.usergroup_service.group_dag.initialized = True
+    self.SetUpRemoveMembers(888, [111, 222])
+    self.SetUpLookupAllMembers([111, 222], [], {}, {})
+    self.mox.ReplayAll()
+    self.usergroup_service.RemoveMembers(self.cnxn, 888, [111, 222])
+    self.mox.VerifyAll()
+
+  def testUpdateMembers(self):
+    self.usergroup_service.group_dag.initialized = True
+    self.usergroup_service.usergroup_tbl.Delete(
+        self.cnxn, group_id=888, user_id=[111, 222])
+    self.usergroup_service.usergroup_tbl.InsertRows(
+        self.cnxn, ['user_id', 'group_id', 'role'],
+        [(111, 888, 'member'), (222, 888, 'member')])
+    self.SetUpLookupAllMembers([111, 222], [], {}, {})
+    self.mox.ReplayAll()
+    self.usergroup_service.UpdateMembers(
+        self.cnxn, 888, [111, 222], 'member')
+    self.mox.VerifyAll()
+
+  def testUpdateMembers_CircleDetection(self):
+    # Two groups: 888 and 999 while 999 is a member of 888.
+    self.SetUpDAG([(888,), (999,)], [(999, 888)])
+    self.mox.ReplayAll()
+    self.assertRaises(
+        exceptions.CircularGroupException,
+        self.usergroup_service.UpdateMembers, self.cnxn, 999, [888], 'member')
+    self.mox.VerifyAll()
+
+  def SetUpLookupAllMembers(
+      self, group_ids, direct_member_rows,
+      descedants_dict, indirect_member_rows_dict):
+    self.usergroup_service.usergroup_tbl.Select(
+        self.cnxn, cols=['user_id', 'group_id', 'role'], distinct=True,
+        group_id=group_ids).AndReturn(direct_member_rows)
+    for gid in group_ids:
+      if descedants_dict.get(gid, []):
+        self.usergroup_service.usergroup_tbl.Select(
+            self.cnxn, cols=['user_id'], distinct=True,
+            group_id=descedants_dict.get(gid, [])).AndReturn(
+            indirect_member_rows_dict.get(gid, []))
+
+  def testLookupAllMembers(self):
+    self.usergroup_service.group_dag.initialized = True
+    self.usergroup_service.group_dag.user_group_children = (
+        collections.defaultdict(list))
+    self.usergroup_service.group_dag.user_group_children[777] = [888]
+    self.usergroup_service.group_dag.user_group_children[888] = [999]
+    self.SetUpLookupAllMembers(
+        [777],
+        [(888, 777, 'member'), (111, 888, 'member'), (999, 888, 'member'),
+         (222, 999, 'member')],
+        {777: [888, 999]},
+        {777: [(111,), (222,), (999,)]})
+
+    self.mox.ReplayAll()
+    members_dict, owners_dict = self.usergroup_service.LookupAllMembers(
+        self.cnxn, [777])
+    self.mox.VerifyAll()
+    self.assertItemsEqual([111, 222, 888, 999], members_dict[777])
+    self.assertItemsEqual([], owners_dict[777])
+
+  def testExpandAnyGroupEmailRecipients(self):
+    self.usergroup_service.group_dag.initialized = True
+    self.SetUpDetermineWhichUserIDsAreGroups(
+        [111, 777, 888, 999], [777, 888, 999])
+    self.SetUpGetGroupSettings(
+        [777, 888, 999],
+        [(777, 'anyone', None, 0, 1, 0),
+         (888, 'anyone', None, 0, 0, 1),
+         (999, 'anyone', None, 0, 1, 1)],
+    )
+    self.SetUpLookupAllMembers(
+        [777, 888, 999],
+        [(222, 777, 'member'), (333, 888, 'member'), (444, 999, 'member')],
+        {}, {})
+    self.mox.ReplayAll()
+    direct, indirect = self.usergroup_service.ExpandAnyGroupEmailRecipients(
+        self.cnxn, [111, 777, 888, 999])
+    self.mox.VerifyAll()
+    self.assertItemsEqual([111, 888, 999], direct)
+    self.assertItemsEqual([222, 444], indirect)
+
+  def SetUpLookupMembers(self, group_member_dict):
+    mock_membership_rows = []
+    group_ids = []
+    for gid, members in group_member_dict.items():
+      group_ids.append(gid)
+      mock_membership_rows.extend([(uid, gid, 'member') for uid in members])
+    group_ids.sort()
+    self.usergroup_service.usergroup_tbl.Select(
+        self.cnxn, cols=['user_id','group_id', 'role'], distinct=True,
+        group_id=group_ids).AndReturn(mock_membership_rows)
+
+  def testLookupMembers_NoneRequested(self):
+    self.mox.ReplayAll()
+    member_ids, _ = self.usergroup_service.LookupMembers(self.cnxn, [])
+    self.mox.VerifyAll()
+    self.assertItemsEqual({}, member_ids)
+
+  def testLookupMembers_Nonexistent(self):
+    """If some requested groups don't exist, they are ignored."""
+    self.SetUpLookupMembers({777: []})
+    self.mox.ReplayAll()
+    member_ids, _ = self.usergroup_service.LookupMembers(self.cnxn, [777])
+    self.mox.VerifyAll()
+    self.assertItemsEqual([], member_ids[777])
+
+  def testLookupMembers_AllEmpty(self):
+    """Requesting all empty groups results in no members."""
+    self.SetUpLookupMembers({888: [], 999: []})
+    self.mox.ReplayAll()
+    member_ids, _ = self.usergroup_service.LookupMembers(self.cnxn, [888, 999])
+    self.mox.VerifyAll()
+    self.assertItemsEqual([], member_ids[888])
+
+  def testLookupMembers_OneGroup(self):
+    self.SetUpLookupMembers({888: [111, 222]})
+    self.mox.ReplayAll()
+    member_ids, _ = self.usergroup_service.LookupMembers(self.cnxn, [888])
+    self.mox.VerifyAll()
+    self.assertItemsEqual([111, 222], member_ids[888])
+
+  def testLookupMembers_GroupsAndNonGroups(self):
+    """We ignore any non-groups passed in."""
+    self.SetUpLookupMembers({111: [], 333: [], 888: [111, 222]})
+    self.mox.ReplayAll()
+    member_ids, _ = self.usergroup_service.LookupMembers(
+        self.cnxn, [111, 333, 888])
+    self.mox.VerifyAll()
+    self.assertItemsEqual([111, 222], member_ids[888])
+
+  def testLookupMembers_OverlappingGroups(self):
+    """We get the union of IDs.  Imagine 888 = {111} and 999 = {111, 222}."""
+    self.SetUpLookupMembers({888: [111], 999: [111, 222]})
+    self.mox.ReplayAll()
+    member_ids, _ = self.usergroup_service.LookupMembers(self.cnxn, [888, 999])
+    self.mox.VerifyAll()
+    self.assertItemsEqual([111, 222], member_ids[999])
+    self.assertItemsEqual([111], member_ids[888])
+
+  def testLookupVisibleMembers_LimitedVisiblity(self):
+    """We get only the member IDs in groups that the user is allowed to see."""
+    self.usergroup_service.group_dag.initialized = True
+    self.SetUpGetGroupSettings(
+        [888, 999],
+        [(888, 'anyone', None, 0, 1, 0), (999, 'members', None, 0, 1, 0)])
+    self.SetUpLookupMembers({888: [111], 999: [111]})
+    self.SetUpLookupAllMembers(
+        [888, 999], [(111, 888, 'member'), (111, 999, 'member')], {}, {})
+    self.mox.ReplayAll()
+    member_ids, _ = self.usergroup_service.LookupVisibleMembers(
+        self.cnxn, [888, 999], permissions.USER_PERMISSIONSET, set(),
+        self.services)
+    self.mox.VerifyAll()
+    self.assertItemsEqual([111], member_ids[888])
+    self.assertNotIn(999, member_ids)
+
+  def SetUpGetAllUserGroupsInfo(self, mock_settings_rows, mock_count_rows,
+                                mock_friends=None):
+    mock_friends = mock_friends or []
+    self.usergroup_service.usergroupsettings_tbl.Select(
+        self.cnxn, cols=['email', 'group_id', 'who_can_view_members',
+                         'external_group_type', 'last_sync_time',
+                         'notify_members', 'notify_group'],
+        left_joins=[('User ON UserGroupSettings.group_id = User.user_id', [])]
+        ).AndReturn(mock_settings_rows)
+    self.usergroup_service.usergroup_tbl.Select(
+        self.cnxn, cols=['group_id', 'COUNT(*)'],
+        group_by=['group_id']).AndReturn(mock_count_rows)
+
+    group_ids = [g[1] for g in mock_settings_rows]
+    self.usergroup_service.usergroupprojects_tbl.Select(
+        self.cnxn, cols=usergroup_svc.USERGROUPPROJECTS_COLS,
+        group_id=group_ids).AndReturn(mock_friends)
+
+  def testGetAllUserGroupsInfo(self):
+    self.SetUpGetAllUserGroupsInfo(
+        [('group@example.com', 888, 'anyone', None, 0, 1, 0)],
+        [(888, 12)])
+    self.mox.ReplayAll()
+    actual_infos = self.usergroup_service.GetAllUserGroupsInfo(self.cnxn)
+    self.mox.VerifyAll()
+    self.assertEqual(1, len(actual_infos))
+    addr, count, group_settings, group_id = actual_infos[0]
+    self.assertEqual('group@example.com', addr)
+    self.assertEqual(12, count)
+    self.assertEqual(usergroup_pb2.MemberVisibility.ANYONE,
+                     group_settings.who_can_view_members)
+    self.assertEqual(888, group_id)
+
+  def SetUpGetGroupSettings(self, group_ids, mock_result_rows,
+                            mock_friends=None):
+    mock_friends = mock_friends or []
+    self.usergroup_service.usergroupsettings_tbl.Select(
+        self.cnxn, cols=usergroup_svc.USERGROUPSETTINGS_COLS,
+        group_id=group_ids).AndReturn(mock_result_rows)
+    self.usergroup_service.usergroupprojects_tbl.Select(
+        self.cnxn, cols=usergroup_svc.USERGROUPPROJECTS_COLS,
+        group_id=group_ids).AndReturn(mock_friends)
+
+  def testGetGroupSettings_NoGroupsRequested(self):
+    self.SetUpGetGroupSettings([], [])
+    self.mox.ReplayAll()
+    actual_settings_dict = self.usergroup_service.GetAllGroupSettings(
+        self.cnxn, [])
+    self.mox.VerifyAll()
+    self.assertEqual({}, actual_settings_dict)
+
+  def testGetGroupSettings_NoGroupsFound(self):
+    self.SetUpGetGroupSettings([777], [])
+    self.mox.ReplayAll()
+    actual_settings_dict = self.usergroup_service.GetAllGroupSettings(
+        self.cnxn, [777])
+    self.mox.VerifyAll()
+    self.assertEqual({}, actual_settings_dict)
+
+  def testGetGroupSettings_SomeGroups(self):
+    self.SetUpGetGroupSettings(
+        [777, 888, 999],
+        [(888, 'anyone', None, 0, 1, 0), (999, 'members', None, 0, 1, 0)])
+    self.mox.ReplayAll()
+    actual_settings_dict = self.usergroup_service.GetAllGroupSettings(
+        self.cnxn, [777, 888, 999])
+    self.mox.VerifyAll()
+    self.assertEqual(
+        {888: usergroup_pb2.MakeSettings('anyone'),
+         999: usergroup_pb2.MakeSettings('members')},
+        actual_settings_dict)
+
+  def testGetGroupSettings_NoSuchGroup(self):
+    self.SetUpGetGroupSettings([777], [])
+    self.mox.ReplayAll()
+    actual_settings = self.usergroup_service.GetGroupSettings(self.cnxn, 777)
+    self.mox.VerifyAll()
+    self.assertEqual(None, actual_settings)
+
+  def testGetGroupSettings_Found(self):
+    self.SetUpGetGroupSettings([888], [(888, 'anyone', None, 0, 1, 0)])
+    self.mox.ReplayAll()
+    actual_settings = self.usergroup_service.GetGroupSettings(self.cnxn, 888)
+    self.mox.VerifyAll()
+    self.assertEqual(
+        usergroup_pb2.MemberVisibility.ANYONE,
+        actual_settings.who_can_view_members)
+
+  def testGetGroupSettings_Import(self):
+    self.SetUpGetGroupSettings(
+        [888], [(888, 'owners', 'mdb', 0, 1, 0)])
+    self.mox.ReplayAll()
+    actual_settings = self.usergroup_service.GetGroupSettings(self.cnxn, 888)
+    self.mox.VerifyAll()
+    self.assertEqual(
+        usergroup_pb2.MemberVisibility.OWNERS,
+        actual_settings.who_can_view_members)
+    self.assertEqual(
+        usergroup_pb2.GroupType.MDB,
+        actual_settings.ext_group_type)
+
+  def SetUpUpdateSettings(self, group_id, visiblity, external_group_type=None,
+                          last_sync_time=0, friend_projects=None,
+                          notify_members=True, notify_group=False):
+    friend_projects = friend_projects or []
+    self.usergroup_service.usergroupsettings_tbl.InsertRow(
+        self.cnxn, group_id=group_id, who_can_view_members=visiblity,
+        external_group_type=external_group_type,
+        last_sync_time=last_sync_time, notify_members=notify_members,
+        notify_group=notify_group, replace=True)
+    self.usergroup_service.usergroupprojects_tbl.Delete(
+        self.cnxn, group_id=group_id)
+    if friend_projects:
+      rows = [(group_id, p_id) for p_id in friend_projects]
+      self.usergroup_service.usergroupprojects_tbl.InsertRows(
+        self.cnxn, ['group_id', 'project_id'], rows)
+
+  def testUpdateSettings_Normal(self):
+    self.SetUpUpdateSettings(888, 'anyone')
+    self.mox.ReplayAll()
+    self.usergroup_service.UpdateSettings(
+        self.cnxn, 888, usergroup_pb2.MakeSettings('anyone'))
+    self.mox.VerifyAll()
+
+  def testUpdateSettings_Import(self):
+    self.SetUpUpdateSettings(888, 'owners', 'mdb')
+    self.mox.ReplayAll()
+    self.usergroup_service.UpdateSettings(
+        self.cnxn, 888,
+        usergroup_pb2.MakeSettings('owners', 'mdb'))
+    self.mox.VerifyAll()
+
+  def testUpdateSettings_WithFriends(self):
+    self.SetUpUpdateSettings(888, 'anyone', friend_projects=[789])
+    self.mox.ReplayAll()
+    self.usergroup_service.UpdateSettings(
+        self.cnxn, 888,
+        usergroup_pb2.MakeSettings('anyone', friend_projects=[789]))
+    self.mox.VerifyAll()
+
+  def testExpungeUsersInGroups(self):
+    self.usergroup_service.usergroupprojects_tbl.Delete = mock.Mock()
+    self.usergroup_service.usergroupsettings_tbl.Delete = mock.Mock()
+    self.usergroup_service.usergroup_tbl.Delete = mock.Mock()
+
+    ids = [222, 333, 444]
+    self.usergroup_service.ExpungeUsersInGroups(self.cnxn, ids)
+
+    self.usergroup_service.usergroupprojects_tbl.Delete.assert_called_once_with(
+        self.cnxn, group_id=ids, commit=False)
+    self.usergroup_service.usergroupsettings_tbl.Delete.assert_called_once_with(
+        self.cnxn, group_id=ids, commit=False)
+    self.usergroup_service.usergroup_tbl.Delete.assert_has_calls(
+        [mock.call(self.cnxn, group_id=ids, commit=False),
+         mock.call(self.cnxn, user_id=ids, commit=False)])
+
+  def SetUpDAG(self, group_id_rows, usergroup_rows):
+    self.usergroup_service.usergroupsettings_tbl.Select(
+        self.cnxn, cols=['group_id']).AndReturn(group_id_rows)
+    self.usergroup_service.usergroup_tbl.Select(
+        self.cnxn, cols=['user_id', 'group_id'], distinct=True,
+        user_id=[r[0] for r in group_id_rows]).AndReturn(usergroup_rows)
+
+  def testDAG_Build(self):
+    # Old entries should go away after rebuilding
+    self.usergroup_service.group_dag.user_group_parents = (
+        collections.defaultdict(list))
+    self.usergroup_service.group_dag.user_group_parents[111] = [222]
+    # Two groups: 888 and 999 while 999 is a member of 888.
+    self.SetUpDAG([(888,), (999,)], [(999, 888)])
+    self.mox.ReplayAll()
+    self.usergroup_service.group_dag.Build(self.cnxn)
+    self.mox.VerifyAll()
+    self.assertIn(888, self.usergroup_service.group_dag.user_group_children)
+    self.assertIn(999, self.usergroup_service.group_dag.user_group_parents)
+    self.assertNotIn(111, self.usergroup_service.group_dag.user_group_parents)
+
+  def testDAG_GetAllAncestors(self):
+    # Three groups: 777, 888 and 999.
+    # 999 is a direct member of 888, and 888 is a direct member of 777.
+    self.SetUpDAG([(777,), (888,), (999,)], [(999, 888), (888, 777)])
+    self.mox.ReplayAll()
+    ancestors = self.usergroup_service.group_dag.GetAllAncestors(
+        self.cnxn, 999)
+    self.mox.VerifyAll()
+    ancestors.sort()
+    self.assertEqual([777, 888], ancestors)
+
+  def testDAG_GetAllAncestorsDiamond(self):
+    # Four groups: 666, 777, 888 and 999.
+    # 999 is a direct member of both 888 and 777,
+    # 888 is a direct member of 666, and 777 is also a direct member of 666.
+    self.SetUpDAG([(666, ), (777,), (888,), (999,)],
+                  [(999, 888), (999, 777), (888, 666), (777, 666)])
+    self.mox.ReplayAll()
+    ancestors = self.usergroup_service.group_dag.GetAllAncestors(
+        self.cnxn, 999)
+    self.mox.VerifyAll()
+    ancestors.sort()
+    self.assertEqual([666, 777, 888], ancestors)
+
+  def testDAG_GetAllDescendants(self):
+    # Four groups: 666, 777, 888 and 999.
+    # 999 is a direct member of both 888 and 777,
+    # 888 is a direct member of 666, and 777 is also a direct member of 666.
+    self.SetUpDAG([(666, ), (777,), (888,), (999,)],
+                  [(999, 888), (999, 777), (888, 666), (777, 666)])
+    self.mox.ReplayAll()
+    descendants = self.usergroup_service.group_dag.GetAllDescendants(
+        self.cnxn, 666)
+    self.mox.VerifyAll()
+    descendants.sort()
+    self.assertEqual([777, 888, 999], descendants)
+
+  def testDAG_IsChild(self):
+    # Four groups: 666, 777, 888 and 999.
+    # 999 is a direct member of both 888 and 777,
+    # 888 is a direct member of 666, and 777 is also a direct member of 666.
+    self.SetUpDAG([(666, ), (777,), (888,), (999,)],
+                  [(999, 888), (999, 777), (888, 666), (777, 666)])
+    self.mox.ReplayAll()
+    result1 = self.usergroup_service.group_dag.IsChild(
+        self.cnxn, 777, 666)
+    result2 = self.usergroup_service.group_dag.IsChild(
+        self.cnxn, 777, 888)
+    self.mox.VerifyAll()
+    self.assertTrue(result1)
+    self.assertFalse(result2)
diff --git a/services/tracker_fulltext.py b/services/tracker_fulltext.py
new file mode 100644
index 0000000..ecbfc44
--- /dev/null
+++ b/services/tracker_fulltext.py
@@ -0,0 +1,320 @@
+# 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
+
+"""A set of functions that provide fulltext search for issues."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+import time
+
+from six import string_types
+
+from google.appengine.api import search
+
+import settings
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from services import fulltext_helpers
+from tracker import tracker_bizobj
+
+
+# When updating and re-indexing all issues in a project, work in batches
+# of this size to manage memory usage and avoid rpc timeouts.
+_INDEX_BATCH_SIZE = 40
+
+
+# The user can search for text that occurs specifically in these
+# parts of an issue.
+ISSUE_FULLTEXT_FIELDS = ['summary', 'description', 'comment']
+# Note: issue documents also contain a "metadata" field, but we do not
+# expose that to users.  Issue metadata can be searched in a structured way
+# by giving a specific field name such as "owner:" or "status:". The metadata
+# search field exists only for fulltext queries that do not specify any field.
+
+
+def IndexIssues(cnxn, issues, user_service, issue_service, config_service):
+  """(Re)index all the given issues.
+
+  Args:
+    cnxn: connection to SQL database.
+    issues: list of Issue PBs to index.
+    user_service: interface to user data storage.
+    issue_service: interface to issue data storage.
+    config_service: interface to configuration data storage.
+  """
+  issues = list(issues)
+  config_dict = config_service.GetProjectConfigs(
+      cnxn, {issue.project_id for issue in issues})
+  for start in range(0, len(issues), _INDEX_BATCH_SIZE):
+    logging.info('indexing issues: %d remaining', len(issues) - start)
+    _IndexIssueBatch(
+        cnxn, issues[start:start + _INDEX_BATCH_SIZE], user_service,
+        issue_service, config_dict)
+
+
+def _IndexIssueBatch(cnxn, issues, user_service, issue_service, config_dict):
+  """Internal method to (re)index the given batch of issues.
+
+  Args:
+    cnxn: connection to SQL database.
+    issues: list of Issue PBs to index.
+    user_service: interface to user data storage.
+    issue_service: interface to issue data storage.
+    config_dict: dict {project_id: config} for all the projects that
+        the given issues are in.
+  """
+  user_ids = tracker_bizobj.UsersInvolvedInIssues(issues)
+  comments_dict = issue_service.GetCommentsForIssues(
+      cnxn, [issue.issue_id for issue in issues])
+  for comments in comments_dict.values():
+    user_ids.update([ic.user_id for ic in comments])
+
+  users_by_id = framework_views.MakeAllUserViews(
+      cnxn, user_service, user_ids)
+  _CreateIssueSearchDocuments(issues, comments_dict, users_by_id, config_dict)
+
+
+def _CreateIssueSearchDocuments(
+    issues, comments_dict, users_by_id, config_dict):
+  """Make the GAE search index documents for the given issue batch.
+
+  Args:
+    issues: list of issues to index.
+    comments_dict: prefetched dictionary of comments on those issues.
+    users_by_id: dictionary {user_id: UserView} so that the email
+        addresses of users who left comments can be found via search.
+    config_dict: dict {project_id: config} for all the projects that
+        the given issues are in.
+  """
+  documents_by_shard = collections.defaultdict(list)
+  for issue in issues:
+    summary = issue.summary
+    # TODO(jrobbins): allow search specifically on explicit vs derived
+    # fields.
+    owner_id = tracker_bizobj.GetOwnerId(issue)
+    owner_email = users_by_id[owner_id].email
+    config = config_dict[issue.project_id]
+    component_paths = []
+    for component_id in issue.component_ids:
+      cd = tracker_bizobj.FindComponentDefByID(component_id, config)
+      if cd:
+        component_paths.append(cd.path)
+
+    field_values = [tracker_bizobj.GetFieldValue(fv, users_by_id)
+                    for fv in issue.field_values]
+    # Convert to string only the values that are not strings already.
+    # This is done because the default encoding in appengine seems to be 'ascii'
+    # and string values might contain unicode characters, so str will fail to
+    # encode them.
+    field_values = [value if isinstance(value, string_types) else str(value)
+                    for value in field_values]
+
+    metadata = '%s %s %s %s %s %s' % (
+        tracker_bizobj.GetStatus(issue),
+        owner_email,
+        [users_by_id[cc_id].email for cc_id in
+         tracker_bizobj.GetCcIds(issue)],
+        ' '.join(component_paths),
+        ' '.join(field_values),
+        ' '.join(tracker_bizobj.GetLabels(issue)))
+    custom_fields = _BuildCustomFTSFields(issue)
+
+    comments = comments_dict.get(issue.issue_id, [])
+    room_for_comments = (framework_constants.MAX_FTS_FIELD_SIZE -
+                         len(summary) -
+                         len(metadata) -
+                         sum(len(cf.value) for cf in custom_fields))
+    comments = _IndexableComments(
+        comments, users_by_id, remaining_chars=room_for_comments)
+    logging.info('len(comments) is %r', len(comments))
+    if comments:
+      description = _ExtractCommentText(comments[0], users_by_id)
+      description = description[:framework_constants.MAX_FTS_FIELD_SIZE]
+      all_comments = ' '. join(
+          _ExtractCommentText(c, users_by_id) for c in comments[1:])
+      all_comments = all_comments[:framework_constants.MAX_FTS_FIELD_SIZE]
+    else:
+      description = ''
+      all_comments = ''
+      logging.info(
+          'Issue %s:%r has zero indexable comments',
+          issue.project_name, issue.local_id)
+
+    logging.info('Building document for %s:%d',
+                 issue.project_name, issue.local_id)
+    logging.info('len(summary) = %d', len(summary))
+    logging.info('len(metadata) = %d', len(metadata))
+    logging.info('len(description) = %d', len(description))
+    logging.info('len(comment) = %d', len(all_comments))
+    for cf in custom_fields:
+      logging.info('len(%s) = %d', cf.name, len(cf.value))
+
+    doc = search.Document(
+        doc_id=str(issue.issue_id),
+        fields=[
+            search.NumberField(name='project_id', value=issue.project_id),
+            search.TextField(name='summary', value=summary),
+            search.TextField(name='metadata', value=metadata),
+            search.TextField(name='description', value=description),
+            search.TextField(name='comment', value=all_comments),
+            ] + custom_fields)
+
+    shard_id = issue.issue_id % settings.num_logical_shards
+    documents_by_shard[shard_id].append(doc)
+
+  start_time = time.time()
+  promises = []
+  for shard_id, documents in documents_by_shard.items():
+    if documents:
+      promises.append(framework_helpers.Promise(
+          _IndexDocsInShard, shard_id, documents))
+
+  for promise in promises:
+    promise.WaitAndGetValue()
+
+  logging.info('Finished %d indexing in shards in %d ms',
+               len(documents_by_shard), int((time.time() - start_time) * 1000))
+
+
+def _IndexableComments(comments, users_by_id, remaining_chars=None):
+  """We only index the comments that are not deleted or banned.
+
+  Args:
+    comments: list of Comment PBs for one issue.
+    users_by_id: Dict of (user_id -> UserView) for all users.
+    remaining_chars: number of characters available for comment text
+       without hitting the GAE search index max document size.
+
+  Returns:
+    A list of comments filtered to not have any deleted comments or
+    comments from banned users.  If the issue has a huge number of
+    comments, only a certain number of the first and last comments
+    are actually indexed.
+  """
+  if remaining_chars is None:
+    remaining_chars = framework_constants.MAX_FTS_FIELD_SIZE
+  allowed_comments = []
+  for comment in comments:
+    user_view = users_by_id.get(comment.user_id)
+    if not (comment.deleted_by or (user_view and user_view.banned)):
+      if comment.is_description and allowed_comments:
+        # index the latest description, but not older descriptions
+        allowed_comments[0] = comment
+      else:
+        allowed_comments.append(comment)
+
+  reasonable_size = (framework_constants.INITIAL_COMMENTS_TO_INDEX +
+                     framework_constants.FINAL_COMMENTS_TO_INDEX)
+  if len(allowed_comments) <= reasonable_size:
+    candidates = allowed_comments
+  else:
+    candidates = (  # Prioritize the description and recent comments.
+      allowed_comments[0:1] +
+      allowed_comments[-framework_constants.FINAL_COMMENTS_TO_INDEX:] +
+      allowed_comments[1:framework_constants.INITIAL_COMMENTS_TO_INDEX])
+
+  total_length = 0
+  result = []
+  for comment in candidates:
+    total_length += len(comment.content)
+    if total_length > remaining_chars:
+      break
+    result.append(comment)
+
+  return result
+
+
+def _IndexDocsInShard(shard_id, documents):
+  search_index = search.Index(
+      name=settings.search_index_name_format % shard_id)
+  search_index.put(documents)
+  logging.info('FTS indexed %d docs in shard %d', len(documents), shard_id)
+  # TODO(jrobbins): catch OverQuotaError and add the issues to the
+  # ReindexQueue table instead.
+
+
+def _ExtractCommentText(comment, users_by_id):
+  """Return a string with all the searchable text of the given Comment PB."""
+  commenter_email = users_by_id[comment.user_id].email
+  return '%s %s %s' % (
+      commenter_email,
+      comment.content,
+      ' '.join(attach.filename
+               for attach in comment.attachments
+               if not attach.deleted))
+
+
+def _BuildCustomFTSFields(issue):
+  """Return a list of FTS Fields to index string-valued custom fields."""
+  fts_fields = []
+  for fv in issue.field_values:
+    if fv.str_value:
+      # TODO(jrobbins): also indicate which were derived vs. explicit.
+      # TODO(jrobbins): also toss in the email addresses of any users in
+      # user-valued custom fields, ints for int-valued fields, etc.
+      fts_field = search.TextField(
+          name='custom_%d' % fv.field_id, value=fv.str_value)
+      fts_fields.append(fts_field)
+
+  return fts_fields
+
+
+def UnindexIssues(issue_ids):
+  """Remove many issues from the sharded search indexes."""
+  iids_by_shard = {}
+  for issue_id in issue_ids:
+    shard_id = issue_id % settings.num_logical_shards
+    iids_by_shard.setdefault(shard_id, [])
+    iids_by_shard[shard_id].append(issue_id)
+
+  for shard_id, iids_in_shard in iids_by_shard.items():
+    try:
+      logging.info(
+          'unindexing %r issue_ids in %r', len(iids_in_shard), shard_id)
+      search_index = search.Index(
+          name=settings.search_index_name_format % shard_id)
+      search_index.delete([str(iid) for iid in iids_in_shard])
+    except search.Error:
+      logging.exception('FTS deletion failed')
+
+
+def SearchIssueFullText(project_ids, query_ast_conj, shard_id):
+  """Do full-text search in GAE FTS.
+
+  Args:
+    project_ids: list of project ID numbers to consider.
+    query_ast_conj: One conjuctive clause from the AST parsed
+        from the user's query.
+    shard_id: int shard ID for the shard to consider.
+
+  Returns:
+    (issue_ids, capped) where issue_ids is a list of issue issue_ids that match
+    the full-text query.  And, capped is True if the results were capped due to
+    an implementation limitation.  Or, return (None, False) if the given AST
+    conjunction contains no full-text conditions.
+  """
+  fulltext_query = fulltext_helpers.BuildFTSQuery(
+      query_ast_conj, ISSUE_FULLTEXT_FIELDS)
+  if fulltext_query is None:
+    return None, False
+
+  if project_ids:
+    project_clause = ' OR '.join(
+        'project_id:%d' % pid for pid in project_ids)
+    fulltext_query = '(%s) %s' % (project_clause, fulltext_query)
+
+  # TODO(jrobbins): it would be good to also include some other
+  # structured search terms to narrow down the set of index
+  # documents considered.  E.g., most queries are only over the
+  # open issues.
+  logging.info('FTS query is %r', fulltext_query)
+  issue_ids = fulltext_helpers.ComprehensiveSearch(
+      fulltext_query, settings.search_index_name_format % shard_id)
+  capped = len(issue_ids) >= settings.fulltext_limit_per_shard
+  return issue_ids, capped
diff --git a/services/user_svc.py b/services/user_svc.py
new file mode 100644
index 0000000..28ad465
--- /dev/null
+++ b/services/user_svc.py
@@ -0,0 +1,729 @@
+# 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
+
+"""A set of functions that provide persistence for users.
+
+Business objects are described in user_pb2.py.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import settings
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import sql
+from framework import validate
+from proto import user_pb2
+from services import caches
+
+
+USER_TABLE_NAME = 'User'
+USERPREFS_TABLE_NAME = 'UserPrefs'
+HOTLISTVISITHISTORY_TABLE_NAME = 'HotlistVisitHistory'
+LINKEDACCOUNT_TABLE_NAME = 'LinkedAccount'
+LINKEDACCOUNTINVITE_TABLE_NAME = 'LinkedAccountInvite'
+
+USER_COLS = [
+    'user_id', 'email', 'is_site_admin', 'notify_issue_change',
+    'notify_starred_issue_change', 'email_compact_subject', 'email_view_widget',
+    'notify_starred_ping',
+    'banned', 'after_issue_update', 'keep_people_perms_open',
+    'preview_on_hover', 'obscure_email',
+    'last_visit_timestamp', 'email_bounce_timestamp', 'vacation_message']
+USERPREFS_COLS = ['user_id', 'name', 'value']
+HOTLISTVISITHISTORY_COLS = ['hotlist_id', 'user_id', 'viewed']
+LINKEDACCOUNT_COLS = ['parent_id', 'child_id']
+LINKEDACCOUNTINVITE_COLS = ['parent_id', 'child_id']
+
+
+class UserTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage RAM and memcache for User PBs."""
+
+  def __init__(self, cache_manager, user_service):
+    super(UserTwoLevelCache, self).__init__(
+        cache_manager, 'user', 'user:', user_pb2.User,
+        max_size=settings.user_cache_max_size)
+    self.user_service = user_service
+
+  def _DeserializeUsersByID(self, user_rows, linkedaccount_rows):
+    """Convert database row tuples into User PBs.
+
+    Args:
+      user_rows: rows from the User DB table.
+      linkedaccount_rows: rows from the LinkedAccount DB table.
+
+    Returns:
+      A dict {user_id: user_pb} for all the users referenced in user_rows.
+    """
+    result_dict = {}
+
+    # Make one User PB for each row in user_rows.
+    for row in user_rows:
+      (user_id, email, is_site_admin,
+       notify_issue_change, notify_starred_issue_change,
+       email_compact_subject, email_view_widget, notify_starred_ping, banned,
+       after_issue_update, keep_people_perms_open, preview_on_hover,
+       obscure_email, last_visit_timestamp,
+       email_bounce_timestamp, vacation_message) = row
+      user = user_pb2.MakeUser(
+          user_id, email=email, obscure_email=obscure_email)
+      user.is_site_admin = bool(is_site_admin)
+      user.notify_issue_change = bool(notify_issue_change)
+      user.notify_starred_issue_change = bool(notify_starred_issue_change)
+      user.email_compact_subject = bool(email_compact_subject)
+      user.email_view_widget = bool(email_view_widget)
+      user.notify_starred_ping = bool(notify_starred_ping)
+      if banned:
+        user.banned = banned
+      if after_issue_update:
+        user.after_issue_update = user_pb2.IssueUpdateNav(
+            after_issue_update.upper())
+      user.keep_people_perms_open = bool(keep_people_perms_open)
+      user.preview_on_hover = bool(preview_on_hover)
+      user.last_visit_timestamp = last_visit_timestamp or 0
+      user.email_bounce_timestamp = email_bounce_timestamp or 0
+      if vacation_message:
+        user.vacation_message = vacation_message
+      result_dict[user_id] = user
+
+    # Put in any linked accounts.
+    for parent_id, child_id in linkedaccount_rows:
+      if parent_id in result_dict:
+        result_dict[parent_id].linked_child_ids.append(child_id)
+      if child_id in result_dict:
+        result_dict[child_id].linked_parent_id = parent_id
+
+    return result_dict
+
+  def FetchItems(self, cnxn, keys):
+    """On RAM and memcache miss, retrieve User objects from the database.
+
+    Args:
+      cnxn: connection to SQL database.
+      keys: list of user IDs to retrieve.
+
+    Returns:
+      A dict {user_id: user_pb} for each user that satisfies the conditions.
+    """
+    user_rows = self.user_service.user_tbl.Select(
+        cnxn, cols=USER_COLS, user_id=keys)
+    linkedaccount_rows = self.user_service.linkedaccount_tbl.Select(
+        cnxn, cols=LINKEDACCOUNT_COLS, parent_id=keys, child_id=keys,
+        or_where_conds=True)
+    return self._DeserializeUsersByID(user_rows, linkedaccount_rows)
+
+
+class UserPrefsTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage RAM and memcache for UserPrefs PBs."""
+
+  def __init__(self, cache_manager, user_service):
+    super(UserPrefsTwoLevelCache, self).__init__(
+        cache_manager, 'user', 'userprefs:', user_pb2.UserPrefs,
+        max_size=settings.user_cache_max_size)
+    self.user_service = user_service
+
+  def _DeserializeUserPrefsByID(self, userprefs_rows):
+    """Convert database row tuples into UserPrefs PBs.
+
+    Args:
+      userprefs_rows: rows from the UserPrefs DB table.
+
+    Returns:
+      A dict {user_id: userprefs} for all the users in userprefs_rows.
+    """
+    result_dict = {}
+
+    # Make one UserPrefs PB for each row in userprefs_rows.
+    for row in userprefs_rows:
+      (user_id, name, value) = row
+      if user_id not in result_dict:
+        userprefs = user_pb2.UserPrefs(user_id=user_id)
+        result_dict[user_id] = userprefs
+      else:
+        userprefs = result_dict[user_id]
+      userprefs.prefs.append(user_pb2.UserPrefValue(name=name, value=value))
+
+    return result_dict
+
+  def FetchItems(self, cnxn, keys):
+    """On RAM and memcache miss, retrieve UserPrefs objects from the database.
+
+    Args:
+      cnxn: connection to SQL database.
+      keys: list of user IDs to retrieve.
+
+    Returns:
+      A dict {user_id: userprefs} for each user.
+    """
+    userprefs_rows = self.user_service.userprefs_tbl.Select(
+        cnxn, cols=USERPREFS_COLS, user_id=keys)
+    return self._DeserializeUserPrefsByID(userprefs_rows)
+
+
+class UserService(object):
+  """The persistence layer for all user data."""
+
+  def __init__(self, cache_manager):
+    """Constructor.
+
+    Args:
+      cache_manager: local cache with distributed invalidation.
+    """
+    self.user_tbl = sql.SQLTableManager(USER_TABLE_NAME)
+    self.userprefs_tbl = sql.SQLTableManager(USERPREFS_TABLE_NAME)
+    self.hotlistvisithistory_tbl = sql.SQLTableManager(
+        HOTLISTVISITHISTORY_TABLE_NAME)
+    self.linkedaccount_tbl = sql.SQLTableManager(LINKEDACCOUNT_TABLE_NAME)
+    self.linkedaccountinvite_tbl = sql.SQLTableManager(
+        LINKEDACCOUNTINVITE_TABLE_NAME)
+
+    # Like a dictionary {user_id: email}
+    self.email_cache = caches.RamCache(cache_manager, 'user', max_size=50000)
+
+    # Like a dictionary {email: user_id}.
+    # This will never invaidate, and it doesn't need to.
+    self.user_id_cache = caches.RamCache(cache_manager, 'user', max_size=50000)
+
+    # Like a dictionary {user_id: user_pb}
+    self.user_2lc = UserTwoLevelCache(cache_manager, self)
+
+    # Like a dictionary {user_id: userprefs}
+    self.userprefs_2lc = UserPrefsTwoLevelCache(cache_manager, self)
+
+  ### Creating users
+
+  def _CreateUsers(self, cnxn, emails):
+    """Create many users in the database."""
+    emails = [email.lower() for email in emails]
+    ids = [framework_helpers.MurmurHash3_x86_32(email) for email in emails]
+    row_values = [
+      (user_id, email, not framework_bizobj.IsPriviledgedDomainUser(email))
+      for (user_id, email) in zip(ids, emails)]
+    self.user_tbl.InsertRows(
+        cnxn, ['user_id', 'email', 'obscure_email'], row_values)
+    self.user_2lc.InvalidateKeys(cnxn, ids)
+
+  ### Lookup of user ID and email address
+
+  def LookupUserEmails(self, cnxn, user_ids, ignore_missed=False):
+    """Return a dict of email addresses for the given user IDs.
+
+    Args:
+      cnxn: connection to SQL database.
+      user_ids: list of int user IDs to look up.
+      ignore_missed: if True, does not throw NoSuchUserException, when there
+        are users not found for some user_ids.
+
+    Returns:
+      A dict {user_id: email_addr} for all the requested IDs.
+
+    Raises:
+      exceptions.NoSuchUserException: if any requested user cannot be found
+         and ignore_missed is False.
+    """
+    self.email_cache.CacheItem(framework_constants.NO_USER_SPECIFIED, '')
+    emails_dict, missed_ids = self.email_cache.GetAll(user_ids)
+    if missed_ids:
+      logging.info('got %d user emails from cache', len(emails_dict))
+      rows = self.user_tbl.Select(
+          cnxn, cols=['user_id', 'email'], user_id=missed_ids)
+      retrieved_dict = dict(rows)
+      logging.info('looked up users %r', retrieved_dict)
+      self.email_cache.CacheAll(retrieved_dict)
+      emails_dict.update(retrieved_dict)
+
+    # Check if there are any that we could not find.  ID 0 means "no user".
+    nonexist_ids = [user_id for user_id in user_ids
+                    if user_id and user_id not in emails_dict]
+    if nonexist_ids:
+      if ignore_missed:
+        logging.info('No email addresses found for users %r' % nonexist_ids)
+      else:
+        raise exceptions.NoSuchUserException(
+            'No email addresses found for users %r' % nonexist_ids)
+
+    return emails_dict
+
+  def LookupUserEmail(self, cnxn, user_id):
+    """Get the email address of the given user.
+
+    Args:
+      cnxn: connection to SQL database.
+      user_id: int user ID of the user whose email address is needed.
+
+    Returns:
+      String email address of that user or None if user_id is invalid.
+
+    Raises:
+      exceptions.NoSuchUserException: if no email address was found for that
+      user.
+    """
+    if not user_id:
+      return None
+    emails_dict = self.LookupUserEmails(cnxn, [user_id])
+    return emails_dict[user_id]
+
+  def LookupExistingUserIDs(self, cnxn, emails):
+    """Return a dict of user IDs for the given emails for users that exist.
+
+    Args:
+      cnxn: connection to SQL database.
+      emails: list of string email addresses.
+
+    Returns:
+      A dict {email_addr: user_id} for the requested emails.
+    """
+    # Look up these users in the RAM cache
+    user_id_dict, missed_emails = self.user_id_cache.GetAll(emails)
+
+    # Hit the DB to lookup any user IDs that were not cached.
+    if missed_emails:
+      rows = self.user_tbl.Select(
+          cnxn, cols=['email', 'user_id'], email=missed_emails)
+      retrieved_dict = dict(rows)
+      # Cache all the user IDs that we retrieved to make later requests faster.
+      self.user_id_cache.CacheAll(retrieved_dict)
+      user_id_dict.update(retrieved_dict)
+
+    return user_id_dict
+
+  def LookupUserIDs(self, cnxn, emails, autocreate=False,
+                    allowgroups=False):
+    """Return a dict of user IDs for the given emails.
+
+    Args:
+      cnxn: connection to SQL database.
+      emails: list of string email addresses.
+      autocreate: set to True to create users that were not found.
+      allowgroups: set to True to allow non-email user name for group
+      creation.
+
+    Returns:
+      A dict {email_addr: user_id} for the requested emails.
+
+    Raises:
+      exceptions.NoSuchUserException: if some users were not found and
+          autocreate is False.
+    """
+    # Skip any addresses that look like "--" or are empty,
+    # because that means "no user".
+    # Also, make sure all email addresses are lower case.
+    needed_emails = [email.lower() for email in emails
+                     if email
+                     and not framework_constants.NO_VALUE_RE.match(email)]
+
+    # Look up these users in the RAM cache
+    user_id_dict = self.LookupExistingUserIDs(cnxn, needed_emails)
+    if len(needed_emails) == len(user_id_dict):
+      return user_id_dict
+
+    # If any were not found in the DB, create them or raise an exception.
+    nonexist_emails = [email for email in needed_emails
+                       if email not in user_id_dict]
+    logging.info('nonexist_emails: %r, autocreate is %r',
+                 nonexist_emails, autocreate)
+    if not autocreate:
+      raise exceptions.NoSuchUserException('%r' % nonexist_emails)
+
+    if not allowgroups:
+      # Only create accounts for valid email addresses.
+      nonexist_emails = [email for email in nonexist_emails
+                         if validate.IsValidEmail(email)]
+      if not nonexist_emails:
+        return user_id_dict
+
+    self._CreateUsers(cnxn, nonexist_emails)
+    created_rows = self.user_tbl.Select(
+      cnxn, cols=['email', 'user_id'], email=nonexist_emails)
+    created_dict = dict(created_rows)
+    # Cache all the user IDs that we retrieved to make later requests faster.
+    self.user_id_cache.CacheAll(created_dict)
+    user_id_dict.update(created_dict)
+
+    logging.info('looked up User IDs %r', user_id_dict)
+    return user_id_dict
+
+  def LookupUserID(self, cnxn, email, autocreate=False, allowgroups=False):
+    """Get one user ID for the given email address.
+
+    Args:
+      cnxn: connection to SQL database.
+      email: string email address of the user to look up.
+      autocreate: set to True to create users that were not found.
+      allowgroups: set to True to allow non-email user name for group
+          creation.
+
+    Returns:
+      The int user ID of the specified user.
+
+    Raises:
+      exceptions.NoSuchUserException if the user was not found and autocreate
+          is False.
+    """
+    email = email.lower()
+    email_dict = self.LookupUserIDs(
+        cnxn, [email], autocreate=autocreate, allowgroups=allowgroups)
+    if email not in email_dict:
+      raise exceptions.NoSuchUserException('%r not found' % email)
+    return email_dict[email]
+
+  ### Retrieval of user objects: with preferences and cues
+
+  def GetUsersByIDs(self, cnxn, user_ids, use_cache=True, skip_missed=False):
+    """Return a dictionary of retrieved User PBs.
+
+    Args:
+      cnxn: connection to SQL database.
+      user_ids: list of user IDs to fetch.
+      use_cache: set to False to ignore cache and force DB lookup.
+      skip_missed: set to True if default User objects for missed_ids should
+          not be created.
+
+    Returns:
+      A dict {user_id: user_pb} for each specified user ID.  For any user ID
+      that is not fount in the DB, a default User PB is created on-the-fly.
+    """
+    # Check the RAM cache and memcache, as appropriate.
+    result_dict, missed_ids = self.user_2lc.GetAll(
+        cnxn, user_ids, use_cache=use_cache)
+
+    # TODO(crbug/monorail/7367): Never create default values for missed_ids
+    # once we remove all code paths that hit this. See bug for more info.
+    # Any new code that calls this method, should not rely on this
+    # functionality.
+    if missed_ids and not skip_missed:
+      # Provide default values for any user ID that was not found.
+      result_dict.update(
+          (user_id, user_pb2.MakeUser(user_id)) for user_id in missed_ids)
+
+    return result_dict
+
+  def GetUser(self, cnxn, user_id):
+    """Load the specified user from the user details table."""
+    return self.GetUsersByIDs(cnxn, [user_id])[user_id]
+
+  ### Updating user objects
+
+  def UpdateUser(self, cnxn, user_id, user):
+    """Store a user PB in the database.
+
+    Args:
+      cnxn: connection to SQL database.
+      user_id: int user ID of the user to update.
+      user: User PB to store.
+
+    Returns:
+      Nothing.
+    """
+    if not user_id:
+      raise exceptions.NoSuchUserException('Cannot update anonymous user')
+
+    delta = {
+        'is_site_admin': user.is_site_admin,
+        'notify_issue_change': user.notify_issue_change,
+        'notify_starred_issue_change': user.notify_starred_issue_change,
+        'email_compact_subject': user.email_compact_subject,
+        'email_view_widget': user.email_view_widget,
+        'notify_starred_ping': user.notify_starred_ping,
+        'banned': user.banned,
+        'after_issue_update': str(user.after_issue_update or 'UP_TO_LIST'),
+        'keep_people_perms_open': user.keep_people_perms_open,
+        'preview_on_hover': user.preview_on_hover,
+        'obscure_email': user.obscure_email,
+        'last_visit_timestamp': user.last_visit_timestamp,
+        'email_bounce_timestamp': user.email_bounce_timestamp,
+        'vacation_message': user.vacation_message,
+        }
+    # Start sending UPDATE statements, but don't COMMIT until the end.
+    self.user_tbl.Update(cnxn, delta, user_id=user_id, commit=False)
+
+    cnxn.Commit()
+    self.user_2lc.InvalidateKeys(cnxn, [user_id])
+
+  def UpdateUserBan(
+      self, cnxn, user_id, user,
+      is_banned=None, banned_reason=None):
+    if is_banned is not None:
+      if is_banned:
+        user.banned = banned_reason or 'No reason given'
+      else:
+        user.reset('banned')
+
+    # Write the user settings to the database.
+    self.UpdateUser(cnxn, user_id, user)
+
+  def GetRecentlyVisitedHotlists(self, cnxn, user_id):
+    recent_hotlist_rows = self.hotlistvisithistory_tbl.Select(
+        cnxn, cols=['hotlist_id'], user_id=[user_id],
+        order_by=[('viewed DESC', [])], limit=10)
+    return [row[0] for row in recent_hotlist_rows]
+
+  def AddVisitedHotlist(self, cnxn, user_id, hotlist_id, commit=True):
+    self.hotlistvisithistory_tbl.Delete(
+        cnxn, hotlist_id=hotlist_id, user_id=user_id, commit=False)
+    self.hotlistvisithistory_tbl.InsertRows(
+        cnxn, HOTLISTVISITHISTORY_COLS,
+        [(hotlist_id, user_id, int(time.time()))],
+        commit=commit)
+
+  def ExpungeHotlistsFromHistory(self, cnxn, hotlist_ids, commit=True):
+    self.hotlistvisithistory_tbl.Delete(
+        cnxn, hotlist_id=hotlist_ids, commit=commit)
+
+  def ExpungeUsersHotlistsHistory(self, cnxn, user_ids, commit=True):
+    self.hotlistvisithistory_tbl.Delete(cnxn, user_id=user_ids, commit=commit)
+
+  def TrimUserVisitedHotlists(self, cnxn, commit=True):
+    """For any user who has visited more than 10 hotlists, trim history."""
+    user_id_rows = self.hotlistvisithistory_tbl.Select(
+        cnxn, cols=['user_id'], group_by=['user_id'],
+        having=[('COUNT(*) > %s', [10])], limit=1000)
+
+    for user_id in [row[0] for row in user_id_rows]:
+      viewed_hotlist_rows = self.hotlistvisithistory_tbl.Select(
+          cnxn,
+          cols=['viewed'],
+          user_id=user_id,
+          order_by=[('viewed DESC', [])])
+      if len(viewed_hotlist_rows) > 10:
+        cut_off_date = viewed_hotlist_rows[9][0]
+        self.hotlistvisithistory_tbl.Delete(
+            cnxn,
+            user_id=user_id,
+            where=[('viewed < %s', [cut_off_date])],
+            commit=commit)
+
+  ### Linked account invites
+
+  def GetPendingLinkedInvites(self, cnxn, user_id):
+    """Return lists of accounts that have invited this account."""
+    if not user_id:
+      return [], []
+    invite_rows = self.linkedaccountinvite_tbl.Select(
+        cnxn, cols=LINKEDACCOUNTINVITE_COLS, parent_id=user_id,
+        child_id=user_id, or_where_conds=True)
+    invite_as_parent = [row[1] for row in invite_rows
+                        if row[0] == user_id]
+    invite_as_child = [row[0] for row in invite_rows
+                       if row[1] == user_id]
+    return invite_as_parent, invite_as_child
+
+  def _AssertNotAlreadyLinked(self, cnxn, parent_id, child_id):
+    """Check constraints on our linked account graph."""
+    # Our linked account graph should be no more than one level deep.
+    parent_is_already_a_child = self.linkedaccount_tbl.Select(
+        cnxn, cols=LINKEDACCOUNT_COLS, child_id=parent_id)
+    if parent_is_already_a_child:
+      raise exceptions.InputException('Parent account is already a child')
+    child_is_already_a_parent = self.linkedaccount_tbl.Select(
+        cnxn, cols=LINKEDACCOUNT_COLS, parent_id=child_id)
+    if child_is_already_a_parent:
+      raise exceptions.InputException('Child account is already a parent')
+
+    # A child account can only be linked to one parent.
+    child_is_already_a_child = self.linkedaccount_tbl.Select(
+        cnxn, cols=LINKEDACCOUNT_COLS, child_id=child_id)
+    if child_is_already_a_child:
+      raise exceptions.InputException('Child account is already linked')
+
+  def InviteLinkedParent(self, cnxn, parent_id, child_id):
+    """Child stores an invite for the proposed parent user to consider."""
+    if not parent_id:
+      raise exceptions.InputException('Parent account is missing')
+    if not child_id:
+      raise exceptions.InputException('Child account is missing')
+    self._AssertNotAlreadyLinked(cnxn, parent_id, child_id)
+    self.linkedaccountinvite_tbl.InsertRow(
+        cnxn, parent_id=parent_id, child_id=child_id)
+
+  def AcceptLinkedChild(self, cnxn, parent_id, child_id):
+    """Parent accepts an invite from a child account."""
+    if not parent_id:
+      raise exceptions.InputException('Parent account is missing')
+    if not child_id:
+      raise exceptions.InputException('Child account is missing')
+    # Check that the child has previously created an invite for this parent.
+    invite_rows = self.linkedaccountinvite_tbl.Select(
+        cnxn, cols=LINKEDACCOUNTINVITE_COLS,
+        parent_id=parent_id, child_id=child_id)
+    if not invite_rows:
+      raise exceptions.InputException('No such invite')
+
+    self._AssertNotAlreadyLinked(cnxn, parent_id, child_id)
+
+    self.linkedaccount_tbl.InsertRow(
+        cnxn, parent_id=parent_id, child_id=child_id)
+    self.linkedaccountinvite_tbl.Delete(
+        cnxn, parent_id=parent_id, child_id=child_id)
+    self.user_2lc.InvalidateKeys(cnxn, [parent_id, child_id])
+
+  def UnlinkAccounts(self, cnxn, parent_id, child_id):
+    """Delete a linked-account relationship."""
+    if not parent_id:
+      raise exceptions.InputException('Parent account is missing')
+    if not child_id:
+      raise exceptions.InputException('Child account is missing')
+    self.linkedaccount_tbl.Delete(
+        cnxn, parent_id=parent_id, child_id=child_id)
+    self.user_2lc.InvalidateKeys(cnxn, [parent_id, child_id])
+
+  ### User settings
+  # Settings are details about a user account that are usually needed
+  # every time that user is displayed to another user.
+
+  # TODO(jrobbins): Move most of these into UserPrefs.
+  def UpdateUserSettings(
+      self, cnxn, user_id, user, notify=None, notify_starred=None,
+      email_compact_subject=None, email_view_widget=None,
+      notify_starred_ping=None, obscure_email=None, after_issue_update=None,
+      is_site_admin=None, is_banned=None, banned_reason=None,
+      keep_people_perms_open=None, preview_on_hover=None,
+      vacation_message=None):
+    """Update the preferences of the specified user.
+
+    Args:
+      cnxn: connection to SQL database.
+      user_id: int user ID of the user whose settings we are updating.
+      user: User PB of user before changes are applied.
+      keyword args: dictionary of setting names mapped to new values.
+
+    Returns:
+      The user's new User PB.
+    """
+    # notifications
+    if notify is not None:
+      user.notify_issue_change = notify
+    if notify_starred is not None:
+      user.notify_starred_issue_change = notify_starred
+    if notify_starred_ping is not None:
+      user.notify_starred_ping = notify_starred_ping
+    if email_compact_subject is not None:
+      user.email_compact_subject = email_compact_subject
+    if email_view_widget is not None:
+      user.email_view_widget = email_view_widget
+
+    # display options
+    if after_issue_update is not None:
+      user.after_issue_update = user_pb2.IssueUpdateNav(after_issue_update)
+    if preview_on_hover is not None:
+      user.preview_on_hover = preview_on_hover
+    if keep_people_perms_open is not None:
+      user.keep_people_perms_open = keep_people_perms_open
+
+    # misc
+    if obscure_email is not None:
+      user.obscure_email = obscure_email
+
+    # admin
+    if is_site_admin is not None:
+      user.is_site_admin = is_site_admin
+    if is_banned is not None:
+      if is_banned:
+        user.banned = banned_reason or 'No reason given'
+      else:
+        user.reset('banned')
+
+    # user availability
+    if vacation_message is not None:
+      user.vacation_message = vacation_message
+
+    # Write the user settings to the database.
+    self.UpdateUser(cnxn, user_id, user)
+
+  ### User preferences
+  # These are separate from settings in the User objects because they are
+  # only needed for the currently signed in user.
+
+  def GetUsersPrefs(self, cnxn, user_ids, use_cache=True):
+    """Return {user_id: userprefs} for the requested user IDs."""
+    prefs_dict, misses = self.userprefs_2lc.GetAll(
+        cnxn, user_ids, use_cache=use_cache)
+    # Make sure that every user is represented in the result.
+    for user_id in misses:
+      prefs_dict[user_id] = user_pb2.UserPrefs(user_id=user_id)
+    return prefs_dict
+
+  def GetUserPrefs(self, cnxn, user_id, use_cache=True):
+    """Return a UserPrefs PB for the requested user ID."""
+    prefs_dict = self.GetUsersPrefs(cnxn, [user_id], use_cache=use_cache)
+    return prefs_dict[user_id]
+
+  def GetUserPrefsByEmail(self, cnxn, email, use_cache=True):
+    """Return a UserPrefs PB for the requested email, or an empty UserPrefs."""
+    try:
+      user_id = self.LookupUserID(cnxn, email)
+      user_prefs = self.GetUserPrefs(cnxn, user_id, use_cache=use_cache)
+    except exceptions.NoSuchUserException:
+      user_prefs = user_pb2.UserPrefs()
+    return user_prefs
+
+  def SetUserPrefs(self, cnxn, user_id, pref_values):
+    """Store the given list of UserPrefValues."""
+    userprefs_rows = [(user_id, upv.name, upv.value) for upv in pref_values]
+    self.userprefs_tbl.InsertRows(
+        cnxn, USERPREFS_COLS, userprefs_rows, replace=True)
+    self.userprefs_2lc.InvalidateKeys(cnxn, [user_id])
+
+  ### Expunge all User Data from DB
+
+  def ExpungeUsers(self, cnxn, user_ids):
+    """Completely wipes user data from User DB tables for given users.
+
+    This method will not commit the operation. This method will not make
+    changes to in-memory data.
+    NOTE: This method ends with an operation that deletes user rows. If
+    appropriate methods that remove references to the User table rows are
+    not called before, the commit will fail. See work_env.ExpungeUsers
+    for more info.
+
+    Args:
+      cnxn: connection to SQL database.
+      user_ids: list of user_ids for users we want to delete.
+    """
+    self.linkedaccount_tbl.Delete(cnxn, parent_id=user_ids, commit=False)
+    self.linkedaccount_tbl.Delete(cnxn, child_id=user_ids, commit=False)
+    self.linkedaccountinvite_tbl.Delete(cnxn, parent_id=user_ids, commit=False)
+    self.linkedaccountinvite_tbl.Delete(cnxn, child_id=user_ids, commit=False)
+    self.userprefs_tbl.Delete(cnxn, user_id=user_ids, commit=False)
+    self.user_tbl.Delete(cnxn, user_id=user_ids, commit=False)
+
+  def TotalUsersCount(self, cnxn):
+    """Returns the total number of rows in the User table.
+
+    The placeholder User reserved for representing deleted users within Monorail
+    will not be counted.
+    """
+    # Subtract one so we don't count the deleted user with
+    # with user_id = framework_constants.DELETED_USER_ID
+    return (self.user_tbl.SelectValue(cnxn, col='COUNT(*)')) - 1
+
+  def GetAllUserEmailsBatch(self, cnxn, limit=1000, offset=0):
+    """Returns a list of user emails.
+
+    This method can be used for listing all user emails in Monorail's DB.
+    The list will contain at most [limit] emails, and be ordered by
+    user_id. The list will start at the given offset value. The email for
+    the placeholder User reserved for representing deleted users within
+    Monorail will never be returned.
+
+    Args:
+      cnxn: connection to SQL database.
+      limit: limit on the number of emails returned, defaults to 1000.
+      offset: starting index of the list, defaults to 0.
+
+    """
+    rows = self.user_tbl.Select(
+        cnxn, cols=['email'],
+        limit=limit,
+        offset=offset,
+        where=[('user_id != %s', [framework_constants.DELETED_USER_ID])],
+        order_by=[('user_id ASC', [])])
+    return [row[0] for row in rows]
diff --git a/services/usergroup_svc.py b/services/usergroup_svc.py
new file mode 100644
index 0000000..72797fc
--- /dev/null
+++ b/services/usergroup_svc.py
@@ -0,0 +1,616 @@
+# 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
+
+"""Persistence class for user groups.
+
+User groups are represented in the database by:
+- A row in the Users table giving an email address and user ID.
+  (A "group ID" is the user_id of the group in the User table.)
+- A row in the UserGroupSettings table giving user group settings.
+
+Membership of a user X in user group Y is represented as:
+- A row in the UserGroup table with user_id=X and group_id=Y.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+import re
+
+from framework import exceptions
+from framework import permissions
+from framework import sql
+from proto import usergroup_pb2
+from services import caches
+
+
+USERGROUP_TABLE_NAME = 'UserGroup'
+USERGROUPSETTINGS_TABLE_NAME = 'UserGroupSettings'
+USERGROUPPROJECTS_TABLE_NAME = 'Group2Project'
+
+USERGROUP_COLS = ['user_id', 'group_id', 'role']
+USERGROUPSETTINGS_COLS = ['group_id', 'who_can_view_members',
+                          'external_group_type', 'last_sync_time',
+                          'notify_members', 'notify_group']
+USERGROUPPROJECTS_COLS = ['group_id', 'project_id']
+
+GROUP_TYPE_ENUM = (
+    'chrome_infra_auth', 'mdb', 'baggins', 'computed')
+
+
+class MembershipTwoLevelCache(caches.AbstractTwoLevelCache):
+  """Class to manage RAM and memcache for each user's memberships."""
+
+  def __init__(self, cache_manager, usergroup_service, group_dag):
+    super(MembershipTwoLevelCache, self).__init__(
+        cache_manager, 'user', 'memberships:', None)
+    self.usergroup_service = usergroup_service
+    self.group_dag = group_dag
+
+  def _DeserializeMemberships(self, memberships_rows):
+    """Reserialize the DB results into a {user_id: {group_id}}."""
+    result_dict = collections.defaultdict(set)
+    for user_id, group_id in memberships_rows:
+      result_dict[user_id].add(group_id)
+
+    return result_dict
+
+  def FetchItems(self, cnxn, keys):
+    """On RAM and memcache miss, hit the database to get memberships."""
+    direct_memberships_rows = self.usergroup_service.usergroup_tbl.Select(
+        cnxn, cols=['user_id', 'group_id'], distinct=True,
+        user_id=keys)
+    memberships_set = set()
+    self.group_dag.MarkObsolete()
+    logging.info('Rebuild group dag on RAM and memcache miss')
+    for c_id, p_id in direct_memberships_rows:
+      all_parents = self.group_dag.GetAllAncestors(cnxn, p_id, True)
+      all_parents.append(p_id)
+      memberships_set.update([(c_id, g_id) for g_id in all_parents])
+    retrieved_dict = self._DeserializeMemberships(list(memberships_set))
+
+    # Make sure that every requested user is in the result, and gets cached.
+    retrieved_dict.update(
+        (user_id, set()) for user_id in keys
+        if user_id not in retrieved_dict)
+    return retrieved_dict
+
+
+class UserGroupService(object):
+  """The persistence layer for user group data."""
+
+  def __init__(self, cache_manager):
+    """Initialize this service so that it is ready to use.
+
+    Args:
+      cache_manager: local cache with distributed invalidation.
+    """
+    self.usergroup_tbl = sql.SQLTableManager(USERGROUP_TABLE_NAME)
+    self.usergroupsettings_tbl = sql.SQLTableManager(
+        USERGROUPSETTINGS_TABLE_NAME)
+    self.usergroupprojects_tbl = sql.SQLTableManager(
+        USERGROUPPROJECTS_TABLE_NAME)
+
+    self.group_dag = UserGroupDAG(self)
+
+    # Like a dictionary {user_id: {group_id}}
+    self.memberships_2lc = MembershipTwoLevelCache(
+        cache_manager, self, self.group_dag)
+    # Like a dictionary {group_email: [group_id]}
+    self.group_id_cache = caches.ValueCentricRamCache(
+        cache_manager, 'usergroup')
+
+  ### Group creation
+
+  def CreateGroup(self, cnxn, services, group_name, who_can_view_members,
+                  ext_group_type=None, friend_projects=None):
+    """Create a new user group.
+
+    Args:
+      cnxn: connection to SQL database.
+      services: connections to backend services.
+      group_name: string email address of the group to create.
+      who_can_view_members: 'owners', 'members', or 'anyone'.
+      ext_group_type: The type of external group to import.
+      friend_projects: The project ids declared as group friends to view its
+        members.
+
+    Returns:
+      int group_id of the new group.
+    """
+    friend_projects = friend_projects or []
+    assert who_can_view_members in ('owners', 'members', 'anyone')
+    if ext_group_type:
+      ext_group_type = str(ext_group_type).lower()
+      assert ext_group_type in GROUP_TYPE_ENUM, ext_group_type
+      assert who_can_view_members == 'owners'
+    group_id = services.user.LookupUserID(
+        cnxn, group_name.lower(), autocreate=True, allowgroups=True)
+    group_settings = usergroup_pb2.MakeSettings(
+        who_can_view_members, ext_group_type, 0, friend_projects)
+    self.UpdateSettings(cnxn, group_id, group_settings)
+    self.group_id_cache.InvalidateAll(cnxn)
+    return group_id
+
+  def DeleteGroups(self, cnxn, group_ids):
+    """Delete groups' members and settings. It will NOT delete user entries.
+
+    Args:
+      cnxn: connection to SQL database.
+      group_ids: list of group ids to delete.
+    """
+    member_ids_dict, owner_ids_dict = self.LookupMembers(cnxn, group_ids)
+    citizens_id_dict = collections.defaultdict(list)
+    for g_id, user_ids in member_ids_dict.items():
+      citizens_id_dict[g_id].extend(user_ids)
+    for g_id, user_ids in owner_ids_dict.items():
+      citizens_id_dict[g_id].extend(user_ids)
+    for g_id, citizen_ids in citizens_id_dict.items():
+      logging.info('Deleting group %d', g_id)
+      # Remove group members, friend projects and settings
+      self.RemoveMembers(cnxn, g_id, citizen_ids)
+      self.usergroupprojects_tbl.Delete(cnxn, group_id=g_id)
+      self.usergroupsettings_tbl.Delete(cnxn, group_id=g_id)
+    self.group_id_cache.InvalidateAll(cnxn)
+
+  def DetermineWhichUserIDsAreGroups(self, cnxn, user_ids):
+    """From a list of user IDs, identify potential user groups.
+
+    Args:
+      cnxn: connection to SQL database.
+      user_ids: list of user IDs to examine.
+
+    Returns:
+      A list with a subset of the given user IDs that are user groups
+      rather than individual users.
+    """
+    # It is a group if there is any entry in the UserGroupSettings table.
+    group_id_rows = self.usergroupsettings_tbl.Select(
+        cnxn, cols=['group_id'], group_id=user_ids)
+    group_ids = [row[0] for row in group_id_rows]
+    return group_ids
+
+  ### User memberships in groups
+
+  def LookupComputedMemberships(self, cnxn, domain, use_cache=True):
+    """Look up the computed group memberships of a list of users.
+
+    Args:
+      cnxn: connection to SQL database.
+      domain: string with domain part of user's email address.
+      use_cache: set to False to ignore cached values.
+
+    Returns:
+      A list [group_id] of computed user groups that match the user.
+      For now, the length of this list will always be zero or one.
+    """
+    group_email = 'everyone@%s' % domain
+    group_id = self.LookupUserGroupID(cnxn, group_email, use_cache=use_cache)
+    if group_id:
+      return [group_id]
+
+    return []
+
+  def LookupUserGroupID(self, cnxn, group_email, use_cache=True):
+    """Lookup the group ID for the given user group email address.
+
+    Args:
+      cnxn: connection to SQL database.
+      group_email: string that identies the user group.
+      use_cache: set to False to ignore cached values.
+
+    Returns:
+      Int group_id if found, otherwise None.
+    """
+    if use_cache and self.group_id_cache.HasItem(group_email):
+      return self.group_id_cache.GetItem(group_email)
+
+    rows = self.usergroupsettings_tbl.Select(
+        cnxn, cols=['email', 'group_id'],
+        left_joins=[('User ON UserGroupSettings.group_id = User.user_id', [])],
+        email=group_email,
+        where=[('group_id IS NOT NULL', [])])
+    retrieved_dict = dict(rows)
+    # Cache a "not found" value for emails that are not user groups.
+    if group_email not in retrieved_dict:
+      retrieved_dict[group_email] = None
+    self.group_id_cache.CacheAll(retrieved_dict)
+
+    return retrieved_dict.get(group_email)
+
+  def LookupAllMemberships(self, cnxn, user_ids, use_cache=True):
+    """Lookup all the group memberships of a list of users.
+
+    Args:
+      cnxn: connection to SQL database.
+      user_ids: list of int user IDs to get memberships for.
+      use_cache: set to False to ignore cached values.
+
+    Returns:
+      A dict {user_id: {group_id}} for the given user_ids.
+    """
+    result_dict, missed_ids = self.memberships_2lc.GetAll(
+        cnxn, user_ids, use_cache=use_cache)
+    assert not missed_ids
+    return result_dict
+
+  def LookupMemberships(self, cnxn, user_id):
+    """Return a set of group_ids that this user is a member of."""
+    membership_dict = self.LookupAllMemberships(cnxn, [user_id])
+    return membership_dict[user_id]
+
+  ### Group member addition, removal, and retrieval
+
+  def RemoveMembers(self, cnxn, group_id, old_member_ids):
+    """Remove the given members/owners from the user group."""
+    self.usergroup_tbl.Delete(
+        cnxn, group_id=group_id, user_id=old_member_ids)
+
+    all_affected = self._GetAllMembersInList(cnxn, old_member_ids)
+
+    self.group_dag.MarkObsolete()
+    self.memberships_2lc.InvalidateAllKeys(cnxn, all_affected)
+
+  def UpdateMembers(self, cnxn, group_id, member_ids, new_role):
+    """Update role for given members/owners to the user group."""
+    # Circle detection
+    for mid in member_ids:
+      if self.group_dag.IsChild(cnxn, group_id, mid):
+        raise exceptions.CircularGroupException(
+            '%s is already an ancestor of group %s.' % (mid, group_id))
+
+    self.usergroup_tbl.Delete(
+        cnxn, group_id=group_id, user_id=member_ids)
+    rows = [(member_id, group_id, new_role) for member_id in member_ids]
+    self.usergroup_tbl.InsertRows(
+        cnxn, ['user_id', 'group_id', 'role'], rows)
+
+    all_affected = self._GetAllMembersInList(cnxn, member_ids)
+
+    self.group_dag.MarkObsolete()
+    self.memberships_2lc.InvalidateAllKeys(cnxn, all_affected)
+
+  def _GetAllMembersInList(self, cnxn, group_ids):
+    """Get all direct/indirect members/owners in a list."""
+    children_member_ids, children_owner_ids = self.LookupAllMembers(
+        cnxn, group_ids)
+    all_members_owners = set()
+    all_members_owners.update(group_ids)
+    for users in children_member_ids.values():
+      all_members_owners.update(users)
+    for users in children_owner_ids.values():
+      all_members_owners.update(users)
+    return list(all_members_owners)
+
+  def LookupAllMembers(self, cnxn, group_ids):
+    """Retrieve user IDs of members/owners of any of the given groups
+    transitively."""
+    member_ids_dict = {}
+    owner_ids_dict = {}
+    if not group_ids:
+      return member_ids_dict, owner_ids_dict
+    direct_member_rows = self.usergroup_tbl.Select(
+        cnxn, cols=['user_id', 'group_id', 'role'], distinct=True,
+        group_id=group_ids)
+    for gid in group_ids:
+      all_descendants = self.group_dag.GetAllDescendants(cnxn, gid, True)
+      indirect_member_rows = []
+      if all_descendants:
+        indirect_member_rows = self.usergroup_tbl.Select(
+            cnxn, cols=['user_id'], distinct=True,
+            group_id=all_descendants)
+
+      # Owners must have direct membership. All indirect users are members.
+      owner_ids_dict[gid] = [m[0] for m in direct_member_rows
+                             if m[1] == gid and m[2] == 'owner']
+      member_ids_list = [r[0] for r in indirect_member_rows]
+      member_ids_list.extend([m[0] for m in direct_member_rows
+                             if m[1] == gid and m[2] == 'member'])
+      member_ids_dict[gid] = list(set(member_ids_list))
+    return member_ids_dict, owner_ids_dict
+
+  def LookupMembers(self, cnxn, group_ids):
+    """"Retrieve user IDs of direct members/owners of any of the given groups.
+
+    Args:
+      cnxn: connection to SQL database.
+      group_ids: list of int user IDs for all user groups to be examined.
+
+    Returns:
+      A dict of member IDs, and a dict of owner IDs keyed by group id.
+    """
+    member_ids_dict = {}
+    owner_ids_dict = {}
+    if not group_ids:
+      return member_ids_dict, owner_ids_dict
+    member_rows = self.usergroup_tbl.Select(
+        cnxn, cols=['user_id', 'group_id', 'role'], distinct=True,
+        group_id=group_ids)
+    for gid in group_ids:
+      member_ids_dict[gid] = [row[0] for row in member_rows
+                               if row[1] == gid and row[2] == 'member']
+      owner_ids_dict[gid] = [row[0] for row in member_rows
+                              if row[1] == gid and row[2] == 'owner']
+    return member_ids_dict, owner_ids_dict
+
+  def ExpandAnyGroupEmailRecipients(self, cnxn, user_ids):
+    """Expand the list with members that are part of a group configured
+       to have notifications sent directly to members. Remove any groups
+       not configured to have notifications sent directly to the group.
+
+    Args:
+      cnxn: connection to SQL database.
+      user_ids: list of user IDs to check.
+
+    Returns:
+      A paire (individual user_ids, transitive_ids). individual_user_ids
+          is a list of user IDs that were in the given user_ids list and
+          that identify individual members or a group that has
+          settings.notify_group set to True. transitive_ids is a list of
+          user IDs of members of any user group in user_ids with
+          settings.notify_members set to True.
+    """
+    group_ids = self.DetermineWhichUserIDsAreGroups(cnxn, user_ids)
+    group_settings_dict = self.GetAllGroupSettings(cnxn, group_ids)
+    member_ids_dict, owner_ids_dict = self.LookupAllMembers(cnxn, group_ids)
+    indirect_ids = set()
+    direct_ids = {uid for uid in user_ids if uid not in group_ids}
+    for gid, settings in group_settings_dict.items():
+      if settings.notify_members:
+        indirect_ids.update(member_ids_dict.get(gid, set()))
+        indirect_ids.update(owner_ids_dict.get(gid, set()))
+      if settings.notify_group:
+        direct_ids.add(gid)
+
+    return list(direct_ids), list(indirect_ids)
+
+  def LookupVisibleMembers(
+      self, cnxn, group_id_list, perms, effective_ids, services):
+    """"Retrieve the list of user group direct member/owner IDs that the user
+    may see.
+
+    Args:
+      cnxn: connection to SQL database.
+      group_id_list: list of int user IDs for all user groups to be examined.
+      perms: optional PermissionSet for the user viewing this page.
+      effective_ids: set of int user IDs for that user and all
+          their group memberships.
+      services: backend services.
+
+    Returns:
+      A list of all the member IDs from any group that the user is allowed
+      to view.
+    """
+    settings_dict = self.GetAllGroupSettings(cnxn, group_id_list)
+    group_ids = list(settings_dict.keys())
+    (owned_project_ids, membered_project_ids,
+     contrib_project_ids) = services.project.GetUserRolesInAllProjects(
+         cnxn, effective_ids)
+    project_ids = owned_project_ids.union(
+        membered_project_ids).union(contrib_project_ids)
+    # We need to fetch all members/owners to determine whether the requester
+    # has permission to view.
+    direct_member_ids_dict, direct_owner_ids_dict = self.LookupMembers(
+        cnxn, group_ids)
+    all_member_ids_dict, all_owner_ids_dict = self.LookupAllMembers(
+        cnxn, group_ids)
+    visible_member_ids = {}
+    visible_owner_ids = {}
+    for gid in group_ids:
+      member_ids = all_member_ids_dict[gid]
+      owner_ids = all_owner_ids_dict[gid]
+
+      if permissions.CanViewGroupMembers(
+          perms, effective_ids, settings_dict[gid], member_ids, owner_ids,
+          project_ids):
+        visible_member_ids[gid] = direct_member_ids_dict[gid]
+        visible_owner_ids[gid] = direct_owner_ids_dict[gid]
+
+    return visible_member_ids, visible_owner_ids
+
+  ### Group settings
+
+  def GetAllUserGroupsInfo(self, cnxn):
+    """Fetch (addr, member_count, usergroup_settings) for all user groups."""
+    group_rows = self.usergroupsettings_tbl.Select(
+        cnxn, cols=['email'] + USERGROUPSETTINGS_COLS,
+        left_joins=[('User ON UserGroupSettings.group_id = User.user_id', [])])
+    count_rows = self.usergroup_tbl.Select(
+        cnxn, cols=['group_id', 'COUNT(*)'],
+        group_by=['group_id'])
+    count_dict = dict(count_rows)
+
+    group_ids = [g[1] for g in group_rows]
+    friends_dict = self.GetAllGroupFriendProjects(cnxn, group_ids)
+
+    user_group_info_tuples = [
+        (email, count_dict.get(group_id, 0),
+         usergroup_pb2.MakeSettings(visiblity, group_type, last_sync_time,
+                                    friends_dict.get(group_id, []),
+                                    bool(notify_members), bool(notify_group)),
+         group_id)
+        for (email, group_id, visiblity, group_type, last_sync_time,
+             notify_members, notify_group) in group_rows]
+    return user_group_info_tuples
+
+  def GetAllGroupSettings(self, cnxn, group_ids):
+    """Fetch {group_id: group_settings} for the specified groups."""
+    # TODO(jrobbins): add settings to control who can join, etc.
+    rows = self.usergroupsettings_tbl.Select(
+        cnxn, cols=USERGROUPSETTINGS_COLS, group_id=group_ids)
+    friends_dict = self.GetAllGroupFriendProjects(cnxn, group_ids)
+    settings_dict = {
+        group_id: usergroup_pb2.MakeSettings(
+            vis, group_type, last_sync_time, friends_dict.get(group_id, []),
+            notify_members=bool(notify_members),
+            notify_group=bool(notify_group))
+        for (group_id, vis, group_type, last_sync_time,
+             notify_members, notify_group) in rows}
+    return settings_dict
+
+  def GetGroupSettings(self, cnxn, group_id):
+    """Retrieve group settings for the specified user group.
+
+    Args:
+      cnxn: connection to SQL database.
+      group_id: int user ID of the user group.
+
+    Returns:
+      A UserGroupSettings object, or None if no such group exists.
+    """
+    return self.GetAllGroupSettings(cnxn, [group_id]).get(group_id)
+
+  def UpdateSettings(self, cnxn, group_id, group_settings):
+    """Update the visiblity settings of the specified group."""
+    who_can_view_members = str(group_settings.who_can_view_members).lower()
+    ext_group_type = group_settings.ext_group_type
+    assert who_can_view_members in ('owners', 'members', 'anyone')
+    if ext_group_type:
+      ext_group_type = str(group_settings.ext_group_type).lower()
+      assert ext_group_type in GROUP_TYPE_ENUM, ext_group_type
+      assert who_can_view_members == 'owners'
+    self.usergroupsettings_tbl.InsertRow(
+        cnxn, group_id=group_id, who_can_view_members=who_can_view_members,
+        external_group_type=ext_group_type,
+        last_sync_time=group_settings.last_sync_time,
+        notify_members=group_settings.notify_members,
+        notify_group=group_settings.notify_group,
+        replace=True)
+    self.usergroupprojects_tbl.Delete(
+        cnxn, group_id=group_id)
+    if group_settings.friend_projects:
+      rows = [(group_id, p_id) for p_id in group_settings.friend_projects]
+      self.usergroupprojects_tbl.InsertRows(
+        cnxn, ['group_id', 'project_id'], rows)
+
+  def GetAllGroupFriendProjects(self, cnxn, group_ids):
+    """Get {group_id: [project_ids]} for the specified user groups."""
+    rows = self.usergroupprojects_tbl.Select(
+        cnxn, cols=USERGROUPPROJECTS_COLS, group_id=group_ids)
+    friends_dict = {}
+    for group_id, project_id in rows:
+      friends_dict.setdefault(group_id, []).append(project_id)
+    return friends_dict
+
+  def GetGroupFriendProjects(self, cnxn, group_id):
+    """Get a list of friend projects for the specified user group."""
+    return self.GetAllGroupFriendProjects(cnxn, [group_id]).get(group_id)
+
+  def ValidateFriendProjects(self, cnxn, services, friend_projects):
+    """Validate friend projects.
+
+    Returns:
+      A list of project ids if no errors, or an error message.
+    """
+    project_names = list(filter(None, re.split('; |, | |;|,', friend_projects)))
+    id_dict = services.project.LookupProjectIDs(cnxn, project_names)
+    missed_projects = []
+    result = []
+    for p_name in project_names:
+      if p_name in id_dict:
+        result.append(id_dict[p_name])
+      else:
+        missed_projects.append(p_name)
+    error_msg = ''
+    if missed_projects:
+      error_msg = 'Project(s) %s do not exist' % ', '.join(missed_projects)
+      return None, error_msg
+    else:
+      return result, None
+
+  # TODO(jrobbins): re-implement FindUntrustedGroups()
+
+  def ExpungeUsersInGroups(self, cnxn, ids):
+    """Wipes the given user from the groups system.
+    The given user_ids may to members or groups, or groups themselves.
+    The groups and all their members will be deleted. The users will be
+    wiped from the groups they belong to.
+
+    It will NOT delete user entries. This method will not commit the
+    operations. This method will not make any changes to in-memory data.
+    """
+    # Delete any groups
+    self.usergroupprojects_tbl.Delete(cnxn, group_id=ids, commit=False)
+    self.usergroupsettings_tbl.Delete(cnxn, group_id=ids, commit=False)
+    self.usergroup_tbl.Delete(cnxn, group_id=ids, commit=False)
+
+    # Delete any group members
+    self.usergroup_tbl.Delete(cnxn, user_id=ids, commit=False)
+
+
+class UserGroupDAG(object):
+  """A directed-acyclic graph of potentially nested user groups."""
+
+  def __init__(self, usergroup_service):
+    self.usergroup_service = usergroup_service
+    self.user_group_parents = collections.defaultdict(list)
+    self.user_group_children = collections.defaultdict(list)
+    self.initialized = False
+
+  def Build(self, cnxn, circle_detection=False):
+    if not self.initialized:
+      self.user_group_parents.clear()
+      self.user_group_children.clear()
+      group_ids = self.usergroup_service.usergroupsettings_tbl.Select(
+          cnxn, cols=['group_id'])
+      usergroup_rows = self.usergroup_service.usergroup_tbl.Select(
+          cnxn, cols=['user_id', 'group_id'], distinct=True,
+          user_id=[r[0] for r in group_ids])
+      for user_id, group_id in usergroup_rows:
+        self.user_group_parents[user_id].append(group_id)
+        self.user_group_children[group_id].append(user_id)
+    self.initialized = True
+
+    if circle_detection:
+      for child_id, parent_ids in self.user_group_parents.items():
+        for parent_id in parent_ids:
+          if self.IsChild(cnxn, parent_id, child_id):
+            logging.error(
+                'Circle exists between group %d and %d.', child_id, parent_id)
+
+  def GetAllAncestors(self, cnxn, group_id, circle_detection=False):
+    """Return a list of distinct ancestor group IDs for the given group."""
+    self.Build(cnxn, circle_detection)
+    result = set()
+    child_ids = [group_id]
+    while child_ids:
+      parent_ids = set()
+      for c_id in child_ids:
+        group_ids = self.user_group_parents[c_id]
+        parent_ids.update(g_id for g_id in group_ids if g_id not in result)
+        result.update(parent_ids)
+      child_ids = list(parent_ids)
+    return list(result)
+
+  def GetAllDescendants(self, cnxn, group_id, circle_detection=False):
+    """Return a list of distinct descendant group IDs for the given group."""
+    self.Build(cnxn, circle_detection)
+    result = set()
+    parent_ids = [group_id]
+    while parent_ids:
+      child_ids = set()
+      for p_id in parent_ids:
+        group_ids = self.user_group_children[p_id]
+        child_ids.update(g_id for g_id in group_ids if g_id not in result)
+        result.update(child_ids)
+      parent_ids = list(child_ids)
+    return list(result)
+
+  def IsChild(self, cnxn, child_id, parent_id):
+    """Returns True if child_id is a direct/indirect child of parent_id."""
+    all_descendants = self.GetAllDescendants(cnxn, parent_id)
+    return child_id in all_descendants
+
+  def MarkObsolete(self):
+    """Mark the DAG as uninitialized so it'll be re-built."""
+    self.initialized = False
+
+  def __repr__(self):
+    result = {}
+    result['parents'] = self.user_group_parents
+    result['children'] = self.user_group_children
+    return str(result)
diff --git a/settings.py b/settings.py
new file mode 100644
index 0000000..e5c5bd1
--- /dev/null
+++ b/settings.py
@@ -0,0 +1,519 @@
+# 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
+
+"""Defines settings for monorail."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import os
+import re
+
+from google.appengine.api import app_identity
+
+from framework import framework_constants
+from proto import project_pb2
+from proto import site_pb2
+
+
+# This file is divided into the following parts:
+# 1. Settings you must edit before deploying your site.
+# 2. Settings you would edit on certain occasions while maintaining your site.
+# 3. Settings enable specific features.
+# 4. Settings that you can usually leave as-is.
+
+# TODO(jrobbins): Store these settings in the database and implement
+# servlets for domain admins to edit them without needing to redeploy the
+# app.
+
+
+####
+# Part 1: settings that you must edit before deploying your site.
+
+# Email address that is offered to users who might need help using the tool.
+feedback_email = 'jrobbins+monorail.feedback@chromium.org'
+
+# For debugging when running in staging: send all outbound
+# email to this address rather than to the actual address that
+# it would normally be sent to.
+send_all_email_to = 'monorail-staging-emails+all+%(user)s+%(domain)s@google.com'
+
+# For debugging when running the server locally: send all outbound
+# email to this address rather than to the actual address that
+# it would normally be sent to.
+send_local_email_to = (
+    send_all_email_to or
+    'monorail-staging-emails+dev+%(user)s+%(domain)s@google.com')
+
+# User to send emails from Monorail as. The reply_to sections of emails will be
+# set to appspotmail addresses.
+# Note: If configuring a new monorail instance without DNS records and reserved
+#       email addresses then setting these values to
+#       'reply@${app_id}.appspotmail.com' and 'noreply@{app_id}.appspotmail.com'
+#       is likely the best option.
+send_email_as_format = 'monorail@%(domain)s'
+send_noreply_email_as_format = 'monorail+noreply@%(domain)s'
+
+# The default is to look for a database named "monorail" in replicas
+# named "replica-00" .. "replica-09"
+# Replica names for -prod, -staging, and -dev may diverge if replicas ever fail.
+# In such cases the db_replica_names list can be overwritten in Part 5.
+db_database_name = 'monorail'
+db_primary_name = 'primary'
+db_replica_prefix = 'replica'
+db_region = 'us-central1'
+
+# The default connection pool size for mysql connections.
+db_cnxn_pool_size = 20
+
+# The number of logical database shards used.  Each replica is complete copy
+# of the primary, so any replica DB can answer queries about any logical shard.
+num_logical_shards = 10
+
+# "Learn more" link for the site home page
+learn_more_link = None
+
+# Site name, displayed above the search box on the site home page.
+site_name = 'Monorail'
+
+# Who is allowed to create new projects?  Set to ANYONE or ADMIN_ONLY.
+project_creation_restriction = site_pb2.UserTypeRestriction.ADMIN_ONLY
+
+# Default access level when creating a new project.
+default_access_level = project_pb2.ProjectAccess.ANYONE
+
+# Possible access levels to offer when creating a new project.
+allowed_access_levels = [
+    project_pb2.ProjectAccess.ANYONE,
+    project_pb2.ProjectAccess.MEMBERS_ONLY]
+
+# Who is allowed to create user groups?  Set to ANYONE or ADMIN_ONLY.
+group_creation_restriction = site_pb2.UserTypeRestriction.ADMIN_ONLY
+
+# Who is allowed to create hotlists? Set to ANYONE or ADMIN_ONLY.
+hotlist_creation_restriction = site_pb2.UserTypeRestriction.ANYONE
+
+# Text that mentions these words as shorthand host names will be autolinked
+# regardless of the lack of "https://" or ".com".
+autolink_shorthand_hosts = [
+    'go', 'g', 'shortn', 'who', 'teams',
+    ]
+autolink_numeric_shorthand_hosts = [
+    'b', 't', 'o', 'omg', 'cl', 'cr',
+    ]
+
+
+# We only allow self-service account linking invites when the child account is
+# linking to a parent account in an allowed domain.
+linkable_domains = {
+  # Child account domain: [parent account domains]
+  'chromium.org': ['google.com'],
+  'google.com': ['chromium.org'],
+  # TODO(jrobbins): webrtc.org, etc.
+}
+
+
+####
+# Part 2: Settings you would edit on certain occasions.
+
+# Read-only mode prevents changes while we make server-side changes.
+read_only = False
+
+# Timestamp used to notify users when the read only mode or other status
+# described in the banner message takes effect.  It is
+# expressed as a tuple of ints: (year, month, day[, hour[, minute[, second]]])
+# e.g. (2009, 3, 20, 21, 45) represents March 20 2009 9:45PM UTC.
+banner_time = None
+
+# Display a site maintenance banner on every monorail page.
+banner_message = ''
+
+# User accounts with email addresses at these domains are all banned.
+banned_user_domains = []
+
+# We use this for specifying cloud task parent
+CLOUD_TASKS_REGION = 'us-central1'
+
+# We only send subscription notifications to users who have visited the
+# site in the last 6 months.
+subscription_timeout_secs = 180 * framework_constants.SECS_PER_DAY
+
+# Location of GCS spam classification staging trainer. Whenever the training
+# code is changed, this should be updated to point to the new package.
+trainer_staging = ('gs://monorail-staging-mlengine/spam_trainer_1517870972/'
+                   'packages/befc9b29d9beb7e89d509bd1e9866183c138e3a32317cc'
+                   'e253342ac9f8e7c375/trainer-0.1.tar.gz')
+
+# Location of GCS spam classification prod trainer. Whenever the training
+# code is changed, this should be updated to point to the new package.
+trainer_prod = ('gs://monorail-prod-mlengine/spam_trainer_1521755738/packages/'
+                '3339dfcb5d7b6c9d714fb9b332fd72d05823e9a1850ceaf16533a6124bcad'
+                '6fd/trainer-0.1.tar.gz')
+####
+# Part 3: Settings that enable specific features
+
+# Enables "My projects" drop down menu
+enable_my_projects_menu = True
+
+# Enables stars in the UI for projects
+enable_project_stars = True
+
+# Enables stars in the UI for users
+enable_user_stars = True
+
+# Enable quick edit mode in issue peek dialog and show dialog on hover
+enable_quick_edit = True
+
+
+####
+# Part 4: Settings that you can usually leave as-is.
+
+# local_mode makes the server slower and more dynamic for easier debugging.
+# E.g., template files are reloaded on each request.
+local_mode = os.environ['SERVER_SOFTWARE'].startswith('Development')
+unit_test_mode = os.environ['SERVER_SOFTWARE'].startswith('test')
+
+# If we assume 1KB each, then this would be 400 MB for this cache in frontends
+# that have only 1024 MB total.
+issue_cache_max_size = 400 * 1000
+
+# If we assume 1KB each, then this would be 400 MB for this cache in frontends
+# that have only 1024 MB total.
+comment_cache_max_size = 400 * 1000
+
+# 150K users should be enough for all the frequent daily users plus the
+# occasional users that are mentioned on any popular pages.
+user_cache_max_size = 150 * 1000
+
+# Normally we use the default namespace, but during development it is
+# sometimes useful to run a tainted version on staging that has a separate
+# memcache namespace.  E.g., os.environ.get('CURRENT_VERSION_ID')
+memcache_namespace = None  # Should be None when committed.
+redis_namespace = None
+
+# Default Redis host and port
+redis_host = 'localhost'
+redis_port = '6379'
+
+# Recompute derived issue fields via work items rather than while
+# the user is waiting for a page to load.
+recompute_derived_fields_in_worker = True
+
+# The issue search SQL queries have a LIMIT clause with this amount.
+search_limit_per_shard = 10 * 1000  # This is more than all open in chromium.
+
+# The GAE search feature is slow, so don't request too many results.
+# This limit is approximately the most results that we can get from
+# the fulltext engine in 1s.  If we reach this limit in any shard,
+# the user will see a message explaining that results were capped.
+fulltext_limit_per_shard = 1 * 2000
+
+# Retrieve at most this many issues from the DB when showing an issue grid.
+max_issues_in_grid = 6000
+# This is the most tiles that we show in grid view.  If the number of results
+# is larger than this, we display IDs instead.
+max_tiles_in_grid = 1000
+
+# Maximum number of project results to display on a single pagination page
+max_project_search_results_per_page = 100
+
+# Maximum number of results per pagination page, regardless of what
+# the user specified in their request.  This exists to prevent someone
+# from doing a DoS attack that makes our servers do a huge amount of work.
+max_artifact_search_results_per_page = 1000
+
+# Maximum number of comments to display on a single pagination page
+max_comments_per_page = 500
+
+# Max number of issue starrers to notify via email.  Issues with more
+# that this many starrers will only notify the last N of them after a
+# comment from a project member.
+max_starrers_to_notify = 4000
+
+# In projects that have more than this many issues the next and prev
+# links on the issue detail page will not be shown when the user comes
+# directly to an issue without specifying any query terms.
+threshold_to_suppress_prev_next = 10000
+
+# Format string for the name of the FTS index shards for issues.
+search_index_name_format = 'issues%02d'
+
+# Name of the FTS index for projects (not sharded).
+project_search_index_name = 'projects'
+
+# Each backend has this many seconds to respond, otherwise frontend gives up
+# on that shard.
+backend_deadline = 45
+
+# If the initial call to a backend fails, try again this many times.
+# Initial backend calls are failfast, meaning that they fail immediately rather
+# than queue behind other requests.  The last 2 retries will wait in queue.
+backend_retries = 3
+
+# Do various extra logging at INFO level.
+enable_profiler_logging = True
+
+# Mail sending domain.  Normally set this to None and it will be computed
+# automatically from your AppEngine APP_ID. But, it can be overridden below.
+mail_domain = None
+
+# URL format to browse source code revisions.  This can be overridden
+# in specific projects by setting project.revision_url_format.
+# The format string may include "{revnum}" for the revision number.
+revision_url_format = 'https://crrev.com/{revnum}'
+
+# Users with emails in the "priviledged" domains do NOT get any advantage
+# but they do default their preference to show unobscured email addresses.
+priviledged_user_domains = [
+  'google.com', 'chromium.org', 'webrtc.org',
+  ]
+
+# Branded domains:  Any UI GET to a project listed below on prod or staging
+# should have the specified host, otherwise it will be redirected such that
+# the specified host is used.
+branded_domains = {}  # defaults to empty for localhost
+branded_domains_dev = {
+    'fuchsia': 'bugs-dev.fuchsia.dev',
+    '*': 'bugs-dev.chromium.org',
+}
+branded_domains_staging = {
+    'fuchsia': 'bugs-staging.fuchsia.dev',
+    '*': 'bugs-staging.chromium.org',
+}
+branded_domains_prod = {
+    'fuchsia': 'bugs.fuchsia.dev',
+    '*': 'bugs.chromium.org',
+}
+
+# The site home page will immediately redirect to a default project for these
+# domains, if the project can be viewed.  Structure is {hostport: project_name}.
+domain_to_default_project = {}  # defaults to empty for localhost
+domain_to_default_project_dev = {'bugs-dev.fuchsia.dev': 'fuchsia'}
+domain_to_default_project_staging = {'bugs-staging.fuchsia.dev': 'fuchsia'}
+domain_to_default_project_prod = {'bugs.fuchsia.dev': 'fuchsia'}
+
+
+# Names of projects on code.google.com which we allow cross-linking to.
+recognized_codesite_projects = [
+  'chromium-os',
+  'chrome-os-partner',
+]
+
+####
+# Part 5:  Instance-specific settings that override lines above.
+# This ID is for -staging and other misc deployments. Prod is defined below.
+analytics_id = 'UA-55762617-20'
+
+if unit_test_mode:
+  db_cloud_project = ''  # No real database is used during unit testing.
+  app_id = ''
+else:
+  app_id = app_identity.get_application_id()
+
+  if app_id == 'monorail-staging':
+    site_name = 'Monorail Staging'
+    banner_message = 'This staging site does not send emails.'
+    # The Google Cloud SQL databases to use.
+    db_cloud_project = app_id
+    branded_domains = branded_domains_staging
+    domain_to_default_project = domain_to_default_project_staging
+    # For each of these redis_hosts, they must match the corresponding
+    # HOST address of the redis instance for the environment. You can use
+    # the following command to find it.
+    # ```
+    # gcloud redis instances list --project monorail-staging \
+    #   --region us-central1
+    # ````
+    redis_host = '10.228.109.51'
+
+  elif app_id == 'monorail-dev':
+    site_name = 'Monorail Dev'
+    banner_message = 'This dev site does not send emails.'
+    # The Google Cloud SQL databases to use.
+    db_cloud_project = app_id
+    branded_domains = branded_domains_dev
+    domain_to_default_project = domain_to_default_project_dev
+    # See comment above on how to find this address.
+    redis_host = '10.150.170.251'
+    # Use replicas created when testing the restore procedures on 2021-02-24
+    db_replica_prefix = 'replica-2'
+
+  elif app_id == 'monorail-prod':
+    send_all_email_to = None  # Deliver it to the intended users.
+    # The Google Cloud SQL databases to use.
+    db_cloud_project = app_id
+    analytics_id = 'UA-55762617-14'
+    branded_domains = branded_domains_prod
+    domain_to_default_project = domain_to_default_project_prod
+    # See comment above on how to find this address.
+    redis_host = '10.190.48.180'
+
+if local_mode:
+  site_name = 'Monorail Local'
+  num_logical_shards = 10
+  redis_host = 'localhost'
+  # Run cloud tasks emulator at port 9090
+  CLOUD_TASKS_EMULATOR_ADDRESS = '127.0.0.1:9090'
+
+# Combine the customized info above to make the name of the primary DB instance.
+db_instance = db_cloud_project + ':' + db_region + ':' + db_primary_name
+
+# Combine the customized info above to make the names of the replica DB
+# instances.
+db_replica_names = ['{}-{:02d}'.format(db_replica_prefix, i) for i in range(10)]
+
+# Format string for the name of the physical database replicas.
+physical_db_name_format = (db_cloud_project + ':' + db_region + ':%s')
+
+# preferred domains to display
+preferred_domains = {
+    'monorail-prod.appspot.com': 'bugs.chromium.org',
+    'monorail-staging.appspot.com': 'bugs-staging.chromium.org',
+    'monorail-dev.appspot.com': 'bugs-dev.chromium.org'}
+
+# Borg robot service account
+borg_service_account = 'chrome-infra-prod-borg@system.gserviceaccount.com'
+
+# Prediction API params.
+classifier_project_id = 'project-id-testing-only'
+
+# Necessary for tests.
+if 'APPLICATION_ID' not in os.environ:
+  os.environ['APPLICATION_ID'] = 'testing-app'
+
+if local_mode:
+  # There is no local stub for ML Engine.
+  classifier_project_id = 'monorail-staging'
+else:
+  classifier_project_id = app_identity.get_application_id()
+
+classifier_model_id = '20170302'
+
+# Number of distinct users who have to flag an issue before it
+# is automatically removed as spam.
+# Currently effectively disabled.
+spam_flag_thresh = 1000
+
+# If the classifier's confidence is less than this value, the
+# item will show up in the spam moderation queue for manual
+# review.
+classifier_moderation_thresh = 1.0
+
+# If the classifier's confidence is greater than this value,
+# and the label is 'spam', the item will automatically be created
+# with is_spam=True, and will be filtered out from search results.
+classifier_spam_thresh = 0.995
+
+# Users with email addresses ending with these will not be subject to
+# spam filtering.
+spam_allowlisted_suffixes = (
+    '@chromium.org',
+    '.gserviceaccount.com',
+    '@google.com',
+    '@webrtc.org',
+)
+
+# New issues filed by these users in these groups
+# automatically get the Restrict-View-Google label.
+restrict_new_issues_user_groups = [
+    'chromeos-all@google.com',
+    'chromeos-acl@google.com',
+    'chromeos-fte-tvc@google.com',
+    'chromeos-fte-tvc@chromium.org',
+    'create-team@google.com',
+    'test-corp-mode@google.com',
+]
+
+# Users in these groups see a "corp mode" warning dialog when commenting
+# on public issues, informing them that their comments are public by default.
+public_issue_notice_user_groups = [
+    'chromeos-all@google.com',
+    'chromeos-acl@google.com',
+    'chromeos-fte-tvc@google.com',
+    'chromeos-fte-tvc@chromium.org',
+    'create-team@google.com',
+    'test-corp-mode@google.com',
+    'tq-team@google.com',
+]
+
+full_emails_perm_groups = [
+    # Synced group that gives members permission to view the full
+    # emails of all users.
+    'monorail-display-names-perm@google.com',
+    # Native Monorail group that gives service account members permission
+    # to view full emails of all users.
+    'display-names-perm-sa@bugs.chromium.org'
+]
+
+# These email suffixes are allowed to create new alert bugs via email.
+alert_allowlisted_suffixes = ('@google.com',)
+
+# The person who is notified if there is an unexpected problem in the alert
+# pipeline.
+alert_escalation_email = 'zhangtiff@google.com'
+
+# Bugs autogenerated from alert emails are created through this account.
+alert_service_account = 'chrome-trooper-alerts@google.com'
+
+# The number of hash buckets to use when vectorizing text from Issues and
+# Comments. This should be the same value that the model was trained with.
+spam_feature_hashes = 500
+
+# The number of features to use when vectorizing text from Issues and
+# Comments. This should be the same value that the model was trained with.
+component_features = 5000
+
+# The name of the spam model in ML Engine.
+spam_model_name = 'spam_only_words'
+
+# The name of the component model in ML Engine
+component_model_name = 'component_top_words'
+
+# The name of the gcs bucket containing component predicition trainer code.
+component_ml_bucket = classifier_project_id + '-mlengine'
+
+ratelimiting_enabled = True
+
+# Requests that hit ratelimiting_cost_thresh_sec get one extra count
+# added to their bucket at the end of the request for each additional
+# multiple of this latency.
+ratelimiting_ms_per_count = 1000
+
+api_ratelimiting_enabled = True
+
+# When we post an auto-ping comment, it is posted by this user @ the preferred
+# domain name.  E.g., 'monorail@bugs.chromium.org'.
+date_action_ping_author = 'monorail'
+
+# Hard-coding this so that we don't rely on sys.maxint, which could
+# potentially differ. It is equal to the maximum unsigned 32 bit integer,
+# because the `int(10) unsigned` column type in MySQL is 32 bits.
+maximum_snapshot_period_end = 4294967295
+
+# The maximum number of rows chart queries can scan.
+chart_query_max_rows = 10000
+
+# Client ID to use for loading the Google API client, gapi.js.
+if app_identity.get_application_id() == 'monorail-prod':
+  gapi_client_id = (
+    '679746765624-tqaakho939p2mc7eb65t4ecrj3gj08rt.apps.googleusercontent.com')
+else:
+  gapi_client_id = (
+    '52759169022-6918fl1hd1qoul985cs1ohgedeb8c9a0.apps.googleusercontent.com')
+
+# The pub/sub topic on which to publish issue update messages.
+if local_mode:
+  # In local dev, send issue updates to the monorail-dev project.
+  # There also exists a pubsub emulator we could potentially use in the future:
+  # https://cloud.google.com/pubsub/docs/emulator
+  pubsub_project = 'monorail-dev'
+else:
+  pubsub_project = app_identity.get_application_id()
+
+pubsub_topic_id = 'projects/%s/topics/issue-updates' % pubsub_project
+
+# All users in the following domains will have API access.
+# Important: the @ symbol must be included.
+api_allowed_email_domains = ('@google.com')
diff --git a/sitewide/__init__.py b/sitewide/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/sitewide/__init__.py
@@ -0,0 +1 @@
+
diff --git a/sitewide/custom_404.py b/sitewide/custom_404.py
new file mode 100644
index 0000000..397bd1d
--- /dev/null
+++ b/sitewide/custom_404.py
@@ -0,0 +1,41 @@
+# 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
+
+"""Page class for generating somewhat informative project-page 404s.
+
+This page class produces a mostly-empty project subpage, which helps
+users find what they're looking for by providing navigational menus,
+rather than telling them "404. That's an error. That's all we know."
+which is maddeningly not helpful when we already have a project pb
+loaded.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import httplib
+from framework import exceptions
+from framework import servlet
+
+
+class ErrorPage(servlet.Servlet):
+  """Page class for generating somewhat informative project-page 404s.
+
+  This page class produces a mostly-empty project subpage, which helps
+  users find what they're looking for by providing navigational menus,
+  rather than telling them "404. That's an error. That's all we know."
+  which is maddeningly not helpful when we already have a project pb
+  loaded.
+  """
+
+  _PAGE_TEMPLATE = 'sitewide/project-404-page.ezt'
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    if not mr.project_name:
+      raise exceptions.InputException('No project specified')
+    return {
+      'http_response_code': httplib.NOT_FOUND,
+      }
diff --git a/sitewide/group_helpers.py b/sitewide/group_helpers.py
new file mode 100644
index 0000000..b0195c5
--- /dev/null
+++ b/sitewide/group_helpers.py
@@ -0,0 +1,78 @@
+# 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
+
+"""Helper functions used in user group modules."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from framework import framework_views
+from proto import usergroup_pb2
+
+
+class GroupVisibilityView(object):
+  """Object for group visibility information that can be easily used in EZT."""
+
+  VISIBILITY_NAMES = {
+      usergroup_pb2.MemberVisibility.ANYONE: 'Anyone on the Internet',
+      usergroup_pb2.MemberVisibility.MEMBERS: 'Group Members',
+      usergroup_pb2.MemberVisibility.OWNERS: 'Group Owners'}
+
+  def __init__(self, group_visibility_enum):
+    self.key = int(group_visibility_enum)
+    self.name = self.VISIBILITY_NAMES[group_visibility_enum]
+
+
+class GroupTypeView(object):
+  """Object for group type information that can be easily used in EZT."""
+
+  TYPE_NAMES = {
+      usergroup_pb2.GroupType.CHROME_INFRA_AUTH: 'Chrome-infra-auth',
+      usergroup_pb2.GroupType.MDB: 'MDB',
+      usergroup_pb2.GroupType.BAGGINS: 'Baggins',
+      usergroup_pb2.GroupType.COMPUTED: 'Computed',
+      }
+
+  def __init__(self, group_type_enum):
+    self.key = int(group_type_enum)
+    self.name = self.TYPE_NAMES[group_type_enum]
+
+
+class GroupMemberView(framework_views.UserView):
+  """Wrapper class to display basic group member information in a template."""
+
+  def __init__(self, user, group_id, role):
+    assert role in ['member', 'owner']
+    super(GroupMemberView, self).__init__(user)
+    self.group_id = group_id
+    self.role = role
+
+
+def BuildUserGroupVisibilityOptions():
+  """Return a list of user group visibility values for use in an HTML menu.
+
+  Returns:
+    A list of GroupVisibilityView objects that can be used in EZT.
+  """
+  vis_levels = [usergroup_pb2.MemberVisibility.OWNERS,
+                usergroup_pb2.MemberVisibility.MEMBERS,
+                usergroup_pb2.MemberVisibility.ANYONE]
+
+  return [GroupVisibilityView(vis) for vis in vis_levels]
+
+
+def BuildUserGroupTypeOptions():
+  """Return a list of user group types for use in an HTML menu.
+
+  Returns:
+    A list of GroupTypeView objects that can be used in EZT.
+  """
+  group_types = [usergroup_pb2.GroupType.CHROME_INFRA_AUTH,
+                 usergroup_pb2.GroupType.MDB,
+                 usergroup_pb2.GroupType.BAGGINS,
+                 usergroup_pb2.GroupType.COMPUTED]
+
+  return sorted([GroupTypeView(gt) for gt in group_types],
+                key=lambda gtv: gtv.name)
diff --git a/sitewide/groupadmin.py b/sitewide/groupadmin.py
new file mode 100644
index 0000000..32ba007
--- /dev/null
+++ b/sitewide/groupadmin.py
@@ -0,0 +1,123 @@
+# 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
+
+"""A class to display user group admin page."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from framework import framework_helpers
+from framework import permissions
+from framework import servlet
+from framework import urls
+from proto import usergroup_pb2
+from services import usergroup_svc
+from sitewide import group_helpers
+
+
+class GroupAdmin(servlet.Servlet):
+  """The group admin page."""
+
+  _PAGE_TEMPLATE = 'sitewide/group-admin-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    """Assert that the user has the permissions needed to view this page."""
+    super(GroupAdmin, self).AssertBasePermission(mr)
+
+    _, owner_ids_dict = self.services.usergroup.LookupMembers(
+        mr.cnxn, [mr.viewed_user_auth.user_id])
+    owner_ids = owner_ids_dict[mr.viewed_user_auth.user_id]
+    if not permissions.CanEditGroup(
+        mr.perms, mr.auth.effective_ids, owner_ids):
+      raise permissions.PermissionException(
+          'User is not allowed to edit a user group')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    group_id = mr.viewed_user_auth.user_id
+    group_settings = self.services.usergroup.GetGroupSettings(
+        mr.cnxn, group_id)
+    visibility_levels = group_helpers.BuildUserGroupVisibilityOptions()
+    initial_visibility = group_helpers.GroupVisibilityView(
+        group_settings.who_can_view_members)
+    group_types = group_helpers.BuildUserGroupTypeOptions()
+    import_group = bool(group_settings.ext_group_type)
+    if import_group:
+      initial_group_type = group_helpers.GroupTypeView(
+          group_settings.ext_group_type)
+    else:
+      initial_group_type = ''
+
+    if group_settings.friend_projects:
+      initial_friendprojects = ', '.join(
+          list(self.services.project.LookupProjectNames(
+              mr.cnxn, group_settings.friend_projects).values()))
+    else:
+      initial_friendprojects = ''
+
+    return {
+        'admin_tab_mode': 'st2',
+        'groupadmin': True,
+        'groupid': group_id,
+        'groupname': mr.viewed_username,
+        'group_types': group_types,
+        'import_group': import_group or '',
+        'initial_friendprojects': initial_friendprojects,
+        'initial_group_type': initial_group_type,
+        'initial_visibility': initial_visibility,
+        'offer_membership_editing': True,
+        'visibility_levels': visibility_levels,
+        }
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    # 1. Gather data from the request.
+    group_name = mr.viewed_username
+    group_id = mr.viewed_user_auth.user_id
+
+    if post_data.get('import_group'):
+      vis_level = usergroup_pb2.MemberVisibility.OWNERS
+      ext_group_type = post_data.get('group_type')
+      friend_projects = ''
+      if not ext_group_type:
+        mr.errors.groupimport = 'Please provide external group type'
+      else:
+        ext_group_type = usergroup_pb2.GroupType(int(ext_group_type))
+    else:
+      vis_level = post_data.get('visibility')
+      ext_group_type = None
+      friend_projects = post_data.get('friendprojects', '')
+      if vis_level:
+        vis_level = usergroup_pb2.MemberVisibility(int(vis_level))
+      else:
+        mr.errors.groupimport = 'Cannot update settings for imported group'
+
+    if not mr.errors.AnyErrors():
+      project_ids, error = self.services.usergroup.ValidateFriendProjects(
+          mr.cnxn, self.services, friend_projects)
+      if error:
+        mr.errors.friendprojects = error
+
+    # 2. Call services layer to save changes.
+    if not mr.errors.AnyErrors():
+      group_settings = usergroup_pb2.UserGroupSettings(
+        who_can_view_members=vis_level,
+        ext_group_type=ext_group_type,
+        friend_projects=project_ids)
+      self.services.usergroup.UpdateSettings(
+          mr.cnxn, group_id, group_settings)
+
+    # 3. Determine the next page in the UI flow.
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(mr, initial_name=group_name)
+    else:
+      return framework_helpers.FormatAbsoluteURL(
+          mr, '/g/%s%s' % (group_name, urls.GROUP_ADMIN),
+          include_project=False, saved=1, ts=int(time.time()))
diff --git a/sitewide/groupcreate.py b/sitewide/groupcreate.py
new file mode 100644
index 0000000..2dac146
--- /dev/null
+++ b/sitewide/groupcreate.py
@@ -0,0 +1,104 @@
+# 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
+
+"""A page for site admins to create a new user group."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import re
+
+from framework import exceptions
+from framework import framework_helpers
+from framework import permissions
+from framework import servlet
+from proto import usergroup_pb2
+from sitewide import group_helpers
+
+
+class GroupCreate(servlet.Servlet):
+  """Shows a page with a simple form to create a user group."""
+
+  _PAGE_TEMPLATE = 'sitewide/group-create-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    """Assert that the user has the permissions needed to view this page."""
+    super(GroupCreate, self).AssertBasePermission(mr)
+
+    if not permissions.CanCreateGroup(mr.perms):
+      raise permissions.PermissionException(
+          'User is not allowed to create a user group')
+
+  def GatherPageData(self, _mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    visibility_levels = group_helpers.BuildUserGroupVisibilityOptions()
+    initial_visibility = group_helpers.GroupVisibilityView(
+        usergroup_pb2.MemberVisibility.ANYONE)
+    group_types = group_helpers.BuildUserGroupTypeOptions()
+
+    return {
+        'groupadmin': '',
+        'group_types': group_types,
+        'import_group': '',
+        'initial_friendprojects': '',
+        'initial_group_type': '',
+        'initial_name': '',
+        'initial_visibility': initial_visibility,
+        'visibility_levels': visibility_levels,
+        }
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    # 1. Gather data from the request.
+    group_name = post_data.get('groupname')
+    try:
+      existing_group_id = self.services.user.LookupUserID(mr.cnxn, group_name)
+      existing_settings = self.services.usergroup.GetGroupSettings(
+          mr.cnxn, existing_group_id)
+      if existing_settings:
+        mr.errors.groupname = 'That user group already exists'
+    except exceptions.NoSuchUserException:
+      pass
+
+    if post_data.get('import_group'):
+      vis = usergroup_pb2.MemberVisibility.OWNERS
+      ext_group_type = post_data.get('group_type')
+      friend_projects = ''
+      if not ext_group_type:
+        mr.errors.groupimport = 'Please provide external group type'
+      else:
+        ext_group_type = str(
+            usergroup_pb2.GroupType(int(ext_group_type))).lower()
+
+      if (ext_group_type == 'computed' and
+          not group_name.startswith('everyone@')):
+        mr.errors.groupimport = 'Computed groups must be named everyone@'
+
+    else:
+      vis = usergroup_pb2.MemberVisibility(int(post_data['visibility']))
+      ext_group_type = None
+      friend_projects = post_data.get('friendprojects', '')
+    who_can_view_members = str(vis).lower()
+
+    if not mr.errors.AnyErrors():
+      project_ids, error = self.services.usergroup.ValidateFriendProjects(
+          mr.cnxn, self.services, friend_projects)
+      if error:
+        mr.errors.friendprojects = error
+
+    # 2. Call services layer to save changes.
+    if not mr.errors.AnyErrors():
+      group_id = self.services.usergroup.CreateGroup(
+          mr.cnxn, self.services, group_name, who_can_view_members,
+          ext_group_type, project_ids)
+
+    # 3. Determine the next page in the UI flow.
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(mr, initial_name=group_name)
+    else:
+      # Go to the new user group's detail page.
+      return framework_helpers.FormatAbsoluteURL(
+          mr, '/g/%s/' % group_id, include_project=False)
diff --git a/sitewide/groupdetail.py b/sitewide/groupdetail.py
new file mode 100644
index 0000000..b28baa9
--- /dev/null
+++ b/sitewide/groupdetail.py
@@ -0,0 +1,210 @@
+# 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
+
+"""A class to display a user group, including a paginated list of members."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from framework import exceptions
+from framework import framework_helpers
+from framework import framework_views
+from framework import paginate
+from framework import permissions
+from framework import servlet
+from project import project_helpers
+from proto import usergroup_pb2
+from sitewide import group_helpers
+from sitewide import sitewide_views
+
+MEMBERS_PER_PAGE = 50
+
+
+class GroupDetail(servlet.Servlet):
+  """The group detail page presents information about one user group."""
+
+  _PAGE_TEMPLATE = 'sitewide/group-detail-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    """Assert that the user has the permissions needed to view this page."""
+    super(GroupDetail, self).AssertBasePermission(mr)
+
+    group_id = mr.viewed_user_auth.user_id
+    group_settings = self.services.usergroup.GetGroupSettings(
+        mr.cnxn, group_id)
+    if not group_settings:
+      return
+
+    member_ids, owner_ids = self.services.usergroup.LookupAllMembers(
+          mr.cnxn, [group_id])
+    (owned_project_ids, membered_project_ids,
+     contrib_project_ids) = self.services.project.GetUserRolesInAllProjects(
+         mr.cnxn, mr.auth.effective_ids)
+    project_ids = owned_project_ids.union(
+        membered_project_ids).union(contrib_project_ids)
+    if not permissions.CanViewGroupMembers(
+        mr.perms, mr.auth.effective_ids, group_settings, member_ids[group_id],
+        owner_ids[group_id], project_ids):
+      raise permissions.PermissionException(
+          'User is not allowed to view a user group')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    group_id = mr.viewed_user_auth.user_id
+    group_settings = self.services.usergroup.GetGroupSettings(
+        mr.cnxn, group_id)
+    if not group_settings:
+      raise exceptions.NoSuchGroupException()
+
+    member_ids_dict, owner_ids_dict = (
+        self.services.usergroup.LookupVisibleMembers(
+            mr.cnxn, [group_id], mr.perms, mr.auth.effective_ids,
+            self.services))
+    member_ids = member_ids_dict[group_id]
+    owner_ids = owner_ids_dict[group_id]
+    member_pbs_dict = self.services.user.GetUsersByIDs(
+        mr.cnxn, member_ids)
+    owner_pbs_dict = self.services.user.GetUsersByIDs(
+        mr.cnxn, owner_ids)
+    member_dict = {}
+    for user_id, user_pb in member_pbs_dict.items():
+      member_view = group_helpers.GroupMemberView(user_pb, group_id, 'member')
+      member_dict[user_id] = member_view
+    owner_dict = {}
+    for user_id, user_pb in owner_pbs_dict.items():
+      member_view = group_helpers.GroupMemberView(user_pb, group_id, 'owner')
+      owner_dict[user_id] = member_view
+
+    member_user_views = []
+    member_user_views.extend(
+        sorted(list(owner_dict.values()), key=lambda u: u.email))
+    member_user_views.extend(
+        sorted(list(member_dict.values()), key=lambda u: u.email))
+
+    group_view = sitewide_views.GroupView(
+        mr.viewed_user_auth.email, len(member_ids), group_settings,
+        mr.viewed_user_auth.user_id)
+    url_params = [(name, mr.GetParam(name)) for name in
+                  framework_helpers.RECOGNIZED_PARAMS]
+    pagination = paginate.ArtifactPagination(
+        member_user_views, mr.GetPositiveIntParam('num', MEMBERS_PER_PAGE),
+        mr.GetPositiveIntParam('start'), mr.project_name, group_view.detail_url,
+        url_params=url_params)
+
+    is_imported_group = bool(group_settings.ext_group_type)
+
+    offer_membership_editing = permissions.CanEditGroup(
+        mr.perms, mr.auth.effective_ids, owner_ids) and not is_imported_group
+
+    group_type = 'Monorail user group'
+    if group_settings.ext_group_type:
+      group_type = str(group_settings.ext_group_type).capitalize()
+
+    return {
+        'admin_tab_mode': self.ADMIN_TAB_META,
+        'offer_membership_editing': ezt.boolean(offer_membership_editing),
+        'initial_add_members': '',
+        'initially_expand_form': ezt.boolean(False),
+        'groupid': group_id,
+        'groupname': mr.viewed_username,
+        'settings': group_settings,
+        'group_type': group_type,
+        'pagination': pagination,
+        }
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    _, owner_ids_dict = self.services.usergroup.LookupMembers(
+        mr.cnxn, [mr.viewed_user_auth.user_id])
+    owner_ids = owner_ids_dict[mr.viewed_user_auth.user_id]
+    permit_edit = permissions.CanEditGroup(
+        mr.perms, mr.auth.effective_ids, owner_ids)
+    if not permit_edit:
+      raise permissions.PermissionException(
+          'User is not permitted to edit group membership')
+
+    group_settings = self.services.usergroup.GetGroupSettings(
+        mr.cnxn, mr.viewed_user_auth.user_id)
+    if bool(group_settings.ext_group_type):
+      raise permissions.PermissionException(
+          'Imported groups are read-only')
+
+    if 'addbtn' in post_data:
+      return self.ProcessAddMembers(mr, post_data)
+    elif 'removebtn' in post_data:
+      return self.ProcessRemoveMembers(mr, post_data)
+
+  def ProcessAddMembers(self, mr, post_data):
+    """Process the user's request to add members.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+      post_data: dictionary of form data.
+
+    Returns:
+      String URL to redirect the user to after processing.
+    """
+    # 1. Gather data from the request.
+    group_id = mr.viewed_user_auth.user_id
+    add_members_str = post_data.get('addmembers')
+    new_member_ids = project_helpers.ParseUsernames(
+        mr.cnxn, self.services.user, add_members_str)
+    role = post_data['role']
+
+    # 2. Call services layer to save changes.
+    if not mr.errors.AnyErrors():
+      try:
+        self.services.usergroup.UpdateMembers(
+            mr.cnxn, group_id, new_member_ids, role)
+      except exceptions.CircularGroupException:
+        mr.errors.addmembers = (
+            'The members are already ancestors of current group.')
+
+    # 3. Determine the next page in the UI flow.
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(
+          mr, initial_add_members=add_members_str,
+          initially_expand_form=ezt.boolean(True))
+    else:
+      return framework_helpers.FormatAbsoluteURL(
+          mr, '/g/%s/' % mr.viewed_username, include_project=False,
+          saved=1, ts=int(time.time()))
+
+  def ProcessRemoveMembers(self, mr, post_data):
+    """Process the user's request to remove members.
+
+    Args:
+      mr: common information parsed from the HTTP request.
+      post_data: dictionary of form data.
+
+    Returns:
+      String URL to redirect the user to after processing.
+    """
+    # 1. Gather data from the request.
+    remove_strs = post_data.getall('remove')
+    logging.info('remove_strs = %r', remove_strs)
+
+    if not remove_strs:
+      mr.errors.remove = 'No users specified'
+
+    # 2. Call services layer to save changes.
+    if not mr.errors.AnyErrors():
+      remove_ids = set(
+          self.services.user.LookupUserIDs(mr.cnxn, remove_strs).values())
+      self.services.usergroup.RemoveMembers(
+          mr.cnxn, mr.viewed_user_auth.user_id, remove_ids)
+
+    # 3. Determine the next page in the UI flow.
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(mr)
+    else:
+      return framework_helpers.FormatAbsoluteURL(
+          mr, '/g/%s/' % mr.viewed_username, include_project=False,
+          saved=1, ts=int(time.time()))
diff --git a/sitewide/grouplist.py b/sitewide/grouplist.py
new file mode 100644
index 0000000..3adfaa3
--- /dev/null
+++ b/sitewide/grouplist.py
@@ -0,0 +1,78 @@
+# 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
+
+"""Classes to list user groups."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from framework import framework_helpers
+from framework import permissions
+from framework import servlet
+from framework import urls
+from framework import xsrf
+from sitewide import sitewide_views
+
+
+class GroupList(servlet.Servlet):
+  """Shows a page with a simple form to create a user group."""
+
+  _PAGE_TEMPLATE = 'sitewide/group-list-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    """Assert that the user has the permissions needed to view this page."""
+    super(GroupList, self).AssertBasePermission(mr)
+
+    if not mr.perms.HasPerm(permissions.VIEW_GROUP, None, None):
+      raise permissions.PermissionException(
+          'User is not allowed to view list of user groups')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    group_views = [
+        sitewide_views.GroupView(*groupinfo) for groupinfo in
+        self.services.usergroup.GetAllUserGroupsInfo(mr.cnxn)]
+    group_views.sort(key=lambda gv: gv.name)
+    offer_group_deletion = mr.perms.CanUsePerm(
+        permissions.DELETE_GROUP, mr.auth.effective_ids, None, [])
+    offer_group_creation = mr.perms.CanUsePerm(
+        permissions.CREATE_GROUP, mr.auth.effective_ids, None, [])
+
+    return {
+        'form_token': xsrf.GenerateToken(
+            mr.auth.user_id, '%s.do' % urls.GROUP_DELETE),
+        'groups': group_views,
+        'offer_group_deletion': ezt.boolean(offer_group_deletion),
+        'offer_group_creation': ezt.boolean(offer_group_creation),
+        }
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    if 'removebtn' in post_data:
+      return self.ProcessDeleteGroups(mr, post_data)
+
+  def ProcessDeleteGroups(self, mr, post_data):
+    """Process request to delete groups."""
+    if not mr.perms.CanUsePerm(
+        permissions.DELETE_GROUP, mr.auth.effective_ids, None, []):
+      raise permissions.PermissionException(
+          'User is not permitted to delete groups')
+
+    remove_groups = [int(g) for g in post_data.getall('remove')]
+
+    if not mr.errors.AnyErrors():
+      self.services.usergroup.DeleteGroups(mr.cnxn, remove_groups)
+
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(mr)
+    else:
+      return framework_helpers.FormatAbsoluteURL(
+          mr, '/g', include_project=False,
+          saved=1, ts=int(time.time()))
diff --git a/sitewide/hostinghome.py b/sitewide/hostinghome.py
new file mode 100644
index 0000000..4a0a47d
--- /dev/null
+++ b/sitewide/hostinghome.py
@@ -0,0 +1,107 @@
+# 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
+
+"""A class to display the hosting home page."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import ezt
+
+import settings
+from businesslogic import work_env
+from framework import exceptions
+from framework import permissions
+from framework import servlet
+from framework import template_helpers
+from framework import urls
+from project import project_views
+from sitewide import projectsearch
+from sitewide import sitewide_helpers
+
+
+class HostingHome(servlet.Servlet):
+  """HostingHome shows the project list and link to create a project."""
+
+  _PAGE_TEMPLATE = 'sitewide/hosting-home-page.ezt'
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    redirect_msg = self._MaybeRedirectToDomainDefaultProject(mr)
+    logging.info(redirect_msg)
+
+    can_create_project = permissions.CanCreateProject(mr.perms)
+
+    # Kick off the search pipeline, it has its own promises for parallelism.
+    pipeline = projectsearch.ProjectSearchPipeline(mr, self.services)
+
+    # Meanwhile, determine which projects the signed-in user has starred.
+    with work_env.WorkEnv(mr, self.services) as we:
+      starred_projects = we.ListStarredProjects()
+      starred_project_ids = {p.project_id for p in starred_projects}
+
+    # A dict of project id to the user's membership status.
+    project_memberships = {}
+    if mr.auth.user_id:
+      with work_env.WorkEnv(mr, self.services) as we:
+        owned, _archive_owned, member_of, contrib_of = (
+            we.GetUserProjects(mr.auth.effective_ids))
+      project_memberships.update({proj.project_id: 'Owner' for proj in owned})
+      project_memberships.update(
+          {proj.project_id: 'Member' for proj in member_of})
+      project_memberships.update(
+          {proj.project_id: 'Contributor' for proj in contrib_of})
+
+    # Finish the project search pipeline.
+    pipeline.SearchForIDs(domain=mr.request.host)
+    pipeline.GetProjectsAndPaginate(mr.cnxn, urls.HOSTING_HOME)
+    project_ids = [p.project_id for p in pipeline.visible_results]
+    star_count_dict = self.services.project_star.CountItemsStars(
+        mr.cnxn, project_ids)
+
+    # Make ProjectView objects
+    project_view_list = [
+        project_views.ProjectView(
+            p, starred=p.project_id in starred_project_ids,
+            num_stars=star_count_dict.get(p.project_id),
+            membership_desc=project_memberships.get(p.project_id))
+        for p in pipeline.visible_results]
+    return {
+        'can_create_project': ezt.boolean(can_create_project),
+        'learn_more_link': settings.learn_more_link,
+        'projects': project_view_list,
+        'pagination': pipeline.pagination,
+        }
+
+  def _MaybeRedirectToDomainDefaultProject(self, mr):
+    """If there is a relevant default project, redirect to it."""
+    project_name = settings.domain_to_default_project.get(mr.request.host)
+    if not project_name:
+      return 'No configured default project redirect for this domain.'
+
+    project = None
+    try:
+      project = self.services.project.GetProjectByName(mr.cnxn, project_name)
+    except exceptions.NoSuchProjectException:
+      pass
+
+    if not project:
+      return 'Domain default project %s not found' % project_name
+
+    if not permissions.UserCanViewProject(
+        mr.auth.user_pb, mr.auth.effective_ids, project):
+      return 'User cannot view default project: %r' % project
+
+    project_url = '/p/%s' % project_name
+    self.redirect(project_url, abort=True)
+    return 'Redirected to %r' % project_url
diff --git a/sitewide/moved.py b/sitewide/moved.py
new file mode 100644
index 0000000..3f63d24
--- /dev/null
+++ b/sitewide/moved.py
@@ -0,0 +1,62 @@
+# 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
+
+"""A class to display a message explaining that a project has moved.
+
+When a project moves, we just display a link to the new location.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from framework import exceptions
+from framework import framework_helpers
+from framework import servlet
+from framework import urls
+from project import project_constants
+
+
+class ProjectMoved(servlet.Servlet):
+  """The ProjectMoved page explains that the project has moved."""
+
+  _PAGE_TEMPLATE = 'sitewide/moved-page.ezt'
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+
+    # We are not actually in /p/PROJECTNAME, so mr.project_name is None.
+    # Putting the ProjectMoved page inside a moved project would make
+    # the redirect logic much more complicated.
+    if not mr.specified_project:
+      raise exceptions.InputException('No project specified')
+
+    project = self.services.project.GetProjectByName(
+        mr.cnxn, mr.specified_project)
+    if not project:
+      self.abort(404, 'project not found')
+
+    if not project.moved_to:
+      # Only show this page for projects that are actually moved.
+      # Don't allow hackers to construct misleading links to this servlet.
+      logging.info('attempt to view ProjectMoved for non-moved project: %s',
+                   mr.specified_project)
+      self.abort(400, 'This project has not been moved')
+
+    if project_constants.RE_PROJECT_NAME.match(project.moved_to):
+      moved_to_url = framework_helpers.FormatAbsoluteURL(
+          mr, urls.SUMMARY, include_project=True, project_name=project.moved_to)
+    elif (project.moved_to.startswith('https://') or
+          project.moved_to.startswith('http://')):
+      moved_to_url = project.moved_to
+    else:
+      # Prevent users from using javascript: or any other tricky URL scheme.
+      moved_to_url = '#invalid-destination-url'
+
+    return {
+        'project_name': mr.specified_project,
+        'moved_to_url': moved_to_url,
+        }
diff --git a/sitewide/projectcreate.py b/sitewide/projectcreate.py
new file mode 100644
index 0000000..83862f6
--- /dev/null
+++ b/sitewide/projectcreate.py
@@ -0,0 +1,157 @@
+# 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
+
+"""Classes for users to create a new project."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+
+import logging
+from six import string_types
+import ezt
+
+import settings
+from businesslogic import work_env
+from framework import exceptions
+from framework import filecontent
+from framework import framework_helpers
+from framework import gcs_helpers
+from framework import jsonfeed
+from framework import permissions
+from framework import servlet
+from framework import urls
+from project import project_constants
+from project import project_helpers
+from project import project_views
+from services import project_svc
+from tracker import tracker_bizobj
+from tracker import tracker_views
+
+
+_MSG_PROJECT_NAME_NOT_AVAIL = 'That project name is not available.'
+_MSG_MISSING_PROJECT_NAME = 'Missing project name'
+_MSG_INVALID_PROJECT_NAME = 'Invalid project name'
+_MSG_MISSING_PROJECT_SUMMARY = 'Missing project summary'
+
+
+class ProjectCreate(servlet.Servlet):
+  """Shows a page with a simple form to create a project."""
+
+  _PAGE_TEMPLATE = 'sitewide/project-create-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    """Assert that the user has the permissions needed to view this page."""
+    super(ProjectCreate, self).AssertBasePermission(mr)
+
+    if not permissions.CanCreateProject(mr.perms):
+      raise permissions.PermissionException(
+          'User is not allowed to create a project')
+
+  def GatherPageData(self, _mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    available_access_levels = project_helpers.BuildProjectAccessOptions(None)
+    offer_access_level = len(available_access_levels) > 1
+    if settings.default_access_level:
+      access_view = project_views.ProjectAccessView(
+          settings.default_access_level)
+    else:
+      access_view = None
+
+    return {
+        'initial_name': '',
+        'initial_summary': '',
+        'initial_description': '',
+        'initial_project_home': '',
+        'initial_docs_url': '',
+        'initial_source_url': '',
+        'initial_logo_gcs_id': '',
+        'initial_logo_file_name': '',
+        'logo_view': tracker_views.LogoView(None),
+        'labels': [],
+        'max_project_name_length': project_constants.MAX_PROJECT_NAME_LENGTH,
+        'offer_access_level': ezt.boolean(offer_access_level),
+        'initial_access': access_view,
+        'available_access_levels': available_access_levels,
+    }
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    # 1. Parse and validate user input.
+    # Project name is taken from post_data because we are creating it.
+    project_name = post_data.get('projectname')
+    if not project_name:
+      mr.errors.projectname = _MSG_MISSING_PROJECT_NAME
+    elif not project_helpers.IsValidProjectName(project_name):
+      mr.errors.projectname = _MSG_INVALID_PROJECT_NAME
+
+    summary = post_data.get('summary')
+    if not summary:
+      mr.errors.summary = _MSG_MISSING_PROJECT_SUMMARY
+    description = post_data.get('description', '')
+
+    access = project_helpers.ParseProjectAccess(None, post_data.get('access'))
+    home_page = post_data.get('project_home')
+    if home_page and not (
+        home_page.startswith('http://') or home_page.startswith('https://')):
+      mr.errors.project_home = 'Home page link must start with http(s)://'
+    docs_url = post_data.get('docs_url')
+    if docs_url and not (
+        docs_url.startswith('http:') or docs_url.startswith('https:')):
+      mr.errors.docs_url = 'Documentation link must start with http: or https:'
+
+    # These are not specified on via the ProjectCreate form,
+    # the user must edit the project after creation to set them.
+    committer_ids = []
+    contributor_ids = []
+
+    # Validate that provided logo is supported.
+    logo_provided = 'logo' in post_data and not isinstance(
+        post_data['logo'], string_types)
+    if logo_provided:
+      item = post_data['logo']
+      try:
+        gcs_helpers.CheckMimeTypeResizable(
+            filecontent.GuessContentTypeFromFilename(item.filename))
+      except gcs_helpers.UnsupportedMimeType, e:
+        mr.errors.logo = e.message
+
+    # 2. Call services layer to save changes.
+    if not mr.errors.AnyErrors():
+      with work_env.WorkEnv(mr, self.services) as we:
+        try:
+          project_id = we.CreateProject(
+              project_name, [mr.auth.user_id],
+              committer_ids, contributor_ids, summary, description,
+              access=access, home_page=home_page, docs_url=docs_url)
+
+          config = tracker_bizobj.MakeDefaultProjectIssueConfig(project_id)
+          self.services.config.StoreConfig(mr.cnxn, config)
+          # Note: No need to store any canned queries or rules yet.
+          self.services.issue.InitializeLocalID(mr.cnxn, project_id)
+
+          # Update project with  logo if specified.
+          if logo_provided:
+            item = post_data['logo']
+            logo_file_name = item.filename
+            logo_gcs_id = gcs_helpers.StoreLogoInGCS(
+                logo_file_name, item.value, project_id)
+            we.UpdateProject(
+                project_id, logo_gcs_id=logo_gcs_id,
+                logo_file_name=logo_file_name)
+
+        except exceptions.ProjectAlreadyExists:
+          mr.errors.projectname = _MSG_PROJECT_NAME_NOT_AVAIL
+
+    # 3. Determine the next page in the UI flow.
+    if mr.errors.AnyErrors():
+      access_view = project_views.ProjectAccessView(access)
+      self.PleaseCorrect(
+          mr, initial_summary=summary, initial_description=description,
+          initial_name=project_name, initial_access=access_view)
+    else:
+      # Go to the new project's introduction page.
+      return framework_helpers.FormatAbsoluteURL(
+          mr, urls.ADMIN_INTRO, project_name=project_name)
diff --git a/sitewide/projectsearch.py b/sitewide/projectsearch.py
new file mode 100644
index 0000000..8ef5fee
--- /dev/null
+++ b/sitewide/projectsearch.py
@@ -0,0 +1,63 @@
+# 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
+
+"""Helper functions and classes used when searching for projects."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from businesslogic import work_env
+from framework import framework_helpers
+from framework import paginate
+from framework import permissions
+
+
+DEFAULT_RESULTS_PER_PAGE = 100
+
+
+class ProjectSearchPipeline(object):
+  """Manage the process of project search, filter, fetch, and pagination."""
+
+  def __init__(self, mr, services,
+               default_results_per_page=DEFAULT_RESULTS_PER_PAGE):
+
+    self.mr = mr
+    self.services = services
+    self.default_results_per_page = default_results_per_page
+    self.pagination = None
+    self.allowed_project_ids = None
+    self.visible_results = None
+
+  def SearchForIDs(self, domain=None):
+    """Get project IDs the user has permission to view."""
+    with work_env.WorkEnv(self.mr, self.services) as we:
+      self.allowed_project_ids = we.ListProjects(domain=domain)
+      logging.info('allowed_project_ids is %r', self.allowed_project_ids)
+
+  def GetProjectsAndPaginate(self, cnxn, list_page_url):
+    """Paginate the filtered list of project names and retrieve Project PBs.
+
+    Args:
+      cnxn: connection to SQL database.
+      list_page_url: string page URL for prev and next links.
+    """
+    with self.mr.profiler.Phase('getting all projects'):
+      project_dict = self.services.project.GetProjects(
+          cnxn, self.allowed_project_ids)
+      project_list = sorted(
+          project_dict.values(),
+          key=lambda p: p.project_name)
+      logging.info('project_list is %r', project_list)
+
+    url_params = [(name, self.mr.GetParam(name)) for name in
+                  framework_helpers.RECOGNIZED_PARAMS]
+    self.pagination = paginate.ArtifactPagination(
+        project_list,
+        self.mr.GetPositiveIntParam('num', self.default_results_per_page),
+        self.mr.GetPositiveIntParam('start'), self.mr.project_name,
+        list_page_url, url_params=url_params)
+    self.visible_results = self.pagination.visible_results
diff --git a/sitewide/sitewide_helpers.py b/sitewide/sitewide_helpers.py
new file mode 100644
index 0000000..33f53c3
--- /dev/null
+++ b/sitewide/sitewide_helpers.py
@@ -0,0 +1,38 @@
+# 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
+
+"""Helper functions used in sitewide servlets."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from framework import permissions
+from proto import project_pb2
+
+
+def GetViewableStarredProjects(
+    cnxn, services, viewed_user_id, effective_ids, logged_in_user):
+  """Returns a list of viewable starred projects."""
+  starred_project_ids = services.project_star.LookupStarredItemIDs(
+      cnxn, viewed_user_id)
+  projects = list(
+      services.project.GetProjects(cnxn, starred_project_ids).values())
+  viewable_projects = FilterViewableProjects(
+      projects, logged_in_user, effective_ids)
+  return viewable_projects
+
+
+def FilterViewableProjects(project_list, logged_in_user, effective_ids):
+  """Return subset of LIVE project protobufs viewable by the given user."""
+  viewable_projects = []
+  for project in project_list:
+    if (project.state == project_pb2.ProjectState.LIVE and
+        permissions.UserCanViewProject(
+            logged_in_user, effective_ids, project)):
+      viewable_projects.append(project)
+
+  return viewable_projects
diff --git a/sitewide/sitewide_views.py b/sitewide/sitewide_views.py
new file mode 100644
index 0000000..64b33bd
--- /dev/null
+++ b/sitewide/sitewide_views.py
@@ -0,0 +1,23 @@
+# 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
+
+"""View objects to help display users and groups in UI templates."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+
+class GroupView(object):
+  """Class to make it easier to display user group metadata."""
+
+  def __init__(self, name, num_members, group_settings, group_id):
+    self.name = name
+    self.num_members = num_members
+    self.who_can_view_members = str(group_settings.who_can_view_members)
+    self.group_id = group_id
+
+    self.detail_url = '/g/%s/' % group_id
diff --git a/sitewide/test/__init__.py b/sitewide/test/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sitewide/test/__init__.py
diff --git a/sitewide/test/custom_404_test.py b/sitewide/test/custom_404_test.py
new file mode 100644
index 0000000..71b52f8
--- /dev/null
+++ b/sitewide/test/custom_404_test.py
@@ -0,0 +1,44 @@
+# Copyright 2017 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
+
+"""Unit tests for the custom_404 servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import httplib
+import unittest
+
+from framework import exceptions
+from services import service_manager
+from sitewide import custom_404
+from testing import fake
+from testing import testing_helpers
+
+
+class Custom404Test(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService())
+    self.servlet = custom_404.ErrorPage('req', 'res', services=self.services)
+
+  def testGatherPageData_NoProjectSpecified(self):
+    """Project was not included in URL, so raise exception, will cause 400."""
+    _, mr = testing_helpers.GetRequestObjects(
+        path='/not/a/project/url')
+
+    with self.assertRaises(exceptions.InputException):
+      self.servlet.GatherPageData(mr)
+
+  def testGatherPageData_Normal(self):
+    """Return page_data dict with a 404 response code specified."""
+    _project = self.services.project.TestAddProject('proj')
+    _, mr = testing_helpers.GetRequestObjects(path='/p/proj/junk')
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(
+      {'http_response_code': httplib.NOT_FOUND},
+      page_data)
diff --git a/sitewide/test/group_helpers_test.py b/sitewide/test/group_helpers_test.py
new file mode 100644
index 0000000..af03d08
--- /dev/null
+++ b/sitewide/test/group_helpers_test.py
@@ -0,0 +1,51 @@
+# 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
+
+"""Unit test for User Group helpers."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from proto import user_pb2
+from proto import usergroup_pb2
+from sitewide import group_helpers
+
+
+class GroupHelpersTest(unittest.TestCase):
+
+  def testGroupVisibilityView(self):
+    gvv_anyone = group_helpers.GroupVisibilityView(
+        usergroup_pb2.MemberVisibility.ANYONE)
+    gvv_members = group_helpers.GroupVisibilityView(
+        usergroup_pb2.MemberVisibility.MEMBERS)
+    gvv_owners = group_helpers.GroupVisibilityView(
+        usergroup_pb2.MemberVisibility.OWNERS)
+    self.assertEqual('Anyone on the Internet', gvv_anyone.name)
+    self.assertEqual('Group Members', gvv_members.name)
+    self.assertEqual('Group Owners', gvv_owners.name)
+
+  def testGroupMemberView(self):
+    user = user_pb2.MakeUser(1, email='test@example.com')
+    gmv = group_helpers.GroupMemberView(user, 888, 'member')
+    self.assertEqual(888, gmv.group_id)
+    self.assertEqual('member', gmv.role)
+
+  def testBuildUserGroupVisibilityOptions(self):
+    vis_views = group_helpers.BuildUserGroupVisibilityOptions()
+    self.assertEqual(3, len(vis_views))
+
+  def testGroupTypeView(self):
+    gt_cia = group_helpers.GroupTypeView(
+        usergroup_pb2.GroupType.CHROME_INFRA_AUTH)
+    gt_mdb = group_helpers.GroupTypeView(
+        usergroup_pb2.GroupType.MDB)
+    self.assertEqual('Chrome-infra-auth', gt_cia.name)
+    self.assertEqual('MDB', gt_mdb.name)
+
+  def testBuildUserGroupTypeOptions(self):
+    group_types = group_helpers.BuildUserGroupTypeOptions()
+    self.assertEqual(4, len(group_types))
diff --git a/sitewide/test/groupadmin_test.py b/sitewide/test/groupadmin_test.py
new file mode 100644
index 0000000..d1f7e0f
--- /dev/null
+++ b/sitewide/test/groupadmin_test.py
@@ -0,0 +1,85 @@
+# 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
+
+"""Unit test for User Group admin servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import permissions
+from proto import usergroup_pb2
+from services import service_manager
+from sitewide import groupadmin
+from testing import fake
+from testing import testing_helpers
+
+
+class GrouAdminTest(unittest.TestCase):
+  """Tests for the GroupAdmin servlet."""
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService())
+    self.services.user.TestAddUser('a@example.com', 111)
+    self.services.user.TestAddUser('b@example.com', 222)
+    self.services.user.TestAddUser('c@example.com', 333)
+    self.services.user.TestAddUser('group@example.com', 888)
+    self.services.user.TestAddUser('importgroup@example.com', 999)
+    self.services.usergroup.TestAddGroupSettings(888, 'group@example.com')
+    self.services.usergroup.TestAddGroupSettings(
+        999, 'importgroup@example.com', external_group_type='mdb')
+    self.servlet = groupadmin.GroupAdmin(
+        'req', 'res', services=self.services)
+    self.mr = testing_helpers.MakeMonorailRequest()
+    self.mr.viewed_username = 'group@example.com'
+    self.mr.viewed_user_auth.user_id = 888
+
+  def testAssertBasePermission(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.GetPermissions(None, {}, None))
+    mr.viewed_user_auth.user_id = 888
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, mr)
+    self.services.usergroup.TestAddMembers(888, [111], 'owner')
+    self.servlet.AssertBasePermission(self.mr)
+
+  def testGatherPageData_Normal(self):
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual('group@example.com', page_data['groupname'])
+    self.assertEqual('Group Members', page_data['initial_visibility'].name)
+    self.assertEqual(3, len(page_data['visibility_levels']))
+
+  def testGatherPageData_Import(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.viewed_username = 'importgroup@example.com'
+    mr.viewed_user_auth.user_id = 999
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual('importgroup@example.com', page_data['groupname'])
+    self.assertTrue(page_data['import_group'])
+    self.assertEqual('MDB', page_data['initial_group_type'].name)
+
+  def testProcessFormData_Normal(self):
+    post_data = fake.PostData(visibility='0')
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertIn('/g/group@example.com/groupadmin', url)
+    group_settings = self.services.usergroup.GetGroupSettings(None, 888)
+    self.assertEqual(usergroup_pb2.MemberVisibility.OWNERS,
+                     group_settings.who_can_view_members)
+
+  def testProcessFormData_Import(self):
+    post_data = fake.PostData(
+        group_type='1', import_group=['on'])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertIn('/g/group@example.com/groupadmin', url)
+    group_settings = self.services.usergroup.GetGroupSettings(None, 888)
+    self.assertEqual(usergroup_pb2.MemberVisibility.OWNERS,
+                     group_settings.who_can_view_members)
+    self.assertEqual(usergroup_pb2.GroupType.MDB,
+                     group_settings.ext_group_type)
diff --git a/sitewide/test/groupcreate_test.py b/sitewide/test/groupcreate_test.py
new file mode 100644
index 0000000..bf7be8d
--- /dev/null
+++ b/sitewide/test/groupcreate_test.py
@@ -0,0 +1,101 @@
+# 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
+
+"""Unit test for User Group creation servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import settings
+from framework import permissions
+from proto import site_pb2
+from proto import usergroup_pb2
+from services import service_manager
+from sitewide import groupcreate
+from testing import fake
+from testing import testing_helpers
+
+
+class GroupCreateTest(unittest.TestCase):
+  """Tests for the GroupCreate servlet."""
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService())
+    self.servlet = groupcreate.GroupCreate(
+        'req', 'res', services=self.services)
+    self.mr = testing_helpers.MakeMonorailRequest()
+
+  def CheckAssertBasePermissions(
+      self, restriction, expect_admin_ok, expect_nonadmin_ok):
+    old_group_creation_restriction = settings.group_creation_restriction
+    settings.group_creation_restriction = restriction
+
+    # Anon users can never do it
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.GetPermissions(None, {}, None))
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, mr)
+
+    mr = testing_helpers.MakeMonorailRequest()
+    if expect_admin_ok:
+      self.servlet.AssertBasePermission(mr)
+    else:
+      self.assertRaises(
+          permissions.PermissionException,
+          self.servlet.AssertBasePermission, mr)
+
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.GetPermissions(mr.auth.user_pb, {111}, None))
+    if expect_nonadmin_ok:
+      self.servlet.AssertBasePermission(mr)
+    else:
+      self.assertRaises(
+          permissions.PermissionException,
+          self.servlet.AssertBasePermission, mr)
+
+    settings.group_creation_restriction = old_group_creation_restriction
+
+  def testAssertBasePermission(self):
+    self.CheckAssertBasePermissions(
+        site_pb2.UserTypeRestriction.ANYONE, True, True)
+    self.CheckAssertBasePermissions(
+        site_pb2.UserTypeRestriction.ADMIN_ONLY, True, False)
+    self.CheckAssertBasePermissions(
+        site_pb2.UserTypeRestriction.NO_ONE, False, False)
+
+  def testGatherPageData(self):
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual('', page_data['initial_name'])
+
+  def testProcessFormData_Normal(self):
+    post_data = fake.PostData(
+        groupname=['group@example.com'], visibility='1')
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertIn('/g/3444127190/', url)
+    group_id = self.services.user.LookupUserID('cnxn', 'group@example.com')
+    group_settings = self.services.usergroup.GetGroupSettings('cnxn', group_id)
+    self.assertIsNotNone(group_settings)
+    members_after, owners_after = self.services.usergroup.LookupMembers(
+        'cnxn', [group_id])
+    self.assertEqual(0, len(members_after[group_id] + owners_after[group_id]))
+
+  def testProcessFormData_Import(self):
+    post_data = fake.PostData(
+        groupname=['group@example.com'], group_type='1',
+        import_group=['on'])
+    self.servlet.ProcessFormData(self.mr, post_data)
+    group_id = self.services.user.LookupUserID('cnxn', 'group@example.com')
+    group_settings = self.services.usergroup.GetGroupSettings('cnxn', group_id)
+    self.assertIsNotNone(group_settings)
+    self.assertEqual(usergroup_pb2.MemberVisibility.OWNERS,
+                     group_settings.who_can_view_members)
+    self.assertEqual(usergroup_pb2.GroupType.MDB,
+                     group_settings.ext_group_type)
diff --git a/sitewide/test/groupdetail_test.py b/sitewide/test/groupdetail_test.py
new file mode 100644
index 0000000..4440bb8
--- /dev/null
+++ b/sitewide/test/groupdetail_test.py
@@ -0,0 +1,146 @@
+# 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
+
+"""Unit test for User Group Detail servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import exceptions
+from framework import permissions
+from services import service_manager
+from sitewide import groupdetail
+from testing import fake
+from testing import testing_helpers
+
+
+class GroupDetailTest(unittest.TestCase):
+  """Tests for the GroupDetail servlet."""
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.services.user.TestAddUser('a@example.com', 111)
+    self.services.user.TestAddUser('b@example.com', 222)
+    self.services.user.TestAddUser('c@example.com', 333)
+    self.services.user.TestAddUser('group@example.com', 888)
+    self.services.usergroup.TestAddGroupSettings(888, 'group@example.com')
+    self.servlet = groupdetail.GroupDetail(
+        'req', 'res', services=self.services)
+    self.mr = testing_helpers.MakeMonorailRequest()
+    self.mr.viewed_username = 'group@example.com'
+    self.mr.viewed_user_auth.user_id = 888
+
+  def testAssertBasePermission(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.GetPermissions(None, {}, None))
+    mr.viewed_user_auth.user_id = 888
+    mr.auth.effective_ids = set([111])
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, mr)
+    self.services.usergroup.TestAddMembers(888, [111], 'member')
+    self.servlet.AssertBasePermission(mr)
+
+  def testAssertBasePermission_IgnoreNoSuchGroup(self):
+    """The permission check does not crash for non-existent user groups."""
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.GetPermissions(None, {}, None))
+    mr.viewed_user_auth.user_id = 404
+    mr.auth.effective_ids = set([111])
+    self.servlet.AssertBasePermission(mr)
+
+  def testAssertBasePermission_IndirectMembership(self):
+    self.services.usergroup.TestAddGroupSettings(999, 'subgroup@example.com')
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.GetPermissions(None, {}, None))
+    mr.viewed_user_auth.user_id = 888
+    mr.auth.effective_ids = set([111])
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, mr)
+    self.services.usergroup.TestAddMembers(888, [999], 'member')
+    self.services.usergroup.TestAddMembers(999, [111], 'member')
+    self.servlet.AssertBasePermission(mr)
+
+  def testGatherPagData_ZeroMembers(self):
+    page_data = self.servlet.GatherPageData(self.mr)
+    pagination = page_data['pagination']
+    self.assertEqual(0, len(pagination.visible_results))
+
+  def testGatherPagData_NonzeroMembers(self):
+    self.services.usergroup.TestAddMembers(888, [111, 222, 333])
+    page_data = self.servlet.GatherPageData(self.mr)
+    pagination = page_data['pagination']
+    self.assertEqual(3, len(pagination.visible_results))
+    self.assertEqual(3, pagination.total_count)
+    self.assertEqual(1, pagination.start)
+    self.assertEqual(3, pagination.last)
+    user_view_a, user_view_b, user_view_c = pagination.visible_results
+    self.assertEqual('a@example.com', user_view_a.email)
+    self.assertEqual('b@example.com', user_view_b.email)
+    self.assertEqual('c@example.com', user_view_c.email)
+
+  def testProcessAddMembers_NoneAdded(self):
+    post_data = fake.PostData(addmembers=[''], role=['member'])
+    url = self.servlet.ProcessAddMembers(self.mr, post_data)
+    self.assertIn('/g/group@example.com/?', url)
+    members_after, _ = self.services.usergroup.LookupMembers('cnxn', [888])
+    self.assertEqual(0, len(members_after[888]))
+
+    self.services.usergroup.TestAddMembers(888, [111, 222, 333])
+    url = self.servlet.ProcessAddMembers(self.mr, post_data)
+    self.assertIn('/g/group@example.com/?', url)
+    members_after, _ = self.services.usergroup.LookupMembers('cnxn', [888])
+    self.assertEqual(3, len(members_after[888]))
+
+  def testProcessAddMembers_SomeAdded(self):
+    self.services.usergroup.TestAddMembers(888, [111])
+    post_data = fake.PostData(
+        addmembers=['b@example.com, c@example.com'], role=['member'])
+    url = self.servlet.ProcessAddMembers(self.mr, post_data)
+    self.assertIn('/g/group@example.com/?', url)
+    members_after, _ = self.services.usergroup.LookupMembers('cnxn', [888])
+    self.assertEqual(3, len(members_after[888]))
+
+  def testProcessRemoveMembers_SomeRemoved(self):
+    self.services.usergroup.TestAddMembers(888, [111, 222, 333])
+    post_data = fake.PostData(remove=['b@example.com', 'c@example.com'])
+    url = self.servlet.ProcessRemoveMembers(self.mr, post_data)
+    self.assertIn('/g/group@example.com/?', url)
+    members_after, _ = self.services.usergroup.LookupMembers('cnxn', [888])
+    self.assertEqual(1, len(members_after[888]))
+
+  def testProcessFormData_NoPermission(self):
+    """Group members cannot edit group."""
+    self.services.usergroup.TestAddMembers(888, [111], 'member')
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.GetPermissions(None, {}, None))
+    mr.viewed_user_auth.user_id = 888
+    mr.auth.effective_ids = set([111])
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.ProcessFormData, mr, {})
+
+  def testProcessFormData_OwnerPermission(self):
+    """Group owners cannot edit group."""
+    self.services.usergroup.TestAddMembers(888, [111], 'owner')
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.GetPermissions(None, {}, None))
+    mr.viewed_user_auth.user_id = 888
+    mr.auth.effective_ids = set([111])
+    self.servlet.ProcessFormData(mr, {})
+
+  def testGatherPagData_NoSuchUserGroup(self):
+    """If there is no such user group, raise an exception."""
+    self.mr.viewed_user_auth.user_id = 404
+    self.assertRaises(
+        exceptions.NoSuchGroupException,
+        self.servlet.GatherPageData, self.mr)
+
+
diff --git a/sitewide/test/grouplist_test.py b/sitewide/test/grouplist_test.py
new file mode 100644
index 0000000..9ec6bd5
--- /dev/null
+++ b/sitewide/test/grouplist_test.py
@@ -0,0 +1,84 @@
+# 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
+
+"""Unit test for User Group List servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from google.appengine.ext import testbed
+
+from framework import permissions
+from services import service_manager
+from sitewide import grouplist
+from testing import fake
+from testing import testing_helpers
+
+
+class GroupListTest(unittest.TestCase):
+  """Tests for the GroupList servlet."""
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        usergroup=fake.UserGroupService())
+    self.servlet = grouplist.GroupList('req', 'res', services=self.services)
+    self.mr = testing_helpers.MakeMonorailRequest()
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+
+  def testAssertBasePermission_Anon(self):
+    self.mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    with self.assertRaises(permissions.PermissionException):
+      self.servlet.AssertBasePermission(self.mr)
+
+  def testAssertBasePermission_RegularUsers(self):
+    self.mr.perms = permissions.COMMITTER_ACTIVE_PERMISSIONSET
+    with self.assertRaises(permissions.PermissionException):
+      self.servlet.AssertBasePermission(self.mr)
+
+  def testAssertBasePermission_SiteAdmin(self):
+    self.mr.perms = permissions.ADMIN_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+
+  def testGatherPagData_ZeroGroups(self):
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual([], page_data['groups'])
+
+  def testGatherPagData_NonzeroGroups(self):
+    self.services.usergroup.TestAddGroupSettings(777, 'group_a@example.com')
+    self.services.usergroup.TestAddGroupSettings(888, 'group_b@example.com')
+    self.services.usergroup.TestAddMembers(888, [111, 222, 333])
+    page_data = self.servlet.GatherPageData(self.mr)
+    group_view_a, group_view_b = page_data['groups']
+    self.assertEqual('group_a@example.com', group_view_a.name)
+    self.assertEqual(0, group_view_a.num_members)
+    self.assertEqual('group_b@example.com', group_view_b.name)
+    self.assertEqual(3, group_view_b.num_members)
+
+  def testProcessFormData_NoPermission(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.USER_PERMISSIONSET)
+    post_data = fake.PostData(
+      removebtn=[1])
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.ProcessFormData, mr, post_data)
+
+  def testProcessFormData_Normal(self):
+    self.services.usergroup.TestAddGroupSettings(
+        888, 'group_b@example.com', friend_projects=[789])
+    self.services.usergroup.TestAddMembers(888, [111, 222, 333])
+
+    post_data = fake.PostData(
+        remove=[888],
+        removebtn=[1])
+    self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertNotIn(888, self.services.usergroup.group_settings)
diff --git a/sitewide/test/hostinghome_test.py b/sitewide/test/hostinghome_test.py
new file mode 100644
index 0000000..f51c9ec
--- /dev/null
+++ b/sitewide/test/hostinghome_test.py
@@ -0,0 +1,146 @@
+# 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
+
+"""Tests for the Monorail home page."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+
+import ezt
+
+import settings
+from framework import permissions
+from proto import project_pb2
+from proto import site_pb2
+from services import service_manager
+from sitewide import hostinghome
+from sitewide import projectsearch
+from testing import fake
+from testing import testing_helpers
+
+
+class MockProjectSearchPipeline(object):
+
+  def __init__(self, _mr, services):
+    self.visible_results = services.mock_visible_results
+    self.pagination = None
+
+  def SearchForIDs(self, domain=None):
+    pass
+
+  def GetProjectsAndPaginate(self, cnxn, list_page_url):
+    pass
+
+
+class HostingHomeTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        project_star=fake.ProjectStarService())
+    self.services.mock_visible_results = []
+    self.project_a = self.services.project.TestAddProject('a', project_id=1)
+    self.project_b = self.services.project.TestAddProject('b', project_id=2)
+
+    self.servlet = hostinghome.HostingHome('req', 'res', services=self.services)
+    self.mr = testing_helpers.MakeMonorailRequest(user_info={'user_id': 111})
+
+    self.orig_pipeline_class = projectsearch.ProjectSearchPipeline
+    projectsearch.ProjectSearchPipeline = MockProjectSearchPipeline
+
+  def tearDown(self):
+    projectsearch.ProjectSearchPipeline = self.orig_pipeline_class
+
+  def testSearch_ZeroResults(self):
+    self.services.mock_visible_results = []
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual([], page_data['projects'])
+
+  def testSearch_NonzeroResults(self):
+    self.services.mock_visible_results = [self.project_a, self.project_b]
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(['a', 'b'],
+                     [pv.project_name for pv in page_data['projects']])
+
+  def testStarCounts(self):
+    """Test the display of star counts on each displayed project."""
+    self.services.mock_visible_results = [self.project_a, self.project_b]
+    # We go straight to the services layer because this is a test set up
+    # rather than an actual user request.
+    self.services.project_star.SetStar('fake cnxn', 1, 111, True)
+    self.services.project_star.SetStar('fake cnxn', 1, 222, True)
+    page_data = self.servlet.GatherPageData(self.mr)
+    project_view_a, project_view_b = page_data['projects']
+    self.assertEqual(2, project_view_a.num_stars)
+    self.assertEqual(0, project_view_b.num_stars)
+
+  def testStarredProjects(self):
+    self.services.mock_visible_results = [self.project_a, self.project_b]
+    self.services.project_star.SetStar('fake cnxn', 1, 111, True)
+    page_data = self.servlet.GatherPageData(self.mr)
+    project_view_a, project_view_b = page_data['projects']
+    self.assertTrue(project_view_a.starred)
+    self.assertFalse(project_view_b.starred)
+
+  def testGatherPageData(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(settings.learn_more_link, page_data['learn_more_link'])
+
+  def testGatherPageData_CanCreateProject(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.perms = permissions.PermissionSet([permissions.CREATE_PROJECT])
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(
+      ezt.boolean(settings.project_creation_restriction ==
+                  site_pb2.UserTypeRestriction.ANYONE),
+      page_data['can_create_project'])
+
+    mr.perms = permissions.PermissionSet([])
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(ezt.boolean(False), page_data['can_create_project'])
+
+  @mock.patch('settings.domain_to_default_project', {})
+  def testMaybeRedirectToDomainDefaultProject_NoMatch(self):
+    """No redirect if the user is not accessing via a configured domain."""
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.request.host = 'example.com'
+    msg = self.servlet._MaybeRedirectToDomainDefaultProject(mr)
+    print('msg: ' + msg)
+    self.assertTrue(msg.startswith('No configured'))
+
+  @mock.patch('settings.domain_to_default_project', {'example.com': 'huh'})
+  def testMaybeRedirectToDomainDefaultProject_NoSuchProject(self):
+    """No redirect if the configured project does not exist."""
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.request.host = 'example.com'
+    print('host is %r' % mr.request.host)
+    msg = self.servlet._MaybeRedirectToDomainDefaultProject(mr)
+    print('msg: ' + msg)
+    self.assertTrue(msg.endswith('not found'))
+
+  @mock.patch('settings.domain_to_default_project', {'example.com': 'a'})
+  def testMaybeRedirectToDomainDefaultProject_CantView(self):
+    """No redirect if the user can't view the configured project."""
+    self.project_a.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.request.host = 'example.com'
+    msg = self.servlet._MaybeRedirectToDomainDefaultProject(mr)
+    print('msg: ' + msg)
+    self.assertTrue(msg.startswith('User cannot'))
+
+  @mock.patch('settings.domain_to_default_project', {'example.com': 'a'})
+  def testMaybeRedirectToDomainDefaultProject_Redirect(self):
+    """We redirect if there's a configured project that the user can view."""
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.request.host = 'example.com'
+    self.servlet.redirect = mock.Mock()
+    msg = self.servlet._MaybeRedirectToDomainDefaultProject(mr)
+    print('msg: ' + msg)
+    self.assertTrue(msg.startswith('Redirected'))
+    self.servlet.redirect.assert_called_once()
diff --git a/sitewide/test/moved_test.py b/sitewide/test/moved_test.py
new file mode 100644
index 0000000..04b9165
--- /dev/null
+++ b/sitewide/test/moved_test.py
@@ -0,0 +1,113 @@
+# 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
+
+"""Unit tests for the moved project notification page servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import webapp2
+
+from framework import exceptions
+from services import service_manager
+from sitewide import moved
+from testing import fake
+from testing import testing_helpers
+
+
+class MovedTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService())
+    self.servlet = moved.ProjectMoved('req', 'res', services=self.services)
+    self.old_project = 'old-project'
+
+  def testGatherPageData_NoProjectSpecified(self):
+    # Project was not included in URL, so raise exception, will cause 400.
+    _, mr = testing_helpers.GetRequestObjects(
+        path='/hosting/moved')
+
+    with self.assertRaises(exceptions.InputException):
+      self.servlet.GatherPageData(mr)
+
+  def testGatherPageData_NoSuchProject(self):
+    # Project doesn't exist, so 404 NOT FOUND.
+    _, mr = testing_helpers.GetRequestObjects(
+        path='/hosting/moved?project=nonexistent')
+
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.servlet.GatherPageData(mr)
+    self.assertEqual(404, cm.exception.code)
+
+  def testGatherPageData_NotMoved(self):
+    # Project exists but has not been moved, so 400 BAD_REQUEST.
+    self.services.project.TestAddProject(self.old_project)
+    _, mr = testing_helpers.GetRequestObjects(
+        path='/hosting/moved?project=%s' % self.old_project)
+
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.servlet.GatherPageData(mr)
+    self.assertEqual(400, cm.exception.code)
+
+  def testGatherPageData_URL(self):
+    # Display the moved_to url if it is valid.
+    project = self.services.project.TestAddProject(self.old_project)
+    project.moved_to = 'https://other-tracker.bugs'
+    _, mr = testing_helpers.GetRequestObjects(
+        path='/hosting/moved?project=%s' % self.old_project)
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertItemsEqual(
+        ['project_name', 'moved_to_url'],
+        list(page_data.keys()))
+    self.assertEqual(self.old_project, page_data['project_name'])
+    self.assertEqual('https://other-tracker.bugs', page_data['moved_to_url'])
+
+  def testGatherPageData_ProjectName(self):
+    # Construct the moved-to url from just the project name.
+    project = self.services.project.TestAddProject(self.old_project)
+    project.moved_to = 'new-project'
+    _, mr = testing_helpers.GetRequestObjects(
+        path='/hosting/moved?project=%s' % self.old_project)
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertItemsEqual(
+        ['project_name', 'moved_to_url'],
+        list(page_data.keys()))
+    self.assertEqual(self.old_project, page_data['project_name'])
+    self.assertEqual('http://127.0.0.1/p/new-project/',
+                     page_data['moved_to_url'])
+
+  def testGatherPageData_HttpProjectName(self):
+    # A project named "http-foo" gets treated as a project, not a url.
+    project = self.services.project.TestAddProject(self.old_project)
+    project.moved_to = 'http-project'
+    _, mr = testing_helpers.GetRequestObjects(
+        path='/hosting/moved?project=%s' % self.old_project)
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertItemsEqual(
+        ['project_name', 'moved_to_url'],
+        list(page_data.keys()))
+    self.assertEqual(self.old_project, page_data['project_name'])
+    self.assertEqual('http://127.0.0.1/p/http-project/',
+                     page_data['moved_to_url'])
+
+  def testGatherPageData_BadScheme(self):
+    # We only display URLs that start with 'http(s)://'.
+    project = self.services.project.TestAddProject(self.old_project)
+    project.moved_to = 'javascript:alert(1)'
+    _, mr = testing_helpers.GetRequestObjects(
+        path='/hosting/moved?project=%s' % self.old_project)
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertItemsEqual(
+        ['project_name', 'moved_to_url'],
+        list(page_data.keys()))
+    self.assertEqual(self.old_project, page_data['project_name'])
+    self.assertEqual('#invalid-destination-url', page_data['moved_to_url'])
diff --git a/sitewide/test/projectcreate_test.py b/sitewide/test/projectcreate_test.py
new file mode 100644
index 0000000..8f468dd
--- /dev/null
+++ b/sitewide/test/projectcreate_test.py
@@ -0,0 +1,74 @@
+# 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
+
+"""Unittests for the Project Creation servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import settings
+from framework import permissions
+from proto import project_pb2
+from proto import site_pb2
+from services import service_manager
+from sitewide import projectcreate
+from testing import fake
+from testing import testing_helpers
+
+
+class ProjectCreateTest(unittest.TestCase):
+
+  def setUp(self):
+    services = service_manager.Services()
+    self.servlet = projectcreate.ProjectCreate('req', 'res', services=services)
+
+  def CheckAssertBasePermissions(
+      self, restriction, expect_admin_ok, expect_nonadmin_ok):
+    old_project_creation_restriction = settings.project_creation_restriction
+    settings.project_creation_restriction = restriction
+
+    # Anon users can never do it
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.GetPermissions(None, {}, None))
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, mr)
+
+    mr = testing_helpers.MakeMonorailRequest()
+    if expect_admin_ok:
+      self.servlet.AssertBasePermission(mr)
+    else:
+      self.assertRaises(
+          permissions.PermissionException,
+          self.servlet.AssertBasePermission, mr)
+
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.GetPermissions(mr.auth.user_pb, {111}, None))
+    if expect_nonadmin_ok:
+      self.servlet.AssertBasePermission(mr)
+    else:
+      self.assertRaises(
+          permissions.PermissionException,
+          self.servlet.AssertBasePermission, mr)
+
+    settings.project_creation_restriction = old_project_creation_restriction
+
+  def testAssertBasePermission(self):
+    self.CheckAssertBasePermissions(
+        site_pb2.UserTypeRestriction.ANYONE, True, True)
+    self.CheckAssertBasePermissions(
+        site_pb2.UserTypeRestriction.ADMIN_ONLY, True, False)
+    self.CheckAssertBasePermissions(
+        site_pb2.UserTypeRestriction.NO_ONE, False, False)
+
+  def testGatherPageData(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual('', page_data['initial_name'])
+    self.assertEqual('', page_data['initial_summary'])
+    self.assertEqual('', page_data['initial_description'])
+    self.assertEqual([], page_data['labels'])
diff --git a/sitewide/test/projectsearch_test.py b/sitewide/test/projectsearch_test.py
new file mode 100644
index 0000000..a0d941d
--- /dev/null
+++ b/sitewide/test/projectsearch_test.py
@@ -0,0 +1,75 @@
+# 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
+
+"""Unittests for the projectsearch module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+
+from framework import profiler
+from proto import project_pb2
+from services import service_manager
+from sitewide import projectsearch
+from testing import fake
+from testing import testing_helpers
+
+
+class ProjectSearchTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService())
+    self.services.project.GetVisibleLiveProjects = mock.MagicMock()
+
+    for idx, letter in enumerate('abcdefghijklmnopqrstuvwxyz'):
+      self.services.project.TestAddProject(letter, project_id=idx + 1)
+    for idx in range(27, 110):
+      self.services.project.TestAddProject(str(idx), project_id=idx)
+
+    self.addCleanup(mock.patch.stopall())
+
+  def TestPipeline(self, expected_last, expected_len):
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.can = 1
+
+    pipeline = projectsearch.ProjectSearchPipeline(mr, self.services)
+    pipeline.SearchForIDs()
+    pipeline.GetProjectsAndPaginate('fake cnxn', '/hosting/search')
+    self.assertEqual(1, pipeline.pagination.start)
+    self.assertEqual(expected_last, pipeline.pagination.last)
+    self.assertEqual(expected_len, len(pipeline.visible_results))
+
+    return pipeline
+
+  def testZeroResults(self):
+    self.services.project.GetVisibleLiveProjects.return_value = []
+
+    pipeline = self.TestPipeline(0, 0)
+
+    self.services.project.GetVisibleLiveProjects.assert_called_once()
+    self.assertListEqual([], pipeline.visible_results)
+
+  def testNonzeroResults(self):
+    self.services.project.GetVisibleLiveProjects.return_value = [1, 2, 3]
+
+    pipeline = self.TestPipeline(3, 3)
+
+    self.services.project.GetVisibleLiveProjects.assert_called_once()
+    self.assertListEqual(
+        [1, 2, 3], [p.project_id for p in pipeline.visible_results])
+
+  def testTwoPageResults(self):
+    """Test more than one pagination page of results."""
+    self.services.project.GetVisibleLiveProjects.return_value = list(
+        range(1, 106))
+
+    pipeline = self.TestPipeline(100, 100)
+
+    self.services.project.GetVisibleLiveProjects.assert_called_once()
+    self.assertEqual(
+        '/hosting/search?num=100&start=100', pipeline.pagination.next_url)
diff --git a/sitewide/test/sitewide_helpers_test.py b/sitewide/test/sitewide_helpers_test.py
new file mode 100644
index 0000000..d292b6f
--- /dev/null
+++ b/sitewide/test/sitewide_helpers_test.py
@@ -0,0 +1,170 @@
+# 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
+
+"""Unit tests for the sitewide_helpers module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from proto import project_pb2
+from services import service_manager
+from sitewide import sitewide_helpers
+from testing import fake
+
+
+REGULAR_USER_ID = 111
+ADMIN_USER_ID = 222
+OTHER_USER_ID = 333
+
+# Test project IDs
+REGULAR_OWNER_LIVE = 1001
+REGULAR_OWNER_ARCHIVED = 1002
+REGULAR_OWNER_DELETABLE = 1003
+REGULAR_COMMITTER_LIVE = 2001
+REGULAR_COMMITTER_ARCHIVED = 2002
+REGULAR_COMMITTER_DELETABLE = 2003
+OTHER_OWNER_LIVE = 3001
+OTHER_OWNER_ARCHIVED = 3002
+OTHER_OWNER_DELETABLE = 3003
+OTHER_COMMITTER_LIVE = 4001
+MEMBERS_ONLY = 5001
+
+
+class HelperFunctionsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        project_star=fake.ProjectStarService())
+    self.cnxn = 'fake cnxn'
+
+    for user_id in (ADMIN_USER_ID, REGULAR_USER_ID, OTHER_USER_ID):
+      self.services.user.TestAddUser('ignored_%s@gmail.com' % user_id, user_id)
+
+    self.regular_owner_live = self.services.project.TestAddProject(
+        'regular-owner-live', state=project_pb2.ProjectState.LIVE,
+        owner_ids=[REGULAR_USER_ID], project_id=REGULAR_OWNER_LIVE)
+    self.regular_owner_archived = self.services.project.TestAddProject(
+        'regular-owner-archived', state=project_pb2.ProjectState.ARCHIVED,
+        owner_ids=[REGULAR_USER_ID], project_id=REGULAR_OWNER_ARCHIVED)
+    self.regular_owner_deletable = self.services.project.TestAddProject(
+        'regular-owner-deletable', state=project_pb2.ProjectState.DELETABLE,
+        owner_ids=[REGULAR_USER_ID], project_id=REGULAR_OWNER_DELETABLE)
+    self.regular_committer_live = self.services.project.TestAddProject(
+        'regular-committer-live', state=project_pb2.ProjectState.LIVE,
+        committer_ids=[REGULAR_USER_ID], project_id=REGULAR_COMMITTER_LIVE)
+    self.regular_committer_archived = self.services.project.TestAddProject(
+        'regular-committer-archived', state=project_pb2.ProjectState.ARCHIVED,
+        committer_ids=[REGULAR_USER_ID], project_id=REGULAR_COMMITTER_ARCHIVED)
+    self.regular_committer_deletable = self.services.project.TestAddProject(
+        'regular-committer-deletable', state=project_pb2.ProjectState.DELETABLE,
+        committer_ids=[REGULAR_USER_ID], project_id=REGULAR_COMMITTER_DELETABLE)
+    self.other_owner_live = self.services.project.TestAddProject(
+        'other-owner-live', state=project_pb2.ProjectState.LIVE,
+        owner_ids=[OTHER_USER_ID], project_id=OTHER_OWNER_LIVE)
+    self.other_owner_archived = self.services.project.TestAddProject(
+        'other-owner-archived', state=project_pb2.ProjectState.ARCHIVED,
+        owner_ids=[OTHER_USER_ID], project_id=OTHER_OWNER_ARCHIVED)
+    self.other_owner_deletable = self.services.project.TestAddProject(
+        'other-owner-deletable', state=project_pb2.ProjectState.DELETABLE,
+        owner_ids=[OTHER_USER_ID], project_id=OTHER_OWNER_DELETABLE)
+    self.other_committer_live = self.services.project.TestAddProject(
+        'other-committer-live', state=project_pb2.ProjectState.LIVE,
+        committer_ids=[OTHER_USER_ID], project_id=OTHER_COMMITTER_LIVE)
+
+    self.regular_user = self.services.user.GetUser(self.cnxn, REGULAR_USER_ID)
+
+    self.admin_user = self.services.user.TestAddUser(
+        'administrator@chromium.org', ADMIN_USER_ID)
+    self.admin_user.is_site_admin = True
+
+    self.other_user = self.services.user.GetUser(self.cnxn, OTHER_USER_ID)
+
+    self.members_only_project = self.services.project.TestAddProject(
+        'members-only', owner_ids=[REGULAR_USER_ID], project_id=MEMBERS_ONLY)
+    self.members_only_project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+
+  def assertProjectsAnyOrder(self, actual_projects, *expected_projects):
+    # Check names rather than Project objects so that output is easier to read.
+    actual_names = [p.project_name for p in actual_projects]
+    expected_names = [p.project_name for p in expected_projects]
+    self.assertItemsEqual(expected_names, actual_names)
+
+  def testFilterViewableProjects_CantViewArchived(self):
+    projects = list(sitewide_helpers.FilterViewableProjects(
+        list(self.services.project.test_projects.values()),
+        self.regular_user, {REGULAR_USER_ID}))
+    self.assertProjectsAnyOrder(
+        projects, self.regular_owner_live, self.regular_committer_live,
+        self.other_owner_live, self.other_committer_live,
+        self.members_only_project)
+
+  def testFilterViewableProjects_NonMemberCantViewMembersOnly(self):
+    projects = list(sitewide_helpers.FilterViewableProjects(
+        list(self.services.project.test_projects.values()),
+        self.other_user, {OTHER_USER_ID}))
+    self.assertProjectsAnyOrder(
+        projects, self.regular_owner_live, self.regular_committer_live,
+        self.other_owner_live, self.other_committer_live)
+
+  def testFilterViewableProjects_AdminCanViewAny(self):
+    projects = list(sitewide_helpers.FilterViewableProjects(
+        list(self.services.project.test_projects.values()),
+        self.admin_user, {ADMIN_USER_ID}))
+    self.assertProjectsAnyOrder(
+        projects, self.regular_owner_live, self.regular_committer_live,
+        self.other_owner_live, self.other_committer_live,
+        self.members_only_project)
+
+  def testGetStarredProjects_OnlyViewableLiveStarred(self):
+    viewed_user_id = 123
+    for p in self.services.project.test_projects.values():
+      # We go straight to the services layer because this is a test set up
+      # rather than an actual user request.
+      self.services.project_star.SetStar(
+          self.cnxn, p.project_id, viewed_user_id, True)
+
+    self.assertProjectsAnyOrder(
+        sitewide_helpers.GetViewableStarredProjects(
+            self.cnxn, self.services, viewed_user_id,
+            {REGULAR_USER_ID}, self.regular_user),
+        self.regular_owner_live, self.regular_committer_live,
+        self.other_owner_live, self.other_committer_live,
+        self.members_only_project)
+
+  def testGetStarredProjects_MembersOnly(self):
+    # Both users were able to star the project in the past.  The stars do not
+    # go away even if access to the project changes.
+    self.services.project_star.SetStar(
+        self.cnxn, self.members_only_project.project_id, REGULAR_USER_ID, True)
+    self.services.project_star.SetStar(
+        self.cnxn, self.members_only_project.project_id, OTHER_USER_ID, True)
+
+    # But now, only one of them is currently a member, so only regular_user
+    # can see the starred project in the lists.
+    self.assertProjectsAnyOrder(
+        sitewide_helpers.GetViewableStarredProjects(
+            self.cnxn, self.services, REGULAR_USER_ID, {REGULAR_USER_ID},
+            self.regular_user),
+        self.members_only_project)
+    self.assertProjectsAnyOrder(
+        sitewide_helpers.GetViewableStarredProjects(
+            self.cnxn, self.services, OTHER_USER_ID, {REGULAR_USER_ID},
+            self.regular_user),
+        self.members_only_project)
+
+    # The other user cannot see the project, so they do not see it in either
+    # list of starred projects.
+    self.assertProjectsAnyOrder(
+        sitewide_helpers.GetViewableStarredProjects(
+            self.cnxn, self.services, REGULAR_USER_ID, {OTHER_USER_ID},
+            self.other_user))  # No expected projects listed.
+    self.assertProjectsAnyOrder(
+        sitewide_helpers.GetViewableStarredProjects(
+            self.cnxn, self.services, OTHER_USER_ID, {OTHER_USER_ID},
+            self.other_user))  # No expected projects listed.
diff --git a/sitewide/test/sitewide_views_test.py b/sitewide/test/sitewide_views_test.py
new file mode 100644
index 0000000..ed2515f
--- /dev/null
+++ b/sitewide/test/sitewide_views_test.py
@@ -0,0 +1,26 @@
+# 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
+
+"""Unit tests for sitewide_views module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from proto import usergroup_pb2
+from sitewide import sitewide_views
+
+
+class GroupViewTest(unittest.TestCase):
+
+  def testConstructor(self):
+    group_settings = usergroup_pb2.MakeSettings('anyone')
+    view = sitewide_views.GroupView('groupname', 123, group_settings, 999)
+
+    self.assertEqual('groupname', view.name)
+    self.assertEqual(123, view.num_members)
+    self.assertEqual('ANYONE', view.who_can_view_members)
+    self.assertEqual('/g/999/', view.detail_url)
diff --git a/sitewide/test/userprofile_test.py b/sitewide/test/userprofile_test.py
new file mode 100644
index 0000000..b830fb7
--- /dev/null
+++ b/sitewide/test/userprofile_test.py
@@ -0,0 +1,252 @@
+# 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
+
+"""Tests for the user profile page."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+import logging
+import webapp2
+import ezt
+
+from framework import framework_helpers
+from framework import framework_views
+from framework import permissions
+from proto import project_pb2
+from proto import user_pb2
+from services import service_manager
+from sitewide import userprofile
+from testing import fake
+from testing import testing_helpers
+
+from google.appengine.ext import testbed
+
+REGULAR_USER_ID = 111
+ADMIN_USER_ID = 222
+OTHER_USER_ID = 333
+STATES = {
+    'live': project_pb2.ProjectState.LIVE,
+    'archived': project_pb2.ProjectState.ARCHIVED,
+}
+
+
+def MakeReqInfo(
+    user_pb, user_id, viewed_user_pb, viewed_user_id, viewed_user_name,
+    perms=permissions.USER_PERMISSIONSET):
+  mr = fake.MonorailRequest(None, perms=perms)
+  mr.auth.user_pb = user_pb
+  mr.auth.user_id = user_id
+  mr.auth.effective_ids = {user_id}
+  mr.viewed_user_auth.email = viewed_user_name
+  mr.viewed_user_auth.user_pb = viewed_user_pb
+  mr.viewed_user_auth.user_id = viewed_user_id
+  mr.viewed_user_auth.effective_ids = {viewed_user_id}
+  mr.viewed_user_auth.user_view = framework_views.UserView(viewed_user_pb)
+  mr.viewed_user_name = viewed_user_name
+  mr.request = webapp2.Request.blank("/")
+  return mr
+
+
+class UserProfileTest(unittest.TestCase):
+
+  def setUp(self):
+    self.patcher_1 = mock.patch(
+      'framework.framework_helpers.UserSettings.GatherUnifiedSettingsPageData')
+    self.mock_guspd = self.patcher_1.start()
+    self.mock_guspd.return_value = {'unified': None}
+
+    services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project_star=fake.ProjectStarService(),
+        user_star=fake.UserStarService())
+    self.servlet = userprofile.UserProfile('req', 'res', services=services)
+
+    for user_id in (
+        REGULAR_USER_ID, ADMIN_USER_ID, OTHER_USER_ID):
+      services.user.TestAddUser('%s@gmail.com' % user_id, user_id)
+
+    for user in ['regular', 'other']:
+      for relation in ['owner', 'member']:
+        for state_name, state in STATES.items():
+          services.project.TestAddProject(
+              '%s-%s-%s' % (user, relation, state_name), state=state)
+
+    # Add projects
+    for state_name, state in STATES.items():
+      services.project.TestAddProject(
+          'regular-owner-%s' % state_name, state=state,
+          owner_ids=[REGULAR_USER_ID])
+      services.project.TestAddProject(
+          'regular-member-%s' % state_name, state=state,
+          committer_ids=[REGULAR_USER_ID])
+      services.project.TestAddProject(
+          'other-owner-%s' % state_name, state=state,
+          owner_ids=[OTHER_USER_ID])
+      services.project.TestAddProject(
+          'other-member-%s' % state_name, state=state,
+          committer_ids=[OTHER_USER_ID])
+
+    self.regular_user = services.user.GetUser('fake cnxn', REGULAR_USER_ID)
+    self.admin_user = services.user.GetUser('fake cnxn', ADMIN_USER_ID)
+    self.admin_user.is_site_admin = True
+    self.other_user = services.user.GetUser('fake cnxn', OTHER_USER_ID)
+
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    mock.patch.stopall()
+
+  def assertProjectsAnyOrder(self, value_to_test, *expected_project_names):
+    actual_project_names = [project_view.project_name
+                            for project_view in value_to_test]
+    self.assertItemsEqual(expected_project_names, actual_project_names)
+
+  def testGatherPageData_RegularUserViewingOtherUserProjects(self):
+    """A user can see the other users' live projects, but not archived ones."""
+    mr = MakeReqInfo(
+        self.regular_user, REGULAR_USER_ID, self.other_user,
+        OTHER_USER_ID, 'other@xyz.com')
+
+    page_data = self.servlet.GatherPageData(mr)
+
+    self.assertProjectsAnyOrder(page_data['owner_of_projects'],
+                                'other-owner-live')
+    self.assertProjectsAnyOrder(page_data['committer_of_projects'],
+                                'other-member-live')
+    self.assertFalse(page_data['owner_of_archived_projects'])
+    self.assertEqual('ot...@xyz.com', page_data['viewed_user_display_name'])
+    self.assertEqual(ezt.boolean(False), page_data['can_delete_user'])
+    self.mock_guspd.assert_called_once_with(
+        111, mr.viewed_user_auth.user_view, mr.viewed_user_auth.user_pb,
+        None)
+
+  def testGatherPageData_RegularUserViewingOwnProjects(self):
+    """A user can see all their own projects: live or archived."""
+    mr = MakeReqInfo(
+        self.regular_user, REGULAR_USER_ID, self.regular_user,
+        REGULAR_USER_ID, 'self@xyz.com')
+
+    page_data = self.servlet.GatherPageData(mr)
+
+    self.assertEqual('self@xyz.com', page_data['viewed_user_display_name'])
+    self.assertEqual(ezt.boolean(False), page_data['can_delete_user'])
+    self.assertProjectsAnyOrder(page_data['owner_of_projects'],
+                                'regular-owner-live')
+    self.assertProjectsAnyOrder(page_data['committer_of_projects'],
+                                'regular-member-live')
+    self.assertProjectsAnyOrder(
+        page_data['owner_of_archived_projects'],
+        'regular-owner-archived')
+    self.mock_guspd.assert_called_once_with(
+        111, mr.viewed_user_auth.user_view, mr.viewed_user_auth.user_pb,
+        None)
+
+  def testGatherPageData_RegularUserViewingStarredUsers(self):
+    """A user can see display names of other users that they starred."""
+    mr = MakeReqInfo(
+        self.regular_user, REGULAR_USER_ID, self.regular_user,
+        REGULAR_USER_ID, 'self@xyz.com')
+    self.servlet.services.user_star.SetStar(
+        'cnxn', OTHER_USER_ID, REGULAR_USER_ID, True)
+
+    page_data = self.servlet.GatherPageData(mr)
+
+    starred_users = page_data['starred_users']
+    self.assertEqual(1, len(starred_users))
+    self.assertEqual('333@gmail.com', starred_users[0].email)
+    self.assertEqual('["3...@gmail.com"]', page_data['starred_users_json'])
+    self.mock_guspd.assert_called_once_with(
+        111, mr.viewed_user_auth.user_view, mr.viewed_user_auth.user_pb,
+        None)
+
+  def testGatherPageData_AdminViewingOtherUserAddress(self):
+    """Site admins always see full email addresses of other users."""
+    mr = MakeReqInfo(
+        self.admin_user, ADMIN_USER_ID, self.other_user,
+        OTHER_USER_ID, 'other@xyz.com',
+        perms=permissions.ADMIN_PERMISSIONSET)
+
+    page_data = self.servlet.GatherPageData(mr)
+
+    self.assertEqual('other@xyz.com', page_data['viewed_user_display_name'])
+    self.assertEqual(ezt.boolean(True), page_data['can_delete_user'])
+    self.mock_guspd.assert_called_once_with(
+        222, mr.viewed_user_auth.user_view, mr.viewed_user_auth.user_pb,
+        mock.ANY)
+
+  def testGatherPageData_RegularUserViewingOtherUserAddressUnobscured(self):
+    """Email should be revealed to others depending on obscure_email."""
+    mr = MakeReqInfo(
+        self.regular_user, REGULAR_USER_ID, self.other_user,
+        OTHER_USER_ID, 'other@xyz.com')
+    mr.viewed_user_auth.user_view.obscure_email = False
+
+    page_data = self.servlet.GatherPageData(mr)
+
+    self.assertEqual('other@xyz.com', page_data['viewed_user_display_name'])
+    self.mock_guspd.assert_called_once_with(
+        111, mr.viewed_user_auth.user_view, mr.viewed_user_auth.user_pb,
+        None)
+
+  def testGatherPageData_RegularUserViewingOtherUserAddressObscured(self):
+    """Email should be revealed to others depending on obscure_email."""
+    mr = MakeReqInfo(
+        self.regular_user, REGULAR_USER_ID, self.other_user,
+        OTHER_USER_ID, 'other@xyz.com')
+    mr.viewed_user_auth.user_view.obscure_email = True
+
+    page_data = self.servlet.GatherPageData(mr)
+
+    self.assertEqual('ot...@xyz.com', page_data['viewed_user_display_name'])
+    self.assertEqual(ezt.boolean(False), page_data['can_delete_user'])
+    self.mock_guspd.assert_called_once_with(
+        111, mr.viewed_user_auth.user_view, mr.viewed_user_auth.user_pb,
+        None)
+
+  def testGatherPageData_NoLinkedAccounts(self):
+    """An account with no linked accounts should not show anything linked."""
+    mr = MakeReqInfo(
+        self.regular_user, REGULAR_USER_ID, self.other_user,
+        OTHER_USER_ID, 'other@xyz.com')
+
+    page_data = self.servlet.GatherPageData(mr)
+
+    self.assertIsNone(page_data['linked_parent'])
+    self.assertEqual([], page_data['linked_children'])
+
+  def testGatherPageData_ParentAccounts(self):
+    """An account with a parent linked account should show it."""
+    self.other_user.linked_parent_id = REGULAR_USER_ID
+    mr = MakeReqInfo(
+        self.regular_user, REGULAR_USER_ID, self.other_user,
+        OTHER_USER_ID, 'other@xyz.com')
+
+    page_data = self.servlet.GatherPageData(mr)
+
+    self.assertEqual('111@gmail.com', page_data['linked_parent'].email)
+    self.assertEqual([], page_data['linked_children'])
+
+  def testGatherPageData_ChildAccounts(self):
+    """An account with a child linked account should show them."""
+    self.other_user.linked_child_ids = [REGULAR_USER_ID, ADMIN_USER_ID]
+    mr = MakeReqInfo(
+        self.regular_user, REGULAR_USER_ID, self.other_user,
+        OTHER_USER_ID, 'other@xyz.com')
+
+    page_data = self.servlet.GatherPageData(mr)
+
+    self.assertEqual(None, page_data['linked_parent'])
+    self.assertEqual(
+        ['111@gmail.com', '222@gmail.com'],
+        [uv.email for uv in page_data['linked_children']])
diff --git a/sitewide/test/usersettings_test.py b/sitewide/test/usersettings_test.py
new file mode 100644
index 0000000..54c14ae
--- /dev/null
+++ b/sitewide/test/usersettings_test.py
@@ -0,0 +1,66 @@
+# 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
+
+"""Tests for the user settings page."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mox
+
+from framework import framework_helpers
+from framework import permissions
+from framework import template_helpers
+from proto import user_pb2
+from services import service_manager
+from sitewide import usersettings
+from testing import fake
+from testing import testing_helpers
+
+
+class UserSettingsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.services = service_manager.Services(user=fake.UserService())
+    self.servlet = usersettings.UserSettings(
+        'req', 'res', services=self.services)
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+
+  def testAssertBasePermission(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.auth.user_id = 111
+
+    # The following should return without exception.
+    self.servlet.AssertBasePermission(mr)
+
+    # No logged in user means anonymous access, should raise error.
+    mr.auth.user_id = 0
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+
+  def testGatherPageData(self):
+    self.mox.StubOutWithMock(
+        framework_helpers.UserSettings, 'GatherUnifiedSettingsPageData')
+    framework_helpers.UserSettings.GatherUnifiedSettingsPageData(
+        0, None, mox.IsA(user_pb2.User), mox.IsA(user_pb2.UserPrefs)
+        ).AndReturn({'unified': None})
+    self.mox.ReplayAll()
+
+    mr = testing_helpers.MakeMonorailRequest()
+    page_data = self.servlet.GatherPageData(mr)
+
+    self.assertItemsEqual(
+        ['logged_in_user_pb', 'unified', 'user_tab_mode',
+         'viewed_user', 'offer_saved_queries_subtab', 'viewing_self'],
+        list(page_data.keys()))
+    self.assertEqual(template_helpers.PBProxy(mr.auth.user_pb),
+                     page_data['logged_in_user_pb'])
+
+    self.mox.VerifyAll()
diff --git a/sitewide/test/userupdates_test.py b/sitewide/test/userupdates_test.py
new file mode 100644
index 0000000..efae9bc
--- /dev/null
+++ b/sitewide/test/userupdates_test.py
@@ -0,0 +1,115 @@
+# 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
+
+"""Unittests for monorail.sitewide.userupdates."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mox
+
+from features import activities
+from services import service_manager
+from sitewide import sitewide_helpers
+from sitewide import userupdates
+from testing import fake
+from testing import testing_helpers
+
+
+class ProjectUpdatesTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        user_star=fake.UserStarService())
+
+    self.user_id = 2
+    self.project_id = 987
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=self.project_id)
+
+    self.mr = testing_helpers.MakeMonorailRequest(
+        services=self.services, project=self.project)
+    self.mr.cnxn = 'fake cnxn'
+    self.mr.viewed_user_auth.user_id = 100
+
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testUserUpdatesProjects(self):
+    uup = userupdates.UserUpdatesProjects(None, None, self.services)
+
+    self.mox.StubOutWithMock(sitewide_helpers, 'GetViewableStarredProjects')
+    sitewide_helpers.GetViewableStarredProjects(
+        self.mr.cnxn, self.services, self.mr.viewed_user_auth.user_id,
+        self.mr.auth.effective_ids, self.mr.auth.user_pb).AndReturn(
+            [self.project])
+
+    self.mox.StubOutWithMock(activities, 'GatherUpdatesData')
+    activities.GatherUpdatesData(
+        self.services, self.mr, user_ids=None,
+        project_ids=[self.project_id],
+        ending=uup._ENDING,
+        updates_page_url=uup._UPDATES_PAGE_URL,
+        highlight=uup._HIGHLIGHT).AndReturn({})
+
+    self.mox.ReplayAll()
+
+    page_data = uup.GatherPageData(self.mr)
+    self.mox.VerifyAll()
+    self.assertEqual(3, len(page_data))
+    self.assertEqual('st5', page_data['user_tab_mode'])
+    self.assertEqual('yes', page_data['viewing_user_page'])
+    self.assertEqual(uup._TAB_MODE, page_data['user_updates_tab_mode'])
+
+  def testUserUpdatesDevelopers(self):
+    uud = userupdates.UserUpdatesDevelopers(None, None, self.services)
+
+    self.mox.StubOutWithMock(self.services.user_star, 'LookupStarredItemIDs')
+    self.services.user_star.LookupStarredItemIDs(
+        self.mr.cnxn, self.mr.viewed_user_auth.user_id).AndReturn(
+            [self.user_id])
+
+    self.mox.StubOutWithMock(activities, 'GatherUpdatesData')
+    activities.GatherUpdatesData(
+        self.services, self.mr, user_ids=[self.user_id],
+        project_ids=None, ending=uud._ENDING,
+        updates_page_url=uud._UPDATES_PAGE_URL,
+        highlight=uud._HIGHLIGHT).AndReturn({})
+
+    self.mox.ReplayAll()
+
+    page_data = uud.GatherPageData(self.mr)
+    self.mox.VerifyAll()
+    self.assertEqual(3, len(page_data))
+    self.assertEqual('st5', page_data['user_tab_mode'])
+    self.assertEqual('yes', page_data['viewing_user_page'])
+    self.assertEqual(uud._TAB_MODE, page_data['user_updates_tab_mode'])
+
+  def testUserUpdatesIndividual(self):
+    uui = userupdates.UserUpdatesIndividual(None, None, self.services)
+
+    self.mox.StubOutWithMock(activities, 'GatherUpdatesData')
+    activities.GatherUpdatesData(
+        self.services, self.mr,
+        user_ids=[self.mr.viewed_user_auth.user_id],
+        project_ids=None, ending=uui._ENDING,
+        updates_page_url=uui._UPDATES_PAGE_URL,
+        highlight=uui._HIGHLIGHT).AndReturn({})
+
+    self.mox.ReplayAll()
+
+    page_data = uui.GatherPageData(self.mr)
+    self.mox.VerifyAll()
+    self.assertEqual(3, len(page_data))
+    self.assertEqual('st5', page_data['user_tab_mode'])
+    self.assertEqual('yes', page_data['viewing_user_page'])
+    self.assertEqual(uui._TAB_MODE, page_data['user_updates_tab_mode'])
+
diff --git a/sitewide/userclearbouncing.py b/sitewide/userclearbouncing.py
new file mode 100644
index 0000000..3decdf4
--- /dev/null
+++ b/sitewide/userclearbouncing.py
@@ -0,0 +1,62 @@
+# 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
+
+"""Class to show a servlet to clear a user's bouncing email timestamp."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+from framework import framework_helpers
+from framework import permissions
+from framework import servlet
+from framework import timestr
+
+
+class UserClearBouncing(servlet.Servlet):
+  """Shows a page that can clear a user's bouncing email timestamp."""
+
+  _PAGE_TEMPLATE = 'sitewide/user-clear-bouncing-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    """Check whether the user has any permission to visit this page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+    """
+    super(UserClearBouncing, self).AssertBasePermission(mr)
+    if mr.auth.user_id == mr.viewed_user_auth.user_id:
+      return
+    if mr.perms.HasPerm(permissions.EDIT_OTHER_USERS, None, None):
+      return
+    raise permissions.PermissionException('You cannot edit this user.')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    viewed_user = mr.viewed_user_auth.user_pb
+    if viewed_user.email_bounce_timestamp:
+      last_bounce_str = timestr.FormatRelativeDate(
+          viewed_user.email_bounce_timestamp, days_only=True)
+      last_bounce_str = last_bounce_str or 'Less than 2 days ago'
+    else:
+      last_bounce_str = None
+
+    page_data = {
+        'user_tab_mode': 'st2',
+        'last_bounce_str': last_bounce_str,
+        }
+    return page_data
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    viewed_user = mr.viewed_user_auth.user_pb
+    viewed_user.email_bounce_timestamp = None
+    self.services.user.UpdateUser(
+        mr.cnxn, viewed_user.user_id, viewed_user)
+    return framework_helpers.FormatAbsoluteURL(
+        mr, mr.viewed_user_auth.user_view.profile_url, include_project=False,
+        saved=1, ts=int(time.time()))
diff --git a/sitewide/userprofile.py b/sitewide/userprofile.py
new file mode 100644
index 0000000..bf68c5f
--- /dev/null
+++ b/sitewide/userprofile.py
@@ -0,0 +1,271 @@
+# 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
+
+"""Classes for the user profile page ("my page")."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+import json
+
+import ezt
+
+import settings
+from businesslogic import work_env
+from framework import framework_helpers
+from framework import framework_views
+from framework import permissions
+from framework import servlet
+from framework import timestr
+from framework import xsrf
+from project import project_views
+from sitewide import sitewide_helpers
+
+
+class UserProfile(servlet.Servlet):
+  """Shows a page of information about a user."""
+
+  _PAGE_TEMPLATE = 'sitewide/user-profile-page.ezt'
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    viewed_user = mr.viewed_user_auth.user_pb
+    if self.services.usergroup.GetGroupSettings(
+        mr.cnxn, mr.viewed_user_auth.user_id):
+      url = framework_helpers.FormatAbsoluteURL(
+          mr, '/g/%s/' % viewed_user.email, include_project=False)
+      self.redirect(url, abort=True)  # Show group page instead.
+
+    with work_env.WorkEnv(mr, self.services) as we:
+      project_lists = we.GetUserProjects(mr.viewed_user_auth.effective_ids)
+
+      (visible_ownership, visible_archived, visible_membership,
+       visible_contrib) = project_lists
+
+    with mr.profiler.Phase('Getting user groups'):
+      group_settings = self.services.usergroup.GetAllGroupSettings(
+          mr.cnxn, mr.viewed_user_auth.effective_ids)
+      member_ids, owner_ids = self.services.usergroup.LookupAllMembers(
+          mr.cnxn, list(group_settings.keys()))
+      friend_project_ids = [] # TODO(issue 4202): implement this.
+      visible_group_ids = []
+      for group_id in group_settings:
+        if permissions.CanViewGroupMembers(
+            mr.perms, mr.auth.effective_ids, group_settings[group_id],
+            member_ids[group_id], owner_ids[group_id], friend_project_ids):
+          visible_group_ids.append(group_id)
+
+      user_group_views = framework_views.MakeAllUserViews(
+          mr.cnxn, self.services.user, visible_group_ids)
+      user_group_views = sorted(
+          list(user_group_views.values()), key=lambda ugv: ugv.email)
+
+    with mr.profiler.Phase('Getting linked accounts'):
+      linked_parent = None
+      linked_children = []
+      linked_views = framework_views.MakeAllUserViews(
+          mr.cnxn, self.services.user,
+          [viewed_user.linked_parent_id],
+          viewed_user.linked_child_ids)
+      if viewed_user.linked_parent_id:
+        linked_parent = linked_views[viewed_user.linked_parent_id]
+      if viewed_user.linked_child_ids:
+        linked_children = [
+          linked_views[child_id] for child_id in viewed_user.linked_child_ids]
+      offer_unlink = (mr.auth.user_id == viewed_user.user_id or
+                      mr.auth.user_id in linked_views)
+
+    incoming_invite_users = []
+    outgoing_invite_users = []
+    possible_parent_accounts = []
+    can_edit_invites = mr.auth.user_id == mr.viewed_user_auth.user_id
+    display_link_invites = can_edit_invites or mr.auth.user_pb.is_site_admin
+    # TODO(jrobbins): allow site admin to edit invites for other users.
+    if display_link_invites:
+      with work_env.WorkEnv(mr, self.services, phase='Getting link invites'):
+        incoming_invite_ids, outgoing_invite_ids = we.GetPendingLinkedInvites(
+            user_id=viewed_user.user_id)
+        invite_views = framework_views.MakeAllUserViews(
+          mr.cnxn, self.services.user, incoming_invite_ids, outgoing_invite_ids)
+        incoming_invite_users = [
+            invite_views[uid] for uid in incoming_invite_ids]
+        outgoing_invite_users = [
+            invite_views[uid] for uid in outgoing_invite_ids]
+        possible_parent_accounts = _ComputePossibleParentAccounts(
+            we, mr.viewed_user_auth.user_view, linked_parent, linked_children)
+
+    viewed_user_display_name = framework_views.GetViewedUserDisplayName(mr)
+
+    with work_env.WorkEnv(mr, self.services) as we:
+      starred_projects = we.ListStarredProjects(
+          viewed_user_id=mr.viewed_user_auth.user_id)
+      logged_in_starred = we.ListStarredProjects()
+      logged_in_starred_pids = {p.project_id for p in logged_in_starred}
+
+    starred_user_ids = self.services.user_star.LookupStarredItemIDs(
+        mr.cnxn, mr.viewed_user_auth.user_id)
+    starred_user_dict = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user, starred_user_ids)
+    starred_users = list(starred_user_dict.values())
+    starred_users_json = json.dumps(
+      [uv.display_name for uv in starred_users])
+
+    is_user_starred = self._IsUserStarred(
+        mr.cnxn, mr.auth.user_id, mr.viewed_user_auth.user_id)
+
+    if viewed_user.last_visit_timestamp:
+      last_visit_str = timestr.FormatRelativeDate(
+          viewed_user.last_visit_timestamp, days_only=True)
+      last_visit_str = last_visit_str or 'Less than 2 days ago'
+    else:
+      last_visit_str = 'Never'
+
+    if viewed_user.email_bounce_timestamp:
+      last_bounce_str = timestr.FormatRelativeDate(
+          viewed_user.email_bounce_timestamp, days_only=True)
+      last_bounce_str = last_bounce_str or 'Less than 2 days ago'
+    else:
+      last_bounce_str = None
+
+    can_ban = permissions.CanBan(mr, self.services)
+    viewed_user_is_spammer = viewed_user.banned.lower() == 'spam'
+    viewed_user_may_be_spammer = not viewed_user_is_spammer
+    all_projects = self.services.project.GetAllProjects(mr.cnxn)
+    for project_id in all_projects:
+      project = all_projects[project_id]
+      viewed_user_perms = permissions.GetPermissions(viewed_user,
+          mr.viewed_user_auth.effective_ids, project)
+      if (viewed_user_perms != permissions.EMPTY_PERMISSIONSET and
+          viewed_user_perms != permissions.USER_PERMISSIONSET):
+        viewed_user_may_be_spammer = False
+
+    ban_token = None
+    ban_spammer_token = None
+    if mr.auth.user_id and can_ban:
+      form_token_path = mr.request.path + 'ban.do'
+      ban_token = xsrf.GenerateToken(mr.auth.user_id, form_token_path)
+      form_token_path = mr.request.path + 'banSpammer.do'
+      ban_spammer_token = xsrf.GenerateToken(mr.auth.user_id, form_token_path)
+
+    can_delete_user = permissions.CanExpungeUsers(mr)
+
+    page_data = {
+        'user_tab_mode': 'st2',
+        'viewed_user_display_name': viewed_user_display_name,
+        'viewed_user_may_be_spammer': ezt.boolean(viewed_user_may_be_spammer),
+        'viewed_user_is_spammer': ezt.boolean(viewed_user_is_spammer),
+        'viewed_user_is_banned': ezt.boolean(viewed_user.banned),
+        'owner_of_projects': [
+            project_views.ProjectView(
+                p, starred=p.project_id in logged_in_starred_pids)
+            for p in visible_ownership],
+        'committer_of_projects': [
+            project_views.ProjectView(
+                p, starred=p.project_id in logged_in_starred_pids)
+            for p in visible_membership],
+        'contributor_to_projects': [
+            project_views.ProjectView(
+                p, starred=p.project_id in logged_in_starred_pids)
+            for p in visible_contrib],
+        'owner_of_archived_projects': [
+            project_views.ProjectView(p) for p in visible_archived],
+        'starred_projects': [
+            project_views.ProjectView(
+                p, starred=p.project_id in logged_in_starred_pids)
+            for p in starred_projects],
+        'starred_users': starred_users,
+        'starred_users_json': starred_users_json,
+        'is_user_starred': ezt.boolean(is_user_starred),
+        'viewing_user_page': ezt.boolean(True),
+        'last_visit_str': last_visit_str,
+        'last_bounce_str': last_bounce_str,
+        'vacation_message': viewed_user.vacation_message,
+        'can_ban': ezt.boolean(can_ban),
+        'ban_token': ban_token,
+        'ban_spammer_token': ban_spammer_token,
+        'user_groups': user_group_views,
+        'linked_parent': linked_parent,
+        'linked_children': linked_children,
+        'incoming_invite_users': incoming_invite_users,
+        'outgoing_invite_users': outgoing_invite_users,
+        'possible_parent_accounts': possible_parent_accounts,
+        'can_edit_invites': ezt.boolean(can_edit_invites),
+        'offer_unlink': ezt.boolean(offer_unlink),
+        'can_delete_user': ezt.boolean(can_delete_user),
+        }
+
+    viewed_user_prefs = None
+    if mr.perms.HasPerm(permissions.EDIT_OTHER_USERS, None, None):
+      with work_env.WorkEnv(mr, self.services) as we:
+        viewed_user_prefs = we.GetUserPrefs(mr.viewed_user_auth.user_id)
+
+    user_settings = (
+        framework_helpers.UserSettings.GatherUnifiedSettingsPageData(
+        mr.auth.user_id, mr.viewed_user_auth.user_view, viewed_user,
+        viewed_user_prefs))
+    page_data.update(user_settings)
+
+    return page_data
+
+  def _IsUserStarred(self, cnxn, logged_in_user_id, viewed_user_id):
+    """Return whether the logged in user starred the viewed user."""
+    if logged_in_user_id:
+      return self.services.user_star.IsItemStarredBy(
+          cnxn, viewed_user_id, logged_in_user_id)
+    return False
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    has_admin_perm = mr.perms.HasPerm(permissions.EDIT_OTHER_USERS, None, None)
+    with work_env.WorkEnv(mr, self.services) as we:
+      framework_helpers.UserSettings.ProcessSettingsForm(
+          we, post_data, mr.viewed_user_auth.user_pb, admin=has_admin_perm)
+
+    # TODO(jrobbins): Check all calls to FormatAbsoluteURL for include_project.
+    return framework_helpers.FormatAbsoluteURL(
+        mr, mr.viewed_user_auth.user_view.profile_url, include_project=False,
+        saved=1, ts=int(time.time()))
+
+
+def _ComputePossibleParentAccounts(
+    we, user_view, linked_parent, linked_children):
+  """Return a list of email addresses of possible parent accounts."""
+  if not user_view:
+    return []  # Anon user cannot link to any account.
+  if linked_parent or linked_children:
+    return []  # If account is already linked in any way, don't offer.
+  possible_domains = settings.linkable_domains.get(user_view.domain, [])
+  possible_emails = ['%s@%s' % (user_view.username, domain)
+                     for domain in possible_domains]
+  found_users, _ = we.ListReferencedUsers(possible_emails)
+  found_emails = [user.email for user in found_users]
+  return found_emails
+
+
+class UserProfilePolymer(UserProfile):
+  """New Polymer version of user profiles in Monorail."""
+
+  _PAGE_TEMPLATE = 'sitewide/user-profile-page-polymer.ezt'
+
+
+class BanUser(servlet.Servlet):
+  """Bans or un-bans a user."""
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    if not permissions.CanBan(mr, self.services):
+      raise permissions.PermissionException(
+          "You do not have permission to ban users.")
+
+    framework_helpers.UserSettings.ProcessBanForm(
+        mr.cnxn, self.services.user, post_data, mr.viewed_user_auth.user_id,
+        mr.viewed_user_auth.user_pb)
+
+    # TODO(jrobbins): Check all calls to FormatAbsoluteURL for include_project.
+    return framework_helpers.FormatAbsoluteURL(
+        mr, mr.viewed_user_auth.user_view.profile_url, include_project=False,
+        saved=1, ts=int(time.time()))
diff --git a/sitewide/usersettings.py b/sitewide/usersettings.py
new file mode 100644
index 0000000..bb65ddd
--- /dev/null
+++ b/sitewide/usersettings.py
@@ -0,0 +1,65 @@
+# 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
+
+"""Classes for the user settings (preferences) page."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+import urllib
+
+import ezt
+
+from businesslogic import work_env
+from framework import framework_helpers
+from framework import permissions
+from framework import servlet
+from framework import template_helpers
+from framework import urls
+
+
+class UserSettings(servlet.Servlet):
+  """Shows a page with a simple form to edit user preferences."""
+
+  _PAGE_TEMPLATE = 'sitewide/user-settings-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    """Assert that the user has the permissions needed to view this page."""
+    super(UserSettings, self).AssertBasePermission(mr)
+
+    if not mr.auth.user_id:
+      raise permissions.PermissionException(
+          'Anonymous users are not allowed to edit user settings')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    page_data = {
+        'user_tab_mode': 'st3',
+        'logged_in_user_pb': template_helpers.PBProxy(mr.auth.user_pb),
+        # When on /hosting/settings, the logged-in user is the viewed user.
+        'viewed_user': mr.auth.user_view,
+        'offer_saved_queries_subtab': ezt.boolean(True),
+        'viewing_self': ezt.boolean(True),
+        }
+    with work_env.WorkEnv(mr, self.services) as we:
+      settings_user_prefs = we.GetUserPrefs(mr.auth.user_id)
+    page_data.update(
+        framework_helpers.UserSettings.GatherUnifiedSettingsPageData(
+            mr.auth.user_id, mr.auth.user_view, mr.auth.user_pb,
+            settings_user_prefs))
+    return page_data
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the posted form."""
+    with work_env.WorkEnv(mr, self.services) as we:
+      framework_helpers.UserSettings.ProcessSettingsForm(
+          we, post_data, mr.auth.user_pb)
+
+    url = framework_helpers.FormatAbsoluteURL(
+        mr, urls.USER_SETTINGS, include_project=False,
+        saved=1, ts=int(time.time()))
+
+    return url
diff --git a/sitewide/userupdates.py b/sitewide/userupdates.py
new file mode 100644
index 0000000..ac44c0f
--- /dev/null
+++ b/sitewide/userupdates.py
@@ -0,0 +1,118 @@
+# 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
+
+"""Classes for user updates pages.
+
+  AbstractUserUpdatesPage: Base class for all user updates pages
+  UserUpdatesProjects: Handles displaying starred projects
+  UserUpdatesDevelopers: Handles displaying starred developers
+  UserUpdatesIndividual: Handles displaying activities by the viewed user
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+
+import logging
+
+import ezt
+
+from businesslogic import work_env
+from features import activities
+from framework import servlet
+from framework import urls
+from sitewide import sitewide_helpers
+
+
+class AbstractUserUpdatesPage(servlet.Servlet):
+  """Base class for user updates pages."""
+
+  _PAGE_TEMPLATE = 'sitewide/user-updates-page.ezt'
+
+  # Subclasses should override these constants.
+  _UPDATES_PAGE_URL = None
+  # What to highlight in the middle column on user updates pages - 'project',
+  # 'user', or None
+  _HIGHLIGHT = None
+  # What the ending phrase for activity titles should be - 'by_user',
+  # 'in_project', or None
+  _ENDING = None
+  _TAB_MODE = None
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    # TODO(jrobbins): re-implement
+    # if self.CheckRevelationCaptcha(mr, mr.errors):
+    #   mr.viewed_user_auth.user_view.RevealEmail()
+
+    page_data = {
+        'user_tab_mode': 'st5',
+        'viewing_user_page': ezt.boolean(True),
+        'user_updates_tab_mode': self._TAB_MODE,
+        }
+
+    user_ids = self._GetUserIDsForUpdates(mr)
+    project_ids = self._GetProjectIDsForUpdates(mr)
+    page_data.update(activities.GatherUpdatesData(
+        self.services, mr, user_ids=user_ids,
+        project_ids=project_ids, ending=self._ENDING,
+        updates_page_url=self._UPDATES_PAGE_URL, highlight=self._HIGHLIGHT))
+
+    return page_data
+
+  def _GetUserIDsForUpdates(self, _mr):
+    """Returns a list of user IDs to retrieve activities from."""
+    return None  # Means any.
+
+  def _GetProjectIDsForUpdates(self, _mr):
+    """Returns a list of project IDs to retrieve activities from."""
+    return None  # Means any.
+
+
+class UserUpdatesProjects(AbstractUserUpdatesPage):
+  """Shows a page of updates from projects starred by a user."""
+
+  _UPDATES_FEED_URL = urls.USER_UPDATES_PROJECTS
+  _UPDATES_PAGE_URL = urls.USER_UPDATES_PROJECTS
+  _HIGHLIGHT = 'project'
+  _ENDING = 'by_user'
+  _TAB_MODE = 'st2'
+
+  def _GetProjectIDsForUpdates(self, mr):
+    """Returns a list of project IDs whom to retrieve activities from."""
+    with work_env.WorkEnv(mr, self.services) as we:
+      starred_projects = we.ListStarredProjects(
+          viewed_user_id=mr.viewed_user_auth.user_id)
+    return [project.project_id for project in starred_projects]
+
+
+class UserUpdatesDevelopers(AbstractUserUpdatesPage):
+  """Shows a page of updates from developers starred by a user."""
+
+  _UPDATES_FEED_URL = urls.USER_UPDATES_DEVELOPERS
+  _UPDATES_PAGE_URL = urls.USER_UPDATES_DEVELOPERS
+  _HIGHLIGHT = 'user'
+  _ENDING = 'in_project'
+  _TAB_MODE = 'st3'
+
+  def _GetUserIDsForUpdates(self, mr):
+    """Returns a list of user IDs whom to retrieve activities from."""
+    user_ids = self.services.user_star.LookupStarredItemIDs(
+        mr.cnxn, mr.viewed_user_auth.user_id)
+    logging.debug('StarredUsers: %r', user_ids)
+    return user_ids
+
+
+class UserUpdatesIndividual(AbstractUserUpdatesPage):
+  """Shows a page of updates initiated by a user."""
+
+  _UPDATES_FEED_URL = urls.USER_UPDATES_MINE + '/user'
+  _UPDATES_PAGE_URL = urls.USER_UPDATES_MINE
+  _HIGHLIGHT = 'project'
+  _TAB_MODE = 'st1'
+
+  def _GetUserIDsForUpdates(self, mr):
+    """Returns a list of user IDs whom to retrieve activities from."""
+    return [mr.viewed_user_auth.user_id]
diff --git a/static/css/chopsui-normal.css b/static/css/chopsui-normal.css
new file mode 100644
index 0000000..981d12e
--- /dev/null
+++ b/static/css/chopsui-normal.css
@@ -0,0 +1,164 @@
+:root {
+  /* Subset of https://material.io/design/color/the-color-system.html */
+  --chops-red-50: #ffebee;
+  --chops-red-700: #d32f2f;
+  --chops-purple-50: #f3e5f5;
+  --chops-purple-700: #7b1fa2;
+  --chops-blue-50: #e3f2fd;
+  /*
+    Additional blue added on top of the 2014 Material Design palette because
+    blue 50 is too low contrast for backgrounds. Made from mixing blue 50
+    and blue 100.
+  */
+  --chops-blue-75: #d9edfc;
+  --chops-blue-100: #bbdefb;
+  --chops-blue-300: #64b5f6;
+  --chops-blue-700: #1976d2;
+  --chops-blue-900: #01579b;
+  --chops-green-50: #e8f5e9;
+  --chops-green-800: #2e7d32;
+  --chops-light-green-10: #f6fff5;
+  --chops-light-green-50: #f1f8e9;
+  --chops-yellow-50: #fffde7;
+  --chops-orange-50: #fff3e0;
+  --chops-orange-200: #ffcc80;
+  --chops-gray-50: #fafafa;
+  --chops-gray-200: #eee;
+  --chops-gray-300: #e0e0e0;
+  --chops-gray-400: #bdbdbd;
+  --chops-gray-500: #9e9e9e;
+  --chops-gray-600: #757575;
+  --chops-gray-700: #616161;
+  --chops-gray-800: #424242;
+  --chops-gray-850: #303030;
+  --chops-gray-900: #212121;
+  /* Making these variables makes it easier to add user-side scripts in a reasonable way. */
+  --chops-white: #ffffff;
+  --chops-black: #000000;
+
+  /* To make grays used for font styles and icons maintain consistent
+   * contrast ratios across colored backgrounds, we repesent them as pure black
+   * with opacity set. */
+  --chops-gray-700-alpha: hsla(0, 0%, 0%, 0.62);
+  --chops-gray-800-alpha: hsla(0, 0%, 0%, 0.74);
+  --chops-gray-900-alpha: hsla(0, 0%, 0%, 0.87);
+
+  --chops-blue-gray-25: #f1f3f4;
+  --chops-blue-gray-50: #eceff1;  /* Similar to grimoire. */
+
+  --chops-primary-header-bg: var(--chops-white);
+  --chops-secondary-header-bg: var(--chops-blue-gray-25);
+  --chops-sidebar-bg: var(--chops-blue-gray-25);
+  --chops-page-bg: var(--chops-white);
+  --chops-footer-bg: transparent;
+  --chops-primary-icon-color: var(--chops-gray-700-alpha);
+
+  --chops-normal-border: 1px solid hsl(0, 0%, 85%);
+  /* Border color for situations when contrast is important. */
+  --chops-accessible-border: 1px solid var(--chops-gray-400);
+  --chops-radius: 6px;
+  --chops-shadow: none;
+
+  --chops-primary-font-color: var(--chops-gray-900-alpha);
+  --chops-font-family: 'Roboto', 'Noto', sans-serif;
+  --chops-link-color: var(--chops-primary-accent-color);
+  --chops-link-font-weight: 500;
+  --chops-light-accent-color: var(--chops-blue-300);
+  --chops-primary-accent-color: var(--chops-blue-700);
+  --chops-primary-accent-bg: var(--chops-blue-50);
+  --chops-primary-button-bg: var(--chops-primary-accent-color);
+  --chops-primary-button-color: var(--chops-white);
+  --chops-button-bg: var(--chops-gray-200);
+  --chops-button-color: var(--chops-black);
+  --chops-button-disabled-bg: var(--chops-gray-300);
+  --chops-button-disabled-color: var(--chops-gray-600);
+  --chops-button-border: none;
+  --chops-button-radius: 4px;
+  --chops-choice-bg: var(--chops-blue-gray-50);
+  --chops-choice-color: var(--chops-gray-600);
+  --chops-active-choice-bg: var(--chops-blue-75);
+  --chops-active-choice-color: var(--chops-primary-accent-color);
+  --chops-transition-time: 0.1s;
+
+  --chops-error-bubble-bg: var(--chops-red-50);
+  --chops-notice-bubble-bg: var(--chops-orange-50);
+  --chops-notice-border: 1px solid var(--chops-orange-200);
+  --chops-help-bubble-bg: var(--chops-blue-50);
+  --chops-field-error-color: var(--chops-red-700);
+  --chops-selected-bg: var(--chops-yellow-50);
+
+  --chops-card-heading-bg: var(--chops-secondary-header-bg);
+  --chops-card-details-bg: var(--chops-gray-50);
+  --chops-card-border: var(--chops-normal-border);
+  --chops-card-content-bg: var(--chops-white);
+
+  --chops-table-header-bg: var(--chops-secondary-header-bg);
+  --chops-table-row-bg: var(--chops-white);
+  --chops-table-divider: var(--chops-normal-border);
+
+  --chops-main-font-size: 13px;
+  --chops-large-font-size: 15px;
+  --chops-icon-font-size: 20px;
+
+  /* A few Monorail-specific CSS variables. */
+  --monorail-header-height: 44px;
+  --monorail-metadata-open-bg: var(--chops-light-green-10);
+  --monorail-metadata-closed-bg: var(--chops-sidebar-bg);
+}
+
+
+body {
+  box-sizing: border-box;
+  margin: 0;
+  padding: 0;
+  font-family: var(--chops-font-family);
+  line-height: 1.4;
+  font-size: var(--chops-main-font-size);
+  min-width: 300px;
+  background: var(--chops-page-bg);
+  color: var(--chops-primary-font-color);
+}
+
+/* Global styles for the EZT pages. */
+a {
+  color: var(--chops-link-color);
+  text-decoration: none;
+  font-weight: var(--chops-link-font-weight);
+}
+
+a:hover {
+  text-decoration: underline;
+}
+
+/* Legacy CSS used by both the SPA and the EZT pages. */
+#footer {
+  clear: both;
+  text-align: right;
+  padding-top: 1em;
+  margin: 3.5em 0em;
+  color: var(--chops-gray-500);
+  background: var(--chops-footer-bg);
+}
+
+#footer a,
+#footer a:visited {
+  text-decoration: none;
+  margin-right: 2em;
+}
+
+#ac-list {
+  border: 1px solid var(--chops-gray-400);
+  background: var(--chops-white);
+  color: var(--chops-link-color);
+  padding: 2px;
+  z-index: 999;
+  max-height: 18em;
+  overflow-x: hidden;
+  overflow-y: auto;
+}
+#ac-list { font-size: 95%; }
+#ac-list tr { margin: 1px; cursor: pointer; padding: 0 10px; }
+#ac-list th { color: var(--chops-gray-850); text-align: left; }
+#ac-list .selected,
+#ac-list .selected td { background: var(--chops-active-choice-bg); }
+#ac-list td, #ac-list th { white-space: nowrap; padding-right: 22px}
diff --git a/static/css/d_sb.css b/static/css/d_sb.css
new file mode 100644
index 0000000..099d121
--- /dev/null
+++ b/static/css/d_sb.css
@@ -0,0 +1,181 @@
+/* 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
+ */
+
+/* Style sheet for issue attachment source browsing pages. */
+
+/* List */
+#resultstable {table-layout:fixed}
+#resultstable div {white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
+
+/* Diffs */
+.diff pre {
+ margin:0;
+ padding:0;
+ white-space: pre-wrap;
+ white-space: -moz-pre-wrap;
+ white-space: -pre-wrap;
+ white-space: -o-pre-wrap;
+ word-wrap: break-word;
+}
+.diff th {padding:0 .6em; text-align:right; font-weight:normal; color:#666}
+.diff b {font-weight: normal}
+.diff .noline {background: #eee; border: 1px solid #888; border-width: 0 1px 0 1px}
+.diff .oldbackrm {background: #f88; border: 1px solid #a33; border-width: 0 1px 0 1px}
+.diff .oldbackeq {background: #ffd8d8; border: 1px solid #a33; border-width: 0 1px 0 1px}
+.diff .newbackadd {background: #9f9; border: 1px solid #3a3; border-width: 0 1px 0 1px}
+.diff .newbackeq {background: #ddf8cc; border: 1px solid #3a3; border-width: 0 1px 0 1px}
+.diff .oldrm {background: #f88;}
+.diff .oldeq {background: #ffd8d8;}
+.diff .newadd {background: #9f9;}
+.diff .neweq {background: #ddf8cc;}
+.diff .first td {border-top-width:1px}
+.diff .last td {border-bottom-width:1px}
+.header td {padding-bottom:.3em; text-align:center; font-family:arial, sans-serif}
+#controls {padding:.5em; white-space:nowrap}
+#controls td {padding:0 2px}
+#controls input, #controls select {font-size:93%; margin:0; padding:0}
+#controls form {margin:0; padding:0 1em}
+#controls a.revchoose {
+  text-decoration: none;
+  color: var(--chops-black);
+  padding: 4px;
+  border: 1px solid #ebeff9;
+}
+#controls a.revchoose:hover {
+  border: 1px inset var(--chops-white);
+}
+
+/* Property Diffs */
+.diff .firstseg {padding-left: 2px}
+.diff .lastseg {padding-right: 2px}
+.diff .samepropback {border: 1px solid var(--chops-black); border-width: 0 1px 0 1px}
+.diff td.nopropsep {border-bottom-width: 0px}
+.diff .propname td {font-size: 110%; font-weight: bold; padding: 1em 0.5em}
+.diff .bincontent {border-bottom-width: 1px; font-style: italic; font-size: 110%; padding: 0px 0.5em}
+.diff .propspace {font-size: 100%}
+.diff .sectiontitle {padding: 2em 0; font-style: italic; font-size: 110%}
+
+/* Meta bubble */
+#older, #props, #fileinfo {border-top:3px solid white; padding-top:6px; margin-top: 1em}
+#older pre {margin-top:4px; margin-left:1em}
+
+/* File */
+.fc pre, .fc td, .fc tr, .fc table, .fc tbody, #nums, #lines {padding:0; margin:0}
+.fc {position:relative; width:100%; min-height:30em}
+.fc table {border-collapse:collapse; margin:0; padding:0}
+#nums, #lines, #nums th, #lines th, #nums td, #lines td { vertical-align:top }
+pre {
+  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
+  font-size: 93%;
+}
+#nums {padding-right:.5em; width:3.7em}
+#nums td {text-align:right}
+#nums a {color:#77c; text-decoration:none}
+#nums tr:hover a {color:blue; text-decoration:underline}
+#nums td:target a {color:var(--chops-black); font-weight:bold}
+.sep {visibility:hidden; width:2px}
+#nums span { cursor: pointer; width: 14px; float: left; background-repeat: no-repeat; }
+#lines td {padding-left:4px;}
+
+/* Applies only to sb files and issue attachments */
+.fc #nums, .fc #lines {
+  padding-top: 0.5em;
+}
+.fc #lines {
+  border-left: 3px solid #ebeff9;
+}
+
+#log { position:absolute; top:2px; right:0; width:28em}
+#log p { font-size:120%; margin: 0 0 0.5em 0}
+#log pre { margin-top: 0.3em}
+
+/* IE Whitespace Fix */
+.prettyprint td.source {
+  white-space: pre-wrap;
+  white-space: -moz-pre-wrap;
+  white-space: -pre-wrap;
+  white-space: -o-pre-wrap;
+}
+
+/* Header */
+.src_nav {
+  height:1.2em;
+  padding-top:0.2em;
+}
+.src_crumbs {
+  padding:0;
+  margin:0;
+}
+#crumb_root {
+  padding:0.2em 0 0.2em 0.2em;
+  margin:0;
+}
+#crumb_links {
+  margin-top:0;
+  margin-right:0;
+  padding:0.2em 1px;
+}
+form.src_nav {
+  padding:0;
+  margin:0;
+  display: inline;
+}
+#src_nav_title {
+  margin-right: 0.5em;
+}
+
+.heading {
+  background:#c3d9ff;
+}
+.sp {
+  color:#555;
+}
+.sourcelabel {
+  margin-left: 20px;
+  white-space: nowrap;
+}
+.sourcelabel select {
+  font-size: 93%;
+}
+#contents {
+  display: none;
+}
+
+/* Branch detail and revision log message */
+pre.wrap {
+  white-space: pre-wrap;
+  white-space: -moz-pre-wrap;
+}
+
+.edit_icon {
+  width: 14px;
+  height: 14px;
+  padding-right: 4px;
+}
+
+/* Source editing */
+.CodeMirror-line-numbers {
+  margin: .4em;
+  padding-right: 0.3em;
+  font-size: 83%;
+  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace;
+  color: #777;
+  text-align: right;
+  border-right: 1px solid #aaa;
+}
+.editbox {
+  border-color: #999 #ccc #ccc;
+  border-width: 1px;
+  border-style: solid;
+  background: var(--chops-white);
+}
+.pending_bubble {
+  background-color: #e5ecf9;
+}
+#pending {
+  padding: 2px 2px 2px 4px;
+}
diff --git a/static/css/d_updates_page.css b/static/css/d_updates_page.css
new file mode 100644
index 0000000..9d4c1f6
--- /dev/null
+++ b/static/css/d_updates_page.css
@@ -0,0 +1,260 @@
+/* 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
+ */
+
+.activity-stream-list h4 {
+  font-size: 100%;
+  font-weight: normal;
+  padding: 0;
+  margin: 0;
+  padding-left: 1em;
+  background: var(--chops-table-header-bg);
+  line-height: 160%;
+}
+ul.activity-stream {
+  list-style: none;
+  margin: 0;
+  padding: 0;
+}
+ul.activity-stream li {
+  margin: 0;
+  padding: 0.375em 0;
+  z-index: 0;
+  clear: both;
+}
+ul.activity-stream li {
+  border-bottom: var(--chops-normal-border);
+}
+ul.activity-stream span.date {
+  float: left;
+  width: 7.5em;
+  text-align: right;
+  color: #5f5f5f;
+  padding-right: 1em;
+  background-repeat: no-repeat;
+  background-position: 5px center;
+}
+ul.activity-stream span.below-more {
+  background-image: url(/static/images/plus.gif);
+  cursor: pointer;
+}
+ul.activity-stream li.click span.below-more {
+  background-image: url(/static/images/minus.gif);
+}
+ul.activity-stream span.content {
+  display: block;
+  overflow: hidden;
+  white-space: nowrap;
+}
+ul.activity-stream span.content span.highlight-column {
+  padding-right: 1em;
+}
+ul.activity-stream span.details-inline {
+  color: #676767;
+}
+ul.activity-stream span.details-inline pre {
+  display: inline;
+}
+ul.activity-stream span.details-inline div,
+ul.activity-stream span.details-inline span {
+  display: inline;
+}
+ul.activity-stream div.details-wrapper {
+  display: none;
+}
+ul.activity-stream li.click span.details-inline {
+  display: none;
+}
+ul.activity-stream li.click div.details-wrapper {
+  display: block;
+  overflow: hidden;
+}
+ul.activity-stream div.details {
+  color: #5f5f5f;
+  margin-top: 0.3em;
+  padding-top: 0.2em;
+  padding-bottom: 0.2em;
+  margin-left: 0.2em;
+  border-left: 0.3em solid #e5ecf9;
+  padding-left: 0.5em;
+  line-height: 130%;
+}
+ul.activity-stream div.details span.ot-logmessage,
+ul.activity-stream div.details span.ot-issue-comment,
+ul.activity-stream div.details span.ot-project-summary {
+  white-space: pre;
+}
+ul.activity-stream div.details a,
+ul.activity-stream span.details-inline a {
+  color: var(--chops-link-color);
+}
+a.showAll,
+a.hideAll {
+  color: var(--chops-link-color);
+}
+body.detailedInfo_hidden ul.activity-stream a.details {
+  color: var(--chops-link-color);
+  text-decoration: underline;
+  cursor: pointer;
+}
+ul.activity-stream div.details pre {
+  font-size: 110%;
+  line-height: 125%;
+  padding: 0;
+  margin: 0;
+}
+ul.activity-stream span.content a.ot-profile-link-1,
+ul.activity-stream span.content a.ot-project-link-1 {
+  color: var(--chops-link-color);
+}
+ul.activity-stream span.content a.ot-profile-link-2,
+ul.activity-stream span.content a.ot-project-link-2 {
+  color: var(--chops-link-color);
+}
+ul.activity-stream div.details span.ot-revlogs-br-1 {
+  display: block;
+  padding: 0;
+  margin: 0;
+}
+ul.activity-stream div.details span.ot-revlogs-br-2,
+ul.activity-stream div.details span.ot-issue-fields-br {
+  display: block;
+  padding: 0;
+  margin: 0.5em;
+}
+ul.activity-stream div.details span.ot-issue-field-wrapper,
+ul.activity-stream div.details span.ot-labels-field-wrapper  {
+  font-family: arial, sans-serif;
+}
+ul.activity-stream span.details-inline span.ot-issue-field-wrapper,
+ul.activity-stream span.details-inline span.ot-labels-field-wrapper  {
+  font-family: arial, sans-serif;
+}
+ul.activity-stream div.details span.ot-issue-field-name,
+ul.activity-stream div.details span.ot-labels-field-name {
+  font-weight: bold;
+}
+ul.activity-stream span.details-inline span.ot-issue-field-name,
+ul.activity-stream span.details-inline span.ot-labels-field-name  {
+  font-weight: bold;
+}
+div.display-error {
+  font-style: italic;
+  text-align: center;
+  padding: 3em;
+}
+.results td a {
+  color: var(--chops-link-color);
+}
+.results td a:hover {
+  text-decoration: underline;
+}
+.results td a.closed_ref {
+  color: var(--chops-link-color);
+  text-decoration: line-through;
+}
+.results td {
+  cursor: auto;
+}
+.highlight-column {
+  overflow: hidden;
+  white-space: nowrap;
+  display: block;
+}
+
+/**
+ * Document container designed for fluid width scaling.
+ * Alternative g-doc- fixed-width classes are in gui-fixed.css.
+ */
+.g-doc {
+  width: 100%;
+  text-align: left;
+}
+
+/* For agents that support the pseudo-element selector syntax. */
+.g-section:after {
+  content: ".";
+  display: block;
+  height: 0;
+  clear: both;
+  visibility: hidden;
+}
+
+/* Disable the clear on nested sections so they'll actually nest. */
+.g-unit .g-section:after {
+  clear: none;
+}
+.g-section {
+  /* Helps with extreme float-drops in nested sections in IE 6 & 7. */
+  width: 100%;
+  /* So nested sections' background-color paints the full height. */
+  overflow: hidden;
+}
+
+/* Forces "hasLayout" for IE. This fixes the usual gamut of peekaboo bugs. */
+.g-section,
+.g-unit {
+  zoom: 1;
+}
+
+/* Used for splitting a template's units text-alignment to the outer edges. */
+.g-split .g-unit {
+  text-align: right;
+}
+.g-split .g-first {
+  text-align: left;
+}
+
+/* Document container designed for 1024x768 */
+.g-doc-1024 {
+  width: 73.074em;
+  *width: 71.313em;
+  min-width: 950px; /* min-width doesn't work in IE6 */
+  margin: 0 auto;
+  text-align: left;
+}
+/* Document container designed for 800x600 */
+.g-doc-800 {
+  width: 57.69em;
+  *width: 56.3em;
+  min-width: 750px;  /* min-width doesn't work in IE6 */
+  margin: 0 auto;
+  text-align: left;
+}
+
+.g-tpl-160 .g-unit,
+.g-unit .g-tpl-160 .g-unit,
+.g-unit .g-unit .g-tpl-160 .g-unit,
+.g-unit .g-unit .g-unit .g-tpl-160 .g-unit {
+  margin: 0 0 0 8.5em;
+  width: auto;
+  float: none;
+}
+.g-unit .g-unit .g-unit .g-tpl-160 .g-first,
+.g-unit .g-unit .g-tpl-160 .g-first,
+.g-unit .g-tpl-160 .g-first,
+.g-tpl-160 .g-first {
+  margin: 0;
+  width: 8.5em;
+  float: left;
+}
+
+.g-tpl-300 .g-unit,
+.g-unit .g-tpl-300 .g-unit,
+.g-unit .g-unit .g-tpl-300 .g-unit,
+.g-unit .g-unit .g-unit .g-tpl-300 .g-unit {
+  margin: 0 0 0 19.5em;
+  width: auto;
+  float: none;
+}
+.g-unit .g-unit .g-unit .g-tpl-300 .g-first,
+.g-unit .g-unit .g-tpl-300 .g-first,
+.g-unit .g-tpl-300 .g-first,
+.g-tpl-300 .g-first {
+  margin: 0;
+  width: 19.5em;
+  float: left;
+}
diff --git a/static/css/ph_core.css b/static/css/ph_core.css
new file mode 100644
index 0000000..c8fc43b
--- /dev/null
+++ b/static/css/ph_core.css
@@ -0,0 +1,923 @@
+/* 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
+ */
+
+@charset "utf-8";
+
+body {
+    margin: 0 0 3px 0;
+    min-width: 768px;
+}
+
+#monobar {
+    background: var(--chops-primary-header-bg);
+    margin: 0;
+    padding: 0;
+}
+
+#monobar th {
+    white-space: nowrap;
+    vertical-align: middle;
+    font-weight: normal;
+}
+
+.sidebar {
+    background: var(--chops-sidebar-bg);
+    border: var(--chops-normal-border);
+    padding: 4px;
+}
+
+.padded {
+    padding: 4px 1em;
+}
+
+#monobar a#wordmark {
+    font-family: sans-serif;
+    font-variant: small-caps;
+    font-size: 140%;
+    font-weight: bold;
+    font-style: oblique;
+    color: #822;
+    letter-spacing: 1px;
+    text-decoration: none;
+}
+
+#thumbnail_box {
+    background-color: var(--chops-white);
+    vertical-align: middle;
+}
+
+#thumbnail_box a, #thumbnail_box img {
+    display: block;
+}
+
+.toptabs a:link, .toptabs a:visited {
+    color: #444;
+    padding: 0 .5em ;
+    text-decoration: none;
+}
+
+.toptabs a:hover {
+    color: var(--chops-link-color);
+    text-decoration: underline;
+}
+
+.toptabs a.active {
+    font-weight: bold;
+    color: var(--chops-black);
+    text-decoration: none;
+}
+
+#userbar {
+    text-align: right;
+}
+
+#userbar a {
+    color: var(--chops-black);
+}
+
+.subt {
+    background: var(--chops-secondary-header-bg);
+    margin: 0;
+    padding: 4px 1em;
+    border: var(--chops-normal-border);
+    border-width: 1px 0 1px 0;
+}
+
+a:link, a:focus {
+    color: var(--chops-link-color);
+}
+
+a:active {
+    color: red;
+}
+
+input[type="text"] {
+    border-color: #999 #ccc #ccc;
+    border-style: solid;
+    border-width: 1px;
+    padding: 3px 3px;
+}
+
+input[type=button], input[type=reset], input[type=submit], .buttonify {
+    font-size: 100%;
+    background: var(--chops-button-bg);
+    color: var(--chops-button-color) !important;
+
+    padding: 6.1px 10px;
+    margin-right: .6em;
+    border: var(--chops-button-border);
+    border-radius: var(--chops-button-radius);
+    box-shadow: var(--chops-shadow);
+    cursor: pointer;
+    text-decoration: none;
+}
+
+.subt input[type=button], .subt input[type=reset], .subt input[type=submit], .subt .buttonify {
+    padding: 3px 6px;
+}
+
+input[type=submit], input[type=button].primary, a.primary {
+    background: var(--chops-primary-button-bg);
+    color: var(--chops-primary-button-color) !important;
+}
+
+input[type=submit].secondary {
+    background: var(--chops-button-bg);
+    color: var(--chops-button-color) !important;
+}
+
+input[type=submit]:disabled, input[type=button]:disabled {
+    background: var(--chops-button-disabled-bg);
+    color: var(--chops-button-disabled-color) !important;
+}
+
+.button_set {
+    float: right;
+    font-size: 95%;
+    display: flex;
+    margin-left: 2em;
+    margin-bottom: 5px; /* Offsets padding lost by flex+float. */
+}
+
+@-moz-document url-prefix() {
+    .buttonify {
+	padding: 2px 3px 2px 3px;
+    }
+}
+
+input[type=button]:hover, input[type=reset]:hover, input[type=submit]:hover, .buttonify:hover {
+    border-color: #666;
+    text-decoration: none !important;
+}
+
+.choice_chip {
+    padding: 4px 10px;
+    margin-left: 6px;
+    background: var(--chops-choice-bg);
+    color: var(--chops-choice-color);
+    border-radius: 50vh;
+    text-decoration: none;
+}
+
+.active_choice {
+    background: var(--chops-active-choice-bg);
+    color: var(--chops-active-choice-color);
+    font-weight: var(--chops-link-font-weight);
+}
+
+a.choice_chip, a.choice_chip:visited {
+    color: var(--chops-choice-color);
+}
+
+input[type=button]:active, input[type=reset]:active, input[type=submit]:active,
+input.primary:active, .buttonify:active {
+  background: var(--chops-gray-600);
+  color: var(--chops-white) !important;
+}
+
+textarea {
+    border-color: #999 #ccc #ccc;
+    border-style: solid;
+    border-width: 1px;
+}
+
+td td, th th, th td, td th {
+    font-size: 100%;
+}
+
+form {
+    padding: 0;
+    margin: 0;
+}
+
+.hidden {
+  display: none !important;
+}
+
+/* Project tab bar. */
+.gtb {
+  background: var(--chops-white);
+  border-bottom: 1px solid #ccc;
+  padding: 5px 10px 0 5px;
+  white-space: nowrap;
+}
+
+.user_bar {
+    cursor: pointer;
+    float: right;
+    margin: 5px 15px 6px 10px;
+}
+
+.gtb .gtbc {
+    clear: left;
+}
+
+table {
+    border-collapse: separate;
+}
+
+.nowrap { white-space: nowrap; }
+.nowrapspan span { white-space: nowrap; }
+.derived { font-style: italic; }
+
+.bubble_bg {
+    background: #eee;
+    margin-bottom: 0.6em;
+}
+
+.bubble {
+    padding: 4px;
+}
+
+#bub {
+    padding: 0 1px 0 1px;
+}
+
+.bub-top {
+    margin: 0 2px 2px;
+}
+
+.bub-bottom {
+    margin: 2px 2px 0;
+}
+
+.drop-down-bub {
+    font-size: 80%;
+    margin-top: -1px;
+}
+
+
+h4 {
+    color: #222;
+    font-size: 16pt;
+    margin: .4em;
+    padding: 0;
+}
+
+.section {
+    margin: 0 4px 1.6em 4px;
+    padding:4px;
+}
+.section .submit {
+    margin: 8px;
+}
+
+#maincol {
+    padding:4px;
+    background: var(--chops-page-bg);
+}
+
+.isf a, .at a, .isf a:visited, .at a:visited {
+  color: var(--chops-link-color);
+  text-decoration: none;
+}
+
+.at span {
+  margin-right: 1em;
+  white-space: nowrap;
+}
+
+.isf a:hover, .at a:hover {
+  color: var(--chops-link-color);
+  text-decoration: underline;
+}
+
+.at {
+    padding-top: 6px;
+    padding-bottom: 3px;
+}
+
+.st1 .inst1 a,
+.st2 .inst2 a,
+.st3 .inst3 a,
+.st4 .inst4 a,
+.st5 .inst5 a,
+.st6 .inst6 a,
+.st7 .inst7 a,
+.st8 .inst8 a,
+.st9 .inst9 a {
+  color: var(--chops-black);
+  font-weight: bold;
+  text-decoration: none;
+}
+
+.notice, .error {
+    font-weight: bold;
+    padding: 4px 16px;
+    border-radius: 4px;
+}
+
+.notice {
+    background: var(--chops-notice-bubble-bg);
+}
+
+.error {
+    background: var(--chops-error-bubble-bg);
+}
+
+.adminonly {
+    color: #a00;
+    font-style: italic;
+}
+
+.fielderror {
+    color: var(--chops-field-error-color);
+    font-weight: bold;
+    padding: 4px;
+}
+
+.tip, .help {
+    background: var(--chops-help-bubble-bg);
+    font-size: 92%;
+    margin: 5px;
+    padding: 6px;
+    border-radius: 6px;
+}
+
+.tip {
+    width: 14em;
+}
+
+.help {
+    width: 44em;
+}
+
+.x_icon::before {
+    content: "\00D7";
+}
+
+.x_icon {
+    text-decoration: none;
+    font-size: 130%;
+    color: #444 !important;
+    padding: 0 2px;
+    vertical-align:middle;
+}
+
+.x_icon:active {
+    color: var(--chops-white) !important;
+    background: #444;
+}
+
+/* Google standard */
+.gbh {
+    border-top: 1px solid #C9D7F1;
+    font-size: 1px;
+    height: 0;
+    position: absolute;
+    top: 24px;
+    width: 100%;
+}
+
+#pname {
+    font-size:300%;
+    margin: 0;
+    padding: 0;
+}
+
+#pname a,
+#pname a:visited {
+    text-decoration:none;
+    color: #666;
+}
+
+#project_summary_link {
+    text-decoration: none;
+    color: #444;
+}
+
+.vt td,
+.vt th,
+.vt {
+    vertical-align: top;
+}
+
+.indicator {
+    font-size: x-small;
+    color: var(--chops-link-color);
+}
+
+div.h4, table.h4 {
+    background-color: var(--chops-secondary-header-bg);
+    margin-bottom: 2px;
+    padding: 2px;
+    font-weight: bold;
+    position: relative;
+    margin-top: 2px;
+}
+
+.mainhdr {
+    background-color: #ebeff9;
+    border-bottom: 1px solid #6b90da;
+    font-weight: bold;
+    font-size: 133%;
+    padding: 2px;
+}
+
+.secondaryhdr {
+    background-color: #eee;
+    padding: 10px;
+    border-bottom: 1px solid #ddd;
+    border-left: 1px solid #ddd;
+    border-right: 1px solid #ddd;
+}
+
+h1 {
+    font-size: x-large;
+    margin-top: 0px;
+}
+
+h2 {
+    font-size: large;
+}
+
+h3 {
+    font-size: medium;
+    background: #eee;
+    padding: 0.5ex 0.5em 0.5ex 0.5em;
+    margin-right: 2em;
+}
+
+img {
+    border: 0;
+}
+
+#user_bar {
+    text-align: right;
+    margin-bottom: 10px;
+}
+
+#user_bar a {
+    color: var(--chops-link-color);
+    text-decoration: none;
+}
+
+#header {
+    position: relative;
+    height: 55px;
+    padding-top: 6px;
+    margin-bottom: -9px;
+}
+
+#title {
+    margin-left: 171px;
+    background-color: #eee;
+    font-size: large;
+    font-weight: bold;
+    padding-left: 3px;
+    padding-top: 1px;
+    padding-bottom: 1px;
+}
+
+.label { text-decoration: none; color: green !important; }
+.label:hover { text-decoration: underline; }
+
+.fieldvalue { text-decoration: none; }
+.fieldvalue:hover { text-decoration: underline; }
+
+.fieldvalue_url {
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    overflow: hidden;
+}
+.fieldvalue_url:after {
+    content: "\A";
+    white-space: pre;
+}
+
+#colcontrol {
+    padding: 5px;
+}
+
+.cue {
+    margin-top: -4px;
+    padding: 1px;
+    background: var(--chops-notice-bubble-bg);
+    border: 1px solid #f0c36d;
+}
+.cue td span {
+    font-size: 85%;
+    text-align: center;
+    padding: 0 1em;
+}
+
+.results tr td { border-bottom: var(--chops-table-divider); }
+.resultstable tr td { border-bottom: var(--chops-table-divider); }
+
+.results th, .results_lite th {
+    background: var(--chops-table-header-bg);
+    text-align: left;
+    padding: 3px;
+    border: 0;
+    border-right: 1px solid var(--chops-white);
+}
+.results th:last-child { border-right: 0; }
+
+.results th a, .results th a:visited {
+    color: var(--chops-link-color);
+    padding-right: 4px;
+    margin-right: 4px;
+}
+.results td { cursor: pointer }
+.results td { padding: 6px; }
+.results td a { color: var(--chops-black); text-decoration: none; }
+#project_list .results td { padding: 18px; }
+#project_list table.results td.id { text-align: left; }
+
+.results td.id a,
+.results td.project a,
+.results td.url a { color: var(--chops-link-color); white-space: nowrap; }
+.results td.id a:visited,
+.results td.project a:visited,
+.results td.url a:visited { color: purple; }
+.results td.id a:hover, .results td.project a:hover, .results td.url a:hover { color: red; text-decoration: underline; }
+table.results .hoverTarget:hover a { color: #009; }
+.results .label { font-size: 80% }
+.results .selected { background-color: var(--chops-selected-bg); }
+.results td tt { color: #999; font-style: italic; font-weight: bold; }
+.results .displayproperties { font-size: 80%; color: #666; }
+
+.results .grid .gridtile tr { border: 0; }
+.results .grid .gridtile td { border: 0; }
+
+.comptable.all .comprow { display: table-row; }
+.comptable.active .comprow { display: none; }
+.comptable.active .comprow.active { display: table-row; }
+.comptable.toplevel .comprow { display: none; }
+.comptable.toplevel .comprow.toplevel { display: table-row; }
+.comptable.toplevel .comprow.toplevel.deprecated { display: none; }
+.comptable.myadmin .comprow { display: none; }
+.comptable.myadmin .comprow.myadmin { display: table-row; }
+.comptable.mycc .comprow { display: none; }
+.comptable.mycc .comprow.mycc { display: table-row; }
+.comptable.deprecated .comprow { display: none; }
+.comptable.deprecated .comprow.deprecated { display: table-row; }
+
+/* The revision flipper. */
+.flipper { font-family: monospace; font-size: 120%; }
+.flipper ul { list-style-type: none; padding: 0; margin: 0em 0.3em; }
+.flipper b { margin: 0em 0.3em; }
+
+.closed .ifOpened { display: none }
+.closed .opened span.ifOpened { display: inline }
+.opened .ifClosed { display: none }
+.opened .closed span.ifClosed { display: inline }
+
+a.star {
+  text-decoration: none;
+  cursor: pointer;
+  display: inline-block;
+  font-size: 18px;
+}
+
+a.spamflag {
+  text-decoration: none;
+  cursor: pointer;
+}
+
+.h3 {
+    font-size: 130%;
+    font-weight: bolder;
+}
+input { padding-left: 1px; padding-right: 1px; }
+textarea { padding-left: 1px; padding-right: 1px; }
+
+.pagination { font-size: 100%; float: right; white-space: nowrap; }
+.pagination a { margin-left: 0.3em; margin-right: 0.3em; }
+
+.author { margin-bottom: 1em; }
+
+#searchtips { padding-left: 2em; }
+#searchtips p { margin-left: 2em; }
+
+.issueList .inIssueList span,
+.issueAdvSearch .inIssueAdvSearch a,
+.issueSearchTips .inIssueSearchTips a {
+    font-weight: bold;
+    text-decoration: none;
+    color: var(--chops-black);
+}
+
+iframe[frameborder="1"] {
+    border: 1px solid #999;
+}
+
+/* For project menu */
+.menuDiv {
+    margin-top: 5px;
+    border-color: #C9D7F1 #3366CC #3366CC #A2BAE7;
+    border-style: solid;
+    border-width: 1px;
+    z-index: 1001;
+    padding: 0;
+    width: 175px;
+    background: var(--chops-white);
+    overflow: hidden;
+}
+.menuDiv .menuText {
+    padding: 3px;
+    text-decoration: none;
+    background: var(--chops-white);
+}
+.menuDiv .menuItem {
+    color: var(--chops-link-color);
+    padding: 3px;
+    text-decoration: none;
+    background: var(--chops-white);
+}
+.menuDiv .menuItem:hover {
+    color: var(--chops-white);
+    background: #3366CC;
+}
+.menuDiv .categoryTitle {
+    padding-left: 1px;
+}
+.menuDiv .menuCategory,
+.menuDiv .categoryTitle {
+    margin-top: 4px;
+}
+.menuDiv .menuSeparator {
+    margin: 0 0.5em;
+    border: 0;
+    border-top: 1px solid #C9D7F1;
+}
+
+.hostedBy {
+    text-align: center;
+    vertical-align: center;
+}
+
+.fullscreen-popup {
+    position: fixed;
+    right: 4%;
+    left: 4%;
+    top: 5%;
+    max-height: 90%;
+    opacity: 0.85;
+    -moz-opacity: 0.85;
+    -khtml-opacity: 0.85;
+    filter: alpha(opacity=85);
+    -moz-border-radius: 10px;
+
+    background: var(--chops-black);
+    color: var(--chops-white);
+    text-shadow: var(--chops-black) 1px 1px 7px;
+
+    padding: 1em;
+    z-index: 10;
+    overflow-x: hidden;
+    overflow-y: hidden;
+}
+
+/* Make links on this dark background a lighter blue. */
+.fullscreen-popup a {
+    color: #dd0;
+}
+
+div#keys_help th {
+    color: yellow;
+    text-align: left;
+}
+
+div#keys_help td {
+    font-weight: normal;
+    color: var(--chops-white);
+}
+
+td.shortcut {
+    text-align: right;
+}
+
+span.keystroke {
+    color: #8d0;
+    font-family: monospace;
+    font-size: medium;
+}
+
+.list {
+    background-color:var(--chops-white);
+    padding: 5px;
+}
+
+.list-foot {
+    background-color:var(--chops-white);
+    padding: 5px;
+    height: 20px;
+}
+
+.graytext {
+    color: #666;
+}
+
+.vspacer {
+    margin-top: 1em;
+}
+
+.hspacer {
+    margin-right: 1em;
+}
+
+.emphasis {
+    font-weight: bold;
+}
+
+.formrow {
+    vertical-align: top;
+    padding-bottom: .569em;
+    white-space: nowrap;
+    overflow: hidden;
+    padding-top: .2em;
+}
+
+.forminline {
+    display: inline-block;
+    vertical-align: top;
+}
+
+.formlabelgutter {
+    margin-top: 0.3em;
+    text-align: right;
+    vertical-align: top;
+    white-space: normal;
+    width: 13em;
+}
+
+.formlabel {
+    font-weight: bold;
+    text-align: right;
+}
+
+.forminputgutter {
+    margin-top: 0.3em;
+    text-align: left;
+    vertical-align: top;
+    white-space: normal;
+    width: 36em;
+}
+
+.forminput {
+    width: 100%;
+}
+
+.formshortinput {
+    width: 11em;
+}
+
+.formselectgutter {
+    margin-top: 0.3em;
+    text-align: left;
+    vertical-align: top;
+    white-space: normal;
+    width: 18em;
+}
+
+.formselect {
+    width: 18em;
+}
+
+.formqm {
+    margin-left: 0.25em;
+    margin-right: 0.25em;
+}
+
+.formerror {
+    color: #a00;
+    display: block;
+    text-align: left;
+}
+
+.tablerow {
+    vertical-align: top;
+    padding-bottom: .569em;
+    white-space: nowrap;
+    overflow: hidden;
+    padding-top: .2em;
+}
+
+.tablelabelgutter {
+    margin-top: 0.3em;
+    text-align: left;
+    vertical-align: top;
+    white-space: normal;
+    width: 10em;
+}
+
+.tablelabel {
+    font-weight: bold;
+    text-align: left;
+}
+
+/* Gecko */
+html>body .goog-inline-block {
+    display: -moz-inline-box; /* This is ignored by FF3 and later*/
+    display: inline-block; /* This is ignored by pre-FF3 Gecko */
+}
+
+/* Default rule */
+.goog-inline-block {
+    position: relative;
+    display: inline-block;
+}
+
+/* Pre-IE7 */
+* html .goog-inline-block {
+    display: inline;
+}
+
+/* IE7 */
+*:first-child+html .goog-inline-block {
+    display: inline;
+}
+
+#popular {
+    border: solid silver;
+    border-width: 1px 0 1px 0;
+    padding: 0.3em;
+    width: 40em;
+}
+
+#popular table {
+    width: 40em;
+}
+
+#popular td {
+    padding: 2px;
+    white-space: nowrap;
+}
+
+#intro {
+    background:#ada;
+    margin: 3em;
+    width: 52em;
+}
+
+.userlink_avail {
+  display: inline-block;
+  white-space: nowrap;
+}
+
+.availability_none {
+    font-weight: bold;
+    color: #FF1744;
+}
+
+.availability_unsure {
+    font-weight: bold;
+    color: #EF6C00;
+}
+
+.availability_never {
+    font-weight: bold;
+    color: #6A1B9A;
+}
+
+.availability_banned {
+    font-weight: bold;
+    color: var(--chops-black);
+}
+
+/* Just for screen readers. */
+.visually_hidden {
+    border: 0;
+    clip: rect(0 0 0 0);
+    height: 1px;
+    margin: -1px;
+    overflow: hidden;
+    padding: 0;
+    position: absolute;
+    width: 1px;
+}
+
+.not_styled_as_heading {
+    font-size: inherit !important;
+    font-weight: inherit !important;
+    display: inline !important;
+    background: inherit !important;
+    border: none !important;
+    padding: 0 !important;
+    margin: 0 !important;
+}
+
+/* Launch gates table. */
+
+#launch-gates-table {
+    border-collapse: collapse;
+}
+#launch-gates-table td, #launch-gates-table th {
+    border: 1px solid #ddd;
+    padding: 4px;
+}
+#launch-gates-table tr:nth-child(even){background-color: #f2f2f2;}
+
+#launch-gates-table th {
+    text-align: left;
+    background-color: #6ec5ff;
+}
+
+input.unlink_account, input.incoming_invite {
+    font-size: 80%;
+}
diff --git a/static/css/ph_detail.css b/static/css/ph_detail.css
new file mode 100644
index 0000000..1b37d12
--- /dev/null
+++ b/static/css/ph_detail.css
@@ -0,0 +1,610 @@
+/* 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
+ */
+
+pre.prettyprint {
+    padding: 0.5em;
+    overflow: auto;
+    font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
+    font-size: 93%;
+}
+
+.role_label {
+  background-color: var(--chops-gray-600);
+  border-radius: 3px;
+  color: var(--chops-white);
+  display: inline-block;
+  padding: 2px 4px;
+  font-size: 75%;
+  font-weight: bold;
+  line-height: 14px;
+  vertical-align: text-bottom;
+}
+
+.date {
+  margin-right: 1em;
+}
+
+.issuedescription pre {
+  margin: 0 8px;
+  padding: 0 8px;
+  max-width: 80em;
+}
+
+.issuecomment pre.issue_text {
+  margin: 4px 8px;
+}
+
+.codefont .issue_text {
+  font-family: monospace;
+  font-size: 12px;
+}
+
+.issuedescription pre, .issuecomment pre {
+    white-space: pre-wrap;
+    white-space: -moz-pre-wrap;
+    white-space: -pre-wrap;
+    white-space: -o-pre-wrap;
+    font-family: var(--chops-font-family);
+}
+
+.issuecomment {
+    margin: 16px 8px;
+}
+
+.issuedescription pre a, .issuecomment pre a {
+    word-wrap: break-word;
+    word-break: break-all;
+}
+
+.closed_ref { text-decoration: line-through }
+.rowmajor { width: 700px; }
+
+.rowmajor th {
+    text-align: right;
+    white-space: nowrap;
+}
+
+@media (min-width: 425px) {
+  #issue-main {
+    display: flex;
+  }
+  #left-part {
+    width: 10%;
+    min-width: 20em;
+  }
+  #right-part {
+    width: 90%;
+    margin: 0;
+    padding: 0;
+    border-bottom: 2px solid var(--chops-page-bg);
+  }
+  #meta-float, .issueheader {
+    position: sticky;
+    z-index: 1;
+    top: var(--monorail-header-height);
+  }
+}
+
+@media (max-width: 840px) {
+  #meta-float, #summary-float {
+    top: 0;
+  }
+}
+
+#left-part {
+  background: var(--monorail-metadata-open-bg);
+  border: var(--chops-normal-border);
+}
+
+.closed_colors #left-part {
+  background: var(--monorail-metadata-closed-bg);
+}
+
+#meta-float th { white-space: nowrap; }
+.labelediting input { margin: 0 3px 4px 0; }
+.labelediting input { color: #060; }
+.collapse .ifExpand { display: none }
+.expand .ifCollapse { display: none }
+.inplace input { width: 100%; }
+.inplace td { border: 0; }
+.issueheader {
+  background: var(--monorail-metadata-open-bg);
+  border: var(--chops-normal-border);
+  padding: 2px;
+  border-left: 0;
+}
+
+.closed_colors .issueheader {
+  background: var(--monorail-metadata-closed-bg);
+}
+
+#flipper-box {
+    float: right;
+    height: 3em;
+    padding: 4px;
+    border-left: var(--chops-normal-border);
+}
+
+#flipper-box div {
+    text-align: center;
+    padding: 3px;
+}
+
+.closed_colors {
+  -: var(--chops-link-color);
+}
+
+.closed_colors td.issueheader, .closed_colors td.issueheader a {
+  background: #888;
+}
+
+#spam_banner {
+    border: 1px solid red;
+    background: var(--chops-red-50);
+    padding: .5em;
+    color: var(--chops-black);
+    margin: 2px;
+}
+
+#spam_banner a {
+    color: var(--chops-link-color);
+}
+
+.issuepage { margin-top: 0; }
+.issuepage td { padding: 2px; }
+.issuecomment {
+  max-width: 80em;
+}
+
+.issuecommentheader {
+    background: var(--chops-card-heading-bg);
+    padding: 2px 3px 3px 3px;
+}
+
+.issuedescription pre, .issuecomment pre {
+    padding-top: 6px;
+}
+
+.issuedescription pre b, .issuecomment pre b {
+    font-size: 110%;
+    font-weight: bolder;
+    padding: 3px 0 3px 0;
+}
+
+.issue_text:focus {
+    outline: 0;
+}
+
+.author { padding-left: 4px; }
+
+.ichcommands a {
+    color: var(--chops-gray-600);
+    text-decoration: none;
+}
+
+.issueheader .ichcommands a {
+    color: #555;
+}
+
+.issuecommentbody:focus {
+    outline: 0;
+}
+
+#issue_meta_details {
+    font-size: 95%;
+    vertical-align: top;
+    padding: 1em 5px 5px 5px;
+}
+
+#meta-float td, #meta-float td div, #meta-float div.widemeta {
+    max-width: 14em;
+    overflow-x: hidden;
+    text-overflow: ellipsis;
+}
+#meta-float td.widemeta,  #meta-float td.widemeta div, #meta-float div.widemeta {
+    max-width: 20em;
+}
+
+.meta-floatheader {
+    padding: 0 5px;
+    position: relative;
+    min-width: 14em;
+}
+
+.issueheader a.material-icons {
+    padding: 0 5px;
+    text-decoration: none;
+    color: grey;
+    float: right;
+}
+
+.closed_colors #meta-float {
+    background: var(--monorail-metadata-closed-bg);
+}
+
+#meta-float table td, #meta-float table th {
+    margin: 0;
+    padding: 0;
+    padding-top: 5px;
+}
+
+.rel_issues a { white-space: nowrap; }
+
+.issue_restrictions {
+    padding: 2px 4px;
+    background-color: #fed;
+    min-width: 14em;
+    border: 2px solid var(--chops-white);
+}
+
+.issue_restrictions .restrictions_header {
+    padding: 0 0 2px 0;
+    text-align: center;
+    font-weight: bold;
+}
+
+.issue_restrictions ul {
+    padding: 0 2px;
+    margin: 0;
+    list-style: none;
+}
+
+.issue_restrictions .other_restriction {
+    white-space: nowrap;
+}
+
+.lock_grey {
+    background: no-repeat url(/static/images/lock.png);
+    width: 15px;
+    height: 16px
+}
+
+.updates {
+    background: var(--chops-card-details-bg);
+}
+
+.updates table {
+    width: 100%;
+    font-size: 90%;
+    padding: 4px;
+}
+
+.fakelink {
+    color: var(--chops-link-color);
+    cursor: pointer;
+    white-space: nowrap;
+}
+
+.undef { color: #666; }
+table.advquery {
+    border: var(--chops-card-border);
+    border-radius: var(--chops-radius);
+    box-shadow: var(--chops-shadow);
+}
+
+table.advquery td {
+    white-space: nowrap;
+    padding: 2px;
+}
+
+.focus td { background: var(--chops-card-heading-bg); }
+
+.eg {
+    color: #666;
+    font-size: 90%;
+}
+
+#submit { font-weight: bold; }
+div td .novel { color: #430; }
+div td .blockingsubmit { color: #a03; }
+div td .exclconflict { color: #a03; }
+div td .questionmark { color: #a03; }
+.issuecomment .delcom { background: #e8e8e8; }
+.numberentry { text-align: right; }
+
+.rollovercontrol { display: none; }
+.rolloverzone:hover .rollovercontrol { display: inline; }
+
+td u {
+    margin-left: .3em;
+    color: var(--chops-link-color);
+    cursor: pointer;
+    white-space: nowrap;
+    text-decoration: none;
+}
+
+td u:hover { text-decoration: underline; }
+#peopledetail input { margin-bottom: 2px; }
+#perm_defs { margin-top: 1em; }
+#perm_defs th { text-align:left; }
+
+#perm_defs td {
+    vertical-align:bottom;
+    padding-left: 1em;
+}
+
+.attachments { width:33%; margin-left: .7em;}
+.attachments table {
+  background: var(--chops-card-details-bg);
+  padding: 4px;
+   margin: 8px;
+}
+.attachments table tr td { padding: 0; margin: 0; font-size: 95%; }
+.preview { border: 2px solid #c3d9ff; padding: 1px; }
+.preview:hover { border: 2px solid blue; }
+.label { white-space: nowrap; }
+
+.cursor_on .author {
+    background: url(/static/images/show-arrow.gif) no-repeat 2px;
+}
+
+/* For Popup dialog boxes*/
+
+#update-issues-hotlists, #transfer-ownership-container, #remove-self-container {
+    position: fixed;
+    top: 0;
+    left: 0;
+    width: 100%;
+    height: 100%;
+    background: rgba(0, 0, 0, 0.4);
+    z-index: 10;
+}
+
+#update-issues-hotlists-dialog, #transfer-ownership-dialog, #remove-self-dialog {
+    position: fixed;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    background: var(--chops-white);
+    border: 3px solid #333;
+    padding: 1em;
+    max-height: 75%;
+    width: 75%;
+    max-width: 30em;
+    overflow-y: auto;
+}
+
+/* Issue Peek Feature */
+
+#infobubble {
+  position: absolute;
+  display: none;
+  border: 1px solid #666;
+  padding: 3px 5px 5px 5px;
+  background: #ebeff9;
+}
+
+#peekarea {
+  min-height: 30em;
+  font-size: 95%;
+  background: var(--chops-white);
+}
+
+.perms_EditIssue #peekarea {
+   min-height: 36.4em;
+}
+
+#issuesummary {
+  width: 300px;
+  max-width: 300px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+
+td.rowwidgets { padding: 2px 2px 0 7px; }
+.cursor_on td.rowwidgets {
+  background-image: url(/static/images/show-arrow.gif);
+  background-repeat: no-repeat;
+  background-position: 2px;
+}
+
+.loading {
+  background-image: url(/static/images/spin_16.gif);
+  background-repeat: no-repeat;
+  background-position: 2px;
+  padding: 4px 20px;
+}
+
+#peekheading {
+  background: #ebeff9;
+  font-size:140%;
+  padding:2px 2px 0; overflow-x: hidden;
+  white-space:nowrap;
+}
+
+.peek #meta-float, .peek #issuecomments {
+  height: 28em;
+  max-height: 28em;
+  overflow-y: auto;
+  overflow-x: hidden;
+  scroll: auto;
+}
+
+#hc_controls { float: right; }
+#hc_controls a.paginate { margin-left: 1px; }
+#hc_controls a.close { margin-left: 3px; }
+
+#infobuttons {
+  background: var(--chops-white);
+  /* for IE */
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f1f1f1');
+  /* for webkit browsers */
+  background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f1f1f1));
+  /* for firefox 3.6+ */
+  background: -moz-linear-gradient(top,  #fff,  #f1f1f1);
+  border-top: 1px solid #ccc;
+  white-space:nowrap;
+}
+
+#infobuttons td {
+  padding: 0;
+}
+
+.custom_field_value_menu {
+  width: 20em;
+}
+
+.enum_checkbox {
+  display: inline-block;
+  width: 24%;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  background: #f8f8f8;
+}
+
+.cue.scrim {
+  position: fixed;
+  z-index: 1;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  overflow: auto;
+  background-color: rgb(0,0,0);
+  background-color: rgba(0,0,0,0.4);
+}
+
+#privacy_dialog {
+  background: #fefefe;
+  border: 1px solid #888;
+  border-radius: 4px;
+  margin: 15% auto;
+  padding: 20px;
+  width: 80%;
+  max-width: 40em;
+}
+
+#privacy_dialog .actions {
+  margin-top: 2em;
+  text-align: right;
+  font-weight: bold;
+}
+
+#privacy_dialog .actions a {
+  text-decoration: none;
+  margin-left: 2em;
+}
+
+#show-ranks, #hide-ranks, #add-issue-to-hotlist{
+  color: #555;
+  cursor: pointer;
+}
+
+.rel_issues:hover #show-ranks, #hide-ranks:hover, #add-issue-to-hotlist:hover {
+  text-decoration: underline;
+}
+
+#blocked-scrim {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  background: rgba(0, 0, 0, 0.4);
+  z-index: 10;
+}
+
+#blocked-table {
+  position: fixed;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  background: var(--chops-white);
+  border: 3px solid #333;
+  padding: 1em;
+  max-height: 75%;
+  width: 75%;
+  overflow-y: auto;
+}
+
+#blocked-rank {
+  display: table;
+  width: 100%;
+}
+
+#blocked-rank .closed a {
+  text-decoration: line-through;
+}
+
+.drag_item[draggable=true] {
+  position: relative;
+}
+
+.drag_item[draggable=false] {
+  cursor: wait;
+}
+
+.gripper {
+  color: var(--chops-primary-icon-color);
+  cursor: grab;
+  opacity: 0;
+}
+
+.drag_item[draggable=true]:hover .gripper {
+  opacity: 1;
+}
+
+.drag_container th, .drag_container td {
+    padding: 0.5em;
+}
+
+.drag_container th {
+  color: var(--chops-link-color);
+  background: var(--chops-table-header-bg);
+  text-align: left;
+}
+
+.drag_item.top td {
+  border-top: 2px solid #888;
+}
+
+.drag_item.bottom td {
+  border-bottom: 2px solid #888;
+}
+
+.component-suggestion {
+  display: inline-block;
+  cursor: pointer;
+  padding: 0.25em;
+  margin: 0.25em;
+  border: 1px solid #ddd;
+  border-radius: 0.25em;
+  background-color: #e3e9ff;
+}
+
+#preview_filterrules_area {
+  color: #430;
+  margin-top: 1em;
+}
+
+#preview_filterrules_area div {
+  margin-left: 1em;
+}
+
+#preview_filterrules_area div span {
+  font-style: italic;
+  text-decoration-line: underline;
+  text-decoration-style: dotted;
+}
+
+#preview_filterrules_warnings, #preview_filterrules_errors {
+  margin-top: 3px;
+}
+#preview_filterrules_warnings ul, #preview_filterrules_errors ul {
+  margin-top: 0;
+  list-style-type: none;
+}
+
+#preview_filterrules_errors ul {
+  color: red;
+}
+
+#searchtips p {
+  max-width: 60em;
+}
diff --git a/static/css/ph_list.css b/static/css/ph_list.css
new file mode 100644
index 0000000..645d8c1
--- /dev/null
+++ b/static/css/ph_list.css
@@ -0,0 +1,188 @@
+/* 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
+ */
+
+.popup {
+    display: none;
+    background: var(--chops-white);
+    border: 2px solid #bbb;
+    border-width: 0 2px 2px 1px;
+    position: absolute;
+    padding: 2px;
+}
+
+.popup a { text-decoration: none; cursor: pointer; }
+.popup td, .popup th {
+    font-size: 90%;
+    font-weight: normal;
+    text-align: left;
+    cursor: pointer;
+}
+.popup td { color: var(--chops-link-color); padding: 2px; }
+.popup tr:hover { background: #f9edbe; }
+.subpopup { border-width: 1px 2px 2px 1px; }
+
+.group_row td {
+    background: var(--chops-table-header-bg);
+    cursor: pointer;
+}
+
+div.gridtile td.id {
+    width: 5em;
+    text-align: left;
+}
+
+div.gridtile {
+    border: 2px solid #f1f1f1;
+    border-radius: 6px;
+    padding: 1px;
+    background: var(--chops-white);
+}
+
+tr.grid td {
+    border-right: var(--chops-table-divider);
+}
+
+.results .grid th {
+    border-top: 1px solid var(--chops-white);
+}
+
+tr.grid .idcount {
+    text-align: left;
+}
+
+.results th a.dotdotdot {
+    text-decoration: none;
+    margin-right: 0;
+    padding-right: 0;
+}
+
+tr.grid .idcount a, .results .id a {
+    color: var(--chops-link-color);
+}
+
+tr.grid .idcount a {
+    margin-right: 0.6em;
+}
+
+div.gridtile {
+    width: 10em;
+    float: left;
+    margin: 2px;
+}
+
+div.gridtile table, div.projecttile table {
+    width: 100%;
+    table-layout: fixed;
+}
+
+div.gridtile td, div.projecttile td {
+    border: 0;
+    padding: 2px;
+    overflow: hidden;
+}
+
+div.gridtile td div {
+    height: 5.5ex;
+    font-size: 90%;
+    line-height: 100%;
+}
+
+div.gridtile td.status {
+    font-size: 90%;
+    text-align: right;
+    width: 70%;
+}
+
+div.projecttile {
+    width: 14em;
+    height: 90px;
+    margin: 0 1em 2em 1em;
+    float: left;
+    padding: 1px;
+    border: 2px solid #c3d9ff;
+    border-radius: 6px;
+  }
+
+div.projecttile:hover {
+    background: #f1f1f1;
+}
+
+
+.hide_col_0 .col_0, .hide_col_1 .col_1, .hide_col_2 .col_2, .hide_col_3 .col_3,
+.hide_col_4 .col_4, .hide_col_5 .col_5, .hide_col_6 .col_6,
+.hide_col_7 .col_7, .hide_col_8 .col_8, .hide_col_9 .col_9,
+.hide_col_10 .col_10, .hide_col_11 .col_11, .hide_col_12 .col_12,
+.hide_col_13 .col_13, .hide_col_14 .col_14, .hide_col_15 .col_15,
+.hide_col_16 .col_16, .hide_col_17 .col_17, .hide_col_18 .col_18,
+.hide_col_19 .col_19, .hide_col_20 .col_20 { display: none; }
+
+.hide_col_0 .popup span.col_0, .hide_col_1 .popup span.col_1,
+.hide_col_2 .popup span.col_2, .hide_col_3 .popup span.col_3,
+.hide_col_4 .popup span.col_4, .hide_col_4 .popup span.col_4,
+.hide_col_5 .popup span.col_5, .hide_col_6 .popup span.col_6,
+.hide_col_7 .popup span.col_7, .hide_col_8 .popup span.col_8,
+.hide_col_9 .popup span.col_9, .hide_col_10 .popup span.col_10,
+.hide_col_11 .popup span.col_11, .hide_col_12 .popup span.col_12,
+.hide_col_13 .popup span.col_13, .hide_col_14 .popup span.col_14,
+.hide_col_14 .popup span.col_14, .hide_col_15 .popup span.col_15,
+.hide_col_16 .popup span.col_16, .hide_col_17 .popup span.col_17,
+.hide_col_18 .popup span.col_18, .hide_col_19 .popup span.col_19,
+.hide_col_20 .popup span.col_20 { display: inline; color: var(--chops-white); }
+
+.hide_col_0 .popup tr:hover span.col_0,
+.hide_col_1 .popup tr:hover span.col_1,
+.hide_col_2 .popup tr:hover span.col_2,
+.hide_col_3 .popup tr:hover span.col_3,
+.hide_col_4 .popup tr:hover span.col_4,
+.hide_col_5 .popup tr:hover span.col_5,
+.hide_col_6 .popup tr:hover span.col_6,
+.hide_col_7 .popup tr:hover span.col_7,
+.hide_col_8 .popup tr:hover span.col_8,
+.hide_col_9 .popup tr:hover span.col_9,
+.hide_col_10 .popup tr:hover span.col_10,
+.hide_col_11 .popup tr:hover span.col_11,
+.hide_col_12 .popup tr:hover span.col_12,
+.hide_col_13 .popup tr:hover span.col_13,
+.hide_col_14 .popup tr:hover span.col_14,
+.hide_col_15 .popup tr:hover span.col_15,
+.hide_col_16 .popup tr:hover span.col_16,
+.hide_col_17 .popup tr:hover span.col_17,
+.hide_col_18 .popup tr:hover span.col_18,
+.hide_col_19 .popup tr:hover span.col_19,
+.hide_col_20 .popup tr:hover span.col_20 { color: var(--chops-white); }
+
+
+.table_title {
+   font-weight: bold;
+}
+
+.contentarea {
+  position: relative;
+  margin-bottom: 1em;
+}
+
+#resultstable td {
+    padding-right: 1em;
+}
+
+.labels a:link { color: #080; }
+.labels a:visited { color: #080; }
+.labels a:active { color: #f00; }
+.name { margin-top: 2ex; font-size: 120%; }
+
+.results tr td a.directlink { visibility: hidden; }
+.results tr:hover td a.directlink {
+  visibility: visible;
+  color: grey;
+}
+
+.results .id { text-align: right; }
+#resultstable .id { text-align: right; }
+#projecttable .id { text-align: left; }
+#starredtable .id { text-align: left; }
+#archivedtable .id { text-align: left; }
+#usergrouptable .id { text-align: left; }
diff --git a/static/css/ph_mobile.css b/static/css/ph_mobile.css
new file mode 100644
index 0000000..82c1ada
--- /dev/null
+++ b/static/css/ph_mobile.css
@@ -0,0 +1,141 @@
+/* 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
+ */
+
+@media (max-width: 425px) {
+
+  body {
+    min-width: 0; /* get rid of hardcoded width */
+  }
+
+
+  /* Top navigation bar */
+
+  #monobar .toptabs {
+    display: none; /* hide most of the options to save some space */
+  }
+
+  #userbar {
+    padding: 5px;
+  }
+
+  #userbar > span {
+    display: inline-flex;
+    flex-wrap: wrap;
+  }
+
+
+  /* Search toolbar */
+
+  .subt {
+    padding: 5px;
+  }
+
+  .subt .inIssueEntry, .subt .inIssueList {
+    display: block;
+    margin: 10px 0 !important;
+  }
+
+  .subt label[for="searchq"], .subt label[for="can"], #can {
+    display: none; /* hide some labels and search scope helper field to save some space */
+  }
+
+
+  /* Main content */
+
+  #maincol > div > form > table > tbody > tr {
+    display: flex;
+    flex-direction: column;
+  }
+
+  #maincol > div > form > table > tbody > tr > td {
+    display: block;
+  }
+
+  #maincol table.rowmajor {
+    display: flex;
+    flex-direction: column;
+    width: auto; /* get rid of hardcoded width */
+    max-width: 100%;
+  }
+
+  #maincol table.rowmajor tbody {
+    flex-grow: 1;
+  }
+
+  #maincol table.rowmajor tr {
+    display: flex;
+    flex-direction: column;
+  }
+
+  #maincol table.rowmajor tr > th {
+    text-align: left;
+  }
+
+  #maincol table.rowmajor tr > td {
+    display: block;
+    width: 90%;
+  }
+
+  #maincol input[type="button"],
+  #maincol input[type="submit"],
+  #maincol select,
+  #maincol textarea {
+    font-size: 100%;
+    width: 100%;
+    margin-bottom: 16px;
+  }
+
+  #maincol input[type="button"],
+  #maincol input[type="submit"] {
+    padding: 10px;
+  }
+
+  #maincol .labelediting input {
+    max-width: 19%;
+  }
+
+  #maincol div.tip {
+    display: none;
+  }
+
+  #maincol .enum_checkbox {
+    width: 31%;
+    padding: 3px;
+  }
+
+
+  /* Others */
+
+  #footer {
+    display: flex;
+    margin: 0 5px 5px 5px ;
+    text-align: left;
+  }
+
+  #attachprompt {
+    display: block;
+    padding: 10px 0;
+  }
+
+  input[type="button"],
+  input[type="submit"],
+  a.buttonify { /* make all types of buttons easier to click */
+    padding: 5px;
+  }
+
+  table#meta-container,
+  table#meta-container > tbody > tr,
+  table#meta-container > tbody > tr> td {
+    display: block;
+    width: 100%;
+  }
+
+  #blocked-table {
+    width: 90%;
+  }
+
+}
diff --git a/static/css/prettify.css b/static/css/prettify.css
new file mode 100644
index 0000000..d44b3a2
--- /dev/null
+++ b/static/css/prettify.css
@@ -0,0 +1 @@
+.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
\ No newline at end of file
diff --git a/static/images/button-bg.gif b/static/images/button-bg.gif
new file mode 100644
index 0000000..cd2d728
--- /dev/null
+++ b/static/images/button-bg.gif
Binary files differ
diff --git a/static/images/chromium.svg b/static/images/chromium.svg
new file mode 100644
index 0000000..7ed1fb8
--- /dev/null
+++ b/static/images/chromium.svg
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   version="1.1"
+   width="256"
+   height="256"
+   id="svg3039"
+   inkscape:version="0.47 r22583"
+   sodipodi:docname="Chromium_11_Logo.svg">
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="1280"
+     inkscape:window-height="750"
+     id="namedview6"
+     showgrid="false"
+     inkscape:zoom="1.4142136"
+     inkscape:cx="372.87473"
+     inkscape:cy="103.791"
+     inkscape:window-x="-8"
+     inkscape:window-y="-8"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="svg3039" />
+  <metadata
+     id="metadata3045">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs3043">
+    <linearGradient
+       id="linearGradient3803">
+      <stop
+         style="stop-color:#d7def0;stop-opacity:1;"
+         offset="0"
+         id="stop3805" />
+      <stop
+         id="stop3811"
+         offset="0.5"
+         style="stop-color:#ffffff;stop-opacity:1" />
+      <stop
+         style="stop-color:#d5def0;stop-opacity:1"
+         offset="1"
+         id="stop3807" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3776"
+       inkscape:collect="always">
+      <stop
+         id="stop3778"
+         offset="0"
+         style="stop-color:#b2cde9;stop-opacity:1" />
+      <stop
+         id="stop3780"
+         offset="1"
+         style="stop-color:#c4dbee;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3750">
+      <stop
+         id="stop3752"
+         offset="0"
+         style="stop-color:#d0e2f1;stop-opacity:1" />
+      <stop
+         style="stop-color:#cadef0;stop-opacity:1"
+         offset="0.85580856"
+         id="stop3756" />
+      <stop
+         id="stop3754"
+         offset="1"
+         style="stop-color:#95bee3;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3708">
+      <stop
+         style="stop-color:#658db6;stop-opacity:1"
+         offset="0"
+         id="stop3710" />
+      <stop
+         id="stop3716"
+         offset="0.76777935"
+         style="stop-color:#527fab;stop-opacity:1;" />
+      <stop
+         style="stop-color:#4071a0;stop-opacity:1"
+         offset="1"
+         id="stop3712" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3698">
+      <stop
+         style="stop-color:#96d0e1;stop-opacity:1"
+         offset="0"
+         id="stop3700" />
+      <stop
+         id="stop3706"
+         offset="0.67819428"
+         style="stop-color:#89b7e1;stop-opacity:1" />
+      <stop
+         style="stop-color:#699dd3;stop-opacity:1"
+         offset="1"
+         id="stop3702" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3647">
+      <stop
+         style="stop-color:#3b79bc;stop-opacity:1;"
+         offset="0"
+         id="stop3649" />
+      <stop
+         style="stop-color:#94b8e0;stop-opacity:1"
+         offset="1"
+         id="stop3651" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3588">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0"
+         id="stop3590" />
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="1"
+         id="stop3592" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3588"
+       id="radialGradient3594"
+       cx="-118.77966"
+       cy="121.49152"
+       fx="-118.77966"
+       fy="121.49152"
+       r="25.491526"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.02177942,-0.95743591,0.97872327,0.02221687,-235.0993,5.0684454)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3647"
+       id="linearGradient3653"
+       x1="-397.81323"
+       y1="149.18764"
+       x2="-397.55933"
+       y2="51.355946"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3698"
+       id="radialGradient3704"
+       cx="-383.2746"
+       cy="217.91029"
+       fx="-383.2746"
+       fy="217.91029"
+       r="59.401995"
+       gradientTransform="matrix(-1.2861568,-0.08596317,0.11453678,-1.7136762,-425.01982,469.50099)"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3708"
+       id="radialGradient3714"
+       cx="-123.5"
+       cy="-11.570732"
+       fx="-123.5"
+       fy="-11.570732"
+       r="95.627118"
+       gradientTransform="matrix(-0.00756512,0.55751399,-1.0314585,-0.01398286,113.23967,103.212)"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3750"
+       id="radialGradient3748"
+       cx="-94.87291"
+       cy="165.27281"
+       fx="-94.87291"
+       fy="165.27281"
+       r="60.481357"
+       gradientTransform="matrix(0.81293878,1.6998003,-2.1519091,1.0291615,564.39485,118.47915)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3776"
+       id="linearGradient3774"
+       x1="162.07127"
+       y1="85.239708"
+       x2="220.76114"
+       y2="78.875748"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(3.3917128,7.418629)" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3803"
+       id="linearGradient3809"
+       x1="-382.04123"
+       y1="37.280548"
+       x2="-381.39438"
+       y2="165.56691"
+       gradientUnits="userSpaceOnUse" />
+  </defs>
+  <path
+     sodipodi:type="arc"
+     style="fill:url(#radialGradient3594);fill-opacity:1;fill-rule:nonzero;stroke:none"
+     id="path2814"
+     sodipodi:cx="-118.23729"
+     sodipodi:cy="122.57627"
+     sodipodi:rx="25.491526"
+     sodipodi:ry="25.491526"
+     d="m -92.745764,122.57627 a 25.491526,25.491526 0 1 1 -50.983056,0 25.491526,25.491526 0 1 1 50.983056,0 z"
+     transform="matrix(4.680851,0,0,4.7978723,685.10478,-449.69946)" />
+  <path
+     style="fill:url(#linearGradient3774);fill-opacity:1;fill-rule:nonzero;stroke:none"
+     d="m 232.17258,88.120422 c 0,15.673918 -19.79135,34.931518 -45.84395,34.931518 -26.0526,0 -59.92241,-16.08123 -59.92241,-31.755152 0,-15.673924 21.11981,-28.38015 47.17241,-28.38015 19.90254,0 46.36122,18.293224 56.45971,20.3521 0.79179,1.710571 1.36862,2.925087 2.13424,4.851684 z"
+     id="path3655"
+     sodipodi:nodetypes="cssscc" />
+  <path
+     style="fill:#2e5c91;fill-opacity:1;fill-rule:nonzero;stroke:none"
+     d="m 38.822019,65.971523 c 12.38148,-9.610993 35.314514,-1.245318 51.289554,19.334679 15.975027,20.579998 17.694937,51.065068 5.31349,60.676058 -12.38147,9.61099 -34.17571,-5.29155 -50.15074,-25.87156 -12.20392,-15.72181 -4.05062,-41.19089 -8.61646,-50.430553 0.61589,-1.122052 1.381696,-2.456607 2.164156,-3.708624 z"
+     id="path3655-4-8"
+     sodipodi:nodetypes="cssscc" />
+  <path
+     style="fill:url(#radialGradient3714);fill-opacity:1;fill-rule:nonzero;stroke:none"
+     d="m 230.04347,83.261765 c -7.0081,-0.03265 -61.07025,0.289575 -107.66568,0.0654 -17.371,5.108098 -31.704627,13.258827 -39.181777,29.154945 -5.33639,-4.54237 -40.74576,-42.215609 -44.40678,-46.440684 31.38983,-41.648805 74.528017,-45.559321 82.915257,-45.559321 8.38724,0 70.64407,-8.631855 108.33898,62.77966 z"
+     id="path3596"
+     sodipodi:nodetypes="ccccsc" />
+  <path
+     style="fill:#699dd3;fill-opacity:1;fill-rule:nonzero;stroke:none"
+     d="m 117.12454,243.96815 c -12.49835,-9.45851 -14.5752,-36.93927 1.14635,-57.71356 15.72155,-20.77428 41.03582,-34.94753 53.53417,-25.48904 12.49834,9.4585 7.44792,38.96701 -8.27364,59.74129 -12.01027,15.87024 -35.4911,16.88498 -43.22681,23.69505 -1.23894,-0.0455 -1.95523,-0.0605 -3.18007,-0.23374 z"
+     id="path3655-4"
+     sodipodi:nodetypes="cssscc" />
+  <path
+     style="fill:url(#radialGradient3748);fill-opacity:1;fill-rule:nonzero;stroke:none"
+     d="m 120.3032,244.20103 c 3.58354,-6.02268 28.85859,-52.8991 52.69131,-92.9389 4.41104,-17.56095 5.34663,-33.64185 -4.5584,-48.14993 6.62173,-2.29412 58.23852,-13.976353 63.73684,-14.987686 19.9656,48.180076 1.44992,87.338276 -2.80522,94.565966 -4.25515,7.22768 -28.40179,65.25666 -109.06453,61.51055 z"
+     id="path3596-1"
+     sodipodi:nodetypes="ccccsc" />
+  <path
+     style="fill:url(#radialGradient3704);fill-opacity:1;fill-rule:nonzero;stroke:none"
+     d="m 36.696853,69.642524 c 3.46858,6.089612 30.72312,52.780196 53.77852,93.272576 13.094367,12.50527 27.684997,19.48512 45.191737,18.03328 -1.2738,6.89113 -16.62898,57.75037 -18.4638,63.03126 -51.756237,-6.42158 -76.669777,-41.85476 -80.854757,-49.1233 -4.18497,-7.26855 -42.7297502,-56.91452 0.3483,-125.213816 z"
+     id="path3596-1-7"
+     sodipodi:nodetypes="ccccsc" />
+  <path
+     transform="matrix(0.77294737,0,0,0.77619098,435.90647,53.275706)"
+     style="fill:url(#linearGradient3653);fill-opacity:1;stroke:url(#linearGradient3809);stroke-width:10.07013607;stroke-miterlimit:4;stroke-opacity:1"
+     d="m -338.44068,101.42373 c 0,32.65032 -26.46832,59.11864 -59.11865,59.11864 -32.65032,0 -59.11864,-26.46832 -59.11864,-59.11864 0,-32.650327 26.46832,-59.118646 59.11864,-59.118646 32.65033,0 59.11865,26.468319 59.11865,59.118646 z"
+     id="path3645" />
+  <path
+     style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+     d="m 163.54619,108.89582 c 18.52979,17.09836 16.03302,29.55794 10.0625,44 -3.10892,-22.25001 -2.34478,-32.42697 -10.0625,-44 z"
+     id="rect3782"
+     sodipodi:nodetypes="ccc" />
+  <path
+     style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
+     d="m 101.42092,173.63924 c -22.645593,-14.47335 -29.809884,-45.71983 -8.813354,-62.99032 -10.847561,19.77514 -6.225429,32.39863 8.813354,62.99032 z"
+     id="rect3782-4"
+     sodipodi:nodetypes="ccc" />
+</svg>
diff --git a/static/images/favicon.ico b/static/images/favicon.ico
new file mode 100644
index 0000000..4597d7f
--- /dev/null
+++ b/static/images/favicon.ico
Binary files differ
diff --git a/static/images/lock.png b/static/images/lock.png
new file mode 100644
index 0000000..916f2b0
--- /dev/null
+++ b/static/images/lock.png
Binary files differ
diff --git a/static/images/minus.gif b/static/images/minus.gif
new file mode 100644
index 0000000..5595adf
--- /dev/null
+++ b/static/images/minus.gif
Binary files differ
diff --git a/static/images/monorail.ico b/static/images/monorail.ico
new file mode 100644
index 0000000..4597d7f
--- /dev/null
+++ b/static/images/monorail.ico
Binary files differ
diff --git a/static/images/pagination-first.png b/static/images/pagination-first.png
new file mode 100644
index 0000000..4ee7f31
--- /dev/null
+++ b/static/images/pagination-first.png
Binary files differ
diff --git a/static/images/pagination-last.png b/static/images/pagination-last.png
new file mode 100644
index 0000000..0dea95d
--- /dev/null
+++ b/static/images/pagination-last.png
Binary files differ
diff --git a/static/images/pagination-next.png b/static/images/pagination-next.png
new file mode 100644
index 0000000..8c8f937
--- /dev/null
+++ b/static/images/pagination-next.png
Binary files differ
diff --git a/static/images/pagination-prev.png b/static/images/pagination-prev.png
new file mode 100644
index 0000000..ac97b8a
--- /dev/null
+++ b/static/images/pagination-prev.png
Binary files differ
diff --git a/static/images/paperclip.png b/static/images/paperclip.png
new file mode 100644
index 0000000..34464c2
--- /dev/null
+++ b/static/images/paperclip.png
Binary files differ
diff --git a/static/images/plus.gif b/static/images/plus.gif
new file mode 100644
index 0000000..116ce91
--- /dev/null
+++ b/static/images/plus.gif
Binary files differ
diff --git a/static/images/show-arrow.gif b/static/images/show-arrow.gif
new file mode 100644
index 0000000..7864453
--- /dev/null
+++ b/static/images/show-arrow.gif
Binary files differ
diff --git a/static/images/spin_16.gif b/static/images/spin_16.gif
new file mode 100644
index 0000000..73a6a86
--- /dev/null
+++ b/static/images/spin_16.gif
Binary files differ
diff --git a/static/images/tearoff_icon.gif b/static/images/tearoff_icon.gif
new file mode 100644
index 0000000..c23734e
--- /dev/null
+++ b/static/images/tearoff_icon.gif
Binary files differ
diff --git a/static/js/framework/clientmon.js b/static/js/framework/clientmon.js
new file mode 100644
index 0000000..aa6dc0a
--- /dev/null
+++ b/static/js/framework/clientmon.js
@@ -0,0 +1,51 @@
+/* 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
+ */
+
+(function(window) {
+  'use strict';
+
+  // This code sets up a reporting mechanism for uncaught javascript errors
+  // to the server. It reports at most every THRESHOLD_MS milliseconds and
+  // each report contains error signatures with counts.
+
+  let errBuff = {};
+  let THRESHOLD_MS = 2000;
+
+  function throttle(fn) {
+    let last, timer;
+    return function() {
+      let now = Date.now();
+      if (last && now < last + THRESHOLD_MS) {
+        clearTimeout(timer);
+        timer = setTimeout(function() {
+          last = now;
+          fn.apply();
+        }, THRESHOLD_MS + last - now);
+      } else {
+        last = now;
+        fn.apply();
+      }
+    };
+  }
+  let flushErrs = throttle(function() {
+    let data = {errors: JSON.stringify(errBuff)};
+    CS_doPost('/_/clientmon.do', null, data);
+    errBuff = {};
+  });
+
+  window.addEventListener('error', function(evt) {
+    let signature = evt.message;
+    if (evt.error instanceof Error) {
+      signature += '\n' + evt.error.stack;
+    }
+    if (!errBuff[signature]) {
+      errBuff[signature] = 0;
+    }
+    errBuff[signature] += 1;
+    flushErrs();
+  });
+})(window);
diff --git a/static/js/framework/env.js b/static/js/framework/env.js
new file mode 100644
index 0000000..baf19cb
--- /dev/null
+++ b/static/js/framework/env.js
@@ -0,0 +1,73 @@
+/* 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
+ */
+
+/**
+ * @fileoverview Defines the type of the CS_env Javascript object
+ * provided by the Codesite server.
+ *
+ * This is marked as an externs file so that any variable defined with a
+ * CS.env type will not have its properties renamed.
+ * @externs
+ */
+
+/** Codesite namespace object. */
+var CS = {};
+
+/**
+ * Javascript object holding basic information about the current page.
+ * This is defined as an interface so that we can use CS.env as a Closure
+ * type name, but it will never be implemented; rather, it will be
+ * made available on every page as the global object CS_env (see
+ * codesite/templates/demetrius/header.ezt).
+ *
+ * The type of the CS_env global object will actually be one of
+ * CS.env, CS.project_env, etc. depending on the page
+ * rendered by the server.
+ *
+ * @interface
+ */
+CS.env = function() {};
+
+/**
+ * Like relativeBaseUrl, but a full URL preceded by http://code.google.com
+ * @type {string}
+ */
+CS.env.prototype.absoluteBaseUrl;
+
+/**
+ * Path to versioned static assets (mostly js and css).
+ * @type {string}
+ */
+CS.env.prototype.appVersion;
+
+/**
+ * Request token for the logged-in user, or null for the anonymous user.
+ * @type {?string}
+ */
+CS.env.prototype.token;
+
+/**
+ * Email address of the logged-in user, or null for anon.
+ * @type {?string}
+ */
+CS.env.prototype.loggedInUserEmail;
+
+/**
+ * Url to the logged-in user's profile, or null for anon.
+ * @type {?string}
+ */
+CS.env.prototype.profileUrl;
+
+/**
+ * CS.env specialization for browsing project pages.
+ * @interface
+ * @extends {CS.env}
+ */
+CS.project_env = function() {};
+
+/** @type {string} */
+CS.project_env.prototype.projectName;
diff --git a/static/js/framework/externs.js b/static/js/framework/externs.js
new file mode 100644
index 0000000..a0375a1
--- /dev/null
+++ b/static/js/framework/externs.js
@@ -0,0 +1,25 @@
+/* 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
+ */
+
+/** @type {CS.env} */
+var CS_env;
+
+// Exported functions must be mentioned in this externs file so that JSCompiler
+// will allow exporting functions by writing '_hideID = CS_hideID'.
+var _hideID;
+var _showID;
+var _hideEl;
+var _showEl;
+var _showInstead;
+var _toggleHidden;
+var _toggleCollapse;
+var _CS_dismissCue;
+var _CS_updateProjects;
+var _CP_checkProjectName;
+var _TKR_toggleStar;
+var _TKR_toggleStarLocal;
+var _TKR_syncStarIcons;
diff --git a/static/js/framework/framework-ajax.js b/static/js/framework/framework-ajax.js
new file mode 100644
index 0000000..038c4c3
--- /dev/null
+++ b/static/js/framework/framework-ajax.js
@@ -0,0 +1,153 @@
+/* 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
+ */
+
+
+/**
+ * @fileoverview AJAX-related helper functions.
+ */
+
+
+var DEBOUNCE_THRESH_MS = 2000;
+
+
+/**
+ * Simple debouncer to handle text input.  Don't try to hit the server
+ * until the user has stopped typing for a few seconds.  E.g.,
+ * var debouncedKeyHandler = debounce(keyHandler);
+ * el.addEventListener('keyup', debouncedKeyHandler);
+ */
+function debounce(func, opt_threshold_ms) {
+  let timeout;
+  return function() {
+    let context = this, args = arguments;
+    let later = function() {
+      timeout = null;
+      func.apply(context, args);
+    };
+    clearTimeout(timeout);
+    timeout = setTimeout(later, opt_threshold_ms || DEBOUNCE_THRESH_MS);
+  };
+}
+
+
+/**
+ * Builds a POST string from a parameter dictionary.
+ * @param {Array|Object} args: parameters to encode. Either an object
+ *   mapping names to values or an Array of doubles containing [key, value].
+ * @return {string} encoded POST data.
+ */
+function CS_postData(args) {
+  let params = [];
+
+  if (args instanceof Array) {
+    for (var key in args) {
+      let inputValue = args[key];
+      let name = inputValue[0];
+      let value = inputValue[1];
+      if (value !== undefined) {
+        params.push(name + '=' + encodeURIComponent(String(value)));
+      }
+    }
+  } else {
+    for (var key in args) {
+      params.push(key + '=' + encodeURIComponent(String(args[key])));
+    }
+  }
+
+  params.push('token=' + encodeURIComponent(window.prpcClient.token));
+
+  return params.join('&');
+}
+
+/**
+ * Helper for an extremely common kind of XHR: a POST with an XHRF token
+ * where we silently ignore server or connectivity errors.  If the token
+ * has expired, get a new one and retry the original request with the new
+ * token.
+ * @param {string} url request destination.
+ * @param {function(event)} callback function to be called
+ *   upon successful completion of the request.
+ * @param {Object} args parameters to encode as POST data.
+ */
+function CS_doPost(url, callback, args) {
+  window.prpcClient.ensureTokenIsValid().then(() => {
+    let xh = XH_XmlHttpCreate();
+    XH_XmlHttpPOST(xh, url, CS_postData(args), callback);
+  });
+}
+
+
+/**
+ * Helper function to strip leading junk characters from a JSON response
+ * and then parse it into a JS constant.
+ *
+ * The reason that "}])'\n" is prepended to the response text is that
+ * it makes it impossible for a hacker to hit one of our JSON servlets
+ * via a <script src="..."> tag and do anything with the result.  Even
+ * though a JSON response is just a constant, it could be passed into
+ * hacker code by tricks such as overriding the array constructor.
+ */
+function CS_parseJSON(xhr) {
+  return JSON.parse(xhr.responseText.substr(5));
+}
+
+
+/**
+ * Promise-based version of CS_parseJSON using the fetch API.
+ *
+ * Sends a GET request to a JSON endpoint then strips the XSSI prefix off
+ * of the response before resolving the promise.
+ *
+ * Args:
+ *   url (string): The URL to fetch.
+ * Returns:
+ *   A promise, resolved when the request returns. Also be sure to call
+ *   .catch() on the promise (or wrap in a try/catch if using async/await)
+ *   if you don't want errors to halt script execution.
+ */
+function CS_fetch(url) {
+  return fetch(url, {credentials: 'same-origin'})
+    .then((res) => res.text())
+    .then((rawResponse) => JSON.parse(rawResponse.substr(5)));
+}
+
+
+/**
+ * After we refresh the form token, we need to actually submit the form.
+ * formToSubmit keeps track of which form the user was trying to submit.
+ */
+var formToSubmit = null;
+
+/**
+ * If the form token that was generated when the page was served has
+ * now expired, then request a refreshed token from the server, and
+ * don't submit the form until after it arrives.
+ */
+function refreshTokens(event, formToken, formTokenPath, tokenExpiresSec) {
+  if (!window.prpcClient.constructor.isTokenExpired(tokenExpiresSec)) {
+    return;
+  }
+
+  formToSubmit = event.target;
+  event.preventDefault();
+  const message = {
+    token: formToken,
+    tokenPath: formTokenPath,
+  };
+  const refreshTokenPromise = window.prpcClient.call(
+    'monorail.Sitewide', 'RefreshToken', message);
+
+  refreshTokenPromise.then((freshToken) => {
+    let tokenFields = document.querySelectorAll('input[name=token]');
+    for (let i = 0; i < tokenFields.length; ++i) {
+      tokenFields[i].value = freshToken.token;
+    }
+    if (formToSubmit) {
+      formToSubmit.submit();
+    }
+  });
+}
diff --git a/static/js/framework/framework-ajax_test.js b/static/js/framework/framework-ajax_test.js
new file mode 100644
index 0000000..c5218d3
--- /dev/null
+++ b/static/js/framework/framework-ajax_test.js
@@ -0,0 +1,37 @@
+/* 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
+ */
+
+/**
+ * @fileoverview Tests for framework-ajax.js.
+ */
+
+var CS_env;
+
+function setUp() {
+  CS_env = {'token': 'd34db33f'};
+}
+
+function testPostData() {
+  assertEquals(
+    'token=d34db33f',
+    CS_postData({}));
+  assertEquals(
+    'token=d34db33f',
+    CS_postData({}, true));
+  assertEquals(
+    '',
+    CS_postData({}, false));
+  assertEquals(
+    'a=5&b=foo&token=d34db33f',
+    CS_postData({a: 5, b: 'foo'}));
+
+  let unescaped = {};
+  unescaped['f oo?'] = 'b&ar';
+  assertEquals(
+    'f%20oo%3F=b%26ar',
+    CS_postData(unescaped, false));
+}
diff --git a/static/js/framework/framework-cues.js b/static/js/framework/framework-cues.js
new file mode 100644
index 0000000..2c620a1
--- /dev/null
+++ b/static/js/framework/framework-cues.js
@@ -0,0 +1,38 @@
+/* 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
+ */
+
+/**
+ * @fileoverview Simple functions for dismissible on-page help ("cues").
+ */
+
+/**
+ * Dimisses the cue.  This both updates the DOM and hits the server to
+ * record the fact that the user has dismissed it, so that it won't
+ * be shown again.
+ *
+ * If no security token is present, only the DOM is updated and
+ * nothing is recorded on the server.
+ *
+ * @param {string} cueId The identifier of the cue to hide.
+ * @return {boolean} false to cancel any event.
+ */
+function CS_dismissCue(cueId) {
+  let cueElements = document.querySelectorAll('.cue');
+  for (let i = 0; i < cueElements.length; ++i) {
+    cueElements[i].style.display = 'none';
+  }
+
+  if (CS_env.token) {
+    window.prpcClient.call(
+      'monorail.Users', 'SetUserPrefs',
+      {prefs: [{name: cueId, value: 'true'}]});
+  }
+  return false;
+}
+
+// Exports
+_CS_dismissCue = CS_dismissCue;
diff --git a/static/js/framework/framework-display.js b/static/js/framework/framework-display.js
new file mode 100644
index 0000000..9213e82
--- /dev/null
+++ b/static/js/framework/framework-display.js
@@ -0,0 +1,191 @@
+/* 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
+ */
+
+/**
+ * Functions used by the Project Hosting to control the display of
+ * elements on the page, rollovers, and popup menus.
+ *
+ * Most of these functions are extracted from dit-display.js
+ */
+
+
+/**
+ * Hide the HTML element with the given ID.
+ * @param {string} id The HTML element ID.
+ * @return {boolean} Always returns false to cancel the browser event
+ *     if used as an event handler.
+ */
+function CS_hideID(id) {
+  $(id).style.display = 'none';
+  return false;
+}
+
+
+/**
+ * Show the HTML element with the given ID.
+ * @param {string} id The HTML element ID.
+ * @return {boolean} Always returns false to cancel the browser event
+ *     if used as an event handler.
+ */
+function CS_showID(id) {
+  $(id).style.display = '';
+  return false;
+}
+
+
+/**
+ * Hide the given HTML element.
+ * @param {Element} el The HTML element.
+ * @return {boolean} Always returns false to cancel the browser event
+ *     if used as an event handler.
+ */
+function CS_hideEl(el) {
+  el.style.display = 'none';
+  return false;
+}
+
+
+/**
+ * Show the given HTML element.
+ * @param {Element} el The HTML element.
+ * @return {boolean} Always returns false to cancel the browser event
+ *     if used as an event handler.
+ */
+function CS_showEl(el) {
+  el.style.display = '';
+  return false;
+}
+
+
+/**
+ * Show one element instead of another.  That is to say, show a new element and
+ * hide an old one.  Usually the element is the element that the user clicked
+ * on with the intention of "expanding it" to access the new element.
+ * @param {string} newID The ID of the HTML element to show.
+ * @param {Element} oldEl The HTML element to hide.
+ * @return {boolean} Always returns false to cancel the browser event
+ *     if used as an event handler.
+ */
+function CS_showInstead(newID, oldEl) {
+  $(newID).style.display = '';
+  oldEl.style.display = 'none';
+  return false;
+}
+
+/**
+ * Toggle the open/closed state of a section of the page.  As a result, CSS
+ * rules will make certain elements displayed and other elements hidden.  The
+ * section is some HTML element that encloses the element that the user clicked
+ * on.
+ * @param {Element} el The element that the user clicked on.
+ * @return {boolean} Always returns false to cancel the browser event
+ *     if used as an event handler.
+ */
+function CS_toggleHidden(el) {
+  while (el) {
+    if (el.classList.contains('closed')) {
+      el.classList.remove('closed');
+      el.classList.add('opened');
+      return false;
+    }
+    if (el.classList.contains('opened')) {
+      el.classList.remove('opened');
+      el.classList.add('closed');
+      return false;
+    }
+    el = el.parentNode;
+  }
+}
+
+
+/**
+ * Toggle the expand/collapse state of a section of the page.  As a result, CSS
+ * rules will make certain elements displayed and other elements hidden.  The
+ * section is some HTML element that encloses the element that the user clicked
+ * on.
+ * TODO(jrobbins): eliminate redundancy with function above.
+ * @param {Element} el The element that the user clicked on.
+ * @return {boolean} Always returns false to cancel the browser event
+ *     if used as an event handler.
+ */
+function CS_toggleCollapse(el) {
+  while (el) {
+    if (el.classList.contains('collapse')) {
+      el.classList.remove('collapse');
+      el.classList.add('expand');
+      return false;
+    }
+    if (el.classList.contains('expand')) {
+      el.classList.remove('expand');
+      el.classList.add('collapse');
+      return false;
+    }
+    el = el.parentNode;
+  }
+}
+
+
+/**
+ * Register a function for mouse clicks on the results table.  We
+ * listen on the table to avoid adding 1000 individual listeners on
+ * the cells.  This is needed because some browsers (now including
+ * Chrome) do not generate click events for mouse buttons other than
+ * the primary mouse button.  Chrome and Firefox generate auxclick
+ * events, but Edge does not.
+ */
+
+function CS_addClickListener(tableEl, handler) {
+  function maybeClick(event) {
+    const target = getTargetFromEvent(event);
+
+    const inLink = target.tagName == 'A' || target.parentNode.tagName == 'A';
+
+    if (inLink && !target.classList.contains('computehref')) {
+      // The <a> elements already have the correct hrefs.
+      return;
+    }
+    if (event.button == 2) {
+      // User is trying to open a context menu, not trying to navigate.
+      return;
+    }
+
+    let td = target;
+    while (td && td.tagName != 'TD' && td.tagName != 'TH') {
+      td = td.parentNode;
+    }
+    if (td.classList.contains('rowwidgets')) {
+      // User clicked on a checkbox.
+      return;
+    }
+    // User clicked on an issue ID link or text or cell.
+    event.preventDefault();
+    handler(event);
+  }
+  tableEl.addEventListener('click', maybeClick);
+  tableEl.addEventListener('auxclick', maybeClick);
+}
+
+function getTargetFromEvent(event) {
+  let target = event.target || event.srcElement;
+  if (target.shadowRoot) {
+  // Find the element within the shadowDOM.
+    const path = event.path || event.composedPath();
+    target = path[0];
+  }
+  return target;
+}
+
+
+// Exports
+_hideID = CS_hideID;
+_showID = CS_showID;
+_hideEl = CS_hideEl;
+_showEl = CS_showEl;
+_showInstead = CS_showInstead;
+_toggleHidden = CS_toggleHidden;
+_toggleCollapse = CS_toggleCollapse;
+_addClickListener = CS_addClickListener;
diff --git a/static/js/framework/framework-menu.js b/static/js/framework/framework-menu.js
new file mode 100644
index 0000000..35bbebc
--- /dev/null
+++ b/static/js/framework/framework-menu.js
@@ -0,0 +1,566 @@
+/* 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
+ */
+
+/**
+ * @fileoverview This file represents a standalone, reusable drop down menu
+ * widget that can be attached to any element on a given page. It supports
+ * multiple instances of the widget on a page. It has no dependencies. Usage
+ * is as simple as creating a new Menu object and supplying it with a target
+ * element.
+ */
+
+/**
+ * The entry point and constructor for the Menu object. Creating
+ * a valid instance of this object will insert a drop down menu
+ * near the element supplied as the target, attach all the necessary
+ * events and insert the necessary elements on the page.
+ *
+ * @param {Element} target the target element on the page to which
+ *     the drop down menu will be placed near.
+ * @param {Function=} opt_onShow function to execute every time the
+ *     menu is made visible, most likely through a click on the target.
+ * @constructor
+ */
+var Menu = function(target, opt_onShow) {
+  this.iid = Menu.instance.length;
+  Menu.instance[this.iid] = this;
+  this.target = target;
+  this.onShow = opt_onShow || null;
+
+  // An optional trigger element on the page that can be used to trigger
+  // the drop-down. Currently hard-coded to be the same as the target element.
+  this.trigger = target;
+  this.items = [];
+  this.onOpenEvents = [];
+  this.menu = this.createElement('div', 'menuDiv instance' + this.iid);
+  this.targetId = this.target.getAttribute('id');
+  let menuId = (this.targetId != null) ?
+    'menuDiv-' + this.targetId : 'menuDiv-instance' + this.iid;
+  this.menu.setAttribute('id', menuId);
+  this.menu.role = 'listbox';
+  this.hide();
+  this.addCategory('default');
+  this.addEvent(this.trigger, 'click', this.toggle.bind(this));
+  this.addEvent(window, 'resize', this.adjustSizeAndLocation.bind(this));
+
+  // Hide the menu if a user clicks outside the menu widget
+  this.addEvent(document, 'click', this.hide.bind(this));
+  this.addEvent(this.menu, 'click', this.stopPropagation());
+  this.addEvent(this.trigger, 'click', this.stopPropagation());
+};
+
+// A reference to the element or node that the drop down
+// will appear next to
+Menu.prototype.target = null;
+
+// Element ID of the target. ID will be assigned to the newly created
+// menu div based on the target ID. A default ID will be
+// assigned If there is no ID on the target.
+Menu.prototype.targetId = null;
+
+/**
+ * A reference to the element or node that will trigger
+ * the drop down to appear. If not specified, this value
+ * will be the same as <Menu Instance>.target
+ * @type {Element}
+ */
+Menu.prototype.trigger = null;
+
+// A reference to the event type that will "open" the
+// menu div. By default this is the (on)click method.
+Menu.prototype.triggerType = null;
+
+// A reference to the element that will appear when the
+// trigger is clicked.
+Menu.prototype.menu = null;
+
+/**
+ * Function to execute every time the menu is made shown.
+ * @type {Function}
+ */
+Menu.prototype.onShow = null;
+
+// A list of category divs. By default these categories
+// are set to display none until at least one element
+// is placed within them.
+Menu.prototype.categories = null;
+
+// An id used to track timed intervals
+Menu.prototype.thread = -1;
+
+// The static instance id (iid) denoting which menu in the
+// list of Menu.instance items is this instantiated object.
+Menu.prototype.iid = -1;
+
+// A counter to indicate the number of items added with
+// addItem(). After 5 items, a height is set on the menu
+// and a scroll bar will appear.
+Menu.prototype.items = null;
+
+// A flag to detect whether or not a scroll bar has been added
+Menu.prototype.scrolls = false;
+
+// onOpen event handlers; each function in this list will
+// be executed and passed the executing instance as a
+// parameter before the menu is to be displayed.
+Menu.prototype.onOpenEvents = null;
+
+/**
+ * An extended short-cut for document.createElement(); this
+ * method allows the creation of an element, the assignment
+ * of one or more class names and the ability to set the
+ * content of the created element all with one function call.
+ * @param {string} element name of the element to create. Examples would
+ *     be 'div' or 'a'.
+ * @param {string} opt_className an optional string to assign to the
+ *     newly created element's className property.
+ * @param {string|Element} opt_content either a snippet of HTML or a HTML
+ *     element that is to be appended to the newly created element.
+ * @return {Element} a reference to the newly created element.
+ */
+Menu.prototype.createElement = function(element, opt_className, opt_content) {
+  let div = document.createElement(element);
+  div.className = opt_className;
+  if (opt_content) {
+    this.append(opt_content, div);
+  }
+  return div;
+};
+
+/**
+ * Uses a fairly browser agnostic approach to applying a callback to
+ * an element on the page.
+ *
+ * @param {Element|EventTarget} element a reference to an element on the page to
+ *     which to attach and event.
+ * @param {string} eventType a browser compatible event type as a string
+ *     without the sometimes assumed on- prefix. Examples: 'click',
+ *     'mousedown', 'mouseover', etc...
+ * @param {Function} callback a function reference to invoke when the
+ *     the event occurs.
+ */
+Menu.prototype.addEvent = function(element, eventType, callback) {
+  if (element.addEventListener) {
+    element.addEventListener(eventType, callback, false);
+  } else {
+    try {
+      element.attachEvent('on' + eventType, callback);
+    } catch (e) {
+      element['on' + eventType] = callback;
+    }
+  }
+};
+
+/**
+ * Similar to addEvent, this provides a specialied handler for onOpen
+ * events that apply to this instance of the Menu class. The supplied
+ * callbacks are appended to an internal array and called in order
+ * every time the menu is opened. The array can be accessed via
+ * menuInstance.onOpenEvents.
+ */
+Menu.prototype.addOnOpen = function(eventCallback) {
+  let eventIndex = this.onOpenEvents.length;
+  this.onOpenEvents.push(eventCallback);
+  return eventIndex;
+};
+
+/**
+ * This method will create a div with the classes .menuCategory and the
+ * name of the category as supplied in the first parameter. It then, if
+ * a title is supplied, creates a title div and appends it as well. The
+ * optional title is styled with the .categoryTitle and category name
+ * class.
+ *
+ * Categories are stored within the menu object instance for programmatic
+ * manipulation in the array, menuInstance.categories. Note also that this
+ * array is doubly linked insofar as that the category div can be accessed
+ * via it's index in the array as well as by instance.categories[category]
+ * where category is the string name supplied when creating the category.
+ *
+ * @param {string} category the string name used to create the category;
+ *     used as both a class name and a key into the internal array. It
+ *     must be a valid JavaScript variable name.
+ * @param {string|Element} opt_title this optional field is used to visibly
+ *     denote the category title. It can be either HTML or an element.
+ * @return {Element} the newly created div.
+ */
+Menu.prototype.addCategory = function(category, opt_title) {
+  this.categories = this.categories || [];
+  let categoryDiv = this.createElement('div', 'menuCategory ' + category);
+  categoryDiv._categoryName = category;
+  if (opt_title) {
+    let categoryTitle = this.createElement('b', 'categoryTitle ' +
+          category, opt_title);
+    categoryTitle.style.display = 'block';
+    this.append(categoryTitle);
+    categoryDiv._categoryTitle = categoryTitle;
+  }
+  this.append(categoryDiv);
+  this.categories[this.categories.length] = this.categories[category] =
+      categoryDiv;
+
+  return categoryDiv;
+};
+
+/**
+ * This method removes the contents of a given category but does not
+ * remove the category itself.
+ */
+Menu.prototype.emptyCategory = function(category) {
+  if (!this.categories[category]) {
+    return;
+  }
+  let div = this.categories[category];
+  for (let i = div.childNodes.length - 1; i >= 0; i--) {
+    div.removeChild(div.childNodes[i]);
+  }
+};
+
+/**
+ * This function is the most drastic of the cleansing functions; it removes
+ * all categories and all menu items and all HTML snippets that have been
+ * added to this instance of the Menu class.
+ */
+Menu.prototype.clear = function() {
+  for (var i = 0; i < this.categories.length; i++) {
+    // Prevent memory leaks
+    this.categories[this.categories[i]._categoryName] = null;
+  }
+  this.items.splice(0, this.items.length);
+  this.categories.splice(0, this.categories.length);
+  this.categories = [];
+  this.items = [];
+  for (var i = this.menu.childNodes.length - 1; i >= 0; i--) {
+    this.menu.removeChild(this.menu.childNodes[i]);
+  }
+};
+
+/**
+ * Passed an instance of a menu item, it will be removed from the menu
+ * object, including any residual array links and possible memory leaks.
+ * @param {Element} item a reference to the menu item to remove.
+ * @return {Element} returns the item removed.
+ */
+Menu.prototype.removeItem = function(item) {
+  let result = null;
+  for (let i = 0; i < this.items.length; i++) {
+    if (this.items[i] == item) {
+      result = this.items[i];
+      this.items.splice(i, 1);
+    }
+    // Renumber
+    this.items[i].item._index = i;
+  }
+  return result;
+};
+
+/**
+ * Removes a category from the menu element and all of its children thus
+ * allowing the Element to be collected by the browsers VM.
+ * @param {string} category the name of the category to retrieve and remove.
+ */
+Menu.prototype.removeCategory = function(category) {
+  let div = this.categories[category];
+  if (!div || !div.parentNode) {
+    return;
+  }
+  if (div._categoryTitle) {
+    div._categoryTitle.parentNode.removeChild(div._categoryTitle);
+  }
+  div.parentNode.removeChild(div);
+  for (var i = 0; i < this.categories.length; i++) {
+    if (this.categories[i] === div) {
+      this.categories[this.categories[i]._categoryName] = null;
+      this.categories.splice(i, 1);
+      return;
+    }
+  }
+  for (var i = 0; i < div.childNodes.length; i++) {
+    if (div.childNodes[i]._index) {
+      this.items.splice(div.childNodes[i]._index, 1);
+    } else {
+      this.removeItem(div.childNodes[i]);
+    }
+  }
+};
+
+/**
+ * This heart of the menu population scheme, the addItem function creates
+ * a combination of elements that visually form up a menu item. If no
+ * category is supplied, the default category is used. The menu item is
+ * an <a> tag with the class .menuItem. The menu item is directly styled
+ * as a block element. Other than that, all styling should be done via a
+ * external CSS definition.
+ *
+ * @param {string|Element} html_or_element a string of HTML text or a
+ *     HTML element denoting the contents of the menu item.
+ * @param {string} opt_href the href of the menu item link. This is
+ *     the most direct way of defining the menu items function.
+ *     [Default: '#'].
+ * @param {string} opt_category the category string name of the category
+ *     to append the menu item to. If the category doesn't exist, one will
+ *     be created. [Default: 'default'].
+ * @param {string} opt_title used when creating a new category and is
+ *     otherwise ignored completely. It is also ignored when supplied if
+ *     the named category already exists.
+ * @return {Element} returns the element that was created.
+ */
+Menu.prototype.addItem = function(html_or_element, opt_href, opt_category,
+  opt_title) {
+  let category = opt_category ? (this.categories[opt_category] ||
+                                 this.addCategory(opt_category, opt_title)) :
+    this.categories['default'];
+  let menuHref = (opt_href == undefined ? '#' : opt_href);
+  let menuItem = undefined;
+  if (menuHref) {
+    menuItem = this.createElement('a', 'menuItem', html_or_element);
+  } else {
+    menuItem = this.createElement('span', 'menuText', html_or_element);
+  }
+  let itemText = typeof html_or_element == 'string' ? html_or_element :
+    html_or_element.textContent || 'ERROR';
+
+  menuItem.style.display = 'block';
+  if (menuHref) {
+    menuItem.setAttribute('href', menuHref);
+  }
+  menuItem._index = this.items.length;
+  menuItem.role = 'option';
+  this.append(menuItem, category);
+  this.items[this.items.length] = {item: menuItem, text: itemText};
+
+  return menuItem;
+};
+
+/**
+ * Adds a visual HTML separator to the menu, optionally creating a
+ * category as per addItem(). See above.
+ * @param {string} opt_category the category string name of the category
+ *     to append the menu item to. If the category doesn't exist, one will
+ *     be created. [Default: 'default'].
+ * @param {string} opt_title used when creating a new category and is
+ *     otherwise ignored completely. It is also ignored when supplied if
+ *     the named category already exists.
+ */
+Menu.prototype.addSeparator = function(opt_category, opt_title) {
+  let category = opt_category ? (this.categories[opt_category] ||
+                                 this.addCategory(opt_category, opt_title)) :
+    this.categories['default'];
+  let hr = this.createElement('hr', 'menuSeparator');
+  this.append(hr, category);
+};
+
+/**
+ * This method performs all the dirty work of positioning the menu. It is
+ * responsible for dynamic sizing, insertion and deletion of scroll bars
+ * and calculation of offscreen width considerations.
+ */
+Menu.prototype.adjustSizeAndLocation = function() {
+  let style = this.menu.style;
+  style.position = 'absolute';
+
+  let firstCategory = null;
+  for (let i = 0; i < this.categories.length; i++) {
+    this.categories[i].className = this.categories[i].className.
+      replace(/ first/, '');
+    if (this.categories[i].childNodes.length == 0) {
+      this.categories[i].style.display = 'none';
+    } else {
+      this.categories[i].style.display = '';
+      if (!firstCategory) {
+        firstCategory = this.categories[i];
+        firstCategory.className += ' first';
+      }
+    }
+  }
+
+  let alreadyVisible = style.display != 'none' &&
+      style.visibility != 'hidden';
+  let docElemWidth = document.documentElement.clientWidth;
+  let docElemHeight = document.documentElement.clientHeight;
+  let pageSize = {
+    w: (window.innerWidth || docElemWidth && docElemWidth > 0 ?
+      docElemWidth : document.body.clientWidth) || 1,
+    h: (window.innerHeight || docElemHeight && docElemHeight > 0 ?
+      docElemHeight : document.body.clientHeight) || 1,
+  };
+  let targetPos = this.find(this.target);
+  let targetSize = {w: this.target.offsetWidth,
+    h: this.target.offsetHeight};
+  let menuSize = {w: this.menu.offsetWidth, h: this.menu.offsetHeight};
+
+  if (!alreadyVisible) {
+    let oldVisibility = style.visibility;
+    let oldDisplay = style.display;
+    style.visibility = 'hidden';
+    style.display = '';
+    style.height = '';
+    style.width = '';
+    menuSize = {w: this.menu.offsetWidth, h: this.menu.offsetHeight};
+    style.display = oldDisplay;
+    style.visibility = oldVisibility;
+  }
+
+  let addScroll = (this.menu.offsetHeight / pageSize.h) > 0.8;
+  if (addScroll) {
+    menuSize.h = parseInt((pageSize.h * 0.8), 10);
+    style.height = menuSize.h + 'px';
+    style.overflowX = 'hidden';
+    style.overflowY = 'auto';
+  } else {
+    style.height = style.overflowY = style.overflowX = '';
+  }
+
+  style.top = (targetPos.y + targetSize.h) + 'px';
+  style.left = targetPos.x + 'px';
+
+  if (menuSize.w < 175) {
+    style.width = '175px';
+  }
+
+  if (addScroll) {
+    style.width = parseInt(style.width, 10) + 13 + 'px';
+  }
+
+  if ((targetPos.x + menuSize.w) > pageSize.w) {
+    style.left = targetPos.x - (menuSize.w - targetSize.w) + 'px';
+  }
+};
+
+
+/**
+ * This function is used heavily, internally. It appends text
+ * or the supplied element via appendChild(). If
+ * the opt_target variable is present, the supplied element will be
+ * the container rather than the menu div for this instance.
+ *
+ * @param {string|Element} text_or_element the html or element to insert
+ *     into opt_target.
+ * @param {Element} opt_target the target element it should be appended to.
+ *
+ */
+Menu.prototype.append = function(text_or_element, opt_target) {
+  let element = opt_target || this.menu;
+  if (typeof opt_target == 'string' && this.categories[opt_target]) {
+    element = this.categories[opt_target];
+  }
+  if (typeof text_or_element == 'string') {
+    element.textContent += text_or_element;
+  } else {
+    element.appendChild(text_or_element);
+  }
+};
+
+/**
+ * Displays the menu (such as upon mouseover).
+ */
+Menu.prototype.over = function() {
+  if (this.menu.style.display != 'none') {
+    this.show();
+  }
+  if (this.thread != -1) {
+    clearTimeout(this.thread);
+    this.thread = -1;
+  }
+};
+
+/**
+ * Hides the menu (such as upon mouseout).
+ */
+Menu.prototype.out = function() {
+  if (this.thread != -1) {
+    clearTimeout(this.thread);
+    this.thread = -1;
+  }
+  this.thread = setTimeout(this.hide.bind(this), 400);
+};
+
+/**
+ * Stops event propagation.
+ */
+Menu.prototype.stopPropagation = function() {
+  return (function(e) {
+    if (!e) {
+      e = window.event;
+    }
+    e.cancelBubble = true;
+    if (e.stopPropagation) {
+      e.stopPropagation();
+    }
+  });
+};
+
+/**
+ * Toggles the menu between hide/show.
+ */
+Menu.prototype.toggle = function(event) {
+  event.preventDefault();
+  if (this.menu.style.display == 'none') {
+    this.show();
+  } else {
+    this.hide();
+  }
+};
+
+/**
+ * Makes the menu visible, then calls the user-supplied onShow callback.
+ */
+Menu.prototype.show = function() {
+  if (this.menu.style.display != '') {
+    for (var i = 0; i < this.onOpenEvents.length; i++) {
+      this.onOpenEvents[i].call(null, this);
+    }
+
+    // Invisibly show it first
+    this.menu.style.visibility = 'hidden';
+    this.menu.style.display = '';
+    this.adjustSizeAndLocation();
+    if (this.trigger.nodeName && this.trigger.nodeName == 'A') {
+      this.trigger.blur();
+    }
+    this.menu.style.visibility = 'visible';
+
+    // Hide other menus
+    for (var i = 0; i < Menu.instance.length; i++) {
+      let menuInstance = Menu.instance[i];
+      if (menuInstance != this) {
+        menuInstance.hide();
+      }
+    }
+
+    if (this.onShow) {
+      this.onShow();
+    }
+  }
+};
+
+/**
+ * Makes the menu invisible.
+ */
+Menu.prototype.hide = function() {
+  this.menu.style.display = 'none';
+};
+
+Menu.prototype.find = function(element) {
+  let curleft = 0, curtop = 0;
+  if (element.offsetParent) {
+    do {
+      curleft += element.offsetLeft;
+      curtop += element.offsetTop;
+    }
+    while ((element = element.offsetParent) && (element.style &&
+          element.style.position != 'relative' &&
+          element.style.position != 'absolute'));
+  }
+  return {x: curleft, y: curtop};
+};
+
+/**
+ * A static array of object instances for global reference.
+ * @type {Array.<Menu>}
+ */
+Menu.instance = [];
diff --git a/static/js/framework/framework-myhotlists.js b/static/js/framework/framework-myhotlists.js
new file mode 100644
index 0000000..6459090
--- /dev/null
+++ b/static/js/framework/framework-myhotlists.js
@@ -0,0 +1,109 @@
+/* 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
+ */
+
+/**
+ * @fileoverview This file initializes the "My Hotlists" drop down menu in the
+ *     user bar. It utilizes the menu widget defined in framework-menu.js.
+ */
+
+/** @type {Menu} */
+var myhotlists;
+
+(function() {
+  var target = document.getElementById('hotlists-dropdown');
+
+  if (!target) {
+    return;
+  }
+
+  myhotlists = new Menu(target, function() {});
+
+  myhotlists.addEvent(window, 'load', CS_updateHotlists);
+  myhotlists.addOnOpen(CS_updateHotlists);
+  myhotlists.addEvent(window, 'load', function() {
+    document.body.appendChild(myhotlists.menu);
+  });
+})();
+
+
+/**
+ * Grabs the list of logged in user's hotlists to populate the "My Hotlists"
+ * drop down menu.
+ */
+async function CS_updateHotlists() {
+  if (!myhotlists) return;
+
+  if (!window.CS_env.loggedInUserEmail) {
+    myhotlists.clear();
+    myhotlists.addItem('sign in to see your hotlists',
+                       window.CS_env.login_url,
+                       'controls');
+    return;
+  }
+
+  const ownedHotlistsMessage = {
+    user: {
+      display_name: window.CS_env.loggedInUserEmail,
+    }};
+
+  const responses = await Promise.all([
+    window.prpcClient.call(
+      'monorail.Features', 'ListHotlistsByUser', ownedHotlistsMessage),
+    window.prpcClient.call(
+      'monorail.Features', 'ListStarredHotlists', {}),
+    window.prpcClient.call(
+      'monorail.Features', 'ListRecentlyVisitedHotlists', {}),
+  ]);
+  const ownedHotlists = responses[0];
+  const starredHotlists = responses[1];
+  const visitedHotlists = responses[2];
+
+  myhotlists.clear();
+
+  const sortByName = (hotlist1, hotlist2) => {
+    hotlist1.name.localeCompare(hotlist2.name);
+  };
+
+  if (ownedHotlists.hotlists) {
+    ownedHotlists.hotlists.sort(sortByName);
+    ownedHotlists.hotlists.forEach(hotlist => {
+      const name = hotlist.name;
+      const userId = hotlist.ownerRef.userId;
+      const url = `/u/${userId}/hotlists/${name}`;
+      myhotlists.addItem(name, url, 'hotlists', 'Hotlists');
+    });
+  }
+
+  if (starredHotlists.hotlists) {
+    myhotlists.addSeparator();
+    starredHotlists.hotlists.sort(sortByName);
+    starredHotlists.hotlists.forEach(hotlist => {
+      const name = hotlist.name;
+      const userId = hotlist.ownerRef.userId;
+      const url = `/u/${userId}/hotlists/${name}`;
+      myhotlists.addItem(name, url, 'starred_hotlists', 'Starred Hotlists');
+    });
+  }
+
+  if (visitedHotlists.hotlists) {
+    myhotlists.addSeparator();
+    visitedHotlists.hotlists.sort(sortByName);
+    visitedHotlists.hotlists.forEach(hotlist => {
+      const name = hotlist.name;
+      const userId = hotlist.ownerRef.userId;
+      const url = `/u/${userId}/hotlists/${name}`;
+      myhotlists.addItem(
+          name, url, 'visited_hotlists', 'Recently Visited Hotlists');
+    });
+  }
+
+  myhotlists.addSeparator();
+  myhotlists.addItem(
+      'All hotlists', `/u/${window.CS_env.loggedInUserEmail}/hotlists`,
+      'controls');
+  myhotlists.addItem('Create hotlist', '/hosting/createHotlist', 'controls');
+}
diff --git a/static/js/framework/framework-stars.js b/static/js/framework/framework-stars.js
new file mode 100644
index 0000000..946264e
--- /dev/null
+++ b/static/js/framework/framework-stars.js
@@ -0,0 +1,114 @@
+/* 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
+ */
+
+/**
+ * This file contains JS functions that support setting and showing
+ * stars throughout Monorail.
+ */
+
+
+/**
+ * The character to display when the user has starred an issue.
+ */
+var TKR_STAR_ON = '\u2605';
+
+
+/**
+ * The character to display when the user has not starred an issue.
+ */
+var TKR_STAR_OFF = '\u2606';
+
+
+/**
+ * Function to toggle the star on an issue.  Does both an update of the
+ * DOM and hit the server to record the star.
+ *
+ * @param {Element} el The star <a> element.
+ * @param {String} projectName name of the project to be starred, or name of
+ *                 the project containing the issue to be starred.
+ * @param {Integer} localId number of the issue to be starred.
+ * @param {String} projectName number of the user to be starred.
+ */
+function TKR_toggleStar(el, projectName, localId, userId, hotlistId) {
+  const starred = (el.textContent.trim() == TKR_STAR_OFF);
+  TKR_toggleStarLocal(el);
+
+  const starRequestMessage = {starred: Boolean(starred)};
+  if (userId) {
+    starRequestMessage.user_ref = {user_id: userId};
+    window.prpcClient.call('monorail.Users', 'StarUser', starRequestMessage);
+  } else if (projectName && localId) {
+    starRequestMessage.issue_ref = {
+      project_name: projectName,
+      local_id: localId,
+    };
+    window.prpcClient.call('monorail.Issues', 'StarIssue', starRequestMessage);
+  } else if (projectName) {
+    starRequestMessage.project_name = projectName;
+    window.prpcClient.call(
+      'monorail.Projects', 'StarProject', starRequestMessage);
+  } else if (hotlistId) {
+    starRequestMessage.hotlist_ref = {hotlist_id: hotlistId};
+    window.prpcClient.call(
+      'monorail.Features', 'StarHotlist', starRequestMessage);
+  }
+}
+
+
+/**
+ * Just update the display state of a star, without contacting the server.
+ * Optionally update the value of a form element as well. Useful for when
+ * a user is entering a new issue and wants to set its initial starred state.
+ * @param {Element} el Star <img> element.
+ * @param {string} opt_formElementId HTML ID of the hidden form element for
+ *      stars.
+ */
+function TKR_toggleStarLocal(el, opt_formElementId) {
+  let starred = (el.textContent.trim() == TKR_STAR_OFF) ? 1 : 0;
+
+  el.textContent = starred ? TKR_STAR_ON : TKR_STAR_OFF;
+  el.style.color = starred ? 'cornflowerblue' : 'grey';
+  el.title = starred ? 'You have starred this item' : 'Click to star this item';
+
+  if (opt_formElementId) {
+    $(opt_formElementId).value = '' + starred; // convert to string
+  }
+}
+
+
+/**
+ * When we show two star icons on the same details page, keep them
+ * in sync with each other. And, update a message about starring
+ * that is displayed near the issue update form.
+ * @param {Element} clickedStar The star that the user clicked on.
+ * @param {string} otherStarId ID of the other star icon.
+ */
+function TKR_syncStarIcons(clickedStar, otherStarId) {
+  let otherStar = document.getElementById(otherStarId);
+  if (!otherStar) {
+    return;
+  }
+  TKR_toggleStarLocal(otherStar);
+
+  let vote_feedback = document.getElementById('vote_feedback');
+  if (!vote_feedback) {
+    return;
+  }
+
+  if (clickedStar.textContent == TKR_STAR_OFF) {
+    vote_feedback.textContent =
+        'Vote for this issue and get email change notifications.';
+  } else {
+    vote_feedback.textContent = 'Your vote has been recorded.';
+  }
+}
+
+
+// Exports
+_TKR_toggleStar = TKR_toggleStar;
+_TKR_toggleStarLocal = TKR_toggleStarLocal;
+_TKR_syncStarIcons = TKR_syncStarIcons;
diff --git a/static/js/framework/project-name-check.js b/static/js/framework/project-name-check.js
new file mode 100644
index 0000000..65c2bdf
--- /dev/null
+++ b/static/js/framework/project-name-check.js
@@ -0,0 +1,30 @@
+/* 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
+ */
+
+/**
+ * @fileoverview Functions that support project name checks when
+ * creating a new project.
+ */
+
+/**
+ * Function that communicates with the server.
+ * @param {string} projectName The proposed project name.
+ */
+async function checkProjectName(projectName) {
+  const message = {
+    project_name: projectName
+  };
+  const response = await window.prpcClient.call(
+      'monorail.Projects', 'CheckProjectName', message);
+  if (response.error) {
+    $('projectnamefeedback').textContent = response.error;
+    $('submit_btn').disabled = 'disabled';
+  }
+}
+
+// Make this function globally available
+_CP_checkProjectName = checkProjectName;
diff --git a/static/js/graveyard/common.js b/static/js/graveyard/common.js
new file mode 100644
index 0000000..621a626
--- /dev/null
+++ b/static/js/graveyard/common.js
@@ -0,0 +1,709 @@
+/* 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
+ */
+
+// ------------------------------------------------------------------------
+// This file contains common utilities and basic javascript infrastructure.
+//
+// Notes:
+// * Press 'D' to toggle debug mode.
+//
+// Functions:
+//
+// - Assertions
+// DEPRECATED: Use assert.js
+// AssertTrue(): assert an expression. Throws an exception if false.
+// Fail(): Throws an exception. (Mark block of code that should be unreachable)
+// AssertEquals(): assert that two values are equal.
+// AssertType(): assert that a value has a particular type
+//
+// - Cookies
+// SetCookie(): Sets a cookie.
+// ExpireCookie(): Expires a cookie.
+// GetCookie(): Gets a cookie value.
+//
+// - Dynamic HTML/DOM utilities
+// MaybeGetElement(): get an element by its id
+// GetElement(): get an element by its id
+// GetParentNode(): Get the parent of an element
+// GetAttribute(): Get attribute value of a DOM node
+// GetInnerHTML(): get the inner HTML of a node
+// SetCssStyle(): Sets a CSS property of a node.
+// GetStyleProperty(): Get CSS property from a style attribute string
+// GetCellIndex(): Get the index of a table cell in a table row
+// ShowElement(): Show/hide element by setting the "display" css property.
+// ShowBlockElement(): Show/hide block element
+// SetButtonText(): Set the text of a button element.
+// AppendNewElement(): Create and append a html element to a parent node.
+// CreateDIV(): Create a DIV element and append to the document.
+// HasClass(): check if element has a given class
+// AddClass(): add a class to an element
+// RemoveClass(): remove a class from an element
+//
+// - Window/Screen utiltiies
+// GetPageOffsetLeft(): get the X page offset of an element
+// GetPageOffsetTop(): get the Y page offset of an element
+// GetPageOffset(): get the X and Y page offsets of an element
+// GetPageOffsetRight() : get X page offset of the right side of an element
+// GetPageOffsetRight() : get Y page offset of the bottom of an element
+// GetScrollTop(): get the vertical scrolling pos of a window.
+// GetScrollLeft(): get the horizontal scrolling pos of a window
+// IsScrollAtEnd():  check if window scrollbar has reached its maximum offset
+// ScrollTo(): scroll window to a position
+// ScrollIntoView(): scroll window so that an element is in view.
+// GetWindowWidth(): get width of a window.
+// GetWindowHeight(): get height of a window
+// GetAvailScreenWidth(): get available screen width
+// GetAvailScreenHeight(): get available screen height
+// GetNiceWindowHeight(): get a nice height for a new browser window.
+// Open{External/Internal}Window(): open a separate window
+// CloseWindow(): close a window
+//
+// - DOM walking utilities
+// AnnotateTerms(): find terms in a node and decorate them with some tag
+// AnnotateText(): find terms in a text node and decorate them with some tag
+//
+// - String utilties
+// HtmlEscape(): html escapes a string
+// HtmlUnescape(): remove html-escaping.
+// QuoteEscape(): escape " quotes.
+// CollapseWhitespace(): collapse multiple whitespace into one whitespace.
+// Trim(): trim whitespace on ends of string
+// IsEmpty(): check if CollapseWhiteSpace(String) == ""
+// IsLetterOrDigit(): check if a character is a letter or a digit
+// ConvertEOLToLF(): normalize the new-lines of a string.
+// HtmlEscapeInsertWbrs(): HtmlEscapes and inserts <wbr>s (word break tags)
+//   after every n non-space chars and/or after or before certain special chars
+//
+// - TextArea utilities
+// GetCursorPos(): finds the cursor position of a textfield
+// SetCursorPos(): sets the cursor position in a textfield
+//
+// - Array utilities
+// FindInArray(): do a linear search to find an element value.
+// DeleteArrayElement(): return a new array with a specific value removed.
+// CloneObject(): clone an object, copying its values recursively.
+// CloneEvent(): clone an event; cannot use CloneObject because it
+//               suffers from infinite recursion
+//
+// - Formatting utilities
+// PrintArray(): used to print/generate HTML by combining static text
+// and dynamic strings.
+// ImageHtml(): create html for an img tag
+// FormatJSLink(): formats a link that invokes js code when clicked.
+// MakeId3(): formats an id that has two id numbers, eg, foo_3_7
+//
+// - Timeouts
+// SafeTimeout(): sets a timeout with protection against ugly JS-errors
+// CancelTimeout(): cancels a timeout with a given ID
+// CancelAllTimeouts(): cancels all timeouts on a given window
+//
+// - Miscellaneous
+// IsDefined(): returns true if argument is not undefined
+// ------------------------------------------------------------------------
+
+// browser detection
+function BR_AgentContains_(str) {
+  if (str in BR_AgentContains_cache_) {
+    return BR_AgentContains_cache_[str];
+  }
+
+  return BR_AgentContains_cache_[str] =
+    (navigator.userAgent.toLowerCase().indexOf(str) != -1);
+}
+// We cache the results of the indexOf operation. This gets us a 10x benefit in
+// Gecko, 8x in Safari and 4x in MSIE for all of the browser checks
+var BR_AgentContains_cache_ = {};
+
+function BR_IsIE() {
+  return (BR_AgentContains_('msie') || BR_AgentContains_('trident')) &&
+         !window.opera;
+}
+
+function BR_IsKonqueror() {
+  return BR_AgentContains_('konqueror');
+}
+
+function BR_IsSafari() {
+  return BR_AgentContains_('safari') || BR_IsKonqueror();
+}
+
+function BR_IsNav() {
+  return !BR_IsIE() &&
+         !BR_IsSafari() &&
+         BR_AgentContains_('mozilla');
+}
+
+var BACKSPACE_KEYNAME = 'Backspace';
+var COMMA_KEYNAME = ',';
+var DELETE_KEYNAME = 'Delete';
+var UP_KEYNAME = 'ArrowUp';
+var DOWN_KEYNAME = 'ArrowDown';
+var LEFT_KEYNAME = 'ArrowLeft';
+var RIGHT_KEYNAME = 'ArrowRight';
+var ENTER_KEYNAME = 'Enter';
+var ESC_KEYNAME = 'Escape';
+var SPACE_KEYNAME = ' ';
+var TAB_KEYNAME = 'Tab';
+var SHIFT_KEYNAME = 'Shift';
+var PAGE_DOWN_KEYNAME = 'PageDown';
+var PAGE_UP_KEYNAME = 'PageUp';
+
+var MAX_EMAIL_ADDRESS_LENGTH = 320; // 64 + '@' + 255
+var MAX_SIGNATURE_LENGTH = 1000; // 1000 chars of maximum signature
+
+// ------------------------------------------------------------------------
+// Assertions
+// DEPRECATED: Use assert.js
+// ------------------------------------------------------------------------
+/**
+ * DEPRECATED: Use assert.js
+ */
+function raise(msg) {
+  if (typeof Error != 'undefined') {
+    throw new Error(msg || 'Assertion Failed');
+  } else {
+    throw (msg);
+  }
+}
+
+/**
+ * DEPRECATED: Use assert.js
+ *
+ * Fail() is useful for marking logic paths that should
+ * not be reached. For example, if you have a class that uses
+ * ints for enums:
+ *
+ * MyClass.ENUM_FOO = 1;
+ * MyClass.ENUM_BAR = 2;
+ * MyClass.ENUM_BAZ = 3;
+ *
+ * And a switch statement elsewhere in your code that
+ * has cases for each of these enums, then you can
+ * "protect" your code as follows:
+ *
+ * switch(type) {
+ *   case MyClass.ENUM_FOO: doFooThing(); break;
+ *   case MyClass.ENUM_BAR: doBarThing(); break;
+ *   case MyClass.ENUM_BAZ: doBazThing(); break;
+ *   default:
+ *     Fail("No enum in MyClass with value: " + type);
+ * }
+ *
+ * This way, if someone introduces a new value for this enum
+ * without noticing this switch statement, then the code will
+ * fail if the logic allows it to reach the switch with the
+ * new value, alerting the developer that they should add a
+ * case to the switch to handle the new value they have introduced.
+ *
+ * @param {string} opt_msg to display for failure
+ *                 DEFAULT: "Assertion failed"
+ */
+function Fail(opt_msg) {
+  opt_msg = opt_msg || 'Assertion failed';
+  if (IsDefined(DumpError)) DumpError(opt_msg + '\n');
+  raise(opt_msg);
+}
+
+/**
+ * DEPRECATED: Use assert.js
+ *
+ * Asserts that an expression is true (non-zero and non-null).
+ *
+ * Note that it is critical not to pass logic
+ * with side-effects as the expression for AssertTrue
+ * because if the assertions are removed by the
+ * JSCompiler, then the expression will be removed
+ * as well, in which case the side-effects will
+ * be lost. So instead of this:
+ *
+ *  AssertTrue( criticalComputation() );
+ *
+ * Do this:
+ *
+ *  var result = criticalComputation();
+ *  AssertTrue(result);
+ *
+ * @param expression to evaluate
+ * @param {string} opt_msg to display if the assertion fails
+ *
+ */
+function AssertTrue(expression, opt_msg) {
+  if (!expression) {
+    opt_msg = opt_msg || 'Assertion failed';
+    Fail(opt_msg);
+  }
+}
+
+/**
+ * DEPRECATED: Use assert.js
+ *
+ * Asserts that a value is of the provided type.
+ *
+ *   AssertType(6, Number);
+ *   AssertType("ijk", String);
+ *   AssertType([], Array);
+ *   AssertType({}, Object);
+ *   AssertType(ICAL_Date.now(), ICAL_Date);
+ *
+ * @param value
+ * @param type A constructor function
+ * @param {string} opt_msg to display if the assertion fails
+ */
+function AssertType(value, type, opt_msg) {
+  // for backwards compatability only
+  if (typeof value == type) return;
+
+  if (value || value == '') {
+    try {
+      if (type == AssertTypeMap[typeof value] || value instanceof type) return;
+    } catch (e) {/* failure, type was an illegal argument to instanceof */}
+  }
+  let makeMsg = opt_msg === undefined;
+  if (makeMsg) {
+    if (typeof type == 'function') {
+      let match = type.toString().match(/^\s*function\s+([^\s\{]+)/);
+      if (match) type = match[1];
+    }
+    opt_msg = 'AssertType failed: <' + value + '> not typeof '+ type;
+  }
+  Fail(opt_msg);
+}
+
+var AssertTypeMap = {
+  'string': String,
+  'number': Number,
+  'boolean': Boolean,
+};
+
+var EXPIRED_COOKIE_VALUE = 'EXPIRED';
+
+
+// ------------------------------------------------------------------------
+// Window/screen utilities
+// TODO: these should be renamed (e.g. GetWindowWidth to GetWindowInnerWidth
+// and moved to geom.js)
+// ------------------------------------------------------------------------
+// Get page offset of an element
+function GetPageOffsetLeft(el) {
+  let x = el.offsetLeft;
+  if (el.offsetParent != null) {
+    x += GetPageOffsetLeft(el.offsetParent);
+  }
+  return x;
+}
+
+// Get page offset of an element
+function GetPageOffsetTop(el) {
+  let y = el.offsetTop;
+  if (el.offsetParent != null) {
+    y += GetPageOffsetTop(el.offsetParent);
+  }
+  return y;
+}
+
+// Get page offset of an element
+function GetPageOffset(el) {
+  let x = el.offsetLeft;
+  let y = el.offsetTop;
+  if (el.offsetParent != null) {
+    let pos = GetPageOffset(el.offsetParent);
+    x += pos.x;
+    y += pos.y;
+  }
+  return {x: x, y: y};
+}
+
+// Get the y position scroll offset.
+function GetScrollTop(win) {
+  return GetWindowPropertyByBrowser_(win, getScrollTopGetters_);
+}
+
+var getScrollTopGetters_ = {
+  ieQuirks_: function(win) {
+    return win.document.body.scrollTop;
+  },
+  ieStandards_: function(win) {
+    return win.document.documentElement.scrollTop;
+  },
+  dom_: function(win) {
+    return win.pageYOffset;
+  },
+};
+
+// Get the x position scroll offset.
+function GetScrollLeft(win) {
+  return GetWindowPropertyByBrowser_(win, getScrollLeftGetters_);
+}
+
+var getScrollLeftGetters_ = {
+  ieQuirks_: function(win) {
+    return win.document.body.scrollLeft;
+  },
+  ieStandards_: function(win) {
+    return win.document.documentElement.scrollLeft;
+  },
+  dom_: function(win) {
+    return win.pageXOffset;
+  },
+};
+
+// Scroll so that as far as possible the entire element is in view.
+var ALIGN_BOTTOM = 'b';
+var ALIGN_MIDDLE = 'm';
+var ALIGN_TOP = 't';
+
+var getWindowWidthGetters_ = {
+  ieQuirks_: function(win) {
+    return win.document.body.clientWidth;
+  },
+  ieStandards_: function(win) {
+    return win.document.documentElement.clientWidth;
+  },
+  dom_: function(win) {
+    return win.innerWidth;
+  },
+};
+
+function GetWindowHeight(win) {
+  return GetWindowPropertyByBrowser_(win, getWindowHeightGetters_);
+}
+
+var getWindowHeightGetters_ = {
+  ieQuirks_: function(win) {
+    return win.document.body.clientHeight;
+  },
+  ieStandards_: function(win) {
+    return win.document.documentElement.clientHeight;
+  },
+  dom_: function(win) {
+    return win.innerHeight;
+  },
+};
+
+/**
+ * Allows the easy use of different getters for IE quirks mode, IE standards
+ * mode and fully DOM-compliant browers.
+ *
+ * @param win window to get the property for
+ * @param getters object with various getters. Invoked with the passed window.
+ * There are three properties:
+ * - ieStandards_: IE 6.0 standards mode
+ * - ieQuirks_: IE 6.0 quirks mode and IE 5.5 and older
+ * - dom_: Mozilla, Safari and other fully DOM compliant browsers
+ *
+ * @private
+ */
+function GetWindowPropertyByBrowser_(win, getters) {
+  try {
+    if (BR_IsSafari()) {
+      return getters.dom_(win);
+    } else if (!window.opera &&
+               'compatMode' in win.document &&
+               win.document.compatMode == 'CSS1Compat') {
+      return getters.ieStandards_(win);
+    } else if (BR_IsIE()) {
+      return getters.ieQuirks_(win);
+    }
+  } catch (e) {
+    // Ignore for now and fall back to DOM method
+  }
+
+  return getters.dom_(win);
+}
+
+function GetAvailScreenWidth(win) {
+  return win.screen.availWidth;
+}
+
+// Used for horizontally centering a new window of the given width in the
+// available screen. Set the new window's distance from the left of the screen
+// equal to this function's return value.
+// Params: width: the width of the new window
+// Returns: the distance from the left edge of the screen for the new window to
+//   be horizontally centered
+function GetCenteringLeft(win, width) {
+  return (win.screen.availWidth - width) >> 1;
+}
+
+// Used for vertically centering a new window of the given height in the
+// available screen. Set the new window's distance from the top of the screen
+// equal to this function's return value.
+// Params: height: the height of the new window
+// Returns: the distance from the top edge of the screen for the new window to
+//   be vertically aligned.
+function GetCenteringTop(win, height) {
+  return (win.screen.availHeight - height) >> 1;
+}
+
+/**
+ * Opens a child popup window that has no browser toolbar/decorations.
+ * (Copied from caribou's common.js library with small modifications.)
+ *
+ * @param url the URL for the new window (Note: this will be unique-ified)
+ * @param opt_name the name of the new window
+ * @param opt_width the width of the new window
+ * @param opt_height the height of the new window
+ * @param opt_center if true, the new window is centered in the available screen
+ * @param opt_hide_scrollbars if true, the window hides the scrollbars
+ * @param opt_noresize if true, makes window unresizable
+ * @param opt_blocked_msg message warning that the popup has been blocked
+ * @return {Window} a reference to the new child window
+ */
+function Popup(url, opt_name, opt_width, opt_height, opt_center,
+  opt_hide_scrollbars, opt_noresize, opt_blocked_msg) {
+  if (!opt_height) {
+    opt_height = Math.floor(GetWindowHeight(window.top) * 0.8);
+  }
+  if (!opt_width) {
+    opt_width = Math.min(GetAvailScreenWidth(window), opt_height);
+  }
+
+  let features = 'resizable=' + (opt_noresize ? 'no' : 'yes') + ',' +
+                 'scrollbars=' + (opt_hide_scrollbars ? 'no' : 'yes') + ',' +
+                 'width=' + opt_width + ',height=' + opt_height;
+  if (opt_center) {
+    features += ',left=' + GetCenteringLeft(window, opt_width) + ',' +
+                'top=' + GetCenteringTop(window, opt_height);
+  }
+  return OpenWindow(window, url, opt_name, features, opt_blocked_msg);
+}
+
+/**
+ * Opens a new window. Returns the new window handle. Tries to open the new
+ * window using top.open() first. If that doesn't work, then tries win.open().
+ * If that still doesn't work, prints an alert.
+ * (Copied from caribou's common.js library with small modifications.)
+ *
+ * @param win the parent window from which to open the new child window
+ * @param url the URL for the new window (Note: this will be unique-ified)
+ * @param opt_name the name of the new window
+ * @param opt_features the properties of the new window
+ * @param opt_blocked_msg message warning that the popup has been blocked
+ * @return {Window} a reference to the new child window
+ */
+function OpenWindow(win, url, opt_name, opt_features, opt_blocked_msg) {
+  let newwin = OpenWindowHelper(top, url, opt_name, opt_features);
+  if (!newwin || newwin.closed || !newwin.focus) {
+    newwin = OpenWindowHelper(win, url, opt_name, opt_features);
+  }
+  if (!newwin || newwin.closed || !newwin.focus) {
+    if (opt_blocked_msg) alert(opt_blocked_msg);
+  } else {
+    // Make sure that the window has the focus
+    newwin.focus();
+  }
+  return newwin;
+}
+
+/*
+ * Helper for OpenWindow().
+ * (Copied from caribou's common.js library with small modifications.)
+ */
+function OpenWindowHelper(win, url, name, features) {
+  let newwin;
+  if (features) {
+    newwin = win.open(url, name, features);
+  } else if (name) {
+    newwin = win.open(url, name);
+  } else {
+    newwin = win.open(url);
+  }
+  return newwin;
+}
+
+// ------------------------------------------------------------------------
+// String utilities
+// ------------------------------------------------------------------------
+// Do html escaping
+var amp_re_ = /&/g;
+var lt_re_ = /</g;
+var gt_re_ = />/g;
+
+// converts multiple ws chars to a single space, and strips
+// leading and trailing ws
+var spc_re_ = /\s+/g;
+var beg_spc_re_ = /^ /;
+var end_spc_re_ = / $/;
+
+var newline_re_ = /\r?\n/g;
+var spctab_re_ = /[ \t]+/g;
+var nbsp_re_ = /\xa0/g;
+
+// URL-decodes the string. We need to specially handle '+'s because
+// the javascript library doesn't properly convert them to spaces
+var plus_re_ = /\+/g;
+
+// Converts any instances of "\r" or "\r\n" style EOLs into "\n" (Line Feed),
+// and also trim the extra newlines and whitespaces at the end.
+var eol_re_ = /\r\n?/g;
+var trailingspc_re_ = /[\n\t ]+$/;
+
+// Converts a string to its canonicalized label form.
+var illegal_chars_re_ = /[ \/(){}&|\\\"\000]/g;
+
+// ------------------------------------------------------------------------
+// TextArea utilities
+// ------------------------------------------------------------------------
+
+// Gets the cursor pos in a text area. Returns -1 if the cursor pos cannot
+// be determined or if the cursor out of the textfield.
+function GetCursorPos(win, textfield) {
+  try {
+    if (IsDefined(textfield.selectionEnd)) {
+      // Mozilla directly supports this
+      return textfield.selectionEnd;
+    } else if (win.document.selection && win.document.selection.createRange) {
+      // IE doesn't export an accessor for the endpoints of a selection.
+      // Instead, it uses the TextRange object, which has an extremely obtuse
+      // API. Here's what seems to work:
+
+      // (1) Obtain a textfield from the current selection (cursor)
+      let tr = win.document.selection.createRange();
+
+      // Check if the current selection is in the textfield
+      if (tr.parentElement() != textfield) {
+        return -1;
+      }
+
+      // (2) Make a text range encompassing the textfield
+      let tr2 = tr.duplicate();
+      tr2.moveToElementText(textfield);
+
+      // (3) Move the end of the copy to the beginning of the selection
+      tr2.setEndPoint('EndToStart', tr);
+
+      // (4) The span of the textrange copy is equivalent to the cursor pos
+      let cursor = tr2.text.length;
+
+      // Finally, perform a sanity check to make sure the cursor is in the
+      // textfield. IE sometimes screws this up when the window is activated
+      if (cursor > textfield.value.length) {
+        return -1;
+      }
+      return cursor;
+    } else {
+      Debug('Unable to get cursor position for: ' + navigator.userAgent);
+
+      // Just return the size of the textfield
+      // TODO: Investigate how to get cursor pos in Safari!
+      return textfield.value.length;
+    }
+  } catch (e) {
+    DumpException(e, 'Cannot get cursor pos');
+  }
+
+  return -1;
+}
+
+function SetCursorPos(win, textfield, pos) {
+  if (IsDefined(textfield.selectionEnd) &&
+      IsDefined(textfield.selectionStart)) {
+    // Mozilla directly supports this
+    textfield.selectionStart = pos;
+    textfield.selectionEnd = pos;
+  } else if (win.document.selection && textfield.createTextRange) {
+    // IE has textranges. A textfield's textrange encompasses the
+    // entire textfield's text by default
+    let sel = textfield.createTextRange();
+
+    sel.collapse(true);
+    sel.move('character', pos);
+    sel.select();
+  }
+}
+
+// ------------------------------------------------------------------------
+// Array utilities
+// ------------------------------------------------------------------------
+// Find an item in an array, returns the key, or -1 if not found
+function FindInArray(array, x) {
+  for (let i = 0; i < array.length; i++) {
+    if (array[i] == x) {
+      return i;
+    }
+  }
+  return -1;
+}
+
+// Delete an element from an array
+function DeleteArrayElement(array, x) {
+  let i = 0;
+  while (i < array.length && array[i] != x) {
+    i++;
+  }
+  array.splice(i, 1);
+}
+
+// Clean up email address:
+// - remove extra spaces
+// - Surround name with quotes if it contains special characters
+// to check if we need " quotes
+// Note: do not use /g in the regular expression, otherwise the
+// regular expression cannot be reusable.
+var specialchars_re_ = /[()<>@,;:\\\".\[\]]/;
+
+// ------------------------------------------------------------------------
+// Timeouts
+//
+// It is easy to forget to put a try/catch block around a timeout function,
+// and the result is an ugly user visible javascript error.
+// Also, it would be nice if a timeout associated with a window is
+// automatically cancelled when the user navigates away from that window.
+//
+// When storing timeouts in a window, we can't let that variable be renamed
+// since the window could be top.js, and renaming such a property could
+// clash with any of the variables/functions defined in top.js.
+// ------------------------------------------------------------------------
+/**
+ * Sets a timeout safely.
+ * @param win the window object. If null is passed in, then a timeout if set
+ *   on the js frame. If the window is closed, or freed, the timeout is
+ *   automaticaaly cancelled
+ * @param fn the callback function: fn(win) will be called.
+ * @param ms number of ms the callback should be called later
+ */
+function SafeTimeout(win, fn, ms) {
+  if (!win) win = window;
+  if (!win._tm) {
+    win._tm = [];
+  }
+  let timeoutfn = SafeTimeoutFunction_(win, fn);
+  let id = win.setTimeout(timeoutfn, ms);
+
+  // Save the id so that it can be removed from the _tm array
+  timeoutfn.id = id;
+
+  // Safe the timeout in the _tm array
+  win._tm[id] = 1;
+
+  return id;
+}
+
+/** Creates a callback function for a timeout*/
+function SafeTimeoutFunction_(win, fn) {
+  var timeoutfn = function() {
+    try {
+      fn(win);
+
+      let t = win._tm;
+      if (t) {
+        delete t[timeoutfn.id];
+      }
+    } catch (e) {
+      DumpException(e);
+    }
+  };
+  return timeoutfn;
+}
+
+// ------------------------------------------------------------------------
+// Misc
+// ------------------------------------------------------------------------
+// Check if a value is defined
+function IsDefined(value) {
+  return (typeof value) != 'undefined';
+}
diff --git a/static/js/graveyard/geom.js b/static/js/graveyard/geom.js
new file mode 100644
index 0000000..3eaffb7
--- /dev/null
+++ b/static/js/graveyard/geom.js
@@ -0,0 +1,94 @@
+/* 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
+ */
+
+// functions for dealing with layout and geometry of page elements.
+// Requires shapes.js
+
+/** returns the bounding box of the given DOM node in document space.
+  *
+  * @param {Element?} obj a DOM node.
+  * @return {Rect?}
+  */
+function nodeBounds(obj) {
+  if (!obj) return null;
+
+  function fixRectForScrolling(r) {
+    // Need to take into account scrolling offset of ancestors (IE already does
+    // this)
+    for (let o = obj.offsetParent;
+      o && o.offsetParent;
+      o = o.offsetParent) {
+      if (o.scrollLeft) {
+        r.x -= o.scrollLeft;
+      }
+      if (o.scrollTop) {
+        r.y -= o.scrollTop;
+      }
+    }
+  }
+
+  let refWindow;
+  if (obj.ownerDocument && obj.ownerDocument.parentWindow) {
+    refWindow = obj.ownerDocument.parentWindow;
+  } else if (obj.ownerDocument && obj.ownerDocument.defaultView) {
+    refWindow = obj.ownerDocument.defaultView;
+  } else {
+    refWindow = window;
+  }
+
+  // IE, Mozilla 3+
+  if (obj.getBoundingClientRect) {
+    let rect = obj.getBoundingClientRect();
+
+    return new Rect(rect.left + GetScrollLeft(refWindow),
+      rect.top + GetScrollTop(refWindow),
+      rect.right - rect.left,
+      rect.bottom - rect.top,
+      refWindow);
+  }
+
+  // Mozilla < 3
+  if (obj.ownerDocument && obj.ownerDocument.getBoxObjectFor) {
+    let box = obj.ownerDocument.getBoxObjectFor(obj);
+    var r = new Rect(box.x, box.y, box.width, box.height, refWindow);
+    fixRectForScrolling(r);
+    return r;
+  }
+
+  // Fallback to recursively computing this
+  let left = 0;
+  let top = 0;
+  for (let o = obj; o.offsetParent; o = o.offsetParent) {
+    left += o.offsetLeft;
+    top += o.offsetTop;
+  }
+
+  var r = new Rect(left, top, obj.offsetWidth, obj.offsetHeight, refWindow);
+  fixRectForScrolling(r);
+  return r;
+}
+
+function GetMousePosition(e) {
+  // copied from http://www.quirksmode.org/js/events_compinfo.html
+  let posx = 0;
+  let posy = 0;
+  if (e.pageX || e.pageY) {
+    posx = e.pageX;
+    posy = e.pageY;
+  } else if (e.clientX || e.clientY) {
+    let obj = (e.target ? e.target : e.srcElement);
+    let refWindow;
+    if (obj.ownerDocument && obj.ownerDocument.parentWindow) {
+      refWindow = obj.ownerDocument.parentWindow;
+    } else {
+      refWindow = window;
+    }
+    posx = e.clientX + GetScrollLeft(refWindow);
+    posy = e.clientY + GetScrollTop(refWindow);
+  }
+  return new Point(posx, posy, window);
+}
diff --git a/static/js/graveyard/listen.js b/static/js/graveyard/listen.js
new file mode 100644
index 0000000..953d674
--- /dev/null
+++ b/static/js/graveyard/listen.js
@@ -0,0 +1,145 @@
+/* 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
+ */
+
+var listen;
+var unlisten;
+var unlistenByKey;
+
+(function() {
+  let listeners = {};
+  let nextId = 0;
+
+  function getHashCode_(obj) {
+    if (obj.listen_hc_ == null) {
+      obj.listen_hc_ = ++nextId;
+    }
+    return obj.listen_hc_;
+  }
+
+  /**
+   * Takes a node, event, listener, and capture flag to create a key
+   * to identify the tuple in the listeners hash.
+   *
+   * @param {Element} node The node to listen to events on.
+   * @param {string} event The name of the event without the "on" prefix.
+   * @param {Function} listener A function to call when the event occurs.
+   * @param {boolean} opt_useCapture In DOM-compliant browsers, this determines
+   *                                 whether the listener is fired during the
+   *                                 capture or bubble phase of the event.
+   * @return {string} key to identify this tuple in the listeners hash.
+   */
+  function createKey_(node, event, listener, opt_useCapture) {
+    let nodeHc = getHashCode_(node);
+    let listenerHc = getHashCode_(listener);
+    opt_useCapture = !!opt_useCapture;
+    let key = nodeHc + '_' + event + '_' + listenerHc + '_' + opt_useCapture;
+    return key;
+  }
+
+  /**
+   * Adds an event listener to a DOM node for a specific event.
+   *
+   * Listen() and unlisten() use an indirect lookup of listener functions
+   * to avoid circular references between DOM (in IE) or XPCOM (in Mozilla)
+   * objects which leak memory. This makes it easier to write OO
+   * Javascript/DOM code.
+   *
+   * Examples:
+   * listen(myButton, 'click', myHandler, true);
+   * listen(myButton, 'click', this.myHandler.bind(this), true);
+   *
+   * @param {Element} node The node to listen to events on.
+   * @param {string} event The name of the event without the "on" prefix.
+   * @param {Function} listener A function to call when the event occurs.
+   * @param {boolean} opt_useCapture In DOM-compliant browsers, this determines
+   *                                 whether the listener is fired during the
+   *                                 capture or bubble phase of the event.
+   * @return {string} a unique key to indentify this listener.
+   */
+  listen = function(node, event, listener, opt_useCapture) {
+    let key = createKey_(node, event, listener, opt_useCapture);
+
+    // addEventListener does not allow multiple listeners
+    if (key in listeners) {
+      return key;
+    }
+
+    let proxy = handleEvent.bind(null, key);
+    listeners[key] = {
+      listener: listener,
+      proxy: proxy,
+      event: event,
+      node: node,
+      useCapture: opt_useCapture,
+    };
+
+    if (node.addEventListener) {
+      node.addEventListener(event, proxy, opt_useCapture);
+    } else if (node.attachEvent) {
+      node.attachEvent('on' + event, proxy);
+    } else {
+      throw new Error('Node {' + node + '} does not support event listeners.');
+    }
+
+    return key;
+  };
+
+  /**
+   * Removes an event listener which was added with listen().
+   *
+   * @param {Element} node The node to stop listening to events on.
+   * @param {string} event The name of the event without the "on" prefix.
+   * @param {Function} listener The listener function to remove.
+   * @param {boolean} opt_useCapture In DOM-compliant browsers, this determines
+   *                                 whether the listener is fired during the
+   *                                 capture or bubble phase of the event.
+   * @return {boolean} indicating whether the listener was there to remove.
+   */
+  unlisten = function(node, event, listener, opt_useCapture) {
+    let key = createKey_(node, event, listener, opt_useCapture);
+
+    return unlistenByKey(key);
+  };
+
+  /**
+   * Variant of {@link unlisten} that takes a key that was returned by
+   * {@link listen} and removes that listener.
+   *
+   * @param {string} key Key of event to be unlistened.
+   * @return {boolean} indicating whether it was there to be removed.
+   */
+  unlistenByKey = function(key) {
+    if (!(key in listeners)) {
+      return false;
+    }
+    let listener = listeners[key];
+    let proxy = listener.proxy;
+    let event = listener.event;
+    let node = listener.node;
+    let useCapture = listener.useCapture;
+
+    if (node.removeEventListener) {
+      node.removeEventListener(event, proxy, useCapture);
+    } else if (node.detachEvent) {
+      node.detachEvent('on' + event, proxy);
+    }
+
+    delete listeners[key];
+    return true;
+  };
+
+  /**
+   * The function which is actually called when the DOM event occurs. This
+   * function is a proxy for the real listener the user specified.
+   */
+  function handleEvent(key) {
+    // pass all arguments which were sent to this function except listenerID
+    // on to the actual listener.
+    let args = Array.prototype.splice.call(arguments, 1, arguments.length);
+    return listeners[key].listener.apply(null, args);
+  }
+})();
diff --git a/static/js/graveyard/popup_controller.js b/static/js/graveyard/popup_controller.js
new file mode 100644
index 0000000..41c2956
--- /dev/null
+++ b/static/js/graveyard/popup_controller.js
@@ -0,0 +1,145 @@
+/* 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
+ */
+
+/**
+ * It is common to make a DIV temporarily visible to simulate
+ * a popup window. Often, this is done by adding an onClick
+ * handler to the element that can be clicked on to show the
+ * popup.
+ *
+ * Unfortunately, closing the popup is not as simple.
+ * The popup creator often wants to let the user close
+ * the popup by clicking elsewhere on the window; however,
+ * the popup only receives mouse events that occur
+ * on the popup itself. Thus, popups need a mechanism
+ * that notifies them that the user has clicked elsewhere
+ * to try to get rid of them.
+ *
+ * PopupController is such a mechanism --
+ * it monitors all mousedown events that
+ * occur in the window so that it can notify registered
+ * popups of the mousedown, and the popups can choose
+ * to deactivate themselves.
+ *
+ * For an object to qualify as a popup, it must have a
+ * function called "deactivate" that takes a mousedown event
+ * and returns a boolean indicating that it has deactivated
+ * itself as a result of that event.
+ *
+ * EXAMPLE:
+ *
+ * // popup that attaches itself to the supplied div
+ * function MyPopup(div) {
+ *   this._div = div;
+ *   this._isVisible = false;
+ *   this._innerHTML = ...
+ * }
+ *
+ * MyPopup.prototype.show = function() {
+ *   this._div.display = '';
+ *   this._isVisible = true;
+ *   PC_addPopup(this);
+ * }
+ *
+ * MyPopup.prototype.hide = function() {
+ *   this._div.display = 'none';
+ *   this._isVisible = false;
+ * }
+ *
+ * MyPopup.prototype.deactivate = function(e) {
+ *   if (this._isVisible) {
+ *     var p = GetMousePosition(e);
+ *     if (nodeBounds(this._div).contains(p)) {
+ *       return false; // use clicked on popup, remain visible
+ *     } else {
+ *       this.hide();
+ *       return true; // clicked outside popup, make invisible
+ *     }
+ *   } else {
+ *     return true; // already deactivated, not visible
+ *   }
+ * }
+ *
+ * DEPENDENCIES (from this directory):
+ *   bind.js
+ *   listen.js
+ *   common.js
+ *   shapes.js
+ *   geom.js
+ *
+ * USAGE:
+ *  _PC_Install() must be called after the body is loaded
+ */
+
+/**
+ * PopupController constructor.
+ * @constructor
+ */
+function PopupController() {
+  this.activePopups_ = [];
+}
+
+/**
+ * @param {Document} opt_doc document to add PopupController to
+ *                   DEFAULT: "document" variable that is currently in scope
+ * @return {boolean} indicating if PopupController installed for the document;
+ *                   returns false if document already had PopupController
+ */
+function _PC_Install(opt_doc) {
+  if (gPopupControllerInstalled) return false;
+  gPopupControllerInstalled = true;
+  let doc = (opt_doc) ? opt_doc : document;
+
+  // insert _notifyPopups in BODY's onmousedown chain
+  listen(doc.body, 'mousedown', PC_notifyPopups);
+  return true;
+}
+
+/**
+ * Notifies each popup of a mousedown event, giving
+ * each popup the chance to deactivate itself.
+ *
+ * @throws Error if a popup does not have a deactivate function
+ *
+ * @private
+ */
+function PC_notifyPopups(e) {
+  if (gPopupController.activePopups_.length == 0) return false;
+  e = e || window.event;
+  for (let i = gPopupController.activePopups_.length - 1; i >= 0; --i) {
+    let popup = gPopupController.activePopups_[i];
+    PC_assertIsPopup(popup);
+    if (popup.deactivate(e)) {
+      gPopupController.activePopups_.splice(i, 1);
+    }
+  }
+  return true;
+}
+
+/**
+ * Adds the popup to the list of popups to be
+ * notified of a mousedown event.
+ *
+ * @return boolean indicating if added popup; false if already contained
+ * @throws Error if popup does not have a deactivate function
+ */
+function PC_addPopup(popup) {
+  PC_assertIsPopup(popup);
+  for (let i = 0; i < gPopupController.activePopups_.length; ++i) {
+    if (popup === gPopupController.activePopups_[i]) return false;
+  }
+  gPopupController.activePopups_.push(popup);
+  return true;
+}
+
+/** asserts that popup has a deactivate function */
+function PC_assertIsPopup(popup) {
+  AssertType(popup.deactivate, Function, 'popup missing deactivate function');
+}
+
+var gPopupController = new PopupController();
+var gPopupControllerInstalled = false;
diff --git a/static/js/graveyard/shapes.js b/static/js/graveyard/shapes.js
new file mode 100644
index 0000000..27cd7f1
--- /dev/null
+++ b/static/js/graveyard/shapes.js
@@ -0,0 +1,126 @@
+/* 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
+ */
+
+// shape related classes
+
+/** a point in 2 cartesian dimensions.
+  * @constructor
+  * @param x x-coord.
+  * @param y y-coord.
+  * @param opt_coordinateFrame a key that can be passed to a translation function to
+  *   convert from one coordinate frame to another.
+  *   Coordinate frames might correspond to things like windows, iframes, or
+  *   any element with a position style attribute.
+  */
+function Point(x, y, opt_coordinateFrame) {
+  /** a numeric x coordinate. */
+  this.x = x;
+  /** a numeric y coordinate. */
+  this.y = y;
+  /** a key that can be passed to a translation function to
+    * convert from one coordinate frame to another.
+    * Coordinate frames might correspond to things like windows, iframes, or
+    * any element with a position style attribute.
+    */
+  this.coordinateFrame = opt_coordinateFrame || null;
+}
+Point.prototype.toString = function() {
+  return '[P ' + this.x + ',' + this.y + ']';
+};
+Point.prototype.clone = function() {
+  return new Point(this.x, this.y, this.coordinateFrame);
+};
+
+/** a distance between two points in 2-space in cartesian form.
+  * A delta doesn't have a coordinate frame associated since all the coordinate
+  * frames used in the HTML dom are convertible without rotation/scaling.
+  * If a delta is not being used in pixel-space then it may be annotated with
+  * a coordinate frame, and the undefined coordinate frame can be assumed
+  * to represent pixel space.
+  * @constructor
+  * @param dx distance along x axis
+  * @param dy distance along y axis
+  */
+function Delta(dx, dy) {
+  /** a numeric distance along the x dimension. */
+  this.dx = dx;
+  /** a numeric distance along the y dimension. */
+  this.dy = dy;
+}
+Delta.prototype.toString = function() {
+  return '[D ' + this.dx + ',' + this.dy + ']';
+};
+
+/** a rectangle or bounding region.
+  * @constructor
+  * @param x x-coord of the left edge.
+  * @param y y-coord of the top edge.
+  * @param w width.
+  * @param h height.
+  * @param opt_coordinateFrame a key that can be passed to a translation function to
+  *   convert from one coordinate frame to another.
+  *   Coordinate frames might correspond to things like windows, iframes, or
+  *   any element with a position style attribute.
+  */
+function Rect(x, y, w, h, opt_coordinateFrame) {
+  /** the numeric x coordinate of the left edge. */
+  this.x = x;
+  /** the numeric y coordinate of the top edge. */
+  this.y = y;
+  /** the numeric distance between the right edge and the left. */
+  this.w = w;
+  /** the numeric distance between the top edge and the bottom. */
+  this.h = h;
+  /** a key that can be passed to a translation function to
+    * convert from one coordinate frame to another.
+    * Coordinate frames might correspond to things like windows, iframes, or
+    * any element with a position style attribute.
+    */
+  this.coordinateFrame = opt_coordinateFrame || null;
+}
+
+/**
+ * Determines whether the Rectangle contains the Point.
+ * The Point is considered "contained" if it lies
+ * on the boundary of, or in the interior of, the Rectangle.
+ *
+ * @param {Point} p
+ * @return boolean indicating if this Rect contains p
+ */
+Rect.prototype.contains = function(p) {
+  return this.x <= p.x && p.x < (this.x + this.w) &&
+             this.y <= p.y && p.y < (this.y + this.h);
+};
+
+/**
+ * Determines whether the given rectangle intersects this rectangle.
+ *
+ * @param {Rect} r
+ * @return boolean indicating if this the two rectangles intersect
+ */
+Rect.prototype.intersects = function(r) {
+  let p = function(x, y) {
+    return new Point(x, y, null);
+  };
+
+  return this.contains(p(r.x, r.y)) ||
+         this.contains(p(r.x + r.w, r.y)) ||
+         this.contains(p(r.x + r.w, r.y + r.h)) ||
+         this.contains(p(r.x, r.y + r.h)) ||
+         r.contains(p(this.x, this.y)) ||
+         r.contains(p(this.x + this.w, this.y)) ||
+         r.contains(p(this.x + this.w, this.y + this.h)) ||
+         r.contains(p(this.x, this.y + this.h));
+};
+
+Rect.prototype.toString = function() {
+  return '[R ' + this.w + 'x' + this.h + '+' + this.x + '+' + this.y + ']';
+};
+
+Rect.prototype.clone = function() {
+  return new Rect(this.x, this.y, this.w, this.h, this.coordinateFrame);
+};
diff --git a/static/js/graveyard/xmlhttp.js b/static/js/graveyard/xmlhttp.js
new file mode 100644
index 0000000..eaf1f36
--- /dev/null
+++ b/static/js/graveyard/xmlhttp.js
@@ -0,0 +1,141 @@
+/* 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
+ */
+
+/**
+ * @fileoverview A bunch of XML HTTP recipes used to do RPC from JavaScript
+ */
+
+
+/**
+ * The active x identifier used for ie.
+ * @type String
+ * @private
+ */
+var XH_ieProgId_;
+
+
+// Domain for XMLHttpRequest readyState
+var XML_READY_STATE_UNINITIALIZED = 0;
+var XML_READY_STATE_LOADING = 1;
+var XML_READY_STATE_LOADED = 2;
+var XML_READY_STATE_INTERACTIVE = 3;
+var XML_READY_STATE_COMPLETED = 4;
+
+
+/**
+ * Initialize the private state used by other functions.
+ * @private
+ */
+function XH_XmlHttpInit_() {
+  // The following blog post describes what PROG IDs to use to create the
+  // XMLHTTP object in Internet Explorer:
+  // http://blogs.msdn.com/xmlteam/archive/2006/10/23/using-the-right-version-of-msxml-in-internet-explorer.aspx
+  // However we do not (yet) fully trust that this will be OK for old versions
+  // of IE on Win9x so we therefore keep the last 2.
+  // Versions 4 and 5 have been removed because 3.0 is the preferred "fallback"
+  // per the article above.
+  // - Version 5 was built for Office applications and is not recommended for
+  //   web applications.
+  // - Version 4 has been superseded by 6 and is only intended for legacy apps.
+  // - Version 3 has a wide install base and is serviced regularly with the OS.
+
+  /**
+   * Candidate Active X types.
+   * @type Array.<String>
+   * @private
+   */
+  let XH_ACTIVE_X_IDENTS = ['MSXML2.XMLHTTP.6.0', 'MSXML2.XMLHTTP.3.0',
+    'MSXML2.XMLHTTP', 'Microsoft.XMLHTTP'];
+
+  if (typeof XMLHttpRequest == 'undefined' &&
+      typeof ActiveXObject != 'undefined') {
+    for (let i = 0; i < XH_ACTIVE_X_IDENTS.length; i++) {
+      let candidate = XH_ACTIVE_X_IDENTS[i];
+
+      try {
+        new ActiveXObject(candidate);
+        XH_ieProgId_ = candidate;
+        break;
+      } catch (e) {
+        // do nothing; try next choice
+      }
+    }
+
+    // couldn't find any matches
+    if (!XH_ieProgId_) {
+      throw Error('Could not create ActiveXObject. ActiveX might be disabled,' +
+                  ' or MSXML might not be installed.');
+    }
+  }
+}
+
+
+XH_XmlHttpInit_();
+
+
+/**
+ * Create and return an xml http request object that can be passed to
+ * {@link #XH_XmlHttpGET} or {@link #XH_XmlHttpPOST}.
+ */
+function XH_XmlHttpCreate() {
+  if (XH_ieProgId_) {
+    return new ActiveXObject(XH_ieProgId_);
+  } else {
+    return new XMLHttpRequest();
+  }
+}
+
+
+/**
+ * Send a get request.
+ * @param {XMLHttpRequest} xmlHttp as from {@link XH_XmlHttpCreate}.
+ * @param {string} url the service to contact
+ * @param {Function} handler function called when the response is received.
+ */
+function XH_XmlHttpGET(xmlHttp, url, handler) {
+  xmlHttp.open('GET', url, true);
+  xmlHttp.onreadystatechange = handler;
+  XH_XmlHttpSend(xmlHttp, null);
+}
+
+/**
+ * Send a post request.
+ * @param {XMLHttpRequest} xmlHttp as from {@link XH_XmlHttpCreate}.
+ * @param {string} url the service to contact
+ * @param {string} data the request content.
+ * @param {Function} handler function called when the response is received.
+ */
+function XH_XmlHttpPOST(xmlHttp, url, data, handler) {
+  xmlHttp.open('POST', url, true);
+  xmlHttp.onreadystatechange = handler;
+  xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+  XH_XmlHttpSend(xmlHttp, data);
+}
+
+/**
+ * Calls 'send' on the XMLHttpRequest object and calls a function called 'log'
+ * if any error occured.
+ *
+ * @deprecated This dependes on a function called 'log'. You are better off
+ * handling your errors on application level.
+ *
+ * @param {XMLHttpRequest} xmlHttp as from {@link XH_XmlHttpCreate}.
+ * @param {string|null} data the request content.
+ */
+function XH_XmlHttpSend(xmlHttp, data) {
+  try {
+    xmlHttp.send(data);
+  } catch (e) {
+    // You may want to log/debug this error one that you should be aware of is
+    // e.number == -2146697208, which occurs when the 'Languages...' setting in
+    // IE is empty.
+    // This is not entirely true. The same error code is used when the user is
+    // off line.
+    console.log('XMLHttpSend failed ' + e.toString() + '<br>' + e.stack);
+    throw e;
+  }
+}
diff --git a/static/js/hotlists/edit-hotlist.js b/static/js/hotlists/edit-hotlist.js
new file mode 100644
index 0000000..6e837a1
--- /dev/null
+++ b/static/js/hotlists/edit-hotlist.js
@@ -0,0 +1,35 @@
+/**
+ * Sets up the transfer ownership dialog box.
+ * @param {Long} hotlist_id id of the current hotlist
+*/
+function initializeDialogBox(hotlist_id) {
+  let transferContainer = $('transfer-ownership-container');
+  $('transfer-ownership').addEventListener('click', function() {
+    transferContainer.style.display = 'block';
+  });
+
+  let cancelButton = document.getElementById('cancel');
+
+  cancelButton.addEventListener('click', function() {
+    transferContainer.style.display = 'none';
+  });
+
+  $('hotlist_star').addEventListener('click', function() {
+    _TKR_toggleStar($('hotlist_star'), null, null, null, hotlist_id);
+  });
+}
+
+function initializeDialogBoxRemoveSelf() {
+  /* Initialise the dialog box for removing self from the hotlist. */
+
+  let removeSelfContainer = $('remove-self-container');
+  $('remove-self').addEventListener('click', function() {
+    removeSelfContainer.style.display = 'block';
+  });
+
+  let cancelButtonRS = document.getElementById('cancel-remove-self');
+
+  cancelButtonRS.addEventListener('click', function() {
+    removeSelfContainer.style.display = 'none';
+  });
+}
diff --git a/static/js/prettify.js b/static/js/prettify.js
new file mode 100644
index 0000000..7b99049
--- /dev/null
+++ b/static/js/prettify.js
@@ -0,0 +1,30 @@
+!function(){var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
+(function(){function S(a){function d(e){var b=e.charCodeAt(0);if(b!==92)return b;var a=e.charAt(1);return(b=r[a])?b:"0"<=a&&a<="7"?parseInt(e.substring(1),8):a==="u"||a==="x"?parseInt(e.substring(2),16):e.charCodeAt(1)}function g(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);e=String.fromCharCode(e);return e==="\\"||e==="-"||e==="]"||e==="^"?"\\"+e:e}function b(e){var b=e.substring(1,e.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),e=[],a=
+b[0]==="^",c=["["];a&&c.push("^");for(var a=a?1:0,f=b.length;a<f;++a){var h=b[a];if(/\\[bdsw]/i.test(h))c.push(h);else{var h=d(h),l;a+2<f&&"-"===b[a+1]?(l=d(b[a+2]),a+=2):l=h;e.push([h,l]);l<65||h>122||(l<65||h>90||e.push([Math.max(65,h)|32,Math.min(l,90)|32]),l<97||h>122||e.push([Math.max(97,h)&-33,Math.min(l,122)&-33]))}}e.sort(function(e,a){return e[0]-a[0]||a[1]-e[1]});b=[];f=[];for(a=0;a<e.length;++a)h=e[a],h[0]<=f[1]+1?f[1]=Math.max(f[1],h[1]):b.push(f=h);for(a=0;a<b.length;++a)h=b[a],c.push(g(h[0])),
+h[1]>h[0]&&(h[1]+1>h[0]&&c.push("-"),c.push(g(h[1])));c.push("]");return c.join("")}function s(e){for(var a=e.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),c=a.length,d=[],f=0,h=0;f<c;++f){var l=a[f];l==="("?++h:"\\"===l.charAt(0)&&(l=+l.substring(1))&&(l<=h?d[l]=-1:a[f]=g(l))}for(f=1;f<d.length;++f)-1===d[f]&&(d[f]=++x);for(h=f=0;f<c;++f)l=a[f],l==="("?(++h,d[h]||(a[f]="(?:")):"\\"===l.charAt(0)&&(l=+l.substring(1))&&l<=h&&
+(a[f]="\\"+d[l]);for(f=0;f<c;++f)"^"===a[f]&&"^"!==a[f+1]&&(a[f]="");if(e.ignoreCase&&m)for(f=0;f<c;++f)l=a[f],e=l.charAt(0),l.length>=2&&e==="["?a[f]=b(l):e!=="\\"&&(a[f]=l.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return a.join("")}for(var x=0,m=!1,j=!1,k=0,c=a.length;k<c;++k){var i=a[k];if(i.ignoreCase)j=!0;else if(/[a-z]/i.test(i.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){m=!0;j=!1;break}}for(var r={b:8,t:9,n:10,v:11,
+f:12,r:13},n=[],k=0,c=a.length;k<c;++k){i=a[k];if(i.global||i.multiline)throw Error(""+i);n.push("(?:"+s(i)+")")}return RegExp(n.join("|"),j?"gi":"g")}function T(a,d){function g(a){var c=a.nodeType;if(c==1){if(!b.test(a.className)){for(c=a.firstChild;c;c=c.nextSibling)g(c);c=a.nodeName.toLowerCase();if("br"===c||"li"===c)s[j]="\n",m[j<<1]=x++,m[j++<<1|1]=a}}else if(c==3||c==4)c=a.nodeValue,c.length&&(c=d?c.replace(/\r\n?/g,"\n"):c.replace(/[\t\n\r ]+/g," "),s[j]=c,m[j<<1]=x,x+=c.length,m[j++<<1|1]=
+a)}var b=/(?:^|\s)nocode(?:\s|$)/,s=[],x=0,m=[],j=0;g(a);return{a:s.join("").replace(/\n$/,""),d:m}}function H(a,d,g,b){d&&(a={a:d,e:a},g(a),b.push.apply(b,a.g))}function U(a){for(var d=void 0,g=a.firstChild;g;g=g.nextSibling)var b=g.nodeType,d=b===1?d?a:g:b===3?V.test(g.nodeValue)?a:d:d;return d===a?void 0:d}function C(a,d){function g(a){for(var j=a.e,k=[j,"pln"],c=0,i=a.a.match(s)||[],r={},n=0,e=i.length;n<e;++n){var z=i[n],w=r[z],t=void 0,f;if(typeof w==="string")f=!1;else{var h=b[z.charAt(0)];
+if(h)t=z.match(h[1]),w=h[0];else{for(f=0;f<x;++f)if(h=d[f],t=z.match(h[1])){w=h[0];break}t||(w="pln")}if((f=w.length>=5&&"lang-"===w.substring(0,5))&&!(t&&typeof t[1]==="string"))f=!1,w="src";f||(r[z]=w)}h=c;c+=z.length;if(f){f=t[1];var l=z.indexOf(f),B=l+f.length;t[2]&&(B=z.length-t[2].length,l=B-f.length);w=w.substring(5);H(j+h,z.substring(0,l),g,k);H(j+h+l,f,I(w,f),k);H(j+h+B,z.substring(B),g,k)}else k.push(j+h,w)}a.g=k}var b={},s;(function(){for(var g=a.concat(d),j=[],k={},c=0,i=g.length;c<i;++c){var r=
+g[c],n=r[3];if(n)for(var e=n.length;--e>=0;)b[n.charAt(e)]=r;r=r[1];n=""+r;k.hasOwnProperty(n)||(j.push(r),k[n]=q)}j.push(/[\S\s]/);s=S(j)})();var x=d.length;return g}function v(a){var d=[],g=[];a.tripleQuotedStrings?d.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?d.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
+q,"'\"`"]):d.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&g.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var b=a.hashComments;b&&(a.cStyleComments?(b>1?d.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):d.push(["com",/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),g.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,q])):d.push(["com",
+/^#[^\n\r]*/,q,"#"]));a.cStyleComments&&(g.push(["com",/^\/\/[^\n\r]*/,q]),g.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));if(b=a.regexLiterals){var s=(b=b>1?"":"\n\r")?".":"[\\S\\s]";g.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+b+"])(?:[^/\\x5B\\x5C"+b+"]|\\x5C"+s+"|\\x5B(?:[^\\x5C\\x5D"+b+"]|\\x5C"+
+s+")*(?:\\x5D|$))+/")+")")])}(b=a.types)&&g.push(["typ",b]);b=(""+a.keywords).replace(/^ | $/g,"");b.length&&g.push(["kwd",RegExp("^(?:"+b.replace(/[\s,]+/g,"|")+")\\b"),q]);d.push(["pln",/^\s+/,q," \r\n\t\u00a0"]);b="^.[^\\s\\w.$@'\"`/\\\\]*";a.regexLiterals&&(b+="(?!s*/)");g.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,
+q],["pun",RegExp(b),q]);return C(d,g)}function J(a,d,g){function b(a){var c=a.nodeType;if(c==1&&!x.test(a.className))if("br"===a.nodeName)s(a),a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)b(a);else if((c==3||c==4)&&g){var d=a.nodeValue,i=d.match(m);if(i)c=d.substring(0,i.index),a.nodeValue=c,(d=d.substring(i.index+i[0].length))&&a.parentNode.insertBefore(j.createTextNode(d),a.nextSibling),s(a),c||a.parentNode.removeChild(a)}}function s(a){function b(a,c){var d=
+c?a.cloneNode(!1):a,e=a.parentNode;if(e){var e=b(e,1),g=a.nextSibling;e.appendChild(d);for(var i=g;i;i=g)g=i.nextSibling,e.appendChild(i)}return d}for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),d;(d=a.parentNode)&&d.nodeType===1;)a=d;c.push(a)}for(var x=/(?:^|\s)nocode(?:\s|$)/,m=/\r\n?|\n/,j=a.ownerDocument,k=j.createElement("li");a.firstChild;)k.appendChild(a.firstChild);for(var c=[k],i=0;i<c.length;++i)b(c[i]);d===(d|0)&&c[0].setAttribute("value",d);var r=j.createElement("ol");
+r.className="linenums";for(var d=Math.max(0,d-1|0)||0,i=0,n=c.length;i<n;++i)k=c[i],k.className="L"+(i+d)%10,k.firstChild||k.appendChild(j.createTextNode("\u00a0")),r.appendChild(k);a.appendChild(r)}function p(a,d){for(var g=d.length;--g>=0;){var b=d[g];F.hasOwnProperty(b)?D.console&&console.warn("cannot override language handler %s",b):F[b]=a}}function I(a,d){if(!a||!F.hasOwnProperty(a))a=/^\s*</.test(d)?"default-markup":"default-code";return F[a]}function K(a){var d=a.h;try{var g=T(a.c,a.i),b=g.a;
+a.a=b;a.d=g.d;a.e=0;I(d,b)(a);var s=/\bMSIE\s(\d+)/.exec(navigator.userAgent),s=s&&+s[1]<=8,d=/\n/g,x=a.a,m=x.length,g=0,j=a.d,k=j.length,b=0,c=a.g,i=c.length,r=0;c[i]=m;var n,e;for(e=n=0;e<i;)c[e]!==c[e+2]?(c[n++]=c[e++],c[n++]=c[e++]):e+=2;i=n;for(e=n=0;e<i;){for(var p=c[e],w=c[e+1],t=e+2;t+2<=i&&c[t+1]===w;)t+=2;c[n++]=p;c[n++]=w;e=t}c.length=n;var f=a.c,h;if(f)h=f.style.display,f.style.display="none";try{for(;b<k;){var l=j[b+2]||m,B=c[r+2]||m,t=Math.min(l,B),A=j[b+1],G;if(A.nodeType!==1&&(G=x.substring(g,
+t))){s&&(G=G.replace(d,"\r"));A.nodeValue=G;var L=A.ownerDocument,o=L.createElement("span");o.className=c[r+1];var v=A.parentNode;v.replaceChild(o,A);o.appendChild(A);g<l&&(j[b+1]=A=L.createTextNode(x.substring(t,l)),v.insertBefore(A,o.nextSibling))}g=t;g>=l&&(b+=2);g>=B&&(r+=2)}}finally{if(f)f.style.display=h}}catch(u){D.console&&console.log(u&&u.stack||u)}}var D=window,y=["break,continue,do,else,for,if,return,while"],E=[[y,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
+"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],M=[E,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],N=[E,"abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],
+O=[N,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where"],E=[E,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],P=[y,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
+Q=[y,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],W=[y,"as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use"],y=[y,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,
+V=/\S/,X=v({keywords:[M,O,E,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",P,Q,y],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),F={};p(X,["default-code"]);p(C([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",
+/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]);p(C([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],
+["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);p(C([],[["atv",/^[\S\s]+/]]),["uq.val"]);p(v({keywords:M,hashComments:!0,cStyleComments:!0,types:R}),["c","cc","cpp","cxx","cyc","m"]);p(v({keywords:"null,true,false"}),["json"]);p(v({keywords:O,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:R}),
+["cs"]);p(v({keywords:N,cStyleComments:!0}),["java"]);p(v({keywords:y,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]);p(v({keywords:P,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]);p(v({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]);p(v({keywords:Q,
+hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]);p(v({keywords:E,cStyleComments:!0,regexLiterals:!0}),["javascript","js"]);p(v({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);p(v({keywords:W,cStyleComments:!0,multilineStrings:!0}),["rc","rs","rust"]);
+p(C([],[["str",/^[\S\s]+/]]),["regex"]);var Y=D.PR={createSimpleLexer:C,registerLangHandler:p,sourceDecorator:v,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ",prettyPrintOne:D.prettyPrintOne=function(a,d,g){var b=document.createElement("div");b.innerHTML="<pre>"+a+"</pre>";b=b.firstChild;g&&J(b,g,!0);K({h:d,j:g,c:b,i:1});
+return b.innerHTML},prettyPrint:D.prettyPrint=function(a,d){function g(){for(var b=D.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity;i<p.length&&c.now()<b;i++){for(var d=p[i],j=h,k=d;k=k.previousSibling;){var m=k.nodeType,o=(m===7||m===8)&&k.nodeValue;if(o?!/^\??prettify\b/.test(o):m!==3||/\S/.test(k.nodeValue))break;if(o){j={};o.replace(/\b(\w+)=([\w%+\-.:]+)/g,function(a,b,c){j[b]=c});break}}k=d.className;if((j!==h||e.test(k))&&!v.test(k)){m=!1;for(o=d.parentNode;o;o=o.parentNode)if(f.test(o.tagName)&&
+o.className&&e.test(o.className)){m=!0;break}if(!m){d.className+=" prettyprinted";m=j.lang;if(!m){var m=k.match(n),y;if(!m&&(y=U(d))&&t.test(y.tagName))m=y.className.match(n);m&&(m=m[1])}if(w.test(d.tagName))o=1;else var o=d.currentStyle,u=s.defaultView,o=(o=o?o.whiteSpace:u&&u.getComputedStyle?u.getComputedStyle(d,q).getPropertyValue("white-space"):0)&&"pre"===o.substring(0,3);u=j.linenums;if(!(u=u==="true"||+u))u=(u=k.match(/\blinenums\b(?::(\d+))?/))?u[1]&&u[1].length?+u[1]:!0:!1;u&&J(d,u,o);r=
+{h:m,c:d,j:u,i:o};K(r)}}}i<p.length?setTimeout(g,250):"function"===typeof a&&a()}for(var b=d||document.body,s=b.ownerDocument||document,b=[b.getElementsByTagName("pre"),b.getElementsByTagName("code"),b.getElementsByTagName("xmp")],p=[],m=0;m<b.length;++m)for(var j=0,k=b[m].length;j<k;++j)p.push(b[m][j]);var b=q,c=Date;c.now||(c={now:function(){return+new Date}});var i=0,r,n=/\blang(?:uage)?-([\w.]+)(?!\S)/,e=/\bprettyprint\b/,v=/\bprettyprinted\b/,w=/pre|xmp/i,t=/^code$/i,f=/^(?:pre|code|xmp)$/i,
+h={};g()}};typeof define==="function"&&define.amd&&define("google-code-prettify",[],function(){return Y})})();}()
diff --git a/static/js/sitewide/linked-accounts.js b/static/js/sitewide/linked-accounts.js
new file mode 100644
index 0000000..e7fa7e1
--- /dev/null
+++ b/static/js/sitewide/linked-accounts.js
@@ -0,0 +1,80 @@
+/* Copyright 2019 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
+ */
+
+const parentSelect = document.getElementById('parent_to_invite');
+const createButton = document.getElementById('create_linked_account_invite');
+const acceptButtons = document.querySelectorAll('.incoming_invite');
+const unlinkButtons = document.querySelectorAll('.unlink_account');
+
+function CreateLinkedAccountInvite(ev) {
+  const email = parentSelect.value;
+  const message = {
+    email: email,
+  };
+  const inviteCall = window.prpcClient.call(
+    'monorail.Users', 'InviteLinkedParent', message);
+  inviteCall.then((resp) => {
+    location.reload();
+  }).catch((reason) => {
+    console.error('Inviting failed: ' + reason);
+  });
+}
+
+function AcceptIncomingInvite(ev) {
+  const email = ev.target.attributes['data-email'].value;
+  const message = {
+    email: email,
+  };
+  const acceptCall = window.prpcClient.call(
+    'monorail.Users', 'AcceptLinkedChild', message);
+  acceptCall.then((resp) => {
+    location.reload();
+  }).catch((reason) => {
+    console.error('Accepting failed: ' + reason);
+  });
+}
+
+
+function UnlinkAccounts(ev) {
+  const parent = ev.target.dataset.parent;
+  const child = ev.target.dataset.child;
+  const message = {
+    parent: {display_name: parent},
+    child: {display_name: child},
+  };
+  const unlinkCall = window.prpcClient.call(
+    'monorail.Users', 'UnlinkAccounts', message);
+  unlinkCall.then((resp) => {
+    location.reload();
+  }).catch((reason) => {
+    console.error('Unlinking failed: ' + reason);
+  });
+}
+
+
+if (parentSelect) {
+  parentSelect.onchange = function(e) {
+    const email = parentSelect.value;
+    createButton.disabled = email ? '' : 'disabled';
+  };
+}
+
+if (createButton) {
+  createButton.onclick = CreateLinkedAccountInvite;
+}
+
+if (acceptButtons) {
+  for (const acceptButton of acceptButtons) {
+    acceptButton.onclick = AcceptIncomingInvite;
+  }
+}
+
+if (unlinkButtons) {
+  for (const unlinkButton of unlinkButtons) {
+    unlinkButton.onclick = UnlinkAccounts;
+  }
+}
diff --git a/static/js/tracker/ac.js b/static/js/tracker/ac.js
new file mode 100644
index 0000000..4c0bf2b
--- /dev/null
+++ b/static/js/tracker/ac.js
@@ -0,0 +1,1010 @@
+/* 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
+ */
+
+/**
+ * An autocomplete library for javascript.
+ * Public API
+ * - _ac_install() install global handlers required for everything else to
+ *   function.
+ * - _ac_register(SC) register a store constructor (see below)
+ * - _ac_isCompleting() true iff focus is in an auto complete box and the user
+ *   has triggered completion with a keystroke, and completion has not been
+ *   cancelled (programatically or otherwise).
+ * - _ac_isCompleteListShowing() true if _as_isCompleting and the complete list
+ *   is visible to the user.
+ * - _ac_cancel() if completing, stop it, otherwise a no-op.
+ *
+ *
+ * A quick example
+ *     // an auto complete store
+ *     var myFavoritestAutoCompleteStore = new _AC_SimpleStore(
+ *       ['some', 'strings', 'to', 'complete']);
+ *
+ *     // a store constructor
+ *     _ac_register(function (inputNode, keyEvent) {
+ *         if (inputNode.id == 'my-auto-completing-check-box') {
+ *           return myFavoritestAutoCompleteStore;
+ *         }
+ *         return null;
+ *       });
+ *
+ *     <html>
+ *       <head>
+ *         <script type=text/javascript src=ac.js></script>
+ *       </head>
+ *       <body onload=_ac_install()>
+ *         <!-- the constructor above looks at the id.  It could as easily
+ *            - look at the class, name, or value.
+ *            - The autocomplete=off stops browser autocomplete from
+ *            - interfering with our autocomplete
+ *           -->
+ *         <input type=text id="my-auto-completing-check-box"
+ *          autocomplete=off>
+ *       </body>
+ *     </html>
+ *
+ *
+ * Concepts
+ * - Store Constructor function
+ *   A store constructor is a policy function with the signature
+ *     _AC_Store myStoreConstructor(
+ *       HtmlInputElement|HtmlTextAreaElement inputNode, Event keyEvent)
+ *   When a key event is received on a text input or text area, the autocomplete
+ *   library will try each of the store constructors in turn until it finds one
+ *   that returns an AC_Store which will be used for auto-completion of that
+ *   text box until focus is lost.
+ *
+ * - interface _AC_Store
+ *   An autocomplete store encapsulates all operations that affect how a
+ *   particular text node is autocompleted.  It has the following operations:
+ *   - String completable(String inputValue, int caret)
+ *     This method returns null if not completable or the section of inputValue
+ *     that is subject to completion.  If autocomplete works on items in a
+ *     comma separated list, then the input value "foo, ba" might yield "ba"
+ *     as the completable chunk since it is separated from its predecessor by
+ *     a comma.
+ *     caret is the position of the text cursor (caret) in the text input.
+ *   - _AC_Completion[] completions(String completable,
+ *                                  _AC_Completion[] toFilter)
+ *     This method returns null if there are no completions.  If toFilter is
+ *     not null or undefined, then this method may assume that toFilter was
+ *     returned as a set of completions that contain completable.
+ *   - String substitute(String inputValue, int caret,
+ *                       String completable, _AC_Completion completion)
+ *     returns the inputValue with the given completion substituted for the
+ *     given completable.  caret has the same meaning as in the
+ *     completable operation.
+ *   - String oncomplete(boolean completed, String key,
+ *                       HTMLElement element, String text)
+ *     This method is called when the user hits a completion key. The default
+ *     value is to do nothing, but you can override it if you want. Note that
+ *     key will be null if the user clicked on it to select
+ *   - Boolean autoselectFirstRow()
+ *     This method returns True by default, but subclasses can override it
+ *     to make autocomplete fields that require the user to press the down
+ *     arrow or do a mouseover once before any completion option is considered
+ *     to be selected.
+ *
+ * - class _AC_SimpleStore
+ *   An implementation of _AC_Store that completes a set of strings given at
+ *   construct time in a text field with a comma separated value.
+ *
+ * - struct _AC_Completion
+ *   a struct with two fields
+ *   - String value : the plain text completion value
+ *   - String html : the value, as html, with the completable in bold.
+ *
+ * Key Handling
+ * Several keys affect completion in an autocompleted input.
+ * ESC - the escape key cancels autocompleting.  The autocompletion will have
+ *   no effect on the focused textbox until it loses focus, regains it, and
+ *   a key is pressed.
+ * ENTER - completes using the currently selected completion, or if there is
+ *   only one, uses that completion.
+ * UP ARROW - selects the completion above the current selection.
+ * DOWN ARROW - selects the completion below the current selection.
+ *
+ *
+ * CSS styles
+ * The following CSS selector rules can be used to change the completion list
+ * look:
+ * #ac-list               style of the auto-complete list
+ * #ac-list .selected     style of the selected item
+ * #ac-list b             style of the matching text in a candidate completion
+ *
+ * Dependencies
+ * The library depends on the following libraries:
+ * javascript:base for definition of key constants and SetCursorPos
+ * javascript:shapes for nodeBounds()
+ */
+
+/**
+ * install global handlers required for the rest of the module to function.
+ */
+function _ac_install() {
+  ac_addHandler_(document.body, 'onkeydown', ac_keyevent_);
+  ac_addHandler_(document.body, 'onkeypress', ac_keyevent_);
+}
+
+/**
+ * register a store constructor
+ * @param storeConstructor a function like
+ *   _AC_Store myStoreConstructor(HtmlInputElement|HtmlTextArea, Event)
+ */
+function _ac_register(storeConstructor) {
+  // check that not already registered
+  for (let i = ac_storeConstructors.length; --i >= 0;) {
+    if (ac_storeConstructors[i] === storeConstructor) {
+      return;
+    }
+  }
+  ac_storeConstructors.push(storeConstructor);
+}
+
+/**
+ * may be attached as an onfocus handler to a text input to popup autocomplete
+ * immediately on the box gaining focus.
+ */
+function _ac_onfocus(event) {
+  ac_keyevent_(event);
+}
+
+/**
+ * true iff the autocomplete widget is currently active.
+ */
+function _ac_isCompleting() {
+  return !!ac_store && !ac_suppressCompletions;
+}
+
+/**
+ * true iff the completion list is displayed.
+ */
+function _ac_isCompleteListShowing() {
+  return !!ac_store && !ac_suppressCompletions && ac_completions &&
+    ac_completions.length;
+}
+
+/**
+ * cancel any autocomplete in progress.
+ */
+function _ac_cancel() {
+  ac_suppressCompletions = true;
+  ac_updateCompletionList(false);
+}
+
+/** add a handler without whacking any existing handler. @private */
+function ac_addHandler_(node, handlerName, handler) {
+  const oldHandler = node[handlerName];
+  if (!oldHandler) {
+    node[handlerName] = handler;
+  } else {
+    node[handlerName] = ac_fnchain_(node[handlerName], handler);
+  }
+  return oldHandler;
+}
+
+/** cancel the event. @private */
+function ac_cancelEvent_(event) {
+  if ('stopPropagation' in event) {
+    event.stopPropagation();
+  } else {
+    event.cancelBubble = true;
+  }
+
+  // This is handled in IE by returning false from the handler
+  if ('preventDefault' in event) {
+    event.preventDefault();
+  }
+}
+
+/** Call two functions, a and b, and return false if either one returns
+    false.  This is used as a primitive way to attach multiple event
+    handlers to an element without using addEventListener().   This
+    library predates the availablity of addEventListener().
+    @private
+*/
+function ac_fnchain_(a, b) {
+  return function() {
+    const ar = a.apply(this, arguments);
+    const br = b.apply(this, arguments);
+
+    // NOTE 1: (undefined && false) -> undefined
+    // NOTE 2: returning FALSE from a onkeypressed cancels it,
+    //         returning UNDEFINED does not.
+    // As such, we specifically look for falses here
+    if (ar === false || br === false) {
+      return false;
+    } else {
+      return true;
+    }
+  };
+}
+
+/** key press handler.  @private */
+function ac_keyevent_(event) {
+  event = event || window.event;
+
+  const source = getTargetFromEvent(event);
+  const isInput = 'INPUT' == source.tagName &&
+    source.type.match(/^text|email$/i);
+  const isTextarea = 'TEXTAREA' == source.tagName;
+  if (!isInput && !isTextarea) return true;
+
+  const key = event.key;
+  const isDown = event.type == 'keydown';
+  const isShiftKey = event.shiftKey;
+  let storeFound = true;
+
+  if ((source !== ac_focusedInput) || (ac_store === null)) {
+    ac_focusedInput = source;
+    storeFound = false;
+    if (ENTER_KEYNAME !== key && ESC_KEYNAME !== key) {
+      for (let i = 0; i < ac_storeConstructors.length; ++i) {
+        const store = (ac_storeConstructors[i])(source, event);
+        if (store) {
+          ac_store = store;
+          ac_store.setAvoid(event);
+          ac_oldBlurHandler = ac_addHandler_(
+              ac_focusedInput, 'onblur', _ac_ob);
+          storeFound = true;
+          break;
+        }
+      }
+
+      // There exists an odd condition where an edit box with autocomplete
+      // attached can be removed from the DOM without blur being called
+      // In which case we are left with a store around that will try to
+      // autocomplete the next edit box to receive focus. We need to clean
+      // this up
+
+      // If we can't find a store, force a blur
+      if (!storeFound) {
+        _ac_ob(null);
+      }
+    }
+    // ac-table rows need to be removed when switching to another input.
+    ac_updateCompletionList(false);
+  }
+  // If the user typed Esc when the auto-complete menu was not shown,
+  // then blur the input text field so that the user can use keyboard
+  // shortcuts.
+  const acList = document.getElementById('ac-list');
+  if (ESC_KEYNAME == key &&
+      (!acList || acList.style.display == 'none')) {
+    ac_focusedInput.blur();
+  }
+
+  if (!storeFound) return true;
+
+  const isCompletion = ac_store.isCompletionKey(key, isDown, isShiftKey);
+  const hasResults = ac_completions && (ac_completions.length > 0);
+  let cancelEvent = false;
+
+  if (isCompletion && hasResults) {
+    // Cancel any enter keystrokes if something is selected so that the
+    // browser doesn't go submitting the form.
+    cancelEvent = (!ac_suppressCompletions && !!ac_completions &&
+                      (ac_selected != -1));
+    window.setTimeout(function() {
+      if (ac_store) {
+        ac_handleKey_(key, isDown, isShiftKey);
+      }
+    }, 0);
+  } else if (!isCompletion) {
+    // Don't want to also blur the field. Up and down move the cursor (in
+    // Firefox) to the start/end of the field. We also don't want that while
+    // the list is showing.
+    cancelEvent = (key == ESC_KEYNAME ||
+                  key == DOWN_KEYNAME ||
+                  key == UP_KEYNAME);
+
+    window.setTimeout(function() {
+      if (ac_store) {
+        ac_handleKey_(key, isDown, isShiftKey);
+      }
+    }, 0);
+  } else { // implicit if (isCompletion && !hasResults)
+    if (ac_store.oncomplete) {
+      ac_store.oncomplete(false, key, ac_focusedInput, undefined);
+    }
+  }
+
+  if (cancelEvent) {
+    ac_cancelEvent_(event);
+  }
+
+  return !cancelEvent;
+}
+
+/** Autocomplete onblur handler. */
+function _ac_ob(event) {
+  if (ac_focusedInput) {
+    ac_focusedInput.onblur = ac_oldBlurHandler;
+  }
+  ac_store = null;
+  ac_focusedInput = null;
+  ac_everTyped = false;
+  ac_oldBlurHandler = null;
+  ac_suppressCompletions = false;
+  ac_updateCompletionList(false);
+}
+
+/** @constructor */
+function _AC_Store() {
+}
+/** returns the chunk of the input to treat as completable. */
+_AC_Store.prototype.completable = function(inputValue, caret) {
+  console.log('UNIMPLEMENTED completable');
+};
+/** returns the chunk of the input to treat as completable. */
+_AC_Store.prototype.completions = function(prefix, tofilter) {
+  console.log('UNIMPLEMENTED completions');
+};
+/** returns the chunk of the input to treat as completable. */
+_AC_Store.prototype.oncomplete = function(completed, key, element, text) {
+  // Call the onkeyup handler so that choosing an autocomplete option has
+  // the same side-effect as typing.  E.g., exposing the next row of input
+  // fields.
+  element.dispatchEvent(new Event('keyup'));
+  _ac_ob();
+};
+/** substitutes a completion for a completable in a text input's value. */
+_AC_Store.prototype.substitute =
+  function(inputValue, caret, completable, completion) {
+    console.log('UNIMPLEMENTED substitute');
+  };
+/** true iff hitting a comma key should complete. */
+_AC_Store.prototype.commaCompletes = true;
+/**
+ * true iff the given keystroke should cause a completion (and be consumed in
+ * the process.
+ */
+_AC_Store.prototype.isCompletionKey = function(key, isDown, isShiftKey) {
+  if (!isDown && (ENTER_KEYNAME === key ||
+                  (COMMA_KEYNAME == key && this.commaCompletes))) {
+    return true;
+  }
+  if (TAB_KEYNAME === key && !isShiftKey) {
+    // IE doesn't fire an event for tab on click in a text field, and firefox
+    // requires that the onkeypress event for tab be consumed or it navigates
+    // to next field.
+    return false;
+    // JER: return isDown == BR_IsIE();
+  }
+  return false;
+};
+
+_AC_Store.prototype.setAvoid = function(event) {
+  if (event && event.avoidValues) {
+    ac_avoidValues = event.avoidValues;
+  } else {
+    ac_avoidValues = this.computeAvoid();
+  }
+  ac_avoidValues = ac_avoidValues.map((val) => val.toLowerCase());
+};
+
+/* Subclasses may implement this to compute values to avoid
+   offering in the current input field, i.e., because those
+   values are already used. */
+_AC_Store.prototype.computeAvoid = function() {
+  return [];
+};
+
+
+function _AC_AddItemToFirstCharMap(firstCharMap, ch, s) {
+  let l = firstCharMap[ch];
+  if (!l) {
+    l = firstCharMap[ch] = [];
+  } else if (l[l.length - 1].value == s) {
+    return;
+  }
+  l.push(new _AC_Completion(s, null, ''));
+}
+
+/**
+ * an _AC_Store implementation suitable for completing lists of email
+ * addresses.
+ * @constructor
+ */
+function _AC_SimpleStore(strings, opt_docStrings) {
+  this.firstCharMap_ = {};
+
+  for (let i = 0; i < strings.length; ++i) {
+    let s = strings[i];
+    if (!s) {
+      continue;
+    }
+    if (opt_docStrings && opt_docStrings[s]) {
+      s = s + ' ' + opt_docStrings[s];
+    }
+
+    const parts = s.split(/\W+/);
+    for (let j = 0; j < parts.length; ++j) {
+      if (parts[j]) {
+        _AC_AddItemToFirstCharMap(
+            this.firstCharMap_, parts[j].charAt(0).toLowerCase(), strings[i]);
+      }
+    }
+  }
+
+  // The maximimum number of results that we are willing to show
+  this.countThreshold = 2500;
+  this.docstrings = opt_docStrings || {};
+}
+_AC_SimpleStore.prototype = new _AC_Store();
+_AC_SimpleStore.prototype.constructor = _AC_SimpleStore;
+
+_AC_SimpleStore.prototype.completable =
+  function(inputValue, caret) {
+  // complete after the last comma not inside ""s
+    let start = 0;
+    let state = 0;
+    for (let i = 0; i < caret; ++i) {
+      const ch = inputValue.charAt(i);
+      switch (state) {
+        case 0:
+          if ('"' == ch) {
+            state = 1;
+          } else if (',' == ch || ' ' == ch) {
+            start = i + 1;
+          }
+          break;
+        case 1:
+          if ('"' == ch) {
+            state = 0;
+          }
+          break;
+      }
+    }
+    while (start < caret &&
+         ' \t\r\n'.indexOf(inputValue.charAt(start)) >= 0) {
+      ++start;
+    }
+    return inputValue.substring(start, caret);
+  };
+
+
+/** Simple function to create a <span> with matching text in bold.
+ */
+function _AC_CreateSpanWithMatchHighlighted(match) {
+  const span = document.createElement('span');
+  span.appendChild(document.createTextNode(match[1] || ''));
+  const bold = document.createElement('b');
+  span.appendChild(bold);
+  bold.appendChild(document.createTextNode(match[2]));
+  span.appendChild(document.createTextNode(match[3] || ''));
+  return span;
+};
+
+
+/**
+ * Get all completions matching the given prefix.
+ * @param {string} prefix The prefix of the text to autocomplete on.
+ * @param {List.<string>?} toFilter Optional list to filter on. Otherwise will
+ *     use this.firstCharMap_ using the prefix's first character.
+ * @return {List.<_AC_Completion>} The computed list of completions.
+ */
+_AC_SimpleStore.prototype.completions = function(prefix) {
+  if (!prefix) {
+    return [];
+  }
+  toFilter = this.firstCharMap_[prefix.charAt(0).toLowerCase()];
+
+  // Since we use prefix to build a regular expression, we need to escape RE
+  // characters. We match '-', '{', '$' and others in the prefix and convert
+  // them into "\-", "\{", "\$".
+  const regexForRegexCharacters = /([\^*+\-\$\\\{\}\(\)\[\]\#?\.])/g;
+  const modifiedPrefix = prefix.replace(regexForRegexCharacters, '\\$1');
+
+  // Match the modifiedPrefix anywhere as long as it is either at the very
+  // beginning "Th" -> "The Hobbit", or comes immediately after a word separator
+  // such as "Ga" -> "The-Great-Gatsby".
+  const patternRegex = '^(.*\\W)?(' + modifiedPrefix + ')(.*)';
+  const pattern = new RegExp(patternRegex, 'i' /* ignore case */);
+
+  // We keep separate lists of possible completions that were generated
+  // by matching a value or generated by matching a docstring.  We return
+  // a concatenated list so that value matches all come before docstring
+  // matches.
+  const completions = [];
+  const docCompletions = [];
+
+  if (toFilter) {
+    const toFilterLength = toFilter.length;
+    for (let i = 0; i < toFilterLength; ++i) {
+      const docStr = this.docstrings[toFilter[i].value];
+      let compSpan = null;
+      let docSpan = null;
+      const matches = toFilter[i].value.match(pattern);
+      const docMatches = docStr && docStr.match(pattern);
+      if (matches) {
+        compSpan = _AC_CreateSpanWithMatchHighlighted(matches);
+        if (docStr) docSpan = document.createTextNode(docStr);
+      } else if (docMatches) {
+        compSpan = document.createTextNode(toFilter[i].value);
+        docSpan = _AC_CreateSpanWithMatchHighlighted(docMatches);
+      }
+
+      if (compSpan) {
+        const newCompletion = new _AC_Completion(
+            toFilter[i].value, compSpan, docSpan);
+
+        if (matches) {
+          completions.push(newCompletion);
+        } else {
+          docCompletions.push(newCompletion);
+        }
+        if (completions.length + docCompletions.length > this.countThreshold) {
+          break;
+        }
+      }
+    }
+  }
+
+  return completions.concat(docCompletions);
+};
+
+// Normally, when the user types a few characters, we aggressively
+// select the first possible completion (if any).  When the user
+// hits ENTER, that first completion is substituted.  When that
+// behavior is not desired, override this to return false.
+_AC_SimpleStore.prototype.autoselectFirstRow = function() {
+  return true;
+};
+
+// Comparison function for _AC_Completion
+function _AC_CompareACCompletion(a, b) {
+  // convert it to lower case and remove all leading junk
+  const aval = a.value.toLowerCase().replace(/^\W*/, '');
+  const bval = b.value.toLowerCase().replace(/^\W*/, '');
+
+  if (a.value === b.value) {
+    return 0;
+  } else if (aval < bval) {
+    return -1;
+  } else {
+    return 1;
+  }
+}
+
+_AC_SimpleStore.prototype.substitute =
+function(inputValue, caret, completable, completion) {
+  return inputValue.substring(0, caret - completable.length) +
+    completion.value + ', ' + inputValue.substring(caret);
+};
+
+/**
+ * a possible completion.
+ * @constructor
+ */
+function _AC_Completion(value, compSpan, docSpan) {
+  /** plain text. */
+  this.value = value;
+  if (typeof compSpan == 'string') compSpan = document.createTextNode(compSpan);
+  this.compSpan = compSpan;
+  if (typeof docSpan == 'string') docSpan = document.createTextNode(docSpan);
+  this.docSpan = docSpan;
+}
+_AC_Completion.prototype.toString = function() {
+  return '(AC_Completion: ' + this.value + ')';
+};
+
+/** registered store constructors.  @private */
+var ac_storeConstructors = [];
+/**
+ * the focused text input or textarea whether store is null or not.
+ * A text input may have focus and this may be null iff no key has been typed in
+ * the text input.
+ */
+var ac_focusedInput = null;
+/**
+ * null or the autocomplete store used to complete ac_focusedInput.
+ * @private
+ */
+var ac_store = null;
+/** store handler from ac_focusedInput. @private */
+var ac_oldBlurHandler = null;
+/**
+ * true iff user has indicated completions are unwanted (via ESC key)
+ * @private
+ */
+var ac_suppressCompletions = false;
+/**
+ * chunk of completable text seen last keystroke.
+ * Used to generate ac_completions.
+ * @private
+ */
+let ac_lastCompletable = null;
+/** an array of _AC_Completions.  @private */
+var ac_completions = null;
+/** -1 or in [0, _AC_Completions.length).  @private */
+var ac_selected = -1;
+
+/** Maximum number of options displayed in menu. @private */
+const ac_max_options = 100;
+
+/** Don't offer these values because they are already used. @private */
+let ac_avoidValues = [];
+
+/**
+ * handles all the key strokes, updating the completion list, tracking selected
+ * element, performing substitutions, etc.
+ * @private
+ */
+function ac_handleKey_(key, isDown, isShiftKey) {
+  // check completions
+  ac_checkCompletions();
+  let show = true;
+  const numCompletions = ac_completions ? ac_completions.length : 0;
+  // handle enter and tab on key press and the rest on key down
+  if (ac_store.isCompletionKey(key, isDown, isShiftKey)) {
+    if (ac_selected < 0 && numCompletions >= 1 &&
+        ac_store.autoselectFirstRow()) {
+      ac_selected = 0;
+    }
+    if (ac_selected >= 0) {
+      const backupInput = ac_focusedInput;
+      const completeValue = ac_completions[ac_selected].value;
+      ac_complete();
+      if (ac_store.oncomplete) {
+        ac_store.oncomplete(true, key, backupInput, completeValue);
+      }
+    }
+  } else {
+    switch (key) {
+      case ESC_KEYNAME: // escape
+      // JER?? ac_suppressCompletions = true;
+        ac_selected = -1;
+        show = false;
+        break;
+      case UP_KEYNAME: // up
+        if (isDown) {
+        // firefox fires arrow events on both down and press, but IE only fires
+        // then on press.
+          ac_selected = Math.max(numCompletions >= 0 ? 0 : -1, ac_selected - 1);
+        }
+        break;
+      case DOWN_KEYNAME: // down
+        if (isDown) {
+          ac_selected = Math.min(
+              ac_max_options - 1, Math.min(numCompletions - 1, ac_selected + 1));
+        }
+        break;
+    }
+
+    if (isDown) {
+      switch (key) {
+        case ESC_KEYNAME:
+        case ENTER_KEYNAME:
+        case UP_KEYNAME:
+        case DOWN_KEYNAME:
+        case RIGHT_KEYNAME:
+        case LEFT_KEYNAME:
+        case TAB_KEYNAME:
+        case SHIFT_KEYNAME:
+        case BACKSPACE_KEYNAME:
+        case DELETE_KEYNAME:
+          break;
+        default: // User typed some new characters.
+          ac_everTyped = true;
+      }
+    }
+  }
+
+  if (ac_focusedInput) {
+    ac_updateCompletionList(show);
+  }
+}
+
+/**
+ * called when an option is clicked on to select that option.
+ */
+function _ac_select(optionIndex) {
+  ac_selected = optionIndex;
+  ac_complete();
+  if (ac_store.oncomplete) {
+    ac_store.oncomplete(true, null, ac_focusedInput, ac_focusedInput.value);
+  }
+
+  // check completions
+  ac_checkCompletions();
+  ac_updateCompletionList(true);
+}
+
+function _ac_mouseover(optionIndex) {
+  ac_selected = optionIndex;
+  ac_updateCompletionList(true);
+}
+
+/** perform the substitution of the currently selected item. */
+function ac_complete() {
+  const caret = ac_getCaretPosition_(ac_focusedInput);
+  const completion = ac_completions[ac_selected];
+
+  ac_focusedInput.value = ac_store.substitute(
+      ac_focusedInput.value, caret,
+      ac_lastCompletable, completion);
+  // When the prefix starts with '*' we want to return the complete set of all
+  // possible completions. We treat the ac_lastCompletable value as empty so
+  // that the caret is correctly calculated (i.e. the caret should not consider
+  // placeholder values like '*member').
+  let new_caret = caret + completion.value.length;
+  if (!ac_lastCompletable.startsWith('*')) {
+    // Only consider the ac_lastCompletable length if it does not start with '*'
+    new_caret = new_caret - ac_lastCompletable.length;
+  }
+  // If we inserted something ending in two quotation marks, position
+  // the cursor between the quotation marks. If we inserted a complete term,
+  // skip over the trailing space so that the user is ready to enter the next
+  // term.  If we inserted just a search operator, leave the cursor immediately
+  // after the colon or equals and don't skip over the space.
+  if (completion.value.substring(completion.value.length - 2) == '""') {
+    new_caret--;
+  } else if (completion.value.substring(completion.value.length - 1) != ':' &&
+             completion.value.substring(completion.value.length - 1) != '=') {
+    new_caret++; // To account for the comma.
+    new_caret++; // To account for the space after the comma.
+  }
+  ac_selected = -1;
+  ac_completions = null;
+  ac_lastCompletable = null;
+  ac_everTyped = false;
+  SetCursorPos(window, ac_focusedInput, new_caret);
+}
+
+/**
+ * True if the user has ever typed any actual characters in the currently
+ * focused text field.  False if they have only clicked, backspaced, and
+ * used the arrow keys.
+ */
+var ac_everTyped = false;
+
+/**
+ * maintains ac_completions, ac_selected, ac_lastCompletable.
+ * @private
+ */
+function ac_checkCompletions() {
+  if (ac_focusedInput && !ac_suppressCompletions) {
+    const caret = ac_getCaretPosition_(ac_focusedInput);
+    const completable = ac_store.completable(ac_focusedInput.value, caret);
+
+    // If we already have completed, then our work here is done.
+    if (completable == ac_lastCompletable) {
+      return;
+    }
+
+    ac_completions = null;
+    ac_selected = -1;
+
+    const oldSelected =
+      ((ac_selected >= 0 && ac_selected < ac_completions.length) ?
+        ac_completions[ac_selected].value : null);
+    ac_completions = ac_store.completions(completable);
+    // Don't offer options for values that the user has already used
+    // in another part of the current form.
+    ac_completions = ac_completions.filter((comp) =>
+      FindInArray(ac_avoidValues, comp.value.toLowerCase()) === -1);
+
+    ac_selected = oldSelected ? 0 : -1;
+    ac_lastCompletable = completable;
+    return;
+  }
+  ac_lastCompletable = null;
+  ac_completions = null;
+  ac_selected = -1;
+}
+
+/**
+ * maintains the completion list GUI.
+ * @private
+ */
+function ac_updateCompletionList(show) {
+  let clist = document.getElementById('ac-list');
+  const input = ac_focusedInput;
+  if (input) {
+    input.setAttribute('aria-activedescendant', 'ac-status-row-none');
+  }
+  let tableEl;
+  let tableBody;
+  if (show && ac_completions && ac_completions.length) {
+    if (!clist) {
+      clist = document.createElement('DIV');
+      clist.id = 'ac-list';
+      clist.style.position = 'absolute';
+      clist.style.display = 'none';
+      // with 'listbox' and 'option' roles, screenreader narrates total
+      // number of options eg. 'New = issue has not .... 1 of 9'
+      document.body.appendChild(clist);
+      tableEl = document.createElement('table');
+      tableEl.setAttribute('cellpadding', 0);
+      tableEl.setAttribute('cellspacing', 0);
+      tableEl.id = 'ac-table';
+      tableEl.setAttribute('role', 'presentation');
+      tableBody = document.createElement('tbody');
+      tableBody.id = 'ac-table-body';
+      tableEl.appendChild(tableBody);
+      tableBody.setAttribute('role', 'listbox');
+      clist.appendChild(tableEl);
+      input.setAttribute('aria-controls', 'ac-table');
+      input.setAttribute('aria-haspopup', 'grid');
+    } else {
+      tableEl = document.getElementById('ac-table');
+      tableBody = document.getElementById('ac-table-body');
+      while (tableBody.childNodes.length) {
+        tableBody.removeChild(tableBody.childNodes[0]);
+      }
+    }
+
+    // If no choice is selected, then select the first item, if desired.
+    if (ac_selected < 0 && ac_store && ac_store.autoselectFirstRow()) {
+      ac_selected = 0;
+    }
+
+    let headerCount= 0;
+    for (let i = 0; i < Math.min(ac_max_options, ac_completions.length); ++i) {
+      if (ac_completions[i].heading) {
+        var rowEl = document.createElement('tr');
+        tableBody.appendChild(rowEl);
+        const cellEl = document.createElement('th');
+        rowEl.appendChild(cellEl);
+        cellEl.setAttribute('colspan', 2);
+        if (headerCount) {
+          cellEl.appendChild(document.createElement('br'));
+        }
+        cellEl.appendChild(
+            document.createTextNode(ac_completions[i].heading));
+        headerCount++;
+      } else {
+        var rowEl = document.createElement('tr');
+        tableBody.appendChild(rowEl);
+        if (i == ac_selected) {
+          rowEl.className = 'selected';
+        }
+        rowEl.id = `ac-status-row-${i}`;
+        rowEl.setAttribute('data-index', i);
+        rowEl.setAttribute('role', 'option');
+        rowEl.addEventListener('mousedown', function(event) {
+          event.preventDefault();
+        });
+        rowEl.addEventListener('mouseup', function(event) {
+          let target = event.target;
+          while (target && target.tagName != 'TR') {
+            target = target.parentNode;
+          }
+          const idx = Number(target.getAttribute('data-index'));
+          try {
+            _ac_select(idx);
+          } finally {
+            return false;
+          }
+        });
+        rowEl.addEventListener('mouseover', function(event) {
+          let target = event.target;
+          while (target && target.tagName != 'TR') {
+            target = target.parentNode;
+          }
+          const idx = Number(target.getAttribute('data-index'));
+          _ac_mouseover(idx);
+        });
+        const valCellEl = document.createElement('td');
+        rowEl.appendChild(valCellEl);
+        if (ac_completions[i].compSpan) {
+          valCellEl.appendChild(ac_completions[i].compSpan);
+        }
+        const docCellEl = document.createElement('td');
+        rowEl.appendChild(docCellEl);
+        if (ac_completions[i].docSpan &&
+            ac_completions[i].docSpan.textContent) {
+          docCellEl.appendChild(document.createTextNode(' = '));
+          docCellEl.appendChild(ac_completions[i].docSpan);
+        }
+      }
+    }
+
+    // position
+    const inputBounds = nodeBounds(ac_focusedInput);
+    clist.style.left = inputBounds.x + 'px';
+    clist.style.top = (inputBounds.y + inputBounds.h) + 'px';
+
+    window.setTimeout(ac_autoscroll, 100);
+    input.setAttribute('aria-activedescendant', `ac-status-row-${ac_selected}`);
+    // Note - we use '' instead of 'block', since 'block' has odd effects on
+    // the screen in IE, and causes scrollbars to resize
+    clist.style.display = '';
+  } else {
+    tableBody = document.getElementById('ac-table-body');
+    if (clist && tableBody) {
+      clist.style.display = 'none';
+      while (tableBody.childNodes.length) {
+        tableBody.removeChild(tableBody.childNodes[0]);
+      }
+    }
+  }
+}
+
+// TODO(jrobbins): make arrow keys and mouse not conflict if they are
+// used at the same time.
+
+
+/** Scroll the autocomplete menu to show the currently selected row. */
+function ac_autoscroll() {
+  const acList = document.getElementById('ac-list');
+  const acSelRow = acList.getElementsByClassName('selected')[0];
+  const acSelRowTop = acSelRow ? acSelRow.offsetTop : 0;
+  const acSelRowHeight = acSelRow ? acSelRow.offsetHeight : 0;
+
+
+  const EXTRA = 8; // Go an extra few pixels so the next row is partly exposed.
+
+  if (!acList || !acSelRow) return;
+
+  // Autoscroll upward if the selected item is above the visible area,
+  // else autoscroll downward if the selected item is below the visible area.
+  if (acSelRowTop < acList.scrollTop) {
+    acList.scrollTop = acSelRowTop - EXTRA;
+  } else if (acSelRowTop + acSelRowHeight + EXTRA >
+             acList.scrollTop + acList.offsetHeight) {
+    acList.scrollTop = (acSelRowTop + acSelRowHeight -
+                        acList.offsetHeight + EXTRA);
+  }
+}
+
+
+/** the position of the text caret in the given text field.
+ *
+ * @param textField an INPUT node with type=text or a TEXTAREA node
+ * @return an index in [0, textField.value.length]
+ */
+function ac_getCaretPosition_(textField) {
+  if ('INPUT' == textField.tagName) {
+    let caret = textField.value.length;
+
+    // chrome/firefox
+    if (undefined != textField.selectionStart) {
+      caret = textField.selectionEnd;
+
+      // JER: Special treatment for issue status field that makes all
+      // options show up more often
+      if (textField.id.startsWith('status')) {
+        caret = textField.selectionStart;
+      }
+      // ie
+    } else if (document.selection) {
+      // get an empty selection range
+      const range = document.selection.createRange();
+      const origSelectionLength = range.text.length;
+      // Force selection start to 0 position
+      range.moveStart('character', -caret);
+      // the caret end position is the new selection length
+      caret = range.text.length;
+
+      // JER: Special treatment for issue status field that makes all
+      // options show up more often
+      if (textField.id.startsWith('status')) {
+        // The amount that the selection grew when we forced start to
+        // position 0 is == the original start position.
+        caret = range.text.length - origSelectionLength;
+      }
+    }
+
+    return caret;
+  } else {
+    // a textarea
+
+    return GetCursorPos(window, textField);
+  }
+}
+
+function getTargetFromEvent(event) {
+  let targ = event.target || event.srcElement;
+  if (targ.shadowRoot) {
+    // Find the element within the shadowDOM.
+    const path = event.path || event.composedPath();
+    targ = path[0];
+  }
+  return targ;
+}
diff --git a/static/js/tracker/ac_test.js b/static/js/tracker/ac_test.js
new file mode 100644
index 0000000..30eedc5
--- /dev/null
+++ b/static/js/tracker/ac_test.js
@@ -0,0 +1,40 @@
+/* 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
+ */
+
+var firstCharMap;
+
+function setUp() {
+  firstCharMap = new Object();
+}
+
+function testAddItemToFirstCharMap_OneWordLabel() {
+  _AC_AddItemToFirstCharMap(firstCharMap, 'h', 'Hot');
+  let hArray = firstCharMap['h'];
+  assertEquals(1, hArray.length);
+  assertEquals('Hot', hArray[0].value);
+
+  _AC_AddItemToFirstCharMap(firstCharMap, '-', '-Hot');
+  _AC_AddItemToFirstCharMap(firstCharMap, 'h', '-Hot');
+  let minusArray = firstCharMap['-'];
+  assertEquals(1, minusArray.length);
+  assertEquals('-Hot', minusArray[0].value);
+  hArray = firstCharMap['h'];
+  assertEquals(2, hArray.length);
+  assertEquals('Hot', hArray[0].value);
+  assertEquals('-Hot', hArray[1].value);
+}
+
+function testAddItemToFirstCharMap_KeyValueLabels() {
+  _AC_AddItemToFirstCharMap(firstCharMap, 'p', 'Priority-High');
+  _AC_AddItemToFirstCharMap(firstCharMap, 'h', 'Priority-High');
+  let pArray = firstCharMap['p'];
+  assertEquals(1, pArray.length);
+  assertEquals('Priority-High', pArray[0].value);
+  let hArray = firstCharMap['h'];
+  assertEquals(1, hArray.length);
+  assertEquals('Priority-High', hArray[0].value);
+}
diff --git a/static/js/tracker/externs.js b/static/js/tracker/externs.js
new file mode 100644
index 0000000..2a92f58
--- /dev/null
+++ b/static/js/tracker/externs.js
@@ -0,0 +1,115 @@
+/* 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
+ */
+/* eslint-disable no-var */
+
+// Defined in framework/js:core_scripts
+var _hideID;
+var _showID;
+var _hideEl;
+var _showEl;
+var _showInstead;
+var _toggleHidden;
+
+var _selectAllIssues;
+var _selectNoneIssues;
+
+var _toggleRows;
+var _toggleColumn;
+var _toggleColumnUpdate;
+var _addGroupBy;
+var _addcol;
+var _checkRangeSelect;
+var _setRowLinks;
+var _makeIssueLink;
+
+var _onload;
+
+var _handleListActions;
+var _handleDetailActions;
+
+var _loadStatusSelect;
+var _fetchOptions;
+var _setACOptions;
+var _openIssueUpdateForm;
+var _addAttachmentFields;
+var _ignoreWidgetIfOpIsClear;
+
+var _formatContextQueryArgs;
+var _ctxArgs;
+var _ctxCan;
+var _ctxQuery;
+var _ctxSortspec;
+var _ctxGroupBy;
+var _ctxDefaultColspec;
+var _ctxStart;
+var _ctxNum;
+var _ctxResultsPerPage;
+
+var _filterTo;
+var _sortUp;
+var _sortDown;
+
+var _closeAllPopups;
+var _closeSubmenus;
+var _showRight;
+var _showBelow;
+var _highlightRow;
+var _highlightRowCallback;
+var _allColumnNames;
+
+var _setFieldIDs;
+var _selectTemplate;
+var _saveTemplate;
+var _newTemplate;
+var _deleteTemplate;
+var _switchTemplate;
+var _templateNames;
+
+var _confirmNovelStatus;
+var _confirmNovelLabel;
+var _lfidprefix;
+var _allOrigLabels;
+var _vallab;
+var _exposeExistingLabelFields;
+var _confirmDiscardEntry;
+var _confirmDiscardUpdate;
+var _checkPlusOne;
+var _checkUnrestrict;
+
+var _clearOnFirstEvent;
+var _forceProperTableWidth;
+
+var _acof;
+var _acmo;
+var _acse;
+var _acstore;
+var _acreg;
+var _accomp;
+var _acrob;
+
+var _d;
+
+var _getColspec;
+
+var issueRefs;
+
+var kibbles;
+var _setupKibblesOnEntryPage;
+var _setupKibblesOnListPage;
+var _setupKibblesOnDetailPage;
+
+var CS_env;
+
+var _checkFieldNameOnServer;
+var _checkLeafName;
+
+var _addMultiFieldValueWidget;
+var _removeMultiFieldValueWidget;
+var console;
+var _trimCommas;
+
+var _initDragAndDrop;
diff --git a/static/js/tracker/render-hotlist-table.js b/static/js/tracker/render-hotlist-table.js
new file mode 100644
index 0000000..5004296
--- /dev/null
+++ b/static/js/tracker/render-hotlist-table.js
@@ -0,0 +1,436 @@
+/* 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
+ */
+
+/**
+ * This file contains JS functions used in rendering a hotlistissues table
+ */
+
+
+/**
+ * Helper function to set several attributes of an element at once.
+ * @param {Element} el element that is getting the attributes
+ * @param {dict} attrs Dictionary of {attrName: attrValue, ..}
+ */
+function setAttributes(el, attrs) {
+  for (let key in attrs) {
+    el.setAttribute(key, attrs[key]);
+  }
+}
+
+// TODO(jojwang): readOnly is currently empty string, figure out what it should be
+// ('True'/'False' 'yes'/'no'?).
+
+/**
+ * Helper function for creating a <td> element that contains the widgets of the row.
+ * @param {dict} tableRow dictionary {'projectName': 'name', .. } of relevant row info.
+ * @param {} readOnly.
+ * @param {boolean} userLoggedIn is the current user logged in.
+ * @return an element containing the widget elements
+ */
+function createWidgets(tableRow, readOnly, userLoggedIn) {
+  let widgets = document.createElement('td');
+  widgets.setAttribute('class', 'rowwidgets nowrap');
+
+  let gripper = document.createElement('i');
+  gripper.setAttribute('class', 'material-icons gripper');
+  gripper.setAttribute('title', 'Drag issue');
+  gripper.textContent = 'drag_indicator';
+  widgets.appendChild(gripper);
+
+  if (!readOnly) {
+    if (userLoggedIn) {
+      // TODO(jojwang): for bulk edit, only show a checkbox next to an issue that
+      // the user has permission to edit.
+      let checkbox = document.createElement('input');
+      setAttributes(checkbox, {'class': 'checkRangeSelect',
+        'id': 'cb_' + tableRow['issueRef'],
+        'type': 'checkbox'});
+      widgets.appendChild(checkbox);
+      widgets.appendChild(document.createTextNode(' '));
+
+      let star = document.createElement('a');
+      let starColor = tableRow['isStarred'] ? 'cornflowerblue' : 'gray';
+      let starred = tableRow['isStarred'] ? 'Un-s' : 'S';
+      setAttributes(star, {'class': 'star',
+        'id': 'star-' + tableRow['projectName'] + tableRow['localID'],
+        'style': 'color:' + starColor,
+        'title': starred + 'tar this issue',
+        'data-project-name': tableRow['projectName'],
+        'data-local-id': tableRow['localID']});
+      star.textContent = (tableRow['isStarred'] ? '\u2605' : '\u2606');
+      widgets.appendChild(star);
+    }
+  }
+  return widgets;
+}
+
+
+/**
+ * Helper function to set attributes and add Nodes for an ID cell.
+ * @param {Element} td element to be added to current row in table.
+ * @param {dict} tableRow dictionary {'projectName': 'name', .. } of relevant row info.
+ * @param {boolean} isCrossProject are issues in the table from more than one project.
+*/
+function createIDCell(td, tableRow, isCrossProject) {
+  td.classList.add('id');
+  let aLink = document.createElement('a');
+  aLink.setAttribute('href', tableRow['issueCleanURL']);
+  aLink.setAttribute('class', 'computehref');
+  let aLinkContent = (isCrossProject ? (tableRow['projectName'] + ':') : '' ) + tableRow['localID'];
+  aLink.textContent = aLinkContent;
+  td.appendChild(aLink);
+}
+
+function createProjectCell(td, tableRow) {
+  td.classList.add('project');
+  let aLink = document.createElement('a');
+  aLink.setAttribute('href', tableRow['projectURL']);
+  aLink.textContent = tableRow['projectName'];
+  td.appendChild(aLink);
+}
+
+function createEditableNoteCell(td, cell, projectName, localID, hotlistID) {
+  let textBox = document.createElement('textarea');
+  setAttributes(textBox, {
+    'id': `itemnote_${projectName}_${localID}`,
+    'placeholder': '---',
+    'class': 'itemnote rowwidgets',
+    'projectname': projectName,
+    'localid': localID,
+    'style': 'height:15px',
+  });
+  if (cell['values'].length > 0) {
+    textBox.value = cell['values'][0]['item'];
+  }
+  textBox.addEventListener('blur', function(e) {
+    saveNote(e.target, hotlistID);
+  });
+  debouncedKeyHandler = debounce(function(e) {
+    saveNote(e.target, hotlistID);
+  });
+  textBox.addEventListener('keyup', debouncedKeyHandler, false);
+  td.appendChild(textBox);
+}
+
+function enter_detector(e) {
+  if (e.which==13||e.keyCode==13) {
+    this.blur();
+  }
+}
+
+
+/**
+ * Helper function to set attributes and add Nodes for an Summary cell.
+ * @param {Element} td element to be added to current row in table.
+ * @param {dict} cell dictionary {'values': [], .. } of relevant cell info.
+ * @param {string=} projectName The name of the project the summary references.
+*/
+function createSummaryCell(td, cell, projectName) {
+  // TODO(jojwang): detect when links are present and make clicking on cell go
+  // to link, not issue details page
+  td.setAttribute('style', 'width:100%');
+  fillValues(td, cell['values']);
+  fillNonColumnLabels(td, cell['nonColLabels'], projectName);
+}
+
+
+/**
+ * Helper function to set attributes and add Nodes for an Attribute or Unfilterable cell.
+ * @param {Element} td element to be added to current row in table.
+ * @param {dict} cell dictionary {'type': 'Summary', .. } of relevant cell info.
+*/
+function createAttrAndUnfiltCell(td, cell) {
+  if (cell['noWrap'] == 'yes') {
+    td.className += ' nowrapspan';
+  }
+  if (cell['align']) {
+    td.setAttribute('align', cell['align']);
+  }
+  fillValues(td, cell['values']);
+}
+
+function createUrlCell(td, cell) {
+  td.classList.add('url');
+  cell.values.forEach((value) => {
+    let aLink = document.createElement('a');
+    aLink.href = value['item'];
+    aLink.target = '_blank';
+    aLink.rel = 'nofollow';
+    aLink.textContent = value['item'];
+    aLink.classList.add('fieldvalue_url');
+    td.appendChild(aLink);
+  });
+}
+
+function createIssuesCell(td, cell) {
+  td.classList.add('url');
+  if (cell.values.length > 0) {
+    cell.values.forEach( function(value, index, array) {
+      const span = document.createElement('span');
+      if (value['isDerived']) {
+        span.className = 'derived';
+      }
+      const a = document.createElement('a');
+      a.href = value['href'];
+      a.rel = 'nofollow"';
+      if (value['title']) {
+        a.title = value['title'];
+      }
+      if (value['closed']) {
+        a.style.textDecoration = 'line-through';
+      }
+      a.textContent = value['id'];
+      span.appendChild(a);
+      td.appendChild(span);
+      if (index != array.length-1) {
+        td.appendChild(document.createTextNode(', '));
+      }
+    });
+  } else {
+    td.textContent = '---';
+  }
+}
+
+/**
+ * Helper function to fill a td element with a cell's non-column labels.
+ * @param {Element} td element to be added to current row in table.
+ * @param {list} labels list of dictionaries with relevant (key, value) for
+ *   each label
+ * @param {string=} projectName The name of the project the labels reference.
+ */
+function fillNonColumnLabels(td, labels, projectName) {
+  labels.forEach( function(label) {
+    const aLabel = document.createElement('a');
+    setAttributes(aLabel,
+        {
+          'class': 'label',
+          'href': `/p/${projectName}/issues/list?q=label:${label['value']}`,
+        });
+    if (label['isDerived']) {
+      const i = document.createElement('i');
+      i.textContent = label['value'];
+      aLabel.appendChild(i);
+    } else {
+      aLabel.textContent = label['value'];
+    }
+    td.appendChild(document.createTextNode(' '));
+    td.appendChild(aLabel);
+  });
+}
+
+
+/**
+ * Helper function to fill a td element with a cell's value(s).
+ * @param {Element} td element to be added to current row in table.
+ * @param {list} values list of dictionaries with relevant (key, value) for each value
+ */
+function fillValues(td, values) {
+  if (values.length > 0) {
+    values.forEach( function(value, index, array) {
+      let span = document.createElement('span');
+      if (value['isDerived']) {
+        span.className = 'derived';
+      }
+      span.textContent = value['item'];
+      td.appendChild(span);
+      if (index != array.length-1) {
+        td.appendChild(document.createTextNode(', '));
+      }
+    });
+  } else {
+    td.textContent = '---';
+  }
+}
+
+
+/**
+ * Helper function to create a table row.
+ * @param {dict} tableRow dictionary {'projectName': 'name', .. } of relevant row info.
+ * @param {dict} pageSettings dict of relevant settings for the hotlist and user viewing the page.
+ */
+function renderHotlistRow(tableRow, pageSettings) {
+  let tr = document.createElement('tr');
+  if (pageSettings['cursor'] == tableRow['issueRef']) {
+    tr.setAttribute('class', 'ifOpened hoverTarget cursor_on drag_item');
+  } else {
+    tr.setAttribute('class', 'ifOpened hoverTarget cursor_off drag_item');
+  }
+
+  setAttributes(tr, {'data-idx': tableRow['idx'], 'data-id': tableRow['issueID'], 'issue-context-url': tableRow['issueContextURL']});
+  widgets = createWidgets(tableRow, pageSettings['readOnly'],
+    pageSettings['userLoggedIn']);
+  tr.appendChild(widgets);
+  tableRow['cells'].forEach(function(cell) {
+    let td = document.createElement('td');
+    td.setAttribute('class', 'col_' + cell['colIndex']);
+    if (cell['type'] == 'ID') {
+      createIDCell(td, tableRow, (pageSettings['isCrossProject'] == 'True'));
+    } else if (cell['type'] == 'summary') {
+      createSummaryCell(td, cell, tableRow['projectName']);
+    } else if (cell['type'] == 'note') {
+      if (pageSettings['ownerPerm'] || pageSettings['editorPerm']) {
+        createEditableNoteCell(
+          td, cell, tableRow['projectName'], tableRow['localID'],
+          pageSettings['hotlistID']);
+      } else {
+        createSummaryCell(td, cell, tableRow['projectName']);
+      }
+    } else if (cell['type'] == 'project') {
+      createProjectCell(td, tableRow);
+    } else if (cell['type'] == 'url') {
+      createUrlCell(td, cell);
+    } else if (cell['type'] == 'issues') {
+      createIssuesCell(td, cell);
+    } else {
+      createAttrAndUnfiltCell(td, cell);
+    }
+    tr.appendChild(td);
+  });
+  let directLinkURL = tableRow['issueCleanURL'];
+  let directLink = document.createElement('a');
+  directLink.setAttribute('class', 'directlink material-icons');
+  directLink.setAttribute('href', directLinkURL);
+  directLink.textContent = 'link'; // Renders as a link icon.
+  let lastCol = document.createElement('td');
+  lastCol.appendChild(directLink);
+  tr.appendChild(lastCol);
+  return tr;
+}
+
+
+/**
+ * Helper function to create the group header row
+ * @param {dict} group dict of relevant values for the current group
+ * @return a <tr> element to be added to the current <tbody>
+ */
+function renderGroupRow(group) {
+  let tr = document.createElement('tr');
+  tr.setAttribute('class', 'group_row');
+  let td = document.createElement('td');
+  setAttributes(td, {'colspan': '100', 'class': 'toggleHidden'});
+  let whenClosedImg = document.createElement('img');
+  setAttributes(whenClosedImg, {'class': 'ifClosed', 'src': '/static/images/plus.gif'});
+  td.appendChild(whenClosedImg);
+  let whenOpenImg = document.createElement('img');
+  setAttributes(whenOpenImg, {'class': 'ifOpened', 'src': '/static/images/minus.gif'});
+  td.appendChild(whenOpenImg);
+  tr.appendChild(td);
+
+  div = document.createElement('div');
+  div.textContent += group['rowsInGroup'];
+
+  div.textContent += (group['rowsInGroup'] == '1' ? ' issue:': ' issues:');
+
+  group['cells'].forEach(function(cell) {
+    let hasValue = false;
+    cell['values'].forEach(function(value) {
+      if (value['item'] !== 'None') {
+        hasValue = true;
+      }
+    });
+    if (hasValue) {
+      cell.values.forEach(function(value) {
+        div.textContent += (' ' + cell['groupName'] + '=' + value['item']);
+      });
+    } else {
+      div.textContent += (' -has:' + cell['groupName']);
+    }
+  });
+  td.appendChild(div);
+  return tr;
+}
+
+
+/**
+ * Builds the body of a hotlistissues table.
+ * @param {dict} tableData dict of relevant values from 'table_data'
+ * @param {dict} pageSettings dict of relevant settings for the hotlist and user viewing the page.
+ */
+function renderHotlistTable(tableData, pageSettings) {
+  let tbody;
+  let table = $('resultstable');
+
+  // TODO(jojwang): this would not work if grouping did not require a page refresh
+  // that wiped the table of all its children. This should be redone to be more
+  // robust.
+  // This loop only does anything when reranking is enabled.
+  for (i=0; i < table.childNodes.length; i++) {
+    if (table.childNodes[i].tagName == 'TBODY') {
+      table.removeChild(table.childNodes[i]);
+    }
+  }
+
+  tableData.forEach(function(tableRow) {
+    if (tableRow['group'] !== 'no') {
+      // add current tbody to table, need a new tbody with group row
+      if (typeof tbody !== 'undefined') {
+        table.appendChild(tbody);
+      }
+      tbody = document.createElement('tbody');
+      tbody.setAttribute('class', 'opened');
+      tbody.appendChild(renderGroupRow(tableRow['group']));
+    }
+    if (typeof tbody == 'undefined') {
+      tbody = document.createElement('tbody');
+    }
+    tbody.appendChild(renderHotlistRow(tableRow, pageSettings));
+  });
+  tbody.appendChild(document.createElement('tr'));
+  table.appendChild(tbody);
+
+  let stars = document.getElementsByClassName('star');
+  for (var i = 0; i < stars.length; ++i) {
+    let star = stars[i];
+    star.addEventListener('click', function(event) {
+      let projectName = event.target.getAttribute('data-project-name');
+      let localID = event.target.getAttribute('data-local-id');
+      _TKR_toggleStar(event.target, projectName, localID, null, null, null);
+    });
+  }
+}
+
+
+/**
+ * Activates the drag and drop functionality of the hotlistissues table.
+ * @param {dict} tableData dict of relevant values from the 'table_data' of
+ *  hotlistissues servlet. This is used when a drag and drop motion does not
+ *  result in any changes in the ordering of the issues.
+ * @param {dict} pageSettings dict of relevant settings for the hotlist and user
+ *  viewing the page.
+ * @param {str} hotlistID the number ID of the current hotlist
+*/
+function activateDragDrop(tableData, pageSettings, hotlistID) {
+  function onHotlistRerank(srcID, targetID, position) {
+    let data = {
+      target_id: targetID,
+      moved_ids: srcID,
+      split_above: position == 'above',
+      colspec: pageSettings['colSpec'],
+      can: pageSettings['can'],
+    };
+    CS_doPost(hotlistID + '/rerank.do', onHotlistResponse, data);
+  }
+
+  function onHotlistResponse(event) {
+    let xhr = event.target;
+    if (xhr.readyState != 4) {
+      return;
+    }
+    if (xhr.status != 200) {
+      window.console.error('200 page error');
+      // TODO(jojwang): fill this in more
+      return;
+    }
+    let response = CS_parseJSON(xhr);
+    renderHotlistTable(
+      (response['table_data'] == '' ? tableData : response['table_data']),
+      pageSettings);
+    // TODO(jojwang): pass pagination state to server
+    _initDragAndDrop($('resultstable'), onHotlistRerank, true);
+  }
+  _initDragAndDrop($('resultstable'), onHotlistRerank, true);
+}
diff --git a/static/js/tracker/tracker-ac.js b/static/js/tracker/tracker-ac.js
new file mode 100644
index 0000000..4d98ac1
--- /dev/null
+++ b/static/js/tracker/tracker-ac.js
@@ -0,0 +1,1285 @@
+/* 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
+ */
+/* eslint-disable camelcase */
+/* eslint-disable no-unused-vars */
+
+/**
+ * This file contains the autocomplete configuration logic that is
+ * specific to the issue fields of Monorail.  It depends on ac.js, our
+ * modified version of the autocomplete library.
+ */
+
+/**
+ * This is an autocomplete store that holds the hotlists of the current user.
+ */
+let TKR_hotlistsStore;
+
+/**
+ * This is an autocomplete store that holds well-known issue label
+ * values for the current project.
+ */
+let TKR_labelStore;
+
+/**
+ * Like TKR_labelStore but stores only label prefixes.
+ */
+let TKR_labelPrefixStore;
+
+/**
+ * Like TKR_labelStore but adds a trailing comma instead of replacing.
+ */
+let TKR_labelMultiStore;
+
+/**
+ * This is an autocomplete store that holds issue components.
+ */
+let TKR_componentStore;
+
+/**
+ * Like TKR_componentStore but adds a trailing comma instead of replacing.
+ */
+let TKR_componentListStore;
+
+/**
+ * This is an autocomplete store that holds many different kinds of
+ * items that can be shown in the artifact search autocomplete.
+ */
+let TKR_searchStore;
+
+/**
+ * This is similar to TKR_searchStore, but does not include any suggestions
+ * to use the "me" keyword. Using "me" is not a good idea for project canned
+ * queries and filter rules.
+ */
+let TKR_projectQueryStore;
+
+/**
+ * This is an autocomplete store that holds items for the quick edit
+ * autocomplete.
+ */
+// TODO(jrobbins): add options for fields and components.
+let TKR_quickEditStore;
+
+/**
+ * This is a list of label prefixes that each issue should only use once.
+ * E.g., each issue should only have one Priority-* label.  We do not prevent
+ * the user from using multiple such labels, we just warn the user before
+ * they submit.
+ */
+let TKR_exclPrefixes = [];
+
+/**
+ * This is an autocomplete store that holds custom permission names that
+ * have already been used in this project.
+ */
+let TKR_customPermissionsStore;
+
+
+/**
+ * This is an autocomplete store that holds well-known issue status
+ * values for the current project.
+ */
+let TKR_statusStore;
+
+
+/**
+ * This is an autocomplete store that holds the usernames of all the
+ * members of the current project.  This is used for autocomplete in
+ * the cc-list of an issue, where many user names can entered with
+ * commas between them.
+ */
+let TKR_memberListStore;
+
+
+/**
+ * This is an autocomplete store that holds the projects that the current
+ * user is contributor/member/owner of.
+ */
+let TKR_projectStore;
+
+/**
+ * This is an autocomplete store that holds the usernames of possible
+ * issue owners in the current project.  The list of possible issue
+ * owners is the same as the list of project members, but the behavior
+ * of this autocompete store is different because the issue owner text
+ * field can only accept one value.
+ */
+let TKR_ownerStore;
+
+
+/**
+ * This is an autocomplete store that holds any list of string for choices.
+ */
+let TKR_autoCompleteStore;
+
+
+/**
+ * An array of autocomplete stores used for user-type custom fields.
+ */
+const TKR_userAutocompleteStores = [];
+
+
+/**
+ * This boolean controls whether odd-ball status and labels are treated as
+ * a warning or an error.  Normally, it is False.
+ */
+// TODO(jrobbins): split this into one option for statuses and one for labels.
+let TKR_restrict_to_known;
+
+/**
+ * This substitute function should be used for multi-valued autocomplete fields
+ * that are delimited by commas. When we insert an autocomplete value, replace
+ * an entire search term. Add a comma and a space after it if it is a complete
+ * search term.
+ */
+function TKR_acSubstituteWithComma(inputValue, caret, completable, completion) {
+  let nextTerm = caret;
+
+  // Subtract one in case the cursor is at the end of the input, before a comma.
+  let prevTerm = caret - 1;
+  while (nextTerm < inputValue.length - 1 && inputValue.charAt(nextTerm) !== ',') {
+    nextTerm++;
+  }
+  // Set this at the position after the found comma.
+  nextTerm++;
+
+  while (prevTerm > 0 && ![',', ' '].includes(inputValue.charAt(prevTerm))) {
+    prevTerm--;
+  }
+  if (prevTerm > 0) {
+    // Set this boundary after the found space/comma if it's not the beginning
+    // of the field.
+    prevTerm++;
+  }
+
+  return inputValue.substring(0, prevTerm) +
+         completion.value + ', ' + inputValue.substring(nextTerm);
+}
+
+/**
+ * When the prefix starts with '*', return the complete set of all
+ * possible completions.
+ * @param {string} prefix If this starts with '*', return all possible
+ * completions.  Otherwise return null.
+ * @param {Array} labelDefs The array of label names and docstrings.
+ * @return Array of new _AC_Completions for each possible completion, or null.
+ */
+function TKR_fullComplete(prefix, labelDefs) {
+  if (!prefix.startsWith('*')) return null;
+  const out = [];
+  for (let i = 0; i < labelDefs.length; i++) {
+    out.push(new _AC_Completion(labelDefs[i].name,
+        labelDefs[i].name,
+        labelDefs[i].doc));
+  }
+  return out;
+}
+
+
+/**
+ * Constucts a list of all completions for both open and closed
+ * statuses, with a header for each group.
+ * @param {string} prefix If starts with '*', return all possible completions,
+ * else return null.
+ * @param {Array} openStatusDefs The array of open status values and
+ * docstrings.
+ * @param {Array} closedStatusDefs The array of closed status values
+ * and docstrings.
+ * @return Array of new _AC_Completions for each possible completion, or null.
+ */
+function TKR_openClosedComplete(prefix, openStatusDefs, closedStatusDefs) {
+  if (!prefix.startsWith('*')) return null;
+  const out = [];
+  out.push({heading: 'Open Statuses:'}); // TODO: i18n
+  for (var i = 0; i < openStatusDefs.length; i++) {
+    out.push(new _AC_Completion(openStatusDefs[i].name,
+        openStatusDefs[i].name,
+        openStatusDefs[i].doc));
+  }
+  out.push({heading: 'Closed Statuses:'}); // TODO: i18n
+  for (var i = 0; i < closedStatusDefs.length; i++) {
+    out.push(new _AC_Completion(closedStatusDefs[i].name,
+        closedStatusDefs[i].name,
+        closedStatusDefs[i].doc));
+  }
+  return out;
+}
+
+
+function TKR_setUpHotlistsStore(hotlists) {
+  const docdict = {};
+  const ref_strs = [];
+
+  for (let i = 0; i < hotlists.length; i++) {
+    ref_strs.push(hotlists[i]['ref_str']);
+    docdict[hotlists[i]['ref_str']] = hotlists[i]['summary'];
+  }
+
+  TKR_hotlistsStore = new _AC_SimpleStore(ref_strs, docdict);
+  TKR_hotlistsStore.substitute = TKR_acSubstituteWithComma;
+}
+
+
+/**
+ * An array of definitions of all well-known issue statuses.  Each
+ * definition has the name of the status value, and a docstring that
+ * describes its meaning.
+ */
+let TKR_statusWords = [];
+
+
+/**
+ * Constuct a new autocomplete store with all the well-known issue
+ * status values.  The store has some DIT-specific methods.
+ * TODO(jrobbins): would it be easier to define my own class to use
+ * instead of _AC_Simple_Store?
+ * @param {Array} openStatusDefs An array of definitions of the
+ * well-known open status values.  Each definition has a name and
+ * docstring.
+ * @param {Array} closedStatusDefs An array of definitions of the
+ * well-known closed status values.  Each definition has a name and
+ * docstring.
+ */
+function TKR_setUpStatusStore(openStatusDefs, closedStatusDefs) {
+  const docdict = {};
+  TKR_statusWords = [];
+  for (var i = 0; i < openStatusDefs.length; i++) {
+    var status = openStatusDefs[i];
+    TKR_statusWords.push(status.name);
+    docdict[status.name] = status.doc;
+  }
+  for (var i = 0; i < closedStatusDefs.length; i++) {
+    var status = closedStatusDefs[i];
+    TKR_statusWords.push(status.name);
+    docdict[status.name] = status.doc;
+  }
+
+  TKR_statusStore = new _AC_SimpleStore(TKR_statusWords, docdict);
+
+  TKR_statusStore.commaCompletes = false;
+
+  TKR_statusStore.substitute =
+  function(inputValue, cursor, completable, completion) {
+    return completion.value;
+  };
+
+  TKR_statusStore.completable = function(inputValue, cursor) {
+    if (!ac_everTyped) return '*status';
+    return inputValue;
+  };
+
+  TKR_statusStore.completions = function(prefix, tofilter) {
+    const fullList = TKR_openClosedComplete(prefix,
+        openStatusDefs,
+        closedStatusDefs);
+    if (fullList) return fullList;
+    return _AC_SimpleStore.prototype.completions.call(this, prefix, tofilter);
+  };
+}
+
+
+/**
+ * Simple function to add a given item to the list of items used to construct
+ * an "autocomplete store", and also update the docstring that describes
+ * that item.  They are stored separately for backward compatability with
+ * autocomplete store logic that preceeded the introduction of descriptions.
+ */
+function TKR_addACItem(items, docDict, item, docStr) {
+  items.push(item);
+  docDict[item] = docStr;
+}
+
+/**
+ * Adds a group of three items related to a date field.
+ */
+function TKR_addACDateItems(items, docDict, fieldName, humanReadable) {
+  const today = new Date();
+  const todayStr = (today.getFullYear() + '-' + (today.getMonth() + 1) + '-' +
+    today.getDate());
+  TKR_addACItem(items, docDict, fieldName + '>today-1',
+      humanReadable + ' within the last N days');
+  TKR_addACItem(items, docDict, fieldName + '>' + todayStr,
+      humanReadable + ' after the specified date');
+  TKR_addACItem(items, docDict, fieldName + '<today-1',
+      humanReadable + ' more than N days ago');
+}
+
+/**
+ * Add several autocomplete items to a word list that will be used to construct
+ * an autocomplete store.  Also, keep track of description strings for each
+ * item.  A search operator is prepended to the name of each item.  The opt_old
+ * and opt_new parameters are used to transform Key-Value labels into Key=Value
+ * search terms.
+ */
+function TKR_addACItemList(
+    items, docDict, searchOp, acDefs, opt_old, opt_new) {
+  let item;
+  for (let i = 0; i < acDefs.length; i++) {
+    const nameAndDoc = acDefs[i];
+    item = searchOp + nameAndDoc.name;
+    if (opt_old) {
+      // Preserve any leading minus-sign.
+      item = item.slice(0, 1) + item.slice(1).replace(opt_old, opt_new);
+    }
+    TKR_addACItem(items, docDict, item, nameAndDoc.doc);
+  }
+}
+
+
+/**
+ * Use information from an options feed to populate the artifact search
+ * autocomplete menu.  The order of sections is: custom fields, labels,
+ * components, people, status, special, dates.  Within each section,
+ * options are ordered semantically where possible, or alphabetically
+ * if there is no semantic ordering.  Negated options all come after
+ * all normal options.
+ */
+function TKR_setUpSearchStore(
+    labelDefs, memberDefs, openDefs, closedDefs, componentDefs, fieldDefs,
+    indMemberDefs) {
+  let searchWords = [];
+  const searchWordsNeg = [];
+  const docDict = {};
+
+  // Treat Key-Value and OneWord labels separately.
+  const keyValueLabelDefs = [];
+  const oneWordLabelDefs = [];
+  for (var i = 0; i < labelDefs.length; i++) {
+    const nameAndDoc = labelDefs[i];
+    if (nameAndDoc.name.indexOf('-') == -1) {
+      oneWordLabelDefs.push(nameAndDoc);
+    } else {
+      keyValueLabelDefs.push(nameAndDoc);
+    }
+  }
+
+  // Autocomplete for custom fields.
+  for (i = 0; i < fieldDefs.length; i++) {
+    const fieldName = fieldDefs[i]['field_name'];
+    const fieldType = fieldDefs[i]['field_type'];
+    if (fieldType == 'ENUM_TYPE') {
+      const choices = fieldDefs[i]['choices'];
+      TKR_addACItemList(searchWords, docDict, fieldName + '=', choices);
+      TKR_addACItemList(searchWordsNeg, docDict, '-' + fieldName + '=', choices);
+    } else if (fieldType == 'STR_TYPE') {
+      TKR_addACItem(searchWords, docDict, fieldName + ':',
+          fieldDefs[i]['docstring']);
+    } else if (fieldType == 'DATE_TYPE') {
+      TKR_addACItem(searchWords, docDict, fieldName + ':',
+          fieldDefs[i]['docstring']);
+      TKR_addACDateItems(searchWords, docDict, fieldName, fieldName);
+    } else {
+      TKR_addACItem(searchWords, docDict, fieldName + '=',
+          fieldDefs[i]['docstring']);
+    }
+    TKR_addACItem(searchWords, docDict, 'has:' + fieldName,
+        'Issues with any ' + fieldName + ' value');
+    TKR_addACItem(searchWordsNeg, docDict, '-has:' + fieldName,
+        'Issues with no ' + fieldName + ' value');
+  }
+
+  // Add suggestions with "me" first, because otherwise they may be impossible
+  // to reach in a project that has a lot of members with emails starting with
+  // "me".
+  if (CS_env['loggedInUserEmail']) {
+    TKR_addACItem(searchWords, docDict, 'owner:me', 'Issues owned by me');
+    TKR_addACItem(searchWordsNeg, docDict, '-owner:me', 'Issues not owned by me');
+    TKR_addACItem(searchWords, docDict, 'cc:me', 'Issues that CC me');
+    TKR_addACItem(searchWordsNeg, docDict, '-cc:me', 'Issues that don\'t CC me');
+    TKR_addACItem(searchWords, docDict, 'reporter:me', 'Issues I reported');
+    TKR_addACItem(searchWordsNeg, docDict, '-reporter:me', 'Issues reported by others');
+    TKR_addACItem(searchWords, docDict, 'commentby:me',
+        'Issues that I commented on');
+    TKR_addACItem(searchWordsNeg, docDict, '-commentby:me',
+        'Issues that I didn\'t comment on');
+  }
+
+  TKR_addACItemList(searchWords, docDict, '', keyValueLabelDefs, '-', '=');
+  TKR_addACItemList(searchWordsNeg, docDict, '-', keyValueLabelDefs, '-', '=');
+  TKR_addACItemList(searchWords, docDict, 'label:', oneWordLabelDefs);
+  TKR_addACItemList(searchWordsNeg, docDict, '-label:', oneWordLabelDefs);
+
+  TKR_addACItemList(searchWords, docDict, 'component:', componentDefs);
+  TKR_addACItemList(searchWordsNeg, docDict, '-component:', componentDefs);
+  TKR_addACItem(searchWords, docDict, 'has:component',
+      'Issues with any components specified');
+  TKR_addACItem(searchWordsNeg, docDict, '-has:component',
+      'Issues with no components specified');
+
+  TKR_addACItemList(searchWords, docDict, 'owner:', indMemberDefs);
+  TKR_addACItemList(searchWordsNeg, docDict, '-owner:', indMemberDefs);
+  TKR_addACItemList(searchWords, docDict, 'cc:', memberDefs);
+  TKR_addACItemList(searchWordsNeg, docDict, '-cc:', memberDefs);
+  TKR_addACItem(searchWords, docDict, 'has:cc',
+      'Issues with any cc\'d users');
+  TKR_addACItem(searchWordsNeg, docDict, '-has:cc',
+      'Issues with no cc\'d users');
+  TKR_addACItemList(searchWords, docDict, 'reporter:', memberDefs);
+  TKR_addACItemList(searchWordsNeg, docDict, '-reporter:', memberDefs);
+  TKR_addACItemList(searchWords, docDict, 'status:', openDefs);
+  TKR_addACItemList(searchWordsNeg, docDict, '-status:', openDefs);
+  TKR_addACItemList(searchWords, docDict, 'status:', closedDefs);
+  TKR_addACItemList(searchWordsNeg, docDict, '-status:', closedDefs);
+  TKR_addACItem(searchWords, docDict, 'has:status',
+      'Issues with any status');
+  TKR_addACItem(searchWordsNeg, docDict, '-has:status',
+      'Issues with no status');
+
+  TKR_addACItem(searchWords, docDict, 'is:blocked',
+      'Issues that are blocked');
+  TKR_addACItem(searchWordsNeg, docDict, '-is:blocked',
+      'Issues that are not blocked');
+  TKR_addACItem(searchWords, docDict, 'has:blockedon',
+      'Issues that are blocked');
+  TKR_addACItem(searchWordsNeg, docDict, '-has:blockedon',
+      'Issues that are not blocked');
+  TKR_addACItem(searchWords, docDict, 'has:blocking',
+      'Issues that are blocking other issues');
+  TKR_addACItem(searchWordsNeg, docDict, '-has:blocking',
+      'Issues that are not blocking other issues');
+  TKR_addACItem(searchWords, docDict, 'has:mergedinto',
+      'Issues that were merged into other issues');
+  TKR_addACItem(searchWordsNeg, docDict, '-has:mergedinto',
+      'Issues that were not merged into other issues');
+
+  TKR_addACItem(searchWords, docDict, 'is:starred',
+      'Starred by me');
+  TKR_addACItem(searchWordsNeg, docDict, '-is:starred',
+      'Not starred by me');
+  TKR_addACItem(searchWords, docDict, 'stars>10',
+      'More than 10 stars');
+  TKR_addACItem(searchWords, docDict, 'stars>100',
+      'More than 100 stars');
+  TKR_addACItem(searchWords, docDict, 'summary:',
+      'Search within the summary field');
+
+  TKR_addACItemList(searchWords, docDict, 'commentby:', memberDefs);
+  TKR_addACItem(searchWords, docDict, 'attachment:',
+      'Search within attachment names');
+  TKR_addACItem(searchWords, docDict, 'attachments>5',
+      'Has more than 5 attachments');
+  TKR_addACItem(searchWords, docDict, 'is:open', 'Issues that are open');
+  TKR_addACItem(searchWordsNeg, docDict, '-is:open', 'Issues that are closed');
+  TKR_addACItem(searchWords, docDict, 'has:owner',
+      'Issues with some owner');
+  TKR_addACItem(searchWordsNeg, docDict, '-has:owner',
+      'Issues with no owner');
+  TKR_addACItem(searchWords, docDict, 'has:attachments',
+      'Issues with some attachments');
+  TKR_addACItem(searchWords, docDict, 'id:1,2,3',
+      'Match only the specified issues');
+  TKR_addACItem(searchWords, docDict, 'id<100000',
+      'Issues with IDs under 100,000');
+  TKR_addACItem(searchWords, docDict, 'blockedon:1',
+      'Blocked on the specified issues');
+  TKR_addACItem(searchWords, docDict, 'blocking:1',
+      'Blocking the specified issues');
+  TKR_addACItem(searchWords, docDict, 'mergedinto:1',
+      'Merged into the specified issues');
+  TKR_addACItem(searchWords, docDict, 'is:ownerbouncing',
+      'Issues with owners we cannot contact');
+  TKR_addACItem(searchWords, docDict, 'is:spam', 'Issues classified as spam');
+  // We do not suggest -is:spam because it is implicit.
+
+  TKR_addACDateItems(searchWords, docDict, 'opened', 'Opened');
+  TKR_addACDateItems(searchWords, docDict, 'modified', 'Modified');
+  TKR_addACDateItems(searchWords, docDict, 'closed', 'Closed');
+  TKR_addACDateItems(searchWords, docDict, 'ownermodified', 'Owner field modified');
+  TKR_addACDateItems(searchWords, docDict, 'ownerlastvisit', 'Owner last visit');
+  TKR_addACDateItems(searchWords, docDict, 'statusmodified', 'Status field modified');
+  TKR_addACDateItems(
+      searchWords, docDict, 'componentmodified', 'Component field modified');
+
+  TKR_projectQueryStore = new _AC_SimpleStore(searchWords, docDict);
+
+  searchWords = searchWords.concat(searchWordsNeg);
+
+  TKR_searchStore = new _AC_SimpleStore(searchWords, docDict);
+
+  // When we insert an autocomplete value, replace an entire search term.
+  // Add just a space after it (not a comma) if it is a complete search term,
+  // or leave the caret immediately after the completion if we are just helping
+  // the user with the search operator.
+  TKR_searchStore.substitute =
+      function(inputValue, caret, completable, completion) {
+        let nextTerm = caret;
+        while (inputValue.charAt(nextTerm) != ' ' &&
+               nextTerm < inputValue.length) {
+          nextTerm++;
+        }
+        while (inputValue.charAt(nextTerm) == ' ' &&
+               nextTerm < inputValue.length) {
+          nextTerm++;
+        }
+        return inputValue.substring(0, caret - completable.length) +
+               completion.value + ' ' + inputValue.substring(nextTerm);
+      };
+  TKR_searchStore.autoselectFirstRow =
+      function() {
+        return false;
+      };
+
+  TKR_projectQueryStore.substitute = TKR_searchStore.substitute;
+  TKR_projectQueryStore.autoselectFirstRow = TKR_searchStore.autoselectFirstRow;
+}
+
+
+/**
+ * Use information from an options feed to populate the issue quick edit
+ * autocomplete menu.
+ */
+function TKR_setUpQuickEditStore(
+    labelDefs, memberDefs, openDefs, closedDefs, indMemberDefs) {
+  const qeWords = [];
+  const docDict = {};
+
+  // Treat Key-Value and OneWord labels separately.
+  const keyValueLabelDefs = [];
+  const oneWordLabelDefs = [];
+  for (let i = 0; i < labelDefs.length; i++) {
+    const nameAndDoc = labelDefs[i];
+    if (nameAndDoc.name.indexOf('-') == -1) {
+      oneWordLabelDefs.push(nameAndDoc);
+    } else {
+      keyValueLabelDefs.push(nameAndDoc);
+    }
+  }
+  TKR_addACItemList(qeWords, docDict, '', keyValueLabelDefs, '-', '=');
+  TKR_addACItemList(qeWords, docDict, '-', keyValueLabelDefs, '-', '=');
+  TKR_addACItemList(qeWords, docDict, '', oneWordLabelDefs);
+  TKR_addACItemList(qeWords, docDict, '-', oneWordLabelDefs);
+
+  TKR_addACItem(qeWords, docDict, 'owner=me', 'Make me the owner');
+  TKR_addACItem(qeWords, docDict, 'owner=----', 'Clear the owner field');
+  TKR_addACItem(qeWords, docDict, 'cc=me', 'CC me on this issue');
+  TKR_addACItem(qeWords, docDict, 'cc=-me', 'Remove me from CC list');
+  TKR_addACItemList(qeWords, docDict, 'owner=', indMemberDefs);
+  TKR_addACItemList(qeWords, docDict, 'cc=', memberDefs);
+  TKR_addACItemList(qeWords, docDict, 'cc=-', memberDefs);
+  TKR_addACItemList(qeWords, docDict, 'status=', openDefs);
+  TKR_addACItemList(qeWords, docDict, 'status=', closedDefs);
+  TKR_addACItem(qeWords, docDict, 'summary=""', 'Set the summary field');
+
+  TKR_quickEditStore = new _AC_SimpleStore(qeWords, docDict);
+
+  // When we insert an autocomplete value, replace an entire command part.
+  // Add just a space after it (not a comma) if it is a complete part,
+  // or leave the caret immediately after the completion if we are just helping
+  // the user with the command operator.
+  TKR_quickEditStore.substitute =
+      function(inputValue, caret, completable, completion) {
+        let nextTerm = caret;
+        while (inputValue.charAt(nextTerm) != ' ' &&
+               nextTerm < inputValue.length) {
+          nextTerm++;
+        }
+        while (inputValue.charAt(nextTerm) == ' ' &&
+               nextTerm < inputValue.length) {
+          nextTerm++;
+        }
+        return inputValue.substring(0, caret - completable.length) +
+               completion.value + ' ' + inputValue.substring(nextTerm);
+      };
+}
+
+
+/**
+ * Constuct a new autocomplete store with all the project
+ * custom permissions.
+ * @param {Array} customPermissions An array of custom permission names.
+ */
+function TKR_setUpCustomPermissionsStore(customPermissions) {
+  customPermissions = customPermissions || [];
+  const permWords = ['View', 'EditIssue', 'AddIssueComment', 'DeleteIssue'];
+  const docdict = {
+    'View': '', 'EditIssue': '', 'AddIssueComment': '', 'DeleteIssue': ''};
+  for (let i = 0; i < customPermissions.length; i++) {
+    permWords.push(customPermissions[i]);
+    docdict[customPermissions[i]] = '';
+  }
+
+  TKR_customPermissionsStore = new _AC_SimpleStore(permWords, docdict);
+
+  TKR_customPermissionsStore.commaCompletes = false;
+
+  TKR_customPermissionsStore.substitute =
+  function(inputValue, cursor, completable, completion) {
+    return completion.value;
+  };
+}
+
+
+/**
+ * Constuct a new autocomplete store with all the well-known project
+ * member user names and real names.  The store has some
+ * monorail-specific methods.
+ * TODO(jrobbins): would it be easier to define my own class to use
+ * instead of _AC_Simple_Store?
+ * @param {Array} memberDefs an array of member objects.
+ * @param {Array} nonGroupMemberDefs an array of member objects who are not groups.
+ */
+function TKR_setUpMemberStore(memberDefs, nonGroupMemberDefs) {
+  const memberWords = [];
+  const indMemberWords = [];
+  const docdict = {};
+
+  memberDefs.forEach((memberDef) => {
+    memberWords.push(memberDef.name);
+    docdict[memberDef.name] = null;
+  });
+  nonGroupMemberDefs.forEach((memberDef) => {
+    indMemberWords.push(memberDef.name);
+  });
+
+  TKR_memberListStore = new _AC_SimpleStore(memberWords, docdict);
+
+  TKR_memberListStore.completions = function(prefix, tofilter) {
+    const fullList = TKR_fullComplete(prefix, memberDefs);
+    if (fullList) return fullList;
+    return _AC_SimpleStore.prototype.completions.call(this, prefix, tofilter);
+  };
+
+  TKR_memberListStore.completable = function(inputValue, cursor) {
+    if (inputValue == '') return '*member';
+    return _AC_SimpleStore.prototype.completable.call(this, inputValue, cursor);
+  };
+
+  TKR_memberListStore.substitute = TKR_acSubstituteWithComma;
+
+  TKR_ownerStore = new _AC_SimpleStore(indMemberWords, docdict);
+
+  TKR_ownerStore.commaCompletes = false;
+
+  TKR_ownerStore.substitute =
+  function(inputValue, cursor, completable, completion) {
+    return completion.value;
+  };
+
+  TKR_ownerStore.completions = function(prefix, tofilter) {
+    const fullList = TKR_fullComplete(prefix, nonGroupMemberDefs);
+    if (fullList) return fullList;
+    return _AC_SimpleStore.prototype.completions.call(this, prefix, tofilter);
+  };
+
+  TKR_ownerStore.completable = function(inputValue, cursor) {
+    if (!ac_everTyped) return '*owner';
+    return inputValue;
+  };
+}
+
+
+/**
+ * Constuct one new autocomplete store for each user-valued custom
+ * field that has a needs_perm validation requirement, and thus a
+ * list of allowed user indexes.
+ * TODO(jrobbins): would it be easier to define my own class to use
+ * instead of _AC_Simple_Store?
+ * @param {Array} fieldDefs An array of field definitions, only some
+ * of which have a 'user_indexes' entry.
+ */
+function TKR_setUpUserAutocompleteStores(fieldDefs) {
+  fieldDefs.forEach((fieldDef) => {
+    if (fieldDef.qualifiedMembers) {
+      const us = makeOneUserAutocompleteStore(fieldDef);
+      TKR_userAutocompleteStores['custom_' + fieldDef['field_id']] = us;
+    }
+  });
+}
+
+function makeOneUserAutocompleteStore(fieldDef) {
+  const memberWords = [];
+  const docdict = {};
+  for (const member of fieldDef.qualifiedMembers) {
+    memberWords.push(member.name);
+    docdict[member.name] = member.doc;
+  }
+
+  const userStore = new _AC_SimpleStore(memberWords, docdict);
+  userStore.commaCompletes = false;
+
+  userStore.substitute =
+  function(inputValue, cursor, completable, completion) {
+    return completion.value;
+  };
+
+  userStore.completions = function(prefix, tofilter) {
+    const fullList = TKR_fullComplete(prefix, fieldDef.qualifiedMembers);
+    if (fullList) return fullList;
+    return _AC_SimpleStore.prototype.completions.call(this, prefix, tofilter);
+  };
+
+  userStore.completable = function(inputValue, cursor) {
+    if (!ac_everTyped) return '*custom';
+    return inputValue;
+  };
+
+  return userStore;
+}
+
+
+/**
+ * Constuct a new autocomplete store with all the components.
+ * The store has some monorail-specific methods.
+ * @param {Array} componentDefs An array of definitions of components.
+ */
+function TKR_setUpComponentStore(componentDefs) {
+  const componentWords = [];
+  const docdict = {};
+  for (let i = 0; i < componentDefs.length; i++) {
+    const component = componentDefs[i];
+    componentWords.push(component.name);
+    docdict[component.name] = component.doc;
+  }
+
+  const completions = function(prefix, tofilter) {
+    const fullList = TKR_fullComplete(prefix, componentDefs);
+    if (fullList) return fullList;
+    return _AC_SimpleStore.prototype.completions.call(this, prefix, tofilter);
+  };
+  const completable = function(inputValue, cursor) {
+    if (inputValue == '') return '*component';
+    return _AC_SimpleStore.prototype.completable.call(this, inputValue, cursor);
+  };
+
+  TKR_componentStore = new _AC_SimpleStore(componentWords, docdict);
+  TKR_componentStore.commaCompletes = false;
+  TKR_componentStore.substitute =
+  function(inputValue, cursor, completable, completion) {
+    return completion.value;
+  };
+  TKR_componentStore.completions = completions;
+  TKR_componentStore.completable = completable;
+
+  TKR_componentListStore = new _AC_SimpleStore(componentWords, docdict);
+  TKR_componentListStore.commaCompletes = false;
+  TKR_componentListStore.substitute = TKR_acSubstituteWithComma;
+  TKR_componentListStore.completions = completions;
+  TKR_componentListStore.completable = completable;
+}
+
+
+/**
+ * An array of definitions of all well-known issue labels.  Each
+ * definition has the name of the label, and a docstring that
+ * describes its meaning.
+ */
+let TKR_labelWords = [];
+
+
+/**
+ * Constuct a new autocomplete store with all the well-known issue
+ * labels for the current project.  The store has some DIT-specific methods.
+ * TODO(jrobbins): would it be easier to define my own class to use
+ * instead of _AC_Simple_Store?
+ * @param {Array} labelDefs An array of definitions of the project
+ * members.  Each definition has a name and docstring.
+ */
+function TKR_setUpLabelStore(labelDefs) {
+  TKR_labelWords = [];
+  const TKR_labelPrefixes = [];
+  const labelPrefs = new Set();
+  const docdict = {};
+  for (let i = 0; i < labelDefs.length; i++) {
+    const label = labelDefs[i];
+    TKR_labelWords.push(label.name);
+    TKR_labelPrefixes.push(label.name.split('-')[0]);
+    docdict[label.name] = label.doc;
+    labelPrefs.add(label.name.split('-')[0]);
+  }
+  const labelPrefArray = Array.from(labelPrefs);
+  const labelPrefDefs = labelPrefArray.map((s) => ({name: s, doc: ''}));
+
+  TKR_labelStore = new _AC_SimpleStore(TKR_labelWords, docdict);
+
+  TKR_labelStore.commaCompletes = false;
+  TKR_labelStore.substitute =
+  function(inputValue, cursor, completable, completion) {
+    return completion.value;
+  };
+
+  TKR_labelPrefixStore = new _AC_SimpleStore(TKR_labelPrefixes);
+
+  TKR_labelPrefixStore.commaCompletes = false;
+  TKR_labelPrefixStore.substitute =
+  function(inputValue, cursor, completable, completion) {
+    return completion.value;
+  };
+
+  TKR_labelMultiStore = new _AC_SimpleStore(TKR_labelWords, docdict);
+
+  TKR_labelMultiStore.substitute = TKR_acSubstituteWithComma;
+
+  const completable = function(inputValue, cursor) {
+    if (cursor === 0) {
+      return '*label'; // Show every well-known label that is not redundant.
+    }
+    let start = 0;
+    for (let i = cursor; --i >= 0;) {
+      const c = inputValue.charAt(i);
+      if (c === ' ' || c === ',') {
+        start = i + 1;
+        break;
+      }
+    }
+    const questionPos = inputValue.indexOf('?');
+    if (questionPos >= 0) {
+      // Ignore any "?" character and anything after it.
+      inputValue = inputValue.substring(start, questionPos);
+    }
+    let result = inputValue.substring(start, cursor);
+    if (inputValue.lastIndexOf('-') > 0 && !ac_everTyped) {
+      // Act like a menu: offer all alternative values for the same prefix.
+      result = inputValue.substring(
+          start, Math.min(cursor, inputValue.lastIndexOf('-')));
+    }
+    if (inputValue.startsWith('Restrict-') && !ac_everTyped) {
+      // If user is in the middle of 2nd part, use that to narrow the choices.
+      result = inputValue;
+      // If they completed 2nd part, give all choices matching 2-part prefix.
+      if (inputValue.lastIndexOf('-') > 8) {
+        result = inputValue.substring(
+            start, Math.min(cursor, inputValue.lastIndexOf('-') + 1));
+      }
+    }
+
+    return result;
+  };
+
+  const computeAvoid = function() {
+    const labelTextFields = Array.from(
+        document.querySelectorAll('.labelinput'));
+    const otherTextFields = labelTextFields.filter(
+        (tf) => (tf !== ac_focusedInput && tf.value));
+    return otherTextFields.map((tf) => tf.value);
+  };
+
+
+  const completions = function(labeldic) {
+    return function(prefix, tofilter) {
+      let comps = TKR_fullComplete(prefix, labeldic);
+      if (comps === null) {
+        comps = _AC_SimpleStore.prototype.completions.call(
+            this, prefix, tofilter);
+      }
+
+      const filteredComps = [];
+      for (const completion of comps) {
+        const completionLower = completion.value.toLowerCase();
+        const labelPrefix = completionLower.split('-')[0];
+        let alreadyUsed = false;
+        const isExclusive = FindInArray(TKR_exclPrefixes, labelPrefix) !== -1;
+        if (isExclusive) {
+          for (const usedLabel of ac_avoidValues) {
+            if (usedLabel.startsWith(labelPrefix + '-')) {
+              alreadyUsed = true;
+              break;
+            }
+          }
+        }
+        if (!alreadyUsed) {
+          filteredComps.push(completion);
+        }
+      }
+
+      return filteredComps;
+    };
+  };
+
+  TKR_labelStore.computeAvoid = computeAvoid;
+  TKR_labelStore.completable = completable;
+  TKR_labelStore.completions = completions(labelDefs);
+
+  TKR_labelPrefixStore.completable = completable;
+  TKR_labelPrefixStore.completions = completions(labelPrefDefs);
+
+  TKR_labelMultiStore.completable = completable;
+  TKR_labelMultiStore.completions = completions(labelDefs);
+}
+
+
+/**
+ * Constuct a new autocomplete store with the given strings as choices.
+ * @param {Array} choices An array of autocomplete choices.
+ */
+function TKR_setUpAutoCompleteStore(choices) {
+  TKR_autoCompleteStore = new _AC_SimpleStore(choices);
+  const choicesDefs = [];
+  for (let i = 0; i < choices.length; ++i) {
+    choicesDefs.push({'name': choices[i], 'doc': ''});
+  }
+
+  /**
+   * Override the default completions() function to return a list of
+   * available choices.  It proactively shows all choices when the user has
+   * not yet typed anything.  It stops offering choices if the text field
+   * has a pretty long string in it already.  It does not offer choices that
+   * have already been chosen.
+   */
+  TKR_autoCompleteStore.completions = function(prefix, tofilter) {
+    if (prefix.length > 18) {
+      return [];
+    }
+    let comps = TKR_fullComplete(prefix, choicesDefs);
+    if (comps == null) {
+      comps = _AC_SimpleStore.prototype.completions.call(
+          this, prefix, tofilter);
+    }
+
+    const usedComps = {};
+    const textFields = document.getElementsByTagName('input');
+    for (var i = 0; i < textFields.length; ++i) {
+      if (textFields[i].classList.contains('autocomplete')) {
+        usedComps[textFields[i].value] = true;
+      }
+    }
+    const unusedComps = [];
+    for (i = 0; i < comps.length; ++i) {
+      if (!usedComps[comps[i].value]) {
+        unusedComps.push(comps[i]);
+      }
+    }
+
+    return unusedComps;
+  };
+
+  /**
+   * Override the default completable() function with one that gives a
+   * special value when the user has not yet typed anything.  This
+   * causes TKR_fullComplete() to show all choices.  Also, always consider
+   * the whole textfield value as an input to completion matching.  Otherwise,
+   * it would only consider the part after the last comma (which makes sense
+   * for gmail To: and Cc: address fields).
+   */
+  TKR_autoCompleteStore.completable = function(inputValue, cursor) {
+    if (inputValue == '') {
+      return '*ac';
+    }
+    return inputValue;
+  };
+
+  /**
+   * Override the default substitute() function to completely replace the
+   * contents of the text field when the user selects a completion. Otherwise,
+   * it would append, much like the Gmail To: and Cc: fields append autocomplete
+   * selections.
+   */
+  TKR_autoCompleteStore.substitute =
+  function(inputValue, cursor, completable, completion) {
+    return completion.value;
+  };
+
+  /**
+   * We consider the whole textfield to be one value, not a comma separated
+   * list.  So, typing a ',' should not trigger an autocomplete selection.
+   */
+  TKR_autoCompleteStore.commaCompletes = false;
+}
+
+
+/**
+ * XMLHTTP object used to fetch autocomplete options from the server.
+ */
+const TKR_optionsXmlHttp = undefined;
+
+/**
+ * Contact the server to fetch the set of autocomplete options for the
+ * projects the user is contributor/member/owner of.
+ * @param {multiValue} boolean If set to true, the projectStore is configured to
+ * have support for multi-values (useful for example for saved queries where
+ * a query can apply to multiple projects).
+ */
+function TKR_fetchUserProjects(multiValue) {
+  // Set a request token to prevent XSRF leaking of user project lists.
+  const userRefs = [{displayName: window.CS_env.loggedInUserEmail}];
+  const userProjectsPromise = window.prpcClient.call(
+      'monorail.Users', 'GetUsersProjects', {userRefs});
+  userProjectsPromise.then((response) => {
+    const userProjects = response.usersProjects[0];
+    const projects = (userProjects.ownerOf || [])
+        .concat(userProjects.memberOf || [])
+        .concat(userProjects.contributorTo || []);
+    projects.sort();
+    if (projects) {
+      TKR_setUpProjectStore(projects, multiValue);
+    }
+  });
+}
+
+
+/**
+ * Constuct a new autocomplete store with all the projects that the
+ * current user has visibility into. The store has some monorail-specific
+ * methods.
+ * @param {Array} projects An array of project names.
+ * @param {boolean} multiValue Determines whether the store should support
+ *                  multiple values.
+ */
+function TKR_setUpProjectStore(projects, multiValue) {
+  const projectsDefs = [];
+  const docdict = {};
+  for (let i = 0; i < projects.length; ++i) {
+    projectsDefs.push({'name': projects[i], 'doc': ''});
+    docdict[projects[i]] = '';
+  }
+
+  TKR_projectStore = new _AC_SimpleStore(projects, docdict);
+  TKR_projectStore.commaCompletes = !multiValue;
+
+  if (multiValue) {
+    TKR_projectStore.substitute = TKR_acSubstituteWithComma;
+  } else {
+    TKR_projectStore.substitute =
+      function(inputValue, cursor, completable, completion) {
+        return completion.value;
+      };
+  }
+
+  TKR_projectStore.completions = function(prefix, tofilter) {
+    const fullList = TKR_fullComplete(prefix, projectsDefs);
+    if (fullList) return fullList;
+    return _AC_SimpleStore.prototype.completions.call(this, prefix, tofilter);
+  };
+
+  TKR_projectStore.completable = function(inputValue, cursor) {
+    if (inputValue == '') return '*project';
+    if (multiValue) {
+      return _AC_SimpleStore.prototype.completable.call(
+          this, inputValue, cursor);
+    } else {
+      return inputValue;
+    }
+  };
+}
+
+
+/**
+ * Convert the object resulting of a monorail.Projects ListStatuses to
+ * the format expected by TKR_populateAutocomplete.
+ * @param {object} statusesResponse A pRPC ListStatusesResponse object.
+ */
+function TKR_convertStatuses(statusesResponse) {
+  const statusDefs = statusesResponse.statusDefs || [];
+  const jsonData = {};
+
+  // Split statusDefs into open and closed name-doc objects.
+  jsonData.open = [];
+  jsonData.closed = [];
+  for (const s of statusDefs) {
+    if (!s.deprecated) {
+      const item = {
+        name: s.status,
+        doc: s.docstring,
+      };
+      if (s.meansOpen) {
+        jsonData.open.push(item);
+      } else {
+        jsonData.closed.push(item);
+      }
+    }
+  }
+
+  jsonData.strict = statusesResponse.restrictToKnown;
+
+  return jsonData;
+}
+
+
+/**
+ * Convert the object resulting of a monorail.Projects ListComponents to
+ * the format expected by TKR_populateAutocomplete.
+ * @param {object} componentsResponse A pRPC ListComponentsResponse object.
+ */
+function TKR_convertComponents(componentsResponse) {
+  const componentDefs = (componentsResponse.componentDefs || []);
+  const jsonData = {};
+
+  // Filter out deprecated components and normalize to name-doc object.
+  jsonData.components = [];
+  for (const c of componentDefs) {
+    if (!c.deprecated) {
+      jsonData.components.push({
+        name: c.path,
+        doc: c.docstring,
+      });
+    }
+  }
+
+  return jsonData;
+}
+
+
+/**
+ * Convert the object resulting of a monorail.Projects GetLabelOptions
+ * call to the format expected by TKR_populateAutocomplete.
+ * @param {object} labelsResponse A pRPC GetLabelOptionsResponse.
+ * @param {Array<FieldDef>=} fieldDefs FieldDefs from a project config, used to
+ *   mask labels that are used to implement custom enum fields.
+ */
+function TKR_convertLabels(labelsResponse, fieldDefs = []) {
+  const labelDefs = (labelsResponse.labelDefs || []);
+  const exclusiveLabelPrefixes = (labelsResponse.exclusiveLabelPrefixes || []);
+  const jsonData = {};
+
+  const maskedLabels = new Set();
+  fieldDefs.forEach((fd) => {
+    if (fd.enumChoices) {
+      fd.enumChoices.forEach(({label}) => {
+        maskedLabels.add(`${fd.fieldRef.fieldName}-${label}`);
+      });
+    }
+  });
+
+  jsonData.labels = labelDefs.filter(({label}) => !maskedLabels.has(label)).map(
+      (label) => ({name: label.label, doc: label.docstring}));
+
+  jsonData.excl_prefixes = exclusiveLabelPrefixes.map(
+      (prefix) => prefix.toLowerCase());
+
+  return jsonData;
+}
+
+
+/**
+ * Convert the object resulting of a monorail.Projects GetVisibleMembers
+ * call to the format expected by TKR_populateAutocomplete.
+ * @param {object?} visibleMembersResponse A pRPC GetVisibleMembersResponse.
+ * @return {{memberEmails: {name: string}, nonGroupEmails: {name: string}}}
+ */
+function TKR_convertVisibleMembers(visibleMembersResponse) {
+  if (!visibleMembersResponse) {
+    visibleMembersResponse = {};
+  }
+  const groupRefs = (visibleMembersResponse.groupRefs || []);
+  const userRefs = (visibleMembersResponse.userRefs || []);
+  const jsonData = {};
+
+  const groupEmails = new Set(groupRefs.map(
+      (groupRef) => groupRef.displayName));
+
+  jsonData.memberEmails = userRefs.map(
+      (userRef) => ({name: userRef.displayName}));
+  jsonData.nonGroupEmails = jsonData.memberEmails.filter(
+      (memberEmail) => !groupEmails.has(memberEmail));
+
+  return jsonData;
+}
+
+
+/**
+ * Convert the object resulting of a monorail.Projects ListFields to
+ * the format expected by TKR_populateAutocomplete.
+ * @param {object} fieldsResponse A pRPC ListFieldsResponse object.
+ */
+function TKR_convertFields(fieldsResponse) {
+  const fieldDefs = (fieldsResponse.fieldDefs || []);
+  const jsonData = {};
+
+  jsonData.fields = fieldDefs.map((field) =>
+    ({
+      field_id: field.fieldRef.fieldId,
+      field_name: field.fieldRef.fieldName,
+      field_type: field.fieldRef.type,
+      docstring: field.docstring,
+      choices: (field.enumChoices || []).map(
+          (choice) => ({name: choice.label, doc: choice.docstring})),
+      qualifiedMembers: (field.userChoices || []).map(
+          (userRef) => ({name: userRef.displayName})),
+    }),
+  );
+
+  return jsonData;
+}
+
+
+/**
+ * Convert the object resulting of a monorail.Features ListHotlistsByUser
+ * call to the format expected by TKR_populateAutocomplete.
+ * @param {Array<HotlistV0>} hotlists A lists of hotlists
+ * @return {Array<{ref_str: string, summary: string}>}
+ */
+function TKR_convertHotlists(hotlists) {
+  if (hotlists === undefined) {
+    return [];
+  }
+
+  const seen = new Set();
+  const ambiguousNames = new Set();
+
+  hotlists.forEach((hotlist) => {
+    if (seen.has(hotlist.name)) {
+      ambiguousNames.add(hotlist.name);
+    }
+    seen.add(hotlist.name);
+  });
+
+  return hotlists.map((hotlist) => {
+    let ref_str = hotlist.name;
+    if (ambiguousNames.has(hotlist.name)) {
+      ref_str = hotlist.owner_ref.display_name + ':' + ref_str;
+    }
+    return {ref_str: ref_str, summary: hotlist.summary};
+  });
+}
+
+
+/**
+ * Initializes hotlists in autocomplete store.
+ * @param {Array<HotlistV0>} hotlists
+ */
+function TKR_populateHotlistAutocomplete(hotlists) {
+  TKR_setUpHotlistsStore(TKR_convertHotlists(hotlists));
+}
+
+
+/**
+ * Add project config data that's already been fetched to the legacy
+ * autocomplete.
+ * @param {Config} projectConfig Returned projectConfig data.
+ * @param {GetVisibleMembersResponse} visibleMembers
+ * @param {Array<string>} customPermissions
+ */
+function TKR_populateAutocomplete(projectConfig, visibleMembers,
+    customPermissions = []) {
+  const {statusDefs, componentDefs, labelDefs, fieldDefs,
+    exclusiveLabelPrefixes, projectName} = projectConfig;
+
+  const {memberEmails, nonGroupEmails} =
+    TKR_convertVisibleMembers(visibleMembers);
+  TKR_setUpMemberStore(memberEmails, nonGroupEmails);
+  TKR_prepOwnerField(memberEmails);
+
+  const {open, closed, strict} = TKR_convertStatuses({statusDefs});
+  TKR_setUpStatusStore(open, closed);
+  TKR_restrict_to_known = strict;
+
+  const {components} = TKR_convertComponents({componentDefs});
+  TKR_setUpComponentStore(components);
+
+  const {excl_prefixes, labels} = TKR_convertLabels(
+      {labelDefs, exclusiveLabelPrefixes}, fieldDefs);
+  TKR_exclPrefixes = excl_prefixes;
+  TKR_setUpLabelStore(labels);
+
+  const {fields} = TKR_convertFields({fieldDefs});
+  TKR_setUpUserAutocompleteStores(fields);
+
+  /* QuickEdit is not yet in Monorail. crbug.com/monorail/1926
+  TKR_setUpQuickEditStore(
+      jsonData.labels, jsonData.memberEmails, jsonData.open, jsonData.closed,
+      jsonData.nonGroupEmails);
+  */
+
+  // We need to wait until both exclusive prefixes (in configPromise) and
+  // labels (in labelsPromise) have been read.
+  TKR_prepLabelAC(TKR_labelFieldIDPrefix);
+
+  TKR_setUpSearchStore(
+      labels, memberEmails, open, closed,
+      components, fields, nonGroupEmails);
+
+  TKR_setUpCustomPermissionsStore(customPermissions);
+}
diff --git a/static/js/tracker/tracker-components.js b/static/js/tracker/tracker-components.js
new file mode 100644
index 0000000..633d70b
--- /dev/null
+++ b/static/js/tracker/tracker-components.js
@@ -0,0 +1,64 @@
+/* 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
+ */
+
+/**
+ * This file contains JS code for editing components and component definitions.
+ */
+
+var TKR_leafNameXmlHttp;
+
+var TKR_leafNameRE = /^[a-zA-Z]([-_]?[a-zA-Z0-9])+$/;
+var TKR_oldName = '';
+
+/**
+ * Function to validate the component leaf name..
+ * @param {string} projectName Current project name.
+ * @param {string} parentPath Path to this component's parent.
+ * @param {string} originalName Original leaf name, keeping that is always OK.
+ * @param {string} token security token.
+ */
+function TKR_checkLeafName(projectName, parentPath, originalName, token) {
+  var name = $('leaf_name').value;
+  var feedback = $('leafnamefeedback');
+  if (name == originalName) {
+    $('submit_btn').disabled = '';
+    feedback.textContent = '';
+  } else if (name != TKR_oldName) {
+    $('submit_btn').disabled = 'disabled';
+    if (name == '') {
+      feedback.textContent = 'Please choose a name';
+    } else if (!TKR_leafNameRE.test(name)) {
+      feedback.textContent = 'Invalid component name';
+    } else if (name.length > 30) {
+      feedback.textContent = 'Name is too long';
+    } else {
+      TKR_checkLeafNameOnServer(projectName, parentPath, name, token);
+    }
+  }
+  TKR_oldName = name;
+}
+
+
+
+/**
+ * Function that communicates with the server.
+ * @param {string} projectName Current project name.
+ * @param {string} leafName The proposed leaf name.
+ * @param {string} token security token.
+ */
+async function TKR_checkLeafNameOnServer(projectName, parentPath, leafName) {
+  const message = {
+    project_name: projectName,
+    parent_path: parentPath,
+    component_name: leafName
+  };
+  const response = await window.prpcClient.call(
+      'monorail.Projects', 'CheckComponentName', message);
+
+  $('leafnamefeedback').textContent = response.error || '';
+  $('submit_btn').disabled = response.error ? 'disabled' : '';
+}
diff --git a/static/js/tracker/tracker-dd.js b/static/js/tracker/tracker-dd.js
new file mode 100644
index 0000000..e7b4c1e
--- /dev/null
+++ b/static/js/tracker/tracker-dd.js
@@ -0,0 +1,132 @@
+/* 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
+ */
+
+/**
+ * Functions used by Monorail to control drag-and-drop re-orderable lists
+ *
+ */
+
+/**
+ * Initializes the drag-and-drop functionality on the elements of a
+ * container node.
+ * TODO(lukasperaza): allow bulk drag-and-drop
+ * @param {Element} container The HTML container element to turn into
+ *    a drag-and-drop list. The items of the list must have the
+ *    class 'drag_item'
+ */
+function TKR_initDragAndDrop(container, opt_onDrop, opt_preventMultiple) {
+  let dragSrc = null;
+  let dragLocation = null;
+  let dragItems = container.getElementsByClassName('drag_item');
+  let target = null;
+
+  opt_preventMultiple = opt_preventMultiple || false;
+  opt_onDrop = opt_onDrop || function() {};
+
+  function _handleMouseDown(event) {
+    target = event.target;
+  }
+
+  function _handleDragStart(event) {
+    let el = event.currentTarget;
+    let gripper = el.getElementsByClassName('gripper');
+    if (gripper.length && !gripper[0].contains(target)) {
+      event.preventDefault();
+      return;
+    }
+    el.style.opacity = 0.4;
+    event.dataTransfer.setData('text/html', el.outerHTML);
+    event.dataTransfer.dropEffect = 'move';
+    dragSrc = el;
+  }
+
+  function inRect(rect, x, y) {
+    if (x < rect.left || x > rect.right) {
+      return '';
+    } else if (rect.top <= y && y <= rect.top + rect.height / 2) {
+      return 'top';
+    } else {
+      return 'bottom';
+    }
+  }
+
+  function _handleDragOver(event) {
+    if (dragSrc == null) {
+      return true;
+    }
+    event.preventDefault();
+    let el = event.currentTarget;
+    let rect = el.getBoundingClientRect(),
+      classes = el.classList;
+    let section = inRect(rect, event.clientX, event.clientY);
+    if (section == 'top' && !classes.contains('top')) {
+      dragLocation = 'top';
+      classes.remove('bottom');
+      classes.add('top');
+    } else if (section == 'bottom' && !classes.contains('bottom')) {
+      dragLocation = 'bottom';
+      classes.remove('top');
+      classes.add('bottom');
+    }
+    return false;
+  }
+
+  function removeClasses(el) {
+    el.classList.remove('top');
+    el.classList.remove('bottom');
+  }
+
+  function _handleDragDrop(event) {
+    let el = event.currentTarget;
+    if (dragSrc == null || el == dragSrc) {
+      return true;
+    }
+
+    if (opt_preventMultiple) {
+      let dragItems = container.getElementsByClassName('drag_item');
+      for (let i = 0; i < dragItems.length; i++) {
+        dragItems[i].setAttribute('draggable', false);
+      }
+    }
+
+    let srcID = dragSrc.getAttribute('data-id');
+    let id = el.getAttribute('data-id');
+
+    if (dragLocation == 'top') {
+      el.parentNode.insertBefore(dragSrc, el);
+      opt_onDrop(srcID, id, 'above');
+    } else if (dragLocation == 'bottom') {
+      el.parentNode.insertBefore(dragSrc, el.nextSibling);
+      opt_onDrop(srcID, id, 'below');
+    }
+    dragSrc.style.opacity = 0.4;
+    dragSrc = null;
+  }
+
+  function _handleDragEnd(event) {
+    if (dragSrc) {
+      dragSrc.style.opacity = 1;
+      dragSrc = null;
+    }
+    for (let i = 0; i < dragItems.length; i++) {
+      removeClasses(dragItems[i]);
+    }
+  }
+
+  for (let i = 0; i < dragItems.length; i++) {
+    let el = dragItems[i];
+    el.setAttribute('draggable', true);
+    el.addEventListener('mousedown', _handleMouseDown);
+    el.addEventListener('dragstart', _handleDragStart);
+    el.addEventListener('dragover', _handleDragOver);
+    el.addEventListener('drop', _handleDragDrop);
+    el.addEventListener('dragend', _handleDragEnd);
+    el.addEventListener('dragleave', function(event) {
+      removeClasses(event.currentTarget);
+    });
+  }
+}
diff --git a/static/js/tracker/tracker-display.js b/static/js/tracker/tracker-display.js
new file mode 100644
index 0000000..23b9dcf
--- /dev/null
+++ b/static/js/tracker/tracker-display.js
@@ -0,0 +1,322 @@
+/* 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
+ */
+
+/**
+ * Functions used by Monorail to control the display of elements on
+ * the page, rollovers, and popup menus.
+ *
+ */
+
+
+/**
+ * Show a popup menu below a specified element. Optional x and y deltas can be
+ * used to fine-tune placement.
+ * @param {string} id The HTML id of the popup menu.
+ * @param {Element} el The HTML element that the popup should appear near.
+ * @param {number} opt_deltaX Optional X offset to finetune placement.
+ * @param {number} opt_deltaY Optional Y offset to finetune placement.
+ * @param {Element} opt_menuButton The HTML element for a menu button that
+ *    was pressed to open the menu.  When a button was used, we need to ignore
+ *    the first "click" event, otherwise the menu will immediately close.
+ * @return Always returns false to indicate that the browser should handle the
+ * event normally.
+ */
+function TKR_showBelow(id, el, opt_deltaX, opt_deltaY, opt_menuButton) {
+  let popupDiv = $(id);
+  let elBounds = nodeBounds(el);
+  let startX = elBounds.x;
+  let startY = elBounds.y + elBounds.h;
+  if (BR_IsIE()) {
+    startX -= 1;
+    startY -= 2;
+  }
+  if (BR_IsSafari()) {
+    startX += 1;
+  }
+  popupDiv.style.display = 'block'; // needed so that offsetWidth != 0
+
+  popupDiv.style.left = '-2000px';
+  if (id == 'pop_dot' || id == 'redoMenu') {
+    startX = startX - popupDiv.offsetWidth + el.offsetWidth;
+  }
+  if (opt_deltaX) startX += opt_deltaX;
+  if (opt_deltaY) startY += opt_deltaY;
+  popupDiv.style.left = (startX)+'px';
+  popupDiv.style.top = (startY)+'px';
+  let popup = new TKR_MyPopup(popupDiv, opt_menuButton);
+  popup.show();
+  return false;
+}
+
+
+/**
+ * Show a popup menu to the right of a specified element. If there is not
+ * enough space to the right, then it will open to the left side instead.
+ * Optional x and y deltas can be used to fine-tune placement.
+ * TODO(jrobbins): reduce redundancy with function above.
+ * @param {string} id The HTML id of the popup menu.
+ * @param {Element} el The HTML element that the popup should appear near.
+ * @param {number} opt_deltaX Optional X offset to finetune placement.
+ * @param {number} opt_deltaY Optional Y offset to finetune placement.
+ * @return Always returns false to indicate that the browser should handle the
+ * event normally.
+ */
+function TKR_showRight(id, el, opt_deltaX, opt_deltaY) {
+  let popupDiv = $(id);
+  let elBounds = nodeBounds(el);
+  let startX = elBounds.x + elBounds.w;
+  let startY = elBounds.y;
+
+  // Calculate pageSize.w and pageSize.h
+  let docElemWidth = document.documentElement.clientWidth;
+  let docElemHeight = document.documentElement.clientHeight;
+  let pageSize = {
+    w: (window.innerWidth || docElemWidth && docElemWidth > 0 ?
+      docElemWidth : document.body.clientWidth) || 1,
+    h: (window.innerHeight || docElemHeight && docElemHeight > 0 ?
+      docElemHeight : document.body.clientHeight) || 1,
+  };
+
+  // We need to make the popupDiv visible in order to capture its width
+  popupDiv.style.display = 'block';
+  let popupDivBounds = nodeBounds(popupDiv);
+
+  // Show popup to the left
+  if (startX + popupDivBounds.w > pageSize.w) {
+    startX = elBounds.x - popupDivBounds.w;
+    if (BR_IsIE()) {
+      startX -= 4;
+      startY -= 2;
+    }
+    if (BR_IsNav()) {
+      startX -= 2;
+    }
+    if (BR_IsSafari()) {
+      startX += -1;
+    }
+
+  // Show popup to the right
+  } else {
+    if (BR_IsIE()) {
+      startY -= 2;
+    }
+    if (BR_IsNav()) {
+      startX += 2;
+    }
+    if (BR_IsSafari()) {
+      startX += 3;
+    }
+  }
+
+  popupDiv.style.left = '-2000px';
+  popupDiv.style.position = 'absolute';
+  if (opt_deltaX) startX += opt_deltaX;
+  if (opt_deltaY) startY += opt_deltaY;
+  popupDiv.style.left = (startX)+'px';
+  popupDiv.style.top = (startY)+'px';
+  let popup = new TKR_MyPopup(popupDiv);
+  popup.show();
+  return false;
+}
+
+
+/**
+ * Close the specified popup menu and unregister it with the popup
+ * controller, otherwise old leftover popup instances can mess with
+ * the future display of menus.
+ * @param {string} id The HTML ID of the element to hide.
+ */
+function TKR_closePopup(id) {
+  let e = $(id);
+  if (e) {
+    for (let i = 0; i < gPopupController.activePopups_.length; ++i) {
+      if (e === gPopupController.activePopups_[i]._div) {
+        let popup = gPopupController.activePopups_[i];
+        popup.hide();
+        gPopupController.activePopups_.splice(i, 1);
+        return;
+      }
+    }
+  }
+}
+
+
+var TKR_allColumnNames = []; // Will be defined in HTML file.
+
+/**
+ * Close all popup menus.  Also, reset the hover state of the menu item that
+ * was selected. The list of popup menu names is computed from the list of
+ * columns specified in the HTML for the issue list page.
+ * @param menuItem {Element} The menu item that the user clicked.
+ * @return Always returns false to indicate that the browser should handle the
+ * event normally.
+ */
+function TKR_closeAllPopups(menuItem) {
+  for (let col_index = 0; col_index < TKR_allColumnNames.length; col_index++) {
+    TKR_closePopup('pop_' + col_index);
+    TKR_closePopup('filter_' + col_index);
+  }
+  TKR_closePopup('pop_dot');
+  TKR_closePopup('redoMenu');
+  menuItem.classList.remove('hover');
+  return false;
+}
+
+
+/**
+ * Close all the submenus (of which, one may be currently open).
+ * @return Always returns false to indicate that the browser should handle the
+ * event normally.
+ */
+function TKR_closeSubmenus() {
+  for (let col_index = 0; col_index < TKR_allColumnNames.length; col_index++) {
+    TKR_closePopup('filter_' + col_index);
+  }
+  return false;
+}
+
+
+/**
+ * Find the enclosing HTML element that controls this section of the
+ * page and set it to use CSS class "opened".  That will make the
+ * section display in the opened state, regardless of what state is
+ * was in before.
+ * @param {Element} el The HTML element that the user clicked on.
+ * @return Always returns false to indicate that the browser should handle the
+ * event normally.
+ */
+function TKR_showHidden(el) {
+  while (el) {
+    if (el.classList.contains('closed')) {
+      el.classList.remove('closed');
+      el.classList.add('opened');
+      return false;
+    }
+    if (el.classList.contains('opened')) {
+      return false;
+    }
+    el = el.parentNode;
+  }
+}
+
+
+/**
+ * Toggle the display of a column in the issue list page.  That is
+ * done by adding or removing a CSS class of an enclosing HTML
+ * element, and by CSS rules that trigger based on that CSS class.
+ * @param {string} colName The name of the column to toggle,
+ * corresponds to a CSS class.
+ * @return Always returns false to indicate that the browser should
+ * handle the event normally.
+ */
+function TKR_toggleColumn(colName) {
+  let controlDiv = $('colcontrol');
+  if (controlDiv.classList.contains(colName)) {
+    controlDiv.classList.remove(colName);
+  } else {
+    controlDiv.classList.add(colName);
+  }
+  return false;
+}
+
+
+/**
+ * Toggle the display of a set of rows in the issue list page.  That is
+ * done by adding or removing a CSS class of an enclosing HTML
+ * element, and by CSS rules that trigger based on that CSS class.
+ * TODO(jrobbins): actually, this automatically hides the other groups.
+ * @param {string} rowClassName The name of the row group to toggle,
+ * corresponds to a CSS class.
+ * @return Always returns false to indicate that the browser should
+ * handle the event normally.
+ */
+function TKR_toggleRows(rowClassName) {
+  let controlDiv = $('colcontrol');
+  controlDiv.classList.add('hide_pri_groups');
+  controlDiv.classList.add('hide_mile_groups');
+  controlDiv.classList.add('hide_stat_groups');
+  TKR_toggleColumn(rowClassName);
+  return false;
+}
+
+
+/**
+ * A simple class that can manage the display of a popup menu.  Instances
+ * of this class are used by popup_controller.js.
+ * @param {Element} div The div that contains the popup menu.
+ * @param {Element} opt_launcherEl The button that launched the popup menu,
+ *     if any.
+ * @constructor
+ */
+function TKR_MyPopup(div, opt_launcherEl) {
+  this._div = div;
+  this._launcher = opt_launcherEl;
+  this._isVisible = false;
+}
+
+
+/**
+ * Show a popup menu.  This method registers the popup with popup_controller.
+ */
+TKR_MyPopup.prototype.show = function() {
+  this._div.style.display = 'block';
+  this._isVisible = true;
+  PC_addPopup(this);
+};
+
+
+/**
+ * Show a popup menu.  This method is called from the deactive method,
+ * which is called by popup_controller.
+ */
+TKR_MyPopup.prototype.hide = function() {
+  this._div.style.display = 'none';
+  this._isVisible = false;
+};
+
+
+/**
+ * When the popup_controller gets a user click, it calls deactive() on
+ * every active popup to check if the click should close that popup.
+ */
+TKR_MyPopup.prototype.deactivate = function(e) {
+  if (this._isVisible) {
+    let p = GetMousePosition(e);
+    if (nodeBounds(this._div).contains(p)) {
+      return false; // use clicked on popup, remain visible
+    } else if (this._launcher && nodeBounds(this._launcher).contains(p)) {
+      this._launcher = null;
+      return false; // mouseup element that launched menu, remain visible
+    } else {
+      this.hide();
+      return true; // clicked outside popup, make invisible
+    }
+  } else {
+    return true; // already deactivated, not visible
+  }
+};
+
+
+/**
+ * Highlight the issue row on the list page that contains the given
+ * checkbox.
+ * @param {Element} cb The checkbox that the user changed.
+ * @return Always returns false to indicate that the browser should
+ * handle the event normally.
+ */
+function TKR_highlightRow(el) {
+  let checked = el.checked;
+  while (el && el.tagName != 'TR') {
+    el = el.parentNode;
+  }
+  if (checked) {
+    el.classList.add('selected');
+  } else {
+    el.classList.remove('selected');
+  }
+  return false;
+}
diff --git a/static/js/tracker/tracker-editing.js b/static/js/tracker/tracker-editing.js
new file mode 100644
index 0000000..d53b515
--- /dev/null
+++ b/static/js/tracker/tracker-editing.js
@@ -0,0 +1,1823 @@
+/* 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
+ */
+/* eslint-disable no-var */
+/* eslint-disable prefer-const */
+
+/**
+ * This file contains JS functions that support various issue editing
+ * features of Monorail.  These editing features include: selecting
+ * issues on the issue list page, adding attachments, expanding and
+ * collapsing the issue editing form, and starring issues.
+ *
+ * Browser compatability: IE6, IE7, FF1.0+, Safari.
+ */
+
+
+/**
+ * Here are some string constants that are used repeatedly in the code.
+ */
+let TKR_SELECTED_CLASS = 'selected';
+let TKR_UNDEF_CLASS = 'undef';
+let TKR_NOVEL_CLASS = 'novel';
+let TKR_EXCL_CONFICT_CLASS = 'exclconflict';
+let TKR_QUESTION_MARK_CLASS = 'questionmark';
+let TKR_ATTACHPROMPT_ID = 'attachprompt';
+let TKR_ATTACHAFILE_ID = 'attachafile';
+let TKR_ATTACHMAXSIZE_ID = 'attachmaxsize';
+let TKR_CURRENT_TEMPLATE_INDEX_ID = 'current_template_index';
+let TKR_PROMPT_MEMBERS_ONLY_CHECKBOX_ID = 'members_only_checkbox';
+let TKR_PROMPT_SUMMARY_EDITOR_ID = 'summary_editor';
+let TKR_PROMPT_SUMMARY_MUST_BE_EDITED_CHECKBOX_ID =
+    'summary_must_be_edited_checkbox';
+let TKR_PROMPT_CONTENT_EDITOR_ID = 'content_editor';
+let TKR_PROMPT_STATUS_EDITOR_ID = 'status_editor';
+let TKR_PROMPT_OWNER_EDITOR_ID = 'owner_editor';
+let TKR_PROMPT_ADMIN_NAMES_EDITOR_ID = 'admin_names_editor';
+let TKR_OWNER_DEFAULTS_TO_MEMBER_CHECKBOX_ID =
+    'owner_defaults_to_member_checkbox';
+let TKR_OWNER_DEFAULTS_TO_MEMBER_AREA_ID =
+    'owner_defaults_to_member_area';
+let TKR_COMPONENT_REQUIRED_CHECKBOX_ID =
+    'component_required_checkbox';
+let TKR_PROMPT_COMPONENTS_EDITOR_ID = 'components_editor';
+let TKR_FIELD_EDITOR_ID_PREFIX = 'tmpl_custom_';
+let TKR_PROMPT_LABELS_EDITOR_ID_PREFIX = 'label';
+let TKR_CONFIRMAREA_ID = 'confirmarea';
+let TKR_DISCARD_YOUR_CHANGES = 'Discard your changes?';
+// Note, users cannot enter '<'.
+let TKR_DELETED_PROMPT_NAME = '<DELETED>';
+// Display warning if labels contain the following prefixes.
+// The following list is the same as tracker_constants.RESERVED_PREFIXES except
+// for the 'hotlist' prefix. 'hostlist' will be added when it comes a full
+// feature and when projects that use 'Hostlist-*' labels are transitioned off.
+let TKR_LABEL_RESERVED_PREFIXES = [
+  'id', 'project', 'reporter', 'summary', 'status', 'owner', 'cc',
+  'attachments', 'attachment', 'component', 'opened', 'closed',
+  'modified', 'is', 'has', 'blockedon', 'blocking', 'blocked', 'mergedinto',
+  'stars', 'starredby', 'description', 'comment', 'commentby', 'label',
+  'rank', 'explicit_status', 'derived_status', 'explicit_owner',
+  'derived_owner', 'explicit_cc', 'derived_cc', 'explicit_label',
+  'derived_label', 'last_comment_by', 'exact_component',
+  'explicit_component', 'derived_component'];
+
+
+/**
+ * Appends a given child element to the DOM based on parameters.
+ * @param {HTMLElement} parentEl
+ * @param {string} tag
+ * @param {string} optClassName
+ * @param {string} optID
+ * @param {string} optText
+ * @param {string} optStyle
+*/
+function TKR_createChild(parentEl, tag, optClassName, optID, optText, optStyle) {
+  let el = document.createElement(tag);
+  if (optClassName) el.classList.add(optClassName);
+  if (optID) el.id = optID;
+  if (optText) el.textContent = optText;
+  if (optStyle) el.setAttribute('style', optStyle);
+  parentEl.appendChild(el);
+  return el;
+}
+
+/**
+ * Select all the issues on the issue list page.
+ */
+function TKR_selectAllIssues() {
+  TKR_selectIssues(true);
+}
+
+
+/**
+ * Function to deselect all the issues on the issue list page.
+ */
+function TKR_selectNoneIssues() {
+  TKR_selectIssues(false);
+}
+
+
+/**
+ * Function to select or deselect all the issues on the issue list page.
+ * @param {boolean} checked True means select issues, False means deselect.
+ */
+function TKR_selectIssues(checked) {
+  let table = $('resultstable');
+  for (let r = 0; r < table.rows.length; ++r) {
+    let row = table.rows[r];
+    let firstCell = row.cells[0];
+    if (firstCell.tagName == 'TD') {
+      for (let e = 0; e < firstCell.childNodes.length; ++e) {
+        let element = firstCell.childNodes[e];
+        if (element.tagName == 'INPUT' && element.type == 'checkbox') {
+          element.checked = checked ? 'checked' : '';
+          if (checked) {
+            row.classList.add(TKR_SELECTED_CLASS);
+          } else {
+            row.classList.remove(TKR_SELECTED_CLASS);
+          }
+        }
+      }
+    }
+  }
+}
+
+
+/**
+ * The ID number to append to the next dynamically created file upload field.
+ */
+let TKR_nextFileID = 1;
+
+
+/**
+ * Function to dynamically create a new attachment upload field add
+ * insert it into the page DOM.
+ * @param {string} id The id of the parent HTML element.
+ *
+ * TODO(lukasperaza): use different nextFileID for separate forms on same page,
+ *  e.g. issue update form and issue description update form
+ */
+function TKR_addAttachmentFields(id, attachprompt_id,
+    attachafile_id, attachmaxsize_id) {
+  if (TKR_nextFileID >= 16) {
+    return;
+  }
+  if (typeof attachprompt_id === 'undefined') {
+    attachprompt_id = TKR_ATTACHPROMPT_ID;
+  }
+  if (typeof attachafile_id === 'undefined') {
+    attachafile_id = TKR_ATTACHAFILE_ID;
+  }
+  if (typeof attachmaxsize_id === 'undefined') {
+    attachmaxsize_id = TKR_ATTACHMAXSIZE_ID;
+  }
+  let el = $(id);
+  el.style.marginTop = '4px';
+  let div = document.createElement('div');
+  var id = 'file' + TKR_nextFileID;
+  let label = TKR_createChild(div, 'label', null, null, 'Attach file:');
+  label.setAttribute('for', id);
+  let input = TKR_createChild(
+      div, 'input', null, id, null, 'width:auto;margin-left:17px');
+  input.setAttribute('type', 'file');
+  input.name = id;
+  let removeLink = TKR_createChild(
+      div, 'a', null, null, 'Remove', 'font-size:x-small');
+  removeLink.href = '#';
+  removeLink.addEventListener('click', function(event) {
+    let target = event.target;
+    $(attachafile_id).focus();
+    target.parentNode.parentNode.removeChild(target.parentNode);
+    event.preventDefault();
+  });
+  el.appendChild(div);
+  el.querySelector('input').focus();
+  ++TKR_nextFileID;
+  if (TKR_nextFileID < 16) {
+    $(attachafile_id).textContent = 'Attach another file';
+  } else {
+    $(attachprompt_id).style.display = 'none';
+  }
+  $(attachmaxsize_id).style.display = '';
+}
+
+
+/**
+ * Function to display the form so that the user can update an issue.
+ */
+function TKR_openIssueUpdateForm() {
+  TKR_showHidden($('makechangesarea'));
+  TKR_goToAnchor('makechanges');
+  TKR_forceProperTableWidth();
+  window.setTimeout(
+      function() {
+        document.getElementById('addCommentTextArea').focus();
+      },
+      100);
+}
+
+
+/**
+ * The index of the template that is currently selected for editing
+ * on the administration page for issues.
+ */
+let TKR_currentTemplateIndex = 0;
+
+
+/**
+ * Array of field IDs that are defined in the current project, set by call to setFieldIDs().
+ */
+let TKR_fieldIDs = [];
+
+
+function TKR_setFieldIDs(fieldIDs) {
+  TKR_fieldIDs = fieldIDs;
+}
+
+
+/**
+ * This function displays the appropriate template text in a text field.
+ * It is called after the user has selected one template to view/edit.
+ * @param {Element} widget The list widget containing the list of templates.
+ */
+function TKR_selectTemplate(widget) {
+  TKR_showHidden($('edit_panel'));
+  TKR_currentTemplateIndex = widget.value;
+  $(TKR_CURRENT_TEMPLATE_INDEX_ID).value = TKR_currentTemplateIndex;
+
+  let content_editor = $(TKR_PROMPT_CONTENT_EDITOR_ID);
+  TKR_makeDefined(content_editor);
+
+  let can_edit = $('can_edit_' + TKR_currentTemplateIndex).value == 'yes';
+  let disabled = can_edit ? '' : 'disabled';
+
+  $(TKR_PROMPT_MEMBERS_ONLY_CHECKBOX_ID).disabled = disabled;
+  $(TKR_PROMPT_MEMBERS_ONLY_CHECKBOX_ID).checked = $(
+      'members_only_' + TKR_currentTemplateIndex).value == 'yes';
+  $(TKR_PROMPT_SUMMARY_EDITOR_ID).disabled = disabled;
+  $(TKR_PROMPT_SUMMARY_EDITOR_ID).value = $(
+      'summary_' + TKR_currentTemplateIndex).value;
+  $(TKR_PROMPT_SUMMARY_MUST_BE_EDITED_CHECKBOX_ID).disabled = disabled;
+  $(TKR_PROMPT_SUMMARY_MUST_BE_EDITED_CHECKBOX_ID).checked = $(
+      'summary_must_be_edited_' + TKR_currentTemplateIndex).value == 'yes';
+  content_editor.disabled = disabled;
+  content_editor.value = $('content_' + TKR_currentTemplateIndex).value;
+  $(TKR_PROMPT_STATUS_EDITOR_ID).disabled = disabled;
+  $(TKR_PROMPT_STATUS_EDITOR_ID).value = $(
+      'status_' + TKR_currentTemplateIndex).value;
+  $(TKR_PROMPT_OWNER_EDITOR_ID).disabled = disabled;
+  $(TKR_PROMPT_OWNER_EDITOR_ID).value = $(
+      'owner_' + TKR_currentTemplateIndex).value;
+  $(TKR_OWNER_DEFAULTS_TO_MEMBER_CHECKBOX_ID).disabled = disabled;
+  $(TKR_OWNER_DEFAULTS_TO_MEMBER_CHECKBOX_ID).checked = $(
+      'owner_defaults_to_member_' + TKR_currentTemplateIndex).value == 'yes';
+  $(TKR_COMPONENT_REQUIRED_CHECKBOX_ID).disabled = disabled;
+  $(TKR_COMPONENT_REQUIRED_CHECKBOX_ID).checked = $(
+      'component_required_' + TKR_currentTemplateIndex).value == 'yes';
+  $(TKR_OWNER_DEFAULTS_TO_MEMBER_AREA_ID).disabled = disabled;
+  $(TKR_OWNER_DEFAULTS_TO_MEMBER_AREA_ID).style.display =
+      $(TKR_PROMPT_OWNER_EDITOR_ID).value ? 'none' : '';
+  $(TKR_PROMPT_COMPONENTS_EDITOR_ID).disabled = disabled;
+  $(TKR_PROMPT_COMPONENTS_EDITOR_ID).value = $(
+      'components_' + TKR_currentTemplateIndex).value;
+
+  // Blank out all custom field editors first, then fill them in during the next loop.
+  for (var i = 0; i < TKR_fieldIDs.length; i++) {
+    let fieldEditor = $(TKR_FIELD_EDITOR_ID_PREFIX + TKR_fieldIDs[i]);
+    let holder = $('field_value_' + TKR_currentTemplateIndex + '_' + TKR_fieldIDs[i]);
+    if (fieldEditor) {
+      fieldEditor.disabled = disabled;
+      fieldEditor.value = holder ? holder.value : '';
+    }
+  }
+
+  var i = 0;
+  while ($(TKR_PROMPT_LABELS_EDITOR_ID_PREFIX + i)) {
+    $(TKR_PROMPT_LABELS_EDITOR_ID_PREFIX + i).disabled = disabled;
+    $(TKR_PROMPT_LABELS_EDITOR_ID_PREFIX + i).value =
+        $('label_' + TKR_currentTemplateIndex + '_' + i).value;
+    i++;
+  }
+
+  $(TKR_PROMPT_ADMIN_NAMES_EDITOR_ID).disabled = disabled;
+  $(TKR_PROMPT_ADMIN_NAMES_EDITOR_ID).value = $(
+      'admin_names_' + TKR_currentTemplateIndex).value;
+
+  let numNonDeletedTemplates = 0;
+  for (var i = 0; i < TKR_templateNames.length; i++) {
+    if (TKR_templateNames[i] != TKR_DELETED_PROMPT_NAME) {
+      numNonDeletedTemplates++;
+    }
+  }
+  if ($('delbtn')) {
+    if (numNonDeletedTemplates > 1) {
+      $('delbtn').disabled='';
+    } else { // Don't allow the last template to be deleted.
+      $('delbtn').disabled='disabled';
+    }
+  }
+}
+
+
+var TKR_templateNames = []; // Exported in tracker-onload.js
+
+
+/**
+ * Create a new issue template and add the needed form fields to the DOM.
+ */
+function TKR_newTemplate() {
+  let newIndex = TKR_templateNames.length;
+  let templateName = prompt('Name of new template?', '');
+  templateName = templateName.replace(
+      /[&<>"]/g, '', // " help emacs highlighting
+  );
+  if (!templateName) return;
+
+  for (let i = 0; i < TKR_templateNames.length; i++) {
+    if (templateName == TKR_templateNames[i]) {
+      alert('Please choose a unique name.');
+      return;
+    }
+  }
+
+  TKR_addTemplateHiddenFields(newIndex, templateName);
+  TKR_templateNames.push(templateName);
+
+  let templateOption = TKR_createChild(
+      $('template_menu'), 'option', null, null, templateName);
+  templateOption.value = newIndex;
+  templateOption.selected = 'selected';
+
+  let developerOption = TKR_createChild(
+      $('default_template_for_developers'), 'option', null, null, templateName);
+  developerOption.value = templateName;
+
+  let userOption = TKR_createChild(
+      $('default_template_for_users'), 'option', null, null, templateName);
+  userOption.value = templateName;
+
+  TKR_selectTemplate($('template_menu'));
+}
+
+
+/**
+ * Private function to append HTML for new hidden form fields
+ * for a new issue template to the issue admin form.
+ */
+function TKR_addTemplateHiddenFields(templateIndex, templateName) {
+  let parentEl = $('adminTemplates');
+  TKR_appendHiddenField(
+      parentEl, 'template_id_' + templateIndex, 'template_id_' + templateIndex, '0');
+  TKR_appendHiddenField(parentEl, 'name_' + templateIndex,
+      'name_' + templateIndex, templateName);
+  TKR_appendHiddenField(parentEl, 'members_only_' + templateIndex);
+  TKR_appendHiddenField(parentEl, 'summary_' + templateIndex);
+  TKR_appendHiddenField(parentEl, 'summary_must_be_edited_' + templateIndex);
+  TKR_appendHiddenField(parentEl, 'content_' + templateIndex);
+  TKR_appendHiddenField(parentEl, 'status_' + templateIndex);
+  TKR_appendHiddenField(parentEl, 'owner_' + templateIndex);
+  TKR_appendHiddenField(
+      parentEl, 'owner_defaults_to_member_' + templateIndex,
+      'owner_defaults_to_member_' + templateIndex, 'yes');
+  TKR_appendHiddenField(parentEl, 'component_required_' + templateIndex);
+  TKR_appendHiddenField(parentEl, 'components_' + templateIndex);
+
+  var i = 0;
+  while ($('label_0_' + i)) {
+    TKR_appendHiddenField(parentEl, 'label_' + templateIndex,
+        'label_' + templateIndex + '_' + i);
+    i++;
+  }
+
+  for (var i = 0; i < TKR_fieldIDs.length; i++) {
+    let fieldId = 'field_value_' + templateIndex + '_' + TKR_fieldIDs[i];
+    TKR_appendHiddenField(parentEl, fieldId, fieldId);
+  }
+
+  TKR_appendHiddenField(parentEl, 'admin_names_' + templateIndex);
+  TKR_appendHiddenField(
+      parentEl, 'can_edit_' + templateIndex, 'can_edit_' + templateIndex,
+      'yes');
+}
+
+
+/**
+ * Utility function to append string parts for one hidden field
+ * to the given array.
+ */
+function TKR_appendHiddenField(parentEl, name, opt_id, opt_value) {
+  let input = TKR_createChild(parentEl, 'input', null, opt_id || name);
+  input.setAttribute('type', 'hidden');
+  input.name = name;
+  input.value = opt_value || '';
+}
+
+
+/**
+ * Delete the currently selected issue template, and mark its hidden
+ * form field as deleted so that they will be ignored when submitted.
+ */
+function TKR_deleteTemplate() {
+  // Mark the current template name as deleted.
+  TKR_templateNames.splice(
+      TKR_currentTemplateIndex, 1, TKR_DELETED_PROMPT_NAME);
+  $('name_' + TKR_currentTemplateIndex).value = TKR_DELETED_PROMPT_NAME;
+  _toggleHidden($('edit_panel'));
+  $('delbtn').disabled = 'disabled';
+  TKR_rebuildTemplateMenu();
+  TKR_rebuildDefaultTemplateMenu('default_template_for_developers');
+  TKR_rebuildDefaultTemplateMenu('default_template_for_users');
+}
+
+/**
+ * Utility function to rebuild the template menu on the issue admin page.
+ */
+function TKR_rebuildTemplateMenu() {
+  let parentEl = $('template_menu');
+  while (parentEl.childNodes.length) {
+    parentEl.removeChild(parentEl.childNodes[0]);
+  }
+  for (let i = 0; i < TKR_templateNames.length; i++) {
+    if (TKR_templateNames[i] != TKR_DELETED_PROMPT_NAME) {
+      let option = TKR_createChild(
+          parentEl, 'option', null, null, TKR_templateNames[i]);
+      option.value = i;
+    }
+  }
+}
+
+
+/**
+ * Utility function to rebuild a default template drop-down.
+ */
+function TKR_rebuildDefaultTemplateMenu(menuID) {
+  let defaultTemplateName = $(menuID).value;
+  let parentEl = $(menuID);
+  while (parentEl.childNodes.length) {
+    parentEl.removeChild(parentEl.childNodes[0]);
+  }
+  for (let i = 0; i < TKR_templateNames.length; i++) {
+    if (TKR_templateNames[i] != TKR_DELETED_PROMPT_NAME) {
+      let option = TKR_createChild(
+          parentEl, 'option', null, null, TKR_templateNames[i]);
+      option.values = TKR_templateNames[i];
+      if (defaultTemplateName == TKR_templateNames[i]) {
+        option.setAttribute('selected', 'selected');
+      }
+    }
+  }
+}
+
+
+/**
+ * Change the issue template to the specified one.
+ * TODO(jrobbins): move to an AJAX implementation that would not reload page.
+ *
+ * @param {string} projectName The name of the current project.
+ * @param {string} templateName The name of the template to switch to.
+ */
+function TKR_switchTemplate(projectName, templateName) {
+  let ok = true;
+  if (TKR_isDirty()) {
+    ok = confirm('Switching to a different template will lose the text you entered.');
+  }
+  if (ok) {
+    TKR_initialFormValues = TKR_currentFormValues();
+    window.location = '/p/' + projectName +
+      '/issues/entry?template=' + templateName;
+  }
+}
+
+/**
+ * Function to remove a CSS class and initial tip from a text widget.
+ * Some text fields or text areas display gray textual tips to help the user
+ * make use of those widgets.  When the user focuses on the field, the tip
+ * disappears and is made ready for user input (in the normal text color).
+ * @param {Element} el The form field that had the gray text tip.
+ */
+function TKR_makeDefined(el) {
+  if (el.classList.contains(TKR_UNDEF_CLASS)) {
+    el.classList.remove(TKR_UNDEF_CLASS);
+    el.value = '';
+  }
+}
+
+
+/**
+ * Save the contents of the visible issue template text area into a hidden
+ * text field for later submission.
+ * Called when the user has edited the text of a issue template.
+ */
+function TKR_saveTemplate() {
+  if (TKR_currentTemplateIndex) {
+    $('members_only_' + TKR_currentTemplateIndex).value =
+        $(TKR_PROMPT_MEMBERS_ONLY_CHECKBOX_ID).checked ? 'yes' : '';
+    $('summary_' + TKR_currentTemplateIndex).value =
+        $(TKR_PROMPT_SUMMARY_EDITOR_ID).value;
+    $('summary_must_be_edited_' + TKR_currentTemplateIndex).value =
+        $(TKR_PROMPT_SUMMARY_MUST_BE_EDITED_CHECKBOX_ID).checked ? 'yes' : '';
+    $('content_' + TKR_currentTemplateIndex).value =
+        $(TKR_PROMPT_CONTENT_EDITOR_ID).value;
+    $('status_' + TKR_currentTemplateIndex).value =
+        $(TKR_PROMPT_STATUS_EDITOR_ID).value;
+    $('owner_' + TKR_currentTemplateIndex).value =
+        $(TKR_PROMPT_OWNER_EDITOR_ID).value;
+    $('owner_defaults_to_member_' + TKR_currentTemplateIndex).value =
+        $(TKR_OWNER_DEFAULTS_TO_MEMBER_CHECKBOX_ID).checked ? 'yes' : '';
+    $('component_required_' + TKR_currentTemplateIndex).value =
+        $(TKR_COMPONENT_REQUIRED_CHECKBOX_ID).checked ? 'yes' : '';
+    $('components_' + TKR_currentTemplateIndex).value =
+        $(TKR_PROMPT_COMPONENTS_EDITOR_ID).value;
+    $(TKR_OWNER_DEFAULTS_TO_MEMBER_AREA_ID).style.display =
+        $(TKR_PROMPT_OWNER_EDITOR_ID).value ? 'none' : '';
+
+    for (var i = 0; i < TKR_fieldIDs.length; i++) {
+      let fieldID = TKR_fieldIDs[i];
+      let fieldEditor = $(TKR_FIELD_EDITOR_ID_PREFIX + fieldID);
+      if (fieldEditor) {
+        _saveFieldValue(fieldID, fieldEditor.value);
+      }
+    }
+
+    var i = 0;
+    while ($('label_' + TKR_currentTemplateIndex + '_' + i)) {
+      $('label_' + TKR_currentTemplateIndex + '_' + i).value =
+         $(TKR_PROMPT_LABELS_EDITOR_ID_PREFIX + i).value;
+      i++;
+    }
+
+    $('admin_names_' + TKR_currentTemplateIndex).value =
+        $(TKR_PROMPT_ADMIN_NAMES_EDITOR_ID).value;
+  }
+}
+
+
+function _saveFieldValue(fieldID, val) {
+  let fieldValId = 'field_value_' + TKR_currentTemplateIndex + '_' + fieldID;
+  $(fieldValId).value = val;
+}
+
+
+/**
+ * This is a json string encoding of an array of form values after the initial
+ * page load. It is used for comparison on page unload to prompt the user
+ * before abandoning changes. It is initialized in TKR_onload().
+*/
+let TKR_initialFormValues;
+
+
+/**
+ * Returns a json string encoding of an array of all the values from user
+ * input fields of interest (omits search box, e.g.)
+ */
+function TKR_currentFormValues() {
+  let inputs = document.querySelectorAll('input, textarea, select, checkbox');
+  let values = [];
+
+  for (i = 0; i < inputs.length; i++) {
+    // Don't include blank inputs. This prevents a popup if the user
+    // clicks "add a row" for new labels but doesn't actually enter any
+    // text into them. Also ignore search box contents.
+    if (inputs[i].value && !inputs[i].hasAttribute('ignore-dirty') &&
+        inputs[i].name != 'token') {
+      values.push(inputs[i].value);
+    }
+  }
+
+  return JSON.stringify(values);
+}
+
+
+/**
+ * This function returns true if the user has made any edits to fields of
+ * interest.
+ */
+function TKR_isDirty() {
+  return TKR_initialFormValues != TKR_currentFormValues();
+}
+
+
+/**
+ * The user has clicked the 'Discard' button on the issue update form.
+ * If the form has been edited, ask if they are sure about discarding
+ * before then navigating to the given URL.  This can go up to some
+ * other page, or reload the current page with a fresh form.
+ * @param {string} nextUrl The page to show after discarding.
+ */
+function TKR_confirmDiscardUpdate(nextUrl) {
+  if (!TKR_isDirty() || confirm(TKR_DISCARD_YOUR_CHANGES)) {
+    document.location = nextUrl;
+  }
+}
+
+
+/**
+ * The user has clicked the 'Discard' button on the issue entry form.
+ * If the form has been edited, this function asks if they are sure about
+ * discarding before doing it.
+ * @param {Element} discardButton The 'Discard' button.
+ */
+function TKR_confirmDiscardEntry(discardButton) {
+  if (!TKR_isDirty() || confirm(TKR_DISCARD_YOUR_CHANGES)) {
+    TKR_go('list');
+  }
+}
+
+
+/**
+ * Normally, we show 2 rows of label editing fields when updating an issue.
+ * However, if the issue has more than that many labels already, we make sure to
+ * show them all.
+ */
+function TKR_exposeExistingLabelFields() {
+  if ($('label3').value ||
+      $('label4').value ||
+      $('label5').value) {
+    if ($('addrow1')) {
+      _showID('LF_row2');
+      _hideID('addrow1');
+    }
+  }
+  if ($('label6').value ||
+      $('label7').value ||
+      $('label8').value) {
+    _showID('LF_row3');
+    _hideID('addrow2');
+  }
+  if ($('label9').value ||
+      $('label10').value ||
+      $('label11').value) {
+    _showID('LF_row4');
+    _hideID('addrow3');
+  }
+  if ($('label12').value ||
+      $('label13').value ||
+      $('label14').value) {
+    _showID('LF_row5');
+    _hideID('addrow4');
+  }
+  if ($('label15').value ||
+      $('label16').value ||
+      $('label17').value) {
+    _showID('LF_row6');
+    _hideID('addrow5');
+  }
+  if ($('label18').value ||
+      $('label19').value ||
+      $('label20').value) {
+    _showID('LF_row7');
+    _hideID('addrow6');
+  }
+  if ($('label21').value ||
+      $('label22').value ||
+      $('label23').value) {
+    _showID('LF_row8');
+    _hideID('addrow7');
+  }
+}
+
+
+/**
+ * Flag to indicate when the user has not yet caused any input events.
+ * We use this to clear the placeholder in the new issue summary field
+ * exactly once.
+ */
+let TKR_firstEvent = true;
+
+
+/**
+ * This is called in response to almost any user input event on the
+ * issue entry page.  If the placeholder in the new issue sumary field has
+ * not yet been cleared, then this function clears it.
+ */
+function TKR_clearOnFirstEvent(initialSummary) {
+  if (TKR_firstEvent && $('summary').value == initialSummary) {
+    TKR_firstEvent = false;
+    $('summary').value = TKR_keepJustSummaryPrefixes($('summary').value);
+  }
+}
+
+/**
+ * Clear the summary, except for any prefixes of the form "[bracketed text]"
+ * or "keyword:".  If there were any, add a trailing space.  This is useful
+ * to people who like to encode issue classification info in the summary line.
+ */
+function TKR_keepJustSummaryPrefixes(s) {
+  let matches = s.match(/^(\[[^\]]+\])+|^(\S+:\s*)+/);
+  if (matches == null) {
+    return '';
+  }
+
+  let prefix = matches[0];
+  if (prefix.substr(prefix.length - 1) != ' ') {
+    prefix += ' ';
+  }
+  return prefix;
+}
+
+/**
+ * An array of label <input>s that start with reserved prefixes.
+ */
+let TKR_labelsWithReservedPrefixes = [];
+
+/**
+ * An array of label <input>s that are equal to reserved words.
+ */
+let TKR_labelsConflictingWithReserved = [];
+
+/**
+ * An array of novel issue status values entered by the user on the
+ * current page. 'Novel' means that they are not well known and are
+ * likely to be typos.  Note that this list will always have zero or
+ * one element, but a list is used for consistency with the list of
+ * novel labels.
+ */
+let TKR_novelStatuses = [];
+
+/**
+ * An array of novel issue label values entered by the user on the
+ * current page. 'Novel' means that they are not well known and are
+ * likely to be typos.
+ */
+let TKR_novelLabels = [];
+
+/**
+ * A boolean that indicates whether the entered owner value is valid or not.
+ */
+let TKR_invalidOwner = false;
+
+/**
+ * The user has changed the issue status text field.  This function
+ * checks whether it is a well-known status value.  If not, highlight it
+ * as a potential typo.
+ * @param {Element} textField The issue status text field.
+ * @return Always returns true to indicate that the browser should
+ * continue to process the user input event normally.
+ */
+function TKR_confirmNovelStatus(textField) {
+  let v = textField.value.trim().toLowerCase();
+  let isNovel = (v !== '');
+  let wellKnown = TKR_statusWords;
+  for (let i = 0; i < wellKnown.length && isNovel; ++i) {
+    let wk = wellKnown[i];
+    if (v == wk.toLowerCase()) {
+      isNovel = false;
+    }
+  }
+  if (isNovel) {
+    if (TKR_novelStatuses.indexOf(textField) == -1) {
+      TKR_novelStatuses.push(textField);
+    }
+    textField.classList.add(TKR_NOVEL_CLASS);
+  } else {
+    if (TKR_novelStatuses.indexOf(textField) != -1) {
+      TKR_novelStatuses.splice(TKR_novelStatuses.indexOf(textField), 1);
+    }
+    textField.classList.remove(TKR_NOVEL_CLASS);
+  }
+  TKR_updateConfirmBeforeSubmit();
+  return true;
+}
+
+
+/**
+ * The user has changed a issue label text field.  This function checks
+ * whether it is a well-known label value.  If not, highlight it as a
+ * potential typo.
+ * @param {Element} textField An issue label text field.
+ * @return Always returns true to indicate that the browser should
+ * continue to process the user input event normally.
+ *
+ * TODO(jrobbins): code duplication with function above.
+ */
+function TKR_confirmNovelLabel(textField) {
+  let v = textField.value.trim().toLowerCase();
+  if (v.search('-') == 0) {
+    v = v.substr(1);
+  }
+  let isNovel = (v !== '');
+  if (v.indexOf('?') > -1) {
+    isNovel = false; // We don't count labels that the user must edit anyway.
+  }
+  let wellKnown = TKR_labelWords;
+  for (var i = 0; i < wellKnown.length && isNovel; ++i) {
+    let wk = wellKnown[i];
+    if (v == wk.toLowerCase()) {
+      isNovel = false;
+    }
+  }
+
+  let containsReservedPrefix = false;
+  var textFieldWarningDisplayed = TKR_labelsWithReservedPrefixes.indexOf(textField) != -1;
+  for (var i = 0; i < TKR_LABEL_RESERVED_PREFIXES.length; ++i) {
+    if (v.startsWith(TKR_LABEL_RESERVED_PREFIXES[i] + '-')) {
+      if (!textFieldWarningDisplayed) {
+        TKR_labelsWithReservedPrefixes.push(textField);
+      }
+      containsReservedPrefix = true;
+      break;
+    }
+  }
+  if (!containsReservedPrefix && textFieldWarningDisplayed) {
+    TKR_labelsWithReservedPrefixes.splice(
+        TKR_labelsWithReservedPrefixes.indexOf(textField), 1);
+  }
+
+  let conflictsWithReserved = false;
+  var textFieldWarningDisplayed =
+      TKR_labelsConflictingWithReserved.indexOf(textField) != -1;
+  for (var i = 0; i < TKR_LABEL_RESERVED_PREFIXES.length; ++i) {
+    if (v == TKR_LABEL_RESERVED_PREFIXES[i]) {
+      if (!textFieldWarningDisplayed) {
+        TKR_labelsConflictingWithReserved.push(textField);
+      }
+      conflictsWithReserved = true;
+      break;
+    }
+  }
+  if (!conflictsWithReserved && textFieldWarningDisplayed) {
+    TKR_labelsConflictingWithReserved.splice(
+        TKR_labelsConflictingWithReserved.indexOf(textField), 1);
+  }
+
+  if (isNovel) {
+    if (TKR_novelLabels.indexOf(textField) == -1) {
+      TKR_novelLabels.push(textField);
+    }
+    textField.classList.add(TKR_NOVEL_CLASS);
+  } else {
+    if (TKR_novelLabels.indexOf(textField) != -1) {
+      TKR_novelLabels.splice(TKR_novelLabels.indexOf(textField), 1);
+    }
+    textField.classList.remove(TKR_NOVEL_CLASS);
+  }
+  TKR_updateConfirmBeforeSubmit();
+  return true;
+}
+
+/**
+ * Dictionary { prefix:[textField,...], ...} for all the prefixes of any
+ * text that has been entered into any label field.  This is used to find
+ * duplicate labels and multiple labels that share an single exclusive
+ * prefix (e.g., Priority).
+ */
+let TKR_usedPrefixes = {};
+
+/**
+ * This is a prefix to the HTML ids of each label editing field.
+ * It varied by page, so it is set in the HTML page.  Needed to initialize
+ * our validation across label input text fields.
+ */
+let TKR_labelFieldIDPrefix = '';
+
+/**
+ * Initialize the set of all used labels on forms that allow users to
+ * enter issue labels.  Some labels are supplied in the HTML page
+ * itself, and we do not want to offer duplicates of those.
+ */
+function TKR_prepLabelAC() {
+  let i = 0;
+  while ($('label'+i)) {
+    TKR_validateLabel($('label'+i));
+    i++;
+  }
+}
+
+/**
+ * Reads the owner field and determines if the current value is a valid member.
+ */
+function TKR_prepOwnerField(validOwners) {
+  if ($('owneredit')) {
+    currentOwner = $('owneredit').value;
+    if (currentOwner == '') {
+      // Empty owner field is not an invalid owner.
+      invalidOwner = false;
+      return;
+    }
+    invalidOwner = true;
+    for (let i = 0; i < validOwners.length; i++) {
+      let owner = validOwners[i].name;
+      if (currentOwner == owner) {
+        invalidOwner = false;
+        break;
+      }
+    }
+    TKR_invalidOwner = invalidOwner;
+  }
+}
+
+/**
+ * Keep track of which label prefixes have been used so that
+ * we can not offer the same label twice and so that we can highlight
+ * multiple labels that share an exclusive prefix.
+ */
+function TKR_updateUsedPrefixes(textField) {
+  if (textField.oldPrefix != undefined) {
+    DeleteArrayElement(TKR_usedPrefixes[textField.oldPrefix], textField);
+  }
+
+  let prefix = textField.value.split('-')[0].toLowerCase();
+  if (TKR_usedPrefixes[prefix] == undefined) {
+    TKR_usedPrefixes[prefix] = [textField];
+  } else {
+    TKR_usedPrefixes[prefix].push(textField);
+  }
+  textField.oldPrefix = prefix;
+}
+
+/**
+ * Go through all the label entry fields in our prefix-oriented
+ * data structure and highlight any that are part of a conflict
+ * (multiple labels with the same exclusive prefix).  Unhighlight
+ * any label text entry fields that are not in conflict.  And, display
+ * a warning message to encourage the user to correct the conflict.
+ */
+function TKR_highlightExclusiveLabelPrefixConflicts() {
+  let conflicts = [];
+  for (let prefix in TKR_usedPrefixes) {
+    let textFields = TKR_usedPrefixes[prefix];
+    if (textFields == undefined || textFields.length == 0) {
+      delete TKR_usedPrefixes[prefix];
+    } else if (textFields.length > 1 &&
+        FindInArray(TKR_exclPrefixes, prefix) != -1) {
+      conflicts.push(prefix);
+      for (var i = 0; i < textFields.length; i++) {
+        var tf = textFields[i];
+        tf.classList.add(TKR_EXCL_CONFICT_CLASS);
+      }
+    } else {
+      for (var i = 0; i < textFields.length; i++) {
+        var tf = textFields[i];
+        tf.classList.remove(TKR_EXCL_CONFICT_CLASS);
+      }
+    }
+  }
+  if (conflicts.length > 0) {
+    let severity = TKR_restrict_to_known ? 'Error' : 'Warning';
+    let confirm_area = $(TKR_CONFIRMAREA_ID);
+    if (confirm_area) {
+      $('confirmmsg').textContent = (severity +
+          ': Multiple values for: ' + conflicts.join(', '));
+      confirm_area.className = TKR_EXCL_CONFICT_CLASS;
+      confirm_area.style.display = '';
+    }
+  }
+}
+
+/**
+ * Keeps track of any label text fields that have a value that
+ * is bad enough to prevent submission of the form.  When this
+ * list is non-empty, the submit button gets disabled.
+ */
+let TKR_labelsBlockingSubmit = [];
+
+/**
+ * Look for any "?" characters in the label and, if found,
+ * make the label text red, prevent form submission, and
+ * display on-page help to tell the user to edit those labels.
+ * @param {Element} textField An issue label text field.
+ */
+function TKR_highlightQuestionMarks(textField) {
+  let tfIndex = TKR_labelsBlockingSubmit.indexOf(textField);
+  if (textField.value.indexOf('?') > -1 && tfIndex == -1) {
+    TKR_labelsBlockingSubmit.push(textField);
+    textField.classList.add(TKR_QUESTION_MARK_CLASS);
+  } else if (textField.value.indexOf('?') == -1 && tfIndex > -1) {
+    TKR_labelsBlockingSubmit.splice(tfIndex, 1);
+    textField.classList.remove(TKR_QUESTION_MARK_CLASS);
+  }
+
+  let block_submit_msg = $('blocksubmitmsg');
+  if (block_submit_msg) {
+    if (TKR_labelsBlockingSubmit.length > 0) {
+      block_submit_msg.textContent = 'You must edit labels that contain "?".';
+    } else {
+      block_submit_msg.textContent = '';
+    }
+  }
+}
+
+/**
+ * The user has edited a label.  Display a warning if the label is
+ * not a well known label, or if there are multiple labels that
+ * share an exclusive prefix.
+ * @param {Element} textField An issue label text field.
+ */
+function TKR_validateLabel(textField) {
+  if (textField == undefined) return;
+  TKR_confirmNovelLabel(textField);
+  TKR_updateUsedPrefixes(textField);
+  TKR_highlightExclusiveLabelPrefixConflicts();
+  TKR_highlightQuestionMarks(textField);
+}
+
+// TODO(jrobbins): what about typos in owner and cc list?
+
+/**
+ * If there are any novel status or label values, we display a message
+ * that explains that to the user so that they can catch any typos before
+ * submitting them.  If the project is restricting input to only the
+ * well-known statuses and labels, then show these as an error instead.
+ * In that case, on-page JS will prevent submission.
+ */
+function TKR_updateConfirmBeforeSubmit() {
+  let severity = TKR_restrict_to_known ? 'Error' : 'Note';
+  let novelWord = TKR_restrict_to_known ? 'undefined' : 'uncommon';
+  let msg = '';
+  let labels = TKR_novelLabels.map(function(item) {
+    return item.value;
+  });
+  if (TKR_novelStatuses.length > 0 && TKR_novelLabels.length > 0) {
+    msg = severity + ': You are using an ' + novelWord + ' status and ' + novelWord + ' label(s): ' + labels.join(', ') + '.'; // TODO: i18n
+  } else if (TKR_novelStatuses.length > 0) {
+    msg = severity + ': You are using an ' + novelWord + ' status value.';
+  } else if (TKR_novelLabels.length > 0) {
+    msg = severity + ': You are using ' + novelWord + ' label(s): ' + labels.join(', ') + '.';
+  }
+
+  for (var i = 0; i < TKR_labelsWithReservedPrefixes.length; ++i) {
+    msg += '\nNote: The label ' + TKR_labelsWithReservedPrefixes[i].value +
+           ' starts with a reserved word. This is not recommended.';
+  }
+  for (var i = 0; i < TKR_labelsConflictingWithReserved.length; ++i) {
+    msg += '\nNote: The label ' + TKR_labelsConflictingWithReserved[i].value +
+           ' conflicts with a reserved word. This is not recommended.';
+  }
+  // Display the owner is no longer a member note only if an owner error is not
+  // already shown on the page.
+  if (TKR_invalidOwner && !$('ownererror')) {
+    msg += '\nNote: Current owner is no longer a project member.';
+  }
+
+  let confirm_area = $(TKR_CONFIRMAREA_ID);
+  if (confirm_area) {
+    $('confirmmsg').textContent = msg;
+    if (msg != '') {
+      confirm_area.className = TKR_NOVEL_CLASS;
+      confirm_area.style.display = '';
+    } else {
+      confirm_area.style.display = 'none';
+    }
+  }
+}
+
+
+/**
+ * The user has selected a command from the 'Actions...' menu
+ * on the issue list.  This function checks the selected value and carry
+ * out the requested action.
+ * @param {Element} actionsMenu The 'Actions...' <select> form element.
+ */
+function TKR_handleListActions(actionsMenu) {
+  switch (actionsMenu.value) {
+    case 'bulk':
+      TKR_HandleBulkEdit();
+      break;
+    case 'colspec':
+      TKR_closeAllPopups(actionsMenu);
+      _showID('columnspec');
+      _hideID('addissuesspec');
+      break;
+    case 'flagspam':
+      TKR_flagSpam(true);
+      break;
+    case 'unflagspam':
+      TKR_flagSpam(false);
+      break;
+    case 'addtohotlist':
+      TKR_addToHotlist();
+      break;
+    case 'addissues':
+      _showID('addissuesspec');
+      _hideID('columnspec');
+      setCurrentColSpec();
+      break;
+    case 'removeissues':
+      HTL_removeIssues();
+      break;
+    case 'issuesperpage':
+      break;
+  }
+  actionsMenu.value = 'moreactions';
+}
+
+
+async function TKR_handleDetailActions(localId) {
+  let moreActions = $('more_actions');
+
+  if (moreActions.value == 'delete') {
+    $('copy_issue_form_fragment').style.display = 'none';
+    $('move_issue_form_fragment').style.display = 'none';
+    let ok = confirm(
+        'Normally, you should just close issues by setting their status ' +
+      'to a closed value.\n' +
+      'Are you sure you want to delete this issue?');
+    if (ok) {
+      await window.prpcClient.call('monorail.Issues', 'DeleteIssue', {
+        issueRef: {
+          projectName: window.CS_env.projectName,
+          localId: localId,
+        },
+        delete: true,
+      });
+      location.reload(true);
+      return;
+    }
+  }
+
+  if (moreActions.value == 'move') {
+    $('move_issue_form_fragment').style.display = '';
+    $('copy_issue_form_fragment').style.display = 'none';
+    return;
+  }
+  if (moreActions.value == 'copy') {
+    $('copy_issue_form_fragment').style.display = '';
+    $('move_issue_form_fragment').style.display = 'none';
+    return;
+  }
+
+  // If no action was taken, reset the dropdown to the 'More actions...' item.
+  moreActions.value = '0';
+}
+
+/**
+ * The user has selected the "Flag as spam..." menu item.
+ */
+async function TKR_flagSpam(isSpam) {
+  const selectedIssueRefs = [];
+  issueRefs.forEach((issueRef) => {
+    const checkbox = $('cb_' + issueRef.id);
+    if (checkbox && checkbox.checked) {
+      selectedIssueRefs.push({
+        projectName: issueRef.project_name,
+        localId: issueRef.id,
+      });
+    }
+  });
+  if (selectedIssueRefs.length > 0) {
+    if (!confirm((isSpam ? 'Flag' : 'Un-flag') +
+        ' all selected issues as spam?')) {
+      return;
+    }
+    await window.prpcClient.call('monorail.Issues', 'FlagIssues', {
+      issueRefs: selectedIssueRefs,
+      flag: isSpam,
+    });
+    location.reload(true);
+  } else {
+    alert('Please select some issues to flag as spam');
+  }
+}
+
+function TKR_addToHotlist() {
+  const selectedIssueRefs = GetSelectedIssuesRefs();
+  if (selectedIssueRefs.length > 0) {
+    window.__hotlists_dialog.ShowUpdateHotlistDialog();
+  } else {
+    alert('Please select some issues to add to a hotlist');
+  }
+}
+
+
+function GetSelectedIssuesRefs() {
+  let selectedIssueRefs = [];
+  for (let i = 0; i < issueRefs.length; i++) {
+    let checkbox = document.getElementById('cb_' + issueRefs[i]['id']);
+    if (checkbox == null) {
+      checkbox = document.getElementById(
+          'cb_' + issueRefs[i]['project_name'] + ':' + issueRefs[i]['id']);
+    }
+    if (checkbox && checkbox.checked) {
+      selectedIssueRefs.push(issueRefs[i]);
+    }
+  }
+  return selectedIssueRefs;
+}
+
+function onResponseUpdateUI(modifiedHotlists, remainingHotlists) {
+  const list = $('user-hotlists-list');
+  while (list.firstChild) {
+    list.removeChild(list.firstChild);
+  }
+  remainingHotlists.forEach((hotlist) => {
+    const name = hotlist[0];
+    const userId = hotlist[1];
+    const url = `/u/${userId}/hotlists/${name}`;
+    const hotlistLink = document.createElement('a');
+    hotlistLink.setAttribute('href', url);
+    hotlistLink.textContent = name;
+    list.appendChild(hotlistLink);
+    list.appendChild(document.createElement('br'));
+  });
+  $('user-hotlists').style.display = 'block';
+  onAddIssuesResponse(modifiedHotlists);
+}
+
+function onAddIssuesResponse(modifiedHotlists) {
+  const hotlistNames = modifiedHotlists.map((hotlist) => hotlist[0]).join(', ');
+  $('notice').textContent = 'Successfully updated ' + hotlistNames;
+  $('update-issues-hotlists').style.display = 'none';
+  $('alert-table').style.display = 'table';
+}
+
+function onAddIssuesFailure(reason) {
+  $('notice').textContent =
+      'Some hotlists were not updated: ' + reason.description;
+  $('update-issues-hotlists').style.display = 'none';
+  $('alert-table').style.display = 'table';
+}
+
+/**
+ * The user has selected the "Bulk Edit..." menu item.  Go to a page that
+ * offers the ability to edit all selected issues.
+ */
+// TODO(jrobbins): cross-project bulk edit
+function TKR_HandleBulkEdit() {
+  let selectedIssueRefs = GetSelectedIssuesRefs();
+  let selectedLocalIDs = [];
+  for (let i = 0; i < selectedIssueRefs.length; i++) {
+    selectedLocalIDs.push(selectedIssueRefs[i]['id']);
+  }
+  if (selectedLocalIDs.length > 0) {
+    let selectedLocalIDString = selectedLocalIDs.join(',');
+    let url = 'bulkedit?ids=' + selectedLocalIDString;
+    TKR_go(url + _ctxArgs);
+  } else {
+    alert('Please select some issues to edit');
+  }
+}
+
+/**
+ * Clears the selected status value when the 'clear' operator is chosen.
+ */
+function TKR_ignoreWidgetIfOpIsClear(selectEl, inputID) {
+  if (selectEl.value == 'clear') {
+    document.getElementById(inputID).value = '';
+  }
+}
+
+/**
+ * Array of original labels on the served page, so that we can notice
+ * when the used submits a form that has any Restrict-* labels removed.
+ */
+let TKR_allOrigLabels = [];
+
+
+/**
+ * Prevent users from easily entering "+1" comments.
+ */
+function TKR_checkPlusOne() {
+  let c = $('addCommentTextArea').value;
+  let instructions = (
+    '\nPlease use the star icon instead.\n' +
+      'Stars show your interest without annoying other users.');
+  if (new RegExp('^\\s*[-+]+[0-9]+\\s*.{0,30}$', 'm').test(c) &&
+      c.length < 150) {
+    alert('This looks like a "+1" comment.' + instructions);
+    return false;
+  }
+  if (new RegExp('^\\s*me too.{0,30}$', 'i').test(c)) {
+    alert('This looks like a "me too" comment.' + instructions);
+    return false;
+  }
+  return true;
+}
+
+
+/**
+ * If the user removes Restrict-* labels, ask them if they are sure.
+ */
+function TKR_checkUnrestrict(prevent_restriction_removal) {
+  let removedRestrictions = [];
+
+  for (let i = 0; i < TKR_allOrigLabels.length; ++i) {
+    let origLabel = TKR_allOrigLabels[i];
+    if (origLabel.indexOf('Restrict-') == 0) {
+      let found = false;
+      let j = 0;
+      while ($('label' + j)) {
+        let newLabel = $('label' + j).value;
+        if (newLabel == origLabel) {
+          found = true;
+          break;
+        }
+        j++;
+      }
+      if (!found) {
+        removedRestrictions.push(origLabel);
+      }
+    }
+  }
+
+  if (removedRestrictions.length == 0) {
+    return true;
+  }
+
+  if (prevent_restriction_removal) {
+    let msg = 'You may not remove restriction labels.';
+    alert(msg);
+    return false;
+  }
+
+  let instructions = (
+    'You are removing these restrictions:\n   ' +
+      removedRestrictions.join('\n   ') +
+      '\nThis may allow more people to access this issue.' +
+      '\nAre you sure?');
+  return confirm(instructions);
+}
+
+
+/**
+ * Add a column to a list view by updating the colspec form element and
+ * submiting an invisible <form> to load a new page that includes the column.
+ * @param {string} colname The name of the column to start showing.
+ */
+function TKR_addColumn(colname) {
+  let colspec = TKR_getColspecElement();
+  colspec.value = colspec.value + ' ' + colname;
+  $('colspecform').submit();
+}
+
+
+/**
+ * Allow members to shift-click to select multiple issues.  This keeps
+ * track of the last row that the user clicked a checkbox on.
+ */
+let TKR_lastSelectedRow = undefined;
+
+
+/**
+ * Return true if an event had the shift-key pressed.
+ * @param {Event} evt The mouse click event.
+ */
+function TKR_hasShiftKey(evt) {
+  evt = (evt) ? evt : (window.event) ? window.event : '';
+  if (evt) {
+    if (evt.modifiers) {
+      return evt.modifiers & Event.SHIFT_MASK;
+    } else {
+      return evt.shiftKey;
+    }
+  }
+  return false;
+}
+
+
+/**
+ * Select one row: check the checkbox and use highlight color.
+ * @param {Element} row the row containing the checkbox that the user clicked.
+ * @param {boolean} checked True if the user checked the box.
+ */
+function TKR_rangeSelectRow(row, checked) {
+  if (!row) {
+    return;
+  }
+  if (checked) {
+    row.classList.add('selected');
+  } else {
+    row.classList.remove('selected');
+  }
+
+  let td = row.firstChild;
+  while (td && td.tagName != 'TD') {
+    td = td.nextSibling;
+  }
+  if (!td) {
+    return;
+  }
+
+  let checkbox = td.firstChild;
+  while (checkbox && checkbox.tagName != 'INPUT') {
+    checkbox = checkbox.nextSibling;
+  }
+  if (!checkbox) {
+    return;
+  }
+
+  checkbox.checked = checked;
+}
+
+
+/**
+ * If the user shift-clicked a checkbox, (un)select a range.
+ * @param {Event} evt The mouse click event.
+ * @param {Element} el The checkbox that was clicked.
+ */
+function TKR_checkRangeSelect(evt, el) {
+  let clicked_row = el.parentNode.parentNode.rowIndex;
+  if (clicked_row == TKR_lastSelectedRow) {
+    return;
+  }
+  if (TKR_hasShiftKey(evt) && TKR_lastSelectedRow != undefined) {
+    let results_table = $('resultstable');
+    let delta = (clicked_row > TKR_lastSelectedRow) ? 1 : -1;
+    for (let i = TKR_lastSelectedRow; i != clicked_row; i += delta) {
+      TKR_rangeSelectRow(results_table.rows[i], el.checked);
+    }
+  }
+  TKR_lastSelectedRow = clicked_row;
+}
+
+
+/**
+ * Make a link to a given issue that includes context parameters that allow
+ * the user to see the same list columns, sorting, query, and pagination state
+ * if they ever navigate up to the list again.
+ * @param {{issue_url: string}} issueRef The dict with info about an issue,
+ *     including a url to the issue detail page.
+ */
+function TKR_makeIssueLink(issueRef) {
+  return '/p/' + issueRef['project_name'] + '/issues/detail?id=' + issueRef['id'] + _ctxArgs;
+}
+
+
+/**
+ * Hide or show a list column in the case where we already have the
+ * data for that column on the page.
+ * @param {number} colIndex index of the column that is being shown or hidden.
+ */
+function TKR_toggleColumnUpdate(colIndex) {
+  let shownCols = TKR_getColspecElement().value.split(' ');
+  let filteredCols = [];
+  for (let i=0; i< shownCols.length; i++) {
+    if (_allColumnNames[colIndex] != shownCols[i].toLowerCase()) {
+      filteredCols.push(shownCols[i]);
+    }
+  }
+
+  TKR_getColspecElement().value = filteredCols.join(' ');
+  TKR_toggleColumn('hide_col_' + colIndex);
+  _ctxArgs = _formatContextQueryArgs();
+  window.history.replaceState({}, '', '?' + _ctxArgs);
+}
+
+
+/**
+ * Convert a column into a groupby clause by removing it from the column spec
+ * and adding it to the groupby spec, then reloading the page.
+ * @param {number} colIndex index of the column that is being shown or hidden.
+ */
+function TKR_addGroupBy(colIndex) {
+  let colName = _allColumnNames[colIndex];
+  let shownCols = TKR_getColspecElement().value.split(' ');
+  let filteredCols = [];
+  for (var i=0; i < shownCols.length; i++) {
+    if (shownCols[i] && colName != shownCols[i].toLowerCase()) {
+      filteredCols.push(shownCols[i]);
+    }
+  }
+
+  TKR_getColspecElement().value = filteredCols.join(' ');
+
+  let groupSpec = $('groupbyspec');
+  let shownGroupings = groupSpec.value.split(' ');
+  let filteredGroupings = [];
+  for (i=0; i < shownGroupings.length; i++) {
+    if (shownGroupings[i] && colName != shownGroupings[i].toLowerCase()) {
+      filteredGroupings.push(shownGroupings[i]);
+    }
+  }
+  filteredGroupings.push(colName);
+  groupSpec.value = filteredGroupings.join(' ');
+  $('colspecform').submit();
+}
+
+
+/**
+ * Add a multi-valued custom field editing widget.
+ */
+function TKR_addMultiFieldValueWidget(
+    el, field_id, field_type, opt_validate_1, opt_validate_2, field_phase_name) {
+  let widget = document.createElement('INPUT');
+  widget.name = (field_phase_name && (
+    field_phase_name != '')) ? `custom_${field_id}_${field_phase_name}` :
+    `custom_${field_id}`;
+  if (field_type == 'str' || field_type =='url') {
+    widget.size = 90;
+  }
+  if (field_type == 'user') {
+    widget.style = 'width:12em';
+    widget.classList.add('userautocomplete');
+    widget.classList.add('customfield');
+    widget.classList.add('multivalued');
+    widget.addEventListener('focus', function(event) {
+      _acrob(null);
+      _acof(event);
+    });
+  }
+  if (field_type == 'int' || field_type == 'date') {
+    widget.style.textAlign = 'right';
+    widget.style.width = '12em';
+    widget.min = opt_validate_1;
+    widget.max = opt_validate_2;
+  }
+  if (field_type == 'int') {
+    widget.type = 'number';
+  } else if (field_type == 'date') {
+    widget.type = 'date';
+  }
+
+  el.parentNode.insertBefore(widget, el);
+
+  let del_button = document.createElement('U');
+  del_button.onclick = function(event) {
+    _removeMultiFieldValueWidget(event.target);
+  };
+  del_button.textContent = 'X';
+  el.parentNode.insertBefore(del_button, el);
+}
+
+
+function TKR_removeMultiFieldValueWidget(el) {
+  let target = el.previousSibling;
+  while (target && target.tagName != 'INPUT') {
+    target = target.previousSibling;
+  }
+  if (target) {
+    el.parentNode.removeChild(target);
+  }
+  el.parentNode.removeChild(el); // the X itself
+}
+
+
+/**
+ * Trim trailing commas and spaces off <INPUT type="email" multiple> fields
+ * before submitting the form.
+ */
+function TKR_trimCommas() {
+  let ccField = $('memberccedit');
+  if (ccField) {
+    ccField.value = ccField.value.replace(/,\s*$/, '');
+  }
+  ccField = $('memberenter');
+  if (ccField) {
+    ccField.value = ccField.value.replace(/,\s*$/, '');
+  }
+}
+
+
+/**
+ * Identify which issues have been checkedboxed for removal from hotlist.
+ */
+function HTL_removeIssues() {
+  let selectedLocalIDs = [];
+  for (let i = 0; i < issueRefs.length; i++) {
+    issueRef = issueRefs[i]['project_name']+':'+issueRefs[i]['id'];
+    let checkbox = document.getElementById('cb_' + issueRef);
+    if (checkbox && checkbox.checked) {
+      selectedLocalIDs.push(issueRef);
+    }
+  }
+
+  if (selectedLocalIDs.length > 0) {
+    if (!confirm('Remove all selected issues?')) {
+      return;
+    }
+    let selectedLocalIDString = selectedLocalIDs.join(',');
+    $('bulk_remove_local_ids').value = selectedLocalIDString;
+    $('bulk_remove_value').value = 'true';
+    setCurrentColSpec();
+
+    let form = $('bulkremoveissues');
+    form.submit();
+  } else {
+    alert('Please select some issues to remove');
+  }
+}
+
+function setCurrentColSpec() {
+  $('current_col_spec').value = TKR_getColspecElement().value;
+}
+
+
+async function saveNote(textBox, hotlistID) {
+  const projectName = textBox.getAttribute('projectname');
+  const localId = textBox.getAttribute('localid');
+  await window.prpcClient.call(
+      'monorail.Features', 'UpdateHotlistIssueNote', {
+        hotlistRef: {
+          hotlistId: hotlistID,
+        },
+        issueRef: {
+          projectName: textBox.getAttribute('projectname'),
+          localId: textBox.getAttribute('localid'),
+        },
+        note: textBox.value,
+      });
+  $(`itemnote_${projectName}_${localId}`).value = textBox.value;
+}
+
+// TODO(jojwang): monorail:4291, integrate this into autocomplete process
+// to prevent calling ListStatuses twice.
+/**
+ * Load the status select element with possible project statuses.
+ */
+function TKR_loadStatusSelect(projectName, selectId, selected, isBulkEdit=false) {
+  const projectRequestMessage = {
+    project_name: projectName};
+  const statusesPromise = window.prpcClient.call(
+      'monorail.Projects', 'ListStatuses', projectRequestMessage);
+  statusesPromise.then((statusesResponse) => {
+    const jsonData = TKR_convertStatuses(statusesResponse);
+    const statusSelect = document.getElementById(selectId);
+    // An initial option with value='selected' had to be added in HTML
+    // to prevent TKR_isDirty() from registering a change in the select input
+    // even when the user has not selected a different value.
+    // That option needs to be removed otherwise, screenreaders will announce
+    // its existence.
+    while (statusSelect.firstChild) {
+      statusSelect.removeChild(statusSelect.firstChild);
+    }
+    // Add unrecognized status (can be empty status) to open statuses.
+    let selectedFound = false;
+    jsonData.open.concat(jsonData.closed).forEach((status) => {
+      if (status.name === selected) {
+        selectedFound = true;
+      }
+    });
+    if (!selectedFound) {
+      jsonData.open.unshift({name: selected});
+    }
+    // Add open statuses.
+    if (jsonData.open.length > 0) {
+      const openGroup =
+          statusSelect.appendChild(createStatusGroup('Open', jsonData.open, selected, isBulkEdit));
+    }
+    if (jsonData.closed.length > 0) {
+      statusSelect.appendChild(createStatusGroup('Closed', jsonData.closed, selected));
+    }
+  });
+}
+
+function createStatusGroup(groupName, options, selected, isBulkEdit=false) {
+  const groupElement = document.createElement('optgroup');
+  groupElement.label = groupName;
+  options.forEach((option) => {
+    const opt = document.createElement('option');
+    opt.value = option.name;
+    opt.selected = (selected === option.name) ? true : false;
+    // Special case for when opt represents an empty status.
+    if (opt.value === '') {
+      if (isBulkEdit) {
+        opt.textContent = '--- (no change)';
+        opt.setAttribute('aria-label', 'no change');
+      } else {
+        opt.textContent = '--- (empty status)';
+        opt.setAttribute('aria-label', 'empty status');
+      }
+    } else {
+      opt.textContent = option.doc ? `${option.name} = ${option.doc}` : option.name;
+    }
+    groupElement.appendChild(opt);
+  });
+  return groupElement;
+}
+
+/**
+ * Generate DOM for a filter rules preview section.
+ */
+function renderFilterRulesSection(section_id, heading, value_why_list) {
+  let section = $(section_id);
+  while (section.firstChild) {
+    section.removeChild(section.firstChild);
+  }
+  if (value_why_list.length == 0) return false;
+
+  section.appendChild(document.createTextNode(heading + ': '));
+  for (let i = 0; i < value_why_list.length; ++i) {
+    if (i > 0) {
+      section.appendChild(document.createTextNode(', '));
+    }
+    let value = value_why_list[i].value;
+    let why = value_why_list[i].why;
+    let span = section.appendChild(
+        document.createElement('span'));
+    span.textContent = value;
+    if (why) span.setAttribute('title', why);
+  }
+  return true;
+}
+
+
+/**
+ * Generate DOM for a filter rules preview section bullet list.
+ */
+function renderFilterRulesListSection(section_id, heading, value_why_list) {
+  let section = $(section_id);
+  while (section.firstChild) {
+    section.removeChild(section.firstChild);
+  }
+  if (value_why_list.length == 0) return false;
+
+  section.appendChild(document.createTextNode(heading + ': '));
+  let bulletList = document.createElement('ul');
+  section.appendChild(bulletList);
+  for (let i = 0; i < value_why_list.length; ++i) {
+    let listItem = document.createElement('li');
+    bulletList.appendChild(listItem);
+    let value = value_why_list[i].value;
+    let why = value_why_list[i].why;
+    let span = listItem.appendChild(
+        document.createElement('span'));
+    span.textContent = value;
+    if (why) span.setAttribute('title', why);
+  }
+  return true;
+}
+
+
+/**
+ * Ask server to do a presubmit check and then display and warnings
+ * as the user edits an issue.
+ */
+function TKR_presubmit() {
+  const issue_form = (
+    document.forms.create_issue_form || document.forms.issue_update_form);
+  if (!issue_form) {
+    return;
+  }
+
+  const inputs = issue_form.querySelectorAll(
+      'input:not([type="file"]), textarea, select');
+  if (!inputs) {
+    return;
+  }
+
+  const valuesByName = new Map();
+  for (const key in inputs) {
+    if (!inputs.hasOwnProperty(key)) {
+      continue;
+    }
+    const input = inputs[key];
+    if (input.type === 'checkbox' && !input.checked) {
+      continue;
+    }
+    if (!valuesByName.has(input.name)) {
+      valuesByName.set(input.name, []);
+    }
+    valuesByName.get(input.name).push(input.value);
+  }
+
+  const issueDelta = TKR_buildIssueDelta(valuesByName);
+  const issueRef = {project_name: window.CS_env.projectName};
+  if (valuesByName.has('id')) {
+    issueRef.local_id = valuesByName.get('id')[0];
+  }
+
+  const presubmitMessage = {
+    issue_ref: issueRef,
+    issue_delta: issueDelta,
+  };
+  const presubmitPromise = window.prpcClient.call(
+      'monorail.Issues', 'PresubmitIssue', presubmitMessage);
+
+  presubmitPromise.then((response) => {
+    $('owner_avail_state').style.display = (
+      response.ownerAvailabilityState ? '' : 'none');
+    $('owner_avail_state').className = (
+      'availability_' + response.ownerAvailabilityState);
+    $('owner_availability').textContent = response.ownerAvailability;
+
+    let derived_labels;
+    if (response.derivedLabels) {
+      derived_labels = renderFilterRulesSection(
+          'preview_filterrules_labels', 'Labels', response.derivedLabels);
+    }
+    let derived_owner_email;
+    if (response.derivedOwners) {
+      derived_owner_email = renderFilterRulesSection(
+          'preview_filterrules_owner', 'Owner', response.derivedOwners[0]);
+    }
+    let derived_cc_emails;
+    if (response.derivedCcs) {
+      derived_cc_emails = renderFilterRulesSection(
+          'preview_filterrules_ccs', 'Cc', response.derivedCcs);
+    }
+    let warnings;
+    if (response.warnings) {
+      warnings = renderFilterRulesListSection(
+          'preview_filterrules_warnings', 'Warnings', response.warnings);
+    }
+    let errors;
+    if (response.errors) {
+      errors = renderFilterRulesListSection(
+          'preview_filterrules_errors', 'Errors', response.errors);
+    }
+
+    if (derived_labels || derived_owner_email || derived_cc_emails ||
+        warnings || errors) {
+      $('preview_filterrules_area').style.display = '';
+    } else {
+      $('preview_filterrules_area').style.display = 'none';
+    }
+  });
+}
+
+function HTL_deleteHotlist(form) {
+  if (confirm('Are you sure you want to delete this hotlist? This cannot be undone.')) {
+    $('delete').value = 'true';
+    form.submit();
+  }
+}
+
+function HTL_toggleIssuesShown(toggleIssuesButton) {
+  const can = toggleIssuesButton.value;
+  const hotlist_name = $('hotlist_name').value;
+  let url = `${hotlist_name}?can=${can}`;
+  const hidden_cols = $('colcontrol').classList.value;
+  if (window.location.href.includes('&colspec') || hidden_cols) {
+    const colSpecElement =
+        TKR_getColspecElement(); // eslint-disable-line new-cap
+    let sort = '';
+    if ($('sort')) {
+      sort = $('sort').value.split(' ').join('+');
+      url += `&sort=${sort}`;
+    }
+    url += colSpecElement ? `&colspec=${colSpecElement.value}` : '';
+  }
+  TKR_go(url);
+}
diff --git a/static/js/tracker/tracker-fields.js b/static/js/tracker/tracker-fields.js
new file mode 100644
index 0000000..d84f11d
--- /dev/null
+++ b/static/js/tracker/tracker-fields.js
@@ -0,0 +1,75 @@
+/* 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
+ */
+
+/**
+ * This file contains JS code for editing fields and field definitions.
+ */
+
+var TKR_fieldNameXmlHttp;
+
+
+/**
+ * Function that communicates with the server.
+ * @param {string} projectName Current project name.
+ * @param {string} fieldName The proposed field name.
+ */
+async function TKR_checkFieldNameOnServer(projectName, fieldName) {
+  fieldName = fieldName.toLowerCase();
+
+  const fieldNameMessage = {
+    project_name: projectName,
+    field_name: fieldName,
+  };
+  const labelOptionsMessage = {
+    project_name: projectName,
+  };
+  const responses = await Promise.all([
+      window.prpcClient.call(
+          'monorail.Projects', 'CheckFieldName', fieldNameMessage),
+      window.prpcClient.call(
+          'monorail.Projects', 'GetLabelOptions', labelOptionsMessage),
+  ]);
+
+  const fieldNameResponse = responses[0];
+  const labelsResponse = responses[1];
+
+  $('fieldnamefeedback').textContent = fieldNameResponse.error || '';
+  $('submit_btn').disabled = fieldNameResponse.error ? 'disabled' : '';
+
+  const maskedLabels = (labelsResponse.labelOptions || []).filter(
+      label_def => label_def.label.toLowerCase().startsWith(fieldName + '-'));
+
+  if (maskedLabels.length === 0) {
+    enableOtherTypeOptions(false);
+  } else {
+    const prefixLength = fieldName.length + 1;
+    const padLength = Math.max.apply(null, maskedLabels.map(
+        label_def => label_def.label.length - prefixLength));
+    const choicesLines = maskedLabels.map(label_def => {
+      // Strip the field name from the label.
+      const choice = label_def.label.substr(prefixLength);
+      return choice.padEnd(padLength) + ' = ' + label_def.docstring;
+    });
+    $('choices').textContent = choicesLines.join('\n');
+    $('field_type').value = 'enum_type';
+    $('choices_row').style.display = '';
+    enableOtherTypeOptions(true);
+  }
+}
+
+
+function enableOtherTypeOptions(disabled) {
+  let type_option_el = $('field_type').firstChild;
+  while (type_option_el) {
+    if (type_option_el.tagName == 'OPTION') {
+      if (type_option_el.value != 'enum_type') {
+        type_option_el.disabled = disabled ? 'disabled' : '';
+      }
+    }
+    type_option_el = type_option_el.nextSibling;
+  }
+}
diff --git a/static/js/tracker/tracker-install-ac.js b/static/js/tracker/tracker-install-ac.js
new file mode 100644
index 0000000..2fe1dcd
--- /dev/null
+++ b/static/js/tracker/tracker-install-ac.js
@@ -0,0 +1,53 @@
+/* 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
+ */
+/* eslint-disable camelcase */
+/* eslint-disable no-unused-vars */
+
+/**
+  * Sets up the legacy autocomplete editing widget on DOM elements that are
+  * set to use it.
+  */
+function TKR_install_ac() {
+  _ac_install();
+
+  _ac_register(function(input, event) {
+    if (input.id.startsWith('hotlists')) return TKR_hotlistsStore;
+    if (input.id.startsWith('search')) return TKR_searchStore;
+    if (input.id.startsWith('query_') || input.id.startsWith('predicate_')) {
+      return TKR_projectQueryStore;
+    }
+    if (input.id.startsWith('cmd')) return TKR_quickEditStore;
+    if (input.id.startsWith('labelPrefix')) return TKR_labelPrefixStore;
+    if (input.id.startsWith('label') && input.id != 'labelsInput') return TKR_labelStore;
+    if (input.dataset.acType === 'label' && input.id != 'labelsInput') return TKR_labelMultiStore;
+    if ((input.id.startsWith('component') || input.dataset.acType === 'component')
+      && input.id != 'componentsInput') return TKR_componentListStore;
+    if (input.id.startsWith('status')) return TKR_statusStore;
+    if (input.id.startsWith('member') || input.dataset.acType === 'member') return TKR_memberListStore;
+
+    if (input.id == 'admin_names_editor') return TKR_memberListStore;
+    if (input.id.startsWith('owner') && input.id != 'ownerInput') return TKR_ownerStore;
+    if (input.name == 'needs_perm' || input.name == 'grants_perm') {
+      return TKR_customPermissionsStore;
+    }
+    if (input.id == 'owner_editor' || input.dataset.acType === 'owner') return TKR_ownerStore;
+    if (input.className.indexOf('userautocomplete') != -1) {
+      const customFieldIDStr = input.name;
+      const uac = TKR_userAutocompleteStores[customFieldIDStr];
+      if (uac) return uac;
+      return TKR_ownerStore;
+    }
+    if (input.className.indexOf('autocomplete') != -1) {
+      return TKR_autoCompleteStore;
+    }
+    if (input.id.startsWith('copy_to') || input.id.startsWith('move_to') ||
+       input.id.startsWith('new_savedquery_projects') ||
+       input.id.startsWith('savedquery_projects')) {
+      return TKR_projectStore;
+    }
+  });
+};
diff --git a/static/js/tracker/tracker-keystrokes.js b/static/js/tracker/tracker-keystrokes.js
new file mode 100644
index 0000000..9a75971
--- /dev/null
+++ b/static/js/tracker/tracker-keystrokes.js
@@ -0,0 +1,232 @@
+/* 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
+ */
+
+/**
+ * This file contains JS functions that implement keystroke accelerators
+ * for Monorail.
+ */
+
+/**
+ * Array of HTML elements where the kibbles cursor can be.  E.g.,
+ * the TR elements of an issue list, or the TR's for comments on an issue.
+ */
+let TKR_cursorStops;
+
+/**
+ * Integer index into TKR_cursorStops of the currently selected cursor
+ * stop, or undefined if nothing has been selected yet.
+ */
+let TKR_selected = undefined;
+
+/**
+ * Register keystrokes that apply to all pages in the current component.
+ * E.g., keystrokes that should work on every page under the "Issues" tab.
+ * @param {string} listUrl Rooted URL of the artifact list.
+ * @param {string} entryUrl Rooted URL of the artifact entry page.
+ * @param {string} currentPageType One of 'list', 'entry', or 'detail'.
+ */
+function TKR_setupKibblesComponentKeys(listUrl, entryUrl, currentPageType) {
+  if (currentPageType != 'list') {
+    kibbles.keys.addKeyPressListener(
+        'u', function() {
+          TKR_go(listUrl);
+        });
+  }
+}
+
+
+/**
+ * On the artifact list page, go to the artifact at the kibbles cursor.
+ * @param {number} linkCellIndex row child that is expected to hold a link.
+ */
+function TKR_openArtifactAtCursor(linkCellIndex, newWindow) {
+  if (TKR_selected >= 0 && TKR_selected < TKR_cursorStops.length) {
+    window._goIssue(TKR_selected, newWindow);
+  }
+}
+
+
+/**
+ * On the artifact list page, toggle the checkbox for the artifact at
+ * the kibbles cursor.
+ * @param {number} cbCellIndex row child that is expected to hold a checkbox.
+ */
+function TKR_selectArtifactAtCursor(cbCellIndex) {
+  if (TKR_selected >= 0 && TKR_selected < TKR_cursorStops.length) {
+    const cell = TKR_cursorStops[TKR_selected].children[cbCellIndex];
+    let cb = cell.firstChild;
+    while (cb && cb.tagName != 'INPUT') {
+      cb = cb.nextSibling;
+    }
+    if (cb) {
+      cb.checked = cb.checked ? '' : 'checked';
+      TKR_highlightRow(cb);
+    }
+  }
+}
+
+/**
+ * On the artifact list page, toggle the star for the artifact at
+ * the kibbles cursor.
+ * @param {number} cbCellIndex row child that is expected to hold a checkbox
+ *     and star widget.
+ */
+function TKR_toggleStarArtifactAtCursor(cbCellIndex) {
+  if (TKR_selected >= 0 && TKR_selected < TKR_cursorStops.length) {
+    const cell = TKR_cursorStops[TKR_selected].children[cbCellIndex];
+    let starIcon = cell.firstChild;
+    while (starIcon && starIcon.tagName != 'A') {
+      starIcon = starIcon.nextSibling;
+    }
+    if (starIcon) {
+      _TKR_toggleStar(
+          starIcon, issueRefs[TKR_selected]['project_name'],
+          issueRefs[TKR_selected]['id'], null, null);
+    }
+  }
+}
+
+/**
+ * Updates the style on new stop and clears the style on the former stop.
+ * @param {Object} newStop the cursor stop that the user is selecting now.
+ * @param {Object} formerStop the old cursor stop, if any.
+ */
+function TKR_updateCursor(newStop, formerStop) {
+  TKR_selected = undefined;
+  if (formerStop) {
+    formerStop.element.classList.remove('cursor_on');
+    formerStop.element.classList.add('cursor_off');
+  }
+  if (newStop && newStop.element) {
+    newStop.element.classList.remove('cursor_off');
+    newStop.element.classList.add('cursor_on');
+    TKR_selected = newStop.index;
+  }
+}
+
+
+/**
+ * Walk part of the page DOM to find elements that should be kibbles
+ * cursor stops.  E.g., the rows of the issue list results table.
+ * @return {Array} an array of html elements.
+ */
+function TKR_findCursorRows() {
+  const rows = [];
+  const cursorarea = document.getElementById('cursorarea');
+  TKR_accumulateCursorRows(cursorarea, rows);
+  return rows;
+}
+
+
+/**
+ * Recusrively walk part of the page DOM to find elements that should
+ * be kibbles cursor stops.  E.g., the rows of the issue list results
+ * table.  The cursor stops are appended to the given rows array.
+ * @param {Element} parent html element to start on.
+ * @param {Array} rows  array of html TR or DIV elements, each cursor stop will
+ *    be added to this array.
+ */
+function TKR_accumulateCursorRows(parent, rows) {
+  for (let i = 0; i < parent.childNodes.length; i++) {
+    const elem = parent.childNodes[i];
+    const name = elem.tagName;
+    if (name && (name == 'TR' || name == 'DIV')) {
+      if (elem.className.indexOf('cursor') >= 0) {
+        elem.cursorIndex = rows.length;
+        rows.push(elem);
+      }
+    }
+    TKR_accumulateCursorRows(elem, rows);
+  }
+}
+
+
+/**
+ * Initialize kibbles cursors stops for the current page.
+ * @param {boolean} selectFirstStop True if the first stop should be
+ *   selected before the user presses any keys.
+ */
+function TKR_setupKibblesCursorStops(selectFirstStop) {
+  kibbles.skipper.addStopListener(
+      kibbles.skipper.LISTENER_TYPE.PRE, TKR_updateCursor);
+
+  // Set the 'offset' option to return the middle of the client area
+  // an option can be a static value, or a callback
+  kibbles.skipper.setOption('padding_top', 50);
+
+  // Set the 'offset' option to return the middle of the client area
+  // an option can be a static value, or a callback
+  kibbles.skipper.setOption('padding_bottom', 50);
+
+  // register our stops with skipper
+  TKR_cursorStops = TKR_findCursorRows();
+  for (let i = 0; i < TKR_cursorStops.length; i++) {
+    const element = TKR_cursorStops[i];
+    kibbles.skipper.append(element);
+
+    if (element.className.indexOf('cursor_on') >= 0) {
+      kibbles.skipper.setCurrentStop(i);
+    }
+  }
+}
+
+
+/**
+ * Initialize kibbles keystrokes for an artifact entry page.
+ * @param {string} listUrl Rooted URL of the artifact list.
+ * @param {string} entryUrl Rooted URL of the artifact entry page.
+ */
+function TKR_setupKibblesOnEntryPage(listUrl, entryUrl) {
+  TKR_setupKibblesComponentKeys(listUrl, entryUrl, 'entry');
+}
+
+
+/**
+ * Initialize kibbles keystrokes for an artifact list page.
+ * @param {string} listUrl Rooted URL of the artifact list.
+ * @param {string} entryUrl Rooted URL of the artifact entry page.
+ * @param {string} projectName Name of the current project.
+ * @param {number} linkCellIndex table column that is expected to
+ *   link to individual artifacts.
+ * @param {number} opt_checkboxCellIndex table column that is expected
+ *   to contain a selection checkbox.
+ */
+function TKR_setupKibblesOnListPage(
+    listUrl, entryUrl, projectName, linkCellIndex,
+    opt_checkboxCellIndex) {
+  TKR_setupKibblesCursorStops(true);
+
+  kibbles.skipper.addFwdKey('j');
+  kibbles.skipper.addRevKey('k');
+
+  if (opt_checkboxCellIndex != undefined) {
+    const cbCellIndex = opt_checkboxCellIndex;
+    kibbles.keys.addKeyPressListener(
+        'x', function() {
+          TKR_selectArtifactAtCursor(cbCellIndex);
+        });
+    kibbles.keys.addKeyPressListener(
+        's',
+        function() {
+          TKR_toggleStarArtifactAtCursor(cbCellIndex);
+        });
+  }
+  kibbles.keys.addKeyPressListener(
+      'o', function() {
+        TKR_openArtifactAtCursor(linkCellIndex, false);
+      });
+  kibbles.keys.addKeyPressListener(
+      'O', function() {
+        TKR_openArtifactAtCursor(linkCellIndex, true);
+      });
+  kibbles.keys.addKeyPressListener(
+      'enter', function() {
+        TKR_openArtifactAtCursor(linkCellIndex);
+      });
+
+  TKR_setupKibblesComponentKeys(listUrl, entryUrl, 'list');
+}
diff --git a/static/js/tracker/tracker-nav.js b/static/js/tracker/tracker-nav.js
new file mode 100644
index 0000000..4458a51
--- /dev/null
+++ b/static/js/tracker/tracker-nav.js
@@ -0,0 +1,182 @@
+/* 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
+ */
+/* eslint-disable no-var */
+
+/**
+ * This file contains JS functions that implement various navigation
+ * features of Monorail.
+ */
+
+
+/**
+ * Navigate the browser to the given URL.
+ * @param {string} url The URL of the page to browse.
+ * @param {boolean} newWindow Open a new tab or window.
+ */
+function TKR_go(url, newWindow) {
+  if (newWindow) {
+    window.open(url, '_blank');
+  } else {
+    document.location = url;
+  }
+}
+
+
+/**
+ * Tell the browser to scroll to the given anchor on the current page.
+ * @param {string} anchor Name of the <a name="xxx"> anchor on the page.
+ */
+function TKR_goToAnchor(anchor) {
+  document.location.hash = anchor;
+}
+
+
+/**
+ * Get the user-editable colspec form field.  This text field is normally
+ * display:none, but it is shown when the user chooses "Edit columns...".
+ * We need a function to get this element because there are multiple form
+ * fields on the page with name="colspec", and an IE misfeature sets their
+ * id attributes as well, which makes document.getElementById() fail.
+ * @return {Element} user editable colspec form field.
+ */
+function TKR_getColspecElement() {
+  const elem = document.getElementById('colspec_field');
+  return elem && elem.firstChild;
+}
+
+
+/**
+ * Get the artifact search form field.  This is a visible text field where
+ * the user enters a query for issues. This function
+ * is needed because there is also the project search field on the each page,
+ * and it has name="q".  An IE misfeature confuses name="..." with id="...".
+ * @return {Element} artifact query form field, or undefined.
+ */
+function TKR_getArtifactSearchField() {
+  const element = _getSearchBarComponent();
+  if (!element) return $('searchq');
+
+  return element.shadowRoot.querySelector('#searchq');
+}
+
+
+/**
+ * Get the can selector. This function
+ * @return {Element} can input element.
+ */
+function TKR_getArtifactCanField() {
+  const element = _getSearchBarComponent();
+  if (!element) return $('can');
+
+  return element.shadowRoot.querySelector('#can');
+}
+
+
+function _getSearchBarComponent() {
+  const element = document.querySelector('mr-header');
+  if (!element) return;
+
+  return element.shadowRoot.querySelector('mr-search-bar');
+}
+
+
+/**
+ * Build a query string for all the common contextual values that we use.
+ */
+function TKR_formatContextQueryArgs() {
+  let args = '';
+  let colspec = _ctxDefaultColspec;
+  const colSpecElem = TKR_getColspecElement();
+  if (colSpecElem) {
+    colspec = colSpecElem.value;
+  }
+
+  if (_ctxHotlistID != '') args += '&hotlist_id=' + _ctxHotlistID;
+  if (_ctxCan != 2) args += '&can=' + _ctxCan;
+  args += '&q=' + encodeURIComponent(_ctxQuery);
+  if (_ctxSortspec != '') args += '&sort=' + _ctxSortspec;
+  if (_ctxGroupBy != '') args += '&groupby=' + _ctxGroupBy;
+  if (colspec != _ctxDefaultColspec) args += '&colspec=' + colspec;
+  if (_ctxStart != 0) args += '&start=' + _ctxStart;
+  if (_ctxNum != _ctxResultsPerPage) args += '&num=' + _ctxNum;
+  if (!colSpecElem) args += '&mode=grid';
+  return args;
+}
+
+// Fields that should use ":" when filtering.
+const _PRETOKENIZED_FIELDS = [
+  'owner', 'reporter', 'cc', 'commentby', 'component'];
+
+/**
+ * The user wants to narrow their search results by adding a search term
+ * for the given prefix and value. Reload the issue list page with that
+ * additional search term.
+ * @param {string} prefix Field or label prefix, e.g., "Priority".
+ * @param {string} suffix Field or label value, e.g., "High".
+ */
+function TKR_filterTo(prefix, suffix) {
+  let newQuery = TKR_getArtifactSearchField().value;
+  if (newQuery != '') newQuery += ' ';
+
+  let op = '=';
+  for (let i = 0; i < _PRETOKENIZED_FIELDS.length; i++) {
+    if (prefix == _PRETOKENIZED_FIELDS[i]) {
+      op = ':';
+      break;
+    }
+  }
+
+  newQuery += prefix + op + suffix;
+  let url = 'list?can=' + TKR_getArtifactCanField().value + '&q=' + newQuery;
+  if ($('sort') && $('sort').value) url += '&sort=' + $('sort').value;
+  url += '&colspec=' + TKR_getColspecElement().value;
+  TKR_go(url);
+}
+
+
+/**
+ * The user wants to sort their search results by adding a sort spec
+ * for the given column. Reload the issue list page with that
+ * additional sort spec.
+ * @param {string} colname Field or label prefix, e.g., "Priority".
+ * @param {boolean} descending True if the values should be reversed.
+ */
+function TKR_addSort(colname, descending) {
+  let existingSortSpec = '';
+  if ($('sort')) {
+    existingSortSpec = $('sort').value;
+  }
+  const oldSpecs = existingSortSpec.split(/ +/);
+  let sortDirective = colname;
+  if (descending) sortDirective = '-' + colname;
+  const specs = [sortDirective];
+  for (let i = 0; i < oldSpecs.length; i++) {
+    if (oldSpecs[i] != '' && oldSpecs[i] != colname &&
+        oldSpecs[i] != '-' + colname) {
+      specs.push(oldSpecs[i]);
+    }
+  }
+
+  const isHotlist = window.location.href.includes('/hotlists/');
+  let url = isHotlist ? ($('hotlist_name').value + '?') : ('list?');
+  url += ('can='+ TKR_getArtifactCanField().value + '&q=' +
+      TKR_getArtifactSearchField().value);
+  url += '&sort=' + specs.join('+');
+  url += '&colspec=' + TKR_getColspecElement().value;
+  TKR_go(url);
+}
+
+/** Convenience function for sorting in ascending order. */
+function TKR_sortUp(colname) {
+  TKR_addSort(colname, false);
+}
+
+/** Convenience function for sorting in descending order. */
+function TKR_sortDown(colname) {
+  TKR_addSort(colname, true);
+}
+
diff --git a/static/js/tracker/tracker-onload.js b/static/js/tracker/tracker-onload.js
new file mode 100644
index 0000000..051c86d
--- /dev/null
+++ b/static/js/tracker/tracker-onload.js
@@ -0,0 +1,136 @@
+/* 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
+ */
+/* eslint-disable camelcase */
+/* eslint-disable no-unused-vars */
+
+
+/**
+ * This file contains the Monorail onload() function that is called
+ * when each EZT page loads.
+ */
+
+
+/**
+ * This code is run on every DIT page load.  It registers a handler
+ * for autocomplete on four different types of text fields based on the
+ * name of that text field.
+ */
+function TKR_onload() {
+  TKR_install_ac();
+  _PC_Install();
+  TKR_allColumnNames = _allColumnNames;
+  TKR_labelFieldIDPrefix = _lfidprefix;
+  TKR_allOrigLabels = _allOrigLabels;
+  TKR_initialFormValues = TKR_currentFormValues();
+}
+
+// External names for functions that are called directly from HTML.
+// JSCompiler does not rename functions that begin with an underscore.
+// They are not defined with "var" because we want them to be global.
+
+// TODO(jrobbins): the underscore names could be shortened by a
+// cross-file search-and-replace script in our build process.
+
+_selectAllIssues = TKR_selectAllIssues;
+_selectNoneIssues = TKR_selectNoneIssues;
+
+_toggleRows = TKR_toggleRows;
+_toggleColumn = TKR_toggleColumn;
+_toggleColumnUpdate = TKR_toggleColumnUpdate;
+_addGroupBy = TKR_addGroupBy;
+_addcol = TKR_addColumn;
+_checkRangeSelect = TKR_checkRangeSelect;
+_makeIssueLink = TKR_makeIssueLink;
+
+_onload = TKR_onload;
+
+_handleListActions = TKR_handleListActions;
+_handleDetailActions = TKR_handleDetailActions;
+
+_loadStatusSelect = TKR_loadStatusSelect;
+_fetchUserProjects = TKR_fetchUserProjects;
+_setACOptions = TKR_setUpAutoCompleteStore;
+_openIssueUpdateForm = TKR_openIssueUpdateForm;
+_addAttachmentFields = TKR_addAttachmentFields;
+_ignoreWidgetIfOpIsClear = TKR_ignoreWidgetIfOpIsClear;
+
+_acstore = _AC_SimpleStore;
+_accomp = _AC_Completion;
+_acreg = _ac_register;
+
+_formatContextQueryArgs = TKR_formatContextQueryArgs;
+_ctxArgs = '';
+_ctxCan = undefined;
+_ctxQuery = undefined;
+_ctxSortspec = undefined;
+_ctxGroupBy = undefined;
+_ctxDefaultColspec = undefined;
+_ctxStart = undefined;
+_ctxNum = undefined;
+_ctxResultsPerPage = undefined;
+
+_filterTo = TKR_filterTo;
+_sortUp = TKR_sortUp;
+_sortDown = TKR_sortDown;
+
+_closeAllPopups = TKR_closeAllPopups;
+_closeSubmenus = TKR_closeSubmenus;
+_showRight = TKR_showRight;
+_showBelow = TKR_showBelow;
+_highlightRow = TKR_highlightRow;
+
+_setFieldIDs = TKR_setFieldIDs;
+_selectTemplate = TKR_selectTemplate;
+_saveTemplate = TKR_saveTemplate;
+_newTemplate = TKR_newTemplate;
+_deleteTemplate = TKR_deleteTemplate;
+_switchTemplate = TKR_switchTemplate;
+_templateNames = TKR_templateNames;
+
+_confirmNovelStatus = TKR_confirmNovelStatus;
+_confirmNovelLabel = TKR_confirmNovelLabel;
+_vallab = TKR_validateLabel;
+_exposeExistingLabelFields = TKR_exposeExistingLabelFields;
+_confirmDiscardEntry = TKR_confirmDiscardEntry;
+_confirmDiscardUpdate = TKR_confirmDiscardUpdate;
+_lfidprefix = undefined;
+_allOrigLabels = undefined;
+_checkPlusOne = TKR_checkPlusOne;
+_checkUnrestrict = TKR_checkUnrestrict;
+
+_clearOnFirstEvent = TKR_clearOnFirstEvent;
+_forceProperTableWidth = TKR_forceProperTableWidth;
+
+_initialFormValues = TKR_initialFormValues;
+_currentFormValues = TKR_currentFormValues;
+
+_acof = _ac_onfocus;
+_acmo = _ac_mouseover;
+_acse = _ac_select;
+_acrob = _ac_ob;
+
+// Variables that are given values in the HTML file.
+_allColumnNames = [];
+
+_go = TKR_go;
+_getColspec = TKR_getColspecElement;
+
+// Make the document actually listen for click events, otherwise the
+// event handlers above would never get called.
+if (document.captureEvents) document.captureEvents(Event.CLICK);
+
+_setupKibblesOnEntryPage = TKR_setupKibblesOnEntryPage;
+_setupKibblesOnListPage = TKR_setupKibblesOnListPage;
+
+_checkFieldNameOnServer = TKR_checkFieldNameOnServer;
+_checkLeafName = TKR_checkLeafName;
+
+_addMultiFieldValueWidget = TKR_addMultiFieldValueWidget;
+_removeMultiFieldValueWidget = TKR_removeMultiFieldValueWidget;
+_trimCommas = TKR_trimCommas;
+
+_initDragAndDrop = TKR_initDragAndDrop;
diff --git a/static/js/tracker/tracker-update-issues-hotlists.js b/static/js/tracker/tracker-update-issues-hotlists.js
new file mode 100644
index 0000000..04a85bf
--- /dev/null
+++ b/static/js/tracker/tracker-update-issues-hotlists.js
@@ -0,0 +1,320 @@
+/* Copyright 2018 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
+ */
+
+/**
+ * This file contains JS functions that support a dialog for adding and removing
+ * issues from hotlists in Monorail.
+ */
+
+(function() {
+  window.__hotlists_dialog = window.__hotlists_dialog || {};
+
+  // An optional IssueRef.
+  // If set, we will not check for selected issues, and only add/remove issueRef
+  // instead.
+  window.__hotlists_dialog.issueRef = null;
+  // A function to be called with the modified hotlists. If issueRef is set, the
+  // hotlists for which the user is owner and the issue is part of will be
+  // passed as well.
+  window.__hotlists_dialog.onResponse = () => {};
+  // A function to be called if there was an error updating the hotlists.
+  window.__hotlists_dialog.onFailure = () => {};
+
+  /**
+   * A function to show the hotlist dialog.
+   * It is the only function exported by this module.
+   */
+  function ShowUpdateHotlistDialog() {
+    _FetchHotlists().then(_BuildDialog);
+  }
+
+  async function _CreateNewHotlistWithIssues() {
+    let selectedIssueRefs;
+    if (window.__hotlists_dialog.issueRef) {
+      selectedIssueRefs = [window.__hotlists_dialog.issueRef];
+    } else {
+      selectedIssueRefs = _GetSelectedIssueRefs();
+    }
+
+    const name = await _CheckNewHotlistName();
+    if (!name) {
+      return;
+    }
+
+    const message = {
+      name: name,
+      summary: 'Hotlist of bulk added issues',
+      issueRefs: selectedIssueRefs,
+    };
+    try {
+      await window.prpcClient.call(
+          'monorail.Features', 'CreateHotlist', message);
+    } catch (error) {
+      window.__hotlists_dialog.onFailure(error);
+      return;
+    }
+
+    const newHotlist = [name, window.CS_env.loggedInUserEmail];
+    const newIssueHotlists = [];
+    window.__hotlists_dialog._issueHotlists.forEach(
+        hotlist => newIssueHotlists.push(hotlist.split('_')));
+    newIssueHotlists.push(newHotlist);
+    window.__hotlists_dialog.onResponse([newHotlist], newIssueHotlists);
+  }
+
+  async function _UpdateIssuesInHotlists() {
+    const hotlistRefsAdd = _GetSelectedHotlists(
+        window.__hotlists_dialog._userHotlists);
+    const hotlistRefsRemove = _GetSelectedHotlists(
+        window.__hotlists_dialog._issueHotlists);
+    if (hotlistRefsAdd.length === 0 && hotlistRefsRemove.length === 0) {
+      alert('Please select/un-select some hotlists');
+      return;
+    }
+
+    let selectedIssueRefs;
+    if (window.__hotlists_dialog.issueRef) {
+      selectedIssueRefs = [window.__hotlists_dialog.issueRef];
+    } else {
+      selectedIssueRefs = _GetSelectedIssueRefs();
+    }
+
+    if (hotlistRefsAdd.length > 0) {
+      const message = {
+        hotlistRefs: hotlistRefsAdd,
+        issueRefs: selectedIssueRefs,
+      };
+      try {
+        await window.prpcClient.call(
+            'monorail.Features', 'AddIssuesToHotlists', message);
+      } catch (error) {
+        window.__hotlists_dialog.onFailure(error);
+        return;
+      }
+      hotlistRefsAdd.forEach(hotlist => {
+        window.__hotlists_dialog._issueHotlists.add(
+            hotlist.name + '_' + hotlist.owner.user_id);
+      });
+    }
+
+    if (hotlistRefsRemove.length > 0) {
+      const message = {
+        hotlistRefs: hotlistRefsRemove,
+        issueRefs: selectedIssueRefs,
+      };
+      try {
+        await window.prpcClient.call(
+            'monorail.Features', 'RemoveIssuesFromHotlists', message);
+      } catch (error) {
+        window.__hotlists_dialog.onFailure(error);
+        return;
+      }
+      hotlistRefsRemove.forEach(hotlist => {
+        window.__hotlists_dialog._issueHotlists.delete(
+            hotlist.name + '_' + hotlist.owner.user_id);
+      });
+    }
+
+    const modifiedHotlists = hotlistRefsAdd.concat(hotlistRefsRemove).map(
+        hotlist => [hotlist.name, hotlist.owner.user_id]);
+    const newIssueHotlists = [];
+    window.__hotlists_dialog._issueHotlists.forEach(
+        hotlist => newIssueHotlists.push(hotlist.split('_')));
+
+    window.__hotlists_dialog.onResponse(modifiedHotlists, newIssueHotlists);
+  }
+
+  async function _FetchHotlists() {
+    const userHotlistsMessage = {
+      user: {
+        display_name: window.CS_env.loggedInUserEmail,
+      }
+    };
+    const userHotlistsResponse = await window.prpcClient.call(
+        'monorail.Features', 'ListHotlistsByUser', userHotlistsMessage);
+
+    // Here we have the list of all hotlists owned by the user. We filter out
+    // the hotlists that already contain issueRef in the next paragraph of code.
+    window.__hotlists_dialog._userHotlists = new Set();
+    (userHotlistsResponse.hotlists || []).forEach(hotlist => {
+      window.__hotlists_dialog._userHotlists.add(
+          hotlist.name + '_' + hotlist.ownerRef.userId);
+    });
+
+    // Here we filter out the hotlists that are owned by the user, and that
+    // contain issueRef from _userHotlists and save them into _issueHotlists.
+    window.__hotlists_dialog._issueHotlists = new Set();
+    if (window.__hotlists_dialog.issueRef) {
+      const issueHotlistsMessage = {
+        issue: window.__hotlists_dialog.issueRef,
+      };
+      const issueHotlistsResponse = await window.prpcClient.call(
+          'monorail.Features', 'ListHotlistsByIssue', issueHotlistsMessage);
+      (issueHotlistsResponse.hotlists || []).forEach(hotlist => {
+        const hotlistRef = hotlist.name + '_' + hotlist.ownerRef.userId;
+        if (window.__hotlists_dialog._userHotlists.has(hotlistRef)) {
+          window.__hotlists_dialog._userHotlists.delete(hotlistRef);
+          window.__hotlists_dialog._issueHotlists.add(hotlistRef);
+        }
+      });
+    }
+  }
+
+  function _BuildDialog() {
+    const table = $('js-hotlists-table');
+
+    while (table.firstChild) {
+      table.removeChild(table.firstChild);
+    }
+
+    if (window.__hotlists_dialog._issueHotlists.size > 0) {
+      _UpdateRows(
+          table, 'Remove issues from:',
+          window.__hotlists_dialog._issueHotlists);
+    }
+    _UpdateRows(table, 'Add issues to:',
+        window.__hotlists_dialog._userHotlists);
+    _BuildCreateNewHotlist(table);
+
+    $('update-issues-hotlists').style.display = 'block';
+    $('save-issues-hotlists').addEventListener(
+        'click', _UpdateIssuesInHotlists);
+    $('cancel-update-hotlists').addEventListener('click', function() {
+      $('update-issues-hotlists').style.display = 'none';
+    });
+
+  }
+
+  function _BuildCreateNewHotlist(table) {
+    const inputTr = document.createElement('tr');
+    inputTr.classList.add('hotlist_rows');
+
+    const inputCell = document.createElement('td');
+    const input = document.createElement('input');
+    input.setAttribute('id', 'text_new_hotlist_name');
+    input.setAttribute('placeholder', 'New hotlist name');
+    // Hotlist changes are automatic and should be ignored by
+    // TKR_currentFormValues() and TKR_isDirty()
+    input.setAttribute('ignore-dirty', true);
+    input.addEventListener('input', _CheckNewHotlistName);
+    inputCell.appendChild(input);
+    inputTr.appendChild(inputCell);
+
+    const buttonCell = document.createElement('td');
+    const button = document.createElement('button');
+    button.setAttribute('id', 'create-new-hotlist');
+    button.addEventListener('click', _CreateNewHotlistWithIssues);
+    button.textContent = 'Create New Hotlist';
+    button.disabled = true;
+    buttonCell.appendChild(button);
+    inputTr.appendChild(buttonCell);
+
+    table.appendChild(inputTr);
+
+    const feedbackTr = document.createElement('tr');
+    feedbackTr.classList.add('hotlist_rows');
+
+    const feedbackCell = document.createElement('td');
+    feedbackCell.setAttribute('colspan', '2');
+    const feedback = document.createElement('span');
+    feedback.classList.add('fielderror');
+    feedback.setAttribute('id', 'hotlistnamefeedback');
+    feedbackCell.appendChild(feedback);
+    feedbackTr.appendChild(feedbackCell);
+
+    table.appendChild(feedbackTr);
+  }
+
+  function _UpdateRows(table, title, hotlists) {
+    const tr = document.createElement('tr');
+    tr.classList.add('hotlist_rows');
+    const addCell = document.createElement('td');
+    const add = document.createElement('b');
+    add.textContent = title;
+    addCell.appendChild(add);
+    tr.appendChild(addCell);
+    table.appendChild(tr);
+
+    hotlists.forEach(hotlist => {
+      const hotlistParts = hotlist.split('_');
+      const name = hotlistParts[0];
+
+      const tr = document.createElement('tr');
+      tr.classList.add('hotlist_rows');
+
+      const cbCell = document.createElement('td');
+      const cb = document.createElement('input');
+      cb.classList.add('checkRangeSelect');
+      cb.setAttribute('id', 'cb_hotlist_' + hotlist);
+      cb.setAttribute('type', 'checkbox');
+      // Hotlist changes are automatic and should be ignored by
+      // TKR_currentFormValues() and TKR_isDirty()
+      cb.setAttribute('ignore-dirty', true);
+      cbCell.appendChild(cb);
+
+      const nameCell = document.createElement('td');
+      const label = document.createElement('label');
+      label.htmlFor = cb.id;
+      label.textContent = name;
+      nameCell.appendChild(label);
+
+      tr.appendChild(cbCell);
+      tr.appendChild(nameCell);
+      table.appendChild(tr);
+    });
+  }
+
+  async function _CheckNewHotlistName() {
+    const name = $('text_new_hotlist_name').value;
+    const checkNameResponse = await window.prpcClient.call(
+        'monorail.Features', 'CheckHotlistName', {name});
+
+    if (checkNameResponse.error) {
+      $('hotlistnamefeedback').textContent = checkNameResponse.error;
+      $('create-new-hotlist').disabled = true;
+      return null;
+    }
+
+    $('hotlistnamefeedback').textContent = '';
+    $('create-new-hotlist').disabled = false;
+    return name;
+  }
+
+  /**
+  * Call GetSelectedIssuesRefs from tracker-editing.js and convert to an Array
+  * of IssueRef PBs.
+  */
+  function _GetSelectedIssueRefs() {
+    return GetSelectedIssuesRefs().map(issueRef => ({
+      project_name: issueRef['project_name'],
+      local_id: issueRef['id'],
+    }));
+  }
+
+  /**
+   * Get HotlistRef PBs for the hotlists that the user wants to add/remove the
+   * selected issues to.
+   */
+  function _GetSelectedHotlists(hotlists) {
+    const selectedHotlistRefs = [];
+    hotlists.forEach(hotlist => {
+      const checkbox = $('cb_hotlist_' + hotlist);
+      const hotlistParts = hotlist.split('_');
+      if (checkbox && checkbox.checked) {
+        selectedHotlistRefs.push({
+          name: hotlistParts[0],
+          owner: {
+            user_id: hotlistParts[1],
+          }
+        });
+      }
+    });
+    return selectedHotlistRefs;
+  }
+
+  Object.assign(window.__hotlists_dialog, {ShowUpdateHotlistDialog});
+})();
diff --git a/static/js/tracker/tracker-util.js b/static/js/tracker/tracker-util.js
new file mode 100644
index 0000000..040f8c1
--- /dev/null
+++ b/static/js/tracker/tracker-util.js
@@ -0,0 +1,166 @@
+/* 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
+ */
+
+/**
+ * This file contains JS utilities used by other JS files in Monorail.
+ */
+
+
+/**
+ * Add an indexOf method to all arrays, if this brower's JS implementation
+ * does not already have it.
+ * @param {Object} item The item to find
+ * @return {number} The index of the given item, or -1 if not found.
+ */
+if (Array.prototype.indexOf == undefined) {
+  Array.prototype.indexOf = function(item) {
+    for (let i = 0; i < this.length; ++i) {
+      if (this[i] == item) return i;
+    }
+    return -1;
+  };
+}
+
+
+/**
+ * This function works around a FF HTML layout problem.  The table
+ * width is somehow rendered at 100% when the table contains a
+ * display:none element, later, when that element is displayed, the
+ * table renders at the correct width.  The work-around is to have the
+ * element initiallye displayed so that the table renders properly,
+ * but then immediately hide the element until it is needed.
+ *
+ * TODO(jrobbins): Find HTML markup that FF can render more
+ * consistently.  After that, I can remove this hack.
+ */
+function TKR_forceProperTableWidth() {
+  let e = $('confirmarea');
+  if (e) e.style.display='none';
+}
+
+
+function TKR_parseIssueRef(issueRef) {
+  issueRef = issueRef.trim();
+  if (!issueRef) {
+    return null;
+  }
+
+  let projectName = window.CS_env.projectName;
+  let localId = issueRef;
+  if (issueRef.includes(':')) {
+    const parts = issueRef.split(':', 2);
+    projectName = parts[0];
+    localId = parts[1];
+  }
+
+  return {
+    project_name: projectName,
+    local_id: localId};
+}
+
+
+function _buildFieldsForIssueDelta(issueDelta, valuesByName) {
+  issueDelta.field_vals_add = [];
+  issueDelta.field_vals_remove = [];
+  issueDelta.fields_clear = [];
+
+  valuesByName.forEach((values, key, map) => {
+    if (key.startsWith('op_custom_') && values == 'clear') {
+      const field_id = key.substring('op_custom_'.length);
+      issueDelta.fields_clear.push({field_id: field_id});
+    } else if (key.startsWith('custom_')) {
+      const field_id = key.substring('custom_'.length);
+      values = values.filter(Boolean);
+      if (valuesByName.get('op_' + key) === 'remove') {
+        values.forEach((value) => {
+          issueDelta.field_vals_remove.push({
+            field_ref: {field_id: field_id},
+            value: value});
+        });
+      } else {
+        values.forEach((value) => {
+          issueDelta.field_vals_add.push({
+            field_ref: {field_id: field_id},
+            value: value});
+        });
+      }
+    }
+  });
+}
+
+
+function _classifyPlusMinusItems(values) {
+  let result = {
+    add: [],
+    remove: []};
+  values = new Set(values);
+  values.forEach((value) => {
+    if (!value.startsWith('-') && value) {
+      result.add.push(value);
+    } else if (value.startsWith('-') && value.substring(1)) {
+      result.remove.push(value);
+    }
+  });
+  return result;
+}
+
+
+function TKR_buildIssueDelta(valuesByName) {
+  let issueDelta = {};
+
+  if (valuesByName.has('status')) {
+    issueDelta.status = valuesByName.get('status')[0];
+  }
+  if (valuesByName.has('owner')) {
+    issueDelta.owner_ref = {
+      display_name: valuesByName.get('owner')[0].trim().toLowerCase()};
+  }
+  if (valuesByName.has('cc')) {
+    const cc_usernames = _classifyPlusMinusItems(
+      valuesByName.get('cc')[0].toLowerCase().split(/[,;\s]+/));
+    issueDelta.cc_refs_add = cc_usernames.add.map(
+      (email) => ({display_name: email}));
+    issueDelta.cc_refs_remove = cc_usernames.remove.map(
+      (email) => ({display_name: email}));
+  }
+  if (valuesByName.has('components')) {
+    const components = _classifyPlusMinusItems(
+      valuesByName.get('components')[0].split(/[,;\s]/));
+    issueDelta.comp_refs_add = components.add.map(
+      (path) => ({path: path}));
+    issueDelta.comp_refs_remove = components.remove.map(
+      (path) => ({path: path}));
+  }
+  if (valuesByName.has('label')) {
+    const labels = _classifyPlusMinusItems(valuesByName.get('label'));
+    issueDelta.label_refs_add = labels.add.map(
+      (label) => ({label: label}));
+    issueDelta.label_refs_remove = labels.remove.map(
+      (label) => ({label: label}));
+  }
+  if (valuesByName.has('blocked_on')) {
+    const blockedOn = _classifyPlusMinusItems(valuesByName.get('blocked_on'));
+    issueDelta.blocked_on_refs_add = blockedOn.add.map(TKR_parseIssueRef);
+    issueDelta.blocked_on_refs_add = blockedOn.remove.map(TKR_parseIssueRef);
+  }
+  if (valuesByName.has('blocking')) {
+    const blocking = _classifyPlusMinusItems(valuesByName.get('blocking'));
+    issueDelta.blocking_refs_add = blocking.add.map(TKR_parseIssueRef);
+    issueDelta.blocking_refs_add = blocking.remove.map(TKR_parseIssueRef);
+  }
+  if (valuesByName.has('merge_into')) {
+    issueDelta.merged_into_ref = TKR_parseIssueRef(
+      valuesByName.get('merge_into')[0]);
+  }
+  if (valuesByName.has('summary')) {
+    issueDelta.summary = valuesByName.get('summary')[0];
+  }
+
+  _buildFieldsForIssueDelta(issueDelta, valuesByName);
+
+  return issueDelta;
+}
diff --git a/static/js/tracker/trackerac_test.js b/static/js/tracker/trackerac_test.js
new file mode 100644
index 0000000..583fb01
--- /dev/null
+++ b/static/js/tracker/trackerac_test.js
@@ -0,0 +1,132 @@
+/* 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
+ */
+
+const feedData = {
+  'open': [{name: 'New', doc: 'Newly reported'},
+    {name: 'Started', doc: 'Work has begun'}],
+  'closed': [{name: 'Fixed', doc: 'Problem was fixed'},
+    {name: 'Invalid', doc: 'Bad issue report'}],
+  'labels': [{name: 'Type-Defect', doc: 'Something is broken'},
+    {name: 'Type-Enhancement', doc: 'It could be better'},
+    {name: 'Priority-High', doc: 'Urgent'},
+    {name: 'Priority-Low', doc: 'Not so urgent'},
+    {name: 'Hot', doc: ''},
+    {name: 'Cold', doc: ''}],
+  'members': [{name: 'jrobbins', doc: ''},
+    {name: 'jrobbins@chromium.org', doc: ''}],
+  'excl_prefixes': [],
+  'strict': false,
+};
+
+function setUp() {
+  TKR_autoCompleteFeedName = 'issueOptions';
+}
+
+/**
+ * The assertEquals method cannot do element-by-element comparisons.
+ * A search of how other teams write JS unit tests turned up this
+ * way to compare arrays.
+ */
+function assertElementsEqual(arrayA, arrayB) {
+  assertEquals(arrayA.join(' ;; '), arrayB.join(' ;; '));
+}
+
+function completionsEqual(strings, completions) {
+  if (strings.length != completions.length) {
+    return false;
+  }
+  for (let i = 0; i < strings.length; i++) {
+    if (strings[i] != completions[i].value) {
+      return false;
+    }
+  }
+  return true;
+}
+
+function assertHasCompletion(s, acStore) {
+  const ch = s.charAt(0).toLowerCase();
+  const firstCharMapArray = acStore.firstCharMap_[ch];
+  assertNotNull(!firstCharMapArray);
+  for (let i = 0; i < firstCharMapArray.length; i++) {
+    if (s == firstCharMapArray[i].value) return;
+  }
+  fail('completion ' + s + ' not found in acStore[' +
+       acStoreToString(acStore) + ']');
+}
+
+function assertHasAllCompletions(stringArray, acStore) {
+  for (let i = 0; i < stringArray.length; i++) {
+    assertHasCompletion(stringArray[i], acStore);
+  }
+}
+
+function acStoreToString(acStore) {
+  const allCompletions = [];
+  for (const ch in acStore.firstCharMap_) {
+    if (acStore.firstCharMap_.hasOwnProperty(ch)) {
+      const firstCharArray = acStore.firstCharMap_[ch];
+      for (let i = 0; i < firstCharArray.length; i++) {
+        allCompletions[firstCharArray[i].value] = true;
+      }
+    }
+  }
+  const parts = [];
+  for (const comp in allCompletions) {
+    if (allCompletions.hasOwnProperty(comp)) {
+      parts.push(comp);
+    }
+  }
+  return parts.join(', ');
+}
+
+function testSetUpStatusStore() {
+  TKR_setUpStatusStore(feedData.open, feedData.closed);
+  assertElementsEqual(
+      ['New', 'Started', 'Fixed', 'Invalid'],
+      TKR_statusWords);
+  assertHasAllCompletions(
+      ['New', 'Started', 'Fixed', 'Invalid'],
+      TKR_statusStore);
+}
+
+function testSetUpSearchStore() {
+  TKR_setUpSearchStore(
+      feedData.labels, feedData.members, feedData.open, feedData.closed);
+  assertHasAllCompletions(
+      ['status:New', 'status:Started', 'status:Fixed', 'status:Invalid',
+        '-status:New', '-status:Started', '-status:Fixed', '-status:Invalid',
+        'Type=Defect', '-Type=Defect', 'Type=Enhancement', '-Type=Enhancement',
+        'label:Hot', 'label:Cold', '-label:Hot', '-label:Cold',
+        'owner:jrobbins', 'cc:jrobbins', '-owner:jrobbins', '-cc:jrobbins',
+        'summary:', 'opened-after:today-1', 'commentby:me', 'reporter:me'],
+      TKR_searchStore);
+}
+
+function testSetUpQuickEditStore() {
+  TKR_setUpQuickEditStore(
+      feedData.labels, feedData.members, feedData.open, feedData.closed);
+  assertHasAllCompletions(
+      ['status=New', 'status=Started', 'status=Fixed', 'status=Invalid',
+        'Type=Defect', 'Type=Enhancement', 'Hot', 'Cold', '-Hot', '-Cold',
+        'owner=jrobbins', 'owner=me', 'cc=jrobbins', 'cc=me', 'cc=-jrobbins',
+        'cc=-me', 'summary=""', 'owner=----'],
+      TKR_quickEditStore);
+}
+
+function testSetUpLabelStore() {
+  TKR_setUpLabelStore(feedData.labels);
+  assertHasAllCompletions(
+      ['Type-Defect', 'Type-Enhancement', 'Hot', 'Cold'],
+      TKR_labelStore);
+}
+
+function testSetUpMembersStore() {
+  TKR_setUpMemberStore(feedData.members);
+  assertHasAllCompletions(
+      ['jrobbins', 'jrobbins@chromium.org'],
+      TKR_memberListStore);
+}
diff --git a/static/js/tracker/trackerediting_test.js b/static/js/tracker/trackerediting_test.js
new file mode 100644
index 0000000..27d45bf
--- /dev/null
+++ b/static/js/tracker/trackerediting_test.js
@@ -0,0 +1,69 @@
+/* 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
+ */
+
+
+function testKeepJustSummaryPrefixes_NoPrefixes() {
+  assertEquals(
+      '',
+      TKR_keepJustSummaryPrefixes(''));
+
+  assertEquals(
+      '',
+      TKR_keepJustSummaryPrefixes('Enter one line summary'));
+
+  assertEquals(
+      '',
+      TKR_keepJustSummaryPrefixes('Translation problem [en]'));
+
+  assertEquals(
+      '',
+      TKR_keepJustSummaryPrefixes('Crash at HH:MM'));
+}
+
+function testKeepJustSummaryPrefixes_WithColons() {
+  assertEquals(
+      'Security: ',
+      TKR_keepJustSummaryPrefixes('Security:'));
+
+  assertEquals(
+      'Exploit: ',
+      TKR_keepJustSummaryPrefixes('Exploit: remote exploit'));
+
+  assertEquals(
+      'XSS:Security: ',
+      TKR_keepJustSummaryPrefixes('XSS:Security: rest of summary'));
+
+  assertEquals(
+      'XSS: Security: ',
+      TKR_keepJustSummaryPrefixes('XSS: Security: rest of summary'));
+
+  assertEquals(
+      'XSS-Security: ',
+      TKR_keepJustSummaryPrefixes('XSS-Security: rest of summary'));
+
+  assertEquals(
+      'XSS: Security: ',
+      TKR_keepJustSummaryPrefixes('XSS: Security: rest [of] su:mmary'));
+
+  assertEquals(
+      'XSS-Security: ',
+      TKR_keepJustSummaryPrefixes('XSS-Security: rest [of] su:mmary'));
+}
+
+function testKeepJustSummaryPrefixes_WithBrackets() {
+  assertEquals(
+      '[Printing] ',
+      TKR_keepJustSummaryPrefixes('[Printing] problem with page'));
+
+  assertEquals(
+      '[Printing] ',
+      TKR_keepJustSummaryPrefixes('[Printing]   problem with page'));
+
+  assertEquals(
+      '[l10n][en] ',
+      TKR_keepJustSummaryPrefixes('[l10n][en]Translation problem'));
+}
diff --git a/static/robots.txt b/static/robots.txt
new file mode 100644
index 0000000..c7ede5b
--- /dev/null
+++ b/static/robots.txt
@@ -0,0 +1,17 @@
+User-agent: *
+# Start by disallowing everything.
+Disallow: /
+# Some specific things are okay, though.
+Allow: /$
+Allow: /hosting
+Allow: /p/*/adminIntro
+# Allow files needed to render the new UI
+Allow:  /prpc/*
+Allow:  /static/*
+# Query strings are hard. We only allow ?id=N, no other parameters.
+Allow: /p/*/issues/detail?id=*
+Allow: /p/*/issues/detail_ezt?id=*
+Disallow: /p/*/issues/detail?id=*&*
+Disallow: /p/*/issues/detail?*&id=*
+# 10 second crawl delay for bots that honor it.
+Crawl-delay: 10
diff --git a/static/third_party/js/keys.js b/static/third_party/js/keys.js
new file mode 100644
index 0000000..1f2a7ff
--- /dev/null
+++ b/static/third_party/js/keys.js
@@ -0,0 +1,192 @@
+/**
+ * Copyright 2008 Steve McKay.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Kibbles.Keys is a Javascript library providing simple cross browser
+ * keyboard event support.
+ */
+(function(){
+
+var _listening = false;
+
+// code to handler list map.
+// Wildcard listeners use magic code wildcards "before" and "after".
+var _listeners = {
+	before: [],
+	after: []
+};
+
+/*
+ * Map of key names to char code. This map is consulted before
+ * charCodeAt(0) is used to determine the character code.
+ *
+ * This map also serves as a definitive list of supported "special" keys.
+ * See _codeForEvent for details.
+ */
+var _CODE_MAP = {
+	ESC: 27,
+	ENTER: 13
+};
+
+/**
+ * Register a keypress listener.
+ */
+function _listen() {
+	if (_listening) return;
+
+	var d = document;
+	if (d.addEventListener) {
+		d.addEventListener('keypress', _handleKeyboardEvent, false);
+		d.addEventListener('keydown', _handleKeyDownEvent, false);
+	} else if (d.attachEvent) {
+		d.documentElement.attachEvent('onkeypress', _handleKeyboardEvent);
+		d.documentElement.attachEvent('onkeydown', _handleKeyDownEvent);
+	}
+	_listening = true;
+}
+
+/**
+ * Register a keypress listener for the supplied skip code.
+ */
+function _addKeyPressListener(spec, handler) {
+	var code = spec.toLowerCase();
+	if (code == "before" || code == "after") {
+		_listeners[code].push(handler);
+		return;
+	}
+
+	// try to find the character or key code.
+	code = _CODE_MAP[spec.toUpperCase()];
+	if (!code) {
+		code = spec.charCodeAt(0);
+	}
+	if (!_listeners[code]) {
+		_listeners[code] = [];
+	}
+	_listeners[code].push(handler);
+}
+
+/**
+ * Our handler for keypress events.
+ */
+function _handleKeyboardEvent(e) {
+
+	// If event is null, this is probably IE.
+	if (!e) e = window.event;
+
+	var source = _getSourceElement(e);
+	if (_isInputElement(source)) {
+		return;
+	}
+
+        if (_hasFlakeyModifier(e)) return;
+
+	var code = _codeForEvent(e);
+
+	if (code == undefined) return;
+
+	var payload = {
+		code: code
+	};
+
+	for (var i = 0; i < _listeners.before.length; i++) {
+		_listeners.before[i](payload);
+	}
+
+	var listeners = _listeners[code];
+	if (listeners) {
+		for (var i = 0; i < listeners.length; i++) {
+			listeners[i]({
+				code: code
+			});
+		}
+	}
+
+	for (var i = 0; i < _listeners.after.length; i++) {
+		_listeners.after[i](payload);
+	}
+}
+
+function _handleKeyDownEvent(e) {
+  if (!e) e = window.event;
+  var code = _codeForEvent(e);
+  if (code == _CODE_MAP['ESC'] || code == _CODE_MAP['ENTER']) {
+    _handleKeyboardEvent(e);
+  }
+}
+
+/**
+ * Returns the keycode associated with the event.
+ */
+function _codeForEvent(e) {
+  return e.keyCode ? e.keyCode : e.which;
+}
+
+/**
+ * Returns true if the supplied event has an associated modifier key
+ * that we have had trouble with in certain browsers.
+ */
+function _hasFlakeyModifier(e) {
+	return e.altKey || e.ctrlKey || e.metaKey;
+}
+
+/**
+ * Returns the source element for the supplied event.
+ */
+function _getSourceElement(e) {
+	var element = e.target;
+	if (!element) {
+		element = e.srcElement;
+	}
+
+	if (element.shadowRoot) {
+	  // Find the element within the shadowDOM.
+		const path = e.path || e.composedPath();
+	  element = path[0];
+	}
+
+	// If the source element is a text node, the parent is the object
+	// we're interested in.
+	if (element.nodeType == 3) {
+		element = element.parentNode;
+	}
+
+	return element;
+}
+
+/**
+ * Returns true if the element is a known form input element.
+ */
+function _isInputElement(element) {
+	return element.tagName == 'INPUT' || element.tagName == 'TEXTAREA';
+}
+
+/*
+ * A nice little namespace to call our own.
+ *
+ * Formalizing Kibbles.Keys as a traditional javascript class caused headaches
+ * with respect to capturing the context (what is "this" at any point in time).
+ * So we use a simple script exported via the "kibbles.keys" namespace.
+ */
+if (!window.kibbles)
+	window.kibbles = {}
+
+window.kibbles.keys = {
+	listen: _listen,
+	addKeyPressListener: _addKeyPressListener
+};
+
+})();
diff --git a/static/third_party/js/skipper.js b/static/third_party/js/skipper.js
new file mode 100644
index 0000000..4c131b1
--- /dev/null
+++ b/static/third_party/js/skipper.js
@@ -0,0 +1,335 @@
+/**
+ * Copyright 2008 Steve McKay.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Kibbles.Skipper is a Javascript library providing support for keyboard
+ * navigation among DOM object on a page.
+ */
+(function(){
+
+var _stops = new Array();  // list of stop objects
+var _lastStop;  // id of the last stop we visited to.
+
+// Named options. The value can be a literal value, or a function to call.
+var _options = {
+	padding_top: 0, // window offset when scrolling
+  padding_bottom: 0,
+  scroll_window: true
+};
+
+/*
+ * Constants identifying listener types. Used with the method that
+ * enables registration of listeners.
+ */
+var _LISTENER_TYPE = {
+  PRE: 'pre',
+  POST: 'post'
+};
+
+// map of stop listeners by type. pre listeners are called before navigation
+// post listeners are called after navigation.
+var _stopListener = {
+	pre: [],
+	post: []
+};
+
+/**
+ * Remove all stop previously identified stop elements.
+ */
+function _reset() {
+	_stops = new Array();
+}
+
+function _get(i) {
+	return _stops[i];
+}
+
+function _set(i, element) {
+	_stops[i] = element;
+}
+
+function _insert(i, element) {
+  if (i < 0 || i > _stops.length - 1) {
+    throw "Index out of bounds.";
+  }
+	_stops.splice(i, 0, element);
+  if (i <= _lastStop) {
+    _lastStop++;
+  }
+}
+
+function _append(element) {
+	_stops.push(element);
+}
+
+function _del(i) {
+  if (i < 0 || i > _stops.length - 1) {
+    throw "Index out of bounds.";
+  }
+	_stops.splice(i, 1);
+  if (_lastStop >= i) {
+    _lastStop--;
+  }
+}
+
+function _length() {
+	return _stops.length;
+}
+
+/**
+ * Sets the named option to the specified value.
+ */
+function _setOption(name, value) {
+	_options[name] = value;
+}
+
+/**
+ * Register a key to move forward one stop.
+ */
+function _addFwdKey(character) {
+	kibbles.keys.addKeyPressListener(character, _gotoNextStop);
+}
+
+/**
+ * Register a key to move back one stop.
+ */
+function _addRevKey(character) {
+	kibbles.keys.addKeyPressListener(character, _gotoPreviousStop);
+}
+
+/**
+ * Adds a stop listener.
+ */
+function _addStopListener(type, handler) {
+	if (type == _LISTENER_TYPE.PRE) {
+		_stopListener.pre.push(handler);
+	} else if (type == _LISTENER_TYPE.POST) {
+		_stopListener.post.push(handler);
+	}
+}
+
+/**
+ * Scroll to next stop if any.
+ */
+function _gotoNextStop() {
+	_setCurrentStop(_getNextStop());
+}
+
+/**
+ * Scroll to previous stop if any.
+ */
+function _gotoPreviousStop() {
+	_setCurrentStop(_getPreviousStop());
+}
+
+/**
+ * Update the current and previous stops, scrolling window to the location
+ * of the specified stop, and notifying listeners in the process.
+ */
+function _setCurrentStop(i) {
+	if (i >= 0) {
+		var prevStop = _lastStop;
+		_lastStop = i;
+
+    var next = new Stop(i);
+    var prev = (prevStop >= 0) ? new Stop(prevStop) : undefined;
+
+		_notifyListeners(next, prev, _stopListener.pre);
+
+		// If the y coord of the stop was not previously determined
+		// it may have been hidden. Since "PRE" listeners may reveal
+		// hidden stops, we try again if "y" is not know.
+		if (!next.y) next.y = _findObjectPosition(next.element);
+
+		// if we can't id the y coords at this point, we throw an exception.
+		if (!next.y && !(next.y >= 0)) {
+			throw "Next stop does not y coords. Aborting.";
+		}
+		_notifyListeners(next, prev, _stopListener.post);
+	}
+}
+
+/**
+ * Called by a listener, not directly.
+ */
+function _scrollOpportunityListener(next, prev) {
+  if (!_getOptionValue('scroll_window')) return;
+
+  if (next && next.element) {
+
+    var viewTop = _windowScrollTop();
+    var viewBottom = viewTop + document.documentElement.clientHeight;
+
+    var padTop = _getOptionValue('padding_top');
+
+    var bottom = viewBottom - padTop;
+
+    // if we skipped below the bottom padding
+    if (next.y > bottom) {
+      window.scrollTo(0, next.y - padTop);
+      return;
+    }
+
+    var padBottom = _getOptionValue('padding_bottom');
+    // if we skipped above the top offset
+    var top = viewTop + padBottom;
+    if (next.y < top) {
+      window.scrollTo(0, (next.y - document.documentElement.clientHeight) + padBottom);
+      return;
+    }
+  }
+}
+
+function _windowScrollTop() {
+  if (window.document.body.scrollTop) {
+    return window.document.body.scrollTop;
+  } else if (window.document.documentElement.scrollTop) {
+    return window.document.documentElement.scrollTop;
+  } else if (window.pageYOffset) {
+    return window.pageYOffset;
+  }
+  return 0;
+}
+
+
+/**
+ * Returns an option value or if the value is a function,
+ * the value returned by the function.
+ */
+function _getOptionValue(name) {
+	var opt = _options[name];
+	if (typeof opt == "function") {
+		return opt();
+	}
+	return opt;
+}
+
+/**
+ * Notify all supplied stop listeners.
+ */
+function _notifyListeners(stop, previousStop, listeners) {
+	if (stop && listeners) {
+		try {
+			for (var i = 0; i < listeners.length; i++) {
+				listeners[i](stop, previousStop);
+			}
+		} catch(err) {
+			// don't let a grumpy listener bring us down.
+		}
+	}
+}
+
+/**
+ * Returns the next stop or null if none stop available.
+ */
+function _getNextStop() {
+	var i = 0;
+
+	// if we've already visited a stop, use that as the base for the next stop.
+	if (_lastStop >= 0) {
+		i = _lastStop + 1;
+	}
+
+	// if the presumed next stop is out of bounds, return null.
+	if (i > _stops.length - 1) {
+		return;
+	}
+  return i;
+}
+
+/**
+ * Returns the previous stop or null if none available.
+ */
+function _getPreviousStop() {
+	var i = _stops.length - 1;
+
+	// if we've already visited a stop, use that as the base for the next stop.
+	if (_lastStop >= 0) {
+		i = _lastStop - 1;
+	}
+
+	// if the presumed next stop is out of bounds, return null.
+	if (i < 0) {
+		return;
+	}
+  return i;
+}
+
+/**
+ * Convenience wrapper for "stop" related information.
+ */
+function Stop(i, y) {
+	this.index = i;
+	this.element = _stops[i];
+	this.y = _findObjectPosition(this.element);
+}
+
+/**
+ * Returns the vertical coordinate of the top of specified object
+ * relative to the top of the entire page.
+ */
+function _findObjectPosition(obj) {
+	if (obj) {
+		var curtop = 0;
+		if (obj.offsetParent) {
+			while (obj.offsetParent) {
+				curtop += obj.offsetTop;
+				obj = obj.offsetParent;
+			}
+		} else if (obj.y) {
+			curtop += obj.y;
+		}
+		return curtop;
+	}
+	return null;
+}
+
+if (!window.kibbles.keys) {
+  throw "Kibbles.Skipper requires Kibbles.Keys which is not loaded."
+      + " Can't continue.";
+}
+
+/**
+ * A nice little namespace to call our own.
+ *
+ * Formalizing Kibbles.Skipper as a traditional javascript class caused
+ * headaches with respect to capturing the context (what is "this"
+ * at any point in time). So we use a simple script exported via the
+ * "kibbles.skipper" namespace.
+ */
+window.kibbles.skipper = {
+	setOption: _setOption,
+	addFwdKey: _addFwdKey,
+	addRevKey: _addRevKey,
+	LISTENER_TYPE: _LISTENER_TYPE,
+	addStopListener: _addStopListener,
+  setCurrentStop: _setCurrentStop,
+	// array like methods for stop manipulation
+	get: _get,
+	set: _set,
+	append: _append,
+	insert: _insert,
+	del: _del,
+	length: _length,
+	reset: _reset
+}
+
+_addStopListener(kibbles.skipper.LISTENER_TYPE.POST, _scrollOpportunityListener)
+
+// we depend on kibbles.keys.
+kibbles.keys.listen();
+
+})();
diff --git a/static_src/autolink.js b/static_src/autolink.js
new file mode 100644
index 0000000..5419d9c
--- /dev/null
+++ b/static_src/autolink.js
@@ -0,0 +1,440 @@
+// Copyright 2019 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.
+
+'use strict';
+import {prpcClient} from 'prpc-client-instance.js';
+
+/* eslint-disable max-len */
+// When crbug links don't specify a project, the default project is Chromium.
+const CRBUG_DEFAULT_PROJECT = 'chromium';
+const CRBUG_LINK_RE = /(\b(https?:\/\/)?crbug\.com\/)((\b[-a-z0-9]+)(\/))?(\d+)\b(\#c[0-9]+)?/gi;
+const CRBUG_LINK_RE_PROJECT_GROUP = 4;
+const CRBUG_LINK_RE_ID_GROUP = 6;
+const CRBUG_LINK_RE_COMMENT_GROUP = 7;
+const ISSUE_TRACKER_RE = /(\b(issues?|bugs?)[ \t]*(:|=|\b)|\bfixed[ \t]*:)([ \t]*((\b[-a-z0-9]+)[:\#])?(\#?)(\d+)\b(,?[ \t]*(and|or)?)?)+/gi;
+const PROJECT_LOCALID_RE = /((\b(issue|bug)[ \t]*(:|=)?[ \t]*|\bfixed[ \t]*:[ \t]*)?((\b[-a-z0-9]+)[:\#])?(\#?)(\d+))/gi;
+const PROJECT_COMMENT_BUG_RE = /(((\b(issue|bug)[ \t]*(:|=)?[ \t]*)(\#?)(\d+)[ \t*])?((\b((comment)[ \t]*(:|=)?[ \t]*(\#?))|(\B((\#))(c)))(\d+)))/gi;
+const PROJECT_LOCALID_RE_PROJECT_GROUP = 6;
+const PROJECT_LOCALID_RE_ID_GROUP = 8;
+const IMPLIED_EMAIL_RE = /\b[a-z]((-|\.)?[a-z0-9])+@[a-z]((-|\.)?[a-z0-9])+\.(com|net|org|edu|dev)\b/gi;
+// TODO(zhangtiff): Replace (^|[^-/._]) with (?<![-/._]) on the 3 Regexes below
+// once Firefox supports lookaheads.
+const SHORT_LINK_RE = /(^|[^-\/._])\b(https?:\/\/|ftp:\/\/|mailto:)?(go|g|shortn|who|teams)\/([^\s<]+)/gi;
+const NUMERIC_SHORT_LINK_RE = /(^|[^-\/._])\b(https?:\/\/|ftp:\/\/)?(b|t|o|omg|cl|cr|fxr|fxrev|fxb|tqr)\/([0-9]+)/gi;
+const IMPLIED_LINK_RE = /(^|[^-\/._])\b[a-z]((-|\.)?[a-z0-9])+\.(com|net|org|edu|dev)\b(\/[^\s<]*)?/gi;
+const IS_LINK_RE = /()\b(https?:\/\/|ftp:\/\/|mailto:)([^\s<]+)/gi;
+const GIT_HASH_RE = /\b(r(evision\s+#?)?)?([a-f0-9]{40})\b/gi;
+const SVN_REF_RE = /\b(r(evision\s+#?)?)([0-9]{4,7})\b/gi;
+const NEW_LINE_REGEX = /^(\r\n?|\n)$/;
+const NEW_LINE_OR_BOLD_REGEX = /(<b>[^<\n]+<\/b>)|(\r\n?|\n)/;
+// The revNum is in the same position for the above two Regexes. The
+// extraction function uses this similar format to allow switching out
+// Regexes easily, so be careful about changing GIT_HASH_RE and SVN_HASH_RE.
+const REV_NUM_GROUP = 3;
+const LINK_TRAILING_CHARS = [
+  [null, ':'],
+  [null, '.'],
+  [null, ','],
+  [null, '>'],
+  ['(', ')'],
+  ['[', ']'],
+  ['{', '}'],
+  ['\'', '\''],
+  ['"', '"'],
+];
+const GOOG_SHORT_LINK_RE = /^(b|t|o|omg|cl|cr|go|g|shortn|who|teams|fxr|fxrev|fxb|tqr)\/.*/gi;
+/* eslint-enable max-len */
+
+const Components = new Map();
+// TODO(zosha): Combine functions of Component 00 with 01 so that
+// user can only reference valid issues in the issue/comment linking.
+// Allow user to reference multiple comments on the same issue.
+// Additionally, allow for the user to reference this on a specific project.
+// Note: the order of the components is important for proper autolinking.
+Components.set(
+    '00-commentbug',
+    {
+      lookup: null,
+      extractRefs: null,
+      refRegs: [PROJECT_COMMENT_BUG_RE],
+      replacer: ReplaceCommentBugRef,
+    },
+);
+Components.set(
+    '01-tracker-crbug',
+    {
+      lookup: LookupReferencedIssues,
+      extractRefs: ExtractCrbugProjectAndIssueIds,
+      refRegs: [CRBUG_LINK_RE],
+      replacer: ReplaceCrbugIssueRef,
+
+    },
+);
+Components.set(
+    '02-full-urls',
+    {
+      lookup: null,
+      extractRefs: (match, _currentProjectName) => {
+        return [match[0]];
+      },
+      refRegs: [IS_LINK_RE],
+      replacer: ReplaceLinkRef,
+    },
+);
+Components.set(
+    '03-user-emails',
+    {
+      lookup: LookupReferencedUsers,
+      extractRefs: (match, _currentProjectName) => {
+        return [match[0]];
+      },
+      refRegs: [IMPLIED_EMAIL_RE],
+      replacer: ReplaceUserRef,
+    },
+);
+Components.set(
+    '04-tracker-regular',
+    {
+      lookup: LookupReferencedIssues,
+      extractRefs: ExtractTrackerProjectAndIssueIds,
+      refRegs: [ISSUE_TRACKER_RE],
+      replacer: ReplaceTrackerIssueRef,
+    },
+);
+Components.set(
+    '05-linkify-shorthand',
+    {
+      lookup: null,
+      extractRefs: (match, _currentProjectName) => {
+        return [match[0]];
+      },
+      refRegs: [
+        SHORT_LINK_RE,
+        NUMERIC_SHORT_LINK_RE,
+        IMPLIED_LINK_RE,
+      ],
+      replacer: ReplaceLinkRef,
+    },
+);
+Components.set(
+    '06-versioncontrol',
+    {
+      lookup: null,
+      extractRefs: (match, _currentProjectName) => {
+        return [match[0]];
+      },
+      refRegs: [GIT_HASH_RE, SVN_REF_RE],
+      replacer: ReplaceRevisionRef,
+    },
+);
+
+// Lookup referenced artifacts functions.
+function LookupReferencedIssues(issueRefs, componentName) {
+  return new Promise((resolve, reject) => {
+    issueRefs = issueRefs.filter(
+        ({projectName, localId}) => projectName && parseInt(localId));
+    const listReferencedIssues = prpcClient.call(
+        'monorail.Issues', 'ListReferencedIssues', {issueRefs});
+    return listReferencedIssues.then((response) => {
+      resolve({'componentName': componentName, 'existingRefs': response});
+    });
+  });
+}
+
+function LookupReferencedUsers(emails, componentName) {
+  return new Promise((resolve, reject) => {
+    const userRefs = emails.map((displayName) => {
+      return {displayName};
+    });
+    const listReferencedUsers = prpcClient.call(
+        'monorail.Users', 'ListReferencedUsers', {userRefs});
+    return listReferencedUsers.then((response) => {
+      resolve({'componentName': componentName, 'existingRefs': response});
+    });
+  });
+}
+
+// Extract referenced artifacts info functions.
+function ExtractCrbugProjectAndIssueIds(match, _currentProjectName) {
+  // When crbug links don't specify a project, the default project is Chromium.
+  const projectName = match[CRBUG_LINK_RE_PROJECT_GROUP] ||
+    CRBUG_DEFAULT_PROJECT;
+  const localId = match[CRBUG_LINK_RE_ID_GROUP];
+  return [{projectName: projectName, localId: localId}];
+}
+
+function ExtractTrackerProjectAndIssueIds(match, currentProjectName) {
+  const issueRefRE = PROJECT_LOCALID_RE;
+  let refMatch;
+  const refs = [];
+  while ((refMatch = issueRefRE.exec(match[0])) !== null) {
+    if (refMatch[PROJECT_LOCALID_RE_PROJECT_GROUP]) {
+      currentProjectName = refMatch[PROJECT_LOCALID_RE_PROJECT_GROUP];
+    }
+    refs.push({
+      projectName: currentProjectName,
+      localId: refMatch[PROJECT_LOCALID_RE_ID_GROUP],
+    });
+  }
+  return refs;
+}
+
+// Replace plain text references with links functions.
+function ReplaceIssueRef(stringMatch, projectName, localId, components,
+    commentId) {
+  if (components.openRefs && components.openRefs.length) {
+    const openRef = components.openRefs.find((ref) => {
+      return ref.localId && ref.projectName && (ref.localId == localId) &&
+          (ref.projectName.toLowerCase() === projectName.toLowerCase());
+    });
+    if (openRef) {
+      return createIssueRefRun(
+          projectName, localId, openRef.summary, false, stringMatch, commentId);
+    }
+  }
+  if (components.closedRefs && components.closedRefs.length) {
+    const closedRef = components.closedRefs.find((ref) => {
+      return ref.localId && ref.projectName && (ref.localId == localId) &&
+          (ref.projectName.toLowerCase() === projectName.toLowerCase());
+    });
+    if (closedRef) {
+      return createIssueRefRun(
+          projectName, localId, closedRef.summary, true, stringMatch,
+          commentId);
+    }
+  }
+  return {content: stringMatch};
+}
+
+function ReplaceCrbugIssueRef(match, components, _currentProjectName) {
+  components = components || {};
+  // When crbug links don't specify a project, the default project is Chromium.
+  const projectName =
+    match[CRBUG_LINK_RE_PROJECT_GROUP] || CRBUG_DEFAULT_PROJECT;
+  const localId = match[CRBUG_LINK_RE_ID_GROUP];
+  let commentId = '';
+  if (match[CRBUG_LINK_RE_COMMENT_GROUP] !== undefined) {
+    commentId = match[CRBUG_LINK_RE_COMMENT_GROUP];
+  }
+  return [ReplaceIssueRef(match[0], projectName, localId, components,
+      commentId)];
+}
+
+function ReplaceTrackerIssueRef(match, components, currentProjectName) {
+  components = components || {};
+  const issueRefRE = PROJECT_LOCALID_RE;
+  const commentId = '';
+  const textRuns = [];
+  let refMatch;
+  let pos = 0;
+  while ((refMatch = issueRefRE.exec(match[0])) !== null) {
+    if (refMatch.index > pos) {
+      // Create textrun for content between previous and current match.
+      textRuns.push({content: match[0].slice(pos, refMatch.index)});
+    }
+    if (refMatch[PROJECT_LOCALID_RE_PROJECT_GROUP]) {
+      currentProjectName = refMatch[PROJECT_LOCALID_RE_PROJECT_GROUP];
+    }
+    textRuns.push(ReplaceIssueRef(
+        refMatch[0], currentProjectName,
+        refMatch[PROJECT_LOCALID_RE_ID_GROUP], components, commentId));
+    pos = refMatch.index + refMatch[0].length;
+  }
+  if (match[0].slice(pos) !== '') {
+    textRuns.push({content: match[0].slice(pos)});
+  }
+  return textRuns;
+}
+
+function ReplaceUserRef(match, components, _currentProjectName) {
+  components = components || {};
+  const textRun = {content: match[0], tag: 'a'};
+  if (components.users && components.users.length) {
+    const existingUser = components.users.find((user) => {
+      return user.displayName.toLowerCase() === match[0].toLowerCase();
+    });
+    if (existingUser) {
+      textRun.href = `/u/${match[0]}`;
+      return [textRun];
+    }
+  }
+  textRun.href = `mailto:${match[0]}`;
+  return [textRun];
+}
+
+function ReplaceCommentBugRef(match) {
+  let textRun;
+  const issueNum = match[7];
+  const commentNum = match[18];
+  if (issueNum && commentNum) {
+    textRun = {content: match[0], tag: 'a', href: `?id=${issueNum}#c${commentNum}`};
+  } else if (commentNum) {
+    textRun = {content: match[0], tag: 'a', href: `#c${commentNum}`};
+  } else {
+    textRun = {content: match[0]};
+  }
+  return [textRun];
+}
+
+function ReplaceLinkRef(match, _components, _currentProjectName) {
+  const textRuns = [];
+  let content = match[0];
+  let trailing = '';
+  if (match[1]) {
+    textRuns.push({content: match[1]});
+    content = content.slice(match[1].length);
+  }
+  LINK_TRAILING_CHARS.forEach(([begin, end]) => {
+    if (content.endsWith(end)) {
+      if (!begin || !content.slice(0, -end.length).includes(begin)) {
+        trailing = end + trailing;
+        content = content.slice(0, -end.length);
+      }
+    }
+  });
+  let href = content;
+  const lowerHref = href.toLowerCase();
+  if (!lowerHref.startsWith('http') && !lowerHref.startsWith('ftp') &&
+      !lowerHref.startsWith('mailto')) {
+    // Prepend google-internal short links with http to
+    // prevent HTTPS error interstitial.
+    // SHORT_LINK_RE should not be used here as it might be
+    // in the middle of another match() process in an outer loop.
+    if (GOOG_SHORT_LINK_RE.test(lowerHref)) {
+      href = 'http://' + href;
+    } else {
+      href = 'https://' + href;
+    }
+    GOOG_SHORT_LINK_RE.lastIndex = 0;
+  }
+  textRuns.push({content: content, tag: 'a', href: href});
+  if (trailing.length) {
+    textRuns.push({content: trailing});
+  }
+  return textRuns;
+}
+
+function ReplaceRevisionRef(
+    match, _components, _currentProjectName, revisionUrlFormat) {
+  const content = match[0];
+  const href = revisionUrlFormat.replace('{revnum}', match[REV_NUM_GROUP]);
+  return [{content: content, tag: 'a', href: href}];
+}
+
+// Create custom textrun functions.
+function createIssueRefRun(projectName, localId, summary, isClosed, content,
+    commentId) {
+  return {
+    tag: 'a',
+    css: isClosed ? 'strike-through' : '',
+    href: `/p/${projectName}/issues/detail?id=${localId}${commentId}`,
+    title: summary || '',
+    content: content,
+  };
+}
+
+/**
+ * @typedef {Object} CommentReference
+ * @property {string} componentName A key identifying the kind of autolinking
+ *   text the reference matches.
+ * @property {Array<any>} existingRefs Array of full data for referenced
+ *   Objects. Each entry in this Array could be any kind of data depending
+ *   on what the text references. For example, the Array could contain Issue
+ *   or User Objects.
+ */
+
+/**
+ * Iterates through a list of comments, requests data for referenced objects
+ * in those comments, and returns all fetched data.
+ * @param {Array<IssueComment>} comments Array of comments to check.
+ * @param {string} currentProjectName Project these comments exist in the
+ *   context of.
+ * @return {Promise<Array<CommentReference>>}
+ */
+function getReferencedArtifacts(comments, currentProjectName) {
+  return new Promise((resolve, reject) => {
+    const fetchPromises = [];
+    Components.forEach(({lookup, extractRefs, refRegs}, componentName) => {
+      if (lookup !== null) {
+        const refs = [];
+        refRegs.forEach((re) => {
+          let match;
+          comments.forEach((comment) => {
+            while ((match = re.exec(comment.content)) !== null) {
+              refs.push(...extractRefs(match, currentProjectName));
+            };
+          });
+        });
+        if (refs.length) {
+          fetchPromises.push(lookup(refs, componentName));
+        }
+      }
+    });
+    resolve(Promise.all(fetchPromises));
+  });
+}
+
+function markupAutolinks(
+    plainString, componentRefs, currentProjectName, revisionUrlFormat) {
+  plainString = plainString || '';
+  const chunks = plainString.trim().split(NEW_LINE_OR_BOLD_REGEX);
+  const textRuns = [];
+  chunks.filter(Boolean).forEach((chunk) => {
+    if (chunk.match(NEW_LINE_REGEX)) {
+      textRuns.push({tag: 'br'});
+    } else if (chunk.startsWith('<b>') && chunk.endsWith('</b>')) {
+      textRuns.push({content: chunk.slice(3, -4), tag: 'b'});
+    } else {
+      textRuns.push(
+          ...autolinkChunk(
+              chunk, componentRefs, currentProjectName, revisionUrlFormat));
+    }
+  });
+  return textRuns;
+}
+
+function autolinkChunk(
+    chunk, componentRefs, currentProjectName, revisionUrlFormat) {
+  let textRuns = [{content: chunk}];
+  Components.forEach(({refRegs, replacer}, componentName) => {
+    refRegs.forEach((re) => {
+      textRuns = applyLinks(
+          textRuns, replacer, re, componentRefs.get(componentName),
+          currentProjectName, revisionUrlFormat);
+    });
+  });
+  return textRuns;
+}
+
+function applyLinks(
+    textRuns, replacer, re, existingRefs, currentProjectName,
+    revisionUrlFormat) {
+  const resultRuns = [];
+  textRuns.forEach((textRun) => {
+    if (textRun.tag) {
+      resultRuns.push(textRun);
+    } else {
+      const content = textRun.content;
+      let pos = 0;
+      let match;
+      while ((match = re.exec(content)) !== null) {
+        if (match.index > pos) {
+          // Create textrun for content between previous and current match.
+          resultRuns.push({content: content.slice(pos, match.index)});
+        }
+        resultRuns.push(
+            ...replacer(
+                match, existingRefs, currentProjectName, revisionUrlFormat));
+        pos = match.index + match[0].length;
+      }
+      if (content.slice(pos) !== '') {
+        resultRuns.push({content: content.slice(pos)});
+      }
+    }
+  });
+  return resultRuns;
+}
+
+
+export const autolink = {Components, getReferencedArtifacts, markupAutolinks};
diff --git a/static_src/autolink.test.js b/static_src/autolink.test.js
new file mode 100644
index 0000000..fcb2af2
--- /dev/null
+++ b/static_src/autolink.test.js
@@ -0,0 +1,948 @@
+import sinon from 'sinon';
+import {assert} from 'chai';
+import {autolink} from './autolink.js';
+import {prpcClient} from 'prpc-client-instance.js';
+
+const components = autolink.Components;
+const markupAutolinks = autolink.markupAutolinks;
+
+describe('autolink', () => {
+  describe('crbug component functions', () => {
+    const {extractRefs, refRegs, replacer} = components.get('01-tracker-crbug');
+
+    it('Extract crbug project and local ids', () => {
+      const match = refRegs[0].exec('https://crbug.com/monorail/1234');
+      refRegs[0].lastIndex = 0;
+      const ref = extractRefs(match);
+      assert.deepEqual(ref, [{projectName: 'monorail', localId: '1234'}]);
+    });
+
+    it('Extract crbug default project name', () => {
+      const match = refRegs[0].exec('http://crbug.com/1234');
+      refRegs[0].lastIndex = 0;
+      const ref = extractRefs(match);
+      assert.deepEqual(ref, [{projectName: 'chromium', localId: '1234'}]);
+    });
+
+    it('Extract crbug passed project name is ignored', () => {
+      const match = refRegs[0].exec('https://crbug.com/1234');
+      refRegs[0].lastIndex = 0;
+      const ref = extractRefs(match, 'foo');
+      assert.deepEqual(ref, [{projectName: 'chromium', localId: '1234'}]);
+    });
+
+    it('Replace crbug with found components', () => {
+      const str = 'crbug.com/monorail/1234';
+      const match = refRegs[0].exec(str);
+      refRegs[0].lastIndex = 0;
+      const components = {
+        closedRefs: [
+          {summary: 'Issue summary', localId: 1234, projectName: 'monorail'},
+          {},
+        ]};
+      const actualRun = replacer(match, components);
+      assert.deepEqual(
+          actualRun,
+          [{
+            tag: 'a',
+            css: 'strike-through',
+            href: '/p/monorail/issues/detail?id=1234',
+            title: 'Issue summary',
+            content: str,
+          }],
+      );
+    });
+
+    it('Replace crbug with found components, with comment', () => {
+      const str = 'crbug.com/monorail/1234#c1';
+      const match = refRegs[0].exec(str);
+      refRegs[0].lastIndex = 0;
+      const components = {
+        closedRefs: [
+          {summary: 'Issue summary', localId: 1234, projectName: 'monorail'},
+          {},
+        ]};
+      const actualRun = replacer(match, components);
+      assert.deepEqual(
+          actualRun,
+          [{
+            tag: 'a',
+            css: 'strike-through',
+            href: '/p/monorail/issues/detail?id=1234#c1',
+            title: 'Issue summary',
+            content: str,
+          }],
+      );
+    });
+
+    it('Replace crbug with default project_name', () => {
+      const str = 'crbug.com/1234';
+      const match = refRegs[0].exec(str);
+      refRegs[0].lastIndex = 0;
+      const components = {
+        openRefs: [
+          {localId: 134},
+          {summary: 'Issue 1234', localId: 1234, projectName: 'chromium'},
+        ],
+      };
+      const actualRun = replacer(match, components);
+      assert.deepEqual(
+          actualRun,
+          [{
+            tag: 'a',
+            href: '/p/chromium/issues/detail?id=1234',
+            css: '',
+            title: 'Issue 1234',
+            content: str,
+          }],
+      );
+    });
+
+    it('Replace crbug incomplete responses', () => {
+      const str = 'crbug.com/1234';
+      const match = refRegs[0].exec(str);
+      refRegs[0].lastIndex = 0;
+      const components = {
+        openRefs: [{localId: 1234}, {projectName: 'chromium'}],
+        closedRefs: [{localId: 1234}, {projectName: 'chromium'}],
+      };
+      const actualRun = replacer(match, components);
+      assert.deepEqual(actualRun, [{content: str}]);
+    });
+
+    it('Replace crbug passed project name is ignored', () => {
+      const str = 'crbug.com/1234';
+      const match = refRegs[0].exec(str);
+      refRegs[0].lastIndex = 0;
+      const components = {
+        openRefs: [
+          {localId: 134},
+          {summary: 'Issue 1234', localId: 1234, projectName: 'chromium'},
+        ],
+      };
+      const actualRun = replacer(match, components, 'foo');
+      assert.deepEqual(
+          actualRun,
+          [{
+            tag: 'a',
+            href: '/p/chromium/issues/detail?id=1234',
+            css: '',
+            title: 'Issue 1234',
+            content: str,
+          }],
+      );
+    });
+
+    it('Replace crbug with no found components', () => {
+      const str = 'crbug.com/1234';
+      const match = refRegs[0].exec(str);
+      refRegs[0].lastIndex = 0;
+      const components = {};
+      const actualRun = replacer(match, components);
+      assert.deepEqual(actualRun, [{content: str}]);
+    });
+
+    it('Replace crbug with no issue summary', () => {
+      const str = 'crbug.com/monorail/1234';
+      const match = refRegs[0].exec(str);
+      refRegs[0].lastIndex = 0;
+      const components = {
+        closedRefs: [
+          {localId: 1234, projectName: 'monorail'},
+          {},
+        ]};
+      const actualRun = replacer(match, components);
+      assert.deepEqual(
+          actualRun,
+          [{
+            tag: 'a',
+            css: 'strike-through',
+            href: '/p/monorail/issues/detail?id=1234',
+            title: '',
+            content: str,
+          }],
+      );
+    });
+  });
+
+  describe('regular tracker component functions', () => {
+    const {extractRefs, refRegs, replacer} =
+      components.get('04-tracker-regular');
+    const str = 'bugs=123, monorail:234 or #345 and PROJ:#456';
+    const match = refRegs[0].exec(str);
+    refRegs[0].lastIndex = 0;
+
+    it('Extract tracker projects and local ids', () => {
+      const actualRefs = extractRefs(match, 'foo-project');
+      assert.deepEqual(
+          actualRefs,
+          [{projectName: 'foo-project', localId: '123'},
+            {projectName: 'monorail', localId: '234'},
+            {projectName: 'monorail', localId: '345'},
+            {projectName: 'PROJ', localId: '456'}]);
+    });
+
+    it('Replace tracker refs.', () => {
+      const components = {
+        openRefs: [
+          {summary: 'sum', projectName: 'monorail', localId: 888},
+          {summary: 'ma', projectName: 'chromium', localId: '123'},
+        ],
+        closedRefs: [
+          {summary: 'ry', projectName: 'proj', localId: 456},
+        ],
+      };
+      const actualTextRuns = replacer(match, components, 'chromium');
+      assert.deepEqual(
+          actualTextRuns,
+          [
+            {content: 'bugs='},
+            {
+              tag: 'a',
+              href: '/p/chromium/issues/detail?id=123',
+              css: '',
+              title: 'ma',
+              content: '123',
+            },
+            {content: ', '},
+            {content: 'monorail:234'},
+            {content: ' or '},
+            {content: '#345'},
+            {content: ' and '},
+            {
+              tag: 'a',
+              href: '/p/PROJ/issues/detail?id=456',
+              css: 'strike-through',
+              title: 'ry',
+              content: 'PROJ:#456',
+            },
+          ],
+      );
+    });
+
+    it('Replace tracker refs mixed case refs.', () => {
+      const components = {
+        openRefs: [
+          {projectName: 'mOnOrAIl', localId: 234},
+        ],
+        closedRefs: [
+          {projectName: 'LeMuR', localId: 123},
+        ],
+      };
+      const actualTextRuns = replacer(match, components, 'lEmUr');
+      assert.deepEqual(
+          actualTextRuns,
+          [
+            {content: 'bugs='},
+            {
+              tag: 'a',
+              href: '/p/lEmUr/issues/detail?id=123',
+              css: 'strike-through',
+              title: '',
+              content: '123',
+            },
+            {content: ', '},
+            {
+              tag: 'a',
+              href: '/p/monorail/issues/detail?id=234',
+              css: '',
+              title: '',
+              content: 'monorail:234',
+            },
+            {content: ' or '},
+            {content: '#345'},
+            {content: ' and '},
+            {content: 'PROJ:#456'},
+          ],
+      );
+    });
+
+    it('Recognizes Fixed: syntax', () => {
+      const str = 'Fixed : 123, proj:456';
+      const match = refRegs[0].exec(str);
+      refRegs[0].lastIndex = 0;
+
+      const components = {
+        openRefs: [
+          {summary: 'summ', projectName: 'chromium', localId: 123},
+        ],
+        closedRefs: [
+          {summary: 'ary', projectName: 'proj', localId: 456},
+        ],
+      };
+
+      const actualTextRuns = replacer(match, components, 'chromium');
+      assert.deepEqual(
+          actualTextRuns,
+          [
+            {
+              tag: 'a',
+              href: '/p/chromium/issues/detail?id=123',
+              css: '',
+              title: 'summ',
+              content: 'Fixed : 123',
+            },
+            {content: ', '},
+            {
+              tag: 'a',
+              href: '/p/proj/issues/detail?id=456',
+              css: 'strike-through',
+              title: 'ary',
+              content: 'proj:456',
+            },
+          ],
+      );
+    });
+  });
+
+  describe('user email component functions', () => {
+    const {extractRefs, refRegs, replacer} = components.get('03-user-emails');
+    const str = 'We should ask User1@gmail.com to confirm.';
+    const match = refRegs[0].exec(str);
+    refRegs[0].lastIndex = 0;
+
+    it('Extract user email', () => {
+      const actualEmail = extractRefs(match, 'unusedProjectName');
+      assert.equal('User1@gmail.com', actualEmail);
+    });
+
+    it('Replace existing user.', () => {
+      const components = {
+        users: [{displayName: 'user2@gmail.com'},
+          {displayName: 'user1@gmail.com'}]};
+      const actualTextRun = replacer(match, components);
+      assert.deepEqual(
+          actualTextRun,
+          [{tag: 'a', href: '/u/User1@gmail.com', content: 'User1@gmail.com'}],
+      );
+    });
+
+    it('Replace non-existent user.', () => {
+      const actualTextRun = replacer(match, {});
+      assert.deepEqual(
+          actualTextRun,
+          [{
+            tag: 'a',
+            href: 'mailto:User1@gmail.com',
+            content: 'User1@gmail.com',
+          }],
+      );
+    });
+  });
+
+  describe('full url component functions.', () => {
+    const {refRegs, replacer} = components.get('02-full-urls');
+
+    it('test full link regex string', () => {
+      const isLinkRE = refRegs[0];
+      const str =
+        'https://www.go.com ' +
+        'nospacehttps://www.blah.com http://website.net/other="(}])"><)';
+      let match;
+      const actualMatches = [];
+      while ((match = isLinkRE.exec(str)) !== null) {
+        actualMatches.push(match[0]);
+      }
+      assert.deepEqual(
+          actualMatches,
+          ['https://www.go.com', 'http://website.net/other="(}])">']);
+    });
+
+    it('Replace URL existing http', () => {
+      const match = refRegs[0].exec('link here: (https://website.net/other="here").');
+      refRegs[0].lastIndex = 0;
+      const actualTextRuns = replacer(match);
+      assert.deepEqual(
+          actualTextRuns,
+          [{tag: 'a',
+            href: 'https://website.net/other="here"',
+            content: 'https://website.net/other="here"',
+          },
+          {content: ').'}],
+      );
+    });
+
+    it('Replace URL with short-link as substring', () => {
+      const match = refRegs[0].exec('https://website.net/who/me/yes/you');
+      refRegs[0].lastIndex = 0;
+      const actualTextRuns = replacer(match);
+
+      assert.deepEqual(
+          actualTextRuns,
+          [{tag: 'a',
+            href: 'https://website.net/who/me/yes/you',
+            content: 'https://website.net/who/me/yes/you',
+          }],
+      );
+    });
+
+    it('Replace URL with email as substring', () => {
+      const match = refRegs[0].exec('https://website.net/who/foo@example.com');
+      refRegs[0].lastIndex = 0;
+      const actualTextRuns = replacer(match);
+
+      assert.deepEqual(
+          actualTextRuns,
+          [{tag: 'a',
+            href: 'https://website.net/who/foo@example.com',
+            content: 'https://website.net/who/foo@example.com',
+          }],
+      );
+    });
+  });
+
+  describe('shorthand url component functions.', () => {
+    const {refRegs, replacer} = components.get('05-linkify-shorthand');
+
+    it('Short link does not match URL with short-link as substring', () => {
+      refRegs[0].lastIndex = 0;
+      assert.isNull(refRegs[0].exec('https://website.net/who/me/yes/you'));
+    });
+
+    it('test short link regex string', () => {
+      const shortLinkRE = refRegs[0];
+      const str =
+        'go/shortlinks ./_go/shortlinks bo/short bo/1234  ' +
+        'https://who/shortlinks go/hey/?wct=(go)';
+      let match;
+      const actualMatches = [];
+      while ((match = shortLinkRE.exec(str)) !== null) {
+        actualMatches.push(match[0]);
+      }
+      assert.deepEqual(
+          actualMatches,
+          ['go/shortlinks', ' https://who/shortlinks', ' go/hey/?wct=(go)'],
+      );
+    });
+
+    it('test numeric short link regex string', () => {
+      const shortNumLinkRE = refRegs[1];
+      const str = 'go/nono omg/ohno omg/123 .cl/123 b/1234';
+      let match;
+      const actualMatches = [];
+      while ((match = shortNumLinkRE.exec(str)) !== null) {
+        actualMatches.push(match[0]);
+      }
+      assert.deepEqual(actualMatches, [' omg/123', ' b/1234']);
+    });
+
+    it('test fuchsia short links', () => {
+      const shortNumLinkRE = refRegs[1];
+      const str = 'ignore fxr/123 fxrev/789 fxb/456 tqr/123 ';
+      let match;
+      const actualMatches = [];
+      while ((match = shortNumLinkRE.exec(str)) !== null) {
+        actualMatches.push(match[0]);
+      }
+      assert.deepEqual(actualMatches, [' fxr/123', ' fxrev/789', ' fxb/456',
+        ' tqr/123']);
+    });
+
+    it('test implied link regex string', () => {
+      const impliedLinkRE = refRegs[2];
+      const str = 'incomplete.com .help.com hey.net/other="(blah)"';
+      let match;
+      const actualMatches = [];
+      while ((match = impliedLinkRE.exec(str)) !== null) {
+        actualMatches.push(match[0]);
+      }
+      assert.deepEqual(
+          actualMatches, ['incomplete.com', ' hey.net/other="(blah)"']);
+    });
+
+    it('test implied link alternate domains', () => {
+      const impliedLinkRE = refRegs[2];
+      const str = 'what.net hey.edu google.org fuchsia.dev ignored.domain';
+      let match;
+      const actualMatches = [];
+      while ((match = impliedLinkRE.exec(str)) !== null) {
+        actualMatches.push(match[0]);
+      }
+      assert.deepEqual(
+          actualMatches, ['what.net', ' hey.edu', ' google.org',
+            ' fuchsia.dev']);
+    });
+
+    it('Replace URL plain text', () => {
+      const match = refRegs[2].exec('link here: (website.net/other="here").');
+      refRegs[2].lastIndex = 0;
+      const actualTextRuns = replacer(match);
+      assert.deepEqual(
+          actualTextRuns,
+          [{content: '('},
+            {tag: 'a',
+              href: 'https://website.net/other="here"',
+              content: 'website.net/other="here"',
+            },
+            {content: ').'}],
+      );
+    });
+
+    it('Replace short link existing http', () => {
+      const match = refRegs[0].exec('link here: (http://who/me).');
+      refRegs[0].lastIndex = 0;
+      const actualTextRuns = replacer(match);
+      assert.deepEqual(
+          actualTextRuns,
+          [{content: '('},
+            {tag: 'a',
+              href: 'http://who/me',
+              content: 'http://who/me',
+            },
+            {content: ').'}],
+      );
+    });
+
+    it('Replace short-link plain text', () => {
+      const match = refRegs[0].exec('link here: (who/me).');
+      refRegs[0].lastIndex = 0;
+      const actualTextRuns = replacer(match);
+      assert.deepEqual(
+          actualTextRuns,
+          [{content: '('},
+            {tag: 'a',
+              href: 'http://who/me',
+              content: 'who/me',
+            },
+            {content: ').'}],
+      );
+    });
+
+    it('Replace short-link plain text initial characters', () => {
+      const match = refRegs[0].exec('link here: who/me');
+      refRegs[0].lastIndex = 0;
+      const actualTextRuns = replacer(match);
+      assert.deepEqual(
+          actualTextRuns,
+          [{content: ' '},
+            {tag: 'a',
+              href: 'http://who/me',
+              content: 'who/me',
+            }],
+      );
+    });
+
+    it('Replace URL short link', () => {
+      ['go', 'g', 'shortn', 'who', 'teams'].forEach((prefix) => {
+        const match = refRegs[0].exec(`link here: (${prefix}/abcd).`);
+        refRegs[0].lastIndex = 0;
+        const actualTextRuns = replacer(match);
+        assert.deepEqual(
+            actualTextRuns,
+            [{content: '('},
+              {tag: 'a',
+                href: `http://${prefix}/abcd`,
+                content: `${prefix}/abcd`,
+              },
+              {content: ').'}],
+        );
+      });
+    });
+
+    it('Replace URL numeric short link', () => {
+      ['b', 't', 'o', 'omg', 'cl', 'cr'].forEach((prefix) => {
+        const match = refRegs[1].exec(`link here: (${prefix}/1234).`);
+        refRegs[1].lastIndex = 0;
+        const actualTextRuns = replacer(match);
+        assert.deepEqual(
+            actualTextRuns,
+            [{content: '('},
+              {tag: 'a',
+                href: `http://${prefix}/1234`,
+                content: `${prefix}/1234`,
+              }],
+        );
+      });
+    });
+  });
+
+  describe('versioncontrol component functions.', () => {
+    const {refRegs, replacer} = components.get('06-versioncontrol');
+
+    it('test git hash regex', () => {
+      const gitHashRE = refRegs[0];
+      const str =
+          'r63b72a71d5fbce6739c51c3846dd94bd62b91091 blha blah ' +
+          'Revision 63b72a71d5fbce6739c51c3846dd94bd62b91091 blah balh ' +
+          '63b72a71d5fbce6739c51c3846dd94bd62b91091 ' +
+          'Revision63b72a71d5fbce6739c51c3846dd94bd62b91091';
+      let match;
+      const actualMatches = [];
+      while ((match = gitHashRE.exec(str)) !== null) {
+        actualMatches.push(match[0]);
+      }
+      assert.deepEqual(
+          actualMatches, [
+            'r63b72a71d5fbce6739c51c3846dd94bd62b91091',
+            'Revision 63b72a71d5fbce6739c51c3846dd94bd62b91091',
+            '63b72a71d5fbce6739c51c3846dd94bd62b91091',
+          ]);
+    });
+
+    it('test svn regex', () => {
+      const svnRE = refRegs[1];
+      const str =
+          'r1234 blah blah ' +
+          'Revision 123456 blah balh ' +
+          'r12345678' +
+          '1234';
+      let match;
+      const actualMatches = [];
+      while ((match = svnRE.exec(str)) !== null) {
+        actualMatches.push(match[0]);
+      }
+      assert.deepEqual(
+          actualMatches, [
+            'r1234',
+            'Revision 123456',
+          ]);
+    });
+
+    it('replace revision refs plain text', () => {
+      const str = 'r63b72a71d5fbce6739c51c3846dd94bd62b91091';
+      const match = refRegs[0].exec(str);
+      const actualTextRuns = replacer(
+          match, null, null, 'https://crrev.com/{revnum}');
+      refRegs[0].lastIndex = 0;
+      assert.deepEqual(
+          actualTextRuns,
+          [{
+            content: 'r63b72a71d5fbce6739c51c3846dd94bd62b91091',
+            tag: 'a',
+            href: 'https://crrev.com/63b72a71d5fbce6739c51c3846dd94bd62b91091',
+          }]);
+    });
+
+    it('replace revision refs plain text different template', () => {
+      const str = 'r63b72a71d5fbce6739c51c3846dd94bd62b91091';
+      const match = refRegs[0].exec(str);
+      const actualTextRuns = replacer(
+          match, null, null, 'https://foo.bar/{revnum}/baz');
+      refRegs[0].lastIndex = 0;
+      assert.deepEqual(
+          actualTextRuns,
+          [{
+            content: 'r63b72a71d5fbce6739c51c3846dd94bd62b91091',
+            tag: 'a',
+            href: 'https://foo.bar/63b72a71d5fbce6739c51c3846dd94bd62b91091/baz',
+          }]);
+    });
+  });
+
+
+  describe('markupAutolinks tests', () => {
+    const componentRefs = new Map();
+    componentRefs.set('01-tracker-crbug', {
+      openRefs: [],
+      closedRefs: [{projectName: 'chromium', localId: 99}],
+    });
+    componentRefs.set('04-tracker-regular', {
+      openRefs: [{summary: 'monorail', projectName: 'monorail', localId: 123}],
+      closedRefs: [{projectName: 'chromium', localId: 456}],
+    });
+    componentRefs.set('03-user-emails', {
+      users: [{displayName: 'user2@example.com'}],
+    });
+
+    it('empty string does not cause error', () => {
+      const actualTextRuns = markupAutolinks('', componentRefs);
+      assert.deepEqual(actualTextRuns, []);
+    });
+
+    it('no nested autolinking', () => {
+      const plainString = 'test <b>autolinking go/testlink</b> is not nested';
+      const actualTextRuns = markupAutolinks(plainString, componentRefs);
+      assert.deepEqual(
+          actualTextRuns, [
+            {content: 'test '},
+            {content: 'autolinking go/testlink', tag: 'b'},
+            {content: ' is not nested'},
+          ]);
+    });
+
+    it('URLs are autolinked', () => {
+      const plainString = 'this http string contains http://google.com for you';
+      const actualTextRuns = markupAutolinks(plainString, componentRefs);
+      assert.deepEqual(
+          actualTextRuns, [
+            {content: 'this http string contains '},
+            {content: 'http://google.com', tag: 'a', href: 'http://google.com'},
+            {content: ' for you'},
+          ]);
+    });
+
+    it('different component types are correctly linked', () => {
+      const plainString = 'test (User2@example.com and crbug.com/99) get link';
+      const actualTextRuns = markupAutolinks(plainString, componentRefs);
+      assert.deepEqual(
+          actualTextRuns,
+          [
+            {
+              content: 'test (',
+            },
+            {
+              content: 'User2@example.com',
+              tag: 'a',
+              href: '/u/User2@example.com',
+            },
+            {
+              content: ' and ',
+            },
+            {
+              content: 'crbug.com/99',
+              tag: 'a',
+              href: '/p/chromium/issues/detail?id=99',
+              title: '',
+              css: 'strike-through',
+            },
+            {
+              content: ') get link',
+            },
+          ],
+      );
+    });
+
+    it('Invalid issue refs do not get linked', () => {
+      const plainString =
+        'bug123, bug 123a, bug-123 and https://bug:123.example.com ' +
+        'do not get linked.';
+      const actualTextRuns= markupAutolinks(
+          plainString, componentRefs, 'chromium');
+      assert.deepEqual(
+          actualTextRuns,
+          [
+            {
+              content: 'bug123, bug 123a, bug-123 and ',
+            },
+            {
+              content: 'https://bug:123.example.com',
+              tag: 'a',
+              href: 'https://bug:123.example.com',
+            },
+            {
+              content: ' do not get linked.',
+            },
+          ]);
+    });
+
+    it('Only existing issues get linked', () => {
+      const plainString =
+        'only existing bugs = 456, monorail:123, 234 and chromium:345 get ' +
+        'linked';
+      const actualTextRuns = markupAutolinks(
+          plainString, componentRefs, 'chromium');
+      assert.deepEqual(
+          actualTextRuns,
+          [
+            {
+              content: 'only existing ',
+            },
+            {
+              content: 'bugs = ',
+            },
+            {
+              content: '456',
+              tag: 'a',
+              href: '/p/chromium/issues/detail?id=456',
+              title: '',
+              css: 'strike-through',
+            },
+            {
+              content: ', ',
+            },
+            {
+              content: 'monorail:123',
+              tag: 'a',
+              href: '/p/monorail/issues/detail?id=123',
+              title: 'monorail',
+              css: '',
+            },
+            {
+              content: ', ',
+            },
+            {
+              content: '234',
+            },
+            {
+              content: ' and ',
+            },
+            {
+              content: 'chromium:345',
+            },
+            {
+              content: ' ',
+            },
+            {
+              content: 'get linked',
+            },
+          ],
+      );
+    });
+
+    it('multilined bolds are not bolded', () => {
+      const plainString =
+        '<b>no multiline bolding \n' +
+        'not allowed go/survey is still linked</b>';
+      const actualTextRuns = markupAutolinks(plainString, componentRefs);
+      assert.deepEqual(
+          actualTextRuns, [
+            {content: '<b>no multiline bolding '},
+            {tag: 'br'},
+            {content: 'not allowed'},
+            {content: ' '},
+            {content: 'go/survey', tag: 'a', href: 'http://go/survey'},
+            {content: ' is still linked</b>'},
+          ]);
+
+      const plainString2 =
+        '<b>no multiline bold \rwith carriage \r\nreturns</b>';
+      const actualTextRuns2 = markupAutolinks(plainString2, componentRefs);
+
+      assert.deepEqual(
+          actualTextRuns2, [
+            {content: '<b>no multiline bold '},
+            {tag: 'br'},
+            {content: 'with carriage '},
+            {tag: 'br'},
+            {content: 'returns</b>'},
+          ]);
+    });
+
+    // Check that comment references are properly linked.
+    it('comments are correctly linked', () => {
+      const plainString =
+      'comment1, comment : 5, Comment =10, comment #4, #c57';
+      const actualTextRuns = markupAutolinks(plainString, componentRefs);
+      assert.deepEqual(
+          actualTextRuns, [
+            {
+              content: 'comment1',
+              tag: 'a',
+              href: '#c1',
+            },
+            {
+              content: ', ',
+            },
+            {
+              content: 'comment : 5',
+              tag: 'a',
+              href: '#c5',
+            },
+            {
+              content: ', ',
+            },
+            {
+              content: 'Comment =10',
+              tag: 'a',
+              href: '#c10',
+            },
+            {
+              content: ', ',
+            },
+            {
+              content: 'comment #4',
+              tag: 'a',
+              href: '#c4',
+            },
+            {
+              content: ', ',
+            },
+            {
+              content: '#c57',
+              tag: 'a',
+              href: '#c57',
+            },
+          ],
+      );
+    });
+
+    // Check that improperly formatted comment references do not get linked.
+    it('comments that should not be linked', () => {
+      const plainString =
+      'comment number 4, comment-4, comment= # 5, comment#c56';
+      const actualTextRuns = markupAutolinks(plainString, componentRefs);
+      assert.deepEqual(
+          actualTextRuns, [
+            {
+              content: 'comment number 4, comment-4, comment= # 5, comment#c56',
+            },
+          ],
+      );
+    });
+
+    // Check that issue/comment references are properly linked.
+    it('issue/comment that should be linked', () => {
+      const plainString =
+      'issue 2 comment 3, issue2 comment 9, bug #3 comment=4';
+      const actualTextRuns = markupAutolinks(plainString, componentRefs);
+      assert.deepEqual(
+          actualTextRuns, [
+            {
+              content: 'issue 2 comment 3',
+              tag: 'a',
+              href: '?id=2#c3',
+            },
+            {
+              content: ', ',
+            },
+            {
+              content: 'issue2 comment 9',
+              tag: 'a',
+              href: '?id=2#c9',
+            },
+            {
+              content: ', ',
+            },
+            {
+              content: 'bug #3 comment=4',
+              tag: 'a',
+              href: '?id=3#c4',
+            },
+          ],
+      );
+    });
+
+    // Check that improperly formatted issue/comment references do not get linked.
+    it('issue/comment that should not be linked', () => {
+      const plainString =
+      'theissue 2comment 3, issue2comment 9';
+      const actualTextRuns = markupAutolinks(plainString, componentRefs);
+      assert.deepEqual(
+          actualTextRuns, [
+            {
+              content: 'theissue 2comment 3, issue2comment 9',
+            },
+          ],
+      );
+    });
+  });
+
+  describe('getReferencedArtifacts', () => {
+    beforeEach(() => {
+      sinon.stub(prpcClient, 'call').returns(Promise.resolve({}));
+    });
+
+    afterEach(() => {
+      prpcClient.call.restore();
+    });
+
+    it('filters invalid issue refs', async () => {
+      const comments = [
+        {
+          content: 'issue 0 issue 1 Bug: chromium:3 Bug: chromium:0',
+        },
+      ];
+      autolink.getReferencedArtifacts(comments, 'proj');
+      assert.isTrue(prpcClient.call.calledWith(
+          'monorail.Issues',
+          'ListReferencedIssues',
+          {
+            issueRefs: [
+              {projectName: 'proj', localId: '1'},
+              {projectName: 'chromium', localId: '3'},
+            ],
+          },
+      ));
+    });
+  });
+});
diff --git a/static_src/elements/chdir/mr-activity-table/mr-activity-table.js b/static_src/elements/chdir/mr-activity-table/mr-activity-table.js
new file mode 100644
index 0000000..a0f4715
--- /dev/null
+++ b/static_src/elements/chdir/mr-activity-table/mr-activity-table.js
@@ -0,0 +1,129 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import './mr-day-icon.js';
+
+const MONTH_NAMES = ['January', 'February', 'March', 'April', 'May', 'June',
+  'July', 'August', 'September', 'October', 'November', 'December'];
+const WEEKDAY_ABBREVIATIONS = 'M T W T F S S'.split(' ');
+const SECONDS_PER_DAY = 24 * 60 * 60;
+// Only show comments from this many days ago and later.
+const MAX_COMMENT_AGE = 31 * 3;
+
+export class MrActivityTable extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: grid;
+        grid-auto-flow: column;
+        grid-auto-columns: repeat(13, auto);
+        grid-template-rows: repeat(7, auto);
+        margin: auto;
+        width: 90%;
+        text-align: center;
+        line-height: 110%;
+        align-items: center;
+        justify-content: space-between;
+      }
+      :host[hidden] {
+        display: none;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      ${WEEKDAY_ABBREVIATIONS.map((weekday) => html`<span>${weekday}</span>`)}
+      ${this._weekdayOffset.map(() => html`<span></span>`)}
+      ${this._activityArray.map((day) => html`
+        <mr-day-icon
+          .selected=${this.selectedDate === day.date}
+          .commentCount=${day.commentCount}
+          .date=${day.date}
+          @click=${this._selectDay}
+        ></mr-day-icon>
+      `)}
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      comments: {type: Array},
+      selectedDate: {type: Number},
+    };
+  }
+
+  _selectDay(event) {
+    const target = event.target;
+    if (this.selectedDate === target.date) {
+      this.selectedDate = undefined;
+    } else {
+      this.selectedDate = target.date;
+    }
+
+    this.dispatchEvent(new CustomEvent('dateChange', {
+      detail: {
+        date: this.selectedDate,
+      },
+    }));
+  }
+
+  get months() {
+    const currentMonth = (new Date()).getMonth();
+    return [MONTH_NAMES[currentMonth],
+      MONTH_NAMES[currentMonth - 1],
+      MONTH_NAMES[currentMonth - 2]];
+  }
+
+  get _weekdayOffset() {
+    const startDate = new Date(this._activityArray[0].date * 1000);
+    const startWeekdayNum = startDate.getDay()-1;
+    const emptyDays = [];
+    for (let i = 0; i < startWeekdayNum; i++) {
+      emptyDays.push(' ');
+    }
+    return emptyDays;
+  }
+
+  get _todayUnixTime() {
+    const now = new Date();
+    const today = new Date(Date.UTC(
+        now.getUTCFullYear(),
+        now.getUTCMonth(),
+        now.getUTCDate(),
+        24, 0, 0));
+    const todayEndTime = today.getTime() / 1000;
+    return todayEndTime;
+  }
+
+  get _activityArray() {
+    const todayUnixEndTime = this._todayUnixTime;
+    const comments = this.comments || [];
+
+    const activityArray = [];
+    for (let i = 0; i < MAX_COMMENT_AGE; i++) {
+      const arrayDate = (todayUnixEndTime - ((i) * SECONDS_PER_DAY));
+      activityArray.unshift({
+        commentCount: 0,
+        date: arrayDate,
+      });
+    }
+
+    for (let i = 0; i < comments.length; i++) {
+      const commentAge = Math.floor(
+          (todayUnixEndTime - comments[i].timestamp) / SECONDS_PER_DAY);
+      if (commentAge < MAX_COMMENT_AGE) {
+        const pos = MAX_COMMENT_AGE - commentAge - 1;
+        activityArray[pos].commentCount++;
+      }
+    }
+
+    return activityArray;
+  }
+}
+customElements.define('mr-activity-table', MrActivityTable);
diff --git a/static_src/elements/chdir/mr-activity-table/mr-activity-table.test.js b/static_src/elements/chdir/mr-activity-table/mr-activity-table.test.js
new file mode 100644
index 0000000..0eb9d30
--- /dev/null
+++ b/static_src/elements/chdir/mr-activity-table/mr-activity-table.test.js
@@ -0,0 +1,57 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrActivityTable} from './mr-activity-table.js';
+import sinon from 'sinon';
+
+const SECONDS_PER_DAY = 24 * 60 * 60;
+
+let element;
+
+describe('mr-activity-table', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-activity-table');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrActivityTable);
+  });
+
+  it('no comments makes empty activity array', () => {
+    element.comments = [];
+
+    for (let i = 0; i < 93; i++) {
+      assert.equal(0, element._activityArray[i].commentCount);
+    }
+  });
+
+  it('activity array handles old comments', () => {
+    // 94 days since EPOCH.
+    sinon.stub(element, '_todayUnixTime').get(() => 94 * SECONDS_PER_DAY);
+
+    element.comments = [
+      {content: 'blah', timestamp: 0}, // too old.
+      {content: 'ignore', timestamp: 100}, // too old.
+      {
+        content: 'comment',
+        timestamp: SECONDS_PER_DAY + 1, // barely young enough.
+      },
+      {content: 'hello', timestamp: SECONDS_PER_DAY + 10}, // same day as above.
+      {content: 'world', timestamp: SECONDS_PER_DAY * 94}, // today
+    ];
+
+    assert.equal(93, element._activityArray.length);
+    assert.equal(2, element._activityArray[0].commentCount);
+    for (let i = 1; i < 92; i++) {
+      assert.equal(0, element._activityArray[i].commentCount);
+    }
+    assert.equal(1, element._activityArray[92].commentCount);
+  });
+});
diff --git a/static_src/elements/chdir/mr-activity-table/mr-day-icon.js b/static_src/elements/chdir/mr-activity-table/mr-day-icon.js
new file mode 100644
index 0000000..82f62b3
--- /dev/null
+++ b/static_src/elements/chdir/mr-activity-table/mr-day-icon.js
@@ -0,0 +1,91 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+export class MrDayIcon extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        background-color: hsl(0, 0%, 95%);
+        margin: 0.25em 8px;
+        height: 20px;
+        width: 20px;
+        border: 2px solid white;
+        transition: border-color .5s ease-in-out;
+      }
+      :host(:hover) {
+        cursor: pointer;
+        border-color: hsl(87, 20%, 45%);
+      }
+      :host([activityLevel="0"]) {
+        background-color: var(--chops-blue-gray-50);
+      }
+      :host([activityLevel="1"]) {
+        background-color: hsl(87, 70%, 87%);
+      }
+      :host([activityLevel="2"]) {
+        background-color: hsl(88, 67%, 72%);
+      }
+      :host([activityLevel="3"]) {
+        background-color: hsl(87, 80%, 40%);
+      }
+      :host([selected]) {
+        border-color: hsl(0, 0%, 13%);
+      }
+      .hover-card {
+        display: none;
+      }
+      :host(:hover) .hover-card {
+        display: block;
+        position: relative;
+        width: 150px;
+        padding: 0.5em 8px;
+        background: rgba(0, 0, 0, 0.6);
+        color: var(--chops-white);
+        border-radius: 8px;
+        top: 120%;
+        left: 50%;
+        transform: translateX(-50%);
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <div class="hover-card">
+        ${this.commentCount} Comments<br>
+        <chops-timestamp .timestamp=${this.date}></chops-timestamp>
+      </div>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      activityLevel: {
+        type: Number,
+        reflect: true,
+      },
+      commentCount: {type: Number},
+      date: {type: Number},
+      selected: {
+        type: Boolean,
+        reflect: true,
+      },
+    };
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('commentCount')) {
+      const level = Math.ceil(this.commentCount / 2);
+      this.activityLevel = Math.min(level, 3);
+    }
+    super.update(changedProperties);
+  }
+}
+customElements.define('mr-day-icon', MrDayIcon);
diff --git a/static_src/elements/chdir/mr-activity-table/mr-day-icon.test.js b/static_src/elements/chdir/mr-activity-table/mr-day-icon.test.js
new file mode 100644
index 0000000..3c35a10
--- /dev/null
+++ b/static_src/elements/chdir/mr-activity-table/mr-day-icon.test.js
@@ -0,0 +1,24 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrDayIcon} from './mr-day-icon.js';
+
+
+let element;
+
+describe('mr-day-icon', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-day-icon');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrDayIcon);
+  });
+});
diff --git a/static_src/elements/chdir/mr-comment-table/mr-comment-table.js b/static_src/elements/chdir/mr-comment-table/mr-comment-table.js
new file mode 100644
index 0000000..a6d0f19
--- /dev/null
+++ b/static_src/elements/chdir/mr-comment-table/mr-comment-table.js
@@ -0,0 +1,130 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import 'elements/framework/mr-comment-content/mr-comment-content.js';
+import 'elements/chops/chops-timestamp/chops-timestamp.js';
+
+/**
+ * `<mr-comment-table>`
+ *
+ * The list of comments for a Monorail Polymer profile.
+ *
+ */
+export class MrCommentTable extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      .ellipsis {
+        max-width: 50%;
+        text-overflow: ellipsis;
+        overflow: hidden;
+        white-space: nowrap;
+      }
+      table {
+        word-wrap: break-word;
+        width: 100%;
+      }
+      tr {
+        font-size: var(--chops-main-font-size);
+        font-weight: normal;
+        text-align: left;
+        line-height: 180%;
+      }
+      td, th {
+        border-bottom: var(--chops-normal-border);
+        padding: 0.25em 16px;
+      }
+      td {
+        text-overflow: ellipsis;
+      }
+      th {
+        text-align: left;
+      }
+      .no-wrap {
+        white-space: nowrap;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    const comments = this._displayedComments(this.selectedDate, this.comments);
+    // TODO(zhangtiff): render deltas for comment changes.
+    return html`
+      <table cellspacing="0" cellpadding="0">
+        <tbody>
+           <tr id="heading-row">
+            <th>Date</th>
+            <th>Project</th>
+            <th>Comment</th>
+            <th>Issue Link</th>
+          </tr>
+
+          ${comments && comments.length ? comments.map((comment) => html`
+            <tr id="row">
+              <td class="no-wrap">
+                <chops-timestamp
+                  .timestamp=${comment.timestamp}
+                  short
+                ></chops-timestamp>
+              </td>
+              <td>${comment.projectName}</td>
+              <td class="ellipsis">
+                <mr-comment-content
+                  .content=${this._truncateMessage(comment.content)}
+                ></mr-comment-content>
+              </td>
+              <td class="no-wrap">
+                <a href="/p/${comment.projectName}/issues/detail?id=${comment.localId}">
+                  Issue ${comment.localId}
+                </a>
+              </td>
+            </tr>
+          `) : html`
+            <tr>
+              <td colspan="4"><i>No comments.</i></td>
+            </tr>
+          `}
+        </tbody>
+      </table>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      comments: {type: Array},
+      selectedDate: {type: Number},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.comments = [];
+  }
+
+  _truncateMessage(message) {
+    return message && message.substring(0, message.indexOf('\n'));
+  }
+
+  _displayedComments(selectedDate, comments) {
+    if (!selectedDate) {
+      return comments;
+    } else {
+      const computedComments = [];
+      if (!comments) return computedComments;
+
+      for (let i = 0; i < comments.length; i++) {
+        if (comments[i].timestamp <= selectedDate &&
+           comments[i].timestamp >= (selectedDate - 86400)) {
+          computedComments.push(comments[i]);
+        }
+      }
+      return computedComments;
+    }
+  }
+}
+customElements.define('mr-comment-table', MrCommentTable);
diff --git a/static_src/elements/chdir/mr-comment-table/mr-comment-table.test.js b/static_src/elements/chdir/mr-comment-table/mr-comment-table.test.js
new file mode 100644
index 0000000..6925dc4
--- /dev/null
+++ b/static_src/elements/chdir/mr-comment-table/mr-comment-table.test.js
@@ -0,0 +1,24 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrCommentTable} from './mr-comment-table.js';
+
+
+let element;
+
+describe('mr-comment-table', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-comment-table');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrCommentTable);
+  });
+});
diff --git a/static_src/elements/chdir/mr-profile-page/mr-profile-page.js b/static_src/elements/chdir/mr-profile-page/mr-profile-page.js
new file mode 100644
index 0000000..5fadff6
--- /dev/null
+++ b/static_src/elements/chdir/mr-profile-page/mr-profile-page.js
@@ -0,0 +1,156 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import {prpcClient} from 'prpc-client-instance.js';
+
+import 'elements/framework/mr-header/mr-header.js';
+import '../mr-activity-table/mr-activity-table.js';
+import '../mr-comment-table/mr-comment-table.js';
+
+/**
+ * `<mr-profile-page>`
+ *
+ * The main entry point for a Monorail web components profile.
+ *
+ */
+export class MrProfilePage extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      .history-container {
+        padding: 1em 16px;
+        display: flex;
+        flex-direction: column;
+        min-height: 100%;
+        box-sizing: border-box;
+        flex-grow: 1;
+      }
+      mr-comment-table {
+        width: 100%;
+        margin-bottom: 1em;
+        box-sizing: border-box;
+      }
+      mr-activity-table {
+        width: 70%;
+        flex-grow: 0;
+        margin: auto;
+        margin-bottom: 5em;
+        height: 200px;
+        box-sizing: border-box;
+      }
+      .metadata-container {
+        font-size: var(--chops-main-font-size);
+        border-right: var(--chops-normal-border);
+        width: 15%;
+        min-width: 256px;
+        flex-grow: 0;
+        flex-shrink: 0;
+        box-sizing: border-box;
+        min-height: 100%;
+      }
+      .container-outside {
+        box-sizing: border-box;
+        width: 100%;
+        max-width: 100%;
+        margin: auto;
+        padding: 0.75em 8px;
+        display: flex;
+        align-items: stretch;
+        justify-content: space-between;
+        flex-direction: row;
+        flex-wrap: no-wrap;
+        flex-grow: 0;
+        min-height: 100%;
+      }
+      .profile-data {
+        text-align: center;
+        padding-top: 40%;
+        font-size: var(--chops-main-font-size);
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <mr-header
+        .userDisplayName=${this.user}
+        .loginUrl=${this.loginUrl}
+        .logoutUrl=${this.logoutUrl}
+      >
+        <span slot="subheader">
+          &gt; Viewing Profile: ${this.viewedUser}
+        </span>
+      </mr-header>
+      <div class="container-outside">
+        <div class="metadata-container">
+          <div class="profile-data">
+            ${this.viewedUser} <br>
+            <b>Last visit:</b> ${this.lastVisitStr} <br>
+            <b>Starred Developers:</b>
+            ${this.starredUsers.length ? this.starredUsers.join(', ') : 'None'}
+          </div>
+        </div>
+        <div class="history-container">
+          ${this.user === this.viewedUser ? html`
+            <mr-activity-table
+              .comments=${this.comments}
+              @dateChange=${this._changeDate}
+            ></mr-activity-table>
+          `: ''}
+          <mr-comment-table
+            .user=${this.viewedUser}
+            .viewedUserId=${this.viewedUserId}
+            .comments=${this.comments}
+            .selectedDate=${this.selectedDate}>
+          </mr-comment-table>
+        </div>
+      </div>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      user: {type: String},
+      logoutUrl: {type: String},
+      loginUrl: {type: String},
+      viewedUser: {type: String},
+      viewedUserId: {type: Number},
+      lastVisitStr: {type: String},
+      starredUsers: {type: Array},
+      comments: {type: Array},
+      selectedDate: {type: Number},
+    };
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('viewedUserId')) {
+      this._fetchActivity();
+    }
+  }
+
+  async _fetchActivity() {
+    const commentMessage = {
+      userRef: {
+        userId: this.viewedUserId,
+      },
+    };
+
+    const resp = await prpcClient.call(
+        'monorail.Issues', 'ListActivities', commentMessage
+    );
+
+    this.comments = resp.comments;
+  }
+
+  _changeDate(e) {
+    if (!e.detail) return;
+    this.selectedDate = e.detail.date;
+  }
+}
+
+customElements.define('mr-profile-page', MrProfilePage);
diff --git a/static_src/elements/chdir/mr-profile-page/mr-profile-page.test.js b/static_src/elements/chdir/mr-profile-page/mr-profile-page.test.js
new file mode 100644
index 0000000..c967704
--- /dev/null
+++ b/static_src/elements/chdir/mr-profile-page/mr-profile-page.test.js
@@ -0,0 +1,24 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrProfilePage} from './mr-profile-page.js';
+
+
+let element;
+
+describe('mr-profile-page', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-profile-page');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrProfilePage);
+  });
+});
diff --git a/static_src/elements/chops/chops-announcement/chops-announcement.js b/static_src/elements/chops/chops-announcement/chops-announcement.js
new file mode 100644
index 0000000..477e7d2
--- /dev/null
+++ b/static_src/elements/chops/chops-announcement/chops-announcement.js
@@ -0,0 +1,181 @@
+// Copyright 2020 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+// URL where announcements are fetched from.
+const ANNOUNCEMENT_SERVICE =
+  'https://chopsdash.appspot.com/prpc/dashboard.ChopsAnnouncements/SearchAnnouncements';
+
+// Prefix prepended to responses for security reasons.
+export const XSSI_PREFIX = ')]}\'';
+
+const FETCH_HEADERS = Object.freeze({
+  'accept': 'application/json',
+  'content-type': 'application/json',
+});
+
+// How often to refresh announcements.
+export const REFRESH_TIME_MS = 5 * 60 * 1000;
+
+/**
+ * @typedef {Object} Announcement
+ * @property {string} id
+ * @property {string} messageContent
+ */
+
+/**
+ * @typedef {Object} AnnouncementResponse
+ * @property {Array<Announcement>} announcements
+ */
+
+/**
+ * `<chops-announcement>` displays a ChopsDash message when there's an outage
+ * or other important announcement.
+ *
+ * @customElement chops-announcement
+ */
+export class ChopsAnnouncement extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: block;
+        width: 100%;
+      }
+      p {
+        display: block;
+        color: #222;
+        font-size: 13px;
+        background: #FFCDD2; /* Material design red */
+        width: 100%;
+        text-align: center;
+        padding: 0.5em 16px;
+        box-sizing: border-box;
+        margin: 0;
+        /* Using a red-tinted grey border makes hues feel harmonious. */
+        border-bottom: 1px solid #D6B3B6;
+      }
+    `;
+  }
+  /** @override */
+  render() {
+    if (this._error) {
+      return html`<p><strong>Error: </strong>${this._error}</p>`;
+    }
+    return html`
+      ${this._announcements.map(
+      ({messageContent}) => html`<p>${messageContent}</p>`)}
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      service: {type: String},
+      _error: {type: String},
+      _announcements: {type: Array},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    /** @type {string} */
+    this.service = undefined;
+    /** @type {string} */
+    this._error = undefined;
+    /** @type {Array<Announcement>} */
+    this._announcements = [];
+
+    /** @type {number} Interval ID returned by window.setInterval. */
+    this._interval = undefined;
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('service')) {
+      if (this.service) {
+        this.startRefresh();
+      } else {
+        this.stopRefresh();
+      }
+    }
+  }
+
+  /** @override */
+  disconnectedCallback() {
+    super.disconnectedCallback();
+
+    this.stopRefresh();
+  }
+
+  /**
+   * Set up autorefreshing logic or announcement information.
+   */
+  startRefresh() {
+    this.stopRefresh();
+    this.refresh();
+    this._interval = window.setInterval(() => this.refresh(), REFRESH_TIME_MS);
+  }
+
+  /**
+   * Logic for clearing refresh behavior.
+   */
+  stopRefresh() {
+    if (this._interval) {
+      window.clearInterval(this._interval);
+    }
+  }
+
+  /**
+   * Refresh the announcement banner.
+   */
+  async refresh() {
+    try {
+      const {announcements = []} = await this.fetch(this.service);
+      this._error = undefined;
+      this._announcements = announcements;
+    } catch (e) {
+      this._error = e.message;
+      this._announcements = [];
+    }
+  }
+
+  /**
+   * Fetches the announcement for a given service.
+   * @param {string} service Name of the service to fetch from ChopsDash.
+   *   ie: "monorail"
+   * @return {Promise<AnnouncementResponse>} ChopsDash response JSON.
+   * @throws {Error} If something went wrong while fetching.
+   */
+  async fetch(service) {
+    const message = {
+      retired: false,
+      platformName: service,
+    };
+
+    const response = await window.fetch(ANNOUNCEMENT_SERVICE, {
+      method: 'POST',
+      headers: FETCH_HEADERS,
+      body: JSON.stringify(message),
+    });
+
+    if (!response.ok) {
+      throw new Error('Something went wrong while fetching announcements');
+    }
+
+    // We can't use response.json() because of the XSSI prefix.
+    const text = await response.text();
+
+    if (!text.startsWith(XSSI_PREFIX)) {
+      throw new Error(`No XSSI prefix in announce response: ${XSSI_PREFIX}`);
+    }
+
+    return JSON.parse(text.substr(XSSI_PREFIX.length));
+  }
+}
+
+customElements.define('chops-announcement', ChopsAnnouncement);
diff --git a/static_src/elements/chops/chops-announcement/chops-announcement.test.js b/static_src/elements/chops/chops-announcement/chops-announcement.test.js
new file mode 100644
index 0000000..fa9643f
--- /dev/null
+++ b/static_src/elements/chops/chops-announcement/chops-announcement.test.js
@@ -0,0 +1,194 @@
+// Copyright 2020 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.
+import {assert} from 'chai';
+import {ChopsAnnouncement, REFRESH_TIME_MS,
+  XSSI_PREFIX} from './chops-announcement.js';
+import sinon from 'sinon';
+
+let element;
+let clock;
+
+describe('chops-announcement', () => {
+  beforeEach(() => {
+    element = document.createElement('chops-announcement');
+    document.body.appendChild(element);
+
+    clock = sinon.useFakeTimers({
+      now: new Date(0),
+      shouldAdvanceTime: false,
+    });
+
+    sinon.stub(window, 'fetch');
+  });
+
+  afterEach(() => {
+    if (document.body.contains(element)) {
+      document.body.removeChild(element);
+    }
+
+    clock.restore();
+
+    window.fetch.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, ChopsAnnouncement);
+  });
+
+  it('does not request announcements when no service specified', async () => {
+    sinon.stub(element, 'fetch');
+
+    element.service = '';
+
+    await element.updateComplete;
+
+    sinon.assert.notCalled(element.fetch);
+  });
+
+  it('requests announcements when service is specified', async () => {
+    sinon.stub(element, 'fetch');
+
+    element.service = 'monorail';
+
+    await element.updateComplete;
+
+    sinon.assert.calledOnce(element.fetch);
+  });
+
+  it('refreshes announcements regularly', async () => {
+    sinon.stub(element, 'fetch');
+
+    element.service = 'monorail';
+
+    await element.updateComplete;
+
+    sinon.assert.calledOnce(element.fetch);
+
+    clock.tick(REFRESH_TIME_MS);
+
+    await element.updateComplete;
+
+    sinon.assert.calledTwice(element.fetch);
+  });
+
+  it('stops refreshing when service removed', async () => {
+    sinon.stub(element, 'fetch');
+
+    element.service = 'monorail';
+
+    await element.updateComplete;
+
+    sinon.assert.calledOnce(element.fetch);
+
+    element.service = '';
+
+    await element.updateComplete;
+    clock.tick(REFRESH_TIME_MS);
+    await element.updateComplete;
+
+    sinon.assert.calledOnce(element.fetch);
+  });
+
+  it('stops refreshing when element is disconnected', async () => {
+    sinon.stub(element, 'fetch');
+
+    element.service = 'monorail';
+
+    await element.updateComplete;
+
+    sinon.assert.calledOnce(element.fetch);
+
+    document.body.removeChild(element);
+
+    await element.updateComplete;
+    clock.tick(REFRESH_TIME_MS);
+    await element.updateComplete;
+
+    sinon.assert.calledOnce(element.fetch);
+  });
+
+  it('renders error when thrown', async () => {
+    sinon.stub(element, 'fetch');
+    element.fetch.throws(() => Error('Something went wrong'));
+
+    element.service = 'monorail';
+
+    await element.updateComplete;
+
+    // Fetch runs here.
+
+    await element.updateComplete;
+
+    assert.equal(element._error, 'Something went wrong');
+    assert.include(element.shadowRoot.textContent, 'Something went wrong');
+  });
+
+  it('renders fetched announcement', async () => {
+    sinon.stub(element, 'fetch');
+    element.fetch.returns(
+        {announcements: [{id: '1234', messageContent: 'test thing'}]});
+
+    element.service = 'monorail';
+
+    await element.updateComplete;
+
+    // Fetch runs here.
+
+    await element.updateComplete;
+
+    assert.deepEqual(element._announcements,
+        [{id: '1234', messageContent: 'test thing'}]);
+    assert.include(element.shadowRoot.textContent, 'test thing');
+  });
+
+  it('renders empty on empty announcement', async () => {
+    sinon.stub(element, 'fetch');
+    element.fetch.returns({});
+    element.service = 'monorail';
+
+    await element.updateComplete;
+
+    // Fetch runs here.
+
+    await element.updateComplete;
+
+    assert.deepEqual(element._announcements, []);
+    assert.equal(0, element.shadowRoot.children.length);
+  });
+
+  it('fetch returns response data', async () => {
+    const json = {announcements: [{id: '1234', messageContent: 'test thing'}]};
+    const fakeResponse = XSSI_PREFIX + JSON.stringify(json);
+    window.fetch.returns(new window.Response(fakeResponse));
+
+    const resp = await element.fetch('monorail');
+
+    assert.deepEqual(resp, json);
+  });
+
+  it('fetch errors when no XSSI prefix', async () => {
+    const json = {announcements: [{id: '1234', messageContent: 'test thing'}]};
+    const fakeResponse = JSON.stringify(json);
+    window.fetch.returns(new window.Response(fakeResponse));
+
+    try {
+      await element.fetch('monorail');
+    } catch (e) {
+      assert.include(e.message, 'No XSSI prefix in announce response:');
+    }
+  });
+
+  it('fetch errors when response is not okay', async () => {
+    const json = {announcements: [{id: '1234', messageContent: 'test thing'}]};
+    const fakeResponse = XSSI_PREFIX + JSON.stringify(json);
+    window.fetch.returns(new window.Response(fakeResponse, {status: 500}));
+
+    try {
+      await element.fetch('monorail');
+    } catch (e) {
+      assert.include(e.message,
+          'Something went wrong while fetching announcements');
+    }
+  });
+});
diff --git a/static_src/elements/chops/chops-autocomplete/chops-autocomplete.js b/static_src/elements/chops/chops-autocomplete/chops-autocomplete.js
new file mode 100644
index 0000000..dab8f85
--- /dev/null
+++ b/static_src/elements/chops/chops-autocomplete/chops-autocomplete.js
@@ -0,0 +1,632 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+import {NON_EDITING_KEY_EVENTS} from 'shared/dom-helpers.js';
+
+/**
+ * @type {RegExp} Autocomplete options are matched at word boundaries. This
+ *   Regex specifies what counts as a boundary between words.
+ */
+const DELIMITER_REGEX = /[^a-z0-9]+/i;
+
+/**
+ * Specifies what happens to the input element an autocomplete
+ * instance is attached to when a user selects an autocomplete option. This
+ * constant specifies the default behavior where a form's entire value is
+ * replaced with the selected value.
+ * @param {HTMLInputElement} input An input element.
+ * @param {string} value The value of the selected autocomplete option.
+ */
+const DEFAULT_REPLACER = (input, value) => {
+  input.value = value;
+};
+
+/**
+ * @type {number} The default maximum of completions to render at a time.
+ */
+const DEFAULT_MAX_COMPLETIONS = 200;
+
+/**
+ * @type {number} Globally shared counter for autocomplete instances to help
+ *   ensure that no two <chops-autocomplete> options have the same ID.
+ */
+let idCount = 1;
+
+/**
+ * `<chops-autocomplete>` shared autocomplete UI code that inter-ops with
+ * other code.
+ *
+ * chops-autocomplete inter-ops with any input element, whether custom or
+ * native that can receive change handlers and has a 'value' property which
+ * can be read and set.
+ *
+ * NOTE: This element disables ShadowDOM for accessibility reasons: to allow
+ * aria attributes from the outside to reference features in this element.
+ *
+ * @customElement chops-autocomplete
+ */
+export class ChopsAutocomplete extends LitElement {
+  /** @override */
+  render() {
+    const completions = this.completions;
+    const currentValue = this._prefix.trim().toLowerCase();
+    const index = this._selectedIndex;
+    const currentCompletion = index >= 0 &&
+      index < completions.length ? completions[index] : '';
+
+    return html`
+      <style>
+        /*
+         * Really specific class names are necessary because ShadowDOM
+         * is disabled for this component.
+         */
+        .chops-autocomplete-container {
+          position: relative;
+        }
+        .chops-autocomplete-container table {
+          padding: 0;
+          font-size: var(--chops-main-font-size);
+          color: var(--chops-link-color);
+          position: absolute;
+          background: var(--chops-white);
+          border: var(--chops-accessible-border);
+          z-index: 999;
+          box-shadow: 2px 3px 8px 0px hsla(0, 0%, 0%, 0.3);
+          border-spacing: 0;
+          border-collapse: collapse;
+          /* In the case when the autocomplete extends the
+           * height of the viewport, we want to make sure
+           * there's spacing. */
+          margin-bottom: 1em;
+        }
+        .chops-autocomplete-container tbody {
+          display: block;
+          min-width: 100px;
+          max-height: 500px;
+          overflow: auto;
+        }
+        .chops-autocomplete-container tr {
+          cursor: pointer;
+          transition: background 0.2s ease-in-out;
+        }
+        .chops-autocomplete-container tr[data-selected] {
+          background: var(--chops-active-choice-bg);
+          text-decoration: underline;
+        }
+        .chops-autocomplete-container td {
+          padding: 0.25em 8px;
+          white-space: nowrap;
+        }
+        .screenreader-hidden {
+          clip: rect(1px, 1px, 1px, 1px);
+          height: 1px;
+          overflow: hidden;
+          position: absolute;
+          white-space: nowrap;
+          width: 1px;
+        }
+      </style>
+      <div class="chops-autocomplete-container">
+        <span class="screenreader-hidden" aria-live="polite">
+          ${currentCompletion}
+        </span>
+        <table
+          ?hidden=${!completions.length}
+        >
+          <tbody>
+            ${completions.map((completion, i) => html`
+              <tr
+                id=${completionId(this.id, i)}
+                ?data-selected=${i === index}
+                data-index=${i}
+                data-value=${completion}
+                @mouseover=${this._hoverCompletion}
+                @mousedown=${this._clickCompletion}
+                role="option"
+                aria-selected=${completion.toLowerCase() ===
+                  currentValue ? 'true' : 'false'}
+              >
+                <td class="completion">
+                  ${this._renderCompletion(completion)}
+                </td>
+                <td class="docstring">
+                  ${this._renderDocstring(completion)}
+                </td>
+              </tr>
+            `)}
+          </tbody>
+        </table>
+      </div>
+    `;
+  }
+
+  /**
+   * Renders a single autocomplete result.
+   * @param {string} completion The string for the currently selected
+   *   autocomplete value.
+   * @return {TemplateResult}
+   */
+  _renderCompletion(completion) {
+    const matchDict = this._matchDict;
+
+    if (!(completion in matchDict)) return completion;
+
+    const {index, matchesDoc} = matchDict[completion];
+
+    if (matchesDoc) return completion;
+
+    const prefix = this._prefix;
+    const start = completion.substr(0, index);
+    const middle = completion.substr(index, prefix.length);
+    const end = completion.substr(index + prefix.length);
+
+    return html`${start}<b>${middle}</b>${end}`;
+  }
+
+  /**
+   * Finds the docstring for a given autocomplete result and renders it.
+   * @param {string} completion The autocomplete result rendered.
+   * @return {TemplateResult}
+   */
+  _renderDocstring(completion) {
+    const matchDict = this._matchDict;
+    const docDict = this.docDict;
+
+    if (!completion in docDict) return '';
+
+    const doc = docDict[completion];
+
+    if (!(completion in matchDict)) return doc;
+
+    const {index, matchesDoc} = matchDict[completion];
+
+    if (!matchesDoc) return doc;
+
+    const prefix = this._prefix;
+    const start = doc.substr(0, index);
+    const middle = doc.substr(index, prefix.length);
+    const end = doc.substr(index + prefix.length);
+
+    return html`${start}<b>${middle}</b>${end}`;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      /**
+       * The input this element is for.
+       */
+      for: {type: String},
+      /**
+       * Generated id for the element.
+       */
+      id: {
+        type: String,
+        reflect: true,
+      },
+      /**
+       * The role attribute, set for accessibility.
+       */
+      role: {
+        type: String,
+        reflect: true,
+      },
+      /**
+       * Array of strings for possible autocompletion values.
+       */
+      strings: {type: Array},
+      /**
+       * A dictionary containing optional doc strings for each autocomplete
+       * string.
+       */
+      docDict: {type: Object},
+      /**
+       * An optional function to compute what happens when the user selects
+       * a value.
+       */
+      replacer: {type: Object},
+      /**
+       * An Array of the currently suggested autcomplte values.
+       */
+      completions: {type: Array},
+      /**
+       * Maximum number of completion values that can display at once.
+       */
+      max: {type: Number},
+      /**
+       * Dict of locations of matched substrings. Value format:
+       * {index, matchesDoc}.
+       */
+      _matchDict: {type: Object},
+      _selectedIndex: {type: Number},
+      _prefix: {type: String},
+      _forRef: {type: Object},
+      _boundToggleCompletionsOnFocus: {type: Object},
+      _boundNavigateCompletions: {type: Object},
+      _boundUpdateCompletions: {type: Object},
+      _oldAttributes: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this.strings = [];
+    this.docDict = {};
+    this.completions = [];
+    this.max = DEFAULT_MAX_COMPLETIONS;
+
+    this.role = 'listbox';
+    this.id = `chops-autocomplete-${idCount++}`;
+
+    this._matchDict = {};
+    this._selectedIndex = -1;
+    this._prefix = '';
+    this._boundToggleCompletionsOnFocus =
+      this._toggleCompletionsOnFocus.bind(this);
+    this._boundUpdateCompletions = this._updateCompletions.bind(this);
+    this._boundNavigateCompletions = this._navigateCompletions.bind(this);
+    this._oldAttributes = {};
+  }
+
+  // Disable shadow DOM to allow aria attributes to propagate.
+  /** @override */
+  createRenderRoot() {
+    return this;
+  }
+
+  /** @override */
+  disconnectedCallback() {
+    super.disconnectedCallback();
+
+    this._disconnectAutocomplete(this._forRef);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('for')) {
+      const forRef = this.getRootNode().querySelector('#' + this.for);
+
+      // TODO(zhangtiff): Make this element work with custom input components
+      // in the future as well.
+      this._forRef = (forRef.tagName || '').toUpperCase() === 'INPUT' ?
+        forRef : undefined;
+      this._connectAutocomplete(this._forRef);
+    }
+    if (this._forRef) {
+      if (changedProperties.has('id')) {
+        this._forRef.setAttribute('aria-owns', this.id);
+      }
+      if (changedProperties.has('completions')) {
+        // a11y. Tell screenreaders whether the autocomplete is expanded.
+        this._forRef.setAttribute('aria-expanded',
+          this.completions.length ? 'true' : 'false');
+      }
+
+      if (changedProperties.has('_selectedIndex') ||
+          changedProperties.has('completions')) {
+        this._updateAriaActiveDescendant(this._forRef);
+
+        this._scrollCompletionIntoView(this._selectedIndex);
+      }
+    }
+  }
+
+  /**
+   * Sets the aria-activedescendant attribute of the element (ie: an input form)
+   * that the autocomplete is attached to, in order to tell screenreaders about
+   * which autocomplete option is currently selected.
+   * @param {HTMLInputElement} element
+   */
+  _updateAriaActiveDescendant(element) {
+    const i = this._selectedIndex;
+
+    if (i >= 0 && i < this.completions.length) {
+      const selectedId = completionId(this.id, i);
+
+      // a11y. Set the ID of the currently selected element.
+      element.setAttribute('aria-activedescendant', selectedId);
+
+      // Scroll the container to make sure the selected element is in view.
+    } else {
+      element.setAttribute('aria-activedescendant', '');
+    }
+  }
+
+  /**
+   * When a user moves up or down from an autocomplete option that's at the top
+   * or bottom of the autocomplete option container, we must scroll the
+   * container to make sure the user always sees the option they've selected.
+   * @param {number} i The index of the autocomplete option to put into view.
+   */
+  _scrollCompletionIntoView(i) {
+    const selectedId = completionId(this.id, i);
+
+    const container = this.querySelector('tbody');
+    const completion = this.querySelector(`#${selectedId}`);
+
+    if (!completion) return;
+
+    const distanceFromTop = completion.offsetTop - container.scrollTop;
+
+    // If the completion is above the viewport for the container.
+    if (distanceFromTop < 0) {
+      // Position the completion at the top of the container.
+      container.scrollTop = completion.offsetTop;
+    }
+
+    // If the compltion is below the viewport for the container.
+    if (distanceFromTop > (container.offsetHeight - completion.offsetHeight)) {
+      // Position the compltion at the bottom of the container.
+      container.scrollTop = completion.offsetTop - (container.offsetHeight -
+        completion.offsetHeight);
+    }
+  }
+
+  /**
+   * Changes the input's value according to the rules of the replacer function.
+   * @param {string} value - the value to swap in.
+   * @return {undefined}
+   */
+  completeValue(value) {
+    if (!this._forRef) return;
+
+    const replacer = this.replacer || DEFAULT_REPLACER;
+    replacer(this._forRef, value);
+
+    this.hideCompletions();
+  }
+
+  /**
+   * Computes autocomplete values matching the current input in the field.
+   * @return {boolean} Whether any completions were found.
+   */
+  showCompletions() {
+    if (!this._forRef) {
+      this.hideCompletions();
+      return false;
+    }
+    this._prefix = this._forRef.value.trim().toLowerCase();
+    // Always select the first completion by default when recomputing
+    // completions.
+    this._selectedIndex = 0;
+
+    const matchDict = {};
+    const accepted = [];
+    matchDict;
+    for (let i = 0; i < this.strings.length &&
+        accepted.length < this.max; i++) {
+      const s = this.strings[i];
+      let matchIndex = this._matchIndex(this._prefix, s);
+      let matches = matchIndex >= 0;
+      if (matches) {
+        matchDict[s] = {index: matchIndex, matchesDoc: false};
+      } else if (s in this.docDict) {
+        matchIndex = this._matchIndex(this._prefix, this.docDict[s]);
+        matches = matchIndex >= 0;
+        if (matches) {
+          matchDict[s] = {index: matchIndex, matchesDoc: true};
+        }
+      }
+      if (matches) {
+        accepted.push(s);
+      }
+    }
+
+    this._matchDict = matchDict;
+
+    this.completions = accepted;
+
+    return !!this.completions.length;
+  }
+
+  /**
+   * Finds where a given user input matches an autocomplete option. Note that
+   * a match is only found if the substring is at either the beginning of the
+   * string or the beginning of a delimited section of the string. Hence, we
+   * refer to the "needle" in this function a "prefix".
+   * @param {string} prefix The value that the user inputed into the form.
+   * @param {string} s The autocomplete option that's being compared.
+   * @return {number} An integer for what index the substring is found in the
+   *   autocomplete option. Returns -1 if no match.
+   */
+  _matchIndex(prefix, s) {
+    const matchStart = s.toLowerCase().indexOf(prefix.toLocaleLowerCase());
+    if (matchStart === 0 ||
+        (matchStart > 0 && s[matchStart - 1].match(DELIMITER_REGEX))) {
+      return matchStart;
+    }
+    return -1;
+  }
+
+  /**
+   * Hides autocomplete options.
+   */
+  hideCompletions() {
+    this.completions = [];
+    this._prefix = '';
+    this._selectedIndex = -1;
+  }
+
+  /**
+   * Sets an autocomplete option that a user hovers over as the selected option.
+   * @param {MouseEvent} e
+   */
+  _hoverCompletion(e) {
+    const target = e.currentTarget;
+
+    if (!target.dataset || !target.dataset.index) return;
+
+    const index = Number.parseInt(target.dataset.index);
+    if (index >= 0 && index < this.completions.length) {
+      this._selectedIndex = index;
+    }
+  }
+
+  /**
+   * Sets the value of the form input that the user is editing to the
+   * autocomplete option that the user just clicked.
+   * @param {MouseEvent} e
+   */
+  _clickCompletion(e) {
+    e.preventDefault();
+    const target = e.currentTarget;
+    if (!target.dataset || !target.dataset.value) return;
+
+    this.completeValue(target.dataset.value);
+  }
+
+  /**
+   * Hides and shows the autocomplete completions when a user focuses and
+   * unfocuses a form.
+   * @param {FocusEvent} e
+   */
+  _toggleCompletionsOnFocus(e) {
+    const target = e.target;
+
+    // Check if the input is focused or not.
+    if (target.matches(':focus')) {
+      this.showCompletions();
+    } else {
+      this.hideCompletions();
+    }
+  }
+
+  /**
+   * Implements hotkeys to allow the user to navigate autocomplete options with
+   * their keyboard. ie: pressing up and down to select options or Esc to close
+   * the form.
+   * @param {KeyboardEvent} e
+   */
+  _navigateCompletions(e) {
+    const completions = this.completions;
+    if (!completions.length) return;
+
+    switch (e.key) {
+      // TODO(zhangtiff): Throttle or control keyboard navigation so the user
+      // can't navigate faster than they can can perceive.
+      case 'ArrowUp':
+        e.preventDefault();
+        this._navigateUp();
+        break;
+      case 'ArrowDown':
+        e.preventDefault();
+        this._navigateDown();
+        break;
+      case 'Enter':
+      // TODO(zhangtiff): Add Tab to this case as well once all issue detail
+      // inputs use chops-autocomplete.
+        e.preventDefault();
+        if (this._selectedIndex >= 0 &&
+            this._selectedIndex <= completions.length) {
+          this.completeValue(completions[this._selectedIndex]);
+        }
+        break;
+      case 'Escape':
+        e.preventDefault();
+        this.hideCompletions();
+        break;
+    }
+  }
+
+  /**
+   * Selects the completion option above the current one.
+   */
+  _navigateUp() {
+    const completions = this.completions;
+    this._selectedIndex -= 1;
+    if (this._selectedIndex < 0) {
+      this._selectedIndex = completions.length - 1;
+    }
+  }
+
+  /**
+   * Selects the completion option below the current one.
+   */
+  _navigateDown() {
+    const completions = this.completions;
+    this._selectedIndex += 1;
+    if (this._selectedIndex >= completions.length) {
+      this._selectedIndex = 0;
+    }
+  }
+
+  /**
+   * Recomputes autocomplete completions when the user types a new input.
+   * Ignores KeyboardEvents that don't change the input value of the form
+   * to prevent excess recomputations.
+   * @param {KeyboardEvent} e
+   */
+  _updateCompletions(e) {
+    if (NON_EDITING_KEY_EVENTS.has(e.key)) return;
+    this.showCompletions();
+  }
+
+  /**
+   * Initializes the input element that this autocomplete instance is
+   * attached to with aria attributes required for accessibility.
+   * @param {HTMLInputElement} node The input element that the autocomplete is
+   *   attached to.
+   */
+  _connectAutocomplete(node) {
+    if (!node) return;
+
+    node.addEventListener('keyup', this._boundUpdateCompletions);
+    node.addEventListener('keydown', this._boundNavigateCompletions);
+    node.addEventListener('focus', this._boundToggleCompletionsOnFocus);
+    node.addEventListener('blur', this._boundToggleCompletionsOnFocus);
+
+    this._oldAttributes = {
+      'aria-owns': node.getAttribute('aria-owns'),
+      'aria-autocomplete': node.getAttribute('aria-autocomplete'),
+      'aria-expanded': node.getAttribute('aria-expanded'),
+      'aria-haspopup': node.getAttribute('aria-haspopup'),
+      'aria-activedescendant': node.getAttribute('aria-activedescendant'),
+    };
+    node.setAttribute('aria-owns', this.id);
+    node.setAttribute('aria-autocomplete', 'both');
+    node.setAttribute('aria-expanded', 'false');
+    node.setAttribute('aria-haspopup', 'listbox');
+    node.setAttribute('aria-activedescendant', '');
+  }
+
+  /**
+   * When <chops-autocomplete> is disconnected or moved to a difference form,
+   * this function removes the side effects added by <chops-autocomplete> on the
+   * input element that <chops-autocomplete> is attached to.
+   * @param {HTMLInputElement} node The input element that the autocomplete is
+   *   attached to.
+   */
+  _disconnectAutocomplete(node) {
+    if (!node) return;
+
+    node.removeEventListener('keyup', this._boundUpdateCompletions);
+    node.removeEventListener('keydown', this._boundNavigateCompletions);
+    node.removeEventListener('focus', this._boundToggleCompletionsOnFocus);
+    node.removeEventListener('blur', this._boundToggleCompletionsOnFocus);
+
+    for (const key of Object.keys(this._oldAttributes)) {
+      node.setAttribute(key, this._oldAttributes[key]);
+    }
+    this._oldAttributes = {};
+  }
+}
+
+/**
+ * Generates a unique HTML ID for a given autocomplete option, for use by
+ * aria-activedescendant. Note that because the autocomplete element has
+ * ShadowDOM disabled, we need to make sure the ID is specific enough to be
+ * globally unique across the entire application.
+ * @param {string} prefix A unique prefix to differentiate this autocomplete
+ *   instance from other autocomplete instances.
+ * @param {number} i The index of the autocomplete option.
+ * @return {string} A unique HTML ID for a given autocomplete option.
+ */
+function completionId(prefix, i) {
+  return `${prefix}-option-${i}`;
+}
+
+customElements.define('chops-autocomplete', ChopsAutocomplete);
diff --git a/static_src/elements/chops/chops-autocomplete/chops-autocomplete.test.js b/static_src/elements/chops/chops-autocomplete/chops-autocomplete.test.js
new file mode 100644
index 0000000..e470312
--- /dev/null
+++ b/static_src/elements/chops/chops-autocomplete/chops-autocomplete.test.js
@@ -0,0 +1,358 @@
+// Copyright 2019 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.
+
+import sinon from 'sinon';
+import {assert} from 'chai';
+import {ChopsAutocomplete} from './chops-autocomplete.js';
+
+let element;
+let input;
+
+describe('chops-autocomplete', () => {
+  beforeEach(() => {
+    element = document.createElement('chops-autocomplete');
+    document.body.appendChild(element);
+
+    input = document.createElement('input');
+    input.id = 'autocomplete-input';
+    document.body.appendChild(input);
+
+    element.for = 'autocomplete-input';
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+    document.body.removeChild(input);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, ChopsAutocomplete);
+  });
+
+  it('registers child input', async () => {
+    await element.updateComplete;
+
+    assert.isNotNull(element._forRef);
+    assert.equal(element._forRef.tagName.toUpperCase(), 'INPUT');
+  });
+
+  it('completeValue sets input value', async () => {
+    await element.updateComplete;
+
+    element.completeValue('test');
+    assert.equal(input.value, 'test');
+
+    element.completeValue('again');
+    assert.equal(input.value, 'again');
+  });
+
+  it('completeValue can run a custom replacer', async () => {
+    element.replacer = (input, value) => input.value = value + ',';
+    await element.updateComplete;
+
+    element.completeValue('trailing');
+    assert.equal(input.value, 'trailing,');
+
+    element.completeValue('comma');
+    assert.equal(input.value, 'comma,');
+  });
+
+  it('completions render', async () => {
+    element.completions = ['hello', 'world'];
+    element.docDict = {'hello': 'well hello there'};
+    await element.updateComplete;
+
+    const completions = element.querySelectorAll('.completion');
+    const docstrings = element.querySelectorAll('.docstring');
+
+    assert.equal(completions.length, 2);
+    assert.equal(docstrings.length, 2);
+
+    assert.include(completions[0].textContent, 'hello');
+    assert.include(completions[1].textContent, 'world');
+
+    assert.include(docstrings[0].textContent, 'well hello there');
+    assert.include(docstrings[1].textContent, '');
+  });
+
+  it('completions bold matched section when rendering', async () => {
+    element.completions = ['hello-world'];
+    element._prefix = 'wor';
+    element._matchDict = {
+      'hello-world': {'index': 6},
+    };
+
+    await element.updateComplete;
+
+    const completion = element.querySelector('.completion');
+
+    assert.include(completion.textContent, 'hello-world');
+
+    assert.equal(completion.querySelector('b').textContent.trim(), 'wor');
+  });
+
+
+  it('showCompletions populates completions with matches', async () => {
+    element.strings = [
+      'test-one',
+      'test-two',
+      'ignore',
+      'hello',
+      'woah-test',
+      'i-am-a-tester',
+    ];
+    input.value = 'test';
+    await element.updateComplete;
+
+    element.showCompletions();
+
+    assert.deepEqual(element.completions, [
+      'test-one',
+      'test-two',
+      'woah-test',
+      'i-am-a-tester',
+    ]);
+  });
+
+  it('showCompletions matches docs', async () => {
+    element.strings = [
+      'hello',
+      'world',
+      'no-op',
+    ];
+    element.docDict = {'world': 'this is a test'};
+    input.value = 'test';
+    await element.updateComplete;
+
+    element.showCompletions();
+
+    assert.deepEqual(element.completions, [
+      'world',
+    ]);
+  });
+
+  it('showCompletions caps completions at max', async () => {
+    element.max = 2;
+    element.strings = [
+      'test-one',
+      'test-two',
+      'ignore',
+      'hello',
+      'woah-test',
+      'i-am-a-tester',
+    ];
+    input.value = 'test';
+    await element.updateComplete;
+
+    element.showCompletions();
+
+    assert.deepEqual(element.completions, [
+      'test-one',
+      'test-two',
+    ]);
+  });
+
+  it('hideCompletions hides completions', async () => {
+    element.completions = [
+      'test-one',
+      'test-two',
+    ];
+
+    await element.updateComplete;
+
+    const completionTable = element.querySelector('table');
+    assert.isFalse(completionTable.hidden);
+
+    element.hideCompletions();
+
+    await element.updateComplete;
+
+    assert.isTrue(completionTable.hidden);
+  });
+
+  it('clicking completion completes it', async () => {
+    element.completions = [
+      'test-one',
+      'test-two',
+      'click me!',
+      'test',
+    ];
+
+    await element.updateComplete;
+
+    const completions = element.querySelectorAll('tr');
+
+    assert.equal(input.value, '');
+
+    // Note: the click() event can only trigger click events, not mousedown
+    // events, so we are instead manually running the event handler.
+    element._clickCompletion({
+      preventDefault: sinon.stub(),
+      currentTarget: completions[2],
+    });
+
+    assert.equal(input.value, 'click me!');
+  });
+
+  it('completion is scrolled into view when outside viewport', async () => {
+    element.completions = [
+      'i',
+      'am',
+      'an option',
+    ];
+    element._selectedIndex = 0;
+    element.id = 'chops-autocomplete-1';
+
+    await element.updateComplete;
+
+    const container = element.querySelector('tbody');
+    const completion = container.querySelector('tr');
+    const completionHeight = completion.offsetHeight;
+    // Make the table one row tall.
+    container.style.height = `${completionHeight}px`;
+
+    element._selectedIndex = 1;
+    await element.updateComplete;
+
+    assert.equal(container.scrollTop, completionHeight);
+
+    element._selectedIndex = 2;
+    await element.updateComplete;
+
+    assert.equal(container.scrollTop, completionHeight * 2);
+
+    element._selectedIndex = 0;
+    await element.updateComplete;
+
+    assert.equal(container.scrollTop, 0);
+  });
+
+  it('aria-activedescendant set based on selected option', async () => {
+    element.completions = [
+      'i',
+      'am',
+      'an option',
+    ];
+    element._selectedIndex = 1;
+    element.id = 'chops-autocomplete-1';
+
+    await element.updateComplete;
+
+    assert.equal(input.getAttribute('aria-activedescendant'),
+        'chops-autocomplete-1-option-1');
+  });
+
+  it('hovering over a completion selects it', async () => {
+    element.completions = [
+      'hover',
+      'over',
+      'me',
+    ];
+
+    await element.updateComplete;
+
+    const completions = element.querySelectorAll('tr');
+
+    element._hoverCompletion({
+      currentTarget: completions[2],
+    });
+
+    assert.equal(element._selectedIndex, 2);
+
+    element._hoverCompletion({
+      currentTarget: completions[1],
+    });
+
+    assert.equal(element._selectedIndex, 1);
+  });
+
+  it('ArrowDown moves through completions', async () => {
+    element.completions = [
+      'move',
+      'down',
+      'me',
+    ];
+
+    element._selectedIndex = 0;
+
+    await element.updateComplete;
+
+    const preventDefault = sinon.stub();
+
+    element._navigateCompletions({preventDefault, key: 'ArrowDown'});
+    assert.equal(element._selectedIndex, 1);
+
+    element._navigateCompletions({preventDefault, key: 'ArrowDown'});
+    assert.equal(element._selectedIndex, 2);
+
+    // Wrap around.
+    element._navigateCompletions({preventDefault, key: 'ArrowDown'});
+    assert.equal(element._selectedIndex, 0);
+
+    sinon.assert.callCount(preventDefault, 3);
+  });
+
+  it('ArrowUp moves through completions', async () => {
+    element.completions = [
+      'move',
+      'up',
+      'me',
+    ];
+
+    element._selectedIndex = 0;
+
+    await element.updateComplete;
+
+    const preventDefault = sinon.stub();
+
+    // Wrap around.
+    element._navigateCompletions({preventDefault, key: 'ArrowUp'});
+    assert.equal(element._selectedIndex, 2);
+
+    element._navigateCompletions({preventDefault, key: 'ArrowUp'});
+    assert.equal(element._selectedIndex, 1);
+
+    element._navigateCompletions({preventDefault, key: 'ArrowUp'});
+    assert.equal(element._selectedIndex, 0);
+
+    sinon.assert.callCount(preventDefault, 3);
+  });
+
+  it('Enter completes with selected completion', async () => {
+    element.completions = [
+      'hello',
+      'pick me',
+      'world',
+    ];
+
+    element._selectedIndex = 1;
+
+    await element.updateComplete;
+
+    const preventDefault = sinon.stub();
+
+    element._navigateCompletions({preventDefault, key: 'Enter'});
+
+    assert.equal(input.value, 'pick me');
+    sinon.assert.callCount(preventDefault, 1);
+  });
+
+  it('Escape hides completions', async () => {
+    element.completions = [
+      'hide',
+      'me',
+    ];
+
+    await element.updateComplete;
+
+    const preventDefault = sinon.stub();
+    element._navigateCompletions({preventDefault, key: 'Escape'});
+
+    sinon.assert.callCount(preventDefault, 1);
+
+    await element.updateComplete;
+
+    assert.equal(element.completions.length, 0);
+  });
+});
diff --git a/static_src/elements/chops/chops-button/chops-button.js b/static_src/elements/chops/chops-button/chops-button.js
new file mode 100644
index 0000000..2139e22
--- /dev/null
+++ b/static_src/elements/chops/chops-button/chops-button.js
@@ -0,0 +1,112 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+/**
+ * `<chops-button>` displays a styled button component with a few niceties.
+ *
+ * @customElement chops-button
+ * @demo /demo/chops-button_demo.html
+ */
+export class ChopsButton extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        --chops-button-padding: 0.5em 16px;
+        background: hsla(0, 0%, 95%, 1);
+        margin: 0.25em 4px;
+        cursor: pointer;
+        border-radius: 3px;
+        text-align: center;
+        display: inline-flex;
+        align-items: center;
+        justify-content: center;
+        user-select: none;
+        transition: filter 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
+        font-family: var(--chops-font-family);
+      }
+      :host([hidden]) {
+        display: none;
+      }
+      :host([raised]) {
+        box-shadow: 0px 2px 8px -1px hsla(0, 0%, 0%, 0.5);
+      }
+      :host(:hover) {
+        filter: brightness(95%);
+      }
+      :host(:active) {
+        filter: brightness(115%);
+      }
+      :host([raised]:active) {
+        box-shadow: 0px 1px 8px -1px hsla(0, 0%, 0%, 0.5);
+      }
+      :host([disabled]),
+      :host([disabled]:hover) {
+        filter: grayscale(30%);
+        opacity: 0.4;
+        background: hsla(0, 0%, 87%, 1);
+        cursor: default;
+        pointer-events: none;
+        box-shadow: none;
+      }
+      button {
+        background: none;
+        width: 100%;
+        height: 100%;
+        border: 0;
+        padding: var(--chops-button-padding);
+        margin: 0;
+        color: inherit;
+        cursor: inherit;
+        text-align: center;
+        font-family: inherit;
+        text-align: inherit;
+        font-weight: inherit;
+        font-size: inherit;
+        line-height: inherit;
+        border-radius: inherit;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <button ?disabled=${this.disabled}>
+        <slot></slot>
+      </button>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      /** Whether the button is available for input or not. */
+      disabled: {
+        type: Boolean,
+        reflect: true,
+      },
+      /** Whether the button should have a shadow or not. */
+      raised: {
+        type: Boolean,
+        value: false,
+        reflect: true,
+      },
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this.disabled = false;
+    this.raised = false;
+  }
+}
+customElements.define('chops-button', ChopsButton);
diff --git a/static_src/elements/chops/chops-button/chops-button.test.js b/static_src/elements/chops/chops-button/chops-button.test.js
new file mode 100644
index 0000000..4487564
--- /dev/null
+++ b/static_src/elements/chops/chops-button/chops-button.test.js
@@ -0,0 +1,45 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {ChopsButton} from './chops-button.js';
+import {auditA11y} from 'shared/test/helpers';
+
+let element;
+
+describe('chops-button', () => {
+  beforeEach(() => {
+    element = document.createElement('chops-button');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, ChopsButton);
+  });
+
+  it('initial a11y', async () => {
+    const text = document.createTextNode('button text');
+    element.appendChild(text);
+    await auditA11y(element);
+  });
+
+  it('chops-button can be disabled', async () => {
+    await element.updateComplete;
+
+    const innerButton = element.shadowRoot.querySelector('button');
+
+    assert.isFalse(element.hasAttribute('disabled'));
+    assert.isFalse(innerButton.hasAttribute('disabled'));
+
+    element.disabled = true;
+    await element.updateComplete;
+
+    assert.isTrue(element.hasAttribute('disabled'));
+    assert.isTrue(innerButton.hasAttribute('disabled'));
+  });
+});
diff --git a/static_src/elements/chops/chops-checkbox/chops-checkbox.js b/static_src/elements/chops/chops-checkbox/chops-checkbox.js
new file mode 100644
index 0000000..d752347
--- /dev/null
+++ b/static_src/elements/chops/chops-checkbox/chops-checkbox.js
@@ -0,0 +1,135 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+/**
+ * `<chops-checkbox>`
+ *
+ * A checkbox component. This component is primarily a wrapper
+ * around a native checkbox to allow easy sharing of styles.
+ *
+ */
+export class ChopsCheckbox extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        --chops-checkbox-color: var(--chops-primary-accent-color);
+        /* A bit brighter than Chrome's default focus color to
+        * avoid blending into the checkbox's blue. */
+        --chops-checkbox-focus-color: hsl(193, 82%, 63%);
+        --chops-checkbox-size: 16px;
+        --chops-checkbox-check-size: 18px;
+      }
+      label {
+        cursor: pointer;
+        display: inline-flex;
+        align-items: center;
+      }
+      input[type="checkbox"] {
+        /* We need the checkbox to be hidden but still accessible. */
+        opacity: 0;
+        width: 0;
+        height: 0;
+        position: absolute;
+        top: -9999;
+        left: -9999;
+      }
+      label::before {
+        width: var(--chops-checkbox-size);
+        height: var(--chops-checkbox-size);
+        margin-right: 8px;
+        box-sizing: border-box;
+        content: "\\2713";
+        display: inline-flex;
+        align-items: center;
+        justify-content: center;
+        border: 2px solid #222;
+        border-radius: 2px;
+        background: #fff;
+        font-size: var(--chops-checkbox-check-size);
+        padding: 0;
+        color: transparent;
+      }
+      input[type="checkbox"]:focus + label::before {
+        /* Make sure an outline shows around this element for
+        * accessibility.
+        */
+        box-shadow: 0 0 5px 1px var(--chops-checkbox-focus-color);
+      }
+      input[type="checkbox"]:checked + label::before {
+        background: var(--chops-checkbox-color);
+        border-color: var(--chops-checkbox-color);
+        color: #fff;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <!-- Note: Avoiding 2-way data binding to futureproof this code
+        for LitElement. -->
+      <input id="checkbox" type="checkbox"
+        .checked=${this.checked} @change=${this._checkedChangeHandler}>
+      <label for="checkbox">
+        <slot></slot>
+      </label>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      label: {type: String},
+
+      /**
+       * Note: At the moment, this component does not manage its own
+       * internal checked state. It expects its checked state to come
+       * from its parent, and its parent is expected to update the
+       * chops-checkbox's checked state on a change event.
+       *
+       * This can be generalized in the future to support multiple
+       * ways of managing checked state if needed.
+       **/
+      checked: {type: Boolean},
+    };
+  }
+
+  /**
+   * Clicks the checkbox. Helpful for automated testing.
+   */
+  click() {
+    super.click();
+    /** @type {HTMLInputElement} */ (
+      this.shadowRoot.querySelector('#checkbox')).click();
+  }
+
+  /**
+   * Listens to the native checkbox's change event and runs internal
+   * logic based on changes.
+   * @param {Event} evt
+   * @private
+   */
+  _checkedChangeHandler(evt) {
+    this._checkedChange(evt.target.checked);
+  }
+
+  /**
+   * @param {boolean} checked Whether the box was checked or unchecked.
+   * @fires CustomEvent#checked-change
+   * @private
+   */
+  _checkedChange(checked) {
+    if (checked === this.checked) return;
+    const customEvent = new CustomEvent('checked-change', {
+      detail: {
+        checked: checked,
+      },
+    });
+    this.dispatchEvent(customEvent);
+  }
+}
+customElements.define('chops-checkbox', ChopsCheckbox);
diff --git a/static_src/elements/chops/chops-checkbox/chops-checkbox.test.js b/static_src/elements/chops/chops-checkbox/chops-checkbox.test.js
new file mode 100644
index 0000000..5a11111
--- /dev/null
+++ b/static_src/elements/chops/chops-checkbox/chops-checkbox.test.js
@@ -0,0 +1,86 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {ChopsCheckbox} from './chops-checkbox.js';
+
+let element;
+
+describe('chops-checkbox', () => {
+  beforeEach(() => {
+    element = document.createElement('chops-checkbox');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, ChopsCheckbox);
+  });
+
+  it('clicking checkbox dispatches checked-change event', async () => {
+    element.checked = false;
+    sinon.stub(window, 'CustomEvent');
+    sinon.stub(element, 'dispatchEvent');
+
+    await element.updateComplete;
+
+    element.shadowRoot.querySelector('#checkbox').click();
+
+    assert.deepEqual(window.CustomEvent.args[0][0], 'checked-change');
+    assert.deepEqual(window.CustomEvent.args[0][1], {
+      detail: {checked: true},
+    });
+
+    assert.isTrue(window.CustomEvent.calledOnce);
+    assert.isTrue(element.dispatchEvent.calledOnce);
+
+    window.CustomEvent.restore();
+    element.dispatchEvent.restore();
+  });
+
+  it('updating checked property updates native <input>', async () => {
+    element.checked = false;
+
+    await element.updateComplete;
+
+    assert.isFalse(element.checked);
+    assert.isFalse(element.shadowRoot.querySelector('input').checked);
+
+    element.checked = true;
+
+    await element.updateComplete;
+
+    assert.isTrue(element.checked);
+    assert.isTrue(element.shadowRoot.querySelector('input').checked);
+  });
+
+  it('updating checked attribute updates native <input>', async () => {
+    element.setAttribute('checked', true);
+    await element.updateComplete;
+
+    assert.equal(element.getAttribute('checked'), 'true');
+    assert.isTrue(element.shadowRoot.querySelector('input').checked);
+
+    element.click();
+    await element.updateComplete;
+
+    // We expect the 'checked' attribute to remain the same even as the
+    // corresponding property changes when the user clicks the checkbox.
+    assert.equal(element.getAttribute('checked'), 'true');
+    assert.isFalse(element.shadowRoot.querySelector('input').checked);
+
+    element.click();
+    await element.updateComplete;
+    assert.isTrue(element.shadowRoot.querySelector('input').checked);
+
+    element.removeAttribute('checked');
+    await element.updateComplete;
+    assert.isNotTrue(element.getAttribute('checked'));
+    assert.isFalse(element.shadowRoot.querySelector('input').checked);
+  });
+});
diff --git a/static_src/elements/chops/chops-chip/chops-chip.js b/static_src/elements/chops/chops-chip/chops-chip.js
new file mode 100644
index 0000000..ce8319e
--- /dev/null
+++ b/static_src/elements/chops/chops-chip/chops-chip.js
@@ -0,0 +1,122 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+/**
+ * `<chops-chip>` displays a chip.
+ * "Chips are compact elements that represent an input, attribute, or action."
+ * https://material.io/components/chips/
+ */
+export class ChopsChip extends LitElement {
+  /** @override */
+  static get properties() {
+    return {
+      focusable: {type: Boolean, reflect: true},
+      thumbnail: {type: String},
+      buttonIcon: {type: String},
+      buttonLabel: {type: String},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    /** @type {boolean} */
+    this.focusable = false;
+
+    /** @type {string} */
+    this.thumbnail = '';
+
+    /** @type {string} */
+    this.buttonIcon = '';
+    /** @type {string} */
+    this.buttonLabel = '';
+  }
+
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        --chops-chip-bg-color: var(--chops-blue-gray-50);
+        display: inline-flex;
+        padding: 0px 10px;
+        line-height: 22px;
+        margin: 0 2px;
+        border-radius: 12px;
+        background: var(--chops-chip-bg-color);
+        align-items: center;
+        font-size: var(--chops-main-font-size);
+        box-sizing: border-box;
+        border: 1px solid var(--chops-chip-bg-color);
+      }
+      :host(:focus), :host(.selected) {
+        background: var(--chops-active-choice-bg);
+        border: 1px solid var(--chops-light-accent-color);
+      }
+      :host([hidden]) {
+        display: none;
+      }
+      i.left {
+        margin: 0 4px 0 -6px;
+      }
+      button {
+        border-radius: 50%;
+        cursor: pointer;
+        background: none;
+        border: 0;
+        padding: 0;
+        margin: 0 -6px 0 4px;
+        display: inline-flex;
+        align-items: center;
+        transition: background-color 0.2s ease-in-out;
+      }
+      button[hidden] {
+        display: none;
+      }
+      button:hover {
+        background: var(--chops-gray-300);
+      }
+      i.material-icons {
+        color: var(--chops-primary-icon-color);
+        font-size: 14px;
+        user-select: none;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      ${this.thumbnail ? html`
+        <i class="material-icons left">${this.thumbnail}</i>
+      ` : ''}
+      <slot></slot>
+      ${this.buttonIcon ? html`
+        <button @click=${this.clickButton} aria-label=${this.buttonLabel}>
+          <i class="material-icons" aria-hidden="true"}>${this.buttonIcon}</i>
+        </button>
+      `: ''}
+    `;
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('focusable')) {
+      this.tabIndex = this.focusable ? '0' : undefined;
+    }
+    super.update(changedProperties);
+  }
+
+  /**
+   * @param {MouseEvent} e A click event.
+   * @fires CustomEvent#click-button
+   */
+  clickButton(e) {
+    this.dispatchEvent(new CustomEvent('click-button'));
+  }
+}
+customElements.define('chops-chip', ChopsChip);
diff --git a/static_src/elements/chops/chops-chip/chops-chip.test.js b/static_src/elements/chops/chops-chip/chops-chip.test.js
new file mode 100644
index 0000000..843000b
--- /dev/null
+++ b/static_src/elements/chops/chops-chip/chops-chip.test.js
@@ -0,0 +1,52 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {ChopsChip} from './chops-chip.js';
+
+let element;
+
+describe('chops-chip', () => {
+  beforeEach(() => {
+    element = document.createElement('chops-chip');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, ChopsChip);
+  });
+
+  it('icon is visible when defined', async () => {
+    await element.updateComplete;
+    assert.isNull(element.shadowRoot.querySelector('button'));
+
+    element.buttonIcon = 'close';
+
+    await element.updateComplete;
+
+    assert.isNotNull(element.shadowRoot.querySelector('button'));
+  });
+
+  it('clicking icon fires event', async () => {
+    const onClickStub = sinon.stub();
+
+    element.buttonIcon = 'close';
+
+    await element.updateComplete;
+
+    element.addEventListener('click-button', onClickStub);
+
+    assert.isFalse(onClickStub.calledOnce);
+
+    const icon = element.shadowRoot.querySelector('button');
+    icon.click();
+
+    assert.isTrue(onClickStub.calledOnce);
+  });
+});
diff --git a/static_src/elements/chops/chops-choice-buttons/chops-choice-buttons.js b/static_src/elements/chops/chops-choice-buttons/chops-choice-buttons.js
new file mode 100644
index 0000000..e300588
--- /dev/null
+++ b/static_src/elements/chops/chops-choice-buttons/chops-choice-buttons.js
@@ -0,0 +1,133 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import 'elements/chops/chops-button/chops-button.js';
+
+/**
+ * @typedef {Object} ChoiceOption
+ * @property {string=} value a unique string identifier for this option.
+ * @property {string=} text the text displayed to the user for this option.
+ * @property {string=} url the url this option navigates to.
+ */
+
+/**
+ * Shared component for rendering a set of choice chips.
+ * @extends {LitElement}
+ */
+export class ChopsChoiceButtons extends LitElement {
+  /** @override */
+  render() {
+    return html`
+      ${(this.options).map((option) => this._renderOption(option))}
+    `;
+  }
+
+  /**
+   * Rendering helper for rendering a single option.
+   * @param {ChoiceOption} option
+   * @return {TemplateResult}
+   */
+  _renderOption(option) {
+    const isSelected = this.value === option.value;
+    if (option.url) {
+      return html`
+        <a
+          ?selected=${isSelected}
+          aria-current=${isSelected ? 'true' : 'false'}
+          href=${option.url}
+        >${option.text}</a>
+      `;
+    }
+    return html`
+      <button
+        ?selected=${isSelected}
+        aria-current=${isSelected ? 'true' : 'false'}
+        @click=${this._setValue}
+        value=${option.value}
+      >${option.text}</button>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      /**
+       * Array of options where each option is an Object with keys:
+       * {value, text, url}
+       */
+      options: {type: Array},
+      /**
+       * Which button is currently selected.
+       */
+      value: {type: String},
+    };
+  };
+
+  /** @override */
+  constructor() {
+    super();
+
+    /**
+     * @type {Array<ChoiceOption>}
+     */
+    this.options = [];
+    this.value = '';
+  };
+
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: grid;
+        grid-auto-flow: column;
+        grid-template-columns: auto;
+      }
+      button, a {
+        display: block;
+        cursor: pointer;
+        border: 0;
+        color: var(--chops-gray-700);
+        font-weight: var(--chops-link-font-weight);
+        font-size: var(--chops-normal-font-size);
+        margin: 0.1em 4px;
+        padding: 4px 10px;
+        line-height: 1.4;
+        background: var(--chops-choice-bg);
+        text-decoration: none;
+        border-radius: 16px;
+      }
+      button[selected], a[selected] {
+        background: var(--chops-active-choice-bg);
+        color: var(--chops-link-color);
+        font-weight: var(--chops-link-font-weight);
+        border-radius: 16px;
+      }
+    `;
+  };
+
+  /**
+   * Public method for allowing parents to change the value of this component.
+   * @param {string} newValue
+   * @fires CustomEvent#change
+   */
+  setValue(newValue) {
+    if (newValue !== this.value) {
+      this.value = newValue;
+      this.dispatchEvent(new CustomEvent('change'));
+    }
+  }
+
+  /**
+   * Private setter for updating the value of the component based on an internal
+   * click event.
+   * @param {MouseEvent} e
+   * @private
+   */
+  _setValue(e) {
+    this.setValue(e.target.getAttribute('value'));
+  }
+};
+
+customElements.define('chops-choice-buttons', ChopsChoiceButtons);
diff --git a/static_src/elements/chops/chops-choice-buttons/chops-choice-buttons.test.js b/static_src/elements/chops/chops-choice-buttons/chops-choice-buttons.test.js
new file mode 100644
index 0000000..e529735
--- /dev/null
+++ b/static_src/elements/chops/chops-choice-buttons/chops-choice-buttons.test.js
@@ -0,0 +1,99 @@
+// Copyright 2019 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.
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {ChopsChoiceButtons} from './chops-choice-buttons';
+
+let element;
+
+describe('chops-choice-buttons', () => {
+  beforeEach(() => {
+    element = document.createElement('chops-choice-buttons');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, ChopsChoiceButtons);
+  });
+
+  it('clicking option fires change event', async () => {
+    element.options = [{value: 'test', text: 'click me'}];
+    element.value = '';
+
+    await element.updateComplete;
+
+    const changeStub = sinon.stub();
+    element.addEventListener('change', changeStub);
+
+    const option = element.shadowRoot.querySelector('button');
+    option.click();
+
+    sinon.assert.calledOnce(changeStub);
+  });
+
+  it('clicking selected value does not fire change event', async () => {
+    element.options = [{value: 'test', text: 'click me'}];
+    element.value = 'test';
+
+    await element.updateComplete;
+
+    const changeStub = sinon.stub();
+    element.addEventListener('change', changeStub);
+
+    const option = element.shadowRoot.querySelector('button');
+    option.click();
+
+    sinon.assert.notCalled(changeStub);
+  });
+
+  it('selected value highlighted and has aria-current="true"', async () => {
+    element.options = [
+      {value: 'test', text: 'test'},
+      {value: 'selected', text: 'highlighted!'},
+    ];
+    element.value = 'selected';
+
+    await element.updateComplete;
+
+    const options = element.shadowRoot.querySelectorAll('button');
+
+    assert.isFalse(options[0].hasAttribute('selected'));
+    assert.isTrue(options[1].hasAttribute('selected'));
+
+    assert.equal(options[0].getAttribute('aria-current'), 'false');
+    assert.equal(options[1].getAttribute('aria-current'), 'true');
+  });
+
+  it('renders <a> tags when url set', async () => {
+    element.options = [
+      {value: 'test', text: 'test', url: 'http://google.com/'},
+    ];
+
+    await element.updateComplete;
+
+    const options = element.shadowRoot.querySelectorAll('a');
+
+    assert.equal(options[0].textContent.trim(), 'test');
+    assert.equal(options[0].href, 'http://google.com/');
+  });
+
+  it('selected value highlighted for <a> tags', async () => {
+    element.options = [
+      {value: 'test', text: 'test', url: 'http://google.com/'},
+      {value: 'selected', text: 'highlighted!', url: 'http://localhost/'},
+    ];
+    element.value = 'selected';
+
+    await element.updateComplete;
+
+    const options = element.shadowRoot.querySelectorAll('a');
+
+    assert.isFalse(options[0].hasAttribute('selected'));
+    assert.isTrue(options[1].hasAttribute('selected'));
+  });
+});
diff --git a/static_src/elements/chops/chops-collapse/chops-collapse.js b/static_src/elements/chops/chops-collapse/chops-collapse.js
new file mode 100644
index 0000000..0df3e21
--- /dev/null
+++ b/static_src/elements/chops/chops-collapse/chops-collapse.js
@@ -0,0 +1,62 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+/**
+ * `<chops-collapse>` displays a collapsible element.
+ *
+ */
+export class ChopsCollapse extends LitElement {
+  /** @override */
+  static get properties() {
+    return {
+      opened: {
+        type: Boolean,
+        reflect: true,
+      },
+      ariaHidden: {
+        attribute: 'aria-hidden',
+        type: Boolean,
+        reflect: true,
+      },
+    };
+  }
+
+  /** @override */
+  static get styles() {
+    return css`
+      :host, :host([hidden]) {
+        display: none;
+      }
+      :host([opened]) {
+        display: block;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <slot></slot>
+    `;
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this.opened = false;
+    this.ariaHidden = true;
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('opened')) {
+      this.ariaHidden = !this.opened;
+    }
+    super.update(changedProperties);
+  }
+}
+customElements.define('chops-collapse', ChopsCollapse);
diff --git a/static_src/elements/chops/chops-collapse/chops-collapse.test.js b/static_src/elements/chops/chops-collapse/chops-collapse.test.js
new file mode 100644
index 0000000..7058b65
--- /dev/null
+++ b/static_src/elements/chops/chops-collapse/chops-collapse.test.js
@@ -0,0 +1,33 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {ChopsCollapse} from './chops-collapse.js';
+
+
+let element;
+describe('chops-collapse', () => {
+  beforeEach(() => {
+    element = document.createElement('chops-collapse');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, ChopsCollapse);
+  });
+
+  it('toggling chops-collapse changes aria-hidden', () => {
+    element.opened = true;
+
+    assert.isNull(element.getAttribute('aria-hidden'));
+
+    element.opened = false;
+
+    assert.isDefined(element.getAttribute('aria-hidden'));
+  });
+});
diff --git a/static_src/elements/chops/chops-dialog/chops-dialog.js b/static_src/elements/chops/chops-dialog/chops-dialog.js
new file mode 100644
index 0000000..0d40aa2
--- /dev/null
+++ b/static_src/elements/chops/chops-dialog/chops-dialog.js
@@ -0,0 +1,254 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+/**
+ * `<chops-dialog>` displays a modal/dialog overlay.
+ *
+ * @customElement
+ */
+export class ChopsDialog extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        position: fixed;
+        z-index: 9999;
+        left: 0;
+        top: 0;
+        width: 100%;
+        height: 100%;
+        overflow: auto;
+        background-color: rgba(0,0,0,0.4);
+        display: flex;
+        align-items: center;
+        justify-content: center;
+      }
+      :host(:not([opened])), [hidden] {
+        display: none;
+        visibility: hidden;
+      }
+      :host([closeOnOutsideClick]),
+      :host([closeOnOutsideClick]) .dialog::backdrop {
+        /* TODO(zhangtiff): Deprecate custom backdrop in favor of native
+        * browser backdrop.
+        */
+        cursor: pointer;
+      }
+      .dialog {
+        background: none;
+        border: 0;
+        max-width: 90%;
+      }
+      .dialog-content {
+        /* This extra div is here because otherwise the browser can't
+        * differentiate between a click event that hits the dialog element or
+        * its backdrop pseudoelement.
+        */
+        box-sizing: border-box;
+        background: var(--chops-white);
+        padding: 1em 16px;
+        cursor: default;
+        box-shadow: 0px 3px 20px 0px hsla(0, 0%, 0%, 0.4);
+        width: var(--chops-dialog-width);
+        max-width: var(--chops-dialog-max-width, 100%);
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <dialog class="dialog" role="dialog" @cancel=${this._cancelHandler}>
+        <div class="dialog-content">
+          <slot></slot>
+        </div>
+      </dialog>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      /**
+       * Whether the dialog should currently be displayed or not.
+       */
+      opened: {
+        type: Boolean,
+        reflect: true,
+      },
+      /**
+       * A boolean that determines whether clicking outside of the dialog
+       * window should close it.
+       */
+      closeOnOutsideClick: {
+        type: Boolean,
+      },
+      /**
+       * A function fired when the element tries to change its own opened
+       * state. This is useful if you want the dialog state managed outside
+       * of the dialog instead of with internal state. (ie: with Redux)
+       */
+      onOpenedChange: {
+        type: Object,
+      },
+      /**
+       * When True, disables exiting keys and closing on outside clicks.
+       * Forces the user to interact with the dialog rather than just dismissing
+       * it.
+       */
+      forced: {
+        type: Boolean,
+      },
+      _boundKeydownHandler: {
+        type: Object,
+      },
+      _previousFocusedElement: {
+        type: Object,
+      },
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this.opened = false;
+    this.closeOnOutsideClick = false;
+    this.forced = false;
+    this._boundKeydownHandler = this._keydownHandler.bind(this);
+  }
+
+  /** @override */
+  connectedCallback() {
+    super.connectedCallback();
+
+    this.addEventListener('click', (evt) => {
+      if (!this.opened || !this.closeOnOutsideClick || this.forced) return;
+
+      const hasDialog = evt.composedPath().find(
+          (node) => {
+            return node.classList && node.classList.contains('dialog-content');
+          }
+      );
+      if (hasDialog) return;
+
+      this.close();
+    });
+
+    window.addEventListener('keydown', this._boundKeydownHandler, true);
+  }
+
+  /** @override */
+  disconnectedCallback() {
+    super.disconnectedCallback();
+    window.removeEventListener('keydown', this._boundKeydownHandler,
+        true);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('opened')) {
+      this._openedChanged(this.opened);
+    }
+  }
+
+  _keydownHandler(event) {
+    if (!this.opened) return;
+    if (event.key === 'Escape' && this.forced) {
+      // Stop users from using the Escape key in a forced dialog.
+      e.preventDefault();
+    }
+  }
+
+  /**
+   * Closes the dialog.
+   * May have its logic overridden by a custom onOpenChanged function.
+   */
+  close() {
+    if (this.onOpenedChange) {
+      this.onOpenedChange(false);
+    } else {
+      this.opened = false;
+    }
+  }
+
+  /**
+   * Opens the dialog.
+   * May have its logic overridden by a custom onOpenChanged function.
+   */
+  open() {
+    if (this.onOpenedChange) {
+      this.onOpenedChange(true);
+    } else {
+      this.opened = true;
+    }
+  }
+
+  /**
+   * Switches the dialog from open to closed or vice versa.
+   */
+  toggle() {
+    this.opened = !this.opened;
+  }
+
+  _cancelHandler(evt) {
+    if (!this.forced) {
+      this.close();
+    } else {
+      evt.preventDefault();
+    }
+  }
+
+  _getActiveElement() {
+    // document.activeElement alone isn't sufficient to find the active
+    // element within shadow dom.
+    let active = document.activeElement || document.body;
+    let activeRoot = active.shadowRoot || active.root;
+    while (activeRoot && activeRoot.activeElement) {
+      active = activeRoot.activeElement;
+      activeRoot = active.shadowRoot || active.root;
+    }
+    return active;
+  }
+
+  _openedChanged(opened) {
+    const dialog = this.shadowRoot.querySelector('dialog');
+    if (opened) {
+      // For accessibility, we want to ensure we remember the element that was
+      // focused before this dialog opened.
+      this._previousFocusedElement = this._getActiveElement();
+
+      if (dialog.showModal) {
+        dialog.showModal();
+      } else {
+        dialog.setAttribute('open', 'true');
+      }
+      if (this._previousFocusedElement) {
+        this._previousFocusedElement.blur();
+      }
+    } else {
+      if (dialog.close) {
+        dialog.close();
+      } else {
+        dialog.setAttribute('open', undefined);
+      }
+
+      if (this._previousFocusedElement) {
+        const element = this._previousFocusedElement;
+        requestAnimationFrame(() => {
+          // HACK. This is to prevent a possible accessibility bug where
+          // using a keypress to trigger a button that exits a modal causes
+          // the modal to immediately re-open because the button that
+          // originally opened the modal refocuses, and the keypress
+          // propagates.
+          element.focus();
+        });
+      }
+    }
+  }
+}
+
+customElements.define('chops-dialog', ChopsDialog);
diff --git a/static_src/elements/chops/chops-dialog/chops-dialog.test.js b/static_src/elements/chops/chops-dialog/chops-dialog.test.js
new file mode 100644
index 0000000..376496a
--- /dev/null
+++ b/static_src/elements/chops/chops-dialog/chops-dialog.test.js
@@ -0,0 +1,37 @@
+// Copyright 2019 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.
+
+import {expect, assert} from 'chai';
+import {ChopsDialog} from './chops-dialog.js';
+
+let element;
+
+describe('chops-dialog', () => {
+  beforeEach(() => {
+    element = document.createElement('chops-dialog');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, ChopsDialog);
+  });
+
+  it('chops-dialog is visible when open', async () => {
+    element.opened = false;
+
+    await element.updateComplete;
+
+    expect(element).not.to.be.visible;
+
+    element.opened = true;
+
+    await element.updateComplete;
+
+    expect(element).to.be.visible;
+  });
+});
diff --git a/static_src/elements/chops/chops-filter-chips/chops-filter-chips.js b/static_src/elements/chops/chops-filter-chips/chops-filter-chips.js
new file mode 100644
index 0000000..3bcc0c6
--- /dev/null
+++ b/static_src/elements/chops/chops-filter-chips/chops-filter-chips.js
@@ -0,0 +1,70 @@
+// Copyright 2020 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.
+
+import {LitElement, html, css} from 'lit-element';
+import 'elements/chops/chops-chip/chops-chip.js';
+
+/**
+ * `<chops-filter-chips>` displays a set of filter chips.
+ * https://material.io/components/chips/#filter-chips
+ */
+export class ChopsFilterChips extends LitElement {
+  /** @override */
+  static get properties() {
+    return {
+      options: {type: Array},
+      selected: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    /** @type {Array<string>} */
+    this.options = [];
+    /** @type {Object<string, boolean>} */
+    this.selected = {};
+  }
+
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: inline-flex;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`${this.options.map((option) => this._renderChip(option))}`;
+  }
+
+  /**
+   * Render a single chip.
+   * @param {string} option The text on the chip.
+   * @return {TemplateResult}
+   */
+  _renderChip(option) {
+    return html`
+      <chops-chip
+          @click=${this.select.bind(this, option)}
+          class=${this.selected[option] ? 'selected' : ''}
+          .thumbnail=${this.selected[option] ? 'check' : ''}>
+        ${option}
+      </chops-chip>
+    `;
+  }
+
+  /**
+   * Selects or unselects an option.
+   * @param {string} option The option to select or unselect.
+   * @fires Event#change
+   */
+  select(option) {
+    this.selected = {...this.selected, [option]: !this.selected[option]};
+    this.dispatchEvent(new Event('change'));
+  }
+}
+customElements.define('chops-filter-chips', ChopsFilterChips);
diff --git a/static_src/elements/chops/chops-filter-chips/chops-filter-chips.test.js b/static_src/elements/chops/chops-filter-chips/chops-filter-chips.test.js
new file mode 100644
index 0000000..3fd2671
--- /dev/null
+++ b/static_src/elements/chops/chops-filter-chips/chops-filter-chips.test.js
@@ -0,0 +1,58 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {ChopsFilterChips} from './chops-filter-chips.js';
+
+/** @type {ChopsFilterChips} */
+let element;
+
+describe('chops-filter-chips', () => {
+  beforeEach(() => {
+    // @ts-ignore
+    element = document.createElement('chops-filter-chips');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, ChopsFilterChips);
+  });
+
+  it('renders', async () => {
+    element.options = ['one', 'two'];
+    element.selected = {two: true};
+    await element.updateComplete;
+
+    const firstChip = element.shadowRoot.firstElementChild;
+    assert.deepEqual(firstChip.className, '');
+    assert.deepEqual(firstChip.thumbnail, '');
+
+    const lastChip = element.shadowRoot.lastElementChild;
+    assert.deepEqual(lastChip.className, 'selected');
+    assert.deepEqual(lastChip.thumbnail, 'check');
+  });
+
+  it('click', async () => {
+    const onChangeStub = sinon.stub();
+
+    element.options = ['one'];
+    await element.updateComplete;
+
+    element.addEventListener('change', onChangeStub);
+    element.shadowRoot.firstElementChild.click();
+
+    assert.isTrue(element.selected.one);
+    sinon.assert.calledOnce(onChangeStub);
+
+    element.shadowRoot.firstElementChild.click();
+
+    assert.isFalse(element.selected.one);
+    sinon.assert.calledTwice(onChangeStub);
+  });
+});
diff --git a/static_src/elements/chops/chops-snackbar/chops-snackbar.js b/static_src/elements/chops/chops-snackbar/chops-snackbar.js
new file mode 100644
index 0000000..aea71b8
--- /dev/null
+++ b/static_src/elements/chops/chops-snackbar/chops-snackbar.js
@@ -0,0 +1,63 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+
+/**
+ * `<chops-snackbar>`
+ *
+ * A container for showing messages in a snackbar.
+ *
+ */
+export class ChopsSnackbar extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        align-items: center;
+        background-color: #333;
+        border-radius: 6px;
+        bottom: 1em;
+        left: 1em;
+        color: hsla(0, 0%, 100%, .87);
+        display: flex;
+        font-size: var(--chops-large-font-size);
+        padding: 16px;
+        position: fixed;
+        z-index: 1000;
+      }
+      button {
+        background: none;
+        border: none;
+        color: inherit;
+        cursor: pointer;
+        margin: 0;
+        margin-left: 8px;
+        padding: 0;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <slot></slot>
+      <button @click=${this.close}>
+        <i class="material-icons">close</i>
+      </button>
+    `;
+  }
+
+  /**
+   * Closes the snackbar.
+   * @fires CustomEvent#close
+   */
+  close() {
+    this.dispatchEvent(new CustomEvent('close'));
+  }
+}
+
+customElements.define('chops-snackbar', ChopsSnackbar);
diff --git a/static_src/elements/chops/chops-snackbar/chops-snackbar.test.js b/static_src/elements/chops/chops-snackbar/chops-snackbar.test.js
new file mode 100644
index 0000000..fa45d68
--- /dev/null
+++ b/static_src/elements/chops/chops-snackbar/chops-snackbar.test.js
@@ -0,0 +1,36 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {ChopsSnackbar} from './chops-snackbar.js';
+
+let element;
+
+describe('chops-snackbar', () => {
+  beforeEach(() => {
+    element = document.createElement('chops-snackbar');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, ChopsSnackbar);
+  });
+
+  it('dispatches close event on close click', async () => {
+    element.opened = true;
+    await element.updateComplete;
+
+    const listener = sinon.stub();
+    element.addEventListener('close', listener);
+
+    element.shadowRoot.querySelector('button').click();
+
+    sinon.assert.calledOnce(listener);
+  });
+});
diff --git a/static_src/elements/chops/chops-timestamp/chops-timestamp-helpers.js b/static_src/elements/chops/chops-timestamp/chops-timestamp-helpers.js
new file mode 100644
index 0000000..2fa1dc2
--- /dev/null
+++ b/static_src/elements/chops/chops-timestamp/chops-timestamp-helpers.js
@@ -0,0 +1,109 @@
+// Copyright 2019 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.
+
+const DEFAULT_DATE_LOCALE = 'en-US';
+
+// Creating the datetime formatter costs ~1.5 ms, so when formatting
+// multiple timestamps, it's more performant to reuse the formatter object.
+// Export FORMATTER and SHORT_FORMATTER for testing. The return value differs
+// based on time zone and browser, so we can't use static strings for testing.
+// We can't stub out the method because it's native code and can't be modified.
+// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/format#Avoid_comparing_formatted_date_values_to_static_values
+export const FORMATTER = new Intl.DateTimeFormat(DEFAULT_DATE_LOCALE, {
+  weekday: 'short',
+  year: 'numeric',
+  month: 'short',
+  day: 'numeric',
+  hour: 'numeric',
+  minute: '2-digit',
+  timeZoneName: 'short',
+});
+
+export const SHORT_FORMATTER = new Intl.DateTimeFormat(DEFAULT_DATE_LOCALE, {
+  year: 'numeric',
+  month: 'short',
+  day: 'numeric',
+});
+
+export const MS_PER_MINUTE = 60 * 1000;
+export const MS_PER_HOUR = MS_PER_MINUTE * 60;
+export const MS_PER_DAY = MS_PER_HOUR * 24;
+export const MS_PER_MONTH = MS_PER_DAY * 30;
+
+/**
+ * Helper to determine if a Date was less than a month ago.
+ * @param {Date} date The date to check.
+ * @return {boolean} Whether the date was less than a
+ *   month ago.
+ */
+function isLessThanAMonthAgo(date) {
+  const now = new Date();
+  const msDiff = Math.abs(Math.floor((now.getTime() - date.getTime())));
+  return msDiff < MS_PER_MONTH;
+}
+
+/**
+ * Displays timestamp in a standardized format to be re-used.
+ * @param {Date} date
+ * @return {string}
+ */
+export function standardTime(date) {
+  if (!date) return;
+  const absoluteTime = FORMATTER.format(date);
+
+  let timeAgoBit = '';
+  if (isLessThanAMonthAgo(date)) {
+    // Only show relative time if the time is less than a
+    // month ago because otherwise, it's not as useful.
+    timeAgoBit = ` (${relativeTime(date)})`;
+  }
+  return `${absoluteTime}${timeAgoBit}`;
+}
+
+/**
+ * Displays a timestamp in a format that's easy for a human to immediately
+ * reason about, based on long ago the time was.
+ * @param {Date} date native JavaScript Data Object.
+ * @return {string} Human-readable string of the date.
+ */
+export function relativeTime(date) {
+  if (!date) return;
+
+  const now = new Date();
+  let msDiff = now.getTime() - date.getTime();
+
+  // Use different wording depending on whether the time is in the
+  // future or past.
+  const pastOrPresentSuffix = msDiff < 0 ? 'from now' : 'ago';
+  msDiff = Math.abs(msDiff);
+
+  if (msDiff < MS_PER_MINUTE) {
+    // Less than a minute.
+    return 'just now';
+  } else if (msDiff < MS_PER_HOUR) {
+    // Less than an hour.
+    const minutes = Math.floor(msDiff / MS_PER_MINUTE);
+    if (minutes === 1) {
+      return `a minute ${pastOrPresentSuffix}`;
+    }
+    return `${minutes} minutes ${pastOrPresentSuffix}`;
+  } else if (msDiff < MS_PER_DAY) {
+    // Less than an day.
+    const hours = Math.floor(msDiff / MS_PER_HOUR);
+    if (hours === 1) {
+      return `an hour ${pastOrPresentSuffix}`;
+    }
+    return `${hours} hours ${pastOrPresentSuffix}`;
+  } else if (msDiff < MS_PER_MONTH) {
+    // Less than a month.
+    const days = Math.floor(msDiff / MS_PER_DAY);
+    if (days === 1) {
+      return `a day ${pastOrPresentSuffix}`;
+    }
+    return `${days} days ${pastOrPresentSuffix}`;
+  }
+
+  // A month or more ago. Better to show an exact date at this point.
+  return SHORT_FORMATTER.format(date);
+}
diff --git a/static_src/elements/chops/chops-timestamp/chops-timestamp-helpers.test.js b/static_src/elements/chops/chops-timestamp/chops-timestamp-helpers.test.js
new file mode 100644
index 0000000..5fe344b
--- /dev/null
+++ b/static_src/elements/chops/chops-timestamp/chops-timestamp-helpers.test.js
@@ -0,0 +1,112 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {FORMATTER, MS_PER_MONTH, standardTime,
+  relativeTime} from './chops-timestamp-helpers.js';
+import sinon from 'sinon';
+
+// The formatted date strings differ based on time zone and browser, so we can't
+// use static strings for testing. We can't stub out the format method because
+// it's native code and can't be modified. So just use the FORMATTER object.
+
+let clock;
+
+describe('chops-timestamp-helpers', () => {
+  beforeEach(() => {
+    // Set clock to the Epoch.
+    clock = sinon.useFakeTimers({
+      now: new Date(0),
+      shouldAdvanceTime: false,
+    });
+  });
+
+  afterEach(() => {
+    clock.restore();
+  });
+
+  describe('standardTime', () => {
+    it('shows relative timestamp when less than a month ago', () => {
+      const date = new Date();
+      assert.equal(standardTime(date), `${FORMATTER.format(date)} (just now)`);
+    });
+
+    it('no relative time when more than a month in the future', () => {
+      const date = new Date(1548808276 * 1000);
+      assert.equal(standardTime(date), 'Tue, Jan 29, 2019, 4:31 PM PST');
+    });
+
+    it('no relative time when more than a month in the past', () => {
+      // Jan 29, 2019, 4:31 PM PST
+      const now = 1548808276 * 1000;
+      clock.tick(now);
+
+      const date = new Date(now - MS_PER_MONTH);
+      assert.equal(standardTime(date), 'Sun, Dec 30, 2018, 4:31 PM PST');
+    });
+  });
+
+  it('relativeTime future', () => {
+    assert.equal(relativeTime(new Date()), `just now`);
+
+    assert.equal(relativeTime(new Date(59 * 1000)), `just now`);
+
+    assert.equal(relativeTime(new Date(60 * 1000)), `a minute from now`);
+    assert.equal(relativeTime(new Date(2 * 60 * 1000)),
+        `2 minutes from now`);
+    assert.equal(relativeTime(new Date(59 * 60 * 1000)),
+        `59 minutes from now`);
+
+    assert.equal(relativeTime(new Date(60 * 60 * 1000)), `an hour from now`);
+    assert.equal(relativeTime(new Date(2 * 60 * 60 * 1000)),
+        `2 hours from now`);
+    assert.equal(relativeTime(new Date(23 * 60 * 60 * 1000)),
+        `23 hours from now`);
+
+    assert.equal(relativeTime(new Date(24 * 60 * 60 * 1000)),
+        `a day from now`);
+    assert.equal(relativeTime(new Date(2 * 24 * 60 * 60 * 1000)),
+        `2 days from now`);
+    assert.equal(relativeTime(new Date(29 * 24 * 60 * 60 * 1000)),
+        `29 days from now`);
+
+    assert.equal(relativeTime(new Date(30 * 24 * 60 * 60 * 1000)),
+        'Jan 30, 1970');
+  });
+
+  it('relativeTime past', () => {
+    const baseTime = 234234 * 1000;
+
+    clock.tick(baseTime);
+
+    assert.equal(relativeTime(new Date()), `just now`);
+
+    assert.equal(relativeTime(new Date(baseTime - 59 * 1000)),
+        `just now`);
+
+    assert.equal(relativeTime(new Date(baseTime - 60 * 1000)),
+        `a minute ago`);
+    assert.equal(relativeTime(new Date(baseTime - 2 * 60 * 1000)),
+        `2 minutes ago`);
+    assert.equal(relativeTime(new Date(baseTime - 59 * 60 * 1000)),
+        `59 minutes ago`);
+
+    assert.equal(relativeTime(new Date(baseTime - 60 * 60 * 1000)),
+        `an hour ago`);
+    assert.equal(relativeTime(new Date(baseTime - 2 * 60 * 60 * 1000)),
+        `2 hours ago`);
+    assert.equal(relativeTime(new Date(baseTime - 23 * 60 * 60 * 1000)),
+        `23 hours ago`);
+
+    assert.equal(relativeTime(new Date(
+        baseTime - 24 * 60 * 60 * 1000)), `a day ago`);
+    assert.equal(relativeTime(new Date(
+        baseTime - 2 * 24 * 60 * 60 * 1000)), `2 days ago`);
+    assert.equal(relativeTime(new Date(
+        baseTime - 29 * 24 * 60 * 60 * 1000)), `29 days ago`);
+
+    assert.equal(relativeTime(new Date(
+        baseTime - 30 * 24 * 60 * 60 * 1000)), 'Dec 4, 1969');
+  });
+});
diff --git a/static_src/elements/chops/chops-timestamp/chops-timestamp.js b/static_src/elements/chops/chops-timestamp/chops-timestamp.js
new file mode 100644
index 0000000..b7f157f
--- /dev/null
+++ b/static_src/elements/chops/chops-timestamp/chops-timestamp.js
@@ -0,0 +1,93 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+
+import {standardTime, relativeTime} from './chops-timestamp-helpers.js';
+
+/**
+ * `<chops-timestamp>`
+ *
+ * This element shows a time in a human readable form.
+ *
+ * @customElement
+ */
+export class ChopsTimestamp extends LitElement {
+  /** @override */
+  render() {
+    return html`
+      ${this._displayedTime}
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      /** The data for the time which can be in any format readable by
+       *  Date.parse.
+       */
+      timestamp: {type: String},
+      /** When true, a shorter version of the date will be displayed. */
+      short: {type: Boolean},
+      /**
+       * The Date object, which is stored in UTC, to be converted to a string.
+      */
+      _date: {type: Object},
+    };
+  }
+
+  /**
+   * @return {string} Human-readable timestamp.
+   */
+  get _displayedTime() {
+    const date = this._date;
+    const short = this.short;
+    // TODO(zhangtiff): Add logic to dynamically re-compute relative time
+    //   based on set intervals.
+    if (!date) return;
+    if (short) {
+      return relativeTime(date);
+    }
+    return standardTime(date);
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('timestamp')) {
+      this._date = this._parseTimestamp(this.timestamp);
+      this.setAttribute('title', standardTime(this._date));
+    }
+    super.update(changedProperties);
+  }
+
+  /**
+   * Turns a timestamp string into a native JavaScript Date Object.
+   * @param {string} timestamp Timestamp string in either an ISO format or
+   *   Unix timestamp format. If Unix time, the function expects the time in
+   *   seconds, not milliseconds.
+   * @return {Date}
+   */
+  _parseTimestamp(timestamp) {
+    if (!timestamp) return;
+
+    let unixTimeMs = 0;
+    // Make sure to do Date.parse before Number.parseInt because parseInt
+    // will parse numbers within a string.
+    if (/^\d+$/.test(timestamp)) {
+      // Check if a string contains only digits before guessing it's
+      // unix time. This is necessary because Number.parseInt will parse
+      // number strings that contain non-numbers.
+      unixTimeMs = Number.parseInt(timestamp) * 1000;
+    } else {
+      // Date.parse will parse strings with only numbers as though those
+      // strings were truncated ISO formatted strings.
+      unixTimeMs = Date.parse(timestamp);
+      if (Number.isNaN(unixTimeMs)) {
+        throw new Error('Timestamp is in an invalid format.');
+      }
+    }
+    return new Date(unixTimeMs);
+  }
+}
+customElements.define('chops-timestamp', ChopsTimestamp);
diff --git a/static_src/elements/chops/chops-timestamp/chops-timestamp.test.js b/static_src/elements/chops/chops-timestamp/chops-timestamp.test.js
new file mode 100644
index 0000000..21c227d
--- /dev/null
+++ b/static_src/elements/chops/chops-timestamp/chops-timestamp.test.js
@@ -0,0 +1,88 @@
+// Copyright 2019 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.
+
+import {assert, expect} from 'chai';
+import {ChopsTimestamp} from './chops-timestamp.js';
+import {FORMATTER, SHORT_FORMATTER} from './chops-timestamp-helpers.js';
+import sinon from 'sinon';
+
+// The formatted date strings differ based on time zone and browser, so we can't
+// use static strings for testing. We can't stub out the format method because
+// it's native code and can't be modified. So just use the FORMATTER object.
+
+let element;
+let clock;
+
+describe('chops-timestamp', () => {
+  beforeEach(() => {
+    element = document.createElement('chops-timestamp');
+    document.body.appendChild(element);
+
+    // Set clock to the Epoch.
+    clock = sinon.useFakeTimers({
+      now: new Date(0),
+      shouldAdvanceTime: false,
+    });
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+    clock.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, ChopsTimestamp);
+  });
+
+  it('changing timestamp changes date', async () => {
+    const timestamp = 1548808276;
+    element.timestamp = String(timestamp);
+
+    await element.updateComplete;
+
+    assert.include(element.shadowRoot.textContent,
+        FORMATTER.format(new Date(timestamp * 1000)));
+  });
+
+  it('parses ISO dates', async () => {
+    const timestamp = '2016-11-11';
+    element.timestamp = timestamp;
+
+    await element.updateComplete;
+
+    assert.include(element.shadowRoot.textContent,
+        FORMATTER.format(new Date(timestamp)));
+  });
+
+  it('invalid timestamp format', () => {
+    expect(() => {
+      element._parseTimestamp('random string');
+    }).to.throw('Timestamp is in an invalid format.');
+  });
+
+  it('short time renders shorter time', async () => {
+    element.short = true;
+    element.timestamp = '5';
+
+    await element.updateComplete;
+
+    assert.include(element.shadowRoot.textContent,
+        `just now`);
+
+    element.timestamp = '60';
+
+    await element.updateComplete;
+
+    assert.include(element.shadowRoot.textContent,
+        `a minute from now`);
+
+    const timestamp = 1548808276;
+    element.timestamp = String(timestamp);
+
+    await element.updateComplete;
+
+    assert.include(element.shadowRoot.textContent,
+        SHORT_FORMATTER.format(timestamp * 1000));
+  });
+});
diff --git a/static_src/elements/chops/chops-toggle/chops-toggle.js b/static_src/elements/chops/chops-toggle/chops-toggle.js
new file mode 100644
index 0000000..52868bd
--- /dev/null
+++ b/static_src/elements/chops/chops-toggle/chops-toggle.js
@@ -0,0 +1,124 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+/**
+ * `<chops-toggle>`
+ *
+ * A toggle button component. This component is primarily a wrapper
+ * around a native checkbox to allow easy sharing of styles.
+ *
+ */
+export class ChopsToggle extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        --chops-toggle-bg: none;
+        --chops-toggle-color: var(--chops-primary-font-color);
+        --chops-toggle-hover-bg: rgba(0, 0, 0, 0.3);
+        --chops-toggle-focus-border: hsl(193, 82%, 63%);
+        --chops-toggle-checked-bg: rgba(0, 0, 0, 0.6);
+        --chops-toggle-checked-color: var(--chops-white);
+      }
+      label {
+        background: var(--chops-toggle-bg);
+        color: var(--chops-toggle-color);
+        cursor: pointer;
+        align-items: center;
+        padding: 2px 4px;
+        border: var(--chops-normal-border);
+        border-radius: var(--chops-button-radius);
+      }
+      input[type="checkbox"] {
+        /* We need the checkbox to be hidden but still accessible. */
+        opacity: 0;
+        width: 0;
+        height: 0;
+        position: absolute;
+        top: -9999;
+        left: -9999;
+      }
+      input[type="checkbox"]:focus + label {
+        /* Make sure an outline shows around this element for
+        * accessibility.
+        */
+        box-shadow: 0 0 5px 1px var(--chops-toggle-focus-border);
+      }
+      input[type="checkbox"]:hover + label {
+        background: var(--chops-toggle-hover-bg);
+      }
+      input[type="checkbox"]:checked + label {
+        background: var(--chops-toggle-checked-bg);
+        color: var(--chops-toggle-checked-color);
+      }
+      input[type="checkbox"]:disabled + label {
+        opacity: 0.8;
+        cursor: default;
+        pointer-events: none;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <input id="checkbox"
+        type="checkbox"
+        ?checked=${this.checked}
+        ?disabled=${this.disabled}
+        @change=${this._checkedChangeHandler}
+      >
+      <label for="checkbox">
+        <slot></slot>
+      </label>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      /**
+       * Note: At the moment, this component does not manage its own
+       * internal checked state. It expects its checked state to come
+       * from its parent, and its parent is expected to update the
+       * chops-checkbox's checked state on a change event.
+       *
+       * This can be generalized in the future to support multiple
+       * ways of managing checked state if needed.
+       **/
+      checked: {type: Boolean},
+      /**
+       * Whether the element currently allows checking or not.
+       */
+      disabled: {type: Boolean},
+    };
+  }
+
+  click() {
+    super.click();
+    this.shadowRoot.querySelector('#checkbox').click();
+  }
+
+  _checkedChangeHandler(evt) {
+    this._checkedChange(evt.target.checked);
+  }
+
+  /**
+   * @param {boolean} checked
+   * @fires CustomEvent#checked-change
+   * @private
+   */
+  _checkedChange(checked) {
+    if (checked === this.checked) return;
+    const customEvent = new CustomEvent('checked-change', {
+      detail: {
+        checked: checked,
+      },
+    });
+    this.dispatchEvent(customEvent);
+  }
+}
+customElements.define('chops-toggle', ChopsToggle);
diff --git a/static_src/elements/chops/chops-toggle/chops-toggle.test.js b/static_src/elements/chops/chops-toggle/chops-toggle.test.js
new file mode 100644
index 0000000..423c993
--- /dev/null
+++ b/static_src/elements/chops/chops-toggle/chops-toggle.test.js
@@ -0,0 +1,45 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {ChopsToggle} from './chops-toggle.js';
+
+let element;
+
+describe('chops-toggle', () => {
+  beforeEach(() => {
+    element = document.createElement('chops-toggle');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, ChopsToggle);
+  });
+
+  it('clicking toggle dispatches checked-change event', async () => {
+    element.checked = false;
+    sinon.stub(window, 'CustomEvent');
+    sinon.stub(element, 'dispatchEvent');
+
+    await element.updateComplete;
+
+    element.click();
+
+    assert.deepEqual(window.CustomEvent.args[0][0], 'checked-change');
+    assert.deepEqual(window.CustomEvent.args[0][1], {
+      detail: {checked: true},
+    });
+
+    assert.isTrue(window.CustomEvent.calledOnce);
+    assert.isTrue(element.dispatchEvent.calledOnce);
+
+    window.CustomEvent.restore();
+    element.dispatchEvent.restore();
+  });
+});
diff --git a/static_src/elements/ezt/ezt-app-base.js b/static_src/elements/ezt/ezt-app-base.js
new file mode 100644
index 0000000..0dc3eae
--- /dev/null
+++ b/static_src/elements/ezt/ezt-app-base.js
@@ -0,0 +1,62 @@
+// Copyright 2019 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.
+
+import {LitElement} from 'lit-element';
+import qs from 'qs';
+import {store, connectStore} from 'reducers/base.js';
+import * as userV0 from 'reducers/userV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as sitewide from 'reducers/sitewide.js';
+
+/**
+ * `<ezt-app-base>`
+ *
+ * Base component meant to simulate a subset of the work mr-app does on
+ * EZT pages in order to allow us to more easily glue web components
+ * on EZT pages to SPA web components.
+ *
+ */
+export class EztAppBase extends connectStore(LitElement) {
+  /** @override */
+  static get properties() {
+    return {
+      projectName: {type: String},
+      userDisplayName: {type: String},
+    };
+  }
+
+  /** @override */
+  connectedCallback() {
+    super.connectedCallback();
+
+    this.mapUrlToQueryParams();
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('userDisplayName') && this.userDisplayName) {
+      this.fetchUserData(this.userDisplayName);
+    }
+
+    if (changedProperties.has('projectName') && this.projectName) {
+      this.fetchProjectData(this.projectName);
+    }
+  }
+
+  fetchUserData(displayName) {
+    store.dispatch(userV0.fetch(displayName));
+  }
+
+  fetchProjectData(projectName) {
+    store.dispatch(projectV0.select(projectName));
+    store.dispatch(projectV0.fetch(projectName));
+  }
+
+  mapUrlToQueryParams() {
+    const params = qs.parse((window.location.search || '').substr(1));
+
+    store.dispatch(sitewide.setQueryParams(params));
+  }
+}
+customElements.define('ezt-app-base', EztAppBase);
diff --git a/static_src/elements/ezt/ezt-app-base.test.js b/static_src/elements/ezt/ezt-app-base.test.js
new file mode 100644
index 0000000..86eb5b1
--- /dev/null
+++ b/static_src/elements/ezt/ezt-app-base.test.js
@@ -0,0 +1,65 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {EztAppBase} from './ezt-app-base.js';
+
+
+let element;
+
+describe('ezt-app-base', () => {
+  beforeEach(() => {
+    element = document.createElement('ezt-app-base');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, EztAppBase);
+  });
+
+  it('fetches user data when userDisplayName set', async () => {
+    sinon.stub(element, 'fetchUserData');
+
+    element.userDisplayName = 'test@example.com';
+
+    await element.updateComplete;
+
+    sinon.assert.calledOnce(element.fetchUserData);
+    sinon.assert.calledWith(element.fetchUserData, 'test@example.com');
+  });
+
+  it('does not fetch data when userDisplayName is empty', async () => {
+    sinon.stub(element, 'fetchUserData');
+    element.userDisplayName = '';
+
+    await element.updateComplete;
+
+    sinon.assert.notCalled(element.fetchUserData);
+  });
+
+  it('fetches project data when projectName set', async () => {
+    sinon.stub(element, 'fetchProjectData');
+
+    element.projectName = 'chromium';
+
+    await element.updateComplete;
+
+    sinon.assert.calledOnce(element.fetchProjectData);
+    sinon.assert.calledWith(element.fetchProjectData, 'chromium');
+  });
+
+  it('does not fetch data when projectName is empty', async () => {
+    sinon.stub(element, 'fetchProjectData');
+    element.projectName = '';
+
+    await element.updateComplete;
+
+    sinon.assert.notCalled(element.fetchProjectData);
+  });
+});
diff --git a/static_src/elements/ezt/ezt-element-package.js b/static_src/elements/ezt/ezt-element-package.js
new file mode 100644
index 0000000..90ffadb
--- /dev/null
+++ b/static_src/elements/ezt/ezt-element-package.js
@@ -0,0 +1,29 @@
+// Copyright 2019 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.
+
+// This file bundles together all web components elements used on the
+// legacy EZT pages. This is to avoid having issues with registering
+// duplicate versions of dependencies.
+
+import page from 'page';
+
+import 'elements/framework/mr-dropdown/mr-account-dropdown.js';
+import 'elements/ezt/mr-bulk-approval-update/mr-bulk-approval-update.js';
+import 'elements/framework/links/mr-user-link/mr-user-link.js';
+import 'elements/chops/chops-timestamp/chops-timestamp.js';
+
+import 'elements/framework/mr-header/mr-header.js';
+import 'elements/issue-list/mr-chart/mr-chart.js';
+import 'elements/issue-detail/mr-flipper/mr-flipper.js';
+import 'elements/framework/mr-pref-toggle/mr-pref-toggle.js';
+import 'elements/ezt/ezt-show-columns-connector.js';
+import 'elements/ezt/ezt-app-base.js';
+
+// Register an empty set of page.js routes to allow the page() navigation
+// function to work.
+// Note: The EZT pages should NOT register the routes used by the SPA pages
+// without significant refactoring because doing so will lead to unexpected
+// routing behavior where the SPA is loaded on top of a server-rendered page
+// rather than instead of.
+page();
diff --git a/static_src/elements/ezt/ezt-footer-scripts-package.js b/static_src/elements/ezt/ezt-footer-scripts-package.js
new file mode 100644
index 0000000..85eeaa0
--- /dev/null
+++ b/static_src/elements/ezt/ezt-footer-scripts-package.js
@@ -0,0 +1,14 @@
+// Copyright 2019 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.
+
+// This file bundles together scripts to be loaded through the legacy
+// EZT footer.
+
+import 'monitoring/client-logger.js';
+import 'monitoring/track-copy.js';
+
+// Allow EZT pages to import AutoRefreshPrpcClient.
+import AutoRefreshPrpcClient from 'prpc.js';
+
+window.AutoRefreshPrpcClient = AutoRefreshPrpcClient;
diff --git a/static_src/elements/ezt/ezt-show-columns-connector.js b/static_src/elements/ezt/ezt-show-columns-connector.js
new file mode 100644
index 0000000..c6b3347
--- /dev/null
+++ b/static_src/elements/ezt/ezt-show-columns-connector.js
@@ -0,0 +1,117 @@
+/**
+ * @fileoverview Description of this file.
+ */
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+import {store, connectStore} from 'reducers/base.js';
+import qs from 'qs';
+import * as sitewide from 'reducers/sitewide.js';
+import 'elements/framework/mr-issue-list/mr-show-columns-dropdown.js';
+import {parseColSpec} from 'shared/issue-fields.js';
+import {equalsIgnoreCase} from 'shared/helpers.js';
+import {DEFAULT_ISSUE_FIELD_LIST} from 'shared/issue-fields.js';
+
+/**
+ * `<ezt-show-columns-connector>`
+ *
+ * Glue component to make "Show columns" dropdown work on EZT.
+ *
+ */
+export class EztShowColumnsConnector extends connectStore(LitElement) {
+  /** @override */
+  render() {
+    return html`
+      <mr-show-columns-dropdown
+        .defaultFields=${DEFAULT_ISSUE_FIELD_LIST}
+        .columns=${this.columns}
+        .phaseNames=${this.phaseNames}
+        .onHideColumn=${(name) => this.onHideColumn(name)}
+        .onShowColumn=${(name) => this.onShowColumn(name)}
+      ></mr-show-columns-dropdown>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      initialColumns: {type: Array},
+      hiddenColumns: {type: Object},
+      queryParams: {type: Object},
+      colspec: {type: String},
+      phasespec: {type: String},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.hiddenColumns = new Set();
+    this.queryParams = {};
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.queryParams = sitewide.queryParams(state);
+  }
+
+  get columns() {
+    return this.initialColumns.filter((_, i) =>
+      !this.hiddenColumns.has(i));
+  }
+
+  get initialColumns() {
+    // EZT will always pass in a colspec.
+    return parseColSpec(this.colspec);
+  }
+
+  get phaseNames() {
+    return parseColSpec(this.phasespec);
+  }
+
+  onHideColumn(colName) {
+    // Custom column hiding logic to avoid reloading the
+    // EZT list page when a user hides a column.
+    const colIndex = this.initialColumns.findIndex(
+        (col) => equalsIgnoreCase(col, colName));
+
+    // Legacy code integration.
+    TKR_toggleColumn('hide_col_' + colIndex);
+
+    this.hiddenColumns.add(colIndex);
+
+    this.reflectColumnsToQueryParams();
+    this.requestUpdate();
+
+    // Don't continue navigation.
+    return false;
+  }
+
+  onShowColumn(colName) {
+    const colIndex = this.initialColumns.findIndex(
+        (col) => equalsIgnoreCase(col, colName));
+    if (colIndex >= 0) {
+      this.hiddenColumns.delete(colIndex);
+      TKR_toggleColumn('hide_col_' + colIndex);
+
+      this.reflectColumnsToQueryParams();
+      this.requestUpdate();
+      return false;
+    }
+    // Reload the page if this column is not part of the initial
+    // table render.
+    return true;
+  }
+
+  reflectColumnsToQueryParams() {
+    this.queryParams.colspec = this.columns.join(' ');
+
+    // Make sure the column changes in the URL.
+    window.history.replaceState({}, '', '?' + qs.stringify(this.queryParams));
+
+    store.dispatch(sitewide.setQueryParams(this.queryParams));
+  }
+}
+customElements.define('ezt-show-columns-connector', EztShowColumnsConnector);
diff --git a/static_src/elements/ezt/ezt-show-columns-connector.test.js b/static_src/elements/ezt/ezt-show-columns-connector.test.js
new file mode 100644
index 0000000..62bd13b
--- /dev/null
+++ b/static_src/elements/ezt/ezt-show-columns-connector.test.js
@@ -0,0 +1,41 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {EztShowColumnsConnector} from './ezt-show-columns-connector.js';
+
+
+let element;
+
+describe('ezt-show-columns-connector', () => {
+  beforeEach(() => {
+    element = document.createElement('ezt-show-columns-connector');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, EztShowColumnsConnector);
+  });
+
+  it('initialColumns parses colspec', () => {
+    element.colspec = 'Summary ID Owner';
+    assert.deepEqual(element.initialColumns, ['Summary', 'ID', 'Owner']);
+  });
+
+  it('filters columns based on column mask', () => {
+    sinon.stub(element, 'initialColumns').get(() => ['ID', 'Summary']);
+    element.hiddenColumns = new Set([1]);
+
+    assert.deepEqual(element.columns, ['ID']);
+  });
+
+  it('phaseNames parses phasespec', () => {
+    element.phasespec = 'stable beta stable-exp';
+    assert.deepEqual(element.phaseNames, ['stable', 'beta', 'stable-exp']);
+  });
+});
diff --git a/static_src/elements/ezt/mr-bulk-approval-update/mr-bulk-approval-update.js b/static_src/elements/ezt/mr-bulk-approval-update/mr-bulk-approval-update.js
new file mode 100644
index 0000000..d9318fc
--- /dev/null
+++ b/static_src/elements/ezt/mr-bulk-approval-update/mr-bulk-approval-update.js
@@ -0,0 +1,283 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+import 'elements/issue-detail/metadata/mr-edit-field/mr-edit-field.js';
+import 'elements/framework/mr-error/mr-error.js';
+import 'react/mr-react-autocomplete.tsx';
+import {prpcClient} from 'prpc-client-instance.js';
+import {EMPTY_FIELD_VALUE} from 'shared/issue-fields.js';
+import {TEXT_TO_STATUS_ENUM} from 'shared/consts/approval.js';
+
+
+export const NO_UPDATES_MESSAGE =
+  'User lacks approver perms for approval in all issues.';
+export const NO_APPROVALS_MESSAGE = 'These issues don\'t have any approvals.';
+
+export class MrBulkApprovalUpdate extends LitElement {
+  /** @override */
+  render() {
+    return html`
+      <style>
+        mr-bulk-approval-update {
+          display: block;
+          margin-top: 30px;
+          position: relative;
+        }
+        button.clickable-text {
+          background: none;
+          border: 0;
+          color: hsl(0, 0%, 39%);
+          cursor: pointer;
+          text-decoration: underline;
+        }
+        .hidden {
+          display: none; !important;
+        }
+        .message {
+          background-color: beige;
+          width: 500px;
+        }
+        .note {
+          color: hsl(0, 0%, 25%);
+          font-size: 0.85em;
+          font-style: italic;
+        }
+        mr-bulk-approval-update table {
+          border: 1px dotted black;
+          cellspacing: 0;
+          cellpadding: 3;
+        }
+        #approversInput {
+          border-style: none;
+        }
+      </style>
+      <button
+        class="js-showApprovals clickable-text"
+        ?hidden=${this.approvalsFetched}
+        @click=${this.fetchApprovals}
+      >Show Approvals</button>
+      ${this.approvals.length ? html`
+        <form>
+          <table>
+            <tbody><tr>
+              <th><label for="approvalSelect">Approval:</label></th>
+              <td>
+                <select
+                  id="approvalSelect"
+                  @change=${this._changeHandlers.approval}
+                >
+                  ${this.approvals.map(({fieldRef}) => html`
+                    <option
+                      value=${fieldRef.fieldName}
+                      .selected=${fieldRef.fieldName === this._values.approval}
+                    >
+                      ${fieldRef.fieldName}
+                    </option>
+                  `)}
+                </select>
+              </td>
+            </tr>
+            <tr>
+              <th><label for="approversInput">Approvers:</label></th>
+              <td>
+                <mr-react-autocomplete
+                  label="approversInput"
+                  vocabularyName="member"
+                  .multiple=${true}
+                  .value=${this._values.approvers}
+                  .onChange=${this._changeHandlers.approvers}
+                ></mr-react-autocomplete>
+              </td>
+            </tr>
+            <tr><th><label for="statusInput">Status:</label></th>
+              <td>
+                <select
+                  id="statusInput"
+                  @change=${this._changeHandlers.status}
+                >
+                  <option .selected=${!this._values.status}>
+                    ${EMPTY_FIELD_VALUE}
+                  </option>
+                  ${this.statusOptions.map((status) => html`
+                    <option
+                      value=${status}
+                      .selected=${status === this._values.status}
+                    >${status}</option>
+                  `)}
+                </select>
+              </td>
+            </tr>
+            <tr>
+              <th><label for="commentText">Comment:</label></th>
+              <td colspan="4">
+                <textarea
+                  cols="30"
+                  rows="3"
+                  id="commentText"
+                  placeholder="Add an approval comment"
+                  .value=${this._values.comment || ''}
+                  @change=${this._changeHandlers.comment}
+                ></textarea>
+              </td>
+            </tr>
+            <tr>
+              <td>
+                <button
+                  class="js-save"
+                  @click=${this.save}
+                >Update Approvals only</button>
+              </td>
+              <td>
+                <span class="note">
+                 Note: Some approvals may not be updated if you lack
+                 approver perms.
+                </span>
+              </td>
+            </tr>
+          </tbody></table>
+        </form>
+      `: ''}
+      <div class="message">
+        ${this.responseMessage}
+        ${this.errorMessage ? html`
+          <mr-error>${this.errorMessage}</mr-error>
+        ` : ''}
+      </div>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      approvals: {type: Array},
+      approvalsFetched: {type: Boolean},
+      statusOptions: {type: Array},
+      localIdsStr: {type: String},
+      projectName: {type: String},
+      responseMessage: {type: String},
+      _values: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.approvals = [];
+    this.statusOptions = Object.keys(TEXT_TO_STATUS_ENUM);
+    this.responseMessage = '';
+
+    this._values = {};
+    this._changeHandlers = {
+      approval: this._onChange.bind(this, 'approval'),
+      approvers: this._onChange.bind(this, 'approvers'),
+      status: this._onChange.bind(this, 'status'),
+      comment: this._onChange.bind(this, 'comment'),
+    };
+  }
+
+  /** @override */
+  createRenderRoot() {
+    return this;
+  }
+
+  get issueRefs() {
+    const {projectName, localIdsStr} = this;
+    if (!projectName || !localIdsStr) return [];
+    const issueRefs = [];
+    const localIds = localIdsStr.split(',');
+    localIds.forEach((localId) => {
+      issueRefs.push({projectName: projectName, localId: localId});
+    });
+    return issueRefs;
+  }
+
+  fetchApprovals(evt) {
+    const message = {issueRefs: this.issueRefs};
+    prpcClient.call('monorail.Issues', 'ListApplicableFieldDefs', message).then(
+        (resp) => {
+          if (resp.fieldDefs) {
+            this.approvals = resp.fieldDefs.filter((fieldDef) => {
+              return fieldDef.fieldRef.type == 'APPROVAL_TYPE';
+            });
+          }
+          if (!this.approvals.length) {
+            this.errorMessage = NO_APPROVALS_MESSAGE;
+          }
+          this.approvalsFetched = true;
+        }, (error) => {
+          this.approvalsFetched = true;
+          this.errorMessage = error;
+        });
+  }
+
+  save(evt) {
+    this.responseMessage = '';
+    this.errorMessage = '';
+    this.toggleDisableForm();
+    const selectedFieldDef = this.approvals.find(
+        (approval) => approval.fieldRef.fieldName === this._values.approval
+    ) || this.approvals[0];
+    const message = {
+      issueRefs: this.issueRefs,
+      fieldRef: selectedFieldDef.fieldRef,
+      send_email: true,
+    };
+    message.commentContent = this._values.comment;
+    const delta = {};
+    if (this._values.status !== EMPTY_FIELD_VALUE) {
+      delta.status = TEXT_TO_STATUS_ENUM[this._values.status];
+    }
+    const approversAdded = this._values.approvers;
+    if (approversAdded) {
+      delta.approverRefsAdd = approversAdded.map(
+          (name) => ({'displayName': name}));
+    }
+    if (Object.keys(delta).length) {
+      message.approvalDelta = delta;
+    }
+    prpcClient.call('monorail.Issues', 'BulkUpdateApprovals', message).then(
+        (resp) => {
+          if (resp.issueRefs && resp.issueRefs.length) {
+            const idsStr = Array.from(resp.issueRefs,
+                (ref) => ref.localId).join(', ');
+            this.responseMessage = `${this.getTimeStamp()}: Updated ${
+              selectedFieldDef.fieldRef.fieldName} in issues: ${idsStr} (${
+              resp.issueRefs.length} of ${this.issueRefs.length}).`;
+            this._values = {};
+          } else {
+            this.errorMessage = NO_UPDATES_MESSAGE;
+          };
+          this.toggleDisableForm();
+        }, (error) => {
+          this.errorMessage = error;
+          this.toggleDisableForm();
+        });
+  }
+
+  getTimeStamp() {
+    const date = new Date();
+    return `${date.getHours()}:${date.getMinutes()}:${date.getSeconds()}`;
+  }
+
+  toggleDisableForm() {
+    this.querySelectorAll('input, textarea, select, button').forEach(
+        (input) => {
+          input.disabled = !input.disabled;
+        });
+  }
+
+  /**
+   * Generic onChange handler to be bound to each form field.
+   * @param {string} key Unique name for the form field we're binding this
+   *   handler to. For example, 'owner', 'cc', or the name of a custom field.
+   * @param {Event | React.SyntheticEvent} event
+   * @param {string} value The new form value.
+   */
+  _onChange(key, event, value) {
+    this._values = {...this._values, [key]: value || event.target.value};
+  }
+}
+
+customElements.define('mr-bulk-approval-update', MrBulkApprovalUpdate);
diff --git a/static_src/elements/ezt/mr-bulk-approval-update/mr-bulk-approval-update.test.js b/static_src/elements/ezt/mr-bulk-approval-update/mr-bulk-approval-update.test.js
new file mode 100644
index 0000000..a0689e1
--- /dev/null
+++ b/static_src/elements/ezt/mr-bulk-approval-update/mr-bulk-approval-update.test.js
@@ -0,0 +1,185 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {fireEvent} from '@testing-library/react';
+
+import {MrBulkApprovalUpdate, NO_APPROVALS_MESSAGE,
+  NO_UPDATES_MESSAGE} from './mr-bulk-approval-update.js';
+import {prpcClient} from 'prpc-client-instance.js';
+
+let element;
+
+describe('mr-bulk-approval-update', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-bulk-approval-update');
+    document.body.appendChild(element);
+
+    sinon.stub(prpcClient, 'call');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+    prpcClient.call.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrBulkApprovalUpdate);
+  });
+
+  it('_computeIssueRefs: missing information', () => {
+    element.projectName = 'chromium';
+    assert.equal(element.issueRefs.length, 0);
+
+    element.projectName = null;
+    element.localIdsStr = '1,2,3,5';
+    assert.equal(element.issueRefs.length, 0);
+
+    element.localIdsStr = null;
+    assert.equal(element.issueRefs.length, 0);
+  });
+
+  it('_computeIssueRefs: normal', () => {
+    const project = 'chromium';
+    element.projectName = project;
+    element.localIdsStr = '1,2,3';
+    assert.deepEqual(element.issueRefs, [
+      {projectName: project, localId: '1'},
+      {projectName: project, localId: '2'},
+      {projectName: project, localId: '3'},
+    ]);
+  });
+
+  it('fetchApprovals: applicable fields exist', async () => {
+    const responseFieldDefs = [
+      {fieldRef: {type: 'INT_TYPE'}},
+      {fieldRef: {type: 'APPROVAL_TYPE'}},
+      {fieldRef: {type: 'APPROVAL_TYPE'}},
+    ];
+    const promise = Promise.resolve({fieldDefs: responseFieldDefs});
+    prpcClient.call.returns(promise);
+
+    sinon.spy(element, 'fetchApprovals');
+
+    await element.updateComplete;
+
+    element.querySelector('.js-showApprovals').click();
+    assert.isTrue(element.fetchApprovals.calledOnce);
+
+    // Wait for promise in fetchApprovals to resolve.
+    await promise;
+
+    assert.deepEqual([
+      {fieldRef: {type: 'APPROVAL_TYPE'}},
+      {fieldRef: {type: 'APPROVAL_TYPE'}},
+    ], element.approvals);
+    assert.equal(null, element.errorMessage);
+  });
+
+  it('fetchApprovals: applicable fields dont exist', async () => {
+    const promise = Promise.resolve({fieldDefs: []});
+    prpcClient.call.returns(promise);
+
+    await element.updateComplete;
+
+    element.querySelector('.js-showApprovals').click();
+
+    await promise;
+
+    assert.equal(element.approvals.length, 0);
+    assert.equal(NO_APPROVALS_MESSAGE, element.errorMessage);
+  });
+
+  it('save: normal', async () => {
+    const promise =
+      Promise.resolve({issueRefs: [{localId: '1'}, {localId: '3'}]});
+    prpcClient.call.returns(promise);
+    const fieldDefs = [
+      {fieldRef: {fieldName: 'Approval-One', type: 'APPROVAL_TYPE'}},
+      {fieldRef: {fieldName: 'Approval-Two', type: 'APPROVAL_TYPE'}},
+    ];
+    element.approvals = fieldDefs;
+    element.projectName = 'chromium';
+    element.localIdsStr = '1,2,3';
+
+    await element.updateComplete;
+
+    fireEvent.change(element.querySelector('#commentText'), {target: {value: 'comment'}});
+    fireEvent.change(element.querySelector('#statusInput'), {target: {value: 'NotApproved'}});
+    element.querySelector('.js-save').click();
+
+    // Wait for promise in save() to resolve.
+    await promise;
+    await element.updateComplete;
+
+    // Assert messages correct
+    assert.equal(
+        true,
+        element.responseMessage.includes(
+            'Updated Approval-One in issues: 1, 3 (2 of 3).'));
+    assert.equal('', element.errorMessage);
+
+    // Assert all inputs not disabled.
+    element.querySelectorAll('input, textarea, select').forEach((input) => {
+      assert.equal(input.disabled, false);
+    });
+
+    // Assert all inputs cleared.
+    element.querySelectorAll('input, textarea').forEach((input) => {
+      assert.equal(input.value, '');
+    });
+    element.querySelectorAll('select').forEach((select) => {
+      assert.equal(select.selectedIndex, 0);
+    });
+
+    // Assert BulkUpdateApprovals correctly called.
+    const expectedMessage = {
+      approvalDelta: {status: 'NOT_APPROVED'},
+      commentContent: 'comment',
+      fieldRef: fieldDefs[0].fieldRef,
+      issueRefs: element.issueRefs,
+      send_email: true,
+    };
+    sinon.assert.calledWith(
+        prpcClient.call,
+        'monorail.Issues',
+        'BulkUpdateApprovals',
+        expectedMessage);
+  });
+
+  it('save: no updates', async () => {
+    const promise = Promise.resolve({issueRefs: []});
+    prpcClient.call.returns(promise);
+    const fieldDefs = [
+      {fieldRef: {fieldName: 'Approval-One', type: 'APPROVAL_TYPE'}},
+      {fieldRef: {fieldName: 'Approval-Two', type: 'APPROVAL_TYPE'}},
+    ];
+    element.approvals = fieldDefs;
+    element.projectName = 'chromium';
+    element.localIdsStr = '1,2,3';
+
+    await element.updateComplete;
+
+    element.querySelector('#commentText').value = 'comment';
+    element.querySelector('#statusInput').value = 'NotApproved';
+    element.querySelector('.js-save').click();
+
+    // Wait for promise in save() to resolve
+    await promise;
+
+    // Assert messages correct.
+    assert.equal('', element.responseMessage);
+    assert.equal(NO_UPDATES_MESSAGE, element.errorMessage);
+
+    // Assert inputs not cleared.
+    assert.equal(element.querySelector('#commentText').value, 'comment');
+    assert.equal(element.querySelector('#statusInput').value, 'NotApproved');
+
+    // Assert inputs not disabled.
+    element.querySelectorAll('input, textarea, select').forEach((input) => {
+      assert.equal(input.disabled, false);
+    });
+  });
+});
diff --git a/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.js b/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.js
new file mode 100644
index 0000000..a7870f6
--- /dev/null
+++ b/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.js
@@ -0,0 +1,151 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import page from 'page';
+import qs from 'qs';
+import 'elements/chops/chops-button/chops-button.js';
+import 'elements/chops/chops-dialog/chops-dialog.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import {parseColSpec} from 'shared/issue-fields.js';
+
+/**
+ * `<mr-change-columns>`
+ *
+ * Dialog where the user can change columns on the list view.
+ *
+ */
+export class MrChangeColumns extends LitElement {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        .edit-actions {
+          margin: 0.5em 0;
+          text-align: right;
+        }
+        .input-grid {
+          align-items: center;
+          width: 800px;
+          max-width: 100%;
+        }
+        input {
+          box-sizing: border-box;
+          padding: 0.25em 4px;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <chops-dialog closeOnOutsideClick>
+        <h3 class="medium-heading">Change list columns</h3>
+        <form id="changeColumns" @submit=${this._save}>
+          <div class="input-grid">
+            <label for="columnsInput">Columns: </label>
+            <input
+              id="columnsInput"
+              placeholder="Edit columns..."
+              value=${this.columns.join(' ')}
+            />
+          </div>
+          <div class="edit-actions">
+            <chops-button
+              @click=${this.close}
+              class="de-emphasized discard-button"
+            >
+              Discard
+            </chops-button>
+            <chops-button
+              @click=${this._save}
+              class="emphasized"
+            >
+              Update columns
+            </chops-button>
+          </div>
+        </form>
+      </chops-dialog>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      /**
+       * Array of the currently configured issue columns, used to set
+       * the default value.
+       */
+      columns: {type: Array},
+      /**
+       * Parsed query params for the current page, to be used in
+       * navigation.
+       */
+      queryParams: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this.columns = [];
+    this.queryParams = {};
+
+    this._page = page;
+  }
+
+  /**
+   * Abstract out the computation of the current page. Useful for testing.
+   */
+  get _currentPage() {
+    return window.location.pathname;
+  }
+
+  /** Updates the URL query params with the new columns. */
+  save() {
+    const input = this.shadowRoot.querySelector('#columnsInput');
+    const newColumns = parseColSpec(input.value);
+
+    const params = {...this.queryParams};
+    params.colspec = newColumns.join('+');
+
+    // TODO(zhangtiff): Create a shared function to change only
+    // query params in a URL.
+    this._page(`${this._currentPage}?${qs.stringify(params)}`);
+
+    this.close();
+  }
+
+  /**
+   * Handles form submit events.
+   * @param {Event} e A click or submit event.
+   */
+  _save(e) {
+    e.preventDefault();
+    this.save();
+  }
+
+  /** Opens and resets this dialog. */
+  open() {
+    this.reset();
+    const dialog = this.shadowRoot.querySelector('chops-dialog');
+    dialog.open();
+  }
+
+  /** Closes this dialog. */
+  close() {
+    const dialog = this.shadowRoot.querySelector('chops-dialog');
+    dialog.close();
+  }
+
+  /** Resets the form in this dialog. */
+  reset() {
+    this.shadowRoot.querySelector('form').reset();
+  }
+}
+
+customElements.define('mr-change-columns', MrChangeColumns);
diff --git a/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.test.js b/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.test.js
new file mode 100644
index 0000000..82e529d
--- /dev/null
+++ b/static_src/elements/framework/dialogs/mr-change-columns/mr-change-columns.test.js
@@ -0,0 +1,75 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrChangeColumns} from './mr-change-columns.js';
+
+
+let element;
+
+describe('mr-change-columns', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-change-columns');
+    document.body.appendChild(element);
+
+    element._page = sinon.stub();
+    sinon.stub(element, '_currentPage').get(() => '/test');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrChangeColumns);
+  });
+
+  it('input initializes with currently set columns', async () => {
+    element.columns = ['ID', 'Summary'];
+
+    await element.updateComplete;
+
+    const input = element.shadowRoot.querySelector('#columnsInput');
+
+    assert.equal(input.value, 'ID Summary');
+  });
+
+  it('editing input and saving updates columns in URL', async () => {
+    element.columns = ['ID', 'Summary'];
+    element.queryParams = {};
+
+    await element.updateComplete;
+
+    const input = element.shadowRoot.querySelector('#columnsInput');
+    input.value = 'ID Summary Owner';
+
+    element.save();
+
+    sinon.assert.calledWith(element._page,
+        '/test?colspec=ID%2BSummary%2BOwner');
+  });
+
+  it('submitting form updates colspec', async () => {
+    element.columns = ['ID', 'Summary'];
+    element.queryParams = {};
+
+    await element.updateComplete;
+
+    const input = element.shadowRoot.querySelector('#columnsInput');
+    input.value = 'ID Summary Component';
+
+    // Note: HTMLFormElement.submit() does not fire event listeners.
+    const submitEvent = new Event('submit');
+    sinon.spy(submitEvent, 'preventDefault');
+    const form = element.shadowRoot.querySelector('form');
+    form.dispatchEvent(submitEvent);
+
+    // Preventing default is important to prevent native browser form submit
+    // from causing an additional navigation.
+    sinon.assert.calledOnce(submitEvent.preventDefault);
+
+    sinon.assert.calledWith(element._page,
+        '/test?colspec=ID%2BSummary%2BComponent');
+  });
+});
diff --git a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.js b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.js
new file mode 100644
index 0000000..54565cf
--- /dev/null
+++ b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.js
@@ -0,0 +1,233 @@
+// Copyright 2020 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import 'elements/chops/chops-dialog/chops-dialog.js';
+import * as userV0 from 'reducers/userV0.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import {connectStore} from 'reducers/base.js';
+
+/**
+ * `<mr-issue-hotlists-dialog>`
+ *
+ * The base dialog that <mr-move-issue-hotlists-dialog> and
+ * <mr-update-issue-hotlists-dialog> inherits common methods and behaviors from.
+ * <mr-update-issue-hotlists-dialog> is used across multiple pages where as
+ * <mr-move-issue-hotlists-dialog> is largely used within Hotlists.
+ *
+ * Important: The `render` method should be overridden by child classes.
+ */
+export class MrIssueHotlistsDialog extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          font-size: var(--chops-main-font-size);
+          --chops-dialog-max-width: 500px;
+        }
+        .error {
+          max-width: 100%;
+          color: red;
+          margin-bottom: 1px;
+        }
+        select,
+        input {
+          box-sizing: border-box;
+          width: var(--mr-edit-field-width);
+          padding: var(--mr-edit-field-padding);
+          font-size: var(--chops-main-font-size);
+        }
+        input#filter {
+          margin-top: 4px;
+          width: 85%;
+          max-width: 240px;
+        }
+        .user-hotlists {
+          max-height: 240px;
+          overflow: auto;
+        }
+        .hotlist.filter-fail {
+          display: none;
+        }
+        i.material-icons {
+          font-size: 20px;
+          margin-right: 4px;
+          vertical-align: bottom;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    return html`
+    <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+    <chops-dialog closeOnOutsideClick>
+      ${this.renderHeader()}
+      ${this.renderContent()}
+    </chops-dialog>
+    `;
+  }
+
+  /**
+   * Renders the dialog header.
+   * @return {TemplateResult}
+   */
+  renderHeader() {
+    return html`
+      <h3 class="medium-heading">Dialog elements below:</h3>
+    `;
+  }
+
+  /**
+   * Renders the dialog content.
+   * @return {TemplateResult}
+   */
+  renderContent() {
+    return html`
+      ${this.renderFilter()}
+      ${this.renderHotlists()}
+      ${this.renderError()}
+    `;
+  }
+
+  /**
+   * Renders the Hotlist filter.
+   * @return {TemplateResult}
+   */
+  renderFilter() {
+    return html`
+      <input id="filter" type="text" @keyup=${this.filterHotlists}>
+      <i class="material-icons">search</i>
+    `;
+  }
+
+  /**
+   * Renders the user's Hotlists.
+   * @return {TemplateResult}
+   */
+  renderHotlists() {
+    return html`
+      <div class="user-hotlists">
+        ${this.filteredHotlists.length ?
+          this.filteredHotlists.map(this.renderFilteredHotlist, this) : ''}
+      </div>
+    `;
+  }
+
+  /**
+   * Renders a user's filtered Hotlist.
+   * @param {HotlistV0} hotlist The user Hotlist to render.
+   * @return {TemplateResult}
+   */
+  renderFilteredHotlist(hotlist) {
+    return html`
+      <div
+        class="hotlist"
+        data-hotlist-name="${hotlist.name}"
+      >
+        ${hotlist.name}
+      </div>`;
+  }
+
+  /**
+   * Renders dialog error.
+   * @return {TemplateResult}
+   */
+  renderError() {
+    return html`
+      <br>
+      ${this.error ? html`
+        <div class="error">${this.error}</div>
+      `: ''}
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      // Populated from Redux.
+      userHotlists: {type: Array},
+      filteredHotlists: {type: Array},
+      issueRefs: {type: Array},
+      error: {type: String},
+    };
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.userHotlists = userV0.currentUser(state).hotlists;
+    // TODO(https://crbug.com/monorail/7778): Switch to users.js and use V3 API
+    // to make a call to GatherHotlistsForUser.
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    /** @type {Array} */
+    this.userHotlists = [];
+
+    /** @type {Array} */
+    this.filteredHotlists = this.userHotlists;
+
+    /** @type {Array<IssueRef>} */
+    this.issueRefs = [];
+
+    /** @type {string} */
+    this.error = '';
+  }
+
+  /**
+   * Opens the dialog.
+   */
+  open() {
+    this.reset();
+    this.shadowRoot.querySelector('chops-dialog').open();
+  }
+
+  /**
+   * Resets any changes to the form and error.
+   */
+  reset() {
+    this.error = '';
+    const filter = this.shadowRoot.querySelector('#filter');
+    filter.value = '';
+    this.filterHotlists();
+  }
+
+  /**
+   * Closes the dialog.
+   */
+  close() {
+    this.shadowRoot.querySelector('chops-dialog').close();
+  }
+
+  /**
+   * Filters the visible Hotlists with the given user input.
+   * Requires filter to be an input element with its id as "filter".
+   */
+  filterHotlists() {
+    const input = this.shadowRoot.querySelector('#filter');
+    if (!input) {
+      // Short circuit because there's no filter.
+      this.filteredHotlists = this.userHotlists;
+    } else {
+      const filter = input.value.toLowerCase();
+      const visibleHotlists = [];
+      this.userHotlists.forEach((hotlist) => {
+        const hotlistName = hotlist.name.toLowerCase();
+        if (hotlistName.includes(filter)) {
+          visibleHotlists.push(hotlist);
+        }
+      });
+      this.filteredHotlists = visibleHotlists;
+    }
+  }
+}
+
+customElements.define('mr-issue-hotlists-dialog', MrIssueHotlistsDialog);
diff --git a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.test.js b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.test.js
new file mode 100644
index 0000000..911c1a0
--- /dev/null
+++ b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-issue-hotlists-dialog.test.js
@@ -0,0 +1,78 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import {MrIssueHotlistsDialog} from './mr-issue-hotlists-dialog.js';
+
+let element;
+const EXAMPLE_USER_HOTLISTS = [
+  {name: 'Hotlist-1'},
+  {name: 'Hotlist-2'},
+  {name: 'ac-apple-1'},
+  {name: 'ac-frita-1'},
+];
+
+describe('mr-issue-hotlists-dialog', () => {
+  beforeEach(async () => {
+    element = document.createElement('mr-issue-hotlists-dialog');
+    document.body.appendChild(element);
+
+    await element.updateComplete;
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrIssueHotlistsDialog);
+    assert.include(element.shadowRoot.innerHTML, 'Dialog elements below');
+  });
+
+  it('filters hotlists', async () => {
+    element.userHotlists = EXAMPLE_USER_HOTLISTS;
+    element.open();
+    await element.updateComplete;
+
+    const initialHotlists = element.shadowRoot.querySelectorAll('.hotlist');
+    assert.equal(initialHotlists.length, 4);
+    const filterInput = element.shadowRoot.querySelector('#filter');
+    filterInput.value = 'list';
+    element.filterHotlists();
+    await element.updateComplete;
+    let visibleHotlists =
+        element.shadowRoot.querySelectorAll('.hotlist');
+    assert.equal(visibleHotlists.length, 2);
+
+    filterInput.value = '2';
+    element.filterHotlists();
+    await element.updateComplete;
+    visibleHotlists =
+        element.shadowRoot.querySelectorAll('.hotlist');
+    assert.equal(visibleHotlists.length, 1);
+  });
+
+  it('resets filter on open', async () => {
+    element.userHotlists = EXAMPLE_USER_HOTLISTS;
+    element.open();
+    await element.updateComplete;
+
+    const filterInput = element.shadowRoot.querySelector('#filter');
+    filterInput.value = 'ac';
+    element.filterHotlists();
+    await element.updateComplete;
+    let visibleHotlists =
+        element.shadowRoot.querySelectorAll('.hotlist');
+    assert.equal(visibleHotlists.length, 2);
+
+    element.close();
+    element.open();
+    await element.updateComplete;
+
+    assert.equal(filterInput.value, '');
+    visibleHotlists =
+        element.shadowRoot.querySelectorAll('.hotlist');
+    assert.equal(visibleHotlists.length, 4);
+  });
+});
diff --git a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.js b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.js
new file mode 100644
index 0000000..e7c1cd3
--- /dev/null
+++ b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.js
@@ -0,0 +1,141 @@
+// Copyright 2020 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.
+
+import {html, css} from 'lit-element';
+
+import 'elements/framework/mr-warning/mr-warning.js';
+import {hotlists} from 'reducers/hotlists.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import {MrIssueHotlistsDialog} from './mr-issue-hotlists-dialog';
+
+/**
+ * `<mr-move-issue-hotlists-dialog>`
+ *
+ * Displays a dialog to select the Hotlist to move the provided Issues.
+ */
+export class MrMoveIssueDialog extends MrIssueHotlistsDialog {
+  /** @override */
+  static get styles() {
+    return [
+      super.styles,
+      css`
+        .hotlist {
+          padding: 4px;
+        }
+        .hotlist:hover {
+          background: var(--chops-active-choice-bg);
+          cursor: pointer;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  renderHeader() {
+    const warningText =
+        `Moving issues will remove them from ${this._viewedHotlist ?
+          this._viewedHotlist.displayName : 'this hotlist'}.`;
+    return html`
+      <h3 class="medium-heading">Move issues to hotlist</h3>
+      <mr-warning title=${warningText}>${warningText}</mr-warning>
+    `;
+  }
+
+  /** @override */
+  renderFilteredHotlist(hotlist) {
+    if (this._viewedHotlist &&
+      hotlist.name === this._viewedHotlist.displayName) return;
+    return html`
+      <div
+        class="hotlist"
+        data-hotlist-name="${hotlist.name}"
+        @click=${this._targetHotlistPicked}>
+        ${hotlist.name}
+      </div>`;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      ...MrIssueHotlistsDialog.properties,
+      // Populated from Redux.
+      _viewedHotlist: {type: Object},
+    };
+  }
+
+  /** @override */
+  stateChanged(state) {
+    super.stateChanged(state);
+    this._viewedHotlist = hotlists.viewedHotlist(state);
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    /**
+     * The currently viewed Hotlist.
+     * @type {?Hotlist}
+     **/
+    this._viewedHotlist = null;
+  }
+
+  /**
+   * Handles picking a Hotlist to move to.
+   * @param {Event} e
+   */
+  async _targetHotlistPicked(e) {
+    const targetHotlistName = e.target.dataset.hotlistName;
+    const changes = {
+      added: [],
+      removed: [],
+    };
+
+    for (const hotlist of this.userHotlists) {
+      // We move from the current Hotlist to the target Hotlist.
+      if (changes.added.length === 1 && changes.removed.length === 1) break;
+      const change = {
+        name: hotlist.name,
+        owner: hotlist.ownerRef,
+      };
+      if (hotlist.name === targetHotlistName) {
+        changes.added.push(change);
+      } else if (hotlist.name === this._viewedHotlist.displayName) {
+        changes.removed.push(change);
+      }
+    }
+
+    const issueRefs = this.issueRefs;
+    if (!issueRefs) return;
+
+    // TODO(https://crbug.com/monorail/7778): Use action creators.
+    const promises = [];
+    if (changes.added && changes.added.length) {
+      promises.push(prpcClient.call(
+          'monorail.Features', 'AddIssuesToHotlists', {
+            hotlistRefs: changes.added,
+            issueRefs,
+          },
+      ));
+    }
+    if (changes.removed && changes.removed.length) {
+      promises.push(prpcClient.call(
+          'monorail.Features', 'RemoveIssuesFromHotlists', {
+            hotlistRefs: changes.removed,
+            issueRefs,
+          },
+      ));
+    }
+
+    try {
+      await Promise.all(promises);
+      this.dispatchEvent(new Event('saveSuccess'));
+      this.close();
+    } catch (error) {
+      this.error = error.message || error.description;
+    }
+  }
+}
+
+customElements.define('mr-move-issue-hotlists-dialog', MrMoveIssueDialog);
diff --git a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.test.js b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.test.js
new file mode 100644
index 0000000..7a2dd5c
--- /dev/null
+++ b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.test.js
@@ -0,0 +1,105 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrMoveIssueDialog} from './mr-move-issue-hotlists-dialog.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import * as example from 'shared/test/constants-hotlists.js';
+
+let element;
+let waitForPromises;
+
+describe('mr-move-issue-hotlists-dialog', () => {
+  beforeEach(async () => {
+    element = document.createElement('mr-move-issue-hotlists-dialog');
+    document.body.appendChild(element);
+
+    // We need to wait for promisees to resolve. Alone, the updateComplete
+    // returns without allowing our Promise.all to resolve.
+    waitForPromises = async () => element.updateComplete;
+
+    element.userHotlists = [
+      {name: 'Hotlist-1', ownerRef: {userId: 67890}},
+      {name: 'Hotlist-2', ownerRef: {userId: 67890}},
+      {name: 'Hotlist-3', ownerRef: {userId: 67890}},
+      {name: example.HOTLIST.displayName, ownerRef: {userId: 67890}},
+    ];
+    element.user = {userId: 67890};
+    element.issueRefs = [{localId: 22, projectName: 'test'}];
+    element._viewedHotlist = example.HOTLIST;
+    await element.updateComplete;
+
+    sinon.stub(prpcClient, 'call');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+
+    prpcClient.call.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrMoveIssueDialog);
+  });
+
+  it('clicking a hotlist moves the issue', async () => {
+    element.open();
+    await element.updateComplete;
+
+    const targetHotlist =element.shadowRoot.querySelector(
+        '.hotlist[data-hotlist-name="Hotlist-2"]');
+    assert.isNotNull(targetHotlist);
+    targetHotlist.click();
+    await element.updateComplete;
+
+    sinon.assert.calledWith(prpcClient.call, 'monorail.Features',
+        'AddIssuesToHotlists', {
+          hotlistRefs: [{name: 'Hotlist-2', owner: {userId: 67890}}],
+          issueRefs: [{localId: 22, projectName: 'test'}],
+        });
+
+    sinon.assert.calledWith(prpcClient.call, 'monorail.Features',
+        'RemoveIssuesFromHotlists', {
+          hotlistRefs: [{
+            name: example.HOTLIST.displayName,
+            owner: {userId: 67890},
+          }],
+          issueRefs: [{localId: 22, projectName: 'test'}],
+        });
+  });
+
+  it('dispatches event upon successfully moving', async () => {
+    element.open();
+    const savedStub = sinon.stub();
+    element.addEventListener('saveSuccess', savedStub);
+    sinon.stub(element, 'close');
+    await element.updateComplete;
+
+    const targetHotlist =element.shadowRoot.querySelector(
+        '.hotlist[data-hotlist-name="Hotlist-2"]');
+    targetHotlist.click();
+
+    await waitForPromises();
+    sinon.assert.calledOnce(savedStub);
+    sinon.assert.calledOnce(element.close);
+  });
+
+  it('dispatches no event upon error saving', async () => {
+    const mistakes = 'Mistakes were made';
+    const error = new Error(mistakes);
+    prpcClient.call.returns(Promise.reject(error));
+    const savedStub = sinon.stub();
+    element.addEventListener('saveSuccess', savedStub);
+    element.open();
+    await element.updateComplete;
+
+    const targetHotlist =element.shadowRoot.querySelector(
+        '.hotlist[data-hotlist-name="Hotlist-2"]');
+    targetHotlist.click();
+
+    await waitForPromises();
+    sinon.assert.notCalled(savedStub);
+    assert.include(element.shadowRoot.innerHTML, mistakes);
+  });
+});
diff --git a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.js b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.js
new file mode 100644
index 0000000..08a8b25
--- /dev/null
+++ b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.js
@@ -0,0 +1,340 @@
+// Copyright 2019 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.
+
+import {html, css} from 'lit-element';
+import deepEqual from 'deep-equal';
+
+import 'elements/chops/chops-checkbox/chops-checkbox.js';
+import {store} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as userV0 from 'reducers/userV0.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import {MrIssueHotlistsDialog} from './mr-issue-hotlists-dialog';
+
+/**
+ * `<mr-update-issue-hotlists-dialog>`
+ *
+ * Displays a dialog with the current hotlists's issues allowing the user to
+ * update which hotlists the issues are a member of.
+ */
+export class MrUpdateIssueDialog extends MrIssueHotlistsDialog {
+  /** @override */
+  static get styles() {
+    return [
+      ...super.styles,
+      css`
+        input[type="checkbox"] {
+          width: auto;
+          height: auto;
+        }
+        button.toggle {
+          background: none;
+          color: hsl(240, 100%, 40%);
+          border: 0;
+          width: 100%;
+          padding: 0.25em 0;
+          text-align: left;
+        }
+        button.toggle:hover {
+          cursor: pointer;
+          text-decoration: underline;
+        }
+        label, chops-checkbox {
+          display: flex;
+          line-height: 200%;
+          align-items: center;
+          width: 100%;
+          text-align: left;
+          font-weight: normal;
+          padding: 0.25em 8px;
+          box-sizing: border-box;
+        }
+        label input[type="checkbox"] {
+          margin-right: 8px;
+        }
+        .discard-button {
+          margin-right: 16px;
+        }
+        .edit-actions {
+          width: 100%;
+          margin: 0.5em 0;
+          text-align: right;
+        }
+        .input-grid {
+          align-items: center;
+        }
+        .input-grid > input {
+          width: 200px;
+          max-width: 100%;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  renderHeader() {
+    return html`
+      <h3 class="medium-heading">Add issue to hotlists</h3>
+    `;
+  }
+
+  /** @override */
+  renderContent() {
+    return html`
+      ${this.renderFilter()}
+      <form id="issueHotlistsForm">
+        ${this.renderHotlists()}
+        <h3 class="medium-heading">Create new hotlist</h3>
+        <div class="input-grid">
+          <label for="newHotlistName">New hotlist name:</label>
+          <input type="text" name="newHotlistName">
+        </div>
+        ${this.renderError()}
+        <div class="edit-actions">
+          <chops-button
+            class="de-emphasized discard-button"
+            ?disabled=${this.disabled}
+            @click=${this.discard}
+          >
+            Discard
+          </chops-button>
+          <chops-button
+            class="emphasized"
+            ?disabled=${this.disabled}
+            @click=${this.save}
+          >
+            Save changes
+          </chops-button>
+        </div>
+      </form>
+    `;
+  }
+
+  /** @override */
+  renderFilteredHotlist(hotlist) {
+    return html`
+      <chops-checkbox
+        class="hotlist"
+        title=${this._checkboxTitle(hotlist, this.issueHotlists)}
+        data-hotlist-name="${hotlist.name}"
+        ?checked=${this.hotlistsToAdd.has(hotlist.name)}
+        @checked-change=${this._targetHotlistChecked}
+      >
+        ${hotlist.name}
+      </chops-checkbox>`;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      ...super.properties,
+      viewedIssueRef: {type: Object},
+      issueHotlists: {type: Array},
+      user: {type: Object},
+      hotlistsToAdd: {
+        type: Object,
+        hasChanged(newVal, oldVal) {
+          return !deepEqual(newVal, oldVal);
+        },
+      },
+    };
+  }
+
+  /** @override */
+  stateChanged(state) {
+    super.stateChanged(state);
+    this.viewedIssueRef = issueV0.viewedIssueRef(state);
+    this.user = userV0.currentUser(state);
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    /** The list of Hotlists attached to the issueRefs. */
+    this.issueHotlists = [];
+
+    /** The Set of Hotlist names that the Issues will be added to. */
+    this.hotlistsToAdd = this._initializeHotlistsToAdd();
+  }
+
+  /** @override */
+  reset() {
+    const form = this.shadowRoot.querySelector('#issueHotlistsForm');
+    form.reset();
+    // LitElement's hasChanged needs an assignment to verify Set objects.
+    // https://lit-element.polymer-project.org/guide/properties#haschanged
+    this.hotlistsToAdd = this._initializeHotlistsToAdd();
+    super.reset();
+  }
+
+  /**
+   * An alias to the close method.
+   */
+  discard() {
+    this.close();
+  }
+
+  /**
+   * Saves all changes that were found in the dialog and issues async requests
+   * to update the issues.
+   * @fires Event#saveSuccess
+   */
+  async save() {
+    const changes = this.changes;
+    const issueRefs = this.issueRefs;
+    const viewedRef = this.viewedIssueRef;
+
+    if (!issueRefs || !changes) return;
+
+    // TODO(https://crbug.com/monorail/7778): Use action creators.
+    const promises = [];
+    if (changes.added && changes.added.length) {
+      promises.push(prpcClient.call(
+          'monorail.Features', 'AddIssuesToHotlists', {
+            hotlistRefs: changes.added,
+            issueRefs,
+          },
+      ));
+    }
+    if (changes.removed && changes.removed.length) {
+      promises.push(prpcClient.call(
+          'monorail.Features', 'RemoveIssuesFromHotlists', {
+            hotlistRefs: changes.removed,
+            issueRefs,
+          },
+      ));
+    }
+    if (changes.created) {
+      promises.push(prpcClient.call(
+          'monorail.Features', 'CreateHotlist', {
+            name: changes.created.name,
+            summary: changes.created.summary,
+            issueRefs,
+          },
+      ));
+    }
+
+    try {
+      await Promise.all(promises);
+
+      // Refresh the viewed issue's hotlists only if there is a viewed issue.
+      if (viewedRef) {
+        const viewedIssueWasUpdated = issueRefs.find((ref) =>
+          ref.projectName === viewedRef.projectName &&
+          ref.localId === viewedRef.localId);
+        if (viewedIssueWasUpdated) {
+          store.dispatch(issueV0.fetchHotlists(viewedRef));
+        }
+      }
+      store.dispatch(userV0.fetchHotlists({userId: this.user.userId}));
+      this.dispatchEvent(new Event('saveSuccess'));
+      this.close();
+    } catch (error) {
+      this.error = error.description;
+    }
+  }
+
+  /**
+   * Returns whether a given hotlist matches any of the given issue's hotlists.
+   * @param {Hotlist} hotlist Hotlist to look for.
+   * @param {Array<Hotlist>} issueHotlists Issue's hotlists to compare to.
+   * @return {boolean}
+   */
+  _issueInHotlist(hotlist, issueHotlists) {
+    return issueHotlists.some((issueHotlist) => {
+      // TODO(https://crbug.com/monorail/7451): use `===`.
+      return (hotlist.ownerRef.userId == issueHotlist.ownerRef.userId &&
+        hotlist.name === issueHotlist.name);
+    });
+  }
+
+  /**
+   * Get a Set of Hotlists to add the Issues to based on the
+   * Get the initial Set of Hotlists that Issues will be added to. Calculated
+   * using userHotlists and issueHotlists.
+   * @return {!Set<string>}
+   */
+  _initializeHotlistsToAdd() {
+    const userHotlistsInIssueHotlists = this.userHotlists.reduce(
+        (acc, hotlist) => {
+          if (this._issueInHotlist(hotlist, this.issueHotlists)) {
+            acc.push(hotlist.name);
+          }
+          return acc;
+        }, []);
+    return new Set(userHotlistsInIssueHotlists);
+  }
+
+  /**
+   * Gets the checkbox title, depending on the checked state.
+   * @param {boolean} isChecked Whether the input is checked.
+   * @return {string}
+   */
+  _getCheckboxTitle(isChecked) {
+    return (isChecked ? 'Remove issue from' : 'Add issue to') + ' this hotlist';
+  }
+
+  /**
+   * The checkbox title for the issue, shown on hover and for a11y.
+   * @param {Hotlist} hotlist Hotlist to look for.
+   * @param {Array<Hotlist>} issueHotlists Issue's hotlists to compare to.
+   * @return {string}
+   */
+  _checkboxTitle(hotlist, issueHotlists) {
+    return this._getCheckboxTitle(this._issueInHotlist(hotlist, issueHotlists));
+  }
+
+  /**
+   * Handles when the target Hotlist chops-checkbox has been checked.
+   * @param {Event} e
+   */
+  _targetHotlistChecked(e) {
+    const hotlistName = e.target.dataset.hotlistName;
+    const currentHotlistsToAdd = new Set(this.hotlistsToAdd);
+    if (hotlistName && e.detail.checked) {
+      currentHotlistsToAdd.add(hotlistName);
+    } else {
+      currentHotlistsToAdd.delete(hotlistName);
+    }
+    // LitElement's hasChanged needs an assignment to verify Set objects.
+    // https://lit-element.polymer-project.org/guide/properties#haschanged
+    this.hotlistsToAdd = currentHotlistsToAdd;
+    e.target.title = this._getCheckboxTitle(e.target.checked);
+  }
+
+  /**
+   * Gets the changes between the added, removed, and created hotlists .
+   */
+  get changes() {
+    const changes = {
+      added: [],
+      removed: [],
+    };
+    const form = this.shadowRoot.querySelector('#issueHotlistsForm');
+    this.userHotlists.forEach((hotlist) => {
+      const issueInHotlist = this._issueInHotlist(hotlist, this.issueHotlists);
+      if (issueInHotlist && !this.hotlistsToAdd.has(hotlist.name)) {
+        changes.removed.push({
+          name: hotlist.name,
+          owner: hotlist.ownerRef,
+        });
+      } else if (!issueInHotlist && this.hotlistsToAdd.has(hotlist.name)) {
+        changes.added.push({
+          name: hotlist.name,
+          owner: hotlist.ownerRef,
+        });
+      }
+    });
+    if (form.newHotlistName.value) {
+      changes.created = {
+        name: form.newHotlistName.value,
+        summary: 'Hotlist created from issue.',
+      };
+    }
+    return changes;
+  }
+}
+
+customElements.define('mr-update-issue-hotlists-dialog', MrUpdateIssueDialog);
diff --git a/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.test.js b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.test.js
new file mode 100644
index 0000000..954b8b9
--- /dev/null
+++ b/static_src/elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.test.js
@@ -0,0 +1,193 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrUpdateIssueDialog} from './mr-update-issue-hotlists-dialog.js';
+import {prpcClient} from 'prpc-client-instance.js';
+
+let element;
+let form;
+
+describe('mr-update-issue-hotlists-dialog', () => {
+  beforeEach(async () => {
+    element = document.createElement('mr-update-issue-hotlists-dialog');
+    document.body.appendChild(element);
+
+    await element.updateComplete;
+    form = element.shadowRoot.querySelector('#issueHotlistsForm');
+
+    sinon.stub(prpcClient, 'call');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+
+    prpcClient.call.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrUpdateIssueDialog);
+  });
+
+  it('no changes', () => {
+    assert.deepEqual(element.changes, {added: [], removed: []});
+  });
+
+  it('clicking on issues produces changes', async () => {
+    element.issueHotlists = [
+      {name: 'Hotlist-1', ownerRef: {userId: 12345}},
+      {name: 'Hotlist-2', ownerRef: {userId: 12345}},
+      {name: 'Hotlist-1', ownerRef: {userId: 67890}},
+    ];
+    element.userHotlists = [
+      {name: 'Hotlist-1', ownerRef: {userId: 67890}},
+      {name: 'Hotlist-2', ownerRef: {userId: 67890}},
+    ];
+    element.user = {userId: 67890};
+
+    element.open();
+    await element.updateComplete;
+
+    const chopsCheckboxes = form.querySelectorAll('chops-checkbox');
+    chopsCheckboxes[0].click();
+    chopsCheckboxes[1].click();
+    assert.deepEqual(element.changes, {
+      added: [{name: 'Hotlist-2', owner: {userId: 67890}}],
+      removed: [{name: 'Hotlist-1', owner: {userId: 67890}}],
+    });
+  });
+
+  it('adding new hotlist produces changes', async () => {
+    await element.updateComplete;
+    form.newHotlistName.value = 'New-Hotlist';
+    assert.deepEqual(element.changes, {
+      added: [],
+      removed: [],
+      created: {
+        name: 'New-Hotlist',
+        summary: 'Hotlist created from issue.',
+      },
+    });
+  });
+
+  it('reset changes', async () => {
+    element.issueHotlists = [
+      {name: 'Hotlist-1', ownerRef: {userId: 12345}},
+      {name: 'Hotlist-2', ownerRef: {userId: 12345}},
+      {name: 'Hotlist-1', ownerRef: {userId: 67890}},
+    ];
+    element.userHotlists = [
+      {name: 'Hotlist-1', ownerRef: {userId: 67890}},
+      {name: 'Hotlist-2', ownerRef: {userId: 67890}},
+    ];
+    element.user = {userId: 67890};
+
+    element.open();
+    await element.updateComplete;
+
+    const chopsCheckboxes = form.querySelectorAll('chops-checkbox');
+    const checkbox1 = chopsCheckboxes[0];
+    const checkbox2 = chopsCheckboxes[1];
+    checkbox1.click();
+    checkbox2.click();
+    form.newHotlisName = 'New-Hotlist';
+    await element.reset();
+    assert.isTrue(checkbox1.checked);
+    assert.isNotTrue(checkbox2.checked); // Falsey property.
+    assert.equal(form.newHotlistName.value, '');
+  });
+
+  it('saving adds issues to hotlist', async () => {
+    sinon.stub(element, 'changes').get(() => ({
+      added: [{name: 'Hotlist-2', owner: {userId: 67890}}],
+    }));
+    element.issueRefs = [{localId: 22, projectName: 'test'}];
+
+    await element.save();
+
+    sinon.assert.calledWith(prpcClient.call, 'monorail.Features',
+        'AddIssuesToHotlists', {
+          hotlistRefs: [{name: 'Hotlist-2', owner: {userId: 67890}}],
+          issueRefs: [{localId: 22, projectName: 'test'}],
+        });
+  });
+
+  it('saving removes issues from hotlist', async () => {
+    sinon.stub(element, 'changes').get(() => ({
+      removed: [{name: 'Hotlist-2', owner: {userId: 67890}}],
+    }));
+    element.issueRefs = [{localId: 22, projectName: 'test'}];
+
+    await element.save();
+
+    sinon.assert.calledWith(prpcClient.call, 'monorail.Features',
+        'RemoveIssuesFromHotlists', {
+          hotlistRefs: [{name: 'Hotlist-2', owner: {userId: 67890}}],
+          issueRefs: [{localId: 22, projectName: 'test'}],
+        });
+  });
+
+  it('saving creates new hotlist with issues', async () => {
+    sinon.stub(element, 'changes').get(() => ({
+      created: {name: 'MyHotlist', summary: 'the best hotlist'},
+    }));
+    element.issueRefs = [{localId: 22, projectName: 'test'}];
+
+    await element.save();
+
+    sinon.assert.calledWith(prpcClient.call, 'monorail.Features',
+        'CreateHotlist', {
+          name: 'MyHotlist',
+          summary: 'the best hotlist',
+          issueRefs: [{localId: 22, projectName: 'test'}],
+        });
+  });
+
+  it('saving refreshes issue hotlises if viewed issue is updated', async () => {
+    sinon.stub(element, 'changes').get(() => ({
+      created: {name: 'MyHotlist', summary: 'the best hotlist'},
+    }));
+    element.issueRefs = [
+      {localId: 22, projectName: 'test'},
+      {localId: 32, projectName: 'test'},
+    ];
+    element.viewedIssueRef = {localId: 32, projectName: 'test'};
+
+    await element.save();
+
+    sinon.assert.calledWith(prpcClient.call, 'monorail.Features',
+        'ListHotlistsByIssue', {issue: {localId: 32, projectName: 'test'}});
+  });
+
+  it('dispatches event upon successfully saving', async () => {
+    sinon.stub(element, 'changes').get(() => ({
+      added: [{name: 'Hotlist-2', owner: {userId: 67890}}],
+    }));
+    element.issueRefs = [{localId: 22, projectName: 'test'}];
+
+    const savedStub = sinon.stub();
+    element.addEventListener('saveSuccess', savedStub);
+
+    await element.save();
+
+    sinon.assert.calledOnce(savedStub);
+  });
+
+  it('dispatches no event upon error saving', async () => {
+    sinon.stub(element, 'changes').get(() => ({
+      added: [{name: 'Hotlist-2', owner: {userId: 67890}}],
+    }));
+    element.issueRefs = [{localId: 22, projectName: 'test'}];
+
+    const error = new Error('Mistakes were made');
+    prpcClient.call.returns(Promise.reject(error));
+
+    const savedStub = sinon.stub();
+    element.addEventListener('saveSuccess', savedStub);
+
+    await element.save();
+
+    sinon.assert.notCalled(savedStub);
+  });
+});
diff --git a/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.js b/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.js
new file mode 100644
index 0000000..690bd6a
--- /dev/null
+++ b/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.js
@@ -0,0 +1,87 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+/**
+ * `<mr-crbug-link>`
+ *
+ * Displays a crbug short-link to an issue.
+ *
+ */
+export class MrCrbugLink extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+         /**
+         * CSS variables provided to allow conditionally hiding <mr-crbug-link>
+         * in a way that's screenreader friendly.
+         */
+        --mr-crbug-link-opacity: 1;
+        --mr-crbug-link-opacity-focused: 1;
+      }
+      a.material-icons {
+        font-size: var(--chops-icon-font-size);
+        display: inline-block;
+        color: var(--chops-primary-icon-color);
+        padding: 0 2px;
+        box-sizing: border-box;
+        text-decoration: none;
+        vertical-align: middle;
+      }
+      a {
+        opacity: var(--mr-crbug-link-opacity);
+      }
+      a:focus {
+        opacity: var(--mr-crbug-link-opacity-focused);
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <a
+        id="bugLink"
+        class="material-icons"
+        href=${this._issueUrl}
+        title="crbug link"
+      >link</a>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      /**
+       * The issue being viewed. Falls back gracefully if this is only a ref.
+       */
+      issue: {type: Object},
+    };
+  }
+
+  /**
+   * Computes the URL to render in the shortlink.
+   * @return {string}
+   */
+  get _issueUrl() {
+    const issue = this.issue;
+    if (!issue) return '';
+    if (this._getHost() === 'bugs.chromium.org') {
+      const projectPart = (
+        issue.projectName == 'chromium' ? '' : issue.projectName + '/');
+      return `https://crbug.com/${projectPart}${issue.localId}`;
+    }
+    const issueType = issue.approvalValues ? 'approval' : 'detail';
+    return `/p/${issue.projectName}/issues/${issueType}?id=${issue.localId}`;
+  }
+
+  _getHost() {
+    // This function allows us to mock the host in unit testing.
+    return document.location.host;
+  }
+}
+customElements.define('mr-crbug-link', MrCrbugLink);
diff --git a/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.test.js b/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.test.js
new file mode 100644
index 0000000..aa7f21f
--- /dev/null
+++ b/static_src/elements/framework/links/mr-crbug-link/mr-crbug-link.test.js
@@ -0,0 +1,62 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrCrbugLink} from './mr-crbug-link.js';
+
+
+let element;
+
+describe('mr-crbug-link', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-crbug-link');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrCrbugLink);
+  });
+
+  it('In prod, link to crbug.com with project name specified', async () => {
+    element._getHost = () => 'bugs.chromium.org';
+    element.issue = {
+      projectName: 'test',
+      localId: 11,
+    };
+
+    await element.updateComplete;
+
+    const link = element.shadowRoot.querySelector('#bugLink');
+    assert.equal(link.href, 'https://crbug.com/test/11');
+  });
+
+  it('In prod, link to crbug.com with implicit project name', async () => {
+    element._getHost = () => 'bugs.chromium.org';
+    element.issue = {
+      projectName: 'chromium',
+      localId: 11,
+    };
+
+    await element.updateComplete;
+
+    const link = element.shadowRoot.querySelector('#bugLink');
+    assert.equal(link.href, 'https://crbug.com/11');
+  });
+
+  it('does not redirects to approval page for regular issues', async () => {
+    element.issue = {
+      projectName: 'test',
+      localId: 11,
+    };
+
+    await element.updateComplete;
+
+    const link = element.shadowRoot.querySelector('#bugLink');
+    assert.include(link.href.trim(), '/p/test/issues/detail?id=11');
+  });
+});
diff --git a/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.js b/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.js
new file mode 100644
index 0000000..1f8b01a
--- /dev/null
+++ b/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.js
@@ -0,0 +1,39 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+/**
+ * `<mr-hotlist-link>`
+ *
+ * Displays a link to a hotlist.
+ *
+ */
+export class MrHotlistLink extends LitElement {
+  /** @override */
+  static get styles() {
+    return SHARED_STYLES;
+  }
+
+  /** @override */
+  render() {
+    if (!this.hotlist) return html``;
+    return html`
+      <a
+        href="/u/${this.hotlist.ownerRef && this.hotlist.ownerRef.userId}/hotlists/${this.hotlist.name}"
+        title="${this.hotlist.name} - ${this.hotlist.summary}"
+      >
+        ${this.hotlist.name}</a>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      hotlist: {type: Object},
+    };
+  }
+}
+customElements.define('mr-hotlist-link', MrHotlistLink);
diff --git a/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.test.js b/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.test.js
new file mode 100644
index 0000000..7071b77
--- /dev/null
+++ b/static_src/elements/framework/links/mr-hotlist-link/mr-hotlist-link.test.js
@@ -0,0 +1,23 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrHotlistLink} from './mr-hotlist-link.js';
+
+let element;
+
+describe('mr-hotlist-link', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-hotlist-link');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrHotlistLink);
+  });
+});
diff --git a/static_src/elements/framework/links/mr-issue-link/mr-issue-link.js b/static_src/elements/framework/links/mr-issue-link/mr-issue-link.js
new file mode 100644
index 0000000..029de6c
--- /dev/null
+++ b/static_src/elements/framework/links/mr-issue-link/mr-issue-link.js
@@ -0,0 +1,119 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import {ifDefined} from 'lit-html/directives/if-defined';
+import {issueRefToString, issueRefToUrl} from 'shared/convertersV0.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import '../../mr-dropdown/mr-dropdown.js';
+import '../../../help/mr-cue/mr-fed-ref-cue.js';
+
+/**
+ * `<mr-issue-link>`
+ *
+ * Displays a link to an issue.
+ *
+ */
+export class MrIssueLink extends LitElement {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        a[is-closed] {
+          text-decoration: line-through;
+        }
+        mr-dropdown {
+          width: var(--chops-main-font-size);
+          --mr-dropdown-icon-font-size: var(--chops-main-font-size);
+          --mr-dropdown-menu-min-width: 100px;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    let fedRefInfo;
+    if (this.issue && this.issue.extIdentifier) {
+      fedRefInfo = html`
+        <!-- TODO(jeffcarp): Figure out CSS to enable menuAlignment=left -->
+        <mr-dropdown
+          label="Federated Reference Info"
+          icon="info_outline"
+          menuAlignment="right"
+        >
+          <mr-fed-ref-cue
+            cuePrefName="federated_reference"
+            fedRefShortlink=${this.issue.extIdentifier}
+            nondismissible>
+          </mr-fed-ref-cue>
+        </mr-dropdown>
+      `;
+    }
+    return html`
+      <a
+        id="bugLink"
+        href=${this.href}
+        title=${ifDefined(this.issue && this.issue.summary)}
+        ?is-closed=${this.isClosed}
+      >${this._linkText}</a>${fedRefInfo}`;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      // The issue being viewed. Falls back gracefully if this is only a ref.
+      issue: {type: Object},
+      text: {type: String},
+      // The global current project name. NOT the issue's project name.
+      projectName: {type: String},
+      queryParams: {type: Object},
+      short: {type: Boolean},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this.issue = {};
+    this.queryParams = {};
+    this.short = false;
+  }
+
+  click() {
+    const link = this.shadowRoot.querySelector('a');
+    if (!link) return;
+    link.click();
+  }
+
+  /**
+   * @return {string} Where this issue links to.
+   */
+  get href() {
+    return issueRefToUrl(this.issue, this.queryParams);
+  }
+
+  get isClosed() {
+    if (!this.issue || !this.issue.statusRef) return false;
+
+    return this.issue.statusRef.meansOpen === false;
+  }
+
+  get _linkText() {
+    const {projectName, issue, text, short} = this;
+    if (text) return text;
+
+    if (issue && issue.extIdentifier) {
+      return issue.extIdentifier;
+    }
+
+    const prefix = short ? '' : 'Issue ';
+
+    return prefix + issueRefToString(issue, projectName);
+  }
+}
+
+customElements.define('mr-issue-link', MrIssueLink);
diff --git a/static_src/elements/framework/links/mr-issue-link/mr-issue-link.test.js b/static_src/elements/framework/links/mr-issue-link/mr-issue-link.test.js
new file mode 100644
index 0000000..1bd3ae9
--- /dev/null
+++ b/static_src/elements/framework/links/mr-issue-link/mr-issue-link.test.js
@@ -0,0 +1,147 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrIssueLink} from './mr-issue-link.js';
+
+let element;
+
+describe('mr-issue-link', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-issue-link');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrIssueLink);
+  });
+
+  it('strikethrough when closed', async () => {
+    await element.updateComplete;
+    const link = element.shadowRoot.querySelector('#bugLink');
+    assert.isFalse(
+        window.getComputedStyle(link).getPropertyValue(
+            'text-decoration').includes('line-through'));
+    element.issue = {statusRef: {meansOpen: false}};
+
+    await element.updateComplete;
+
+    assert.isTrue(
+        window.getComputedStyle(link).getPropertyValue(
+            'text-decoration').includes('line-through'));
+  });
+
+  it('shortens link text when short is true', () => {
+    element.issue = {
+      projectName: 'test',
+      localId: 13,
+    };
+
+    assert.equal(element._linkText, 'Issue test:13');
+
+    element.short = true;
+
+    assert.equal(element._linkText, 'test:13');
+  });
+
+  it('shows projectName only when different from global', async () => {
+    element.issue = {
+      projectName: 'test',
+      localId: 11,
+    };
+    await element.updateComplete;
+
+    const link = element.shadowRoot.querySelector('#bugLink');
+    assert.equal(link.textContent.trim(), 'Issue test:11');
+
+    element.projectName = 'test';
+    await element.updateComplete;
+
+    assert.equal(link.textContent.trim(), 'Issue 11');
+
+    element.projectName = 'other';
+    await element.updateComplete;
+
+    await element.updateComplete;
+
+    assert.equal(link.textContent.trim(), 'Issue test:11');
+  });
+
+  it('shows links for issues', async () => {
+    element.issue = {
+      projectName: 'test',
+      localId: 11,
+    };
+
+    await element.updateComplete;
+
+    const link = element.shadowRoot.querySelector('#bugLink');
+    assert.include(link.href.trim(), '/p/test/issues/detail?id=11');
+    assert.equal(link.title, '');
+  });
+
+  it('shows links for federated issues', async () => {
+    element.issue = {
+      extIdentifier: 'b/5678',
+    };
+
+    await element.updateComplete;
+
+    const link = element.shadowRoot.querySelector('#bugLink');
+    assert.include(link.href.trim(), 'https://issuetracker.google.com/issues/5678');
+    assert.equal(link.title, '');
+  });
+
+  it('displays an icon for federated references', async () => {
+    element.issue = {
+      extIdentifier: 'b/5678',
+    };
+
+    await element.updateComplete;
+
+    const dropdown = element.shadowRoot.querySelector('mr-dropdown');
+    assert.isNotNull(dropdown);
+    const anchor = dropdown.shadowRoot.querySelector('.anchor');
+    assert.isNotNull(anchor);
+    assert.include(anchor.innerText, 'info_outline');
+  });
+
+  it('displays an info popup for federated references', async () => {
+    element.issue = {
+      extIdentifier: 'b/5678',
+    };
+
+    await element.updateComplete;
+
+    const dropdown = element.shadowRoot.querySelector('mr-dropdown');
+    const anchor = dropdown.shadowRoot.querySelector('.anchor');
+    anchor.click();
+
+    await dropdown.updateComplete;
+
+    assert.isTrue(dropdown.opened);
+
+    const cue = dropdown.querySelector('mr-fed-ref-cue');
+    assert.isNotNull(cue);
+    const message = cue.shadowRoot.querySelector('#message');
+    assert.isNotNull(message);
+    assert.include(message.innerText, 'Buganizer issue tracker');
+  });
+
+  it('shows title when summary is defined', async () => {
+    element.issue = {
+      projectName: 'test',
+      localId: 11,
+      summary: 'Summary',
+    };
+
+    await element.updateComplete;
+    const link = element.shadowRoot.querySelector('#bugLink');
+    assert.equal(link.title, 'Summary');
+  });
+});
diff --git a/static_src/elements/framework/links/mr-user-link/mr-user-link.js b/static_src/elements/framework/links/mr-user-link/mr-user-link.js
new file mode 100644
index 0000000..c009f89
--- /dev/null
+++ b/static_src/elements/framework/links/mr-user-link/mr-user-link.js
@@ -0,0 +1,129 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import {connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import {EMPTY_FIELD_VALUE} from 'shared/issue-fields.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+
+const NULL_DISPLAY_NAME_VALUES = [EMPTY_FIELD_VALUE, 'a_deleted_user'];
+
+/**
+ * `<mr-user-link>`
+ *
+ * Displays a link to a user profile.
+ *
+ */
+export class MrUserLink extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          display: inline-block;
+          white-space: nowrap;
+        }
+        i.inline-icon {
+          font-size: var(--chops-icon-font-size);
+          color: #B71C1C;
+          vertical-align: bottom;
+          cursor: pointer;
+        }
+        i.inline-icon-unseen {
+          color: var(--chops-purple-700);
+        }
+        i.material-icons[hidden] {
+          display: none;
+        }
+        .availability-notice {
+          color: #B71C1C;
+          font-weight: bold;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      referencedUsers: {
+        type: Object,
+      },
+      showAvailabilityIcon: {
+        type: Boolean,
+      },
+      showAvailabilityText: {
+        type: Boolean,
+      },
+      userRef: {
+        type: Object,
+        attribute: 'userref',
+      },
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.userRef = {};
+    this.referencedUsers = new Map();
+    this.showAvailabilityIcon = false;
+    this.showAvailabilityText = false;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.referencedUsers = issueV0.referencedUsers(state);
+  }
+
+  /** @override */
+  render() {
+    const availability = this._getAvailability();
+    const userLink = this._getUserLink();
+    const user = this.referencedUsers.get(this.userRef.displayName) || {};
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
+            rel="stylesheet">
+      <i
+        id="availability-icon"
+        class="material-icons inline-icon ${user.last_visit_timestamp ? "" : "inline-icon-unseen"}"
+        title="${availability}"
+        ?hidden="${!(this.showAvailabilityIcon && availability)}"
+      >schedule</i>
+      <a
+        id="user-link"
+        href="${userLink}"
+        title="${this.userRef.displayName}"
+        ?hidden="${!userLink}"
+      >${this.userRef.displayName}</a>
+      <span
+        id="user-text"
+        ?hidden="${userLink}"
+      >${this.userRef.displayName}</span>
+      <div
+        id="availability-text"
+        class="availability-notice"
+        title="${availability}"
+        ?hidden="${!(this.showAvailabilityText && availability)}"
+      >${availability}</div>
+    `;
+  }
+
+  _getAvailability() {
+    if (!this.userRef || !this.referencedUsers) return '';
+    const user = this.referencedUsers.get(this.userRef.displayName) || {};
+    return user.availability;
+  }
+
+  _getUserLink() {
+    if (!this.userRef || !this.userRef.displayName ||
+        NULL_DISPLAY_NAME_VALUES.includes(this.userRef.displayName)) return '';
+    return `/u/${this.userRef.userId || this.userRef.displayName}`;
+  }
+}
+customElements.define('mr-user-link', MrUserLink);
diff --git a/static_src/elements/framework/links/mr-user-link/mr-user-link.test.js b/static_src/elements/framework/links/mr-user-link/mr-user-link.test.js
new file mode 100644
index 0000000..77af246
--- /dev/null
+++ b/static_src/elements/framework/links/mr-user-link/mr-user-link.test.js
@@ -0,0 +1,156 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrUserLink} from './mr-user-link.js';
+
+
+let element;
+let availabilityIcon;
+let userLink;
+let userText;
+let availabilityText;
+
+function getElements() {
+  availabilityIcon = element.shadowRoot.querySelector(
+      '#availability-icon');
+  userLink = element.shadowRoot.querySelector(
+      '#user-link');
+  userText = element.shadowRoot.querySelector(
+      '#user-text');
+  availabilityText = element.shadowRoot.querySelector(
+      '#availability-text');
+}
+
+describe('mr-user-link', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-user-link');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrUserLink);
+  });
+
+  it('no link when no userId and displayName is null value', async () => {
+    element.userRef = {displayName: '----'};
+
+    await element.updateComplete;
+    getElements();
+
+    assert.isFalse(userText.hidden);
+    assert.equal(userText.textContent, '----');
+
+    assert.isTrue(availabilityIcon.hidden);
+    assert.isTrue(userLink.hidden);
+    assert.isTrue(availabilityText.hidden);
+  });
+
+  it('link when displayName', async () => {
+    element.userRef = {displayName: 'test@example.com'};
+
+    await element.updateComplete;
+    getElements();
+
+    assert.isFalse(userLink.hidden);
+    assert.equal(userLink.textContent.trim(), 'test@example.com');
+    assert.isTrue(userLink.href.endsWith('/u/test@example.com'));
+
+    assert.isTrue(availabilityIcon.hidden);
+    assert.isTrue(userText.hidden);
+    assert.isTrue(availabilityText.hidden);
+  });
+
+  it('link when userId', async () => {
+    element.userRef = {userId: '1234', displayName: 'test@example.com'};
+
+    await element.updateComplete;
+    getElements();
+
+    assert.isFalse(userLink.hidden);
+    assert.equal(userLink.textContent.trim(), 'test@example.com');
+    assert.isTrue(userLink.href.endsWith('/u/1234'));
+
+    assert.isTrue(availabilityIcon.hidden);
+    assert.isTrue(userText.hidden);
+    assert.isTrue(availabilityText.hidden);
+  });
+
+  it('show availability', async () => {
+    element.userRef = {userId: '1234', displayName: 'test@example.com'};
+    element.referencedUsers = new Map(
+        [['test@example.com', {availability: 'foo'}]]);
+    element.showAvailabilityIcon = true;
+
+    await element.updateComplete;
+    getElements();
+
+    assert.isFalse(availabilityIcon.hidden);
+    assert.equal(availabilityIcon.title, 'foo');
+
+    assert.isFalse(userLink.hidden);
+    assert.isTrue(userText.hidden);
+    assert.isTrue(availabilityText.hidden);
+  });
+
+  it('dont show availability', async () => {
+    element.userRef = {userId: '1234', displayName: 'test@example.com'};
+    element.referencedUsers = new Map(
+        [['test@example.com', {availability: 'foo'}]]);
+
+    await element.updateComplete;
+    getElements();
+
+    assert.isTrue(availabilityIcon.hidden);
+
+    assert.isFalse(userLink.hidden);
+    assert.isTrue(userText.hidden);
+    assert.isTrue(availabilityText.hidden);
+  });
+
+  it('show availability text', async () => {
+    element.userRef = {userId: '1234', displayName: 'test@example.com'};
+    element.referencedUsers = new Map(
+        [['test@example.com', {availability: 'foo'}]]);
+    element.showAvailabilityText = true;
+
+    await element.updateComplete;
+    getElements();
+
+    assert.isFalse(availabilityText.hidden);
+    assert.equal(availabilityText.title, 'foo');
+    assert.equal(availabilityText.textContent, 'foo');
+
+    assert.isTrue(availabilityIcon.hidden);
+    assert.isFalse(userLink.hidden);
+    assert.isTrue(userText.hidden);
+  });
+
+  it('show availability user never visited', async () => {
+    element.userRef = {userId: '1234', displayName: 'test@example.com'};
+    element.referencedUsers = new Map(
+        [['test@example.com', {last_visit_timestamp: undefined}]]);
+
+    await element.updateComplete;
+    getElements();
+
+    assert.isTrue(availabilityIcon.classList.contains("inline-icon-unseen"));
+  });
+
+  it('show availability user visited', async () => {
+    element.userRef = {userId: '1234', displayName: 'test@example.com'};
+    element.referencedUsers = new Map(
+        [['test@example.com', {last_visit_timestamp: "35"}]]);
+
+    await element.updateComplete;
+    getElements();
+
+    assert.isTrue(availabilityIcon.classList.contains("inline-icon"));
+    assert.isFalse(availabilityIcon.classList.contains("inline-icon-unseen"));
+  });
+});
diff --git a/static_src/elements/framework/mr-autocomplete/mr-autocomplete.js b/static_src/elements/framework/mr-autocomplete/mr-autocomplete.js
new file mode 100644
index 0000000..c37eb42
--- /dev/null
+++ b/static_src/elements/framework/mr-autocomplete/mr-autocomplete.js
@@ -0,0 +1,105 @@
+// Copyright 2019 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.
+
+import {ChopsAutocomplete} from
+  'elements/chops/chops-autocomplete/chops-autocomplete';
+import {connectStore} from 'reducers/base.js';
+import * as userV0 from 'reducers/userV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import {arrayDifference} from 'shared/helpers.js';
+import {userRefsToDisplayNames} from 'shared/convertersV0.js';
+
+
+/**
+ * `<mr-autocomplete>` displays an autocomplete input.
+ *
+ */
+export class MrAutocomplete extends connectStore(ChopsAutocomplete) {
+  /** @override */
+  static get properties() {
+    return {
+      ...ChopsAutocomplete.properties,
+      /**
+       * String for the name of autocomplete vocabulary used.
+       * Valid values:
+       *  - 'project': Names of projects available to the current user.
+       *  - 'member': All members in the current project a user is viewing.
+       *  - 'owner': Similar to member, except with groups excluded.
+       *
+       * TODO(zhangtiff): Implement the following stores.
+       *  - 'component': All components in the current project.
+       *  - 'label': Well-known labels in the current project.
+       */
+      vocabularyName: {type: String},
+      /**
+       * Object where the keys are 'type' values and each value is an object
+       * with the format {strings, docDict, replacer}.
+       */
+      vocabularies: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.vocabularyName = '';
+    this.vocabularies = {};
+  }
+
+  /** @override */
+  stateChanged(state) {
+    const visibleMembers = projectV0.viewedVisibleMembers(state);
+    const userProjects = userV0.projects(state);
+    this.vocabularies = {
+      'project': this._setupProjectVocabulary(userProjects),
+      'member': this._setupMemberVocabulary(visibleMembers),
+      'owner': this._setupOwnerVocabulary(visibleMembers),
+    };
+  }
+
+  // TODO(zhangtiff): Move this logic into selectors to prevent computing
+  // vocabularies for every single instance of autocomplete.
+  _setupProjectVocabulary(userProjects) {
+    const {ownerOf = [], memberOf = [], contributorTo = []} = userProjects;
+    const strings = [...ownerOf, ...memberOf, ...contributorTo];
+    return {strings};
+  }
+
+  _setupMemberVocabulary(visibleMembers) {
+    const {userRefs = []} = visibleMembers;
+    return {strings: userRefsToDisplayNames(userRefs)};
+  }
+
+  _setupOwnerVocabulary(visibleMembers) {
+    const {userRefs = [], groupRefs = []} = visibleMembers;
+    const groups = userRefsToDisplayNames(groupRefs);
+    const users = userRefsToDisplayNames(userRefs);
+
+    // Remove groups from the list of all members.
+    const owners = arrayDifference(users, groups);
+    return {strings: owners};
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('vocabularyName') ||
+        changedProperties.has('vocabularies')) {
+      if (this.vocabularyName in this.vocabularies) {
+        const props = this.vocabularies[this.vocabularyName];
+
+        this.strings = props.strings || [];
+        this.docDict = props.docDict || {};
+        this.replacer = props.replacer;
+      } else {
+        // Clear autocomplete if there's no data for it.
+        this.strings = [];
+        this.docDict = {};
+        this.replacer = null;
+      }
+    }
+
+    super.update(changedProperties);
+  }
+}
+customElements.define('mr-autocomplete', MrAutocomplete);
diff --git a/static_src/elements/framework/mr-autocomplete/mr-autocomplete.test.js b/static_src/elements/framework/mr-autocomplete/mr-autocomplete.test.js
new file mode 100644
index 0000000..0c4e3ae
--- /dev/null
+++ b/static_src/elements/framework/mr-autocomplete/mr-autocomplete.test.js
@@ -0,0 +1,86 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrAutocomplete} from './mr-autocomplete.js';
+
+let element;
+
+describe('mr-autocomplete', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-autocomplete');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrAutocomplete);
+  });
+
+  it('sets properties based on vocabularies', async () => {
+    assert.deepEqual(element.strings, []);
+    assert.deepEqual(element.docDict, {});
+
+    element.vocabularies = {
+      'project': {
+        'strings': ['chromium', 'v8'],
+        'docDict': {'chromium': 'move the web forward'},
+      },
+    };
+
+    element.vocabularyName = 'project';
+
+    await element.updateComplete;
+
+    assert.deepEqual(element.strings, ['chromium', 'v8']);
+    assert.deepEqual(element.docDict, {'chromium': 'move the web forward'});
+  });
+
+  it('_setupProjectVocabulary', () => {
+    assert.deepEqual(element._setupProjectVocabulary({}), {strings: []});
+
+    assert.deepEqual(element._setupProjectVocabulary({
+      ownerOf: ['chromium'],
+      memberOf: ['skia'],
+      contributorTo: ['v8'],
+    }), {strings: ['chromium', 'skia', 'v8']});
+  });
+
+  it('_setupMemberVocabulary', () => {
+    assert.deepEqual(element._setupMemberVocabulary({}), {strings: []});
+
+    assert.deepEqual(element._setupMemberVocabulary({
+      userRefs: [
+        {displayName: 'group@example.com', userId: '100'},
+        {displayName: 'test@example.com', userId: '123'},
+        {displayName: 'test2@example.com', userId: '543'},
+      ],
+      groupRefs: [
+        {displayName: 'group@example.com', userId: '100'},
+      ],
+    }), {strings:
+      ['group@example.com', 'test@example.com', 'test2@example.com'],
+    });
+  });
+
+  it('_setupOwnerVocabulary', () => {
+    assert.deepEqual(element._setupOwnerVocabulary({}), {strings: []});
+
+    assert.deepEqual(element._setupOwnerVocabulary({
+      userRefs: [
+        {displayName: 'group@example.com', userId: '100'},
+        {displayName: 'test@example.com', userId: '123'},
+        {displayName: 'test2@example.com', userId: '543'},
+      ],
+      groupRefs: [
+        {displayName: 'group@example.com', userId: '100'},
+      ],
+    }), {strings:
+      ['test@example.com', 'test2@example.com'],
+    });
+  });
+});
diff --git a/static_src/elements/framework/mr-button-bar/mr-button-bar.js b/static_src/elements/framework/mr-button-bar/mr-button-bar.js
new file mode 100644
index 0000000..8cff503
--- /dev/null
+++ b/static_src/elements/framework/mr-button-bar/mr-button-bar.js
@@ -0,0 +1,100 @@
+// Copyright 2020 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import 'elements/framework/mr-dropdown/mr-dropdown.js';
+
+import 'shared/typedef.js';
+
+/** Button bar containing table controls. */
+export class MrButtonBar extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: flex;
+      }
+      button {
+        background: none;
+        color: var(--chops-link-color);
+        cursor: pointer;
+        font-size: var(--chops-normal-font-size);
+        font-weight: var(--chops-link-font-weight);
+
+        line-height: 24px;
+        padding: 4px 16px;
+
+        border: none;
+
+        align-items: center;
+        display: inline-flex;
+      }
+      button:hover {
+        background: var(--chops-active-choice-bg);
+      }
+      i.material-icons {
+        font-size: 20px;
+        margin-right: 4px;
+        vertical-align: middle;
+      }
+      mr-dropdown {
+        --mr-dropdown-anchor-padding: 6px 4px;
+        --mr-dropdown-icon-color: var(--chops-link-color);
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      ${this.items.map(_renderItem)}
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      items: {type: Array},
+    };
+  };
+
+  /** @override */
+  constructor() {
+    super();
+
+    /** @type {Array<MenuItem>} */
+    this.items = [];
+  }
+};
+
+/**
+ * Renders one item.
+ * @param {MenuItem} item
+ * @return {TemplateResult}
+ */
+function _renderItem(item) {
+  if (item.items) {
+    return html`
+      <mr-dropdown
+        icon=${item.icon}
+        menuAlignment="left"
+        label=${item.text}
+        .items=${item.items}
+      ></mr-dropdown>
+    `;
+  } else {
+    return html`
+      <button @click=${item.handler}>
+        <i class="material-icons" ?hidden=${!item.icon}>
+          ${item.icon}
+        </i>
+        ${item.text}
+      </button>
+    `;
+  }
+}
+
+customElements.define('mr-button-bar', MrButtonBar);
diff --git a/static_src/elements/framework/mr-button-bar/mr-button-bar.test.js b/static_src/elements/framework/mr-button-bar/mr-button-bar.test.js
new file mode 100644
index 0000000..349a8df
--- /dev/null
+++ b/static_src/elements/framework/mr-button-bar/mr-button-bar.test.js
@@ -0,0 +1,53 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import {MrButtonBar} from './mr-button-bar.js';
+
+/** @type {MrButtonBar} */
+let element;
+
+describe('mr-button-bar', () => {
+  beforeEach(() => {
+    // @ts-ignore
+    element = document.createElement('mr-button-bar');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrButtonBar);
+  });
+
+  it('renders button items', async () => {
+    const handler = sinon.stub();
+
+    element.items = [{icon: 'emoji_nature', text: 'Pollinate', handler}];
+    await element.updateComplete;
+
+    const button = element.shadowRoot.querySelector('button');
+    button.click();
+
+    assert.include(button.innerHTML, 'emoji_nature');
+    assert.include(button.innerHTML, 'Pollinate');
+    sinon.assert.calledOnce(handler);
+  });
+
+  it('renders dropdown items', async () => {
+    const items = [{icon: 'emoji_nature', text: 'Pollinate'}];
+    element.items = [{icon: 'more_vert', text: 'More actions...', items}];
+    await element.updateComplete;
+
+    /** @type {MrDropdown} */
+    const dropdown = element.shadowRoot.querySelector('mr-dropdown');
+    assert.strictEqual(dropdown.icon, 'more_vert');
+    assert.strictEqual(dropdown.label, 'More actions...');
+    assert.strictEqual(dropdown.items, items);
+  });
+});
diff --git a/static_src/elements/framework/mr-comment-content/mr-attachment.js b/static_src/elements/framework/mr-comment-content/mr-attachment.js
new file mode 100644
index 0000000..c435dfd
--- /dev/null
+++ b/static_src/elements/framework/mr-comment-content/mr-attachment.js
@@ -0,0 +1,206 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import {FILE_DOWNLOAD_WARNING, ALLOWED_ATTACHMENT_EXTENSIONS,
+  ALLOWED_CONTENT_TYPE_PREFIXES} from 'shared/settings.js';
+import 'elements/chops/chops-button/chops-button.js';
+import {store, connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import {prpcClient} from 'prpc-client-instance.js';
+
+/**
+ * `<mr-attachment>`
+ *
+ * Display attachments for Monorail comments.
+ *
+ */
+export class MrAttachment extends connectStore(LitElement) {
+  /** @override */
+  static get properties() {
+    return {
+      attachment: {type: Object},
+      projectName: {type: String},
+      localId: {type: Number},
+      sequenceNum: {type: Number},
+      canDelete: {type: Boolean},
+    };
+  }
+
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        .attachment-view,
+        .attachment-download {
+          margin-left: 8px;
+          display: block;
+        }
+        .attachment-delete {
+          margin-left: 16px;
+          color: var(--chops-button-color);
+          background: var(--chops-button-bg);
+          border-color: transparent;
+        }
+        .comment-attachment {
+          min-width: 20%;
+          width: fit-content;
+          background: var(--chops-card-details-bg);
+          padding: 4px;
+          margin: 8px;
+          overflow: auto;
+        }
+        .comment-attachment-header {
+          display: flex;
+          flex-wrap: nowrap;
+        }
+        .filename {
+          margin-left: 8px;
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+        }
+        .filename-deleted {
+          margin-right: 4px;
+        }
+        .filesize {
+          margin-left: 8px;
+          white-space: nowrap;
+        }
+        .preview {
+          border: 2px solid #c3d9ff;
+          padding: 1px;
+          max-width: 98%;
+        }
+        .preview:hover {
+          border: 2px solid blue;
+        }
+      `];
+  }
+
+
+  /** @override */
+  render() {
+    return html`
+      <div class="comment-attachment">
+        <div class="filename">
+          ${this.attachment.isDeleted ? html`
+            <div class="filename-deleted">[Deleted]</div>
+          ` : ''}
+          <b>${this.attachment.filename}</b>
+          ${this.canDelete ? html`
+            <chops-button
+              class="attachment-delete"
+              @click=${this._deleteAttachment}>
+              ${this.attachment.isDeleted ? 'Undelete' : 'Delete'}
+            </chops-button>
+          ` : ''}
+        </div>
+        ${!this.attachment.isDeleted ? html`
+          <div class="comment-attachment-header">
+            <div class="filesize">${_bytesOrKbOrMb(this.attachment.size)}</div>
+            ${this.attachment.viewUrl ? html`
+              <a
+                class="attachment-view"
+                href=${this.attachment.viewUrl}
+                target="_blank"
+              >View</a>
+            `: ''}
+            <a
+              class="attachment-download"
+              href=${this.attachment.downloadUrl}
+              target="_blank"
+              ?hidden=${!this.attachment.downloadUrl}
+              @click=${this._warnOnDownload}
+            >Download</a>
+          </div>
+          ${this.attachment.thumbnailUrl ? html`
+            <a href=${this.attachment.viewUrl} target="_blank">
+              <img
+                class="preview" alt="attachment preview"
+                src=${this.attachment.thumbnailUrl}>
+            </a>
+          ` : ''}
+          ${_isVideo(this.attachment.contentType) ? html`
+            <video
+              src=${this.attachment.viewUrl}
+              class="preview"
+              controls
+              width="640"
+              preload="metadata"
+            ></video>
+          ` : ''}
+        ` : ''}
+      </div>
+    `;
+  }
+
+  /**
+   * Deletes a given attachment in a comment.
+   */
+  _deleteAttachment() {
+    const issueRef = {
+      projectName: this.projectName,
+      localId: this.localId,
+    };
+
+    const promise = prpcClient.call(
+        'monorail.Issues', 'DeleteAttachment',
+        {
+          issueRef,
+          sequenceNum: this.sequenceNum,
+          attachmentId: this.attachment.attachmentId,
+          delete: !this.attachment.isDeleted,
+        });
+
+    promise.then(() => {
+      store.dispatch(issueV0.fetchComments(issueRef));
+    }, (error) => {
+      console.log('Failed to (un)delete attachment', error);
+    });
+  }
+
+  /**
+   * Give the user a warning before they download files that Monorail thinks
+   * might have the potential to be unsafe.
+   * @param {MouseEvent} e
+   */
+  _warnOnDownload(e) {
+    const isAllowedType = ALLOWED_CONTENT_TYPE_PREFIXES.some((prefix) => {
+      return this.attachment.contentType.startsWith(prefix);
+    });
+    const isAllowedExtension = ALLOWED_ATTACHMENT_EXTENSIONS.some((ext) => {
+      return this.attachment.filename.toLowerCase().endsWith(ext);
+    });
+
+    if (isAllowedType || isAllowedExtension) return;
+    if (!window.confirm(FILE_DOWNLOAD_WARNING)) {
+      e.preventDefault();
+    }
+  }
+}
+
+function _isVideo(contentType) {
+  if (!contentType) return;
+  return contentType.startsWith('video/');
+}
+
+function _bytesOrKbOrMb(numBytes) {
+  if (numBytes < 1024) {
+    return `${numBytes} bytes`; // e.g., 128 bytes
+  } else if (numBytes < 99 * 1024) {
+    return `${(numBytes / 1024).toFixed(1)} KB`; // e.g. 23.4 KB
+  } else if (numBytes < 1024 * 1024) {
+    return `${(numBytes / 1024).toFixed(0)} KB`; // e.g., 219 KB
+  } else if (numBytes < 99 * 1024 * 1024) {
+    return `${(numBytes / 1024 / 1024).toFixed(1)} MB`; // e.g., 21.9 MB
+  } else {
+    return `${(numBytes / 1024 / 1024).toFixed(0)} MB`; // e.g., 100 MB
+  }
+}
+
+customElements.define('mr-attachment', MrAttachment);
diff --git a/static_src/elements/framework/mr-comment-content/mr-attachment.test.js b/static_src/elements/framework/mr-comment-content/mr-attachment.test.js
new file mode 100644
index 0000000..ec79c66
--- /dev/null
+++ b/static_src/elements/framework/mr-comment-content/mr-attachment.test.js
@@ -0,0 +1,228 @@
+// Copyright 2019 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.
+
+import {assert, expect} from 'chai';
+import {MrAttachment} from './mr-attachment.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import {FILE_DOWNLOAD_WARNING} from 'shared/settings.js';
+
+let element;
+
+describe('mr-attachment', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-attachment');
+    document.body.appendChild(element);
+    sinon.stub(prpcClient, 'call').returns(Promise.resolve({}));
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+    prpcClient.call.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrAttachment);
+  });
+
+  it('shows image thumbnail', async () => {
+    element.attachment = {
+      thumbnailUrl: 'thumbnail.jpeg',
+      contentType: 'image/jpeg',
+    };
+    await element.updateComplete;
+    const img = element.shadowRoot.querySelector('img');
+    assert.isNotNull(img);
+    assert.isTrue(img.src.endsWith('thumbnail.jpeg'));
+  });
+
+  it('shows video thumbnail', async () => {
+    element.attachment = {
+      viewUrl: 'video.mp4',
+      contentType: 'video/mpeg',
+    };
+    await element.updateComplete;
+    const video = element.shadowRoot.querySelector('video');
+    assert.isNotNull(video);
+    assert.isTrue(video.src.endsWith('video.mp4'));
+  });
+
+  it('does not show image thumbnail if deleted', async () => {
+    element.attachment = {
+      thumbnailUrl: 'thumbnail.jpeg',
+      contentType: 'image/jpeg',
+      isDeleted: true,
+    };
+    await element.updateComplete;
+    const img = element.shadowRoot.querySelector('img');
+    assert.isNull(img);
+  });
+
+  it('does not show video thumbnail if deleted', async () => {
+    element.attachment = {
+      viewUrl: 'video.mp4',
+      contentType: 'video/mpeg',
+      isDeleted: true,
+    };
+    await element.updateComplete;
+    const video = element.shadowRoot.querySelector('video');
+    assert.isNull(video);
+  });
+
+  it('deletes attachment', async () => {
+    prpcClient.call.callsFake(() => Promise.resolve({}));
+
+    element.attachment = {
+      attachmentId: 67890,
+      isDeleted: false,
+    };
+    element.canDelete = true;
+    element.projectName = 'proj';
+    element.localId = 1234;
+    element.sequenceNum = 3;
+    await element.updateComplete;
+
+    const deleteButton = element.shadowRoot.querySelector('chops-button');
+    deleteButton.click();
+
+    assert.deepEqual(prpcClient.call.getCall(0).args, [
+      'monorail.Issues', 'DeleteAttachment',
+      {
+        issueRef: {
+          projectName: 'proj',
+          localId: 1234,
+        },
+        sequenceNum: 3,
+        attachmentId: 67890,
+        delete: true,
+      },
+    ]);
+    assert.isTrue(prpcClient.call.calledOnce);
+  });
+
+  it('undeletes attachment', async () => {
+    prpcClient.call.callsFake(() => Promise.resolve({}));
+    element.attachment = {
+      attachmentId: 67890,
+      isDeleted: true,
+    };
+    element.canDelete = true;
+    element.projectName = 'proj';
+    element.localId = 1234;
+    element.sequenceNum = 3;
+    await element.updateComplete;
+
+    const deleteButton = element.shadowRoot.querySelector('chops-button');
+    deleteButton.click();
+
+    assert.deepEqual(prpcClient.call.getCall(0).args, [
+      'monorail.Issues', 'DeleteAttachment',
+      {
+        issueRef: {
+          projectName: 'proj',
+          localId: 1234,
+        },
+        sequenceNum: 3,
+        attachmentId: 67890,
+        delete: false,
+      },
+    ]);
+    assert.isTrue(prpcClient.call.calledOnce);
+  });
+
+  it('view link is not displayed if not given', async () => {
+    element.attachment = {};
+    await element.updateComplete;
+    const viewLink = element.shadowRoot.querySelector('.attachment-view');
+    assert.isNull(viewLink);
+  });
+
+  it('view link is displayed if given', async () => {
+    element.attachment = {
+      viewUrl: 'http://example.com/attachment.foo',
+    };
+    await element.updateComplete;
+    const viewLink = element.shadowRoot.querySelector('.attachment-view');
+    assert.isNotNull(viewLink);
+    expect(viewLink).to.be.displayed;
+    assert.equal(viewLink.href, 'http://example.com/attachment.foo');
+  });
+
+  describe('download', () => {
+    let downloadLink;
+
+    beforeEach(async () => {
+      sinon.stub(window, 'confirm').returns(false);
+
+
+      element.attachment = {};
+      await element.updateComplete;
+      downloadLink = element.shadowRoot.querySelector('.attachment-download');
+      // Prevent Karma from opening up new tabs because of simulated link
+      // clicks.
+      downloadLink.removeAttribute('target');
+    });
+
+    afterEach(() => {
+      window.confirm.restore();
+    });
+
+    it('download link is not displayed if not given', async () => {
+      element.attachment = {};
+      await element.updateComplete;
+      assert.isTrue(downloadLink.hidden);
+    });
+
+    it('download link is displayed if given', async () => {
+      element.attachment = {
+        downloadUrl: 'http://example.com/attachment.foo',
+      };
+      await element.updateComplete;
+      const downloadLink = element.shadowRoot.querySelector(
+          '.attachment-download');
+      assert.isFalse(downloadLink.hidden);
+      expect(downloadLink).to.be.displayed;
+      assert.equal(downloadLink.href, 'http://example.com/attachment.foo');
+    });
+
+    it('download allows recognized file extension and type', async () => {
+      element.attachment = {
+        contentType: 'image/png',
+        filename: 'not-a-virus.png',
+        downloadUrl: '#',
+      };
+      await element.updateComplete;
+
+      downloadLink.click();
+
+      sinon.assert.notCalled(window.confirm);
+    });
+
+    it('file extension matching is case insensitive', async () => {
+      element.attachment = {
+        contentType: 'image/png',
+        filename: 'not-a-virus.PNG',
+        downloadUrl: '#',
+      };
+      await element.updateComplete;
+
+      downloadLink.click();
+
+      sinon.assert.notCalled(window.confirm);
+    });
+
+    it('download warns on unrecognized file extension and type', async () => {
+      element.attachment = {
+        contentType: 'application/virus',
+        filename: 'fake-virus.exe',
+        downloadUrl: '#',
+      };
+      await element.updateComplete;
+
+      downloadLink.click();
+
+      sinon.assert.calledOnce(window.confirm);
+      sinon.assert.calledWith(window.confirm, FILE_DOWNLOAD_WARNING);
+    });
+  });
+});
diff --git a/static_src/elements/framework/mr-comment-content/mr-comment-content.js b/static_src/elements/framework/mr-comment-content/mr-comment-content.js
new file mode 100644
index 0000000..c2bf3e8
--- /dev/null
+++ b/static_src/elements/framework/mr-comment-content/mr-comment-content.js
@@ -0,0 +1,131 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import {ifDefined} from 'lit-html/directives/if-defined';
+import {autolink} from 'autolink.js';
+import {connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as userV0 from 'reducers/userV0.js';
+import {SHARED_STYLES, MD_STYLES} from 'shared/shared-styles.js';
+import {shouldRenderMarkdown, renderMarkdown} from 'shared/md-helper.js';
+import {unsafeHTML} from 'lit-html/directives/unsafe-html.js';
+
+/**
+ * `<mr-comment-content>`
+ *
+ * Displays text for a comment.
+ *
+ */
+export class MrCommentContent extends connectStore(LitElement) {
+  /** @override */
+  constructor() {
+    super();
+
+    this.content = '';
+    this.commentReferences = new Map();
+    this.isDeleted = false;
+    this.projectName = '';
+    this.author = '';
+    this.prefs = {};
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      content: {type: String},
+      commentReferences: {type: Object},
+      revisionUrlFormat: {type: String},
+      isDeleted: {
+        type: Boolean,
+        reflect: true,
+      },
+      projectName: {type: String},
+      author: {type: String},
+      prefs: {type: Object},
+    };
+  }
+
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      MD_STYLES,
+      css`
+        :host {
+          word-break: break-word;
+          font-size: var(--chops-main-font-size);
+          line-height: 130%;
+          font-family: var(--mr-toggled-font-family);
+        }
+        :host([isDeleted]) {
+          color: #888;
+          font-style: italic;
+        }
+        .line {
+          white-space: pre-wrap;
+        }
+        .strike-through {
+          text-decoration: line-through;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    if (shouldRenderMarkdown({project: this.projectName, author: this.author,
+          enabled: this._renderMarkdown})) {
+      return html`
+        <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+        <div class="markdown">
+          ${unsafeHTML(renderMarkdown(this.content))}
+        </div>
+        `;
+    }
+    const runs = autolink.markupAutolinks(
+        this.content, this.commentReferences, this.projectName,
+        this.revisionUrlFormat);
+    const templates = runs.map((run) => {
+      switch (run.tag) {
+        case 'b':
+          return html`<b class="line">${run.content}</b>`;
+        case 'br':
+          return html`<br>`;
+        case 'a':
+          return html`<a
+            class="line"
+            target="_blank"
+            href=${run.href}
+            class=${run.css}
+            title=${ifDefined(run.title)}
+          >${run.content}</a>`;
+        default:
+          return html`<span class="line">${run.content}</span>`;
+      }
+    });
+    return html`${templates}`;
+  }
+
+  /**
+   * Helper to get state of Markdown rendering.
+   * @return {boolean} Whether to render Markdown.
+   */
+  get _renderMarkdown() {
+    const {prefs} = this;
+    if (!prefs) return true;
+    return prefs.get('render_markdown');
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.commentReferences = issueV0.commentReferences(state);
+    this.projectName = issueV0.viewedIssueRef(state).projectName;
+    this.revisionUrlFormat =
+      projectV0.viewedPresentationConfig(state).revisionUrlFormat;
+    this.prefs = userV0.prefs(state);
+  }
+}
+customElements.define('mr-comment-content', MrCommentContent);
diff --git a/static_src/elements/framework/mr-comment-content/mr-comment-content.test.js b/static_src/elements/framework/mr-comment-content/mr-comment-content.test.js
new file mode 100644
index 0000000..4eeaab5
--- /dev/null
+++ b/static_src/elements/framework/mr-comment-content/mr-comment-content.test.js
@@ -0,0 +1,84 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrCommentContent} from './mr-comment-content.js';
+
+
+let element;
+
+describe('mr-comment-content', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-comment-content');
+    document.body.appendChild(element);
+
+    document.body.style.setProperty('--mr-toggled-font-family', 'Some-font');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+
+    document.body.style.removeProperty('--mr-toggled-font-family');
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrCommentContent);
+  });
+
+  it('changes rendered font based on --mr-toggled-font-family', async () => {
+    element.content = 'A comment';
+
+    await element.updateComplete;
+
+    const fontFamily = window.getComputedStyle(element).getPropertyValue(
+        'font-family');
+
+    assert.equal(fontFamily, 'Some-font');
+  });
+
+  it('does not render spurious spaces', async () => {
+    element.content =
+      'Some text before a go/link and more text before <b>some bold text</b>.';
+
+    await element.updateComplete;
+
+    const textContents = Array.from(element.shadowRoot.children).map(
+        (child) => child.textContent);
+
+    assert.deepEqual(textContents, [
+      'Some text before a',
+      ' ',
+      'go/link',
+      ' and more text before ',
+      'some bold text',
+      '.',
+    ]);
+
+    assert.deepEqual(
+        element.shadowRoot.textContent,
+        'Some text before a go/link and more text before some bold text.');
+  });
+
+  it('does render markdown', async () => {
+    element.prefs = new Map([['render_markdown', true]]);
+    element.content = '### this is a header';
+    element.projectName = 'monkeyrail';
+
+    await element.updateComplete;
+
+    const headerText = element.shadowRoot.querySelector('h3').textContent;
+    assert.equal(headerText, 'this is a header');
+  });
+
+  it('does not render markdown when prefs are set to false', async () => {
+    element.prefs = new Map([['render_markdown', false]]);
+    element.projectName = 'monkeyrail';
+    element.content = '### this is a header';
+
+    await element.updateComplete;
+
+    const commentText = element.shadowRoot.textContent;
+    assert.equal(commentText, '### this is a header');
+  });
+});
diff --git a/static_src/elements/framework/mr-comment-content/mr-description.js b/static_src/elements/framework/mr-comment-content/mr-description.js
new file mode 100644
index 0000000..89ae105
--- /dev/null
+++ b/static_src/elements/framework/mr-comment-content/mr-description.js
@@ -0,0 +1,137 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import './mr-comment-content.js';
+import './mr-attachment.js';
+
+import {relativeTime} from
+  'elements/chops/chops-timestamp/chops-timestamp-helpers';
+
+
+/**
+ * `<mr-description>`
+ *
+ * Element for displaying a description or survey.
+ *
+ */
+export class MrDescription extends LitElement {
+  /** @override */
+  constructor() {
+    super();
+
+    this.descriptionList = [];
+    this.selectedIndex = 0;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      descriptionList: {type: Array},
+      selectedIndex: {type: Number},
+    };
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    super.updated(changedProperties);
+
+    if (changedProperties.has('descriptionList')) {
+      if (!this.descriptionList || !this.descriptionList.length) return;
+      this.selectedIndex = this.descriptionList.length - 1;
+    }
+  }
+
+  /** @override */
+  static get styles() {
+    return css`
+      .select-container {
+        text-align: right;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    const selectedDescription = this.selectedDescription;
+
+    return html`
+      <div class="select-container">
+        <select
+          @change=${this._selectChanged}
+          ?hidden=${!this.descriptionList || this.descriptionList.length <= 1}
+          aria-label="Description history menu">
+          ${this.descriptionList.map((desc, i) => this._renderDescriptionOption(desc, i))}
+        </select>
+      </div>
+      <mr-comment-content
+        .content=${selectedDescription.content}
+        .author=${selectedDescription.commenter.displayName}
+      ></mr-comment-content>
+      <div>
+        ${(selectedDescription.attachments || []).map((attachment) => html`
+          <mr-attachment
+            .attachment=${attachment}
+            .projectName=${selectedDescription.projectName}
+            .localId=${selectedDescription.localId}
+            .sequenceNum=${selectedDescription.sequenceNum}
+            .canDelete=${selectedDescription.canDelete}
+          ></mr-attachment>
+        `)}
+      </div>
+    `;
+  }
+
+  /**
+   * Getter for the currently viewed description.
+   * @return {Comment} The description object.
+   */
+  get selectedDescription() {
+    const descriptions = this.descriptionList || [];
+    const index = Math.max(
+      Math.min(this.selectedIndex, descriptions.length - 1),
+      0);
+    return descriptions[index] || {};
+  }
+
+  /**
+   * Helper to render a <select> <option> for a single description, for our
+   * description selector.
+   * @param {Comment} description
+   * @param {Number} index
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderDescriptionOption(description, index) {
+    const {commenter, timestamp} = description || {};
+    const byLine = commenter ? `by ${commenter.displayName}` : '';
+    return html`
+      <option value=${index} ?selected=${index === this.selectedIndex}>
+        Description #${index + 1} ${byLine} (${_relativeTime(timestamp)})
+      </option>
+    `;
+  }
+
+  /**
+   * Updates the element's selectedIndex when the user changes the select menu.
+   * @param {Event} evt
+   */
+  _selectChanged(evt) {
+    if (!evt || !evt.target) return;
+    this.selectedIndex = Number.parseInt(evt.target.value);
+  }
+}
+
+/**
+ * Template helper for rendering relative time.
+ * @param {number} unixTime Unix timestamp in seconds.
+ * @return {string} human readable timestamp.
+ */
+function _relativeTime(unixTime) {
+  unixTime = Number.parseInt(unixTime);
+  if (Number.isNaN(unixTime)) return;
+  return relativeTime(new Date(unixTime * 1000));
+}
+
+customElements.define('mr-description', MrDescription);
diff --git a/static_src/elements/framework/mr-comment-content/mr-description.test.js b/static_src/elements/framework/mr-comment-content/mr-description.test.js
new file mode 100644
index 0000000..9d39149
--- /dev/null
+++ b/static_src/elements/framework/mr-comment-content/mr-description.test.js
@@ -0,0 +1,81 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrDescription} from './mr-description.js';
+
+
+let element;
+
+describe('mr-description', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-description');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrDescription);
+  });
+
+  it('changes rendered description on select change', async () => {
+    element.descriptionList = [
+      {content: 'description one', commenter: {displayName: 'name'}},
+      {content: 'description two', commenter: {displayName: 'name'}},
+    ];
+
+    await element.updateComplete;
+    await element.updateComplete;
+
+    const commentContent =
+      element.shadowRoot.querySelector('mr-comment-content');
+    assert.equal('description two', commentContent.content);
+
+    element.selectedIndex = 0;
+
+    await element.updateComplete;
+
+    assert.equal('description one', commentContent.content);
+  });
+
+  it('hides selector when only one description', async () => {
+    element.descriptionList = [
+      {content: 'Hello world', commenter: {displayName: 'name@email.com'}},
+      {content: 'rutabaga', commenter: {displayName: 'name@email.com'}},
+    ];
+
+    await element.updateComplete;
+
+    const selectMenu = element.shadowRoot.querySelector('select');
+    assert.isFalse(selectMenu.hidden);
+
+    element.descriptionList = [
+      {content: 'blehh', commenter: {displayName: 'name@email.com'}},
+    ];
+
+    await element.updateComplete;
+
+    assert.isTrue(selectMenu.hidden);
+  });
+
+  it('selector still renders when one description is deleted', async () => {
+    element.descriptionList = [
+      {content: 'Hello world', commenter: {displayName: 'name@email.com'}},
+      {isDeleted: true, commenter: {displayName: 'name@email.com'}},
+    ];
+
+    await element.updateComplete;
+
+    const selectMenu = element.shadowRoot.querySelector('select');
+    assert.isFalse(selectMenu.hidden);
+
+    const options = selectMenu.querySelectorAll('option');
+
+    assert.include(options[0].textContent, 'Description #1 by name@email.com');
+    assert.include(options[1].textContent, 'Description #2');
+  });
+});
diff --git a/static_src/elements/framework/mr-dropdown/mr-account-dropdown.js b/static_src/elements/framework/mr-dropdown/mr-account-dropdown.js
new file mode 100644
index 0000000..264b976
--- /dev/null
+++ b/static_src/elements/framework/mr-dropdown/mr-account-dropdown.js
@@ -0,0 +1,63 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import './mr-dropdown.js';
+
+/**
+ * `<mr-account-dropdown>`
+ *
+ * Account dropdown menu for Monorail.
+ *
+ */
+export class MrAccountDropdown extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+        :host {
+          position: relative;
+          display: inline-block;
+          height: 100%;
+          font-size: inherit;
+        }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <mr-dropdown
+        .text=${this.userDisplayName}
+        .items=${this.items}
+        .icon="arrow_drop_down"
+      ></mr-dropdown>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      userDisplayName: String,
+      logoutUrl: String,
+      loginUrl: String,
+    };
+  }
+
+  get items() {
+    return [
+      {text: 'Switch accounts', url: this.loginUrl},
+      {separator: true},
+      {text: 'Profile', url: `/u/${this.userDisplayName}`},
+      {text: 'Updates', url: `/u/${this.userDisplayName}/updates`},
+      {text: 'Settings', url: '/hosting/settings'},
+      {text: 'Saved queries', url: `/u/${this.userDisplayName}/queries`},
+      {text: 'Hotlists', url: `/u/${this.userDisplayName}/hotlists`},
+      {separator: true},
+      {text: 'Sign out', url: this.logoutUrl},
+    ];
+  }
+}
+
+customElements.define('mr-account-dropdown', MrAccountDropdown);
diff --git a/static_src/elements/framework/mr-dropdown/mr-account-dropdown.test.js b/static_src/elements/framework/mr-dropdown/mr-account-dropdown.test.js
new file mode 100644
index 0000000..f365823
--- /dev/null
+++ b/static_src/elements/framework/mr-dropdown/mr-account-dropdown.test.js
@@ -0,0 +1,23 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrAccountDropdown} from './mr-account-dropdown.js';
+
+let element;
+
+describe('mr-account-dropdown', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-account-dropdown');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrAccountDropdown);
+  });
+});
diff --git a/static_src/elements/framework/mr-dropdown/mr-dropdown.js b/static_src/elements/framework/mr-dropdown/mr-dropdown.js
new file mode 100644
index 0000000..4564ab0
--- /dev/null
+++ b/static_src/elements/framework/mr-dropdown/mr-dropdown.js
@@ -0,0 +1,367 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import {ifDefined} from 'lit-html/directives/if-defined';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import 'shared/typedef.js';
+
+export const SCREENREADER_ATTRIBUTE_ERROR = `For screenreader support,
+  mr-dropdown must always have either a label or a text property defined.`;
+
+/**
+ * `<mr-dropdown>`
+ *
+ * Dropdown menu for Monorail.
+ *
+ */
+export class MrDropdown extends LitElement {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          position: relative;
+          display: inline-block;
+          height: 100%;
+          font-size: inherit;
+          font-family: var(--chops-font-family);
+          --mr-dropdown-icon-color: var(--chops-primary-icon-color);
+          --mr-dropdown-icon-font-size: var(--chops-icon-font-size);
+          --mr-dropdown-anchor-font-weight: var(--chops-link-font-weight);
+          --mr-dropdown-anchor-padding: 4px 0.25em;
+          --mr-dropdown-anchor-justify-content: center;
+          --mr-dropdown-menu-max-height: initial;
+          --mr-dropdown-menu-overflow: initial;
+          --mr-dropdown-menu-min-width: 120%;
+          --mr-dropdown-menu-font-size: var(--chops-large-font-size);
+          --mr-dropdown-menu-icon-size: var(--chops-icon-font-size);
+        }
+        :host([hidden]) {
+          display: none;
+          visibility: hidden;
+        }
+        :host(:not([opened])) .menu {
+          display: none;
+          visibility: hidden;
+        }
+        strong {
+          font-size: var(--chops-large-font-size);
+        }
+        i.material-icons {
+          font-size: var(--mr-dropdown-icon-font-size);
+          display: inline-block;
+          color: var(--mr-dropdown-icon-color);
+          padding: 0 2px;
+          box-sizing: border-box;
+        }
+        i.material-icons[hidden],
+        .menu-item > i.material-icons[hidden] {
+          display: none;
+        }
+        .menu-item > i.material-icons {
+          display: block;
+          font-size: var(--mr-dropdown-menu-icon-size);
+          width: var(--mr-dropdown-menu-icon-size);
+          height: var(--mr-dropdown-menu-icon-size);
+          margin-right: 8px;
+        }
+        .anchor:disabled {
+          color: var(--chops-button-disabled-color);
+        }
+        button.anchor {
+          box-sizing: border-box;
+          background: none;
+          border: none;
+          font-size: inherit;
+          width: 100%;
+          height: 100%;
+          display: flex;
+          align-items: center;
+          justify-content: var(--mr-dropdown-anchor-justify-content);
+          cursor: pointer;
+          padding: var(--mr-dropdown-anchor-padding);
+          color: var(--chops-link-color);
+          font-weight: var(--mr-dropdown-anchor-font-weight);
+          font-family: inherit;
+        }
+        /* menuAlignment options: right, left, side. */
+        .menu.right {
+          right: 0px;
+        }
+        .menu.left {
+          left: 0px;
+        }
+        .menu.side {
+          left: 100%;
+          top: 0;
+        }
+        .menu {
+          font-size: var(--mr-dropdown-menu-font-size);
+          position: absolute;
+          min-width: var(--mr-dropdown-menu-min-width);
+          max-height: var(--mr-dropdown-menu-max-height);
+          overflow: var(--mr-dropdown-menu-overflow);
+          top: 90%;
+          display: block;
+          background: var(--chops-white);
+          border: var(--chops-accessible-border);
+          z-index: 990;
+          box-shadow: 2px 3px 8px 0px hsla(0, 0%, 0%, 0.3);
+          font-family: inherit;
+        }
+        .menu-item {
+          background: none;
+          margin: 0;
+          border: 0;
+          box-sizing: border-box;
+          text-decoration: none;
+          white-space: nowrap;
+          display: flex;
+          align-items: center;
+          justify-content: left;
+          width: 100%;
+          padding: 0.25em 8px;
+          transition: 0.2s background ease-in-out;
+
+        }
+        .menu-item[hidden] {
+          display: none;
+        }
+        mr-dropdown.menu-item {
+          width: 100%;
+          padding: 0;
+          --mr-dropdown-anchor-padding: 0.25em 8px;
+          --mr-dropdown-anchor-justify-content: space-between;
+        }
+        .menu hr {
+          width: 96%;
+          margin: 0 2%;
+          border: 0;
+          height: 1px;
+          background: hsl(0, 0%, 80%);
+        }
+        .menu a {
+          cursor: pointer;
+          color: var(--chops-link-color);
+        }
+        .menu a:hover, .menu a:focus {
+          background: var(--chops-active-choice-bg);
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <button class="anchor"
+        @click=${this.toggle}
+        @keydown=${this._exitMenuOnEsc}
+        ?disabled=${this.disabled}
+        title=${this.title || this.label}
+        aria-label=${this.label}
+        aria-expanded=${this.opened}
+      >
+        ${this.text}
+        <i class="material-icons" aria-hidden="true">${this.icon}</i>
+      </button>
+      <div class="menu ${this.menuAlignment}">
+        ${this.items.map((item, index) => this._renderItem(item, index))}
+        <slot></slot>
+      </div>
+    `;
+  }
+
+  /**
+   * Render a single dropdown menu item.
+   * @param {MenuItem} item
+   * @param {number} index The item's position in the list of items.
+   * @return {TemplateResult}
+   */
+  _renderItem(item, index) {
+    if (item.separator) {
+      // The menu item is a no-op divider between sections.
+      return html`
+        <strong ?hidden=${!item.text} class="menu-item">
+          ${item.text}
+        </strong>
+        <hr />
+      `;
+    }
+    if (item.items && item.items.length) {
+      // The menu contains a sub-menu.
+      return html`
+        <mr-dropdown
+          .text=${item.text}
+          .items=${item.items}
+          menuAlignment="side"
+          icon="arrow_right"
+          data-idx=${index}
+          class="menu-item"
+        ></mr-dropdown>
+      `;
+    }
+
+    return html`
+      <a
+        href=${ifDefined(item.url)}
+        @click=${this._runItemHandler}
+        @keydown=${this._onItemKeydown}
+        data-idx=${index}
+        tabindex="0"
+        class="menu-item"
+      >
+        <i
+          class="material-icons"
+          ?hidden=${item.icon === undefined}
+        >${item.icon}</i>
+        ${item.text}
+      </a>
+    `;
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this.label = '';
+    this.text = '';
+    this.items = [];
+    this.icon = 'arrow_drop_down';
+    this.menuAlignment = 'right';
+    this.opened = false;
+    this.disabled = false;
+
+    this._boundCloseOnOutsideClick = this._closeOnOutsideClick.bind(this);
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      title: {type: String},
+      label: {type: String},
+      text: {type: String},
+      items: {type: Array},
+      icon: {type: String},
+      menuAlignment: {type: String},
+      opened: {type: Boolean, reflect: true},
+      disabled: {type: Boolean},
+    };
+  }
+
+  /**
+   * Either runs the click handler attached to the clicked item and closes the
+   * menu.
+   * @param {MouseEvent|KeyboardEvent} e
+   */
+  _runItemHandler(e) {
+    if (e instanceof MouseEvent || e.code === 'Enter') {
+      const idx = e.target.dataset.idx;
+      if (idx !== undefined && this.items[idx].handler) {
+        this.items[idx].handler();
+      }
+      this.close();
+    }
+  }
+
+  /**
+   * Runs multiple event handlers when a user types a key while
+   * focusing a menu item.
+   * @param {KeyboardEvent} e
+   */
+  _onItemKeydown(e) {
+    this._runItemHandler(e);
+    this._exitMenuOnEsc(e);
+  }
+
+  /**
+   * If the user types Esc while focusing any dropdown item, then
+   * exit the dropdown.
+   * @param {KeyboardEvent} e
+   */
+  _exitMenuOnEsc(e) {
+    if (e.key === 'Escape') {
+      this.close();
+
+      // Return focus to the anchor of the dropdown on closing, so that
+      // users don't lose their overall focus position within the page.
+      const anchor = this.shadowRoot.querySelector('.anchor');
+      anchor.focus();
+    }
+  }
+
+  /** @override */
+  connectedCallback() {
+    super.connectedCallback();
+    window.addEventListener('click', this._boundCloseOnOutsideClick, true);
+  }
+
+  /** @override */
+  disconnectedCallback() {
+    super.disconnectedCallback();
+    window.removeEventListener('click', this._boundCloseOnOutsideClick, true);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('label') || changedProperties.has('text')) {
+      if (!this.label && !this.text) {
+        console.error(SCREENREADER_ATTRIBUTE_ERROR);
+      }
+    }
+  }
+
+  /**
+   * Closes and opens the dropdown menu.
+   */
+  toggle() {
+    this.opened = !this.opened;
+  }
+
+  /**
+   * Opens the dropdown menu.
+   */
+  open() {
+    this.opened = true;
+  }
+
+  /**
+   * Closes the dropdown menu.
+   */
+  close() {
+    this.opened = false;
+  }
+
+  /**
+   * Click a specific item in mr-dropdown, using JavaScript. Useful for testing.
+   *
+   * @param {number} i index of the item to click.
+   */
+  clickItem(i) {
+    const items = this.shadowRoot.querySelectorAll('.menu-item');
+    items[i].click();
+  }
+
+  /**
+   * @param {MouseEvent} evt
+   * @private
+   */
+  _closeOnOutsideClick(evt) {
+    if (!this.opened) return;
+
+    const hasMenu = evt.composedPath().find(
+        (node) => {
+          return node === this;
+        },
+    );
+    if (hasMenu) return;
+
+    this.close();
+  }
+}
+
+customElements.define('mr-dropdown', MrDropdown);
diff --git a/static_src/elements/framework/mr-dropdown/mr-dropdown.test.js b/static_src/elements/framework/mr-dropdown/mr-dropdown.test.js
new file mode 100644
index 0000000..51f8ce9
--- /dev/null
+++ b/static_src/elements/framework/mr-dropdown/mr-dropdown.test.js
@@ -0,0 +1,276 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrDropdown, SCREENREADER_ATTRIBUTE_ERROR} from './mr-dropdown.js';
+import sinon from 'sinon';
+
+let element;
+let randomButton;
+
+describe('mr-dropdown', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-dropdown');
+    document.body.appendChild(element);
+    element.label = 'new dropdown';
+
+    randomButton = document.createElement('button');
+    document.body.appendChild(randomButton);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+    document.body.removeChild(randomButton);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrDropdown);
+  });
+
+  it('warns users about accessibility when no label or text', async () => {
+    element.label = 'ok';
+    sinon.spy(console, 'error');
+
+    await element.updateComplete;
+    sinon.assert.notCalled(console.error);
+
+    element.label = undefined;
+
+    await element.updateComplete;
+    sinon.assert.calledWith(console.error, SCREENREADER_ATTRIBUTE_ERROR);
+
+    console.error.restore();
+  });
+
+  it('toggle changes opened state', () => {
+    element.open();
+    assert.isTrue(element.opened);
+
+    element.close();
+    assert.isFalse(element.opened);
+
+    element.toggle();
+    assert.isTrue(element.opened);
+
+    element.toggle();
+    assert.isFalse(element.opened);
+
+    element.toggle();
+    element.toggle();
+    assert.isFalse(element.opened);
+  });
+
+  it('clicking outside element closes menu', () => {
+    element.open();
+    assert.isTrue(element.opened);
+
+    randomButton.click();
+
+    assert.isFalse(element.opened);
+  });
+
+  it('escape while focusing the anchor closes menu', async () => {
+    element.open();
+    await element.updateComplete;
+
+    assert.isTrue(element.opened);
+
+    const anchor = element.shadowRoot.querySelector('.anchor');
+    anchor.dispatchEvent(new KeyboardEvent('keydown', {key: 'Escape'}));
+
+    assert.isFalse(element.opened);
+  });
+
+  it('other key while focusing the anchor does not close menu', async () => {
+    element.open();
+    await element.updateComplete;
+
+    assert.isTrue(element.opened);
+
+    const anchor = element.shadowRoot.querySelector('.anchor');
+    anchor.dispatchEvent(new KeyboardEvent('keydown', {key: 'Enter'}));
+
+    assert.isTrue(element.opened);
+  });
+
+  it('escape while focusing an item closes the menu', async () => {
+    element.items = [{text: 'An item'}];
+    element.open();
+    await element.updateComplete;
+
+    assert.isTrue(element.opened);
+
+    const item = element.shadowRoot.querySelector('.menu-item');
+    item.dispatchEvent(new KeyboardEvent('keydown', {key: 'Escape'}));
+
+    assert.isFalse(element.opened);
+  });
+
+  it('icon hidden when undefined', async () => {
+    element.items = [
+      {text: 'test'},
+    ];
+
+    await element.updateComplete;
+
+    const icon = element.shadowRoot.querySelector(
+        '.menu-item > .material-icons');
+
+    assert.isTrue(icon.hidden);
+  });
+
+  it('icon shown when defined, even as empty string', async () => {
+    element.items = [
+      {text: 'test', icon: ''},
+    ];
+
+    await element.updateComplete;
+
+    const icon = element.shadowRoot.querySelector(
+        '.menu-item > .material-icons');
+
+    assert.isFalse(icon.hidden);
+    assert.equal(icon.textContent.trim(), '');
+  });
+
+  it('icon shown when set to material icon', async () => {
+    element.items = [
+      {text: 'test', icon: 'check'},
+    ];
+
+    await element.updateComplete;
+
+    const icon = element.shadowRoot.querySelector(
+        '.menu-item > .material-icons');
+
+    assert.isFalse(icon.hidden);
+    assert.equal(icon.textContent.trim(), 'check');
+  });
+
+  it('items with handlers are handled', async () => {
+    const handler1 = sinon.spy();
+    const handler2 = sinon.spy();
+    const handler3 = sinon.spy();
+
+    element.items = [
+      {
+        url: '#',
+        text: 'blah',
+        handler: handler1,
+      },
+      {
+        url: '#',
+        text: 'rutabaga noop',
+        handler: handler2,
+      },
+      {
+        url: '#',
+        text: 'click me please',
+        handler: handler3,
+      },
+    ];
+
+    element.open();
+
+    await element.updateComplete;
+
+    element.clickItem(0);
+
+    assert.isTrue(handler1.calledOnce);
+    assert.isFalse(handler2.called);
+    assert.isFalse(handler3.called);
+
+    element.clickItem(2);
+
+    assert.isTrue(handler1.calledOnce);
+    assert.isFalse(handler2.called);
+    assert.isTrue(handler3.calledOnce);
+  });
+
+  describe('nested dropdown menus', () => {
+    beforeEach(() => {
+      element.items = [
+        {
+          text: 'test',
+          items: [
+            {text: 'item 1'},
+            {text: 'item 2'},
+            {text: 'item 3'},
+          ],
+        },
+      ];
+
+      element.open();
+    });
+
+    it('nested dropdown menu renders', async () => {
+      await element.updateComplete;
+
+      const nestedDropdown = element.shadowRoot.querySelector('mr-dropdown');
+
+      assert.equal(nestedDropdown.text, 'test');
+      assert.deepEqual(nestedDropdown.items, [
+        {text: 'item 1'},
+        {text: 'item 2'},
+        {text: 'item 3'},
+      ]);
+    });
+
+    it('clicking nested item with handler calls handler', async () => {
+      const handler = sinon.stub();
+      element.items = [{
+        text: 'test',
+        items: [
+          {text: 'item 1'},
+          {
+            text: 'item with handler',
+            handler,
+          },
+        ],
+      }];
+
+      await element.updateComplete;
+
+      const nestedDropdown = element.shadowRoot.querySelector('mr-dropdown');
+
+      nestedDropdown.open();
+      await element.updateComplete;
+
+      // Clicking an unrelated nested item shouldn't call the handler.
+      nestedDropdown.clickItem(0);
+      // Nor should clicking the parent item call the handler.
+      element.clickItem(0);
+      sinon.assert.notCalled(handler);
+
+      element.open();
+      nestedDropdown.open();
+      await element.updateComplete;
+
+      nestedDropdown.clickItem(1);
+      sinon.assert.calledOnce(handler);
+    });
+
+    it('clicking nested dropdown menu toggles nested menu', async () => {
+      await element.updateComplete;
+
+      const nestedDropdown = element.shadowRoot.querySelector('mr-dropdown');
+      const nestedAnchor = nestedDropdown.shadowRoot.querySelector('.anchor');
+
+      assert.isTrue(element.opened);
+      assert.isFalse(nestedDropdown.opened);
+
+      nestedAnchor.click();
+      await element.updateComplete;
+
+      assert.isTrue(element.opened);
+      assert.isTrue(nestedDropdown.opened);
+
+      nestedAnchor.click();
+      await element.updateComplete;
+
+      assert.isTrue(element.opened);
+      assert.isFalse(nestedDropdown.opened);
+    });
+  });
+});
diff --git a/static_src/elements/framework/mr-error/mr-error.js b/static_src/elements/framework/mr-error/mr-error.js
new file mode 100644
index 0000000..084a326
--- /dev/null
+++ b/static_src/elements/framework/mr-error/mr-error.js
@@ -0,0 +1,51 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+
+/**
+ * `<mr-error>`
+ *
+ * A container for showing errors.
+ *
+ */
+export class MrError extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: flex;
+        align-items: center;
+        flex-direction: row;
+        justify-content: flex-start;
+        box-sizing: border-box;
+        width: 100%;
+        margin: 0.5em 0;
+        padding: 0.25em 8px;
+        border: 1px solid #B71C1C;
+        border-radius: 4px;
+        background: #FFEBEE;
+      }
+      :host([hidden]) {
+        display: none;
+      }
+      i.material-icons {
+        color: #B71C1C;
+        margin-right: 4px;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <i class="material-icons">close</i>
+      <slot></slot>
+    `;
+  }
+}
+
+customElements.define('mr-error', MrError);
diff --git a/static_src/elements/framework/mr-header/mr-header.js b/static_src/elements/framework/mr-header/mr-header.js
new file mode 100644
index 0000000..6603c85
--- /dev/null
+++ b/static_src/elements/framework/mr-header/mr-header.js
@@ -0,0 +1,427 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import {connectStore} from 'reducers/base.js';
+import * as userV0 from 'reducers/userV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as sitewide from 'reducers/sitewide.js';
+
+import {prpcClient} from 'prpc-client-instance.js';
+import 'elements/framework/mr-keystrokes/mr-keystrokes.js';
+import '../mr-dropdown/mr-dropdown.js';
+import '../mr-dropdown/mr-account-dropdown.js';
+import './mr-search-bar.js';
+
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+import {logEvent} from 'monitoring/client-logger.js';
+
+/**
+ * @type {Object<string, string>} JS coding of enum values from
+ *    appengine/monorail/api/v3/api_proto/project_objects.proto.
+ */
+const projectRoles = Object.freeze({
+  OWNER: 'Owner',
+  MEMBER: 'Member',
+  CONTRIBUTOR: 'Contributor',
+  NONE: '',
+});
+
+/**
+ * `<mr-header>`
+ *
+ * The header for Monorail.
+ *
+ */
+export class MrHeader extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          color: var(--chops-header-text-color);
+          box-sizing: border-box;
+          background: hsl(221, 67%, 92%);
+          width: 100%;
+          height: var(--monorail-header-height);
+          display: flex;
+          flex-direction: row;
+          justify-content: flex-start;
+          align-items: center;
+          z-index: 800;
+          background-color: var(--chops-primary-header-bg);
+          border-bottom: var(--chops-normal-border);
+          top: 0;
+          position: fixed;
+          padding: 0 4px;
+          font-size: var(--chops-large-font-size);
+        }
+        @media (max-width: 840px) {
+          :host {
+            position: static;
+          }
+        }
+        a {
+          font-size: inherit;
+          color: var(--chops-link-color);
+          text-decoration: none;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+          height: 100%;
+          padding: 0 4px;
+          flex-grow: 0;
+          flex-shrink: 0;
+        }
+        a[hidden] {
+          display: none;
+        }
+        a.button {
+          font-size: inherit;
+          height: auto;
+          margin: 0 8px;
+          border: 0;
+          height: 30px;
+        }
+        .home-link {
+          color: var(--chops-gray-900);
+          letter-spacing: 0.5px;
+          font-size: 18px;
+          font-weight: 400;
+          display: flex;
+          font-stretch: 100%;
+          padding-left: 8px;
+        }
+        a.home-link img {
+          /** Cover up default padding with the custom logo. */
+          margin-left: -8px;
+        }
+        a.home-link:hover {
+          text-decoration: none;
+        }
+        mr-search-bar {
+          margin-left: 8px;
+          flex-grow: 2;
+          max-width: 1000px;
+        }
+        i.material-icons {
+          font-size: var(--chops-icon-font-size);
+          color: var(--chops-primary-icon-color);
+        }
+        i.material-icons[hidden] {
+          display: none;
+        }
+        .right-section {
+          font-size: inherit;
+          display: flex;
+          align-items: center;
+          height: 100%;
+          margin-left: auto;
+          justify-content: flex-end;
+        }
+        .hamburger-icon:hover {
+          text-decoration: none;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    return this.projectName ?
+        this._renderProjectScope() : this._renderNonProjectScope();
+  }
+
+  /**
+   * @return {TemplateResult}
+   */
+  _renderProjectScope() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <mr-keystrokes
+        .issueId=${this.queryParams.id}
+        .queryParams=${this.queryParams}
+        .issueEntryUrl=${this.issueEntryUrl}
+      ></mr-keystrokes>
+      <a href="/p/${this.projectName}/issues/list" class="home-link">
+        ${this.projectThumbnailUrl ? html`
+          <img
+            class="project-logo"
+            src=${this.projectThumbnailUrl}
+            title=${this.projectName}
+          />
+        ` : this.projectName}
+      </a>
+      <mr-dropdown
+        class="project-selector"
+        .text=${this.projectName}
+        .items=${this._projectDropdownItems}
+        menuAlignment="left"
+        title=${this.presentationConfig.projectSummary}
+      ></mr-dropdown>
+      <a class="button emphasized new-issue-link" href=${this.issueEntryUrl}>
+        New issue
+      </a>
+      <mr-search-bar
+        .projectName=${this.projectName}
+        .userDisplayName=${this.userDisplayName}
+        .projectSavedQueries=${this.presentationConfig.savedQueries}
+        .initialCan=${this._currentCan}
+        .initialQuery=${this._currentQuery}
+        .queryParams=${this.queryParams}
+      ></mr-search-bar>
+
+      <div class="right-section">
+        <mr-dropdown
+          icon="settings"
+          label="Project Settings"
+          .items=${this._projectSettingsItems}
+        ></mr-dropdown>
+
+        ${this._renderAccount()}
+      </div>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   */
+  _renderNonProjectScope() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <a class="hamburger-icon" title="Main menu" hidden>
+        <i class="material-icons">menu</i>
+      </a>
+      ${this._headerTitle ?
+          html`<span class="home-link">${this._headerTitle}</span>` :
+          html`<a href="/" class="home-link">Monorail</a>`}
+
+      <div class="right-section">
+        ${this._renderAccount()}
+      </div>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   */
+  _renderAccount() {
+    if (!this.userDisplayName) {
+      return html`<a href=${this.loginUrl}>Sign in</a>`;
+    }
+
+    return html`
+      <mr-account-dropdown
+        .userDisplayName=${this.userDisplayName}
+        .logoutUrl=${this.logoutUrl}
+        .loginUrl=${this.loginUrl}
+      ></mr-account-dropdown>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      loginUrl: {type: String},
+      logoutUrl: {type: String},
+      projectName: {type: String},
+      // Project thumbnail is set separately from presentationConfig to prevent
+      // "flashing" logo when navigating EZT pages.
+      projectThumbnailUrl: {type: String},
+      userDisplayName: {type: String},
+      isSiteAdmin: {type: Boolean},
+      userProjects: {type: Object},
+      presentationConfig: {type: Object},
+      queryParams: {type: Object},
+      // TODO(zhangtiff): Change this to be dynamically computed by the
+      //   frontend with logic similar to ComputeIssueEntryURL().
+      issueEntryUrl: {type: String},
+      clientLogger: {type: Object},
+      _headerTitle: {type: String},
+      _currentQuery: {type: String},
+      _currentCan: {type: String},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this.presentationConfig = {};
+    this.userProjects = {};
+    this.isSiteAdmin = false;
+
+    this._headerTitle = '';
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.projectName = projectV0.viewedProjectName(state);
+
+    this.userProjects = userV0.projects(state);
+
+    const currentUser = userV0.currentUser(state);
+    this.isSiteAdmin = currentUser ? currentUser.isSiteAdmin : false;
+
+    const presentationConfig = projectV0.viewedPresentationConfig(state);
+    this.presentationConfig = presentationConfig;
+    // Set separately in order allow EZT pages to load project logo before
+    // the GetPresentationConfig pRPC request.
+    this.projectThumbnailUrl = presentationConfig.projectThumbnailUrl;
+
+    this._headerTitle = sitewide.headerTitle(state);
+
+    this._currentQuery = sitewide.currentQuery(state);
+    this._currentCan = sitewide.currentCan(state);
+
+    this.queryParams = sitewide.queryParams(state);
+  }
+
+  /**
+   * @return {boolean} whether the currently logged in user has admin
+   *   privileges for the currently viewed project.
+   */
+  get canAdministerProject() {
+    if (!this.userDisplayName) return false; // Not logged in.
+    if (this.isSiteAdmin) return true;
+    if (!this.userProjects || !this.userProjects.ownerOf) return false;
+    return this.userProjects.ownerOf.includes(this.projectName);
+  }
+
+  /**
+   * @return {string} The name of the role the user has in the viewed project.
+   */
+  get roleInCurrentProject() {
+    if (!this.userProjects || !this.projectName) return projectRoles.NONE;
+    const {ownerOf = [], memberOf = [], contributorTo = []} = this.userProjects;
+
+    if (ownerOf.includes(this.projectName)) return projectRoles.OWNER;
+    if (memberOf.includes(this.projectName)) return projectRoles.MEMBER;
+    if (contributorTo.includes(this.projectName)) {
+      return projectRoles.CONTRIBUTOR;
+    }
+
+    return projectRoles.NONE;
+  }
+
+  // TODO(crbug.com/monorail/6891): Remove once we deprecate the old issue
+  // filing wizard.
+  /**
+   * @return {string} A URL for the page the issue filing wizard posts to.
+   */
+  get _wizardPostUrl() {
+    // The issue filing wizard posts to the legacy issue entry page's ".do"
+    // endpoint.
+    return `${this._origin}/p/${this.projectName}/issues/entry.do`;
+  }
+
+  /**
+   * @return {string} The domain name of the current page.
+   */
+  get _origin() {
+    return window.location.origin;
+  }
+
+  /**
+   * Computes the URL the user should see to a file an issue, accounting
+   * for the case where a project has a customIssueEntryUrl to navigate to
+   * the wizard as well.
+   * @return {string} The URL that "New issue" button goes to.
+   */
+  get issueEntryUrl() {
+    const config = this.presentationConfig;
+    const role = this.roleInCurrentProject;
+    const mayBeRedirectedToWizard = role === projectRoles.NONE;
+    if (!this.userDisplayName || !config || !config.customIssueEntryUrl ||
+        !mayBeRedirectedToWizard) {
+      return `/p/${this.projectName}/issues/entry`;
+    }
+
+    const token = prpcClient.token;
+
+    const customUrl = this.presentationConfig.customIssueEntryUrl;
+
+    return `${customUrl}?token=${token}&role=${
+      role}&continue=${this._wizardPostUrl}`;
+  }
+
+  /**
+   * @return {Array<MenuItem>} the dropdown items for the project selector,
+   *   showing which projects a user can switch to.
+   */
+  get _projectDropdownItems() {
+    const {userProjects, loginUrl} = this;
+    if (!this.userDisplayName) {
+      return [{text: 'Sign in to see your projects', url: loginUrl}];
+    }
+
+    const items = [];
+    const starredProjects = userProjects.starredProjects || [];
+    const projects = (userProjects.ownerOf || [])
+        .concat(userProjects.memberOf || [])
+        .concat(userProjects.contributorTo || []);
+
+    if (projects.length) {
+      projects.sort();
+      items.push({text: 'My Projects', separator: true});
+
+      projects.forEach((project) => {
+        items.push({text: project, url: `/p/${project}/issues/list`});
+      });
+    }
+
+    if (starredProjects.length) {
+      starredProjects.sort();
+      items.push({text: 'Starred Projects', separator: true});
+
+      starredProjects.forEach((project) => {
+        items.push({text: project, url: `/p/${project}/issues/list`});
+      });
+    }
+
+    if (items.length) {
+      items.push({separator: true});
+    }
+
+    items.push({text: 'All projects', url: '/hosting/'});
+    items.forEach((item) => {
+      item.handler = () => this._projectChangedHandler(item.url);
+    });
+    return items;
+  }
+
+  /**
+   * @return {Array<MenuItem>} dropdown menu items to show in the project
+   *   settings menu.
+   */
+  get _projectSettingsItems() {
+    const {projectName, canAdministerProject} = this;
+    const items = [
+      {text: 'People', url: `/p/${projectName}/people/list`},
+      {text: 'Development Process', url: `/p/${projectName}/adminIntro`},
+      {text: 'History', url: `/p/${projectName}/updates/list`},
+    ];
+
+    if (canAdministerProject) {
+      items.push({separator: true});
+      items.push({text: 'Administer', url: `/p/${projectName}/admin`});
+    }
+    return items;
+  }
+
+  /**
+   * Records Google Analytics events for when users change projects using
+   * the selector.
+   * @param {string} url which project URL the user is navigating to.
+   */
+  _projectChangedHandler(url) {
+    // Just log it to GA and continue.
+    logEvent('mr-header', 'project-change', url);
+  }
+}
+
+customElements.define('mr-header', MrHeader);
diff --git a/static_src/elements/framework/mr-header/mr-header.test.js b/static_src/elements/framework/mr-header/mr-header.test.js
new file mode 100644
index 0000000..277347f
--- /dev/null
+++ b/static_src/elements/framework/mr-header/mr-header.test.js
@@ -0,0 +1,191 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import {prpcClient} from 'prpc-client-instance.js';
+import {MrHeader} from './mr-header.js';
+
+
+window.CS_env = {
+  token: 'foo-token',
+};
+
+let element;
+
+describe('mr-header', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-header');
+    document.body.appendChild(element);
+
+    window.ga = sinon.stub();
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrHeader);
+  });
+
+  it('presentationConfig renders', async () => {
+    element.projectName = 'best-project';
+    element.projectThumbnailUrl = 'http://images.google.com/';
+    element.presentationConfig = {
+      projectSummary: 'The best project',
+    };
+
+    await element.updateComplete;
+
+    assert.equal(element.shadowRoot.querySelector('.project-logo').src,
+        'http://images.google.com/');
+
+    assert.endsWith(element.shadowRoot.querySelector('.new-issue-link').href,
+        '/p/best-project/issues/entry');
+
+    assert.equal(element.shadowRoot.querySelector('.project-selector').title,
+        'The best project');
+  });
+
+  describe('issueEntryUrl', () => {
+    let oldToken;
+
+    beforeEach(() => {
+      oldToken = prpcClient.token;
+      prpcClient.token = 'token1';
+
+      element.projectName = 'proj';
+
+      sinon.stub(element, '_origin').get(() => 'http://localhost');
+    });
+
+    afterEach(() => {
+      prpcClient.token = oldToken;
+    });
+
+    it('updates on project change', async () => {
+      await element.updateComplete;
+
+      assert.endsWith(element.shadowRoot.querySelector('.new-issue-link').href,
+          '/p/proj/issues/entry');
+
+      element.projectName = 'the-best-project';
+
+      await element.updateComplete;
+
+      assert.endsWith(element.shadowRoot.querySelector('.new-issue-link').href,
+          '/p/the-best-project/issues/entry');
+    });
+
+    it('generates wizard URL when customIssueEntryUrl defined', () => {
+      element.presentationConfig = {customIssueEntryUrl: 'https://issue.wizard'};
+      element.userProjects = {ownerOf: ['not-proj']};
+      element.userDisplayName = 'test@example.com';
+      assert.equal(element.issueEntryUrl,
+          'https://issue.wizard?token=token1&role=&' +
+          'continue=http://localhost/p/proj/issues/entry.do');
+    });
+
+    it('uses default issue filing URL when user is not logged in', () => {
+      element.presentationConfig = {customIssueEntryUrl: 'https://issue.wizard'};
+      element.userDisplayName = '';
+      assert.equal(element.issueEntryUrl, '/p/proj/issues/entry');
+    });
+
+    it('uses default issue filing URL when user is project owner', () => {
+      element.presentationConfig = {customIssueEntryUrl: 'https://issue.wizard'};
+      element.userProjects = {ownerOf: ['proj']};
+      assert.equal(element.issueEntryUrl, '/p/proj/issues/entry');
+    });
+
+    it('uses default issue filing URL when user is project member', () => {
+      element.presentationConfig = {customIssueEntryUrl: 'https://issue.wizard'};
+      element.userProjects = {memberOf: ['proj']};
+      assert.equal(element.issueEntryUrl, '/p/proj/issues/entry');
+    });
+
+    it('uses default issue filing URL when user is project contributor', () => {
+      element.presentationConfig = {customIssueEntryUrl: 'https://issue.wizard'};
+      element.userProjects = {contributorTo: ['proj']};
+      assert.equal(element.issueEntryUrl, '/p/proj/issues/entry');
+    });
+  });
+
+
+  it('canAdministerProject is false when user is not logged in', () => {
+    element.userDisplayName = '';
+
+    assert.isFalse(element.canAdministerProject);
+  });
+
+  it('canAdministerProject is true when user is site admin', () => {
+    element.userDisplayName = 'test@example.com';
+    element.isSiteAdmin = true;
+
+    assert.isTrue(element.canAdministerProject);
+
+    element.isSiteAdmin = false;
+
+    assert.isFalse(element.canAdministerProject);
+  });
+
+  it('canAdministerProject is true when user is owner', () => {
+    element.userDisplayName = 'test@example.com';
+    element.isSiteAdmin = false;
+
+    element.projectName = 'chromium';
+    element.userProjects = {ownerOf: ['chromium']};
+
+    assert.isTrue(element.canAdministerProject);
+
+    element.projectName = 'v8';
+
+    assert.isFalse(element.canAdministerProject);
+
+    element.userProjects = {memberOf: ['v8']};
+
+    assert.isFalse(element.canAdministerProject);
+  });
+
+  it('_projectDropdownItems tells user to sign in if not logged in', () => {
+    element.userDisplayName = '';
+    element.loginUrl = 'http://login';
+
+    const items = element._projectDropdownItems;
+
+    // My Projects
+    assert.deepEqual(items[0], {
+      text: 'Sign in to see your projects',
+      url: 'http://login',
+    });
+  });
+
+  it('_projectDropdownItems computes projects for user', () => {
+    element.userProjects = {
+      ownerOf: ['chromium'],
+      memberOf: ['v8'],
+      contributorTo: ['skia'],
+      starredProjects: ['gerrit'],
+    };
+    element.userDisplayName = 'test@example.com';
+
+    const items = element._projectDropdownItems;
+
+    // TODO(http://crbug.com/monorail/6236): Replace these checks with
+    // deepInclude once we upgrade Chai.
+    // My Projects
+    assert.equal(items[1].text, 'chromium');
+    assert.equal(items[1].url, '/p/chromium/issues/list');
+    assert.equal(items[2].text, 'skia');
+    assert.equal(items[2].url, '/p/skia/issues/list');
+    assert.equal(items[3].text, 'v8');
+    assert.equal(items[3].url, '/p/v8/issues/list');
+
+    // Starred Projects
+    assert.equal(items[5].text, 'gerrit');
+    assert.equal(items[5].url, '/p/gerrit/issues/list');
+  });
+});
diff --git a/static_src/elements/framework/mr-header/mr-search-bar.js b/static_src/elements/framework/mr-header/mr-search-bar.js
new file mode 100644
index 0000000..536dfcf
--- /dev/null
+++ b/static_src/elements/framework/mr-header/mr-search-bar.js
@@ -0,0 +1,501 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import page from 'page';
+import qs from 'qs';
+
+import '../mr-dropdown/mr-dropdown.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import ClientLogger from 'monitoring/client-logger';
+import {issueRefToUrl} from 'shared/convertersV0.js';
+
+// Search field input regex testing for all digits
+// indicating that the user wants to jump to the specified issue.
+const JUMP_RE = /^\d+$/;
+
+/**
+ * `<mr-search-bar>`
+ *
+ * The searchbar for Monorail.
+ *
+ */
+export class MrSearchBar extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        --mr-search-bar-background: var(--chops-white);
+        --mr-search-bar-border-radius: 4px;
+        --mr-search-bar-border: var(--chops-normal-border);
+        --mr-search-bar-chip-color: var(--chops-gray-200);
+        height: 30px;
+        font-size: var(--chops-large-font-size);
+      }
+      input#searchq {
+        display: flex;
+        align-items: center;
+        justify-content: flex-start;
+        flex-grow: 2;
+        min-width: 100px;
+        border: none;
+        border-top: var(--mr-search-bar-border);
+        border-bottom: var(--mr-search-bar-border);
+        background: var(--mr-search-bar-background);
+        height: 100%;
+        box-sizing: border-box;
+        padding: 0 2px;
+        font-size: inherit;
+      }
+      mr-dropdown {
+        text-align: right;
+        display: flex;
+        text-overflow: ellipsis;
+        box-sizing: border-box;
+        background: var(--mr-search-bar-background);
+        border: var(--mr-search-bar-border);
+        border-left: 0;
+        border-radius: 0 var(--mr-search-bar-border-radius)
+          var(--mr-search-bar-border-radius) 0;
+        height: 100%;
+        align-items: center;
+        justify-content: center;
+        text-decoration: none;
+      }
+      button {
+        font-size: inherit;
+        order: -1;
+        background: var(--mr-search-bar-background);
+        cursor: pointer;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        height: 100%;
+        box-sizing: border-box;
+        border: var(--mr-search-bar-border);
+        border-left: none;
+        border-right: none;
+        padding: 0 8px;
+      }
+      form {
+        display: flex;
+        height: 100%;
+        width: 100%;
+        align-items: center;
+        justify-content: flex-start;
+        flex-direction: row;
+      }
+      i.material-icons {
+        font-size: var(--chops-icon-font-size);
+        color: var(--chops-primary-icon-color);
+      }
+      .select-container {
+        order: -2;
+        max-width: 150px;
+        min-width: 50px;
+        flex-shrink: 1;
+        height: 100%;
+        position: relative;
+        box-sizing: border-box;
+        border: var(--mr-search-bar-border);
+        border-radius: var(--mr-search-bar-border-radius) 0 0
+          var(--mr-search-bar-border-radius);
+        background: var(--mr-search-bar-chip-color);
+      }
+      .select-container i.material-icons {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        position: absolute;
+        right: 0;
+        top: 0;
+        height: 100%;
+        width: 20px;
+        z-index: 2;
+        padding: 0;
+      }
+      select {
+        color: var(--chops-primary-font-color);
+        display: flex;
+        align-items: center;
+        justify-content: flex-start;
+        -webkit-appearance: none;
+        -moz-appearance: none;
+        appearance: none;
+        text-overflow: ellipsis;
+        cursor: pointer;
+        width: 100%;
+        height: 100%;
+        background: none;
+        margin: 0;
+        padding: 0 20px 0 8px;
+        box-sizing: border-box;
+        border: 0;
+        z-index: 3;
+        font-size: inherit;
+        position: relative;
+      }
+      select::-ms-expand {
+        display: none;
+      }
+      select::after {
+        position: relative;
+        right: 0;
+        content: 'arrow_drop_down';
+        font-family: 'Material Icons';
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <form
+        @submit=${this._submitSearch}
+        @keypress=${this._submitSearchWithKeypress}
+      >
+        ${this._renderSearchScopeSelector()}
+        <input
+          id="searchq"
+          type="text"
+          name="q"
+          placeholder="Search ${this.projectName} issues..."
+          .value=${this.initialQuery || ''}
+          autocomplete="off"
+          aria-label="Search box"
+          @focus=${this._searchEditStarted}
+          @blur=${this._searchEditFinished}
+          spellcheck="false"
+        />
+        <button type="submit">
+          <i class="material-icons">search</i>
+        </button>
+        <mr-dropdown
+          label="Search options"
+          .items=${this._searchMenuItems}
+        ></mr-dropdown>
+      </form>
+    `;
+  }
+
+  /**
+   * Render helper for the select menu that lets user select which search
+   * context/saved query they want to use.
+   * @return {TemplateResult}
+   */
+  _renderSearchScopeSelector() {
+    return html`
+      <div class="select-container">
+        <i class="material-icons" role="presentation">arrow_drop_down</i>
+        <select
+          id="can"
+          name="can"
+          @change=${this._redirectOnSelect}
+          aria-label="Search scope"
+        >
+          <optgroup label="Search within">
+            <option
+              value="1"
+              ?selected=${this.initialCan === '1'}
+            >All issues</option>
+            <option
+              value="2"
+              ?selected=${this.initialCan === '2'}
+            >Open issues</option>
+            <option
+              value="3"
+              ?selected=${this.initialCan === '3'}
+            >Open and owned by me</option>
+            <option
+              value="4"
+              ?selected=${this.initialCan === '4'}
+            >Open and reported by me</option>
+            <option
+              value="5"
+              ?selected=${this.initialCan === '5'}
+            >Open and starred by me</option>
+            <option
+              value="8"
+              ?selected=${this.initialCan === '8'}
+            >Open with comment by me</option>
+            <option
+              value="6"
+              ?selected=${this.initialCan === '6'}
+            >New issues</option>
+            <option
+              value="7"
+              ?selected=${this.initialCan === '7'}
+            >Issues to verify</option>
+          </optgroup>
+          <optgroup label="Project queries" ?hidden=${!this.userDisplayName}>
+            ${this._renderSavedQueryOptions(this.projectSavedQueries, 'project-query')}
+            <option data-href="/p/${this.projectName}/adminViews">
+              Manage project queries...
+            </option>
+          </optgroup>
+          <optgroup label="My saved queries" ?hidden=${!this.userDisplayName}>
+            ${this._renderSavedQueryOptions(this.userSavedQueries, 'user-query')}
+            <option data-href="/u/${this.userDisplayName}/queries">
+              Manage my saved queries...
+            </option>
+          </optgroup>
+        </select>
+      </div>
+    `;
+  }
+
+  /**
+   * Render helper for adding saved queries to the search scope select.
+   * @param {Array<SavedQuery>} queries Queries to render.
+   * @param {string} className CSS class to be applied to each option.
+   * @return {Array<TemplateResult>}
+   */
+  _renderSavedQueryOptions(queries, className) {
+    if (!queries) return;
+    return queries.map((query) => html`
+      <option
+        class=${className}
+        value=${query.queryId}
+        ?selected=${this.initialCan === query.queryId}
+      >${query.name}</option>
+    `);
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      projectName: {type: String},
+      userDisplayName: {type: String},
+      initialCan: {type: String},
+      initialQuery: {type: String},
+      projectSavedQueries: {type: Array},
+      userSavedQueries: {type: Array},
+      queryParams: {type: Object},
+      keptQueryParams: {type: Array},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.queryParams = {};
+    this.keptQueryParams = [
+      'sort',
+      'groupby',
+      'colspec',
+      'x',
+      'y',
+      'mode',
+      'cells',
+      'num',
+    ];
+    this.initialQuery = '';
+    this.initialCan = '2';
+    this.projectSavedQueries = [];
+    this.userSavedQueries = [];
+
+    this.clientLogger = new ClientLogger('issues');
+
+    this._page = page;
+  }
+
+  /** @override */
+  connectedCallback() {
+    super.connectedCallback();
+
+    // Global event listeners. Make sure to unbind these when the
+    // element disconnects.
+    this._boundFocus = this.focus.bind(this);
+    window.addEventListener('focus-search', this._boundFocus);
+  }
+
+  /** @override */
+  disconnectedCallback() {
+    super.disconnectedCallback();
+
+    window.removeEventListener('focus-search', this._boundFocus);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (this.userDisplayName && changedProperties.has('userDisplayName')) {
+      const userSavedQueriesPromise = prpcClient.call('monorail.Users',
+          'GetSavedQueries', {});
+      userSavedQueriesPromise.then((resp) => {
+        this.userSavedQueries = resp.savedQueries;
+      });
+    }
+  }
+
+  /**
+   * Sends an event to ClientLogger describing that the user started typing
+   * a search query.
+   */
+  _searchEditStarted() {
+    this.clientLogger.logStart('query-edit', 'user-time');
+    this.clientLogger.logStart('issue-search', 'user-time');
+  }
+
+  /**
+   * Sends an event to ClientLogger saying that the user finished typing a
+   * search.
+   */
+  _searchEditFinished() {
+    this.clientLogger.logEnd('query-edit');
+  }
+
+  /**
+   * On Shift+Enter, this handler opens the search in a new tab.
+   * @param {KeyboardEvent} e
+   */
+  _submitSearchWithKeypress(e) {
+    if (e.key === 'Enter' && (e.shiftKey)) {
+      const form = e.currentTarget;
+      this._runSearch(form, true);
+    }
+    // In all other cases, we want to let the submit handler do the work.
+    // ie: pressing 'Enter' on a form should natively open it in a new tab.
+  }
+
+  /**
+   * Update the URL on form submit.
+   * @param {Event} e
+   */
+  _submitSearch(e) {
+    e.preventDefault();
+
+    const form = e.target;
+    this._runSearch(form);
+  }
+
+  /**
+   * Updates the URL with the new search set in the query string.
+   * @param {HTMLFormElement} form the native form element to submit.
+   * @param {boolean=} newTab whether to open the search in a new tab.
+   */
+  _runSearch(form, newTab) {
+    this.clientLogger.logEnd('query-edit');
+    this.clientLogger.logPause('issue-search', 'user-time');
+    this.clientLogger.logStart('issue-search', 'computer-time');
+
+    const params = {};
+
+    this.keptQueryParams.forEach((param) => {
+      if (param in this.queryParams) {
+        params[param] = this.queryParams[param];
+      }
+    });
+
+    params.q = form.q.value.trim();
+    params.can = form.can.value;
+
+    this._navigateToNext(params, newTab);
+  }
+
+  /**
+   * Attempt to jump-to-issue, otherwise continue to list view
+   * @param {Object} params URL navigation parameters
+   * @param {boolean} newTab
+   */
+  async _navigateToNext(params, newTab = false) {
+    let resp;
+    if (JUMP_RE.test(params.q)) {
+      const message = {
+        issueRef: {
+          projectName: this.projectName,
+          localId: params.q,
+        },
+      };
+
+      try {
+        resp = await prpcClient.call(
+            'monorail.Issues', 'GetIssue', message,
+        );
+      } catch (error) {
+        // Fall through to navigateToList
+      }
+    }
+    if (resp && resp.issue) {
+      const link = issueRefToUrl(resp.issue, params);
+      this._page(link);
+    } else {
+      this._navigateToList(params, newTab);
+    }
+  }
+
+  /**
+   * Navigate to list view, currently splits on old and new view
+   * @param {Object} params URL navigation parameters
+   * @param {boolean} newTab
+   * @fires Event#refreshList
+   * @private
+   */
+  _navigateToList(params, newTab = false) {
+    const pathname = `/p/${this.projectName}/issues/list`;
+
+    const hasChanges = !window.location.pathname.startsWith(pathname) ||
+      this.queryParams.q !== params.q ||
+      this.queryParams.can !== params.can;
+
+    const url =`${pathname}?${qs.stringify(params)}`;
+
+    if (newTab) {
+      window.open(url, '_blank', 'noopener');
+    } else if (hasChanges) {
+      this._page(url);
+    } else {
+      // TODO(zhangtiff): Replace this event with Redux once all of Monorail
+      // uses Redux.
+      // This is needed because navigating to the exact same page does not
+      // cause a URL change to happen.
+      this.dispatchEvent(new Event('refreshList',
+          {'composed': true, 'bubbles': true}));
+    }
+  }
+
+  /**
+   * Wrap the native focus() function for the search form to allow parent
+   * elements to focus the search.
+   */
+  focus() {
+    const search = this.shadowRoot.querySelector('#searchq');
+    search.focus();
+  }
+
+  /**
+   * Populates the search dropdown.
+   * @return {Array<MenuItem>}
+   */
+  get _searchMenuItems() {
+    const projectName = this.projectName;
+    return [
+      {
+        text: 'Advanced search',
+        url: `/p/${projectName}/issues/advsearch`,
+      },
+      {
+        text: 'Search tips',
+        url: `/p/${projectName}/issues/searchtips`,
+      },
+    ];
+  }
+
+  /**
+   * The search dropdown includes links like "Manage my saved queries..."
+   * that automatically navigate a user to a new page when they select those
+   * options.
+   * @param {Event} evt
+   */
+  _redirectOnSelect(evt) {
+    const target = evt.target;
+    const option = target.options[target.selectedIndex];
+
+    if (option.dataset.href) {
+      this._page(option.dataset.href);
+    }
+  }
+}
+
+customElements.define('mr-search-bar', MrSearchBar);
diff --git a/static_src/elements/framework/mr-header/mr-search-bar.test.js b/static_src/elements/framework/mr-header/mr-search-bar.test.js
new file mode 100644
index 0000000..c758a41
--- /dev/null
+++ b/static_src/elements/framework/mr-header/mr-search-bar.test.js
@@ -0,0 +1,244 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import {MrSearchBar} from './mr-search-bar.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import {issueRefToUrl} from 'shared/convertersV0.js';
+import {clientLoggerFake} from 'shared/test/fakes.js';
+
+
+window.CS_env = {
+  token: 'foo-token',
+};
+
+let element;
+
+describe('mr-search-bar', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-search-bar');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrSearchBar);
+  });
+
+  it('render user saved queries', async () => {
+    element.userDisplayName = 'test@user.com';
+    element.userSavedQueries = [
+      {name: 'test query', queryId: 101},
+      {name: 'hello world', queryId: 202},
+    ];
+
+    await element.updateComplete;
+
+    const queryOptions = element.shadowRoot.querySelectorAll(
+        '.user-query');
+
+    assert.equal(queryOptions.length, 2);
+
+    assert.equal(queryOptions[0].value, '101');
+    assert.equal(queryOptions[0].textContent, 'test query');
+
+    assert.equal(queryOptions[1].value, '202');
+    assert.equal(queryOptions[1].textContent, 'hello world');
+  });
+
+  it('render project saved queries', async () => {
+    element.userDisplayName = 'test@user.com';
+    element.projectSavedQueries = [
+      {name: 'test query', queryId: 101},
+      {name: 'hello world', queryId: 202},
+    ];
+
+    await element.updateComplete;
+
+    const queryOptions = element.shadowRoot.querySelectorAll(
+        '.project-query');
+
+    assert.equal(queryOptions.length, 2);
+
+    assert.equal(queryOptions[0].value, '101');
+    assert.equal(queryOptions[0].textContent, 'test query');
+
+    assert.equal(queryOptions[1].value, '202');
+    assert.equal(queryOptions[1].textContent, 'hello world');
+  });
+
+  it('search input resets form value when initialQuery changes', async () => {
+    element.initialQuery = 'first query';
+    await element.updateComplete;
+
+    const queryInput = element.shadowRoot.querySelector('#searchq');
+
+    assert.equal(queryInput.value, 'first query');
+
+    // Simulate a user typing something into the search form.
+    queryInput.value = 'blah';
+
+    element.initialQuery = 'second query';
+    await element.updateComplete;
+
+    // 'blah' disappears because the new initialQuery causes the form to
+    // reset.
+    assert.equal(queryInput.value, 'second query');
+  });
+
+  it('unrelated property changes do not reset query form', async () => {
+    element.initialQuery = 'first query';
+    await element.updateComplete;
+
+    const queryInput = element.shadowRoot.querySelector('#searchq');
+
+    assert.equal(queryInput.value, 'first query');
+
+    // Simulate a user typing something into the search form.
+    queryInput.value = 'blah';
+
+    element.initialCan = '5';
+    await element.updateComplete;
+
+    assert.equal(queryInput.value, 'blah');
+  });
+
+  it('spell check is off for search bar', async () => {
+    await element.updateComplete;
+    const searchElement = element.shadowRoot.querySelector('#searchq');
+    assert.equal(searchElement.getAttribute('spellcheck'), 'false');
+  });
+
+  describe('search form submit', () => {
+    let prpcClientStub;
+    beforeEach(() => {
+      element.clientLogger = clientLoggerFake();
+
+      element._page = sinon.stub();
+      sinon.stub(window, 'open');
+
+      element.projectName = 'chromium';
+      prpcClientStub = sinon.stub(prpcClient, 'call');
+    });
+
+    afterEach(() => {
+      window.open.restore();
+      prpcClient.call.restore();
+    });
+
+    it('prevents default', async () => {
+      await element.updateComplete;
+
+      const form = element.shadowRoot.querySelector('form');
+
+      // Note: HTMLFormElement's submit function does not run submit handlers
+      // but clicking a submit buttons programmatically works.
+      const event = new Event('submit');
+      sinon.stub(event, 'preventDefault');
+      form.dispatchEvent(event);
+
+      sinon.assert.calledOnce(event.preventDefault);
+    });
+
+    it('uses initial values when no form changes', async () => {
+      element.initialQuery = 'test query';
+      element.initialCan = '3';
+
+      await element.updateComplete;
+
+      const form = element.shadowRoot.querySelector('form');
+
+      form.dispatchEvent(new Event('submit'));
+
+      sinon.assert.calledOnce(element._page);
+      sinon.assert.calledWith(element._page,
+          '/p/chromium/issues/list?q=test%20query&can=3');
+    });
+
+    it('adds form values to url', async () => {
+      await element.updateComplete;
+
+      const form = element.shadowRoot.querySelector('form');
+
+      form.q.value = 'test';
+      form.can.value = '1';
+
+      form.dispatchEvent(new Event('submit'));
+
+      sinon.assert.calledOnce(element._page);
+      sinon.assert.calledWith(element._page,
+          '/p/chromium/issues/list?q=test&can=1');
+    });
+
+    it('trims query', async () => {
+      await element.updateComplete;
+
+      const form = element.shadowRoot.querySelector('form');
+
+      form.q.value = '  abc  ';
+      form.can.value = '1';
+
+      form.dispatchEvent(new Event('submit'));
+
+      sinon.assert.calledOnce(element._page);
+      sinon.assert.calledWith(element._page,
+          '/p/chromium/issues/list?q=abc&can=1');
+    });
+
+    it('jumps to issue for digit-only query', async () => {
+      prpcClientStub.returns(Promise.resolve({issue: 'hello world'}));
+
+      await element.updateComplete;
+
+      const form = element.shadowRoot.querySelector('form');
+
+      form.q.value = '123';
+      form.can.value = '1';
+
+      form.dispatchEvent(new Event('submit'));
+
+      await element._navigateToNext;
+
+      const expected = issueRefToUrl('hello world', {q: '123', can: '1'});
+      sinon.assert.calledWith(element._page, expected);
+    });
+
+    it('only keeps kept query params', async () => {
+      element.queryParams = {fakeParam: 'test', x: 'Status'};
+      element.keptParams = ['x'];
+
+      await element.updateComplete;
+
+      const form = element.shadowRoot.querySelector('form');
+
+      form.dispatchEvent(new Event('submit'));
+
+      sinon.assert.calledOnce(element._page);
+      sinon.assert.calledWith(element._page,
+          '/p/chromium/issues/list?x=Status&q=&can=2');
+    });
+
+    it('on shift+enter opens search in new tab', async () => {
+      await element.updateComplete;
+
+      const form = element.shadowRoot.querySelector('form');
+
+      form.q.value = 'test';
+      form.can.value = '1';
+
+      // Dispatch event from an input in the form.
+      form.q.dispatchEvent(new KeyboardEvent('keypress',
+          {key: 'Enter', shiftKey: true, bubbles: true}));
+
+      sinon.assert.calledOnce(window.open);
+      sinon.assert.calledWith(window.open,
+          '/p/chromium/issues/list?q=test&can=1', '_blank', 'noopener');
+    });
+  });
+});
diff --git a/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.js b/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.js
new file mode 100644
index 0000000..13f8267
--- /dev/null
+++ b/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.js
@@ -0,0 +1,62 @@
+// Copyright 2019 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.
+
+/** @const {string} CSV download link's data href prefix, RFC 4810 Section 3 */
+export const CSV_DATA_HREF_PREFIX = 'data:text/csv;charset=utf-8,';
+
+/**
+ * Format array into plaintext csv
+ * @param {Array<Array>} data
+ * @return {string}
+ */
+export const convertListContentToCsv = (data) => {
+  const result = data.reduce((acc, row) => {
+    return `${acc}\r\n${row.map(preventCSVInjectionAndStringify).join(',')}`;
+  }, '');
+  // Remove leading /r and /n
+  return result.slice(2);
+};
+
+/**
+ * Prevent CSV injection, escape double quotes, and wrap with double quotes
+ * See owasp.org/index.php/CSV_Injection
+ * @param {string} cell
+ * @return {string}
+ */
+export const preventCSVInjectionAndStringify = (cell) => {
+  // Prepend all double quotes with another double quote, RFC 4810 Section 2.7
+  let escaped = cell.replace(/"/g, '""');
+
+  // prevent CSV injection: owasp.org/index.php/CSV_Injection
+  if (cell[0] === '=' ||
+      cell[0] === '+' ||
+      cell[0] === '-' ||
+      cell[0] === '@') {
+    escaped = `'${escaped}`;
+  }
+
+  // Wrap cell with double quotes, RFC 4810 Section 2.7
+  return `"${escaped}"`;
+};
+
+/**
+ * Prepare data for csv download by converting array of array into csv string
+ * @param {Array<Array<string>>} data
+ * @param {Array<string>=} headers Column headers
+ * @return {string} CSV formatted string
+ */
+export const prepareDataForDownload = (data, headers = []) => {
+  const mainContent = [headers, ...data];
+
+  return `${convertListContentToCsv(mainContent)}`;
+};
+
+/**
+ * Constructs download link url from csv string data.
+ * @param {string} data CSV data
+ * @return {string}
+ */
+export const constructHref = (data = '') => {
+  return `${CSV_DATA_HREF_PREFIX}${encodeURIComponent(data)}`;
+};
diff --git a/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.test.js b/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.test.js
new file mode 100644
index 0000000..cd124a5
--- /dev/null
+++ b/static_src/elements/framework/mr-issue-list/list-to-csv-helpers.test.js
@@ -0,0 +1,145 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {
+  constructHref,
+  convertListContentToCsv,
+  prepareDataForDownload,
+  preventCSVInjectionAndStringify,
+} from './list-to-csv-helpers.js';
+
+describe('constructHref', () => {
+  it('has default of empty string', () => {
+    const result = constructHref();
+    assert.equal(result, 'data:text/csv;charset=utf-8,');
+  });
+
+  it('starts with data:', () => {
+    const result = constructHref('');
+    assert.isTrue(result.startsWith('data:'));
+  });
+
+  it('uses charset=utf-8', () => {
+    const result = constructHref('');
+    assert.isTrue(result.search('charset=utf-8') > -1);
+  });
+
+  it('encodes URI component', () => {
+    const encodeFuncStub = sinon.stub(window, 'encodeURIComponent');
+    constructHref('');
+    sinon.assert.calledOnce(encodeFuncStub);
+
+    window.encodeURIComponent.restore();
+  });
+
+  it('encodes URI component', () => {
+    const input = 'foo, bar fizz=buzz';
+    const expected = 'foo%2C%20bar%20fizz%3Dbuzz';
+    const output = constructHref(input);
+
+    assert.equal(expected, output.split(',')[1]);
+  });
+});
+
+describe('convertListContentToCsv', () => {
+  it('joins rows with carriage return and line feed, CRLF', () => {
+    const input = [['foobar'], ['fizzbuzz']];
+    const expected = '"foobar"\r\n"fizzbuzz"';
+    assert.equal(expected, convertListContentToCsv(input));
+  });
+
+  it('joins columns with commas', () => {
+    const input = [['foo', 'bar', 'fizz', 'buzz']];
+    const expected = '"foo","bar","fizz","buzz"';
+    assert.equal(expected, convertListContentToCsv(input));
+  });
+
+  it('starts with non-empty row', () => {
+    const input = [['foobar']];
+    const expected = '"foobar"';
+    const result = convertListContentToCsv(input);
+    assert.equal(expected, result);
+    assert.isFalse(result.startsWith('\r\n'));
+  });
+});
+
+describe('prepareDataForDownload', () => {
+  it('prepends header row', () => {
+    const headers = ['column1', 'column2'];
+    const result = prepareDataForDownload([['a', 'b']], headers);
+
+    const expected = `"column1","column2"`;
+    assert.equal(expected, result.split('\r\n')[0]);
+    assert.isTrue(result.startsWith(expected));
+  });
+});
+
+describe('preventCSVInjectionAndStringify', () => {
+  it('prepends all double quotes with another double quote', () => {
+    let input = '"hello world"';
+    let expect = '""hello world""';
+    assert.equal(expect, preventCSVInjectionAndStringify(input).slice(1, -1));
+
+    input = 'Just a double quote: " ';
+    expect = 'Just a double quote: "" ';
+    assert.equal(expect, preventCSVInjectionAndStringify(input).slice(1, -1));
+
+    input = 'Multiple"double"quotes"""';
+    expect = 'Multiple""double""quotes""""""';
+    assert.equal(expect, preventCSVInjectionAndStringify(input).slice(1, -1));
+  });
+
+  it('wraps string with double quotes', () => {
+    let input = '"hello world"';
+    let expected = preventCSVInjectionAndStringify(input);
+    assert.equal('"', expected[0]);
+    assert.equal('"', expected[expected.length-1]);
+
+    input = 'For unevent quotes too: " ';
+    expected = '"For unevent quotes too: "" "';
+    assert.equal(expected, preventCSVInjectionAndStringify(input));
+
+    input = 'And for ending quotes"""';
+    expected = '"And for ending quotes"""""""';
+    assert.equal(expected, preventCSVInjectionAndStringify(input));
+  });
+
+  it('wraps strings containing commas with double quotes', () => {
+    const input = 'Let\'s, add, a bunch, of, commas,';
+    const expected = '"Let\'s, add, a bunch, of, commas,"';
+    assert.equal(expected, preventCSVInjectionAndStringify(input));
+  });
+
+  it('can handle strings containing commas and new line chars', () => {
+    const input = `""new"",\r\nline  "" "",\r\nand 'end', and end`;
+    const expected = `"""""new"""",\r\nline  """" """",\r\nand 'end', and end"`;
+    assert.equal(expected, preventCSVInjectionAndStringify(input));
+  });
+
+  it('preserves single quotes', () => {
+    let input = `all the 'single' quotes`;
+    let expected = `"all the 'single' quotes"`;
+    assert.equal(expected, preventCSVInjectionAndStringify(input));
+
+    input = `''''' fives single quotes before and after '''''`;
+    expected = `"''''' fives single quotes before and after '''''"`;
+    assert.equal(expected, preventCSVInjectionAndStringify(input));
+  });
+
+  it('prevents csv injection', () => {
+    let input = `@@Should prepend with single quote`;
+    let expected = `"'@@Should prepend with single quote"`;
+    assert.equal(expected, preventCSVInjectionAndStringify(input));
+
+    input = `at symbol @ later on, do not expect ' at start`;
+    expected = `"at symbol @ later on, do not expect ' at start"`;
+    assert.equal(expected, preventCSVInjectionAndStringify(input));
+
+    input = `==@+=--@Should prepend with single quote`;
+    expected = `"'==@+=--@Should prepend with single quote"`;
+    assert.equal(expected, preventCSVInjectionAndStringify(input));
+  });
+});
diff --git a/static_src/elements/framework/mr-issue-list/mr-issue-list.js b/static_src/elements/framework/mr-issue-list/mr-issue-list.js
new file mode 100644
index 0000000..3e0a279
--- /dev/null
+++ b/static_src/elements/framework/mr-issue-list/mr-issue-list.js
@@ -0,0 +1,1575 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import page from 'page';
+import {connectStore, store} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as sitewide from 'reducers/sitewide.js';
+import 'elements/framework/links/mr-issue-link/mr-issue-link.js';
+import 'elements/framework/links/mr-crbug-link/mr-crbug-link.js';
+import 'elements/framework/mr-dropdown/mr-dropdown.js';
+import 'elements/framework/mr-star/mr-issue-star.js';
+import {constructHref, prepareDataForDownload} from './list-to-csv-helpers.js';
+import {
+  issueRefToUrl,
+  issueRefToString,
+  issueStringToRef,
+  issueToIssueRef,
+  issueToIssueRefString,
+  labelRefsToOneWordLabels,
+} from 'shared/convertersV0.js';
+import {isTextInput, findDeepEventTarget} from 'shared/dom-helpers.js';
+import {
+  urlWithNewParams,
+  pluralize,
+  setHasAny,
+  objectValuesForKeys,
+} from 'shared/helpers.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import {parseColSpec, EMPTY_FIELD_VALUE} from 'shared/issue-fields.js';
+import './mr-show-columns-dropdown.js';
+
+/**
+ * Column to display name mapping dictionary
+ * @type {Object<string, string>}
+ */
+const COLUMN_DISPLAY_NAMES = Object.freeze({
+  'summary': 'Summary + Labels',
+});
+
+/** @const {number} Button property value of DOM click event */
+const PRIMARY_BUTTON = 0;
+/** @const {number} Button property value of DOM auxclick event */
+const MIDDLE_BUTTON = 1;
+
+/** @const {string} A short transition to ease movement of list items. */
+const EASE_OUT_TRANSITION = 'transform 0.05s cubic-bezier(0, 0, 0.2, 1)';
+
+/**
+ * Really high cardinality attributes like ID and Summary are unlikely to be
+ * useful if grouped, so it's better to just hide the option.
+ * @const {Set<string>}
+ */
+const UNGROUPABLE_COLUMNS = new Set(['id', 'summary']);
+
+/**
+ * Columns that should render as issue links.
+ * @const {Set<string>}
+ */
+const ISSUE_COLUMNS = new Set(['id', 'mergedinto', 'blockedon', 'blocking']);
+
+/**
+ * `<mr-issue-list>`
+ *
+ * A list of issues intended to be used in multiple contexts.
+ * @extends {LitElement}
+ */
+export class MrIssueList extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          width: 100%;
+          font-size: var(--chops-main-font-size);
+        }
+        table {
+          width: 100%;
+        }
+        .edit-widget-container {
+          display: flex;
+          flex-wrap: no-wrap;
+          align-items: center;
+        }
+        mr-issue-star {
+          --mr-star-size: 18px;
+          margin-bottom: 1px;
+          margin-left: 4px;
+        }
+        input[type="checkbox"] {
+          cursor: pointer;
+          margin: 0 4px;
+          width: 16px;
+          height: 16px;
+          border-radius: 2px;
+          box-sizing: border-box;
+          appearance: none;
+          -webkit-appearance: none;
+          border: 2px solid var(--chops-gray-400);
+          position: relative;
+          background: var(--chops-white);
+        }
+        th input[type="checkbox"] {
+          border-color: var(--chops-gray-500);
+        }
+        input[type="checkbox"]:checked {
+          background: var(--chops-primary-accent-color);
+          border-color: var(--chops-primary-accent-color);
+        }
+        input[type="checkbox"]:checked::after {
+          left: 1px;
+          top: 2px;
+          position: absolute;
+          content: "";
+          width: 8px;
+          height: 4px;
+          border: 2px solid white;
+          border-right: none;
+          border-top: none;
+          transform: rotate(-45deg);
+        }
+        td, th.group-header {
+          padding: 4px 8px;
+          text-overflow: ellipsis;
+          border-bottom: var(--chops-normal-border);
+          cursor: pointer;
+          font-weight: normal;
+        }
+        .group-header-content {
+          height: 100%;
+          width: 100%;
+          align-items: center;
+          display: flex;
+        }
+        th.group-header i.material-icons {
+          font-size: var(--chops-icon-font-size);
+          color: var(--chops-primary-icon-color);
+          margin-right: 4px;
+        }
+        td.ignore-navigation {
+          cursor: default;
+        }
+        th {
+          background: var(--chops-table-header-bg);
+          white-space: nowrap;
+          text-align: left;
+          border-bottom: var(--chops-normal-border);
+        }
+        th.selection-header {
+          padding: 3px 8px;
+        }
+        th > mr-dropdown, th > mr-show-columns-dropdown {
+          font-weight: normal;
+          color: var(--chops-link-color);
+          --mr-dropdown-icon-color: var(--chops-link-color);
+          --mr-dropdown-anchor-padding: 3px 8px;
+          --mr-dropdown-anchor-font-weight: bold;
+          --mr-dropdown-menu-min-width: 150px;
+        }
+        tr {
+          padding: 0 8px;
+        }
+        tr[selected] {
+          background: var(--chops-selected-bg);
+        }
+        td:first-child, th:first-child {
+          border-left: 4px solid transparent;
+        }
+        tr[cursored] > td:first-child {
+          border-left: 4px solid var(--chops-blue-700);
+        }
+        mr-crbug-link {
+          /* We need the shortlink to be hidden but still accessible.
+          * The opacity attribute visually hides a link while still
+          * keeping it in the DOM.opacity. */
+          --mr-crbug-link-opacity: 0;
+          --mr-crbug-link-opacity-focused: 1;
+        }
+        td:hover > mr-crbug-link {
+          --mr-crbug-link-opacity: 1;
+        }
+        .col-summary, .header-summary {
+          /* Setting a table cell to 100% width makes it take up
+          * all remaining space in the table, not the full width of
+          * the table. */
+          width: 100%;
+        }
+        .summary-label {
+          display: inline-block;
+          margin: 0 2px;
+          color: var(--chops-green-800);
+          text-decoration: none;
+          font-size: 90%;
+        }
+        .summary-label:hover {
+          text-decoration: underline;
+        }
+        td.draggable i {
+          opacity: 0;
+        }
+        td.draggable {
+          color: var(--chops-primary-icon-color);
+          cursor: grab;
+          padding-left: 0;
+          padding-right: 0;
+        }
+        tr.dragged {
+          opacity: 0.74;
+        }
+        tr:hover td.draggable i {
+          opacity: 1;
+        }
+        .csv-download-container {
+          border-bottom: none;
+          text-align: end;
+          cursor: default;
+        }
+        #hidden-data-link {
+          display: none;
+        }
+        @media (min-width: 1024px) {
+          .first-row th {
+            position: sticky;
+            top: var(--monorail-header-height);
+            z-index: 10;
+          }
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    const selectAllChecked = this._selectedIssues.size > 0;
+    const checkboxLabel = `Select ${selectAllChecked ? 'None' : 'All'}`;
+
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <table cellspacing="0">
+        <thead>
+          <tr class="first-row">
+            ${this.rerank ? html`<th></th>` : ''}
+            <th class="selection-header">
+              <div class="edit-widget-container">
+                ${this.selectionEnabled ? html`
+                  <input
+                    class="select-all"
+                    .checked=${selectAllChecked}
+                    type="checkbox"
+                    aria-label=${checkboxLabel}
+                    title=${checkboxLabel}
+                    @change=${this._selectAll}
+                  />
+                ` : ''}
+              </div>
+            </th>
+            ${this.columns.map((column, i) => this._renderHeader(column, i))}
+            <th style="z-index: ${this.highestZIndex};">
+              <mr-show-columns-dropdown
+                title="Show columns"
+                menuAlignment="right"
+                .columns=${this.columns}
+                .issues=${this.issues}
+                .defaultFields=${this.defaultFields}
+              ></mr-show-columns-dropdown>
+            </th>
+          </tr>
+        </thead>
+        <tbody>
+          ${this._renderIssues()}
+        </tbody>
+        ${this.userDisplayName && html`
+          <tfoot><tr><td colspan=999 class="csv-download-container">
+            <a id="download-link" aria-label="Download page as CSV"
+                @click=${this._downloadCsv} href>CSV</a>
+            <a id="hidden-data-link" download="${this.projectName}-issues.csv"
+              href=${this._csvDataHref}></a>
+          </td></tr></tfoot>
+        `}
+      </table>
+    `;
+  }
+
+  /**
+   * @param {string} column
+   * @param {number} i The index of the column in the table.
+   * @return {TemplateResult} html for header for the i-th column.
+   * @private
+   */
+  _renderHeader(column, i) {
+    // zIndex is used to render the z-index property in descending order
+    const zIndex = this.highestZIndex - i;
+    const colKey = column.toLowerCase();
+    const name = colKey in COLUMN_DISPLAY_NAMES ? COLUMN_DISPLAY_NAMES[colKey] :
+      column;
+    return html`
+      <th style="z-index: ${zIndex};" class="header-${colKey}">
+        <mr-dropdown
+          class="dropdown-${colKey}"
+          .text=${name}
+          .items=${this._headerActions(column, i)}
+          menuAlignment="left"
+        ></mr-dropdown>
+      </th>`;
+  }
+
+  /**
+   * @param {string} column
+   * @param {number} i The index of the column in the table.
+   * @return {Array<Object>} Available actions for the column.
+   * @private
+   */
+  _headerActions(column, i) {
+    const columnKey = column.toLowerCase();
+
+    const isGroupable = this.sortingAndGroupingEnabled &&
+        !UNGROUPABLE_COLUMNS.has(columnKey);
+
+    let showOnly = [];
+    if (isGroupable) {
+      const values = [...this._uniqueValuesByColumn.get(columnKey)];
+      if (values.length) {
+        showOnly = [{
+          text: 'Show only',
+          items: values.map((v) => ({
+            text: v,
+            handler: () => this.showOnly(column, v),
+          })),
+        }];
+      }
+    }
+    const sortingActions = this.sortingAndGroupingEnabled ? [
+      {
+        text: 'Sort up',
+        handler: () => this.updateSortSpec(column),
+      },
+      {
+        text: 'Sort down',
+        handler: () => this.updateSortSpec(column, true),
+      },
+    ] : [];
+    const actions = [
+      ...sortingActions,
+      ...showOnly,
+      {
+        text: 'Hide column',
+        handler: () => this.removeColumn(i),
+      },
+    ];
+    if (isGroupable) {
+      actions.push({
+        text: 'Group rows',
+        handler: () => this.addGroupBy(i),
+      });
+    }
+    return actions;
+  }
+
+  /**
+   * @return {TemplateResult}
+   */
+  _renderIssues() {
+    // Keep track of all the groups that we've seen so far to create
+    // group headers as needed.
+    const {issues, groupedIssues} = this;
+
+    if (groupedIssues) {
+      // Make sure issues in groups are rendered with unique indices across
+      // groups to make sure hot keys and the like still work.
+      let indexOffset = 0;
+      return html`${groupedIssues.map(({groupName, issues}) => {
+        const template = html`
+          ${this._renderGroup(groupName, issues, indexOffset)}
+        `;
+        indexOffset += issues.length;
+        return template;
+      })}`;
+    }
+
+    return html`
+      ${issues.map((issue, i) => this._renderRow(issue, i))}
+    `;
+  }
+
+  /**
+   * @param {string} groupName
+   * @param {Array<Issue>} issues
+   * @param {number} iOffset
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderGroup(groupName, issues, iOffset) {
+    if (!this.groups.length) return html``;
+
+    const count = issues.length;
+    const groupKey = groupName.toLowerCase();
+    const isHidden = this._hiddenGroups.has(groupKey);
+
+    return html`
+      <tr>
+        <th
+          class="group-header"
+          colspan="${this.numColumns}"
+          @click=${() => this._toggleGroup(groupKey)}
+          aria-expanded=${(!isHidden).toString()}
+        >
+          <div class="group-header-content">
+            <i
+              class="material-icons"
+              title=${isHidden ? 'Show' : 'Hide'}
+            >${isHidden ? 'add' : 'remove'}</i>
+            ${count} ${pluralize(count, 'issue')}: ${groupName}
+          </div>
+        </th>
+      </tr>
+      ${issues.map((issue, i) => this._renderRow(issue, iOffset + i, isHidden))}
+    `;
+  }
+
+  /**
+   * @param {string} groupKey Lowercase group key.
+   * @private
+   */
+  _toggleGroup(groupKey) {
+    if (this._hiddenGroups.has(groupKey)) {
+      this._hiddenGroups.delete(groupKey);
+    } else {
+      this._hiddenGroups.add(groupKey);
+    }
+
+    // Lit-element's default hasChanged check does not notice when Sets mutate.
+    this.requestUpdate('_hiddenGroups');
+  }
+
+  /**
+   * @param {Issue} issue
+   * @param {number} i Index within the list of issues
+   * @param {boolean=} isHidden
+   * @return {TemplateResult}
+   */
+  _renderRow(issue, i, isHidden = false) {
+    const rowSelected = this._selectedIssues.has(issueRefToString(issue));
+    const id = issueRefToString(issue);
+    const cursorId = issueRefToString(this.cursor);
+    const hasCursor = cursorId === id;
+    const dragged = this._dragging && rowSelected;
+
+    return html`
+      <tr
+        class="row-${i} list-row ${dragged ? 'dragged' : ''}"
+        ?selected=${rowSelected}
+        ?cursored=${hasCursor}
+        ?hidden=${isHidden}
+        data-issue-ref=${id}
+        data-index=${i}
+        data-name=${issue.name}
+        @focus=${this._setRowAsCursorOnFocus}
+        @click=${this._clickIssueRow}
+        @auxclick=${this._clickIssueRow}
+        @keydown=${this._keydownIssueRow}
+        tabindex="0"
+      >
+        ${this.rerank ? html`
+          <td class="draggable ignore-navigation"
+              @mousedown=${this._onMouseDown}>
+            <i class="material-icons" title="Drag issue">drag_indicator</i>
+          </td>
+        ` : ''}
+        <td class="ignore-navigation">
+          <div class="edit-widget-container">
+            ${this.selectionEnabled ? html`
+              <input
+                class="issue-checkbox"
+                .value=${id}
+                .checked=${rowSelected}
+                type="checkbox"
+                data-index=${i}
+                aria-label="Select Issue ${issue.localId}"
+                @change=${this._selectIssue}
+                @click=${this._selectIssueRange}
+              />
+            ` : ''}
+            ${this.starringEnabled ? html`
+              <mr-issue-star
+                .issueRef=${issueToIssueRef(issue)}
+              ></mr-issue-star>
+            ` : ''}
+          </div>
+        </td>
+
+        ${this.columns.map((column) => html`
+          <td class="col-${column.toLowerCase()}">
+            ${this._renderCell(column, issue)}
+          </td>
+        `)}
+
+        <td>
+          <mr-crbug-link .issue=${issue}></mr-crbug-link>
+        </td>
+      </tr>
+    `;
+  }
+
+  /**
+   * @param {string} column
+   * @param {Issue} issue
+   * @return {TemplateResult} Html for the given column for the given issue.
+   * @private
+   */
+  _renderCell(column, issue) {
+    const columnName = column.toLowerCase();
+    if (columnName === 'summary') {
+      return html`
+        ${issue.summary}
+        ${labelRefsToOneWordLabels(issue.labelRefs).map(({label}) => html`
+          <a
+            class="summary-label"
+            href="/p/${issue.projectName}/issues/list?q=label%3A${label}"
+          >${label}</a>
+        `)}
+      `;
+    }
+    const values = this.extractFieldValues(issue, column);
+
+    if (!values.length) return EMPTY_FIELD_VALUE;
+
+    // TODO(zhangtiff): Make this based on the "ISSUE" field type rather than a
+    // hardcoded list of issue fields.
+    if (ISSUE_COLUMNS.has(columnName)) {
+      return values.map((issueRefString, i) => {
+        const issue = this._issueForRefString(issueRefString, this.projectName);
+        return html`
+          <mr-issue-link
+            .projectName=${this.projectName}
+            .issue=${issue}
+            .queryParams=${this._queryParams}
+            short
+          ></mr-issue-link>${values.length - 1 > i ? ', ' : ''}
+        `;
+      });
+    }
+    return values.join(', ');
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      /**
+       * Array of columns to display.
+       */
+      columns: {type: Array},
+      /**
+       * Array of built in fields that are available outside of project
+       * configuration.
+       */
+      defaultFields: {type: Array},
+      /**
+       * A function that takes in an issue and a field name and returns the
+       * value for that field in the issue. This function accepts custom fields,
+       * built in fields, and ad hoc fields computed from label prefixes.
+       */
+      extractFieldValues: {type: Object},
+      /**
+       * Array of columns that are used as groups for issues.
+       */
+      groups: {type: Array},
+      /**
+       * List of issues to display.
+       */
+      issues: {type: Array},
+      /**
+       * A Redux action creator that calls the API to rerank the issues
+       * in the list. If set, reranking is enabled for this issue list.
+       */
+      rerank: {type: Object},
+      /**
+       * Whether issues should be selectable or not.
+       */
+      selectionEnabled: {type: Boolean},
+      /**
+       * Whether issues should be sortable and groupable or not. This will
+       * change how column headers will be displayed. The ability to sort and
+       * group are currently coupled.
+       */
+      sortingAndGroupingEnabled: {type: Boolean},
+      /**
+       * Whether to show issue starring or not.
+       */
+      starringEnabled: {type: Boolean},
+      /**
+       * A query representing the current set of matching issues in the issue
+       * list. Does not necessarily match queryParams.q since queryParams.q can
+       * be empty while currentQuery is set to a default project query.
+       */
+      currentQuery: {type: String},
+      /**
+       * Object containing URL parameters to be preserved when issue links are
+       * clicked. This Object is only used for the purpose of preserving query
+       * parameters across links, not for the purpose of evaluating the query
+       * parameters themselves to get values like columns, sort, or q. This
+       * separation is important because we don't want to tightly couple this
+       * list component with a specific URL system.
+       * @private
+       */
+      _queryParams: {type: Object},
+      /**
+       * The initial cursor that a list view uses. This attribute allows users
+       * of the list component to specify and control the cursor. When the
+       * initialCursor attribute updates, the list focuses the element specified
+       * by the cursor.
+       */
+      initialCursor: {type: String},
+      /**
+       * Logged in user's display name
+       */
+      userDisplayName: {type: String},
+      /**
+       * IssueRef Object specifying which issue the user is currently focusing.
+       */
+      _localCursor: {type: Object},
+      /**
+       * Set of group keys that are currently hidden.
+       */
+      _hiddenGroups: {type: Object},
+      /**
+       * Set of all selected issues where each entry is an issue ref string.
+       */
+      _selectedIssues: {type: Object},
+      /**
+       * List of unique phase names for all phases in issues.
+       */
+      _phaseNames: {type: Array},
+      /**
+       * True iff the user is dragging issues.
+       */
+      _dragging: {type: Boolean},
+      /**
+       * CSV data in data HREF format, used to download csv
+       */
+      _csvDataHref: {type: String},
+      /**
+       * Function to get a full Issue object for a given ref string.
+       */
+      _issueForRefString: {type: Object},
+    };
+  };
+
+  /** @override */
+  constructor() {
+    super();
+    /** @type {Array<Issue>} */
+    this.issues = [];
+    // TODO(jojwang): monorail:6336#c8, when ezt listissues page is fully
+    // deprecated, remove phaseNames from mr-issue-list.
+    this._phaseNames = [];
+    /** @type {IssueRef} */
+    this._localCursor;
+    /** @type {IssueRefString} */
+    this.initialCursor;
+    /** @type {Set<IssueRefString>} */
+    this._selectedIssues = new Set();
+    /** @type {string} */
+    this.projectName;
+    /** @type {Object} */
+    this._queryParams = {};
+    /** @type {string} */
+    this.currentQuery = '';
+    /**
+     * @param {Array<String>} items
+     * @param {number} index
+     * @return {Promise<void>}
+     */
+    this.rerank = null;
+    /** @type {boolean} */
+    this.selectionEnabled = false;
+    /** @type {boolean} */
+    this.sortingAndGroupingEnabled = false;
+    /** @type {boolean} */
+    this.starringEnabled = false;
+    /** @type {Array} */
+    this.columns = ['ID', 'Summary'];
+    /** @type {Array<string>} */
+    this.defaultFields = [];
+    /** @type {Array} */
+    this.groups = [];
+    this.userDisplayName = '';
+
+    /** @type {function(KeyboardEvent): void} */
+    this._boundRunListHotKeys = this._runListHotKeys.bind(this);
+    /** @type {function(MouseEvent): void} */
+    this._boundOnMouseMove = this._onMouseMove.bind(this);
+    /** @type {function(MouseEvent): void} */
+    this._boundOnMouseUp = this._onMouseUp.bind(this);
+
+    /**
+     * @param {Issue} _issue
+     * @param {string} _fieldName
+     * @return {Array<string>}
+     */
+    this.extractFieldValues = (_issue, _fieldName) => [];
+
+    /**
+     * @param {IssueRefString} _issueRefString
+     * @param {string} projectName The currently viewed project.
+     * @return {Issue}
+     */
+    this._issueForRefString = (_issueRefString, projectName) =>
+      issueStringToRef(_issueRefString, projectName);
+
+    this._hiddenGroups = new Set();
+
+    this._starredIssues = new Set();
+    this._fetchingStarredIssues = false;
+    this._starringIssues = new Map();
+
+    this._uniqueValuesByColumn = new Map();
+
+    this._dragging = false;
+    this._mouseX = null;
+    this._mouseY = null;
+
+    /** @type {number} */
+    this._lastSelectedCheckbox = -1;
+
+    // Expose page.js for stubbing.
+    this._page = page;
+    /** @type {string} page data in csv format as data href */
+    this._csvDataHref = '';
+  };
+
+  /** @override */
+  stateChanged(state) {
+    this._starredIssues = issueV0.starredIssues(state);
+    this._fetchingStarredIssues =
+        issueV0.requests(state).fetchStarredIssues.requesting;
+    this._starringIssues = issueV0.starringIssues(state);
+
+    this._phaseNames = (issueV0.issueListPhaseNames(state) || []);
+    this._queryParams = sitewide.queryParams(state);
+
+    this._issueForRefString = issueV0.issueForRefString(state);
+  }
+
+  /** @override */
+  firstUpdated() {
+    // Only attach an event listener once the DOM has rendered.
+    window.addEventListener('keydown', this._boundRunListHotKeys);
+    this._dataLink = this.shadowRoot.querySelector('#hidden-data-link');
+  }
+
+  /** @override */
+  disconnectedCallback() {
+    super.disconnectedCallback();
+
+    window.removeEventListener('keydown', this._boundRunListHotKeys);
+  }
+
+  /**
+   * @override
+   * @fires CustomEvent#selectionChange
+   */
+  update(changedProperties) {
+    if (changedProperties.has('issues')) {
+      // Clear selected issues to avoid an ever-growing Set size. In the future,
+      // we may want to consider saving selections across issue reloads, though,
+      // such as in the case or list refreshing.
+      this._selectedIssues = new Set();
+      this.dispatchEvent(new CustomEvent('selectionChange'));
+
+      // Clear group toggle state when the list of issues changes to prevent an
+      // ever-growing Set size.
+      this._hiddenGroups = new Set();
+
+      this._lastSelectedCheckbox = -1;
+    }
+
+    const valuesByColumnArgs = ['issues', 'columns', 'extractFieldValues'];
+    if (setHasAny(changedProperties, valuesByColumnArgs)) {
+      this._uniqueValuesByColumn = this._computeUniqueValuesByColumn(
+          ...objectValuesForKeys(this, valuesByColumnArgs));
+    }
+
+    super.update(changedProperties);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('initialCursor')) {
+      const ref = issueStringToRef(this.initialCursor, this.projectName);
+      const row = this._getRowFromIssueRef(ref);
+      if (row) {
+        row.focus();
+      }
+    }
+  }
+
+  /**
+   * Iterates through all issues in a list to sort unique values
+   * across columns, for use in the "Show only" feature.
+   * @param {Array} issues
+   * @param {Array} columns
+   * @param {function(Issue, string): Array<string>} fieldExtractor
+   * @return {Map} Map where each entry has a String key for the
+   *   lowercase column name and a Set value, continuing all values for
+   *   that column.
+   */
+  _computeUniqueValuesByColumn(issues, columns, fieldExtractor) {
+    const valueMap = new Map(
+        columns.map((col) => [col.toLowerCase(), new Set()]));
+
+    issues.forEach((issue) => {
+      columns.forEach((col) => {
+        const key = col.toLowerCase();
+        const valueSet = valueMap.get(key);
+
+        const values = fieldExtractor(issue, col);
+        // Note: This allows multiple casings of the same values to be added
+        // to the Set.
+        values.forEach((v) => valueSet.add(v));
+      });
+    });
+    return valueMap;
+  }
+
+  /**
+   * Used for dynamically computing z-index to ensure column dropdowns overlap
+   * properly.
+   */
+  get highestZIndex() {
+    return this.columns.length + 10;
+  }
+
+  /**
+   * The number of columns displayed in the table. This is the count of
+   * customized columns + number of built in columns.
+   */
+  get numColumns() {
+    return this.columns.length + 2;
+  }
+
+  /**
+   * Sort issues into groups if groups are defined. The grouping feature is used
+   * when the "groupby" URL parameter is set in the list view.
+   */
+  get groupedIssues() {
+    if (!this.groups || !this.groups.length) return;
+
+    const issuesByGroup = new Map();
+
+    this.issues.forEach((issue) => {
+      const groupName = this._groupNameForIssue(issue);
+      const groupKey = groupName.toLowerCase();
+
+      if (!issuesByGroup.has(groupKey)) {
+        issuesByGroup.set(groupKey, {groupName, issues: [issue]});
+      } else {
+        const entry = issuesByGroup.get(groupKey);
+        entry.issues.push(issue);
+      }
+    });
+    return [...issuesByGroup.values()];
+  }
+
+  /**
+   * The currently selected issue, with _localCursor overriding initialCursor.
+   *
+   * @return {IssueRef} The currently selected issue.
+   */
+  get cursor() {
+    if (this._localCursor) {
+      return this._localCursor;
+    }
+    if (this.initialCursor) {
+      return issueStringToRef(this.initialCursor, this.projectName);
+    }
+    return {};
+  }
+
+  /**
+   * Computes the name of the group that an issue belongs to. Issues are grouped
+   * by fields that the user specifies and group names are generated using a
+   * combination of an issue's field values for all specified groups.
+   *
+   * @param {Issue} issue
+   * @return {string}
+   */
+  _groupNameForIssue(issue) {
+    const groups = this.groups;
+    const keyPieces = [];
+
+    groups.forEach((group) => {
+      const values = this.extractFieldValues(issue, group);
+      if (!values.length) {
+        keyPieces.push(`-has:${group}`);
+      } else {
+        values.forEach((v) => {
+          keyPieces.push(`${group}=${v}`);
+        });
+      }
+    });
+
+    return keyPieces.join(' ');
+  }
+
+  /**
+   * @return {Array<Issue>} Selected issues in the order they appear.
+   */
+  get selectedIssues() {
+    return this.issues.filter((issue) =>
+      this._selectedIssues.has(issueToIssueRefString(issue)));
+  }
+
+  /**
+   * Update the search query to filter values matching a specific one.
+   *
+   * @param {string} column name of the column being filtered.
+   * @param {string} value value of the field to filter by.
+   */
+  showOnly(column, value) {
+    column = column.toLowerCase();
+
+    // TODO(zhangtiff): Handle edge cases where column names are not
+    // mapped directly to field names. For example, "AllLabels", should
+    // query for "Labels".
+    const querySegment = `${column}=${value}`;
+
+    let query = this.currentQuery.trim();
+
+    if (!query.includes(querySegment)) {
+      query += ' ' + querySegment;
+
+      this._updateQueryParams({q: query.trim()}, ['start']);
+    }
+  }
+
+  /**
+   * Update sort parameter in the URL based on user input.
+   *
+   * @param {string} column name of the column to be sorted.
+   * @param {boolean} descending descending or ascending order.
+   */
+  updateSortSpec(column, descending = false) {
+    column = column.toLowerCase();
+    const oldSpec = this._queryParams.sort || '';
+    const columns = parseColSpec(oldSpec.toLowerCase());
+
+    // Remove any old instances of the same sort spec.
+    const newSpec = columns.filter(
+        (c) => c && c !== column && c !== `-${column}`);
+
+    newSpec.unshift(`${descending ? '-' : ''}${column}`);
+
+    this._updateQueryParams({sort: newSpec.join(' ')}, ['start']);
+  }
+
+  /**
+   * Updates the groupby URL parameter to include a new column to group.
+   *
+   * @param {number} i index of the column to be grouped.
+   */
+  addGroupBy(i) {
+    const groups = [...this.groups];
+    const columns = [...this.columns];
+    const groupedColumn = columns[i];
+    columns.splice(i, 1);
+
+    groups.unshift(groupedColumn);
+
+    this._updateQueryParams({
+      groupby: groups.join(' '),
+      colspec: columns.join('+'),
+    }, ['start']);
+  }
+
+  /**
+   * Removes the column at a particular index.
+   *
+   * @param {number} i the issue column to be removed.
+   */
+  removeColumn(i) {
+    const columns = [...this.columns];
+    columns.splice(i, 1);
+    this.reloadColspec(columns);
+  }
+
+  /**
+   * Adds a new column to a particular index.
+   *
+   * @param {string} name of the new column added.
+   */
+  addColumn(name) {
+    this.reloadColspec([...this.columns, name]);
+  }
+
+  /**
+   * Reflects changes to the columns of an issue list to the URL, through
+   * frontend routing.
+   *
+   * @param {Array} newColumns the new colspec to set in the URL.
+   */
+  reloadColspec(newColumns) {
+    this._updateQueryParams({colspec: newColumns.join('+')});
+  }
+
+  /**
+   * Navigates to the same URL as the current page, but with query
+   * params updated.
+   *
+   * @param {Object} newParams keys and values of the queryParams
+   * Object to be updated.
+   * @param {Array} deletedParams keys to be cleared from queryParams.
+   */
+  _updateQueryParams(newParams = {}, deletedParams = []) {
+    const url = urlWithNewParams(this._baseUrl(), this._queryParams, newParams,
+        deletedParams);
+    this._page(url);
+  }
+
+  /**
+   * Get the current URL of the page, without query params. Useful for
+   * test stubbing.
+   *
+   * @return {string} the URL of the list page, without params.
+   */
+  _baseUrl() {
+    return window.location.pathname;
+  }
+
+  /**
+   * Run issue list hot keys. This event handler needs to be bound globally
+   * because a list cursor can be defined even when no element in the list is
+   * focused.
+   * @param {KeyboardEvent} e
+   */
+  _runListHotKeys(e) {
+    if (!this.issues || !this.issues.length) return;
+    const target = findDeepEventTarget(e);
+    if (!target || isTextInput(target)) return;
+
+    const key = e.key;
+
+    const activeRow = this._getCursorElement();
+
+    let i = -1;
+    if (activeRow) {
+      i = Number.parseInt(activeRow.dataset.index);
+
+      const issue = this.issues[i];
+
+      switch (key) {
+        case 's': // Star focused issue.
+          this._starIssue(issueToIssueRef(issue));
+          return;
+        case 'x': // Toggle selection of focused issue.
+          const issueRefString = issueToIssueRefString(issue);
+          this._updateSelectedIssues([issueRefString],
+              !this._selectedIssues.has(issueRefString));
+          return;
+        case 'o': // Open current issue.
+        case 'O': // Open current issue in new tab.
+          this._navigateToIssue(issue, e.shiftKey);
+          return;
+      }
+    }
+
+    // Move up and down the issue list.
+    // 'j' moves 'down'.
+    // 'k' moves 'up'.
+    if (key === 'j' || key === 'k') {
+      if (key === 'j') { // Navigate down the list.
+        i += 1;
+        if (i >= this.issues.length) {
+          i = 0;
+        }
+      } else if (key === 'k') { // Navigate up the list.
+        i -= 1;
+        if (i < 0) {
+          i = this.issues.length - 1;
+        }
+      }
+
+      const nextRow = this.shadowRoot.querySelector(`.row-${i}`);
+      this._setRowAsCursor(nextRow);
+    }
+  }
+
+  /**
+   * @return {HTMLTableRowElement}
+   */
+  _getCursorElement() {
+    const cursor = this.cursor;
+    if (cursor) {
+      // If there's a cursor set, use that instead of focus.
+      return this._getRowFromIssueRef(cursor);
+    }
+    return;
+  }
+
+  /**
+   * @param {FocusEvent} e
+   */
+  _setRowAsCursorOnFocus(e) {
+    this._setRowAsCursor(/** @type {HTMLTableRowElement} */ (e.target));
+  }
+
+  /**
+   *
+   * @param {HTMLTableRowElement} row
+   */
+  _setRowAsCursor(row) {
+    this._localCursor = issueStringToRef(row.dataset.issueRef,
+        this.projectName);
+    row.focus();
+  }
+
+  /**
+   * @param {IssueRef} ref The issueRef to query for.
+   * @return {HTMLTableRowElement}
+   */
+  _getRowFromIssueRef(ref) {
+    return this.shadowRoot.querySelector(
+        `.list-row[data-issue-ref="${issueRefToString(ref)}"]`);
+  }
+
+  /**
+   * Returns an Array containing every <tr> in the list, excluding the header.
+   * @return {Array<HTMLTableRowElement>}
+   */
+  _getRows() {
+    return Array.from(this.shadowRoot.querySelectorAll('.list-row'));
+  }
+
+  /**
+   * Returns an Array containing every selected <tr> in the list.
+   * @return {Array<HTMLTableRowElement>}
+   */
+  _getSelectedRows() {
+    return this._getRows().filter((row) => {
+      return this._selectedIssues.has(row.dataset.issueRef);
+    });
+  }
+
+  /**
+   * @param {IssueRef} issueRef Issue to star
+   */
+  _starIssue(issueRef) {
+    if (!this.starringEnabled) return;
+    const issueKey = issueRefToString(issueRef);
+
+    // TODO(zhangtiff): Find way to share star disabling logic more.
+    const isStarring = this._starringIssues.has(issueKey) &&
+      this._starringIssues.get(issueKey).requesting;
+    const starEnabled = !this._fetchingStarredIssues && !isStarring;
+    if (starEnabled) {
+      const newIsStarred = !this._starredIssues.has(issueKey);
+      this._starIssueInternal(issueRef, newIsStarred);
+    }
+  }
+
+  /**
+   * Wrap store.dispatch and issue.star, for testing.
+   *
+   * @param {IssueRef} issueRef the issue being starred.
+   * @param {boolean} newIsStarred whether to star or unstar the issue.
+   * @private
+   */
+  _starIssueInternal(issueRef, newIsStarred) {
+    store.dispatch(issueV0.star(issueRef, newIsStarred));
+  }
+  /**
+   * @param {Event} e
+   * @fires CustomEvent#open-dialog
+   * @private
+   */
+  _selectAll(e) {
+    const checkbox = /** @type {HTMLInputElement} */ (e.target);
+
+    if (checkbox.checked) {
+      this._selectedIssues = new Set(this.issues.map(issueRefToString));
+    } else {
+      this._selectedIssues = new Set();
+    }
+    this.dispatchEvent(new CustomEvent('selectionChange'));
+  }
+
+  // TODO(zhangtiff): Implement Shift+Click to select a range of checkboxes
+  // for the 'x' hot key.
+  /**
+   * @param {MouseEvent} e
+   * @private
+   */
+  _selectIssueRange(e) {
+    if (!this.selectionEnabled) return;
+
+    const checkbox = /** @type {HTMLInputElement} */ (e.target);
+
+    const index = Number.parseInt(checkbox.dataset.index);
+    if (Number.isNaN(index)) {
+      console.error('Issue checkbox has invalid data-index attribute.');
+      return;
+    }
+
+    const lastIndex = this._lastSelectedCheckbox;
+    if (e.shiftKey && lastIndex >= 0) {
+      const newCheckedState = checkbox.checked;
+
+      const start = Math.min(lastIndex, index);
+      const end = Math.max(lastIndex, index) + 1;
+
+      const updatedIssueKeys = this.issues.slice(start, end).map(
+          issueToIssueRefString);
+      this._updateSelectedIssues(updatedIssueKeys, newCheckedState);
+    }
+
+    this._lastSelectedCheckbox = index;
+  }
+
+  /**
+   * @param {Event} e
+   * @private
+   */
+  _selectIssue(e) {
+    if (!this.selectionEnabled) return;
+
+    const checkbox = /** @type {HTMLInputElement} */ (e.target);
+    const issueKey = checkbox.value;
+
+    this._updateSelectedIssues([issueKey], checkbox.checked);
+  }
+
+  /**
+   * @param {Array<IssueRefString>} issueKeys Stringified issue refs.
+   * @param {boolean} selected
+   * @fires CustomEvent#selectionChange
+   * @private
+   */
+  _updateSelectedIssues(issueKeys, selected) {
+    let hasChanges = false;
+
+    issueKeys.forEach((issueKey) => {
+      const oldSelection = this._selectedIssues.has(issueKey);
+
+      if (selected) {
+        this._selectedIssues.add(issueKey);
+      } else if (this._selectedIssues.has(issueKey)) {
+        this._selectedIssues.delete(issueKey);
+      }
+
+      const newSelection = this._selectedIssues.has(issueKey);
+
+      hasChanges = hasChanges || newSelection !== oldSelection;
+    });
+
+
+    if (hasChanges) {
+      this.requestUpdate('_selectedIssues');
+      this.dispatchEvent(new CustomEvent('selectionChange'));
+    }
+  }
+
+  /**
+   * Handles 'Enter' being pressed when a row is focused.
+   * Note we install the 'Enter' listener on the row rather than the window so
+   * 'Enter' behaves as expected when the focus is on other elements.
+   *
+   * @param {KeyboardEvent} e
+   * @private
+   */
+  _keydownIssueRow(e) {
+    if (e.key === 'Enter') {
+      this._maybeOpenIssueRow(e);
+    }
+  }
+
+  /**
+   * Handles mouseDown to start drag events.
+   * @param {MouseEvent} event
+   * @private
+   */
+  _onMouseDown(event) {
+    event.cancelable && event.preventDefault();
+
+    this._mouseX = event.clientX;
+    this._mouseY = event.clientY;
+
+    this._setRowAsCursor(event.currentTarget.parentNode);
+    this._startDrag();
+
+    // We add the event listeners to window because the mouse can go out of the
+    // bounds of the target element. window.mouseUp still triggers even if the
+    // mouse is outside the browser window.
+    window.addEventListener('mousemove', this._boundOnMouseMove);
+    window.addEventListener('mouseup', this._boundOnMouseUp);
+  }
+
+  /**
+   * Handles mouseMove to continue drag events.
+   * @param {MouseEvent} event
+   * @private
+   */
+  _onMouseMove(event) {
+    event.cancelable && event.preventDefault();
+
+    const x = event.clientX - this._mouseX;
+    const y = event.clientY - this._mouseY;
+    this._continueDrag(x, y);
+  }
+
+  /**
+   * Handles mouseUp to end drag events.
+   * @param {MouseEvent} event
+   * @private
+   */
+  _onMouseUp(event) {
+    event.cancelable && event.preventDefault();
+
+    window.removeEventListener('mousemove', this._boundOnMouseMove);
+    window.removeEventListener('mouseup', this._boundOnMouseUp);
+
+    this._endDrag(event.clientY - this._mouseY);
+  }
+
+  /**
+   * Gives a visual indicator that we've started dragging an issue row.
+   * @private
+   */
+  _startDrag() {
+    this._dragging = true;
+
+    // If the dragged row is not selected, select it.
+    // TODO(dtu): Allow dragging an existing selection for multi-drag.
+    const issueRefString = issueRefToString(this.cursor);
+    this._selectedIssues = new Set();
+    this._updateSelectedIssues([issueRefString], true);
+  }
+
+  /**
+   * @param {number} x The x-distance the cursor has moved since mouseDown.
+   * @param {number} y The y-distance the cursor has moved since mouseDown.
+   * @private
+   */
+  _continueDrag(x, y) {
+    // Unselected rows: Transition them to their new positions.
+    const [rows, initialIndex, finalIndex] = this._computeRerank(y);
+    this._translateRows(rows, initialIndex, finalIndex);
+
+    // Selected rows: Stick them to the cursor. No transition.
+    for (const row of this._getSelectedRows()) {
+      row.style.transform = `translate(${x}px, ${y}px`;
+    };
+  }
+
+  /**
+   * @param {number} y The y-distance the cursor has moved since mouseDown.
+   * @private
+   */
+  async _endDrag(y) {
+    this._dragging = false;
+
+    // Unselected rows: Transition them to their new positions.
+    const [rows, initialIndex, finalIndex] = this._computeRerank(y);
+    const targetTranslation =
+        this._translateRows(rows, initialIndex, finalIndex);
+
+    // Selected rows: Transition them to their final positions
+    // and reset their opacity.
+    const selectedRows = this._getSelectedRows();
+    for (const row of selectedRows) {
+      row.style.transition = EASE_OUT_TRANSITION;
+      row.style.transform = `translate(0px, ${targetTranslation}px)`;
+    };
+
+    // Submit the change.
+    const items = selectedRows.map((row) => row.dataset.name);
+    await this.rerank(items, finalIndex);
+
+    // Reset the transforms.
+    for (const row of this._getRows()) {
+      row.style.transition = '';
+      row.style.transform = '';
+    };
+
+    // Set the cursor to the new row.
+    // In order to focus the correct element, we need the DOM to be in sync
+    // with the issue list. We modified this.issues, so wait for a re-render.
+    await this.updateComplete;
+    const selector = `.list-row[data-index="${finalIndex}"]`;
+    this.shadowRoot.querySelector(selector).focus();
+  }
+
+  /**
+   * Computes the starting and ending indices of the cursor row,
+   * given how far the mouse has been dragged in the y-direction.
+   * The indices assume the cursor row has been removed from the list.
+   * @param {number} y The y-distance the cursor has moved since mouseDown.
+   * @return {[Array<HTMLTableRowElement>, number, number]} A tuple containing:
+   *     An Array of table rows with the cursor row removed.
+   *     The initial index of the cursor row.
+   *     The final index of the cursor row.
+   * @private
+   */
+  _computeRerank(y) {
+    const row = this._getCursorElement();
+    const rows = this._getRows();
+    const listTop = row.parentNode.offsetTop;
+
+    // Find the initial index of the cursor row.
+    // TODO(dtu): If we support multi-drag, this should be the adjusted index of
+    // the first selected row after collapsing spaces in the selected group.
+    const initialIndex = rows.indexOf(row);
+    rows.splice(initialIndex, 1);
+
+    // Compute the initial and final y-positions of the top
+    // of the cursor row relative to the top of the list.
+    const initialY = row.offsetTop - listTop;
+    const finalY = initialY + y;
+
+    // Compute the final index of the cursor row.
+    // The break points are the halfway marks of each row.
+    let finalIndex = 0;
+    for (finalIndex = 0; finalIndex < rows.length; ++finalIndex) {
+      const rowTop = rows[finalIndex].offsetTop - listTop -
+          (finalIndex >= initialIndex ? row.scrollHeight : 0);
+      const breakpoint = rowTop + rows[finalIndex].scrollHeight / 2;
+      if (breakpoint > finalY) {
+        break;
+      }
+    }
+
+    return [rows, initialIndex, finalIndex];
+  }
+
+  /**
+   * @param {Array<HTMLTableRowElement>} rows Array of table rows with the
+   *    cursor row removed.
+   * @param {number} initialIndex The initial index of the cursor row.
+   * @param {number} finalIndex The final index of the cursor row.
+   * @return {number} The number of pixels the cursor row moved.
+   * @private
+   */
+  _translateRows(rows, initialIndex, finalIndex) {
+    const firstIndex = Math.min(initialIndex, finalIndex);
+    const lastIndex = Math.max(initialIndex, finalIndex);
+
+    const rowHeight = this._getCursorElement().scrollHeight;
+    const translation = initialIndex < finalIndex ? -rowHeight : rowHeight;
+
+    let targetTranslation = 0;
+    for (let i = 0; i < rows.length; ++i) {
+      rows[i].style.transition = EASE_OUT_TRANSITION;
+      if (i >= firstIndex && i < lastIndex) {
+        rows[i].style.transform = `translate(0px, ${translation}px)`;
+        targetTranslation += rows[i].scrollHeight;
+      } else {
+        rows[i].style.transform = '';
+      }
+    }
+
+    return initialIndex < finalIndex ? targetTranslation : -targetTranslation;
+  }
+
+  /**
+   * Handle click and auxclick on issue row.
+   * @param {MouseEvent} event
+   * @private
+   */
+  _clickIssueRow(event) {
+    if (event.button === PRIMARY_BUTTON || event.button === MIDDLE_BUTTON) {
+      this._maybeOpenIssueRow(
+          event, /* openNewTab= */ event.button === MIDDLE_BUTTON);
+    }
+  }
+
+  /**
+   * Checks that the given event should not be ignored, then navigates to the
+   * issue associated with the row.
+   *
+   * @param {MouseEvent|KeyboardEvent} rowEvent A click or 'enter' on a row.
+   * @param {boolean=} openNewTab Forces opening in a new tab
+   * @private
+   */
+  _maybeOpenIssueRow(rowEvent, openNewTab = false) {
+    const path = rowEvent.composedPath();
+    const containsIgnoredElement = path.find(
+        (node) => (node.tagName || '').toUpperCase() === 'A' ||
+        (node.classList && node.classList.contains('ignore-navigation')));
+    if (containsIgnoredElement) return;
+
+    const row = /** @type {HTMLTableRowElement} */ (rowEvent.currentTarget);
+
+    const i = Number.parseInt(row.dataset.index);
+
+    if (i >= 0 && i < this.issues.length) {
+      this._navigateToIssue(this.issues[i], openNewTab || rowEvent.metaKey ||
+          rowEvent.ctrlKey);
+    }
+  }
+
+  /**
+   * @param {Issue} issue
+   * @param {boolean} newTab
+   * @private
+   */
+  _navigateToIssue(issue, newTab) {
+    const link = issueRefToUrl(issueToIssueRef(issue),
+        this._queryParams);
+
+    if (newTab) {
+      // Whether the link opens in a new tab or window is based on the
+      // user's browser preferences.
+      window.open(link, '_blank', 'noopener');
+    } else {
+      this._page(link);
+    }
+  }
+
+  /**
+   * Convert an issue's data into an array of strings, where the columns
+   * match this.columns. Extracting data like _renderCell.
+   * @param {Issue} issue
+   * @return {Array<string>}
+   * @private
+   */
+  _convertIssueToPlaintextArray(issue) {
+    return this.columns.map((column) => {
+      return this.extractFieldValues(issue, column).join(', ');
+    });
+  }
+
+  /**
+   * Convert each Issue into array of strings, where the columns
+   * match this.columns.
+   * @return {Array<Array<string>>}
+   * @private
+   */
+  _convertIssuesToPlaintextArrays() {
+    return this.issues.map(this._convertIssueToPlaintextArray.bind(this));
+  }
+
+  /**
+   * Download content as csv. Conversion to CSV only on button click
+   * instead of on data change because CSV download is not often used.
+   * @param {MouseEvent} event
+   * @private
+   */
+  async _downloadCsv(event) {
+    event.preventDefault();
+
+    if (this.userDisplayName) {
+      // convert issues to array of arrays of strings
+      const issueData = this._convertIssuesToPlaintextArrays();
+
+      // convert the data into csv formatted string.
+      const csvDataString = prepareDataForDownload(issueData, this.columns);
+
+      // construct data href
+      const href = constructHref(csvDataString);
+
+      // modify a tag's href
+      this._csvDataHref = href;
+      await this.requestUpdate('_csvDataHref');
+
+      // click to trigger download
+      this._dataLink.click();
+
+      // reset dataHref
+      this._csvDataHref = '';
+    }
+  }
+};
+
+customElements.define('mr-issue-list', MrIssueList);
diff --git a/static_src/elements/framework/mr-issue-list/mr-issue-list.test.js b/static_src/elements/framework/mr-issue-list/mr-issue-list.test.js
new file mode 100644
index 0000000..3861e32
--- /dev/null
+++ b/static_src/elements/framework/mr-issue-list/mr-issue-list.test.js
@@ -0,0 +1,1328 @@
+// Copyright 2019 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.
+import {assert} from 'chai';
+import sinon from 'sinon';
+import * as projectV0 from 'reducers/projectV0.js';
+import {stringValuesForIssueField} from 'shared/issue-fields.js';
+import {MrIssueList} from './mr-issue-list.js';
+
+let element;
+
+const listRowIsFocused = (element, i) => {
+  const focused = element.shadowRoot.activeElement;
+  assert.equal(focused.tagName.toUpperCase(), 'TR');
+  assert.equal(focused.dataset.index, `${i}`);
+};
+
+describe('mr-issue-list', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-issue-list');
+    element.extractFieldValues = projectV0.extractFieldValuesFromIssue({});
+    document.body.appendChild(element);
+
+    sinon.stub(element, '_baseUrl').returns('/p/chromium/issues/list');
+    sinon.stub(element, '_page');
+    sinon.stub(window, 'open');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+    window.open.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrIssueList);
+  });
+
+  it('issue summaries render', async () => {
+    element.issues = [
+      {summary: 'test issue'},
+      {summary: 'I have a summary'},
+    ];
+    element.columns = ['Summary'];
+
+    await element.updateComplete;
+
+    const summaries = element.shadowRoot.querySelectorAll('.col-summary');
+
+    assert.equal(summaries.length, 2);
+
+    assert.equal(summaries[0].textContent.trim(), 'test issue');
+    assert.equal(summaries[1].textContent.trim(), 'I have a summary');
+  });
+
+  it('one word labels render in summary column', async () => {
+    element.issues = [
+      {
+        projectName: 'test',
+        localId: 1,
+        summary: 'test issue',
+        labelRefs: [
+          {label: 'ignore-multi-word-labels'},
+          {label: 'Security'},
+          {label: 'A11y'},
+        ],
+      },
+    ];
+    element.columns = ['Summary'];
+
+    await element.updateComplete;
+
+    const summary = element.shadowRoot.querySelector('.col-summary');
+    const labels = summary.querySelectorAll('.summary-label');
+
+    assert.equal(labels.length, 2);
+
+    assert.equal(labels[0].textContent.trim(), 'Security');
+    assert.include(labels[0].href,
+        '/p/test/issues/list?q=label%3ASecurity');
+    assert.equal(labels[1].textContent.trim(), 'A11y');
+    assert.include(labels[1].href,
+        '/p/test/issues/list?q=label%3AA11y');
+  });
+
+  it('blocking column renders issue links', async () => {
+    element.issues = [
+      {
+        projectName: 'test',
+        localId: 1,
+        blockingIssueRefs: [
+          {projectName: 'test', localId: 2},
+          {projectName: 'test', localId: 3},
+        ],
+      },
+    ];
+    element.columns = ['Blocking'];
+
+    await element.updateComplete;
+
+    const blocking = element.shadowRoot.querySelector('.col-blocking');
+    const link = blocking.querySelector('mr-issue-link');
+    assert.equal(link.href, '/p/test/issues/detail?id=2');
+  });
+
+  it('blockedOn column renders issue links', async () => {
+    element.issues = [
+      {
+        projectName: 'test',
+        localId: 1,
+        blockedOnIssueRefs: [{projectName: 'test', localId: 2}],
+      },
+    ];
+    element.columns = ['BlockedOn'];
+
+    await element.updateComplete;
+
+    const blocking = element.shadowRoot.querySelector('.col-blockedon');
+    const link = blocking.querySelector('mr-issue-link');
+    assert.equal(link.href, '/p/test/issues/detail?id=2');
+  });
+
+  it('mergedInto column renders issue link', async () => {
+    element.issues = [
+      {
+        projectName: 'test',
+        localId: 1,
+        mergedIntoIssueRef: {projectName: 'test', localId: 2},
+      },
+    ];
+    element.columns = ['MergedInto'];
+
+    await element.updateComplete;
+
+    const blocking = element.shadowRoot.querySelector('.col-mergedinto');
+    const link = blocking.querySelector('mr-issue-link');
+    assert.equal(link.href, '/p/test/issues/detail?id=2');
+  });
+
+  it('clicking issue link does not trigger _navigateToIssue', async () => {
+    sinon.stub(element, '_navigateToIssue');
+
+    // Prevent the page from actually navigating on the link click.
+    const clickIntercepter = sinon.spy((e) => {
+      e.preventDefault();
+    });
+    window.addEventListener('click', clickIntercepter);
+
+    element.issues = [
+      {projectName: 'test', localId: 1, summary: 'test issue'},
+      {projectName: 'test', localId: 2, summary: 'I have a summary'},
+    ];
+    element.columns = ['ID'];
+
+    await element.updateComplete;
+
+    const idLink = element.shadowRoot.querySelector('.col-id > mr-issue-link');
+
+    idLink.click();
+
+    sinon.assert.calledOnce(clickIntercepter);
+    sinon.assert.notCalled(element._navigateToIssue);
+
+    window.removeEventListener('click', clickIntercepter);
+  });
+
+  it('clicking issue row opens issue', async () => {
+    element.issues = [{
+      summary: 'click me',
+      localId: 22,
+      projectName: 'chromium',
+    }];
+    element.columns = ['Summary'];
+
+    await element.updateComplete;
+
+    const rowChild = element.shadowRoot.querySelector('.col-summary');
+    rowChild.click();
+
+    sinon.assert.calledWith(element._page, '/p/chromium/issues/detail?id=22');
+    sinon.assert.notCalled(window.open);
+  });
+
+  it('ctrl+click on row opens issue in new tab', async () => {
+    element.issues = [{
+      summary: 'click me',
+      localId: 24,
+      projectName: 'chromium',
+    }];
+    element.columns = ['Summary'];
+
+    await element.updateComplete;
+
+    const rowChild = element.shadowRoot.querySelector('.col-summary');
+    rowChild.dispatchEvent(new MouseEvent('click',
+        {ctrlKey: true, bubbles: true}));
+
+    sinon.assert.calledWith(window.open,
+        '/p/chromium/issues/detail?id=24', '_blank', 'noopener');
+  });
+
+  it('meta+click on row opens issue in new tab', async () => {
+    element.issues = [{
+      summary: 'click me',
+      localId: 24,
+      projectName: 'chromium',
+    }];
+    element.columns = ['Summary'];
+
+    await element.updateComplete;
+
+    const rowChild = element.shadowRoot.querySelector('.col-summary');
+    rowChild.dispatchEvent(new MouseEvent('click',
+        {metaKey: true, bubbles: true}));
+
+    sinon.assert.calledWith(window.open,
+        '/p/chromium/issues/detail?id=24', '_blank', 'noopener');
+  });
+
+  it('mouse wheel click on row opens issue in new tab', async () => {
+    element.issues = [{
+      summary: 'click me',
+      localId: 24,
+      projectName: 'chromium',
+    }];
+    element.columns = ['Summary'];
+
+    await element.updateComplete;
+
+    const rowChild = element.shadowRoot.querySelector('.col-summary');
+    rowChild.dispatchEvent(new MouseEvent('auxclick',
+        {button: 1, bubbles: true}));
+
+    sinon.assert.calledWith(window.open,
+        '/p/chromium/issues/detail?id=24', '_blank', 'noopener');
+  });
+
+  it('right click on row does not navigate', async () => {
+    element.issues = [{
+      summary: 'click me',
+      localId: 24,
+      projectName: 'chromium',
+    }];
+    element.columns = ['Summary'];
+
+    await element.updateComplete;
+
+    const rowChild = element.shadowRoot.querySelector('.col-summary');
+    rowChild.dispatchEvent(new MouseEvent('auxclick',
+        {button: 2, bubbles: true}));
+
+    sinon.assert.notCalled(window.open);
+  });
+
+  it('AllLabels column renders', async () => {
+    element.issues = [
+      {labelRefs: [{label: 'test'}, {label: 'hello-world'}]},
+      {labelRefs: [{label: 'one-label'}]},
+    ];
+
+    element.columns = ['AllLabels'];
+
+    await element.updateComplete;
+
+    const labels = element.shadowRoot.querySelectorAll('.col-alllabels');
+
+    assert.equal(labels.length, 2);
+
+    assert.equal(labels[0].textContent.trim(), 'test, hello-world');
+    assert.equal(labels[1].textContent.trim(), 'one-label');
+  });
+
+  it('issues sorted into groups when groups defined', async () => {
+    element.issues = [
+      {ownerRef: {displayName: 'test@example.com'}},
+      {ownerRef: {displayName: 'test@example.com'}},
+      {ownerRef: {displayName: 'other.user@example.com'}},
+      {},
+    ];
+
+    element.columns = ['Owner'];
+    element.groups = ['Owner'];
+
+    await element.updateComplete;
+
+    const owners = element.shadowRoot.querySelectorAll('.col-owner');
+    assert.equal(owners.length, 4);
+
+    const groupHeaders = element.shadowRoot.querySelectorAll(
+        '.group-header');
+    assert.equal(groupHeaders.length, 3);
+
+    assert.include(groupHeaders[0].textContent,
+        '2 issues: Owner=test@example.com');
+    assert.include(groupHeaders[1].textContent,
+        '1 issue: Owner=other.user@example.com');
+    assert.include(groupHeaders[2].textContent, '1 issue: -has:Owner');
+  });
+
+  it('toggling group hides members', async () => {
+    element.issues = [
+      {ownerRef: {displayName: 'group1@example.com'}},
+      {ownerRef: {displayName: 'group2@example.com'}},
+    ];
+
+    element.columns = ['Owner'];
+    element.groups = ['Owner'];
+
+    await element.updateComplete;
+
+    const issueRows = element.shadowRoot.querySelectorAll('.list-row');
+    assert.equal(issueRows.length, 2);
+
+    assert.isFalse(issueRows[0].hidden);
+    assert.isFalse(issueRows[1].hidden);
+
+    const groupHeaders = element.shadowRoot.querySelectorAll(
+        '.group-header');
+    assert.equal(groupHeaders.length, 2);
+
+    // Toggle first group hidden.
+    groupHeaders[0].click();
+    await element.updateComplete;
+
+    assert.isTrue(issueRows[0].hidden);
+    assert.isFalse(issueRows[1].hidden);
+  });
+
+  it('reloadColspec navigates to page with new colspec', () => {
+    element.columns = ['ID', 'Summary'];
+    element._queryParams = {};
+
+    element.reloadColspec(['Summary', 'AllLabels']);
+
+    sinon.assert.calledWith(element._page,
+        '/p/chromium/issues/list?colspec=Summary%2BAllLabels');
+  });
+
+  it('updateSortSpec navigates to page with new sort option', async () => {
+    element.columns = ['ID', 'Summary'];
+    element._queryParams = {};
+
+    await element.updateComplete;
+
+    element.updateSortSpec('Summary', true);
+
+    sinon.assert.calledWith(element._page,
+        '/p/chromium/issues/list?sort=-summary');
+  });
+
+  it('updateSortSpec navigates to first page when on later page', async () => {
+    element.columns = ['ID', 'Summary'];
+    element._queryParams = {start: '100', q: 'owner:me'};
+
+    await element.updateComplete;
+
+    element.updateSortSpec('Summary', true);
+
+    sinon.assert.calledWith(element._page,
+        '/p/chromium/issues/list?q=owner%3Ame&sort=-summary');
+  });
+
+  it('updateSortSpec prepends new option to existing sort', async () => {
+    element.columns = ['ID', 'Summary', 'Owner'];
+    element._queryParams = {sort: '-summary+owner'};
+
+    await element.updateComplete;
+
+    element.updateSortSpec('ID');
+
+    sinon.assert.calledWith(element._page,
+        '/p/chromium/issues/list?sort=id%20-summary%20owner');
+  });
+
+  it('updateSortSpec removes existing instances of sorted column', async () => {
+    element.columns = ['ID', 'Summary', 'Owner'];
+    element._queryParams = {sort: '-summary+owner+owner'};
+
+    await element.updateComplete;
+
+    element.updateSortSpec('Owner', true);
+
+    sinon.assert.calledWith(element._page,
+        '/p/chromium/issues/list?sort=-owner%20-summary');
+  });
+
+  it('_uniqueValuesByColumn re-computed when columns update', async () => {
+    element.issues = [
+      {id: 1, projectName: 'chromium'},
+      {id: 2, projectName: 'chromium'},
+      {id: 3, projectName: 'chrOmiUm'},
+      {id: 1, projectName: 'other'},
+    ];
+    element.columns = [];
+    await element.updateComplete;
+
+    assert.deepEqual(element._uniqueValuesByColumn, new Map());
+
+    element.columns = ['project'];
+    await element.updateComplete;
+
+    assert.deepEqual(element._uniqueValuesByColumn,
+        new Map([['project', new Set(['chromium', 'chrOmiUm', 'other'])]]));
+  });
+
+  it('showOnly adds new search term to query', async () => {
+    element.currentQuery = 'owner:me';
+    element._queryParams = {};
+
+    await element.updateComplete;
+
+    element.showOnly('Priority', 'High');
+
+    sinon.assert.calledWith(element._page,
+        '/p/chromium/issues/list?q=owner%3Ame%20priority%3DHigh');
+  });
+
+  it('addColumn adds a column', () => {
+    element.columns = ['ID', 'Summary'];
+
+    sinon.stub(element, 'reloadColspec');
+
+    element.addColumn('AllLabels');
+
+    sinon.assert.calledWith(element.reloadColspec,
+        ['ID', 'Summary', 'AllLabels']);
+  });
+
+  it('removeColumn removes a column', () => {
+    element.columns = ['ID', 'Summary'];
+
+    sinon.stub(element, 'reloadColspec');
+
+    element.removeColumn(0);
+
+    sinon.assert.calledWith(element.reloadColspec, ['Summary']);
+  });
+
+  it('clicking hide column in column header removes column', async () => {
+    element.columns = ['ID', 'Summary'];
+
+    sinon.stub(element, 'removeColumn');
+
+    await element.updateComplete;
+
+    const dropdown = element.shadowRoot.querySelector('.dropdown-summary');
+
+    dropdown.clickItem(0); // Hide column.
+
+    sinon.assert.calledWith(element.removeColumn, 1);
+  });
+
+  it('starring disabled when starringEnabled is false', async () => {
+    element.starringEnabled = false;
+    element.issues = [
+      {projectName: 'test', localId: 1, summary: 'test issue'},
+      {projectName: 'test', localId: 2, summary: 'I have a summary'},
+    ];
+
+    await element.updateComplete;
+
+    let stars = element.shadowRoot.querySelectorAll('mr-issue-star');
+    assert.equal(stars.length, 0);
+
+    element.starringEnabled = true;
+    await element.updateComplete;
+
+    stars = element.shadowRoot.querySelectorAll('mr-issue-star');
+    assert.equal(stars.length, 2);
+  });
+
+  describe('issue sorting and grouping enabled', () => {
+    beforeEach(() => {
+      element.sortingAndGroupingEnabled = true;
+    });
+
+    it('clicking sort up column header sets sort spec', async () => {
+      element.columns = ['ID', 'Summary'];
+
+      sinon.stub(element, 'updateSortSpec');
+
+      await element.updateComplete;
+
+      const dropdown = element.shadowRoot.querySelector('.dropdown-summary');
+
+      dropdown.clickItem(0); // Sort up.
+
+      sinon.assert.calledWith(element.updateSortSpec, 'Summary');
+    });
+
+    it('clicking sort down column header sets sort spec', async () => {
+      element.columns = ['ID', 'Summary'];
+
+      sinon.stub(element, 'updateSortSpec');
+
+      await element.updateComplete;
+
+      const dropdown = element.shadowRoot.querySelector('.dropdown-summary');
+
+      dropdown.clickItem(1); // Sort down.
+
+      sinon.assert.calledWith(element.updateSortSpec, 'Summary', true);
+    });
+
+    it('clicking group rows column header groups rows', async () => {
+      element.columns = ['Owner', 'Priority'];
+      element.groups = ['Status'];
+
+      sinon.spy(element, 'addGroupBy');
+
+      await element.updateComplete;
+
+      const dropdown = element.shadowRoot.querySelector('.dropdown-owner');
+      dropdown.clickItem(3); // Group rows.
+
+      sinon.assert.calledWith(element.addGroupBy, 0);
+
+      sinon.assert.calledWith(element._page,
+          '/p/chromium/issues/list?groupby=Owner%20Status&colspec=Priority');
+    });
+  });
+
+  describe('issue selection', () => {
+    beforeEach(() => {
+      element.selectionEnabled = true;
+    });
+
+    it('selections disabled when selectionEnabled is false', async () => {
+      element.selectionEnabled = false;
+      element.issues = [
+        {projectName: 'test', localId: 1, summary: 'test issue'},
+        {projectName: 'test', localId: 2, summary: 'I have a summary'},
+      ];
+
+      await element.updateComplete;
+
+      let checkboxes = element.shadowRoot.querySelectorAll('.issue-checkbox');
+      assert.equal(checkboxes.length, 0);
+
+      element.selectionEnabled = true;
+      await element.updateComplete;
+
+      checkboxes = element.shadowRoot.querySelectorAll('.issue-checkbox');
+      assert.equal(checkboxes.length, 2);
+    });
+
+    it('selected issues render selected attribute', async () => {
+      element.issues = [
+        {summary: 'issue 1', localId: 1, projectName: 'proj'},
+        {summary: 'another issue', localId: 2, projectName: 'proj'},
+        {summary: 'issue 2', localId: 3, projectName: 'proj'},
+      ];
+      element.columns = ['Summary'];
+
+      await element.updateComplete;
+
+      element._selectedIssues = new Set(['proj:1']);
+
+      await element.updateComplete;
+
+      const issues = element.shadowRoot.querySelectorAll('tr[selected]');
+
+      assert.equal(issues.length, 1);
+      assert.equal(issues[0].dataset.index, '0');
+      assert.include(issues[0].textContent, 'issue 1');
+    });
+
+    it('select all / none conditionally shows tooltip', async () => {
+      element.issues = [
+        {summary: 'issue 1', localId: 1, projectName: 'proj'},
+        {summary: 'issue 2', localId: 2, projectName: 'proj'},
+      ];
+
+      await element.updateComplete;
+      assert.deepEqual(element.selectedIssues, []);
+
+      const selectAll = element.shadowRoot.querySelector('.select-all');
+
+      // No issues selected, offer "Select All".
+      assert.equal(selectAll.title, 'Select All');
+      assert.equal(selectAll.getAttribute('aria-label'), 'Select All');
+
+      selectAll.click();
+
+      await element.updateComplete;
+
+      // Some issues selected, offer "Select None".
+      assert.equal(selectAll.title, 'Select None');
+      assert.equal(selectAll.getAttribute('aria-label'), 'Select None');
+    });
+
+    it('clicking select all selects all issues', async () => {
+      element.issues = [
+        {summary: 'issue 1', localId: 1, projectName: 'proj'},
+        {summary: 'issue 2', localId: 2, projectName: 'proj'},
+      ];
+
+      await element.updateComplete;
+
+      assert.deepEqual(element.selectedIssues, []);
+
+      const selectAll = element.shadowRoot.querySelector('.select-all');
+      selectAll.click();
+
+      assert.deepEqual(element.selectedIssues, [
+        {summary: 'issue 1', localId: 1, projectName: 'proj'},
+        {summary: 'issue 2', localId: 2, projectName: 'proj'},
+      ]);
+    });
+
+    it('when checked select all deselects all issues', async () => {
+      element.issues = [
+        {summary: 'issue 1', localId: 1, projectName: 'proj'},
+        {summary: 'issue 2', localId: 2, projectName: 'proj'},
+      ];
+
+      await element.updateComplete;
+
+      element._selectedIssues = new Set(['proj:1', 'proj:2']);
+
+      await element.updateComplete;
+
+      assert.deepEqual(element.selectedIssues, [
+        {summary: 'issue 1', localId: 1, projectName: 'proj'},
+        {summary: 'issue 2', localId: 2, projectName: 'proj'},
+      ]);
+
+      const selectAll = element.shadowRoot.querySelector('.select-all');
+      selectAll.click();
+
+      assert.deepEqual(element.selectedIssues, []);
+    });
+
+    it('selected issues added when issues checked', async () => {
+      element.issues = [
+        {summary: 'issue 1', localId: 1, projectName: 'proj'},
+        {summary: 'another issue', localId: 2, projectName: 'proj'},
+        {summary: 'issue 2', localId: 3, projectName: 'proj'},
+      ];
+
+      await element.updateComplete;
+
+      assert.deepEqual(element.selectedIssues, []);
+
+      const checkboxes = element.shadowRoot.querySelectorAll('.issue-checkbox');
+
+      assert.equal(checkboxes.length, 3);
+
+      checkboxes[2].dispatchEvent(new MouseEvent('click'));
+
+      await element.updateComplete;
+
+      assert.deepEqual(element.selectedIssues, [
+        {summary: 'issue 2', localId: 3, projectName: 'proj'},
+      ]);
+
+      checkboxes[0].dispatchEvent(new MouseEvent('click'));
+
+      await element.updateComplete;
+
+      assert.deepEqual(element.selectedIssues, [
+        {summary: 'issue 1', localId: 1, projectName: 'proj'},
+        {summary: 'issue 2', localId: 3, projectName: 'proj'},
+      ]);
+    });
+
+    it('shift+click selects issues in a range', async () => {
+      element.issues = [
+        {localId: 1, projectName: 'proj'},
+        {localId: 2, projectName: 'proj'},
+        {localId: 3, projectName: 'proj'},
+        {localId: 4, projectName: 'proj'},
+        {localId: 5, projectName: 'proj'},
+      ];
+
+      await element.updateComplete;
+
+      assert.deepEqual(element.selectedIssues, []);
+
+      const checkboxes = element.shadowRoot.querySelectorAll('.issue-checkbox');
+
+      // First click.
+      checkboxes[0].dispatchEvent(new MouseEvent('click'));
+
+      await element.updateComplete;
+
+      assert.deepEqual(element.selectedIssues, [
+        {localId: 1, projectName: 'proj'},
+      ]);
+
+      // Second click.
+      checkboxes[3].dispatchEvent(new MouseEvent('click', {shiftKey: true}));
+
+      await element.updateComplete;
+
+      assert.deepEqual(element.selectedIssues, [
+        {localId: 1, projectName: 'proj'},
+        {localId: 2, projectName: 'proj'},
+        {localId: 3, projectName: 'proj'},
+        {localId: 4, projectName: 'proj'},
+      ]);
+
+      // It's possible to chain Shift+Click operations.
+      checkboxes[2].dispatchEvent(new MouseEvent('click', {shiftKey: true}));
+
+      await element.updateComplete;
+
+      assert.deepEqual(element.selectedIssues, [
+        {localId: 1, projectName: 'proj'},
+        {localId: 2, projectName: 'proj'},
+      ]);
+    });
+
+    it('fires selectionChange events', async () => {
+      const listener = sinon.stub();
+      element.addEventListener('selectionChange', listener);
+
+      // Changing the issue list clears the selection and fires an event.
+      element.issues = [{localId: 1, projectName: 'proj'}];
+      await element.updateComplete;
+      // Selecting all/deselecting all fires an event.
+      element.shadowRoot.querySelector('.select-all').click();
+      await element.updateComplete;
+      // Selecting an individual issue fires an event.
+      element.shadowRoot.querySelectorAll('.issue-checkbox')[0].click();
+
+      sinon.assert.calledThrice(listener);
+    });
+  });
+
+  describe('cursor', () => {
+    beforeEach(() => {
+      element.issues = [
+        {localId: 1, projectName: 'chromium'},
+        {localId: 2, projectName: 'chromium'},
+      ];
+    });
+
+    it('empty when no initialCursor', () => {
+      assert.deepEqual(element.cursor, {});
+
+      element.initialCursor = '';
+      assert.deepEqual(element.cursor, {});
+    });
+
+    it('parses initialCursor value', () => {
+      element.initialCursor = '1';
+      element.projectName = 'chromium';
+
+      assert.deepEqual(element.cursor, {projectName: 'chromium', localId: 1});
+
+      element.initialCursor = 'chromium:1';
+      assert.deepEqual(element.cursor, {projectName: 'chromium', localId: 1});
+    });
+
+    it('overrides initialCursor with _localCursor', () => {
+      element.initialCursor = 'chromium:1';
+      element._localCursor = {projectName: 'gerrit', localId: 2};
+
+      assert.deepEqual(element.cursor, {projectName: 'gerrit', localId: 2});
+    });
+
+    it('initialCursor renders cursor and focuses element', async () => {
+      element.initialCursor = 'chromium:1';
+
+      await element.updateComplete;
+
+      const row = element.shadowRoot.querySelector('.row-0');
+      assert.isTrue(row.hasAttribute('cursored'));
+      listRowIsFocused(element, 0);
+    });
+
+    it('cursor value updated when row is focused', async () => {
+      element.initialCursor = 'chromium:1';
+
+      await element.updateComplete;
+
+      // HTMLElement.focus() seems to cause a timing related flake here.
+      element.shadowRoot.querySelector('.row-1').dispatchEvent(
+          new Event('focus'));
+
+      assert.deepEqual(element.cursor, {projectName: 'chromium', localId: 2});
+    });
+  });
+
+  describe('hot keys', () => {
+    beforeEach(() => {
+      element.issues = [
+        {localId: 1, projectName: 'chromium'},
+        {localId: 2, projectName: 'chromium'},
+        {localId: 3, projectName: 'chromium'},
+      ];
+
+      element.selectionEnabled = true;
+
+      sinon.stub(element, '_navigateToIssue');
+    });
+
+    afterEach(() => {
+      element._navigateToIssue.restore();
+    });
+
+    it('global keydown listener removed on disconnect', async () => {
+      sinon.stub(element, '_boundRunListHotKeys');
+
+      await element.updateComplete;
+
+      window.dispatchEvent(new Event('keydown'));
+      sinon.assert.calledOnce(element._boundRunListHotKeys);
+
+      document.body.removeChild(element);
+
+      window.dispatchEvent(new Event('keydown'));
+      sinon.assert.calledOnce(element._boundRunListHotKeys);
+
+      document.body.appendChild(element);
+    });
+
+    it('pressing j defaults to first issue', async () => {
+      await element.updateComplete;
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'j'}));
+
+      listRowIsFocused(element, 0);
+    });
+
+    it('pressing j focuses next issue', async () => {
+      element.initialCursor = 'chromium:1';
+
+      await element.updateComplete;
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'j'}));
+
+      listRowIsFocused(element, 1);
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'j'}));
+
+      listRowIsFocused(element, 2);
+    });
+
+    it('pressing j at the end of the list loops around', async () => {
+      await element.updateComplete;
+
+      element.shadowRoot.querySelector('.row-2').focus();
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'j'}));
+
+      listRowIsFocused(element, 0);
+    });
+
+
+    it('pressing k defaults to last issue', async () => {
+      await element.updateComplete;
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'k'}));
+
+      listRowIsFocused(element, 2);
+    });
+
+    it('pressing k focuses previous issue', async () => {
+      element.initialCursor = 'chromium:3';
+
+      await element.updateComplete;
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'k'}));
+
+      listRowIsFocused(element, 1);
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'k'}));
+
+      listRowIsFocused(element, 0);
+    });
+
+    it('pressing k at the start of the list loops around', async () => {
+      await element.updateComplete;
+
+      element.shadowRoot.querySelector('.row-0').focus();
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'k'}));
+
+      listRowIsFocused(element, 2);
+    });
+
+    it('j and k keys treat row as focused if child is focused', async () => {
+      await element.updateComplete;
+
+      element.shadowRoot.querySelector('.row-1').querySelector(
+          'mr-issue-link').focus();
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'k'}));
+      listRowIsFocused(element, 2);
+
+      element.shadowRoot.querySelector('.row-1').querySelector(
+          'mr-issue-link').focus();
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'j'}));
+      listRowIsFocused(element, 0);
+    });
+
+    it('j and k keys stay on one element when one issue', async () => {
+      element.issues = [{localId: 2, projectName: 'chromium'}];
+      await element.updateComplete;
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'k'}));
+      listRowIsFocused(element, 0);
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'k'}));
+      listRowIsFocused(element, 0);
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'j'}));
+      listRowIsFocused(element, 0);
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'j'}));
+      listRowIsFocused(element, 0);
+    });
+
+    it('j and k no-op when event is from input', async () => {
+      const input = document.createElement('input');
+      document.body.appendChild(input);
+
+      await element.updateComplete;
+
+      input.dispatchEvent(new KeyboardEvent('keydown', {key: 'j'}));
+      assert.isNull(element.shadowRoot.activeElement);
+
+      input.dispatchEvent(new KeyboardEvent('keydown', {key: 'k'}));
+      assert.isNull(element.shadowRoot.activeElement);
+
+      document.body.removeChild(input);
+    });
+
+    it('j and k no-op when event is from shadowDOM input', async () => {
+      const input = document.createElement('input');
+      const root = document.createElement('div');
+
+      root.attachShadow({mode: 'open'});
+      root.shadowRoot.appendChild(input);
+
+      document.body.appendChild(root);
+
+      await element.updateComplete;
+
+      input.dispatchEvent(new KeyboardEvent('keydown', {key: 'j'}));
+      assert.isNull(element.shadowRoot.activeElement);
+
+      input.dispatchEvent(new KeyboardEvent('keydown', {key: 'k'}));
+      assert.isNull(element.shadowRoot.activeElement);
+
+      document.body.removeChild(root);
+    });
+
+    describe('starring issue', () => {
+      beforeEach(() => {
+        element.starringEnabled = true;
+        element.initialCursor = 'chromium:2';
+      });
+
+      it('pressing s stars focused issue', async () => {
+        sinon.stub(element, '_starIssue');
+        await element.updateComplete;
+
+        window.dispatchEvent(new KeyboardEvent('keydown', {key: 's'}));
+
+        sinon.assert.calledWith(element._starIssue,
+            {localId: 2, projectName: 'chromium'});
+      });
+
+      it('starIssue does not star issue while stars are fetched', () => {
+        sinon.stub(element, '_starIssueInternal');
+        element._fetchingStarredIssues = true;
+
+        element._starIssue({localId: 2, projectName: 'chromium'});
+
+        sinon.assert.notCalled(element._starIssueInternal);
+      });
+
+      it('starIssue does not star when issue is being starred', () => {
+        sinon.stub(element, '_starIssueInternal');
+        element._starringIssues = new Map([['chromium:2', {requesting: true}]]);
+
+        element._starIssue({localId: 2, projectName: 'chromium'});
+
+        sinon.assert.notCalled(element._starIssueInternal);
+      });
+
+      it('starIssue stars issue when issue is not being starred', () => {
+        sinon.stub(element, '_starIssueInternal');
+        element._starringIssues = new Map([
+          ['chromium:2', {requesting: false}],
+        ]);
+
+        element._starIssue({localId: 2, projectName: 'chromium'});
+
+        sinon.assert.calledWith(element._starIssueInternal,
+            {localId: 2, projectName: 'chromium'}, true);
+      });
+
+      it('starIssue unstars issue when issue is already starred', () => {
+        sinon.stub(element, '_starIssueInternal');
+        element._starredIssues = new Set(['chromium:2']);
+
+        element._starIssue({localId: 2, projectName: 'chromium'});
+
+        sinon.assert.calledWith(element._starIssueInternal,
+            {localId: 2, projectName: 'chromium'}, false);
+      });
+    });
+
+    it('pressing x selects focused issue', async () => {
+      element.initialCursor = 'chromium:2';
+
+      await element.updateComplete;
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'x'}));
+
+      await element.updateComplete;
+
+      assert.deepEqual(element.selectedIssues, [
+        {localId: 2, projectName: 'chromium'},
+      ]);
+    });
+
+    it('pressing o navigates to focused issue', async () => {
+      element.initialCursor = 'chromium:2';
+
+      await element.updateComplete;
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'o'}));
+
+      await element.updateComplete;
+
+      sinon.assert.calledOnce(element._navigateToIssue);
+      sinon.assert.calledWith(element._navigateToIssue,
+          {localId: 2, projectName: 'chromium'}, false);
+    });
+
+    it('pressing shift+o opens focused issue in new tab', async () => {
+      element.initialCursor = 'chromium:2';
+
+      await element.updateComplete;
+
+      window.dispatchEvent(new KeyboardEvent('keydown',
+          {key: 'O', shiftKey: true}));
+
+      await element.updateComplete;
+
+      sinon.assert.calledOnce(element._navigateToIssue);
+      sinon.assert.calledWith(element._navigateToIssue,
+          {localId: 2, projectName: 'chromium'}, true);
+    });
+
+    it('enter keydown on row navigates to issue', async () => {
+      await element.updateComplete;
+
+      const row = element.shadowRoot.querySelector('.row-1');
+
+      row.dispatchEvent(
+          new KeyboardEvent('keydown', {key: 'Enter', bubbles: true}));
+
+      await element.updateComplete;
+
+      sinon.assert.calledOnce(element._navigateToIssue);
+      sinon.assert.calledWith(
+          element._navigateToIssue, {localId: 2, projectName: 'chromium'},
+          false);
+    });
+
+    it('ctrl+enter keydown on row navigates to issue in new tab', async () => {
+      await element.updateComplete;
+
+      const row = element.shadowRoot.querySelector('.row-1');
+
+      // Note: metaKey would also work, but this is covered by click tests.
+      row.dispatchEvent(new KeyboardEvent(
+          'keydown', {key: 'Enter', ctrlKey: true, bubbles: true}));
+
+      await element.updateComplete;
+
+      sinon.assert.calledOnce(element._navigateToIssue);
+      sinon.assert.calledWith(element._navigateToIssue,
+          {localId: 2, projectName: 'chromium'}, true);
+    });
+
+    it('enter keypress outside row is ignored', async () => {
+      await element.updateComplete;
+
+      window.dispatchEvent(new KeyboardEvent('keydown', {key: 'Enter'}));
+
+      await element.updateComplete;
+
+      sinon.assert.notCalled(element._navigateToIssue);
+    });
+  });
+
+  describe('_convertIssueToPlaintextArray', () => {
+    it('returns an array with as many entries as this.columns.length', () => {
+      element.columns = ['summary'];
+      const result = element._convertIssueToPlaintextArray({
+        summary: 'test issue',
+      });
+      assert.equal(element.columns.length, result.length);
+    });
+
+    it('for column id uses issueRefToString', async () => {
+      const projectName = 'some_project_name';
+      const otherProjectName = 'some_other_project';
+      const localId = '123';
+      element.columns = ['ID'];
+      element.projectName = projectName;
+
+      element.extractFieldValues = (issue, fieldName) =>
+        stringValuesForIssueField(issue, fieldName, projectName);
+
+      let result;
+      result = element._convertIssueToPlaintextArray({
+        localId,
+        projectName,
+      });
+      assert.equal(localId, result[0]);
+
+      result = element._convertIssueToPlaintextArray({
+        localId,
+        projectName: otherProjectName,
+      });
+      assert.equal(`${otherProjectName}:${localId}`, result[0]);
+    });
+
+    it('uses extractFieldValues', () => {
+      element.columns = ['summary', 'notsummary', 'anotherColumn'];
+      element.extractFieldValues = sinon.fake.returns(['a', 'b']);
+
+      element._convertIssueToPlaintextArray({summary: 'test issue'});
+      sinon.assert.callCount(element.extractFieldValues,
+          element.columns.length);
+    });
+
+    it('joins the result of extractFieldValues with ", "', () => {
+      element.columns = ['notSummary'];
+      element.extractFieldValues = sinon.fake.returns(['a', 'b']);
+
+      const result = element._convertIssueToPlaintextArray({
+        summary: 'test issue',
+      });
+      assert.deepEqual(result, ['a, b']);
+    });
+  });
+
+  describe('_convertIssuesToPlaintextArrays', () => {
+    it('maps this.issues with this._convertIssueToPlaintextArray', () => {
+      element._convertIssueToPlaintextArray = sinon.fake.returns(['foobar']);
+
+      element.columns = ['summary'];
+      element.issues = [
+        {summary: 'test issue'},
+        {summary: 'I have a summary'},
+      ];
+      const result = element._convertIssuesToPlaintextArrays();
+
+      assert.deepEqual([['foobar'], ['foobar']], result);
+      sinon.assert.callCount(element._convertIssueToPlaintextArray,
+          element.issues.length);
+    });
+  });
+
+  it('drag-and-drop', async () => {
+    element.rerank = () => {};
+    element.issues = [
+      {projectName: 'project', localId: 123, summary: 'test issue'},
+      {projectName: 'project', localId: 456, summary: 'I have a summary'},
+      {projectName: 'project', localId: 789, summary: 'third issue'},
+    ];
+    await element.updateComplete;
+
+    const rows = element._getRows();
+
+    // Mouse down on the middle element!
+    const secondRow = rows[1];
+    const dragHandle = secondRow.firstElementChild;
+    const mouseDown = new MouseEvent('mousedown', {clientX: 0, clientY: 0});
+    dragHandle.dispatchEvent(mouseDown);
+
+    assert.deepEqual(element._dragging, true);
+    assert.deepEqual(element.cursor, {projectName: 'project', localId: 456});
+    assert.deepEqual(element.selectedIssues, [element.issues[1]]);
+
+    // Drag the middle element to the end!
+    const mouseMove = new MouseEvent('mousemove', {clientX: 0, clientY: 100});
+    window.dispatchEvent(mouseMove);
+
+    assert.deepEqual(rows[0].style['transform'], '');
+    assert.deepEqual(rows[1].style['transform'], 'translate(0px, 100px)');
+    assert.match(rows[2].style['transform'], /^translate\(0px, -\d+px\)$/);
+
+    // Mouse up!
+    const mouseUp = new MouseEvent('mouseup', {clientX: 0, clientY: 100});
+    window.dispatchEvent(mouseUp);
+
+    assert.deepEqual(element._dragging, false);
+    assert.match(rows[1].style['transform'], /^translate\(0px, \d+px\)$/);
+  });
+
+  describe('CSV download', () => {
+    let _downloadCsvSpy;
+    let convertStub;
+
+    beforeEach(() => {
+      element.userDisplayName = 'notempty';
+      _downloadCsvSpy = sinon.spy(element, '_downloadCsv');
+      convertStub = sinon
+          .stub(element, '_convertIssuesToPlaintextArrays')
+          .returns([['']]);
+    });
+
+    afterEach(() => {
+      _downloadCsvSpy.restore();
+      convertStub.restore();
+    });
+
+    it('hides download link for anonymous users', async () => {
+      element.userDisplayName = '';
+      await element.updateComplete;
+      const downloadLink = element.shadowRoot.querySelector('#download-link');
+      assert.isNull(downloadLink);
+    });
+
+    it('renders a #download-link', async () => {
+      await element.updateComplete;
+      const downloadLink = element.shadowRoot.querySelector('#download-link');
+      assert.isNotNull(downloadLink);
+      assert.equal('inline', window.getComputedStyle(downloadLink).display);
+    });
+
+    it('renders a #hidden-data-link', async () => {
+      await element.updateComplete;
+      assert.isNotNull(element._dataLink);
+      const expected = element.shadowRoot.querySelector('#hidden-data-link');
+      assert.equal(expected, element._dataLink);
+    });
+
+    it('hides #hidden-data-link', async () => {
+      await element.updateComplete;
+      const _dataLink = element.shadowRoot.querySelector('#hidden-data-link');
+      assert.equal('none', window.getComputedStyle(_dataLink).display);
+    });
+
+    it('calls _downloadCsv on click', async () => {
+      await element.updateComplete;
+      sinon.stub(element._dataLink, 'click');
+
+      const downloadLink = element.shadowRoot.querySelector('#download-link');
+      downloadLink.click();
+      await element.requestUpdate('_csvDataHref');
+
+      sinon.assert.calledOnce(_downloadCsvSpy);
+      element._dataLink.click.restore();
+    });
+
+    it('converts issues into arrays of plaintext data', async () => {
+      await element.updateComplete;
+      sinon.stub(element._dataLink, 'click');
+
+      const downloadLink = element.shadowRoot.querySelector('#download-link');
+      downloadLink.click();
+      await element.requestUpdate('_csvDataHref');
+
+      sinon.assert.calledOnce(convertStub);
+      element._dataLink.click.restore();
+    });
+
+    it('triggers _dataLink click after #downloadLink click', async () => {
+      await element.updateComplete;
+      const dataLinkStub = sinon.stub(element._dataLink, 'click');
+
+      const downloadLink = element.shadowRoot.querySelector('#download-link');
+
+      downloadLink.click();
+
+      await element.requestUpdate('_csvDataHref');
+      sinon.assert.calledOnce(dataLinkStub);
+
+      element._dataLink.click.restore();
+    });
+
+    it('triggers _csvDataHref update and _dataLink click', async () => {
+      await element.updateComplete;
+      assert.equal('', element._csvDataHref);
+      const downloadStub = sinon.stub(element._dataLink, 'click');
+
+      const downloadLink = element.shadowRoot.querySelector('#download-link');
+
+      downloadLink.click();
+      assert.notEqual('', element._csvDataHref);
+      await element.requestUpdate('_csvDataHref');
+      sinon.assert.calledOnce(downloadStub);
+
+      element._dataLink.click.restore();
+    });
+
+    it('resets _csvDataHref', async () => {
+      await element.updateComplete;
+      assert.equal('', element._csvDataHref);
+
+      sinon.stub(element._dataLink, 'click');
+      const downloadLink = element.shadowRoot.querySelector('#download-link');
+      downloadLink.click();
+      assert.notEqual('', element._csvDataHref);
+
+      await element.requestUpdate('_csvDataHref');
+      assert.equal('', element._csvDataHref);
+      element._dataLink.click.restore();
+    });
+
+    it('does nothing for anonymous users', async () => {
+      await element.updateComplete;
+
+      element.userDisplayName = '';
+
+      const downloadStub = sinon.stub(element._dataLink, 'click');
+
+      const downloadLink = element.shadowRoot.querySelector('#download-link');
+
+      downloadLink.click();
+      await element.requestUpdate('_csvDataHref');
+      sinon.assert.notCalled(downloadStub);
+
+      element._dataLink.click.restore();
+    });
+  });
+});
diff --git a/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.js b/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.js
new file mode 100644
index 0000000..5d6a97b
--- /dev/null
+++ b/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.js
@@ -0,0 +1,310 @@
+// Copyright 2019 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.
+import {css} from 'lit-element';
+import {MrDropdown} from 'elements/framework/mr-dropdown/mr-dropdown.js';
+import page from 'page';
+import qs from 'qs';
+import {connectStore} from 'reducers/base.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as sitewide from 'reducers/sitewide.js';
+import {fieldTypes, fieldsForIssue} from 'shared/issue-fields.js';
+
+
+/**
+ * `<mr-show-columns-dropdown>`
+ *
+ * Issue list column options dropdown.
+ *
+ */
+export class MrShowColumnsDropdown extends connectStore(MrDropdown) {
+  /** @override */
+  static get styles() {
+    return [
+      ...MrDropdown.styles,
+      css`
+        :host {
+          font-weight: normal;
+          color: var(--chops-link-color);
+          --mr-dropdown-icon-color: var(--chops-link-color);
+          --mr-dropdown-anchor-padding: 3px 8px;
+          --mr-dropdown-anchor-font-weight: bold;
+          --mr-dropdown-menu-min-width: 150px;
+          --mr-dropdown-menu-font-size: var(--chops-main-font-size);
+          --mr-dropdown-menu-icon-size: var(--chops-main-font-size);
+          /* Because we're using a sticky header, we need to make sure the
+           * dropdown cannot be taller than the screen. */
+          --mr-dropdown-menu-max-height: 80vh;
+          --mr-dropdown-menu-overflow: auto;
+        }
+      `,
+    ];
+  }
+  /** @override */
+  static get properties() {
+    return {
+      ...MrDropdown.properties,
+      /**
+       * Array of displayed columns.
+       */
+      columns: {type: Array},
+      /**
+       * Array of displayed issues.
+       */
+      issues: {type: Array},
+      /**
+       * Array of unique phase names to prepend to phase field columns.
+       */
+      // TODO(dtu): Delete after removing EZT hotlist issue list.
+      phaseNames: {type: Array},
+      /**
+       * Array of built in fields that are available outside of project
+       * configuration.
+       */
+      defaultFields: {type: Array},
+      _fieldDefs: {type: Array},
+      _labelPrefixFields: {type: Array},
+      // TODO(zhangtiff): Delete this legacy integration after removing
+      // the EZT issue list view.
+      onHideColumn: {type: Object},
+      onShowColumn: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    // Inherited from MrDropdown.
+    this.label = 'Show columns';
+    this.icon = 'more_horiz';
+
+    this.columns = [];
+    /** @type {Array<Issue>} */
+    this.issues = [];
+    this.phaseNames = [];
+    this.defaultFields = [];
+
+    // TODO(dtu): Delete after removing EZT hotlist issue list.
+    this._fieldDefs = [];
+    this._labelPrefixFields = [];
+
+    this._queryParams = {};
+    this._page = page;
+
+    // TODO(zhangtiff): Delete this legacy integration after removing
+    // the EZT issue list view.
+    this.onHideColumn = null;
+    this.onShowColumn = null;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this._fieldDefs = projectV0.fieldDefs(state) || [];
+    this._labelPrefixFields = projectV0.labelPrefixFields(state) || [];
+    this._queryParams = sitewide.queryParams(state);
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (this.issues.length) {
+      this.items = this.columnOptions();
+    } else {
+      // TODO(dtu): Delete after removing EZT hotlist issue list.
+      this.items = this.columnOptionsEzt(
+          this.defaultFields, this._fieldDefs, this._labelPrefixFields,
+          this.columns, this.phaseNames);
+    }
+
+    super.update(changedProperties);
+  }
+
+  /**
+   * Computes the column options available in the list view based on Issues.
+   * @return {Array<MenuItem>}
+   */
+  columnOptions() {
+    const availableFields = new Set(this.defaultFields);
+    this.issues.forEach((issue) => {
+      fieldsForIssue(issue).forEach((field) => {
+        availableFields.add(field);
+      });
+    });
+
+    // Remove selected columns from available fields.
+    this.columns.forEach((field) => availableFields.delete(field));
+    const sortedFields = [...availableFields].sort();
+
+    return [
+      // Show selected options first.
+      ...this.columns.map((field, i) => ({
+        icon: 'check',
+        text: field,
+        handler: () => this._removeColumn(i),
+      })),
+      // Unselected options come next.
+      ...sortedFields.map((field) => ({
+        icon: '',
+        text: field,
+        handler: () => this._addColumn(field),
+      })),
+    ];
+  }
+
+  // TODO(dtu): Delete after removing EZT hotlist issue list.
+  /**
+   * Computes the column options available in the list view based on project
+   * config data.
+   * @param {Array<string>} defaultFields List of built in columns.
+   * @param {Array<FieldDef>} fieldDefs List of custom fields configured in the
+   *   viewed project.
+   * @param {Array<string>} labelPrefixes List of available label prefixes for
+   *   the current project config..
+   * @param {Array<string>} selectedColumns List of columns the user is
+   *   currently viewing.
+   * @param {Array<string>} phaseNames All phase namws present in the currently
+   *   viewed issue list.
+   * @return {Array<MenuItem>}
+   */
+  columnOptionsEzt(defaultFields, fieldDefs, labelPrefixes, selectedColumns,
+      phaseNames) {
+    const selectedOptions = new Set(
+        selectedColumns.map((col) => col.toLowerCase()));
+
+    const availableFields = new Set();
+
+    // Built-in, hard-coded fields like Owner, Status, and Labels.
+    defaultFields.forEach((field) => this._addUnselectedField(
+        availableFields, field, selectedOptions));
+
+    // Custom fields.
+    fieldDefs.forEach((fd) => {
+      const {fieldRef, isPhaseField} = fd;
+      const {fieldName, type} = fieldRef;
+      if (isPhaseField) {
+        // If the custom field belongs to phases, prefix the phase name for
+        // each phase.
+        phaseNames.forEach((phaseName) => {
+          this._addUnselectedField(
+              availableFields, `${phaseName}.${fieldName}`, selectedOptions);
+        });
+        return;
+      }
+
+      // TODO(zhangtiff): Prefix custom fields with "approvalName" defined by
+      // the approval name after deprecating the old issue list page.
+
+      // Most custom fields can be directly added to the list with no
+      // modifications.
+      this._addUnselectedField(
+          availableFields, fieldName, selectedOptions);
+
+      // If the custom field is type approval, then it also has a built in
+      // "Approver" field.
+      if (type === fieldTypes.APPROVAL_TYPE) {
+        this._addUnselectedField(
+            availableFields, `${fieldName}-Approver`, selectedOptions);
+      }
+    });
+
+    // Fields inferred from label prefixes.
+    labelPrefixes.forEach((field) => this._addUnselectedField(
+        availableFields, field, selectedOptions));
+
+    const sortedFields = [...availableFields];
+    sortedFields.sort();
+
+    return [
+      ...selectedColumns.map((field, i) => ({
+        icon: 'check',
+        text: field,
+        handler: () => this._removeColumn(i),
+      })),
+      ...sortedFields.map((field) => ({
+        icon: '',
+        text: field,
+        handler: () => this._addColumn(field),
+      })),
+    ];
+  }
+
+  /**
+   * Helper that mutates a Set of column names in place, adding a given
+   * field only if it doesn't already show up in the list of selected
+   * fields.
+   * @param {Set<string>} availableFields Set of column names to mutate.
+   * @param {string} field Name of the field being added to the options.
+   * @param {Set<string>} selectedOptions Set of fieldNames that the user
+   *   is viewing.
+   * @private
+   */
+  _addUnselectedField(availableFields, field, selectedOptions) {
+    if (!selectedOptions.has(field.toLowerCase())) {
+      availableFields.add(field);
+    }
+  }
+
+  /**
+   * Removes the column at a particular index.
+   *
+   * @param {number} i the issue column to be removed.
+   */
+  _removeColumn(i) {
+    if (this.onHideColumn) {
+      if (!this.onHideColumn(this.columns[i])) {
+        return;
+      }
+    }
+    const columns = [...this.columns];
+    columns.splice(i, 1);
+    this._reloadColspec(columns);
+  }
+
+  /**
+   * Adds a new column to a particular index.
+   *
+   * @param {string} name of the new column added.
+   */
+  _addColumn(name) {
+    if (this.onShowColumn) {
+      if (!this.onShowColumn(name)) {
+        return;
+      }
+    }
+    this._reloadColspec([...this.columns, name]);
+  }
+
+  /**
+   * Reflects changes to the columns of an issue list to the URL, through
+   * frontend routing.
+   *
+   * @param {Array} newColumns the new colspec to set in the URL.
+   */
+  _reloadColspec(newColumns) {
+    this._updateQueryParams({colspec: newColumns.join(' ')});
+  }
+
+  /**
+   * Navigates to the same URL as the current page, but with query
+   * params updated.
+   *
+   * @param {Object} newParams keys and values of the queryParams
+   * Object to be updated.
+   */
+  _updateQueryParams(newParams) {
+    const params = {...this._queryParams, ...newParams};
+    this._page(`${this._baseUrl()}?${qs.stringify(params)}`);
+  }
+
+  /**
+   * Get the current URL of the page, without query params. Useful for
+   * test stubbing.
+   *
+   * @return {string} the URL of the list page, without params.
+   */
+  _baseUrl() {
+    return window.location.pathname;
+  }
+}
+
+customElements.define('mr-show-columns-dropdown', MrShowColumnsDropdown);
diff --git a/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.test.js b/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.test.js
new file mode 100644
index 0000000..495ffe2
--- /dev/null
+++ b/static_src/elements/framework/mr-issue-list/mr-show-columns-dropdown.test.js
@@ -0,0 +1,209 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {MrShowColumnsDropdown} from './mr-show-columns-dropdown.js';
+
+/** @type {MrShowColumnsDropdown} */
+let element;
+
+describe('mr-show-columns-dropdown', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-show-columns-dropdown');
+    document.body.appendChild(element);
+
+    sinon.stub(element, '_baseUrl').returns('/p/chromium/issues/list');
+    sinon.stub(element, '_page');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrShowColumnsDropdown);
+  });
+
+  it('displaying columns (spa)', async () => {
+    element.defaultFields = ['ID', 'Summary', 'AllLabels'];
+    element.columns = ['ID'];
+    element.issues = [
+      {approvalValues: [{fieldRef: {fieldName: 'Approval-Name'}}]},
+      {fieldValues: [
+        {phaseRef: {phaseName: 'Phase'}, fieldRef: {fieldName: 'Field-Name'}},
+        {fieldRef: {fieldName: 'Field-Name'}},
+      ]},
+      {labelRefs: [{label: 'Label-Name'}]},
+    ];
+
+    await element.updateComplete;
+
+    const actual =
+        element.items.map((item) => ({icon: item.icon, text: item.text}));
+    const expected = [
+      {icon: 'check', text: 'ID'},
+      {icon: '', text: 'AllLabels'},
+      {icon: '', text: 'Approval-Name'},
+      {icon: '', text: 'Approval-Name-Approver'},
+      {icon: '', text: 'Field-Name'},
+      {icon: '', text: 'Label'},
+      {icon: '', text: 'Phase.Field-Name'},
+      {icon: '', text: 'Summary'},
+    ];
+    assert.deepEqual(actual, expected);
+  });
+
+  describe('displaying columns (ezt)', () => {
+    it('sorts default column options', async () => {
+      element.defaultFields = ['ID', 'Summary', 'AllLabels'];
+      element.columns = [];
+      element._labelPrefixFields = [];
+
+      // Re-compute menu items on update.
+      await element.updateComplete;
+      const options = element.items;
+
+      assert.equal(options.length, 3);
+
+      assert.equal(options[0].text.trim(), 'AllLabels');
+      assert.equal(options[0].icon, '');
+
+      assert.equal(options[1].text.trim(), 'ID');
+      assert.equal(options[1].icon, '');
+
+      assert.equal(options[2].text.trim(), 'Summary');
+      assert.equal(options[2].icon, '');
+    });
+
+    it('sorts selected columns above unselected columns', async () => {
+      element.defaultFields = ['ID', 'Summary', 'AllLabels'];
+      element.columns = ['ID'];
+      element._labelPrefixFields = [];
+
+      // Re-compute menu items on update.
+      await element.updateComplete;
+      const options = element.items;
+
+      assert.equal(options.length, 3);
+
+      assert.equal(options[0].text.trim(), 'ID');
+      assert.equal(options[0].icon, 'check');
+
+      assert.equal(options[1].text.trim(), 'AllLabels');
+      assert.equal(options[1].icon, '');
+
+      assert.equal(options[2].text.trim(), 'Summary');
+      assert.equal(options[2].icon, '');
+    });
+
+    it('sorts field defs and label prefix column options', async () => {
+      element.defaultFields = ['ID', 'Summary'];
+      element.columns = [];
+      element._fieldDefs = [
+        {fieldRef: {fieldName: 'HelloWorld'}},
+        {fieldRef: {fieldName: 'TestField'}},
+      ];
+
+      element._labelPrefixFields = ['Milestone', 'Priority'];
+
+      // Re-compute menu items on update.
+      await element.updateComplete;
+      const options = element.items;
+
+      assert.equal(options.length, 6);
+      assert.equal(options[0].text.trim(), 'HelloWorld');
+      assert.equal(options[0].icon, '');
+
+      assert.equal(options[1].text.trim(), 'ID');
+      assert.equal(options[1].icon, '');
+
+      assert.equal(options[2].text.trim(), 'Milestone');
+      assert.equal(options[2].icon, '');
+
+      assert.equal(options[3].text.trim(), 'Priority');
+      assert.equal(options[3].icon, '');
+
+      assert.equal(options[4].text.trim(), 'Summary');
+      assert.equal(options[4].icon, '');
+
+      assert.equal(options[5].text.trim(), 'TestField');
+      assert.equal(options[5].icon, '');
+    });
+
+    it('add approver fields for approval type fields', async () => {
+      element.defaultFields = [];
+      element.columns = [];
+      element._fieldDefs = [
+        {fieldRef: {fieldName: 'HelloWorld', type: 'APPROVAL_TYPE'}},
+      ];
+      element._labelPrefixFields = [];
+
+      // Re-compute menu items on update.
+      await element.updateComplete;
+      const options = element.items;
+
+      assert.equal(options.length, 2);
+      assert.equal(options[0].text.trim(), 'HelloWorld');
+      assert.equal(options[0].icon, '');
+
+      assert.equal(options[1].text.trim(), 'HelloWorld-Approver');
+      assert.equal(options[1].icon, '');
+    });
+
+    it('phase field columns are correctly named', async () => {
+      element.defaultFields = [];
+      element.columns = [];
+      element._fieldDefs = [
+        {fieldRef: {fieldName: 'Number', type: 'INT_TYPE'}, isPhaseField: true},
+        {fieldRef: {fieldName: 'Speak', type: 'STR_TYPE'}, isPhaseField: true},
+      ];
+      element._labelPrefixFields = [];
+      element.phaseNames = ['cow', 'chicken'];
+
+      // Re-compute menu items on update.
+      await element.updateComplete;
+      const options = element.items;
+
+      assert.equal(options.length, 4);
+      assert.equal(options[0].text.trim(), 'chicken.Number');
+      assert.equal(options[0].icon, '');
+
+      assert.equal(options[1].text.trim(), 'chicken.Speak');
+      assert.equal(options[1].icon, '');
+
+      assert.equal(options[2].text.trim(), 'cow.Number');
+      assert.equal(options[2].icon, '');
+
+      assert.equal(options[3].text.trim(), 'cow.Speak');
+      assert.equal(options[3].icon, '');
+    });
+  });
+
+  describe('modifying columns', () => {
+    it('clicking unset column adds a column', async () => {
+      element.columns = ['ID', 'Summary'];
+      element.defaultFields = ['ID', 'Summary', 'AllLabels'];
+      element.queryParams = {};
+
+      await element.updateComplete;
+      element.clickItem(2);
+
+      sinon.assert.calledWith(element._page,
+          '/p/chromium/issues/list?colspec=ID%20Summary%20AllLabels');
+    });
+
+    it('clicking set column removes a column', async () => {
+      element.columns = ['ID', 'Summary'];
+      element.defaultFields = ['ID', 'Summary', 'AllLabels'];
+      element.queryParams = {};
+
+      await element.updateComplete;
+      element.clickItem(0);
+
+      sinon.assert.calledWith(element._page,
+          '/p/chromium/issues/list?colspec=Summary');
+    });
+  });
+});
diff --git a/static_src/elements/framework/mr-issue-slo/mr-issue-slo.js b/static_src/elements/framework/mr-issue-slo/mr-issue-slo.js
new file mode 100644
index 0000000..5a3e42c
--- /dev/null
+++ b/static_src/elements/framework/mr-issue-slo/mr-issue-slo.js
@@ -0,0 +1,59 @@
+// Copyright 2020 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import 'elements/chops/chops-timestamp/chops-timestamp.js';
+import {determineSloStatus} from './slo-rules.js';
+
+/** @typedef {import('./slo-rules.js').SloStatus} SloStatus */
+
+/**
+ * `<mr-issue-slo>`
+ *
+ * A widget for showing the given issue's SLO status.
+ */
+export class MrIssueSlo extends LitElement {
+  /** @override */
+  static get styles() {
+    return css``;
+  }
+
+  /** @override */
+  render() {
+    const sloStatus = this._determineSloStatus();
+    if (!sloStatus) {
+      return html`N/A`;
+    }
+    if (!sloStatus.target) {
+      return html`Done`;
+    }
+    return html`
+      <chops-timestamp .timestamp=${sloStatus.target} short></chops-timestamp>`;
+  }
+
+  /**
+   * Wrapper around slo-rules.js determineSloStatus to allow tests to override
+   * the return value.
+   * @private
+   * @return {SloStatus}
+   */
+  _determineSloStatus() {
+    return this.issue ? determineSloStatus(this.issue) : null;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      issue: {type: Object},
+    };
+  }
+  /** @override */
+  constructor() {
+    super();
+    /** @type {Issue} */
+    this.issue;
+  }
+}
+customElements.define('mr-issue-slo', MrIssueSlo);
diff --git a/static_src/elements/framework/mr-issue-slo/mr-issue-slo.test.js b/static_src/elements/framework/mr-issue-slo/mr-issue-slo.test.js
new file mode 100644
index 0000000..28d23eb
--- /dev/null
+++ b/static_src/elements/framework/mr-issue-slo/mr-issue-slo.test.js
@@ -0,0 +1,54 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrIssueSlo} from './mr-issue-slo.js';
+
+
+let element;
+
+describe('mr-issue-slo', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-issue-slo');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrIssueSlo);
+  });
+
+  it('handles ineligible issues', async () => {
+    element._determineSloStatus = () => {
+      return null;
+    };
+    element.issue = {};
+    await element.updateComplete;
+    assert.equal(element.shadowRoot.textContent, 'N/A');
+  });
+
+  it('handles issues that have completed the SLO criteria', async () => {
+    element._determineSloStatus = () => {
+      return {target: null};
+    };
+    element.issue = {};
+    await element.updateComplete;
+    assert.equal(element.shadowRoot.textContent, 'Done');
+  });
+
+  it('handles issues that have not completed the SLO criteria', async () => {
+    element._determineSloStatus = () => {
+      return {target: 1234};
+    };
+    element.issue = {};
+    await element.updateComplete;
+    const timestampElement =
+        element.shadowRoot.querySelector('chops-timestamp');
+
+    assert.equal(timestampElement.timestamp, 1234);
+  });
+});
diff --git a/static_src/elements/framework/mr-issue-slo/slo-rules.js b/static_src/elements/framework/mr-issue-slo/slo-rules.js
new file mode 100644
index 0000000..e351ae0
--- /dev/null
+++ b/static_src/elements/framework/mr-issue-slo/slo-rules.js
@@ -0,0 +1,195 @@
+// Copyright 2020 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.
+
+/**
+ * @fileoverview Determining Issues' statuses relative to SLO rules.
+ *
+ * See go/monorail-slo-v0 for more info.
+ */
+
+/**
+ * A rule determining the compliance of an issue with regard to an SLO.
+ * @typedef {Object} SloRule
+ * @property {function(Issue): SloStatus} statusFunction
+ */
+
+/**
+ * Potential statuses of an issue relative to an SLO's completion criteria.
+ * @enum {string}
+ */
+export const SloCompletionStatus = {
+  /** The completion criteria for the SloRule have not been satisfied. */
+  INCOMPLETE: 'INCOMPLETE',
+  /** The completion criteria for the SloRule have been satisfied. */
+  COMPLETE: 'COMPLETE',
+};
+
+/**
+ * The status of an issue with regard to an SloRule.
+ * @typedef {Object} SloStatus
+ * @property {SloRule} rule The rule that generated this status.
+ * @property {Date} target The time the Issue must move to completion, or null
+ *     if the issue has already moved to completion.
+ * @property {SloCompletionStatus} completion Issue's completion status.
+ */
+
+/**
+ * Chrome OS Software's SLO for issue closure (go/chromeos-software-bug-slos).
+ *
+ * Implementation based on the queries defined in Sheriffbot
+ * https://chrome-internal.googlesource.com/infra/infra_internal/+/refs/heads/main/appengine/sheriffbot/src/sheriffbot/bug_slo_daily_queries.py
+ *
+ * @const {SloRule}
+ * @private Only visible for testing.
+ */
+export const _CROS_CLOSURE_SLO = {
+  statusFunction: (issue) => {
+    if (!_isCrosClosureEligible(issue)) {
+      return null;
+    }
+
+    const pri = getPriFromIssue(issue);
+    const daysToClose = _CROS_CLOSURE_SLO_DAYS_BY_PRIORITY[pri];
+
+    if (!daysToClose) {
+      // No applicable SLO found issues with this priority.
+      return null;
+    }
+    // Return a complete status for closed issues.
+    if (issue.statusRef && !issue.statusRef.meansOpen) {
+      return {
+        rule: _CROS_CLOSURE_SLO,
+        target: null,
+        completion: SloCompletionStatus.COMPLETE};
+    }
+
+    // Set the target based on the opening and the daysToClose.
+    const target = new Date(issue.openedTimestamp * 1000);
+    target.setDate(target.getDate() + daysToClose);
+    return {
+      rule: _CROS_CLOSURE_SLO,
+      target: target,
+      completion: SloCompletionStatus.INCOMPLETE};
+  },
+};
+
+/**
+ * @param {Issue} issue
+ * @return {string?} the pri's value, if found.
+ */
+const getPriFromIssue = (issue) => {
+  for (const fv of issue.fieldValues) {
+    if (fv.fieldRef.fieldName === 'Pri') {
+      return fv.value;
+    }
+  }
+};
+
+/**
+ * The number of days (since the issue was opened) allowed for it to be fixed.
+ * @private Only visible for testing.
+ */
+export const _CROS_CLOSURE_SLO_DAYS_BY_PRIORITY = Object.freeze({
+  '1': 42,
+});
+
+// https://chrome-internal.googlesource.com/infra/infra_internal/+/refs/heads/main/appengine/sheriffbot/src/sheriffbot/bug_slo_daily_queries.py#97
+const CROS_ELIGIBLE_COMPONENT_PATHS = new Set([
+  'OS>Systems>CrashReporting',
+  'OS>Systems>Displays',
+  'OS>Systems>Feedback',
+  'OS>Systems>HaTS',
+  'OS>Systems>Input',
+  'OS>Systems>Input>Keyboard',
+  'OS>Systems>Input>Mouse',
+  'OS>Systems>Input>Shortcuts',
+  'OS>Systems>Input>Touch',
+  'OS>Systems>Metrics',
+  'OS>Systems>Multidevice',
+  'OS>Systems>Multidevice>Messages',
+  'OS>Systems>Multidevice>SmartLock',
+  'OS>Systems>Multidevice>Tethering',
+  'OS>Systems>Network>Bluetooth',
+  'OS>Systems>Network>Cellular',
+  'OS>Systems>Network>VPN',
+  'OS>Systems>Network>WiFi',
+  'OS>Systems>Printing',
+  'OS>Systems>Settings',
+  'OS>Systems>Spellcheck',
+  'OS>Systems>Update',
+  'OS>Systems>Wallpaper',
+  'OS>Systems>WirelessCharging',
+  'Platform>Apps>Feedback',
+  'UI>Shell>Networking',
+]);
+
+/**
+ * Determines if an issue is eligible for _CROS_CLOSURE_SLO.
+ * @param {Issue} issue
+ * @return {boolean}
+ * @private Only visible for testing.
+ */
+export const _isCrosClosureEligible = (issue) => {
+  // If at least one component applies, continue.
+  const hasEligibleComponent = issue.componentRefs.some(
+      (component) => CROS_ELIGIBLE_COMPONENT_PATHS.has(component.path));
+  if (!hasEligibleComponent) {
+    return false;
+  }
+
+  let priority = null;
+  let hasMilestone = false;
+  for (const fv of issue.fieldValues) {
+    if (fv.fieldRef.fieldName === 'Type') {
+      // These types don't apply.
+      if (fv.value === 'Feature' || fv.value === 'FLT-Launch' ||
+      fv.value === 'Postmortem-Followup' || fv.value === 'Design-Review') {
+        return false;
+      }
+    }
+    if (fv.fieldRef.fieldName === 'Pri') {
+      priority = fv.value;
+    }
+    if (fv.fieldRef.fieldName === 'M') {
+      hasMilestone = true;
+    }
+  }
+  // P1 issues with milestones don't apply.
+  if (priority === '1' && hasMilestone) {
+    return false;
+  }
+  // Issues with the ChromeOS_No_SLO label don't apply.
+  for (const labelRef of issue.labelRefs) {
+    if (labelRef.label === 'ChromeOS_No_SLO') {
+      return false;
+    }
+  }
+  return true;
+};
+
+/**
+ * Active SLO Rules.
+ * @const {Array<SloRule>}
+ */
+const SLO_RULES = [_CROS_CLOSURE_SLO];
+
+/**
+ * Determines the SloStatus for the given issue.
+ * @param {Issue} issue The issue to check.
+ * @return {SloStatus} The status of the issue, or null if no rules apply.
+ */
+export const determineSloStatus = (issue) => {
+  try {
+    for (const rule of SLO_RULES) {
+      const status = rule.statusFunction(issue);
+      if (status) {
+        return status;
+      }
+    }
+  } catch (error) {
+    // Don't bubble up any errors in SLO_RULES functions, which might sometimes
+    // be written/updated by client teams.
+  }
+  return null;
+};
diff --git a/static_src/elements/framework/mr-issue-slo/slo-rules.test.js b/static_src/elements/framework/mr-issue-slo/slo-rules.test.js
new file mode 100644
index 0000000..a48e5e2
--- /dev/null
+++ b/static_src/elements/framework/mr-issue-slo/slo-rules.test.js
@@ -0,0 +1,152 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import {_CROS_CLOSURE_SLO, _CROS_CLOSURE_SLO_DAYS_BY_PRIORITY,
+  _isCrosClosureEligible, SloCompletionStatus, determineSloStatus}
+  from './slo-rules.js';
+
+const P1_FIELD_VALUE = Object.freeze({
+  fieldRef: {
+    fieldId: 1,
+    fieldName: 'Pri',
+    type: 'ENUM_TYPE',
+  },
+  value: '1'});
+
+// TODO(crbug.com/monorail/7843): Separate testing of determineSloStatus from
+// testing of specific SLO Rules. Add testing for a rule that throws an error.
+describe('determineSloStatus', () => {
+  it('returns null for ineligible issues', () => {
+    const ineligibleIssue = {
+      componentRefs: [{path: 'Some>Other>Component'}],
+      fieldValues: [P1_FIELD_VALUE],
+      labelRefs: [],
+      localId: 1,
+      projectName: 'x',
+    };
+    assert.isNull(determineSloStatus(ineligibleIssue));
+  });
+
+  it('returns null for eligible issues without defined priority', () => {
+    const ineligibleIssue = {
+      componentRefs: [{path: 'OS>Systems>CrashReporting'}],
+      fieldValues: [],
+      labelRefs: [],
+      localId: 1,
+      projectName: 'x',
+    };
+    assert.isNull(determineSloStatus(ineligibleIssue));
+  });
+
+  it('returns SloStatus with target for incomplete eligible issues', () => {
+    const openedTimestamp = 1412362587;
+    const eligibleIssue = {
+      componentRefs: [{path: 'OS>Systems>CrashReporting'}],
+      fieldValues: [P1_FIELD_VALUE],
+      labelRefs: [],
+      localId: 1,
+      openedTimestamp: openedTimestamp,
+      projectName: 'x',
+    };
+    const status = determineSloStatus(eligibleIssue);
+
+    const expectedTarget = new Date(openedTimestamp * 1000);
+    expectedTarget.setDate(
+        expectedTarget.getDate() + _CROS_CLOSURE_SLO_DAYS_BY_PRIORITY['1']);
+
+    assert.equal(status.target.valueOf(), expectedTarget.valueOf());
+    assert.equal(status.completion, SloCompletionStatus.INCOMPLETE);
+    assert.equal(status.rule, _CROS_CLOSURE_SLO);
+  });
+
+  it('returns SloStatus without target for complete eligible issues', () => {
+    const eligibleIssue = {
+      componentRefs: [{path: 'OS>Systems>CrashReporting'}],
+      fieldValues: [P1_FIELD_VALUE],
+      labelRefs: [],
+      localId: 1,
+      projectName: 'x',
+      statusRef: {status: 'Closed', meansOpen: false},
+    };
+    const status = determineSloStatus(eligibleIssue);
+    assert.isNull(status.target);
+    assert.equal(status.completion, SloCompletionStatus.COMPLETE);
+    assert.equal(status.rule, _CROS_CLOSURE_SLO);
+  });
+});
+
+describe('_isCrosClosureEligible', () => {
+  let crosIssue;
+  beforeEach(() => {
+    crosIssue = {
+      componentRefs: [{path: 'OS>Systems>CrashReporting'}],
+      fieldValues: [],
+      labelRefs: [],
+      localId: 1,
+      projectName: 'x',
+    };
+  });
+
+  it('returns true when eligible', () => {
+    assert.isTrue(_isCrosClosureEligible(crosIssue));
+  });
+
+  it('returns true if at least one eligible component', () => {
+    crosIssue.componentRefs.push({path: 'Some>Other>Component'});
+    assert.isTrue(_isCrosClosureEligible(crosIssue));
+  });
+
+  it('returns false for issues in wrong component', () => {
+    crosIssue.componentRefs = [{path: 'Some>Other>Component'}];
+    assert.isFalse(_isCrosClosureEligible(crosIssue));
+  });
+
+  it('returns false for Feature', () => {
+    crosIssue.fieldValues.push(
+        {fieldRef: {fieldName: 'Type'}, value: 'Feature'});
+    assert.isFalse(_isCrosClosureEligible(crosIssue));
+  });
+
+  it('returns false for FLT-Launch', () => {
+    crosIssue.fieldValues.push(
+        {fieldRef: {fieldName: 'Type'}, value: 'FLT-Launch'});
+    assert.isFalse(_isCrosClosureEligible(crosIssue));
+  });
+
+  it('returns false for Postmortem-Followup', () => {
+    crosIssue.fieldValues.push(
+        {fieldRef: {fieldName: 'Type'}, value: 'Postmortem-Followup'});
+    assert.isFalse(_isCrosClosureEligible(crosIssue));
+  });
+
+  it('returns false for Design-Review', () => {
+    crosIssue.fieldValues.push(
+        {fieldRef: {fieldName: 'Type'}, value: 'Design-Review'});
+    assert.isFalse(_isCrosClosureEligible(crosIssue));
+  });
+
+  it('returns true for other types', () => {
+    crosIssue.fieldValues.push(
+        {fieldRef: {fieldName: 'type'}, value: 'Any-Other-Type'});
+    assert.isTrue(_isCrosClosureEligible(crosIssue));
+  });
+
+  it('returns false for p1 with milestone', () => {
+    crosIssue.fieldValues.push(P1_FIELD_VALUE);
+    crosIssue.fieldValues.push({fieldRef: {fieldName: 'M'}, value: 'any'});
+    assert.isFalse(_isCrosClosureEligible(crosIssue));
+  });
+
+  it('returns true for p1 without milestone', () => {
+    crosIssue.fieldValues.push(P1_FIELD_VALUE);
+    crosIssue.fieldValues.push({fieldRef: {fieldName: 'Other'}, value: 'any'});
+    assert.isTrue(_isCrosClosureEligible(crosIssue));
+  });
+
+  it('returns false for ChromeOS_No_SLO label', () => {
+    crosIssue.labelRefs.push({label: 'ChromeOS_No_SLO'});
+    assert.isFalse(_isCrosClosureEligible(crosIssue));
+  });
+});
diff --git a/static_src/elements/framework/mr-keystrokes/mr-keystrokes.js b/static_src/elements/framework/mr-keystrokes/mr-keystrokes.js
new file mode 100644
index 0000000..9e932d6
--- /dev/null
+++ b/static_src/elements/framework/mr-keystrokes/mr-keystrokes.js
@@ -0,0 +1,421 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import page from 'page';
+import qs from 'qs';
+import Mousetrap from 'mousetrap';
+
+import {store, connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import 'elements/chops/chops-dialog/chops-dialog.js';
+import {issueRefToString} from 'shared/convertersV0.js';
+
+
+const SHORTCUT_DOC_GROUPS = [
+  {
+    title: 'Issue list',
+    keyDocs: [
+      {
+        keys: ['k', 'j'],
+        tip: 'up/down in the list',
+      },
+      {
+        keys: ['o', 'Enter'],
+        tip: 'open the current issue',
+      },
+      {
+        keys: ['Shift-O'],
+        tip: 'open issue in new tab',
+      },
+      {
+        keys: ['x'],
+        tip: 'select the current issue',
+      },
+    ],
+  },
+  {
+    title: 'Issue details',
+    keyDocs: [
+      {
+        keys: ['k', 'j'],
+        tip: 'prev/next issue in list',
+      },
+      {
+        keys: ['u'],
+        tip: 'up to issue list',
+      },
+      {
+        keys: ['r'],
+        tip: 'reply to current issue',
+      },
+      {
+        keys: ['Ctrl+Enter', '\u2318+Enter'],
+        tip: 'save issue reply (submit issue on issue filing page)',
+      },
+    ],
+  },
+  {
+    title: 'Anywhere',
+    keyDocs: [
+      {
+        keys: ['/'],
+        tip: 'focus on the issue search field',
+      },
+      {
+        keys: ['c'],
+        tip: 'compose a new issue',
+      },
+      {
+        keys: ['s'],
+        tip: 'star the current issue',
+      },
+      {
+        keys: ['?'],
+        tip: 'show this help dialog',
+      },
+    ],
+  },
+];
+
+/**
+ * `<mr-keystrokes>`
+ *
+ * Adds keybindings for Monorail, including a dialog for showing keystrokes.
+ * @extends {LitElement}
+ */
+export class MrKeystrokes extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return css`
+      h2 {
+        margin-top: 0;
+        display: flex;
+        justify-content: space-between;
+        font-weight: normal;
+        border-bottom: 2px solid white;
+        font-size: var(--chops-large-font-size);
+        padding-bottom: 0.5em;
+      }
+      .close-button {
+        border: 0;
+        background: 0;
+        text-decoration: underline;
+        cursor: pointer;
+      }
+      .keyboard-help {
+        display: flex;
+        align-items: flex-start;
+        justify-content: space-around;
+        flex-direction: row;
+        border-bottom: 2px solid white;
+        flex-wrap: wrap;
+      }
+      .keyboard-help-section {
+        width: 32%;
+        display: grid;
+        grid-template-columns: 40% 60%;
+        padding-bottom: 1em;
+        grid-gap: 4px;
+        min-width: 300px;
+      }
+      .help-title {
+        font-weight: bold;
+      }
+      .key-shortcut {
+        text-align: right;
+        padding-right: 8px;
+        font-weight: bold;
+        margin: 2px;
+      }
+      kbd {
+        background: var(--chops-gray-200);
+        padding: 2px 8px;
+        border-radius: 2px;
+        min-width: 28px;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <chops-dialog ?opened=${this._opened}>
+        <h2>
+          Issue tracker keyboard shortcuts
+          <button class="close-button" @click=${this._closeDialog}>
+            Close
+          </button>
+        </h2>
+        <div class="keyboard-help">
+          ${this._shortcutDocGroups.map((group) => html`
+            <div class="keyboard-help-section">
+              <span></span><span class="help-title">${group.title}</span>
+              ${group.keyDocs.map((keyDoc) => html`
+                <span class="key-shortcut">
+                  ${keyDoc.keys.map((key, i) => html`
+                    <kbd>${key}</kbd>
+                    <span
+                      class="key-separator"
+                      ?hidden=${i === keyDoc.keys.length - 1}
+                    > / </span>
+                  `)}:
+                </span>
+                <span class="key-tip">${keyDoc.tip}</span>
+              `)}
+            </div>
+          `)}
+        </div>
+        <p>
+          Note: Only signed in users can star issues or add comments, and
+          only project members can select issues for bulk edits.
+        </p>
+      </chops-dialog>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      issueEntryUrl: {type: String},
+      issueId: {type: Number},
+      _projectName: {type: String},
+      queryParams: {type: Object},
+      _fetchingIsStarred: {type: Boolean},
+      _isStarred: {type: Boolean},
+      _issuePermissions: {type: Array},
+      _opened: {type: Boolean},
+      _shortcutDocGroups: {type: Array},
+      _starringIssues: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this._shortcutDocGroups = SHORTCUT_DOC_GROUPS;
+    this._opened = false;
+    this._starringIssues = new Map();
+    this._projectName = undefined;
+    this._issuePermissions = [];
+    this.issueId = undefined;
+    this.queryParams = undefined;
+    this.issueEntryUrl = undefined;
+
+    this._page = page;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this._projectName = projectV0.viewedProjectName(state);
+    this._issuePermissions = issueV0.permissions(state);
+
+    const starredIssues = issueV0.starredIssues(state);
+    this._isStarred = starredIssues.has(issueRefToString(this._issueRef));
+    this._fetchingIsStarred = issueV0.requests(state).fetchIsStarred.requesting;
+    this._starringIssues = issueV0.starringIssues(state);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('_projectName') ||
+        changedProperties.has('issueEntryUrl')) {
+      this._bindProjectKeys(this._projectName, this.issueEntryUrl);
+    }
+    if (changedProperties.has('_projectName') ||
+        changedProperties.has('issueId') ||
+        changedProperties.has('_issuePermissions') ||
+        changedProperties.has('queryParams')) {
+      this._bindIssueDetailKeys(this._projectName, this.issueId,
+          this._issuePermissions, this.queryParams);
+    }
+  }
+
+  /** @override */
+  disconnectedCallback() {
+    super.disconnectedCallback();
+    this._unbindProjectKeys();
+    this._unbindIssueDetailKeys();
+  }
+
+  /** @private */
+  get _isStarring() {
+    const requestKey = issueRefToString(this._issueRef);
+    if (this._starringIssues.has(requestKey)) {
+      return this._starringIssues.get(requestKey).requesting;
+    }
+    return false;
+  }
+
+  /** @private */
+  get _issueRef() {
+    return {
+      projectName: this._projectName,
+      localId: this.issueId,
+    };
+  }
+
+  /** @private */
+  _toggleDialog() {
+    this._opened = !this._opened;
+  }
+
+  /** @private */
+  _openDialog() {
+    this._opened = true;
+  }
+
+  /** @private */
+  _closeDialog() {
+    this._opened = false;
+  }
+
+  /**
+   * @param {string} projectName
+   * @param {string} issueEntryUrl
+   * @fires CustomEvent#focus-search
+   * @private
+   */
+  _bindProjectKeys(projectName, issueEntryUrl) {
+    this._unbindProjectKeys();
+
+    if (!projectName) return;
+
+    issueEntryUrl = issueEntryUrl || `/p/${projectName}/issues/entry`;
+
+    Mousetrap.bind('/', (e) => {
+      e.preventDefault();
+      // Focus search.
+      this.dispatchEvent(new CustomEvent('focus-search',
+          {composed: true, bubbles: true}));
+    });
+
+    Mousetrap.bind('?', () => {
+      // Toggle key help.
+      this._toggleDialog();
+    });
+
+    Mousetrap.bind('esc', () => {
+      // Close key help dialog if open.
+      this._closeDialog();
+    });
+
+    Mousetrap.bind('c', () => this._page(issueEntryUrl));
+  }
+
+  /** @private */
+  _unbindProjectKeys() {
+    Mousetrap.unbind('/');
+    Mousetrap.unbind('?');
+    Mousetrap.unbind('esc');
+    Mousetrap.unbind('c');
+  }
+
+  /**
+   * @param {string} projectName
+   * @param {string} issueId
+   * @param {Array<string>} issuePermissions
+   * @param {Object} queryParams
+   * @private
+   */
+  _bindIssueDetailKeys(projectName, issueId, issuePermissions, queryParams) {
+    this._unbindIssueDetailKeys();
+
+    if (!projectName || !issueId) return;
+
+    const projectHomeUrl = `/p/${projectName}`;
+
+    const queryString = qs.stringify(queryParams);
+
+    // TODO(zhangtiff): Update these links when mr-flipper's async request
+    // finishes.
+    const prevUrl = `${projectHomeUrl}/issues/detail/previous?${queryString}`;
+    const nextUrl = `${projectHomeUrl}/issues/detail/next?${queryString}`;
+    const canComment = issuePermissions.includes('addissuecomment');
+    const canStar = issuePermissions.includes('setstar');
+
+    // Previous issue in list.
+    Mousetrap.bind('k', () => this._page(prevUrl));
+
+    // Next issue in list.
+    Mousetrap.bind('j', () => this._page(nextUrl));
+
+    // Back to list.
+    Mousetrap.bind('u', () => this._backToList());
+
+    if (canComment) {
+      // Navigate to the form to make changes.
+      Mousetrap.bind('r', () => this._jumpToEditForm());
+    }
+
+    if (canStar) {
+      Mousetrap.bind('s', () => this._starIssue());
+    }
+  }
+
+  /**
+   * Navigates back to the issue list page.
+   * @private
+   */
+  _backToList() {
+    const params = {...this.queryParams,
+      cursor: issueRefToString(this._issueRef)};
+    const queryString = qs.stringify(params);
+    if (params['hotlist_id']) {
+      // Because hotlist URLs require a server look up to be built from a
+      // hotlist ID, we have to route the request through an extra endpoint
+      // that redirects to the appropriate hotlist.
+      const listUrl = `/p/${this._projectName}/issues/detail/list?${
+        queryString}`;
+      this._page(listUrl);
+
+      // TODO(crbug.com/monorail/6341): Switch to using the new hotlist URL once
+      // hotlists have migrated.
+      // this._page(`/hotlists/${params['hotlist_id']}`);
+    } else {
+      delete params.id;
+      const listUrl = `/p/${this._projectName}/issues/list?${queryString}`;
+      this._page(listUrl);
+    }
+  }
+
+  /**
+   * Scrolls the user to the issue editing form when they press
+   * the 'r' key.
+   * @private
+   */
+  _jumpToEditForm() {
+    // Force a hash change even the hash is already makechanges.
+    if (window.location.hash.toLowerCase() === '#makechanges') {
+      window.location.hash = ' ';
+    }
+    window.location.hash = '#makechanges';
+  }
+
+  /**
+   * Stars the current issue the user is viewing on the issue detail page.
+   * @private
+   */
+  _starIssue() {
+    if (!this._fetchingIsStarred && !this._isStarring) {
+      const newIsStarred = !this._isStarred;
+
+      store.dispatch(issueV0.star(this._issueRef, newIsStarred));
+    }
+  }
+
+
+  /** @private */
+  _unbindIssueDetailKeys() {
+    Mousetrap.unbind('k');
+    Mousetrap.unbind('j');
+    Mousetrap.unbind('u');
+    Mousetrap.unbind('r');
+    Mousetrap.unbind('s');
+  }
+}
+
+customElements.define('mr-keystrokes', MrKeystrokes);
diff --git a/static_src/elements/framework/mr-keystrokes/mr-keystrokes.test.js b/static_src/elements/framework/mr-keystrokes/mr-keystrokes.test.js
new file mode 100644
index 0000000..0d7468f
--- /dev/null
+++ b/static_src/elements/framework/mr-keystrokes/mr-keystrokes.test.js
@@ -0,0 +1,194 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {MrKeystrokes} from './mr-keystrokes.js';
+import Mousetrap from 'mousetrap';
+
+import {issueRefToString} from 'shared/convertersV0.js';
+
+/** @type {MrKeystrokes} */
+let element;
+
+describe('mr-keystrokes', () => {
+  beforeEach(() => {
+    element = /** @type {MrKeystrokes} */ (
+      document.createElement('mr-keystrokes'));
+    document.body.appendChild(element);
+
+    element._projectName = 'proj';
+    element.issueId = 11;
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrKeystrokes);
+  });
+
+  it('tracks if the issue is currently starring', async () => {
+    await element.updateComplete;
+    assert.isFalse(element._isStarring);
+
+    const issueRefStr = issueRefToString(element._issueRef);
+    element._starringIssues.set(issueRefStr, {requesting: true});
+    assert.isTrue(element._isStarring);
+  });
+
+  it('? and esc open and close dialog', async () => {
+    await element.updateComplete;
+    assert.isFalse(element._opened);
+
+    Mousetrap.trigger('?');
+
+    await element.updateComplete;
+    assert.isTrue(element._opened);
+
+    Mousetrap.trigger('esc');
+
+    await element.updateComplete;
+    assert.isFalse(element._opened);
+  });
+
+  describe('issue detail keys', () => {
+    beforeEach(() => {
+      sinon.stub(element, '_page');
+      sinon.stub(element, '_jumpToEditForm');
+      sinon.stub(element, '_starIssue');
+    });
+
+    it('not bound when _projectName not set', async () => {
+      element._projectName = '';
+      element.issueId = 1;
+
+      await element.updateComplete;
+
+      // Navigation hot keys.
+      Mousetrap.trigger('k');
+      Mousetrap.trigger('j');
+      Mousetrap.trigger('u');
+      sinon.assert.notCalled(element._page);
+
+      // Jump to edit form hot key.
+      Mousetrap.trigger('r');
+      sinon.assert.notCalled(element._jumpToEditForm);
+
+      // Star issue hotkey.
+      Mousetrap.trigger('s');
+      sinon.assert.notCalled(element._starIssue);
+    });
+
+    it('not bound when issueId not set', async () => {
+      element._projectName = 'proj';
+      element.issueId = 0;
+
+      await element.updateComplete;
+
+      // Navigation hot keys.
+      Mousetrap.trigger('k');
+      Mousetrap.trigger('j');
+      Mousetrap.trigger('u');
+      sinon.assert.notCalled(element._page);
+
+      // Jump to edit form hot key.
+      Mousetrap.trigger('r');
+      sinon.assert.notCalled(element._jumpToEditForm);
+
+      // Star issue hotkey.
+      Mousetrap.trigger('s');
+      sinon.assert.notCalled(element._starIssue);
+    });
+
+    it('binds j and k navigation hot keys', async () => {
+      element.queryParams = {q: 'something'};
+
+      await element.updateComplete;
+
+      Mousetrap.trigger('k');
+      sinon.assert.calledWith(element._page,
+          '/p/proj/issues/detail/previous?q=something');
+
+      Mousetrap.trigger('j');
+      sinon.assert.calledWith(element._page,
+          '/p/proj/issues/detail/next?q=something');
+
+      Mousetrap.trigger('u');
+      sinon.assert.calledWith(element._page,
+          '/p/proj/issues/list?q=something&cursor=proj%3A11');
+    });
+
+    it('u key navigates back to issue list wth cursor set', async () => {
+      element.queryParams = {q: 'something'};
+
+      await element.updateComplete;
+
+      Mousetrap.trigger('u');
+      sinon.assert.calledWith(element._page,
+          '/p/proj/issues/list?q=something&cursor=proj%3A11');
+    });
+
+    it('u key navigates back to hotlist when hotlist_id set', async () => {
+      element.queryParams = {hotlist_id: 1234};
+
+      await element.updateComplete;
+
+      Mousetrap.trigger('u');
+      sinon.assert.calledWith(element._page,
+          '/p/proj/issues/detail/list?hotlist_id=1234&cursor=proj%3A11');
+    });
+
+    it('does not star when user does not have permission', async () => {
+      element.queryParams = {q: 'something'};
+      element._issuePermissions = [];
+
+      await element.updateComplete;
+
+      Mousetrap.trigger('s');
+      sinon.assert.notCalled(element._starIssue);
+    });
+
+    it('does star when user has permission', async () => {
+      element.queryParams = {q: 'something'};
+      element._issuePermissions = ['setstar'];
+
+      await element.updateComplete;
+
+      Mousetrap.trigger('s');
+      sinon.assert.calledOnce(element._starIssue);
+    });
+
+    it('does not star when user does not have permission', async () => {
+      element.queryParams = {q: 'something'};
+      element._issuePermissions = [];
+
+      await element.updateComplete;
+
+      Mousetrap.trigger('s');
+      sinon.assert.notCalled(element._starIssue);
+    });
+
+    it('does not jump to edit form when user cannot comment', async () => {
+      element.queryParams = {q: 'something'};
+      element._issuePermissions = [];
+
+      await element.updateComplete;
+
+      Mousetrap.trigger('r');
+      sinon.assert.notCalled(element._jumpToEditForm);
+    });
+
+    it('does jump to edit form when user can comment', async () => {
+      element.queryParams = {q: 'something'};
+      element._issuePermissions = ['addissuecomment'];
+
+      await element.updateComplete;
+
+      Mousetrap.trigger('r');
+      sinon.assert.calledOnce(element._jumpToEditForm);
+    });
+  });
+});
diff --git a/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.js b/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.js
new file mode 100644
index 0000000..a5f9d7a
--- /dev/null
+++ b/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.js
@@ -0,0 +1,94 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+
+import {store, connectStore} from 'reducers/base.js';
+import * as userV0 from 'reducers/userV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import 'elements/chops/chops-toggle/chops-toggle.js';
+import {logEvent} from 'monitoring/client-logger.js';
+
+/**
+ * `<mr-pref-toggle>`
+ *
+ * Toggle button for any user pref, including code font and
+ * rendering markdown.  For our purposes, pressing it causes
+ * issue description and comment text to switch either to
+ * monospace font or to render in markdown and the setting
+ * is saved in the user's preferences.
+ */
+export class MrPrefToggle extends connectStore(LitElement) {
+  /** @override */
+  render() {
+    return html`
+        <chops-toggle
+          ?checked=${this._checked}
+          ?disabled=${this._prefsInFlight}
+          @checked-change=${this._togglePref}
+          title=${this.title}
+        >${this.label}</chops-toggle>
+      `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      prefs: {type: Object},
+      userDisplayName: {type: String},
+      initialValue: {type: Boolean},
+      _prefsInFlight: {type: Boolean},
+      label: {type: String},
+      title: {type: String},
+      prefName: {type: String},
+    };
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.prefs = userV0.prefs(state);
+    this._prefsInFlight = userV0.requests(state).fetchPrefs.requesting ||
+      userV0.requests(state).setPrefs.requesting;
+    this._projectName = projectV0.viewedProjectName(state);
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.initialValue = false;
+    this.userDisplayName = '';
+    this.label = '';
+    this.title = '';
+    this.prefName = '';
+    this._projectName = '';
+  }
+
+  // Used by the legacy EZT page to interact with Redux.
+  fetchPrefs() {
+    store.dispatch(userV0.fetchPrefs());
+  }
+
+  get _checked() {
+    const {prefs, initialValue} = this;
+    if (prefs && prefs.has(this.prefName)) return prefs.get(this.prefName);
+    return initialValue;
+  }
+
+  /**
+   * Toggles the code font in response to the user activating the button.
+   * @param {Event} e
+   * @fires CustomEvent#font-toggle
+   * @private
+   */
+  _togglePref(e) {
+    const checked = e.detail.checked;
+    this.dispatchEvent(new CustomEvent('font-toggle', {detail: {checked}}));
+
+    const newPrefs = [{name: this.prefName, value: '' + checked}];
+    store.dispatch(userV0.setPrefs(newPrefs, !!this.userDisplayName));
+
+    logEvent('mr-pref-toggle', `${this.prefName}: ${checked}`, this._projectName);
+  }
+}
+customElements.define('mr-pref-toggle', MrPrefToggle);
diff --git a/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.test.js b/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.test.js
new file mode 100644
index 0000000..b6dbb41
--- /dev/null
+++ b/static_src/elements/framework/mr-pref-toggle/mr-pref-toggle.test.js
@@ -0,0 +1,86 @@
+// Copyright 2019 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.
+
+import 'sinon';
+import {assert} from 'chai';
+import {MrPrefToggle} from './mr-pref-toggle.js';
+import {prpcClient} from 'prpc-client-instance.js';
+
+let element;
+
+describe('mr-pref-toggle', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-pref-toggle');
+    element.label = 'Code';
+    element.title = 'Code font';
+    element.prefName = 'code_font';
+    document.body.appendChild(element);
+    sinon.stub(prpcClient, 'call').returns(Promise.resolve({}));
+    window.ga = sinon.stub();
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+    prpcClient.call.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrPrefToggle);
+  });
+
+  it('toggling does not save when user is not logged in', async () => {
+    element.userDisplayName = undefined;
+    element.prefs = new Map([]);
+
+    await element.updateComplete;
+
+    const chopsToggle = element.shadowRoot.querySelector('chops-toggle');
+    chopsToggle.click();
+    await element.updateComplete;
+
+    sinon.assert.notCalled(prpcClient.call);
+
+    assert.isTrue(element.prefs.get('code_font'));
+  });
+
+  it('toggling to true saves result', async () => {
+    element.userDisplayName = 'test@example.com';
+    element.prefs = new Map([['code_font', false]]);
+
+    await element.updateComplete;
+
+    const chopsToggle = element.shadowRoot.querySelector('chops-toggle');
+
+    chopsToggle.click(); // Toggle it on.
+    await element.updateComplete;
+
+    sinon.assert.calledWith(
+        prpcClient.call,
+        'monorail.Users',
+        'SetUserPrefs',
+        {prefs: [{name: 'code_font', value: 'true'}]});
+
+    assert.isTrue(element.prefs.get('code_font'));
+  });
+
+  it('toggling to false saves result', async () => {
+    element.userDisplayName = 'test@example.com';
+    element.prefs = new Map([['code_font', true]]);
+
+    await element.updateComplete;
+
+    const chopsToggle = element.shadowRoot.querySelector('chops-toggle');
+
+    chopsToggle.click(); // Toggle it off.
+    await element.updateComplete;
+
+    sinon.assert.calledWith(
+        prpcClient.call,
+        'monorail.Users',
+        'SetUserPrefs',
+        {prefs: [{name: 'code_font', value: 'false'}]});
+
+    assert.isFalse(element.prefs.get('code_font'));
+  });
+});
diff --git a/static_src/elements/framework/mr-site-banner/mr-site-banner.js b/static_src/elements/framework/mr-site-banner/mr-site-banner.js
new file mode 100644
index 0000000..2a98a5c
--- /dev/null
+++ b/static_src/elements/framework/mr-site-banner/mr-site-banner.js
@@ -0,0 +1,75 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import 'elements/chops/chops-timestamp/chops-timestamp.js';
+import {connectStore} from 'reducers/base.js';
+import * as sitewide from 'reducers/sitewide.js';
+
+export class MrSiteBanner extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return css`
+      :host([hidden]) {
+        display: none;
+      }
+      :host {
+        display: block;
+        font-weight: bold;
+        color: var(--chops-field-error-color);
+        background: var(--chops-orange-50);
+        padding: 5px;
+        text-align: center;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      ${this.bannerMessage}
+      ${this.bannerTime ? html`
+        <chops-timestamp
+          .timestamp=${this.bannerTime}
+        ></chops-timestamp>
+      ` : ''}
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      hidden: {
+        type: Boolean,
+        reflect: true,
+      },
+      bannerMessage: {type: String},
+      bannerTime: {type: Number},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.bannerMessage = '';
+    this.bannerTime = 0;
+    this.hidden = false;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.bannerMessage = sitewide.bannerMessage(state);
+    this.bannerTime = sitewide.bannerTime(state);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('bannerMessage')) {
+      this.hidden = !this.bannerMessage;
+    }
+  }
+}
+
+customElements.define('mr-site-banner', MrSiteBanner);
diff --git a/static_src/elements/framework/mr-site-banner/mr-site-banner.test.js b/static_src/elements/framework/mr-site-banner/mr-site-banner.test.js
new file mode 100644
index 0000000..527b942
--- /dev/null
+++ b/static_src/elements/framework/mr-site-banner/mr-site-banner.test.js
@@ -0,0 +1,56 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {FORMATTER}
+  from 'elements/chops/chops-timestamp/chops-timestamp-helpers.js';
+import {MrSiteBanner} from './mr-site-banner.js';
+
+
+let element;
+
+describe('mr-site-banner', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-site-banner');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrSiteBanner);
+  });
+
+  it('displays a banner message', async () => {
+    element.bannerMessage = 'Message';
+    await element.updateComplete;
+    assert.equal(element.shadowRoot.textContent.trim(), 'Message');
+    assert.isNull(element.shadowRoot.querySelector('chops-timestamp'));
+  });
+
+  it('displays the banner timestamp', async () => {
+    const timestamp = 1560450600;
+
+    element.bannerMessage = 'Message';
+    element.bannerTime = timestamp;
+    await element.updateComplete;
+
+    const chopsTimestamp = element.shadowRoot.querySelector('chops-timestamp');
+
+    // The formatted date strings differ based on time zone and browser, so we
+    // can't use static strings for testing. We can't stub out the format method
+    // because it's native code and can't be modified. So just use the FORMATTER
+    // object.
+    assert.include(
+        chopsTimestamp.shadowRoot.textContent,
+        FORMATTER.format(new Date(timestamp * 1000)));
+  });
+
+  it('hides when there is no banner message', async () => {
+    await element.updateComplete;
+    assert.isTrue(element.hidden);
+  });
+});
diff --git a/static_src/elements/framework/mr-star/mr-issue-star.js b/static_src/elements/framework/mr-star/mr-issue-star.js
new file mode 100644
index 0000000..5255820
--- /dev/null
+++ b/static_src/elements/framework/mr-star/mr-issue-star.js
@@ -0,0 +1,110 @@
+// Copyright 2020 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.
+import {connectStore, store} from 'reducers/base.js';
+import * as users from 'reducers/users.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import {issueRefToString} from 'shared/convertersV0.js';
+import {MrStar} from './mr-star.js';
+
+
+/**
+ * `<mr-issue-star>`
+ *
+ * A button for starring an issue.
+ *
+ */
+export class MrIssueStar extends connectStore(MrStar) {
+  /** @override */
+  static get properties() {
+    return {
+      /**
+       * A reference to the issue that the star button interacts with.
+       */
+      issueRef: {type: Object},
+      /**
+       * Whether the issue is starred (used for accessing easily).
+       */
+      _starredIssues: {type: Set},
+      /**
+       * Whether the issue's star state is being fetched. This is taken from
+       * the component's parent, which is expected to handle fetching initial
+       * star state for an issue.
+       */
+      _fetchingIsStarred: {type: Boolean},
+      /**
+       * A Map of all issues currently being starred.
+       */
+      _starringIssues: {type: Object},
+      /**
+       * The currently logged in user. Required to determine if the user can
+       * star.
+       */
+      _currentUserName: {type: String},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    /**
+     * @type {IssueRef}
+     */
+    this.issueRef = {};
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this._currentUserName = users.currentUserName(state);
+
+    // TODO(crbug.com/monorail/7374): Remove references to issueV0 in
+    // <mr-star>.
+    this._starringIssues = issueV0.starringIssues(state);
+    this._starredIssues = issueV0.starredIssues(state);
+    this._fetchingIsStarred = issueV0.requests(state).fetchIsStarred.requesting;
+  }
+
+  /** @override */
+  get type() {
+    return 'issue';
+  }
+
+  /**
+   * @return {boolean} Whether there's an in-flight star request.
+   */
+  get _isStarring() {
+    const requestKey = issueRefToString(this.issueRef);
+    if (this._starringIssues.has(requestKey)) {
+      return this._starringIssues.get(requestKey).requesting;
+    }
+    return false;
+  }
+
+  /** @override */
+  get isLoggedIn() {
+    return !!this._currentUserName;
+  }
+
+  /** @override */
+  get requesting() {
+    return this._fetchingIsStarred || this._isStarring;
+  }
+
+  /** @override */
+  get isStarred() {
+    return this._starredIssues.has(issueRefToString(this.issueRef));
+  }
+
+  /** @override */
+  star() {
+    store.dispatch(issueV0.star(this.issueRef, true));
+  }
+
+  /** @override */
+  unstar() {
+    store.dispatch(issueV0.star(this.issueRef, false));
+  }
+}
+
+customElements.define('mr-issue-star', MrIssueStar);
diff --git a/static_src/elements/framework/mr-star/mr-issue-star.test.js b/static_src/elements/framework/mr-star/mr-issue-star.test.js
new file mode 100644
index 0000000..bb618f7
--- /dev/null
+++ b/static_src/elements/framework/mr-star/mr-issue-star.test.js
@@ -0,0 +1,85 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import {MrIssueStar} from './mr-issue-star.js';
+import {issueRefToString} from 'shared/convertersV0.js';
+import sinon from 'sinon';
+
+
+let element;
+
+describe('mr-issue-star', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-issue-star');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrIssueStar);
+  });
+
+  it('starring logins user when user is not logged in', async () => {
+    element._currentUserName = undefined;
+    sinon.stub(element, 'login');
+
+    await element.updateComplete;
+
+    const star = element.shadowRoot.querySelector('button');
+
+    star.click();
+
+    sinon.assert.calledOnce(element.login);
+  });
+
+  it('_isStarring true only when issue ref is being starred', async () => {
+    element._starringIssues = new Map([['chromium:22', {requesting: true}]]);
+    element.issueRef = {projectName: 'chromium', localId: 5};
+
+    assert.isFalse(element._isStarring);
+
+    element.issueRef = {projectName: 'chromium', localId: 22};
+
+    assert.isTrue(element._isStarring);
+
+    element._starringIssues = new Map([['chromium:22', {requesting: false}]]);
+
+    assert.isFalse(element._isStarring);
+  });
+
+  it('starring is disabled when _isStarring true', () => {
+    element._currentUserName = 'users/1234';
+    sinon.stub(element, '_isStarring').get(() => true);
+
+    assert.isFalse(element._starringEnabled);
+  });
+
+  it('starring is disabled when _fetchingIsStarred true', () => {
+    element._currentUserName = 'users/1234';
+    element._fetchingIsStarred = true;
+
+    assert.isFalse(element._starringEnabled);
+  });
+
+  it('_starredIssues changes displayed icon', async () => {
+    element.issueRef = {projectName: 'proj', localId: 1};
+
+    element._starredIssues = new Set([issueRefToString(element.issueRef)]);
+
+    await element.updateComplete;
+
+    const star = element.shadowRoot.querySelector('button');
+    assert.equal(star.textContent.trim(), 'star');
+
+    element._starredIssues = new Set();
+
+    await element.updateComplete;
+
+    assert.equal(star.textContent.trim(), 'star_border');
+  });
+});
diff --git a/static_src/elements/framework/mr-star/mr-project-star.js b/static_src/elements/framework/mr-star/mr-project-star.js
new file mode 100644
index 0000000..14b2c73
--- /dev/null
+++ b/static_src/elements/framework/mr-star/mr-project-star.js
@@ -0,0 +1,148 @@
+// Copyright 2020 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.
+import {connectStore, store} from 'reducers/base.js';
+import * as users from 'reducers/users.js';
+import {stars} from 'reducers/stars.js';
+import {projectAndUserToStarName} from 'shared/converters.js';
+import {MrStar} from './mr-star.js';
+import 'shared/typedef.js';
+
+
+/**
+ * `<mr-project-star>`
+ *
+ * A button for starring a project.
+ *
+ */
+export class MrProjectStar extends connectStore(MrStar) {
+  /** @override */
+  static get properties() {
+    return {
+      /**
+       * Resource name of the project being starred.
+       */
+      name: {type: String},
+      /**
+       * List of all stars, indexed by star name.
+       */
+      _stars: {type: Object},
+      /**
+       * Whether project stars are currently being fetched.
+       */
+      _fetchingStars: {type: Boolean},
+      /**
+       * Request data for projects currently being starred.
+       */
+      _starringProjects: {type: Object},
+      /**
+       * Request data for projects currently being unstarred.
+       */
+      _unstarringProjects: {type: Object},
+      /**
+       * The currently logged in user. Required to determine if the user can
+       * star.
+       */
+      _currentUserName: {type: String},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    /** @type {string} */
+    this.name = undefined;
+
+    /** @type {boolean} */
+    this._fetchingStars = false;
+
+    /** @type {Object<ProjectStarName, ReduxRequestState>} */
+    this._starringProjects = {};
+
+    /** @type {Object<ProjectStarName, ReduxRequestState>} */
+    this._unstarringProjects = {};
+
+    /** @type {Object<StarName, Star>} */
+    this._stars = {};
+
+    /** @type {string} */
+    this._currentUserName = undefined;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this._currentUserName = users.currentUserName(state);
+
+    this._stars = stars.byName(state);
+
+    const requests = stars.requests(state);
+    this._fetchingStars = requests.listProjects.requesting;
+    this._starringProjects = requests.starProject;
+    this._unstarringProjects = requests.unstarProject;
+  }
+
+  /** @override */
+  get type() {
+    return 'project';
+  }
+
+  /**
+   * @return {string} The resource name of the ProjectStar.
+   */
+  get _starName() {
+    return projectAndUserToStarName(this.name, this._currentUserName);
+  }
+
+  /**
+   * @return {ProjectStar} The ProjectStar object for the referenced project,
+   *   if one exists.
+   */
+  get _projectStar() {
+    const name = this._starName;
+    if (!(name in this._stars)) return {};
+    return this._stars[name];
+  }
+
+  /**
+   * @return {boolean} Whether there's an in-flight star request.
+   */
+  get _isStarring() {
+    const requestKey = this._starName;
+    if (requestKey in this._starringProjects &&
+        this._starringProjects[requestKey].requesting) {
+      return true;
+    }
+    if (requestKey in this._unstarringProjects &&
+        this._unstarringProjects[requestKey].requesting) {
+      return true;
+    }
+    return false;
+  }
+
+  /** @override */
+  get isLoggedIn() {
+    return !!this._currentUserName;
+  }
+
+  /** @override */
+  get requesting() {
+    return this._fetchingStars || this._isStarring;
+  }
+
+  /** @override */
+  get isStarred() {
+    return !!(this._projectStar && this._projectStar.name);
+  }
+
+  /** @override */
+  star() {
+    store.dispatch(stars.starProject(this.name, this._currentUserName));
+  }
+
+  /** @override */
+  unstar() {
+    store.dispatch(stars.unstarProject(this.name, this._currentUserName));
+  }
+}
+
+customElements.define('mr-project-star', MrProjectStar);
diff --git a/static_src/elements/framework/mr-star/mr-project-star.test.js b/static_src/elements/framework/mr-star/mr-project-star.test.js
new file mode 100644
index 0000000..6afd982
--- /dev/null
+++ b/static_src/elements/framework/mr-star/mr-project-star.test.js
@@ -0,0 +1,181 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {MrProjectStar} from './mr-project-star.js';
+import {stars} from 'reducers/stars.js';
+
+let element;
+
+describe('mr-project-star (disconnected)', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-project-star');
+    document.body.appendChild(element);
+
+    sinon.stub(element, 'stateChanged');
+    sinon.spy(stars, 'starProject');
+    sinon.spy(stars, 'unstarProject');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+
+    stars.starProject.restore();
+    stars.unstarProject.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrProjectStar);
+  });
+
+  it('clicking on star when logged out logs in user', async () => {
+    element._currentUserName = undefined;
+    sinon.stub(element, 'login');
+
+    await element.updateComplete;
+
+    const star = element.shadowRoot.querySelector('button');
+
+    star.click();
+
+    sinon.assert.calledOnce(element.login);
+  });
+
+  it('star dispatches star request', () => {
+    element._currentUserName = 'users/1234';
+    element.name = 'projects/monorail';
+
+    element.star();
+
+    sinon.assert.calledWith(stars.starProject,
+        'projects/monorail', 'users/1234');
+  });
+
+  it('unstar dispatches unstar request', () => {
+    element._currentUserName = 'users/1234';
+    element.name = 'projects/monorail';
+
+    element.unstar();
+
+    sinon.assert.calledWith(stars.unstarProject,
+        'projects/monorail', 'users/1234');
+  });
+
+  describe('isStarred', () => {
+    beforeEach(() => {
+      element._stars = {
+        'users/1234/projectStars/monorail':
+            {name: 'users/1234/projectStars/monorail'},
+        'users/5678/projectStars/chromium':
+            {name: 'users/5678/projectStars/chromium'},
+      };
+    });
+
+    it('false when no data', () => {
+      element._stars = {};
+      assert.isFalse(element.isStarred);
+    });
+
+    it('false when user is not logged in', () => {
+      element._currentUserName = '';
+      element.name = 'projects/monorail';
+
+      assert.isFalse(element.isStarred);
+    });
+
+    it('false when project is not starred', () => {
+      element._currentUserName = 'users/1234';
+      element.name = 'projects/chromium';
+
+      assert.isFalse(element.isStarred);
+
+      element._currentUserName = 'users/5678';
+      element.name = 'projects/monorail';
+
+      assert.isFalse(element.isStarred);
+    });
+
+    it('true when user has starred project', () => {
+      element._currentUserName = 'users/1234';
+      element.name = 'projects/monorail';
+
+      assert.isTrue(element.isStarred);
+
+      element._currentUserName = 'users/5678';
+      element.name = 'projects/chromium';
+
+      assert.isTrue(element.isStarred);
+    });
+  });
+
+  describe('_starringEnabled', () => {
+    beforeEach(() => {
+      element._currentUserName = 'users/1234';
+      element.name = 'projects/monorail';
+    });
+
+    it('disabled when user is not logged in', () => {
+      element._currentUserName = '';
+
+      assert.isFalse(element._starringEnabled);
+    });
+
+    it('disabled when stars are being fetched', () => {
+      element._fetchingStars = true;
+      element._starringProjects = {};
+      element._unstarringProjects = {};
+
+      assert.isFalse(element._starringEnabled);
+    });
+
+    it('disabled when user is starring project', () => {
+      element._fetchingStars = false;
+      element._starringProjects =
+          {'users/1234/projectStars/monorail': {requesting: true}};
+      element._unstarringProjects = {};
+
+      assert.isFalse(element._starringEnabled);
+    });
+
+    it('disabled when user is unstarring project', () => {
+      element._fetchingStars = false;
+      element._starringProjects = {};
+      element._unstarringProjects =
+          {'users/1234/projectStars/monorail': {requesting: true}};
+
+      assert.isFalse(element._starringEnabled);
+    });
+
+    it('enabled when user is starring an unrelated project', () => {
+      element._fetchingStars = false;
+      element._starringProjects = {
+        'users/1234/projectStars/chromium': {requesting: true},
+        'users/1234/projectStars/monorail': {requesting: false},
+      };
+      element._unstarringProjects = {};
+
+      assert.isTrue(element._starringEnabled);
+    });
+
+    it('enabled when user is unstarring an unrelated project', () => {
+      element._fetchingStars = false;
+      element._starringProjects = {};
+      element._unstarringProjects = {
+        'users/1234/projectStars/chromium': {requesting: true},
+        'users/1234/projectStars/monorail': {requesting: false},
+      };
+
+      assert.isTrue(element._starringEnabled);
+    });
+
+    it('enabled when no in-flight requests', () => {
+      element._fetchingStars = false;
+      element._starringProjects = {};
+      element._unstarringProjects = {};
+
+      assert.isTrue(element._starringEnabled);
+    });
+  });
+});
diff --git a/static_src/elements/framework/mr-star/mr-star.js b/static_src/elements/framework/mr-star/mr-star.js
new file mode 100644
index 0000000..fe509be
--- /dev/null
+++ b/static_src/elements/framework/mr-star/mr-star.js
@@ -0,0 +1,235 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+/**
+ * `<mr-star>`
+ *
+ * A button for starring a resource. Does not directly integrate with app
+ * state. Subclasses by <mr-issue-star> and <mr-project-star>, which add
+ * resource-specific logic for state management.
+ *
+ */
+export class MrStar extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: block;
+        --mr-star-size: var(--chops-icon-font-size);
+      }
+      button {
+        background: none;
+        border: none;
+        cursor: pointer;
+        padding: 0;
+        margin: 0;
+        display: flex;
+        align-items: center;
+      }
+      /* TODO(crbug.com/monorail/8008): Add nicer looking loading style. */
+      button.loading {
+        opacity: 0.5;
+        cursor: default;
+      }
+      i.material-icons {
+        font-size: var(--mr-star-size);
+        color: var(--chops-primary-icon-color);
+      }
+      i.material-icons.starred {
+        color: var(--chops-primary-accent-color);
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    const {isStarred} = this;
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <button class="star-button"
+        @click=${this._loginOrStar}
+        title=${this._starToolTip}
+        role="checkbox"
+        aria-checked=${isStarred ? 'true' : 'false'}
+        class=${this.requesting ? 'loading' : ''}
+      >
+        ${isStarred ? html`
+          <i class="material-icons starred" role="presentation">
+            star
+          </i>
+        `: html`
+          <i class="material-icons" role="presentation">
+            star_border
+          </i>
+        `}
+      </button>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      /**
+       * Note: In order for re-renders to happen based on the getters defined
+       * in this class, those getters must have values based on properties.
+       * Subclasses of <mr-star> are not expected to inherit <mr-star>'s
+       * properties, but they should make sure their getter implementations
+       * are also backed by properties.
+       */
+      _isStarred: {type: Boolean},
+      _isLoggedIn: {type: Boolean},
+      _canStar: {type: Boolean},
+      _requesting: {type: Boolean},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    /**
+     * @type {boolean} Whether the user has starred the resource or not.
+     */
+    this._isStarred = false;
+
+    /**
+     * @type {boolean} If the user is logged in.
+     */
+    this._isLoggedIn = false;
+
+    /**
+     * @return {boolean} Whether the user has permission to star the star.
+     */
+    this._canStar = true;
+
+    /**
+     * @return {boolean} Whether there's an in-flight request to star
+     * the resource.
+     */
+    this._requesting = false;
+  }
+
+  /** @override */
+  connectedCallback() {
+    super.connectedCallback();
+
+    // Prevent clicks on this element from causing navigation if the element
+    // is embedded inside a link.
+    this.addEventListener('click', (e) => e.preventDefault());
+  }
+
+  /**
+   * @return {boolean} If the user is logged in.
+   */
+  get isLoggedIn() {
+    return this._isLoggedIn;
+  }
+
+  /**
+   * @return {boolean} If there's an in-flight request that might affect the
+   *   star's data.
+   */
+  get requesting() {
+    return this._requesting;
+  }
+
+  /**
+   * @return {boolean} Whether the resource is starred or not.
+   */
+  get isStarred() {
+    return this._isStarred;
+  }
+
+  /**
+   * @return {boolean} If the user has permission to star.
+   */
+  get canStar() {
+    return this._canStar;
+  }
+
+  /**
+   * @return {boolean}
+   */
+  get _starringEnabled() {
+    return this.isLoggedIn && this.canStar && !this.requesting;
+  }
+
+  /**
+   * @return {string} The name of the resource kind being starred.
+   * ie: issue, project, etc.
+   */
+  get type() {
+    return 'resource';
+  }
+
+  /**
+   * @return {string} the title to display on the star button.
+   */
+  get _starToolTip() {
+    if (!this.isLoggedIn) {
+      return `Login to star this ${this.type}.`;
+    }
+    if (!this.canStar) {
+      return `You don't have permission to star this ${this.type}.`;
+    }
+    if (this.requesting) {
+      return `Loading star state for this ${this.type}.`;
+    }
+    return `${this.isStarred ? 'Unstar' : 'Star'} this ${this.type}.`;
+  }
+
+  /**
+   * Logins the user if they're not logged in. Otherwise, stars or
+   * unstars the resource based on star state.
+   */
+  _loginOrStar() {
+    if (!this.isLoggedIn) {
+      this.login();
+    } else {
+      this.toggleStar();
+    }
+  }
+
+  /**
+   * Logs in the user.
+   */
+  login() {
+    // TODO(crbug.com/monorail/6073): Replace this logic with a function call
+    // when moving authentication to frontend.
+    // HACK: In our current login implementation, login URLs can only be
+    // generated by the backend which makes piping a login URL into a component
+    // a <mr-star> complex. To get around this, we're using the
+    // legacy window.CS_env infrastructure.
+    window.location.href = window.CS_env.login_url;
+  }
+
+  /**
+   * Stars or unstars the resource based on the user's interaction.
+   */
+  toggleStar() {
+    if (!this._starringEnabled) return;
+    if (this.isStarred) {
+      this.unstar();
+    } else {
+      this.star();
+    }
+  }
+
+  /**
+   * Stars the given resource. To be implemented by a subclass.
+   */
+  star() {
+    throw new Error('Method not implemented.');
+  }
+
+  /**
+   * Unstars the given resource. To be implemented by a subclass.
+   */
+  unstar() {
+    throw new Error('Method not implemented.');
+  }
+}
+
+customElements.define('mr-star', MrStar);
diff --git a/static_src/elements/framework/mr-star/mr-star.test.js b/static_src/elements/framework/mr-star/mr-star.test.js
new file mode 100644
index 0000000..4db7877
--- /dev/null
+++ b/static_src/elements/framework/mr-star/mr-star.test.js
@@ -0,0 +1,302 @@
+// Copyright 2019 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.
+import sinon from 'sinon';
+import {assert} from 'chai';
+
+import {MrStar} from './mr-star.js';
+
+let element;
+
+describe('mr-star', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-star');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    if (document.body.contains(element)) {
+      document.body.removeChild(element);
+    }
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrStar);
+  });
+
+  it('unimplemented methods throw errors', () => {
+    assert.throws(element.star, 'Method not implemented.');
+    assert.throws(element.unstar, 'Method not implemented.');
+  });
+
+  describe('clicking star toggles star state', () => {
+    beforeEach(() => {
+      sinon.stub(element, 'star');
+      sinon.stub(element, 'unstar');
+      element._isLoggedIn = true;
+      element._canStar = true;
+    });
+
+    it('unstarred star', async () => {
+      element._isStarred = false;
+
+      await element.updateComplete;
+
+      sinon.assert.notCalled(element.star);
+      sinon.assert.notCalled(element.unstar);
+
+      element.shadowRoot.querySelector('button').click();
+
+      sinon.assert.calledOnce(element.star);
+      sinon.assert.notCalled(element.unstar);
+    });
+
+    it('starred star', async () => {
+      element._isStarred = true;
+
+      await element.updateComplete;
+
+      sinon.assert.notCalled(element.star);
+      sinon.assert.notCalled(element.unstar);
+
+      element.shadowRoot.querySelector('button').click();
+
+      sinon.assert.notCalled(element.star);
+      sinon.assert.calledOnce(element.unstar);
+    });
+  });
+
+  it('clicking while logged out logs you in', async () => {
+    sinon.stub(element, 'login');
+    element._isLoggedIn = false;
+    element._canStar = true;
+
+    await element.updateComplete;
+
+    sinon.assert.notCalled(element.login);
+
+    element.shadowRoot.querySelector('button').click();
+
+    sinon.assert.calledOnce(element.login);
+  });
+
+  describe('toggleStar', () => {
+    beforeEach(() => {
+      sinon.stub(element, 'star');
+      sinon.stub(element, 'unstar');
+    });
+
+    it('stars when unstarred', () => {
+      element._isLoggedIn = true;
+      element._canStar = true;
+      element._isStarred = false;
+
+      element.toggleStar();
+
+      sinon.assert.calledOnce(element.star);
+      sinon.assert.notCalled(element.unstar);
+    });
+
+    it('unstars when starred', () => {
+      element._isLoggedIn = true;
+      element._canStar = true;
+      element._isStarred = true;
+
+      element.toggleStar();
+
+      sinon.assert.calledOnce(element.unstar);
+      sinon.assert.notCalled(element.star);
+    });
+
+    it('does nothing when user is not logged in', () => {
+      element._isLoggedIn = false;
+      element._canStar = true;
+      element._isStarred = true;
+
+      element.toggleStar();
+
+      sinon.assert.notCalled(element.unstar);
+      sinon.assert.notCalled(element.star);
+    });
+
+    it('does nothing when user does not have permission', () => {
+      element._isLoggedIn = true;
+      element._canStar = false;
+      element._isStarred = true;
+
+      element.toggleStar();
+
+      sinon.assert.notCalled(element.unstar);
+      sinon.assert.notCalled(element.star);
+    });
+
+    it('does nothing when stars are being fetched', () => {
+      element._isLoggedIn = true;
+      element._canStar = true;
+      element._isStarred = true;
+      element._requesting = true;
+
+      element.toggleStar();
+
+      sinon.assert.notCalled(element.unstar);
+      sinon.assert.notCalled(element.star);
+    });
+  });
+
+  describe('_starringEnabled', () => {
+    it('enabled when user is logged in and has permission', () => {
+      element._isLoggedIn = true;
+      element._canStar = true;
+      element._isStarred = true;
+      element._requesting = false;
+
+      assert.isTrue(element._starringEnabled);
+    });
+
+    it('disabled when user is logged out', () => {
+      element._isLoggedIn = false;
+      element._canStar = false;
+      element._isStarred = false;
+      element._requesting = false;
+
+      assert.isFalse(element._starringEnabled);
+    });
+
+    it('disabled when user has no permission', () => {
+      element._isLoggedIn = true;
+      element._canStar = false;
+      element._isStarred = true;
+      element._requesting = false;
+
+      assert.isFalse(element._starringEnabled);
+    });
+
+    it('disabled when requesting star', () => {
+      element._isLoggedIn = true;
+      element._canStar = true;
+      element._isStarred = true;
+      element._requesting = true;
+
+      assert.isFalse(element._starringEnabled);
+    });
+  });
+
+  it('loading state shown when requesting', async () => {
+    element._requesting = true;
+    await element.updateComplete;
+
+    const star = element.shadowRoot.querySelector('button');
+
+    assert.isTrue(star.classList.contains('loading'));
+
+    element._requesting = false;
+    await element.updateComplete;
+
+    assert.isFalse(star.classList.contains('loading'));
+  });
+
+  it('isStarred changes displayed icon', async () => {
+    element._isStarred = true;
+    await element.updateComplete;
+
+    const star = element.shadowRoot.querySelector('button');
+    assert.equal(star.textContent.trim(), 'star');
+
+    element._isStarred = false;
+    await element.updateComplete;
+
+    assert.equal(star.textContent.trim(), 'star_border');
+  });
+
+  describe('mr-star nested inside a link', () => {
+    let parent;
+    let oldHash;
+
+    beforeEach(() => {
+      parent = document.createElement('a');
+      parent.setAttribute('href', '#test-hash');
+      parent.appendChild(element);
+
+      oldHash = window.location.hash;
+
+      sinon.stub(element, 'star');
+      sinon.stub(element, 'unstar');
+    });
+
+    afterEach(() => {
+      window.location.hash = oldHash;
+    });
+
+    it('clicking to star does not cause navigation', async () => {
+      sinon.spy(element, 'toggleStar');
+      element._isLoggedIn = true;
+      element._canStar = true;
+      await element.updateComplete;
+
+      element.shadowRoot.querySelector('button').click();
+
+      assert.notEqual(window.location.hash, '#test-hash');
+      sinon.assert.calledOnce(element.toggleStar);
+    });
+
+    it('clicking on disabled star does not cause navigation', async () => {
+      element._isLoggedIn = true;
+      element._canStar = false;
+      await element.updateComplete;
+
+      element.shadowRoot.querySelector('button').click();
+
+      assert.notEqual(window.location.hash, '#test-hash');
+    });
+
+    it('clicking on link still navigates', async () => {
+      element._isLoggedIn = true;
+      element._canStar = true;
+      await element.updateComplete;
+
+      parent.click();
+
+      assert.equal(window.location.hash, '#test-hash');
+    });
+  });
+
+  describe('_starToolTip', () => {
+    it('not logged in', () => {
+      element._isLoggedIn = false;
+      element._canStar = false;
+      assert.equal(element._starToolTip,
+          `Login to star this resource.`);
+    });
+
+    it('no permission to star', () => {
+      element._isLoggedIn = true;
+      element._canStar = false;
+      assert.equal(element._starToolTip,
+          `You don't have permission to star this resource.`);
+    });
+
+    it('star is loading', () => {
+      element._isLoggedIn = true;
+      element._canStar = true;
+      element._requesting = true;
+      assert.equal(element._starToolTip,
+          `Loading star state for this resource.`);
+    });
+
+    it('issue is not starred', () => {
+      element._isLoggedIn = true;
+      element._canStar = true;
+      element._isStarred = false;
+      assert.equal(element._starToolTip,
+          `Star this resource.`);
+    });
+
+    it('issue is starred', () => {
+      element._isLoggedIn = true;
+      element._canStar = true;
+      element._isStarred = true;
+      assert.equal(element._starToolTip,
+          `Unstar this resource.`);
+    });
+  });
+});
diff --git a/static_src/elements/framework/mr-tabs/mr-tabs.js b/static_src/elements/framework/mr-tabs/mr-tabs.js
new file mode 100644
index 0000000..d14688e
--- /dev/null
+++ b/static_src/elements/framework/mr-tabs/mr-tabs.js
@@ -0,0 +1,99 @@
+// Copyright 2020 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.
+
+import {LitElement, html, css} from 'lit-element';
+import 'shared/typedef.js';
+
+/**
+ * `<mr-tabs>`
+ *
+ * A Material Design tabs strip. https://material.io/components/tabs/
+ *
+ */
+export class MrTabs extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      ul {
+        display: flex;
+        list-style: none;
+        margin: 0;
+        padding: 0;
+      }
+      li {
+        color: var(--chops-choice-color);
+      }
+      li.selected {
+        color: var(--chops-active-choice-color);
+      }
+      li:hover {
+        background: var(--chops-primary-accent-bg);
+        color: var(--chops-active-choice-color);
+      }
+      a {
+        color: inherit;
+        text-decoration: none;
+
+        display: inline-block;
+        line-height: 38px;
+        padding: 0 24px;
+      }
+      li.selected a {
+        border-bottom: solid 2px;
+      }
+      i.material-icons {
+        vertical-align: middle;
+        margin-right: 4px;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <ul>
+        ${this.items.map(this._renderTab.bind(this))}
+      </ul>
+    `;
+  }
+
+  /**
+   * Renders one tab.
+   * @param {MenuItem} item
+   * @param {number} index
+   * @return {TemplateResult}
+   */
+  _renderTab(item, index) {
+    return html`
+      <li class=${index === this.selected ? 'selected' : ''}>
+        <a href=${item.url}>
+          <i class="material-icons" ?hidden=${!item.icon}>
+            ${item.icon}
+          </i>
+          ${item.text}
+        </a>
+      </li>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      items: {type: Array},
+      selected: {type: Number},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    /** @type {Array<MenuItem>} */
+    this.items = [];
+    this.selected = 0;
+  }
+}
+
+customElements.define('mr-tabs', MrTabs);
diff --git a/static_src/elements/framework/mr-tabs/mr-tabs.test.js b/static_src/elements/framework/mr-tabs/mr-tabs.test.js
new file mode 100644
index 0000000..1d55c39
--- /dev/null
+++ b/static_src/elements/framework/mr-tabs/mr-tabs.test.js
@@ -0,0 +1,38 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import {MrTabs} from './mr-tabs.js';
+
+/** @type {MrTabs} */
+let element;
+
+describe('mr-tabs', () => {
+  beforeEach(() => {
+    // @ts-ignore
+    element = document.createElement('mr-tabs');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrTabs);
+  });
+
+  it('renders tabs', async () => {
+    element.items = [
+      {text: 'Text 1'},
+      {text: 'Text 2', icon: 'done', url: 'https://url'},
+    ];
+    element.selected = 1;
+    await element.updateComplete;
+
+    const items = element.shadowRoot.querySelectorAll('li');
+    assert.equal(items[0].className, '');
+    assert.equal(items[1].className, 'selected');
+  });
+});
diff --git a/static_src/elements/framework/mr-upload/mr-upload.js b/static_src/elements/framework/mr-upload/mr-upload.js
new file mode 100644
index 0000000..5fee672
--- /dev/null
+++ b/static_src/elements/framework/mr-upload/mr-upload.js
@@ -0,0 +1,322 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+/**
+ * `<mr-upload>`
+ *
+ * A file uploading widget for use in adding attachments and similar things.
+ *
+ */
+export class MrUpload extends LitElement {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          display: block;
+          width: 100%;
+          padding: 0.25em 4px;
+          border: 1px dashed var(--chops-gray-300);
+          box-sizing: border-box;
+          border-radius: 8px;
+          transition: background 0.2s ease-in-out,
+            border-color 0.2s ease-in-out;
+        }
+        :host([hidden]) {
+          display: none;
+        }
+        :host([expanded]) {
+          /* Expand the drag and drop area when a file is being dragged. */
+          min-height: 120px;
+        }
+        :host([highlighted]) {
+          border-color: var(--chops-primary-accent-color);
+          background: var(--chops-active-choice-bg);
+        }
+        input[type="file"] {
+          /* We need the file uploader to be hidden but still accessible. */
+          opacity: 0;
+          width: 0;
+          height: 0;
+          position: absolute;
+          top: -9999;
+          left: -9999;
+        }
+        input[type="file"]:focus + label {
+          /* TODO(zhangtiff): Find a way to either mimic native browser focus
+           * styles or make focus styles more consistent. */
+          box-shadow: 0 0 3px 1px hsl(193, 82%, 63%);
+        }
+        label.button {
+          margin-right: 8px;
+          padding: 0.1em 4px;
+          display: inline-flex;
+          width: auto;
+          cursor: pointer;
+          border: var(--chops-normal-border);
+          margin-left: 0;
+        }
+        label.button i.material-icons {
+          font-size: var(--chops-icon-font-size);
+        }
+        ul {
+          display: flex;
+          align-items: flex-start;
+          justify-content: flex-start;
+          flex-direction: column;
+        }
+        ul[hidden] {
+          display: none;
+        }
+        li {
+          display: inline-flex;
+          align-items: center;
+        }
+        li i.material-icons {
+          font-size: 14px;
+          margin: 0;
+        }
+        /* TODO(zhangtiff): Create a shared Material icon button component. */
+        button {
+          border-radius: 50%;
+          cursor: pointer;
+          background: 0;
+          border: 0;
+          padding: 0.25em;
+          margin-left: 4px;
+          display: inline-flex;
+          align-items: center;
+          justify-content: center;
+          transition: background 0.2s ease-in-out;
+        }
+        button:hover {
+          background: var(--chops-gray-200);
+        }
+        .controls {
+          display: flex;
+          flex-direction: row;
+          align-items: center;
+          justify-content: flex-start;
+          width: 100%;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
+            rel="stylesheet">
+      <div class="controls">
+        <input id="file-uploader" type="file" multiple @change=${this._filesChanged}>
+        <label class="button" for="file-uploader">
+          <i class="material-icons" role="presentation">attach_file</i>Add attachments
+        </label>
+        Drop files here to add them (Max: 10.0 MB per comment)
+      </div>
+      <ul ?hidden=${!this.files || !this.files.length}>
+        ${this.files.map((file, i) => html`
+          <li>
+            ${file.name}
+            <button data-index=${i} @click=${this._removeFile}>
+              <i class="material-icons">clear</i>
+            </button>
+          </li>
+        `)}
+      </ul>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      files: {type: Array},
+      highlighted: {
+        type: Boolean,
+        reflect: true,
+      },
+      expanded: {
+        type: Boolean,
+        reflect: true,
+      },
+      _boundOnDragIntoWindow: {type: Object},
+      _boundOnDragOutOfWindow: {type: Object},
+      _boundOnDragInto: {type: Object},
+      _boundOnDragLeave: {type: Object},
+      _boundOnDrop: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this.expanded = false;
+    this.highlighted = false;
+    this.files = [];
+    this._boundOnDragIntoWindow = this._onDragIntoWindow.bind(this);
+    this._boundOnDragOutOfWindow = this._onDragOutOfWindow.bind(this);
+    this._boundOnDragInto = this._onDragInto.bind(this);
+    this._boundOnDragLeave = this._onDragLeave.bind(this);
+    this._boundOnDrop = this._onDrop.bind(this);
+  }
+
+  /** @override */
+  connectedCallback() {
+    super.connectedCallback();
+    this.addEventListener('dragenter', this._boundOnDragInto);
+    this.addEventListener('dragover', this._boundOnDragInto);
+
+    this.addEventListener('dragleave', this._boundOnDragLeave);
+    this.addEventListener('drop', this._boundOnDrop);
+
+    window.addEventListener('dragenter', this._boundOnDragIntoWindow);
+    window.addEventListener('dragover', this._boundOnDragIntoWindow);
+    window.addEventListener('dragleave', this._boundOnDragOutOfWindow);
+    window.addEventListener('drop', this._boundOnDragOutOfWindow);
+  }
+
+  /** @override */
+  disconnectedCallback() {
+    super.disconnectedCallback();
+
+    window.removeEventListener('dragenter', this._boundOnDragIntoWindow);
+    window.removeEventListener('dragover', this._boundOnDragIntoWindow);
+    window.removeEventListener('dragleave', this._boundOnDragOutOfWindow);
+    window.removeEventListener('drop', this._boundOnDragOutOfWindow);
+  }
+
+  reset() {
+    this.files = [];
+  }
+
+  get hasAttachments() {
+    return this.files.length !== 0;
+  }
+
+  async loadFiles() {
+    // TODO(zhangtiff): Add preloading of files on change.
+    if (!this.files || !this.files.length) return [];
+    const loads = this.files.map(this._loadLocalFile);
+    return await Promise.all(loads);
+  }
+
+  _onDragInto(e) {
+    // Combined event handler for dragenter and dragover.
+    if (!this._eventGetFiles(e).length) return;
+    e.preventDefault();
+    this.highlighted = true;
+  }
+
+  _onDragLeave(e) {
+    // Unhighlight the drop area when the user undrops the component.
+    if (!this._eventGetFiles(e).length) return;
+    e.preventDefault();
+    this.highlighted = false;
+  }
+
+  _onDrop(e) {
+    // Add the files the user is dragging when dragging into the component.
+    const files = this._eventGetFiles(e);
+    if (!files.length) return;
+    e.preventDefault();
+    this.highlighted = false;
+    this._addFiles(files);
+  }
+
+  _onDragIntoWindow(e) {
+    // Expand the drop area when any file is being dragged in the window.
+    if (!this._eventGetFiles(e).length) return;
+    e.preventDefault();
+    this.expanded = true;
+  }
+
+  _onDragOutOfWindow(e) {
+    // Unexpand the component when a file is no longer being dragged.
+    if (!this._eventGetFiles(e).length) return;
+    e.preventDefault();
+    this.expanded = false;
+  }
+
+  _eventGetFiles(e) {
+    if (!e || !e.dataTransfer) return [];
+    const dt = e.dataTransfer;
+
+    if (dt.items && dt.items.length) {
+      const filteredItems = [...dt.items].filter(
+          (item) => item.kind === 'file');
+      return filteredItems.map((item) => item.getAsFile());
+    }
+
+    return [...dt.files];
+  }
+
+  _loadLocalFile(f) {
+    // The FileReader API only accepts callbacks for asynchronous handling,
+    // so it's easier to use Promises here. But by wrapping this logic
+    // in a Promise, we can use async/await in outer code.
+    return new Promise((resolve, reject) => {
+      const r = new FileReader();
+      r.onloadend = () => {
+        resolve({filename: f.name, content: btoa(r.result)});
+      };
+      r.onerror = () => {
+        reject(r.error);
+      };
+
+      r.readAsBinaryString(f);
+    });
+  }
+
+  /**
+   * @param {Event} e
+   * @fires CustomEvent#change
+   * @private
+   */
+  _filesChanged(e) {
+    const input = e.currentTarget;
+    if (!input.files) return;
+    this._addFiles(input.files);
+    this.dispatchEvent(new CustomEvent('change'));
+  }
+
+  _addFiles(newFiles) {
+    if (!newFiles) return;
+    // Spread files to convert it from a FileList to an Array.
+    const files = [...newFiles].filter((f1) => {
+      const matchingFile = this.files.some((f2) => this._filesMatch(f1, f2));
+      return !matchingFile;
+    });
+
+    this.files = this.files.concat(files);
+  }
+
+  _filesMatch(a, b) {
+    // NOTE: This function could return a false positive if two files have the
+    // exact same name, lastModified time, size, and type but different
+    // content. This is extremely unlikely, however.
+    return a.name === b.name && a.lastModified === b.lastModified &&
+      a.size === b.size && a.type === b.type;
+  }
+
+  _removeFile(e) {
+    const target = e.currentTarget;
+
+    // This should always be an int.
+    const index = Number.parseInt(target.dataset.index);
+    if (index < 0 || index >= this.files.length) return;
+
+    this.files.splice(index, 1);
+
+    // Trigger an update.
+    this.files = [...this.files];
+  }
+}
+customElements.define('mr-upload', MrUpload);
diff --git a/static_src/elements/framework/mr-upload/mr-upload.test.js b/static_src/elements/framework/mr-upload/mr-upload.test.js
new file mode 100644
index 0000000..0a0b1e8
--- /dev/null
+++ b/static_src/elements/framework/mr-upload/mr-upload.test.js
@@ -0,0 +1,218 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrUpload} from './mr-upload.js';
+
+let element;
+let preventDefault;
+let mockEvent;
+
+
+describe('mr-upload', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-upload');
+    document.body.appendChild(element);
+
+    preventDefault = sinon.stub();
+
+    mockEvent = (properties) => {
+      return Object.assign({
+        preventDefault: preventDefault,
+      }, properties);
+    };
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrUpload);
+  });
+
+  it('reset clears files', () => {
+    element.files = [new File([''], 'filename.txt'), new File([''], 'hello')];
+
+    element.reset();
+
+    assert.deepEqual(element.files, []);
+  });
+
+  it('editing file selector adds files', () => {
+    const files = [
+      new File([''], 'filename.txt'),
+      new File([''], 'hello'),
+    ];
+    assert.deepEqual(element.files, []);
+
+    // NOTE: There is currently no way to use JavaScript to set the value of
+    // an HTML file input.
+
+    element._filesChanged({
+      currentTarget: {
+        files: files,
+      },
+    });
+
+    assert.deepEqual(element.files, files);
+  });
+
+  it('files are rendered', async () => {
+    element.files = [
+      new File([''], 'filename.txt'),
+      new File([''], 'hello'),
+      new File([''], 'file.png'),
+    ];
+
+    await element.updateComplete;
+
+    const items = element.shadowRoot.querySelectorAll('li');
+
+    assert.equal(items.length, 3);
+
+    assert.include(items[0].textContent, 'filename.txt');
+    assert.include(items[1].textContent, 'hello');
+    assert.include(items[2].textContent, 'file.png');
+  });
+
+  it('clicking removes file', async () => {
+    element.files = [
+      new File([''], 'filename.txt'),
+      new File([''], 'hello'),
+      new File([''], 'file.png'),
+    ];
+
+    await element.updateComplete;
+
+    let items = element.shadowRoot.querySelectorAll('li');
+
+    assert.equal(items.length, 3);
+
+    items[1].querySelector('button').click();
+
+    await element.updateComplete;
+
+    items = element.shadowRoot.querySelectorAll('li');
+
+    assert.equal(items.length, 2);
+
+    assert.include(items[0].textContent, 'filename.txt');
+    assert.include(items[1].textContent, 'file.png');
+
+    // Make sure clicking works even for children targets.
+    items[0].querySelector('i.material-icons').click();
+
+    await element.updateComplete;
+
+    items = element.shadowRoot.querySelectorAll('li');
+
+    assert.equal(items.length, 1);
+
+    assert.include(items[0].textContent, 'file.png');
+  });
+
+  it('duplicate files are ignored', () => {
+    const file1 = new File([''], 'filename.txt');
+    const file2 = new File([''], 'woahhh');
+    const file3 = new File([''], 'filename');
+
+    element.files = [file1, file2];
+
+    element._addFiles([file2, file3]);
+
+    assert.deepEqual(element.files, [file1, file2, file3]);
+  });
+
+  it('dragging file into window expands element', () => {
+    assert.isFalse(element.expanded);
+    assert.deepEqual(element.files, []);
+
+    element._onDragIntoWindow(mockEvent({dataTransfer: {files: [
+      new File([''], 'filename.txt'),
+      new File([''], 'hello'),
+    ]}}));
+
+    assert.isTrue(element.expanded);
+    assert.deepEqual(element.files, []);
+    assert.isTrue(preventDefault.calledOnce);
+
+    element._onDragOutOfWindow(mockEvent({dataTransfer: {files: [
+      new File([''], 'filename.txt'),
+      new File([''], 'hello'),
+    ]}}));
+
+    assert.isFalse(element.expanded);
+    assert.deepEqual(element.files, []);
+    assert.isTrue(preventDefault.calledTwice);
+  });
+
+  it('dragging non-file into window does not expands element', () => {
+    assert.isFalse(element.expanded);
+
+    element._onDragIntoWindow(mockEvent(
+        {dataTransfer: {files: [], items: [{kind: 'notFile'}]}},
+    ));
+
+    assert.isFalse(element.expanded);
+    assert.isFalse(preventDefault.called);
+
+    element._onDragOutOfWindow(mockEvent(
+        {dataTransfer: {files: [], items: [{kind: 'notFile'}]}},
+    ));
+
+    assert.isFalse(element.expanded);
+    assert.isFalse(preventDefault.called);
+  });
+
+  it('dragging file over element highlights it', () => {
+    assert.isFalse(element.highlighted);
+    assert.deepEqual(element.files, []);
+
+    element._onDragInto(mockEvent({dataTransfer: {files: [
+      new File([''], 'filename.txt'),
+      new File([''], 'hello'),
+    ]}}));
+
+    assert.isTrue(element.highlighted);
+    assert.deepEqual(element.files, []);
+    assert.isTrue(preventDefault.calledOnce);
+
+    element._onDragLeave(mockEvent({dataTransfer: {files: [
+      new File([''], 'filename.txt'),
+      new File([''], 'hello'),
+    ]}}));
+
+    assert.isFalse(element.highlighted);
+    assert.deepEqual(element.files, []);
+    assert.isTrue(preventDefault.calledTwice);
+  });
+
+  it('dropping file over element selects it', () => {
+    const files = [
+      new File([''], 'filename.txt'),
+      new File([''], 'hello'),
+    ];
+    assert.deepEqual(element.files, []);
+
+    element._onDrop(mockEvent({dataTransfer: {files: files}}));
+
+    assert.isTrue(preventDefault.calledOnce);
+    assert.deepEqual(element.files, files);
+  });
+
+  it('loadFiles loads files', async () => {
+    element.files = [
+      new File(['some content'], 'filename.txt'),
+      new File([''], 'hello'),
+    ];
+
+    const uploads = await element.loadFiles();
+
+    assert.deepEqual(uploads, [
+      {content: 'c29tZSBjb250ZW50', filename: 'filename.txt'},
+      {content: '', filename: 'hello'},
+    ]);
+  });
+});
diff --git a/static_src/elements/framework/mr-warning/mr-warning.js b/static_src/elements/framework/mr-warning/mr-warning.js
new file mode 100644
index 0000000..51de376
--- /dev/null
+++ b/static_src/elements/framework/mr-warning/mr-warning.js
@@ -0,0 +1,51 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+
+/**
+ * `<mr-warning>`
+ *
+ * A container for showing warnings.
+ *
+ */
+export class MrWarning extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: flex;
+        align-items: center;
+        flex-direction: row;
+        justify-content: flex-start;
+        box-sizing: border-box;
+        width: 100%;
+        margin: 0.5em 0;
+        padding: 0.25em 8px;
+        border: 1px solid #FF6F00;
+        border-radius: 4px;
+        background: #FFF8E1;
+      }
+      :host([hidden]) {
+        display: none;
+      }
+      i.material-icons {
+        color: #FF6F00;
+        margin-right: 4px;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <i class="material-icons">warning</i>
+      <slot></slot>
+    `;
+  }
+}
+
+customElements.define('mr-warning', MrWarning);
diff --git a/static_src/elements/help/mr-click-throughs/mr-click-throughs.js b/static_src/elements/help/mr-click-throughs/mr-click-throughs.js
new file mode 100644
index 0000000..8b142f0
--- /dev/null
+++ b/static_src/elements/help/mr-click-throughs/mr-click-throughs.js
@@ -0,0 +1,185 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import {store, connectStore} from 'reducers/base.js';
+import * as userV0 from 'reducers/userV0.js';
+import 'elements/chops/chops-button/chops-button.js';
+import 'elements/chops/chops-dialog/chops-dialog.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+/**
+ * `<mr-click-throughs>`
+ *
+ * An element that displays help dialogs that the user is required
+ * to click through before they can participate in the community.
+ *
+ */
+export class MrClickThroughs extends connectStore(LitElement) {
+  /** @override */
+  constructor() {
+    super();
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      userDisplayName: {type: String},
+      prefs: {type: Object},
+      prefsLoaded: {type: Boolean},
+    };
+  }
+
+  /** @override */
+  static get styles() {
+    return [SHARED_STYLES, css`
+      :host {
+        --chops-dialog-max-width: 800px;
+      }
+      h2 {
+        margin-top: 0;
+        display: flex;
+        justify-content: space-between;
+        font-weight: normal;
+        border-bottom: 2px solid white;
+        font-size: var(--chops-large-font-size);
+        padding-bottom: 0.5em;
+      }
+      .edit-actions {
+        width: 100%;
+        margin: 0.5em 0;
+        text-align: right;
+      }
+    `];
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <chops-dialog
+        id="privacyDialog"
+        ?opened=${this._showPrivacyDialog}
+        forced
+      >
+        <h2>Email display settings</h2>
+
+        <p>There is a <a href="/hosting/settings">setting</a> to control how
+        your email address appears on comments and issues that you post.</p>
+
+        <p>Project members will always see your full email address.  By
+        default, other users who visit the site will see an
+        abbreviated version of your email address.</p>
+
+        <p>If you do not wish your email address to be shared, there
+        are other ways to <a
+        href="http://www.chromium.org/getting-involved">get
+        involved</a> in the community.  To report a problem when using
+        the Chrome browser, you may use the "Report an issue..."  item
+        on the "Help" menu.</p>
+
+
+        <div class="edit-actions">
+          <chops-button @click=${this.dismissPrivacyDialog}>
+            Got it
+          </chops-button>
+        </div>
+      </chops-dialog>
+
+      <chops-dialog
+        id="corpModeDialog"
+        ?opened=${this._showCorpModeDialog}
+        forced
+      >
+        <h2>This site hosts public issues in public projects</h2>
+
+        <p>Unlike our internal issue tracker, this site makes most
+        issues public, unless the issue is labeled with a Restrict-View-*
+        label, such as Restrict-View-Google.</p>
+
+        <p>Components are not used for permissions.  And, regardless of
+        restriction labels, the issue reporter, owner,
+        and Cc&apos;d users may always view the issue.</p>
+
+        ${this.prefs.get('restrict_new_issues') ? html`
+          <p>Your account is a member of a user group that indicates that
+          you may have access to confidential information.  To help prevent
+          leaks when working in public projects, the issue tracker UX has
+          been altered for you:</p>
+
+          <ul>
+            <li>When you open a new issue, the form will initially have a
+            Restrict-View-Google label.  If you know that your issue does
+            not contain confidential information, please remove the label.</li>
+            <li>When you view public issues, a red banner is shown to remind
+            you that any comments or attachments you post will be public.</li>
+          </ul>
+        ` : ''}
+
+        <div class="edit-actions">
+          <chops-button @click=${this.dismissCorpModeDialog}>
+            Got it
+          </chops-button>
+        </div>
+      </chops-dialog>
+    `;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.prefs = userV0.prefs(state);
+    this.prefsLoaded = userV0.currentUser(state).prefsLoaded;
+  }
+
+  /**
+   * Checks whether the user should see a dialogue telling them about
+   * Monorail's privacy settings.
+   */
+  get _showPrivacyDialog() {
+    if (!this.userDisplayName) return false;
+    if (!this.prefsLoaded) return false;
+    if (!this.prefs) return false;
+    if (this.prefs.get('privacy_click_through')) return false;
+    return true;
+  }
+
+  /**
+   * Computes whether the user should see the dialog telling them about corp mode.
+   */
+  get _showCorpModeDialog() {
+    // TODO(jrobbins): Replace this with a API call that gets the project.
+    if (window.CS_env.projectIsRestricted) return false;
+    if (!this.userDisplayName) return false;
+    if (!this.prefsLoaded) return false;
+    if (!this.prefs) return false;
+    if (!this.prefs.get('public_issue_notice')) return false;
+    if (this.prefs.get('corp_mode_click_through')) return false;
+    return true;
+  }
+
+  /**
+   * Event handler for dismissing Monorail's privacy notice.
+   */
+  dismissPrivacyDialog() {
+    this.dismissCue('privacy_click_through');
+  }
+
+  /**
+   * Event handler for dismissing corp mode.
+   */
+  dismissCorpModeDialog() {
+    this.dismissCue('corp_mode_click_through');
+  }
+
+  /**
+   * Dispatches a Redux action to tell Monorail's backend that the user
+   * clicked through a particular cue.
+   * @param {string} pref The pref to set to true.
+   */
+  dismissCue(pref) {
+    const newPrefs = [{name: pref, value: 'true'}];
+    store.dispatch(userV0.setPrefs(newPrefs, !!this.userDisplayName));
+  }
+}
+
+customElements.define('mr-click-throughs', MrClickThroughs);
diff --git a/static_src/elements/help/mr-click-throughs/mr-click-throughs.test.js b/static_src/elements/help/mr-click-throughs/mr-click-throughs.test.js
new file mode 100644
index 0000000..e735380
--- /dev/null
+++ b/static_src/elements/help/mr-click-throughs/mr-click-throughs.test.js
@@ -0,0 +1,120 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrClickThroughs} from './mr-click-throughs.js';
+import page from 'page';
+
+let element;
+
+describe('mr-click-throughs', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-click-throughs');
+    document.body.appendChild(element);
+
+    sinon.stub(page, 'call');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+
+    page.call.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrClickThroughs);
+  });
+
+  it('stateChanged', () => {
+    const state = {userV0: {currentUser:
+      {prefs: new Map(), prefsLoaded: false}}};
+    element.stateChanged(state);
+    assert.deepEqual(element.prefs, new Map([['render_markdown', false]]));
+    assert.isFalse(element.prefsLoaded);
+  });
+
+  it('anon does not see privacy dialog', () => {
+    assert.isFalse(element._showPrivacyDialog);
+  });
+
+  it('signed in user sees no privacy dialog before prefs load', () => {
+    element.userDisplayName = 'user@example.com';
+    element.prefsLoaded = false;
+    assert.isFalse(element._showPrivacyDialog);
+  });
+
+  it('signed in user sees no privacy dialog if dismissal pref set', () => {
+    element.userDisplayName = 'user@example.com';
+    element.prefsLoaded = true;
+    element.prefs = new Map([['privacy_click_through', true]]);
+    assert.isFalse(element._showPrivacyDialog);
+  });
+
+  it('signed in user sees privacy dialog if dismissal pref missing', () => {
+    element.userDisplayName = 'user@example.com';
+    element.prefsLoaded = true;
+    element.prefs = new Map();
+    assert.isTrue(element._showPrivacyDialog);
+  });
+
+  it('anon does not see corp mode dialog', () => {
+    assert.isFalse(element._showCorpModeDialog);
+  });
+
+  it('signed in user sees no corp mode dialog before prefs load', () => {
+    element.userDisplayName = 'user@example.com';
+    element.prefsLoaded = false;
+    assert.isFalse(element._showCorpModeDialog);
+  });
+
+  it('signed in user sees no corp mode dialog if dismissal pref set', () => {
+    element.userDisplayName = 'user@example.com';
+    element.prefsLoaded = true;
+    element.prefs = new Map([['corp_mode_click_through', true]]);
+    assert.isFalse(element._showCorpModeDialog);
+  });
+
+  it('non-corp user sees no corp mode dialog', () => {
+    element.userDisplayName = 'user@example.com';
+    element.prefsLoaded = true;
+    element.prefs = new Map();
+    assert.isFalse(element._showCorpModeDialog);
+  });
+
+  it('corp user sees corp mode dialog if dismissal pref missing', () => {
+    element.userDisplayName = 'user@example.com';
+    element.prefsLoaded = true;
+    element.prefs = new Map([['public_issue_notice', true]]);
+    assert.isTrue(element._showCorpModeDialog);
+  });
+
+  it('corp user sees no corp mode dialog in members-only project', () => {
+    window.CS_env = {projectIsRestricted: true};
+    element.userDisplayName = 'user@example.com';
+    element.prefsLoaded = true;
+    element.prefs = new Map([['public_issue_notice', true]]);
+    assert.isFalse(element._showCorpModeDialog);
+  });
+
+  it('corp user sees corp mode dialog with no RVG warning', async () => {
+    element.userDisplayName = 'user@example.com';
+    element.prefsLoaded = true;
+    element.prefs = new Map([['public_issue_notice', true]]);
+
+    await element.updateComplete;
+    assert.notInclude(element.shadowRoot.innerHTML, 'altered');
+  });
+
+  it('corp user sees corp mode dialog with RVG warning', async () => {
+    element.userDisplayName = 'user@example.com';
+    element.prefsLoaded = true;
+    element.prefs = new Map([
+      ['public_issue_notice', true],
+      ['restrict_new_issues', true],
+    ]);
+
+    await element.updateComplete;
+    assert.include(element.shadowRoot.innerHTML, 'altered');
+  });
+});
diff --git a/static_src/elements/help/mr-cue/cue-helpers.js b/static_src/elements/help/mr-cue/cue-helpers.js
new file mode 100644
index 0000000..4aa30d7
--- /dev/null
+++ b/static_src/elements/help/mr-cue/cue-helpers.js
@@ -0,0 +1,49 @@
+// Copyright 2019 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.
+
+/**
+ * @fileoverview Shared helpers for dealing with how <mr-cue> element instances
+ * are used.
+ */
+
+export const cueNames = Object.freeze({
+  CODE_OF_CONDUCT: 'code_of_conduct',
+  AVAILABILITY_MSGS: 'availability_msgs',
+  SWITCH_TO_PARENT_ACCOUNT: 'switch_to_parent_account',
+  SEARCH_FOR_NUMBERS: 'search_for_numbers',
+});
+
+export const AVAILABLE_CUES = Object.freeze(new Set(Object.values(cueNames)));
+
+export const CUE_DISPLAY_PREFIX = 'cue.';
+
+/**
+ * Converts a cue name to the format expected by components like <mr-metadata>
+ * for the purpose of ordering fields.
+ *
+ * @param {string} cueName The name of the cue.
+ * @return {string} A "cue.cue_name" formatted String used in ordering cues
+ *   alongside field types (ie: Owner) in various field specs.
+ */
+export const cueNameToSpec = (cueName) => {
+  return CUE_DISPLAY_PREFIX + cueName;
+};
+
+/**
+ * Converts an issue field specifier to the name of the cue it references if
+ * it references a cue. ie: "cue.cue_name" would reference "cue_name".
+ *
+ * @param {string} spec A "cue.cue_name" format String specifying that a
+ *   specific cue should be mixed alongside issue fields in a component like
+ *   <mr-metadata>.
+ * @return {string} Name of the cue customized in the spec or an empty
+ *   String if the spec does not reference a cue.
+ */
+export const specToCueName = (spec) => {
+  spec = spec.toLowerCase();
+  if (spec.startsWith(CUE_DISPLAY_PREFIX)) {
+    return spec.substring(CUE_DISPLAY_PREFIX.length);
+  }
+  return '';
+};
diff --git a/static_src/elements/help/mr-cue/cue-helpers.test.js b/static_src/elements/help/mr-cue/cue-helpers.test.js
new file mode 100644
index 0000000..3bc084a
--- /dev/null
+++ b/static_src/elements/help/mr-cue/cue-helpers.test.js
@@ -0,0 +1,30 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {cueNameToSpec, specToCueName} from './cue-helpers.js';
+
+
+describe('cue-helpers', () => {
+  describe('cueNameToSpec', () => {
+    it('appends cue prefix', () => {
+      assert.equal(cueNameToSpec('test'), 'cue.test');
+    });
+  });
+
+  describe('specToCueName', () => {
+    it('extracts cue name from matching spec', () => {
+      assert.equal(specToCueName('cue.test'), 'test');
+      assert.equal(specToCueName('cue.hello-world'), 'hello-world');
+      assert.equal(specToCueName('cue.under_score'), 'under_score');
+    });
+
+    it('does not extract cue name from non-matching spec', () => {
+      assert.equal(specToCueName('.cue.test'), '');
+      assert.equal(specToCueName('hello-world-cue.'), '');
+      assert.equal(specToCueName('cu.under_score'), '');
+      assert.equal(specToCueName('field'), '');
+    });
+  });
+});
diff --git a/static_src/elements/help/mr-cue/mr-cue.js b/static_src/elements/help/mr-cue/mr-cue.js
new file mode 100644
index 0000000..22b1290
--- /dev/null
+++ b/static_src/elements/help/mr-cue/mr-cue.js
@@ -0,0 +1,282 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import qs from 'qs';
+import {store, connectStore} from 'reducers/base.js';
+import * as userV0 from 'reducers/userV0.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import 'elements/chops/chops-button/chops-button.js';
+import 'elements/chops/chops-dialog/chops-dialog.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import {cueNames} from './cue-helpers.js';
+
+
+/**
+ * `<mr-cue>`
+ *
+ * An element that displays one of a set of predefined help messages
+ * iff that message is appropriate to the current user and page.
+ *
+ * TODO: Factor this class out into a base view component and separate
+ * usage-specific components, such as those for user prefs.
+ *
+ */
+export class MrCue extends connectStore(LitElement) {
+  /** @override */
+  constructor() {
+    super();
+    this.prefs = new Map();
+    this.issue = null;
+    this.referencedUsers = new Map();
+    this.nondismissible = false;
+    this.cuePrefName = '';
+    this.loginUrl = '';
+    this.hidden = this._shouldBeHidden(this.signedIn, this.prefsLoaded,
+        this.cuePrefName, this.message);
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      issue: {type: Object},
+      referencedUsers: {type: Object},
+      user: {type: Object},
+      cuePrefName: {type: String},
+      nondismissible: {type: Boolean},
+      prefs: {type: Object},
+      prefsLoaded: {type: Boolean},
+      jumpLocalId: {type: Number},
+      loginUrl: {type: String},
+      hidden: {
+        type: Boolean,
+        reflect: true,
+      },
+    };
+  }
+
+  /** @override */
+  static get styles() {
+    return [SHARED_STYLES, css`
+      :host {
+        display: block;
+        margin: 2px 0;
+        padding: 2px 4px 2px 8px;
+        background: var(--chops-notice-bubble-bg);
+        border: var(--chops-notice-border);
+        text-align: center;
+      }
+      :host([centered]) {
+        display: flex;
+        justify-content: center;
+      }
+      :host([hidden]) {
+        display: none;
+      }
+      button[hidden] {
+        visibility: hidden;
+      }
+      i.material-icons {
+        font-size: 14px;
+      }
+      button {
+        background: none;
+        border: none;
+        float: right;
+        padding: 2px;
+        cursor: pointer;
+        border-radius: 50%;
+        display: inline-flex;
+        align-items: center;
+        justify-content: center;
+      }
+      button:hover {
+        background: rgba(0, 0, 0, .2);
+      }
+    `];
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <button
+        @click=${this.dismiss}
+        title="Don't show this message again."
+        ?hidden=${this.nondismissible}>
+        <i class="material-icons">close</i>
+      </button>
+      <div id="message">${this.message}</div>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult} lit-html template for the cue message a user
+   * should see.
+   */
+  get message() {
+    if (this.cuePrefName === cueNames.CODE_OF_CONDUCT) {
+      return html`
+        Please keep discussions respectful and constructive.
+        See our
+        <a href="${this.codeOfConductUrl}"
+           target="_blank">code of conduct</a>.
+        `;
+    } else if (this.cuePrefName === cueNames.AVAILABILITY_MSGS) {
+      if (this._availablityMsgsRelevant(this.issue)) {
+        return html`
+          <b>Note:</b>
+          Clock icons indicate that users may not be available.
+          Tooltips show the reason.
+          `;
+      }
+    } else if (this.cuePrefName === cueNames.SWITCH_TO_PARENT_ACCOUNT) {
+      if (this._switchToParentAccountRelevant()) {
+        return html`
+          You are signed in to a linked account.
+          <a href="${this.loginUrl}">
+             Switch to ${this.user.linkedParentRef.displayName}</a>.
+          `;
+      }
+    } else if (this.cuePrefName === cueNames.SEARCH_FOR_NUMBERS) {
+      if (this._searchForNumbersRelevant(this.jumpLocalId)) {
+        return html`
+          <b>Tip:</b>
+          To find issues containing "${this.jumpLocalId}", use quotes.
+          `;
+      }
+    }
+    return;
+  }
+
+  /**
+  * Conditionally returns a hardcoded code of conduct URL for
+  * different projects.
+  * @return {string} the URL for the code of conduct.
+   */
+  get codeOfConductUrl() {
+    // TODO(jrobbins): Store this in the DB and pass it via the API.
+    if (this.projectName === 'fuchsia') {
+      return 'https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT';
+    }
+    return ('https://chromium.googlesource.com/' +
+            'chromium/src/+/main/CODE_OF_CONDUCT.md');
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    const hiddenWatchProps = ['prefsLoaded', 'cuePrefName', 'signedIn',
+      'prefs'];
+    const shouldUpdateHidden = Array.from(changedProperties.keys())
+        .some((propName) => hiddenWatchProps.includes(propName));
+    if (shouldUpdateHidden) {
+      this.hidden = this._shouldBeHidden(this.signedIn, this.prefsLoaded,
+          this.cuePrefName, this.message);
+    }
+  }
+
+  /**
+   * Checks if there are any unavailable users and only displays this cue if so.
+   * @param {Issue} issue
+   * @return {boolean} Whether the User Availability cue should be
+   *   displayed or not.
+   */
+  _availablityMsgsRelevant(issue) {
+    if (!issue) return false;
+    return (this._anyUnvailable([issue.ownerRef]) ||
+            this._anyUnvailable(issue.ccRefs));
+  }
+
+  /**
+   * Checks if a given list of users contains any unavailable users.
+   * @param {Array<UserRef>} userRefList
+   * @return {boolean} Whether there are unavailable users.
+   */
+  _anyUnvailable(userRefList) {
+    if (!userRefList) return false;
+    for (const userRef of userRefList) {
+      if (userRef) {
+        const participant = this.referencedUsers.get(userRef.displayName);
+        if (participant && participant.availability) return true;
+      }
+    }
+  }
+
+  /**
+   * Finds if the user has a linked parent account that's separate from the
+   * one they are logged into and conditionally hides the cue if so.
+   * @return {boolean} Whether to show the cue to switch to a parent account.
+   */
+  _switchToParentAccountRelevant() {
+    return this.user && this.user.linkedParentRef;
+  }
+
+  /**
+   * Determines whether the user should see a cue telling them how to avoid the
+   * "jump to issue" feature.
+   * @param {number} jumpLocalId the ID of the issue the user jumped to.
+   * @return {boolean} Whether the user jumped to a number or not.
+   */
+  _searchForNumbersRelevant(jumpLocalId) {
+    return !!jumpLocalId;
+  }
+
+  /**
+   * Checks the user's preferences to hide a particular cue if they have
+   * dismissed it.
+   * @param {boolean} signedIn Whether the user is signed in.
+   * @param {boolean} prefsLoaded Whether the user's prefs have been fetched
+   *   from the API.
+   * @param {string} cuePrefName The name of the cue being checked.
+   * @param {string} message
+   * @return {boolean} Whether the cue should be hidden.
+   */
+  _shouldBeHidden(signedIn, prefsLoaded, cuePrefName, message) {
+    if (signedIn && !prefsLoaded) return true;
+    if (this.alreadyDismissed(cuePrefName)) return true;
+    return !message;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.projectName = projectV0.viewedProjectName(state);
+    this.issue = issueV0.viewedIssue(state);
+    this.referencedUsers = issueV0.referencedUsers(state);
+    this.user = userV0.currentUser(state);
+    this.prefs = userV0.prefs(state);
+    this.signedIn = this.user && this.user.userId;
+    this.prefsLoaded = userV0.currentUser(state).prefsLoaded;
+
+    const queryString = window.location.search.substring(1);
+    const queryParams = qs.parse(queryString);
+    const q = queryParams.q;
+    if (q && q.match(new RegExp('^\\d+$'))) {
+      this.jumpLocalId = Number(q);
+    }
+  }
+
+  /**
+   * Check whether a cue has already been dismissed in a user's
+   * preferences.
+   * @param {string} pref The name of the user preference to check.
+   * @return {boolean} Whether the cue was dismissed or not.
+   */
+  alreadyDismissed(pref) {
+    return this.prefs && this.prefs.get(pref);
+  }
+
+  /**
+   * Sends a request to the API to save that a user has dismissed a cue.
+   * The results of this request update Redux's state, which leads to
+   * the cue disappearing for the user after the request finishes.
+   * @return {void}
+   */
+  dismiss() {
+    const newPrefs = [{name: this.cuePrefName, value: 'true'}];
+    store.dispatch(userV0.setPrefs(newPrefs, this.signedIn));
+  }
+}
+
+customElements.define('mr-cue', MrCue);
diff --git a/static_src/elements/help/mr-cue/mr-cue.test.js b/static_src/elements/help/mr-cue/mr-cue.test.js
new file mode 100644
index 0000000..2722076
--- /dev/null
+++ b/static_src/elements/help/mr-cue/mr-cue.test.js
@@ -0,0 +1,177 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrCue} from './mr-cue.js';
+import page from 'page';
+import {rootReducer} from 'reducers/base.js';
+
+let element;
+
+describe('mr-cue', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-cue');
+    document.body.appendChild(element);
+
+    sinon.stub(page, 'call');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+
+    page.call.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrCue);
+  });
+
+  it('stateChanged', () => {
+    const state = rootReducer({
+      userV0: {currentUser: {prefs: new Map(), prefsLoaded: false}},
+    }, {});
+    element.stateChanged(state);
+    assert.deepEqual(element.prefs, new Map([['render_markdown', false]]));
+    assert.isFalse(element.prefsLoaded);
+  });
+
+  it('cues are hidden before prefs load', () => {
+    element.prefsLoaded = false;
+    assert.isTrue(element.hidden);
+  });
+
+  it('cue is hidden if user already dismissed it', () => {
+    element.prefsLoaded = true;
+    element.cuePrefName = 'code_of_conduct';
+    element.prefs = new Map([['code_of_conduct', true]]);
+    assert.isTrue(element.hidden);
+  });
+
+  it('cue is hidden if no relevent message', () => {
+    element.prefsLoaded = true;
+    element.cuePrefName = 'this_has_no_message';
+    assert.isTrue(element.hidden);
+  });
+
+  it('cue is shown if relevant message has not been dismissed', async () => {
+    element.prefsLoaded = true;
+    element.cuePrefName = 'code_of_conduct';
+
+    await element.updateComplete;
+
+    assert.isFalse(element.hidden);
+    const messageEl = element.shadowRoot.querySelector('#message');
+    assert.include(messageEl.innerHTML, 'chromium.googlesource.com');
+  });
+
+  it('code of conduct is specific to the project', async () => {
+    element.prefsLoaded = true;
+    element.cuePrefName = 'code_of_conduct';
+    element.projectName = 'fuchsia';
+
+    await element.updateComplete;
+
+    assert.isFalse(element.hidden);
+    const messageEl = element.shadowRoot.querySelector('#message');
+    assert.include(messageEl.innerHTML, 'fuchsia.dev');
+  });
+
+  it('availability cue is hidden if no relevent issue particpants', () => {
+    element.prefsLoaded = true;
+    element.cuePrefName = 'availability_msgs';
+    element.issue = {summary: 'no owners or cc'};
+    assert.isTrue(element.hidden);
+
+    element.issue = {
+      summary: 'owner and ccs have no availability msg',
+      ownerRef: {},
+      ccRefs: [{}, {}],
+    };
+    assert.isTrue(element.hidden);
+  });
+
+  it('availability cue is shown if issue particpants are unavailable',
+      async () => {
+        element.prefsLoaded = true;
+        element.cuePrefName = 'availability_msgs';
+        element.referencedUsers = new Map([
+          ['user@example.com', {availability: 'Never visited'}],
+        ]);
+
+        element.issue = {
+          summary: 'owner is unavailable',
+          ownerRef: {displayName: 'user@example.com'},
+          ccRefs: [{}, {}],
+        };
+        await element.updateComplete;
+
+        assert.isFalse(element.hidden);
+        const messageEl = element.shadowRoot.querySelector('#message');
+        assert.include(messageEl.innerText, 'Clock icons');
+
+        element.issue = {
+          summary: 'owner is unavailable',
+          ownerRef: {},
+          ccRefs: [
+            {displayName: 'ok@example.com'},
+            {displayName: 'user@example.com'}],
+        };
+        await element.updateComplete;
+        assert.isFalse(element.hidden);
+        assert.include(messageEl.innerText, 'Clock icons');
+      });
+
+  it('switch_to_parent_account cue is hidden if no linked account', () => {
+    element.prefsLoaded = true;
+    element.cuePrefName = 'switch_to_parent_account';
+
+    element.user = undefined;
+    assert.isTrue(element.hidden);
+
+    element.user = {groups: []};
+    assert.isTrue(element.hidden);
+  });
+
+  it('switch_to_parent_account is shown if user has parent account',
+      async () => {
+        element.prefsLoaded = true;
+        element.cuePrefName = 'switch_to_parent_account';
+        element.user = {linkedParentRef: {displayName: 'parent@example.com'}};
+
+        await element.updateComplete;
+        assert.isFalse(element.hidden);
+        const messageEl = element.shadowRoot.querySelector('#message');
+        assert.include(messageEl.innerText, 'a linked account');
+      });
+
+  it('search_for_numbers cue is hidden if no number was used', () => {
+    element.prefsLoaded = true;
+    element.cuePrefName = 'search_for_numbers';
+    element.issue = {};
+    element.jumpLocalId = null;
+    assert.isTrue(element.hidden);
+  });
+
+  it('search_for_numbers cue is shown if jumped to issue ID',
+      async () => {
+        element.prefsLoaded = true;
+        element.cuePrefName = 'search_for_numbers';
+        element.issue = {};
+        element.jumpLocalId = '123'.match(new RegExp('^\\d+$'));
+
+        await element.updateComplete;
+        assert.isFalse(element.hidden);
+        const messageEl = element.shadowRoot.querySelector('#message');
+        assert.include(messageEl.innerText, 'use quotes');
+      });
+
+  it('cue is dismissible unless there is attribute nondismissible',
+      async () => {
+        assert.isFalse(element.nondismissible);
+
+        element.setAttribute('nondismissible', '');
+        await element.updateComplete;
+        assert.isTrue(element.nondismissible);
+      });
+});
diff --git a/static_src/elements/help/mr-cue/mr-fed-ref-cue.js b/static_src/elements/help/mr-cue/mr-fed-ref-cue.js
new file mode 100644
index 0000000..8e8626f
--- /dev/null
+++ b/static_src/elements/help/mr-cue/mr-fed-ref-cue.js
@@ -0,0 +1,83 @@
+// Copyright 2019 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.
+
+import {html, css} from 'lit-element';
+import * as userV0 from 'reducers/userV0.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import {store} from 'reducers/base.js';
+import 'elements/chops/chops-button/chops-button.js';
+import 'elements/chops/chops-dialog/chops-dialog.js';
+import {fromShortlink, GoogleIssueTrackerIssue} from 'shared/federated.js';
+import {MrCue} from './mr-cue.js';
+
+/**
+ * `<mr-fed-ref-cue>`
+ *
+ * Displays information and login/logout links for the federated references
+ * info popup.
+ *
+ */
+export class MrFedRefCue extends MrCue {
+  /** @override */
+  static get properties() {
+    return {
+      ...MrCue.properties,
+      fedRefShortlink: {type: String},
+    };
+  }
+
+  /** @override */
+  static get styles() {
+    return [
+      ...MrCue.styles,
+      css`
+        :host {
+          margin: 0;
+          width: 120px;
+          font-size: 11px;
+        }
+      `,
+    ];
+  }
+
+  get message() {
+    const fedRef = fromShortlink(this.fedRefShortlink);
+    if (fedRef && fedRef instanceof GoogleIssueTrackerIssue) {
+      let authLink;
+      if (this.user && this.user.gapiEmail) {
+        authLink = html`
+          <br /><br />
+          <a href="#"
+            @click=${() => store.dispatch(userV0.initGapiLogout())}
+          >Sign out</a>
+          <br />
+          (for references only)
+        `;
+      } else {
+        const clickLoginHandler = async () => {
+          await store.dispatch(userV0.initGapiLogin(this.issue));
+          // Re-fetch related issues.
+          store.dispatch(issueV0.fetchRelatedIssues(this.issue));
+        };
+        authLink = html`
+          <br /><br />
+          Googlers, to enable viewing status & title,
+          <a href="#"
+            @click=${clickLoginHandler}
+            >sign in here</a> with your Google email.
+        `;
+      }
+      return html`
+        This references an issue in the ${fedRef.trackerName} issue tracker.
+        ${authLink}
+      `;
+    } else {
+      return html`
+        This references an issue in another tracker. Status not displayed.
+      `;
+    }
+  }
+}
+
+customElements.define('mr-fed-ref-cue', MrFedRefCue);
diff --git a/static_src/elements/hotlist/mr-hotlist-header/mr-hotlist-header.js b/static_src/elements/hotlist/mr-hotlist-header/mr-hotlist-header.js
new file mode 100644
index 0000000..b7087a9
--- /dev/null
+++ b/static_src/elements/hotlist/mr-hotlist-header/mr-hotlist-header.js
@@ -0,0 +1,72 @@
+// Copyright 2020 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.
+
+import {LitElement, html, css} from 'lit-element';
+import 'elements/framework/mr-tabs/mr-tabs.js';
+
+/** @type {readonly MenuItem[]} */
+const _MENU_ITEMS = Object.freeze([
+  {
+    icon: 'list',
+    text: 'Issues',
+    url: 'issues',
+  },
+  {
+    icon: 'people',
+    text: 'People',
+    url: 'people',
+  },
+  {
+    icon: 'settings',
+    text: 'Settings',
+    url: 'settings',
+  },
+]);
+
+// TODO(dtu): Put this inside <mr-header>. Currently, we can't do this because
+// the sticky table headers rely on having a fixed header height. We need to
+// add a scrolling context to the page in order to have a dynamic-height
+// sticky, and to do that the footer needs to be in the scrolling context. So,
+// the footer needs to be SPA-ified.
+/** Hotlist Issues page */
+export class MrHotlistHeader extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      h1 {
+        font-size: 20px;
+        font-weight: normal;
+        margin: 16px 24px;
+      }
+      nav {
+        border-bottom: solid #ddd 1px;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <nav>
+        <mr-tabs .items=${_MENU_ITEMS} .selected=${this.selected}></mr-tabs>
+      </nav>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      selected: {type: Number},
+    };
+  };
+
+  /** @override */
+  constructor() {
+    super();
+    /** @type {number} */
+    this.selected = 0;
+  }
+}
+
+customElements.define('mr-hotlist-header', MrHotlistHeader);
diff --git a/static_src/elements/hotlist/mr-hotlist-header/mr-hotlist-header.test.js b/static_src/elements/hotlist/mr-hotlist-header/mr-hotlist-header.test.js
new file mode 100644
index 0000000..9321d59
--- /dev/null
+++ b/static_src/elements/hotlist/mr-hotlist-header/mr-hotlist-header.test.js
@@ -0,0 +1,32 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import {MrHotlistHeader} from './mr-hotlist-header.js';
+
+/** @type {MrHotlistHeader} */
+let element;
+
+describe('mr-hotlist-header', () => {
+  beforeEach(() => {
+    // @ts-ignore
+    element = document.createElement('mr-hotlist-header');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrHotlistHeader);
+  });
+
+  it('renders', async () => {
+    element.selected = 2;
+    await element.updateComplete;
+
+    assert.equal(element.shadowRoot.querySelector('mr-tabs').selected, 2);
+  });
+});
diff --git a/static_src/elements/hotlist/mr-hotlist-issues-page/mr-hotlist-issues-page.js b/static_src/elements/hotlist/mr-hotlist-issues-page/mr-hotlist-issues-page.js
new file mode 100644
index 0000000..fa76477
--- /dev/null
+++ b/static_src/elements/hotlist/mr-hotlist-issues-page/mr-hotlist-issues-page.js
@@ -0,0 +1,361 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import {defaultMemoize} from 'reselect';
+
+import {relativeTime}
+  from 'elements/chops/chops-timestamp/chops-timestamp-helpers.js';
+import {issueNameToRef, issueToName, userNameToId}
+  from 'shared/convertersV0.js';
+import {DEFAULT_ISSUE_FIELD_LIST} from 'shared/issue-fields.js';
+
+import {store, connectStore} from 'reducers/base.js';
+import {hotlists} from 'reducers/hotlists.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as sitewide from 'reducers/sitewide.js';
+import * as ui from 'reducers/ui.js';
+
+import 'elements/chops/chops-filter-chips/chops-filter-chips.js';
+import 'elements/framework/dialogs/mr-change-columns/mr-change-columns.js';
+// eslint-disable-next-line max-len
+import 'elements/framework/dialogs/mr-issue-hotlists-action/mr-move-issue-hotlists-dialog.js';
+// eslint-disable-next-line max-len
+import 'elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.js';
+import 'elements/framework/mr-button-bar/mr-button-bar.js';
+import 'elements/framework/mr-issue-list/mr-issue-list.js';
+import 'elements/hotlist/mr-hotlist-header/mr-hotlist-header.js';
+
+const DEFAULT_HOTLIST_FIELDS = Object.freeze([
+  ...DEFAULT_ISSUE_FIELD_LIST,
+  'Added',
+  'Adder',
+  'Rank',
+]);
+
+/** Hotlist Issues page */
+export class _MrHotlistIssuesPage extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: block;
+      }
+      section, p, div {
+        margin: 16px 24px;
+      }
+      div {
+        align-items: center;
+        display: flex;
+      }
+      chops-filter-chips {
+        margin-left: 6px;
+      }
+      mr-button-bar {
+        margin: 16px 24px 8px 24px;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <mr-hotlist-header selected=0></mr-hotlist-header>
+      ${this._renderPage()}
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   */
+  _renderPage() {
+    if (!this._hotlist) {
+      if (this._fetchError) {
+        return html`<section>${this._fetchError.description}</section>`;
+      } else {
+        return html`<section>Loading...</section>`;
+      }
+    }
+
+    // Memoize the issues passed to <mr-issue-list> so that
+    // out property updates don't cause it to re-render.
+    const items = _filterIssues(this._filter, this._items);
+
+    const allProjectNamesEqual = items.length && items.every(
+        (issue) => issue.projectName === items[0].projectName);
+    const projectName = allProjectNamesEqual ? items[0].projectName : null;
+
+    /** @type {HotlistV0} */
+    // Populates <mr-update-issue-hotlists-dialog>' issueHotlists property.
+    const hotlistV0 = {
+      ownerRef: {userId: userNameToId(this._hotlist.owner)},
+      name: this._hotlist.displayName,
+    };
+
+    const mayEdit = this._permissions.includes(hotlists.ADMINISTER) ||
+                    this._permissions.includes(hotlists.EDIT);
+    // TODO(https://crbug.com/monorail/7776): The UI to allow reranking of
+    // Issues should reflect user permissions.
+
+    return html`
+      <p>${this._hotlist.summary}</p>
+
+      <div>
+        Filter by Status
+        <chops-filter-chips
+            .options=${['Open', 'Closed']}
+            .selected=${this._filter}
+            @change=${this._onFilterChange}
+        ></chops-filter-chips>
+      </div>
+
+      <mr-button-bar .items=${this._buttonBarItems()}></mr-button-bar>
+
+      <mr-issue-list
+        .issues=${items}
+        .projectName=${projectName}
+        .columns=${this._columns}
+        .defaultFields=${DEFAULT_HOTLIST_FIELDS}
+        .extractFieldValues=${this._extractFieldValues.bind(this)}
+        .rerank=${mayEdit ? this._rerankItems.bind(this) : null}
+        ?selectionEnabled=${mayEdit}
+        @selectionChange=${this._onSelectionChange}
+      ></mr-issue-list>
+
+      <mr-change-columns .columns=${this._columns}></mr-change-columns>
+      <mr-update-issue-hotlists-dialog
+        .issueRefs=${this._selected.map(issueNameToRef)}
+        .issueHotlists=${[hotlistV0]}
+        @saveSuccess=${this._handleHotlistSaveSuccess}
+      ></mr-update-issue-hotlists-dialog>
+      <mr-move-issue-hotlists-dialog
+        .issueRefs=${this._selected.map(issueNameToRef)}
+        @saveSuccess=${this._handleHotlistSaveSuccess}
+      ><mr-move-issue-hotlists-dialog>
+    `;
+  }
+
+  /**
+   * @return {Array<MenuItem>}
+   */
+  _buttonBarItems() {
+    if (this._selected.length) {
+      return [
+        {
+          icon: 'remove_circle_outline',
+          text: 'Remove',
+          handler: this._removeItems.bind(this)},
+        {
+          icon: 'edit',
+          text: 'Update',
+          handler: this._openUpdateIssuesHotlistsDialog.bind(this),
+        },
+        {
+          icon: 'forward',
+          text: 'Move to...',
+          handler: this._openMoveToHotlistDialog.bind(this),
+        },
+      ];
+    } else {
+      return [
+        // TODO(dtu): Implement this action.
+        // {icon: 'add', text: 'Add issues'},
+        {
+          icon: 'table_chart',
+          text: 'Change columns',
+          handler: this._openColumnsDialog.bind(this),
+        },
+      ];
+    }
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      // Populated from Redux.
+      _hotlist: {type: Object},
+      _permissions: {type: Array},
+      _items: {type: Array},
+      _columns: {type: Array},
+      _fetchError: {type: Object},
+      _extractFieldValuesFromIssue: {type: Object},
+
+      // Populated from events.
+      _filter: {type: Object},
+      _selected: {type: Array},
+    };
+  };
+
+  /** @override */
+  constructor() {
+    super();
+
+    // Populated from Redux.
+    /** @type {?Hotlist} */
+    this._hotlist = null;
+    /** @type {Array<Permission>} */
+    this._permissions = [];
+    /** @type {Array<HotlistIssue>} */
+    this._items = [];
+    /** @type {Array<string>} */
+    this._columns = [];
+    /** @type {?Error} */
+    this._fetchError = null;
+    /**
+     * @param {Issue} _issue
+     * @param {string} _fieldName
+     * @return {Array<string>}
+     */
+    this._extractFieldValuesFromIssue = (_issue, _fieldName) => [];
+
+    // Populated from events.
+    /** @type {Object<string, boolean>} */
+    this._filter = {Open: true};
+    /**
+     * An array of selected Issue Names.
+     * TODO(https://crbug.com/monorail/7440): Update typedef.
+     * @type {Array<string>}
+     */
+    this._selected = [];
+  }
+
+  /**
+   * @param {HotlistIssue} hotlistIssue
+   * @param {string} fieldName
+   * @return {Array<string>}
+   */
+  _extractFieldValues(hotlistIssue, fieldName) {
+    switch (fieldName) {
+      case 'Added':
+        return [relativeTime(new Date(hotlistIssue.createTime))];
+      case 'Adder':
+        return [hotlistIssue.adder.displayName];
+      case 'Rank':
+        return [String(hotlistIssue.rank + 1)];
+      default:
+        return this._extractFieldValuesFromIssue(hotlistIssue, fieldName);
+    }
+  }
+
+  /**
+   * @param {Event} e A change event fired by <chops-filter-chips>.
+   */
+  _onFilterChange(e) {
+    this._filter = e.target.selected;
+  }
+
+  /**
+   * @param {CustomEvent} e A selectionChange event fired by <mr-issue-list>.
+   */
+  _onSelectionChange(e) {
+    this._selected = e.target.selectedIssues.map(issueToName);
+  }
+
+  /** Opens a dialog to change the columns shown in the issue list. */
+  _openColumnsDialog() {
+    this.shadowRoot.querySelector('mr-change-columns').open();
+  }
+
+  /** Handles successfully saved Hotlist changes. */
+  async _handleHotlistSaveSuccess() {}
+
+  /** Removes items from the hotlist, dispatching an action to Redux. */
+  async _removeItems() {}
+
+  /** Opens a dialog to update attached Hotlists for selected Issues. */
+  _openUpdateIssuesHotlistsDialog() {
+    this.shadowRoot.querySelector('mr-update-issue-hotlists-dialog').open();
+  }
+
+  /** Opens a dialog to move selected Issues to desired Hotlist. */
+  _openMoveToHotlistDialog() {
+    this.shadowRoot.querySelector('mr-move-issue-hotlists-dialog').open();
+  }
+  /**
+   * Reranks items in the hotlist, dispatching an action to Redux.
+   * @param {Array<String>} items The names of the HotlistItems to move.
+   * @param {number} index The index to insert the moved items.
+   * @return {Promise<void>}
+   */
+  async _rerankItems(items, index) {}
+};
+
+/** Redux-connected version of _MrHotlistIssuesPage. */
+export class MrHotlistIssuesPage extends connectStore(_MrHotlistIssuesPage) {
+  /** @override */
+  stateChanged(state) {
+    this._hotlist = hotlists.viewedHotlist(state);
+    this._permissions = hotlists.viewedHotlistPermissions(state);
+    this._items = hotlists.viewedHotlistIssues(state);
+    this._columns = hotlists.viewedHotlistColumns(state);
+    this._fetchError = hotlists.requests(state).fetch.error;
+    this._extractFieldValuesFromIssue =
+      projectV0.extractFieldValuesFromIssue(state);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('_hotlist') && this._hotlist) {
+      const pageTitle = `Issues - ${this._hotlist.displayName}`;
+      store.dispatch(sitewide.setPageTitle(pageTitle));
+      const headerTitle = `Hotlist ${this._hotlist.displayName}`;
+      store.dispatch(sitewide.setHeaderTitle(headerTitle));
+    }
+  }
+
+  /** @override */
+  async _handleHotlistSaveSuccess() {
+    const action = hotlists.fetchItems(this._hotlist.name);
+    await store.dispatch(action);
+    store.dispatch(ui.showSnackbar(ui.snackbarNames.UPDATE_HOTLISTS_SUCCESS,
+        'Hotlists updated.'));
+  }
+
+  /** @override */
+  async _removeItems() {
+    const action = hotlists.removeItems(this._hotlist.name, this._selected);
+    await store.dispatch(action);
+  }
+
+  /** @override */
+  async _rerankItems(items, index) {
+    // The index given from <mr-issue-list> includes only the items shown in
+    // the list and excludes the items that are being moved. So, we need to
+    // count the hidden items.
+    let shownItems = 0;
+    let hiddenItems = 0;
+    for (let i = 0; shownItems < index && i < this._items.length; ++i) {
+      const item = this._items[i];
+      const isShown = _isShown(this._filter, item);
+      if (!isShown) ++hiddenItems;
+      if (isShown && !items.includes(item.name)) ++shownItems;
+    }
+
+    await store.dispatch(hotlists.rerankItems(
+        this._hotlist.name, items, index + hiddenItems));
+  }
+};
+
+const _filterIssues = defaultMemoize(
+    /**
+     * Filters an array of HotlistIssues based on a filter condition. Memoized.
+     * @param {Object<string, boolean>} filter The types of issues to show.
+     * @param {Array<HotlistIssue>} items A HotlistIssue to check.
+     * @return {Array<HotlistIssue>}
+     */
+    (filter, items) => items.filter((item) => _isShown(filter, item)));
+
+/**
+ * Returns true iff the current filter includes the given HotlistIssue.
+ * @param {Object<string, boolean>} filter The types of issues to show.
+ * @param {HotlistIssue} item A HotlistIssue to check.
+ * @return {boolean}
+ */
+function _isShown(filter, item) {
+  return filter.Open && item.statusRef.meansOpen ||
+      filter.Closed && !item.statusRef.meansOpen;
+}
+
+customElements.define('mr-hotlist-issues-page-base', _MrHotlistIssuesPage);
+customElements.define('mr-hotlist-issues-page', MrHotlistIssuesPage);
diff --git a/static_src/elements/hotlist/mr-hotlist-issues-page/mr-hotlist-issues-page.test.js b/static_src/elements/hotlist/mr-hotlist-issues-page/mr-hotlist-issues-page.test.js
new file mode 100644
index 0000000..a651578
--- /dev/null
+++ b/static_src/elements/hotlist/mr-hotlist-issues-page/mr-hotlist-issues-page.test.js
@@ -0,0 +1,338 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import {store, resetState} from 'reducers/base.js';
+import {hotlists} from 'reducers/hotlists.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as sitewide from 'reducers/sitewide.js';
+
+import * as example from 'shared/test/constants-hotlists.js';
+import * as exampleIssues from 'shared/test/constants-issueV0.js';
+import * as exampleUsers from 'shared/test/constants-users.js';
+import {PERMISSION_HOTLIST_EDIT} from 'shared/test/constants-permissions.js';
+
+import {MrHotlistIssuesPage} from './mr-hotlist-issues-page.js';
+
+/** @type {MrHotlistIssuesPage} */
+let element;
+
+describe('mr-hotlist-issues-page (unconnected)', () => {
+  beforeEach(() => {
+    // @ts-ignore
+    element = document.createElement('mr-hotlist-issues-page-base');
+    element._extractFieldValuesFromIssue =
+      projectV0.extractFieldValuesFromIssue({});
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('shows hotlist fetch error', async () => {
+    element._fetchError = new Error('This is an important error');
+    element._fetchError.description = 'This is an important error';
+    await element.updateComplete;
+    assert.include(element.shadowRoot.innerHTML, 'important error');
+  });
+
+  it('shows loading message with null hotlist', async () => {
+    await element.updateComplete;
+    assert.include(element.shadowRoot.innerHTML, 'Loading');
+  });
+
+  it('renders hotlist items with one project', async () => {
+    element._hotlist = example.HOTLIST;
+    element._items = [example.HOTLIST_ISSUE];
+    await element.updateComplete;
+
+    const issueList = element.shadowRoot.querySelector('mr-issue-list');
+    assert.deepEqual(issueList.projectName, 'project-name');
+  });
+
+  it('renders hotlist items with multiple projects', async () => {
+    element._hotlist = example.HOTLIST;
+    element._items = [
+      example.HOTLIST_ISSUE,
+      example.HOTLIST_ISSUE_OTHER_PROJECT,
+    ];
+    await element.updateComplete;
+
+    const issueList = element.shadowRoot.querySelector('mr-issue-list');
+    assert.isNull(issueList.projectName);
+  });
+
+  it('needs permissions to rerank', async () => {
+    element._hotlist = example.HOTLIST;
+    await element.updateComplete;
+
+    const issueList = element.shadowRoot.querySelector('mr-issue-list');
+    assert.isNull(issueList.rerank);
+
+    element._permissions = [hotlists.EDIT];
+    await element.updateComplete;
+
+    assert.isNotNull(issueList.rerank);
+  });
+
+  it('memoizes issues', async () => {
+    element._hotlist = example.HOTLIST;
+    element._items = [example.HOTLIST_ISSUE];
+    await element.updateComplete;
+
+    const issueList = element.shadowRoot.querySelector('mr-issue-list');
+    const issues = issueList.issues;
+
+    // Trigger a render without updating the issue list.
+    element._hotlist = example.HOTLIST;
+    await element.updateComplete;
+
+    assert.strictEqual(issues, issueList.issues);
+
+    // Modify the issue list.
+    element._items = [example.HOTLIST_ISSUE];
+    await element.updateComplete;
+
+    assert.notStrictEqual(issues, issueList.issues);
+  });
+
+  it('computes strings for HotlistIssue fields', async () => {
+    const clock = sinon.useFakeTimers(24 * 60 * 60 * 1000);
+
+    try {
+      element._hotlist = example.HOTLIST;
+      element._items = [{
+        ...example.HOTLIST_ISSUE,
+        summary: 'Summary',
+        rank: 52,
+        adder: exampleUsers.USER,
+        createTime: new Date(0).toISOString(),
+      }];
+      element._columns = ['Summary', 'Rank', 'Added', 'Adder'];
+      await element.updateComplete;
+
+      const issueList = element.shadowRoot.querySelector('mr-issue-list');
+      assert.include(issueList.shadowRoot.innerHTML, 'Summary');
+      assert.include(issueList.shadowRoot.innerHTML, '53');
+      assert.include(issueList.shadowRoot.innerHTML, 'a day ago');
+      assert.include(issueList.shadowRoot.innerHTML, exampleUsers.DISPLAY_NAME);
+    } finally {
+      clock.restore();
+    }
+  });
+
+  it('filters and shows closed issues', async () => {
+    element._hotlist = example.HOTLIST;
+    element._items = [example.HOTLIST_ISSUE_CLOSED];
+    await element.updateComplete;
+
+    const issueList = element.shadowRoot.querySelector('mr-issue-list');
+    assert.equal(issueList.issues.length, 0);
+
+    element.shadowRoot.querySelector('chops-filter-chips').select('Closed');
+    await element.updateComplete;
+
+    assert.isTrue(element._filter.Closed);
+    assert.equal(issueList.issues.length, 1);
+  });
+
+  it('updates button bar on list selection', async () => {
+    element._permissions = PERMISSION_HOTLIST_EDIT;
+    element._hotlist = example.HOTLIST;
+    element._items = [example.HOTLIST_ISSUE];
+    await element.updateComplete;
+
+    const buttonBar = element.shadowRoot.querySelector('mr-button-bar');
+    assert.include(buttonBar.shadowRoot.innerHTML, 'Change columns');
+    assert.notInclude(buttonBar.shadowRoot.innerHTML, 'Remove');
+    assert.notInclude(buttonBar.shadowRoot.innerHTML, 'Update');
+    assert.notInclude(buttonBar.shadowRoot.innerHTML, 'Move to...');
+    assert.deepEqual(element._selected, []);
+
+    const issueList = element.shadowRoot.querySelector('mr-issue-list');
+    issueList.shadowRoot.querySelector('input').click();
+    await element.updateComplete;
+
+    assert.notInclude(buttonBar.shadowRoot.innerHTML, 'Change columns');
+    assert.include(buttonBar.shadowRoot.innerHTML, 'Remove');
+    assert.include(buttonBar.shadowRoot.innerHTML, 'Update');
+    assert.include(buttonBar.shadowRoot.innerHTML, 'Move to...');
+    assert.deepEqual(element._selected, [exampleIssues.NAME]);
+  });
+
+  it('hides issues checkboxes if the user cannot edit', async () => {
+    element._permissions = [];
+    element._hotlist = example.HOTLIST;
+    element._items = [example.HOTLIST_ISSUE];
+    await element.updateComplete;
+
+    const issueList = element.shadowRoot.querySelector('mr-issue-list');
+    assert.notInclude(issueList.shadowRoot.innerHTML, 'input');
+  });
+
+  it('opens "Change columns" dialog', async () => {
+    element._hotlist = example.HOTLIST;
+    await element.updateComplete;
+
+    const dialog = element.shadowRoot.querySelector('mr-change-columns');
+    sinon.stub(dialog, 'open');
+    try {
+      element._openColumnsDialog();
+
+      sinon.assert.calledOnce(dialog.open);
+    } finally {
+      dialog.open.restore();
+    }
+  });
+
+  it('opens "Update" dialog', async () => {
+    element._hotlist = example.HOTLIST;
+    await element.updateComplete;
+
+    const dialog = element.shadowRoot.querySelector(
+        'mr-update-issue-hotlists-dialog');
+    sinon.stub(dialog, 'open');
+    try {
+      element._openUpdateIssuesHotlistsDialog();
+
+      sinon.assert.calledOnce(dialog.open);
+    } finally {
+      dialog.open.restore();
+    }
+  });
+
+  it('handles successful save from its update dialog', async () => {
+    sinon.stub(element, '_handleHotlistSaveSuccess');
+    element._hotlist = example.HOTLIST;
+    await element.updateComplete;
+
+    try {
+      const dialog =
+          element.shadowRoot.querySelector('mr-update-issue-hotlists-dialog');
+      dialog.dispatchEvent(new Event('saveSuccess'));
+      sinon.assert.calledOnce(element._handleHotlistSaveSuccess);
+    } finally {
+      element._handleHotlistSaveSuccess.restore();
+    }
+  });
+
+  it('opens "Move to..." dialog', async () => {
+    element._hotlist = example.HOTLIST;
+    await element.updateComplete;
+
+    const dialog = element.shadowRoot.querySelector(
+        'mr-move-issue-hotlists-dialog');
+    sinon.stub(dialog, 'open');
+    try {
+      element._openMoveToHotlistDialog();
+
+      sinon.assert.calledOnce(dialog.open);
+    } finally {
+      dialog.open.restore();
+    }
+  });
+
+  it('handles successful save from its move dialog', async () => {
+    sinon.stub(element, '_handleHotlistSaveSuccess');
+    element._hotlist = example.HOTLIST;
+    await element.updateComplete;
+
+    try {
+      const dialog =
+          element.shadowRoot.querySelector('mr-move-issue-hotlists-dialog');
+      dialog.dispatchEvent(new Event('saveSuccess'));
+      sinon.assert.calledOnce(element._handleHotlistSaveSuccess);
+    } finally {
+      element._handleHotlistSaveSuccess.restore();
+    }
+  });
+});
+
+describe('mr-hotlist-issues-page (connected)', () => {
+  beforeEach(() => {
+    store.dispatch(resetState());
+
+    // @ts-ignore
+    element = document.createElement('mr-hotlist-issues-page');
+    element._extractFieldValuesFromIssue =
+      projectV0.extractFieldValuesFromIssue({});
+    document.body.appendChild(element);
+
+    // Stop Redux from overriding values being tested.
+    sinon.stub(element, 'stateChanged');
+  });
+
+  afterEach(() => {
+    element.stateChanged.restore();
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrHotlistIssuesPage);
+  });
+
+  it('updates page title and header', async () => {
+    element._hotlist = {...example.HOTLIST, displayName: 'Hotlist-Name'};
+    await element.updateComplete;
+
+    const state = store.getState();
+    assert.deepEqual(sitewide.pageTitle(state), 'Issues - Hotlist-Name');
+    assert.deepEqual(sitewide.headerTitle(state), 'Hotlist Hotlist-Name');
+  });
+
+  it('removes items', () => {
+    element._hotlist = example.HOTLIST;
+    element._selected = [exampleIssues.NAME];
+
+    const removeItems = sinon.spy(hotlists, 'removeItems');
+    try {
+      element._removeItems();
+      sinon.assert.calledWith(removeItems, example.NAME, [exampleIssues.NAME]);
+    } finally {
+      removeItems.restore();
+    }
+  });
+
+  it('fetches a hotlist when handling a successful save', () => {
+    element._hotlist = example.HOTLIST;
+
+    const fetchItems = sinon.spy(hotlists, 'fetchItems');
+    try {
+      element._handleHotlistSaveSuccess();
+      sinon.assert.calledWith(fetchItems, example.NAME);
+    } finally {
+      fetchItems.restore();
+    }
+  });
+
+  it('reranks', () => {
+    element._hotlist = example.HOTLIST;
+    element._items = [
+      example.HOTLIST_ISSUE,
+      example.HOTLIST_ISSUE_CLOSED,
+      example.HOTLIST_ISSUE_OTHER_PROJECT,
+    ];
+
+    const rerankItems = sinon.spy(hotlists, 'rerankItems');
+    try {
+      element._rerankItems([example.HOTLIST_ITEM_NAME], 1);
+
+      sinon.assert.calledWith(
+          rerankItems, example.NAME, [example.HOTLIST_ITEM_NAME], 2);
+    } finally {
+      rerankItems.restore();
+    }
+  });
+});
+
+it('mr-hotlist-issues-page (stateChanged)', () => {
+  // @ts-ignore
+  element = document.createElement('mr-hotlist-issues-page');
+  document.body.appendChild(element);
+  assert.instanceOf(element, MrHotlistIssuesPage);
+  document.body.removeChild(element);
+});
diff --git a/static_src/elements/hotlist/mr-hotlist-people-page/mr-hotlist-people-page.js b/static_src/elements/hotlist/mr-hotlist-people-page/mr-hotlist-people-page.js
new file mode 100644
index 0000000..c317d39
--- /dev/null
+++ b/static_src/elements/hotlist/mr-hotlist-people-page/mr-hotlist-people-page.js
@@ -0,0 +1,260 @@
+// Copyright 2019 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.
+
+import debounce from 'debounce';
+import {LitElement, html, css} from 'lit-element';
+
+import {userV3ToRef} from 'shared/convertersV0.js';
+
+import {store, connectStore} from 'reducers/base.js';
+import {hotlists} from 'reducers/hotlists.js';
+import * as sitewide from 'reducers/sitewide.js';
+import * as users from 'reducers/users.js';
+
+import 'elements/framework/links/mr-user-link/mr-user-link.js';
+import 'elements/hotlist/mr-hotlist-header/mr-hotlist-header.js';
+
+/** Hotlist People page */
+class _MrHotlistPeoplePage extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: block;
+      }
+      section {
+        margin: 16px 24px;
+      }
+      h2 {
+        font-weight: normal;
+      }
+
+      ul {
+        padding: 0;
+      }
+      li {
+        list-style-type: none;
+      }
+      p, li, form {
+        display: flex;
+      }
+      p, ul, li, form {
+        margin: 12px 0;
+      }
+
+      input {
+        margin-left: -6px;
+        padding: 4px;
+        width: 320px;
+      }
+
+      button {
+        align-items: center;
+        background-color: transparent;
+        border: 0;
+        cursor: pointer;
+        display: inline-flex;
+        margin: 0 4px;
+        padding: 0;
+      }
+      .material-icons {
+        font-size: 18px;
+      }
+
+      .placeholder::before {
+        animation: pulse 1s infinite ease-in-out;
+        border-radius: 3px;
+        content: " ";
+        height: 10px;
+        margin: 4px 0;
+        width: 200px;
+      }
+      @keyframes pulse {
+        0% {background-color: var(--chops-blue-50);}
+        50% {background-color: var(--chops-blue-75);}
+        100% {background-color: var(--chops-blue-50);}
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <mr-hotlist-header selected=1></mr-hotlist-header>
+      ${this._renderPage()}
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   */
+  _renderPage() {
+    if (this._fetchError) {
+      return html`<section>${this._fetchError.description}</section>`;
+    }
+
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+
+      <section>
+        <h2>Owner</h2>
+        ${this._renderOwner(this._owner)}
+      </section>
+
+      <section>
+        <h2>Editors</h2>
+        ${this._renderEditors(this._editors)}
+
+        ${this._permissions.includes(hotlists.ADMINISTER) ? html`
+          <form @submit=${this._onAddEditors}>
+            <input id="add" placeholder="List of email addresses"></input>
+            <button><i class="material-icons">add</i></button>
+          </form>
+        ` : html``}
+      </section>
+    `;
+  }
+
+  /**
+   * @param {?User} owner
+   * @return {TemplateResult}
+   */
+  _renderOwner(owner) {
+    if (!owner) return html`<p class="placeholder"></p>`;
+    return html`
+      <p><mr-user-link .userRef=${userV3ToRef(owner)}></mr-user-link></p>
+    `;
+  }
+
+  /**
+   * @param {?Array<User>} editors
+   * @return {TemplateResult}
+   */
+  _renderEditors(editors) {
+    if (!editors) return html`<p class="placeholder"></p>`;
+    if (!editors.length) return html`<p>No editors.</p>`;
+
+    return html`
+      <ul>${editors.map((editor) => this._renderEditor(editor))}</ul>
+    `;
+  }
+
+  /**
+   * @param {?User} editor
+   * @return {TemplateResult}
+   */
+  _renderEditor(editor) {
+    if (!editor) return html`<li class="placeholder"></li>`;
+
+    const canRemove = this._permissions.includes(hotlists.ADMINISTER) ||
+        editor.name === this._currentUserName;
+
+    return html`
+      <li>
+        <mr-user-link .userRef=${userV3ToRef(editor)}></mr-user-link>
+        ${canRemove ? html`
+          <button @click=${this._removeEditor.bind(this, editor.name)}>
+            <i class="material-icons">clear</i>
+          </button>
+        ` : html``}
+      </li>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      // Populated from Redux.
+      _hotlist: {type: Object},
+      _owner: {type: Object},
+      _editors: {type: Array},
+      _permissions: {type: Array},
+      _currentUserName: {type: String},
+      _fetchError: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    // Populated from Redux.
+    /** @type {?Hotlist} */ this._hotlist = null;
+    /** @type {?User} */ this._owner = null;
+    /** @type {Array<User>} */ this._editors = null;
+    /** @type {Array<Permission>} */ this._permissions = [];
+    /** @type {?String} */ this._currentUserName = null;
+    /** @type {?Error} */ this._fetchError = null;
+
+    this._debouncedAddEditors = debounce(this._addEditors, 400, true);
+  }
+
+  /** Adds hotlist editors.
+   * @param {Event} event
+   */
+  async _onAddEditors(event) {
+    event.preventDefault();
+
+    const input =
+      /** @type {HTMLInputElement} */ (this.shadowRoot.getElementById('add'));
+    const emails = input.value.split(/[\s,;]/).filter((e) => e);
+    if (!emails.length) return;
+    const editors = emails.map((email) => 'users/' + email);
+    try {
+      await this._debouncedAddEditors(editors);
+      input.value = '';
+    } catch (error) {
+      // The `hotlists.update()` call shows a snackbar on errors.
+    }
+  }
+
+  /** Adds hotlist editors.
+   * @param {Array<string>} editors An Array of User resource names.
+   */
+  async _addEditors(editors) {}
+
+  /**
+   * Removes a hotlist editor.
+   * @param {string} name A User resource name.
+  */
+  async _removeEditor(name) {}
+};
+
+/** Redux-connected version of _MrHotlistPeoplePage. */
+export class MrHotlistPeoplePage extends connectStore(_MrHotlistPeoplePage) {
+  /** @override */
+  stateChanged(state) {
+    this._hotlist = hotlists.viewedHotlist(state);
+    this._owner = hotlists.viewedHotlistOwner(state);
+    this._editors = hotlists.viewedHotlistEditors(state);
+    this._permissions = hotlists.viewedHotlistPermissions(state);
+    this._currentUserName = users.currentUserName(state);
+    this._fetchError = hotlists.requests(state).fetch.error;
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    super.updated(changedProperties);
+
+    if (changedProperties.has('_hotlist') && this._hotlist) {
+      const pageTitle = 'People - ' + this._hotlist.displayName;
+      store.dispatch(sitewide.setPageTitle(pageTitle));
+      const headerTitle = 'Hotlist ' + this._hotlist.displayName;
+      store.dispatch(sitewide.setHeaderTitle(headerTitle));
+    }
+  }
+
+  /** @override */
+  async _addEditors(editors) {
+    await store.dispatch(hotlists.update(this._hotlist.name, {editors}));
+  }
+
+  /** @override */
+  async _removeEditor(name) {
+    await store.dispatch(hotlists.removeEditors(this._hotlist.name, [name]));
+  }
+}
+
+customElements.define('mr-hotlist-people-page-base', _MrHotlistPeoplePage);
+customElements.define('mr-hotlist-people-page', MrHotlistPeoplePage);
diff --git a/static_src/elements/hotlist/mr-hotlist-people-page/mr-hotlist-people-page.test.js b/static_src/elements/hotlist/mr-hotlist-people-page/mr-hotlist-people-page.test.js
new file mode 100644
index 0000000..b7dd6dc
--- /dev/null
+++ b/static_src/elements/hotlist/mr-hotlist-people-page/mr-hotlist-people-page.test.js
@@ -0,0 +1,176 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import {store, resetState} from 'reducers/base.js';
+import {hotlists} from 'reducers/hotlists.js';
+import * as sitewide from 'reducers/sitewide.js';
+
+import * as example from 'shared/test/constants-hotlists.js';
+import * as exampleUsers from 'shared/test/constants-users.js';
+
+import {MrHotlistPeoplePage} from './mr-hotlist-people-page.js';
+
+/** @type {MrHotlistPeoplePage} */
+let element;
+
+describe('mr-hotlist-people-page (unconnected)', () => {
+  beforeEach(() => {
+    // @ts-ignore
+    element = document.createElement('mr-hotlist-people-page-base');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('shows hotlist fetch error', async () => {
+    element._fetchError = new Error('This is an important error');
+    element._fetchError.description = 'This is an important error';
+    await element.updateComplete;
+    assert.include(element.shadowRoot.innerHTML, 'important error');
+  });
+
+  it('renders placeholders with no data', async () => {
+    await element.updateComplete;
+
+    const placeholders = element.shadowRoot.querySelectorAll('.placeholder');
+    assert.equal(placeholders.length, 2);
+  });
+
+  it('renders placeholders with editors list but no user data', async () => {
+    element._editors = [null, null];
+    await element.updateComplete;
+
+    const placeholders = element.shadowRoot.querySelectorAll('.placeholder');
+    assert.equal(placeholders.length, 3);
+  });
+
+  it('renders "No editors"', async () => {
+    element._editors = [];
+    await element.updateComplete;
+
+    assert.include(element.shadowRoot.innerHTML, 'No editors');
+  });
+
+  it('renders hotlist', async () => {
+    element._hotlist = example.HOTLIST;
+    element._owner = exampleUsers.USER;
+    element._editors = [exampleUsers.USER_2];
+    await element.updateComplete;
+  });
+
+  it('shows controls iff user has admin permissions', async () => {
+    element._editors = [exampleUsers.USER_2];
+    await element.updateComplete;
+
+    assert.equal(element.shadowRoot.querySelectorAll('button').length, 0);
+
+    element._permissions = [hotlists.ADMINISTER];
+    await element.updateComplete;
+
+    assert.equal(element.shadowRoot.querySelectorAll('button').length, 2);
+  });
+
+  it('shows remove button if user is editing themselves', async () => {
+    element._editors = [exampleUsers.USER, exampleUsers.USER_2];
+    element._currentUserName = exampleUsers.USER_2.name;
+    await element.updateComplete;
+
+    assert.equal(element.shadowRoot.querySelectorAll('button').length, 1);
+  });
+});
+
+describe('mr-hotlist-people-page (connected)', () => {
+  beforeEach(() => {
+    store.dispatch(resetState());
+
+    // @ts-ignore
+    element = document.createElement('mr-hotlist-people-page');
+    document.body.appendChild(element);
+
+    // Stop Redux from overriding values being tested.
+    sinon.stub(element, 'stateChanged');
+  });
+
+  afterEach(() => {
+    element.stateChanged.restore();
+    document.body.removeChild(element);
+  });
+
+  it('initializes', async () => {
+    assert.instanceOf(element, MrHotlistPeoplePage);
+  });
+
+  it('updates page title and header', async () => {
+    element._hotlist = {...example.HOTLIST, displayName: 'Hotlist-Name'};
+    await element.updateComplete;
+
+    const state = store.getState();
+    assert.deepEqual(sitewide.pageTitle(state), 'People - Hotlist-Name');
+    assert.deepEqual(sitewide.headerTitle(state), 'Hotlist Hotlist-Name');
+  });
+
+  it('adds editors', async () => {
+    element._hotlist = example.HOTLIST;
+    element._permissions = [hotlists.ADMINISTER];
+    await element.updateComplete;
+
+    const input = /** @type {HTMLInputElement} */
+        (element.shadowRoot.getElementById('add'));
+    input.value = 'test@example.com, test2@example.com';
+
+    const update = sinon.spy(hotlists, 'update');
+    try {
+      await element._onAddEditors(new Event('submit'));
+
+      const editors = ['users/test@example.com', 'users/test2@example.com'];
+      sinon.assert.calledWith(update, example.HOTLIST.name, {editors});
+    } finally {
+      update.restore();
+    }
+  });
+
+  it('_onAddEditors ignores empty input', async () => {
+    element._permissions = [hotlists.ADMINISTER];
+    await element.updateComplete;
+
+    const input = /** @type {HTMLInputElement} */
+        (element.shadowRoot.getElementById('add'));
+    input.value = '  ';
+
+    const update = sinon.spy(hotlists, 'update');
+    try {
+      await element._onAddEditors(new Event('submit'));
+      sinon.assert.notCalled(update);
+    } finally {
+      update.restore();
+    }
+  });
+
+  it('removes editors', async () => {
+    element._hotlist = example.HOTLIST;
+
+    const removeEditors = sinon.spy(hotlists, 'removeEditors');
+    try {
+      await element._removeEditor(exampleUsers.NAME_2);
+
+      sinon.assert.calledWith(
+          removeEditors, example.HOTLIST.name, [exampleUsers.NAME_2]);
+    } finally {
+      removeEditors.restore();
+    }
+  });
+});
+
+it('mr-hotlist-people-page (stateChanged)', () => {
+  // @ts-ignore
+  element = document.createElement('mr-hotlist-people-page');
+  document.body.appendChild(element);
+  assert.instanceOf(element, MrHotlistPeoplePage);
+  document.body.removeChild(element);
+});
diff --git a/static_src/elements/hotlist/mr-hotlist-settings-page/mr-hotlist-settings-page.js b/static_src/elements/hotlist/mr-hotlist-settings-page/mr-hotlist-settings-page.js
new file mode 100644
index 0000000..4f4d90d
--- /dev/null
+++ b/static_src/elements/hotlist/mr-hotlist-settings-page/mr-hotlist-settings-page.js
@@ -0,0 +1,310 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import page from 'page';
+import 'shared/typedef.js';
+import {store, connectStore} from 'reducers/base.js';
+import {hotlists} from 'reducers/hotlists.js';
+import * as sitewide from 'reducers/sitewide.js';
+import * as ui from 'reducers/ui.js';
+import * as userV0 from 'reducers/userV0.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+import 'elements/chops/chops-button/chops-button.js';
+import 'elements/hotlist/mr-hotlist-header/mr-hotlist-header.js';
+
+/**
+ * Supported Hotlist privacy options from feature_objects.proto.
+ * @enum {string}
+ */
+const HotlistPrivacy = {
+  PRIVATE: 'PRIVATE',
+  PUBLIC: 'PUBLIC',
+};
+
+/** Hotlist Settings page */
+class _MrHotlistSettingsPage extends LitElement {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          display: block;
+        }
+        h2 {
+          font-weight: normal;
+        }
+        section, dl, form {
+          margin: 16px 24px;
+        }
+        dt {
+          font-weight: bold;
+          text-align: right;
+          word-wrap: break-word;
+        }
+        dd {
+          margin-left: 0;
+        }
+        label {
+          display: flex;
+          flex-direction: column;
+        }
+        form input,
+        form select {
+          /* Match minimum size of header. */
+          min-width: 250px;
+        }
+        /* https://material.io/design/layout/responsive-layout-grid.html#breakpoints */
+        @media (min-width: 1024px) {
+          input,
+          select,
+          p,
+          dd {
+            max-width: 750px;
+          }
+        }
+        #save-hotlist {
+          background: var(--chops-primary-button-bg);
+          color: var(--chops-primary-button-color);
+        }
+     `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <mr-hotlist-header selected=2></mr-hotlist-header>
+      ${this._renderPage()}
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   */
+  _renderPage() {
+    if (!this._hotlist) {
+      if (this._fetchError) {
+        return html`<section>${this._fetchError.description}</section>`;
+      } else {
+        return html`<section>Loading...</section>`;
+      }
+    }
+
+    const defaultColumns = this._hotlist.defaultColumns
+        .map((col) => col.column).join(' ');
+    if (this._permissions.includes(hotlists.ADMINISTER)) {
+      return this._renderEditableForm(defaultColumns);
+    }
+    return this._renderViewOnly(defaultColumns);
+  }
+
+  /**
+   * Render the editable form Settings page.
+   * @param {string} defaultColumns The default columns to be shown.
+   * @return {TemplateResult}
+   */
+  _renderEditableForm(defaultColumns) {
+    return html`
+      <form id="settingsForm" class="input-grid"
+        @change=${this._handleFormChange}>
+        <label>Name</label>
+        <input id="displayName" class="path"
+            value="${this._hotlist.displayName}">
+        <label>Summary</label>
+        <input id="summary" class="path" value="${this._hotlist.summary}">
+        <label>Default Issues columns</label>
+        <input id="defaultColumns" class="path" value="${defaultColumns}">
+        <label>Who can view this hotlist</label>
+        <select id="hotlistPrivacy" class="path">
+          <option
+            value="${HotlistPrivacy.PUBLIC}"
+            ?selected="${this._hotlist.hotlistPrivacy ===
+                        HotlistPrivacy.PUBLIC}">
+            Anyone on the Internet
+          </option>
+          <option
+            value="${HotlistPrivacy.PRIVATE}"
+            ?selected="${this._hotlist.hotlistPrivacy ===
+                        HotlistPrivacy.PRIVATE}">
+            Members only
+          </option>
+        </select>
+        <span><!-- grid spacer --></span>
+        <p>
+          Individual issues in the list can only be seen by users who can
+          normally see them. The privacy status of an issue is considered
+          when it is being displayed (or not displayed) in a hotlist.
+        </p>
+        <span><!-- grid spacer --></span>
+        <div>
+          <chops-button @click=${this._save} id="save-hotlist" disabled>
+            Save hotlist
+          </chops-button>
+          <chops-button @click=${this._delete} id="delete-hotlist">
+            Delete hotlist
+          </chops-button>
+        </div>
+      </form>
+    `;
+  }
+
+  /**
+   * Render the view-only Settings page.
+   * @param {string} defaultColumns The default columns to be shown.
+   * @return {TemplateResult}
+   */
+  _renderViewOnly(defaultColumns) {
+    return html`
+      <dl class="input-grid">
+        <dt>Name</dt>
+        <dd>${this._hotlist.displayName}</dd>
+        <dt>Summary</dt>
+        <dd>${this._hotlist.summary}</dd>
+        <dt>Default Issues columns</dt>
+        <dd>${defaultColumns}</dd>
+        <dt>Who can view this hotlist</dt>
+        <dd>
+          ${this._hotlist.hotlistPrivacy &&
+            this._hotlist.hotlistPrivacy === HotlistPrivacy.PUBLIC ?
+            'Anyone on the Internet' : 'Members only'}
+        </dd>
+        <dt></dt>
+        <dd>
+          Individual issues in the list can only be seen by users who can
+          normally see them. The privacy status of an issue is considered
+          when it is being displayed (or not displayed) in a hotlist.
+        </dd>
+      </dl>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      // Populated from Redux.
+      _hotlist: {type: Object},
+      _permissions: {type: Array},
+      _currentUser: {type: Object},
+      _fetchError: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    // Populated from Redux.
+    /** @type {?Hotlist} */ this._hotlist = null;
+    /** @type {Array<Permission>} */ this._permissions = [];
+    /** @type {UserRef} */ this._currentUser = null;
+    /** @type {?Error} */ this._fetchError = null;
+
+    // Expose page.js for test stubbing.
+    this.page = page;
+  }
+
+  /**
+   * Handles changes to the editable form.
+   * @param {Event} e
+   */
+  _handleFormChange() {
+    const saveButton = this.shadowRoot.getElementById('save-hotlist');
+    if (saveButton.disabled) {
+      saveButton.disabled = false;
+    }
+  }
+
+  /** Saves the hotlist, dispatching an action to Redux. */
+  async _save() {}
+
+  /** Deletes the hotlist, dispatching an action to Redux. */
+  async _delete() {}
+};
+
+/** Redux-connected version of _MrHotlistSettingsPage. */
+export class MrHotlistSettingsPage
+  extends connectStore(_MrHotlistSettingsPage) {
+  /** @override */
+  stateChanged(state) {
+    this._hotlist = hotlists.viewedHotlist(state);
+    this._permissions = hotlists.viewedHotlistPermissions(state);
+    this._currentUser = userV0.currentUser(state);
+    this._fetchError = hotlists.requests(state).fetch.error;
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    super.updated(changedProperties);
+
+    if (changedProperties.has('_hotlist') && this._hotlist) {
+      const pageTitle = 'Settings - ' + this._hotlist.displayName;
+      store.dispatch(sitewide.setPageTitle(pageTitle));
+      const headerTitle = 'Hotlist ' + this._hotlist.displayName;
+      store.dispatch(sitewide.setHeaderTitle(headerTitle));
+    }
+  }
+
+  /** @override */
+  async _save() {
+    const form = this.shadowRoot.getElementById('settingsForm');
+    if (!form) return;
+
+    // TODO(https://crbug.com/monorail/7475): Consider generalizing this logic.
+    const updatedHotlist = /** @type {Hotlist} */({});
+    // These are is an input or select elements.
+    const pathInputs = form.querySelectorAll('.path');
+    pathInputs.forEach((input) => {
+      const path = input.id;
+      const value = /** @type {HTMLInputElement} */(input).value;
+      switch (path) {
+        case 'defaultColumns':
+          const columnsValue = [];
+          value.trim().split(' ').forEach((column) => {
+            if (column) columnsValue.push({column});
+          });
+          if (JSON.stringify(columnsValue) !==
+              JSON.stringify(this._hotlist.defaultColumns)) {
+            updatedHotlist.defaultColumns = columnsValue;
+          }
+          break;
+        default:
+          if (value !== this._hotlist[path]) updatedHotlist[path] = value;
+          break;
+      };
+    });
+
+    const action = hotlists.update(this._hotlist.name, updatedHotlist);
+    await store.dispatch(action);
+    this._showHotlistSavedSnackbar();
+  }
+
+  /**
+   * Shows a snackbar informing the user about their save request.
+   */
+  async _showHotlistSavedSnackbar() {
+    await store.dispatch(ui.showSnackbar(
+        'SNACKBAR_ID_HOTLIST_SETTINGS_UPDATED', 'Hotlist Updated.'));
+  }
+
+  /** @override */
+  async _delete() {
+    if (confirm(
+        'Are you sure you want to delete this hotlist? This cannot be undone.')
+    ) {
+      const action = hotlists.deleteHotlist(this._hotlist.name);
+      await store.dispatch(action);
+
+      // TODO(crbug/monorail/7430): Handle an error and add <chops-snackbar>.
+      // Note that this will redirect regardless of an error.
+      this.page(`/u/${this._currentUser.displayName}/hotlists`);
+    }
+  }
+}
+
+customElements.define('mr-hotlist-settings-page-base', _MrHotlistSettingsPage);
+customElements.define('mr-hotlist-settings-page', MrHotlistSettingsPage);
diff --git a/static_src/elements/hotlist/mr-hotlist-settings-page/mr-hotlist-settings-page.test.js b/static_src/elements/hotlist/mr-hotlist-settings-page/mr-hotlist-settings-page.test.js
new file mode 100644
index 0000000..987fff2
--- /dev/null
+++ b/static_src/elements/hotlist/mr-hotlist-settings-page/mr-hotlist-settings-page.test.js
@@ -0,0 +1,167 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import {store, resetState} from 'reducers/base.js';
+import {hotlists} from 'reducers/hotlists.js';
+import * as sitewide from 'reducers/sitewide.js';
+
+import * as example from 'shared/test/constants-hotlists.js';
+import * as exampleUsers from 'shared/test/constants-users.js';
+
+import {MrHotlistSettingsPage} from './mr-hotlist-settings-page.js';
+
+/** @type {MrHotlistSettingsPage} */
+let element;
+
+describe('mr-hotlist-settings-page (unconnected)', () => {
+  beforeEach(() => {
+    // @ts-ignore
+    element = document.createElement('mr-hotlist-settings-page-base');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('shows hotlist fetch error', async () => {
+    element._fetchError = new Error('This is an important error');
+    element._fetchError.description = 'This is an important error';
+    await element.updateComplete;
+    assert.include(element.shadowRoot.innerHTML, 'important error');
+  });
+
+  it('shows loading message with null hotlist', async () => {
+    await element.updateComplete;
+    assert.include(element.shadowRoot.innerHTML, 'Loading');
+  });
+
+  it('renders hotlist', async () => {
+    element._hotlist = example.HOTLIST;
+    await element.updateComplete;
+  });
+
+  it('renders a view only hotlist if no permissions', async () => {
+    element._hotlist = {...example.HOTLIST};
+    await element.updateComplete;
+    assert.notInclude(element.shadowRoot.innerHTML, 'form');
+  });
+
+  it('renders an editable hotlist if permission to administer', async () => {
+    element._hotlist = {...example.HOTLIST};
+    element._permissions = [hotlists.ADMINISTER];
+    await element.updateComplete;
+    assert.include(element.shadowRoot.innerHTML, 'form');
+  });
+
+  it('renders private hotlist', async () => {
+    element._hotlist = {...example.HOTLIST, hotlistPrivacy: 'PRIVATE'};
+    await element.updateComplete;
+    assert.include(element.shadowRoot.innerHTML, 'Members only');
+  });
+});
+
+describe('mr-hotlist-settings-page (connected)', () => {
+  beforeEach(() => {
+    store.dispatch(resetState());
+
+    // @ts-ignore
+    element = document.createElement('mr-hotlist-settings-page');
+    document.body.appendChild(element);
+
+    // Stop Redux from overriding values being tested.
+    sinon.stub(element, 'stateChanged');
+  });
+
+  afterEach(() => {
+    element.stateChanged.restore();
+    document.body.removeChild(element);
+  });
+
+  it('updates page title and header', async () => {
+    element._hotlist = {...example.HOTLIST, displayName: 'Hotlist-Name'};
+    await element.updateComplete;
+
+    const state = store.getState();
+    assert.deepEqual(sitewide.pageTitle(state), 'Settings - Hotlist-Name');
+    assert.deepEqual(sitewide.headerTitle(state), 'Hotlist Hotlist-Name');
+  });
+
+  it('deletes hotlist', async () => {
+    element._hotlist = example.HOTLIST;
+    element._permissions = [hotlists.ADMINISTER];
+    element._currentUser = exampleUsers.USER;
+    await element.updateComplete;
+
+    const deleteButton = element.shadowRoot.getElementById('delete-hotlist');
+    assert.isNotNull(deleteButton);
+
+    // Auto confirm deletion of hotlist.
+    const confirmStub = sinon.stub(window, 'confirm');
+    confirmStub.returns(true);
+
+    const pageStub = sinon.stub(element, 'page');
+
+    const deleteHotlist = sinon.spy(hotlists, 'deleteHotlist');
+
+    try {
+      await element._delete();
+
+      sinon.assert.calledWith(deleteHotlist, example.NAME);
+      sinon.assert.calledWith(
+          element.page, `/u/${exampleUsers.DISPLAY_NAME}/hotlists`);
+    } finally {
+      deleteHotlist.restore();
+      pageStub.restore();
+      confirmStub.restore();
+    }
+  });
+
+  it('updates hotlist when there are changes', async () => {
+    element._hotlist = {...example.HOTLIST};
+    element._permissions = [hotlists.ADMINISTER];
+    await element.updateComplete;
+
+    const saveButton = element.shadowRoot.getElementById('save-hotlist');
+    assert.isNotNull(saveButton);
+    assert.isTrue(saveButton.hasAttribute('disabled'));
+
+    const hlist = {
+      displayName: element._hotlist.displayName + 'foo',
+      summary: element._hotlist.summary + 'abc',
+    };
+
+    const summaryInput = element.shadowRoot.getElementById('summary');
+    /** @type {HTMLInputElement} */ (summaryInput).value += 'abc';
+    const nameInput =
+        element.shadowRoot.getElementById('displayName');
+    /** @type {HTMLInputElement} */ (nameInput).value += 'foo';
+
+    await element.shadowRoot.getElementById('settingsForm').dispatchEvent(
+        new Event('change'));
+    assert.isFalse(saveButton.hasAttribute('disabled'));
+
+    const snackbarStub = sinon.stub(element, '_showHotlistSavedSnackbar');
+    const update = sinon.stub(hotlists, 'update').returns(async () => {});
+    try {
+      await element._save();
+      sinon.assert.calledWith(update, example.HOTLIST.name, hlist);
+      sinon.assert.calledOnce(snackbarStub);
+    } finally {
+      update.restore();
+      snackbarStub.restore();
+    }
+  });
+});
+
+it('mr-hotlist-settings-page (stateChanged)', () => {
+  // @ts-ignore
+  element = document.createElement('mr-hotlist-settings-page');
+  document.body.appendChild(element);
+  assert.instanceOf(element, MrHotlistSettingsPage);
+  document.body.removeChild(element);
+});
diff --git a/static_src/elements/issue-detail/dialogs/mr-convert-issue/mr-convert-issue.js b/static_src/elements/issue-detail/dialogs/mr-convert-issue/mr-convert-issue.js
new file mode 100644
index 0000000..8da3083
--- /dev/null
+++ b/static_src/elements/issue-detail/dialogs/mr-convert-issue/mr-convert-issue.js
@@ -0,0 +1,186 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import {store, connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import 'elements/chops/chops-button/chops-button.js';
+import 'elements/chops/chops-dialog/chops-dialog.js';
+import 'elements/framework/mr-error/mr-error.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+// TODO(zhangtiff): Make dialog components subclass chops-dialog instead of
+// using slots/containment once we switch to LitElement.
+/**
+ * `<mr-convert-issue>`
+ *
+ * This allows a user to update the structure of an issue to that of
+ * a chosen project template.
+ *
+ */
+export class MrConvertIssue extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        label {
+          font-weight: bold;
+          text-align: right;
+        }
+        form {
+          padding: 1em 8px;
+          display: block;
+          font-size: var(--chops-main-font-size);
+        }
+        textarea {
+          font-family: var(--mr-toggled-font-family);
+          min-height: 80px;
+          border: var(--chops-accessible-border);
+          padding: 0.5em 4px;
+        }
+        .edit-actions {
+          width: 100%;
+          margin: 0.5em 0;
+          text-align: right;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <chops-dialog closeOnOutsideClick>
+        <h3 class="medium-heading">Convert issue to new template structure</h3>
+        <form id="convertIssueForm">
+          <div class="input-grid">
+            <label for="templateInput">Pick a template: </label>
+            <select id="templateInput" @change=${this._templateInputChanged}>
+              <option value="">--Please choose a project template--</option>
+              ${this.projectTemplates.map((projTempl) => html`
+                <option value=${projTempl.templateName}>
+                  ${projTempl.templateName}
+                </option>`)}
+            </select>
+            <label for="commentContent">Comment: </label>
+            <textarea id="commentContent" placeholder="Add a comment"></textarea>
+            <span></span>
+            <chops-checkbox
+              @checked-change=${this._sendEmailChecked}
+              checked=${this.sendEmail}
+            >Send email</chops-checkbox>
+          </div>
+          <mr-error ?hidden=${!this.convertIssueError}>
+            ${this.convertIssueError && this.convertIssueError.description}
+          </mr-error>
+          <div class="edit-actions">
+            <chops-button @click=${this.close} class="de-emphasized discard-button">
+              Discard
+            </chops-button>
+            <chops-button @click=${this.save} class="emphasized" ?disabled=${!this.selectedTemplate}>
+              Convert issue
+            </chops-button>
+          </div>
+        </form>
+      </chops-dialog>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      convertingIssue: {
+        type: Boolean,
+      },
+      convertIssueError: {
+        type: Object,
+      },
+      issuePermissions: {
+        type: Object,
+      },
+      issueRef: {
+        type: Object,
+      },
+      projectTemplates: {
+        type: Array,
+      },
+      selectedTemplate: {
+        type: String,
+      },
+      sendEmail: {
+        type: Boolean,
+      },
+    };
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.convertingIssue = issueV0.requests(state).convert.requesting;
+    this.convertIssueError = issueV0.requests(state).convert.error;
+    this.issueRef = issueV0.viewedIssueRef(state);
+    this.issuePermissions = issueV0.permissions(state);
+    this.projectTemplates = projectV0.viewedTemplates(state);
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.selectedTemplate = '';
+    this.sendEmail = true;
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('convertingIssue')) {
+      if (!this.convertingIssue && !this.convertIssueError) {
+        this.close();
+      }
+    }
+  }
+
+  open() {
+    this.reset();
+    const dialog = this.shadowRoot.querySelector('chops-dialog');
+    dialog.open();
+  }
+
+  close() {
+    const dialog = this.shadowRoot.querySelector('chops-dialog');
+    dialog.close();
+  }
+
+  /**
+   * Resets the user's input.
+   */
+  reset() {
+    this.shadowRoot.querySelector('#convertIssueForm').reset();
+  }
+
+  /**
+   * Dispatches a Redux action to convert the issue to a new template.
+   */
+  save() {
+    const commentContent = this.shadowRoot.querySelector('#commentContent');
+    store.dispatch(issueV0.convert(this.issueRef, {
+      templateName: this.selectedTemplate,
+      commentContent: commentContent.value,
+      sendEmail: this.sendEmail,
+    }));
+  }
+
+  _sendEmailChecked(evt) {
+    this.sendEmail = evt.detail.checked;
+  }
+
+  _templateInputChanged() {
+    this.selectedTemplate = this.shadowRoot.querySelector(
+        '#templateInput').value;
+  }
+}
+
+customElements.define('mr-convert-issue', MrConvertIssue);
diff --git a/static_src/elements/issue-detail/dialogs/mr-convert-issue/mr-convert-issue.test.js b/static_src/elements/issue-detail/dialogs/mr-convert-issue/mr-convert-issue.test.js
new file mode 100644
index 0000000..b68e274
--- /dev/null
+++ b/static_src/elements/issue-detail/dialogs/mr-convert-issue/mr-convert-issue.test.js
@@ -0,0 +1,30 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrConvertIssue} from './mr-convert-issue.js';
+
+let element;
+
+describe('mr-convert-issue', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-convert-issue');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrConvertIssue);
+  });
+
+  it('no template chosen', async () => {
+    await element.updateComplete;
+
+    const buttons = element.shadowRoot.querySelectorAll('chops-button');
+    assert.isTrue(buttons[buttons.length - 1].disabled);
+  });
+});
diff --git a/static_src/elements/issue-detail/dialogs/mr-edit-description/mr-edit-description.js b/static_src/elements/issue-detail/dialogs/mr-edit-description/mr-edit-description.js
new file mode 100644
index 0000000..2a34b8f
--- /dev/null
+++ b/static_src/elements/issue-detail/dialogs/mr-edit-description/mr-edit-description.js
@@ -0,0 +1,340 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import 'elements/framework/mr-upload/mr-upload.js';
+import 'elements/framework/mr-error/mr-error.js';
+import {fieldTypes} from 'shared/issue-fields.js';
+import {store, connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as userV0 from 'reducers/userV0.js';
+import 'elements/chops/chops-checkbox/chops-checkbox.js';
+import 'elements/chops/chops-dialog/chops-dialog.js';
+import {SHARED_STYLES, MD_PREVIEW_STYLES, MD_STYLES} from 'shared/shared-styles.js';
+import {commentListToDescriptionList} from 'shared/convertersV0.js';
+import {renderMarkdown, shouldRenderMarkdown} from 'shared/md-helper.js';
+import {unsafeHTML} from 'lit-html/directives/unsafe-html.js';
+
+
+/**
+ * `<mr-edit-description>`
+ *
+ * A dialog to edit descriptions.
+ *
+ */
+export class MrEditDescription extends connectStore(LitElement) {
+  /** @override */
+  constructor() {
+    super();
+    this._editedDescription = '';
+  }
+
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      MD_PREVIEW_STYLES,
+      MD_STYLES,
+      css`
+        chops-dialog {
+          --chops-dialog-width: 800px;
+        }
+        textarea {
+          font-family: var(--mr-toggled-font-family);
+          min-height: 300px;
+          max-height: 500px;
+          border: var(--chops-accessible-border);
+          padding: 0.5em 4px;
+          margin: 0.5em 0;
+        }
+        .attachments {
+          margin: 0.5em 0;
+        }
+        .content {
+          padding: 0.5em 0.5em;
+          width: 100%;
+          box-sizing: border-box;
+        }
+        .edit-controls {
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
+            rel="stylesheet">
+      <chops-dialog aria-labelledby="editDialogTitle">
+        <h3 id="editDialogTitle" class="medium-heading">
+          Edit ${this._title}
+        </h3>
+        <textarea
+          id="description"
+          class="content"
+          @keyup=${this._setEditedDescription}
+          @change=${this._setEditedDescription}
+          .value=${this._editedDescription}
+        ></textarea>
+        ${this._renderMarkdown ? html`
+          <div class="markdown-preview preview-height-description">
+            <div class="markdown">
+              ${unsafeHTML(renderMarkdown(this._editedDescription))}
+            </div>
+          </div>`: ''}
+        <h3 class="medium-heading">
+          Add attachments
+        </h3>
+        <div class="attachments">
+          ${this._attachments && this._attachments.map((attachment) => html`
+            <label>
+              <chops-checkbox
+                type="checkbox"
+                checked="true"
+                class="kept-attachment"
+                data-attachment-id=${attachment.attachmentId}
+                @checked-change=${this._keptAttachmentIdsChanged}
+              />
+              <a href=${attachment.viewUrl} target="_blank">
+                ${attachment.filename}
+              </a>
+            </label>
+            <br>
+          `)}
+          <mr-upload></mr-upload>
+        </div>
+        <mr-error
+          ?hidden=${!this._attachmentError}
+        >${this._attachmentError}</mr-error>
+        <div class="edit-controls">
+          <chops-checkbox
+            id="sendEmail"
+            ?checked=${this._sendEmail}
+            @checked-change=${this._setSendEmail}
+          >Send email</chops-checkbox>
+          <div>
+            <chops-button id="discard" @click=${this.cancel} class="de-emphasized">
+              Discard
+            </chops-button>
+            <chops-button id="save" @click=${this.save} class="emphasized">
+              Save changes
+            </chops-button>
+          </div>
+        </div>
+      </chops-dialog>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      commentsByApproval: {type: Array},
+      issueRef: {type: Object},
+      fieldName: {type: String},
+      projectName: {type: String},
+      _attachmentError: {type: String},
+      _attachments: {type: Array},
+      _boldLines: {type: Array},
+      _editedDescription: {type: String},
+      _title: {type: String},
+      _keptAttachmentIds: {type: Object},
+      _sendEmail: {type: Boolean},
+      _prefs: {type: Object},
+    };
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.commentsByApproval = issueV0.commentsByApprovalName(state);
+    this.issueRef = issueV0.viewedIssueRef(state);
+    this.projectName = projectV0.viewedProjectName(state);
+    this._prefs = userV0.prefs(state);
+  }
+
+  /**
+   * Public function to open the issue description editing dialog.
+   * @param {Event} e
+   */
+  async open(e) {
+    await this.updateComplete;
+    this.shadowRoot.querySelector('chops-dialog').open();
+    this.fieldName = e.detail.fieldName;
+    this.reset();
+  }
+
+  /**
+   * Resets edit form.
+   */
+  async reset() {
+    await this.updateComplete;
+    this._attachmentError = '';
+    this._attachments = [];
+    this._boldLines = [];
+    this._keptAttachmentIds = new Set();
+
+    const uploader = this.shadowRoot.querySelector('mr-upload');
+    if (uploader) {
+      uploader.reset();
+    }
+
+    // Sets _editedDescription and _title.
+    this._initializeView(this.commentsByApproval, this.fieldName);
+
+    this.shadowRoot.querySelectorAll('.kept-attachment').forEach((checkbox) => {
+      checkbox.checked = true;
+    });
+    this.shadowRoot.querySelector('#sendEmail').checked = true;
+
+    this._sendEmail = true;
+  }
+
+  /**
+   * Cancels in-flight edit data.
+   */
+  async cancel() {
+    await this.updateComplete;
+    this.shadowRoot.querySelector('chops-dialog').close();
+  }
+
+  /**
+   * Sends the user's edit to Monorail's backend to be saved.
+   */
+  async save() {
+    const commentContent = this._markupNewContent();
+    const sendEmail = this._sendEmail;
+    const keptAttachments = Array.from(this._keptAttachmentIds);
+    const message = {
+      issueRef: this.issueRef,
+      isDescription: true,
+      commentContent,
+      keptAttachments,
+      sendEmail,
+    };
+
+    try {
+      const uploader = this.shadowRoot.querySelector('mr-upload');
+      const uploads = await uploader.loadFiles();
+      if (uploads && uploads.length) {
+        message.uploads = uploads;
+      }
+
+      if (!this.fieldName) {
+        store.dispatch(issueV0.update(message));
+      } else {
+        // This is editing an approval if there is no field name.
+        message.fieldRef = {
+          type: fieldTypes.APPROVAL_TYPE,
+          fieldName: this.fieldName,
+        };
+        store.dispatch(issueV0.updateApproval(message));
+      }
+      this.shadowRoot.querySelector('chops-dialog').close();
+    } catch (e) {
+      this._attachmentError = `Error while loading file for attachment: ${
+        e.message}`;
+    }
+  }
+
+  /**
+   * Getter for checking if the user has Markdown enabled.
+   * @return {boolean} Whether Markdown preview should be rendered or not.
+   */
+   get _renderMarkdown() {
+    const enabled = this._prefs.get('render_markdown');
+    return shouldRenderMarkdown({project: this.projectName, enabled});
+  }
+
+  /**
+   * Event handler for keeping <mr-edit-description>'s copy of
+   * _editedDescription in sync.
+   * @param {Event} e
+   */
+  _setEditedDescription(e) {
+    const target = e.target;
+    this._editedDescription = target.value;
+  }
+
+  /**
+   * Event handler for keeping attachment state in sync.
+   * @param {Event} e
+   */
+  _keptAttachmentIdsChanged(e) {
+    e.target.checked = e.detail.checked;
+    const attachmentId = Number.parseInt(e.target.dataset.attachmentId);
+    if (e.target.checked) {
+      this._keptAttachmentIds.add(attachmentId);
+    } else {
+      this._keptAttachmentIds.delete(attachmentId);
+    }
+  }
+
+  _initializeView(commentsByApproval, fieldName) {
+    this._title = fieldName ? `${fieldName} Survey` : 'Description';
+    const key = fieldName || '';
+    if (!commentsByApproval || !commentsByApproval.has(key)) return;
+    const comments = commentListToDescriptionList(commentsByApproval.get(key));
+
+    const comment = comments[comments.length - 1];
+
+    if (comment.attachments) {
+      this._keptAttachmentIds = new Set(comment.attachments.map(
+          (attachment) => Number.parseInt(attachment.attachmentId)));
+      this._attachments = comment.attachments;
+    }
+
+    this._processRawContent(comment.content);
+  }
+
+  _processRawContent(content) {
+    const chunks = content.trim().split(/(<b>[^<\n]+<\/b>)/m);
+    const boldLines = [];
+    let cleanContent = '';
+    chunks.forEach((chunk) => {
+      if (chunk.startsWith('<b>') && chunk.endsWith('</b>')) {
+        const cleanChunk = chunk.slice(3, -4).trim();
+        cleanContent += cleanChunk;
+        // Don't add whitespace to boldLines.
+        if (/\S/.test(cleanChunk)) {
+          boldLines.push(cleanChunk);
+        }
+      } else {
+        cleanContent += chunk;
+      }
+    });
+
+    this._boldLines = boldLines;
+    this._editedDescription = cleanContent;
+  }
+
+  _markupNewContent() {
+    const lines = this._editedDescription.trim().split('\n');
+    const markedLines = lines.map((line) => {
+      let markedLine = line;
+      const matchingBoldLine = this._boldLines.find(
+          (boldLine) => (line.startsWith(boldLine)));
+      if (matchingBoldLine) {
+        markedLine =
+          `<b>${matchingBoldLine}</b>${line.slice(matchingBoldLine.length)}`;
+      }
+      return markedLine;
+    });
+    return markedLines.join('\n');
+  }
+
+  /**
+   * Event handler for keeping email state in sync.
+   * @param {Event} e
+   */
+  _setSendEmail(e) {
+    this._sendEmail = e.detail.checked;
+  }
+}
+
+customElements.define('mr-edit-description', MrEditDescription);
diff --git a/static_src/elements/issue-detail/dialogs/mr-edit-description/mr-edit-description.test.js b/static_src/elements/issue-detail/dialogs/mr-edit-description/mr-edit-description.test.js
new file mode 100644
index 0000000..e3fe9d2
--- /dev/null
+++ b/static_src/elements/issue-detail/dialogs/mr-edit-description/mr-edit-description.test.js
@@ -0,0 +1,136 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrEditDescription} from './mr-edit-description.js';
+
+let element;
+
+describe('mr-edit-description', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-edit-description');
+
+    document.body.appendChild(element);
+    element.commentsByApproval = new Map([
+      ['', [
+        {
+          descriptionNum: 1,
+          content: 'first description',
+        },
+        {
+          content: 'first comment',
+        },
+        {
+          descriptionNum: 2,
+          content: '<b>last</b> description',
+        },
+        {
+          content: 'second comment',
+        },
+        {
+          content: 'third comment',
+        },
+      ]], ['foo', [
+        {
+          descriptionNum: 1,
+          content: 'first foo survey',
+          approvalRef: {
+            fieldName: 'foo',
+          },
+        },
+        {
+          descriptionNum: 2,
+          content: 'last foo survey',
+          approvalRef: {
+            fieldName: 'foo',
+          },
+        },
+      ]], ['bar', [
+        {
+          descriptionNum: 1,
+          content: 'bar survey',
+          approvalRef: {
+            fieldName: 'bar',
+          },
+        },
+      ]],
+    ]);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrEditDescription);
+  });
+
+  it('selects last issue description', async () => {
+    element.fieldName = '';
+    element.reset();
+
+    await element.updateComplete;
+
+    assert.equal(element._editedDescription, 'last description');
+    assert.equal(element._title, 'Description');
+  });
+
+  it('selects last survey', async () => {
+    element.fieldName = 'foo';
+    element.reset();
+
+    await element.updateComplete;
+
+    assert.equal(element._editedDescription, 'last foo survey');
+    assert.equal(element._title, 'foo Survey');
+  });
+
+  it('toggle sendEmail', async () => {
+    element.reset();
+    await element.updateComplete;
+
+    const sendEmail = element.shadowRoot.querySelector('#sendEmail');
+
+    await sendEmail.updateComplete;
+
+    sendEmail.click();
+    await element.updateComplete;
+    assert.isFalse(element._sendEmail);
+
+    sendEmail.click();
+    await element.updateComplete;
+    assert.isTrue(element._sendEmail);
+
+    sendEmail.click();
+    await element.updateComplete;
+    assert.isFalse(element._sendEmail);
+  });
+
+  it('renders valid markdown description with preview class', async () => {
+    element.projectName = 'monkeyrail';
+    element._prefs = new Map([['render_markdown', true]]);
+    element.reset();
+
+    element._editedDescription = '# h1';
+
+    await element.updateComplete;
+
+    const previewMarkdown = element.shadowRoot.querySelector('.markdown-preview');
+    assert.isNotNull(previewMarkdown);
+
+    const headerText = previewMarkdown.querySelector('h1').textContent;
+    assert.equal(headerText, 'h1');
+  });
+
+  it('does not show preview when markdown is disabled', async () => {
+    element.projectName = 'disabled_project';
+    element._prefs = new Map([['render_markdown', true]]);
+    element.reset();
+
+    await element.updateComplete;
+
+    const previewMarkdown = element.shadowRoot.querySelector('.markdown-preview');
+    assert.isNull(previewMarkdown);
+  });
+});
diff --git a/static_src/elements/issue-detail/dialogs/mr-move-copy-issue/mr-move-copy-issue.js b/static_src/elements/issue-detail/dialogs/mr-move-copy-issue/mr-move-copy-issue.js
new file mode 100644
index 0000000..e97f203
--- /dev/null
+++ b/static_src/elements/issue-detail/dialogs/mr-move-copy-issue/mr-move-copy-issue.js
@@ -0,0 +1,129 @@
+// Copyright 2019 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.
+
+import page from 'page';
+import {LitElement, html, css} from 'lit-element';
+
+import {connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import 'elements/framework/mr-autocomplete/mr-autocomplete.js';
+import 'elements/chops/chops-button/chops-button.js';
+import 'elements/chops/chops-dialog/chops-dialog.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import {prpcClient} from 'prpc-client-instance.js';
+
+export class MrMoveCopyIssue extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        .target-project-dialog {
+          display: block;
+          font-size: var(--chops-main-font-size);
+        }
+        .error {
+          max-width: 100%;
+          color: red;
+          margin-bottom: 1em;
+        }
+        .edit-actions {
+          width: 100%;
+          margin: 0.5em 0;
+          text-align: right;
+        }
+        input {
+          box-sizing: border-box;
+          width: 95%;
+          padding: 0.25em 4px;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
+            rel="stylesheet">
+      <chops-dialog closeOnOutsideClick>
+        <div class="target-project-dialog">
+          <h3 class="medium-heading">${this._action} issue</h3>
+          <div class="input-grid">
+            <label for="targetProjectInput">Target project:</label>
+            <div>
+              <input id="targetProjectInput" />
+              <mr-autocomplete
+                vocabularyName="project"
+                for="targetProjectInput"
+              ></mr-autocomplete>
+            </div>
+          </div>
+
+          ${this._targetProjectError ? html`
+            <div class="error">
+              ${this._targetProjectError}
+            </div>
+          ` : ''}
+
+          <div class="edit-actions">
+            <chops-button @click=${this.cancel} class="de-emphasized">
+              Cancel
+            </chops-button>
+            <chops-button @click=${this.save} class="emphasized">
+              ${this._action} issue
+            </chops-button>
+          </div>
+        </div>
+      </chops-dialog>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      issueRef: {type: Object},
+      _action: {type: String},
+      _targetProjectError: {type: String},
+    };
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.issueRef = issueV0.viewedIssueRef(state);
+  }
+
+  open(e) {
+    this.shadowRoot.querySelector('chops-dialog').open();
+    this._action = e.detail.action;
+    this.reset();
+  }
+
+  reset() {
+    this.shadowRoot.querySelector('#targetProjectInput').value = '';
+    this._targetProjectError = '';
+  }
+
+  cancel() {
+    this.shadowRoot.querySelector('chops-dialog').close();
+  }
+
+  save() {
+    const method = this._action + 'Issue';
+    prpcClient.call('monorail.Issues', method, {
+      issueRef: this.issueRef,
+      targetProjectName: this.shadowRoot.querySelector(
+          '#targetProjectInput').value,
+    }).then((response) => {
+      const projectName = response.newIssueRef.projectName;
+      const localId = response.newIssueRef.localId;
+      page(`/p/${projectName}/issues/detail?id=${localId}`);
+      this.cancel();
+    }, (error) => {
+      this._targetProjectError = error;
+    });
+  }
+}
+
+customElements.define('mr-move-copy-issue', MrMoveCopyIssue);
diff --git a/static_src/elements/issue-detail/dialogs/mr-move-copy-issue/mr-move-copy-issue.test.js b/static_src/elements/issue-detail/dialogs/mr-move-copy-issue/mr-move-copy-issue.test.js
new file mode 100644
index 0000000..5fdfb39
--- /dev/null
+++ b/static_src/elements/issue-detail/dialogs/mr-move-copy-issue/mr-move-copy-issue.test.js
@@ -0,0 +1,23 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrMoveCopyIssue} from './mr-move-copy-issue.js';
+
+let element;
+
+describe('mr-move-copy-issue', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-move-copy-issue');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrMoveCopyIssue);
+  });
+});
diff --git a/static_src/elements/issue-detail/dialogs/mr-related-issues/mr-related-issues.js b/static_src/elements/issue-detail/dialogs/mr-related-issues/mr-related-issues.js
new file mode 100644
index 0000000..e859bef
--- /dev/null
+++ b/static_src/elements/issue-detail/dialogs/mr-related-issues/mr-related-issues.js
@@ -0,0 +1,316 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import 'elements/chops/chops-dialog/chops-dialog.js';
+import 'elements/framework/links/mr-issue-link/mr-issue-link.js';
+import {store, connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import {ISSUE_EDIT_PERMISSION} from 'shared/consts/permissions';
+import {prpcClient} from 'prpc-client-instance.js';
+
+/**
+ * `<mr-related-issues>`
+ *
+ * Component for showing a mini list view of blocking issues to users.
+ */
+export class MrRelatedIssues extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          display: block;
+          font-size: var(--chops-main-font-size);
+        }
+        table {
+          word-wrap: break-word;
+          width: 100%;
+        }
+        tr {
+          font-weight: normal;
+          text-align: left;
+          margin: 0 auto;
+          padding: 2em 1em;
+          height: 20px;
+        }
+        td {
+          background: #f8f8f8;
+          padding: 4px;
+          padding-left: 8px;
+          text-overflow: ellipsis;
+        }
+        th {
+          text-decoration: none;
+          margin-right: 0;
+          padding-right: 0;
+          padding-left: 8px;
+          white-space: nowrap;
+          background: #e3e9ff;
+          text-align: left;
+          border-right: 1px solid #fff;
+          border-top: 1px solid #fff;
+        }
+        tr.dragged td {
+          background: #eee;
+        }
+        h3.medium-heading {
+          display: flex;
+          justify-content: space-between;
+          align-items: flex-end;
+        }
+        button {
+          background: none;
+          border: none;
+          color: inherit;
+          cursor: pointer;
+          margin: 0;
+          padding: 0;
+        }
+        i.material-icons {
+          font-size: var(--chops-icon-font-size);
+          color: var(--chops-primary-icon-color);
+        }
+        .draggable {
+          cursor: grab;
+        }
+        .error {
+          max-width: 100%;
+          color: red;
+          margin-bottom: 1em;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    const rerankEnabled = (this.issuePermissions ||
+      []).includes(ISSUE_EDIT_PERMISSION);
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <chops-dialog closeOnOutsideClick>
+        <h3 class="medium-heading">
+          <span>Blocked on issues</span>
+          <button aria-label="close" @click=${this.close}>
+            <i class="material-icons">close</i>
+          </button>
+        </h3>
+        ${this.error ? html`
+          <div class="error">${this.error}</div>
+        ` : ''}
+        <table><tbody>
+          <tr>
+            ${rerankEnabled ? html`<th></th>` : ''}
+            ${this.columns.map((column) => html`
+              <th>${column}</th>
+            `)}
+          </tr>
+
+          ${this._renderedRows.map((row, index) => html`
+            <tr
+              class=${index === this.srcIndex ? 'dragged' : ''}
+              draggable=${rerankEnabled && row.draggable}
+              data-index=${index}
+              @dragstart=${this._dragstart}
+              @dragend=${this._dragend}
+              @dragover=${this._dragover}
+              @drop=${this._dragdrop}
+            >
+              ${rerankEnabled ? html`
+                <td>
+                  ${rerankEnabled && row.draggable ? html`
+                    <i class="material-icons draggable">drag_indicator</i>
+                  ` : ''}
+                </td>
+              ` : ''}
+
+              ${row.cells.map((cell) => html`
+                <td>
+                  ${cell.type === 'issue' ? html`
+                    <mr-issue-link
+                      .projectName=${this.issueRef.projectName}
+                      .issue=${cell.issue}
+                    ></mr-issue-link>
+                  ` : ''}
+                  ${cell.type === 'text' ? cell.content : ''}
+                </td>
+              `)}
+            </tr>
+          `)}
+        </tbody></table>
+      </chops-dialog>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      columns: {type: Array},
+      error: {type: String},
+      srcIndex: {type: Number},
+      issueRef: {type: Object},
+      issuePermissions: {type: Array},
+      sortedBlockedOn: {type: Array},
+      _renderedRows: {type: Array},
+    };
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.issueRef = issueV0.viewedIssueRef(state);
+    this.issuePermissions = issueV0.permissions(state);
+    this.sortedBlockedOn = issueV0.sortedBlockedOn(state);
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.columns = ['Issue', 'Summary'];
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('sortedBlockedOn')) {
+      this.reset();
+    }
+    super.update(changedProperties);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('issueRef')) {
+      this.close();
+    }
+  }
+
+  get _rows() {
+    const blockedOn = this.sortedBlockedOn;
+    if (!blockedOn) return [];
+    return blockedOn.map((issue) => {
+      const isClosed = issue.statusRef ? !issue.statusRef.meansOpen : false;
+      let summary = issue.summary;
+      if (issue.extIdentifier) {
+        // Some federated references will have summaries.
+        summary = issue.summary || '(not available)';
+      }
+      const row = {
+        // Disallow reranking FedRefs/DanglingIssueRelations.
+        draggable: !isClosed && !issue.extIdentifier,
+        cells: [
+          {
+            type: 'issue',
+            issue: issue,
+            isClosed: Boolean(isClosed),
+          },
+          {
+            type: 'text',
+            content: summary,
+          },
+        ],
+      };
+      return row;
+    });
+  }
+
+  async open() {
+    await this.updateComplete;
+    this.reset();
+    this.shadowRoot.querySelector('chops-dialog').open();
+  }
+
+  close() {
+    this.shadowRoot.querySelector('chops-dialog').close();
+  }
+
+  reset() {
+    this.error = null;
+    this.srcIndex = null;
+    this._renderedRows = this._rows.slice();
+  }
+
+  _dragstart(e) {
+    if (e.currentTarget.draggable) {
+      this.srcIndex = Number(e.currentTarget.dataset.index);
+      e.dataTransfer.setDragImage(new Image(), 0, 0);
+    }
+  }
+
+  _dragover(e) {
+    if (e.currentTarget.draggable && this.srcIndex !== null) {
+      e.preventDefault();
+      const targetIndex = Number(e.currentTarget.dataset.index);
+      this._reorderRows(this.srcIndex, targetIndex);
+      this.srcIndex = targetIndex;
+    }
+  }
+
+  _dragend(e) {
+    if (this.srcIndex !== null) {
+      this.reset();
+    }
+  }
+
+  _dragdrop(e) {
+    if (e.currentTarget.draggable && this.srcIndex !== null) {
+      const src = this._renderedRows[this.srcIndex];
+      if (this.srcIndex > 0) {
+        const target = this._renderedRows[this.srcIndex - 1];
+        const above = false;
+        this._reorderBlockedOn(src, target, above);
+      } else if (this.srcIndex === 0 &&
+                 this._renderedRows[1] && this._renderedRows[1].draggable) {
+        const target = this._renderedRows[1];
+        const above = true;
+        this._reorderBlockedOn(src, target, above);
+      }
+      this.srcIndex = null;
+    }
+  }
+
+  _reorderBlockedOn(srcArg, targetArg, above) {
+    const src = srcArg.cells[0].issue;
+    const target = targetArg.cells[0].issue;
+
+    const reorderRequest = prpcClient.call(
+        'monorail.Issues', 'RerankBlockedOnIssues', {
+          issueRef: this.issueRef,
+          movedRef: {
+            projectName: src.projectName,
+            localId: src.localId,
+          },
+          targetRef: {
+            projectName: target.projectName,
+            localId: target.localId,
+          },
+          splitAbove: above,
+        });
+
+    reorderRequest.then((response) => {
+      store.dispatch(issueV0.fetch(this.issueRef));
+    }, (error) => {
+      this.reset();
+      this.error = error.description;
+    });
+  }
+
+  _reorderRows(srcIndex, toIndex) {
+    if (srcIndex <= toIndex) {
+      this._renderedRows = this._renderedRows.slice(0, srcIndex).concat(
+          this._renderedRows.slice(srcIndex + 1, toIndex + 1),
+          [this._renderedRows[srcIndex]],
+          this._renderedRows.slice(toIndex + 1));
+    } else {
+      this._renderedRows = this._renderedRows.slice(0, toIndex).concat(
+          [this._renderedRows[srcIndex]],
+          this._renderedRows.slice(toIndex, srcIndex),
+          this._renderedRows.slice(srcIndex + 1));
+    }
+  }
+}
+
+customElements.define('mr-related-issues', MrRelatedIssues);
diff --git a/static_src/elements/issue-detail/dialogs/mr-related-issues/mr-related-issues.test.js b/static_src/elements/issue-detail/dialogs/mr-related-issues/mr-related-issues.test.js
new file mode 100644
index 0000000..69ce7ee
--- /dev/null
+++ b/static_src/elements/issue-detail/dialogs/mr-related-issues/mr-related-issues.test.js
@@ -0,0 +1,191 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrRelatedIssues} from './mr-related-issues.js';
+
+
+let element;
+
+describe('mr-related-issues', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-related-issues');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrRelatedIssues);
+  });
+
+  it('dialog closes when issueRef changes', async () => {
+    element.issueRef = {projectName: 'chromium', localId: 22};
+    await element.updateComplete;
+
+    const dialog = element.shadowRoot.querySelector('chops-dialog');
+
+    element.open();
+    await element.updateComplete;
+
+    assert.isTrue(dialog.opened);
+
+    element.issueRef = {projectName: 'chromium', localId: 23};
+    await element.updateComplete;
+
+    assert.isFalse(dialog.opened);
+  });
+
+  it('computes blocked on table rows', () => {
+    element.projectName = 'proj';
+    element.sortedBlockedOn = [
+      {projectName: 'proj', localId: 1, statusRef: {meansOpen: true},
+        summary: 'Issue 1'},
+      {projectName: 'proj', localId: 2, statusRef: {meansOpen: true},
+        summary: 'Issue 2'},
+      {projectName: 'proj', localId: 3,
+        summary: 'Issue 3'},
+      {projectName: 'proj2', localId: 4,
+        summary: 'Issue 4 on another project'},
+      {extIdentifier: 'b/123456', statusRef: {meansOpen: true}},
+      {extIdentifier: 'b/987654', statusRef: {meansOpen: false},
+        summary: 'FedRef with a summary'},
+      {projectName: 'proj', localId: 5, statusRef: {meansOpen: false},
+        summary: 'Issue 5'},
+      {projectName: 'proj2', localId: 6, statusRef: {meansOpen: false},
+        summary: 'Issue 6 on another project'},
+    ];
+    assert.deepEqual(element._rows, [
+      {
+        draggable: true,
+        cells: [
+          {
+            type: 'issue',
+            issue: {projectName: 'proj', localId: 1, statusRef: {meansOpen: true},
+              summary: 'Issue 1'},
+            isClosed: false,
+          },
+          {
+            type: 'text',
+            content: 'Issue 1',
+          },
+        ],
+      },
+      {
+        draggable: true,
+        cells: [
+          {
+            type: 'issue',
+            issue: {projectName: 'proj', localId: 2, statusRef: {meansOpen: true},
+              summary: 'Issue 2'},
+            isClosed: false,
+          },
+          {
+            type: 'text',
+            content: 'Issue 2',
+          },
+        ],
+      },
+      {
+        draggable: true,
+        cells: [
+          {
+            type: 'issue',
+            issue: {projectName: 'proj', localId: 3,
+              summary: 'Issue 3'},
+            isClosed: false,
+          },
+          {
+            type: 'text',
+            content: 'Issue 3',
+          },
+        ],
+      },
+      {
+        draggable: true,
+        cells: [
+          {
+            type: 'issue',
+            issue: {projectName: 'proj2', localId: 4,
+              summary: 'Issue 4 on another project'},
+            isClosed: false,
+          },
+          {
+            type: 'text',
+            content: 'Issue 4 on another project',
+          },
+        ],
+      },
+      {
+        draggable: false,
+        cells: [
+          {
+            type: 'issue',
+            issue: {
+              extIdentifier: 'b/123456',
+              statusRef: {meansOpen: true},
+            },
+            isClosed: false,
+          },
+          {
+            type: 'text',
+            content: '(not available)',
+          },
+        ],
+      },
+      {
+        draggable: false,
+        cells: [
+          {
+            type: 'issue',
+            issue: {
+              extIdentifier: 'b/987654',
+              statusRef: {meansOpen: false},
+              summary: 'FedRef with a summary',
+            },
+            isClosed: true,
+          },
+          {
+            type: 'text',
+            content: 'FedRef with a summary',
+          },
+        ],
+      },
+      {
+        draggable: false,
+        cells: [
+          {
+            type: 'issue',
+            issue: {projectName: 'proj', localId: 5,
+              statusRef: {meansOpen: false},
+              summary: 'Issue 5'},
+            isClosed: true,
+          },
+          {
+            type: 'text',
+            content: 'Issue 5',
+          },
+        ],
+      },
+      {
+        draggable: false,
+        cells: [
+          {
+            type: 'issue',
+            issue: {projectName: 'proj2', localId: 6,
+              statusRef: {meansOpen: false},
+              summary: 'Issue 6 on another project'},
+            isClosed: true,
+          },
+          {
+            type: 'text',
+            content: 'Issue 6 on another project',
+          },
+        ],
+      },
+    ]);
+  });
+});
diff --git a/static_src/elements/issue-detail/metadata/mr-edit-field/mr-edit-field.js b/static_src/elements/issue-detail/metadata/mr-edit-field/mr-edit-field.js
new file mode 100644
index 0000000..18bd963
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-edit-field/mr-edit-field.js
@@ -0,0 +1,288 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+
+import deepEqual from 'deep-equal';
+import {fieldTypes, EMPTY_FIELD_VALUE} from 'shared/issue-fields.js';
+import {arrayDifference, equalsIgnoreCase} from 'shared/helpers.js';
+import {NON_EDITING_KEY_EVENTS} from 'shared/dom-helpers.js';
+
+import './mr-multi-checkbox.js';
+import 'react/mr-react-autocomplete.tsx';
+
+const AUTOCOMPLETE_INPUT = 'AUTOCOMPLETE_INPUT';
+const CHECKBOX_INPUT = 'CHECKBOX_INPUT';
+const SELECT_INPUT = 'SELECT_INPUT';
+
+/**
+ * `<mr-edit-field>`
+ *
+ * A single edit input for a fieldDef + the values of the field.
+ *
+ */
+export class MrEditField extends LitElement {
+  /** @override */
+  createRenderRoot() {
+    return this;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
+            rel="stylesheet">
+      <style>
+        mr-edit-field {
+          display: block;
+        }
+        mr-edit-field[hidden] {
+          display: none;
+        }
+        mr-edit-field input,
+        mr-edit-field select {
+          width: var(--mr-edit-field-width);
+          padding: var(--mr-edit-field-padding);
+        }
+      </style>
+      ${this._renderInput()}
+    `;
+  }
+
+  /**
+   * Renders a single input field.
+   * @return {TemplateResult}
+   */
+  _renderInput() {
+    switch (this._widgetType) {
+      case CHECKBOX_INPUT:
+        return html`
+          <mr-multi-checkbox
+            .options=${this.options}
+            .values=${[...this.values]}
+            @change=${this._changeHandler}
+          ></mr-multi-checkbox>
+        `;
+      case SELECT_INPUT:
+        return html`
+          <select
+            id="${this.label}"
+            class="editSelect"
+            aria-label=${this.name}
+            @change=${this._changeHandler}
+          >
+            <option value="">${EMPTY_FIELD_VALUE}</option>
+            ${this.options.map((option) => html`
+              <option
+                value=${option.optionName}
+                .selected=${this.value === option.optionName}
+              >
+                ${option.optionName}
+                ${option.docstring ? ' = ' + option.docstring : ''}
+              </option>
+            `)}
+          </select>
+        `;
+      case AUTOCOMPLETE_INPUT:
+        return html`
+          <mr-react-autocomplete
+            .label=${this.label}
+            .vocabularyName=${this.acType || ''}
+            .inputType=${this._html5InputType}
+            .fixedValues=${this.derivedValues}
+            .value=${this.multi ? this.values : this.value}
+            .multiple=${this.multi}
+            .onChange=${this._changeHandlerReact.bind(this)}
+          ></mr-react-autocomplete>
+        `;
+      default:
+        return '';
+    }
+  }
+
+
+  /** @override */
+  static get properties() {
+    return {
+      // TODO(zhangtiff): Redesign this a bit so we don't need two separate
+      // ways of specifying "type" for a field. Right now, "type" is mapped to
+      // the Monorail custom field types whereas "acType" includes additional
+      // data types such as components, and labels.
+      // String specifying what kind of autocomplete to add to this field.
+      acType: {type: String},
+      // "type" is based on the various custom field types available in
+      // Monorail.
+      type: {type: String},
+      label: {type: String},
+      multi: {type: Boolean},
+      name: {type: String},
+      // Only used for basic, non-repeated fields.
+      placeholder: {type: String},
+      initialValues: {
+        type: Array,
+        hasChanged(newVal, oldVal) {
+          // Prevent extra recomputations of the same initial value causing
+          // values to be reset.
+          return !deepEqual(newVal, oldVal);
+        },
+      },
+      // The current user-inputted values for a field.
+      values: {type: Array},
+      derivedValues: {type: Array},
+      // For enum fields, the possible options that you have. Each entry is a
+      // label type with an additional optionName field added.
+      options: {type: Array},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.initialValues = [];
+    this.values = [];
+    this.derivedValues = [];
+    this.options = [];
+    this.multi = false;
+
+    this.actType = '';
+    this.placeholder = '';
+    this.type = '';
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('initialValues')) {
+      // Assume we always want to reset the user's input when initial
+      // values change.
+      this.reset();
+    }
+    super.update(changedProperties);
+  }
+
+  /**
+   * @return {string}
+   */
+  get value() {
+    return _getSingleValue(this.values);
+  }
+
+  /**
+   * @return {string}
+   */
+  get _widgetType() {
+    const type = this.type;
+    const multi = this.multi;
+    if (type === fieldTypes.ENUM_TYPE) {
+      if (multi) {
+        return CHECKBOX_INPUT;
+      }
+      return SELECT_INPUT;
+    } else {
+      return AUTOCOMPLETE_INPUT;
+    }
+  }
+
+  /**
+   * @return {string} HTML type for the input.
+   */
+  get _html5InputType() {
+    const type = this.type;
+    if (type === fieldTypes.INT_TYPE) {
+      return 'number';
+    } else if (type === fieldTypes.DATE_TYPE) {
+      return 'date';
+    }
+    return 'text';
+  }
+
+  /**
+   * Reset form values to initial state.
+   */
+  reset() {
+    this.values = _wrapInArray(this.initialValues);
+  }
+
+  /**
+   * Return the values that the user added to this input.
+   * @return {Array<string>}åß
+   */
+  getValuesAdded() {
+    if (!this.values || !this.values.length) return [];
+    return arrayDifference(
+        this.values, this.initialValues, equalsIgnoreCase);
+  }
+
+  /**
+   * Return the values that the userremoved from this input.
+   * @return {Array<string>}
+   */
+  getValuesRemoved() {
+    if (!this.multi && (!this.values || this.values.length > 0)) return [];
+    return arrayDifference(
+        this.initialValues, this.values, equalsIgnoreCase);
+  }
+
+  /**
+   * Syncs form values and fires a change event as the user edits the form.
+   * @param {Event} e
+   * @fires Event#change
+   * @private
+   */
+  _changeHandler(e) {
+    if (e instanceof KeyboardEvent) {
+      if (NON_EDITING_KEY_EVENTS.has(e.key)) return;
+    }
+    const input = e.target;
+
+    if (input.getValues) {
+      // <mr-multi-checkbox> support.
+      this.values = input.getValues();
+    } else {
+      // Is a native input element.
+      const value = input.value.trim();
+      this.values = _wrapInArray(value);
+    }
+
+    this.dispatchEvent(new Event('change'));
+  }
+
+  /**
+   * Syncs form values and fires a change event as the user edits the form.
+   * @param {React.SyntheticEvent} _e
+   * @param {string|Array<string>|null} value React autcoomplete form value.
+   * @fires Event#change
+   * @private
+   */
+  _changeHandlerReact(_e, value) {
+    this.values = _wrapInArray(value);
+
+    this.dispatchEvent(new Event('change'));
+  }
+}
+
+/**
+ * Returns the string value for a single field.
+ * @param {Array<string>} arr
+ * @return {string}
+ */
+function _getSingleValue(arr) {
+  return (arr && arr.length) ? arr[0] : '';
+}
+
+/**
+ * Returns the string value for a single field.
+ * @param {Array<string>|string} v
+ * @return {string}
+ */
+function _wrapInArray(v) {
+  if (!v) return [];
+
+  let values = v;
+  if (!Array.isArray(v)) {
+    values = !!v ? [v] : [];
+  }
+  return [...values];
+}
+
+customElements.define('mr-edit-field', MrEditField);
diff --git a/static_src/elements/issue-detail/metadata/mr-edit-field/mr-edit-field.test.js b/static_src/elements/issue-detail/metadata/mr-edit-field/mr-edit-field.test.js
new file mode 100644
index 0000000..a718203
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-edit-field/mr-edit-field.test.js
@@ -0,0 +1,215 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import userEvent from '@testing-library/user-event';
+
+import {MrEditField} from './mr-edit-field.js';
+import {fieldTypes} from 'shared/issue-fields.js';
+
+import {enterInput} from 'shared/test/helpers.js';
+
+
+let element;
+let input;
+
+xdescribe('mr-edit-field', () => {
+  beforeEach(async () => {
+    element = document.createElement('mr-edit-field');
+    document.body.appendChild(element);
+
+    element.label = 'testInput';
+    await element.updateComplete;
+
+    input = element.querySelector('#testInput');
+  });
+
+  afterEach(async () => {
+    userEvent.clear(input);
+
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrEditField);
+  });
+
+  it('reset input value', async () => {
+    element.initialValues = [];
+    await element.updateComplete;
+
+    enterInput(input, 'jackalope');
+    await element.updateComplete;
+
+    assert.equal(element.value, 'jackalope');
+
+    element.reset();
+    await element.updateComplete;
+
+    assert.equal(element.value, '');
+  });
+
+  it('input updates when initialValues change', async () => {
+    element.initialValues = ['hello'];
+
+    await element.updateComplete;
+
+    assert.equal(element.value, 'hello');
+  });
+
+  it('initial value does not change after value set', async () => {
+    element.initialValues = ['hello'];
+    element.label = 'testInput';
+    await element.updateComplete;
+
+    input = element.querySelector('#testInput');
+
+    enterInput(input, 'world');
+    await element.updateComplete;
+
+    assert.deepEqual(element.initialValues, ['hello']);
+    assert.equal(element.value, 'world');
+  });
+
+  it('value updates when input is updated', async () => {
+    element.initialValues = ['hello'];
+    await element.updateComplete;
+
+    enterInput(input, 'world');
+    await element.updateComplete;
+
+    assert.equal(element.value, 'world');
+  });
+
+  it('initial value does not change after user input', async () => {
+    element.initialValues = ['hello'];
+    await element.updateComplete;
+
+    enterInput(input, 'jackalope');
+    await element.updateComplete;
+
+    assert.deepEqual(element.initialValues, ['hello']);
+    assert.equal(element.value, 'jackalope');
+  });
+
+  it('get value after user input', async () => {
+    element.initialValues = ['hello'];
+    await element.updateComplete;
+
+    enterInput(input, 'jackalope');
+    await element.updateComplete;
+
+    assert.equal(element.value, 'jackalope');
+  });
+
+  it('input value was added', async () => {
+    // Simulate user input.
+    await element.updateComplete;
+
+    enterInput(input, 'jackalope');
+    await element.updateComplete;
+
+    assert.deepEqual(element.getValuesAdded(), ['jackalope']);
+    assert.deepEqual(element.getValuesRemoved(), []);
+  });
+
+  it('input value was removed', async () => {
+    await element.updateComplete;
+
+    element.initialValues = ['hello'];
+    await element.updateComplete;
+
+    enterInput(input, '');
+    await element.updateComplete;
+
+    assert.deepEqual(element.getValuesAdded(), []);
+    assert.deepEqual(element.getValuesRemoved(), ['hello']);
+  });
+
+  it('input value was changed', async () => {
+    element.initialValues = ['hello'];
+    await element.updateComplete;
+
+    enterInput(input, 'world');
+    await element.updateComplete;
+
+    assert.deepEqual(element.getValuesAdded(), ['world']);
+  });
+
+  it('edit select updates value when initialValues change', async () => {
+    element.multi = false;
+    element.type = fieldTypes.ENUM_TYPE;
+
+    element.options = [
+      {optionName: 'hello'},
+      {optionName: 'jackalope'},
+      {optionName: 'text'},
+    ];
+
+    element.initialValues = ['hello'];
+
+    await element.updateComplete;
+
+    assert.equal(element.value, 'hello');
+
+    const select = element.querySelector('select');
+    userEvent.selectOptions(select, 'jackalope');
+
+    // User input should not be overridden by the initialValue variable.
+    assert.equal(element.value, 'jackalope');
+    // Initial values should not change based on user input.
+    assert.deepEqual(element.initialValues, ['hello']);
+
+    element.initialValues = ['text'];
+    await element.updateComplete;
+
+    assert.equal(element.value, 'text');
+
+    element.initialValues = [];
+    await element.updateComplete;
+
+    assert.deepEqual(element.value, '');
+  });
+
+  it('multi enum updates value on reset', async () => {
+    element.multi = true;
+    element.type = fieldTypes.ENUM_TYPE;
+    element.options = [
+      {optionName: 'hello'},
+      {optionName: 'world'},
+      {optionName: 'fake'},
+    ];
+
+    await element.updateComplete;
+
+    element.initialValues = ['hello'];
+    element.reset();
+    await element.updateComplete;
+
+    assert.deepEqual(element.values, ['hello']);
+
+    const checkboxes = element.querySelector('mr-multi-checkbox');
+
+    // User checks all boxes.
+    checkboxes._inputRefs.forEach(
+        (checkbox) => {
+          checkbox.checked = true;
+        },
+    );
+    checkboxes._changeHandler();
+
+    await element.updateComplete;
+
+    // User input should not be overridden by the initialValues variable.
+    assert.deepEqual(element.values, ['hello', 'world', 'fake']);
+    // Initial values should not change based on user input.
+    assert.deepEqual(element.initialValues, ['hello']);
+
+    element.initialValues = ['hello', 'world'];
+    element.reset();
+    await element.updateComplete;
+
+    assert.deepEqual(element.values, ['hello', 'world']);
+  });
+});
diff --git a/static_src/elements/issue-detail/metadata/mr-edit-field/mr-edit-status.js b/static_src/elements/issue-detail/metadata/mr-edit-field/mr-edit-status.js
new file mode 100644
index 0000000..5303c57
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-edit-field/mr-edit-status.js
@@ -0,0 +1,183 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import {SHARED_STYLES} from 'shared/shared-styles';
+import './mr-edit-field.js';
+
+/**
+ * `<mr-edit-status>`
+ *
+ * Editing form for either an approval or the overall issue.
+ *
+ */
+export class MrEditStatus extends LitElement {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          width: 100%;
+        }
+        select {
+          width: var(--mr-edit-field-width);
+          padding: var(--mr-edit-field-padding);
+        }
+        .grid-input {
+          margin-top: 8px;
+          display: grid;
+          grid-gap: var(--mr-input-grid-gap);
+          grid-template-columns: auto 1fr;
+        }
+        .grid-input[hidden] {
+          display: none;
+        }
+        label {
+          font-weight: bold;
+          word-wrap: break-word;
+          text-align: left;
+        }
+        #mergedIntoInput {
+          width: 160px;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <select
+        @change=${this._selectChangeHandler}
+        aria-label="Status"
+        id="statusInput"
+      >
+        ${this._statusesGrouped.map((group) => html`
+          <optgroup label=${group.name} ?hidden=${!group.name}>
+            ${group.statuses.map((item) => html`
+              <option
+                value=${item.status}
+                .selected=${this.status === item.status}
+              >
+                ${item.status}
+                ${item.docstring ? `= ${item.docstring}` : ''}
+              </option>
+            `)}
+          </optgroup>
+
+          ${!group.name ? html`
+            ${group.statuses.map((item) => html`
+              <option
+                value=${item.status}
+                .selected=${this.status === item.status}
+              >
+                ${item.status}
+                ${item.docstring ? `= ${item.docstring}` : ''}
+              </option>
+            `)}
+          ` : ''}
+        `)}
+      </select>
+
+      <div class="grid-input" ?hidden=${!this._showMergedInto}>
+        <label for="mergedIntoInput" id="mergedIntoLabel">Merged into:</label>
+        <input
+          id="mergedIntoInput"
+          value=${this.mergedInto || ''}
+          @change=${this._changeHandler}
+        ></input>
+      </div>`;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      initialStatus: {type: String},
+      status: {type: String},
+      statuses: {type: Array},
+      isApproval: {type: Boolean},
+      mergedInto: {type: String},
+    };
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('initialStatus')) {
+      this.status = this.initialStatus;
+    }
+    super.update(changedProperties);
+  }
+
+  get _showMergedInto() {
+    const status = this.status || this.initialStatus;
+    return (status === 'Duplicate');
+  }
+
+  get _statusesGrouped() {
+    const statuses = this.statuses;
+    const isApproval = this.isApproval;
+    if (!statuses) return [];
+    if (isApproval) {
+      return [{statuses: statuses}];
+    }
+    return [
+      {
+        name: 'Open',
+        statuses: statuses.filter((s) => s.meansOpen),
+      },
+      {
+        name: 'Closed',
+        statuses: statuses.filter((s) => !s.meansOpen),
+      },
+    ];
+  }
+
+  async reset() {
+    await this.updateComplete;
+    const mergedIntoInput = this.shadowRoot.querySelector('#mergedIntoInput');
+    if (mergedIntoInput) {
+      mergedIntoInput.value = this.mergedInto || '';
+    }
+    this.status = this.initialStatus;
+  }
+
+  get delta() {
+    const result = {};
+
+    if (this.status !== this.initialStatus) {
+      result['status'] = this.status;
+    }
+
+    if (this._showMergedInto) {
+      const newMergedInto = this.shadowRoot.querySelector(
+          '#mergedIntoInput').value;
+      if (newMergedInto !== this.mergedInto) {
+        result['mergedInto'] = newMergedInto;
+      }
+    } else if (this.initialStatus === 'Duplicate') {
+      result['mergedInto'] = '';
+    }
+
+    return result;
+  }
+
+  _selectChangeHandler(e) {
+    const statusInput = e.target;
+    this.status = statusInput.value;
+    this._changeHandler(e);
+  }
+
+  /**
+   * @param {Event} e
+   * @fires CustomEvent#change
+   * @private
+   */
+  _changeHandler(e) {
+    this.dispatchEvent(new CustomEvent('change'));
+  }
+}
+
+customElements.define('mr-edit-status', MrEditStatus);
diff --git a/static_src/elements/issue-detail/metadata/mr-edit-field/mr-edit-status.test.js b/static_src/elements/issue-detail/metadata/mr-edit-field/mr-edit-status.test.js
new file mode 100644
index 0000000..ffa25e5
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-edit-field/mr-edit-status.test.js
@@ -0,0 +1,83 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrEditStatus} from './mr-edit-status.js';
+
+
+let element;
+
+describe('mr-edit-status', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-edit-status');
+    element.statuses = [
+      {'status': 'New'},
+      {'status': 'Old'},
+      {'status': 'Duplicate'},
+    ];
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrEditStatus);
+  });
+
+  it('delta empty when no changes', () => {
+    assert.deepEqual(element.delta, {});
+  });
+
+  it('change status', async () => {
+    element.initialStatus = 'New';
+
+    await element.updateComplete;
+
+    const statusInput = element.shadowRoot.querySelector('select');
+    statusInput.value = 'Old';
+    statusInput.dispatchEvent(new Event('change'));
+
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {status: 'Old'});
+  });
+
+  it('mark as duplicate', async () => {
+    element.initialStatus = 'New';
+
+    await element.updateComplete;
+
+    const statusInput = element.shadowRoot.querySelector('select');
+    statusInput.value = 'Duplicate';
+    statusInput.dispatchEvent(new Event('change'));
+
+    await element.updateComplete;
+
+    element.shadowRoot.querySelector('#mergedIntoInput').value = 'proj:123';
+    assert.deepEqual(element.delta, {
+      status: 'Duplicate',
+      mergedInto: 'proj:123',
+    });
+  });
+
+  it('remove mark as duplicate', async () => {
+    element.initialStatus = 'Duplicate';
+    element.mergedInto = 'chromium:1234';
+
+    await element.updateComplete;
+
+    const statusInput = element.shadowRoot.querySelector('select');
+    statusInput.value = 'New';
+    statusInput.dispatchEvent(new Event('change'));
+
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {
+      status: 'New',
+      mergedInto: '',
+    });
+  });
+});
diff --git a/static_src/elements/issue-detail/metadata/mr-edit-field/mr-multi-checkbox.js b/static_src/elements/issue-detail/metadata/mr-edit-field/mr-multi-checkbox.js
new file mode 100644
index 0000000..881cced
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-edit-field/mr-multi-checkbox.js
@@ -0,0 +1,96 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+/**
+ * `<mr-multi-checkbox>`
+ *
+ * A web component for managing values in a set of checkboxes.
+ *
+ */
+export class MrMultiCheckbox extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      input[type="checkbox"] {
+        width: auto;
+        height: auto;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      ${this.options.map((option) => html`
+        <label title=${option.docstring}>
+          <input
+            type="checkbox"
+            name=${this.name}
+            value=${option.optionName}
+            ?checked=${this.values.includes(option.optionName)}
+            @change=${this._changeHandler}
+          />
+          ${option.optionName}
+        </label>
+      `)}
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      values: {type: Array},
+      options: {type: Array},
+      _inputRefs: {type: Object},
+    };
+  }
+
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('options')) {
+      this._inputRefs = this.shadowRoot.querySelectorAll('input');
+    }
+
+    if (changedProperties.has('values')) {
+      this.reset();
+    }
+  }
+
+  reset() {
+    this.setValues(this.values);
+  }
+
+  getValues() {
+    if (!this._inputRefs) return;
+    const valueList = [];
+    this._inputRefs.forEach((c) => {
+      if (c.checked) {
+        valueList.push(c.value.trim());
+      }
+    });
+    return valueList;
+  }
+
+  setValues(values) {
+    if (!this._inputRefs) return;
+    this._inputRefs.forEach(
+        (checkbox) => {
+          checkbox.checked = values.includes(checkbox.value);
+        },
+    );
+  }
+
+  /**
+   * @fires CustomEvent#change
+   * @private
+   */
+  _changeHandler() {
+    this.dispatchEvent(new CustomEvent('change'));
+  }
+}
+
+customElements.define('mr-multi-checkbox', MrMultiCheckbox);
diff --git a/static_src/elements/issue-detail/metadata/mr-edit-field/mr-multi-checkbox.test.js b/static_src/elements/issue-detail/metadata/mr-edit-field/mr-multi-checkbox.test.js
new file mode 100644
index 0000000..33cce9e
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-edit-field/mr-multi-checkbox.test.js
@@ -0,0 +1,23 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrMultiCheckbox} from './mr-multi-checkbox.js';
+
+let element;
+
+describe('mr-multi-checkbox', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-multi-checkbox');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrMultiCheckbox);
+  });
+});
diff --git a/static_src/elements/issue-detail/metadata/mr-edit-metadata/mr-edit-issue.js b/static_src/elements/issue-detail/metadata/mr-edit-metadata/mr-edit-issue.js
new file mode 100644
index 0000000..69ef43f
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-edit-metadata/mr-edit-issue.js
@@ -0,0 +1,360 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+import debounce from 'debounce';
+
+import {store, connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as ui from 'reducers/ui.js';
+import {arrayToEnglish} from 'shared/helpers.js';
+import './mr-edit-metadata.js';
+import 'shared/typedef.js';
+
+import ClientLogger from 'monitoring/client-logger.js';
+
+const DEBOUNCED_PRESUBMIT_TIME_OUT = 400;
+
+/**
+ * `<mr-edit-issue>`
+ *
+ * Edit form for a single issue. Wraps <mr-edit-metadata>.
+ *
+ */
+export class MrEditIssue extends connectStore(LitElement) {
+  /** @override */
+  render() {
+    const issue = this.issue || {};
+    let blockedOnRefs = issue.blockedOnIssueRefs || [];
+    if (issue.danglingBlockedOnRefs && issue.danglingBlockedOnRefs.length) {
+      blockedOnRefs = blockedOnRefs.concat(issue.danglingBlockedOnRefs);
+    }
+
+    let blockingRefs = issue.blockingIssueRefs || [];
+    if (issue.danglingBlockingRefs && issue.danglingBlockingRefs.length) {
+      blockingRefs = blockingRefs.concat(issue.danglingBlockingRefs);
+    }
+
+    return html`
+      <h2 id="makechanges" class="medium-heading">
+        <a href="#makechanges">Add a comment and make changes</a>
+      </h2>
+      <mr-edit-metadata
+        formName="Issue Edit"
+        .ownerName=${this._ownerDisplayName(this.issue.ownerRef)}
+        .cc=${issue.ccRefs}
+        .status=${issue.statusRef && issue.statusRef.status}
+        .statuses=${this._availableStatuses(this.projectConfig.statusDefs, this.issue.statusRef)}
+        .summary=${issue.summary}
+        .components=${issue.componentRefs}
+        .fieldDefs=${this._fieldDefs}
+        .fieldValues=${issue.fieldValues}
+        .blockedOn=${blockedOnRefs}
+        .blocking=${blockingRefs}
+        .mergedInto=${issue.mergedIntoIssueRef}
+        .labelNames=${this._labelNames}
+        .derivedLabels=${this._derivedLabels}
+        .error=${this.updateError}
+        ?saving=${this.updatingIssue}
+        @save=${this.save}
+        @discard=${this.reset}
+        @change=${this._onChange}
+      ></mr-edit-metadata>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      /**
+       * All comments, including descriptions.
+       */
+      comments: {
+        type: Array,
+      },
+      /**
+       * The issue being updated.
+       */
+      issue: {
+        type: Object,
+      },
+      /**
+       * The issueRef for the currently viewed issue.
+       */
+      issueRef: {
+        type: Object,
+      },
+      /**
+       * The config of the currently viewed project.
+       */
+      projectConfig: {
+        type: Object,
+      },
+      /**
+       * Whether the issue is currently being updated.
+       */
+      updatingIssue: {
+        type: Boolean,
+      },
+      /**
+       * An error response, if one exists.
+       */
+      updateError: {
+        type: String,
+      },
+      /**
+       * Hash from the URL, used to support the 'r' hot key for making changes.
+       */
+      focusId: {
+        type: String,
+      },
+      _fieldDefs: {
+        type: Array,
+      },
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this.clientLogger = new ClientLogger('issues');
+    this.updateError = '';
+
+    this.presubmitDebounceTimeOut = DEBOUNCED_PRESUBMIT_TIME_OUT;
+  }
+
+  /** @override */
+  createRenderRoot() {
+    return this;
+  }
+
+  /** @override */
+  disconnectedCallback() {
+    super.disconnectedCallback();
+
+    // Prevent debounced logic from running after the component has been
+    // removed from the UI.
+    if (this._debouncedPresubmit) {
+      this._debouncedPresubmit.clear();
+    }
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.issue = issueV0.viewedIssue(state);
+    this.issueRef = issueV0.viewedIssueRef(state);
+    this.comments = issueV0.comments(state);
+    this.projectConfig = projectV0.viewedConfig(state);
+    this.updatingIssue = issueV0.requests(state).update.requesting;
+
+    const error = issueV0.requests(state).update.error;
+    this.updateError = error && (error.description || error.message);
+    this.focusId = ui.focusId(state);
+    this._fieldDefs = issueV0.fieldDefs(state);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (this.focusId && changedProperties.has('focusId')) {
+      // TODO(zhangtiff): Generalize logic to focus elements based on ID
+      // to a reuseable class mixin.
+      if (this.focusId.toLowerCase() === 'makechanges') {
+        this.focus();
+      }
+    }
+
+    if (changedProperties.has('updatingIssue')) {
+      const isUpdating = this.updatingIssue;
+      const wasUpdating = changedProperties.get('updatingIssue');
+
+      // When an issue finishes updating, we want to show a snackbar, record
+      // issue update time metrics, and reset the edit form.
+      if (!isUpdating && wasUpdating) {
+        if (!this.updateError) {
+          this._showCommentAddedSnackbar();
+          // Reset the edit form when a user's action finishes.
+          this.reset();
+        }
+
+        // Record metrics on when the issue editing event finished.
+        if (this.clientLogger.started('issue-update')) {
+          this.clientLogger.logEnd('issue-update', 'computer-time', 120 * 1000);
+        }
+      }
+    }
+  }
+
+  // TODO(crbug.com/monorail/6933): Remove the need for this wrapper.
+  /**
+   * Snows a snackbar telling the user they added a comment to the issue.
+   */
+  _showCommentAddedSnackbar() {
+    store.dispatch(ui.showSnackbar(ui.snackbarNames.ISSUE_COMMENT_ADDED,
+        'Your comment was added.'));
+  }
+
+  /**
+   * Resets all form fields to their initial values.
+   */
+  reset() {
+    const form = this.querySelector('mr-edit-metadata');
+    if (!form) return;
+    form.reset();
+  }
+
+  /**
+   * Dispatches an action to save issue changes on the server.
+   */
+  async save() {
+    const form = this.querySelector('mr-edit-metadata');
+    if (!form) return;
+
+    const delta = form.delta;
+    if (!allowRemovedRestrictions(delta.labelRefsRemove)) {
+      return;
+    }
+
+    const message = {
+      issueRef: this.issueRef,
+      delta: delta,
+      commentContent: form.getCommentContent(),
+      sendEmail: form.sendEmail,
+    };
+
+    // Add files to message.
+    const uploads = await form.getAttachments();
+
+    if (uploads && uploads.length) {
+      message.uploads = uploads;
+    }
+
+    if (message.commentContent || message.delta || message.uploads) {
+      this.clientLogger.logStart('issue-update', 'computer-time');
+
+      store.dispatch(issueV0.update(message));
+    }
+  }
+
+  /**
+   * Focuses the edit form in response to the 'r' hotkey.
+   */
+  focus() {
+    const editHeader = this.querySelector('#makechanges');
+    editHeader.scrollIntoView();
+
+    const editForm = this.querySelector('mr-edit-metadata');
+    editForm.focus();
+  }
+
+  /**
+   * Turns all LabelRef Objects attached to an issue into an Array of strings
+   * containing only the names of those labels that aren't derived.
+   * @return {Array<string>} Array of label names.
+   */
+  get _labelNames() {
+    if (!this.issue || !this.issue.labelRefs) return [];
+    const labels = this.issue.labelRefs;
+    return labels.filter((l) => !l.isDerived).map((l) => l.label);
+  }
+
+  /**
+   * Finds only the derived labels attached to an issue and returns only
+   * their names.
+   * @return {Array<string>} Array of label names.
+   */
+  get _derivedLabels() {
+    if (!this.issue || !this.issue.labelRefs) return [];
+    const labels = this.issue.labelRefs;
+    return labels.filter((l) => l.isDerived).map((l) => l.label);
+  }
+
+  /**
+   * Gets the displayName of the owner. Only uses the displayName if a
+   * userId also exists in the ref.
+   * @param {UserRef} ownerRef The owner of the issue.
+   * @return {string} The name of the owner for the edited issue.
+   */
+  _ownerDisplayName(ownerRef) {
+    return (ownerRef && ownerRef.userId) ? ownerRef.displayName : '';
+  }
+
+  /**
+   * Dispatches an action against the server to run "issue presubmit", a feature
+   * that warns the user about issue changes that violate configured rules.
+   * @param {Object=} issueDelta Changes currently present in the edit form.
+   * @param {string} commentContent Text the user is inputting for a comment.
+   */
+  _presubmitIssue(issueDelta = {}, commentContent) {
+    // Don't run this functionality if the element has disconnected. Important
+    // for preventing debounced code from running after an element no longer
+    // exists.
+    if (!this.isConnected) return;
+
+    if (Object.keys(issueDelta).length || commentContent) {
+      // TODO(crbug.com/monorail/8638): Make filter rules actually process
+      // the text for comments on the backend.
+      store.dispatch(issueV0.presubmit(this.issueRef, issueDelta));
+    }
+  }
+
+  /**
+   * Form change handler that runs presubmit on the form.
+   * @param {CustomEvent} evt
+   */
+  _onChange(evt) {
+    const {delta, commentContent} = evt.detail || {};
+
+    if (!this._debouncedPresubmit) {
+      this._debouncedPresubmit = debounce(
+          (delta, commentContent) => this._presubmitIssue(delta, commentContent),
+          this.presubmitDebounceTimeOut);
+    }
+    this._debouncedPresubmit(delta, commentContent);
+  }
+
+  /**
+   * Creates the list of statuses that the user sees in the status dropdown.
+   * @param {Array<StatusDef>} statusDefsArg The project configured StatusDefs.
+   * @param {StatusRef} currentStatusRef The status that the issue currently
+   *   uses. Note that Monorail supports free text statuses that do not exist in
+   *   a project config. Because of this, currentStatusRef may not exist in
+   *   statusDefsArg.
+   * @return {Array<StatusRef|StatusDef>} Array of statuses a user can edit this
+   *   issue to have.
+   */
+  _availableStatuses(statusDefsArg, currentStatusRef) {
+    let statusDefs = statusDefsArg || [];
+    statusDefs = statusDefs.filter((status) => !status.deprecated);
+    if (!currentStatusRef || statusDefs.find(
+        (status) => status.status === currentStatusRef.status)) {
+      return statusDefs;
+    }
+    return [currentStatusRef, ...statusDefs];
+  }
+}
+
+/**
+ * Asks the user for confirmation when they try to remove retriction labels.
+ * eg. Restrict-View-Google.
+ * @param {Array<LabelRef>} labelRefsRemoved The labels a user is removing
+ *   from this issue.
+ * @return {boolean} Whether removing these labels is okay. ie: true if there
+ *   are either no restrictions being removed or if the user approved the
+ *   removal of the restrictions.
+ */
+export function allowRemovedRestrictions(labelRefsRemoved) {
+  if (!labelRefsRemoved) return true;
+  const removedRestrictions = labelRefsRemoved
+      .map(({label}) => label)
+      .filter((label) => label.toLowerCase().startsWith('restrict-'));
+  const removeRestrictionsMessage =
+    'You are removing these restrictions:\n' +
+    arrayToEnglish(removedRestrictions) + '\n' +
+    'This might allow more people to access this issue. Are you sure?';
+  return !removedRestrictions.length || confirm(removeRestrictionsMessage);
+}
+
+customElements.define('mr-edit-issue', MrEditIssue);
diff --git a/static_src/elements/issue-detail/metadata/mr-edit-metadata/mr-edit-issue.test.js b/static_src/elements/issue-detail/metadata/mr-edit-metadata/mr-edit-issue.test.js
new file mode 100644
index 0000000..a3216ca
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-edit-metadata/mr-edit-issue.test.js
@@ -0,0 +1,298 @@
+// Copyright 2019 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.
+
+import sinon from 'sinon';
+import {assert} from 'chai';
+import {prpcClient} from 'prpc-client-instance.js';
+import {MrEditIssue, allowRemovedRestrictions} from './mr-edit-issue.js';
+import {clientLoggerFake} from 'shared/test/fakes.js';
+
+let element;
+let clock;
+
+describe('mr-edit-issue', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-edit-issue');
+    document.body.appendChild(element);
+    sinon.stub(prpcClient, 'call');
+
+    element.clientLogger = clientLoggerFake();
+    clock = sinon.useFakeTimers();
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+    prpcClient.call.restore();
+
+    clock.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrEditIssue);
+  });
+
+  it('scrolls into view on #makechanges hash', async () => {
+    await element.updateComplete;
+
+    const header = element.querySelector('#makechanges');
+    sinon.stub(header, 'scrollIntoView');
+
+    element.focusId = 'makechanges';
+    await element.updateComplete;
+
+    assert.isTrue(header.scrollIntoView.calledOnce);
+
+    header.scrollIntoView.restore();
+  });
+
+  it('shows snackbar and resets form when editing finishes', async () => {
+    sinon.stub(element, 'reset');
+    sinon.stub(element, '_showCommentAddedSnackbar');
+
+    element.updatingIssue = true;
+    await element.updateComplete;
+
+    sinon.assert.notCalled(element._showCommentAddedSnackbar);
+    sinon.assert.notCalled(element.reset);
+
+    element.updatingIssue = false;
+    await element.updateComplete;
+
+    sinon.assert.calledOnce(element._showCommentAddedSnackbar);
+    sinon.assert.calledOnce(element.reset);
+  });
+
+  it('does not show snackbar or reset form on edit error', async () => {
+    sinon.stub(element, 'reset');
+    sinon.stub(element, '_showCommentAddedSnackbar');
+
+    element.updatingIssue = true;
+    await element.updateComplete;
+
+    element.updateError = 'The save failed';
+    element.updatingIssue = false;
+    await element.updateComplete;
+
+    sinon.assert.notCalled(element._showCommentAddedSnackbar);
+    sinon.assert.notCalled(element.reset);
+  });
+
+  it('shows current status even if not defined for project', async () => {
+    await element.updateComplete;
+
+    const editMetadata = element.querySelector('mr-edit-metadata');
+    assert.deepEqual(editMetadata.statuses, []);
+
+    element.projectConfig = {statusDefs: [
+      {status: 'hello'},
+      {status: 'world'},
+    ]};
+
+    await editMetadata.updateComplete;
+
+    assert.deepEqual(editMetadata.statuses, [
+      {status: 'hello'},
+      {status: 'world'},
+    ]);
+
+    element.issue = {
+      statusRef: {status: 'hello'},
+    };
+
+    await editMetadata.updateComplete;
+
+    assert.deepEqual(editMetadata.statuses, [
+      {status: 'hello'},
+      {status: 'world'},
+    ]);
+
+    element.issue = {
+      statusRef: {status: 'weirdStatus'},
+    };
+
+    await editMetadata.updateComplete;
+
+    assert.deepEqual(editMetadata.statuses, [
+      {status: 'weirdStatus'},
+      {status: 'hello'},
+      {status: 'world'},
+    ]);
+  });
+
+  it('ignores deprecated statuses, unless used on current issue', async () => {
+    await element.updateComplete;
+
+    const editMetadata = element.querySelector('mr-edit-metadata');
+    assert.deepEqual(editMetadata.statuses, []);
+
+    element.projectConfig = {statusDefs: [
+      {status: 'new'},
+      {status: 'accepted', deprecated: false},
+      {status: 'compiling', deprecated: true},
+    ]};
+
+    await editMetadata.updateComplete;
+
+    assert.deepEqual(editMetadata.statuses, [
+      {status: 'new'},
+      {status: 'accepted', deprecated: false},
+    ]);
+
+
+    element.issue = {
+      statusRef: {status: 'compiling'},
+    };
+
+    await editMetadata.updateComplete;
+
+    assert.deepEqual(editMetadata.statuses, [
+      {status: 'compiling'},
+      {status: 'new'},
+      {status: 'accepted', deprecated: false},
+    ]);
+  });
+
+  it('filter out empty or deleted user owners', () => {
+    assert.equal(
+        element._ownerDisplayName({displayName: 'a_deleted_user'}),
+        '');
+    assert.equal(
+        element._ownerDisplayName({
+          displayName: 'test@example.com',
+          userId: '1234',
+        }),
+        'test@example.com');
+  });
+
+  it('logs issue-update metrics', async () => {
+    await element.updateComplete;
+
+    const editMetadata = element.querySelector('mr-edit-metadata');
+
+    sinon.stub(editMetadata, 'delta').get(() => ({summary: 'test'}));
+
+    await element.save();
+
+    sinon.assert.calledOnce(element.clientLogger.logStart);
+    sinon.assert.calledWith(element.clientLogger.logStart,
+        'issue-update', 'computer-time');
+
+    // Simulate a response updating the UI.
+    element.issue = {summary: 'test'};
+
+    await element.updateComplete;
+    await element.updateComplete;
+
+    sinon.assert.calledOnce(element.clientLogger.logEnd);
+    sinon.assert.calledWith(element.clientLogger.logEnd,
+        'issue-update', 'computer-time', 120 * 1000);
+  });
+
+  it('presubmits issue on metadata change', async () => {
+    element.issueRef = {};
+
+    await element.updateComplete;
+    const editMetadata = element.querySelector('mr-edit-metadata');
+    editMetadata.dispatchEvent(new CustomEvent('change', {
+      detail: {
+        delta: {
+          summary: 'Summary',
+        },
+      },
+    }));
+
+    // Wait for debouncer.
+    clock.tick(element.presubmitDebounceTimeOut + 1);
+
+    sinon.assert.calledWith(prpcClient.call, 'monorail.Issues',
+        'PresubmitIssue',
+        {issueDelta: {summary: 'Summary'}, issueRef: {}});
+  });
+
+  it('presubmits issue on comment change', async () => {
+    element.issueRef = {};
+
+    await element.updateComplete;
+    const editMetadata = element.querySelector('mr-edit-metadata');
+    editMetadata.dispatchEvent(new CustomEvent('change', {
+      detail: {
+        delta: {},
+        commentContent: 'test',
+      },
+    }));
+
+    // Wait for debouncer.
+    clock.tick(element.presubmitDebounceTimeOut + 1);
+
+    sinon.assert.calledWith(prpcClient.call, 'monorail.Issues',
+        'PresubmitIssue',
+        {issueDelta: {}, issueRef: {}});
+  });
+
+
+  it('does not presubmit issue when no changes', () => {
+    element._presubmitIssue({});
+
+    sinon.assert.notCalled(prpcClient.call);
+  });
+
+  it('editing form runs _presubmitIssue debounced', async () => {
+    sinon.stub(element, '_presubmitIssue');
+
+    await element.updateComplete;
+
+    // User makes some changes.
+    const comment = element.querySelector('#commentText');
+    comment.value = 'Value';
+    comment.dispatchEvent(new Event('keyup'));
+
+    clock.tick(5);
+
+    // User makes more changes before debouncer timeout is done.
+    comment.value = 'more changes';
+    comment.dispatchEvent(new Event('keyup'));
+
+    clock.tick(10);
+
+    sinon.assert.notCalled(element._presubmitIssue);
+
+    // Wait for debouncer.
+    clock.tick(element.presubmitDebounceTimeOut + 1);
+
+    sinon.assert.calledOnce(element._presubmitIssue);
+  });
+});
+
+describe('allowRemovedRestrictions', () => {
+  beforeEach(() => {
+    sinon.stub(window, 'confirm');
+  });
+
+  afterEach(() => {
+    window.confirm.restore();
+  });
+
+  it('returns true if no restrictions removed', () => {
+    assert.isTrue(allowRemovedRestrictions([
+      {label: 'not-restricted'},
+      {label: 'fine'},
+    ]));
+  });
+
+  it('returns false if restrictions removed and confirmation denied', () => {
+    window.confirm.returns(false);
+    assert.isFalse(allowRemovedRestrictions([
+      {label: 'not-restricted'},
+      {label: 'restrict-view-people'},
+    ]));
+  });
+
+  it('returns true if restrictions removed and confirmation accepted', () => {
+    window.confirm.returns(true);
+    assert.isTrue(allowRemovedRestrictions([
+      {label: 'not-restricted'},
+      {label: 'restrict-view-people'},
+    ]));
+  });
+});
diff --git a/static_src/elements/issue-detail/metadata/mr-edit-metadata/mr-edit-metadata.js b/static_src/elements/issue-detail/metadata/mr-edit-metadata/mr-edit-metadata.js
new file mode 100644
index 0000000..804c8d1
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-edit-metadata/mr-edit-metadata.js
@@ -0,0 +1,1188 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+
+import 'elements/chops/chops-button/chops-button.js';
+import 'elements/framework/mr-upload/mr-upload.js';
+import 'elements/framework/mr-star/mr-issue-star.js';
+import 'elements/chops/chops-checkbox/chops-checkbox.js';
+import 'elements/chops/chops-chip/chops-chip.js';
+import 'elements/framework/mr-error/mr-error.js';
+import 'elements/framework/mr-warning/mr-warning.js';
+import 'elements/help/mr-cue/mr-cue.js';
+import 'react/mr-react-autocomplete.tsx';
+import {cueNames} from 'elements/help/mr-cue/cue-helpers.js';
+import {store, connectStore} from 'reducers/base.js';
+import {UserInputError} from 'shared/errors.js';
+import {fieldTypes} from 'shared/issue-fields.js';
+import {displayNameToUserRef, labelStringToRef, componentStringToRef,
+  componentRefsToStrings, issueStringToRef, issueStringToBlockingRef,
+  issueRefToString, issueRefsToStrings, filteredUserDisplayNames,
+  valueToFieldValue, fieldDefToName,
+} from 'shared/convertersV0.js';
+import {arrayDifference, isEmptyObject, equalsIgnoreCase} from 'shared/helpers.js';
+import {NON_EDITING_KEY_EVENTS} from 'shared/dom-helpers.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as permissions from 'reducers/permissions.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as userV0 from 'reducers/userV0.js';
+import * as ui from 'reducers/ui.js';
+import '../mr-edit-field/mr-edit-field.js';
+import '../mr-edit-field/mr-edit-status.js';
+import {ISSUE_EDIT_PERMISSION, ISSUE_EDIT_SUMMARY_PERMISSION,
+  ISSUE_EDIT_STATUS_PERMISSION, ISSUE_EDIT_OWNER_PERMISSION,
+  ISSUE_EDIT_CC_PERMISSION,
+} from 'shared/consts/permissions.js';
+import {fieldDefsWithGroup, fieldDefsWithoutGroup, valuesForField,
+  HARDCODED_FIELD_GROUPS} from 'shared/metadata-helpers.js';
+import {renderMarkdown, shouldRenderMarkdown} from 'shared/md-helper.js';
+import {unsafeHTML} from 'lit-html/directives/unsafe-html.js';
+import {MD_PREVIEW_STYLES, MD_STYLES} from 'shared/shared-styles.js';
+
+
+
+/**
+ * `<mr-edit-metadata>`
+ *
+ * Editing form for either an approval or the overall issue.
+ *
+ */
+export class MrEditMetadata extends connectStore(LitElement) {
+  /** @override */
+  render() {
+    return html`
+      <style>
+        ${MD_PREVIEW_STYLES}
+        ${MD_STYLES}
+        mr-edit-metadata {
+          display: block;
+          font-size: var(--chops-main-font-size);
+        }
+        mr-edit-metadata.edit-actions-right .edit-actions {
+          flex-direction: row-reverse;
+          text-align: right;
+        }
+        mr-edit-metadata.edit-actions-right .edit-actions chops-checkbox {
+          text-align: left;
+        }
+        .edit-actions chops-checkbox {
+          max-width: 200px;
+          margin-top: 2px;
+          flex-grow: 2;
+          text-align: right;
+        }
+        .edit-actions {
+          width: 100%;
+          max-width: 500px;
+          margin: 0.5em 0;
+          text-align: left;
+          display: flex;
+          flex-direction: row;
+          align-items: center;
+        }
+        .edit-actions chops-button {
+          flex-grow: 0;
+          flex-shrink: 0;
+        }
+        .edit-actions .emphasized {
+          margin-left: 0;
+        }
+        input {
+          box-sizing: border-box;
+          width: var(--mr-edit-field-width);
+          padding: var(--mr-edit-field-padding);
+          font-size: var(--chops-main-font-size);
+        }
+        mr-upload {
+          margin-bottom: 0.25em;
+        }
+        textarea {
+          font-family: var(--mr-toggled-font-family);
+          width: 100%;
+          margin: 0.25em 0;
+          box-sizing: border-box;
+          border: var(--chops-accessible-border);
+          height: 8em;
+          transition: height 0.1s ease-in-out;
+          padding: 0.5em 4px;
+          grid-column-start: 1;
+          grid-column-end: 2;
+        }
+        button.toggle {
+          background: none;
+          color: var(--chops-link-color);
+          border: 0;
+          width: 100%;
+          padding: 0.25em 0;
+          text-align: left;
+        }
+        button.toggle:hover {
+          cursor: pointer;
+          text-decoration: underline;
+        }
+        .presubmit-derived {
+          color: gray;
+          font-style: italic;
+          text-decoration-line: underline;
+          text-decoration-style: dotted;
+        }
+        .presubmit-derived-header {
+          color: gray;
+          font-weight: bold;
+        }
+        .discard-button {
+          margin-right: 16px;
+          margin-left: 16px;
+        }
+        .group {
+          width: 100%;
+          border: 1px solid hsl(0, 0%, 83%);
+          grid-column: 1 / -1;
+          margin: 0;
+          margin-bottom: 0.5em;
+          padding: 0;
+          padding-bottom: 0.5em;
+        }
+        .group legend {
+          margin-left: 130px;
+        }
+        .group-title {
+          text-align: center;
+          font-style: oblique;
+          margin-top: 4px;
+          margin-bottom: -8px;
+        }
+        .star-line {
+          display: flex;
+          align-items: center;
+          background: var(--chops-notice-bubble-bg);
+          border: var(--chops-notice-border);
+          justify-content: flex-start;
+          margin-top: 4px;
+          padding: 2px 4px 2px 8px;
+        }
+        mr-issue-star {
+          margin-right: 4px;
+        }
+      </style>
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
+            rel="stylesheet">
+      <form id="editForm"
+        @submit=${this._save}
+        @keydown=${this._saveOnCtrlEnter}
+      >
+        <mr-cue cuePrefName=${cueNames.CODE_OF_CONDUCT}></mr-cue>
+        ${this._renderStarLine()}
+        <textarea
+          id="commentText"
+          placeholder="Add a comment"
+          @keyup=${this._processChanges}
+          aria-label="Comment"
+        ></textarea>
+        ${(this._renderMarkdown)
+           ? html`
+          <div class="markdown-preview preview-height-comment">
+            <div class="markdown">
+              ${unsafeHTML(renderMarkdown(this.getCommentContent()))}
+            </div>
+          </div>`: ''}
+        <mr-upload
+          ?hidden=${this.disableAttachments}
+          @change=${this._processChanges}
+        ></mr-upload>
+        <div class="input-grid">
+          ${this._renderEditFields()}
+          ${this._renderErrorsAndWarnings()}
+
+          <span></span>
+          <div class="edit-actions">
+            <chops-button
+              @click=${this._save}
+              class="save-changes emphasized"
+              ?disabled=${this.disabled}
+              title="Save changes (Ctrl+Enter / \u2318+Enter)"
+            >
+              Save changes
+            </chops-button>
+            <chops-button
+              @click=${this.discard}
+              class="de-emphasized discard-button"
+              ?disabled=${this.disabled}
+            >
+              Discard
+            </chops-button>
+
+            <chops-checkbox
+              id="sendEmail"
+              @checked-change=${this._sendEmailChecked}
+              ?checked=${this.sendEmail}
+            >Send email</chops-checkbox>
+          </div>
+
+          ${!this.isApproval ? this._renderPresubmitChanges() : ''}
+        </div>
+      </form>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderStarLine() {
+    if (this._canEditIssue || this.isApproval) return '';
+
+    return html`
+      <div class="star-line">
+        <mr-issue-star
+          .issueRef=${this.issueRef}
+        ></mr-issue-star>
+        <span>
+          ${this.isStarred ? `
+            You have voted for this issue and will receive notifications.
+          ` : `
+            Star this issue instead of commenting "+1 Me too!" to add a vote
+            and get notifications.`}
+        </span>
+      </div>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderPresubmitChanges() {
+    const {derivedCcs, derivedLabels} = this.presubmitResponse || {};
+    const hasCcs = derivedCcs && derivedCcs.length;
+    const hasLabels = derivedLabels && derivedLabels.length;
+    const hasDerivedValues = hasCcs || hasLabels;
+    return html`
+      ${hasDerivedValues ? html`
+        <span></span>
+        <div class="presubmit-derived-header">
+          Filter rules and components will add
+        </div>
+        ` : ''}
+
+      ${hasCcs? html`
+        <label
+          for="derived-ccs"
+          class="presubmit-derived-header"
+        >CC:</label>
+        <div id="derived-ccs">
+          ${derivedCcs.map((cc) => html`
+            <span
+              title=${cc.why}
+              class="presubmit-derived"
+            >${cc.value}</span>
+          `)}
+        </div>
+        ` : ''}
+
+      ${hasLabels ? html`
+        <label
+          for="derived-labels"
+          class="presubmit-derived-header"
+        >Labels:</label>
+        <div id="derived-labels">
+          ${derivedLabels.map((label) => html`
+            <span
+              title=${label.why}
+              class="presubmit-derived"
+            >${label.value}</span>
+          `)}
+        </div>
+        ` : ''}
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderErrorsAndWarnings() {
+    const presubmitResponse = this.presubmitResponse || {};
+    const presubmitWarnings = presubmitResponse.warnings || [];
+    const presubmitErrors = presubmitResponse.errors || [];
+    return (this.error || presubmitWarnings.length || presubmitErrors.length) ?
+      html`
+        <span></span>
+        <div>
+          ${presubmitWarnings.map((warning) => html`
+            <mr-warning title=${warning.why}>${warning.value}</mr-warning>
+          `)}
+          <!-- TODO(ehmaldonado): Look into blocking submission on presubmit
+          -->
+          ${presubmitErrors.map((error) => html`
+            <mr-error title=${error.why}>${error.value}</mr-error>
+          `)}
+          ${this.error ? html`
+            <mr-error>${this.error}</mr-error>` : ''}
+        </div>
+      ` : '';
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderEditFields() {
+    if (this.isApproval) {
+      return html`
+        ${this._renderStatus()}
+        ${this._renderApprovers()}
+        ${this._renderFieldDefs()}
+
+        ${this._renderNicheFieldToggle()}
+      `;
+    }
+
+    return html`
+      ${this._canEditSummary ? this._renderSummary() : ''}
+      ${this._canEditStatus ? this._renderStatus() : ''}
+      ${this._canEditOwner ? this._renderOwner() : ''}
+      ${this._canEditCC ? this._renderCC() : ''}
+      ${this._canEditIssue ? html`
+        ${this._renderComponents()}
+
+        ${this._renderFieldDefs()}
+        ${this._renderRelatedIssues()}
+        ${this._renderLabels()}
+
+        ${this._renderNicheFieldToggle()}
+      ` : ''}
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderSummary() {
+    return html`
+      <label for="summaryInput">Summary:</label>
+      <input
+        id="summaryInput"
+        value=${this.summary}
+        @keyup=${this._processChanges}
+      />
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderOwner() {
+    const ownerPresubmit = this._ownerPresubmit;
+    return html`
+      <label for="ownerInput">
+        ${ownerPresubmit.message ? html`
+          <i
+            class=${`material-icons inline-${ownerPresubmit.icon}`}
+            title=${ownerPresubmit.message}
+          >${ownerPresubmit.icon}</i>
+        ` : ''}
+        Owner:
+      </label>
+      <mr-react-autocomplete
+        label="ownerInput"
+        vocabularyName="owner"
+        .placeholder=${ownerPresubmit.placeholder}
+        .value=${this._values.owner}
+        .onChange=${this._changeHandlers.owner}
+      ></mr-react-autocomplete>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderCC() {
+    return html`
+      <label for="ccInput">CC:</label>
+      <mr-react-autocomplete
+        label="ccInput"
+        vocabularyName="member"
+        .multiple=${true}
+        .fixedValues=${this._derivedCCs}
+        .value=${this._values.cc}
+        .onChange=${this._changeHandlers.cc}
+      ></mr-react-autocomplete>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderComponents() {
+    return html`
+      <label for="componentsInput">Components:</label>
+      <mr-react-autocomplete
+        label="componentsInput"
+        vocabularyName="component"
+        .multiple=${true}
+        .value=${this._values.components}
+        .onChange=${this._changeHandlers.components}
+      ></mr-react-autocomplete>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderApprovers() {
+    return this.hasApproverPrivileges && this.isApproval ? html`
+      <label for="approversInput_react">Approvers:</label>
+      <mr-edit-field
+        id="approversInput"
+        label="approversInput_react"
+        .type=${'USER_TYPE'}
+        .initialValues=${filteredUserDisplayNames(this.approvers)}
+        .name=${'approver'}
+        .acType=${'member'}
+        @change=${this._processChanges}
+        multi
+      ></mr-edit-field>
+    ` : '';
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderStatus() {
+    return this.statuses && this.statuses.length ? html`
+      <label for="statusInput">Status:</label>
+
+      <mr-edit-status
+        id="statusInput"
+        .initialStatus=${this.status}
+        .statuses=${this.statuses}
+        .mergedInto=${issueRefToString(this.mergedInto, this.projectName)}
+        ?isApproval=${this.isApproval}
+        @change=${this._processChanges}
+      ></mr-edit-status>
+    ` : '';
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderFieldDefs() {
+    return html`
+      ${fieldDefsWithGroup(this.fieldDefs, this.fieldGroups, this.issueType).map((group) => html`
+        <fieldset class="group">
+          <legend>${group.groupName}</legend>
+          <div class="input-grid">
+            ${group.fieldDefs.map((field) => this._renderCustomField(field))}
+          </div>
+        </fieldset>
+      `)}
+
+      ${fieldDefsWithoutGroup(this.fieldDefs, this.fieldGroups, this.issueType).map((field) => this._renderCustomField(field))}
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderRelatedIssues() {
+    return html`
+      <label for="blockedOnInput">BlockedOn:</label>
+      <mr-react-autocomplete
+        label="blockedOnInput"
+        vocabularyName="component"
+        .multiple=${true}
+        .value=${this._values.blockedOn}
+        .onChange=${this._changeHandlers.blockedOn}
+      ></mr-react-autocomplete>
+
+      <label for="blockingInput">Blocking:</label>
+      <mr-react-autocomplete
+        label="blockingInput"
+        vocabularyName="component"
+        .multiple=${true}
+        .value=${this._values.blocking}
+        .onChange=${this._changeHandlers.blocking}
+      ></mr-react-autocomplete>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderLabels() {
+    return html`
+      <label for="labelsInput">Labels:</label>
+      <mr-react-autocomplete
+        label="labelsInput"
+        vocabularyName="label"
+        .multiple=${true}
+        .fixedValues=${this.derivedLabels}
+        .value=${this._values.labels}
+        .onChange=${this._changeHandlers.labels}
+      ></mr-react-autocomplete>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @param {FieldDef} field The custom field beinf rendered.
+   * @private
+   */
+  _renderCustomField(field) {
+    if (!field || !field.fieldRef) return '';
+    const userCanEdit = this._userCanEdit(field);
+    const {fieldRef, isNiche, docstring, isMultivalued} = field;
+    const isHidden = (!this.showNicheFields && isNiche) || !userCanEdit;
+
+    let acType;
+    if (fieldRef.type === fieldTypes.USER_TYPE) {
+      acType = isMultivalued ? 'member' : 'owner';
+    }
+    return html`
+      <label
+        ?hidden=${isHidden}
+        for=${this._idForField(fieldRef.fieldName) + '_react'}
+        title=${docstring}
+      >
+        ${fieldRef.fieldName}:
+      </label>
+      <mr-edit-field
+        ?hidden=${isHidden}
+        id=${this._idForField(fieldRef.fieldName)}
+        .label=${this._idForField(fieldRef.fieldName) + '_react'}
+        .name=${fieldRef.fieldName}
+        .type=${fieldRef.type}
+        .options=${this._optionsForField(this.optionsPerEnumField, this.fieldValueMap, fieldRef.fieldName, this.phaseName)}
+        .initialValues=${valuesForField(this.fieldValueMap, fieldRef.fieldName, this.phaseName)}
+        .acType=${acType}
+        ?multi=${isMultivalued}
+        @change=${this._processChanges}
+      ></mr-edit-field>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderNicheFieldToggle() {
+    return this._nicheFieldCount ? html`
+      <span></span>
+      <button type="button" class="toggle" @click=${this.toggleNicheFields}>
+        <span ?hidden=${this.showNicheFields}>
+          Show all fields (${this._nicheFieldCount} currently hidden)
+        </span>
+        <span ?hidden=${!this.showNicheFields}>
+          Hide niche fields (${this._nicheFieldCount} currently shown)
+        </span>
+      </button>
+    ` : '';
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      fieldDefs: {type: Array},
+      formName: {type: String},
+      approvers: {type: Array},
+      setter: {type: Object},
+      summary: {type: String},
+      cc: {type: Array},
+      components: {type: Array},
+      status: {type: String},
+      statuses: {type: Array},
+      blockedOn: {type: Array},
+      blocking: {type: Array},
+      mergedInto: {type: Object},
+      ownerName: {type: String},
+      labelNames: {type: Array},
+      derivedLabels: {type: Array},
+      _permissions: {type: Array},
+      phaseName: {type: String},
+      projectConfig: {type: Object},
+      projectName: {type: String},
+      isApproval: {type: Boolean},
+      isStarred: {type: Boolean},
+      issuePermissions: {type: Object},
+      issueRef: {type: Object},
+      hasApproverPrivileges: {type: Boolean},
+      showNicheFields: {type: Boolean},
+      disableAttachments: {type: Boolean},
+      error: {type: String},
+      sendEmail: {type: Boolean},
+      presubmitResponse: {type: Object},
+      fieldValueMap: {type: Object},
+      issueType: {type: String},
+      optionsPerEnumField: {type: String},
+      fieldGroups: {type: Object},
+      prefs: {type: Object},
+      saving: {type: Boolean},
+      isDirty: {type: Boolean},
+      _values: {type: Object},
+      _initialValues: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.summary = '';
+    this.ownerName = '';
+    this.sendEmail = true;
+    this.mergedInto = {};
+    this.issueRef = {};
+    this.fieldGroups = HARDCODED_FIELD_GROUPS;
+
+    this._permissions = {};
+    this.saving = false;
+    this.isDirty = false;
+    this.prefs = {};
+    this._values = {};
+    this._initialValues = {};
+
+    // Memoize change handlers so property updates don't cause excess rerenders.
+    this._changeHandlers = {
+      owner: this._onChange.bind(this, 'owner'),
+      cc: this._onChange.bind(this, 'cc'),
+      components: this._onChange.bind(this, 'components'),
+      labels: this._onChange.bind(this, 'labels'),
+      blockedOn: this._onChange.bind(this, 'blockedOn'),
+      blocking: this._onChange.bind(this, 'blocking'),
+    };
+  }
+
+  /** @override */
+  createRenderRoot() {
+    return this;
+  }
+
+  /** @override */
+  firstUpdated() {
+    this.hasRendered = true;
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('ownerName') || changedProperties.has('cc')
+        || changedProperties.has('components')
+        || changedProperties.has('labelNames')
+        || changedProperties.has('blockedOn')
+        || changedProperties.has('blocking')
+        || changedProperties.has('projectName')) {
+      this._initialValues.owner = this.ownerName;
+      this._initialValues.cc = this._ccNames;
+      this._initialValues.components = componentRefsToStrings(this.components);
+      this._initialValues.labels = this.labelNames;
+      this._initialValues.blockedOn = issueRefsToStrings(this.blockedOn, this.projectName);
+      this._initialValues.blocking = issueRefsToStrings(this.blocking, this.projectName);
+
+      this._values = {...this._initialValues};
+    }
+  }
+
+  /**
+   * Getter for checking if the user has Markdown enabled.
+   * @return {boolean} Whether Markdown preview should be rendered or not.
+   */
+  get _renderMarkdown() {
+    if (!this.getCommentContent()) {
+      return false;
+    }
+    const enabled = this.prefs.get('render_markdown');
+    return shouldRenderMarkdown({project: this.projectName, enabled});
+  }
+
+  /**
+   * @return {boolean} Whether the "Save changes" button is disabled.
+   */
+  get disabled() {
+    return !this.isDirty || this.saving;
+  }
+
+  /**
+   * Set isDirty to a property instead of only using a getter to cause
+   * lit-element to re-render when dirty state change.
+   */
+  _updateIsDirty() {
+    if (!this.hasRendered) return;
+
+    const commentContent = this.getCommentContent();
+    const attachmentsElement = this.querySelector('mr-upload');
+    this.isDirty = !isEmptyObject(this.delta) || Boolean(commentContent) ||
+      attachmentsElement.hasAttachments;
+  }
+
+  get _nicheFieldCount() {
+    const fieldDefs = this.fieldDefs || [];
+    return fieldDefs.reduce((acc, fd) => acc + (fd.isNiche | 0), 0);
+  }
+
+  get _canEditIssue() {
+    const issuePermissions = this.issuePermissions || [];
+    return issuePermissions.includes(ISSUE_EDIT_PERMISSION);
+  }
+
+  get _canEditSummary() {
+    const issuePermissions = this.issuePermissions || [];
+    return this._canEditIssue ||
+      issuePermissions.includes(ISSUE_EDIT_SUMMARY_PERMISSION);
+  }
+
+  get _canEditStatus() {
+    const issuePermissions = this.issuePermissions || [];
+    return this._canEditIssue ||
+      issuePermissions.includes(ISSUE_EDIT_STATUS_PERMISSION);
+  }
+
+  get _canEditOwner() {
+    const issuePermissions = this.issuePermissions || [];
+    return this._canEditIssue ||
+      issuePermissions.includes(ISSUE_EDIT_OWNER_PERMISSION);
+  }
+
+  get _canEditCC() {
+    const issuePermissions = this.issuePermissions || [];
+    return this._canEditIssue ||
+      issuePermissions.includes(ISSUE_EDIT_CC_PERMISSION);
+  }
+
+  /**
+   * @return {Array<string>}
+   */
+  get _ccNames() {
+    const users = this.cc || [];
+    return filteredUserDisplayNames(users.filter((u) => !u.isDerived));
+  }
+
+  get _derivedCCs() {
+    const users = this.cc || [];
+    return filteredUserDisplayNames(users.filter((u) => u.isDerived));
+  }
+
+  get _ownerPresubmit() {
+    const response = this.presubmitResponse;
+    if (!response) return {};
+
+    const ownerView = {message: '', placeholder: '', icon: ''};
+
+    if (response.ownerAvailability) {
+      ownerView.message = response.ownerAvailability;
+      ownerView.icon = 'warning';
+    } else if (response.derivedOwners && response.derivedOwners.length) {
+      ownerView.placeholder = response.derivedOwners[0].value;
+      ownerView.message = response.derivedOwners[0].why;
+      ownerView.icon = 'info';
+    }
+    return ownerView;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.fieldValueMap = issueV0.fieldValueMap(state);
+    this.issueType = issueV0.type(state);
+    this.issueRef = issueV0.viewedIssueRef(state);
+    this._permissions = permissions.byName(state);
+    this.presubmitResponse = issueV0.presubmitResponse(state);
+    this.projectConfig = projectV0.viewedConfig(state);
+    this.projectName = issueV0.viewedIssueRef(state).projectName;
+    this.issuePermissions = issueV0.permissions(state);
+    this.optionsPerEnumField = projectV0.optionsPerEnumField(state);
+    // Access boolean value from allStarredIssues
+    const starredIssues = issueV0.starredIssues(state);
+    this.isStarred = starredIssues.has(issueRefToString(this.issueRef));
+    this.prefs = userV0.prefs(state);
+  }
+
+  /** @override */
+  disconnectedCallback() {
+    super.disconnectedCallback();
+
+    store.dispatch(ui.reportDirtyForm(this.formName, false));
+  }
+
+  /**
+   * Resets the edit form values to their default values.
+   */
+  async reset() {
+    this._values = {...this._initialValues};
+
+    const form = this.querySelector('#editForm');
+    if (!form) return;
+
+    form.reset();
+    const statusInput = this.querySelector('#statusInput');
+    if (statusInput) {
+      statusInput.reset();
+    }
+
+    // Since custom elements containing <input> elements have the inputs
+    // wrapped in ShadowDOM, those inputs don't get reset with the rest of
+    // the form. Haven't been able to figure out a way to replicate form reset
+    // behavior with custom input elements.
+    if (this.isApproval) {
+      if (this.hasApproverPrivileges) {
+        const approversInput = this.querySelector(
+            '#approversInput');
+        if (approversInput) {
+          approversInput.reset();
+        }
+      }
+    }
+    this.querySelectorAll('mr-edit-field').forEach((el) => {
+      el.reset();
+    });
+
+    const uploader = this.querySelector('mr-upload');
+    if (uploader) {
+      uploader.reset();
+    }
+
+    // TODO(dtu, zhangtiff): Remove once all form fields are controlled.
+    await this.updateComplete;
+
+    this._processChanges();
+  }
+
+  /**
+   * @param {MouseEvent|SubmitEvent} event
+   * @private
+   */
+  _save(event) {
+    event.preventDefault();
+    this.save();
+  }
+
+  /**
+   * Users may use either Ctrl+Enter or Command+Enter to save an issue edit
+   * while the issue edit form is focused.
+   * @param {KeyboardEvent} event
+   * @private
+   */
+  _saveOnCtrlEnter(event) {
+    if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) {
+      event.preventDefault();
+      this.save();
+    }
+  }
+
+  /**
+   * Tells the parent to save the current edited values in the form.
+   * @fires CustomEvent#save
+   */
+  save() {
+    this.dispatchEvent(new CustomEvent('save'));
+  }
+
+  /**
+   * Tells the parent component that the user is trying to discard the form,
+   * if they confirm that that's what they're doing. The parent decides what
+   * to do in order to quit the editing session.
+   * @fires CustomEvent#discard
+   */
+  discard() {
+    const isDirty = this.isDirty;
+    if (!isDirty || confirm('Discard your changes?')) {
+      this.dispatchEvent(new CustomEvent('discard'));
+    }
+  }
+
+  /**
+   * Focuses the comment form.
+   */
+  async focus() {
+    await this.updateComplete;
+    this.querySelector('#commentText').focus();
+  }
+
+  /**
+   * Retrieves the value of the comment that the user added from the DOM.
+   * @return {string}
+   */
+  getCommentContent() {
+    if (!this.querySelector('#commentText')) {
+      return '';
+    }
+    return this.querySelector('#commentText').value;
+  }
+
+  async getAttachments() {
+    try {
+      return await this.querySelector('mr-upload').loadFiles();
+    } catch (e) {
+      this.error = `Error while loading file for attachment: ${e.message}`;
+    }
+  }
+
+  /**
+   * @param {FieldDef} field
+   * @return {boolean}
+   * @private
+   */
+  _userCanEdit(field) {
+    const fieldName = fieldDefToName(this.projectName, field);
+    if (!this._permissions[fieldName] ||
+        !this._permissions[fieldName].permissions) return false;
+    const userPerms = this._permissions[fieldName].permissions;
+    return userPerms.includes(permissions.FIELD_DEF_VALUE_EDIT);
+  }
+
+  /**
+   * Shows or hides custom fields with the "isNiche" attribute set to true.
+   */
+  toggleNicheFields() {
+    this.showNicheFields = !this.showNicheFields;
+  }
+
+  /**
+   * @return {IssueDelta}
+   * @throws {UserInputError}
+   */
+  get delta() {
+    try {
+      this.error = '';
+      return this._getDelta();
+    } catch (e) {
+      if (!(e instanceof UserInputError)) throw e;
+      this.error = e.message;
+      return {};
+    }
+  }
+
+  /**
+   * Generates a change between the initial Issue state and what the user
+   * inputted.
+   * @return {IssueDelta}
+   */
+  _getDelta() {
+    let result = {};
+
+    const {projectName, localId} = this.issueRef;
+
+    const statusInput = this.querySelector('#statusInput');
+    if (this._canEditStatus && statusInput) {
+      const statusDelta = statusInput.delta;
+      if (statusDelta.mergedInto) {
+        result.mergedIntoRef = issueStringToBlockingRef(
+            {projectName, localId}, statusDelta.mergedInto);
+      }
+      if (statusDelta.status) {
+        result.status = statusDelta.status;
+      }
+    }
+
+    if (this.isApproval) {
+      if (this._canEditIssue && this.hasApproverPrivileges) {
+        result = {
+          ...result,
+          ...this._changedValuesDom(
+            'approvers', 'approverRefs', displayNameToUserRef),
+        };
+      }
+    } else {
+      // TODO(zhangtiff): Consider representing baked-in fields such as owner,
+      // cc, and status similarly to custom fields to reduce repeated code.
+
+      if (this._canEditSummary) {
+        const summaryInput = this.querySelector('#summaryInput');
+        if (summaryInput) {
+          const newSummary = summaryInput.value;
+          if (newSummary !== this.summary) {
+            result.summary = newSummary;
+          }
+        }
+      }
+
+      if (this._values.owner !== this._initialValues.owner) {
+        result.ownerRef = displayNameToUserRef(this._values.owner);
+      }
+
+      const blockerAddFn = (refString) =>
+        issueStringToBlockingRef({projectName, localId}, refString);
+      const blockerRemoveFn = (refString) =>
+        issueStringToRef(refString, projectName);
+
+      result = {
+        ...result,
+        ...this._changedValuesControlled(
+          'cc', 'ccRefs', displayNameToUserRef),
+        ...this._changedValuesControlled(
+          'components', 'compRefs', componentStringToRef),
+        ...this._changedValuesControlled(
+          'labels', 'labelRefs', labelStringToRef),
+        ...this._changedValuesControlled(
+          'blockedOn', 'blockedOnRefs', blockerAddFn, blockerRemoveFn),
+        ...this._changedValuesControlled(
+          'blocking', 'blockingRefs', blockerAddFn, blockerRemoveFn),
+      };
+    }
+
+    if (this._canEditIssue) {
+      const fieldDefs = this.fieldDefs || [];
+      fieldDefs.forEach(({fieldRef}) => {
+        const {fieldValsAdd = [], fieldValsRemove = []} =
+          this._changedValuesDom(fieldRef.fieldName, 'fieldVals',
+            valueToFieldValue.bind(null, fieldRef));
+
+        // Because multiple custom fields share the same "fieldVals" key in
+        // delta, we hav to make sure to concatenate updated delta values with
+        // old delta values.
+        if (fieldValsAdd.length) {
+          result.fieldValsAdd = [...(result.fieldValsAdd || []),
+            ...fieldValsAdd];
+        }
+
+        if (fieldValsRemove.length) {
+          result.fieldValsRemove = [...(result.fieldValsRemove || []),
+            ...fieldValsRemove];
+        }
+      });
+    }
+
+    return result;
+  }
+
+  /**
+   * Computes delta values for a controlled input.
+   * @param {string} fieldName The key in the values property to retrieve data.
+   *   from.
+   * @param {string} responseKey The key in the delta Object that changes will be
+   *   saved in.
+   * @param {function(string): any} addFn A function to specify how to format
+   *   the message for a given added field.
+   * @param {function(string): any} removeFn A function to specify how to format
+   *   the message for a given removed field.
+   * @return {Object} delta fragment for added and removed values.
+   */
+  _changedValuesControlled(fieldName, responseKey, addFn, removeFn) {
+    const values = this._values[fieldName];
+    const initialValues = this._initialValues[fieldName];
+
+    const valuesAdd = arrayDifference(values, initialValues, equalsIgnoreCase);
+    const valuesRemove =
+      arrayDifference(initialValues, values, equalsIgnoreCase);
+
+    return this._changedValues(valuesAdd, valuesRemove, responseKey, addFn, removeFn);
+  }
+
+  /**
+   * Gets changes values when reading from a legacy <mr-edit-field> element.
+   * @param {string} fieldName Name of the form input we're checking values on.
+   * @param {string} responseKey The key in the delta Object that changes will be
+   *   saved in.
+   * @param {function(string): any} addFn A function to specify how to format
+   *   the message for a given added field.
+   * @param {function(string): any} removeFn A function to specify how to format
+   *   the message for a given removed field.
+   * @return {Object} delta fragment for added and removed values.
+   */
+  _changedValuesDom(fieldName, responseKey, addFn, removeFn) {
+    const input = this.querySelector(`#${this._idForField(fieldName)}`);
+    if (!input) return;
+
+    const valuesAdd = input.getValuesAdded();
+    const valuesRemove = input.getValuesRemoved();
+
+    return this._changedValues(valuesAdd, valuesRemove, responseKey, addFn, removeFn);
+  }
+
+  /**
+   * Shared helper function for computing added and removed values for a
+   * single field in a delta.
+   * @param {Array<string>} valuesAdd The added values. For example, new CCed
+   *   users.
+   * @param {Array<string>} valuesRemove Values that were removed in this edit.
+   * @param {string} responseKey The key in the delta Object that changes will be
+   *   saved in.
+   * @param {function(string): any} addFn A function to specify how to format
+   *   the message for a given added field.
+   * @param {function(string): any} removeFn A function to specify how to format
+   *   the message for a given removed field.
+   * @return {Object} delta fragment for added and removed values.
+   */
+  _changedValues(valuesAdd, valuesRemove, responseKey, addFn, removeFn) {
+    const delta = {};
+
+    if (valuesAdd && valuesAdd.length) {
+      delta[responseKey + 'Add'] = valuesAdd.map(addFn);
+    }
+
+    if (valuesRemove && valuesRemove.length) {
+      delta[responseKey + 'Remove'] = valuesRemove.map(removeFn || addFn);
+    }
+
+    return delta;
+  }
+
+  /**
+   * Generic onChange handler to be bound to each form field.
+   * @param {string} key Unique name for the form field we're binding this
+   *   handler to. For example, 'owner', 'cc', or the name of a custom field.
+   * @param {Event} event
+   * @param {string|Array<string>} value The new form value.
+   * @param {*} _reason
+   */
+  _onChange(key, event, value, _reason) {
+    this._values = {...this._values, [key]: value};
+    this._processChanges(event);
+  }
+
+  /**
+   * Event handler for running filter rules presubmit logic.
+   * @param {Event} e
+   */
+  _processChanges(e) {
+    if (e instanceof KeyboardEvent) {
+      if (NON_EDITING_KEY_EVENTS.has(e.key)) return;
+    }
+    this._updateIsDirty();
+
+    store.dispatch(ui.reportDirtyForm(this.formName, this.isDirty));
+
+    this.dispatchEvent(new CustomEvent('change', {
+      detail: {
+        delta: this.delta,
+        commentContent: this.getCommentContent(),
+      },
+    }));
+  }
+
+  _idForField(name) {
+    return `${name}Input`;
+  }
+
+  _optionsForField(optionsPerEnumField, fieldValueMap, fieldName, phaseName) {
+    if (!optionsPerEnumField || !fieldName) return [];
+    const key = fieldName.toLowerCase();
+    if (!optionsPerEnumField.has(key)) return [];
+    const options = [...optionsPerEnumField.get(key)];
+    const values = valuesForField(fieldValueMap, fieldName, phaseName);
+    values.forEach((v) => {
+      const optionExists = options.find(
+          (opt) => equalsIgnoreCase(opt.optionName, v));
+      if (!optionExists) {
+        // Note that enum fields which are not explicitly defined can be set,
+        // such as in the case when an issue is moved.
+        options.push({optionName: v});
+      }
+    });
+    return options;
+  }
+
+  _sendEmailChecked(evt) {
+    this.sendEmail = evt.detail.checked;
+  }
+}
+
+customElements.define('mr-edit-metadata', MrEditMetadata);
diff --git a/static_src/elements/issue-detail/metadata/mr-edit-metadata/mr-edit-metadata.test.js b/static_src/elements/issue-detail/metadata/mr-edit-metadata/mr-edit-metadata.test.js
new file mode 100644
index 0000000..2e4554f
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-edit-metadata/mr-edit-metadata.test.js
@@ -0,0 +1,1078 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {fireEvent} from '@testing-library/react';
+
+import {MrEditMetadata} from './mr-edit-metadata.js';
+import {ISSUE_EDIT_PERMISSION, ISSUE_EDIT_SUMMARY_PERMISSION,
+  ISSUE_EDIT_STATUS_PERMISSION, ISSUE_EDIT_OWNER_PERMISSION,
+  ISSUE_EDIT_CC_PERMISSION,
+} from 'shared/consts/permissions.js';
+import {FIELD_DEF_VALUE_EDIT} from 'reducers/permissions.js';
+import {store, resetState} from 'reducers/base.js';
+import {enterInput} from 'shared/test/helpers.js';
+
+let element;
+
+xdescribe('mr-edit-metadata', () => {
+  beforeEach(() => {
+    store.dispatch(resetState());
+    element = document.createElement('mr-edit-metadata');
+    document.body.appendChild(element);
+
+    element.issuePermissions = [ISSUE_EDIT_PERMISSION];
+
+    sinon.stub(store, 'dispatch');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+    store.dispatch.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrEditMetadata);
+  });
+
+  describe('updated sets initial values', () => {
+    it('updates owner', async () => {
+      element.ownerName = 'goose@bird.org';
+      await element.updateComplete;
+
+      assert.equal(element._values.owner, 'goose@bird.org');
+    });
+
+    it('updates cc', async () => {
+      element.cc = [
+        {displayName: 'initial-cc@bird.org', userId: '1234'},
+      ];
+      await element.updateComplete;
+
+      assert.deepEqual(element._values.cc, ['initial-cc@bird.org']);
+    });
+
+    it('updates components', async () => {
+      element.components = [{path: 'Hello>World'}];
+
+      await element.updateComplete;
+
+      assert.deepEqual(element._values.components, ['Hello>World']);
+    });
+
+    it('updates labels', async () => {
+      element.labelNames = ['test-label'];
+
+      await element.updateComplete;
+
+      assert.deepEqual(element._values.labels, ['test-label']);
+    });
+  });
+
+  describe('saves edit form', () => {
+    let saveStub;
+
+    beforeEach(() => {
+      saveStub = sinon.stub();
+      element.addEventListener('save', saveStub);
+    });
+
+    it('saves on form submit', async () => {
+      await element.updateComplete;
+
+      element.querySelector('#editForm').dispatchEvent(
+          new Event('submit', {bubbles: true, cancelable: true}));
+
+      sinon.assert.calledOnce(saveStub);
+    });
+
+    it('saves when clicking the save button', async () => {
+      await element.updateComplete;
+
+      element.querySelector('.save-changes').click();
+
+      sinon.assert.calledOnce(saveStub);
+    });
+
+    it('does not save on random keydowns', async () => {
+      await element.updateComplete;
+
+      element.querySelector('#editForm').dispatchEvent(
+          new KeyboardEvent('keydown', {key: 'a', ctrlKey: true}));
+      element.querySelector('#editForm').dispatchEvent(
+          new KeyboardEvent('keydown', {key: 'b', ctrlKey: false}));
+      element.querySelector('#editForm').dispatchEvent(
+          new KeyboardEvent('keydown', {key: 'c', metaKey: true}));
+
+      sinon.assert.notCalled(saveStub);
+    });
+
+    it('does not save on Enter without Ctrl', async () => {
+      await element.updateComplete;
+
+      element.querySelector('#editForm').dispatchEvent(
+          new KeyboardEvent('keydown', {key: 'Enter', ctrlKey: false}));
+
+      sinon.assert.notCalled(saveStub);
+    });
+
+    it('saves on Ctrl+Enter', async () => {
+      await element.updateComplete;
+
+      element.querySelector('#editForm').dispatchEvent(
+          new KeyboardEvent('keydown', {key: 'Enter', ctrlKey: true}));
+
+      sinon.assert.calledOnce(saveStub);
+    });
+
+    it('saves on Ctrl+Meta', async () => {
+      await element.updateComplete;
+
+      element.querySelector('#editForm').dispatchEvent(
+          new KeyboardEvent('keydown', {key: 'Enter', metaKey: true}));
+
+      sinon.assert.calledOnce(saveStub);
+    });
+  });
+
+  it('disconnecting element reports form is not dirty', () => {
+    element.formName = 'test';
+
+    assert.isFalse(store.dispatch.calledOnce);
+
+    document.body.removeChild(element);
+
+    assert.isTrue(store.dispatch.calledOnce);
+    sinon.assert.calledWith(
+        store.dispatch,
+        {
+          type: 'REPORT_DIRTY_FORM',
+          name: 'test',
+          isDirty: false,
+        },
+    );
+
+    document.body.appendChild(element);
+  });
+
+  it('_processChanges fires change event', async () => {
+    await element.updateComplete;
+
+    const changeStub = sinon.stub();
+    element.addEventListener('change', changeStub);
+
+    element._processChanges();
+
+    sinon.assert.calledOnce(changeStub);
+  });
+
+  it('save button disabled when disabled is true', async () => {
+    // Check that save button is initially disabled.
+    await element.updateComplete;
+
+    const button = element.querySelector('.save-changes');
+
+    assert.isTrue(element.disabled);
+    assert.isTrue(button.disabled);
+
+    element.isDirty = true;
+
+    await element.updateComplete;
+
+    assert.isFalse(element.disabled);
+    assert.isFalse(button.disabled);
+  });
+
+  it('editing form sets isDirty to true or false', async () => {
+    await element.updateComplete;
+
+    assert.isFalse(element.isDirty);
+
+    // User makes some changes.
+    const comment = element.querySelector('#commentText');
+    comment.value = 'Value';
+    comment.dispatchEvent(new Event('keyup'));
+
+    assert.isTrue(element.isDirty);
+
+    // User undoes the changes.
+    comment.value = '';
+    comment.dispatchEvent(new Event('keyup'));
+
+    assert.isFalse(element.isDirty);
+  });
+
+  it('reseting form disables save button', async () => {
+    // Check that save button is initially disabled.
+    assert.isTrue(element.disabled);
+
+    // User makes some changes.
+    element.isDirty = true;
+
+    // Check that save button is not disabled.
+    assert.isFalse(element.disabled);
+
+    // Reset form.
+    await element.updateComplete;
+    await element.reset();
+
+    // Check that save button is still disabled.
+    assert.isTrue(element.disabled);
+  });
+
+  it('save button is enabled if request fails', async () => {
+    // Check that save button is initially disabled.
+    assert.isTrue(element.disabled);
+
+    // User makes some changes.
+    element.isDirty = true;
+
+    // Check that save button is not disabled.
+    assert.isFalse(element.disabled);
+
+    // User submits the change.
+    element.saving = true;
+
+    // Check that save button is disabled.
+    assert.isTrue(element.disabled);
+
+    // Request fails.
+    element.saving = false;
+    element.error = 'error';
+
+    // Check that save button is re-enabled.
+    assert.isFalse(element.disabled);
+  });
+
+  it('delta empty when no changes', async () => {
+    await element.updateComplete;
+    assert.deepEqual(element.delta, {});
+  });
+
+  it('toggling checkbox toggles sendEmail', async () => {
+    element.sendEmail = false;
+
+    await element.updateComplete;
+    const checkbox = element.querySelector('#sendEmail');
+
+    await checkbox.updateComplete;
+
+    checkbox.click();
+    await element.updateComplete;
+
+    assert.equal(checkbox.checked, true);
+    assert.equal(element.sendEmail, true);
+
+    checkbox.click();
+    await element.updateComplete;
+
+    assert.equal(checkbox.checked, false);
+    assert.equal(element.sendEmail, false);
+
+    checkbox.click();
+    await element.updateComplete;
+
+    assert.equal(checkbox.checked, true);
+    assert.equal(element.sendEmail, true);
+  });
+
+  it('changing status produces delta change (lit-element)', async () => {
+    element.statuses = [
+      {'status': 'New'},
+      {'status': 'Old'},
+      {'status': 'Test'},
+    ];
+    element.status = 'New';
+
+    await element.updateComplete;
+
+    const statusComponent = element.querySelector('#statusInput');
+    statusComponent.status = 'Old';
+
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {
+      status: 'Old',
+    });
+  });
+
+  it('changing owner produces delta change (React)', async () => {
+    element.ownerName = 'initial-owner@bird.org';
+    await element.updateComplete;
+
+    const input = element.querySelector('#ownerInput');
+    enterInput(input, 'new-owner@bird.org');
+    await element.updateComplete;
+
+    const expected = {ownerRef: {displayName: 'new-owner@bird.org'}};
+    assert.deepEqual(element.delta, expected);
+  });
+
+  it('adding CC produces delta change (React)', async () => {
+    element.cc = [
+      {displayName: 'initial-cc@bird.org', userId: '1234'},
+    ];
+
+    await element.updateComplete;
+
+    const input = element.querySelector('#ccInput');
+    enterInput(input, 'another@bird.org');
+    await element.updateComplete;
+
+    const expected = {
+      ccRefsAdd: [{displayName: 'another@bird.org'}],
+      ccRefsRemove: [{displayName: 'initial-cc@bird.org'}],
+    };
+    assert.deepEqual(element.delta, expected);
+  });
+
+  it('invalid status throws', async () => {
+    element.statuses = [
+      {'status': 'New'},
+      {'status': 'Old'},
+      {'status': 'Duplicate'},
+    ];
+    element.status = 'Duplicate';
+
+    await element.updateComplete;
+
+    const statusComponent = element.querySelector('#statusInput');
+    statusComponent.shadowRoot.querySelector('#mergedIntoInput').value = 'xx';
+    assert.deepEqual(element.delta, {});
+    assert.equal(
+        element.error,
+        'Invalid issue ref: xx. Expected [projectName:]issueId.');
+  });
+
+  it('cannot block an issue on itself', async () => {
+    element.projectName = 'proj';
+    element.issueRef = {projectName: 'proj', localId: 123};
+
+    await element.updateComplete;
+
+    for (const fieldName of ['blockedOn', 'blocking']) {
+      const input =
+        element.querySelector(`#${fieldName}Input`);
+      enterInput(input, '123');
+      await element.updateComplete;
+
+      assert.deepEqual(element.delta, {});
+      assert.equal(
+          element.error,
+          `Invalid issue ref: 123. Cannot merge or block an issue on itself.`);
+      fireEvent.keyDown(input, {key: 'Backspace', code: 'Backspace'});
+      await element.updateComplete;
+
+      enterInput(input, 'proj:123');
+      await element.updateComplete;
+
+      assert.deepEqual(element.delta, {});
+      assert.equal(
+          element.error,
+          `Invalid issue ref: proj:123. ` +
+        'Cannot merge or block an issue on itself.');
+      fireEvent.keyDown(input, {key: 'Backspace', code: 'Backspace'});
+      await element.updateComplete;
+
+      enterInput(input, 'proj2:123');
+      await element.updateComplete;
+
+      assert.notDeepEqual(element.delta, {});
+      assert.equal(element.error, '');
+
+      fireEvent.keyDown(input, {key: 'Backspace', code: 'Backspace'});
+      await element.updateComplete;
+    }
+  });
+
+  it('cannot merge an issue into itself', async () => {
+    element.statuses = [
+      {'status': 'New'},
+      {'status': 'Duplicate'},
+    ];
+    element.status = 'New';
+    element.projectName = 'proj';
+    element.issueRef = {projectName: 'proj', localId: 123};
+
+    await element.updateComplete;
+
+    const statusComponent = element.querySelector('#statusInput');
+    const root = statusComponent.shadowRoot;
+    const statusInput = root.querySelector('#statusInput');
+    statusInput.value = 'Duplicate';
+    statusInput.dispatchEvent(new Event('change'));
+
+    await element.updateComplete;
+
+    root.querySelector('#mergedIntoInput').value = 'proj:123';
+    assert.deepEqual(element.delta, {});
+    assert.equal(
+        element.error,
+        `Invalid issue ref: proj:123. Cannot merge or block an issue on itself.`);
+
+    root.querySelector('#mergedIntoInput').value = '123';
+    assert.deepEqual(element.delta, {});
+    assert.equal(
+        element.error,
+        `Invalid issue ref: 123. Cannot merge or block an issue on itself.`);
+
+    root.querySelector('#mergedIntoInput').value = 'proj2:123';
+    assert.notDeepEqual(element.delta, {});
+    assert.equal(element.error, '');
+  });
+
+  it('cannot set invalid emails', async () => {
+    await element.updateComplete;
+
+    const ccInput = element.querySelector('#ccInput');
+    enterInput(ccInput, 'invalid!email');
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {});
+    assert.equal(
+        element.error,
+        `Invalid email address: invalid!email`);
+
+    const input = element.querySelector('#ownerInput');
+    enterInput(input, 'invalid!email2');
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {});
+    assert.equal(
+        element.error,
+        `Invalid email address: invalid!email2`);
+  });
+
+  it('can remove invalid values', async () => {
+    element.projectName = 'proj';
+    element.issueRef = {projectName: 'proj', localId: 123};
+
+    element.statuses = [
+      {'status': 'Duplicate'},
+    ];
+    element.status = 'Duplicate';
+    element.mergedInto = element.issueRef;
+
+    element.blockedOn = [element.issueRef];
+    element.blocking = [element.issueRef];
+
+    await element.updateComplete;
+
+    const blockedOnInput = element.querySelector('#blockedOnInput');
+    const blockingInput = element.querySelector('#blockingInput');
+    const statusInput = element.querySelector('#statusInput');
+
+    await element.updateComplete;
+
+    const mergedIntoInput =
+      statusInput.shadowRoot.querySelector('#mergedIntoInput');
+
+    fireEvent.keyDown(blockedOnInput, {key: 'Backspace', code: 'Backspace'});
+    await element.updateComplete;
+    fireEvent.keyDown(blockingInput, {key: 'Backspace', code: 'Backspace'});
+    await element.updateComplete;
+    mergedIntoInput.value = 'proj:124';
+    await element.updateComplete;
+
+    assert.deepEqual(
+        element.delta,
+        {
+          blockedOnRefsRemove: [{projectName: 'proj', localId: 123}],
+          blockingRefsRemove: [{projectName: 'proj', localId: 123}],
+          mergedIntoRef: {projectName: 'proj', localId: 124},
+        });
+    assert.equal(element.error, '');
+  });
+
+  it('not changing status produces no delta', async () => {
+    element.statuses = [
+      {'status': 'Duplicate'},
+    ];
+    element.status = 'Duplicate';
+
+    element.mergedInto = {
+      projectName: 'chromium',
+      localId: 1234,
+    };
+
+    element.projectName = 'chromium';
+
+    await element.updateComplete;
+    await element.updateComplete; // Merged input updates its value.
+
+    assert.deepEqual(element.delta, {});
+  });
+
+  it('changing status to duplicate produces delta change', async () => {
+    element.statuses = [
+      {'status': 'New'},
+      {'status': 'Duplicate'},
+    ];
+    element.status = 'New';
+
+    await element.updateComplete;
+
+    const statusComponent = element.querySelector(
+        '#statusInput');
+    const root = statusComponent.shadowRoot;
+    const statusInput = root.querySelector('#statusInput');
+    statusInput.value = 'Duplicate';
+    statusInput.dispatchEvent(new Event('change'));
+
+    await element.updateComplete;
+
+    root.querySelector('#mergedIntoInput').value = 'chromium:1234';
+    assert.deepEqual(element.delta, {
+      status: 'Duplicate',
+      mergedIntoRef: {
+        projectName: 'chromium',
+        localId: 1234,
+      },
+    });
+  });
+
+  it('changing summary produces delta change', async () => {
+    element.summary = 'Old summary';
+
+    await element.updateComplete;
+
+    element.querySelector(
+        '#summaryInput').value = 'newfangled fancy summary';
+    assert.deepEqual(element.delta, {
+      summary: 'newfangled fancy summary',
+    });
+  });
+
+  it('custom fields the user cannot edit should be hidden', async () => {
+    element.projectName = 'proj';
+    const fieldName = 'projects/proj/fieldDefs/1';
+    const restrictedFieldName = 'projects/proj/fieldDefs/2';
+    element._permissions = {
+      [fieldName]: {permissions: [FIELD_DEF_VALUE_EDIT]},
+      [restrictedFieldName]: {permissions: []}};
+    element.fieldDefs = [
+      {
+        fieldRef: {
+          fieldName: 'normalFd',
+          fieldId: 1,
+          type: 'ENUM_TYPE',
+        },
+      },
+      {
+        fieldRef: {
+          fieldName: 'cantEditFd',
+          fieldId: 2,
+          type: 'ENUM_TYPE',
+        },
+      },
+    ];
+
+    await element.updateComplete;
+    assert.isFalse(element.querySelector('#normalFdInput').hidden);
+    assert.isTrue(element.querySelector('#cantEditFdInput').hidden);
+  });
+
+  it('changing enum custom fields produces delta', async () => {
+    element.fieldValueMap = new Map([['fakefield', ['prev value']]]);
+    element.fieldDefs = [
+      {
+        fieldRef: {
+          fieldName: 'testField',
+          fieldId: 1,
+          type: 'ENUM_TYPE',
+        },
+      },
+      {
+        fieldRef: {
+          fieldName: 'fakeField',
+          fieldId: 2,
+          type: 'ENUM_TYPE',
+        },
+      },
+    ];
+
+    await element.updateComplete;
+
+    const input1 = element.querySelector('#testFieldInput');
+    const input2 = element.querySelector('#fakeFieldInput');
+
+    input1.values = ['test value'];
+    input2.values = [];
+
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {
+      fieldValsAdd: [
+        {
+          fieldRef: {
+            fieldName: 'testField',
+            fieldId: 1,
+            type: 'ENUM_TYPE',
+          },
+          value: 'test value',
+        },
+      ],
+      fieldValsRemove: [
+        {
+          fieldRef: {
+            fieldName: 'fakeField',
+            fieldId: 2,
+            type: 'ENUM_TYPE',
+          },
+          value: 'prev value',
+        },
+      ],
+    });
+  });
+
+  it('changing approvers produces delta', async () => {
+    element.isApproval = true;
+    element.hasApproverPrivileges = true;
+    element.approvers = [
+      {displayName: 'foo@example.com', userId: '1'},
+      {displayName: 'bar@example.com', userId: '2'},
+      {displayName: 'baz@example.com', userId: '3'},
+    ];
+
+    await element.updateComplete;
+    await element.updateComplete;
+
+    element.querySelector('#approversInput').values =
+        ['chicken@example.com', 'foo@example.com', 'dog@example.com'];
+
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {
+      approverRefsAdd: [
+        {displayName: 'chicken@example.com'},
+        {displayName: 'dog@example.com'},
+      ],
+      approverRefsRemove: [
+        {displayName: 'bar@example.com'},
+        {displayName: 'baz@example.com'},
+      ],
+    });
+  });
+
+  it('changing blockedon produces delta change (React)', async () => {
+    element.blockedOn = [
+      {projectName: 'chromium', localId: '1234'},
+      {projectName: 'monorail', localId: '4567'},
+    ];
+    element.projectName = 'chromium';
+
+    await element.updateComplete;
+    await element.updateComplete;
+
+    const input = element.querySelector('#blockedOnInput');
+
+    fireEvent.keyDown(input, {key: 'Backspace', code: 'Backspace'});
+    await element.updateComplete;
+
+    enterInput(input, 'v8:5678');
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {
+      blockedOnRefsAdd: [{
+        projectName: 'v8',
+        localId: 5678,
+      }],
+      blockedOnRefsRemove: [{
+        projectName: 'monorail',
+        localId: 4567,
+      }],
+    });
+  });
+
+  it('_optionsForField computes options', () => {
+    const optionsPerEnumField = new Map([
+      ['enumfield', [{optionName: 'one'}, {optionName: 'two'}]],
+    ]);
+    assert.deepEqual(
+        element._optionsForField(optionsPerEnumField, new Map(), 'enumField'), [
+          {
+            optionName: 'one',
+          },
+          {
+            optionName: 'two',
+          },
+        ]);
+  });
+
+  it('changing enum fields produces delta', async () => {
+    element.fieldDefs = [
+      {
+        fieldRef: {
+          fieldName: 'enumField',
+          fieldId: 1,
+          type: 'ENUM_TYPE',
+        },
+        isMultivalued: true,
+      },
+    ];
+
+    element.optionsPerEnumField = new Map([
+      ['enumfield', [{optionName: 'one'}, {optionName: 'two'}]],
+    ]);
+
+    await element.updateComplete;
+    await element.updateComplete;
+
+    element.querySelector(
+        '#enumFieldInput').values = ['one', 'two'];
+
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {
+      fieldValsAdd: [
+        {
+          fieldRef: {
+            fieldName: 'enumField',
+            fieldId: 1,
+            type: 'ENUM_TYPE',
+          },
+          value: 'one',
+        },
+        {
+          fieldRef: {
+            fieldName: 'enumField',
+            fieldId: 1,
+            type: 'ENUM_TYPE',
+          },
+          value: 'two',
+        },
+      ],
+    });
+  });
+
+  it('changing multiple single valued enum fields', async () => {
+    element.fieldDefs = [
+      {
+        fieldRef: {
+          fieldName: 'enumField',
+          fieldId: 1,
+          type: 'ENUM_TYPE',
+        },
+      },
+      {
+        fieldRef: {
+          fieldName: 'enumField2',
+          fieldId: 2,
+          type: 'ENUM_TYPE',
+        },
+      },
+    ];
+
+    element.optionsPerEnumField = new Map([
+      ['enumfield', [{optionName: 'one'}, {optionName: 'two'}]],
+      ['enumfield2', [{optionName: 'three'}, {optionName: 'four'}]],
+    ]);
+
+    await element.updateComplete;
+
+    element.querySelector('#enumFieldInput').values = ['two'];
+    element.querySelector('#enumField2Input').values = ['three'];
+
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {
+      fieldValsAdd: [
+        {
+          fieldRef: {
+            fieldName: 'enumField',
+            fieldId: 1,
+            type: 'ENUM_TYPE',
+          },
+          value: 'two',
+        },
+        {
+          fieldRef: {
+            fieldName: 'enumField2',
+            fieldId: 2,
+            type: 'ENUM_TYPE',
+          },
+          value: 'three',
+        },
+      ],
+    });
+  });
+
+  it('adding components produces delta', async () => {
+    await element.updateComplete;
+
+    element.isApproval = false;
+    element.issuePermissions = [ISSUE_EDIT_PERMISSION];
+
+    element.components = [];
+
+    await element.updateComplete;
+
+    element._values.components = ['Hello>World'];
+
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {
+      compRefsAdd: [
+        {path: 'Hello>World'},
+      ],
+    });
+
+    element._values.components = ['Hello>World', 'Test', 'Multi'];
+
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {
+      compRefsAdd: [
+        {path: 'Hello>World'},
+        {path: 'Test'},
+        {path: 'Multi'},
+      ],
+    });
+
+    element._values.components = [];
+
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {});
+  });
+
+  it('removing components produces delta', async () => {
+    await element.updateComplete;
+
+    element.isApproval = false;
+    element.issuePermissions = [ISSUE_EDIT_PERMISSION];
+
+    element.components = [{path: 'Hello>World'}];
+
+    await element.updateComplete;
+
+    element._values.components = [];
+
+    await element.updateComplete;
+
+    assert.deepEqual(element.delta, {
+      compRefsRemove: [
+        {path: 'Hello>World'},
+      ],
+    });
+  });
+
+  it('approver input appears when user has privileges', async () => {
+    assert.isNull(element.querySelector('#approversInput'));
+    element.isApproval = true;
+    element.hasApproverPrivileges = true;
+
+    await element.updateComplete;
+
+    assert.isNotNull(element.querySelector('#approversInput'));
+  });
+
+  it('reset sets controlled values to default', async () => {
+    element.ownerName = 'burb@bird.com';
+    element.cc = [
+      {displayName: 'flamingo@bird.com', userId: '1234'},
+      {displayName: 'penguin@bird.com', userId: '5678'},
+    ];
+    element.components = [{path: 'Bird>Penguin'}];
+    element.labelNames = ['chickadee-chirp'];
+    element.blockedOn = [{localId: 1234, projectName: 'project'}];
+    element.blocking = [{localId: 5678, projectName: 'other-project'}];
+    element.projectName = 'project';
+
+    // Update cycle is needed because <mr-edit-metadata> initializes
+    // this.values in updated().
+    await element.updateComplete;
+
+    const initialValues = {
+      owner: 'burb@bird.com',
+      cc: ['flamingo@bird.com', 'penguin@bird.com'],
+      components: ['Bird>Penguin'],
+      labels: ['chickadee-chirp'],
+      blockedOn: ['1234'],
+      blocking: ['other-project:5678'],
+    };
+
+    assert.deepEqual(element._values, initialValues);
+
+    element._values = {
+      owner: 'newburb@hello.com',
+      cc: ['noburbs@wings.com'],
+    };
+    element.reset();
+
+    assert.deepEqual(element._values, initialValues);
+  })
+
+  it('reset empties form values', async () => {
+    element.fieldDefs = [
+      {
+        fieldRef: {
+          fieldName: 'testField',
+          fieldId: 1,
+          type: 'ENUM_TYPE',
+        },
+      },
+      {
+        fieldRef: {
+          fieldName: 'fakeField',
+          fieldId: 2,
+          type: 'ENUM_TYPE',
+        },
+      },
+    ];
+
+    await element.updateComplete;
+
+    const uploader = element.querySelector('mr-upload');
+    uploader.files = [
+      {name: 'test.png'},
+      {name: 'rutabaga.png'},
+    ];
+
+    element.querySelector('#testFieldInput').values = 'testy test';
+    element.querySelector('#fakeFieldInput').values = 'hello world';
+
+    await element.reset();
+
+    assert.lengthOf(element.querySelector('#testFieldInput').value, 0);
+    assert.lengthOf(element.querySelector('#fakeFieldInput').value, 0);
+    assert.lengthOf(uploader.files, 0);
+  });
+
+  it('reset results in empty delta', async () => {
+    element.ownerName = 'goose@bird.org';
+    await element.updateComplete;
+
+    element._values.owner = 'penguin@bird.org';
+    const expected = {ownerRef: {displayName: 'penguin@bird.org'}};
+    assert.deepEqual(element.delta, expected);
+
+    await element.reset();
+    assert.deepEqual(element.delta, {});
+  });
+
+  it('edit issue permissions', async () => {
+    const allFields = ['summary', 'status', 'owner', 'cc'];
+    const testCases = [
+      {permissions: [], nonNull: []},
+      {permissions: [ISSUE_EDIT_PERMISSION], nonNull: allFields},
+      {permissions: [ISSUE_EDIT_SUMMARY_PERMISSION], nonNull: ['summary']},
+      {permissions: [ISSUE_EDIT_STATUS_PERMISSION], nonNull: ['status']},
+      {permissions: [ISSUE_EDIT_OWNER_PERMISSION], nonNull: ['owner']},
+      {permissions: [ISSUE_EDIT_CC_PERMISSION], nonNull: ['cc']},
+    ];
+    element.statuses = [{'status': 'Foo'}];
+
+    for (const testCase of testCases) {
+      element.issuePermissions = testCase.permissions;
+      await element.updateComplete;
+
+      allFields.forEach((fieldName) => {
+        const field = element.querySelector(`#${fieldName}Input`);
+        if (testCase.nonNull.includes(fieldName)) {
+          assert.isNotNull(field);
+        } else {
+          assert.isNull(field);
+        }
+      });
+    }
+  });
+
+  it('duplicate issue is rendered correctly', async () => {
+    element.statuses = [
+      {'status': 'Duplicate'},
+    ];
+    element.status = 'Duplicate';
+    element.projectName = 'chromium';
+    element.mergedInto = {
+      projectName: 'chromium',
+      localId: 1234,
+    };
+
+    await element.updateComplete;
+    await element.updateComplete;
+
+    const statusComponent = element.querySelector('#statusInput');
+    const root = statusComponent.shadowRoot;
+    assert.equal(
+        root.querySelector('#mergedIntoInput').value, '1234');
+  });
+
+  it('duplicate issue on different project is rendered correctly', async () => {
+    element.statuses = [
+      {'status': 'Duplicate'},
+    ];
+    element.status = 'Duplicate';
+    element.projectName = 'chromium';
+    element.mergedInto = {
+      projectName: 'monorail',
+      localId: 1234,
+    };
+
+    await element.updateComplete;
+    await element.updateComplete;
+
+    const statusComponent = element.querySelector('#statusInput');
+    const root = statusComponent.shadowRoot;
+    assert.equal(
+        root.querySelector('#mergedIntoInput').value, 'monorail:1234');
+  });
+
+  it('filter out deleted users', async () => {
+    element.cc = [
+      {displayName: 'test@example.com', userId: '1234'},
+      {displayName: 'a_deleted_user'},
+      {displayName: 'someone@example.com', userId: '5678'},
+    ];
+
+    await element.updateComplete;
+
+    assert.deepEqual(element._values.cc, [
+      'test@example.com',
+      'someone@example.com',
+    ]);
+  });
+
+  it('renders valid markdown description with preview', async () => {
+    await element.updateComplete;
+
+    element.prefs = new Map([['render_markdown', true]]);
+    element.projectName = 'monkeyrail';
+    sinon.stub(element, 'getCommentContent').returns('# h1');
+
+    await element.updateComplete;
+
+    assert.isTrue(element._renderMarkdown);
+
+    const previewMarkdown = element.querySelector('.markdown-preview');
+    assert.isNotNull(previewMarkdown);
+
+    const headerText = previewMarkdown.querySelector('h1').textContent;
+    assert.equal(headerText, 'h1');
+  });
+
+  it('does not show preview when markdown is disabled', async () => {
+    element.prefs = new Map([['render_markdown', false]]);
+    element.projectName = 'monkeyrail';
+    sinon.stub(element, 'getCommentContent').returns('# h1');
+
+    await element.updateComplete;
+
+    const previewMarkdown = element.querySelector('.markdown-preview');
+    assert.isNull(previewMarkdown);
+  });
+
+  it('does not show preview when no input', async () => {
+    element.prefs = new Map([['render_markdown', true]]);
+    element.projectName = 'monkeyrail';
+    sinon.stub(element, 'getCommentContent').returns('');
+
+    await element.updateComplete;
+
+    const previewMarkdown = element.querySelector('.markdown-preview');
+    assert.isNull(previewMarkdown);
+  });
+});
+
diff --git a/static_src/elements/issue-detail/metadata/mr-metadata/mr-field-values.js b/static_src/elements/issue-detail/metadata/mr-metadata/mr-field-values.js
new file mode 100644
index 0000000..ba68c39
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-metadata/mr-field-values.js
@@ -0,0 +1,58 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+
+import 'elements/framework/links/mr-user-link/mr-user-link.js';
+import {fieldTypes, EMPTY_FIELD_VALUE} from 'shared/issue-fields.js';
+import {displayNameToUserRef} from 'shared/convertersV0.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+/**
+ * `<mr-field-values>`
+ *
+ * Takes in a list of field values and a single fieldDef and displays them
+ * according to their type.
+ *
+ */
+export class MrFieldValues extends LitElement {
+  /** @override */
+  static get styles() {
+    return SHARED_STYLES;
+  }
+
+  /** @override */
+  render() {
+    if (!this.values || !this.values.length) {
+      return html`${EMPTY_FIELD_VALUE}`;
+    }
+    switch (this.type) {
+      case fieldTypes.URL_TYPE:
+        return html`${this.values.map((value) => html`
+          <a href=${value} target="_blank" rel="nofollow">${value}</a>
+        `)}`;
+      case fieldTypes.USER_TYPE:
+        return html`${this.values.map((value) => html`
+          <mr-user-link .userRef=${displayNameToUserRef(value)}></mr-user-link>
+        `)}`;
+      default:
+        return html`${this.values.map((value, i) => html`
+          <a href="/p/${this.projectName}/issues/list?q=${this.name}=&quot;${value}&quot;">
+            ${value}</a>${this.values.length - 1 > i ? ', ' : ''}
+        `)}`;
+    }
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      name: {type: String},
+      type: {type: Object},
+      projectName: {type: String},
+      values: {type: Array},
+    };
+  }
+}
+
+customElements.define('mr-field-values', MrFieldValues);
diff --git a/static_src/elements/issue-detail/metadata/mr-metadata/mr-field-values.test.js b/static_src/elements/issue-detail/metadata/mr-metadata/mr-field-values.test.js
new file mode 100644
index 0000000..e334841
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-metadata/mr-field-values.test.js
@@ -0,0 +1,86 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrFieldValues} from './mr-field-values.js';
+
+import {fieldTypes} from 'shared/issue-fields.js';
+
+
+let element;
+
+describe('mr-field-values', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-field-values');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrFieldValues);
+  });
+
+  it('renders empty if no values', async () => {
+    element.values = [];
+
+    await element.updateComplete;
+
+    assert.equal('----', element.shadowRoot.textContent.trim());
+  });
+
+  it('renders user links when type is user', async () => {
+    element.type = fieldTypes.USER_TYPE;
+    element.values = ['test@example.com', 'hello@world.com'];
+
+    await element.updateComplete;
+
+    const links = element.shadowRoot.querySelectorAll('mr-user-link');
+
+    await links.updateComplete;
+
+    assert.equal(2, links.length);
+    assert.include(links[0].shadowRoot.textContent, 'test@example.com');
+    assert.include(links[1].shadowRoot.textContent, 'hello@world.com');
+  });
+
+  it('renders URLs when type is url', async () => {
+    element.type = fieldTypes.URL_TYPE;
+    element.values = ['http://hello.world', 'go/link'];
+
+    await element.updateComplete;
+
+    const links = element.shadowRoot.querySelectorAll('a');
+
+    assert.equal(2, links.length);
+    assert.include(links[0].textContent, 'http://hello.world');
+    assert.include(links[0].href, 'http://hello.world');
+    assert.include(links[1].textContent, 'go/link');
+    assert.include(links[1].href, 'go/link');
+  });
+
+  it('renders generic field when field is string', async () => {
+    element.type = fieldTypes.STR_TYPE;
+    element.values = ['blah', 'random value', 'nothing here'];
+    element.name = 'fieldName';
+    element.projectName = 'project';
+
+    await element.updateComplete;
+
+    const links = element.shadowRoot.querySelectorAll('a');
+
+    assert.equal(3, links.length);
+    assert.include(links[0].textContent, 'blah');
+    assert.include(links[0].href,
+        '/p/project/issues/list?q=fieldName=%22blah%22');
+    assert.include(links[1].textContent, 'random value');
+    assert.include(links[1].href,
+        '/p/project/issues/list?q=fieldName=%22random%20value%22');
+    assert.include(links[2].textContent, 'nothing here');
+    assert.include(links[2].href,
+        '/p/project/issues/list?q=fieldName=%22nothing%20here%22');
+  });
+});
diff --git a/static_src/elements/issue-detail/metadata/mr-metadata/mr-issue-metadata.js b/static_src/elements/issue-detail/metadata/mr-metadata/mr-issue-metadata.js
new file mode 100644
index 0000000..60d570c
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-metadata/mr-issue-metadata.js
@@ -0,0 +1,352 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import {connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as userV0 from 'reducers/userV0.js';
+import 'elements/framework/mr-star/mr-issue-star.js';
+import 'elements/framework/links/mr-user-link/mr-user-link.js';
+import 'elements/framework/links/mr-hotlist-link/mr-hotlist-link.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import {pluralize} from 'shared/helpers.js';
+import './mr-metadata.js';
+
+
+/**
+ * `<mr-issue-metadata>`
+ *
+ * The metadata view for a single issue. Contains information such as the owner.
+ *
+ */
+export class MrIssueMetadata extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          box-sizing: border-box;
+          padding: 0.25em 8px;
+          max-width: 100%;
+          display: block;
+        }
+        h3 {
+          display: block;
+          font-size: var(--chops-main-font-size);
+          margin: 0;
+          line-height: 160%;
+          width: 40%;
+          height: 100%;
+          overflow: ellipsis;
+          flex-grow: 0;
+          flex-shrink: 0;
+        }
+        a.label {
+          color: hsl(120, 100%, 25%);
+          text-decoration: none;
+        }
+        a.label[data-derived] {
+          font-style: italic;
+        }
+        button.linkify {
+          display: flex;
+          align-items: center;
+          text-decoration: none;
+          padding: 0.25em 0;
+        }
+        button.linkify i.material-icons {
+          margin-right: 4px;
+          font-size: var(--chops-icon-font-size);
+        }
+        mr-hotlist-link {
+          text-overflow: ellipsis;
+          overflow: hidden;
+          display: block;
+          width: 100%;
+        }
+        .bottom-section-cell, .labels-container {
+          padding: 0.5em 4px;
+          width: 100%;
+          box-sizing: border-box;
+        }
+        .bottom-section-cell {
+          display: flex;
+          flex-direction: row;
+          flex-wrap: nowrap;
+          align-items: flex-start;
+        }
+        .bottom-section-content {
+          max-width: 60%;
+        }
+        .star-line {
+          width: 100%;
+          text-align: center;
+          display: flex;
+          align-items: center;
+          justify-content: center;
+        }
+        mr-issue-star {
+          margin-right: 4px;
+          padding-bottom: 2px;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    const hotlistsByRole = this._hotlistsByRole;
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <div class="star-line">
+        <mr-issue-star
+          .issueRef=${this.issueRef}
+        ></mr-issue-star>
+        Starred by ${this.issue.starCount || 0} ${pluralize(this.issue.starCount, 'user')}
+      </div>
+      <mr-metadata
+        aria-label="Issue Metadata"
+        .owner=${this.issue.ownerRef}
+        .cc=${this.issue.ccRefs}
+        .issueStatus=${this.issue.statusRef}
+        .components=${this._components}
+        .fieldDefs=${this._fieldDefs}
+        .mergedInto=${this.mergedInto}
+        .modifiedTimestamp=${this.issue.modifiedTimestamp}
+      ></mr-metadata>
+
+      <div class="labels-container">
+        ${this.issue.labelRefs && this.issue.labelRefs.map((label) => html`
+          <a
+            title="${_labelTitle(this.labelDefMap, label)}"
+            href="/p/${this.issueRef.projectName}/issues/list?q=label:${label.label}"
+            class="label"
+            ?data-derived=${label.isDerived}
+          >${label.label}</a>
+          <br>
+        `)}
+      </div>
+
+      ${this.sortedBlockedOn.length ? html`
+        <div class="bottom-section-cell">
+          <h3>BlockedOn:</h3>
+            <div class="bottom-section-content">
+            ${this.sortedBlockedOn.map((issue) => html`
+              <mr-issue-link
+                .projectName=${this.issueRef.projectName}
+                .issue=${issue}
+              >
+              </mr-issue-link>
+              <br />
+            `)}
+            <button
+              class="linkify"
+              @click=${this.openViewBlockedOn}
+            >
+              <i class="material-icons" role="presentation">list</i>
+              View details
+            </button>
+          </div>
+        </div>
+      `: ''}
+
+      ${this.blocking.length ? html`
+        <div class="bottom-section-cell">
+          <h3>Blocking:</h3>
+          <div class="bottom-section-content">
+            ${this.blocking.map((issue) => html`
+              <mr-issue-link
+                .projectName=${this.issueRef.projectName}
+                .issue=${issue}
+              >
+              </mr-issue-link>
+              <br />
+            `)}
+          </div>
+        </div>
+      `: ''}
+
+      ${this._userId ? html`
+        <div class="bottom-section-cell">
+          <h3>Your Hotlists:</h3>
+          <div class="bottom-section-content" id="user-hotlists">
+            ${this._renderHotlists(hotlistsByRole.user)}
+            <button
+              class="linkify"
+              @click=${this.openUpdateHotlists}
+            >
+              <i class="material-icons" role="presentation">create</i> Update your hotlists
+            </button>
+          </div>
+        </div>
+      `: ''}
+
+      ${hotlistsByRole.participants.length ? html`
+        <div class="bottom-section-cell">
+          <h3>Participant's Hotlists:</h3>
+          <div class="bottom-section-content">
+            ${this._renderHotlists(hotlistsByRole.participants)}
+          </div>
+        </div>
+      ` : ''}
+
+      ${hotlistsByRole.others.length ? html`
+        <div class="bottom-section-cell">
+          <h3>Other Hotlists:</h3>
+          <div class="bottom-section-content">
+            ${this._renderHotlists(hotlistsByRole.others)}
+          </div>
+        </div>
+      ` : ''}
+    `;
+  }
+
+  /**
+   * Helper to render hotlists.
+   * @param {Array<Hotlist>} hotlists
+   * @return {Array<TemplateResult>}
+   * @private
+   */
+  _renderHotlists(hotlists) {
+    return hotlists.map((hotlist) => html`
+      <mr-hotlist-link .hotlist=${hotlist}></mr-hotlist-link>
+    `);
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      issue: {type: Object},
+      issueRef: {type: Object},
+      projectConfig: String,
+      user: {type: Object},
+      issueHotlists: {type: Array},
+      blocking: {type: Array},
+      sortedBlockedOn: {type: Array},
+      relatedIssues: {type: Object},
+      labelDefMap: {type: Object},
+      _components: {type: Array},
+      _fieldDefs: {type: Array},
+      _type: {type: String},
+    };
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.issue = issueV0.viewedIssue(state);
+    this.issueRef = issueV0.viewedIssueRef(state);
+    this.user = userV0.currentUser(state);
+    this.projectConfig = projectV0.viewedConfig(state);
+    this.blocking = issueV0.blockingIssues(state);
+    this.sortedBlockedOn = issueV0.sortedBlockedOn(state);
+    this.mergedInto = issueV0.mergedInto(state);
+    this.relatedIssues = issueV0.relatedIssues(state);
+    this.issueHotlists = issueV0.hotlists(state);
+    this.labelDefMap = projectV0.labelDefMap(state);
+    this._components = issueV0.components(state);
+    this._fieldDefs = issueV0.fieldDefs(state);
+    this._type = issueV0.type(state);
+  }
+
+  /**
+   * @return {string|number} The current user's userId.
+   * @private
+   */
+  get _userId() {
+    return this.user && this.user.userId;
+  }
+
+  /**
+   * @return {Object<string, Array<Hotlist>>}
+   * @private
+   */
+  get _hotlistsByRole() {
+    const issueHotlists = this.issueHotlists;
+    const owner = this.issue && this.issue.ownerRef;
+    const cc = this.issue && this.issue.ccRefs;
+
+    const hotlists = {
+      user: [],
+      participants: [],
+      others: [],
+    };
+    (issueHotlists || []).forEach((hotlist) => {
+      if (hotlist.ownerRef.userId === this._userId) {
+        hotlists.user.push(hotlist);
+      } else if (_userIsParticipant(hotlist.ownerRef, owner, cc)) {
+        hotlists.participants.push(hotlist);
+      } else {
+        hotlists.others.push(hotlist);
+      }
+    });
+    return hotlists;
+  }
+
+  /**
+   * Opens dialog for updating ths issue's hotlists.
+   * @fires CustomEvent#open-dialog
+   */
+  openUpdateHotlists() {
+    this.dispatchEvent(new CustomEvent('open-dialog', {
+      bubbles: true,
+      composed: true,
+      detail: {
+        dialogId: 'update-issue-hotlists',
+      },
+    }));
+  }
+
+  /**
+   * Opens dialog with detailed view of blocked on issues.
+   * @fires CustomEvent#open-dialog
+   */
+  openViewBlockedOn() {
+    this.dispatchEvent(new CustomEvent('open-dialog', {
+      bubbles: true,
+      composed: true,
+      detail: {
+        dialogId: 'reorder-related-issues',
+      },
+    }));
+  }
+}
+
+/**
+ * @param {UserRef} user
+ * @param {UserRef} owner
+ * @param {Array<UserRef>} cc
+ * @return {boolean} Whether a given user is a participant of
+ *   a given hotlist attached to an issue. Used to sort hotlists into
+ *   "My hotlists" and "Other hotlists".
+ * @private
+ */
+function _userIsParticipant(user, owner, cc) {
+  if (owner && owner.userId === user.userId) {
+    return true;
+  }
+  return cc && cc.some((ccUser) => ccUser && ccUser.userId === user.userId);
+}
+
+/**
+ * @param {Map.<string, LabelDef>} labelDefMap
+ * @param {LabelDef} label
+ * @return {string} Tooltip shown to the user when hovering over a
+ *   given label.
+ * @private
+ */
+function _labelTitle(labelDefMap, label) {
+  if (!label) return '';
+  let docstring = '';
+  const key = label.label.toLowerCase();
+  if (labelDefMap && labelDefMap.has(key)) {
+    docstring = labelDefMap.get(key).docstring;
+  }
+  return (label.isDerived ? 'Derived: ' : '') + label.label +
+    (docstring ? ` = ${docstring}` : '');
+}
+
+customElements.define('mr-issue-metadata', MrIssueMetadata);
diff --git a/static_src/elements/issue-detail/metadata/mr-metadata/mr-issue-metadata.test.js b/static_src/elements/issue-detail/metadata/mr-metadata/mr-issue-metadata.test.js
new file mode 100644
index 0000000..c328057
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-metadata/mr-issue-metadata.test.js
@@ -0,0 +1,60 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrIssueMetadata} from './mr-issue-metadata.js';
+
+let element;
+
+describe('mr-issue-metadata', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-issue-metadata');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrIssueMetadata);
+  });
+
+  it('labels render', async () => {
+    element.issue = {
+      labelRefs: [
+        {label: 'test'},
+        {label: 'hello-world', isDerived: true},
+      ],
+    };
+
+    element.labelDefMap = new Map([
+      ['test', {label: 'test', docstring: 'this is a docstring'}],
+    ]);
+
+    await element.updateComplete;
+
+    const labels = element.shadowRoot.querySelectorAll('.label');
+
+    assert.equal(labels.length, 2);
+    assert.equal(labels[0].textContent.trim(), 'test');
+    assert.equal(labels[0].getAttribute('title'), 'test = this is a docstring');
+    assert.isUndefined(labels[0].dataset.derived);
+
+    assert.equal(labels[1].textContent.trim(), 'hello-world');
+    assert.equal(labels[1].getAttribute('title'), 'Derived: hello-world');
+    assert.isDefined(labels[1].dataset.derived);
+  });
+
+  it('update hotlist button is shown to users', async () => {
+    element.user = {userId: 1234};
+    await element.updateComplete;
+    assert.isNotNull(element.shadowRoot.querySelector('#user-hotlists'));
+  });
+
+  it('update hotlist button is not shown to anon', async () => {
+    await element.updateComplete;
+    assert.isNull(element.shadowRoot.querySelector('#user-hotlists'));
+  });
+});
diff --git a/static_src/elements/issue-detail/metadata/mr-metadata/mr-metadata.js b/static_src/elements/issue-detail/metadata/mr-metadata/mr-metadata.js
new file mode 100644
index 0000000..0ce172d
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-metadata/mr-metadata.js
@@ -0,0 +1,357 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import {connectStore} from 'reducers/base.js';
+import 'elements/chops/chops-timestamp/chops-timestamp.js';
+import 'elements/framework/links/mr-issue-link/mr-issue-link.js';
+import 'elements/framework/links/mr-user-link/mr-user-link.js';
+import 'elements/framework/mr-issue-slo/mr-issue-slo.js';
+
+import * as issueV0 from 'reducers/issueV0.js';
+import * as sitewide from 'reducers/sitewide.js';
+import * as userV0 from 'reducers/userV0.js';
+import './mr-field-values.js';
+import {isExperimentEnabled, SLO_EXPERIMENT} from 'shared/experiments.js';
+import {EMPTY_FIELD_VALUE} from 'shared/issue-fields.js';
+import {HARDCODED_FIELD_GROUPS, valuesForField, fieldDefsWithGroup,
+  fieldDefsWithoutGroup} from 'shared/metadata-helpers.js';
+import 'shared/typedef.js';
+import {AVAILABLE_CUES, cueNames, specToCueName,
+  cueNameToSpec} from 'elements/help/mr-cue/cue-helpers.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+
+/**
+ * `<mr-metadata>`
+ *
+ * Generalized metadata components, used for either approvals or issues.
+ *
+ */
+export class MrMetadata extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          display: table;
+          table-layout: fixed;
+          width: 100%;
+        }
+        td, th {
+          padding: 0.5em 4px;
+          vertical-align: top;
+          text-overflow: ellipsis;
+          overflow: hidden;
+        }
+        td {
+          width: 60%;
+        }
+        td.allow-overflow {
+          overflow: visible;
+        }
+        th {
+          text-align: left;
+          width: 40%;
+        }
+        .group-separator {
+          border-top: var(--chops-normal-border);
+        }
+        .group-title {
+          font-weight: normal;
+          font-style: oblique;
+          border-bottom: var(--chops-normal-border);
+          text-align: center;
+        }
+    `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
+            rel="stylesheet">
+      ${this._renderBuiltInFields()}
+      ${this._renderCustomFieldGroups()}
+    `;
+  }
+
+  /**
+   * Helper for handling the rendering of built in fields.
+   * @return {Array<TemplateResult>}
+   */
+  _renderBuiltInFields() {
+    return this.builtInFieldSpec.map((fieldName) => {
+      const fieldKey = fieldName.toLowerCase();
+
+      // Adding classes to table rows based on field names makes selecting
+      // rows with specific values easier, for example in tests.
+      let className = `row-${fieldKey}`;
+
+      const cueName = specToCueName(fieldKey);
+      if (cueName) {
+        className = `cue-${cueName}`;
+
+        if (!AVAILABLE_CUES.has(cueName)) return '';
+
+        return html`
+          <tr class=${className}>
+            <td colspan="2">
+              <mr-cue cuePrefName=${cueName}></mr-cue>
+            </td>
+          </tr>
+        `;
+      }
+
+      const isApprovalStatus = fieldKey === 'approvalstatus';
+      const isMergedInto = fieldKey === 'mergedinto';
+
+      const fieldValueTemplate = this._renderBuiltInFieldValue(fieldName);
+
+      if (!fieldValueTemplate) return '';
+
+      // Allow overflow to enable the FedRef popup to expand.
+      // TODO(jeffcarp): Look into a more elegant solution.
+      return html`
+        <tr class=${className}>
+          <th>${isApprovalStatus ? 'Status' : fieldName}:</th>
+          <td class=${isMergedInto ? 'allow-overflow' : ''}>
+            ${fieldValueTemplate}
+          </td>
+        </tr>
+      `;
+    });
+  }
+
+  /**
+   * A helper to display a single built-in field.
+   *
+   * @param {string} fieldName The name of the built in field to render.
+   * @return {TemplateResult|undefined} lit-html template for displaying the
+   *   value of the built in field. If undefined, the rendering code assumes
+   *   that the field should be hidden if empty.
+   */
+  _renderBuiltInFieldValue(fieldName) {
+    // TODO(zhangtiff): Merge with code in shared/issue-fields.js for further
+    // de-duplication.
+    switch (fieldName.toLowerCase()) {
+      case 'approvalstatus':
+        return this.approvalStatus || EMPTY_FIELD_VALUE;
+      case 'approvers':
+        return this.approvers && this.approvers.length ?
+          this.approvers.map((approver) => html`
+            <mr-user-link
+              .userRef=${approver}
+              showAvailabilityIcon
+            ></mr-user-link>
+            <br />
+          `) : EMPTY_FIELD_VALUE;
+      case 'setter':
+        return this.setter ? html`
+          <mr-user-link
+            .userRef=${this.setter}
+            showAvailabilityIcon
+          ></mr-user-link>
+          ` : undefined; // Hide the field when empty.
+      case 'owner':
+        return this.owner ? html`
+          <mr-user-link
+            .userRef=${this.owner}
+            showAvailabilityIcon
+            showAvailabilityText
+          ></mr-user-link>
+          ` : EMPTY_FIELD_VALUE;
+      case 'cc':
+        return this.cc && this.cc.length ?
+          this.cc.map((cc) => html`
+            <mr-user-link
+              .userRef=${cc}
+              showAvailabilityIcon
+            ></mr-user-link>
+            <br />
+          `) : EMPTY_FIELD_VALUE;
+      case 'status':
+        return this.issueStatus ? html`
+          ${this.issueStatus.status} <em>${
+            this.issueStatus.meansOpen ? '(Open)' : '(Closed)'}
+          </em>` : EMPTY_FIELD_VALUE;
+      case 'mergedinto':
+        // TODO(zhangtiff): This should use the project config to determine if a
+        // field allows merging rather than used a hard-coded value.
+        return this.issueStatus && this.issueStatus.status === 'Duplicate' ?
+          html`
+            <mr-issue-link
+              .projectName=${this.issueRef.projectName}
+              .issue=${this.mergedInto}
+            ></mr-issue-link>
+          `: undefined; // Hide the field when empty.
+      case 'components':
+        return (this.components && this.components.length) ?
+          this.components.map((comp) => html`
+            <a
+              href="/p/${this.issueRef.projectName
+                }/issues/list?q=component:${comp.path}"
+              title="${comp.path}${comp.docstring ?
+                ' = ' + comp.docstring : ''}"
+            >
+              ${comp.path}</a><br />
+          `) : EMPTY_FIELD_VALUE;
+      case 'modified':
+        return this.modifiedTimestamp ? html`
+            <chops-timestamp
+              .timestamp=${this.modifiedTimestamp}
+              short
+            ></chops-timestamp>
+          ` : EMPTY_FIELD_VALUE;
+      case 'slo':
+        if (isExperimentEnabled(
+            SLO_EXPERIMENT, this.currentUser, this.queryParams)) {
+          return html`<mr-issue-slo .issue=${this.issue}></mr-issue-slo>`;
+        } else {
+          return;
+        }
+    }
+
+    // Non-existent field.
+    return;
+  }
+
+  /**
+   * Helper for handling the rendering of custom fields defined in a project
+   * config.
+   * @return {TemplateResult} lit-html template.
+   */
+  _renderCustomFieldGroups() {
+    const grouped = fieldDefsWithGroup(this.fieldDefs,
+        this.fieldGroups, this.issueType);
+    const ungrouped = fieldDefsWithoutGroup(this.fieldDefs,
+        this.fieldGroups, this.issueType);
+    return html`
+      ${grouped.map((group) => html`
+        <tr>
+          <th class="group-title" colspan="2">
+            ${group.groupName}
+          </th>
+        </tr>
+        ${this._renderCustomFields(group.fieldDefs)}
+        <tr>
+          <th class="group-separator" colspan="2"></th>
+        </tr>
+      `)}
+
+      ${this._renderCustomFields(ungrouped)}
+    `;
+  }
+
+  /**
+   * Helper for handling the rendering of built in fields.
+   *
+   * @param {Array<FieldDef>} fieldDefs Arrays of configurations Objects
+   *   for fields to render.
+   * @return {Array<TemplateResult>} Array of lit-html templates to render, each
+   *   representing a single table row for a custom field.
+   */
+  _renderCustomFields(fieldDefs) {
+    if (!fieldDefs || !fieldDefs.length) return [];
+    return fieldDefs.map((field) => {
+      const fieldValues = valuesForField(
+          this.fieldValueMap, field.fieldRef.fieldName) || [];
+      return html`
+        <tr ?hidden=${field.isNiche && !fieldValues.length}>
+          <th title=${field.docstring}>${field.fieldRef.fieldName}:</th>
+          <td>
+            <mr-field-values
+              .name=${field.fieldRef.fieldName}
+              .type=${field.fieldRef.type}
+              .values=${fieldValues}
+              .projectName=${this.issueRef.projectName}
+            ></mr-field-values>
+          </td>
+        </tr>
+      `;
+    });
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      /**
+       * An Array of Strings to specify which built in fields to display.
+       */
+      builtInFieldSpec: {type: Array},
+      approvalStatus: {type: Array},
+      approvers: {type: Array},
+      setter: {type: Object},
+      cc: {type: Array},
+      components: {type: Array},
+      fieldDefs: {type: Array},
+      fieldGroups: {type: Array},
+      issue: {type: Object},
+      issueStatus: {type: String},
+      issueType: {type: String},
+      mergedInto: {type: Object},
+      modifiedTimestamp: {type: Number},
+      owner: {type: Object},
+      isApproval: {type: Boolean},
+      issueRef: {type: Object},
+      fieldValueMap: {type: Object},
+      currentUser: {type: Object},
+      queryParams: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.isApproval = false;
+    this.fieldGroups = HARDCODED_FIELD_GROUPS;
+    this.issueRef = {};
+
+    // Default built in fields used by issue metadata.
+    this.builtInFieldSpec = [
+      'Owner', 'CC', cueNameToSpec(cueNames.AVAILABILITY_MSGS),
+      'Status', 'MergedInto', 'Components', 'Modified', 'SLO',
+    ];
+    this.fieldValueMap = new Map();
+
+    this.approvalStatus = undefined;
+    this.approvers = undefined;
+    this.setter = undefined;
+    this.cc = undefined;
+    this.components = undefined;
+    this.fieldDefs = undefined;
+    this.issue = undefined;
+    this.issueStatus = undefined;
+    this.issueType = undefined;
+    this.mergedInto = undefined;
+    this.owner = undefined;
+    this.modifiedTimestamp = undefined;
+    this.currentUser = undefined;
+    this.queryParams = {};
+  }
+
+  /** @override */
+  connectedCallback() {
+    super.connectedCallback();
+
+    // This is set for accessibility. Do not override.
+    this.setAttribute('role', 'table');
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.fieldValueMap = issueV0.fieldValueMap(state);
+    this.issue = issueV0.viewedIssue(state);
+    this.issueType = issueV0.type(state);
+    this.issueRef = issueV0.viewedIssueRef(state);
+    this.relatedIssues = issueV0.relatedIssues(state);
+    this.currentUser = userV0.currentUser(state);
+    this.queryParams = sitewide.queryParams(state);
+  }
+}
+
+customElements.define('mr-metadata', MrMetadata);
diff --git a/static_src/elements/issue-detail/metadata/mr-metadata/mr-metadata.test.js b/static_src/elements/issue-detail/metadata/mr-metadata/mr-metadata.test.js
new file mode 100644
index 0000000..d9dcd25
--- /dev/null
+++ b/static_src/elements/issue-detail/metadata/mr-metadata/mr-metadata.test.js
@@ -0,0 +1,345 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrMetadata} from './mr-metadata.js';
+
+import {EMPTY_FIELD_VALUE} from 'shared/issue-fields.js';
+
+let element;
+
+describe('mr-metadata', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-metadata');
+    document.body.appendChild(element);
+
+    element.issueRef = {projectName: 'proj'};
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrMetadata);
+  });
+
+  it('has table role set', () => {
+    assert.equal(element.getAttribute('role'), 'table');
+  });
+
+  describe('default issue fields', () => {
+    it('renders empty Owner', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-owner');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('td');
+
+      assert.equal(labelElement.textContent, 'Owner:');
+      assert.equal(dataElement.textContent.trim(), EMPTY_FIELD_VALUE);
+    });
+
+    it('renders populated Owner', async () => {
+      element.owner = {displayName: 'test@example.com'};
+
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-owner');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('mr-user-link');
+
+      assert.equal(labelElement.textContent, 'Owner:');
+      assert.include(dataElement.shadowRoot.textContent.trim(),
+          'test@example.com');
+    });
+
+    it('renders empty CC', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-cc');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('td');
+
+      assert.equal(labelElement.textContent, 'CC:');
+      assert.equal(dataElement.textContent.trim(), EMPTY_FIELD_VALUE);
+    });
+
+    it('renders multiple CCed users', async () => {
+      element.cc = [
+        {displayName: 'test@example.com'},
+        {displayName: 'hello@example.com'},
+      ];
+
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-cc');
+      const labelElement = tr.querySelector('th');
+      const dataElements = tr.querySelectorAll('mr-user-link');
+
+      assert.equal(labelElement.textContent, 'CC:');
+      assert.include(dataElements[0].shadowRoot.textContent.trim(),
+          'test@example.com');
+      assert.include(dataElements[1].shadowRoot.textContent.trim(),
+          'hello@example.com');
+    });
+
+    it('renders empty Status', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-status');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('td');
+
+      assert.equal(labelElement.textContent, 'Status:');
+      assert.equal(dataElement.textContent.trim(), EMPTY_FIELD_VALUE);
+    });
+
+    it('renders populated Status', async () => {
+      element.issueStatus = {status: 'Fixed', meansOpen: false};
+
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-status');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('td');
+
+      assert.equal(labelElement.textContent, 'Status:');
+      assert.equal(dataElement.textContent.trim(), 'Fixed (Closed)');
+    });
+
+    it('hides empty MergedInto', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-mergedinto');
+      assert.isNull(tr);
+    });
+
+    it('hides MergedInto when Status is not Duplicate', async () => {
+      element.issueStatus = {status: 'test'};
+      element.mergedInto = {projectName: 'chromium', localId: 22};
+
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-mergedinto');
+      assert.isNull(tr);
+    });
+
+    it('shows MergedInto when Status is Duplicate', async () => {
+      element.issueStatus = {status: 'Duplicate'};
+      element.mergedInto = {projectName: 'chromium', localId: 22};
+
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-mergedinto');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('mr-issue-link');
+
+      assert.equal(labelElement.textContent, 'MergedInto:');
+      assert.equal(dataElement.shadowRoot.textContent.trim(),
+          'Issue chromium:22');
+    });
+
+    it('renders empty Components', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-components');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('td');
+
+      assert.equal(labelElement.textContent, 'Components:');
+      assert.equal(dataElement.textContent.trim(), EMPTY_FIELD_VALUE);
+    });
+
+    it('renders multiple Components', async () => {
+      element.components = [
+        {path: 'Test', docstring: 'i got docs'},
+        {path: 'Test>Nothing'},
+      ];
+
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-components');
+      const labelElement = tr.querySelector('th');
+      const dataElements = tr.querySelectorAll('td > a');
+
+      assert.equal(labelElement.textContent, 'Components:');
+
+      assert.equal(dataElements[0].textContent.trim(), 'Test');
+      assert.equal(dataElements[0].title, 'Test = i got docs');
+
+      assert.equal(dataElements[1].textContent.trim(), 'Test>Nothing');
+      assert.equal(dataElements[1].title, 'Test>Nothing');
+    });
+
+    it('renders empty Modified', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-modified');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('td');
+
+      assert.equal(labelElement.textContent, 'Modified:');
+      assert.equal(dataElement.textContent.trim(), EMPTY_FIELD_VALUE);
+    });
+
+    it('renders populated Modified', async () => {
+      element.modifiedTimestamp = 1234;
+
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-modified');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('chops-timestamp');
+
+      assert.equal(labelElement.textContent, 'Modified:');
+      assert.equal(dataElement.timestamp, 1234);
+    });
+
+    it('does not render SLO if user not in experiment', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-slo');
+      assert.isNull(tr);
+    });
+
+    it('renders SLO if user in experiment', async () => {
+      element.currentUser = {displayName: 'jessan@google.com'};
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-slo');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('mr-issue-slo');
+
+      assert.equal(labelElement.textContent, 'SLO:');
+      assert.equal(dataElement.shadowRoot.textContent.trim(), 'N/A');
+    });
+  });
+
+  describe('approval fields', () => {
+    beforeEach(() => {
+      element.builtInFieldSpec = ['ApprovalStatus', 'Approvers', 'Setter',
+        'cue.availability_msgs'];
+    });
+
+    it('renders empty ApprovalStatus', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-approvalstatus');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('td');
+
+      assert.equal(labelElement.textContent, 'Status:');
+      assert.equal(dataElement.textContent.trim(), EMPTY_FIELD_VALUE);
+    });
+
+    it('renders populated ApprovalStatus', async () => {
+      element.approvalStatus = 'Approved';
+
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-approvalstatus');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('td');
+
+      assert.equal(labelElement.textContent, 'Status:');
+      assert.equal(dataElement.textContent.trim(), 'Approved');
+    });
+
+    it('renders empty Approvers', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-approvers');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('td');
+
+      assert.equal(labelElement.textContent, 'Approvers:');
+      assert.equal(dataElement.textContent.trim(), EMPTY_FIELD_VALUE);
+    });
+
+    it('renders multiple Approvers', async () => {
+      element.approvers = [
+        {displayName: 'test@example.com'},
+        {displayName: 'hello@example.com'},
+      ];
+
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-approvers');
+      const labelElement = tr.querySelector('th');
+      const dataElements = tr.querySelectorAll('mr-user-link');
+
+      assert.equal(labelElement.textContent, 'Approvers:');
+      assert.include(dataElements[0].shadowRoot.textContent.trim(),
+          'test@example.com');
+      assert.include(dataElements[1].shadowRoot.textContent.trim(),
+          'hello@example.com');
+    });
+
+    it('hides empty Setter', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-setter');
+
+      assert.isNull(tr);
+    });
+
+    it('renders populated Setter', async () => {
+      element.setter = {displayName: 'test@example.com'};
+
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-setter');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('mr-user-link');
+
+      assert.equal(labelElement.textContent, 'Setter:');
+      assert.include(dataElement.shadowRoot.textContent.trim(),
+          'test@example.com');
+    });
+
+    it('renders cue.availability_msgs', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector(
+          'tr.cue-availability_msgs');
+      const cueElement = tr.querySelector('mr-cue');
+
+      assert.isDefined(cueElement);
+    });
+  });
+
+  describe('custom config', () => {
+    beforeEach(() => {
+      element.builtInFieldSpec = ['owner', 'fakefield'];
+    });
+
+    it('owner still renders when lowercase', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-owner');
+      const labelElement = tr.querySelector('th');
+      const dataElement = tr.querySelector('td');
+
+      assert.equal(labelElement.textContent, 'owner:');
+      assert.equal(dataElement.textContent.trim(), EMPTY_FIELD_VALUE);
+    });
+
+    it('fakefield does not render', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.row-fakefield');
+
+      assert.isNull(tr);
+    });
+
+    it('cue.availability_msgs does not render when not configured', async () => {
+      await element.updateComplete;
+
+      const tr = element.shadowRoot.querySelector('tr.cue-availability_msgs');
+
+      assert.isNull(tr);
+    });
+  });
+});
diff --git a/static_src/elements/issue-detail/mr-approval-card/mr-approval-card.js b/static_src/elements/issue-detail/mr-approval-card/mr-approval-card.js
new file mode 100644
index 0000000..2d74c10
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-approval-card/mr-approval-card.js
@@ -0,0 +1,452 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+
+import 'elements/chops/chops-dialog/chops-dialog.js';
+import 'elements/chops/chops-collapse/chops-collapse.js';
+import {store, connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as userV0 from 'reducers/userV0.js';
+import * as ui from 'reducers/ui.js';
+import {fieldTypes} from 'shared/issue-fields.js';
+import 'elements/framework/mr-comment-content/mr-description.js';
+import '../mr-comment-list/mr-comment-list.js';
+import 'elements/issue-detail/metadata/mr-edit-metadata/mr-edit-metadata.js';
+import 'elements/issue-detail/metadata/mr-metadata/mr-metadata.js';
+import {APPROVER_RESTRICTED_STATUSES, STATUS_ENUM_TO_TEXT, TEXT_TO_STATUS_ENUM,
+  STATUS_CLASS_MAP, CLASS_ICON_MAP, APPROVAL_STATUSES,
+} from 'shared/consts/approval.js';
+import {commentListToDescriptionList} from 'shared/convertersV0.js';
+import {cueNames, cueNameToSpec} from 'elements/help/mr-cue/cue-helpers.js';
+
+
+/**
+ * @type {Array<string>} The list of built in metadata fields to show on
+ *   issue approvals.
+ */
+const APPROVAL_METADATA_FIELDS = ['ApprovalStatus', 'Approvers', 'Setter',
+  cueNameToSpec(cueNames.AVAILABILITY_MSGS)];
+
+/**
+ * `<mr-approval-card>`
+ *
+ * This element shows a card for a single approval.
+ *
+ */
+export class MrApprovalCard extends connectStore(LitElement) {
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
+            rel="stylesheet">
+      <style>
+        mr-approval-card {
+          width: 100%;
+          background-color: var(--chops-white);
+          font-size: var(--chops-main-font-size);
+          border-bottom: var(--chops-normal-border);
+          box-sizing: border-box;
+          display: block;
+          border-left: 4px solid var(--approval-bg-color);
+
+          /* Default styles are for the NotSet/NeedsReview case. */
+          --approval-bg-color: var(--chops-purple-50);
+          --approval-accent-color: var(--chops-purple-700);
+        }
+        mr-approval-card.status-na {
+          --approval-bg-color: hsl(227, 20%, 92%);
+          --approval-accent-color: hsl(227, 80%, 40%);
+        }
+        mr-approval-card.status-approved {
+          --approval-bg-color: hsl(78, 55%, 90%);
+          --approval-accent-color: hsl(78, 100%, 30%);
+        }
+        mr-approval-card.status-pending {
+          --approval-bg-color: hsl(40, 75%, 90%);
+          --approval-accent-color: hsl(33, 100%, 39%);
+        }
+        mr-approval-card.status-rejected {
+          --approval-bg-color: hsl(5, 60%, 92%);
+          --approval-accent-color: hsl(357, 100%, 39%);
+        }
+        mr-approval-card chops-button.edit-survey {
+          border: var(--chops-normal-border);
+          margin: 0;
+        }
+        mr-approval-card h3 {
+          margin: 0;
+          padding: 0;
+          display: inline;
+          font-weight: inherit;
+          font-size: inherit;
+          line-height: inherit;
+        }
+        mr-approval-card mr-description {
+          display: block;
+          margin-bottom: 0.5em;
+        }
+        .approver-notice {
+          padding: 0.25em 0;
+          width: 100%;
+          display: flex;
+          flex-direction: row;
+          align-items: baseline;
+          justify-content: space-between;
+          border-bottom: 1px dotted hsl(0, 0%, 83%);
+        }
+        .card-content {
+          box-sizing: border-box;
+          padding: 0.5em 16px;
+          padding-bottom: 1em;
+        }
+        .expand-icon {
+          display: block;
+          margin-right: 8px;
+          color: hsl(0, 0%, 45%);
+        }
+        mr-approval-card .header {
+          margin: 0;
+          width: 100%;
+          border: 0;
+          font-size: var(--chops-large-font-size);
+          font-weight: normal;
+          box-sizing: border-box;
+          display: flex;
+          align-items: center;
+          flex-direction: row;
+          padding: 0.5em 8px;
+          background-color: var(--approval-bg-color);
+          cursor: pointer;
+        }
+        mr-approval-card .status {
+          font-size: var(--chops-main-font-size);
+          color: var(--approval-accent-color);
+          display: inline-flex;
+          align-items: center;
+          margin-left: 32px;
+        }
+        mr-approval-card .survey {
+          padding: 0.5em 0;
+          max-height: 500px;
+          overflow-y: auto;
+          max-width: 100%;
+          box-sizing: border-box;
+        }
+        mr-approval-card [role="heading"] {
+          display: flex;
+          flex-direction: row;
+          justify-content: space-between;
+          align-items: flex-end;
+        }
+        mr-approval-card .edit-header {
+          margin-top: 40px;
+        }
+      </style>
+      <button
+        class="header"
+        @click=${this.toggleCard}
+        aria-expanded=${(this.opened || false).toString()}
+      >
+        <i class="material-icons expand-icon">
+          ${this.opened ? 'expand_less' : 'expand_more'}
+        </i>
+        <h3>${this.fieldName}</h3>
+        <span class="status">
+          <i class="material-icons status-icon" role="presentation">
+            ${CLASS_ICON_MAP[this._statusClass]}
+          </i>
+          ${this._status}
+        </span>
+      </button>
+      <chops-collapse class="card-content" ?opened=${this.opened}>
+        <div class="approver-notice">
+          ${this._isApprover ? html`
+            You are an approver for this bit.
+          `: ''}
+          ${this.user && this.user.isSiteAdmin ? html`
+            Your site admin privileges give you full access to edit this approval.
+          `: ''}
+        </div>
+        <mr-metadata
+          aria-label="${this.fieldName} Approval Metadata"
+          .approvalStatus=${this._status}
+          .approvers=${this.approvers}
+          .setter=${this.setter}
+          .fieldDefs=${this.fieldDefs}
+          .builtInFieldSpec=${APPROVAL_METADATA_FIELDS}
+          isApproval
+        ></mr-metadata>
+        <h4
+          class="medium-heading"
+          role="heading"
+        >
+          ${this.fieldName} Survey
+          <chops-button class="edit-survey" @click=${this._openSurveyEditor}>
+            Edit responses
+          </chops-button>
+        </h4>
+        <mr-description
+          class="survey"
+          .descriptionList=${this._allSurveys}
+        ></mr-description>
+        <mr-comment-list
+          headingLevel=4
+          .comments=${this.comments}
+        ></mr-comment-list>
+        ${this.issuePermissions.includes('addissuecomment') ? html`
+          <h4 id="edit${this.fieldName}" class="medium-heading edit-header">
+            Editing approval: ${this.phaseName} &gt; ${this.fieldName}
+          </h4>
+          <mr-edit-metadata
+            .formName="${this.phaseName} > ${this.fieldName}"
+            .approvers=${this.approvers}
+            .fieldDefs=${this.fieldDefs}
+            .statuses=${this._availableStatuses}
+            .status=${this._status}
+            .error=${this.updateError && (this.updateError.description || this.updateError.message)}
+            ?saving=${this.updatingApproval}
+            ?hasApproverPrivileges=${this._hasApproverPrivileges}
+            isApproval
+            @save=${this.save}
+            @discard=${this.reset}
+          ></mr-edit-metadata>
+        ` : ''}
+      </chops-collapse>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      fieldName: {type: String},
+      approvers: {type: Array},
+      phaseName: {type: String},
+      setter: {type: Object},
+      fieldDefs: {type: Array},
+      focusId: {type: String},
+      user: {type: Object},
+      issue: {type: Object},
+      issueRef: {type: Object},
+      issuePermissions: {type: Array},
+      projectConfig: {type: Object},
+      comments: {type: String},
+      opened: {
+        type: Boolean,
+        reflect: true,
+      },
+      statusEnum: {type: String},
+      updatingApproval: {type: Boolean},
+      updateError: {type: Object},
+      _allSurveys: {type: Array},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.opened = false;
+    this.comments = [];
+    this.fieldDefs = [];
+    this.issuePermissions = [];
+    this._allSurveys = [];
+  }
+
+  /** @override */
+  createRenderRoot() {
+    return this;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    const fieldDefsByApproval = projectV0.fieldDefsByApprovalName(state);
+    if (fieldDefsByApproval && this.fieldName &&
+        fieldDefsByApproval.has(this.fieldName)) {
+      this.fieldDefs = fieldDefsByApproval.get(this.fieldName);
+    }
+    const commentsByApproval = issueV0.commentsByApprovalName(state);
+    if (commentsByApproval && this.fieldName &&
+        commentsByApproval.has(this.fieldName)) {
+      const comments = commentsByApproval.get(this.fieldName);
+      this.comments = comments.slice(1);
+      this._allSurveys = commentListToDescriptionList(comments);
+    }
+    this.focusId = ui.focusId(state);
+    this.user = userV0.currentUser(state);
+    this.issue = issueV0.viewedIssue(state);
+    this.issueRef = issueV0.viewedIssueRef(state);
+    this.issuePermissions = issueV0.permissions(state);
+    this.projectConfig = projectV0.viewedConfig(state);
+    this.updatingApproval = issueV0.requests(state).updateApproval.requesting;
+    this.updateError = issueV0.requests(state).updateApproval.error;
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if ((changedProperties.has('comments') ||
+        changedProperties.has('focusId')) && this.comments) {
+      const focused = this.comments.find(
+          (comment) => `c${comment.sequenceNum}` === this.focusId);
+      if (focused) {
+        // Make sure to open the card when a comment is focused.
+        this.opened = true;
+      }
+    }
+    if (changedProperties.has('statusEnum')) {
+      this.setAttribute('class', this._statusClass);
+    }
+    if (changedProperties.has('user') || changedProperties.has('approvers')) {
+      if (this._isApprover) {
+        // Open the card by default if the user is an approver.
+        this.opened = true;
+      }
+    }
+    super.update(changedProperties);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('issue')) {
+      this.reset();
+    }
+  }
+
+  /**
+   * Resets the approval edit form.
+   */
+  reset() {
+    const form = this.querySelector('mr-edit-metadata');
+    if (!form) return;
+    form.reset();
+  }
+
+  /**
+   * Saves the user's changes in the approval update form.
+   */
+  async save() {
+    const form = this.querySelector('mr-edit-metadata');
+    const delta = form.delta;
+
+    if (delta.status) {
+      delta.status = TEXT_TO_STATUS_ENUM[delta.status];
+    }
+
+    // TODO(ehmaldonado): Show snackbar on change, and prevent starring issues
+    // to resetting the form.
+
+    const message = {
+      issueRef: this.issueRef,
+      fieldRef: {
+        type: fieldTypes.APPROVAL_TYPE,
+        fieldName: this.fieldName,
+      },
+      approvalDelta: delta,
+      commentContent: form.getCommentContent(),
+      sendEmail: form.sendEmail,
+    };
+
+    // Add files to message.
+    const uploads = await form.getAttachments();
+
+    if (uploads && uploads.length) {
+      message.uploads = uploads;
+    }
+
+    if (message.commentContent || message.approvalDelta || message.uploads) {
+      store.dispatch(issueV0.updateApproval(message));
+    }
+  }
+
+  /**
+   * Opens and closes the approval card.
+   */
+  toggleCard() {
+    this.opened = !this.opened;
+  }
+
+  /**
+   * @return {string} The CSS class used to style the approval card,
+   *   given its status.
+   * @private
+   */
+  get _statusClass() {
+    return STATUS_CLASS_MAP[this._status];
+  }
+
+  /**
+   * @return {string} The human readable value of an approval status.
+   * @private
+   */
+  get _status() {
+    return STATUS_ENUM_TO_TEXT[this.statusEnum || ''];
+  }
+
+  /**
+   * @return {boolean} Whether the user is an approver or not.
+   * @private
+   */
+  get _isApprover() {
+    // Assumption: Since a user who is an approver should always be a project
+    // member, displayNames should be visible to them if they are an approver.
+    if (!this.approvers || !this.user || !this.user.displayName) return false;
+    const userGroups = this.user.groups || [];
+    return !!this.approvers.find((a) => {
+      return a.displayName === this.user.displayName || userGroups.find(
+          (group) => group.displayName === a.displayName,
+      );
+    });
+  }
+
+  /**
+   * @return {boolean} Whether the user can approver the approval or not.
+   *   Not the same as _isApprover because site admins can approve approvals
+   *   even if they are not approvers.
+   * @private
+   */
+  get _hasApproverPrivileges() {
+    return (this.user && this.user.isSiteAdmin) || this._isApprover;
+  }
+
+  /**
+   * @return {Array<StatusDef>}
+   * @private
+   */
+  get _availableStatuses() {
+    return APPROVAL_STATUSES.filter((s) => {
+      if (s.status === this._status) {
+        // The current status should always appear as an option.
+        return true;
+      }
+
+      if (!this._hasApproverPrivileges &&
+          APPROVER_RESTRICTED_STATUSES.has(s.status)) {
+        // If you are not an approver and and this status is restricted,
+        // you can't change to this status.
+        return false;
+      }
+
+      // No one can set statuses to NotSet, not even approvers.
+      return s.status !== 'NotSet';
+    });
+  }
+
+  /**
+   * Launches the description editing dialog for the survey.
+   * @fires CustomEvent#open-dialog
+   * @private
+   */
+  _openSurveyEditor() {
+    this.dispatchEvent(new CustomEvent('open-dialog', {
+      bubbles: true,
+      composed: true,
+      detail: {
+        dialogId: 'edit-description',
+        fieldName: this.fieldName,
+      },
+    }));
+  }
+}
+
+customElements.define('mr-approval-card', MrApprovalCard);
diff --git a/static_src/elements/issue-detail/mr-approval-card/mr-approval-card.test.js b/static_src/elements/issue-detail/mr-approval-card/mr-approval-card.test.js
new file mode 100644
index 0000000..0424c21
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-approval-card/mr-approval-card.test.js
@@ -0,0 +1,245 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrApprovalCard} from './mr-approval-card.js';
+
+let element;
+
+describe('mr-approval-card', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-approval-card');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrApprovalCard);
+  });
+
+  it('_isApprover true when user is an approver', () => {
+    // User not in approver list.
+    element.approvers = [
+      {displayName: 'tester@user.com'},
+      {displayName: 'test@notuser.com'},
+      {displayName: 'hello@world.com'},
+    ];
+    element.user = {displayName: 'test@user.com', groups: []};
+    assert.isFalse(element._isApprover);
+
+    // Use is in approver list.
+    element.approvers = [
+      {displayName: 'tester@user.com'},
+      {displayName: 'test@notuser.com'},
+      {displayName: 'hello@world.com'},
+      {displayName: 'test@user.com'},
+    ];
+    assert.isTrue(element._isApprover);
+
+    // User's group is not in the list.
+    element.approvers = [
+      {displayName: 'tester@user.com'},
+      {displayName: 'nongroup@group.com'},
+      {displayName: 'group@nongroup.com'},
+      {displayName: 'ignore@test.com'},
+    ];
+    element.user = {
+      displayName: 'test@user.com',
+      groups: [
+        {displayName: 'group@group.com'},
+        {displayName: 'test@group.com'},
+        {displayName: 'group@user.com'},
+      ],
+    };
+    assert.isFalse(element._isApprover);
+
+    // User's group is in the list.
+    element.approvers = [
+      {displayName: 'tester@user.com'},
+      {displayName: 'group@group.com'},
+      {displayName: 'test@notuser.com'},
+    ];
+    element.user = {
+      displayName: 'test@user.com',
+      groups: [
+        {displayName: 'group@group.com'},
+      ],
+    };
+    assert.isTrue(element._isApprover);
+  });
+
+  it('approvals change color based on status', async () => {
+    // Initialize dependent CSS property from a stylesheet not included in
+    // our testing environment.
+    element.style.setProperty('--chops-purple-50', '#f3e5f5');
+
+    element.statusEnum = 'NEEDS_REVIEW';
+    await element.updateComplete;
+
+    const header = element.querySelector('button.header');
+
+    // Purple. Note that Chrome uses RGB for computed styles regardless of
+    // underlying CSS.
+    assert.equal(
+      window.getComputedStyle(header).getPropertyValue('background-color'),
+      'rgb(243, 229, 245)');
+
+    element.statusEnum = 'APPROVED';
+    await element.updateComplete;
+
+    // Green.
+    assert.equal(
+      window.getComputedStyle(header).getPropertyValue('background-color'),
+      'rgb(235, 244, 215)');
+  });
+
+  it('site admins have approver privileges', async () => {
+    await element.updateComplete;
+
+    const notice = element.querySelector('.approver-notice');
+    assert.equal(notice.textContent.trim(), '');
+
+    element.user = {isSiteAdmin: true};
+    await element.updateComplete;
+
+    assert.isTrue(element._hasApproverPrivileges);
+
+    assert.equal(notice.textContent.trim(),
+        'Your site admin privileges give you full access to edit this approval.',
+    );
+  });
+
+  it('site admins see all approval statuses except NotSet', () => {
+    element.user = {isSiteAdmin: true};
+
+    assert.isFalse(element._isApprover);
+
+    element.statusEnum = 'NEEDS_REVIEW';
+
+    assert.equal(element._availableStatuses.length, 7);
+    assert.equal(element._availableStatuses[0].status, 'NeedsReview');
+    assert.equal(element._availableStatuses[1].status, 'NA');
+    assert.equal(element._availableStatuses[2].status, 'ReviewRequested');
+    assert.equal(element._availableStatuses[3].status, 'ReviewStarted');
+    assert.equal(element._availableStatuses[4].status, 'NeedInfo');
+    assert.equal(element._availableStatuses[5].status, 'Approved');
+    assert.equal(element._availableStatuses[6].status, 'NotApproved');
+  });
+
+  it('approvers see all approval statuses except NotSet', () => {
+    element.user = {isSiteAdmin: false, displayName: 'test@email.com'};
+    element.approvers = [{displayName: 'test@email.com'}];
+
+    assert.isTrue(element._isApprover);
+
+    element.statusEnum = 'NEEDS_REVIEW';
+
+    assert.equal(element._availableStatuses.length, 7);
+    assert.equal(element._availableStatuses[0].status, 'NeedsReview');
+    assert.equal(element._availableStatuses[1].status, 'NA');
+    assert.equal(element._availableStatuses[2].status, 'ReviewRequested');
+    assert.equal(element._availableStatuses[3].status, 'ReviewStarted');
+    assert.equal(element._availableStatuses[4].status, 'NeedInfo');
+    assert.equal(element._availableStatuses[5].status, 'Approved');
+    assert.equal(element._availableStatuses[6].status, 'NotApproved');
+  });
+
+  it('non-approvers see non-restricted approval statuses', () => {
+    element.user = {isSiteAdmin: false, displayName: 'test@email.com'};
+    element.approvers = [{displayName: 'test@otheremail.com'}];
+
+    assert.isFalse(element._isApprover);
+
+    element.statusEnum = 'NEEDS_REVIEW';
+
+    assert.equal(element._availableStatuses.length, 4);
+    assert.equal(element._availableStatuses[0].status, 'NeedsReview');
+    assert.equal(element._availableStatuses[1].status, 'ReviewRequested');
+    assert.equal(element._availableStatuses[2].status, 'ReviewStarted');
+    assert.equal(element._availableStatuses[3].status, 'NeedInfo');
+  });
+
+  it('non-approvers see restricted approval status when set', () => {
+    element.user = {isSiteAdmin: false, displayName: 'test@email.com'};
+    element.approvers = [{displayName: 'test@otheremail.com'}];
+
+    assert.isFalse(element._isApprover);
+
+    element.statusEnum = 'APPROVED';
+
+    assert.equal(element._availableStatuses.length, 5);
+    assert.equal(element._availableStatuses[0].status, 'NeedsReview');
+    assert.equal(element._availableStatuses[1].status, 'ReviewRequested');
+    assert.equal(element._availableStatuses[2].status, 'ReviewStarted');
+    assert.equal(element._availableStatuses[3].status, 'NeedInfo');
+    assert.equal(element._availableStatuses[4].status, 'Approved');
+  });
+
+  it('expands to show focused comment', async () => {
+    element.focusId = 'c4';
+    element.fieldName = 'field';
+    element.comments = [
+      {
+        sequenceNum: 1,
+        approvalRef: {fieldName: 'other-field'},
+      },
+      {
+        sequenceNum: 2,
+        approvalRef: {fieldName: 'field'},
+      },
+      {
+        sequenceNum: 3,
+      },
+      {
+        sequenceNum: 4,
+        approvalRef: {fieldName: 'field'},
+      },
+    ];
+
+    await element.updateComplete;
+
+    assert.isTrue(element.opened);
+  });
+
+  it('does not expand to show focused comment on other elements', async () => {
+    element.focusId = 'c3';
+    element.comments = [
+      {
+        sequenceNum: 1,
+        approvalRef: {fieldName: 'other-field'},
+      },
+      {
+        sequenceNum: 2,
+        approvalRef: {fieldName: 'field'},
+      },
+      {
+        sequenceNum: 4,
+        approvalRef: {fieldName: 'field'},
+      },
+    ];
+
+    await element.updateComplete;
+
+    assert.isFalse(element.opened);
+  });
+
+  it('mr-edit-metadata is displayed if user has addissuecomment', async () => {
+    element.issuePermissions = ['addissuecomment'];
+
+    await element.updateComplete;
+
+    assert.isNotNull(element.querySelector('mr-edit-metadata'));
+  });
+
+  it('mr-edit-metadata is hidden if user has no addissuecomment', async () => {
+    element.issuePermissions = [];
+
+    await element.updateComplete;
+
+    assert.isNull(element.querySelector('mr-edit-metadata'));
+  });
+});
diff --git a/static_src/elements/issue-detail/mr-comment-list/mr-comment-list.js b/static_src/elements/issue-detail/mr-comment-list/mr-comment-list.js
new file mode 100644
index 0000000..aad9a8a
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-comment-list/mr-comment-list.js
@@ -0,0 +1,163 @@
+// Copyright 2019 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.
+
+import {cache} from 'lit-html/directives/cache.js';
+import {LitElement, html, css} from 'lit-element';
+
+import '../../chops/chops-button/chops-button.js';
+import './mr-comment.js';
+import {connectStore} from 'reducers/base.js';
+import * as userV0 from 'reducers/userV0.js';
+import * as ui from 'reducers/ui.js';
+import {userIsMember} from 'shared/helpers.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+/**
+ * `<mr-comment-list>`
+ *
+ * Display a list of Monorail comments.
+ *
+ */
+export class MrCommentList extends connectStore(LitElement) {
+  /** @override */
+  constructor() {
+    super();
+
+    this.commentsShownCount = 2;
+    this.comments = [];
+    this.headingLevel = 4;
+
+    this.focusId = null;
+
+    this.usersProjects = new Map();
+
+    this._hideComments = true;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      commentsShownCount: {type: Number},
+      comments: {type: Array},
+      headingLevel: {type: Number},
+
+      focusId: {type: String},
+
+      usersProjects: {type: Object},
+
+      _hideComments: {type: Boolean},
+    };
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.focusId = ui.focusId(state);
+    this.usersProjects = userV0.projectsPerUser(state);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    super.updated(changedProperties);
+
+    if (!this._hideComments) return;
+
+    // If any hidden comment is focused, show all hidden comments.
+    const hiddenCount =
+      _hiddenCount(this.comments.length, this.commentsShownCount);
+    const hiddenComments = this.comments.slice(0, hiddenCount);
+    for (const comment of hiddenComments) {
+      if ('c' + comment.sequenceNum === this.focusId) {
+        this._hideComments = false;
+        break;
+      }
+    };
+  }
+
+  /** @override */
+  static get styles() {
+    return [SHARED_STYLES, css`
+      button.toggle {
+        background: none;
+        color: var(--chops-link-color);
+        border: 0;
+        border-bottom: var(--chops-normal-border);
+        border-top: var(--chops-normal-border);
+        width: 100%;
+        padding: 0.5em 8px;
+        text-align: left;
+        font-size: var(--chops-main-font-size);
+      }
+      button.toggle:hover {
+        cursor: pointer;
+        text-decoration: underline;
+      }
+      button.toggle[hidden] {
+        display: none;
+      }
+      .edit-slot {
+        margin-top: 3em;
+      }
+    `];
+  }
+
+  /** @override */
+  render() {
+    const hiddenCount =
+      _hiddenCount(this.comments.length, this.commentsShownCount);
+    return html`
+      <button @click=${this._toggleHide}
+          class="toggle"
+          ?hidden=${hiddenCount <= 0}>
+        ${this._hideComments ? 'Show' : 'Hide'}
+        ${hiddenCount}
+        older
+        ${hiddenCount == 1 ? 'comment' : 'comments'}
+      </button>
+      ${cache(this._hideComments ? '' :
+    html`${this.comments.slice(0, hiddenCount).map(
+        this.renderComment.bind(this))}`)}
+      ${this.comments.slice(hiddenCount).map(this.renderComment.bind(this))}
+    `;
+  }
+
+  /**
+   * Helper to render a single comment.
+   * @param {Comment} comment
+   * @return {TemplateResult}
+   */
+  renderComment(comment) {
+    const commenterIsMember = userIsMember(
+        comment.commenter, comment.projectName, this.usersProjects);
+    return html`
+      <mr-comment
+          .comment=${comment}
+          headingLevel=${this.headingLevel}
+          ?highlighted=${'c' + comment.sequenceNum === this.focusId}
+          ?commenterIsMember=${commenterIsMember}
+      ></mr-comment>`;
+  }
+
+  /**
+   * Hides or unhides comments that are hidden by default. For example,
+   * if an issue has 200 comments, the first 100 comments are shown initially,
+   * then the last 100 can be toggled to be shown.
+   * @private
+   */
+  _toggleHide() {
+    this._hideComments = !this._hideComments;
+  }
+}
+
+/**
+ * Computes how many comments the user is able to expand.
+ * @param {number} commentCount Total comments.
+ * @param {number} commentsShownCount The number of comments shown.
+ * @return {number} The number of hidden comments.
+ * @private
+ */
+function _hiddenCount(commentCount, commentsShownCount) {
+  return Math.max(commentCount - commentsShownCount, 0);
+}
+
+customElements.define('mr-comment-list', MrCommentList);
diff --git a/static_src/elements/issue-detail/mr-comment-list/mr-comment-list.test.js b/static_src/elements/issue-detail/mr-comment-list/mr-comment-list.test.js
new file mode 100644
index 0000000..548b7a7
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-comment-list/mr-comment-list.test.js
@@ -0,0 +1,108 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {MrCommentList} from './mr-comment-list.js';
+
+
+let element;
+
+describe('mr-comment-list', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-comment-list');
+    document.body.appendChild(element);
+    element.comments = [
+      {
+        canFlag: true,
+        localId: 898395,
+        canDelete: true,
+        projectName: 'chromium',
+        commenter: {
+          displayName: 'user@example.com',
+          userId: '12345',
+        },
+        content: 'foo',
+        sequenceNum: 1,
+        timestamp: 1549319989,
+      },
+      {
+        canFlag: true,
+        localId: 898395,
+        canDelete: true,
+        projectName: 'chromium',
+        commenter: {
+          displayName: 'user@example.com',
+          userId: '12345',
+        },
+        content: 'foo',
+        sequenceNum: 2,
+        timestamp: 1549320089,
+      },
+      {
+        canFlag: true,
+        localId: 898395,
+        canDelete: true,
+        projectName: 'chromium',
+        commenter: {
+          displayName: 'user@example.com',
+          userId: '12345',
+        },
+        content: 'foo',
+        sequenceNum: 3,
+        timestamp: 1549320189,
+      },
+    ];
+
+    // Stub RAF to execute immediately.
+    sinon.stub(window, 'requestAnimationFrame').callsFake((func) => func());
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+    window.requestAnimationFrame.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrCommentList);
+  });
+
+  it('scrolls to comment', async () => {
+    await element.updateComplete;
+
+    const commentElements = element.shadowRoot.querySelectorAll('mr-comment');
+    const commentElement = commentElements[commentElements.length - 1];
+    sinon.stub(commentElement, 'scrollIntoView');
+
+    element.focusId = 'c3';
+
+    await element.updateComplete;
+
+    assert.isTrue(element._hideComments);
+    assert.isTrue(commentElement.scrollIntoView.calledOnce);
+
+    commentElement.scrollIntoView.restore();
+  });
+
+  it('scrolls to hidden comment', async () => {
+    await element.updateComplete;
+
+    element.focusId = 'c1';
+
+    await element.updateComplete;
+
+    assert.isFalse(element._hideComments);
+    // TODO: Check that the comment has been scrolled into view.
+  });
+
+  it('doesnt scroll to unknown comment', async () => {
+    await element.updateComplete;
+
+    element.focusId = 'c100';
+
+    await element.updateComplete;
+
+    assert.isTrue(element._hideComments);
+  });
+});
diff --git a/static_src/elements/issue-detail/mr-comment-list/mr-comment.js b/static_src/elements/issue-detail/mr-comment-list/mr-comment.js
new file mode 100644
index 0000000..e56bef3
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-comment-list/mr-comment.js
@@ -0,0 +1,416 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import {store} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+
+import 'elements/chops/chops-button/chops-button.js';
+import 'elements/chops/chops-timestamp/chops-timestamp.js';
+import 'elements/framework/mr-comment-content/mr-comment-content.js';
+import 'elements/framework/mr-comment-content/mr-attachment.js';
+import 'elements/framework/mr-dropdown/mr-dropdown.js';
+import 'elements/framework/links/mr-issue-link/mr-issue-link.js';
+import 'elements/framework/links/mr-user-link/mr-user-link.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import {issueStringToRef} from 'shared/convertersV0.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import 'shared/typedef.js';
+
+const ISSUE_REF_FIELD_NAMES = [
+  'Blocking',
+  'Blockedon',
+  'Mergedinto',
+];
+
+/**
+ * `<mr-comment>`
+ *
+ * A component for an individual comment.
+ *
+ */
+export class MrComment extends LitElement {
+  /** @override */
+  constructor() {
+    super();
+
+    this._isExpandedIfDeleted = false;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      comment: {type: Object},
+      headingLevel: {type: String},
+      highlighted: {
+        type: Boolean,
+        reflect: true,
+      },
+      commenterIsMember: {type: Boolean},
+      _isExpandedIfDeleted: {type: Boolean},
+      _showOriginalContent: {type: Boolean},
+    };
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    super.updated(changedProperties);
+
+    if (changedProperties.has('highlighted') && this.highlighted) {
+      window.requestAnimationFrame(() => {
+        this.scrollIntoView();
+        // TODO(ehmaldonado): Figure out a way to get the height from the issue
+        // header, and scroll by that amount.
+        window.scrollBy(0, -150);
+      });
+    }
+  }
+
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          display: block;
+          margin: 1.5em 0 0 0;
+        }
+        :host([highlighted]) {
+          border: 1px solid var(--chops-primary-accent-color);
+          box-shadow: 0 0 4px 4px var(--chops-active-choice-bg);
+        }
+        :host([hidden]) {
+          display: none;
+        }
+        .comment-header {
+          background: var(--chops-card-heading-bg);
+          padding: 3px 1px 1px 8px;
+          width: 100%;
+          display: flex;
+          flex-direction: row;
+          justify-content: space-between;
+          align-items: center;
+          box-sizing: border-box;
+        }
+        .comment-header a {
+          display: inline-flex;
+        }
+        .role-label {
+          background-color: var(--chops-gray-600);
+          border-radius: 3px;
+          color: var(--chops-white);
+          display: inline-block;
+          padding: 2px 4px;
+          font-size: 75%;
+          font-weight: bold;
+          line-height: 14px;
+          vertical-align: text-bottom;
+          margin-left: 16px;
+        }
+        .comment-options {
+          float: right;
+          text-align: right;
+          text-decoration: none;
+        }
+        .comment-body {
+          margin: 4px;
+          box-sizing: border-box;
+        }
+        .deleted-comment-notice {
+          margin-left: 4px;
+        }
+        .issue-diff {
+          background: var(--chops-card-details-bg);
+          display: inline-block;
+          padding: 4px 8px;
+          width: 100%;
+          box-sizing: border-box;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    return html`
+      ${this._renderHeading()}
+      ${_shouldShowComment(this._isExpandedIfDeleted, this.comment) ? html`
+        ${this._renderDiff()}
+        ${this._renderBody()}
+      ` : ''}
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   */
+  _renderHeading() {
+    return html`
+      <div
+        role="heading"
+        aria-level=${this.headingLevel}
+        class="comment-header">
+        <div>
+          <a
+            href="?id=${this.comment.localId}#c${this.comment.sequenceNum}"
+            class="comment-link"
+          >Comment ${this.comment.sequenceNum}</a>
+
+          ${this._renderByline()}
+        </div>
+        ${_shouldOfferCommentOptions(this.comment) ? html`
+          <div class="comment-options">
+            <mr-dropdown
+              .items=${this._commentOptions}
+              label="Comment options"
+              icon="more_vert"
+            ></mr-dropdown>
+          </div>
+        ` : ''}
+      </div>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   */
+  _renderByline() {
+    if (_shouldShowComment(this._isExpandedIfDeleted, this.comment)) {
+      return html`
+        by
+        <mr-user-link .userRef=${this.comment.commenter}></mr-user-link>
+        on
+        <chops-timestamp
+          .timestamp=${this.comment.timestamp}
+        ></chops-timestamp>
+        ${this.commenterIsMember && !this.comment.isDeleted ? html`
+          <span class="role-label">Project Member</span>` : ''}
+      `;
+    } else {
+      return html`<span class="deleted-comment-notice">Deleted</span>`;
+    }
+  }
+
+  /**
+   * @return {TemplateResult}
+   */
+  _renderDiff() {
+    if (!(this.comment.descriptionNum || this.comment.amendments)) return '';
+
+    return html`
+      <div class="issue-diff">
+        ${(this.comment.amendments || []).map((delta) => html`
+          <strong>${delta.fieldName}:</strong>
+          ${_issuesForAmendment(delta, this.comment.projectName).map((issueForAmendment) => html`
+            <mr-issue-link
+              projectName=${this.comment.projectName}
+              .issue=${issueForAmendment.issue}
+              text=${issueForAmendment.text}
+            ></mr-issue-link>
+          `)}
+          ${!_amendmentHasIssueRefs(delta.fieldName) ? delta.newOrDeltaValue : ''}
+          ${delta.oldValue ? `(was: ${delta.oldValue})` : ''}
+          <br>
+        `)}
+        ${this.comment.descriptionNum ? 'Description was changed.' : ''}
+      </div><br>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   */
+  _renderBody() {
+    const commentContent = this._showOriginalContent ?
+      this.comment.inboundMessage :
+      this.comment.content;
+    return html`
+      <div class="comment-body">
+        <mr-comment-content
+          ?hidden=${this.comment.descriptionNum}
+          .content=${commentContent}
+          .author=${this.comment.commenter.displayName}
+          ?isDeleted=${this.comment.isDeleted}
+        ></mr-comment-content>
+        <div ?hidden=${this.comment.descriptionNum}>
+          ${(this.comment.attachments || []).map((attachment) => html`
+            <mr-attachment
+              .attachment=${attachment}
+              projectName=${this.comment.projectName}
+              localId=${this.comment.localId}
+              sequenceNum=${this.comment.sequenceNum}
+              ?canDelete=${this.comment.canDelete}
+            ></mr-attachment>
+          `)}
+        </div>
+      </div>
+    `;
+  }
+
+  /**
+   * Displays three dot menu options available to the current user for a given
+   * comment.
+   * @return {Array<MenuItem>}
+   */
+  get _commentOptions() {
+    const options = [];
+    if (_canExpandDeletedComment(this.comment)) {
+      const text =
+        (this._isExpandedIfDeleted ? 'Hide' : 'Show') + ' comment content';
+      options.push({
+        text: text,
+        handler: this._toggleHideDeletedComment.bind(this),
+      });
+      options.push({separator: true});
+    }
+    if (this.comment.canDelete) {
+      const text =
+        (this.comment.isDeleted ? 'Undelete' : 'Delete') + ' comment';
+      options.push({
+        text: text,
+        handler: _deleteComment.bind(null, this.comment),
+      });
+    }
+    if (this.comment.canFlag) {
+      const text = (this.comment.isSpam ? 'Unflag' : 'Flag') + ' comment';
+      options.push({
+        text: text,
+        handler: _flagComment.bind(null, this.comment),
+      });
+    }
+    if (this.comment.inboundMessage) {
+      const text =
+        (this._showOriginalContent ? 'Hide' : 'Show') + ' original email';
+      options.push({
+        text: text,
+        handler: this._toggleShowOriginalContent.bind(this),
+      });
+    }
+    return options;
+  }
+
+  /**
+   * Toggles whether the email of the user who deleted the comment should be
+   * shown.
+   */
+  _toggleShowOriginalContent() {
+    this._showOriginalContent = !this._showOriginalContent;
+  }
+
+  /**
+   * Change if deleted content for a comment is shown or not.
+   */
+  _toggleHideDeletedComment() {
+    this._isExpandedIfDeleted = !this._isExpandedIfDeleted;
+  }
+}
+
+/**
+ * Says whether a comment should be shown or not.
+ * @param {boolean} isExpandedIfDeleted If the user has chosen to see the
+ *   deleted comment.
+ * @param {IssueComment} comment
+ * @return {boolean} If the comment should be shown.
+ */
+function _shouldShowComment(isExpandedIfDeleted, comment) {
+  return !comment.isDeleted || isExpandedIfDeleted;
+}
+
+/**
+ * Whether the user can view additional comment options like flagging or
+ * deleting.
+ * @param {IssueComment} comment
+ * @return {boolean}
+ */
+function _shouldOfferCommentOptions(comment) {
+  return comment.canDelete || comment.canFlag;
+}
+
+/**
+ * Whether a user has permission to view a given deleted comment.
+ * @param {IssueComment} comment
+ * @return {boolean}
+ */
+function _canExpandDeletedComment(comment) {
+  return ((comment.isSpam && comment.canFlag) ||
+          (comment.isDeleted && comment.canDelete));
+}
+
+/**
+ * Deletes a given comment or undeletes it if it's already deleted.
+ * @param {IssueComment} comment The comment to delete.
+ */
+async function _deleteComment(comment) {
+  const issueRef = {
+    projectName: comment.projectName,
+    localId: comment.localId,
+  };
+  await prpcClient.call('monorail.Issues', 'DeleteIssueComment', {
+    issueRef,
+    sequenceNum: comment.sequenceNum,
+    delete: comment.isDeleted === undefined,
+  });
+  store.dispatch(issueV0.fetchComments(issueRef));
+}
+
+/**
+ * Sends a request to flag a comment as spam. Flags or unflags based on
+ * the comments existing isSpam state.
+ * @param {IssueComment} comment The comment to flag.
+ */
+async function _flagComment(comment) {
+  const issueRef = {
+    projectName: comment.projectName,
+    localId: comment.localId,
+  };
+  await prpcClient.call('monorail.Issues', 'FlagComment', {
+    issueRef,
+    sequenceNum: comment.sequenceNum,
+    flag: comment.isSpam === undefined,
+  });
+  store.dispatch(issueV0.fetchComments(issueRef));
+}
+
+/**
+ * Finds if a given change in a comment contains issues (ie: for Blocking or
+ * BlockedOn edits), then formats those issues into a list to be rendered by the
+ * frontend.
+ * @param {Amendment} delta
+ * @param {string} projectName The project name the user is currently viewing.
+ * @return {Array<{issue: Issue, text: string}>}
+ */
+function _issuesForAmendment(delta, projectName) {
+  if (!_amendmentHasIssueRefs(delta.fieldName) ||
+      !delta.newOrDeltaValue) {
+    return [];
+  }
+  // TODO(ehmaldonado): Request the issue to check for permissions and display
+  // the issue summary.
+  return delta.newOrDeltaValue.split(' ').map((deltaValue) => {
+    let refString = deltaValue;
+
+    // When an issue is removed, its ID is prepended with a minus sign.
+    if (refString.startsWith('-')) {
+      refString = refString.substr(1);
+    }
+    const issueRef = issueStringToRef(refString, projectName);
+    return {
+      issue: {
+        ...issueRef,
+      },
+      text: deltaValue,
+    };
+  });
+}
+
+/**
+ * Check if a field is one of the field types that accepts issues as input.
+ * @param {string} fieldName
+ * @return {boolean} If the field contains issues.
+ */
+function _amendmentHasIssueRefs(fieldName) {
+  return ISSUE_REF_FIELD_NAMES.includes(fieldName);
+}
+
+customElements.define('mr-comment', MrComment);
diff --git a/static_src/elements/issue-detail/mr-comment-list/mr-comment.test.js b/static_src/elements/issue-detail/mr-comment-list/mr-comment.test.js
new file mode 100644
index 0000000..6933825
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-comment-list/mr-comment.test.js
@@ -0,0 +1,257 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {MrComment} from './mr-comment.js';
+
+
+let element;
+
+/**
+ * Testing helper to find if an Array of options has an option with some
+ * text.
+ * @param {Array<MenuItem>} options Dropdown options to look through.
+ * @param {string} needle The text to search for.
+ * @return {boolean} Whether the option exists or not.
+ */
+const hasOptionWithText = (options, needle) => {
+  return options.some(({text}) => text === needle);
+};
+
+describe('mr-comment', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-comment');
+    element.comment = {
+      canFlag: true,
+      localId: 898395,
+      canDelete: true,
+      projectName: 'chromium',
+      commenter: {
+        displayName: 'user@example.com',
+        userId: '12345',
+      },
+      content: 'foo',
+      sequenceNum: 3,
+      timestamp: 1549319989,
+    };
+    document.body.appendChild(element);
+
+    // Stub RAF to execute immediately.
+    sinon.stub(window, 'requestAnimationFrame').callsFake((func) => func());
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+    window.requestAnimationFrame.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrComment);
+  });
+
+  it('scrolls to comment', async () => {
+    sinon.stub(element, 'scrollIntoView');
+
+    element.highlighted = true;
+    await element.updateComplete;
+
+    assert.isTrue(element.scrollIntoView.calledOnce);
+
+    element.scrollIntoView.restore();
+  });
+
+  it('comment header renders self link to comment', async () => {
+    element.comment = {
+      localId: 1,
+      projectName: 'test',
+      sequenceNum: 2,
+      commenter: {
+        displayName: 'user@example.com',
+        userId: '12345',
+      },
+    };
+
+    await element.updateComplete;
+
+    const link = element.shadowRoot.querySelector('.comment-link');
+
+    assert.equal(link.textContent, 'Comment 2');
+    assert.include(link.href, '?id=1#c2');
+  });
+
+  it('renders issue links for Blockedon issue amendments', async () => {
+    element.comment = {
+      projectName: 'test',
+      amendments: [
+        {
+          fieldName: 'Blockedon',
+          newOrDeltaValue: '-2 3',
+        },
+      ],
+      commenter: {
+        displayName: 'user@example.com',
+        userId: '12345',
+      },
+    };
+
+    await element.updateComplete;
+
+    const links = element.shadowRoot.querySelectorAll('mr-issue-link');
+
+    assert.equal(links.length, 2);
+
+    assert.equal(links[0].text, '-2');
+    assert.deepEqual(links[0].href, '/p/test/issues/detail?id=2');
+
+    assert.equal(links[1].text, '3');
+    assert.deepEqual(links[1].href, '/p/test/issues/detail?id=3');
+  });
+
+  it('renders issue links for Blocking issue amendments', async () => {
+    element.comment = {
+      projectName: 'test',
+      amendments: [
+        {
+          fieldName: 'Blocking',
+          newOrDeltaValue: '-2 3',
+        },
+      ],
+      commenter: {
+        displayName: 'user@example.com',
+        userId: '12345',
+      },
+    };
+
+    await element.updateComplete;
+
+    const links = element.shadowRoot.querySelectorAll('mr-issue-link');
+
+    assert.equal(links.length, 2);
+
+    assert.equal(links[0].text, '-2');
+    assert.deepEqual(links[0].href, '/p/test/issues/detail?id=2');
+
+    assert.equal(links[1].text, '3');
+    assert.deepEqual(links[1].href, '/p/test/issues/detail?id=3');
+  });
+
+  it('renders issue links for Mergedinto issue amendments', async () => {
+    element.comment = {
+      projectName: 'test',
+      amendments: [
+        {
+          fieldName: 'Mergedinto',
+          newOrDeltaValue: '-2 3',
+        },
+      ],
+      commenter: {
+        displayName: 'user@example.com',
+        userId: '12345',
+      },
+    };
+
+    await element.updateComplete;
+
+    const links = element.shadowRoot.querySelectorAll('mr-issue-link');
+
+    assert.equal(links.length, 2);
+
+    assert.equal(links[0].text, '-2');
+    assert.deepEqual(links[0].href, '/p/test/issues/detail?id=2');
+
+    assert.equal(links[1].text, '3');
+    assert.deepEqual(links[1].href, '/p/test/issues/detail?id=3');
+  });
+
+  describe('3-dot menu options', () => {
+    it('allows showing deleted comment content', () => {
+      element._isExpandedIfDeleted = false;
+
+      // The comment is deleted.
+      element.comment = {content: 'test', isDeleted: true, canDelete: true};
+      assert.isTrue(hasOptionWithText(element._commentOptions,
+          'Show comment content'));
+
+      // The comment is spam.
+      element.comment = {content: 'test', isSpam: true, canFlag: true};
+      assert.isTrue(hasOptionWithText(element._commentOptions,
+          'Show comment content'));
+    });
+
+    it('allows hiding deleted comment content', () => {
+      element._isExpandedIfDeleted = true;
+
+      // The comment is deleted.
+      element.comment = {content: 'test', isDeleted: true, canDelete: true};
+      assert.isTrue(hasOptionWithText(element._commentOptions,
+          'Hide comment content'));
+
+      // The comment is spam.
+      element.comment = {content: 'test', isSpam: true, canFlag: true};
+      assert.isTrue(hasOptionWithText(element._commentOptions,
+          'Hide comment content'));
+    });
+
+    it('disallows showing deleted comment content', () => {
+      // The comment is deleted.
+      element.comment = {content: 'test', isDeleted: true, canDelete: false};
+      assert.isFalse(hasOptionWithText(element._commentOptions,
+          'Hide comment content'));
+
+      // The comment is spam.
+      element.comment = {content: 'test', isSpam: true, canFlag: false};
+      assert.isFalse(hasOptionWithText(element._commentOptions,
+          'Hide comment content'));
+    });
+
+    it('allows deleting comment', () => {
+      element.comment = {content: 'test', isDeleted: false, canDelete: true};
+      assert.isTrue(hasOptionWithText(element._commentOptions,
+          'Delete comment'));
+    });
+
+    it('disallows deleting comment', () => {
+      element.comment = {content: 'test', isDeleted: false, canDelete: false};
+      assert.isFalse(hasOptionWithText(element._commentOptions,
+          'Delete comment'));
+    });
+
+    it('allows undeleting comment', () => {
+      element.comment = {content: 'test', isDeleted: true, canDelete: true};
+      assert.isTrue(hasOptionWithText(element._commentOptions,
+          'Undelete comment'));
+    });
+
+    it('disallows undeleting comment', () => {
+      element.comment = {content: 'test', isDeleted: true, canDelete: false};
+      assert.isFalse(hasOptionWithText(element._commentOptions,
+          'Undelete comment'));
+    });
+
+    it('allows flagging comment as spam', () => {
+      element.comment = {content: 'test', isSpam: false, canFlag: true};
+      assert.isTrue(hasOptionWithText(element._commentOptions,
+          'Flag comment'));
+    });
+
+    it('disallows flagging comment as spam', () => {
+      element.comment = {content: 'test', isSpam: false, canFlag: false};
+      assert.isFalse(hasOptionWithText(element._commentOptions,
+          'Flag comment'));
+    });
+
+    it('allows unflagging comment as spam', () => {
+      element.comment = {content: 'test', isSpam: true, canFlag: true};
+      assert.isTrue(hasOptionWithText(element._commentOptions,
+          'Unflag comment'));
+    });
+
+    it('disallows unflagging comment as spam', () => {
+      element.comment = {content: 'test', isSpam: true, canFlag: false};
+      assert.isFalse(hasOptionWithText(element._commentOptions,
+          'Unflag comment'));
+    });
+  });
+});
diff --git a/static_src/elements/issue-detail/mr-flipper/mr-flipper.js b/static_src/elements/issue-detail/mr-flipper/mr-flipper.js
new file mode 100644
index 0000000..8159e01
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-flipper/mr-flipper.js
@@ -0,0 +1,151 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import qs from 'qs';
+import {connectStore} from 'reducers/base.js';
+import * as sitewide from 'reducers/sitewide.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+/**
+ * Class for displaying a single flipper.
+ * @extends {LitElement}
+ */
+export default class MrFlipper extends connectStore(LitElement) {
+  /** @override */
+  static get properties() {
+    return {
+      currentIndex: {type: Number},
+      totalCount: {type: Number},
+      prevUrl: {type: String},
+      nextUrl: {type: String},
+      listUrl: {type: String},
+      queryParams: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.currentIndex = null;
+    this.totalCount = null;
+    this.prevUrl = null;
+    this.nextUrl = null;
+    this.listUrl = null;
+
+    this.queryParams = {};
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.queryParams = sitewide.queryParams(state);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('queryParams')) {
+      this.fetchFlipperData(qs.stringify(this.queryParams));
+    }
+  }
+
+  // Eventually this should be replaced with pRPC.
+  fetchFlipperData(query) {
+    const options = {
+      credentials: 'include',
+      method: 'GET',
+    };
+    fetch(`detail/flipper?${query}`, options).then(
+        (response) => response.text(),
+    ).then(
+        (responseBody) => {
+          let responseData;
+          try {
+          // Strip XSSI prefix from response.
+            responseData = JSON.parse(responseBody.substr(5));
+          } catch (e) {
+            console.error(`Error parsing JSON response for flipper: ${e}`);
+            return;
+          }
+          this._populateResponseData(responseData);
+        },
+    );
+  }
+
+  _populateResponseData(data) {
+    this.totalCount = data.total_count;
+    this.currentIndex = data.cur_index;
+    this.prevUrl = data.prev_url;
+    this.nextUrl = data.next_url;
+    this.listUrl = data.list_url;
+  }
+
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          display: flex;
+          justify-content: center;
+          flex-direction: column;
+        }
+        /* Use visibility instead of display:hidden for hiding in order to
+        * avoid popping when elements are made visible. */
+        .row a[hidden], .counts[hidden] {
+          visibility: hidden;
+        }
+        .counts[hidden] {
+          display: block;
+        }
+        .row a {
+          display: block;
+          padding: 0.25em 0;
+        }
+        .row a, .row div {
+          flex: 1;
+          white-space: nowrap;
+          padding: 0 2px;
+        }
+        .row .counts {
+          padding: 0 16px;
+        }
+        .row {
+          display: flex;
+          align-items: baseline;
+          text-align: center;
+          flex-direction: row;
+        }
+        @media (max-width: 960px) {
+          :host {
+            display: inline-block;
+          }
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <div class="row">
+        <a href="${this.prevUrl}" ?hidden="${!this.prevUrl}" title="Prev" class="prev-url">
+          &lsaquo; Prev
+        </a>
+        <div class="counts" ?hidden=${!this.totalCount}>
+          ${this.currentIndex + 1} of ${this.totalCount}
+        </div>
+        <a href="${this.nextUrl}" ?hidden="${!this.nextUrl}" title="Next" class="next-url">
+          Next &rsaquo;
+        </a>
+      </div>
+      <div class="row">
+        <a href="${this.listUrl}" ?hidden="${!this.listUrl}" title="Back to list" class="list-url">
+          Back to list
+        </a>
+      </div>
+    `;
+  }
+}
+
+window.customElements.define('mr-flipper', MrFlipper);
diff --git a/static_src/elements/issue-detail/mr-flipper/mr-flipper.test.js b/static_src/elements/issue-detail/mr-flipper/mr-flipper.test.js
new file mode 100644
index 0000000..183a8d5
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-flipper/mr-flipper.test.js
@@ -0,0 +1,75 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import MrFlipper from './mr-flipper.js';
+import sinon from 'sinon';
+
+const xssiPrefix = ')]}\'';
+
+let element;
+
+describe('mr-flipper', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-flipper');
+    document.body.appendChild(element);
+
+    sinon.stub(window, 'fetch');
+
+    const response = new window.Response(`${xssiPrefix}{"message": "Ok"}`, {
+      status: 201,
+      headers: {
+        'Content-type': 'application/json',
+      },
+    });
+    window.fetch.returns(Promise.resolve(response));
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+
+    window.fetch.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrFlipper);
+  });
+
+  it('renders links', async () => {
+    // Test DOM after properties are updated.
+    element._populateResponseData({
+      cur_index: 4,
+      total_count: 13,
+      prev_url: 'http://prevurl/',
+      next_url: 'http://nexturl/',
+      list_url: 'http://listurl/',
+    });
+
+    await element.updateComplete;
+
+    const prevUrlEl = element.shadowRoot.querySelector('a.prev-url');
+    const nextUrlEl = element.shadowRoot.querySelector('a.next-url');
+    const listUrlEl = element.shadowRoot.querySelector('a.list-url');
+    const countsEl = element.shadowRoot.querySelector('div.counts');
+
+    assert.equal(prevUrlEl.href, 'http://prevurl/');
+    assert.equal(nextUrlEl.href, 'http://nexturl/');
+    assert.equal(listUrlEl.href, 'http://listurl/');
+    assert.include(countsEl.innerText, '5 of 13');
+  });
+
+  it('fetches flipper data when queryParams change', async () => {
+    await element.updateComplete;
+
+    sinon.stub(element, 'fetchFlipperData');
+
+    element.queryParams = {id: 21, q: 'owner:me'};
+
+    sinon.assert.notCalled(element.fetchFlipperData);
+
+    await element.updateComplete;
+
+    sinon.assert.calledWith(element.fetchFlipperData, 'id=21&q=owner%3Ame');
+  });
+});
diff --git a/static_src/elements/issue-detail/mr-issue-details/mr-issue-details.js b/static_src/elements/issue-detail/mr-issue-details/mr-issue-details.js
new file mode 100644
index 0000000..bd88b3f
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-issue-details/mr-issue-details.js
@@ -0,0 +1,162 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+
+import {store, connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as ui from 'reducers/ui.js';
+import 'elements/framework/mr-comment-content/mr-description.js';
+import '../mr-comment-list/mr-comment-list.js';
+import '../metadata/mr-edit-metadata/mr-edit-issue.js';
+import {commentListToDescriptionList} from 'shared/convertersV0.js';
+
+/**
+ * `<mr-issue-details>`
+ *
+ * This is the main details section for a given issue.
+ *
+ */
+export class MrIssueDetails extends connectStore(LitElement) {
+  /** @override */
+  render() {
+    let comments = [];
+    let descriptions = [];
+
+    if (this.commentsByApproval && this.commentsByApproval.has('')) {
+      // Comments without an approval go into the main view.
+      const mainComments = this.commentsByApproval.get('');
+      comments = mainComments.slice(1);
+      descriptions = commentListToDescriptionList(mainComments);
+    }
+
+    return html`
+      <style>
+        mr-issue-details {
+          font-size: var(--chops-main-font-size);
+          background-color: var(--chops-white);
+          padding-bottom: 1em;
+          display: flex;
+          align-items: stretch;
+          justify-content: flex-start;
+          flex-direction: column;
+          margin: 0;
+          box-sizing: border-box;
+        }
+        h3 {
+          margin-top: 1em;
+        }
+        mr-description {
+          margin-bottom: 1em;
+        }
+        mr-edit-issue {
+          margin-top: 40px;
+        }
+      </style>
+      <mr-description .descriptionList=${descriptions}></mr-description>
+      <mr-comment-list
+        headingLevel="2"
+        .comments=${comments}
+        .commentsShownCount=${this.commentsShownCount}
+      ></mr-comment-list>
+      ${this.issuePermissions.includes('addissuecomment') ?
+        html`<mr-edit-issue></mr-edit-issue>` : ''}
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      commentsByApproval: {type: Object},
+      commentsShownCount: {type: Number},
+      issuePermissions: {type: Array},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.commentsByApproval = new Map();
+    this.issuePermissions = [];
+  }
+
+  /** @override */
+  createRenderRoot() {
+    return this;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.commentsByApproval = issueV0.commentsByApprovalName(state);
+    this.issuePermissions = issueV0.permissions(state);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    super.updated(changedProperties);
+    this._measureCommentLoadTime(changedProperties);
+  }
+
+  async _measureCommentLoadTime(changedProperties) {
+    if (!changedProperties.has('commentsByApproval')) {
+      return;
+    }
+    if (!this.commentsByApproval || this.commentsByApproval.size === 0) {
+      // For cold loads, if the GetIssue call returns before ListComments,
+      // commentsByApproval is initially set to an empty Map. Filter that out.
+      return;
+    }
+    const fullAppLoad = ui.navigationCount(store.getState()) === 1;
+    if (!(fullAppLoad || changedProperties.get('commentsByApproval'))) {
+      // For hot loads, the previous issue data is still in the Redux store, so
+      // the first update sets the comments to the previous issue's comments.
+      // We need to wait for the following update.
+      return;
+    }
+    const startMark = fullAppLoad ? undefined : 'start load issue detail page';
+    if (startMark && !performance.getEntriesByName(startMark).length) {
+      // Modifying the issue template, description, comments, or attachments
+      // triggers a comment update. We only want to include full issue loads.
+      return;
+    }
+
+    await Promise.all(_subtreeUpdateComplete(this));
+
+    const endMark = 'finish load issue detail comments';
+    performance.mark(endMark);
+
+    const measurementType = fullAppLoad ? 'from outside app' : 'within app';
+    const measurementName = `load issue detail page (${measurementType})`;
+    performance.measure(measurementName, startMark, endMark);
+
+    const measurement =
+      performance.getEntriesByName(measurementName)[0].duration;
+    window.getTSMonClient().recordIssueCommentsLoadTiming(
+        measurement, fullAppLoad);
+
+    // Be sure to clear this mark even on full page navigations.
+    performance.clearMarks('start load issue detail page');
+    performance.clearMarks(endMark);
+    performance.clearMeasures(measurementName);
+  }
+}
+
+/**
+ * Recursively traverses all shadow DOMs in an element subtree and returns an
+ * Array containing the updateComplete Promises for all lit-element nodes.
+ * @param {!LitElement} element
+ * @return {!Array<Promise<Boolean>>}
+ */
+function _subtreeUpdateComplete(element) {
+  if (!element.updateComplete) {
+    return [];
+  }
+
+  const context = element.shadowRoot ? element.shadowRoot : element;
+  const children = context.querySelectorAll('*');
+  const childPromises = Array.from(children, (e) => _subtreeUpdateComplete(e));
+  return [element.updateComplete].concat(...childPromises);
+}
+
+customElements.define('mr-issue-details', MrIssueDetails);
diff --git a/static_src/elements/issue-detail/mr-issue-details/mr-issue-details.test.js b/static_src/elements/issue-detail/mr-issue-details/mr-issue-details.test.js
new file mode 100644
index 0000000..3919e15
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-issue-details/mr-issue-details.test.js
@@ -0,0 +1,39 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrIssueDetails} from './mr-issue-details.js';
+
+let element;
+
+describe('mr-issue-details', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-issue-details');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrIssueDetails);
+  });
+
+  it('mr-edit-issue is displayed if user has addissuecomment', async () => {
+    element.issuePermissions = ['addissuecomment'];
+
+    await element.updateComplete;
+
+    assert.isNotNull(element.querySelector('mr-edit-issue'));
+  });
+
+  it('mr-edit-issue is hidden if user has no addissuecomment', async () => {
+    element.issuePermissions = [];
+
+    await element.updateComplete;
+
+    assert.isNull(element.querySelector('mr-edit-issue'));
+  });
+});
diff --git a/static_src/elements/issue-detail/mr-issue-page/mr-issue-header.js b/static_src/elements/issue-detail/mr-issue-page/mr-issue-header.js
new file mode 100644
index 0000000..0d04d32
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-issue-page/mr-issue-header.js
@@ -0,0 +1,379 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import 'elements/issue-detail/mr-flipper/mr-flipper.js';
+import 'elements/chops/chops-dialog/chops-dialog.js';
+import 'elements/chops/chops-timestamp/chops-timestamp.js';
+import {store, connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as userV0 from 'reducers/userV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import {userIsMember} from 'shared/helpers.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import 'elements/framework/links/mr-user-link/mr-user-link.js';
+import 'elements/framework/links/mr-crbug-link/mr-crbug-link.js';
+import 'elements/framework/mr-pref-toggle/mr-pref-toggle.js';
+import 'elements/framework/mr-dropdown/mr-dropdown.js';
+import {ISSUE_EDIT_PERMISSION, ISSUE_DELETE_PERMISSION,
+  ISSUE_FLAGSPAM_PERMISSION} from 'shared/consts/permissions.js';
+import {issueToIssueRef} from 'shared/convertersV0.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import {AVAILABLE_MD_PROJECTS, DEFAULT_MD_PROJECTS} from 'shared/md-helper.js';
+
+const DELETE_ISSUE_CONFIRMATION_NOTICE = `\
+Normally, you would just close issues by setting their status to a closed value.
+Are you sure you want to delete this issue?`;
+
+
+/**
+ * `<mr-issue-header>`
+ *
+ * The header for a given launch issue.
+ *
+ */
+export class MrIssueHeader extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          width: 100%;
+          margin-top: 0;
+          font-size: var(--chops-large-font-size);
+          background-color: var(--monorail-metadata-toggled-bg);
+          border-bottom: var(--chops-normal-border);
+          padding: 0.25em 8px;
+          box-sizing: border-box;
+          display: flex;
+          flex-direction: row;
+          justify-content: space-between;
+          align-items: center;
+        }
+        h1 {
+          font-size: 100%;
+          line-height: 140%;
+          font-weight: bolder;
+          padding: 0;
+          margin: 0;
+        }
+        mr-flipper {
+          border-left: var(--chops-normal-border);
+          padding-left: 8px;
+          margin-left: 4px;
+          font-size: var(--chops-main-font-size);
+        }
+        mr-pref-toggle {
+          margin-right: 2px;
+        }
+        .issue-actions {
+          min-width: fit-content;
+          display: flex;
+          flex-direction: row;
+          align-items: center;
+          font-size: var(--chops-main-font-size);
+        }
+        .issue-actions div {
+          min-width: 70px;
+          display: flex;
+          justify-content: space-between;
+        }
+        .spam-notice {
+          display: inline-flex;
+          align-items: center;
+          justify-content: center;
+          padding: 1px 6px;
+          border-radius: 3px;
+          background: #F44336;
+          color: var(--chops-white);
+          font-weight: bold;
+          font-size: var(--chops-main-font-size);
+          margin-right: 4px;
+        }
+        .byline {
+          display: block;
+          font-size: var(--chops-main-font-size);
+          width: 100%;
+          line-height: 140%;
+          color: var(--chops-primary-font-color);
+        }
+        .role-label {
+          background-color: var(--chops-gray-600);
+          border-radius: 3px;
+          color: var(--chops-white);
+          display: inline-block;
+          padding: 2px 4px;
+          font-size: 75%;
+          font-weight: bold;
+          line-height: 14px;
+          vertical-align: text-bottom;
+          margin-left: 16px;
+        }
+        .main-text-outer {
+          flex-basis: 100%;
+          display: flex;
+          justify-content: flex-start;
+          flex-direction: row;
+          align-items: center;
+        }
+        .main-text {
+          flex-basis: 100%;
+        }
+        @media (max-width: 840px) {
+          :host {
+            flex-wrap: wrap;
+            justify-content: center;
+          }
+          .main-text {
+            width: 100%;
+            margin-bottom: 0.5em;
+          }
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    const reporterIsMember = userIsMember(
+        this.issue.reporterRef, this.issue.projectName, this.usersProjects);
+    const markdownEnabled = AVAILABLE_MD_PROJECTS.has(this.projectName);
+    const markdownDefaultOn = DEFAULT_MD_PROJECTS.has(this.projectName);
+    return html`
+      <div class="main-text-outer">
+        <div class="main-text">
+          <h1>
+            ${this.issue.isSpam ? html`
+              <span class="spam-notice">Spam</span>
+            `: ''}
+            Issue ${this.issue.localId}: ${this.issue.summary}
+          </h1>
+          <small class="byline">
+            Reported by
+            <mr-user-link
+              .userRef=${this.issue.reporterRef}
+              aria-label="issue reporter"
+            ></mr-user-link>
+            on <chops-timestamp .timestamp=${this.issue.openedTimestamp}></chops-timestamp>
+            ${reporterIsMember ? html`
+              <span class="role-label">Project Member</span>` : ''}
+          </small>
+        </div>
+      </div>
+      <div class="issue-actions">
+        <div>
+          <mr-crbug-link .issue=${this.issue}></mr-crbug-link>
+          <mr-pref-toggle
+            .userDisplayName=${this.userDisplayName}
+            label="Code"
+            title="Code font"
+            prefName="code_font"
+          ></mr-pref-toggle>
+          ${markdownEnabled ? html`
+            <mr-pref-toggle
+              .userDisplayName=${this.userDisplayName}
+              initialValue=${markdownDefaultOn}
+              label="Markdown"
+              title="Render in markdown"
+              prefName="render_markdown"
+            ></mr-pref-toggle> ` : ''}
+        </div>
+        ${this._issueOptions.length ? html`
+          <mr-dropdown
+            .items=${this._issueOptions}
+            icon="more_vert"
+            label="Issue options"
+          ></mr-dropdown>
+        ` : ''}
+        <mr-flipper></mr-flipper>
+      </div>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      userDisplayName: {type: String},
+      issue: {type: Object},
+      issuePermissions: {type: Object},
+      isRestricted: {type: Boolean},
+      projectTemplates: {type: Array},
+      projectName: {type: String},
+      usersProjects: {type: Object},
+      _action: {type: String},
+      _targetProjectError: {type: String},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.issuePermissions = [];
+    this.projectTemplates = [];
+    this.projectName = '';
+    this.issue = {};
+    this.usersProjects = new Map();
+    this.isRestricted = false;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.issue = issueV0.viewedIssue(state);
+    this.issuePermissions = issueV0.permissions(state);
+    this.projectTemplates = projectV0.viewedTemplates(state);
+    this.projectName = projectV0.viewedProjectName(state);
+    this.usersProjects = userV0.projectsPerUser(state);
+
+    const restrictions = issueV0.restrictions(state);
+    this.isRestricted = restrictions && Object.keys(restrictions).length;
+  }
+
+  /**
+   * @return {Array<MenuItem>} Actions the user can take on the issue.
+   * @private
+   */
+  get _issueOptions() {
+    // We create two edit Arrays for the top and bottom half of the menu,
+    // to be separated by a separator in the UI.
+    const editOptions = [];
+    const riskyOptions = [];
+    const isSpam = this.issue.isSpam;
+    const isRestricted = this.isRestricted;
+
+    const permissions = this.issuePermissions;
+    const templates = this.projectTemplates;
+
+
+    if (permissions.includes(ISSUE_EDIT_PERMISSION)) {
+      editOptions.push({
+        text: 'Edit issue description',
+        handler: this._openEditDescription.bind(this),
+      });
+      if (templates.length) {
+        riskyOptions.push({
+          text: 'Convert issue template',
+          handler: this._openConvertIssue.bind(this),
+        });
+      }
+    }
+
+    if (permissions.includes(ISSUE_DELETE_PERMISSION)) {
+      riskyOptions.push({
+        text: 'Delete issue',
+        handler: this._deleteIssue.bind(this),
+      });
+      if (!isRestricted) {
+        editOptions.push({
+          text: 'Move issue',
+          handler: this._openMoveCopyIssue.bind(this, 'Move'),
+        });
+        editOptions.push({
+          text: 'Copy issue',
+          handler: this._openMoveCopyIssue.bind(this, 'Copy'),
+        });
+      }
+    }
+
+    if (permissions.includes(ISSUE_FLAGSPAM_PERMISSION)) {
+      const text = (isSpam ? 'Un-flag' : 'Flag') + ' issue as spam';
+      riskyOptions.push({
+        text,
+        handler: this._markIssue.bind(this),
+      });
+    }
+
+    if (editOptions.length && riskyOptions.length) {
+      editOptions.push({separator: true});
+    }
+    return editOptions.concat(riskyOptions);
+  }
+
+  /**
+   * Marks an issue as either spam or not spam based on whether the issue
+   * was spam.
+   */
+  _markIssue() {
+    prpcClient.call('monorail.Issues', 'FlagIssues', {
+      issueRefs: [{
+        projectName: this.issue.projectName,
+        localId: this.issue.localId,
+      }],
+      flag: !this.issue.isSpam,
+    }).then(() => {
+      store.dispatch(issueV0.fetch({
+        projectName: this.issue.projectName,
+        localId: this.issue.localId,
+      }));
+    });
+  }
+
+  /**
+   * Deletes an issue.
+   */
+  _deleteIssue() {
+    const ok = confirm(DELETE_ISSUE_CONFIRMATION_NOTICE);
+    if (ok) {
+      const issueRef = issueToIssueRef(this.issue);
+      // TODO(crbug.com/monorail/7374): Delete for the v0 -> v3 migration.
+      prpcClient.call('monorail.Issues', 'DeleteIssue', {
+        issueRef,
+        delete: true,
+      }).then(() => {
+        store.dispatch(issueV0.fetch(issueRef));
+      });
+    }
+  }
+
+  /**
+   * Launches the dialog to edit an issue's description.
+   * @fires CustomEvent#open-dialog
+   * @private
+   */
+  _openEditDescription() {
+    this.dispatchEvent(new CustomEvent('open-dialog', {
+      bubbles: true,
+      composed: true,
+      detail: {
+        dialogId: 'edit-description',
+        fieldName: '',
+      },
+    }));
+  }
+
+  /**
+   * Opens dialog to either move or copy an issue.
+   * @param {"move"|"copy"} action
+   * @fires CustomEvent#open-dialog
+   * @private
+   */
+  _openMoveCopyIssue(action) {
+    this.dispatchEvent(new CustomEvent('open-dialog', {
+      bubbles: true,
+      composed: true,
+      detail: {
+        dialogId: 'move-copy-issue',
+        action,
+      },
+    }));
+  }
+
+  /**
+   * Opens dialog for converting an issue.
+   * @fires CustomEvent#open-dialog
+   * @private
+   */
+  _openConvertIssue() {
+    this.dispatchEvent(new CustomEvent('open-dialog', {
+      bubbles: true,
+      composed: true,
+      detail: {
+        dialogId: 'convert-issue',
+      },
+    }));
+  }
+}
+
+customElements.define('mr-issue-header', MrIssueHeader);
diff --git a/static_src/elements/issue-detail/mr-issue-page/mr-issue-header.test.js b/static_src/elements/issue-detail/mr-issue-page/mr-issue-header.test.js
new file mode 100644
index 0000000..25ab0e7
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-issue-page/mr-issue-header.test.js
@@ -0,0 +1,167 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrIssueHeader} from './mr-issue-header.js';
+import {store, resetState} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import {ISSUE_EDIT_PERMISSION, ISSUE_DELETE_PERMISSION,
+  ISSUE_FLAGSPAM_PERMISSION} from 'shared/consts/permissions.js';
+
+let element;
+
+describe('mr-issue-header', () => {
+  beforeEach(() => {
+    store.dispatch(resetState());
+    element = document.createElement('mr-issue-header');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrIssueHeader);
+  });
+
+  it('updating issue id changes header', () => {
+    store.dispatch({type: issueV0.VIEW_ISSUE,
+      issueRef: {localId: 1, projectName: 'test'}});
+    store.dispatch({type: issueV0.FETCH_SUCCESS,
+      issue: {localId: 1, projectName: 'test', summary: 'test'}});
+
+    assert.deepEqual(element.issue, {localId: 1, projectName: 'test',
+      summary: 'test'});
+  });
+
+  it('_issueOptions toggles spam', () => {
+    element.issuePermissions = [ISSUE_FLAGSPAM_PERMISSION];
+    element.issue = {isSpam: false};
+    assert.isDefined(findOptionWithText(element._issueOptions,
+        'Flag issue as spam'));
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Un-flag issue as spam'));
+
+    element.issue = {isSpam: true};
+
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Flag issue as spam'));
+    assert.isDefined(findOptionWithText(element._issueOptions,
+        'Un-flag issue as spam'));
+
+    element.issuePermissions = [];
+
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Flag issue as spam'));
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Un-flag issue as spam'));
+
+    element.issue = {isSpam: false};
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Flag issue as spam'));
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Un-flag issue as spam'));
+  });
+
+  it('_issueOptions toggles convert issue', () => {
+    element.issuePermissions = [];
+    element.projectTemplates = [];
+
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Convert issue template'));
+
+    element.projectTemplates = [{templateName: 'test'}];
+
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Convert issue template'));
+
+    element.issuePermissions = [ISSUE_EDIT_PERMISSION];
+    element.projectTemplates = [];
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Convert issue template'));
+
+    element.projectTemplates = [{templateName: 'test'}];
+    assert.isDefined(findOptionWithText(element._issueOptions,
+        'Convert issue template'));
+  });
+
+  it('_issueOptions toggles delete', () => {
+    element.issuePermissions = [ISSUE_DELETE_PERMISSION];
+    assert.isDefined(findOptionWithText(element._issueOptions,
+        'Delete issue'));
+
+    element.issuePermissions = [];
+
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Delete issue'));
+  });
+
+  it('_issueOptions toggles move and copy', () => {
+    element.issuePermissions = [ISSUE_DELETE_PERMISSION];
+    assert.isDefined(findOptionWithText(element._issueOptions,
+        'Move issue'));
+    assert.isDefined(findOptionWithText(element._issueOptions,
+        'Copy issue'));
+
+    element.isRestricted = true;
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Move issue'));
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Copy issue'));
+
+    element.issuePermissions = [];
+
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Move issue'));
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Copy issue'));
+  });
+
+  it('_issueOptions toggles edit description', () => {
+    element.issuePermissions = [ISSUE_EDIT_PERMISSION];
+    assert.isDefined(findOptionWithText(element._issueOptions,
+        'Edit issue description'));
+
+    element.issuePermissions = [];
+
+    assert.isUndefined(findOptionWithText(element._issueOptions,
+        'Edit issue description'));
+  });
+
+  it('markdown toggle renders on enabled projects', async () => {
+    element.projectName = 'monkeyrail';
+
+    await element.updateComplete;
+
+    // This looks for how many mr-pref-toggle buttons there are,
+    // if there are two then this project also renders on markdown.
+    const chopsToggles = element.shadowRoot.querySelectorAll('mr-pref-toggle');
+    assert.equal(chopsToggles.length, 2);
+
+  });
+
+  it('markdown toggle does not render on disabled projects', async () => {
+    element.projectName = 'moneyrail';
+
+    await element.updateComplete;
+
+    const chopsToggles = element.shadowRoot.querySelectorAll('mr-pref-toggle');
+    assert.equal(chopsToggles.length, 1);
+  });
+
+  it('markdown toggle is on by default on enabled projects', async () => {
+    element.projectName = 'monkeyrail';
+
+    await element.updateComplete;
+    
+    const chopsToggles = element.shadowRoot.querySelectorAll('mr-pref-toggle');
+    const markdownButton = chopsToggles[1];
+    assert.equal("true", markdownButton.getAttribute('initialvalue'));
+  });
+});
+
+function findOptionWithText(issueOptions, text) {
+  return issueOptions.find((option) => option.text === text);
+}
diff --git a/static_src/elements/issue-detail/mr-issue-page/mr-issue-page.js b/static_src/elements/issue-detail/mr-issue-page/mr-issue-page.js
new file mode 100644
index 0000000..a93822b
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-issue-page/mr-issue-page.js
@@ -0,0 +1,393 @@
+// Copyright 2019 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.
+
+import page from 'page';
+import {LitElement, html} from 'lit-element';
+
+import 'elements/chops/chops-button/chops-button.js';
+import './mr-issue-header.js';
+import './mr-restriction-indicator';
+import '../mr-issue-details/mr-issue-details.js';
+import '../metadata/mr-metadata/mr-issue-metadata.js';
+import '../mr-launch-overview/mr-launch-overview.js';
+import {store, connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as userV0 from 'reducers/userV0.js';
+import * as sitewide from 'reducers/sitewide.js';
+
+import {ISSUE_DELETE_PERMISSION} from 'shared/consts/permissions.js';
+
+// eslint-disable-next-line max-len
+import 'elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.js';
+import '../dialogs/mr-edit-description/mr-edit-description.js';
+import '../dialogs/mr-move-copy-issue/mr-move-copy-issue.js';
+import '../dialogs/mr-convert-issue/mr-convert-issue.js';
+import '../dialogs/mr-related-issues/mr-related-issues.js';
+import '../../help/mr-click-throughs/mr-click-throughs.js';
+import {prpcClient} from 'prpc-client-instance.js';
+
+const APPROVAL_COMMENT_COUNT = 5;
+const DETAIL_COMMENT_COUNT = 100;
+
+/**
+ * `<mr-issue-page>`
+ *
+ * The main entry point for a Monorail issue detail page.
+ *
+ */
+export class MrIssuePage extends connectStore(LitElement) {
+  /** @override */
+  render() {
+    return html`
+      <style>
+        mr-issue-page {
+          --mr-issue-page-horizontal-padding: 12px;
+          --mr-toggled-font-family: inherit;
+          --monorail-metadata-toggled-bg: var(--monorail-metadata-open-bg);
+        }
+        mr-issue-page[issueClosed] {
+          --monorail-metadata-toggled-bg: var(--monorail-metadata-closed-bg);
+        }
+        mr-issue-page[codeFont] {
+          --mr-toggled-font-family: Monospace;
+        }
+        .container-issue {
+          width: 100%;
+          flex-direction: column;
+          align-items: stretch;
+          justify-content: flex-start;
+          z-index: 200;
+        }
+        .container-issue-content {
+          padding: 0;
+          flex-grow: 1;
+          display: flex;
+          align-items: stretch;
+          justify-content: space-between;
+          flex-direction: row;
+          flex-wrap: nowrap;
+          box-sizing: border-box;
+          padding-top: 0.5em;
+        }
+        .container-outside {
+          box-sizing: border-box;
+          width: 100%;
+          max-width: 100%;
+          margin: auto;
+          padding: 0;
+          display: flex;
+          align-items: stretch;
+          justify-content: space-between;
+          flex-direction: row;
+          flex-wrap: no-wrap;
+        }
+        .container-no-issue {
+          padding: 0.5em 16px;
+          font-size: var(--chops-large-font-size);
+        }
+        .metadata-container {
+          font-size: var(--chops-main-font-size);
+          background: var(--monorail-metadata-toggled-bg);
+          border-right: var(--chops-normal-border);
+          border-bottom: var(--chops-normal-border);
+          width: 24em;
+          min-width: 256px;
+          flex-grow: 0;
+          flex-shrink: 0;
+          box-sizing: border-box;
+          z-index: 100;
+        }
+        .issue-header-container {
+          z-index: 10;
+          position: sticky;
+          top: var(--monorail-header-height);
+          margin-bottom: 0.25em;
+          width: 100%;
+        }
+        mr-issue-details {
+          min-width: 50%;
+          max-width: 1000px;
+          flex-grow: 1;
+          box-sizing: border-box;
+          min-height: 100%;
+          padding-left: var(--mr-issue-page-horizontal-padding);
+          padding-right: var(--mr-issue-page-horizontal-padding);
+        }
+        mr-issue-metadata {
+          position: sticky;
+          overflow-y: auto;
+          top: var(--monorail-header-height);
+          height: calc(100vh - var(--monorail-header-height));
+        }
+        mr-launch-overview {
+          border-left: var(--chops-normal-border);
+          padding-left: var(--mr-issue-page-horizontal-padding);
+          padding-right: var(--mr-issue-page-horizontal-padding);
+          flex-grow: 0;
+          flex-shrink: 0;
+          width: 50%;
+          box-sizing: border-box;
+          min-height: 100%;
+        }
+        @media (max-width: 1126px) {
+          .container-issue-content {
+            flex-direction: column;
+            padding: 0 var(--mr-issue-page-horizontal-padding);
+          }
+          mr-issue-details, mr-launch-overview {
+            width: 100%;
+            padding: 0;
+            border: 0;
+          }
+        }
+        @media (max-width: 840px) {
+          .container-outside {
+            flex-direction: column;
+          }
+          .metadata-container {
+            width: 100%;
+            height: auto;
+            border: 0;
+            border-bottom: var(--chops-normal-border);
+          }
+          mr-issue-metadata {
+            min-width: auto;
+            max-width: auto;
+            width: 100%;
+            padding: 0;
+            min-height: 0;
+            border: 0;
+          }
+          mr-issue-metadata, .issue-header-container {
+            position: static;
+          }
+        }
+      </style>
+      <mr-click-throughs
+         .userDisplayName=${this.userDisplayName}></mr-click-throughs>
+      ${this._renderIssue()}
+    `;
+  }
+
+  /**
+   * Render the issue.
+   * @return {TemplateResult}
+   */
+  _renderIssue() {
+    const issueIsEmpty = !this.issue || !this.issue.localId;
+    const movedToRef = this.issue.movedToRef;
+    const commentShown = this.issue.approvalValues ? APPROVAL_COMMENT_COUNT :
+      DETAIL_COMMENT_COUNT;
+
+    if (this.fetchIssueError) {
+      return html`
+        <div class="container-no-issue" id="fetch-error">
+          ${this.fetchIssueError.description}
+        </div>
+      `;
+    }
+
+    if (this.fetchingIssue && issueIsEmpty) {
+      return html`
+        <div class="container-no-issue" id="loading">
+          Loading...
+        </div>
+      `;
+    }
+
+    if (this.issue.isDeleted) {
+      return html`
+        <div class="container-no-issue" id="deleted">
+          <p>Issue ${this.issueRef.localId} has been deleted.</p>
+          ${this.issuePermissions.includes(ISSUE_DELETE_PERMISSION) ? html`
+            <chops-button
+              @click=${this._undeleteIssue}
+              class="undelete emphasized"
+            >
+              Undelete Issue
+            </chops-button>
+          `: ''}
+        </div>
+      `;
+    }
+
+    if (movedToRef && movedToRef.localId) {
+      return html`
+        <div class="container-no-issue" id="moved">
+          <h2>Issue has moved.</h2>
+          <p>
+            This issue was moved to ${movedToRef.projectName}.
+            <a
+              class="new-location"
+              href="/p/${movedToRef.projectName}/issues/detail?id=${movedToRef.localId}"
+            >
+              Go to issue</a>.
+          </p>
+        </div>
+      `;
+    }
+
+    if (!issueIsEmpty) {
+      return html`
+        <div
+          class="container-outside"
+          @open-dialog=${this._openDialog}
+          id="issue"
+        >
+          <aside class="metadata-container">
+            <mr-issue-metadata></mr-issue-metadata>
+          </aside>
+          <div class="container-issue">
+            <div class="issue-header-container">
+              <mr-issue-header
+                .userDisplayName=${this.userDisplayName}
+              ></mr-issue-header>
+              <mr-restriction-indicator></mr-restriction-indicator>
+            </div>
+            <div class="container-issue-content">
+              <mr-issue-details
+                class="main-item"
+                .commentsShownCount=${commentShown}
+              ></mr-issue-details>
+              <mr-launch-overview class="main-item"></mr-launch-overview>
+            </div>
+          </div>
+        </div>
+        <mr-edit-description id="edit-description"></mr-edit-description>
+        <mr-move-copy-issue id="move-copy-issue"></mr-move-copy-issue>
+        <mr-convert-issue id="convert-issue"></mr-convert-issue>
+        <mr-related-issues id="reorder-related-issues"></mr-related-issues>
+        <mr-update-issue-hotlists-dialog
+          id="update-issue-hotlists"
+          .issueRefs=${[this.issueRef]}
+          .issueHotlists=${this.issueHotlists}
+        ></mr-update-issue-hotlists-dialog>
+      `;
+    }
+
+    return '';
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      userDisplayName: {type: String},
+      // Redux state.
+      fetchIssueError: {type: String},
+      fetchingIssue: {type: Boolean},
+      fetchingProjectConfig: {type: Boolean},
+      issue: {type: Object},
+      issueHotlists: {type: Array},
+      issueClosed: {
+        type: Boolean,
+        reflect: true,
+      },
+      codeFont: {
+        type: Boolean,
+        reflect: true,
+      },
+      issuePermissions: {type: Object},
+      issueRef: {type: Object},
+      prefs: {type: Object},
+      loginUrl: {type: String},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.issue = {};
+    this.issueRef = {};
+    this.issuePermissions = [];
+    this.prefs = {};
+    this.codeFont = false;
+  }
+
+  /** @override */
+  createRenderRoot() {
+    return this;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.projectName = projectV0.viewedProjectName(state);
+    this.issue = issueV0.viewedIssue(state);
+    this.issueHotlists = issueV0.hotlists(state);
+    this.issueRef = issueV0.viewedIssueRef(state);
+    this.fetchIssueError = issueV0.requests(state).fetch.error;
+    this.fetchingIssue = issueV0.requests(state).fetch.requesting;
+    this.fetchingProjectConfig = projectV0.fetchingConfig(state);
+    this.issueClosed = !issueV0.isOpen(state);
+    this.issuePermissions = issueV0.permissions(state);
+    this.prefs = userV0.prefs(state);
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('prefs')) {
+      this.codeFont = !!this.prefs.get('code_font');
+    }
+    if (changedProperties.has('fetchIssueError') &&
+      !this.userDisplayName && this.fetchIssueError &&
+      this.fetchIssueError.codeName === 'PERMISSION_DENIED') {
+      page(this.loginUrl);
+    }
+    super.update(changedProperties);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('issueRef') || changedProperties.has('issue')) {
+      const title = this._pageTitle(this.issueRef, this.issue);
+      store.dispatch(sitewide.setPageTitle(title));
+    }
+  }
+
+  /**
+   * Generates a title for the currently viewed page based on issue data.
+   * @param {IssueRef} issueRef
+   * @param {Issue} issue
+   * @return {string}
+   */
+  _pageTitle(issueRef, issue) {
+    const titlePieces = [];
+    if (issueRef.localId) {
+      titlePieces.push(issueRef.localId);
+    }
+    if (!issue || !issue.localId) {
+      // Issue is not loaded.
+      titlePieces.push('Loading issue...');
+    } else {
+      if (issue.isDeleted) {
+        titlePieces.push('Deleted issue');
+      } else if (issue.summary) {
+        titlePieces.push(issue.summary);
+      }
+    }
+    return titlePieces.join(' - ');
+  }
+
+  /**
+   * Opens a dialog with a specific ID based on an Event.
+   * @param {CustomEvent} e
+   */
+  _openDialog(e) {
+    this.querySelector('#' + e.detail.dialogId).open(e);
+  }
+
+  /**
+   * Undeletes the current issue.
+   */
+  _undeleteIssue() {
+    prpcClient.call('monorail.Issues', 'DeleteIssue', {
+      issueRef: this.issueRef,
+      delete: false,
+    }).then(() => {
+      store.dispatch(issueV0.fetchIssuePageData(this.issueRef));
+    });
+  }
+}
+
+customElements.define('mr-issue-page', MrIssuePage);
diff --git a/static_src/elements/issue-detail/mr-issue-page/mr-issue-page.test.js b/static_src/elements/issue-detail/mr-issue-page/mr-issue-page.test.js
new file mode 100644
index 0000000..31edd4c
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-issue-page/mr-issue-page.test.js
@@ -0,0 +1,272 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {MrIssuePage} from './mr-issue-page.js';
+import {store, resetState} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import {prpcClient} from 'prpc-client-instance.js';
+
+let element;
+let loadingElement;
+let fetchErrorElement;
+let deletedElement;
+let movedElement;
+let issueElement;
+
+function populateElementReferences() {
+  loadingElement = element.querySelector('#loading');
+  fetchErrorElement = element.querySelector('#fetch-error');
+  deletedElement = element.querySelector('#deleted');
+  movedElement = element.querySelector('#moved');
+  issueElement = element.querySelector('#issue');
+}
+
+describe('mr-issue-page', () => {
+  beforeEach(() => {
+    store.dispatch(resetState());
+    element = document.createElement('mr-issue-page');
+    document.body.appendChild(element);
+    sinon.stub(prpcClient, 'call');
+    // TODO(ehmaldonado): Remove once the old autocomplete code is deprecated.
+    window.TKR_populateAutocomplete = () => {};
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+    prpcClient.call.restore();
+    // TODO(ehmaldonado): Remove once the old autocomplete code is deprecated.
+    window.TKR_populateAutocomplete = undefined;
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrIssuePage);
+  });
+
+  describe('_pageTitle', () => {
+    it('displays loading when no issue', () => {
+      assert.equal(element._pageTitle({}, {}), 'Loading issue...');
+    });
+
+    it('display issue ID when available', () => {
+      assert.equal(element._pageTitle({projectName: 'test', localId: 1}, {}),
+          '1 - Loading issue...');
+    });
+
+    it('display deleted issues', () => {
+      assert.equal(element._pageTitle({projectName: 'test', localId: 1},
+          {projectName: 'test', localId: 1, isDeleted: true},
+      ), '1 - Deleted issue');
+    });
+
+    it('displays loaded issue', () => {
+      assert.equal(element._pageTitle({projectName: 'test', localId: 2},
+          {projectName: 'test', localId: 2, summary: 'test'}), '2 - test');
+    });
+  });
+
+  it('issue not loaded yet', async () => {
+    // Prevent unrelated Redux changes from affecting this test.
+    // TODO(zhangtiff): Find a more canonical way to test components
+    // in and out of Redux.
+    sinon.stub(store, 'dispatch');
+
+    element.fetchingIssue = true;
+
+    await element.updateComplete;
+    populateElementReferences();
+
+    assert.isNotNull(loadingElement);
+    assert.isNull(fetchErrorElement);
+    assert.isNull(deletedElement);
+    assert.isNull(issueElement);
+
+    store.dispatch.restore();
+  });
+
+  it('no loading on future issue fetches', async () => {
+    element.issue = {localId: 222};
+    element.fetchingIssue = true;
+
+    await element.updateComplete;
+    populateElementReferences();
+
+    assert.isNull(loadingElement);
+    assert.isNull(fetchErrorElement);
+    assert.isNull(deletedElement);
+    assert.isNotNull(issueElement);
+  });
+
+  it('fetch error', async () => {
+    element.fetchingIssue = false;
+    element.fetchIssueError = 'error';
+
+    await element.updateComplete;
+    populateElementReferences();
+
+    assert.isNull(loadingElement);
+    assert.isNotNull(fetchErrorElement);
+    assert.isNull(deletedElement);
+    assert.isNull(issueElement);
+  });
+
+  it('deleted issue', async () => {
+    element.fetchingIssue = false;
+    element.issue = {isDeleted: true};
+
+    await element.updateComplete;
+    populateElementReferences();
+
+    assert.isNull(loadingElement);
+    assert.isNull(fetchErrorElement);
+    assert.isNotNull(deletedElement);
+    assert.isNull(issueElement);
+  });
+
+  it('normal issue', async () => {
+    element.fetchingIssue = false;
+    element.issue = {localId: 111};
+
+    await element.updateComplete;
+    populateElementReferences();
+
+    assert.isNull(loadingElement);
+    assert.isNull(fetchErrorElement);
+    assert.isNull(deletedElement);
+    assert.isNotNull(issueElement);
+  });
+
+  it('code font pref toggles attribute', async () => {
+    await element.updateComplete;
+
+    assert.isFalse(element.hasAttribute('codeFont'));
+
+    element.prefs = new Map([['code_font', true]]);
+    await element.updateComplete;
+
+    assert.isTrue(element.hasAttribute('codeFont'));
+
+    element.prefs = new Map([['code_font', false]]);
+    await element.updateComplete;
+
+    assert.isFalse(element.hasAttribute('codeFont'));
+  });
+
+  it('undeleting issue only shown if you have permissions', async () => {
+    sinon.stub(store, 'dispatch');
+
+    element.issue = {isDeleted: true};
+
+    await element.updateComplete;
+    populateElementReferences();
+
+    assert.isNotNull(deletedElement);
+
+    let button = element.querySelector('.undelete');
+    assert.isNull(button);
+
+    element.issuePermissions = ['deleteissue'];
+    await element.updateComplete;
+
+    button = element.querySelector('.undelete');
+    assert.isNotNull(button);
+
+    store.dispatch.restore();
+  });
+
+  it('undeleting issue updates page with issue', async () => {
+    const issueRef = {localId: 111, projectName: 'test'};
+    const deletedIssuePromise = Promise.resolve({
+      issue: {isDeleted: true},
+    });
+    const issuePromise = Promise.resolve({
+      issue: {localId: 111, projectName: 'test'},
+    });
+    const deletePromise = Promise.resolve({});
+
+    sinon.spy(element, '_undeleteIssue');
+
+    prpcClient.call.withArgs('monorail.Issues', 'GetIssue', {issueRef})
+        .onFirstCall().returns(deletedIssuePromise)
+        .onSecondCall().returns(issuePromise);
+    prpcClient.call.withArgs('monorail.Issues', 'DeleteIssue',
+        {delete: false, issueRef}).returns(deletePromise);
+
+    store.dispatch(issueV0.viewIssue(issueRef));
+    store.dispatch(issueV0.fetchIssuePageData(issueRef));
+
+    await deletedIssuePromise;
+    await element.updateComplete;
+
+    populateElementReferences();
+
+    assert.deepEqual(element.issue,
+        {isDeleted: true, localId: 111, projectName: 'test'});
+    assert.isNull(issueElement);
+    assert.isNotNull(deletedElement);
+
+    // Make undelete button visible. This must be after deletedIssuePromise
+    // resolves since issuePermissions are cleared by Redux after that promise.
+    element.issuePermissions = ['deleteissue'];
+    await element.updateComplete;
+
+    const button = element.querySelector('.undelete');
+    button.click();
+
+    sinon.assert.calledWith(prpcClient.call, 'monorail.Issues', 'GetIssue',
+        {issueRef});
+    sinon.assert.calledWith(prpcClient.call, 'monorail.Issues', 'DeleteIssue',
+        {delete: false, issueRef});
+
+    await deletePromise;
+    await issuePromise;
+    await element.updateComplete;
+
+    assert.isTrue(element._undeleteIssue.calledOnce);
+
+    assert.deepEqual(element.issue, {localId: 111, projectName: 'test'});
+
+    await element.updateComplete;
+
+    populateElementReferences();
+    assert.isNotNull(issueElement);
+
+    element._undeleteIssue.restore();
+  });
+
+  it('issue has moved', async () => {
+    element.fetchingIssue = false;
+    element.issue = {movedToRef: {projectName: 'hello', localId: 10}};
+
+    await element.updateComplete;
+    populateElementReferences();
+
+    assert.isNull(issueElement);
+    assert.isNull(deletedElement);
+    assert.isNotNull(movedElement);
+
+    const link = movedElement.querySelector('.new-location');
+    assert.equal(link.getAttribute('href'), '/p/hello/issues/detail?id=10');
+  });
+
+  it('moving to a restricted issue', async () => {
+    element.fetchingIssue = false;
+    element.issue = {localId: 111};
+
+    await element.updateComplete;
+
+    element.issue = {localId: 222};
+    element.fetchIssueError = 'error';
+
+    await element.updateComplete;
+    populateElementReferences();
+
+    assert.isNull(loadingElement);
+    assert.isNotNull(fetchErrorElement);
+    assert.isNull(deletedElement);
+    assert.isNull(movedElement);
+    assert.isNull(issueElement);
+  });
+});
diff --git a/static_src/elements/issue-detail/mr-issue-page/mr-restriction-indicator.js b/static_src/elements/issue-detail/mr-issue-page/mr-restriction-indicator.js
new file mode 100644
index 0000000..af558a4
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-issue-page/mr-restriction-indicator.js
@@ -0,0 +1,178 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+import {connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as userV0 from 'reducers/userV0.js';
+import {arrayToEnglish} from 'shared/helpers.js';
+
+
+/**
+ * `<mr-restriction-indicator>`
+ *
+ * Display for showing whether an issue is restricted.
+ *
+ */
+export class MrRestrictionIndicator extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        width: 100%;
+        margin-top: 0;
+        background-color: var(--monorail-metadata-toggled-bg);
+        border-bottom: var(--chops-normal-border);
+        font-size: var(--chops-main-font-size);
+        padding: 0.25em 8px;
+        box-sizing: border-box;
+        display: flex;
+        flex-direction: row;
+        justify-content: flex-start;
+        align-items: center;
+      }
+      :host([showWarning]) {
+        background-color: var(--chops-red-700);
+        color: var(--chops-white);
+        font-weight: bold;
+      }
+      :host([showWarning]) i {
+        color: var(--chops-white);
+      }
+      :host([hidden]) {
+        display: none;
+      }
+      i.material-icons {
+        color: var(--chops-primary-icon-color);
+        font-size: var(--chops-icon-font-size);
+      }
+      .lock-icon {
+        margin-right: 4px;
+      }
+      i.warning-icon {
+        margin-right: 4px;
+      }
+      i[hidden] {
+        display: none;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
+            rel="stylesheet">
+      <i
+        class="lock-icon material-icons"
+        icon="lock"
+        ?hidden=${!this._restrictionText}
+        title=${this._restrictionText}
+      >
+        lock
+      </i>
+      <i
+        class="warning-icon material-icons"
+        icon="warning"
+        ?hidden=${!this.showWarning}
+        title=${this._warningText}
+      >
+        warning
+      </i>
+      ${this._combinedText}
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      restrictions: Object,
+      prefs: Object,
+      hidden: {
+        type: Boolean,
+        reflect: true,
+      },
+      showWarning: {
+        type: Boolean,
+        reflect: true,
+      },
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this.hidden = true;
+    this.showWarning = false;
+    this.prefs = {};
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.restrictions = issueV0.restrictions(state);
+    this.prefs = userV0.prefs(state);
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('prefs') ||
+        changedProperties.has('restrictions')) {
+      this.hidden = !this._combinedText;
+
+      this.showWarning = !!this._warningText;
+    }
+
+    super.update(changedProperties);
+  }
+
+  /**
+   * Checks if the user should see a corp mode warning about an issue being
+   * public.
+   * @return {string}
+   */
+  get _warningText() {
+    const {restrictions, prefs} = this;
+    if (!prefs) return '';
+    if (!restrictions) return '';
+    if ('view' in restrictions && restrictions['view'].length) return '';
+    if (prefs.get('public_issue_notice')) {
+      return 'Public issue: Please do not post confidential information.';
+    }
+    return '';
+  }
+
+  /**
+   * Gets either corp mode or restricted issue text depending on which
+   * is relevant to the issue.
+   * @return {string}
+   */
+  get _combinedText() {
+    if (this._warningText) return this._warningText;
+    return this._restrictionText;
+  }
+
+  /**
+   * Computes the text to show users on a restricted issue.
+   * @return {string}
+   */
+  get _restrictionText() {
+    const {restrictions} = this;
+    if (!restrictions) return;
+    if ('view' in restrictions && restrictions['view'].length) {
+      return `Only users with ${arrayToEnglish(restrictions['view'])
+      } permission or issue reporter may view.`;
+    } else if ('edit' in restrictions && restrictions['edit'].length) {
+      return `Only users with ${arrayToEnglish(restrictions['edit'])
+      } permission may edit.`;
+    } else if ('comment' in restrictions && restrictions['comment'].length) {
+      return `Only users with ${arrayToEnglish(restrictions['comment'])
+      } permission or issue reporter may comment.`;
+    }
+    return '';
+  }
+}
+
+customElements.define('mr-restriction-indicator', MrRestrictionIndicator);
diff --git a/static_src/elements/issue-detail/mr-issue-page/mr-restriction-indicator.test.js b/static_src/elements/issue-detail/mr-issue-page/mr-restriction-indicator.test.js
new file mode 100644
index 0000000..3afbbcb
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-issue-page/mr-restriction-indicator.test.js
@@ -0,0 +1,130 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrRestrictionIndicator} from './mr-restriction-indicator.js';
+
+let element;
+
+describe('mr-restriction-indicator', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-restriction-indicator');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrRestrictionIndicator);
+  });
+
+  it('shows element only when restricted or showWarning', async () => {
+    await element.updateComplete;
+
+    assert.isTrue(element.hasAttribute('hidden'));
+
+    element.restrictions = {view: ['Google']};
+    await element.updateComplete;
+
+    assert.isFalse(element.hasAttribute('hidden'));
+
+    element.restrictions = {};
+    await element.updateComplete;
+
+    assert.isTrue(element.hasAttribute('hidden'));
+
+    element.prefs = new Map([['public_issue_notice', true]]);
+    await element.updateComplete;
+
+    assert.isFalse(element.hasAttribute('hidden'));
+
+    element.prefs = new Map([['public_issue_notice', false]]);
+    await element.updateComplete;
+
+    assert.isTrue(element.hasAttribute('hidden'));
+
+    element.prefs = new Map([]);
+    await element.updateComplete;
+
+    assert.isTrue(element.hasAttribute('hidden'));
+
+    // It is possible to have an edit or comment restriction on
+    // a public issue when the user is opted in to public issue notices.
+    // In that case, the lock icon is shown, plus a warning icon and the
+    // public issue notice.
+    element.restrictions = new Map([['edit', ['Google']]]);
+    element.prefs = new Map([['public_issue_notice', true]]);
+    await element.updateComplete;
+
+    assert.isFalse(element.hasAttribute('hidden'));
+  });
+
+  it('displays view restrictions', async () => {
+    element.restrictions = {
+      view: ['Google', 'hello'],
+      edit: ['Editor', 'world'],
+      comment: ['commentor'],
+    };
+
+    await element.updateComplete;
+
+    const restrictString =
+      'Only users with Google and hello permission or issue reporter may view.';
+    assert.equal(element._restrictionText, restrictString);
+
+    assert.include(element.shadowRoot.textContent, restrictString);
+  });
+
+  it('displays edit restrictions', async () => {
+    element.restrictions = {
+      view: [],
+      edit: ['Editor', 'world'],
+      comment: ['commentor'],
+    };
+
+    await element.updateComplete;
+
+    const restrictString =
+      'Only users with Editor and world permission may edit.';
+    assert.equal(element._restrictionText, restrictString);
+
+    assert.include(element.shadowRoot.textContent, restrictString);
+  });
+
+  it('displays comment restrictions', async () => {
+    element.restrictions = {
+      view: [],
+      edit: [],
+      comment: ['commentor'],
+    };
+
+    await element.updateComplete;
+
+    const restrictString =
+      'Only users with commentor permission or issue reporter may comment.';
+    assert.equal(element._restrictionText, restrictString);
+
+    assert.include(element.shadowRoot.textContent, restrictString);
+  });
+
+  it('displays public issue notice, if the user has that pref', async () => {
+    element.restrictions = {};
+
+    element.prefs = new Map();
+    assert.equal(element._restrictionText, '');
+    assert.include(element.shadowRoot.textContent, '');
+
+    element.prefs = new Map([['public_issue_notice', true]]);
+
+    await element.updateComplete;
+
+    const noticeString =
+      'Public issue: Please do not post confidential information.';
+    assert.equal(element._warningText, noticeString);
+
+    assert.include(element.shadowRoot.textContent, noticeString);
+  });
+});
diff --git a/static_src/elements/issue-detail/mr-launch-overview/mr-launch-overview.js b/static_src/elements/issue-detail/mr-launch-overview/mr-launch-overview.js
new file mode 100644
index 0000000..741baaa
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-launch-overview/mr-launch-overview.js
@@ -0,0 +1,102 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+
+import {connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import './mr-phase.js';
+
+/**
+ * `<mr-launch-overview>`
+ *
+ * This is a shorthand view of the phases for a user to see a quick overview.
+ *
+ */
+export class MrLaunchOverview extends connectStore(LitElement) {
+  /** @override */
+  render() {
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons"
+            rel="stylesheet">
+      <style>
+        mr-launch-overview {
+          max-width: 100%;
+          display: flex;
+          flex-flow: column;
+          justify-content: flex-start;
+          align-items: stretch;
+        }
+        mr-launch-overview[hidden] {
+          display: none;
+        }
+        mr-phase {
+          margin-bottom: 0.75em;
+        }
+      </style>
+      ${this.phases.map((phase) => html`
+        <mr-phase
+          .phaseName=${phase.phaseRef.phaseName}
+          .approvals=${this._approvalsForPhase(this.approvals, phase.phaseRef.phaseName)}
+        ></mr-phase>
+      `)}
+      ${this._phaselessApprovals.length ? html`
+        <mr-phase .approvals=${this._phaselessApprovals}></mr-phase>
+      `: ''}
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      approvals: {type: Array},
+      phases: {type: Array},
+      hidden: {
+        type: Boolean,
+        reflect: true,
+      },
+    };
+  }
+
+  /** @override */
+  createRenderRoot() {
+    return this;
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.approvals = [];
+    this.phases = [];
+    this.hidden = true;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    if (!issueV0.viewedIssue(state)) return;
+
+    this.approvals = issueV0.viewedIssue(state).approvalValues || [];
+    this.phases = issueV0.viewedIssue(state).phases || [];
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('phases') || changedProperties.has('approvals')) {
+      this.hidden = !this.phases.length && !this.approvals.length;
+    }
+    super.update(changedProperties);
+  }
+
+  get _phaselessApprovals() {
+    return this._approvalsForPhase(this.approvals);
+  }
+
+  _approvalsForPhase(approvals, phaseName) {
+    return (approvals || []).filter((a) => {
+      // We can assume phase names will be unique.
+      return a.phaseRef.phaseName == phaseName;
+    });
+  }
+}
+customElements.define('mr-launch-overview', MrLaunchOverview);
diff --git a/static_src/elements/issue-detail/mr-launch-overview/mr-launch-overview.test.js b/static_src/elements/issue-detail/mr-launch-overview/mr-launch-overview.test.js
new file mode 100644
index 0000000..3e2ff46
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-launch-overview/mr-launch-overview.test.js
@@ -0,0 +1,24 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {MrLaunchOverview} from './mr-launch-overview.js';
+
+
+let element;
+
+describe('mr-launch-overview', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-launch-overview');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrLaunchOverview);
+  });
+});
diff --git a/static_src/elements/issue-detail/mr-launch-overview/mr-phase.js b/static_src/elements/issue-detail/mr-launch-overview/mr-phase.js
new file mode 100644
index 0000000..a81be65
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-launch-overview/mr-phase.js
@@ -0,0 +1,460 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+
+import 'elements/chops/chops-dialog/chops-dialog.js';
+import {store, connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import '../mr-approval-card/mr-approval-card.js';
+import {valueForField, valuesForField} from 'shared/metadata-helpers.js';
+import 'elements/issue-detail/metadata/mr-edit-metadata/mr-edit-metadata.js';
+import 'elements/issue-detail/metadata/mr-metadata/mr-field-values.js';
+
+const TARGET_PHASE_MILESTONE_MAP = {
+  'Beta': 'feature_freeze',
+  'Stable-Exp': 'final_beta_cut',
+  'Stable': 'stable_cut',
+  'Stable-Full': 'stable_cut',
+};
+
+const APPROVED_PHASE_MILESTONE_MAP = {
+  'Beta': 'earliest_beta',
+  'Stable-Exp': 'final_beta',
+  'Stable': 'stable_date',
+  'Stable-Full': 'stable_date',
+};
+
+// The following milestones are unique to ios.
+const IOS_APPROVED_PHASE_MILESTONE_MAP = {
+  'Beta': 'earliest_beta_ios',
+};
+
+// See monorail:4692 and the use of PHASES_WITH_MILESTONES
+// in tracker/issueentry.py
+const PHASES_WITH_MILESTONES = ['Beta', 'Stable', 'Stable-Exp', 'Stable-Full'];
+
+/**
+ * `<mr-phase>`
+ *
+ * This is the component for a single phase.
+ *
+ */
+export class MrPhase extends connectStore(LitElement) {
+  /** @override */
+  render() {
+    const isPhaseWithMilestone = PHASES_WITH_MILESTONES.includes(
+        this.phaseName);
+    const noApprovals = !this.approvals || !this.approvals.length;
+    return html`
+      <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
+      <style>
+        mr-phase {
+          display: block;
+        }
+        mr-phase chops-dialog {
+          --chops-dialog-theme: {
+            width: 500px;
+            max-width: 100%;
+          };
+        }
+        mr-phase h2 {
+          margin: 0;
+          font-size: var(--chops-large-font-size);
+          font-weight: normal;
+          padding: 0.5em 8px;
+          box-sizing: border-box;
+          display: flex;
+          align-items: center;
+          flex-direction: row;
+          justify-content: space-between;
+        }
+        mr-phase h2 em {
+          margin-left: 16px;
+          font-size: var(--chops-main-font-size);
+        }
+        mr-phase .chip {
+          display: inline-block;
+          font-size: var(--chops-main-font-size);
+          padding: 0.25em 8px;
+          margin: 0 2px;
+          border-radius: 16px;
+          background: var(--chops-blue-gray-50);
+        }
+        .phase-edit {
+          padding: 0.1em 8px;
+        }
+      </style>
+      <h2>
+        <div>
+          Approvals<span ?hidden=${!this.phaseName || !this.phaseName.length}>:
+            ${this.phaseName}
+          </span>
+          ${isPhaseWithMilestone ? html`${this.fieldDefs &&
+              this.fieldDefs.map((field) => this._renderPhaseField(field))}
+            <em ?hidden=${!this._nextDate}>
+              ${this._dateDescriptor}
+              <chops-timestamp .timestamp=${this._nextDate}></chops-timestamp>
+            </em>
+            <em ?hidden=${!this._nextUniqueiOSDate}>
+              <b>iOS</b> ${this._dateDescriptor}
+              <chops-timestamp .timestamp=${this._nextUniqueiOSDate}
+              ></chops-timestamp>
+            </em>
+          `: ''}
+        </div>
+        ${isPhaseWithMilestone ? html`
+          <chops-button @click=${this.edit} class="de-emphasized phase-edit">
+            <i class="material-icons" role="presentation">create</i>
+            Edit
+          </chops-button>
+        `: ''}
+      </h2>
+      ${this.approvals && this.approvals.map((approval) => html`
+        <mr-approval-card
+          .approvers=${approval.approverRefs}
+          .setter=${approval.setterRef}
+          .fieldName=${approval.fieldRef.fieldName}
+          .phaseName=${this.phaseName}
+          .statusEnum=${approval.status}
+          .survey=${approval.survey}
+          .surveyTemplate=${approval.surveyTemplate}
+          .urls=${approval.urls}
+          .labels=${approval.labels}
+          .users=${approval.users}
+        ></mr-approval-card>
+      `)}
+      ${noApprovals ? html`No tasks for this phase.` : ''}
+      <!-- TODO(ehmaldonado): Move to /issue-detail/dialogs -->
+      <chops-dialog id="editPhase" aria-labelledby="phaseDialogTitle">
+        <h3 id="phaseDialogTitle" class="medium-heading">
+          Editing phase: ${this.phaseName}
+        </h3>
+        <mr-edit-metadata
+          id="metadataForm"
+          class="edit-actions-right"
+          .formName=${this.phaseName}
+          .fieldDefs=${this.fieldDefs}
+          .phaseName=${this.phaseName}
+          ?disabled=${this._updatingIssue}
+          .error=${this._updateIssueError && this._updateIssueError.description}
+          @save=${this.save}
+          @discard=${this.cancel}
+          isApproval
+          disableAttachments
+        ></mr-edit-metadata>
+      </chops-dialog>
+    `;
+  }
+
+  /**
+   *
+   * @param {FieldDef} field The field to be rendered.
+   * @return {TemplateResult}
+   * @private
+   */
+  _renderPhaseField(field) {
+    const values = valuesForField(this._fieldValueMap, field.fieldRef.fieldName,
+        this.phaseName);
+    return html`
+      <div class="chip">
+        ${field.fieldRef.fieldName}:
+        <mr-field-values
+          .name=${field.fieldRef.fieldName}
+          .type=${field.fieldRef.type}
+          .values=${values}
+          .projectName=${this.issueRef.projectName}
+        ></mr-field-values>
+      </div>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      issue: {type: Object},
+      issueRef: {type: Object},
+      phaseName: {type: String},
+      approvals: {type: Array},
+      fieldDefs: {type: Array},
+
+      _updatingIssue: {type: Boolean},
+      _updateIssueError: {type: Object},
+      _fieldValueMap: {type: Object},
+      _milestoneData: {type: Object},
+      _isFetchingMilestone: {type: Boolean},
+      _fetchedMilestone: {type: String},
+    };
+  }
+
+  /** @override */
+  createRenderRoot() {
+    return this;
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this.issue = {};
+    this.issueRef = {};
+    this.phaseName = '';
+    this.approvals = [];
+    this.fieldDefs = [];
+
+    this._updatingIssue = false;
+    this._updateIssueError = undefined;
+
+    // A response Object from
+    // https://chromiumdash.appspot.com/fetch_milestone_schedule?mstone=xx
+    this._milestoneData = {};
+    this._isFetchingMilestone = false;
+    this._fetchedMilestone = undefined;
+    /**
+     * @type {Promise} Used for testing to allow waiting for milestone
+     *   fetch operations to finish.
+     */
+    this._fetchMilestoneComplete = undefined;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.issue = issueV0.viewedIssue(state);
+    this.issueRef = issueV0.viewedIssueRef(state);
+    this.fieldDefs = projectV0.fieldDefsForPhases(state);
+    this._updatingIssue = issueV0.requests(state).update.requesting;
+    this._updateIssueError = issueV0.requests(state).update.error;
+    this._fieldValueMap = issueV0.fieldValueMap(state);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('issue')) {
+      this.reset();
+    }
+    if (changedProperties.has('_updatingIssue')) {
+      if (!this._updatingIssue && !this._updateIssueError) {
+        // Close phase edit modal only after a request finishes without errors.
+        this.cancel();
+      }
+    }
+
+    if (!this._isFetchingMilestone) {
+      const milestoneToFetch = this._milestoneToFetch;
+      if (milestoneToFetch && this._fetchedMilestone !== milestoneToFetch) {
+        this._fetchMilestoneComplete = this.fetchMilestoneData(
+            milestoneToFetch);
+      }
+    }
+  }
+
+  /**
+   * Makes an XHR request to Chromium Dash to find Chrome-specific launch data.
+   * eg. when certain Chrome milestones are planned for release.
+   * @param {string} milestone A string containing a Chrome milestone number.
+   * @return {Promise<void>}
+   */
+  async fetchMilestoneData(milestone) {
+    this._isFetchingMilestone = true;
+
+    try {
+      const resp = await window.fetch(
+          `https://chromiumdash.appspot.com/fetch_milestone_schedule?mstone=${
+            milestone}`);
+      this._milestoneData = await resp.json();
+    } catch (error) {
+      console.error(`Error when fetching milestone data: ${error}`);
+    }
+    this._fetchedMilestone = milestone;
+    this._isFetchingMilestone = false;
+  }
+
+  /**
+   * Opens the phase editing dialog when the user clicks the edit button.
+   */
+  edit() {
+    this.reset();
+    this.querySelector('#editPhase').open();
+  }
+
+  /**
+   * Stops editing the phase.
+   */
+  cancel() {
+    this.querySelector('#editPhase').close();
+    this.reset();
+  }
+
+  /**
+   * Resets the edit form to its default values.
+   */
+  reset() {
+    const form = this.querySelector('#metadataForm');
+    form.reset();
+  }
+
+  /**
+   * Saves the changes the user has made.
+   */
+  save() {
+    const form = this.querySelector('#metadataForm');
+    const delta = form.delta;
+
+    if (delta.fieldValsAdd) {
+      delta.fieldValsAdd = delta.fieldValsAdd.map(
+          (fv) => Object.assign({phaseRef: {phaseName: this.phaseName}}, fv));
+    }
+    if (delta.fieldValsRemove) {
+      delta.fieldValsRemove = delta.fieldValsRemove.map(
+          (fv) => Object.assign({phaseRef: {phaseName: this.phaseName}}, fv));
+    }
+
+    const message = {
+      issueRef: this.issueRef,
+      delta: delta,
+      sendEmail: form.sendEmail,
+      commentContent: form.getCommentContent(),
+    };
+
+    if (message.commentContent || message.delta) {
+      store.dispatch(issueV0.update(message));
+    }
+  }
+
+  /**
+   * Shows the next relevant Chrome Milestone date for this phase. Depending
+   * on the M-Target, M-Approved, or M-Launched values, this date means
+   * different things.
+   * @return {number} Unix timestamp in seconds.
+   * @private
+   */
+  get _nextDate() {
+    const phaseName = this.phaseName;
+    const status = this._status;
+    let data = this._milestoneData && this._milestoneData.mstones;
+    // Data pulled from https://chromiumdash.appspot.com/fetch_milestone_schedule?mstone=xx
+    if (!phaseName || !status || !data || !data.length) return 0;
+    data = data[0];
+
+    let key = TARGET_PHASE_MILESTONE_MAP[phaseName];
+    if (['Approved', 'Launched'].includes(status)) {
+      const osValues = this._fieldValueMap.get('OS');
+      // If iOS is the only OS and the phase is one where iOS has unique
+      // milestones, the only date we show should be this._nextUniqueiOSDate.
+      if (osValues && osValues.every((os) => {
+        return os === 'iOS';
+      }) && phaseName in IOS_APPROVED_PHASE_MILESTONE_MAP) {
+        return 0;
+      }
+      key = APPROVED_PHASE_MILESTONE_MAP[phaseName];
+    }
+    if (!key || !(key in data)) return 0;
+    return Math.floor((new Date(data[key])).getTime() / 1000);
+  }
+
+  /**
+   * For issues where iOS is the OS, this function finds the relevant iOS
+   * launch date.
+   * @return {number} Unix timestamp in seconds.
+   * @private
+   */
+  get _nextUniqueiOSDate() {
+    const phaseName = this.phaseName;
+    const status = this._status;
+    let data = this._milestoneData && this._milestoneData.mstones;
+    // Data pull from https://chromiumdash.appspot.com/fetch_milestone_schedule?mstone=xx
+    if (!phaseName || !status || !data || !data.length) return 0;
+    data = data[0];
+
+    const osValues = this._fieldValueMap.get('OS');
+    if (['Approved', 'Launched'].includes(status) &&
+        osValues && osValues.includes('iOS')) {
+      const key = IOS_APPROVED_PHASE_MILESTONE_MAP[phaseName];
+      if (key) {
+        return Math.floor((new Date(data[key])).getTime() / 1000);
+      }
+    }
+    return 0;
+  }
+
+  /**
+   * Depending on what kind of date we're showing, we want to include
+   * different text to describe the date.
+   * @return {string}
+   * @private
+   */
+  get _dateDescriptor() {
+    const status = this._status;
+    if (status === 'Approved') {
+      return 'Launching on ';
+    } else if (status === 'Launched') {
+      return 'Launched on ';
+    }
+    return 'Due by ';
+  }
+
+  /**
+   * The Chrome-specific status of a gate, computed from M-Approved,
+   * M-Launched, and M-Target fields.
+   * @return {string}
+   * @private
+   */
+  get _status() {
+    const target = this._targetMilestone;
+    const approved = this._approvedMilestone;
+    const launched = this._launchedMilestone;
+    if (approved >= target) {
+      if (launched >= approved) {
+        return 'Launched';
+      }
+      return 'Approved';
+    }
+    return 'Target';
+  }
+
+  /**
+   * The Chrome Milestone that this phase was approved for.
+   * @return {string}
+   * @private
+   */
+  get _approvedMilestone() {
+    return valueForField(this._fieldValueMap, 'M-Approved', this.phaseName);
+  }
+
+  /**
+   * The Chrome Milestone that this phase was launched on.
+   * @return {string}
+   * @private
+   */
+  get _launchedMilestone() {
+    return valueForField(this._fieldValueMap, 'M-Launched', this.phaseName);
+  }
+
+  /**
+   * The Chrome Milestone that this phase is targeting.
+   * @return {string}
+   * @private
+   */
+  get _targetMilestone() {
+    return valueForField(this._fieldValueMap, 'M-Target', this.phaseName);
+  }
+
+  /**
+   * The Chrome Milestone that's used to decide what date to show the user.
+   * @return {string}
+   * @private
+   */
+  get _milestoneToFetch() {
+    const target = Number.parseInt(this._targetMilestone) || 0;
+    const approved = Number.parseInt(this._approvedMilestone) || 0;
+    const launched = Number.parseInt(this._launchedMilestone) || 0;
+
+    const latestMilestone = Math.max(target, approved, launched);
+    return latestMilestone > 0 ? `${latestMilestone}` : '';
+  }
+}
+
+
+customElements.define('mr-phase', MrPhase);
diff --git a/static_src/elements/issue-detail/mr-launch-overview/mr-phase.test.js b/static_src/elements/issue-detail/mr-launch-overview/mr-phase.test.js
new file mode 100644
index 0000000..d55897e
--- /dev/null
+++ b/static_src/elements/issue-detail/mr-launch-overview/mr-phase.test.js
@@ -0,0 +1,209 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import {MrPhase} from './mr-phase.js';
+
+
+let element;
+
+describe('mr-phase', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-phase');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrPhase);
+  });
+
+  it('clicking edit button opens edit dialog', async () => {
+    element.phaseName = 'Beta';
+
+    await element.updateComplete;
+
+    const editDialog = element.querySelector('#editPhase');
+    assert.isFalse(editDialog.opened);
+
+    element.querySelector('.phase-edit').click();
+
+    await element.updateComplete;
+
+    assert.isTrue(editDialog.opened);
+  });
+
+  it('discarding form changes closes dialog', async () => {
+    await element.updateComplete;
+
+    // Open the edit dialog.
+    element.edit();
+    const editDialog = element.querySelector('#editPhase');
+    const editForm = element.querySelector('#metadataForm');
+
+    await element.updateComplete;
+
+    assert.isTrue(editDialog.opened);
+    editForm.discard();
+
+    await element.updateComplete;
+
+    assert.isFalse(editDialog.opened);
+  });
+
+  describe('milestone fetching', () => {
+    beforeEach(() => {
+      sinon.stub(element, 'fetchMilestoneData');
+    });
+
+    it('_launchedMilestone extracts M-Launched for phase', () => {
+      element._fieldValueMap = new Map([['m-launched beta', ['87']]]);
+      element.phaseName = 'Beta';
+
+      assert.equal(element._launchedMilestone, '87');
+      assert.equal(element._approvedMilestone, undefined);
+      assert.equal(element._targetMilestone, undefined);
+    });
+
+    it('_approvedMilestone extracts M-Approved for phase', () => {
+      element._fieldValueMap = new Map([['m-approved beta', ['86']]]);
+      element.phaseName = 'Beta';
+
+      assert.equal(element._launchedMilestone, undefined);
+      assert.equal(element._approvedMilestone, '86');
+      assert.equal(element._targetMilestone, undefined);
+    });
+
+    it('_targetMilestone extracts M-Target for phase', () => {
+      element._fieldValueMap = new Map([['m-target beta', ['85']]]);
+      element.phaseName = 'Beta';
+
+      assert.equal(element._launchedMilestone, undefined);
+      assert.equal(element._approvedMilestone, undefined);
+      assert.equal(element._targetMilestone, '85');
+    });
+
+    it('_milestoneToFetch returns empty when no relevant milestone', () => {
+      element._fieldValueMap = new Map([['m-target beta', ['85']]]);
+      element.phaseName = 'Stable';
+
+      assert.equal(element._milestoneToFetch, '');
+    });
+
+    it('_milestoneToFetch selects highest milestone', () => {
+      element._fieldValueMap = new Map([
+        ['m-target beta', ['84']],
+        ['m-approved beta', ['85']],
+        ['m-launched beta', ['86']]]);
+      element.phaseName = 'Beta';
+
+      assert.equal(element._milestoneToFetch, '86');
+    });
+
+    it('does not fetch when no milestones specified', async () => {
+      element.issue = {projectName: 'chromium', localId: 12};
+
+      await element.updateComplete;
+
+      sinon.assert.notCalled(element.fetchMilestoneData);
+    });
+
+    it('does not fetch when milestone to fetch is unchanged', async () => {
+      element._fetchedMilestone = '86';
+      element._fieldValueMap = new Map([['m-target beta', ['86']]]);
+      element.phaseName = 'Beta';
+
+      await element.updateComplete;
+
+      sinon.assert.notCalled(element.fetchMilestoneData);
+    });
+
+    it('fetches when milestone found', async () => {
+      element._fetchedMilestone = undefined;
+      element._fieldValueMap = new Map([['m-target beta', ['86']]]);
+      element.phaseName = 'Beta';
+
+      await element.updateComplete;
+
+      sinon.assert.calledWith(element.fetchMilestoneData, '86');
+    });
+
+    it('re-fetches when new milestone found', async () => {
+      element._fetchedMilestone = '86';
+      element._fieldValueMap = new Map([
+        ['m-target beta', ['86']],
+        ['m-launched beta', ['87']]]);
+      element.phaseName = 'Beta';
+
+      await element.updateComplete;
+
+      sinon.assert.calledWith(element.fetchMilestoneData, '87');
+    });
+
+    it('re-fetches only after last stale fetch finishes', async () => {
+      element._fetchedMilestone = '84';
+      element._fieldValueMap = new Map([['m-target beta', ['86']]]);
+      element.phaseName = 'Beta';
+      element._isFetchingMilestone = true;
+
+      await element.updateComplete;
+
+      sinon.assert.notCalled(element.fetchMilestoneData);
+
+      // Previous in flight fetch finishes.
+      element._fetchedMilestone = '85';
+      element._isFetchingMilestone = false;
+
+      await element.updateComplete;
+
+      sinon.assert.calledWith(element.fetchMilestoneData, '86');
+    });
+  });
+
+  describe('milestone fetching with fake server responses', () => {
+    beforeEach(() => {
+      sinon.stub(window, 'fetch');
+      sinon.spy(element, 'fetchMilestoneData');
+    });
+
+    afterEach(() => {
+      window.fetch.restore();
+    });
+
+    it('does not refetch when server response finishes', async () => {
+      const response = new window.Response('{"mstones": [{"mstone": 86}]}', {
+        status: 200,
+        headers: {
+          'Content-type': 'application/json',
+        },
+      });
+
+      window.fetch.returns(Promise.resolve(response));
+
+      element._fieldValueMap = new Map([['m-target beta', ['86']]]);
+      element.phaseName = 'Beta';
+
+      await element.updateComplete;
+
+      sinon.assert.calledWith(element.fetchMilestoneData, '86');
+
+      assert.isTrue(element._isFetchingMilestone);
+
+      await element._fetchMilestoneComplete;
+
+      assert.deepEqual(element._milestoneData, {'mstones': [{'mstone': 86}]});
+      assert.equal(element._fetchedMilestone, '86');
+      assert.isFalse(element._isFetchingMilestone);
+
+      await element.updateComplete;
+
+      sinon.assert.calledOnce(element.fetchMilestoneData);
+    });
+  });
+});
diff --git a/static_src/elements/issue-entry/mr-issue-entry-page.js b/static_src/elements/issue-entry/mr-issue-entry-page.js
new file mode 100644
index 0000000..b1cc2ef
--- /dev/null
+++ b/static_src/elements/issue-entry/mr-issue-entry-page.js
@@ -0,0 +1,56 @@
+// Copyright 2020 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.
+
+import page from 'page';
+import {LitElement, html, css} from 'lit-element';
+
+/**
+ * `<mr-issue-entry-page>`
+ *
+ * This is the main details section for a given issue.
+ *
+ */
+export class MrIssueEntryPage extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        margin: 0;
+      }
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      userDisplayName: {type: String},
+      loginUrl: {type: String},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    /* dependency injection for testing purpose */
+    this._page = page;
+  }
+
+  /** @override */
+  connectedCallback() {
+    super.connectedCallback();
+    if (!this.userDisplayName) {
+      this._page(this.loginUrl);
+    }
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <div>SPA issue entry page place holder</div>
+    `;
+  }
+}
+
+customElements.define('mr-issue-entry-page', MrIssueEntryPage);
diff --git a/static_src/elements/issue-entry/mr-issue-entry-page.test.js b/static_src/elements/issue-entry/mr-issue-entry-page.test.js
new file mode 100644
index 0000000..013a3a4
--- /dev/null
+++ b/static_src/elements/issue-entry/mr-issue-entry-page.test.js
@@ -0,0 +1,58 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {MrIssueEntryPage} from './mr-issue-entry-page.js';
+
+let element;
+
+describe('mr-issue-entry-page', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-issue-entry-page');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrIssueEntryPage);
+  });
+
+  describe('requires user to be logged in', () => {
+    it('redirects to loginUrl if not logged in', async () => {
+      document.body.removeChild(element);
+      element = document.createElement('mr-issue-entry-page');
+      assert.isUndefined(element.userDisplayName);
+
+      const EXPECTED = 'abc';
+      element.loginUrl = EXPECTED;
+
+      const pageStub = sinon.stub(element, '_page');
+      document.body.appendChild(element);
+      await element.updateComplete;
+
+      sinon.assert.calledOnce(pageStub);
+      sinon.assert.calledWith(pageStub, EXPECTED);
+    });
+
+    it('renders when user is logged in', async () => {
+      document.body.removeChild(element);
+      element = document.createElement('mr-issue-entry-page');
+
+      element.loginUrl = 'abc';
+      element.userDisplayName = 'not_undefined';
+
+      const pageStub = sinon.stub(element, '_page');
+      const renderSpy = sinon.spy(element, 'render');
+      document.body.appendChild(element);
+      await element.updateComplete;
+
+      sinon.assert.notCalled(pageStub);
+      sinon.assert.calledOnce(renderSpy);
+    });
+  });
+});
diff --git a/static_src/elements/issue-list/mr-chart-page/mr-chart-page.js b/static_src/elements/issue-list/mr-chart-page/mr-chart-page.js
new file mode 100644
index 0000000..06ff7a4
--- /dev/null
+++ b/static_src/elements/issue-list/mr-chart-page/mr-chart-page.js
@@ -0,0 +1,100 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import {connectStore} from 'reducers/base.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as sitewide from 'reducers/sitewide.js';
+import '../mr-mode-selector/mr-mode-selector.js';
+import '../mr-chart/mr-chart.js';
+
+/**
+ * <mr-chart-page>
+ *
+ * Chart page view containing mr-mode-selector and mr-chart.
+ * @extends {LitElement}
+ */
+export class MrChartPage extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: block;
+        box-sizing: border-box;
+        width: 100%;
+        padding: 0.5em 8px;
+      }
+      h2 {
+        font-size: 1.2em;
+        margin: 0 0 0.5em;
+      }
+      .list-controls {
+        display: flex;
+        align-items: center;
+        justify-content: flex-end;
+        width: 100%;
+        padding: 0.5em 0;
+        height: 32px;
+      }
+      .help {
+        padding: 1em;
+        background-color: rgb(227, 242, 253);
+        width: 44em;
+        font-size: 92%;
+        margin: 5px;
+        padding: 6px;
+        border-radius: 6px;
+      }
+      .monospace {
+        font-family: monospace;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <div class="list-controls">
+        <mr-mode-selector
+          .projectName=${this._projectName}
+          .queryParams=${this._queryParams}
+          .value=${'chart'}
+        ></mr-mode-selector>
+      </div>
+      <mr-chart
+        .projectName=${this._projectName}
+        .queryParams=${this._queryParams}
+      ></mr-chart>
+
+      <div>
+        <div class="help">
+          <h2>Supported query parameters:</h2>
+          <span class="monospace">
+            cc, component, hotlist, label, owner, reporter, status
+          </span>
+          <br /><br />
+          <a href="https://bugs.chromium.org/p/monorail/issues/entry?labels=Feature-Charts">
+            Please file feedback here.
+          </a>
+        </div>
+      </div>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      _projectName: {type: String},
+      /** @private {Object} */
+      _queryParams: {type: Object},
+    };
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this._projectName = projectV0.viewedProjectName(state);
+    this._queryParams = sitewide.queryParams(state);
+  }
+};
+customElements.define('mr-chart-page', MrChartPage);
diff --git a/static_src/elements/issue-list/mr-chart/chops-chart.js b/static_src/elements/issue-list/mr-chart/chops-chart.js
new file mode 100644
index 0000000..a74255a
--- /dev/null
+++ b/static_src/elements/issue-list/mr-chart/chops-chart.js
@@ -0,0 +1,94 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+
+/**
+ * `<chops-chart>`
+ *
+ * Web components wrapper around Chart.js.
+ *
+ */
+export class ChopsChart extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: block;
+      }
+    `;
+  }
+
+  /** @override */
+  render() {
+    return html`
+      <canvas></canvas>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      type: {type: String},
+      data: {type: Object},
+      options: {type: Object},
+      _chart: {type: Object},
+      _chartConstructor: {type: Object},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.type = 'line';
+    this.data = {};
+    this.options = {};
+  }
+
+  /**
+   * Dynamically chartJs to reduce single EZT bundle size
+   * Move to static import once EZT is deprecated
+   */
+  async connectedCallback() {
+    super.connectedCallback();
+    /* eslint-disable max-len */
+    const {default: Chart} = await import(
+        /* webpackChunkName: "chartjs" */ 'chart.js/dist/Chart.bundle.min.js');
+    this._chartConstructor = Chart;
+  }
+
+  /**
+   * Refetch and rerender chart after property changes
+   * @override
+   * @param {Map} changedProperties
+   */
+  updated(changedProperties) {
+    // Make sure chartJS has loaded before attempting to create a chart
+    if (this._chartConstructor) {
+      if (!this._chart) {
+        const {type, data, options} = this;
+        const ctx = this.shadowRoot.querySelector('canvas').getContext('2d');
+        this._chart = new this._chartConstructor(ctx, {type, data, options});
+      } else if (
+        changedProperties.has('type') ||
+        changedProperties.has('data') ||
+        changedProperties.has('options')) {
+        this._updateChart();
+      }
+    }
+  }
+
+  /**
+   * Sets chartJs options and calls update
+   */
+  _updateChart() {
+    this._chart.type = this.type;
+    this._chart.data = this.data;
+    this._chart.options = this.options;
+
+    this._chart.update();
+  }
+}
+
+customElements.define('chops-chart', ChopsChart);
diff --git a/static_src/elements/issue-list/mr-chart/chops-chart.test.js b/static_src/elements/issue-list/mr-chart/chops-chart.test.js
new file mode 100644
index 0000000..bf05012
--- /dev/null
+++ b/static_src/elements/issue-list/mr-chart/chops-chart.test.js
@@ -0,0 +1,24 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {ChopsChart} from './chops-chart.js';
+
+
+let element;
+
+describe('chops-chart', () => {
+  beforeEach(() => {
+    element = document.createElement('chops-chart');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, ChopsChart);
+  });
+});
diff --git a/static_src/elements/issue-list/mr-chart/mr-chart.js b/static_src/elements/issue-list/mr-chart/mr-chart.js
new file mode 100644
index 0000000..a4c4189
--- /dev/null
+++ b/static_src/elements/issue-list/mr-chart/mr-chart.js
@@ -0,0 +1,1041 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import qs from 'qs';
+import page from 'page';
+
+import {prpcClient} from 'prpc-client-instance.js';
+import {linearRegression} from 'shared/math.js';
+import './chops-chart.js';
+import {urlWithNewParams, createObjectComparisonFunc} from 'shared/helpers.js';
+
+const DEFAULT_NUM_DAYS = 90;
+const SECONDS_IN_DAY = 24 * 60 * 60;
+const MAX_QUERY_SIZE = 90;
+const MAX_DISPLAY_LINES = 10;
+const predRangeType = Object.freeze({
+  NEXT_MONTH: 0,
+  NEXT_QUARTER: 1,
+  NEXT_50: 2,
+  HIDE: 3,
+});
+const CHART_OPTIONS = {
+  animation: false,
+  responsive: true,
+  title: {
+    display: true,
+    text: 'Issues over time',
+  },
+  tooltips: {
+    mode: 'x',
+    intersect: false,
+  },
+  hover: {
+    mode: 'x',
+    intersect: false,
+  },
+  legend: {
+    display: true,
+    labels: {
+      boxWidth: 15,
+    },
+  },
+  scales: {
+    xAxes: [{
+      display: true,
+      type: 'time',
+      time: {parser: 'MM/DD/YYYY', tooltipFormat: 'll'},
+      scaleLabel: {
+        display: true,
+        labelString: 'Day',
+      },
+    }],
+    yAxes: [{
+      display: true,
+      ticks: {
+        beginAtZero: true,
+      },
+      scaleLabel: {
+        display: true,
+        labelString: 'Value',
+      },
+    }],
+  },
+};
+const COLOR_CHOICES = ['#00838F', '#B71C1C', '#2E7D32', '#00659C',
+  '#5D4037', '#558B2F', '#FF6F00', '#6A1B9A', '#880E4F', '#827717'];
+const BG_COLOR_CHOICES = ['#B2EBF2', '#EF9A9A', '#C8E6C9', '#B2DFDB',
+  '#D7CCC8', '#DCEDC8', '#FFECB3', '#E1BEE7', '#F8BBD0', '#E6EE9C'];
+
+/**
+ * Set of serialized state this element should update for.
+ * mr-app lowercases all query parameters before putting into store.
+ * @type {Set<string>}
+ */
+export const subscribedQuery = new Set([
+  'start-date',
+  'end-date',
+  'groupby',
+  'labelprefix',
+  'q',
+  'can',
+]);
+
+const queryParamsHaveChanged = createObjectComparisonFunc(subscribedQuery);
+
+/**
+ * Mapping between query param's groupby value and chart application data.
+ * @type {Object}
+ */
+const groupByMapping = {
+  'open': {display: 'Is open', value: 'open'},
+  'owner': {display: 'Owner', value: 'owner'},
+  'comonent': {display: 'Component', value: 'component'},
+  'status': {display: 'Status', value: 'status'},
+};
+
+/**
+ * `<mr-chart>`
+ *
+ * Component rendering the chart view
+ *
+ */
+export default class MrChart extends LitElement {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: block;
+        max-width: 800px;
+        margin: 0 auto;
+      }
+      chops-chart {
+        max-width: 100%;
+      }
+      div#options {
+        max-width: 720px;
+        margin: 2em auto;
+        text-align: center;
+      }
+      div#options #unsupported-fields {
+        font-weight: bold;
+        color: orange;
+      }
+      div.align {
+        display: flex;
+      }
+      div.align #frequency, div.align #groupBy {
+        display: inline-block;
+        width: 40%;
+      }
+      div.align #frequency #two-toggle {
+        font-size: 95%;
+        text-align: center;
+        margin-bottom: 5px;
+      }
+      div.align #time, div.align #prediction {
+        display: inline-block;
+        width: 60%;
+      }
+      #dropdown {
+        height: 50%;
+      }
+      div.section {
+        display: inline-block;
+        text-align: center;
+      }
+      div.section.input {
+        padding: 4px 10px;
+      }
+      .menu {
+        min-width: 50%;
+        text-align: left;
+        font-size: 12px;
+        box-sizing: border-box;
+        text-decoration: none;
+        white-space: nowrap;
+        padding: 0.25em 8px;
+        transition: 0.2s background ease-in-out;
+        cursor: pointer;
+        color: var(--chops-link-color);
+      }
+      .menu:hover {
+        background: hsl(0, 0%, 90%);
+      }
+      .choice.transparent {
+        background: var(--chops-white);
+        border-color: var(--chops-choice-color);
+        border-radius: 4px;
+      }
+      .choice.shown {
+        background: var(--chops-active-choice-bg);
+      }
+      .choice {
+        padding: 4px 10px;
+        background: var(--chops-choice-bg);
+        color: var(--chops-choice-color);
+        text-decoration: none;
+        display: inline-block;
+      }
+      .choice.checked {
+        background: var(--chops-active-choice-bg);
+      }
+      p .warning-message {
+        display: none;
+        font-size: 1.25em;
+        padding: 0.25em;
+        background-color: var(--chops-orange-50);
+      }
+      progress {
+        background-color: var(--chops-white);
+        border: 1px solid var(--chops-gray-500);
+        margin: 0 0 1em;
+        width: 100%;
+        visibility: visible;
+      }
+      ::-webkit-progress-bar {
+        background-color: var(--chops-white);
+      }
+      progress::-webkit-progress-value {
+        transition: width 1s;
+        background-color: #00838F;
+      }
+    `;
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('queryParams')) {
+      this._setPropsFromQueryParams();
+      this._fetchData();
+    }
+  }
+
+  /** @override */
+  render() {
+    const doneLoading = this.progress === 1;
+    return html`
+      <chops-chart
+        type="line"
+        .options=${CHART_OPTIONS}
+        .data=${this._chartData(this.indices, this.values)}
+      ></chops-chart>
+      <div id="options">
+        <p id="unsupported-fields">
+          ${this.unsupportedFields.length ? `
+            Unsupported fields: ${this.unsupportedFields.join(', ')}`: ''}
+        </p>
+        <progress
+          value=${this.progress}
+          ?hidden=${doneLoading}
+        >Loading chart...</progress>
+        <p class="warning-message" ?hidden=${!this.searchLimitReached}>
+          Note: Some results are not being counted.
+          Please narrow your query.
+        </p>
+        <p class="warning-message" ?hidden=${!this.maxQuerySizeReached}>
+          Your query is too long.
+          Showing ${MAX_QUERY_SIZE} weeks from end date.
+        </p>
+        <p class="warning-message" ?hidden=${!this.dateRangeNotLegal}>
+          Your requested date range does not exist.
+          Showing ${MAX_QUERY_SIZE} days from end date.
+        </p>
+        <p class="warning-message" ?hidden=${!this.cannedQueryOpen}>
+          Your query scope prevents closed issues from showing.
+        </p>
+        <div class="align">
+          <div id="frequency">
+            <label for="two-toggle">Choose date range:</label>
+            <div id="two-toggle">
+              <chops-button @click="${this._setDateRange.bind(this, 180)}"
+                class="${this.dateRange === 180 ? 'choice checked': 'choice'}">
+                180 Days
+              </chops-button>
+              <chops-button @click="${this._setDateRange.bind(this, 90)}"
+                class="${this.dateRange === 90 ? 'choice checked': 'choice'}">
+                90 Days
+              </chops-button>
+              <chops-button @click="${this._setDateRange.bind(this, 30)}"
+                class="${this.dateRange === 30 ? 'choice checked': 'choice'}">
+                30 Days
+              </chops-button>
+            </div>
+          </div>
+          <div id="time">
+            <label for="start-date">Choose start and end date:</label>
+            <br />
+            <input
+              type="date"
+              id="start-date"
+              name="start-date"
+              .value=${this.startDate && this.startDate.toISOString().substr(0, 10)}
+              ?disabled=${!doneLoading}
+              @change=${(e) => this.startDate = MrChart.dateStringToDate(e.target.value)}
+            />
+            <input
+              type="date"
+              id="end-date"
+              name="end-date"
+              .value=${this.endDate && this.endDate.toISOString().substr(0, 10)}
+              ?disabled=${!doneLoading}
+              @change=${(e) => this.endDate = MrChart.dateStringToDate(e.target.value)}
+            />
+            <chops-button @click="${this._onDateChanged}" class=choice>
+              Apply
+            </chops-button>
+          </div>
+        </div>
+        <div class="align">
+          <div id="prediction">
+          <label for="two-toggle">Choose prediction range:</label>
+          <div id="two-toggle">
+            ${this._renderPredictChoice('Future Month', predRangeType.NEXT_MONTH)}
+            ${this._renderPredictChoice('Future Quarter', predRangeType.NEXT_QUARTER)}
+            ${this._renderPredictChoice('Future 50%', predRangeType.NEXT_50)}
+            ${this._renderPredictChoice('Hide', predRangeType.HIDE)}
+          </div>
+        </div>
+          <div id="groupBy">
+            <label for="dropdown">Choose group by:</label>
+            <mr-dropdown
+              id="dropdown"
+              ?disabled=${!doneLoading}
+              .text=${this.groupBy.display}
+            >
+              ${this.dropdownHTML}
+            </mr-dropdown>
+          </div>
+        </div>
+      </div>
+    `;
+  }
+
+  /**
+   * Renders a single prediction button.
+   * @param {string} choiceName The text displayed on the button.
+   * @param {number} rangeType An enum-like number specifying which range
+   *   to use.
+   * @return {TemplateResult}
+   */
+  _renderPredictChoice(choiceName, rangeType) {
+    const changePrediction = (_e) => {
+      this.predRange = rangeType;
+      this._fetchData();
+    };
+    return html`
+      <chops-button
+        @click=${changePrediction}
+        class="${this.predRange === rangeType ? 'checked': ''} choice">
+        ${choiceName}
+      </chops-button>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      progress: {type: Number},
+      projectName: {type: String},
+      hotlistId: {type: Number},
+      indices: {type: Array},
+      values: {type: Array},
+      unsupportedFields: {type: Array},
+      dateRangeNotLegal: {type: Boolean},
+      dateRange: {type: Number},
+      frequency: {type: Number},
+      queryParams: {
+        type: Object,
+        hasChanged: queryParamsHaveChanged,
+      },
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.progress = 0.05;
+    this.values = [];
+    this.indices = [];
+    this.unsupportedFields = [];
+    this.predRange = predRangeType.HIDE;
+    this._page = page;
+  }
+
+  /** @override */
+  connectedCallback() {
+    super.connectedCallback();
+
+    if (!this.projectName && !this.hotlistId) {
+      throw new Error('Attribute `projectName` or `hotlistId` required.');
+    }
+    this._setPropsFromQueryParams();
+    this._constructDropdownMenu();
+  }
+
+  /**
+   * Initialize queryParams and set properties from the queryParams.
+   * Since this page exists in both the SPA and ezt they initialize mr-chart
+   * differently, ie in ezt, this.queryParams will be undefined during
+   * connectedCallback. Until ezt is deleted, initialize props here.
+   */
+  _setPropsFromQueryParams() {
+    if (!this.queryParams) {
+      const params = qs.parse(document.location.search.substring(1));
+      // ezt pages used querystring as source of truth
+      // and 'labelPrefix'in query param, but SPA uses
+      // redux store's sitewide.queryParams as source of truth
+      // and lowercases all keys in sitewide.queryParams
+      if (params.hasOwnProperty('labelPrefix')) {
+        const labelPrefixValue = params['labelPrefix'];
+        params['labelprefix'] = labelPrefixValue;
+        delete params['labelPrefix'];
+      }
+      this.queryParams = params;
+    }
+    this.endDate = MrChart.getEndDate(this.queryParams['end-date']);
+    this.startDate = MrChart.getStartDate(
+        this.queryParams['start-date'],
+        this.endDate, DEFAULT_NUM_DAYS);
+    this.groupBy = MrChart.getGroupByFromQuery(this.queryParams);
+  }
+
+  /**
+   * Set dropdown options menu in HTML.
+   */
+  async _constructDropdownMenu() {
+    const response = await this._getLabelPrefixes();
+    let dropdownOptions = ['None', 'Component', 'Is open', 'Status', 'Owner'];
+    dropdownOptions = dropdownOptions.concat(response);
+    const dropdownHTML = dropdownOptions.map((str) => html`
+      <option class='menu' @click=${this._setGroupBy}>
+        ${str}</option>`);
+    this.dropdownHTML = html`${dropdownHTML}`;
+  }
+
+  /**
+   * Call global page.js to change frontend route based on new parameters
+   * @param {Object<string, string>} newParams
+   */
+  _changeUrlParams(newParams) {
+    const newUrl = urlWithNewParams(`/p/${this.projectName}/issues/list`,
+        this.queryParams, newParams);
+    this._page(newUrl);
+  }
+
+  /**
+   * Set start date and end date and trigger url action
+   */
+  _onDateChanged() {
+    const newParams = {
+      'start-date': this.startDate.toISOString().substr(0, 10),
+      'end-date': this.endDate.toISOString().substr(0, 10),
+    };
+    this._changeUrlParams(newParams);
+  }
+
+  /**
+   * Fetch data required to render chart
+   * @fires Event#allDataLoaded
+   */
+  async _fetchData() {
+    this.dateRange = Math.ceil(
+        (this.endDate - this.startDate) / (1000 * SECONDS_IN_DAY));
+
+    // Coordinate different params and flags, protect against illegal queries
+    // Case for start date greater than end date.
+    if (this.dateRange <= 0) {
+      this.frequency = 7;
+      this.dateRangeNotLegal = true;
+      this.maxQuerySizeReached = false;
+      this.dateRange = MAX_QUERY_SIZE;
+    } else {
+      this.dateRangeNotLegal = false;
+      if (this.dateRange >= MAX_QUERY_SIZE * 7) {
+        // Case for date range too long, requires >= MAX_QUERY_SIZE queries.
+        this.frequency = 7;
+        this.maxQuerySizeReached = true;
+        this.dateRange = MAX_QUERY_SIZE * 7;
+      } else {
+        this.maxQuerySizeReached = false;
+        if (this.dateRange < MAX_QUERY_SIZE) {
+          // Case for small date range, displayed in daily frequency.
+          this.frequency = 1;
+        } else {
+          // Case for medium date range, displayed in weekly frequency.
+          this.frequency = 7;
+        }
+      }
+    }
+    // Set canned query flag.
+    this.cannedQueryOpen = (this.queryParams.can === '2' &&
+      this.groupBy.value === 'open');
+
+    // Reset chart variables except indices.
+    this.progress = 0.05;
+
+    let numTimestampsLoaded = 0;
+    const timestampsChronological = MrChart.makeTimestamps(this.endDate,
+        this.frequency, this.dateRange);
+    const tsToIndexMap = new Map(timestampsChronological.map((ts, idx) => (
+      [ts, idx]
+    )));
+    this.indices = MrChart.makeIndices(timestampsChronological);
+    const timestamps = MrChart.sortInBisectOrder(timestampsChronological);
+    this.values = new Array(timestamps.length).fill(undefined);
+
+    const fetchPromises = timestamps.map(async (ts) => {
+      const data = await this._fetchDataAtTimestamp(ts);
+      const index = tsToIndexMap.get(ts);
+      this.values[index] = data.issues;
+      numTimestampsLoaded += 1;
+      const progressValue = numTimestampsLoaded / timestamps.length;
+      this.progress = progressValue;
+
+      return data;
+    });
+
+    const chartData = await Promise.all(fetchPromises);
+
+    // This is purely for testing purposes
+    this.dispatchEvent(new Event('allDataLoaded'));
+
+    // Check if the query includes any field values that are not supported.
+    const flatUnsupportedFields = chartData.reduce((acc, datum) => {
+      if (datum.unsupportedField) {
+        acc = acc.concat(datum.unsupportedField);
+      }
+      return acc;
+    }, []);
+    this.unsupportedFields = Array.from(new Set(flatUnsupportedFields));
+
+    this.searchLimitReached = chartData.some((d) => d.searchLimitReached);
+  }
+
+  /**
+   * fetch data at timestamp
+   * @param {number} timestamp
+   * @return {{date: number, issues: Array<Map.<string, number>>,
+   *   unsupportedField: string, searchLimitReached: string}}
+   */
+  async _fetchDataAtTimestamp(timestamp) {
+    const query = this.queryParams.q;
+    const cannedQuery = this.queryParams.can;
+    const message = {
+      timestamp: timestamp,
+      projectName: this.projectName,
+      query: query,
+      cannedQuery: cannedQuery,
+      hotlistId: this.hotlistId,
+      groupBy: undefined,
+    };
+    if (this.groupBy.value !== '') {
+      message['groupBy'] = this.groupBy.value;
+      if (this.groupBy.value === 'label') {
+        message['labelPrefix'] = this.groupBy.labelPrefix;
+      }
+    }
+    const response = await prpcClient.call('monorail.Issues',
+        'IssueSnapshot', message);
+
+    let issues;
+    if (response.snapshotCount) {
+      issues = response.snapshotCount.reduce((map, curr) => {
+        if (curr.dimension !== undefined) {
+          if (this.groupBy.value === '') {
+            map.set('Issue Count', curr.count);
+          } else {
+            map.set(curr.dimension, curr.count);
+          }
+        }
+        return map;
+      }, new Map());
+    } else {
+      issues = new Map();
+    }
+    return {
+      date: timestamp * 1000,
+      issues: issues,
+      unsupportedField: response.unsupportedField,
+      searchLimitReached: response.searchLimitReached,
+    };
+  }
+
+  /**
+   * Get prefixes from the set of labels.
+   */
+  async _getLabelPrefixes() {
+    // If no project (i.e. viewing a hotlist), return empty list.
+    if (!this.projectName) {
+      return [];
+    }
+
+    const projectRequestMessage = {
+      project_name: this.projectName};
+    const labelsResponse = await prpcClient.call(
+        'monorail.Projects', 'GetLabelOptions', projectRequestMessage);
+    const labelPrefixes = new Set();
+    for (let i = 0; i < labelsResponse.labelOptions.length; i++) {
+      const label = labelsResponse.labelOptions[i].label;
+      if (label.includes('-')) {
+        labelPrefixes.add(label.split('-')[0]);
+      }
+    }
+    return Array.from(labelPrefixes);
+  }
+
+  /**
+   * construct chart data
+   * @param {Array} indices
+   * @param {Array} values
+   * @return {Object} chart data and options
+   */
+  _chartData(indices, values) {
+    // Generate a map of each data line {dimension:string, value:array}
+    const mapValues = new Map();
+    for (let i = 0; i < values.length; i++) {
+      if (values[i] !== undefined) {
+        values[i].forEach((value, key, map) => mapValues.set(key, []));
+      }
+    }
+    // Count the number of 0 or undefined data points.
+    let count = 0;
+    for (let i = 0; i < values.length; i++) {
+      if (values[i] !== undefined) {
+        if (values[i].size === 0) {
+          count++;
+        }
+        // Set none-existing data points 0.
+        mapValues.forEach((value, key, map) => {
+          mapValues.set(key, value.concat([values[i].get(key) || 0]));
+        });
+      } else {
+        count++;
+      }
+    }
+    // Legend display set back to default.
+    CHART_OPTIONS.legend.display = true;
+    // Check if any positive valued data exist, if not, draw an array of zeros.
+    if (count === values.length) {
+      return {
+        type: 'line',
+        labels: indices,
+        datasets: [{
+          label: this.groupBy.labelPrefix,
+          data: Array(indices.length).fill(0),
+          backgroundColor: COLOR_CHOICES[0],
+          borderColor: COLOR_CHOICES[0],
+          showLine: true,
+          fill: false,
+        }],
+      };
+    }
+    // Convert map to a dataset of lines.
+    let arrayValues = [];
+    mapValues.forEach((value, key, map) => {
+      arrayValues.push({
+        label: key,
+        data: value,
+        backgroundColor: COLOR_CHOICES[arrayValues.length %
+          COLOR_CHOICES.length],
+        borderColor: COLOR_CHOICES[arrayValues.length % COLOR_CHOICES.length],
+        showLine: true,
+        fill: false,
+      });
+    });
+    arrayValues = MrChart.getSortedLines(arrayValues, MAX_DISPLAY_LINES);
+    if (this.predRange === predRangeType.HIDE) {
+      return {
+        type: 'line',
+        labels: indices,
+        datasets: arrayValues,
+      };
+    }
+
+    let predictedValues = [];
+    let originalData;
+    let predictedData;
+    let maxData;
+    let minData;
+    let currColor;
+    let currBGColor;
+    // Check if displayed values > MAX_DISPLAY_LINES, hide legend.
+    if (arrayValues.length * 4 > MAX_DISPLAY_LINES) {
+      CHART_OPTIONS.legend.display = false;
+    } else {
+      CHART_OPTIONS.legend.display = true;
+    }
+    for (let i = 0; i < arrayValues.length; i++) {
+      [originalData, predictedData, maxData, minData] =
+        MrChart.getAllData(indices, arrayValues[i]['data'], this.dateRange,
+            this.predRange, this.frequency, this.endDate);
+      currColor = COLOR_CHOICES[i % COLOR_CHOICES.length];
+      currBGColor = BG_COLOR_CHOICES[i % COLOR_CHOICES.length];
+      predictedValues = predictedValues.concat([{
+        label: arrayValues[i]['label'],
+        backgroundColor: currColor,
+        borderColor: currColor,
+        data: originalData,
+        showLine: true,
+        fill: false,
+      }, {
+        label: arrayValues[i]['label'].concat(' prediction'),
+        backgroundColor: currColor,
+        borderColor: currColor,
+        borderDash: [5, 5],
+        data: predictedData,
+        pointRadius: 0,
+        showLine: true,
+        fill: false,
+      }, {
+        label: arrayValues[i]['label'].concat(' lower error'),
+        backgroundColor: currBGColor,
+        borderColor: currBGColor,
+        borderDash: [5, 5],
+        data: minData,
+        pointRadius: 0,
+        showLine: true,
+        hidden: true,
+        fill: false,
+      }, {
+        label: arrayValues[i]['label'].concat(' upper error'),
+        backgroundColor: currBGColor,
+        borderColor: currBGColor,
+        borderDash: [5, 5],
+        data: maxData,
+        pointRadius: 0,
+        showLine: true,
+        hidden: true,
+        fill: '-1',
+      }]);
+    }
+    return {
+      type: 'scatter',
+      datasets: predictedValues,
+    };
+  }
+
+  /**
+   * Change group by based on dropdown menu selection.
+   * @param {Event} e
+   */
+  _setGroupBy(e) {
+    switch (e.target.text) {
+      case 'None':
+        this.groupBy = {value: undefined};
+        break;
+      case 'Is open':
+        this.groupBy = {value: 'open'};
+        break;
+      case 'Owner':
+      case 'Component':
+      case 'Status':
+        this.groupBy = {value: e.target.text.toLowerCase()};
+        break;
+      default:
+        this.groupBy = {value: 'label', labelPrefix: e.target.text};
+    }
+    this.groupBy['display'] = e.target.text;
+    this.shadowRoot.querySelector('#dropdown').text = e.target.text;
+    this.shadowRoot.querySelector('#dropdown').close();
+
+    const newParams = {
+      'groupby': this.groupBy.value,
+      'labelprefix': this.groupBy.labelPrefix,
+    };
+
+    this._changeUrlParams(newParams);
+  }
+
+  /**
+   * Change date range and frequency based on button clicked.
+   * @param {number} dateRange Number of days in date range
+   */
+  _setDateRange(dateRange) {
+    if (this.dateRange !== dateRange) {
+      this.startDate = new Date(
+          this.endDate.getTime() - 1000 * SECONDS_IN_DAY * dateRange);
+      this._onDateChanged();
+      window.getTSMonClient().recordDateRangeChange(dateRange);
+    }
+  }
+
+  /**
+   * Move first, last, and median to the beginning of the array, recursively.
+   * @param  {Array} timestamps
+   * @return {Array}
+   */
+  static sortInBisectOrder(timestamps) {
+    const arr = [];
+    if (timestamps.length === 0) {
+      return arr;
+    } else if (timestamps.length <= 2) {
+      return timestamps;
+    } else {
+      const beginTs = timestamps.shift();
+      const endTs = timestamps.pop();
+      const medianTs = timestamps.splice(timestamps.length / 2, 1)[0];
+      return [beginTs, endTs, medianTs].concat(
+          MrChart.sortInBisectOrder(timestamps));
+    }
+  }
+
+  /**
+   * Populate array of timestamps we want to fetch.
+   * @param {Date} endDate
+   * @param {number} frequency
+   * @param {number} numDays
+   * @return {Array}
+   */
+  static makeTimestamps(endDate, frequency, numDays=DEFAULT_NUM_DAYS) {
+    if (!endDate) {
+      throw new Error('endDate required');
+    }
+    const endTimeSeconds = Math.round(endDate.getTime() / 1000);
+    const timestampsChronological = [];
+    for (let i = 0; i < numDays; i += frequency) {
+      timestampsChronological.unshift(endTimeSeconds - (SECONDS_IN_DAY * i));
+    }
+    return timestampsChronological;
+  }
+
+  /**
+   * Convert a string '2018-11-03' to a Date object.
+   * @param  {string} dateString
+   * @return {Date}
+   */
+  static dateStringToDate(dateString) {
+    if (!dateString) {
+      return null;
+    }
+    const splitDate = dateString.split('-');
+    const year = Number.parseInt(splitDate[0]);
+    // Month is 0-indexed, so subtract one.
+    const month = Number.parseInt(splitDate[1]) - 1;
+    const day = Number.parseInt(splitDate[2]);
+    return new Date(Date.UTC(year, month, day, 23, 59, 59));
+  }
+
+  /**
+   * Returns a Date parsed from string input, defaults to current date.
+   * @param {string} input
+   * @return {Date}
+   */
+  static getEndDate(input) {
+    if (input) {
+      const date = MrChart.dateStringToDate(input);
+      if (date) {
+        return date;
+      }
+    }
+    const today = new Date();
+    today.setHours(23);
+    today.setMinutes(59);
+    today.setSeconds(59);
+    return today;
+  }
+
+  /**
+   * Return a Date parsed from string input
+   * defaults to diff days befores endDate
+   * @param {string} input
+   * @param {Date} endDate
+   * @param {number} diff
+   * @return {Date}
+   */
+  static getStartDate(input, endDate, diff) {
+    if (input) {
+      const date = MrChart.dateStringToDate(input);
+      if (date) {
+        return date;
+      }
+    }
+    return new Date(endDate.getTime() - 1000 * SECONDS_IN_DAY * diff);
+  }
+
+  /**
+   * Make indices
+   * @param {Array} timestamps
+   * @return {Array}
+   */
+  static makeIndices(timestamps) {
+    const dateFormat = {year: 'numeric', month: 'numeric', day: 'numeric'};
+    return timestamps.map((ts) => (
+      (new Date(ts * 1000)).toLocaleDateString('en-US', dateFormat)
+    ));
+  }
+
+  /**
+   * Generate predicted future data based on previous data.
+   * @param {Array} values
+   * @param {number} dateRange
+   * @param {number} interval
+   * @param {number} frequency
+   * @param {Date} inputEndDate
+   * @return {Array}
+   */
+  static getPredictedData(
+      values, dateRange, interval, frequency, inputEndDate) {
+    // TODO(weihanl): changes to support frequencies other than 1 and 7.
+    let n;
+    let endDateRange;
+    if (frequency === 1) {
+      // Display in daily.
+      n = values.length;
+      endDateRange = interval;
+    } else {
+      // Display in weekly.
+      n = Math.floor((DEFAULT_NUM_DAYS + 1) / 7);
+      endDateRange = interval * 7 - 1;
+    }
+    const [slope, intercept] = linearRegression(values, n);
+    const endDate = new Date(inputEndDate.getTime() +
+        1000 * SECONDS_IN_DAY * (1 + endDateRange));
+    const timestampsChronological = MrChart.makeTimestamps(
+        endDate, frequency, endDateRange);
+    const predictedIndices = MrChart.makeIndices(timestampsChronological);
+
+    // Obtain future data and past data on the generated line.
+    const predictedValues = [];
+    const generatedValues = [];
+    for (let i = 0; i < interval; i++) {
+      predictedValues.push(Math.round(100*((i + n) * slope + intercept)) / 100);
+    }
+    for (let i = 0; i < n; i++) {
+      generatedValues.push(Math.round(100*(i * slope + intercept)) / 100);
+    }
+    return [predictedIndices, predictedValues, generatedValues];
+  }
+
+  /**
+   * Generate error range lines using +/- standard error
+   * on intercept to original line.
+   * @param {Array} generatedValues
+   * @param {Array} values
+   * @param {Array} predictedValues
+   * @return {Array}
+   */
+  static getErrorData(generatedValues, values, predictedValues) {
+    const diffs = [];
+    for (let i = 0; i < generatedValues.length; i++) {
+      diffs.push(values[values.length - generatedValues.length + i] -
+          generatedValues[i]);
+    }
+    const sqDiffs = diffs.map((v) => v * v);
+    const stdDev = sqDiffs.reduce((sum, v) => sum + v) / values.length;
+    const maxValues = predictedValues.map(
+        (x) => Math.round(100 * (x + stdDev)) / 100);
+    const minValues = predictedValues.map(
+        (x) => Math.round(100 * (x - stdDev)) / 100);
+    return [maxValues, minValues];
+  }
+
+  /**
+   * Format all data using scattered dot representation for a single chart line.
+   * @param {Array} indices
+   * @param {Array} values
+   * @param {humber} dateRange
+   * @param {number} predRange
+   * @param {number} frequency
+   * @param {Date} endDate
+   * @return {Array}
+   */
+  static getAllData(indices, values, dateRange, predRange, frequency, endDate) {
+    // Set the number of data points that needs to be generated based on
+    // future time range and frequency.
+    let interval;
+    switch (predRange) {
+      case predRangeType.NEXT_MONTH:
+        interval = frequency === 1 ? 30 : 4;
+        break;
+      case predRangeType.NEXT_QUARTER:
+        interval = frequency === 1 ? 90 : 13;
+        break;
+      case predRangeType.NEXT_50:
+        interval = Math.floor((dateRange + 1) / (frequency * 2));
+        break;
+    }
+
+    const [predictedIndices, predictedValues, generatedValues] =
+      MrChart.getPredictedData(values, dateRange, interval, frequency, endDate);
+    const [maxValues, minValues] =
+      MrChart.getErrorData(generatedValues, values, predictedValues);
+    const n = generatedValues.length;
+
+    // Format data into an array of {x:"MM/DD/YYYY", y:1.00} to draw chart.
+    const originalData = [];
+    const predictedData = [];
+    const maxData = [{
+      x: indices[values.length - 1],
+      y: generatedValues[n - 1],
+    }];
+    const minData = [{
+      x: indices[values.length - 1],
+      y: generatedValues[n - 1],
+    }];
+    for (let i = 0; i < values.length; i++) {
+      originalData.push({x: indices[i], y: values[i]});
+    }
+    for (let i = 0; i < n; i++) {
+      predictedData.push({x: indices[values.length - n + i],
+        y: Math.max(Math.round(100 * generatedValues[i]) / 100, 0)});
+    }
+    for (let i = 0; i < predictedValues.length; i++) {
+      predictedData.push({
+        x: predictedIndices[i],
+        y: Math.max(predictedValues[i], 0),
+      });
+      maxData.push({x: predictedIndices[i], y: Math.max(maxValues[i], 0)});
+      minData.push({x: predictedIndices[i], y: Math.max(minValues[i], 0)});
+    }
+    return [originalData, predictedData, maxData, minData];
+  }
+
+  /**
+   * Sort lines by data in reversed chronological order and
+   * return top n lines with most issues.
+   * @param {Array} arrayValues
+   * @param {number} index
+   * @return {Array}
+   */
+  static getSortedLines(arrayValues, index) {
+    if (index >= arrayValues.length) {
+      return arrayValues;
+    }
+    // Convert data by reversing and starting from last digit and sort
+    // according to the resulting value. e.g. [4,2,0] => 24, [0,4,3] => 340
+    const sortedValues = arrayValues.slice().sort((arrX, arrY) => {
+      const intX = parseInt(
+          arrX.data.map((i) => i.toString()).reverse().join(''));
+      const intY = parseInt(
+          arrY.data.map((i) => i.toString()).reverse().join(''));
+      return intY - intX;
+    });
+    return sortedValues.slice(0, index);
+  }
+
+  /**
+   * Parses queryParams for groupBy property
+   * @param {Object<string, string>} queryParams
+   * @return {Object<string, string>}
+   */
+  static getGroupByFromQuery(queryParams) {
+    const defaultValue = {display: 'None', value: ''};
+
+    const labelMapping = {
+      'label': {
+        display: queryParams.labelprefix,
+        value: 'label',
+        labelPrefix: queryParams.labelprefix,
+      },
+    };
+
+    return groupByMapping[queryParams.groupby] ||
+        labelMapping[queryParams.groupby] ||
+        defaultValue;
+  }
+}
+
+customElements.define('mr-chart', MrChart);
diff --git a/static_src/elements/issue-list/mr-chart/mr-chart.test.js b/static_src/elements/issue-list/mr-chart/mr-chart.test.js
new file mode 100644
index 0000000..8c079fd
--- /dev/null
+++ b/static_src/elements/issue-list/mr-chart/mr-chart.test.js
@@ -0,0 +1,524 @@
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import MrChart, {
+  subscribedQuery,
+} from 'elements/issue-list/mr-chart/mr-chart.js';
+import {prpcClient} from 'prpc-client-instance.js';
+
+let element;
+let dataLoadedPromise;
+
+const beforeEachElement = () => {
+  if (element && document.body.contains(element)) {
+    // Avoid setting up multiple versions of the same element.
+    document.body.removeChild(element);
+    element = null;
+  }
+  const el = document.createElement('mr-chart');
+  el.setAttribute('projectName', 'rutabaga');
+  dataLoadedPromise = new Promise((resolve) => {
+    el.addEventListener('allDataLoaded', resolve);
+  });
+
+  document.body.appendChild(el);
+  return el;
+};
+
+describe('mr-chart', () => {
+  beforeEach(() => {
+    window.CS_env = {
+      token: 'rutabaga-token',
+      tokenExpiresSec: 0,
+      app_version: 'rutabaga-version',
+    };
+    sinon.stub(prpcClient, 'call').callsFake(async () => {
+      return {
+        snapshotCount: [{count: 8}],
+        unsupportedField: [],
+        searchLimitReached: false,
+      };
+    });
+
+    element = beforeEachElement();
+  });
+
+  afterEach(async () => {
+    // _fetchData is always called when the element is connected, so we have to
+    // wait until all data has been loaded.
+    // Otherwise prpcClient.call will be restored and we will make actual XHR
+    // calls.
+    await dataLoadedPromise;
+
+    document.body.removeChild(element);
+
+    prpcClient.call.restore();
+  });
+
+  describe('initializes', () => {
+    it('renders', () => {
+      assert.instanceOf(element, MrChart);
+    });
+
+    it('sets this.projectname', () => {
+      assert.equal(element.projectName, 'rutabaga');
+    });
+  });
+
+  describe('data loading', () => {
+    beforeEach(() => {
+      // Stub MrChart.makeTimestamps to return 6, not 30 data points.
+      const originalMakeTimestamps = MrChart.makeTimestamps;
+      sinon.stub(MrChart, 'makeTimestamps').callsFake((endDate) => {
+        return originalMakeTimestamps(endDate, 1, 6);
+      });
+      sinon.stub(MrChart, 'getEndDate').callsFake(() => {
+        return new Date(Date.UTC(2018, 10, 3, 23, 59, 59));
+      });
+
+      // Re-instantiate element after stubs.
+      element = beforeEachElement();
+    });
+
+    afterEach(() => {
+      MrChart.makeTimestamps.restore();
+      MrChart.getEndDate.restore();
+    });
+
+    it('makes a series of XHR calls', async () => {
+      await dataLoadedPromise;
+      for (let i = 0; i < 6; i++) {
+        assert.deepEqual(element.values[i], new Map());
+      }
+    });
+
+    it('sets indices and correctly re-orders values', async () => {
+      await dataLoadedPromise;
+
+      const timestampMap = new Map([
+        [1540857599, 0], [1540943999, 1], [1541030399, 2], [1541116799, 3],
+        [1541203199, 4], [1541289599, 5],
+      ]);
+      sinon.stub(MrChart.prototype, '_fetchDataAtTimestamp').callsFake(
+          async (ts) => ({issues: {'Issue Count': timestampMap.get(ts)}}));
+
+      element.endDate = new Date(Date.UTC(2018, 10, 3, 23, 59, 59));
+      await element._fetchData();
+
+      assert.deepEqual(element.indices, [
+        '10/29/2018', '10/30/2018', '10/31/2018',
+        '11/1/2018', '11/2/2018', '11/3/2018',
+      ]);
+      for (let i = 0; i < 6; i++) {
+        assert.deepEqual(element.values[i], {'Issue Count': i});
+      }
+      MrChart.prototype._fetchDataAtTimestamp.restore();
+    });
+
+    it('if issue count is null, defaults to 0', async () => {
+      prpcClient.call.restore();
+      sinon.stub(prpcClient, 'call').callsFake(async () => {
+        return {snapshotCount: [{}]};
+      });
+      MrChart.makeTimestamps.restore();
+      sinon.stub(MrChart, 'makeTimestamps').callsFake((endDate) => {
+        return [1234567, 2345678, 3456789];
+      });
+
+      await element._fetchData(new Date());
+      assert.deepEqual(element.values[0], new Map());
+    });
+
+    it('Retrieve data under groupby feature', async () => {
+      const data = new Map([['Type-1', 0], ['Type-2', 1]]);
+      sinon.stub(MrChart.prototype, '_fetchDataAtTimestamp').callsFake(
+          () => ({issues: data}));
+
+      element = beforeEachElement();
+
+      await element._fetchData(new Date());
+      for (let i = 0; i < 3; i++) {
+        assert.deepEqual(element.values[i], data);
+      }
+      MrChart.prototype._fetchDataAtTimestamp.restore();
+    });
+
+    it('_fetchDataAtTimestamp has no default query or can', async () => {
+      await element._fetchData();
+
+      sinon.assert.calledWith(
+          prpcClient.call,
+          'monorail.Issues',
+          'IssueSnapshot',
+          {
+            cannedQuery: undefined,
+            groupBy: undefined,
+            hotlistId: undefined,
+            query: undefined,
+            projectName: 'rutabaga',
+            timestamp: 1540857599,
+          });
+    });
+  });
+
+  describe('start date change detection', () => {
+    it('illegal query: start-date is greater than end-date', async () => {
+      await element.updateComplete;
+
+      element.startDate = new Date('2199-11-06');
+      element._fetchData();
+
+      assert.equal(element.dateRange, 90);
+      assert.equal(element.frequency, 7);
+      assert.equal(element.dateRangeNotLegal, true);
+    });
+
+    it('illegal query: end_date - start_date requires more than 90 queries',
+        async () => {
+          await element.updateComplete;
+
+          element.startDate = new Date('2016-10-03');
+          element._fetchData();
+
+          assert.equal(element.dateRange, 90 * 7);
+          assert.equal(element.frequency, 7);
+          assert.equal(element.maxQuerySizeReached, true);
+        });
+  });
+
+  describe('date change behavior', () => {
+    it('pushes to history API via pageJS', async () => {
+      sinon.stub(element, '_page');
+      sinon.spy(element, '_setDateRange');
+      sinon.spy(element, '_onDateChanged');
+      sinon.spy(element, '_changeUrlParams');
+
+      await element.updateComplete;
+
+      const thirtyButton = element.shadowRoot
+          .querySelector('#two-toggle').children[2];
+      thirtyButton.click();
+
+      sinon.assert.calledOnce(element._setDateRange);
+      sinon.assert.calledOnce(element._onDateChanged);
+      sinon.assert.calledOnce(element._changeUrlParams);
+      sinon.assert.calledOnce(element._page);
+
+      element._page.restore();
+      element._setDateRange.restore();
+      element._onDateChanged.restore();
+      element._changeUrlParams.restore();
+    });
+  });
+
+  describe('progress bar', () => {
+    it('visible based on loading progress', async () => {
+      // Check for visible progress bar and hidden input after initial render
+      await element.updateComplete;
+      const progressBar = element.shadowRoot.querySelector('progress');
+      const endDateInput = element.shadowRoot.querySelector('#end-date');
+      assert.isFalse(progressBar.hasAttribute('hidden'));
+      assert.isTrue(endDateInput.disabled);
+
+      // Check for hidden progress bar and enabled input after fetch and render
+      await dataLoadedPromise;
+      await element.updateComplete;
+      assert.isTrue(progressBar.hasAttribute('hidden'));
+      assert.isFalse(endDateInput.disabled);
+
+      // Trigger another data fetch and render, but prior to fetch complete
+      // Check progress bar is visible again
+      element.queryParams['start-date'] = '2012-01-01';
+      await element.requestUpdate('queryParams');
+      await element.updateComplete;
+      assert.isFalse(progressBar.hasAttribute('hidden'));
+
+      await dataLoadedPromise;
+      await element.updateComplete;
+      assert.isTrue(progressBar.hasAttribute('hidden'));
+    });
+  });
+
+  describe('static methods', () => {
+    describe('sortInBisectOrder', () => {
+      it('orders first, last, median recursively', () => {
+        assert.deepEqual(MrChart.sortInBisectOrder([]), []);
+        assert.deepEqual(MrChart.sortInBisectOrder([9]), [9]);
+        assert.deepEqual(MrChart.sortInBisectOrder([8, 9]), [8, 9]);
+        assert.deepEqual(MrChart.sortInBisectOrder([7, 8, 9]), [7, 9, 8]);
+        assert.deepEqual(
+            MrChart.sortInBisectOrder([1, 2, 3, 4, 5]), [1, 5, 3, 2, 4]);
+      });
+    });
+
+    describe('makeTimestamps', () => {
+      it('throws an error if endDate not passed', () => {
+        assert.throws(() => {
+          MrChart.makeTimestamps();
+        }, 'endDate required');
+      });
+      it('returns an array of in seconds', () => {
+        const endDate = new Date(Date.UTC(2018, 10, 3, 23, 59, 59));
+        const secondsInDay = 24 * 60 * 60;
+
+        assert.deepEqual(MrChart.makeTimestamps(endDate, 1, 6), [
+          1541289599 - (secondsInDay * 5), 1541289599 - (secondsInDay * 4),
+          1541289599 - (secondsInDay * 3), 1541289599 - (secondsInDay * 2),
+          1541289599 - (secondsInDay * 1), 1541289599 - (secondsInDay * 0),
+        ]);
+      });
+      it('tests frequency greater than 1', () => {
+        const endDate = new Date(Date.UTC(2018, 10, 3, 23, 59, 59));
+        const secondsInDay = 24 * 60 * 60;
+
+        assert.deepEqual(MrChart.makeTimestamps(endDate, 2, 6), [
+          1541289599 - (secondsInDay * 4),
+          1541289599 - (secondsInDay * 2),
+          1541289599 - (secondsInDay * 0),
+        ]);
+      });
+      it('tests frequency greater than 1', () => {
+        const endDate = new Date(Date.UTC(2018, 10, 3, 23, 59, 59));
+        const secondsInDay = 24 * 60 * 60;
+
+        assert.deepEqual(MrChart.makeTimestamps(endDate, 2, 7), [
+          1541289599 - (secondsInDay * 6),
+          1541289599 - (secondsInDay * 4),
+          1541289599 - (secondsInDay * 2),
+          1541289599 - (secondsInDay * 0),
+        ]);
+      });
+    });
+
+    describe('dateStringToDate', () => {
+      it('returns null if no input', () => {
+        assert.isNull(MrChart.dateStringToDate());
+      });
+
+      it('returns a new Date at EOD UTC', () => {
+        const actualDate = MrChart.dateStringToDate('2018-11-03');
+        const expectedDate = new Date(Date.UTC(2018, 10, 3, 23, 59, 59));
+        assert.equal(expectedDate.getTime(), 1541289599000, 'Sanity check.');
+
+        assert.equal(actualDate.getTime(), expectedDate.getTime());
+      });
+    });
+
+    describe('getEndDate', () => {
+      let clock;
+
+      beforeEach(() => {
+        clock = sinon.useFakeTimers(10000);
+      });
+
+      afterEach(() => {
+        clock.restore();
+      });
+
+      it('returns parsed input date', () => {
+        const input = '2018-11-03';
+
+        const expectedDate = new Date(Date.UTC(2018, 10, 3, 23, 59, 59));
+        // Time sanity check.
+        assert.equal(Math.round(expectedDate.getTime() / 1e3), 1541289599);
+
+        const actual = MrChart.getEndDate(input);
+        assert.equal(actual.getTime(), expectedDate.getTime());
+      });
+
+      it('returns EOD of current date by default', () => {
+        const expectedDate = new Date();
+        expectedDate.setHours(23);
+        expectedDate.setMinutes(59);
+        expectedDate.setSeconds(59);
+
+        assert.equal(MrChart.getEndDate().getTime(),
+            expectedDate.getTime());
+      });
+    });
+
+    describe('getStartDate', () => {
+      let clock;
+
+      beforeEach(() => {
+        clock = sinon.useFakeTimers(10000);
+      });
+
+      afterEach(() => {
+        clock.restore();
+      });
+
+      it('returns parsed input date', () => {
+        const input = '2018-07-03';
+
+        const expectedDate = new Date(Date.UTC(2018, 6, 3, 23, 59, 59));
+        // Time sanity check.
+        assert.equal(Math.round(expectedDate.getTime() / 1e3), 1530662399);
+
+        const actual = MrChart.getStartDate(input);
+        assert.equal(actual.getTime(), expectedDate.getTime());
+      });
+
+      it('returns EOD of current date by default', () => {
+        const today = new Date();
+        today.setHours(23);
+        today.setMinutes(59);
+        today.setSeconds(59);
+
+        const secondsInDay = 24 * 60 * 60;
+        const expectedDate = new Date(today.getTime() -
+            1000 * 90 * secondsInDay);
+        assert.equal(MrChart.getStartDate(undefined, today, 90).getTime(),
+            expectedDate.getTime());
+      });
+    });
+
+    describe('makeIndices', () => {
+      it('returns dates in mm/dd/yyy format', () => {
+        const timestamps = [
+          1540857599, 1540943999, 1541030399,
+          1541116799, 1541203199, 1541289599,
+        ];
+        assert.deepEqual(MrChart.makeIndices(timestamps), [
+          '10/29/2018', '10/30/2018', '10/31/2018',
+          '11/1/2018', '11/2/2018', '11/3/2018',
+        ]);
+      });
+    });
+
+    describe('getPredictedData', () => {
+      it('get predicted data shown in daily', () => {
+        const values = [0, 1, 2, 3, 4, 5, 6];
+        const result = MrChart.getPredictedData(
+            values, values.length, 3, 1, new Date('10-02-2017'));
+        assert.deepEqual(result[0], ['10/4/2017', '10/5/2017', '10/6/2017']);
+        assert.deepEqual(result[1], [7, 8, 9]);
+        assert.deepEqual(result[2], [0, 1, 2, 3, 4, 5, 6]);
+      });
+
+      it('get predicted data shown in weekly', () => {
+        const values = [0, 7, 14, 21, 28, 35, 42, 49, 56, 63, 70, 77, 84];
+        const result = MrChart.getPredictedData(
+            values, 91, 13, 7, new Date('10-02-2017'));
+        assert.deepEqual(result[1], values.map((x) => x+91));
+        assert.deepEqual(result[2], values);
+      });
+    });
+
+    describe('getErrorData', () => {
+      it('get error data with perfect regression', () => {
+        const values = [0, 1, 2, 3, 4, 5, 6];
+        const result = MrChart.getErrorData(values, values, [7, 8, 9]);
+        assert.deepEqual(result[0], [7, 8, 9]);
+        assert.deepEqual(result[1], [7, 8, 9]);
+      });
+
+      it('get error data with nonperfect regression', () => {
+        const values = [0, 1, 3, 4, 6, 6, 7];
+        const result = MrChart.getPredictedData(
+            values, values.length, 3, 1, new Date('10-02-2017'));
+        const error = MrChart.getErrorData(result[2], values, result[1]);
+        assert.isTrue(error[0][0] > result[1][0]);
+        assert.isTrue(error[1][0] < result[1][0]);
+      });
+    });
+
+    describe('getSortedLines', () => {
+      it('return all lines for less than n lines', () => {
+        const arrayValues = [
+          {label: 'line1', data: [0, 0, 1]},
+          {label: 'line2', data: [0, 1, 2]},
+          {label: 'line3', data: [0, 1, 0]},
+          {label: 'line4', data: [4, 0, 3]},
+        ];
+        const expectedValues = [
+          {label: 'line1', data: [0, 0, 1]},
+          {label: 'line2', data: [0, 1, 2]},
+          {label: 'line3', data: [0, 1, 0]},
+          {label: 'line4', data: [4, 0, 3]},
+        ];
+        const actualValues = MrChart.getSortedLines(arrayValues, 4);
+        for (let i = 0; i < 4; i++) {
+          assert.deepEqual(expectedValues[i], actualValues[i]);
+        }
+      });
+
+      it('return top n lines in sorted order for more than n lines',
+          () => {
+            const arrayValues = [
+              {label: 'line1', data: [0, 0, 1]},
+              {label: 'line2', data: [0, 1, 2]},
+              {label: 'line3', data: [0, 4, 0]},
+              {label: 'line4', data: [4, 0, 3]},
+              {label: 'line5', data: [0, 2, 3]},
+            ];
+            const expectedValues = [
+              {label: 'line5', data: [0, 2, 3]},
+              {label: 'line4', data: [4, 0, 3]},
+              {label: 'line2', data: [0, 1, 2]},
+            ];
+            const actualValues = MrChart.getSortedLines(arrayValues, 3);
+            for (let i = 0; i < 3; i++) {
+              assert.deepEqual(expectedValues[i], actualValues[i]);
+            }
+          });
+    });
+
+    describe('getGroupByFromQuery', () => {
+      it('get group by label object from URL', () => {
+        const input = {'groupby': 'label', 'labelprefix': 'Type'};
+
+        const expectedGroupBy = {
+          value: 'label',
+          labelPrefix: 'Type',
+          display: 'Type',
+        };
+        assert.deepEqual(MrChart.getGroupByFromQuery(input), expectedGroupBy);
+      });
+
+      it('get group by is open object from URL', () => {
+        const input = {'groupby': 'open'};
+
+        const expectedGroupBy = {value: 'open', display: 'Is open'};
+        assert.deepEqual(MrChart.getGroupByFromQuery(input), expectedGroupBy);
+      });
+
+      it('get group by none object from URL', () => {
+        const input = {'groupby': ''};
+
+        const expectedGroupBy = {value: '', display: 'None'};
+        assert.deepEqual(MrChart.getGroupByFromQuery(input), expectedGroupBy);
+      });
+
+      it('only returns valid groupBy values', () => {
+        const invalidKeys = ['pri', 'reporter', 'stars'];
+
+        const queryParams = {groupBy: ''};
+
+        invalidKeys.forEach((key) => {
+          queryParams.groupBy = key;
+          const expected = {value: '', display: 'None'};
+          const result = MrChart.getGroupByFromQuery(queryParams);
+          assert.deepEqual(result, expected);
+        });
+      });
+    });
+  });
+
+  describe('subscribedQuery', () => {
+    it('includes start and end date', () => {
+      assert.isTrue(subscribedQuery.has('start-date'));
+      assert.isTrue(subscribedQuery.has('start-date'));
+    });
+
+    it('includes groupby and labelprefix', () => {
+      assert.isTrue(subscribedQuery.has('groupby'));
+      assert.isTrue(subscribedQuery.has('labelprefix'));
+    });
+
+    it('includes q and can', () => {
+      assert.isTrue(subscribedQuery.has('q'));
+      assert.isTrue(subscribedQuery.has('can'));
+    });
+  });
+});
diff --git a/static_src/elements/issue-list/mr-grid-page/extract-grid-data.js b/static_src/elements/issue-list/mr-grid-page/extract-grid-data.js
new file mode 100644
index 0000000..ebfa510
--- /dev/null
+++ b/static_src/elements/issue-list/mr-grid-page/extract-grid-data.js
@@ -0,0 +1,203 @@
+// Copyright 2019 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.
+
+import {EMPTY_FIELD_VALUE, fieldTypes} from 'shared/issue-fields.js';
+import 'shared/typedef.js';
+
+
+const DEFAULT_HEADER_VALUE = 'All';
+
+// Sort headings functions
+// TODO(zhangtiff): Find some way to restructure this code to allow
+// sorting functions to sort with raw types instead of stringified values.
+
+/**
+ * Used as an optional 'compareFunction' for Array.sort().
+ * @param {string} strA
+ * @param {string} strB
+ * @return {number}
+ */
+function intStrComparator(strA, strB) {
+  return parseInt(strA) - parseInt(strB);
+}
+
+/**
+ * Used as an optional 'compareFunction' for Array.sort()
+ * @param {string} issueRefStrA
+ * @param {string} issueRefStrB
+ * @return {number}
+ */
+function issueRefComparator(issueRefStrA, issueRefStrB) {
+  const issueRefA = issueRefStrA.split(':');
+  const issueRefB = issueRefStrB.split(':');
+  if (issueRefA[0] != issueRefB[0]) {
+    return issueRefStrA.localeCompare(issueRefStrB);
+  } else {
+    return parseInt(issueRefA[1]) - parseInt(issueRefB[1]);
+  }
+}
+
+/**
+ * Returns a comparator for strings representing statuses using the ordering
+ * provided in statusDefs.
+ * Any status not found in statusDefs will be sorted to the end.
+ * @param {!Array<StatusDef>=} statusDefs
+ * @return {function(string, string): number}
+ */
+function getStatusDefComparator(statusDefs = []) {
+  return (statusStrA, statusStrB) => {
+    // Traverse statusDefs to determine which status is first.
+    for (const statusDef of statusDefs) {
+      if (statusDef.status == statusStrA) {
+        return -1;
+      } else if (statusDef.status == statusStrB) {
+        return 1;
+      }
+    }
+    return 0;
+  };
+}
+
+/**
+ * @param {!Set<string>} headingSet The headers found for the field.
+ * @param {string} fieldName The field on which we're sorting.
+ * @param {function(string): string=} extractTypeForFieldName
+ * @param {!Array<StatusDef>=} statusDefs
+ * @return {!Array<string>}
+ */
+function sortHeadings(headingSet, fieldName, extractTypeForFieldName,
+    statusDefs = []) {
+  let sorter;
+  if (extractTypeForFieldName) {
+    const type = extractTypeForFieldName(fieldName);
+    if (type === fieldTypes.ISSUE_TYPE) {
+      sorter = issueRefComparator;
+    } else if (type === fieldTypes.INT_TYPE) {
+      sorter = intStrComparator;
+    } else if (type === fieldTypes.STATUS_TYPE) {
+      sorter = getStatusDefComparator(statusDefs);
+    }
+  }
+
+  // Track whether EMPTY_FIELD_VALUE is present, and ensure that
+  // it is sorted to the first position of custom fields.
+  // TODO(jessan): although convenient, it is bad practice to mutate parameters.
+  const hasEmptyFieldValue = headingSet.delete(EMPTY_FIELD_VALUE);
+  const headingsList = [...headingSet];
+
+  headingsList.sort(sorter);
+
+  if (hasEmptyFieldValue) {
+    headingsList.unshift(EMPTY_FIELD_VALUE);
+  }
+  return headingsList;
+}
+
+/**
+ * @param {string} x Header value.
+ * @param {string} y Header value.
+ * @return {string} The key for the groupedIssue map.
+ * TODO(jessan): Make a GridData class, which avoids exposing this logic.
+ */
+export function makeGridCellKey(x, y) {
+  // Note: Some possible x and y values contain ':', '-', and other
+  // non-word characters making delimiter options limited.
+  return x + ' + ' + y;
+}
+
+/**
+ * @param {Issue} issue The issue for which we're preparing grid headings.
+ * @param {string} fieldName The field on which we're grouping.
+ * @param {function(Issue, string): Array<string>} extractFieldValuesFromIssue
+ * @return {!Array<string>} The headings the issue should be grouped into.
+ */
+function prepareHeadings(
+    issue, fieldName, extractFieldValuesFromIssue) {
+  const values = extractFieldValuesFromIssue(issue, fieldName);
+
+  return values.length == 0 ?
+     [EMPTY_FIELD_VALUE] :
+     values;
+}
+
+/**
+ * Groups issues by their values for the given fields.
+ * @param {Array<Issue>} required.issues The issues we are grouping
+ * @param {function(Issue, string): Array<string>}
+ *     required.extractFieldValuesFromIssue
+ * @param {string=} options.xFieldName name of the field for grouping columns
+ * @param {string=} options.yFieldName name of the field for grouping rows
+ * @param {function(string): string=} options.extractTypeForFieldName
+ * @param {Array=} options.statusDefs
+ * @param {Map=} options.labelPrefixValueMap
+ * @return {!Object} Grid data
+ *   - groupedIssues: A map of issues grouped by thir xField and yField values.
+ *   - xHeadings: sorted headings for columns.
+ *   - yHeadings: sorted headings for rows.
+ */
+export function extractGridData({issues, extractFieldValuesFromIssue}, {
+  xFieldName = '',
+  yFieldName = '',
+  extractTypeForFieldName = undefined,
+  statusDefs = [],
+  labelPrefixValueMap = new Map(),
+} = {}) {
+  const xHeadingsPredefinedSet = new Set();
+  const xHeadingsAdHocSet = new Set();
+  const yHeadingsSet = new Set();
+  const groupedIssues = new Map();
+  for (const issue of issues) {
+    const xHeadings = !xFieldName ?
+        [DEFAULT_HEADER_VALUE] :
+        prepareHeadings(
+            issue, xFieldName, extractFieldValuesFromIssue);
+    const yHeadings = !yFieldName ?
+        [DEFAULT_HEADER_VALUE] :
+        prepareHeadings(
+            issue, yFieldName, extractFieldValuesFromIssue);
+
+    // Find every combo of 'xValue yValue' that the issue belongs to
+    // and add it into that cell. Also record each header used.
+    for (const xHeading of xHeadings) {
+      if (labelPrefixValueMap.has(xFieldName) &&
+          labelPrefixValueMap.get(xFieldName).has(xHeading)) {
+        xHeadingsPredefinedSet.add(xHeading);
+      } else {
+        xHeadingsAdHocSet.add(xHeading);
+      }
+      for (const yHeading of yHeadings) {
+        yHeadingsSet.add(yHeading);
+        const cellKey = makeGridCellKey(xHeading, yHeading);
+        if (groupedIssues.has(cellKey)) {
+          groupedIssues.get(cellKey).push(issue);
+        } else {
+          groupedIssues.set(cellKey, [issue]);
+        }
+      }
+    }
+  }
+
+  // Predefined labels to be ordered in front of ad hoc labels
+  const xHeadings = [
+    ...sortHeadings(
+        xHeadingsPredefinedSet,
+        xFieldName,
+        extractTypeForFieldName,
+        statusDefs,
+    ),
+    ...sortHeadings(
+        xHeadingsAdHocSet,
+        xFieldName,
+        extractTypeForFieldName,
+        statusDefs,
+    ),
+  ];
+
+  return {
+    groupedIssues,
+    xHeadings,
+    yHeadings: sortHeadings(yHeadingsSet, yFieldName, extractTypeForFieldName,
+        statusDefs),
+  };
+}
diff --git a/static_src/elements/issue-list/mr-grid-page/extract-grid-data.test.js b/static_src/elements/issue-list/mr-grid-page/extract-grid-data.test.js
new file mode 100644
index 0000000..41d5c70
--- /dev/null
+++ b/static_src/elements/issue-list/mr-grid-page/extract-grid-data.test.js
@@ -0,0 +1,289 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {extractGridData} from './extract-grid-data.js';
+import {extractFieldValuesFromIssue as fieldExtractor,
+  extractTypeForFieldName as typeExtractor} from 'reducers/projectV0.js';
+
+const extractFieldValuesFromIssue = fieldExtractor({});
+const extractTypeForFieldName = typeExtractor({});
+
+
+describe('extract headings from x and y attributes', () => {
+  it('no attributes set', () => {
+    const issues = [
+      {'localId': 1, 'projectName': 'test'},
+      {'localId': 2, 'projectName': 'test'},
+    ];
+
+    const data = extractGridData({
+      issues,
+      extractFieldValuesFromIssue,
+    });
+
+    const expectedIssues = new Map([
+      ['All + All', [
+        {'localId': 1, 'projectName': 'test'},
+        {'localId': 2, 'projectName': 'test'},
+      ]],
+    ]);
+
+    assert.deepEqual(data.xHeadings, ['All']);
+    assert.deepEqual(data.yHeadings, ['All']);
+    assert.deepEqual(data.groupedIssues, expectedIssues);
+  });
+
+  it('extract headings from Attachments attribute', () => {
+    const issues = [
+      {'attachmentCount': 1}, {'attachmentCount': 0},
+      {'attachmentCount': 1},
+    ];
+
+    const data = extractGridData({issues, extractFieldValuesFromIssue},
+        {xFieldName: 'Attachments'});
+
+    const expectedIssues = new Map([
+      ['0 + All', [{'attachmentCount': 0}]],
+      ['1 + All', [{'attachmentCount': 1}, {'attachmentCount': 1}]],
+    ]);
+
+    assert.deepEqual(data.xHeadings, ['0', '1']);
+    assert.deepEqual(data.yHeadings, ['All']);
+    assert.deepEqual(data.groupedIssues, expectedIssues);
+  });
+
+  it('extract headings from Blocked attribute', () => {
+    const issues = [
+      {'blockedOnIssueRefs': [{'localId': 21}]},
+      {'otherIssueProperty': 'issueProperty'},
+    ];
+    const data = extractGridData({issues, extractFieldValuesFromIssue},
+        {xFieldName: 'Blocked', yFieldName: ''});
+
+    const expectedIssues = new Map();
+    expectedIssues.set('Yes + All',
+        [{'blockedOnIssueRefs': [{'localId': 21}]}]);
+    expectedIssues.set('No + All', [{'otherIssueProperty': 'issueProperty'}]);
+
+    assert.deepEqual(data.xHeadings, ['No', 'Yes']);
+    assert.deepEqual(data.yHeadings, ['All']);
+    assert.deepEqual(data.groupedIssues, expectedIssues);
+  });
+
+  it('extract headings from BlockedOn attribute', () => {
+    const issues = [
+      {'otherIssueProperty': 'issueProperty'},
+      {'blockedOnIssueRefs': [
+        {'localId': 3, 'projectName': 'test-projectB'}]},
+      {'blockedOnIssueRefs': [
+        {'localId': 3, 'projectName': 'test-projectA'}]},
+      {'blockedOnIssueRefs': [
+        {'localId': 3, 'projectName': 'test-projectA'}]},
+      {'blockedOnIssueRefs': [
+        {'localId': 1, 'projectName': 'test-projectA'}]},
+    ];
+
+    const data = extractGridData({issues, extractFieldValuesFromIssue},
+        {xFieldName: 'BlockedOn', yFieldName: ''});
+
+    const expectedIssues = new Map();
+    expectedIssues.set('test-projectB:3 + All', [{'blockedOnIssueRefs':
+      [{'localId': 3, 'projectName': 'test-projectB'}]}]);
+    expectedIssues.set('test-projectA:3 + All', [{'blockedOnIssueRefs':
+      [{'localId': 3, 'projectName': 'test-projectA'}]},
+    {'blockedOnIssueRefs':
+      [{'localId': 3, 'projectName': 'test-projectA'}]}]);
+    expectedIssues.set('test-projectA:1 + All', [{'blockedOnIssueRefs':
+      [{'localId': 1, 'projectName': 'test-projectA'}]}]);
+    expectedIssues.set('---- + All', [{'otherIssueProperty': 'issueProperty'}]);
+
+    assert.deepEqual(data.xHeadings, ['----', 'test-projectA:1',
+      'test-projectA:3', 'test-projectB:3']);
+    assert.deepEqual(data.yHeadings, ['All']);
+    assert.deepEqual(data.groupedIssues, expectedIssues);
+  });
+
+  it('extract headings from Blocking attribute', () => {
+    const issues = [
+      {'otherIssueProperty': 'issueProperty'},
+      {'blockingIssueRefs': [
+        {'localId': 1, 'projectName': 'test-projectA'}]},
+      {'blockingIssueRefs': [
+        {'localId': 1, 'projectName': 'test-projectA'}]},
+      {'blockingIssueRefs': [
+        {'localId': 3, 'projectName': 'test-projectA'}]},
+      {'blockingIssueRefs': [
+        {'localId': 3, 'projectName': 'test-projectB'}]},
+    ];
+    const data = extractGridData({issues, extractFieldValuesFromIssue},
+        {xFieldName: 'Blocking', yFieldName: ''});
+
+    const expectedIssues = new Map();
+    expectedIssues.set('test-projectA:1 + All', [{'blockingIssueRefs':
+      [{'localId': 1, 'projectName': 'test-projectA'}]},
+    {'blockingIssueRefs':
+      [{'localId': 1, 'projectName': 'test-projectA'}]}]);
+    expectedIssues.set('test-projectA:3 + All', [{'blockingIssueRefs':
+      [{'localId': 3, 'projectName': 'test-projectA'}]}]);
+    expectedIssues.set('test-projectB:3 + All', [{'blockingIssueRefs':
+      [{'localId': 3, 'projectName': 'test-projectB'}]}]);
+    expectedIssues.set('---- + All', [{'otherIssueProperty': 'issueProperty'}]);
+
+    assert.deepEqual(data.xHeadings, ['----', 'test-projectA:1',
+      'test-projectA:3', 'test-projectB:3']);
+    assert.deepEqual(data.yHeadings, ['All']);
+    assert.deepEqual(data.groupedIssues, expectedIssues);
+  });
+
+  it('extract headings from Component attribute', () => {
+    const issues = [
+      {'otherIssueProperty': 'issueProperty'},
+      {'componentRefs': [{'path': 'UI'}]},
+      {'componentRefs': [{'path': 'API'}]},
+      {'componentRefs': [{'path': 'UI'}]},
+    ];
+    const data = extractGridData({issues, extractFieldValuesFromIssue},
+        {xFieldName: 'Component', yFieldName: ''});
+
+    const expectedIssues = new Map();
+    expectedIssues.set('UI + All', [{'componentRefs': [{'path': 'UI'}]},
+      {'componentRefs': [{'path': 'UI'}]}]);
+    expectedIssues.set('API + All', [{'componentRefs': [{'path': 'API'}]}]);
+    expectedIssues.set('---- + All', [{'otherIssueProperty': 'issueProperty'}]);
+
+    assert.deepEqual(data.xHeadings, ['----', 'API', 'UI']);
+    assert.deepEqual(data.yHeadings, ['All']);
+    assert.deepEqual(data.groupedIssues, expectedIssues);
+  });
+
+  it('extract headings from Reporter attribute', () => {
+    const issues = [
+      {'reporterRef': {'displayName': 'testA@google.com'}},
+      {'reporterRef': {'displayName': 'testB@google.com'}},
+    ];
+    const data = extractGridData({issues, extractFieldValuesFromIssue},
+        {xFieldName: '', yFieldName: 'Reporter'});
+
+    const expectedIssues = new Map();
+    expectedIssues.set('All + testA@google.com',
+        [{'reporterRef': {'displayName': 'testA@google.com'}}]);
+    expectedIssues.set('All + testB@google.com',
+        [{'reporterRef': {'displayName': 'testB@google.com'}}]);
+
+    assert.deepEqual(data.xHeadings, ['All']);
+    assert.deepEqual(data.yHeadings, ['testA@google.com', 'testB@google.com']);
+    assert.deepEqual(data.groupedIssues, expectedIssues);
+  });
+
+  it('extract headings from Stars attribute', () => {
+    const issues = [
+      {'starCount': 1}, {'starCount': 6}, {'starCount': 1},
+    ];
+    const data = extractGridData({issues, extractFieldValuesFromIssue},
+        {xFieldName: '', yFieldName: 'Stars'});
+
+    const expectedIssues = new Map();
+    expectedIssues.set('All + 1', [{'starCount': 1}, {'starCount': 1}]);
+    expectedIssues.set('All + 6', [{'starCount': 6}]);
+
+    assert.deepEqual(data.xHeadings, ['All']);
+    assert.deepEqual(data.yHeadings, ['1', '6']);
+    assert.deepEqual(data.groupedIssues, expectedIssues);
+  });
+
+  it('extract headings from Status in order of statusDefs provided', () => {
+    const issues = [
+      {'statusRef': {'status': 'New'}},
+      {'statusRef': {'status': '1Unknown'}},
+      {'statusRef': {'status': 'Accepted'}},
+      {'statusRef': {'status': 'New'}},
+      {'statusRef': {'status': 'UltraNew'}},
+    ];
+    const statusDefs = [
+      {status: 'UltraNew'}, {status: 'New'}, {status: 'Unused'},
+      {status: 'Accepted'},
+    ];
+
+    const data = extractGridData({issues, extractFieldValuesFromIssue},
+        {yFieldName: 'Status', extractTypeForFieldName, statusDefs});
+
+    const expectedIssues = new Map();
+    expectedIssues.set(
+        'All + Accepted', [{'statusRef': {'status': 'Accepted'}}]);
+    expectedIssues.set(
+        'All + New',
+        [{'statusRef': {'status': 'New'}}, {'statusRef': {'status': 'New'}}]);
+    expectedIssues.set(
+        'All + UltraNew', [{'statusRef': {'status': 'UltraNew'}}]);
+    expectedIssues.set(
+        'All + 1Unknown', [{'statusRef': {'status': '1Unknown'}}]);
+    assert.deepEqual(data.xHeadings, ['All']);
+    assert.deepEqual(
+        data.yHeadings, ['UltraNew', 'New', 'Accepted', '1Unknown']);
+    assert.deepEqual(data.groupedIssues, expectedIssues);
+  });
+
+  it('extract headings from the Type attribute', () => {
+    const issues = [
+      {'labelRefs': [{'label': 'Pri-2'}, {'label': 'Milestone-2000Q1'}]},
+      {'labelRefs': [{'label': 'Type-Defect'}]},
+      {'labelRefs': [{'label': 'Type-Defect'}]},
+      {'labelRefs': [{'label': 'Type-Enhancement'}]},
+    ];
+    const data = extractGridData({issues, extractFieldValuesFromIssue},
+        {yFieldName: 'Type'});
+
+    const expectedIssues = new Map();
+    expectedIssues.set('All + Defect', [
+      {'labelRefs': [{'label': 'Type-Defect'}]},
+      {'labelRefs': [{'label': 'Type-Defect'}]},
+    ]);
+    expectedIssues.set('All + Enhancement', [{'labelRefs':
+      [{'label': 'Type-Enhancement'}]}]);
+    expectedIssues.set('All + ----', [{'labelRefs':
+      [{'label': 'Pri-2'}, {'label': 'Milestone-2000Q1'}]}]);
+
+    assert.deepEqual(data.xHeadings, ['All']);
+    assert.deepEqual(data.yHeadings, ['----', 'Defect', 'Enhancement']);
+    assert.deepEqual(data.groupedIssues, expectedIssues);
+  });
+
+  it('puts predefined labels ahead of ad hoc labels', () => {
+    const issues = [
+      {'labelRefs': [{'label': 'Pri-2'}, {'label': 'Type-Defect'}]},
+      {'labelRefs': [{'label': 'Type-Defect'}]},
+      {'labelRefs': [{'label': 'Type-Enhancement'}]},
+      {'labelRefs': [{'label': 'Type-AAA'}]},
+    ];
+    const labelPrefixValueMap = new Map([
+      ['Pri', new Set(['2'])],
+      ['Type', new Set(['Defect', 'Enhancement'])],
+    ]);
+
+    const data = extractGridData({issues, extractFieldValuesFromIssue},
+        {xFieldName: 'Type', yFieldName: 'Pri', labelPrefixValueMap});
+
+    assert.deepEqual(data.xHeadings, ['Defect', 'Enhancement', 'AAA']);
+    assert.deepEqual(data.yHeadings, ['----', '2']);
+  });
+
+  it('has priority order of predefined, empty, then ad hoc labels', () => {
+    const issues = [
+      {'labelRefs': [{'label': 'Pri-2'}, {'label': 'Milestone-2000Q1'}]},
+      {'labelRefs': [{'label': 'Type-Defect'}]},
+      {'labelRefs': [{'label': 'Type-Enhancement'}]},
+      {'labelRefs': [{'label': 'Type-AAA'}]},
+    ];
+    const labelPrefixValueMap = new Map([
+      ['Pri', new Set(['2'])],
+      ['Type', new Set(['Defect', 'Enhancement'])],
+    ]);
+
+    const data = extractGridData({issues, extractFieldValuesFromIssue},
+        {xFieldName: 'Type', yFieldName: 'Pri', labelPrefixValueMap});
+
+    assert.deepEqual(data.xHeadings, ['Defect', 'Enhancement', '----', 'AAA']);
+  });
+});
diff --git a/static_src/elements/issue-list/mr-grid-page/mr-grid-controls.js b/static_src/elements/issue-list/mr-grid-page/mr-grid-controls.js
new file mode 100644
index 0000000..2fe01ea
--- /dev/null
+++ b/static_src/elements/issue-list/mr-grid-page/mr-grid-controls.js
@@ -0,0 +1,255 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import page from 'page';
+import {connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import 'elements/chops/chops-choice-buttons/chops-choice-buttons.js';
+import '../mr-mode-selector/mr-mode-selector.js';
+import './mr-grid-dropdown.js';
+import {SERVER_LIST_ISSUES_LIMIT} from 'shared/consts/index.js';
+import {urlWithNewParams} from 'shared/helpers.js';
+import {fieldsForIssue} from 'shared/issue-fields.js';
+
+// A list of the valid default field names available in an issue grid.
+// High cardinality fields must be excluded, so the grid only includes a subset
+// of AVAILABLE FIELDS.
+export const DEFAULT_GRID_FIELDS = Object.freeze([
+  'Project',
+  'Attachments',
+  'Blocked',
+  'BlockedOn',
+  'Blocking',
+  'Component',
+  'MergedInto',
+  'Reporter',
+  'Stars',
+  'Status',
+  'Type',
+  'Owner',
+]);
+
+/**
+ * Component for displaying the controls shown on the Monorail issue grid page.
+ * @extends {LitElement}
+ */
+export class MrGridControls extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        box-sizing: border-box;
+        margin: 0.5em 0;
+        height: 32px;
+      }
+      mr-grid-dropdown {
+        padding-right: 20px;
+      }
+      .left-controls {
+        display: flex;
+        align-items: center;
+        justify-content: flex-start;
+        flex-grow: 0;
+      }
+      .right-controls {
+        display: flex;
+        align-items: center;
+        flex-grow: 0;
+      }
+      .issue-count {
+        display: inline-block;
+        padding-right: 20px;
+      }
+    `;
+  };
+
+  /** @override */
+  render() {
+    const hideCounts = this.totalIssues === 0;
+    return html`
+      <div class="left-controls">
+        <mr-grid-dropdown
+          class="row-selector"
+          .text=${'Rows'}
+          .items=${this.gridOptions}
+          .selection=${this.queryParams.y}
+          @change=${this._rowChanged}>
+        </mr-grid-dropdown>
+        <mr-grid-dropdown
+          class="col-selector"
+          .text=${'Cols'}
+          .items=${this.gridOptions}
+          .selection=${this.queryParams.x}
+          @change=${this._colChanged}>
+        </mr-grid-dropdown>
+        <chops-choice-buttons
+          class="cell-selector"
+          .options=${this.cellOptions}
+          .value=${this.cellType}>
+        </chops-choice-buttons>
+      </div>
+      <div class="right-controls">
+        ${hideCounts ? '' : html`
+          <div class="issue-count">
+            ${this.issueCount}
+            of
+            ${this.totalIssuesDisplay}
+          </div>
+        `}
+        <mr-mode-selector
+          .projectName=${this.projectName}
+          .queryParams=${this.queryParams}
+          value="grid"
+        ></mr-mode-selector>
+      </div>
+    `;
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.gridOptions = this._computeGridOptions([]);
+    this.queryParams = {};
+
+    this.totalIssues = 0;
+
+    this._page = page;
+  };
+
+  /** @override */
+  static get properties() {
+    return {
+      gridOptions: {type: Array},
+      projectName: {tupe: String},
+      queryParams: {type: Object},
+      issueCount: {type: Number},
+      totalIssues: {type: Number},
+      _issues: {type: Array},
+    };
+  };
+
+  /** @override */
+  stateChanged(state) {
+    this.totalIssues = issueV0.totalIssues(state) || 0;
+    this._issues = issueV0.issueList(state) || [];
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('_issues')) {
+      this.gridOptions = this._computeGridOptions(this._issues);
+    }
+    super.update(changedProperties);
+  }
+
+  /**
+   * Gets what issue filtering options exist on the grid view.
+   * @param {Array<Issue>} issues The issues to find values on.
+   * @param {Array<string>=} defaultFields Available built in fields.
+   * @return {Array<string>} Array of names of fields you can filter by.
+   */
+  _computeGridOptions(issues, defaultFields = DEFAULT_GRID_FIELDS) {
+    const availableFields = new Set(defaultFields);
+    issues.forEach((issue) => {
+      fieldsForIssue(issue, true).forEach((field) => {
+        availableFields.add(field);
+      });
+    });
+    const options = [...availableFields].sort();
+    options.unshift('None');
+    return options;
+  }
+
+  /**
+   * @return {string} Display text of total issue number.
+   */
+  get totalIssuesDisplay() {
+    if (this.issueCount === 1) {
+      return `${this.issueCount} issue shown`;
+    } else if (this.issueCount === SERVER_LIST_ISSUES_LIMIT) {
+      // Server has hard limit up to 100,000 list results
+      return `100,000+ issues shown`;
+    }
+    return `${this.issueCount} issues shown`;
+  }
+
+  /**
+   * @return {string} What cell mode the user has selected.
+   * ie: Tiles, IDs, Counts
+   */
+  get cellType() {
+    const cells = this.queryParams.cells;
+    return cells || 'tiles';
+  }
+
+  /**
+   * @return {Array<Object>} Cell options available to the user, formatted for
+   *   <mr-mode-selector>
+   */
+  get cellOptions() {
+    return [
+      {text: 'Tile', value: 'tiles',
+        url: this._updatedGridViewUrl({}, ['cells'])},
+      {text: 'IDs', value: 'ids',
+        url: this._updatedGridViewUrl({cells: 'ids'})},
+      {text: 'Counts', value: 'counts',
+        url: this._updatedGridViewUrl({cells: 'counts'})},
+    ];
+  }
+
+  /**
+   * Changes the URL parameters on the page in response to a user changing
+   * their row setting.
+   * @param {Event} e 'change' event fired by <mr-grid-dropdown>
+   */
+  _rowChanged(e) {
+    const y = e.target.selection;
+    let deletedParams;
+    if (y === 'None') {
+      deletedParams = ['y'];
+    }
+    this._changeUrlParams({y}, deletedParams);
+  }
+
+  /**
+   * Changes the URL parameters on the page in response to a user changing
+   * their col setting.
+   * @param {Event} e 'change' event fired by <mr-grid-dropdown>
+   */
+  _colChanged(e) {
+    const x = e.target.selection;
+    let deletedParams;
+    if (x === 'None') {
+      deletedParams = ['x'];
+    }
+    this._changeUrlParams({x}, deletedParams);
+  }
+
+  /**
+   * Helper method to update URL params with a new grid view URL.
+   * @param {Array<Object>} newParams
+   * @param {Array<string>} deletedParams
+   */
+  _changeUrlParams(newParams, deletedParams) {
+    const newUrl = this._updatedGridViewUrl(newParams, deletedParams);
+    this._page(newUrl);
+  }
+
+  /**
+   * Helper to generate a new grid view URL given a set of params.
+   * @param {Array<Object>} newParams
+   * @param {Array<string>} deletedParams
+   * @return {string} The generated URL.
+   */
+  _updatedGridViewUrl(newParams, deletedParams) {
+    return urlWithNewParams(`/p/${this.projectName}/issues/list`,
+        this.queryParams, newParams, deletedParams);
+  }
+};
+
+customElements.define('mr-grid-controls', MrGridControls);
diff --git a/static_src/elements/issue-list/mr-grid-page/mr-grid-controls.test.js b/static_src/elements/issue-list/mr-grid-page/mr-grid-controls.test.js
new file mode 100644
index 0000000..d6d7fbf
--- /dev/null
+++ b/static_src/elements/issue-list/mr-grid-page/mr-grid-controls.test.js
@@ -0,0 +1,111 @@
+// Copyright 2019 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.
+
+import sinon from 'sinon';
+import {assert} from 'chai';
+import {MrGridControls} from './mr-grid-controls.js';
+import {SERVER_LIST_ISSUES_LIMIT} from 'shared/consts/index.js';
+
+let element;
+
+describe('mr-grid-controls', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-grid-controls');
+    document.body.appendChild(element);
+
+    element._page = sinon.stub();
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrGridControls);
+  });
+
+  it('selecting row updates y param', async () => {
+    const stub = sinon.stub(element, '_changeUrlParams');
+
+    await element.updateComplete;
+
+    const dropdownRows = element.shadowRoot.querySelector('.row-selector');
+
+    dropdownRows.selection = 'Status';
+    dropdownRows.dispatchEvent(new Event('change'));
+    sinon.assert.calledWith(stub, {y: 'Status'});
+  });
+
+  it('setting row to None deletes y param', async () => {
+    element.queryParams = {y: 'Remove', x: 'Keep'};
+    element.projectName = 'chromium';
+
+    await element.updateComplete;
+
+    const dropdownRows = element.shadowRoot.querySelector('.row-selector');
+
+    dropdownRows.selection = 'None';
+    dropdownRows.dispatchEvent(new Event('change'));
+
+    sinon.assert.calledWith(element._page,
+        '/p/chromium/issues/list?x=Keep');
+  });
+
+  it('selecting col updates x param', async () => {
+    const stub = sinon.stub(element, '_changeUrlParams');
+    await element.updateComplete;
+
+    const dropdownCols = element.shadowRoot.querySelector('.col-selector');
+
+    dropdownCols.selection = 'Blocking';
+    dropdownCols.dispatchEvent(new Event('change'));
+    sinon.assert.calledWith(stub, {x: 'Blocking'});
+  });
+
+  it('setting col to None deletes x param', async () => {
+    element.queryParams = {y: 'Keep', x: 'Remove'};
+    element.projectName = 'chromium';
+
+    await element.updateComplete;
+
+    const dropdownCols = element.shadowRoot.querySelector('.col-selector');
+
+    dropdownCols.selection = 'None';
+    dropdownCols.dispatchEvent(new Event('change'));
+
+    sinon.assert.calledWith(element._page,
+        '/p/chromium/issues/list?y=Keep');
+  });
+
+  it('cellOptions computes URLs with queryParams and projectName', async () => {
+    element.projectName = 'chromium';
+    element.queryParams = {q: 'hello-world'};
+
+    assert.deepEqual(element.cellOptions, [
+      {text: 'Tile', value: 'tiles',
+        url: '/p/chromium/issues/list?q=hello-world'},
+      {text: 'IDs', value: 'ids',
+        url: '/p/chromium/issues/list?q=hello-world&cells=ids'},
+      {text: 'Counts', value: 'counts',
+        url: '/p/chromium/issues/list?q=hello-world&cells=counts'},
+    ]);
+  });
+
+  describe('displays appropriate messaging for issue count', () => {
+    it('for one issue', () => {
+      element.issueCount = 1;
+      assert.equal(element.totalIssuesDisplay, '1 issue shown');
+    });
+
+    it('for less than 100,000 issues', () => {
+      element.issueCount = 50;
+      assert.equal(element.totalIssuesDisplay, '50 issues shown');
+    });
+
+    it('for 100,000 issues or more', () => {
+      element.issueCount = SERVER_LIST_ISSUES_LIMIT;
+      assert.equal(element.totalIssuesDisplay, '100,000+ issues shown');
+    });
+  });
+});
diff --git a/static_src/elements/issue-list/mr-grid-page/mr-grid-dropdown.js b/static_src/elements/issue-list/mr-grid-page/mr-grid-dropdown.js
new file mode 100644
index 0000000..2fc05b6
--- /dev/null
+++ b/static_src/elements/issue-list/mr-grid-page/mr-grid-dropdown.js
@@ -0,0 +1,72 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import {equalsIgnoreCase} from 'shared/helpers.js';
+
+/**
+ * `<mr-grid-dropdown>`
+ *
+ * Component used by the user to select what grid options to use.
+ */
+export class MrGridDropdown extends LitElement {
+  /** @override */
+  render() {
+    return html`
+      ${this.text}:
+      <select
+        class="drop-down"
+        @change=${this._optionChanged}
+      >
+        ${(this.items).map((item) => html`
+          <option .selected=${equalsIgnoreCase(item, this.selection)}>
+            ${item}
+          </option>
+        `)}
+      </select>
+      `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      text: {type: String},
+      items: {type: Array},
+      selection: {type: String},
+    };
+  };
+
+  /** @override */
+  constructor() {
+    super();
+    this.items = [];
+    this.selection = 'None';
+  };
+
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        font-size: var(--chops-large-font-size);
+      }
+      .drop-down {
+        font-size: var(--chops-large-font-size);
+      }
+    `;
+  };
+
+  /**
+   * Syncs values when the user updates their selection.
+   * @param {Event} e
+   * @fires CustomEvent#change
+   * @private
+   */
+  _optionChanged(e) {
+    this.selection = e.target.value;
+    this.dispatchEvent(new CustomEvent('change'));
+  };
+};
+
+customElements.define('mr-grid-dropdown', MrGridDropdown);
+
diff --git a/static_src/elements/issue-list/mr-grid-page/mr-grid-dropdown.test.js b/static_src/elements/issue-list/mr-grid-page/mr-grid-dropdown.test.js
new file mode 100644
index 0000000..fcd480d
--- /dev/null
+++ b/static_src/elements/issue-list/mr-grid-page/mr-grid-dropdown.test.js
@@ -0,0 +1,22 @@
+// Copyright 2019 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.
+import {assert} from 'chai';
+import {MrGridDropdown} from './mr-grid-dropdown.js';
+
+let element;
+
+describe('mr-grid-dropdown', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-grid-dropdown');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrGridDropdown);
+  });
+});
diff --git a/static_src/elements/issue-list/mr-grid-page/mr-grid-page.js b/static_src/elements/issue-list/mr-grid-page/mr-grid-page.js
new file mode 100644
index 0000000..d96e566
--- /dev/null
+++ b/static_src/elements/issue-list/mr-grid-page/mr-grid-page.js
@@ -0,0 +1,180 @@
+// Copyright 2019 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.
+
+// TODO(juliacordero): Handle pRPC errors with a FE page
+
+import {LitElement, html, css} from 'lit-element';
+import {store, connectStore} from 'reducers/base.js';
+import {shouldWaitForDefaultQuery} from 'shared/helpers.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as sitewide from 'reducers/sitewide.js';
+import 'elements/framework/links/mr-issue-link/mr-issue-link.js';
+import './mr-grid-controls.js';
+import './mr-grid.js';
+
+/**
+ * <mr-grid-page>
+ *
+ * Grid page view containing mr-grid and mr-grid-controls.
+ * @extends {LitElement}
+ */
+export class MrGridPage extends connectStore(LitElement) {
+  /** @override */
+  render() {
+    const displayedProgress = this.progress || 0.02;
+    const doneLoading = this.progress === 1;
+    const noMatches = this.totalIssues === 0 && doneLoading;
+    return html`
+      <div id="grid-area">
+        <mr-grid-controls
+          .projectName=${this.projectName}
+          .queryParams=${this._queryParams}
+          .issueCount=${this.issues.length}>
+        </mr-grid-controls>
+        ${noMatches ? html`
+          <div class="empty-search">
+            Your search did not generate any results.
+          </div>` : html`
+          <progress
+            title="${Math.round(displayedProgress * 100)}%"
+            value=${displayedProgress}
+            ?hidden=${doneLoading}
+          ></progress>`}
+        <br>
+        <mr-grid
+          .issues=${this.issues}
+          .xField=${this._queryParams.x}
+          .yField=${this._queryParams.y}
+          .cellMode=${this._queryParams.cells ? this._queryParams.cells : 'tiles'}
+          .queryParams=${this._queryParams}
+          .projectName=${this.projectName}
+        ></mr-grid>
+      </div>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      projectName: {type: String},
+      _queryParams: {type: Object},
+      userDisplayName: {type: String},
+      issues: {type: Array},
+      fields: {type: Array},
+      progress: {type: Number},
+      totalIssues: {type: Number},
+      _presentationConfigLoaded: {type: Boolean},
+      /**
+       * The current search string the user is querying for.
+       * Project default if not specified.
+       */
+      _currentQuery: {type: String},
+      /**
+       * The current canned query the user is searching for.
+       * Project default if not specified.
+       */
+      _currentCan: {type: String},
+    };
+  };
+
+  /** @override */
+  constructor() {
+    super();
+    this.issues = [];
+    this.progress = 0;
+    /** @type {string} */
+    this.projectName;
+    this._queryParams = {};
+    this._presentationConfigLoaded = false;
+  };
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('userDisplayName')) {
+      store.dispatch(issueV0.fetchStarredIssues());
+    }
+    // TODO(zosha): Abort sets of calls to ListIssues when
+    // queryParams.q is changed.
+    if (this._shouldFetchMatchingIssues(changedProperties)) {
+      this._fetchMatchingIssues();
+    }
+  }
+
+  /**
+   * Computes whether to fetch matching issues based on changedProperties
+   * @param {Map} changedProperties
+   * @return {boolean}
+   */
+  _shouldFetchMatchingIssues(changedProperties) {
+    const wait = shouldWaitForDefaultQuery(this._queryParams);
+    if (wait && !this._presentationConfigLoaded) {
+      return false;
+    } else if (wait && this._presentationConfigLoaded &&
+        changedProperties.has('_presentationConfigLoaded')) {
+      return true;
+    } else if (changedProperties.has('projectName') ||
+        changedProperties.has('_currentQuery') ||
+        changedProperties.has('_currentCan')) {
+      return true;
+    }
+    return false;
+  }
+
+  /** @private */
+  _fetchMatchingIssues() {
+    store.dispatch(issueV0.fetchIssueList(this.projectName, {
+      ...this._queryParams,
+      q: this._currentQuery,
+      can: this._currentCan,
+      maxItems: 500, // 500 items * 12 calls = max of 6,000 issues.
+      maxCalls: 12,
+    }));
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.projectName = projectV0.viewedProjectName(state);
+    this.issues = (issueV0.issueList(state) || []);
+    this.progress = (issueV0.issueListProgress(state) || 0);
+    this.totalIssues = (issueV0.totalIssues(state) || 0);
+    this._queryParams = sitewide.queryParams(state);
+    this._currentQuery = sitewide.currentQuery(state);
+    this._currentCan = sitewide.currentCan(state);
+    this._presentationConfigLoaded =
+      projectV0.viewedPresentationConfigLoaded(state);
+  }
+
+  /** @override */
+  static get styles() {
+    return css `
+      :host {
+        display: block;
+        box-sizing: border-box;
+        width: 100%;
+        padding: 0.5em 8px;
+      }
+      progress {
+        background-color: var(--chops-white);
+        border: 1px solid var(--chops-gray-500);
+        width: 40%;
+        margin-left: 1%;
+        margin-top: 0.5em;
+        visibility: visible;
+      }
+      ::-webkit-progress-bar {
+        background-color: var(--chops-white);
+      }
+      progress::-webkit-progress-value {
+        transition: width 1s;
+        background-color: var(--chops-blue-700);
+      }
+      .empty-search {
+        text-align: center;
+        padding-top: 2em;
+      }
+    `;
+  }
+};
+customElements.define('mr-grid-page', MrGridPage);
diff --git a/static_src/elements/issue-list/mr-grid-page/mr-grid-page.test.js b/static_src/elements/issue-list/mr-grid-page/mr-grid-page.test.js
new file mode 100644
index 0000000..241091b
--- /dev/null
+++ b/static_src/elements/issue-list/mr-grid-page/mr-grid-page.test.js
@@ -0,0 +1,126 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {MrGridPage} from './mr-grid-page.js';
+
+let element;
+
+describe('mr-grid-page', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-grid-page');
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrGridPage);
+  });
+
+  it('progress bar updates properly', async () => {
+    await element.updateComplete;
+    element.progress = .2499;
+    await element.updateComplete;
+    const title =
+      element.shadowRoot.querySelector('progress').getAttribute('title');
+    assert.equal(title, '25%');
+  });
+
+  it('displays error when no issues match query', async () => {
+    await element.updateComplete;
+    element.progress = 1;
+    element.totalIssues = 0;
+    await element.updateComplete;
+    const error =
+      element.shadowRoot.querySelector('.empty-search').textContent;
+    assert.equal(error.trim(), 'Your search did not generate any results.');
+  });
+
+  it('calls to fetchIssueList made when _currentQuery changes', async () => {
+    await element.updateComplete;
+    const issueListCall = sinon.stub(element, '_fetchMatchingIssues');
+    element._queryParams = {x: 'Blocked'};
+    await element.updateComplete;
+    sinon.assert.notCalled(issueListCall);
+
+    element._presentationConfigLoaded = true;
+    element._currentQuery = 'cc:me';
+    await element.updateComplete;
+    sinon.assert.calledOnce(issueListCall);
+  });
+
+  it('calls to fetchIssueList made when _currentCan changes', async () => {
+    await element.updateComplete;
+    const issueListCall = sinon.stub(element, '_fetchMatchingIssues');
+    element._queryParams = {y: 'Blocked'};
+    await element.updateComplete;
+    sinon.assert.notCalled(issueListCall);
+
+    element._presentationConfigLoaded = true;
+    element._currentCan = 1;
+    await element.updateComplete;
+    sinon.assert.calledOnce(issueListCall);
+  });
+
+  describe('_shouldFetchMatchingIssues', () => {
+    it('default returns false', () => {
+      const result = element._shouldFetchMatchingIssues(new Map());
+      assert.isFalse(result);
+    });
+
+    it('returns true for projectName', () => {
+      element._queryParams = {q: ''};
+      const changedProps = new Map();
+      changedProps.set('projectName', 'anything');
+      const result = element._shouldFetchMatchingIssues(changedProps);
+      assert.isTrue(result);
+    });
+
+    it('returns true when _currentQuery changes', () => {
+      element._presentationConfigLoaded = true;
+
+      element._currentQuery = 'owner:me';
+      const changedProps = new Map();
+      changedProps.set('_currentQuery', '');
+
+      const result = element._shouldFetchMatchingIssues(changedProps);
+      assert.isTrue(result);
+    });
+
+    it('returns true when _currentCan changes', () => {
+      element._presentationConfigLoaded = true;
+
+      element._currentCan = 1;
+      const changedProps = new Map();
+      changedProps.set('_currentCan', 2);
+
+      const result = element._shouldFetchMatchingIssues(changedProps);
+      assert.isTrue(result);
+    });
+
+    it('returns false when presentation config not loaded', () => {
+      element._presentationConfigLoaded = false;
+
+      const changedProps = new Map();
+      changedProps.set('projectName', 'anything');
+      const result = element._shouldFetchMatchingIssues(changedProps);
+
+      assert.isFalse(result);
+    });
+
+    it('returns true when presentationConfig fetch completes', () => {
+      element._presentationConfigLoaded = true;
+
+      const changedProps = new Map();
+      changedProps.set('_presentationConfigLoaded', false);
+      const result = element._shouldFetchMatchingIssues(changedProps);
+
+      assert.isTrue(result);
+    });
+  });
+});
diff --git a/static_src/elements/issue-list/mr-grid-page/mr-grid-tile.js b/static_src/elements/issue-list/mr-grid-page/mr-grid-tile.js
new file mode 100644
index 0000000..57ee474
--- /dev/null
+++ b/static_src/elements/issue-list/mr-grid-page/mr-grid-tile.js
@@ -0,0 +1,114 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import {issueRefToUrl, issueToIssueRef} from 'shared/convertersV0.js';
+import '../../framework/mr-star/mr-issue-star.js';
+
+/**
+ * Element for rendering a single tile in the grid view.
+ */
+export class MrGridTile extends LitElement {
+  /** @override */
+  render() {
+    return html`
+      <div class="tile-header">
+        <mr-issue-star
+          .issueRef=${this.issueRef}
+        ></mr-issue-star>
+        <a class="issue-id" href=${issueRefToUrl(this.issue, this.queryParams)}>
+          ${this.issue.localId}
+        </a>
+        <div class="status">
+          ${this.issue.statusRef ? this.issue.statusRef.status : ''}
+        </div>
+      </div>
+      <div class="summary">
+        ${this.issue.summary || ''}
+      </div>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      issue: {type: Object},
+      issueRef: {type: Object},
+      queryParams: {type: Object},
+    };
+  };
+
+  /** @override */
+  constructor() {
+    super();
+    this.issue = {};
+    this.queryParams = '';
+  };
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('issue')) {
+      this.issueRef = issueToIssueRef(this.issue);
+    }
+    super.update(changedProperties);
+  }
+
+  /** @override */
+  static get styles() {
+    return css`
+      :host {
+        display: block;
+        border: 2px solid var(--chops-gray-200);
+        border-radius: 6px;
+        padding: 1px;
+        margin: 3px;
+        background: var(--chops-white);
+        width: 10em;
+        height: 5em;
+        float: left;
+        table-layout: fixed;
+        overflow: hidden;
+      }
+      :host(:hover) {
+        border-color: var(--chops-blue-100);
+      }
+      .tile-header {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 100%;
+        margin-bottom: 0.1em;
+      }
+      mr-issue-star {
+        --mr-star-size: 16px;
+      }
+      a.issue-id {
+        font-weight: 500;
+        text-decoration: none;
+        display: inline-block;
+        padding-left: .25em;
+        color: var(--chops-blue-700);
+      }
+      .status {
+        display: inline-block;
+        font-size: 90%;
+        max-width: 30%;
+        white-space: nowrap;
+        padding-left: 4px;
+      }
+      .summary {
+        height: 3.7em;
+        font-size: 90%;
+        line-height: 94%;
+        padding: .05px .25em .05px .25em;
+        position: relative;
+      }
+      a:hover {
+        text-decoration: underline;
+      }
+    `;
+  };
+};
+
+customElements.define('mr-grid-tile', MrGridTile);
diff --git a/static_src/elements/issue-list/mr-grid-page/mr-grid-tile.test.js b/static_src/elements/issue-list/mr-grid-page/mr-grid-tile.test.js
new file mode 100644
index 0000000..c9577c6
--- /dev/null
+++ b/static_src/elements/issue-list/mr-grid-page/mr-grid-tile.test.js
@@ -0,0 +1,56 @@
+// Copyright 2019 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.
+import {assert} from 'chai';
+import {MrGridTile} from './mr-grid-tile.js';
+
+let element;
+const summary = 'Testing summary of an issue.';
+const testIssue = {
+  projectName: 'Monorail',
+  localId: '2345',
+  summary: summary,
+};
+
+describe('mr-grid-tile', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-grid-tile');
+    element.issue = testIssue;
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrGridTile);
+  });
+
+  it('properly links', async () => {
+    await element.updateComplete;
+    const tileLink = element.shadowRoot.querySelector('a').getAttribute('href');
+    assert.equal(tileLink, `/p/Monorail/issues/detail?id=2345`);
+  });
+
+  it('summary displays', async () => {
+    await element.updateComplete;
+    const tileSummary =
+      element.shadowRoot.querySelector('.summary').textContent;
+    assert.equal(tileSummary.trim(), summary);
+  });
+
+  it('status displays', async () => {
+    await element.updateComplete;
+    const tileStatus =
+      element.shadowRoot.querySelector('.status').textContent;
+    assert.equal(tileStatus.trim(), '');
+  });
+
+  it('id displays', async () => {
+    await element.updateComplete;
+    const tileId =
+      element.shadowRoot.querySelector('.issue-id').textContent;
+    assert.equal(tileId.trim(), '2345');
+  });
+});
diff --git a/static_src/elements/issue-list/mr-grid-page/mr-grid.js b/static_src/elements/issue-list/mr-grid-page/mr-grid.js
new file mode 100644
index 0000000..f459489
--- /dev/null
+++ b/static_src/elements/issue-list/mr-grid-page/mr-grid.js
@@ -0,0 +1,291 @@
+// Copyright 2019 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.
+
+import './mr-grid-tile.js';
+
+import {css, html, LitElement} from 'lit-element';
+import qs from 'qs';
+import {connectStore} from 'reducers/base.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import {issueRefToUrl} from 'shared/convertersV0.js';
+import {setHasAny} from 'shared/helpers.js';
+import {EMPTY_FIELD_VALUE} from 'shared/issue-fields.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+import {extractGridData, makeGridCellKey} from './extract-grid-data.js';
+
+const PROPERTIES_TRIGGERING_GROUPING = Object.freeze([
+  'xField',
+  'yField',
+  'issues',
+  '_extractFieldValuesFromIssue',
+  '_extractTypeForFieldName',
+  '_statusDefs',
+]);
+
+/**
+ * <mr-grid>
+ *
+ * A grid of issues grouped optionally horizontally and vertically.
+ *
+ * Throughout the file 'x' corresponds to column headers and 'y' corresponds to
+ * row headers.
+ *
+ * @extends {LitElement}
+ */
+export class MrGrid extends connectStore(LitElement) {
+  /** @override */
+  render() {
+    return html`
+      <table>
+        <tr>
+          <th>&nbsp</th>
+          ${this._xHeadings.map((heading) => html`
+              <th>${heading}</th>`)}
+        </tr>
+        ${this._yHeadings.map((yHeading) => html`
+          <tr>
+            <th>${yHeading}</th>
+            ${this._xHeadings.map((xHeading) => html`
+                ${this._renderCell(xHeading, yHeading)}`)}
+          </tr>
+        `)}
+      </table>
+    `;
+  }
+  /**
+   *
+   * @param {string} xHeading
+   * @param {string} yHeading
+   * @return {TemplateResult}
+   */
+  _renderCell(xHeading, yHeading) {
+    const cell = this._groupedIssues.get(makeGridCellKey(xHeading, yHeading));
+    if (!cell) {
+      return html`<td></td>`;
+    }
+
+    const cellMode = this.cellMode.toLowerCase();
+    let content;
+    if (cellMode === 'ids') {
+      content = html`
+        ${cell.map((issue) => html`
+          <mr-issue-link
+            .projectName=${this.projectName}
+            .issue=${issue}
+            .text=${issue.localId}
+            .queryParams=${this.queryParams}
+          ></mr-issue-link>
+        `)}
+      `;
+    } else if (cellMode === 'counts') {
+      const itemCount = cell.length;
+      if (itemCount === 1) {
+        const issue = cell[0];
+        content = html`
+          <a href=${issueRefToUrl(issue, this.queryParams)} class="counts">
+            1 item
+          </a>
+        `;
+      } else {
+        content = html`
+          <a href=${this._formatListUrl(xHeading, yHeading)} class="counts">
+            ${itemCount} items
+          </a>
+        `;
+      }
+    } else {
+      // Default to tiles.
+      content = html`
+        ${cell.map((issue) => html`
+          <mr-grid-tile
+            .issue=${issue}
+            .queryParams=${this.queryParams}
+          ></mr-grid-tile>
+          `)}
+        `;
+    }
+    return html`<td>${content}</td>`;
+  }
+
+  /**
+   * Creates a URL to the list view for the group of issues corresponding to
+   * the given headings.
+   *
+   * @param {string} xHeading
+   * @param {string} yHeading
+   * @return {string}
+   */
+  _formatListUrl(xHeading, yHeading) {
+    let url = 'list?';
+    const params = Object.assign({}, this.queryParams);
+    params.mode = '';
+
+    params.q = this._addHeadingToQuery(params.q, xHeading, this.xField);
+    params.q = this._addHeadingToQuery(params.q, yHeading, this.yField);
+
+    url += qs.stringify(params);
+
+    return url;
+  }
+
+  /**
+   * @param {string} query
+   * @param {string} heading The value of field for the current group.
+   * @param {string} field Field on which we're grouping the issue.
+   * @return {string} The query with an additional clause if needed.
+   */
+  _addHeadingToQuery(query, heading, field) {
+    if (field && field !== 'None') {
+      if (heading === EMPTY_FIELD_VALUE) {
+        query += ' -has:' + field;
+      // The following two cases are to handle grouping issues by Blocked
+      } else if (heading === 'No') {
+        query += ' -is:' + field;
+      } else if (heading === 'Yes') {
+        query += ' is:' + field;
+      } else {
+        query += ' ' + field + '=' + heading;
+      }
+    }
+    return query;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      xField: {type: String},
+      yField: {type: String},
+      issues: {type: Array},
+      cellMode: {type: String},
+      queryParams: {type: Object},
+      projectName: {type: String},
+      _extractFieldValuesFromIssue: {type: Object},
+      _extractTypeForFieldName: {type: Object},
+      _statusDefs: {type: Array},
+      _labelPrefixValueMap: {type: Map},
+    };
+  }
+
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        table {
+          table-layout: auto;
+          border-collapse: collapse;
+          width: 98%;
+          margin: 0.5em 1%;
+          text-align: left;
+        }
+        th {
+          border: 1px solid white;
+          padding: 5px;
+          background-color: var(--chops-table-header-bg);
+          white-space: nowrap;
+        }
+        td {
+          border: var(--chops-table-divider);
+          padding-left: 0.3em;
+          background-color: var(--chops-white);
+          vertical-align: top;
+        }
+        mr-issue-link {
+          display: inline-block;
+          margin-right: 8px;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    /** @type {string} */
+    this.cellMode = 'tiles';
+    /** @type {Array<Issue>} */
+    this.issues = [];
+    /** @type {string} */
+    this.projectName;
+    this.queryParams = {};
+
+    /** @type {string} The issue field on which to group columns. */
+    this.xField;
+
+    /** @type {string} The issue field on which to group rows. */
+    this.yField;
+
+    /**
+     * Grid cell key mapped to issues associated with that cell.
+     * @type {Map.<string, Array<Issue>>}
+     */
+    this._groupedIssues = new Map();
+
+    /** @type {Array<string>} */
+    this._xHeadings = [];
+
+    /** @type {Array<string>} */
+    this._yHeadings = [];
+
+    /**
+     * Method for extracting values from an issue for a given
+     * project config.
+     * @type {function(Issue, string): Array<string>}
+     */
+    this._extractFieldValuesFromIssue = undefined;
+
+    /**
+     * Method for finding the types of fields based on their names.
+     * @type {function(string): string}
+     */
+    this._extractTypeForFieldName = undefined;
+
+    /**
+     * Note: no default assigned here: it can be undefined in stateChanged.
+     * @type {Array<StatusDef>}
+     */
+    this._statusDefs;
+
+    /**
+     * Mapping predefined label prefix to set of values
+     * @type {Map}
+     */
+    this._labelPrefixValueMap = new Map();
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this._extractFieldValuesFromIssue =
+      projectV0.extractFieldValuesFromIssue(state);
+    this._extractTypeForFieldName = projectV0.extractTypeForFieldName(state);
+    this._statusDefs = projectV0.viewedConfig(state).statusDefs;
+    this._labelPrefixValueMap = projectV0.labelPrefixValueMap(state);
+  }
+
+  /** @override */
+  update(changedProperties) {
+    if (setHasAny(changedProperties, PROPERTIES_TRIGGERING_GROUPING)) {
+      if (this._extractFieldValuesFromIssue) {
+        const gridData = extractGridData({
+          issues: this.issues,
+          extractFieldValuesFromIssue: this._extractFieldValuesFromIssue,
+        }, {
+          xFieldName: this.xField,
+          yFieldName: this.yField,
+          extractTypeForFieldName: this._extractTypeForFieldName,
+          statusDefs: this._statusDefs,
+          labelPrefixValueMap: this._labelPrefixValueMap,
+        });
+
+        this._xHeadings = gridData.xHeadings;
+        this._yHeadings = gridData.yHeadings;
+        this._groupedIssues = gridData.groupedIssues;
+      }
+    }
+
+    super.update(changedProperties);
+  }
+};
+customElements.define('mr-grid', MrGrid);
diff --git a/static_src/elements/issue-list/mr-grid-page/mr-grid.test.js b/static_src/elements/issue-list/mr-grid-page/mr-grid.test.js
new file mode 100644
index 0000000..eb430de
--- /dev/null
+++ b/static_src/elements/issue-list/mr-grid-page/mr-grid.test.js
@@ -0,0 +1,214 @@
+// Copyright 2019 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.
+import {assert} from 'chai';
+import {MrGrid} from './mr-grid.js';
+import {MrIssueLink} from
+  'elements/framework/links/mr-issue-link/mr-issue-link.js';
+
+let element;
+
+describe('mr-grid', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-grid');
+    element.queryParams = {x: '', y: ''};
+    element.issues = [{localId: 1, projectName: 'monorail'}];
+    element.projectName = 'monorail';
+    document.body.appendChild(element);
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrGrid);
+  });
+
+  it('renders issues in ID mode', async () => {
+    element.cellMode = 'IDs';
+
+    await element.updateComplete;
+
+    assert.instanceOf(element.shadowRoot.querySelector(
+        'mr-issue-link'), MrIssueLink);
+  });
+
+  it('renders one issue in counts mode', async () => {
+    element.cellMode = 'Counts';
+
+    await element.updateComplete;
+
+    const href = element.shadowRoot.querySelector('.counts').href;
+    assert.include(href, '/p/monorail/issues/detail?id=1&x=&y=');
+  });
+
+  it('renders as tiles when invalid cell mode set', async () => {
+    element.cellMode = 'InvalidCells';
+
+    await element.updateComplete;
+
+    const tile = element.shadowRoot.querySelector('mr-grid-tile');
+    assert.isDefined(tile);
+    assert.deepEqual(tile.issue, {localId: 1, projectName: 'monorail'});
+  });
+
+  it('groups issues before rendering', async () => {
+    const testIssue = {
+      localId: 1,
+      projectName: 'monorail',
+      starCount: 2,
+      blockedOnIssueRefs: [{localId: 22, projectName: 'chromium'}],
+    };
+
+    element.cellMode = 'Tiles';
+
+    element.issues = [testIssue];
+    element.xField = 'Stars';
+    element.yField = 'Blocked';
+
+    await element.updateComplete;
+
+    assert.deepEqual(element._groupedIssues, new Map([
+      ['2 + Yes', [testIssue]],
+    ]));
+
+    const rows = element.shadowRoot.querySelectorAll('tr');
+
+    const colHeader = rows[0].querySelectorAll('th')[1];
+    assert.equal(colHeader.textContent.trim(), '2');
+
+    const rowHeader = rows[1].querySelector('th');
+    assert.equal(rowHeader.textContent.trim(), 'Yes');
+
+    const issueCell = rows[1].querySelector('td');
+    const tile = issueCell.querySelector('mr-grid-tile');
+
+    assert.isDefined(tile);
+    assert.deepEqual(tile.issue, testIssue);
+  });
+
+  it('renders status groups in statusDef order', async () => {
+    element._statusDefs = [
+      {status: 'UltraNew'},
+      {status: 'New'},
+      {status: 'Accepted'},
+    ];
+
+    element.issues = [
+      {localId: 2, projectName: 'monorail', statusRef: {status: 'New'}},
+      {localId: 4, projectName: 'monorail', statusRef: {status: 'Accepted'}},
+      {localId: 3, projectName: 'monorail', statusRef: {status: 'New'}},
+      {localId: 1, projectName: 'monorail', statusRef: {status: 'UltraNew'}},
+    ];
+
+    element.cellMode = 'IDs';
+    element.xField = 'Status';
+    element.yField = '';
+
+    await element.updateComplete;
+
+    const rows = element.shadowRoot.querySelectorAll('tr');
+
+    const colHeaders = rows[0].querySelectorAll('th');
+    assert.equal(colHeaders[1].textContent.trim(), 'UltraNew');
+    assert.equal(colHeaders[2].textContent.trim(), 'New');
+    assert.equal(colHeaders[3].textContent.trim(), 'Accepted');
+
+    const issueCells = rows[1].querySelectorAll('td');
+
+    const ultraNewIssues = issueCells[0].querySelectorAll('mr-issue-link');
+    assert.equal(ultraNewIssues.length, 1);
+
+    const newIssues = issueCells[1].querySelectorAll('mr-issue-link');
+    assert.equal(newIssues.length, 2);
+
+    const acceptedIssues = issueCells[2].querySelectorAll('mr-issue-link');
+    assert.equal(acceptedIssues.length, 1);
+  });
+
+  it('computes href for multiple items in counts mode', async () => {
+    element.cellMode = 'Counts';
+
+    element.issues = [
+      {localId: 1, projectName: 'monorail'},
+      {localId: 2, projectName: 'monorail'},
+    ];
+
+    await element.updateComplete;
+
+    const href = element.shadowRoot.querySelector('.counts').href;
+    assert.include(href, '/list?x=&y=&mode=');
+  });
+
+  it('computes list link when grouped by row in counts mode', async () => {
+    await element.updateComplete;
+
+    element.cellMode = 'Counts';
+    element.queryParams = {x: 'Type', y: '', q: 'Type:Defect'};
+    element._xHeadings = ['All', 'Defect'];
+    element._yHeadings = ['All'];
+    element._groupedIssues = new Map([
+      ['All + All', [{'localId': 1, 'projectName': 'monorail'}]],
+      ['Defect + All', [
+        {localId: 2, projectName: 'monorail',
+          labelRefs: [{label: 'Type-Defect'}]},
+        {localId: 3, projectName: 'monorail',
+          labelRefs: [{label: 'Type-Defect'}]},
+      ]],
+    ]);
+
+    await element.updateComplete;
+
+    const href = element.shadowRoot.querySelectorAll('.counts')[1].href;
+    assert.include(href, '/list?x=Type&y=&q=Type%3ADefect&mode=');
+  });
+
+  it('computes list link when grouped by col in counts mode', async () => {
+    await element.updateComplete;
+
+    element.cellMode = 'Counts';
+    element.queryParams = {x: '', y: 'Type', q: 'Type:Defect'};
+    element._xHeadings = ['All'];
+    element._yHeadings = ['All', 'Defect'];
+    element._groupedIssues = new Map([
+      ['All + All', [{'localId': 1, 'projectName': 'monorail'}]],
+      ['All + Defect', [
+        {localId: 2, projectName: 'monorail',
+          labelRefs: [{label: 'Type-Defect'}]},
+        {localId: 3, projectName: 'monorail',
+          labelRefs: [{label: 'Type-Defect'}]},
+      ]],
+    ]);
+
+    await element.updateComplete;
+
+    const href = element.shadowRoot.querySelectorAll('.counts')[1].href;
+    assert.include(href, '/list?x=&y=Type&q=Type%3ADefect&mode=');
+  });
+
+  it('computes list link when grouped by row, col in counts mode', async () => {
+    await element.updateComplete;
+
+    element.cellMode = 'Counts';
+    element.queryParams = {x: 'Stars', y: 'Type',
+      q: 'Type:Defect Stars=2'};
+    element._xHeadings = ['All', '2'];
+    element._yHeadings = ['All', 'Defect'];
+    element._groupedIssues = new Map([
+      ['All + All', [{'localId': 1, 'projectName': 'monorail'}]],
+      ['2 + Defect', [
+        {localId: 2, projectName: 'monorail',
+          labelRefs: [{label: 'Type-Defect'}], starCount: 2},
+        {localId: 3, projectName: 'monorail',
+          labelRefs: [{label: 'Type-Defect'}], starCount: 2},
+      ]],
+    ]);
+
+    await element.updateComplete;
+
+    const href = element.shadowRoot.querySelectorAll('.counts')[1].href;
+    assert.include(href,
+        '/list?x=Stars&y=Type&q=Type%3ADefect%20Stars%3D2&mode=');
+  });
+});
diff --git a/static_src/elements/issue-list/mr-list-page/mr-list-page.js b/static_src/elements/issue-list/mr-list-page/mr-list-page.js
new file mode 100644
index 0000000..809c3fc
--- /dev/null
+++ b/static_src/elements/issue-list/mr-list-page/mr-list-page.js
@@ -0,0 +1,662 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import page from 'page';
+import qs from 'qs';
+import {store, connectStore} from 'reducers/base.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as userV0 from 'reducers/userV0.js';
+import * as sitewide from 'reducers/sitewide.js';
+import * as ui from 'reducers/ui.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import {SERVER_LIST_ISSUES_LIMIT} from 'shared/consts/index.js';
+import {DEFAULT_ISSUE_FIELD_LIST, parseColSpec} from 'shared/issue-fields.js';
+import {
+  shouldWaitForDefaultQuery,
+  urlWithNewParams,
+  userIsMember,
+} from 'shared/helpers.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import 'elements/framework/dialogs/mr-change-columns/mr-change-columns.js';
+// eslint-disable-next-line max-len
+import 'elements/framework/dialogs/mr-issue-hotlists-action/mr-update-issue-hotlists-dialog.js';
+import 'elements/framework/mr-button-bar/mr-button-bar.js';
+import 'elements/framework/mr-dropdown/mr-dropdown.js';
+import 'elements/framework/mr-issue-list/mr-issue-list.js';
+import '../mr-mode-selector/mr-mode-selector.js';
+
+export const DEFAULT_ISSUES_PER_PAGE = 100;
+const PARAMS_THAT_TRIGGER_REFRESH = ['sort', 'groupby', 'num',
+  'start'];
+const SNACKBAR_LOADING = 'Loading issues...';
+
+/**
+ * `<mr-list-page>`
+ *
+ * Container page for the list view
+ */
+export class MrListPage extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          display: block;
+          box-sizing: border-box;
+          width: 100%;
+          padding: 0.5em 8px;
+        }
+        .container-loading,
+        .container-no-issues {
+          width: 100%;
+          box-sizing: border-box;
+          padding: 0 8px;
+          font-size: var(--chops-main-font-size);
+        }
+        .container-no-issues {
+          display: flex;
+          flex-direction: column;
+          align-items: center;
+          justify-content: center;
+        }
+        .container-no-issues p {
+          margin: 0.5em;
+        }
+        .no-issues-block {
+          display: block;
+          padding: 1em 16px;
+          margin-top: 1em;
+          flex-grow: 1;
+          width: 300px;
+          max-width: 100%;
+          text-align: center;
+          background: var(--chops-primary-accent-bg);
+          border-radius: 8px;
+          border-bottom: var(--chops-normal-border);
+        }
+        .no-issues-block[hidden] {
+          display: none;
+        }
+        .list-controls {
+          display: flex;
+          align-items: center;
+          justify-content: space-between;
+          width: 100%;
+          padding: 0.5em 0;
+        }
+        .right-controls {
+          flex-grow: 0;
+          display: flex;
+          align-items: center;
+          justify-content: flex-end;
+        }
+        .next-link, .prev-link {
+          display: inline-block;
+          margin: 0 8px;
+        }
+        mr-mode-selector {
+          margin-left: 8px;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    const selectedRefs = this.selectedIssues.map(
+        ({localId, projectName}) => ({localId, projectName}));
+
+    return html`
+      ${this._renderControls()}
+      ${this._renderListBody()}
+      <mr-update-issue-hotlists-dialog
+        .issueRefs=${selectedRefs}
+        @saveSuccess=${this._showHotlistSaveSnackbar}
+      ></mr-update-issue-hotlists-dialog>
+      <mr-change-columns
+        .columns=${this.columns}
+        .queryParams=${this._queryParams}
+      ></mr-change-columns>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   */
+  _renderListBody() {
+    if (!this._issueListLoaded) {
+      return html`
+        <div class="container-loading">
+          Loading...
+        </div>
+      `;
+    } else if (!this.totalIssues) {
+      return html`
+        <div class="container-no-issues">
+          <p>
+            The search query:
+          </p>
+          <strong>${this._queryParams.q}</strong>
+          <p>
+            did not generate any results.
+          </p>
+          <div class="no-issues-block">
+            Type a new query in the search box above
+          </div>
+          <a
+            href=${this._urlWithNewParams({can: 2, q: ''})}
+            class="no-issues-block view-all-open"
+          >
+            View all open issues
+          </a>
+          <a
+            href=${this._urlWithNewParams({can: 1})}
+            class="no-issues-block consider-closed"
+            ?hidden=${this._queryParams.can === '1'}
+          >
+            Consider closed issues
+          </a>
+        </div>
+      `;
+    }
+
+    return html`
+      <mr-issue-list
+        .issues=${this.issues}
+        .projectName=${this.projectName}
+        .queryParams=${this._queryParams}
+        .initialCursor=${this._queryParams.cursor}
+        .currentQuery=${this.currentQuery}
+        .currentCan=${this.currentCan}
+        .columns=${this.columns}
+        .defaultFields=${DEFAULT_ISSUE_FIELD_LIST}
+        .extractFieldValues=${this._extractFieldValues}
+        .groups=${this.groups}
+        .userDisplayName=${this.userDisplayName}
+        ?selectionEnabled=${this.editingEnabled}
+        ?sortingAndGroupingEnabled=${true}
+        ?starringEnabled=${this.starringEnabled}
+        @selectionChange=${this._setSelectedIssues}
+      ></mr-issue-list>
+    `;
+  }
+
+  /**
+   * @return {TemplateResult}
+   */
+  _renderControls() {
+    const maxItems = this.maxItems;
+    const startIndex = this.startIndex;
+    const end = Math.min(startIndex + maxItems, this.totalIssues);
+    const hasNext = end < this.totalIssues;
+    const hasPrev = startIndex > 0;
+
+    return html`
+      <div class="list-controls">
+        <div>
+          ${this.editingEnabled ? html`
+            <mr-button-bar .items=${this._actions}></mr-button-bar>
+          ` : ''}
+        </div>
+
+        <div class="right-controls">
+          ${hasPrev ? html`
+            <a
+              href=${this._urlWithNewParams({start: startIndex - maxItems})}
+              class="prev-link"
+            >
+              &lsaquo; Prev
+            </a>
+          ` : ''}
+          <div class="issue-count" ?hidden=${!this.totalIssues}>
+            ${startIndex + 1} - ${end} of ${this.totalIssuesDisplay}
+          </div>
+          ${hasNext ? html`
+            <a
+              href=${this._urlWithNewParams({start: startIndex + maxItems})}
+              class="next-link"
+            >
+              Next &rsaquo;
+            </a>
+          ` : ''}
+          <mr-mode-selector
+            .projectName=${this.projectName}
+            .queryParams=${this._queryParams}
+            value="list"
+          ></mr-mode-selector>
+        </div>
+      </div>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      issues: {type: Array},
+      totalIssues: {type: Number},
+      /** @private {Object} */
+      _queryParams: {type: Object},
+      projectName: {type: String},
+      _fetchingIssueList: {type: Boolean},
+      _issueListLoaded: {type: Boolean},
+      selectedIssues: {type: Array},
+      columns: {type: Array},
+      userDisplayName: {type: String},
+      /**
+       * The current search string the user is querying for.
+       */
+      currentQuery: {type: String},
+      /**
+       * The current canned query the user is searching for.
+       */
+      currentCan: {type: String},
+      /**
+       * A function that takes in an issue and a field name and returns the
+       * value for that field in the issue. This function accepts custom fields,
+       * built in fields, and ad hoc fields computed from label prefixes.
+       */
+      _extractFieldValues: {type: Object},
+      _isLoggedIn: {type: Boolean},
+      _currentUser: {type: Object},
+      _usersProjects: {type: Object},
+      _fetchIssueListError: {type: String},
+      _presentationConfigLoaded: {type: Boolean},
+    };
+  };
+
+  /** @override */
+  constructor() {
+    super();
+    this.issues = [];
+    this._fetchingIssueList = false;
+    this._issueListLoaded = false;
+    this.selectedIssues = [];
+    this._queryParams = {};
+    this.columns = [];
+    this._usersProjects = new Map();
+    this._presentationConfigLoaded = false;
+
+    this._boundRefresh = this.refresh.bind(this);
+
+    this._actions = [
+      {icon: 'edit', text: 'Bulk edit', handler: this.bulkEdit.bind(this)},
+      {
+        icon: 'add', text: 'Add to hotlist',
+        handler: this.addToHotlist.bind(this),
+      },
+      {
+        icon: 'table_chart', text: 'Change columns',
+        handler: this.openColumnsDialog.bind(this),
+      },
+      {icon: 'more_vert', text: 'More actions...', items: [
+        {text: 'Flag as spam', handler: () => this._flagIssues(true)},
+        {text: 'Un-flag as spam', handler: () => this._flagIssues(false)},
+      ]},
+    ];
+
+    /**
+     * @param {Issue} _issue
+     * @param {string} _fieldName
+     * @return {Array<string>}
+     */
+    this._extractFieldValues = (_issue, _fieldName) => [];
+
+    // Expose page.js for test stubbing.
+    this.page = page;
+  };
+
+  /** @override */
+  connectedCallback() {
+    super.connectedCallback();
+
+    window.addEventListener('refreshList', this._boundRefresh);
+
+    // TODO(zhangtiff): Consider if we can make this page title more useful for
+    // the list view.
+    store.dispatch(sitewide.setPageTitle('Issues'));
+  }
+
+  /** @override */
+  disconnectedCallback() {
+    super.disconnectedCallback();
+
+    window.removeEventListener('refreshList', this._boundRefresh);
+
+    this._hideIssueLoadingSnackbar();
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    this._measureIssueListLoadTime(changedProperties);
+
+    if (changedProperties.has('_fetchingIssueList')) {
+      const wasFetching = changedProperties.get('_fetchingIssueList');
+      const isFetching = this._fetchingIssueList;
+      // Show a snackbar if waiting for issues to load but only when there's
+      // already a different, non-empty issue list loaded. This approach avoids
+      // clearing the issue list for a loading screen.
+      if (isFetching && this.totalIssues > 0) {
+        this._showIssueLoadingSnackbar();
+      }
+      if (wasFetching && !isFetching) {
+        this._hideIssueLoadingSnackbar();
+      }
+    }
+
+    if (changedProperties.has('userDisplayName')) {
+      store.dispatch(issueV0.fetchStarredIssues());
+    }
+
+    if (changedProperties.has('_fetchIssueListError') &&
+        this._fetchIssueListError) {
+      this._showIssueErrorSnackbar(this._fetchIssueListError);
+    }
+
+    const shouldRefresh = this._shouldRefresh(changedProperties);
+    if (shouldRefresh) this.refresh();
+  }
+
+  /**
+   * Tracks the start and end times of an issues list render and
+   * records an issue list load time.
+   * @param {Map} changedProperties
+  */
+  async _measureIssueListLoadTime(changedProperties) {
+    if (!changedProperties.has('issues')) {
+      return;
+    }
+
+    if (!changedProperties.get('issues')) {
+      // Ignore initial initialization from the constructer where
+      // 'issues' is set from undefined to an empty array.
+      return;
+    }
+
+    const fullAppLoad = ui.navigationCount(store.getState()) == 1;
+    const startMark = fullAppLoad ? undefined : 'start load issue list page';
+
+    await Promise.all(_subtreeUpdateComplete(this));
+
+    const endMark = 'finish load list of issues';
+    performance.mark(endMark);
+
+    const measurementType = fullAppLoad ? 'from outside app' : 'within app';
+    const measurementName = `load list of issues (${measurementType})`;
+    performance.measure(measurementName, startMark, endMark);
+
+    const measurement = performance.getEntriesByName(
+        measurementName)[0].duration;
+    window.getTSMonClient().recordIssueListLoadTiming(measurement, fullAppLoad);
+
+    // Be sure to clear this mark even on full page navigation.
+    performance.clearMarks('start load issue list page');
+    performance.clearMarks(endMark);
+    performance.clearMeasures(measurementName);
+  }
+
+  /**
+   * Considers if list-page should fetch ListIssues
+   * @param {Map} changedProperties
+   * @return {boolean}
+   */
+  _shouldRefresh(changedProperties) {
+    const wait = shouldWaitForDefaultQuery(this._queryParams);
+    if (wait && !this._presentationConfigLoaded) {
+      return false;
+    } else if (wait && this._presentationConfigLoaded &&
+        changedProperties.has('_presentationConfigLoaded')) {
+      return true;
+    } else if (changedProperties.has('projectName') ||
+          changedProperties.has('currentQuery') ||
+          changedProperties.has('currentCan')) {
+      return true;
+    } else if (changedProperties.has('_queryParams')) {
+      const oldParams = changedProperties.get('_queryParams') || {};
+
+      const shouldRefresh = PARAMS_THAT_TRIGGER_REFRESH.some((param) => {
+        const oldValue = oldParams[param];
+        const newValue = this._queryParams[param];
+        return oldValue !== newValue;
+      });
+      return shouldRefresh;
+    }
+    return false;
+  }
+
+  // TODO(crbug.com/monorail/6933): Remove the need for this wrapper.
+  /** Dispatches a Redux action to show an issues loading snackbar.  */
+  _showIssueLoadingSnackbar() {
+    store.dispatch(ui.showSnackbar(ui.snackbarNames.FETCH_ISSUE_LIST,
+        SNACKBAR_LOADING, 0));
+  }
+
+  /** Dispatches a Redux action to hide the issue loading snackbar.  */
+  _hideIssueLoadingSnackbar() {
+    store.dispatch(ui.hideSnackbar(ui.snackbarNames.FETCH_ISSUE_LIST));
+  }
+
+  /**
+   * Shows a snackbar telling the user their issue loading failed.
+   * @param {string} error The error to display.
+   */
+  _showIssueErrorSnackbar(error) {
+    store.dispatch(ui.showSnackbar(ui.snackbarNames.FETCH_ISSUE_LIST_ERROR,
+        error));
+  }
+
+  /**
+   * Refreshes the list of issues show.
+   */
+  refresh() {
+    store.dispatch(issueV0.fetchIssueList(this.projectName, {
+      ...this._queryParams,
+      q: this.currentQuery,
+      can: this.currentCan,
+      maxItems: this.maxItems,
+      start: this.startIndex,
+    }));
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.projectName = projectV0.viewedProjectName(state);
+    this._isLoggedIn = userV0.isLoggedIn(state);
+    this._currentUser = userV0.currentUser(state);
+    this._usersProjects = userV0.projectsPerUser(state);
+
+    this.issues = issueV0.issueList(state) || [];
+    this.totalIssues = issueV0.totalIssues(state) || 0;
+    this._fetchingIssueList = issueV0.requests(state).fetchIssueList.requesting;
+    this._issueListLoaded = issueV0.issueListLoaded(state);
+
+    const error = issueV0.requests(state).fetchIssueList.error;
+    this._fetchIssueListError = error ? error.message : '';
+
+    this.currentQuery = sitewide.currentQuery(state);
+    this.currentCan = sitewide.currentCan(state);
+    this.columns =
+        sitewide.currentColumns(state) || projectV0.defaultColumns(state);
+
+    this._queryParams = sitewide.queryParams(state);
+
+    this._extractFieldValues = projectV0.extractFieldValuesFromIssue(state);
+    this._presentationConfigLoaded =
+      projectV0.viewedPresentationConfigLoaded(state);
+  }
+
+  /**
+   * @return {string} Display text of total issue number.
+   */
+  get totalIssuesDisplay() {
+    if (this.totalIssues === 1) {
+      return `${this.totalIssues}`;
+    } else if (this.totalIssues === SERVER_LIST_ISSUES_LIMIT) {
+      // Server has hard limit up to 100,000 list results
+      return `100,000+`;
+    }
+    return `${this.totalIssues}`;
+  }
+
+  /**
+   * @return {boolean} Whether the user is able to star the issues in the list.
+   */
+  get starringEnabled() {
+    return this._isLoggedIn;
+  }
+
+  /**
+   * @return {boolean} Whether the user has permissions to edit the issues in
+   *   the list.
+   */
+  get editingEnabled() {
+    return this._isLoggedIn && (userIsMember(this._currentUser,
+        this.projectName, this._usersProjects) ||
+        this._currentUser.isSiteAdmin);
+  }
+
+  /**
+   * @return {Array<string>} Array of columns to group by.
+   */
+  get groups() {
+    return parseColSpec(this._queryParams.groupby);
+  }
+
+  /**
+   * @return {number} Maximum number of issues to load for this query.
+   */
+  get maxItems() {
+    return Number.parseInt(this._queryParams.num) || DEFAULT_ISSUES_PER_PAGE;
+  }
+
+  /**
+   * @return {number} Number of issues to offset by, based on pagination.
+   */
+  get startIndex() {
+    const num = Number.parseInt(this._queryParams.start) || 0;
+    return Math.max(0, num);
+  }
+
+  /**
+   * Computes the current URL of the page with updated queryParams.
+   *
+   * @param {Object} newParams keys and values to override existing parameters.
+   * @return {string} the new URL.
+   */
+  _urlWithNewParams(newParams) {
+    const baseUrl = `/p/${this.projectName}/issues/list`;
+    return urlWithNewParams(baseUrl, this._queryParams, newParams);
+  }
+
+  /**
+   * Shows the user an alert telling them their action won't work.
+   * @param {string} action Text describing what you're trying to do.
+   */
+  noneSelectedAlert(action) {
+    // TODO(zhangtiff): Replace this with a modal for a more modern feel.
+    alert(`Please select some issues to ${action}.`);
+  }
+
+  /**
+   * Opens the the column selector.
+   */
+  openColumnsDialog() {
+    this.shadowRoot.querySelector('mr-change-columns').open();
+  }
+
+  /**
+   * Opens a modal to add the selected issues to a hotlist.
+   */
+  addToHotlist() {
+    const issues = this.selectedIssues;
+    if (!issues || !issues.length) {
+      this.noneSelectedAlert('add to hotlists');
+      return;
+    }
+    this.shadowRoot.querySelector('mr-update-issue-hotlists-dialog').open();
+  }
+
+  /**
+   * Redirects the user to the bulk edit page for the issues they've selected.
+   */
+  bulkEdit() {
+    const issues = this.selectedIssues;
+    if (!issues || !issues.length) {
+      this.noneSelectedAlert('edit');
+      return;
+    }
+    const params = {
+      ids: issues.map((issue) => issue.localId).join(','),
+      q: this._queryParams && this._queryParams.q,
+    };
+    this.page(`/p/${this.projectName}/issues/bulkedit?${qs.stringify(params)}`);
+  }
+
+  /** Shows user confirmation that their hotlist changes were saved. */
+  _showHotlistSaveSnackbar() {
+    store.dispatch(ui.showSnackbar(ui.snackbarNames.UPDATE_HOTLISTS_SUCCESS,
+        'Hotlists updated.'));
+  }
+
+  /**
+   * Flags the selected issues as spam.
+   * @param {boolean} flagAsSpam If true, flag as spam. If false, unflag
+   *   as spam.
+   */
+  async _flagIssues(flagAsSpam = true) {
+    const issues = this.selectedIssues;
+    if (!issues || !issues.length) {
+      return this.noneSelectedAlert(
+          `${flagAsSpam ? 'flag' : 'un-flag'} as spam`);
+    }
+    const refs = issues.map((issue) => ({
+      localId: issue.localId,
+      projectName: issue.projectName,
+    }));
+
+    // TODO(zhangtiff): Refactor this into a shared action creator and
+    // display the error on the frontend.
+    try {
+      await prpcClient.call('monorail.Issues', 'FlagIssues', {
+        issueRefs: refs,
+        flag: flagAsSpam,
+      });
+      this.refresh();
+    } catch (e) {
+      console.error(e);
+    }
+  }
+
+  /**
+   * Syncs this component's selected issues with the child component's selected
+   * issues.
+   */
+  _setSelectedIssues() {
+    const issueListRef = this.shadowRoot.querySelector('mr-issue-list');
+    if (!issueListRef) return;
+
+    this.selectedIssues = issueListRef.selectedIssues;
+  }
+};
+
+
+/**
+ * Recursively traverses all shadow DOMs in an element subtree and returns an
+ * Array containing the updateComplete Promises for all lit-element nodes.
+ * @param {!LitElement} element
+ * @return {!Array<Promise<Boolean>>}
+ */
+function _subtreeUpdateComplete(element) {
+  if (!(element.shadowRoot && element.updateComplete)) {
+    return [];
+  }
+
+  const children = element.shadowRoot.querySelectorAll('*');
+  const childPromises = Array.from(children, (e) => _subtreeUpdateComplete(e));
+  return [element.updateComplete].concat(...childPromises);
+}
+
+customElements.define('mr-list-page', MrListPage);
diff --git a/static_src/elements/issue-list/mr-list-page/mr-list-page.test.js b/static_src/elements/issue-list/mr-list-page/mr-list-page.test.js
new file mode 100644
index 0000000..0f1d4ac
--- /dev/null
+++ b/static_src/elements/issue-list/mr-list-page/mr-list-page.test.js
@@ -0,0 +1,615 @@
+// Copyright 2019 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.
+import sinon from 'sinon';
+import {assert} from 'chai';
+import {prpcClient} from 'prpc-client-instance.js';
+import {MrListPage, DEFAULT_ISSUES_PER_PAGE} from './mr-list-page.js';
+import {SERVER_LIST_ISSUES_LIMIT} from 'shared/consts/index.js';
+import {store, resetState} from 'reducers/base.js';
+
+let element;
+
+describe('mr-list-page', () => {
+  beforeEach(() => {
+    store.dispatch(resetState());
+    element = document.createElement('mr-list-page');
+    document.body.appendChild(element);
+    sinon.stub(prpcClient, 'call');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+    prpcClient.call.restore();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrListPage);
+  });
+
+  it('shows loading page when issues not loaded yet', async () => {
+    element._issueListLoaded = false;
+
+    await element.updateComplete;
+
+    const loading = element.shadowRoot.querySelector('.container-loading');
+    const noIssues = element.shadowRoot.querySelector('.container-no-issues');
+    const issueList = element.shadowRoot.querySelector('mr-issue-list');
+
+    assert.equal(loading.textContent.trim(), 'Loading...');
+    assert.isNull(noIssues);
+    assert.isNull(issueList);
+  });
+
+  it('does not clear existing issue list when loading new issues', async () => {
+    element._fetchingIssueList = true;
+    element._issueListLoaded = true;
+
+    element.totalIssues = 1;
+    element.issues = [{localId: 1, projectName: 'chromium'}];
+
+    await element.updateComplete;
+
+    const loading = element.shadowRoot.querySelector('.container-loading');
+    const noIssues = element.shadowRoot.querySelector('.container-no-issues');
+    const issueList = element.shadowRoot.querySelector('mr-issue-list');
+
+    assert.isNull(loading);
+    assert.isNull(noIssues);
+    assert.isNotNull(issueList);
+    // TODO(crbug.com/monorail/6560): We intend for the snackbar to be shown,
+    // but it is hidden because the store thinks we have 0 total issues.
+  });
+
+  it('shows list when done loading', async () => {
+    element._fetchingIssueList = false;
+    element._issueListLoaded = true;
+
+    element.totalIssues = 100;
+
+    await element.updateComplete;
+
+    const loading = element.shadowRoot.querySelector('.container-loading');
+    const noIssues = element.shadowRoot.querySelector('.container-no-issues');
+    const issueList = element.shadowRoot.querySelector('mr-issue-list');
+
+    assert.isNull(loading);
+    assert.isNull(noIssues);
+    assert.isNotNull(issueList);
+  });
+
+  describe('issue loading snackbar', () => {
+    beforeEach(() => {
+      sinon.spy(store, 'dispatch');
+    });
+
+    afterEach(() => {
+      store.dispatch.restore();
+    });
+
+    it('shows snackbar when loading new list of issues', async () => {
+      sinon.stub(element, 'stateChanged');
+      sinon.stub(element, '_showIssueLoadingSnackbar');
+
+      element._fetchingIssueList = true;
+      element.totalIssues = 1;
+      element.issues = [{localId: 1, projectName: 'chromium'}];
+
+      await element.updateComplete;
+
+      sinon.assert.calledOnce(element._showIssueLoadingSnackbar);
+    });
+
+    it('hides snackbar when issues are done loading', async () => {
+      element._fetchingIssueList = true;
+      element.totalIssues = 1;
+      element.issues = [{localId: 1, projectName: 'chromium'}];
+
+      await element.updateComplete;
+
+      sinon.assert.neverCalledWith(store.dispatch,
+          {type: 'HIDE_SNACKBAR', id: 'FETCH_ISSUE_LIST'});
+
+      element._fetchingIssueList = false;
+
+      await element.updateComplete;
+
+      sinon.assert.calledWith(store.dispatch,
+          {type: 'HIDE_SNACKBAR', id: 'FETCH_ISSUE_LIST'});
+    });
+
+    it('hides snackbar when <mr-list-page> disconnects', async () => {
+      document.body.removeChild(element);
+
+      sinon.assert.calledWith(store.dispatch,
+          {type: 'HIDE_SNACKBAR', id: 'FETCH_ISSUE_LIST'});
+
+      document.body.appendChild(element);
+    });
+
+    it('shows snackbar on issue loading error', async () => {
+      sinon.stub(element, 'stateChanged');
+      sinon.stub(element, '_showIssueErrorSnackbar');
+
+      element._fetchIssueListError = 'Something went wrong';
+
+      await element.updateComplete;
+
+      sinon.assert.calledWith(element._showIssueErrorSnackbar,
+          'Something went wrong');
+    });
+  });
+
+  it('shows no issues when no search results', async () => {
+    element._fetchingIssueList = false;
+    element._issueListLoaded = true;
+
+    element.totalIssues = 0;
+    element._queryParams = {q: 'owner:me'};
+
+    await element.updateComplete;
+
+    const loading = element.shadowRoot.querySelector('.container-loading');
+    const noIssues = element.shadowRoot.querySelector('.container-no-issues');
+    const issueList = element.shadowRoot.querySelector('mr-issue-list');
+
+    assert.isNull(loading);
+    assert.isNotNull(noIssues);
+    assert.isNull(issueList);
+
+    assert.equal(noIssues.querySelector('strong').textContent.trim(),
+        'owner:me');
+  });
+
+  it('offers consider closed issues when no open results', async () => {
+    element._fetchingIssueList = false;
+    element._issueListLoaded = true;
+
+    element.totalIssues = 0;
+    element._queryParams = {q: 'owner:me', can: '2'};
+
+    await element.updateComplete;
+
+    const considerClosed = element.shadowRoot.querySelector('.consider-closed');
+
+    assert.isFalse(considerClosed.hidden);
+
+    element._queryParams = {q: 'owner:me', can: '1'};
+    element._fetchingIssueList = false;
+    element._issueListLoaded = true;
+
+    await element.updateComplete;
+
+    assert.isTrue(considerClosed.hidden);
+  });
+
+  it('refreshes when _queryParams.sort changes', async () => {
+    sinon.stub(element, 'refresh');
+
+    element._queryParams = {q: ''};
+    await element.updateComplete;
+    sinon.assert.callCount(element.refresh, 1);
+
+    element._queryParams = {q: '', colspec: 'Summary+ID'};
+
+    await element.updateComplete;
+    sinon.assert.callCount(element.refresh, 1);
+
+    element._queryParams = {q: '', sort: '-Summary'};
+    await element.updateComplete;
+    sinon.assert.callCount(element.refresh, 2);
+
+    element.refresh.restore();
+  });
+
+  it('refreshes when currentQuery changes', async () => {
+    sinon.stub(element, 'refresh');
+
+    element._queryParams = {q: ''};
+    await element.updateComplete;
+    sinon.assert.callCount(element.refresh, 1);
+
+    element.currentQuery = 'some query term';
+
+    await element.updateComplete;
+    sinon.assert.callCount(element.refresh, 2);
+
+    element.refresh.restore();
+  });
+
+  it('does not refresh when presentation config not fetched', async () => {
+    sinon.stub(element, 'refresh');
+
+    element._presentationConfigLoaded = false;
+    element.currentQuery = 'some query term';
+
+    await element.updateComplete;
+    sinon.assert.callCount(element.refresh, 0);
+
+    element.refresh.restore();
+  });
+
+  it('refreshes if presentation config fetch finishes last', async () => {
+    sinon.stub(element, 'refresh');
+
+    element._presentationConfigLoaded = false;
+
+    await element.updateComplete;
+    sinon.assert.callCount(element.refresh, 0);
+
+    element._presentationConfigLoaded = true;
+    element.currentQuery = 'some query term';
+
+    await element.updateComplete;
+    sinon.assert.callCount(element.refresh, 1);
+
+    element.refresh.restore();
+  });
+
+  it('startIndex parses _queryParams for value', () => {
+    // Default value.
+    element._queryParams = {};
+    assert.equal(element.startIndex, 0);
+
+    // Int.
+    element._queryParams = {start: 2};
+    assert.equal(element.startIndex, 2);
+
+    // String.
+    element._queryParams = {start: '5'};
+    assert.equal(element.startIndex, 5);
+
+    // Negative value.
+    element._queryParams = {start: -5};
+    assert.equal(element.startIndex, 0);
+
+    // NaN
+    element._queryParams = {start: 'lol'};
+    assert.equal(element.startIndex, 0);
+  });
+
+  it('maxItems parses _queryParams for value', () => {
+    // Default value.
+    element._queryParams = {};
+    assert.equal(element.maxItems, DEFAULT_ISSUES_PER_PAGE);
+
+    // Int.
+    element._queryParams = {num: 50};
+    assert.equal(element.maxItems, 50);
+
+    // String.
+    element._queryParams = {num: '33'};
+    assert.equal(element.maxItems, 33);
+
+    // NaN
+    element._queryParams = {num: 'lol'};
+    assert.equal(element.maxItems, DEFAULT_ISSUES_PER_PAGE);
+  });
+
+  it('parses groupby parameter correctly', () => {
+    element._queryParams = {groupby: 'Priority+Status'};
+
+    assert.deepEqual(element.groups,
+        ['Priority', 'Status']);
+  });
+
+  it('groupby parsing preserves dashed parameters', () => {
+    element._queryParams = {groupby: 'Priority+Custom-Status'};
+
+    assert.deepEqual(element.groups,
+        ['Priority', 'Custom-Status']);
+  });
+
+  describe('pagination', () => {
+    beforeEach(() => {
+      // Stop Redux from overriding values being tested.
+      sinon.stub(element, 'stateChanged');
+    });
+
+    it('issue count hidden when no issues', async () => {
+      element._queryParams = {num: 10, start: 0};
+      element.totalIssues = 0;
+
+      await element.updateComplete;
+
+      const count = element.shadowRoot.querySelector('.issue-count');
+
+      assert.isTrue(count.hidden);
+    });
+
+    it('issue count renders on first page', async () => {
+      element._queryParams = {num: 10, start: 0};
+      element.totalIssues = 100;
+
+      await element.updateComplete;
+
+      const count = element.shadowRoot.querySelector('.issue-count');
+
+      assert.equal(count.textContent.trim(), '1 - 10 of 100');
+    });
+
+    it('issue count renders on middle page', async () => {
+      element._queryParams = {num: 10, start: 50};
+      element.totalIssues = 100;
+
+      await element.updateComplete;
+
+      const count = element.shadowRoot.querySelector('.issue-count');
+
+      assert.equal(count.textContent.trim(), '51 - 60 of 100');
+    });
+
+    it('issue count renders on last page', async () => {
+      element._queryParams = {num: 10, start: 95};
+      element.totalIssues = 100;
+
+      await element.updateComplete;
+
+      const count = element.shadowRoot.querySelector('.issue-count');
+
+      assert.equal(count.textContent.trim(), '96 - 100 of 100');
+    });
+
+    it('issue count renders on single page', async () => {
+      element._queryParams = {num: 100, start: 0};
+      element.totalIssues = 33;
+
+      await element.updateComplete;
+
+      const count = element.shadowRoot.querySelector('.issue-count');
+
+      assert.equal(count.textContent.trim(), '1 - 33 of 33');
+    });
+
+    it('total issue count shows backend limit of 100,000', () => {
+      element.totalIssues = SERVER_LIST_ISSUES_LIMIT;
+      assert.equal(element.totalIssuesDisplay, '100,000+');
+    });
+
+    it('next and prev hidden on single page', async () => {
+      element._queryParams = {num: 500, start: 0};
+      element.totalIssues = 10;
+
+      await element.updateComplete;
+
+      const next = element.shadowRoot.querySelector('.next-link');
+      const prev = element.shadowRoot.querySelector('.prev-link');
+
+      assert.isNull(next);
+      assert.isNull(prev);
+    });
+
+    it('prev hidden on first page', async () => {
+      element._queryParams = {num: 10, start: 0};
+      element.totalIssues = 30;
+
+      await element.updateComplete;
+
+      const next = element.shadowRoot.querySelector('.next-link');
+      const prev = element.shadowRoot.querySelector('.prev-link');
+
+      assert.isNotNull(next);
+      assert.isNull(prev);
+    });
+
+    it('next hidden on last page', async () => {
+      element._queryParams = {num: 10, start: 9};
+      element.totalIssues = 5;
+
+      await element.updateComplete;
+
+      const next = element.shadowRoot.querySelector('.next-link');
+      const prev = element.shadowRoot.querySelector('.prev-link');
+
+      assert.isNull(next);
+      assert.isNotNull(prev);
+    });
+
+    it('next and prev shown on middle page', async () => {
+      element._queryParams = {num: 10, start: 50};
+      element.totalIssues = 100;
+
+      await element.updateComplete;
+
+      const next = element.shadowRoot.querySelector('.next-link');
+      const prev = element.shadowRoot.querySelector('.prev-link');
+
+      assert.isNotNull(next);
+      assert.isNotNull(prev);
+    });
+  });
+
+  describe('edit actions', () => {
+    beforeEach(() => {
+      sinon.stub(window, 'alert');
+
+      // Give the test user edit privileges.
+      element._isLoggedIn = true;
+      element._currentUser = {isSiteAdmin: true};
+    });
+
+    afterEach(() => {
+      window.alert.restore();
+    });
+
+    it('edit actions hidden when user is logged out', async () => {
+      element._isLoggedIn = false;
+
+      await element.updateComplete;
+
+      assert.isNull(element.shadowRoot.querySelector('mr-button-bar'));
+    });
+
+    it('edit actions hidden when user is not a project member', async () => {
+      element._isLoggedIn = true;
+      element._currentUser = {displayName: 'regular@user.com'};
+
+      await element.updateComplete;
+
+      assert.isNull(element.shadowRoot.querySelector('mr-button-bar'));
+    });
+
+    it('edit actions shown when user is a project member', async () => {
+      element.projectName = 'chromium';
+      element._isLoggedIn = true;
+      element._currentUser = {isSiteAdmin: false, userId: '123'};
+      element._usersProjects = new Map([['123', {ownerOf: ['chromium']}]]);
+
+      await element.updateComplete;
+
+      assert.isNotNull(element.shadowRoot.querySelector('mr-button-bar'));
+
+      element.projectName = 'nonmember-project';
+      await element.updateComplete;
+
+      assert.isNull(element.shadowRoot.querySelector('mr-button-bar'));
+    });
+
+    it('edit actions shown when user is a site admin', async () => {
+      element._isLoggedIn = true;
+      element._currentUser = {isSiteAdmin: true};
+
+      await element.updateComplete;
+
+      assert.isNotNull(element.shadowRoot.querySelector('mr-button-bar'));
+    });
+
+    it('bulk edit stops when no issues selected', () => {
+      element.selectedIssues = [];
+      element.projectName = 'test';
+
+      element.bulkEdit();
+
+      sinon.assert.calledWith(window.alert,
+          'Please select some issues to edit.');
+    });
+
+    it('bulk edit redirects to bulk edit page', () => {
+      element.page = sinon.stub();
+      element.selectedIssues = [
+        {localId: 1},
+        {localId: 2},
+      ];
+      element.projectName = 'test';
+
+      element.bulkEdit();
+
+      sinon.assert.calledWith(element.page,
+          '/p/test/issues/bulkedit?ids=1%2C2');
+    });
+
+    it('flag issue as spam stops when no issues selected', () => {
+      element.selectedIssues = [];
+
+      element._flagIssues(true);
+
+      sinon.assert.calledWith(window.alert,
+          'Please select some issues to flag as spam.');
+    });
+
+    it('un-flag issue as spam stops when no issues selected', () => {
+      element.selectedIssues = [];
+
+      element._flagIssues(false);
+
+      sinon.assert.calledWith(window.alert,
+          'Please select some issues to un-flag as spam.');
+    });
+
+    it('flagging issues as spam sends pRPC request', async () => {
+      element.page = sinon.stub();
+      element.selectedIssues = [
+        {localId: 1, projectName: 'test'},
+        {localId: 2, projectName: 'test'},
+      ];
+
+      await element._flagIssues(true);
+
+      sinon.assert.calledWith(prpcClient.call, 'monorail.Issues',
+          'FlagIssues', {
+            issueRefs: [
+              {localId: 1, projectName: 'test'},
+              {localId: 2, projectName: 'test'},
+            ],
+            flag: true,
+          });
+    });
+
+    it('un-flagging issues as spam sends pRPC request', async () => {
+      element.page = sinon.stub();
+      element.selectedIssues = [
+        {localId: 1, projectName: 'test'},
+        {localId: 2, projectName: 'test'},
+      ];
+
+      await element._flagIssues(false);
+
+      sinon.assert.calledWith(prpcClient.call, 'monorail.Issues',
+          'FlagIssues', {
+            issueRefs: [
+              {localId: 1, projectName: 'test'},
+              {localId: 2, projectName: 'test'},
+            ],
+            flag: false,
+          });
+    });
+
+    it('clicking change columns opens dialog', async () => {
+      await element.updateComplete;
+      const dialog = element.shadowRoot.querySelector('mr-change-columns');
+      sinon.stub(dialog, 'open');
+
+      element.openColumnsDialog();
+
+      sinon.assert.calledOnce(dialog.open);
+    });
+
+    it('add to hotlist stops when no issues selected', () => {
+      element.selectedIssues = [];
+      element.projectName = 'test';
+
+      element.addToHotlist();
+
+      sinon.assert.calledWith(window.alert,
+          'Please select some issues to add to hotlists.');
+    });
+
+    it('add to hotlist dialog opens', async () => {
+      element.selectedIssues = [
+        {localId: 1, projectName: 'test'},
+        {localId: 2, projectName: 'test'},
+      ];
+      element.projectName = 'test';
+
+      await element.updateComplete;
+
+      const dialog = element.shadowRoot.querySelector(
+          'mr-update-issue-hotlists-dialog');
+
+      sinon.stub(dialog, 'open');
+
+      element.addToHotlist();
+
+      sinon.assert.calledOnce(dialog.open);
+    });
+
+    it('hotlist update triggers snackbar', async () => {
+      element.selectedIssues = [
+        {localId: 1, projectName: 'test'},
+        {localId: 2, projectName: 'test'},
+      ];
+      element.projectName = 'test';
+      sinon.stub(element, '_showHotlistSaveSnackbar');
+
+      await element.updateComplete;
+
+      const dialog = element.shadowRoot.querySelector(
+          'mr-update-issue-hotlists-dialog');
+
+      element.addToHotlist();
+      dialog.dispatchEvent(new Event('saveSuccess'));
+
+      sinon.assert.calledOnce(element._showHotlistSaveSnackbar);
+    });
+  });
+});
diff --git a/static_src/elements/issue-list/mr-mode-selector/mr-mode-selector.js b/static_src/elements/issue-list/mr-mode-selector/mr-mode-selector.js
new file mode 100644
index 0000000..8876402
--- /dev/null
+++ b/static_src/elements/issue-list/mr-mode-selector/mr-mode-selector.js
@@ -0,0 +1,54 @@
+// Copyright 2019 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.
+import page from 'page';
+import {ChopsChoiceButtons} from
+  'elements/chops/chops-choice-buttons/chops-choice-buttons.js';
+import {urlWithNewParams} from 'shared/helpers.js';
+
+/**
+ * Component for showing the chips to switch between List, Grid, and Chart modes
+ * on the Monorail issue list page.
+ * @extends {ChopsChoiceButtons}
+ */
+export class MrModeSelector extends ChopsChoiceButtons {
+  /** @override */
+  static get properties() {
+    return {
+      ...ChopsChoiceButtons.properties,
+      queryParams: {type: Object},
+      projectName: {type: String},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+
+    this.queryParams = {};
+    this.projectName = '';
+
+    this._page = page;
+  };
+
+  /** @override */
+  update(changedProperties) {
+    if (changedProperties.has('queryParams') ||
+        changedProperties.has('projectName')) {
+      this.options = [
+        {text: 'List', value: 'list', url: this._newListViewPath()},
+        {text: 'Grid', value: 'grid', url: this._newListViewPath('grid')},
+        {text: 'Chart', value: 'chart', url: this._newListViewPath('chart')},
+      ];
+    }
+    super.update(changedProperties);
+  }
+
+  _newListViewPath(mode) {
+    const basePath = `/p/${this.projectName}/issues/list`;
+    const deletedParams = mode ? undefined : ['mode'];
+    return urlWithNewParams(basePath, this.queryParams, {mode}, deletedParams);
+  }
+};
+
+customElements.define('mr-mode-selector', MrModeSelector);
diff --git a/static_src/elements/issue-list/mr-mode-selector/mr-mode-selector.test.js b/static_src/elements/issue-list/mr-mode-selector/mr-mode-selector.test.js
new file mode 100644
index 0000000..07166d6
--- /dev/null
+++ b/static_src/elements/issue-list/mr-mode-selector/mr-mode-selector.test.js
@@ -0,0 +1,42 @@
+// Copyright 2019 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.
+
+import sinon from 'sinon';
+import {assert} from 'chai';
+import {MrModeSelector} from './mr-mode-selector.js';
+
+let element;
+
+describe('mr-mode-selector', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-mode-selector');
+    document.body.appendChild(element);
+
+    element._page = sinon.stub();
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrModeSelector);
+  });
+
+  it('renders links with projectName and queryParams', async () => {
+    element.value = 'list';
+    element.projectName = 'chromium';
+    element.queryParams = {q: 'hello-world'};
+
+    await element.updateComplete;
+
+    const links = element.shadowRoot.querySelectorAll('a');
+
+    assert.include(links[0].href, '/p/chromium/issues/list?q=hello-world');
+    assert.include(links[1].href,
+        '/p/chromium/issues/list?q=hello-world&mode=grid');
+    assert.include(links[2].href,
+        '/p/chromium/issues/list?q=hello-world&mode=chart');
+  });
+});
diff --git a/static_src/elements/mr-app/mr-app.js b/static_src/elements/mr-app/mr-app.js
new file mode 100644
index 0000000..a48d40f
--- /dev/null
+++ b/static_src/elements/mr-app/mr-app.js
@@ -0,0 +1,587 @@
+// Copyright 2019 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.
+
+import {LitElement, html} from 'lit-element';
+import {repeat} from 'lit-html/directives/repeat';
+import page from 'page';
+import qs from 'qs';
+
+import {getServerStatusCron} from 'shared/cron.js';
+import 'elements/framework/mr-site-banner/mr-site-banner.js';
+import {store, connectStore} from 'reducers/base.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import {hotlists} from 'reducers/hotlists.js';
+import * as issueV0 from 'reducers/issueV0.js';
+import * as permissions from 'reducers/permissions.js';
+import * as users from 'reducers/users.js';
+import * as userv0 from 'reducers/userV0.js';
+import * as ui from 'reducers/ui.js';
+import * as sitewide from 'reducers/sitewide.js';
+import {arrayToEnglish} from 'shared/helpers.js';
+import {trackPageChange} from 'shared/ga-helpers.js';
+import 'elements/chops/chops-announcement/chops-announcement.js';
+import 'elements/issue-list/mr-list-page/mr-list-page.js';
+import 'elements/issue-entry/mr-issue-entry-page.js';
+import 'elements/framework/mr-header/mr-header.js';
+import 'elements/help/mr-cue/mr-cue.js';
+import {cueNames} from 'elements/help/mr-cue/cue-helpers.js';
+import 'elements/chops/chops-snackbar/chops-snackbar.js';
+
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+
+const QUERY_PARAMS_THAT_RESET_SCROLL = ['q', 'mode', 'id'];
+
+/**
+ * `<mr-app>`
+ *
+ * The container component for all pages under the Monorail SPA.
+ *
+ */
+export class MrApp extends connectStore(LitElement) {
+  /** @override */
+  render() {
+    if (this.page === 'wizard') {
+      return html`<div id="reactMount"></div>`;
+    }
+
+    return html`
+      <style>
+        ${SHARED_STYLES}
+        mr-app {
+          display: block;
+          padding-top: var(--monorail-header-height);
+          margin-top: -1px; /* Prevent a double border from showing up. */
+
+          /* From shared-styles.js. */
+          --mr-edit-field-padding: 0.125em 4px;
+          --mr-edit-field-width: 90%;
+          --mr-input-grid-gap: 6px;
+          font-family: var(--chops-font-family);
+          color: var(--chops-primary-font-color);
+          font-size: var(--chops-main-font-size);
+        }
+        main {
+          border-top: var(--chops-normal-border);
+        }
+        .snackbar-container {
+          position: fixed;
+          bottom: 1em;
+          left: 1em;
+          display: flex;
+          flex-direction: column;
+          align-items: flex-start;
+          z-index: 1000;
+        }
+        /** Unfix <chops-snackbar> to allow stacking. */
+        chops-snackbar {
+          position: static;
+          margin-top: 0.5em;
+        }
+      </style>
+      <mr-header
+        .userDisplayName=${this.userDisplayName}
+        .loginUrl=${this.loginUrl}
+        .logoutUrl=${this.logoutUrl}
+      ></mr-header>
+      <chops-announcement service="monorail"></chops-announcement>
+      <mr-site-banner></mr-site-banner>
+      <mr-cue
+        cuePrefName=${cueNames.SWITCH_TO_PARENT_ACCOUNT}
+        .loginUrl=${this.loginUrl}
+        centered
+        nondismissible
+      ></mr-cue>
+      <mr-cue
+        cuePrefName=${cueNames.SEARCH_FOR_NUMBERS}
+        centered
+      ></mr-cue>
+      <main>${this._renderPage()}</main>
+      <div class="snackbar-container" aria-live="polite">
+        ${repeat(this._snackbars, (snackbar) => html`
+          <chops-snackbar
+            @close=${this._closeSnackbar.bind(this, snackbar.id)}
+          >${snackbar.text}</chops-snackbar>
+        `)}
+      </div>
+    `;
+  }
+
+  /**
+   * @param {string} id The name of the snackbar to close.
+   */
+  _closeSnackbar(id) {
+    store.dispatch(ui.hideSnackbar(id));
+  }
+
+  /**
+   * Helper for determiing which page component to render.
+   * @return {TemplateResult}
+   */
+  _renderPage() {
+    switch (this.page) {
+      case 'detail':
+        return html`
+          <mr-issue-page
+            .userDisplayName=${this.userDisplayName}
+            .loginUrl=${this.loginUrl}
+          ></mr-issue-page>
+        `;
+      case 'entry':
+        return html`
+          <mr-issue-entry-page
+            .userDisplayName=${this.userDisplayName}
+            .loginUrl=${this.loginUrl}
+          ></mr-issue-entry-page>
+        `;
+      case 'grid':
+        return html`
+          <mr-grid-page
+            .userDisplayName=${this.userDisplayName}
+          ></mr-grid-page>
+        `;
+      case 'list':
+        return html`
+          <mr-list-page
+            .userDisplayName=${this.userDisplayName}
+          ></mr-list-page>
+        `;
+      case 'chart':
+        return html`<mr-chart-page></mr-chart-page>`;
+      case 'projects':
+        return html`<mr-projects-page></mr-projects-page>`;
+      case 'hotlist-issues':
+        return html`<mr-hotlist-issues-page></mr-hotlist-issues-page>`;
+      case 'hotlist-people':
+        return html`<mr-hotlist-people-page></mr-hotlist-people-page>`;
+      case 'hotlist-settings':
+        return html`<mr-hotlist-settings-page></mr-hotlist-settings-page>`;
+      default:
+        return;
+    }
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      /**
+       * Backend-generated URL for the page the user is directed to for login.
+       */
+      loginUrl: {type: String},
+      /**
+       * Backend-generated URL for the page the user is directed to for logout.
+       */
+      logoutUrl: {type: String},
+      /**
+       * The display name of the currently logged in user.
+       */
+      userDisplayName: {type: String},
+      /**
+       * The search parameters in the user's current URL.
+       */
+      queryParams: {type: Object},
+      /**
+       * A list of forms to check for "dirty" values when the user navigates
+       * across pages.
+       */
+      dirtyForms: {type: Array},
+      /**
+       * App Engine ID for the current version being viewed.
+       */
+      versionBase: {type: String},
+      /**
+       * A String identifier for the page that the user is viewing.
+       */
+      page: {type: String},
+      /**
+       * A String for the title of the page that the user will see in their
+       * browser tab. ie: equivalent to the <title> tag.
+       */
+      pageTitle: {type: String},
+      /**
+       * Array of snackbar objects to render.
+       */
+      _snackbars: {type: Array},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    this.queryParams = {};
+    this.dirtyForms = [];
+    this.userDisplayName = '';
+
+    /**
+     * @type {PageJS.Context}
+     * The context of the page. This should not be a LitElement property
+     * because we don't want to re-render when updating this.
+     */
+    this._lastContext = undefined;
+  }
+
+  /** @override */
+  createRenderRoot() {
+    return this;
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this.dirtyForms = ui.dirtyForms(state);
+    this.queryParams = sitewide.queryParams(state);
+    this.pageTitle = sitewide.pageTitle(state);
+    this._snackbars = ui.snackbars(state);
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('userDisplayName') && this.userDisplayName) {
+      // TODO(https://crbug.com/monorail/7238): Migrate userv0 calls to v3 API.
+      store.dispatch(userv0.fetch(this.userDisplayName));
+
+      // Typically we would prefer 'users/<userId>' instead.
+      store.dispatch(users.fetch(`users/${this.userDisplayName}`));
+    }
+
+    if (changedProperties.has('pageTitle')) {
+      // To ensure that changes to the page title are easy to reason about,
+      // we want to sync the current pageTitle in the Redux state to
+      // document.title in only one place in the code.
+      document.title = this.pageTitle;
+    }
+    if (changedProperties.has('page')) {
+      trackPageChange(this.page, this.userDisplayName);
+    }
+  }
+
+  /** @override */
+  connectedCallback() {
+    super.connectedCallback();
+
+    // TODO(zhangtiff): Figure out some way to save Redux state between
+    // page loads.
+
+    // page doesn't handle users reloading the page or closing a tab.
+    window.onbeforeunload = this._confirmDiscardMessage.bind(this);
+
+    // Start a cron task to periodically request the status from the server.
+    getServerStatusCron.start();
+
+    const postRouteHandler = this._postRouteHandler.bind(this);
+
+    // Populate the project route parameter before _preRouteHandler runs.
+    page('/p/:project/*', (_ctx, next) => next());
+    page('*', this._preRouteHandler.bind(this));
+
+    page('/hotlists/:hotlist', (ctx) => {
+      page.redirect(`/hotlists/${ctx.params.hotlist}/issues`);
+    });
+    page('/hotlists/:hotlist/*', this._selectHotlist);
+    page('/hotlists/:hotlist/issues',
+        this._loadHotlistIssuesPage.bind(this), postRouteHandler);
+    page('/hotlists/:hotlist/people',
+        this._loadHotlistPeoplePage.bind(this), postRouteHandler);
+    page('/hotlists/:hotlist/settings',
+        this._loadHotlistSettingsPage.bind(this), postRouteHandler);
+
+    // Handle Monorail's landing page.
+    page('/p', '/');
+    page('/projects', '/');
+    page('/hosting', '/');
+    page('/', this._loadProjectsPage.bind(this), postRouteHandler);
+
+    page('/p/:project/issues/list', this._loadListPage.bind(this),
+        postRouteHandler);
+    page('/p/:project/issues/detail', this._loadIssuePage.bind(this),
+        postRouteHandler);
+    page('/p/:project/issues/entry_new', this._loadEntryPage.bind(this),
+        postRouteHandler);
+    page('/p/:project/issues/wizard', this._loadWizardPage.bind(this),
+        postRouteHandler);
+
+    // Redirects from old hotlist pages to SPA hotlist pages.
+    const hotlistRedirect = (pageName) => async (ctx) => {
+      const name =
+          await hotlists.getHotlistName(ctx.params.user, ctx.params.hotlist);
+      page.redirect(`/${name}/${pageName}`);
+    };
+    page('/users/:user/hotlists/:hotlist', hotlistRedirect('issues'));
+    page('/users/:user/hotlists/:hotlist/people', hotlistRedirect('people'));
+    page('/users/:user/hotlists/:hotlist/details', hotlistRedirect('settings'));
+
+    page();
+  }
+
+  /**
+   * Handler that runs on every single route change, before the new page has
+   * loaded. This function should not use store.dispatch() or assign properties
+   * on this because running these actions causes extra re-renders to happen.
+   * @param {PageJS.Context} ctx A page.js Context containing routing state.
+   * @param {function} next Passes execution on to the next registered callback.
+   */
+  _preRouteHandler(ctx, next) {
+    // We're not really navigating anywhere, so don't do anything.
+    if (this._lastContext && this._lastContext.path &&
+      ctx.path === this._lastContext.path) {
+      Object.assign(ctx, this._lastContext);
+      // Set ctx.handled to false, so we don't push the state to browser's
+      // history.
+      ctx.handled = false;
+      return;
+    }
+
+    // Check if there were forms with unsaved data before loading the next
+    // page.
+    const discardMessage = this._confirmDiscardMessage();
+    if (discardMessage && !confirm(discardMessage)) {
+      Object.assign(ctx, this._lastContext);
+      // Set ctx.handled to false, so we don't push the state to browser's
+      // history.
+      ctx.handled = false;
+      // We don't call next to avoid loading whatever page was supposed to
+      // load next.
+      return;
+    }
+
+    // Run query string parsing on all routes. Query params must be parsed
+    // before routes are loaded because some routes use them to conditionally
+    // load bundles.
+    // Based on: https://visionmedia.github.io/page.js/#plugins
+    const params = qs.parse(ctx.querystring);
+
+    // Make sure queryParams are not case sensitive.
+    const lowerCaseParams = {};
+    Object.keys(params).forEach((key) => {
+      lowerCaseParams[key.toLowerCase()] = params[key];
+    });
+    ctx.queryParams = lowerCaseParams;
+
+    this._selectProject(ctx.params.project);
+
+    next();
+  }
+
+  /**
+   * Handler that runs on every single route change, after the new page has
+   * loaded.
+   * @param {PageJS.Context} ctx A page.js Context containing routing state.
+   * @param {function} next Passes execution on to the next registered callback.
+   */
+  _postRouteHandler(ctx, next) {
+    // Scroll to the requested element if a hash is present.
+    if (ctx.hash) {
+      store.dispatch(ui.setFocusId(ctx.hash));
+    }
+
+    // Sync queryParams to Redux after the route has loaded, rather than before,
+    // to avoid having extra queryParams update on the previously loaded
+    // component.
+    store.dispatch(sitewide.setQueryParams(ctx.queryParams));
+
+    // Increment the count of navigations in the Redux store.
+    store.dispatch(ui.incrementNavigationCount());
+
+    // Clear dirty forms when entering a new page.
+    store.dispatch(ui.clearDirtyForms());
+
+
+    if (!this._lastContext || this._lastContext.pathname !== ctx.pathname ||
+        this._hasReleventParamChanges(ctx.queryParams,
+            this._lastContext.queryParams)) {
+      // Reset the scroll position after a new page has rendered.
+      window.scrollTo(0, 0);
+    }
+
+    // Save the context of this page to be compared to later.
+    this._lastContext = ctx;
+  }
+
+  /**
+   * Finds if a route change changed query params in a way that should cause
+   * scrolling to reset.
+   * @param {Object} currentParams
+   * @param {Object} oldParams
+   * @param {Array<string>=} paramsToCompare Which params to check.
+   * @return {boolean} Whether any of the relevant query params changed.
+   */
+  _hasReleventParamChanges(currentParams, oldParams,
+      paramsToCompare = QUERY_PARAMS_THAT_RESET_SCROLL) {
+    return paramsToCompare.some((paramName) => {
+      return currentParams[paramName] !== oldParams[paramName];
+    });
+  }
+
+  /**
+   * Helper to manage syncing project route state to Redux.
+   * @param {string=} project displayName for a referenced project.
+   *   Defaults to null for consistency with Redux.
+   */
+  _selectProject(project = null) {
+    if (projectV0.viewedProjectName(store.getState()) !== project) {
+      // Note: We want to update the project even if the new project
+      // is null.
+      store.dispatch(projectV0.select(project));
+      if (project) {
+        store.dispatch(projectV0.fetch(project));
+      }
+    }
+  }
+
+  /**
+   * Loads and triggers rendering for the list of all projects.
+   * @param {PageJS.Context} ctx A page.js Context containing routing state.
+   * @param {function} next Passes execution on to the next registered callback.
+   */
+  async _loadProjectsPage(ctx, next) {
+    await import(/* webpackChunkName: "mr-projects-page" */
+        '../projects/mr-projects-page/mr-projects-page.js');
+    this.page = 'projects';
+    next();
+  }
+
+  /**
+   * Loads and triggers render for the issue detail page.
+   * @param {PageJS.Context} ctx A page.js Context containing routing state.
+   * @param {function} next Passes execution on to the next registered callback.
+   */
+  async _loadIssuePage(ctx, next) {
+    performance.clearMarks('start load issue detail page');
+    performance.mark('start load issue detail page');
+
+    await import(/* webpackChunkName: "mr-issue-page" */
+        '../issue-detail/mr-issue-page/mr-issue-page.js');
+
+    const issueRef = {
+      localId: Number.parseInt(ctx.queryParams.id),
+      projectName: ctx.params.project,
+    };
+    store.dispatch(issueV0.viewIssue(issueRef));
+    store.dispatch(issueV0.fetchIssuePageData(issueRef));
+    this.page = 'detail';
+    next();
+  }
+
+  /**
+   * Loads and triggers render for the issue list page, including the list,
+   * grid, and chart modes.
+   * @param {PageJS.Context} ctx A page.js Context containing routing state.
+   * @param {function} next Passes execution on to the next registered callback.
+   */
+  async _loadListPage(ctx, next) {
+    performance.clearMarks('start load issue list page');
+    performance.mark('start load issue list page');
+    switch (ctx.queryParams && ctx.queryParams.mode &&
+        ctx.queryParams.mode.toLowerCase()) {
+      case 'grid':
+        await import(/* webpackChunkName: "mr-grid-page" */
+            '../issue-list/mr-grid-page/mr-grid-page.js');
+        this.page = 'grid';
+        break;
+      case 'chart':
+        await import(/* webpackChunkName: "mr-chart-page" */
+            '../issue-list/mr-chart-page/mr-chart-page.js');
+        this.page = 'chart';
+        break;
+      default:
+        this.page = 'list';
+        break;
+    }
+    next();
+  }
+
+  /**
+   * Load the issue entry page
+   * @param {PageJS.Context} ctx A page.js Context containing routing state.
+   * @param {function} next Passes execution on to the next registered callback.
+   */
+  _loadEntryPage(ctx, next) {
+    this.page = 'entry';
+    next();
+  }
+
+  /**
+   * Load the issue wizard
+   * @param {PageJS.Context} ctx A page.js Context containing routing state.
+   * @param {function} next Passes execution on to the next registered callback.
+   */
+  async _loadWizardPage(ctx, next) {
+    const {renderWizard} = await import(
+        /* webpackChunkName: "IssueWizard" */ '../../react/IssueWizard.tsx');
+
+    this.page = 'wizard';
+    next();
+
+    await this.updateComplete;
+
+    const mount = document.getElementById('reactMount');
+
+    renderWizard(mount);
+  }
+
+  /**
+   * Gets the currently viewed HotlistRef from the URL, selects
+   * it in the Redux store, and fetches the Hotlist data.
+   * @param {PageJS.Context} ctx A page.js Context containing routing state.
+   * @param {function} next Passes execution on to the next registered callback.
+   */
+  _selectHotlist(ctx, next) {
+    const name = 'hotlists/' + ctx.params.hotlist;
+    store.dispatch(hotlists.select(name));
+    store.dispatch(hotlists.fetch(name));
+    store.dispatch(hotlists.fetchItems(name));
+    store.dispatch(permissions.batchGet([name]));
+    next();
+  }
+
+  /**
+   * Loads mr-hotlist-issues-page.js and makes it the currently viewed page.
+   * @param {PageJS.Context} ctx A page.js Context containing routing state.
+   * @param {function} next Passes execution on to the next registered callback.
+   */
+  async _loadHotlistIssuesPage(ctx, next) {
+    await import(/* webpackChunkName: "mr-hotlist-issues-page" */
+        `../hotlist/mr-hotlist-issues-page/mr-hotlist-issues-page.js`);
+    this.page = 'hotlist-issues';
+    next();
+  }
+
+  /**
+   * Loads mr-hotlist-people-page.js and makes it the currently viewed page.
+   * @param {PageJS.Context} ctx A page.js Context containing routing state.
+   * @param {function} next Passes execution on to the next registered callback.
+   */
+  async _loadHotlistPeoplePage(ctx, next) {
+    await import(/* webpackChunkName: "mr-hotlist-people-page" */
+        `../hotlist/mr-hotlist-people-page/mr-hotlist-people-page.js`);
+    this.page = 'hotlist-people';
+    next();
+  }
+
+  /**
+   * Loads mr-hotlist-settings-page.js and makes it the currently viewed page.
+   * @param {PageJS.Context} ctx A page.js Context containing routing state.
+   * @param {function} next Passes execution on to the next registered callback.
+   */
+  async _loadHotlistSettingsPage(ctx, next) {
+    await import(/* webpackChunkName: "mr-hotlist-settings-page" */
+        `../hotlist/mr-hotlist-settings-page/mr-hotlist-settings-page.js`);
+    this.page = 'hotlist-settings';
+    next();
+  }
+
+  /**
+   * Constructs a message to warn users about dirty forms when they navigate
+   * away from a page, to prevent them from loasing data.
+   * @return {string} Message shown to users to warn about in flight form
+   *   changes.
+   */
+  _confirmDiscardMessage() {
+    if (!this.dirtyForms.length) return null;
+    const dirtyFormsMessage =
+      'Discard your changes in the following forms?\n' +
+      arrayToEnglish(this.dirtyForms);
+    return dirtyFormsMessage;
+  }
+}
+
+customElements.define('mr-app', MrApp);
diff --git a/static_src/elements/mr-app/mr-app.test.js b/static_src/elements/mr-app/mr-app.test.js
new file mode 100644
index 0000000..47b953b
--- /dev/null
+++ b/static_src/elements/mr-app/mr-app.test.js
@@ -0,0 +1,300 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {MrApp} from './mr-app.js';
+import {store, resetState} from 'reducers/base.js';
+import {select} from 'reducers/projectV0.js';
+
+let element;
+let next;
+
+window.CS_env = {
+  token: 'foo-token',
+};
+
+describe('mr-app', () => {
+  beforeEach(() => {
+    global.ga = sinon.spy();
+    store.dispatch(resetState());
+    element = document.createElement('mr-app');
+    document.body.appendChild(element);
+    element.formsToCheck = [];
+
+    next = sinon.stub();
+  });
+
+  afterEach(() => {
+    global.ga.resetHistory();
+    document.body.removeChild(element);
+    next.reset();
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrApp);
+  });
+
+  describe('snackbar handling', () => {
+    beforeEach(() => {
+      sinon.spy(store, 'dispatch');
+    });
+
+    afterEach(() => {
+      store.dispatch.restore();
+    });
+
+    it('renders no snackbars', async () => {
+      element._snackbars = [];
+
+      await element.updateComplete;
+
+      const snackbars = element.querySelectorAll('chops-snackbar');
+
+      assert.equal(snackbars.length, 0);
+    });
+
+    it('renders multiple snackbars', async () => {
+      element._snackbars = [
+        {text: 'Snackbar one', id: 'one'},
+        {text: 'Snackbar two', id: 'two'},
+        {text: 'Snackbar three', id: 'thre'},
+      ];
+
+      await element.updateComplete;
+
+      const snackbars = element.querySelectorAll('chops-snackbar');
+
+      assert.equal(snackbars.length, 3);
+
+      assert.include(snackbars[0].textContent, 'Snackbar one');
+      assert.include(snackbars[1].textContent, 'Snackbar two');
+      assert.include(snackbars[2].textContent, 'Snackbar three');
+    });
+
+    it('closing snackbar hides snackbar', async () => {
+      element._snackbars = [
+        {text: 'Snackbar', id: 'one'},
+      ];
+
+      await element.updateComplete;
+
+      const snackbar = element.querySelector('chops-snackbar');
+
+      snackbar.close();
+
+      sinon.assert.calledWith(store.dispatch,
+          {type: 'HIDE_SNACKBAR', id: 'one'});
+    });
+  });
+
+  it('_preRouteHandler calls next()', () => {
+    const ctx = {params: {}};
+
+    element._preRouteHandler(ctx, next);
+
+    sinon.assert.calledOnce(next);
+  });
+
+  it('_preRouteHandler does not call next() on same page nav', () => {
+    element._lastContext = {path: '123'};
+    const ctx = {params: {}, path: '123'};
+
+    element._preRouteHandler(ctx, next);
+
+    assert.isFalse(ctx.handled);
+    sinon.assert.notCalled(next);
+  });
+
+  it('_preRouteHandler parses queryParams', () => {
+    const ctx = {params: {}, querystring: 'q=owner:me&colspec=Summary'};
+    element._preRouteHandler(ctx, next);
+
+    assert.deepEqual(ctx.queryParams, {q: 'owner:me', colspec: 'Summary'});
+  });
+
+  it('_preRouteHandler ignores case for queryParams keys', () => {
+    const ctx = {params: {},
+      querystring: 'Q=owner:me&ColSpeC=Summary&x=owner'};
+    element._preRouteHandler(ctx, next);
+
+    assert.deepEqual(ctx.queryParams, {q: 'owner:me', colspec: 'Summary',
+      x: 'owner'});
+  });
+
+  it('_preRouteHandler ignores case for queryParams keys', () => {
+    const ctx = {params: {},
+      querystring: 'Q=owner:me&ColSpeC=Summary&x=owner'};
+    element._preRouteHandler(ctx, next);
+
+    assert.deepEqual(ctx.queryParams, {q: 'owner:me', colspec: 'Summary',
+      x: 'owner'});
+  });
+
+  it('_postRouteHandler saves ctx.queryParams to Redux', () => {
+    const ctx = {queryParams: {q: '1234'}};
+    element._postRouteHandler(ctx, next);
+
+    assert.deepEqual(element.queryParams, {q: '1234'});
+  });
+
+  it('_postRouteHandler saves ctx to this._lastContext', () => {
+    const ctx = {path: '1234'};
+    element._postRouteHandler(ctx, next);
+
+    assert.deepEqual(element._lastContext, {path: '1234'});
+  });
+
+  describe('scroll to the top on page changes', () => {
+    beforeEach(() => {
+      sinon.stub(window, 'scrollTo');
+    });
+
+    afterEach(() => {
+      window.scrollTo.restore();
+    });
+
+    it('scrolls page to top on initial load', () => {
+      element._lastContext = null;
+      const ctx = {params: {}, path: '1234'};
+      element._postRouteHandler(ctx, next);
+
+      sinon.assert.calledWith(window.scrollTo, 0, 0);
+    });
+
+    it('scrolls page to top on parh change', () => {
+      element._lastContext = {params: {}, pathname: '/list',
+        path: '/list?q=123', querystring: '?q=123', queryParams: {q: '123'}};
+      const ctx = {params: {}, pathname: '/other',
+        path: '/other?q=123', querystring: '?q=123', queryParams: {q: '123'}};
+
+      element._postRouteHandler(ctx, next);
+
+      sinon.assert.calledWith(window.scrollTo, 0, 0);
+    });
+
+    it('does not scroll to top when on the same path', () => {
+      element._lastContext = {pathname: '/list', path: '/list?q=123',
+        querystring: '?a=123', queryParams: {a: '123'}};
+      const ctx = {pathname: '/list', path: '/list?q=456',
+        querystring: '?a=456', queryParams: {a: '456'}};
+
+      element._postRouteHandler(ctx, next);
+
+      sinon.assert.notCalled(window.scrollTo);
+    });
+
+    it('scrolls to the top on same path when q param changes', () => {
+      element._lastContext = {pathname: '/list', path: '/list?q=123',
+        querystring: '?q=123', queryParams: {q: '123'}};
+      const ctx = {pathname: '/list', path: '/list?q=456',
+        querystring: '?q=456', queryParams: {q: '456'}};
+
+      element._postRouteHandler(ctx, next);
+
+      sinon.assert.calledWith(window.scrollTo, 0, 0);
+    });
+  });
+
+
+  it('_postRouteHandler does not call next', () => {
+    const ctx = {path: '1234'};
+    element._postRouteHandler(ctx, next);
+
+    sinon.assert.notCalled(next);
+  });
+
+  it('_loadIssuePage loads issue page', async () => {
+    await element._loadIssuePage({
+      queryParams: {id: '234'},
+      params: {project: 'chromium'},
+    }, next);
+    await element.updateComplete;
+
+    // Check that only one page element is rendering at a time.
+    const main = element.querySelector('main');
+    assert.equal(main.children.length, 1);
+
+    const issuePage = element.querySelector('mr-issue-page');
+    assert.isDefined(issuePage, 'issue page is defined');
+    assert.equal(issuePage.issueRef.projectName, 'chromium');
+    assert.equal(issuePage.issueRef.localId, 234);
+  });
+
+  it('_loadListPage loads list page', async () => {
+    await element._loadListPage({
+      params: {project: 'chromium'},
+    }, next);
+    await element.updateComplete;
+
+    // Check that only one page element is rendering at a time.
+    const main = element.querySelector('main');
+    assert.equal(main.children.length, 1);
+
+    const listPage = element.querySelector('mr-list-page');
+    assert.isDefined(listPage, 'list page is defined');
+  });
+
+  it('_loadListPage loads grid page', async () => {
+    element.queryParams = {mode: 'grid'};
+    await element._loadListPage({
+      params: {project: 'chromium'},
+    }, next);
+    await element.updateComplete;
+
+    // Check that only one page element is rendering at a time.
+    const main = element.querySelector('main');
+    assert.equal(main.children.length, 1);
+
+    const gridPage = element.querySelector('mr-grid-page');
+    assert.isDefined(gridPage, 'grid page is defined');
+  });
+
+  describe('_selectProject', () => {
+    beforeEach(() => {
+      sinon.spy(store, 'dispatch');
+    });
+
+    afterEach(() => {
+      store.dispatch.restore();
+    });
+
+    it('selects and fetches project', () => {
+      const projectName = 'chromium';
+      assert.notEqual(store.getState().projectV0.name, projectName);
+
+      element._selectProject(projectName);
+
+      sinon.assert.calledTwice(store.dispatch);
+    });
+
+    it('skips selecting and fetching when project isn\'t changing', () => {
+      const projectName = 'chromium';
+
+      store.dispatch.restore();
+      store.dispatch(select(projectName));
+      sinon.spy(store, 'dispatch');
+
+      assert.equal(store.getState().projectV0.name, projectName);
+
+      element._selectProject(projectName);
+
+      sinon.assert.notCalled(store.dispatch);
+    });
+
+    it('selects without fetching when transitioning to null', () => {
+      const projectName = 'chromium';
+
+      store.dispatch.restore();
+      store.dispatch(select(projectName));
+      sinon.spy(store, 'dispatch');
+
+      assert.equal(store.getState().projectV0.name, projectName);
+
+      element._selectProject(null);
+
+      sinon.assert.calledOnce(store.dispatch);
+    });
+  });
+});
diff --git a/static_src/elements/projects/mr-projects-page/helpers.js b/static_src/elements/projects/mr-projects-page/helpers.js
new file mode 100644
index 0000000..5c12ae8
--- /dev/null
+++ b/static_src/elements/projects/mr-projects-page/helpers.js
@@ -0,0 +1,30 @@
+// Copyright 2020 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.
+
+import {projectMemberToProjectName} from 'shared/converters.js';
+
+// TODO(crbug.com/monorail/7910): Dedupe this with the similar "projectRoles"
+// constant in <mr-header>.
+const projectRoles = Object.freeze({
+  PROJECT_ROLE_UNSPECIFIED: '',
+  OWNER: 'Owner',
+  COMMITTER: 'Committer',
+  CONTRIBUTOR: 'Contributor',
+});
+
+/**
+ * Creates a mapping of project names to the user's role in that project.
+ * @param {Array<ProjectMember>} projectMembers Project memebrships
+ *   for a given user.
+ * @return {Object<ProjectName, string>} Mapping of a user's roles,
+ *   by project name.
+ */
+export function computeRoleByProjectName(projectMembers) {
+  const mapping = {};
+  if (!projectMembers) return mapping;
+  projectMembers.forEach(({name, role}) => {
+    mapping[projectMemberToProjectName(name)] = projectRoles[role];
+  });
+  return mapping;
+}
diff --git a/static_src/elements/projects/mr-projects-page/helpers.test.js b/static_src/elements/projects/mr-projects-page/helpers.test.js
new file mode 100644
index 0000000..9e3c5a2
--- /dev/null
+++ b/static_src/elements/projects/mr-projects-page/helpers.test.js
@@ -0,0 +1,24 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import {computeRoleByProjectName} from './helpers.js';
+
+describe('computeRoleByProjectName', () => {
+  it('handles empty project memberships', () => {
+    assert.deepEqual(computeRoleByProjectName(undefined), {});
+    assert.deepEqual(computeRoleByProjectName([]), {});
+  });
+
+  it('creates mapping', () => {
+    const projectMembers = [
+      {role: 'OWNER', name: 'projects/project-name/members/1234'},
+      {role: 'COMMITTER', name: 'projects/test/members/1234'},
+    ];
+    assert.deepEqual(computeRoleByProjectName(projectMembers), {
+      'projects/project-name': 'Owner',
+      'projects/test': 'Committer',
+    });
+  });
+});
diff --git a/static_src/elements/projects/mr-projects-page/mr-projects-page.js b/static_src/elements/projects/mr-projects-page/mr-projects-page.js
new file mode 100644
index 0000000..1124ef0
--- /dev/null
+++ b/static_src/elements/projects/mr-projects-page/mr-projects-page.js
@@ -0,0 +1,297 @@
+// Copyright 2019 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.
+
+import {LitElement, html, css} from 'lit-element';
+import {store, connectStore} from 'reducers/base.js';
+import {SHARED_STYLES} from 'shared/shared-styles.js';
+import 'elements/framework/mr-star/mr-project-star.js';
+import 'shared/typedef.js';
+import 'elements/chops/chops-chip/chops-chip.js';
+
+import * as projects from 'reducers/projects.js';
+import {users} from 'reducers/users.js';
+import {stars} from 'reducers/stars.js';
+import {computeRoleByProjectName} from './helpers.js';
+
+
+/**
+ * `<mr-projects-page>`
+ *
+ * Displays list of all projects.
+ *
+ */
+export class MrProjectsPage extends connectStore(LitElement) {
+  /** @override */
+  static get styles() {
+    return [
+      SHARED_STYLES,
+      css`
+        :host {
+          box-sizing: border-box;
+          display: block;
+          padding: 1em 8px;
+          padding-left: 40px; /** 32px + 8px */
+          margin: auto;
+          max-width: 1280px;
+          width: 100%;
+        }
+        :host::after {
+          content: "";
+          background-image: url('/static/images/chromium.svg');
+          background-repeat: no-repeat;
+          background-position: right -100px bottom -150px;
+          background-size: 700px;
+          opacity: 0.09;
+          width: 100%;
+          height: 100%;
+          bottom: 0;
+          right: 0;
+          position: fixed;
+          z-index: -1;
+        }
+        h2 {
+          font-size: 20px;
+          letter-spacing: 0.1px;
+          font-weight: 500;
+          margin-top: 1em;
+        }
+        .project-header {
+          display: flex;
+          align-items: flex-start;
+          flex-direction: row;
+          justify-content: space-between;
+          font-size: 16px;
+          line-height: 24px;
+          margin: 0;
+          margin-bottom: 16px;
+          padding-top: 0.1em;
+          padding-bottom: 16px;
+          letter-spacing: 0.1px;
+          font-weight: 500;
+          width: 100%;
+          border-bottom: var(--chops-normal-border);
+          border-color: var(--chops-gray-400);
+        }
+        .project-title {
+          display: flex;
+          flex-direction: column;
+        }
+        h3 {
+          margin: 0;
+          padding: 0;
+          font-weight: inherit;
+          font-size: inherit;
+          transition: color var(--chops-transition-time) ease-in-out;
+        }
+        h3:hover {
+          color: var(--chops-link-color);
+        }
+        .subtitle {
+          color: var(--chops-gray-700);
+          font-size: var(--chops-main-font-size);
+          line-height: 100%;
+          font-weight: normal;
+        }
+        .project-container {
+          display: flex;
+          align-items: stretch;
+          flex-wrap: wrap;
+          width: 100%;
+          padding: 0.5em 0;
+          margin-bottom: 3em;
+        }
+        .project {
+          background: var(--chops-white);
+          width: 220px;
+          margin-right: 32px;
+          margin-bottom: 32px;
+          display: flex;
+          flex-direction: column;
+          align-items: flex-start;
+          justify-content: flex-start;
+          border-radius: 4px;
+          border: var(--chops-normal-border);
+          padding: 16px;
+          color: var(--chops-primary-font-color);
+          font-weight: normal;
+          line-height: 16px;
+          transition: all var(--chops-transition-time) ease-in-out;
+        }
+        .project:hover {
+          text-decoration: none;
+          cursor: pointer;
+          box-shadow: 0 2px 6px hsla(0,0%,0%,0.12),
+            0 1px 3px hsla(0,0%,0%,0.24);
+        }
+        .project > p {
+          margin: 0;
+          margin-bottom: 32px;
+          flex-grow: 1;
+        }
+        .view-project-link {
+          text-transform: uppercase;
+          margin: 0;
+          font-weight: 600;
+          flex-grow: 0;
+        }
+        .view-project-link:hover {
+          text-decoration: underline;
+        }
+      `,
+    ];
+  }
+
+  /** @override */
+  render() {
+    const myProjects = this.myProjects;
+    const otherProjects = this.otherProjects;
+    const noProjects = !myProjects.length && !otherProjects.length;
+
+    if (this._isFetchingProjects && noProjects) {
+      return html`Loading...`;
+    }
+
+    if (noProjects) {
+      return html`No projects found.`;
+    }
+
+    if (!myProjects.length) {
+      // Skip sorting projects into different sections if the user
+      // has no projects.
+      return html`
+        <h2>All projects</h2>
+        <div class="project-container all-projects">
+          ${otherProjects.map((project) => this._renderProject(project))}
+        </div>
+      `;
+    }
+
+    const myProjectsTemplate = myProjects.map((project) => this._renderProject(
+        project, this._roleByProjectName[project.name]));
+
+    return html`
+      <h2>My projects</h2>
+      <div class="project-container my-projects">
+        ${myProjectsTemplate}
+      </div>
+
+      <h2>Other projects</h2>
+      <div class="project-container other-projects">
+        ${otherProjects.map((project) => this._renderProject(project))}
+      </div>
+    `;
+  }
+
+  /** @override */
+  static get properties() {
+    return {
+      _projects: {type: Array},
+      _isFetchingProjects: {type: Boolean},
+      _currentUser: {type: String},
+      _roleByProjectName: {type: Array},
+    };
+  }
+
+  /** @override */
+  constructor() {
+    super();
+    /**
+     * @type {Array<Project>}
+     */
+    this._projects = [];
+    /**
+     * @type {boolean}
+     */
+    this._isFetchingProjects = false;
+    /**
+     * @type {string}
+     */
+    this._currentUser = undefined;
+    /**
+     * @type {Object<ProjectName, string>}
+     */
+    this._roleByProjectName = {};
+  }
+
+  /** @override */
+  connectedCallback() {
+    super.connectedCallback();
+    store.dispatch(projects.list());
+  }
+
+  /** @override */
+  updated(changedProperties) {
+    if (changedProperties.has('_currentUser') && this._currentUser) {
+      const userName = this._currentUser;
+      store.dispatch(users.gatherProjectMemberships(userName));
+      store.dispatch(stars.listProjects(userName));
+    }
+  }
+
+  /** @override */
+  stateChanged(state) {
+    this._projects = projects.all(state);
+    this._isFetchingProjects = projects.requests(state).list.requesting;
+    this._currentUser = users.currentUserName(state);
+    const allProjectMemberships = users.projectMemberships(state);
+    this._roleByProjectName = computeRoleByProjectName(
+        allProjectMemberships[this._currentUser]);
+  }
+
+  /**
+   * @param {Project} project
+   * @param {string=} role
+   * @return {TemplateResult}
+   */
+  _renderProject(project, role) {
+    return html`
+      <a href="/p/${project.displayName}/issues/list" class="project">
+        <div class="project-header">
+          <span class="project-title">
+            <h3>${project.displayName}</h3>
+            <span class="subtitle" ?hidden=${!role} title="My role: ${role}">
+              Role: ${role}
+            </span>
+          </span>
+
+          <mr-project-star .name=${project.name}></mr-project-star>
+        </div>
+        <p>
+          ${project.summary}
+        </p>
+        <button class="view-project-link linkify">
+          View project
+        </button>
+      </a>
+    `;
+  }
+
+  /**
+   * Projects the currently logged in user is a member of.
+   * @return {Array<Project>}
+   */
+  get myProjects() {
+    return this._projects.filter(
+        ({name}) => this._userIsMemberOfProject(name));
+  }
+
+  /**
+   * Projects the currently logged in user is not a member of.
+   * @return {Array<Project>}
+   */
+  get otherProjects() {
+    return this._projects.filter(
+        ({name}) => !this._userIsMemberOfProject(name));
+  }
+
+  /**
+   * Helper to check if a user is a member of a project.
+   * @param {ProjectName} project Resource name of a project.
+   * @return {boolean} Whether the user a member of the given project.
+   */
+  _userIsMemberOfProject(project) {
+    return project in this._roleByProjectName;
+  }
+}
+customElements.define('mr-projects-page', MrProjectsPage);
diff --git a/static_src/elements/projects/mr-projects-page/mr-projects-page.test.js b/static_src/elements/projects/mr-projects-page/mr-projects-page.test.js
new file mode 100644
index 0000000..1a9a1e4
--- /dev/null
+++ b/static_src/elements/projects/mr-projects-page/mr-projects-page.test.js
@@ -0,0 +1,248 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {prpcClient} from 'prpc-client-instance.js';
+import {stateUpdated} from 'reducers/base.js';
+import {users} from 'reducers/users.js';
+import {stars} from 'reducers/stars.js';
+import {MrProjectsPage} from './mr-projects-page.js';
+
+let element;
+
+describe('mr-projects-page', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-projects-page');
+    document.body.appendChild(element);
+
+    sinon.stub(element, 'stateChanged');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrProjectsPage);
+  });
+
+  it('renders loading', async () => {
+    element._isFetchingProjects = true;
+
+    await element.updateComplete;
+
+    assert.equal(element.shadowRoot.textContent.trim(), 'Loading...');
+  });
+
+  it('renders projects when refetching projects', async () => {
+    element._isFetchingProjects = true;
+    element._projects = [
+      {name: 'projects/chromium', displayName: 'chromium',
+        summary: 'Best project ever'},
+    ];
+
+    await element.updateComplete;
+
+    const headers = element.shadowRoot.querySelectorAll('h2');
+
+    assert.equal(headers.length, 1);
+    assert.equal(headers[0].textContent.trim(), 'All projects');
+
+    const projects = element.shadowRoot.querySelectorAll(
+        '.all-projects > .project');
+    assert.equal(projects.length, 1);
+
+    assert.include(projects[0].querySelector('h3').textContent, 'chromium');
+    assert.include(projects[0].textContent, 'Best project ever');
+  });
+
+  it('renders all projects when no user projects', async () => {
+    element._isFetchingProjects = false;
+    element._projects = [
+      {name: 'projects/chromium', displayName: 'chromium',
+        summary: 'Best project ever'},
+      {name: 'projects/infra', displayName: 'infra',
+        summary: 'Make it work'},
+    ];
+
+    await element.updateComplete;
+
+    const headers = element.shadowRoot.querySelectorAll('h2');
+
+    assert.equal(headers.length, 1);
+    assert.equal(headers[0].textContent.trim(), 'All projects');
+
+    const projects = element.shadowRoot.querySelectorAll(
+        '.all-projects > .project');
+    assert.equal(projects.length, 2);
+
+    assert.include(projects[0].querySelector('h3').textContent, 'chromium');
+    assert.include(projects[0].textContent, 'Best project ever');
+
+    assert.include(projects[1].querySelector('h3').textContent, 'infra');
+    assert.include(projects[1].textContent, 'Make it work');
+  });
+
+  it('renders no projects found', async () => {
+    element._isFetchingProjects = false;
+    sinon.stub(element, 'myProjects').get(() => []);
+    sinon.stub(element, 'otherProjects').get(() => []);
+
+    await element.updateComplete;
+
+    assert.equal(element.shadowRoot.textContent.trim(), 'No projects found.');
+  });
+
+  describe('project grouping', () => {
+    beforeEach(() => {
+      element._projects = [
+        {name: 'projects/chromium', displayName: 'chromium',
+          summary: 'Best project ever'},
+        {name: 'projects/infra', displayName: 'infra',
+          summary: 'Make it work'},
+        {name: 'projects/test', displayName: 'test',
+          summary: 'Hmm'},
+        {name: 'projects/a-project', displayName: 'a-project',
+          summary: 'I am Monkeyrail'},
+      ];
+      element._roleByProjectName = {
+        'projects/chromium': 'Owner',
+        'projects/infra': 'Committer',
+      };
+      element._isFetchingProjects = false;
+    });
+
+    it('myProjects filters out non-member projects', () => {
+      assert.deepEqual(element.myProjects, [
+        {name: 'projects/chromium', displayName: 'chromium',
+          summary: 'Best project ever'},
+        {name: 'projects/infra', displayName: 'infra',
+          summary: 'Make it work'},
+      ]);
+    });
+
+    it('otherProjects filters out member projects', () => {
+      assert.deepEqual(element.otherProjects, [
+        {name: 'projects/test', displayName: 'test',
+          summary: 'Hmm'},
+        {name: 'projects/a-project', displayName: 'a-project',
+          summary: 'I am Monkeyrail'},
+      ]);
+    });
+
+    it('renders user projects', async () => {
+      await element.updateComplete;
+
+      const projects = element.shadowRoot.querySelectorAll(
+          '.my-projects > .project');
+
+      assert.equal(projects.length, 2);
+      assert.include(projects[0].querySelector('h3').textContent, 'chromium');
+      assert.include(projects[0].textContent, 'Best project ever');
+      assert.include(projects[0].querySelector('.subtitle').textContent,
+          'Owner');
+
+      assert.include(projects[1].querySelector('h3').textContent, 'infra');
+      assert.include(projects[1].textContent, 'Make it work');
+      assert.include(projects[1].querySelector('.subtitle').textContent,
+          'Committer');
+    });
+
+    it('renders other projects', async () => {
+      await element.updateComplete;
+
+      const projects = element.shadowRoot.querySelectorAll(
+          '.other-projects > .project');
+
+      assert.equal(projects.length, 2);
+      assert.include(projects[0].querySelector('h3').textContent, 'test');
+      assert.include(projects[0].textContent, 'Hmm');
+
+      assert.include(projects[1].querySelector('h3').textContent, 'a-project');
+      assert.include(projects[1].textContent, 'I am Monkeyrail');
+    });
+  });
+});
+
+describe('mr-projects-page (connected)', () => {
+  beforeEach(() => {
+    sinon.stub(prpcClient, 'call');
+    sinon.spy(users, 'gatherProjectMemberships');
+    sinon.spy(stars, 'listProjects');
+
+    element = document.createElement('mr-projects-page');
+  });
+
+  afterEach(() => {
+    if (document.body.contains(element)) {
+      document.body.removeChild(element);
+    }
+
+    prpcClient.call.restore();
+    users.gatherProjectMemberships.restore();
+    stars.listProjects.restore();
+  });
+
+  it('fetches projects when connected', async () => {
+    const promise = Promise.resolve({
+      projects: [{name: 'projects/proj', displayName: 'proj',
+        summary: 'test'}],
+    });
+    prpcClient.call.returns(promise);
+
+    assert.isFalse(element._isFetchingProjects);
+    sinon.assert.notCalled(prpcClient.call);
+
+    // Trigger connectedCallback().
+    document.body.appendChild(element);
+    await stateUpdated, element.updateComplete;
+
+    sinon.assert.calledWith(prpcClient.call, 'monorail.v3.Projects',
+        'ListProjects', {});
+
+    assert.isFalse(element._isFetchingProjects);
+    assert.deepEqual(element._projects,
+        [{name: 'projects/proj', displayName: 'proj',
+          summary: 'test'}]);
+  });
+
+  it('does not gather projects when user is logged out', async () => {
+    document.body.appendChild(element);
+    element._currentUser = '';
+
+    await element.updateComplete;
+
+    sinon.assert.notCalled(users.gatherProjectMemberships);
+  });
+
+  it('gathers user projects when user is logged in', async () => {
+    document.body.appendChild(element);
+    element._currentUser = 'users/1234';
+
+    await element.updateComplete;
+
+    sinon.assert.calledOnce(users.gatherProjectMemberships);
+    sinon.assert.calledWith(users.gatherProjectMemberships, 'users/1234');
+  });
+
+  it('does not fetch stars user is logged out', async () => {
+    document.body.appendChild(element);
+    element._currentUser = '';
+
+    await element.updateComplete;
+
+    sinon.assert.notCalled(stars.listProjects);
+  });
+
+  it('fetches stars when user is logged in', async () => {
+    document.body.appendChild(element);
+    element._currentUser = 'users/1234';
+
+    await element.updateComplete;
+
+    sinon.assert.calledOnce(stars.listProjects);
+    sinon.assert.calledWith(stars.listProjects, 'users/1234');
+  });
+});
diff --git a/static_src/monitoring/client-logger.js b/static_src/monitoring/client-logger.js
new file mode 100644
index 0000000..37959c0
--- /dev/null
+++ b/static_src/monitoring/client-logger.js
@@ -0,0 +1,272 @@
+/* Copyright 2018 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.
+ */
+
+import MonorailTSMon from './monorail-ts-mon.js';
+
+/**
+ * ClientLogger is a JavaScript library for tracking events with Google
+ * Analytics and ts_mon.
+ *
+ * @example
+ * // Example usage (tracking time to create a new issue, including time spent
+ * // by the user editing stuff):
+ *
+ *
+ * // t0: on page load for /issues/new:
+ * let l = new Clientlogger('issues');
+ * l.logStart('new-issue', 'user-time');
+ *
+ * // t1: on submit for /issues/new:
+ *
+ * l.logStart('new-issue', 'server-time');
+ *
+ * // t2: on page load for /issues/detail:
+ *
+ * let l = new Clientlogger('issues');
+ *
+ * if (l.started('new-issue') {
+ *   l.logEnd('new-issue');
+ * }
+ *
+ * // This would record the following metrics:
+ *
+ * issues.new-issue {
+ *   time: t2-t0
+ * }
+ *
+ * issues.new-issue["server-time"] {
+ *   time: t2-t1
+ * }
+ *
+ * issues.new-issue["user-time"] {
+ *   time: t1-t0
+ * }
+ */
+export default class ClientLogger {
+  /**
+   * @param {string} category Arbitrary string for categorizing metrics in
+   *   this client. Used by Google Analytics for event logging.
+   */
+  constructor(category) {
+    this.category = category;
+    this.tsMon = MonorailTSMon.getGlobalClient();
+
+    const categoryKey = `ClientLogger.${category}.started`;
+    const startedEvtsStr = sessionStorage[categoryKey];
+    if (startedEvtsStr) {
+      this.startedEvents = JSON.parse(startedEvtsStr);
+    } else {
+      this.startedEvents = {};
+    }
+  }
+
+  /**
+   * @param {string} eventName Arbitrary string for the name of the event.
+   *   ie: "issue-load"
+   * @return {Object} Event object for the string checked.
+   */
+  started(eventName) {
+    return this.startedEvents[eventName];
+  }
+
+  /**
+   * Log events that bookend some activity whose duration we’re interested in.
+   * @param {string} eventName Name of the event to start.
+   * @param {string} eventLabel Arbitrary string label to tie to event.
+   */
+  logStart(eventName, eventLabel) {
+    // Tricky situation: initial new issue POST gets rejected
+    // due to form validation issues.  Start a new timer, or keep
+    // the original?
+
+    const startedEvent = this.startedEvents[eventName] || {
+      time: new Date().getTime(),
+    };
+
+    if (eventLabel) {
+      if (!startedEvent.labels) {
+        startedEvent.labels = {};
+      }
+      startedEvent.labels[eventLabel] = new Date().getTime();
+    }
+
+    this.startedEvents[eventName] = startedEvent;
+
+    sessionStorage[`ClientLogger.${this.category}.started`] =
+        JSON.stringify(this.startedEvents);
+
+    logEvent(this.category, `${eventName}-start`, eventLabel);
+  }
+
+  /**
+   * Pause the stopwatch for this event.
+   * @param {string} eventName Name of the event to pause.
+   * @param {string} eventLabel Arbitrary string label tied to the event.
+   */
+  logPause(eventName, eventLabel) {
+    if (!eventLabel) {
+      throw `logPause called for event with no label: ${eventName}`;
+    }
+
+    const startEvent = this.startedEvents[eventName];
+
+    if (!startEvent) {
+      console.warn(`logPause called for event with no logStart: ${eventName}`);
+      return;
+    }
+
+    if (!startEvent.labels[eventLabel]) {
+      console.warn(`logPause called for event label with no logStart: ` +
+        `${eventName}.${eventLabel}`);
+      return;
+    }
+
+    const elapsed = new Date().getTime() - startEvent.labels[eventLabel];
+    if (!startEvent.elapsed) {
+      startEvent.elapsed = {};
+      startEvent.elapsed[eventLabel] = 0;
+    }
+
+    // Save accumulated time.
+    startEvent.elapsed[eventLabel] += elapsed;
+
+    sessionStorage[`ClientLogger.${this.category}.started`] =
+        JSON.stringify(this.startedEvents);
+  }
+
+  /**
+   * Resume the stopwatch for this event.
+   * @param {string} eventName Name of the event to resume.
+   * @param {string} eventLabel Arbitrary string label tied to the event.
+   */
+  logResume(eventName, eventLabel) {
+    if (!eventLabel) {
+      throw `logResume called for event with no label: ${eventName}`;
+    }
+
+    const startEvent = this.startedEvents[eventName];
+
+    if (!startEvent) {
+      console.warn(`logResume called for event with no logStart: ${eventName}`);
+      return;
+    }
+
+    if (!startEvent.hasOwnProperty('elapsed') ||
+        !startEvent.elapsed.hasOwnProperty(eventLabel)) {
+      console.warn(`logResume called for event that was never paused:` +
+        `${eventName}.${eventLabel}`);
+      return;
+    }
+
+    // TODO(jeffcarp): Throw if an event is resumed twice.
+
+    startEvent.labels[eventLabel] = new Date().getTime();
+
+    sessionStorage[`ClientLogger.${this.category}.started`] =
+        JSON.stringify(this.startedEvents);
+  }
+
+  /**
+   * Stop ecording this event.
+   * @param {string} eventName Name of the event to stop recording.
+   * @param {string} eventLabel Arbitrary string label tied to the event.
+   * @param {number=} maxThresholdMs Avoid sending timing data if it took
+   *   longer than this threshold.
+   */
+  logEnd(eventName, eventLabel, maxThresholdMs=null) {
+    const startEvent = this.startedEvents[eventName];
+
+    if (!startEvent) {
+      console.warn(`logEnd called for event with no logStart: ${eventName}`);
+      return;
+    }
+
+    // If they've specified a label, report the elapsed since the start
+    // of that label.
+    if (eventLabel) {
+      if (!startEvent.labels.hasOwnProperty(eventLabel)) {
+        console.warn(`logEnd called for event + label with no logStart: ` +
+          `${eventName}/${eventLabel}`);
+        return;
+      }
+
+      this._sendTiming(startEvent, eventName, eventLabel, maxThresholdMs);
+
+      delete startEvent.labels[eventLabel];
+      if (startEvent.hasOwnProperty('elapsed')) {
+        delete startEvent.elapsed[eventLabel];
+      }
+    } else {
+      // If no label is specified, report timing for the whole event.
+      this._sendTiming(startEvent, eventName, null, maxThresholdMs);
+
+      // And also end and report any labels they had running.
+      for (const label in startEvent.labels) {
+        this._sendTiming(startEvent, eventName, label, maxThresholdMs);
+      }
+
+      delete this.startedEvents[eventName];
+    }
+
+    sessionStorage[`ClientLogger.${this.category}.started`] =
+        JSON.stringify(this.startedEvents);
+    logEvent(this.category, `${eventName}-end`, eventLabel);
+  }
+
+  /**
+   * Helper to send data on the event to TSMon.
+   * @param {Object} event Data for the event being sent.
+   * @param {string} eventName Name of the event being sent.
+   * @param {string} recordOnlyThisLabel Label to record.
+   * @param {number=} maxThresholdMs Optional threshold to drop events
+   *   if they took too long.
+   * @private
+   */
+  _sendTiming(event, eventName, recordOnlyThisLabel, maxThresholdMs=null) {
+    // Calculate elapsed.
+    let elapsed;
+    if (recordOnlyThisLabel) {
+      elapsed = new Date().getTime() - event.labels[recordOnlyThisLabel];
+      if (event.elapsed && event.elapsed[recordOnlyThisLabel]) {
+        elapsed += event.elapsed[recordOnlyThisLabel];
+      }
+    } else {
+      elapsed = new Date().getTime() - event.time;
+    }
+
+    // Return if elapsed exceeds maxThresholdMs.
+    if (maxThresholdMs !== null && elapsed > maxThresholdMs) {
+      return;
+    }
+
+    const options = {
+      'timingCategory': this.category,
+      'timingVar': eventName,
+      'timingValue': elapsed,
+    };
+    if (recordOnlyThisLabel) {
+      options['timingLabel'] = recordOnlyThisLabel;
+    }
+    ga('send', 'timing', options);
+    this.tsMon.recordUserTiming(
+        this.category, eventName, recordOnlyThisLabel, elapsed);
+  }
+}
+
+/**
+ * Log single usr events with Google Analytics.
+ * @param {string} category Category of the event.
+ * @param {string} eventAction Name of the event.
+ * @param {string=} eventLabel Optional custom string value tied to the event.
+ * @param {number=} eventValue Optional custom number value tied to the event.
+ */
+export function logEvent(category, eventAction, eventLabel, eventValue) {
+  ga('send', 'event', category, eventAction, eventLabel,
+      eventValue);
+}
+
+// Until the rest of the app is in modules, this must be exposed on window.
+window.ClientLogger = ClientLogger;
diff --git a/static_src/monitoring/client-logger.test.js b/static_src/monitoring/client-logger.test.js
new file mode 100644
index 0000000..5c88355
--- /dev/null
+++ b/static_src/monitoring/client-logger.test.js
@@ -0,0 +1,627 @@
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import ClientLogger from './client-logger.js';
+import MonorailTSMon from './monorail-ts-mon.js';
+
+describe('ClientLogger', () => {
+  const startedKey = 'ClientLogger.rutabaga.started';
+  let c;
+
+  beforeEach(() => {
+    window.CS_env = {
+      token: 'rutabaga-token',
+      tokenExpiresSec: 1234,
+      app_version: 'rutabaga-version',
+    };
+    window.chops = {rpc: {PrpcClient: sinon.spy()}};
+    window.ga = sinon.spy();
+    MonorailTSMon.prototype.disableAfterNextFlush = sinon.spy();
+    c = new ClientLogger('rutabaga');
+  });
+
+  afterEach(() => {
+    sessionStorage.clear();
+  });
+
+  describe('constructor', () => {
+    it('assigns this.category', () => {
+      assert.equal(c.category, 'rutabaga');
+    });
+
+    it('gets started events from sessionStorage', () => {
+      const startedEvents = {
+        event1: {
+          time: 12345678,
+          labels: ['label1', 'label2'],
+        },
+        event2: {
+          time: 87654321,
+          labels: ['label2'],
+        },
+      };
+      sessionStorage[startedKey] = JSON.stringify(startedEvents);
+
+      c = new ClientLogger('rutabaga');
+      assert.deepEqual(startedEvents, c.startedEvents);
+    });
+  });
+
+  describe('records ts_mon metrics', () => {
+    let issueCreateMetric;
+    let issueUpdateMetric;
+    let autocompleteMetric;
+    let c;
+
+    beforeEach(() => {
+      window.ga = sinon.spy();
+      c = new ClientLogger('issues');
+      issueCreateMetric = c.tsMon._userTimingMetrics[0].metric;
+      issueCreateMetric.add = sinon.spy();
+
+      issueUpdateMetric = c.tsMon._userTimingMetrics[1].metric;
+      issueUpdateMetric.add = sinon.spy();
+
+      autocompleteMetric = c.tsMon._userTimingMetrics[2].metric;
+      autocompleteMetric.add = sinon.spy();
+    });
+
+    it('bogus', () => {
+      c.logStart('rutabaga');
+      c.logEnd('rutabaga');
+      sinon.assert.notCalled(issueCreateMetric.add);
+      sinon.assert.notCalled(issueUpdateMetric.add);
+      sinon.assert.notCalled(autocompleteMetric.add);
+    });
+
+    it('new-issue', () => {
+      c.logStart('new-issue', 'server-time');
+      c.logEnd('new-issue', 'server-time');
+      sinon.assert.notCalled(issueUpdateMetric.add);
+      sinon.assert.notCalled(autocompleteMetric.add);
+
+      sinon.assert.calledOnce(issueCreateMetric.add);
+      assert.isNumber(issueCreateMetric.add.getCall(0).args[0]);
+      assert.isString(issueCreateMetric.add.getCall(0).args[1].get('client_id'));
+      assert.equal(issueCreateMetric.add.getCall(0).args[1].get('host_name'),
+          'rutabaga-version');
+    });
+
+    it('issue-update', () => {
+      c.logStart('issue-update', 'computer-time');
+      c.logEnd('issue-update', 'computer-time');
+      sinon.assert.notCalled(issueCreateMetric.add);
+      sinon.assert.notCalled(autocompleteMetric.add);
+
+      sinon.assert.calledOnce(issueUpdateMetric.add);
+      assert.isNumber(issueUpdateMetric.add.getCall(0).args[0]);
+      assert.isString(issueUpdateMetric.add.getCall(0).args[1].get('client_id'));
+      assert.equal(issueUpdateMetric.add.getCall(0).args[1].get('host_name'),
+          'rutabaga-version');
+    });
+
+    it('populate-options', () => {
+      c.logStart('populate-options');
+      c.logEnd('populate-options');
+      sinon.assert.notCalled(issueCreateMetric.add);
+      sinon.assert.notCalled(issueUpdateMetric.add);
+      // Autocomplete is not called in issues category.
+      sinon.assert.notCalled(autocompleteMetric.add);
+
+      c = new ClientLogger('autocomplete');
+      autocompleteMetric = c.tsMon._userTimingMetrics[2].metric;
+      autocompleteMetric.add = sinon.spy();
+
+      c.logStart('populate-options', 'user-time');
+      c.logEnd('populate-options', 'user-time');
+      sinon.assert.notCalled(issueCreateMetric.add);
+      sinon.assert.notCalled(issueUpdateMetric.add);
+
+      sinon.assert.calledOnce(autocompleteMetric.add);
+      assert.isNumber(autocompleteMetric.add.getCall(0).args[0]);
+      assert.isString(autocompleteMetric.add.getCall(0).args[1].get('client_id'));
+      assert.equal(autocompleteMetric.add.getCall(0).args[1].get('host_name'),
+          'rutabaga-version');
+    });
+  });
+
+  describe('logStart', () => {
+    let c;
+    let clock;
+    const currentTime = 5000;
+
+    beforeEach(() => {
+      c = new ClientLogger('rutabaga');
+      clock = sinon.useFakeTimers(currentTime);
+    });
+
+    afterEach(() => {
+      clock.restore();
+      sessionStorage.clear();
+    });
+
+    it('creates a new startedEvent if none', () => {
+      c.logStart('event-name', 'event-label');
+
+      sinon.assert.calledOnce(ga);
+      sinon.assert.calledWith(ga, 'send', 'event', 'rutabaga',
+          'event-name-start', 'event-label');
+
+      const expectedStartedEvents = {
+        'event-name': {
+          time: currentTime,
+          labels: {
+            'event-label': currentTime,
+          },
+        },
+      };
+      assert.deepEqual(c.startedEvents, expectedStartedEvents);
+      assert.deepEqual(JSON.parse(sessionStorage[startedKey]),
+          expectedStartedEvents);
+    });
+
+    it('uses an existing startedEvent', () => {
+      c.startedEvents['event-name'] = {
+        time: 1234,
+        labels: {
+          'event-label': 1000,
+        },
+      };
+      c.logStart('event-name', 'event-label');
+
+      sinon.assert.calledOnce(ga);
+      sinon.assert.calledWith(ga, 'send', 'event', 'rutabaga',
+          'event-name-start', 'event-label');
+
+      // TODO(jeffcarp): Audit is this wanted behavior? Replacing event time
+      // but not label time?
+      const expectedStartedEvents = {
+        'event-name': {
+          time: 1234,
+          labels: {
+            'event-label': currentTime,
+          },
+        },
+      };
+      assert.deepEqual(c.startedEvents, expectedStartedEvents);
+      assert.deepEqual(JSON.parse(sessionStorage[startedKey]),
+          expectedStartedEvents);
+    });
+  });
+
+  describe('logPause', () => {
+    const startTime = 1234;
+    const currentTime = 5000;
+    let c;
+    let clock;
+
+    beforeEach(() => {
+      clock = sinon.useFakeTimers(currentTime);
+      c = new ClientLogger('rutabaga');
+      c.startedEvents['event-name'] = {
+        time: startTime,
+        labels: {
+          'event-label': startTime,
+        },
+      };
+    });
+
+    afterEach(() => {
+      clock.restore();
+      sessionStorage.clear();
+    });
+
+    it('throws if no label given', () => {
+      assert.throws(() => {
+        c.logPause('bogus');
+      }, 'event with no label');
+    });
+
+    it('exits early if no start event exists', () => {
+      const originalStartedEvents = Object.assign(c.startedEvents, {});
+      c.logPause('bogus', 'fogus');
+      assert.deepEqual(c.startedEvents, originalStartedEvents);
+    });
+
+    it('exits early if no label exists', () => {
+      const originalStartedEvents = Object.assign(c.startedEvents, {});
+      c.logPause('event-name', 'fogus');
+      assert.deepEqual(c.startedEvents, originalStartedEvents);
+    });
+
+    it('adds elapsed time to start event', () => {
+      c.logPause('event-name', 'event-label');
+
+      const expectedStartedEvents = {
+        'event-name': {
+          time: startTime,
+          labels: {
+            'event-label': startTime,
+          },
+          elapsed: {
+            'event-label': currentTime - startTime,
+          },
+        },
+      };
+      assert.deepEqual(c.startedEvents, expectedStartedEvents);
+      assert.deepEqual(
+          JSON.parse(sessionStorage['ClientLogger.rutabaga.started']),
+          expectedStartedEvents);
+    });
+  });
+
+  describe('logResume', () => {
+    let c;
+    let clock;
+    const startTimeEvent = 1234;
+    const startTimeLabel = 2345;
+    const labelElapsed = 4321;
+    const currentTime = 6000;
+
+    beforeEach(() => {
+      clock = sinon.useFakeTimers(currentTime);
+      c = new ClientLogger('rutabaga');
+      c.startedEvents['event-name'] = {
+        time: startTimeEvent,
+        labels: {
+          'event-label': startTimeLabel,
+        },
+        elapsed: {
+          'event-label': labelElapsed,
+        },
+      };
+    });
+
+    afterEach(() => {
+      clock.restore();
+      sessionStorage.clear();
+    });
+
+    it('throws if no label given', () => {
+      assert.throws(() => {
+        c.logResume('bogus');
+      }, 'no label');
+    });
+
+    it('exits early if no start event exists', () => {
+      const originalStartedEvents = Object.assign(c.startedEvents, {});
+      c.logResume('bogus', 'fogus');
+      assert.deepEqual(c.startedEvents, originalStartedEvents);
+    });
+
+    it('exits early if the label was never paused', () => {
+      c.startedEvents['event-name'] = {
+        time: startTimeEvent,
+        labels: {
+          'event-label': startTimeLabel,
+        },
+        elapsed: {},
+      };
+
+      const originalStartedEvents = Object.assign(c.startedEvents, {});
+      c.logResume('event-name', 'event-label');
+      assert.deepEqual(c.startedEvents, originalStartedEvents);
+    });
+
+    it('sets start event time to current time', () => {
+      c.logResume('event-name', 'event-label');
+
+      const expectedStartedEvents = {
+        'event-name': {
+          time: startTimeEvent,
+          labels: {
+            'event-label': currentTime,
+          },
+          elapsed: {
+            'event-label': labelElapsed,
+          },
+        },
+      };
+      assert.deepEqual(c.startedEvents, expectedStartedEvents);
+      assert.deepEqual(
+          JSON.parse(sessionStorage['ClientLogger.rutabaga.started']),
+          expectedStartedEvents);
+    });
+  });
+
+  describe('logEnd', () => {
+    let c;
+    let clock;
+    const startTimeEvent = 1234;
+    const startTimeLabel1 = 2345;
+    const startTimeLabel2 = 3456;
+    const currentTime = 10000;
+
+    beforeEach(() => {
+      c = new ClientLogger('rutabaga');
+      clock = sinon.useFakeTimers(currentTime);
+      c.tsMon.recordUserTiming = sinon.spy();
+      c.startedEvents = {
+        someEvent: {
+          time: startTimeEvent,
+          labels: {
+            label1: startTimeLabel1,
+            label2: startTimeLabel2,
+          },
+        },
+      };
+    });
+
+    afterEach(() => {
+      clock.restore();
+    });
+
+    it('returns early if no event was started', () => {
+      c.startedEvents = {someEvent: {}};
+      const originalStartedEvents = Object.assign(c.startedEvents, {});
+      c.logEnd('bogus');
+      sinon.assert.notCalled(window.ga);
+      assert.isNull(sessionStorage.getItem(startedKey));
+      assert.deepEqual(c.startedEvents, originalStartedEvents);
+    });
+
+    it('returns early if label was not started', () => {
+      c.startedEvents = {someEvent: {labels: {}}};
+      const originalStartedEvents = Object.assign(c.startedEvents, {});
+      c.logEnd('someEvent', 'bogus');
+      sinon.assert.notCalled(window.ga);
+      assert.isNull(sessionStorage.getItem(startedKey));
+      assert.deepEqual(c.startedEvents, originalStartedEvents);
+    });
+
+    it('does not log non-labeled events over threshold', () => {
+      c.startedEvents = {someEvent: {time: currentTime - 1000}};
+      c.logEnd('someEvent', null, 999);
+
+      sinon.assert.calledOnce(window.ga);
+      sinon.assert.calledWith(window.ga, 'send', 'event', 'rutabaga',
+          'someEvent-end', null, undefined);
+      sinon.assert.notCalled(c.tsMon.recordUserTiming);
+      assert.equal(sessionStorage.getItem(startedKey), '{}');
+    });
+
+    it('does not log labeled events over threshold', () => {
+      const elapsedLabel2 = 2000;
+      c.startedEvents.someEvent.elapsed = {
+        label1: currentTime - 1000,
+        label2: elapsedLabel2,
+      };
+      c.logEnd('someEvent', 'label1', 999);
+
+      sinon.assert.calledOnce(window.ga);
+      sinon.assert.calledWith(window.ga, 'send', 'event', 'rutabaga',
+          'someEvent-end', 'label1', undefined);
+      // TODO(jeffcarp): Feature: add GA event if over threshold.
+      sinon.assert.notCalled(c.tsMon.recordUserTiming);
+
+      const expectedStartedEvents = {
+        someEvent: {
+          time: startTimeEvent,
+          labels: {
+            label2: startTimeLabel2,
+          },
+          elapsed: {
+            label2: elapsedLabel2,
+          },
+        },
+      };
+      assert.deepEqual(c.startedEvents, expectedStartedEvents);
+      assert.deepEqual(JSON.parse(sessionStorage[startedKey]),
+          expectedStartedEvents);
+    });
+
+    it('calls ga() with timing and event info for all labels', () => {
+      const label1Elapsed = 1000;
+      const label2Elapsed = 2500;
+      c.startedEvents.someEvent.elapsed = {
+        label1: label1Elapsed,
+        label2: label2Elapsed,
+      };
+      c.logEnd('someEvent');
+
+      assert.deepEqual(ga.getCall(0).args, [
+        'send', 'timing', {
+          timingCategory: 'rutabaga',
+          timingValue: currentTime - startTimeEvent,
+          timingVar: 'someEvent',
+        }]);
+
+      assert.deepEqual(ga.getCall(1).args, [
+        'send', 'timing', {
+          timingCategory: 'rutabaga',
+          timingValue: (currentTime - startTimeLabel1) + label1Elapsed,
+          timingVar: 'someEvent',
+          timingLabel: 'label1',
+        }]);
+      assert.deepEqual(ga.getCall(2).args, [
+        'send', 'timing', {
+          timingCategory: 'rutabaga',
+          timingValue: (currentTime - startTimeLabel2) + label2Elapsed,
+          timingVar: 'someEvent',
+          timingLabel: 'label2',
+        }]);
+      assert.deepEqual(ga.getCall(3).args, [
+        'send', 'event', 'rutabaga', 'someEvent-end', undefined, undefined,
+      ]);
+      assert.deepEqual(c.tsMon.recordUserTiming.getCall(0).args, [
+        'rutabaga', 'someEvent', null, currentTime - startTimeEvent,
+      ]);
+      assert.deepEqual(c.tsMon.recordUserTiming.getCall(1).args, [
+        'rutabaga', 'someEvent', 'label1',
+        (currentTime - startTimeLabel1) + label1Elapsed,
+      ]);
+      assert.deepEqual(c.tsMon.recordUserTiming.getCall(2).args, [
+        'rutabaga', 'someEvent', 'label2',
+        (currentTime - startTimeLabel2) + label2Elapsed,
+      ]);
+
+      assert.deepEqual(c.startedEvents, {});
+      assert.equal(sessionStorage.getItem(startedKey), '{}');
+    });
+
+    it('calling with a label calls ga() only for that label', () => {
+      const label1Elapsed = 1000;
+      const label2Elapsed = 2500;
+      c.startedEvents.someEvent.elapsed = {
+        label1: label1Elapsed,
+        label2: label2Elapsed,
+      };
+      c.logEnd('someEvent', 'label2');
+
+      assert.deepEqual(ga.getCall(0).args, [
+        'send', 'timing', {
+          timingCategory: 'rutabaga',
+          timingValue: (currentTime - startTimeLabel2) + label2Elapsed,
+          timingVar: 'someEvent',
+          timingLabel: 'label2',
+        }]);
+      assert.deepEqual(window.ga.getCall(1).args, [
+        'send', 'event', 'rutabaga', 'someEvent-end', 'label2', undefined,
+      ]);
+      sinon.assert.calledOnce(c.tsMon.recordUserTiming);
+      sinon.assert.calledWith(c.tsMon.recordUserTiming, 'rutabaga',
+          'someEvent', 'label2', (currentTime - startTimeLabel2) + label2Elapsed);
+
+      const expectedStartedEvents = {
+        someEvent: {
+          time: startTimeEvent,
+          labels: {
+            label1: startTimeLabel1,
+          },
+          elapsed: {
+            label1: label1Elapsed,
+          },
+        },
+      };
+      assert.deepEqual(c.startedEvents, expectedStartedEvents);
+      assert.deepEqual(JSON.parse(sessionStorage[startedKey]),
+          expectedStartedEvents);
+    });
+
+    it('calling logStart, logPause, logResume, and logEnd works for labels',
+        () => {
+          let countedElapsedTime = 0;
+          c.logStart('someEvent', 'label1');
+          clock.tick(1000);
+          countedElapsedTime += 1000;
+          c.logPause('someEvent', 'label1');
+          clock.tick(1000);
+          c.logResume('someEvent', 'label1');
+          clock.tick(1000);
+          countedElapsedTime += 1000;
+          c.logEnd('someEvent', 'label1');
+
+          assert.deepEqual(ga.getCall(0).args, [
+            'send', 'event', 'rutabaga', 'someEvent-start', 'label1', undefined,
+          ]);
+          assert.deepEqual(ga.getCall(1).args, [
+            'send', 'timing', {
+              timingCategory: 'rutabaga',
+              timingValue: countedElapsedTime,
+              timingVar: 'someEvent',
+              timingLabel: 'label1',
+            }]);
+          assert.deepEqual(window.ga.getCall(2).args, [
+            'send', 'event', 'rutabaga', 'someEvent-end', 'label1', undefined,
+          ]);
+          sinon.assert.calledOnce(c.tsMon.recordUserTiming);
+          sinon.assert.calledWith(c.tsMon.recordUserTiming, 'rutabaga',
+              'someEvent', 'label1', countedElapsedTime);
+
+          const expectedStartedEvents = {
+            someEvent: {
+              time: startTimeEvent,
+              labels: {
+                label2: startTimeLabel2,
+              },
+              elapsed: {},
+            },
+          };
+          assert.deepEqual(c.startedEvents, expectedStartedEvents);
+          assert.deepEqual(JSON.parse(sessionStorage[startedKey]),
+              expectedStartedEvents);
+        });
+
+    it('logs some events when others are above threshold', () => {
+      c.startedEvents = {
+        someEvent: {
+          time: 9500,
+          labels: {
+            overThresholdWithoutElapsed: 8000,
+            overThresholdWithElapsed: 9500,
+            underThresholdWithoutElapsed: 9750,
+            underThresholdWithElapsed: 9650,
+            exactlyOnThresholdWithoutElapsed: 9001,
+            exactlyOnThresholdWithElapsed: 9002,
+          },
+          elapsed: {
+            overThresholdWithElapsed: 1000,
+            underThresholdWithElapsed: 100,
+            exactlyOnThresholdWithElapsed: 1,
+          },
+        },
+      };
+      c.logEnd('someEvent', null, 999);
+
+      // Verify ga() calls.
+      assert.equal(window.ga.getCalls().length, 6);
+      assert.deepEqual(ga.getCall(0).args, [
+        'send', 'timing', {
+          timingCategory: 'rutabaga',
+          timingValue: 500,
+          timingVar: 'someEvent',
+        }]);
+      assert.deepEqual(ga.getCall(1).args, [
+        'send', 'timing', {
+          timingCategory: 'rutabaga',
+          timingValue: 250,
+          timingVar: 'someEvent',
+          timingLabel: 'underThresholdWithoutElapsed',
+        }]);
+      assert.deepEqual(ga.getCall(2).args, [
+        'send', 'timing', {
+          timingCategory: 'rutabaga',
+          timingValue: 450,
+          timingVar: 'someEvent',
+          timingLabel: 'underThresholdWithElapsed',
+        }]);
+      assert.deepEqual(ga.getCall(3).args, [
+        'send', 'timing', {
+          timingCategory: 'rutabaga',
+          timingValue: 999,
+          timingVar: 'someEvent',
+          timingLabel: 'exactlyOnThresholdWithoutElapsed',
+        }]);
+      assert.deepEqual(ga.getCall(4).args, [
+        'send', 'timing', {
+          timingCategory: 'rutabaga',
+          timingValue: 999,
+          timingVar: 'someEvent',
+          timingLabel: 'exactlyOnThresholdWithElapsed',
+        }]);
+      assert.deepEqual(ga.getCall(5).args, [
+        'send', 'event', 'rutabaga', 'someEvent-end', null, undefined,
+      ]);
+
+      // Verify ts_mon.recordUserTiming() calls.
+      assert.equal(c.tsMon.recordUserTiming.getCalls().length, 5);
+      assert.deepEqual(c.tsMon.recordUserTiming.getCall(0).args, [
+        'rutabaga', 'someEvent', null, 500,
+      ]);
+      assert.deepEqual(c.tsMon.recordUserTiming.getCall(1).args, [
+        'rutabaga', 'someEvent', 'underThresholdWithoutElapsed', 250,
+      ]);
+      assert.deepEqual(c.tsMon.recordUserTiming.getCall(2).args, [
+        'rutabaga', 'someEvent', 'underThresholdWithElapsed', 450,
+      ]);
+      assert.deepEqual(c.tsMon.recordUserTiming.getCall(3).args, [
+        'rutabaga', 'someEvent', 'exactlyOnThresholdWithoutElapsed', 999,
+      ]);
+      assert.deepEqual(c.tsMon.recordUserTiming.getCall(4).args, [
+        'rutabaga', 'someEvent', 'exactlyOnThresholdWithElapsed', 999,
+      ]);
+      assert.deepEqual(c.startedEvents, {});
+      assert.deepEqual(JSON.parse(sessionStorage[startedKey]), {});
+    });
+  });
+});
diff --git a/static_src/monitoring/monorail-ts-mon.js b/static_src/monitoring/monorail-ts-mon.js
new file mode 100644
index 0000000..2d90e3e
--- /dev/null
+++ b/static_src/monitoring/monorail-ts-mon.js
@@ -0,0 +1,266 @@
+/* Copyright 2018 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.
+ */
+
+import {TSMonClient} from '@chopsui/tsmon-client';
+
+export const tsMonClient = new TSMonClient();
+import AutoRefreshPrpcClient from 'prpc.js';
+
+const TS_MON_JS_PATH = '/_/jstsmon.do';
+const TS_MON_CLIENT_GLOBAL_NAME = '__tsMonClient';
+const PAGE_LOAD_MAX_THRESHOLD = 60000;
+export const PAGE_TYPES = Object.freeze({
+  ISSUE_DETAIL_SPA: 'issue_detail_spa',
+  ISSUE_ENTRY: 'issue_entry',
+  ISSUE_LIST_SPA: 'issue_list_spa',
+});
+
+export default class MonorailTSMon extends TSMonClient {
+  /** @override */
+  constructor() {
+    super(TS_MON_JS_PATH);
+    this.clientId = MonorailTSMon.generateClientId();
+    this.disableAfterNextFlush();
+    // Create an instance of pRPC client for refreshing XSRF tokens.
+    this.prpcClient = new AutoRefreshPrpcClient(
+        window.CS_env.token, window.CS_env.tokenExpiresSec);
+
+    // TODO(jeffcarp, 4415): Deduplicate metric defs.
+    const standardFields = new Map([
+      ['client_id', TSMonClient.stringField('client_id')],
+      ['host_name', TSMonClient.stringField('host_name')],
+      ['document_visible', TSMonClient.boolField('document_visible')],
+    ]);
+    this._userTimingMetrics = [
+      {
+        category: 'issues',
+        eventName: 'new-issue',
+        eventLabel: 'server-time',
+        metric: this.cumulativeDistribution(
+            'monorail/frontend/issue_create_latency',
+            'Latency between issue entry form submit and issue detail page load.',
+            null, standardFields,
+        ),
+      },
+      {
+        category: 'issues',
+        eventName: 'issue-update',
+        eventLabel: 'computer-time',
+        metric: this.cumulativeDistribution(
+            'monorail/frontend/issue_update_latency',
+            'Latency between issue update form submit and issue detail page load.',
+            null, standardFields,
+        ),
+      },
+      {
+        category: 'autocomplete',
+        eventName: 'populate-options',
+        eventLabel: 'user-time',
+        metric: this.cumulativeDistribution(
+            'monorail/frontend/autocomplete_populate_latency',
+            'Latency between page load and autocomplete options loading.',
+            null, standardFields,
+        ),
+      },
+    ];
+
+    this.dateRangeMetric = this.counter(
+        'monorail/frontend/charts/switch_date_range',
+        'Number of times user changes date range.',
+        null, (new Map([
+          ['client_id', TSMonClient.stringField('client_id')],
+          ['host_name', TSMonClient.stringField('host_name')],
+          ['document_visible', TSMonClient.boolField('document_visible')],
+          ['date_range', TSMonClient.intField('date_range')],
+        ])),
+    );
+
+    this.issueCommentsLoadMetric = this.cumulativeDistribution(
+        'monorail/frontend/issue_comments_load_latency',
+        'Time from navigation or click to issue comments loaded.',
+        null, (new Map([
+          ['client_id', TSMonClient.stringField('client_id')],
+          ['host_name', TSMonClient.stringField('host_name')],
+          ['template_name', TSMonClient.stringField('template_name')],
+          ['document_visible', TSMonClient.boolField('document_visible')],
+          ['full_app_load', TSMonClient.boolField('full_app_load')],
+        ])),
+    );
+
+    this.issueListLoadMetric = this.cumulativeDistribution(
+        'monorail/frontend/issue_list_load_latency',
+        'Time from navigation or click to search issues list loaded.',
+        null, (new Map([
+          ['client_id', TSMonClient.stringField('client_id')],
+          ['host_name', TSMonClient.stringField('host_name')],
+          ['template_name', TSMonClient.stringField('template_name')],
+          ['document_visible', TSMonClient.boolField('document_visible')],
+          ['full_app_load', TSMonClient.boolField('full_app_load')],
+        ])),
+    );
+
+
+    this.pageLoadMetric = this.cumulativeDistribution(
+        'frontend/dom_content_loaded',
+        'domContentLoaded performance timing.',
+        null, (new Map([
+          ['client_id', TSMonClient.stringField('client_id')],
+          ['host_name', TSMonClient.stringField('host_name')],
+          ['template_name', TSMonClient.stringField('template_name')],
+          ['document_visible', TSMonClient.boolField('document_visible')],
+        ])),
+    );
+  }
+
+  fetchImpl(rawMetricValues) {
+    return this.prpcClient.ensureTokenIsValid().then(() => {
+      return fetch(this._reportPath, {
+        method: 'POST',
+        credentials: 'same-origin',
+        body: JSON.stringify({
+          metrics: rawMetricValues,
+          token: this.prpcClient.token,
+        }),
+      });
+    });
+  }
+
+  recordUserTiming(category, eventName, eventLabel, elapsed) {
+    const metricFields = new Map([
+      ['client_id', this.clientId],
+      ['host_name', window.CS_env.app_version],
+      ['document_visible', MonorailTSMon.isPageVisible()],
+    ]);
+    for (const metric of this._userTimingMetrics) {
+      if (category === metric.category &&
+          eventName === metric.eventName &&
+          eventLabel === metric.eventLabel) {
+        metric.metric.add(elapsed, metricFields);
+      }
+    }
+  }
+
+  recordDateRangeChange(dateRange) {
+    const metricFields = new Map([
+      ['client_id', this.clientId],
+      ['host_name', window.CS_env.app_version],
+      ['document_visible', MonorailTSMon.isPageVisible()],
+      ['date_range', dateRange],
+    ]);
+    this.dateRangeMetric.add(1, metricFields);
+  }
+
+  // Make sure this function runs after the page is loaded.
+  recordPageLoadTiming(pageType, maxThresholdMs=null) {
+    if (!pageType) return;
+    // See timing definitions here:
+    // https://developer.mozilla.org/en-US/docs/Web/API/PerformanceNavigationTiming
+    const t = window.performance.timing;
+    const domContentLoadedMs = t.domContentLoadedEventEnd - t.navigationStart;
+
+    const measurePageTypes = new Set([
+      PAGE_TYPES.ISSUE_DETAIL_SPA,
+      PAGE_TYPES.ISSUE_ENTRY,
+    ]);
+
+    if (measurePageTypes.has(pageType)) {
+      if (maxThresholdMs !== null && domContentLoadedMs > maxThresholdMs) {
+        return;
+      }
+      const metricFields = new Map([
+        ['client_id', this.clientId],
+        ['host_name', window.CS_env.app_version],
+        ['template_name', pageType],
+        ['document_visible', MonorailTSMon.isPageVisible()],
+      ]);
+      this.pageLoadMetric.add(domContentLoadedMs, metricFields);
+    }
+  }
+
+  recordIssueCommentsLoadTiming(value, fullAppLoad) {
+    const metricFields = new Map([
+      ['client_id', this.clientId],
+      ['host_name', window.CS_env.app_version],
+      ['template_name', PAGE_TYPES.ISSUE_DETAIL_SPA],
+      ['document_visible', MonorailTSMon.isPageVisible()],
+      ['full_app_load', fullAppLoad],
+    ]);
+    this.issueCommentsLoadMetric.add(value, metricFields);
+  }
+
+  recordIssueEntryTiming(maxThresholdMs=PAGE_LOAD_MAX_THRESHOLD) {
+    this.recordPageLoadTiming(PAGE_TYPES.ISSUE_ENTRY, maxThresholdMs);
+  }
+
+  recordIssueDetailSpaTiming(maxThresholdMs=PAGE_LOAD_MAX_THRESHOLD) {
+    this.recordPageLoadTiming(PAGE_TYPES.ISSUE_DETAIL_SPA, maxThresholdMs);
+  }
+
+
+  /**
+   * Adds a value to the 'issue_list_load_latency' metric.
+   * @param {timestamp} value duration of the load time.
+   * @param {Boolean} fullAppLoad true if this metric was collected from
+   *     a full app load (cold) rather than from navigation within the
+   *     app (hot).
+   */
+  recordIssueListLoadTiming(value, fullAppLoad) {
+    const metricFields = new Map([
+      ['client_id', this.clientId],
+      ['host_name', window.CS_env.app_version],
+      ['template_name', PAGE_TYPES.ISSUE_LIST_SPA],
+      ['document_visible', MonorailTSMon.isPageVisible()],
+      ['full_app_load', fullAppLoad],
+    ]);
+    this.issueListLoadMetric.add(value, metricFields);
+  }
+
+  // Uses the window object to ensure that only one ts_mon JS client
+  // exists on the page at any given time. Returns the object on window,
+  // instantiating it if it doesn't exist yet.
+  static getGlobalClient() {
+    const key = TS_MON_CLIENT_GLOBAL_NAME;
+    if (!window.hasOwnProperty(key)) {
+      window[key] = new MonorailTSMon();
+    }
+    return window[key];
+  }
+
+  static generateClientId() {
+    /**
+     * Returns a random string used as the client_id field in ts_mon metrics.
+     *
+     * Rationale:
+     * If we assume Monorail has sustained 40 QPS, assume every request
+     * generates a new ClientLogger (likely an overestimation), and we want
+     * the likelihood of a client ID collision to be 0.01% for all IDs
+     * generated in any given year (in other words, 1 collision every 10K
+     * years), we need to generate a random string with at least 2^30 different
+     * possible values (i.e. 30 bits of entropy, see log2(d) in Wolfram link
+     * below). Using an unsigned integer gives us 32 bits of entropy, more than
+     * enough.
+     *
+     * Returns:
+     *   A string (the base-32 representation of a random 32-bit integer).
+
+     * References:
+     * - https://en.wikipedia.org/wiki/Birthday_problem
+     * - https://www.wolframalpha.com/input/?i=d%3D40+*+60+*+60+*+24+*+365,+p%3D0.0001,+n+%3D+sqrt(2d+*+ln(1%2F(1-p))),+d,+log2(d),+n
+     * - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString
+     */
+    const randomvalues = new Uint32Array(1);
+    window.crypto.getRandomValues(randomvalues);
+    return randomvalues[0].toString(32);
+  }
+
+  // Returns a Boolean, true if document is visible.
+  static isPageVisible(path) {
+    return document.visibilityState === 'visible';
+  }
+}
+
+// For integration with EZT pages, which don't use ES modules.
+window.getTSMonClient = MonorailTSMon.getGlobalClient;
diff --git a/static_src/monitoring/monorail-ts-mon.test.js b/static_src/monitoring/monorail-ts-mon.test.js
new file mode 100644
index 0000000..fdf3e81
--- /dev/null
+++ b/static_src/monitoring/monorail-ts-mon.test.js
@@ -0,0 +1,152 @@
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import MonorailTSMon, {PAGE_TYPES} from './monorail-ts-mon.js';
+
+describe('MonorailTSMon', () => {
+  let mts;
+
+  beforeEach(() => {
+    window.CS_env = {
+      token: 'rutabaga-token',
+      tokenExpiresSec: 1234,
+      app_version: 'rutabaga-version',
+    };
+    window.chops = {rpc: {PrpcClient: sinon.spy()}};
+    MonorailTSMon.prototype.disableAfterNextFlush = sinon.spy();
+    mts = new MonorailTSMon();
+  });
+
+  afterEach(() => {
+    delete window.CS_env;
+  });
+
+  describe('constructor', () => {
+    it('initializes a prpcClient', () => {
+      assert.equal(mts.prpcClient.constructor.name, 'AutoRefreshPrpcClient');
+    });
+
+    it('sets a client ID', () => {
+      assert.isNotNull(mts.clientId);
+    });
+
+    it('disables sending after next flush', () => {
+      sinon.assert.calledOnce(mts.disableAfterNextFlush);
+    });
+  });
+
+  it('generateClientId', () => {
+    const clientID = MonorailTSMon.generateClientId();
+    assert.isNotNumber(clientID);
+    const clientIDNum = parseInt(clientID, 32);
+    assert.isNumber(clientIDNum);
+    assert.isAtLeast(clientIDNum, 0);
+    assert.isAtMost(clientIDNum, Math.pow(2, 32));
+  });
+
+  describe('recordUserTiming', () => {
+    it('records a timing metric only if matches', () => {
+      const metric = {add: sinon.spy()};
+      mts._userTimingMetrics = [{
+        category: 'rutabaga',
+        eventName: 'rutabaga-name',
+        eventLabel: 'rutabaga-label',
+        metric: metric,
+      }];
+
+      mts.recordUserTiming('kohlrabi', 'rutabaga-name', 'rutabaga-label', 1);
+      sinon.assert.notCalled(metric.add);
+      metric.add.resetHistory();
+
+      mts.recordUserTiming('rutabaga', 'is-a-tuber', 'rutabaga-label', 1);
+      sinon.assert.notCalled(metric.add);
+      metric.add.resetHistory();
+
+      mts.recordUserTiming('rutabaga', 'rutabaga-name', 'went bad', 1);
+      sinon.assert.notCalled(metric.add);
+      metric.add.resetHistory();
+
+      mts.recordUserTiming('rutabaga', 'rutabaga-name', 'rutabaga-label', 1);
+      sinon.assert.calledOnce(metric.add);
+      assert.equal(metric.add.args[0][0], 1);
+      const argsKeys = Array.from(metric.add.args[0][1].keys());
+      assert.deepEqual(argsKeys, ['client_id', 'host_name', 'document_visible']);
+    });
+  });
+
+  describe('recordPageLoadTiming', () => {
+    beforeEach(() => {
+      mts.pageLoadMetric = {add: sinon.spy()};
+      sinon.stub(MonorailTSMon, 'isPageVisible').callsFake(() => (true));
+    });
+
+    afterEach(() => {
+      MonorailTSMon.isPageVisible.restore();
+    });
+
+    it('records page load on issue entry page', () => {
+      mts.recordIssueEntryTiming();
+      sinon.assert.calledOnce(mts.pageLoadMetric.add);
+      assert.isNumber(mts.pageLoadMetric.add.getCall(0).args[0]);
+      assert.isString(mts.pageLoadMetric.add.getCall(0).args[1].get(
+          'client_id'));
+      assert.equal(mts.pageLoadMetric.add.getCall(0).args[1].get(
+          'host_name'), 'rutabaga-version');
+      assert.equal(mts.pageLoadMetric.add.getCall(0).args[1].get(
+          'template_name'), 'issue_entry');
+      assert.equal(mts.pageLoadMetric.add.getCall(0).args[1].get(
+          'document_visible'), true);
+    });
+
+    it('does not record page load timing on other pages', () => {
+      mts.recordPageLoadTiming();
+      sinon.assert.notCalled(mts.pageLoadMetric.add);
+    });
+
+    it('does not record page load timing if over max threshold', () => {
+      window.performance = {
+        timing: {
+          navigationStart: 1000,
+          domContentLoadedEventEnd: 2001,
+        },
+      };
+      mts.recordIssueEntryTiming(1000);
+      sinon.assert.notCalled(mts.pageLoadMetric.add);
+    });
+
+    it('records page load on issue entry page if under threshold', () => {
+      MonorailTSMon.isPageVisible.restore();
+      sinon.stub(MonorailTSMon, 'isPageVisible').callsFake(() => (false));
+      window.performance = {
+        timing: {
+          navigationStart: 1000,
+          domContentLoadedEventEnd: 1999,
+        },
+      };
+      mts.recordIssueEntryTiming(1000);
+      sinon.assert.calledOnce(mts.pageLoadMetric.add);
+      assert.isNumber(mts.pageLoadMetric.add.getCall(0).args[0]);
+      assert.equal(mts.pageLoadMetric.add.getCall(0).args[0], 999);
+      assert.isString(mts.pageLoadMetric.add.getCall(0).args[1].get(
+          'client_id'));
+      assert.equal(mts.pageLoadMetric.add.getCall(0).args[1].get(
+          'host_name'), 'rutabaga-version');
+      assert.equal(mts.pageLoadMetric.add.getCall(0).args[1].get(
+          'template_name'), 'issue_entry');
+      assert.equal(mts.pageLoadMetric.add.getCall(0).args[1].get(
+          'document_visible'), false);
+    });
+  });
+
+  describe('getGlobalClient', () => {
+    it('only creates one global client', () => {
+      delete window.__tsMonClient;
+      const client1 = MonorailTSMon.getGlobalClient();
+      assert.equal(client1, window.__tsMonClient);
+
+      const client2 = MonorailTSMon.getGlobalClient();
+      assert.equal(client2, window.__tsMonClient);
+      assert.equal(client2, client1);
+    });
+  });
+});
diff --git a/static_src/monitoring/track-copy.js b/static_src/monitoring/track-copy.js
new file mode 100644
index 0000000..7123965
--- /dev/null
+++ b/static_src/monitoring/track-copy.js
@@ -0,0 +1,28 @@
+/* Copyright 2018 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.
+ */
+
+// This counts copy and paste events.
+
+function labelForElement(el) {
+  let label = el.localName;
+  if (el.id) {
+    label = label + '#' + el.id;
+  }
+  return label;
+}
+
+window.addEventListener('copy', function(evt) {
+  const label = labelForElement(evt.srcElement);
+  const len = window.getSelection().toString().length;
+  ga('send', 'event', window.location.pathname, 'copy', label, len);
+});
+
+window.addEventListener('paste', function(evt) {
+  const label = labelForElement(evt.srcElement);
+  const text = evt.clipboardData.getData('text/plain');
+  const len = text ? text.length : 0;
+  ga('send', 'event', window.location.pathname, 'paste', label, len);
+});
diff --git a/static_src/prpc-client-instance.js b/static_src/prpc-client-instance.js
new file mode 100644
index 0000000..103b9c6
--- /dev/null
+++ b/static_src/prpc-client-instance.js
@@ -0,0 +1,16 @@
+// Copyright 2019 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.
+
+/**
+ * @fileoverview Creates a globally shared instance of AutoRefreshPrpcClient
+ * to be used across the frontend, to share state and allow easy test stubbing.
+ */
+
+import AutoRefreshPrpcClient from 'prpc.js';
+
+// TODO(crbug.com/monorail/5049): Remove usage of window.CS_env here.
+export const prpcClient = new AutoRefreshPrpcClient(
+  window.CS_env ? window.CS_env.token : '',
+  window.CS_env ? window.CS_env.tokenExpiresSec : 0,
+);
diff --git a/static_src/prpc.js b/static_src/prpc.js
new file mode 100644
index 0000000..5b36c7a
--- /dev/null
+++ b/static_src/prpc.js
@@ -0,0 +1,67 @@
+// Copyright 2019 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.
+
+import '@chopsui/prpc-client/prpc-client.js';
+
+/**
+ * @fileoverview pRPC-related helper functions.
+ */
+export default class AutoRefreshPrpcClient {
+  constructor(token, tokenExpiresSec) {
+    this.token = token;
+    this.tokenExpiresSec = tokenExpiresSec;
+    this.prpcClient = new window.chops.rpc.PrpcClient({
+      insecure: Boolean(location.hostname === 'localhost'),
+      fetchImpl: (url, options) => {
+        options.credentials = 'same-origin';
+        return fetch(url, options);
+      },
+    });
+  }
+
+  /**
+   * Refresh the XSRF token if necessary.
+   * TODO(ehmaldonado): Figure out how to handle failures to refresh tokens.
+   * Maybe fire an event that a root page handler could use to show a message.
+   * @async
+   */
+  async ensureTokenIsValid() {
+    if (AutoRefreshPrpcClient.isTokenExpired(this.tokenExpiresSec)) {
+      const headers = {'X-Xsrf-Token': this.token};
+      const message = {
+        token: this.token,
+        tokenPath: 'xhr',
+      };
+      const freshToken = await this.prpcClient.call(
+          'monorail.Sitewide', 'RefreshToken', message, headers);
+      this.token = freshToken.token;
+      this.tokenExpiresSec = freshToken.tokenExpiresSec;
+    }
+  }
+
+  /**
+   * Sends a pRPC request. Adds this.token to the request message after making
+   * sure it is fresh.
+   * @param {string} service Full service name, including package name.
+   * @param {string} method Service method name.
+   * @param {Object} message The protobuf message to send.
+   * @return {Object} The pRPC API response.
+   */
+  call(service, method, message) {
+    return this.ensureTokenIsValid().then(() => {
+      const headers = {'X-Xsrf-Token': this.token};
+      return this.prpcClient.call(service, method, message, headers);
+    });
+  }
+
+  /**
+   * Check if the token is expired.
+   * @param {number} tokenExpiresSec: the expiration time of the token.
+   * @return {boolean} Whether the token is expired.
+   */
+  static isTokenExpired(tokenExpiresSec) {
+    const tokenExpiresDate = new Date(tokenExpiresSec * 1000);
+    return tokenExpiresDate < new Date();
+  }
+}
diff --git a/static_src/react/IssueWizard.css b/static_src/react/IssueWizard.css
new file mode 100644
index 0000000..46b1ff2
--- /dev/null
+++ b/static_src/react/IssueWizard.css
@@ -0,0 +1,18 @@
+.container {
+  margin-left: 50px;
+  max-width: 70vw;
+  width: 100%;
+  font-family: 'Poppins', serif;
+}
+
+.yellowBox {
+  height: 10vh;
+  border-style: solid;
+  border-color: #ea8600;
+  border-radius: 8px;
+  background: #fef7e0;
+}
+
+.poppins {
+  font-family: 'Poppins', serif;
+}
\ No newline at end of file
diff --git a/static_src/react/IssueWizard.test.tsx b/static_src/react/IssueWizard.test.tsx
new file mode 100644
index 0000000..07016ce
--- /dev/null
+++ b/static_src/react/IssueWizard.test.tsx
@@ -0,0 +1,19 @@
+// Copyright 2021 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.
+
+import React from 'react';
+import {assert} from 'chai';
+import {render} from '@testing-library/react';
+
+import {IssueWizard} from './IssueWizard.tsx';
+
+describe('IssueWizard', () => {
+  it('renders', async () => {
+    render(<IssueWizard />);
+
+    const stepper = document.getElementById("mobile-stepper")
+
+    assert.isNotNull(stepper);
+  });
+});
diff --git a/static_src/react/IssueWizard.tsx b/static_src/react/IssueWizard.tsx
new file mode 100644
index 0000000..de5e8fb
--- /dev/null
+++ b/static_src/react/IssueWizard.tsx
@@ -0,0 +1,67 @@
+// Copyright 2019 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.
+
+import {ReactElement} from 'react';
+import * as React from 'react'
+import ReactDOM from 'react-dom';
+import styles from './IssueWizard.css';
+import DotMobileStepper from './issue-wizard/DotMobileStepper.tsx';
+import LandingStep from './issue-wizard/LandingStep.tsx';
+import DetailsStep from './issue-wizard/DetailsStep.tsx'
+
+/**
+ * Base component for the issue filing wizard, wrapper for other components.
+ * @return Issue wizard JSX.
+ */
+export function IssueWizard(): ReactElement {
+  const [checkExisting, setCheckExisting] = React.useState(false);
+  const [userType, setUserType] = React.useState('End User');
+  const [activeStep, setActiveStep] = React.useState(0);
+  const [category, setCategory] = React.useState('');
+  const [textValues, setTextValues] = React.useState(
+    {
+      oneLineSummary: '',
+      stepsToReproduce: '',
+      describeProblem: '',
+      additionalComments: ''
+    });
+
+  let nextEnabled;
+  let page;
+  if (activeStep === 0){
+    page = <LandingStep
+        checkExisting={checkExisting}
+        setCheckExisting={setCheckExisting}
+        userType={userType}
+        setUserType={setUserType}
+        category={category}
+        setCategory={setCategory}
+        />;
+    nextEnabled = checkExisting && userType && (category != '');
+  } else if (activeStep === 1){
+    page = <DetailsStep textValues={textValues} setTextValues={setTextValues} category={category}/>;
+    nextEnabled = (textValues.oneLineSummary.trim() !== '') &&
+                  (textValues.stepsToReproduce.trim() !== '') &&
+                  (textValues.describeProblem.trim() !== '');
+  }
+
+  return (
+    <>
+      <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins"></link>
+      <div className={styles.container}>
+        {page}
+        <DotMobileStepper nextEnabled={nextEnabled} activeStep={activeStep} setActiveStep={setActiveStep}/>
+      </div>
+    </>
+  );
+}
+
+/**
+ * Renders the issue filing wizard page.
+ * @param mount HTMLElement that the React component should be
+ *   added to.
+ */
+export function renderWizard(mount: HTMLElement): void {
+  ReactDOM.render(<IssueWizard />, mount);
+}
diff --git a/static_src/react/ReactAutocomplete.test.tsx b/static_src/react/ReactAutocomplete.test.tsx
new file mode 100644
index 0000000..a1e7c62
--- /dev/null
+++ b/static_src/react/ReactAutocomplete.test.tsx
@@ -0,0 +1,311 @@
+// Copyright 2021 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.
+import {assert} from 'chai';
+import React from 'react';
+import sinon from 'sinon';
+import {fireEvent, render} from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+
+import {ReactAutocomplete, MAX_AUTOCOMPLETE_OPTIONS}
+  from './ReactAutocomplete.tsx';
+
+/**
+ * Cleans autocomplete dropdown from the DOM for the next test.
+ * @param input The autocomplete element to remove the dropdown for.
+ */
+ const cleanAutocomplete = (input: ReactAutocomplete) => {
+  fireEvent.change(input, {target: {value: ''}});
+  fireEvent.keyDown(input, {key: 'Enter', code: 'Enter'});
+};
+
+xdescribe('ReactAutocomplete', () => {
+  it('renders', async () => {
+    const {container} = render(<ReactAutocomplete label="cool" options={[]} />);
+
+    assert.isNotNull(container.querySelector('input'));
+  });
+
+  it('placeholder renders', async () => {
+    const {container} = render(<ReactAutocomplete
+      placeholder="penguins"
+      options={['']}
+    />);
+
+    const input = container.querySelector('input');
+    assert.isNotNull(input);
+    if (!input) return;
+
+    assert.strictEqual(input?.placeholder, 'penguins');
+  });
+
+  it('filterOptions empty input value', async () => {
+    const {container} = render(<ReactAutocomplete
+      label="cool"
+      options={['option 1 label']}
+    />);
+
+    const input = container.querySelector('input');
+    assert.isNotNull(input);
+    if (!input) return;
+
+    assert.strictEqual(input?.value, '');
+
+    fireEvent.keyDown(input, {key: 'Enter', code: 'Enter'});
+    assert.strictEqual(input?.value, '');
+  });
+
+  it('filterOptions truncates values', async () => {
+    const options = [];
+
+    // a0@test.com, a1@test.com, a2@test.com, ...
+    for (let i = 0; i <= MAX_AUTOCOMPLETE_OPTIONS; i++) {
+      options.push(`a${i}@test.com`);
+    }
+
+    const {container} = render(<ReactAutocomplete
+      label="cool"
+      options={options}
+    />);
+
+    const input = container.querySelector('input');
+    assert.isNotNull(input);
+    if (!input) return;
+
+    userEvent.type(input, 'a');
+
+    const results = document.querySelectorAll('.autocomplete-option');
+
+    assert.equal(results.length, MAX_AUTOCOMPLETE_OPTIONS);
+
+    // Clean up autocomplete dropdown from the DOM for the next test.
+    cleanAutocomplete(input);
+  });
+
+  it('filterOptions label matching', async () => {
+    const {container} = render(<ReactAutocomplete
+      label="cool"
+      options={['option 1 label']}
+    />);
+
+    const input = container.querySelector('input');
+    assert.isNotNull(input);
+    if (!input) return;
+
+    assert.strictEqual(input?.value, '');
+
+    userEvent.type(input, 'lab');
+    assert.strictEqual(input?.value, 'lab');
+
+    fireEvent.keyDown(input, {key: 'Enter', code: 'Enter'});
+
+    assert.strictEqual(input?.value, 'option 1 label');
+  });
+
+  it('filterOptions description matching', async () => {
+    const {container} = render(<ReactAutocomplete
+      label="cool"
+      getOptionDescription={() => 'penguin apples'}
+      options={['lol']}
+    />);
+
+    const input = container.querySelector('input');
+    assert.isNotNull(input);
+    if (!input) return;
+
+    assert.strictEqual(input?.value, '');
+
+    userEvent.type(input, 'app');
+    assert.strictEqual(input?.value, 'app');
+
+    fireEvent.keyDown(input, {key: 'Enter', code: 'Enter'});
+    assert.strictEqual(input?.value, 'lol');
+  });
+
+  it('filterOptions no match', async () => {
+    const {container} = render(<ReactAutocomplete
+      label="cool"
+      options={[]}
+    />);
+
+    const input = container.querySelector('input');
+    assert.isNotNull(input);
+    if (!input) return;
+
+    assert.strictEqual(input?.value, '');
+
+    userEvent.type(input, 'foobar');
+    assert.strictEqual(input?.value, 'foobar');
+
+    fireEvent.keyDown(input, {key: 'Enter', code: 'Enter'});
+    assert.strictEqual(input?.value, 'foobar');
+  });
+
+  it('onChange callback is called', async () => {
+    const onChangeStub = sinon.stub();
+
+    const {container} = render(<ReactAutocomplete
+      label="cool"
+      options={[]}
+      onChange={onChangeStub}
+    />);
+
+    const input = container.querySelector('input');
+    assert.isNotNull(input);
+    if (!input) return;
+
+    sinon.assert.notCalled(onChangeStub);
+
+    userEvent.type(input, 'foobar');
+    sinon.assert.notCalled(onChangeStub);
+
+    fireEvent.keyDown(input, {key: 'Enter', code: 'Enter'});
+    sinon.assert.calledOnce(onChangeStub);
+
+    assert.equal(onChangeStub.getCall(0).args[1], 'foobar');
+  });
+
+  it('onChange excludes fixed values', async () => {
+    const onChangeStub = sinon.stub();
+
+    const {container} = render(<ReactAutocomplete
+      label="cool"
+      options={['cute owl']}
+      multiple={true}
+      fixedValues={['immortal penguin']}
+      onChange={onChangeStub}
+    />);
+
+    const input = container.querySelector('input');
+    assert.isNotNull(input);
+    if (!input) return;
+
+    fireEvent.keyDown(input, {key: 'Backspace', code: 'Backspace'});
+    fireEvent.keyDown(input, {key: 'Enter', code: 'Enter'});
+
+    sinon.assert.calledWith(onChangeStub, sinon.match.any, []);
+  });
+
+  it('pressing space creates new chips', async () => {
+    const onChangeStub = sinon.stub();
+
+    const {container} = render(<ReactAutocomplete
+      label="cool"
+      options={['cute owl']}
+      multiple={true}
+      onChange={onChangeStub}
+    />);
+
+    const input = container.querySelector('input');
+    assert.isNotNull(input);
+    if (!input) return;
+
+    sinon.assert.notCalled(onChangeStub);
+
+    userEvent.type(input, 'foobar');
+    sinon.assert.notCalled(onChangeStub);
+
+    fireEvent.keyDown(input, {key: ' ', code: 'Space'});
+    sinon.assert.calledOnce(onChangeStub);
+
+    assert.deepEqual(onChangeStub.getCall(0).args[1], ['foobar']);
+  });
+
+  it('_renderOption shows user input', async () => {
+    const {container} = render(<ReactAutocomplete
+      label="cool"
+      options={['cute@owl.com']}
+    />);
+
+    const input = container.querySelector('input');
+    assert.isNotNull(input);
+    if (!input) return;
+
+    userEvent.type(input, 'ow');
+
+    const options = document.querySelectorAll('.autocomplete-option');
+
+    // Options: cute@owl.com
+    assert.deepEqual(options.length, 1);
+    assert.equal(options[0].textContent, 'cute@owl.com');
+
+    cleanAutocomplete(input);
+  });
+
+  it('_renderOption hides duplicate user input', async () => {
+    const {container} = render(<ReactAutocomplete
+      label="cool"
+      options={['cute@owl.com']}
+    />);
+
+    const input = container.querySelector('input');
+    assert.isNotNull(input);
+    if (!input) return;
+
+    userEvent.type(input, 'cute@owl.com');
+
+    const options = document.querySelectorAll('.autocomplete-option');
+
+    // Options: cute@owl.com
+    assert.equal(options.length, 1);
+
+    assert.equal(options[0].textContent, 'cute@owl.com');
+
+    cleanAutocomplete(input);
+  });
+
+  it('_renderOption highlights matching text', async () => {
+    const {container} = render(<ReactAutocomplete
+      label="cool"
+      options={['cute@owl.com']}
+    />);
+
+    const input = container.querySelector('input');
+    assert.isNotNull(input);
+    if (!input) return;
+
+    userEvent.type(input, 'ow');
+
+    const option = document.querySelector('.autocomplete-option');
+    const match = option?.querySelector('strong');
+
+    assert.isNotNull(match);
+    assert.equal(match?.innerText, 'ow');
+
+    // Description is not rendered.
+    assert.equal(option?.querySelectorAll('span').length, 1);
+    assert.equal(option?.querySelectorAll('strong').length, 1);
+
+    cleanAutocomplete(input);
+  });
+
+  it('_renderOption highlights matching description', async () => {
+    const {container} = render(<ReactAutocomplete
+      label="cool"
+      getOptionDescription={() => 'penguin of-doom'}
+      options={['cute owl']}
+    />);
+
+    const input = container.querySelector('input');
+    assert.isNotNull(input);
+    if (!input) return;
+
+    userEvent.type(input, 'do');
+
+    const option = document.querySelector('.autocomplete-option');
+    const match = option?.querySelector('strong');
+
+    assert.isNotNull(match);
+    assert.equal(match?.innerText, 'do');
+
+    assert.equal(option?.querySelectorAll('span').length, 2);
+    assert.equal(option?.querySelectorAll('strong').length, 1);
+
+    cleanAutocomplete(input);
+  });
+
+  it('_renderTags disables fixedValues', async () => {
+    // TODO(crbug.com/monorail/9393): Add this test once we have a way to stub
+    // out dependent components.
+  });
+});
diff --git a/static_src/react/ReactAutocomplete.tsx b/static_src/react/ReactAutocomplete.tsx
new file mode 100644
index 0000000..27fdc32
--- /dev/null
+++ b/static_src/react/ReactAutocomplete.tsx
@@ -0,0 +1,276 @@
+// Copyright 2021 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.
+
+import React from 'react';
+
+import {FilterOptionsState} from '@material-ui/core';
+import Autocomplete, {
+  AutocompleteChangeDetails, AutocompleteChangeReason,
+  AutocompleteRenderGetTagProps, AutocompleteRenderInputParams,
+  AutocompleteRenderOptionState,
+} from '@material-ui/core/Autocomplete';
+import Chip, {ChipProps} from '@material-ui/core/Chip';
+import TextField from '@material-ui/core/TextField';
+import {Value} from '@material-ui/core/useAutocomplete';
+
+export const MAX_AUTOCOMPLETE_OPTIONS = 100;
+
+interface AutocompleteProps<T> {
+  label: string;
+  options: T[];
+  value?: Value<T, boolean, false, true>;
+  fixedValues?: T[];
+  inputType?: React.InputHTMLAttributes<unknown>['type'];
+  multiple?: boolean;
+  placeholder?: string;
+  onChange?: (
+    event: React.SyntheticEvent,
+    value: Value<T, boolean, false, true>,
+    reason: AutocompleteChangeReason,
+    details?: AutocompleteChangeDetails<T>
+  ) => void;
+  getOptionDescription?: (option: T) => string;
+  getOptionLabel?: (option: T) => string;
+}
+
+/**
+ * A wrapper around Material UI Autocomplete that customizes and extends it for
+ * Monorail's theme and options. Adds support for:
+ * - Fixed values that render as disabled chips.
+ * - Option descriptions that render alongside the option labels.
+ * - Matching on word boundaries in both the labels and descriptions.
+ * - Highlighting of the matching substrings.
+ * @return Autocomplete instance with Monorail-specific properties set.
+ */
+export function ReactAutocomplete<T>(
+  {
+    label, options, value = undefined, fixedValues = [], inputType = 'text',
+    multiple = false, placeholder = '', onChange = () => {},
+    getOptionDescription = () => '', getOptionLabel = (o) => String(o)
+  }: AutocompleteProps<T>
+): React.ReactNode {
+  value = value || (multiple ? [] : '');
+
+  return <Autocomplete
+    id={label}
+    autoHighlight
+    autoSelect
+    filterOptions={_filterOptions(getOptionDescription)}
+    filterSelectedOptions={multiple}
+    freeSolo
+    getOptionLabel={getOptionLabel}
+    multiple={multiple}
+    onChange={_onChange(fixedValues, multiple, onChange)}
+    onKeyDown={_onKeyDown}
+    options={options}
+    renderInput={_renderInput(inputType, placeholder)}
+    renderOption={_renderOption(getOptionDescription, getOptionLabel)}
+    renderTags={_renderTags(fixedValues, getOptionLabel)}
+    style={{width: 'var(--mr-edit-field-width)'}}
+    value={multiple ? [...fixedValues, ...value] : value}
+  />;
+}
+
+/**
+ * Modifies the default option matching behavior to match on all Regex word
+ * boundaries and to match on both label and description.
+ * @param getOptionDescription Function to get the description for an option.
+ * @return The text for a given option.
+ */
+function _filterOptions<T>(getOptionDescription: (option: T) => string) {
+  return (
+    options: T[],
+    {inputValue, getOptionLabel}: FilterOptionsState<T>
+  ): T[] => {
+    if (!inputValue.length) {
+      return [];
+    }
+    const regex = _matchRegex(inputValue);
+    const predicate = (option: T) => {
+      return getOptionLabel(option).match(regex) ||
+        getOptionDescription(option).match(regex);
+    }
+    return options.filter(predicate).slice(0, MAX_AUTOCOMPLETE_OPTIONS);
+  }
+}
+
+/**
+ * Computes an onChange handler for Autocomplete. Adds logic to make sure
+ * fixedValues are preserved and wraps whatever onChange handler the parent
+ * passed in.
+ * @param fixedValues Values that display in the edit field but can't be
+ *   edited by the user. Usually set by filter rules in Monorail.
+ * @param multiple Whether this input takes multiple values or not.
+ * @param onChange onChange property passed in by parent, used to sync value
+ *   changes to parent.
+ * @return Function that's run on Autocomplete changes.
+ */
+function _onChange<T, Multiple, DisableClearable, FreeSolo>(
+  fixedValues: T[],
+  multiple: Multiple,
+  onChange: (
+    event: React.SyntheticEvent,
+    value: Value<T, Multiple, DisableClearable, FreeSolo>,
+    reason: AutocompleteChangeReason,
+    details?: AutocompleteChangeDetails<T>
+  ) => void,
+) {
+  return (
+    event: React.SyntheticEvent,
+    newValue: Value<T, Multiple, DisableClearable, FreeSolo>,
+    reason: AutocompleteChangeReason,
+    details?: AutocompleteChangeDetails<T>
+  ): void => {
+    // Ensure that fixed values can't be removed.
+    if (multiple) {
+      newValue = newValue.filter((option: T) => !fixedValues.includes(option));
+    }
+
+    // Propagate onChange callback.
+    onChange(event, newValue, reason, details);
+  }
+}
+
+/**
+ * Custom keydown handler.
+ * @param e Keyboard event.
+ */
+function _onKeyDown(e: React.KeyboardEvent) {
+  // Convert spaces to Enter events to allow users to type space to create new
+  // chips.
+  if (e.key === ' ') {
+    e.key = 'Enter';
+  }
+}
+
+/**
+ * @param inputType A valid HTML 5 input type for the `input` element.
+ * @param placeholder Placeholder text for the input.
+ * @return A function that renders the input element used by
+ *   ReactAutocomplete.
+ */
+function _renderInput(inputType = 'text', placeholder = ''):
+    (params: AutocompleteRenderInputParams) => React.ReactNode {
+  return (params: AutocompleteRenderInputParams): React.ReactNode =>
+    <TextField
+      {...params} variant="standard" size="small"
+      type={inputType} placeholder={placeholder}
+    />;
+}
+
+/**
+ * Renders a single instance of an option for Autocomplete.
+ * @param getOptionDescription Function to get the description text shown.
+ * @param getOptionLabel Function to get the name of the option shown to the
+ *   user.
+ * @return ReactNode containing the JSX to be rendered.
+ */
+function _renderOption<T>(
+  getOptionDescription: (option: T) => string,
+  getOptionLabel: (option: T) => string
+): React.ReactNode {
+  return (
+    props: React.HTMLAttributes<HTMLLIElement>,
+    option: T,
+    {inputValue}: AutocompleteRenderOptionState
+  ): React.ReactNode => {
+    // Render the option label.
+    const label = getOptionLabel(option);
+    const matchValue = label.match(_matchRegex(inputValue));
+    let optionTemplate = <>{label}</>;
+    if (matchValue) {
+      // Highlight the matching text.
+      optionTemplate = <>
+        {matchValue[1]}
+        <strong>{matchValue[2]}</strong>
+        {matchValue[3]}
+      </>;
+    }
+
+    // Render the option description.
+    const description = getOptionDescription(option);
+    const matchDescription =
+      description && description.match(_matchRegex(inputValue));
+    let descriptionTemplate = <>{description}</>;
+    if (matchDescription) {
+      // Highlight the matching text.
+      descriptionTemplate = <>
+        {matchDescription[1]}
+        <strong>{matchDescription[2]}</strong>
+        {matchDescription[3]}
+      </>;
+    }
+
+    // Put the label and description together into one <li>.
+    return <li
+      {...props}
+      className={`${props.className} autocomplete-option`}
+      style={{display: 'flex', flexDirection: 'row', wordWrap: 'break-word'}}
+    >
+      <span style={{display: 'block', width: (description ? '40%' : '100%')}}>
+        {optionTemplate}
+      </span>
+      {description &&
+        <span style={{display: 'block', boxSizing: 'border-box',
+            paddingLeft: '8px', width: '60%'}}>
+          {descriptionTemplate}
+        </span>
+      }
+    </li>;
+  };
+}
+
+/**
+ * Helper to render the Chips elements used by Autocomplete. Ensures that
+ * fixedValues are disabled.
+ * @param fixedValues Undeleteable values in an issue usually set by filter
+ *   rules.
+ * @param getOptionLabel Function to compute text for the option.
+ * @return Function to render the ReactNode for all the chips.
+ */
+function _renderTags<T>(
+  fixedValues: T[], getOptionLabel: (option: T) => string
+) {
+  return (
+    value: T[],
+    getTagProps: AutocompleteRenderGetTagProps
+  ): React.ReactNode => {
+    return value.map((option, index) => {
+      const props: ChipProps = {...getTagProps({index})};
+      const disabled = fixedValues.includes(option);
+      if (disabled) {
+        delete props.onDelete;
+      }
+
+      const label = getOptionLabel(option);
+      return <Chip
+        {...props}
+        key={label}
+        label={label}
+        disabled={disabled}
+        size="small"
+      />;
+    });
+  }
+}
+
+/**
+ * Generates a RegExp to match autocomplete values.
+ * @param needle The string the user is searching for.
+ * @return A RegExp to find matching values.
+ */
+function _matchRegex(needle: string): RegExp {
+  // This code copied from ac.js.
+  // Since we use needle to build a regular expression, we need to escape RE
+  // characters. We match '-', '{', '$' and others in the needle and convert
+  // them into "\-", "\{", "\$".
+  const regexForRegexCharacters = /([\^*+\-\$\\\{\}\(\)\[\]\#?\.])/g;
+  const modifiedPrefix = needle.replace(regexForRegexCharacters, '\\$1');
+
+  // Match the modifiedPrefix anywhere as long as it is either at the very
+  // beginning "Th" -> "The Hobbit", or comes immediately after a word separator
+  // such as "Ga" -> "The-Great-Gatsby".
+  const patternRegex = '^(.*\\W)?(' + modifiedPrefix + ')(.*)';
+  return new RegExp(patternRegex, 'i' /* ignore case */);
+}
diff --git a/static_src/react/issue-wizard/DetailsStep.test.tsx b/static_src/react/issue-wizard/DetailsStep.test.tsx
new file mode 100644
index 0000000..eaef0e7
--- /dev/null
+++ b/static_src/react/issue-wizard/DetailsStep.test.tsx
@@ -0,0 +1,34 @@
+// Copyright 2021 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.
+
+import React from 'react';
+import {render, cleanup} from '@testing-library/react';
+import {assert} from 'chai';
+
+import DetailsStep from './DetailsStep.tsx';
+
+describe('DetailsStep', () => {
+  afterEach(cleanup);
+
+  it('renders', async () => {
+    const {container} = render(<DetailsStep />);
+
+    // this is checking for the first question
+    const input = container.querySelector('input');
+    assert.isNotNull(input)
+
+    // this is checking for the rest
+    const count = document.querySelectorAll('textarea').length;
+    assert.equal(count, 3)
+  });
+
+  it('renders category in title', async () => {
+    const {container} = render(<DetailsStep category='UI'/>);
+
+    // this is checking the title contains our category
+    const title = container.querySelector('h2');
+    assert.include(title?.innerText, 'Details for problems with UI');
+  });
+
+});
\ No newline at end of file
diff --git a/static_src/react/issue-wizard/DetailsStep.tsx b/static_src/react/issue-wizard/DetailsStep.tsx
new file mode 100644
index 0000000..1a69cc1
--- /dev/null
+++ b/static_src/react/issue-wizard/DetailsStep.tsx
@@ -0,0 +1,65 @@
+// Copyright 2021 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.
+
+import React from 'react';
+import {createStyles, createTheme} from '@material-ui/core/styles';
+import {makeStyles} from '@material-ui/styles';
+import TextField from '@material-ui/core/TextField';
+import {red, grey} from '@material-ui/core/colors';
+
+/**
+ * The detail step is the second step on the dot
+ * stepper. This react component provides the users with
+ * specific questions about their bug to be filled out.
+ */
+const theme: Theme = createTheme();
+
+const useStyles = makeStyles((theme: Theme) =>
+  createStyles({
+    root: {
+      '& > *': {
+        margin: theme.spacing(1),
+        width: '100%',
+      },
+    },
+    head: {
+        marginTop: '25px',
+    },
+    red: {
+        color: red[600],
+    },
+    grey: {
+        color: grey[600],
+    },
+  }), {defaultTheme: theme}
+);
+
+export default function DetailsStep({textValues, setTextValues, category}:
+  {textValues: Object, setTextValues: Function, category: string}): React.ReactElement {
+  const classes = useStyles();
+
+  const handleChange = (valueName: string) => (e: React.ChangeEvent<HTMLInputElement>) => {
+    const textInput = e.target.value;
+    setTextValues({...textValues, [valueName]: textInput});
+  };
+
+  return (
+    <>
+        <h2 className={classes.grey}>Details for problems with {category}</h2>
+        <form className={classes.root} noValidate autoComplete="off">
+            <h3 className={classes.head}>Please enter a one line summary <span className={classes.red}>*</span></h3>
+            <TextField id="outlined-basic-1" variant="outlined" onChange={handleChange('oneLineSummary')}/>
+
+            <h3 className={classes.head}>Steps to reproduce problem <span className={classes.red}>*</span></h3>
+            <TextField multiline rows={4} id="outlined-basic-2" variant="outlined" onChange={handleChange('stepsToReproduce')}/>
+
+            <h3 className={classes.head}>Please describe the problem <span className={classes.red}>*</span></h3>
+            <TextField multiline rows={3} id="outlined-basic-3" variant="outlined" onChange={handleChange('describeProblem')}/>
+
+            <h3 className={classes.head}>Additional Comments</h3>
+            <TextField multiline rows={3} id="outlined-basic-4" variant="outlined" onChange={handleChange('additionalComments')}/>
+        </form>
+    </>
+  );
+}
diff --git a/static_src/react/issue-wizard/DotMobileStepper.test.tsx b/static_src/react/issue-wizard/DotMobileStepper.test.tsx
new file mode 100644
index 0000000..5203110
--- /dev/null
+++ b/static_src/react/issue-wizard/DotMobileStepper.test.tsx
@@ -0,0 +1,59 @@
+// Copyright 2021 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.
+
+import React from 'react';
+import {render, screen, cleanup} from '@testing-library/react';
+import {assert} from 'chai';
+
+import DotMobileStepper from './DotMobileStepper.tsx';
+
+describe('DotMobileStepper', () => {
+  let container: HTMLElement;
+
+  afterEach(cleanup);
+
+  it('renders', () => {
+    container = render(<DotMobileStepper activeStep={0} nextEnabled={true}/>).container;
+
+    // this is checking the buttons for the stepper rendered
+      const count = document.querySelectorAll('button').length;
+      assert.equal(count, 2)
+  });
+
+  it('back button disabled on first step', () => {
+    render(<DotMobileStepper activeStep={0} nextEnabled={true}/>).container;
+
+    // Finds a button on the page with "back" as text using React testing library.
+    const backButton = screen.getByRole('button', {name: /backButton/i}) as HTMLButtonElement;
+
+    // Back button is disabled on the first step.
+    assert.isTrue(backButton.disabled);
+  });
+
+  it('both buttons enabled on second step', () => {
+    render(<DotMobileStepper activeStep={1} nextEnabled={true}/>).container;
+
+    // Finds a button on the page with "back" as text using React testing library.
+    const backButton = screen.getByRole('button', {name: /backButton/i}) as HTMLButtonElement;
+
+    // Finds a button on the page with "next" as text using React testing library.
+    const nextButton = screen.getByRole('button', {name: /nextButton/i}) as HTMLButtonElement;
+
+    // Back button is not disabled on the second step.
+    assert.isFalse(backButton.disabled);
+
+    // Next button is not disabled on the second step.
+    assert.isFalse(nextButton.disabled);
+  });
+
+  it('next button disabled on last step', () => {
+    render(<DotMobileStepper activeStep={2}/>).container;
+
+    // Finds a button on the page with "next" as text using React testing library.
+    const nextButton = screen.getByRole('button', {name: /nextButton/i}) as HTMLButtonElement;
+
+    // Next button is disabled on the second step.
+    assert.isTrue(nextButton.disabled);
+  });
+});
\ No newline at end of file
diff --git a/static_src/react/issue-wizard/DotMobileStepper.tsx b/static_src/react/issue-wizard/DotMobileStepper.tsx
new file mode 100644
index 0000000..9870f03
--- /dev/null
+++ b/static_src/react/issue-wizard/DotMobileStepper.tsx
@@ -0,0 +1,72 @@
+// Copyright 2021 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.
+
+import React from 'react';
+import {createTheme} from '@material-ui/core/styles';
+import {makeStyles} from '@material-ui/styles';
+import MobileStepper from '@material-ui/core/MobileStepper';
+import Button from '@material-ui/core/Button';
+import KeyboardArrowLeft from '@material-ui/icons/KeyboardArrowLeft';
+import KeyboardArrowRight from '@material-ui/icons/KeyboardArrowRight';
+
+const theme: Theme = createTheme();
+
+const useStyles = makeStyles({
+  root: {
+    width: '100%',
+    flexGrow: 1,
+  },
+}, {defaultTheme: theme});
+
+/**
+ * `<DotMobileStepper />`
+ *
+ * React component for rendering the linear dot stepper of the issue wizard.
+ *
+ *  @return ReactElement.
+ */
+export default function DotsMobileStepper({nextEnabled, activeStep, setActiveStep} : {nextEnabled: boolean, activeStep: number, setActiveStep: Function}) : React.ReactElement {
+  const classes = useStyles();
+
+  const handleNext = () => {
+    setActiveStep((prevActiveStep: number) => prevActiveStep + 1);
+  };
+
+  const handleBack = () => {
+    setActiveStep((prevActiveStep: number) => prevActiveStep - 1);
+  };
+
+  let label;
+  let icon;
+
+  if (activeStep === 2){
+    label = 'Submit';
+    icon = '';
+  } else {
+    label = 'Next';
+    icon = <KeyboardArrowRight />;
+  }
+  return (
+    <MobileStepper
+      id="mobile-stepper"
+      variant="dots"
+      steps={3}
+      position="static"
+      activeStep={activeStep}
+      className={classes.root}
+      nextButton={
+        <Button aria-label="nextButton" size="medium" onClick={handleNext} disabled={activeStep === 2 || !nextEnabled}>
+          {label}
+          {icon}
+        </Button>
+      }
+      backButton={
+        <Button aria-label="backButton" size="medium" onClick={handleBack} disabled={activeStep === 0}>
+          <KeyboardArrowLeft />
+          Back
+        </Button>
+      }
+    />
+  );
+}
\ No newline at end of file
diff --git a/static_src/react/issue-wizard/LandingStep.tsx b/static_src/react/issue-wizard/LandingStep.tsx
new file mode 100644
index 0000000..efe6491
--- /dev/null
+++ b/static_src/react/issue-wizard/LandingStep.tsx
@@ -0,0 +1,108 @@
+import React from 'react';
+import {makeStyles, withStyles} from '@material-ui/styles';
+import {blue, yellow, red, grey} from '@material-ui/core/colors';
+import FormControlLabel from '@material-ui/core/FormControlLabel';
+import Checkbox, {CheckboxProps} from '@material-ui/core/Checkbox';
+import SelectMenu from './SelectMenu.tsx';
+import RadioDescription from './RadioDescription.tsx';
+
+const CustomCheckbox = withStyles({
+  root: {
+    color: blue[400],
+    '&$checked': {
+      color: blue[600],
+    },
+  },
+  checked: {},
+})((props: CheckboxProps) => <Checkbox color="default" {...props} />);
+
+const useStyles = makeStyles({
+  pad: {
+    margin: '10px, 20px',
+    display: 'inline-block',
+  },
+  flex: {
+    display: 'flex',
+  },
+  inlineBlock: {
+    display: 'inline-block',
+  },
+  warningBox: {
+    minHeight: '10vh',
+    borderStyle: 'solid',
+    borderWidth: '2px',
+    borderColor: yellow[800],
+    borderRadius: '8px',
+    background: yellow[50],
+    padding: '0px 20px 1em',
+    margin: '30px 0px'
+  },
+  warningHeader: {
+    color: yellow[800],
+    fontSize: '16px',
+    fontWeight: '500',
+  },
+  star:{
+    color: red[700],
+    marginRight: '8px',
+    fontSize: '16px',
+    display: 'inline-block',
+  },
+  header: {
+    color: grey[900],
+    fontSize: '28px',
+    marginTop: '6vh',
+  },
+  subheader: {
+    color: grey[700],
+    fontSize: '18px',
+    lineHeight: '32px',
+  },
+  red: {
+    color: red[600],
+  },
+});
+
+export default function LandingStep({checkExisting, setCheckExisting, userType, setUserType, category, setCategory}:
+  {checkExisting: boolean, setCheckExisting: Function, userType: string, setUserType: Function, category: string, setCategory: Function}) {
+  const classes = useStyles();
+
+  const handleCheckChange = (event: React.ChangeEvent<HTMLInputElement>) => {
+    setCheckExisting(event.target.checked);
+  };
+
+  return (
+    <>
+      <p className={classes.header}>Report an issue with Chromium</p>
+      <p className={classes.subheader}>
+        We want you to enter the best possible issue report so that the project team members
+        can act on it effectively. The following steps will help route your issue to the correct
+        people.
+      </p>
+      <p className={classes.subheader}>
+        Please select your following role: <span className={classes.red}>*</span>
+      </p>
+      <RadioDescription value={userType} setValue={setUserType}/>
+      <div className={classes.subheader}>
+        Which of the following best describes the issue that you are reporting? <span className={classes.red}>*</span>
+      </div>
+      <SelectMenu option={category} setOption={setCategory}/>
+      <div className={classes.warningBox}>
+        <p className={classes.warningHeader}> Avoid duplicate issue reports:</p>
+        <div>
+          <div className={classes.star}>*</div>
+          <FormControlLabel className={classes.pad}
+            control={
+              <CustomCheckbox
+                checked={checkExisting}
+                onChange={handleCheckChange}
+                name="warningCheck"
+              />
+            }
+            label="By checking this box, I'm acknowledging that I have searched for existing issues that already report this problem."
+          />
+        </div>
+      </div>
+    </>
+  );
+}
\ No newline at end of file
diff --git a/static_src/react/issue-wizard/RadioDescription.test.tsx b/static_src/react/issue-wizard/RadioDescription.test.tsx
new file mode 100644
index 0000000..ff65eae
--- /dev/null
+++ b/static_src/react/issue-wizard/RadioDescription.test.tsx
@@ -0,0 +1,54 @@
+// Copyright 2021 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.
+
+import React from 'react';
+import {render, screen, cleanup} from '@testing-library/react';
+import userEvent from '@testing-library/user-event'
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import RadioDescription from './RadioDescription.tsx';
+
+describe('RadioDescription', () => {
+  afterEach(cleanup);
+
+  it('renders', () => {
+    render(<RadioDescription />);
+    // look for blue radios
+      const radioOne = screen.getByRole('radio', {name: /Web Developer/i});
+      assert.isNotNull(radioOne)
+
+      const radioTwo = screen.getByRole('radio', {name: /End User/i});
+      assert.isNotNull(radioTwo)
+
+      const radioThree = screen.getByRole('radio', {name: /Chromium Contributor/i});
+      assert.isNotNull(radioThree)
+  });
+
+  it('checks selected radio value', () => {
+    // We're passing in the "Web Developer" value here manually
+    // to tell our code that that radio button is selected.
+    render(<RadioDescription value={'Web Developer'} />);
+
+    const checkedRadio = screen.getByRole('radio', {name: /Web Developer/i});
+    assert.isTrue(checkedRadio.checked);
+
+    // Extra check to make sure we haven't checked every single radio button.
+    const uncheckedRadio = screen.getByRole('radio', {name: /End User/i});
+    assert.isFalse(uncheckedRadio.checked);
+  });
+
+  it('sets radio value when clicked', () => {
+    // Using the sinon.js testing library to create a function for testing.
+    const setValue = sinon.stub();
+
+    render(<RadioDescription setValue={setValue} />);
+
+    const radio = screen.getByRole('radio', {name: /Web Developer/i});
+    userEvent.click(radio);
+
+    // Asserts that "Web Developer" was passed into our "setValue" function.
+    sinon.assert.calledWith(setValue, 'Web Developer');
+  });
+});
\ No newline at end of file
diff --git a/static_src/react/issue-wizard/RadioDescription.tsx b/static_src/react/issue-wizard/RadioDescription.tsx
new file mode 100644
index 0000000..ad78c78
--- /dev/null
+++ b/static_src/react/issue-wizard/RadioDescription.tsx
@@ -0,0 +1,117 @@
+// Copyright 2021 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.
+
+import React from 'react';
+import {makeStyles, withStyles} from '@material-ui/styles';
+import {blue, grey} from '@material-ui/core/colors';
+import Radio, {RadioProps} from '@material-ui/core/Radio';
+
+const userGroups = Object.freeze({
+  END_USER: 'End User',
+  WEB_DEVELOPER: 'Web Developer',
+  CONTRIBUTOR: 'Chromium Contributor',
+});
+
+const BlueRadio = withStyles({
+  root: {
+    color: blue[400],
+    '&$checked': {
+      color: blue[600],
+    },
+  },
+  checked: {},
+})((props: RadioProps) => <Radio color="default" {...props} />);
+
+const useStyles = makeStyles({
+  flex: {
+    display: 'flex',
+    justifyContent: 'space-between',
+  },
+  container: {
+    width: '320px',
+    height: '150px',
+    position: 'relative',
+    display: 'inline-block',
+  },
+  text: {
+    position: 'absolute',
+    display: 'inline-block',
+    left: '55px',
+  },
+  title: {
+    marginTop: '7px',
+    fontSize: '20px',
+    color: grey[900],
+  },
+  subheader: {
+    fontSize: '16px',
+    color: grey[800],
+  },
+  line: {
+    position: 'absolute',
+    bottom: 0,
+    width: '300px',
+    left: '20px',
+  }
+});
+
+/**
+ * `<RadioDescription />`
+ *
+ * React component for radio buttons and their descriptions
+ * on the landing step of the Issue Wizard.
+ *
+ *  @return ReactElement.
+ */
+export default function RadioDescription({value, setValue} : {value: string, setValue: Function}): React.ReactElement {
+  const classes = useStyles();
+
+  const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
+    setValue(event.target.value);
+  };
+
+  return (
+    <div className={classes.flex}>
+      <div className={classes.container}>
+        <BlueRadio
+          checked={value === userGroups.END_USER}
+          onChange={handleChange}
+          value={userGroups.END_USER}
+          inputProps={{ 'aria-label': userGroups.END_USER}}
+        />
+        <div className={classes.text}>
+          <p className={classes.title}>{userGroups.END_USER}</p>
+          <p className={classes.subheader}>I am a user trying to do something on a website.</p>
+        </div>
+        <hr color={grey[200]} className={classes.line}/>
+      </div>
+      <div className={classes.container}>
+        <BlueRadio
+          checked={value === userGroups.WEB_DEVELOPER}
+          onChange={handleChange}
+          value={userGroups.WEB_DEVELOPER}
+          inputProps={{ 'aria-label': userGroups.WEB_DEVELOPER }}
+        />
+        <div className={classes.text}>
+          <p className={classes.title}>{userGroups.WEB_DEVELOPER}</p>
+          <p className={classes.subheader}>I am a web developer trying to build something.</p>
+        </div>
+        <hr color={grey[200]} className={classes.line}/>
+      </div>
+      <div className={classes.container}>
+        <BlueRadio
+          checked={value === userGroups.CONTRIBUTOR}
+          onChange={handleChange}
+          value={userGroups.CONTRIBUTOR}
+          inputProps={{ 'aria-label': userGroups.CONTRIBUTOR }}
+        />
+        <div className={classes.text}>
+          <p className={classes.title}>{userGroups.CONTRIBUTOR}</p>
+          <p className={classes.subheader}>I know about a problem in specific tests or code.</p>
+        </div>
+        <hr color={grey[200]} className={classes.line}/>
+      </div>
+    </div>
+    );
+  }
\ No newline at end of file
diff --git a/static_src/react/issue-wizard/SelectMenu.test.tsx b/static_src/react/issue-wizard/SelectMenu.test.tsx
new file mode 100644
index 0000000..13efef6
--- /dev/null
+++ b/static_src/react/issue-wizard/SelectMenu.test.tsx
@@ -0,0 +1,38 @@
+// Copyright 2021 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.
+
+import React from 'react';
+import {render} from '@testing-library/react';
+import userEvent from '@testing-library/user-event';
+import {screen} from '@testing-library/dom';
+import {assert} from 'chai';
+
+import SelectMenu from './SelectMenu.tsx';
+
+describe('SelectMenu', () => {
+  let container: React.RenderResult;
+
+  beforeEach(() => {
+    container = render(<SelectMenu />).container;
+  });
+
+  it('renders', () => {
+    const form = container.querySelector('form');
+    assert.isNotNull(form)
+  });
+
+  it('renders options on click', () => {
+    const input = document.getElementById('outlined-select-category');
+    if (!input) {
+      throw new Error('Input is undefined');
+    }
+
+    userEvent.click(input)
+
+    // 14 is the current number of options in the select menu
+    const count = screen.getAllByTestId('select-menu-item').length;
+
+    assert.equal(count, 14);
+  });
+});
\ No newline at end of file
diff --git a/static_src/react/issue-wizard/SelectMenu.tsx b/static_src/react/issue-wizard/SelectMenu.tsx
new file mode 100644
index 0000000..3b0b96d
--- /dev/null
+++ b/static_src/react/issue-wizard/SelectMenu.tsx
@@ -0,0 +1,133 @@
+// Copyright 2021 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.
+
+import React from 'react';
+import {createTheme, Theme} from '@material-ui/core/styles';
+import {makeStyles} from '@material-ui/styles';
+import MenuItem from '@material-ui/core/MenuItem';
+import TextField from '@material-ui/core/TextField';
+
+const CATEGORIES = [
+  {
+    value: 'UI',
+    label: 'UI',
+  },
+  {
+    value: 'Accessibility',
+    label: 'Accessibility',
+  },
+  {
+    value: 'Network/Downloading',
+    label: 'Network/Downloading',
+  },
+  {
+    value: 'Audio/Video',
+    label: 'Audio/Video',
+  },
+  {
+    value: 'Content',
+    label: 'Content',
+  },
+  {
+    value: 'Apps',
+    label: 'Apps',
+  },
+  {
+    value: 'Extensions/Themes',
+    label: 'Extensions/Themes',
+  },
+  {
+    value: 'Webstore',
+    label: 'Webstore',
+  },
+  {
+    value: 'Sync',
+    label: 'Sync',
+  },
+  {
+    value: 'Enterprise',
+    label: 'Enterprise',
+  },
+  {
+    value: 'Installation',
+    label: 'Installation',
+  },
+  {
+    value: 'Crashes',
+    label: 'Crashes',
+  },
+  {
+    value: 'Security',
+    label: 'Security',
+  },
+  {
+    value: 'Other',
+    label: 'Other',
+  },
+];
+
+const theme: Theme = createTheme();
+
+const useStyles = makeStyles((theme: Theme) => ({
+  container: {
+    display: 'flex',
+    flexWrap: 'wrap',
+    maxWidth: '65%',
+  },
+  textField: {
+    marginLeft: theme.spacing(1),
+    marginRight: theme.spacing(1),
+  },
+  menu: {
+    width: '100%',
+    minWidth: '300px',
+  },
+}), {defaultTheme: theme});
+
+/**
+ * Select menu component that is located on the landing step if the
+ * Issue Wizard. The menu is used for the user to indicate the category
+ * of their bug when filing an issue.
+ *
+ * @return ReactElement.
+ */
+export default function SelectMenu({option, setOption}: {option: string, setOption: Function}) {
+  const classes = useStyles();
+  const handleChange = (event: React.ChangeEvent<{ value: unknown }>) => {
+    setOption(event.target.value as string);
+  };
+
+  return (
+    <form className={classes.container} noValidate autoComplete="off">
+      <TextField
+        id="outlined-select-category"
+        select
+        label=''
+        className={classes.textField}
+        value={option}
+        onChange={handleChange}
+        InputLabelProps={{shrink: false}}
+        SelectProps={{
+          MenuProps: {
+            className: classes.menu,
+          },
+        }}
+        margin="normal"
+        variant="outlined"
+        fullWidth={true}
+      >
+      {CATEGORIES.map(option => (
+        <MenuItem
+          className={classes.menu}
+          key={option.value}
+          value={option.value}
+          data-testid="select-menu-item"
+        >
+           {option.label}
+        </MenuItem>
+       ))}
+      </TextField>
+    </form>
+  );
+}
\ No newline at end of file
diff --git a/static_src/react/mr-react-autocomplete.test.ts b/static_src/react/mr-react-autocomplete.test.ts
new file mode 100644
index 0000000..8553c36
--- /dev/null
+++ b/static_src/react/mr-react-autocomplete.test.ts
@@ -0,0 +1,158 @@
+// Copyright 2021 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import {MrReactAutocomplete} from './mr-react-autocomplete.tsx';
+
+let element: MrReactAutocomplete;
+
+describe('mr-react-autocomplete', () => {
+  beforeEach(() => {
+    element = document.createElement('mr-react-autocomplete');
+    element.vocabularyName = 'member';
+    document.body.appendChild(element);
+
+    sinon.stub(element, 'stateChanged');
+  });
+
+  afterEach(() => {
+    document.body.removeChild(element);
+  });
+
+  it('initializes', () => {
+    assert.instanceOf(element, MrReactAutocomplete);
+  });
+
+  it('ReactDOM renders on update', async () => {
+    element.value = 'Penguin Island';
+
+    await element.updateComplete;
+
+    const input = element.querySelector('input');
+
+    assert.equal(input?.value, 'Penguin Island');
+  });
+
+  it('does not update on new copies of the same values', async () => {
+    element.fixedValues = ['test'];
+    element.value = ['hah'];
+
+    sinon.spy(element, 'updated');
+
+    await element.updateComplete;
+    sinon.assert.calledOnce(element.updated);
+
+    element.fixedValues = ['test'];
+    element.value = ['hah'];
+
+    await element.updateComplete;
+    sinon.assert.calledOnce(element.updated);
+  });
+
+  it('_getOptionDescription with component vocabulary gets docstring', () => {
+    element.vocabularyName = 'component';
+    element._components = new Map([['Infra>UI', {docstring: 'Test docs'}]]);
+    element._labels = new Map([['M-84', {docstring: 'Test label docs'}]]);
+
+    assert.equal(element._getOptionDescription('Infra>UI'), 'Test docs');
+    assert.equal(element._getOptionDescription('M-84'), '');
+    assert.equal(element._getOptionDescription('NoMatch'), '');
+  });
+
+  it('_getOptionDescription with label vocabulary gets docstring', () => {
+    element.vocabularyName = 'label';
+    element._components = new Map([['Infra>UI', {docstring: 'Test docs'}]]);
+    element._labels = new Map([['m-84', {docstring: 'Test label docs'}]]);
+
+    assert.equal(element._getOptionDescription('Infra>UI'), '');
+    assert.equal(element._getOptionDescription('M-84'), 'Test label docs');
+    assert.equal(element._getOptionDescription('NoMatch'), '');
+  });
+
+  it('_getOptionDescription with other vocabulary gets empty docstring', () => {
+    element.vocabularyName = 'owner';
+    element._components = new Map([['Infra>UI', {docstring: 'Test docs'}]]);
+    element._labels = new Map([['M-84', {docstring: 'Test label docs'}]]);
+
+    assert.equal(element._getOptionDescription('Infra>UI'), '');
+    assert.equal(element._getOptionDescription('M-84'), '');
+    assert.equal(element._getOptionDescription('NoMatch'), '');
+  });
+
+  it('_options gets component names', () => {
+    element.vocabularyName = 'component';
+    element._components = new Map([
+      ['Infra>UI', {docstring: 'Test docs'}],
+      ['Bird>Penguin', {docstring: 'Test docs'}],
+    ]);
+
+    assert.deepEqual(element._options(), ['Infra>UI', 'Bird>Penguin']);
+  });
+
+  it('_options gets label names', () => {
+    element.vocabularyName = 'label';
+    element._labels = new Map([
+      ['M-84', {label: 'm-84', docstring: 'Test docs'}],
+      ['Restrict-View-Bagel', {label: 'restrict-VieW-bAgEl', docstring: 'T'}],
+    ]);
+
+    assert.deepEqual(element._options(), ['m-84', 'restrict-VieW-bAgEl']);
+  });
+
+  it('_options gets member names with groups', () => {
+    element.vocabularyName = 'member';
+    element._members = {
+      userRefs: [
+        {displayName: 'penguin@island.com'},
+        {displayName: 'google@monorail.com'},
+        {displayName: 'group@birds.com'},
+      ],
+      groupRefs: [{displayName: 'group@birds.com'}],
+    };
+
+    assert.deepEqual(element._options(),
+        ['penguin@island.com', 'google@monorail.com', 'group@birds.com']);
+  });
+
+  it('_options gets owner names without groups', () => {
+    element.vocabularyName = 'owner';
+    element._members = {
+      userRefs: [
+        {displayName: 'penguin@island.com'},
+        {displayName: 'google@monorail.com'},
+        {displayName: 'group@birds.com'},
+      ],
+      groupRefs: [{displayName: 'group@birds.com'}],
+    };
+
+    assert.deepEqual(element._options(),
+        ['penguin@island.com', 'google@monorail.com']);
+  });
+
+  it('_options gets owner names without groups', () => {
+    element.vocabularyName = 'project';
+    element._projects = {
+      ownerOf: ['penguins'],
+      memberOf: ['birds'],
+      contributorTo: ['canary', 'owl-island'],
+    };
+
+    assert.deepEqual(element._options(),
+        ['penguins', 'birds', 'canary', 'owl-island']);
+  });
+
+  it('_options gives empty array for empty vocabulary name', () => {
+    element.vocabularyName = '';
+    assert.deepEqual(element._options(), []);
+  });
+
+  it('_options throws error on unknown vocabulary', () => {
+    element.vocabularyName = 'whatever';
+
+    assert.throws(element._options.bind(element),
+        'Unknown vocabulary name: whatever');
+  });
+});
diff --git a/static_src/react/mr-react-autocomplete.tsx b/static_src/react/mr-react-autocomplete.tsx
new file mode 100644
index 0000000..8cc5f84
--- /dev/null
+++ b/static_src/react/mr-react-autocomplete.tsx
@@ -0,0 +1,176 @@
+// Copyright 2021 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.
+
+import {LitElement, property, internalProperty} from 'lit-element';
+import React from 'react';
+import ReactDOM from 'react-dom';
+import deepEqual from 'deep-equal';
+
+import {AutocompleteChangeDetails, AutocompleteChangeReason}
+  from '@material-ui/core/Autocomplete';
+import {ThemeProvider, createTheme} from '@material-ui/core/styles';
+
+import {connectStore} from 'reducers/base.js';
+import * as projectV0 from 'reducers/projectV0.js';
+import * as userV0 from 'reducers/userV0.js';
+import {userRefsToDisplayNames} from 'shared/convertersV0.js';
+import {arrayDifference} from 'shared/helpers.js';
+
+import {ReactAutocomplete} from 'react/ReactAutocomplete.tsx';
+
+type Vocabulary = 'component' | 'label' | 'member' | 'owner' | 'project' | '';
+
+
+/**
+ * A normal text input enhanced by a panel of suggested options.
+ * `<mr-react-autocomplete>` wraps a React implementation of autocomplete
+ * in a web component, suitable for embedding in a LitElement component
+ * hierarchy. All parents must not use Shadow DOM. The supported autocomplete
+ * option types are defined in type Vocabulary.
+ */
+export class MrReactAutocomplete extends connectStore(LitElement) {
+  // Required properties passed in from the parent element.
+  /** The `<input id>` attribute. Called "label" to avoid name conflicts. */
+  @property() label: string = '';
+  /** The autocomplete option type. See type Vocabulary for the full list. */
+  @property() vocabularyName: Vocabulary = '';
+
+  // Optional properties passed in from the parent element.
+  /** The value (or values, if `multiple === true`). */
+  @property({
+    hasChanged: (oldVal, newVal) => !deepEqual(oldVal, newVal),
+  }) value?: string | string[] = undefined;
+  /** Values that show up as disabled chips. */
+  @property({
+    hasChanged: (oldVal, newVal) => !deepEqual(oldVal, newVal),
+  }) fixedValues: string[] = [];
+  /** A valid HTML 5 input type for the `input` element. */
+  @property() inputType: string = 'text';
+  /** True for chip input that takes multiple values, false for single input. */
+  @property() multiple: boolean = false;
+  /** Placeholder for the form input. */
+  @property() placeholder?: string = '';
+  /** Callback for input value changes. */
+  @property() onChange: (
+    event: React.SyntheticEvent,
+    newValue: string | string[] | null,
+    reason: AutocompleteChangeReason,
+    details?: AutocompleteChangeDetails
+  ) => void = () => {};
+
+  // Internal state properties from the Redux store.
+  @internalProperty() protected _components:
+    Map<string, ComponentDef> = new Map();
+  @internalProperty() protected _labels: Map<string, LabelDef> = new Map();
+  @internalProperty() protected _members:
+    {userRefs?: UserRef[], groupRefs?: UserRef[]} = {};
+  @internalProperty() protected _projects:
+    {contributorTo?: string[], memberOf?: string[], ownerOf?: string[]} = {};
+
+  /** @override */
+  createRenderRoot(): LitElement {
+    return this;
+  }
+
+  /** @override */
+  updated(changedProperties: Map<string | number | symbol, unknown>): void {
+    super.updated(changedProperties);
+
+    const theme = createTheme({
+      components: {
+        MuiChip: {
+          styleOverrides: {
+            root: {fontSize: 13},
+          },
+        },
+      },
+      palette: {
+        action: {disabledOpacity: 0.6},
+        primary: {
+          // Same as var(--chops-primary-accent-color).
+          main: '#1976d2',
+        },
+      },
+      typography: {fontSize: 11.375},
+    });
+    const element = <ThemeProvider theme={theme}>
+      <ReactAutocomplete
+        label={this.label}
+        options={this._options()}
+        value={this.value}
+        fixedValues={this.fixedValues}
+        inputType={this.inputType}
+        multiple={this.multiple}
+        placeholder={this.placeholder}
+        onChange={this.onChange}
+        getOptionDescription={this._getOptionDescription.bind(this)}
+        getOptionLabel={(option: string) => option}
+      />
+    </ThemeProvider>;
+    ReactDOM.render(element, this);
+  }
+
+  /** @override */
+  stateChanged(state: any): void {
+    super.stateChanged(state);
+
+    this._components = projectV0.componentsMap(state);
+    this._labels = projectV0.labelDefMap(state);
+    this._members = projectV0.viewedVisibleMembers(state);
+    this._projects = userV0.projects(state);
+  }
+
+  /**
+   * Computes which description belongs to given autocomplete option.
+   * Different data is shown depending on the autocomplete vocabulary.
+   * @param option The option to find a description for.
+   * @return The description for the option.
+   */
+  _getOptionDescription(option: string): string {
+    switch (this.vocabularyName) {
+      case 'component': {
+        const component = this._components.get(option);
+        return component && component.docstring || '';
+      } case 'label': {
+        const label = this._labels.get(option.toLowerCase());
+        return label && label.docstring || '';
+      } default: {
+        return '';
+      }
+    }
+  }
+
+  /**
+   * Computes the set of options used by the autocomplete instance.
+   * @return Array of strings that the user can try to match.
+   */
+  _options(): string[] {
+    switch (this.vocabularyName) {
+      case 'component': {
+        return [...this._components.keys()];
+      } case 'label': {
+        // The label map keys are lowercase. Use the LabelDef label name instead.
+        return [...this._labels.values()].map((labelDef: LabelDef) => labelDef.label);
+      } case 'member': {
+        const {userRefs = []} = this._members;
+        const users = userRefsToDisplayNames(userRefs);
+        return users;
+      } case 'owner': {
+        const {userRefs = [], groupRefs = []} = this._members;
+        const users = userRefsToDisplayNames(userRefs);
+        const groups = userRefsToDisplayNames(groupRefs);
+        // Remove groups from the list of all members.
+        return arrayDifference(users, groups);
+      } case 'project': {
+        const {ownerOf = [], memberOf = [], contributorTo = []} = this._projects;
+        return [...ownerOf, ...memberOf, ...contributorTo];
+      } case '': {
+        return [];
+      } default: {
+        throw new Error(`Unknown vocabulary name: ${this.vocabularyName}`);
+      }
+    }
+  }
+}
+customElements.define('mr-react-autocomplete', MrReactAutocomplete);
diff --git a/static_src/reducers/base.js b/static_src/reducers/base.js
new file mode 100644
index 0000000..f4603b7
--- /dev/null
+++ b/static_src/reducers/base.js
@@ -0,0 +1,109 @@
+// Copyright 2019 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.
+
+import {connect} from 'pwa-helpers/connect-mixin.js';
+import {applyMiddleware, combineReducers, compose, createStore} from 'redux';
+import thunk from 'redux-thunk';
+import {hotlists} from './hotlists.js';
+import * as issueV0 from './issueV0.js';
+import * as permissions from './permissions.js';
+import * as projects from './projects.js';
+import * as projectV0 from './projectV0.js';
+import * as sitewide from './sitewide.js';
+import {stars} from './stars.js';
+import * as users from './users.js';
+import * as userV0 from './userV0.js';
+import * as ui from './ui.js';
+
+/** @typedef {import('redux').AnyAction} AnyAction */
+
+// Actions
+const RESET_STATE = 'RESET_STATE';
+
+/* State Shape
+{
+  hotlists: Object,
+  permissions: Object,
+  projects: Object,
+  sitewide: Object,
+  users: Object,
+
+  ui: Object,
+
+  // To be deprecated
+  issue: Object,
+  projectV0: Object,
+  userV0: Object,
+}
+*/
+
+// Reducers
+const reducer = combineReducers({
+  hotlists: hotlists.reducer,
+  issue: issueV0.reducer,
+  permissions: permissions.reducer,
+  projects: projects.reducer,
+  projectV0: projectV0.reducer,
+  users: users.reducer,
+  userV0: userV0.reducer,
+  sitewide: sitewide.reducer,
+  stars: stars.reducer,
+
+  ui: ui.reducer,
+});
+
+/**
+ * The top level reducer function that all actions pass through.
+ * @param {any} state
+ * @param {AnyAction} action
+ * @return {any}
+ */
+export function rootReducer(state, action) {
+  if (action.type === RESET_STATE) {
+    state = undefined;
+  }
+  return reducer(state, action);
+}
+
+// Selectors
+
+// Action Creators
+
+/**
+ * Changes Redux state back to its default initial state. Primarily
+ * used in testing.
+ * @return {AnyAction} An action to reset Redux state to default.
+ */
+export const resetState = () => ({type: RESET_STATE});
+
+// Store
+
+// For debugging with the Redux Devtools extension:
+// https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd/
+const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
+export const store = createStore(rootReducer, composeEnhancers(
+    applyMiddleware(thunk),
+));
+
+/**
+ * Class mixin function that connects a given HTMLElement class to our
+ * store instance.
+ * @link https://pwa-starter-kit.polymer-project.org/redux-and-state-management#connecting-an-element-to-the-store
+ * @param {typeof HTMLElement} class
+ * @return {function} New class type with connected features.
+ */
+export const connectStore = connect(store);
+
+/**
+ * Promise to allow waiting for a state update. Useful in testing.
+ * @example
+ * store.dispatch(updateState());
+ * await stateUpdated;
+ * doThingWithUpdatedState();
+ *
+ * @type {Promise}
+ */
+export const stateUpdated = new Promise((resolve) => {
+  store.subscribe(resolve);
+});
diff --git a/static_src/reducers/hotlists.js b/static_src/reducers/hotlists.js
new file mode 100644
index 0000000..95989cc
--- /dev/null
+++ b/static_src/reducers/hotlists.js
@@ -0,0 +1,517 @@
+// Copyright 2019 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.
+
+/**
+ * @fileoverview Hotlist actions, selectors, and reducers organized into
+ * a single Redux "Duck" that manages updating and retrieving hotlist state
+ * on the frontend.
+ *
+ * The Hotlist data is stored in a normalized format.
+ * `name` is a reference to the currently viewed Hotlist.
+ * `hotlists` stores all Hotlist data indexed by Hotlist name.
+ * `hotlistItems` stores all Hotlist items indexed by Hotlist name.
+ * `hotlist` is a selector that gets the currently viewed Hotlist data.
+ *
+ * Reference: https://github.com/erikras/ducks-modular-redux
+ */
+
+import {combineReducers} from 'redux';
+import {createSelector} from 'reselect';
+import {createReducer, createRequestReducer} from './redux-helpers.js';
+
+import {prpcClient} from 'prpc-client-instance.js';
+import {userIdOrDisplayNameToUserRef, issueNameToRef}
+  from 'shared/convertersV0.js';
+import {pathsToFieldMask} from 'shared/converters.js';
+
+import * as issueV0 from './issueV0.js';
+import * as permissions from './permissions.js';
+import * as sitewide from './sitewide.js';
+import * as ui from './ui.js';
+import * as users from './users.js';
+
+import 'shared/typedef.js';
+/** @typedef {import('redux').AnyAction} AnyAction */
+
+/** @type {Array<string>} */
+export const DEFAULT_COLUMNS = [
+  'Rank', 'ID', 'Status', 'Owner', 'Summary', 'Modified',
+];
+
+// Permissions
+// TODO(crbug.com/monorail/7879): Move these to a permissions constants file.
+export const EDIT = 'HOTLIST_EDIT';
+export const ADMINISTER = 'HOTLIST_ADMINISTER';
+
+// Actions
+export const SELECT = 'hotlist/SELECT';
+export const RECEIVE_HOTLIST = 'hotlist/RECEIVE_HOTLIST';
+
+export const DELETE_START = 'hotlist/DELETE_START';
+export const DELETE_SUCCESS = 'hotlist/DELETE_SUCCESS';
+export const DELETE_FAILURE = 'hotlist/DELETE_FAILURE';
+
+export const FETCH_START = 'hotlist/FETCH_START';
+export const FETCH_SUCCESS = 'hotlist/FETCH_SUCCESS';
+export const FETCH_FAILURE = 'hotlist/FETCH_FAILURE';
+
+export const FETCH_ITEMS_START = 'hotlist/FETCH_ITEMS_START';
+export const FETCH_ITEMS_SUCCESS = 'hotlist/FETCH_ITEMS_SUCCESS';
+export const FETCH_ITEMS_FAILURE = 'hotlist/FETCH_ITEMS_FAILURE';
+
+export const REMOVE_EDITORS_START = 'hotlist/REMOVE_EDITORS_START';
+export const REMOVE_EDITORS_SUCCESS = 'hotlist/REMOVE_EDITORS_SUCCESS';
+export const REMOVE_EDITORS_FAILURE = 'hotlist/REMOVE_EDITORS_FAILURE';
+
+export const REMOVE_ITEMS_START = 'hotlist/REMOVE_ITEMS_START';
+export const REMOVE_ITEMS_SUCCESS = 'hotlist/REMOVE_ITEMS_SUCCESS';
+export const REMOVE_ITEMS_FAILURE = 'hotlist/REMOVE_ITEMS_FAILURE';
+
+export const RERANK_ITEMS_START = 'hotlist/RERANK_ITEMS_START';
+export const RERANK_ITEMS_SUCCESS = 'hotlist/RERANK_ITEMS_SUCCESS';
+export const RERANK_ITEMS_FAILURE = 'hotlist/RERANK_ITEMS_FAILURE';
+
+export const UPDATE_START = 'hotlist/UPDATE_START';
+export const UPDATE_SUCCESS = 'hotlist/UPDATE_SUCCESS';
+export const UPDATE_FAILURE = 'hotlist/UPDATE_FAILURE';
+
+/* State Shape
+{
+  name: string,
+
+  byName: Object<string, Hotlist>,
+  hotlistItems: Object<string, Array<HotlistItem>>,
+
+  requests: {
+    fetch: ReduxRequestState,
+    fetchItems: ReduxRequestState,
+    update: ReduxRequestState,
+  },
+}
+*/
+
+// Reducers
+
+/**
+ * A reference to the currently viewed Hotlist.
+ * @param {?string} state The existing Hotlist resource name.
+ * @param {AnyAction} action
+ * @return {?string}
+ */
+export const nameReducer = createReducer(null, {
+  [SELECT]: (_state, {name}) => name,
+});
+
+/**
+ * All Hotlist data indexed by Hotlist resource name.
+ * @param {Object<string, Hotlist>} state The existing Hotlist data.
+ * @param {AnyAction} action
+ * @param {Hotlist} action.hotlist The Hotlist that was fetched.
+ * @return {Object<string, Hotlist>}
+ */
+export const byNameReducer = createReducer({}, {
+  [RECEIVE_HOTLIST]: (state, {hotlist}) => {
+    if (!hotlist.defaultColumns) hotlist.defaultColumns = [];
+    if (!hotlist.editors) hotlist.editors = [];
+    return {...state, [hotlist.name]: hotlist};
+  },
+});
+
+/**
+ * All Hotlist items indexed by Hotlist resource name.
+ * @param {Object<string, Array<HotlistItem>>} state The existing items.
+ * @param {AnyAction} action
+ * @param {name} action.name The Hotlist resource name.
+ * @param {Array<HotlistItem>} action.items The Hotlist items fetched.
+ * @return {Object<string, Array<HotlistItem>>}
+ */
+export const hotlistItemsReducer = createReducer({}, {
+  [FETCH_ITEMS_SUCCESS]: (state, {name, items}) => ({...state, [name]: items}),
+});
+
+export const requestsReducer = combineReducers({
+  deleteHotlist: createRequestReducer(
+      DELETE_START, DELETE_SUCCESS, DELETE_FAILURE),
+  fetch: createRequestReducer(
+      FETCH_START, FETCH_SUCCESS, FETCH_FAILURE),
+  fetchItems: createRequestReducer(
+      FETCH_ITEMS_START, FETCH_ITEMS_SUCCESS, FETCH_ITEMS_FAILURE),
+  removeEditors: createRequestReducer(
+      REMOVE_EDITORS_START, REMOVE_EDITORS_SUCCESS, REMOVE_EDITORS_FAILURE),
+  removeItems: createRequestReducer(
+      REMOVE_ITEMS_START, REMOVE_ITEMS_SUCCESS, REMOVE_ITEMS_FAILURE),
+  rerankItems: createRequestReducer(
+      RERANK_ITEMS_START, RERANK_ITEMS_SUCCESS, RERANK_ITEMS_FAILURE),
+  update: createRequestReducer(
+      UPDATE_START, UPDATE_SUCCESS, UPDATE_FAILURE),
+});
+
+export const reducer = combineReducers({
+  name: nameReducer,
+
+  byName: byNameReducer,
+  hotlistItems: hotlistItemsReducer,
+
+  requests: requestsReducer,
+});
+
+// Selectors
+
+/**
+ * Returns the currently viewed Hotlist resource name, or null if there is none.
+ * @param {any} state
+ * @return {?string}
+ */
+export const name = (state) => state.hotlists.name;
+
+/**
+ * Returns all the Hotlist data in the store as a mapping from name to Hotlist.
+ * @param {any} state
+ * @return {Object<string, Hotlist>}
+ */
+export const byName = (state) => state.hotlists.byName;
+
+/**
+ * Returns all the Hotlist items in the store as a mapping from a
+ * Hotlist resource name to its respective array of HotlistItems.
+ * @param {any} state
+ * @return {Object<string, Array<HotlistItem>>}
+ */
+export const hotlistItems = (state) => state.hotlists.hotlistItems;
+
+/**
+ * Returns the currently viewed Hotlist, or null if there is none.
+ * @param {any} state
+ * @return {?Hotlist}
+ */
+export const viewedHotlist = createSelector(
+    [byName, name],
+    (byName, name) => name && byName[name] || null);
+
+/**
+ * Returns the owner of the currently viewed Hotlist, or null if there is none.
+ * @param {any} state
+ * @return {?User}
+ */
+export const viewedHotlistOwner = createSelector(
+    [viewedHotlist, users.byName],
+    (hotlist, usersByName) => {
+      return hotlist && usersByName[hotlist.owner] || null;
+    });
+
+/**
+ * Returns the editors of the currently viewed Hotlist. Returns null if there
+ * is no hotlist data. Includes a null in the array for each editor whose User
+ * data is not in the store.
+ * @param {any} state
+ * @return {Array<User>}
+ */
+export const viewedHotlistEditors = createSelector(
+    [viewedHotlist, users.byName],
+    (hotlist, usersByName) => {
+      if (!hotlist) return null;
+      return hotlist.editors.map((editor) => usersByName[editor] || null);
+    });
+
+/**
+ * Returns an Array containing the items in the currently viewed Hotlist,
+ * or [] if there is no current Hotlist or no Hotlist data.
+ * @param {any} state
+ * @return {Array<HotlistItem>}
+ */
+export const viewedHotlistItems = createSelector(
+    [hotlistItems, name],
+    (hotlistItems, name) => name && hotlistItems[name] || []);
+
+/**
+ * Returns an Array containing the HotlistIssues in the currently viewed
+ * Hotlist, or [] if there is no current Hotlist or no Hotlist data.
+ * A HotlistIssue merges the HotlistItem and Issue into one flat object.
+ * @param {any} state
+ * @return {Array<HotlistIssue>}
+ */
+export const viewedHotlistIssues = createSelector(
+    [viewedHotlistItems, issueV0.issue, users.byName],
+    (items, getIssue, usersByName) => {
+      // Filter out issues that haven't been fetched yet or failed to fetch.
+      // Example: if the user doesn't have permissions to view the issue.
+      // <mr-issue-list> assumes that every Issue is populated.
+      const itemsWithData = items.filter((item) => getIssue(item.issue));
+      return itemsWithData.map((item) => ({
+        ...getIssue(item.issue),
+        ...item,
+        adder: usersByName[item.adder],
+      }));
+    });
+
+/**
+ * Returns the currently viewed Hotlist columns.
+ * @param {any} state
+ * @return {Array<string>}
+ */
+export const viewedHotlistColumns = createSelector(
+    [viewedHotlist, sitewide.currentColumns],
+    (hotlist, sitewideCurrentColumns) => {
+      if (sitewideCurrentColumns) return sitewideCurrentColumns;
+      if (!hotlist) return DEFAULT_COLUMNS;
+      if (!hotlist.defaultColumns.length) return DEFAULT_COLUMNS;
+      return hotlist.defaultColumns.map((col) => col.column);
+    });
+
+/**
+ * Returns the currently viewed Hotlist permissions, or [] if there is none.
+ * @param {any} state
+ * @return {Array<Permission>}
+ */
+export const viewedHotlistPermissions = createSelector(
+    [viewedHotlist, permissions.byName],
+    (hotlist, permissionsByName) => {
+      if (!hotlist) return [];
+      const permissionSet = permissionsByName[hotlist.name];
+      if (!permissionSet) return [];
+      return permissionSet.permissions;
+    });
+
+/**
+ * Returns the Hotlist requests.
+ * @param {any} state
+ * @return {Object<string, ReduxRequestState>}
+ */
+export const requests = (state) => state.hotlists.requests;
+
+// Action Creators
+
+/**
+ * Action creator to delete the Hotlist. We would have liked to have named this
+ * `delete` but it's a reserved word in JS.
+ * @param {string} name The resource name of the Hotlist to delete.
+ * @return {function(function): Promise<void>}
+ */
+export const deleteHotlist = (name) => async (dispatch) => {
+  dispatch({type: DELETE_START});
+
+  try {
+    const args = {name};
+    await prpcClient.call('monorail.v3.Hotlists', 'DeleteHotlist', args);
+
+    dispatch({type: DELETE_SUCCESS});
+  } catch (error) {
+    dispatch({type: DELETE_FAILURE, error});
+  };
+};
+
+/**
+ * Action creator to fetch a Hotlist object.
+ * @param {string} name The resource name of the Hotlist to fetch.
+ * @return {function(function): Promise<void>}
+ */
+export const fetch = (name) => async (dispatch) => {
+  dispatch({type: FETCH_START});
+
+  try {
+    /** @type {Hotlist} */
+    const hotlist = await prpcClient.call(
+        'monorail.v3.Hotlists', 'GetHotlist', {name});
+    dispatch({type: FETCH_SUCCESS});
+    dispatch({type: RECEIVE_HOTLIST, hotlist});
+
+    const editors = hotlist.editors.map((editor) => editor);
+    editors.push(hotlist.owner);
+    await dispatch(users.batchGet(editors));
+  } catch (error) {
+    dispatch({type: FETCH_FAILURE, error});
+  };
+};
+
+/**
+ * Action creator to fetch the items in a Hotlist.
+ * @param {string} name The resource name of the Hotlist to fetch.
+ * @return {function(function): Promise<Array<HotlistItem>>}
+ */
+export const fetchItems = (name) => async (dispatch) => {
+  dispatch({type: FETCH_ITEMS_START});
+
+  try {
+    const args = {parent: name, orderBy: 'rank'};
+    /** @type {{items: Array<HotlistItem>}} */
+    const {items} = await prpcClient.call(
+        'monorail.v3.Hotlists', 'ListHotlistItems', args);
+    if (!items) {
+      dispatch({type: FETCH_ITEMS_SUCCESS, name, items: []});
+    }
+    const itemsWithRank =
+        items.map((item) => item.rank ? item : {...item, rank: 0});
+
+    const issueRefs = items.map((item) => issueNameToRef(item.issue));
+    await dispatch(issueV0.fetchIssues(issueRefs));
+
+    const adderNames = [...new Set(items.map((item) => item.adder))];
+    await dispatch(users.batchGet(adderNames));
+
+    dispatch({type: FETCH_ITEMS_SUCCESS, name, items: itemsWithRank});
+    return itemsWithRank;
+  } catch (error) {
+    dispatch({type: FETCH_ITEMS_FAILURE, error});
+  };
+};
+
+/**
+ * Action creator to remove editors from a Hotlist.
+ * @param {string} name The resource name of the Hotlist.
+ * @param {Array<string>} editors The resource names of the Users to remove.
+ * @return {function(function): Promise<void>}
+ */
+export const removeEditors = (name, editors) => async (dispatch) => {
+  dispatch({type: REMOVE_EDITORS_START});
+
+  try {
+    const args = {name, editors};
+    await prpcClient.call('monorail.v3.Hotlists', 'RemoveHotlistEditors', args);
+
+    dispatch({type: REMOVE_EDITORS_SUCCESS});
+
+    await dispatch(fetch(name));
+  } catch (error) {
+    dispatch({type: REMOVE_EDITORS_FAILURE, error});
+  };
+};
+
+/**
+ * Action creator to remove items from a Hotlist.
+ * @param {string} name The resource name of the Hotlist.
+ * @param {Array<string>} issues The resource names of the Issues to remove.
+ * @return {function(function): Promise<void>}
+ */
+export const removeItems = (name, issues) => async (dispatch) => {
+  dispatch({type: REMOVE_ITEMS_START});
+
+  try {
+    const args = {parent: name, issues};
+    await prpcClient.call('monorail.v3.Hotlists', 'RemoveHotlistItems', args);
+
+    dispatch({type: REMOVE_ITEMS_SUCCESS});
+
+    await dispatch(fetchItems(name));
+  } catch (error) {
+    dispatch({type: REMOVE_ITEMS_FAILURE, error});
+  };
+};
+
+/**
+ * Action creator to rerank the items in a Hotlist.
+ * @param {string} name The resource name of the Hotlist.
+ * @param {Array<string>} items The resource names of the HotlistItems to move.
+ * @param {number} index The index to insert the moved items.
+ * @return {function(function): Promise<void>}
+ */
+export const rerankItems = (name, items, index) => async (dispatch) => {
+  dispatch({type: RERANK_ITEMS_START});
+
+  try {
+    const args = {name, hotlistItems: items, targetPosition: index};
+    await prpcClient.call('monorail.v3.Hotlists', 'RerankHotlistItems', args);
+
+    dispatch({type: RERANK_ITEMS_SUCCESS});
+
+    await dispatch(fetchItems(name));
+  } catch (error) {
+    dispatch({type: RERANK_ITEMS_FAILURE, error});
+  };
+};
+
+/**
+ * Action creator to set the currently viewed Hotlist.
+ * @param {string} name The resource name of the Hotlist to select.
+ * @return {AnyAction}
+ */
+export const select = (name) => ({type: SELECT, name});
+
+/**
+ * Action creator to update the Hotlist metadata.
+ * @param {string} name The resource name of the Hotlist to delete.
+ * @param {Hotlist} hotlist This represents the updated version of the Hotlist
+ *    with only the fields that need to be updated.
+ * @return {function(function): Promise<void>}
+ */
+export const update = (name, hotlist) => async (dispatch) => {
+  dispatch({type: UPDATE_START});
+  try {
+    const paths = pathsToFieldMask(Object.keys(hotlist));
+    const hotlistArg = {...hotlist, name};
+    const args = {hotlist: hotlistArg, updateMask: paths};
+
+    /** @type {Hotlist} */
+    const updatedHotlist = await prpcClient.call(
+        'monorail.v3.Hotlists', 'UpdateHotlist', args);
+    dispatch({type: UPDATE_SUCCESS});
+    dispatch({type: RECEIVE_HOTLIST, hotlist: updatedHotlist});
+
+    const editors = updatedHotlist.editors.map((editor) => editor);
+    editors.push(updatedHotlist.owner);
+    await dispatch(users.batchGet(editors));
+  } catch (error) {
+    dispatch({type: UPDATE_FAILURE, error});
+    dispatch(ui.showSnackbar(UPDATE_FAILURE, error.description));
+    throw error;
+  }
+};
+
+// Helpers
+
+/**
+ * Helper to fetch a Hotlist ID given its owner and display name.
+ * @param {string} owner The Hotlist owner's user id or display name.
+ * @param {string} hotlist The Hotlist's id or display name.
+ * @return {Promise<?string>}
+ */
+export const getHotlistName = async (owner, hotlist) => {
+  const hotlistRef = {
+    owner: userIdOrDisplayNameToUserRef(owner),
+    name: hotlist,
+  };
+
+  try {
+    /** @type {{hotlistId: number}} */
+    const {hotlistId} = await prpcClient.call(
+        'monorail.Features', 'GetHotlistID', {hotlistRef});
+    return 'hotlists/' + hotlistId;
+  } catch (error) {
+    return null;
+  };
+};
+
+export const hotlists = {
+  // Permissions
+  EDIT,
+  ADMINISTER,
+
+  // Reducer
+  reducer,
+
+  // Selectors
+  name,
+  byName,
+  hotlistItems,
+  viewedHotlist,
+  viewedHotlistOwner,
+  viewedHotlistEditors,
+  viewedHotlistItems,
+  viewedHotlistIssues,
+  viewedHotlistColumns,
+  viewedHotlistPermissions,
+  requests,
+
+  // Action creators
+  deleteHotlist,
+  fetch,
+  fetchItems,
+  removeEditors,
+  removeItems,
+  rerankItems,
+  select,
+  update,
+
+  // Helpers
+  getHotlistName,
+};
diff --git a/static_src/reducers/hotlists.test.js b/static_src/reducers/hotlists.test.js
new file mode 100644
index 0000000..4aa42a2
--- /dev/null
+++ b/static_src/reducers/hotlists.test.js
@@ -0,0 +1,568 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import * as hotlists from './hotlists.js';
+import * as example from 'shared/test/constants-hotlists.js';
+import * as exampleIssues from 'shared/test/constants-issueV0.js';
+import * as exampleUsers from 'shared/test/constants-users.js';
+
+import {prpcClient} from 'prpc-client-instance.js';
+
+let dispatch;
+
+describe('hotlist reducers', () => {
+  it('root reducer initial state', () => {
+    const actual = hotlists.reducer(undefined, {type: null});
+    const expected = {
+      name: null,
+      byName: {},
+      hotlistItems: {},
+      requests: {
+        deleteHotlist: {error: null, requesting: false},
+        fetch: {error: null, requesting: false},
+        fetchItems: {error: null, requesting: false},
+        removeEditors: {error: null, requesting: false},
+        removeItems: {error: null, requesting: false},
+        rerankItems: {error: null, requesting: false},
+        update: {error: null, requesting: false},
+      },
+    };
+    assert.deepEqual(actual, expected);
+  });
+
+  it('name updates on SELECT', () => {
+    const action = {type: hotlists.SELECT, name: example.NAME};
+    const actual = hotlists.nameReducer(null, action);
+    assert.deepEqual(actual, example.NAME);
+  });
+
+  it('byName updates on RECEIVE_HOTLIST', () => {
+    const action = {type: hotlists.RECEIVE_HOTLIST, hotlist: example.HOTLIST};
+    const actual = hotlists.byNameReducer({}, action);
+    assert.deepEqual(actual, example.BY_NAME);
+  });
+
+  it('byName fills in missing fields on RECEIVE_HOTLIST', () => {
+    const action = {
+      type: hotlists.RECEIVE_HOTLIST,
+      hotlist: {name: example.NAME},
+    };
+    const actual = hotlists.byNameReducer({}, action);
+
+    const hotlist = {name: example.NAME, defaultColumns: [], editors: []};
+    assert.deepEqual(actual, {[example.NAME]: hotlist});
+  });
+
+  it('hotlistItems updates on FETCH_ITEMS_SUCCESS', () => {
+    const action = {
+      type: hotlists.FETCH_ITEMS_SUCCESS,
+      name: example.NAME,
+      items: [example.HOTLIST_ITEM],
+    };
+    const actual = hotlists.hotlistItemsReducer({}, action);
+    assert.deepEqual(actual, example.HOTLIST_ITEMS);
+  });
+});
+
+describe('hotlist selectors', () => {
+  it('name', () => {
+    const state = {hotlists: {name: example.NAME}};
+    assert.deepEqual(hotlists.name(state), example.NAME);
+  });
+
+  it('byName', () => {
+    const state = {hotlists: {byName: example.BY_NAME}};
+    assert.deepEqual(hotlists.byName(state), example.BY_NAME);
+  });
+
+  it('hotlistItems', () => {
+    const state = {hotlists: {hotlistItems: example.HOTLIST_ITEMS}};
+    assert.deepEqual(hotlists.hotlistItems(state), example.HOTLIST_ITEMS);
+  });
+
+  describe('viewedHotlist', () => {
+    it('normal case', () => {
+      const state = {hotlists: {name: example.NAME, byName: example.BY_NAME}};
+      assert.deepEqual(hotlists.viewedHotlist(state), example.HOTLIST);
+    });
+
+    it('no name', () => {
+      const state = {hotlists: {name: null, byName: example.BY_NAME}};
+      assert.deepEqual(hotlists.viewedHotlist(state), null);
+    });
+
+    it('hotlist not found', () => {
+      const state = {hotlists: {name: example.NAME, byName: {}}};
+      assert.deepEqual(hotlists.viewedHotlist(state), null);
+    });
+  });
+
+  describe('viewedHotlistOwner', () => {
+    it('normal case', () => {
+      const state = {
+        hotlists: {name: example.NAME, byName: example.BY_NAME},
+        users: {byName: exampleUsers.BY_NAME},
+      };
+      assert.deepEqual(hotlists.viewedHotlistOwner(state), exampleUsers.USER);
+    });
+
+    it('no hotlist', () => {
+      const state = {hotlists: {}, users: {}};
+      assert.deepEqual(hotlists.viewedHotlistOwner(state), null);
+    });
+  });
+
+  describe('viewedHotlistEditors', () => {
+    it('normal case', () => {
+      const state = {
+        hotlists: {
+          name: example.NAME,
+          byName: {[example.NAME]: {
+            ...example.HOTLIST,
+            editors: [exampleUsers.NAME, exampleUsers.NAME_2],
+          }},
+        },
+        users: {byName: exampleUsers.BY_NAME},
+      };
+
+      const editors = [exampleUsers.USER, exampleUsers.USER_2];
+      assert.deepEqual(hotlists.viewedHotlistEditors(state), editors);
+    });
+
+    it('no user data', () => {
+      const editors = [exampleUsers.NAME, exampleUsers.NAME_2];
+      const state = {
+        hotlists: {
+          name: example.NAME,
+          byName: {[example.NAME]: {...example.HOTLIST, editors}},
+        },
+        users: {byName: {}},
+      };
+      assert.deepEqual(hotlists.viewedHotlistEditors(state), [null, null]);
+    });
+
+    it('no hotlist', () => {
+      const state = {hotlists: {}, users: {}};
+      assert.deepEqual(hotlists.viewedHotlistEditors(state), null);
+    });
+  });
+
+  describe('viewedHotlistItems', () => {
+    it('normal case', () => {
+      const state = {hotlists: {
+        name: example.NAME,
+        hotlistItems: example.HOTLIST_ITEMS,
+      }};
+      const actual = hotlists.viewedHotlistItems(state);
+      assert.deepEqual(actual, [example.HOTLIST_ITEM]);
+    });
+
+    it('no name', () => {
+      const state = {hotlists: {
+        name: null,
+        hotlistItems: example.HOTLIST_ITEMS,
+      }};
+      assert.deepEqual(hotlists.viewedHotlistItems(state), []);
+    });
+
+    it('hotlist not found', () => {
+      const state = {hotlists: {name: example.NAME, hotlistItems: {}}};
+      assert.deepEqual(hotlists.viewedHotlistItems(state), []);
+    });
+  });
+
+  describe('viewedHotlistIssues', () => {
+    it('normal case', () => {
+      const state = {
+        hotlists: {
+          name: example.NAME,
+          hotlistItems: example.HOTLIST_ITEMS,
+        },
+        issue: {
+          issuesByRefString: {
+            [exampleIssues.ISSUE_REF_STRING]: exampleIssues.ISSUE,
+          },
+        },
+        users: {byName: {[exampleUsers.NAME]: exampleUsers.USER}},
+      };
+      const actual = hotlists.viewedHotlistIssues(state);
+      assert.deepEqual(actual, [example.HOTLIST_ISSUE]);
+    });
+
+    it('no issue', () => {
+      const state = {
+        hotlists: {
+          name: example.NAME,
+          hotlistItems: example.HOTLIST_ITEMS,
+        },
+        issue: {
+          issuesByRefString: {
+            [exampleIssues.ISSUE_OTHER_PROJECT_REF_STRING]: exampleIssues.ISSUE,
+          },
+        },
+        users: {byName: {}},
+      };
+      assert.deepEqual(hotlists.viewedHotlistIssues(state), []);
+    });
+  });
+
+  describe('viewedHotlistColumns', () => {
+    it('sitewide currentColumns overrides hotlist defaultColumns', () => {
+      const state = {
+        sitewide: {queryParams: {colspec: 'Summary+ColumnName'}},
+        hotlists: {},
+      };
+      const actual = hotlists.viewedHotlistColumns(state);
+      assert.deepEqual(actual, ['Summary', 'ColumnName']);
+    });
+
+    it('uses DEFAULT_COLUMNS when no hotlist', () => {
+      const actual = hotlists.viewedHotlistColumns({hotlists: {}});
+      assert.deepEqual(actual, hotlists.DEFAULT_COLUMNS);
+    });
+
+    it('uses DEFAULT_COLUMNS when hotlist has empty defaultColumns', () => {
+      const state = {hotlists: {
+        name: example.HOTLIST.name,
+        byName: {
+          [example.HOTLIST.name]: {...example.HOTLIST, defaultColumns: []},
+        },
+      }};
+      const actual = hotlists.viewedHotlistColumns(state);
+      assert.deepEqual(actual, hotlists.DEFAULT_COLUMNS);
+    });
+
+    it('uses hotlist defaultColumns', () => {
+      const state = {hotlists: {
+        name: example.HOTLIST.name,
+        byName: {[example.HOTLIST.name]: {
+          ...example.HOTLIST,
+          defaultColumns: [{column: 'ID'}, {column: 'ColumnName'}],
+        }},
+      }};
+      const actual = hotlists.viewedHotlistColumns(state);
+      assert.deepEqual(actual, ['ID', 'ColumnName']);
+    });
+  });
+
+  describe('viewedHotlistPermissions', () => {
+    it('normal case', () => {
+      const permissions = [hotlists.ADMINISTER, hotlists.EDIT];
+      const state = {
+        hotlists: {name: example.NAME, byName: example.BY_NAME},
+        permissions: {byName: {[example.NAME]: {permissions}}},
+      };
+      assert.deepEqual(hotlists.viewedHotlistPermissions(state), permissions);
+    });
+
+    it('no issue', () => {
+      const state = {hotlists: {}, permissions: {}};
+      assert.deepEqual(hotlists.viewedHotlistPermissions(state), []);
+    });
+  });
+});
+
+describe('hotlist action creators', () => {
+  beforeEach(() => {
+    sinon.stub(prpcClient, 'call');
+    dispatch = sinon.stub();
+  });
+
+  afterEach(() => {
+    prpcClient.call.restore();
+  });
+
+  it('select', () => {
+    const actual = hotlists.select(example.NAME);
+    const expected = {type: hotlists.SELECT, name: example.NAME};
+    assert.deepEqual(actual, expected);
+  });
+
+  describe('deleteHotlist', () => {
+    it('success', async () => {
+      prpcClient.call.returns(Promise.resolve({}));
+
+      await hotlists.deleteHotlist(example.NAME)(dispatch);
+
+      sinon.assert.calledWith(dispatch, {type: hotlists.DELETE_START});
+
+      const args = {name: example.NAME};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Hotlists', 'DeleteHotlist', args);
+
+      sinon.assert.calledWith(dispatch, {type: hotlists.DELETE_SUCCESS});
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      await hotlists.deleteHotlist(example.NAME)(dispatch);
+
+      const action = {
+        type: hotlists.DELETE_FAILURE,
+        error: sinon.match.any,
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+
+  describe('fetch', () => {
+    it('success', async () => {
+      const hotlist = example.HOTLIST;
+      prpcClient.call.returns(Promise.resolve(hotlist));
+
+      await hotlists.fetch(example.NAME)(dispatch);
+
+      const args = {name: example.NAME};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Hotlists', 'GetHotlist', args);
+
+      sinon.assert.calledWith(dispatch, {type: hotlists.FETCH_START});
+      sinon.assert.calledWith(dispatch, {type: hotlists.FETCH_SUCCESS});
+      sinon.assert.calledWith(
+          dispatch, {type: hotlists.RECEIVE_HOTLIST, hotlist});
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      await hotlists.fetch(example.NAME)(dispatch);
+
+      const action = {type: hotlists.FETCH_FAILURE, error: sinon.match.any};
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+
+  describe('fetchItems', () => {
+    it('success', async () => {
+      const response = {items: [example.HOTLIST_ITEM]};
+      prpcClient.call.returns(Promise.resolve(response));
+
+      const returnValue = await hotlists.fetchItems(example.NAME)(dispatch);
+      assert.deepEqual(returnValue, [{...example.HOTLIST_ITEM, rank: 0}]);
+
+      const args = {parent: example.NAME, orderBy: 'rank'};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Hotlists', 'ListHotlistItems', args);
+
+      sinon.assert.calledWith(dispatch, {type: hotlists.FETCH_ITEMS_START});
+      const action = {
+        type: hotlists.FETCH_ITEMS_SUCCESS,
+        name: example.NAME,
+        items: [{...example.HOTLIST_ITEM, rank: 0}],
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      await hotlists.fetchItems(example.NAME)(dispatch);
+
+      const action = {
+        type: hotlists.FETCH_ITEMS_FAILURE,
+        error: sinon.match.any,
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+
+    it('success with empty hotlist', async () => {
+      const response = {items: []};
+      prpcClient.call.returns(Promise.resolve(response));
+
+      const returnValue = await hotlists.fetchItems(example.NAME)(dispatch);
+      assert.deepEqual(returnValue, []);
+
+      sinon.assert.calledWith(dispatch, {type: hotlists.FETCH_ITEMS_START});
+
+      const args = {parent: example.NAME, orderBy: 'rank'};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Hotlists', 'ListHotlistItems', args);
+
+      const action = {
+        type: hotlists.FETCH_ITEMS_SUCCESS,
+        name: example.NAME,
+        items: [],
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+
+  describe('removeEditors', () => {
+    it('success', async () => {
+      prpcClient.call.returns(Promise.resolve({}));
+
+      const editors = [exampleUsers.NAME];
+      await hotlists.removeEditors(example.NAME, editors)(dispatch);
+
+      const args = {name: example.NAME, editors};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Hotlists',
+          'RemoveHotlistEditors', args);
+
+      sinon.assert.calledWith(dispatch, {type: hotlists.REMOVE_EDITORS_START});
+      const action = {type: hotlists.REMOVE_EDITORS_SUCCESS};
+      sinon.assert.calledWith(dispatch, action);
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      await hotlists.removeEditors(example.NAME, [])(dispatch);
+
+      const action = {
+        type: hotlists.REMOVE_EDITORS_FAILURE,
+        error: sinon.match.any,
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+
+  describe('removeItems', () => {
+    it('success', async () => {
+      prpcClient.call.returns(Promise.resolve({}));
+
+      const issues = [exampleIssues.NAME];
+      await hotlists.removeItems(example.NAME, issues)(dispatch);
+
+      const args = {parent: example.NAME, issues};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Hotlists',
+          'RemoveHotlistItems', args);
+
+      sinon.assert.calledWith(dispatch, {type: hotlists.REMOVE_ITEMS_START});
+      sinon.assert.calledWith(dispatch, {type: hotlists.REMOVE_ITEMS_SUCCESS});
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      await hotlists.removeItems(example.NAME, [])(dispatch);
+
+      const action = {
+        type: hotlists.REMOVE_ITEMS_FAILURE,
+        error: sinon.match.any,
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+
+  describe('rerankItems', () => {
+    it('success', async () => {
+      prpcClient.call.returns(Promise.resolve({}));
+
+      const items = [example.HOTLIST_ITEM_NAME];
+      await hotlists.rerankItems(example.NAME, items, 0)(dispatch);
+
+      const args = {
+        name: example.NAME,
+        hotlistItems: items,
+        targetPosition: 0,
+      };
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Hotlists',
+          'RerankHotlistItems', args);
+
+      sinon.assert.calledWith(dispatch, {type: hotlists.RERANK_ITEMS_START});
+      sinon.assert.calledWith(dispatch, {type: hotlists.RERANK_ITEMS_SUCCESS});
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      await hotlists.rerankItems(example.NAME, [], 0)(dispatch);
+
+      const action = {
+        type: hotlists.RERANK_ITEMS_FAILURE,
+        error: sinon.match.any,
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+
+  describe('update', () => {
+    it('success', async () => {
+      const hotlistOnlyWithUpdates = {
+        displayName: example.HOTLIST.displayName + 'foo',
+        summary: example.HOTLIST.summary + 'abc',
+      };
+      const hotlist = {...example.HOTLIST, ...hotlistOnlyWithUpdates};
+      prpcClient.call.returns(Promise.resolve(hotlist));
+
+      await hotlists.update(
+          example.HOTLIST.name, hotlistOnlyWithUpdates)(dispatch);
+
+      const hotlistArg = {
+        ...hotlistOnlyWithUpdates,
+        name: example.HOTLIST.name,
+      };
+      const fieldMask = 'displayName,summary';
+      const args = {hotlist: hotlistArg, updateMask: fieldMask};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Hotlists', 'UpdateHotlist', args);
+
+      sinon.assert.calledWith(dispatch, {type: hotlists.UPDATE_START});
+      sinon.assert.calledWith(dispatch, {type: hotlists.UPDATE_SUCCESS});
+      sinon.assert.calledWith(
+          dispatch, {type: hotlists.RECEIVE_HOTLIST, hotlist});
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+      const hotlistOnlyWithUpdates = {
+        displayName: example.HOTLIST.displayName + 'foo',
+        summary: example.HOTLIST.summary + 'abc',
+      };
+      try {
+        // TODO(crbug.com/monorail/7883): Use Chai Promises plugin
+        // to assert promise rejected.
+        await hotlists.update(
+            example.HOTLIST.name, hotlistOnlyWithUpdates)(dispatch);
+      } catch (e) {}
+
+      const action = {
+        type: hotlists.UPDATE_FAILURE,
+        error: sinon.match.any,
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+});
+
+describe('helpers', () => {
+  beforeEach(() => {
+    sinon.stub(prpcClient, 'call');
+    dispatch = sinon.stub();
+  });
+
+  afterEach(() => {
+    prpcClient.call.restore();
+  });
+
+  describe('getHotlistName', () => {
+    it('success', async () => {
+      const response = {hotlistId: '1234'};
+      prpcClient.call.returns(Promise.resolve(response));
+
+      const name = await hotlists.getHotlistName('foo@bar.com', 'hotlist');
+      assert.deepEqual(name, 'hotlists/1234');
+
+      const args = {hotlistRef: {
+        owner: {displayName: 'foo@bar.com'},
+        name: 'hotlist',
+      }};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.Features', 'GetHotlistID', args);
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      assert.isNull(await hotlists.getHotlistName('foo@bar.com', 'hotlist'));
+    });
+  });
+});
diff --git a/static_src/reducers/issueV0.js b/static_src/reducers/issueV0.js
new file mode 100644
index 0000000..36c446d
--- /dev/null
+++ b/static_src/reducers/issueV0.js
@@ -0,0 +1,1411 @@
+// Copyright 2019 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.
+
+/**
+ * @fileoverview Issue actions, selectors, and reducers organized into
+ * a single Redux "Duck" that manages updating and retrieving issue state
+ * on the frontend.
+ *
+ * Reference: https://github.com/erikras/ducks-modular-redux
+ */
+
+import {combineReducers} from 'redux';
+import {createSelector} from 'reselect';
+import {autolink} from 'autolink.js';
+import {fieldTypes, extractTypeForIssue,
+  fieldValuesToMap} from 'shared/issue-fields.js';
+import {removePrefix, objectToMap} from 'shared/helpers.js';
+import {issueRefToString, issueToIssueRefString,
+  issueStringToRef, issueNameToRefString} from 'shared/convertersV0.js';
+import {fromShortlink} from 'shared/federated.js';
+import {createReducer, createRequestReducer,
+  createKeyedRequestReducer} from './redux-helpers.js';
+import * as projectV0 from './projectV0.js';
+import * as userV0 from './userV0.js';
+import {fieldValueMapKey} from 'shared/metadata-helpers.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import loadGapi, {fetchGapiEmail} from 'shared/gapi-loader.js';
+import 'shared/typedef.js';
+
+/** @typedef {import('redux').AnyAction} AnyAction */
+
+// Actions
+export const VIEW_ISSUE = 'VIEW_ISSUE';
+
+export const FETCH_START = 'issueV0/FETCH_START';
+export const FETCH_SUCCESS = 'issueV0/FETCH_SUCCESS';
+export const FETCH_FAILURE = 'issueV0/FETCH_FAILURE';
+
+export const FETCH_ISSUES_START = 'issueV0/FETCH_ISSUES_START';
+export const FETCH_ISSUES_SUCCESS = 'issueV0/FETCH_ISSUES_SUCCESS';
+export const FETCH_ISSUES_FAILURE = 'issueV0/FETCH_ISSUES_FAILURE';
+
+const FETCH_HOTLISTS_START = 'FETCH_HOTLISTS_START';
+export const FETCH_HOTLISTS_SUCCESS = 'FETCH_HOTLISTS_SUCCESS';
+const FETCH_HOTLISTS_FAILURE = 'FETCH_HOTLISTS_FAILURE';
+
+const FETCH_ISSUE_LIST_START = 'FETCH_ISSUE_LIST_START';
+export const FETCH_ISSUE_LIST_UPDATE = 'FETCH_ISSUE_LIST_UPDATE';
+const FETCH_ISSUE_LIST_SUCCESS = 'FETCH_ISSUE_LIST_SUCCESS';
+const FETCH_ISSUE_LIST_FAILURE = 'FETCH_ISSUE_LIST_FAILURE';
+
+const FETCH_PERMISSIONS_START = 'FETCH_PERMISSIONS_START';
+const FETCH_PERMISSIONS_SUCCESS = 'FETCH_PERMISSIONS_SUCCESS';
+const FETCH_PERMISSIONS_FAILURE = 'FETCH_PERMISSIONS_FAILURE';
+
+export const STAR_START = 'STAR_START';
+export const STAR_SUCCESS = 'STAR_SUCCESS';
+const STAR_FAILURE = 'STAR_FAILURE';
+
+const PRESUBMIT_START = 'PRESUBMIT_START';
+const PRESUBMIT_SUCCESS = 'PRESUBMIT_SUCCESS';
+const PRESUBMIT_FAILURE = 'PRESUBMIT_FAILURE';
+
+export const FETCH_IS_STARRED_START = 'FETCH_IS_STARRED_START';
+export const FETCH_IS_STARRED_SUCCESS = 'FETCH_IS_STARRED_SUCCESS';
+const FETCH_IS_STARRED_FAILURE = 'FETCH_IS_STARRED_FAILURE';
+
+const FETCH_ISSUES_STARRED_START = 'FETCH_ISSUES_STARRED_START';
+export const FETCH_ISSUES_STARRED_SUCCESS = 'FETCH_ISSUES_STARRED_SUCCESS';
+const FETCH_ISSUES_STARRED_FAILURE = 'FETCH_ISSUES_STARRED_FAILURE';
+
+const FETCH_COMMENTS_START = 'FETCH_COMMENTS_START';
+export const FETCH_COMMENTS_SUCCESS = 'FETCH_COMMENTS_SUCCESS';
+const FETCH_COMMENTS_FAILURE = 'FETCH_COMMENTS_FAILURE';
+
+const FETCH_COMMENT_REFERENCES_START = 'FETCH_COMMENT_REFERENCES_START';
+const FETCH_COMMENT_REFERENCES_SUCCESS = 'FETCH_COMMENT_REFERENCES_SUCCESS';
+const FETCH_COMMENT_REFERENCES_FAILURE = 'FETCH_COMMENT_REFERENCES_FAILURE';
+
+const FETCH_REFERENCED_USERS_START = 'FETCH_REFERENCED_USERS_START';
+const FETCH_REFERENCED_USERS_SUCCESS = 'FETCH_REFERENCED_USERS_SUCCESS';
+const FETCH_REFERENCED_USERS_FAILURE = 'FETCH_REFERENCED_USERS_FAILURE';
+
+const FETCH_RELATED_ISSUES_START = 'FETCH_RELATED_ISSUES_START';
+const FETCH_RELATED_ISSUES_SUCCESS = 'FETCH_RELATED_ISSUES_SUCCESS';
+const FETCH_RELATED_ISSUES_FAILURE = 'FETCH_RELATED_ISSUES_FAILURE';
+
+const FETCH_FEDERATED_REFERENCES_START = 'FETCH_FEDERATED_REFERENCES_START';
+const FETCH_FEDERATED_REFERENCES_SUCCESS = 'FETCH_FEDERATED_REFERENCES_SUCCESS';
+const FETCH_FEDERATED_REFERENCES_FAILURE = 'FETCH_FEDERATED_REFERENCES_FAILURE';
+
+const CONVERT_START = 'CONVERT_START';
+const CONVERT_SUCCESS = 'CONVERT_SUCCESS';
+const CONVERT_FAILURE = 'CONVERT_FAILURE';
+
+const UPDATE_START = 'UPDATE_START';
+const UPDATE_SUCCESS = 'UPDATE_SUCCESS';
+const UPDATE_FAILURE = 'UPDATE_FAILURE';
+
+const UPDATE_APPROVAL_START = 'UPDATE_APPROVAL_START';
+const UPDATE_APPROVAL_SUCCESS = 'UPDATE_APPROVAL_SUCCESS';
+const UPDATE_APPROVAL_FAILURE = 'UPDATE_APPROVAL_FAILURE';
+
+/* State Shape
+{
+  issuesByRefString: Object<IssueRefString, Issue>,
+
+  viewedIssueRef: IssueRefString,
+
+  hotlists: Array<HotlistV0>,
+  issueList: {
+    issueRefs: Array<IssueRefString>,
+    progress: number,
+    totalResults: number,
+  }
+  comments: Array<IssueComment>,
+  commentReferences: Object,
+  relatedIssues: Object,
+  referencedUsers: Array<UserV0>,
+  starredIssues: Object<IssueRefString, Boolean>,
+  permissions: Array<string>,
+  presubmitResponse: Object,
+
+  requests: {
+    fetch: ReduxRequestState,
+    fetchHotlists: ReduxRequestState,
+    fetchIssueList: ReduxRequestState,
+    fetchPermissions: ReduxRequestState,
+    starringIssues: Object<string, ReduxRequestState>,
+    presubmit: ReduxRequestState,
+    fetchComments: ReduxRequestState,
+    fetchCommentReferences: ReduxRequestState,
+    fetchFederatedReferences: ReduxRequestState,
+    fetchRelatedIssues: ReduxRequestState,
+    fetchStarredIssues: ReduxRequestState,
+    fetchStarredIssues: ReduxRequestState,
+    convert: ReduxRequestState,
+    update: ReduxRequestState,
+    updateApproval: ReduxRequestState,
+  },
+}
+*/
+
+// Helpers for the reducers.
+
+/**
+ * Overrides local data for single approval on an Issue object with fresh data.
+ * Note that while an Issue can have multiple approvals, this function only
+ * refreshes data for a single approval.
+ * @param {Issue} issue Issue Object being updated.
+ * @param {ApprovalDef} approval A single approval to override in the issue.
+ * @return {Issue} Issue with updated approval data.
+ */
+const updateApprovalValues = (issue, approval) => {
+  if (!issue.approvalValues) return issue;
+  const newApprovals = issue.approvalValues.map((item) => {
+    if (item.fieldRef.fieldName === approval.fieldRef.fieldName) {
+      // PhaseRef isn't populated on the response so we want to make sure
+      // it doesn't overwrite the original phaseRef with {}.
+      return {...approval, phaseRef: item.phaseRef};
+    }
+    return item;
+  });
+  return {...issue, approvalValues: newApprovals};
+};
+
+// Reducers
+
+/**
+ * Creates a new issuesByRefString Object with a single issue's data
+ * edited.
+ * @param {Object<IssueRefString, Issue>} issuesByRefString
+ * @param {Issue} issue The new issue data to add to the state.
+ * @return {Object<IssueRefString, Issue>}
+ */
+const updateSingleIssueInState = (issuesByRefString, issue) => {
+  return {
+    ...issuesByRefString,
+    [issueToIssueRefString(issue)]: issue,
+  };
+};
+
+// TODO(crbug.com/monorail/6882): Finish converting all other issue
+//   actions to use this format.
+/**
+ * Adds issues fetched by a ListIssues request to the Redux store in a
+ * normalized format.
+ * @param {Object<IssueRefString, Issue>} state Redux state.
+ * @param {AnyAction} action
+ * @param {Array<Issue>} action.issues The list of issues that was fetched.
+ * @param {Issue=} action.issue The issue being updated.
+ * @param {number=} action.starCount Number of stars the issue has. This changes
+ *   when a user stars an issue and needs to be updated.
+ * @param {ApprovalDef=} action.approval A new approval to update the issue
+ *   with.
+ * @param {IssueRef=} action.issueRef A specific IssueRef to update.
+ */
+export const issuesByRefStringReducer = createReducer({}, {
+  [FETCH_ISSUE_LIST_UPDATE]: (state, {issues}) => {
+    const newState = {...state};
+
+    issues.forEach((issue) => {
+      const refString = issueToIssueRefString(issue);
+      newState[refString] = {...newState[refString], ...issue};
+    });
+
+    return newState;
+  },
+  [FETCH_SUCCESS]: (state, {issue}) => updateSingleIssueInState(state, issue),
+  [FETCH_ISSUES_SUCCESS]: (state, {issues}) => {
+    const newState = {...state};
+
+    issues.forEach((issue) => {
+      const refString = issueToIssueRefString(issue);
+      newState[refString] = {...newState[refString], ...issue};
+    });
+
+    return newState;
+  },
+  [CONVERT_SUCCESS]: (state, {issue}) => updateSingleIssueInState(state, issue),
+  [UPDATE_SUCCESS]: (state, {issue}) => updateSingleIssueInState(state, issue),
+  [UPDATE_APPROVAL_SUCCESS]: (state, {issueRef, approval}) => {
+    const issueRefString = issueToIssueRefString(issueRef);
+    const originalIssue = state[issueRefString] || {};
+    const newIssue = updateApprovalValues(originalIssue, approval);
+    return {
+      ...state,
+      [issueRefString]: {
+        ...newIssue,
+      },
+    };
+  },
+  [STAR_SUCCESS]: (state, {issueRef, starCount}) => {
+    const issueRefString = issueToIssueRefString(issueRef);
+    const originalIssue = state[issueRefString] || {};
+    return {
+      ...state,
+      [issueRefString]: {
+        ...originalIssue,
+        starCount,
+      },
+    };
+  },
+});
+
+/**
+ * Sets a reference for the issue that the user is currently viewing.
+ * @param {IssueRefString} state Currently viewed issue.
+ * @param {AnyAction} action
+ * @param {IssueRef} action.issueRef The updated localId to view.
+ * @return {IssueRefString}
+ */
+const viewedIssueRefReducer = createReducer('', {
+  [VIEW_ISSUE]: (state, {issueRef}) => issueRefToString(issueRef) || state,
+});
+
+/**
+ * Reducer to manage updating the list of hotlists attached to an Issue.
+ * @param {Array<HotlistV0>} state List of issue hotlists.
+ * @param {AnyAction} action
+ * @param {Array<HotlistV0>} action.hotlists New list of hotlists.
+ * @return {Array<HotlistV0>}
+ */
+const hotlistsReducer = createReducer([], {
+  [FETCH_HOTLISTS_SUCCESS]: (_, {hotlists}) => hotlists,
+});
+
+/**
+ * @typedef {Object} IssueListState
+ * @property {Array<IssueRefString>} issues The list of issues being viewed,
+ *   in a normalized form.
+ * @property {number} progress The percentage of issues loaded. Used for
+ *   incremental loading of issues in the grid view.
+ * @property {number} totalResults The total number of issues matching the
+ *   query.
+ */
+
+/**
+ * Handles the state of the currently viewed issue list. This reducer
+ * stores this data in normalized form.
+ * @param {IssueListState} state
+ * @param {AnyAction} action
+ * @param {Array<Issue>} action.issues Issues that were fetched.
+ * @param {number} state.progress New percentage of issues have been loaded.
+ * @param {number} state.totalResults The total number of issues matching the
+ *   query.
+ * @return {IssueListState}
+ */
+export const issueListReducer = createReducer({}, {
+  [FETCH_ISSUE_LIST_UPDATE]: (_state, {issues, progress, totalResults}) => ({
+    issueRefs: issues.map(issueToIssueRefString), progress, totalResults,
+  }),
+});
+
+/**
+ * Updates the comments attached to the currently viewed issue.
+ * @param {Array<IssueComment>} state The list of comments in an issue.
+ * @param {AnyAction} action
+ * @param {Array<IssueComment>} action.comments Fetched comments.
+ * @return {Array<IssueComment>}
+ */
+const commentsReducer = createReducer([], {
+  [FETCH_COMMENTS_SUCCESS]: (_state, {comments}) => comments,
+});
+
+// TODO(crbug.com/monorail/5953): Come up with some way to refactor
+// autolink.js's reference code to allow avoiding duplicate lookups
+// with data already in Redux state.
+/**
+ * For autolinking, this reducer stores the dereferenced data for bits
+ * of data that were referenced in comments. For example, comments might
+ * include user emails or IDs for other issues, and this state slice would
+ * store the full Objects for that data.
+ * @param {Array<CommentReference>} state
+ * @param {AnyAction} action
+ * @param {Array<CommentReference>} action.commentReferences New references
+ *   to store.
+ * @return {Array<CommentReference>}
+ */
+const commentReferencesReducer = createReducer({}, {
+  [FETCH_COMMENTS_START]: (_state, _action) => ({}),
+  [FETCH_COMMENT_REFERENCES_SUCCESS]: (_state, {commentReferences}) => {
+    return commentReferences;
+  },
+});
+
+/**
+ * Handles state for related issues such as blocking and blocked on issues,
+ * including federated references that could reference external issues outside
+ * Monorail.
+ * @param {Object<IssueRefString, Issue>} state
+ * @param {AnyAction} action
+ * @param {Object<IssueRefString, Issue>=} action.relatedIssues New related
+ *   issues.
+ * @param {Array<IssueRef>=} action.fedRefIssueRefs List of fetched federated
+ *   issue references.
+ * @return {Object<IssueRefString, Issue>}
+ */
+export const relatedIssuesReducer = createReducer({}, {
+  [FETCH_RELATED_ISSUES_SUCCESS]: (_state, {relatedIssues}) => relatedIssues,
+  [FETCH_FEDERATED_REFERENCES_SUCCESS]: (state, {fedRefIssueRefs}) => {
+    if (!fedRefIssueRefs) {
+      return state;
+    }
+
+    const fedRefStates = {};
+    fedRefIssueRefs.forEach((ref) => {
+      fedRefStates[ref.extIdentifier] = ref;
+    });
+
+    // Return a new object, in Redux fashion.
+    return Object.assign(fedRefStates, state);
+  },
+});
+
+/**
+ * Stores data for users referenced by issue. ie: Owner, CC, etc.
+ * @param {Object<string, UserV0>} state
+ * @param {AnyAction} action
+ * @param {Object<string, UserV0>} action.referencedUsers
+ * @return {Object<string, UserV0>}
+ */
+const referencedUsersReducer = createReducer({}, {
+  [FETCH_REFERENCED_USERS_SUCCESS]: (_state, {referencedUsers}) =>
+    referencedUsers,
+});
+
+/**
+ * Handles updating state of all starred issues.
+ * @param {Object<IssueRefString, boolean>} state Set of starred issues,
+ *   stored in a serializeable Object form.
+ * @param {AnyAction} action
+ * @param {IssueRef=} action.issueRef An issue with a star state being updated.
+ * @param {boolean=} action.starred Whether the issue is starred or unstarred.
+ * @param {Array<IssueRef>=} action.starredIssueRefs A list of starred issues.
+ * @return {Object<IssueRefString, boolean>}
+ */
+export const starredIssuesReducer = createReducer({}, {
+  [STAR_SUCCESS]: (state, {issueRef, starred}) => {
+    return {...state, [issueRefToString(issueRef)]: starred};
+  },
+  [FETCH_ISSUES_STARRED_SUCCESS]: (_state, {starredIssueRefs}) => {
+    const normalizedStars = {};
+    starredIssueRefs.forEach((issueRef) => {
+      normalizedStars[issueRefToString(issueRef)] = true;
+    });
+    return normalizedStars;
+  },
+  [FETCH_IS_STARRED_SUCCESS]: (state, {issueRef, starred}) => {
+    const refString = issueRefToString(issueRef);
+    return {...state, [refString]: starred};
+  },
+});
+
+/**
+ * Adds the result of an IssuePresubmit response to the Redux store.
+ * @param {Object} state Initial Redux state.
+ * @param {AnyAction} action
+ * @param {Object} action.presubmitResponse The issue
+ *   presubmit response Object.
+ * @return {Object}
+ */
+const presubmitResponseReducer = createReducer({}, {
+  [PRESUBMIT_SUCCESS]: (_state, {presubmitResponse}) => presubmitResponse,
+});
+
+/**
+ * Stores the user's permissions for a given issue.
+ * @param {Array<string>} state Permission list. Each permission is a string
+ *   with the name of the permission.
+ * @param {AnyAction} action
+ * @param {Array<string>} action.permissions The fetched permission data.
+ * @return {Array<string>}
+ */
+const permissionsReducer = createReducer([], {
+  [FETCH_PERMISSIONS_SUCCESS]: (_state, {permissions}) => permissions,
+});
+
+const requestsReducer = combineReducers({
+  fetch: createRequestReducer(
+      FETCH_START, FETCH_SUCCESS, FETCH_FAILURE),
+  fetchIssues: createRequestReducer(
+      FETCH_ISSUES_START, FETCH_ISSUES_SUCCESS, FETCH_ISSUES_FAILURE),
+  fetchHotlists: createRequestReducer(
+      FETCH_HOTLISTS_START, FETCH_HOTLISTS_SUCCESS, FETCH_HOTLISTS_FAILURE),
+  fetchIssueList: createRequestReducer(
+      FETCH_ISSUE_LIST_START,
+      FETCH_ISSUE_LIST_SUCCESS,
+      FETCH_ISSUE_LIST_FAILURE),
+  fetchPermissions: createRequestReducer(
+      FETCH_PERMISSIONS_START,
+      FETCH_PERMISSIONS_SUCCESS,
+      FETCH_PERMISSIONS_FAILURE),
+  starringIssues: createKeyedRequestReducer(
+      STAR_START, STAR_SUCCESS, STAR_FAILURE),
+  presubmit: createRequestReducer(
+      PRESUBMIT_START, PRESUBMIT_SUCCESS, PRESUBMIT_FAILURE),
+  fetchComments: createRequestReducer(
+      FETCH_COMMENTS_START, FETCH_COMMENTS_SUCCESS, FETCH_COMMENTS_FAILURE),
+  fetchCommentReferences: createRequestReducer(
+      FETCH_COMMENT_REFERENCES_START,
+      FETCH_COMMENT_REFERENCES_SUCCESS,
+      FETCH_COMMENT_REFERENCES_FAILURE),
+  fetchFederatedReferences: createRequestReducer(
+      FETCH_FEDERATED_REFERENCES_START,
+      FETCH_FEDERATED_REFERENCES_SUCCESS,
+      FETCH_FEDERATED_REFERENCES_FAILURE),
+  fetchRelatedIssues: createRequestReducer(
+      FETCH_RELATED_ISSUES_START,
+      FETCH_RELATED_ISSUES_SUCCESS,
+      FETCH_RELATED_ISSUES_FAILURE),
+  fetchReferencedUsers: createRequestReducer(
+      FETCH_REFERENCED_USERS_START,
+      FETCH_REFERENCED_USERS_SUCCESS,
+      FETCH_REFERENCED_USERS_FAILURE),
+  fetchIsStarred: createRequestReducer(
+      FETCH_IS_STARRED_START, FETCH_IS_STARRED_SUCCESS,
+      FETCH_IS_STARRED_FAILURE),
+  fetchStarredIssues: createRequestReducer(
+      FETCH_ISSUES_STARRED_START, FETCH_ISSUES_STARRED_SUCCESS,
+      FETCH_ISSUES_STARRED_FAILURE,
+  ),
+  convert: createRequestReducer(
+      CONVERT_START, CONVERT_SUCCESS, CONVERT_FAILURE),
+  update: createRequestReducer(
+      UPDATE_START, UPDATE_SUCCESS, UPDATE_FAILURE),
+  // TODO(zhangtiff): Update this to use createKeyedRequestReducer() instead, so
+  // users can update multiple approvals at once.
+  updateApproval: createRequestReducer(
+      UPDATE_APPROVAL_START, UPDATE_APPROVAL_SUCCESS, UPDATE_APPROVAL_FAILURE),
+});
+
+export const reducer = combineReducers({
+  viewedIssueRef: viewedIssueRefReducer,
+
+  issuesByRefString: issuesByRefStringReducer,
+
+  hotlists: hotlistsReducer,
+  issueList: issueListReducer,
+  comments: commentsReducer,
+  commentReferences: commentReferencesReducer,
+  relatedIssues: relatedIssuesReducer,
+  referencedUsers: referencedUsersReducer,
+  starredIssues: starredIssuesReducer,
+  permissions: permissionsReducer,
+  presubmitResponse: presubmitResponseReducer,
+
+  requests: requestsReducer,
+});
+
+// Selectors
+const RESTRICT_VIEW_PREFIX = 'restrict-view-';
+const RESTRICT_EDIT_PREFIX = 'restrict-editissue-';
+const RESTRICT_COMMENT_PREFIX = 'restrict-addissuecomment-';
+
+/**
+ * Selector to retrieve all normalized Issue data in the Redux store,
+ * keyed by IssueRefString.
+ * @param {any} state
+ * @return {Object<IssueRefString, Issue>}
+ */
+const issuesByRefString = (state) => state.issue.issuesByRefString;
+
+/**
+ * Selector to return a function to retrieve an Issue from the Redux store.
+ * @param {any} state
+ * @return {function(string): ?Issue}
+ */
+export const issue = createSelector(issuesByRefString, (issuesByRefString) =>
+  (name) => issuesByRefString[issueNameToRefString(name)]);
+
+/**
+ * Selector to return a function to retrieve a given Issue Object from
+ * the Redux store.
+ * @param {any} state
+ * @return {function(IssueRefString, string): Issue}
+ */
+export const issueForRefString = createSelector(issuesByRefString,
+    (issuesByRefString) => (issueRefString, projectName = undefined) => {
+      // In some contexts, an issue ref string will omit a project name,
+      // assuming the default project to be the project name. We never
+      // omit the project name in strings used as keys, so we have to
+      // make sure issue ref strings contain the project name.
+      const ref = issueStringToRef(issueRefString, projectName);
+      const refString = issueRefToString(ref);
+      if (issuesByRefString.hasOwnProperty(refString)) {
+        return issuesByRefString[refString];
+      }
+      return issueStringToRef(refString, projectName);
+    });
+
+/**
+ * Selector to get a reference to the currently viewed issue, in string form.
+ * @param {any} state
+ * @return {IssueRefString}
+ */
+const viewedIssueRefString = (state) => state.issue.viewedIssueRef;
+
+/**
+ * Selector to get a reference to the currently viewed issue.
+ * @param {any} state
+ * @return {IssueRef}
+ */
+export const viewedIssueRef = createSelector(viewedIssueRefString,
+    (viewedIssueRefString) => issueStringToRef(viewedIssueRefString));
+
+/**
+ * Selector to get the full Issue data for the currently viewed issue.
+ * @param {any} state
+ * @return {Issue}
+ */
+export const viewedIssue = createSelector(issuesByRefString,
+    viewedIssueRefString,
+    (issuesByRefString, viewedIssueRefString) =>
+      issuesByRefString[viewedIssueRefString] || {});
+
+export const comments = (state) => state.issue.comments;
+export const commentsLoaded = (state) => state.issue.commentsLoaded;
+
+const _commentReferences = (state) => state.issue.commentReferences;
+export const commentReferences = createSelector(_commentReferences,
+    (commentReferences) => objectToMap(commentReferences));
+
+export const hotlists = (state) => state.issue.hotlists;
+
+const stateIssueList = (state) => state.issue.issueList;
+export const issueList = createSelector(
+    issuesByRefString,
+    stateIssueList,
+    (issuesByRefString, stateIssueList) => {
+      return (stateIssueList.issueRefs || []).map((issueRef) => {
+        return issuesByRefString[issueRef];
+      });
+    },
+);
+export const totalIssues = (state) => state.issue.issueList.totalResults;
+export const issueListProgress = (state) => state.issue.issueList.progress;
+export const issueListPhaseNames = createSelector(issueList, (issueList) => {
+  const phaseNamesSet = new Set();
+  if (issueList) {
+    issueList.forEach(({phases}) => {
+      if (phases) {
+        phases.forEach(({phaseRef: {phaseName}}) => {
+          phaseNamesSet.add(phaseName.toLowerCase());
+        });
+      }
+    });
+  }
+  return Array.from(phaseNamesSet);
+});
+
+/**
+ * @param {any} state
+ * @return {boolean} Whether the currently viewed issue list
+ *   has loaded.
+ */
+export const issueListLoaded = createSelector(
+    stateIssueList,
+    (stateIssueList) => stateIssueList.issueRefs !== undefined);
+
+export const permissions = (state) => state.issue.permissions;
+export const presubmitResponse = (state) => state.issue.presubmitResponse;
+
+const _relatedIssues = (state) => state.issue.relatedIssues || {};
+export const relatedIssues = createSelector(_relatedIssues,
+    (relatedIssues) => objectToMap(relatedIssues));
+
+const _referencedUsers = (state) => state.issue.referencedUsers || {};
+export const referencedUsers = createSelector(_referencedUsers,
+    (referencedUsers) => objectToMap(referencedUsers));
+
+export const isStarred = (state) => state.issue.isStarred;
+export const _starredIssues = (state) => state.issue.starredIssues;
+
+export const requests = (state) => state.issue.requests;
+
+// Returns a Map of in flight StarIssues requests, keyed by issueRef.
+export const starringIssues = createSelector(requests, (requests) =>
+  objectToMap(requests.starringIssues));
+
+export const starredIssues = createSelector(
+    _starredIssues,
+    (starredIssues) => {
+      const stars = new Set();
+      for (const [ref, starred] of Object.entries(starredIssues)) {
+        if (starred) stars.add(ref);
+      }
+      return stars;
+    },
+);
+
+// TODO(zhangtiff): Split up either comments or approvals into their own "duck".
+export const commentsByApprovalName = createSelector(
+    comments,
+    (comments) => {
+      const map = new Map();
+      comments.forEach((comment) => {
+        const key = (comment.approvalRef && comment.approvalRef.fieldName) ||
+          '';
+        if (map.has(key)) {
+          map.get(key).push(comment);
+        } else {
+          map.set(key, [comment]);
+        }
+      });
+      return map;
+    },
+);
+
+export const fieldValues = createSelector(
+    viewedIssue,
+    (issue) => issue && issue.fieldValues,
+);
+
+export const labelRefs = createSelector(
+    viewedIssue,
+    (issue) => issue && issue.labelRefs,
+);
+
+export const type = createSelector(
+    fieldValues,
+    labelRefs,
+    (fieldValues, labelRefs) => extractTypeForIssue(fieldValues, labelRefs),
+);
+
+export const restrictions = createSelector(
+    labelRefs,
+    (labelRefs) => {
+      if (!labelRefs) return {};
+
+      const restrictions = {};
+
+      labelRefs.forEach((labelRef) => {
+        const label = labelRef.label;
+        const lowerCaseLabel = label.toLowerCase();
+
+        if (lowerCaseLabel.startsWith(RESTRICT_VIEW_PREFIX)) {
+          const permissionType = removePrefix(label, RESTRICT_VIEW_PREFIX);
+          if (!('view' in restrictions)) {
+            restrictions['view'] = [permissionType];
+          } else {
+            restrictions['view'].push(permissionType);
+          }
+        } else if (lowerCaseLabel.startsWith(RESTRICT_EDIT_PREFIX)) {
+          const permissionType = removePrefix(label, RESTRICT_EDIT_PREFIX);
+          if (!('edit' in restrictions)) {
+            restrictions['edit'] = [permissionType];
+          } else {
+            restrictions['edit'].push(permissionType);
+          }
+        } else if (lowerCaseLabel.startsWith(RESTRICT_COMMENT_PREFIX)) {
+          const permissionType = removePrefix(label, RESTRICT_COMMENT_PREFIX);
+          if (!('comment' in restrictions)) {
+            restrictions['comment'] = [permissionType];
+          } else {
+            restrictions['comment'].push(permissionType);
+          }
+        }
+      });
+
+      return restrictions;
+    },
+);
+
+export const isOpen = createSelector(
+    viewedIssue,
+    (issue) => issue && issue.statusRef && issue.statusRef.meansOpen || false);
+
+// Returns a function that, given an issue and its related issues,
+// returns a combined list of issue ref strings including related issues,
+// blocking or blocked on issues, and federated references.
+const mapRefsWithRelated = (blocking) => {
+  return (issue, relatedIssues) => {
+    let refs = [];
+    if (blocking) {
+      if (issue.blockingIssueRefs) {
+        refs = refs.concat(issue.blockingIssueRefs);
+      }
+      if (issue.danglingBlockingRefs) {
+        refs = refs.concat(issue.danglingBlockingRefs);
+      }
+    } else {
+      if (issue.blockedOnIssueRefs) {
+        refs = refs.concat(issue.blockedOnIssueRefs);
+      }
+      if (issue.danglingBlockedOnRefs) {
+        refs = refs.concat(issue.danglingBlockedOnRefs);
+      }
+    }
+
+    // Note: relatedIssues is a Redux generated key for issues, not part of the
+    // pRPC Issue object.
+    if (issue.relatedIssues) {
+      refs = refs.concat(issue.relatedIssues);
+    }
+    return refs.map((ref) => {
+      const key = issueRefToString(ref);
+      if (relatedIssues.has(key)) {
+        return relatedIssues.get(key);
+      }
+      return ref;
+    });
+  };
+};
+
+export const blockingIssues = createSelector(
+    viewedIssue, relatedIssues,
+    mapRefsWithRelated(true),
+);
+
+export const blockedOnIssues = createSelector(
+    viewedIssue, relatedIssues,
+    mapRefsWithRelated(false),
+);
+
+export const mergedInto = createSelector(
+    viewedIssue, relatedIssues,
+    (issue, relatedIssues) => {
+      if (!issue || !issue.mergedIntoIssueRef) return {};
+      const key = issueRefToString(issue.mergedIntoIssueRef);
+      if (relatedIssues && relatedIssues.has(key)) {
+        return relatedIssues.get(key);
+      }
+      return issue.mergedIntoIssueRef;
+    },
+);
+
+export const sortedBlockedOn = createSelector(
+    blockedOnIssues,
+    (blockedOn) => blockedOn.sort((a, b) => {
+      const aIsOpen = a.statusRef && a.statusRef.meansOpen ? 1 : 0;
+      const bIsOpen = b.statusRef && b.statusRef.meansOpen ? 1 : 0;
+      return bIsOpen - aIsOpen;
+    }),
+);
+
+// values (from issue.fieldValues) is an array with one entry per value.
+// We want to turn this into a map of fieldNames -> values.
+export const fieldValueMap = createSelector(
+    fieldValues,
+    (fieldValues) => fieldValuesToMap(fieldValues),
+);
+
+// Get the list of full componentDefs for the viewed issue.
+export const components = createSelector(
+    viewedIssue,
+    projectV0.componentsMap,
+    (issue, components) => {
+      if (!issue || !issue.componentRefs) return [];
+      return issue.componentRefs.map(
+          (comp) => components.get(comp.path) || comp);
+    },
+);
+
+// Get custom fields that apply to a specific issue.
+export const fieldDefs = createSelector(
+    projectV0.fieldDefs,
+    type,
+    fieldValueMap,
+    (fieldDefs, type, fieldValues) => {
+      if (!fieldDefs) return [];
+      type = type || '';
+      return fieldDefs.filter((f) => {
+        const fieldValueKey = fieldValueMapKey(f.fieldRef.fieldName,
+            f.phaseRef && f.phaseRef.phaseName);
+        if (fieldValues && fieldValues.has(fieldValueKey)) {
+        // Regardless of other checks, include a particular field def if the
+        // issue has a value defined.
+          return true;
+        }
+        // Skip approval type and phase fields here.
+        if (f.fieldRef.approvalName ||
+            f.fieldRef.type === fieldTypes.APPROVAL_TYPE ||
+            f.isPhaseField) {
+          return false;
+        }
+
+        // If this fieldDef belongs to only one type, filter out the field if
+        // that type isn't the specified type.
+        if (f.applicableType && type.toLowerCase() !==
+            f.applicableType.toLowerCase()) {
+          return false;
+        }
+
+        return true;
+      });
+    },
+);
+
+// Action Creators
+/**
+ * Tells Redux that the user has navigated to an issue page and is now
+ * viewing a new issue.
+ * @param {IssueRef} issueRef The issue that the user is viewing.
+ * @return {AnyAction}
+ */
+export const viewIssue = (issueRef) => ({type: VIEW_ISSUE, issueRef});
+
+export const fetchCommentReferences = (comments, projectName) => {
+  return async (dispatch) => {
+    dispatch({type: FETCH_COMMENT_REFERENCES_START});
+
+    try {
+      const refs = await autolink.getReferencedArtifacts(comments, projectName);
+      const commentRefs = {};
+      refs.forEach(({componentName, existingRefs}) => {
+        commentRefs[componentName] = existingRefs;
+      });
+      dispatch({
+        type: FETCH_COMMENT_REFERENCES_SUCCESS,
+        commentReferences: commentRefs,
+      });
+    } catch (error) {
+      dispatch({type: FETCH_COMMENT_REFERENCES_FAILURE, error});
+    }
+  };
+};
+
+export const fetchReferencedUsers = (issue) => async (dispatch) => {
+  if (!issue) return;
+  dispatch({type: FETCH_REFERENCED_USERS_START});
+
+  // TODO(zhangtiff): Make this function account for custom fields
+  // of type user.
+  const userRefs = [...(issue.ccRefs || [])];
+  if (issue.ownerRef) {
+    userRefs.push(issue.ownerRef);
+  }
+  (issue.approvalValues || []).forEach((approval) => {
+    userRefs.push(...(approval.approverRefs || []));
+    if (approval.setterRef) {
+      userRefs.push(approval.setterRef);
+    }
+  });
+
+  try {
+    const resp = await prpcClient.call(
+        'monorail.Users', 'ListReferencedUsers', {userRefs});
+
+    const referencedUsers = {};
+    (resp.users || []).forEach((user) => {
+      referencedUsers[user.displayName] = user;
+    });
+    dispatch({type: FETCH_REFERENCED_USERS_SUCCESS, referencedUsers});
+  } catch (error) {
+    dispatch({type: FETCH_REFERENCED_USERS_FAILURE, error});
+  }
+};
+
+export const fetchFederatedReferences = (issue) => async (dispatch) => {
+  dispatch({type: FETCH_FEDERATED_REFERENCES_START});
+
+  // Concat all potential fedrefs together, convert from shortlink to classes,
+  // then fire off a request to fetch the status of each.
+  const fedRefs = []
+      .concat(issue.danglingBlockingRefs || [])
+      .concat(issue.danglingBlockedOnRefs || [])
+      .concat(issue.mergedIntoIssueRef ? [issue.mergedIntoIssueRef] : [])
+      .filter((ref) => ref && ref.extIdentifier)
+      .map((ref) => fromShortlink(ref.extIdentifier))
+      .filter((fedRef) => fedRef);
+
+  // If no FedRefs, return empty Map.
+  if (fedRefs.length === 0) {
+    return;
+  }
+
+  try {
+    // Load email separately since it might have changed.
+    await loadGapi();
+    const email = await fetchGapiEmail();
+
+    // If already logged in, dispatch login success event.
+    dispatch({
+      type: userV0.GAPI_LOGIN_SUCCESS,
+      email: email,
+    });
+
+    await Promise.all(fedRefs.map((fedRef) => fedRef.getFederatedDetails()));
+    const fedRefIssueRefs = fedRefs.map((fedRef) => fedRef.toIssueRef());
+
+    dispatch({
+      type: FETCH_FEDERATED_REFERENCES_SUCCESS,
+      fedRefIssueRefs: fedRefIssueRefs,
+    });
+  } catch (error) {
+    dispatch({type: FETCH_FEDERATED_REFERENCES_FAILURE, error});
+  }
+};
+
+// TODO(zhangtiff): Figure out if we can reduce request/response sizes by
+// diffing issues to fetch against issues we already know about to avoid
+// fetching duplicate info.
+export const fetchRelatedIssues = (issue) => async (dispatch) => {
+  if (!issue) return;
+  dispatch({type: FETCH_RELATED_ISSUES_START});
+
+  const refsToFetch = (issue.blockedOnIssueRefs || []).concat(
+      issue.blockingIssueRefs || []);
+  // Add mergedinto ref, exclude FedRefs which are fetched separately.
+  if (issue.mergedIntoIssueRef && !issue.mergedIntoIssueRef.extIdentifier) {
+    refsToFetch.push(issue.mergedIntoIssueRef);
+  }
+
+  const message = {
+    issueRefs: refsToFetch,
+  };
+  try {
+    // Fire off call to fetch FedRefs. Since it might take longer it is
+    // handled by a separate reducer.
+    dispatch(fetchFederatedReferences(issue));
+
+    const resp = await prpcClient.call(
+        'monorail.Issues', 'ListReferencedIssues', message);
+
+    const relatedIssues = {};
+
+    const openIssues = resp.openRefs || [];
+    const closedIssues = resp.closedRefs || [];
+    openIssues.forEach((issue) => {
+      issue.statusRef.meansOpen = true;
+      relatedIssues[issueRefToString(issue)] = issue;
+    });
+    closedIssues.forEach((issue) => {
+      issue.statusRef.meansOpen = false;
+      relatedIssues[issueRefToString(issue)] = issue;
+    });
+    dispatch({
+      type: FETCH_RELATED_ISSUES_SUCCESS,
+      relatedIssues: relatedIssues,
+    });
+  } catch (error) {
+    dispatch({type: FETCH_RELATED_ISSUES_FAILURE, error});
+  };
+};
+
+/**
+ * Fetches issue data needed to display a detailed view of a single
+ * issue. This function dispatches many actions to handle the fetching
+ * of issue comments, permissions, star state, and more.
+ * @param {IssueRef} issueRef The issue that the user is viewing.
+ * @return {function(function): Promise<void>}
+ */
+export const fetchIssuePageData = (issueRef) => async (dispatch) => {
+  dispatch(fetchComments(issueRef));
+  dispatch(fetch(issueRef));
+  dispatch(fetchPermissions(issueRef));
+  dispatch(fetchIsStarred(issueRef));
+};
+
+/**
+ * @param {IssueRef} issueRef Which issue to fetch.
+ * @return {function(function): Promise<void>}
+ */
+export const fetch = (issueRef) => async (dispatch) => {
+  dispatch({type: FETCH_START});
+
+  try {
+    const resp = await prpcClient.call(
+        'monorail.Issues', 'GetIssue', {issueRef},
+    );
+
+    const movedToRef = resp.movedToRef;
+
+    // The API can return deleted issue objects that don't have issueRef data
+    // specified. For this case, we want to make sure a projectName and localId
+    // are still provided to the frontend to ensure that keying issues still
+    // works.
+    const issue = {...issueRef, ...resp.issue};
+    if (movedToRef) {
+      issue.movedToRef = movedToRef;
+    }
+
+    dispatch({type: FETCH_SUCCESS, issue});
+
+    if (!issue.isDeleted && !movedToRef) {
+      dispatch(fetchRelatedIssues(issue));
+      dispatch(fetchHotlists(issueRef));
+      dispatch(fetchReferencedUsers(issue));
+      dispatch(userV0.fetchProjects([issue.reporterRef]));
+    }
+  } catch (error) {
+    dispatch({type: FETCH_FAILURE, error});
+  }
+};
+
+/**
+ * Action creator to fetch multiple Issues.
+ * @param {Array<IssueRef>} issueRefs An Array of Issue references to fetch.
+ * @return {function(function): Promise<void>}
+ */
+export const fetchIssues = (issueRefs) => async (dispatch) => {
+  dispatch({type: FETCH_ISSUES_START});
+
+  try {
+    const {openRefs, closedRefs} = await prpcClient.call(
+        'monorail.Issues', 'ListReferencedIssues', {issueRefs});
+    const issues = [...openRefs || [], ...closedRefs || []];
+
+    dispatch({type: FETCH_ISSUES_SUCCESS, issues});
+  } catch (error) {
+    dispatch({type: FETCH_ISSUES_FAILURE, error});
+  }
+};
+
+/**
+ * Gets the hotlists that a given issue is in.
+ * @param {IssueRef} issueRef
+ * @return {function(function): Promise<void>}
+ */
+export const fetchHotlists = (issueRef) => async (dispatch) => {
+  dispatch({type: FETCH_HOTLISTS_START});
+
+  try {
+    const resp = await prpcClient.call(
+        'monorail.Features', 'ListHotlistsByIssue', {issue: issueRef});
+
+    const hotlists = (resp.hotlists || []);
+    hotlists.sort((hotlistA, hotlistB) => {
+      return hotlistA.name.localeCompare(hotlistB.name);
+    });
+    dispatch({type: FETCH_HOTLISTS_SUCCESS, hotlists});
+  } catch (error) {
+    dispatch({type: FETCH_HOTLISTS_FAILURE, error});
+  };
+};
+
+/**
+ * Async action creator to fetch issues in the issue list and grid pages. This
+ * action creator supports batching multiple async requests to support the grid
+ * view's ability to load up to 6,000 issues in one page load.
+ *
+ * @param {string} projectName The project to fetch issues from.
+ * @param {Object} params Options for which issues to fetch.
+ * @param {string=} params.q The query string for the search.
+ * @param {string=} params.can The ID of the canned query for the search.
+ * @param {string=} params.groupby The spec of which fields to group by.
+ * @param {string=} params.sort The spec of which fields to sort by.
+ * @param {number=} params.start What cursor index to start at.
+ * @param {number=} params.maxItems How many items to fetch per page.
+ * @param {number=} params.maxCalls The maximum number of API calls to make.
+ *   Combined with pagination.maxItems, this defines the maximum number of
+ *   issues this method can fetch.
+ * @return {function(function): Promise<void>}
+ */
+export const fetchIssueList =
+  (projectName, {q = undefined, can = undefined, groupby = undefined,
+    sort = undefined, start = undefined, maxItems = undefined,
+    maxCalls = 1,
+  }) => async (dispatch) => {
+    let updateData = {};
+    const promises = [];
+    const issuesByRequest = [];
+    let issueLimit;
+    let totalIssues;
+    let totalCalls;
+    const itemsPerCall = maxItems || 1000;
+
+    const cannedQuery = Number.parseInt(can) || undefined;
+
+    const pagination = {
+      ...(start && {start}),
+      ...(maxItems && {maxItems}),
+    };
+
+    const message = {
+      projectNames: [projectName],
+      query: q,
+      cannedQuery,
+      groupBySpec: groupby,
+      sortSpec: sort,
+      pagination,
+    };
+
+    dispatch({type: FETCH_ISSUE_LIST_START});
+
+    // initial api call made to determine total number of issues matching
+    // the query.
+    try {
+      // TODO(zhangtiff): Refactor this action creator when adding issue
+      // list pagination.
+      const resp = await prpcClient.call(
+          'monorail.Issues', 'ListIssues', message);
+
+      // prpcClient is not actually a protobuf client and therefore not
+      // hydrating default values. See crbug.com/monorail/6641
+      // Until that is fixed, we have to explicitly define it.
+      const defaultFetchListResponse = {totalResults: 0, issues: []};
+
+      updateData =
+        Object.entries(resp).length === 0 ?
+          defaultFetchListResponse :
+          resp;
+      issuesByRequest[0] = updateData.issues;
+      issueLimit = updateData.totalResults;
+
+      // determine correct issues to load and number of calls to be made.
+      if (issueLimit > (itemsPerCall * maxCalls)) {
+        totalIssues = itemsPerCall * maxCalls;
+        totalCalls = maxCalls - 1;
+      } else {
+        totalIssues = issueLimit;
+        totalCalls = Math.ceil(issueLimit / itemsPerCall) - 1;
+      }
+
+      if (totalIssues) {
+        updateData.progress = updateData.issues.length / totalIssues;
+      } else {
+        updateData.progress = 1;
+      }
+
+      dispatch({type: FETCH_ISSUE_LIST_UPDATE, ...updateData});
+
+      // remaining api calls are made.
+      for (let i = 1; i <= totalCalls; i++) {
+        promises[i - 1] = (async () => {
+          const resp = await prpcClient.call(
+              'monorail.Issues', 'ListIssues', {
+                ...message,
+                pagination: {start: i * itemsPerCall, maxItems: itemsPerCall},
+              });
+          issuesByRequest[i] = (resp.issues || []);
+          // sort the issues in the correct order.
+          updateData.issues = [];
+          issuesByRequest.forEach((issue) => {
+            updateData.issues = updateData.issues.concat(issue);
+          });
+          updateData.progress = updateData.issues.length / totalIssues;
+          dispatch({type: FETCH_ISSUE_LIST_UPDATE, ...updateData});
+        })();
+      }
+
+      await Promise.all(promises);
+
+      // TODO(zhangtiff): Try to delete FETCH_ISSUE_LIST_SUCCESS in favor of
+      // just FETCH_ISSUE_LIST_UPDATE.
+      dispatch({type: FETCH_ISSUE_LIST_SUCCESS});
+    } catch (error) {
+      dispatch({type: FETCH_ISSUE_LIST_FAILURE, error});
+    };
+  };
+
+/**
+ * Fetches the currently logged in user's permissions for a given issue.
+ * @param {Issue} issueRef
+ * @return {function(function): Promise<void>}
+ */
+export const fetchPermissions = (issueRef) => async (dispatch) => {
+  dispatch({type: FETCH_PERMISSIONS_START});
+
+  try {
+    const resp = await prpcClient.call(
+        'monorail.Issues', 'ListIssuePermissions', {issueRef},
+    );
+
+    dispatch({type: FETCH_PERMISSIONS_SUCCESS, permissions: resp.permissions});
+  } catch (error) {
+    dispatch({type: FETCH_PERMISSIONS_FAILURE, error});
+  };
+};
+
+/**
+ * Fetches comments for an issue. Note that issue descriptions are also
+ * comments.
+ * @param {IssueRef} issueRef
+ * @return {function(function): Promise<void>}
+ */
+export const fetchComments = (issueRef) => async (dispatch) => {
+  dispatch({type: FETCH_COMMENTS_START});
+
+  try {
+    const resp = await prpcClient.call(
+        'monorail.Issues', 'ListComments', {issueRef});
+
+    dispatch({type: FETCH_COMMENTS_SUCCESS, comments: resp.comments});
+    dispatch(fetchCommentReferences(
+        resp.comments, issueRef.projectName));
+
+    const commenterRefs = (resp.comments || []).map(
+        (comment) => comment.commenter);
+    dispatch(userV0.fetchProjects(commenterRefs));
+  } catch (error) {
+    dispatch({type: FETCH_COMMENTS_FAILURE, error});
+  };
+};
+
+/**
+ * Gets whether the logged in user has starred a given issue.
+ * @param {IssueRef} issueRef
+ * @return {function(function): Promise<void>}
+ */
+export const fetchIsStarred = (issueRef) => async (dispatch) => {
+  dispatch({type: FETCH_IS_STARRED_START});
+  try {
+    const resp = await prpcClient.call(
+        'monorail.Issues', 'IsIssueStarred', {issueRef},
+    );
+
+    dispatch({
+      type: FETCH_IS_STARRED_SUCCESS,
+      starred: resp.isStarred,
+      issueRef: issueRef,
+    });
+  } catch (error) {
+    dispatch({type: FETCH_IS_STARRED_FAILURE, error});
+  };
+};
+
+/**
+ * Fetch all of a logged in user's starred issues.
+ * @return {function(function): Promise<void>}
+ */
+export const fetchStarredIssues = () => async (dispatch) => {
+  dispatch({type: FETCH_ISSUES_STARRED_START});
+
+  try {
+    const resp = await prpcClient.call(
+        'monorail.Issues', 'ListStarredIssues', {},
+    );
+    dispatch({type: FETCH_ISSUES_STARRED_SUCCESS,
+      starredIssueRefs: resp.starredIssueRefs});
+  } catch (error) {
+    dispatch({type: FETCH_ISSUES_STARRED_FAILURE, error});
+  };
+};
+
+/**
+ * Stars or unstars an issue.
+ * @param {IssueRef} issueRef The issue to star.
+ * @param {boolean} starred Whether to star or unstar.
+ * @return {function(function): Promise<void>}
+ */
+export const star = (issueRef, starred) => async (dispatch) => {
+  const requestKey = issueRefToString(issueRef);
+
+  dispatch({type: STAR_START, requestKey});
+  const message = {issueRef, starred};
+
+  try {
+    const resp = await prpcClient.call(
+        'monorail.Issues', 'StarIssue', message,
+    );
+
+    dispatch({
+      type: STAR_SUCCESS,
+      starCount: resp.starCount,
+      issueRef,
+      starred,
+      requestKey,
+    });
+  } catch (error) {
+    dispatch({type: STAR_FAILURE, error, requestKey});
+  }
+};
+
+/**
+ * Runs a presubmit request to find warnings to show the user before an issue
+ * edit is saved.
+ * @param {IssueRef} issueRef The issue being edited.
+ * @param {IssueDelta} issueDelta The user's in flight changes to the issue.
+ * @return {function(function): Promise<void>}
+ */
+export const presubmit = (issueRef, issueDelta) => async (dispatch) => {
+  dispatch({type: PRESUBMIT_START});
+
+  try {
+    const resp = await prpcClient.call(
+        'monorail.Issues', 'PresubmitIssue', {issueRef, issueDelta});
+
+    dispatch({type: PRESUBMIT_SUCCESS, presubmitResponse: resp});
+  } catch (error) {
+    dispatch({type: PRESUBMIT_FAILURE, error: error});
+  }
+};
+
+/**
+ * Async action creator to update an issue's approval.
+ *
+ * @param {Object} params Options for the approval update.
+ * @param {IssueRef} params.issueRef
+ * @param {FieldRef} params.fieldRef
+ * @param {ApprovalDelta=} params.approvalDelta
+ * @param {string=} params.commentContent
+ * @param {boolean=} params.sendEmail
+ * @param {boolean=} params.isDescription
+ * @param {AttachmentUpload=} params.uploads
+ * @return {function(function): Promise<void>}
+ */
+export const updateApproval = ({issueRef, fieldRef, approvalDelta,
+  commentContent, sendEmail, isDescription, uploads}) => async (dispatch) => {
+  dispatch({type: UPDATE_APPROVAL_START});
+  try {
+    const {approval} = await prpcClient.call(
+        'monorail.Issues', 'UpdateApproval', {
+          ...(issueRef && {issueRef}),
+          ...(fieldRef && {fieldRef}),
+          ...(approvalDelta && {approvalDelta}),
+          ...(commentContent && {commentContent}),
+          ...(sendEmail && {sendEmail}),
+          ...(isDescription && {isDescription}),
+          ...(uploads && {uploads}),
+        });
+
+    dispatch({type: UPDATE_APPROVAL_SUCCESS, approval, issueRef});
+    dispatch(fetch(issueRef));
+    dispatch(fetchComments(issueRef));
+  } catch (error) {
+    dispatch({type: UPDATE_APPROVAL_FAILURE, error: error});
+  };
+};
+
+/**
+ * Async action creator to update an issue.
+ *
+ * @param {Object} params Options for the issue update.
+ * @param {IssueRef} params.issueRef
+ * @param {IssueDelta=} params.delta
+ * @param {string=} params.commentContent
+ * @param {boolean=} params.sendEmail
+ * @param {boolean=} params.isDescription
+ * @param {AttachmentUpload=} params.uploads
+ * @param {Array<number>=} params.keptAttachments
+ * @return {function(function): Promise<void>}
+ */
+export const update = ({issueRef, delta, commentContent, sendEmail,
+  isDescription, uploads, keptAttachments}) => async (dispatch) => {
+  dispatch({type: UPDATE_START});
+
+  try {
+    const {issue} = await prpcClient.call(
+        'monorail.Issues', 'UpdateIssue', {issueRef, delta,
+          commentContent, sendEmail, isDescription, uploads,
+          keptAttachments});
+
+    dispatch({type: UPDATE_SUCCESS, issue});
+    dispatch(fetchComments(issueRef));
+    dispatch(fetchRelatedIssues(issue));
+    dispatch(fetchReferencedUsers(issue));
+  } catch (error) {
+    dispatch({type: UPDATE_FAILURE, error: error});
+  };
+};
+
+/**
+ * Converts an issue from one template to another. This is used for changing
+ * launch issues.
+ * @param {IssueRef} issueRef
+ * @param {Object} options
+ * @param {string=} options.templateName
+ * @param {string=} options.commentContent
+ * @param {boolean=} options.sendEmail
+ * @return {function(function): Promise<void>}
+ */
+export const convert = (issueRef, {templateName = '',
+  commentContent = '', sendEmail = true},
+) => async (dispatch) => {
+  dispatch({type: CONVERT_START});
+
+  try {
+    const resp = await prpcClient.call(
+        'monorail.Issues', 'ConvertIssueApprovalsTemplate',
+        {issueRef, templateName, commentContent, sendEmail});
+
+    dispatch({type: CONVERT_SUCCESS, issue: resp.issue});
+    const fetchCommentsMessage = {issueRef};
+    dispatch(fetchComments(fetchCommentsMessage));
+  } catch (error) {
+    dispatch({type: CONVERT_FAILURE, error: error});
+  };
+};
diff --git a/static_src/reducers/issueV0.test.js b/static_src/reducers/issueV0.test.js
new file mode 100644
index 0000000..0c7a0f5
--- /dev/null
+++ b/static_src/reducers/issueV0.test.js
@@ -0,0 +1,1409 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {createSelector} from 'reselect';
+import {store, resetState} from './base.js';
+import * as issueV0 from './issueV0.js';
+import * as example from 'shared/test/constants-issueV0.js';
+import {fieldTypes} from 'shared/issue-fields.js';
+import {issueToIssueRef, issueRefToString} from 'shared/convertersV0.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import {getSigninInstance} from 'shared/gapi-loader.js';
+
+let prpcCall;
+let dispatch;
+
+describe('issue', () => {
+  beforeEach(() => {
+    store.dispatch(resetState());
+  });
+
+  describe('reducers', () => {
+    describe('issueByRefReducer', () => {
+      it('no-op on unmatching action', () => {
+        const action = {
+          type: 'FAKE_ACTION',
+          issues: [example.ISSUE_OTHER_PROJECT],
+        };
+        assert.deepEqual(issueV0.issuesByRefStringReducer({}, action), {});
+
+        const state = {[example.ISSUE_REF_STRING]: example.ISSUE};
+        assert.deepEqual(issueV0.issuesByRefStringReducer(state, action),
+            state);
+      });
+
+      it('handles FETCH_ISSUE_LIST_UPDATE', () => {
+        const newState = issueV0.issuesByRefStringReducer({}, {
+          type: issueV0.FETCH_ISSUE_LIST_UPDATE,
+          issues: [example.ISSUE, example.ISSUE_OTHER_PROJECT],
+          totalResults: 2,
+          progress: 1,
+        });
+        assert.deepEqual(newState, {
+          [example.ISSUE_REF_STRING]: example.ISSUE,
+          [example.ISSUE_OTHER_PROJECT_REF_STRING]: example.ISSUE_OTHER_PROJECT,
+        });
+      });
+
+      it('handles FETCH_ISSUES_SUCCESS', () => {
+        const newState = issueV0.issuesByRefStringReducer({}, {
+          type: issueV0.FETCH_ISSUES_SUCCESS,
+          issues: [example.ISSUE, example.ISSUE_OTHER_PROJECT],
+        });
+        assert.deepEqual(newState, {
+          [example.ISSUE_REF_STRING]: example.ISSUE,
+          [example.ISSUE_OTHER_PROJECT_REF_STRING]: example.ISSUE_OTHER_PROJECT,
+        });
+      });
+    });
+
+    describe('issueListReducer', () => {
+      it('no-op on unmatching action', () => {
+        const action = {
+          type: 'FETCH_ISSUE_LIST_FAKE_ACTION',
+          issues: [
+            {localId: 1, projectName: 'chromium', summary: 'hello-world'},
+          ],
+        };
+        assert.deepEqual(issueV0.issueListReducer({}, action), {});
+
+        assert.deepEqual(issueV0.issueListReducer({
+          issueRefs: ['chromium:1'],
+          totalResults: 1,
+          progress: 1,
+        }, action), {
+          issueRefs: ['chromium:1'],
+          totalResults: 1,
+          progress: 1,
+        });
+      });
+
+      it('handles FETCH_ISSUE_LIST_UPDATE', () => {
+        const newState = issueV0.issueListReducer({}, {
+          type: 'FETCH_ISSUE_LIST_UPDATE',
+          issues: [
+            {localId: 1, projectName: 'chromium', summary: 'hello-world'},
+            {localId: 2, projectName: 'monorail', summary: 'Test'},
+          ],
+          totalResults: 2,
+          progress: 1,
+        });
+        assert.deepEqual(newState, {
+          issueRefs: ['chromium:1', 'monorail:2'],
+          totalResults: 2,
+          progress: 1,
+        });
+      });
+    });
+
+    describe('relatedIssuesReducer', () => {
+      it('handles FETCH_RELATED_ISSUES_SUCCESS', () => {
+        const newState = issueV0.relatedIssuesReducer({}, {
+          type: 'FETCH_RELATED_ISSUES_SUCCESS',
+          relatedIssues: {'rutabaga:1234': {}},
+        });
+        assert.deepEqual(newState, {'rutabaga:1234': {}});
+      });
+
+      describe('FETCH_FEDERATED_REFERENCES_SUCCESS', () => {
+        it('returns early if data is missing', () => {
+          const newState = issueV0.relatedIssuesReducer({'b/123': {}}, {
+            type: 'FETCH_FEDERATED_REFERENCES_SUCCESS',
+          });
+          assert.deepEqual(newState, {'b/123': {}});
+        });
+
+        it('returns early if data is empty', () => {
+          const newState = issueV0.relatedIssuesReducer({'b/123': {}}, {
+            type: 'FETCH_FEDERATED_REFERENCES_SUCCESS',
+            fedRefIssueRefs: [],
+          });
+          assert.deepEqual(newState, {'b/123': {}});
+        });
+
+        it('assigns each FedRef to the state', () => {
+          const state = {
+            'rutabaga:123': {},
+            'rutabaga:345': {},
+          };
+          const newState = issueV0.relatedIssuesReducer(state, {
+            type: 'FETCH_FEDERATED_REFERENCES_SUCCESS',
+            fedRefIssueRefs: [
+              {
+                extIdentifier: 'b/987',
+                summary: 'What is up',
+                statusRef: {meansOpen: true},
+              },
+              {
+                extIdentifier: 'b/765',
+                summary: 'Rutabaga',
+                statusRef: {meansOpen: false},
+              },
+            ],
+          });
+          assert.deepEqual(newState, {
+            'rutabaga:123': {},
+            'rutabaga:345': {},
+            'b/987': {
+              extIdentifier: 'b/987',
+              summary: 'What is up',
+              statusRef: {meansOpen: true},
+            },
+            'b/765': {
+              extIdentifier: 'b/765',
+              summary: 'Rutabaga',
+              statusRef: {meansOpen: false},
+            },
+          });
+        });
+      });
+    });
+  });
+
+  it('viewedIssue', () => {
+    assert.deepEqual(issueV0.viewedIssue(wrapIssue()), {});
+    assert.deepEqual(
+        issueV0.viewedIssue(wrapIssue({projectName: 'proj', localId: 100})),
+        {projectName: 'proj', localId: 100},
+    );
+  });
+
+  describe('issueList', () => {
+    it('issueList', () => {
+      const stateWithEmptyIssueList = {issue: {
+        issueList: {},
+      }};
+      assert.deepEqual(issueV0.issueList(stateWithEmptyIssueList), []);
+
+      const stateWithIssueList = {issue: {
+        issuesByRefString: {
+          'chromium:1': {localId: 1, projectName: 'chromium', summary: 'test'},
+          'monorail:2': {localId: 2, projectName: 'monorail',
+            summary: 'hello world'},
+        },
+        issueList: {
+          issueRefs: ['chromium:1', 'monorail:2'],
+        }}};
+      assert.deepEqual(issueV0.issueList(stateWithIssueList),
+          [
+            {localId: 1, projectName: 'chromium', summary: 'test'},
+            {localId: 2, projectName: 'monorail', summary: 'hello world'},
+          ]);
+    });
+
+    it('is a selector', () => {
+      issueV0.issueList.constructor === createSelector;
+    });
+
+    it('memoizes results: returns same reference', () => {
+      const stateWithIssueList = {issue: {
+        issuesByRefString: {
+          'chromium:1': {localId: 1, projectName: 'chromium', summary: 'test'},
+          'monorail:2': {localId: 2, projectName: 'monorail',
+            summary: 'hello world'},
+        },
+        issueList: {
+          issueRefs: ['chromium:1', 'monorail:2'],
+        }}};
+      const reference1 = issueV0.issueList(stateWithIssueList);
+      const reference2 = issueV0.issueList(stateWithIssueList);
+
+      assert.equal(typeof reference1, 'object');
+      assert.equal(typeof reference2, 'object');
+      assert.equal(reference1, reference2);
+    });
+  });
+
+  describe('issueListLoaded', () => {
+    const stateWithEmptyIssueList = {issue: {
+      issueList: {},
+    }};
+
+    it('false when no issue list', () => {
+      assert.isFalse(issueV0.issueListLoaded(stateWithEmptyIssueList));
+    });
+
+    it('true after issues loaded, even when empty', () => {
+      const issueList = issueV0.issueListReducer({}, {
+        type: issueV0.FETCH_ISSUE_LIST_UPDATE,
+        issues: [],
+        progress: 1,
+        totalResults: 0,
+      });
+      assert.isTrue(issueV0.issueListLoaded({issue: {issueList}}));
+    });
+  });
+
+  it('fieldValues', () => {
+    assert.isUndefined(issueV0.fieldValues(wrapIssue()));
+    assert.deepEqual(issueV0.fieldValues(wrapIssue({
+      fieldValues: [{value: 'v'}],
+    })), [{value: 'v'}]);
+  });
+
+  it('type computes type from custom field', () => {
+    assert.isUndefined(issueV0.type(wrapIssue()));
+    assert.isUndefined(issueV0.type(wrapIssue({
+      fieldValues: [{value: 'v'}],
+    })));
+    assert.deepEqual(issueV0.type(wrapIssue({
+      fieldValues: [
+        {fieldRef: {fieldName: 'IgnoreMe'}, value: 'v'},
+        {fieldRef: {fieldName: 'Type'}, value: 'Defect'},
+      ],
+    })), 'Defect');
+  });
+
+  it('type computes type from label', () => {
+    assert.deepEqual(issueV0.type(wrapIssue({
+      labelRefs: [
+        {label: 'Test'},
+        {label: 'tYpE-FeatureRequest'},
+      ],
+    })), 'FeatureRequest');
+
+    assert.deepEqual(issueV0.type(wrapIssue({
+      fieldValues: [
+        {fieldRef: {fieldName: 'IgnoreMe'}, value: 'v'},
+      ],
+      labelRefs: [
+        {label: 'Test'},
+        {label: 'Type-Defect'},
+      ],
+    })), 'Defect');
+  });
+
+  it('restrictions', () => {
+    assert.deepEqual(issueV0.restrictions(wrapIssue()), {});
+    assert.deepEqual(issueV0.restrictions(wrapIssue({labelRefs: []})), {});
+
+    assert.deepEqual(issueV0.restrictions(wrapIssue({labelRefs: [
+      {label: 'IgnoreThis'},
+      {label: 'IgnoreThis2'},
+    ]})), {});
+
+    assert.deepEqual(issueV0.restrictions(wrapIssue({labelRefs: [
+      {label: 'IgnoreThis'},
+      {label: 'IgnoreThis2'},
+      {label: 'Restrict-View-Google'},
+      {label: 'Restrict-EditIssue-hello'},
+      {label: 'Restrict-EditIssue-test'},
+      {label: 'Restrict-AddIssueComment-HELLO'},
+    ]})), {
+      'view': ['Google'],
+      'edit': ['hello', 'test'],
+      'comment': ['HELLO'],
+    });
+  });
+
+  it('isOpen', () => {
+    assert.isFalse(issueV0.isOpen(wrapIssue()));
+    assert.isTrue(issueV0.isOpen(wrapIssue({statusRef: {meansOpen: true}})));
+    assert.isFalse(issueV0.isOpen(wrapIssue({statusRef: {meansOpen: false}})));
+  });
+
+  it('issueListPhaseNames', () => {
+    const stateWithEmptyIssueList = {issue: {
+      issueList: [],
+    }};
+    assert.deepEqual(issueV0.issueListPhaseNames(stateWithEmptyIssueList), []);
+    const stateWithIssueList = {issue: {
+      issuesByRefString: {
+        '1': {localId: 1, phases: [{phaseRef: {phaseName: 'chicken-phase'}}]},
+        '2': {localId: 2, phases: [
+          {phaseRef: {phaseName: 'chicken-Phase'}},
+          {phaseRef: {phaseName: 'cow-phase'}}],
+        },
+        '3': {localId: 3, phases: [
+          {phaseRef: {phaseName: 'cow-Phase'}},
+          {phaseRef: {phaseName: 'DOG-phase'}}],
+        },
+        '4': {localId: 4, phases: [
+          {phaseRef: {phaseName: 'dog-phase'}},
+        ]},
+      },
+      issueList: {
+        issueRefs: ['1', '2', '3', '4'],
+      }}};
+    assert.deepEqual(issueV0.issueListPhaseNames(stateWithIssueList),
+        ['chicken-phase', 'cow-phase', 'dog-phase']);
+  });
+
+  describe('blockingIssues', () => {
+    const relatedIssues = {
+      ['proj:1']: {
+        localId: 1,
+        projectName: 'proj',
+        labelRefs: [{label: 'label'}],
+      },
+      ['proj:3']: {
+        localId: 3,
+        projectName: 'proj',
+        labelRefs: [],
+      },
+      ['chromium:332']: {
+        localId: 332,
+        projectName: 'chromium',
+        labelRefs: [],
+      },
+    };
+
+    it('returns references when no issue data', () => {
+      const stateNoReferences = wrapIssue(
+          {
+            projectName: 'project',
+            localId: 123,
+            blockingIssueRefs: [{localId: 1, projectName: 'proj'}],
+          },
+          {relatedIssues: {}},
+      );
+      assert.deepEqual(issueV0.blockingIssues(stateNoReferences),
+          [{localId: 1, projectName: 'proj'}],
+      );
+    });
+
+    it('returns empty when no blocking issues', () => {
+      const stateNoIssues = wrapIssue(
+          {
+            projectName: 'project',
+            localId: 123,
+            blockingIssueRefs: [],
+          },
+          {relatedIssues},
+      );
+      assert.deepEqual(issueV0.blockingIssues(stateNoIssues), []);
+    });
+
+    it('returns full issues when deferenced data present', () => {
+      const stateIssuesWithReferences = wrapIssue(
+          {
+            projectName: 'project',
+            localId: 123,
+            blockingIssueRefs: [
+              {localId: 1, projectName: 'proj'},
+              {localId: 332, projectName: 'chromium'},
+            ],
+          },
+          {relatedIssues},
+      );
+      assert.deepEqual(issueV0.blockingIssues(stateIssuesWithReferences),
+          [
+            {localId: 1, projectName: 'proj', labelRefs: [{label: 'label'}]},
+            {localId: 332, projectName: 'chromium', labelRefs: []},
+          ]);
+    });
+
+    it('returns federated references', () => {
+      const stateIssuesWithFederatedReferences = wrapIssue(
+          {
+            projectName: 'project',
+            localId: 123,
+            blockingIssueRefs: [
+              {localId: 1, projectName: 'proj'},
+              {extIdentifier: 'b/1234'},
+            ],
+          },
+          {relatedIssues},
+      );
+      assert.deepEqual(
+          issueV0.blockingIssues(stateIssuesWithFederatedReferences), [
+            {localId: 1, projectName: 'proj', labelRefs: [{label: 'label'}]},
+            {extIdentifier: 'b/1234'},
+          ]);
+    });
+  });
+
+  describe('blockedOnIssues', () => {
+    const relatedIssues = {
+      ['proj:1']: {
+        localId: 1,
+        projectName: 'proj',
+        labelRefs: [{label: 'label'}],
+      },
+      ['proj:3']: {
+        localId: 3,
+        projectName: 'proj',
+        labelRefs: [],
+      },
+      ['chromium:332']: {
+        localId: 332,
+        projectName: 'chromium',
+        labelRefs: [],
+      },
+    };
+
+    it('returns references when no issue data', () => {
+      const stateNoReferences = wrapIssue(
+          {
+            projectName: 'project',
+            localId: 123,
+            blockedOnIssueRefs: [{localId: 1, projectName: 'proj'}],
+          },
+          {relatedIssues: {}},
+      );
+      assert.deepEqual(issueV0.blockedOnIssues(stateNoReferences),
+          [{localId: 1, projectName: 'proj'}],
+      );
+    });
+
+    it('returns empty when no blocking issues', () => {
+      const stateNoIssues = wrapIssue(
+          {
+            projectName: 'project',
+            localId: 123,
+            blockedOnIssueRefs: [],
+          },
+          {relatedIssues},
+      );
+      assert.deepEqual(issueV0.blockedOnIssues(stateNoIssues), []);
+    });
+
+    it('returns full issues when deferenced data present', () => {
+      const stateIssuesWithReferences = wrapIssue(
+          {
+            projectName: 'project',
+            localId: 123,
+            blockedOnIssueRefs: [
+              {localId: 1, projectName: 'proj'},
+              {localId: 332, projectName: 'chromium'},
+            ],
+          },
+          {relatedIssues},
+      );
+      assert.deepEqual(issueV0.blockedOnIssues(stateIssuesWithReferences),
+          [
+            {localId: 1, projectName: 'proj', labelRefs: [{label: 'label'}]},
+            {localId: 332, projectName: 'chromium', labelRefs: []},
+          ]);
+    });
+
+    it('returns federated references', () => {
+      const stateIssuesWithFederatedReferences = wrapIssue(
+          {
+            projectName: 'project',
+            localId: 123,
+            blockedOnIssueRefs: [
+              {localId: 1, projectName: 'proj'},
+              {extIdentifier: 'b/1234'},
+            ],
+          },
+          {relatedIssues},
+      );
+      assert.deepEqual(
+          issueV0.blockedOnIssues(stateIssuesWithFederatedReferences),
+          [
+            {localId: 1, projectName: 'proj', labelRefs: [{label: 'label'}]},
+            {extIdentifier: 'b/1234'},
+          ]);
+    });
+  });
+
+  describe('sortedBlockedOn', () => {
+    const relatedIssues = {
+      ['proj:1']: {
+        localId: 1,
+        projectName: 'proj',
+        statusRef: {meansOpen: true},
+      },
+      ['proj:3']: {
+        localId: 3,
+        projectName: 'proj',
+        statusRef: {meansOpen: false},
+      },
+      ['proj:4']: {
+        localId: 4,
+        projectName: 'proj',
+        statusRef: {meansOpen: false},
+      },
+      ['proj:5']: {
+        localId: 5,
+        projectName: 'proj',
+        statusRef: {meansOpen: false},
+      },
+      ['chromium:332']: {
+        localId: 332,
+        projectName: 'chromium',
+        statusRef: {meansOpen: true},
+      },
+    };
+
+    it('does not sort references when no issue data', () => {
+      const stateNoReferences = wrapIssue(
+          {
+            projectName: 'project',
+            localId: 123,
+            blockedOnIssueRefs: [
+              {localId: 3, projectName: 'proj'},
+              {localId: 1, projectName: 'proj'},
+            ],
+          },
+          {relatedIssues: {}},
+      );
+      assert.deepEqual(issueV0.sortedBlockedOn(stateNoReferences), [
+        {localId: 3, projectName: 'proj'},
+        {localId: 1, projectName: 'proj'},
+      ]);
+    });
+
+    it('sorts open issues first when issue data available', () => {
+      const stateReferences = wrapIssue(
+          {
+            projectName: 'project',
+            localId: 123,
+            blockedOnIssueRefs: [
+              {localId: 3, projectName: 'proj'},
+              {localId: 1, projectName: 'proj'},
+            ],
+          },
+          {relatedIssues},
+      );
+      assert.deepEqual(issueV0.sortedBlockedOn(stateReferences), [
+        {localId: 1, projectName: 'proj', statusRef: {meansOpen: true}},
+        {localId: 3, projectName: 'proj', statusRef: {meansOpen: false}},
+      ]);
+    });
+
+    it('preserves original order on ties', () => {
+      const statePreservesArrayOrder = wrapIssue(
+          {
+            projectName: 'project',
+            localId: 123,
+            blockedOnIssueRefs: [
+              {localId: 5, projectName: 'proj'}, // Closed
+              {localId: 1, projectName: 'proj'}, // Open
+              {localId: 4, projectName: 'proj'}, // Closed
+              {localId: 3, projectName: 'proj'}, // Closed
+              {localId: 332, projectName: 'chromium'}, // Open
+            ],
+          },
+          {relatedIssues},
+      );
+      assert.deepEqual(issueV0.sortedBlockedOn(statePreservesArrayOrder),
+          [
+            {localId: 1, projectName: 'proj', statusRef: {meansOpen: true}},
+            {localId: 332, projectName: 'chromium',
+              statusRef: {meansOpen: true}},
+            {localId: 5, projectName: 'proj', statusRef: {meansOpen: false}},
+            {localId: 4, projectName: 'proj', statusRef: {meansOpen: false}},
+            {localId: 3, projectName: 'proj', statusRef: {meansOpen: false}},
+          ],
+      );
+    });
+  });
+
+  describe('mergedInto', () => {
+    it('empty', () => {
+      assert.deepEqual(issueV0.mergedInto(wrapIssue()), {});
+    });
+
+    it('gets mergedInto ref for viewed issue', () => {
+      const state = issueV0.mergedInto(wrapIssue({
+        projectName: 'project',
+        localId: 123,
+        mergedIntoIssueRef: {localId: 22, projectName: 'proj'},
+      }));
+      assert.deepEqual(state, {
+        localId: 22,
+        projectName: 'proj',
+      });
+    });
+
+    it('gets full mergedInto issue data when it exists in the store', () => {
+      const state = wrapIssue(
+          {
+            projectName: 'project',
+            localId: 123,
+            mergedIntoIssueRef: {localId: 22, projectName: 'proj'},
+          }, {
+            relatedIssues: {
+              ['proj:22']: {localId: 22, projectName: 'proj', summary: 'test'},
+            },
+          });
+      assert.deepEqual(issueV0.mergedInto(state), {
+        localId: 22,
+        projectName: 'proj',
+        summary: 'test',
+      });
+    });
+  });
+
+  it('fieldValueMap', () => {
+    assert.deepEqual(issueV0.fieldValueMap(wrapIssue()), new Map());
+    assert.deepEqual(issueV0.fieldValueMap(wrapIssue({
+      fieldValues: [],
+    })), new Map());
+    assert.deepEqual(issueV0.fieldValueMap(wrapIssue({
+      fieldValues: [
+        {fieldRef: {fieldName: 'hello'}, value: 'v3'},
+        {fieldRef: {fieldName: 'hello'}, value: 'v2'},
+        {fieldRef: {fieldName: 'world'}, value: 'v3'},
+      ],
+    })), new Map([
+      ['hello', ['v3', 'v2']],
+      ['world', ['v3']],
+    ]));
+  });
+
+  it('fieldDefs filters fields by applicable type', () => {
+    assert.deepEqual(issueV0.fieldDefs({
+      projectV0: {},
+      ...wrapIssue(),
+    }), []);
+
+    assert.deepEqual(issueV0.fieldDefs({
+      projectV0: {
+        name: 'chromium',
+        configs: {
+          chromium: {
+            fieldDefs: [
+              {fieldRef: {fieldName: 'intyInt', type: fieldTypes.INT_TYPE}},
+              {fieldRef: {fieldName: 'enum', type: fieldTypes.ENUM_TYPE}},
+              {
+                fieldRef:
+                  {fieldName: 'nonApplicable', type: fieldTypes.STR_TYPE},
+                applicableType: 'None',
+              },
+              {fieldRef: {fieldName: 'defectsOnly', type: fieldTypes.STR_TYPE},
+                applicableType: 'Defect'},
+            ],
+          },
+        },
+      },
+      ...wrapIssue({
+        fieldValues: [
+          {fieldRef: {fieldName: 'Type'}, value: 'Defect'},
+        ],
+      }),
+    }), [
+      {fieldRef: {fieldName: 'intyInt', type: fieldTypes.INT_TYPE}},
+      {fieldRef: {fieldName: 'enum', type: fieldTypes.ENUM_TYPE}},
+      {fieldRef: {fieldName: 'defectsOnly', type: fieldTypes.STR_TYPE},
+        applicableType: 'Defect'},
+    ]);
+  });
+
+  it('fieldDefs skips approval fields for all issues', () => {
+    assert.deepEqual(issueV0.fieldDefs({
+      projectV0: {
+        name: 'chromium',
+        configs: {
+          chromium: {
+            fieldDefs: [
+              {fieldRef: {fieldName: 'test', type: fieldTypes.INT_TYPE}},
+              {fieldRef:
+                {fieldName: 'ignoreMe', type: fieldTypes.APPROVAL_TYPE}},
+              {fieldRef:
+                {fieldName: 'LookAway', approvalName: 'ThisIsAnApproval'}},
+              {fieldRef: {fieldName: 'phaseField'}, isPhaseField: true},
+            ],
+          },
+        },
+      },
+      ...wrapIssue(),
+    }), [
+      {fieldRef: {fieldName: 'test', type: fieldTypes.INT_TYPE}},
+    ]);
+  });
+
+  it('fieldDefs includes non applicable fields when values defined', () => {
+    assert.deepEqual(issueV0.fieldDefs({
+      projectV0: {
+        name: 'chromium',
+        configs: {
+          chromium: {
+            fieldDefs: [
+              {
+                fieldRef:
+                  {fieldName: 'nonApplicable', type: fieldTypes.STR_TYPE},
+                applicableType: 'None',
+              },
+            ],
+          },
+        },
+      },
+      ...wrapIssue({
+        fieldValues: [
+          {fieldRef: {fieldName: 'nonApplicable'}, value: 'v3'},
+        ],
+      }),
+    }), [
+      {fieldRef: {fieldName: 'nonApplicable', type: fieldTypes.STR_TYPE},
+        applicableType: 'None'},
+    ]);
+  });
+
+  describe('action creators', () => {
+    beforeEach(() => {
+      prpcCall = sinon.stub(prpcClient, 'call');
+    });
+
+    afterEach(() => {
+      prpcCall.restore();
+    });
+
+    it('viewIssue creates action with issueRef', () => {
+      assert.deepEqual(
+          issueV0.viewIssue({projectName: 'proj', localId: 123}),
+          {
+            type: issueV0.VIEW_ISSUE,
+            issueRef: {projectName: 'proj', localId: 123},
+          },
+      );
+    });
+
+
+    describe('updateApproval', async () => {
+      const APPROVAL = {
+        fieldRef: {fieldName: 'Privacy', type: 'APPROVAL_TYPE'},
+        approverRefs: [{userId: 1234, displayName: 'test@example.com'}],
+        status: 'APPROVED',
+      };
+
+      it('approval update success', async () => {
+        const dispatch = sinon.stub();
+
+        prpcCall.returns({approval: APPROVAL});
+
+        const action = issueV0.updateApproval({
+          issueRef: {projectName: 'chromium', localId: 1234},
+          fieldRef: {fieldName: 'Privacy', type: 'APPROVAL_TYPE'},
+          approvalDelta: {status: 'APPROVED'},
+          sendEmail: true,
+        });
+
+        await action(dispatch);
+
+        sinon.assert.calledOnce(prpcCall);
+
+        sinon.assert.calledWith(prpcCall, 'monorail.Issues',
+            'UpdateApproval', {
+              issueRef: {projectName: 'chromium', localId: 1234},
+              fieldRef: {fieldName: 'Privacy', type: 'APPROVAL_TYPE'},
+              approvalDelta: {status: 'APPROVED'},
+              sendEmail: true,
+            });
+
+        sinon.assert.calledWith(dispatch, {type: 'UPDATE_APPROVAL_START'});
+        sinon.assert.calledWith(dispatch, {
+          type: 'UPDATE_APPROVAL_SUCCESS',
+          approval: APPROVAL,
+          issueRef: {projectName: 'chromium', localId: 1234},
+        });
+      });
+
+      it('approval survey update success', async () => {
+        const dispatch = sinon.stub();
+
+        prpcCall.returns({approval: APPROVAL});
+
+        const action = issueV0.updateApproval({
+          issueRef: {projectName: 'chromium', localId: 1234},
+          fieldRef: {fieldName: 'Privacy', type: 'APPROVAL_TYPE'},
+          commentContent: 'new survey',
+          sendEmail: false,
+          isDescription: true,
+        });
+
+        await action(dispatch);
+
+        sinon.assert.calledOnce(prpcCall);
+
+        sinon.assert.calledWith(prpcCall, 'monorail.Issues',
+            'UpdateApproval', {
+              issueRef: {projectName: 'chromium', localId: 1234},
+              fieldRef: {fieldName: 'Privacy', type: 'APPROVAL_TYPE'},
+              commentContent: 'new survey',
+              isDescription: true,
+            });
+
+        sinon.assert.calledWith(dispatch, {type: 'UPDATE_APPROVAL_START'});
+        sinon.assert.calledWith(dispatch, {
+          type: 'UPDATE_APPROVAL_SUCCESS',
+          approval: APPROVAL,
+          issueRef: {projectName: 'chromium', localId: 1234},
+        });
+      });
+
+      it('attachment upload success', async () => {
+        const dispatch = sinon.stub();
+
+        prpcCall.returns({approval: APPROVAL});
+
+        const action = issueV0.updateApproval({
+          issueRef: {projectName: 'chromium', localId: 1234},
+          fieldRef: {fieldName: 'Privacy', type: 'APPROVAL_TYPE'},
+          uploads: '78f17a020cbf39e90e344a842cd19911',
+        });
+
+        await action(dispatch);
+
+        sinon.assert.calledOnce(prpcCall);
+
+        sinon.assert.calledWith(prpcCall, 'monorail.Issues',
+            'UpdateApproval', {
+              issueRef: {projectName: 'chromium', localId: 1234},
+              fieldRef: {fieldName: 'Privacy', type: 'APPROVAL_TYPE'},
+              uploads: '78f17a020cbf39e90e344a842cd19911',
+            });
+
+        sinon.assert.calledWith(dispatch, {type: 'UPDATE_APPROVAL_START'});
+        sinon.assert.calledWith(dispatch, {
+          type: 'UPDATE_APPROVAL_SUCCESS',
+          approval: APPROVAL,
+          issueRef: {projectName: 'chromium', localId: 1234},
+        });
+      });
+    });
+
+    describe('fetchIssues', () => {
+      it('success', async () => {
+        const response = {
+          openRefs: [example.ISSUE],
+          closedRefs: [example.ISSUE_OTHER_PROJECT],
+        };
+        prpcClient.call.returns(Promise.resolve(response));
+        const dispatch = sinon.stub();
+
+        await issueV0.fetchIssues([example.ISSUE_REF])(dispatch);
+
+        sinon.assert.calledWith(dispatch, {type: issueV0.FETCH_ISSUES_START});
+
+        const args = {issueRefs: [example.ISSUE_REF]};
+        sinon.assert.calledWith(
+            prpcClient.call, 'monorail.Issues', 'ListReferencedIssues', args);
+
+        const action = {
+          type: issueV0.FETCH_ISSUES_SUCCESS,
+          issues: [example.ISSUE, example.ISSUE_OTHER_PROJECT],
+        };
+        sinon.assert.calledWith(dispatch, action);
+      });
+
+      it('failure', async () => {
+        prpcClient.call.throws();
+        const dispatch = sinon.stub();
+
+        await issueV0.fetchIssues([example.ISSUE_REF])(dispatch);
+
+        const action = {
+          type: issueV0.FETCH_ISSUES_FAILURE,
+          error: sinon.match.any,
+        };
+        sinon.assert.calledWith(dispatch, action);
+      });
+    });
+
+    it('fetchIssueList calls ListIssues', async () => {
+      prpcCall.callsFake(() => {
+        return {
+          issues: [{localId: 1}, {localId: 2}, {localId: 3}],
+          totalResults: 6,
+        };
+      });
+
+      store.dispatch(issueV0.fetchIssueList('chromium',
+          {q: 'owner:me', can: '4'}));
+
+      sinon.assert.calledWith(prpcCall, 'monorail.Issues', 'ListIssues', {
+        query: 'owner:me',
+        cannedQuery: 4,
+        projectNames: ['chromium'],
+        pagination: {},
+        groupBySpec: undefined,
+        sortSpec: undefined,
+      });
+    });
+
+    it('fetchIssueList does not set can when can is NaN', async () => {
+      prpcCall.callsFake(() => ({}));
+
+      store.dispatch(issueV0.fetchIssueList('chromium', {q: 'owner:me',
+        can: 'four-leaf-clover'}));
+
+      sinon.assert.calledWith(prpcCall, 'monorail.Issues', 'ListIssues', {
+        query: 'owner:me',
+        cannedQuery: undefined,
+        projectNames: ['chromium'],
+        pagination: {},
+        groupBySpec: undefined,
+        sortSpec: undefined,
+      });
+    });
+
+    it('fetchIssueList makes several calls to ListIssues', async () => {
+      prpcCall.callsFake(() => {
+        return {
+          issues: [{localId: 1}, {localId: 2}, {localId: 3}],
+          totalResults: 6,
+        };
+      });
+
+      const dispatch = sinon.stub();
+      const action = issueV0.fetchIssueList('chromium',
+          {maxItems: 3, maxCalls: 2});
+      await action(dispatch);
+
+      sinon.assert.calledTwice(prpcCall);
+      sinon.assert.calledWith(dispatch, {
+        type: 'FETCH_ISSUE_LIST_UPDATE',
+        issues:
+          [{localId: 1}, {localId: 2}, {localId: 3},
+            {localId: 1}, {localId: 2}, {localId: 3}],
+        progress: 1,
+        totalResults: 6,
+      });
+      sinon.assert.calledWith(dispatch, {type: 'FETCH_ISSUE_LIST_SUCCESS'});
+    });
+
+    it('fetchIssueList orders issues correctly', async () => {
+      prpcCall.onFirstCall().returns({issues: [{localId: 1}], totalResults: 6});
+      prpcCall.onSecondCall().returns({
+        issues: [{localId: 2}],
+        totalResults: 6});
+      prpcCall.onThirdCall().returns({issues: [{localId: 3}], totalResults: 6});
+
+      const dispatch = sinon.stub();
+      const action = issueV0.fetchIssueList('chromium',
+          {maxItems: 1, maxCalls: 3});
+      await action(dispatch);
+
+      sinon.assert.calledWith(dispatch, {
+        type: 'FETCH_ISSUE_LIST_UPDATE',
+        issues: [{localId: 1}, {localId: 2}, {localId: 3}],
+        progress: 1,
+        totalResults: 6,
+      });
+      sinon.assert.calledWith(dispatch, {type: 'FETCH_ISSUE_LIST_SUCCESS'});
+    });
+
+    it('returns progress of 1 when no totalIssues', async () => {
+      prpcCall.onFirstCall().returns({issues: [], totalResults: 0});
+
+      const dispatch = sinon.stub();
+      const action = issueV0.fetchIssueList('chromium',
+          {maxItems: 1, maxCalls: 1});
+      await action(dispatch);
+
+      sinon.assert.calledWith(dispatch, {
+        type: 'FETCH_ISSUE_LIST_UPDATE',
+        issues: [],
+        progress: 1,
+        totalResults: 0,
+      });
+      sinon.assert.calledWith(dispatch, {type: 'FETCH_ISSUE_LIST_SUCCESS'});
+    });
+
+    it('returns progress of 1 when totalIssues undefined', async () => {
+      prpcCall.onFirstCall().returns({issues: []});
+
+      const dispatch = sinon.stub();
+      const action = issueV0.fetchIssueList('chromium',
+          {maxItems: 1, maxCalls: 1});
+      await action(dispatch);
+
+      sinon.assert.calledWith(dispatch, {
+        type: 'FETCH_ISSUE_LIST_UPDATE',
+        issues: [],
+        progress: 1,
+      });
+      sinon.assert.calledWith(dispatch, {type: 'FETCH_ISSUE_LIST_SUCCESS'});
+    });
+
+    // TODO(kweng@) remove once crbug.com/monorail/6641 is fixed
+    it('has expected default for empty response', async () => {
+      prpcCall.onFirstCall().returns({});
+
+      const dispatch = sinon.stub();
+      const action = issueV0.fetchIssueList('chromium',
+          {maxItems: 1, maxCalls: 1});
+      await action(dispatch);
+
+      sinon.assert.calledWith(dispatch, {
+        type: 'FETCH_ISSUE_LIST_UPDATE',
+        issues: [],
+        progress: 1,
+        totalResults: 0,
+      });
+      sinon.assert.calledWith(dispatch, {type: 'FETCH_ISSUE_LIST_SUCCESS'});
+    });
+
+    describe('federated references', () => {
+      beforeEach(() => {
+        // Preload signinImpl with a fake for testing.
+        getSigninInstance({
+          init: sinon.stub(),
+          getUserProfileAsync: () => (
+            Promise.resolve({
+              getEmail: sinon.stub().returns('rutabaga@google.com'),
+            })
+          ),
+        });
+        window.CS_env = {gapi_client_id: 'rutabaga'};
+        const getStub = sinon.stub().returns({
+          execute: (cb) => cb(response),
+        });
+        const response = {
+          result: {
+            resolvedTime: 12345,
+            issueState: {
+              title: 'Rutabaga title',
+            },
+          },
+        };
+        window.gapi = {
+          client: {
+            load: (_url, _version, cb) => cb(),
+            corp_issuetracker: {issues: {get: getStub}},
+          },
+        };
+      });
+
+      afterEach(() => {
+        delete window.CS_env;
+        delete window.gapi;
+      });
+
+      describe('fetchFederatedReferences', () => {
+        it('returns an empty map if no fedrefs found', async () => {
+          const dispatch = sinon.stub();
+          const testIssue = {};
+          const action = issueV0.fetchFederatedReferences(testIssue);
+          const result = await action(dispatch);
+
+          assert.equal(dispatch.getCalls().length, 1);
+          sinon.assert.calledWith(dispatch, {
+            type: 'FETCH_FEDERATED_REFERENCES_START',
+          });
+          assert.isUndefined(result);
+        });
+
+        it('fetches from Buganizer API', async () => {
+          const dispatch = sinon.stub();
+          const testIssue = {
+            danglingBlockingRefs: [
+              {extIdentifier: 'b/123456'},
+            ],
+            danglingBlockedOnRefs: [
+              {extIdentifier: 'b/654321'},
+            ],
+            mergedIntoIssueRef: {
+              extIdentifier: 'b/987654',
+            },
+          };
+          const action = issueV0.fetchFederatedReferences(testIssue);
+          await action(dispatch);
+
+          sinon.assert.calledWith(dispatch, {
+            type: 'FETCH_FEDERATED_REFERENCES_START',
+          });
+          sinon.assert.calledWith(dispatch, {
+            type: 'GAPI_LOGIN_SUCCESS',
+            email: 'rutabaga@google.com',
+          });
+          sinon.assert.calledWith(dispatch, {
+            type: 'FETCH_FEDERATED_REFERENCES_SUCCESS',
+            fedRefIssueRefs: [
+              {
+                extIdentifier: 'b/123456',
+                statusRef: {meansOpen: false},
+                summary: 'Rutabaga title',
+              },
+              {
+                extIdentifier: 'b/654321',
+                statusRef: {meansOpen: false},
+                summary: 'Rutabaga title',
+              },
+              {
+                extIdentifier: 'b/987654',
+                statusRef: {meansOpen: false},
+                summary: 'Rutabaga title',
+              },
+            ],
+          });
+        });
+      });
+
+      describe('fetchRelatedIssues', () => {
+        it('calls fetchFederatedReferences for mergedinto', async () => {
+          const dispatch = sinon.stub();
+          prpcCall.returns(Promise.resolve({openRefs: [], closedRefs: []}));
+          const testIssue = {
+            mergedIntoIssueRef: {
+              extIdentifier: 'b/987654',
+            },
+          };
+          const action = issueV0.fetchRelatedIssues(testIssue);
+          await action(dispatch);
+
+          // Important: mergedinto fedref is not passed to ListReferencedIssues.
+          const expectedMessage = {issueRefs: []};
+          sinon.assert.calledWith(prpcClient.call, 'monorail.Issues',
+              'ListReferencedIssues', expectedMessage);
+
+          sinon.assert.calledWith(dispatch, {
+            type: 'FETCH_RELATED_ISSUES_START',
+          });
+          // No mergedInto refs returned, they're handled by
+          // fetchFederatedReferences.
+          sinon.assert.calledWith(dispatch, {
+            type: 'FETCH_RELATED_ISSUES_SUCCESS',
+            relatedIssues: {},
+          });
+        });
+      });
+    });
+  });
+
+  describe('starring issues', () => {
+    describe('reducers', () => {
+      it('FETCH_IS_STARRED_SUCCESS updates the starredIssues object', () => {
+        const state = {};
+        const newState = issueV0.starredIssuesReducer(state,
+            {
+              type: issueV0.FETCH_IS_STARRED_SUCCESS,
+              starred: false,
+              issueRef: {
+                projectName: 'proj',
+                localId: 1,
+              },
+            },
+        );
+        assert.deepEqual(newState, {'proj:1': false});
+      });
+
+      it('FETCH_ISSUES_STARRED_SUCCESS updates the starredIssues object',
+          () => {
+            const state = {};
+            const starredIssueRefs = [{projectName: 'proj', localId: 1},
+              {projectName: 'proj', localId: 2}];
+            const newState = issueV0.starredIssuesReducer(state,
+                {type: issueV0.FETCH_ISSUES_STARRED_SUCCESS, starredIssueRefs},
+            );
+            assert.deepEqual(newState, {'proj:1': true, 'proj:2': true});
+          });
+
+      it('FETCH_ISSUES_STARRED_SUCCESS does not time out with 10,000 stars',
+          () => {
+            const state = {};
+            const starredIssueRefs = [];
+            const expected = {};
+            for (let i = 1; i <= 10000; i++) {
+              starredIssueRefs.push({projectName: 'proj', localId: i});
+              expected[`proj:${i}`] = true;
+            }
+            const newState = issueV0.starredIssuesReducer(state,
+                {type: issueV0.FETCH_ISSUES_STARRED_SUCCESS, starredIssueRefs},
+            );
+            assert.deepEqual(newState, expected);
+          });
+
+      it('STAR_SUCCESS updates the starredIssues object', () => {
+        const state = {'proj:1': true, 'proj:2': false};
+        const newState = issueV0.starredIssuesReducer(state,
+            {
+              type: issueV0.STAR_SUCCESS,
+              starred: true,
+              issueRef: {projectName: 'proj', localId: 2},
+            });
+        assert.deepEqual(newState, {'proj:1': true, 'proj:2': true});
+      });
+    });
+
+    describe('selectors', () => {
+      describe('issue', () => {
+        const selector = issueV0.issue(wrapIssue(example.ISSUE));
+        assert.deepEqual(selector(example.NAME), example.ISSUE);
+      });
+
+      describe('issueForRefString', () => {
+        const noIssues = issueV0.issueForRefString(wrapIssue({}));
+        const withIssue = issueV0.issueForRefString(wrapIssue({
+          projectName: 'test',
+          localId: 1,
+          summary: 'hello world',
+        }));
+
+        it('returns issue ref when no issue data', () => {
+          assert.deepEqual(noIssues('1', 'chromium'), {
+            localId: 1,
+            projectName: 'chromium',
+          });
+
+          assert.deepEqual(noIssues('chromium:2', 'ignore'), {
+            localId: 2,
+            projectName: 'chromium',
+          });
+
+          assert.deepEqual(noIssues('other:3'), {
+            localId: 3,
+            projectName: 'other',
+          });
+
+          assert.deepEqual(withIssue('other:3'), {
+            localId: 3,
+            projectName: 'other',
+          });
+        });
+
+        it('returns full issue data when available', () => {
+          assert.deepEqual(withIssue('1', 'test'), {
+            projectName: 'test',
+            localId: 1,
+            summary: 'hello world',
+          });
+
+          assert.deepEqual(withIssue('test:1', 'other'), {
+            projectName: 'test',
+            localId: 1,
+            summary: 'hello world',
+          });
+
+          assert.deepEqual(withIssue('test:1'), {
+            projectName: 'test',
+            localId: 1,
+            summary: 'hello world',
+          });
+        });
+      });
+
+      it('starredIssues', () => {
+        const state = {issue:
+          {starredIssues: {'proj:1': true, 'proj:2': false}}};
+        assert.deepEqual(issueV0.starredIssues(state), new Set(['proj:1']));
+      });
+
+      it('starringIssues', () => {
+        const state = {issue: {
+          requests: {
+            starringIssues: {
+              'proj:1': {requesting: true},
+              'proj:2': {requestin: false, error: 'unknown error'},
+            },
+          },
+        }};
+        assert.deepEqual(issueV0.starringIssues(state), new Map([
+          ['proj:1', {requesting: true}],
+          ['proj:2', {requestin: false, error: 'unknown error'}],
+        ]));
+      });
+    });
+
+    describe('action creators', () => {
+      beforeEach(() => {
+        prpcCall = sinon.stub(prpcClient, 'call');
+
+        dispatch = sinon.stub();
+      });
+
+      afterEach(() => {
+        prpcCall.restore();
+      });
+
+      it('fetching if an issue is starred', async () => {
+        const issueRef = {projectName: 'proj', localId: 1};
+        const action = issueV0.fetchIsStarred(issueRef);
+
+        prpcCall.returns(Promise.resolve({isStarred: true}));
+
+        await action(dispatch);
+
+        sinon.assert.calledWith(dispatch,
+            {type: issueV0.FETCH_IS_STARRED_START});
+
+        sinon.assert.calledWith(
+            prpcClient.call, 'monorail.Issues',
+            'IsIssueStarred', {issueRef},
+        );
+
+        sinon.assert.calledWith(dispatch, {
+          type: issueV0.FETCH_IS_STARRED_SUCCESS,
+          starred: true,
+          issueRef,
+        });
+      });
+
+      it('fetching starred issues', async () => {
+        const returnedIssueRef = {projectName: 'proj', localId: 1};
+        const starredIssueRefs = [returnedIssueRef];
+        const action = issueV0.fetchStarredIssues();
+
+        prpcCall.returns(Promise.resolve({starredIssueRefs}));
+
+        await action(dispatch);
+
+        sinon.assert.calledWith(dispatch, {type: 'FETCH_ISSUES_STARRED_START'});
+
+        sinon.assert.calledWith(
+            prpcClient.call, 'monorail.Issues',
+            'ListStarredIssues', {},
+        );
+
+        sinon.assert.calledWith(dispatch, {
+          type: issueV0.FETCH_ISSUES_STARRED_SUCCESS,
+          starredIssueRefs,
+        });
+      });
+
+      it('star', async () => {
+        const testIssue = {projectName: 'proj', localId: 1, starCount: 1};
+        const issueRef = issueToIssueRef(testIssue);
+        const action = issueV0.star(issueRef, false);
+
+        prpcCall.returns(Promise.resolve(testIssue));
+
+        await action(dispatch);
+
+        sinon.assert.calledWith(dispatch, {
+          type: issueV0.STAR_START,
+          requestKey: 'proj:1',
+        });
+
+        sinon.assert.calledWith(
+            prpcClient.call,
+            'monorail.Issues', 'StarIssue',
+            {issueRef, starred: false},
+        );
+
+        sinon.assert.calledWith(dispatch, {
+          type: issueV0.STAR_SUCCESS,
+          starCount: 1,
+          issueRef,
+          starred: false,
+          requestKey: 'proj:1',
+        });
+      });
+    });
+  });
+});
+
+/**
+ * Return an initial Redux state with a given viewed
+ * @param {Issue=} viewedIssue The viewed issue.
+ * @param {Object=} otherValues Any other state values that need
+ *   to be initialized.
+ * @return {Object}
+ */
+function wrapIssue(viewedIssue, otherValues = {}) {
+  if (!viewedIssue) {
+    return {
+      issue: {
+        issuesByRefString: {},
+        ...otherValues,
+      },
+    };
+  }
+
+  const ref = issueRefToString(viewedIssue);
+  return {
+    issue: {
+      viewedIssueRef: ref,
+      issuesByRefString: {
+        [ref]: {...viewedIssue},
+      },
+      ...otherValues,
+    },
+  };
+}
diff --git a/static_src/reducers/permissions.js b/static_src/reducers/permissions.js
new file mode 100644
index 0000000..2f0101b
--- /dev/null
+++ b/static_src/reducers/permissions.js
@@ -0,0 +1,118 @@
+// Copyright 2020 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.
+
+/**
+ * @fileoverview Permissions actions, selectors, and reducers organized into
+ * a single Redux "Duck" that manages updating and retrieving permissions state
+ * on the frontend.
+ *
+ * The Permissions data is stored in a normalized format.
+ * `permissions` stores all PermissionSets[] indexed by resource name.
+ *
+ * Reference: https://github.com/erikras/ducks-modular-redux
+ */
+
+import {combineReducers} from 'redux';
+import {createReducer, createRequestReducer} from './redux-helpers.js';
+
+import {prpcClient} from 'prpc-client-instance.js';
+
+import 'shared/typedef.js';
+
+/** @typedef {import('redux').AnyAction} AnyAction */
+
+// Permissions
+
+// Field Permissions
+export const FIELD_DEF_EDIT = 'FIELD_DEF_EDIT';
+export const FIELD_DEF_VALUE_EDIT = 'FIELD_DEF_VALUE_EDIT';
+
+// Actions
+export const BATCH_GET_START = 'permissions/BATCH_GET_START';
+export const BATCH_GET_SUCCESS = 'permissions/BATCH_GET_SUCCESS';
+export const BATCH_GET_FAILURE = 'permissions/BATCH_GET_FAILURE';
+
+/* State Shape
+{
+  byName: Object<string, PermissionSet>,
+
+  requests: {
+    batchGet: ReduxRequestState,
+  },
+}
+*/
+
+// Reducers
+
+/**
+ * All PermissionSets indexed by resource name.
+ * @param {Object<string, PermissionSet>} state The existing items.
+ * @param {AnyAction} action
+ * @param {Array<PermissionSet>} action.permissionSets
+ * @return {Object<string, PermissionSet>}
+ */
+export const byNameReducer = createReducer({}, {
+  [BATCH_GET_SUCCESS]: (state, {permissionSets}) => {
+    const newState = {...state};
+    for (const permissionSet of permissionSets) {
+      newState[permissionSet.resource] = permissionSet;
+    }
+    return newState;
+  },
+});
+
+const requestsReducer = combineReducers({
+  batchGet: createRequestReducer(
+      BATCH_GET_START, BATCH_GET_SUCCESS, BATCH_GET_FAILURE),
+});
+
+export const reducer = combineReducers({
+  byName: byNameReducer,
+
+  requests: requestsReducer,
+});
+
+// Selectors
+
+/**
+ * Returns all the PermissionSets in the store as a mapping.
+ * @param {any} state
+ * @return {Object<string, PermissionSet>}
+ */
+export const byName = (state) => state.permissions.byName;
+
+/**
+ * Returns the Permissions requests.
+ * @param {any} state
+ * @return {Object<string, ReduxRequestState>}
+ */
+export const requests = (state) => state.permissions.requests;
+
+// Action Creators
+
+/**
+ * Action creator to fetch PermissionSets.
+ * @param {Array<string>} names The resource names to get.
+ * @return {function(function): Promise<Array<PermissionSet>>}
+ */
+export const batchGet = (names) => async (dispatch) => {
+  dispatch({type: BATCH_GET_START});
+
+  try {
+    /** @type {{permissionSets: Array<PermissionSet>}} */
+    const {permissionSets} = await prpcClient.call(
+        'monorail.v3.Permissions', 'BatchGetPermissionSets', {names});
+
+    for (const permissionSet of permissionSets) {
+      if (!permissionSet.permissions) {
+        permissionSet.permissions = [];
+      }
+    }
+    dispatch({type: BATCH_GET_SUCCESS, permissionSets});
+
+    return permissionSets;
+  } catch (error) {
+    dispatch({type: BATCH_GET_FAILURE, error});
+  };
+};
diff --git a/static_src/reducers/permissions.test.js b/static_src/reducers/permissions.test.js
new file mode 100644
index 0000000..3c29076
--- /dev/null
+++ b/static_src/reducers/permissions.test.js
@@ -0,0 +1,105 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import * as permissions from './permissions.js';
+import * as example from 'shared/test/constants-permissions.js';
+import * as exampleIssues from 'shared/test/constants-issueV0.js';
+
+import {prpcClient} from 'prpc-client-instance.js';
+
+let dispatch;
+
+describe('permissions reducers', () => {
+  it('root reducer initial state', () => {
+    const actual = permissions.reducer(undefined, {type: null});
+    const expected = {
+      byName: {},
+      requests: {
+        batchGet: {error: null, requesting: false},
+      },
+    };
+    assert.deepEqual(actual, expected);
+  });
+
+  it('byName updates on BATCH_GET_SUCCESS', () => {
+    const action = {
+      type: permissions.BATCH_GET_SUCCESS,
+      permissionSets: [example.PERMISSION_SET_ISSUE],
+    };
+    const actual = permissions.byNameReducer({}, action);
+    const expected = {
+      [example.PERMISSION_SET_ISSUE.resource]: example.PERMISSION_SET_ISSUE,
+    };
+    assert.deepEqual(actual, expected);
+  });
+});
+
+describe('permissions selectors', () => {
+  it('byName', () => {
+    const state = {permissions: {byName: example.BY_NAME}};
+    const actual = permissions.byName(state);
+    assert.deepEqual(actual, example.BY_NAME);
+  });
+});
+
+describe('permissions action creators', () => {
+  beforeEach(() => {
+    sinon.stub(prpcClient, 'call');
+    dispatch = sinon.stub();
+  });
+
+  afterEach(() => {
+    prpcClient.call.restore();
+  });
+
+  describe('batchGet', () => {
+    it('success', async () => {
+      const response = {permissionSets: [example.PERMISSION_SET_ISSUE]};
+      prpcClient.call.returns(Promise.resolve(response));
+
+      await permissions.batchGet([exampleIssues.NAME])(dispatch);
+
+      sinon.assert.calledWith(dispatch, {type: permissions.BATCH_GET_START});
+
+      const args = {names: [exampleIssues.NAME]};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Permissions',
+          'BatchGetPermissionSets', args);
+
+      const action = {
+        type: permissions.BATCH_GET_SUCCESS,
+        permissionSets: [example.PERMISSION_SET_ISSUE],
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      await permissions.batchGet([exampleIssues.NAME])(dispatch);
+
+      const action = {
+        type: permissions.BATCH_GET_FAILURE,
+        error: sinon.match.any,
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+
+    it('fills in permissions field', async () => {
+      const response = {permissionSets: [{resource: exampleIssues.NAME}]};
+      prpcClient.call.returns(Promise.resolve(response));
+
+      await permissions.batchGet([exampleIssues.NAME])(dispatch);
+
+      const action = {
+        type: permissions.BATCH_GET_SUCCESS,
+        permissionSets: [{resource: exampleIssues.NAME, permissions: []}],
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+});
diff --git a/static_src/reducers/projectV0.js b/static_src/reducers/projectV0.js
new file mode 100644
index 0000000..5101ff8
--- /dev/null
+++ b/static_src/reducers/projectV0.js
@@ -0,0 +1,586 @@
+// Copyright 2019 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.
+
+import {combineReducers} from 'redux';
+import {createSelector} from 'reselect';
+import {createReducer, createRequestReducer} from './redux-helpers.js';
+import * as permissions from 'reducers/permissions.js';
+import {fieldTypes, SITEWIDE_DEFAULT_COLUMNS, defaultIssueFieldMap,
+  parseColSpec, stringValuesForIssueField} from 'shared/issue-fields.js';
+import {hasPrefix, removePrefix} from 'shared/helpers.js';
+import {fieldNameToLabelPrefix,
+  labelNameToLabelPrefixes, labelNameToLabelValue, fieldDefToName,
+  restrictionLabelsForPermissions} from 'shared/convertersV0.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import 'shared/typedef.js';
+
+/** @typedef {import('redux').AnyAction} AnyAction */
+
+// Actions
+export const SELECT = 'projectV0/SELECT';
+
+const FETCH_CONFIG_START = 'projectV0/FETCH_CONFIG_START';
+export const FETCH_CONFIG_SUCCESS = 'projectV0/FETCH_CONFIG_SUCCESS';
+const FETCH_CONFIG_FAILURE = 'projectV0/FETCH_CONFIG_FAILURE';
+
+export const FETCH_PRESENTATION_CONFIG_START =
+  'projectV0/FETCH_PRESENTATION_CONFIG_START';
+export const FETCH_PRESENTATION_CONFIG_SUCCESS =
+  'projectV0/FETCH_PRESENTATION_CONFIG_SUCCESS';
+export const FETCH_PRESENTATION_CONFIG_FAILURE =
+  'projectV0/FETCH_PRESENTATION_CONFIG_FAILURE';
+
+export const FETCH_CUSTOM_PERMISSIONS_START =
+  'projectV0/FETCH_CUSTOM_PERMISSIONS_START';
+export const FETCH_CUSTOM_PERMISSIONS_SUCCESS =
+  'projectV0/FETCH_CUSTOM_PERMISSIONS_SUCCESS';
+export const FETCH_CUSTOM_PERMISSIONS_FAILURE =
+  'projectV0/FETCH_CUSTOM_PERMISSIONS_FAILURE';
+
+
+export const FETCH_VISIBLE_MEMBERS_START =
+  'projectV0/FETCH_VISIBLE_MEMBERS_START';
+export const FETCH_VISIBLE_MEMBERS_SUCCESS =
+  'projectV0/FETCH_VISIBLE_MEMBERS_SUCCESS';
+export const FETCH_VISIBLE_MEMBERS_FAILURE =
+  'projectV0/FETCH_VISIBLE_MEMBERS_FAILURE';
+
+const FETCH_TEMPLATES_START = 'projectV0/FETCH_TEMPLATES_START';
+export const FETCH_TEMPLATES_SUCCESS = 'projectV0/FETCH_TEMPLATES_SUCCESS';
+const FETCH_TEMPLATES_FAILURE = 'projectV0/FETCH_TEMPLATES_FAILURE';
+
+/* State Shape
+{
+  name: string,
+
+  configs: Object<string, Config>,
+  presentationConfigs: Object<string, PresentationConfig>,
+  customPermissions: Object<string, Array<string>>,
+  visibleMembers:
+      Object<string, {userRefs: Array<UserRef>, groupRefs: Array<UserRef>}>,
+  templates: Object<string, Array<TemplateDef>>,
+  presentationConfigsLoaded: Object<string, boolean>,
+
+  requests: {
+    fetchConfig: ReduxRequestState,
+    fetchMembers: ReduxRequestState
+    fetchCustomPermissions: ReduxRequestState,
+    fetchPresentationConfig: ReduxRequestState,
+    fetchTemplates: ReduxRequestState,
+  },
+}
+*/
+
+// Reducers
+export const nameReducer = createReducer(null, {
+  [SELECT]: (_state, {projectName}) => projectName,
+});
+
+export const configsReducer = createReducer({}, {
+  [FETCH_CONFIG_SUCCESS]: (state, {projectName, config}) => ({
+    ...state,
+    [projectName]: config,
+  }),
+});
+
+export const presentationConfigsReducer = createReducer({}, {
+  [FETCH_PRESENTATION_CONFIG_SUCCESS]:
+    (state, {projectName, presentationConfig}) => ({
+      ...state,
+      [projectName]: presentationConfig,
+    }),
+});
+
+/**
+ * Adds custom permissions to Redux in a normalized state.
+ * @param {Object<string, Array<String>>} state Redux state.
+ * @param {AnyAction} Action
+ * @return {Object<string, Array<String>>}
+ */
+export const customPermissionsReducer = createReducer({}, {
+  [FETCH_CUSTOM_PERMISSIONS_SUCCESS]:
+    (state, {projectName, permissions}) => ({
+      ...state,
+      [projectName]: permissions,
+    }),
+});
+
+export const visibleMembersReducer = createReducer({}, {
+  [FETCH_VISIBLE_MEMBERS_SUCCESS]: (state, {projectName, visibleMembers}) => ({
+    ...state,
+    [projectName]: visibleMembers,
+  }),
+});
+
+export const templatesReducer = createReducer({}, {
+  [FETCH_TEMPLATES_SUCCESS]: (state, {projectName, templates}) => ({
+    ...state,
+    [projectName]: templates,
+  }),
+});
+
+const requestsReducer = combineReducers({
+  fetchConfig: createRequestReducer(
+      FETCH_CONFIG_START, FETCH_CONFIG_SUCCESS, FETCH_CONFIG_FAILURE),
+  fetchMembers: createRequestReducer(
+      FETCH_VISIBLE_MEMBERS_START,
+      FETCH_VISIBLE_MEMBERS_SUCCESS,
+      FETCH_VISIBLE_MEMBERS_FAILURE),
+  fetchCustomPermissions: createRequestReducer(
+      FETCH_CUSTOM_PERMISSIONS_START,
+      FETCH_CUSTOM_PERMISSIONS_SUCCESS,
+      FETCH_CUSTOM_PERMISSIONS_FAILURE),
+  fetchPresentationConfig: createRequestReducer(
+      FETCH_PRESENTATION_CONFIG_START,
+      FETCH_PRESENTATION_CONFIG_SUCCESS,
+      FETCH_PRESENTATION_CONFIG_FAILURE),
+  fetchTemplates: createRequestReducer(
+      FETCH_TEMPLATES_START, FETCH_TEMPLATES_SUCCESS, FETCH_TEMPLATES_FAILURE),
+});
+
+export const reducer = combineReducers({
+  name: nameReducer,
+  configs: configsReducer,
+  customPermissions: customPermissionsReducer,
+  presentationConfigs: presentationConfigsReducer,
+  visibleMembers: visibleMembersReducer,
+  templates: templatesReducer,
+  requests: requestsReducer,
+});
+
+// Selectors
+export const project = (state) => state.projectV0 || {};
+
+export const viewedProjectName =
+  createSelector(project, (project) => project.name || null);
+
+export const configs =
+  createSelector(project, (project) => project.configs || {});
+export const presentationConfigs =
+  createSelector(project, (project) => project.presentationConfigs || {});
+export const customPermissions =
+  createSelector(project, (project) => project.customPermissions || {});
+export const visibleMembers =
+  createSelector(project, (project) => project.visibleMembers || {});
+export const templates =
+  createSelector(project, (project) => project.templates || {});
+
+export const viewedConfig = createSelector(
+    [viewedProjectName, configs],
+    (projectName, configs) => configs[projectName] || {});
+export const viewedPresentationConfig = createSelector(
+    [viewedProjectName, presentationConfigs],
+    (projectName, configs) => configs[projectName] || {});
+
+// TODO(crbug.com/monorail/7080): Come up with a more clear and
+// consistent pattern for determining when data is loaded.
+export const viewedPresentationConfigLoaded = createSelector(
+    [viewedProjectName, presentationConfigs],
+    (projectName, configs) => !!configs[projectName]);
+export const viewedCustomPermissions = createSelector(
+    [viewedProjectName, customPermissions],
+    (projectName, permissions) => permissions[projectName] || []);
+export const viewedVisibleMembers = createSelector(
+    [viewedProjectName, visibleMembers],
+    (projectName, visibleMembers) => visibleMembers[projectName] || {});
+export const viewedTemplates = createSelector(
+    [viewedProjectName, templates],
+    (projectName, templates) => templates[projectName] || []);
+
+/**
+ * Get the default columns for the currently viewed project.
+ */
+export const defaultColumns = createSelector(viewedPresentationConfig,
+    ({defaultColSpec}) =>{
+      if (defaultColSpec) {
+        return parseColSpec(defaultColSpec);
+      }
+      return SITEWIDE_DEFAULT_COLUMNS;
+    });
+
+
+/**
+ * Get the default query for the currently viewed project.
+ */
+export const defaultQuery = createSelector(viewedPresentationConfig,
+    (config) => config.defaultQuery || '');
+
+// Look up components by path.
+export const componentsMap = createSelector(
+    viewedConfig,
+    (config) => {
+      if (!config || !config.componentDefs) return new Map();
+      const acc = new Map();
+      for (const v of config.componentDefs) {
+        acc.set(v.path, v);
+      }
+      return acc;
+    },
+);
+
+export const fieldDefs = createSelector(
+    viewedConfig, (config) => ((config && config.fieldDefs) || []),
+);
+
+export const fieldDefMap = createSelector(
+    fieldDefs, (fieldDefs) => {
+      const map = new Map();
+      fieldDefs.forEach((fd) => {
+        map.set(fd.fieldRef.fieldName.toLowerCase(), fd);
+      });
+      return map;
+    },
+);
+
+export const labelDefs = createSelector(
+    [viewedConfig, viewedCustomPermissions],
+    (config, permissions) => [
+      ...((config && config.labelDefs) || []),
+      ...restrictionLabelsForPermissions(permissions),
+    ],
+);
+
+// labelDefs stored in an easily findable format with label names as keys.
+export const labelDefMap = createSelector(
+    labelDefs, (labelDefs) => {
+      const map = new Map();
+      labelDefs.forEach((ld) => {
+        map.set(ld.label.toLowerCase(), ld);
+      });
+      return map;
+    },
+);
+
+/**
+ * A selector that builds a map where keys are label prefixes
+ * and values equal to sets of possible values corresponding to the prefix
+ * @param {Object} state Current Redux state.
+ * @return {Map}
+ */
+export const labelPrefixValueMap = createSelector(labelDefs, (labelDefs) => {
+  const prefixMap = new Map();
+  labelDefs.forEach((ld) => {
+    const prefixes = labelNameToLabelPrefixes(ld.label);
+
+    prefixes.forEach((prefix) => {
+      if (prefixMap.has(prefix)) {
+        prefixMap.get(prefix).add(labelNameToLabelValue(ld.label, prefix));
+      } else {
+        prefixMap.set(prefix, new Set(
+            [labelNameToLabelValue(ld.label, prefix)]));
+      }
+    });
+  });
+
+  return prefixMap;
+});
+
+/**
+ * A selector that builds an array of label prefixes, keeping casing intact
+ * Some labels are implicitly used as custom fields in the grid and list view.
+ * Only labels with more than one option are included, to reduce noise.
+ * @param {Object} state Current Redux state.
+ * @return {Array}
+ */
+export const labelPrefixFields = createSelector(
+    labelPrefixValueMap, (map) => {
+      const prefixes = [];
+
+      map.forEach((options, prefix) => {
+      // Ignore label prefixes with only one value.
+        if (options.size > 1) {
+          prefixes.push(prefix);
+        }
+      });
+
+      return prefixes;
+    },
+);
+
+/**
+ * A selector that wraps labelPrefixFields arrays as set for fast lookup.
+ * @param {Object} state Current Redux state.
+ * @return {Set}
+ */
+export const labelPrefixSet = createSelector(
+    labelPrefixFields, (fields) => new Set(fields.map(
+        (field) => field.toLowerCase())),
+);
+
+export const enumFieldDefs = createSelector(
+    fieldDefs,
+    (fieldDefs) => {
+      return fieldDefs.filter(
+          (fd) => fd.fieldRef.type === fieldTypes.ENUM_TYPE);
+    },
+);
+
+/**
+ * A selector that builds a function that's used to compute the value of
+ * a given field name on a given issue. This function abstracts the difference
+ * between custom fields, built-in fields, and implicit fields created
+ * from labels and considers these values in the context of the current
+ * project configuration.
+ * @param {Object} state Current Redux state.
+ * @return {function(Issue, string): Array<string>} A function that processes a
+ *   given issue and field name to find the string value for that field, in
+ *   the issue.
+ */
+export const extractFieldValuesFromIssue = createSelector(
+    viewedProjectName,
+    (projectName) => (issue, fieldName) =>
+      stringValuesForIssueField(issue, fieldName, projectName),
+);
+
+/**
+ * A selector that builds a function that's used to compute the type of a given
+ * field name.
+ * @param {Object} state Current Redux state.
+ * @return {function(string): string}
+ */
+export const extractTypeForFieldName = createSelector(fieldDefMap,
+    (fieldDefMap) => {
+      return (fieldName) => {
+        const key = fieldName.toLowerCase();
+
+        // If the field is a built in field. Default fields have precedence
+        // over custom fields.
+        if (defaultIssueFieldMap.hasOwnProperty(key)) {
+          return defaultIssueFieldMap[key].type;
+        }
+
+        // If the field is a custom field. Custom fields have precedence
+        // over label prefixes.
+        if (fieldDefMap.has(key)) {
+          return fieldDefMap.get(key).fieldRef.type;
+        }
+
+        // Default to STR_TYPE, including for label fields.
+        return fieldTypes.STR_TYPE;
+      };
+    },
+);
+
+export const optionsPerEnumField = createSelector(
+    enumFieldDefs,
+    labelDefs,
+    (fieldDefs, labelDefs) => {
+      const map = new Map(fieldDefs.map(
+          (fd) => [fd.fieldRef.fieldName.toLowerCase(), []]));
+      labelDefs.forEach((ld) => {
+        const labelName = ld.label;
+
+        const fd = fieldDefs.find((fd) => hasPrefix(
+            labelName, fieldNameToLabelPrefix(fd.fieldRef.fieldName)));
+        if (fd) {
+          const key = fd.fieldRef.fieldName.toLowerCase();
+          map.get(key).push({
+            ...ld,
+            optionName: removePrefix(labelName,
+                fieldNameToLabelPrefix(fd.fieldRef.fieldName)),
+          });
+        }
+      });
+      return map;
+    },
+);
+
+export const fieldDefsForPhases = createSelector(
+    fieldDefs,
+    (fieldDefs) => {
+      if (!fieldDefs) return [];
+      return fieldDefs.filter((f) => f.isPhaseField);
+    },
+);
+
+export const fieldDefsByApprovalName = createSelector(
+    fieldDefs,
+    (fieldDefs) => {
+      if (!fieldDefs) return new Map();
+      const acc = new Map();
+      for (const fd of fieldDefs) {
+        if (fd.fieldRef && fd.fieldRef.approvalName) {
+          if (acc.has(fd.fieldRef.approvalName)) {
+            acc.get(fd.fieldRef.approvalName).push(fd);
+          } else {
+            acc.set(fd.fieldRef.approvalName, [fd]);
+          }
+        }
+      }
+      return acc;
+    },
+);
+
+export const fetchingConfig = (state) => {
+  return state.projectV0.requests.fetchConfig.requesting;
+};
+
+/**
+ * Shorthand method for detecting whether we are currently
+ * fetching presentationConcifg
+ * @param {Object} state Current Redux state.
+ * @return {boolean}
+ */
+export const fetchingPresentationConfig = (state) => {
+  return state.projectV0.requests.fetchPresentationConfig.requesting;
+};
+
+// Action Creators
+/**
+ * Action creator to set the currently viewed Project.
+ * @param {string} projectName The name of the Project to select.
+ * @return {function(function): Promise<void>}
+ */
+export const select = (projectName) => {
+  return (dispatch) => dispatch({type: SELECT, projectName});
+};
+
+/**
+ * Fetches data required to view project.
+ * @param {string} projectName
+ * @return {function(function): Promise<void>}
+ */
+export const fetch = (projectName) => async (dispatch) => {
+  const configPromise = dispatch(fetchConfig(projectName));
+  const visibleMembersPromise = dispatch(fetchVisibleMembers(projectName));
+
+  dispatch(fetchPresentationConfig(projectName));
+  dispatch(fetchTemplates(projectName));
+
+  const customPermissionsPromise = dispatch(
+      fetchCustomPermissions(projectName));
+
+  // TODO(crbug.com/monorail/5828): Remove window.TKR_populateAutocomplete once
+  // the old autocomplete code is deprecated.
+  const [config, visibleMembers, customPermissions] = await Promise.all([
+    configPromise,
+    visibleMembersPromise,
+    customPermissionsPromise]);
+  config.labelDefs = [...config.labelDefs,
+    ...restrictionLabelsForPermissions(customPermissions)];
+  dispatch(fetchFieldPerms(config.projectName, config.fieldDefs));
+  // eslint-disable-next-line new-cap
+  window.TKR_populateAutocomplete(config, visibleMembers, customPermissions);
+};
+
+/**
+ * Fetches project configuration including things like the custom fields in a
+ * project, the statuses, etc.
+ * @param {string} projectName
+ * @return {function(function): Promise<Config>}
+ */
+const fetchConfig = (projectName) => async (dispatch) => {
+  dispatch({type: FETCH_CONFIG_START});
+
+  const getConfig = prpcClient.call(
+      'monorail.Projects', 'GetConfig', {projectName});
+
+  try {
+    const config = await getConfig;
+    dispatch({type: FETCH_CONFIG_SUCCESS, projectName, config});
+    return config;
+  } catch (error) {
+    dispatch({type: FETCH_CONFIG_FAILURE, error});
+  }
+};
+
+export const fetchPresentationConfig = (projectName) => async (dispatch) => {
+  dispatch({type: FETCH_PRESENTATION_CONFIG_START});
+
+  try {
+    const presentationConfig = await prpcClient.call(
+        'monorail.Projects', 'GetPresentationConfig', {projectName});
+    dispatch({
+      type: FETCH_PRESENTATION_CONFIG_SUCCESS,
+      projectName,
+      presentationConfig,
+    });
+  } catch (error) {
+    dispatch({type: FETCH_PRESENTATION_CONFIG_FAILURE, error});
+  }
+};
+
+/**
+ * Fetches custom permissions defined for a project.
+ * @param {string} projectName
+ * @return {function(function): Promise<Array<string>>}
+ */
+export const fetchCustomPermissions = (projectName) => async (dispatch) => {
+  dispatch({type: FETCH_CUSTOM_PERMISSIONS_START});
+
+  try {
+    const {permissions} = await prpcClient.call(
+        'monorail.Projects', 'GetCustomPermissions', {projectName});
+    dispatch({
+      type: FETCH_CUSTOM_PERMISSIONS_SUCCESS,
+      projectName,
+      permissions,
+    });
+    return permissions;
+  } catch (error) {
+    dispatch({type: FETCH_CUSTOM_PERMISSIONS_FAILURE, error});
+  }
+};
+
+/**
+ * Fetches the project members that the user is able to view.
+ * @param {string} projectName
+ * @return {function(function): Promise<GetVisibleMembersResponse>}
+ */
+export const fetchVisibleMembers = (projectName) => async (dispatch) => {
+  dispatch({type: FETCH_VISIBLE_MEMBERS_START});
+
+  try {
+    const visibleMembers = await prpcClient.call(
+        'monorail.Projects', 'GetVisibleMembers', {projectName});
+    dispatch({
+      type: FETCH_VISIBLE_MEMBERS_SUCCESS,
+      projectName,
+      visibleMembers,
+    });
+    return visibleMembers;
+  } catch (error) {
+    dispatch({type: FETCH_VISIBLE_MEMBERS_FAILURE, error});
+  }
+};
+
+const fetchTemplates = (projectName) => async (dispatch) => {
+  dispatch({type: FETCH_TEMPLATES_START});
+
+  const listTemplates = prpcClient.call(
+      'monorail.Projects', 'ListProjectTemplates', {projectName});
+
+  // TODO(zhangtiff): Remove (see above TODO).
+  if (!listTemplates) return;
+
+  try {
+    const resp = await listTemplates;
+    dispatch({
+      type: FETCH_TEMPLATES_SUCCESS,
+      projectName,
+      templates: resp.templates,
+    });
+  } catch (error) {
+    dispatch({type: FETCH_TEMPLATES_FAILURE, error});
+  }
+};
+
+// Helpers
+
+/**
+ * Helper to fetch field permissions.
+ * @param {string} projectName The name of the project where the fields are.
+ * @param {Array<FieldDef>} fieldDefs
+ * @return {function(function): Promise<void>}
+ */
+export const fetchFieldPerms = (projectName, fieldDefs) => async (dispatch) => {
+  const fieldDefsNames = [];
+  if (fieldDefs) {
+    fieldDefs.forEach((fd) => {
+      const fieldDefName = fieldDefToName(projectName, fd);
+      fieldDefsNames.push(fieldDefName);
+    });
+  }
+  await dispatch(permissions.batchGet(fieldDefsNames));
+};
diff --git a/static_src/reducers/projectV0.test.js b/static_src/reducers/projectV0.test.js
new file mode 100644
index 0000000..fb1f051
--- /dev/null
+++ b/static_src/reducers/projectV0.test.js
@@ -0,0 +1,944 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import {prpcClient} from 'prpc-client-instance.js';
+import * as projectV0 from './projectV0.js';
+import {store} from './base.js';
+import * as example from 'shared/test/constants-projectV0.js';
+import {restrictionLabelsForPermissions} from 'shared/convertersV0.js';
+import {fieldTypes, SITEWIDE_DEFAULT_COLUMNS} from 'shared/issue-fields.js';
+
+describe('project reducers', () => {
+  it('root reducer initial state', () => {
+    const actual = projectV0.reducer(undefined, {type: null});
+    const expected = {
+      name: null,
+      configs: {},
+      presentationConfigs: {},
+      customPermissions: {},
+      visibleMembers: {},
+      templates: {},
+      requests: {
+        fetchConfig: {
+          error: null,
+          requesting: false,
+        },
+        fetchCustomPermissions: {
+          error: null,
+          requesting: false,
+        },
+        fetchMembers: {
+          error: null,
+          requesting: false,
+        },
+        fetchPresentationConfig: {
+          error: null,
+          requesting: false,
+        },
+        fetchTemplates: {
+          error: null,
+          requesting: false,
+        },
+      },
+    };
+    assert.deepEqual(actual, expected);
+  });
+
+  it('name', () => {
+    const action = {type: projectV0.SELECT, projectName: example.PROJECT_NAME};
+    assert.deepEqual(projectV0.nameReducer(null, action), example.PROJECT_NAME);
+  });
+
+  it('configs updates when fetching Config', () => {
+    const action = {
+      type: projectV0.FETCH_CONFIG_SUCCESS,
+      projectName: example.PROJECT_NAME,
+      config: example.CONFIG,
+    };
+    const expected = {[example.PROJECT_NAME]: example.CONFIG};
+    assert.deepEqual(projectV0.configsReducer({}, action), expected);
+  });
+
+  it('customPermissions', () => {
+    const action = {
+      type: projectV0.FETCH_CUSTOM_PERMISSIONS_SUCCESS,
+      projectName: example.PROJECT_NAME,
+      permissions: example.CUSTOM_PERMISSIONS,
+    };
+    const expected = {[example.PROJECT_NAME]: example.CUSTOM_PERMISSIONS};
+    assert.deepEqual(projectV0.customPermissionsReducer({}, action), expected);
+  });
+
+  it('presentationConfigs', () => {
+    const action = {
+      type: projectV0.FETCH_PRESENTATION_CONFIG_SUCCESS,
+      projectName: example.PROJECT_NAME,
+      presentationConfig: example.PRESENTATION_CONFIG,
+    };
+    const expected = {[example.PROJECT_NAME]: example.PRESENTATION_CONFIG};
+    assert.deepEqual(projectV0.presentationConfigsReducer({}, action),
+      expected);
+  });
+
+  it('visibleMembers', () => {
+    const action = {
+      type: projectV0.FETCH_VISIBLE_MEMBERS_SUCCESS,
+      projectName: example.PROJECT_NAME,
+      visibleMembers: example.VISIBLE_MEMBERS,
+    };
+    const expected = {[example.PROJECT_NAME]: example.VISIBLE_MEMBERS};
+    assert.deepEqual(projectV0.visibleMembersReducer({}, action), expected);
+  });
+
+  it('templates', () => {
+    const action = {
+      type: projectV0.FETCH_TEMPLATES_SUCCESS,
+      projectName: example.PROJECT_NAME,
+      templates: [example.TEMPLATE_DEF],
+    };
+    const expected = {[example.PROJECT_NAME]: [example.TEMPLATE_DEF]};
+    assert.deepEqual(projectV0.templatesReducer({}, action), expected);
+  });
+});
+
+describe('project selectors', () => {
+  it('viewedProjectName', () => {
+    const actual = projectV0.viewedProjectName(example.STATE);
+    assert.deepEqual(actual, example.PROJECT_NAME);
+  });
+
+  it('viewedVisibleMembers', () => {
+    assert.deepEqual(projectV0.viewedVisibleMembers({}), {});
+    assert.deepEqual(projectV0.viewedVisibleMembers({projectV0: {}}), {});
+    assert.deepEqual(projectV0.viewedVisibleMembers(
+        {projectV0: {visibleMembers: {}}}), {});
+    const actual = projectV0.viewedVisibleMembers(example.STATE);
+    assert.deepEqual(actual, example.VISIBLE_MEMBERS);
+  });
+
+  it('viewedCustomPermissions', () => {
+    assert.deepEqual(projectV0.viewedCustomPermissions({}), []);
+    assert.deepEqual(projectV0.viewedCustomPermissions({projectV0: {}}), []);
+    assert.deepEqual(projectV0.viewedCustomPermissions(
+        {projectV0: {customPermissions: {}}}), []);
+    const actual = projectV0.viewedCustomPermissions(example.STATE);
+    assert.deepEqual(actual, example.CUSTOM_PERMISSIONS);
+  });
+
+  it('viewedPresentationConfig', () => {
+    assert.deepEqual(projectV0.viewedPresentationConfig({}), {});
+    assert.deepEqual(projectV0.viewedPresentationConfig({projectV0: {}}), {});
+    const actual = projectV0.viewedPresentationConfig(example.STATE);
+    assert.deepEqual(actual, example.PRESENTATION_CONFIG);
+  });
+
+  it('defaultColumns', () => {
+    assert.deepEqual(projectV0.defaultColumns({}), SITEWIDE_DEFAULT_COLUMNS);
+    assert.deepEqual(
+        projectV0.defaultColumns({projectV0: {}}), SITEWIDE_DEFAULT_COLUMNS);
+    assert.deepEqual(
+        projectV0.defaultColumns({projectV0: {presentationConfig: {}}}),
+        SITEWIDE_DEFAULT_COLUMNS);
+    const expected = ['ID', 'Summary', 'AllLabels'];
+    assert.deepEqual(projectV0.defaultColumns(example.STATE), expected);
+  });
+
+  it('defaultQuery', () => {
+    assert.deepEqual(projectV0.defaultQuery({}), '');
+    assert.deepEqual(projectV0.defaultQuery({projectV0: {}}), '');
+    const actual = projectV0.defaultQuery(example.STATE);
+    assert.deepEqual(actual, example.DEFAULT_QUERY);
+  });
+
+  it('fieldDefs', () => {
+    assert.deepEqual(projectV0.fieldDefs({projectV0: {}}), []);
+    assert.deepEqual(projectV0.fieldDefs({projectV0: {config: {}}}), []);
+    const actual = projectV0.fieldDefs(example.STATE);
+    assert.deepEqual(actual, example.FIELD_DEFS);
+  });
+
+  it('labelDefMap', () => {
+    const labelDefs = (permissions) =>
+        restrictionLabelsForPermissions(permissions).map((labelDef) =>
+            [labelDef.label.toLowerCase(), labelDef]);
+
+    assert.deepEqual(
+      projectV0.labelDefMap({projectV0: {}}), new Map(labelDefs([])));
+    assert.deepEqual(
+      projectV0.labelDefMap({projectV0: {config: {}}}), new Map(labelDefs([])));
+    const expected = new Map([
+      ['one', {label: 'One'}],
+      ['enum', {label: 'EnUm'}],
+      ['enum-options', {label: 'eNuM-Options'}],
+      ['hello-world', {label: 'hello-world', docstring: 'hmmm'}],
+      ['hello-me', {label: 'hello-me', docstring: 'hmmm'}],
+      ...labelDefs(example.CUSTOM_PERMISSIONS),
+    ]);
+    assert.deepEqual(projectV0.labelDefMap(example.STATE), expected);
+  });
+
+  it('labelPrefixValueMap', () => {
+    const builtInLabelPrefixes = [
+      ['Restrict', new Set(['View-EditIssue', 'AddIssueComment-EditIssue'])],
+      ['Restrict-View', new Set(['EditIssue'])],
+      ['Restrict-AddIssueComment', new Set(['EditIssue'])],
+    ];
+    assert.deepEqual(projectV0.labelPrefixValueMap({projectV0: {}}),
+        new Map(builtInLabelPrefixes));
+
+    assert.deepEqual(projectV0.labelPrefixValueMap(
+        {projectV0: {config: {}}}), new Map(builtInLabelPrefixes));
+
+    const expected = new Map([
+      ['Restrict', new Set(['View-Google', 'View-Security', 'EditIssue-Google',
+          'EditIssue-Security', 'AddIssueComment-Google',
+          'AddIssueComment-Security', 'DeleteIssue-Google',
+          'DeleteIssue-Security', 'FlagSpam-Google', 'FlagSpam-Security',
+          'View-EditIssue', 'AddIssueComment-EditIssue'])],
+      ['Restrict-View', new Set(['Google', 'Security', 'EditIssue'])],
+      ['Restrict-EditIssue', new Set(['Google', 'Security'])],
+      ['Restrict-AddIssueComment', new Set(['Google', 'Security', 'EditIssue'])],
+      ['Restrict-DeleteIssue', new Set(['Google', 'Security'])],
+      ['Restrict-FlagSpam', new Set(['Google', 'Security'])],
+      ['eNuM', new Set(['Options'])],
+      ['hello', new Set(['world', 'me'])],
+    ]);
+    assert.deepEqual(projectV0.labelPrefixValueMap(example.STATE), expected);
+  });
+
+  it('labelPrefixFields', () => {
+    const fields1 = projectV0.labelPrefixFields({projectV0: {}});
+    assert.deepEqual(fields1, ['Restrict']);
+    const fields2 = projectV0.labelPrefixFields({projectV0: {config: {}}});
+    assert.deepEqual(fields2, ['Restrict']);
+    const expected = [
+      'hello', 'Restrict', 'Restrict-View', 'Restrict-EditIssue',
+      'Restrict-AddIssueComment', 'Restrict-DeleteIssue', 'Restrict-FlagSpam'
+    ];
+    assert.deepEqual(projectV0.labelPrefixFields(example.STATE), expected);
+  });
+
+  it('enumFieldDefs', () => {
+    assert.deepEqual(projectV0.enumFieldDefs({projectV0: {}}), []);
+    assert.deepEqual(projectV0.enumFieldDefs({projectV0: {config: {}}}), []);
+    const expected = [example.FIELD_DEF_ENUM];
+    assert.deepEqual(projectV0.enumFieldDefs(example.STATE), expected);
+  });
+
+  it('optionsPerEnumField', () => {
+    assert.deepEqual(projectV0.optionsPerEnumField({projectV0: {}}), new Map());
+    const expected = new Map([
+      ['enum', [
+        {label: 'eNuM-Options', optionName: 'Options'},
+      ]],
+    ]);
+    assert.deepEqual(projectV0.optionsPerEnumField(example.STATE), expected);
+  });
+
+  it('viewedPresentationConfigLoaded', () => {
+    const loadConfigAction = {
+      type: projectV0.FETCH_PRESENTATION_CONFIG_SUCCESS,
+      projectName: example.PROJECT_NAME,
+      presentationConfig: example.PRESENTATION_CONFIG,
+    };
+    const selectProjectAction = {
+      type: projectV0.SELECT,
+      projectName: example.PROJECT_NAME,
+    };
+    let projectState = {};
+
+    assert.equal(false, projectV0.viewedPresentationConfigLoaded(
+        {projectV0: projectState}));
+
+    projectState = projectV0.reducer(projectState, selectProjectAction);
+    projectState = projectV0.reducer(projectState, loadConfigAction);
+
+    assert.equal(true, projectV0.viewedPresentationConfigLoaded(
+        {projectV0: projectState}));
+  });
+
+  it('fetchingPresentationConfig', () => {
+    const projectState = projectV0.reducer(undefined, {type: null});
+    assert.equal(false,
+        projectState.requests.fetchPresentationConfig.requesting);
+  });
+
+  describe('extractTypeForFieldName', () => {
+    let typeExtractor;
+
+    describe('built-in fields', () => {
+      beforeEach(() => {
+        typeExtractor = projectV0.extractTypeForFieldName({});
+      });
+
+      it('not case sensitive', () => {
+        assert.deepEqual(typeExtractor('id'), fieldTypes.ISSUE_TYPE);
+        assert.deepEqual(typeExtractor('iD'), fieldTypes.ISSUE_TYPE);
+        assert.deepEqual(typeExtractor('Id'), fieldTypes.ISSUE_TYPE);
+      });
+
+      it('gets type for ID', () => {
+        assert.deepEqual(typeExtractor('ID'), fieldTypes.ISSUE_TYPE);
+      });
+
+      it('gets type for Project', () => {
+        assert.deepEqual(typeExtractor('Project'), fieldTypes.PROJECT_TYPE);
+      });
+
+      it('gets type for Attachments', () => {
+        assert.deepEqual(typeExtractor('Attachments'), fieldTypes.INT_TYPE);
+      });
+
+      it('gets type for AllLabels', () => {
+        assert.deepEqual(typeExtractor('AllLabels'), fieldTypes.LABEL_TYPE);
+      });
+
+      it('gets type for AllLabels', () => {
+        assert.deepEqual(typeExtractor('AllLabels'), fieldTypes.LABEL_TYPE);
+      });
+
+      it('gets type for Blocked', () => {
+        assert.deepEqual(typeExtractor('Blocked'), fieldTypes.STR_TYPE);
+      });
+
+      it('gets type for BlockedOn', () => {
+        assert.deepEqual(typeExtractor('BlockedOn'), fieldTypes.ISSUE_TYPE);
+      });
+
+      it('gets type for Blocking', () => {
+        assert.deepEqual(typeExtractor('Blocking'), fieldTypes.ISSUE_TYPE);
+      });
+
+      it('gets type for CC', () => {
+        assert.deepEqual(typeExtractor('CC'), fieldTypes.USER_TYPE);
+      });
+
+      it('gets type for Closed', () => {
+        assert.deepEqual(typeExtractor('Closed'), fieldTypes.TIME_TYPE);
+      });
+
+      it('gets type for Component', () => {
+        assert.deepEqual(typeExtractor('Component'), fieldTypes.COMPONENT_TYPE);
+      });
+
+      it('gets type for ComponentModified', () => {
+        assert.deepEqual(typeExtractor('ComponentModified'),
+            fieldTypes.TIME_TYPE);
+      });
+
+      it('gets type for MergedInto', () => {
+        assert.deepEqual(typeExtractor('MergedInto'), fieldTypes.ISSUE_TYPE);
+      });
+
+      it('gets type for Modified', () => {
+        assert.deepEqual(typeExtractor('Modified'), fieldTypes.TIME_TYPE);
+      });
+
+      it('gets type for Reporter', () => {
+        assert.deepEqual(typeExtractor('Reporter'), fieldTypes.USER_TYPE);
+      });
+
+      it('gets type for Stars', () => {
+        assert.deepEqual(typeExtractor('Stars'), fieldTypes.INT_TYPE);
+      });
+
+      it('gets type for Status', () => {
+        assert.deepEqual(typeExtractor('Status'), fieldTypes.STATUS_TYPE);
+      });
+
+      it('gets type for StatusModified', () => {
+        assert.deepEqual(typeExtractor('StatusModified'), fieldTypes.TIME_TYPE);
+      });
+
+      it('gets type for Summary', () => {
+        assert.deepEqual(typeExtractor('Summary'), fieldTypes.STR_TYPE);
+      });
+
+      it('gets type for Type', () => {
+        assert.deepEqual(typeExtractor('Type'), fieldTypes.ENUM_TYPE);
+      });
+
+      it('gets type for Owner', () => {
+        assert.deepEqual(typeExtractor('Owner'), fieldTypes.USER_TYPE);
+      });
+
+      it('gets type for OwnerModified', () => {
+        assert.deepEqual(typeExtractor('OwnerModified'), fieldTypes.TIME_TYPE);
+      });
+
+      it('gets type for Opened', () => {
+        assert.deepEqual(typeExtractor('Opened'), fieldTypes.TIME_TYPE);
+      });
+    });
+
+    it('gets types for custom fields', () => {
+      typeExtractor = projectV0.extractTypeForFieldName({projectV0: {
+        name: example.PROJECT_NAME,
+        configs: {[example.PROJECT_NAME]: {fieldDefs: [
+          {fieldRef: {fieldName: 'CustomIntField', type: 'INT_TYPE'}},
+          {fieldRef: {fieldName: 'CustomStrField', type: 'STR_TYPE'}},
+          {fieldRef: {fieldName: 'CustomUserField', type: 'USER_TYPE'}},
+          {fieldRef: {fieldName: 'CustomEnumField', type: 'ENUM_TYPE'}},
+          {fieldRef: {fieldName: 'CustomApprovalField',
+            type: 'APPROVAL_TYPE'}},
+        ]}},
+      }});
+
+      assert.deepEqual(typeExtractor('CustomIntField'), fieldTypes.INT_TYPE);
+      assert.deepEqual(typeExtractor('CustomStrField'), fieldTypes.STR_TYPE);
+      assert.deepEqual(typeExtractor('CustomUserField'), fieldTypes.USER_TYPE);
+      assert.deepEqual(typeExtractor('CustomEnumField'), fieldTypes.ENUM_TYPE);
+      assert.deepEqual(typeExtractor('CustomApprovalField'),
+          fieldTypes.APPROVAL_TYPE);
+    });
+
+    it('defaults to string type for other fields', () => {
+      typeExtractor = projectV0.extractTypeForFieldName({projectV0: {
+        name: example.PROJECT_NAME,
+        configs: {[example.PROJECT_NAME]: {fieldDefs: [
+          {fieldRef: {fieldName: 'CustomIntField', type: 'INT_TYPE'}},
+          {fieldRef: {fieldName: 'CustomUserField', type: 'USER_TYPE'}},
+        ]}},
+      }});
+
+      assert.deepEqual(typeExtractor('FakeUserField'), fieldTypes.STR_TYPE);
+      assert.deepEqual(typeExtractor('NotOwner'), fieldTypes.STR_TYPE);
+    });
+  });
+
+  describe('extractFieldValuesFromIssue', () => {
+    let clock;
+    let issue;
+    let fieldExtractor;
+
+    describe('built-in fields', () => {
+      beforeEach(() => {
+        // Built-in fields will always act the same, regardless of
+        // project config.
+        fieldExtractor = projectV0.extractFieldValuesFromIssue({});
+
+        // Set clock to some specified date for relative time.
+        const initialTime = 365 * 24 * 60 * 60;
+
+        issue = {
+          localId: 33,
+          projectName: 'chromium',
+          summary: 'Test summary',
+          attachmentCount: 22,
+          starCount: 2,
+          componentRefs: [{path: 'Infra'}, {path: 'Monorail>UI'}],
+          blockedOnIssueRefs: [{localId: 30, projectName: 'chromium'}],
+          blockingIssueRefs: [{localId: 60, projectName: 'chromium'}],
+          labelRefs: [{label: 'Restrict-View-Google'}, {label: 'Type-Defect'}],
+          reporterRef: {displayName: 'test@example.com'},
+          ccRefs: [{displayName: 'test@example.com'}],
+          ownerRef: {displayName: 'owner@example.com'},
+          closedTimestamp: initialTime - 120, // 2 minutes ago
+          modifiedTimestamp: initialTime - 60, // a minute ago
+          openedTimestamp: initialTime - 24 * 60 * 60, // a day ago
+          componentModifiedTimestamp: initialTime - 60, // a minute ago
+          statusModifiedTimestamp: initialTime - 60, // a minute ago
+          ownerModifiedTimestamp: initialTime - 60, // a minute ago
+          statusRef: {status: 'Duplicate'},
+          mergedIntoIssueRef: {localId: 31, projectName: 'chromium'},
+        };
+
+        clock = sinon.useFakeTimers({
+          now: new Date(initialTime * 1000),
+          shouldAdvanceTime: false,
+        });
+      });
+
+      afterEach(() => {
+        clock.restore();
+      });
+
+      it('computes strings for ID', () => {
+        const fieldName = 'ID';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['chromium:33']);
+      });
+
+      it('computes strings for Project', () => {
+        const fieldName = 'Project';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['chromium']);
+      });
+
+      it('computes strings for Attachments', () => {
+        const fieldName = 'Attachments';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['22']);
+      });
+
+      it('computes strings for AllLabels', () => {
+        const fieldName = 'AllLabels';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['Restrict-View-Google', 'Type-Defect']);
+      });
+
+      it('computes strings for Blocked when issue is blocked', () => {
+        const fieldName = 'Blocked';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['Yes']);
+      });
+
+      it('computes strings for Blocked when issue is not blocked', () => {
+        const fieldName = 'Blocked';
+        issue.blockedOnIssueRefs = [];
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['No']);
+      });
+
+      it('computes strings for BlockedOn', () => {
+        const fieldName = 'BlockedOn';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['chromium:30']);
+      });
+
+      it('computes strings for Blocking', () => {
+        const fieldName = 'Blocking';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['chromium:60']);
+      });
+
+      it('computes strings for CC', () => {
+        const fieldName = 'CC';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['test@example.com']);
+      });
+
+      it('computes strings for Closed', () => {
+        const fieldName = 'Closed';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['2 minutes ago']);
+      });
+
+      it('computes strings for Component', () => {
+        const fieldName = 'Component';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['Infra', 'Monorail>UI']);
+      });
+
+      it('computes strings for ComponentModified', () => {
+        const fieldName = 'ComponentModified';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['a minute ago']);
+      });
+
+      it('computes strings for MergedInto', () => {
+        const fieldName = 'MergedInto';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['chromium:31']);
+      });
+
+      it('computes strings for Modified', () => {
+        const fieldName = 'Modified';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['a minute ago']);
+      });
+
+      it('computes strings for Reporter', () => {
+        const fieldName = 'Reporter';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['test@example.com']);
+      });
+
+      it('computes strings for Stars', () => {
+        const fieldName = 'Stars';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['2']);
+      });
+
+      it('computes strings for Status', () => {
+        const fieldName = 'Status';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['Duplicate']);
+      });
+
+      it('computes strings for StatusModified', () => {
+        const fieldName = 'StatusModified';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['a minute ago']);
+      });
+
+      it('computes strings for Summary', () => {
+        const fieldName = 'Summary';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['Test summary']);
+      });
+
+      it('computes strings for Type', () => {
+        const fieldName = 'Type';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['Defect']);
+      });
+
+      it('computes strings for Owner', () => {
+        const fieldName = 'Owner';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['owner@example.com']);
+      });
+
+      it('computes strings for OwnerModified', () => {
+        const fieldName = 'OwnerModified';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['a minute ago']);
+      });
+
+      it('computes strings for Opened', () => {
+        const fieldName = 'Opened';
+
+        assert.deepEqual(fieldExtractor(issue, fieldName),
+            ['a day ago']);
+      });
+    });
+
+    describe('custom approval fields', () => {
+      beforeEach(() => {
+        const fieldDefs = [
+          {fieldRef: {type: 'APPROVAL_TYPE', fieldName: 'Goose-Approval'}},
+          {fieldRef: {type: 'APPROVAL_TYPE', fieldName: 'Chicken-Approval'}},
+          {fieldRef: {type: 'APPROVAL_TYPE', fieldName: 'Dodo-Approval'}},
+        ];
+        fieldExtractor = projectV0.extractFieldValuesFromIssue({
+          projectV0: {
+            name: example.PROJECT_NAME,
+            configs: {
+              [example.PROJECT_NAME]: {
+                projectName: 'chromium',
+                fieldDefs,
+              },
+            },
+          },
+        });
+
+        issue = {
+          localId: 33,
+          projectName: 'bird',
+          approvalValues: [
+            {fieldRef: {type: 'APPROVAL_TYPE', fieldName: 'Goose-Approval'},
+              approverRefs: []},
+            {fieldRef: {type: 'APPROVAL_TYPE', fieldName: 'Chicken-Approval'},
+              status: 'APPROVED'},
+            {fieldRef: {type: 'APPROVAL_TYPE', fieldName: 'Dodo-Approval'},
+              status: 'NEED_INFO', approverRefs: [
+                {displayName: 'kiwi@bird.test'},
+                {displayName: 'mini-dino@bird.test'},
+              ],
+            },
+          ],
+        };
+      });
+
+      it('handles approval approver columns', () => {
+        assert.deepEqual(fieldExtractor(issue, 'goose-approval-approver'), []);
+        assert.deepEqual(fieldExtractor(issue, 'chicken-approval-approver'),
+            []);
+        assert.deepEqual(fieldExtractor(issue, 'dodo-approval-approver'),
+            ['kiwi@bird.test', 'mini-dino@bird.test']);
+      });
+
+      it('handles approval value columns', () => {
+        assert.deepEqual(fieldExtractor(issue, 'goose-approval'), ['NotSet']);
+        assert.deepEqual(fieldExtractor(issue, 'chicken-approval'),
+            ['Approved']);
+        assert.deepEqual(fieldExtractor(issue, 'dodo-approval'),
+            ['NeedInfo']);
+      });
+    });
+
+    describe('custom fields', () => {
+      beforeEach(() => {
+        const fieldDefs = [
+          {fieldRef: {type: 'STR_TYPE', fieldName: 'aString'}},
+          {fieldRef: {type: 'ENUM_TYPE', fieldName: 'ENUM'}},
+          {fieldRef: {type: 'INT_TYPE', fieldName: 'Cow-Number'},
+            bool_is_phase_field: true, is_multivalued: true},
+        ];
+        // As a label prefix, aString conflicts with the custom field named
+        // "aString". In this case, Monorail gives precedence to the
+        // custom field.
+        const labelDefs = [
+          {label: 'aString-ignore'},
+          {label: 'aString-two'},
+        ];
+        fieldExtractor = projectV0.extractFieldValuesFromIssue({
+          projectV0: {
+            name: example.PROJECT_NAME,
+            configs: {
+              [example.PROJECT_NAME]: {
+                projectName: 'chromium',
+                fieldDefs,
+                labelDefs,
+              },
+            },
+          },
+        });
+
+        const fieldValues = [
+          {fieldRef: {type: 'STR_TYPE', fieldName: 'aString'},
+            value: 'test'},
+          {fieldRef: {type: 'STR_TYPE', fieldName: 'aString'},
+            value: 'test2'},
+          {fieldRef: {type: 'ENUM_TYPE', fieldName: 'ENUM'},
+            value: 'a-value'},
+          {fieldRef: {type: 'INT_TYPE', fieldId: '6', fieldName: 'Cow-Number'},
+            phaseRef: {phaseName: 'Cow-Phase'}, value: '55'},
+          {fieldRef: {type: 'INT_TYPE', fieldId: '6', fieldName: 'Cow-Number'},
+            phaseRef: {phaseName: 'Cow-Phase'}, value: '54'},
+          {fieldRef: {type: 'INT_TYPE', fieldId: '6', fieldName: 'Cow-Number'},
+            phaseRef: {phaseName: 'MilkCow-Phase'}, value: '56'},
+        ];
+
+        issue = {
+          localId: 33,
+          projectName: 'chromium',
+          fieldValues,
+        };
+      });
+
+      it('gets values for custom fields', () => {
+        assert.deepEqual(fieldExtractor(issue, 'aString'), ['test', 'test2']);
+        assert.deepEqual(fieldExtractor(issue, 'enum'), ['a-value']);
+        assert.deepEqual(fieldExtractor(issue, 'cow-phase.cow-number'),
+            ['55', '54']);
+        assert.deepEqual(fieldExtractor(issue, 'milkcow-phase.cow-number'),
+            ['56']);
+      });
+
+      it('custom fields get precedence over label fields', () => {
+        issue.labelRefs = [{label: 'aString-ignore'}];
+        assert.deepEqual(fieldExtractor(issue, 'aString'),
+            ['test', 'test2']);
+      });
+    });
+
+    describe('label prefix fields', () => {
+      beforeEach(() => {
+        issue = {
+          localId: 33,
+          projectName: 'chromium',
+          labelRefs: [
+            {label: 'test-label'},
+            {label: 'test-label-2'},
+            {label: 'ignore-me'},
+            {label: 'Milestone-UI'},
+            {label: 'Milestone-Goodies'},
+          ],
+        };
+
+        fieldExtractor = projectV0.extractFieldValuesFromIssue({
+          projectV0: {
+            name: example.PROJECT_NAME,
+            configs: {
+              [example.PROJECT_NAME]: {
+                projectName: 'chromium',
+                labelDefs: [
+                  {label: 'test-1'},
+                  {label: 'test-2'},
+                  {label: 'milestone-1'},
+                  {label: 'milestone-2'},
+                ],
+              },
+            },
+          },
+        });
+      });
+
+      it('gets values for label prefixes', () => {
+        assert.deepEqual(fieldExtractor(issue, 'test'), ['label', 'label-2']);
+        assert.deepEqual(fieldExtractor(issue, 'Milestone'), ['UI', 'Goodies']);
+      });
+    });
+  });
+
+  it('fieldDefsByApprovalName', () => {
+    assert.deepEqual(projectV0.fieldDefsByApprovalName({projectV0: {}}),
+        new Map());
+
+    assert.deepEqual(projectV0.fieldDefsByApprovalName({projectV0: {
+      name: example.PROJECT_NAME,
+      configs: {[example.PROJECT_NAME]: {
+        fieldDefs: [
+          {fieldRef: {fieldName: 'test', type: fieldTypes.INT_TYPE}},
+          {fieldRef: {fieldName: 'ignoreMe', type: fieldTypes.APPROVAL_TYPE}},
+          {fieldRef: {fieldName: 'yay', approvalName: 'ThisIsAnApproval'}},
+          {fieldRef: {fieldName: 'ImAField', approvalName: 'ThisIsAnApproval'}},
+          {fieldRef: {fieldName: 'TalkToALawyer', approvalName: 'Legal'}},
+        ],
+      }},
+    }}), new Map([
+      ['ThisIsAnApproval', [
+        {fieldRef: {fieldName: 'yay', approvalName: 'ThisIsAnApproval'}},
+        {fieldRef: {fieldName: 'ImAField', approvalName: 'ThisIsAnApproval'}},
+      ]],
+      ['Legal', [
+        {fieldRef: {fieldName: 'TalkToALawyer', approvalName: 'Legal'}},
+      ]],
+    ]));
+  });
+});
+
+let dispatch;
+
+describe('project action creators', () => {
+  beforeEach(() => {
+    sinon.stub(prpcClient, 'call');
+
+    dispatch = sinon.stub();
+  });
+
+  afterEach(() => {
+    prpcClient.call.restore();
+  });
+
+  it('select', () => {
+    projectV0.select('project-name')(dispatch);
+    const action = {type: projectV0.SELECT, projectName: 'project-name'};
+    sinon.assert.calledWith(dispatch, action);
+  });
+
+  it('fetchCustomPermissions', async () => {
+    const action = projectV0.fetchCustomPermissions('chromium');
+
+    prpcClient.call.returns(Promise.resolve({permissions: ['google']}));
+
+    await action(dispatch);
+
+    sinon.assert.calledWith(dispatch,
+        {type: projectV0.FETCH_CUSTOM_PERMISSIONS_START});
+
+    sinon.assert.calledWith(
+        prpcClient.call,
+        'monorail.Projects',
+        'GetCustomPermissions',
+        {projectName: 'chromium'});
+
+    sinon.assert.calledWith(dispatch, {
+      type: projectV0.FETCH_CUSTOM_PERMISSIONS_SUCCESS,
+      projectName: 'chromium',
+      permissions: ['google'],
+    });
+  });
+
+  it('fetchPresentationConfig', async () => {
+    const action = projectV0.fetchPresentationConfig('chromium');
+
+    prpcClient.call.returns(Promise.resolve({projectThumbnailUrl: 'test'}));
+
+    await action(dispatch);
+
+    sinon.assert.calledWith(dispatch,
+        {type: projectV0.FETCH_PRESENTATION_CONFIG_START});
+
+    sinon.assert.calledWith(
+        prpcClient.call,
+        'monorail.Projects',
+        'GetPresentationConfig',
+        {projectName: 'chromium'});
+
+    sinon.assert.calledWith(dispatch, {
+      type: projectV0.FETCH_PRESENTATION_CONFIG_SUCCESS,
+      projectName: 'chromium',
+      presentationConfig: {projectThumbnailUrl: 'test'},
+    });
+  });
+
+  it('fetchVisibleMembers', async () => {
+    const action = projectV0.fetchVisibleMembers('chromium');
+
+    prpcClient.call.returns(Promise.resolve({userRefs: [{userId: '123'}]}));
+
+    await action(dispatch);
+
+    sinon.assert.calledWith(dispatch,
+        {type: projectV0.FETCH_VISIBLE_MEMBERS_START});
+
+    sinon.assert.calledWith(
+        prpcClient.call,
+        'monorail.Projects',
+        'GetVisibleMembers',
+        {projectName: 'chromium'});
+
+    sinon.assert.calledWith(dispatch, {
+      type: projectV0.FETCH_VISIBLE_MEMBERS_SUCCESS,
+      projectName: 'chromium',
+      visibleMembers: {userRefs: [{userId: '123'}]},
+    });
+  });
+});
+
+describe('helpers', () => {
+  beforeEach(() => {
+    sinon.stub(prpcClient, 'call');
+  });
+
+  afterEach(() => {
+    prpcClient.call.restore();
+  });
+
+  describe('fetchFieldPerms', () => {
+    it('fetch field permissions', async () => {
+      const projectName = 'proj';
+      const fieldDefs = [
+        {
+          fieldRef: {
+            fieldName: 'testField',
+            fieldId: 1,
+            type: 'ENUM_TYPE',
+          },
+        },
+      ];
+      const response = {};
+      prpcClient.call.returns(Promise.resolve(response));
+
+      await store.dispatch(projectV0.fetchFieldPerms(projectName, fieldDefs));
+
+      const args = {names: ['projects/proj/fieldDefs/1']};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Permissions',
+          'BatchGetPermissionSets', args);
+    });
+
+    it('fetch with no fieldDefs', async () => {
+      const config = {projectName: 'proj'};
+      const response = {};
+      prpcClient.call.returns(Promise.resolve(response));
+
+      // fieldDefs will be undefined.
+      await store.dispatch(projectV0.fetchFieldPerms(
+          config.projectName, config.fieldDefs));
+
+      const args = {names: []};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Permissions',
+          'BatchGetPermissionSets', args);
+    });
+  });
+});
diff --git a/static_src/reducers/projects.js b/static_src/reducers/projects.js
new file mode 100644
index 0000000..955dfea
--- /dev/null
+++ b/static_src/reducers/projects.js
@@ -0,0 +1,129 @@
+// Copyright 2019 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.
+
+/**
+ * @fileoverview Project actions, selectors, and reducers organized into
+ * a single Redux "Duck" that manages updating and retrieving project state
+ * on the frontend.
+ *
+ * Reference: https://github.com/erikras/ducks-modular-redux
+ */
+
+import {combineReducers} from 'redux';
+import {createSelector} from 'reselect';
+import {createReducer, createRequestReducer} from './redux-helpers.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import 'shared/typedef.js';
+
+/** @typedef {import('redux').AnyAction} AnyAction */
+
+export const LIST_START = 'projects/LIST_START';
+export const LIST_SUCCESS = 'projects/LIST_SUCCESS';
+export const LIST_FAILURE = 'projects/LIST_FAILURE';
+
+/* State Shape
+{
+  name: string,
+
+  byName: Object<ProjectName, Project>,
+  allNames: Array<ProjectName>,
+
+  requests: {
+    list: ReduxRequestState,
+  },
+}
+*/
+
+/**
+ * All Project data indexed by Project name.
+ * @param {Object<ProjectName, Project>} state Existing Project data.
+ * @param {AnyAction} action
+ * @param {Array<Project>} action.projects The Projects that were fetched.
+ * @return {Object<ProjectName, Project>}
+ */
+export const byNameReducer = createReducer({}, {
+  [LIST_SUCCESS]: (state, {projects}) => {
+    const newProjects = {};
+    projects.forEach((proj) => {
+      newProjects[proj.name] = proj;
+    });
+    return {...state, ...newProjects};
+  },
+});
+
+/**
+ * Resource names for all Projects in Monorail.
+ * @param {Array<ProjectName>} _state Existing Project data.
+ * @param {AnyAction} action
+ * @param {Array<Project>} action.projects The Projects that were fetched.
+ * @return {Array<ProjectName>}
+ */
+export const allNamesReducer = createReducer([], {
+  [LIST_SUCCESS]: (_state, {projects}) => {
+    return projects.map((proj) => proj.name);
+  },
+});
+
+const requestsReducer = combineReducers({
+  list: createRequestReducer(
+      LIST_START, LIST_SUCCESS, LIST_FAILURE),
+});
+
+export const reducer = combineReducers({
+  byName: byNameReducer,
+  allNames: allNamesReducer,
+
+  requests: requestsReducer,
+});
+
+
+/**
+ * Returns normalized Project data by name.
+ * @param {any} state
+ * @return {Object<ProjectName, Project>}
+ * @private
+ */
+export const byName = (state) => state.projects.byName;
+
+/**
+ * Base selector for wrapping the allNames state key.
+ * @param {any} state
+ * @return {Array<ProjectName>}
+ * @private
+ */
+export const _allNames = (state) => state.projects.allNames;
+
+/**
+ * Returns all Projects on Monorail, in denormalized form, in
+ * the sort order returned by the API.
+ * @param {any} state
+ * @return {Array<Project>}
+ */
+export const all = createSelector([byName, _allNames],
+    (byName, allNames) => allNames.map((name) => byName[name]));
+
+
+/**
+ * Returns the Project requests.
+ * @param {any} state
+ * @return {Object<string, ReduxRequestState>}
+ */
+export const requests = (state) => state.projects.requests;
+
+/**
+ * Gets all projects hosted on Monorail.
+ * @return {function(function): Promise<void>}
+ */
+export const list = () => async (dispatch) => {
+  dispatch({type: LIST_START});
+  try {
+    /** @type {{projects: Array<Project>}} */
+    const {projects} = await prpcClient.call(
+        'monorail.v3.Projects', 'ListProjects', {});
+
+    dispatch({type: LIST_SUCCESS, projects});
+  } catch (error) {
+    dispatch({type: LIST_FAILURE, error});
+  }
+};
diff --git a/static_src/reducers/projects.test.js b/static_src/reducers/projects.test.js
new file mode 100644
index 0000000..0a9dee4
--- /dev/null
+++ b/static_src/reducers/projects.test.js
@@ -0,0 +1,174 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import * as projects from './projects.js';
+import * as example from 'shared/test/constants-projects.js';
+
+import {prpcClient} from 'prpc-client-instance.js';
+
+let dispatch;
+
+
+describe('project reducers', () => {
+  it('root reducer initial state', () => {
+    const actual = projects.reducer(undefined, {type: null});
+    const expected = {
+      byName: {},
+      allNames: [],
+      requests: {
+        list: {
+          error: null,
+          requesting: false,
+        },
+      },
+    };
+    assert.deepEqual(actual, expected);
+  });
+
+  describe('byNameReducer', () => {
+    it('populated on LIST_SUCCESS', () => {
+      const action = {type: projects.LIST_SUCCESS, projects:
+          [example.PROJECT, example.PROJECT_2]};
+      const actual = projects.byNameReducer({}, action);
+
+      assert.deepEqual(actual, {
+        [example.NAME]: example.PROJECT,
+        [example.NAME_2]: example.PROJECT_2,
+      });
+    });
+
+    it('keeps original state on empty LIST_SUCCESS', () => {
+      const originalState = {
+        [example.NAME]: example.PROJECT,
+        [example.NAME_2]: example.PROJECT_2,
+      };
+      const action = {type: projects.LIST_SUCCESS, projects: []};
+      const actual = projects.byNameReducer(originalState, action);
+
+      assert.deepEqual(actual, originalState);
+    });
+
+    it('appends new issues to state on LIST_SUCCESS', () => {
+      const originalState = {
+        [example.NAME]: example.PROJECT,
+      };
+      const action = {type: projects.LIST_SUCCESS,
+        projects: [example.PROJECT_2]};
+      const actual = projects.byNameReducer(originalState, action);
+
+      const expected = {
+        [example.NAME]: example.PROJECT,
+        [example.NAME_2]: example.PROJECT_2,
+      };
+      assert.deepEqual(actual, expected);
+    });
+
+    it('overrides outdated data on LIST_SUCCESS', () => {
+      const originalState = {
+        [example.NAME]: example.PROJECT,
+        [example.NAME_2]: example.PROJECT_2,
+      };
+
+      const newProject2 = {
+        name: example.NAME_2,
+        summary: 'I hacked your project!',
+      };
+      const action = {type: projects.LIST_SUCCESS,
+        projects: [newProject2]};
+      const actual = projects.byNameReducer(originalState, action);
+      const expected = {
+        [example.NAME]: example.PROJECT,
+        [example.NAME_2]: newProject2,
+      };
+      assert.deepEqual(actual, expected);
+    });
+  });
+
+  it('allNames populated on LIST_SUCCESS', () => {
+    const action = {type: projects.LIST_SUCCESS, projects:
+        [example.PROJECT, example.PROJECT_2]};
+    const actual = projects.allNamesReducer([], action);
+
+    assert.deepEqual(actual, [example.NAME, example.NAME_2]);
+  });
+});
+
+describe('project selectors', () => {
+  it('byName', () => {
+    const normalizedProjects = {
+      [example.NAME]: example.PROJECT,
+    };
+    const state = {projects: {
+      byName: normalizedProjects,
+    }};
+    assert.deepEqual(projects.byName(state), normalizedProjects);
+  });
+
+  it('all', () => {
+    const state = {projects: {
+      byName: {
+        [example.NAME]: example.PROJECT,
+      },
+      allNames: [example.NAME],
+    }};
+    assert.deepEqual(projects.all(state), [example.PROJECT]);
+  });
+
+  it('requests', () => {
+    const state = {projects: {
+      requests: {
+        list: {error: null, requesting: false},
+      },
+    }};
+    assert.deepEqual(projects.requests(state), {
+      list: {error: null, requesting: false},
+    });
+  });
+});
+
+describe('project action creators', () => {
+  beforeEach(() => {
+    sinon.stub(prpcClient, 'call');
+    dispatch = sinon.stub();
+  });
+
+  afterEach(() => {
+    prpcClient.call.restore();
+  });
+
+  describe('list', () => {
+    it('success', async () => {
+      const projectsResponse = {projects: [example.PROJECT, example.PROJECT_2]};
+      prpcClient.call.returns(Promise.resolve(projectsResponse));
+
+      await projects.list()(dispatch);
+
+      sinon.assert.calledWith(dispatch, {type: projects.LIST_START});
+
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Projects', 'ListProjects', {});
+
+      const successAction = {
+        type: projects.LIST_SUCCESS,
+        projects: projectsResponse.projects,
+      };
+      sinon.assert.calledWith(dispatch, successAction);
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      await projects.list()(dispatch);
+
+      const action = {
+        type: projects.LIST_FAILURE,
+        error: sinon.match.any,
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+});
diff --git a/static_src/reducers/redux-helpers.js b/static_src/reducers/redux-helpers.js
new file mode 100644
index 0000000..ce80d60
--- /dev/null
+++ b/static_src/reducers/redux-helpers.js
@@ -0,0 +1,64 @@
+// Copyright 2019 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.
+
+export const createReducer = (initialState, handlers) => {
+  return function reducer(state = initialState, action) {
+    if (handlers.hasOwnProperty(action.type)) {
+      return handlers[action.type](state, action);
+    } else {
+      return state;
+    }
+  };
+};
+
+const DEFAULT_REQUEST_KEY = '*';
+
+export const createKeyedRequestReducer = (start, success, failure) => {
+  return createReducer({}, {
+    [start]: (state, {requestKey = DEFAULT_REQUEST_KEY}) => {
+      return {
+        ...state,
+        [requestKey]: {
+          requesting: true,
+          error: null,
+        },
+      };
+    },
+    [success]: (state, {requestKey = DEFAULT_REQUEST_KEY}) =>{
+      return {
+        ...state,
+        [requestKey]: {
+          requesting: false,
+          error: null,
+        },
+      };
+    },
+    [failure]: (state, {requestKey = DEFAULT_REQUEST_KEY, error}) => {
+      return {
+        ...state,
+        [requestKey]: {
+          requesting: false,
+          error,
+        },
+      };
+    },
+  });
+};
+
+export const createRequestReducer = (start, success, failure) => {
+  return createReducer({requesting: false, error: null}, {
+    [start]: (_state, _action) => ({
+      requesting: true,
+      error: null,
+    }),
+    [success]: (_state, _action) =>({
+      requesting: false,
+      error: null,
+    }),
+    [failure]: (_state, {error}) => ({
+      requesting: false,
+      error,
+    }),
+  });
+};
diff --git a/static_src/reducers/redux-helpers.test.js b/static_src/reducers/redux-helpers.test.js
new file mode 100644
index 0000000..93f0e0a
--- /dev/null
+++ b/static_src/reducers/redux-helpers.test.js
@@ -0,0 +1,102 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {createRequestReducer,
+  createKeyedRequestReducer} from './redux-helpers.js';
+
+let keyedRequestReducer;
+let requestReducer;
+
+describe('redux-helpers', () => {
+  describe('createKeyedRequestReducer', () => {
+    beforeEach(() => {
+      keyedRequestReducer = createKeyedRequestReducer(
+          'REQUEST_START', 'REQUEST_SUCCESS', 'REQUEST_FAILURE');
+    });
+
+    it('sets requesting to true on start', () => {
+      assert.deepEqual(keyedRequestReducer({}, {type: 'REQUEST_START'}),
+          {['*']: {requesting: true, error: null}});
+    });
+
+    it('sets requesting to false on success', () => {
+      assert.deepEqual(keyedRequestReducer({}, {type: 'REQUEST_SUCCESS'}),
+          {['*']: {requesting: false, error: null}});
+    });
+
+    it('sets error message on failure', () => {
+      assert.deepEqual(keyedRequestReducer({}, {
+        type: 'REQUEST_FAILURE',
+        error: 'hello',
+      }), {['*']: {requesting: false, error: 'hello'}});
+    });
+
+    it('preserves previous request state on start', () => {
+      const initialState = {
+        ['*']: {requesting: false, error: 'hello'},
+      };
+      assert.deepEqual(keyedRequestReducer(initialState, {
+        type: 'REQUEST_START',
+        requestKey: 'chromium:11',
+      }), {
+        ['*']: {requesting: false, error: 'hello'},
+        ['chromium:11']: {requesting: true, error: null},
+      });
+    });
+
+    it('preserves previous request state on success', () => {
+      const initialState = {
+        ['*']: {requesting: false, error: 'hello'},
+        ['chromium:11']: {requesting: true, error: null},
+      };
+      assert.deepEqual(keyedRequestReducer(initialState, {
+        type: 'REQUEST_SUCCESS',
+        requestKey: 'chromium:11',
+      }), {
+        ['*']: {requesting: false, error: 'hello'},
+        ['chromium:11']: {requesting: false, error: null},
+      });
+    });
+
+    it('preserves previous request state on failure', () => {
+      const initialState = {
+        ['*']: {requesting: false, error: 'hello'},
+        ['chromium:11']: {requesting: false, error: null},
+      };
+      assert.deepEqual(keyedRequestReducer(initialState, {
+        type: 'REQUEST_FAILURE',
+        requestKey: 'chromium:11',
+        error: 'something went wrong',
+      }), {
+        ['*']: {requesting: false, error: 'hello'},
+        ['chromium:11']: {requesting: false, error: 'something went wrong'},
+      });
+    });
+  });
+
+  describe('createRequestReducer', () => {
+    beforeEach(() => {
+      requestReducer = createRequestReducer(
+          'REQUEST_START', 'REQUEST_SUCCESS', 'REQUEST_FAILURE');
+    });
+
+    it('sets requesting to true on start', () => {
+      assert.deepEqual(requestReducer({}, {type: 'REQUEST_START'}),
+          {requesting: true, error: null});
+    });
+
+    it('sets requesting to false on success', () => {
+      assert.deepEqual(requestReducer({}, {type: 'REQUEST_SUCCESS'}),
+          {requesting: false, error: null});
+    });
+
+    it('sets error message on failure', () => {
+      assert.deepEqual(requestReducer({}, {
+        type: 'REQUEST_FAILURE',
+        error: 'hello',
+      }), {requesting: false, error: 'hello'});
+    });
+  });
+});
diff --git a/static_src/reducers/sitewide.js b/static_src/reducers/sitewide.js
new file mode 100644
index 0000000..f7e20d7
--- /dev/null
+++ b/static_src/reducers/sitewide.js
@@ -0,0 +1,167 @@
+// Copyright 2019 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.
+
+import * as projectV0 from 'reducers/projectV0.js';
+import {combineReducers} from 'redux';
+import {createReducer, createRequestReducer} from './redux-helpers.js';
+import {createSelector} from 'reselect';
+import {prpcClient} from 'prpc-client-instance.js';
+import {SITEWIDE_DEFAULT_CAN, parseColSpec} from 'shared/issue-fields.js';
+
+// Actions
+const SET_PAGE_TITLE = 'SET_PAGE_TITLE';
+const SET_HEADER_TITLE = 'SET_HEADER_TITLE';
+export const SET_QUERY_PARAMS = 'SET_QUERY_PARAMS';
+
+// Async actions
+const GET_SERVER_STATUS_FAILURE = 'GET_SERVER_STATUS_FAILURE';
+const GET_SERVER_STATUS_START = 'GET_SERVER_STATUS_START';
+const GET_SERVER_STATUS_SUCCESS = 'GET_SERVER_STATUS_SUCCESS';
+
+/* State Shape
+{
+  bannerMessage: String,
+  bannerTime: Number,
+  pageTitle: String,
+  headerTitle: String,
+  queryParams: Object,
+  readOnly: Boolean,
+  requests: {
+    serverStatus: Object,
+  },
+}
+*/
+
+// Reducers
+const bannerMessageReducer = createReducer('', {
+  [GET_SERVER_STATUS_SUCCESS]:
+    (_state, action) => action.serverStatus.bannerMessage || '',
+});
+
+const bannerTimeReducer = createReducer(0, {
+  [GET_SERVER_STATUS_SUCCESS]:
+    (_state, action) => action.serverStatus.bannerTime || 0,
+});
+
+/**
+ * Handle state for the current document title.
+ */
+const pageTitleReducer = createReducer('', {
+  [SET_PAGE_TITLE]: (_state, {title}) => title,
+});
+
+const headerTitleReducer = createReducer('', {
+  [SET_HEADER_TITLE]: (_state, {title}) => title,
+});
+
+const queryParamsReducer = createReducer({}, {
+  [SET_QUERY_PARAMS]: (_state, {queryParams}) => queryParams || {},
+});
+
+const readOnlyReducer = createReducer(false, {
+  [GET_SERVER_STATUS_SUCCESS]:
+    (_state, action) => action.serverStatus.readOnly || false,
+});
+
+const requestsReducer = combineReducers({
+  serverStatus: createRequestReducer(
+      GET_SERVER_STATUS_START,
+      GET_SERVER_STATUS_SUCCESS,
+      GET_SERVER_STATUS_FAILURE),
+});
+
+export const reducer = combineReducers({
+  bannerMessage: bannerMessageReducer,
+  bannerTime: bannerTimeReducer,
+  readOnly: readOnlyReducer,
+  queryParams: queryParamsReducer,
+  pageTitle: pageTitleReducer,
+  headerTitle: headerTitleReducer,
+
+  requests: requestsReducer,
+});
+
+// Selectors
+export const sitewide = (state) => state.sitewide || {};
+export const bannerMessage =
+    createSelector(sitewide, (sitewide) => sitewide.bannerMessage);
+export const bannerTime =
+    createSelector(sitewide, (sitewide) => sitewide.bannerTime);
+export const queryParams =
+    createSelector(sitewide, (sitewide) => sitewide.queryParams || {});
+export const pageTitle = createSelector(
+    sitewide, projectV0.viewedConfig,
+    (sitewide, projectConfig) => {
+      const titlePieces = [];
+
+      // If a specific page specifies its own page title, add that
+      // to the beginning of the title.
+      if (sitewide.pageTitle) {
+        titlePieces.push(sitewide.pageTitle);
+      }
+
+      // If the user is viewing a project, add the project data.
+      if (projectConfig && projectConfig.projectName) {
+        titlePieces.push(projectConfig.projectName);
+      }
+
+      return titlePieces.join(' - ') || 'Monorail';
+    });
+export const headerTitle =
+    createSelector(sitewide, (sitewide) => sitewide.headerTitle);
+export const readOnly =
+    createSelector(sitewide, (sitewide) => sitewide.readOnly);
+
+/**
+ * Computes the issue list columns from the URL parameters.
+ */
+export const currentColumns = createSelector(
+    queryParams,
+    (params = {}) => params.colspec ? parseColSpec(params.colspec) : null);
+
+/**
+* Get the default canned query for the currently viewed project.
+* Note: Projects cannot configure a per-project default canned query,
+* so there is only a sitewide default.
+*/
+export const currentCan = createSelector(queryParams,
+    (params) => params.can || SITEWIDE_DEFAULT_CAN);
+
+/**
+ * Compute the current issue search query that the user has
+ * entered for a project, based on queryParams and the default
+ * project search.
+ */
+export const currentQuery = createSelector(
+    projectV0.defaultQuery,
+    queryParams,
+    (defaultQuery, params = {}) => {
+      // Make sure entering an empty search still works.
+      if (params.q === '') return params.q;
+      return params.q || defaultQuery;
+    });
+
+export const requests = createSelector(sitewide,
+    (sitewide) => sitewide.requests || {});
+
+// Action Creators
+export const setQueryParams =
+    (queryParams) => ({type: SET_QUERY_PARAMS, queryParams});
+
+export const setPageTitle = (title) => ({type: SET_PAGE_TITLE, title});
+
+export const setHeaderTitle = (title) => ({type: SET_HEADER_TITLE, title});
+
+export const getServerStatus = () => async (dispatch) => {
+  dispatch({type: GET_SERVER_STATUS_START});
+
+  try {
+    const serverStatus = await prpcClient.call(
+        'monorail.Sitewide', 'GetServerStatus', {});
+
+    dispatch({type: GET_SERVER_STATUS_SUCCESS, serverStatus});
+  } catch (error) {
+    dispatch({type: GET_SERVER_STATUS_FAILURE, error});
+  }
+};
diff --git a/static_src/reducers/sitewide.test.js b/static_src/reducers/sitewide.test.js
new file mode 100644
index 0000000..114ecaf
--- /dev/null
+++ b/static_src/reducers/sitewide.test.js
@@ -0,0 +1,235 @@
+// Copyright 2019 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.
+
+import sinon from 'sinon';
+import {assert} from 'chai';
+
+import {store, stateUpdated, resetState} from 'reducers/base.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import * as sitewide from './sitewide.js';
+
+let prpcCall;
+
+describe('sitewide selectors', () => {
+  beforeEach(() => {
+    store.dispatch(resetState());
+  });
+  it('queryParams', () => {
+    assert.deepEqual(sitewide.queryParams({}), {});
+    assert.deepEqual(sitewide.queryParams({sitewide: {}}), {});
+    assert.deepEqual(sitewide.queryParams({sitewide: {queryParams:
+      {q: 'owner:me'}}}), {q: 'owner:me'});
+  });
+
+  describe('pageTitle', () => {
+    it('defaults to Monorail when no data', () => {
+      assert.equal(sitewide.pageTitle({}), 'Monorail');
+      assert.equal(sitewide.pageTitle({sitewide: {}}), 'Monorail');
+    });
+
+    it('uses local page title when one exists', () => {
+      assert.equal(sitewide.pageTitle(
+          {sitewide: {pageTitle: 'Issue Detail'}}), 'Issue Detail');
+    });
+
+    it('shows name of viewed project', () => {
+      assert.equal(sitewide.pageTitle({
+        sitewide: {pageTitle: 'Page'},
+        projectV0: {
+          name: 'chromium',
+          configs: {chromium: {projectName: 'chromium'}},
+        },
+      }), 'Page - chromium');
+    });
+  });
+
+  describe('currentColumns', () => {
+    it('returns null no configuration', () => {
+      assert.deepEqual(sitewide.currentColumns({}), null);
+      assert.deepEqual(sitewide.currentColumns({projectV0: {}}), null);
+      const state = {projectV0: {presentationConfig: {}}};
+      assert.deepEqual(sitewide.currentColumns(state), null);
+    });
+
+    it('gets columns from URL query params', () => {
+      const state = {sitewide: {
+        queryParams: {colspec: 'ID+Summary+ColumnName+Priority'},
+      }};
+      const expected = ['ID', 'Summary', 'ColumnName', 'Priority'];
+      assert.deepEqual(sitewide.currentColumns(state), expected);
+    });
+  });
+
+  describe('currentCan', () => {
+    it('uses sitewide default can by default', () => {
+      assert.deepEqual(sitewide.currentCan({}), '2');
+    });
+
+    it('URL params override default can', () => {
+      assert.deepEqual(sitewide.currentCan({
+        sitewide: {
+          queryParams: {can: '3'},
+        },
+      }), '3');
+    });
+
+    it('undefined query param does not override default can', () => {
+      assert.deepEqual(sitewide.currentCan({
+        sitewide: {
+          queryParams: {can: undefined},
+        },
+      }), '2');
+    });
+  });
+
+  describe('currentQuery', () => {
+    it('defaults to empty', () => {
+      assert.deepEqual(sitewide.currentQuery({}), '');
+      assert.deepEqual(sitewide.currentQuery({projectV0: {}}), '');
+    });
+
+    it('uses project default when no params', () => {
+      assert.deepEqual(sitewide.currentQuery({projectV0: {
+        name: 'chromium',
+        presentationConfigs: {
+          chromium: {defaultQuery: 'owner:me'},
+        },
+      }}), 'owner:me');
+    });
+
+    it('URL query params override default query', () => {
+      assert.deepEqual(sitewide.currentQuery({
+        projectV0: {
+          name: 'chromium',
+          presentationConfigs: {
+            chromium: {defaultQuery: 'owner:me'},
+          },
+        },
+        sitewide: {
+          queryParams: {q: 'component:Infra'},
+        },
+      }), 'component:Infra');
+    });
+
+    it('empty string in param overrides default project query', () => {
+      assert.deepEqual(sitewide.currentQuery({
+        projectV0: {
+          name: 'chromium',
+          presentationConfigs: {
+            chromium: {defaultQuery: 'owner:me'},
+          },
+        },
+        sitewide: {
+          queryParams: {q: ''},
+        },
+      }), '');
+    });
+
+    it('undefined query param does not override default search', () => {
+      assert.deepEqual(sitewide.currentQuery({
+        projectV0: {
+          name: 'chromium',
+          presentationConfigs: {
+            chromium: {defaultQuery: 'owner:me'},
+          },
+        },
+        sitewide: {
+          queryParams: {q: undefined},
+        },
+      }), 'owner:me');
+    });
+  });
+});
+
+
+describe('sitewide action creators', () => {
+  beforeEach(() => {
+    prpcCall = sinon.stub(prpcClient, 'call');
+  });
+
+  afterEach(() => {
+    prpcClient.call.restore();
+  });
+
+  it('setQueryParams updates queryParams', async () => {
+    store.dispatch(sitewide.setQueryParams({test: 'param'}));
+
+    await stateUpdated;
+
+    assert.deepEqual(sitewide.queryParams(store.getState()), {test: 'param'});
+  });
+
+  describe('getServerStatus', () => {
+    it('gets server status', async () => {
+      prpcCall.callsFake(() => {
+        return {
+          bannerMessage: 'Message',
+          bannerTime: 1234,
+          readOnly: true,
+        };
+      });
+
+      store.dispatch(sitewide.getServerStatus());
+
+      await stateUpdated;
+      const state = store.getState();
+
+      assert.deepEqual(sitewide.bannerMessage(state), 'Message');
+      assert.deepEqual(sitewide.bannerTime(state), 1234);
+      assert.isTrue(sitewide.readOnly(state));
+
+      assert.deepEqual(sitewide.requests(state), {
+        serverStatus: {
+          error: null,
+          requesting: false,
+        },
+      });
+    });
+
+    it('gets empty status', async () => {
+      prpcCall.callsFake(() => {
+        return {};
+      });
+
+      store.dispatch(sitewide.getServerStatus());
+
+      await stateUpdated;
+      const state = store.getState();
+
+      assert.deepEqual(sitewide.bannerMessage(state), '');
+      assert.deepEqual(sitewide.bannerTime(state), 0);
+      assert.isFalse(sitewide.readOnly(state));
+
+      assert.deepEqual(sitewide.requests(state), {
+        serverStatus: {
+          error: null,
+          requesting: false,
+        },
+      });
+    });
+
+    it('fails', async () => {
+      const error = new Error('error');
+      prpcCall.callsFake(() => {
+        throw error;
+      });
+
+      store.dispatch(sitewide.getServerStatus());
+
+      await stateUpdated;
+      const state = store.getState();
+
+      assert.deepEqual(sitewide.bannerMessage(state), '');
+      assert.deepEqual(sitewide.bannerTime(state), 0);
+      assert.isFalse(sitewide.readOnly(state));
+
+      assert.deepEqual(sitewide.requests(state), {
+        serverStatus: {
+          error: error,
+          requesting: false,
+        },
+      });
+    });
+  });
+});
diff --git a/static_src/reducers/stars.js b/static_src/reducers/stars.js
new file mode 100644
index 0000000..b67ff9d
--- /dev/null
+++ b/static_src/reducers/stars.js
@@ -0,0 +1,172 @@
+// Copyright 2020 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.
+
+/**
+ * @fileoverview Star actions, selectors, and reducers organized into
+ * a single Redux "Duck" that manages updating and retrieving star state
+ * on the frontend.
+ *
+ * Reference: https://github.com/erikras/ducks-modular-redux
+ */
+
+import {combineReducers} from 'redux';
+import {createReducer, createRequestReducer,
+  createKeyedRequestReducer} from './redux-helpers.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import {projectAndUserToStarName} from 'shared/converters.js';
+import 'shared/typedef.js';
+
+/** @typedef {import('redux').AnyAction} AnyAction */
+
+// Actions
+export const LIST_PROJECTS_START = 'stars/LIST_PROJECTS_START';
+export const LIST_PROJECTS_SUCCESS = 'stars/LIST_PROJECTS_SUCCESS';
+export const LIST_PROJECTS_FAILURE = 'stars/LIST_PROJECTS_FAILURE';
+
+export const STAR_PROJECT_START = 'stars/STAR_PROJECT_START';
+export const STAR_PROJECT_SUCCESS = 'stars/STAR_PROJECT_SUCCESS';
+export const STAR_PROJECT_FAILURE = 'stars/STAR_PROJECT_FAILURE';
+
+export const UNSTAR_PROJECT_START = 'stars/UNSTAR_PROJECT_START';
+export const UNSTAR_PROJECT_SUCCESS = 'stars/UNSTAR_PROJECT_SUCCESS';
+export const UNSTAR_PROJECT_FAILURE = 'stars/UNSTAR_PROJECT_FAILURE';
+
+/* State Shape
+{
+  byName: Object<StarName, Star>,
+
+  requests: {
+    listProjects: ReduxRequestState,
+  },
+}
+*/
+
+/**
+ * All star data indexed by resource name.
+ * @param {Object<ProjectName, Star>} state Existing Project data.
+ * @param {AnyAction} action
+ * @param {Array<Star>} action.star The Stars that were fetched.
+ * @param {ProjectStar} action.projectStar A single ProjectStar that was
+ *   created.
+ * @param {StarName} action.starName The StarName that was mutated.
+ * @return {Object<ProjectName, Star>}
+ */
+export const byNameReducer = createReducer({}, {
+  [LIST_PROJECTS_SUCCESS]: (state, {stars}) => {
+    const newStars = {};
+    stars.forEach((star) => {
+      newStars[star.name] = star;
+    });
+    return {...state, ...newStars};
+  },
+  [STAR_PROJECT_SUCCESS]: (state, {projectStar}) => {
+    return {...state, [projectStar.name]: projectStar};
+  },
+  [UNSTAR_PROJECT_SUCCESS]: (state, {starName}) => {
+    const newState = {...state};
+    delete newState[starName];
+    return newState;
+  },
+});
+
+
+const requestsReducer = combineReducers({
+  listProjects: createRequestReducer(LIST_PROJECTS_START,
+      LIST_PROJECTS_SUCCESS, LIST_PROJECTS_FAILURE),
+  starProject: createKeyedRequestReducer(STAR_PROJECT_START,
+      STAR_PROJECT_SUCCESS, STAR_PROJECT_FAILURE),
+  unstarProject: createKeyedRequestReducer(UNSTAR_PROJECT_START,
+      UNSTAR_PROJECT_SUCCESS, UNSTAR_PROJECT_FAILURE),
+});
+
+
+export const reducer = combineReducers({
+  byName: byNameReducer,
+  requests: requestsReducer,
+});
+
+
+/**
+ * Returns normalized star data by name.
+ * @param {any} state
+ * @return {Object<StarName, Star>}
+ * @private
+ */
+export const byName = (state) => state.stars.byName;
+
+/**
+ * Returns star requests.
+ * @param {any} state
+ * @return {Object<string, ReduxRequestState>}
+ */
+export const requests = (state) => state.stars.requests;
+
+/**
+ * Retrieves the starred projects for a given user.
+ * @param {UserName} user The resource name of the user to fetch
+ *   starred projects for.
+ * @return {function(function): Promise<void>}
+ */
+export const listProjects = (user) => async (dispatch) => {
+  dispatch({type: LIST_PROJECTS_START});
+
+  try {
+    const {projectStars} = await prpcClient.call(
+        'monorail.v3.Users', 'ListProjectStars', {parent: user});
+    dispatch({type: LIST_PROJECTS_SUCCESS, stars: projectStars});
+  } catch (error) {
+    dispatch({type: LIST_PROJECTS_FAILURE, error});
+  };
+};
+
+/**
+ * Stars a given project.
+ * @param {ProjectName} project The resource name of the project to star.
+ * @param {UserName} user The resource name of the user who is starring
+ *   the issue. This will always be the currently logged in user.
+ * @return {function(function): Promise<void>}
+ */
+export const starProject = (project, user) => async (dispatch) => {
+  const requestKey = projectAndUserToStarName(project, user);
+  dispatch({type: STAR_PROJECT_START, requestKey});
+  try {
+    const projectStar = await prpcClient.call(
+        'monorail.v3.Users', 'StarProject', {project});
+    dispatch({type: STAR_PROJECT_SUCCESS, requestKey, projectStar});
+  } catch (error) {
+    dispatch({type: STAR_PROJECT_FAILURE, requestKey, error});
+  };
+};
+
+/**
+ * Unstars a given project.
+ * @param {ProjectName} project The resource name of the project to unstar.
+ * @param {UserName} user The resource name of the user who is unstarring
+ *   the issue. This will always be the currently logged in user, but
+ *   passing in the user's resource name is necessary to make it possible to
+ *   generate the resource name of the removed star.
+ * @return {function(function): Promise<void>}
+ */
+export const unstarProject = (project, user) => async (dispatch) => {
+  const starName = projectAndUserToStarName(project, user);
+  const requestKey = starName;
+  dispatch({type: UNSTAR_PROJECT_START, requestKey});
+
+  try {
+    await prpcClient.call(
+        'monorail.v3.Users', 'UnStarProject', {project});
+    dispatch({type: UNSTAR_PROJECT_SUCCESS, requestKey, starName});
+  } catch (error) {
+    dispatch({type: UNSTAR_PROJECT_FAILURE, requestKey, error});
+  };
+};
+
+export const stars = {
+  reducer,
+  byName,
+  requests,
+  listProjects,
+  starProject,
+  unstarProject,
+};
diff --git a/static_src/reducers/stars.test.js b/static_src/reducers/stars.test.js
new file mode 100644
index 0000000..3437723
--- /dev/null
+++ b/static_src/reducers/stars.test.js
@@ -0,0 +1,247 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import * as stars from './stars.js';
+import * as example from 'shared/test/constants-stars.js';
+
+import {prpcClient} from 'prpc-client-instance.js';
+
+let dispatch;
+
+
+describe('star reducers', () => {
+  it('root reducer initial state', () => {
+    const actual = stars.reducer(undefined, {type: null});
+    const expected = {
+      byName: {},
+      requests: {
+        listProjects: {error: null, requesting: false},
+        starProject: {},
+        unstarProject: {},
+      },
+    };
+    assert.deepEqual(actual, expected);
+  });
+
+  describe('byNameReducer', () => {
+    it('populated on LIST_PROJECTS_SUCCESS', () => {
+      const action = {type: stars.LIST_PROJECTS_SUCCESS, stars:
+          [example.PROJECT_STAR, example.PROJECT_STAR_2]};
+      const actual = stars.byNameReducer({}, action);
+
+      assert.deepEqual(actual, {
+        [example.PROJECT_STAR_NAME]: example.PROJECT_STAR,
+        [example.PROJECT_STAR_NAME_2]: example.PROJECT_STAR_2,
+      });
+    });
+
+    it('keeps original state on empty LIST_PROJECTS_SUCCESS', () => {
+      const originalState = {
+        [example.PROJECT_STAR_NAME]: example.PROJECT_STAR,
+        [example.PROJECT_STAR_NAME_2]: example.PROJECT_STAR_2,
+      };
+      const action = {type: stars.LIST_PROJECTS_SUCCESS, stars: []};
+      const actual = stars.byNameReducer(originalState, action);
+
+      assert.deepEqual(actual, originalState);
+    });
+
+    it('appends new stars to state on LIST_PROJECTS_SUCCESS', () => {
+      const originalState = {
+        [example.PROJECT_STAR_NAME]: example.PROJECT_STAR,
+      };
+      const action = {type: stars.LIST_PROJECTS_SUCCESS,
+        stars: [example.PROJECT_STAR_2]};
+      const actual = stars.byNameReducer(originalState, action);
+
+      const expected = {
+        [example.PROJECT_STAR_NAME]: example.PROJECT_STAR,
+        [example.PROJECT_STAR_NAME_2]: example.PROJECT_STAR_2,
+      };
+      assert.deepEqual(actual, expected);
+    });
+
+    it('adds star on STAR_PROJECT_SUCCESS', () => {
+      const originalState = {
+        [example.PROJECT_STAR_NAME]: example.PROJECT_STAR,
+      };
+      const action = {type: stars.STAR_PROJECT_SUCCESS,
+        projectStar: example.PROJECT_STAR_2};
+      const actual = stars.byNameReducer(originalState, action);
+
+      const expected = {
+        [example.PROJECT_STAR_NAME]: example.PROJECT_STAR,
+        [example.PROJECT_STAR_NAME_2]: example.PROJECT_STAR_2,
+      };
+      assert.deepEqual(actual, expected);
+    });
+
+    it('removes star on UNSTAR_PROJECT_SUCCESS', () => {
+      const originalState = {
+        [example.PROJECT_STAR_NAME]: example.PROJECT_STAR,
+        [example.PROJECT_STAR_NAME_2]: example.PROJECT_STAR_2,
+      };
+      const action = {type: stars.UNSTAR_PROJECT_SUCCESS,
+        starName: example.PROJECT_STAR_NAME};
+      const actual = stars.byNameReducer(originalState, action);
+
+      const expected = {
+        [example.PROJECT_STAR_NAME_2]: example.PROJECT_STAR_2,
+      };
+      assert.deepEqual(actual, expected);
+    });
+  });
+});
+
+describe('project selectors', () => {
+  it('byName', () => {
+    const normalizedStars = {
+      [example.PROJECT_STAR_NAME]: example.PROJECT_STAR,
+    };
+    const state = {stars: {
+      byName: normalizedStars,
+    }};
+    assert.deepEqual(stars.byName(state), normalizedStars);
+  });
+
+  it('requests', () => {
+    const state = {stars: {
+      requests: {
+        listProjects: {error: null, requesting: false},
+        starProject: {},
+        unstarProject: {},
+      },
+    }};
+    assert.deepEqual(stars.requests(state), {
+      listProjects: {error: null, requesting: false},
+      starProject: {},
+      unstarProject: {},
+    });
+  });
+});
+
+describe('star action creators', () => {
+  beforeEach(() => {
+    sinon.stub(prpcClient, 'call');
+    dispatch = sinon.stub();
+  });
+
+  afterEach(() => {
+    prpcClient.call.restore();
+  });
+
+  describe('listProjects', () => {
+    it('success', async () => {
+      const starsResponse = {
+        projectStars: [example.PROJECT_STAR, example.PROJECT_STAR_2],
+      };
+      prpcClient.call.returns(Promise.resolve(starsResponse));
+
+      await stars.listProjects('users/1234')(dispatch);
+
+      sinon.assert.calledWith(dispatch, {type: stars.LIST_PROJECTS_START});
+
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Users', 'ListProjectStars',
+          {parent: 'users/1234'});
+
+      const successAction = {
+        type: stars.LIST_PROJECTS_SUCCESS,
+        stars: [example.PROJECT_STAR, example.PROJECT_STAR_2],
+      };
+      sinon.assert.calledWith(dispatch, successAction);
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      await stars.listProjects('users/1234')(dispatch);
+
+      const action = {
+        type: stars.LIST_PROJECTS_FAILURE,
+        error: sinon.match.any,
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+
+  describe('starProject', () => {
+    it('success', async () => {
+      const starResponse = example.PROJECT_STAR;
+      prpcClient.call.returns(Promise.resolve(starResponse));
+
+      await stars.starProject('projects/monorail', 'users/1234')(dispatch);
+
+      sinon.assert.calledWith(dispatch, {
+        type: stars.STAR_PROJECT_START,
+        requestKey: example.PROJECT_STAR_NAME,
+      });
+
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Users', 'StarProject',
+          {project: 'projects/monorail'});
+
+      const successAction = {
+        type: stars.STAR_PROJECT_SUCCESS,
+        requestKey: example.PROJECT_STAR_NAME,
+        projectStar: example.PROJECT_STAR,
+      };
+      sinon.assert.calledWith(dispatch, successAction);
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      await stars.starProject('projects/monorail', 'users/1234')(dispatch);
+
+      const action = {
+        type: stars.STAR_PROJECT_FAILURE,
+        requestKey: example.PROJECT_STAR_NAME,
+        error: sinon.match.any,
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+
+  describe('unstarProject', () => {
+    it('success', async () => {
+      const starResponse = {};
+      prpcClient.call.returns(Promise.resolve(starResponse));
+
+      await stars.unstarProject('projects/monorail', 'users/1234')(dispatch);
+
+      sinon.assert.calledWith(dispatch, {
+        type: stars.UNSTAR_PROJECT_START,
+        requestKey: example.PROJECT_STAR_NAME,
+      });
+
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Users', 'UnStarProject',
+          {project: 'projects/monorail'});
+
+      const successAction = {
+        type: stars.UNSTAR_PROJECT_SUCCESS,
+        requestKey: example.PROJECT_STAR_NAME,
+        starName: example.PROJECT_STAR_NAME,
+      };
+      sinon.assert.calledWith(dispatch, successAction);
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      await stars.unstarProject('projects/monorail', 'users/1234')(dispatch);
+
+      const action = {
+        type: stars.UNSTAR_PROJECT_FAILURE,
+        requestKey: example.PROJECT_STAR_NAME,
+        error: sinon.match.any,
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+});
diff --git a/static_src/reducers/ui.js b/static_src/reducers/ui.js
new file mode 100644
index 0000000..871cf87
--- /dev/null
+++ b/static_src/reducers/ui.js
@@ -0,0 +1,170 @@
+// Copyright 2019 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.
+
+import {combineReducers} from 'redux';
+import {createReducer} from './redux-helpers.js';
+
+/** @typedef {import('redux').AnyAction} AnyAction */
+
+const DEFAULT_SNACKBAR_TIMEOUT_MS = 10 * 1000;
+
+
+/**
+ * Object of various constant strings used to uniquely identify
+ * snackbar instances used in the app.
+ * TODO(https://crbug.com/monorail/7491): Avoid using this Object.
+ * @type {Object<string, string>}
+ */
+export const snackbarNames = Object.freeze({
+  // Issue list page snackbars.
+  FETCH_ISSUE_LIST_ERROR: 'FETCH_ISSUE_LIST_ERROR',
+  FETCH_ISSUE_LIST: 'FETCH_ISSUE_LIST',
+  UPDATE_HOTLISTS_SUCCESS: 'UPDATE_HOTLISTS_SUCCESS',
+
+  // Issue detail page snackbars.
+  ISSUE_COMMENT_ADDED: 'ISSUE_COMMENT_ADDED',
+});
+
+// Actions
+const INCREMENT_NAVIGATION_COUNT = 'INCREMENT_NAVIGATION_COUNT';
+const REPORT_DIRTY_FORM = 'REPORT_DIRTY_FORM';
+const CLEAR_DIRTY_FORMS = 'CLEAR_DIRTY_FORMS';
+const SET_FOCUS_ID = 'SET_FOCUS_ID';
+export const SHOW_SNACKBAR = 'SHOW_SNACKBAR';
+const HIDE_SNACKBAR = 'HIDE_SNACKBAR';
+
+/**
+ * @typedef {Object} Snackbar
+ * @param {string} id Unique string identifying the snackbar.
+ * @param {string} text The text to show in the snackbar.
+ */
+
+/* State Shape
+{
+  navigationCount: number,
+  dirtyForms: Array,
+  focusId: String,
+  snackbars: Array<Snackbar>,
+}
+*/
+
+// Reducers
+
+
+const navigationCountReducer = createReducer(0, {
+  [INCREMENT_NAVIGATION_COUNT]: (state) => state + 1,
+});
+
+/**
+ * Saves state on which forms have been edited, to warn the user
+ * about possible data loss when they navigate away from a page.
+ * @param {Array<string>} state Dirty form names.
+ * @param {AnyAction} action
+ * @param {string} action.name The name of the form being updated.
+ * @param {boolean} action.isDirty Whether the form is dirty or not dirty.
+ * @return {Array<string>}
+ */
+const dirtyFormsReducer = createReducer([], {
+  [REPORT_DIRTY_FORM]: (state, {name, isDirty}) => {
+    const newState = [...state];
+    const index = state.indexOf(name);
+    if (isDirty && index === -1) {
+      newState.push(name);
+    } else if (!isDirty && index !== -1) {
+      newState.splice(index, 1);
+    }
+    return newState;
+  },
+  [CLEAR_DIRTY_FORMS]: () => [],
+});
+
+const focusIdReducer = createReducer(null, {
+  [SET_FOCUS_ID]: (_state, action) => action.focusId,
+});
+
+/**
+ * Updates snackbar state.
+ * @param {Array<Snackbar>} state A snackbar-shaped slice of Redux state.
+ * @param {AnyAction} action
+ * @param {string} action.text The text to display in the snackbar.
+ * @param {string} action.id A unique global ID for the snackbar.
+ * @return {Array<Snackbar>} New snackbar state.
+ */
+export const snackbarsReducer = createReducer([], {
+  [SHOW_SNACKBAR]: (state, {text, id}) => {
+    return [...state, {text, id}];
+  },
+  [HIDE_SNACKBAR]: (state, {id}) => {
+    return state.filter((snackbar) => snackbar.id !== id);
+  },
+});
+
+export const reducer = combineReducers({
+  // Count of "page" navigations.
+  navigationCount: navigationCountReducer,
+  // Forms to be checked for user changes before leaving the page.
+  dirtyForms: dirtyFormsReducer,
+  // The ID of the element to be focused, as given by the hash part of the URL.
+  focusId: focusIdReducer,
+  // Array of snackbars to render on the page.
+  snackbars: snackbarsReducer,
+});
+
+// Selectors
+export const navigationCount = (state) => state.ui.navigationCount;
+export const dirtyForms = (state) => state.ui.dirtyForms;
+export const focusId = (state) => state.ui.focusId;
+
+/**
+ * Retrieves snackbar data from the Redux store.
+ * @param {any} state Redux state.
+ * @return {Array<Snackbar>} All the snackbars in the store.
+ */
+export const snackbars = (state) => state.ui.snackbars;
+
+// Action Creators
+export const incrementNavigationCount = () => {
+  return {type: INCREMENT_NAVIGATION_COUNT};
+};
+
+export const reportDirtyForm = (name, isDirty) => {
+  return {type: REPORT_DIRTY_FORM, name, isDirty};
+};
+
+export const clearDirtyForms = () => ({type: CLEAR_DIRTY_FORMS});
+
+export const setFocusId = (focusId) => {
+  return {type: SET_FOCUS_ID, focusId};
+};
+
+/**
+ * Displays a snackbar.
+ * @param {string} id Unique identifier for a given snackbar. We depend on
+ *   snackbar users to keep this unique.
+ * @param {string} text The text to be shown in the snackbar.
+ * @param {number} timeout An optional timeout in milliseconds for how
+ *   long to wait to dismiss a snackbar.
+ * @return {function(function): Promise<void>}
+ */
+export const showSnackbar = (id, text,
+    timeout = DEFAULT_SNACKBAR_TIMEOUT_MS) => (dispatch) => {
+  dispatch({type: SHOW_SNACKBAR, text, id});
+
+  if (timeout) {
+    window.setTimeout(() => dispatch(hideSnackbar(id)),
+        timeout);
+  }
+};
+
+/**
+ * Hides a snackbar.
+ * @param {string} id The unique name of the snackbar to be hidden.
+ * @return {any} A Redux action.
+ */
+export const hideSnackbar = (id) => {
+  return {
+    type: HIDE_SNACKBAR,
+    id,
+  };
+};
diff --git a/static_src/reducers/ui.test.js b/static_src/reducers/ui.test.js
new file mode 100644
index 0000000..587bc0c
--- /dev/null
+++ b/static_src/reducers/ui.test.js
@@ -0,0 +1,123 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import * as ui from './ui.js';
+
+
+describe('ui', () => {
+  describe('reducers', () => {
+    describe('snackbarsReducer', () => {
+      it('adds snackbar', () => {
+        let state = ui.snackbarsReducer([],
+            {type: 'SHOW_SNACKBAR', id: 'one', text: 'A snackbar'});
+
+        assert.deepEqual(state, [{id: 'one', text: 'A snackbar'}]);
+
+        state = ui.snackbarsReducer(state,
+            {type: 'SHOW_SNACKBAR', id: 'two', text: 'Another snack'});
+
+        assert.deepEqual(state, [
+          {id: 'one', text: 'A snackbar'},
+          {id: 'two', text: 'Another snack'},
+        ]);
+      });
+
+      it('removes snackbar', () => {
+        let state = [
+          {id: 'one', text: 'A snackbar'},
+          {id: 'two', text: 'Another snack'},
+        ];
+
+        state = ui.snackbarsReducer(state,
+            {type: 'HIDE_SNACKBAR', id: 'one'});
+
+        assert.deepEqual(state, [
+          {id: 'two', text: 'Another snack'},
+        ]);
+
+        state = ui.snackbarsReducer(state,
+            {type: 'HIDE_SNACKBAR', id: 'two'});
+
+        assert.deepEqual(state, []);
+      });
+
+      it('does not remove non-existent snackbar', () => {
+        let state = [
+          {id: 'one', text: 'A snackbar'},
+          {id: 'two', text: 'Another snack'},
+        ];
+
+        state = ui.snackbarsReducer(state,
+            {action: 'HIDE_SNACKBAR', id: 'whatever'});
+
+        assert.deepEqual(state, [
+          {id: 'one', text: 'A snackbar'},
+          {id: 'two', text: 'Another snack'},
+        ]);
+      });
+    });
+  });
+
+  describe('selectors', () => {
+    it('snackbars', () => {
+      assert.deepEqual(ui.snackbars({ui: {snackbars: []}}), []);
+      assert.deepEqual(ui.snackbars({ui: {snackbars: [
+        {text: 'Snackbar one', id: 'one'},
+        {text: 'Snackbar two', id: 'two'},
+      ]}}), [
+        {text: 'Snackbar one', id: 'one'},
+        {text: 'Snackbar two', id: 'two'},
+      ]);
+    });
+  });
+
+  describe('action creators', () => {
+    describe('showSnackbar', () => {
+      it('produces action', () => {
+        const action = ui.showSnackbar('id', 'text');
+        const dispatch = sinon.stub();
+
+        action(dispatch);
+
+        sinon.assert.calledWith(dispatch,
+            {type: 'SHOW_SNACKBAR', text: 'text', id: 'id'});
+      });
+
+      it('hides snackbar after timeout', () => {
+        const clock = sinon.useFakeTimers(0);
+
+        const action = ui.showSnackbar('id', 'text', 1000);
+        const dispatch = sinon.stub();
+
+        action(dispatch);
+
+        sinon.assert.neverCalledWith(dispatch,
+            {type: 'HIDE_SNACKBAR', id: 'id'});
+
+        clock.tick(1000);
+
+        sinon.assert.calledWith(dispatch, {type: 'HIDE_SNACKBAR', id: 'id'});
+
+        clock.restore();
+      });
+
+      it('does not setTimeout when no timeout specified', () => {
+        sinon.stub(window, 'setTimeout');
+
+        ui.showSnackbar('id', 'text', 0);
+
+        sinon.assert.notCalled(window.setTimeout);
+
+        window.setTimeout.restore();
+      });
+    });
+
+    it('hideSnackbar produces action', () => {
+      assert.deepEqual(ui.hideSnackbar('one'),
+          {type: 'HIDE_SNACKBAR', id: 'one'});
+    });
+  });
+});
diff --git a/static_src/reducers/userV0.js b/static_src/reducers/userV0.js
new file mode 100644
index 0000000..42a93fc
--- /dev/null
+++ b/static_src/reducers/userV0.js
@@ -0,0 +1,384 @@
+// Copyright 2019 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.
+
+import {combineReducers} from 'redux';
+import {createSelector} from 'reselect';
+import {createReducer, createRequestReducer} from './redux-helpers.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import {objectToMap} from 'shared/helpers.js';
+import {userRefToId, userToUserRef} from 'shared/convertersV0.js';
+import loadGapi, {fetchGapiEmail} from 'shared/gapi-loader.js';
+import {DEFAULT_MD_PROJECTS} from 'shared/md-helper.js';
+import {viewedProjectName} from 'reducers/projectV0.js';
+
+// Actions
+const FETCH_START = 'userV0/FETCH_START';
+const FETCH_SUCCESS = 'userV0/FETCH_SUCCESS';
+const FETCH_FAILURE = 'userV0/FETCH_FAILURE';
+
+export const FETCH_PROJECTS_START = 'userV0/FETCH_PROJECTS_START';
+export const FETCH_PROJECTS_SUCCESS = 'userV0/FETCH_PROJECTS_SUCCESS';
+export const FETCH_PROJECTS_FAILURE = 'userV0/FETCH_PROJECTS_FAILURE';
+
+const FETCH_HOTLISTS_START = 'userV0/FETCH_HOTLISTS_START';
+const FETCH_HOTLISTS_SUCCESS = 'userV0/FETCH_HOTLISTS_SUCCESS';
+const FETCH_HOTLISTS_FAILURE = 'userV0/FETCH_HOTLISTS_FAILURE';
+
+const FETCH_PREFS_START = 'userV0/FETCH_PREFS_START';
+const FETCH_PREFS_SUCCESS = 'userV0/FETCH_PREFS_SUCCESS';
+const FETCH_PREFS_FAILURE = 'userV0/FETCH_PREFS_FAILURE';
+
+export const SET_PREFS_START = 'userV0/SET_PREFS_START';
+export const SET_PREFS_SUCCESS = 'userV0/SET_PREFS_SUCCESS';
+export const SET_PREFS_FAILURE = 'userV0/SET_PREFS_FAILURE';
+
+const GAPI_LOGIN_START = 'GAPI_LOGIN_START';
+export const GAPI_LOGIN_SUCCESS = 'GAPI_LOGIN_SUCCESS';
+const GAPI_LOGIN_FAILURE = 'GAPI_LOGIN_FAILURE';
+
+const GAPI_LOGOUT_START = 'GAPI_LOGOUT_START';
+export const GAPI_LOGOUT_SUCCESS = 'GAPI_LOGOUT_SUCCESS';
+const GAPI_LOGOUT_FAILURE = 'GAPI_LOGOUT_FAILURE';
+
+
+// Monorial UserPrefs are stored as plain strings in Monorail's backend.
+// We want boolean preferences to be converted into booleans for convenience.
+// Currently, there are no user prefs in Monorail that are NOT booleans, so
+// we default to converting all user prefs to booleans unless otherwise
+// specified.
+// See: https://source.chromium.org/chromium/infra/infra/+/main:appengine/monorail/framework/framework_bizobj.py;l=409
+const NON_BOOLEAN_PREFS = new Set(['test_non_bool']);
+
+
+/* State Shape
+{
+  currentUser: {
+    ...user: Object,
+    groups: Array,
+    hotlists: Array,
+    prefs: Object,
+    gapiEmail: String,
+  },
+  requests: {
+    fetch: Object,
+    fetchHotlists: Object,
+    fetchPrefs: Object,
+  },
+}
+*/
+
+// Reducers
+const USER_DEFAULT = {
+  groups: [],
+  hotlists: [],
+  projects: {},
+  prefs: {},
+  prefsLoaded: false,
+};
+
+const gapiEmailReducer = (user, action) => {
+  return {
+    ...user,
+    gapiEmail: action.email || '',
+  };
+};
+
+export const currentUserReducer = createReducer(USER_DEFAULT, {
+  [FETCH_SUCCESS]: (_user, action) => {
+    return {
+      ...USER_DEFAULT,
+      ...action.user,
+      groups: action.groups,
+    };
+  },
+  [FETCH_HOTLISTS_SUCCESS]: (user, action) => {
+    return {...user, hotlists: action.hotlists};
+  },
+  [FETCH_PREFS_SUCCESS]: (user, action) => {
+    return {
+      ...user,
+      prefs: action.prefs,
+      prefsLoaded: true,
+    };
+  },
+  [SET_PREFS_SUCCESS]: (user, action) => {
+    const newPrefs = action.newPrefs;
+    const prefs = Object.assign({}, user.prefs);
+    newPrefs.forEach(({name, value}) => {
+      prefs[name] = value;
+    });
+    return {
+      ...user,
+      prefs,
+    };
+  },
+  [GAPI_LOGIN_SUCCESS]: gapiEmailReducer,
+  [GAPI_LOGOUT_SUCCESS]: gapiEmailReducer,
+});
+
+export const usersByIdReducer = createReducer({}, {
+  [FETCH_PROJECTS_SUCCESS]: (state, action) => {
+    const newState = {...state};
+
+    action.usersProjects.forEach((userProjects) => {
+      const {userRef, ownerOf = [], memberOf = [], contributorTo = [],
+        starredProjects = []} = userProjects;
+
+      const userId = userRefToId(userRef);
+
+      newState[userId] = {
+        ...newState[userId],
+        projects: {
+          ownerOf,
+          memberOf,
+          contributorTo,
+          starredProjects,
+        },
+      };
+    });
+
+    return newState;
+  },
+});
+
+const requestsReducer = combineReducers({
+  // Request for getting backend metadata related to a user, such as
+  // which groups they belong to and whether they're a site admin.
+  fetch: createRequestReducer(FETCH_START, FETCH_SUCCESS, FETCH_FAILURE),
+  // Requests for fetching projects a user is related to.
+  fetchProjects: createRequestReducer(
+      FETCH_PROJECTS_START, FETCH_PROJECTS_SUCCESS, FETCH_PROJECTS_FAILURE),
+  // Request for getting a user's hotlists.
+  fetchHotlists: createRequestReducer(
+      FETCH_HOTLISTS_START, FETCH_HOTLISTS_SUCCESS, FETCH_HOTLISTS_FAILURE),
+  // Request for getting a user's prefs.
+  fetchPrefs: createRequestReducer(
+      FETCH_PREFS_START, FETCH_PREFS_SUCCESS, FETCH_PREFS_FAILURE),
+  // Request for setting a user's prefs.
+  setPrefs: createRequestReducer(
+      SET_PREFS_START, SET_PREFS_SUCCESS, SET_PREFS_FAILURE),
+});
+
+export const reducer = combineReducers({
+  currentUser: currentUserReducer,
+  usersById: usersByIdReducer,
+  requests: requestsReducer,
+});
+
+// Selectors
+export const requests = (state) => state.userV0.requests;
+export const currentUser = (state) => state.userV0.currentUser || {};
+// TODO(zhangtiff): Replace custom logic to check if the user is logged in
+// across the frontend.
+export const isLoggedIn = createSelector(
+    currentUser, (user) => user && user.userId);
+export const userRef = createSelector(
+    currentUser, (user) => userToUserRef(user));
+export const prefs = createSelector(
+    currentUser, viewedProjectName, (user, projectName = '') => {
+      const prefs = {
+        // Make Markdown default to true for projects who have opted in.
+        render_markdown: String(DEFAULT_MD_PROJECTS.has(projectName)),
+        ...user.prefs
+      };
+      for (let prefName of Object.keys(prefs)) {
+        if (!NON_BOOLEAN_PREFS.has(prefName)) {
+          // Monorail user preferences are stored as strings.
+          prefs[prefName] = prefs[prefName] === 'true';
+        }
+      }
+      return objectToMap(prefs);
+    });
+
+const _usersById = (state) => state.userV0.usersById || {};
+export const usersById = createSelector(_usersById,
+    (usersById) => objectToMap(usersById));
+
+export const projectsPerUser = createSelector(usersById, (usersById) => {
+  const map = new Map();
+  for (const [key, value] of usersById.entries()) {
+    if (value.projects) {
+      map.set(key, value.projects);
+    }
+  }
+  return map;
+});
+
+// Projects for just the current user.
+export const projects = createSelector(projectsPerUser, userRef,
+    (projectsMap, userRef) => projectsMap.get(userRefToId(userRef)) || {});
+
+// Action Creators
+/**
+ * Fetches the data required to view the logged in user.
+ * @param {string} displayName The display name of the logged in user. Note that
+ *   while usernames may be hidden for users in Monorail, the logged in user
+ *   will always be able to view their own name.
+ * @return {function(function): Promise<void>}
+ */
+export const fetch = (displayName) => async (dispatch) => {
+  dispatch({type: FETCH_START});
+
+  const message = {
+    userRef: {displayName},
+  };
+
+  try {
+    const resp = await Promise.all([
+      prpcClient.call(
+          'monorail.Users', 'GetUser', message),
+      prpcClient.call(
+          'monorail.Users', 'GetMemberships', message),
+    ]);
+
+    const user = resp[0];
+
+    dispatch({
+      type: FETCH_SUCCESS,
+      user,
+      groups: resp[1].groupRefs || [],
+    });
+
+    const userRef = userToUserRef(user);
+
+    dispatch(fetchProjects([userRef]));
+    const hotlistsPromise = dispatch(fetchHotlists(userRef));
+    dispatch(fetchPrefs());
+
+    hotlistsPromise.then((hotlists) => {
+      // TODO(crbug.com/monorail/5828): Remove
+      // window.TKR_populateHotlistAutocomplete once the old
+      // autocomplete code is deprecated.
+      window.TKR_populateHotlistAutocomplete(hotlists);
+    });
+  } catch (error) {
+    dispatch({type: FETCH_FAILURE, error});
+  };
+};
+
+export const fetchProjects = (userRefs) => async (dispatch) => {
+  dispatch({type: FETCH_PROJECTS_START});
+  try {
+    const resp = await prpcClient.call(
+        'monorail.Users', 'GetUsersProjects', {userRefs});
+    dispatch({type: FETCH_PROJECTS_SUCCESS, usersProjects: resp.usersProjects});
+  } catch (error) {
+    dispatch({type: FETCH_PROJECTS_FAILURE, error});
+  }
+};
+
+/**
+ * Fetches all of a given user's hotlists.
+ * @param {UserRef} userRef The user to fetch hotlists for.
+ * @return {function(function): Promise<Array<HotlistV0>>}
+ */
+export const fetchHotlists = (userRef) => async (dispatch) => {
+  dispatch({type: FETCH_HOTLISTS_START});
+
+  try {
+    const resp = await prpcClient.call(
+        'monorail.Features', 'ListHotlistsByUser', {user: userRef});
+
+    const hotlists = resp.hotlists || [];
+    hotlists.sort((hotlistA, hotlistB) => {
+      return hotlistA.name.localeCompare(hotlistB.name);
+    });
+    dispatch({type: FETCH_HOTLISTS_SUCCESS, hotlists});
+
+    return hotlists;
+  } catch (error) {
+    dispatch({type: FETCH_HOTLISTS_FAILURE, error});
+  };
+};
+
+/**
+ * Fetches user preferences for the logged in user.
+ * @return {function(function): Promise<void>}
+ */
+export const fetchPrefs = () => async (dispatch) => {
+  dispatch({type: FETCH_PREFS_START});
+
+  try {
+    const resp = await prpcClient.call(
+        'monorail.Users', 'GetUserPrefs', {});
+    const prefs = {};
+    (resp.prefs || []).forEach(({name, value}) => {
+      prefs[name] = value;
+    });
+    dispatch({type: FETCH_PREFS_SUCCESS, prefs});
+  } catch (error) {
+    dispatch({type: FETCH_PREFS_FAILURE, error});
+  };
+};
+
+/**
+ * Action creator for setting a user's preferences.
+ *
+ * @param {Object} newPrefs
+ * @param {boolean} saveChanges
+ * @return {function(function): Promise<void>}
+ */
+export const setPrefs = (newPrefs, saveChanges = true) => async (dispatch) => {
+  if (!saveChanges) {
+    dispatch({type: SET_PREFS_SUCCESS, newPrefs});
+    return;
+  }
+
+  dispatch({type: SET_PREFS_START});
+
+  try {
+    const message = {prefs: newPrefs};
+    await prpcClient.call(
+        'monorail.Users', 'SetUserPrefs', message);
+    dispatch({type: SET_PREFS_SUCCESS, newPrefs});
+
+    // Re-fetch the user's prefs after saving to prevent prefs from
+    // getting out of sync.
+    dispatch(fetchPrefs());
+  } catch (error) {
+    dispatch({type: SET_PREFS_FAILURE, error});
+  }
+};
+
+/**
+ * Action creator to initiate the gapi.js login flow.
+ *
+ * @return {Promise} Resolved only when gapi.js login succeeds.
+ */
+export const initGapiLogin = () => (dispatch) => {
+  dispatch({type: GAPI_LOGIN_START});
+
+  return new Promise(async (resolve) => {
+    try {
+      await loadGapi();
+      gapi.auth2.getAuthInstance().signIn().then(async () => {
+        const email = await fetchGapiEmail();
+        dispatch({type: GAPI_LOGIN_SUCCESS, email: email});
+        resolve();
+      });
+    } catch (error) {
+      // TODO(jeffcarp): Pop up a message that signIn failed.
+      dispatch({type: GAPI_LOGIN_FAILURE, error});
+    }
+  });
+};
+
+/**
+ * Action creator to log the user out of gapi.js
+ *
+ * @return {undefined}
+ */
+export const initGapiLogout = () => async (dispatch) => {
+  dispatch({type: GAPI_LOGOUT_START});
+
+  try {
+    await loadGapi();
+    gapi.auth2.getAuthInstance().signOut().then(() => {
+      dispatch({type: GAPI_LOGOUT_SUCCESS, email: ''});
+    });
+  } catch (error) {
+    // TODO(jeffcarp): Pop up a message that signOut failed.
+    dispatch({type: GAPI_LOGOUT_FAILURE, error});
+  }
+};
diff --git a/static_src/reducers/userV0.test.js b/static_src/reducers/userV0.test.js
new file mode 100644
index 0000000..aab7989
--- /dev/null
+++ b/static_src/reducers/userV0.test.js
@@ -0,0 +1,372 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import * as userV0 from './userV0.js';
+import {prpcClient} from 'prpc-client-instance.js';
+
+
+let dispatch;
+
+describe('userV0', () => {
+  describe('reducers', () => {
+    it('SET_PREFS_SUCCESS updates existing prefs with new prefs', () => {
+      const state = {prefs: {
+        testPref: 'true',
+        anotherPref: 'hello-world',
+      }};
+
+      const newPrefs = [
+        {name: 'anotherPref', value: 'override'},
+        {name: 'newPref', value: 'test-me'},
+      ];
+
+      const newState = userV0.currentUserReducer(state,
+          {type: userV0.SET_PREFS_SUCCESS, newPrefs});
+
+      assert.deepEqual(newState, {prefs: {
+        testPref: 'true',
+        anotherPref: 'override',
+        newPref: 'test-me',
+      }});
+    });
+
+    it('FETCH_PROJECTS_SUCCESS overrides existing entry in usersById', () => {
+      const state = {
+        ['123']: {
+          projects: {
+            ownerOf: [],
+            memberOf: [],
+            contributorTo: [],
+            starredProjects: [],
+          },
+        },
+      };
+
+      const usersProjects = [
+        {
+          userRef: {userId: '123'},
+          ownerOf: ['chromium'],
+        },
+      ];
+
+      const newState = userV0.usersByIdReducer(state,
+          {type: userV0.FETCH_PROJECTS_SUCCESS, usersProjects});
+
+      assert.deepEqual(newState, {
+        ['123']: {
+          projects: {
+            ownerOf: ['chromium'],
+            memberOf: [],
+            contributorTo: [],
+            starredProjects: [],
+          },
+        },
+      });
+    });
+
+    it('FETCH_PROJECTS_SUCCESS adds new entry to usersById', () => {
+      const state = {
+        ['123']: {
+          projects: {
+            ownerOf: [],
+            memberOf: [],
+            contributorTo: [],
+            starredProjects: [],
+          },
+        },
+      };
+
+      const usersProjects = [
+        {
+          userRef: {userId: '543'},
+          ownerOf: ['chromium'],
+        },
+        {
+          userRef: {userId: '789'},
+          memberOf: ['v8'],
+        },
+      ];
+
+      const newState = userV0.usersByIdReducer(state,
+          {type: userV0.FETCH_PROJECTS_SUCCESS, usersProjects});
+
+      assert.deepEqual(newState, {
+        ['123']: {
+          projects: {
+            ownerOf: [],
+            memberOf: [],
+            contributorTo: [],
+            starredProjects: [],
+          },
+        },
+        ['543']: {
+          projects: {
+            ownerOf: ['chromium'],
+            memberOf: [],
+            contributorTo: [],
+            starredProjects: [],
+          },
+        },
+        ['789']: {
+          projects: {
+            ownerOf: [],
+            memberOf: ['v8'],
+            contributorTo: [],
+            starredProjects: [],
+          },
+        },
+      });
+    });
+
+    describe('GAPI_LOGIN_SUCCESS', () => {
+      it('sets currentUser.gapiEmail', () => {
+        const newState = userV0.currentUserReducer({}, {
+          type: userV0.GAPI_LOGIN_SUCCESS,
+          email: 'rutabaga@rutabaga.com',
+        });
+        assert.deepEqual(newState, {
+          gapiEmail: 'rutabaga@rutabaga.com',
+        });
+      });
+
+      it('defaults to an empty string', () => {
+        const newState = userV0.currentUserReducer({}, {
+          type: userV0.GAPI_LOGIN_SUCCESS,
+        });
+        assert.deepEqual(newState, {
+          gapiEmail: '',
+        });
+      });
+    });
+
+    describe('GAPI_LOGOUT_SUCCESS', () => {
+      it('sets currentUser.gapiEmail', () => {
+        const newState = userV0.currentUserReducer({}, {
+          type: userV0.GAPI_LOGOUT_SUCCESS,
+          email: '',
+        });
+        assert.deepEqual(newState, {
+          gapiEmail: '',
+        });
+      });
+
+      it('defaults to an empty string', () => {
+        const state = {};
+        const newState = userV0.currentUserReducer(state, {
+          type: userV0.GAPI_LOGOUT_SUCCESS,
+        });
+        assert.deepEqual(newState, {
+          gapiEmail: '',
+        });
+      });
+    });
+  });
+
+  describe('selectors', () => {
+    it('prefs', () => {
+      const state = wrapCurrentUser({prefs: {
+        testPref: 'true',
+        test_non_bool: 'hello-world',
+      }});
+
+      assert.deepEqual(userV0.prefs(state), new Map([
+        ['render_markdown', false],
+        ['testPref', true],
+        ['test_non_bool', 'hello-world'],
+      ]));
+    });
+
+    it('prefs is set with the correct type', async () =>{
+      // When setting prefs it's important that they are set as their
+      // String value.
+      const state = wrapCurrentUser({prefs: {
+        render_markdown : 'true',
+      }});
+      const markdownPref = userV0.prefs(state).get('render_markdown');
+      assert.isTrue(markdownPref);
+    });
+
+    it('prefs is NOT set with the correct type', async () =>{
+      // Here the value is a boolean so when it gets set it would
+      // appear as false because it's compared with a String.
+      const state = wrapCurrentUser({prefs: {
+        render_markdown : true,
+      }});
+      const markdownPref = userV0.prefs(state).get('render_markdown');
+      // Thus this is false when it was meant to be true.
+      assert.isFalse(markdownPref);
+    });
+
+    it('projects', () => {
+      assert.deepEqual(userV0.projects(wrapUser({})), {});
+
+      const state = wrapUser({
+        currentUser: {userId: '123'},
+        usersById: {
+          ['123']: {
+            projects: {
+              ownerOf: ['chromium'],
+              memberOf: ['v8'],
+              contributorTo: [],
+              starredProjects: [],
+            },
+          },
+        },
+      });
+
+      assert.deepEqual(userV0.projects(state), {
+        ownerOf: ['chromium'],
+        memberOf: ['v8'],
+        contributorTo: [],
+        starredProjects: [],
+      });
+    });
+
+    it('projectPerUser', () => {
+      assert.deepEqual(userV0.projectsPerUser(wrapUser({})), new Map());
+
+      const state = wrapUser({
+        usersById: {
+          ['123']: {
+            projects: {
+              ownerOf: ['chromium'],
+              memberOf: ['v8'],
+              contributorTo: [],
+              starredProjects: [],
+            },
+          },
+        },
+      });
+
+      assert.deepEqual(userV0.projectsPerUser(state), new Map([
+        ['123', {
+          ownerOf: ['chromium'],
+          memberOf: ['v8'],
+          contributorTo: [],
+          starredProjects: [],
+        }],
+      ]));
+    });
+  });
+
+  describe('action creators', () => {
+    beforeEach(() => {
+      sinon.stub(prpcClient, 'call');
+
+      dispatch = sinon.stub();
+    });
+
+    afterEach(() => {
+      prpcClient.call.restore();
+    });
+
+    it('fetchProjects succeeds', async () => {
+      const action = userV0.fetchProjects([{userId: '123'}]);
+
+      prpcClient.call.returns(Promise.resolve({
+        usersProjects: [
+          {
+            userRef: {
+              userId: '123',
+            },
+            ownerOf: ['chromium'],
+          },
+        ],
+      }));
+
+      await action(dispatch);
+
+      sinon.assert.calledWith(dispatch, {type: userV0.FETCH_PROJECTS_START});
+
+      sinon.assert.calledWith(
+          prpcClient.call,
+          'monorail.Users',
+          'GetUsersProjects',
+          {userRefs: [{userId: '123'}]});
+
+      sinon.assert.calledWith(dispatch, {
+        type: userV0.FETCH_PROJECTS_SUCCESS,
+        usersProjects: [
+          {
+            userRef: {
+              userId: '123',
+            },
+            ownerOf: ['chromium'],
+          },
+        ],
+      });
+    });
+
+    it('fetchProjects fails', async () => {
+      const action = userV0.fetchProjects([{userId: '123'}]);
+
+      const error = new Error('mistakes were made');
+      prpcClient.call.returns(Promise.reject(error));
+
+      await action(dispatch);
+
+      sinon.assert.calledWith(dispatch, {type: userV0.FETCH_PROJECTS_START});
+
+      sinon.assert.calledWith(
+          prpcClient.call,
+          'monorail.Users',
+          'GetUsersProjects',
+          {userRefs: [{userId: '123'}]});
+
+      sinon.assert.calledWith(dispatch, {
+        type: userV0.FETCH_PROJECTS_FAILURE,
+        error,
+      });
+    });
+
+    it('setPrefs', async () => {
+      const action = userV0.setPrefs([{name: 'pref_name', value: 'true'}]);
+
+      prpcClient.call.returns(Promise.resolve({}));
+
+      await action(dispatch);
+
+      sinon.assert.calledWith(dispatch, {type: userV0.SET_PREFS_START});
+
+      sinon.assert.calledWith(
+          prpcClient.call,
+          'monorail.Users',
+          'SetUserPrefs',
+          {prefs: [{name: 'pref_name', value: 'true'}]});
+
+      sinon.assert.calledWith(dispatch, {
+        type: userV0.SET_PREFS_SUCCESS,
+        newPrefs: [{name: 'pref_name', value: 'true'}],
+      });
+    });
+
+    it('setPrefs fails', async () => {
+      const action = userV0.setPrefs([{name: 'pref_name', value: 'true'}]);
+
+      const error = new Error('mistakes were made');
+      prpcClient.call.returns(Promise.reject(error));
+
+      await action(dispatch);
+
+      sinon.assert.calledWith(dispatch, {type: userV0.SET_PREFS_START});
+
+      sinon.assert.calledWith(
+          prpcClient.call,
+          'monorail.Users',
+          'SetUserPrefs',
+          {prefs: [{name: 'pref_name', value: 'true'}]});
+
+      sinon.assert.calledWith(dispatch, {
+        type: userV0.SET_PREFS_FAILURE,
+        error,
+      });
+    });
+  });
+});
+
+
+const wrapCurrentUser = (currentUser = {}) => ({userV0: {currentUser}});
+const wrapUser = (user) => ({userV0: user});
diff --git a/static_src/reducers/users.js b/static_src/reducers/users.js
new file mode 100644
index 0000000..af8609c
--- /dev/null
+++ b/static_src/reducers/users.js
@@ -0,0 +1,222 @@
+// Copyright 2020 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.
+
+/**
+ * @fileoverview User actions, selectors, and reducers organized into
+ * a single Redux "Duck" that manages updating and retrieving user state
+ * on the frontend.
+ *
+ * The User data is stored in a normalized format.
+ * `byName` stores all User data indexed by User name.
+ * `user` is a selector that gets the currently viewed User data.
+ *
+ * Reference: https://github.com/erikras/ducks-modular-redux
+ */
+
+import {combineReducers} from 'redux';
+import {createReducer, createKeyedRequestReducer} from './redux-helpers.js';
+import {prpcClient} from 'prpc-client-instance.js';
+import 'shared/typedef.js';
+
+/** @typedef {import('redux').AnyAction} AnyAction */
+
+// Actions
+export const LOG_IN = 'user/LOG_IN';
+
+export const BATCH_GET_START = 'user/BATCH_GET_START';
+export const BATCH_GET_SUCCESS = 'user/BATCH_GET_SUCCESS';
+export const BATCH_GET_FAILURE = 'user/BATCH_GET_FAILURE';
+
+export const FETCH_START = 'user/FETCH_START';
+export const FETCH_SUCCESS = 'user/FETCH_SUCCESS';
+export const FETCH_FAILURE = 'user/FETCH_FAILURE';
+
+export const GATHER_PROJECT_MEMBERSHIPS_START =
+  'user/GATHER_PROJECT_MEMBERSHIPS_START';
+export const GATHER_PROJECT_MEMBERSHIPS_SUCCESS =
+  'user/GATHER_PROJECT_MEMBERSHIPS_SUCCESS';
+export const GATHER_PROJECT_MEMBERSHIPS_FAILURE =
+  'user/GATHER_PROJECT_MEMBERSHIPS_FAILURE';
+
+/* State Shape
+{
+  currentUserName: ?string,
+
+  byName: Object<UserName, User>,
+
+  requests: {
+    batchGet: ReduxRequestState,
+    fetch: ReduxRequestState,
+    gatherProjectMemberships: ReduxRequestState,
+  },
+}
+*/
+
+// Reducers
+
+/**
+ * A reference to the currently logged in user.
+ * @param {?string} state The current user name.
+ * @param {AnyAction} action
+ * @param {User} action.user The user that was logged in.
+ * @return {?string}
+ */
+export const currentUserNameReducer = createReducer(null, {
+  [LOG_IN]: (_state, {user}) => user.name,
+});
+
+/**
+ * All User data indexed by User name.
+ * @param {Object<UserName, User>} state The existing User data.
+ * @param {AnyAction} action
+ * @param {User} action.user The user that was fetched.
+ * @return {Object<UserName, User>}
+ */
+export const byNameReducer = createReducer({}, {
+  [BATCH_GET_SUCCESS]: (state, {users}) => {
+    const newState = {...state};
+    for (const user of users) {
+      newState[user.name] = user;
+    }
+    return newState;
+  },
+  [FETCH_SUCCESS]: (state, {user}) => ({...state, [user.name]: user}),
+});
+
+/**
+ * ProjectMember data indexed by User name.
+ *
+ * Pragma: No normalization for ProjectMember objects. There is never a
+ *  situation when we will have access to ProjectMember names but not associated
+ *  ProjectMember objects so normalizing is unnecessary.
+ * @param {Object<UserName, Array<ProjectMember>>} state The existing User data.
+ * @param {AnyAction} action
+ * @param {UserName} action.userName The resource name of the user that was
+ *   fetched.
+ * @param {Array<ProjectMember>=} action.projectMemberships The project
+ *   memberships for the fetched user.
+ * @return {Object<UserName, Array<ProjectMember>>}
+ */
+export const projectMembershipsReducer = createReducer({}, {
+  [GATHER_PROJECT_MEMBERSHIPS_SUCCESS]: (state, {userName,
+    projectMemberships}) => {
+    const newState = {...state};
+
+    newState[userName] = projectMemberships || [];
+    return newState;
+  },
+});
+
+const requestsReducer = combineReducers({
+  batchGet: createKeyedRequestReducer(
+      BATCH_GET_START, BATCH_GET_SUCCESS, BATCH_GET_FAILURE),
+  fetch: createKeyedRequestReducer(
+      FETCH_START, FETCH_SUCCESS, FETCH_FAILURE),
+  gatherProjectMemberships: createKeyedRequestReducer(
+      GATHER_PROJECT_MEMBERSHIPS_START, GATHER_PROJECT_MEMBERSHIPS_SUCCESS,
+      GATHER_PROJECT_MEMBERSHIPS_FAILURE),
+});
+
+export const reducer = combineReducers({
+  currentUserName: currentUserNameReducer,
+  byName: byNameReducer,
+  projectMemberships: projectMembershipsReducer,
+
+  requests: requestsReducer,
+});
+
+// Selectors
+
+/**
+ * Returns the currently logged in user name, or null if there is none.
+ * @param {any} state
+ * @return {?string}
+ */
+export const currentUserName = (state) => state.users.currentUserName;
+
+/**
+ * Returns all the User data in the store as a mapping from name to User.
+ * @param {any} state
+ * @return {Object<UserName, User>}
+ */
+export const byName = (state) => state.users.byName;
+
+/**
+ * Returns all the ProjectMember data in the store, mapped to Users' names.
+ * @param {any} state
+ * @return {Object<UserName, ProjectMember>}
+ */
+export const projectMemberships = (state) => state.users.projectMemberships;
+
+// Action Creators
+
+/**
+ * Action creator to fetch multiple User objects.
+ * @param {Array<UserName>} names The names of the Users to fetch.
+ * @return {function(function): Promise<void>}
+ */
+export const batchGet = (names) => async (dispatch) => {
+  dispatch({type: BATCH_GET_START});
+
+  try {
+    /** @type {{users: Array<User>}} */
+    const {users} = await prpcClient.call(
+        'monorail.v3.Users', 'BatchGetUsers', {names});
+
+    dispatch({type: BATCH_GET_SUCCESS, users});
+  } catch (error) {
+    dispatch({type: BATCH_GET_FAILURE, error});
+  };
+};
+
+/**
+ * Action creator to fetch a single User object.
+ * TODO(https://crbug.com/monorail/7824): Maybe decouple LOG_IN from
+ * FETCH_SUCCESS once we move away from server-side logins.
+ * @param {UserName} name The resource name of the User to fetch.
+ * @return {function(function): Promise<void>}
+ */
+export const fetch = (name) => async (dispatch) => {
+  dispatch({type: FETCH_START});
+
+  try {
+    /** @type {User} */
+    const user = await prpcClient.call('monorail.v3.Users', 'GetUser', {name});
+    dispatch({type: FETCH_SUCCESS, user});
+    dispatch({type: LOG_IN, user});
+  } catch (error) {
+    dispatch({type: FETCH_FAILURE, error});
+  }
+};
+
+/**
+ * Action creator to fetch ProjectMember objects for a given User.
+ * @param {UserName} name The resource name of the User.
+ * @return {function(function): Promise<void>}
+ */
+export const gatherProjectMemberships = (name) => async (dispatch) => {
+  dispatch({type: GATHER_PROJECT_MEMBERSHIPS_START});
+
+  try {
+    /** @type {{projectMemberships: Array<ProjectMember>}} */
+    const {projectMemberships} = await prpcClient.call(
+        'monorail.v3.Frontend', 'GatherProjectMembershipsForUser',
+        {user: name});
+
+    dispatch({type: GATHER_PROJECT_MEMBERSHIPS_SUCCESS,
+      userName: name, projectMemberships});
+  } catch (error) {
+    // TODO(crbug.com/monorail/7627): Catch actual API errors.
+    dispatch({type: GATHER_PROJECT_MEMBERSHIPS_FAILURE, error});
+  };
+};
+
+export const users = {
+  currentUserName,
+  byName,
+  projectMemberships,
+  batchGet,
+  fetch,
+  gatherProjectMemberships,
+};
diff --git a/static_src/reducers/users.test.js b/static_src/reducers/users.test.js
new file mode 100644
index 0000000..ea0ce61
--- /dev/null
+++ b/static_src/reducers/users.test.js
@@ -0,0 +1,178 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+
+import * as users from './users.js';
+import * as example from 'shared/test/constants-users.js';
+
+import {prpcClient} from 'prpc-client-instance.js';
+
+let dispatch;
+
+describe('user reducers', () => {
+  it('root reducer initial state', () => {
+    const actual = users.reducer(undefined, {type: null});
+    const expected = {
+      currentUserName: null,
+      byName: {},
+      projectMemberships: {},
+      requests: {
+        batchGet: {},
+        fetch: {},
+        gatherProjectMemberships: {},
+      },
+    };
+    assert.deepEqual(actual, expected);
+  });
+
+  it('currentUserName updates on LOG_IN', () => {
+    const action = {type: users.LOG_IN, user: example.USER};
+    const actual = users.currentUserNameReducer(null, action);
+    assert.deepEqual(actual, example.NAME);
+  });
+
+  it('byName updates on BATCH_GET_SUCCESS', () => {
+    const action = {type: users.BATCH_GET_SUCCESS, users: [example.USER]};
+    const actual = users.byNameReducer({}, action);
+    assert.deepEqual(actual, {[example.NAME]: example.USER});
+  });
+
+  describe('projectMembershipsReducer', () => {
+    it('updates on GATHER_PROJECT_MEMBERSHIPS_SUCCESS', () => {
+      const action = {type: users.GATHER_PROJECT_MEMBERSHIPS_SUCCESS,
+        userName: example.NAME, projectMemberships: [example.PROJECT_MEMBER]};
+      const actual = users.projectMembershipsReducer({}, action);
+      assert.deepEqual(actual, {[example.NAME]: [example.PROJECT_MEMBER]});
+    });
+
+    it('sets empty on GATHER_PROJECT_MEMBERSHIPS_SUCCESS', () => {
+      const action = {type: users.GATHER_PROJECT_MEMBERSHIPS_SUCCESS,
+        userName: example.NAME, projectMemberships: undefined};
+      const actual = users.projectMembershipsReducer({}, action);
+      assert.deepEqual(actual, {[example.NAME]: []});
+    });
+  });
+});
+
+describe('user selectors', () => {
+  it('currentUserName', () => {
+    const state = {users: {currentUserName: example.NAME}};
+    assert.deepEqual(users.currentUserName(state), example.NAME);
+  });
+
+  it('byName', () => {
+    const state = {users: {byName: example.BY_NAME}};
+    assert.deepEqual(users.byName(state), example.BY_NAME);
+  });
+
+  it('projectMemberships', () => {
+    const membershipsByName = {[example.NAME]: [example.PROJECT_MEMBER]};
+    const state = {users: {projectMemberships: membershipsByName}};
+    assert.deepEqual(users.projectMemberships(state), membershipsByName);
+  });
+});
+
+describe('user action creators', () => {
+  beforeEach(() => {
+    sinon.stub(prpcClient, 'call');
+    dispatch = sinon.stub();
+  });
+
+  afterEach(() => {
+    prpcClient.call.restore();
+  });
+
+  describe('batchGet', () => {
+    it('success', async () => {
+      prpcClient.call.returns(Promise.resolve({users: [example.USER]}));
+
+      await users.batchGet([example.NAME])(dispatch);
+
+      sinon.assert.calledWith(dispatch, {type: users.BATCH_GET_START});
+
+      const args = {names: [example.NAME]};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Users', 'BatchGetUsers', args);
+
+      const action = {type: users.BATCH_GET_SUCCESS, users: [example.USER]};
+      sinon.assert.calledWith(dispatch, action);
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      await users.batchGet([example.NAME])(dispatch);
+
+      const action = {type: users.BATCH_GET_FAILURE, error: sinon.match.any};
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+
+  describe('fetch', () => {
+    it('success', async () => {
+      prpcClient.call.returns(Promise.resolve(example.USER));
+
+      await users.fetch(example.NAME)(dispatch);
+
+      sinon.assert.calledWith(dispatch, {type: users.FETCH_START});
+
+      const args = {name: example.NAME};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Users', 'GetUser', args);
+
+      const fetchAction = {type: users.FETCH_SUCCESS, user: example.USER};
+      sinon.assert.calledWith(dispatch, fetchAction);
+
+      const logInAction = {type: users.LOG_IN, user: example.USER};
+      sinon.assert.calledWith(dispatch, logInAction);
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws();
+
+      await users.fetch(example.NAME)(dispatch);
+
+      const action = {type: users.FETCH_FAILURE, error: sinon.match.any};
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+
+  describe('gatherProjectMemberships', () => {
+    it('success', async () => {
+      prpcClient.call.returns(Promise.resolve({projectMemberships: [
+        example.PROJECT_MEMBER,
+      ]}));
+
+      await users.gatherProjectMemberships(
+          example.NAME)(dispatch);
+
+      sinon.assert.calledWith(dispatch,
+          {type: users.GATHER_PROJECT_MEMBERSHIPS_START});
+
+      const args = {user: example.NAME};
+      sinon.assert.calledWith(
+          prpcClient.call, 'monorail.v3.Frontend',
+          'GatherProjectMembershipsForUser', args);
+
+      const action = {
+        type: users.GATHER_PROJECT_MEMBERSHIPS_SUCCESS,
+        projectMemberships: [example.PROJECT_MEMBER],
+        userName: example.NAME,
+      };
+      sinon.assert.calledWith(dispatch, action);
+    });
+
+    it('failure', async () => {
+      prpcClient.call.throws(new Error());
+
+      await users.batchGet([example.NAME])(dispatch);
+
+      const action = {type: users.BATCH_GET_FAILURE,
+        error: sinon.match.instanceOf(Error)};
+      sinon.assert.calledWith(dispatch, action);
+    });
+  });
+});
diff --git a/static_src/shared/consts/approval.js b/static_src/shared/consts/approval.js
new file mode 100644
index 0000000..772025d
--- /dev/null
+++ b/static_src/shared/consts/approval.js
@@ -0,0 +1,79 @@
+// Copyright 2019 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.
+
+/**
+ * @fileoverview A file containing common constants used in the Approvals
+ * feature.
+ */
+
+// Only approvers are allowed to set an approval state to one of these states.
+export const APPROVER_RESTRICTED_STATUSES = new Set(
+    ['NA', 'Approved', 'NotApproved']);
+
+// Map the internal enum names used in Monorail's backend from approval
+// statuses to user friendly names.
+export const STATUS_ENUM_TO_TEXT = {
+  '': 'NotSet',
+  'NEEDS_REVIEW': 'NeedsReview',
+  'NA': 'NA',
+  'REVIEW_REQUESTED': 'ReviewRequested',
+  'REVIEW_STARTED': 'ReviewStarted',
+  'NEED_INFO': 'NeedInfo',
+  'APPROVED': 'Approved',
+  'NOT_APPROVED': 'NotApproved',
+};
+
+// Reverse mapping of user friendly names to internal enum names.
+// Note that NotSet -> NOT_SET maps differently in reverse because
+// the backend sends an empty message to communicate NOT_SET.
+export const TEXT_TO_STATUS_ENUM = {
+  'NotSet': 'NOT_SET',
+  'NeedsReview': 'NEEDS_REVIEW',
+  'NA': 'NA',
+  'ReviewRequested': 'REVIEW_REQUESTED',
+  'ReviewStarted': 'REVIEW_STARTED',
+  'NeedInfo': 'NEED_INFO',
+  'Approved': 'APPROVED',
+  'NotApproved': 'NOT_APPROVED',
+};
+
+// Statuses mapped to CSS classes used to apply custom styles per
+// status like background colors.
+export const STATUS_CLASS_MAP = {
+  'NotSet': 'status-notset',
+  'NeedsReview': 'status-notset',
+  'NA': 'status-na',
+  'ReviewRequested': 'status-pending',
+  'ReviewStarted': 'status-pending',
+  'NeedInfo': 'status-pending',
+  'Approved': 'status-approved',
+  'NotApproved': 'status-rejected',
+};
+
+// Hardcoded frontent documentation for each approval status.
+export const STATUS_DOCSTRING_MAP = {
+  'NotSet': '',
+  'NeedsReview': 'Review/survey not started',
+  'NA': 'Approval gate not required',
+  'ReviewRequested': 'Approval requested',
+  'ReviewStarted': 'Approval in progress',
+  'NeedInfo': 'Approval review needs more information',
+  'Approved': 'Approved for Launch',
+  'NotApproved': 'Not Approved for Launch',
+};
+
+// The Material Design icon names that are attached to each
+// CSS class.
+export const CLASS_ICON_MAP = {
+  'status-na': 'remove',
+  'status-notset': 'warning',
+  'status-pending': 'autorenew',
+  'status-approved': 'done',
+  'status-rejected': 'close',
+};
+
+// Statuses formated as an Array rather than an Object for ease of use
+// by components.
+export const APPROVAL_STATUSES = Object.keys(STATUS_CLASS_MAP).map(
+    (status) => ({status, docstring: STATUS_DOCSTRING_MAP[status], rank: 1}));
diff --git a/static_src/shared/consts/index.js b/static_src/shared/consts/index.js
new file mode 100644
index 0000000..bb196b3
--- /dev/null
+++ b/static_src/shared/consts/index.js
@@ -0,0 +1,4 @@
+// Copyright 2020 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.
+export const SERVER_LIST_ISSUES_LIMIT = 100000;
diff --git a/static_src/shared/consts/permissions.js b/static_src/shared/consts/permissions.js
new file mode 100644
index 0000000..8c8ef1b
--- /dev/null
+++ b/static_src/shared/consts/permissions.js
@@ -0,0 +1,11 @@
+// Copyright 2019 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.
+
+export const ISSUE_EDIT_PERMISSION = 'editissue';
+export const ISSUE_EDIT_SUMMARY_PERMISSION = 'editissuesummary';
+export const ISSUE_EDIT_STATUS_PERMISSION = 'editissuestatus';
+export const ISSUE_EDIT_OWNER_PERMISSION = 'editissueowner';
+export const ISSUE_EDIT_CC_PERMISSION = 'editissuecc';
+export const ISSUE_DELETE_PERMISSION = 'deleteissue';
+export const ISSUE_FLAGSPAM_PERMISSION = 'flagspam';
diff --git a/static_src/shared/converters.js b/static_src/shared/converters.js
new file mode 100644
index 0000000..308df2d
--- /dev/null
+++ b/static_src/shared/converters.js
@@ -0,0 +1,102 @@
+// Copyright 2020 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.
+// Based on: https://source.chromium.org/chromium/infra/infra/+/main:appengine/monorail/project/project_constants.py;l=13
+const PROJECT_NAME_PATTERN = '[a-z0-9][-a-z0-9]*[a-z0-9]';
+const USER_ID_PATTERN = '\\d+';
+
+const PROJECT_MEMBER_NAME_REGEX = new RegExp(
+    `projects/(${PROJECT_NAME_PATTERN})/members/(${USER_ID_PATTERN})`);
+
+const USER_NAME_REGEX = new RegExp(`users/(${USER_ID_PATTERN})`);
+
+const PROJECT_NAME_REGEX = new RegExp(`projects/(${PROJECT_NAME_PATTERN})`);
+
+
+/**
+ * Custom error class for handling invalidly formatted resource names.
+ */
+export class ResourceNameError extends Error {
+  /** @override */
+  constructor(message) {
+    super(message || 'Invalid resource name format');
+  }
+}
+
+/**
+ * Returns a FieldMask given an array of string paths.
+ * https://developers.google.com/protocol-buffers/docs/reference/csharp/class/google/protobuf/well-known-types/field-mask#paths
+ * https://source.chromium.org/chromium/chromium/src/+/main:third_party/protobuf/python/google/protobuf/internal/well_known_types.py;l=425;drc=e10d98917fee771b0947a57468d1cadac446bc42
+ * @param {Array<string>} paths The given paths to turn into a field mask.
+ *   These should be a comma separated list of camel case strings.
+ * @return {string}
+ */
+export function pathsToFieldMask(paths) {
+  return paths.join(',');
+}
+
+/**
+ * Extract a User ID from a User resource name.
+ * @param {UserName} user User resource name.
+ * @return {string} User ID.
+ * @throws {Error} if the User resource name is invalid.
+ */
+export function extractUserId(user) {
+  const matches = user.match(USER_NAME_REGEX);
+  if (!matches) {
+    throw new ResourceNameError();
+  }
+  return matches[1];
+}
+
+/**
+ * Extract a project's displayName from a Project resource name.
+ * @param {ProjectName} project Project resource name.
+ * @return {string} The project's displayName.
+ * @throws {Error} if the Project resource name is invalid.
+ */
+export function extractProjectDisplayName(project) {
+  const matches = project.match(PROJECT_NAME_REGEX);
+  if (!matches) {
+    throw new ResourceNameError();
+  }
+  return matches[1];
+}
+
+/**
+ * Gets the displayName of the Project referenced in a ProjectMember
+ * resource name.
+ * @param {ProjectMemberName} projectMember ProjectMember resource name.
+ * @return {string} A display name for a project.
+ */
+export function extractProjectFromProjectMember(projectMember) {
+  const matches = projectMember.match(PROJECT_MEMBER_NAME_REGEX);
+  if (!matches) {
+    throw new ResourceNameError();
+  }
+  return matches[1];
+}
+
+/**
+ * Creates a ProjectStar resource name based on a UserName nad a ProjectName.
+ * @param {ProjectName} project Resource name of the referenced project.
+ * @param {UserName} user Resource name of the referenced user.
+ * @return {ProjectStarName}
+ * @throws {Error} If the project or user resource name is invalid.
+ */
+export function projectAndUserToStarName(project, user) {
+  if (!project || !user) return undefined;
+  const userId = extractUserId(user);
+  const projectName = extractProjectDisplayName(project);
+  return `users/${userId}/projectStars/${projectName}`;
+}
+
+/**
+ * Converts a given ProjectMemberName to just the ProjectName segment present.
+ * @param {ProjectMemberName} projectMember Resource name of a ProjectMember.
+ * @return {ProjectName} Resource name of the referenced project.
+ */
+export function projectMemberToProjectName(projectMember) {
+  const project = extractProjectFromProjectMember(projectMember);
+  return `projects/${project}`;
+}
diff --git a/static_src/shared/converters.test.js b/static_src/shared/converters.test.js
new file mode 100644
index 0000000..428a74d
--- /dev/null
+++ b/static_src/shared/converters.test.js
@@ -0,0 +1,112 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import {ResourceNameError, pathsToFieldMask, extractUserId,
+  extractProjectDisplayName, extractProjectFromProjectMember,
+  projectAndUserToStarName, projectMemberToProjectName} from './converters.js';
+
+describe('pathsToFieldMask', () => {
+  it('converts an array of strings to a FieldMask', () => {
+    assert.equal(pathsToFieldMask(['foo', 'barQux', 'qaz']), 'foo,barQux,qaz');
+  });
+});
+
+describe('extractUserId', () => {
+  it('throws error on improperly formatted resource name', () => {
+    assert.throws(() => extractUserId('projects/1234'),
+        ResourceNameError);
+    assert.throws(() => extractUserId('users/notAnId'),
+        ResourceNameError);
+    assert.throws(() => extractUserId('user/1234'),
+        ResourceNameError);
+  });
+
+  it('extracts user ID', () => {
+    assert.equal(extractUserId('users/1234'), '1234');
+  });
+});
+
+describe('extractProjectDisplayName', () => {
+  it('throws error on improperly formatted resource name', () => {
+    assert.throws(() => extractProjectDisplayName('users/1234'),
+        ResourceNameError);
+    assert.throws(() => extractProjectDisplayName('projects/(what)'),
+        ResourceNameError);
+    assert.throws(() => extractProjectDisplayName('project/test'),
+        ResourceNameError);
+    assert.throws(() => extractProjectDisplayName('projects/-test-'),
+        ResourceNameError);
+  });
+
+  it('extracts project display name', () => {
+    assert.equal(extractProjectDisplayName('projects/1234'), '1234');
+    assert.equal(extractProjectDisplayName('projects/monorail'), 'monorail');
+    assert.equal(extractProjectDisplayName('projects/test-project'),
+        'test-project');
+    assert.equal(extractProjectDisplayName('projects/what-is-love2'),
+        'what-is-love2');
+  });
+});
+
+describe('extractProjectFromProjectMember', () => {
+  it('throws error on improperly formatted resource name', () => {
+    assert.throws(
+        () => extractProjectFromProjectMember(
+            'projects/monorail/members/fakeName'),
+        ResourceNameError);
+    assert.throws(
+        () => extractProjectFromProjectMember(
+            'projects/-invalid-project-/members/1234'),
+        ResourceNameError);
+    assert.throws(
+        () => extractProjectFromProjectMember(
+            'projects/monorail/member/1234'),
+        ResourceNameError);
+  });
+
+  it('extracts project display name', () => {
+    assert.equal(extractProjectFromProjectMember(
+        'projects/1234/members/1234'), '1234');
+    assert.equal(extractProjectFromProjectMember(
+        'projects/monorail/members/1234'), 'monorail');
+    assert.equal(extractProjectFromProjectMember(
+        'projects/test-project/members/1234'), 'test-project');
+    assert.equal(extractProjectFromProjectMember(
+        'projects/what-is-love2/members/1234'), 'what-is-love2');
+  });
+});
+
+describe('projectAndUserToStarName', () => {
+  it('throws error on improperly formatted resource name', () => {
+    assert.throws(
+        () => projectAndUserToStarName('users/1234', 'projects/monorail'),
+        ResourceNameError);
+  });
+
+  it('generates project star resource name', () => {
+    assert.equal(projectAndUserToStarName('projects/monorail', 'users/1234'),
+        'users/1234/projectStars/monorail');
+  });
+});
+
+describe('projectMemberToProjectName', () => {
+  it('throws error on improperly formatted resource name', () => {
+    assert.throws(
+        () => projectMemberToProjectName(
+            'projects/monorail/members/fakeName'),
+        ResourceNameError);
+  });
+
+  it('creates project resource name', () => {
+    assert.equal(projectMemberToProjectName(
+        'projects/1234/members/1234'), 'projects/1234');
+    assert.equal(projectMemberToProjectName(
+        'projects/monorail/members/1234'), 'projects/monorail');
+    assert.equal(projectMemberToProjectName(
+        'projects/test-project/members/1234'), 'projects/test-project');
+    assert.equal(projectMemberToProjectName(
+        'projects/what-is-love2/members/1234'), 'projects/what-is-love2');
+  });
+});
diff --git a/static_src/shared/convertersV0.js b/static_src/shared/convertersV0.js
new file mode 100644
index 0000000..ffb8a36
--- /dev/null
+++ b/static_src/shared/convertersV0.js
@@ -0,0 +1,610 @@
+// Copyright 2019 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.
+
+/**
+ * @fileoverview This file collects helpers for managing various canonical
+ * formats used within Monorail's frontend. When converting between common
+ * Objects, for example, it's recommended to use the helpers in this file
+ * to ensure consistency across conversions.
+ *
+ * Converters between v0 and v3 object types are included in this file
+ * as well.
+ */
+
+import qs from 'qs';
+
+import {equalsIgnoreCase, capitalizeFirst} from './helpers.js';
+import {fromShortlink} from 'shared/federated.js';
+import {UserInputError} from 'shared/errors.js';
+import './typedef.js';
+
+/**
+ * Common restriction labels to do things users frequently want to do
+ * with restrictions.
+ * This code is a frontend replication of old Python server code that
+ * hardcoded specific restriction labels.
+ * @type {Array<LabelDef>}
+ */
+const FREQUENT_ISSUE_RESTRICTIONS = Object.freeze([
+  {
+    label: 'Restrict-View-EditIssue',
+    docstring: 'Only users who can edit the issue may access it',
+  },
+  {
+    label: 'Restrict-AddIssueComment-EditIssue',
+    docstring: 'Only users who can edit the issue may add comments',
+  },
+]);
+
+/**
+ * The set of actions that permissions on an issue can be applied to.
+ * For example, in the Restrict-View-Google label, "View" is an action.
+ * @type {Array<string>}
+ */
+const STANDARD_ISSUE_ACTIONS = [
+  'View', 'EditIssue', 'AddIssueComment', 'DeleteIssue', 'FlagSpam'];
+
+// A Regex defining the canonical String format used in Monorail for allowing
+// users to input structured localId and projectName values in free text inputs.
+// Match: projectName:localId format where projectName is optional.
+// ie: "monorail:1234" or "1234".
+const ISSUE_ID_REGEX = /(?:([a-z0-9-]+):)?(\d+)/i;
+
+// RFC 2821-compliant email address regex used by the server when validating
+// email addresses.
+// eslint-disable-next-line max-len
+const RFC_2821_EMAIL_REGEX = /^[-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+(?:[.][-a-zA-Z0-9!#$%&'*+\/=?^_`{|}~]+)*@(?:(?:[0-9a-zA-Z](?:[-]*[0-9a-zA-Z]+)*)(?:\.[0-9a-zA-Z](?:[-]*[0-9a-zA-Z]+)*)*)\.(?:[a-zA-Z]{2,9})$/;
+
+/**
+ * Converts a displayName into a canonical UserRef Object format.
+ *
+ * @param {string} displayName The user's email address, used as a display name.
+ * @return {UserRef} UserRef formatted object that contains a
+ *   user's displayName.
+ */
+export function displayNameToUserRef(displayName) {
+  if (displayName && !RFC_2821_EMAIL_REGEX.test(displayName)) {
+    throw new UserInputError(`Invalid email address: ${displayName}`);
+  }
+  return {displayName};
+}
+
+/**
+ * Converts a displayName into a canonical UserRef Object format.
+ *
+ * @param {string} user The user's email address, used as a display name,
+ *   or their numeric user ID.
+ * @return {UserRef} UserRef formatted object that contains a
+ *   user's displayName or userId.
+ */
+export function userIdOrDisplayNameToUserRef(user) {
+  if (RFC_2821_EMAIL_REGEX.test(user)) {
+    return {displayName: user};
+  }
+  const userId = Number.parseInt(user);
+  if (Number.isNaN(userId)) {
+    throw new UserInputError(`Invalid email address or user ID: ${user}`);
+  }
+  return {userId};
+}
+
+/**
+ * Converts an Object into a standard UserRef Object with only a displayName
+ * and userId. Used for cases when we need to use only the data required to
+ * identify a unique user, such as when requesting information related to a user
+ * through the API.
+ *
+ * @param {UserV0} user An Object representing a user, in the JSON format
+ *   returned by the pRPC API.
+ * @return {UserRef} UserRef style Object.
+ */
+export function userToUserRef(user) {
+  if (!user) return {};
+  const {userId, displayName} = user;
+  return {userId, displayName};
+}
+
+/**
+ * Converts a User resource name to a numeric user ID.
+ * @param {string} name
+ * @return {number}
+ */
+export function userNameToId(name) {
+  return Number.parseInt(name.split('/')[1]);
+}
+
+/**
+ * Converts a v3 API User object to a v0 API UserRef.
+ * @param {User} user
+ * @return {UserRef}
+ */
+export function userV3ToRef(user) {
+  return {userId: userNameToId(user.name), displayName: user.displayName};
+}
+
+/**
+ * Convert a UserRef style Object to a userId string.
+ *
+ * @param {UserRef} userRef Object expected to contain a userId key.
+ * @return {number} the unique ID of the user.
+ */
+export function userRefToId(userRef) {
+  return userRef && userRef.userId;
+}
+
+/**
+ * Extracts the displayName property from a UserRef Object.
+ *
+ * @param {UserRef} userRef UserRef Object uniquely identifying a user.
+ * @return {string} The user's display name (email address).
+ */
+export function userRefToDisplayName(userRef) {
+  return userRef && userRef.displayName;
+}
+
+/**
+ * Converts an Array of UserRefs to an Array of display name Strings.
+ *
+ * @param {Array<UserRef>} userRefs Array of UserRefs.
+ * @return {Array<string>} Array of display names.
+ */
+export function userRefsToDisplayNames(userRefs) {
+  if (!userRefs) return [];
+  return userRefs.map(userRefToDisplayName);
+}
+
+/**
+ * Takes an Array of UserRefs and keeps only UserRefs where ID
+ * is known.
+ *
+ * @param {Array<UserRef>} userRefs Array of UserRefs.
+ * @return {Array<UserRef>} Filtered Array IDs guaranteed.
+ */
+export function userRefsWithIds(userRefs) {
+  if (!userRefs) return [];
+  return userRefs.filter((u) => u.userId);
+}
+
+/**
+ * Takes an Array of UserRefs and returns displayNames for
+ * only those refs with IDs specified.
+ *
+ * @param {Array<UserRef>} userRefs Array of UserRefs.
+ * @return {Array<string>} Array of user displayNames.
+ */
+export function filteredUserDisplayNames(userRefs) {
+  if (!userRefs) return [];
+  return userRefsToDisplayNames(userRefsWithIds(userRefs));
+}
+
+/**
+ * Takes in the name of a label and turns it into a LabelRef Object.
+ *
+ * @param {string} label The name of a label.
+ * @return {LabelRef}
+ */
+export function labelStringToRef(label) {
+  return {label};
+}
+
+/**
+ * Takes in the name of a label and turns it into a LabelRef Object.
+ *
+ * @param {LabelRef} labelRef
+ * @return {string} The name of the label.
+ */
+export function labelRefToString(labelRef) {
+  if (!labelRef) return;
+  return labelRef.label;
+}
+
+/**
+ * Converts an Array of LabelRef Objects to label name Strings.
+ *
+ * @param {Array<LabelRef>} labelRefs Array of LabelRef Objects.
+ * @return {Array<string>} Array of label names.
+ */
+export function labelRefsToStrings(labelRefs) {
+  if (!labelRefs) return [];
+  return labelRefs.map(labelRefToString);
+}
+
+/**
+ * Filters a list of labels into a list of only labels with one word.
+ *
+ * @param {Array<LabelRef>} labelRefs
+ * @return {Array<LabelRef>} only the LabelRefs that do not have multiple words.
+ */
+export function labelRefsToOneWordLabels(labelRefs) {
+  if (!labelRefs) return [];
+  return labelRefs.filter(({label}) => {
+    return isOneWordLabel(label);
+  });
+}
+
+/**
+ * Checks whether a particular label is one word.
+ *
+ * @param {string} label the name of the label being checked.
+ * @return {boolean} Whether the label is one word or not.
+ */
+export function isOneWordLabel(label = '') {
+  const words = label.split('-');
+  return words.length === 1;
+}
+
+/**
+ * Creates a LabelDef Object for a restriction label given an action
+ * and a permission.
+ * @param {string} action What action a restriction is applied to.
+ *   eg. "View", "EditIssue", "AddIssueComment".
+ * @param {string} permission The permission group that has access to
+ *   the restricted behavior. eg. "Google".
+ * @return {LabelDef}
+ */
+export function _makeRestrictionLabel(action, permission) {
+  const perm = capitalizeFirst(permission);
+  return {
+    label: `Restrict-${action}-${perm}`,
+    docstring: `Permission ${perm} needed to use ${action}`,
+  };
+}
+
+/**
+ * Given a list of custom permissions defined for a project, this function
+ * generates simulated LabelDef objects for those permissions + default
+ * restriction labels that all projects should have.
+ * @param {Array<string>=} customPermissions
+ * @param {Array<string>=} actions
+ * @param {Array<LabelDef>=} defaultRestrictionLabels Configurable default
+ *   restriction labels to include regardless of custom permissions.
+ * @return {Array<LabelDef>}
+ */
+export function restrictionLabelsForPermissions(customPermissions = [],
+    actions = STANDARD_ISSUE_ACTIONS,
+    defaultRestrictionLabels = FREQUENT_ISSUE_RESTRICTIONS) {
+  const labels = [];
+  actions.forEach((action) => {
+    customPermissions.forEach((permission) => {
+      labels.push(_makeRestrictionLabel(action, permission));
+    });
+  });
+  return [...labels, ...defaultRestrictionLabels];
+}
+
+/**
+ * Converts a custom field name in to the prefix format used in
+ * enum type field values. Monorail defines the enum options for
+ * a custom field as labels.
+ *
+ * @param {string} fieldName Name of a custom field.
+ * @return {string} The label prefixes for enum choices
+ *   associated with the field.
+ */
+export function fieldNameToLabelPrefix(fieldName) {
+  return `${fieldName.toLowerCase()}-`;
+}
+
+/**
+ * Finds all prefixes in a label's name, delimited by '-'. A given label
+ * can have multiple possible prefixes, one for each instance of '-'.
+ * Labels that share the same prefix are implicitly treated like
+ * enum fields in certain parts of Monorail's UI.
+ *
+ * @param {string} label The name of the label.
+ * @return {Array<string>} All prefixes in the label.
+ */
+export function labelNameToLabelPrefixes(label) {
+  if (!label) return;
+  const prefixes = [];
+  for (let i = 0; i < label.length; i++) {
+    if (label[i] === '-') {
+      prefixes.push(label.substring(0, i));
+    }
+  }
+  return prefixes;
+}
+
+/**
+ * Truncates a label to include only the label's value, delimited
+ * by '-'.
+ *
+ * @param {string} label The name of the label.
+ * @param {string} fieldName The field name that the label is having a
+ *   value extracted for.
+ * @return {string} The label's value.
+ */
+export function labelNameToLabelValue(label, fieldName) {
+  if (!label || !fieldName || isOneWordLabel(label)) return null;
+  const prefix = fieldName.toLowerCase() + '-';
+  if (!label.toLowerCase().startsWith(prefix)) return null;
+
+  return label.substring(prefix.length);
+}
+
+/**
+ * Converts a FieldDef to a v3 FieldDef resource name.
+ * @param {string} projectName The name of the project.
+ * @param {FieldDef} fieldDef A FieldDef Object from the pRPC API proto objects.
+ * @return {string} The v3 FieldDef name, e.g. 'projects/proj/fieldDefs/fieldId'
+ */
+export function fieldDefToName(projectName, fieldDef) {
+  return `projects/${projectName}/fieldDefs/${fieldDef.fieldRef.fieldId}`;
+}
+
+/**
+ * Extracts just the name of the status from a StatusRef Object.
+ *
+ * @param {StatusRef} statusRef
+ * @return {string} The name of the status.
+ */
+export function statusRefToString(statusRef) {
+  return statusRef.status;
+}
+
+/**
+ * Extracts the name of multiple statuses from multiple StatusRef Objects.
+ *
+ * @param {Array<StatusRef>} statusRefs
+ * @return {Array<string>} The names of the statuses inputted.
+ */
+export function statusRefsToStrings(statusRefs) {
+  return statusRefs.map(statusRefToString);
+}
+
+/**
+ * Takes the name of a component and converts it into a ComponentRef
+ * Object.
+ *
+ * @param {string} path Name of the component.
+ * @return {ComponentRef}
+ */
+export function componentStringToRef(path) {
+  return {path};
+}
+
+/**
+ * Extracts just the name of a component from a ComponentRef.
+ *
+ * @param {ComponentRef} componentRef
+ * @return {string} The name of the component.
+ */
+export function componentRefToString(componentRef) {
+  return componentRef && componentRef.path;
+}
+
+/**
+ * Extracts the names of multiple components from multiple refs.
+ *
+ * @param {Array<ComponentRef>} componentRefs
+ * @return {Array<string>} Array of component names.
+ */
+export function componentRefsToStrings(componentRefs) {
+  if (!componentRefs) return [];
+  return componentRefs.map(componentRefToString);
+}
+
+/**
+ * Takes a String with a project name and issue ID in Monorail's canonical
+ * IssueRef format and converts it into an IssueRef Object.
+ *
+ * @param {IssueRefString} idStr A String of the format projectName:1234, a
+ *   standard issue ID input format used across Monorail.
+ * @param {string=} defaultProjectName The implied projectName if none is
+ *   specified.
+ * @return {IssueRef}
+ * @throws {UserInputError} If the IssueRef string is invalidly formatted.
+ */
+export function issueStringToRef(idStr, defaultProjectName) {
+  if (!idStr) return {};
+
+  // If the string includes a slash, it's an external tracker ref.
+  if (idStr.includes('/')) {
+    return {extIdentifier: idStr};
+  }
+
+  const matches = idStr.match(ISSUE_ID_REGEX);
+  if (!matches) {
+    throw new UserInputError(
+        `Invalid issue ref: ${idStr}. Expected [projectName:]issueId.`);
+  }
+  const projectName = matches[1] ? matches[1] : defaultProjectName;
+
+  if (!projectName) {
+    throw new UserInputError(
+        `Issue ref must include a project name or specify a default project.`);
+  }
+
+  const localId = Number.parseInt(matches[2]);
+  return {localId, projectName};
+}
+
+/**
+ * Takes an IssueRefString and converts it into an IssueRef Object, checking
+ * that it's not the same as another specified issueRef. ie: validates that an
+ * inputted blocking issue is not the same as the issue being blocked.
+ *
+ * @param {IssueRef} issueRef The issue that the IssueRefString is being
+ *   compared to.
+ * @param {IssueRefString} idStr A String of the format projectName:1234, a
+ *   standard issue ID input format used across Monorail.
+ * @return {IssueRef}
+ * @throws {UserInputError} If the IssueRef string is invalidly formatted
+ *   or if the issue is equivalent to the linked issue.
+ */
+export function issueStringToBlockingRef(issueRef, idStr) {
+  // TODO(zhangtiff): Consider simplifying this helper function to only validate
+  // that an issue does not block itself rather than also doing string parsing.
+  const result = issueStringToRef(idStr, issueRef.projectName);
+  if (result.projectName === issueRef.projectName &&
+      result.localId === issueRef.localId) {
+    throw new UserInputError(
+        `Invalid issue ref: ${idStr
+        }. Cannot merge or block an issue on itself.`);
+  }
+  return result;
+}
+
+/**
+ * Converts an IssueRef into a canonical String format. ie: "project:1234"
+ *
+ * @param {IssueRef} ref
+ * @param {string=} projectName The current project context. The
+ *   generated String excludes the projectName if it matches the
+ *   project the user is currently viewing, to create simpler
+ *   issue ID links.
+ * @return {IssueRefString} A String representing the pieces of an IssueRef.
+ */
+export function issueRefToString(ref, projectName = undefined) {
+  if (!ref) return '';
+
+  if (ref.hasOwnProperty('extIdentifier')) {
+    return ref.extIdentifier;
+  }
+
+  if (projectName && projectName.length &&
+      equalsIgnoreCase(ref.projectName, projectName)) {
+    return `${ref.localId}`;
+  }
+  return `${ref.projectName}:${ref.localId}`;
+}
+
+/**
+ * Converts a full Issue Object into only the pieces of its data needed
+ * to define an IssueRef. Useful for cases when we don't want to send excess
+ * information to ifentify an Issue.
+ *
+ * @param {Issue} issue A full Issue Object.
+ * @return {IssueRef} Just the ID part of the Issue Object.
+ */
+export function issueToIssueRef(issue) {
+  if (!issue) return {};
+
+  return {localId: issue.localId,
+    projectName: issue.projectName};
+}
+
+/**
+ * Converts a full Issue Object into an IssueRefString
+ *
+ * @param {Issue} issue A full Issue Object.
+ * @param {string=} defaultProjectName The default project the String should
+ *   assume.
+ * @return {IssueRefString} A String with all the data needed to
+ *   construct an IssueRef.
+ */
+export function issueToIssueRefString(issue, defaultProjectName = undefined) {
+  if (!issue) return '';
+
+  const ref = issueToIssueRef(issue);
+  return issueRefToString(ref, defaultProjectName);
+}
+
+/**
+ * Creates a link to a particular issue specified in an IssueRef.
+ *
+ * @param {IssueRef} ref The issue that the generated URL will point to.
+ * @param {Object} queryParams The URL params for the URL.
+ * @return {string} The URL for the issue's page as a relative path.
+ */
+export function issueRefToUrl(ref, queryParams = {}) {
+  const queryParamsCopy = {...queryParams};
+
+  if (!ref) return '';
+
+  if (ref.extIdentifier) {
+    const extRef = fromShortlink(ref.extIdentifier);
+    if (!extRef) {
+      console.error(`No tracker found for reference: ${ref.extIdentifier}`);
+      return '';
+    }
+    return extRef.toURL();
+  }
+
+  let paramString = '';
+  if (Object.keys(queryParamsCopy).length) {
+    delete queryParamsCopy.id;
+
+    paramString = `&${qs.stringify(queryParamsCopy)}`;
+  }
+
+  return `/p/${ref.projectName}/issues/detail?id=${ref.localId}${paramString}`;
+}
+
+/**
+ * Converts multiple IssueRef Objects into Strings in the canonical IssueRef
+ * String form expeced by Monorail.
+ *
+ * @param {Array<IssueRef>} arr Array of IssueRefs to convert to Strings.
+ * @param {string} projectName The default project name.
+ * @return {Array<IssueRefString>} Array of Strings where each entry is
+ *   represents one IssueRef.
+ */
+export function issueRefsToStrings(arr, projectName) {
+  if (!arr || !arr.length) return [];
+  return arr.map((ref) => issueRefToString(ref, projectName));
+}
+
+/**
+ * Converts an issue name in the v3 API to an IssueRef in the v0 API.
+ * @param {string} name The v3 Issue name, e.g. 'projects/proj-name/issues/123'
+ * @return {IssueRef} An IssueRef.
+ */
+export function issueNameToRef(name) {
+  const nameParts = name.split('/');
+  return {
+    projectName: nameParts[1],
+    localId: parseInt(nameParts[3]),
+  };
+}
+
+/**
+ * Converts an issue name in the v3 API to an IssueRefString in the v0 API.
+ * @param {string} name The v3 Issue name, e.g. 'projects/proj-name/issues/123'
+ * @return {IssueRefString} A String with all the data needed to
+ *   construct an IssueRef.
+ */
+export function issueNameToRefString(name) {
+  const nameParts = name.split('/');
+  return `${nameParts[1]}:${nameParts[3]}`;
+}
+
+/**
+ * Converts an v0 Issue to a v3 Issue name.
+ * @param {Issue} issue An Issue Object from the pRPC API issue_objects.proto.
+ * @return {string} The v3 Issue name, e.g. 'projects/proj-name/issues/123'
+ */
+export function issueToName(issue) {
+  return `projects/${issue.projectName}/issues/${issue.localId}`;
+}
+
+/**
+ * Since Monorail stores issue descriptions and description updates as comments,
+ * this function exists to filter a list of comments to get only those comments
+ * that are marked as descriptions.
+ *
+ * @param {Array<IssueComment>} comments List of many comments, usually all
+ *   comments associated with an issue.
+ * @return {Array<IssueComment>} List of only the comments that are
+ *   descriptions.
+ */
+export function commentListToDescriptionList(comments) {
+  if (!comments) return [];
+  // First comment is always a description, even if it doesn't have a
+  // descriptionNum.
+  return comments.filter((c, i) => !i || c.descriptionNum);
+}
+
+/**
+ * Wraps a String value for a field and a FieldRef into a FieldValue
+ * Object.
+ *
+ * @param {FieldRef} fieldRef A reference to the custom field that this
+ *   value is tied to.
+ * @param {string} value The value associated with the FieldRef.
+ * @return {FieldValue}
+ */
+export function valueToFieldValue(fieldRef, value) {
+  return {fieldRef, value};
+}
diff --git a/static_src/shared/convertersV0.test.js b/static_src/shared/convertersV0.test.js
new file mode 100644
index 0000000..2e34622
--- /dev/null
+++ b/static_src/shared/convertersV0.test.js
@@ -0,0 +1,427 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {UserInputError} from 'shared/errors.js';
+import * as exampleUsers from 'shared/test/constants-users.js';
+import {displayNameToUserRef, userIdOrDisplayNameToUserRef,
+  userNameToId, userV3ToRef, labelStringToRef,
+  labelRefToString, labelRefsToStrings, labelRefsToOneWordLabels,
+  isOneWordLabel, _makeRestrictionLabel, restrictionLabelsForPermissions,
+  fieldDefToName, statusRefToString, statusRefsToStrings,
+  componentStringToRef, componentRefToString, componentRefsToStrings,
+  issueStringToRef, issueStringToBlockingRef, issueRefToString,
+  issueRefToUrl, fieldNameToLabelPrefix, labelNameToLabelPrefixes,
+  labelNameToLabelValue, commentListToDescriptionList, valueToFieldValue,
+  issueToIssueRef, issueNameToRef, issueNameToRefString, issueToName,
+} from './convertersV0.js';
+
+describe('displayNameToUserRef', () => {
+  it('converts displayName', () => {
+    assert.deepEqual(
+        displayNameToUserRef('foo@bar.com'),
+        {displayName: 'foo@bar.com'});
+  });
+
+  it('throws on invalid email', () => {
+    assert.throws(() => displayNameToUserRef('foo'), UserInputError);
+  });
+});
+
+describe('userIdOrDisplayNameToUserRef', () => {
+  it('converts userId', () => {
+    assert.throws(() => displayNameToUserRef('foo'));
+    assert.deepEqual(
+        userIdOrDisplayNameToUserRef('12345678'),
+        {userId: 12345678});
+  });
+
+  it('converts displayName', () => {
+    assert.deepEqual(
+        userIdOrDisplayNameToUserRef('foo@bar.com'),
+        {displayName: 'foo@bar.com'});
+  });
+
+  it('throws if not an email or numeric id', () => {
+    assert.throws(() => userIdOrDisplayNameToUserRef('foo'), UserInputError);
+  });
+});
+
+it('userNameToId', () => {
+  assert.deepEqual(userNameToId(exampleUsers.NAME), exampleUsers.ID);
+});
+
+it('userV3ToRef', () => {
+  assert.deepEqual(userV3ToRef(exampleUsers.USER), exampleUsers.USER_REF);
+});
+
+describe('labelStringToRef', () => {
+  it('converts label', () => {
+    assert.deepEqual(labelStringToRef('foo'), {label: 'foo'});
+  });
+});
+
+describe('labelRefToString', () => {
+  it('converts labelRef', () => {
+    assert.deepEqual(labelRefToString({label: 'foo'}), 'foo');
+  });
+});
+
+describe('labelRefsToStrings', () => {
+  it('converts labelRefs', () => {
+    assert.deepEqual(labelRefsToStrings([{label: 'foo'}, {label: 'test'}]),
+        ['foo', 'test']);
+  });
+});
+
+describe('labelRefsToOneWordLabels', () => {
+  it('empty', () => {
+    assert.deepEqual(labelRefsToOneWordLabels(), []);
+    assert.deepEqual(labelRefsToOneWordLabels([]), []);
+  });
+
+  it('filters multi-word labels', () => {
+    assert.deepEqual(labelRefsToOneWordLabels([
+      {label: 'hello'},
+      {label: 'filter-me'},
+      {label: 'hello-world'},
+      {label: 'world'},
+      {label: 'this-label-has-so-many-words'},
+    ]), [
+      {label: 'hello'},
+      {label: 'world'},
+    ]);
+  });
+});
+
+describe('isOneWordLabel', () => {
+  it('true only for one word labels', () => {
+    assert.isTrue(isOneWordLabel('test'));
+    assert.isTrue(isOneWordLabel('LABEL'));
+    assert.isTrue(isOneWordLabel('Security'));
+
+    assert.isFalse(isOneWordLabel('Restrict-View-EditIssue'));
+    assert.isFalse(isOneWordLabel('Type-Feature'));
+  });
+});
+
+describe('_makeRestrictionLabel', () => {
+  it('creates label', () => {
+    assert.deepEqual(_makeRestrictionLabel('View', 'Google'), {
+      label: `Restrict-View-Google`,
+      docstring: `Permission Google needed to use View`,
+    });
+  });
+
+  it('capitalizes permission name', () => {
+    assert.deepEqual(_makeRestrictionLabel('EditIssue', 'security'), {
+      label: `Restrict-EditIssue-Security`,
+      docstring: `Permission Security needed to use EditIssue`,
+    });
+  });
+});
+
+describe('restrictionLabelsForPermissions', () => {
+  it('creates labels for permissions and actions', () => {
+    assert.deepEqual(restrictionLabelsForPermissions(['google', 'security'],
+        ['View', 'EditIssue'], []), [
+      {
+        label: 'Restrict-View-Google',
+        docstring: 'Permission Google needed to use View',
+      }, {
+        label: 'Restrict-View-Security',
+        docstring: 'Permission Security needed to use View',
+      }, {
+        label: 'Restrict-EditIssue-Google',
+        docstring: 'Permission Google needed to use EditIssue',
+      }, {
+        label: 'Restrict-EditIssue-Security',
+        docstring: 'Permission Security needed to use EditIssue',
+      },
+    ]);
+  });
+
+  it('appends default labels when specified', () => {
+    assert.deepEqual(restrictionLabelsForPermissions(['Google'], ['View'], [
+      {label: 'Restrict-Hello-World', docstring: 'description of label'},
+    ]), [
+      {
+        label: 'Restrict-View-Google',
+        docstring: 'Permission Google needed to use View',
+      },
+      {label: 'Restrict-Hello-World', docstring: 'description of label'},
+    ]);
+  });
+});
+
+describe('fieldNameToLabelPrefix', () => {
+  it('converts fieldName', () => {
+    assert.deepEqual(fieldNameToLabelPrefix('test'), 'test-');
+    assert.deepEqual(fieldNameToLabelPrefix('test-hello'), 'test-hello-');
+    assert.deepEqual(fieldNameToLabelPrefix('WHATEVER'), 'whatever-');
+  });
+});
+
+describe('labelNameToLabelPrefixes', () => {
+  it('converts labelName', () => {
+    assert.deepEqual(labelNameToLabelPrefixes('test'), []);
+    assert.deepEqual(labelNameToLabelPrefixes('test-hello'), ['test']);
+    assert.deepEqual(labelNameToLabelPrefixes('WHATEVER-this-label-is'),
+        ['WHATEVER', 'WHATEVER-this', 'WHATEVER-this-label']);
+  });
+});
+
+describe('labelNameToLabelValue', () => {
+  it('returns null when no matching value found in label', () => {
+    assert.isNull(labelNameToLabelValue('test-hello', ''));
+    assert.isNull(labelNameToLabelValue('', 'test'));
+    assert.isNull(labelNameToLabelValue('test-hello', 'hello'));
+    assert.isNull(labelNameToLabelValue('test-hello', 'tes'));
+    assert.isNull(labelNameToLabelValue('test', 'test'));
+  });
+
+  it('converts labelName', () => {
+    assert.deepEqual(labelNameToLabelValue('test-hello', 'test'), 'hello');
+    assert.deepEqual(labelNameToLabelValue('WHATEVER-this-label-is',
+        'WHATEVER'), 'this-label-is');
+    assert.deepEqual(labelNameToLabelValue('WHATEVER-this-label-is',
+        'WHATEVER-this'), 'label-is');
+    assert.deepEqual(labelNameToLabelValue('WHATEVER-this-label-is',
+        'WHATEVER-this-label'), 'is');
+  });
+
+  it('fieldName is case insenstitive', () => {
+    assert.deepEqual(labelNameToLabelValue('test-hello', 'TEST'), 'hello');
+    assert.deepEqual(labelNameToLabelValue('test-hello', 'tEsT'), 'hello');
+    assert.deepEqual(labelNameToLabelValue('TEST-hello', 'test'), 'hello');
+  });
+});
+
+describe('fieldDefToName', () => {
+  it('converts fieldDef', () => {
+    const fieldDef = {fieldRef: {fieldId: '1'}};
+    const actual = fieldDefToName('project-name', fieldDef);
+    assert.equal(actual, 'projects/project-name/fieldDefs/1');
+  });
+});
+
+describe('statusRefToString', () => {
+  it('converts statusRef', () => {
+    assert.deepEqual(statusRefToString({status: 'foo'}), 'foo');
+  });
+});
+
+describe('statusRefsToStrings', () => {
+  it('converts statusRefs', () => {
+    assert.deepEqual(statusRefsToStrings(
+        [{status: 'hello'}, {status: 'world'}]), ['hello', 'world']);
+  });
+});
+
+describe('componentStringToRef', () => {
+  it('converts component', () => {
+    assert.deepEqual(componentStringToRef('foo'), {path: 'foo'});
+  });
+});
+
+describe('componentRefToString', () => {
+  it('converts componentRef', () => {
+    assert.deepEqual(componentRefToString({path: 'Hello>World'}),
+        'Hello>World');
+  });
+});
+
+describe('componentRefsToStrings', () => {
+  it('converts componentRefs', () => {
+    assert.deepEqual(componentRefsToStrings(
+        [{path: 'Hello>World'}, {path: 'Test'}]), ['Hello>World', 'Test']);
+  });
+});
+
+describe('issueStringToRef', () => {
+  it('converts issue default project', () => {
+    assert.deepEqual(
+        issueStringToRef('1234', 'proj'),
+        {projectName: 'proj', localId: 1234});
+  });
+
+  it('converts issue with project', () => {
+    assert.deepEqual(
+        issueStringToRef('foo:1234', 'proj'),
+        {projectName: 'foo', localId: 1234});
+  });
+
+  it('converts external issue references', () => {
+    assert.deepEqual(
+        issueStringToRef('b/123456', 'proj'),
+        {extIdentifier: 'b/123456'});
+  });
+
+  it('throws on invalid input', () => {
+    assert.throws(() => issueStringToRef('foo', 'proj'));
+  });
+});
+
+describe('issueStringToBlockingRef', () => {
+  it('converts issue default project', () => {
+    assert.deepEqual(
+        issueStringToBlockingRef({projectName: 'proj', localId: 1}, '1234'),
+        {projectName: 'proj', localId: 1234});
+  });
+
+  it('converts issue with project', () => {
+    assert.deepEqual(
+        issueStringToBlockingRef({projectName: 'proj', localId: 1}, 'foo:1234'),
+        {projectName: 'foo', localId: 1234});
+  });
+
+  it('throws on invalid input', () => {
+    assert.throws(() => issueStringToBlockingRef(
+        {projectName: 'proj', localId: 1}, 'foo'));
+  });
+
+  it('throws when blocking an issue on itself', () => {
+    assert.throws(() => issueStringToBlockingRef(
+        {projectName: 'proj', localId: 123}, 'proj:123'));
+    assert.throws(() => issueStringToBlockingRef(
+        {projectName: 'proj', localId: 123}, '123'));
+  });
+});
+
+describe('issueRefToString', () => {
+  it('no ref', () => {
+    assert.equal(issueRefToString(), '');
+  });
+
+  it('ref with no project name', () => {
+    assert.equal(
+        'other:1234',
+        issueRefToString({projectName: 'other', localId: 1234}),
+    );
+  });
+
+  it('ref with different project name', () => {
+    assert.equal(
+        'other:1234',
+        issueRefToString({projectName: 'other', localId: 1234}, 'proj'),
+    );
+  });
+
+  it('ref with same project name', () => {
+    assert.equal(
+        '1234',
+        issueRefToString({projectName: 'proj', localId: 1234}, 'proj'),
+    );
+  });
+
+  it('external ref', () => {
+    assert.equal(
+        'b/123456',
+        issueRefToString({extIdentifier: 'b/123456'}, 'proj'),
+    );
+  });
+});
+
+describe('issueToIssueRef', () => {
+  it('creates ref', () => {
+    const issue = {'localId': 1, 'projectName': 'proj', 'starCount': 1};
+    const expectedRef = {'localId': 1,
+      'projectName': 'proj'};
+    assert.deepEqual(issueToIssueRef(issue), expectedRef);
+  });
+});
+
+describe('issueRefToUrl', () => {
+  it('no ref', () => {
+    assert.equal(issueRefToUrl(), '');
+  });
+
+  it('issue ref', () => {
+    assert.equal(issueRefToUrl({
+      projectName: 'test',
+      localId: 11,
+    }), '/p/test/issues/detail?id=11');
+  });
+
+  it('issue ref with params', () => {
+    assert.equal(issueRefToUrl({
+      projectName: 'test',
+      localId: 11,
+    }, {
+      q: 'owner:me',
+      id: 44,
+    }), '/p/test/issues/detail?id=11&q=owner%3Ame');
+  });
+
+  it('federated issue ref', () => {
+    assert.equal(issueRefToUrl({
+      extIdentifier: 'b/5678',
+    }), 'https://issuetracker.google.com/issues/5678');
+  });
+
+  it('does not mutate input queryParams', () => {
+    const queryParams = {q: 'owner:me', id: 44};
+    const EXPECTED = JSON.stringify(queryParams);
+    const ref = {projectName: 'test', localId: 11};
+    issueRefToUrl(ref, queryParams);
+    assert.equal(EXPECTED, JSON.stringify(queryParams));
+  });
+});
+
+it('issueNameToRef', () => {
+  const actual = issueNameToRef('projects/project-name/issues/2');
+  assert.deepEqual(actual, {projectName: 'project-name', localId: 2});
+});
+
+it('issueNameToRefString', () => {
+  const actual = issueNameToRefString('projects/project-name/issues/2');
+  assert.equal(actual, 'project-name:2');
+});
+
+it('issueToName', () => {
+  const actual = issueToName({projectName: 'project-name', localId: 2});
+  assert.equal(actual, 'projects/project-name/issues/2');
+});
+
+describe('commentListToDescriptionList', () => {
+  it('empty list', () => {
+    assert.deepEqual(commentListToDescriptionList(), []);
+    assert.deepEqual(commentListToDescriptionList([]), []);
+  });
+
+  it('first comment is description', () => {
+    assert.deepEqual(commentListToDescriptionList([
+      {content: 'test'},
+      {content: 'hello'},
+      {content: 'world'},
+    ]), [{content: 'test'}]);
+  });
+
+  it('some descriptions', () => {
+    assert.deepEqual(commentListToDescriptionList([
+      {content: 'test'},
+      {content: 'hello', descriptionNum: 1},
+      {content: 'world'},
+      {content: 'this'},
+      {content: 'is a'},
+      {content: 'description', descriptionNum: 2},
+    ]), [
+      {content: 'test'},
+      {content: 'hello', descriptionNum: 1},
+      {content: 'description', descriptionNum: 2},
+    ]);
+  });
+});
+
+describe('valueToFieldValue', () => {
+  it('converts field ref and value', () => {
+    assert.deepEqual(valueToFieldValue(
+        {fieldName: 'name', fieldId: 'id'},
+        'value',
+    ), {
+      fieldRef: {fieldName: 'name', fieldId: 'id'},
+      value: 'value',
+    });
+  });
+});
diff --git a/static_src/shared/cron.js b/static_src/shared/cron.js
new file mode 100644
index 0000000..bd67507
--- /dev/null
+++ b/static_src/shared/cron.js
@@ -0,0 +1,35 @@
+// Copyright 2019 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.
+
+import {store} from 'reducers/base.js';
+import * as sitewide from 'reducers/sitewide.js';
+
+// How long should we wait until asking the server status again.
+const SERVER_STATUS_DELAY_MS = 20 * 60 * 1000; // 20 minutes
+
+// CronTask is a class that supports periodically execution of tasks.
+export class CronTask {
+  constructor(task, delay) {
+    this.task = task;
+    this.delay = delay;
+    this.started = false;
+  }
+
+  start() {
+    if (this.started) return;
+    this.started = true;
+    this._execute();
+  }
+
+  _execute() {
+    this.task();
+    setTimeout(this._execute.bind(this), this.delay);
+  }
+}
+
+// getServerStatusCron requests status information from the server every 20
+// minutes.
+export const getServerStatusCron = new CronTask(
+    () => store.dispatch(sitewide.getServerStatus()),
+    SERVER_STATUS_DELAY_MS);
diff --git a/static_src/shared/cron.test.js b/static_src/shared/cron.test.js
new file mode 100644
index 0000000..e2f9a8e
--- /dev/null
+++ b/static_src/shared/cron.test.js
@@ -0,0 +1,36 @@
+// Copyright 2019 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.
+
+import sinon from 'sinon';
+import {assert} from 'chai';
+import {CronTask} from './cron.js';
+
+let clock;
+
+describe('cron', () => {
+  beforeEach(() => {
+    clock = sinon.useFakeTimers();
+  });
+
+  afterEach(() => {
+    clock.restore();
+  });
+
+  it('calls task periodically', () => {
+    const task = sinon.spy();
+    const cronTask = new CronTask(task, 1000);
+
+    // Make sure task is not called until the cron task has been started.
+    assert.isFalse(task.called);
+
+    cronTask.start();
+    assert.isTrue(task.calledOnce);
+
+    clock.tick(1000);
+    assert.isTrue(task.calledTwice);
+
+    clock.tick(1000);
+    assert.isTrue(task.calledThrice);
+  });
+});
diff --git a/static_src/shared/dom-helpers.js b/static_src/shared/dom-helpers.js
new file mode 100644
index 0000000..81dec80
--- /dev/null
+++ b/static_src/shared/dom-helpers.js
@@ -0,0 +1,60 @@
+// Copyright 2019 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.
+
+
+// Prevent triggering input change handlers on key events that don't
+// edit forms.
+export const NON_EDITING_KEY_EVENTS = new Set(['Enter', 'Tab', 'Escape',
+  'ArrowUp', 'ArrowLeft', 'ArrowRight', 'ArrowDown']);
+const INPUT_TYPES_WITHOUT_TEXT_INPUT = [
+  'checkbox',
+  'radio',
+  'file',
+  'submit',
+  'button',
+  'image',
+];
+
+// TODO: Add a method to watch for property changes in one of a subset of
+// element properties.
+// Via: https://crrev.com/c/infra/infra/+/1762911/7/appengine/monorail/static_src/elements/help/mr-cue/mr-cue.js
+
+/**
+ * Checks if a keyboard event should be disabled when the user is typing.
+ *
+ * @param {HTMLElement} element is a dom node to run checks against.
+ * @return {boolean} Whether the dom node is an element that accepts key input.
+ */
+export function isTextInput(element) {
+  const tagName = element.tagName && element.tagName.toUpperCase();
+  if (tagName === 'INPUT') {
+    const type = element.type.toLowerCase();
+    if (INPUT_TYPES_WITHOUT_TEXT_INPUT.includes(type)) {
+      return false;
+    }
+    return true;
+  }
+  return tagName === 'SELECT' || tagName === 'TEXTAREA' ||
+    element.isContentEditable;
+}
+
+/**
+ * Helper to find the EventTarget that an Event originated from, even if that
+ * EventTarget is buried until multiple layers of ShadowDOM.
+ *
+ * @param {Event} event
+ * @return {EventTarget} The DOM node that the event came from. For example,
+ *   if the input was a keypress, this might be the input element the user was
+ *   typing into.
+ */
+export function findDeepEventTarget(event) {
+  /**
+   * Event.target finds the element the event came from, but only
+   * finds events that come from the highest ShadowDOM level. For
+   * example, an Event listener attached to "window" will have all
+   * Events originating from the SPA set to a target of <mr-app>.
+   */
+  const path = event.composedPath();
+  return path ? path[0] : event.target;
+}
diff --git a/static_src/shared/dom-helpers.test.js b/static_src/shared/dom-helpers.test.js
new file mode 100644
index 0000000..78d535a
--- /dev/null
+++ b/static_src/shared/dom-helpers.test.js
@@ -0,0 +1,100 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {isTextInput, findDeepEventTarget} from './dom-helpers.js';
+
+describe('isTextInput', () => {
+  it('returns true for select', () => {
+    const element = document.createElement('select');
+    assert.isTrue(isTextInput(element));
+  });
+
+  it('returns true for input tags that take text input', () => {
+    const element = document.createElement('input');
+    assert.isTrue(isTextInput(element));
+
+    element.type = 'text';
+    assert.isTrue(isTextInput(element));
+
+    element.type = 'password';
+    assert.isTrue(isTextInput(element));
+
+    element.type = 'number';
+    assert.isTrue(isTextInput(element));
+
+    element.type = 'date';
+    assert.isTrue(isTextInput(element));
+  });
+
+  it('returns false for input tags without text input', () => {
+    const element = document.createElement('input');
+
+    element.type = 'button';
+    assert.isFalse(isTextInput(element));
+
+    element.type = 'submit';
+    assert.isFalse(isTextInput(element));
+
+    element.type = 'checkbox';
+    assert.isFalse(isTextInput(element));
+
+    element.type = 'radio';
+    assert.isFalse(isTextInput(element));
+  });
+
+  it('returns true for textarea', () => {
+    const element = document.createElement('textarea');
+    assert.isTrue(isTextInput(element));
+  });
+
+  it('returns true for contenteditable', () => {
+    const element = document.createElement('div');
+    element.contentEditable = 'true';
+    assert.isTrue(isTextInput(element));
+
+    element.contentEditable = 'false';
+    assert.isFalse(isTextInput(element));
+  });
+
+  it('returns false for non-input', () => {
+    assert.isFalse(isTextInput(document.createElement('div')));
+    assert.isFalse(isTextInput(document.createElement('table')));
+    assert.isFalse(isTextInput(document.createElement('tr')));
+    assert.isFalse(isTextInput(document.createElement('td')));
+    assert.isFalse(isTextInput(document.createElement('href')));
+    assert.isFalse(isTextInput(document.createElement('random-elment')));
+    assert.isFalse(isTextInput(document.createElement('p')));
+  });
+});
+
+describe('findDeepEventTarget', () => {
+  it('returns empty for event without target', () => {
+    const event = new Event('whatsup');
+    assert.isUndefined(findDeepEventTarget(event));
+  });
+
+  it('returns target for event with target', (done) => {
+    const element = document.createElement('div');
+    element.addEventListener('hello', (e) => {
+      assert.deepEqual(findDeepEventTarget(e), element);
+      done();
+    });
+    element.dispatchEvent(new Event('hello'));
+  });
+
+  it('returns target for event coming from shadowRoot', (done) => {
+    const target = document.createElement('button');
+    const parent = document.createElement('div');
+    parent.appendChild(target);
+    parent.attachShadow({mode: 'open'});
+
+    parent.addEventListener('shadow-root', (e) => {
+      assert.deepEqual(findDeepEventTarget(e), target);
+      done();
+    });
+
+    target.dispatchEvent(new Event('shadow-root', {bubbles: true}));
+  });
+});
diff --git a/static_src/shared/errors.js b/static_src/shared/errors.js
new file mode 100644
index 0000000..81c0035
--- /dev/null
+++ b/static_src/shared/errors.js
@@ -0,0 +1,9 @@
+// Copyright 2019 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.
+
+export class UserInputError extends Error {
+  get name() {
+    return 'UserInputError';
+  }
+}
diff --git a/static_src/shared/experiments.js b/static_src/shared/experiments.js
new file mode 100644
index 0000000..1528a00
--- /dev/null
+++ b/static_src/shared/experiments.js
@@ -0,0 +1,91 @@
+// Copyright 2020 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.
+
+/**
+ * @fileoverview Manages the current user's participation in experiments (e.g.
+ * phased rollouts).
+ *
+ * This file is an early prototype serving the needs of go/monorail-slo-v0.
+ *
+ * The more mature design is under discussion:
+ * http://doc/1rtYXq68WSlTNCzVJiSttLWF14CiK5sOlEef2JWAgheg
+ */
+
+/**
+ * An Enum representing known expreriments.
+ *
+ * @typedef {string} Experiment
+ */
+
+/**
+ * @type {Experiment}
+ */
+export const SLO_EXPERIMENT = 'slo';
+
+const EXPERIMENT_QUERY_PARAM = 'e';
+
+const DISABLED_STR = '-';
+
+const _SLO_EXPERIMENT_USER_DISPLAY_NAMES = new Set([
+  'jessan@google.com',
+]);
+
+/**
+ * Checks whether the current user is in given experiment.
+ *
+ * @param {Experiment} experiment The experiment to check.
+ * @param {UserV0=} user The current user. Although any user can currently
+ *     be passed in, we only intend to support checking if the current user is
+ *     in the experiment. In the future the user parameter may be removed.
+ * @param {Object} queryParams The current query parameters, parsed by qs.
+ *     We support a string like 'e=-exp1,-exp2...' for disabling experiments.
+ *
+ *     We allow disabling so that a user in the fishfood group can work around
+ *     any bugs or undesired behaviors the experiment may introduce for them.
+ *
+ *     As of now, we don't allow enabling experiments by override params.
+ *     We may not want access shared beyond the fishfood group (e.g. if it is a
+ *     feature we are likely to change dramatically or take away).
+ * @return {boolean} Whether the experiment is enabled for the current user.
+ */
+export const isExperimentEnabled = (experiment, user, queryParams) => {
+  const experimentOverrides = parseExperimentParam(
+      queryParams[EXPERIMENT_QUERY_PARAM]);
+  if (experimentOverrides[experiment] === false) {
+    return false;
+  }
+  switch (experiment) {
+    case SLO_EXPERIMENT:
+      return !!user &&
+        _SLO_EXPERIMENT_USER_DISPLAY_NAMES.has(user.displayName);
+    default:
+      throw Error('Unknown experiment provided');
+  }
+};
+
+/**
+ * Parses a comma separated list of experiments from the query string.
+ * Experiment strings preceded by DISABLED_STR are overrode to be disabled,
+ * otherwise they are to be enabled.
+ *
+ * Does not do any validation of the experiment string provided.
+ *
+ * @param {string?} experimentParam comma separated experiements.
+ * @return {Object} Maps experiment name to whether enabled or
+ *    disabled boolean. May include invalid experiment names.
+ */
+const parseExperimentParam = (experimentParam) => {
+  const experimentOverrides = {};
+  if (experimentParam) {
+    for (const experimentOverride of experimentParam.split(',')) {
+      if (experimentOverride.startsWith(DISABLED_STR)) {
+        const experiment = experimentOverride.substr(DISABLED_STR.length);
+        experimentOverrides[experiment] = false;
+      } else {
+        experimentOverrides[experimentOverride] = true;
+      }
+    }
+  }
+  return experimentOverrides;
+};
diff --git a/static_src/shared/experiments.test.js b/static_src/shared/experiments.test.js
new file mode 100644
index 0000000..d5f96b7
--- /dev/null
+++ b/static_src/shared/experiments.test.js
@@ -0,0 +1,62 @@
+// Copyright 2020 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.
+
+import {assert} from 'chai';
+import {isExperimentEnabled, SLO_EXPERIMENT} from './experiments.js';
+
+
+describe('isExperimentEnabled', () => {
+  it('throws error for unknown experiment', () => {
+    assert.throws(() =>
+      isExperimentEnabled('unknown-exp', {displayName: 'jessan@google.com'}));
+  });
+
+  it('returns false if user not in experiment', () => {
+    const ineligibleUser = {displayName: 'example@example.com'};
+    assert.isFalse(isExperimentEnabled(SLO_EXPERIMENT, ineligibleUser, {}));
+  });
+
+  it('returns false if no user provided', () => {
+    assert.isFalse(isExperimentEnabled(SLO_EXPERIMENT, undefined, {}));
+  });
+
+  it('returns true if user in experiment', () => {
+    const eligibleUser = {displayName: 'jessan@google.com'};
+    assert.isTrue(isExperimentEnabled(SLO_EXPERIMENT, eligibleUser, {}));
+  });
+
+  it('is false if user in experiment has disabled it with URL', () => {
+    const eligibleUser = {displayName: 'jessan@google.com'};
+    assert.isFalse(isExperimentEnabled(
+        SLO_EXPERIMENT, eligibleUser, {'e': '-slo'}));
+  });
+
+  it('ignores enabling experiments with URL', () => {
+    const ineligibleUser = {displayName: 'example@example.com'};
+    assert.isFalse(isExperimentEnabled(
+        SLO_EXPERIMENT, ineligibleUser, {'e': 'slo'}));
+  });
+
+  it('ignores ineligible users disabling experiment with URL', () => {
+    const ineligibleUser = {displayName: 'example@example.com'};
+    assert.isFalse(isExperimentEnabled(
+        SLO_EXPERIMENT, ineligibleUser, {'e': '-slo'}));
+  });
+
+  it('ignores invalid experiments in URL', () => {
+    const eligibleUser = {displayName: 'jessan@google.com'};
+    // Leading comma, unknown experiment str, empty experiment str in
+    // middle, disable_str with no experiment, trailing comma
+    assert.isFalse(isExperimentEnabled(
+        SLO_EXPERIMENT, eligibleUser, {'e': ',unknown,-slo,,-,'}));
+  });
+
+  it('respects last instance when experiment repeated in URL', () => {
+    const eligibleUser = {displayName: 'jessan@google.com'};
+    assert.isFalse(isExperimentEnabled(
+        SLO_EXPERIMENT, eligibleUser, {'e': 'slo,-slo'}));
+    assert.isTrue(isExperimentEnabled(
+        SLO_EXPERIMENT, eligibleUser, {'e': '-slo,slo'}));
+  });
+});
diff --git a/static_src/shared/federated.js b/static_src/shared/federated.js
new file mode 100644
index 0000000..e5b7567
--- /dev/null
+++ b/static_src/shared/federated.js
@@ -0,0 +1,194 @@
+// Copyright 2019 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.
+
+/**
+ * Logic for dealing with federated issue references.
+ */
+
+import loadGapi, {fetchGapiEmail} from './gapi-loader.js';
+
+const GOOGLE_ISSUE_TRACKER_REGEX = /^b\/\d+$/;
+
+const GOOGLE_ISSUE_TRACKER_API_ROOT = 'https://issuetracker.corp.googleapis.com';
+const GOOGLE_ISSUE_TRACKER_DISCOVERY_PATH = '/$discovery/rest';
+const GOOGLE_ISSUE_TRACKER_API_VERSION = 'v3';
+
+// Returns if shortlink is valid for any federated tracker.
+export function isShortlinkValid(shortlink) {
+  return FEDERATED_TRACKERS.some((TrackerClass) => {
+    try {
+      return new TrackerClass(shortlink);
+    } catch (e) {
+      if (e instanceof FederatedIssueError) {
+        return false;
+      } else {
+        throw e;
+      }
+    }
+  });
+}
+
+// Returns a issue instance for the first matching tracker.
+export function fromShortlink(shortlink) {
+  for (const key in FEDERATED_TRACKERS) {
+    if (FEDERATED_TRACKERS.hasOwnProperty(key)) {
+      const TrackerClass = FEDERATED_TRACKERS[key];
+      try {
+        return new TrackerClass(shortlink);
+      } catch (e) {
+        if (e instanceof FederatedIssueError) {
+          continue;
+        } else {
+          throw e;
+        }
+      }
+    }
+  }
+  return null;
+}
+
+// FederatedIssue is an abstract class for representing one federated issue.
+// Each supported tracker should subclass this class.
+class FederatedIssue {
+  constructor(shortlink) {
+    if (!this.isShortlinkValid(shortlink)) {
+      throw new FederatedIssueError(`Invalid tracker shortlink: ${shortlink}`);
+    }
+    this.shortlink = shortlink;
+  }
+
+  // isShortlinkValid returns whether a given shortlink is valid.
+  isShortlinkValid(shortlink) {
+    if (!(typeof shortlink === 'string')) {
+      throw new FederatedIssueError('shortlink argument must be a string.');
+    }
+    return Boolean(shortlink.match(this.shortlinkRe()));
+  }
+
+  // shortlinkRe returns the regex used to validate shortlinks.
+  shortlinkRe() {
+    throw new Error('Not implemented.');
+  }
+
+  // toURL returns the URL to this issue.
+  toURL() {
+    throw new Error('Not implemented.');
+  }
+
+  // toIssueRef converts the FedRef's information into an object having the
+  // IssueRef format everywhere on the front-end expects.
+  toIssueRef() {
+    return {
+      extIdentifier: this.shortlink,
+    };
+  }
+
+  // trackerName should return the name of the bug tracker.
+  get trackerName() {
+    throw new Error('Not implemented.');
+  }
+
+  // isOpen returns a Promise that resolves either true or false.
+  async isOpen() {
+    throw new Error('Not implemented.');
+  }
+}
+
+// Class for Google Issue Tracker (Buganizer) logic.
+export class GoogleIssueTrackerIssue extends FederatedIssue {
+  constructor(shortlink) {
+    super(shortlink);
+    this.issueID = Number(shortlink.substr(2));
+    this._federatedDetails = null;
+  }
+
+  shortlinkRe() {
+    return GOOGLE_ISSUE_TRACKER_REGEX;
+  }
+
+  toURL() {
+    return `https://issuetracker.google.com/issues/${this.issueID}`;
+  }
+
+  get trackerName() {
+    return 'Buganizer';
+  }
+
+  async getFederatedDetails() {
+    // Prevent fetching details more than once.
+    if (this._federatedDetails) {
+      return this._federatedDetails;
+    }
+
+    await loadGapi();
+    const email = await fetchGapiEmail();
+    if (!email) {
+      // Fail open.
+      return true;
+    }
+    const res = await this._loadGoogleIssueTrackerIssue(this.issueID);
+    if (!res || !res.result) {
+      // Fail open.
+      return null;
+    }
+
+    this._federatedDetails = res.result;
+    return this._federatedDetails;
+  }
+
+  // isOpen assumes getFederatedDetails has already been called, otherwise
+  // it will fail open (returning that the issue is open).
+  get isOpen() {
+    if (!this._federatedDetails) {
+      // Fail open.
+      return true;
+    }
+
+    // Open issues will not have a `resolvedTime`.
+    return !Boolean(this._federatedDetails.resolvedTime);
+  }
+
+  // summary assumes getFederatedDetails has already been called.
+  get summary() {
+    if (this._federatedDetails &&
+        this._federatedDetails.issueState &&
+        this._federatedDetails.issueState.title) {
+      return this._federatedDetails.issueState.title;
+    }
+    return null;
+  }
+
+  toIssueRef() {
+    return {
+      extIdentifier: this.shortlink,
+      summary: this.summary,
+      statusRef: {meansOpen: this.isOpen},
+    };
+  }
+
+  get _APIURL() {
+    return GOOGLE_ISSUE_TRACKER_API_ROOT + GOOGLE_ISSUE_TRACKER_DISCOVERY_PATH;
+  }
+
+  _loadGoogleIssueTrackerIssue(bugID) {
+    return new Promise((resolve, reject) => {
+      const version = GOOGLE_ISSUE_TRACKER_API_VERSION;
+      gapi.client.load(this._APIURL, version, () => {
+        const request = gapi.client.corp_issuetracker.issues.get({
+          'issueId': bugID,
+        });
+        request.execute((response) => {
+          resolve(response);
+        });
+      });
+    });
+  }
+}
+
+class FederatedIssueError extends Error {}
+
+// A list of supported tracker classes.
+const FEDERATED_TRACKERS = [
+  GoogleIssueTrackerIssue,
+];
diff --git a/static_src/shared/federated.test.js b/static_src/shared/federated.test.js
new file mode 100644
index 0000000..011b924
--- /dev/null
+++ b/static_src/shared/federated.test.js
@@ -0,0 +1,136 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {
+  isShortlinkValid,
+  fromShortlink,
+  GoogleIssueTrackerIssue,
+} from './federated.js';
+import {getSigninInstance} from 'shared/gapi-loader.js';
+
+describe('isShortlinkValid', () => {
+  it('Returns true for valid links', () => {
+    assert.isTrue(isShortlinkValid('b/1'));
+    assert.isTrue(isShortlinkValid('b/12345678'));
+  });
+
+  it('Returns false for invalid links', () => {
+    assert.isFalse(isShortlinkValid('b'));
+    assert.isFalse(isShortlinkValid('b/'));
+    assert.isFalse(isShortlinkValid('b//123456'));
+    assert.isFalse(isShortlinkValid('b/123/123'));
+    assert.isFalse(isShortlinkValid('b123/123'));
+    assert.isFalse(isShortlinkValid('b/123a456'));
+  });
+});
+
+describe('fromShortlink', () => {
+  it('Returns an issue class for valid links', () => {
+    assert.instanceOf(fromShortlink('b/1'), GoogleIssueTrackerIssue);
+    assert.instanceOf(fromShortlink('b/12345678'), GoogleIssueTrackerIssue);
+  });
+
+  it('Returns null for invalid links', () => {
+    assert.isNull(fromShortlink('b'));
+    assert.isNull(fromShortlink('b/'));
+    assert.isNull(fromShortlink('b//123456'));
+    assert.isNull(fromShortlink('b/123/123'));
+    assert.isNull(fromShortlink('b123/123'));
+    assert.isNull(fromShortlink('b/123a456'));
+  });
+});
+
+describe('GoogleIssueTrackerIssue', () => {
+  describe('constructor', () => {
+    it('Sets this.shortlink and this.issueID', () => {
+      const shortlink = 'b/1234';
+      const issue = new GoogleIssueTrackerIssue(shortlink);
+      assert.equal(issue.shortlink, shortlink);
+      assert.equal(issue.issueID, 1234);
+    });
+
+    it('Throws when given an invalid shortlink.', () => {
+      assert.throws(() => {
+        new GoogleIssueTrackerIssue('b/123/123');
+      });
+    });
+  });
+
+  describe('toURL', () => {
+    it('Returns a valid URL.', () => {
+      const issue = new GoogleIssueTrackerIssue('b/1234');
+      assert.equal(issue.toURL(), 'https://issuetracker.google.com/issues/1234');
+    });
+  });
+
+  describe('federated details', () => {
+    let signinImpl;
+    beforeEach(() => {
+      window.CS_env = {gapi_client_id: 'rutabaga'};
+      signinImpl = {
+        init: sinon.stub(),
+        getUserProfileAsync: () => (
+          Promise.resolve({
+            getEmail: sinon.stub().returns('rutabaga@google.com'),
+          })
+        ),
+      };
+      // Preload signinImpl with a fake for testing.
+      getSigninInstance(signinImpl, true);
+      delete window.__gapiLoadPromise;
+    });
+
+    afterEach(() => {
+      delete window.CS_env;
+    });
+
+    describe('isOpen', () => {
+      it('Fails open', () => {
+        const issue = new GoogleIssueTrackerIssue('b/1234');
+        assert.isTrue(issue.isOpen);
+      });
+
+      it('Is based on details.resolvedTime', () => {
+        const issue = new GoogleIssueTrackerIssue('b/1234');
+        issue._federatedDetails = {resolvedTime: 12345};
+        assert.isFalse(issue.isOpen);
+
+        issue._federatedDetails = {};
+        assert.isTrue(issue.isOpen);
+      });
+    });
+
+    describe('summary', () => {
+      it('Returns null if not available', () => {
+        const issue = new GoogleIssueTrackerIssue('b/1234');
+        assert.isNull(issue.summary);
+      });
+
+      it('Returns the summary if available', () => {
+        const issue = new GoogleIssueTrackerIssue('b/1234');
+        issue._federatedDetails = {issueState: {title: 'Rutabaga title'}};
+        assert.equal(issue.summary, 'Rutabaga title');
+      });
+    });
+
+    describe('toIssueRef', () => {
+      it('Returns an issue ref object', () => {
+        const issue = new GoogleIssueTrackerIssue('b/1234');
+        issue._federatedDetails = {
+          resolvedTime: 12345,
+          issueState: {
+            title: 'A fedref issue title',
+          },
+        };
+
+        assert.deepEqual(issue.toIssueRef(), {
+          extIdentifier: 'b/1234',
+          summary: 'A fedref issue title',
+          statusRef: {meansOpen: false},
+        });
+      });
+    });
+  });
+});
diff --git a/static_src/shared/ga-helpers.js b/static_src/shared/ga-helpers.js
new file mode 100644
index 0000000..52d1176
--- /dev/null
+++ b/static_src/shared/ga-helpers.js
@@ -0,0 +1,31 @@
+// Copyright 2019 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.
+
+const TITLE = 'title';
+const LOCATION = 'location';
+const DIMENSION1 = 'dimension1';
+const SET = 'set';
+
+/**
+ * Track page-to-page navigation via google analytics. Global window.ga
+ * is set in server rendered HTML.
+ *
+ * @param {string} page
+ * @param {string} userDisplayName
+ */
+export const trackPageChange = (page = '', userDisplayName = '') => {
+  ga(SET, TITLE, `Issue ${page}`);
+  if (page.startsWith('user')) {
+    ga(SET, TITLE, 'A user page');
+    ga(SET, LOCATION, 'A user page URL');
+  }
+
+  if (userDisplayName) {
+    ga(SET, DIMENSION1, 'Logged in');
+  } else {
+    ga(SET, DIMENSION1, 'Not logged in');
+  }
+
+  ga('send', 'pageview');
+};
diff --git a/static_src/shared/ga-helpers.test.js b/static_src/shared/ga-helpers.test.js
new file mode 100644
index 0000000..1876a27
--- /dev/null
+++ b/static_src/shared/ga-helpers.test.js
@@ -0,0 +1,45 @@
+// Copyright 2019 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.
+
+import {trackPageChange} from './ga-helpers.js';
+
+describe('trackPageChange', () => {
+  beforeEach(() => {
+    global.ga = sinon.spy();
+  });
+
+  afterEach(() => {
+    global.ga.resetHistory();
+  });
+
+  it('sets page title', () => {
+    trackPageChange('list');
+    sinon.assert.calledWith(global.ga, 'set', 'title', 'Issue list');
+  });
+
+  it('sets user page title', () => {
+    trackPageChange('user-anything');
+    sinon.assert.calledWith(global.ga, 'set', 'title', 'A user page');
+  });
+
+  it('sets user location', () => {
+    trackPageChange('user-anything');
+    sinon.assert.calledWith(global.ga, 'set', 'location', 'A user page URL');
+  });
+
+  it('defaults dimension1', () => {
+    trackPageChange('list');
+    sinon.assert.calledWith(global.ga, 'set', 'dimension1', 'Not logged in');
+  });
+
+  it('sets dimension1 based on userDisplayName', () => {
+    trackPageChange('list', 'somebody');
+    sinon.assert.calledWith(global.ga, 'set', 'dimension1', 'Logged in');
+  });
+
+  it('sends pageview', () => {
+    trackPageChange('list');
+    sinon.assert.calledWith(global.ga, 'send', 'pageview');
+  });
+});
diff --git a/static_src/shared/gapi-loader.js b/static_src/shared/gapi-loader.js
new file mode 100644
index 0000000..5249d68
--- /dev/null
+++ b/static_src/shared/gapi-loader.js
@@ -0,0 +1,66 @@
+// Copyright 2019 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.
+
+/**
+ * gapi-loader.js provides a method for loading gapi.js asynchronously.
+ *
+ * gapi.js docs:
+ * https://developers.google.com/identity/sign-in/web/reference
+ * (we load gapi.js via the chops-signin module)
+ */
+
+import * as signin from '@chopsui/chops-signin';
+
+const BUGANIZER_SCOPE = 'https://www.googleapis.com/auth/buganizer';
+// Only allow google.com profiles through currently.
+const RESTRICT_TO_DOMAIN = '@google.com';
+
+// loadGapi loads window.gapi and returns a logged in user object or null.
+// Allows overriding signinImpl for testing.
+export default function loadGapi() {
+  const signinImpl = getSigninInstance();
+  // Validate client_id exists.
+  if (!CS_env.gapi_client_id) {
+    throw new Error('Cannot find gapi.js client id');
+  }
+
+  // Prevent gapi.js from being loaded multiple times.
+  if (window.__gapiLoadPromise) {
+    return window.__gapiLoadPromise;
+  }
+
+  window.__gapiLoadPromise = new Promise(async (resolve) => {
+    signinImpl.init(CS_env.gapi_client_id, ['client'], [BUGANIZER_SCOPE]);
+    resolve(await fetchGapiEmail(signinImpl));
+  });
+
+  return window.__gapiLoadPromise;
+}
+
+// For fetching current email. May have changed since load.
+export function fetchGapiEmail() {
+  const signinImpl = getSigninInstance();
+  return new Promise((resolve) => {
+    signinImpl.getUserProfileAsync().then((profile) => {
+      resolve(
+          (
+            profile &&
+            profile.getEmail instanceof Function &&
+            profile.getEmail().endsWith(RESTRICT_TO_DOMAIN) &&
+            profile.getEmail()
+          ) || null,
+      );
+    });
+  });
+}
+
+// Provide a singleton chops-signin instance to make testing easier.
+let signinInstance;
+export function getSigninInstance(signinImpl=signin, overwrite=false) {
+  // Assign on first run.
+  if (overwrite || !signinInstance) {
+    signinInstance = signinImpl;
+  }
+  return signinInstance;
+}
diff --git a/static_src/shared/gapi-loader.test.js b/static_src/shared/gapi-loader.test.js
new file mode 100644
index 0000000..fb98fed
--- /dev/null
+++ b/static_src/shared/gapi-loader.test.js
@@ -0,0 +1,73 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import sinon from 'sinon';
+import loadGapi, {fetchGapiEmail, getSigninInstance} from './gapi-loader.js';
+
+describe('gapi-loader', () => {
+  let signinImpl;
+  beforeEach(() => {
+    window.CS_env = {gapi_client_id: 'rutabaga'};
+    signinImpl = {
+      init: sinon.stub(),
+      getUserProfileAsync: () => (
+        Promise.resolve({
+          getEmail: sinon.stub().returns('rutabaga@google.com'),
+        })
+      ),
+    };
+    // Preload signinImpl with a fake for testing.
+    getSigninInstance(signinImpl, true);
+    delete window.__gapiLoadPromise;
+  });
+
+  afterEach(() => {
+    delete window.CS_env;
+  });
+
+  describe('loadGapi()', () => {
+    it('errors out if no client_id', () => {
+      window.CS_env.gapi_client_id = undefined;
+      assert.throws(() => loadGapi());
+    });
+
+    it('returns the same promise when called multiple times', () => {
+      const callOne = loadGapi();
+      const callTwo = loadGapi();
+
+      assert.strictEqual(callOne, callTwo);
+      assert.strictEqual(callOne, window.__gapiLoadPromise);
+      assert.strictEqual(callTwo, window.__gapiLoadPromise);
+      assert.instanceOf(callOne, Promise);
+    });
+
+    it('calls init and returns the current email if any', async () => {
+      const response = await loadGapi();
+      sinon.assert.calledWith(signinImpl.init, window.CS_env.gapi_client_id,
+          ['client'], ['https://www.googleapis.com/auth/buganizer']);
+      assert.equal(response, 'rutabaga@google.com');
+    });
+  });
+
+  describe('fetchGapiEmail()', () => {
+    it('returns a profile for allowed domains', async () => {
+      getSigninInstance({
+        getUserProfileAsync: () => Promise.resolve({
+          getEmail: sinon.stub().returns('rutabaga@google.com'),
+        }),
+      }, true);
+      assert.deepEqual(await fetchGapiEmail(), 'rutabaga@google.com');
+    });
+
+    it('returns nothing for non-allowed domains', async () => {
+      getSigninInstance({
+        getUserProfileAsync: () => Promise.resolve({
+          getEmail: sinon.stub().returns('rutabaga@rutabaga.com'),
+        }),
+      }, true);
+      assert.deepEqual(await fetchGapiEmail(), null);
+    });
+  });
+});
diff --git a/static_src/shared/helpers.js b/static_src/shared/helpers.js
new file mode 100644
index 0000000..362b4ec
--- /dev/null
+++ b/static_src/shared/helpers.js
@@ -0,0 +1,213 @@
+// Copyright 2019 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.
+
+import qs from 'qs';
+
+
+/**
+ * With lists a and b, get the elements that are in a but not in b.
+ * result = a - b
+ * @param {Array} listA
+ * @param {Array} listB
+ * @param {function?} equals
+ * @return {Array}
+ */
+export function arrayDifference(listA, listB, equals = undefined) {
+  if (!equals) {
+    equals = (a, b) => (a === b);
+  }
+  listA = listA || [];
+  listB = listB || [];
+  return listA.filter((a) => {
+    return !listB.find((b) => (equals(a, b)));
+  });
+}
+
+/**
+ * Check to see if a Set contains any of a list of values.
+ *
+ * @param {Set} set the Set to check for values in.
+ * @param {Iterable} values checks if any of these values are included.
+ * @return {boolean} whether the Set has any of the values or not.
+ */
+export function setHasAny(set, values) {
+  for (const value of values) {
+    if (set.has(value)) {
+      return true;
+    }
+  }
+  return false;
+}
+
+/**
+ * Capitalize the first letter of a given string.
+ * @param {string} str
+ * @return {string}
+ */
+export function capitalizeFirst(str) {
+  return `${str.charAt(0).toUpperCase()}${str.substring(1)}`;
+}
+
+/**
+ * Check if a string has a prefix, ignoring case.
+ * @param {string} str
+ * @param {string} prefix
+ * @return {boolean}
+ */
+export function hasPrefix(str, prefix) {
+  return str.toLowerCase().startsWith(prefix.toLowerCase());
+}
+
+/**
+ * Returns a string without specified prefix
+ * @param {string} str
+ * @param {string} prefix
+ * @return {string}
+ */
+export function removePrefix(str, prefix) {
+  return str.substr(prefix.length);
+}
+
+// TODO(zhangtiff): Make this more grammatically correct for
+// more than two items.
+export function arrayToEnglish(arr) {
+  if (!arr) return '';
+  return arr.join(' and ');
+}
+
+export function pluralize(count, singular, pluralArg) {
+  const plural = pluralArg || singular + 's';
+  return count === 1 ? singular : plural;
+}
+
+export function objectToMap(obj = {}) {
+  const map = new Map();
+  Object.keys(obj).forEach((key) => {
+    map.set(key, obj[key]);
+  });
+  return map;
+}
+
+/**
+ * Given an Object, extract a list of values from it, based on some
+ * specified keys.
+ *
+ * @param {Object} obj the Object to read values from.
+ * @param {Array} keys the Object keys to fetch values for.
+ * @return {Array} Object values matching the given keys.
+ */
+export function objectValuesForKeys(obj, keys = []) {
+  return keys.map((key) => ((key in obj) ? obj[key] : undefined));
+}
+
+/**
+ * Checks to see if object has no keys
+ * @param {Object} obj
+ * @return {boolean}
+ */
+export function isEmptyObject(obj) {
+  return Object.keys(obj).length === 0;
+}
+
+/**
+ * Checks if two strings are equal, case-insensitive
+ * @param {string} a
+ * @param {string} b
+ * @return {boolean}
+ */
+export function equalsIgnoreCase(a, b) {
+  if (a == b) return true;
+  if (!a || !b) return false;
+  return a.toLowerCase() === b.toLowerCase();
+}
+
+export function immutableSplice(arr, index, count, ...addedItems) {
+  if (!arr) return '';
+
+  return [...arr.slice(0, index), ...addedItems, ...arr.slice(index + count)];
+}
+
+/**
+ * Computes a new URL for a page based on an exiting path and set of query
+ * params.
+ *
+ * @param {string} baseUrl the base URL without query params.
+ * @param {Object} oldParams original query params before changes.
+ * @param {Object} newParams query parameters to override existing ones.
+ * @param {Array} deletedParams list of keys to be cleared.
+ * @return {string} the new URL with the updated params.
+ */
+export function urlWithNewParams(baseUrl = '',
+    oldParams = {}, newParams = {}, deletedParams = []) {
+  const params = {...oldParams, ...newParams};
+  deletedParams.forEach((name) => {
+    delete params[name];
+  });
+
+  const queryString = qs.stringify(params);
+
+  return `${baseUrl}${queryString ? '?' : ''}${queryString}`;
+}
+
+/**
+ * Finds out whether a user is a member of a given project based on
+ * project membership info.
+ *
+ * @param {Object} userRef reference to a given user. Expects an id.
+ * @param {string} projectName name of the project being searched for.
+ * @param {Map} usersProjects all known user project memberships where
+ *  keys are userId and values are Objects with expected values
+ *  for {ownerOf, memberOf, contributorTo}.
+ * @return {boolean} whether the user is a member of the project or not.
+ */
+export function userIsMember(userRef, projectName, usersProjects = new Map()) {
+  // TODO(crbug.com/monorail/5968): Find a better place to place this function
+  if (!userRef || !userRef.userId || !projectName) return false;
+  const userProjects = usersProjects.get(userRef.userId);
+  if (!userProjects) return false;
+  const {ownerOf = [], memberOf = [], contributorTo = []} = userProjects;
+  return ownerOf.includes(projectName) ||
+    memberOf.includes(projectName) ||
+    contributorTo.includes(projectName);
+}
+
+/**
+ * Creates a function that checks two objects are not equal
+ * based on a set of property keys
+ *
+ * @param {Set<string>} props
+ * @return {function(): boolean}
+ */
+export function createObjectComparisonFunc(props) {
+  /**
+   * Computes whether set of properties have changed
+   * @param {Object<string, string>} newVal
+   * @param {Object<string, string>} oldVal
+   * @return {boolean}
+   */
+  return function(newVal, oldVal) {
+    if (oldVal === undefined && newVal === undefined) {
+      return false;
+    } else if (oldVal === undefined || newVal === undefined) {
+      return true;
+    } else if (oldVal === null && newVal === null) {
+      return false;
+    } else if (oldVal === null || newVal === null) {
+      return true;
+    }
+
+    return Array.from(props)
+        .some((propName) => newVal[propName] !== oldVal[propName]);
+  };
+}
+
+/**
+ * Calculates whether to wait for memberDefaultQuery to exist prior
+ * to fetching IssueList. Logged in users may use a default query.
+ * @param {Object} queryParams
+ * @return {boolean}
+ */
+export const shouldWaitForDefaultQuery = (queryParams) => {
+  return !queryParams.hasOwnProperty('q');
+};
diff --git a/static_src/shared/helpers.test.js b/static_src/shared/helpers.test.js
new file mode 100644
index 0000000..7c40ed5
--- /dev/null
+++ b/static_src/shared/helpers.test.js
@@ -0,0 +1,361 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {arrayDifference, setHasAny, capitalizeFirst, hasPrefix, objectToMap,
+  objectValuesForKeys, equalsIgnoreCase, immutableSplice, userIsMember,
+  urlWithNewParams, createObjectComparisonFunc} from './helpers.js';
+
+
+describe('arrayDifference', () => {
+  it('empty array stays empty', () => {
+    assert.deepEqual(arrayDifference([], []), []);
+    assert.deepEqual(arrayDifference([], undefined), []);
+    assert.deepEqual(arrayDifference([], ['a']), []);
+  });
+
+  it('subtracting empty array does nothing', () => {
+    assert.deepEqual(arrayDifference(['a'], []), ['a']);
+    assert.deepEqual(arrayDifference([1, 2, 3], []), [1, 2, 3]);
+    assert.deepEqual(arrayDifference([1, 2, 'test'], []), [1, 2, 'test']);
+    assert.deepEqual(arrayDifference([1, 2, 'test'], undefined),
+        [1, 2, 'test']);
+  });
+
+  it('subtracts elements from array', () => {
+    assert.deepEqual(arrayDifference(['a', 'b', 'c'], ['b', 'c']), ['a']);
+    assert.deepEqual(arrayDifference(['a', 'b', 'c'], ['a']), ['b', 'c']);
+    assert.deepEqual(arrayDifference(['a', 'b', 'c'], ['b']), ['a', 'c']);
+    assert.deepEqual(arrayDifference([1, 2, 3], [2]), [1, 3]);
+  });
+
+  it('does not subtract missing elements from array', () => {
+    assert.deepEqual(arrayDifference(['a', 'b', 'c'], ['d']), ['a', 'b', 'c']);
+    assert.deepEqual(arrayDifference([1, 2, 3], [5]), [1, 2, 3]);
+    assert.deepEqual(arrayDifference([1, 2, 3], [-1, 2]), [1, 3]);
+  });
+
+  it('custom equals function', () => {
+    assert.deepEqual(arrayDifference(['a', 'b'], ['A']), ['a', 'b']);
+    assert.deepEqual(arrayDifference(['a', 'b'], ['A'], equalsIgnoreCase),
+        ['b']);
+  });
+});
+
+describe('setHasAny', () => {
+  it('empty set never has any values', () => {
+    assert.isFalse(setHasAny(new Set(), []));
+    assert.isFalse(setHasAny(new Set(), ['test']));
+    assert.isFalse(setHasAny(new Set(), ['nope', 'yup', 'no']));
+  });
+
+  it('false when no values found', () => {
+    assert.isFalse(setHasAny(new Set(['hello', 'world']), []));
+    assert.isFalse(setHasAny(new Set(['hello', 'world']), ['wor']));
+    assert.isFalse(setHasAny(new Set(['test']), ['other', 'values']));
+    assert.isFalse(setHasAny(new Set([1, 2, 3]), [4, 5, 6]));
+  });
+
+  it('true when values found', () => {
+    assert.isTrue(setHasAny(new Set(['hello', 'world']), ['world']));
+    assert.isTrue(setHasAny(new Set([1, 2, 3]), [3, 4, 5]));
+    assert.isTrue(setHasAny(new Set([1, 2, 3]), [1, 3]));
+  });
+});
+
+describe('capitalizeFirst', () => {
+  it('empty string', () => {
+    assert.equal(capitalizeFirst(''), '');
+  });
+
+  it('ignores non-letters', () => {
+    assert.equal(capitalizeFirst('8fcsdf'), '8fcsdf');
+  });
+
+  it('preserves existing caps', () => {
+    assert.equal(capitalizeFirst('HELLO world'), 'HELLO world');
+  });
+
+  it('capitalizes lowercase', () => {
+    assert.equal(capitalizeFirst('hello world'), 'Hello world');
+  });
+});
+
+describe('hasPrefix', () => {
+  it('only true when has prefix', () => {
+    assert.isFalse(hasPrefix('teststring', 'test-'));
+    assert.isFalse(hasPrefix('stringtest-', 'test-'));
+    assert.isFalse(hasPrefix('^test-$', 'test-'));
+    assert.isTrue(hasPrefix('test-', 'test-'));
+    assert.isTrue(hasPrefix('test-fsdfsdf', 'test-'));
+  });
+
+  it('ignores case when checking prefix', () => {
+    assert.isTrue(hasPrefix('TEST-string', 'test-'));
+    assert.isTrue(hasPrefix('test-string', 'test-'));
+    assert.isTrue(hasPrefix('tEsT-string', 'test-'));
+  });
+});
+
+describe('objectToMap', () => {
+  it('converts Object to Map with the same keys', () => {
+    assert.deepEqual(objectToMap({}), new Map());
+    assert.deepEqual(objectToMap({test: 'value'}),
+        new Map([['test', 'value']]));
+    assert.deepEqual(objectToMap({['weird:key']: 'value',
+      ['what is this key']: 'v2'}), new Map([['weird:key', 'value'],
+      ['what is this key', 'v2']]));
+  });
+});
+
+describe('objectValuesForKeys', () => {
+  it('no values when no matching keys', () => {
+    assert.deepEqual(objectValuesForKeys({}, []), []);
+    assert.deepEqual(objectValuesForKeys({}, []), []);
+    assert.deepEqual(objectValuesForKeys({key: 'value'}, []), []);
+  });
+
+  it('returns values when keys match', () => {
+    assert.deepEqual(objectValuesForKeys({a: 1, b: 2, c: 3}, ['a', 'b']),
+        [1, 2]);
+    assert.deepEqual(objectValuesForKeys({a: 1, b: 2, c: 3}, ['b', 'c']),
+        [2, 3]);
+    assert.deepEqual(objectValuesForKeys({['weird:key']: {nested: 'obj'}},
+        ['weird:key']), [{nested: 'obj'}]);
+  });
+
+  it('sets non-matching keys to undefined', () => {
+    assert.deepEqual(objectValuesForKeys({a: 1, b: 2, c: 3}, ['c', 'd', 'e']),
+        [3, undefined, undefined]);
+    assert.deepEqual(objectValuesForKeys({a: 1, b: 2, c: 3}, [1, 2, 3]),
+        [undefined, undefined, undefined]);
+  });
+});
+
+describe('equalsIgnoreCase', () => {
+  it('matches same case strings', () => {
+    assert.isTrue(equalsIgnoreCase('', ''));
+    assert.isTrue(equalsIgnoreCase('HelloWorld', 'HelloWorld'));
+    assert.isTrue(equalsIgnoreCase('hmm', 'hmm'));
+    assert.isTrue(equalsIgnoreCase('TEST', 'TEST'));
+  });
+
+  it('matches different case strings', () => {
+    assert.isTrue(equalsIgnoreCase('a', 'A'));
+    assert.isTrue(equalsIgnoreCase('HelloWorld', 'helloworld'));
+    assert.isTrue(equalsIgnoreCase('hmm', 'HMM'));
+    assert.isTrue(equalsIgnoreCase('TEST', 'teSt'));
+  });
+
+  it('does not match different strings', () => {
+    assert.isFalse(equalsIgnoreCase('hello', 'hello '));
+    assert.isFalse(equalsIgnoreCase('superstring', 'string'));
+    assert.isFalse(equalsIgnoreCase('aaa', 'aa'));
+  });
+});
+
+describe('immutableSplice', () => {
+  it('does not edit original array', () => {
+    const arr = ['apples', 'pears', 'oranges'];
+
+    assert.deepEqual(immutableSplice(arr, 1, 1),
+        ['apples', 'oranges']);
+
+    assert.deepEqual(arr, ['apples', 'pears', 'oranges']);
+  });
+
+  it('removes multiple items', () => {
+    const arr = [1, 2, 3, 4, 5, 6];
+
+    assert.deepEqual(immutableSplice(arr, 1, 0), [1, 2, 3, 4, 5, 6]);
+    assert.deepEqual(immutableSplice(arr, 1, 4), [1, 6]);
+    assert.deepEqual(immutableSplice(arr, 0, 6), []);
+  });
+
+  it('adds items', () => {
+    const arr = [1, 2, 3];
+
+    assert.deepEqual(immutableSplice(arr, 1, 1, 4, 5, 6), [1, 4, 5, 6, 3]);
+    assert.deepEqual(immutableSplice(arr, 2, 1, 4, 5, 6), [1, 2, 4, 5, 6]);
+    assert.deepEqual(immutableSplice(arr, 0, 0, -3, -2, -1, 0),
+        [-3, -2, -1, 0, 1, 2, 3]);
+  });
+});
+
+describe('urlWithNewParams', () => {
+  it('empty', () => {
+    assert.equal(urlWithNewParams(), '');
+    assert.equal(urlWithNewParams(''), '');
+    assert.equal(urlWithNewParams('', {}), '');
+    assert.equal(urlWithNewParams('', {}, {}), '');
+    assert.equal(urlWithNewParams('', {}, {}, []), '');
+  });
+
+  it('preserves existing URL without changes', () => {
+    assert.equal(urlWithNewParams('/p/chromium/issues/list'),
+        '/p/chromium/issues/list');
+    assert.equal(urlWithNewParams('/p/chromium/issues/list', {q: 'owner:me'}),
+        '/p/chromium/issues/list?q=owner%3Ame');
+    assert.equal(
+        urlWithNewParams('/p/chromium/issues/list', {q: 'owner:me', can: '1'}),
+        '/p/chromium/issues/list?q=owner%3Ame&can=1');
+  });
+
+  it('adds new params', () => {
+    assert.equal(
+        urlWithNewParams('/p/chromium/issues/list', {}, {q: 'owner:me'}),
+        '/p/chromium/issues/list?q=owner%3Ame');
+    assert.equal(
+        urlWithNewParams('/p/chromium/issues/list',
+            {can: '1'}, {q: 'owner:me'}),
+        '/p/chromium/issues/list?can=1&q=owner%3Ame');
+
+    // Override existing params.
+    assert.equal(
+        urlWithNewParams('/p/chromium/issues/list',
+            {can: '1', q: 'owner:me'}, {q: 'test'}),
+        '/p/chromium/issues/list?can=1&q=test');
+  });
+
+  it('clears existing params', () => {
+    assert.equal(
+        urlWithNewParams('/p/chromium/issues/list', {q: 'owner:me'}, {}, ['q']),
+        '/p/chromium/issues/list');
+    assert.equal(
+        urlWithNewParams('/p/chromium/issues/list',
+            {can: '1'}, {q: 'owner:me'}, ['can']),
+        '/p/chromium/issues/list?q=owner%3Ame');
+    assert.equal(
+        urlWithNewParams('/p/chromium/issues/list', {q: 'owner:me'}, {can: '2'},
+            ['q', 'can', 'fakeparam']),
+        '/p/chromium/issues/list');
+  });
+});
+
+describe('userIsMember', () => {
+  it('false when no user', () => {
+    assert.isFalse(userIsMember(undefined));
+    assert.isFalse(userIsMember({}));
+    assert.isFalse(userIsMember({}, 'chromium',
+        new Map([['123', {ownerOf: ['chromium']}]])));
+  });
+
+  it('true when user is member of project', () => {
+    assert.isTrue(userIsMember({userId: '123'}, 'chromium',
+        new Map([['123', {contributorTo: ['chromium']}]])));
+
+    assert.isTrue(userIsMember({userId: '123'}, 'chromium',
+        new Map([['123', {ownerOf: ['chromium']}]])));
+
+    assert.isTrue(userIsMember({userId: '123'}, 'chromium',
+        new Map([['123', {memberOf: ['chromium']}]])));
+  });
+
+  it('true when user is member of multiple projects', () => {
+    assert.isTrue(userIsMember({userId: '123'}, 'chromium', new Map([
+      ['123', {contributorTo: ['test', 'chromium', 'fakeproject']}],
+    ])));
+
+    assert.isTrue(userIsMember({userId: '123'}, 'chromium', new Map([
+      ['123', {ownerOf: ['test', 'chromium', 'fakeproject']}],
+    ])));
+
+    assert.isTrue(userIsMember({userId: '123'}, 'chromium', new Map([
+      ['123', {memberOf: ['test', 'chromium', 'fakeproject']}],
+    ])));
+  });
+
+  it('false when user is member of different project', () => {
+    assert.isFalse(userIsMember({userId: '123'}, 'chromium', new Map([
+      ['123', {contributorTo: ['test', 'fakeproject']}],
+    ])));
+
+    assert.isFalse(userIsMember({userId: '123'}, 'chromium', new Map([
+      ['123', {ownerOf: ['test', 'fakeproject']}],
+    ])));
+
+    assert.isFalse(userIsMember({userId: '123'}, 'chromium', new Map([
+      ['123', {memberOf: ['test', 'fakeproject']}],
+    ])));
+  });
+
+  it('false when no project data for user', () => {
+    assert.isFalse(userIsMember({userId: '123'}, 'chromium'));
+    assert.isFalse(userIsMember({userId: '123'}, 'chromium', new Map()));
+    assert.isFalse(userIsMember({userId: '123'}, 'chromium', new Map([
+      ['543', {ownerOf: ['chromium']}],
+    ])));
+  });
+});
+
+describe('createObjectComparisonFunc', () => {
+  it('returns a function', () => {
+    const result = createObjectComparisonFunc(new Set());
+    assert.instanceOf(result, Function);
+  });
+
+  describe('returned function', () => {
+    it('returns false if both inputs are undefined', () => {
+      const comparableProps = new Set(['a', 'b', 'c']);
+      const func = createObjectComparisonFunc(comparableProps);
+      const result = func(undefined, undefined);
+
+      assert.isFalse(result);
+    });
+
+    it('returns true if only one inputs is undefined', () => {
+      const comparableProps = new Set(['a', 'b', 'c']);
+      const func = createObjectComparisonFunc(comparableProps);
+      const result = func({}, undefined);
+
+      assert.isTrue(result);
+    });
+
+    it('returns false if both inputs are null', () => {
+      const comparableProps = new Set(['a', 'b', 'c']);
+      const func = createObjectComparisonFunc(comparableProps);
+      const result = func(null, null);
+
+      assert.isFalse(result);
+    });
+
+    it('returns true if only one inputs is null', () => {
+      const comparableProps = new Set(['a', 'b', 'c']);
+      const func = createObjectComparisonFunc(comparableProps);
+      const result = func({}, null);
+
+      assert.isTrue(result);
+    });
+
+    it('returns true if any comparable property is different', () => {
+      const comparableProps = new Set(['a', 'b', 'c']);
+      const func = createObjectComparisonFunc(comparableProps);
+      const a = {a: 1, b: 2, c: 3};
+      const b = {a: 1, b: 2, c: '3'};
+      const result = func(a, b);
+
+      assert.isTrue(result);
+    });
+
+    it('returns false if all comparable properties are the same', () => {
+      const comparableProps = new Set(['a', 'b', 'c']);
+      const func = createObjectComparisonFunc(comparableProps);
+      const a = {a: 1, b: 2, c: 3};
+      const b = {a: 1, b: 2, c: 3};
+      const result = func(a, b);
+
+      assert.isFalse(result);
+    });
+
+    it('ignores non-comparable properties', () => {
+      const comparableProps = new Set(['a', 'b', 'c']);
+      const func = createObjectComparisonFunc(comparableProps);
+      const a = {a: 1, b: 2, c: 3, d: 4};
+      const b = {a: 1, b: 2, c: 3, d: 'not four', e: 'exists'};
+      const result = func(a, b);
+
+      assert.isFalse(result);
+    });
+  });
+});
diff --git a/static_src/shared/issue-fields.js b/static_src/shared/issue-fields.js
new file mode 100644
index 0000000..09ac7d3
--- /dev/null
+++ b/static_src/shared/issue-fields.js
@@ -0,0 +1,424 @@
+// Copyright 2019 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.
+
+import {relativeTime} from
+  'elements/chops/chops-timestamp/chops-timestamp-helpers.js';
+import {labelRefsToStrings, issueRefsToStrings, componentRefsToStrings,
+  userRefsToDisplayNames, statusRefsToStrings, labelNameToLabelPrefixes,
+} from './convertersV0.js';
+import {removePrefix} from './helpers.js';
+import {STATUS_ENUM_TO_TEXT} from 'shared/consts/approval.js';
+import {fieldValueMapKey} from 'shared/metadata-helpers.js';
+
+// TODO(zhangtiff): Merge this file with metadata-helpers.js.
+
+
+/** @enum {string} */
+export const fieldTypes = Object.freeze({
+  APPROVAL_TYPE: 'APPROVAL_TYPE',
+  DATE_TYPE: 'DATE_TYPE',
+  ENUM_TYPE: 'ENUM_TYPE',
+  INT_TYPE: 'INT_TYPE',
+  STR_TYPE: 'STR_TYPE',
+  USER_TYPE: 'USER_TYPE',
+  URL_TYPE: 'URL_TYPE',
+
+  // Frontend types used to handle built in fields like BlockedOn.
+  // Although these are not configurable custom field types on the
+  // backend, hard-coding these fields types on the frontend allows
+  // us to inter-op custom and baked in fields more seamlessly on
+  // the frontend.
+  ISSUE_TYPE: 'ISSUE_TYPE',
+  TIME_TYPE: 'TIME_TYPE',
+  COMPONENT_TYPE: 'COMPONENT_TYPE',
+  STATUS_TYPE: 'STATUS_TYPE',
+  LABEL_TYPE: 'LABEL_TYPE',
+  PROJECT_TYPE: 'PROJECT_TYPE',
+});
+
+const GROUPABLE_FIELD_TYPES = new Set([
+  fieldTypes.DATE_TYPE,
+  fieldTypes.ENUM_TYPE,
+  fieldTypes.USER_TYPE,
+  fieldTypes.INT_TYPE,
+]);
+
+const SPEC_DELIMITER_REGEX = /[\s\+]+/;
+export const SITEWIDE_DEFAULT_COLUMNS = ['ID', 'Type', 'Status',
+  'Priority', 'Milestone', 'Owner', 'Summary'];
+
+// When no default can is configured, projects use "Open issues".
+export const SITEWIDE_DEFAULT_CAN = '2';
+
+export const PHASE_FIELD_COL_DELIMITER_REGEX = /\./;
+
+export const EMPTY_FIELD_VALUE = '----';
+
+export const APPROVER_COL_SUFFIX_REGEX = /\-approver$/i;
+
+/**
+ * Parses colspec or groupbyspec values from user input such as form fields
+ * or the URL.
+ *
+ * @param {string} spec a delimited string with spec values to parse.
+ * @return {Array} list of spec values represented by the string.
+ */
+export function parseColSpec(spec = '') {
+  return spec.split(SPEC_DELIMITER_REGEX).filter(Boolean);
+}
+
+/**
+ * Finds the type for an issue based on the issue's custom fields
+ * and labels. If there is a custom field named "Type", that field
+ * is used, otherwise labels are used.
+ * @param {!Array<FieldValue>} fieldValues
+ * @param {!Array<LabelRef>} labelRefs
+ * @return {string}
+ */
+export function extractTypeForIssue(fieldValues, labelRefs) {
+  if (fieldValues) {
+    // If there is a custom field for "Type", use that for type.
+    const typeFieldValue = fieldValues.find(
+        (f) => (f.fieldRef && f.fieldRef.fieldName.toLowerCase() === 'type'),
+    );
+    if (typeFieldValue) {
+      return typeFieldValue.value;
+    }
+  }
+
+  // Otherwise, search through labels for a "Type" label.
+  if (labelRefs) {
+    const typeLabel = labelRefs.find(
+        (l) => l.label.toLowerCase().startsWith('type-'));
+    if (typeLabel) {
+    // Strip length of prefix.
+      return typeLabel.label.substr(5);
+    }
+  }
+  return;
+}
+
+// TODO(jojwang): monorail:6397, Refactor these specific map producers into
+// selectors.
+/**
+ * Converts issue.fieldValues into a map where values can be looked up given
+ * a field value key.
+ *
+ * @param {Array} fieldValues List of values with a fieldRef attached.
+ * @return {Map} keys are a string constructed using fieldValueMapKey() and
+ *   values are an Array of value strings.
+ */
+export function fieldValuesToMap(fieldValues) {
+  if (!fieldValues) return new Map();
+  const acc = new Map();
+  for (const v of fieldValues) {
+    if (!v || !v.fieldRef || !v.fieldRef.fieldName || !v.value) continue;
+    const key = fieldValueMapKey(v.fieldRef.fieldName,
+        v.phaseRef && v.phaseRef.phaseName);
+    if (acc.has(key)) {
+      acc.get(key).push(v.value);
+    } else {
+      acc.set(key, [v.value]);
+    }
+  }
+  return acc;
+}
+
+/**
+ * Converts issue.approvalValues into a map where values can be looked up given
+  * a field value key.
+  *
+  * @param {Array} approvalValues list of approvals with a fieldRef attached.
+  * @return {Map} keys are a string constructed using approvalValueFieldMapKey()
+  *   and values are an Array of value strings.
+  */
+export function approvalValuesToMap(approvalValues) {
+  if (!approvalValues) return new Map();
+  const approvalKeysToValues = new Map();
+  for (const av of approvalValues) {
+    if (!av || !av.fieldRef || !av.fieldRef.fieldName) continue;
+    const key = fieldValueMapKey(av.fieldRef.fieldName);
+    // If there is not status for this approval, the value should show NOT_SET.
+    approvalKeysToValues.set(key, [STATUS_ENUM_TO_TEXT[av.status || '']]);
+  }
+  return approvalKeysToValues;
+}
+
+/**
+ * Converts issue.approvalValues into a map where the approvers can be looked
+ * up given a field value key.
+ *
+ * @param {Array} approvalValues list of approvals with a fieldRef attached.
+ * @return {Map} keys are a string constructed using fieldValueMapKey() and
+ *   values are an Array of
+ */
+export function approvalApproversToMap(approvalValues) {
+  if (!approvalValues) return new Map();
+  const approvalKeysToApprovers = new Map();
+  for (const av of approvalValues) {
+    if (!av || !av.fieldRef || !av.fieldRef.fieldName ||
+        !av.approverRefs) continue;
+    const key = fieldValueMapKey(av.fieldRef.fieldName);
+    const approvers = av.approverRefs.map((ref) => ref.displayName);
+    approvalKeysToApprovers.set(key, approvers);
+  }
+  return approvalKeysToApprovers;
+}
+
+
+// Helper function used for fields with only one value that can be unset.
+const wrapValueIfExists = (value) => value ? [value] : [];
+
+
+/**
+ * @typedef DefaultIssueField
+ * @property {string} fieldName
+ * @property {fieldTypes} type
+ * @property {function(*): Array<string>} extractor
+*/
+// TODO(zhangtiff): Merge this functionality with extract-grid-data.js
+// TODO(zhangtiff): Combine this functionality with mr-metadata and
+// mr-edit-metadata to allow more expressive representation of built in fields.
+/**
+ * @const {Array<DefaultIssueField>}
+ */
+const defaultIssueFields = Object.freeze([
+  {
+    fieldName: 'ID',
+    type: fieldTypes.ISSUE_TYPE,
+    extractor: ({localId, projectName}) => [{localId, projectName}],
+  }, {
+    fieldName: 'Project',
+    type: fieldTypes.PROJECT_TYPE,
+    extractor: (issue) => [issue.projectName],
+  }, {
+    fieldName: 'Attachments',
+    type: fieldTypes.INT_TYPE,
+    extractor: (issue) => [issue.attachmentCount || 0],
+  }, {
+    fieldName: 'AllLabels',
+    type: fieldTypes.LABEL_TYPE,
+    extractor: (issue) => issue.labelRefs || [],
+  }, {
+    fieldName: 'Blocked',
+    type: fieldTypes.STR_TYPE,
+    extractor: (issue) => {
+      if (issue.blockedOnIssueRefs && issue.blockedOnIssueRefs.length) {
+        return ['Yes'];
+      }
+      return ['No'];
+    },
+  }, {
+    fieldName: 'BlockedOn',
+    type: fieldTypes.ISSUE_TYPE,
+    extractor: (issue) => issue.blockedOnIssueRefs || [],
+  }, {
+    fieldName: 'Blocking',
+    type: fieldTypes.ISSUE_TYPE,
+    extractor: (issue) => issue.blockingIssueRefs || [],
+  }, {
+    fieldName: 'CC',
+    type: fieldTypes.USER_TYPE,
+    extractor: (issue) => issue.ccRefs || [],
+  }, {
+    fieldName: 'Closed',
+    type: fieldTypes.TIME_TYPE,
+    extractor: (issue) => wrapValueIfExists(issue.closedTimestamp),
+  }, {
+    fieldName: 'Component',
+    type: fieldTypes.COMPONENT_TYPE,
+    extractor: (issue) => issue.componentRefs || [],
+  }, {
+    fieldName: 'ComponentModified',
+    type: fieldTypes.TIME_TYPE,
+    extractor: (issue) => [issue.componentModifiedTimestamp],
+  }, {
+    fieldName: 'MergedInto',
+    type: fieldTypes.ISSUE_TYPE,
+    extractor: (issue) => wrapValueIfExists(issue.mergedIntoIssueRef),
+  }, {
+    fieldName: 'Modified',
+    type: fieldTypes.TIME_TYPE,
+    extractor: (issue) => wrapValueIfExists(issue.modifiedTimestamp),
+  }, {
+    fieldName: 'Reporter',
+    type: fieldTypes.USER_TYPE,
+    extractor: (issue) => [issue.reporterRef],
+  }, {
+    fieldName: 'Stars',
+    type: fieldTypes.INT_TYPE,
+    extractor: (issue) => [issue.starCount || 0],
+  }, {
+    fieldName: 'Status',
+    type: fieldTypes.STATUS_TYPE,
+    extractor: (issue) => wrapValueIfExists(issue.statusRef),
+  }, {
+    fieldName: 'StatusModified',
+    type: fieldTypes.TIME_TYPE,
+    extractor: (issue) => [issue.statusModifiedTimestamp],
+  }, {
+    fieldName: 'Summary',
+    type: fieldTypes.STR_TYPE,
+    extractor: (issue) => [issue.summary],
+  }, {
+    fieldName: 'Type',
+    type: fieldTypes.ENUM_TYPE,
+    extractor: (issue) => wrapValueIfExists(extractTypeForIssue(
+        issue.fieldValues, issue.labelRefs)),
+  }, {
+    fieldName: 'Owner',
+    type: fieldTypes.USER_TYPE,
+    extractor: (issue) => wrapValueIfExists(issue.ownerRef),
+  }, {
+    fieldName: 'OwnerModified',
+    type: fieldTypes.TIME_TYPE,
+    extractor: (issue) => [issue.ownerModifiedTimestamp],
+  }, {
+    fieldName: 'Opened',
+    type: fieldTypes.TIME_TYPE,
+    extractor: (issue) => [issue.openedTimestamp],
+  },
+]);
+
+/**
+ * Lowercase field name -> field object. This uses an Object instead of a Map
+ * so that it can be frozen.
+ * @type {Object<string, DefaultIssueField>}
+ */
+export const defaultIssueFieldMap = Object.freeze(
+    defaultIssueFields.reduce((acc, field) => {
+      acc[field.fieldName.toLowerCase()] = field;
+      return acc;
+    }, {}),
+);
+
+export const DEFAULT_ISSUE_FIELD_LIST = defaultIssueFields.map(
+    (field) => field.fieldName);
+
+/**
+ * Wrapper that extracts potentially composite field values from issue
+ * @param {Issue} issue
+ * @param {string} fieldName
+ * @param {string} projectName
+ * @return {Array<string>}
+ */
+export const stringValuesForIssueField = (issue, fieldName, projectName) => {
+  // Split composite fields into each segment
+  return fieldName.split('/').flatMap((fieldKey) => stringValuesExtractor(
+      issue, fieldKey, projectName));
+};
+
+/**
+ * Extract string values of an issue's field
+ * @param {Issue} issue
+ * @param {string} fieldName
+ * @param {string} projectName
+ * @return {Array<string>}
+ */
+const stringValuesExtractor = (issue, fieldName, projectName) => {
+  const fieldKey = fieldName.toLowerCase();
+
+  // Look at whether the field is a built in field first.
+  if (defaultIssueFieldMap.hasOwnProperty(fieldKey)) {
+    const bakedFieldDef = defaultIssueFieldMap[fieldKey];
+    const values = bakedFieldDef.extractor(issue);
+    switch (bakedFieldDef.type) {
+      case fieldTypes.ISSUE_TYPE:
+        return issueRefsToStrings(values, projectName);
+      case fieldTypes.COMPONENT_TYPE:
+        return componentRefsToStrings(values);
+      case fieldTypes.LABEL_TYPE:
+        return labelRefsToStrings(values);
+      case fieldTypes.USER_TYPE:
+        return userRefsToDisplayNames(values);
+      case fieldTypes.STATUS_TYPE:
+        return statusRefsToStrings(values);
+      case fieldTypes.TIME_TYPE:
+        // TODO(zhangtiff): Find a way to dynamically update displayed
+        // time without page reloads.
+        return values.map((time) => relativeTime(new Date(time * 1000)));
+    }
+    return values.map((value) => `${value}`);
+  }
+
+  // Handle custom approval field approver columns.
+  const found = fieldKey.match(APPROVER_COL_SUFFIX_REGEX);
+  if (found) {
+    const approvalName = fieldKey.slice(0, -found[0].length);
+    const approvalFieldKey = fieldValueMapKey(approvalName);
+    const approvalApproversMap = approvalApproversToMap(issue.approvalValues);
+    if (approvalApproversMap.has(approvalFieldKey)) {
+      return approvalApproversMap.get(approvalFieldKey);
+    }
+  }
+
+  // Handle custom approval field columns.
+  const approvalValuesMap = approvalValuesToMap(issue.approvalValues);
+  if (approvalValuesMap.has(fieldKey)) {
+    return approvalValuesMap.get(fieldKey);
+  }
+
+  // Handle custom fields.
+  let fieldValueKey = fieldKey;
+  let fieldNameKey = fieldKey;
+  if (fieldKey.match(PHASE_FIELD_COL_DELIMITER_REGEX)) {
+    let phaseName;
+    [phaseName, fieldNameKey] = fieldKey.split(
+        PHASE_FIELD_COL_DELIMITER_REGEX);
+    // key for fieldValues Map contain the phaseName, if any.
+    fieldValueKey = fieldValueMapKey(fieldNameKey, phaseName);
+  }
+  const fieldValuesMap = fieldValuesToMap(issue.fieldValues);
+  if (fieldValuesMap.has(fieldValueKey)) {
+    return fieldValuesMap.get(fieldValueKey);
+  }
+
+  // Handle custom labels and ad hoc labels last.
+  const matchingLabels = (issue.labelRefs || []).filter((labelRef) => {
+    const labelPrefixes = labelNameToLabelPrefixes(
+        labelRef.label).map((prefix) => prefix.toLowerCase());
+    return labelPrefixes.includes(fieldKey);
+  });
+  const labelPrefix = fieldKey + '-';
+  return matchingLabels.map(
+      (labelRef) => removePrefix(labelRef.label, labelPrefix));
+};
+
+/**
+ * Computes all custom fields set in a given Issue, including custom
+ * fields derived from label prefixes and approval values.
+ * @param {Issue} issue An Issue object.
+ * @param {boolean=} exclHighCardinality Whether to exclude fields with a high
+ *   cardinality, like string custom fields for example. This is useful for
+ *   features where issues are grouped by different values because grouping
+ *   by high cardinality fields is not meaningful.
+ * @return {Array<string>}
+ */
+export function fieldsForIssue(issue, exclHighCardinality = false) {
+  const approvalValues = issue.approvalValues || [];
+  let fieldValues = issue.fieldValues || [];
+  const labelRefs = issue.labelRefs || [];
+  const labelPrefixes = [];
+  labelRefs.forEach((labelRef) => {
+    labelPrefixes.push(...labelNameToLabelPrefixes(labelRef.label));
+  });
+  if (exclHighCardinality) {
+    fieldValues = fieldValues.filter(({fieldRef}) =>
+      GROUPABLE_FIELD_TYPES.has(fieldRef.type));
+  }
+  return [
+    ...approvalValues.map((approval) => approval.fieldRef.fieldName),
+    ...approvalValues.map(
+        (approval) => approval.fieldRef.fieldName + '-Approver'),
+    ...fieldValues.map((fieldValue) => {
+      if (fieldValue.phaseRef) {
+        return fieldValue.phaseRef.phaseName + '.' +
+            fieldValue.fieldRef.fieldName;
+      } else {
+        return fieldValue.fieldRef.fieldName;
+      }
+    }),
+    ...labelPrefixes,
+  ];
+}
diff --git a/static_src/shared/issue-fields.test.js b/static_src/shared/issue-fields.test.js
new file mode 100644
index 0000000..c37faa9
--- /dev/null
+++ b/static_src/shared/issue-fields.test.js
@@ -0,0 +1,491 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {parseColSpec, fieldsForIssue,
+  stringValuesForIssueField} from './issue-fields.js';
+import sinon from 'sinon';
+
+let issue;
+let clock;
+
+describe('parseColSpec', () => {
+  it('empty spec produces empty list', () => {
+    assert.deepEqual(parseColSpec(),
+        []);
+    assert.deepEqual(parseColSpec(''),
+        []);
+    assert.deepEqual(parseColSpec(' + + + '),
+        []);
+    assert.deepEqual(parseColSpec('          '),
+        []);
+    assert.deepEqual(parseColSpec('+++++'),
+        []);
+  });
+
+  it('parses spec correctly', () => {
+    assert.deepEqual(parseColSpec('ID+Summary+AllLabels+Priority'),
+        ['ID', 'Summary', 'AllLabels', 'Priority']);
+  });
+
+  it('parses spaces correctly', () => {
+    assert.deepEqual(parseColSpec('ID Summary AllLabels Priority'),
+        ['ID', 'Summary', 'AllLabels', 'Priority']);
+    assert.deepEqual(parseColSpec('ID + Summary + AllLabels + Priority'),
+        ['ID', 'Summary', 'AllLabels', 'Priority']);
+    assert.deepEqual(parseColSpec('ID   Summary AllLabels     Priority'),
+        ['ID', 'Summary', 'AllLabels', 'Priority']);
+  });
+
+  it('spec parsing preserves dashed parameters', () => {
+    assert.deepEqual(parseColSpec('ID+Summary+Test-Label+Another-Label'),
+        ['ID', 'Summary', 'Test-Label', 'Another-Label']);
+  });
+});
+
+describe('fieldsForIssue', () => {
+  const issue = {
+    projectName: 'proj',
+    localId: 1,
+  };
+
+  const issueWithLabels = {
+    projectName: 'proj',
+    localId: 1,
+    labelRefs: [
+      {label: 'test'},
+      {label: 'hello-world'},
+      {label: 'multi-label-field'},
+    ],
+  };
+
+  const issueWithFieldValues = {
+    projectName: 'proj',
+    localId: 1,
+    fieldValues: [
+      {fieldRef: {fieldName: 'number', type: 'INT_TYPE'}},
+      {fieldRef: {fieldName: 'string', type: 'STR_TYPE'}},
+    ],
+  };
+
+  const issueWithPhases = {
+    projectName: 'proj',
+    localId: 1,
+    fieldValues: [
+      {fieldRef: {fieldName: 'phase-number', type: 'INT_TYPE'},
+        phaseRef: {phaseName: 'phase1'}},
+      {fieldRef: {fieldName: 'phase-string', type: 'STR_TYPE'},
+        phaseRef: {phaseName: 'phase2'}},
+    ],
+  };
+
+  const issueWithApprovals = {
+    projectName: 'proj',
+    localId: 1,
+    approvalValues: [
+      {fieldRef: {fieldName: 'approval', type: 'APPROVAL_TYPE'}},
+    ],
+  };
+
+  it('empty issue issue produces no field names', () => {
+    assert.deepEqual(fieldsForIssue(issue), []);
+    assert.deepEqual(fieldsForIssue(issue, true), []);
+  });
+
+  it('includes label prefixes', () => {
+    assert.deepEqual(fieldsForIssue(issueWithLabels), [
+      'hello',
+      'multi',
+      'multi-label',
+    ]);
+  });
+
+  it('includes field values', () => {
+    assert.deepEqual(fieldsForIssue(issueWithFieldValues), [
+      'number',
+      'string',
+    ]);
+  });
+
+  it('excludes high cardinality field values', () => {
+    assert.deepEqual(fieldsForIssue(issueWithFieldValues, true), [
+      'number',
+    ]);
+  });
+
+  it('includes phase fields', () => {
+    assert.deepEqual(fieldsForIssue(issueWithPhases), [
+      'phase1.phase-number',
+      'phase2.phase-string',
+    ]);
+  });
+
+  it('excludes high cardinality phase fields', () => {
+    assert.deepEqual(fieldsForIssue(issueWithPhases, true), [
+      'phase1.phase-number',
+    ]);
+  });
+
+  it('includes approval values', () => {
+    assert.deepEqual(fieldsForIssue(issueWithApprovals), [
+      'approval',
+      'approval-Approver',
+    ]);
+  });
+});
+
+describe('stringValuesForIssueField', () => {
+  describe('built-in fields', () => {
+    beforeEach(() => {
+      // Set clock to some specified date for relative time.
+      const initialTime = 365 * 24 * 60 * 60;
+
+      clock = sinon.useFakeTimers({
+        now: new Date(initialTime * 1000),
+        shouldAdvanceTime: false,
+      });
+
+      issue = {
+        localId: 33,
+        projectName: 'chromium',
+        summary: 'Test summary',
+        attachmentCount: 22,
+        starCount: 2,
+        componentRefs: [{path: 'Infra'}, {path: 'Monorail>UI'}],
+        blockedOnIssueRefs: [{localId: 30, projectName: 'chromium'}],
+        blockingIssueRefs: [{localId: 60, projectName: 'chromium'}],
+        labelRefs: [{label: 'Restrict-View-Google'}, {label: 'Type-Defect'}],
+        reporterRef: {displayName: 'test@example.com'},
+        ccRefs: [{displayName: 'test@example.com'}],
+        ownerRef: {displayName: 'owner@example.com'},
+        closedTimestamp: initialTime - 120, // 2 minutes ago
+        modifiedTimestamp: initialTime - 60, // a minute ago
+        openedTimestamp: initialTime - 24 * 60 * 60, // a day ago
+        componentModifiedTimestamp: initialTime - 60, // a minute ago
+        statusModifiedTimestamp: initialTime - 60, // a minute ago
+        ownerModifiedTimestamp: initialTime - 60, // a minute ago
+        statusRef: {status: 'Duplicate'},
+        mergedIntoIssueRef: {localId: 31, projectName: 'chromium'},
+      };
+    });
+
+    afterEach(() => {
+      clock.restore();
+    });
+
+    it('computes strings for ID', () => {
+      const fieldName = 'ID';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['chromium:33']);
+    });
+
+    it('computes strings for Project', () => {
+      const fieldName = 'Project';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['chromium']);
+    });
+
+    it('computes strings for Attachments', () => {
+      const fieldName = 'Attachments';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['22']);
+    });
+
+    it('computes strings for AllLabels', () => {
+      const fieldName = 'AllLabels';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['Restrict-View-Google', 'Type-Defect']);
+    });
+
+    it('computes strings for Blocked when issue is blocked', () => {
+      const fieldName = 'Blocked';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['Yes']);
+    });
+
+    it('computes strings for Blocked when issue is not blocked', () => {
+      const fieldName = 'Blocked';
+      issue.blockedOnIssueRefs = [];
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['No']);
+    });
+
+    it('computes strings for BlockedOn', () => {
+      const fieldName = 'BlockedOn';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['chromium:30']);
+    });
+
+    it('computes strings for Blocking', () => {
+      const fieldName = 'Blocking';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['chromium:60']);
+    });
+
+    it('computes strings for CC', () => {
+      const fieldName = 'CC';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['test@example.com']);
+    });
+
+    it('computes strings for Closed', () => {
+      const fieldName = 'Closed';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['2 minutes ago']);
+    });
+
+    it('computes strings for Component', () => {
+      const fieldName = 'Component';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['Infra', 'Monorail>UI']);
+    });
+
+    it('computes strings for ComponentModified', () => {
+      const fieldName = 'ComponentModified';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['a minute ago']);
+    });
+
+    it('computes strings for MergedInto', () => {
+      const fieldName = 'MergedInto';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['chromium:31']);
+    });
+
+    it('computes strings for Modified', () => {
+      const fieldName = 'Modified';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['a minute ago']);
+    });
+
+    it('computes strings for Reporter', () => {
+      const fieldName = 'Reporter';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['test@example.com']);
+    });
+
+    it('computes strings for Stars', () => {
+      const fieldName = 'Stars';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['2']);
+    });
+
+    it('computes strings for Status', () => {
+      const fieldName = 'Status';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['Duplicate']);
+    });
+
+    it('computes strings for StatusModified', () => {
+      const fieldName = 'StatusModified';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['a minute ago']);
+    });
+
+    it('computes strings for Summary', () => {
+      const fieldName = 'Summary';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['Test summary']);
+    });
+
+    it('computes strings for Type', () => {
+      const fieldName = 'Type';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['Defect']);
+    });
+
+    it('computes strings for Owner', () => {
+      const fieldName = 'Owner';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['owner@example.com']);
+    });
+
+    it('computes strings for OwnerModified', () => {
+      const fieldName = 'OwnerModified';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['a minute ago']);
+    });
+
+    it('computes strings for Opened', () => {
+      const fieldName = 'Opened';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['a day ago']);
+    });
+  });
+
+  describe('custom approval fields', () => {
+    beforeEach(() => {
+      issue = {
+        localId: 33,
+        projectName: 'bird',
+        approvalValues: [
+          {fieldRef: {type: 'APPROVAL_TYPE', fieldName: 'Goose-Approval'},
+            approverRefs: []},
+          {fieldRef: {type: 'APPROVAL_TYPE', fieldName: 'Chicken-Approval'},
+            status: 'APPROVED'},
+          {fieldRef: {type: 'APPROVAL_TYPE', fieldName: 'Dodo-Approval'},
+            status: 'NEED_INFO', approverRefs: [{displayName: 'kiwi@bird.test'},
+              {displayName: 'mini-dino@bird.test'}],
+          },
+        ],
+      };
+    });
+
+    it('handles approval approver columns', () => {
+      const projectName = 'bird';
+      assert.deepEqual(stringValuesForIssueField(
+          issue, 'goose-approval-approver',
+          projectName), []);
+      assert.deepEqual(stringValuesForIssueField(
+          issue, 'chicken-approval-approver',
+          projectName), []);
+      assert.deepEqual(stringValuesForIssueField(
+          issue, 'dodo-approval-approver',
+          projectName), ['kiwi@bird.test', 'mini-dino@bird.test']);
+    });
+
+    it('handles approval value columns', () => {
+      const projectName = 'bird';
+      assert.deepEqual(stringValuesForIssueField(issue, 'goose-approval',
+          projectName), ['NotSet']);
+      assert.deepEqual(stringValuesForIssueField(issue, 'chicken-approval',
+          projectName), ['Approved']);
+      assert.deepEqual(stringValuesForIssueField(issue, 'dodo-approval',
+          projectName), ['NeedInfo']);
+    });
+  });
+
+  describe('custom fields', () => {
+    beforeEach(() => {
+      issue = {
+        localId: 33,
+        projectName: 'chromium',
+        fieldValues: [
+          {fieldRef: {type: 'STR_TYPE', fieldName: 'aString'}, value: 'test'},
+          {fieldRef: {type: 'STR_TYPE', fieldName: 'aString'}, value: 'test2'},
+          {fieldRef: {type: 'ENUM_TYPE', fieldName: 'ENUM'}, value: 'a-value'},
+          {fieldRef: {type: 'INT_TYPE', fieldId: '6', fieldName: 'Cow-Number'},
+            phaseRef: {phaseName: 'Cow-Phase'},
+            value: '55'},
+          {fieldRef: {type: 'INT_TYPE', fieldId: '6', fieldName: 'Cow-Number'},
+            phaseRef: {phaseName: 'Cow-Phase'},
+            value: '54'},
+          {fieldRef: {type: 'INT_TYPE', fieldId: '6', fieldName: 'Cow-Number'},
+            phaseRef: {phaseName: 'MilkCow-Phase'},
+            value: '56'},
+        ],
+      };
+    });
+
+    it('gets values for custom fields', () => {
+      const projectName = 'chromium';
+      assert.deepEqual(stringValuesForIssueField(issue, 'aString',
+          projectName), ['test', 'test2']);
+      assert.deepEqual(stringValuesForIssueField(issue, 'enum',
+          projectName), ['a-value']);
+      assert.deepEqual(stringValuesForIssueField(issue, 'cow-phase.cow-number',
+          projectName), ['55', '54']);
+      assert.deepEqual(stringValuesForIssueField(issue,
+          'milkcow-phase.cow-number', projectName), ['56']);
+    });
+
+    it('custom fields get precedence over label fields', () => {
+      const projectName = 'chromium';
+      issue.labelRefs = [{label: 'aString-ignore'}];
+      assert.deepEqual(stringValuesForIssueField(issue, 'aString',
+          projectName), ['test', 'test2']);
+    });
+  });
+
+  describe('label prefix fields', () => {
+    beforeEach(() => {
+      issue = {
+        localId: 33,
+        projectName: 'chromium',
+        labelRefs: [
+          {label: 'test-label'},
+          {label: 'test-label-2'},
+          {label: 'ignore-me'},
+          {label: 'Milestone-UI'},
+          {label: 'Milestone-Goodies'},
+        ],
+      };
+    });
+
+    it('gets values for label prefixes', () => {
+      const projectName = 'chromium';
+      assert.deepEqual(stringValuesForIssueField(issue, 'test',
+          projectName), ['label', 'label-2']);
+      assert.deepEqual(stringValuesForIssueField(issue, 'Milestone',
+          projectName), ['UI', 'Goodies']);
+      assert.deepEqual(stringValuesForIssueField(issue, 'ignore',
+          projectName), ['me']);
+    });
+  });
+
+  describe('composite fields', () => {
+    beforeEach(() => {
+      // Set clock to some specified date for relative time.
+      const initialTime = 365 * 24 * 60 * 60;
+
+      clock = sinon.useFakeTimers({
+        now: new Date(initialTime * 1000),
+        shouldAdvanceTime: false,
+      });
+
+      issue = {
+        localId: 33,
+        projectName: 'chromium',
+        summary: 'Test summary',
+        closedTimestamp: initialTime - 120, // 2 minutes ago
+        modifiedTimestamp: initialTime - 60, // a minute ago
+        openedTimestamp: initialTime - 24 * 60 * 60, // a day ago
+        statusModifiedTimestamp: initialTime - 60, // a minute ago
+        statusRef: {status: 'Duplicate'},
+      };
+    });
+
+    afterEach(() => {
+      clock.restore();
+    });
+
+    it('computes strings for Status/Closed', () => {
+      const fieldName = 'Status/Closed';
+
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['Duplicate', '2 minutes ago']);
+    });
+
+    it('ignores nonexistant fields', () => {
+      const fieldName = 'Owner/Status';
+
+      assert.isFalse(issue.hasOwnProperty('ownerRef'));
+      assert.deepEqual(stringValuesForIssueField(issue, fieldName),
+          ['Duplicate']);
+    });
+  });
+});
diff --git a/static_src/shared/math.js b/static_src/shared/math.js
new file mode 100644
index 0000000..36e2d75
--- /dev/null
+++ b/static_src/shared/math.js
@@ -0,0 +1,26 @@
+// Copyright 2019 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.
+
+// Get parameter of generated line using linear regression formula,
+// using last n data points of values.
+export function linearRegression(values, n) {
+  let sumValues = 0;
+  let indices = 0;
+  let sqIndices = 0;
+  let multiply = 0;
+  let temp;
+  for (let i = 0; i < n; i++) {
+    temp = values[values.length-n+i];
+    sumValues += temp;
+    indices += i;
+    sqIndices += i * i;
+    multiply += i * temp;
+  }
+  // Calculate linear regression formula for values.
+  const slope = (n * multiply - sumValues * indices) /
+    (n * sqIndices - indices * indices);
+  const intercept = (sumValues * sqIndices - indices * multiply) /
+    (n * sqIndices - indices * indices);
+  return [slope, intercept];
+}
diff --git a/static_src/shared/math.test.js b/static_src/shared/math.test.js
new file mode 100644
index 0000000..4b4c153
--- /dev/null
+++ b/static_src/shared/math.test.js
@@ -0,0 +1,22 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {linearRegression} from './math.js';
+
+describe('linearRegression', () => {
+  it('calculate slope and intercept using formula', () => {
+    const values = [0, 1, 2, 3, 4, 5, 6];
+    const [slope, intercept] = linearRegression(values, 7);
+    assert.equal(slope, 1);
+    assert.equal(intercept, 0);
+  });
+
+  it('calculate slope and intercept using last n data points', () => {
+    const values = [0, 1, 0, 3, 5, 7, 9];
+    const [slope, intercept] = linearRegression(values, 4);
+    assert.equal(slope, 2);
+    assert.equal(intercept, 3);
+  });
+});
diff --git a/static_src/shared/md-helper.js b/static_src/shared/md-helper.js
new file mode 100644
index 0000000..da5ac3c
--- /dev/null
+++ b/static_src/shared/md-helper.js
@@ -0,0 +1,143 @@
+import marked from 'marked';
+import DOMPurify from 'dompurify';
+
+/** @type {Set} Projects that default Markdown rendering to true. */
+export const DEFAULT_MD_PROJECTS = new Set(['monkeyrail', 'monorail', 'fuchsia']);
+
+/** @type {Set} Projects that allow users to opt into Markdown rendering. */
+export const AVAILABLE_MD_PROJECTS = new Set([...DEFAULT_MD_PROJECTS]);
+
+/** @type {Set} Authors whose comments will not be rendered as Markdown. */
+const BLOCKLIST = new Set(['sheriffbot@sheriffbot-1182.iam.gserviceaccount.com',
+                          'sheriff-o-matic@appspot.gserviceaccount.com',
+                          'sheriff-o-matic-staging@appspot.gserviceaccount.com',
+                          'bugdroid1@chromium.org',
+                          'bugdroid@chops-service-accounts.iam.gserviceaccount.com',
+                          'gitwatcher-staging.google.com@appspot.gserviceaccount.com',
+                          'gitwatcher.google.com@appspot.gserviceaccount.com']);
+
+/**
+ * Determines whether content should be rendered as Markdown.
+ * @param {string} options.project Project this content belongs to.
+ * @param {number} options.author User who authored this content.
+ * @param {boolean} options.enabled Per-issue override to force Markdown.
+ * @param {Array<string>} options.availableProjects List of opted in projects.
+ * @return {boolean} Whether this content should be rendered as Markdown.
+ */
+export const shouldRenderMarkdown = ({
+  project, author, enabled = true, availableProjects = AVAILABLE_MD_PROJECTS
+} = {}) => {
+  if (author in BLOCKLIST) {
+    return false;
+  } else if (!enabled) {
+    return false;
+  } else if (availableProjects.has(project)) {
+    return true;
+  }
+  return false;
+};
+
+/** @const {Object} Options for DOMPurify sanitizer */
+const SANITIZE_OPTIONS = Object.freeze({
+  RETURN_TRUSTED_TYPE: true,
+  FORBID_TAGS: ['style'],
+  FORBID_ATTR: ['style', 'autoplay'],
+});
+
+/**
+ * Replaces bold HTML tags in comment with Markdown equivalent.
+ * @param {string} raw Comment string as stored in database.
+ * @return {string} Comment string after b tags are placed by Markdown bolding.
+ */
+const replaceBoldTag = (raw) => {
+  return raw.replace(/<b>|<\/b>/g, '**');
+};
+
+/** @const {Object} Basic HTML character escape mapping */
+const HTML_ESCAPE_MAP = Object.freeze({
+  '&': '&amp;',
+  '<': '&lt;',
+  '>': '&gt;',
+  '"': '&quot;',
+  '\'': '&#39;',
+  '/': '&#x2F;',
+  '`': '&#x60;',
+  '=': '&#x3D;',
+});
+
+/**
+ * Escapes HTML characters, used to render HTML blocks in Markdown. This
+ * alleviates security flaws but is not the primary security barrier, that is
+ * handled by DOMPurify.
+ * @param {string} text Content that looks to Marked parser to contain HTML.
+ * @return {string} Same text content after escaping HTML characters.
+ */
+const escapeHtml = (text) => {
+  return text.replace(/[&<>"'`=\/]/g, (s) => {
+    return HTML_ESCAPE_MAP[s];
+  });
+};
+
+/**
+* Checks to see if input string is a valid HTTP link.
+ * @param {string} string
+ * @return {boolean} Whether input string is a valid HTTP(s) link.
+ */
+const isValidHttpUrl = (string) => {
+  let url;
+
+  try {
+    url = new URL(string);
+  } catch (_exception) {
+    return false;
+  }
+
+  return url.protocol === 'http:' || url.protocol === 'https:';
+};
+
+/**
+ * Renderer option for Marked.
+ * See https://marked.js.org/using_pro#renderer on how to use renderer.
+ * @type {Object}
+ */
+const renderer = {
+  html(text) {
+    // Do not render HTML, instead escape HTML and render as plaintext.
+    return escapeHtml(text);
+  },
+  link(href, title, text) {
+    // Overrides default link rendering by adding icon and destination on hover.
+    // TODO(crbug.com/monorail/9316): Add shared-styles/MD_STYLES to all
+    // components that consume the markdown renderer.
+    let linkIcon;
+    let tooltipText;
+    if (isValidHttpUrl(href)) {
+      linkIcon = `<span class="material-icons link">link</span>`;
+      tooltipText = `Link destination: ${href}`;
+    } else {
+      linkIcon = `<span class="material-icons link_off">link_off</span>`;
+      tooltipText = `Link may be malformed: ${href}`;
+    }
+    const tooltip = `<span class="tooltip">${tooltipText}</span>`;
+    return `<span class="annotated-link"><a href=${href} ` +
+        `title=${title ? title : ''}>${linkIcon}${text}</a>${tooltip}</span>`;
+  },
+};
+
+marked.use({renderer, headerIds: false});
+
+/**
+ * Renders Markdown content into HTML.
+ * @param {string} raw Content to be intepretted as Markdown.
+ * @return {string} Rendered content in HTML format.
+ */
+export const renderMarkdown = (raw) => {
+  // TODO(crbug.com/monorail/9310): Add commentReferences, projectName,
+  // and revisionUrlFormat to use in conjunction with Marked's lexer for
+  // autolinking.
+  // TODO(crbug.com/monorail/9310): Integrate autolink
+  const preprocessed = replaceBoldTag(raw);
+  const converted = marked(preprocessed);
+  const sanitized = DOMPurify.sanitize(converted, SANITIZE_OPTIONS);
+  return sanitized.toString();
+};
diff --git a/static_src/shared/md-helper.test.js b/static_src/shared/md-helper.test.js
new file mode 100644
index 0000000..9f7dba1
--- /dev/null
+++ b/static_src/shared/md-helper.test.js
@@ -0,0 +1,90 @@
+import {assert} from 'chai';
+import {renderMarkdown, shouldRenderMarkdown} from './md-helper.js';
+
+describe('shouldRenderMarkdown', () => {
+  it('defaults to false', () => {
+    const actual = shouldRenderMarkdown();
+    assert.isFalse(actual);
+  });
+
+  it('returns true for enabled projects', () => {
+    const actual = shouldRenderMarkdown({project:'astor',
+      availableProjects: new Set(['astor'])});
+    assert.isTrue(actual);
+  });
+
+  it('returns false for disabled projects', () => {
+    const actual = shouldRenderMarkdown({project:'hazelnut',
+      availableProjects: new Set(['astor'])});
+    assert.isFalse(actual);
+  });
+
+  it('user pref can disable markdown', () => {
+    const actual = shouldRenderMarkdown({project:'astor',
+      enabledProjects: new Set(['astor']), enabled: false});
+    assert.isFalse(actual);
+  });
+});
+
+describe('renderMarkdown', () => {
+  it('can render empty string', () => {
+    const actual = renderMarkdown('');
+    assert.equal(actual, '');
+  });
+
+  it('can render basic string', () => {
+    const actual = renderMarkdown('hello world');
+    assert.equal(actual, '<p>hello world</p>\n');
+  });
+
+  it('can render lists', () => {
+    const input = '* First item\n* Second item\n* Third item\n* Fourth item';
+    const actual = renderMarkdown(input);
+    const expected = '<ul>\n<li>First item</li>\n<li>Second item</li>\n' +
+        '<li>Third item</li>\n<li>Fourth item</li>\n</ul>\n';
+    assert.equal(actual, expected);
+  });
+
+  it('can render headings', () => {
+    const actual = renderMarkdown('# Heading level 1\n\n## Heading level 2');
+    assert.equal(actual,
+        '<h1>Heading level 1</h1>\n<h2>Heading level 2</h2>\n');
+  });
+
+  describe('can render links', () => {
+    it('for simple links', () => {
+      const actual = renderMarkdown('[clickme](http://google.com)');
+      const expected = `<p><span class="annotated-link"><a title="" ` +
+          `href="http://google.com"><span class="material-icons link">` +
+          `link</span>clickme</a><span class="tooltip">Link destination: ` +
+          `http://google.com</span></span></p>\n`;
+      assert.equal(actual, expected);
+    });
+
+    it('and indicates malformed link', () => {
+      const actual = renderMarkdown('[clickme](google.com)');
+      const expected = `<p><span class="annotated-link"><a title="" ` +
+          `href="google.com"><span class="material-icons link_off">link_off` +
+          `</span>clickme</a><span class="tooltip">Link may be malformed: ` +
+          `google.com</span></span></p>\n`;
+      assert.equal(actual, expected);
+    });
+  });
+
+  it('preserves bolding from description templates', () => {
+    const input = `<b>What's the problem?</b>\n<b>1.</b> A\n<b>2.</b> B`;
+    const actual = renderMarkdown(input);
+    const expected = `<p><strong>What's the problem?</strong>\n<strong>1.` +
+        `</strong> A\n<strong>2.</strong> B</p>\n`;
+    assert.equal(actual, expected);
+  });
+
+  it('escapes HTML content', () => {
+    let actual = renderMarkdown('<input></input>');
+    assert.equal(actual, '<p>&lt;input&gt;&lt;/input&gt;</p>\n');
+
+    actual = renderMarkdown('<a href="https://google.com">clickme</a>');
+    assert.equal(actual,
+        '<p>&lt;a href="https://google.com"&gt;clickme&lt;/a&gt;</p>\n');
+  });
+});
diff --git a/static_src/shared/metadata-helpers.js b/static_src/shared/metadata-helpers.js
new file mode 100644
index 0000000..5735557
--- /dev/null
+++ b/static_src/shared/metadata-helpers.js
@@ -0,0 +1,114 @@
+// Copyright 2019 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.
+
+// TODO(crbug.com/monorail/4549): Remove this hardcoded data once backend custom
+// field grouping is implemented.
+export const HARDCODED_FIELD_GROUPS = [
+  {
+    groupName: 'Feature Team',
+    fieldNames: ['PM', 'Tech Lead', 'Tech-Lead', 'TechLead', 'TL',
+      'Team', 'UX', 'TE'],
+    applicableType: 'FLT-Launch',
+  },
+  {
+    groupName: 'Docs',
+    fieldNames: ['PRD', 'DD', 'Design Doc', 'Design-Doc',
+      'DesignDoc', 'Mocks', 'Test Plan', 'Test-Plan', 'TestPlan',
+      'Metrics'],
+    applicableType: 'FLT-Launch',
+  },
+];
+
+export const fieldGroupMap = (fieldGroupsArg, issueType) => {
+  const fieldGroups = groupsForType(fieldGroupsArg, issueType);
+  return fieldGroups.reduce((acc, group) => {
+    return group.fieldNames.reduce((acc, fieldName) => {
+      acc[fieldName] = group.groupName;
+      return acc;
+    }, acc);
+  }, {});
+};
+
+/**
+ * Get all values for a field, given an issue's fieldValueMap.
+ * @param {Map.<string, Array<string>>} fieldValueMap Map where keys are
+ *   lowercase fieldNames and values are fieldValue strings.
+ * @param {string} fieldName The name of the field to look up.
+ * @param {string=} phaseName Name of the phase the field is attached to,
+ *   if applicable.
+ * @return {Array<string>} The values of the field.
+ */
+export const valuesForField = (fieldValueMap, fieldName, phaseName) => {
+  if (!fieldValueMap) return [];
+  return fieldValueMap.get(
+      fieldValueMapKey(fieldName, phaseName)) || [];
+};
+
+/**
+ * Get just one value for a field. Convenient in some cases for
+ * fields that are not multi-valued.
+ * @param {Map.<string, Array<string>>} fieldValueMap Map where keys are
+ *   lowercase fieldNames and values are fieldValue strings.
+ * @param {string} fieldName The name of the field to look up.
+ * @param {string=} phaseName Name of the phase the field is attached to,
+ *   if applicable.
+ * @return {string} The value of the field.
+ */
+export function valueForField(fieldValueMap, fieldName, phaseName) {
+  const values = valuesForField(fieldValueMap, fieldName, phaseName);
+  return values.length ? values[0] : undefined;
+}
+
+/**
+ * Helper to generate Map keys for FieldValueMaps in a standard format.
+ * @param {string} fieldName Name of the field the value is tied to.
+ * @param {string=} phaseName Name of the phase the value is tied to.
+ * @return {string}
+ */
+export const fieldValueMapKey = (fieldName, phaseName) => {
+  const key = [fieldName];
+  if (phaseName) {
+    key.push(phaseName);
+  }
+  return key.join(' ').toLowerCase();
+};
+
+export const groupsForType = (fieldGroups, issueType) => {
+  return fieldGroups.filter((group) => {
+    if (!group.applicableType) return true;
+    return issueType && group.applicableType.toLowerCase() ===
+      issueType.toLowerCase();
+  });
+};
+
+export const fieldDefsWithGroup = (fieldDefs, fieldGroupsArg, issueType) => {
+  const fieldGroups = groupsForType(fieldGroupsArg, issueType);
+  if (!fieldDefs) return [];
+  const groups = [];
+  fieldGroups.forEach((group) => {
+    const groupFields = [];
+    group.fieldNames.forEach((name) => {
+      const fd = fieldDefs.find(
+          (fd) => (fd.fieldRef.fieldName == name));
+      if (fd) {
+        groupFields.push(fd);
+      }
+    });
+    if (groupFields.length > 0) {
+      groups.push({
+        groupName: group.groupName,
+        fieldDefs: groupFields,
+      });
+    }
+  });
+  return groups;
+};
+
+export const fieldDefsWithoutGroup = (fieldDefs, fieldGroups, issueType) => {
+  if (!fieldDefs) return [];
+  const map = fieldGroupMap(fieldGroups, issueType);
+  return fieldDefs.filter((fd) => {
+    return !(fd.fieldRef.fieldName in map);
+  });
+};
diff --git a/static_src/shared/metadata-helpers.test.js b/static_src/shared/metadata-helpers.test.js
new file mode 100644
index 0000000..fd04806
--- /dev/null
+++ b/static_src/shared/metadata-helpers.test.js
@@ -0,0 +1,93 @@
+// Copyright 2019 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.
+
+import {assert} from 'chai';
+import {valuesForField, valueForField, fieldDefsWithGroup, fieldValueMapKey,
+  fieldDefsWithoutGroup, HARDCODED_FIELD_GROUPS} from './metadata-helpers.js';
+
+const fieldDefs = [
+  {
+    fieldRef: {
+      fieldName: 'Ignore',
+      fieldId: 1,
+    },
+  },
+  {
+    fieldRef: {
+      fieldName: 'DesignDoc',
+      fieldId: 2,
+    },
+  },
+];
+const fieldGroups = HARDCODED_FIELD_GROUPS;
+
+const fieldValueMap = new Map([
+  ['field', ['one', 'two', 'three']],
+  ['field-two phase', ['four']],
+  ['field-three', ['five']],
+]);
+
+describe('metadata-helpers', () => {
+  it('valuesForField', () => {
+    assert.deepEqual(valuesForField(fieldValueMap, 'Field-None'), []);
+    assert.deepEqual(valuesForField(fieldValueMap, 'Field'),
+        ['one', 'two', 'three']);
+    assert.deepEqual(valuesForField(fieldValueMap, 'Field-Two', 'Phase'),
+        ['four']);
+    assert.deepEqual(valuesForField(fieldValueMap, 'Field-Three'), ['five']);
+  });
+
+  it('valueForField', () => {
+    assert.equal(valueForField(fieldValueMap, 'Field-None'),
+        undefined);
+    assert.equal(valueForField(fieldValueMap, 'Field-Two', 'Phase'), 'four');
+    assert.equal(valueForField(fieldValueMap, 'Field-Three'), 'five');
+  });
+
+  it('fieldValueMapKey', () => {
+    assert.equal(fieldValueMapKey('test', 'two'), 'test two');
+
+    assert.equal(fieldValueMapKey('noPhase'), 'nophase');
+  });
+
+  it('fieldDefsWithoutGroup ignores non applicable types', () => {
+    assert.deepEqual(fieldDefsWithoutGroup(
+        fieldDefs, fieldGroups, 'ungrouped-type'), fieldDefs);
+  });
+
+  it('fieldDefsWithoutGroup filters grouped fields', () => {
+    assert.deepEqual(fieldDefsWithoutGroup(
+        fieldDefs, fieldGroups, 'flt-launch'), [
+      {
+        fieldRef: {
+          fieldName: 'Ignore',
+          fieldId: 1,
+        },
+      },
+    ]);
+  });
+
+  it('fieldDefsWithGroup filters by type', () => {
+    const filteredGroupsList = [{
+      groupName: 'Docs',
+      fieldDefs: [
+        {
+          fieldRef: {
+            fieldName: 'DesignDoc',
+            fieldId: 2,
+          },
+        },
+      ],
+    }];
+
+    assert.deepEqual(
+        fieldDefsWithGroup(fieldDefs, fieldGroups, 'Not-FLT-Launch'), []);
+
+    assert.deepEqual(fieldDefsWithGroup(fieldDefs, fieldGroups, 'flt-launch'),
+        filteredGroupsList);
+
+    assert.deepEqual(fieldDefsWithGroup(fieldDefs, fieldGroups, 'FLT-LAUNCH'),
+        filteredGroupsList);
+  });
+});
diff --git a/static_src/shared/settings.js b/static_src/shared/settings.js
new file mode 100644
index 0000000..0b5fc3c
--- /dev/null
+++ b/static_src/shared/settings.js
@@ -0,0 +1,23 @@
+// Copyright 2019 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.
+
+// List of content type prefixes that the user will not be warned about when
+// downloading an attachment.
+export const ALLOWED_CONTENT_TYPE_PREFIXES = [
+  'audio/', 'font/', 'image/', 'text/plain', 'video/',
+];
+
+// List of file extensions that the user will not be warned about when
+// downloading an attachment.
+export const ALLOWED_ATTACHMENT_EXTENSIONS = [
+  '.avi', '.avif', '.bmp', '.csv', '.doc', '.docx', '.email', '.eml', '.gif',
+  '.ico', '.jpeg', '.jpg', '.log', '.m4p', '.m4v', '.mkv', '.mov', '.mp2',
+  '.mp4', '.mpeg', '.mpg', '.mpv', '.odt', '.ogg', '.pdf', '.png', '.sql',
+  '.svg', '.tif', '.tiff', '.txt', '.wav', '.webm', '.wmv',
+];
+
+// The message to show the user when they attempt to download an unrecognized
+// file type.
+export const FILE_DOWNLOAD_WARNING = 'This file type is not recognized. Are' +
+  ' you sure you want to download this attachment?';
diff --git a/static_src/shared/shared-styles.js b/static_src/shared/shared-styles.js
new file mode 100644
index 0000000..c00f639
--- /dev/null
+++ b/static_src/shared/shared-styles.js
@@ -0,0 +1,203 @@
+// Copyright 2019 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.
+
+import {css} from 'lit-element';
+
+export const SHARED_STYLES = css`
+  :host {
+    --mr-edit-field-padding: 0.125em 4px;
+    --mr-edit-field-width: 90%;
+    --mr-input-grid-gap: 6px;
+    font-family: var(--chops-font-family);
+    color: var(--chops-primary-font-color);
+    font-size: var(--chops-main-font-size);
+  }
+  /** Converts a <button> to look like an <a> tag. */
+  .linkify {
+    display: inline;
+    padding: 0;
+    margin: 0;
+    border: 0;
+    background: 0;
+    cursor: pointer;
+  }
+  h1, h2, h3, h4 {
+    background: none;
+  }
+  a, chops-button, a.button, .button, .linkify {
+    color: var(--chops-link-color);
+    text-decoration: none;
+    font-weight: var(--chops-link-font-weight);
+    font-family: var(--chops-font-family);
+  }
+  a:hover, .linkify:hover {
+    text-decoration: underline;
+  }
+  a.button, .button {
+    /* Links that look like buttons. */
+    display: inline-flex;
+    align-items: center;
+    justify-content: center;
+    text-decoration: none;
+    transition: filter 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
+  }
+  a.button:hover, .button:hover {
+    filter: brightness(95%);
+  }
+  chops-button, a.button, .button {
+    box-sizing: border-box;
+    font-size: var(--chops-main-font-size);
+    background: var(--chops-white);
+    border-radius: 6px;
+    --chops-button-padding: 0.25em 8px;
+    margin: 0;
+    margin-left: auto;
+  }
+  a.button, .button {
+    padding: var(--chops-button-padding);
+  }
+  chops-button i.material-icons, a.button i.material-icons, .button i.material-icons {
+    display: block;
+    margin-right: 4px;
+  }
+  chops-button.emphasized, a.button.emphasized, .button.emphasized {
+    background: var(--chops-primary-button-bg);
+    color: var(--chops-primary-button-color);
+    text-shadow: 1px 1px 3px hsla(0, 0%, 0%, 0.25);
+  }
+  textarea, select, input {
+    box-sizing: border-box;
+    font-size: var(--chops-main-font-size);
+  }
+  /* Note: decoupling heading levels from styles is useful for
+  * accessibility because styles will not always line up with semantically
+  * appropriate heading levels.
+  */
+  .medium-heading {
+    font-size: var(--chops-large-font-size);
+    font-weight: normal;
+    line-height: 1;
+    padding: 0.25em 0;
+    color: var(--chops-link-color);
+    margin: 0;
+    margin-top: 0.25em;
+    border-bottom: var(--chops-normal-border);
+  }
+  .medium-heading chops-button {
+    line-height: 1.6;
+  }
+  .input-grid {
+    padding: 0.5em 0;
+    display: grid;
+    max-width: 100%;
+    grid-gap: var(--mr-input-grid-gap);
+    grid-template-columns: minmax(120px, max-content) 1fr;
+    align-items: flex-start;
+  }
+  .input-grid label {
+    font-weight: bold;
+    text-align: right;
+    word-wrap: break-word;
+  }
+  @media (max-width: 600px) {
+    .input-grid label {
+      margin-top: var(--mr-input-grid-gap);
+      text-align: left;
+    }
+    .input-grid {
+      grid-gap: var(--mr-input-grid-gap);
+      grid-template-columns: 100%;
+    }
+  }
+`;
+
+/**
+ * Markdown specific styling:
+ * * render link destination on hover as a tooltip
+ * @type {CSSResult}
+ */
+export const MD_STYLES = css`
+  .markdown .annotated-link {
+    position: relative;
+  }
+  .markdown .annotated-link:hover .tooltip {
+    display: block
+  }
+  .markdown .tooltip {
+    display: none;
+    position: absolute;
+    width: auto;
+    white-space: nowrap;
+    box-shadow: rgb(170 170 170) 1px 1px 5px;
+    box-shadow: 0 4px 8px 3px rgb(0 0 0 / 10%);
+    border-radius: 8px;
+    background-color: rgb(255, 255, 255);
+    top: -32px;
+    left: 0px;
+    border: 1px solid #dadce0;
+    padding: 6px 10px;
+  }
+  .markdown .material-icons {
+    font-size: 18px;
+    vertical-align: middle;
+  }
+  .markdown .material-icons.link {
+    color: var(--chops-link-color);
+  }
+  .markdown .material-icons.link_off {
+    color: var(--chops-field-error-color);
+  }
+  .markdown table {
+    -webkit-font-smoothing: antialiased;
+    box-sizing: inherit;
+    border-collapse: collapse;
+    margin: 8px 0 8px 0;
+    box-shadow: 0 2px 2px 0 hsla(315, 3%, 26%, 0.30);
+    border: 1px solid var(--chops-gray-300);
+    line-height: 1.4;
+  }
+  .markdown th {
+      border-bottom: 1px solid var(--chops-gray-300);
+      border-right: 1px solid var(--chops-gray-300);
+      padding: 1px;
+      text-align: left;
+      font-weight: 500;
+      color: var(--chops-gray-900);
+      background-color: var(--chops-gray-50);
+  }
+  .markdown td {
+      border-bottom: 1px solid var(--chops-gray-300);
+      border-right: 1px solid var(--chops-gray-300);
+      padding: 1px;
+  }
+  .markdown pre {
+    -webkit-font-smoothing: antialiased;
+    line-height: 1.6;
+    box-sizing: inherit;
+    background-color: hsla(0, 0%, 0%, 0.05);
+    border: 2px solid hsla(0, 0%, 0%, 0.10);
+    border-radius: 2px;
+    overflow-x: auto;
+    padding: 4px;
+  }
+`;
+
+export const MD_PREVIEW_STYLES = css`
+  ${MD_STYLES}
+  .markdown-preview {
+    padding: 0.25em 1em;
+    color: var(--chops-gray-800);
+    background-color: var(--chops-gray-200);
+    border-radius: 10px;
+    margin: 0px 0px 10px;
+    overflow: auto;
+  }
+  .preview-height-description {
+    max-height: 40vh;
+  }
+  .preview-height-comment {
+    min-height: 5vh;
+    max-height: 15vh;
+  }
+`;
\ No newline at end of file
diff --git a/static_src/shared/test/constants-hotlists.js b/static_src/shared/test/constants-hotlists.js
new file mode 100644
index 0000000..a496905
--- /dev/null
+++ b/static_src/shared/test/constants-hotlists.js
@@ -0,0 +1,76 @@
+// Copyright 2019 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.
+
+import * as issueV0 from './constants-issueV0.js';
+import * as users from './constants-users.js';
+import 'shared/typedef.js';
+
+/** @type {string} */
+export const NAME = 'hotlists/1234';
+
+/** @type {Hotlist} */
+export const HOTLIST = Object.freeze({
+  name: NAME,
+  displayName: 'Hotlist-Name',
+  owner: users.NAME,
+  editors: [users.NAME_2],
+  summary: 'Summary',
+  description: 'Description',
+  defaultColumns: [{column: 'Rank'}, {column: 'ID'}, {column: 'Summary'}],
+  hotlistPrivacy: 'PUBLIC',
+});
+
+export const HOTLIST_ITEM_NAME = NAME + '/items/56';
+
+/** @type {HotlistItem} */
+export const HOTLIST_ITEM = Object.freeze({
+  name: HOTLIST_ITEM_NAME,
+  issue: issueV0.NAME,
+  // rank: The API excludes the rank field if it's 0.
+  adder: users.NAME,
+  createTime: '2020-01-01T12:00:00Z',
+});
+
+/** @type {HotlistIssue} */
+export const HOTLIST_ISSUE = Object.freeze({
+  ...issueV0.ISSUE, ...HOTLIST_ITEM, adder: users.USER,
+});
+
+/** @type {HotlistItem} */
+export const HOTLIST_ITEM_OTHER_PROJECT = Object.freeze({
+  name: NAME + '/items/78',
+  issue: issueV0.NAME_OTHER_PROJECT,
+  rank: 1,
+  adder: users.NAME,
+  createTime: '2020-01-01T12:00:00Z',
+});
+
+/** @type {HotlistIssue} */
+export const HOTLIST_ISSUE_OTHER_PROJECT = Object.freeze({
+  ...issueV0.ISSUE_OTHER_PROJECT,
+  ...HOTLIST_ITEM_OTHER_PROJECT,
+  adder: users.USER,
+});
+
+/** @type {HotlistItem} */
+export const HOTLIST_ITEM_CLOSED = Object.freeze({
+  name: NAME + '/items/90',
+  issue: issueV0.NAME_CLOSED,
+  rank: 2,
+  adder: users.NAME,
+  createTime: '2020-01-01T12:00:00Z',
+});
+
+/** @type {HotlistIssue} */
+export const HOTLIST_ISSUE_CLOSED = Object.freeze({
+  ...issueV0.ISSUE_CLOSED, ...HOTLIST_ITEM_CLOSED, adder: users.USER,
+});
+
+/** @type {Object<string, Hotlist>} */
+export const BY_NAME = Object.freeze({[NAME]: HOTLIST});
+
+/** @type {Object<string, Array<HotlistItem>>} */
+export const HOTLIST_ITEMS = Object.freeze({
+  [NAME]: [HOTLIST_ITEM],
+});
diff --git a/static_src/shared/test/constants-issueV0.js b/static_src/shared/test/constants-issueV0.js
new file mode 100644
index 0000000..4f52aef
--- /dev/null
+++ b/static_src/shared/test/constants-issueV0.js
@@ -0,0 +1,42 @@
+// Copyright 2019 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.
+
+import 'shared/typedef.js';
+
+export const NAME = 'projects/project-name/issues/1234';
+
+export const ISSUE_REF_STRING = 'project-name:1234';
+
+/** @type {IssueRef} */
+export const ISSUE_REF = Object.freeze({
+  projectName: 'project-name',
+  localId: 1234,
+});
+
+/** @type {Issue} */
+export const ISSUE = Object.freeze({
+  projectName: 'project-name',
+  localId: 1234,
+  statusRef: {status: 'Available', meansOpen: true},
+});
+
+export const NAME_OTHER_PROJECT = 'projects/other-project-name/issues/1234';
+
+export const ISSUE_OTHER_PROJECT_REF_STRING = 'other-project-name:1234';
+
+/** @type {Issue} */
+export const ISSUE_OTHER_PROJECT = Object.freeze({
+  projectName: 'other-project-name',
+  localId: 1234,
+  statusRef: {status: 'Available', meansOpen: true},
+});
+
+export const NAME_CLOSED = 'projects/project-name/issues/5678';
+
+/** @type {Issue} */
+export const ISSUE_CLOSED = Object.freeze({
+  projectName: 'project-name',
+  localId: 5678,
+  statusRef: {status: 'Fixed', meansOpen: false},
+});
diff --git a/static_src/shared/test/constants-permissions.js b/static_src/shared/test/constants-permissions.js
new file mode 100644
index 0000000..f4b09c0
--- /dev/null
+++ b/static_src/shared/test/constants-permissions.js
@@ -0,0 +1,23 @@
+// Copyright 2020 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.
+
+import * as issue from './constants-issueV0.js';
+import 'shared/typedef.js';
+
+/** @type {Permission} */
+export const PERMISSION_ISSUE_EDIT = 'ISSUE_EDIT';
+
+/** @type {PermissionSet} */
+export const PERMISSION_SET_ISSUE = {
+  resource: issue.NAME,
+  permissions: [PERMISSION_ISSUE_EDIT],
+};
+
+/** @type {Object<string, PermissionSet>} */
+export const BY_NAME = {
+  [issue.NAME]: PERMISSION_SET_ISSUE,
+};
+
+/** @type {Array<Permission>} */
+export const PERMISSION_HOTLIST_EDIT = ['HOTLIST_EDIT'];
diff --git a/static_src/shared/test/constants-projectV0.js b/static_src/shared/test/constants-projectV0.js
new file mode 100644
index 0000000..4a46af8
--- /dev/null
+++ b/static_src/shared/test/constants-projectV0.js
@@ -0,0 +1,80 @@
+// Copyright 2019 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.
+
+import {fieldTypes} from 'shared/issue-fields.js';
+import {USER_REF} from './constants-users.js';
+import 'shared/typedef.js';
+
+/** @type {string} */
+export const PROJECT_NAME = 'project-name';
+
+/** @type {FieldDef} */
+export const FIELD_DEF_INT = Object.freeze({
+  fieldRef: Object.freeze({
+    fieldId: 123,
+    fieldName: 'field-name',
+    type: fieldTypes.INT_TYPE,
+  }),
+});
+
+/** @type {FieldDef} */
+export const FIELD_DEF_ENUM = Object.freeze({
+  fieldRef: Object.freeze({
+    fieldId: 456,
+    fieldName: 'enum',
+    type: fieldTypes.ENUM_TYPE,
+  }),
+});
+
+/** @type {Array<FieldDef>} */
+export const FIELD_DEFS = [
+  FIELD_DEF_INT,
+  FIELD_DEF_ENUM,
+];
+
+/** @type {Config} */
+export const CONFIG = Object.freeze({
+  projectName: PROJECT_NAME,
+  fieldDefs: FIELD_DEFS,
+  labelDefs: [
+    {label: 'One'},
+    {label: 'EnUm'},
+    {label: 'eNuM-Options'},
+    {label: 'hello-world', docstring: 'hmmm'},
+    {label: 'hello-me', docstring: 'hmmm'},
+  ],
+});
+
+/** @type {string} */
+export const DEFAULT_QUERY = 'owner:me';
+
+/** @type {PresentationConfig} */
+export const PRESENTATION_CONFIG = Object.freeze({
+  projectThumbnailUrl: 'test.png',
+  defaultColSpec: 'ID+Summary+AllLabels',
+  defaultQuery: DEFAULT_QUERY,
+});
+
+/** @type {Array<string>} */
+export const CUSTOM_PERMISSIONS = ['google', 'security'];
+
+/** @type {{userRefs: Array<UserRef>, groupRefs: Array<UserRef>}} */
+export const VISIBLE_MEMBERS = Object.freeze({
+  userRefs: [USER_REF],
+  groupRefs: [],
+});
+
+/** @type {TemplateDef} */
+export const TEMPLATE_DEF = Object.freeze({
+  templateName: 'Template Name',
+});
+
+export const STATE = Object.freeze({projectV0: {
+  name: PROJECT_NAME,
+  configs: {[PROJECT_NAME]: CONFIG},
+  presentationConfigs: {[PROJECT_NAME]: PRESENTATION_CONFIG},
+  customPermissions: {[PROJECT_NAME]: CUSTOM_PERMISSIONS},
+  visibleMembers: {[PROJECT_NAME]: VISIBLE_MEMBERS},
+  templates: {[PROJECT_NAME]: TEMPLATE_DEF},
+}});
diff --git a/static_src/shared/test/constants-projects.js b/static_src/shared/test/constants-projects.js
new file mode 100644
index 0000000..c25f46b
--- /dev/null
+++ b/static_src/shared/test/constants-projects.js
@@ -0,0 +1,27 @@
+// Copyright 2019 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.
+
+import 'shared/typedef.js';
+
+/** @type {ProjectName} */
+export const NAME = 'projects/chromium';
+
+/** @type {Project} */
+export const PROJECT = Object.freeze({
+  name: NAME,
+  displayName: 'Chromium',
+  summary: 'A great open source project.',
+  thumbnailUrl: 'chromium.png',
+});
+
+/** @type {ProjectName} */
+export const NAME_2 = 'projects/monorail';
+
+/** @type {Project} */
+export const PROJECT_2 = Object.freeze({
+  name: NAME_2,
+  displayName: 'mOnOrAiL',
+  summary: 'Best issue tracker.',
+  thumbnailUrl: 'dogtrain.gif',
+});
diff --git a/static_src/shared/test/constants-stars.js b/static_src/shared/test/constants-stars.js
new file mode 100644
index 0000000..42e7012
--- /dev/null
+++ b/static_src/shared/test/constants-stars.js
@@ -0,0 +1,18 @@
+// Copyright 2019 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.
+
+import 'shared/typedef.js';
+
+export const PROJECT_STAR_NAME = 'users/1234/projectStars/monorail';
+export const PROJECT_STAR_NAME_2 = 'users/1234/projectStars/chromium';
+
+/** @type {ProjectStar} */
+export const PROJECT_STAR = Object.freeze({
+  name: PROJECT_STAR_NAME,
+});
+
+/** @type {ProjectStar} */
+export const PROJECT_STAR_2 = Object.freeze({
+  name: PROJECT_STAR_NAME_2,
+});
diff --git a/static_src/shared/test/constants-users.js b/static_src/shared/test/constants-users.js
new file mode 100644
index 0000000..0a9bbf8
--- /dev/null
+++ b/static_src/shared/test/constants-users.js
@@ -0,0 +1,43 @@
+// Copyright 2019 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.
+
+import 'shared/typedef.js';
+
+export const NAME = 'users/1234';
+
+export const DISPLAY_NAME = 'example@example.com';
+
+export const ID = 1234;
+
+/** @type {UserRef} */
+export const USER_REF = Object.freeze({
+  userId: ID,
+  displayName: DISPLAY_NAME,
+});
+
+/** @type {User} */
+export const USER = Object.freeze({
+  name: NAME,
+  displayName: DISPLAY_NAME,
+});
+
+export const NAME_2 = 'users/5678';
+
+export const DISPLAY_NAME_2 = 'other_user@example.com';
+
+/** @type {User} */
+export const USER_2 = Object.freeze({
+  name: NAME_2,
+  displayName: DISPLAY_NAME_2,
+});
+
+/** @type {Object<string, User>} */
+export const BY_NAME = Object.freeze({[NAME]: USER, [NAME_2]: USER_2});
+
+/** @type {ProjectMember} */
+export const PROJECT_MEMBER = Object.freeze({
+  name: 'projects/proj/members/1234',
+  role: 'CONTRIBUTOR',
+});
+
diff --git a/static_src/shared/test/fakes.js b/static_src/shared/test/fakes.js
new file mode 100644
index 0000000..d506f6a
--- /dev/null
+++ b/static_src/shared/test/fakes.js
@@ -0,0 +1,12 @@
+// Copyright 2019 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.
+
+import sinon from 'sinon';
+
+export const clientLoggerFake = () => ({
+  logStart: sinon.stub(),
+  logEnd: sinon.stub(),
+  logPause: sinon.stub(),
+  started: sinon.stub().returns(true),
+});
diff --git a/static_src/shared/test/helpers.js b/static_src/shared/test/helpers.js
new file mode 100644
index 0000000..63a1e12
--- /dev/null
+++ b/static_src/shared/test/helpers.js
@@ -0,0 +1,57 @@
+// Copyright 2019 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.
+
+import axe from 'axe-core';
+import userEvent from '@testing-library/user-event';
+import {fireEvent} from '@testing-library/react';
+
+// TODO(seanmccullough): Move this into crdx/chopsui-npm if we decide this
+// is worth using in other projects.
+
+/**
+ * @param {HTMLElement} element The element to audit accessibility for.
+ */
+export async function auditA11y(element) {
+  // Performance tip: try restricting the analysis using
+  // https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#use-resulttypes
+  const options = {};
+
+  // Adjust this set to make tests more/less permissible.
+  const reportImpact = new Set(['critical', 'serious', 'moderate', 'minor']);
+  const results = await axe.run(element, options);
+
+  if (results.violations.length == 0) {
+    return;
+  }
+
+  const msgs = ['Accessibility violations:'];
+  results.violations.forEach((result) => {
+    if (reportImpact.has(result.impact)) {
+      msgs.push(`\n[${result.impact}] ${result.help}`);
+      for (const node of result.nodes) {
+        if (node.failureSummary) {
+          msgs.push(node.failureSummary);
+        }
+        msgs.push(node.html);
+      }
+      msgs.push('---');
+    }
+  });
+
+  throw new Error(msgs.join('\n'));
+}
+
+/**
+ * Types text into an input field and presses Enter.
+ * @param {HTMLInputElement} input The input field to enter text in.
+ * @param {string} value The text to enter in the input field.
+ */
+export function enterInput(input, value) {
+  userEvent.clear(input);
+
+  userEvent.type(input, value);
+
+  fireEvent.keyDown(input, {key: 'Enter', code: 'Enter'});
+}
+
diff --git a/static_src/shared/typedef.js b/static_src/shared/typedef.js
new file mode 100644
index 0000000..923e1db
--- /dev/null
+++ b/static_src/shared/typedef.js
@@ -0,0 +1,646 @@
+// Copyright 2019 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.
+
+/**
+ * @fileoverview Shared file for specifying common types used in type
+ * annotations across Monorail.
+ */
+
+// TODO(zhangtiff): Find out if there's a way we can generate typedef's for
+// API object from .proto files.
+
+
+/**
+ * Types used in the app that don't come from any Proto files.
+ */
+
+/**
+ * A HotlistItem with the Issue flattened into the top-level,
+ * containing the intersection of the fields of HotlistItem and Issue.
+ *
+ * @typedef {Issue & HotlistItem} HotlistIssue
+ * @property {User=} adder
+ */
+
+/**
+ * A String containing the data necessary to identify an IssueRef. An IssueRef
+ * can reference either an issue in Monorail or an external issue in another
+ * tracker.
+ *
+ * Examples of valid IssueRefStrings:
+ * - monorail:1234
+ * - chromium:1
+ * - 1234
+ * - b/123456
+ *
+ * @typedef {string} IssueRefString
+ */
+
+/**
+ * An Object for specifying what to display in a single entry in the
+ * dropdown list.
+ *
+ * @typedef {Object} MenuItem
+ * @property {string=} text The text to display in the menu.
+ * @property {string=} icon A Material Design icon shown left of the text.
+ * @property {Array<MenuItem>=} items A specification for a nested submenu.
+ * @property {function=} handler An optional click handler for an item.
+ * @property {string=} url A link for the menu item to navigate to.
+ */
+
+/**
+ * An Object containing the metadata associated with tracking async requests
+ * through Redux.
+ *
+ * @typedef {Object} ReduxRequestState
+ * @property {boolean=} requesting Whether a request is in flight.
+ * @property {Error=} error An Error Object returned by the request.
+ */
+
+
+/**
+ * Resource names used in our resource-oriented API.
+ * @see https://aip.dev/122
+ */
+
+
+/**
+ * Resource name of an IssueStar.
+ *
+ * Examples of valid IssueStar resource names:
+ * - users/1234/issueStars/monorail.5556
+ * - users/1234/issueStars/test-project.4321
+ *
+ * @typedef {string} IssueStarName
+ */
+
+
+/**
+ * Resource name of a ProjectStar.
+ *
+ * Examples of valid ProjectStar resource names:
+ * - users/1234/projectStars/monorail
+ * - users/1234/projectStars/test-project
+ *
+ * @typedef {string} ProjectStarName
+ */
+
+
+/**
+ * Resource name of a Star.
+ *
+ * @typedef {ProjectStarName|IssueStarName} StarName
+ */
+
+
+/**
+ * Resource name of a Project.
+ *
+ * Examples of valid Project resource names:
+ * - projects/monorail
+ * - projects/test-project-1
+ *
+ * @typedef {string} ProjectName
+ */
+
+
+/**
+ * Resource name of a User.
+ *
+ * Examples of valid User resource names:
+ * - users/test@example.com
+ * - users/1234
+ *
+ * @typedef {string} UserName
+ */
+
+/**
+ * Resource name of a ProjectMember.
+ *
+ * Examples of valid ProjectMember resource names:
+ * - projects/monorail/members/1234
+ * - projects/test-xyz/members/5678
+ *
+ * @typedef {string} ProjectMemberName
+ */
+
+
+/**
+ * Types defined in common.proto.
+ */
+
+
+/**
+ * A ComponentRef Object returned by the pRPC API common.proto.
+ *
+ * @typedef {Object} ComponentRef
+ * @property {string} path
+ * @property {boolean=} isDerived
+ */
+
+/**
+ * An Enum representing the type that a custom field uses.
+ *
+ * @typedef {string} FieldType
+ */
+
+/**
+ * A FieldRef Object returned by the pRPC API common.proto.
+ *
+ * @typedef {Object} FieldRef
+ * @property {number} fieldId
+ * @property {string} fieldName
+ * @property {FieldType} type
+ * @property {string=} approvalName
+ */
+
+/**
+ * A LabelRef Object returned by the pRPC API common.proto.
+ *
+ * @typedef {Object} LabelRef
+ * @property {string} label
+ * @property {boolean=} isDerived
+ */
+
+/**
+ * A StatusRef Object returned by the pRPC API common.proto.
+ *
+ * @typedef {Object} StatusRef
+ * @property {string} status
+ * @property {boolean=} meansOpen
+ * @property {boolean=} isDerived
+ */
+
+/**
+ * An IssueRef Object returned by the pRPC API common.proto.
+ *
+ * @typedef {Object} IssueRef
+ * @property {string=} projectName
+ * @property {number=} localId
+ * @property {string=} extIdentifier
+ */
+
+/**
+ * A UserRef Object returned by the pRPC API common.proto.
+ *
+ * @typedef {Object} UserRef
+ * @property {string=} displayName
+ * @property {number=} userId
+ */
+
+/**
+ * A HotlistRef Object returned by the pRPC API common.proto.
+ *
+ * @typedef {Object} HotlistRef
+ * @property {string=} name
+ * @property {UserRef=} owner
+ */
+
+/**
+ * A SavedQuery Object returned by the pRPC API common.proto.
+ *
+ * @typedef {Object} SavedQuery
+ * @property {number} queryId
+ * @property {string} name
+ * @property {string} query
+ * @property {Array<string>} projectNames
+ */
+
+
+/**
+ * Types defined in issue_objects.proto.
+ */
+
+/**
+ * An Approval Object returned by the pRPC API issue_objects.proto.
+ *
+ * @typedef {Object} Approval
+ * @property {FieldRef} fieldRef
+ * @property {Array<UserRef>} approverRefs
+ * @property {ApprovalStatus} status
+ * @property {number} setOn
+ * @property {UserRef} setterRef
+ * @property {PhaseRef} phaseRef
+ */
+
+/**
+ * An Enum representing the status of an Approval.
+ *
+ * @typedef {string} ApprovalStatus
+ */
+
+/**
+ * An Amendment Object returned by the pRPC API issue_objects.proto.
+ *
+ * @typedef {Object} Amendment
+ * @property {string} fieldName
+ * @property {string} newOrDeltaValue
+ * @property {string} oldValue
+ */
+
+/**
+ * An Attachment Object returned by the pRPC API issue_objects.proto.
+ *
+ * @typedef {Object} Attachment
+* @property {number} attachmentId
+* @property {string} filename
+* @property {number} size
+* @property {string} contentType
+* @property {boolean} isDeleted
+* @property {string} thumbnailUrl
+* @property {string} viewUrl
+* @property {string} downloadUrl
+*/
+
+/**
+ * A Comment Object returned by the pRPC API issue_objects.proto.
+ *
+ * Note: This Object is called "Comment" in the backend but is named
+ * "IssueComment" here to avoid a collision with an internal JSDoc Intellisense
+ * type.
+ *
+ * @typedef {Object} IssueComment
+ * @property {string} projectName
+ * @property {number} localId
+ * @property {number=} sequenceNum
+ * @property {boolean=} isDeleted
+ * @property {UserRef=} commenter
+ * @property {number=} timestamp
+ * @property {string=} content
+ * @property {string=} inboundMessage
+ * @property {Array<Amendment>=} amendments
+ * @property {Array<Attachment>=} attachments
+ * @property {FieldRef=} approvalRef
+ * @property {number=} descriptionNum
+ * @property {boolean=} isSpam
+ * @property {boolean=} canDelete
+ * @property {boolean=} canFlag
+ */
+
+/**
+ * A FieldValue Object returned by the pRPC API issue_objects.proto.
+ *
+ * @typedef {Object} FieldValue
+ * @property {FieldRef} fieldRef
+ * @property {string} value
+ * @property {boolean=} isDerived
+ * @property {PhaseRef=} phaseRef
+ */
+
+/**
+ * An Issue Object returned by the pRPC API issue_objects.proto.
+ *
+ * @typedef {Object} Issue
+ * @property {string} projectName
+ * @property {number} localId
+ * @property {string=} summary
+ * @property {StatusRef=} statusRef
+ * @property {UserRef=} ownerRef
+ * @property {Array<UserRef>=} ccRefs
+ * @property {Array<LabelRef>=} labelRefs
+ * @property {Array<ComponentRef>=} componentRefs
+ * @property {Array<IssueRef>=} blockedOnIssueRefs
+ * @property {Array<IssueRef>=} blockingIssueRefs
+ * @property {Array<IssueRef>=} danglingBlockedOnRefs
+ * @property {Array<IssueRef>=} danglingBlockingRefs
+ * @property {IssueRef=} mergedIntoIssueRef
+ * @property {Array<FieldValue>=} fieldValues
+ * @property {boolean=} isDeleted
+ * @property {UserRef=} reporterRef
+ * @property {number=} openedTimestamp
+ * @property {number=} closedTimestamp
+ * @property {number=} modifiedTimestamp
+ * @property {number=} componentModifiedTimestamp
+ * @property {number=} statusModifiedTimestamp
+ * @property {number=} ownerModifiedTimestamp
+ * @property {number=} starCount
+ * @property {boolean=} isSpam
+ * @property {number=} attachmentCount
+ * @property {Array<Approval>=} approvalValues
+ * @property {Array<PhaseDef>=} phases
+ */
+
+/**
+ * A IssueDelta Object returned by the pRPC API issue_objects.proto.
+ *
+ * @typedef {Object} IssueDelta
+ * @property {string=} status
+ * @property {UserRef=} ownerRef
+ * @property {Array<UserRef>=} ccRefsAdd
+ * @property {Array<UserRef>=} ccRefsRemove
+ * @property {Array<ComponentRef>=} compRefsAdd
+ * @property {Array<ComponentRef>=} compRefsRemove
+ * @property {Array<LabelRef>=} labelRefsAdd
+ * @property {Array<LabelRef>=} labelRefsRemove
+ * @property {Array<FieldValue>=} fieldValsAdd
+ * @property {Array<FieldValue>=} fieldValsRemove
+ * @property {Array<FieldRef>=} fieldsClear
+ * @property {Array<IssueRef>=} blockedOnRefsAdd
+ * @property {Array<IssueRef>=} blockedOnRefsRemove
+ * @property {Array<IssueRef>=} blockingRefsAdd
+ * @property {Array<IssueRef>=} blockingRefsRemove
+ * @property {IssueRef=} mergedIntoRef
+ * @property {string=} summary
+ */
+
+/**
+ * An PhaseDef Object returned by the pRPC API issue_objects.proto.
+ *
+ * @typedef {Object} PhaseDef
+ * @property {PhaseRef} phaseRef
+ * @property {number} rank
+ */
+
+/**
+ * An PhaseRef Object returned by the pRPC API issue_objects.proto.
+ *
+ * @typedef {Object} PhaseRef
+ * @property {string} phaseName
+ */
+
+/**
+ * An Object returned by the pRPC v3 API from feature_objects.proto.
+ *
+ * @typedef {Object} IssuesListColumn
+ * @property {string} column
+ */
+
+
+/**
+ * Types defined in permission_objects.proto.
+ */
+
+/**
+ * A Permission string returned by the pRPC API permission_objects.proto.
+ *
+ * @typedef {string} Permission
+ */
+
+/**
+ * A PermissionSet Object returned by the pRPC API permission_objects.proto.
+ *
+ * @typedef {Object} PermissionSet
+ * @property {string} resource
+ * @property {Array<Permission>} permissions
+ */
+
+
+/**
+ * Types defined in project_objects.proto.
+ */
+
+/**
+ * An Enum representing the role a ProjectMember has.
+ *
+ * @typedef {string} ProjectRole
+ */
+
+/**
+ * An Enum representing how a ProjectMember shows up in autocomplete.
+ *
+ * @typedef {string} AutocompleteVisibility
+ */
+
+/**
+ * A ProjectMember Object returned by the pRPC API project_objects.proto.
+ *
+ * @typedef {Object} ProjectMember
+ * @property {ProjectMemberName} name
+ * @property {ProjectRole} role
+ * @property {Array<Permission>=} standardPerms
+ * @property {Array<string>=} customPerms
+ * @property {string=} notes
+ * @property {AutocompleteVisibility=} includeInAutocomplete
+ */
+
+/**
+ * A Project Object returned by the pRPC API project_objects.proto.
+ *
+ * @typedef {Object} Project
+ * @property {string} name
+ * @property {string} summary
+ * @property {string=} description
+ */
+
+/**
+ * A Project Object returned by the v0 pRPC API project_objects.proto.
+ *
+ * @typedef {Object} ProjectV0
+ * @property {string} name
+ * @property {string} summary
+ * @property {string=} description
+ */
+
+/**
+ * A StatusDef Object returned by the pRPC API project_objects.proto.
+ *
+ * @typedef {Object} StatusDef
+ * @property {string} status
+ * @property {boolean} meansOpen
+ * @property {number} rank
+ * @property {string} docstring
+ * @property {boolean} deprecated
+ */
+
+/**
+ * A LabelDef Object returned by the pRPC API project_objects.proto.
+ *
+ * @typedef {Object} LabelDef
+ * @property {string} label
+ * @property {string=} docstring
+ * @property {boolean=} deprecated
+ */
+
+/**
+ * A ComponentDef Object returned by the pRPC API project_objects.proto.
+ *
+ * @typedef {Object} ComponentDef
+ * @property {string} path
+ * @property {string} docstring
+ * @property {Array<UserRef>} adminRefs
+ * @property {Array<UserRef>} ccRefs
+ * @property {boolean} deprecated
+ * @property {number} created
+ * @property {UserRef} creatorRef
+ * @property {number} modified
+ * @property {UserRef} modifierRef
+ * @property {Array<LabelRef>} labelRefs
+ */
+
+/**
+ * A FieldDef Object returned by the pRPC API project_objects.proto.
+ *
+ * @typedef {Object} FieldDef
+ * @property {FieldRef} fieldRef
+ * @property {string=} applicableType
+ * @property {boolean=} isRequired
+ * @property {boolean=} isNiche
+ * @property {boolean=} isMultivalued
+ * @property {string=} docstring
+ * @property {Array<UserRef>=} adminRefs
+ * @property {boolean=} isPhaseField
+ * @property {Array<UserRef>=} userChoices
+ * @property {Array<LabelDef>=} enumChoices
+ */
+
+/**
+ * A ApprovalDef Object returned by the pRPC API project_objects.proto.
+ *
+ * @typedef {Object} ApprovalDef
+ * @property {FieldRef} fieldRef
+ * @property {Array<UserRef>} approverRefs
+ * @property {string} survey
+ */
+
+/**
+ * A Config Object returned by the pRPC API project_objects.proto.
+ *
+ * @typedef {Object} Config
+ * @property {string} projectName
+ * @property {Array<StatusDef>=} statusDefs
+ * @property {Array<StatusRef>=} statusesOfferMerge
+ * @property {Array<LabelDef>=} labelDefs
+ * @property {Array<string>=} exclusiveLabelPrefixes
+ * @property {Array<ComponentDef>=} componentDefs
+ * @property {Array<FieldDef>=} fieldDefs
+ * @property {Array<ApprovalDef>=} approvalDefs
+ * @property {boolean=} restrictToKnown
+ */
+
+
+/**
+ * A PresentationConfig Object returned by the pRPC API project_objects.proto.
+ *
+ * @typedef {Object} PresentationConfig
+ * @property {string=} projectThumbnailUrl
+ * @property {string=} projectSummary
+ * @property {string=} customIssueEntryUrl
+ * @property {string=} defaultQuery
+ * @property {Array<SavedQuery>=} savedQueries
+ * @property {string=} revisionUrlFormat
+ * @property {string=} defaultColSpec
+ * @property {string=} defaultSortSpec
+ * @property {string=} defaultXAttr
+ * @property {string=} defaultYAttr
+ */
+
+/**
+ * A TemplateDef Object returned by the pRPC API project_objects.proto.
+ *
+ * @typedef {Object} TemplateDef
+ * @property {string} templateName
+ * @property {string=} content
+ * @property {string=} summary
+ * @property {boolean=} summaryMustBeEdited
+ * @property {UserRef=} ownerRef
+ * @property {StatusRef=} statusRef
+ * @property {Array<LabelRef>=} labelRefs
+ * @property {boolean=} membersOnly
+ * @property {boolean=} ownerDefaultsToMember
+ * @property {Array<UserRef>=} adminRefs
+ * @property {Array<FieldValue>=} fieldValues
+ * @property {Array<ComponentRef>=} componentRefs
+ * @property {boolean=} componentRequired
+ * @property {Array<Approval>=} approvalValues
+ * @property {Array<PhaseDef>=} phases
+ */
+
+
+/**
+ * Types defined in features_objects.proto.
+ */
+
+/**
+ * A Hotlist Object returned by the pRPC API features_objects.proto.
+ *
+ * @typedef {Object} HotlistV0
+ * @property {UserRef=} ownerRef
+ * @property {string=} name
+ * @property {string=} summary
+ * @property {string=} description
+ * @property {string=} defaultColSpec
+ * @property {boolean=} isPrivate
+ */
+
+/**
+ * A Hotlist Object returned by the pRPC v3 API from feature_objects.proto.
+ *
+ * @typedef {Object} Hotlist
+ * @property {string} name
+ * @property {string=} displayName
+ * @property {string=} owner
+ * @property {Array<string>=} editors
+ * @property {string=} summary
+ * @property {string=} description
+ * @property {Array<IssuesListColumn>=} defaultColumns
+ * @property {string=} hotlistPrivacy
+ */
+
+/**
+ * A HotlistItem Object returned by the pRPC API features_objects.proto.
+ *
+ * @typedef {Object} HotlistItemV0
+ * @property {Issue=} issue
+ * @property {number=} rank
+ * @property {UserRef=} adderRef
+ * @property {number=} addedTimestamp
+ * @property {string=} note
+ */
+
+/**
+ * A HotlistItem Object returned by the pRPC v3 API from feature_objects.proto.
+ *
+ * @typedef {Object} HotlistItem
+ * @property {string=} name
+ * @property {string=} issue
+ * @property {number=} rank
+ * @property {string=} adder
+ * @property {string=} createTime
+ * @property {string=} note
+ */
+
+/**
+ * Types defined in user_objects.proto.
+ */
+
+/**
+ * A User Object returned by the pRPC API user_objects.proto.
+ *
+ * @typedef {Object} UserV0
+ * @property {string=} displayName
+ * @property {number=} userId
+ * @property {boolean=} isSiteAdmin
+ * @property {string=} availability
+ * @property {UserRef=} linkedParentRef
+ * @property {Array<UserRef>=} linkedChildRefs
+ */
+
+/**
+ * A User Object returned by the pRPC v3 API from user_objects.proto.
+ *
+ * @typedef {Object} User
+ * @property {string=} name
+ * @property {string=} displayName
+ * @property {string=} availabilityMessage
+ */
+
+/**
+ * A ProjectStar Object returned by the pRPC v3 API from user_objects.proto.
+ *
+ * @typedef {Object} ProjectStar
+ * @property {string=} name
+ */
+
+/**
+ * A IssueStar Object returned by the pRPC v3 API from user_objects.proto.
+ *
+ * @typedef {Object} IssueStar
+ * @property {string=} name
+ */
+
+/**
+ * Type alias for any Star object.
+ *
+ * @typedef {ProjectStar|IssueStar} Star
+ */
diff --git a/static_src/test/index.js b/static_src/test/index.js
new file mode 100644
index 0000000..e38c23a
--- /dev/null
+++ b/static_src/test/index.js
@@ -0,0 +1,18 @@
+// Copyright 2019 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.
+
+/**
+ * @fileoverview Root file for running our frontend tests. Finds all files
+ * in the static_src folder that have the ".test.js" or ".test.ts" extension.
+ */
+
+import chai from 'chai';
+import chaiDom from 'chai-dom';
+import chaiString from 'chai-string';
+
+chai.use(chaiDom);
+chai.use(chaiString);
+
+const testsContext = require.context('../', true, /\.test\.(js|ts|tsx)$/);
+testsContext.keys().forEach(testsContext);
diff --git a/static_src/test/setup.js b/static_src/test/setup.js
new file mode 100644
index 0000000..7907cdd
--- /dev/null
+++ b/static_src/test/setup.js
@@ -0,0 +1,16 @@
+// Copyright 2019 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.
+
+/**
+ * @fileoverview Test setup code that defines functionality meant to run
+ * before each test.
+ */
+
+import {resetState, store} from 'reducers/base.js';
+
+Mocha.beforeEach(() => {
+  // We reset the Redux state before each test run to prevent Redux
+  // state changes in previous tests from affecting results.
+  store.dispatch(resetState());
+});
\ No newline at end of file
diff --git a/static_src/webpacked-scripts-template.html b/static_src/webpacked-scripts-template.html
new file mode 100644
index 0000000..e90e478
--- /dev/null
+++ b/static_src/webpacked-scripts-template.html
@@ -0,0 +1,2 @@
+<!-- This is a webpack-generated ezt template for script tags. -->
+<!-- Do not edit or commit to repo. -->
diff --git a/templates/features/activity-body.ezt b/templates/features/activity-body.ezt
new file mode 100644
index 0000000..640b1d3
--- /dev/null
+++ b/templates/features/activity-body.ezt
@@ -0,0 +1,9 @@
+[# This template is used to pre-render the title of an activity so that it can
+   later be accessed as activity.escaped_title.
+]
+
+[is activity_type "ProjectIssueUpdate"]
+  [include "updates-issueupdate-body.ezt"]
+[else]
+  Body?
+[end]
diff --git a/templates/features/activity-title.ezt b/templates/features/activity-title.ezt
new file mode 100644
index 0000000..c7e2f2f
--- /dev/null
+++ b/templates/features/activity-title.ezt
@@ -0,0 +1,9 @@
+[# This template is used to pre-render the title of an activity so that it can
+   later be accessed as activity.escaped_title.
+]
+
+[is activity_type "ProjectIssueUpdate"]
+  [include "updates-issueupdate-title.ezt"]
+[else]
+  title?
+[end]
diff --git a/templates/features/auto-ping-email.ezt b/templates/features/auto-ping-email.ezt
new file mode 100644
index 0000000..47b9f29
--- /dev/null
+++ b/templates/features/auto-ping-email.ezt
@@ -0,0 +1,11 @@
+[ping_comment_content]
+[detail_url]
+
+[for fields][if-any fields.docstring]
+[fields.field_name] field description:
+  [fields.docstring]
+[end][end]
+
+[# TODO(jrobbins): component triage notes]
+[# TODO(jrobbins): hotlist triage notes]
+[# TODO(jrobbins): context comment that set the date value]
diff --git a/templates/features/cues-conduct.ezt b/templates/features/cues-conduct.ezt
new file mode 100644
index 0000000..83a026e
--- /dev/null
+++ b/templates/features/cues-conduct.ezt
@@ -0,0 +1,18 @@
+[define show_code_of_conduct]False[end]
+[is cue "privacy_click_through"][define show_code_of_conduct]True[end][end]
+[is cue "code_of_conduct"][define show_code_of_conduct]True[end][end]
+
+[define code_of_conduct_url]https://chromium.googlesource.com/chromium/src/+/main/CODE_OF_CONDUCT.md[end]
+[is projectname "fuchsia"]
+  [define code_of_conduct_url]https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT[end]
+[end]
+
+[is show_code_of_conduct "True"]
+ <table border="0" cellspacing="0" cellpadding="0" class="cue" style="margin: 2px">
+  <tr><td><span>
+      Please keep discussions respectful and constructive.
+      See our <a href="[code_of_conduct_url]" target="_blank">code of conduct</a>.
+      <a href="#" title="Don't show this message again" style="margin-left: 1em" class="dismiss_cue x_icon"></a>
+  </span></td></tr>
+ </table>
+[end]
\ No newline at end of file
diff --git a/templates/features/cues.ezt b/templates/features/cues.ezt
new file mode 100644
index 0000000..5cf059d
--- /dev/null
+++ b/templates/features/cues.ezt
@@ -0,0 +1,178 @@
+[if-any cue account_cue]
+
+[# Do not show cue if there is an alert shown on the page.]
+[if-any alerts.show][else]
+
+
+[# Dialog box for privacy settings.]
+[is cue "privacy_click_through"]
+  <div class="scrim cue">
+    <div id="privacy_dialog">
+      <h2>Email display settings</h2>
+
+      <p>There is a <a href="/hosting/settings" title="Settings"
+      class="dismiss_cue">setting</a> to control how your email
+      address appears on comments and issues that you post.
+
+      [if-any is_privileged_domain_user]
+        Since you are an integral part of this community, that setting
+        defaults to showing your full email address.</p>
+
+        <p>Also, you are being trusted to view email addresses of
+        non-members who post comments in your projects.  Please use
+        those addresses only to request additional information about
+        the posted comments, and do not share other users' email
+        addresses beyond the site.</p>
+      [else]
+        Project members will always see your full email address.  By
+        default, other users who visit the site will see an
+        abbreviated version of your email address.</p>
+
+        <p>If you do not wish your email address to be shared, there
+        are other ways to <a
+        href="http://www.chromium.org/getting-involved">get
+        involved</a> in the community.  To report a problem when using
+        the Chrome browser, you may use the "Report an issue..."  item
+        on the "Help" menu.</p>
+      [end]
+
+      <div class="actions">
+        <a href="#" title="Got it" class="dismiss_cue">GOT IT</a>
+      </div>
+    </div>
+  </div>
+
+[else][if-any account_cue]
+
+  <table id="alert-table" align="center" border="0" cellspacing="0" cellpadding="0">
+   <tr><td class="notice" id="notice">
+    [# Cue card to warn users who are using a child account.]
+    [is account_cue "switch_to_parent_account"]
+        <div>You are signed in to a linked account.</div>
+	<a href="[login_url]">Switch to [parent_email]</a>.
+    [end]
+  </td></tr>
+ </table>
+
+[else][is cue "code_of_conduct"]
+ [# Note: code-of-conduct cue card is implemented in cues-conduct.ezt which is
+    included from forms where users post text.]
+
+[else]
+
+ <table align="center" border="0" cellspacing="0" cellpadding="0" class="cue">
+  <tr><td><span>
+    [# Cue cards to teach users how to join a project.]
+    [is cue "how_to_join_project"]
+      <b>How-to:</b>
+      Join this project by contacting the project owners.
+    [end]
+
+    [# Cue card to teach users how to search for numbers in the issue tracker.]
+    [is cue "search_for_numbers"]
+     [if-any jump_local_id]
+       <b>Tip:</b>
+       To find issues containing "[jump_local_id]", use quotes.
+     [end]
+    [end]
+
+    [# Cue card to teach users how to search for numbers in the issue tracker.]
+    [is cue "dit_keystrokes"]
+      <b>Tip:</b>
+      Press <b>Esc</b> then <b style="font-size:130%"><tt>?</tt></b> for keyboard shortcuts.
+    [end]
+
+    [# Cue card to teach users that italics mean derived values in the issue tracker.]
+    [is cue "italics_mean_derived"]
+      <b>Note:</b>
+      <i>Italics</i> mean that a value was derived by a filter rule.
+      <a href="http://code.google.com/p/monorail/wiki/FilterRules">Learn more</a>
+    [end]
+
+    [# Teach users that color blocks mean that an issue participant may not be available.]
+    [is cue "availability_msgs"]
+      <b>Note:</b>
+      Color blocks (like <span class="availability_unsure" style="padding:0">&#9608;</span> or
+      <span class="availability_never" style="padding:0">&#9608;</span>)
+      mean that a user may not be available.  Tooltip shows the reason.
+    [end]
+
+    [# Cue card to teach users that full-text indexing takes time.]
+    [is cue "stale_fulltext"]
+      <b>Note:</b>
+      Searching for text in issues may show results that are a few minutes out of date.
+    [end]
+
+    [# Cue cards to improve discoverability of people roles.]
+    [is cue "document_team_duties"]
+     [if-any read_only][else]
+       <b>Tip:</b>
+       Document <a href="people/list">each teammate's project duties</a>.
+     [end]
+    [end]
+
+    [# Cue cards to explain grid mode.]
+    [is cue "showing_ids_instead_of_tiles"]
+       <b>Note:</b>
+       Grid mode automatically switches to displaying IDs when there are many results.
+    [end]
+
+    [# Cue cards to explain ownermodified, statusmodified, and componentmodified.]
+    [is cue "issue_timestamps"]
+       <b>Note:</b>
+       ownermodified, statusmodified, and componentmodified are the times at which
+       an issue's owner, status or component were changed.
+    [end]
+
+    [# Cue card to remind the user that they have set a vacation message.]
+    [is cue "you_are_on_vacation"]
+       <b>Note:</b>
+       Your <a href="/hosting/settings">vacation message</a> is set to:
+       "[logged_in_user.avail_message_short]".
+    [end]
+
+    [# Cue card to inform user that email to them bounced and that they must reset.]
+    [is cue "your_email_bounced"]
+       <b>Action required:</b>
+       An email to you bounced.  Once you can reliably receive email, clear the
+       <a href="[logged_in_user.profile_url]">bouncing status</a>.
+    [end]
+
+    [# Cue card to tell users what it means to star a hotlist]
+    [is cue "explain_hotlist_starring"]
+        <b>Note:</b>
+        Starring a hotlist will not cc you on any updates.
+        It simply adds the hotlist to your Starred hotlists category on this
+        page so that you can conveniently revisit it.
+    [end]
+
+   </span>
+    [# Link to dismiss the cue card.]
+    [if-any logged_in_user]
+     [if-any read_only][else]
+      <a href="#" title="Don't show this message again" style="margin-left: 1em" class="dismiss_cue x_icon"></a>
+     [end]
+    [end]
+  </td></tr>
+ </table>
+[end]
+[end]
+[end]
+
+
+ <script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  var dismissLinks = document.querySelectorAll(".dismiss_cue");
+  for (var i = 0; i < dismissLinks.length; ++i) {
+   var dismissCue = dismissLinks[[]i];
+     dismissCue.addEventListener("click", function(event) {
+         _CS_dismissCue("[format "js"][cue][end]");
+         if (this.getAttribute("href") === "#")
+           event.preventDefault();
+     });
+  }
+});
+ </script>
+
+[end]
+[end]
diff --git a/templates/features/filterrules-preview.ezt b/templates/features/filterrules-preview.ezt
new file mode 100644
index 0000000..adbd7d0
--- /dev/null
+++ b/templates/features/filterrules-preview.ezt
@@ -0,0 +1,8 @@
+<div id="preview_filterrules_area" style="display:none">
+  Filter rules and components will add:
+  <div id="preview_filterrules_labels"></div>
+  <div id="preview_filterrules_owner"></div>
+  <div id="preview_filterrules_ccs"></div>
+  <div id="preview_filterrules_warnings"></div>
+  <div id="preview_filterrules_errors"></div>
+</div>
diff --git a/templates/features/hotlist-create-page.ezt b/templates/features/hotlist-create-page.ezt
new file mode 100644
index 0000000..16b6935
--- /dev/null
+++ b/templates/features/hotlist-create-page.ezt
@@ -0,0 +1,64 @@
+[define title]Create a new hotlist[end]
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "hidetabs"]
+
+<h2>Create a hotlist</h2>
+
+<form action="createHotlist.do" method="POST" id="create_hotlist_form"
+      style="margin: 1em;">
+  <input type="hidden" name="token" value="[form_token]">
+
+  <label for="hotlistname">Hotlist Name:</label><br>
+  <input type="text" id="hotlistname" name="hotlistname" size="30" autocomplete="off"
+         value="[initial_name]">
+  <span class="graytext">Example: My-Hotlist-Name</span>
+  <div class="fielderror">&nbsp;
+    <span id="hotlistnamefeedback">
+       [if-any errors.hotlistname][errors.hotlistname][end]
+    </span>
+  </div>
+
+  <label for="summary">Summary</label><br>
+  <input type="text" id="summary" name="summary" size="75" autocomplete="off"
+         value="[initial_summary]">
+  <div class="fielderror">&nbsp;
+    <span id="summaryfeedback">
+      [if-any errors.summary][errors.summary][end]
+    </span>
+  </div>
+
+  <label for="description">Description</label><br>
+  <textarea id="description" name="description" rows="20" cols="90" wrap="soft">[initial_description]</textarea>
+  <br><br>
+
+  <div>
+    <span>Owner: [logged_in_user.email]</span>
+    <div class="graytext">
+    You will be the owner of this hotlist with permission to edit everything
+    </div>
+  </div>
+  <br>
+
+  <label for="editors">Editors</label><br>
+  <input type="text" id="editors" name="editors" size="75" autocomplete="off"
+  value="[initial_editors]">
+  <span class="graytext">Example: user@email.com, example@email.com</span>
+  <div class="graytext">Editors may add, remove, or rank issues</div>
+  <div class="fielderror">&nbsp;
+    <span id="editorsfeedback">
+      [if-any errors.editors][errors.editors][end]
+    <span>
+  </div>
+
+  <label for="privacy">Viewable by:</label>
+  <select name="is_private" id="privacy">
+    <option disabled="disabled">Select an access level...</option>
+    <option value="no">Anyone on the internet</option>
+    <option value="yes" selected="selected">Hotlist members</option>
+  </select>
+  <br><br>
+
+  <input type="submit" value="Create hotlist">
+</form>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/features/hotlist-details-page.ezt b/templates/features/hotlist-details-page.ezt
new file mode 100644
index 0000000..194f6bd
--- /dev/null
+++ b/templates/features/hotlist-details-page.ezt
@@ -0,0 +1,72 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+[if-any read_only cant_administer_hotlist][include "read-only-hotlist-details-page.ezt"]
+[else]
+
+<form id="edithotlist" action="details.do" method="POST" autocomplete="off" enctype="multipart/form-data">
+  <input type="hidden" name="token" value="[form_token]">
+
+<h4>Hotlist settings</h4>
+
+<div class="section">
+  Hotlist name:<br>
+  <input type="text" id="name" name="name" size="75" value="[initial_name]"><br>
+  <div class="fielderror">&nbsp;
+    <span id="namefeedback">[if-any errors.name][errors.name][end]</span>
+  </div>
+
+  Hotlist summary:<br>
+  <input type="text" id="summary" name="summary" size="75" value="[initial_summary]"><br>
+  <div class="fielderror">&nbsp;
+    <span id="summaryfeedback">[if-any errors.summary][errors.summary][end]</span>
+  </div>
+
+  Hotlist description:<br>
+  <textarea id="description" name="description" rows="20" cols="90" wrap="soft"
+  	    >[initial_description]</textarea><br>
+</div>
+
+<h4>Hotlist defaults</h4>
+
+<div class="section">
+  Default columns shows in list view:<br/>
+  <input type="text" id="default_col_spec" name="default_col_spec" size="75" value="[initial_default_col_spec]"><br>
+  <div class="fielderror">&nbsp;
+    <span id="default_col_specfeedback">[if-any errors.default_col][errors.default_col][end]</span>
+  </div>
+
+  [# TODO(jojwang): add default issues per page]
+</div>
+
+<h4>Hotlist access</h4>
+
+<div class="section">
+  <select name="is_private" id="is_private">
+    <option disabled="disabled">Select an access level...</option>
+    <option value="no" [if-any initial_is_private][else]selected="selected"[end]>Anyone on the Internet</option>
+    <option value="yes" [if-any initial_is_private]selected="selected"[else][end]>Members only</option>
+  </select>
+  <p>Individual issues in the list can only be seen by users who can normally see them. The privacy status of an issue is considered when it is being displayed (or not displayed) in a hotlist.</p>
+</div>
+
+
+  <input type="hidden" id="delete" name="deletestate" value="false">
+  <input type="submit" id="savechanges" name="btn" value="Save changes" class="submit">
+  <input type="button" id="deletehotlist" name="btn" value="Delete hotlist" class="submit">
+
+</form>
+
+[include "../framework/footer-script.ezt"]
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  $('deletehotlist').addEventListener('click', function () {
+    HTL_deleteHotlist($('edithotlist'));
+  });
+});
+</script>
+
+[end]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/features/hotlist-issues-body.ezt b/templates/features/hotlist-issues-body.ezt
new file mode 100644
index 0000000..3e9406d
--- /dev/null
+++ b/templates/features/hotlist-issues-body.ezt
@@ -0,0 +1,115 @@
+[for panels][# There will always be exactly one panel.]
+ [include "../tracker/issue-list-headings.ezt"]
+[end]
+
+[if-any table_data][else]
+<tr>
+  <td colspan="40" class="id">
+   <div style="padding: 3em; text-align: center">
+       This hotlist currently has no issues.<br>
+     [if-any owner_permissions editor_permissions]
+     Select 'Add issues...' in the above 'Actions...' dropdown menu to add some.
+     [end]
+    </div>
+   </td>
+  </tr>
+[end]
+
+
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function(){
+  [if-any table_data]
+    var tableData = [[]
+    [for table_data]
+      {
+      "group":
+      [if-any table_data.group][if-any table_data.group.cells]
+        {
+        "rowsInGroup": "[table_data.group.rows_in_group]",
+        "cells": [[]
+        [for table_data.group.cells]
+          {
+          "groupName": "[table_data.group.cells.group_name]",
+          "values": [[]
+          [for table_data.group.cells.values]
+            {
+            "item": [if-any table_data.group.cells.values.item]"[format "js"][table_data.group.cells.values.item][end]"[else]"None"[end],
+            }[if-index table_data.group.cells.values last][else],[end]
+          [end]
+          ],
+          }[if-index table_data.group.cells last][else],[end]
+        [end]
+        ],
+        },
+      [else]"no",[end][else]"no",[end]
+      "cells" : [[]
+      [for table_data.cells]
+        {
+        "type": "[table_data.cells.type]",
+        "values": [[]
+        [for table_data.cells.values]
+          {
+            [is table_data.cells.type "issues"]
+              "id": "[format "js"][table_data.cells.values.item.id][end]",
+              "href": "[format "js"][table_data.cells.values.item.href][end]",
+              "title": "[format "js"][table_data.cells.values.item.title][end]",
+              "closed": "[format "js"][table_data.cells.values.item.closed][end]",
+            [else]
+              "item": "[format "js"][table_data.cells.values.item][end]",
+            [end]
+          "isDerived": "[table_data.cells.values.is_derived]",
+          }[if-index table_data.cells.values last][else],[end]
+        [end]
+        ],
+        "colIndex": "[table_data.cells.col_index]",
+        "align": "[table_data.cells.align]",
+        "noWrap": "[table_data.cells.NOWRAP]",
+        "nonColLabels": [[]
+        [for table_data.cells.non_column_labels]
+          {
+          "value": "[format "js"][table_data.cells.non_column_labels.value][end]",
+          "isDerived": "[table_data.cells.non_column_labels.is_derived]",
+          }[if-index table_data.cells.non_column_labels last][else],[end]
+        [end]
+        ],
+        }[if-index table_data.cells last][else],[end]
+      [end]
+      ],
+      "issueRef": "[table_data.issue_ref]",
+      "idx": "[table_data.idx]",
+      "projectName": "[table_data.project_name]",
+      "localID": "[table_data.local_id]",
+      "projectURL": [format "js"]"[table_data.project_url]"[end],
+      "issueID": "[table_data.issue_id]",
+      "isStarred": "[table_data.starred]",
+      "issueCleanURL": [format "js"]"[table_data.issue_clean_url]"[end],
+      "issueContextURL": [format "js"]"[table_data.issue_ctx_url]"[end],
+      }[if-index table_data last][else],[end]
+    [end]
+    ];
+
+    var pageSettings = {
+    "cursor": "[cursor]",
+    "userLoggedIn": "[if-any logged_in_user]yes[end]",
+    "ownerPerm": "[owner_permissions]",
+    "editorPerm": "[editor_permissions]",
+    "isCrossProject": "[is_cross_project]",
+    "readOnly": "[read_only]",
+    "allowRerank": "[allow_rerank]",
+    "hotlistID": "[hotlist_id]",
+    "colSpec": "[col_spec]",
+    "can": "[can]"
+    };
+
+    renderHotlistTable(tableData, pageSettings);
+    [if-any allow_rerank]
+    activateDragDrop(tableData, pageSettings, "[hotlist_id]");
+    [end]
+  [else]
+  [end]
+});
+</script>
+
+<script type="text/javascript" defer src="[version_base]/static/js/tracker/render-hotlist-table.js" nonce="[nonce]"></script>
+
diff --git a/templates/features/hotlist-issues-page.ezt b/templates/features/hotlist-issues-page.ezt
new file mode 100644
index 0000000..79898e0
--- /dev/null
+++ b/templates/features/hotlist-issues-page.ezt
@@ -0,0 +1,120 @@
+[define title]Hotlist [hotlist.name][end]
+[define category_css]css/ph_list.css[end]
+[define category2_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+<table width="100%" cellpadding="0" cellspacing="0" border="0" class="hotlist-issues-page" id="meta-container"
+       style="margin: 1em">
+<tbody class="collapse">
+  <tr>
+    <td nowrap="nowrap" style="min-width:9em;" class="sidebar">
+      <div style="text-align: center">
+       [if-any read_only][else]
+         <a id="hotlist_star"
+         style="color:[if-any hotlist.is_starred]cornflowerblue[else]gray[end]"
+         title="[if-any hotlist.is_starred]Un-s[else]S[end]tar this hotlist">
+         [if-any hotlist.is_starred]&#9733;[else]&#9734;[end]
+         </a>
+       [end]
+       Followed by [hotlist.num_followers]
+      </div>
+      <div id="meta-float">
+        [include "hotlist-meta-part.ezt"]
+      </div>
+    </td>
+    <td width="80%" class="vt" style="padding-left: 1em">
+      <h1 style="margin-top: 0"><a href="[hotlist.url]">Hotlist [hotlist.name]</a></h1>
+      <div>Summary: [hotlist.summary]</div>
+      Description: [hotlist.description]
+     </td>
+  </tr>
+
+
+</tbody>
+</table>
+
+<div id="colcontrol">
+
+  <span id="qq"><input type="hidden" id="searchq" name="q"
+                            value="[query]" autocomplete="off" ignore-dirty></span>
+       [if-any sortspec]<input type="hidden" id="sort" name="sort" value="[sortspec]">[end]
+       [if-any groupby]<input type="hidden" id="groupby" name="groupby" value="[groupby]">[end]
+       [if-any colspec]<span id="search_colspec"><input type="hidden" name="colspec" value="[colspec]"></span>[end]
+       <input type="hidden" id="hotlist_name" value="[hotlist.name]"></input>
+  <input type="hidden"  id="can" value="[can]"></span>
+
+  [if-any grid_mode]
+   [include "../tracker/issue-grid-controls-top.ezt"]
+  [end]
+
+  [if-any list_mode]
+   [include "../tracker/issue-list-controls-top.ezt"]
+  [end]
+
+  [if-any chart_mode]
+   [include "../tracker/issue-chart-controls-top.ezt"]
+  [end]
+
+  [include "../tracker/issue-hovercard.ezt"] [# TODO(jojwang): no hovercard appears right now]
+
+  <div id="cursorarea">
+  <table cellspacing="0" cellpadding="2" border="0" class="results striped drag_container" id="resultstable" width="100%">
+
+    [if-any grid_mode]
+     [include "../tracker/issue-grid-body.ezt"]
+    [end]
+
+    [if-any list_mode]
+     [include "hotlist-issues-body.ezt"]
+    [end]
+
+    [if-any chart_mode]
+     [include "../tracker/issue-chart-body.ezt" "testparam"]
+    [end]
+
+  </table>
+  </div>
+
+  [if-any list_mode]
+    [include "../tracker/issue-list-controls-bottom.ezt"]
+    [for panels]
+      [include "../tracker/issue-list-menus.ezt"]
+    [end]
+  [end]
+</div>
+
+[if-any grid_mode][else]
+  [include "../tracker/issue-list-js.ezt" "hotlist"]
+[end]
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  if ($("hotlist_star")) {
+    [# The user viewing this page wants to star this hotlist]
+    $("hotlist_star").addEventListener("click", function () {
+       _TKR_toggleStar($("hotlist_star"), null, null, null, "[hotlist_id]");
+    });
+  }
+
+
+    window.addEventListener("beforeunload", function(e) {
+      var selectedElement = document.activeElement;
+      if (selectedElement.classList.contains("itemnote")){
+        saveNote(selectedElement, "[hotlist_id]");
+      }
+      return;
+    });
+
+    $("hide-closed").addEventListener("click", function(e) {
+      HTL_toggleIssuesShown(e.target);
+    });
+    $("show-all").addEventListener("click", function(e) {
+      HTL_toggleIssuesShown(e.target);
+    });
+
+});
+</script>
+
+[#TODO(jojwang):make pretty]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/features/hotlist-meta-part.ezt b/templates/features/hotlist-meta-part.ezt
new file mode 100644
index 0000000..0b865c6
--- /dev/null
+++ b/templates/features/hotlist-meta-part.ezt
@@ -0,0 +1,41 @@
+<table cellspacing="0" cellpadding="0">
+  <tr><th align="left" style="padding-right:.3em">Owners:</th>
+    <td width="100%">
+      <div style="margin-left:1em">
+      [if-any hotlist.owners]
+      [for hotlist.owners]
+      [include "../framework/user-link.ezt" hotlist.owners]
+      [end]
+      [end]
+      </div>
+    </td>
+  </tr>
+  <tr><th alight="left" style="padding-right:.3em">Members:</th>
+    <td width="100%">
+      <div style="margin-left:1em">
+      [if-any hotlist.editors]
+      [for hotlist.editors]
+      [include "../framework/user-link.ezt" hotlist.editors]
+      [end]
+      [end]
+      </div>
+    </td>
+  </tr>
+  <tr><th align="left" style="padding-right:.3em">Access:</th>
+    <td width="100%">
+      <div style="margin-left:1em">
+      [if-any hotlist.access_is_private]Private[else]Public[end]
+      </div>
+    </td>
+  </tr>
+  <tr><th align="left">Issues:</th>
+    <td width="100%">
+    <form>
+      <input type="radio" id="hide-closed" name="toggleissues" value="2" [is can "2"]checked[end]>Open<br>
+      <input type="radio" id="show-all" name="toggleissues" value="1" [is can "1"]checked[end]>All<br>
+    </form>
+    </form>
+    </td>
+  </tr>
+</table>
+
diff --git a/templates/features/inboundemail-banned.ezt b/templates/features/inboundemail-banned.ezt
new file mode 100644
index 0000000..f241fef
--- /dev/null
+++ b/templates/features/inboundemail-banned.ezt
@@ -0,0 +1,7 @@
+Subject: You are banned from using this issue tracker
+
+The email message you sent to [project_addr]
+was not processed because your account, [sender_addr],
+has been banned from using this issue tracker.
+
+[include "inboundemail-error-footer-part.ezt"]
diff --git a/templates/features/inboundemail-body-too-long.ezt b/templates/features/inboundemail-body-too-long.ezt
new file mode 100644
index 0000000..515e157
--- /dev/null
+++ b/templates/features/inboundemail-body-too-long.ezt
@@ -0,0 +1,6 @@
+Subject: Email body too long
+
+The email message you sent to [project_addr]
+was not processed because it was too large.
+
+[include "inboundemail-error-footer-part.ezt"]
diff --git a/templates/features/inboundemail-error-footer-part.ezt b/templates/features/inboundemail-error-footer-part.ezt
new file mode 100644
index 0000000..e86cbeb
--- /dev/null
+++ b/templates/features/inboundemail-error-footer-part.ezt
@@ -0,0 +1,2 @@
+To learn more, please visit:
+https://chromium.googlesource.com/infra/infra/+/main/doc/users/index.md
diff --git a/templates/features/inboundemail-no-account.ezt b/templates/features/inboundemail-no-account.ezt
new file mode 100644
index 0000000..0b7392d
--- /dev/null
+++ b/templates/features/inboundemail-no-account.ezt
@@ -0,0 +1,9 @@
+Subject: Could not determine account of sender
+
+The email message you sent to [project_addr]
+was not processed because your address, [sender_addr],
+does not correspond to an account known to the server.
+You must send from an email address that has already
+been used to interact with the issue tracker web UI.
+
+[include "inboundemail-error-footer-part.ezt"]
diff --git a/templates/features/inboundemail-no-artifact.ezt b/templates/features/inboundemail-no-artifact.ezt
new file mode 100644
index 0000000..bbc93fc
--- /dev/null
+++ b/templates/features/inboundemail-no-artifact.ezt
@@ -0,0 +1,7 @@
+Subject: Could not find [artifact_phrase] in project [project_name]
+
+The email message you sent to [project_addr]
+was not processed because [artifact_phrase] does
+not exist in project [project_name].
+
+[include "inboundemail-error-footer-part.ezt"]
diff --git a/templates/features/inboundemail-no-perms.ezt b/templates/features/inboundemail-no-perms.ezt
new file mode 100644
index 0000000..5fe57dc
--- /dev/null
+++ b/templates/features/inboundemail-no-perms.ezt
@@ -0,0 +1,8 @@
+Subject: User does not have permission to add a comment
+
+The email message you sent to [project_addr]
+was not processed because user [sender_addr] 
+does not have permission to add a comment to 
+[artifact_phrase] in [project_name].
+
+[include "inboundemail-error-footer-part.ezt"]
diff --git a/templates/features/inboundemail-not-a-reply.ezt b/templates/features/inboundemail-not-a-reply.ezt
new file mode 100644
index 0000000..9861fd7
--- /dev/null
+++ b/templates/features/inboundemail-not-a-reply.ezt
@@ -0,0 +1,7 @@
+Subject: Your message is not a reply to a notification email
+
+The email message you sent to [project_addr]
+was not processed because it was not a reply to a notification
+email that we sent specifically to [sender_addr].
+
+[include "inboundemail-error-footer-part.ezt"]
diff --git a/templates/features/inboundemail-project-not-found.ezt b/templates/features/inboundemail-project-not-found.ezt
new file mode 100644
index 0000000..d82bac1
--- /dev/null
+++ b/templates/features/inboundemail-project-not-found.ezt
@@ -0,0 +1,6 @@
+Subject: Project not found
+
+The email message you sent to [project_addr]
+was not processed because there is no project at that address.
+
+[include "inboundemail-error-footer-part.ezt"]
diff --git a/templates/features/inboundemail-replies-disabled.ezt b/templates/features/inboundemail-replies-disabled.ezt
new file mode 100644
index 0000000..c95839b
--- /dev/null
+++ b/templates/features/inboundemail-replies-disabled.ezt
@@ -0,0 +1,7 @@
+Subject: Email replies are not enabled in project [project_name]
+
+The email message you sent to [project_addr]
+was not processed because project [project_name]
+has not enabled email replies.
+
+[include "inboundemail-error-footer-part.ezt"]
diff --git a/templates/features/read-only-hotlist-details-page.ezt b/templates/features/read-only-hotlist-details-page.ezt
new file mode 100644
index 0000000..f526aa7
--- /dev/null
+++ b/templates/features/read-only-hotlist-details-page.ezt
@@ -0,0 +1,25 @@
+<h4>Hotlist settings</h4>
+
+<div class="section">
+  Hotlist name:<br>
+  [initial_name]<br>
+
+  Hotlist summary:<br>
+  [initial_summary]<br>
+
+  Hotlist description:<br>
+  [initial_description]<br>
+</div>
+
+<h4>Hotlist defaults</h4>
+
+<div class="section">
+  Default columns shown in list view:<br>
+  [initial_default_col_spec]<br>
+</div>
+
+<h4>Hotlist access</h4>
+<div class="section">
+  <p>Who can view this hotlist: [if-any initial_is_private]Members only[else]Anyone on the internet[end]</p>
+  <p>Individual issues in the list can only be seen by users who can normally see them. The privacy status of an issue is considered when it is being displayed (or not displayed) in a hotlist.</p>
+</div>
diff --git a/templates/features/remove-self-hotlist-form.ezt b/templates/features/remove-self-hotlist-form.ezt
new file mode 100644
index 0000000..cc351c2
--- /dev/null
+++ b/templates/features/remove-self-hotlist-form.ezt
@@ -0,0 +1,19 @@
+<div id="remove-self-container" style="display: [if-any open_dialog]block[else]none[end]">
+  <div id="remove-self-dialog">
+    <h2 style="margin-top:0">
+      Hotlist: [hotlist.name]
+    </h2>
+
+    <section>
+      Would you like to remove yourself as an editor of this hotlist?
+      <input type="checkbox" name="removeself">
+    </section>
+
+    <menu>
+      <button id="cancel-remove-self" type="reset">Cancel</button>
+      <button type="submit">Confirm</button>
+    </menu>
+  </div>
+</div>
+
+<script type="text/javascript" defer src="[version_base]/static/js/hotlists/edit-hotlist.js" nonce="[nonce]"></script>
diff --git a/templates/features/saved-queries-page.ezt b/templates/features/saved-queries-page.ezt
new file mode 100644
index 0000000..69fa654
--- /dev/null
+++ b/templates/features/saved-queries-page.ezt
@@ -0,0 +1,44 @@
+[define title][if-any viewing_self]My[else][viewed_username][end] saved queries[end]
+[define category_css]css/ph_detail.css[end]
+
+[include "../framework/header.ezt" "showusertabs" "t4"]
+
+
+<h3>Saved queries</h3>
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+<div class="section">
+
+  <div class="closed">
+    <div>Saved queries allow you to quickly view issue lists that you use frequently.
+     <a class="ifClosed toggleHidden" href="#"
+        style="font-size:90%; margin:0 1em">Learn more</a>
+    </div>
+
+    <div id="filterhelp" class="ifOpened help">
+        Personal saved queries allow you to keep track of the issues that matter most to you.<br/>
+        When you are in a project, you can choose one of your saved queries from the
+        the bottom section of the search dropdown menu that is next to the issue search box.<br/>
+        You can also subscribe to any query to get email notifications when issues that
+        satisfy that query are modified.<br/>
+        Subscription notifications are only generated for users who have visited the
+        site within the past six months.
+    </div>
+    <br>
+
+    <form action="queries.do" method="POST">
+      <input type="hidden" name="token" value="[form_token]">
+      [include "../framework/saved-queries-admin-part.ezt" "user"]
+
+      <input type="submit" id="savechanges" name="btn" value="Save changes"
+             class="submit">
+
+    </form>
+
+  </div>
+</div>
+
+[end][# if not read-only]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/features/transfer-hotlist-form.ezt b/templates/features/transfer-hotlist-form.ezt
new file mode 100644
index 0000000..a837173
--- /dev/null
+++ b/templates/features/transfer-hotlist-form.ezt
@@ -0,0 +1,31 @@
+<div id="transfer-ownership-container" style="display: [if-any open_dialog]block[else]none[end]">
+  <div id="transfer-ownership-dialog">
+    <h2 style="margin-top:0">
+      <a id="hotlist_star"
+            style="color:[if-any hotlist.is_starred]cornflowerblue[else]gray[end]"
+            title="[if-any hotlist.is_starred]Un-s[else]S[end]tar this hotlist">
+            [if-any hotlist.is_starred]&#9733;[else]&#9734;[end]
+            </a>
+      Hotlist: [hotlist.name]
+    </h2>
+
+    <section style="margin: 1em 0">
+      Transfer hotlist ownership to: <input name="changeowners" value="[initial_new_owner_username]" placeholder=[placeholder]>
+      [if-any errors.transfer_ownership]
+        <div class="fielderror">[errors.transfer_ownership]</div>
+      [end]
+    </section>
+
+    <section>
+      Would you like to stay on as an editor of this hotlist?
+      <input type="checkbox" name="becomeeditor" checked>
+    </section>
+
+    <menu>
+      <button id="cancel" type="reset">Cancel</button>
+      <button type="submit">Confirm</button>
+    </menu>
+  </div>
+</div>
+
+<script type="text/javascript" defer src="[version_base]/static/js/hotlists/edit-hotlist.js" nonce="[nonce]"></script>
\ No newline at end of file
diff --git a/templates/features/updates-bulkedit-body.ezt b/templates/features/updates-bulkedit-body.ezt
new file mode 100644
index 0000000..5fc10e7
--- /dev/null
+++ b/templates/features/updates-bulkedit-body.ezt
@@ -0,0 +1 @@
+[is num_issues "1"]Issue [else]Issues [end][for local_ids]<a class="ot-issue-link" href="/p/[project.project_name]/issues/detail?id=[local_ids]">[local_ids]</a>[if-index local_ids last][else], [end][end]
diff --git a/templates/features/updates-ending.ezt b/templates/features/updates-ending.ezt
new file mode 100644
index 0000000..0985311
--- /dev/null
+++ b/templates/features/updates-ending.ezt
@@ -0,0 +1,7 @@
+[is ending_type "in_project"]
+  in project [include "updates-project-link.ezt" "2"]
+[else][is ending_type "by_user"]
+  [define user_profile_url][user.profile_url][end]
+  [define user_display_name][user.display_name][end]
+  by [include "updates-profile-link.ezt" "2"]
+[end][end]
diff --git a/templates/features/updates-entry-part.ezt b/templates/features/updates-entry-part.ezt
new file mode 100644
index 0000000..a1fde4e
--- /dev/null
+++ b/templates/features/updates-entry-part.ezt
@@ -0,0 +1,57 @@
+[# Show one activity.  arg0 is the activity.]
+
+[is arg0.highlight ""]
+  [define column_width]160[end]
+[else]
+  [define column_width]300[end]
+[end]
+
+<li [is even "Yes"]class="even"[end]>
+  <div class="g-section g-tpl-[column_width]">
+    <div class="g-unit g-first">
+      <div class="g-c">
+        [if-any arg0.highlight]
+        <div class="g-section g-tpl-160">
+          <div class="g-unit g-first">
+            <div class="g-c">
+              <span class="date [if-any arg0.escaped_body]below-more[else][end] activity" title="[arg0.date_tooltip]">[arg0.date_relative]</span>
+            </div>
+          </div>
+          <div class="g-unit">
+            <div class="g-c" style="padding-right:1em">
+              <span class="highlight-column">
+                [is arg0.highlight "project"]
+                <a href="/p/[arg0.project_name]/" title="[arg0.project_name]">[arg0.project_name]</a>
+                [else][is arg0.highlight "user"]
+                <a href="[arg0.user.profile_url]" title="[arg0.user.display_name]">[arg0.user.display_name]</a>
+                [end][end]
+              </span>
+            </div>
+          </div>
+        </div>
+        [else]
+        <span class="date [if-any arg0.escaped_body]below-more[end] activity" title="[arg0.date_tooltip]">[arg0.date_relative]</span>
+        [end]
+      </div>
+    </div>
+    <div class="g-unit">
+      <div class="g-c">
+        <span class="content">
+          [# SECURITY: OK to use "raw" here because escaped_title was preprocessed through the template engine.]
+          <span class="title">[format "raw"][arg0.escaped_title][end]</span>
+          [if-any arg0.escaped_body]
+          <span class="details-inline" style="margin-left:.5em">
+            [# SECURITY: OK to use "raw" here because escaped_body was preprocessed through the template engine.]
+            - [format "raw"][arg0.escaped_body][end]
+          </span>
+          <div class="details-wrapper">
+            [# SECURITY: OK to use "raw" here because escaped_body was preprocessed through the template engine.]
+            <div class="details">[format "raw"][arg0.escaped_body][end]</div>
+          </div>
+          [end]
+        </span>
+      </div>
+    </div>
+  </div>
+</li>
+[define even][is even "Yes"]No[else]Yes[end][end]
diff --git a/templates/features/updates-issue-link.ezt b/templates/features/updates-issue-link.ezt
new file mode 100644
index 0000000..d3b6a95
--- /dev/null
+++ b/templates/features/updates-issue-link.ezt
@@ -0,0 +1,5 @@
+<a class="ot-issue-link"
+   [# Go to the first comment with the correct timestamp. That's usually right, and close
+      even in cases where it is wrong.  It avoids exposing a DB ID.]
+   href="/p/[issue.project_name]/issues/detail?id=[issue.local_id][if-any issue_change_id]#c_ts[issue_change_id][end]"
+   >issue [issue.local_id]</a>
diff --git a/templates/features/updates-issueupdate-body.ezt b/templates/features/updates-issueupdate-body.ezt
new file mode 100644
index 0000000..5d0f683
--- /dev/null
+++ b/templates/features/updates-issueupdate-body.ezt
@@ -0,0 +1,16 @@
+[# Format the body of one issue update in the activities list.]
+
+<span class="ot-issue-comment">
+  [for comment.text_runs][include "../tracker/render-rich-text.ezt" comment.text_runs][end]
+</span>
+
+[if-any comment.amendments]
+  <div class="ot-issue-fields">
+    [for comment.amendments]
+      <div class="ot-issue-field-wrapper">
+       <span class="ot-issue-field-name">[comment.amendments.field_name]: </span>
+       <span class="ot-issue-field-value">[comment.amendments.newvalue]</span>
+      </div>
+    [end]
+  </div>
+[end]
diff --git a/templates/features/updates-issueupdate-title.ezt b/templates/features/updates-issueupdate-title.ezt
new file mode 100644
index 0000000..1475df9
--- /dev/null
+++ b/templates/features/updates-issueupdate-title.ezt
@@ -0,0 +1,28 @@
+[# Pre-render the title of an activity for an issue update.]
+
+[include "updates-issue-link.ezt"]
+([issue.short_summary])
+
+[define field_changed][end]
+[define multiple_fields_changed][end]
+[for comment.amendments]
+  [if-any field_changed]
+    [define multiple_fields_changed]True[end]
+  [else]
+    [define field_changed][comment.amendments.field_name][end]
+  [end]
+[end]
+
+[if-any issue_change_id]
+  [if-any multiple_fields_changed]
+    changed
+  [else][if-any field_changed]
+    [field_changed] changed
+  [else]
+    commented on
+  [end][end]
+[else]
+  reported
+[end]
+
+[include "updates-ending.ezt"]
diff --git a/templates/features/updates-newproject-body.ezt b/templates/features/updates-newproject-body.ezt
new file mode 100644
index 0000000..2d0feb0
--- /dev/null
+++ b/templates/features/updates-newproject-body.ezt
@@ -0,0 +1 @@
+<span class="ot-project-summary">[project_summary]</span>
diff --git a/templates/features/updates-page.ezt b/templates/features/updates-page.ezt
new file mode 100644
index 0000000..e5306f3
--- /dev/null
+++ b/templates/features/updates-page.ezt
@@ -0,0 +1,177 @@
+[define title]Updates[end]
+[if-any updates_data]
+
+[define even]Yes[end]
+
+<div id="colcontrol">
+<div class="list">
+    <table style="width: 100%;" cellspacing="0" cellpadding="0">
+     <tbody><tr>
+     <td style="text-align: left;">
+       Details:
+       <a id="detailsshow" href="#" class="showAll">Show all</a>
+       <a id="detailshide" href="#" class="hideAll">Hide all</a></td>
+     <td>
+     [include "../framework/artifact-list-pagination-part.ezt"]
+     </td>
+     </tr>
+     </tbody>
+    </table>
+  </div>
+
+  <table cellspacing="0" cellpadding="0" border="0" width="100%" id="resultstable" class="results" style="table-layout:fixed; width:100%">
+  <tbody>
+  <tr>
+  <td style="padding:0px" width="100%">
+
+  <div id='activity-streams-list' class='activity-stream-list'>
+    [if-any updates_data.today]
+      <h4>Today</h4>
+      <ul class='activity-stream'>
+      [for updates_data.today]
+        [include "updates-entry-part.ezt" updates_data.today]
+      [end]
+      </ul>
+    [end]
+
+    [if-any updates_data.yesterday]
+      <h4>Yesterday</h4>
+      <ul class='activity-stream'>
+      [for updates_data.yesterday]
+        [include "updates-entry-part.ezt" updates_data.yesterday]
+      [end]
+      </ul>
+    [end]
+
+    [if-any updates_data.pastweek]
+      <h4>Last 7 days</h4>
+      <ul class='activity-stream'>
+      [for updates_data.pastweek]
+        [include "updates-entry-part.ezt" updates_data.pastweek]
+      [end]
+      </ul>
+    [end]
+
+    [if-any updates_data.pastmonth]
+      <h4>Last 30 days</h4>
+      <ul class='activity-stream'>
+      [for updates_data.pastmonth]
+        [include "updates-entry-part.ezt" updates_data.pastmonth]
+      [end]
+      </ul>
+    [end]
+
+    [if-any updates_data.thisyear]
+      <h4>Earlier this year</h4>
+      <ul class='activity-stream'>
+      [for updates_data.thisyear]
+        [include "updates-entry-part.ezt" updates_data.thisyear]
+      [end]
+      </ul>
+    [end]
+
+    [if-any updates_data.older]
+      <h4>Older</h4>
+      <ul class='activity-stream'>
+      [for updates_data.older]
+        [include "updates-entry-part.ezt" updates_data.older]
+      [end]
+      </ul>
+    [end]
+  </div>
+
+  </td></tr></tbody></table>
+
+  <div class="list-foot">
+    [include "../framework/artifact-list-pagination-part.ezt"]
+  </div>
+</div>
+
+[else]
+
+  [if-any no_stars]
+    [is user_updates_tab_mode "st2"]
+      <div class="display-error">There are no starred projects.</div>
+    [else][is user_updates_tab_mode "st3"]
+      <div class="display-error">There are no starred developers.</div>
+    [end][end]
+  [else][if-any no_activities]
+    <div class="display-error">There are no updates yet.</div>
+  [end][end]
+
+[end]
+
+[if-any updates_data]
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+
+  /**
+   * Shows the activity detail for the particular activity selected.
+   */
+  function handleActivityLinkClick(e) {
+    var targetEl;
+
+    if (!e) {
+      var e = window.event;
+    }
+    if (e.target) {
+      targetEl = e.target;
+
+    } else if (e.srcElement) {
+      targetEl = e.srcElement;
+    }
+    if (targetEl.nodeType == 3) {
+      targetEl = targetEl.parentNode;
+    }
+
+    while (targetEl.tagName.toLowerCase() != 'li') {
+      targetEl = targetEl.parentNode;
+    }
+    if (targetEl.className.indexOf('click') != -1) {
+      targetEl.className = targetEl.className.replace(/click/, '');
+    } else {
+      targetEl.className += ' click';
+    }
+
+    e.preventDefault();
+  }
+
+  /**
+   * Array of <li> elements for activity streams
+   */
+  var _CS_asElemList = document.getElementById('activity-streams-list').
+      getElementsByTagName('li');
+
+  /**
+   * Shows all activity details
+   */
+  function expandAll(event) {
+    for (var i=0; i < _CS_asElemList.length; i++) {
+      _CS_asElemList[[]i].className = 'click';
+    }
+    event.preventDefault();
+  }
+
+  /**
+   * Hides all activity details
+   */
+  function closeAll(event) {
+    for (var i=0; i < _CS_asElemList.length; i++) {
+      _CS_asElemList[[]i].className = '';
+    }
+    event.preventDefault();
+  }
+
+  if ($("detailsshow"))
+    $("detailsshow").addEventListener("click", expandAll);
+  if ($("detailshide"))
+    $("detailshide").addEventListener("click", closeAll);
+
+  var activityLinks = document.getElementsByClassName("activity");
+  for (var i = 0; i < activityLinks.length; ++i) {
+    var link = activityLinks[[]i];
+    link.addEventListener("click", handleActivityLinkClick);
+  }
+});
+</script>
+[end]
diff --git a/templates/features/updates-profile-link.ezt b/templates/features/updates-profile-link.ezt
new file mode 100644
index 0000000..722dbae
--- /dev/null
+++ b/templates/features/updates-profile-link.ezt
@@ -0,0 +1 @@
+<a class="ot-profile-link-[arg0]" href="[user_profile_url]">[user_display_name]</a>
diff --git a/templates/features/updates-project-link.ezt b/templates/features/updates-project-link.ezt
new file mode 100644
index 0000000..b1a0ec2
--- /dev/null
+++ b/templates/features/updates-project-link.ezt
@@ -0,0 +1 @@
+<a class="ot-project-link-[arg0]" href="/p/[project.project_name]/">[project.project_name]</a>
diff --git a/templates/features/updates-staractivity-body.ezt b/templates/features/updates-staractivity-body.ezt
new file mode 100644
index 0000000..a016c4d
--- /dev/null
+++ b/templates/features/updates-staractivity-body.ezt
@@ -0,0 +1 @@
+[# Placeholder for star activity]
diff --git a/templates/features/updates-staractivity-title.ezt b/templates/features/updates-staractivity-title.ezt
new file mode 100644
index 0000000..93673ad
--- /dev/null
+++ b/templates/features/updates-staractivity-title.ezt
@@ -0,0 +1,5 @@
+[is scope "projects"]
+[is starred "yes"]Starred[else]Unstarred[end] project [include "updates-project-link.ezt" "1"]
+[else][is scope "users"]
+[is starred "yes"]Starred[else]Unstarred[end] <a class="ot-profile-link-1" href="[starred_user_profile_url]">[starred_user_display_name]</a>
+[end][end]
diff --git a/templates/features/user-hotlists.ezt b/templates/features/user-hotlists.ezt
new file mode 100644
index 0000000..438e7b1
--- /dev/null
+++ b/templates/features/user-hotlists.ezt
@@ -0,0 +1,130 @@
+[define title][if-any viewing_self]My[else][viewed_user_display_name][end] hotlists[end]
+[define category_css]css/ph_detail.css[end]
+
+[include "../framework/header.ezt" "showusertabs" "t5"]
+
+
+<h3>Hotlists</h3>
+
+<div class="section">
+
+  <div class="closed">
+    <div>Hotlists allow you to group and rank issues independently of projects and with other users.</div><br>
+    [if-any viewing_self]
+    <div>
+      <a href="/hosting/createHotlist" title="Create a new hotlist">
+        <input type="button" class="primary" value="Create hotlist">
+      </a>
+    </div><br>
+    [end]
+
+    <div class="list">
+      <table style="width:100%;" cellspacing="0" cellpadding="0">
+        <tr>
+          <th style="text-align:left;">Hotlists</th>
+        </tr>
+      </table>
+    </div>
+    <table cellspacing="0" cellpadding="2" border="0" class="results striped" width="100%">
+      <tr id="headingrow">
+        [if-any logged_in_user]<th style="white-space:nowrap; width:3%;">&nbsp;</th>[end]
+        <th style="white-space:nowrap; width:15%;">Role</th>
+        <th style="white-space:nowrap; width:25%">Hotlist</th>
+        <th style="white-space:nowrap; width:10%;">Issues</th>
+        <th style="white-space:nowrap; width:[if-any viewing_self]50[else]47[end]%;">Summary</th>
+      </tr>
+    [if-any owner_of_hotlists editor_of_hotlists]
+      [for owner_of_hotlists]
+        <tr data-url="[owner_of_hotlists.url]">
+          [if-any logged_in_user]
+            <td class="rowwidgets">
+              <a class="star"
+                 style="color:[if-any owner_of_hotlists.is_starred]cornflowerblue[else]gray[end]"
+                 title="[if-any owner_of_hotlists.is_starred]Un-s][else]S[end]tar this hotlist"
+                 data-hotlist-id="[owner_of_hotlists.hotlist_id]">
+             [if-any owner_of_hotlists.is_starred]&#9733;[else]&#9734;[end]
+              </a>
+            </td>
+          [end]
+          <td>Owner</td>
+          <td class="id" name="owner">
+            <a href="[owner_of_hotlists.url]">[owner_of_hotlists.name]</a></td>
+          <td>[owner_of_hotlists.num_issues]</td>
+          <td>[owner_of_hotlists.summary]</td>
+        </tr>
+      [end]
+      [for editor_of_hotlists]
+        <tr data-url="[editor_of_hotlists.url]">
+          [if-any logged_in_user]
+            <td class="rowwidgets">
+              <a class="star"
+                 style="color:[if-any editor_of_hotlists.is_starred]cornflowerblue[else]gray[end]"
+                 title="[if-any editor_of_hotlists.is_starred]Un-s][else]S[end]tar this hotlist"
+                 data-hotlist-id="[editor_of_hotlists.hotlist_id]">
+             [if-any editor_of_hotlists.is_starred]&#9733;[else]&#9734;[end]
+            </td>
+          [end]
+          <td>Editor</td>
+          <td class="id" name="editor">
+            <a href="[editor_of_hotlists.url]">[editor_of_hotlists.name]</a></td>
+          <td>[editor_of_hotlists.num_issues]</td>
+          <td>[editor_of_hotlists.summary]</td>
+        </tr>
+      [end]
+    [else]
+      <td colspan="4"><i>No hotlists.</i></td>
+    [end]
+    </table>
+    [if-any starred_hotlists]
+      <div class="list">
+        <table style="width:100%;" cellspacing="0" cellpadding="0">
+          <tr>
+            <th style="text-align:left;">Hotlists starred by [if-any viewing_self]you[else][viewed_user_display_name][end]</th>
+          </tr>
+        </table>
+      </div>
+      <table cellspacing="0" cellpadding="2" border="0" class="results striped" width="100%">
+        <tr>
+          <th style="white-space:nowrap; width:3%;">&nbsp;</th>
+          <th style="white-space:nowrap; width:30%;">Hotlist</th>
+          <th style="white-space:nowrap; width:10%;">Issues</th>
+          <th style="white-space:nowrap; width:57%;">Summary</th>
+        </tr>
+        [for starred_hotlists]
+          <tr data-url="[starred_hotlists.url]">
+            <td class="rowwidgets">
+              <a class="star"
+                 style="color:[if-any starred_hotlists.is_starred]cornflowerblue[else]gray[end]"
+                 title="[if-any starred_hotlists.is_starred]Un-s][else]S[end]tar this hotlist"
+                 data-hotlist-id="[starred_hotlists.hotlist_id]">
+             [if-any starred_hotlists.is_starred]&#9733;[else]&#9734;[end]
+            </td>
+            <td class="id" name="follower">
+              <a href="[starred_hotlists.url]">[starred_hotlists.name]</a></td>
+            </td>
+            <td>[starred_hotlists.num_issues]</td>
+            <td>[starred_hotlists.summary]</td>
+          </tr>
+        [end]
+      </table>
+    [end]
+
+  </div>
+</div>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+
+ var stars = document.getElementsByClassName("star");
+  for (var i = 0; i < stars.length; ++i) {
+    var star = stars[[]i];
+    star.addEventListener("click", function (event) {
+        var hotlistID = event.target.getAttribute("data-hotlist-id");
+        _TKR_toggleStar(event.target, null, null, null, hotlistID);
+    });
+  }
+
+});
+</script>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/framework/admin-email-sender-part.ezt b/templates/framework/admin-email-sender-part.ezt
new file mode 100644
index 0000000..783a87f
--- /dev/null
+++ b/templates/framework/admin-email-sender-part.ezt
@@ -0,0 +1,15 @@
+[if-any project_is_restricted]
+<p style="width:35em; border: 1px solid #933; padding: 3px">
+  <b style="color:#933">Important</b>: Access to this project is restricted, so
+  please do not specify a public mailing list address for all notifications.
+  Use only private mailing lists to avoid unwanted disclosures.  If you make
+  your project public later, choose a new mailing list at that time.
+</p>
+[end]
+
+<p>
+    Notifications will be sent from:
+    <tt>[email_from_addr]</tt><br>
+    You may need to add this address as an allowed poster to your mailing list.<br>
+    If using Google Groups, add the address directly with no email delivery.
+</p>
diff --git a/templates/framework/alert.ezt b/templates/framework/alert.ezt
new file mode 100644
index 0000000..45a61aa
--- /dev/null
+++ b/templates/framework/alert.ezt
@@ -0,0 +1,35 @@
+  <table id="alert-table" align="center" border="0" cellspacing="0" cellpadding="0" style="margin-bottom: 6px[if-any alerts.show][else];display: none[end]">
+   <tr><td class="notice" id="notice">
+     [if-any alerts.updated]
+      <a href="[project_home_url]/issues/detail?id=[alerts.updated]">Issue [alerts.updated]</a>
+      has been updated.
+     [end]
+
+     [if-any alerts.moved]
+       Issue has been moved to
+       <a href="/p/[alerts.moved_to_project]/issues/detail?id=[alerts.moved_to_id]">
+         [alerts.moved_to_project]:[alerts.moved_to_id]
+      </a>
+     [end]
+
+     [if-any alerts.copied]
+       <a href="[project_home_url]/issues/detail?id=[alerts.copied_from_id]">Issue [alerts.copied_from_id]</a>
+       has been copied to
+       <a href="/p/[alerts.copied_to_project]/issues/detail?id=[alerts.copied_to_id]">
+         [alerts.copied_to_project]:[alerts.copied_to_id]
+      </a>
+     [end]
+
+     [if-any alerts.saved]
+      Changes have been saved
+     [end]
+
+     [if-any alerts.deleted]
+      [is alerts.deleted "1"]
+       Item deleted
+      [else]
+       [alerts.deleted] items deleted
+      [end]
+     [end]
+   </td></tr>
+  </table>
diff --git a/templates/framework/artifact-collision-page.ezt b/templates/framework/artifact-collision-page.ezt
new file mode 100644
index 0000000..0c34479
--- /dev/null
+++ b/templates/framework/artifact-collision-page.ezt
@@ -0,0 +1,30 @@
+[include "../framework/header.ezt" "showtabs"]
+
+[# Note: No need for UI element permission checking here. ]
+
+<h3>Update Collision</h3>
+
+<h4>What happened?</h4>
+
+<p>While you were viewing or updating [artifact_name], another user
+submitted an update to it.  That user's update has already
+taken effect.  Your update cannot be saved because your changes could
+overwrite the other user's changes.</p>
+
+<p>Note: if you have been viewing and updating [artifact_name] in multiple
+browser windows or tabs, it is possible that the "other user" is
+actually yourself.</p>
+
+
+<div style="margin:2em" class="help">
+  <b style="margin:0.5em">Your options:</b>
+
+  <ul>
+   <li>Start over: view the up-to-date
+   <a href="[artifact_detail_url]">[artifact_name]</a>
+   and consider making your changes again.</li>
+  </ul>
+
+</div>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/framework/artifact-list-admin-part.ezt b/templates/framework/artifact-list-admin-part.ezt
new file mode 100644
index 0000000..e24a236
--- /dev/null
+++ b/templates/framework/artifact-list-admin-part.ezt
@@ -0,0 +1,129 @@
+[# If any value is supplied for arg0, the user will also be able
+   to edit grid preferences.]
+<h4>[if-any arg0]List and grid preferences[else]List preferences[end]</h4>
+<div class="section">
+
+ <div class="closed">
+  <div>Default query for project members:
+   <a class="ifClosed toggleHidden" href="#"
+      style="font-size:90%; margin-left:.5em">Learn more</a>
+  </div>
+
+  <div id="colhelp" class="ifOpened help">
+      <div>
+       You may enter a default query for project members.  They will run
+       this query when they click on the "Issues" tab.
+      </div>
+  </div>
+  <br>
+ </div>
+
+ <input type="text" size="75" name="member_default_query"
+        value="[config.member_default_query]" id="searchq"
+        [if-any perms.EditProject][else]readonly="readonly"[end]
+        class="acob" style="margin-left:.7em">
+ <br>
+ <br>
+ <br>
+
+ <div class="closed">
+  <div>Default columns shown in list view:
+   <a class="ifClosed toggleHidden" href="#"
+      style="font-size:90%; margin-left:.5em">Learn more</a>
+  </div>
+
+  <div id="colhelp" class="ifOpened help">
+      <div>
+       You may enter a series of column names separated by spaces.  The
+       columns will be displayed in order on the list view page.
+      </div>
+      <br>
+      <div>
+       Columns may be the names of built-in attributes, e.g., "Summary"
+       or "Stars". Columns may also be prefixes of the labels on items.
+       To experiment with label prefixes, label some items with
+       Key-Value labels, then click the "..." menu in the far upper right
+       heading of the list view.
+      </div>
+  </div>
+  <br>
+ </div>
+
+ <input type="text" size="75" name="default_col_spec" value="[config.default_col_spec]"
+        [if-any perms.EditProject][else]readonly="readonly"[end]
+        class="acob" style="margin-left:.7em">
+ <br>
+ <br>
+ <br>
+
+ <div class="closed">
+  <div>Default sorting order:
+   <a class="ifClosed toggleHidden" href="#"
+      style="font-size:90%; margin-left:.7em">Learn more</a>
+  </div>
+
+  <div class="ifOpened help">
+      <div>
+       You may enter a series of column names separated by spaces.  Items
+       will be sorted by the first column specified.  If two items have
+       the same value in the first column, the items' values in the second
+       column will be used to break the tie, and so on. Use a leading
+       minus-sign to reverse the sort order within a column.
+      </div>
+      <br>
+      <div>
+       To experiment with column sorting, click the list view header cells and
+       choose "Sort up" or "Sort down". The sorting specification used becomes
+       part of the page URL.
+      </div>
+  </div>
+  <br>
+ </div>
+
+ <input type="text" size="75" name="default_sort_spec" value="[config.default_sort_spec]"
+        [if-any perms.EditProject][else]readonly="readonly"[end]
+        class="acob" style="margin-left:.7em">
+
+
+ [if-any arg0]
+ <br>
+ <br>
+ <br>
+
+ <div class="closed">
+  <div>Default grid axes:
+   <a class="ifClosed toggleHidden" href="#"
+      style="font-size:90%; margin-left:.7em">Learn more</a>
+  </div>
+
+  <div class="ifOpened help">
+      <div>
+       You may enter one attribute name for the default grid rows and one for
+       the default grid columns.  For example, "milestone" and "priority".  Or,
+       you may leave each field blank.
+      </div>
+      <br>
+      <div>
+       To experiment with grid axes, click the "grid" link in the list view and
+       use the drop-down menus to select row and column attributes.
+      </div>
+  </div>
+  <br>
+ </div>
+
+ <span style="margin-left:.7em">
+   Rows: <input type="text" size="10" name="default_y_attr" value="[config.default_y_attr]"
+                [if-any perms.EditProject][else]readonly="readonly"[end]
+                class="acob">
+ </span>
+
+ <span style="margin-left:.7em">
+   Columns: <input type="text" size="10" name="default_x_attr" value="[config.default_x_attr]"
+                   [if-any perms.EditProject][else]readonly="readonly"[end]
+                   class="acob">
+ </span>
+
+ [end]
+
+</div>
+
diff --git a/templates/framework/artifact-list-pagination-part.ezt b/templates/framework/artifact-list-pagination-part.ezt
new file mode 100644
index 0000000..8896c14
--- /dev/null
+++ b/templates/framework/artifact-list-pagination-part.ezt
@@ -0,0 +1,18 @@
+[if-any pagination]
+ [if-any pagination.visible]
+  <div class="pagination">
+   [if-any pagination.prev_url]
+     <a href="[pagination.prev_url]"><b>&lsaquo;</b> Prev</a>
+   [end]
+   [if-any pagination.start]
+     [pagination.start] - [pagination.last]
+   [end]
+   [if-any pagination.total_count]
+     of [pagination.total_count][if-any pagination.limit_reached]+[end]
+   [end]
+   [if-any pagination.next_url]
+     <a href="[pagination.next_url]">Next <b>&rsaquo;</b></a>
+   [end]
+  </div>
+ [end]
+[end]
diff --git a/templates/framework/banned-page.ezt b/templates/framework/banned-page.ezt
new file mode 100644
index 0000000..4b3effb
--- /dev/null
+++ b/templates/framework/banned-page.ezt
@@ -0,0 +1,31 @@
+[include "../framework/header.ezt" "hidetabs"]
+
+<h3>Access Not Allowed</h3>
+
+<h4>What happened?</h4>
+
+<p>
+[if-any is_plus_address]
+  We do not accept accounts with "+" in the email address.
+[else]
+  You are not allowed to access this service.
+[end]
+</p>
+
+<p>Please <a href="mailto:[feedback_email]">contact us</a> if you believe that you should be able to access this service. (This is a Google Group; what you write will be visible on the Internet.)</p>
+
+[# Note: we do not show the reason for being banned. ]
+
+
+<div style="margin:2em" class="help">
+  <b style="margin:0.5em">Your options:</b>
+
+  <ul>
+   <li>Participate in the open source community through other websites.</li>
+   <li><a href="[logout_url_goto_home]">Sign out</a> and access this site as
+     an anonymous user.</li>
+   <li><a href="mailto:[feedback_email]">Contact us</a> for further assistance.</li>
+  </ul>
+</div>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/framework/banner_message.ezt b/templates/framework/banner_message.ezt
new file mode 100644
index 0000000..fc31310
--- /dev/null
+++ b/templates/framework/banner_message.ezt
@@ -0,0 +1,8 @@
+[if-any site_banner_message]
+ <div style="font-weight:bold; color:var(--chops-field-error-color); padding:5px; margin-top:10px; text-align:center; background:var(--chops-orange-50);">
+  [site_banner_message]
+  [if-any banner_time]
+    <chops-timestamp timestamp="[banner_time]"></chops-timestamp>
+  [end]
+ </div>
+[end]
diff --git a/templates/framework/comment-pagination-part.ezt b/templates/framework/comment-pagination-part.ezt
new file mode 100644
index 0000000..6867c57
--- /dev/null
+++ b/templates/framework/comment-pagination-part.ezt
@@ -0,0 +1,8 @@
+[if-any cmnt_pagination.prev_url]
+  <a href="[cmnt_pagination.prev_url]" style="margin-right:.7em"><b>&lsaquo;</b> Newer</a>
+[end]
+Showing comments [cmnt_pagination.last] - [cmnt_pagination.start]
+[if-any cmnt_pagination.total_count]of [cmnt_pagination.total_count][end]
+[if-any cmnt_pagination.next_url]
+  <a href="[cmnt_pagination.next_url]" style="margin-left:.7em">Older <b>&rsaquo;</b></a>
+[end]
diff --git a/templates/framework/component-validation-row.ezt b/templates/framework/component-validation-row.ezt
new file mode 100644
index 0000000..5d37b84
--- /dev/null
+++ b/templates/framework/component-validation-row.ezt
@@ -0,0 +1,5 @@
+<tr>
+  <td colspan="3">
+    <div id="component_blocksubmitarea" class="blockingsubmit"><span id="component_blocksubmitmsg"></span></div>
+  </td>
+</tr>
diff --git a/templates/framework/database-maintenance.ezt b/templates/framework/database-maintenance.ezt
new file mode 100644
index 0000000..fe8d7b4
--- /dev/null
+++ b/templates/framework/database-maintenance.ezt
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <link rel="icon" type="image/vnd.microsoft.icon" href="/static/images/monorail.ico">
+  <title>This bug tracker is unavailable due to database issues.</title>
+  <meta name="ROBOTS" content="NOARCHIVE">
+  <link type="text/css" rel="stylesheet" href="/static/css/ph_core.css">
+</head>
+<body>
+  <h2>This bug tracker is currently unavailable due to database issues.</h2>
+  Please <a href="[requested_url]">try again</a> later.
+</body>
+</html>
diff --git a/templates/framework/debug.ezt b/templates/framework/debug.ezt
new file mode 100644
index 0000000..7903de5
--- /dev/null
+++ b/templates/framework/debug.ezt
@@ -0,0 +1,50 @@
+[is dbg "off"]
+ [if-any perms._ViewDebug]
+   <div class="debug">
+    - <a href="[debug_uri]">Reload w/ debug info</a>
+   </div>
+ [end]
+[else]
+   [# Note that this only handles the top two levels of (sub)phases.
+    # If you nest phases further than that (which we haven't wanted/needed to
+    # do so far), you'll have to modify this code in order to render it.]
+   <style type="text/css">
+    .debug, .debug a { color: #444; font-size: x-small}
+    .debug td, .debug th { background: #ddf}
+    .debug th { text-align: left; font-family: courier; font-size: small}
+   </style>
+
+   <div class="debug">Profile Data
+     <table class="ifOpened" cellpadding="2" cellspacing="2" border="0"  style="padding-left: 1em">
+       [for profiler.top_phase.subphases]
+        <tr>
+         <th style="white-space:nowrap">[profiler.top_phase.subphases.name]:</th>
+         <td align="right">[profiler.top_phase.subphases.ms][is profiler.top_phase.subphases.ms "in_progress"][else] ms[end]</td>
+         <td><table cellspacing="1" cellpadding="0"><tr>
+         [for profiler.top_phase.subphases.subphases]
+          <td title="[profiler.top_phase.subphases.subphases.name]: [profiler.top_phase.subphases.subphases.ms]ms"
+            width="[is profiler.top_phase.subphases.subphases.ms "in_progress"]100%[else][profiler.top_phase.subphases.subphases.ms][end]"
+            style="padding:2px;color:#fff;background:#[profiler.top_phase.subphases.subphases.color]">[profiler.top_phase.subphases.subphases.ms]</td>
+         [end]
+
+         [if-any profiler.top_phase.subphases.uncategorized_ms]
+           <td title="uncategorized: [profiler.top_phase.subphases.uncategorized_ms]ms"
+              width="[profiler.top_phase.subphases.uncategorized_ms]"
+              style="padding:1px">[profiler.top_phase.subphases.uncategorized_ms]</td>
+         [end]
+        </tr></table>
+         </td>
+        </tr>
+       [end]
+     </table>
+   </div><br>
+ [for debug]
+   <div class="debug">[debug.title]
+     <table cellpadding="2" cellspacing="2" border="0" style="padding-left: 1em">
+      [for debug.collection]
+       <tr><th>[debug.collection.key]</th><td>[debug.collection.val]</td></tr>
+      [end]
+     </table>
+   </div><br>
+ [end]
+[end]
diff --git a/templates/framework/display-project-logo.ezt b/templates/framework/display-project-logo.ezt
new file mode 100644
index 0000000..fd787c6
--- /dev/null
+++ b/templates/framework/display-project-logo.ezt
@@ -0,0 +1,29 @@
+[# This template displays the project logo with the file name and a View link.
+
+   arg0: Whether to display a checkbox to delete the logo.
+]
+
+<table cellspacing="5" cellpadding="2" border="0">
+  <tr>
+    <td>
+      <b>[logo_view.filename]</b>
+    </td>
+    <td>
+      <a href="[logo_view.viewurl]" target="_blank" style="margin-left:.2em">View</a>
+    </td>
+  </tr>
+  <tr>
+    <td colspan=2>
+      <a href="[logo_view.viewurl]" target="_blank">
+        <img src="[logo_view.thumbnail_url]" class="preview">
+      </a>
+    </td>
+  </tr>
+  [if-any arg0]
+    <tr>
+      <td colspan=2>
+        <input type="checkbox" name="delete_logo" id="delete_logo"> Delete this logo
+      </td>
+    </tr>
+  [end]
+</table>
diff --git a/templates/framework/excessive-activity-page.ezt b/templates/framework/excessive-activity-page.ezt
new file mode 100644
index 0000000..e7b10ad
--- /dev/null
+++ b/templates/framework/excessive-activity-page.ezt
@@ -0,0 +1,31 @@
+[include "../framework/header.ezt" "hidetabs"]
+
+<h3>Action Limit Exceeded</h3>
+
+<h4>What happened?</h4>
+
+<div style="width:60em">
+
+<p>You have performed the requested action too many times in a 24-hour
+time period.  Or, you have performed the requested action too many
+times since the creation of your account.</p>
+
+<p>We place limits on the number of actions that can be performed by
+each user in order to reduce the potential for abuse.  We feel that we have set
+these limits high enough that legitimate use will very rarely
+reach them.  Without these limits, a few abusive users could degrade
+the quality of this site for everyone.</p>
+
+
+<div style="margin:2em" class="help">
+  <b style="margin:0.5em">Your options:</b>
+
+  <ul>
+   <li>Wait 24 hours and then try this action again.</li>
+   <li>Ask another member of your project to perform the action for you.</li>
+   <li><a href="mailto:[feedback_email]">Contact us</a> for further assistance.</li>
+  </ul>
+</div>
+
+</div>
+[include "../framework/footer.ezt"]
diff --git a/templates/framework/file-content-js.ezt b/templates/framework/file-content-js.ezt
new file mode 100644
index 0000000..72e882e
--- /dev/null
+++ b/templates/framework/file-content-js.ezt
@@ -0,0 +1,89 @@
+[# TODO(jrobbins): move this into compiled javascript. ]
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  var numsGenState = {table_base_id: 'nums_table_'};
+  var srcGenState = {table_base_id: 'src_table_'};
+  var alignerRunning = false;
+  var startOver = false;
+
+  function setLineNumberHeights() {
+    if (alignerRunning) {
+      startOver = true;
+      return;
+    }
+    numsGenState.chunk_id = 0;
+    numsGenState.table = document.getElementById('nums_table_0');
+    numsGenState.row_num = 0;
+
+    if (!numsGenState.table) {
+      return;  // Silently exit if no file is present.
+    }
+
+    srcGenState.chunk_id = 0;
+    srcGenState.table = document.getElementById('src_table_0');
+    srcGenState.row_num = 0;
+
+    alignerRunning = true;
+    continueToSetLineNumberHeights();
+  }
+
+  function rowGenerator(genState) {
+    if (genState.row_num < genState.table.rows.length) {
+      var currentRow = genState.table.rows[[]genState.row_num];
+      genState.row_num++;
+      return currentRow;
+    }
+
+    var newTable = document.getElementById(
+        genState.table_base_id + (genState.chunk_id + 1));
+    if (newTable) {
+      genState.chunk_id++;
+      genState.row_num = 0;
+      genState.table = newTable;
+      return genState.table.rows[[]0];
+    }
+
+    return null;
+  }
+
+  var MAX_ROWS_PER_PASS = 1000;
+
+  function continueToSetLineNumberHeights() {
+    var rowsInThisPass = 0;
+    var numRow = 1;
+    var srcRow = 1;
+
+    while (numRow && srcRow && rowsInThisPass < MAX_ROWS_PER_PASS) {
+      numRow = rowGenerator(numsGenState);
+      srcRow = rowGenerator(srcGenState);
+      rowsInThisPass++;
+
+      if (numRow && srcRow) {
+        if (numRow.offsetHeight != srcRow.offsetHeight) {
+          numRow.firstChild.style.height = srcRow.offsetHeight + 'px';
+        }
+      }
+    }
+
+    if (rowsInThisPass >= MAX_ROWS_PER_PASS) {
+      setTimeout(continueToSetLineNumberHeights, 10);
+    } else {
+      alignerRunning = false;
+      if (startOver) {
+        startOver = false;
+        setTimeout(setLineNumberHeights, 500);
+      }
+    }
+
+  }
+
+  function initLineNumberHeights() {
+    // Do 2 complete passes, because there can be races
+    // between this code and prettify.
+    startOver = true;
+    setTimeout(setLineNumberHeights, 250);
+    window.addEventListener('resize', setLineNumberHeights);
+  }
+  initLineNumberHeights();
+});
+</script>
diff --git a/templates/framework/file-content-part.ezt b/templates/framework/file-content-part.ezt
new file mode 100644
index 0000000..5a89915
--- /dev/null
+++ b/templates/framework/file-content-part.ezt
@@ -0,0 +1,46 @@
+[# Safely display user-content text, such a program source code, with
+   line numbers.
+
+Other EZT variables used:
+  file_lines: List of lines in the file, each with a line number and content.
+  should_prettify: whether the text should be syntax highlighted.
+  prettify_class: additional CSS class used to tell prettify.js how to
+      best syntax highlight this source file.
+]
+
+[# Display the line numbers and source lines in separate columns.
+   See corresponding comments L1, L2, L3 and S1, S2, S3 below.
+   This is messy because the pre tags have significant whitespace, so we
+   break lines inside the tags themslves to make our templates readable.]
+<table class="opened"><tr>
+<td id="nums">
+[# L1. Start with a nocursor row at the top to space the line numbers down the
+       same amount as the source code lines w/ their initial cursor_hidden row.]
+<pre><table width="100%"><tr class="nocursor"><td></td></tr></table></pre>
+
+[# L2. Display each line number in a row that we can refer
+       to by ID, and make each line number a self-link w/ anchor.]
+<pre><table width="100%" id="nums_table_0">[for file_lines]<tr id="gr_[file_lines.num]"
+><td id="[file_lines.num]"><a href="#[file_lines.num]">[file_lines.num]</a></td></tr
+>[end]</table></pre>
+
+[# L3. Finish the line numbers column with another nocursor row to match
+       the spacing of the source code column's final cursor_hidden row.]
+<pre><table width="100%"><tr class="nocursor"><td></td></tr></table></pre>
+</td>
+<td id="lines">
+
+[# S1. Start the source code column with a cursor row. ]
+<pre><table width="100%"><tr class="cursor_stop cursor_hidden"><td></td></tr></table></pre>
+
+[# S2. Display each source code line in a table row and cell
+       that we can identify by id.]
+<pre [if-any should_prettify]class="prettyprint [prettify_class]"[end]><table id="src_table_0">[for file_lines]<tr
+id=sl_[file_lines.num]
+><td class="source">[file_lines.line]<br></td></tr
+>[end]</table></pre>
+
+[# S3. Finish the line numbers column with another cursor stop.]
+<pre><table width="100%"><tr class="cursor_stop cursor_hidden"><td></td></tr></table></pre>
+</td>
+</tr></table>
diff --git a/templates/framework/filter-rule-admin-part.ezt b/templates/framework/filter-rule-admin-part.ezt
new file mode 100644
index 0000000..4822265
--- /dev/null
+++ b/templates/framework/filter-rule-admin-part.ezt
@@ -0,0 +1,155 @@
+<style>
+  #rules th, #rules td {  padding-bottom: 1em }
+</style>
+
+[# If any value is supplied for arg0, the user will be able to set actions
+   that set default owner, set default status, and add CC users.]
+<h4 id="filters">Filter rules</h4>
+<div class="section">
+
+ <div class="closed">
+  <div>Filter rules can help you fill in defaults and stay organized.
+   <a class="ifClosed toggleHidden" href="#"
+      style="font-size:90%; margin-left:.5em">Learn more</a>
+  </div>
+
+  <div id="filterhelp" class="ifOpened help">
+       Filter rules can help your team triage issues by automatically
+       filling in default values based on other values.  They can be used
+       in the same way that you might use message filters in an email client.
+       Filter rules are evaluated after each edit, not just on new items. And,
+       filter rules only add values or set default values, they never override
+       values that were explicitly set by a user.<br>
+       <br>
+       Note that exclusive prefixes still apply.  So, if a user has set a label
+       with one of the exclusive prefixes, a rule that adds another label with
+       the same prefix will have no effect.
+  </div>
+  <br>
+
+  <table border="0" id="rules">
+   <tr>
+    <th></th>
+    <th style="text-align:left">If the issue matches this query:</th>
+    <th colspan="2" style="text-align:left">Then, [if-any arg0]do the following[else]add these labels[end]:</th>
+    <th></th>
+   </tr>
+
+   [for rules]
+   <tr>
+    <td style="text-align:right" width="20">[rules.idx].</td>
+    <td><input type="text" name="predicate[rules.idx]" size="60" value="[rules.predicate]"
+               autocomplete="off" id="predicate_existing_[rules.idx]" class="acob"></td>
+    <td>
+      [if-any arg0]
+       <select name="action_type[rules.idx]">
+         <option value="" disabled="disabled" [is rules.action_type ""]selected="selected"[end]>Choose...</option>
+         <option value="default_status" [is rules.action_type "default_status"]selected="selected"[end]>Set default status:</option>
+         <option value="default_owner" [is rules.action_type "default_owner"]selected="selected"[end]>Set default owner:</option>
+         <option value="add_ccs" [is rules.action_type "add_ccs"]selected="selected"[end]>Add Cc:</option>
+         <option value="add_labels" [is rules.action_type "add_labels"]selected="selected"[end]>Add labels:</option>
+         <option value="also_notify" [is rules.action_type "also_notify"]selected="selected"[end]>Also notify email:</option>
+         <option value="warning" [is rules.action_type "warning"]selected="selected"[end]>Show warning:</option>
+       </select>
+      [end]
+    </td>
+    <td>
+      <input type="text" name="action_value[rules.idx]" size="70" value="[rules.action_value]" class="acob">
+    </td>
+    <td></td>
+   </tr>
+   [end]
+
+   [for new_rule_indexes]
+   <tr id="newrow[new_rule_indexes]" [if-index new_rule_indexes first][else]style="display:none"[end]>
+    <td style="text-align:right" width="20">[new_rule_indexes].</td>
+    <td><input type="text" name="new_predicate[new_rule_indexes]" size="60" value=""
+               class="showNextRuleRow acob" data-index="[new_rule_indexes]"
+               autocomplete="off" id="predicate_new_[new_rule_indexes]"></td>
+    <td>
+      [if-any arg0]
+       <select name="new_action_type[new_rule_indexes]">
+         <option value="" disabled="disabled" selected="selected">Choose...</option>
+         <option value="default_status">Set default status:</option>
+         <option value="default_owner">Set default owner:</option>
+         <option value="add_ccs">Add Cc:</option>
+         <option value="add_labels">Add labels:</option>
+         <option value="also_notify">Also notify email:</option>
+         <option value="warning">Show warning:</option>
+       </select>
+      [end]
+    </td>
+    <td>
+      <input type="text" name="new_action_value[new_rule_indexes]" size="70" value="" class="acob">
+      [# TODO(jrobbins): figure out a way to display error messages on each rule. ]
+    </td>
+    <td width="40px">
+     [if-index new_rule_indexes last][else]
+      <span id="addrow[new_rule_indexes]" class="fakelink" class="fakelink" data-index="[new_rule_indexes]">Add a row</span
+     [end]
+    </td>
+   </tr>
+   [end]
+
+  </table>
+ </div>
+
+ [if-any errors.rules]
+  [for errors.rules]
+    <div class="fielderror">[errors.rules]</div>
+  [end]
+  <script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+   document.location.hash = 'filters';
+});
+  </script>
+ [end]
+
+</div>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  function showNextRuleRow(i) {
+   if (i < [max_rules]) {
+     _showID('newrow' + (i + 1));
+     _hideID('addrow' + i);
+   }
+  }
+
+  var addARowLinks = document.getElementsByClassName("fakelink");
+  for (var i = 0; i < addARowLinks.length; ++i) {
+    var link = addARowLinks[[]i];
+    link.addEventListener("click", function(event) {
+        var index = Number(event.target.getAttribute("data-index"));
+        showNextRuleRow(index);
+    });
+  }
+
+  var typeToAddARow = document.getElementsByClassName("showNextRuleRow");
+  for (var i = 0; i < typeToAddARow.length; ++i) {
+    var el = typeToAddARow[[]i];
+    el.addEventListener("keydown", function(event) {
+        var index = Number(event.target.getAttribute("data-index"));
+        showNextRuleRow(index);
+    });
+  }
+
+  var acobElements = document.getElementsByClassName("acob");
+  for (var i = 0; i < acobElements.length; ++i) {
+     var el = acobElements[[]i];
+     el.addEventListener("focus", function(event) {
+         _acrob(null);
+         _acof(event);
+     });
+  }
+
+  var acobElements = document.getElementsByClassName("acob");
+  for (var i = 0; i < acobElements.length; ++i) {
+     var el = acobElements[[]i];
+     el.addEventListener("focus", function(event) {
+         _acrob(null);
+         _acof(event);
+     });
+  }
+});
+</script>
diff --git a/templates/framework/footer-script.ezt b/templates/framework/footer-script.ezt
new file mode 100644
index 0000000..5e338ea
--- /dev/null
+++ b/templates/framework/footer-script.ezt
@@ -0,0 +1,34 @@
+[# The order of imports matters in this file. Scripts are imported after other scripts they depend on.]
+
+<script type="text/javascript" defer src="[version_base]/static/js/graveyard/common.js" nonce="[nonce]"></script>
+<script type="text/javascript" defer src="[version_base]/static/js/graveyard/listen.js" nonce="[nonce]"></script>
+<script type="text/javascript" defer src="[version_base]/static/js/graveyard/xmlhttp.js" nonce="[nonce]"></script>
+<script type="text/javascript" defer src="[version_base]/static/js/graveyard/shapes.js" nonce="[nonce]"></script>
+<script type="text/javascript" defer src="[version_base]/static/js/graveyard/geom.js" nonce="[nonce]"></script>
+<script type="text/javascript" defer src="[version_base]/static/js/graveyard/popup_controller.js" nonce="[nonce]"></script>
+
+[if-any is_ezt]
+  [# Note that this file will be requested twice on some pages, but chrome is smart enough
+    to not even request it the second time.]
+  <script type="text/javascript" defer src="[version_base]/static/js/framework/framework-ajax.js" nonce="[nonce]"></script>
+
+  <script type="text/javascript" defer src="[version_base]/static/js/tracker/externs.js" nonce="[nonce]"></script>
+[end]
+<script type="text/javascript" defer src="[version_base]/static/js/tracker/ac.js" nonce="[nonce]"></script>
+<script type="text/javascript" defer src="[version_base]/static/js/tracker/tracker-ac.js" nonce="[nonce]"></script>
+<script type="text/javascript" defer src="[version_base]/static/js/tracker/tracker-install-ac.js" nonce="[nonce]"></script>
+[if-any is_ezt]
+  <script type="text/javascript" defer src="[version_base]/static/js/tracker/tracker-components.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/tracker/tracker-dd.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/tracker/tracker-display.js" nonce="[nonce]"></script>
+[end]
+<script type="text/javascript" defer src="[version_base]/static/js/tracker/tracker-editing.js" nonce="[nonce]"></script>
+[if-any is_ezt]
+  <script type="text/javascript" defer src="[version_base]/static/js/tracker/tracker-fields.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/tracker/tracker-keystrokes.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/tracker/tracker-nav.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/tracker/tracker-update-issues-hotlists.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/tracker/tracker-util.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/tracker/tracker-onload.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/framework/clientmon.js" nonce="[nonce]"></script>
+[end]
diff --git a/templates/framework/footer-shared.ezt b/templates/framework/footer-shared.ezt
new file mode 100644
index 0000000..9630e4c
--- /dev/null
+++ b/templates/framework/footer-shared.ezt
@@ -0,0 +1,107 @@
+[# This template displays the part of the footer used by both web components and EZT pages. ]
+
+<div id="footer">
+  [if-any old_ui_url]
+    <a href="[old_ui_url]">
+      View in the old UI
+    </a>
+  [else][if-any new_ui_url]
+    <a href="[new_ui_url]">
+      View in the new UI
+    </a>
+  [end][end]
+  [is projectname "fuchsia"]
+    <a href="https://bugs.fuchsia.dev/p/fuchsia/issues/entry?template=Report+Community+Abuse" title="Monorail [app_version]">Report Abuse</a>
+  [end]
+  <a href="https://bugs.chromium.org/p/monorail/adminIntro" title="Monorail [app_version]">About Monorail</a>
+  <a href="https://chromium.googlesource.com/infra/infra/+/main/appengine/monorail/doc/userguide/README.md">User Guide</a>
+  <a href="https://chromium.googlesource.com/infra/infra/+/main/appengine/monorail/doc/release-notes.md">Release Notes</a>
+  <a href="https://bugs.chromium.org/p/monorail/issues/entry?template=Online%20Feedback" target="_blank">Feedback on Monorail</a>
+  <a href="https://chromium.googlesource.com/infra/infra/+/main/appengine/monorail/doc/terms.md">Terms</a>
+  <a href="https://www.google.com/policies/privacy/">Privacy</a>
+</div>
+
+[include "debug.ezt"]
+
+[include "../webpack-out/ezt-footer-scripts-package.ezt"]
+
+<script type="module" nonce="[nonce]">
+// Load and instantiate pRPC client before any other script.
+window.prpcClient = new AutoRefreshPrpcClient(
+  CS_env.token, CS_env.tokenExpiresSec);
+</script>
+
+[if-any is_ezt]
+  <script type="text/javascript" defer src="[version_base]/static/js/framework/externs.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/framework/env.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/framework/framework-ajax.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/framework/framework-cues.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/framework/framework-display.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/framework/framework-menu.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/framework/framework-myhotlists.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/framework/framework-stars.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/framework/project-name-check.js" nonce="[nonce]"></script>
+  <script type="text/javascript" defer src="[version_base]/static/js/graveyard/xmlhttp.js" nonce="[nonce]"></script>
+[end]
+[include "footer-script.ezt"]
+
+
+[if-any is_ezt]
+  <script type="text/javascript" nonce="[nonce]">
+  runOnLoad(function() {
+    var toggles = document.getElementsByClassName("toggleHidden");
+    for (var i = 0; i < toggles.length; ++i) {
+      var toggle = toggles[[]i];
+      toggle.addEventListener("click", function (event) {
+          _toggleHidden(event.target);
+          event.preventDefault();
+      });
+    }
+
+    toggles = document.getElementsByClassName("toggleCollapse");
+    for (var i = 0; i < toggles.length; ++i) {
+      var toggle = toggles[[]i];
+      toggle.addEventListener("click", function (event) {
+          _toggleCollapse(event.target);
+          event.preventDefault();
+      });
+    }
+
+    [if-any form_token]
+      var tokenFields = document.querySelectorAll("input[[]name=token]");
+      for (var i = 0; i < tokenFields.length; ++i) {
+        var field = tokenFields[[]i];
+        field.form.addEventListener("submit", function(event) {
+            refreshTokens(
+                event, "[form_token]", "[form_token_path]", [token_expires_sec]);
+        });
+      }
+    [end]
+
+    [if-any project]
+      _fetchUserProjects(false);
+    [end]
+    _onload();
+
+  });
+  </script>
+[else]
+  <script type="text/javascript" nonce="[nonce]">
+  runOnLoad(function() {
+    TKR_install_ac();
+  });
+  </script>
+[end]
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  // CrDX Feedback Button
+  (function(i,s,o,g,r,a,m){i[[]'CrDXObject']=r;i[[]r]=i[[]r]||function(){
+  (i[[]r].q=i[[]r].q||[]).push(arguments)},a=s.createElement(o),
+  m=s.getElementsByTagName(o)[0];a.async=1;a.setAttribute('nonce','[nonce]');
+  a.src=g;m.parentNode.insertBefore(a,m)
+  })(window,document,'script','https://storage.googleapis.com/chops-feedback/feedback.js','crdx');
+
+  crdx('setFeedbackButtonLink', 'https://bugs.chromium.org/p/monorail/issues/entry?template=Online%20Feedback');
+});
+</script>
diff --git a/templates/framework/footer.ezt b/templates/framework/footer.ezt
new file mode 100644
index 0000000..963b61d
--- /dev/null
+++ b/templates/framework/footer.ezt
@@ -0,0 +1,42 @@
+</div> [# End <div id="maincol"> from header.ezt]
+
+[include "footer-shared.ezt"]
+
+<script type="text/javascript" nonce="[nonce]">
+// Google Analytics
+(function(i,s,o,g,r,a,m){i[[]'GoogleAnalyticsObject']=r;i[[]r]=i[[]r]||function(){
+(i[[]r].q=i[[]r].q||[[]]).push(arguments)},i[[]r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[[]0];a.async=1;a.setAttribute('nonce','[nonce]');
+a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+(function setupGoogleAnalytics() {
+  const _EMAIL_REGEX =
+      ["/([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]{2,5})/"];
+
+  ga('create', '[analytics_id]', {'siteSpeedSampleRate': 100});
+
+  [if-any logged_in_user]
+    ga('set', 'dimension1', 'Logged in');
+  [else]
+    ga('set', 'dimension1', 'Not logged in');
+  [end]
+
+  const path = window.location.href.slice(window.location.origin.length);
+  if (path.startsWith('/u')) {
+    [# Keep anything that looks like an email address out of GA.]
+    ga('set', 'title', 'A user page');
+    ga('set', 'location', path.replace(_EMAIL_REGEX, 'user@example.com'));
+  }
+
+  ga('send', 'pageview');
+})();
+</script>
+
+<ezt-app-base [if-any logged_in_user]
+  userDisplayName="[logged_in_user.email]"[end]
+  projectName="[projectname]"
+></ezt-app-base>
+
+</body>
+</html>
diff --git a/templates/framework/group-setting-fields.ezt b/templates/framework/group-setting-fields.ezt
new file mode 100644
index 0000000..4d62ab2
--- /dev/null
+++ b/templates/framework/group-setting-fields.ezt
@@ -0,0 +1,95 @@
+[# Diplay a widget to choose group visibility level, or read-only text showing
+   the visibility level.  Read-only text is used when the user does not have
+   permission to edit, or if there is only one available choice.
+]
+
+[define vis_menu_was_shown]False[end]
+
+[if-any read_only][else]
+  <select name="visibility" id="visibility" [if-any import_group]disabled="disabled"[end]>
+    <option value="" disabled="disabled" [if-any initial_visibility][else]selected="selected"[end]>
+      Select a visibility level...
+    </option>
+    [for visibility_levels]
+      <option value="[visibility_levels.key]"
+        [if-any initial_visibility]
+          [is initial_visibility.key visibility_levels.key]selected="selected"[end]
+        [end]>
+        [visibility_levels.name]
+      </option>
+    [end]
+  </select>
+  [define vis_menu_was_shown]True[end]
+
+  <br><br>
+  Friend projects: <br>
+  <input size="60" type="text" id="friendprojects" name="friendprojects" value="[initial_friendprojects]">
+  <div class="fielderror">
+    <span id="friendprojectsfeedback"></span>
+    [if-any errors.friendprojects][errors.friendprojects][end]
+  </div>
+
+  <br><br>
+  <input type="checkbox" name="import_group" id="import_group"
+         [if-any import_group]checked="checked"[end]
+         [if-any groupadmin]disabled="disabled"[end] >
+  <label for="import_group">Import from external group</label>
+
+  <div class="fielderror">
+    <span id="groupimportfeedback"></span>
+    [if-any errors.groupimport][errors.groupimport][end]
+  </div>
+
+  <br>
+  &nbsp;&nbsp;External group type:
+  <select name="group_type" id="group_type"
+          [if-any import_group][else]disabled="disabled"[end]
+          [if-any groupadmin]disabled="disabled"[end] >
+    <option value="" disabled="disabled" [if-any initial_group_type][else]selected="selected"[end]>
+      Select a group type...
+    </option>
+    [for group_types]
+      <option value="[group_types.key]"
+        [if-any initial_group_type]
+          [is initial_group_type.key group_types.key]selected="selected"[end]
+        [end]>
+        [group_types.name]
+      </option>
+    [end]
+  </select>
+  <br><br>
+
+  <script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+    cur_vis_value = $("visibility").value;
+
+    function _updateSettings() {
+      if ($("import_group").checked) {
+        $("group_type").disabled = false;
+        cur_vis_value = $("visibility").value;
+        $("visibility").value = 0;
+        $("visibility").disabled = true;
+        $("friendprojects").disabled = true;
+      } else {
+        $("group_type").disabled = true;
+        $("visibility").value = cur_vis_value;
+        $("visibility").disabled = false;
+        $("friendprojects").disabled = false;
+      }
+    }
+
+    $("import_group").addEventListener("click", _updateSettings);
+});
+  </script>
+[end]
+
+[is vis_menu_was_shown "False"]
+  [initial_visibility.name]
+  <input type="hidden" name="visibility" value="[initial_visibility.key]">
+[end]
+
+<div class="formerror">
+  [if-any errors.access]
+    <div class="emphasis">[errors.access]</div>
+  [end]
+</div>
\ No newline at end of file
diff --git a/templates/framework/header-shared.ezt b/templates/framework/header-shared.ezt
new file mode 100644
index 0000000..614fe5c
--- /dev/null
+++ b/templates/framework/header-shared.ezt
@@ -0,0 +1,115 @@
+<!DOCTYPE html>
+[# This is the part of header.ezt used by both the legacy
+   Monorail UI, and the new Polymer pages.
+]
+<html lang="en">
+<head>
+  <link rel="icon" type="image/vnd.microsoft.icon" href="/static/images/monorail.ico">
+  [if-any link_rel_canonical]
+    <link rel="canonical" href="[link_rel_canonical]">
+  [end]
+
+  <script type="text/javascript" nonce="[nonce]">
+   [# Javascript object containing basic page data. ]
+   window.CS_env = {
+     'absoluteBaseUrl': '[format "js"][absolute_base_url][end]',
+     'app_version': '[format "js"][app_version][end]',
+     'token': '[format "js"][xhr_token][end]',
+     'tokenExpiresSec': [format "js"][token_expires_sec][end],
+     'loggedInUserEmail':
+       [if-any logged_in_user]
+         '[format "js"][logged_in_user.email][end]'
+       [else]
+         null
+       [end],
+     'login_url': '[format "js"][login_url][end]',
+     'logout_url': '[format "js"][logout_url][end]',
+     'profileUrl':
+       [if-any logged_in_user]
+         '[format "js"][logged_in_user.profile_url][end]'
+       [else]
+         null
+       [end],
+     'projectName': '[format "js"][projectname][end]',
+     'projectIsRestricted': [if-any project_is_restricted]true[else]false[end],
+     'is_member': '[format "js"][is_member][end]',
+     'gapi_client_id': '[format "js"][gapi_client_id][end]',
+   };
+  </script>
+
+  [# Improve the snippet that appears in search]
+  [if-any show_search_metadata]
+    <meta name="Description" content="Monorail is simple, reliable, and flexible issue tracking tool.">
+    <meta name="robots" content="NOODP">
+  [end]
+
+    <title>
+      [if-any title][title] - [end]
+      [if-any title_summary][title_summary] - [end]
+      [if-any projectname]
+        [projectname] -
+      [else]
+        [if-any viewing_user_page][viewed_user.display_name] - [end]
+      [end]
+      [if-any title_summary][else]
+        [if-any project_summary][project_summary] - [end]
+      [end]
+      [site_name]
+    </title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="referrer" content="no-referrer">
+    [if-any robots_no_index]
+     <meta name="ROBOTS" content="NOINDEX,NOARCHIVE">
+    [else]
+     <meta name="ROBOTS" content="NOARCHIVE">
+    [end]
+    <meta name="viewport" content="width=device-width, minimum-scale=1.0">
+    <link type="text/css" rel="stylesheet" href="[version_base]/static/css/chopsui-normal.css">
+
+    [if-any is_ezt]
+      <link type="text/css" rel="stylesheet" href="[version_base]/static/css/ph_core.css">
+      <link type="text/css" rel="stylesheet" media="(max-width:425px)"
+            href="[version_base]/static/css/ph_mobile.css">
+
+      [if-any category_css]
+        <link type="text/css" rel="stylesheet" href="[version_base]/static/[category_css]">
+      [end]
+      [if-any category2_css]
+        <link type="text/css" rel="stylesheet" href="[version_base]/static/[category2_css]">
+      [end]
+      [if-any page_css]
+        <link type="text/css" rel="stylesheet" href="[version_base]/static/[page_css]">
+      [end]
+    [end]
+
+    <!-- Lazy load icons. -->
+    <link rel="stylesheet"
+      href="https://fonts.googleapis.com/icon?family=Material+Icons"
+      media="none"
+      id="icons-stylesheet">
+    <script type="module" async defer nonce="[nonce]">
+      document.getElementById('icons-stylesheet').media = 'all';
+    </script>
+    [# NO MORE SCRIPTS IN HEAD, it makes page loading too slow.]
+</head>
+
+[# Tiny script used sitewide. ]
+<script type="text/javascript" nonce="[nonce]">
+   function _go(url, newWindow) {
+     if (newWindow)
+       window.open(url, '_blank');
+     else
+       document.location = url;
+   }
+   function $(id) { return document.getElementById(id); }
+
+   var loadQueue = [];
+   function runOnLoad(fn) { loadQueue.push(fn); }
+
+   window.onload = function() {
+     for (var i = 0; i < loadQueue.length; i++)
+       loadQueue[[]i]();
+     delete loadQueue;
+   };
+</script>
diff --git a/templates/framework/header.ezt b/templates/framework/header.ezt
new file mode 100644
index 0000000..fe798af
--- /dev/null
+++ b/templates/framework/header.ezt
@@ -0,0 +1,39 @@
+[# This is the main header file that is included in all Monorail servlets that render a page.
+
+   Args:
+     arg0: Can be "showtabs", "showusertabs" or "showusergrouptabs" to select which top-plevel tabs are shown.
+     arg1: String like "t1", "t2", "t3" to identify the currently active tab.
+]
+[define is_ezt]Yes[end]
+[include "header-shared.ezt"]
+
+[include "../webpack-out/ezt-element-package.ezt"]
+
+<body class="[main_tab_mode] [if-any perms.EditIssue]perms_EditIssue[end]">
+
+[# Tiny script used sitewide. ]
+<script type="text/javascript" nonce="[nonce]">
+   function _go(url, newWindow) {
+     if (newWindow)
+       window.open(url, '_blank');
+     else
+       document.location = url;
+   }
+   function $(id) { return document.getElementById(id); }
+
+   var loadQueue = [];
+   function runOnLoad(fn) { loadQueue.push(fn); }
+
+   window.onload = function() {
+     for (var i = 0; i < loadQueue.length; i++)
+       loadQueue[[]i]();
+     delete loadQueue;
+   };
+</script>
+
+[include "maintabs.ezt" arg0 arg1]
+
+[include "banner_message.ezt"]
+
+<div id="maincol">
+[include "alert.ezt"]
diff --git a/templates/framework/js-placeholders.ezt b/templates/framework/js-placeholders.ezt
new file mode 100644
index 0000000..ae3548a
--- /dev/null
+++ b/templates/framework/js-placeholders.ezt
@@ -0,0 +1,12 @@
+[# Empty function definitions because we load the JS at bottom of page.
+   Without this, some rollovers or on-click handlers might give errors for
+   the first 200ms or so after the page loads. With them, they simply are
+   no-ops. ]
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+function _showBelow(){}
+function _toggleStar(){}
+function _goIssue(){}
+function _goFile(){}
+});
+</script>
diff --git a/templates/framework/label-validation-row.ezt b/templates/framework/label-validation-row.ezt
new file mode 100644
index 0000000..4c2d1a3
--- /dev/null
+++ b/templates/framework/label-validation-row.ezt
@@ -0,0 +1,6 @@
+<tr>
+  <td colspan="3">
+    <div id="confirmarea" class="novel"><span id="confirmmsg"></span></div>
+    <div id="blocksubmitarea" class="blockingsubmit"><span id="blocksubmitmsg"></span></div>
+  </td>
+</tr>
diff --git a/templates/framework/maintabs.ezt b/templates/framework/maintabs.ezt
new file mode 100644
index 0000000..416b992
--- /dev/null
+++ b/templates/framework/maintabs.ezt
@@ -0,0 +1,99 @@
+[# Show top-level tabs.
+
+   Args:
+     arg0: Can be "showtabs", or "showusertabs" to select which
+         top-level tabs are shown.
+     arg1: String like "t1", "t2", "t3" to identify the currently active tab.
+]
+[if-any projectname]
+
+[# Non-fixed container around mr-header to allow the fixed header to "take up space". ]
+<div style="width: 100%; height: var(--monorail-header-height); margin-bottom: -1px;">
+  <mr-header
+    [if-any logged_in_user]
+    userDisplayName="[logged_in_user.email]"
+    [end]
+    projectThumbnailUrl="[project_thumbnail_url]"
+    projectName="[projectname]"
+    loginUrl="[login_url]"
+    logoutUrl="[logout_url]"
+  ></mr-header>
+</div>
+[else]
+<table id="monobar" width="100%" cellpadding="0" cellspacing="0" role="presentation">
+  <tr>
+    <th class="padded">
+      <a href="/" id="wordmark">[site_name]</a>
+    </th>
+    [if-any viewed_user]
+      <th class="padded">
+        User: <a href="[viewed_user.profile_url]">[viewed_user.display_name]</a>
+        [if-any viewed_user_pb.is_site_admin_bool]<i>(Administrator)</i>[end]
+      </th>
+    [end]
+    [if-any hotlist_id]
+      <th class="toptabs padded">
+      <a href="[hotlist.url]" title="[hotlist_id]"
+        id = "hotlists-dropdown">Hotlist: [hotlist.name] <small>&#9660;</small></a>
+      <a href="[hotlist.url]" class="[is main_tab_mode "ht2"]active[end]">Issues</a>
+      <a href="[hotlist.url]/people" class="[is main_tab_mode "ht3"]active[end]">People</a>
+      <a href="[hotlist.url]/details" class="[is main_tab_mode "ht4"]active[end]">Settings</a>
+      </th>
+    [end]
+
+    <td width="100%" id="userbar">
+      [include "user-bar.ezt"]
+    </td>
+  </tr>
+</table>
+[end]
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  if ($("hotlists-dropdown"))
+    $("hotlists-dropdown").addEventListener("click", function(event) {
+        event.preventDefault();
+    });
+});
+</script>
+
+[is arg0 "showtabs"]
+  <div class="subt">
+    [include "projecttabs.ezt"]
+  </div>
+[else][is arg0 "showusertabs"]
+  <div class="subt">
+    [include "../sitewide/usertabs.ezt" arg1]
+  </div>
+[else][is arg0 "showusergrouptabs"]
+  <div class="subt">
+    [include "../sitewide/usergrouptabs.ezt" arg1]
+  </div>
+[end][end][end]
+
+[if-any warnings]
+  <table align="center" border="0" cellspacing="0" cellpadding="0" style="margin-bottom: 6px">
+   [for warnings]
+     <tr><td class="notice">
+         [warnings]
+     </td></tr>
+   [end]
+  </table>
+[end]
+[if-any errors.query]
+  <table align="center" border="0" cellspacing="0" cellpadding="0" style="margin-bottom: 6px">
+   <tr><td class="notice">
+       [errors.query]
+   </td></tr>
+  </table>
+[end]
+
+[if-any site_read_only][else]
+  [if-any project_alert]
+    <div style="font-weight: bold; color: #c00; margin-top: 5px; display: block;">
+      [project_alert]
+    </div>
+  [end]
+[end]
+
+[include "../features/cues.ezt"]
diff --git a/templates/framework/polymer-footer.ezt b/templates/framework/polymer-footer.ezt
new file mode 100644
index 0000000..a83d40f
--- /dev/null
+++ b/templates/framework/polymer-footer.ezt
@@ -0,0 +1,14 @@
+[include "footer-shared.ezt"]
+
+<script type="text/javascript" nonce="[nonce]">
+// Google Analytics
+(function(i,s,o,g,r,a,m){i[[]'GoogleAnalyticsObject']=r;i[[]r]=i[[]r]||function(){
+(i[[]r].q=i[[]r].q||[[]]).push(arguments)},i[[]r].l=1*new Date();a=s.createElement(o),
+m=s.getElementsByTagName(o)[[]0];a.async=1;a.setAttribute('nonce','[nonce]');
+a.src=g;m.parentNode.insertBefore(a,m)
+})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
+
+(function setupGoogleAnalytics() {
+  ga('create', '[analytics_id]', {'siteSpeedSampleRate': 100});
+})();
+</script>
diff --git a/templates/framework/project-access-part.ezt b/templates/framework/project-access-part.ezt
new file mode 100644
index 0000000..2400dfe
--- /dev/null
+++ b/templates/framework/project-access-part.ezt
@@ -0,0 +1,36 @@
+[# Diplay a widget to choose project access level, or read-only text showing
+   the access level.  Read-only text is used when the user does not have
+   permission to edit, or if there is only one available choice.
+]
+
+[define access_menu_was_shown]False[end]
+
+[if-any read_only][else]
+  [if-any offer_access_level]
+    <select name="access" id="access">
+      <option value="" disabled="disabled" [if-any initial_access][else]selected="selected"[end]>
+        Select an access level...
+      </option>
+      [for available_access_levels]
+        <option value="[available_access_levels.key]"
+          [if-any initial_access]
+            [is initial_access.key available_access_levels.key]selected="selected"[end]
+          [end]>
+          [available_access_levels.name]
+        </option>
+      [end]
+    </select>
+    [define access_menu_was_shown]True[end]
+  [end]
+[end]
+
+[is access_menu_was_shown "False"]
+  [initial_access.name]
+  <input type="hidden" name="access" value="[initial_access.key]">
+[end]
+
+<div class="formerror">
+  [if-any errors.access]
+    <div class="emphasis">[errors.access]</div>
+  [end]
+</div>
diff --git a/templates/framework/project-descriptive-fields.ezt b/templates/framework/project-descriptive-fields.ezt
new file mode 100644
index 0000000..b237f20
--- /dev/null
+++ b/templates/framework/project-descriptive-fields.ezt
@@ -0,0 +1,41 @@
+Summary:<br>
+<input type="text" id="summary" name="summary" size="75" value="[initial_summary]"><br>
+<div class="fielderror">&nbsp;
+   <span id="summaryfeedback">[if-any errors.summary][errors.summary][end]</span>
+</div>
+
+Description:<br>
+<textarea id="description" name="description" rows="20" cols="90" wrap="soft"
+          >[initial_description]</textarea><br>
+<div class="fielderror">&nbsp;
+  <span id="descriptionfeedback">[if-any errors.description][errors.description][end]</span>
+</div>
+
+Project home page (optional):<br/>
+<input type="text" id="project_home" name="project_home" size="75" value="[initial_project_home]"><br>
+<div class="fielderror">&nbsp;
+  <span id="project_homefeedback">[if-any errors.project_home][errors.project_home][end]</span>
+</div>
+
+Project documentation page (optional):<br/>
+<input type="text" id="docs_url" name="docs_url" size="75" value="[initial_docs_url]"><br>
+<div class="fielderror">&nbsp;
+  <span id="docs_urlfeedback">[if-any errors.docs_url][errors.docs_url][end]</span>
+</div>
+
+Project source browser (optional):<br/>
+<input type="text" id="source_url" name="source_url" size="75" value="[initial_source_url]"><br>
+<div class="fielderror">&nbsp;
+  <span id="source_urlfeedback">[if-any errors.source_url][errors.source_url][end]</span>
+</div>
+
+[if-any logo_view.viewurl]
+  Project logo:<br>
+  [include "display-project-logo.ezt" True]
+[else]
+  Upload project logo (optional, will be resized to 110x30):<br/>
+  <input type="file" name="logo" id="logo">
+  <div class="fielderror">&nbsp;
+    <span id="logofeedback">[if-any errors.logo][errors.logo][end]</span>
+  </div>
+[end]
diff --git a/templates/framework/projecttabs.ezt b/templates/framework/projecttabs.ezt
new file mode 100644
index 0000000..6a05c74
--- /dev/null
+++ b/templates/framework/projecttabs.ezt
@@ -0,0 +1,25 @@
+[is main_tab_mode "t4"]
+  <div class="[admin_tab_mode]">
+      <div class="at isf">
+       <span class="inst1"><a href="/p/[projectname]/adminIntro">Introduction</a></span>
+       <span class="inst3"><a href="/p/[projectname]/adminStatuses">Statuses</a></span>
+       <span class="inst4"><a href="/p/[projectname]/adminLabels">Labels and fields</a></span>
+       [if-any perms.EditProject][# Rule might be too sensitive for non-members to view.]
+         <span class="inst5"><a href="/p/[projectname]/adminRules">Rules</a></span>
+       [end]
+       <span class="inst6"><a href="/p/[projectname]/adminTemplates">Templates</a></span>
+       <span class="inst7"><a href="/p/[projectname]/adminComponents">Components</a></span>
+       <span class="inst8"><a href="/p/[projectname]/adminViews">Views</a></span>
+     </div>
+  </div>
+[end]
+
+
+[is main_tab_mode "t6"]
+  <div class="[admin_tab_mode]">
+      <div class="at isf">
+       <span class="inst1"><a href="/p/[projectname]/admin">General</a></span>
+       <span class="inst9"><a href="/p/[projectname]/adminAdvanced">Advanced</a></span>
+      </div>
+  </div>
+[end]
diff --git a/templates/framework/read-only-rejection.ezt b/templates/framework/read-only-rejection.ezt
new file mode 100644
index 0000000..3147d9a
--- /dev/null
+++ b/templates/framework/read-only-rejection.ezt
@@ -0,0 +1,10 @@
+<span style="color:#a30">
+  [if-any site_read_only]
+    This operation cannot be done when the site is read-only.
+    Please come back later.
+  [else]
+    [if-any project_read_only]
+      READ-ONLY
+    [end]
+  [end]
+</span>
diff --git a/templates/framework/saved-queries-admin-part.ezt b/templates/framework/saved-queries-admin-part.ezt
new file mode 100644
index 0000000..6514e30
--- /dev/null
+++ b/templates/framework/saved-queries-admin-part.ezt
@@ -0,0 +1,135 @@
+[# arg0 is either "user" for user saved queries or "project" for canned queries]
+<style>
+  #queries th, #queries td {  padding-bottom: 1em }
+</style>
+
+<table border="0" id="queries">
+   <tr>
+    <th></th>
+    <th style="text-align:left">Saved query name:</th>
+    [is arg0 "user"]
+      <th style="text-align:left">Project(s):</th>
+    [end]
+    <th colspan="2" style="text-align:left">Query:</th>
+    [is arg0 "user"]
+      <th style="text-align:left">Subscription options:</th>
+    [end]
+    <th></th>
+   </tr>
+
+   [for canned_queries]
+   <tr>
+    <td style="text-align:right" width="20">[canned_queries.idx].
+      <input type="hidden" name="savedquery_id_[canned_queries.idx]" value="[canned_queries.query_id]">
+    </td>
+    <td><input type="text" name="savedquery_name_[canned_queries.idx]" size="35" value="[canned_queries.name]" class="acob"></td>
+    [is arg0 "user"]
+      <td><input type="text" name="savedquery_projects_[canned_queries.idx]" size="35" value="[canned_queries.projects]"
+           class="acob" autocomplete="off" id="savedquery_projects_[canned_queries.idx]"></td>
+    [end]
+
+    <td>
+       <select name="savedquery_base_[canned_queries.idx]">
+         [define can][canned_queries.base_query_id][end]
+         [include "../tracker/issue-can-widget.ezt" "admin"]
+       </select>
+    </td>
+    <td>
+      <input type="text" name="savedquery_query_[canned_queries.idx]" size="50" value="[canned_queries.query]" autocomplete="off" id="query_existing_[canned_queries.idx]" class="acob">
+    </td>
+    [is arg0 "user"]
+      <td>
+        <select id="savedquery_sub_mode_[canned_queries.idx]" name="savedquery_sub_mode_[canned_queries.idx]">
+          <option [is canned_queries.subscription_mode "noemail"]selected="select"[end] value="noemail"
+                  >No emails</option>
+          <option [is canned_queries.subscription_mode "immediate"]selected="select"[end] value="immediate">Notify Immediately</option>
+          [# TODO(jrobbins): <option disabled="disabled">Notify Daily</option>]
+          [# TODO(jrobbins): <option disabled="disabled">Notify Weekly on Monday</option>]
+        </select>
+      </td>
+    [end]
+    <td></td>
+   </tr>
+   [end]
+
+   [is arg0 "user"]
+     [define can]1[end][# All blank lines for user queries default to "All Issues" scope.]
+   [else]
+     [define can]2[end][# All blank lines for project queries default to "Open issues" scope.]
+   [end]
+   [for new_query_indexes]
+   <tr id="newquery[new_query_indexes]" [if-index new_query_indexes first][else]style="display:none"[end]>
+    <td style="text-align:right" width="20">[new_query_indexes].</td>
+    <td><input type="text" name="new_savedquery_name_[new_query_indexes]"
+               class="showNextQueryRow acob" data-index="[new_query_indexes]"
+               size="35" value="" placeholder="Required"></td>
+    [is arg0 "user"]
+      <td><input type="text" name="new_savedquery_projects_[new_query_indexes]" size="35" value="" class="acob"
+           autocomplete="off" id="new_savedquery_projects_[new_query_indexes]" placeholder="Optional"></td>
+    [end]
+    <td>
+       <select name="new_savedquery_base_[new_query_indexes]">
+         [include "../tracker/issue-can-widget.ezt" "admin"]
+       </select>
+    </td>
+    <td>
+      <input type="text" name="new_savedquery_query_[new_query_indexes]" size="50" value="" autocomplete="off" id="query_new_[new_query_indexes]" class="acob" placeholder="Optional. Example- &quot;label:Security owner:me&quot;">
+    </td>
+    [is arg0 "user"]
+      <td>
+        <select id="new_savedquery_sub_mode_[new_query_indexes]" name="new_savedquery_sub_mode_[new_query_indexes]">
+          <option selected="selected" value="noemail">No emails</option>
+          <option value="immediate">Notify Immediately</option>
+          [# TODO(jrobbins): <option disabled="disabled">Notify Daily</option>]
+          [# TODO(jrobbins): <option disabled="disabled">Notify Weekly</option>]
+        </select>
+      </td>
+    [end]
+    <td width="40px">
+     [if-index new_query_indexes last][else]
+      <span id="addquery[new_query_indexes]" class="fakelink" data-index="[new_query_indexes]">Add a row</span
+     [end]
+    </td>
+   </tr>
+   [end]
+
+</table>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  function showNextQueryRow(i) {
+   if (i < [max_queries]) {
+     _showID('newquery' + (i + 1));
+     _hideID('addquery' + i);
+   }
+  }
+  _fetchUserProjects(true);
+
+  var addARowLinks = document.getElementsByClassName("fakelink");
+  for (var i = 0; i < addARowLinks.length; ++i) {
+    var link = addARowLinks[[]i];
+    link.addEventListener("click", function(event) {
+        var index = Number(event.target.getAttribute("data-index"));
+        showNextQueryRow(index);
+    });
+  }
+
+  var typeToAddARow = document.getElementsByClassName("showNextQueryRow");
+  for (var i = 0; i < typeToAddARow.length; ++i) {
+    var el = typeToAddARow[[]i];
+    el.addEventListener("keydown", function(event) {
+        var index = Number(event.target.getAttribute("data-index"));
+        showNextQueryRow(index);
+    });
+  }
+
+  var acobElements = document.getElementsByClassName("acob");
+  for (var i = 0; i < acobElements.length; ++i) {
+     var el = acobElements[[]i];
+     el.addEventListener("focus", function(event) {
+         _acrob(null);
+         _acof(event);
+     });
+  }
+});
+</script>
diff --git a/templates/framework/user-bar.ezt b/templates/framework/user-bar.ezt
new file mode 100644
index 0000000..a80fe90
--- /dev/null
+++ b/templates/framework/user-bar.ezt
@@ -0,0 +1,11 @@
+<span style="padding: 0 1em">
+  [if-any logged_in_user]
+    <mr-account-dropdown
+      userDisplayName="[logged_in_user.email]"
+      loginUrl="[login_url]"
+      logoutUrl="[logout_url]"
+    ></mr-account-dropdown>
+  [else]
+    <a href="[login_url]"><u>Sign in</u></a>
+  [end]
+</span>
diff --git a/templates/framework/user-link-availability.ezt b/templates/framework/user-link-availability.ezt
new file mode 100644
index 0000000..cc02db7
--- /dev/null
+++ b/templates/framework/user-link-availability.ezt
@@ -0,0 +1,18 @@
+[# arg0: The UserView to display.
+   arg1: "Yes" to show a shortened reason as visible text on the page.
+]
+<div class="userlink_avail" title="[arg0.display_name][if-any arg0.avail_message]:
+[arg0.avail_message][end]">
+  [if-any arg0.avail_message]
+    <span class="availability_[arg0.avail_state]">&#9608;</span>
+  [end]
+  [if-any arg0.profile_url]
+    <a href="[arg0.profile_url]">[arg0.display_name]</a>[else]<a>[arg0.display_name]</a>[end]
+</div>
+[is arg1 "Yes"]
+ [if-any arg0.avail_message]
+  <div class="availability_[arg0.avail_state]" title="[arg0.display_name]:
+[arg0.avail_message]"
+  >[arg0.avail_message_short]</div>
+ [end]
+[end]
diff --git a/templates/framework/user-link.ezt b/templates/framework/user-link.ezt
new file mode 100644
index 0000000..18d7e6c
--- /dev/null
+++ b/templates/framework/user-link.ezt
@@ -0,0 +1 @@
+[if-any arg0.profile_url]<a style="white-space: nowrap" href="[arg0.profile_url]" title="[arg0.display_name]">[arg0.display_name]</a>[else][arg0.display_name][end]
\ No newline at end of file
diff --git a/templates/project/people-add-members-form.ezt b/templates/project/people-add-members-form.ezt
new file mode 100644
index 0000000..f013a0a
--- /dev/null
+++ b/templates/project/people-add-members-form.ezt
@@ -0,0 +1,103 @@
+
+[if-any offer_membership_editing]
+<br>
+<div class="h4" style="margin-bottom:4px" id="addmembers">Add Members</div>
+
+<div id="makechanges" class="closed">
+
+  <div class="ifClosed">
+   <textarea id="tempt" rows="4" style="color:#666; width:500px; margin-left:4px"
+    >Enter new member email addresses</textarea>
+  </div>
+
+
+<table class="ifOpened vt" cellspacing="2" cellpadding="2" style="margin-top:0">
+  <tr>
+   <td colspan="2">
+      <textarea name="addmembers" style="width:500px" rows="4"
+                id="addMembersTextArea">[initial_add_members]</textarea>
+     [if-any errors.addmembers]
+      <div class="fielderror">[errors.addmembers]</div>
+     [end]<br>
+   </td>
+   <td rowspan="3">
+       <div class="tip" style="margin-top:0; margin-left:4px">
+           Enter the email addresses of users that you would like to
+           add to this [is arg0 "project"]project[else]
+	   [is arg0 "hotlist"]hotlist.
+	   <strong>You can also add group lists to give every member of the group permission to edit this hotlist</strong>
+	   [else]group[end][end].<br><br>
+           Each email address must correspond to a Google Account when in use.
+       </div>
+    </td>
+   </tr>
+
+  <tr>
+    <th width="30" align="left">Role:</th>
+
+    <td width="470" align="left">
+    [is arg0 "project"]
+       <input type="radio" name="role" value="owner" id="owner">
+       <label for="owner">Owner: may make any change to this
+       project.</label><br>
+
+       <input type="radio" name="role" value="committer" id="committer"
+              checked="checked">
+       <label for="committer">Committer: may work in the project, but may
+       not reconfigure it.</label><br>
+
+       <input type="radio" name="role" value="contributor" id="contributor">
+       <label for="contributor">Contributor: starts with the same permissions
+       as non-members.</label><br>
+       [# TODO(jrobbins): custom roles]
+    [else][is arg0 "hotlist"]
+       <input type="radio" name="role" value="editor" id="editor"
+              checked="checked">
+       <label for="editor">Editor: may add/remove/rank issues.</label><br>
+       [if-any errors.incorrect_email_input]
+       <div class="fielderror">[errors.incorrect_email_input]</div>
+       [end]
+    [else]
+       <input type="radio" name="role" value="owner" id="owner">
+       <label for="owner">Owner: may make any change to this
+       group.</label><br>
+
+       <input type="radio" name="role" value="member" id="member"
+              checked="checked">
+       <label for="member">Member: member of this user group.</label><br>
+    [end][end]
+    </td>
+
+    </tr>
+    <tr>
+     <td colspan="2">
+      <input type="submit" name="addbtn" id="addbtn"
+             value="Save changes" style="margin-top:1em">
+     </td>
+    </tr>
+</table>
+
+</div>
+
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  window._openAddMembersForm = function _openAddMembersForm() {
+    document.location.hash='addmembers';
+    document.getElementById('makechanges').className = "opened";
+    window.setTimeout(
+        function () { document.getElementById('addMembersTextArea').focus(); },
+        100);
+  }
+
+  [if-any initially_expand_form]
+    _openAddMembersForm();
+  [end]
+
+  if ($("tempt"))
+    $("tempt").addEventListener("mousedown", _openAddMembersForm);
+
+});
+</script>
+
+[end]
diff --git a/templates/project/people-detail-page.ezt b/templates/project/people-detail-page.ezt
new file mode 100644
index 0000000..fda3e96
--- /dev/null
+++ b/templates/project/people-detail-page.ezt
@@ -0,0 +1,186 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+<a href="list">&lsaquo; Back to people list</a>
+
+<form action="detail.do" method="POST" id="peopledetail">
+<input type="hidden" name="token" value="[form_token]">
+<input type="hidden" name="u" value="[member.user.user_id]">
+<table cellspacing="8" class="rowmajor vt">
+<tr>
+ <th width="1%">User:</th>
+ <td>[include "../framework/user-link.ezt" member.user]</td>
+</tr>
+
+ <tr class="[if-any expand_perms]opened[else]closed[end]">
+ <th>Role:</th>
+ <td>
+   [# Show a widget if the current user is allowed to edit roles.]
+   [if-any perms.EditProject]
+     [define offer_role_select]Yes[end]
+   [else]
+     [define offer_role_select]No[end]
+   [end]
+   [# But, don't offer it if the user could remove themselves as the last owner.]
+   [is total_num_owners "1"][if-any warn_abandonment]
+     [define offer_role_select]No[end]
+   [end][end]
+
+   [is offer_role_select "Yes"]
+     <select name="role">
+       <option [is member.role "Owner"]selected="selected"[end]
+               value="owner">Owner</option>
+       <option [is member.role "Committer"]selected="selected"[end]
+               value="committer">Committer</option>
+       <option [is member.role "Contributor"]selected="selected"[end]
+               value="contributor">Contributor</option>
+     </select>
+   [else]
+     [member.role]
+   [end]
+   <a class="ifClosed toggleHidden" href="#" id="show_permissions"
+      style="font-size:90%; margin-left:1em">Show permissions</a>
+   <a class="ifOpened toggleHidden" href="#" id="hide_permissions"
+      style="font-size:90%; margin-left:1em">Hide permissions</a>
+   [include "people-detail-perms-part.ezt"]
+ </td>
+ <td>
+   <div class="ifOpened tip" style="width:17em">
+      <b>Permissions</b> enable members to perform specific actions in
+      a project.  Appropriate permissions are already defined for each
+      role: Owner, Committer, and Contributor.  Additional permissions can
+      be granted to individual members, if needed.
+
+      <p>Most project owners will never need to grant any individual
+      member permissions.  It is usually more important to describe
+      each member's duties in the notes.</p>
+
+      <div style="margin-top:.5em">
+        <a href="https://chromium.googlesource.com/infra/infra/+/main/appengine/monorail/doc/userguide/working-with-issues.md#Who-can-view-an-issue" target="new">Learn more</a>
+        <a href="http://code.google.com/p/monorail/wiki/Permissions" target="new"><img src="/static/images/tearoff_icon.gif" width="16" height="16"></a>
+      </div>
+   </div>
+ </td>
+</tr>
+
+
+<tr>
+ <th>Notes:</th>
+ <td>
+  [if-any offer_edit_member_notes]
+   <div style="width:40em">
+    <textarea style="width:100%" rows="4" class="ifExpand" name="notes"
+              >[member.notes]</textarea>
+   </div>
+  [else]
+   [if-any member.notes][member.notes][else]----[end]
+  [end]
+
+ </td>
+</tr>
+
+<tr>
+ <th>Autocomplete:</th>
+ <td>
+    [if-any perms.EditProject]
+      [define disable_checkbox]No[end]
+    [else]
+      [define disable_checkbox]Yes[end]
+    [end]
+    [if-any member.is_service_account]
+      [define disable_checkbox]Yes[end]
+    [end]
+     <div>
+       <input type="checkbox" name="ac_include" id="ac_include"
+            [if-any member.is_service_account][else]
+              [if-any member.ac_include]checked[end]
+            [end]
+            [is disable_checkbox "Yes"]disabled[end]
+            value="[member.user.user_id]"
+            >
+       <label for="ac_include">Include this member in autocomplete menus</label>
+     </div>
+     [if-any member.is_service_account]
+       <div>(service account is excluded by default)</div>
+     [end]
+
+     [if-any member.is_group]
+       <div>
+         <input type="checkbox" name="ac_expand" id="ac_expand"
+              [if-any member.ac_expand]checked[end]
+              [is disable_checkbox "Yes"]disabled[end]
+              value="[member.user.user_id]"
+              >
+         <label for="ac_expand">Expand this user group in autocomplete menus</label>
+       </div>
+     [else]
+       <input type="hidden" name="ac_expand" value="[member.user.user_id]">
+     [end]
+
+ </td>
+</tr>
+
+[if-any read_only]
+   <tr>
+     <th></th>
+     <td>
+       [include "../framework/read-only-rejection.ezt"]
+     </td>
+   </tr>
+[else]
+  [if-any offer_edit_perms offer_edit_member_notes]
+   <tr>
+     <th></th>
+     <td>
+      <input type="submit" name="submit" value="Save changes">
+      [if-any offer_remove_role]
+        <input type="submit" class="secondary" name="remove" value="Remove member"
+               id="remove_member">
+      [end]
+     </td>
+   </tr>
+  [end]
+[end]
+
+</table>
+</form>
+
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+ function _confirmRemove() {
+  [if-any warn_abandonment]
+    [is total_num_owners "1"]
+      alert('You cannot remove the last project owner.');
+      return false;
+    [else]
+      return confirm('Remove yourself?\nYou will be locked out of making further changes.');
+    [end]
+  [else]
+    return confirm('Remove member [format "js"][member.user.email][end]?');
+  [end]
+ }
+
+ if ($("remove_member"))
+   $("remove_member").addEventListener("click", function(event) {
+      if (!_confirmRemove())
+        event.preventDefault();
+   });
+
+ [if-any read_only][else]
+   if ($("show_permissions"))
+     $("show_permissions").addEventListener("click", function() {
+        window.prpcClient.call(
+            'monorail.Users', 'SetExpandPermsPreference', {expandPerms: true});
+     });
+   if ($("hide_permissions"))
+     $("hide_permissions").addEventListener("click", function() {
+        window.prpcClient.call(
+            'monorail.Users', 'SetExpandPermsPreference', {expandPerms: false});
+     });
+ [end]
+
+});
+</script>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/project/people-detail-perms-part.ezt b/templates/project/people-detail-perms-part.ezt
new file mode 100644
index 0000000..3a30417
--- /dev/null
+++ b/templates/project/people-detail-perms-part.ezt
@@ -0,0 +1,82 @@
+<table id="perm_defs" class="ifOpened">
+ [if-any offer_edit_perms displayed_extra_perms]
+  <tr><th colspan="2">Standard permissions</th></tr>
+ [end]
+
+ [include "people-detail-row-part.ezt" role_perms.View member_perms.View "View" "View issues"]
+ [include "people-detail-row-part.ezt" role_perms.Commit member_perms.Commit "Commit" "Full project member"]
+
+ [include "people-detail-row-part.ezt" role_perms.CreateIssue member_perms.CreateIssue "CreateIssue" "Enter a new issue"]
+ [include "people-detail-row-part.ezt" role_perms.AddIssueComment member_perms.AddIssueComment "AddIssueComment" "Add a comment to an issue"]
+ [include "people-detail-row-part.ezt" role_perms.EditIssue member_perms.EditIssue "EditIssue" "Edit any attribute of an issue"]
+ [include "people-detail-row-part.ezt" role_perms.EditIssueOwner member_perms.EditIssueOwner "EditIssueOwner" "- Edit the owner of an issue"]
+ [include "people-detail-row-part.ezt" role_perms.EditIssueSummary member_perms.EditIssueSummary "EditIssueSummary" "- Edit the summary of an issue"]
+ [include "people-detail-row-part.ezt" role_perms.EditIssueStatus member_perms.EditIssueStatus "EditIssueStatus" "- Edit the status of an issue"]
+ [include "people-detail-row-part.ezt" role_perms.EditIssueCc member_perms.EditIssueCc "EditIssueCc" "- Edit the CC list of an issue"]
+ [include "people-detail-row-part.ezt" role_perms.DeleteIssue member_perms.DeleteIssue "DeleteIssue" "Delete/undelete an issue"]
+
+ [include "people-detail-row-part.ezt" role_perms.DeleteAny member_perms.DeleteAny "DeleteAny" "Delete comments by anyone"]
+ [include "people-detail-row-part.ezt" role_perms.EditAnyMemberNotes member_perms.EditAnyMemberNotes "EditAnyMemberNotes" "Edit anyone's member notes"]
+ [include "people-detail-row-part.ezt" role_perms.ModerateSpam member_perms.ModerateSpam "ModerateSpam" "Mark or un-mark issues and comments as spam"]
+
+
+
+ [if-any offer_edit_perms displayed_extra_perms]
+  <tr><th colspan="2">Custom permissions</th></tr>
+ [end]
+
+ [if-any offer_edit_perms]
+  <tr>
+   <td id="displayed_extra_perms" colspan="2">
+   <div style="width:12em">
+    [for displayed_extra_perms]
+        <input style="width:100%" name="extra_perms"
+               value="[displayed_extra_perms]">
+    [end]
+     <input style="width:100%" name="extra_perms"
+            id="first_extra_perms"
+            value="" autocomplete="off">
+   </div>
+   </td>
+  </tr>
+ [else]
+   [for displayed_extra_perms]
+    <tr>
+     <td>
+      <input type="checkbox" checked="checked" disabled="disabled">
+      [displayed_extra_perms]
+     </td>
+     <td></td>
+    </tr>
+   [end]
+ [end]
+
+</table>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  function _addInput(event) {
+    if (event.target.value == "") {
+      return;
+    }
+    var area = event.target.parentNode;
+    var newInput = document.createElement("input");
+    newInput.style.width = "100%";
+    newInput.name = event.target.name;
+    newInput.onfocus = function(e) {
+        _acrob(null);
+        _acof(e);
+    };
+    newInput.setAttribute("autocomplete", "off");
+    newInput.addEventListener("keyup", _addInput);
+    area.appendChild(newInput);
+    area.appendChild(document.createElement("br"));
+
+    // Make it only fire once.
+    event.target.removeEventListener("keyup", _addInput);
+  }
+
+  if ($("first_extra_perms"))
+    $("first_extra_perms").addEventListener("keyup", _addInput);
+});
+</script>
diff --git a/templates/project/people-detail-row-part.ezt b/templates/project/people-detail-row-part.ezt
new file mode 100644
index 0000000..785005f
--- /dev/null
+++ b/templates/project/people-detail-row-part.ezt
@@ -0,0 +1,29 @@
+[#  Display one row in the permissions table.
+
+Args:
+  arg0: True if the permission is native to the role. So, it cannot be removed.
+  arg1: True if the user has this permission. So, it will be shown when not in editing mode.
+  arg2: Permission name.
+  arg3: Permission description.
+
+References globals:
+  offer_edit_perms: True if the user can edit permissions on this page.
+]
+
+<tr>
+ <td>
+   <input type="checkbox" [if-any arg1]checked="checked"[end] id="[arg2]"
+    [if-any offer_edit_perms]
+      [if-any arg0]
+       disabled="disabled"
+      [else]
+       name="extra_perms" value="[arg2]"
+      [end]
+    [else]
+      disabled="disabled"
+    [end]
+    >
+  <label for="[arg2]">[arg2]</label>
+ </td>
+ <td>[arg3]</td>
+</tr>
diff --git a/templates/project/people-list-page.ezt b/templates/project/people-list-page.ezt
new file mode 100644
index 0000000..f3756e8
--- /dev/null
+++ b/templates/project/people-list-page.ezt
@@ -0,0 +1,197 @@
+[define title]People[end]
+[define category_css]css/ph_list.css[end]
+[if-any is_hotlist][define category2_css]css/ph_detail.css[end][end]
+[include "../framework/header.ezt" "hidetabs"]
+[include "../framework/js-placeholders.ezt"]
+
+<form method="POST" action=[if-any is_hotlist]"people.do"[else]"list.do"[end] id="membership_form">
+<input type="hidden" name="token" value="[form_token]">
+[if-any newly_added_views]
+  <br/>
+  The following new members were successfully added:
+  <br/>
+  [for newly_added_views]
+    <a href="[newly_added_views.detail_url]">[newly_added_views.user.display_name]</a> ([newly_added_views.role])
+    <br/>
+  [end]
+  <br/>
+[end]
+
+<div id="colcontrol">
+   <div class="list">
+     [if-any pagination.visible]
+       <div class="pagination">
+         [if-any pagination.prev_url]<a href="[pagination.prev_url]"><b>&lsaquo;</b> Prev</a>[end]
+         Members [pagination.start] - [pagination.last] of [pagination.total_count]
+         [if-any pagination.next_url]<a href="[pagination.next_url]">Next <b>&rsaquo;</b></a>[end]
+       </div>
+     [end]
+
+     <h4 style="display: inline">[if-any is_hotlist]Hotlist[else]Project[end] People</h4>
+
+     [if-any read_only][else]
+       [if-any offer_membership_editing]
+        <input type="button" value="Add members"
+               id="add_members_button" class="primary">
+        <input type="submit" value="Remove members"
+               id="removebtn" class="secondary" name="removebtn" disabled="disabled">
+        [# TOOD(jrobbins): extra confirmation when removing yourself as owner.]
+        [if-any is_hotlist]
+          <a id="transfer-ownership" class="buttonify">Transfer ownership</a>
+          [include "../features/transfer-hotlist-form.ezt"]
+        [end]
+       [end]
+       [if-any is_hotlist]
+        [if-any offer_remove_self]
+         <a id="remove-self" class="buttonify">Remove myself</a>
+         [include "../features/remove-self-hotlist-form.ezt"]
+        [end]
+       [end]
+     [end]
+   </div>
+
+  <table cellspacing="0" cellpadding="2" border="0" class="results striped vt" id="resultstable" width="100%">
+  <tbody>
+   [if-any pagination.visible_results]
+
+      <tr id="headingrow">
+       [if-any offer_membership_editing]
+         <th style="border-right:0; padding-right:2px">&nbsp;</th>
+       [end]
+
+       <th style="white-space:nowrap">Name</th>
+       <th style="white-space:nowrap">Role</th>
+       [if-any is_hotlist]
+       [else]
+       <th style="white-space:nowrap">Autocomplete</th>
+       <th style="white-space:nowrap">Notes</th>
+       [end]
+      </tr>
+
+      [for pagination.visible_results]
+       [if-any is_hotlist]
+         [include "people-list-row-part.ezt" "hotlist"]
+       [else]
+        [include "people-list-row-part.ezt" "project"]
+       [end]
+      [end]
+
+   [else]
+    <tr>
+     <td colspan="40" class="id">
+      <div style="padding: 3em; text-align: center">
+       This [if-any is_hotlist]hotlist[else]project[end] does not have any members.
+      </div>
+     </td>
+    </tr>
+   [end]
+
+
+  </tbody>
+  </table>
+  <div class="list-foot">
+    <div class="pagination">
+    [if-any pagination.prev_url]<a href="[pagination.prev_url]"><b>&lsaquo;</b> Prev</a>[end]
+    [pagination.start] - [pagination.last] of [pagination.total_count]
+    [if-any pagination.next_url]<a href="[pagination.next_url]">Next <b>&rsaquo;</b></a>[end]
+    </div>
+  </div>
+</div>
+
+[if-any untrusted_user_groups]
+  <div style="width:45em">
+    [include "untrusted-user-groups-part.ezt"]
+  </div>
+[end]
+
+[if-any read_only][else]
+  [if-any is_hotlist]
+  [include "people-add-members-form.ezt" "hotlist"]
+  [else]
+  [include "people-add-members-form.ezt" "project"]
+  [end]
+  [# TODO(jojwang): make more elegant later, just one line]
+[end]
+
+</form>
+
+[if-any offer_membership_editing]
+  <script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+    $("add_members_button").addEventListener("click", _openAddMembersForm);
+
+    function _countChecked(opt_className) {
+      var numChecked = 0;
+      var inputs = document.getElementsByTagName('input');
+      for (var i = 0; i < inputs.length; i++) {
+        var el = inputs[[]i];
+        if (el.type == 'checkbox' && el.name == 'remove' && el.checked &&
+            (!opt_className || opt_className == el.className)) {
+          numChecked++;
+        }
+      }
+      return numChecked;
+    }
+
+   function _enableRemoveButton() {
+     var removeButton = document.getElementById('removebtn');
+     if (_countChecked() > 0) {
+       removeButton.disabled = false;
+     } else {
+       removeButton.disabled = true;
+     }
+   }
+
+   setInterval(_enableRemoveButton, 700);
+
+   function _preventAbandonment(event) {
+      var meCheckbox = document.getElementById("me_checkbox");
+      if (meCheckbox && meCheckbox.checked) {
+        numOwnersChecked = _countChecked("owner");
+        if (numOwnersChecked == [total_num_owners]) {
+          alert("You cannot remove all project owners.");
+          event.preventDefault();
+        } else {
+          if (!confirm("Remove yourself as project owner?\n" +
+                       "You will be locked out of making further changes.")) {
+              event.preventDefault();
+          }
+        }
+      }
+      return true;
+   }
+   [if-any check_abandonment]
+     $("membership_form").addEventListener("submit", _preventAbandonment);
+   [end]
+
+   [if-any is_hotlist]
+   initializeDialogBox("[hotlist_id]");
+   [end]
+});
+  </script>
+[end]
+[if-any is_hotlist][if-any offer_remove_self]
+  <script type="text/javascript" nonce="[nonce]">
+  runOnLoad(function () {initializeDialogBoxRemoveSelf()});
+  </script>
+[end][end]
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  function _handleResultsClick(event) {
+    var target = event.target;
+    if (target.tagName == "A")
+      return;
+    if (target.classList.contains("rowwidgets") || target.parentNode.classList.contains("rowwidgets"))
+      return;
+    if (target.tagName != "TR") target = target.parentNode;
+    _go(target.attributes[[]"data-url"].value,
+        (event.metaKey || event.ctrlKey || event.button == 1));
+  };
+  _addClickListener($("resultstable"), _handleResultsClick);
+
+});
+</script>
+
+
+[include "../framework/footer.ezt"]
diff --git a/templates/project/people-list-row-part.ezt b/templates/project/people-list-row-part.ezt
new file mode 100644
index 0000000..f30eaf5
--- /dev/null
+++ b/templates/project/people-list-row-part.ezt
@@ -0,0 +1,62 @@
+[define detail_url][pagination.visible_results.detail_url][end]
+<tr data-url="[detail_url]">
+
+  [if-any offer_membership_editing]
+    [is arg0 "hotlist"][is pagination.visible_results.role "Owner"]
+    <td style="padding-right:2px" class="rowwidgets"></td>
+    [else]
+     <td style="padding-right:2px" class="rowwidgets">
+         <input type="checkbox" name="remove"
+                value="[pagination.visible_results.user.email]"
+                >
+     </td>
+    [end]
+    [else]
+     <td style="padding-right:2px" class="rowwidgets">
+         <input type="checkbox" name="remove"
+                [is pagination.visible_results.role "Owner"]class="owner"[end]
+                value="[pagination.visible_results.user.email]"
+                [if-any pagination.visible_results.viewing_self]
+                  id="me_checkbox"
+                [end]
+                >
+     </td>
+  [end][end]
+
+  <td style="white-space:nowrap; text-align:left;" class="id">
+     <a href="[detail_url]"
+      >[pagination.visible_results.user.display_name]</a>
+      [if-any pagination.visible_results.viewing_self]
+       <b>- me</b>
+      [end]
+  </td>
+
+  <td>
+    <a href="[detail_url]" style="white-space:nowrap">
+      [pagination.visible_results.role]<br>
+      [is arg0 "hotlist"][else]
+        [for pagination.visible_results.extra_perms]
+          <div style="font-size:90%">+ [pagination.visible_results.extra_perms]</div>
+        [end]
+      [end]
+    </a>
+  </td>
+
+  <td style="white-space:nowrap">
+    [is arg0 "hotlist"][else]
+      [if-any pagination.visible_results.is_service_account]
+        <a href="[detail_url]">Excluded</a>
+      [else][if-any pagination.visible_results.ac_include]
+        [# Nothing is displayed when the member is included.]
+      [else]
+        <a href="[detail_url]">Excluded</a>
+      [end][end]
+    [end]
+  </td>
+
+  [is arg0 "hotlist"][else]
+  <td width="90%">
+    <a href="[detail_url]">[pagination.visible_results.notes]</a>
+  </td>
+  [end]
+</tr>
diff --git a/templates/project/project-admin-advanced-page.ezt b/templates/project/project-admin-advanced-page.ezt
new file mode 100644
index 0000000..de91e40
--- /dev/null
+++ b/templates/project/project-admin-advanced-page.ezt
@@ -0,0 +1,11 @@
+[include "../framework/header.ezt" "showtabs"]
+
+ <form action="adminAdvanced.do" method="POST">
+  <input type="hidden" name="token" value="[form_token]">
+
+  [include "project-admin-publishing-part.ezt"]
+  [include "project-admin-quota-part.ezt"]
+
+ </form>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/project/project-admin-page.ezt b/templates/project/project-admin-page.ezt
new file mode 100644
index 0000000..84c001f
--- /dev/null
+++ b/templates/project/project-admin-page.ezt
@@ -0,0 +1,134 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+
+ <form action="admin.do" method="POST" autocomplete="off" enctype="multipart/form-data">
+  <input type="hidden" name="token" value="[form_token]">
+
+<h4>Project metadata</h4>
+
+<div class="section">
+  [include "../framework/project-descriptive-fields.ezt"]
+</div>
+
+
+<h4>Project access</h4>
+
+<div class="section">
+  [if-any offer_access_level initial_access]
+    <br>This project may be viewed by:
+    [include "../framework/project-access-part.ezt" "dontchecksubmit"]<br>
+  [end]
+
+<div class="section">
+ <div class="closed">
+  <p>Restriction labels allow project members to restrict access to individual
+     issues.
+  <a class="ifClosed toggleHidden" href="#" style="font-size:90%; margin-left:.5em">Learn more</a></p>
+  <div class="ifOpened help">
+      Normally, if a project member may edit the labels, then they may also
+      edit restriction labels.  That allows project committers to adjust access
+      controls for the items that they are working on.  However, some project
+      owners may prefer that once a restriction label is in place, only a project
+      owner may remove it.
+  </div>
+ </div>
+ <input type="checkbox" name="only_owners_remove_restrictions"
+        id="only_owners_remove_restrictions"
+        [if-any only_owners_remove_restrictions]checked="checked"[end] >
+ <label for="only_owners_remove_restrictions">Only project owners
+  may remove <tt>Restrict-*</tt> labels</label>
+</div>
+
+<div class="section">
+ <div class="closed">
+  <p>Collaboration style
+  <a class="ifClosed toggleHidden" href="#" style="font-size:90%; margin-left:.5em">Learn more</a></p>
+  <div class="ifOpened help">
+      Project workspaces are usually intended to promote collaboration among
+      all project members.  However, sometimes a compartmentalized collaboration
+      style is more appropriate.  For example, one company might want to work
+      with several partners, but not let each partner know about the others.
+      Note: In such a project, all artifacts should have restriction labels.
+  </div>
+ </div>
+ <input type="checkbox" name="only_owners_see_contributors" id="only_owners_see_contributors"
+        [if-any only_owners_see_contributors]checked="checked"[end] >
+ <label for="only_owners_see_contributors">Only project owners may see the list of contributors.</label>
+</div>
+
+</div>
+
+
+<h4>Activity notifications</h4>
+
+<div class="section">
+  <p>Email notifications of issue tracker activity will automatically be sent to
+     the following email address.</p>
+
+   <table cellpadding="2">
+     <tr><th>All issue changes:</th>
+      <td><input type="email" name="issue_notify" size="35" value="[issue_notify]"><br>
+       [if-any errors.issue_notify]
+       <div class="fielderror">[errors.issue_notify]</div>
+       [end]
+      </td>
+     </tr>
+   </table>
+  [# TODO: validate as address is entered ]
+
+  [include "../framework/admin-email-sender-part.ezt"]
+
+ <div class="closed">
+  <p>Notification contents
+  <a class="ifClosed toggleHidden" href="#" style="font-size:90%; margin-left:.5em">Learn more</a></p>
+  <div class="ifOpened help">
+      By default, notifications content will be limited based on user preference,
+      Restrict-* labels, and their membership in a given project. This option
+      forces the full notification content to be sent regardless of other factors.
+  </div>
+ </div>
+ <input type="checkbox" name="issue_notify_always_detailed" id="issue_notify_always_detailed"
+        [if-any issue_notify_always_detailed]checked="checked"[end] >
+ <label for="issue_notify_always_detailed">Always send detailed notification content.</label>
+</div>
+
+
+<h4>Email reply processing</h4>
+
+<div class="section">
+ <div class="closed">
+  <p>Users may add comments and make updates by replying to
+   certain notification emails.
+  <a class="ifClosed toggleHidden" style="font-size:90%; margin-left:.5em">Learn more</a></p>
+  <div class="ifOpened help">
+      Users may add comments to an issue
+      by replying to a notification email:
+
+      <ul>
+       <li>Look for a note in the footer of the email indicating that
+           a reply will be processed by the server.</li>
+       <li>Comments must be in replies to notification emails sent directly
+           to the member, not through a mailing list.</li>
+       <li>The reply must be <tt>From:</tt> the same email address to which
+           the notification was sent.</li>
+       <li>Project members who have permission to edit issues may make
+           changes via email replies.</li>
+      </ul>
+  </div>
+ </div>
+ <input type="checkbox" name="process_inbound_email" id="process_inbound_email"
+        [if-any process_inbound_email]checked="checked"[end] >
+ <label for="process_inbound_email">Process email replies</label>
+</div>
+
+<br>
+
+  <input type="submit" id="savechanges" name="btn" value="Save changes" class="submit">
+ </form>
+
+[end]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/project/project-admin-publishing-part.ezt b/templates/project/project-admin-publishing-part.ezt
new file mode 100644
index 0000000..bef52df
--- /dev/null
+++ b/templates/project/project-admin-publishing-part.ezt
@@ -0,0 +1,110 @@
+[# This is the "Project publishing options" on the "Advanced" subtab. ]
+
+<h4>Project state</h4>
+
+<div class="section">
+<table class="vt" cellspacing="20" style="width:60em">
+ [if-any offer_archive]
+ <tr>
+  <td>
+    <input type="submit" name="archivebtn" style="width:6em"
+           value="Archive">
+  </td>
+  <td>
+    Archive this project. It will only be visible read-only to
+    project members.  Once it is archived, you may unarchive it, or go ahead
+    and fully delete it.
+    <br><br>
+  </td>
+ </tr>
+ [end]
+
+ [if-any offer_delete]
+ <tr>
+  <td>
+    <input type="submit" name="deletebtn" style="width:6em"
+           value="Delete" id="delbtn">
+  </td>
+  <td>
+    Completely delete this project now.
+    <br><br>
+  </td>
+ </tr>
+ [end]
+
+ [if-any offer_publish]
+ <tr>
+  <td>
+    <input type="submit" name="publishbtn" style="width:6em"
+           value="Unarchive">
+  </td>
+  <td>
+    Make this project active again.
+    All project contents will become visible and editable to users as normal.
+    <br><br>
+  </td>
+ </tr>
+ [end]
+
+ [if-any offer_move]
+ <tr>
+  <td>
+    <input type="submit" name="movedbtn" style="width:6em"
+           value="Move">
+  </td>
+  <td>
+    If you have moved your project to a different location, enter it here and
+    users will be directed to that location.  If the destination is another
+    project on this site, enter just the new project name.  If the destination
+    is another site, enter the new project home page URL.
+    <br><br>
+    <b>Location:</b>
+    <input type="text" name="moved_to" size="50" value="[moved_to]">
+  </td>
+ </tr>
+ [end]
+
+ [if-any offer_doom]
+ <tr>
+  <td>
+    <input type="submit" name="doombtn" style="width:6em"
+           value="Doom">
+  </td>
+  <td>
+    Immediately archive this project and schedule it for deletion in
+    90 days.  Only a site admin can un-archive the project, not a
+    project owner.  In the meantime, the project will be read-only for
+    project members only, and the reason for deletion will be displayed at the top
+    of each page.
+    <br><br>
+    <b>Reason:</b>
+    <input type="text" name="reason" size="50" value="[default_doom_reason]">
+  </td>
+ </tr>
+ [end]
+
+ [if-any offer_archive offer_delete offer_publish offer_doom offer_move][else]
+ <tr>
+  <td>
+  </td>
+  <td>
+    You are not authorized to change the project state.
+  </td>
+ </tr>
+ [end]
+
+</table>
+
+</div>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  if ($("delbtn")) {
+    $("delbtn").addEventListener("click", function(event) {
+        var msg = "Really delete the whole project?\nThis operation cannot be undone.";
+        if (!confirm(msg))
+          event.preventDefault();
+    });
+  }
+});
+</script>
diff --git a/templates/project/project-admin-quota-part.ezt b/templates/project/project-admin-quota-part.ezt
new file mode 100644
index 0000000..1649eab
--- /dev/null
+++ b/templates/project/project-admin-quota-part.ezt
@@ -0,0 +1,30 @@
+<h4>Storage quota</h4>
+
+<div class="section">
+
+  <table cellspacing="6" style="padding:6px">
+    <tr>
+      <td>Issue attachments:</td>
+      <td>[include "quota-bar.ezt" attachment_quota]</td>
+    </tr>
+    <tr>
+      <td style="padding:15px 0">
+        [if-any offer_quota_editing]
+          <input type="submit" name="savechanges" value="Update Quota">
+        [end]
+      </td>
+      <td style="padding:15px 0">
+        [if-any offer_quota_editing]
+          <input type="number" name="[attachment_quota.field_name]" value="[attachment_quota.quota_mb]"
+                 size="5" min="1" style="font-size:90%; padding:0">
+          [if-any errors.attachment_quota]
+            <div class="fielderror">[errors.attachment_quota]</div>
+          [end]
+        [else]
+          [attachment_quota.quota_mb]
+        [end]
+        MB
+      </td>
+    </tr>
+  </table>
+</div>
diff --git a/templates/project/project-export-page.ezt b/templates/project/project-export-page.ezt
new file mode 100644
index 0000000..487b051
--- /dev/null
+++ b/templates/project/project-export-page.ezt
@@ -0,0 +1,23 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+<h3>Project export</h3>
+
+<form action="projectExport/json" method="GET">
+  [# We use xhr_token here because we are doing a GET on a JSON servlet.]
+  <input type="hidden" name="token" value="[xhr_token]">
+  <table cellpadding="3" class="rowmajor vt">
+    <tr>
+     <th>Format</th>
+     <td style="width:90%">JSON</td>
+   </tr>
+   <tr>
+     <th></th>
+     <td><input type="submit" name="btn" value="Submit"></td>
+   </tr>
+ </table>
+</form>
+
+
+
+[include "../framework/footer.ezt"]
diff --git a/templates/project/project-summary-page.ezt b/templates/project/project-summary-page.ezt
new file mode 100644
index 0000000..4c45bd3
--- /dev/null
+++ b/templates/project/project-summary-page.ezt
@@ -0,0 +1,102 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+[# TODO: add UI element permissions when I add editing elements to this page. ]
+[define show_star][if-any project_stars_enabled][if-any logged_in_user][if-any read_only][else]yes[end][end][end][end]
+
+<h4>Project: [projectname]</h4>
+<div class="section">
+  <div><i>[project_summary]</i></div>
+
+  [if-any show_star]
+  <div>
+   <a class="star" id="star"
+    style="color:[if-any is_project_starred]cornflowerblue[else]gray[end];"
+    title="[if-any is_project_starred]Un-s[else]S[end]tar this project">
+   [if-any is_project_starred]&#9733;[else]&#9734;[end]
+   </a>
+   Starred by [num_stars] user[plural]
+   </div>
+  [end]
+</div>
+
+
+<h4>Project description</h4>
+<div class="section">
+  [format "raw"][formatted_project_description][end]
+</div>
+
+<h4>Project access</h4>
+<div class="section">
+  [access_level.name]
+</div>
+
+
+[if-any home_page]
+  <h4>Project home page</h4>
+  <div class="section">
+    <a href="[home_page]">[home_page]</a>
+  </div>
+[end]
+
+[if-any docs_url]
+  <h4>Project documentation</h4>
+  <div class="section">
+    <a href="[docs_url]">[docs_url]</a>
+  </div>
+[end]
+
+[if-any source_url]
+  <h4>Project source browser</h4>
+  <div class="section">
+    <a href="[source_url]">[source_url]</a>
+  </div>
+[end]
+
+<!--  TODO(jrobbins): expose this later when it is more fully baked.
+
+<h4>Issue tracking process</h4>
+<div class="section">
+  Brief paragraph about how you intend this issue tracker to be used.
+
+</div>
+
+
+<h4>Ground rules</h4>
+  <ul>
+    <li>Non-members may enter new issues, but they will be moderated...</li>
+    <li>Please keep to the facts of the issue, don't try to advocate.</li>
+    <li>We are not currently looking for feature requests from non-members.</li>
+  </ul>
+
+
+
+<h4>Guidelines</h4>
+  <ul>
+    <li>Make sure the defect is verified with the latest build</li>
+    <li>Another bullet item describing how to collaborate in this project</li>
+    <li>A few more</li>
+    <li>And going into a little detail</li>
+    <li>But not too much... also need good defaults and examples</li>
+  </ul>
+
+
+<h4>For more information</h4>
+  <ul>
+    <li>Link to external docs</li>
+    <li>And discussion forums</li>
+  </ul>
+
+-->
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  if ($("star")) {
+    [# The user viewing this page wants to star the project *on* this page]
+    $("star").addEventListener("click", function () {
+       _TKR_toggleStar($("star"), "[projectname]");
+    });
+  }
+});
+</script>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/project/project-updates-page.ezt b/templates/project/project-updates-page.ezt
new file mode 100644
index 0000000..c3ee3b4
--- /dev/null
+++ b/templates/project/project-updates-page.ezt
@@ -0,0 +1,7 @@
+[define page_css]css/d_updates_page.css[end]
+
+[include "../framework/header.ezt" "hidetabs"]
+
+[include "../features/updates-page.ezt"]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/project/quota-bar.ezt b/templates/project/quota-bar.ezt
new file mode 100644
index 0000000..e89a6e2
--- /dev/null
+++ b/templates/project/quota-bar.ezt
@@ -0,0 +1,22 @@
+[# Display a little HTML bar and labels. This is not really a bar chart.
+   For comparison, see the bars in the top half of
+   https://www.google.com/accounts/ManageStorage
+
+arg0: an EZTItem with quota info for one component.
+]
+
+<table border="0" cellpadding="0" cellspacing="0">
+  <tr>
+    <td style="width:200px">
+      <table border="0" cellpadding="0" cellspacing="0" style="width:100%; border:1px solid #345BA6">
+        <tr>
+          <td style="background:#345BA6; width:[arg0.used_percent]%"> &nbsp; </td>
+          <td style="background:#EBF0FA; width:[arg0.avail_percent]%"> &nbsp; </td>
+        </tr>
+      </table>
+    </td>
+    <td style="padding-left:.7em">
+      [arg0.used] ([arg0.used_percent]%) in use
+    </td>
+  </tr>
+</table>
diff --git a/templates/project/rules-deleted-notification-email.ezt b/templates/project/rules-deleted-notification-email.ezt
new file mode 100644
index 0000000..2155004
--- /dev/null
+++ b/templates/project/rules-deleted-notification-email.ezt
@@ -0,0 +1,6 @@
+The following Filter rules were deleted for the [project_name] project.
+
+[for rules] <div>[rules]</div> [end]
+
+If these rules need to be added back please re-create them <a href="[rules_url]">here</a>
+<br>
diff --git a/templates/project/untrusted-user-groups-part.ezt b/templates/project/untrusted-user-groups-part.ezt
new file mode 100644
index 0000000..474cfe7
--- /dev/null
+++ b/templates/project/untrusted-user-groups-part.ezt
@@ -0,0 +1,14 @@
+[if-any perms.EditProject]
+  <div class="help" style="background: #ddf8cc;">
+       <b>Important:</b> Users could be given indirect
+       roles in this project without your knowledge.
+       The following user groups either have group managers
+       who are not project owners in this project, or they allow anyone to
+       join the group:
+       <ul style="list-style-type: none">
+         [for untrusted_user_groups]
+         <li>[untrusted_user_groups.email]</li> [# TODO(jrobbins): hyperlink]
+         [end]
+       </ul>
+  </div>
+[end]
diff --git a/templates/sitewide/403-page.ezt b/templates/sitewide/403-page.ezt
new file mode 100644
index 0000000..8d05784
--- /dev/null
+++ b/templates/sitewide/403-page.ezt
@@ -0,0 +1,12 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "hidetabs"]
+
+<h3>Permission denied</h3>
+
+<h4>What happened?</h4>
+
+<p>You do not have permission to view the requested page.</p>
+
+[if-any reason]<p>Reason: [reason].</p>[end]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/sitewide/group-admin-page.ezt b/templates/sitewide/group-admin-page.ezt
new file mode 100644
index 0000000..ccef3ed
--- /dev/null
+++ b/templates/sitewide/group-admin-page.ezt
@@ -0,0 +1,18 @@
+[define title]User Group: [groupname][end]
+[define category_css]css/ph_list.css[end]
+[include "../framework/header.ezt" "showusergrouptabs"]
+
+
+<form action="groupadmin.do" method="POST" autocomplete="off">
+ <input type="hidden" name="token" value="[form_token]">
+
+	<h4>Group membership visibility</h4>
+
+	The group members may be viewed by:
+	[include "../framework/group-setting-fields.ezt"]
+	<br>
+
+  <input type="submit" id="savechanges" name="btn" value="Save changes" class="submit">
+</form>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/sitewide/group-create-page.ezt b/templates/sitewide/group-create-page.ezt
new file mode 100644
index 0000000..707f380
--- /dev/null
+++ b/templates/sitewide/group-create-page.ezt
@@ -0,0 +1,40 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "hidetabs"]
+
+<h2>Create a new user group</h2>
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+
+<form action="createGroup.do" method="POST" id="create_group_form"
+      style="margin:1em">
+  <input type="hidden" name="token" value="[form_token]">
+
+  Group email address:<br>
+  <input size="30" type="text" id="groupname" name="groupname" value="[initial_name]">
+  <span class="graytext">Example: group-name@example.com</span>
+  <div class="fielderror">
+    <span id="groupnamefeedback"></span>
+    [if-any errors.groupname][errors.groupname][end]
+  </div>
+  <br>
+
+  Members viewable by:
+  [include "../framework/group-setting-fields.ezt"]
+  <br>
+
+  <input type="submit" id="submit_btn" name="btn" value="Create group">
+</form>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  $("create_group_form").addEventListener("submit", function() {
+    $("submit_btn").value = "Creating group...";
+    $("submit_btn").disabled = "disabled";
+  });
+});
+</script>
+
+[end][# not read-only]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/sitewide/group-detail-page.ezt b/templates/sitewide/group-detail-page.ezt
new file mode 100644
index 0000000..4b19aca
--- /dev/null
+++ b/templates/sitewide/group-detail-page.ezt
@@ -0,0 +1,105 @@
+[define title]User Group: [groupname][end]
+[define category_css]css/ph_list.css[end]
+[include "../framework/header.ezt" "showusergrouptabs"]
+[include "../framework/js-placeholders.ezt"]
+
+<form method="POST" action="edit.do">
+<input type="hidden" name="token" value="[form_token]">
+<div id="colcontrol">
+   <div class="list">
+     [if-any pagination.visible]
+       <div class="pagination">
+          [if-any pagination.prev_url]<a href="[pagination.prev_url]"><b>&lsaquo;</b> Prev</a>[end]
+          Members [pagination.start] - [pagination.last] of [pagination.total_count]
+          [if-any pagination.next_url]<a href="[pagination.next_url]">Next <b>&rsaquo;</b></a>[end]
+       </div>
+     [end]
+     <b>User Group: [groupname]</b>
+     [if-any offer_membership_editing]
+     <input type="button" value="Add members" style="font-size:80%; margin-left:1em"
+            id="add_members_button">
+     <input type="submit" value="Remove members" style="font-size:80%; margin-left:1em"
+            id="removebtn" name="removebtn" disabled="disabled">
+     [# TODO(jrobbins): extra confirmation when removing yourself as group owner.]
+     [end]
+   </div>
+
+  <p>Group type: [group_type]</p>
+
+  <table cellspacing="0" cellpadding="2" border="0" class="results striped vt" id="resultstable" width="100%">
+  <tbody>
+   <tr id="headingrow">
+     [if-any offer_membership_editing]
+       <th style="border-right:0; padding-right:2px">&nbsp;</th>
+     [end]
+     <th style="white-space:nowrap">Member</th>
+     <th style="white-space:nowrap">Role</th>
+   </tr>
+
+   [if-any pagination.visible_results]
+      [for pagination.visible_results]
+        <tr>
+          [if-any offer_membership_editing]
+            <td style="padding-right:2px">
+              <input type="checkbox" name="remove"
+                     value="[pagination.visible_results.email]">
+          </td>
+         [end]
+          <td class="id" style="text-align:left">
+            [include "../framework/user-link.ezt" pagination.visible_results]
+          </td>
+          <td style="text-align:left" width="90%">
+            <a href="[pagination.visible_results.profile_url]">[pagination.visible_results.role]</a>
+          </td>
+        </tr>
+      [end]
+   [else]
+       <tr><td colspan="40">
+            This user group has no members.
+        </td></tr>
+   [end]
+
+
+  </tbody>
+  </table>
+</div>
+
+[include "../project/people-add-members-form.ezt" "group"]
+
+</form>
+
+
+[if-any offer_membership_editing]
+  <script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+    function _countChecked(opt_className) {
+      var numChecked = 0;
+      var inputs = document.getElementsByTagName('input');
+      for (var i = 0; i < inputs.length; i++) {
+        var el = inputs[[]i];
+        if (el.type == 'checkbox' && el.name == 'remove' && el.checked &&
+            (!opt_className || opt_className == el.className)) {
+          numChecked++;
+        }
+      }
+      return numChecked;
+    }
+
+   function _enableRemoveButton() {
+     var removeButton = document.getElementById('removebtn');
+     if (_countChecked() > 0) {
+       removeButton.disabled = false;
+     } else {
+       removeButton.disabled = true;
+     }
+   }
+
+   setInterval(_enableRemoveButton, 700);
+
+   $("add_members_button").addEventListener("click", _openAddMembersForm);
+});
+  </script>
+[end]
+
+
+[include "../framework/footer.ezt"]
diff --git a/templates/sitewide/group-list-page.ezt b/templates/sitewide/group-list-page.ezt
new file mode 100644
index 0000000..14bdf57
--- /dev/null
+++ b/templates/sitewide/group-list-page.ezt
@@ -0,0 +1,95 @@
+[define title]User Groups[end]
+[define category_css]css/ph_list.css[end]
+[include "../framework/header.ezt" "hidetabs"]
+[include "../framework/js-placeholders.ezt"]
+
+<form method="POST" action='/hosting/deleteGroup.do'>
+<input type="hidden" name="token" value="[form_token]">
+<div id="colcontrol">
+   <div class="list">
+     <b>User Groups</b>
+     [if-any offer_group_deletion]
+     <input type="submit" value="Delete Groups" style="margin-left:1em"
+            id="removebtn" name="removebtn" disabled="disabled">
+     [end]
+     [if-any offer_group_creation]
+     <a href="/hosting/createGroup" class="buttonify" style="margin-left:1em">Create Group</a>
+     [end]
+   </div>
+
+  <table cellspacing="0" cellpadding="2" border="0" class="results striped" id="resultstable" width="100%">
+  <tbody>
+   [if-any groups]
+
+      <tr id="headingrow">
+        [if-any offer_group_deletion]
+          <th style="border-right:0; padding-right:2px" width="2%">&nbsp;</th>
+        [end]
+        <th style="white-space:nowrap">Name</th>
+        <th style="white-space:nowrap">Size</th>
+        <th style="white-space:nowrap">Member list visibility</th>
+      </tr>
+
+      [for groups]
+        <tr>
+          [if-any offer_group_deletion]
+            <td style="padding-right:2px" width="2%">
+              <input type="checkbox" name="remove"
+                     value="[groups.group_id]">
+            </td>
+          [end]
+          <td class="id" style="text-align:left"><a href="[groups.detail_url]">[groups.name]</a></td>
+          <td><a href="[groups.detail_url]">[groups.num_members]</a></td>
+          <td><a href="[groups.detail_url]">[groups.who_can_view_members]</a></td>
+        </tr>
+      [end]
+
+   [else]
+    <tr>
+     <td colspan="40" class="id">
+      <div style="padding: 3em; text-align: center">
+       No user groups have been defined.
+      </div>
+     </td>
+    </tr>
+   [end]
+
+
+  </tbody>
+  </table>
+</div>
+
+</form>
+
+[if-any offer_group_deletion]
+  <script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+    function _countChecked(opt_className) {
+      var numChecked = 0;
+      var inputs = document.getElementsByTagName('input');
+      for (var i = 0; i < inputs.length; i++) {
+        var el = inputs[[]i];
+        if (el.type == 'checkbox' && el.name == 'remove' && el.checked &&
+            (!opt_className || opt_className == el.className)) {
+          numChecked++;
+        }
+      }
+      return numChecked;
+    }
+
+   function _enableRemoveButton() {
+     var removeButton = document.getElementById('removebtn');
+     if (_countChecked() > 0) {
+       removeButton.disabled = false;
+     } else {
+       removeButton.disabled = true;
+     }
+   }
+
+   setInterval(_enableRemoveButton, 700);
+
+});
+  </script>
+[end]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/sitewide/hosting-home-page.ezt b/templates/sitewide/hosting-home-page.ezt
new file mode 100644
index 0000000..6f066fb
--- /dev/null
+++ b/templates/sitewide/hosting-home-page.ezt
@@ -0,0 +1,85 @@
+[define show_search_metadata]True[end]
+[define robots_no_index]true[end]
+[define category_css]css/ph_list.css[end]
+
+[include "../framework/header.ezt" "hidesearch"]
+
+[define prod_hosting_base_url]/hosting/[end]
+
+[if-any read_only][else]
+  [if-any can_create_project learn_more_link]
+    <div style="margin-top:3em; text-align:center;">
+      <div style="text-align:center;margin:1em">
+        [if-any can_create_project]
+          <a href="/hosting/createProject">Create a new project</a>
+        [end]
+
+        [if-any learn_more_link]
+          <a href="[learn_more_link]">Learn more about [site_name]</a>
+        [end]
+      </div>
+    </div>
+  [end]
+[end]
+
+<a href="/projects" style="display: block; padding: 0.5em 8px; width: 50%;
+  text-align: center; margin: auto; border: var(--chops-normal-border);
+  border-radius: 8px;">
+Preview a new project list for Monorail.
+</a>
+
+<div id="controls">
+  [include "../sitewide/project-list-controls.ezt" arg1]
+</div>
+
+<div id="project_list">
+  [if-any projects]
+    <table id="resultstable" class="resultstable results" width="100%" border="0" cellspacing="0" cellpadding="18">
+      <tr>
+        [if-any logged_in_user]<th></th>[end]
+        <th style="text-align:left">Name</th>
+        [if-any logged_in_user]<th style="text-align:left; white-space:nowrap">Your role</th>[end]
+        <th style="text-align:left">Stars</th>
+        <th style="text-align:left">Updated</th>
+        <th style="text-align:left">Summary</th>
+      </tr>
+      [for projects]
+        <tr data-url="[projects.relative_home_url]">
+          [include "project-list-row.ezt"]
+        </tr>
+      [end]
+    </table>
+  [else]
+   <p style="text-align:center;padding:0; margin:2em">
+     There were no visible projects found.
+   </p>
+  [end]
+</div>
+
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+   var stars = document.getElementsByClassName("star");
+   for (var i = 0; i < stars.length; ++i) {
+     var star = stars[[]i];
+     star.addEventListener("click", function (event) {
+         var projectName = event.target.getAttribute("data-project-name");
+         _TKR_toggleStar(event.target, projectName);
+     });
+   }
+
+  function _handleResultsClick(event) {
+    var target = event.target;
+    if (target.tagName == "A" || target.type == "checkbox" || target.className == "cb")
+      return;
+    while (target && target.tagName != "TR") target = target.parentNode;
+    _go(target.attributes[[]"data-url"].value,
+        (event.metaKey || event.ctrlKey || event.button == 1));
+  };
+  _addClickListener($("resultstable"), _handleResultsClick);
+
+
+});
+</script>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/sitewide/moved-page.ezt b/templates/sitewide/moved-page.ezt
new file mode 100644
index 0000000..391f957
--- /dev/null
+++ b/templates/sitewide/moved-page.ezt
@@ -0,0 +1,24 @@
+[include "../framework/header.ezt" "hidetabs"]
+
+<h3>Project has moved</h3>
+
+<h4>What happened?</h4>
+
+<p>Project "[project_name]" has moved to another location on the Internet.</p>
+
+<div style="margin:2em" class="help">
+  <b style="margin:0.5em">Your options:</b>
+
+  <ul>
+   [if-any moved_to_url]
+    <li>View the project at:
+     <a href="[moved_to_url]">[moved_to_url]</a></li>
+   [end]
+   <li><a href="http://www.google.com/search?q=[project_name]">Search the web</a>
+       for pages about "[project_name]".
+   </li>
+
+  </ul>
+</div>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/sitewide/project-404-page.ezt b/templates/sitewide/project-404-page.ezt
new file mode 100644
index 0000000..9bc2878
--- /dev/null
+++ b/templates/sitewide/project-404-page.ezt
@@ -0,0 +1,6 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+<center style="margin-top: 4em;">The page you asked for does not exist.</center>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/sitewide/project-create-page.ezt b/templates/sitewide/project-create-page.ezt
new file mode 100644
index 0000000..9bcb447
--- /dev/null
+++ b/templates/sitewide/project-create-page.ezt
@@ -0,0 +1,117 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "hidetabs"]
+
+<h2>Create a new project</h2>
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+
+<form action="createProject.do" method="POST" id="create_project_form"
+      style="margin:1em" enctype="multipart/form-data">
+  <input type="hidden" name="token" value="[form_token]">
+
+
+  Project name:<br>
+  <input size="30" type="text" id="projectname" name="projectname" autocomplete="off"
+         value="[initial_name]">
+  <span class="graytext">Example: my-project-name</span>
+  <div class="fielderror">&nbsp;
+    <span id="projectnamefeedback">
+       [if-any errors.projectname][errors.projectname][end]
+    </span>
+  </div>
+
+  [include "../framework/project-descriptive-fields.ezt"]
+  <br>
+
+  Viewable by:
+  [include "../framework/project-access-part.ezt" "checksubmit"]
+  <br>
+
+  <input type="submit" id="submit_btn" name="btn" value="Create project">
+</form>
+
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  [# TODO(jrobbins): move this to compiled Javascript. ]
+  var submit = document.getElementById('submit_btn');
+  submit.disabled = 'disabled';
+  var projectname = document.getElementById('projectname');
+  var access = document.getElementById('access');
+  var summary = document.getElementById('summary');
+  var description = document.getElementById('description');
+  var cg = document.getElementById('cg');
+  var oldName = '';
+  projectname.focus();
+  var solelyDigits = /^[[]-0-9]+$/
+  var hasUppercase = /[[]A-Z]/
+  var projectRE = /^[[]a-z0-9][[]-a-z0-9]*$/
+
+  function checkprojectname() {
+    name = projectname.value;
+    if (name != oldName) {
+      oldName = name;
+      feedback = document.getElementById('projectnamefeedback');
+      submit.disabled='disabled';
+      if (name == '') {
+        feedback.textContent = '';
+      } else if (hasUppercase.test(name)) {
+        feedback.textContent = 'Must be all lowercase';
+      } else if (solelyDigits.test(name)) {
+        feedback.textContent = 'Must include a lowercase letter';
+      } else if (!projectRE.test(name)) {
+        feedback.textContent = 'Invalid project name';
+      } else if (name.length > [max_project_name_length]) {
+        feedback.textContent = 'Project name is too long';
+      } else if(name[[]name.length - 1] == '-') {
+        feedback.textContent = "Project name cannot end with a '-'";
+      } else {
+        feedback.textContent = '';
+        checkname();
+        checksubmit();
+      }
+    }
+  }
+
+  var checkname = debounce(function() {
+    _CP_checkProjectName(projectname.value);
+  });
+
+  function checkempty(elemId) {
+    var elem = document.getElementById(elemId);
+    feedback = document.getElementById(elemId + 'feedback');
+    if (elem.value.length == 0) {
+      feedback.textContent = 'Please enter a ' + elemId;
+    } else {
+      feedback.textContent = ' ';
+    }
+    checksubmit();
+  }
+
+  function checksubmit() {
+  feedback = document.getElementById('projectnamefeedback');
+   submit.disabled='disabled';
+   if (projectname.value.length > 0 &&
+       summary.value.length > 0 &&
+       description.value.length > 0 &&
+       (cg == undefined || cg.value.length > 1) &&
+       feedback.textContent == '') {
+     submit.disabled='';
+   }
+  }
+  setInterval(checkprojectname, 700); [# catch changes that were not keystrokes.]
+  $("projectname").addEventListener("keyup", checkprojectname);
+  $("summary").addEventListener("keyup", function() { checkempty("summary"); });
+  $("description").addEventListener("keyup", function() { checkempty("description"); });
+  $("create_project_form").addEventListener("submit", function () {
+      $("submit_btn").value = "Creating project...";
+      $("submit_btn").disabled = "disabled";
+  });
+
+});
+</script>
+
+[end][# not read-only]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/sitewide/project-list-controls.ezt b/templates/sitewide/project-list-controls.ezt
new file mode 100644
index 0000000..7a88cee
--- /dev/null
+++ b/templates/sitewide/project-list-controls.ezt
@@ -0,0 +1,10 @@
+<div class="list">
+  <h4 style="display:inline">List of Projects</h4>
+  [if-any projects]
+    <div class="pagination">
+        [if-any pagination.prev_url]<a href="[pagination.prev_url]"><b>&lsaquo;</b> Prev</a>[end]
+        [pagination.start] - [pagination.last] of [pagination.total_count]
+        [if-any pagination.next_url]<a href="[pagination.next_url]">Next <b>&rsaquo;</b></a>[end]
+    </div>
+  [end]
+</div>
\ No newline at end of file
diff --git a/templates/sitewide/project-list-row.ezt b/templates/sitewide/project-list-row.ezt
new file mode 100644
index 0000000..a1ce4ae
--- /dev/null
+++ b/templates/sitewide/project-list-row.ezt
@@ -0,0 +1,54 @@
+[# This displays one list row of the project search results.
+
+No parameters are used, but it expects the "projects" loop variable to
+hold the current project.]
+
+[if-any logged_in_user]
+  [# Display star for logged in user to star this project]
+  <td>
+    [if-any logged_in_user]
+      <a class="star"
+       style="color:[if-any projects.starred]cornflowerblue[else]gray[end]"
+       title="[if-any projects.starred]Un-s[else]S[end]tar this project" data-project-name="[projects.project_name]">
+      [if-any projects.starred]&#9733;[else]&#9734;[end]
+      </a>
+    [end]
+  </td>
+[end]
+
+[# Project name link to this project]
+<td style="white-space:nowrap" class="id">
+  <a href="[projects.relative_home_url]/" style="font-size:medium">
+    [projects.project_name]
+  </a>
+</td>
+
+[# Display membership and star only if user is logged in]
+[if-any logged_in_user]
+  [# User's membership status of this project]
+  <td>
+    [if-any projects.membership_desc][projects.membership_desc][end]
+  </td>
+[end]
+
+[# Display how many have starred this project]
+<td style="white-space:nowrap">
+  [is projects.num_stars "0"]
+  [else]
+    <span id="star_count-[projects.project_name]">[projects.num_stars]</span>
+  [end]
+</td>
+
+[# When project was last updated]
+<td style="white-space:nowrap">
+  [if-any projects.last_updated_exists]
+    [projects.recent_activity]
+  [end]
+</td>
+
+[# The short summary of this project]
+<td style="width:100%">
+  [is projects.limited_summary ""][else]
+    [projects.limited_summary]<br>
+  [end]
+</td>
diff --git a/templates/sitewide/unified-settings.ezt b/templates/sitewide/unified-settings.ezt
new file mode 100644
index 0000000..1f2c79c
--- /dev/null
+++ b/templates/sitewide/unified-settings.ezt
@@ -0,0 +1,93 @@
+[# common form fields for changing user settings ]
+<input type="hidden" name="token" value="[form_token]">
+
+
+<h4>Privacy</h4>
+<div style="margin:0 0 2em 2em">
+ <input type="checkbox" name="obscure_email" id="obscure_email" value="1"
+        [if-any read_only]disabled="disabled"[end]
+        [if-any settings_user_pb.obscure_email_bool]checked="checked"[end] >
+ <label for="obscure_email">
+   When [if-any self]I participate[else]this user participates[end]
+   in projects, show non-members [if-any self]my[else]this user's[end] email address as
+   "[settings_user.obscured_username]...@[settings_user.domain]", instead of
+   showing the full address.
+ </label>
+
+ <br><br>
+</div>
+
+<h4>Notifications</h4>
+<div style="margin:0 0 2em 2em">
+  [# TODO(jrobbins): re-implement issue preview on hover in polymer.]
+
+ <p>
+  Whenever an issue is changed by another user, send
+  [if-any self]me[else]this user[end] an email:
+ </p>
+ <input type="checkbox" name="notify" id="notify" value="1"
+        [if-any read_only]disabled="disabled"[end]
+        [if-any settings_user_pb.notify_issue_change_bool]checked="checked"[end] >
+ <label for="notify">
+   If [if-any self]I am[else]this user is[end] in the issue's <b>owner</b> or <b>CC</b> fields.
+ </label><br>
+ <input type="checkbox" name="notify_starred" id="notify_starred" value="1"
+        [if-any read_only]disabled="disabled"[end]
+        [if-any settings_user_pb.notify_starred_issue_change_bool]checked="checked"[end]  >
+ <label for="notify_starred">
+  If [if-any self]I[else]this user[end] <b>starred</b> the issue.
+ </label>
+
+ <p>
+  When a date specified in an issue arrives, and that date field is configured to notify
+  issue participants:
+ </p>
+ <input type="checkbox" name="notify_starred_ping" id="notify_starred_ping" value="1"
+        [if-any read_only]disabled="disabled"[end]
+        [if-any settings_user_pb.notify_starred_ping_bool]checked="checked"[end] >
+ <label for="notify_starred_ping">
+   Also send a notification if [if-any self]I[else]this user[end] <b>starred</b> the issue.
+ </label><br>
+
+ <p>
+  Email notifications sent to me should:
+ </p>
+ <input type="checkbox" name="email_compact_subject" id="email_compact_subject" value="1"
+        [if-any read_only]disabled="disabled"[end]
+        [if-any settings_user_pb.email_compact_subject_bool]checked="checked"[end] >
+ <label for="email_compact_subject">
+   Format the subject line compactly
+ </label><br>
+ <input type="checkbox" name="email_view_widget" id="email_view_widget" value="1"
+        [if-any read_only]disabled="disabled"[end]
+        [if-any settings_user_pb.email_view_widget_bool]checked="checked"[end]  >
+ <label for="email_view_widget">
+   Include a "View Issue" button in Gmail
+ </label><br>
+ <br>
+</div>
+
+<h4>Community interactions</h4>
+<div style="margin:0 0 2em 2em">
+ <input type="checkbox" name="restrict_new_issues" id="restrict_new_issues" value="1"
+        [if-any read_only]disabled="disabled"[end]
+        [if-any settings_user_prefs.restrict_new_issues]checked="checked"[end] >
+ <label for="restrict_new_issues">
+   When entering a new issue, add Restrict-View-Google to the form.
+ </label><br>
+
+ <input type="checkbox" name="public_issue_notice" id="public_issue_notice" value="1"
+        [if-any read_only]disabled="disabled"[end]
+        [if-any settings_user_prefs.public_issue_notice]checked="checked"[end] >
+ <label for="public_issue_notice">
+   When viewing a public issue, display a banner.
+ </label><br>
+</div>
+
+<h4>Availability</h4>
+<div style="margin:0 0 2em 2em">
+ Vacation message:
+ <input type="text" size="50" name="vacation_message" id="vacation_message"
+        value="[settings_user_pb.vacation_message]"
+        [if-any read_only]disabled="disabled"[end] >
+</div>
diff --git a/templates/sitewide/user-clear-bouncing-page.ezt b/templates/sitewide/user-clear-bouncing-page.ezt
new file mode 100644
index 0000000..5c9123d
--- /dev/null
+++ b/templates/sitewide/user-clear-bouncing-page.ezt
@@ -0,0 +1,26 @@
+[include "../framework/header.ezt" "showusertabs" "t1"]
+
+<div id="colcontrol">
+<h2>Reset bouncing email</h2>
+
+[if-any last_bounce_str]
+  <p>
+    <b>Email to this user bounced:</b>
+    [last_bounce_str]
+  </p>
+[end]
+
+
+<p>If you believe that email sent to this user will no longer bounce,
+   press the button below to clear the email bouncing status.</p>
+
+<form action="clearBouncing.do" method="POST">
+  <input type="hidden" name="token" value="[form_token]">
+  <input id="submit_btn" type="submit" name="btn"
+         value="Clear bouncing status">
+</form>
+
+</div>
+
+
+[include "../framework/footer.ezt"]
diff --git a/templates/sitewide/user-profile-page-polymer.ezt b/templates/sitewide/user-profile-page-polymer.ezt
new file mode 100644
index 0000000..fe10704
--- /dev/null
+++ b/templates/sitewide/user-profile-page-polymer.ezt
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<title>Monorail: Polymer Profile Page</title>
+
+[include "header-shared.ezt"]
+
+[include "../webpack-out/mr-profile-page.ezt"]
+
+<mr-profile-page
+  viewedUserId="[viewed_user_id]"
+  viewedUser="[viewed_user_display_name]" [if-any logged_in_user]
+  user="[logged_in_user.email]"[end]
+  loginUrl="[login_url]"
+  logoutUrl="[logout_url]"
+  lastVisitStr="[last_visit_str]"
+  starredUsers="[starred_users_json]"
+></mr-profile-page>
+
+[include "../framework/polymer-footer.ezt"]
diff --git a/templates/sitewide/user-profile-page.ezt b/templates/sitewide/user-profile-page.ezt
new file mode 100644
index 0000000..7517d15
--- /dev/null
+++ b/templates/sitewide/user-profile-page.ezt
@@ -0,0 +1,474 @@
+[define category_css]css/ph_list.css[end]
+[include "../framework/header.ezt" "showusertabs" "t1"]
+[include "../framework/js-placeholders.ezt"]
+<div id="colcontrol">
+
+<h2>
+  [if-any viewing_self][else]
+   [if-any user_stars_enabled]
+    [if-any logged_in_user]
+     [if-any read_only][else]
+          [if-any user_stars_enabled]
+           [if-any logged_in_user]
+            [if-any read_only][else]
+             <a id="user_star"
+              style="color:[if-any is_user_starred]cornflowerblue[else]gray[end]"
+              title="[if-any is_user_starred]Un-s[else]S[end]tar this user">
+             [if-any is_user_starred]&#9733;[else]&#9734;[end]
+             </a>
+            [end]
+           [end]
+          [end]
+     [end]
+    [end]
+   [end]
+ [end]
+
+ [viewed_user_display_name]
+</h2>
+
+<p>
+  <b>Last visit:</b>
+  [last_visit_str]
+</p>
+
+[if-any last_bounce_str]
+  <p>
+    <b>Email to this user bounced:</b>
+    [last_bounce_str]
+    [define offer_clear_bouncing]No[end]
+    [if-any viewing_self][define offer_clear_bouncing]Yes[end][end]
+    [if-any perms._EditOtherUsers][define offer_clear_bouncing]Yes[end][end]
+    [is offer_clear_bouncing "Yes"]
+      <a href="[viewed_user.profile_url]clearBouncing" style="margin-left:2em">Clear</a>
+    [end]
+  </p>
+[end]
+
+[if-any vacation_message]
+  <p>
+    <b>Vacation message:</b>
+    [vacation_message]
+  </p>
+[end]
+
+[if-any linked_parent]
+  <p>
+  <b>Linked parent account:</b>
+    [include "../framework/user-link.ezt" linked_parent]
+    [if-any offer_unlink perms._EditOtherUsers]
+      <input type="button" class="unlink_account secondary"
+             data-parent="[linked_parent.email]"
+             data-child="[viewed_user.email]"
+             value="Unlink">
+    [end]
+  </p>
+[end]
+
+[if-any linked_children]
+  <p>
+  <b>Linked child accounts:</b>
+  [for linked_children]
+    [include "../framework/user-link.ezt" linked_children]
+    [if-any offer_unlink perms._EditOtherUsers]
+      <input type="button" class="unlink_account secondary"
+             data-parent="[viewed_user.email]"
+             data-child="[linked_children.email]"
+             value="Unlink">
+    [end]
+  [end]
+  </p>
+[end]
+
+[if-any incoming_invite_users]
+  <b>Accept linked sub-account:</b>
+    [for incoming_invite_users]
+      <div>
+        [include "../framework/user-link.ezt" incoming_invite_users]
+        [if-any can_edit_invites][# TODO(jrobbins): allow site admin to accept invites for other users.]
+          <input type="button" class="incoming_invite" data-email="[incoming_invite_users.email]" value="Accept">
+          [# TODO(jrobbins): Button to decline invite.]
+        [end]
+      </div>
+    [end]
+[else][if-any outgoing_invite_users]
+  <b>Waiting for acceptance by parent-account:</b>
+    [for outgoing_invite_users]
+      <div>
+        [include "../framework/user-link.ezt" outgoing_invite_users]
+      </div>
+    [end]
+[else][if-any possible_parent_accounts]
+  <b>Link this account to:</b>
+  <select id="parent_to_invite">
+    <option value="" selected="selected">----</option>
+    [for possible_parent_accounts]
+      <option value="[possible_parent_accounts]">[possible_parent_accounts]</option>
+    [end]
+  </select>
+  [if-any can_edit_invites][# TODO(jrobbins): allow site admin to create invites for other users.]
+    <button id="create_linked_account_invite" disabled="disabled">Link</button>
+  [end]
+[end][end][end]
+
+
+[if-any user_stars_enabled]
+<p>
+<b>Starred developers:</b>
+[if-any starred_users]
+[for starred_users]
+  [include "../framework/user-link.ezt" starred_users][if-index starred_users last][else], [end]
+[end]
+[else]<i>None</i>[end]
+</p>
+[end]
+<br>
+
+<div class="list">
+  <table style="width: 100%;" cellspacing="0" cellpadding="0">
+  <tbody><tr>
+     <th style="text-align: left;">Projects
+     </th>
+  </tr></tbody>
+  </table>
+</div>
+
+<table cellspacing="0" cellpadding="2" border="0" class="results striped" id="projecttable" width="100%">
+    <tbody>
+      <tr id="headingrow">
+        [if-any logged_in_user]
+        <th style="white-space:nowrap; width:3%;"></th>
+        [end]
+        <th style="white-space:nowrap; width:15%;">Role</th>
+        <th style="white-space:nowrap; width:25%;">Project</th>
+        <th style="white-space:nowrap; width:57%;">Summary</th>
+      </tr>
+ [if-any owner_of_projects committer_of_projects contributor_to_projects]
+      [if-any owner_of_projects]
+        [for owner_of_projects]
+        <tr data-url="[owner_of_projects.relative_home_url]" data-project-name="[owner_of_projects.project_name]">
+        [if-any logged_in_user]
+        <td class="rowwidgets">
+         <a class="star"
+          style="color:[if-any owner_of_projects.starred]cornflowerblue[else]gray[end]"
+          title="[if-any owner_of_projects.starred]Un-s[else]S[end]tar this project"
+          data-project-name="[owner_of_projects.project_name]">
+         [if-any owner_of_projects.starred]&#9733;[else]&#9734;[end]
+         </a>
+        </td>
+        [end]
+        <td>Owner</td>
+        <td class="id" name="owner">
+        <a href="[owner_of_projects.relative_home_url]/">[owner_of_projects.project_name]</a>
+          [is owner_of_projects.state_name "HIDDEN"]<span style="color:red"> - hidden</span>[end]
+        </td>
+        <td>[owner_of_projects.summary]</td>
+        </tr>
+        [end]
+      [end]
+      [if-any committer_of_projects]
+        [for committer_of_projects]
+        <tr data-url="[committer_of_projects.relative_home_url]" data-project-name="[committer_of_projects.project_name]">
+        [if-any logged_in_user]
+        <td class="rowwidgets">
+         <a class="star"
+          style="color:[if-any committer_of_projects.starred]cornflowerblue[else]gray[end]"
+          title="[if-any committer_of_projects.starred]Un-s[else]S[end]tar this project"
+          data-project-name="[committer_of_projects.project_name]">
+         [if-any committer_of_projects.starred]&#9733;[else]&#9734;[end]
+         </a>
+        </td>
+        [end]
+        <td>Committer</td>
+        <td class="id" name="committer">
+          <a href="[committer_of_projects.relative_home_url]/">[committer_of_projects.project_name]
+          </a>
+        </td>
+        <td>
+        [committer_of_projects.summary]
+        </td>
+        </tr>
+        [end]
+      [end]
+
+      [if-any contributor_to_projects]
+        [for contributor_to_projects]
+        <tr data-url="[contributor_to_projects.relative_home_url]" data-project-name="[contributor_to_projects.project_name]">
+        [if-any logged_in_user]
+        <td class="rowwidgets">
+         <a class="star"
+          style="color:[if-any contributor_to_projects.starred]cornflowerblue[else]gray[end]"
+          title="[if-any contributor_to_projects.starred]Un-s[else]S[end]tar this project"
+          data-project-name="[contributor_to_projects.project_name]">
+         [if-any contributor_to_projects.starred]&#9733;[else]&#9734;[end]
+         </a>
+        </td>
+        [end]
+        <td>Contributor</td>
+        <td class="id" name="contributor">
+          <a href="[contributor_to_projects.relative_home_url]/">[contributor_to_projects.project_name]
+          </a>
+        [is contributor_to_projects.state_name "HIDDEN"]<span style="color:red"> - hidden</span>[end]</td>
+        <td>
+        [contributor_to_projects.summary]
+        </td>
+        </tr>
+        [end]
+      [end]
+
+ [else]
+      <tr>
+      <td colspan="4"><i>No projects.</i></td>
+      <tr>
+ [end]
+  </tbody>
+</table>
+
+
+[if-any starred_projects]
+<br>
+<div class="list">
+  <table style="width: 100%;" cellspacing="0" cellpadding="0">
+  <tbody><tr>
+     <th style="text-align: left;">
+      Starred by [if-any viewing_self]me[else]
+      [viewed_user_display_name]
+      [end]
+     </th>
+  </tr></tbody>
+  </table>
+</div>
+<table cellspacing="0" cellpadding="2" border="0" class="results striped" id="starredtable" width="100%">
+    <tbody>
+      <tr id="headingrow">
+        [if-any logged_in_user]
+        <th style="white-space:nowrap; width:3%;"></th>
+        [end]
+        <th style="white-space:nowrap; width:25%;">Name</th>
+        <th style="white-space:nowrap; width:57%;">Summary</th>
+      </tr>
+
+      [for starred_projects]
+      <tr data-url="[starred_projects.relative_home_url]" data-project-name="[starred_projects.project_name]">
+      [if-any logged_in_user]
+      <td class="rowwidgets">
+        <a class="star"
+         style="color:[if-any starred_projects.starred]cornflowerblue[else]gray[end]"
+         title="[if-any starred_projects.starred]Un-s[else]S[end]tar this project"
+         data-project-name="[starred_projects.project_name]">
+        [if-any starred_projects.starred]&#9733;[else]&#9734;[end]
+        </a>
+      </td>
+      [end]
+      <td class="id" name="starred_project">
+        <a href="[starred_projects.relative_home_url]/">[starred_projects.project_name]</a>
+        [is starred_projects.state_name "HIDDEN"]<span style="color:red"> - hidden</span>[end]
+      </td>
+      <td>
+      [starred_projects.summary]
+      </td>
+      </tr>
+      [end]
+
+</table>
+[end]
+
+[if-any owner_of_archived_projects]
+<br>
+<div class="list">
+  <table style="width: 100%;" cellspacing="0" cellpadding="0">
+  <tbody><tr>
+     <th style="text-align: left;">Archived projects
+     </th>
+  </tr></tbody>
+  </table>
+</div>
+<table cellspacing="0" cellpadding="2" border="0" class="results striped" id="archivedtable" width="100%">
+    <tbody>
+      <tr id="headingrow">
+        <th style="white-space:nowrap; width:25%;">Name</th>
+        <th style="white-space:nowrap; width:60%;">Summary</th>
+      </tr>
+        [for owner_of_archived_projects]
+        <tr data-url="[owner_of_archived_projects.relative_home_url]/adminAdvanced">
+        <td class="id" name="deleted_project">[owner_of_archived_projects.project_name] -
+          <a href="[owner_of_archived_projects.relative_home_url]/adminAdvanced">Unarchive or delete</a>
+        </td>
+        <td>
+        [owner_of_archived_projects.summary]
+        </td>
+        </tr>
+        [end]
+</table>
+[end]
+
+[if-any user_groups]
+<br>
+<div class="list">
+  <table style="width: 100%;" cellspacing="0" cellpadding="0">
+  <tbody><tr>
+     <th style="text-align: left;">User groups
+     </th>
+  </tr></tbody>
+  </table>
+</div>
+<table cellspacing="0" cellpadding="2" border="0" class="results striped" id="usergrouptable" width="100%">
+ <tbody>
+  <tr id="headingrow">
+   <th style="white-space:nowrap; width:25%;">Name</th>
+  </tr>
+  [for user_groups]
+   <tr data-url="[user_groups.profile_url]">
+    <td class="id">
+     <a href="[user_groups.profile_url]">[user_groups.email]</a>
+    </td>
+   </tr>
+  [end]
+ </tbody>
+</table>
+[end]
+
+[if-any can_ban]
+ <form action="ban.do" method="POST">
+  <input type="hidden" name="token" value="[ban_token]">
+  <h4>Banned for abuse</h4>
+  <div style="margin:0 0 2em 2em">
+   <input type="checkbox" name="banned" id="banned" value="1"
+          [if-any settings_user_is_banned]checked="checked"[end] >
+   <label for="banned">This user is banned because:</label>
+   <input type="text" size="50" name="banned_reason" id="banned_reason" value="[settings_user_pb.banned]">
+  </div>
+
+  <div style="margin:0 0 2em 2em">
+   <input id="submit_btn" type="submit" name="btn"
+          value="Update banned status">
+  </div>
+
+ </form>
+
+  [if-any viewed_user_is_spammer]
+   <form action="banSpammer.do" method="POST">
+    <input type="hidden" name="token" value="[ban_spammer_token]">
+    <input type="hidden" size="50" name="banned_reason" id="banned_reason" value="">
+    <input type="submit" name="undoBanSpammerButton" id="undo_ban_spammer_btn" value="Un-ban this user as a spammer">
+   </form>
+  [end]
+
+
+  [if-any viewed_user_may_be_spammer]
+   <form action="banSpammer.do" method="POST">
+    <input type="hidden" name="token" value="[ban_spammer_token]">
+    <input type="hidden" name="banned" value="True">
+    <input type="hidden" size="50" name="banned_reason" id="banned_reason" value="Spam">
+    <input type="submit" name="banSpammerButton" id="ban_spammer_btn" value="Ban this user as a spammer">
+   </form>
+  [end]
+
+[end]
+
+[if-any perms._EditOtherUsers]
+<h3 style="clear:both">Edit user</h3>
+ <form action="edit.do" method="POST">
+  <input type="hidden" name="token" value="[form_token]">
+  <h4>Site administration</h4>
+  <div style="margin:0 0 2em 2em">
+   <input type="checkbox" name="site_admin" id="site_admin" value="1" [if-any viewed_user_pb.is_site_admin_bool]checked="checked"[end] >
+   <label for="site_admin">This user is a site administrator (a super user)</label>
+  </div>
+
+  [include "unified-settings.ezt"]
+
+  <div style="margin:0 0 2em 2em">
+   <input id="submit_btn" type="submit" name="btn"
+          value="Save changes">
+  </div>
+
+ </form>
+[end]
+
+[if-any can_delete_user]
+<h3 style="clear:both">Delete user account</h3>
+  <p>Deleting a user account deletes the user and most user owned items from the site.
+     The user's email will be removed from any issues that the user participated in.
+     Hotlists owned by the user will either be transferred to another editor or get deleted.
+     Any Project Rules that the user is involved in will get deleted.
+  </p>
+  <div style="margin:0 0 2em 2em">
+    <input id="delete_btn" type="submit" name="btn" value="Delete user account">
+    <div id="delete_error" class="fielderror"></div>
+  </div>
+[end]
+
+</div>
+</div>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  if ($("user_star")) {
+    [# The user viewing this page wants to star the user *on* this page]
+    $("user_star").addEventListener("click", function () {
+       _TKR_toggleStar($("user_star"), null, null, "[viewed_user_id]", null, null);
+    });
+  }
+
+  var stars = document.getElementsByClassName("star");
+  for (var i = 0; i < stars.length; ++i) {
+    var star = stars[[]i];
+    star.addEventListener("click", function (event) {
+        var projectName = event.target.getAttribute("data-project-name");
+        _TKR_toggleStar(event.target, projectName);
+    });
+  }
+
+  function _handleProjectClick(event) {
+    var target = event.target;
+    if (target.tagName == "A")
+      return;
+
+    if (target.classList.contains("rowwidgets") || target.parentNode.classList.contains("rowwidgets"))
+      return;
+    if (target.tagName != "TR") target = target.parentNode;
+    _go(target.attributes[[]"data-url"].value,
+        (event.metaKey || event.ctrlKey || event.button == 1));
+  };
+  $("projecttable").addEventListener("click", _handleProjectClick);
+  if ($("starredtable")) {
+    $("starredtable").addEventListener("click", _handleProjectClick);
+  }
+  if ($("archivedtable")) {
+    $("archivedtable").addEventListener("click", _handleProjectClick);
+  }
+
+  if ($("banned_reason")) {
+    $("banned_reason").addEventListener("keyup", function() {
+      $("banned").checked = $("banned_reason").value != "";
+    });
+  }
+
+  if ($("ban_spammer_btn")) {
+    $("ban_spammer_btn").addEventListener("click", function(evt) {
+       var ok = window.confirm("This will remove all issues and comments " +
+          "created by this user. Continue?");
+       if (!ok) {
+         evt.preventDefault();
+       }
+     });
+   }
+
+   if ($("delete_btn")) {
+     $("delete_btn").addEventListener("click", async function(event) {
+       const expungeCall = window.prpcClient.call(
+         'monorail.Users', 'ExpungeUser', {email: "[viewed_user_display_name]"});
+       expungeCall.then((resp) => {
+         location.replace(location.origin);
+       }).catch((reason) => {
+         $("delete_error").textContent = reason;
+       });
+     });
+   }
+});
+</script>
+<script type="module" defer src="[version_base]/static/js/sitewide/linked-accounts.js" nonce="[nonce]"></script>
+
+
+[include "../framework/footer.ezt"]
diff --git a/templates/sitewide/user-settings-page.ezt b/templates/sitewide/user-settings-page.ezt
new file mode 100644
index 0000000..5e8ef2c
--- /dev/null
+++ b/templates/sitewide/user-settings-page.ezt
@@ -0,0 +1,17 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showusertabs" "t1"]
+
+<div style="max-width:50em">
+
+<h3>User Preferences</h3>
+
+<form action="settings.do" method="POST">
+  [include "unified-settings.ezt"]
+  [if-any read_only][else]
+   <input id="submit_btn" type="submit" name="btn" value="Save preferences">
+  [end]
+</form>
+
+</div>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/sitewide/user-updates-page.ezt b/templates/sitewide/user-updates-page.ezt
new file mode 100644
index 0000000..70aaca9
--- /dev/null
+++ b/templates/sitewide/user-updates-page.ezt
@@ -0,0 +1,7 @@
+[define page_css]css/d_updates_page.css[end]
+
+[include "../framework/header.ezt" "showusertabs" "t3"]
+
+[include "../features/updates-page.ezt"]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/sitewide/usergrouptabs.ezt b/templates/sitewide/usergrouptabs.ezt
new file mode 100644
index 0000000..1f29b43
--- /dev/null
+++ b/templates/sitewide/usergrouptabs.ezt
@@ -0,0 +1,15 @@
+[# Display a row of tabs for servlets with URLs starting with /u/username.
+
+  Args:
+     arg0: String like "t1", "t2", "t3" to identify the currently active tab.
+]
+
+<div class="[admin_tab_mode]">
+	<div class="at isf">
+		<span class="inst1"><a href="/g/[groupid]/">People</a></span>
+		[if-any offer_membership_editing]
+			<span class="inst2"><a href="/g/[groupid]/groupadmin">Administer</a></span>
+		[end]
+	</div>
+</div>
+
diff --git a/templates/sitewide/usertabs.ezt b/templates/sitewide/usertabs.ezt
new file mode 100644
index 0000000..8216bcb
--- /dev/null
+++ b/templates/sitewide/usertabs.ezt
@@ -0,0 +1,32 @@
+[# Display a row of tabs for servlets with URLs starting with /u/username.
+
+  Args:
+     arg0: String like "t1", "t2", "t3" to identify the currently active tab.
+]
+
+<div class="at isf [user_tab_mode]">
+  <span class="inst2">
+    <a href="[viewed_user.profile_url]">[if-any viewing_self]My Profile[else]User Profile[end]</a>
+  </span>
+
+  <span class="inst5">
+    <a href="[viewed_user.profile_url]updates">Updates</a>
+  </span>
+
+  [if-any viewing_self]
+  <span class="inst3">
+    <a href="/hosting/settings">Settings</a>
+  </span>
+  [end]
+
+  [if-any offer_saved_queries_subtab]
+  <span class="inst4">
+    <a href="[viewed_user.profile_url]queries">Saved Queries</a>
+  </span>
+  [end]
+
+  <span class="inst6">
+    <a href="[viewed_user.profile_url]hotlists">Hotlists</a>
+  </span>
+
+</div>
diff --git a/templates/tracker/admin-components-page.ezt b/templates/tracker/admin-components-page.ezt
new file mode 100644
index 0000000..0c9d2d1
--- /dev/null
+++ b/templates/tracker/admin-components-page.ezt
@@ -0,0 +1,203 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+
+<form action="adminComponents.do" id="adminComponents" method="POST">
+ <input type="hidden" name="token" value="form_token]">
+
+ <h4>Issue components</h4>
+ [if-any perms.EditProject]
+   <span style="margin:0 .7em">Show:
+    <select id="rowfilter">
+     <option label="All components" value="all">
+     <option label="Active components" value="active" selected=true>
+     <option label="Top-level components" value="toplevel">
+     <option label="Components I administer" value="myadmin">
+     <option label="Components I am CC'd on" value="mycc">
+     <option label="Deprecated components" value="deprecated">
+    </select>
+   </span>
+   <span style="margin:0 .7em">Select:
+     <a id="selectall" href="#">All</a>
+     <a id="selectnone" href="#">None</a>
+   </span>
+ [end]
+
+ <div class="list-foot"></div>
+ [if-any perms.EditProject]
+   <form action="adminComponents.do" method="POST">
+     <a href="/p/[projectname]/components/create" class="buttonify primary">Create component</a>
+     <input type="hidden" name="delete_components">
+     <input type="hidden" name="token" value="[form_token]">
+     <input type="submit" class="secondary" name="deletebtn" value="Delete Component(s)" disabled>
+   </form>
+   <div id="deletebtnsfeedback" class="fielderror" style="margin-left:1em">
+     [if-any failed_perm]
+       You do not have permission to delete the components:
+       [failed_perm]<br/>
+     [end]
+     [if-any failed_subcomp]
+       Can not delete the following components because they have subcomponents:
+       [failed_subcomp]<br/>
+     [end]
+     [if-any failed_templ]
+       Can not delete the following components because they are listed in templates:
+       [failed_templ]<br/>
+     [end]
+   </div>
+ [end]
+
+ <div class="section">
+   <table cellspacing="0" cellpadding="2" border="0" class="comptable results striped vt active" id="resultstable" width="100%">
+   <tbody>
+     <tr>
+       [if-any perms.EditProject]<th></th>[end]
+       <th>ID</th>
+       <th>Name</th>
+       <th>Administrators</th>
+       <th>Auto Cc</th>
+       <th>Add Labels</th>
+       <th>Description</th>
+     </tr>
+     [if-any component_defs][else]
+       <tr>
+         <td colspan="5">
+           <div style="padding: 3em; text-align: center">
+             This project has not defined any components.
+           </div>
+         </td>
+       </tr>
+     [end]
+     [for component_defs]
+       [define detail_url]/p/[projectname]/components/detail?component=[format "url"][component_defs.path][end][end]
+       <tr data-url="[detail_url]" class="comprow [component_defs.classes]">
+         [if-any perms.EditProject]
+           <td class="cb rowwidgets">
+             <input type="checkbox" data-path="[component_defs.path]" class="checkRangeSelect">
+           </td>
+         [end]
+         <td>
+            [component_defs.component_id]
+         </td>
+         <td class="id">
+           <a style="white-space:nowrap" href="[detail_url]">[component_defs.path]</a>
+         </td>
+         <td>
+           [for component_defs.admins]
+             [include "../framework/user-link.ezt" component_defs.admins][if-index component_defs.admins last][else],[end]
+           [end]
+         </td>
+         <td>
+           [for component_defs.cc]
+             [include "../framework/user-link.ezt" component_defs.cc][if-index component_defs.cc last][else],[end]
+           [end]
+         </td>
+         <td>
+           [for component_defs.labels]
+             [component_defs.labels][if-index component_defs.labels last][else],[end]
+           [end]
+         </td>
+         <td>
+             [component_defs.docstring_short]
+         </td>
+       </tr>
+     [end]
+   </tbody>
+   </table>
+ </div>[# section]
+
+ <div class="list-foot"></div>
+ [if-any perms.EditProject]
+   <form action="adminComponents.do" method="POST">
+     <a href="/p/[projectname]/components/create" class="buttonify primary">Create component</a>
+     <input type="hidden" name="delete_components">
+     <input type="hidden" name="token" value="[form_token]">
+     <input type="submit" class="secondary" name="deletebtn" value="Delete Component(s)" disabled>
+   </form>
+ [end]
+
+</form>
+
+[end]
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  if ($("selectall")) {
+    $("selectall").addEventListener("click", function() {
+        _selectAllIssues();
+        setDisabled(false);
+    });
+  }
+  if ($("selectnone")) {
+    $("selectnone").addEventListener("click", function() {
+        _selectNoneIssues();
+        setDisabled(true);
+    });
+  }
+
+  var checkboxNodes = document.getElementsByClassName("checkRangeSelect");
+  var checkboxes = Array();
+  for (var i = 0; i < checkboxNodes.length; ++i) {
+    var checkbox = checkboxNodes.item(i);
+    checkboxes.push(checkbox);
+    checkbox.addEventListener("click", function (event) {
+      _checkRangeSelect(event, event.target);
+      _highlightRow(event.target);
+      updateEnabled();
+    });
+  }
+
+  function updateEnabled() {
+    var anySelected = checkboxes.some(function(checkbox) {
+      return checkbox.checked;
+    });
+    setDisabled(!anySelected);
+   }
+
+  var deleteButtons = document.getElementsByName("deletebtn");
+  function setDisabled(disabled) {
+    for (var i = 0; i < deleteButtons.length; ++i) {
+      deleteButtons.item(i).disabled = disabled;
+    }
+  }
+
+  for (var i = 0; i < deleteButtons.length; ++i) {
+    deleteButtons.item(i).addEventListener("click", function(event) {
+      var componentsToDelete = [];
+      for (var i = 0; i< checkboxes.length; ++i) {
+        var checkbox = checkboxes[[]i];
+        if (checkbox.checked)
+          componentsToDelete.push(checkbox.getAttribute("data-path"));
+      }
+      var fields = document.getElementsByName("delete_components");
+      for (var i = 0; i< fields.length; ++i) {
+        fields.item(i).value = componentsToDelete.join();
+      }
+      if (!confirm("Are you sure you want to delete the selected components ?\nThis operation cannot be undone."))
+        event.preventDefault();
+     });
+  }
+
+  function _handleResultsClick(event) {
+    var target = event.target;
+    if (target.tagName == "A" || target.type == "checkbox" || target.className == "cb")
+      return;
+    while (target && target.tagName != "TR") target = target.parentNode;
+    _go(target.attributes[[]"data-url"].value,
+        (event.metaKey || event.ctrlKey || event.button == 1));
+  };
+  _addClickListener($("resultstable"), _handleResultsClick);
+
+
+  function _handleRowFilterChange(event) {
+    $("resultstable").classList.remove('all', 'active', 'toplevel', 'myadmin', 'mycc', 'deprecated');
+    $("resultstable").classList.add(event.target.value);
+  };
+  $("rowfilter").addEventListener("change", _handleRowFilterChange);
+});
+</script>
+
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/admin-labels-page.ezt b/templates/tracker/admin-labels-page.ezt
new file mode 100644
index 0000000..e8cb7ae
--- /dev/null
+++ b/templates/tracker/admin-labels-page.ezt
@@ -0,0 +1,138 @@
+[define category_css]css/ph_list.css[end]
+[include "../framework/header.ezt" "showtabs"]
+[include "../framework/js-placeholders.ezt"]
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+
+<form action="adminLabels.do" id="adminLabels" method="POST">
+ <input type="hidden" name="token" value="[form_token]">
+
+ <h4>Predefined issue labels</h4>
+ <div class="section">
+  [if-any perms.EditProject]
+    <table class="vt">
+     <tr><td>
+       <textarea name="predefinedlabels" rows="12" cols="75" style="tab-size:18">[labels_text]</textarea>
+       [if-any errors.label_defs]
+         <div class="fielderror">[errors.label_defs]</div>
+       [end]
+       <div>
+         Each issue may have <b>at most one</b> label with each of these prefixes:<br>
+         <input type="text" size="75" name="excl_prefixes"
+                value="[for config.excl_prefixes][config.excl_prefixes][if-index config.excl_prefixes last][else], [end][end]">
+       </div>
+      </td>
+      <td style="padding-left:.7em">
+       <div class="tip">
+           <b>Instructions:</b><br> List one label per line in desired sort-order.<br><br>
+           Optionally, use an equals-sign to document the meaning of each label.
+       </div>
+      </td>
+     </tr>
+    </table>
+  [else]
+    <table cellspacing="0" cellpadding="2" border="0" class="results striped" width="100%">
+     <tr>
+       <th style="min-width:14em">Label</th>
+       <th width="100%">Meaning</th>
+     </tr>
+     [for config.issue_labels]
+       <tr>
+         <td style="white-space:nowrap; padding-right:2em; color:#363">[config.issue_labels.name]</td>
+         <td>[config.issue_labels.docstring]</td>
+       </tr>
+     [end]
+    </table>
+  [end]
+ </div>
+
+ [if-any perms.EditProject]
+   <input type="submit" id="savechanges" name="btn" value="Save changes" class="submit">
+ [end]
+
+ <br>
+ <br>
+
+ <h4>Custom fields</h4>
+ <div class="section">
+  <table cellspacing="0" cellpadding="2" border="0" class="results striped vt" id="resultstable" width="100%">
+  <tbody>
+    <tr>
+      <th>ID</th>
+      <th>Name</th>
+      <th>Type</th>
+      <th>Required</th>
+      <th>Multivalued</th>
+      <th>Applicable to</th>
+      <th>Description</th>
+    </tr>
+    [if-any field_defs][else]
+      <tr>
+        <td colspan="40">
+          <div style="padding: 3em; text-align: center">
+            This project has not defined any custom fields.
+          </div>
+        </td>
+      </tr>
+    [end]
+    [for field_defs]
+      [define detail_url]/p/[projectname]/fields/detail?field=[field_defs.field_name][end]
+      [is field_defs.type_name "INT_TYPE"][define pretty_type_name]Integer[end][end]
+      [is field_defs.type_name "ENUM_TYPE"][define pretty_type_name]Enum[end][end]
+      [is field_defs.type_name "USER_TYPE"][define pretty_type_name]User[end][end]
+      [is field_defs.type_name "STR_TYPE"][define pretty_type_name]String[end][end]
+      [is field_defs.type_name "DATE_TYPE"][define pretty_type_name]Date[end][end]
+      [is field_defs.type_name "URL_TYPE"][define pretty_type_name]Url[end][end]
+      [is field_defs.type_name "APPROVAL_TYPE"][define pretty_type_name]Approval[end][end]
+      <tr data-url="[detail_url]">
+        <td>
+          [field_defs.field_def.field_id]
+        </td>
+        <td class="id" style="white-space:nowrap">
+          <a href="[detail_url]">[field_defs.field_name]</a></td>
+        <td style="white-space:nowrap">
+          [pretty_type_name]
+        </td>
+        <td style="white-space:nowrap">
+          [if-any field_defs.is_required_bool]Required[else]Optional[end]
+        </td>
+        <td style="white-space:nowrap">
+          [if-any field_defs.is_multivalued_bool]Multiple[else]Single[end]
+        </td>
+        <td style="white-space:nowrap">
+          [if-any field_defs.applicable_type][field_defs.applicable_type][else]Any issue[end]
+        </td>
+        <td>
+           [field_defs.docstring_short]
+        </td>
+      </tr>
+    [end]
+  </tbody>
+  </table>
+  <div class="list-foot"></div>
+  [if-any perms.EditProject]
+    <p><a href="/p/[projectname]/fields/create" class="buttonify primary">Add field</a></p>
+  [end]
+ </div>
+
+</form>
+
+[end]
+
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  function _handleResultsClick(event) {
+    var target = event.target;
+    if (target.tagName == "A")
+      return;
+    while (target && target.tagName != "TR") target = target.parentNode;
+    _go(target.attributes[[]"data-url"].value,
+        (event.metaKey || event.ctrlKey || event.button == 1));
+  };
+  _addClickListener($("resultstable"), _handleResultsClick);
+});
+</script>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/admin-rules-page.ezt b/templates/tracker/admin-rules-page.ezt
new file mode 100644
index 0000000..2ffc3fa
--- /dev/null
+++ b/templates/tracker/admin-rules-page.ezt
@@ -0,0 +1,17 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+
+<form action="adminRules.do" id="adminRules" method="POST">
+ <input type="hidden" name="token" value="[form_token]">
+
+ [include "../framework/filter-rule-admin-part.ezt" "with_tracking_actions"]
+
+ <input type="submit" id="savechanges" name="btn" value="Save changes" class="submit">
+</form>
+
+[end]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/admin-statuses-page.ezt b/templates/tracker/admin-statuses-page.ezt
new file mode 100644
index 0000000..2d2d936
--- /dev/null
+++ b/templates/tracker/admin-statuses-page.ezt
@@ -0,0 +1,82 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+
+<form action="adminStatuses.do" id="adminStatuses" method="POST">
+ <input type="hidden" name="token" value="[form_token]">
+
+  [if-any perms.EditProject]
+    <table class="vt">
+     <tr><td>
+       <h4>Open Issue Status Values</h4>
+       <div class="section">
+         <textarea name="predefinedopen" rows="6" cols="75"  style="tab-size:18">[open_text]</textarea>
+         [if-any errors.open_statuses]
+           <div class="fielderror">[errors.open_statuses]</div>
+         [end]
+       </div>
+       <h4>Closed Issue Status Values</h4>
+       <div class="section">
+         <textarea name="predefinedclosed" rows="6" cols="75"  style="tab-size:18">[closed_text]</textarea><br><br>
+         [if-any errors.closed_statuses]
+           <div class="fielderror">[errors.closed_statuses]</div>
+         [end]
+
+         If an issue's status is being set to one of these values, offer to merge issues:<br>
+         <input type="text" size="75" name="statuses_offer_merge"
+                value="[for config.statuses_offer_merge][config.statuses_offer_merge][if-index config.statuses_offer_merge last][else], [end][end]">
+       </div>
+      </td>
+      <td style="padding-left:.7em">
+       <div class="tip">
+           <b>Instructions:</b><br> List one status value per line in desired sort-order.<br><br>
+           Optionally, use an equals-sign to document the meaning of each status value.
+       </div>
+      </td>
+     </tr>
+    </table>
+  [else]
+    <h4>Open Issue Status Values</h4>
+    <div class="section">
+    <table cellspacing="0" cellpadding="2" border="0" class="results striped" width="100%">
+      <tr>
+        <th style="min-width:14em">Status</th>
+        <th width="100%">Meaning</th>
+      </tr>
+      [for config.open_statuses]
+        <tr>
+          <td style="white-space:nowrap; padding-right:2em;">[config.open_statuses.name]</td>
+          <td>[config.open_statuses.docstring]</td>
+        </tr>
+      [end]
+    </table>
+    </div>
+
+    <h4>Closed Issue Status Values</h4>
+    <div class="section">
+    <table cellspacing="0" cellpadding="2" border="0" class="results striped" width="100%">
+      <tr>
+        <th style="min-width:14em">Status</th>
+        <th width="100%">Meaning</th>
+      </tr>
+      [for config.closed_statuses]
+        <tr>
+          <td  style="white-space:nowrap; padding-right:2em;">[config.closed_statuses.name]</td>
+          <td>[config.closed_statuses.docstring]</td>
+        </tr>
+      [end]
+    </table>
+    </div>
+  [end]
+
+
+ [if-any perms.EditProject]
+   <input type="submit" id="savechanges" name="btn" value="Save changes" class="submit">
+ [end]
+</form>
+
+[end]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/admin-templates-page.ezt b/templates/tracker/admin-templates-page.ezt
new file mode 100644
index 0000000..2ef36f3
--- /dev/null
+++ b/templates/tracker/admin-templates-page.ezt
@@ -0,0 +1,76 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+
+[if-any perms.EditProject]
+  <h4>Default templates</h4>
+  <div class="section" style="padding-top:0">
+    <form action="adminTemplates.do" id="adminTemplates" method="POST">
+      <input type="hidden" name="token" value="[form_token]">
+
+      <div style="margin: 2em 0 1em 0">
+        Default template for project members:
+        <select name="default_template_for_developers" id="default_template_for_developers">
+          [for config.templates]
+            <option value="[config.templates.name]" [is config.templates.template_id config.default_template_for_developers]selected[end]>[config.templates.name]</option>
+          [end]
+        </select>
+        <br><br>
+
+        Default template for non-members:
+        <select name="default_template_for_users" id="default_template_for_users">
+           [for config.templates]
+             [define offer_template_in_users_menu]No[end]
+             [is config.templates.template_id config.default_template_for_users][define offer_template_in_users_menu]Yes[end][end]
+             [if-any config.templates.members_only][else][define offer_template_in_users_menu]Yes[end][end]
+             [is offer_template_in_users_menu "Yes"]
+               <option value="[config.templates.name]" [is config.templates.template_id config.default_template_for_users]selected[end]>[config.templates.name]</option>
+             [end]
+           [end]
+         </select>
+       </div>
+
+       <input type="submit" id="savechanges" name="btn" value="Save changes" class="submit" style="margin-left:0">
+    </form>
+  </div>
+[end]
+
+<h4>Issue templates</h4>
+<div class="section">
+  <table cellspacing="0" cellpadding="2" border="0" class="results striped vt" id="resultstable" width="100%">
+    <tbody>
+      <tr>
+        <th>Name</th>
+      </tr>
+      [if-any config.templates][else]
+        <tr>
+          <td colspan="40">
+            <div style="padding: 3em; text-align: center">
+              This project has not defined any issue templates.
+            </div>
+          </td>
+        </tr>
+      [end]
+      [for config.templates]
+        [if-any config.templates.can_view perms.EditProject]
+          [define detail_url]/p/[projectname]/templates/detail?template=[format "url"][config.templates.name][end][end]
+            <tr data-url="detail_url">
+              <td style="white-space:nowrap" class="id">
+                <a href="[detail_url]">[config.templates.name]</a></td>
+              </td>
+            </tr>
+        [end]
+      [end]
+    </tbody>
+  </table>
+
+  [if-any perms.EditProject]
+    <p><a href="/p/[projectname]/templates/create" class="buttonify primary">Add template</a></p>
+  [end]
+</div>
+
+[end][# end if not read_only]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/admin-views-page.ezt b/templates/tracker/admin-views-page.ezt
new file mode 100644
index 0000000..5ec5d15
--- /dev/null
+++ b/templates/tracker/admin-views-page.ezt
@@ -0,0 +1,70 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+
+<form action="adminViews.do" id="adminViews" method="POST">
+ <input type="hidden" name="token" value="[form_token]">
+
+ [include "../framework/artifact-list-admin-part.ezt" "with_grid"]
+
+<h4 id="queries">Saved queries</h4>
+<div class="section">
+
+ <div class="closed">
+  <div>Saved queries help project visitors easily view relevant issue lists.
+   <a class="ifClosed toggleHidden" href="#"
+      style="font-size:90%; margin-left:.5em">Learn more</a>
+  </div>
+
+  <div id="filterhelp" class="ifOpened help">
+      Project owners can set up saved queries to make it easier for team members to
+      quickly run common queries.  More importantly, project owners can use saved
+      queries to focus the team's attention on the issue lists that are most important
+      for the project's success.  The project's saved queries are shown in the middle
+      section of the search dropdown menu that is next to the issue search box.
+  </div>
+  <br>
+
+  [if-any perms.EditProject]
+    [include "../framework/saved-queries-admin-part.ezt" "project"]
+  [else]
+    <table cellspacing="0" cellpadding="2" border="0" class="results striped">
+      <tr>
+        <th align="left">Saved query name</th>
+        <th align="left">Search in</th>
+        <th align="left">Query</th>
+      </tr>
+      [for canned_queries]
+        <tr>
+          <td>[canned_queries.name]</td>
+          <td>
+            [define can][canned_queries.base_query_id][end]
+            [is can "1"]All issues[end]
+            [is can "2"]Open issues[end]
+            [is can "3"]Open and owned by me[end]
+            [is can "4"]Open and reported by me[end]
+            [is can "5"]Open and starred by me[end]
+            [is can "6"]New issues[end]
+            [is can "7"]Issues to verify[end]
+            [is can "8"]Open with comment by me[end]
+          </td>
+          <td>
+            [canned_queries.query]
+          </td>
+        </tr>
+      [end]
+    </table>
+  [end]
+ </div>
+</div>
+
+ [if-any perms.EditProject]
+   <input type="submit" id="savechanges" name="btn" value="Save changes" class="submit">
+ [end]
+</form>
+
+[end]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/approval-change-notification-email.ezt b/templates/tracker/approval-change-notification-email.ezt
new file mode 100644
index 0000000..c6a81ea
--- /dev/null
+++ b/templates/tracker/approval-change-notification-email.ezt
@@ -0,0 +1,23 @@
+[if-any comment.amendments][#
+  ]Updates:
+[#][for comment.amendments]        [comment.amendments.field_name]: [format "raw"][comment.amendments.newvalue][end]
+[#][end][#
+  ][end]
+Comment #[comment.sequence] on issue [issue_local_id][#
+  ] by [comment.creator.display_name]: [format "raw"][summary][#
+][end]
+[approval_url]
+
+[if-any comment.content][#
+  ][for comment.text_runs][include "render-plain-text.ezt" comment.text_runs][end][#
+][else](No comment was entered for this change.)[#
+][end]
+[if-any comment.attachments][#
+  ]Attachments:
+[#][for comment.attachments][#
+  ]        [comment.attachments.filename]: [domain_url][comment.attachments.downloadurl]&inline=1[end]
+[end]
+
+You are receiving this message because you are listed as the TL/PM
+on this issue or you are/were listed as an approver for this
+issue's approval.
diff --git a/templates/tracker/component-create-page.ezt b/templates/tracker/component-create-page.ezt
new file mode 100644
index 0000000..b818435
--- /dev/null
+++ b/templates/tracker/component-create-page.ezt
@@ -0,0 +1,129 @@
+[define title]Add a Component[end]
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+<a href="/p/[projectname]/adminComponents">&lsaquo; Back to component list</a><br><br>
+
+
+<h4>Add a component</h4>
+
+<form action="create.do" method="POST">
+<input type="hidden" name="token" value="[form_token]">
+
+<table cellspacing="8" class="rowmajor vt">
+
+  <tr>
+    <th width="1%">Parent:</th>
+    <td>
+      <select name="parent_path" id="parent_path">
+        <option value="">Top level</option>
+        [for component_defs]
+          <option value="[component_defs.path]" [if-any component_defs.selected]selected=true[end]>[component_defs.path]</option>
+        [end]
+      </select>
+    </td>
+    <td rowspan="10">
+      <div class="tip">
+        <p>Components should describe the structure of the software being
+          built so that issues can be related to the correct parts.</p>
+
+        <p>Please use labels instead for releases,
+           milestones, task forces, types of issues, etc.</p>
+
+        <p>Deprecated components won't be shown in autocomplete.</p>
+      </div>
+    </td>
+  </tr>
+
+  <tr>
+    <th width="1%">Name:</th>
+    <td>
+      <input id="leaf_name" name="leaf_name" size="30" value="[initial_leaf_name]"
+             class="acob">
+      <span id="leafnamefeedback" class="fielderror" style="margin-left:1em">
+          [if-any errors.leaf_name][errors.leaf_name][end]
+      </span>
+    </td>
+  </tr>
+
+  <tr>
+    <th>Description:</th>
+    <td>
+      <textarea name="docstring" rows="4" cols="75">[initial_docstring]</textarea>
+    </td>
+  </tr>
+
+  <tr>
+    <th>Admins:</th>
+    <td>
+        <textarea id="member_admins" name="admins" rows="3" cols="75">[for initial_admins][initial_admins], [end]</textarea>
+        <span id="memberadminsfeedback" class="fielderror" style="margin-left:1em">
+            [if-any errors.member_admins][errors.member_admins][end]
+        </span>
+    </td>
+  </tr>
+
+  <tr>
+    <th>Auto Cc:</th>
+    <td>
+        <textarea id="member_cc" name="cc" rows="3" cols="75">[for initial_cc][initial_cc], [end]</textarea>
+        <span id="memberccfeedback" class="fielderror" style="margin-left:1em">
+            [if-any errors.member_cc][errors.member_cc][end]
+        </span>
+    </td>
+  </tr>
+
+  <tr>
+    <th>Add Labels:</th>
+    <td>
+        <textarea id="labels" name="labels" rows="3" cols="75">[for initial_labels][initial_labels], [end]</textarea>
+        <span id="labelsfeedback" class="fielderror" style="margin-left:1em">
+            [if-any errors.labels][errors.labels][end]
+        </span>
+    </td>
+  </tr>
+
+  <tr>
+    <th>Deprecated:</th>
+    <td>
+        <input type="checkbox" id="deprecated" name="deprecated">
+    </td>
+  </tr>
+
+  <tr>
+    <td></td>
+    <td>
+      <input id="submit_btn" type="submit" name="submit" value="Create component">
+    </td>
+  </tr>
+
+</table>
+</form>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  document.getElementById('submit_btn').disabled = 'disabled';
+  document.getElementById('leaf_name').focus();
+
+  function checkSubmit() {
+    _checkLeafName(
+        '[projectname]',
+        document.getElementById('parent_path').value,
+        '', CS_env.token);
+  }
+  setInterval(checkSubmit, 700);
+
+  var acobElements = document.getElementsByClassName("acob");
+  for (var i = 0; i < acobElements.length; ++i) {
+     var el = acobElements[[]i];
+     el.addEventListener("focus", function(event) {
+         _acrob(null);
+         _acof(event);
+     });
+  }
+});
+</script>
+
+
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/component-detail-page.ezt b/templates/tracker/component-detail-page.ezt
new file mode 100644
index 0000000..01757d1
--- /dev/null
+++ b/templates/tracker/component-detail-page.ezt
@@ -0,0 +1,169 @@
+[# Use raw format because the title variable will be escaped when used.]
+[define title]Component [format "raw"][component_def.path][end][end]
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+<a href="/p/[projectname]/adminComponents">&lsaquo; Back to component list</a><br><br>
+
+
+<h4>Component</h4>
+[if-any creator]
+  Created by <a href="[creator.profile_url]">[creator.display_name]</a> [created]<br/>
+[end]
+[if-any modifier]
+  Last modified by <a href="[modifier.profile_url]">[modifier.display_name]</a> [modified]<br/>
+[end]
+
+<br/>
+<form action="detail.do" method="POST">
+<input type="hidden" name="token" value="[form_token]">
+<input type="hidden" name="component" value="[component_def.path]">
+<table cellspacing="8" class="rowmajor vt">
+  <tr>
+    <th width="1%">Name:</th>
+    <td>
+      [if-any allow_edit]
+        [if-any component_def.parent_path][component_def.parent_path]&gt;[end]
+        <input id="leaf_name" name="leaf_name" value="[initial_leaf_name]" size="30" class="acob">
+        <span id="leafnamefeedback" class="fielderror" style="margin-left:1em">
+          [if-any errors.leaf_name][errors.leaf_name][end]
+        </span>
+      [else]
+        [component_def.path]
+      [end]
+    </td>
+  </tr>
+
+  <tr>
+    <th>Description:</th>
+    <td>
+      [if-any allow_edit]
+        <textarea name="docstring" rows="4" cols="75">[initial_docstring]</textarea>
+      [else]
+        [component_def.docstring]
+      [end]
+    </td>
+  </tr>
+
+  <tr>
+    <th>Admins:</th>
+    <td>
+      [if-any allow_edit]
+        <textarea id="member_admins" name="admins" rows="3" cols="75">[for initial_admins][initial_admins], [end]</textarea>
+        <span id="memberadminsfeedback" class="fielderror" style="margin-left:1em">
+          [if-any errors.member_admins][errors.member_admins][end]
+        </span>
+      [else]
+        [for component_def.admins]
+          <div>[include "../framework/user-link.ezt" component_def.admins]</div>
+        [end]
+      [end]
+    </td>
+  </tr>
+
+  <tr>
+    <th>Auto Cc:</th>
+    <td>
+      [if-any allow_edit]
+        <textarea id="member_cc" name="cc" rows="3" cols="75">[for initial_cc][initial_cc], [end]</textarea>
+        <span id="memberccfeedback" class="fielderror" style="margin-left:1em">
+          [if-any errors.member_cc][errors.member_cc][end]
+        </span>
+      [else]
+        [for component_def.cc]
+          <div>[include "../framework/user-link.ezt" component_def.cc]</div>
+        [end]
+      [end]
+    </td>
+  </tr>
+
+  <tr>
+    <th>Add Labels:</th>
+    <td>
+      [if-any allow_edit]
+        <textarea id="labels" name="labels" rows="3" cols="75">[for initial_labels][initial_labels], [end]</textarea>
+        <span id="labelsfeedback" class="fielderror" style="margin-left:1em">
+          [if-any errors.labels][errors.labels][end]
+        </span>
+      [else]
+        [for component_def.labels]
+          <div>[component_def.labels]</div>
+        [end]
+      [end]
+    </td>
+  </tr>
+
+  <tr>
+    <th>Deprecated:</th>
+    <td>
+        <input type="checkbox" id="deprecated" name="deprecated" [if-any initial_deprecated]checked="checked"[end]
+               [if-any allow_edit][else]disabled[end]>
+    </td>
+  </tr>
+
+  <tr>
+    <td></td>
+    <td>
+      [if-any allow_edit]
+        <div>
+          <span style="float:left;">
+            <input type="submit" name="submit" id="submit_btn" value="Submit changes">
+            <input type="submit" class="secondary" name="deletecomponent" value="Delete component"
+                   [if-any allow_delete][else]disabled[end]
+                   id="deletecomponent">
+          </span>
+          <span style="float:right;">
+            <a href="/p/[projectname]/components/create?component=[component_def.path]">Create new subcomponent</a>
+          </span>
+          <div style="clear:both;"></div>
+        </div>
+        [if-any allow_delete][else]
+          <br/><br/>
+          <b>Note:</b>
+          [if-any subcomponents]
+            <br/>
+            Can not delete this component because it has the following subcomponents:<br/>
+            [for subcomponents]<div style="margin-left:1em">[subcomponents.path]</div>[end]
+          [end]
+          [if-any templates]
+            <br/>
+            Can not delete this component because it is listed in the following templates:<br/>
+            [for templates]<div style="margin-left:1em">[templates.name]</div>[end]
+          [end]
+        [end]
+      [end]
+    </td>
+  </tr>
+
+</table>
+</form>
+
+[if-any allow_edit]
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  function checkSubmit() {
+    _checkLeafName('[format "js"][projectname][end]', '[format "js"][component_def.parent_path][end]', '[format "js"][component_def.leaf_name][end]', CS_env.token);
+  }
+  setInterval(checkSubmit, 700);
+
+  if ($("deletecomponent")) {
+    $("deletecomponent").addEventListener("click", function(event) {
+        if (!confirm("Are you sure you want to delete [component_def.path]?\nThis operation cannot be undone."))
+          event.preventDefault();
+     });
+  }
+
+  var acobElements = document.getElementsByClassName("acob");
+  for (var i = 0; i < acobElements.length; ++i) {
+     var el = acobElements[[]i];
+     el.addEventListener("focus", function(event) {
+         _acrob(null);
+         _acof(event);
+     });
+  }
+});
+</script>
+[end]
+
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/field-create-page.ezt b/templates/tracker/field-create-page.ezt
new file mode 100644
index 0000000..9b0bc11
--- /dev/null
+++ b/templates/tracker/field-create-page.ezt
@@ -0,0 +1,402 @@
+[define title]Add a Field[end]
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+<a href="/p/[projectname]/adminLabels">&lsaquo; Back to field list</a><br><br>
+
+
+<h4>Add a custom field</h4>
+
+<form action="create.do" method="POST">
+<input type="hidden" name="token" value="[form_token]">
+
+<table cellspacing="8" class="rowmajor vt">
+  <tr>
+    <th width="1%">Name:</th>
+    <td>
+      <input id="fieldname" name="name" size="30" value="[initial_field_name]" class="acob">
+      <span id="fieldnamefeedback" class="fielderror" style="margin-left:1em">
+          [if-any errors.field_name][errors.field_name][end]
+      </span>
+    </td>
+  </tr>
+
+  <tr>
+    <th>Description:</th>
+    <td>
+      <textarea name="docstring" rows="4" cols="75">[initial_field_docstring]</textarea>
+    </td>
+  </tr>
+
+  <tr>
+    <th>Type:</th>
+    <td>
+      <select id="field_type" name="field_type">
+        <option value="enum_type" [is initial_type "enum_type"]selected="selected"[end]>Enum</option>
+        <option value="int_type" [is initial_type "int_type"]selected="selected"[end]>Integer</option>
+        <option value="str_type" [is initial_type "str_type"]selected="selected"[end]>String</option>
+        <option value="user_type" [is initial_type "user_type"]selected="selected"[end]>User</option>
+        <option value="date_type" [is initial_type "date_type"]selected="selected"[end]>Date</option>
+        <option value="url_type" [is initial_type "url_type"]selected="selected"[end]>URL</option>
+        <option value="approval_type" [is initial_type "approval_type"]selected="selected"[end]>Approval</option>
+      </select>
+    </td>
+  </tr>
+
+  <tr class="js-make_phase_subfield">
+    <th>Issue Gate field:</th>
+    <td>
+      <input id="phase_input" type="checkbox" name="is_phase_field" class="acob"
+             [if-any initial_is_phase_field]checked="checked"[end]>
+      <label for="phase_input">This field can only belong to issue gates.</label>
+    </td>
+  </tr>
+
+  [if-any approval_names]
+  <tr class="js-make_approval_subfield">
+    <th>Parent Approval:</th>
+    <td>
+      <select id="parent_input" name="parent_approval_name">
+        <option value="" [is initial_parent_approval_name ""]selected[end]>Not an approval's subfield</option>
+        [for approval_names]
+          <option value="[approval_names]"
+                  [is initial_parent_approval_name approval_names]selected[end]
+                  >[approval_names]</option>
+        [end]
+      </select>
+    </td>
+  </tr>
+  [end]
+
+  [# TODO(jojwang): monorail:3241, evaluate how to use applicable/importance for approval subfields]
+  <tr id="applicable_row">
+    <th>Applicable:</th>
+    <td>When issue type is:
+      <select id="applicable_type" name="applicable_type">
+        <option value="" [is initial_applicable_type ""]selected="selected"[end]>Anything</option>
+        <option disabled="disabled">----</option>
+        [for well_known_issue_types]
+          <option value="[well_known_issue_types]" [is initial_applicable_type well_known_issue_types]selected="selected"[end]>[well_known_issue_types]</option>
+        [end]
+      </select>
+      [# TODO(jrobbins): AND with free-form applicability predicate.]
+    </td>
+  </tr>
+
+  <tr id="importance_row">
+    <th>Importance:</th>
+    <td>
+      <select id="importance" name="importance">
+        <option value="required" [is initial_importance "required"]selected[end]>Required when applicable</option>
+        <option value="normal" [is initial_importance "normal"]selected[end]>Offered when applicable</option>
+        <option value="niche" [is initial_importance "niche"]selected[end]>Under "Show all fields" when applicable</option>
+      </select>
+    </td>
+  </tr>
+
+  <tr id="multi_row">
+    <th>Multivalued:</th>
+    <td>
+      <input type="checkbox" name="is_multivalued" class="acob"
+             [if-any initial_is_multivalued]checked="checked"[end]>
+    </td>
+  </tr>
+
+  <tr id="choices_row" style="display:none">
+    <th>Choices:</th>
+    <td>
+      <textarea id="choices" name="choices" rows="10" cols="75" style="tab-size:12"
+                >[initial_choices]</textarea>
+    </td>
+  </tr>
+
+  <tr id="int_row" style="display:none">
+    <th>Validation:</th>
+    <td>
+      Min value: <input type="number" name="min_value" style="text-align:right; width: 4em">
+      Max value: <input type="number" name="max_value" style="text-align:right; width: 4em"><br>
+      <span class="fielderror" style="margin-left: 1em">
+          [if-any errors.min_value][errors.min_value][end]</span><br>
+    </td>
+  </tr>
+
+  <tr id="str_row" style="display:none">
+    <th>Validation:</th>
+    <td>
+      Regex: <input type="text" name="regex" size="30"><br>
+    </td>
+  </tr>
+
+  <tr id="user_row" style="display:none">
+    <th>Validation:</th>
+    <td>
+      <input type="checkbox" name="needs_member" id="needs_member" class="acob"
+             [if-any initial_needs_member]checked[end]>
+      <label for="needs_member">User must be a project member</label><br>
+      <span id="needs_perm_span" style="margin-left:1em">
+        Required permission:
+        <input type="text" name="needs_perm" id="needs_perm" size="20"
+               value="[initial_needs_perm]" class="acob">
+      </span><br>
+    </td>
+  </tr>
+  <tr id="user_row2" style="display:none">
+    <th>Permissions:</th>
+    <td>
+      The users named in this field is granted this permission on this issue:<br>
+      [# TODO(jrobbins): one-click way to specify View vs. EditIssue vs. any custom perm.]
+      <input type="text" name="grants_perm" id="grants_perm" class="acob"
+             size="20" value="[initial_grants_perm]" autocomplete="off">
+    </td>
+  </tr>
+  <tr id="user_row3" style="display:none">
+    <th>Notification:</th>
+    <td>
+      The users named in this field will be notified via email whenever:<br>
+      <select name="notify_on">
+        <option value="never" [is initial_notify_on "0"]selected="selected"[end]
+                >No notifications</option>
+        <option value="any_comment" [is initial_notify_on "1"]selected="selected"[end]
+                >Any change or comment is added</option>
+      </select>
+    </td>
+  </tr>
+
+  <tr id="date_row" style="display:none">
+    <th>Action:</th>
+    <td>
+      When this date arrives:
+      <select name="date_action">
+        <option value="no_action" [is initial_date_action "no_action"]selected="selected"[end]
+                >No action</option>
+        [# TODO(jrobbins): owner-only option.]
+        <option value="ping_participants" [is initial_date_action "ping_participants"]selected="selected"[end]
+                >Post a "ping" comment and notify all issue participants</option>
+      </select>
+    </td>
+  </tr>
+
+  <tr id="approval_row" style="display:none">
+    <th>Approvers:</th>
+    <td>
+      <input id="member_approvers" name="approver_names" size="75" value="[initial_approvers]"
+          autocomplete="off">
+      <span class="fielderror" style="margin-left:1em">
+        [if-any errors.approvers][errors.approvers][end]
+      </span>
+    </td>
+  </tr>
+
+  <tr id="approval_row2" style="display:none">
+    <th>Survey:</th>
+    <td>
+      Any information feature owners need to provide for the approval team should be requested here.
+      <textarea name="survey" rows="4" cols="75">[initial_survey]</textarea>
+    </td>
+  </tr>
+
+  <tr>
+    <th>Admins:</th>
+    <td>
+      <input id="member_admins" name="admin_names" size="75" value="[initial_admins]"
+             autocomplete="off" class="acob">
+      <span class="fielderror" style="margin-left:1em">
+          [if-any errors.field_admins][errors.field_admins][end]
+      </span>
+    </td>
+  </tr>
+
+  <tr id="field_restriction">
+    <th>Restriction
+      <i id="editors_tooltip" class="material-icons inline-icon" style="font-size:14px; vertical-align: text-bottom"
+        title="Project owners and field admins can always edit the values of a custom field.">
+      info_outline</i> :
+    </th>
+    <td style="display:flex; align-items:center">
+      <input id="editors_checkbox" type="checkbox" name="is_restricted_field" class="acob"
+             [if-any initial_is_restricted_field]checked="checked"[end]>
+      Restrict users that can edit values of this custom field.
+    </td>
+  </tr>
+  <tr id="editors_input" style="display:none">
+    <th>Editors:</th>
+    <td>
+      <input id="member_editors" name="editor_names" size="75" value="[initial_editors]"
+             autocomplete="off" class="acob" disabled>
+      <span class="fielderror" style="margin-left:1em">
+          [if-any errors.field_editors][errors.field_editors][end]
+      </span>
+    </td>
+  </tr>
+
+  <tr>
+    <td></td>
+    <td>
+      <input id="submit_btn" type="submit" name="submit" value="Create field">
+    </td>
+  </tr>
+
+</table>
+</form>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  var submit = document.getElementById('submit_btn');
+  submit.disabled = 'disabled';
+  var fieldname = document.getElementById('fieldname');
+  var oldName = '';
+  fieldname.focus();
+
+  var fieldNameRE = /^[[]a-z]([[]-_]?[[]a-z0-9])*$/i;
+
+  function checkFieldName() {
+    name = fieldname.value;
+    if (name != oldName) {
+      oldName = name;
+      feedback = document.getElementById('fieldnamefeedback');
+      submit.disabled = 'disabled';
+      if (name == '') {
+        feedback.textContent = 'Please choose a field name';
+      } else if (!fieldNameRE.test(name)) {
+        feedback.textContent = 'Invalid field name';
+      } else if (name.length > 30) {
+        feedback.textContent = 'Field name is too long';
+      } else {
+        _checkFieldNameOnServer('[projectname]', name, CS_env.token);
+      }
+    }
+  }
+
+  setInterval(checkFieldName, 700);
+
+  function updateForm(new_type) {
+    let choices_row = document.getElementById('choices_row');
+    choices_row.style.display = (new_type == 'enum_type') ? '' : 'none';
+
+    // Approval fields cannot be subfields of approvals.
+    let approval_subfield_display = (new_type == 'approval_type') ? 'none' : '';
+    let approval_subfield_rows = document.getElementsByClassName('js-make_approval_subfield');
+    Array.prototype.forEach.call(approval_subfield_rows, row => {
+      row.style.display = approval_subfield_display;
+    });
+
+    // Enum and Approval fields cannot be gate subfields.
+    let gate_subfield_display = (new_type == 'enum_type' || new_type == 'approval_type') ? 'none': '';
+    let phase_subfield_rows = document.getElementsByClassName('js-make_phase_subfield');
+    Array.prototype.forEach.call(phase_subfield_rows, row => {
+      row.style.display = gate_subfield_display;
+    });
+
+    // Prevent users from making a field a Gate and Approval subfield.
+    if ($('parent_input')) {
+      let phase_input = $('phase_input');
+      let parent_input = $('parent_input');
+      parent_input.addEventListener('change', () => {
+        if (parent_input.value === '') {
+          phase_input.disabled = false;
+        } else {
+          phase_input.disabled = true;
+        }
+      });
+      phase_input.addEventListener('change', () => {
+        if (phase_input.checked) {
+          parent_input.disabled = true;
+        } else {
+          parent_input.disabled = false;
+        }
+      });
+    };
+
+    let int_row = document.getElementById('int_row');
+    int_row.style.display = (new_type == 'int_type') ? '' : 'none';
+
+    let str_row = document.getElementById('str_row');
+    str_row.style.display = (new_type == 'str_type') ? '' : 'none';
+
+    let user_row_display = (new_type == 'user_type') ? '' : 'none';
+    document.getElementById('user_row').style.display = user_row_display;
+    document.getElementById('user_row2').style.display = user_row_display;
+    document.getElementById('user_row3').style.display = user_row_display;
+
+    let date_row_display = (new_type == 'date_type') ? '' : 'none';
+    document.getElementById('date_row').style.display = date_row_display;
+
+    let approval_row_display = (new_type == 'approval_type') ? '' : 'none';
+    let approval_row_hide = (new_type == 'approval_type') ? 'none' : '';
+    let new_type_is_approval = (new_type == 'approval_type');
+    document.getElementById(
+        'multi_row').style.display = approval_row_hide;
+    document.getElementById(
+        'importance_row').style.display = approval_row_hide;
+    document.getElementById(
+        'applicable_row').style.display = approval_row_hide;
+    document.getElementById(
+        'field_restriction').style.display = approval_row_hide;
+    if (new_type_is_approval) {
+      document.getElementById('editors_input').style.display = 'none';
+    } else {
+      if (document.getElementById('editors_checkbox').checked) {
+        document.getElementById('editors_input').style.display = '';
+      } else {
+        document.getElementById('editors_input').style.display = 'none';
+      }
+    }
+    document.getElementById(
+        'editors_checkbox').disabled = new_type_is_approval;
+    document.getElementById(
+        'member_editors').disabled = new_type_is_approval || !document.getElementById('editors_checkbox').checked;
+    document.getElementById('approval_row').style.display = approval_row_display;
+    document.getElementById('approval_row2').style.display = approval_row_display;
+  }
+
+  let type_select = document.getElementById('field_type');
+  updateForm(type_select.value);
+  type_select.addEventListener("change", function() {
+       updateForm(type_select.value);
+  });
+
+  let needs_perm_span = document.getElementById('needs_perm_span');
+  let needs_perm = document.getElementById('needs_perm');
+  function enableNeedsPerm(enable) {
+    needs_perm_span.style.color = enable ? 'inherit' : '#999';
+    needs_perm.disabled = enable ? '' : 'disabled';
+    if (!enable) needs_perm.value = '';
+  }
+  enableNeedsPerm(false);
+
+  //Enable editors input only when restricting the field.
+  document.getElementById('editors_checkbox').onchange = function() {
+    let member_editors = document.getElementById('member_editors');
+    let editors_input = document.getElementById('editors_input');
+    if (this.checked) {
+      editors_input.style.display = '';
+    } else {
+      editors_input.style.display = 'none';
+    }
+    member_editors.disabled = !this.checked;
+  };
+
+  let needs_member = document.getElementById("needs_member");
+  if (needs_member)
+    needs_member.addEventListener("change", function() {
+       enableNeedsPerm(needs_member.checked);
+    });
+
+  let acobElements = document.getElementsByClassName("acob");
+  for (let i = 0; i < acobElements.length; ++i) {
+     let el = acobElements[[]i];
+     el.addEventListener("focus", function(event) {
+         _acrob(null);
+         _acof(event);
+     });
+  }
+
+  $('member_approvers').addEventListener("focus", function(event) {
+    _acof(event);
+  });
+
+});
+</script>
+
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/field-detail-page.ezt b/templates/tracker/field-detail-page.ezt
new file mode 100644
index 0000000..75c09fa
--- /dev/null
+++ b/templates/tracker/field-detail-page.ezt
@@ -0,0 +1,421 @@
+[define title]Field [field_def.field_name][end]
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+<a href="/p/[projectname]/adminLabels">&lsaquo; Back to field list</a><br><br>
+
+
+<h4>Custom field</h4>
+
+<form action="detail.do" method="POST">
+<input type="hidden" name="token" value="[form_token]">
+<input type="hidden" name="field" value="[field_def.field_name]">
+
+<table cellspacing="8" class="rowmajor vt">
+  <tr>
+    <th width="1%">Name:</th>
+    <td>
+      [if-any uneditable_name]
+        <input type="hidden" name="name" value="[field_def.field_name]">
+        [field_def.field_name]
+      [else][if-any allow_edit]
+        <input name="name" value="[field_def.field_name]" size="30" class="acob">
+      [else]
+        [field_def.field_name]
+      [end][end]
+    </td>
+  </tr>
+
+  <tr>
+    <th>Description:</th>
+    <td>
+      [if-any allow_edit]
+        <textarea name="docstring" rows="4" cols="75">[field_def.docstring]</textarea>
+      [else]
+        [field_def.docstring]
+      [end]
+    </td>
+  </tr>
+
+  <tr>
+    <th>Type:</th>
+    [# TODO(jrobbins): make field types editable someday.]
+    <td>[field_def.type_name]</td>
+  </tr>
+
+  [is field_def.type_name "APPROVAL_TYPE"]
+    <tr>
+      <th>Approvers:</th>
+      <td>
+        [if-any allow_edit]
+          <input id="member_approvers" name="approver_names" size="75" value="[initial_approvers]"
+            autocomplete="off">
+          <span class="fielderror" style="margin-left:1em">
+          [if-any errors.approvers][errors.approvers][end]
+          </span>
+        [else]
+          [for field_def.approvers]
+            <div>[include "../framework/user-link.ezt" field_def.approvers]</div>
+          [end]
+        [end]
+      </td>
+    </tr>
+    <tr>
+      <th>Survey:</th>
+      <td>
+        [if-any allow_edit]
+          <textarea name="survey" rows="4" cols="75">[field_def.survey]</textarea>
+        [else]
+          <table cellspacing="4" cellpadding="0" style="padding: 2px; border:2px solid #eee">
+            [for field_def.survey_questions]
+              <tr><td>[field_def.survey_questions]</td></tr>
+            [end]
+          </table>
+        [end]
+      </td>
+    </tr>
+
+    [if-any approval_subfields]
+      <tr>
+        <th>Subfields:</th>
+        <td>
+          [for approval_subfields]
+            <div><a href="/p/[projectname]/fields/detail?field=[approval_subfields.field_name]">
+              [approval_subfields.field_name]
+            </a></div>
+          [end]
+        </td>
+      </tr>
+    [end]
+  [else]
+
+    <tr>
+      <th>Issue Gate field:</th>
+      <td>
+        [if-any field_def.is_phase_field]Yes[else]No[end]
+      </td>
+    </tr>
+
+    [is field_def.field_name "Type"][else]
+    <tr>
+      <th>Applicable:</th>
+      <td>When issue type is:
+        [if-any allow_edit]
+         [define oddball_applicability]Yes[end]
+          <select id="applicable_type" name="applicable_type">
+            <option value=""
+              [is initial_applicable_type ""]
+                selected="selected"
+                [define oddball_applicability]No[end]
+              [end]
+            >Anything</option>
+            <option disabled="disabled">----</option>
+            [for well_known_issue_types]
+              <option value="[well_known_issue_types]"
+                [is initial_applicable_type well_known_issue_types]
+                  selected="selected"
+                  [define oddball_applicability]No[end]
+                [end]
+              >[well_known_issue_types]</option>
+            [end]
+            [# If an oddball type was used, keep it.]
+            [is oddball_applicability "Yes"]
+              <option value="[initial_applicable_type]" selected="selected"
+              >[initial_applicable_type]</option>
+            [end]
+          </select>
+        [else]
+          [initial_applicable_type]
+        [end]
+        [# TODO(jrobbins): editable applicable_predicate.]
+      </td>
+    </tr>
+    [end]
+
+    <tr>
+      <th>Importance:</th>
+      <td>
+        [if-any allow_edit]
+          <select id="importance" name="importance">
+            <option value="required" [is field_def.importance "required"]selected[end]>Required when applicable</option>
+            <option value="normal" [is field_def.importance "normal"]selected[end]>Offered when applicable</option>
+            <option value="niche" [is field_def.importance "niche"]selected[end]>Under "Show all fields" when applicable</option>
+          </select>
+        [else]
+          [is field_def.importance "required"]Required when applicable[end]
+          [is field_def.importance "normal"]Offered when applicable[end]
+          [is field_def.importance "niche"]Under "Show all fields" when applicable[end]
+        [end]
+      </td>
+    </tr>
+
+    <tr>
+      <th>Multivalued:</th>
+      <td>
+        [if-any allow_edit]
+          <input type="checkbox" name="is_multivalued" class="acob"
+                 [if-any field_def.is_multivalued_bool]checked="checked"[end]>
+        [else]
+          [if-any field_def.is_multivalued_bool]Yes[else]No[end]
+        [end]
+      </td>
+    </tr>
+  [end]
+
+  [# TODO(jrobbins): dynamically display validation info as field type is edited.]
+  [is field_def.type_name "ENUM_TYPE"]
+    <tr>
+      <th>Choices:</th>
+      <td>
+        [if-any allow_edit]
+          <textarea name="choices" rows="10" cols="75" style="tab-size:18" [if-any allow_edit][else]disabled="disabled"[end]
+          >[initial_choices]</textarea>
+        [else]
+          <table cellspacing="4" cellpadding="0" style="padding: 2px; border:2px solid #eee">
+            [for field_def.choices]
+              <tr>
+                <td>[field_def.choices.name]</td>
+                <td>[if-any field_def.choices.docstring]= [end][field_def.choices.docstring]</td>
+              </tr>
+            [end]
+          </table>
+        [end]
+      </td>
+    </tr>
+  [end]
+
+  [is field_def.type_name "INT_TYPE"]
+    <tr id="int_row">
+      <th>Validation:</th>
+      <td>
+        Min value:
+        <input type="number" name="min_value" style="text-align:right; width: 4em"
+               value="[field_def.min_value]" class="acob"
+               [if-any allow_edit][else]disabled="disabled"[end]>
+
+        Max value:
+        <input type="number" name="max_value" style="text-align:right; width: 4em"
+               value="[field_def.max_value]" class="acob"
+               [if-any allow_edit][else]disabled="disabled"[end]>
+        <span class="fielderror" style="margin-left:1em">
+          [if-any errors.min_value][errors.min_value][end]</span><br>
+      </td>
+    </tr>
+  [end]
+
+  [is field_def.type_name "STR_TYPE"]
+    <tr id="str_row">
+      <th>Validation:</th>
+      <td>
+        Regex: <input type="text" name="regex" size="30" value="[field_def.regex]" class="acob"><br>
+        <span class="fielderror" style="margin-left:1em"
+            >[if-any errors.regex][errors.regex][end]</span>
+      </td>
+    </tr>
+  [end]
+
+  [is field_def.type_name "USER_TYPE"]
+    <tr id="user_row">
+      <th>Validation:</th>
+      <td>
+        <input type="checkbox" name="needs_member" id="needs_member" class="acob"
+               [if-any allow_edit][else]disabled="disabled"[end]
+               [if-any field_def.needs_member_bool]checked="checked"[end]>
+        <label for="needs_member">User must be a project member</label><br>
+        <span id="needs_perm_span" style="margin-left:1em">Required permission:
+          <input type="text" name="needs_perm" id="needs_perm" size="20"
+                 value="[field_def.needs_perm]" autocomplete="off" class="acob"
+                 [if-any allow_edit][else]disabled="disabled"[end]></span><br>
+      </td>
+    </tr>
+    <tr id="user_row2">
+      <th>Permissions:</th>
+      <td>
+        The users named in this field is granted this permission on this issue:<br>
+        [# TODO(jrobbins): one-click way to specify View vs. EditIssue vs. any custom perm.]
+        <input type="text" name="grants_perm" id="grants_perm" class="acob"
+               size="20" value="[field_def.grants_perm]" autocomplete="off"
+               [if-any allow_edit][else]disabled[end]>
+      </td>
+    </tr>
+    <tr id="user_row3">
+      <th>Notification:</th>
+      <td>
+        The users named in this field will be notified via email whenever:<br>
+        <select name="notify_on" [if-any allow_edit][else]disabled[end]
+                class="acrob">
+          <option value="never" [is field_def.notify_on "0"]selected="selected"[end]
+                  >No notifications</option>
+          <option value="any_comment" [is field_def.notify_on "1"]selected="selected"[end]
+                  >Any change or comment is added</option>
+        </select>
+      </td>
+    </tr>
+  [end]
+
+  [is field_def.type_name "DATE_TYPE"]
+    <tr id="date_row">
+      <th>Action:</th>
+      <td>
+        [if-any allow_edit]
+          <select name="date_action">
+            <option value="no_action" [is field_def.date_action_str "no_action"]selected="selected"[end]
+                    >No action</option>
+            [# TODO(jrobbins): owner-only option.]
+            <option value="ping_participants" [is field_def.date_action_str "ping_participants"]selected="selected"[end]
+                    >Post a comment and notify all issue participants</option>
+          </select>
+        [else]
+          [is field_def.date_action_str "no_action"]No action[end]
+          [# TODO(jrobbins): owner-only option.]
+          [is field_def.date_action_str "ping_participants"]Post a comment and notify all issue participants[end]
+        [end]
+      </td>
+    </tr>
+  [end]
+
+  [if-any field_def.is_approval_subfield]
+    <tr>
+      <th>Parent Approval:</th>
+      <td>
+        <a href="/p/[projectname]/fields/detail?field=[field_def.parent_approval_name]">
+          [field_def.parent_approval_name]
+        </a>
+      </td>
+    </tr>
+  [end]
+
+  <th>Admins:</th>
+    <td>
+      [if-any allow_edit]
+        <input id="member_admins" name="admin_names" size="75" value="[initial_admins]"
+               autocomplete="off" class="acob">
+        <span class="fielderror" style="margin-left:1em">
+            [if-any errors.field_admins][errors.field_admins][end]
+        </span>
+      [else]
+        [for field_def.admins]
+          <div>[include "../framework/user-link.ezt" field_def.admins]</div>
+        [end]
+      [end]
+    </td>
+  </tr>
+
+  [is field_def.type_name "APPROVAL_TYPE"][else]
+
+  <tr id="editors_restriction">
+    <th>Restriction
+      <i id="editors_tooltip" class="material-icons inline-icon" style="font-size:14px; vertical-align: text-bottom"
+        title="Project owners and field admins can always edit the values of a custom field.">
+      info_outline</i> :
+    </th>
+    <td style="display:flex; align-items:center">
+      [if-any allow_edit]
+        <input id="editors_checkbox" type="checkbox" name="is_restricted_field" class="acob"
+               [if-any field_def.is_restricted_field]checked="checked"[end]>
+        Restrict users that can edit values of this custom field.
+      [else]
+        [if-any field_def.is_restricted_field]Yes[else]No[end]
+      [end]
+    </td>
+  </tr>
+  <tr id="editors_input"
+      [if-any field_def.is_restricted_field][else]style="display:none"[end]>
+    <th>Editors:</th>
+    <td>
+      [if-any allow_edit]
+        <input id="member_editors" name="editor_names" size="75" value="[initial_editors]"
+               autocomplete="off" class="acob"
+               [if-any field_def.is_restricted_field][else]disabled[end]>
+        <span class="fielderror" style="margin-left:1em">
+            [if-any errors.field_editors][errors.field_editors][end]
+        </span>
+      [else]
+        [for field_def.editors]
+          <div>[include "../framework/user-link.ezt" field_def.editors]</div>
+        [end]
+      [end]
+    </td>
+  </tr>
+
+  [end]
+
+  <tr>
+    <td></td>
+    <td>
+      [if-any allow_edit]
+        <input type="submit" name="submit" value="Save changes">
+        <input type="submit" class="secondary" name="deletefield" value="Delete Field"
+               id="deletefield">
+      [end]
+    </td>
+  </tr>
+
+</table>
+</form>
+
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  var needs_perm_span = document.getElementById('needs_perm_span');
+  var needs_perm = document.getElementById('needs_perm');
+  var needs_member = document.getElementById('needs_member');
+  function enableNeedsPerm(enable) {
+    needs_perm_span.style.color = enable ? 'inherit' : '#999';
+    needs_perm.disabled = enable ? '' : 'disabled';
+    if (!enable) needs_perm.value = '';
+  }
+  [if-any allow_edit]
+    if (needs_perm)
+      enableNeedsPerm(needs_member.checked);
+  [end]
+
+  if ($("deletefield")) {
+    $("deletefield").addEventListener("click", function(event) {
+        var msg = ("Are you sure you want to delete [field_def.field_name]?\n" +
+                   "This operation cannot be undone. " +
+                   "[if-any approval_subfields]\nAll subfields will also be deleted.[end]" +
+                   "[is field_def.type_name "ENUM_TYPE"]\nEnum values will be retained on issues as labels.[end]");
+        if (!confirm(msg))
+          event.preventDefault();
+     });
+  }
+
+  [is field_def.type_name "APPROVAL_TYPE"][else]
+  //Enable editors input only when restricting the field.
+  document.getElementById('editors_checkbox').onchange = function() {
+    var member_editors = document.getElementById('member_editors');
+    var editors_input = document.getElementById('editors_input');
+    if (this.checked) {
+      editors_input.style.display = '';
+    } else {
+      editors_input.style.display = 'none';
+    }
+    member_editors.disabled = !this.checked;
+  };
+  [end]
+
+  var acobElements = document.getElementsByClassName("acob");
+  for (var i = 0; i < acobElements.length; ++i) {
+     var el = acobElements[[]i];
+     el.addEventListener("focus", function(event) {
+         _acrob(null);
+         _acof(event);
+     });
+  }
+
+  [is field_def.type_name "APPROVAL_TYPE"]
+  $('member_approvers').addEventListener("focus", function(event) {
+    _acof(event);
+  });
+  [end]
+
+  if ($("needs_member")) {
+    $("needs_member").addEventListener("change", function(event) {
+       enableNeedsPerm($("needs_member").checked);
+    });
+  }
+});
+</script>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/field-value-multi-date.ezt b/templates/tracker/field-value-multi-date.ezt
new file mode 100644
index 0000000..2e5e657
--- /dev/null
+++ b/templates/tracker/field-value-multi-date.ezt
@@ -0,0 +1,41 @@
+[if-any fields.values]
+  [for fields.values]
+    <input type="date" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value="[fields.values.val]"
+           [if-any fields.field_def.min_value]min="[fields.field_def.min_value]"[end]
+           [if-any fields.field_def.max_value]max="[fields.field_def.max_value]"[end]
+           [if-index fields.values first]
+             [is arg0 "hidden"][else]
+               [if-any arg1]required="required"[end]
+             [end]
+           [end]
+           style="text-align:right; width:12em" class="multivalued customfield"
+           aria-labelledby="[fields.field_id]_label">
+    [if-index fields.values first][else]
+      <u class="removeMultiFieldValueWidget">X</u>
+    [end]
+    [if-index fields.values last]
+      <u class="addMultiFieldValueWidget" data-field-id="[fields.field_id]" data-field-type="date"
+         data-validate-1="[fields.field_def.min_value]" data-validate-2="[fields.field_def.max_value]"
+         data-phase-name="[arg2]"
+         >Add a value</u>
+    [end]
+  [end]
+[else]
+    <input type="date" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value=""
+           [if-any fields.field_def.min_value]min="[fields.field_def.min_value]"[end]
+           [if-any fields.field_def.max_value]max="[fields.field_def.max_value]"[end]
+           [is arg0 "hidden"][else]
+             [if-any arg1]required="required"[end]
+           [end]
+           style="text-align:right; width:12em" class="multivalued customfield"
+           aria-labelledby="[fields.field_id]_label">
+    <u class="addMultiFieldValueWidget" data-field-id="[fields.field_id]" data-field-type="date"
+       data-validate-1="[fields.field_def.min_value]" data-validate-2="[fields.field_def.max_value]"
+       data-phase-name="[arg2]">Add a value</u>
+[end]
+
+[for fields.derived_values]
+  <input type="date" disabled="disabled" value="[fields.derived_values.val]"
+         style="font-style:italic; text-align:right; width:12em" class="multivalued"
+         aria-labelledby="[fields.field_id]_label">
+[end]
diff --git a/templates/tracker/field-value-multi-enum.ezt b/templates/tracker/field-value-multi-enum.ezt
new file mode 100644
index 0000000..004b5ac
--- /dev/null
+++ b/templates/tracker/field-value-multi-enum.ezt
@@ -0,0 +1,66 @@
+[for fields.field_def.choices]
+  [define checked]No[end]
+  [define derived]No[end]
+  [for fields.values]
+    [is fields.values.val fields.field_def.choices.name]
+      [define checked]Yes[end]
+    [end]
+  [end]
+  [for fields.derived_values]
+    [is fields.derived_values.val fields.field_def.choices.name]
+      [define checked]Yes[end]
+      [define derived]Yes[end]
+    [end]
+  [end]
+
+  <label id="[fields.field_id]_[fields.field_def.choices.name]_label" class="enum_checkbox"
+         title="[is derived "Yes"]derived: [end][fields.field_def.choices.name][if-any fields.field_def.choices.docstring]: [fields.field_def.choices.docstring][end]"
+         [is derived "Yes"]style="font-style:italic"[end]>
+    <input type="checkbox" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]"
+           value="[fields.field_def.choices.name]"
+           id="[arg0]_custom_[fields.field_id]_[fields.field_def.choices.idx]"
+           [is checked "Yes"]checked="checked"[end] [is derived "Yes"]disabled="disabled"[end]
+           aria-labelledby="[fields.field_id]_label [fields.field_id]_[fields.field_def.choices.name]_label">
+      [fields.field_def.choices.name]
+  </label>
+
+[end]
+
+
+[# Also include any oddball values as plain text with an _X_ icon.]
+[for fields.values]
+  [define already_shown]No[end]
+  [for fields.field_def.choices]
+    [is fields.field_def.choices.name fields.values.val]
+      [define already_shown]Yes[end]
+    [end]
+  [end]
+  [is already_shown "No"]
+    <span class="enum_checkbox"
+          title="This is not a defined choice for this field"
+          id="span_[arg0]_oddball_[fields.values.idx]">
+      <a id="[arg0]_oddball_[fields.values.idx]" class="remove_oddball x_icon"></a>[fields.values.val]
+      [# Below hidden input contains the value of the field for tracker_helpers._ParseIssueRequestFields ]
+      <input type="text" class="labelinput" id="input_[arg0]_oddball_[fields.values.idx]" size="20" name="label"
+             value="[fields.field_name]-[fields.values.val]" hidden>
+    </span>
+  [end]
+[end]
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  var oddballAnchors = document.getElementsByClassName("remove_oddball");
+  for (var i = 0; i < oddballAnchors.length; ++i) {
+    var oddballAnchor = oddballAnchors[[]i];
+
+    oddballAnchor.addEventListener("click", function(event) {
+      var oddballSpan = $("span_" + this.id);
+      oddballSpan.style.display = "none";
+      var oddballInput = $("input_" + this.id);
+      oddballInput.value = "";
+      event.preventDefault();
+    });
+  }
+});
+</script>
+
diff --git a/templates/tracker/field-value-multi-int.ezt b/templates/tracker/field-value-multi-int.ezt
new file mode 100644
index 0000000..f17c2cf
--- /dev/null
+++ b/templates/tracker/field-value-multi-int.ezt
@@ -0,0 +1,41 @@
+[if-any fields.values]
+  [for fields.values]
+    <input type="number" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value="[fields.values.val]"
+           [if-any fields.field_def.min_value]min="[fields.field_def.min_value]"[end]
+           [if-any fields.field_def.max_value]max="[fields.field_def.max_value]"[end]
+           [if-index fields.values first]
+             [is arg0 "hidden"][else]
+               [if-any arg1]required="required"[end]
+             [end]
+           [end]
+           style="text-align:right; width:12em" class="multivalued customfield"
+           aria-labelledby="[fields.field_id]_label">
+    [if-index fields.values first][else]
+      <u class="removeMultiFieldValueWidget">X</u>
+    [end]
+    [if-index fields.values last]
+      <u class="addMultiFieldValueWidget" data-field-id="[fields.field_id]" data-field-type="int"
+         data-validate-1="[fields.field_def.min_value]" data-validate-2="[fields.field_def.max_value]"
+         data-phase-name="[arg2]"
+         >Add a value</u>
+    [end]
+  [end]
+[else]
+    <input type="number" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value=""
+           [if-any fields.field_def.min_value]min="[fields.field_def.min_value]"[end]
+           [if-any fields.field_def.max_value]max="[fields.field_def.max_value]"[end]
+           [is arg0 "hidden"][else]
+             [if-any arg1]required="required"[end]
+           [end]
+           style="text-align:right; width:12em" class="multivalued customfield"
+           aria-labelledby="[fields.field_id]_label">
+    <u class="addMultiFieldValueWidget" data-field-id="[fields.field_id]" data-field-type="int"
+       data-validate-1="[fields.field_def.min_value]" data-validate-2="[fields.field_def.max_value]"
+       data-phase-name="[arg2]">Add a value</u>
+[end]
+
+[for fields.derived_values]
+  <input type="number" disabled="disabled" value="[fields.derived_values.val]"
+         style="font-style:italic; text-align:right; width:12em" class="multivalued"
+         aria-labelledby="[fields.field_id]_label">
+[end]
diff --git a/templates/tracker/field-value-multi-str.ezt b/templates/tracker/field-value-multi-str.ezt
new file mode 100644
index 0000000..62c72d7
--- /dev/null
+++ b/templates/tracker/field-value-multi-str.ezt
@@ -0,0 +1,33 @@
+[if-any fields.values]
+  [for fields.values]
+    <input name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value="[fields.values.val]"
+           [# TODO(jrobbins): string validation]
+           [if-index fields.values first]
+             [is arg0 "hidden"][else]
+               [if-any arg1]required="required"[end]
+             [end]
+           [end]
+           style="width: 12em" class="multivalued customfield"
+           aria-labelledby="[fields.field_id]_label">
+    [if-index fields.values first][else]
+      <u class="removeMultiFieldValueWidget">X</u>
+    [end]
+    [if-index fields.values last]
+      <u class="addMultiFieldValueWidget" data-field-id="[fields.field_id]" data-field-type="str" data-phase-name="[arg2]">Add a value</u>
+    [end]
+  [end]
+[else]
+  <input name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value=""
+         [# TODO(jrobbins): string validation]
+         [is arg0 "hidden"][else]
+           [if-any arg1]required="required"[end]
+         [end]
+         style="width: 12em" class="multivalued customfield" aria-labelledby="[fields.field_id]_label">
+      <u class="addMultiFieldValueWidget"  data-field-id="[fields.field_id]" data-field-type="str" data-phase-name="[arg2]">Add a value</u>
+[end]
+
+[for fields.derived_values]
+  <input disabled="disabled" value="[fields.derived_values.val]"
+         style="font-style:italic" style="width: 12em" class="multivalued"
+         aria-labelledby="[fields.field_id]_label">
+[end]
diff --git a/templates/tracker/field-value-multi-url.ezt b/templates/tracker/field-value-multi-url.ezt
new file mode 100644
index 0000000..de8a3e1
--- /dev/null
+++ b/templates/tracker/field-value-multi-url.ezt
@@ -0,0 +1,29 @@
+[if-any fields.values]
+  [for fields.values]
+    <input type="text" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value="[fields.values.val]"
+    [if-index fields.values first]
+      [is arg0 "hidden"][else]
+        [if-any arg1]required="required"[end]
+      [end]
+    [end]
+    style="width: 12em" class="multivalued customfield" aria-labelledby="[fields.field_id]_label">
+    [if-index fields.values first][else]
+      <u class="removeMultiFieldValueWidget">X</u>
+    [end]
+    [if-index fields.values last]
+      <u class="addMultiFieldValueWidget" data-field-id="[fields.field_id]" data-field-type="url" data-phase-name="[arg2]">Add a value</u>
+    [end]
+  [end]
+[else]
+  <input name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value=""
+         [is arg0 "hidden"][else]
+           [if-any arg1]required="required"[end]
+         [end]
+         style="width: 12em" class="multivalued customfield" aria-labelledby="[fields.field_id]_label">
+  <u class="addMultiFieldValueWidget" data-field-id="[fields.field_id]" data-field-type="url" data-phase-name="[arg2]">Add a value</u>
+[end]
+
+[for fields.derived_values]
+  <input disabled="disabled" value="[fields.derived_values.val]"
+         style="font-style:italic" style="width: 12em" class="multivalued" aria-labelledby="[fields.field_id]_label">
+[end]
\ No newline at end of file
diff --git a/templates/tracker/field-value-multi-user.ezt b/templates/tracker/field-value-multi-user.ezt
new file mode 100644
index 0000000..678cd79
--- /dev/null
+++ b/templates/tracker/field-value-multi-user.ezt
@@ -0,0 +1,32 @@
+[if-any fields.values]
+  [for fields.values]
+    <input type="text" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value="[fields.values.val]"
+           [# TODO(jrobbins): include fields.min_value and fields.max_value attrs]
+           [if-index fields.values first]
+             [is arg0 "hidden"][else]
+               [if-any arg1]required="required"[end]
+             [end]
+           [end]
+           style="width:12em" class="multivalued userautocomplete customfield" autocomplete="off"
+           data-ac-type="owner" aria-labelledby="[fields.field_id]_label">
+        [if-index fields.values first][else]
+          <u class="removeMultiFieldValueWidget">X</u>
+        [end]
+        [if-index fields.values last]
+          <u class="addMultiFieldValueWidget" data-field-id="[fields.field_id]" data-field-type="user" data-phase-name="[arg2]">Add a value</u>
+        [end]
+  [end]
+[else]
+  <input type="text" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value=""
+         [is arg0 "hidden"][else]
+           [if-any arg1]required="required"[end]
+         [end]
+         style="width:12em" class="multivalued userautocomplete customfield" autocomplete="off"
+         data-ac-type="owner" aria-labelledby="[fields.field_id]_label">
+    <u class="addMultiFieldValueWidget" data-field-id="[fields.field_id]" data-field-type="user" data-phase-name="[arg2]">Add a value</u>
+[end]
+
+[for fields.derived_values]
+  <input type="text" disabled="disabled" value="[fields.derived_values.val]"
+         style="width:12em" class="multivalued" aria-labelledby="[fields.field_id]_label">
+[end]
diff --git a/templates/tracker/field-value-single-date.ezt b/templates/tracker/field-value-single-date.ezt
new file mode 100644
index 0000000..d9f344a
--- /dev/null
+++ b/templates/tracker/field-value-single-date.ezt
@@ -0,0 +1,43 @@
+[# Even though this field definition says it is single-valued, the issue might have
+   multiple values if the field definition was previously multi-valued.  In such a situation
+   values other than the first value are shown read-only and must be explicitly removed
+   before the comment can be submitted. ]
+
+[# If the field has no explicit values, then show an empty form element.]
+[if-any fields.values][else]
+    <input type="date" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" id="[arg0]_custom_[fields.field_id]" value=""
+           [is arg0 "hidden"][else]
+             [if-any arg1] required="required"[end]
+           [end]
+           [if-any fields.field_def.min_value]min="[fields.field_def.min_value]"[end]
+           [if-any fields.field_def.max_value]max="[fields.field_def.max_value]"[end]
+           style="text-align:right; width:12em" class="multivalued customfield"
+           aria-labelledby="[fields.field_id]_label">
+[end]
+
+
+[for fields.values]
+  [if-index fields.values first]
+    <input type="date" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value="[fields.values.val]"
+           [is arg0 "hidden"][else]
+             [if-any arg1]required="required"[end]
+           [end]
+           [if-any fields.field_def.min_value]min="[fields.field_def.min_value]"[end]
+           [if-any fields.field_def.max_value]max="[fields.field_def.max_value]"[end]
+           style="text-align:right; width:12em" class="multivalued customfield"
+           aria-labelledby="[fields.field_id]_label">
+  [else]
+    <span>
+      <input type="date" disabled="disabled" value="[fields.values.val]"
+             style="text-align:right; width: 12em" class="multivalued customfield"
+             aria-labelledby="[fields.field_id]_label">
+      <u class="removeMultiFieldValueWidget">X</u>
+    </span>
+  [end]
+[end]
+
+[for fields.derived_values]
+  <input type="date" disabled="disabled" value="[fields.derived_values.val]"
+         style="font-style:italic; text-align:right; width:12em" class="multivalued"
+	 aria-labelledby="[fields.field_id]_label">
+[end]
diff --git a/templates/tracker/field-value-single-enum.ezt b/templates/tracker/field-value-single-enum.ezt
new file mode 100644
index 0000000..eb575a6
--- /dev/null
+++ b/templates/tracker/field-value-single-enum.ezt
@@ -0,0 +1,81 @@
+[if-any fields.values fields.derived_values]
+
+  [# TODO(jrobbins): a better UX for undesired values would be to replace the current
+     --/value slect widget with a plain-text display of the value followed by an _X_
+     link to delete it.  There would be a hidden field with the value.  Validation would
+     fail in JS and on the server if each such _X_ had not already been clicked.]
+
+  [# There could be more than one if this field used to be multi-valued.]
+  [for fields.values]
+      <select name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" id="[arg0]_custom_[fields.field_id]"
+              class="custom_field_value_menu" aria-labelledby="[fields.field_id]_label">
+          [define show_no_value_choice]No[end]
+          [# Non-required fields can have any value removed.]
+          [if-any fields.field_def.is_required_bool][else]
+            [define show_no_value_choice]Yes[end]
+          [end]
+          [# Formerly multi-valued fields need -- to narrow down to being singled valued.]
+          [if-index fields.values first][else]
+            [define show_no_value_choice]Yes[end]
+          [end]
+          [is show_no_value_choice "Yes"]
+            <option value="--"
+                    [is fields.values.val ""]selected="selected"[end]
+                    title="No value">--</option>
+          [end]
+
+          [define value_is_shown]No[end]
+          [for fields.field_def.choices]
+            [define show_choice]No[end]
+            [# Always show the current value]
+            [is fields.values.val fields.field_def.choices.name]
+              [define value_is_shown]Yes[end]
+              [define show_choice]Yes[end]
+            [end]
+            [# Formerly multi-valued fields extra values can ONLY be removed.]
+            [if-index fields.values first]
+              [define show_choice]Yes[end]
+            [end]
+            [is show_choice "Yes"]
+              <option value="[fields.field_def.choices.name]"
+                      [is fields.values.val fields.field_def.choices.name]selected="selected"[end]>
+                [fields.field_def.choices.name]
+		[if-any fields.field_def.choices.docstring]= [fields.field_def.choices.docstring][end]
+              </option>
+            [end]
+          [end]
+
+          [is value_is_shown "No"]
+            [# This is an oddball label, force the user to explicitly remove it.]
+              <option value="[fields.values.val]" selected="selected"
+                      title="This value is not a defined choice for this field">
+                [fields.values.val]
+              </option>
+          [end]
+      </select><br>
+  [end]
+
+  [for fields.derived_values]
+    <div title="Derived: [fields.derived_values.docstring]" class="rolloverzone">
+      <i>[fields.derived_values.val]</i>
+    </div>
+  [end]
+
+[else][# No current values, just give all choices.]
+
+   <select name="custom_[fields.field_id][is arg2 ""][else]_arg2[end]" id="[arg0]_custom_[fields.field_id]"
+           class="custom_field_value_menu" aria-labelledby="[fields.field_id]_label">
+       [if-any fields.field_def.is_required_bool]
+         <option value="" disabled="disabled" selected="selected">Select value&hellip;</option>
+       [else]
+          <option value="--" selected="selected" title="No value">--</option>
+       [end]
+       [for fields.field_def.choices]
+         <option value="[fields.field_def.choices.name]">
+           [fields.field_def.choices.name]
+           [if-any fields.field_def.choices.docstring]= [fields.field_def.choices.docstring][end]
+         </option>
+       [end]
+   </select><br>
+
+[end]
diff --git a/templates/tracker/field-value-single-int.ezt b/templates/tracker/field-value-single-int.ezt
new file mode 100644
index 0000000..944ba8b
--- /dev/null
+++ b/templates/tracker/field-value-single-int.ezt
@@ -0,0 +1,43 @@
+[# Even though this field definition says it is single-valued, the issue might have
+   multiple values if the field definition was previously multi-valued.  In such a situation
+   values other than the first value are shown read-only and must be explicitly removed
+   before the comment can be submitted. ]
+
+[# If the field has no explicit values, then show an empty form element.]
+[if-any fields.values][else]
+    <input type="number" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" id="[arg0]_custom_[fields.field_id]" value=""
+           [is arg0 "hidden"][else]
+             [if-any arg1] required="required"[end]
+           [end]
+           [if-any fields.field_def.min_value]min="[fields.field_def.min_value]"[end]
+           [if-any fields.field_def.max_value]max="[fields.field_def.max_value]"[end]
+           style="text-align:right; width:12em" class="multivalued customfield"
+           aria-labelledby="[fields.field_id]_label">
+[end]
+
+
+[for fields.values]
+  [if-index fields.values first]
+    <input type="number" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value="[fields.values.val]"
+           [is arg0 "hidden"][else]
+             [if-any arg1]required="required"[end]
+           [end]
+           [if-any fields.field_def.min_value]min="[fields.field_def.min_value]"[end]
+           [if-any fields.field_def.max_value]max="[fields.field_def.max_value]"[end]
+           style="text-align:right; width:12em" class="multivalued customfield"
+           aria-labelledby="[fields.field_id]_label">
+  [else]
+    <span>
+      <input type="number" disabled="disabled" value="[fields.values.val]"
+             style="text-align:right; width: 12em" class="multivalued customfield"
+             aria-labelledby="[fields.field_id]_label">
+      <u class="removeMultiFieldValueWidget">X</u>
+    </span>
+  [end]
+[end]
+
+[for fields.derived_values]
+  <input type="number" disabled="disabled" value="[fields.derived_values.val]"
+         style="font-style:italic; text-align:right; width:12em" class="multivalued"
+	 aria-labelledby="[fields.field_id]_label">
+[end]
diff --git a/templates/tracker/field-value-single-str.ezt b/templates/tracker/field-value-single-str.ezt
new file mode 100644
index 0000000..60ff63c
--- /dev/null
+++ b/templates/tracker/field-value-single-str.ezt
@@ -0,0 +1,41 @@
+[# Even though this field definition says it is single-valued, the issue might have
+   multiple values if the field definition was previously multi-valued.  In such a situation
+   values other than the first value are shown read-only and must be explicitly removed
+   before the comment can be submitted. ]
+
+[# If the field has no explicit values, then show an empty form element.]
+[if-any fields.values][else]
+    <input name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" id="[arg0]_custom_[fields.field_id]" value=""
+           [is arg0 "hidden"][else]
+             [if-any arg1]required="required"[end]
+           [end]
+           [# TODO(jrobbins): validation]
+           class="multivalued customfield" style="width: 12em"
+           aria-labelledby="[fields.field_id]_label">
+[end]
+
+
+[for fields.values]
+  [if-index fields.values first]
+    <input name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value="[fields.values.val]"
+           class="multivalued customfield"
+           [is arg0 "hidden"][else]
+             [if-any arg1]required="required"[end]
+           [end]
+           [# TODO(jrobbins): validation]
+           style="width: 12em"
+           aria-labelledby="[fields.field_id]_label"><br>
+  [else]
+    <span>
+      <input disabled="disabled" value="[fields.values.val]"
+             class="multivalued" style="width: 12em" aria-labelledby="[fields.field_id]_label">
+      <a href="#" class="removeMultiFieldValueWidget">X</a>
+    </span>
+  [end]
+[end]
+
+[for fields.derived_values]
+  <input disabled="disabled" value="[fields.derived_values.val]"
+         style="font-style:italic" class="multivalued" style="width: 12em"
+         aria-labelledby="[fields.field_id]_label"><br>
+[end]
diff --git a/templates/tracker/field-value-single-url.ezt b/templates/tracker/field-value-single-url.ezt
new file mode 100644
index 0000000..27bd9fe
--- /dev/null
+++ b/templates/tracker/field-value-single-url.ezt
@@ -0,0 +1,31 @@
+[# Even though this field definition says it is single-valued, the issue might have
+   multiple values if the field definition was previously multi-valued.  In such a situation
+   values other than the first value are shown read-only and must be explicitly removed
+   before the comment can be submitted. ]
+
+[# If the field has no explicit values, then show an empty form element.]
+[if-any fields.values][else]
+  <input name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" id="[arg0]_custom_[fields.field_id]" value=""
+         class="multivalued customfield"
+         [is arg0 "hidden"][else]
+           [if-any arg1]required="required"[end]
+         [end]
+         style="width: 12em" aria-labelledby="[fields.field_id]_label">
+[end]
+
+[for fields.values]
+  [if-index fields.values first]
+    <input name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value="[fields.values.val]"
+           class="multivalued customfield"
+           [is arg0 "hidden"][else]
+             [if-any arg1]required="required"[end]
+           [end]
+           style="width: 12em" aria-labelledby="[fields.field_id]_label"><br>
+  [else]
+    <span>
+      <input disabled="disabled" value="[fields.values.val]"
+             class="multivalued" style="width: 12em" aria-labelledby="[fields.field_id]_label">
+      <a href="#" class="removeMultiFieldValueWidget">X</a>
+    </span>
+  [end]
+[end]
\ No newline at end of file
diff --git a/templates/tracker/field-value-single-user.ezt b/templates/tracker/field-value-single-user.ezt
new file mode 100644
index 0000000..5a09d00
--- /dev/null
+++ b/templates/tracker/field-value-single-user.ezt
@@ -0,0 +1,39 @@
+[# Even though this field definition says it is single-valued, the issue might have
+   multiple values if the field definition was previously multi-valued.  In such a situation
+   values other than the first value are shown read-only and must be explicitly removed
+   before the comment can be submitted. ]
+
+[# If the field has no explicit values, then show an empty form element.]
+[if-any fields.values][else]
+    <input type="text" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" id="[arg0]_custom_[fields.field_id]" value=""
+           [is arg0 "hidden"][else]
+             [if-any arg1]required="required"[end]
+           [end]
+           style="width:12em" class="multivalued userautocomplete customfield" autocomplete="off"
+           data-ac-type="owner" aria-labelledby="[fields.field_id]_label">
+[end]
+
+
+[for fields.values]
+  [if-index fields.values first]
+    <input type="text" name="custom_[fields.field_id][is arg2 ""][else]_[arg2][end]" value="[fields.values.val]"
+           [is arg0 "hidden"][else]
+             [if-any arg1]required="required"[end]
+           [end]
+           style="width:12em" class="multivalued userautocomplete customfield" autocomplete="off"
+           data-ac-type="owner" aria-labelledby="[fields.field_id]_label">
+  [else]
+    <span>
+      <input type="text" disabled="disabled" value="[fields.values.val]"
+             style="width:12em" class="multivalued userautocomplete customfield" autocomplete="off"
+             data-ac-type="owner" aria-labelledby="[fields.field_id]_label">
+      <a href="#" class="removeMultiFieldValueWidget">X</a>
+    </span>
+  [end]
+[end]
+
+[for fields.derived_values]
+  <input type="text" disabled="disabled" value="[fields.derived_values.val]"
+         style="font-style:italic; width:12em" class="multivalued"
+         data-ac-type="owner" aria-labelledby="[fields.field_id]_label">
+[end]
diff --git a/templates/tracker/field-value-widgets-js.ezt b/templates/tracker/field-value-widgets-js.ezt
new file mode 100644
index 0000000..127d85c
--- /dev/null
+++ b/templates/tracker/field-value-widgets-js.ezt
@@ -0,0 +1,35 @@
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  var removeMFVElements = document.getElementsByClassName("removeMultiFieldValueWidget");
+  for (var i = 0; i < removeMFVElements.length; ++i) {
+     var el = removeMFVElements[[]i];
+     el.addEventListener("click", function(event) {
+         _removeMultiFieldValueWidget(event.target);
+     });
+  }
+
+  var addMFVElements = document.getElementsByClassName("addMultiFieldValueWidget");
+  for (var i = 0; i < addMFVElements.length; ++i) {
+     var el = addMFVElements[[]i];
+     el.addEventListener("click", function(event) {
+          var target = event.target;
+          var fieldID = target.getAttribute("data-field-id");
+          var fieldType = target.getAttribute("data-field-type");
+          var fieldValidate1 = target.getAttribute("data-validate-1");
+          var fieldValidate2 = target.getAttribute("data-validate-2");
+	  var fieldPhaseName = target.getAttribute("data-phase-name");
+         _addMultiFieldValueWidget(
+             event.target, fieldID, fieldType, fieldValidate1, fieldValidate2, fieldPhaseName);
+     });
+  }
+
+  var customFieldElements = document.getElementsByClassName("customfield");
+  for (var i = 0; i < customFieldElements.length; ++i) {
+     var el = customFieldElements[[]i];
+     el.addEventListener("focus", function(event) {
+         _acrob(null);
+         _acof(event);
+     });
+  }
+});
+</script>
diff --git a/templates/tracker/field-value-widgets.ezt b/templates/tracker/field-value-widgets.ezt
new file mode 100644
index 0000000..3593fa2
--- /dev/null
+++ b/templates/tracker/field-value-widgets.ezt
@@ -0,0 +1,56 @@
+[# Display widgets for editing one custom field.
+   The variable "fields" must already refer to a FieldValueView object.
+   arg0: True if the field is multi-valued.
+   arg1: Prefix for IDs
+   arg2: True if the field should be required
+   arg3: Parent phase name suffix if any.
+]
+[is fields.field_def.type_name "ENUM_TYPE"]
+  [if-any arg0]
+    [include "field-value-multi-enum.ezt" arg1 arg2 arg3]
+  [else]
+    [include "field-value-single-enum.ezt" arg1 arg2 arg3]
+  [end]
+[end]
+
+[is fields.field_def.type_name "INT_TYPE"]
+  [if-any arg0]
+    [include "field-value-multi-int.ezt" arg1 arg2 arg3]
+  [else]
+    [include "field-value-single-int.ezt" arg1 arg2 arg3]
+  [end]
+[end]
+
+[is fields.field_def.type_name "STR_TYPE"]
+  [if-any arg0]
+    [include "field-value-multi-str.ezt" arg1 arg2 arg3]
+  [else]
+    [include "field-value-single-str.ezt" arg1 arg2 arg3]
+  [end]
+[end]
+
+[is fields.field_def.type_name "USER_TYPE"]
+  [if-any arg0]
+    [include "field-value-multi-user.ezt" arg1 arg2 arg3]
+  [else]
+    [include "field-value-single-user.ezt" arg1 arg2 arg3]
+  [end]
+[end]
+
+[is fields.field_def.type_name "DATE_TYPE"]
+  [if-any arg0]
+    [include "field-value-multi-date.ezt" arg1 arg2 arg3]
+  [else]
+    [include "field-value-single-date.ezt" arg1 arg2 arg3]
+  [end]
+[end]
+
+[is fields.field_def.type_name "URL_TYPE"]
+  [if-any arg0]
+    [include "field-value-multi-url.ezt" arg1 arg2 arg3]
+  [else]
+    [include "field-value-single-url.ezt" arg1 arg2 arg3]
+  [end]
+[end]
+
+[# TODO(jrobbins): more field types. ]
diff --git a/templates/tracker/issue-advsearch-page.ezt b/templates/tracker/issue-advsearch-page.ezt
new file mode 100644
index 0000000..6fc89fb
--- /dev/null
+++ b/templates/tracker/issue-advsearch-page.ezt
@@ -0,0 +1,82 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "hidetabs"]
+
+<form action="advsearch.do" method="POST" style="margin:6px;margin-top:12px;" autocomplete="false">
+
+[# Note: No need for UI element permission checking here. ]
+
+<table cellspacing="0" cellpadding="4" border="0" class="advquery">
+   <tr class="focus"><td width="25%"><b>&nbsp;Find issues</b></td>
+    <td>Search within</td>
+    <td>
+       <select name="can" style="width:100%">
+        [include "issue-can-widget.ezt" "advsearch"]
+       </select>
+    </td>
+    <td width="25%" align="center" rowspan="3">
+     <input type="submit" name="btn" value="Search" style="font-size:120%">
+    </td>
+   </tr>
+   <tr class="focus"><td width="25%"></td>
+       <td>with <b>all</b> of the words</td><td><input type="text" size="25" name="words" value=""></td>
+   </tr>
+   <tr class="focus"><td></td>
+       <td><b>without</b> the words</td><td><input type="text" size="25" name="without" value=""></td>
+   </tr>
+   <tr><td>&nbsp;</td><td></td><td></td><td></td></tr>
+   [# TODO(jrobbins): allow commas ]
+   <tr><td><b>Restrict search to</b></td><td>Labels</td><td><input type="text" name="labels" id="labelsearch" size="25" value="" placeholder="All the labels" autocomplete="off"></td><td class="eg">e.g., FrontEnd Priority:High</td></tr>
+   <tr><td rowspan="5"><br>
+        <table cellspacing="0" cellpadding="0" border="0"><tr><td>
+        <div class="tip">
+            <b>Tip:</b> Search results can be<br>refined by clicking on
+            the<br>result table headings.<br> <a href="searchtips">More
+            Search Tips</a>
+        </div>
+        </td></tr></table>
+       </td>
+       [# TODO(jrobbins): allow commas ]
+       <td>Statuses</td><td><input type="text" name="statuses" id="statussearch" size="25" value="" placeholder="Any status" autocomplete="off"></td><td class="eg">e.g., Started</td></tr>
+   <tr><td>Components</td><td><input type="text" size="25" name="components" id="componentsearch" value="" placeholder="Any component" autocomplete="off"></td><td class="eg"></td></tr>
+   <tr><td>Reporters</td><td><input type="text" size="25" name="reporters" id="memberreportersearch" value="" placeholder="Any reporter" autocomplete="off"></td><td class="eg"></td></tr>
+   [# TODO(jrobbins): allow commas ]
+   <tr><td>Owners</td><td><input type="text" size="25" name="owners" id="ownersearch" value="" placeholder="Any owner" autocomplete="off"></td><td class="eg">e.g., user@example.com</td></tr>
+   <tr><td>Cc</td><td><input type="text" size="25" name="cc" id="memberccsearch" value="" placeholder="Any cc" autocomplete="off"></td><td class="eg"></td></tr>
+   <tr><td></td><td>Comment by</td><td><input type="text" size="25" name="commentby" id="membercommentbysearch" value="" placeholder="Any commenter"></td><td class="eg"></td></tr>
+   [# TODO(jrobbins): implement search by star counts
+   <tr><td></td><td>Starred by</td>
+       <td>
+           <select name="starcount" style="width:100%">
+            <option value="-1" selected="selected">Any number of users</option>
+            <option value="0">Exactly zero users</option>
+            <option value="1">1 or more users</option>
+            <option value="2">2 or more users</option>
+            <option value="3">3 or more users</option>
+            <option value="4">4 or more users</option>
+            <option value="5">5 or more users</option>
+           </select></td>
+       <td class="eg"></td>
+   </tr>
+   ]
+   [# TODO(jrobbins) search by dates? ]
+   <tr><td></td><td>&nbsp;</td><td></td><td class="eg"></td></tr>
+</table>
+</form>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  var _idsToAddDefaultListeners = [[]
+      "labelsearch", "statussearch", "componentsearch", "memberreportersearch",
+      "ownersearch", "memberccsearch", "membercommentbysearch"];
+  for (var i = 0; i < _idsToAddDefaultListeners.length; i++) {
+    var id = _idsToAddDefaultListeners[[]i];
+    if ($(id)) {
+      $(id).addEventListener("focus", function(event) {
+        _acof(event);
+      });
+    }
+  }
+});
+</script>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/issue-attachment-text.ezt b/templates/tracker/issue-attachment-text.ezt
new file mode 100644
index 0000000..98e9cdf
--- /dev/null
+++ b/templates/tracker/issue-attachment-text.ezt
@@ -0,0 +1,43 @@
+[define category_css]css/ph_detail.css[end]
+[define page_css]css/d_sb.css[end]
+[# Use raw format because filename will be escaped when title variable is used.]
+[define title][format "raw"][filename][end] ([filesize])[end]
+[include "../framework/header.ezt" "showtabs"]
+
+<link type="text/css" rel="stylesheet"
+      href="[version_base]/static/css/prettify.css">
+
+<h3 style="margin-bottom: 0">Issue <a href="detail?id=[local_id][#TODO(jrobbins): comment number]">[local_id]</a> attachment: [filename] <small>([filesize])</small>
+</h3>
+
+
+
+<div class="fc">
+  [if-any too_large]
+    <p><em>This file is too large to display.</em></p>
+
+  [else][if-any is_binary]
+
+    <p><em>
+      This file is not plain text (only UTF-8 and Latin-1 text encodings are currently supported).
+    </em></p>
+  [else]
+
+    [include "../framework/file-content-part.ezt"]
+    [include "../framework/file-content-js.ezt"]
+
+  [end][end]
+
+</div>
+
+
+[if-any should_prettify]
+<script src="[version_base]/static/js/prettify.js" nonce="[nonce]"></script>
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  prettyPrint();
+});
+</script>
+[end]
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/issue-blocking-change-notification-email.ezt b/templates/tracker/issue-blocking-change-notification-email.ezt
new file mode 100644
index 0000000..9e45c69
--- /dev/null
+++ b/templates/tracker/issue-blocking-change-notification-email.ezt
@@ -0,0 +1,7 @@
+Issue [issue.local_id]: [format "raw"][summary][end]
+[detail_url]
+
+[if-any is_blocking]This issue is now blocking issue [downstream_issue_ref].
+See [downstream_issue_url]
+[else]This issue is no longer blocking issue [downstream_issue_ref].
+See [downstream_issue_url][end]
diff --git a/templates/tracker/issue-bulk-change-notification-email.ezt b/templates/tracker/issue-bulk-change-notification-email.ezt
new file mode 100644
index 0000000..8a2d996
--- /dev/null
+++ b/templates/tracker/issue-bulk-change-notification-email.ezt
@@ -0,0 +1,16 @@
+[if-any any_link_only][else][if-any amendments]Updates:
+[amendments]
+[end]
+Comment[if-any commenter] by [commenter.display_name][end]:
+[if-any comment_text][format "raw"][comment_text][end][else](No comment was entered for this change.)[end]
+[end]
+Affected issues:
+[for issues]  Issue [issues.local_id]: [if-any issues.link_only][else][format "raw"][issues.summary][end][end]
+    [format "raw"]http://[hostport][issues.detail_relative_url][end]
+
+[end]
+--
+You received this message because you are listed in the owner
+or CC fields of these issues, or because you starred them.
+You may adjust your issue notification preferences at:
+http://[hostport]/hosting/settings
diff --git a/templates/tracker/issue-bulk-edit-page.ezt b/templates/tracker/issue-bulk-edit-page.ezt
new file mode 100644
index 0000000..d57c0ae
--- /dev/null
+++ b/templates/tracker/issue-bulk-edit-page.ezt
@@ -0,0 +1,483 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "hidetabs"]
+
+[# Note: base permission for this page is EditIssue]
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+
+
+<div style="margin-top: 0; padding: 3px;" class="closed">
+ <form action="bulkedit.do" method="POST" style="margin: 0; padding: 0" enctype="multipart/form-data"
+       id="bulk_form">
+
+ <input type="hidden" name="can" value=[can] >
+ <input type="hidden" name="start" value=[start] >
+ <input type="hidden" name="num" value=[num] >
+ <input type="hidden" name="q" value="[query]">
+ <input type="hidden" id="sort" name="sort" value="[sortspec]">
+ <input type="hidden" name="groupby" value="[groupby]">
+ <input type="hidden" name="colspec" value="[colspec]">
+ <input type="hidden" name="x" value="[grid_x_attr]">
+ <input type="hidden" name="y" value="[grid_y_attr]">
+ <input type="hidden" name="mode" value="[if-any grid_mode]grid[end]">
+ <input type="hidden" name="cells" value="[grid_cell_mode]">
+
+ <input type="hidden" name="ids"
+        value="[for issues][issues.local_id][if-index issues last][else], [end][end]">
+ <input type="hidden" name="token" value="[form_token]">
+ <table cellpadding="0" cellspacing="0" border="0">
+  <tr><td>
+
+ <table cellspacing="0" cellpadding="3" border="0" class="rowmajor vt">
+   <tr><th>Issues:</th>
+    <td colspan="2">
+     [for issues]
+      <a href="detail?id=[issues.local_id]" title="[issues.summary]"
+        [if-any issues.closed]class=closed_ref[end]
+        >[if-any issues.closed]&nbsp;[end][issues.local_id][if-any issues.closed]&nbsp;[end]</a>[if-index issues last][else], [end]
+     [end]
+    </td>
+   </tr>
+
+   <tr>
+    <th>Comment:</th>
+    <td colspan="2">
+     <textarea cols="75" rows="6" name="comment" id="comment" class="issue_text">[initial_comment]</textarea>
+       [if-any errors.comment]
+         <div class="fielderror">[errors.comment]</div>
+       [end]
+    </td>
+   </tr>
+
+   <tr><th width="10%"><label for="statusenter">Status:</label></th><td colspan="2">
+        <select id="statusenter" name="status">
+          <option style="display: none" value="[initial_status]"></option>
+        </select>
+        <span id="merge_area" style="margin-left:2em;">
+               Merge into issue:
+               <input type="text" id="merge_into" name="merge_into" style="width: 5em"
+                      value="[is initial_merge_into "0"][else][initial_merge_into][end]">
+        </span>
+        [if-any errors.merge_into_id]
+          <div class="fielderror">[errors.merge_into_id]</div>
+        [end]
+       </td>
+   </tr>
+   <tr><th width="10%">Owner:</th><td colspan="2">
+         [include "issue-bulk-operator-part.ezt" "ownerenter" ""]
+         <input id="ownerenter" type="text" autocomplete="off" style="width: 12em"
+                name="owner" value="[initial_owner]">
+         [if-any errors.owner]
+           <div class="fielderror">[errors.owner]</div>
+         [end]
+       </td>
+   </tr>
+   <tr><th>Cc:</th><td colspan="2">
+         [include "issue-bulk-operator-part.ezt" "memberenter" "multi"]
+         <input type="text" multiple id="memberenter" autocomplete="off" style="width: 30em"
+                name="cc" value="[initial_cc]">
+         [if-any errors.cc]
+           <div class="fielderror">[errors.cc]</div>
+         [end]
+       </td>
+   </tr>
+
+   <tr><th>Components:</th><td colspan="2">
+       [include "issue-bulk-operator-part.ezt" "componententer" "multi"]
+       <input type="text" id="componententer" style="width:30em"
+              name="components" value="[initial_components]">
+       [if-any errors.components]
+         <div class="fielderror">[errors.components]</div>
+       [end]
+   </td></tr>
+
+   <tbody class="collapse">
+   [# Show some field editing elements immediately, others can be revealed.]
+     [define any_fields_to_reveal]No[end]
+     [for fields]
+       [if-any fields.applicable][if-any fields.is_editable]
+         [# TODO(jrobbins): determine applicability dynamically and update fields in JS]
+         <tr [if-any fields.display][else]class="ifExpand"[define any_fields_to_reveal]Yes[end][end]>
+           <th>[fields.field_name]:</th>
+           <td colspan="2">
+             [define widget_id]custom_[fields.field_id][end]
+             [define multi][if-any fields.field_def.is_multivalued_bool]multi[end][end]
+             [include "issue-bulk-operator-part.ezt" widget_id multi]
+             [include "field-value-widgets.ezt" False "" fields.field_def.is_required_bool ""]
+             <div class="fielderror" style="display:none" id="error_custom_[fields.field_id]"></div>
+           </td>
+         <tr>
+       [end][end]
+     [end]
+     [is any_fields_to_reveal "Yes"]
+       <tr class="ifCollapse">
+         <td colspan="2"><a href="#" class="toggleCollapse">Show all fields</a><t/td>
+       </tr>
+     [end]
+   </tbody>
+
+   [for issue_phase_names]
+     [for fields]
+       [is fields.phase_name issue_phase_names][if-any fields.is_editable]
+         [# TODO(jojwang): monorail:5154, bulk-editing single phase values not supported]
+         [if-any fields.field_def.is_multivalued_bool]
+           <tr><th>[issue_phase_names].[fields.field_name]:</th>
+             <td colspan="2">
+               [define widget_id]custom_[fields.field_id]_[issue_phase_names][end]
+               [include "issue-bulk-operator-part.ezt" widget_id "multi"]
+               [include "field-value-widgets.ezt" False "" fields.field_def.is_required_bool issue_phase_names]
+               <div class="fielderror" style="display:none" id="error_custom_[issue_phase_names]_[fields.field_id]"></div>
+             </td>
+           </tr>
+         [end]
+       [end][end]
+     [end]
+   [end]
+
+   <tr><th>Labels:</th>
+       <td colspan="2" class="labelediting">
+        <div id="enterrow1">
+         <input type="text" class="labelinput" id="label0" size="20" autocomplete="off"
+                name="label" value="[label0]">
+         <input type="text" class="labelinput" id="label1" size="20" autocomplete="off"
+                name="label" value="[label1]">
+         <input type="text" class="labelinput" id="label2" size="20" autocomplete="off"
+                data-show-id="enterrow2" data-hide-id="addrow1"
+                name="label" value="[label2]"> <span id="addrow1" class="fakelink" data-instead="enterrow2">Add a row</span>
+        </div>
+        <div id="enterrow2"  style="display:none">
+         <input type="text" class="labelinput" id="label3" size="20" autocomplete="off"
+                name="label" value="[label3]">
+         <input type="text" class="labelinput" id="label4" size="20" autocomplete="off"
+                name="label" value="[label4]">
+         <input type="text" class="labelinput" id="label5" size="20" autocomplete="off"
+                data-show-id="enterrow3" data-hide-id="addrow2"
+                name="label" value="[label5]"> <span id="addrow2" class="fakelink" data-instead="enterrow3">Add a row</span>
+        </div>
+        <div id="enterrow3" style="display:none">
+         <input type="text" class="labelinput" id="label6" size="20" autocomplete="off"
+                name="label" value="[label6]">
+         <input type="text" class="labelinput" id="label7" size="20" autocomplete="off"
+                name="label" value="[label7]">
+         <input type="text" class="labelinput" id="label8" size="20" autocomplete="off"
+                data-show-id="enterrow4" data-hide-id="addrow3"
+                name="label" value="[label8]"> <span id="addrow3" class="fakelink" data-instead="enterrow4">Add a row</span>
+        </div>
+        <div id="enterrow4" style="display:none">
+         <input type="text" class="labelinput" id="label9" size="20" autocomplete="off"
+                name="label" value="[label9]">
+         <input type="text" class="labelinput" id="label10" size="20" autocomplete="off"
+                name="label" value="[label10]">
+         <input type="text" class="labelinput" id="label11" size="20" autocomplete="off"
+                data-show-id="enterrow5" data-hide-id="addrow4"
+                name="label" value="[label11]"> <span id="addrow4" class="fakelink" data-instead="enterrow5">Add a row</span>
+        </div>
+        <div id="enterrow5" style="display:none">
+         <input type="text" class="labelinput" id="label12" size="20" autocomplete="off"
+                name="label" value="[label12]">
+         <input type="text" class="labelinput" id="label13" size="20" autocomplete="off"
+                name="label" value="[label13]">
+         <input type="text" class="labelinput" id="label14" size="20" autocomplete="off"
+                data-show-id="enterrow6" data-hide-id="addrow5"
+                name="label" value="[label14]"> <span id="addrow5" class="fakelink" data-instead="enterrow6">Add a row</span>
+        </div>
+        <div id="enterrow6" style="display:none">
+         <input type="text" class="labelinput" id="label15" size="20" autocomplete="off"
+                name="label" value="[label15]">
+         <input type="text" class="labelinput" id="label16" size="20" autocomplete="off"
+                name="label" value="[label16]">
+         <input type="text" class="labelinput" id="label17" size="20" autocomplete="off"
+                data-show-id="enterrow7" data-hide-id="addrow6"
+                name="label" value="[label17]"> <span id="addrow6" class="fakelink" data-instead="enterrow7">Add a row</span>
+        </div>
+        <div id="enterrow7" style="display:none">
+         <input type="text" class="labelinput" id="label18" size="20" autocomplete="off"
+                name="label" value="[label18]">
+         <input type="text" class="labelinput" id="label19" size="20" autocomplete="off"
+                name="label" value="[label19]">
+         <input type="text" class="labelinput" id="label20" size="20" autocomplete="off"
+                data-show-id="enterrow8" data-hide-id="addrow7"
+                name="label" value="[label20]"> <span id="addrow7" class="fakelink" data-instead="enterrow8">Add a row</span>
+        </div>
+        <div id="enterrow8" style="display:none">
+         <input type="text" class="labelinput" id="label21" size="20" autocomplete="off"
+                name="label" value="[label21]">
+         <input type="text" class="labelinput" id="label22" size="20" autocomplete="off"
+                name="label" value="[label22]">
+         <input type="text" class="labelinput" id="label23" size="20" autocomplete="off"
+                name="label" value="[label23]">
+        </div>
+      </td>
+   </tr>
+
+   <tr><th>Blocked on:</th><td colspan="2">
+         [include "issue-bulk-operator-part.ezt" "blockedonenter" "multi"]
+         <input type="text" multiple id="blockedonenter" style="width: 30em"
+                name="blocked_on" value="[initial_blocked_on]">
+         [if-any errors.blocked_on]
+           <div class="fielderror">[errors.blocked_on]</div>
+         [end]
+       </td>
+   </tr>
+
+   <tr><th>Blocking:</th><td colspan="2">
+         [include "issue-bulk-operator-part.ezt" "blockingenter" "multi"]
+         <input type="text" multiple id="blockingenter" style="width: 30em"
+                name="blocking" value="[initial_blocking]">
+         [if-any errors.blocking]
+           <div class="fielderror">[errors.blocking]</div>
+         [end]
+       </td>
+   </tr>
+
+   [if-any page_perms.DeleteIssue]
+   <tr><th width="10%">Move to project:</th><td colspan="2">
+         <input id="move_toenter" type="text" autocomplete="off" style="width: 12em"
+                name="move_to">
+         [if-any errors.move_to]
+           <div class="fielderror">[errors.move_to]</div>
+         [end]
+       </td>
+   </tr>
+   [end]
+
+   <tr>
+    <td colspan="3"><span id="confirmarea" class="novel" style="padding-top:5px; margin:0">
+      <span id="confirmmsg"></span>
+      [# TODO(jrobbins): <a href="TODO" target="_new">Learn more</a>]
+    </span>
+    </td>
+   </tr>
+ </table>
+
+
+
+[# TODO(jrobbins):     <a class="ifClosed toggleHidden" href="#">More options</a>]
+[#     <a class="ifOpened" href="#" class="toggleHidden" style="background:#ccc; padding: 4px;">Hide options</a>]
+[#     <div  class="ifOpened"  style="background:#ccc; padding: 8px"><a href="#autmatically-generated">Bookmarkable link to these values</a></div>]
+[# <br><br>]
+
+
+
+
+ <div style="padding:6px">
+  <input type="submit" id="submit_btn" name="btn" value="Update [num_issues] Issue[is num_issues "1"][else]s[end]">
+  <input type="button" id="discard" name="nobtn" value="Discard">
+
+  <input type="checkbox" checked="checked" name="send_email" id="send_email" style="margin-left:1em">
+  <label for="send_email" title="Send issue change notifications to interested users">Send email</label>
+
+ </div>
+
+
+
+[if-any show_progress]
+ <div>Note: Updating [num_issues] issues will take approximately [num_seconds] seconds.</div>
+ <div id="progress">
+ </div>
+[end]
+
+   </td>
+   <td>
+     <div class="tip">
+         <b>Usage:</b> This form allows you to update several issues at one
+         time.<br><br>
+         The same comment will be applied to all issues.<br><br>
+
+         If specified, the status or owner you enter will be applied to all
+         issues.<br><br>
+
+         You may append or remove values in multi-valued fields by choosing the += or -= operators.
+         To remove labels, preceed the label with a leading dash.  (You may also use a leading dash
+         to remove individual items when using the += operator.)
+     </div>
+   </td>
+   </tr>
+   </table>
+
+
+ </form>
+</div>
+
+<mr-bulk-approval-update
+  projectName="[projectname]"
+  localIdsStr="[local_ids_str]"
+></mr-bulk-approval-update>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  document.getElementById('comment').select();
+  _lfidprefix = 'label';
+  setTimeout(_forceProperTableWidth, 100);
+
+  _exposeExistingLabelFields();
+
+  [if-any errors.custom_fields]
+    var field_error;
+    [for errors.custom_fields]
+      field_error = document.getElementById('error_custom_' + [errors.custom_fields.field_id]);
+      field_error.textContent = "[errors.custom_fields.message]";
+      field_error.style.display = "";
+    [end]
+  [end]
+
+  checksubmit();
+  setInterval(checksubmit, 700); [# catch changes that were not keystrokes, e.g., paste menu item.]
+
+
+
+function checksubmit() {
+  var submit = document.getElementById('submit_btn');
+  var cg = document.getElementById('cg');
+  if (cg != undefined) { submit.disabled='disabled'; }
+
+  submit.disabled='disabled';
+  var restrict_to_known = [if-any restrict_to_known]true[else]false[end];
+  var confirmmsg = document.getElementById('confirmmsg');
+  var statusenter = $('statusenter');
+  var merge_area = $('merge_area');
+  var statuses_offer_merge = [[] [for statuses_offer_merge]"[statuses_offer_merge]"[if-index statuses_offer_merge last][else],[end][end] ];
+  if (restrict_to_known && confirmmsg && confirmmsg.textContent.length > 0) {
+    return;
+  }
+  if (cg == undefined || cg.value.length > 1) {
+    submit.disabled='';
+  }
+
+  if (statusenter) {
+     var offer_merge = 'none';
+     for (var i = 0; i < statuses_offer_merge.length; i++) {
+       if (statusenter.value == statuses_offer_merge[[]i]) offer_merge = '';
+     }
+     merge_area.style.display = offer_merge;
+  }
+}
+
+
+function disableFormElement(el) {
+  el.readOnly = 'yes';
+  el.style.background = '#eee';
+  [# TODO(jrobbins): disable auto-complete ]
+}
+
+
+function bulkOnSubmit() {
+  var inputs = document.getElementsByTagName('input');
+  for (var i = 0; i < inputs.length; i++) {
+    disableFormElement(inputs[[]i]);
+  }
+  disableFormElement(document.getElementById('comment'));
+  [if-any show_progress]
+   var progress = document.getElementById('progress');
+   progress.textContent = 'Processing...';
+  [end]
+}
+
+
+function _checkAutoClear(inputEl, selectID) {
+  var val = inputEl.value;
+  var sel = document.getElementById(selectID);
+  if (val.match(/^--+$/)) {
+    sel.value = 'clear';
+    inputEl.value = '';
+  } else if (val) {
+    sel.value = 'set';
+  }
+}
+
+
+$("bulk_form").addEventListener("submit", bulkOnSubmit);
+
+if ($("statusenter")) {
+  _loadStatusSelect("[projectname]", "statusenter", "[initial_status]", isBulkEdit=true);
+  $("statusenter").addEventListener("focus", function(event) {
+    _acrob(null);
+  });
+  $("statusenter").addEventListener("keyup", function(event) {
+    _checkAutoClear(event.target, "op_statusenter");
+    return _confirmNovelStatus(event.target);
+  });
+}
+if ($("ownerenter")) {
+  $("ownerenter").addEventListener("focus", function(event) {
+    _acof(event);
+  });
+  $("ownerenter").addEventListener("keyup", function(event) {
+    _checkAutoClear(event.target, "op_ownerenter");
+    return true;
+  });
+}
+if ($("memberenter")) {
+  $("memberenter").addEventListener("focus", function(event) {
+    _acof(event);
+  });
+}
+if ($("componententer")) {
+  $("componententer").addEventListener("focus", function(event) {
+    _acof(event);
+  });
+}
+
+if ($("move_toenter")) {
+  $("move_toenter").addEventListener("focus", function(event) {
+    _acof(event);
+  });
+}
+
+if ($("submit_btn")) {
+  $("submit_btn").addEventListener("focus", function(event) {
+    _acrob(null);
+  });
+  $("submit_btn").addEventListener("mousedown", function(event) {
+    _acrob(null);
+  });
+  $("submit_btn").addEventListener("click", function(event) {
+    _trimCommas();
+  });
+}
+if ($("discard")) {
+  $("discard").addEventListener("click", function(event) {
+    _confirmDiscardEntry(this);
+    event.preventDefault();
+  });
+}
+
+var labelInputs = document.getElementsByClassName("labelinput");
+for (var i = 0; i < labelInputs.length; ++i) {
+  var labelInput = labelInputs[[]i];
+  labelInput.addEventListener("keyup", function (event) {
+    if (event.target.getAttribute("data-show-id") &&
+        event.target.getAttribute("data-hide-id") &&
+        event.target.value) {
+      _showID(event.target.getAttribute("data-show-id"));
+      _hideID(event.target.getAttribute("data-hide-id"));
+    }
+    return _vallab(event.target);
+  });
+  labelInput.addEventListener("blur", function (event) {
+    return _vallab(event.target);
+  });
+  labelInput.addEventListener("focus", function (event) {
+    return _acof(event);
+  });
+}
+
+var addRowLinks = document.getElementsByClassName("fakelink");
+for (var i = 0; i < addRowLinks.length; ++i) {
+  var rowLink = addRowLinks[[]i];
+  rowLink.addEventListener("click", function (event) {
+      _acrob(null);
+      var insteadID = event.target.getAttribute("data-instead");
+      if (insteadID)
+        _showInstead(insteadID, this);
+  });
+}
+
+});
+</script>
+
+[end]
+
+[include "field-value-widgets-js.ezt"]
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/issue-bulk-operator-part.ezt b/templates/tracker/issue-bulk-operator-part.ezt
new file mode 100644
index 0000000..8b1f37a
--- /dev/null
+++ b/templates/tracker/issue-bulk-operator-part.ezt
@@ -0,0 +1,29 @@
+[# Display a <select> widget with options to set/append/remove/clear the field.
+   Args:
+    arg0: element ID of widget to disable if Clear is selected.  The form name and ID
+          of the <select> will be "op_" + arg0.
+    arg1: "multi" for multi-valued fields so that "Append" and "Remove" are offered.
+  ]
+<select name="op_[arg0]" id="op_[arg0]" style="width:9em" tabindex="-1">
+  [is arg1 "multi"]
+    <option value="append" selected="selected">Append +=</option>
+    <option value="remove">Remove -=</option>
+    [# TODO(jrobbins): <option value="setexact">Set exactly :=</option>]
+  [else]
+    <option value="set" selected="selected">Set =</option>
+    <option value="clear">Clear</option>
+  [end]
+</select>
+
+[is arg1 "multi"][else]
+<script type="text/javascript" nonce="[nonce]">
+
+runOnLoad(function() {
+  if ($("op_[arg0]")) {
+    $("op_[arg0]").addEventListener("change", function(event) {
+      TKR_ignoreWidgetIfOpIsClear(event.target, '[arg0]');
+    });
+  }
+});
+</script>
+[end]
diff --git a/templates/tracker/issue-can-widget.ezt b/templates/tracker/issue-can-widget.ezt
new file mode 100644
index 0000000..b0f8958
--- /dev/null
+++ b/templates/tracker/issue-can-widget.ezt
@@ -0,0 +1,82 @@
+[# This is used in the issue search form and issue advanced search page.  We want to show the same options in both contexts.]
+[define selected]False[end]
+<option disabled="disabled">Search within:</option>
+<option value="1" [is can "1"]selected=selected [define selected]True[end] [end]
+        title="All issues in the project">&nbsp;All issues</option>
+<option value="2" [is can "2"]selected=selected [define selected]True[end] [end]
+        title="All issues except ones with a closed status">&nbsp;Open issues</option>
+
+[if-any logged_in_user]
+ [define username][logged_in_user.email][end]
+ [is arg0 "admin"][define username]logged-in-user[end][end]
+ <option value="3" [is can "3"]selected=selected [define selected]True[end] [end]
+         title="[[]Open issues] owner=[username]">&nbsp;Open and owned by me</option>
+ <option value="4" [is can "4"]selected=selected [define selected]True[end] [end]
+         title="[[]Open issues] reporter=[username]">&nbsp;Open and reported by me</option>
+ <option value="5" [is can "5"]selected=selected [define selected]True[end] [end]
+         title="[[]Open issues] starredby:[username]">&nbsp;Open and starred by me</option>
+ <option value="8" [is can "8"]selected=selected [define selected]True[end] [end]
+         title="[[]Open issues] commentby:[username]">&nbsp;Open with comment by me</option>
+[end]
+
+[# TODO(jrobbins): deprecate these and tell projects to define canned queries instead.]
+<option value="6" [is can "6"]selected=selected [define selected]True[end] [end]
+         title="[[]Open issues] status=New">&nbsp;New issues</option>
+<option value="7" [is can "7"]selected=selected [define selected]True[end] [end]
+         title="[[]All issues] status=fixed,done">&nbsp;Issues to verify</option>
+
+[is arg0 "admin"][else]
+  [define first]Yes[end]
+  [for canned_queries]
+    [is first "Yes"]
+      [define first]No[end]
+      <option disabled="disabled">----</option>
+    [end]
+    [# TODO(jrobbins): canned query visibility conditions, e.g., members only. ]
+    <option value="[canned_queries.query_id]"
+            [is can canned_queries.query_id]
+                selected=selected
+                [define selected]True[end]
+            [end]
+            title="[canned_queries.docstring]"
+            >&nbsp;[canned_queries.name]</option>
+  [end]
+  [if-any perms.EditProject][if-any is_cross_project][else]
+      [is first "Yes"]
+        [define first]No[end]
+        <option disabled="disabled">----</option>
+      [end]
+      <option value="manageprojectqueries"
+              >&nbsp;Manage project queries...</option>
+  [end][end]
+
+  [if-any logged_in_user]
+    [define first]Yes[end]
+    [for saved_queries]
+      [is first "Yes"]
+        [define first]No[end]
+        <option disabled="disabled">----</option>
+      [end]
+      <option value="[saved_queries.query_id]"
+              [is can saved_queries.query_id]
+                  selected=selected
+                  [define selected]True[end]
+              [end]
+              title="[saved_queries.docstring]"
+              >&nbsp;[saved_queries.name]</option>
+    [end]
+    [is first "Yes"]
+      [define first]No[end]
+      <option disabled="disabled">----</option>
+    [end]
+    <option value="managemyqueries"
+            >&nbsp;Manage my saved queries...</option>
+  [end][# end if logged in]
+
+[end][# end not "admin"]
+
+[is selected "False"]
+  <option value="[can]" selected=selected
+          title="Custom Query"
+          >&nbsp;Custom Query</option>
+[end]
diff --git a/templates/tracker/issue-change-notification-email-link-only.ezt b/templates/tracker/issue-change-notification-email-link-only.ezt
new file mode 100644
index 0000000..e0adf5c
--- /dev/null
+++ b/templates/tracker/issue-change-notification-email-link-only.ezt
@@ -0,0 +1,2 @@
+The following issue was [if-any was_created]created[else]updated[end]:
+[detail_url]
diff --git a/templates/tracker/issue-change-notification-email.ezt b/templates/tracker/issue-change-notification-email.ezt
new file mode 100644
index 0000000..a8b3a93
--- /dev/null
+++ b/templates/tracker/issue-change-notification-email.ezt
@@ -0,0 +1,37 @@
+[is comment.sequence "0"][#
+  ]Status: [is issue.status.name ""]----[else][issue.status.name][end]
+[#]Owner: [is issue.owner.username ""]----[else][issue.owner.display_name][end][#
+  ][if-any issue.cc]
+[#  ]CC: [for issue.cc][issue.cc.display_name][if-index issue.cc last] [else], [end][end][#
+  ][end][#
+  ][if-any issue.labels]
+[#  ]Labels:[for issue.labels] [issue.labels.name][end][#
+  ][end][#
+  ][if-any issue.components]
+[#  ]Components:[for issue.components] [issue.components.path][end][#
+  ][end][#
+  ][if-any issue.blocked_on]
+[#  ]BlockedOn:[for issue.blocked_on] [if-any issue.blocked_on.visible][issue.blocked_on.display_name][end][end][#
+  ][end][#
+  ][for issue.fields][if-any issue.fields.display][if-any issue.fields.values]
+[#  ][issue.fields.field_name]:[for issue.fields.values] [issue.fields.values.val][end][end][#
+  ][end][end]
+[else][if-any comment.amendments][#
+  ]Updates:
+[#][for comment.amendments]	[comment.amendments.field_name]: [format "raw"][comment.amendments.newvalue][end]
+[#][end][#
+  ][end][end]
+[is comment.sequence "0"]New issue [issue.local_id][#
+  ][else]Comment #[comment.sequence] on issue [issue.local_id][end][#
+  ] by [comment.creator.display_name]: [format "raw"][summary][#
+][end]
+[detail_url]
+
+[if-any comment.content][#
+  ][for comment.text_runs][include "render-plain-text.ezt" comment.text_runs][end][#
+][else](No comment was entered for this change.)[#
+][end]
+[if-any comment.attachments]
+Attachments:
+[for comment.attachments]	[comment.attachments.filename]  [comment.attachments.filesizestr]
+[end][end]
diff --git a/templates/tracker/issue-chart-body.ezt b/templates/tracker/issue-chart-body.ezt
new file mode 100644
index 0000000..34ae0f7
--- /dev/null
+++ b/templates/tracker/issue-chart-body.ezt
@@ -0,0 +1,17 @@
+<mr-chart
+  projectName="[projectname]"
+  hotlistId="[if-any hotlist_id][hotlist_id][end]"
+></mr-chart>
+
+<div>
+  <div class="help" style="padding: 1em;">
+    <h2 style="font-size: 1.2em; margin: 0 0 0.5em;">Supported query parameters:</h2>
+    <span style="font-family: monospace;">
+      cc, component, hotlist, label, owner, reporter, status
+    </span>
+    <br /><br />
+    <a href="https://bugs.chromium.org/p/monorail/issues/entry?labels=Feature-Charts">
+      Please file feedback here.
+    </a>
+  </div>
+</div>
diff --git a/templates/tracker/issue-chart-controls-top.ezt b/templates/tracker/issue-chart-controls-top.ezt
new file mode 100644
index 0000000..082affb
--- /dev/null
+++ b/templates/tracker/issue-chart-controls-top.ezt
@@ -0,0 +1,9 @@
+<!-- TODO: make this cleaner by replacing it with web component. -->
+<div class="list">
+  <div class="button_set">
+    <a class="choice_chip" href="[if-any is_hotlist][else]list[end]?can=[can]&amp;q=[query]&amp;colspec=[format "url"][colspec][end]&amp;groupby=[format "url"][groupby][end]&amp;sort=[format "url"][sortspec][end]&amp;x=[grid_x_attr]&amp;y=[grid_y_attr]&amp;cells=[grid_cell_mode]">List</a>
+    <a class="choice_chip" href="[if-any is_hotlist][else]list[end]?can=[can]&amp;q=[query]&amp;colspec=[format "url"][colspec][end]&amp;groupby=[format "url"][groupby][end]&amp;sort=[format "url"][sortspec][end]&amp;x=[grid_x_attr]&amp;y=[grid_y_attr]&amp;cells=[grid_cell_mode]&amp;mode=grid">Grid</a>
+    <a class="choice_chip active_choice" href="[if-any is_hotlist][else]list[end]?can=[can]&amp;q=[query]&amp;colspec=[format "url"][colspec][end]&amp;groupby=[format "url"][groupby][end]&amp;sort=[format "url"][sortspec][end]&amp;x=[grid_x_attr]&amp;y=[grid_y_attr]&amp;cells=[grid_cell_mode]&amp;mode=chart">Chart</a>
+  </div>
+</div>
+
diff --git a/templates/tracker/issue-entry-page.ezt b/templates/tracker/issue-entry-page.ezt
new file mode 100644
index 0000000..b9889d6
--- /dev/null
+++ b/templates/tracker/issue-entry-page.ezt
@@ -0,0 +1,556 @@
+[define title]New Issue[end]
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "hidetabs"]
+
+[# Note: base permission for this page is CreateIssue]
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+
+<div id="color_control" style="margin-top: 0; padding: 3px;" class="closed [if-any code_font]codefont[end]">
+ <form action="entry.do" method="POST" style="margin: 0; padding: 0" enctype="multipart/form-data" id="create_issue_form">
+  <input type="hidden" name="token" value="[form_token]">
+  <input type="hidden" name="template_name" value="[template_name]">
+  <input type="hidden" name="star" id="star_input" value="1">
+  <table cellpadding="0" cellspacing="0" border="0" role="presentation">
+   <tr><td>
+
+    <table cellspacing="0" cellpadding="3" border="0" class="rowmajor vt" role="presentation">
+     [if-any offer_templates]
+      <tr><th><label for="template_name">Template:</label></th>
+       <td colspan="2">
+        <select name="template_name" id="template_name" data-project-name="[projectname]" ignore-dirty>
+         [for config.template_names]
+           <option role="option" value="[format "url"][config.template_names][end]" [is config.template_names template_name]selected=selected[end]>[config.template_names]</option>
+         [end]
+        </select>
+        <span id="mr-code-font-toggle-slot"></span>
+       </td>
+      </tr>
+     [else]
+      <tr>
+       <td colspan="3">
+        <span id="mr-code-font-toggle-slot"></span>
+       </td>
+      </tr>
+     [end]
+
+      <tr><th><label for="summary">Summary:</label></th>
+       <td colspan="2" class="inplace">
+        <input type="text" id="summary" name="summary" value="[initial_summary]" required data-clear-summary-on-click="[clear_summary_on_click]"
+               [if-any any_errors][else]autofocus[end]>
+        [if-any errors.summary]
+         <div class="fielderror">[errors.summary]</div>
+        [end]
+
+        [if-any any_errors][else]
+          <script type="text/javascript" nonce="[nonce]">
+            document.getElementById('summary').select();
+          </script>
+        [end]
+       </td>
+      </tr>
+
+      <tr><th rowspan="3"><label for="comment">Description:</label></th>
+       <td colspan="2">
+        <textarea style="width:100%" cols="80" rows="15" name="comment" id="comment" class="issue_text" required>[initial_description]
+</textarea> [# We want 1 final newline but 0 trailing spaces in the textarea]
+        [if-any errors.comment]
+         <div class="fielderror">[errors.comment]</div>
+        [end]
+       </td>
+      </tr>
+
+      <tr><td colspan="2">
+       [include "../features/cues-conduct.ezt"]
+       <div id="attachmentareadeventry"></div>
+      </td></tr>
+
+      <tr>
+       <td style="width: 12em">
+        [if-any allow_attachments]
+         <span id="attachprompt"><img width="16" height="16" src="/static/images/paperclip.png" border="0" alt="A paperclip">
+         <a href="#" id="attachafile">Attach a file</a></span>
+         <div id="attachmaxsize" style="margin-left:1.2em; display:none">Max. attachments: [max_attach_size]</div>
+         [if-any errors.attachments]
+          <div class="fielderror">[errors.attachments]</div>
+         [end]
+        [else]
+         <div style="color:#666">Issue attachment storage quota exceeded.</div>
+        [end]
+       </td>
+       <td id="star_cell" style="vertical-align: initial">
+        [# Note: if the user is permitted to enter an issue, they are permitted to star it.]
+        <a class="star" id="star" style="color:cornflowerblue;">&#9733;</a>
+        Notify me of issue changes, if enabled in <a id="settings" target="new" href="/hosting/settings">settings</a>
+       </td>
+      </tr>
+
+      <tr [if-any page_perms.EditIssue page_perms.EditIssueStatus][else]style="display:none;"[end]><th width="10%"><label for="statusenter">Status:</label></th>
+       <td colspan="2" class="inplace">
+       <select id="statusenter" name="status">
+         <option style="display: none" value="[initial_status]"></option>
+       </select>
+       </label>
+       </td>
+      </tr>
+      <tr [if-any page_perms.EditIssue page_perms.EditIssueOwner][else]style="display:none;"[end]><th width="10%"><label for="ownerenter">Owner:</label></th>
+       <td colspan="2">
+        <input type="text" id="ownerenter" autocomplete="off"
+               style="width:16em"
+               name="owner" value="[initial_owner]" aria-autocomplete="list" role="combobox">
+          <span class="availability_[owner_avail_state]" id="owner_avail_state"
+                style="padding-left:1em; [if-any owner_avail_message_short][else]display:none[end]">
+            &#9608;
+            <span id="owner_availability">[owner_avail_message_short]</span>
+          </span>
+        </div>
+        [if-any errors.owner]
+         <div class="fielderror">[errors.owner]</div>
+        [end]
+       </td>
+      </tr>
+
+      <tr [if-any page_perms.EditIssue page_perms.EditIssueCc][else]style="display:none;"[end]><th><label for="memberenter">Cc:</label></th>
+       <td colspan="2" class="inplace">
+        <input type="text" multiple id="memberenter" autocomplete="off" name="cc" value="[initial_cc]" aria-autocomplete="list" role="combobox">
+        [if-any errors.cc]
+         <div class="fielderror">[errors.cc]</div>
+        [end]
+       </td>
+      </tr>
+
+      [# TODO(jrobbins): page_perms.EditIssueComponent]
+      <tr [if-any page_perms.EditIssue][else]style="display:none;"[end]><th><label for="components">Components:</label></th>
+       <td colspan="2" class="inplace">
+        <input type="text" id="components" autocomplete="off" name="components" value="[initial_components]" aria-autocomplete="list" role="combobox">
+        [if-any errors.components]
+         <div class="fielderror">[errors.components]</div>
+        [end]
+       </td>
+      </tr>
+
+      [if-any uneditable_fields]
+      <tr id="res_fd_banner"><th></th>
+        <td colspan="2" class="inplace" style="text-align:left; border-radius:25px">
+          <span style="background:var(--chops-orange-50); padding:5px; margin-top:10px; padding-left:10px; padding-right:10px; border-radius:25px">
+            <span style="padding-right:7px">
+              Info: Disabled inputs occur when you are not allowed to edit that restricted field.
+            </span>
+            <i id="res_fd_message" class="material-icons inline-icon" style="font-weight:bold; font-size:14px; vertical-align: text-bottom; cursor: pointer">
+            close</i>
+          </span>
+        </td>
+      </tr>
+      [end]
+
+      <tbody [if-any page_perms.EditIssue][else]style="display:none;"[end] class="collapse">
+       [define any_fields_to_reveal]No[end]
+       [for fields]
+        [if-any fields.applicable][if-any fields.field_def.is_approval_subfield][else][if-any fields.field_def.is_phase_field][else]
+         [# TODO(jrobbins): determine applicability dynamically and update fields in JS]
+         <tr [if-any fields.display][else]class="ifExpand"[define any_fields_to_reveal]Yes[end][end]>
+          <th id="[fields.field_id]_label">[fields.field_name]:</th>
+          <td colspan="2">
+            [if-any fields.is_editable]
+              [include "field-value-widgets.ezt" fields.field_def.is_multivalued_bool "" fields.field_def.is_required_bool ""]
+              <div class="fielderror" style="display:none" id="error_custom_[fields.field_id]"></div>
+            [else]
+              <input disabled value = "
+              [for fields.values]
+                [fields.values.val]
+              [end]
+              " style="text-align:right; width:12em" class="multivalued customfield" aria-labelledby="[fields.field_id]_label">
+            [end]
+          </td>
+         <tr>
+        [end][end][end]
+       [end]
+       [is any_fields_to_reveal "Yes"]
+        <tr class="ifCollapse">
+         <td colspan="2"><a href="#" class="toggleCollapse">Show all fields</a><t/td>
+        </tr>
+       [end]
+      </tbody>
+
+      <tr [if-any page_perms.EditIssue][else]style="display:none;"[end]><th>Labels:</th>[# aria-labels added in label-fields.ezt]
+       <td colspan="2" class="labelediting">
+        [include "label-fields.ezt" "just-two" ""]
+       </td>
+      </tr>
+
+      <tbody class="collapse">
+       [if-any page_perms.EditIssue]
+       <tr class="ifCollapse">
+        <td><a href="#" class="toggleCollapse">More options</a></td>
+       </tr>
+       [end]
+
+       <tr [if-any page_perms.EditIssue][else]style="display:none;"[end] class="ifExpand"><th style="white-space:nowrap"><label for="blocked_on">Blocked on:</label></th>
+        <td class="inplace" colspan="2">
+         <input type="text" name="blocked_on" id="blocked_on" value="[initial_blocked_on]">
+         [if-any errors.blocked_on]
+          <div class="fielderror">[errors.blocked_on]</div>
+         [end]
+        </td>
+       </tr>
+       <tr [if-any page_perms.EditIssue][else]style="display:none;"[end] class="ifExpand"><th><label for="blocking">Blocking:</label></th>
+        <td class="inplace" colspan="2">
+         <input type="text" name="blocking" id="blocking" value="[initial_blocking]" />
+         [if-any errors.blocking]
+          <div class="fielderror">[errors.blocking]</div>
+         [end]
+        </td>
+       </tr>
+
+       <tr [if-any page_perms.EditIssue][else]style="display:none;"[end] class="ifExpand"><th><label for="hotlistsenter">Hotlists:</label></th>
+        <td class="inplace" colspan="2">
+         <input type="text" name="hotlists" autocomplete="off" id="hotlistsenter" value="[initial_hotlists]" />
+         [if-any errors.hotlists]
+          <div class="fielderror">[errors.hotlists]</div>
+         [end]
+        </td>
+       </tr>
+     </tbody>
+
+     [if-any approvals]
+        <tr>
+          <th>Launch Gates:</th>
+          <td colspan="7">
+            [include "launch-gates-widget.ezt"]
+          </td>
+        </tr>
+     [end]
+
+     [for fields][if-any fields.applicable][if-any fields.field_def.is_approval_subfield]
+     <tr is="subfield-row">
+       <th>[fields.field_def.parent_approval_name] [fields.field_name]:</th>
+       <td colspan="2">
+         [if-any fields.is_editable]
+           [include "field-value-widgets.ezt" False "tmpl" False ""]
+           <div class="fielderror" style="display:none" id="error_custom_[fields.field_id]"></div>
+         [else]
+           <input disabled value = "
+           [for fields.values]
+             [fields.values.val]
+           [end]
+           " style="text-align:right; width:12em" class="multivalued customfield" aria-labelledby="[fields.field_id]_label">
+         [end]
+       </td>
+     </tr>
+    [end][end][end]
+
+    [for issue_phase_names]
+      [for fields]
+        [is fields.phase_name issue_phase_names]
+        <tr>
+          <th>[issue_phase_names].[fields.field_name]:</th>
+            <td colspan="2">
+              [if-any fields.is_editable]
+                [include "field-value-widgets.ezt" False "tmpl" False issue_phase_names]
+                <div class="fielderror" style="display:none" id="error_custom_[issue_phase_names]_[fields.field_id]"></div>
+              [else]
+                <input disabled value = "
+                [for fields.values]
+                  [fields.values.val]
+                [end]
+                " style="text-align:right; width:12em" class="multivalued customfield" aria-labelledby="[fields.field_id]_label">
+              [end]
+            </td>
+          </th>
+        </tr>
+      [end][end][end]
+
+     [include "../framework/label-validation-row.ezt"]
+     [include "../framework/component-validation-row.ezt"]
+    </table>
+
+    <div style="padding:6px">
+     <input type="submit" id="submit_btn" name="btn" value="Submit issue">
+     <input type="button" id="discard" name="nobtn" value="Discard">
+    </div>
+
+   </td>
+   </tr>
+  </table>
+ </form>
+</div>
+
+[include "../features/filterrules-preview.ezt"]
+
+<div style="margin-top:5em; margin-left: 8px;">
+  Problems submitting issues?
+  <a href="#" id="new-issue-feedback-link">
+    Send feedback
+  </a>
+</div>
+
+<div id="helparea"></div>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  window.getTSMonClient().recordIssueEntryTiming();
+
+  if ($('launch-gates-table')) {
+    $('launch-gates-table').classList.remove('hidden');
+  }
+
+  if ($("template_name")) {
+    $("template_name").addEventListener("change", function(event) {
+      _switchTemplate(event.target.getAttribute("data-project-name"),
+                      event.target.value)
+    });
+  }
+
+  if ($("summary")) {
+    var clearSummaryOnClick = $("summary").getAttribute("data-clear-summary-on-click");
+    if (clearSummaryOnClick) {
+      $("summary").addEventListener("keydown", function(event) {
+        _clearOnFirstEvent('[format "js"][initial_summary][end]');
+      });
+    }
+    $("summary").addEventListener("click", function(event) {
+      if (clearSummaryOnClick) {
+        _clearOnFirstEvent('[format "js"][initial_summary][end]');
+      }
+      checksubmit();
+    });
+    $("summary").addEventListener("focus", function(event) {
+      _acrob(null);
+      _acof(event);
+    });
+    $("summary").addEventListener("keyup", function(event) {
+      checksubmit();
+      return true;
+    });
+  }
+
+  if ($("settings")) {
+    $("settings").addEventListener("focus", function(event) {
+      _acrob(null);
+    });
+  }
+  if ($("statusenter")) {
+    _loadStatusSelect("[projectname]", "statusenter", "[initial_status]");
+    $("statusenter").addEventListener("focus", function(event) {
+      _acrob(null);
+    });
+  }
+  if($("res_fd_message")) {
+    $("res_fd_message").onclick = function(){
+      $("res_fd_banner").classList.add("hidden");
+    };
+  };
+
+  if ($("submit_btn")) {
+    $("submit_btn").addEventListener("focus", function(event) {
+      _acrob(null);
+    });
+    $("submit_btn").addEventListener("click", function(event) {
+      _acrob(null);
+      _trimCommas();
+      userMadeChanges = false;
+    });
+  }
+  if ($("discard")) {
+    $("discard").addEventListener("focus", function(event) {
+      _acrob(null);
+    });
+    $("discard").addEventListener("click", function(event) {
+      _acrob(null);
+      _confirmDiscardEntry(event.target);
+      event.preventDefault();
+    });
+  }
+  if ($("new-issue-feedback-link")) {
+    $("new-issue-feedback-link").addEventListener("click", function(event) {
+      userfeedback.api.startFeedback({
+          'productId': '5208992',  // Required.
+          'productVersion': '[app_version]'  // Optional.
+        });
+    })
+  }
+
+  window.allowSubmit = true;
+  $("create_issue_form").addEventListener("submit", function() {
+    if (allowSubmit) {
+      allowSubmit = false;
+      $("submit_btn").value = "Creating issue...";
+      $("submit_btn").disabled = "disabled";
+    }
+    else {
+      event.preventDefault();
+    }
+  });
+
+  var _blockIdsToListeners = [[]"blocked_on", "blocking", "hotlistsenter"];
+  for (var i = 0; i < _blockIdsToListeners.length; i++) {
+    var id = _blockIdsToListeners[[]i];
+    if ($(id)) {
+      $(id).addEventListener("focus", function(event) {
+        _acrob(null);
+        _acof(event);
+      });
+    }
+  }
+
+  var _idsToAddDefaultListeners = [[]"ownerenter", "memberenter", "components"];
+  for (var i = 0; i < _idsToAddDefaultListeners.length; i++) {
+    var id = _idsToAddDefaultListeners[[]i];
+    if ($(id)) {
+      $(id).addEventListener("focus", function(event) {
+        _acrob(null);
+        _acof(event);
+      });
+    }
+  }
+
+  var _elementsToAddPresubmit = document.querySelectorAll(
+      "#create_issue_form input, #create_issue_form select");
+  var debounced_presubmit = debounce(TKR_presubmit, 500);
+  for (var i = 0; i < _elementsToAddPresubmit.length; i++) {
+    var el = _elementsToAddPresubmit[[]i];
+    el.addEventListener("keyup", debounced_presubmit);
+    el.addEventListener("change", debounced_presubmit);
+  }
+  debounced_presubmit();
+
+  if ($("attachafile")) {
+    $("attachafile").addEventListener("click", function(event) {
+      _addAttachmentFields("attachmentareadeventry");
+      event.preventDefault();
+    });
+  }
+
+  document.addEventListener('keydown', function(event) {
+    if (event.key === 'Enter' && (event.ctrlKey || event.metaKey)) {
+      event.preventDefault();
+      $('submit_btn').click();
+    }
+  })
+
+  window.onsubmit = function() {
+    TKR_initialFormValues = TKR_currentFormValues();
+  };
+
+  window.onbeforeunload = function() {
+    if (TKR_isDirty()) {
+      // This message is ignored in recent versions of Chrome and Firefox.
+      return "You have unsaved changes. Leave this page and discard them?";
+    }
+  };
+
+  _lfidprefix = 'labelenter';
+  [if-any any_errors]
+   function _clearOnFirstEvent(){}
+  [end]
+
+  [if-any page_perms.EditIssue page_perms.EditIssueStatus page_perms.EditIssueOwner page_perms.EditIssueCc]
+    setTimeout(_forceProperTableWidth, 100);
+  [end]
+
+  [if-any page_perms.EditIssue]
+   _exposeExistingLabelFields();
+  [end]
+
+  var field_error;
+  [if-any  errors.custom_fields]
+    [for errors.custom_fields]
+      field_error = document.getElementById('error_custom_' + [errors.custom_fields.field_id]);
+      field_error.textContent = "[errors.custom_fields.message]";
+      field_error.style.display = "";
+    [end]
+  [end]
+
+
+
+function checksubmit() {
+  var restrict_to_known = [if-any restrict_to_known]true[else]false[end];
+  var confirmmsg = document.getElementById('confirmmsg');
+  var cg = document.getElementById('cg');
+  var label_blocksubmitmsg = document.getElementById('blocksubmitmsg');
+  var component_blocksubmitmsg = document.getElementById('component_blocksubmitmsg');
+
+  // Check for templates that require components.
+  var component_required = [if-any component_required]true[else]false[end];
+  var components = document.getElementById('components');
+  if (components && component_required && components.value == "") {
+    component_blocksubmitmsg.textContent = "You must specify a component for this template.";
+  } else {
+    component_blocksubmitmsg.textContent = "";
+  }
+
+  var submit = document.getElementById('submit_btn');
+  var summary = document.getElementById('summary');
+  if ((restrict_to_known && confirmmsg && confirmmsg.textContent) ||
+      (label_blocksubmitmsg && label_blocksubmitmsg.textContent) ||
+      (component_blocksubmitmsg && component_blocksubmitmsg.textContent) ||
+      (cg && cg.value == "") ||
+      (!allowSubmit) ||
+      (!summary.value [if-any must_edit_summary]|| summary.value == '[format "js"][template_summary][end]'[end])) {
+     submit.disabled='disabled';
+  } else {
+     submit.disabled='';
+  }
+}
+checksubmit();
+setInterval(checksubmit, 700); [# catch changes that were not keystrokes, e.g., paste menu item.]
+
+$("star").addEventListener("click", function (event) {
+    _TKR_toggleStarLocal($("star"), "star_input");
+});
+
+  const mrCodeFontToggle = document.createElement('mr-pref-toggle');
+  mrCodeFontToggle.style = 'float:right; margin: 3px;';
+  [if-any code_font]
+    mrCodeFontToggle.initialValue = true;
+  [end]
+  [if-any logged_in_user]
+    mrCodeFontToggle.userDisplayName = "[logged_in_user.email]";
+  [end]
+  mrCodeFontToggle.label = "Code";
+  mrCodeFontToggle.title = "Code font";
+  mrCodeFontToggle.prefName = "code_font";
+  $('mr-code-font-toggle-slot').appendChild(mrCodeFontToggle);
+  mrCodeFontToggle.fetchPrefs();
+  mrCodeFontToggle.addEventListener('font-toggle', function(e) {
+    const checked = e.detail.checked;
+    const ancestor = $('color_control');
+    if (ancestor) {
+      if (checked) {
+        ancestor.classList.add('codefont');
+      } else {
+        ancestor.classList.remove('codefont');
+      }
+    }
+  });
+
+
+});
+</script>
+
+<script type="text/javascript" defer src="/static/third_party/js/keys.js?version=[app_version]" nonce="[nonce]"></script>
+<script type="text/javascript" defer src="/static/third_party/js/skipper.js?version=[app_version]" nonce="[nonce]"></script>
+<script type="text/javascript" defer src="https://support.google.com/inapp/api.js" nonce="[nonce]"></script>
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  _setupKibblesOnEntryPage('[project_home_url]/issues/list');
+});
+</script>
+
+[end]
+
+[include "field-value-widgets-js.ezt"]
+[include "../framework/footer.ezt"]
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  if (typeof(ClientLogger) === "function") {
+    const l = new ClientLogger("issues");
+    l.logStart("new-issue", "user-time");
+    document.forms.create_issue_form.addEventListener('submit', function() {
+      l.logStart("new-issue", "server-time");
+    });
+  }
+});
+</script>
diff --git a/templates/tracker/issue-export-page.ezt b/templates/tracker/issue-export-page.ezt
new file mode 100644
index 0000000..c7892d7
--- /dev/null
+++ b/templates/tracker/issue-export-page.ezt
@@ -0,0 +1,39 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+<h3>Issue export</h3>
+
+<form action="export/json" method="GET">
+  [# We use xhr_token here because we are doing a GET on a JSON servlet.]
+  <input type="hidden" name="token" value="[xhr_token]">
+  <table cellpadding="3" class="rowmajor vt">
+    <tr>
+     <th>Format</th>
+     <td style="width:90%">JSON</td>
+   </tr>
+   <tr>
+     <select id="can" name="can">
+       [include "issue-can-widget.ezt" "search"]
+     </select>
+     <label for="searchq"> for </label>
+     <span id="qq"><input type="text" size="[q_field_size]" id="searchq" name="q"
+         value="[query]" autocomplete="off"></span>
+   </tr>
+   <tr>
+     <th>Start</th>
+     <td><input type="number" size="7" name="start" value="[initial_start]"></td>
+   </tr>
+   <tr>
+     <th>Num</th>
+     <td><input type="number" size="4" name="num" value="[initial_num]"></td>
+   </tr>
+   <tr>
+     <th></th>
+     <td><input type="submit" name="btn" value="Submit"></td>
+   </tr>
+ </table>
+</form>
+
+
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/issue-grid-body.ezt b/templates/tracker/issue-grid-body.ezt
new file mode 100644
index 0000000..94f08ea
--- /dev/null
+++ b/templates/tracker/issue-grid-body.ezt
@@ -0,0 +1,75 @@
+[if-any results]
+
+ [is grid_x_attr "--"][else]
+  <tr>
+   [is grid_y_attr "--"][else]<th>&nbsp;</th>[end]
+   [for grid_x_headings]
+    <th>[grid_x_headings]</th>
+   [end]
+  </tr>
+ [end]
+
+ [for grid_data]
+  <tr class="grid">
+   [is grid_y_attr "--"][else]<th>[grid_data.grid_y_heading]</th>[end]
+
+   [for grid_data.cells_in_row]
+    <td class="vt hoverTarget [is grid_cell_mode "tiles"][else]idcount[end]">
+     [for grid_data.cells_in_row.tiles]
+      [is grid_cell_mode "tiles"]
+       [include "issue-grid-tile.ezt" grid_data.cells_in_row.tiles.starred grid_data.cells_in_row.tiles.local_id grid_data.cells_in_row.tiles.status grid_data.cells_in_row.tiles.summary grid_data.cells_in_row.tiles.issue_url grid_data.cells_in_row.tiles.data_idx]
+      [end]
+      [is grid_cell_mode "ids"]
+       <a title="[grid_data.cells_in_row.tiles.summary]"
+          href=[grid_data.cells_in_row.tiles.issue_url] class="computehref" data-idx="[grid_data.cells_in_row.tiles.data_idx]">[if-any is_hotlist][grid_data.cells_in_row.tiles.issue_ref][else][grid_data.cells_in_row.tiles.local_id][end]</a>
+      [end]
+     [end]
+     [is grid_cell_mode "counts"]
+      [is grid_data.cells_in_row.count "0"]
+      [else]
+       [is grid_data.cells_in_row.count "1"]
+        <a href=[for grid_data.cells_in_row.tiles][grid_data.cells_in_row.tiles.issue_url][end]
+           >[grid_data.cells_in_row.count] item</a>
+       [else]
+        <a href="[if-any is_hotlist][else]list[end]?can=[can]&amp;q=[grid_data.cells_in_row.drill_down][query]">[grid_data.cells_in_row.count] items</a>
+       [end]
+      [end]
+
+     [end]
+    </td>
+   [end]
+  </tr>
+ [end]
+
+[else]
+
+ <tr>
+  <td colspan="40" class="id" style="cursor:default">
+   <div style="padding: 3em; text-align: center">
+    [if-any is_hotlist]
+     This hotlist currently has no issues.<br>
+     [if-any owner_permissions editor_permissions]
+      Select 'Add issues...' in the above 'Actions...' dropdown menu to add some.
+     [end]
+    [else]
+     [if-any project_has_any_issues]
+      Your search did not generate any results.  <br>
+      [is can "1"]
+       You may want to remove some terms from your query.<br>
+      [else]
+       You may want to try your search over <a href="list?can=1&amp;q=[query]&amp;x=[grid_x_attr]&amp;y=[grid_y_attr]&amp;mode=grid">all issues</a>.<br>
+      [end]
+     [else]
+      This project currently has no issues.<br>
+      [if-any page_perms.CreateIssue]
+       [if-any read_only][else]
+        You may want to enter a <a class="id" href="entry">new issue</a>.
+       [end]
+      [end]
+     [end]
+    [end]
+   </div>
+  </td>
+ </tr>
+
+[end]
diff --git a/templates/tracker/issue-grid-controls-top.ezt b/templates/tracker/issue-grid-controls-top.ezt
new file mode 100644
index 0000000..5d63e67
--- /dev/null
+++ b/templates/tracker/issue-grid-controls-top.ezt
@@ -0,0 +1,59 @@
+<div class="list">
+
+<div class="button_set">
+  <a class="choice_chip" href="[if-any is_hotlist][else]list[end]?can=[can]&amp;q=[query]&amp;colspec=[format "url"][colspec][end]&amp;groupby=[format "url"][groupby][end]&amp;sort=[format "url"][sortspec][end]&amp;x=[grid_x_attr]&amp;y=[grid_y_attr]&amp;cells=[grid_cell_mode]">List</a><span
+  class="choice_chip active_choice">Grid</span>
+  <a class="choice_chip" href="[if-any is_hotlist][else]list[end]?can=[can]&amp;q=[query]&amp;colspec=[format "url"][colspec][end]&amp;groupby=[format "url"][groupby][end]&amp;sort=[format "url"][sortspec][end]&amp;x=[grid_x_attr]&amp;y=[grid_y_attr]&amp;cells=[grid_cell_mode]&amp;mode=chart">Chart</a>
+</div>
+
+[if-any pagination]
+ [if-any pagination.visible]
+  <div class="pagination">
+   [is pagination.total_count "1"]
+    [pagination.total_count] issue shown
+   [else]
+    [if-any grid_limited][grid_shown] issues of [end]
+    [pagination.total_count] issues shown
+   [end]
+  </div>
+ [end]
+[end]
+
+ <form id="colspecform" action="[if-any is_hotlist][else]list[end]" method="GET" style="display:inline">
+  <input type="hidden" name="can" value="[can]">
+  <input type="hidden" name="q" value="[query]">
+  <input type="hidden" name="colspec" id="colspec" value="[colspec]">
+  <input type="hidden" name="sort" value="[sortspec]">
+  <input type="hidden" name="groupby" value="[groupby]">
+  <input type="hidden" name="mode" value="grid">
+<span>Rows:</span>
+<select name="y" class="drop-down-bub">
+ <option value="--" [if-any grid_y_attr][else]selected=selected[end]>None</option>
+ [for grid_axis_choices]
+  <option value="[grid_axis_choices]"
+          [is grid_axis_choices grid_y_attr]selected=selected[end]
+    >[grid_axis_choices]</option>
+ [end]
+</select>
+
+<span style="margin-left:.7em">Cols:</span>
+<select name="x" class="drop-down-bub">
+ <option value="--" [if-any grid_x_attr][else]selected=selected[end]>None</option>
+ [for grid_axis_choices]
+  <option value="[grid_axis_choices]"
+          [is grid_axis_choices grid_x_attr]selected=selected[end]
+    >[grid_axis_choices]</option>
+ [end]
+</select>
+
+<span style="margin-left:.7em">Cells:</span>
+<select name="cells" class="drop-down-bub">
+ <option value="tiles" [is grid_cell_mode "tiles"]selected=selected[end]>Tiles</option>
+ <option value="ids" [is grid_cell_mode "ids"]selected=selected[end]>IDs</option>
+ <option value="counts" [is grid_cell_mode "counts"]selected=selected[end]>Counts</option>
+</select>
+
+<input type="submit" name="nobtn" style="font-size:90%; margin-left:.5em" value="Update">
+
+</form>
+</div>
diff --git a/templates/tracker/issue-grid-tile.ezt b/templates/tracker/issue-grid-tile.ezt
new file mode 100644
index 0000000..43e6a04
--- /dev/null
+++ b/templates/tracker/issue-grid-tile.ezt
@@ -0,0 +1,27 @@
+<div class="gridtile">
+ <table cellspacing="0" cellpadding="0">
+  <tr>
+   <td class="id">
+    [if-any read_only][else]
+     [if-any page_perms.SetStar]
+      <a class="star"
+       style="color:[if-any arg0]cornflowerblue[else]gray[end]; text-decoration:none;"
+       title="[if-any arg0]Un-s[else]S[end]tar this issue"
+       data-project-name="[projectname]" data-local-id="[arg1]">
+       [if-any arg0]&#9733;[else]&#9734;[end]
+      </a>
+     [end]
+    [end]
+    <a href=[arg4] class="computehref" data-idx=[arg5]>[arg1]</a>
+   </td>
+   <td class="status">[arg2]</td>
+  </tr>
+  <tr>
+   <td colspan="2">
+    <div>
+     <a href=[arg4] class="computehref" data-idx=[arg5]>[arg3]</a>
+    </div>
+   </td>
+  </tr>
+ </table>
+</div>
diff --git a/templates/tracker/issue-hidden-fields.ezt b/templates/tracker/issue-hidden-fields.ezt
new file mode 100644
index 0000000..eaeeedf
--- /dev/null
+++ b/templates/tracker/issue-hidden-fields.ezt
@@ -0,0 +1,14 @@
+[# This template part renders important hidden fields for issue update forms.
+]
+
+<input type="hidden" name="_charset_" value="">
+<input type="hidden" name="token" value="[form_token]">
+<input type="hidden" name="id" value="[issue.local_id]">
+<input type="hidden" name="can" value="[can]">
+<input type="hidden" name="q" value="[query]">
+<input type="hidden" name="colspec" value="[colspec]">
+<input type="hidden" name="sort" value="[sortspec]">
+<input type="hidden" name="groupby" value="[groupby]">
+<input type="hidden" name="start" value="[start]">
+<input type="hidden" name="num" value="[num]">
+<input type="hidden" name="pagegen" value="[pagegen]">
diff --git a/templates/tracker/issue-hovercard.ezt b/templates/tracker/issue-hovercard.ezt
new file mode 100644
index 0000000..b70341b
--- /dev/null
+++ b/templates/tracker/issue-hovercard.ezt
@@ -0,0 +1,6 @@
+[# Show a small dialog box allows the user to quickly view one issue.]
+
+<div id="infobubble">
+ <div id="peekarea" style="width:72em; padding:0"
+      ><div class="loading">Loading...</div></div>
+</div>
diff --git a/templates/tracker/issue-import-page.ezt b/templates/tracker/issue-import-page.ezt
new file mode 100644
index 0000000..524486d
--- /dev/null
+++ b/templates/tracker/issue-import-page.ezt
@@ -0,0 +1,44 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+<h3>Issue export</h3>
+
+[if-any import_errors]
+  [# This is actually used to show both errors and progress messages
+     after a successful import.]
+  <div class="error" style="margin-bottom:1em">
+    Import event log:
+    <ul>
+      [for import_errors]
+        <li>[import_errors]</li>
+      [end]
+    </ul>
+  </div>
+[end]
+
+
+<form action="import.do" enctype="multipart/form-data" method="POST">
+  <input type="hidden" name="token" value="[form_token]">
+  <table cellpadding="3" class="rowmajor vt">
+    <tr>
+     <th>Format</th>
+     <td style="width:90%">JSON</td>
+   </tr>
+   <tr>
+     <th>File</th>
+     <td><input type="file" name="jsonfile"></td>
+   </tr>
+   <tr>
+     <th>Pre-check only</th>
+     <td><input type="checkbox" name="pre_check_only"></td>
+   </tr>
+   <tr>
+     <th></th>
+     <td><input type="submit" name="btn" value="Submit"></td>
+   </tr>
+ </table>
+</form>
+
+
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/issue-list-controls-bottom.ezt b/templates/tracker/issue-list-controls-bottom.ezt
new file mode 100644
index 0000000..b1905a1
--- /dev/null
+++ b/templates/tracker/issue-list-controls-bottom.ezt
@@ -0,0 +1,7 @@
+<div class="list-foot">
+[if-any logged_in_user]
+  <a href="[csv_link]&token=[form_token]" style="float:right; margin-left: 1em">CSV</a>
+[end]
+
+[include "../framework/artifact-list-pagination-part.ezt"]
+</div>
diff --git a/templates/tracker/issue-list-controls-top.ezt b/templates/tracker/issue-list-controls-top.ezt
new file mode 100644
index 0000000..d308570
--- /dev/null
+++ b/templates/tracker/issue-list-controls-top.ezt
@@ -0,0 +1,108 @@
+<div class="list">
+  <div class="button_set">
+   <span class="active_choice choice_chip">List</span>
+   <a class="choice_chip" href="[if-any is_hotlist][else]list[end]?can=[can]&amp;q=[query]&amp;colspec=[format "url"][colspec][end]&amp;groupby=[format "url"][groupby][end]&amp;sort=[format "url"][sortspec][end]&amp;x=[grid_x_attr]&amp;y=[grid_y_attr]&amp;cells=[grid_cell_mode]&amp;mode=grid">Grid</a>
+   <a class="choice_chip" href="[if-any is_hotlist][else]list[end]?can=[can]&amp;q=[query]&amp;colspec=[format "url"][colspec][end]&amp;groupby=[format "url"][groupby][end]&amp;sort=[format "url"][sortspec][end]&amp;x=[grid_x_attr]&amp;y=[grid_y_attr]&amp;cells=[grid_cell_mode]&amp;mode=chart">Chart</a>
+  </div>
+
+   [include "../framework/artifact-list-pagination-part.ezt"]
+   [include "update-issues-hotlists-dialog.ezt"]
+
+   [if-any page_perms.EditIssue]
+     [if-any is_cross_project][else]
+       <span style="margin:0 .7em">Select:
+         <a id="selectall" href="#">All</a>
+         <a id="selectnone" href="#">None</a>
+       </span>
+     [end]
+    <select id="moreactions" class="drop-down-bub">
+     <option value="moreactions" disabled="disabled" selected="selected">Actions...</option>
+     <option value="colspec">Change columns...</option>
+     [if-any is_cross_project][else][# TODO(jrobbins): cross-project bulk edit]
+       <option value="bulk">Bulk edit...</option>
+     [end]
+     [if-any is_cross_project][else][# TODO(jrobbins): cross-project spam flagging]
+       <option value="flagspam">Flag as spam...</option>
+       <option value="unflagspam">Un-flag as spam...</option>
+     [end]
+     <option value="addtohotlist">Add to hotlist...</option>
+    </select>
+    <span id='bulk-action-loading' class='loading' style='visibility:hidden'>Processing</span>
+   [end]
+
+   [if-any hotlist_id][if-any logged_in_user]
+   <span style="margin:0 .7em">Select:
+     <a id="selectall" href="#">All</a>
+     <a id="selectnone" href="#">None</a>
+   </span>
+   <select id="moreactions" class="drop-down-bub">
+     <option value="moreactions" disabled="disabled" [if-any add_issues_selected][else]selected="selected"[end]>Actions...</option>
+     [if-any owner_permissions editor_permissions]
+     <option value="addissues" [if-any add_issues_selected]selected="selected"[end]>Add issues...</option>
+     <option value="removeissues">Remove issues...</options>
+     <option value="colspec">Change columns...</option>
+   [end]
+     <option value="addtohotlist">Add to hotlist...</option>
+   </select>
+   [end][end]
+
+
+   <form id="colspecform" action=[if-any hotlist_id]"[hotlist.name]"[else]"list"[end] method="GET" autocomplete="off"
+         style="display:inline; margin-left:1em">
+    <input type="hidden" name="can" value="[can]">
+    <input type="hidden" name="q" value="[query]">
+    <input type="hidden" name="sort" value="[sortspec]">
+    <input type="hidden" id="groupbyspec" name="groupby" value="[groupby]">
+    <span id="columnspec" style="display:none; font-size:90%">
+      <span>Columns:</span>
+      <span id="colspec_field"><input type="text" size="60" name="colspec"
+                   value="[colspec]"></span>
+      <input type="submit" name="nobtn" value="Update">
+      [# TODO(jrobbins): <a href="TODO">Learn more</a> ]
+    </span>
+   </form>
+</div>
+
+[if-any is_hotlist]
+<form id='bulkremoveissues' method="POST" action="/u/[viewed_user_id]/hotlists/[hotlist.name].do">
+<input type="hidden" name="token" value="[edit_hotlist_token]">
+  <input type="hidden" id="current_col_spec" name="current_col_spec" value="[col_spec]">
+  <input type="hidden" id="bulk_remove_local_ids" name="remove_local_ids">
+  <input type ="hidden" id="bulk_remove_value" name = "remove" value="false">
+  <span id="addissuesspec" style="display:none; font-size:90%">
+    <span>Issues:</span>
+    <span id="issues_field"><input type="text" size="60" name="add_local_ids"
+                   value="[add_local_ids]" placeholder="[placeholder]"></span>
+    <input type="submit" name="nobtn" value="Add Issues">
+  </span>
+  [if-any errors.issues]
+  <div class="fielderror">[errors.issues]</div>
+  [end]
+  <div class="fielderror">&nbsp;
+    <span id="add_local_idsfeedback">
+       [if-any errors.add_local_ids][errors.add_local_ids][end]
+    </span>
+  </div>
+</form>
+[end]
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  if ($("selectall")) {
+    $("selectall").addEventListener("click", function() { _selectAllIssues(); });
+  }
+  if ($("selectnone")) {
+    $("selectnone").addEventListener("click", function() { _selectNoneIssues(); });
+  }
+  if ($("moreactions")) {
+    $("moreactions").addEventListener("change", function(event) {
+        _handleListActions(event.target);
+    });
+    if ($("moreactions").value == 'addissues') {
+      _showID('addissuesspec');
+    }
+  }
+  window.__hotlists_dialog.onResponse = onAddIssuesResponse;
+  window.__hotlists_dialog.onFailure = onAddIssuesFailure;
+});
+</script>
diff --git a/templates/tracker/issue-list-csv.ezt b/templates/tracker/issue-list-csv.ezt
new file mode 100644
index 0000000..62de9c6
--- /dev/null
+++ b/templates/tracker/issue-list-csv.ezt
@@ -0,0 +1,16 @@
+[# Prefix response body with over 1024 bytes of static content to avoid content sniffing.]
+"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
+This file contains the same information as the issue list web page, but in CSV format.
+You can adjust the columns of the CSV file by adjusting the columns shown on the web page
+before clicking the CSV link.
+"-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-"
+
+
+[for panels][# There will always be exactly one panel.][for panels.ordered_columns]"[panels.ordered_columns.name]"[if-index panels.ordered_columns last][else],[end][end][end]
+[for table_data][for table_data.cells][is table_data.cells.type "ID"]"[table_data.local_id]",[else]"[format "raw"][if-any table_data.cells.values][for table_data.cells.values][is table_data.cells.type "issues"][table_data.cells.values.item.id][else][table_data.cells.values.item][end][if-index table_data.cells.values last][else], [end][end][end][end]"[if-index table_data.cells last][else],[end][end][end]
+[end]
+
+[if-any next_csv_link]
+This file is truncated to [item_count] out of [pagination.total_count] total results.
+See [next_csv_link] for the next set of results.
+[end]
diff --git a/templates/tracker/issue-list-headings.ezt b/templates/tracker/issue-list-headings.ezt
new file mode 100644
index 0000000..6ec4e41
--- /dev/null
+++ b/templates/tracker/issue-list-headings.ezt
@@ -0,0 +1,31 @@
+[# arg0 is the ordered_columns argument that gives the name and index of each column.]
+
+<thead id="resultstablehead">
+<tr id="headingrow"><th style="border-left: 0"> &nbsp; </th>
+ [for panels.ordered_columns]
+  [is panels.ordered_columns.name "Summary"]
+   <th class="col_[panels.ordered_columns.col_index]" nowrap="nowrap" id="summaryheading"
+       data-col-index="[panels.ordered_columns.col_index]" width="100%"
+       ><a href="#" style="text-decoration: none">Summary + Labels <span class="indicator">&#9660;</span></a></th>
+  [else]
+   [is panels.ordered_columns.name "ID"]
+    <th class="col_[panels.ordered_columns.col_index]" nowrap="nowrap"
+        data-col-index="[panels.ordered_columns.col_index]"
+       ><a href="#" style="text-decoration: none">[panels.ordered_columns.name] <span class="indicator">&#9660;</span></a></th>
+   [else]
+    <th class="col_[panels.ordered_columns.col_index]"
+        data-col-index="[panels.ordered_columns.col_index]"
+       ><a href="#" style="text-decoration: none">[panels.ordered_columns.name]&nbsp;<span class="indicator">&#9660;</span></a></th>
+   [end]
+  [end]
+ [end]
+ [if-any is_hotlist]
+ <th data-col-index="dot" style="width:3ex"><a href="#columnprefs"
+     class="dotdotdot" aria-label="Column list">...</a></th>
+ [else]
+ <th style="padding: 0;">
+   <ezt-show-columns-connector colspec="[colspec]" phasespec="[phasespec]"></ezt-show-columns-connector>
+ </th>
+ [end]
+</tr>
+</thead>
diff --git a/templates/tracker/issue-list-js.ezt b/templates/tracker/issue-list-js.ezt
new file mode 100644
index 0000000..1eb1aad
--- /dev/null
+++ b/templates/tracker/issue-list-js.ezt
@@ -0,0 +1,110 @@
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+
+  [# Pass the list of column names from HTML to JS ]
+  window._allColumnNames = [
+    [for column_values]'[column_values.column_name]'[if-index column_values last][else], [end][end]
+    ];
+
+  [# Update the issue link hrefs on-load and whenever the column-spec changes.]
+  _ctxCan = [can];
+  _ctxQuery = "[format "js"][query][end]";
+  _ctxSortspec = "[format "js"][sortspec][end]";
+  _ctxGroupBy = "[format "js"][groupby][end]";
+  _ctxDefaultColspec = "[format "js"][default_colspec][end]";
+  _ctxStart = [start];
+  _ctxNum = [num];
+  _ctxResultsPerPage = [default_results_per_page];
+  _ctxHotlistID = "[hotlist_id]";
+  _ctxArgs = _formatContextQueryArgs();
+
+  function _goIssue(issueIndex, newWindow) {
+    var url = _makeIssueLink(issueRefs[[]issueIndex]);
+    _go(url, newWindow);
+  }
+  // Added to enable calling from TKR_openArtifactAtCursor
+  window._goIssue = _goIssue;
+
+  window.issueRefs = [[]
+   [for table_data]
+     {project_name: "[format "js"][table_data.project_name][end]",
+      id: [table_data.local_id]}[if-index table_data last][else],[end][end]
+   ];
+
+  function _handleResultsClick(event) {
+    var target = event.target;
+    if (event.button >= 3)
+      return;
+    if (target.classList.contains("label"))
+      return;
+    if (target.classList.contains("rowwidgets") || target.parentNode.classList.contains("rowwidgets"))
+      return;
+    while (target && target.tagName != "TR") target = target.parentNode;
+    if ('[is_hotlist]') {
+       if (!target.attributes[[]"issue-context-url"]) return;
+       _go(target.attributes[[]"issue-context-url"].value, (event.metaKey || event.ctrlKey || event.button == 1));
+       }
+    else {
+       if (!target.attributes[[]"data-idx"]) return;
+       _goIssue(target.attributes[[]"data-idx"].value,
+       (event.metaKey || event.ctrlKey || event.button == 1));
+         }
+  };
+  [if-any table_data]
+    _addClickListener($("resultstable"), _handleResultsClick);
+  [end]
+
+  var issueCheckboxes = document.getElementsByClassName("checkRangeSelect");
+  for (var i = 0; i < issueCheckboxes.length; ++i) {
+    var el = issueCheckboxes[[]i];
+    el.addEventListener("click", function (event) {
+        _checkRangeSelect(event, event.target);
+        _highlightRow(event.target);
+    });
+  }
+
+  function _handleHeaderClick(event) {
+    var target = event.target;
+    while (target && target.tagName != "TH") target = target.parentNode;
+    var colIndex = target.getAttribute("data-col-index");
+    if (colIndex) {
+      _showBelow("pop_" + colIndex, target);
+    }
+    event.preventDefault();
+  }
+  var resultsTableHead = $("resultstablehead");
+  if (resultsTableHead) {
+    resultsTableHead.addEventListener("click", _handleHeaderClick);
+  }
+
+  if (typeof(ClientLogger) == "function") {
+    let cl = new ClientLogger("issues");
+    if (cl.started("issue-search")) {
+      cl.logPause("issue-search", "computer-time");
+      cl.logResume("issue-search", "user-time");
+
+      // Now we want to listen for clicks on any issue search result.
+      let logResultClick = function() {
+        cl.logPause("issue-search", "user-time");
+        cl.logResume("issue-search", "computer-time");
+      }
+
+      let links = document.querySelectorAll("#resultstable tbody .id a");
+      for (let i = 0; i < links.length; i++) {
+        links[[]i].addEventListener("click", logResultClick);
+      }
+    }
+  }
+});
+</script>
+
+<script type="text/javascript" defer src="/static/third_party/js/keys.js?version=[app_version]" nonce="[nonce]"></script>
+<script type="text/javascript" defer src="/static/third_party/js/skipper.js?version=[app_version]" nonce="[nonce]"></script>
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  _setupKibblesOnListPage(
+    [is arg0 "issuelist"]'[project_home_url]/issues/list'[else]'[currentPageURLEncoded]'[end],
+    '[project_home_url]/issues/entry',
+    '[projectname]', [is arg0 "issuelist"]1[else]5[end], 0);
+});
+</script>
diff --git a/templates/tracker/issue-list-menus.ezt b/templates/tracker/issue-list-menus.ezt
new file mode 100644
index 0000000..d4ab7a5
--- /dev/null
+++ b/templates/tracker/issue-list-menus.ezt
@@ -0,0 +1,170 @@
+[# Table header popup menus ]
+
+[for column_values]
+ [is column_values.column_name "id"]
+   <div id="pop_[column_values.col_index]" class="popup">
+    <table cellspacing="0" cellpadding="0" border="0">
+     <tr id="pop_up_[column_values.col_index]"><td>Sort Up</td></tr>
+     <tr id="pop_down_[column_values.col_index]"><td>Sort Down</td></tr>
+     <tr id="pop_hide_[column_values.col_index]"><td>Hide Column</td></tr>
+    </table>
+   </div>
+ [else]
+  [is column_values.column_name "summary"]
+   <div id="pop_[column_values.col_index]" class="popup">
+    <table cellspacing="0" cellpadding="0" border="0">
+     <tr id="pop_up_[column_values.col_index]"><td>Sort Up</td></tr>
+     <tr id="pop_down_[column_values.col_index]"><td>Sort Down</td></tr>
+     [if-any is_hotlist][else]
+     [if-any column_values.filter_values]
+      <tr id="pop_show_only_[column_values.col_index]"><td>Show only
+          <span class="indicator">&#9658;</span></td></tr>
+     [end][end]
+     <tr id="pop_hide_[column_values.col_index]"><td>Hide Column</td></tr>
+    </table>
+   </div>
+  [else]
+   <div id="pop_[column_values.col_index]" class="popup">
+    <table cellspacing="0" cellpadding="0" border="0">
+     <tr id="pop_up_[column_values.col_index]"><td>Sort Up</td></tr>
+     <tr id="pop_down_[column_values.col_index]"><td>Sort Down</td></tr>
+     [if-any is_hotlist][else]
+     [if-any column_values.filter_values]
+      <tr id="pop_show_only_[column_values.col_index]"><td>Show only
+          <span class="indicator">&#9658;</span></td></tr>
+     [end][end]
+     <tr id="pop_hide_[column_values.col_index]"><td>Hide Column</td></tr>
+     <tr id="pop_groupby_[column_values.col_index]"><td>Group Rows</td></tr>
+    </table>
+   </div>
+  [end]
+ [end]
+[end]
+
+[# Table header popup submenus for autofiltering of values ]
+
+[for column_values]
+ <div id="filter_[column_values.col_index]" class="popup subpopup">
+  <table cellspacing="0" cellpadding="0" border="0">
+   [for column_values.filter_values]
+    <tr data-filter-column="[is column_values.column_name "Summary"]label[else][column_values.column_name][end]"
+        data-filter-value="[column_values.filter_values]">
+     <td>[column_values.filter_values]</td></tr>
+   [end]
+  </table>
+ </div>
+[end]
+
+[# Popup menu showing the list of available columns allowing show/hide ]
+
+<div id="pop_dot" class="popup">
+ <table cellspacing="0" cellpadding="0" border="0">
+  <tr><th>Show columns:</th></tr>
+   [for panels.ordered_columns]
+    <tr data-toggle-column-index="[panels.ordered_columns.col_index]"><td>&nbsp;<span
+        class="col_[panels.ordered_columns.col_index]">&diams;</span>&nbsp;[panels.ordered_columns.name]</td></tr>
+   [end]
+   [for unshown_columns]
+    <tr data-add-column-name="[unshown_columns]"
+        ><td>&nbsp;&nbsp;&nbsp;&nbsp;[unshown_columns]</td></tr>
+   [end]
+   <tr id="pop_dot_edit"
+      ><td>&nbsp;&nbsp;&nbsp;&nbsp;Edit&nbsp;column&nbsp;spec...</td></tr>
+ </table>
+</div>
+
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  function registerPopHandlers(colIndex, colName) {
+    var sortUpEl = $("pop_up_" + colIndex);
+    if (sortUpEl) {
+      sortUpEl.addEventListener("click", function () {
+        _closeAllPopups(sortUpEl);
+        _sortUp(colName);
+      });
+      sortUpEl.addEventListener("mouseover", function () {
+       _closeSubmenus();
+      });
+    }
+
+    var sortDownEl = $("pop_down_" + colIndex);
+    if (sortDownEl) {
+      sortDownEl.addEventListener("click", function () {
+        _closeAllPopups(sortDownEl);
+        _sortDown(colName);
+      });
+      sortDownEl.addEventListener("mouseover", function () {
+       _closeSubmenus();
+      });
+    }
+
+    var hideEl = $("pop_hide_" + colIndex);
+    if (hideEl) {
+      hideEl.addEventListener("click", function () {
+        _closeAllPopups(hideEl);
+        _toggleColumnUpdate(colIndex);
+      });
+      hideEl.addEventListener("mouseover", function () {
+       _closeSubmenus();
+      });
+    }
+
+    var showOnlyEl = $("pop_show_only_" + colIndex);
+    if (showOnlyEl) {
+      showOnlyEl.addEventListener("mouseover", function () {
+        _showRight("filter_" + colIndex, showOnlyEl);
+      });
+    }
+
+    var groupByEl = $("pop_groupby_" + colIndex);
+    if (groupByEl) {
+      groupByEl.addEventListener("click", function () {
+        _closeAllPopups(groupByEl);
+        _addGroupBy(colIndex);
+      });
+      groupByEl.addEventListener("mouseover", function () {
+       _closeSubmenus();
+      });
+    }
+  }
+
+  [for column_values]
+    registerPopHandlers([column_values.col_index], "[column_values.column_name]");
+  [end]
+
+  function handleFilterValueClick(event) {
+    var target = event.target;
+    if (target.tagName != "TR") target = target.parentNode;
+    _closeAllPopups(target);
+    var filterColumn = target.getAttribute("data-filter-column");
+    var filterValue = target.getAttribute("data-filter-value");
+    _filterTo(filterColumn, filterValue);
+  }
+
+  [for column_values]
+    $("filter_" + [column_values.col_index]).addEventListener(
+        "click", handleFilterValueClick);
+  [end]
+
+  function handleDotDotDotClick(event) {
+    var target = event.target;
+    if (target.tagName != "TR") target = target.parentNode;
+    _closeAllPopups(target);
+    var colIndex = target.getAttribute("data-toggle-column-index");
+    if (colIndex != null)
+      _toggleColumnUpdate(colIndex);
+    var colName = target.getAttribute("data-add-column-name");
+    if (colName != null)
+      _addcol(colName);
+  }
+
+  $("pop_dot").addEventListener("click", handleDotDotDotClick);
+
+  $("pop_dot_edit").addEventListener("click", function() {
+    var target = $("pop_dot_edit");
+    _closeAllPopups(target);
+    $("columnspec").style.display = "";
+  });
+});
+</script>
diff --git a/templates/tracker/issue-original-page.ezt b/templates/tracker/issue-original-page.ezt
new file mode 100644
index 0000000..580b739
--- /dev/null
+++ b/templates/tracker/issue-original-page.ezt
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title>Issue [projectname]:[local_id] comment #[seq]</title>
+ <meta name="ROBOTS" content="NOINDEX">
+ <meta name="referrer" content="no-referrer">
+ <link type="text/css" rel="stylesheet" href="[version_base]/static/css/ph_core.css">
+ </head>
+ <body>
+  <h3>Original email for issue [projectname]:[local_id] comment #[seq]</h3>
+  [if-any is_binary]
+   <i>The message could not be displayed.</i>
+  [else]
+   <pre>[message_body]</pre>
+  [end]
+ </body>
+</html>
diff --git a/templates/tracker/issue-reindex-page.ezt b/templates/tracker/issue-reindex-page.ezt
new file mode 100644
index 0000000..0d80dee
--- /dev/null
+++ b/templates/tracker/issue-reindex-page.ezt
@@ -0,0 +1,45 @@
+[define title]Reindex Issues[end]
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+
+<form action="reindex.do" method="POST" id="form">
+  <input type="hidden" name="token" value="[form_token]">
+  <table>
+    <tr>
+      <td>Start:</td>
+      <td><input type="input" name="start" value="[start]"></td>
+    </tr>
+    <tr>
+      <td>Num:</td>
+      <td><input type="input" name="num" value="[num]"></td>
+    </tr>
+    <tr>
+      <td colspan="2">
+        <input type="submit" id="submit_btn" name="btn" value="Re-index"></td>
+    </tr>
+    <tr>
+      <td><label for="autosubmit">Autosubmit:</label></td>
+      <td><input type="checkbox" name="auto_submit" id="autosubmit"
+                 [is auto_submit "True"]checked="checked"[end] ></td>
+    </tr>
+  </table>
+</form>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  function autosubmit() {
+    if (document.getElementById('autosubmit').checked) {
+      document.getElementById('form').submit();
+    }
+  }
+  if (document.getElementById('autosubmit').checked) {
+    setTimeout(autosubmit, 5000);
+  }
+});
+</script>
+
+[end]
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/issue-search-tips.ezt b/templates/tracker/issue-search-tips.ezt
new file mode 100644
index 0000000..50d4d8c
--- /dev/null
+++ b/templates/tracker/issue-search-tips.ezt
@@ -0,0 +1,398 @@
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "hidetabs"]
+
+[# Note: No UI element permission checking needed on this page. ]
+
+<div id="searchtips">
+
+<h3>Basic issue search</h3>
+
+<p>In most cases you can find the issues that you want to work with
+very easily by using the issue list headers or by entering a few
+simple keywords into the main search field.</p>
+
+<p>Whenever you visit the "<a href="list">issue list</a>" in your
+project, you are presented with a table of all open issues, or the default
+query set up by the project owners.  If you
+see too many results, you can quickly filter your results by clicking
+on the table headers and choosing a specific value from the "Show
+only:" submenu.</p>
+
+[# TODO screenshot ]
+
+<p>The main search field consists of two parts:</p>
+
+<ul>
+ <li>A drop-down selection of search scopes, e.g, "All issues" or just "Open issues".</li>
+ <li>A search text field where you can enter search terms.</li>
+</ul>
+
+[# TODO screenshot ]
+
+<p>In the text field, you may enter simple search terms, or add any of
+the search operators described below.</p>
+
+<p>You can also use the search text field to jump directly to any
+issue by entering its issue number.  If you wish to search for issues
+that contain a number, rather than jumping to that issue, enclose the
+number in quotation marks.</p>
+
+<p>Behind the scenes, the search scope is simply an additional set of
+search terms that is automatically combined with the user's search
+terms to make a complete query.  To see what search terms will be
+used for each scope, hover your mouse over the scope item.</p>
+
+
+<h3>Advanced issue search</h3>
+
+<p>The <a href="advsearch">Advanced Search</a> page helps you
+compose a complex query.  The advanced search form breaks the search
+down into several popular criteria and allows you to specify each one
+easily.  The search criteria boil down to the same thing as the search
+operators described below, but you don't need to remember the operator
+names.</p>
+
+
+
+<h3>Full-text search</h3>
+
+<p>As with Google web search, you can search for issues by simply
+entering a few words.  However, you may get a few more results than
+you expected.  When you need to search more precisely, you can use
+search operators for more power.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="&quot;out of memory&quot;">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<p>Full-text search terms can include quoted phrases, and words or
+phrases can be negated by using a leading minus sign.  Please note
+that negated full-text terms are likely to give large result sets,
+so it is best to use structured search operators when possible.</p>
+
+
+<h3>Search operators</h3>
+
+<p>Normal search terms will match words found in any field of an
+issue.  You can narrow the search to a specific field by using the
+name of the field.  The built-in field operators are <tt>summary</tt>,
+<tt>description</tt>, <tt>comment</tt>, <tt>status</tt>, <tt>reporter</tt>,
+<tt>owner</tt>, <tt>cc</tt>, <tt>component</tt>, <tt>commentby</tt>,
+<tt>hotlist</tt>, <tt>ID</tt>, <tt>project</tt>,
+and <tt>label</tt>.</p>
+
+<p>Field names can be compared to a list of values using:</p>
+<ul>
+  <li>a colon (:) for word matching,</li>
+  <li>an equals sign (=) for full string matching,</li>
+  <li>a not equals sign (!=) or leading minus sign to negate, or</li>
+  <li>inequality operators (&lt;, &gt;, &lt;=, &gt;=) for numeric comparison.</li>
+</ul>
+
+<p>You can limit your search to just open issues by using
+is:open, or to just closed issues by using a minus sign to negate it:
+<tt>-is:open</tt>.</p>
+[# TODO(jrobbins): dateopened:]
+
+<p>For example, here's how to search for issues with the word
+"calculation" in the summary field.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="summary:calculation">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<p>When searching for issues owned by a specific user, you can use their
+email address, or part of it.  When referring to yourself, you can also
+ use the special term <tt>me</tt>. For example, this restricts the search to
+issues that are owned by you.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="owner:user@chromium.org">
+ <input type="submit" name="btn" value="Search">
+</form>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="owner:me">
+ <input type="submit" name="btn" [if-any logged_in_user][else]disabled=disabled[end] value="Search">
+ [if-any logged_in_user][else]
+   <span style="white-space:nowrap"><a href="[login_url]"
+   >Sign in</a> to try this example</span>
+ [end]</p>
+</form>
+
+<p>Rather than have a large number of predefined fields, our issue
+tracker stores many issue details as labels.</p>
+
+<p>For example, if you labeled security-related issues with the label
+<tt>Security</tt>, here's how to search for them.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="label:security">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+
+<p>In addition to simple one-word labels, you can use two part labels
+that specify an attribute and a value, like <tt>Priority-High</tt>,
+<tt>Priority-Medium</tt>, and <tt>Priority-Low</tt>.  You can search for
+these with the <tt>label</tt> operator, or you can use the first part of the
+label name like an operator.</p>
+
+<p>For example, if you labeled high priority issues with
+<tt>Priority-High</tt>, here's one way to search for them.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="label:Priority-High">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<p>And, here is a more compact way to do the same search.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="Priority:High">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<p>For the <tt>components</tt> operator, the default search will find
+issues in that component and all of its subcomponents.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="component:UI">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<p>And of course, you can combine any of these field operators.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q"
+     value="status!=New owner:me component:UI">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<p>You can search for issues in the current project that are also on a user's
+hotlist.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q"
+     value="hostlist=username@domain:hotlistname">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+
+<h3>Empty (or non-empty) field search</h3>
+
+<p>For each built-in field operator, you can use the <tt>has</tt>
+operator to search for issues with empty or non-empty fields.  The
+<tt>has</tt> operator can be used with status, owner, cc, component,
+attachments, blocking, blockedon, mergedinto, any key-value label prefix, or
+any custom field name.</p>
+
+<p>For example, here's how to search for issues that have one or more
+components.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="has:component">
+ <input type="submit" name="btn" value="Search">
+</form>
+
+<p>Or, you can use the <tt>-has</tt> operator for negation, to search for
+issues with empty fields.</p>
+
+<p>For example, here's how to search for issues that are not associated with
+any component.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="-has:component">
+ <input type="submit" name="btn" value="Search">
+</form>
+
+
+<h3>Multiple values in search terms</h3>
+
+<p>You can search for two values for one field, or two labels
+with the same prefix by using.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="Priority:High,Medium">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+
+<p>You can combine two separate queries into one using the <tt>OR</tt> operator.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="Priority:High OR -has:owner">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+
+<p>You can create more complex <tt>OR</tt> queries using parentheses nesting to
+distribute search terms across <tt>OR</tt> clauses. A search query may contain as
+many sets of parentheses and levels of parentheses nesting as needed.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="Pri:0,1 (status:Untriaged OR -has:owner)">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+
+<h3>Exact value search</h3>
+
+<p>You can search for issues that exactly match the given term by using
+the search operator <tt>=</tt>.</p>
+
+<p>For example, searching for <tt>Milestone=2009</tt> only matches issues with the
+label <tt>Milestone-2009</tt>, while searching for <tt>Milestone:2009</tt> matches
+issues with the labels <tt>Milestone-2009</tt>, <tt>Milestone-2009-Q1</tt>, <tt>Milestone-2009-Q3</tt>,
+etc.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="Milestone=2009">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<p>Similarly, using exact matching on components will get you only those issues
+that are in that component, not including any of its descendants.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="component=UI">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<h3>Star search</h3>
+
+<p>Any logged in user can mark any issue with a star.  The star
+indicates interest in the issue.</p>
+
+<p>For example, to quickly see all the issues in this project that you
+have starred, you could use the following:</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="is:starred">
+ <input type="submit" name="btn" [if-any logged_in_user][else]disabled="disabled"[end] value="Search">
+ [if-any logged_in_user][else]
+   <span style="white-space:nowrap"><a href="[login_url]"
+   >Sign in</a> to try this example</span>
+ [end]</p>
+</form>
+
+<p>And, to see the issues that more than ten users have starred, use the following:</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="stars>10">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+
+<h3>Jump to issue and numeric search</h3>
+
+<p>You can jump directly to a specific issue by entering its ID in the
+search field.</p>
+
+<p>For example, to jump to issue 1, just search for 1.  If there is no
+existing issue with that ID, the system will search for issues that
+contain that number anywhere in the issue.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="1">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<p>If you just want to search for issues that contain the number 1, without
+jumping to issue 1, enclose the number in quotation marks.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="&quot;1&quot;">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<p>Searching for a list of specific issue IDs is one way to
+communicate a set of issues to someone that you are working with.  Be
+sure to set the search scope to "All issues" if the issues might be
+closed.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="ID=1,2,3,4">
+ <input type="hidden" name="can" value="1">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+
+<h3>Attachment search</h3>
+
+<p>Users can attach files to any issues, either when issues are created or as
+part of issue comments.</p>
+
+<p>To quickly see all the issues that have attachments, use the following:</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="has:attachments">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<p>Or, you can search for a specific filename of the attachment.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="attachment:screenshot">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<p>You can also search for the file extension of the attachment.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="attachment:png">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+
+<p>You can also search for issues with a certain number of  attachments.</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="attachments>10">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+
+<h3>Date range search</h3>
+
+<p>You can perform searches based on date ranges.</p>
+
+<p>This search syntax is divided into two parts, the action and the date,
+[[]action]:[[]date]</p>
+
+<p>Built-in date operators include <tt>opened</tt>,
+<tt>modified</tt>, and <tt>closed</tt>. Each can be paired with an
+inequality operator <tt>&lt</tt> or <tt>&gt</tt>. The date must to be
+specified as YYYY-MM-DD, YYYY/MM/DD or today-N.</p>
+
+<p>For example, if you want to search for issues opened after 2009/4/1, you
+could do the following:</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="opened>2009/4/1">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<p>Or, if you want to search for issues modified 20 days before today's date,
+you could do the following:</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="modified<today-20">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+<p>You can search for issues that had specific fields modified
+recently by using ownermodified:, statusmodified:, componentmodified:.
+For example:</p>
+
+<form action="list" method="GET">
+ <p><input type="text" size="45" name="q" value="ownermodified>today-20">
+ <input type="submit" name="btn" value="Search"></p>
+</form>
+
+
+</div>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/label-fields.ezt b/templates/tracker/label-fields.ezt
new file mode 100644
index 0000000..7909c3e
--- /dev/null
+++ b/templates/tracker/label-fields.ezt
@@ -0,0 +1,128 @@
+[# Make a 3x8 grid of label entry form fields with autocomplete on each one.
+
+   Args:
+     arg0: if "just-two" is passed, only show the first two rows
+         and give the user links to click to expose more rows.
+     arg1: the ID prefix for the row divs.
+]
+
+<div id="[arg1]LF_row1" class="nowrap">
+ <input aria-label="label 1" type="text" class="labelinput" id="[arg1]label0" size="20" autocomplete="off"
+        name="label" value="[label0]">
+ <input aria-label="label 2" type="text" class="labelinput" id="[arg1]label1" size="20" autocomplete="off"
+        name="label" value="[label1]">
+ <input aria-label="label 3" type="text" class="labelinput" id="[arg1]label2" size="20" autocomplete="off"
+        name="label" value="[label2]">
+</div>
+
+<div id="[arg1]LF_row2" class="nowrap">
+ <input aria-label="label 4" type="text" class="labelinput" id="[arg1]label3" size="20" autocomplete="off"
+        name="label" value="[label3]">
+ <input aria-label="label 5" type="text" class="labelinput" id="[arg1]label4" size="20" autocomplete="off"
+        name="label" value="[label4]">
+ <input aria-label="label 6" type="text" class="labelinput" id="[arg1]label5" size="20" autocomplete="off"
+        [is arg0 "just-two"]data-show-id="LF_row3" data-hide-id="addrow2"[end]
+        name="label" value="[label5]">
+ [is arg0 "just-two"]<span id="addrow2" class="fakelink" data-instead="LF_row3">Add a row</span>[end]
+</div>
+
+<div id="[arg1]LF_row3" [is arg0 "just-two"]style="display:none"[end] class="nowrap">
+ <input aria-label="label 7" type="text" class="labelinput" id="[arg1]label6" size="20" autocomplete="off"
+        name="label" value="[label6]">
+ <input aria-label="label 8" type="text" class="labelinput" id="[arg1]label7" size="20" autocomplete="off"
+        name="label" value="[label7]">
+ <input aria-label="label 9" type="text" class="labelinput" id="[arg1]label8" size="20" autocomplete="off"
+        [is arg0 "just-two"]data-show-id="LF_row4" data-hide-id="addrow3"[end]
+        name="label" value="[label8]">
+ [is arg0 "just-two"]<span id="addrow3" class="fakelink" data-instead="LF_row4">Add a row</span>[end]
+</div>
+
+<div id="[arg1]LF_row4" [is arg0 "just-two"]style="display:none"[end] class="nowrap">
+ <input aria-label="label 10" type="text" class="labelinput" id="[arg1]label9" size="20" autocomplete="off"
+        name="label" value="[label9]">
+ <input aria-label="label 11" type="text" class="labelinput" id="[arg1]label10" size="20" autocomplete="off"
+        name="label" value="[label10]">
+ <input aria-label="label 12" type="text" class="labelinput" id="[arg1]label11" size="20" autocomplete="off"
+        [is arg0 "just-two"]data-show-id="LF_row5" data-hide-id="addrow4"[end]
+        name="label" value="[label11]">
+ [is arg0 "just-two"]<span id="addrow4" class="fakelink" data-instead="LF_row5">Add a row</span>[end]
+</div>
+
+<div id="[arg1]LF_row5" [is arg0 "just-two"]style="display:none"[end] class="nowrap">
+ <input aria-label="label 13" type="text" class="labelinput" id="[arg1]label12" size="20" autocomplete="off"
+        name="label" value="[label12]">
+ <input aria-label="label 14" type="text" class="labelinput" id="[arg1]label13" size="20" autocomplete="off"
+        name="label" value="[label13]">
+ <input aria-label="label 15" type="text" class="labelinput" id="[arg1]label14" size="20" autocomplete="off"
+        [is arg0 "just-two"]data-show-id="LF_row6" data-hide-id="addrow5"[end]
+        name="label" value="[label14]">
+ [is arg0 "just-two"]<span id="addrow5" class="fakelink" data-instead="LF_row6">Add a row</span>[end]
+</div>
+
+<div id="[arg1]LF_row6" [is arg0 "just-two"]style="display:none"[end] class="nowrap">
+ <input aria-label="label 16" type="text" class="labelinput" id="[arg1]label15" size="20" autocomplete="off"
+        name="label" value="[label15]">
+ <input aria-label="label 17" type="text" class="labelinput" id="[arg1]label16" size="20" autocomplete="off"
+        name="label" value="[label16]">
+ <input aria-label="label 18" type="text" class="labelinput" id="[arg1]label17" size="20" autocomplete="off"
+        [is arg0 "just-two"]data-show-id="LF_row7" data-hide-id="addrow6"[end]
+        name="label" value="[label17]">
+ [is arg0 "just-two"]<span id="addrow6" class="fakelink" data-instead="LF_row7">Add a row</span>[end]
+</div>
+
+<div id="[arg1]LF_row7" [is arg0 "just-two"]style="display:none"[end] class="nowrap">
+ <input aria-label="label 19" type="text" class="labelinput" id="[arg1]label18" size="20" autocomplete="off"
+        name="label" value="[label18]">
+ <input aria-label="label 20" type="text" class="labelinput" id="[arg1]label19" size="20" autocomplete="off"
+        name="label" value="[label19]">
+ <input aria-label="label 21" type="text" class="labelinput" id="[arg1]label20" size="20" autocomplete="off"
+        [is arg0 "just-two"]data-show-id="LF_row8" data-hide-id="addrow7"[end]
+        name="label" value="[label20]">
+ [is arg0 "just-two"]<span id="addrow7" class="fakelink" data-instead="LF_row8">Add a row</span>[end]
+</div>
+
+<div id="[arg1]LF_row8" [is arg0 "just-two"]style="display:none"[end] class="nowrap">
+ <input aria-label="label 22" type="text" class="labelinput" id="[arg1]label21" size="20" autocomplete="off"
+        name="label" value="[label21]">
+ <input aria-label="label 23" type="text" class="labelinput" id="[arg1]label22" size="20" autocomplete="off"
+        name="label" value="[label22]">
+ <input aria-label="label 24" type="text" class="labelinput" id="[arg1]label23" size="20" autocomplete="off"
+        name="label" value="[label23]">
+</div>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  var labelInputs = document.getElementsByClassName("labelinput");
+  for (var i = 0; i < labelInputs.length; ++i) {
+    var labelInput = labelInputs[[]i];
+    if (labelInput.getAttribute("id").startsWith("hidden")) continue;
+    labelInput.addEventListener("keyup", function (event) {
+        if (event.target.getAttribute("data-show-id") &&
+            event.target.getAttribute("data-hide-id") &&
+            event.target.value) {
+          _showID(event.target.getAttribute("data-show-id"));
+          _hideID(event.target.getAttribute("data-hide-id"));
+        }
+        return _vallab(event.target);
+    });
+    labelInput.addEventListener("blur", function (event) {
+        _acrob(null);
+        return _vallab(event.target);
+    });
+    labelInput.addEventListener("focus", function (event) {
+        return _acof(event);
+    });
+  }
+
+  var addRowLinks = document.getElementsByClassName("fakelink");
+  for (var i = 0; i < addRowLinks.length; ++i) {
+    var rowLink = addRowLinks[[]i];
+    rowLink.addEventListener("click", function (event) {
+        _acrob(null);
+        var insteadID = event.target.getAttribute("data-instead");
+        if (insteadID)
+          _showInstead(insteadID, this);
+    });
+  }
+});
+</script>
diff --git a/templates/tracker/launch-gates-widget.ezt b/templates/tracker/launch-gates-widget.ezt
new file mode 100644
index 0000000..225a3d2
--- /dev/null
+++ b/templates/tracker/launch-gates-widget.ezt
@@ -0,0 +1,50 @@
+<table id="launch-gates-table" class="hidden">
+  <tr>
+    <th>Approval</th>
+    <th style="color:grey">gate-less</th>
+    <th><input name="phase_0" placeholder="Gate Name" size="7" [if-any allow_edit][else]disabled[end]></th>
+    <th><input name="phase_1" size="7" [if-any allow_edit][else]disabled[end]></th>
+    <th><input name="phase_2" size="7" [if-any allow_edit][else]disabled[end]></th>
+    <th><input name="phase_3" size="7" [if-any allow_edit][else]disabled[end]></th>
+    <th><input name="phase_4" size="7" [if-any allow_edit][else]disabled[end]></th>
+    <th><input name="phase_5" size="7" [if-any allow_edit][else]disabled[end]></th>
+    <th style="color:grey">omit</th>
+  </tr>
+  [for approvals]
+    <tr>
+      <td nowrap><b>[approvals.field_name]</b>
+        <br>
+        <span><input id="[approvals.field_id]_required" name="approval_[approvals.field_id]_required" type="checkbox" [if-any allow_edit][else]disabled[end]>
+        <label for="[approvals.field_id]_required">Require review</label></span>
+      </td>
+      <td><input id="[approvals.field_id]" name="approval_[approvals.field_id]" value="no_phase" type="radio" [if-any allow_edit][else]disabled[end]></td>
+      <td><input id="[approvals.field_id]_phase_0" name="approval_[approvals.field_id]" value="phase_0" type="radio" [if-any allow_edit][else]disabled[end]></td>
+      <td><input id="[approvals.field_id]_phase_1" name="approval_[approvals.field_id]" value="phase_1" type="radio" [if-any allow_edit][else]disabled[end]></td>
+      <td><input id="[approvals.field_id]_phase_2" name="approval_[approvals.field_id]" value="phase_2" type="radio" [if-any allow_edit][else]disabled[end]></td>
+      <td><input id="[approvals.field_id]_phase_3" name="approval_[approvals.field_id]" value="phase_3" type="radio" [if-any allow_edit][else]disabled[end]></td>
+      <td><input id="[approvals.field_id]_phase_4" name="approval_[approvals.field_id]" value="phase_4" type="radio" [if-any allow_edit][else]disabled[end]></td>
+      <td><input id="[approvals.field_id]_phase_5" name="approval_[approvals.field_id]" value="phase_5" type="radio" [if-any allow_edit][else]disabled[end]></td>
+      <td><input name="approval_[approvals.field_id]" value="omit" type="radio" checked="checked" [if-any allow_edit][else]disabled[end]></td>
+    </tr>
+  [end]
+</table>
+
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  let phaseNum = 0;
+  [for initial_phases]
+    document.getElementsByName(`phase_${phaseNum++}`)[0].value = '[format "js"][initial_phases.name][end]';
+  [end]
+
+  [for prechecked_approvals]
+    document.getElementById("[prechecked_approvals]").checked = "checked"
+  [end]
+
+  [for required_approval_ids]
+    document.getElementById("[required_approval_ids]_required").checked = "checked"
+  [end]
+
+});
+
+</script>
\ No newline at end of file
diff --git a/templates/tracker/render-plain-text.ezt b/templates/tracker/render-plain-text.ezt
new file mode 100644
index 0000000..e79bb2a
--- /dev/null
+++ b/templates/tracker/render-plain-text.ezt
@@ -0,0 +1,8 @@
+[# Safely display some text that includes some markup, completely removing the markup.
+
+  arg0 is a list of element EZT objects that have a tad and content and maybe some
+  other attributes.
+
+  We do not use extra whitespace in this template because it generates text into a
+  context where whitespace is significant.
+][arg0.content]
\ No newline at end of file
diff --git a/templates/tracker/render-rich-text.ezt b/templates/tracker/render-rich-text.ezt
new file mode 100644
index 0000000..89ab07d
--- /dev/null
+++ b/templates/tracker/render-rich-text.ezt
@@ -0,0 +1,10 @@
+[# Safely display some text that includes some markup.  Only the tags
+   that we explicitly allowlist are allowed, everything else gets
+   escaped.
+
+   description.text_runs is a list of element EZT objects that have a
+   tag and content and maybe some other attributes.
+
+   We do not use extra whitespace in this template because it
+   generates text into a context where whitespace is significant.
+][is arg0.tag ""][arg0.content][end][is arg0.tag "a"]<a href="[arg0.href]" title="[arg0.title]" class="[arg0.css_class]" rel="nofollow">[arg0.content]</a>[end][is arg0.tag "b"]<b>[arg0.content]</b>[end]
\ No newline at end of file
diff --git a/templates/tracker/spam-moderation-queue.ezt b/templates/tracker/spam-moderation-queue.ezt
new file mode 100644
index 0000000..e43e477
--- /dev/null
+++ b/templates/tracker/spam-moderation-queue.ezt
@@ -0,0 +1,121 @@
+[define title]Spam Moderation Queue[end]
+[define category_css]css/ph_list.css[end]
+[define page_css]css/ph_detail.css[end][# needed for infopeek]
+
+[if-any projectname]
+  [include "../framework/header.ezt" "showtabs"]
+[else]
+  [include "../framework/header.ezt" "hidetabs"]
+[end]
+[include "../framework/js-placeholders.ezt" "showtabs"]
+
+<h2>Spam Moderation Queue: Automatic Classifier Close Calls</h2>
+[include "../framework/artifact-list-pagination-part.ezt"]
+
+<button type="submit" vaue="mark_spam" disabled="true">Mark as Spam</button>
+<button type="submit" value="mark_ham" disabled="true">Mark as Ham</button>
+
+<span style="margin:0 .7em">Select:
+  <a id="selectall" href="#">All</a>
+  <a id="selectnone" href="#">None</a>
+</span>
+
+<table id='resultstable'>
+<tr>
+  <td>
+  </td>
+  <td>ID</td>
+  <td>Author</td>
+  <td>Summary</td>
+  <td>Snippet</td>
+  <td>Opened at</td>
+  <td>Spam?</td>
+  <td>Verdict reason</td>
+  <td>Confidence</td>
+  <td>Verdict at</td>
+  <td>Flag count</td>
+</tr>
+[for issue_queue]
+<tr>
+  <td><input type='checkbox' name='issue_local_id' value='[issue_queue.issue.local_id]'/></td>
+  <td><a href='/p/[projectname]/issues/detail?id=[issue_queue.issue.local_id]'>[issue_queue.issue.local_id]</a></td>
+  <td><a href='/u/[issue_queue.reporter.email]'>[issue_queue.reporter.email]</a></td>
+  <td><a href='/p/[projectname]/issues/detail?id=[issue_queue.issue.local_id]'>[issue_queue.summary]</a></td>
+  <td>
+  [issue_queue.comment_text]
+  </td>
+  <td>[issue_queue.issue.opened_timestamp]</td>
+  <td>[issue_queue.issue.is_spam]</td>
+
+  <td>[issue_queue.reason]</td>
+  <td>[issue_queue.classifier_confidence]</td>
+  <td>[issue_queue.verdict_time]</td>
+  <td>[issue_queue.flag_count]</td>
+</tr>
+[end]
+</table>
+
+[include "../framework/artifact-list-pagination-part.ezt"]
+<button type="submit" vaue="mark_spam" disabled="true">Mark as Spam</button>
+<button type="submit" value="mark_ham" disabled="true">Mark as Ham</button>
+
+</form>
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+  if ($("selectall")) {
+    $("selectall").addEventListener("click", function() {
+        _selectAllIssues();
+        setDisabled(false);
+    });
+  }
+  if ($("selectnone")) {
+    $("selectnone").addEventListener("click", function() {
+        _selectNoneIssues();
+        setDisabled(true);
+    });
+  }
+
+  const checkboxes = Array.from(
+      document.querySelectorAll('input[type=checkbox]'));
+  checkboxes.forEach(checkbox => {
+    checkbox.addEventListener('change', updateEnabled);
+  });
+
+  const buttons = Array.from(
+      document.querySelectorAll('button[type=submit]'));
+  buttons.forEach(button => {
+    button.addEventListener('click', function(event) {
+      const markSpam = (button.value === 'mark_spam');
+      const issueRefs = [];
+      checkboxes.forEach(checkbox => {
+        if (checkbox.checked) {
+          issueRefs.push({
+              projectName: window.CS_env.projectName,
+              localId: checkbox.value,
+          });
+          const rowElement = checkbox.parentElement.parentElement;
+          rowElement.parentElement.removeChild(rowElement);
+        }
+      });
+      window.prpcClient.call('monorail.Issues', 'FlagIssues', {
+        issueRefs: issueRefs,
+        flag: markSpam,
+      });
+    });
+  });
+
+  function updateEnabled() {
+    const anySelected = checkboxes.some(checkbox => checkbox.checked);
+    setDisabled(!anySelected);
+   }
+
+  function setDisabled(disabled) {
+    buttons.forEach(button => {
+      button.disabled = disabled;
+    });
+  }
+});
+</script>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/template-detail-page.ezt b/templates/tracker/template-detail-page.ezt
new file mode 100644
index 0000000..b596e4c
--- /dev/null
+++ b/templates/tracker/template-detail-page.ezt
@@ -0,0 +1,303 @@
+[define title]Issue Template [template_name][end]
+[define category_css]css/ph_detail.css[end]
+[include "../framework/header.ezt" "showtabs"]
+
+<a href="/p/[projectname]/adminTemplates">&lsaquo; Back to template list</a><br><br>
+
+[if-any read_only][include "../framework/read-only-rejection.ezt"]
+[else]
+
+<h4>Issue Template</h4>
+
+[if-any new_template_form]
+  <form action="create.do" method="POST">
+[else]
+  <form action="detail.do" method="POST">
+[end]
+<input type="hidden" name="token" value="[form_token]">
+<input type="hidden" name="template" value="[template_name]">
+
+
+<table cellspacing="0" cellpadding="3" class="rowmajor vt">
+  <tr>
+    <th>Members only:</th>
+    <td>
+      <input type="checkbox"[if-any allow_edit][else]disabled[end] name="members_only" [if-any initial_members_only]checked[end]>
+      <label for="members_only_checkbox">Only offer this template to project members</label>
+    </td>
+  </tr>
+
+  <tr>
+    <th>Name:</th>
+    <td>
+      [if-any new_template_form]
+        <input type="text" name="name" value="[template_name]">
+        <span id="fieldnamefeedback" class="fielderror" style="margin-left:1em">
+          [if-any errors.name][errors.name][end]
+        </span>
+      [else]
+        [template_name]
+        <input type="hidden" name="name" value="[template_name]">
+      [end]
+    </td>
+  </tr>
+
+  <tr>
+    <th>Summary:</th>
+    <td>
+      [if-any allow_edit]
+        <input type="text" name="summary" size="60" class=acob" value="[initial_summary]"><br>
+      [else]
+        [initial_summary]<br>
+      [end]
+      <input type="checkbox" [if-any allow_edit][else]disabled[end] name="summary_must_be_edited" [if-any initial_must_edit_summary]checked[end]>
+      <label for="summary_must_be_edited_checkbox">Users must edit issue summary before submitting</label>
+    </td>
+  </tr>
+
+  <tr>
+    <th>Description:</th>
+    <td>
+      [if-any allow_edit]
+         <textarea name="content" rows="12" cols="75">[initial_content]</textarea>
+         [# Note: wrap="hard" has no effect on content_editor because we copy to a hidden field before submission.]
+      [else]
+        [initial_content]
+      [end]
+    </td>
+  </tr>
+
+  <tr>
+    <th>Status:</th>
+    <td>
+      [if-any allow_edit]
+        <select id="status" name="status">
+          <option style="display: none" value="[initial_status]"></option>
+        </select>
+      [else]
+        [initial_status]
+      [end]
+    </td>
+  </tr>
+
+  <tr>
+    <th>Owner:</th>
+    <td>
+       [if-any allow_edit]
+         <input id="owner_editor" type="text" name="owner" size="25" class="acob" value="[initial_owner]"
+                autocomplete="off">
+         <span id="fieldnamefeedback" class="fielderror" style="margin-left:1em">
+            [if-any errors.owner][errors.owner][end]
+         </span>
+       [else]
+         [initial_owner]<br>
+       [end]
+       <span>
+        <input type="checkbox" [if-any allow_edit][else]disabled[end] name="owner_defaults_to_member" style="margin-left:2em" [if-any initial_owner_defaults_to_member]checked[end]>
+        <label for="owner_defaults_to_member_checkbox">Default to member who is entering the issue</label>
+       </span>
+    </td>
+  </tr>
+
+  <tr>
+    <th>Components:</th>
+    <td>
+      [if-any allow_edit]
+        <input id="components" type="text" name="components" size="75" class="acob"
+               autocomplete="off" value="[initial_components]">
+       <span id="fieldnamefeedback" class="fielderror" style="margin-left:1em">
+          [if-any errors.components][errors.components][end]
+       </span>
+      [else]
+        [initial_components]
+      [end]
+       <br/>
+       <span>
+        <input type="checkbox" [if-any allow_edit][else]disabled[end] name="component_required" [if-any initial_component_required]checked[end]>
+        <label for="component_required_checkbox">Require at least one component</label>
+       </span>
+    </td>
+  </tr>
+
+  [if-any allow_edit][if-any uneditable_fields]
+  <tr id="res_fd_banner"><th></th>
+    <td style="text-align:left; border-radius:25px">
+      <span style="background:var(--chops-orange-50); padding:5px; margin-top:10px;padding-left:10px; padding-right:10px; border-radius:25px">
+        <span style="padding-right:7px">
+        Info: Disabled inputs occur when you are not allowed to edit that restricted field.
+        </span>
+        <i id="res_fd_message" class="material-icons inline-icon" style="font-weight:bold; font-size:14px; vertical-align: text-bottom; cursor: pointer">
+        close</i>
+      </span>
+    </td>
+  </tr>
+  [end][end]
+
+  [for fields]
+    [# TODO(jrobbins): determine applicability dynamically and update fields in JS]
+    [# approval subfields are shown below, not here]
+    [if-any fields.field_def.is_approval_subfield][else][if-any fields.field_def.is_phase_field][else]
+      <tr>
+        <th>[fields.field_name]:</th>
+        <td colspan="2">
+          [if-any allow_edit]
+            [if-any fields.is_editable]
+              [include "field-value-widgets.ezt" False "tmpl" False ""]
+            [else]
+              <input disabled value = "
+              [for fields.values]
+                [fields.values.val]
+              [end]
+              " style="text-align:right; width:12em" class="multivalued customfield" aria-labelledby="[fields.field_id]_label">
+            [end]
+          [else]
+            [for fields.values]
+              [fields.values.val]
+            [end]
+          [end]
+        </td>
+      <tr>
+    [end][end]
+  [end]
+
+  <tr>
+    <th>Labels:</th>
+    <td>
+      [include "label-fields.ezt" "all" ""]
+     </td>
+   </tr>
+
+   <tr>
+     <th>Template admins:</th>
+     <td>
+       [if-any allow_edit]
+         <input id="admin_names_editor" type="text" name="admin_names" size="75" class="acob" value="[initial_admins]"
+                autocomplete="off">
+       [else]
+         [initial_admins]
+       [end]
+     </td>
+   </tr>
+
+  [if-any approvals]
+     <tr>
+       <th>Launch Gates:</th>
+       <td colspan="7">
+         <input type="checkbox" name="add_approvals" id="cb_add_approvals" [if-any allow_edit][else]disabled[end] [if-any initial_add_approvals]checked="checked"[end]>
+         <label for="cb_add_approvals">Include Gates and Approval Tasks in issue</label>
+         [include "launch-gates-widget.ezt"]
+         <span id="fieldnamefeedback" class="fielderror" style="margin-left:1em">
+              [if-any errors.phase_approvals][errors.phase_approvals][end]
+         </span>
+       </td>
+     </tr>
+  [end]
+
+  [for fields]
+    [if-any fields.field_def.is_approval_subfield]
+      <tr id="subfield-row" class="subfield-row-class">
+        <th>[fields.field_def.parent_approval_name] [fields.field_name]:</th>
+        <td colspan="2">
+          [if-any allow_edit]
+            [if-any fields.is_editable]
+              [include "field-value-widgets.ezt" False "tmpl" False ""]
+            [else]
+              <input disabled value = "
+              [for fields.values]
+                [fields.values.val]
+              [end]
+              " style="text-align:right; width:12em" class="multivalued customfield" aria-labelledby="[fields.field_id]_label">
+            [end]
+          [else]
+            [for fields.values][fields.values.val][end]
+          [end]
+        </td>
+      </tr>
+  [end][end]
+
+  [if-any allow_edit]
+    <tr>
+      <td></td>
+      <td>
+        <input id="submit_btn" type="submit" name="submit" value="Save template">
+        <input id="delete_btn" type="submit" class="secondary" name="deletetemplate" value="Delete Template">
+      </td>
+    </tr>
+  [end]
+
+</table>
+</form>
+
+[include "field-value-widgets-js.ezt"]
+
+[end][# end if not read_only]
+
+<script type="text/javascript" nonce="[nonce]">
+runOnLoad(function() {
+
+  [if-any allow_edit]
+    let addPhasesCheckbox = document.getElementById('cb_add_approvals');
+    if (addPhasesCheckbox) {
+      addPhasesCheckbox.addEventListener('change', toggleGatesView);
+    }
+
+    var acobElements = document.getElementsByClassName("acob");
+    for (var i = 0; i < acobElements.length; ++i) {
+       var el = acobElements[[]i];
+       el.addEventListener("focus", function(event) {
+           _acrob(null);
+           _acof(event);
+       });
+    }
+
+    if ($("status")) {
+      _loadStatusSelect("[projectname]", "status", "[initial_status]");
+      $("status").addEventListener("focus", function(event) {
+        _acrob(null);
+      });
+    }
+
+    if($("res_fd_message")) {
+      $("res_fd_message").onclick = function(){
+        $("res_fd_banner").classList.add("hidden");
+      };
+    };
+
+  [else]
+
+    let labelInputs = document.getElementsByClassName("labelinput");
+    Array.prototype.forEach.call(labelInputs, labelInput => {
+      labelInput.disabled = true;
+    });
+  [end]
+
+  toggleGatesView();
+  function toggleGatesView() {
+    let addPhasesCheckbox = document.getElementById('cb_add_approvals');
+    if (addPhasesCheckbox === null) return;
+    let addPhases = addPhasesCheckbox.checked;
+    let subfieldRows = document.getElementsByClassName('subfield-row-class');
+    let phasefieldRows = document.getElementsByClassName('phasefield-row-class');
+    if (addPhases) {
+      $('launch-gates-table').classList.remove('hidden');
+      for (let i=0; i<subfieldRows.length; i++){
+        subfieldRows[[]i].classList.remove('hidden');
+      }
+      for (let i=0; i<phasefieldRows.length; i++){
+        phasefieldRows[[]i].classList.remove('hidden');
+      }
+    } else{
+      $('launch-gates-table').classList.add('hidden');
+      for (let i=0; i<subfieldRows.length; i++){
+        subfieldRows[[]i].classList.add('hidden');
+      }
+      for (let i=0; i<phasefieldRows.length; i++){
+        phasefieldRows[[]i].classList.add('hidden');
+      }
+    }
+  }
+
+});
+</script>
+
+[include "../framework/footer.ezt"]
diff --git a/templates/tracker/update-issues-hotlists-dialog.ezt b/templates/tracker/update-issues-hotlists-dialog.ezt
new file mode 100644
index 0000000..a453246
--- /dev/null
+++ b/templates/tracker/update-issues-hotlists-dialog.ezt
@@ -0,0 +1,11 @@
+[# TODO(jojwang): refine what buttons are shown when there are no hotlists]
+<div id="update-issues-hotlists" style="display: none">
+  <div id="update-issues-hotlists-dialog">
+    <table id="js-hotlists-table">
+    </table>
+    <menu>
+      <button id="cancel-update-hotlists" type="reset">Cancel</button>
+      <button id="save-issues-hotlists">Save</button>
+    </menu>
+  </div>
+</div>
diff --git a/templates/tracker/web-components-page.ezt b/templates/tracker/web-components-page.ezt
new file mode 100644
index 0000000..88a42e4
--- /dev/null
+++ b/templates/tracker/web-components-page.ezt
@@ -0,0 +1,41 @@
+[if-any local_id]
+  [define title][local_id][end]
+[else]
+  [define title]Monorail[end]
+[end]
+
+[define is_ezt][end]
+[include "../framework/header-shared.ezt"]
+
+[include "../webpack-out/mr-app.ezt"]
+
+<mr-app [if-any logged_in_user]
+  userDisplayName="[logged_in_user.email]"[end]
+  loginUrl="[login_url]"
+  logoutUrl="[logout_url]"
+  versionBase="[version_base]"
+></mr-app>
+
+[include "../framework/polymer-footer.ezt"]
+
+[if-any local_id]
+  <script type="text/javascript" nonce="[nonce]">
+    window.addEventListener('load', () => {
+      window.getTSMonClient().recordIssueDetailSpaTiming();
+    });
+  </script>
+[end]
+
+<script type="text/javascript" nonce="[nonce]">
+  runOnLoad(function() {
+    if (typeof(ClientLogger) === "function") {
+      let cl = new ClientLogger("issues");
+      if (cl.started("new-issue")) {
+        cl.logEnd("new-issue", null, 120 * 1000);
+      }
+      if (cl.started("issue-search")) {
+        cl.logEnd("issue-search");
+      }
+    }
+  });
+</script>
diff --git a/testing/__init__.py b/testing/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/testing/__init__.py
@@ -0,0 +1 @@
+
diff --git a/testing/api_clients.cfg b/testing/api_clients.cfg
new file mode 100644
index 0000000..c9588df
--- /dev/null
+++ b/testing/api_clients.cfg
@@ -0,0 +1,43 @@
+# 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
+
+# Defines fake monorail api clients for testing
+
+clients {
+  client_email: "123456789@developer.gserviceaccount.com"
+  client_id: "123456789.apps.googleusercontent.com"
+  allowed_origins: "chicken.test"
+  allowed_origins: "cow.test"
+  display_name: "johndoe@example.com"
+  description: "John Doe needs api access"
+  project_permissions {
+    project: "chromium"
+    role: contributor
+  }
+  contacts: "johndoe@example.com"
+  qpm_limit: 1
+}
+
+clients {
+  client_email: "bugdroid1@chromium.org"
+  client_id: "987654321.apps.googleusercontent.com"
+  description: "bugdroid"
+  project_permissions {
+    project: "chromium"
+    role: committer
+  }
+  contacts: "bugdroidowner@example.com"
+}
+
+clients {
+  client_id: "98723764876"
+  allowed_origins: "goat.test"
+  description: "test client_id alone is sufficient to access API."
+  project_permissions {
+    project: "chromium"
+    role: committer
+  }
+  contacts: "client_id_only@example.com"
+}
diff --git a/testing/fake.py b/testing/fake.py
new file mode 100644
index 0000000..33d5ed0
--- /dev/null
+++ b/testing/fake.py
@@ -0,0 +1,2901 @@
+# 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
+
+"""Fake object classes that are useful for unit tests."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import itertools
+import logging
+import re
+import sys
+import time
+
+from six import string_types
+
+import settings
+from features import filterrules_helpers
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import monorailrequest
+from framework import permissions
+from framework import profiler
+from framework import validate
+from proto import features_pb2
+from proto import project_pb2
+from proto import tracker_pb2
+from proto import user_pb2
+from proto import usergroup_pb2
+from services import caches
+from services import config_svc
+from services import features_svc
+from services import project_svc
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+# Many fakes return partial or constant values, regardless of their arguments.
+# pylint: disable=unused-argument
+
+BOUNDARY = '-----thisisaboundary'
+OWNER_ROLE = 'OWNER_ROLE'
+COMMITTER_ROLE = 'COMMITTER_ROLE'
+CONTRIBUTOR_ROLE = 'CONTRIBUTOR_ROLE'
+EDITOR_ROLE = 'EDITOR_ROLE'
+FOLLOWER_ROLE = 'FOLLOWER_ROLE'
+
+def Hotlist(
+    hotlist_name, hotlist_id, hotlist_item_fields=None,
+    is_private=False, owner_ids=None, editor_ids=None, follower_ids=None,
+    default_col_spec=None, summary=None, description=None):
+  hotlist_id = hotlist_id or hash(hotlist_name)
+  return features_pb2.MakeHotlist(
+      hotlist_name, hotlist_item_fields=hotlist_item_fields,
+      hotlist_id=hotlist_id, is_private=is_private, owner_ids=owner_ids or [],
+      editor_ids=editor_ids or [], follower_ids=follower_ids or [],
+      default_col_spec=default_col_spec, summary=summary,
+      description=description)
+
+def HotlistItem(issue_id, rank=None, adder_id=None, date_added=None, note=None):
+  return features_pb2.MakeHotlistItem(issue_id=issue_id, rank=rank,
+                                      adder_id=adder_id, date_added=date_added,
+                                      note=None)
+
+def Project(
+    project_name='proj', project_id=None, state=project_pb2.ProjectState.LIVE,
+    access=project_pb2.ProjectAccess.ANYONE, moved_to=None,
+    cached_content_timestamp=None,
+    owner_ids=None, committer_ids=None, contributor_ids=None):
+  """Returns a project protocol buffer with the given attributes."""
+  project_id = project_id or hash(project_name)
+  return project_pb2.MakeProject(
+      project_name, project_id=project_id, state=state, access=access,
+      moved_to=moved_to, cached_content_timestamp=cached_content_timestamp,
+      owner_ids=owner_ids, committer_ids=committer_ids,
+      contributor_ids=contributor_ids)
+
+
+def MakeTestFieldDef(
+    field_id, project_id, field_type, field_name='', applic_type=None,
+    applic_pred=None, is_required=False, is_niche=False, is_multivalued=False,
+    min_value=None, max_value=None, regex=None, needs_member=False,
+    needs_perm=None, grants_perm=None, notify_on=None, date_action_str=None,
+    docstring=None, admin_ids=None, editor_ids=None, approval_id=None,
+    is_phase_field=False, is_restricted_field=False):
+  return  tracker_bizobj.MakeFieldDef(
+        field_id, project_id, field_name, field_type, applic_type, applic_pred,
+        is_required, is_niche, is_multivalued, min_value, max_value, regex,
+        needs_member, needs_perm, grants_perm, notify_on, date_action_str,
+        docstring, False,
+        approval_id=approval_id, is_phase_field=is_phase_field,
+        is_restricted_field=is_restricted_field, admin_ids=admin_ids,
+        editor_ids=editor_ids)
+
+def MakeTestApprovalDef(approval_id, approver_ids=None, survey=None):
+  return tracker_pb2.ApprovalDef(
+      approval_id=approval_id,
+      approver_ids = approver_ids,
+      survey = survey)
+
+def MakePhase(phase_id, name='', rank=0):
+  return tracker_pb2.Phase(phase_id=phase_id, name=name, rank=rank)
+
+
+def MakeApprovalValue(
+    approval_id,
+    status=tracker_pb2.ApprovalStatus.NOT_SET,
+    setter_id=None,
+    set_on=None,
+    approver_ids=None,
+    phase_id=None):
+  if approver_ids is None:
+    approver_ids = []
+  return tracker_pb2.ApprovalValue(
+      approval_id=approval_id,
+      status=status,
+      setter_id=setter_id,
+      set_on=set_on,
+      approver_ids=approver_ids,
+      phase_id=phase_id)
+
+
+def MakeFieldValue(
+    field_id,
+    int_value=None,
+    str_value=None,
+    user_id=None,
+    date_value=None,
+    url_value=None,
+    derived=None,
+    phase_id=None):
+  return tracker_pb2.FieldValue(
+      field_id=field_id,
+      int_value=int_value,
+      str_value=str_value,
+      user_id=user_id,
+      date_value=date_value,
+      url_value=url_value,
+      derived=derived,
+      phase_id=phase_id)
+
+
+def MakeTestIssue(
+    project_id, local_id, summary, status, owner_id, labels=None,
+    derived_labels=None, derived_status=None, merged_into=0, star_count=0,
+    derived_owner_id=0, issue_id=None, reporter_id=None, opened_timestamp=None,
+    closed_timestamp=None, modified_timestamp=None, is_spam=False,
+    component_ids=None, project_name=None, field_values=None, cc_ids=None,
+    derived_cc_ids=None, assume_stale=True, phases=None, approval_values=None,
+    merged_into_external=None, attachment_count=0, derived_component_ids=None):
+  """Easily make an Issue for testing."""
+  issue = tracker_pb2.Issue()
+  issue.project_id = project_id
+  issue.project_name = project_name
+  issue.local_id = local_id
+  issue.issue_id = issue_id if issue_id else 100000 + local_id
+  issue.reporter_id = reporter_id if reporter_id else owner_id
+  issue.summary = summary
+  issue.status = status
+  issue.owner_id = owner_id
+  issue.derived_owner_id = derived_owner_id
+  issue.star_count = star_count
+  issue.merged_into = merged_into
+  issue.merged_into_external = merged_into_external
+  issue.is_spam = is_spam
+  issue.attachment_count = attachment_count
+  if cc_ids:
+    issue.cc_ids = cc_ids
+  if derived_cc_ids:
+    issue.derived_cc_ids = derived_cc_ids
+  issue.assume_stale = assume_stale
+  if opened_timestamp:
+    issue.opened_timestamp = opened_timestamp
+    issue.owner_modified_timestamp = opened_timestamp
+    issue.status_modified_timestamp = opened_timestamp
+    issue.component_modified_timestamp = opened_timestamp
+  if modified_timestamp:
+    issue.modified_timestamp = modified_timestamp
+  if closed_timestamp:
+    issue.closed_timestamp = closed_timestamp
+  if labels is not None:
+    if isinstance(labels, string_types):
+      labels = labels.split()
+    issue.labels.extend(labels)
+  if derived_labels is not None:
+    if isinstance(derived_labels, string_types):
+      derived_labels = derived_labels.split()
+    issue.derived_labels.extend(derived_labels)
+  if derived_status is not None:
+    issue.derived_status = derived_status
+  if component_ids is not None:
+    issue.component_ids = component_ids
+  if derived_component_ids is not None:
+    issue.derived_component_ids = derived_component_ids
+  if field_values is not None:
+    issue.field_values = field_values
+  if phases is not None:
+    issue.phases = phases
+  if approval_values is not None:
+    issue.approval_values = approval_values
+  return issue
+
+
+def MakeTestComponentDef(project_id, comp_id, path='', cc_ids=None):
+  if cc_ids is None:
+    cc_ids = []
+  return tracker_bizobj.MakeComponentDef(
+      comp_id, project_id, path, '', False, [], cc_ids, None, None)
+
+
+def MakeTestConfig(project_id, labels, statuses):
+  """Convenient function to make a ProjectIssueConfig object."""
+  config = tracker_bizobj.MakeDefaultProjectIssueConfig(project_id)
+  if isinstance(labels, string_types):
+    labels = labels.split()
+  if isinstance(statuses, string_types):
+    statuses = statuses.split()
+  config.well_known_labels = [
+      tracker_pb2.LabelDef(label=lab) for lab in labels]
+  config.well_known_statuses = [
+      tracker_pb2.StatusDef(status=stat) for stat in statuses]
+  return config
+
+
+class MonorailConnection(object):
+  """Fake connection to databases for use in tests."""
+
+  def Commit(self):
+    pass
+
+  def Close(self):
+    pass
+
+
+class MonorailRequest(monorailrequest.MonorailRequest):
+  """Subclass of MonorailRequest suitable for testing."""
+
+  def __init__(self, services, user_info=None, project=None, perms=None,
+               hotlist=None, **kwargs):
+    """Construct a test MonorailRequest.
+
+    Typically, this is constructed via testing.helpers.GetRequestObjects,
+    which also causes url parsing and optionally initializes the user,
+    project, and permissions info.
+
+    Args:
+      services: connections to backends.
+      user_info: a dict of user attributes to set on a MonorailRequest object.
+        For example, "user_id: 5" causes self.auth.user_id=5.
+      project: the Project pb for this request.
+      perms: a PermissionSet for this request.
+    """
+    super(MonorailRequest, self).__init__(services, **kwargs)
+
+    if user_info is not None:
+      for key in user_info:
+        setattr(self.auth, key, user_info[key])
+      if 'user_id' in user_info:
+        self.auth.effective_ids = {user_info['user_id']}
+
+    self.perms = perms or permissions.ADMIN_PERMISSIONSET
+    self.profiler = profiler.Profiler()
+    self.project = project
+    self.hotlist = hotlist
+    if hotlist is not None:
+      self.hotlist_id = hotlist.hotlist_id
+
+class UserGroupService(object):
+  """Fake UserGroupService class for testing other code."""
+
+  def __init__(self):
+    # Test-only sequence of expunged users.
+    self.expunged_users_in_groups = []
+
+    self.group_settings = {}
+    self.group_members = {}
+    self.group_addrs = {}
+    self.role_dict = {}
+
+  def TestAddGroupSettings(
+      self,
+      group_id,
+      email,
+      who_can_view=None,
+      anyone_can_join=False,
+      who_can_add=None,
+      external_group_type=None,
+      last_sync_time=0,
+      friend_projects=None,
+      notify_members=True,
+      notify_group=False):
+    """Set up a fake group for testing.
+
+    Args:
+      group_id: int user ID of the new user group.
+      email: string email address to identify the user group.
+      who_can_view: string enum 'owners', 'members', or 'anyone'.
+      anyone_can_join: optional boolean to allow any users to join the group.
+      who_can_add: optional list of int user IDs of users who can add
+          more members to the group.
+      notify_members: optional boolean for if emails to this group should be
+          sent directly to members.
+      notify_group: optional boolean for if emails to this group should be
+          sent directly to the group email.
+    """
+    friend_projects = friend_projects or []
+    group_settings = usergroup_pb2.MakeSettings(
+        who_can_view or 'members', external_group_type, last_sync_time,
+        friend_projects, notify_members, notify_group)
+    self.group_settings[group_id] = group_settings
+    self.group_addrs[group_id] = email
+    # TODO(jrobbins): store the other settings.
+
+  def TestAddMembers(self, group_id, user_ids, role='member'):
+    self.group_members.setdefault(group_id, []).extend(user_ids)
+    for user_id in user_ids:
+      self.role_dict.setdefault(group_id, {})[user_id] = role
+
+  def LookupAllMemberships(self, _cnxn, user_ids, use_cache=True):
+    return {
+        user_id: self.LookupMemberships(_cnxn, user_id)
+        for user_id in user_ids
+    }
+
+  def LookupMemberships(self, _cnxn, user_id):
+    memberships = {
+        group_id for group_id, member_ids in self.group_members.items()
+        if user_id in member_ids}
+    return memberships
+
+  def DetermineWhichUserIDsAreGroups(self, _cnxn, user_ids):
+    return [uid for uid in user_ids
+            if uid in self.group_settings]
+
+  def GetAllUserGroupsInfo(self, cnxn):
+    infos = []
+    for group_id in self.group_settings:
+      infos.append(
+          (self.group_addrs[group_id],
+           len(self.group_members.get(group_id, [])),
+           self.group_settings[group_id], group_id))
+
+    return infos
+
+  def GetAllGroupSettings(self, _cnxn, group_ids):
+    return {gid: self.group_settings[gid]
+            for gid in group_ids
+            if gid in self.group_settings}
+
+  def GetGroupSettings(self, cnxn, group_id):
+    return self.GetAllGroupSettings(cnxn, [group_id]).get(group_id)
+
+  def CreateGroup(self, cnxn, services, email, who_can_view_members,
+                  ext_group_type=None, friend_projects=None):
+    friend_projects = friend_projects or []
+    group_id = services.user.LookupUserID(
+        cnxn, email, autocreate=True, allowgroups=True)
+    self.group_addrs[group_id] = email
+    group_settings = usergroup_pb2.MakeSettings(
+        who_can_view_members, ext_group_type, 0, friend_projects)
+    self.UpdateSettings(cnxn, group_id, group_settings)
+    return group_id
+
+  def DeleteGroups(self, cnxn, group_ids):
+    member_ids_dict, owner_ids_dict = self.LookupMembers(cnxn, group_ids)
+    citizens_id_dict = collections.defaultdict(list)
+    for g_id, user_ids in member_ids_dict.items():
+      citizens_id_dict[g_id].extend(user_ids)
+    for g_id, user_ids in owner_ids_dict.items():
+      citizens_id_dict[g_id].extend(user_ids)
+    for g_id, citizen_ids in citizens_id_dict.items():
+      # Remove group members, friend projects and settings
+      self.RemoveMembers(cnxn, g_id, citizen_ids)
+      self.group_settings.pop(g_id, None)
+
+  def LookupComputedMemberships(self, cnxn, domain, use_cache=True):
+    group_email = 'everyone@%s' % domain
+    group_id = self.LookupUserGroupID(cnxn, group_email, use_cache=use_cache)
+    if group_id:
+      return [group_id]
+
+    return []
+
+  def LookupUserGroupID(self, cnxn, group_email, use_cache=True):
+    for group_id in self.group_settings:
+      if group_email == self.group_addrs.get(group_id):
+        return group_id
+    return None
+
+  def LookupMembers(self, _cnxn, group_id_list):
+    members_dict = {}
+    owners_dict = {}
+    for gid in group_id_list:
+      members_dict[gid] = []
+      owners_dict[gid] = []
+      for mid in self.group_members.get(gid, []):
+        if self.role_dict.get(gid, {}).get(mid) == 'owner':
+          owners_dict[gid].append(mid)
+        elif self.role_dict.get(gid, {}).get(mid) == 'member':
+          members_dict[gid].append(mid)
+    return members_dict, owners_dict
+
+  def LookupAllMembers(self, _cnxn, group_id_list):
+    direct_members, direct_owners = self.LookupMembers(
+        _cnxn, group_id_list)
+    members_dict = {}
+    owners_dict = {}
+    for gid in group_id_list:
+      members = direct_members[gid]
+      owners = direct_owners[gid]
+      owners_dict[gid] = owners
+      members_dict[gid] = members
+      group_ids = set([uid for uid in members + owners
+                       if uid in self.group_settings])
+      while group_ids:
+        indirect_members, indirect_owners = self.LookupMembers(
+            _cnxn, group_ids)
+        child_members = set()
+        child_owners = set()
+        for _, children in indirect_members.items():
+          child_members.update(children)
+        for _, children in indirect_owners.items():
+          child_owners.update(children)
+        members_dict[gid].extend(list(child_members))
+        owners_dict[gid].extend(list(child_owners))
+        group_ids = set(self.DetermineWhichUserIDsAreGroups(
+            _cnxn, list(child_members) + list(child_owners)))
+      members_dict[gid] = list(set(members_dict[gid]))
+    return members_dict, owners_dict
+
+
+  def RemoveMembers(self, _cnxn, group_id, old_member_ids):
+    current_member_ids = self.group_members.get(group_id, [])
+    revised_member_ids = [mid for mid in current_member_ids
+                          if mid not in old_member_ids]
+    self.group_members[group_id] = revised_member_ids
+
+  def UpdateMembers(self, _cnxn, group_id, member_ids, new_role):
+    self.RemoveMembers(_cnxn, group_id, member_ids)
+    self.TestAddMembers(group_id, member_ids, new_role)
+
+  def UpdateSettings(self, _cnxn, group_id, group_settings):
+    self.group_settings[group_id] = group_settings
+
+  def ExpandAnyGroupEmailRecipients(self, cnxn, user_ids):
+    group_ids = set(self.DetermineWhichUserIDsAreGroups(cnxn, user_ids))
+    group_settings_dict = self.GetAllGroupSettings(cnxn, group_ids)
+    member_ids_dict, owner_ids_dict = self.LookupAllMembers(cnxn, group_ids)
+    indirect_ids = set()
+    direct_ids = {uid for uid in user_ids if uid not in group_ids}
+    for gid, group_settings in group_settings_dict.items():
+      if group_settings.notify_members:
+        indirect_ids.update(member_ids_dict.get(gid, set()))
+        indirect_ids.update(owner_ids_dict.get(gid, set()))
+      if group_settings.notify_group:
+        direct_ids.add(gid)
+
+    return list(direct_ids), list(indirect_ids)
+
+  def LookupVisibleMembers(
+      self, cnxn, group_id_list, perms, effective_ids, services):
+    settings_dict = self.GetAllGroupSettings(cnxn, group_id_list)
+    group_ids = list(settings_dict.keys())
+
+    direct_member_ids_dict, direct_owner_ids_dict = self.LookupMembers(
+        cnxn, group_ids)
+    all_member_ids_dict, all_owner_ids_dict = self.LookupAllMembers(
+        cnxn, group_ids)
+    visible_member_ids_dict = {}
+    visible_owner_ids_dict = {}
+    for gid in group_ids:
+      member_ids = all_member_ids_dict[gid]
+      owner_ids = all_owner_ids_dict[gid]
+      if permissions.CanViewGroupMembers(
+          perms, effective_ids, settings_dict[gid], member_ids, owner_ids, []):
+        visible_member_ids_dict[gid] = direct_member_ids_dict[gid]
+        visible_owner_ids_dict[gid] = direct_owner_ids_dict[gid]
+
+    return visible_member_ids_dict, visible_owner_ids_dict
+
+  def ValidateFriendProjects(self, cnxn, services, friend_projects):
+    project_names = list(filter(None, re.split('; |, | |;|,', friend_projects)))
+    id_dict = services.project.LookupProjectIDs(cnxn, project_names)
+    missed_projects = []
+    result = []
+    for p_name in project_names:
+      if p_name in id_dict:
+        result.append(id_dict[p_name])
+      else:
+        missed_projects.append(p_name)
+    error_msg = ''
+    if missed_projects:
+      error_msg = 'Project(s) %s do not exist' % ', '.join(missed_projects)
+      return None, error_msg
+    else:
+      return result, None
+
+  def ExpungeUsersInGroups(self, cnxn, ids):
+    self.expunged_users_in_groups.extend(ids)
+
+
+class CacheManager(object):
+
+  def __init__(self, invalidate_tbl=None):
+    self.last_call = None
+    self.cache_registry = collections.defaultdict(list)
+    self.processed_invalidations_up_to = 0
+
+  def RegisterCache(self, cache, kind):
+    """Register a cache to be notified of future invalidations."""
+    self.cache_registry[kind].append(cache)
+
+  def DoDistributedInvalidation(self, cnxn):
+    """Drop any cache entries that were invalidated by other jobs."""
+    self.last_call = 'DoDistributedInvalidation', cnxn
+
+  def StoreInvalidateRows(self, cnxn, kind, keys):
+    """Store database rows to let all frontends know to invalidate."""
+    self.last_call = 'StoreInvalidateRows', cnxn, kind, keys
+
+  def StoreInvalidateAll(self, cnxn, kind):
+    """Store a database row to let all frontends know to invalidate."""
+    self.last_call = 'StoreInvalidateAll', cnxn, kind
+
+
+
+class UserService(object):
+
+  def __init__(self):
+    """Creates a test-appropriate UserService object."""
+    self.users_by_email = {}  # {email: user_id, ...}
+    self.users_by_id = {}  # {user_id: email, ...}
+    self.test_users = {}  # {user_id: user_pb, ...}
+    self.visited_hotlists = {}  # user_id:[(hotlist_id, viewed), ...]
+    self.invite_rows = []  # (parent_id, child_id)
+    self.linked_account_rows = []  # (parent_id, child_id)
+    self.prefs_dict = {}  # {user_id: UserPrefs}
+
+  def TestAddUser(
+      self, email, user_id, add_user=True, banned=False, obscure_email=True):
+    """Add a user to the fake UserService instance.
+
+    Args:
+      email: Email of the user.
+      user_id: int user ID.
+      add_user: Flag whether user pb should be created, i.e. whether a
+          Monorail account should be created
+      banned: Boolean to set the user as banned
+      obscure_email: Boolean to determine whether to obscure the user's email.
+
+    Returns:
+      The User PB that was added, or None.
+    """
+    self.users_by_email[email] = user_id
+    self.users_by_id[user_id] = email
+
+    user = None
+    if add_user:
+      user = user_pb2.MakeUser(user_id)
+      user.is_site_admin = False
+      user.email = email
+      user.obscure_email = obscure_email
+      if banned:
+        user.banned = 'is banned'
+      self.test_users[user_id] = user
+
+    return user
+
+  def GetUser(self, cnxn, user_id):
+    return self.GetUsersByIDs(cnxn, [user_id])[user_id]
+
+  def _CreateUser(self, _cnxn, email):
+    if email in self.users_by_email:
+      return
+    user_id = framework_helpers.MurmurHash3_x86_32(email)
+    self.TestAddUser(email, user_id)
+
+  def _CreateUsers(self, cnxn, emails):
+    for email in emails:
+      self._CreateUser(cnxn, email)
+
+  def LookupUserID(self, cnxn, email, autocreate=False, allowgroups=False):
+    email_dict = self.LookupUserIDs(
+        cnxn, [email], autocreate=autocreate, allowgroups=allowgroups)
+    if email in email_dict:
+      return email_dict[email]
+    raise exceptions.NoSuchUserException('%r not found' % email)
+
+  def GetUsersByIDs(self, cnxn, user_ids, use_cache=True, skip_missed=False):
+    user_dict = {}
+    for user_id in user_ids:
+      if user_id and self.test_users.get(user_id):
+        user_dict[user_id] = self.test_users[user_id]
+      elif not skip_missed:
+        user_dict[user_id] = user_pb2.MakeUser(user_id)
+    return user_dict
+
+  def LookupExistingUserIDs(self, cnxn, emails):
+    email_dict = {
+        email: self.users_by_email[email]
+        for email in emails
+        if email in self.users_by_email}
+    return email_dict
+
+  def LookupUserIDs(self, cnxn, emails, autocreate=False,
+                    allowgroups=False):
+    email_dict = {}
+    needed_emails = [email.lower() for email in emails
+                     if email
+                     and not framework_constants.NO_VALUE_RE.match(email)]
+    for email in needed_emails:
+      user_id = self.users_by_email.get(email)
+      if not user_id:
+        if autocreate and validate.IsValidEmail(email):
+          self._CreateUser(cnxn, email)
+          user_id = self.users_by_email.get(email)
+        elif not autocreate:
+          raise exceptions.NoSuchUserException('%r' % email)
+      if user_id:
+        email_dict[email] = user_id
+    return email_dict
+
+  def LookupUserEmail(self, _cnxn, user_id):
+    email = self.users_by_id.get(user_id)
+    if not email:
+      raise exceptions.NoSuchUserException('No user has ID %r' % user_id)
+    return email
+
+  def LookupUserEmails(self, cnxn, user_ids, ignore_missed=False):
+    if ignore_missed:
+      user_dict = {}
+      for user_id in user_ids:
+        try:
+          user_dict[user_id] = self.LookupUserEmail(cnxn, user_id)
+        except exceptions.NoSuchUserException:
+          continue
+      return user_dict
+    user_dict = {
+        user_id: self.LookupUserEmail(cnxn, user_id)
+        for user_id in user_ids}
+    return user_dict
+
+  def UpdateUser(self, _cnxn, user_id, user):
+    """Updates the user pb."""
+    self.test_users[user_id] = user
+
+  def UpdateUserBan(self, _cnxn, user_id, user, is_banned=None,
+        banned_reason=None):
+    """Updates the user pb."""
+    self.test_users[user_id] = user
+    user.banned = banned_reason if is_banned else ''
+
+  def GetPendingLinkedInvites(self, cnxn, user_id):
+    invite_as_parent = [row[1] for row in self.invite_rows
+                        if row[0] == user_id]
+    invite_as_child = [row[0] for row in self.invite_rows
+                       if row[1] == user_id]
+    return invite_as_parent, invite_as_child
+
+  def InviteLinkedParent(self, cnxn, parent_id, child_id):
+    self.invite_rows.append((parent_id, child_id))
+
+  def AcceptLinkedChild(self, cnxn, parent_id, child_id):
+    if (parent_id, child_id) not in self.invite_rows:
+      raise exceptions.InputException('No such invite')
+    self.linked_account_rows.append((parent_id, child_id))
+    self.invite_rows = [
+        (p_id, c_id) for (p_id, c_id) in self.invite_rows
+        if p_id != parent_id and c_id != child_id]
+    self.GetUser(cnxn, parent_id).linked_child_ids.append(child_id)
+    self.GetUser(cnxn, child_id).linked_parent_id = parent_id
+
+  def UnlinkAccounts(self, _cnxn, parent_id, child_id):
+    """Delete a linked-account relationship."""
+    if not parent_id:
+      raise exceptions.InputException('Parent account is missing')
+    if not child_id:
+      raise exceptions.InputException('Child account is missing')
+    self.linked_account_rows = [(p, c) for (p, c) in self.linked_account_rows
+                                if (p, c) != (parent_id, child_id)]
+
+  def UpdateUserSettings(
+      self, cnxn, user_id, user, notify=None, notify_starred=None,
+      email_compact_subject=None, email_view_widget=None,
+      notify_starred_ping=None, obscure_email=None, after_issue_update=None,
+      is_site_admin=None, is_banned=None, banned_reason=None,
+      keep_people_perms_open=None, preview_on_hover=None,
+      vacation_message=None):
+    # notifications
+    if notify is not None:
+      user.notify_issue_change = notify
+    if notify_starred is not None:
+      user.notify_starred_issue_change = notify_starred
+    if notify_starred_ping is not None:
+      user.notify_starred_ping = notify_starred_ping
+    if email_compact_subject is not None:
+      user.email_compact_subject = email_compact_subject
+    if email_view_widget is not None:
+      user.email_view_widget = email_view_widget
+
+    # display options
+    if after_issue_update is not None:
+      user.after_issue_update = user_pb2.IssueUpdateNav(after_issue_update)
+    if preview_on_hover is not None:
+      user.preview_on_hover = preview_on_hover
+    if keep_people_perms_open is not None:
+      user.keep_people_perms_open = keep_people_perms_open
+
+    # misc
+    if obscure_email is not None:
+      user.obscure_email = obscure_email
+
+    # admin
+    if is_site_admin is not None:
+      user.is_site_admin = is_site_admin
+    if is_banned is not None:
+      if is_banned:
+        user.banned = banned_reason or 'No reason given'
+      else:
+        user.reset('banned')
+
+    # user availability
+    if vacation_message is not None:
+      user.vacation_message = vacation_message
+
+    return self.UpdateUser(cnxn, user_id, user)
+
+  def GetUsersPrefs(self, cnxn, user_ids, use_cache=True):
+    for user_id in user_ids:
+      if user_id not in self.prefs_dict:
+        self.prefs_dict[user_id] = user_pb2.UserPrefs(user_id=user_id)
+    return self.prefs_dict
+
+  def GetUserPrefs(self, cnxn, user_id, use_cache=True):
+    """Return a UserPrefs PB for the requested user ID."""
+    prefs_dict = self.GetUsersPrefs(cnxn, [user_id], use_cache=use_cache)
+    return prefs_dict[user_id]
+
+  def GetUserPrefsByEmail(self, cnxn, email, use_cache=True):
+    """Return a UserPrefs PB for the requested email, or an empty UserPrefs."""
+    try:
+      user_id = self.LookupUserID(cnxn, email)
+      user_prefs = self.GetUserPrefs(cnxn, user_id, use_cache=use_cache)
+    except exceptions.NoSuchUserException:
+      user_prefs = user_pb2.UserPrefs()
+    return user_prefs
+
+  def SetUserPrefs(self, cnxn, user_id, pref_values):
+    userprefs = self.GetUserPrefs(cnxn, user_id)
+    names_to_overwrite = {upv.name for upv in pref_values}
+    userprefs.prefs = [upv for upv in userprefs.prefs
+                       if upv.name not in names_to_overwrite]
+    userprefs.prefs.extend(pref_values)
+
+  def ExpungeUsers(self, cnxn, user_ids):
+    for user_id in user_ids:
+      self.test_users.pop(user_id, None)
+      self.prefs_dict.pop(user_id, None)
+      email = self.users_by_id.pop(user_id, None)
+      if email:
+        self.users_by_email.pop(email, None)
+
+    self.invite_rows = [row for row in self.invite_rows
+                        if row[0] not in user_ids and row[1] not in user_ids]
+    self.linked_account_rows = [
+        row for row in self.linked_account_rows
+        if row[0] not in user_ids and row[1] not in user_ids]
+
+  def TotalUsersCount(self, cnxn):
+    return len(self.users_by_id) - 1 if (
+        framework_constants.DELETED_USER_ID in self.users_by_id
+        ) else len(self.users_by_id)
+
+  def GetAllUserEmailsBatch(self, cnxn, limit=1000, offset=0):
+    sorted_user_ids = sorted(self.users_by_id.keys())
+    sorted_user_ids = [
+        user_id for user_id in sorted_user_ids
+        if user_id != framework_constants.DELETED_USER_ID]
+    emails = []
+    for i in range(offset, offset + limit):
+      try:
+        user_id = sorted_user_ids[i]
+        if user_id != framework_constants.DELETED_USER_ID:
+          emails.append(self.users_by_id[user_id])
+      except IndexError:
+        break
+    return emails
+
+  def GetRecentlyVisitedHotlists(self, _cnxn, user_id):
+    try:
+      return self.visited_hotlists[user_id]
+    except KeyError:
+      return []
+
+  def AddVisitedHotlist(self, _cnxn, user_id, hotlist_id, commit=True):
+    try:
+      user_visited_tuples = self.visited_hotlists[user_id]
+      self.visited_hotlists[user_id] = [
+          hid for hid in user_visited_tuples if hid != hotlist_id]
+    except KeyError:
+      self.visited_hotlists[user_id] = []
+    self.visited_hotlists[user_id].append(hotlist_id)
+
+  def ExpungeUsersHotlistsHistory(self, cnxn, user_ids, commit=True):
+    for user_id in user_ids:
+      self.visited_hotlists.pop(user_id, None)
+
+
+class AbstractStarService(object):
+  """Fake StarService."""
+
+  def __init__(self):
+    self.stars_by_item_id = {}
+    self.stars_by_starrer_id = {}
+    self.expunged_item_ids = []
+
+  def ExpungeStars(self, _cnxn, item_id, commit=True, limit=None):
+    self.expunged_item_ids.append(item_id)
+    old_starrers = self.stars_by_item_id.get(item_id, [])
+    self.stars_by_item_id[item_id] = []
+    for old_starrer in old_starrers:
+      if self.stars_by_starrer_id.get(old_starrer):
+        self.stars_by_starrer_id[old_starrer] = [
+            it for it in self.stars_by_starrer_id[old_starrer]
+            if it != item_id]
+
+  def ExpungeStarsByUsers(self, _cnxn, user_ids, limit=None):
+    for user_id in user_ids:
+      item_ids = self.stars_by_starrer_id.pop(user_id, [])
+      for item_id in item_ids:
+        starrers = self.stars_by_item_id.get(item_id, None)
+        if starrers:
+          self.stars_by_item_id[item_id] = [
+              starrer for starrer in starrers if starrer != user_id]
+
+  def LookupItemStarrers(self, _cnxn, item_id):
+    return self.stars_by_item_id.get(item_id, [])
+
+  def LookupItemsStarrers(self, cnxn, item_ids):
+    return {
+        item_id: self.LookupItemStarrers(cnxn, item_id) for item_id in item_ids}
+
+  def LookupStarredItemIDs(self, _cnxn, starrer_user_id):
+    return self.stars_by_starrer_id.get(starrer_user_id, [])
+
+  def IsItemStarredBy(self, cnxn, item_id, starrer_user_id):
+    return item_id in self.LookupStarredItemIDs(cnxn, starrer_user_id)
+
+  def CountItemStars(self, cnxn, item_id):
+    return len(self.LookupItemStarrers(cnxn, item_id))
+
+  def CountItemsStars(self, cnxn, item_ids):
+    return {item_id: self.CountItemStars(cnxn, item_id)
+            for item_id in item_ids}
+
+  def _SetStar(self, cnxn, item_id, starrer_user_id, starred):
+    if starred and not self.IsItemStarredBy(cnxn, item_id, starrer_user_id):
+      self.stars_by_item_id.setdefault(item_id, []).append(starrer_user_id)
+      self.stars_by_starrer_id.setdefault(starrer_user_id, []).append(item_id)
+
+    elif not starred and self.IsItemStarredBy(cnxn, item_id, starrer_user_id):
+      self.stars_by_item_id[item_id].remove(starrer_user_id)
+      self.stars_by_starrer_id[starrer_user_id].remove(item_id)
+
+  def SetStar(self, cnxn, item_id, starrer_user_id, starred):
+    self._SetStar(cnxn, item_id, starrer_user_id, starred)
+
+  def SetStarsBatch(
+      self, cnxn, item_id, starrer_user_ids, starred, commit=True):
+    for starrer_user_id in starrer_user_ids:
+      self._SetStar(cnxn, item_id, starrer_user_id, starred)
+
+
+class UserStarService(AbstractStarService):
+  pass
+
+
+class ProjectStarService(AbstractStarService):
+  pass
+
+
+class HotlistStarService(AbstractStarService):
+  pass
+
+
+class IssueStarService(AbstractStarService):
+
+  # pylint: disable=arguments-differ
+  def SetStar(
+      self, cnxn, services, _config, issue_id, starrer_user_id,
+      starred):
+    super(IssueStarService, self).SetStar(
+        cnxn, issue_id, starrer_user_id, starred)
+    try:
+      issue = services.issue.GetIssue(cnxn, issue_id)
+      issue.star_count += (1 if starred else -1)
+    except exceptions.NoSuchIssueException:
+      pass
+
+  # pylint: disable=arguments-differ
+  def SetStarsBatch(
+      self, cnxn, _service, _config, issue_id, starrer_user_ids,
+      starred):
+    super(IssueStarService, self).SetStarsBatch(
+        cnxn, issue_id, starrer_user_ids, starred)
+
+  def SetStarsBatch_SkipIssueUpdate(
+      self, cnxn, issue_id, starrer_user_ids, starred, commit=True):
+    super(IssueStarService, self).SetStarsBatch(
+        cnxn, issue_id, starrer_user_ids, starred)
+
+
+class ProjectService(object):
+  """Fake ProjectService object.
+
+  Provides methods for creating users and projects, which are accessible
+  through parts of the real ProjectService interface.
+  """
+
+  def __init__(self):
+    self.test_projects = {}  # project_name -> project_pb
+    self.projects_by_id = {}  # project_id -> project_pb
+    self.test_star_manager = None
+    self.indexed_projects = {}
+    self.unindexed_projects = set()
+    self.index_counter = 0
+    self.project_commitments = {}
+    self.ac_exclusion_ids = {}
+    self.no_expand_ids = {}
+
+  def TestAddProject(
+      self, name, summary='', state=project_pb2.ProjectState.LIVE,
+      owner_ids=None, committer_ids=None, contrib_ids=None,
+      issue_notify_address=None, state_reason='', description=None,
+      project_id=None, process_inbound_email=None, access=None,
+      extra_perms=None):
+    """Add a project to the fake ProjectService object.
+
+    Args:
+      name: The name of the project. Will replace any existing project under
+        the same name.
+      summary: The summary string of the project.
+      state: Initial state for the project from project_pb2.ProjectState.
+      owner_ids: List of user ids for project owners
+      committer_ids: List of user ids for project committers
+      contrib_ids: List of user ids for project contributors
+      issue_notify_address: email address to send issue change notifications
+      state_reason: string describing the reason the project is in its current
+        state.
+      description: The description string for this project
+      project_id: A unique integer identifier for the created project.
+      process_inbound_email: True to make this project accept inbound email.
+      access: One of the values of enum project_pb2.ProjectAccess.
+      extra_perms: List of ExtraPerms PBs for project members.
+
+    Returns:
+      A populated project PB.
+    """
+    proj_pb = project_pb2.Project()
+    proj_pb.project_id = project_id or hash(name) % 100000
+    proj_pb.project_name = name
+    proj_pb.summary = summary
+    proj_pb.state = state
+    proj_pb.state_reason = state_reason
+    proj_pb.extra_perms = extra_perms or []
+    if description is not None:
+      proj_pb.description = description
+
+    self.TestAddProjectMembers(owner_ids, proj_pb, OWNER_ROLE)
+    self.TestAddProjectMembers(committer_ids, proj_pb, COMMITTER_ROLE)
+    self.TestAddProjectMembers(contrib_ids, proj_pb, CONTRIBUTOR_ROLE)
+
+    if issue_notify_address is not None:
+      proj_pb.issue_notify_address = issue_notify_address
+    if process_inbound_email is not None:
+      proj_pb.process_inbound_email = process_inbound_email
+    if access is not None:
+      proj_pb.access = access
+
+    self.test_projects[name] = proj_pb
+    self.projects_by_id[proj_pb.project_id] = proj_pb
+    return proj_pb
+
+  def TestAddProjectMembers(self, user_id_list, proj_pb, role):
+    if user_id_list is not None:
+      for user_id in user_id_list:
+        if role == OWNER_ROLE:
+          proj_pb.owner_ids.append(user_id)
+        elif role == COMMITTER_ROLE:
+          proj_pb.committer_ids.append(user_id)
+        elif role == CONTRIBUTOR_ROLE:
+          proj_pb.contributor_ids.append(user_id)
+
+  def LookupProjectIDs(self, cnxn, project_names):
+    return {
+        project_name: self.test_projects[project_name].project_id
+        for project_name in project_names
+        if project_name in self.test_projects}
+
+  def LookupProjectNames(self, cnxn, project_ids):
+    projects_dict = self.GetProjects(cnxn, project_ids)
+    return {p.project_id: p.project_name
+            for p in projects_dict.values()}
+
+  def CreateProject(
+      self, _cnxn, project_name, owner_ids, committer_ids,
+      contributor_ids, summary, description,
+      state=project_pb2.ProjectState.LIVE, access=None,
+      read_only_reason=None,
+      home_page=None, docs_url=None, source_url=None,
+      logo_gcs_id=None, logo_file_name=None):
+    """Create and store a Project with the given attributes."""
+    if project_name in self.test_projects:
+      raise exceptions.ProjectAlreadyExists()
+    project = self.TestAddProject(
+        project_name, summary=summary, state=state,
+        owner_ids=owner_ids, committer_ids=committer_ids,
+        contrib_ids=contributor_ids, description=description,
+        access=access)
+    return project.project_id
+
+  def ExpungeProject(self, _cnxn, project_id):
+    project = self.projects_by_id.get(project_id)
+    if project:
+      self.test_projects.pop(project.project_name, None)
+
+  def GetProjectsByName(self, _cnxn, project_name_list, use_cache=True):
+    return {
+        pn: self.test_projects[pn] for pn in project_name_list
+        if pn in self.test_projects}
+
+  def GetProjectByName(self, _cnxn, name, use_cache=True):
+    return self.test_projects.get(name)
+
+  def GetProjectList(self, cnxn, project_id_list, use_cache=True):
+    project_dict = self.GetProjects(cnxn, project_id_list, use_cache=use_cache)
+    return [project_dict[pid] for pid in project_id_list
+            if pid in project_dict]
+
+  def GetVisibleLiveProjects(
+      self, _cnxn, logged_in_user, effective_ids, domain=None, use_cache=True):
+    project_ids = list(self.projects_by_id.keys())
+    visible_project_ids = []
+    for pid in project_ids:
+      can_view = permissions.UserCanViewProject(
+          logged_in_user, effective_ids, self.projects_by_id[pid])
+      different_domain = framework_helpers.GetNeededDomain(
+          self.projects_by_id[pid].project_name, domain)
+      if can_view and not different_domain:
+        visible_project_ids.append(pid)
+
+    return visible_project_ids
+
+  def GetProjects(self, _cnxn, project_ids, use_cache=True):
+    result = {}
+    for project_id in project_ids:
+      project = self.projects_by_id.get(project_id)
+      if project:
+        result[project_id] = project
+      else:
+        raise exceptions.NoSuchProjectException(project_id)
+    return result
+
+  def GetAllProjects(self, _cnxn, use_cache=True):
+    result = {}
+    for project_id in self.projects_by_id:
+      project = self.projects_by_id.get(project_id)
+      result[project_id] = project
+    return result
+
+
+  def GetProject(self, cnxn, project_id, use_cache=True):
+    """Load the specified project from the database."""
+    project_id_dict = self.GetProjects(cnxn, [project_id], use_cache=use_cache)
+    if project_id not in project_id_dict:
+      raise exceptions.NoSuchProjectException()
+    return project_id_dict[project_id]
+
+  def GetProjectCommitments(self, _cnxn, project_id):
+    if project_id in self.project_commitments:
+      return self.project_commitments[project_id]
+
+    project_commitments = project_pb2.ProjectCommitments()
+    project_commitments.project_id = project_id
+    return project_commitments
+
+  def TestStoreProjectCommitments(self, project_commitments):
+    key = project_commitments.project_id
+    self.project_commitments[key] = project_commitments
+
+  def GetProjectAutocompleteExclusion(self, cnxn, project_id):
+    return (self.ac_exclusion_ids.get(project_id, []),
+            self.no_expand_ids.get(project_id, []))
+
+  def UpdateProject(
+      self,
+      _cnxn,
+      project_id,
+      summary=None,
+      description=None,
+      state=None,
+      state_reason=None,
+      access=None,
+      issue_notify_address=None,
+      attachment_bytes_used=None,
+      attachment_quota=None,
+      moved_to=None,
+      process_inbound_email=None,
+      only_owners_remove_restrictions=None,
+      read_only_reason=None,
+      cached_content_timestamp=None,
+      only_owners_see_contributors=None,
+      delete_time=None,
+      recent_activity=None,
+      revision_url_format=None,
+      home_page=None,
+      docs_url=None,
+      source_url=None,
+      logo_gcs_id=None,
+      logo_file_name=None,
+      issue_notify_always_detailed=None,
+      commit=True):
+    project = self.projects_by_id.get(project_id)
+    if not project:
+      raise exceptions.NoSuchProjectException(
+          'Project "%s" not found!' % project_id)
+
+    # TODO(jrobbins): implement all passed arguments - probably as a utility
+    # method shared with the real persistence implementation.
+    if read_only_reason is not None:
+      project.read_only_reason = read_only_reason
+    if attachment_bytes_used is not None:
+      project.attachment_bytes_used = attachment_bytes_used
+
+  def UpdateProjectRoles(
+      self, _cnxn, project_id, owner_ids, committer_ids,
+      contributor_ids, now=None):
+    project = self.projects_by_id.get(project_id)
+    if not project:
+      raise exceptions.NoSuchProjectException(
+          'Project "%s" not found!' % project_id)
+
+    project.owner_ids = owner_ids
+    project.committer_ids = committer_ids
+    project.contributor_ids = contributor_ids
+
+  def MarkProjectDeletable(
+      self, _cnxn, project_id, _config_service):
+    project = self.projects_by_id[project_id]
+    project.project_name = 'DELETABLE_%d' % project_id
+    project.state = project_pb2.ProjectState.DELETABLE
+
+  def UpdateRecentActivity(self, _cnxn, _project_id, now=None):
+    pass
+
+  def GetUserRolesInAllProjects(self, _cnxn, effective_ids):
+    owned_project_ids = set()
+    membered_project_ids = set()
+    contrib_project_ids = set()
+
+    for project in self.projects_by_id.values():
+      if not effective_ids.isdisjoint(project.owner_ids):
+        owned_project_ids.add(project.project_id)
+      elif not effective_ids.isdisjoint(project.committer_ids):
+        membered_project_ids.add(project.project_id)
+      elif not effective_ids.isdisjoint(project.contributor_ids):
+        contrib_project_ids.add(project.project_id)
+
+    return owned_project_ids, membered_project_ids, contrib_project_ids
+
+  def GetProjectMemberships(self, _cnxn, effective_ids, use_cache=True):
+    # type: MonorailConnection, Collection[int], bool ->
+    #     Mapping[int, Collection[int]]
+    projects_by_user_id = collections.defaultdict(set)
+
+    for project in self.projects_by_id.values():
+      member_ids = set(
+          itertools.chain(
+              project.owner_ids, project.committer_ids,
+              project.contributor_ids))
+      for user_id in effective_ids:
+        if user_id in member_ids:
+          projects_by_user_id[user_id].add(project.project_id)
+    return projects_by_user_id
+
+  def ExpungeUsersInProjects(self, cnxn, user_ids, limit=None):
+    for project in self.projects_by_id.values():
+      project.owner_ids = [owner_id for owner_id in project.owner_ids
+                           if owner_id not in user_ids]
+      project.committer_ids = [com_id for com_id in project.committer_ids
+                              if com_id not in user_ids]
+      project.contributor_ids = [con_id for con_id in project.contributor_ids
+                                 if con_id not in user_ids]
+
+
+class ConfigService(object):
+  """Fake version of ConfigService that just works in-RAM."""
+
+  def __init__(self, user_id=None):
+    self.project_configs = {}
+    self.next_field_id = 123
+    self.next_component_id = 345
+    self.next_template_id = 23
+    self.expunged_configs = []
+    self.expunged_users_in_configs = []
+    self.component_ids_to_templates = {}
+    self.label_to_id = {}
+    self.id_to_label = {}
+    self.strict = False  # Set true to raise more exceptions like real class.
+
+  def TestAddLabelsDict(self, label_to_id):
+    self.label_to_id = label_to_id
+    self.id_to_label = {
+        label_id: label
+        for label, label_id in list(self.label_to_id.items())}
+
+  def TestAddFieldDef(self, fd):
+    self.project_configs[fd.project_id].field_defs.append(fd)
+
+  def TestAddApprovalDef(self, ad, project_id):
+    self.project_configs[project_id].approval_defs.append(ad)
+
+  def ExpungeConfig(self, _cnxn, project_id):
+    self.expunged_configs.append(project_id)
+
+  def ExpungeUsersInConfigs(self, _cnxn, user_ids, limit=None):
+    self.expunged_users_in_configs.extend(user_ids)
+
+  def GetLabelDefRows(self, cnxn, project_id, use_cache=True):
+    """This always returns empty results.  Mock it to test other cases."""
+    return []
+
+  def GetLabelDefRowsAnyProject(self, cnxn, where=None):
+    """This always returns empty results.  Mock it to test other cases."""
+    return []
+
+  def LookupLabel(self, cnxn, project_id, label_id):
+    if label_id in self.id_to_label:
+      return self.id_to_label[label_id]
+    if label_id == 999:
+      return None
+    return 'label_%d_%d' % (project_id, label_id)
+
+  def LookupLabelID(self, cnxn, project_id, label, autocreate=True):
+    if label in self.label_to_id:
+      return self.label_to_id[label]
+    return 1
+
+  def LookupLabelIDs(self, cnxn, project_id, labels, autocreate=False):
+    ids = []
+    next_label_id = 0
+    if self.id_to_label.keys():
+      existing_ids = self.id_to_label.keys()
+      existing_ids.sort()
+      next_label_id = existing_ids[-1] + 1
+    for label in labels:
+      if self.label_to_id.get(label) is not None:
+        ids.append(self.label_to_id[label])
+      elif autocreate:
+        self.label_to_id[label] = next_label_id
+        self.id_to_label[next_label_id] = label
+        ids.append(next_label_id)
+        next_label_id += 1
+    return ids
+
+  def LookupIDsOfLabelsMatching(self, cnxn, project_id, regex):
+    return [1, 2, 3]
+
+  def LookupStatus(self, cnxn, project_id, status_id):
+    return 'status_%d_%d' % (project_id, status_id)
+
+  def LookupStatusID(self, cnxn, project_id, status, autocreate=True):
+    if status:
+      return 1
+    else:
+      return 0
+
+  def LookupStatusIDs(self, cnxn, project_id, statuses):
+    return [idx for idx, _status in enumerate(statuses)]
+
+  def LookupClosedStatusIDs(self, cnxn, project_id):
+    return [7, 8, 9]
+
+  def StoreConfig(self, _cnxn, config):
+    self.project_configs[config.project_id] = config
+
+  def GetProjectConfig(self, _cnxn, project_id, use_cache=True):
+    if project_id in self.project_configs:
+      return self.project_configs[project_id]
+    elif self.strict:
+      raise exceptions.NoSuchProjectException()
+    else:
+      return tracker_bizobj.MakeDefaultProjectIssueConfig(project_id)
+
+  def GetProjectConfigs(self, _cnxn, project_ids, use_cache=True):
+    config_dict = {}
+    for project_id in project_ids:
+      if project_id in self.project_configs:
+        config_dict[project_id] = self.project_configs[project_id]
+      elif not self.strict:
+        config_dict[project_id] = tracker_bizobj.MakeDefaultProjectIssueConfig(
+            project_id)
+    return config_dict
+
+  def UpdateConfig(
+      self, cnxn, project, well_known_statuses=None,
+      statuses_offer_merge=None, well_known_labels=None,
+      excl_label_prefixes=None, default_template_for_developers=None,
+      default_template_for_users=None, list_prefs=None, restrict_to_known=None,
+      approval_defs=None):
+    project_id = project.project_id
+    project_config = self.GetProjectConfig(cnxn, project_id, use_cache=False)
+
+    if well_known_statuses is not None:
+      tracker_bizobj.SetConfigStatuses(project_config, well_known_statuses)
+
+    if statuses_offer_merge is not None:
+      project_config.statuses_offer_merge = statuses_offer_merge
+
+    if well_known_labels is not None:
+      tracker_bizobj.SetConfigLabels(project_config, well_known_labels)
+
+    if excl_label_prefixes is not None:
+      project_config.exclusive_label_prefixes = excl_label_prefixes
+
+    if approval_defs is not None:
+      tracker_bizobj.SetConfigApprovals(project_config, approval_defs)
+
+    if default_template_for_developers is not None:
+      project_config.default_template_for_developers = (
+          default_template_for_developers)
+    if default_template_for_users is not None:
+      project_config.default_template_for_users = default_template_for_users
+
+    if list_prefs:
+      default_col_spec, default_sort_spec, x_attr, y_attr, m_d_q = list_prefs
+      project_config.default_col_spec = default_col_spec
+      project_config.default_sort_spec = default_sort_spec
+      project_config.default_x_attr = x_attr
+      project_config.default_y_attr = y_attr
+      project_config.member_default_query = m_d_q
+
+    if restrict_to_known is not None:
+      project_config.restrict_to_known = restrict_to_known
+
+    self.StoreConfig(cnxn, project_config)
+    return project_config
+
+  def CreateFieldDef(
+      self,
+      cnxn,
+      project_id,
+      field_name,
+      field_type_str,
+      applic_type,
+      applic_pred,
+      is_required,
+      is_niche,
+      is_multivalued,
+      min_value,
+      max_value,
+      regex,
+      needs_member,
+      needs_perm,
+      grants_perm,
+      notify_on,
+      date_action_str,
+      docstring,
+      admin_ids,
+      editor_ids,
+      approval_id=None,
+      is_phase_field=False,
+      is_restricted_field=False):
+    config = self.GetProjectConfig(cnxn, project_id)
+    field_type = tracker_pb2.FieldTypes(field_type_str)
+    field_id = self.next_field_id
+    self.next_field_id += 1
+    fd = tracker_bizobj.MakeFieldDef(
+        field_id, project_id, field_name, field_type, applic_type, applic_pred,
+        is_required, is_niche, is_multivalued, min_value, max_value, regex,
+        needs_member, needs_perm, grants_perm, notify_on, date_action_str,
+        docstring, False, approval_id, is_phase_field, is_restricted_field,
+        admin_ids=admin_ids, editor_ids=editor_ids)
+    config.field_defs.append(fd)
+    self.StoreConfig(cnxn, config)
+    return field_id
+
+  def LookupFieldID(self, cnxn, project_id, field):
+    config = self.GetProjectConfig(cnxn, project_id)
+    for fd in config.field_defs:
+      if fd.field_name == field:
+        return fd.field_id
+
+    return None
+
+  def SoftDeleteFieldDefs(self, cnxn, project_id, field_ids):
+    config = self.GetProjectConfig(cnxn, project_id)
+    for fd in config.field_defs:
+      if fd.field_id in field_ids:
+        fd.is_deleted = True
+    self.StoreConfig(cnxn, config)
+
+  def UpdateFieldDef(
+      self,
+      cnxn,
+      project_id,
+      field_id,
+      field_name=None,
+      applicable_type=None,
+      applicable_predicate=None,
+      is_required=None,
+      is_niche=None,
+      is_multivalued=None,
+      min_value=None,
+      max_value=None,
+      regex=None,
+      needs_member=None,
+      needs_perm=None,
+      grants_perm=None,
+      notify_on=None,
+      date_action=None,
+      docstring=None,
+      admin_ids=None,
+      editor_ids=None,
+      is_restricted_field=None):
+    config = self.GetProjectConfig(cnxn, project_id)
+    fd = tracker_bizobj.FindFieldDefByID(field_id, config)
+    # pylint: disable=multiple-statements
+    if field_name is not None: fd.field_name = field_name
+    if applicable_type is not None: fd.applicable_type = applicable_type
+    if applicable_predicate is not None:
+      fd.applicable_predicate = applicable_predicate
+    if is_required is not None: fd.is_required = is_required
+    if is_niche is not None: fd.is_niche = is_niche
+    if is_multivalued is not None: fd.is_multivalued = is_multivalued
+    if min_value is not None: fd.min_value = min_value
+    if max_value is not None: fd.max_value = max_value
+    if regex is not None: fd.regex = regex
+    if date_action is not None:
+      fd.date_action = config_svc.DATE_ACTION_ENUM.index(date_action)
+    if docstring is not None: fd.docstring = docstring
+    if admin_ids is not None: fd.admin_ids = admin_ids
+    if editor_ids is not None:
+      fd.editor_ids = editor_ids
+    if is_restricted_field is not None:
+      fd.is_restricted_field = is_restricted_field
+    self.StoreConfig(cnxn, config)
+
+  def CreateComponentDef(
+      self, cnxn, project_id, path, docstring, deprecated, admin_ids, cc_ids,
+      created, creator_id, label_ids):
+    config = self.GetProjectConfig(cnxn, project_id)
+    cd = tracker_bizobj.MakeComponentDef(
+        self.next_component_id, project_id, path, docstring, deprecated,
+        admin_ids, cc_ids, created, creator_id, label_ids=label_ids)
+    config.component_defs.append(cd)
+    self.next_component_id += 1
+    self.StoreConfig(cnxn, config)
+    return self.next_component_id - 1
+
+  def UpdateComponentDef(
+      self, cnxn, project_id, component_id, path=None, docstring=None,
+      deprecated=None, admin_ids=None, cc_ids=None, created=None,
+      creator_id=None, modified=None, modifier_id=None, label_ids=None):
+    config = self.GetProjectConfig(cnxn, project_id)
+    cd = tracker_bizobj.FindComponentDefByID(component_id, config)
+    if path is not None:
+      assert path
+      cd.path = path
+    # pylint: disable=multiple-statements
+    if docstring is not None: cd.docstring = docstring
+    if deprecated is not None: cd.deprecated = deprecated
+    if admin_ids is not None: cd.admin_ids = admin_ids
+    if cc_ids is not None: cd.cc_ids = cc_ids
+    if created is not None: cd.created = created
+    if creator_id is not None: cd.creator_id = creator_id
+    if modified is not None: cd.modified = modified
+    if modifier_id is not None: cd.modifier_id = modifier_id
+    if label_ids is not None: cd.label_ids = label_ids
+    self.StoreConfig(cnxn, config)
+
+  def DeleteComponentDef(self, cnxn, project_id, component_id):
+    """Delete the specified component definition."""
+    config = self.GetProjectConfig(cnxn, project_id)
+    config.component_defs = [
+        cd for cd in config.component_defs
+        if cd.component_id != component_id]
+    self.StoreConfig(cnxn, config)
+
+  def InvalidateMemcache(self, issues, key_prefix=''):
+    pass
+
+  def InvalidateMemcacheForEntireProject(self, project_id):
+    pass
+
+
+class IssueService(object):
+  """Fake version of IssueService that just works in-RAM."""
+  # pylint: disable=unused-argument
+
+  def __init__(self, user_id=None):
+    self.user_id = user_id
+    # Dictionary {project_id: issue_pb_dict}
+    # where issue_pb_dict is a dictionary of the form
+    # {local_id: issue_pb}
+    self.issues_by_project = {}
+    self.issues_by_iid = {}
+    # Dictionary {project_id: comment_pb_dict}
+    # where comment_pb_dict is a dictionary of the form
+    # {local_id: comment_pb_list}
+    self.comments_by_project = {}
+    self.comments_by_iid = {}
+    self.comments_by_cid = {}
+    self.attachments_by_id = {}
+
+    # Set of issue IDs for issues that have been indexed by calling
+    # IndexIssues().
+    self.indexed_issue_iids = set()
+
+    # Set of issue IDs for issues that have been moved by calling MoveIssue().
+    self.moved_back_iids = set()
+
+    # Dict of issue IDs mapped to other issue IDs to represent moved issues.
+    self.moved_issues = {}
+
+    # Test-only indication that the indexer would have been called
+    # by the real DITPersist.
+    self.indexer_called = False
+
+    # Test-only sequence of updated and enqueued.
+    self.updated_issues = []
+    self.enqueued_issues = []  # issue_ids
+
+    # Test-only sequence of expunged issues and projects.
+    self.expunged_issues = []
+    self.expunged_former_locations = []
+    self.expunged_local_ids = []
+    self.expunged_users_in_issues = []
+
+    # Test-only indicators that methods were called.
+    self.get_all_issues_in_project_called = False
+    self.update_issues_called = False
+    self.enqueue_issues_called = False
+    self.get_issue_acitivity_called = False
+
+    # The next id to return if it is > 0.
+    self.next_id = -1
+
+  def UpdateIssues(
+      self, cnxn, issues, update_cols=None, just_derived=False,
+      commit=True, invalidate=True):
+    self.update_issues_called = True
+    assert all(issue.assume_stale == False for issue in issues)
+    self.updated_issues.extend(issues)
+
+  def GetIssueActivity(
+      self, cnxn, num=50, before=None, after=None,
+      project_ids=None, user_ids=None, ascending=False):
+    self.get_issue_acitivity_called = True
+    comments_dict = self.comments_by_cid
+    comments = []
+    for value in comments_dict.values():
+      if project_ids is not None:
+        if value.issue_id > 0 and value.issue_id in self.issues_by_iid:
+          issue = self.issues_by_iid[value.issue_id]
+          if issue.project_id in project_ids:
+            comments.append(value)
+      elif user_ids is not None:
+        if value.user_id in user_ids:
+          comments.append(value)
+      else:
+        comments.append(value)
+    return comments
+
+  def EnqueueIssuesForIndexing(self, _cnxn, issue_ids, commit=True):
+    self.enqueue_issues_called = True
+    for i in issue_ids:
+      if i not in self.enqueued_issues:
+        self.enqueued_issues.extend(issues)
+
+  def ExpungeIssues(self, _cnxn, issue_ids):
+    self.expunged_issues.extend(issue_ids)
+
+  def ExpungeFormerLocations(self, _cnxn, project_id):
+    self.expunged_former_locations.append(project_id)
+
+  def ExpungeLocalIDCounters(self, _cnxn, project_id):
+    self.expunged_local_ids.append(project_id)
+
+  def TestAddIssue(self, issue, importer_id=None):
+    project_id = issue.project_id
+    self.issues_by_project.setdefault(project_id, {})
+    self.issues_by_project[project_id][issue.local_id] = issue
+    self.issues_by_iid[issue.issue_id] = issue
+    if issue.issue_id not in self.enqueued_issues:
+      self.enqueued_issues.append(issue.issue_id)
+      self.enqueue_issues_called = True
+
+    # Adding a new issue should add the first comment to the issue
+    comment = tracker_pb2.IssueComment()
+    comment.project_id = issue.project_id
+    comment.issue_id = issue.issue_id
+    comment.content = issue.summary
+    comment.timestamp = issue.opened_timestamp
+    comment.is_description = True
+    if issue.reporter_id:
+      comment.user_id = issue.reporter_id
+    if importer_id:
+      comment.importer_id = importer_id
+    comment.sequence = 0
+    self.TestAddComment(comment, issue.local_id)
+
+  def TestAddMovedIssueRef(self, source_project_id, source_local_id,
+      target_project_id, target_local_id):
+    self.moved_issues[(source_project_id, source_local_id)] = (
+        target_project_id, target_local_id)
+
+  def TestAddComment(self, comment, local_id):
+    pid = comment.project_id
+    if not comment.id:
+      comment.id = len(self.comments_by_cid)
+
+    self.comments_by_project.setdefault(pid, {})
+    self.comments_by_project[pid].setdefault(local_id, []).append(comment)
+    self.comments_by_iid.setdefault(comment.issue_id, []).append(comment)
+    self.comments_by_cid[comment.id] = comment
+
+  def TestAddAttachment(self, attachment, comment_id, issue_id):
+    if not attachment.attachment_id:
+      attachment.attachment_id = len(self.attachments_by_id)
+
+    aid = attachment.attachment_id
+    self.attachments_by_id[aid] = attachment, comment_id, issue_id
+    comment = self.comments_by_cid[comment_id]
+    if attachment not in comment.attachments:
+      comment.attachments.extend([attachment])
+
+  def SoftDeleteAttachment(
+      self, _cnxn, _issue, comment, attach_id, _user_service, delete=True,
+      index_now=False):
+    attachment = None
+    for attach in comment.attachments:
+      if attach.attachment_id == attach_id:
+        attachment = attach
+    if not attachment:
+      return
+    attachment.deleted = delete
+
+  def GetAttachmentAndContext(self, _cnxn, attachment_id):
+    if attachment_id in self.attachments_by_id:
+      attach, comment_id, issue_id = self.attachments_by_id[attachment_id]
+      if not attach.deleted:
+        return attach, comment_id, issue_id
+
+    raise exceptions.NoSuchAttachmentException()
+
+  def GetComments(
+      self, _cnxn, where=None, order_by=None, content_only=False, **kwargs):
+    # This is a very limited subset of what the real GetComments() can do.
+    cid = kwargs.get('id')
+
+    comment = self.comments_by_cid.get(cid)
+    if comment:
+      return [comment]
+    else:
+      return []
+
+  def GetComment(self, cnxn, comment_id):
+    """Get the requested comment, or raise an exception."""
+    comments = self.GetComments(cnxn, id=comment_id)
+    if len(comments) == 1:
+      return comments[0]
+
+    raise exceptions.NoSuchCommentException()
+
+  def ResolveIssueRefs(self, cnxn, ref_projects, default_project_name, refs):
+    result = []
+    misses = []
+    for project_name, local_id in refs:
+      project = ref_projects.get(project_name or default_project_name)
+      if not project or project.state == project_pb2.ProjectState.DELETABLE:
+        continue  # ignore any refs to issues in deleted projects
+      try:
+        issue = self.GetIssueByLocalID(cnxn, project.project_id, local_id)
+        result.append(issue.issue_id)
+      except exceptions.NoSuchIssueException:
+        misses.append((project.project_id, local_id))
+
+    return result, misses
+
+  def LookupIssueRefs(self, cnxn, issue_ids):
+    issue_dict, _misses = self.GetIssuesDict(cnxn, issue_ids)
+    return {
+      issue_id: (issue.project_name, issue.local_id)
+      for issue_id, issue in issue_dict.items()}
+
+  def GetAllIssuesInProject(
+      self, _cnxn, project_id, min_local_id=None, use_cache=True):
+    self.get_all_issues_in_project_called = True
+    if project_id in self.issues_by_project:
+      return list(self.issues_by_project[project_id].values())
+    else:
+      return []
+
+  def GetIssuesByLocalIDs(
+      self, _cnxn, project_id, local_id_list, use_cache=True, shard_id=None):
+    results = []
+    for local_id in local_id_list:
+      if (project_id in self.issues_by_project
+          and local_id in self.issues_by_project[project_id]):
+        results.append(self.issues_by_project[project_id][local_id])
+
+    return results
+
+  def GetIssueByLocalID(self, _cnxn, project_id, local_id, use_cache=True):
+    try:
+      return self.issues_by_project[project_id][local_id]
+    except KeyError:
+      raise exceptions.NoSuchIssueException()
+
+  def GetAnyOnHandIssue(self, issue_ids, start=None, end=None):
+    return None  # Treat them all like misses.
+
+  def GetIssue(self, cnxn, issue_id, use_cache=True):
+    issues = self.GetIssues(cnxn, [issue_id], use_cache=use_cache)
+    try:
+      return issues[0]
+    except IndexError:
+      raise exceptions.NoSuchIssueException()
+
+  def GetCurrentLocationOfMovedIssue(self, cnxn, project_id, local_id):
+    key = (project_id, local_id)
+    if key in self.moved_issues:
+      ref = self.moved_issues[key]
+      return ref[0], ref[1]
+    return None, None
+
+  def GetPreviousLocations(self, cnxn, issue):
+    return []
+
+  def GetCommentsByUser(self, cnxn, user_id):
+    """Get all comments created by a user"""
+    comments = []
+    for cid in self.comments_by_cid:
+      comment = self.comments_by_cid[cid]
+      if comment.user_id == user_id and not comment.is_description:
+        comments.append(comment)
+    return comments
+
+  def GetCommentsByID(self, cnxn, comment_ids, _sequences, use_cache=True,
+      shard_id=None):
+    """Return all IssueComment PBs by comment ids."""
+    comments = [self.comments_by_cid[cid] for cid in comment_ids]
+    return comments
+
+  def GetIssueIDsReportedByUser(self, cnxn, user_id):
+    """Get all issues created by a user"""
+    ids = []
+    for iid in self.issues_by_iid:
+      issue = self.issues_by_iid[iid]
+      if issue.reporter_id == user_id:
+        ids.append(iid)
+    return ids
+
+  def LookupIssueIDs(self, _cnxn, project_local_id_pairs):
+    hits = []
+    misses = []
+    for (project_id, local_id) in project_local_id_pairs:
+      try:
+        issue = self.issues_by_project[project_id][local_id]
+        hits.append(issue.issue_id)
+      except KeyError:
+        misses.append((project_id, local_id))
+
+    return hits, misses
+
+  def LookupIssueIDsFollowMoves(self, _cnxn, project_local_id_pairs):
+    hits = []
+    misses = []
+    for pair in project_local_id_pairs:
+      project_id, local_id = self.moved_issues.get(pair, pair)
+      try:
+        issue = self.issues_by_project[project_id][local_id]
+        hits.append(issue.issue_id)
+      except KeyError:
+        misses.append((project_id, local_id))
+
+    return hits, misses
+
+  def LookupIssueID(self, _cnxn, project_id, local_id):
+    try:
+      issue = self.issues_by_project[project_id][local_id]
+    except KeyError:
+      raise exceptions.NoSuchIssueException()
+    return issue.issue_id
+
+  def GetCommentsForIssue(self, _cnxn, issue_id):
+    comments = self.comments_by_iid.get(issue_id, [])
+    for idx, c in enumerate(comments):
+      c.sequence = idx
+
+    return comments
+
+  def InsertIssue(self, cnxn, issue):
+    issue.issue_id = issue.project_id * 1000000 + issue.local_id
+    self.issues_by_project.setdefault(issue.project_id, {})
+    self.issues_by_project[issue.project_id][issue.local_id] = issue
+    self.issues_by_iid[issue.issue_id] = issue
+    return issue.issue_id
+
+  def CreateIssue(
+      self,
+      cnxn,
+      services,
+      issue,
+      marked_description,
+      attachments=None,
+      index_now=False,
+      importer_id=None):
+    project_id = issue.project_id
+
+    issue.local_id = self.AllocateNextLocalID(cnxn, project_id)
+    issue.issue_id = project_id * 1000000 + issue.local_id
+
+    self.TestAddIssue(issue, importer_id=importer_id)
+    comment = self.comments_by_iid[issue.issue_id][0]
+    comment.content = marked_description
+    return issue, comment
+
+  def GetIssueApproval(self, cnxn, issue_id, approval_id, use_cache=True):
+    issue = self.GetIssue(cnxn, issue_id, use_cache=use_cache)
+    approval = tracker_bizobj.FindApprovalValueByID(
+        approval_id, issue.approval_values)
+    if approval:
+      return issue, approval
+    raise exceptions.NoSuchIssueApprovalException()
+
+  def UpdateIssueApprovalStatus(
+      self, cnxn, issue_id, approval_id, status, setter_id, set_on,
+      commit=True):
+    issue = self.GetIssue(cnxn, issue_id)
+    for av in issue.approval_values:
+      if av.approval_id == approval_id:
+        av.status = status
+        av.setter_id = setter_id
+        av.set_on = set_on
+        return
+    return
+
+  def UpdateIssueApprovalApprovers(
+      self, cnxn, issue_id, approval_id, approver_ids, commit=True):
+    issue = self.GetIssue(cnxn, issue_id)
+    for av in issue.approval_values:
+      if av.approval_id == approval_id:
+        av.approver_ids = approver_ids
+        return
+    return
+
+  def UpdateIssueStructure(
+      self, cnxn, config, issue, template, reporter_id, comment_content,
+      commit=True, invalidate=True):
+    approval_defs_by_id = {ad.approval_id: ad for ad in config.approval_defs}
+    issue_avs_by_id = {av.approval_id: av for av in issue.approval_values}
+
+    new_issue_approvals = []
+
+    for template_av in template.approval_values:
+      existing_issue_av = issue_avs_by_id.get(template_av.approval_id)
+      # Keep approval values as-if fi it exists in issue and template
+      if existing_issue_av:
+        existing_issue_av.phase_id = template_av.phase_id
+        new_issue_approvals.append(existing_issue_av)
+      else:
+        new_issue_approvals.append(template_av)
+
+      # Update all approval surveys so latest ApprovalDef survey changes
+      # appear in the converted issue's approval values.
+      ad = approval_defs_by_id.get(template_av.approval_id)
+      if ad:
+        self.CreateIssueComment(
+            cnxn, issue, reporter_id, ad.survey,
+            is_description=True, approval_id=ad.approval_id, commit=False)
+      else:
+        logging.info('ApprovalDef not found for approval %r', template_av)
+
+    template_phase_by_name = {
+        phase.name.lower(): phase for phase in template.phases}
+    issue_phase_by_id = {phase.phase_id: phase for phase in issue.phases}
+    updated_fvs = []
+    # Trim issue FieldValues or update FieldValue phase_ids
+    for fv in issue.field_values:
+      # If a fv's phase has the same name as a template's phase, update
+      # the fv's phase_id to that of the template phase's. Otherwise,
+      # remove the fv.
+      if fv.phase_id:
+        issue_phase = issue_phase_by_id.get(fv.phase_id)
+        if issue_phase and issue_phase.name:
+          template_phase = template_phase_by_name.get(issue_phase.name.lower())
+          if template_phase:
+            fv.phase_id = template_phase.phase_id
+            updated_fvs.append(fv)
+      # keep all fvs that do not belong to phases.
+      else:
+        updated_fvs.append(fv)
+
+    fd_names_by_id = {fd.field_id: fd.field_name for fd in config.field_defs}
+    amendment = tracker_bizobj.MakeApprovalStructureAmendment(
+        [fd_names_by_id.get(av.approval_id) for av in new_issue_approvals],
+        [fd_names_by_id.get(av.approval_id) for av in issue.approval_values])
+
+    issue.approval_values = new_issue_approvals
+    issue.phases = template.phases
+    issue.field_values = updated_fvs
+
+    return self.CreateIssueComment(
+        cnxn, issue, reporter_id, comment_content,
+        amendments=[amendment], commit=False)
+
+  def SetUsedLocalID(self, cnxn, project_id):
+    self.next_id = self.GetHighestLocalID(cnxn, project_id) + 1
+
+  def AllocateNextLocalID(self, cnxn, project_id):
+    return self.GetHighestLocalID(cnxn, project_id) + 1
+
+  def GetHighestLocalID(self, _cnxn, project_id):
+    if self.next_id > 0:
+      return self.next_id - 1
+    else:
+      issue_dict = self.issues_by_project.get(project_id, {})
+      highest = max([0] + [issue.local_id for issue in issue_dict.values()])
+      return highest
+
+  def _MakeIssueComment(
+      self, project_id, user_id, content, inbound_message=None,
+      amendments=None, attachments=None, kept_attachments=None, timestamp=None,
+      is_spam=False, is_description=False, approval_id=None, importer_id=None):
+    comment = tracker_pb2.IssueComment()
+    comment.project_id = project_id
+    comment.user_id = user_id
+    comment.content = content or ''
+    comment.is_spam = is_spam
+    comment.is_description = is_description
+    if not timestamp:
+      timestamp = int(time.time())
+    comment.timestamp = int(timestamp)
+    if inbound_message:
+      comment.inbound_message = inbound_message
+    if amendments:
+      comment.amendments.extend(amendments)
+    if approval_id:
+      comment.approval_id = approval_id
+    if importer_id:
+      comment.importer_id = importer_id
+    return comment
+
+  def CopyIssues(self, cnxn, dest_project, issues, user_service, copier_id):
+    created_issues = []
+    for target_issue in issues:
+      new_issue = tracker_pb2.Issue()
+      new_issue.project_id = dest_project.project_id
+      new_issue.project_name = dest_project.project_name
+      new_issue.summary = target_issue.summary
+      new_issue.labels.extend(target_issue.labels)
+      new_issue.field_values.extend(target_issue.field_values)
+      new_issue.reporter_id = copier_id
+
+      timestamp = int(time.time())
+      new_issue.opened_timestamp = timestamp
+      new_issue.modified_timestamp = timestamp
+
+      target_comments = self.GetCommentsForIssue(cnxn, target_issue.issue_id)
+      initial_summary_comment = target_comments[0]
+
+      # Note that blocking and merge_into are not copied.
+      new_issue.blocked_on_iids = target_issue.blocked_on_iids
+      new_issue.blocked_on_ranks = target_issue.blocked_on_ranks
+
+      # Create the same summary comment as the target issue.
+      comment = self._MakeIssueComment(
+          dest_project.project_id, copier_id, initial_summary_comment.content,
+          is_description=True)
+
+      new_issue.local_id = self.AllocateNextLocalID(
+          cnxn, dest_project.project_id)
+      issue_id = self.InsertIssue(cnxn, new_issue)
+      comment.issue_id = issue_id
+      self.InsertComment(cnxn, comment)
+      created_issues.append(new_issue)
+
+    return created_issues
+
+  def MoveIssues(self, cnxn, dest_project, issues, user_service):
+    move_to = dest_project.project_id
+    self.issues_by_project.setdefault(move_to, {})
+    moved_back_iids = set()
+    for issue in issues:
+      if issue.issue_id in self.moved_back_iids:
+        moved_back_iids.add(issue.issue_id)
+      self.moved_back_iids.add(issue.issue_id)
+      project_id = issue.project_id
+      self.issues_by_project[project_id].pop(issue.local_id)
+      issue.local_id = self.AllocateNextLocalID(cnxn, move_to)
+      self.issues_by_project[move_to][issue.local_id] = issue
+      issue.project_id = move_to
+      issue.project_name = dest_project.project_name
+    return moved_back_iids
+
+  def GetCommentsForIssues(self, _cnxn, issue_ids, content_only=False):
+    comments_dict = {}
+    for issue_id in issue_ids:
+      comments_dict[issue_id] = self.comments_by_iid[issue_id]
+
+    return comments_dict
+
+  def InsertComment(self, cnxn, comment, commit=True):
+    issue = self.GetIssue(cnxn, comment.issue_id)
+    self.TestAddComment(comment, issue.local_id)
+
+  # pylint: disable=unused-argument
+  def DeltaUpdateIssue(
+      self, cnxn, services, reporter_id, project_id,
+      config, issue, delta, index_now=False, comment=None, attachments=None,
+      iids_to_invalidate=None, rules=None, predicate_asts=None,
+      is_description=False, timestamp=None, kept_attachments=None,
+      importer_id=None, inbound_message=None):
+    # Return a bogus amendments list if any of the fields changed
+    amendments, _ = tracker_bizobj.ApplyIssueDelta(
+        cnxn, self, issue, delta, config)
+
+    if not amendments and (not comment or not comment.strip()):
+      return [], None
+
+    comment_pb = self.CreateIssueComment(
+        cnxn, issue, reporter_id, comment, attachments=attachments,
+        amendments=amendments, is_description=is_description,
+        kept_attachments=kept_attachments, importer_id=importer_id,
+        inbound_message=inbound_message)
+
+    self.indexer_called = index_now
+    return amendments, comment_pb
+
+  def InvalidateIIDs(self, cnxn, iids_to_invalidate):
+    pass
+
+  # pylint: disable=unused-argument
+  def CreateIssueComment(
+      self, _cnxn, issue, user_id, content,
+      inbound_message=None, amendments=None, attachments=None,
+      kept_attachments=None, timestamp=None, is_spam=False,
+      is_description=False, approval_id=None, commit=True,
+      importer_id=None):
+    # Add a comment to an issue
+    comment = tracker_pb2.IssueComment()
+    comment.id = len(self.comments_by_cid)
+    comment.project_id = issue.project_id
+    comment.issue_id = issue.issue_id
+    comment.content = content
+    comment.user_id = user_id
+    if timestamp is not None:
+      comment.timestamp = timestamp
+    else:
+      comment.timestamp = 1234567890
+    if amendments:
+      comment.amendments.extend(amendments)
+    if inbound_message:
+      comment.inbound_message = inbound_message
+    comment.is_spam = is_spam
+    comment.is_description = is_description
+    if approval_id:
+      comment.approval_id = approval_id
+
+    pid = issue.project_id
+    self.comments_by_project.setdefault(pid, {})
+    self.comments_by_project[pid].setdefault(issue.local_id, []).append(comment)
+    self.comments_by_iid.setdefault(issue.issue_id, []).append(comment)
+    self.comments_by_cid[comment.id] = comment
+
+    if attachments:
+      for filename, filecontent, mimetype in attachments:
+        aid = len(self.attachments_by_id)
+        attach = tracker_pb2.Attachment(
+            attachment_id=aid,
+            filename=filename,
+            filesize=len(filecontent),
+            mimetype=mimetype,
+            gcs_object_id='gcs_object_id(%s)' % filename)
+        comment.attachments.append(attach)
+        self.attachments_by_id[aid] = attach, pid, comment.id
+
+    if kept_attachments:
+      comment.attachments.extend([
+          self.attachments_by_id[aid][0]
+          for aid in kept_attachments])
+
+    return comment
+
+  def GetOpenAndClosedIssues(self, _cnxn, issue_ids):
+    open_issues = []
+    closed_issues = []
+    for issue_id in issue_ids:
+      try:
+        issue = self.issues_by_iid[issue_id]
+        if issue.status == 'Fixed':
+          closed_issues.append(issue)
+        else:
+          open_issues.append(issue)
+      except KeyError:
+        continue
+
+    return open_issues, closed_issues
+
+  def GetIssuesDict(
+      self, _cnxn, issue_ids, use_cache=True, shard_id=None):
+    missing_ids = [iid for iid in issue_ids if iid not in self.issues_by_iid]
+    issues_by_id = {}
+    for iid in issue_ids:
+      if iid in self.issues_by_iid:
+        issue = self.issues_by_iid[iid]
+        if not use_cache:
+          issue.assume_stale = False
+        issues_by_id[iid] = issue
+
+    return issues_by_id, missing_ids
+
+  def GetIssues(self, cnxn, issue_ids, use_cache=True, shard_id=None):
+    issues_by_iid, _misses = self.GetIssuesDict(
+        cnxn, issue_ids, use_cache=use_cache, shard_id=shard_id)
+    results = [
+        issues_by_iid[issue_id]
+        for issue_id in issue_ids
+        if issue_id in issues_by_iid
+    ]
+
+    return results
+
+  def SoftDeleteIssue(
+      self, _cnxn, project_id, local_id, deleted, user_service):
+    issue = self.issues_by_project[project_id][local_id]
+    issue.deleted = deleted
+
+  def SoftDeleteComment(
+      self, cnxn, issue, comment, deleted_by_user_id, user_service,
+      delete=True, reindex=False, is_spam=False):
+    pid = comment.project_id
+    # Find the original comment by the sequence number.
+    c = None
+    by_iid_idx = -1
+    for by_iid_idx, c in enumerate(self.comments_by_iid[issue.issue_id]):
+      if c.sequence == comment.sequence:
+        break
+    comment = c
+    by_project_idx = (
+        self.comments_by_project[pid][issue.local_id].index(comment))
+    comment.is_spam = is_spam
+    if delete:
+      comment.deleted_by = deleted_by_user_id
+    else:
+      comment.reset('deleted_by')
+    self.comments_by_project[pid][issue.local_id][by_project_idx] = comment
+    self.comments_by_iid[issue.issue_id][by_iid_idx] = comment
+    self.comments_by_cid[comment.id] = comment
+
+  def DeleteComponentReferences(self, _cnxn, component_id):
+    for _, issue in self.issues_by_iid.items():
+      issue.component_ids = [
+          cid for cid in issue.component_ids if cid != component_id]
+
+  def RunIssueQuery(
+      self, cnxn, left_joins, where, order_by, shard_id=None, limit=None):
+    """This always returns empty results.  Mock it to test other cases."""
+    return [], False
+
+  def GetIIDsByLabelIDs(self, cnxn, label_ids, project_id, shard_id):
+    """This always returns empty results.  Mock it to test other cases."""
+    return []
+
+  def GetIIDsByParticipant(self, cnxn, user_ids, project_ids, shard_id):
+    """This always returns empty results.  Mock it to test other cases."""
+    return []
+
+  def SortBlockedOn(self, cnxn, issue, blocked_on_iids):
+    return blocked_on_iids, [0] * len(blocked_on_iids)
+
+  def ApplyIssueRerank(
+      self, cnxn, parent_id, relations_to_change, commit=True, invalidate=True):
+    issue = self.GetIssue(cnxn, parent_id)
+    relations_dict = dict(
+        list(zip(issue.blocked_on_iids, issue.blocked_on_ranks)))
+    relations_dict.update(relations_to_change)
+    issue.blocked_on_ranks = sorted(issue.blocked_on_ranks, reverse=True)
+    issue.blocked_on_iids = sorted(
+        issue.blocked_on_iids, key=relations_dict.get, reverse=True)
+
+  def SplitRanks(self, cnxn, parent_id, target_id, open_ids, split_above=False):
+    pass
+
+  def ExpungeUsersInIssues(self, cnxn, user_ids_by_email, limit=None):
+    user_ids = list(user_ids_by_email.values())
+    self.expunged_users_in_issues.extend(user_ids)
+    return []
+
+
+class TemplateService(object):
+  """Fake version of TemplateService that just works in-RAM."""
+
+  def __init__(self):
+    self.templates_by_id = {}  # template_id: template_pb
+    self.templates_by_project_id = {}  # project_id: [template_id]
+
+  def TestAddIssueTemplateDef(
+      self, template_id, project_id, name, content="", summary="",
+      summary_must_be_edited=False, status='New', members_only=False,
+      owner_defaults_to_member=False, component_required=False, owner_id=None,
+      labels=None, component_ids=None, admin_ids=None, field_values=None,
+      phases=None, approval_values=None):
+    template = tracker_bizobj.MakeIssueTemplate(
+        name,
+        summary,
+        status,
+        owner_id,
+        content,
+        labels,
+        field_values or [],
+        admin_ids or [],
+        component_ids,
+        summary_must_be_edited=summary_must_be_edited,
+        owner_defaults_to_member=owner_defaults_to_member,
+        component_required=component_required,
+        members_only=members_only,
+        phases=phases,
+        approval_values=approval_values)
+    template.template_id = template_id
+    self.templates_by_id[template_id] = template
+    if project_id not in self.templates_by_project_id:
+      self.templates_by_project_id[project_id] = []
+    self.templates_by_project_id[project_id].append(template_id)
+    return template
+
+  def GetTemplateByName(self, cnxn, template_name, project_id):
+    if project_id not in self.templates_by_project_id:
+      return None
+    else:
+      project_templates = self.templates_by_project_id[project_id]
+      for template_id in project_templates:
+        template = self.GetTemplateById(cnxn, template_id)
+        if template.name == template_name:
+          return template
+    return None
+
+  def GetTemplateById(self, cnxn, template_id):
+    return self.templates_by_id.get(template_id)
+
+  def GetTemplatesById(self, cnxn, template_ids):
+    return filter(
+        lambda template: template.template_id in template_ids,
+        self.templates_by_id.values())
+
+  def GetProjectTemplates(self, cnxn, project_id):
+    template_ids = self.templates_by_project_id[project_id]
+    return self.GetTemplatesById(cnxn, template_ids)
+
+  def ExpungeUsersInTemplates(self, cnxn, user_ids, limit=None):
+    for _, template in self.templates_by_id.items():
+      template.admin_ids = [user_id for user_id in template.admin_ids
+                            if user_id not in user_ids]
+      if template.owner_id in user_ids:
+        template.owner_id = None
+      template.field_values = [fv for fv in template.field_values
+                               if fv.user_id in user_ids]
+
+class SpamService(object):
+  """Fake version of SpamService that just works in-RAM."""
+
+  def __init__(self, user_id=None):
+    self.user_id = user_id
+    self.reports_by_issue_id = collections.defaultdict(list)
+    self.comment_reports_by_issue_id = collections.defaultdict(dict)
+    self.manual_verdicts_by_issue_id = collections.defaultdict(dict)
+    self.manual_verdicts_by_comment_id = collections.defaultdict(dict)
+    self.expunged_users_in_spam = []
+
+  def LookupIssuesFlaggers(self, cnxn, issue_ids):
+    return {
+        issue_id: (self.reports_by_issue_id.get(issue_id, []),
+                   self.comment_reports_by_issue_id.get(issue_id, {}))
+        for issue_id in issue_ids}
+
+  def LookupIssueFlaggers(self, cnxn, issue_id):
+    return self.LookupIssuesFlaggers(cnxn, [issue_id])[issue_id]
+
+  def FlagIssues(self, cnxn, issue_service, issues, user_id, flagged_spam):
+    for issue in issues:
+      if flagged_spam:
+        self.reports_by_issue_id[issue.issue_id].append(user_id)
+      else:
+        self.reports_by_issue_id[issue.issue_id].remove(user_id)
+
+  def FlagComment(
+      self, cnxn, issue, comment_id, reported_user_id, user_id, flagged_spam):
+    if not comment_id in self.comment_reports_by_issue_id[issue.issue_id]:
+      self.comment_reports_by_issue_id[issue.issue_id][comment_id] = []
+    if flagged_spam:
+      self.comment_reports_by_issue_id[issue.issue_id][comment_id].append(
+          user_id)
+    else:
+      self.comment_reports_by_issue_id[issue.issue_id][comment_id].remove(
+          user_id)
+
+  def RecordManualIssueVerdicts(
+      self, cnxn, issue_service, issues, user_id, is_spam):
+    for issue in issues:
+      self.manual_verdicts_by_issue_id[issue.issue_id][user_id] = is_spam
+
+  def RecordManualCommentVerdict(
+      self, cnxn, issue_service, user_service, comment_id,
+      user_id, is_spam):
+    self.manual_verdicts_by_comment_id[comment_id][user_id] = is_spam
+    comment = issue_service.GetComment(cnxn, comment_id)
+    comment.is_spam = is_spam
+    issue = issue_service.GetIssue(cnxn, comment.issue_id, use_cache=False)
+    issue_service.SoftDeleteComment(
+        cnxn, issue, comment, user_id, user_service, is_spam, True, is_spam)
+
+  def RecordClassifierIssueVerdict(self, cnxn, issue, is_spam, confidence,
+        failed_open):
+    return
+
+  def RecordClassifierCommentVerdict(self, cnxn, issue, is_spam, confidence,
+        failed_open):
+    return
+
+  def ClassifyComment(self, comment, commenter):
+    return {'outputLabel': 'ham',
+            'outputMulti': [{'label': 'ham', 'score': '1.0'}],
+            'failed_open': False}
+
+  def ClassifyIssue(self, issue, firstComment, reporter):
+    return {'outputLabel': 'ham',
+            'outputMulti': [{'label': 'ham', 'score': '1.0'}],
+            'failed_open': False}
+
+  def ExpungeUsersInSpam(self, cnxn, user_ids):
+    self.expunged_users_in_spam.extend(user_ids)
+
+
+class FeaturesService(object):
+  """A fake implementation of FeaturesService."""
+  def __init__(self):
+    # Test-only sequence of expunged projects and users.
+    self.expunged_saved_queries = []
+    self.expunged_users_in_saved_queries = []
+    self.expunged_filter_rules = []
+    self.expunged_users_in_filter_rules = []
+    self.expunged_quick_edit = []
+    self.expunged_users_in_quick_edits = []
+    self.expunged_hotlist_ids = []
+    self.expunged_users_in_hotlists = []
+
+    # filter rules, project_id => filterrule_pb
+    self.test_rules = collections.defaultdict(list)
+
+    # TODO(crbug/monorail/7104): Confirm that these are never reassigned
+    # to empty {} and then change these to collections.defaultdicts instead.
+    # hotlists
+    self.test_hotlists = {}  # (hotlist_name, owner_id) => hotlist_pb
+    self.hotlists_by_id = {}
+    self.hotlists_id_by_user = {}  # user_id => [hotlist_id, hotlist_id, ...]
+    self.hotlists_id_by_issue = {}  # issue_id => [hotlist_id, hotlist_id, ...]
+
+    # saved queries
+    self.saved_queries = []  # [(pid, uid, sq), ...]
+
+  def TestAddFilterRule(
+      self, project_id, predicate, default_status=None, default_owner_id=None,
+      add_cc_ids=None, add_labels=None, add_notify=None, warning=None,
+      error=None):
+    rule = filterrules_helpers.MakeRule(
+        predicate, default_status=default_status,
+        default_owner_id=default_owner_id, add_cc_ids=add_cc_ids,
+        add_labels=add_labels, add_notify=add_notify, warning=warning,
+        error=error)
+    self.test_rules[project_id].append(rule)
+    return rule
+
+  def TestAddHotlist(self, name, summary='', owner_ids=None, editor_ids=None,
+                     follower_ids=None, description=None, hotlist_id=None,
+                     is_private=False, hotlist_item_fields=None,
+                     default_col_spec=None):
+    """Add a hotlist to the fake FeaturesService object.
+
+    Args:
+      name: the name of the hotlist. Will replace any existing hotlist under
+        the same name.
+      summary: the summary string of the hotlist
+      owner_ids: List of user ids for the hotlist owners
+      editor_ids: List of user ids for the hotlist editors
+      follower_ids: List of user ids for the hotlist followers
+      description: The description string for this hotlist
+      hotlist_id: A unique integer identifier for the created hotlist
+      is_private: A boolean indicating whether the hotlist is private/public
+      hotlist_item_fields: a list of tuples ->
+        [(issue_id, rank, adder_id, date_added, note),...]
+      default_col_spec: string of default columns for the hotlist.
+
+    Returns:
+      A populated hotlist PB.
+    """
+    hotlist_pb = features_pb2.Hotlist()
+    hotlist_pb.hotlist_id = hotlist_id or hash(name) % 100000
+    hotlist_pb.name = name
+    hotlist_pb.summary = summary
+    hotlist_pb.is_private = is_private
+    hotlist_pb.default_col_spec = default_col_spec
+    if description is not None:
+      hotlist_pb.description = description
+
+    self.TestAddHotlistMembers(owner_ids, hotlist_pb, OWNER_ROLE)
+    self.TestAddHotlistMembers(follower_ids, hotlist_pb, FOLLOWER_ROLE)
+    self.TestAddHotlistMembers(editor_ids, hotlist_pb, EDITOR_ROLE)
+
+    if hotlist_item_fields is not None:
+      for(issue_id, rank, adder_id, date, note) in hotlist_item_fields:
+        hotlist_pb.items.append(
+            features_pb2.Hotlist.HotlistItem(
+                issue_id=issue_id, rank=rank, adder_id=adder_id,
+                date_added=date, note=note))
+        try:
+          self.hotlists_id_by_issue[issue_id].append(hotlist_pb.hotlist_id)
+        except KeyError:
+          self.hotlists_id_by_issue[issue_id] = [hotlist_pb.hotlist_id]
+
+    owner_id = None
+    if hotlist_pb.owner_ids:
+      owner_id = hotlist_pb.owner_ids[0]
+    self.test_hotlists[(name, owner_id)] = hotlist_pb
+    self.hotlists_by_id[hotlist_pb.hotlist_id] = hotlist_pb
+    return hotlist_pb
+
+  def TestAddHotlistMembers(self, user_id_list, hotlist_pb, role):
+    if user_id_list is not None:
+      for user_id in user_id_list:
+        if role == OWNER_ROLE:
+          hotlist_pb.owner_ids.append(user_id)
+        elif role == EDITOR_ROLE:
+          hotlist_pb.editor_ids.append(user_id)
+        elif role == FOLLOWER_ROLE:
+          hotlist_pb.follower_ids.append(user_id)
+        try:
+          self.hotlists_id_by_user[user_id].append(hotlist_pb.hotlist_id)
+        except KeyError:
+          self.hotlists_id_by_user[user_id] = [hotlist_pb.hotlist_id]
+
+  def CheckHotlistName(self, cnxn, name, owner_ids):
+    if not framework_bizobj.IsValidHotlistName(name):
+      raise exceptions.InputException(
+          '%s is not a valid name for a Hotlist' % name)
+    if self.LookupHotlistIDs(cnxn, [name], owner_ids):
+      raise features_svc.HotlistAlreadyExists()
+
+  def CreateHotlist(
+      self, _cnxn, hotlist_name, summary, description, owner_ids, editor_ids,
+      issue_ids=None, is_private=None, default_col_spec=None, ts=None):
+    """Create and store a Hotlist with the given attributes."""
+    if not framework_bizobj.IsValidHotlistName(hotlist_name):
+      raise exceptions.InputException()
+    if not owner_ids:  # Should never happen.
+      raise features_svc.UnownedHotlistException()
+    if (hotlist_name, owner_ids[0]) in self.test_hotlists:
+      raise features_svc.HotlistAlreadyExists()
+    hotlist_item_fields = [
+        (issue_id, rank*100, owner_ids[0] or None, ts, '') for
+        rank, issue_id in enumerate(issue_ids or [])]
+    return self.TestAddHotlist(hotlist_name, summary=summary,
+                               owner_ids=owner_ids, editor_ids=editor_ids,
+                               description=description, is_private=is_private,
+                               hotlist_item_fields=hotlist_item_fields,
+                               default_col_spec=default_col_spec)
+
+  def UpdateHotlist(
+      self, cnxn, hotlist_id, name=None, summary=None, description=None,
+      is_private=None, default_col_spec=None, owner_id=None,
+      add_editor_ids=None):
+    hotlist = self.hotlists_by_id.get(hotlist_id)
+    if not hotlist:
+      raise features_svc.NoSuchHotlistException(
+          'Hotlist "%s" not found!' % hotlist_id)
+
+    if owner_id:
+      old_owner_id = hotlist.owner_ids[0]
+      self.test_hotlists.pop((hotlist.name, old_owner_id), None)
+      self.test_hotlists[(hotlist.name, owner_id)] = hotlist
+
+    if add_editor_ids:
+      for editor_id in add_editor_ids:
+        self.hotlists_id_by_user.get(editor_id, []).append(hotlist_id)
+
+    if name is not None:
+      hotlist.name = name
+    if summary is not None:
+      hotlist.summary = summary
+    if description is not None:
+      hotlist.description = description
+    if is_private is not None:
+      hotlist.is_private = is_private
+    if default_col_spec is not None:
+      hotlist.default_col_spec = default_col_spec
+    if owner_id is not None:
+      hotlist.owner_ids = [owner_id]
+    if add_editor_ids:
+      hotlist.editor_ids.extend(add_editor_ids)
+
+  def RemoveHotlistEditors(self, cnxn, hotlist_id, remove_editor_ids):
+    hotlist = self.hotlists_by_id.get(hotlist_id)
+    if not hotlist:
+      raise features_svc.NoSuchHotlistException(
+          'Hotlist "%s" not found!' % hotlist_id)
+    for editor_id in remove_editor_ids:
+      hotlist.editor_ids.remove(editor_id)
+      self.hotlists_id_by_user[editor_id].remove(hotlist_id)
+
+  def AddIssuesToHotlists(self, cnxn, hotlist_ids, added_tuples, issue_svc,
+                          chart_svc, commit=True):
+    for hotlist_id in hotlist_ids:
+      self.UpdateHotlistItems(cnxn, hotlist_id, [], added_tuples, commit=commit)
+
+  def RemoveIssuesFromHotlists(self, cnxn, hotlist_ids, issue_ids, issue_svc,
+                               chart_svc, commit=True):
+    for hotlist_id in hotlist_ids:
+      self.UpdateHotlistItems(cnxn, hotlist_id, issue_ids, [], commit=commit)
+
+  def UpdateHotlistIssues(
+      self,
+      cnxn,
+      hotlist_id,
+      updated_items,
+      remove_issue_ids,
+      issue_svc,
+      chart_svc,
+      commit=True):
+    if not updated_items and not remove_issue_ids:
+      raise exceptions.InputException('No changes to make')
+
+    hotlist = self.hotlists_by_id.get(hotlist_id)
+    if not hotlist:
+      raise NoSuchHotlistException()
+
+    updated_ids = [item.issue_id for item in updated_items]
+    items = [
+        item for item in hotlist.items
+        if item.issue_id not in updated_ids + remove_issue_ids
+    ]
+    hotlist.items = sorted(updated_items + items, key=lambda item: item.rank)
+
+    # Remove all removed and updated issues.
+    for issue_id in remove_issue_ids + updated_ids:
+      try:
+        self.hotlists_id_by_issue[issue_id].remove(hotlist_id)
+      except (ValueError, KeyError):
+        pass
+    # Add all new or updated issues.
+    for item in updated_items:
+      self.hotlists_id_by_issue.setdefault(item.issue_id, []).append(hotlist_id)
+
+  def UpdateHotlistItems(
+      self, cnxn, hotlist_id, remove, added_issue_tuples, commit=True):
+    hotlist = self.hotlists_by_id.get(hotlist_id)
+    if not hotlist:
+      raise features_svc.NoSuchHotlistException(
+          'Hotlist "%s" not found!' % hotlist_id)
+    current_issues_ids = {
+        item.issue_id for item in hotlist.items}
+    items = [
+        item for item in hotlist.items if
+        item.issue_id not in remove]
+
+    if hotlist.items:
+      items_sorted = sorted(hotlist.items, key=lambda item: item.rank)
+      rank_base = items_sorted[-1].rank + 10
+    else:
+      rank_base = 1
+
+    new_hotlist_items = [
+        features_pb2.MakeHotlistItem(
+            issue_id, rank+rank_base*10, adder_id, date, note)
+        for rank, (issue_id, adder_id, date, note) in
+        enumerate(added_issue_tuples)
+        if issue_id not in current_issues_ids]
+    items.extend(new_hotlist_items)
+    hotlist.items = items
+
+    for issue_id in remove:
+      try:
+        self.hotlists_id_by_issue[issue_id].remove(hotlist_id)
+      except ValueError:
+        pass
+    for item in new_hotlist_items:
+      try:
+        self.hotlists_id_by_issue[item.issue_id].append(hotlist_id)
+      except KeyError:
+        self.hotlists_id_by_issue[item.issue_id] = [hotlist_id]
+
+  def UpdateHotlistItemsFields(
+      self, cnxn, hotlist_id, new_ranks=None, new_notes=None, commit=True):
+    hotlist = self.hotlists_by_id.get(hotlist_id)
+    if not hotlist:
+      raise features_svc.NoSuchHotlistException(
+          'Hotlist "%s" not found!' % hotlist_id)
+    if new_ranks is None:
+      new_ranks = {}
+    if new_notes is None:
+      new_notes = {}
+    for hotlist_item in hotlist.items:
+      if hotlist_item.issue_id in new_ranks:
+        hotlist_item.rank = new_ranks[hotlist_item.issue_id]
+      if hotlist_item.issue_id in new_notes:
+        hotlist_item.note = new_notes[hotlist_item.issue_id]
+
+    hotlist.items.sort(key=lambda item: item.rank)
+
+  def TransferHotlistOwnership(
+      self, cnxn, hotlist, new_owner_id, remain_editor, commit=True):
+    """Transfers ownership of a hotlist to a new owner."""
+    new_editor_ids = hotlist.editor_ids
+    if remain_editor:
+      new_editor_ids.extend(hotlist.owner_ids)
+    if new_owner_id in new_editor_ids:
+      new_editor_ids.remove(new_owner_id)
+    new_follower_ids = hotlist.follower_ids
+    if new_owner_id in new_follower_ids:
+      new_follower_ids.remove(new_owner_id)
+    self.UpdateHotlistRoles(
+        cnxn, hotlist.hotlist_id, [new_owner_id], new_editor_ids,
+        new_follower_ids, commit=commit)
+
+  def LookupUserHotlists(self, cnxn, user_ids):
+    """Return dict of {user_id: [hotlist_id, hotlist_id...]}."""
+    users_hotlists_dict = {
+        user_id: self.hotlists_id_by_user.get(user_id, [])
+        for user_id in user_ids
+    }
+    return users_hotlists_dict
+
+  def LookupIssueHotlists(self, cnxn, issue_ids):
+    """Return dict of {issue_id: [hotlist_id, hotlist_id...]}."""
+    issues_hotlists_dict = {
+        issue_id: self.hotlists_id_by_issue[issue_id]
+        for issue_id in issue_ids
+        if issue_id in self.hotlists_id_by_issue}
+    return issues_hotlists_dict
+
+  def LookupHotlistIDs(self, cnxn, hotlist_names, owner_ids):
+    id_dict = {}
+    for name in hotlist_names:
+      for owner_id in owner_ids:
+        hotlist = self.test_hotlists.get((name, owner_id))
+        if hotlist:
+          if not hotlist.owner_ids:  # Should never happen.
+            logging.warn('Unowned Hotlist: id:%r, name:%r',
+                         hotlist.hotlist_id, hotlist.name)
+            continue
+          id_dict[(name.lower(), owner_id)] = hotlist.hotlist_id
+    return id_dict
+
+  def GetHotlists(self, cnxn, hotlist_ids, use_cache=True):
+    """Returns dict of {hotlist_id: hotlist PB}."""
+    result = {}
+    for hotlist_id in hotlist_ids:
+      hotlist = self.hotlists_by_id.get(hotlist_id)
+      if hotlist:
+        result[hotlist_id] = hotlist
+      else:
+        raise features_svc.NoSuchHotlistException()
+    return result
+
+  def GetHotlistsByUserID(self, cnxn, user_id, use_cache=True):
+    """Get a list of hotlist PBs for a given user."""
+    hotlist_id_dict = self.LookupUserHotlists(cnxn, [user_id])
+    hotlists = self.GetHotlists(cnxn, hotlist_id_dict.get(
+        user_id, []), use_cache=use_cache)
+    return list(hotlists.values())
+
+  def GetHotlistsByIssueID(self, cnxn, issue_id, use_cache=True):
+    """Get a list of hotlist PBs for a given issue."""
+    hotlist_id_dict = self.LookupIssueHotlists(cnxn, [issue_id])
+    hotlists = self.GetHotlists(cnxn, hotlist_id_dict.get(
+        issue_id, []), use_cache=use_cache)
+    return list(hotlists.values())
+
+  def GetHotlist(self, cnxn, hotlist_id, use_cache=True):
+    """Return hotlist PB."""
+    hotlist_id_dict = self.GetHotlists(cnxn, [hotlist_id], use_cache=use_cache)
+    return hotlist_id_dict.get(hotlist_id)
+
+  def GetHotlistsByID(self, cnxn, hotlist_ids, use_cache=True):
+    hotlists_dict = {}
+    missed_ids = []
+    for hotlist_id in hotlist_ids:
+      hotlist = self.hotlists_by_id.get(hotlist_id)
+      if hotlist:
+        hotlists_dict[hotlist_id] = hotlist
+      else:
+        missed_ids.append(hotlist_id)
+    return hotlists_dict, missed_ids
+
+  def GetHotlistByID(self, cnxn, hotlist_id, use_cache=True):
+    hotlists_dict, _ = self.GetHotlistsByID(
+        cnxn, [hotlist_id], use_cache=use_cache)
+    return hotlists_dict[hotlist_id]
+
+  def UpdateHotlistRoles(
+      self, cnxn, hotlist_id, owner_ids, editor_ids, follower_ids, commit=True):
+    hotlist = self.hotlists_by_id.get(hotlist_id)
+    if not hotlist:
+      raise features_svc.NoSuchHotlistException(
+          'Hotlist "%s" not found!' % hotlist_id)
+
+    # Remove hotlist_ids to clear old roles
+    for user_id in (hotlist.owner_ids + hotlist.editor_ids +
+                    hotlist.follower_ids):
+      if hotlist_id in self.hotlists_id_by_user[user_id]:
+        self.hotlists_id_by_user[user_id].remove(hotlist_id)
+    old_owner_id = None
+    if hotlist.owner_ids:
+      old_owner_id = hotlist.owner_ids[0]
+    self.test_hotlists.pop((hotlist.name, old_owner_id), None)
+
+    hotlist.owner_ids = owner_ids
+    hotlist.editor_ids = editor_ids
+    hotlist.follower_ids = follower_ids
+
+    # Add new hotlist roles
+    for user_id in owner_ids+editor_ids+follower_ids:
+      try:
+        if hotlist_id not in self.hotlists_id_by_user[user_id]:
+          self.hotlists_id_by_user[user_id].append(hotlist_id)
+      except KeyError:
+        self.hotlists_id_by_user[user_id] = [hotlist_id]
+    new_owner_id = None
+    if owner_ids:
+      new_owner_id = owner_ids[0]
+    self.test_hotlists[(hotlist.name, new_owner_id)] = hotlist
+
+  def DeleteHotlist(self, cnxn, hotlist_id, commit=True):
+    hotlist = self.hotlists_by_id.pop(hotlist_id, None)
+    if hotlist is not None:
+      self.test_hotlists.pop((hotlist.name, hotlist.owner_ids[0]), None)
+      user_ids = hotlist.owner_ids+hotlist.editor_ids+hotlist.follower_ids
+      for user_id in user_ids:
+        try:
+          self.hotlists_id_by_user[user_id].remove(hotlist_id)
+        except (ValueError, KeyError):
+          pass
+      for item in hotlist.items:
+        try:
+          self.hotlists_id_by_issue[item.issue_id].remove(hotlist_id)
+        except (ValueError, KeyError):
+          pass
+      for owner_id in hotlist.owner_ids:
+        self.test_hotlists.pop((hotlist.name, owner_id), None)
+
+  def ExpungeHotlists(
+      self, cnxn, hotlist_ids, star_svc, user_svc, chart_svc, commit=True):
+    self.expunged_hotlist_ids.extend(hotlist_ids)
+    for hotlist_id in hotlist_ids:
+      self.DeleteHotlist(cnxn, hotlist_id)
+
+  def ExpungeUsersInHotlists(
+      self, cnxn, user_ids, star_svc, user_svc, chart_svc):
+    self.expunged_users_in_hotlists.extend(user_ids)
+
+  # end of Hotlist functions
+
+  def GetRecentCommands(self, cnxn, user_id, project_id):
+    return [], []
+
+  def ExpungeSavedQueriesExecuteInProject(self, _cnxn, project_id):
+    self.expunged_saved_queries.append(project_id)
+
+  def ExpungeSavedQueriesByUsers(self, cnxn, user_ids, limit=None):
+    self.expunged_users_in_saved_queries.extend(user_ids)
+
+  def ExpungeFilterRules(self, _cnxn, project_id):
+    self.expunged_filter_rules.append(project_id)
+
+  def ExpungeFilterRulesByUser(self, cnxn, user_ids_by_email):
+    emails = user_ids_by_email.keys()
+    user_ids = user_ids_by_email.values()
+    project_rules_dict = collections.defaultdict(list)
+    for project_id, rules in self.test_rules.iteritems():
+      for rule in rules:
+        if rule.default_owner_id in user_ids:
+          project_rules_dict[project_id].append(rule)
+          continue
+        if any(cc_id in user_ids for cc_id in rule.add_cc_ids):
+          project_rules_dict[project_id].append(rule)
+          continue
+        if any(addr in emails for addr in rule.add_notify_addrs):
+          project_rules_dict[project_id].append(rule)
+          continue
+        if any((email in rule.predicate) for email in emails):
+          project_rules_dict[project_id].append(rule)
+          continue
+      self.test_rules[project_id] = [
+          rule for rule in rules
+          if rule not in project_rules_dict[project_id]]
+    return project_rules_dict
+
+  def ExpungeQuickEditHistory(self, _cnxn, project_id):
+    self.expunged_quick_edit.append(project_id)
+
+  def ExpungeQuickEditsByUsers(self, cnxn, user_ids, limit=None):
+    self.expunged_users_in_quick_edits.extend(user_ids)
+
+  def GetFilterRules(self, cnxn, project_id):
+    return self.test_rules[project_id]
+
+  def GetCannedQueriesByProjectID(self, cnxn, project_id):
+    return [sq for (pid, _, sq) in self.saved_queries if pid == project_id]
+
+  def GetSavedQueriesByUserID(self, cnxn, user_id):
+    return [sq for (_, uid, sq) in self.saved_queries if uid == user_id]
+
+  def UpdateCannedQueries(self, cnxn, project_id, canned_queries):
+    self.saved_queries.extend(
+      [(project_id, None, cq) for cq in canned_queries])
+
+  def UpdateUserSavedQueries(self, cnxn, user_id, saved_queries):
+    self.saved_queries = [
+      (pid, uid, sq) for (pid, uid, sq) in self.saved_queries
+      if uid != user_id]
+    for sq in saved_queries:
+      if sq.executes_in_project_ids:
+        self.saved_queries.extend(
+          [(eipid, user_id, sq) for eipid in sq.executes_in_project_ids])
+      else:
+        self.saved_queries.append((None, user_id, sq))
+
+  def GetSubscriptionsInProjects(self, cnxn, project_ids):
+    sq_by_uid = {}
+    for pid, uid, sq in self.saved_queries:
+      if pid in project_ids:
+        if uid in sq_by_uid:
+          sq_by_uid[uid].append(sq)
+        else:
+          sq_by_uid[uid] = [sq]
+
+    return sq_by_uid
+
+  def GetSavedQuery(self, cnxn, query_id):
+    return tracker_pb2.SavedQuery()
+
+
+class PostData(object):
+  """A dictionary-like object that also implements getall()."""
+
+  def __init__(self, *args, **kwargs):
+    self.dictionary = dict(*args, **kwargs)
+
+  def getall(self, key):
+    """Return all values, assume that the value at key is already a list."""
+    return self.dictionary.get(key, [])
+
+  def get(self, key, default=None):
+    """Return first value, assume that the value at key is already a list."""
+    return self.dictionary.get(key, [default])[0]
+
+  def __getitem__(self, key):
+    """Return first value, assume that the value at key is already a list."""
+    return self.dictionary[key][0]
+
+  def __contains__(self, key):
+    return key in self.dictionary
+
+  def keys(self):
+    """Return the keys in the POST data."""
+    return list(self.dictionary.keys())
+
+
+class FakeFile:
+  def __init__(self, data=None):
+    self.data = data
+
+  def read(self):
+    return self.data
+
+  def write(self, content):
+    return
+
+  def __enter__(self):
+    return self
+
+  def __exit__(self, __1, __2, __3):
+    return None
+
+
+def gcs_open(filename, mode):
+  return FakeFile(filename)
diff --git a/testing/test/__init__.py b/testing/test/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/testing/test/__init__.py
diff --git a/testing/test/fake_test.py b/testing/test/fake_test.py
new file mode 100644
index 0000000..c098236
--- /dev/null
+++ b/testing/test/fake_test.py
@@ -0,0 +1,67 @@
+# 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
+
+"""Tests for the fake module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import inspect
+import unittest
+
+from services import cachemanager_svc
+from services import config_svc
+from services import features_svc
+from services import issue_svc
+from services import project_svc
+from services import star_svc
+from services import user_svc
+from services import usergroup_svc
+from testing import fake
+
+fake_class_map = {
+    fake.AbstractStarService: star_svc.AbstractStarService,
+    fake.CacheManager: cachemanager_svc.CacheManager,
+    fake.ProjectService: project_svc.ProjectService,
+    fake.ConfigService: config_svc.ConfigService,
+    fake.IssueService: issue_svc.IssueService,
+    fake.UserGroupService: usergroup_svc.UserGroupService,
+    fake.UserService: user_svc.UserService,
+    fake.FeaturesService: features_svc.FeaturesService,
+    }
+
+
+class FakeMetaTest(unittest.TestCase):
+
+  def testFunctionsHaveSameSignatures(self):
+    """Verify that the fake class methods match the real ones."""
+    for fake_cls, real_cls in fake_class_map.items():
+      fake_attrs = set(dir(fake_cls))
+      real_attrs = set(dir(real_cls))
+      both_attrs = fake_attrs.intersection(real_attrs)
+      to_test = [x for x in both_attrs if '__' not in x]
+      for name in to_test:
+        real_attr = getattr(real_cls, name)
+        assert inspect.ismethod(real_attr)
+        real_spec = inspect.getargspec(real_attr)
+        fake_spec = inspect.getargspec(getattr(fake_cls, name))
+        # check same number of args and kwargs
+        real_kw_len = len(real_spec[3]) if real_spec[3] else 0
+        fake_kw_len = len(fake_spec[3]) if fake_spec[3] else 0
+
+        self.assertEqual(
+            len(real_spec[0]) - real_kw_len,
+            len(fake_spec[0]) - fake_kw_len,
+            'Unequal number of args on %s.%s' % (fake_cls.__name__, name))
+        self.assertEqual(
+            real_kw_len, fake_kw_len,
+            'Unequal number of kwargs on %s.%s' % (fake_cls.__name__, name))
+        if real_kw_len:
+          self.assertEqual(
+              real_spec[0][-real_kw_len:], fake_spec[0][-fake_kw_len:],
+              'Mismatched kwargs on %s.%s' % (fake_cls.__name__, name))
+        self.assertEqual(
+            real_spec[3], fake_spec[3],
+            'Mismatched kwarg defaults on %s.%s' % (fake_cls.__name__, name))
diff --git a/testing/test/testing_helpers_test.py b/testing/test/testing_helpers_test.py
new file mode 100644
index 0000000..7493b04
--- /dev/null
+++ b/testing/test/testing_helpers_test.py
@@ -0,0 +1,74 @@
+# 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
+
+"""Tests for the testing_helpers module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from testing import testing_helpers
+
+
+class TestingHelpersTest(unittest.TestCase):
+
+  def testMakeMonorailRequest(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/foo?key1=2&key2=&key3')
+
+    self.assertEqual(None, mr.GetIntParam('foo'))
+    self.assertEqual(2, mr.GetIntParam('key1'))
+    self.assertEqual(None, mr.GetIntParam('key2'))
+    self.assertEqual(None, mr.GetIntParam('key3'))
+    self.assertEqual(3, mr.GetIntParam('key2', default_value=3))
+    self.assertEqual(3, mr.GetIntParam('foo', default_value=3))
+
+  def testGetRequestObjectsBasics(self):
+    request, mr = testing_helpers.GetRequestObjects(
+        path='/foo/bar/wee?sna=foo',
+        params={'ya': 'hoo'}, method='POST')
+
+    # supplied as part of the url
+    self.assertEqual('foo', mr.GetParam('sna'))
+
+    # supplied as a param
+    self.assertEqual('hoo', mr.GetParam('ya'))
+
+    # default Host header
+    self.assertEqual('127.0.0.1', request.host)
+
+  def testGetRequestObjectsHeaders(self):
+    # with some headers
+    request, _mr = testing_helpers.GetRequestObjects(
+        headers={'Accept-Language': 'en', 'Host': 'pickledsheep.com'},
+        path='/foo/bar/wee?sna=foo')
+
+    # default Host header
+    self.assertEqual('pickledsheep.com', request.host)
+
+    # user specified headers
+    self.assertEqual('en', request.headers['Accept-Language'])
+
+  def testGetRequestObjectsUserInfo(self):
+    user_id = '123'
+
+    _request, mr = testing_helpers.GetRequestObjects(
+        user_info={'user_id': user_id})
+
+    self.assertEqual(user_id, mr.auth.user_id)
+
+
+class BlankTest(unittest.TestCase):
+
+  def testBlank(self):
+    blank = testing_helpers.Blank(
+        foo='foo',
+        bar=123,
+        inc=lambda x: x + 1)
+
+    self.assertEqual('foo', blank.foo)
+    self.assertEqual(123, blank.bar)
+    self.assertEqual(5, blank.inc(4))
diff --git a/testing/testing_helpers.py b/testing/testing_helpers.py
new file mode 100644
index 0000000..097275a
--- /dev/null
+++ b/testing/testing_helpers.py
@@ -0,0 +1,160 @@
+# 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
+
+"""Helpers for testing."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import email
+
+from framework import emailfmt
+from framework import framework_bizobj
+from proto import user_pb2
+from services import service_manager
+from services import template_svc
+from testing import fake
+from tracker import tracker_constants
+import webapp2
+
+DEFAULT_HOST = '127.0.0.1'
+
+MINIMAL_HEADER_LINES = [
+    ('From', 'user@example.com'),
+    ('To', 'proj@monorail.example.com'),
+    ('Cc', 'ningerso@chromium.org'),
+    ('Subject', 'Issue 123 in proj: broken link'),
+]
+
+# Add one more (long) line for In-Reply-To
+HEADER_LINES = MINIMAL_HEADER_LINES + [
+    ('In-Reply-To', '<0=969704940193871313=13442892928193434663='
+     'proj@monorail.example.com>'),
+]
+
+AlertEmailHeader = emailfmt.AlertEmailHeader
+ALERT_EMAIL_HEADER_LINES = HEADER_LINES + [
+    (AlertEmailHeader.INCIDENT_ID, '1234567890123456789'),
+    (AlertEmailHeader.OWNER, 'owner@example.com'),
+    (AlertEmailHeader.CC, 'cc1@example.com,cc2@example.com'),
+    (AlertEmailHeader.PRIORITY, '0'),
+    (AlertEmailHeader.STATUS, 'Unconfirmed'),
+    (AlertEmailHeader.COMPONENT, 'Component'),
+    (AlertEmailHeader.TYPE, 'Bug'),
+    (AlertEmailHeader.OS, 'Android,Windows'),
+    (AlertEmailHeader.LABEL, ''),
+]
+
+
+# TODO(crbug/monorail/7238): this should be moved to framework_bizobj
+# as this is no longer only used for testing.
+def ObscuredEmail(address):
+  (_username, _domain, _obs_username,
+   obs_email) = framework_bizobj.ParseAndObscureAddress(address)
+  return obs_email
+
+def MakeMessage(header_list, body):
+  """Convenience function to make an email.message.Message."""
+  msg = email.message.Message()
+  for key, value in header_list:
+    msg[key] = value
+  msg.set_payload(body)
+  return msg
+
+
+def MakeMonorailRequest(*args, **kwargs):
+  """Get just the monorailrequest.MonorailRequest() from GetRequestObjects."""
+  _request, mr = GetRequestObjects(*args, **kwargs)
+  return mr
+
+
+def GetRequestObjects(
+    headers=None, path='/', params=None, payload=None, user_info=None,
+    project=None, method='GET', perms=None, services=None, hotlist=None):
+  """Make fake request and MonorailRequest objects for testing.
+
+  Host param will override the 'Host' header, and has a default value of
+  '127.0.0.1'.
+
+  Args:
+    headers: Dict of HTTP header strings.
+    path: Path part of the URL in the request.
+    params: Dict of query-string parameters.
+    user_info: Dict of user attributes to set on a MonorailRequest object.
+        For example, "user_id: 5" causes self.auth.user_id=5.
+    project: optional Project object for the current request.
+    method: 'GET' or 'POST'.
+    perms: PermissionSet to use for this request.
+    services: Connections to backends.
+    hotlist: optional Hotlist object for the current request
+
+  Returns:
+    A tuple of (http Request, monorailrequest.MonorailRequest()).
+  """
+  headers = headers or {}
+  params = params or {}
+
+  headers.setdefault('Host', DEFAULT_HOST)
+  post_items=None
+  if method == 'POST' and payload:
+    post_items = payload
+  elif method == 'POST' and params:
+    post_items = params
+
+  if not services:
+    services = service_manager.Services(
+        project=fake.ProjectService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        features=fake.FeaturesService())
+    services.project.TestAddProject('proj')
+    services.features.TestAddHotlist('hotlist')
+
+  request = webapp2.Request.blank(path, headers=headers, POST=post_items)
+  mr = fake.MonorailRequest(
+      services, user_info=user_info, project=project, perms=perms,
+      params=params, hotlist=hotlist)
+  mr.ParseRequest(
+      request, services, do_user_lookups=False)
+  mr.auth.user_pb = user_pb2.MakeUser(0)
+  return request, mr
+
+
+class Blank(object):
+  """Simple class that assigns all named args to attributes.
+
+  Tip: supply a lambda to define a method.
+  """
+
+  def __init__(self, **kwargs):
+    vars(self).update(kwargs)
+
+  def __repr__(self):
+    return '%s(%s)' % (self.__class__.__name__, str(vars(self)))
+
+  def __eq__(self, other):
+    if other is None:
+      return False
+    return vars(self) == vars(other)
+
+
+def DefaultTemplateRows():
+  return [(
+    None,
+    789,
+    template_dict['name'],
+    template_dict['content'],
+    template_dict['summary'],
+    template_dict.get('summary_must_be_edited'),
+    None,
+    template_dict['status'],
+    template_dict.get('members_only', False),
+    template_dict.get('owner_defaults_to_member', True),
+    template_dict.get('component_required', False),
+    ) for template_dict in tracker_constants.DEFAULT_TEMPLATES]
+
+
+def DefaultTemplates():
+  return [template_svc.UnpackTemplate(t) for t in DefaultTemplateRows()]
diff --git a/testing_utils b/testing_utils
new file mode 120000
index 0000000..83b5d32
--- /dev/null
+++ b/testing_utils
@@ -0,0 +1 @@
+../../../infra/appengine_module/testing_utils/
\ No newline at end of file
diff --git a/third_party/README.md b/third_party/README.md
new file mode 100644
index 0000000..3c5a971
--- /dev/null
+++ b/third_party/README.md
@@ -0,0 +1,5 @@
+Check the README.monorail file in each directory for package info and
+instructions on how to update our copied third_party/ packages to other versions.
+
+TODO(crbug.com/monorail/7800): replace all remaining symlinked modules with direct
+copies.
diff --git a/third_party/__init__.py b/third_party/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/third_party/__init__.py
diff --git a/third_party/apiclient b/third_party/apiclient
new file mode 120000
index 0000000..dc34fc0
--- /dev/null
+++ b/third_party/apiclient
@@ -0,0 +1 @@
+../../third_party/google-api-python-client/apiclient
\ No newline at end of file
diff --git a/third_party/cloudstorage b/third_party/cloudstorage
new file mode 120000
index 0000000..2f7613d
--- /dev/null
+++ b/third_party/cloudstorage
@@ -0,0 +1 @@
+../../third_party/cloudstorage/python/src/cloudstorage
\ No newline at end of file
diff --git a/third_party/googleapiclient b/third_party/googleapiclient
new file mode 120000
index 0000000..3015f99
--- /dev/null
+++ b/third_party/googleapiclient
@@ -0,0 +1 @@
+../../third_party/google-api-python-client/googleapiclient
\ No newline at end of file
diff --git a/third_party/httpagentparser b/third_party/httpagentparser
new file mode 120000
index 0000000..768d339
--- /dev/null
+++ b/third_party/httpagentparser
@@ -0,0 +1 @@
+../../third_party/httpagentparser
\ No newline at end of file
diff --git a/third_party/httplib2 b/third_party/httplib2
new file mode 120000
index 0000000..15b666b
--- /dev/null
+++ b/third_party/httplib2
@@ -0,0 +1 @@
+../../third_party/httplib2/python2/httplib2
\ No newline at end of file
diff --git a/third_party/markdown.py b/third_party/markdown.py
new file mode 100644
index 0000000..f6a9a87
--- /dev/null
+++ b/third_party/markdown.py
@@ -0,0 +1,683 @@
+#!/usr/bin/python
+"""markdown.py: A Markdown-styled-text to HTML converter in Python.
+
+Usage:
+  ./markdown.py textfile.markdown
+ 
+Calling:
+  import markdown
+  somehtml = markdown.markdown(sometext)
+
+For other versions of markdown, see: 
+  http://www.freewisdom.org/projects/python-markdown/
+  http://en.wikipedia.org/wiki/Markdown
+"""
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+import md5
+import re
+import sys
+
+__version__ = '1.0.1-2' # port of 1.0.1
+__license__ = "GNU GPL 2"
+__author__ = [
+  'John Gruber <http://daringfireball.net/>',
+  'Tollef Fog Heen <tfheen@err.no>', 
+  'Aaron Swartz <me@aaronsw.com>'
+]
+
+def htmlquote(text):
+    """Encodes `text` for raw use in HTML."""
+    text = text.replace("&", "&amp;") # Must be done first!
+    text = text.replace("<", "&lt;")
+    text = text.replace(">", "&gt;")
+    text = text.replace("'", "&#39;")
+    text = text.replace('"', "&quot;")
+    return text
+
+def semirandom(seed):
+    x = 0
+    for c in md5.new(seed).digest(): x += ord(c)
+    return x / (255*16.)
+
+class _Markdown:
+    emptyelt = " />"
+    tabwidth = 4
+
+    escapechars = '\\`*_{}[]()>#+-.!'
+    escapetable = {}
+    for char in escapechars:
+        escapetable[char] = md5.new(char).hexdigest()
+    
+    r_multiline = re.compile("\n{2,}")
+    r_stripspace = re.compile(r"^[ \t]+$", re.MULTILINE)
+    def parse(self, text):
+        self.urls = {}
+        self.titles = {}
+        self.html_blocks = {}
+        self.list_level = 0
+        
+        text = text.replace("\r\n", "\n")
+        text = text.replace("\r", "\n")
+        text += "\n\n"
+        text = self._Detab(text)
+        text = self.r_stripspace.sub("", text)
+        text = self._HashHTMLBlocks(text)
+        text = self._StripLinkDefinitions(text)
+        text = self._RunBlockGamut(text)
+        text = self._UnescapeSpecialChars(text)
+        return text
+    
+    r_StripLinkDefinitions = re.compile(r"""
+    ^[ ]{0,%d}\[(.+)\]:  # id = $1
+      [ \t]*\n?[ \t]*
+    <?(\S+?)>?           # url = $2
+      [ \t]*\n?[ \t]*
+    (?:
+      (?<=\s)            # lookbehind for whitespace
+      [\"\(]             # " is backlashed so it colorizes our code right
+      (.+?)              # title = $3
+      [\"\)]
+      [ \t]*
+    )?                   # title is optional
+    (?:\n+|\Z)
+    """ % (tabwidth-1), re.MULTILINE|re.VERBOSE)
+    def _StripLinkDefinitions(self, text):
+        def replacefunc(matchobj):
+            (t1, t2, t3) = matchobj.groups()
+            #@@ case sensitivity?
+            self.urls[t1.lower()] = self._EncodeAmpsAndAngles(t2)
+            if t3 is not None:
+                self.titles[t1.lower()] = t3.replace('"', '&quot;')
+            return ""
+
+        text = self.r_StripLinkDefinitions.sub(replacefunc, text)
+        return text
+
+    blocktagsb = r"p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|math"
+    blocktagsa = blocktagsb + "|ins|del"
+    
+    r_HashHTMLBlocks1 = re.compile(r"""
+    (            # save in $1
+    ^            # start of line  (with /m)
+    <(%s)        # start tag = $2
+    \b           # word break
+    (.*\n)*?     # any number of lines, minimally matching
+    </\2>        # the matching end tag
+    [ \t]*       # trailing spaces/tabs
+    (?=\n+|$)    # followed by a newline or end of document
+    )
+    """ % blocktagsa, re.MULTILINE | re.VERBOSE)
+
+    r_HashHTMLBlocks2 = re.compile(r"""
+    (            # save in $1
+    ^            # start of line  (with /m)
+    <(%s)        # start tag = $2
+    \b           # word break
+    (.*\n)*?     # any number of lines, minimally matching
+    .*</\2>      # the matching end tag
+    [ \t]*       # trailing spaces/tabs
+    (?=\n+|\Z)   # followed by a newline or end of document
+    )
+    """ % blocktagsb, re.MULTILINE | re.VERBOSE)
+
+    r_HashHR = re.compile(r"""
+    (?:
+    (?<=\n\n)    # Starting after a blank line
+    |            # or
+    \A\n?        # the beginning of the doc
+    )
+    (            # save in $1
+    [ ]{0,%d}
+    <(hr)        # start tag = $2
+    \b           # word break
+    ([^<>])*?    # 
+    /?>          # the matching end tag
+    [ \t]*
+    (?=\n{2,}|\Z)# followed by a blank line or end of document
+    )
+    """ % (tabwidth-1), re.VERBOSE)
+    r_HashComment = re.compile(r"""
+    (?:
+    (?<=\n\n)    # Starting after a blank line
+    |            # or
+    \A\n?        # the beginning of the doc
+    )
+    (            # save in $1
+    [ ]{0,%d}
+    (?: 
+      <!
+      (--.*?--\s*)+
+      >
+    )
+    [ \t]*
+    (?=\n{2,}|\Z)# followed by a blank line or end of document
+    )
+    """ % (tabwidth-1), re.VERBOSE)
+
+    def _HashHTMLBlocks(self, text):
+        def handler(m):
+            key = md5.new(m.group(1)).hexdigest()
+            self.html_blocks[key] = m.group(1)
+            return "\n\n%s\n\n" % key
+
+        text = self.r_HashHTMLBlocks1.sub(handler, text)
+        text = self.r_HashHTMLBlocks2.sub(handler, text)
+        oldtext = text
+        text = self.r_HashHR.sub(handler, text)
+        text = self.r_HashComment.sub(handler, text)
+        return text
+
+    #@@@ wrong!
+    r_hr1 = re.compile(r'^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$', re.M)
+    r_hr2 = re.compile(r'^[ ]{0,2}([ ]?-[ ]?){3,}[ \t]*$', re.M)
+    r_hr3 = re.compile(r'^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$', re.M)
+	
+    def _RunBlockGamut(self, text):
+        text = self._DoHeaders(text)
+        for x in [self.r_hr1, self.r_hr2, self.r_hr3]:
+            text = x.sub("\n<hr%s\n" % self.emptyelt, text);
+        text = self._DoLists(text)
+        text = self._DoCodeBlocks(text)
+        text = self._DoBlockQuotes(text)
+
+    	# We did this in parse()
+    	# to escape the source
+    	# now it's stuff _we_ made
+    	# so we don't wrap it in <p>s.
+        text = self._HashHTMLBlocks(text)
+        text = self._FormParagraphs(text)
+        return text
+
+    r_NewLine = re.compile(" {2,}\n")
+    def _RunSpanGamut(self, text):
+        text = self._DoCodeSpans(text)
+        text = self._EscapeSpecialChars(text)
+        text = self._DoImages(text)
+        text = self._DoAnchors(text)
+        text = self._DoAutoLinks(text)
+        text = self._EncodeAmpsAndAngles(text)
+        text = self._DoItalicsAndBold(text)
+        text = self.r_NewLine.sub(" <br%s\n" % self.emptyelt, text)
+        return text
+
+    def _EscapeSpecialChars(self, text):
+        tokens = self._TokenizeHTML(text)
+        text = ""
+        for cur_token in tokens:
+            if cur_token[0] == "tag":
+                cur_token[1] = cur_token[1].replace('*', self.escapetable["*"])
+                cur_token[1] = cur_token[1].replace('_', self.escapetable["_"])
+                text += cur_token[1]
+            else:
+                text += self._EncodeBackslashEscapes(cur_token[1])
+        return text
+
+    r_DoAnchors1 = re.compile(
+          r""" (                 # wrap whole match in $1
+                  \[
+                    (.*?)        # link text = $2 
+                    # [for bracket nesting, see below]
+                  \]
+
+                  [ ]?           # one optional space
+                  (?:\n[ ]*)?    # one optional newline followed by spaces
+
+                  \[
+                    (.*?)        # id = $3
+                  \]
+                )
+    """, re.S|re.VERBOSE)
+    r_DoAnchors2 = re.compile(
+          r""" (                   # wrap whole match in $1
+                  \[
+                    (.*?)          # link text = $2
+                  \]
+                  \(               # literal paren
+                        [ \t]*
+                        <?(.+?)>?  # href = $3
+                        [ \t]*
+                        (          # $4
+                          ([\'\"]) # quote char = $5
+                          (.*?)    # Title = $6
+                          \5       # matching quote
+                        )?         # title is optional
+                  \)
+                )
+    """, re.S|re.VERBOSE)
+    def _DoAnchors(self, text): 
+        # We here don't do the same as the perl version, as python's regex
+        # engine gives us no way to match brackets.
+
+        def handler1(m):
+            whole_match = m.group(1)
+            link_text = m.group(2)
+            link_id = m.group(3).lower()
+            if not link_id: link_id = link_text.lower()
+            title = self.titles.get(link_id, None)
+                
+
+            if self.urls.has_key(link_id):
+                url = self.urls[link_id]
+                url = url.replace("*", self.escapetable["*"])
+                url = url.replace("_", self.escapetable["_"])
+                res = '<a href="%s"' % htmlquote(url)
+
+                if title:
+                    title = title.replace("*", self.escapetable["*"])
+                    title = title.replace("_", self.escapetable["_"])
+                    res += ' title="%s"' % htmlquote(title)
+                res += ">%s</a>" % htmlquote(link_text)
+            else:
+                res = whole_match
+            return res
+
+        def handler2(m):
+            whole_match = m.group(1)
+            link_text = m.group(2)
+            url = m.group(3)
+            title = m.group(6)
+
+            url = url.replace("*", self.escapetable["*"])
+            url = url.replace("_", self.escapetable["_"])
+            res = '''<a href="%s"''' % htmlquote(url)
+            
+            if title:
+                title = title.replace('"', '&quot;')
+                title = title.replace("*", self.escapetable["*"])
+                title = title.replace("_", self.escapetable["_"])
+                res += ' title="%s"' % htmlquote(title)
+            res += ">%s</a>" % htmlquote(link_text)
+            return res
+
+        text = self.r_DoAnchors1.sub(handler1, text)
+        text = self.r_DoAnchors2.sub(handler2, text)
+        return text
+
+    r_DoImages1 = re.compile(
+           r""" (                       # wrap whole match in $1
+                  !\[
+                    (.*?)               # alt text = $2
+                  \]
+
+                  [ ]?                  # one optional space
+                  (?:\n[ ]*)?           # one optional newline followed by spaces
+
+                  \[
+                    (.*?)               # id = $3
+                  \]
+
+                )
+    """, re.VERBOSE|re.S)
+
+    r_DoImages2 = re.compile(
+          r""" (                        # wrap whole match in $1
+                  !\[
+                    (.*?)               # alt text = $2
+                  \]
+                  \(                    # literal paren
+                        [ \t]*
+                        <?(\S+?)>?      # src url = $3
+                        [ \t]*
+                        (               # $4
+                        ([\'\"])        # quote char = $5
+                          (.*?)         # title = $6
+                          \5            # matching quote
+                          [ \t]*
+                        )?              # title is optional
+                  \)
+                )
+    """, re.VERBOSE|re.S)
+
+    def _DoImages(self, text):
+        def handler1(m):
+            whole_match = m.group(1)
+            alt_text = m.group(2)
+            link_id = m.group(3).lower()
+
+            if not link_id:
+                link_id = alt_text.lower()
+
+            alt_text = alt_text.replace('"', "&quot;")
+            if self.urls.has_key(link_id):
+                url = self.urls[link_id]
+                url = url.replace("*", self.escapetable["*"])
+                url = url.replace("_", self.escapetable["_"])
+                res = '''<img src="%s" alt="%s"''' % (htmlquote(url), htmlquote(alt_text))
+                if self.titles.has_key(link_id):
+                    title = self.titles[link_id]
+                    title = title.replace("*", self.escapetable["*"])
+                    title = title.replace("_", self.escapetable["_"])
+                    res += ' title="%s"' % htmlquote(title)
+                res += self.emptyelt
+            else:
+                res = whole_match
+            return res
+
+        def handler2(m):
+            whole_match = m.group(1)
+            alt_text = m.group(2)
+            url = m.group(3)
+            title = m.group(6) or ''
+            
+            alt_text = alt_text.replace('"', "&quot;")
+            title = title.replace('"', "&quot;")
+            url = url.replace("*", self.escapetable["*"])
+            url = url.replace("_", self.escapetable["_"])
+            res = '<img src="%s" alt="%s"' % (htmlquote(url), htmlquote(alt_text))
+            if title is not None:
+                title = title.replace("*", self.escapetable["*"])
+                title = title.replace("_", self.escapetable["_"])
+                res += ' title="%s"' % htmlquote(title)
+            res += self.emptyelt
+            return res
+
+        text = self.r_DoImages1.sub(handler1, text)
+        text = self.r_DoImages2.sub(handler2, text)
+        return text
+    
+    r_DoHeaders = re.compile(r"^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+", re.VERBOSE|re.M)
+    def _DoHeaders(self, text):
+        def findheader(text, c, n):
+            textl = text.split('\n')
+            for i in range(len(textl)):
+                if i >= len(textl): continue
+                count = textl[i].strip().count(c)
+                if count > 0 and count == len(textl[i].strip()) and textl[i+1].strip() == '' and textl[i-1].strip() != '':
+                    textl = textl[:i] + textl[i+1:]
+                    textl[i-1] = '<h'+n+'>'+self._RunSpanGamut(textl[i-1])+'</h'+n+'>'
+                    textl = textl[:i] + textl[i+1:]
+            text = '\n'.join(textl)
+            return text
+        
+        def handler(m):
+            level = len(m.group(1))
+            header = self._RunSpanGamut(m.group(2))
+            return "<h%s>%s</h%s>\n\n" % (level, header, level)
+
+        text = findheader(text, '=', '1')
+        text = findheader(text, '-', '2')
+        text = self.r_DoHeaders.sub(handler, text)
+        return text
+    
+    rt_l = r"""
+    (
+      (
+        [ ]{0,%d}
+        ([*+-]|\d+[.])
+        [ \t]+
+      )
+      (?:.+?)
+      (
+        \Z
+      |
+        \n{2,}
+        (?=\S)
+        (?![ \t]* ([*+-]|\d+[.])[ \t]+)
+      )
+    )
+    """ % (tabwidth - 1)
+    r_DoLists = re.compile('^'+rt_l, re.M | re.VERBOSE | re.S)
+    r_DoListsTop = re.compile(
+      r'(?:\A\n?|(?<=\n\n))'+rt_l, re.M | re.VERBOSE | re.S)
+    
+    def _DoLists(self, text):
+        def handler(m):
+            list_type = "ol"
+            if m.group(3) in [ "*", "-", "+" ]:
+                list_type = "ul"
+            listn = m.group(1)
+            listn = self.r_multiline.sub("\n\n\n", listn)
+            res = self._ProcessListItems(listn)
+            res = "<%s>\n%s</%s>\n" % (list_type, res, list_type)
+            return res
+            
+        if self.list_level:
+            text = self.r_DoLists.sub(handler, text)
+        else:
+            text = self.r_DoListsTop.sub(handler, text)
+        return text
+
+    r_multiend = re.compile(r"\n{2,}\Z")
+    r_ProcessListItems = re.compile(r"""
+    (\n)?                            # leading line = $1
+    (^[ \t]*)                        # leading whitespace = $2
+    ([*+-]|\d+[.]) [ \t]+            # list marker = $3
+    ((?:.+?)                         # list item text = $4
+    (\n{1,2}))
+    (?= \n* (\Z | \2 ([*+-]|\d+[.]) [ \t]+))
+    """, re.VERBOSE | re.M | re.S)
+
+    def _ProcessListItems(self, text):
+        self.list_level += 1
+        text = self.r_multiend.sub("\n", text)
+        
+        def handler(m):
+            item = m.group(4)
+            leading_line = m.group(1)
+            leading_space = m.group(2)
+
+            if leading_line or self.r_multiline.search(item):
+                item = self._RunBlockGamut(self._Outdent(item))
+            else:
+                item = self._DoLists(self._Outdent(item))
+                if item[-1] == "\n": item = item[:-1] # chomp
+                item = self._RunSpanGamut(item)
+            return "<li>%s</li>\n" % item
+
+        text = self.r_ProcessListItems.sub(handler, text)
+        self.list_level -= 1
+        return text
+    
+    r_DoCodeBlocks = re.compile(r"""
+    (?:\n\n|\A)
+    (                 # $1 = the code block
+    (?:
+    (?:[ ]{%d} | \t)  # Lines must start with a tab or equiv
+    .*\n+
+    )+
+    )
+    ((?=^[ ]{0,%d}\S)|\Z) # Lookahead for non-space/end of doc
+    """ % (tabwidth, tabwidth), re.M | re.VERBOSE)
+    def _DoCodeBlocks(self, text):
+        def handler(m):
+            codeblock = m.group(1)
+            codeblock = self._EncodeCode(self._Outdent(codeblock))
+            codeblock = self._Detab(codeblock)
+            codeblock = codeblock.lstrip("\n")
+            codeblock = codeblock.rstrip()
+            res = "\n\n<pre><code>%s\n</code></pre>\n\n" % codeblock
+            return res
+
+        text = self.r_DoCodeBlocks.sub(handler, text)
+        return text
+    r_DoCodeSpans = re.compile(r"""
+    (`+)            # $1 = Opening run of `
+    (.+?)           # $2 = The code block
+    (?<!`)
+    \1              # Matching closer
+    (?!`)
+    """, re.I|re.VERBOSE)
+    def _DoCodeSpans(self, text):
+        def handler(m):
+            c = m.group(2)
+            c = c.strip()
+            c = self._EncodeCode(c)
+            return "<code>%s</code>" % c
+
+        text = self.r_DoCodeSpans.sub(handler, text)
+        return text
+    
+    def _EncodeCode(self, text):
+        text = text.replace("&","&amp;")
+        text = text.replace("<","&lt;")
+        text = text.replace(">","&gt;")
+        for c in "*_{}[]\\":
+            text = text.replace(c, self.escapetable[c])
+        return text
+
+    
+    r_DoBold = re.compile(r"(\*\*|__) (?=\S) (.+?[*_]*) (?<=\S) \1", re.VERBOSE | re.S)
+    r_DoItalics = re.compile(r"(\*|_) (?=\S) (.+?) (?<=\S) \1", re.VERBOSE | re.S)
+    def _DoItalicsAndBold(self, text):
+        text = self.r_DoBold.sub(r"<strong>\2</strong>", text)
+        text = self.r_DoItalics.sub(r"<em>\2</em>", text)
+        return text
+    
+    r_start = re.compile(r"^", re.M)
+    r_DoBlockQuotes1 = re.compile(r"^[ \t]*>[ \t]?", re.M)
+    r_DoBlockQuotes2 = re.compile(r"^[ \t]+$", re.M)
+    r_DoBlockQuotes3 = re.compile(r"""
+    (                       # Wrap whole match in $1
+     (
+       ^[ \t]*>[ \t]?       # '>' at the start of a line
+       .+\n                 # rest of the first line
+       (.+\n)*              # subsequent consecutive lines
+       \n*                  # blanks
+      )+
+    )""", re.M | re.VERBOSE)
+    r_protectpre = re.compile(r'(\s*<pre>.+?</pre>)', re.S)
+    r_propre = re.compile(r'^  ', re.M)
+
+    def _DoBlockQuotes(self, text):
+        def prehandler(m):
+            return self.r_propre.sub('', m.group(1))
+                
+        def handler(m):
+            bq = m.group(1)
+            bq = self.r_DoBlockQuotes1.sub("", bq)
+            bq = self.r_DoBlockQuotes2.sub("", bq)
+            bq = self._RunBlockGamut(bq)
+            bq = self.r_start.sub("  ", bq)
+            bq = self.r_protectpre.sub(prehandler, bq)
+            return "<blockquote>\n%s\n</blockquote>\n\n" % bq
+            
+        text = self.r_DoBlockQuotes3.sub(handler, text)
+        return text
+
+    r_tabbed = re.compile(r"^([ \t]*)")
+    def _FormParagraphs(self, text):
+        text = text.strip("\n")
+        grafs = self.r_multiline.split(text)
+
+        for g in range(len(grafs)):
+            t = grafs[g].strip() #@@?
+            if not self.html_blocks.has_key(t):
+                t = self._RunSpanGamut(t)
+                t = self.r_tabbed.sub(r"<p>", t)
+                t += "</p>"
+                grafs[g] = t
+
+        for g in range(len(grafs)):
+            t = grafs[g].strip()
+            if self.html_blocks.has_key(t):
+                grafs[g] = self.html_blocks[t]
+        
+        return "\n\n".join(grafs)
+
+    r_EncodeAmps = re.compile(r"&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)")
+    r_EncodeAngles = re.compile(r"<(?![a-z/?\$!])")
+    def _EncodeAmpsAndAngles(self, text):
+        text = self.r_EncodeAmps.sub("&amp;", text)
+        text = self.r_EncodeAngles.sub("&lt;", text)
+        return text
+
+    def _EncodeBackslashEscapes(self, text):
+        for char in self.escapechars:
+            text = text.replace("\\" + char, self.escapetable[char])
+        return text
+    
+    r_link = re.compile(r"<((https?|ftp):[^\'\">\s]+)>", re.I)
+    r_email = re.compile(r"""
+      <
+      (?:mailto:)?
+      (
+         [-.\w]+
+         \@
+         [-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+
+      )
+      >""", re.VERBOSE|re.I)
+    def _DoAutoLinks(self, text):
+        text = self.r_link.sub(r'<a href="\1">\1</a>', text)
+
+        def handler(m):
+            l = m.group(1)
+            return self._EncodeEmailAddress(self._UnescapeSpecialChars(l))
+    
+        text = self.r_email.sub(handler, text)
+        return text
+    
+    r_EncodeEmailAddress = re.compile(r">.+?:")
+    def _EncodeEmailAddress(self, text):
+        encode = [
+            lambda x: "&#%s;" % ord(x),
+            lambda x: "&#x%X;" % ord(x),
+            lambda x: x
+        ]
+
+        text = "mailto:" + text
+        addr = ""
+        for c in text:
+            if c == ':': addr += c; continue
+            
+            r = semirandom(addr)
+            if r < 0.45:
+                addr += encode[1](c)
+            elif r > 0.9 and c != '@':
+                addr += encode[2](c)
+            else:
+                addr += encode[0](c)
+
+        text = '<a href="%s">%s</a>' % (addr, addr)
+        text = self.r_EncodeEmailAddress.sub('>', text)
+        return text
+
+    def _UnescapeSpecialChars(self, text):
+        for key in self.escapetable.keys():
+            text = text.replace(self.escapetable[key], key)
+        return text
+    
+    tokenize_depth = 6
+    tokenize_nested_tags = '|'.join([r'(?:<[a-z/!$](?:[^<>]'] * tokenize_depth) + (')*>)' * tokenize_depth)
+    r_TokenizeHTML = re.compile(
+      r"""(?: <! ( -- .*? -- \s* )+ > ) |  # comment
+          (?: <\? .*? \?> ) |              # processing instruction
+          %s                               # nested tags
+    """ % tokenize_nested_tags, re.I|re.VERBOSE)
+    def _TokenizeHTML(self, text):
+        pos = 0
+        tokens = []
+        matchobj = self.r_TokenizeHTML.search(text, pos)
+        while matchobj:
+            whole_tag = matchobj.string[matchobj.start():matchobj.end()]
+            sec_start = matchobj.end()
+            tag_start = sec_start - len(whole_tag)
+            if pos < tag_start:
+                tokens.append(["text", matchobj.string[pos:tag_start]])
+
+            tokens.append(["tag", whole_tag])
+            pos = sec_start
+            matchobj = self.r_TokenizeHTML.search(text, pos)
+
+        if pos < len(text):
+            tokens.append(["text", text[pos:]])
+        return tokens
+
+    r_Outdent = re.compile(r"""^(\t|[ ]{1,%d})""" % tabwidth, re.M)
+    def _Outdent(self, text):
+        text = self.r_Outdent.sub("", text)
+        return text    
+
+    def _Detab(self, text): return text.expandtabs(self.tabwidth)
+
+def Markdown(*args, **kw): return _Markdown().parse(*args, **kw)
+markdown = Markdown
+
+if __name__ == '__main__':
+    if len(sys.argv) > 1:
+        print(Markdown(open(sys.argv[1]).read()))
+    else:
+        print(Markdown(sys.stdin.read()))
diff --git a/third_party/oauth2client b/third_party/oauth2client
new file mode 120000
index 0000000..3dbb7f9
--- /dev/null
+++ b/third_party/oauth2client
@@ -0,0 +1 @@
+../../third_party/oauth2client/oauth2client
\ No newline at end of file
diff --git a/third_party/uritemplate b/third_party/uritemplate
new file mode 120000
index 0000000..cb108c1
--- /dev/null
+++ b/third_party/uritemplate
@@ -0,0 +1 @@
+../../third_party/uritemplate/uritemplate
\ No newline at end of file
diff --git a/tools/attach-relations.sql b/tools/attach-relations.sql
new file mode 100644
index 0000000..3371c56
--- /dev/null
+++ b/tools/attach-relations.sql
@@ -0,0 +1,93 @@
+-- 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
+
+
+DROP PROCEDURE IF EXISTS AttachDanglingRelations;
+
+delimiter //
+
+CREATE PROCEDURE AttachDanglingRelations()
+BEGIN
+  DROP TEMPORARY TABLE IF EXISTS temp_relations;
+
+  CREATE TEMPORARY TABLE temp_relations (
+    old_issue_id INT,
+    old_dst_issue_project VARCHAR(80) COLLATE utf8_unicode_ci,
+    old_dst_issue_local_id INT,
+    old_kind enum('blockedon','blocking','mergedinto') COLLATE utf8_unicode_ci,
+    new_issue_id INT,
+    new_dst_issue_id INT,
+    new_kind enum('blockedon','blocking','mergedinto') COLLATE utf8_unicode_ci
+  );
+
+  INSERT INTO temp_relations
+  SELECT
+    dir.issue_id AS old_issue_id,
+    dir.dst_issue_project AS old_dst_issue_project,
+    dir.dst_issue_local_id AS old_dst_issue_local_id,
+    dir.kind AS old_kind,
+    dir.issue_id AS new_issue_id,
+    i.id AS new_dst_issue_id,
+    dir.kind AS new_kind
+  FROM Issue i
+  JOIN Project p
+  ON i.project_id=p.project_id
+  JOIN DanglingIssueRelation dir
+  ON dir.dst_issue_local_id=i.local_id
+  AND dir.dst_issue_project=p.project_name
+  WHERE dir.kind='blockedon';
+
+  INSERT INTO temp_relations
+  SELECT
+    dir.issue_id AS old_issue_id,
+    dir.dst_issue_project AS old_dst_issue_project,
+    dir.dst_issue_local_id AS old_dst_issue_local_id,
+    dir.kind AS old_kind,
+    dir.issue_id AS new_issue_id,
+    i.id AS new_dst_issue_id,
+    dir.kind AS new_kind
+  FROM Issue i
+  JOIN Project p
+  ON i.project_id=p.project_id
+  JOIN DanglingIssueRelation dir
+  ON dir.dst_issue_local_id=i.local_id
+  AND dir.dst_issue_project=p.project_name
+  WHERE dir.kind='mergedinto';
+
+  INSERT INTO temp_relations
+  SELECT
+    dir.issue_id AS old_issue_id,
+    dir.dst_issue_project AS old_dst_issue_project,
+    dir.dst_issue_local_id AS old_dst_issue_local_id,
+    dir.kind AS old_kind,
+    i.id AS new_issue_id,
+    dir.issue_id AS new_dst_issue_id,
+    'blockedon' AS new_kind
+  FROM Issue i
+  JOIN Project p
+  ON i.project_id=p.project_id
+  JOIN DanglingIssueRelation dir
+  ON dir.dst_issue_local_id=i.local_id
+  AND dir.dst_issue_project=p.project_name
+  WHERE dir.kind='blocking';
+
+  INSERT IGNORE INTO IssueRelation
+  SELECT new_issue_id, new_dst_issue_id, new_kind
+  FROM temp_relations;
+
+  DELETE from DanglingIssueRelation
+  WHERE EXISTS (
+    SELECT NULL FROM temp_relations
+    WHERE issue_id=old_issue_id
+    AND dst_issue_project=old_dst_issue_project
+    AND dst_issue_local_id=old_dst_issue_local_id
+    AND kind=old_kind
+  );
+
+END;
+//
+
+delimiter ;
diff --git a/tools/backfill-commentcontent-id.sql b/tools/backfill-commentcontent-id.sql
new file mode 100644
index 0000000..2b2e3c2
--- /dev/null
+++ b/tools/backfill-commentcontent-id.sql
@@ -0,0 +1,101 @@
+-- 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
+
+
+DROP PROCEDURE IF EXISTS BackfillCommentContentID;
+
+delimiter //
+
+CREATE PROCEDURE BackfillCommentContentID(
+    IN in_start INT, IN in_stop INT, IN in_step INT)
+BEGIN
+  comment_loop: LOOP
+    IF in_start >= in_stop THEN
+      LEAVE comment_loop;
+    END IF;
+
+    SELECT in_start AS StartingAt;
+    SELECT count(*)
+    FROM CommentContent
+    WHERE comment_id >= in_start
+    AND comment_id < in_start + in_step;
+
+    DROP TEMPORARY TABLE IF EXISTS temp_comment;
+    CREATE TEMPORARY TABLE temp_comment (
+      id INT NOT NULL,
+      issue_id INT NOT NULL,
+      created INT NOT NULL,
+      project_id SMALLINT UNSIGNED NOT NULL,
+      commenter_id INT UNSIGNED NOT NULL,
+      commentcontent_id INT UNSIGNED NOT NULL,
+      deleted_by INT UNSIGNED,
+      is_spam BOOLEAN DEFAULT FALSE,
+      is_description BOOLEAN DEFAULT FALSE,
+
+      PRIMARY KEY(id)
+    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+
+    INSERT INTO temp_comment
+    SELECT Comment.id, Comment.issue_id, Comment.created, Comment.project_id,
+           Comment.commenter_id, CommentContent.id,
+           Comment.deleted_by, Comment.is_spam, Comment.is_description
+    FROM Comment
+    LEFT JOIN CommentContent on CommentContent.comment_id = Comment.id
+    WHERE CommentContent.comment_id >= in_start
+    AND CommentContent.comment_id < in_start + in_step;
+
+
+    REPLACE INTO Comment (id, issue_id, created, project_id, commenter_id,
+        commentcontent_id, deleted_by, is_spam, is_description)
+    SELECT id, issue_id, created, project_id, commenter_id,
+        commentcontent_id, deleted_by, is_spam, is_description
+    FROM temp_comment;
+
+    SET in_start = in_start + in_step;
+
+  END LOOP;
+
+END;
+
+
+//
+
+
+delimiter ;
+
+
+-- Temporarily disable these foreign key references so that we can do
+-- REPLACE commands.
+-- ALTER TABLE SpamReport DROP FOREIGN KEY spamreport_ibfk_2;
+-- ALTER TABLE SpamVerdict DROP FOREIGN KEY spamverdict_ibfk_2;
+
+-- If run locally do all at once:
+-- CALL BackfillCommentContentID(           0,  1 * 1000000, 10000);
+
+-- If run on staging or production, do it in steps and check that
+-- users are not hitting errors or timeouts as you go:
+-- CALL BackfillCommentContentID(           0, 13 * 1000000, 10000);
+-- CALL BackfillCommentContentID(13 * 1000000, 16 * 1000000, 10000);
+-- CALL BackfillCommentContentID(16 * 1000000, 17 * 1000000, 10000);
+-- CALL BackfillCommentContentID(17 * 1000000, 18 * 1000000, 10000);
+-- CALL BackfillCommentContentID(18 * 1000000, 19 * 1000000, 10000);
+-- CALL BackfillCommentContentID(19 * 1000000, 20 * 1000000, 10000);
+-- CALL BackfillCommentContentID(20 * 1000000, 21 * 1000000, 10000);
+-- CALL BackfillCommentContentID(21 * 1000000, 22 * 1000000, 10000);
+-- CALL BackfillCommentContentID(22 * 1000000, 23 * 1000000, 10000);
+-- CALL BackfillCommentContentID(23 * 1000000, 24 * 1000000, 10000);
+-- CALL BackfillCommentContentID(24 * 1000000, 25 * 1000000, 10000);
+-- CALL BackfillCommentContentID(25 * 1000000, 26 * 1000000, 10000);
+-- CALL BackfillCommentContentID(26 * 1000000, 27 * 1000000, 10000);
+-- CALL BackfillCommentContentID(27 * 1000000, 28 * 1000000, 10000);
+-- CALL BackfillCommentContentID(28 * 1000000, 29 * 1000000, 10000);
+-- CALL BackfillCommentContentID(29 * 1000000, 30 * 1000000, 10000);
+-- CALL BackfillCommentContentID(30 * 1000000, 40 * 1000000, 10000);
+
+-- Add back foreign key constraints.
+-- ALTER TABLE SpamReport ADD FOREIGN KEY (comment_id) REFERENCES Comment(id);
+-- ALTER TABLE SpamVerdict ADD FOREIGN KEY (comment_id) REFERENCES Comment(id);
diff --git a/tools/backfill-issue-snapshots.sql b/tools/backfill-issue-snapshots.sql
new file mode 100644
index 0000000..d60ff77
--- /dev/null
+++ b/tools/backfill-issue-snapshots.sql
@@ -0,0 +1,260 @@
+-- Copyright 2018 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
+
+
+DROP PROCEDURE IF EXISTS BackfillIssueSnapshotsCcs;
+DROP PROCEDURE IF EXISTS BackfillIssueSnapshotsComponents;
+DROP PROCEDURE IF EXISTS BackfillIssueSnapshotsLabels;
+DROP PROCEDURE IF EXISTS BackfillIssueSnapshotsHotlists;
+DROP PROCEDURE IF EXISTS BackfillIssueSnapshotsChunk;
+DROP PROCEDURE IF EXISTS BackfillIssueSnapshotsManyChunks;
+
+delimiter //
+
+CREATE PROCEDURE BackfillIssueSnapshotsLabels(IN c_issue_id INT, IN c_issuesnapshot_id INT)
+BEGIN
+
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_label_id INT;
+
+  DECLARE curs CURSOR FOR
+    SELECT label_id
+    FROM Issue2Label
+    WHERE issue_id = c_issue_id;
+
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+  OPEN curs;
+
+  label_loop: LOOP
+    FETCH curs INTO c_label_id;
+    IF done THEN
+      LEAVE label_loop;
+    END IF;
+
+    INSERT INTO IssueSnapshot2Label
+      (issuesnapshot_id, label_id)
+      VALUES
+      (c_issuesnapshot_id, c_label_id);
+
+  END LOOP;
+
+  CLOSE curs;
+END;
+
+
+CREATE PROCEDURE BackfillIssueSnapshotsCcs(IN c_issue_id INT, IN c_issuesnapshot_id INT)
+BEGIN
+
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_cc_id INT UNSIGNED;
+
+  DECLARE curs CURSOR FOR
+    SELECT cc_id
+    FROM Issue2Cc
+    WHERE issue_id = c_issue_id;
+
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+  OPEN curs;
+
+  cc_loop: LOOP
+    FETCH curs INTO c_cc_id;
+    IF done THEN
+      LEAVE cc_loop;
+    END IF;
+
+    INSERT INTO IssueSnapshot2Cc
+      (issuesnapshot_id, cc_id)
+      VALUES
+      (c_issuesnapshot_id, c_cc_id);
+
+  END LOOP;
+
+  CLOSE curs;
+END;
+
+
+CREATE PROCEDURE BackfillIssueSnapshotsComponents(IN c_issue_id INT, IN c_issuesnapshot_id INT)
+BEGIN
+
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_component_id INT;
+
+  DECLARE curs CURSOR FOR
+    SELECT component_id
+    FROM Issue2Component
+    WHERE issue_id = c_issue_id;
+
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+  OPEN curs;
+
+  component_loop: LOOP
+    FETCH curs INTO c_component_id;
+    IF done THEN
+      LEAVE component_loop;
+    END IF;
+
+    INSERT INTO IssueSnapshot2Component
+      (issuesnapshot_id, component_id)
+      VALUES
+      (c_issuesnapshot_id, c_component_id);
+
+  END LOOP;
+
+  CLOSE curs;
+END;
+
+
+CREATE PROCEDURE BackfillIssueSnapshotsHotlists(IN c_issue_id INT, IN c_issuesnapshot_id INT)
+BEGIN
+
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_hotlist_id INT;
+
+  DECLARE curs CURSOR FOR
+    SELECT hotlist_id
+    FROM Hotlist2Issue
+    WHERE issue_id = c_issue_id;
+
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+  OPEN curs;
+
+  hotlist_loop: LOOP
+    FETCH curs INTO c_hotlist_id;
+    IF done THEN
+      LEAVE hotlist_loop;
+    END IF;
+
+    INSERT INTO IssueSnapshot2Hotlist
+      (issuesnapshot_id, hotlist_id)
+      VALUES
+      (c_issuesnapshot_id, c_hotlist_id);
+
+  END LOOP;
+
+  CLOSE curs;
+END;
+
+
+CREATE PROCEDURE BackfillIssueSnapshotsChunk(IN chunk_size INT UNSIGNED,
+  IN chunk_offset INT UNSIGNED)
+BEGIN
+
+  DECLARE done TINYINT DEFAULT FALSE;
+
+  DECLARE c_issue_id INT;
+  DECLARE c_issue_shard INT;
+  DECLARE c_issue_project_id INT;
+  DECLARE c_issue_local_id INT;
+  DECLARE c_issue_status_id INT;
+  DECLARE c_issue_opened INT;
+  DECLARE c_issue_closed INT;
+  DECLARE c_issue_is_open BOOLEAN;
+  DECLARE c_reporter_id INT UNSIGNED;
+  DECLARE c_owner_id INT UNSIGNED;
+  DECLARE c_issuesnapshot_id INT;
+  DECLARE total_counter INT UNSIGNED DEFAULT 0;
+  DECLARE write_counter INT UNSIGNED DEFAULT 0;
+
+  DECLARE curs CURSOR FOR
+    SELECT i.id, i.shard, i.project_id, i.local_id, i.status_id, i.opened,
+      -- If a snapshot for this Issue already exists, make the new snapshot's
+      -- period_end the period_start of the existing snapshot.
+      (SELECT IFNULL((
+          SELECT period_start
+          FROM IssueSnapshot
+          WHERE issue_id = i.id
+          ORDER BY period_start ASC
+          LIMIT 1
+      ), 4294967295)),
+      sd.means_open,
+      i.reporter_id, i.owner_id
+    FROM Issue i
+    JOIN StatusDef sd ON i.status_id = sd.id
+    WHERE i.id >= chunk_offset AND i.id < chunk_offset + chunk_size;
+
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+  OPEN curs;
+
+  issue_loop: LOOP
+    FETCH curs INTO c_issue_id, c_issue_shard, c_issue_project_id,
+      c_issue_local_id, c_issue_status_id, c_issue_opened, c_issue_closed,
+      c_issue_is_open, c_reporter_id, c_owner_id;
+    IF done THEN
+      SELECT 'Final chunk status',
+        c_issue_id AS 'Processing Issue ID:',
+        total_counter AS 'Issues fetched',
+        write_counter AS 'Snapshots written';
+      LEAVE issue_loop;
+    END IF;
+
+    -- Indicate progress.
+    IF (SELECT c_issue_id % 100 = 0) THEN
+      SELECT 'Chunk status',
+        c_issue_id AS 'Processing Issue ID:',
+        total_counter AS 'Issues fetched',
+        write_counter AS 'Snapshots written';
+    END IF;
+
+    SET total_counter = total_counter + 1;
+
+    INSERT INTO IssueSnapshot
+    (issue_id, shard, project_id, local_id, status_id, period_start,
+    period_end, is_open, reporter_id, owner_id)
+    VALUES
+    (c_issue_id, c_issue_shard, c_issue_project_id,
+    c_issue_local_id, c_issue_status_id, c_issue_opened,
+    c_issue_closed, c_issue_is_open, c_reporter_id, c_owner_id);
+
+    SET write_counter = write_counter + 1;
+
+    SET c_issuesnapshot_id = LAST_INSERT_ID();
+    -- Add a tiny sleep here to reduce replication pressure on write.
+    SET @throwaway = (SELECT SLEEP(0.1));
+
+    -- Backfill labels.
+    CALL BackfillIssueSnapshotsLabels(c_issue_id, c_issuesnapshot_id);
+    CALL BackfillIssueSnapshotsCcs(c_issue_id, c_issuesnapshot_id);
+    CALL BackfillIssueSnapshotsComponents(c_issue_id, c_issuesnapshot_id);
+    CALL BackfillIssueSnapshotsHotlists(c_issue_id, c_issuesnapshot_id);
+
+  END LOOP;
+
+  CLOSE curs;
+END;
+
+
+CREATE PROCEDURE BackfillIssueSnapshotsManyChunks(
+  IN num_chunks SMALLINT UNSIGNED,
+  IN chunk_size SMALLINT UNSIGNED)
+BEGIN
+  DECLARE chunk_i INT DEFAULT 0;
+
+  -- Handle no results found ("cursor is not open")
+  DECLARE CONTINUE HANDLER FOR SQLSTATE '24000' BEGIN END;
+
+  WHILE chunk_i < num_chunks DO
+
+    SELECT CONCAT('Backfilling chunk ', chunk_i + 1, ' of ', num_chunks) AS '';
+    SELECT chunk_size, chunk_i, chunk_i * chunk_size AS 'chunk offset';
+
+    CALL BackfillIssueSnapshotsChunk(chunk_size, chunk_i * chunk_size);
+
+    SELECT SLEEP(1);
+
+    SET chunk_i = chunk_i + 1;
+  END WHILE;
+END;
+
+
+//
+
+
+delimiter ;
diff --git a/tools/backfill-issue-timestamps.sql b/tools/backfill-issue-timestamps.sql
new file mode 100644
index 0000000..0cc84a8
--- /dev/null
+++ b/tools/backfill-issue-timestamps.sql
@@ -0,0 +1,90 @@
+-- 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
+
+
+DROP PROCEDURE IF EXISTS BackfillIssueTimestampsChunk;
+DROP PROCEDURE IF EXISTS BackfillIssueTimestampsManyChunks;
+
+delimiter //
+
+CREATE PROCEDURE BackfillIssueTimestampsChunk(
+    IN in_pid SMALLINT UNSIGNED, IN in_chunk_size SMALLINT UNSIGNED)
+BEGIN
+
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_issue_id INT;
+
+  DECLARE curs CURSOR FOR
+    SELECT id FROM Issue
+    WHERE project_id=in_pid
+    AND (owner_modified = 0 OR owner_modified IS NULL)
+    AND (status_modified = 0 OR status_modified IS NULL)
+    AND (component_modified = 0 OR component_modified IS NULL)
+    LIMIT in_chunk_size;
+
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+  OPEN curs;
+
+  issue_loop: LOOP
+    FETCH curs INTO c_issue_id;
+    IF done THEN
+      LEAVE issue_loop;
+    END IF;
+
+    -- Indicate progress.
+    SELECT c_issue_id AS 'Processing:';
+
+    -- Set the fields to the largest timestamp of any relevant update.
+    UPDATE Issue 
+    SET 
+    owner_modified     = (SELECT MAX(created)
+                          FROM IssueUpdate
+                          JOIN Comment ON IssueUpdate.comment_id = Comment.id
+                          WHERE field = 'owner'
+                          AND IssueUpdate.issue_id = c_issue_id),
+    status_modified    = (SELECT MAX(created)
+                          FROM IssueUpdate
+                          JOIN Comment ON IssueUpdate.comment_id = Comment.id
+                          WHERE field = 'status'
+                          AND IssueUpdate.issue_id = c_issue_id),
+    component_modified = (SELECT MAX(created)
+                          FROM IssueUpdate
+                          JOIN Comment ON IssueUpdate.comment_id = Comment.id
+                          WHERE field = 'component'
+                          AND IssueUpdate.issue_id = c_issue_id)
+    WHERE id = c_issue_id;
+
+    -- If no update was found, use the issue opened timestamp.
+    UPDATE Issue SET owner_modified = opened
+    WHERE id = c_issue_id AND owner_modified IS NULL;
+
+    UPDATE Issue SET status_modified = opened
+    WHERE id = c_issue_id AND status_modified IS NULL;
+
+    UPDATE Issue SET component_modified = opened
+    WHERE id = c_issue_id AND component_modified IS NULL;
+
+  END LOOP;
+
+  CLOSE curs;
+END;
+
+CREATE PROCEDURE BackfillIssueTimestampsManyChunks(
+    IN in_pid SMALLINT UNSIGNED, IN in_num_chunks SMALLINT UNSIGNED)
+BEGIN
+  WHILE in_num_chunks > 0 DO
+    CALL BackfillIssueTimestampsChunk(in_pid, 1000);
+    SET in_num_chunks = in_num_chunks - 1;
+  END WHILE;
+END;
+
+
+//
+
+
+delimiter ;
+
diff --git a/tools/backfill-last-visit-timestamp.sql b/tools/backfill-last-visit-timestamp.sql
new file mode 100644
index 0000000..68b17a9
--- /dev/null
+++ b/tools/backfill-last-visit-timestamp.sql
@@ -0,0 +1,67 @@
+-- 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
+
+
+DROP PROCEDURE IF EXISTS BackfillLastVisitTimestamp;
+
+delimiter //
+
+CREATE PROCEDURE BackfillLastVisitTimestamp(
+    IN in_now_ts INT, IN in_days_ago INT, IN in_num_days INT)
+BEGIN
+
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_user_id INT;
+  DECLARE c_comment_ts INT;
+
+  DECLARE curs CURSOR FOR
+    SELECT MAX(created), commenter_id FROM Comment
+    WHERE created >= in_now_ts - 60 * 60 * 24 * in_days_ago
+    AND   created < in_now_ts - 60 * 60 * 24 * (in_days_ago - in_num_days)
+    GROUP BY commenter_id
+    ORDER BY MAX(created);
+
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+  OPEN curs;
+
+  user_loop: LOOP
+    FETCH curs INTO c_comment_ts, c_user_id;
+    IF done THEN
+      LEAVE user_loop;
+    END IF;
+
+    -- Indicate progress.
+    SELECT c_comment_ts AS 'Processing:';
+
+    -- Set last_visit_timestamp for one user if not already set.
+    UPDATE User
+    SET last_visit_timestamp = IFNULL(last_visit_timestamp, c_comment_ts)
+    WHERE user_id = c_user_id;
+
+  END LOOP;
+
+END;
+
+
+//
+
+
+delimiter ;
+
+
+-- If run locally do all at once:
+-- CALL BackfillLastVisitTimestamp(1476915669, 180, 180);
+
+-- If run on staging or production, consider the last 180 days
+-- in chunks of 30 days at a time:
+-- CALL BackfillLastVisitTimestamp(1476915669,  30, 30);
+-- CALL BackfillLastVisitTimestamp(1476915669,  60, 30);
+-- CALL BackfillLastVisitTimestamp(1476915669,  90, 30);
+-- CALL BackfillLastVisitTimestamp(1476915669, 120, 30);
+-- CALL BackfillLastVisitTimestamp(1476915669, 150, 30);
+-- CALL BackfillLastVisitTimestamp(1476915669, 180, 30);
+
diff --git a/tools/backfill-update-duplicate-issue-snapshots.sql b/tools/backfill-update-duplicate-issue-snapshots.sql
new file mode 100644
index 0000000..227a7fa
--- /dev/null
+++ b/tools/backfill-update-duplicate-issue-snapshots.sql
@@ -0,0 +1,52 @@
+-- Copyright 2019 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
+
+-- Update all IssueSnapshot rows that incorrectly have their period_end
+-- set to the maximum value 4294967295. For all affected rows, this
+-- script update them to the period_end time of the rows with same period_start time;
+-- if such rows don't exist, update period_end to be the same as period_start.
+-- Bug: crbug.com/monorail/6020
+
+CREATE TABLE IssueSnapshotsToUpdate (id INT, issue_id INT, period_start INT UNSIGNED, update_time INT UNSIGNED);
+
+INSERT INTO IssueSnapshotsToUpdate (id, issue_id, period_start, update_time)
+    -- Get ids that needs update and append with correct period_end.
+    (SELECT ToUpdate.id, IssueSnapshot.issue_id, IssueSnapshot.period_start, IssueSnapshot.period_end
+        FROM IssueSnapshot INNER JOIN (
+            -- Get correct period_end to update.
+            SELECT NeedsUpdate.id, IssueSnapshot.issue_id, IssueSnapshot.period_start, MIN(IssueSnapshot.period_end)
+            AS update_time FROM IssueSnapshot
+            INNER JOIN (
+                -- Get duplicate rows by filtering out the correct rows.
+                SELECT id, issue_id, period_start, period_end FROM IssueSnapshot
+                WHERE period_end = 4294967295
+                AND id NOT IN (
+                    -- Get ids of the correct rows.
+                    SELECT id FROM IssueSnapshot
+                    INNER JOIN (
+                        -- Get correct rows for each issue_id that should have max period_end.
+                        SELECT issue_id, MAX(period_start) AS maxStart
+                        FROM IssueSnapshot
+                        WHERE period_end = 4294967295
+                        GROUP BY issue_id) AS MaxISTable
+                ON IssueSnapshot.issue_id = MaxISTable.issue_id
+                AND IssueSnapshot.period_start = MaxISTable.maxStart)
+                ) AS NeedsUpdate
+            ON NeedsUpdate.issue_id = IssueSnapshot.issue_id
+            AND NeedsUpdate.period_start = IssueSnapshot.period_start
+            GROUP BY NeedsUpdate.issue_id, IssueSnapshot.period_start
+        ) AS ToUpdate
+        ON IssueSnapshot.issue_id = ToUpdate.issue_id
+        AND IssueSnapshot.period_start = ToUpdate.period_start
+        AND IssueSnapshot.period_end = ToUpdate.update_time
+    );
+
+UPDATE IssueSnapshot INNER JOIN IssueSnapshotsToUpdate
+ON IssueSnapshot.id = IssueSnapshotsToUpdate.id
+SET IssueSnapshot.period_end = CASE WHEN IssueSnapshotsToUpdate.update_time = 4294967295
+  THEN IssueSnapshotsToUpdate.period_start ELSE IssueSnapshotsToUpdate.update_time END;
+
+DROP TABLE IssueSnapshotsToUpdate;
diff --git a/tools/backups/restore.sh b/tools/backups/restore.sh
new file mode 100755
index 0000000..f585a07
--- /dev/null
+++ b/tools/backups/restore.sh
@@ -0,0 +1,110 @@
+#!/bin/bash
+# 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
+
+# The existing replicas all have this prefix:
+REPLICA_PREFIX="replica"
+
+# The new replicas made from the restored primary will have this prefix:
+NEW_REPLICA_PREFIX="replica-1"
+
+CLOUD_PROJECT="monorail-staging"
+
+DRY_RUN=true
+
+echo Restoring backups to primary for ${CLOUD_PROJECT}. Dry run: ${DRY_RUN}
+echo This will delete all read replicas with the prefix "${REPLICA_PREFIX}"
+echo and create a new set of replicas with the prefix "${NEW_REPLICA_PREFIX}"
+echo
+echo Checking for existing read replicas to delete:
+
+EXISTING_REPLICAS=($(gcloud sql instances list --project=${CLOUD_PROJECT} | grep ${REPLICA_PREFIX}- | awk '{print $1}'))
+
+if [ ${#EXISTING_REPLICAS[@]} -eq 0 ]; then
+  echo No replicas found with prefix ${REPLICA_PREFIX}
+  echo List instances to find the replica prefix by running:
+  echo gcloud sql instances list --project=${CLOUD_PROJECT}
+  exit 1
+fi
+
+echo Deleting ${#EXISTING_REPLICAS[@]} existing replicas found with the prefix ${REPLICA_PREFIX}
+
+for r in "${EXISTING_REPLICAS[@]}"; do
+  echo Deleting ${r}
+  cmd="gcloud sql instances delete ${r} --project=${CLOUD_PROJECT}"
+  echo ${cmd}
+  if [ ${DRY_RUN} == false ]; then
+    ${cmd}
+  fi
+done
+
+echo Checking for available backups:
+
+DUE_TIMES=($(gcloud sql backups list --instance primary --project=${CLOUD_PROJECT} | grep SUCCESSFUL | awk '{print $1}'))
+
+for index in ${!DUE_TIMES[*]}; do
+  echo "[${index}] ${DUE_TIMES[${index}]}"
+done
+
+echo "Choose one of the above due_time values."
+echo "NOTE: selecting anything besides 0 will require you to manually"
+echo "complete the rest of the restore process."
+echo "Recover from date [0: ${DUE_TIMES[0]}]:"
+read DUE_TIME_INDEX
+
+DUE_TIME=${DUE_TIMES[${DUE_TIME_INDEX}]}
+
+cmd="gcloud sql backups restore ${DUE_TIME} --project=${CLOUD_PROJECT} --restore-instance=primary"
+echo ${cmd}
+if [ ${DRY_RUN} == false ]; then
+  ${cmd}
+fi
+
+if [ "${DUE_TIME_INDEX}" -ne "0" ]; then
+  echo "You've restored an older-than-latest backup. Please contact speckle-oncall@"
+  echo "to request an on-demand backup of the primary before attempting to restart replicas,"
+  echo "which this script does not do automatically in this case."
+  echo "run 'gcloud sql instances create' commands to create new replicas manually after"
+  echo "you have confirmed with speckle-oncall@ the on-demand backup is complete."
+  echo "Exiting"
+  exit 0
+fi
+
+echo "Finding restore operation ID..."
+
+RESTORE_OP_IDS=($(gcloud sql operations list --instance=primary --project=${CLOUD_PROJECT} | grep RESTORE_VOLUME | awk '{print $1}'))
+
+# Assume the fist RESTORE_VOLUME is the operation we want; they're listed in reverse chronological order.
+echo Waiting on restore operation ID: ${RESTORE_OP_IDS[0]}
+
+if [ ${DRY_RUN} == false ]; then
+  gcloud sql operations wait ${RESTORE_OP_IDS[0]} --project=${CLOUD_PROJECT}
+fi
+
+echo Restore is finished on primary. Now create the new set of read replicas with the new name prefix ${NEW_REPLICA_PREFIX}:
+
+TIER=($(gcloud sql instances describe primary --project=${CLOUD_PROJECT} | grep tier | awk '{print $2}'))
+
+for i in {00..09}; do
+  cmd="gcloud sql instances create ${NEW_REPLICA_PREFIX}-${i} --master-instance-name=primary --project=${CLOUD_PROJECT} --tier=${TIER} --region=us-central1"
+  echo ${cmd}
+  if [ ${DRY_RUN} == false ]; then
+    ${cmd}
+  fi
+done
+
+echo If the replica creation steps above did not succeed due to authentication
+echo errors, you may need to retry them manually.
+echo
+echo
+echo Backup restore is nearly complete.  Check the instances page on developer console to see when
+echo all of the replicas are "Runnable" status. Until then, you may encounter errors in issue search.
+echo In the mean time:
+echo - edit settings.py to change the db_replica_prefix variable to be "${NEW_REPLICA_PREFIX}-"
+echo   Then either "make deploy_prod" or "make deploy_staging" for search to pick up the new prefix.
+echo   Then set the newly deploy version for besearch and besearch2 on the dev console Versons page.
+echo Follow-up:
+echo - Submit the change.
+echo - Delete old versions of besearch because they run up the GAE bill.
diff --git a/tools/clear-bouncing-last-7-days.sql b/tools/clear-bouncing-last-7-days.sql
new file mode 100644
index 0000000..c0e5c6f
--- /dev/null
+++ b/tools/clear-bouncing-last-7-days.sql
@@ -0,0 +1,12 @@
+-- Cleaer all bouncing email flags for bounces in the last seven days.
+-- Accounts that have invalid email addresses will be detected again
+-- as soon as one email is sent to that address.
+
+UPDATE User
+SET email_bounce_timestamp = NULL
+WHERE email_bounce_timestamp > UNIX_TIMESTAMP() - 7 * 24 * 60 * 60
+LIMIT 1000;
+
+-- Look at the result, you may want to run it again if 1000 rows were
+-- updated because that means that there were more than that many such
+-- rows to start.
diff --git a/tools/copy-comment-to-commentcontent.sql b/tools/copy-comment-to-commentcontent.sql
new file mode 100644
index 0000000..9f5a65a
--- /dev/null
+++ b/tools/copy-comment-to-commentcontent.sql
@@ -0,0 +1,63 @@
+-- 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
+
+
+DROP PROCEDURE IF EXISTS CopyCommentToCommentContent;
+
+delimiter //
+
+CREATE PROCEDURE CopyCommentToCommentContent(
+    IN in_start INT, IN in_stop INT, IN in_step INT)
+BEGIN
+  comment_loop: LOOP
+    IF in_start >= in_stop THEN
+      LEAVE comment_loop;
+    END IF;
+
+    SELECT in_start AS StartingAt;
+    SELECT count(*)
+    FROM Comment
+    WHERE Comment.id >= in_start
+    AND Comment.id < in_start + in_step;
+
+    INSERT INTO CommentContent (comment_id, content, inbound_message)
+    SELECT id, content, inbound_message
+    FROM Comment
+    WHERE Comment.id >= in_start
+    AND Comment.id < in_start + in_step;
+
+    SET in_start = in_start + in_step;
+
+  END LOOP;
+
+END;
+
+
+//
+
+
+delimiter ;
+
+
+-- Copy and paste these individually and verify that the site is still responsive.
+-- the first one, takes about 30 sec, then 4-7 minutes for each of the rest.
+-- CALL CopyCommentToCommentContent(           0, 13 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(13 * 1000000, 16 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(16 * 1000000, 17 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(17 * 1000000, 18 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(18 * 1000000, 19 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(19 * 1000000, 20 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(20 * 1000000, 21 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(21 * 1000000, 22 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(22 * 1000000, 23 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(23 * 1000000, 24 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(24 * 1000000, 25 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(25 * 1000000, 26 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(26 * 1000000, 27 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(27 * 1000000, 28 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(28 * 1000000, 29 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(29 * 1000000, 30 * 1000000, 10000);
+-- CALL CopyCommentToCommentContent(30 * 1000000, 40 * 1000000, 10000);
diff --git a/tools/copy-new-commentcontent-back-to-comment.sql b/tools/copy-new-commentcontent-back-to-comment.sql
new file mode 100644
index 0000000..4eb5f47
--- /dev/null
+++ b/tools/copy-new-commentcontent-back-to-comment.sql
@@ -0,0 +1,83 @@
+-- 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
+
+
+DROP PROCEDURE IF EXISTS CopyNewCommentContentBackToComment;
+
+delimiter //
+
+CREATE PROCEDURE CopyNewCommentContentBackToComment(
+    IN in_start INT, IN in_stop INT, IN in_step INT)
+BEGIN
+  comment_loop: LOOP
+    IF in_start >= in_stop THEN
+      LEAVE comment_loop;
+    END IF;
+
+    SELECT in_start AS StartingAt;
+    SELECT count(*)
+    FROM CommentContent
+    WHERE comment_id >= in_start
+    AND comment_id < in_start + in_step;
+
+    DROP TEMPORARY TABLE IF EXISTS temp_comment;
+    CREATE TEMPORARY TABLE temp_comment (
+      id INT NOT NULL,
+      issue_id INT NOT NULL,
+      created INT NOT NULL,
+      project_id SMALLINT UNSIGNED NOT NULL,
+      commenter_id INT UNSIGNED NOT NULL,
+      content MEDIUMTEXT COLLATE utf8mb4_unicode_ci,
+      inbound_message MEDIUMTEXT COLLATE utf8mb4_unicode_ci,
+      deleted_by INT UNSIGNED,
+      is_spam BOOLEAN DEFAULT FALSE,
+      is_description BOOLEAN DEFAULT FALSE,
+
+      PRIMARY KEY(id)
+    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
+
+
+    INSERT INTO temp_comment
+    SELECT Comment.id, Comment.issue_id, Comment.created, Comment.project_id,
+           Comment.commenter_id, CommentContent.content,
+	   CommentContent.inbound_message, Comment.deleted_by, Comment.is_spam,
+	   Comment.is_description
+    FROM Comment
+    LEFT JOIN CommentContent on CommentContent.comment_id = Comment.id
+    WHERE CommentContent.comment_id >= in_start
+    AND CommentContent.comment_id < in_start + in_step;
+
+
+    REPLACE INTO Comment (id, issue_id, created, project_id, commenter_id,
+        content, inbound_message, deleted_by, is_spam, is_description)
+    SELECT id, issue_id, created, project_id, commenter_id,
+        content, inbound_message, deleted_by, is_spam, is_description
+    FROM temp_comment;
+
+    SET in_start = in_start + in_step;
+
+  END LOOP;
+
+END;
+
+
+//
+
+
+delimiter ;
+
+
+-- Temporarily disable these foreign key references so that we can do
+-- REPLACE commands.
+-- ALTER TABLE SpamReport DROP FOREIGN KEY spamreport_ibfk_2;
+-- ALTER TABLE SpamVerdict DROP FOREIGN KEY spamverdict_ibfk_2;
+
+-- This ID is the first comment entered that was stored in CommentContent only.
+-- CALL CopyNewCommentContentBackToComment(31459489, 40 * 1000000, 5000);
+
+-- Add back foreign key constraints.
+-- ALTER TABLE SpamReport ADD FOREIGN KEY (comment_id) REFERENCES Comment(id);
+-- ALTER TABLE SpamVerdict ADD FOREIGN KEY (comment_id) REFERENCES Comment(id);
diff --git a/tools/datalab/README.md b/tools/datalab/README.md
new file mode 100644
index 0000000..26fd990
--- /dev/null
+++ b/tools/datalab/README.md
@@ -0,0 +1,6 @@
+# Cloud Datalab notebooks
+
+To use these notebooks, navigate to [Monorail's Cloud Datalab instance](https://main-dot-datalab-dot-monorail-prod.appspot.com/tree)
+and upload the .ipynb file. From there you should be able to run and edit
+your copy of the notebook using the web interface.
+
diff --git a/tools/datalab/database_exploration.ipynb b/tools/datalab/database_exploration.ipynb
new file mode 100644
index 0000000..4c120dd
--- /dev/null
+++ b/tools/datalab/database_exploration.ipynb
@@ -0,0 +1,2092 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": 1,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Populating the interactive namespace from numpy and matplotlib\n"
+     ]
+    }
+   ],
+   "source": [
+    "%pylab inline"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 2,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "from __future__ import print_function\n",
+    "from __future__ import division\n",
+    "from IPython.display import display, HTML"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "import seaborn as sns\n",
+    "import pandas as pd\n",
+    "import MySQLdb as mdb\n",
+    "import bs4\n",
+    "import datetime\n",
+    "import time\n",
+    "from collections import defaultdict"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Some Helper Functions"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 4,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "import webbrowser\n",
+    "\n",
+    "def issue_id_to_local_id(issue_id):\n",
+    "    return chrome_issue[chrome_issue[\"issue_id\"] == issue_id][\"local_id\"].values[0]\n",
+    "\n",
+    "def open_issue_webpage(issue_id):\n",
+    "    '''This Function opens the webpage of the issue corresponding to issue_id.S'''\n",
+    "    chromium_path = \"https://bugs.chromium.org/p/chromium/issues/detail?id=\"\n",
+    "    local_id = issue_id_to_local_id(issue_id)\n",
+    "    webbrowser.open_new(chromium_path + str(local_id))"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 5,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "def table_to_dataframe(name, connection):\n",
+    "    return pd.read_sql(\"SELECT * FROM {};\".format(name) , con=connection)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 6,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "def histrogram_plot(count_data, title, x_label, y_label, kde=False, hist=True):\n",
+    "    sns.distplot(count_data, kde=kde, hist=hist)\n",
+    "    plt.title(title)\n",
+    "    plt.xlabel(x_label)\n",
+    "    plt.ylabel(y_label)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 7,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "connection = mdb.connect(host=\"173.194.230.234\", user=\"noblek\", db=\"monorail\")"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 8,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "cursor = connection.cursor()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### The Names of the tables in the Database"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 9,
+   "metadata": {
+    "collapsed": false,
+    "scrolled": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Attachment\n",
+      "AutocompleteExclusion\n",
+      "Comment\n",
+      "Component2Admin\n",
+      "Component2Cc\n",
+      "Component2Label\n",
+      "ComponentDef\n",
+      "DanglingIssueRelation\n",
+      "DismissedCues\n",
+      "ExtraPerm\n",
+      "FieldDef\n",
+      "FieldDef2Admin\n",
+      "FilterRule\n",
+      "Group2Project\n",
+      "Invalidate\n",
+      "Issue\n",
+      "Issue2Cc\n",
+      "Issue2Component\n",
+      "Issue2FieldValue\n",
+      "Issue2Label\n",
+      "Issue2Notify\n",
+      "IssueFormerLocations\n",
+      "IssueRelation\n",
+      "IssueStar\n",
+      "IssueSummary\n",
+      "IssueUpdate\n",
+      "LabelDef\n",
+      "LocalIDCounter\n",
+      "MemberNotes\n",
+      "Project\n",
+      "Project2SavedQuery\n",
+      "ProjectIssueConfig\n",
+      "ProjectStar\n",
+      "QuickEditHistory\n",
+      "QuickEditMostRecent\n",
+      "ReindexQueue\n",
+      "SavedQuery\n",
+      "SavedQueryExecutesInProject\n",
+      "SpamReport\n",
+      "SpamVerdict\n",
+      "StatusDef\n",
+      "Template\n",
+      "Template2Admin\n",
+      "Template2Component\n",
+      "Template2FieldValue\n",
+      "Template2Label\n",
+      "User\n",
+      "User2Project\n",
+      "User2SavedQuery\n",
+      "UserGroup\n",
+      "UserGroupSettings\n",
+      "UserStar\n",
+      "_Comment_old\n",
+      "dsns\n"
+     ]
+    }
+   ],
+   "source": [
+    "cursor.execute(\"SHOW  TABLES\")\n",
+    "for (table_name,) in cursor:\n",
+    "    print(table_name)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Load the tables that will be used for analysis"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 10,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "issue = table_to_dataframe(\"Issue\", connection)\n",
+    "comment = table_to_dataframe(\"Comment\", connection)\n",
+    "issue_summarny = table_to_dataframe(\"IssueSummary\", connection)\n",
+    "issue_label = table_to_dataframe(\"Issue2Label\", connection)\n",
+    "issue_component = table_to_dataframe(\"Issue2Component\", connection)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 11,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "issue.rename(columns={\"id\":\"issue_id\"}, inplace=True)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Select for only Chromium Projects"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 12,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "chrome_issue = issue[issue[\"project_id\"] == 16].copy()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 13,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "chrome_comment = comment[comment[\"project_id\"] == 16]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 14,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Number of Chromium Issues 611859\n",
+      "Number of Chromium Comments 5712584\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(\"Number of Chromium Issues\", chrome_issue.shape[0])\n",
+    "print(\"Number of Chromium Comments\", chrome_comment.shape[0])"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 15,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "unique_chrome_issues = set(chrome_issue[\"issue_id\"])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Associate comments with their Issues"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 16,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "0\n",
+      "1000000\n",
+      "2000000\n",
+      "3000000\n",
+      "4000000\n",
+      "5000000\n"
+     ]
+    }
+   ],
+   "source": [
+    "comments_by_issue = defaultdict(list)\n",
+    "i = 0\n",
+    "for index, row in chrome_comment.iterrows():\n",
+    "    comments_by_issue[row[\"issue_id\"]].append((index, row.created))\n",
+    "    if i % 1000000 == 0:\n",
+    "        print(i)\n",
+    "    i += 1"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Make sure the list of Comments for each issue are sorted by time"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 17,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "chrome_issue[\"comments\"] = chrome_issue[\"issue_id\"].apply(lambda i_id: [tup[0] for tup in sorted(comments_by_issue[i_id], key=lambda x: x[1])])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Explore the number of comments per issue"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 18,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "chrome_issue[\"num_comments\"] = chrome_issue[\"comments\"].apply(lambda comments: len(comments))"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 19,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAg4AAAFtCAYAAABvM+JQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VOWh//HvZDIBnUlYLLQUItXI1npDmyZIyMIiWm4F\ni6UUwuaCshmqBmhSFodwAYMhUiGKXGtva6RsEm1tffUWUchtwmbTyI4WxRslZTGImdEkk5nn9weX\n+ZlCzGlhQmQ+778yzznzzPOdBPLNmTNnbMYYIwAAAAsirvQCAADAlwfFAQAAWEZxAAAAllEcAACA\nZRQHAABgGcUBAABYRnEAvsAHH3yg3r17a9OmTY3Gn3vuOf3sZz+7bI8zZMgQ7d2797LN90U8Ho/G\njh2rESNGaMuWLRdsP3r0qGbOnKk777xTP/jBDzRx4kT95S9/aZG1XQ7z58/XgQMHrugadu3apREj\nRlzRNQChQnEAmhEREaH8/HwdO3YsOGaz2S7747TUJVUOHTqk6upqvfLKK7rtttsabXv33Xd1zz33\naOzYsfrd736n3/72t5oxY4amTZumo0ePtsj6LlVZWVmLPZdAOIq80gsAWrs2bdro3nvvVVZWljZs\n2CCHw9HoF1NOTo569uyp++6774LbQ4YM0YgRI7Rt2zZ9/PHHmjlzpsrLy3XgwAFFRkZq9erV6ty5\nsyRp/fr1ys3NVX19ve69916NGjVKkvT666/rmWeekc/nU9u2bZWdna1vf/vbWrVqlSoqKnTq1Cn1\n7t1bjz/+eKN1v/baa3rqqafk9/vlcrmUk5Oj6OhozZs3TydOnNBdd92l9evXq02bNsH7PPvssxo1\napRSUlKCY8nJyXriiScUFRXV5Lzx8fFatWqV/vd//1eVlZU6efKk+vbtq5SUFL388sv64IMPNGfO\nHN1xxx2W95Ok1atXa8uWLQoEAuratavcbrc6d+6siRMn6jvf+Y7Ky8t1/PhxJSYmatmyZfr5z3+u\nkydPas6cOVq2bJn+/ve/65lnnpHNZpPdbtdPf/pTJSYmNnqeiouL9corrygiIkJ///vf1blzZy1b\ntkydO3dWTU2NlixZorffflsNDQ1KTk7WT3/6U9ntdt18880aOnSoDh8+rIKCAn3rW9+66M/PqVOn\nlJ2drY8//liSNHDgQD300ENNjhcXF+tPf/qTnnnmmeD6zt+ur6/X8uXL9eabb8rv9+ub3/ym5s2b\nJ5fL9c/8SAOXxgBoUmVlpfn2t79tAoGAGT9+vMnLyzPGGPOLX/zC5OTkGGOMycnJMb/85S+D9/n8\n7cGDBwfv84c//MH06dPHHD582BhjzIMPPmieeeaZ4H65ubnGGGNOnDhhkpOTzTvvvGPee+89M3z4\ncPPxxx8bY4x5++23TUpKivn000/NypUrzb//+78bv99/wbr/9re/mZSUFFNZWWmMMWbHjh0mJSXF\neDwes2vXLjN8+PCL5h0+fLjZvn17k89HU/PW1NSYlStXmiFDhpiamhpTW1tr+vXrF8z+2muvmdtv\nv90YYyzv99JLL5lHHnnENDQ0GGOMWb9+vXnggQeMMcZMmDDBPPzww8YYYzwej0lLSzO7du0KPpf7\n9+83xhgzdOhQ89ZbbxljjPnzn/9snnrqqQsybd682Xz729827777rjHGmOXLl5uZM2caY859L4uK\niowxxjQ0NJjZs2ebZ5991hhjTK9evcxvf/vbiz5PO3fuDD7HhYWF5tFHHzXGGPPpp5+arKwsU1NT\n0+T45s2bzdSpUxut7/ztVatWmWXLlgW3FRQUmIULFzb5/QJCgSMOgAU2m035+fkaOXKk0tLSLnip\nwnzBofHbb79dkhQbG6uvfOUr6tWrV/D22bNng/uNGTNGktS5c2elpqZqx44dioiI0KlTp3T33XcH\n97Pb7Xr//fdls9nUt29fRURc+Irjzp07lZycrG7dukmS+vfvr+uuu0779+//wpwRERFfmKWpeQ8c\nOCCbzaaUlJTgX7+dO3dWenr6RbNa2e+NN97Qvn37gkde/H6/6urqgnMMHjxYkuR0OtW9e/dG85/3\n/e9/XzNmzNCgQYM0YMAA3X///RfNlZycrBtuuEGSNHr0aI0cOVKStG3bNu3fv18vvviiJKm2trbR\n8/2PRy8uJj09XVOmTFFVVZUGDBigrKwsuVyuJse/yLZt21RTU6OysjJJks/n03XXXdfsGoDLieIA\nWNSlSxfl5uYqOzs7+IvlvM//sq2vr2+07fwhfkmKjGz6n9znfyEFAgFFRkbK7/crOTlZK1asCG47\nfvy4vva1r+m1117Ttdde2+R8/1gAAoGA/H6/7HZ7k/fp27ev/vrXv2rgwIGNxgsLC9W9e/cm521o\naJAkORyORtuaymtlP2OMpkyZorFjx0o697yeP6wvSW3btr1g/3/0yCOP6Ec/+pFKS0v10ksv6dln\n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\n1NTUmOHDh5u6ujrzy1/+0qxatcoYY8wf/vAHs3jx4iuW41+xefNms3TpUmOMMR9//LEZOHCgmTZt\nWtjk37Jli5k7d64xxphdu3aZadOmhVX++vp6M2PGDPO9733PHD16NKx+9mtra83IkSMbjYVT/p07\nd5qpU6caY4zxer3mySefDKuf/c/Lzc01GzduDGn+sHup4mq/LHX37t1VWFgo839vljl48KCSkpIk\nSenp6SorK9O+ffuUkJAgh8Mhl8ul7t2768iRIyovL1d6erokKS0tTTt27LhiOf4Vw4YN009+8hNJ\n544sRUZGhlX+oUOHatGiRZKkDz/8UO3atdOBAwfCJv/jjz+ujIwMderUSVJ4/ewfPnxYn332mSZP\nnqy7775bFRUVYZW/tLRUvXr10owZMzRt2jQNGTIkrH72z9u3b5/+9re/afTo0SHNH3bFoanLUl8t\nbr/9dtnt9uBt87l32zqdTtXU1Mjj8Sg6OrrRuMfjkcfjkdPpbLTvl8m1114bzPLQQw/p4YcfbvS9\nvdrzS+d+nnNycrRkyRKNGDEibL7/xcXF6tixo1JTz10R1hgTNtkl6ZprrtHkyZP13HPPKTc3V7Nn\nz260/WrPX11drf3792vlypXKzc3VrFmzwur7f96aNWuUmZkpKbT/94fdOQ7/zGWprwafz+bxeBQT\nE3PBc+D1ehUdHd1o3Ov1KiYmpsXXe6mqqqqUmZmp8ePHa/jw4crPzw9uC4f8kpSXl6fTp09r9OjR\nqq+vD45fzfmLi4tls9lUVlamw4cPKycnR2fOnAluv5qzS9I3vvENde/ePfh1+/btdejQoeD2qz1/\nhw4dFBcXp8jISN1www1q06aNTp48Gdx+teeXpE8++UTHjh1Tv379JIX2//6r9zdmE8LtstR9+vTR\n7t27JUklJSVKTExUfHy83nzzTdXX16umpkZHjx5Vz549Gz035/f9Mjl9+rTuu+8+zZkzRz/84Q8l\nhVf+l19+WWvWrJEktW3bVhEREbr55pvDIv8LL7ygoqIiFRUVqXfv3lq2bJlSU1PDIrt0rjjl5eVJ\nkk6cOCGv16uUlJSwyf/d735X//M//yPpXP7a2lr1798/bPJL0p49e9S/f//g7VD+3xd2V440YXBZ\n6g8++ECzZ8/W+vXrdezYMS1YsEA+n09xcXFavHixbDabNm3apA0bNigQCGj69Om67bbbVFtbq+zs\nbJ06dUpRUVEqKCjQddddd6XjWLZ48WL98Y9/bPT9nDdvnpYsWRIW+Wtra5WTk6PTp0+roaFBU6ZM\n0Y033hg23//zJk6cqEWLFslms4VN9oaGBv3sZz/T8ePHJUlz5sxR+/btwya/JOXn52vXrl0KBAKa\nNWuWunbtGlb5n3vuOTkcDk2aNEmSQvp/f9gVBwAA8K8Lu5cqAADAv47iAAAALKM4AAAAyygOAADA\nMooDAACwjOIAAAAsozgArdgHH3yg3r17q6ysrNH4kCFDgu/ZvxRDhgzRxx9/fMnzfJHjx49r2LBh\nGjVqVKOr1knSu+++q2nTpmnEiBEaMWKEZs2a1eiKj63N66+/rl/96ldXehnAFUVxAFq5yMhIzZ8/\n/4JfupdLqC/lsnv3bn3rW9/S5s2bg9fDl85d4e/uu+/W2LFj9corr+iVV15Rz549g9fab40OHDgg\nj8dzpZcBXFFh91kVwJdN586dlZqaqmXLlgU//fK8Xbt2qbCwUEVFRZKknJwc3XLLLerXr59mzJih\n66+/Xm+//bZuvvlm9evXTy+99JLOnj2rwsJCxcXFSZKWL1+ugwcPqk2bNlq8eLFuuukmnT59Wm63\nW1VVVYqIiNCsWbOUnJysVatWqaKiQn//+981YcIEZWRkBNfy3nvv6dFHH9XZs2d17bXXat68eXI4\nHHryySf16aefauHChVq4cGFw/3Xr1ik1NVWDBg0Kjj3wwAOKjY2V3+9XfX295s+fr7fffls2m033\n3XefRo4cqeLiYm3btk0nT54Mlo/jx49r586dat++vX7xi1/o5MmTevDBB5vNv3fvXuXl5am2tlYd\nOnRQbm6uunXrpokTJyo+Pl5/+ctfVF1drfnz56tr165av369bDabunbtqq997WvKz8+XzWZTu3bt\nVFBQoA4dOoTuBwFoLULxeeAALo/KykozePBgU1NTYwYPHmxKS0uNMcYMHjzYfPjhh2bnzp1mwoQJ\nwf1zcnLMSy+9ZCorK03v3r3NoUOHTCAQMLfddpt54oknjDHGrFq1yixdujQ4z3/9138ZY4zZtm2b\nGTVqlDHGmIcffths3brVGGPMiRMnzNChQ43H4zErV640EydOvOhaR40aZbZs2WKMMaaiosIMHjzY\n1NXVmeLiYpOTk3PB/lOnTjXr1q1rMvuyZcvM4sWLjTHGVFdXm1tvvdUcPnzYbN682QwePNh4PB7z\n4Ycfml69epk///nPxhhjJk6caF577TVL+evr682IESNMVVWVMcaYkpISc8899xhjjJkwYULwOXr9\n9dfNXXfdFbzvqlWrgo+1b98+Y4wxzz//fHANwNWOIw7Al4DL5dJ//Md/aP78+XrllVcs3ecrX/mK\nevfuLUn66le/GvwAnK9//evas2dPcL8f/ehHkqSBAwfqpz/9qTwej8rKyvTee+9p5cqVkiS/36/K\nykrZbDb17dv3gsfyer2qrKzU0KFDJUl9+/ZVu3bt9N577zX5UojNZvvCj7TftWuXli5dKuncpx/e\neuut2r17t1wul77zne/I6XQGX/pITk6WJHXt2jX4kcBN5e/atat2796tY8eOqbKyUtOmTWuU47y0\ntDRJ0k033aSzZ89KOveyjs1mk3Tu/JAHH3xQQ4cO1a233qoBAwY0mQW4mlAcgC+JlJQUpaSkBD8F\nUVLwl9h5Pp8v+LXD4Wi0LTLy4v/c7Xb7BfsZY/T8888HP173xIkT6tSpk1577TW1adPmgjmMMRcU\nBGOMAoHABWs87+abb9b+/fsbjQUCAf3kJz9Rbm7uBXMGAgH5/X5JUlRUVKP7ff4jhM9rKv/5Of1+\nv2JjY/Xyyy8H5z916lRw//M5bTbbRcvPPffcoyFDhuiNN95Qfn6+vve97zUqIcDVipMjgS+R7Oxs\nlZaW6uTJk5LO/SVeWVmp+vp6ffzxx/rLX/7yT895/gjGli1bdOONN6pt27bq37+/1q5dK0l65513\ndOedd+qzzz5r8uiBy+VSbGystmzZIuncR9afPn1aPXr0aPI+Y8aM0fbt27V9+3ZJ536hP/300zpz\n5oyuu+463XLLLXrxxRclSdXV1dq6datuueWWZk/mbG77eTfeeKPOnj2rN998U5K0efNmzZ49+wvv\nExkZqYaGBknS2LFj5fV6dffdd+vuu+/WwYMHLT0u8GXHEQeglfv8X+znX7K4//77JUk9evTQwIED\ndccdd6hr165KTEwM3qepv/T/cfztt9/WyJEjFR0drWXLlkmS5s+fr0cffVR33nmnjDFavny5nE5n\nk3NK5z7W2O12a+XKlWrTpo0KCwsVGRnZ5H2+8pWv6Nlnn9Xjjz+u5cuXKxAI6Fvf+paeeuopSdKD\nDz6o3NxcjRgxIvgRwH369NHhw4e/MM/57M3lj4qK0pNPPqklS5aorq5O0dHRjY7mXOw+SUlJys7O\nVqdOnfTQQw8pJydHdrtd11xzjXJzc5t8boCrCR+rDQAALOOlCgAAYBnFAQAAWEZxAAAAllEcAACA\nZRQHAABgGcUBAABYRnEAAACWURwAAIBl/w8JqmLhhNLLPAAAAABJRU5ErkJggg==\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd68c77ad90>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(chrome_issue[\"num_comments\"], \"Number of Comments per Issue\",\"Number of Comments\", \"Count\")"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 20,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgoAAAFtCAYAAABm2EIqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl01NX9//HXZGOZmbBIbBUotSBL1VBj2CREwKWxBb9R\nVEhYXFB+ouASsERZQlwwiJEWguAXafs1TYNY0a+2np6vopiagNBGBFktRRolQjAsM5NlJpn7+8PD\nSAqfhCUzCcnzcY7nMPdz5zP3voXkNffzmTs2Y4wRAADAaYQ19QAAAEDzRVAAAACWCAoAAMASQQEA\nAFgiKAAAAEsEBQAAYImggBbpq6++Ut++ffX666/XaV+1apWeeOKJRnudkSNHauvWrY12vvq43W6N\nGzdOo0eP1nvvvXfK8b1792r69Om65ZZb9F//9V+aOHGi/vGPf4RkbI1hzpw52r59e4P9Dh48qKlT\np0qS0tPT9dvf/jbYQwt45plnlJycrOTkZF155ZVKSkpScnKybr31VlVXV6tv3746evRoUMewa9cu\nJSQk1Gn77LPPdNttt+kXv/iF7r77bpWVlQWOrVixQjfffLNuuukm5eTkBNoXLlyoTZs2BXWsaCEM\n0AKVlJSYfv36mQEDBph9+/YF2letWmXS09Mb7XVGjBhhtmzZ0mjnq8+mTZvMjTfeeNpje/fuNQkJ\nCebjjz8OtBUVFZn4+Hjzz3/+MyTjO18jRoww27Zta7DffffdZz7//HNjjDHp6enmt7/9bbCHdloj\nRowIjOOEPn36mPLy8qC8Xk1Njfnd735nrr32WnP11VcH2qurq01iYqIpLi42xhjzxz/+0dx///3G\nGGPWr19vkpOTTWVlpamurjYTJkww7777rjHGGJfLZUaNGmWqqqqCMl60HBFNHVSAYGnTpo3uuece\npaWl6bXXXlNkZKTMSfuLpaenq3fv3rr33ntPeTxy5EiNHj1a69ev19GjRzV9+nQVFxdr+/btioiI\n0PLly3XxxRdLklavXq3MzEx5vV7dc889GjNmjCTpgw8+0IoVK+Tz+dS2bVvNmjVLP/vZz7R06VJt\n2bJFZWVl6tu3r55//vk6437//fe1bNky1dbWyuFwKD09XU6nU7Nnz9bBgwd16623avXq1WrTpk3g\nOStXrtSYMWM0dOjQQNuQIUP04osvKioqyvK8sbGxWrp0qf7973+rpKREhw4dUv/+/TV06FC99dZb\n+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\nVFtbqyNHjgRrWgAAtCpBCwo33XSTwsPDA49PBAZJstvtcrlccrvdcjqdddrdbrfcbrfsdnudvh6P\nRw6H44zPAQAAzl/IPh4ZFvZ9JnG73YqOjpbD4ZDH4wm0ezweOZ3OOu0ej0fR0dGy2+11+p44R2Rk\n5GnPAQAAzl/IgkK/fv20adMmDRw4UAUFBRoyZIhiY2O1ePFieb1eVVdXa+/everdu7fi4uJUUFCg\n2NhYFRQUKD4+Xg6HQ5GRkSopKVG3bt1UWFioadOmKTw8XIsWLdLkyZNVWloqv9+vjh07NjiemJgz\nDxNRUX457OWyO9pa9qn0RCksLFLOevqEyasuXZzq0KH1BJmzqTPODTUOPmocfNS4+Qp6UDixXXF6\nerrmzp0rn8+nnj17KikpSTabTZMmTVJqaqr8fr/S0tIUFRWllJQUzZo1S6mpqYqKilJ2drYkKTMz\nUzNnzlRtba0SEhIUGxsrSYqPj9fYsWPl9/uVkZFxRuMqK3Od8RyOH3fJ7amWX1WWfTwer8LCatWm\nnXWfCk+1Dh92yettHZ9KjYlxnlWdcfaocfBR4+CjxqFxrmHMZk6+eaAVObugcEwfbyutd9fFw4dK\nFRYWrs5dLrbsU+FxKeGqS1rNFs784w8+ahx81Dj4qHFonGtQaB1vbQEAwDkhKAAAAEsEBQAAYImg\nAAAALBEUAACAJYICAACwRFAAAACWCAoAAMBSyLZwbs7+/dUBlZYdszzu8bhV9m2NetSz4RIAAC0R\nQUHSUZdHlbZoy+NVNpsqqg6GcEQAADQPXHoAAACWCAoAAMASQQEAAFgiKAAAAEsEBQAAYImgAAAA\nLBEUAACAJYICAACwRFAAAACWCAoAAMASQQEAAFgiKAAAAEsEBQAAYImgAAAALBEUAACAJYICAACw\nRFAAAACWCAoAAMASQQEAAFgiKAAAAEsEBQAAYImgAAAALBEUAACAJYICAACwRFAAAACWCAoAAMBS\nRChfzO/3a/bs2fryyy8VFhamp59+WuHh4UpPT1dYWJguv/xyZWRkyGazac2aNXrttdcUERGhqVOn\navjw4aqqqtLjjz+u8vJy2e12ZWVlqXPnztqyZYsWLFig8PBwDR06VNOmTQvltAAAaLFCuqLw8ccf\nq7KyUvn5+XrooYe0ePFiZWVlKS0tTXl5eTLGaN26dSorK1Nubq5Wr16tVatWKTs7W16vV/n5+erT\n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\nI2uS1Z3HbaEAAAAASUVORK5CYII=\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd64d25d810>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(chrome_issue[chrome_issue[\"num_comments\"] < 100][\"num_comments\"], \"Number of Comments(Less Than 100)\", \"Number of Comments\", \"Count\")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Statistics of the number of comments per issue"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 21,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "count    611859.000000\n",
+       "mean          9.336439\n",
+       "std          27.077464\n",
+       "min           1.000000\n",
+       "25%           4.000000\n",
+       "50%           6.000000\n",
+       "75%          11.000000\n",
+       "max        6354.000000\n",
+       "Name: num_comments, dtype: float64"
+      ]
+     },
+     "execution_count": 21,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "chrome_issue[\"num_comments\"].describe()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 22,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "The Number of Deleted Comments: 49186\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(\"The Number of Deleted Comments:\", np.where(~np.isnan(chrome_comment[\"deleted_by\"]))[0].shape[0])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Coarse Plots of Comments over time\n",
+    "\n",
+    "It appears that it is not unusal for issues to be commented on the order of years"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 23,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "def plot_comments_over_time(comments):\n",
+    "    num_comments = len(comments)\n",
+    "    plt.plot(map(datetime.datetime.fromtimestamp, comments[\"created\"]), xrange(1, num_comments+1))\n",
+    "    plt.xlabel(\"Time\")\n",
+    "    plt.ylabel(\"Number of Comments\")\n",
+    "    plt.title(\"time vs number of comments\")"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 24,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "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\nrkJggg==\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd64def9c90>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "for idx in xrange(0, len(chrome_issue), 10000):\n",
+    "    if len(chrome_issue.iloc[idx][\"comments\"]) > 500:\n",
+    "        continue\n",
+    "    plot_comments_over_time(chrome_comment.loc[chrome_issue.iloc[idx][\"comments\"]])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Explore The timeframe from when an issue is opened to closed"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 25,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "time_to_closure = (chrome_issue[\"closed\"] - chrome_issue[\"opened\"])\n",
+    "time_to_closure = time_to_closure[time_to_closure > 0]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 26,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "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\nUH8tnfpruS42GOgGRyIiImJQMBARERGDgoGIiIgYFAxERETEoGAgIiIiBgUDERERMSgYiIiIiEHB\nQERERAwKBiIiImJQMBARERGDgoGIiIgYFAxERETEoGAgIiIiBgUDERERMSgYiIiIiEHBQERERAwK\nBiIiImJQMBARERGDgoGIiIgYFAxERETEoGAgIiIiBgUDERERMSgYiIiIiEHBQERERAwKBiIiImJQ\nMBARERGDpbEd3/ve9wDwer3U1NRgt9sxm82cOHGCDh06sH379oAVKSIiIoHRaDD44IMPAJg9ezYD\nBgzgnnvuAeDdd9/lzTffDEx1IiIiElA+DyV89NFHRigA6N+/P/v37/drUSIiItI8fAYDm83G2rVr\ncblcOJ1Ofv/73xMZGRmI2kRERCTAfAaDnJwctmzZQnx8PAkJCezcuZOcnJxA1CYiIiIB1ug5Bmdd\nc801LF++nOPHj9O2bVtMJlMg6hIREZFm4HPFoLS0lMTERO69917+/e9/M2jQIPbu3RuI2kRERCTA\nfAaDBQsWkJeXR/v27encuTNZWVk8/vjjAShNREREAs1nMKipqeGmm24yXsfFxVFXV+fXokRERKR5\n+AwG7dq1o7S01Hj9xhtv0LZtW78WJSIiIs3D58mHmZmZpKWl8Y9//IPbbruN6Ohonn76aZ8Tu91u\n5syZw9GjR6mrq2PatGnceOONpKenExISQteuXcnMzMRkMrF27VrWrFmDxWJh2rRpDBgwgJqaGmbN\nmkVlZSU2m43s7GwiIyPZtWsXixYtwmw2ExcXR2pqKgB5eXls27YNs9nMnDlzcDgc3/7TERERucz4\nDAbR0dG88soruFwuvF4vXq+X8PBwnxO/+eabREZGkpOTw4kTJ7j33nvp0aMHM2bMoHfv3mRmZrJ5\n82Z69erFihUryM/Pp7a2luTkZPr168fq1avp3r07qampbNy4kWXLlpGRkUFmZiZ5eXlERUUxefJk\nSktL8Xg87Ny5k3Xr1lFeXs706dNZv359k3xAIiIilxOfhxK2bNlCTk4OXq+XESNGMGjQIFauXOlz\n4sTERH72s58B4PF4sFgsfPTRR/Tu3RuAhIQECgsL2bNnDzExMVitVux2O9HR0Rw4cICSkhISEhKA\nM3dbLCoqwul04na7iYqKAiA+Pp7CwkJKSkqIi4sDoHPnztTX13Ps2LFv9omIiIhcxnwGg7y8PO67\n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\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd64e12f550>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(time_to_closure / (365*24*3600), \"Number Closed over years\", \"Years\", \"Number Closed\")"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 27,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgsAAAFtCAYAAACJGikUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX+x/H3sCkMIJrL1SQqc6mbePOn3gxEM1MyVJZM\nodTScgtbTBNXUn8qZmYmptWjHt3QzA2JVtP8FW6lXbM0l8puLmWmqTkzssmc3x8+nBslZyiZAeH1\n/Is553DO53wdh/d8z/d8j8UwDEMAAABl8KnsAgAAQNVGWAAAAKYICwAAwBRhAQAAmCIsAAAAU4QF\nAABgirCAy8qRI0fUqlUrrVy5stTyl19+WePHj6+w43Tt2lVffvllhe3vgjVr1qh///6Kj4/XnXfe\nqSlTpshms0mSFixYoOnTp1f4MX9v2rRpyszM9PhxzKSlpSkmJkbx8fGutnj88cd14sQJrxz/9ddf\nd72HWrVqpdOnT3vluJJks9k0cOBA12tPHt9ms6l169audo6Pj9e2bdskSV988YUSExPVs2dP3Xff\nfTp+/Ljr9xYvXqw77rhD3bt3L/VemT17tuv3UbMQFnDZ8fHx0Zw5c/T999+7llkslgo/TkVPQbJ4\n8WKtWrVKzz//vHJycvTmm2/Kz89Pw4cPl+SZc7gYbx3HXQ3333+/cnJylJOTo3feeUctWrTQAw88\nIKfT6dFj//DDD8rJyVHfvn09epyy/Prrr9q1a1epZZ6a7mbnzp3q0KGDq51zcnLUoUMHFRUV6eGH\nH9bkyZP17rvvqkePHpo4caIk6eOPP9batWu1Zs0avf322/r000/13nvvSZIeeughTZ8+XYWFhR6p\nF1UXYQGXnVq1aun+++/X6NGjVVxcLKn0h21aWppeeeWVi77u2rWr5s2bpz59+qhz585atWqVJkyY\noD59+igpKUk///yz6/feeOMNJSYmKi4uTqtXr3Yt37Bhg+6++24lJCQoOTlZO3fulHS+Z2DIkCHq\n3bu3nnjiiVI1nz17Vi+88IJmzZqlevXqSZL8/Pz0xBNPKDk52XUeF3zzzTcaMGCAevfurT59+ign\nJ0eS5HA49PDDDys+Pl6JiYmaPHmy69zLqstut+uRRx5RbGysBgwYoO++++6i7VpcXKzp06frzjvv\nVK9evTRp0iQ5HA5t2rRJvXr1cm135swZdejQQTabTceOHVNqaqoSExPVu3dvvfDCC5LO9wB17txZ\nQ4YMUY8ePS7aY/D7P5DDhg1Tfn6+Nm/eLOl8uOrbt6969+6t22+/XevXr5dhGOrRo4drG0maNGmS\nXnvtNR04cED9+/dXYmKiEhMT9frrr1/0PF944QX16dPnout+b9GiRUpMTFR8fLweeugh1/vjgw8+\nUGJiopKSknT33Xfrs88+M13+W+PHj1dhYaESEhJcwWjBggVKTExU165dtXTpUknn3zNPPPGE+vXr\npx49eigxMVH/+c9/JEkDBgzQM888o3vvvVddu3bVE088cdHA8fnnn+v06dNKSUlRQkKCli1bJkna\ntWuXQkJCdNNNN0mSkpKStHXrVp0+fVrr1q1Tr169VLt2bQUEBCgxMVG5ubmSpODgYLVt21bLly8v\nV/uh+iAs4LI0fPhwBQUF6ZlnnvnDOovFUurb8+9fFxUV6c0339S4ceM0ZcoUDRo0SG+++aYaN26s\nNWvWuLYLDAxUdna2XnnlFc2dO1fffvutvv/+e82bN08vvfSS1qxZo2nTpik1NVX5+fmSpKNHjyon\nJ0dPPfVUqZq+++47BQYG6qqrriq1vHbt2oqLi5O/v7+r1pKSEo0YMUKDBg1Sbm6uXnrpJc2bN087\nd+7UunXrdPbsWeXk5GjVqlWSzv9hNqvrueeeU1BQkN5//30999xzOnjw4EXbdNGiRTp+/Lhyc3OV\nm5srp9Opp556StHR0Tp79qx2794tSXr77bfVpUsXhYSEaOzYsUpKSlJ2drZWrlypzZs3u76FHjt2\nTCNHjtTatWtVv379cv27tmrVSl9//bV+/PFHbd26VUuXLlVubq4effRRzZ8/XxaLRSkpKa5LCHa7\nXRs2bFBiYqJefvllde3aVdnZ2XrxxRf12Wef/eEPqGEYWrdunW699Va3teTk5Oibb77RypUrlZOT\no5iYGE2aNEmSNGfOHD355JNavXq1HnnkEVfXfFnLfysjI0O1atXSmjVr5ONz/iP4qquuUnZ2thYu\nXKjZs2fr3Llz2rhxo+rUqaPly5dr7dq1at26tStISNLhw4e1ZMkSvfXWW/rkk08ueiw/Pz9XAFm8\neLFeffVVrV+/Xj/99JP+9re/ubYLCAhQvXr1dOzYsT+sa9SokY4dO+Z63bVrV61bt85t+6F68avs\nAoC/wmKxaM6cOYqPj1enTp3+0LVu1q3bvXt3SVJ4eLjq16+vli1bul7/+uuvru369esnSWrYsKGi\no6O1detW+fj46Pjx4xo0aJBrO19fXx08eFAWi0Vt2rRx/QH4LR8fn3J1rxuGoe+//15FRUXq1q2b\n6/jdu3fXxo0blZCQoGeffVYDBgxQVFSUBg0apPDwcC1durTMurZu3erqYq5bt67r/H9v48aNGj16\ntHx9fSWd//b60EMPSZLuuusurVmzRjfeeKOys7M1btw4nT17Vtu3b9eZM2c0f/58SVJ+fr727dun\n1q1by8/Pz/XNtbwsFosCAwPVpEkTzZ49W2+++aYOHTqknTt3ugJZQkKCFi5cqJMnT+r999/Xrbfe\nquDgYHXv3l3jxo3Trl271LFjR02aNOkP74tTp07JZrOpSZMmbmv5v//7P+3atUtJSUmSpJKSElf3\ne8+ePTVy5Eh16dJFt9xyix544AHT5b91sfdmXFycpPNhqaioSA6HQz169FDTpk2VlZWlgwcPatu2\nbaXa80LgsVqtioiI0JkzZ/6w35EjR7p+btSokfr376/169crOjr6oufs6+t70fp++55u2rSpq4cD\nNQc9C7hsNW7cWFOnTtW4ceN06tSpUut++4FXVFRUal1AQIDrZz+/svPybz8gnU6n/Pz8ZBiGOnbs\nWOoa8LJly9SiRQtJUlBQ0EX3dd111+ncuXM6dOhQqeWFhYV68MEHS13+uFiocDqdOnfunJo2baoP\nPvhAw4YNk91u13333ae1a9ea1mWxWEq1x8XCzIVj/Ha7kpIS1+WRxMREvffee9q3b59sNpvat2/v\nqnP58uWljjls2DBJkr+/f5nHkv44dsIwDH311Vdq0aKFvvrqK/Xr108Oh0PR0dF68MEHXccLDQ1V\nbGyscnNzlZ2drf79+0uSunTporVr1+qOO+7Q3r171atXLx0+fLjUMXx8fMo9PsAwDA0dOtR1bqtX\nr9aSJUskSY899piWLVumG2+8UWvWrFG/fv1kGEaZy9258D680CaGYej111/XpEmTFBQUpN69e+vO\nO+8sta/atWv/od7fy8rK0tGjR12vnU6n/P391bhx41IDGouLi3Xq1Ck1atRIjRs3LvV+PHbsWKme\nBqfTafrviuqJf3Fc1mJjYxUTE6N//etfrmX16tVzdZmfPHlS//73v8u9v99+4GZnZ0uSq0v8lltu\n0c0336zNmze7rvvn5eUpPj5ehYWFpn8UAgIC9OCDD2rChAn65ZdfJJ0PMTNmzFBBQYEaNmzo+v1r\nrrlG/v7+rq7eY8eO6YMPPlBUVJSWLVum8ePHKzo6WmPGjFGnTp30zTffmNbVqVMnrVq1SoZh6MyZ\nM/rwww8vWmN0dLTeeOMNnTt3Tk6nU0uXLnV9A23UqJEiIyM1ZcoU3X333ZLOX79u06aNazyIzWbT\nPffcow0bNvzpti4pKdHChQtVr149tWvXTtu3b1fr1q113333qV27dlq/fn2pEJWSkqLXXntNhmGo\ndevWkqTHH39c7777rnr27KkpU6YoODhYP/30U6ljhoWFKTQ0VEeOHCmzlt+2x4oVK2S32yVJmZmZ\nSktLU0lJibp27ar8/Hz1799fU6ZM0Xfffafi4uI/LD9w4IDOnTtXar9+fn5ue5kMw9DmzZuVkJCg\npKQkXX311dqwYUOp3ytPCNmxY4defvllSdLp06e1evVq9ezZU23atNHp06f1+eefS5JWr16tm266\nSSEhIbrtttv01ltvKT8/X0VFRVqzZo2rl0s6f/nj2muvdXtsVC9chsBl5/ffSCdNmlQqEAwYMEBj\nxoxRbGysrrzySv3zn/8s975++7q4uFgJCQk6d+6cJk+erIiICEnnbz0cPXq0DMOQn5+fFi1apMDA\nwD+Mjfi9YcOGKTAwUEOGDJF0vlfhn//8pxYtWuQ6tsVikZ+fnxYuXKgZM2ZowYIFKikpUWpqqjp0\n6KDWrVtr27Zt6tmzpwIDA3XllVdq0KBBCgkJKbOuUaNGKT09XbGxsbriiivUvHnzi9Y3cuRIzZ49\nW/Hx8Tp37pzatGmjyZMnu9bffffdeuSRR7R48WLXsrlz52r69Onq1auXiouLFRcXp7i4OB05csTt\nXRevvvqqcnNzXeM0IiMj9eKLL0qSevXqpXXr1ikuLk5hYWHq2bOn3n77bZ09e1ZBQUFq1aqVwsLC\nXL0KF+qfNGmSli9fLl9fX91+++1q3779H4574ZJOcnKya1nXrl1LbfPss8+qb9++OnbsmPr16yeL\nxaImTZooIyNDvr6+mjBhgh5//HH5+/vLYrFo5syZCggI+MPyWbNmucajXNCwYUPdcMMN6tmzp15/\n/fWLvgctFosGDx6sKVOmKCcnR3Xr1lW3bt2Ul5dXajt3Jk+erClTpiguLk7FxcUaMGCAOnbsKOm/\nt+rm5+erbt26mj17tqTzlze+/vpr9e3bV8XFxbrtttsUHx/v2ufGjRt1xx13uD02qhcLj6gGcLk5\n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\nWEeOHFFsbKyuu+46SVJBQYFatmypKVOm6Iorrqjk6gBUBHoWAFyyhg0bKicnRzk5OXr//fcVERHh\nevgVgMsfPQsAKtyoUaMUFRWl/fv3KysrS99++61OnDiha665RpmZmVq0aJEMw9Bjjz0mSRo/frw6\ndeqkkpISvfzyy/Lx8VHTpk319NNPM3sfUAXQswCgwvn7+ysiIkLr169XrVq19MYbb2jdunUqKCjQ\nxx9/rKSkJL399tuSpLNnz+qTTz5Rt27dNH/+fL3yyivKzs7Wtddeq++++66SzwSARM8CAA+xWCz6\n+9//rqZNm2rp0qX67rvvdPDgQZ09e1bh4eG68sortX37dv3www/q0qWLAgICdOuttyo5OVm33Xab\nevTooVatWlX2aQAQPQsAPKCoqEj/+c9/dOjQIY0ZM0ZBQUFKSkpS+/btXdskJSXprbfe0jvvvKOE\nhARJ5x+Q9dxzzyksLExjx45Vbm5uZZ0CgN8gLACoUE6nUwsWLNA//vEPHTp0SHfccYcSEhJ0xRVX\naPv27Tp37pyk80963Lp1q3755RdFRkaqpKREPXr0UN26dTV06FD16dNHe/fureSzASBxGQJABfj5\n558VHx8vSSopKdHf//53zZ07Vz/99JMef/xxffDBB2rQoIFuu+02/fDDD5KkWrVq6aabblLLli0l\nSb6+vnr44Yd1//33q3bt2qpTp44yMjIq7ZwA/BePqAZQKex2u/r3769//etfzMcAVHFchgDgdV9+\n+aVuu+029evXj6AAXAboWQAAAKboWQAAAKYICwAAwBRhAQAAmCIsAAAAU4QFAABgirAAAABM/T8b\nHsGvYGz4kAAAAABJRU5ErkJggg==\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd6cc4702d0>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(time_to_closure[time_to_closure < (500*24*3600)] / (3600 * 24), \"Number Closed over Days (Less than 500)\", \"Days\", \"Number Closed\")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Statistics on time to closure"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 28,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Average time to closure 177.271462655 Days\n",
+      "Median time to closure 21.178587963 Days\n",
+      "Standard Deviation of time to closure 335.366124974 Days\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(\"Average time to closure\", time_to_closure.mean() / (3600 * 24), \"Days\")\n",
+    "print(\"Median time to closure\", time_to_closure.median() / (3600 * 24), \"Days\")\n",
+    "print(\"Standard Deviation of time to closure\", time_to_closure.std() / (3600 * 24), \"Days\")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Explore the length of a typical comment (Really Rough still need to remove markup, stop words, etc...) I'm also not differentiting between first comment and everything else.\n",
+    "..."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 29,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "length_of_comments = chrome_comment[\"content\"].apply(lambda content: len(content.split()))"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 30,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgsAAAFtCAYAAACJGikUAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt0VOW9xvFnJpkBMhcuEhUlxYp4qw0ag1wSLuINJCiI\nGBIEqoiUY0CLUCKIEZGLIioa0aNLe1QUQQmI1VbRHokmSFBEoFxUVE6UNEADZGYSMkNmnz9cTI1h\ndqJkcv1+1nItZu83e347b9N5Zu/3fbfFMAxDAAAAYVgbugAAANC4ERYAAIApwgIAADBFWAAAAKYI\nCwAAwBRhAQAAmCIsAA3s+++/1yWXXFIv77V161ZlZWVJkjZu3KihQ4ee1PGKioqUkpKiYcOG6Ysv\nvqiy78knn9TcuXNP6vgnq7i4WJMmTaqxXUlJiTIyMnTddddpyJAhevjhh3V8VvkXX3yhG264Qdde\ne63+8Ic/6MCBA6Gfe+aZZzR48GBdffXVys7ODm1/6KGHVFBQUPcnBDQQwgLQgnz99dcqLi6us+Nt\n3LhRsbGxWrNmjbp3715ln8ViqbP3+bXuvfdeZWRknHDf1q1b9dxzz0mS5s+fr27dumnt2rVavXq1\ntm7dqpycHPn9fk2ZMkWzZ8/WO++8o2uuuUazZs2SJK1fv17vvvuuVq9erb/+9a/auHGj/va3v0mS\n7rjjDs2dO1cVFRX1c6JAhEU3dAEAwvP7/XrkkUf06aefqrKyUhdeeKFmzZolp9OpgQMH6oYbbtCG\nDRtUVFSkwYMHa/r06ZKkZ599VqtWrZLD4dCll16qDz74QK+++qqeeOIJeb1ezZw5U8OGDZPP59PU\nqVP1zTffqKKiQnPnzlViYmK1OlasWKFly5bJarWqY8eOmj17toqLi7VkyRJ5PB6NGzdOL774Ytjz\n+PTTT/XQQw+psrJSFotFEydO1NVXXx12e2Zmps4991zdeuutklTldXFxsebOnat9+/bp2LFjGjJk\niCZOnFjtPbds2aKSkhL97ne/C23zer1688039cYbb8jhcGjs2LGSpKuvvlqXXnqpJMlut+ucc85R\nUVGRtm3bJpfLFbryM2LECM2fP1+HDx/WunXrNHToULVu3VqSdMMNN2jt2rUaPHiwnE6nEhIStGLF\nitB7AE0ZVxaARuzZZ59VdHS0cnJy9Oabbyo2NlaLFy8O7S8rK9Mrr7yi5cuXa9myZfrhhx/00Ucf\nafXq1Vq1apVycnJUVlYmi8Wi008/XXfeeacSExM1f/58GYah4uJi/eEPf9CaNWuUmppa5VL6cRs2\nbNDzzz+vl156SW+++aZSUlJ0xx13qGfPnpoyZYoSExPDBoXjVxeys7N1yy23KCcnR/Pnz9fGjRtN\nt1sslipXJn76evr06RoxYoRycnL0+uuvKy8vL/SN/qfeffddXX755aHX8+fP17Bhw1RUVKTHH39c\ny5Yt09VXXy3px7BwyimnSJJ27Niht99+W1deeaX+9a9/6fTTTw8dw263q0OHDiouLq6277TTTqty\n1WbgwIFat27dCX8vQFPDlQWgEfvwww/l8XiUn58vSQoEAqEPNUm64oorJP34QXXKKafo8OHDWr9+\nfejbrSSNHj1aGzZskCT9fHX3uLg4xcfHS5LOP/98rVq1qloNH330ka699lq1b99ekjR8+HDNmzdP\n33//fbXj/dzx/YMHD9acOXP0j3/8Q3369NGf/vQn0+0nqlWSysvLtWnTJpWWlmrJkiWhbbt27dLg\nwYOrtP322281ZMiQ0OuoqChFRUXJarWGvUXy0Ucf6c9//rNmz56t888/X1999dUJ20VFRZ2wPqv1\nP9+/OnfurG+//faEPw80NYQFoBELBoO699571bdvX0mSz+erch/8+CXw4wzDkM1mUzAYDG376QfY\nz9lsttC/w32AGoZR7YPRMAxVVlbW+jxSU1N1+eWXKy8vTx999JGys7O1du3asNuPv8dxfr9fkkLv\nuWLFCrVq1UrSj4MTf/57OH4+P61xxowZuuOOO7R27VpNmTJFbrdbY8eO1ZVXXilJ+stf/qLnnntO\njz76qHr37i1JOuOMM6oMaAwEAjp06JBOO+00derUSfv37w/tKy4urnKlIRgMmv7ugaaE/yUDjVjf\nvn21bNky+f1+BYNBZWVl6fHHHw/b3mKxqH///nrvvffk9XolSW+88UboQysqKkqBQOAX1/C3v/1N\nJSUlkqRVq1apffv26tKli+nP/fTDftSoUdq5c6eGDx+uBx54QKWlpTpy5EjY7R06dND27dsl/RgG\nPvvsM0mS0+lU9+7d9cILL0iSPB6PRo8erX/84x/V3v+ss85SYWFhlW1Op1Pp6elas2aNpk6dqj17\n9kj6MSi8+uqrWrlyZSgoSFJ8fLwOHz6szz//PHTul1xyiVwul6644gq99dZbKi8vl9/v1+rVq0PB\n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\nORwOLVy4UB06dNCWLVs0f/58RUVFKSkpSRkZGZKk7OxsrV+/XlFRUZo5c6bi4+MjeXoAALQIEQ0L\n//u//yur1arly5eroKBAjz76qCRp6tSp6tGjh7KysvTBBx+oe/fuevnll5WTk6OKigqlpaWpT58+\nWr58uc477zxlZGTonXfe0dNPP61Zs2YpKytL2dnZiouL0+23366dO3cqGAxq06ZNev3111VUVKTJ\nkyfrjTfeiOTpAQDQIkQ0LFx55ZW6/PLLJUk//PCD2rZtq/z8fPXo0UOS1K9fP+Xl5clqtSohIUE2\nm002m01dunTR7t27tXnzZk2YMEGS1LdvXy1dulRer1eBQEBxcXGSpOTkZOXn58tutyspKUmS1KlT\nJ1VWVurQoUNq3759JE9RkmQYhjye0hrbuVxuWSyWiNcDAEBdimhYkKSoqChlZmbq/fff15IlS5SX\nlxfa53A45PF45PV65XK5qmz3er3yer1yOBxV2vp8PjmdziptCwsL1apVK7Vr167aMeojLJSX+bR+\nc4nadTjFtM1VPc+R29024vUAAFCXIh4WJGnhwoU6ePCgRo4cKb/fH9ru9XrldrvldDrl8/lC230+\nn1wuV5XtPp9PbrdbDoejStvjx7DZbCc8hpnYWPP9kmS3B+V0lMjhbB22TbnPLpfLoY6xsWHb+Lyt\n1LGjS23b1vyeqJ3a9B8aJ/quaaP/Wp6IhoU1a9aouLhYEydOVOvWrWW1WnXRRRepoKBAl112mXJz\nc9W7d2/Fx8frsccek9/vV0VFhfbs2aNzzz1XCQkJys3NVXx8vHJzc5WYmCin0ymbzabCwkJ17txZ\neXl5ysjIUFRUlBYtWqTx48erqKhIwWCwypWGEzlwwFPjOZSWeuT1VSioo2Hb+Hx+Wa2VatUmfJsy\nX4UOHvTI72cCSl2IjXXVqv/Q+NB3TRv917T92qAX0bAwaNAgZWZm6uabb9axY8c0a9YsnX322Zo9\ne7YCgYC6du2qQYMGyWKxaOzYsUpPT1cwGNTUqVNlt9uVlpamGTNmKD09XXa7XYsXL5YkzZkzR9Om\nTVNlZaWSk5NDsx4SExOVmpqqYDCorKysSJ4aAAAthsUwDKOhi2gotbuycEQfbytSjCN8Gju4v0hW\na5Q6dDw1bJsyn0fJv+/EmIU6wrebpou+a9rov6bt115Z4Jo4AAAwRVgAAACmCAsAAMAUYQEAAJgi\n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\n+vTpo+XLl+u8885TRkaG3nnnHT399NOaNWuWsrKylJ2drbi4ON1+++3auXOngsGgNm3apNdff11F\nRUWaPHm+6adIAAARJUlEQVSy3njjjUieGhqZljo2AgDqQ0TDQpcuXZSdna0///nPkqQdO3aoR48e\nkqR+/fopLy9PVqtVCQkJstlsstls6tKli3bv3q3NmzdrwoQJkqS+fftq6dKl8nq9CgQCiouLkyQl\nJycrPz9fdrtdSUlJkqROnTqpsrJShw4dUvv27SN5emhEmuLYiNoEHMINgMYgomHh6quv1vfffx96\nffy2gyQ5HA55PB55vV65XK4q271er7xeb+iKxPG2Pp9PTqezStvCwkK1atVK7dq1q3YMwkLTUJsP\nTY+nVDJMm9Tb2Ii6qremgNPYwg2AlqteBzharf8ZIuH1euV2u+V0OuXz+ULbfT6fXC5Xle0+n09u\nt1sOh6NK2+PHsNlsJzxGTWJjXWrbto0qLK3D1yy/YmJayeUM36bcZ5fVamsUbRpTLbVv829t2l2s\nDh2OhW1z8ECxHM62VY7z03/X5n2s8qtjR5fatj25QHHkyBG9u6FQMSbTIk9U78+V++xyuRzqGBt7\nwv0+b6s6qbcxio1tfufUktB/LU+9hoULLrhABQUFuuyyy5Sbm6vevXsrPj5ejz32mPx+vyoqKrRn\nzx6de+65SkhIUG5uruLj45Wbm6vExEQ5nU7ZbDYVFhaqc+fOysvLU0ZGhqKiorRo0SKNHz9eRUVF\nCgaDVa40hHPggEdHjpQrEG0P26bMV6Gysgp5vOGXFvb5/LJaK9WqTcO3aUy1/LI2UQoqfD8EjWj5\nfEdDx3E5W1fpk9q8T5mvQgcPeuT3n9y43tJSj4JG9C+q90Rqqrmu6m1sYmNdOnDAU3NDNEr0X9P2\na4NevYSF4/dcMzMzNXv2bAUCAXXt2lWDBg2SxWLR2LFjlZ6ermAwqKlTp8putystLU0zZsxQenq6\n7Ha7Fi9eLEmaM2eOpk2bpsrKSiUnJys+Pl6SlJiYqNTUVAWDQWVlZdXHaaEZqqtbDADQnEQ8LHTu\n3FmvvfaaJOmss87Syy+/XK3NyJEjNXLkyCrbWrdurSVLllRr2717d61YsaLa9oyMDGVkZNRR1WiO\nahsEPvnnfrVxhL/FUHKwWDEOt2KcXIoF0DKwKBNajNrMmAgFAZOBkmU+byTKA4BGi7CAFqWmGRME\n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\n4YYbJNXN31+Lmw1x1VVXKS8vT6NGjZL045LQaNxuvPFG3XPPPRo9erSkH/usXbt2mj17tgKBgLp2\n7apBgwY1cJU4keMzVDIzM6v1l8Vi0dixY5Wenq5gMKipU6fKbrc3cMU47njfzZkzR3PmzFF0dLRO\nPfVUPfDAA3I4HPRdI/XMM8/I4/Hoqaee0lNPPSVJmjVrlubNm3dSf38s9wwAAEy1uNsQAADglyEs\nAAAAU4QFAABgirAAAABMERYAAIApwgIAADBFWACage+//17nn39+tWdkDBw4UPv27Tvp4w8cOFCH\nDx8+6eOY2bdvnwYNGqQRI0aEVpYLBAJKSEhQaWlpqN2IESN06623hl5/8803Gjhw4K9+35SUlDr5\nHQHNGWEBaCaio6N17733VlnCtS5FekmWgoIC/e53v9OqVavkcDgkSTabTQkJCfr8888lSSUlJTIM\nQ999952OHj0qSfrss8+UnJz8q9+XR5sDNSMsAM3EqaeequTkZD300EPV9m3cuFFjxowJvc7MzNTq\n1av1ww8/6Prrr9fkyZN1zTXX6O6779aKFSs0atQoDR48WHv27An9zCOPPKLhw4dr1KhR+vrrryX9\nuLTsHXfcoRtuuEE33nijNmzYIEl68sknNX78eA0ZMkTLly+vUsu3336rMWPG6LrrrtOoUaO0bds2\n7dq1S0uWLNHHH3+s+++/v0r7Xr16afPmzZKkvLw89e7dW5dccklo+dpPP/1Uffr0kWEYevDBB5WS\nkqKhQ4fqueeeC537jTfeqBtuuEH33HOPSktLNXHiRA0dOlSTJ08Ohatdu3YpNTVVI0aMUHp6uvbu\n3Xsy3QE0K4QFoBn585//rI8//rjGR3ZbLBZZLBYZhqEvv/xSd9xxh/7+979r27Zt2rdvn1577TUN\nGTJEK1euDP1Mt27dtHr1ak2aNEmZmZmSpHnz5mnEiBHKycnR0qVLdd9991W5hfD2228rLS2tyntP\nnz5d48aN09q1a3XPPffozjvv1Nlnn60pU6Zo4MCB1cJC7969Q2Hh448/Vt++fZWUlKSPP/5YkvT5\n55+rT58+evXVV1VcXKy33npLr7/+ut577z2tX79ekrR371699NJLWrBggZYsWaLzzz9fb731liZM\nmKB//etfMgxDL774om655RatWrVKN998s7Zs2fLrOwJoZggLQDPidDo1d+7cX3Q7omPHjjr//PNl\nsVh02mmnqVevXpKkM844o8pYgRtvvFGS1L9/fxUWFsrr9So/P19PPPGEhg0bpttvv12VlZUqLCyU\nxWJR9+7dq72Xz+dTYWGhrrzySkk/Pv64bdu2+vbbb8Pe5rjgggu0d+9eBQIBbd68WZdeeqn69Omj\ngoICFRcXq23btnK73dq4caOGDx8ui8Wi1q1ba+jQodqwYYMsFot++9vfhh5NX1BQoCFDhkiS4uPj\n1a1bN1ksFg0YMEBz587VrFmzZLfbNXTo0Fr+1oHmr8U9SApo7pKSkpSUlBR6UqdU/b58IBAI/dtm\ns1XZFx194v9biIqKqtbOMAy99NJLoUfbFhcXKzY2Vu+//75atWpV7RiGYVQLBYZhKBgMhh07YLVa\n1b17d61Zs0ZnnXWWbDabTj/9dAWDQeXm5iopKemExw4Ggzp27JgkVaslGAxWO69rrrlGF198sT78\n8EO9+OKLWr9+vebOnXvCmoCWhisLQDM0Y8YM5eXlaf/+/ZKk9u3bq7CwUH6/X4cPH9Znn332i4/5\n1ltvSZLWrVuns88+W61bt1avXr30yiuvSJK++uorXXfddSovLw97lcDpdCouLk7r1q2T9ONj4g8e\nPKhu3bqZDqDs1auX/ud//qfKQMaePXvqpZdeCoWFXr16ac2aNQoGgyovL9df//pX9erVq9pxk5KS\ntHr1aknS7t279eWXX8owDN19993atm2bUlNTNWXKFP3zn//8xb8joLniygLQTPz0m/nx2xG33Xab\npB/HG/Tv319DhgzRmWeeqcTExNDPhPtG//PtX375pYYNGyaXyxUaRHnvvffqvvvu03XXXSfDMPTI\nI4/I4XCYzjBYtGiRsrKy9MQTT6hVq1bKzs5WdHS06c/06tVLDz74YJWwkJycrFWrVumSSy6RJKWm\npurbb7/V9ddfr0AgoOuvv15XXnmlNm7cWOXYkydP1j333KMhQ4boN7/5jc4++2xZLBZNmDBB9957\nr5YuXaqoqCjNnDkzbD1AS8MjqgEAgCluQwAAAFOEBQAAYIqwAAAATBEWAACAKcICAAAwRVgAAACm\nCAsAAMAUYQEAAJj6f+Jh/5/WfKhoAAAAAElFTkSuQmCC\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd64d328950>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(length_of_comments[(length_of_comments > 0) & (length_of_comments < 200)], \"Length of Issue (<200)\", \"Number of Words\", \"Count\")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Statistics on the lengh of Comments"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 31,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "count    5.712584e+06\n",
+       "mean     3.971911e+01\n",
+       "std      7.033108e+01\n",
+       "min      0.000000e+00\n",
+       "25%      0.000000e+00\n",
+       "50%      1.800000e+01\n",
+       "75%      5.600000e+01\n",
+       "max      7.504000e+03\n",
+       "Name: content, dtype: float64"
+      ]
+     },
+     "execution_count": 31,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "length_of_comments.describe()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Explore Labels"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 32,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "chrome_issue_id_set = set(chrome_issue[\"issue_id\"])"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 33,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "0\n",
+      "1000000\n",
+      "2000000\n",
+      "3000000\n"
+     ]
+    }
+   ],
+   "source": [
+    "labels_by_issue = defaultdict(list)\n",
+    "num_times_label_used = defaultdict(int)\n",
+    "i = 0\n",
+    "for index, row in issue_label.iterrows():\n",
+    "    if row[\"issue_id\"] in chrome_issue_id_set:\n",
+    "        labels_by_issue[row[\"issue_id\"]].append(row[\"label_id\"])\n",
+    "        num_times_label_used[row[\"label_id\"]] += 1\n",
+    "    if i % 1000000 == 0:\n",
+    "        print(i)\n",
+    "    i += 1"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 34,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "chrome_issue[\"labels\"] = chrome_issue[\"issue_id\"].apply(lambda i_id: labels_by_issue[i_id])"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 35,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "chrome_issue[\"num_labels\"] = chrome_issue[\"labels\"].apply(lambda labels_list: len(labels_list))"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 36,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "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\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd69d327e10>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(chrome_issue[\"num_labels\"], \"Number of Labels per Issue\", \"Num Labels\", \"Count\")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Statistics on Labels per Issue"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 37,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "count    611859.000000\n",
+       "mean          5.243520\n",
+       "std           2.379956\n",
+       "min           0.000000\n",
+       "25%           4.000000\n",
+       "50%           5.000000\n",
+       "75%           6.000000\n",
+       "max          70.000000\n",
+       "Name: num_labels, dtype: float64"
+      ]
+     },
+     "execution_count": 37,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "chrome_issue[\"num_labels\"].describe()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 38,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "number_times_label_used = pd.DataFrame(num_times_label_used.items(), columns=[\"label_id\", \"number_time_used\"])"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 39,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Number of Unique Labels 20493\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(\"Number of Unique Labels\", number_times_label_used.shape[0])"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 40,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "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\nxKmyLEuzZ89WbW2tJGn+/Pn61a9+dYZXBQDAue+sDAcAAHBmnJUvVQAAgDODcAAAAMYIBwAAYOys\n/HVME7x2Ux8pAAAJ0klEQVQt9anbunWrHn/8cS1ZskS7d+9WXl6ewsLCdPnll6ugoEA2m02rVq3S\nypUrFR4eruzsbGVkZKipqUnTpk1TQ0ODHA6HioqKFBMTo6qqKs2bN092u139+/dXTk6OJKmkpETv\nvvuu7Ha7ZsyYoYSEhDN85KHh9Xo1Y8YM7dmzRx6PR9nZ2erWrRtzPo18Pp9mzpypL774QjabTXPm\nzFFkZCQzDoJ//OMf+t3vfqcXX3xRYWFhzPg0Gz58eOD9iuLi4nTXXXe1nRlb56j//u//tvLy8izL\nsqyqqiorOzv7DK+obXv22WetoUOHWqNGjbIsy7Luuusua8uWLZZlWdbDDz9svfnmm9a+ffusoUOH\nWh6Px2psbLSGDh1qNTc3Wy+88IL15JNPWpZlWa+99ppVWFhoWZZl3XDDDdaXX35pWZZl3XnnnVZ1\ndbW1fft2a9y4cZZlWdaePXusESNGhPpQz5jVq1db8+bNsyzLsg4cOGANGDDAuvvuu5nzafTmm29a\nM2bMsCzLsjZv3mzdfffdzDgIPB6Pdc8991j/9m//Zu3atYu/L06zpqYmKzMzs8W2tjTjc/alCt6W\n+tTEx8erpKRE1v/+kk11dbWSk5MlSenp6SovL9fHH3+sxMRERUREyOl0Kj4+XrW1taqsrFR6erok\nKS0tTRUVFXK5XPJ6vYqLi5Mkpaamqry8XJWVlerfv78k6aKLLpLP59O33357Bo449IYMGaL77rtP\n0g9nxMLDw5nzafav//qvmjt3riTp73//uzp16qRPPvmEGZ9mjz32mLKyshQbGyuJvy9Otx07dujQ\noUO6/fbbNX78eFVVVbWpGZ+z4dDa21Lj+AYPHiy73R64bR31W7oOh0ONjY1yuVyKiopqsd3lcsnl\ncsnhcLS4r9vtbjH/kz3Gz0HHjh0Dxzt58mTdf//9Lb4nmfPpYbfblZeXp0cffVTDhg3je/k0Ky0t\nVUxMjFJTUyX98HcFMz69OnTooNtvv13PP/+85syZo6lTp7bYf6ZnfM5e43Aqb0uNYx09K5fLpejo\n6GNm6na7FRUV1WK72+1WdHS0HA5Hi/seeYyIiIjjPsbPxd69e5WTk6MxY8Zo6NChWrhwYWAfcz59\nioqKtH//ft18883yeDyB7cz4pystLZXNZlN5ebl27NihvLy8Fj+hMuOf7tJLL1V8fHzgz507d1ZN\nTU1g/5me8Tn7LylvS/3T9OzZU1u2bJEklZWVKSkpSQkJCfroo4/k8XjU2NioXbt2qXv37i1mfeS+\nTqdTERERqqurk2VZ2rRpk5KSkpSYmKj3339flmVpz5498vv96ty585k81JDZv3+/brvtNk2bNk2/\n+93vJDHn023t2rX6wx/+IElq3769wsLC1Lt3b2Z8Gi1dulRLlizRkiVLdMUVV2jBggVKTU1lxqdR\naWmpioqKJEnffPON3G63+vfv32ZmfM6+c6TF21Kfsq+++kpTp07VihUr9MUXX2jWrFnyer3q1q2b\nCgsLZbPZ9PLLL2vlypXy+/3Kzs7WoEGD1NTUpNzcXNXX1ysyMlLFxcU6//zztXXrVs2bN08+n0+p\nqam6//77Jf1wBW9ZWZn8fr9mzJihxMTEM3zkoVFYWKg33nijxfdhfn6+Hn30UeZ8mjQ1NSkvL0/7\n9+/X4cOHNXHiRF122WV8LwfJ2LFjNXfuXNlsNmZ8Gh0+fFjTp0/Xnj17JEnTpk1T586d28yMz9lw\nAAAAp985+1IFAAA4/QgHAABgjHAAAADGCAcAAGCMcAAAAMYIBwAAYIxwAM5BX331la644gqVl5e3\n2D5w4MDA74b/FAMHDtSBAwd+8uNIUl5entasWdNi25NPPqmSkpKf/Nh33XVX4E1zAJwehANwjgoP\nD9fMmTNbvJ3s6XS63gLGZrPJZrMdsy1Yjw3gpzlnP6sC+Lnr0qWLUlNTtWDBgsAnRh6xefNmlZSU\naMmSJZJ++Kn/6quvVt++fXXPPffokksu0c6dO9W7d2/17dtXa9as0cGDB1VSUqJu3bpJkh5//HFV\nV1erXbt2Kiws1K9//Wvt379fBQUF2rt3r8LCwvTggw+qX79+evLJJ1VVVaWvv/5at956q7Kyslqs\n50QRsmDBApWXl8tut2vgwIHKycmR2+3W3Llz9emnn8rv9+vOO+/U9ddfL4/Ho1mzZmnbtm26+OKL\nfxafpAiEGmccgHPYQw89pPfff/+Ylyx+7MhP5pZlaefOnbr33nv1xhtv6OOPP9aePXu0YsUKXX/9\n9Vq1alXgay6//HKtWbNG2dnZysvLkyQ9+uijGjFihEpLS/X000/r4YcfDpzx8Hq9eu21146JhhPZ\ns2eP3nvvPa1bt04rVqzQl19+KY/Ho8WLF6t3794qLS3V0qVL9cwzz6iurk5Lly6Vz+fT66+/rjlz\n5uiLL7449aEBOCHOOADnMKfTqUceeUQzZ87Uq6++avQ1F1xwga644gpJ0oUXXqiUlBRJ0sUXX6wP\nP/wwcL+bbrpJkjRgwAA99NBDcrlcKi8v19/+9jc98cQTkiSfz6e6ujrZbDb16dPnuM93vJcSLMuS\n3W7XhRdeqHbt2ikrK0u//e1vNXnyZEVGRqq8vFzNzc1avXq1JOnQoUP67LPPtGXLFo0aNUqS1LVr\n18DaAZw+hANwjuvfv7/69+8f+LQ96dh/rL1eb+DPERERLfaFhx//rwm73X7M/SzL0p/+9CdFR0dL\n+uGT/WJjY7Vhwwa1a9fuuI/TqVMnfffddy227d+/X927d5fdbtfLL7+sLVu26N1339WoUaO0dOlS\nWZalxx9/XD179pQk1dfXq3PnzoEP+znZ2gH883ipAvgZyM3N1aZNm7Rv3z5J0nnnnae6ujp5PB4d\nOHBAf/3rX0/5MY+cwXjzzTd12WWXqX379kpJSdGyZcskSZ9++qluuOEGHTp06ITXMKSkpGj9+vU6\ndOiQpB8i4N1331VKSop27NihW2+9VcnJycrNzdWvf/1r/e1vf1NKSopeeuklSdK+ffs0fPhwff31\n1+rfv7/WrVsny7K0b98+bd68+ZSPC8CJkePAOeroswpHXrK44447JP1wfcKAAQN0/fXX65e//KWS\nkpICX9PabyH8ePvOnTuVmZmpqKgoLViwQJI0c+ZMPfzww7rhhhsCZwUcDscJf7NhwIABqq2t1ciR\nI2Wz2RQWFqaHHnoocBHmlVdeqaFDh6pDhw7q1auXBgwYoOTkZM2ZM0fDhg2Tz+fT1KlTFRcXp6ys\nLH322We69tprdeGFF6pHjx7//AABHBcfqw0AAIzxUgUAADBGOAAAAGOEAwAAMEY4AAAAY4QDAAAw\nRjgAAABjhAMAADBGOAAAAGP/H525Lub2Dn6cAAAAAElFTkSuQmCC\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd64a4fc450>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(number_times_label_used[\"number_time_used\"], \"Number of Times Label Used\", \"Number Used\", \"Count\")"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 41,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgIAAAFtCAYAAAB1DwLeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtAVHXex/HPcBG5eklqs4yKTC2zJFFMRXN9XCwszMq8\noJlbqZm6dBGveL+k5j6JZvnUtqGllnh7amvLUktUbE1LTS030fKGmQojMgNznj96nA0V8cIZxd/7\n9Zfz+838zne+IPOZc86ccViWZQkAABjJ71IXAAAALh2CAAAABiMIAABgMIIAAAAGIwgAAGAwggAA\nAAYjCKDc/PTTT6pbt67ee++9EuNvvPGGBg8eXG7bad26tb755ptyW+9s8vPz9dhjj6l9+/b65JNP\nvOOLFy9WUlKSkpKS1KRJE8XHx3tvf/XVV+rfv79P6jspMzNTvXv3Pq/HrFu3Tu3atTvvbbVu3Vpb\ntmw5bTw1NVVvvvnmaeMNGzbU3r17z3s7Z3Lq79KBAwfUp0+fs27fLmPHjvX+zOvXr6+EhAQlJSWp\nQ4cOKiwsVN26dXXkyBFba9i2bZuaN29eYmzTpk166KGHdN999+nxxx9Xbm6ud27WrFlq166d2rZt\nq/T0dO/4pEmTlJ2dbWutuHwFXOoCcGXx8/PT5MmTFRsbqxtvvFGS5HA4yn07vrr8xXfffafDhw/r\nn//8Z4nxky8AkjR48GDdeuut6tmzp3e+UaNGPqnvcuJwOGz5WZ/NsGHDNHDgwEuy/WHDhnn/3bp1\na02dOlW33357ifvY9XtaXFysjIwMzZ49WwUFBd5xl8ul/v37669//asaNmyod999V0OHDtXrr7+u\nlStX6uOPP9aiRYvk5+enXr16KTo6Wu3atdMzzzyjzp076/3331dQUJAtNePyRRBAuQoKClLPnj2V\nkpKi+fPnKzAwsMQfw9TUVN1666164oknTrvdunVrtW/fXitWrNCRI0f07LPPasOGDdqyZYsCAgL0\n6quv6uqrr5YkzZs3T6NGjZLL5VLPnj3VsWNHSdJnn32mWbNmye12q3Llyho0aJDuuusuTZ8+XRs3\nblRubq7q1q2rl156qUTdn376qWbMmKHi4mKFhYUpNTVV4eHhGjp0qA4cOKAOHTpo3rx5pf6R/P1z\nXLduncaOHatly5YpNTVVQUFB2rx5sw4dOqR27dqpevXq+uyzz3To0CGNHTtWcXFxcrlcmjJlir76\n6isVFxfrtttu09ChQxUWFqZ33nnH28ugoCCNHj1a0dHR5/wz+fzzz/Xaa6/J7Xbr8OHDSkpK0oAB\nAyRJBQUFGjBggHJychQeHq4xY8boxhtvPGs9Z3O2F76ioiKNGTNGGzZsUGBgoGrVqqUJEyYoJCRE\nGzZs0NSpU1VQUCCHw6Fnn31WrVq1ktvt1tixY7VmzRpVr15dNWrUUHh4uCRp48aNOnz4cIkX39K2\nX9r6ubm5GjRokPede8uWLTVgwIBSx8/Xyd+7I0eOqFevXuratauOHz+ukSNHKicnR0eOHFFoaKim\nTp2qm266ScnJyWrYsKE2bNigvXv3qlGjRpo0adJpAWfLli3asWOH/vu//1tPPvmkd/zbb79VeHi4\nGjZsKEnq2LGjxo8fryNHjuiTTz5R+/btVblyZUnSQw89pKVLl6pdu3YKCwtTTEyM5s+fr+7du5/3\n80TFxqEBlLvevXsrJCREL7/88mlzp75rO/W2y+XSkiVLNGjQII0YMUI9evTQkiVLdO2112rRokXe\n+wUHByszM1Nvvvmmpk6dqh9++EG7du3StGnTNHv2bC1atEijR49Wv379vO+Y9u3bp8WLF58WAnbu\n3KmRI0dq+vTpWrp0qfr376++ffvq6quv1tixY3XDDTdo0aJFF/xOafv27VqwYIEWLlyot956S6Gh\noZo3b566d++u2bNnS5Jef/11BQQEKDMzU0uWLFFkZKSmTp0qj8ejCRMm6I033tD777+vRx99VBs2\nbDjnbVuWpb/97W966aWXtHDhQs2bN0+vv/669wXu4MGD6tmzpxYvXqz27dvrxRdfPGs9F2Pjxo1a\nv369li1bpszMTNWqVUs7duzQ0aNHNXjwYE2ePFmZmZmaOXOmRo4cqX379umdd95RTk6OPvzwQ731\n1lvav3+/d72PP/5Y9957b5nbPXr0qIYMGXLG9RcsWKBatWopMzNTc+fO1e7du5Wfn3/aeE5OjvLz\n88/7Od9www3KzMzUjBkzNGnSJBUVFemLL75QlSpVNH/+fH388ce64447NHfuXO9j9uzZozlz5mjZ\nsmVau3btGXfZN2jQQOPHj9cf/vCHEuP79+8vMVapUiVVr15dBw4cOG3ummuu0YEDB7y3W7duXeLw\nF8zBHgGUO4fDocmTJyspKUktWrQ47d3M2d41tm3bVpJUq1Yt1ahRQ3Xq1PHePnr0qPd+nTp1kiRd\nffXVat68udasWSM/Pz/l5uaqR48e3vv5+/srJydHDodDd955p/z8Ts++a9euVdOmTXX99ddLkuLi\n4nTVVVdp8+bNF9iB/3A4HLr33nvl7++vGjVqKDg4WC1atPA+p5MvyCtWrFBeXp6ysrIkSW63W1dd\ndZX8/PyUkJCgTp06qVWrVmrWrJlatWp1XtufNWuWPv/8cy1dulT//ve/ZVmWNxzVqVNHd911l6Tf\nDneMHDlS+fn5pdZT1rbOxLIs+fv7q06dOvL399cjjzyi5s2bq23btmrQoIFWrlypQ4cOqW/fvt7H\n+Pn5afv27VqzZo3at2+vgIAABQQE6MEHH9TWrVslST/++KPuv//+Mntwck/Qqevv2LFD8fHxeuqp\np7Rv3z7dc889SklJUVhY2Gnjzz33XJl7Q84kMTFRklS3bl25XC45nU796U9/0vXXX6+MjAzl5OQo\nOzvb+w5ekjfchIaGKioqSseOHTvn7Xk8njOO+/v7n/H/3e//P1x//fX68ccfz3lbuHIQBGCLa6+9\nVqNGjdKgQYO8x9JP+v0fJJfLVWKuUqVK3n8HBJT+6/n7P2Aej0cBAQEqLi5W06ZNNW3aNO/c3r17\n9Yc//EGffvqpQkJCSl3v1D+SHo9HxcXF8vf3L/Ux5yowMLDE7TM9L4/Ho2HDhnlDgtPpVGFhoSRp\n8uTJ+uGHH7R69WrNnj1b77//vmbOnHlO2z5+/LiSkpLUtm1bNWrUSA8//LA+/fRT7/M9NRg5HA4F\nBASctZ7SVKtW7bST4/Lz81VYWKiIiAgFBwdryZIl2rBhg9auXau//OUvSk5OVlRUlKKjo7VgwQLv\n4w4cOKCrrrpK8+fPL/Hi9vt6HQ6HiouLT6v/VB6Pp9T1AwICtHz5cmVlZWnt2rV65JFHNGPGDDVs\n2LDU8fNx8md9si7LsvTOO+/ovffeU7du3fTAAw+oatWq+vnnn72PObnr/qTzOc+gZs2aJU4OdLvd\n+vXXX3XNNdfo2muv1cGDB0v04Pd7CDwezxmDMq58/NRhm4SEBMXHx+vvf/+7d6x69ered9qHDx/W\nv/71r3Ne7/d/EDMzMyX99kK/Zs0a3XPPPYqLi9Pq1av173//W5K0atUqJSUlqbCw8Kx/TE8+bs+e\nPZKkNWvW6MCBA2rQoMG5P9lzqPlsWrRooTlz5sjlcsnj8SgtLU1//etf9euvv6pVq1aqUqWKevTo\noQEDBmj79u3nvP2cnBw5nU4NGDBArVq10rp16+RyubwvoNu3b9d3330nSZo/f77uvvtuVa5cudR6\nziY+Pl7/+Mc/vC82lmXp73//u2JjYxUcHKzPP/9cPXr0UMOGDdWvXz8lJSVp+/btuvPOO5WTk6P1\n69dL+u1M+ISEBB08eFAtWrTQkiVL5HK55HK59OGHH3q3d+ONN3p/Ziedqd9nW3/KlCmaOXOm2rRp\no6FDh+qWW27Rrl27NHXq1NPGc3JyzrnvpbEsS6tXr1aHDh3UsWNH3Xjjjfrss89KhJ2LOcGwQYMG\nOnLkiL7++mtJ0sKFC9WwYUOFh4frj3/8o5YtW6aCggK5XC4tWrRIbdq08T52z549uvnmmy/8yaHC\nYo8AytWp78iGDRtW4sU+OTlZzz//vBISEnTdddepSZMm57zW72+73W516NBBRUVFGj58uKKioiRJ\no0ePVkpKiizL8p5gGBwcfNYzyqOjo5WWlqZnn31WxcXFCg4O1quvvnpeu4JLW/tM50Scaa5v376a\nNGmSOnToII/Ho9tuu02DBg1SaGio+vTpo8cff1xBQUEKCAjQ2LFjz7idL774osQ71ipVqujzzz9X\nq1atdN999ykyMlIxMTGqX7++du/ercDAQN18881KT0/Xnj17FBkZqUmTJp21nrNp0qSJnnzyST31\n1FOSpBMnTuj222/3nivSsmVLffHFF0pMTFRISIiqVq2qMWPGqHr16nrllVc0efJkFRYWyuPxaPLk\nyapZs6Yee+wx7d69W4mJiapWrZpuuOEG7/YSEhI0btw4Pfvss96xadOmafr06d7bJ8/mL239xx9/\nXIMGDVL79u0VGBioevXqKTExUUePHj1t/FwOQ5z6Mzn1tsPh0BNPPKERI0Zo8eLFqlatmtq0aaNV\nq1aV+rjz2U5gYKCmT5+uMWPGqKCgQNWqVfP+TO+9917t2LFDjzzyiNxut/74xz+W2Fv3xRdfXNDH\nSVHxOfgaYgAVVa9evTRw4EDdcccdl7qUCi0vL09dunTRwoULSxyegxlsPTSwadMmJScnS5J++eUX\n9enTR926dVPXrl31008/SZIWLFigjh07qlOnTlqxYoWd5QC4wowePVozZsy41GVUeDNmzNCQIUMI\nAYaybY/A7NmztXTpUu9HpVJTU9WqVSslJCRo3bp1On78uOrXr68nnnhCmZmZKiwsVOfOnUmkAAD4\nkG17BKKiopSenu498eXrr7/W/v371bNnTy1btkxxcXH65ptvFBMTo8DAQIWFhSkqKuq8ToQCAAAX\nx7Yg0LZt2xIfvfr5559VpUoV/e1vf9O1116r2bNny+l0eq8SJv32udkLuWgHAAC4MD771EDVqlXV\nunVrSb+dyTtt2jTVr19fTqfTex+n06mIiIizrmNZlhb/M1uBIdVLvU9A8TEltLq7fAoHAOAK5rMg\nEBMToxUrVujBBx9Udna2ateurQYNGmjatGlyuVwqLCzUzp07Vbt27bOu43A45HS6FeRXXPp9CguV\nm5tX3k/BKJGR4fTQZvTYfvTYfvTYNyIjw8u+0wWyPQic/Ixramqqhg0bpnfffVcRERGaOnWqwsPD\n1b17d3Xp0kUej0cpKSmcKAgAgA9VyOsIzMn8UkHhNUqddxQeVssmfK74YpDy7UeP7UeP7UePfcPO\nPQJcYhgAAIMRBAAAMBhBAAAAgxEEAAAwGEEAAACDEQQAADAYQQAAAIMRBAAAMBhBAAAAgxEEAAAw\nGEEAAACDEQQAADAYQQAAAIMRBAAAMBhBAAAAgxEEAAAwGEEAAACDEQQAADAYQQAAAIMRBAAAMBhB\nAAAAgxEEAAAwGEEAAACDEQQAADAYQQAAAIMRBAAAMBhBAAAAgxEEAAAwGEEAAACDEQQAADCYrUFg\n06ZNSk5OLjG2bNkyPfbYY97bCxYsUMeOHdWpUyetWLHCznIAAMApAuxaePbs2Vq6dKlCQ0O9Y1u3\nbtXChQu9t3Nzc5WRkaHMzEwVFhaqc+fOuueee1SpUiW7ygIAAL9j2x6BqKgopaeny7IsSdKvv/6q\nadOmaciQId6xb775RjExMQoMDFRYWJiioqK0fft2u0oCAACnsC0ItG3bVv7+/pIkj8ejoUOHKjU1\nVSEhId775OfnKzw83Hs7NDRU+fn5dpUEAABOYduhgd/bvHmzdu/erZEjR8rlcumHH37QhAkT1KRJ\nEzmdTu/9nE6nIiIiylwvPCJIQaGVS533CwpWZGR4qfM4N/TQfvTYfvTYfvS4YvNJEGjQoIH+93//\nV5L0888/KyUlRYMHD1Zubq6mTZsml8ulwsJC7dy5U7Vr1y5zvbxjhXJZJ0qddxQWKDc3r9zqN1Fk\nZDg9tBk9th89th899g07w5btQcDhcJS4bVmWdywyMlLdu3dXly5d5PF4lJKSwomCAAD4kMM6eeZe\nBTIn80sFhdcodd5ReFgtm9zhw4quPKR8+9Fj+9Fj+9Fj37BzjwAXFAIAwGAEAQAADEYQAADAYAQB\nAAAMRhAAAMBgBAEAAAxGEAAAwGAEAQAADEYQAADAYAQBAAAMRhAAAMBgBAEAAAxGEAAAwGAEAQAA\nDEYQAADAYAQBAAAMRhAAAMBgBAEAAAxGEAAAwGAEAQAADEYQAADAYAQBAAAMRhAAAMBgBAEAAAxG\nEAAAwGAEAQAADEYQAADAYAQBAAAMRhAAAMBgBAEAAAxmaxDYtGmTkpOTJUnfffedunbtquTkZPXq\n1Uu//PKLJGnBggXq2LGjOnXqpBUrVthZDgAAOEWAXQvPnj1bS5cuVWhoqCRp/PjxGj58uOrWrav5\n8+dr9uzZ+vOf/6yMjAxlZmaqsLBQnTt31j333KNKlSrZVRYAAPgd2/YIREVFKT09XZZlSZJefvll\n1a1bV5JUVFSkoKAgffPNN4qJiVFgYKDCwsIUFRWl7du321USAAA4hW1BoG3btvL39/fejoyMlCRt\n2LBBc+fO1eOPP678/HyFh4d77xMaGqr8/Hy7SgIAAKew7dDAmXz44YeaNWuWXn/9dVWrVk1hYWFy\nOp3eeafTqYiICF+WBACA0XwWBJYsWaIFCxYoIyNDVapUkSQ1aNBA06ZNk8vlUmFhoXbu3KnatWuX\nuVZ4RJCCQiuXOu8XFKzIyPBS53Fu6KH96LH96LH96HHFZnsQcDgc8ng8Gj9+vGrWrKl+/fpJkpo0\naaJ+/fqpe/fu6tKlizwej1JSUs7pRMG8Y4VyWSdK32ZhgXJz88rtOZgoMjKcHtqMHtuPHtuPHvuG\nnWHLYZ08m68CmZP5pYLCa5Q67yg8rJZN7vBhRVce/nPbjx7bjx7bjx77hp1BgAsKAQBgMIIAAAAG\nIwgAAGAwggAAAAYjCAAAYDCCAAAABiMIAABgMIIAAAAGIwgAAGAwggAAAAYjCAAAYDCCAAAABiMI\nAABgMIIAAAAGIwgAAGAwggAAAAYjCAAAYDCCAAAABiMIAABgMIIAAAAGIwgAAGAwggAAAAYjCAAA\nYDCCAAAABiMIAABgMIIAAAAGIwgAAGAwggAAAAYjCAAAYDCCAAAABiMIAABgMFuDwKZNm5ScnCxJ\nysnJUefOndW1a1eNHDlSlmVJkhYsWKCOHTuqU6dOWrFihZ3lAACAU9gWBGbPnq1hw4bJ7XZLkiZM\nmKCUlBTNnTtXlmVp+fLlys3NVUZGhubNm6c33nhDU6dOlcvlsqskAABwCtuCQFRUlNLT073v/Ldu\n3arY2FhJUnx8vLKysvTtt98qJiZGgYGBCgsLU1RUlLZv325XSQAA4BS2BYG2bdvK39/fe/tkIJCk\n0NBQ5eXlKT8/X+Hh4SXG8/Pz7SoJAACcIsBXG/Lz+0/myM/PV0REhMLCwuR0Or3jTqdTERERZa4V\nHhGkoNDKpW8rKFiRkeGlzuPc0EP70WP70WP70eOKzWdBoF69esrOzlbjxo21atUqNW3aVA0aNNC0\nadPkcrlUWFionTt3qnbt2mWulXesUC7rRKnzjsIC5ebmlWf5xomMDKeHNqPH9qPH9qPHvmFn2LI9\nCDgcDklSamqqhg8fLrfbrejoaCUkJMjhcKh79+7q0qWLPB6PUlJSVKlSJbtLAgAA/89h/f7gfQUx\nJ/NLBYXXKHXeUXhYLZvc4cOKrjykfPvRY/vRY/vRY9+wc48AFxQCAMBgBAEAAAxGEAAAwGAEAQAA\nDEYQAADAYAQBAAAMRhAAAMBgBAEAAAxGEAAAwGAEAQAADEYQAADAYAQBAAAMRhAAAMBgBAEAAAxG\nEAAAwGAEAQAADEYQAADAYAQBAAAMRhAAAMBgBAEAAAxGEAAAwGBlBoHvv//+tLGNGzfaUgwAAPCt\ngNImvvrqK3k8Hg0fPlxjx46VZVlyOBwqKipSWlqa/vnPf/qyTgAAYINSg0BWVpbWr1+vgwcP6pVX\nXvnPAwIC9Nhjj/mkOAAAYK9Sg0D//v0lSYsXL1ZSUpLPCgIAAL5TahA4qVGjRpo0aZKOHDlSYnzC\nhAm2FQUAAHyjzCAwcOBAxcbGKjY21jvmcDhsLQoAAPhGmUGguLhYgwYN8kUtAADAx8r8+ODdd9+t\n5cuXy+Vy+aIeAADgQ2XuEfjoo480Z86cEmMOh0PfffedbUUBAADfKDMIfPnll+W2MY/Ho6FDh2rX\nrl3y8/PTmDFj5O/vr9TUVPn5+al27dpKS0vjHAQAAHykzCCQnp5+xvF+/fqd98a+/PJLFRQU6N13\n31VWVpamTZumoqIipaSkKDY2VmlpaVq+fLnatGlz3msDAIDzV+Y5ApZlef/tdrv12Wef6Zdffrmg\njVWuXFl5eXmyLEt5eXkKDAzUli1bvJ9IiI+PV1ZW1gWtDQAAzl+ZewSeffbZErefeeYZ9ezZ84I2\nFhMTI5fLpYSEBB05ckSzZs3S+vXrvfMhISHKy8u7oLUBAMD5KzMInCo/P1/79u27oI39z//8j2Ji\nYvSXv/xF+/fvV/fu3VVUVOSddzqdioiIKHOd8IggBYVWLnXeLyhYkZHhF1Qj/oMe2o8e248e248e\nV2xlBoHWrVuXuH306FH16tXrgjZWUFCg0NBQSVJERISKiop02223KTs7W40bN9aqVavUtGnTMtfJ\nO1Yol3Wi1HlHYYFyc9mzcDEiI8Ppoc3osf3osf3osW/YGbbKDAJvv/229yx+h8OhiIgIhYWFXdDG\nevXqpcGDB6tLly4qKirSc889p9tvv13Dhw+X2+1WdHS0EhISLmhtAABw/soMAjVr1tS7776rtWvX\nqqioSHFxcUpOTpafX5nnGZ4mIiJCM2bMOG08IyPjvNcCAAAXr8wgMHnyZOXk5Khjx46yLEsLFy7U\nTz/9pKFDh/qiPgAAYKNzuqDQ4sWL5e/vL0lq1aqVEhMTbS8MAADYr8z9+x6PR8XFxd7bxcXFCgg4\n7w8bAACAy1CZr+jt27dXcnKyEhMTZVmWPvjgA91///2+qA0AANjsrEHg6NGjevTRR1WvXj2tXbtW\na9euVY8ePZSUlOSr+gAAgI1KPTSwdetW3Xfffdq8ebNatmypQYMGqXnz5poyZYq2bdvmyxoBAIBN\nSg0CEydO1Msvv6z4+Hjv2HPPPacJEyZo4sSJPikOAADYq9QgcOzYMTVp0uS08RYtWujw4cO2FgUA\nAHyj1CBQXFwsj8dz2rjH4ynx/QAAAKDiKjUINGrUSOnp6aeNz5w5U/Xr17e1KAAA4Bulfmrgueee\n05NPPqmlS5eqQYMG8ng82rp1q6pXr65XX33VlzUCAACblBoEwsLCNHfuXK1bt05bt26Vv7+/unXr\npkaNGvmyPgAAYKOzXkfAz89PTZs2PaevBgYAABXP+X+FIAAAuGIQBAAAMBhBAAAAgxEEAAAwGEEA\nAACDEQQAADAYQQAAAIMRBAAAMBhBAAAAgxEEAAAwGEEAAACDEQQAADAYQQAAAIMRBAAAMBhBAAAA\ngxEEAAAwGEEAAACDEQQAADBYgK83+Nprr+nzzz+X2+1Wt27dFBMTo9TUVPn5+al27dpKS0uTw+Hw\ndVkAABjJp3sE1q1bp6+//lrz5s1TRkaG9uzZo4kTJyolJUVz586VZVlavny5L0sCAMBoPg0Cq1ev\nVp06ddS3b1/17t1brVu31pYtWxQbGytJio+PV1ZWli9LAgDAaD49NHD48GHt27dPr732mvbs2aPe\nvXvLsizvfEhIiPLy8nxZEgAARvNpEKhWrZqio6MVEBCgm266SUFBQTp48KB33ul0KiIiosx1wiOC\nFBRaudR5v6BgRUaGl0vNJqOH9qPH9qPH9qPHFZtPg8Ddd9+tt99+Wz179tSBAwd04sQJxcXFKTs7\nW40bN9aqVavUtGnTMtfJO1Yol3Wi1HlHYYFyc9mzcDEiI8Ppoc3osf3osf3osW/YGbZ8GgRatWql\n9evX6+GHH5bH41FaWpquu+46DR8+XG63W9HR0UpISPBlSQAAGM3nHx984YUXThvLyMjwdRkAAEBc\nUAgAAKMRBAAAMBhBAAAAgxEEAAAwGEEAAACDEQQAADAYQQAAAIMRBAAAMBhBAAAAgxEEAAAwGEEA\nAACDEQQAADAYQQAAAIMRBAAAMBhBAAAAgxEEAAAwGEEAAACDEQQAADAYQQAAAIMRBAAAMBhBAAAA\ngxEEAAAwGEEAAACDEQQAADAYQQAAAIMRBAAAMBhBAAAAgxEEAAAwGEEAAACDEQQAADDYJQkCv/zy\ni1q2bKkff/xROTk56ty5s7p27aqRI0fKsqxLURIAAEbyeRBwu90aMWKEgoODZVmWJkyYoJSUFM2d\nO1eWZWn58uW+LgkAAGP5PAi89NJL6ty5syIjIyVJW7duVWxsrCQpPj5eWVlZvi4JAABj+TQIZGZm\nqnr16mrevLkkybKsEocCQkJClJeX58uSAAAwWoAvN5aZmSmHw6GsrCxt27ZNqamp+vXXX73zTqdT\nERERZa4THhGkoNDKpc77BQUrMjK8XGo2GT20Hz22Hz22Hz2u2HwaBObMmeP9d3JyskaNGqWXXnpJ\n2dnZaty4sVatWqWmTZuWuU7esUK5rBOlzjsKC5Sby56FixEZGU4PbUaP7UeP7UePfcPOsOXTIHAq\nh8Oh1NRUDR8+XG63W9HR0UpISLiUJQEAYJRLFgQyMjLO+G8AAOA7XFAIAACDEQQAADAYQQAAAIMR\nBAAAMBhBAAAAgxEEAAAwGEEAAACDEQQAADAYQQAAAIMRBAAAMBhBAAAAgxEEAAAwGEEAAACDEQQA\nADAYQQAAAIMRBAAAMBhBAAAAgxEEAAAwGEEAAACDEQQAADAYQQAAAIMRBAAAMBhBAAAAgxEEAAAw\nGEEAAACDEQQAADAYQQAAAIMRBAAAMBhBAAAAgxEEAAAwWIAvN+Z2uzVkyBDt3btXLpdLffr0UXR0\ntFJTU+XmgUBHAAAOTklEQVTn56fatWsrLS1NDofDl2UBAGAsnwaBZcuWqXr16po8ebKOHj2qBx98\nUPXq1VNKSopiY2OVlpam5cuXq02bNr4sCwAAY/n00EBCQoL69+8vSfJ4PAoICNDWrVsVGxsrSYqP\nj1dWVpYvSwIAwGg+DQIhISEKDQ1Vfn6+BgwYoIEDB8rj8ZSYz8vL82VJAAAYzaeHBiRp37596tev\nn7p27arExERNnjzZO+d0OhUREVHmGuERQQoKrVzqvF9QsCIjw8ulXpPRQ/vRY/vRY/vR44rNp0Hg\n0KFDeuKJJ5SWlqa4uDhJUr169ZSdna3GjRtr1apVatq0aZnr5B0rlMs6Ueq8o7BAubnsWbgYkZHh\n9NBm9Nh+9Nh+9Ng37AxbPg0Cs2bNUl5enmbMmKEZM2ZIkoYOHapx48bJ7XYrOjpaCQkJviwJAACj\nOSzLsi51EedrTuaXCgqvUeq8o/CwWja5w4cVXXlI+fajx/ajx/ajx75h5x4BLigEAIDBCAIAABiM\nIAAAgMEIAgAAGIwgAACAwQgCAAAYjCAAAIDBCAIAABiMIAAAgMEIAgAAGIwgAACAwQgCAAAYjCAA\nAIDBCAIAABiMIAAAgMEIAgAAGIwgAACAwQgCAAAYLOBSF2AHy7J07NjRs94nPDxCDofDRxUBAHB5\nuiKDwPHjTn2y7gcFh4Secb7guFP/1eQWRURU8XFlAABcXq7IICBJwSGhCgkNv9RlAABwWeMcAQAA\nDEYQAADAYAQBAAAMdsWeI2A3y7KUl3fsrPfhkwkAgMsdQeAC5eUd45MJAIAKz8ggUF7v5vlkAgCg\nojMyCBQcd2rlhsOqWv2qUud5Nw8AMIGRQUCSKgeHlPpu/lz2GOTlHZMsOyoDAMB3jA0CZ1PWHgNJ\nOnzogEJCIxQSxqEBAEDFRRAoxdn2GEjScWf+WR/vi08VlMc2SlujUiWPjh3LK5c6AQCXr8siCHg8\nHo0cOVI7duxQYGCgxo0bpxtuuOFSl3VRfHEeQnl8cqG0NcJCDyvfWcj5EgBwhbssgsCnn34qt9ut\nefPmadOmTZo4caJmzpx5qcu6aBd7HoJU9rvxs31y4VzPdQgOPn2N0LDK8uhEmfVdSS52D0t5/UyB\nS4Fro/yHab24LILAhg0b1KJFC0nSnXfeqc2bN1/iiux3LuchXOy7cc51OD8Xu4elrMefyxrApcK1\nUf7DtF5cFkEgPz9fYWFh3tv+/v7yeDzy8zvzFZCL3cd1/OjBUtezilw6Uewsdf5EgVN+fgE67sy7\noPnyWOPkfFnOlkrz8o6p4HjZz7MsJwqOn1ann1w6/v+HBs7lXe6V4FyeZ1k/j/PZzu/Pw4A96PG5\nu9Df/yuxx6b8zTvJYVnWJf8Q3MSJE3XnnXeqXbt2kqSWLVtq5cqVl7gqAACufJfFlw7FxMRo1apV\nkqSNGzeqTp06l7giAADMcFnsEbAsSyNHjtT27dslSRMmTNBNN910iasCAODKd1kEAQAAcGlcFocG\nAADApUEQAADAYAQBAAAMdllcR+BcXImXIbbbpk2bNGXKFGVkZCgnJ0epqany8/NT7dq1lZaWJofD\noQULFmj+/PkKCAhQnz591KpVK504cUIvvPCCDh8+rNDQUE2cOFHVq1fXxo0bNX78ePn7+6tZs2bq\n16+fJCk9PV0rV66Uv7+/hgwZogYNGlziZ24/t9utIUOGaO/evXK5XOrTp4+io6PpcTkrLi7WsGHD\ntGvXLjkcDo0aNUqVKlWizzb45Zdf9NBDD+mtt96Sn58fPS5nHTp08F4vp1atWnr66acvnx5bFcTH\nH39spaamWpZlWRs3brT69OlziSu6vL3++utWYmKi1alTJ8uyLOvpp5+2srOzLcuyrBEjRliffPKJ\ndfDgQSsxMdFyuVxWXl6elZiYaBUWFlpvvvmmNX36dMuyLOuDDz6wxo4da1mWZT3wwAPW7t27Lcuy\nrCeffNLaunWrtXnzZqt79+6WZVnW3r17rY4dO/r6qV4SCxcutMaPH29ZlmUdOXLEatmypdW7d296\nXM4++eQTa8iQIZZlWda6deus3r1702cbuFwuq2/fvtaf/vQna+fOnfy9KGcnTpywkpKSSoxdTj2u\nMIcGTLwM8cWIiopSenq6rP//UMjWrVsVGxsrSYqPj1dWVpa+/fZbxcTEKDAwUGFhYYqKitL27du1\nYcMGxcfHS5JatGihNWvWKD8/X263W7Vq1ZIkNW/eXFlZWdqwYYOaNWsmSbr22mtVXFysX3/99RI8\nY99KSEhQ//79Jf22tyogIIAe26BNmzYaPXq0JOnnn39WlSpVtGXLFvpczl566SV17txZkZGRkvh7\nUd62bdumgoIC9erVSz169NDGjRsvqx5XmCBQ2mWIcWZt27aVv7+/97b1u0+JhoaGKi8vT/n5+QoP\nDy8xnp+fr/z8fIWGhpa4r9PpLNH/sta40oWEhHif64ABAzRw4MASv4/0uPz4+/srNTVV48aNU/v2\n7fldLmeZmZmqXr26mjdvLum3vxX0uHwFBwerV69eeuONNzRq1Cg9//zzJeYvdY8rzDkCYWFhcjr/\nc139s30XAU73+17l5+crIiLitJ46nU6Fh4eXGHc6nYqIiFBoaGiJ+55cIzAw8IxrmGDfvn3q16+f\nunbtqsTERE2ePNk7R4/L18SJE3Xo0CE98sgjcrlc3nH6fPEyMzPlcDiUlZWlbdu2KTU1tcQ7SHp8\n8W688UZFRUV5/121alV999133vlL3eMK80rKZYgvTr169ZSdnS1JWrVqlRo1aqQGDRroq6++ksvl\nUl5ennbu3Klbb721RK9P3jcsLEyBgYHas2ePLMvS6tWr1ahRI8XExOjLL7+UZVnau3evPB6Pqlat\neimfqk8cOnRITzzxhF544QU99NBDkuixHRYvXqzXXntNklS5cmX5+fmpfv369LkczZkzRxkZGcrI\nyFDdunU1adIkNW/enB6Xo8zMTE2cOFGSdODAATmdTjVr1uyy6XGFubKgxWWIz9tPP/2k559/XvPm\nzdOuXbs0fPhwud1uRUdHa+zYsXI4HHrvvfc0f/58eTwe9enTR//1X/+lEydOaNCgQcrNzVWlSpU0\ndepUXXXVVdq0aZPGjx+v4uJiNW/eXAMHDpT02xmqq1atksfj0ZAhQxQTE3OJn7n9xo4dq48++qjE\n7+DQoUM1btw4elyOTpw4odTUVB06dEhFRUV66qmndPPNN/O7bJPk5GSNHj1aDoeDHpejoqIiDR48\nWHv37pUkvfDCC6patepl0+MKEwQAAED5qzCHBgAAQPkjCAAAYDCCAAAABiMIAABgMIIAAAAGIwgA\nAGAwggBQAfz000+qW7eusrKySoy3bt3a+9nki9G6dWsdOXLkoteRpNTUVC1atKjE2PTp05Wenn7R\naz/99NPei7AAKB8EAaCCCAgI0LBhw0pcPrQ8ldclRRwOhxwOx2ljdq0N4OJUmO8aAEx39dVXq3nz\n5po0aZL3G/lOWrdundLT05WRkSHpt3flTZo0UePGjdW3b1/dcMMN2rFjh+rXr6/GjRtr0aJFOnr0\nqNLT0xUdHS1JmjJlirZu3aqgoCCNHTtWt9xyiw4dOqS0tDTt27dPfn5+eu6559S0aVNNnz5dGzdu\n1P79+9WtWzd17ty5RD1nCxWTJk1SVlaW/P391bp1a/Xr109Op1OjR4/W999/L4/HoyeffFL333+/\nXC6Xhg8frm+++UY1a9Y04pvqAF9jjwBQgbz44ov68ssvTztEcKqT75wty9KOHTv0zDPP6KOPPtK3\n336rvXv3at68ebr//vu1YMEC72Nq166tRYsWqU+fPkpNTZUkjRs3Th07dlRmZqZmzpypESNGePdI\nuN1uffDBB6eFgLPZu3evvvjiCy1ZskTz5s3T7t275XK59Oqrr6p+/frKzMzUnDlzNGvWLO3Zs0dz\n5sxRcXGx/vGPf2jUqFHatWvX+TcNwFmxRwCoQMLCwjRmzBgNGzZMy5YtO6fH1KhRQ3Xr1pUkXXPN\nNYqLi5Mk1axZU+vXr/fe7+GHH5YktWzZUi+++KLy8/OVlZWlH3/8Ua+88ookqbi4WHv27JHD4dCd\nd955xu2dade9ZVny9/fXNddco6CgIHXu3Fn33nuvBgwYoEqVKikrK0uFhYVauHChJKmgoEA//PCD\nsrOz1alTJ0nS9ddf760dQPkhCAAVTLNmzdSsWTPvt5lJp7/4ut1u778DAwNLzAUEnPm/vb+//2n3\nsyxLb7/9tiIiIiT99s1pkZGR+vTTTxUUFHTGdapUqaJjx46VGDt06JBuvfVW+fv767333lN2drZW\nrlypTp06ac6cObIsS1OmTFG9evUkSbm5uapatar3y1fKqh3AhePQAFABDRo0SKtXr9bBgwclSdWq\nVdOePXvkcrl05MgR/etf/zrvNU/uYfjkk0908803q3LlyoqLi9PcuXMlSd9//70eeOABFRQUnPUc\ngLi4OH344YcqKCiQ9NuL+sqVKxUXF6dt27apW7duio2N1aBBg3TLLbfoxx9/VFxcnN555x1J0sGD\nB9WhQwft379fzZo105IlS2RZlg4ePKh169ad9/MCcHbEa6CC+P27/pOHCP785z9L+u34fsuWLXX/\n/ffruuuuU6NGjbyPKe0s+1PHd+zYoaSkJIWHh2vSpEmSpGHDhmnEiBF64IEHvO/aQ0NDz3rmfsuW\nLbV9+3Y9+uijcjgc8vPz04svvug9KfGuu+5SYmKigoODddttt6lly5aKjY3VqFGj1L59exUXF+v5\n559XrVq11LlzZ/3www9q166drrnmGtWpU+fCGwjgjPgaYgAADMahAQAADEYQAADAYAQBAAAMRhAA\nAMBgBAEAAAxGEAAAwGAEAQAADEYQAADAYP8HxSx2IuHNIZUAAAAASUVORK5CYII=\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd69d321450>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(number_times_label_used[number_times_label_used[\"number_time_used\"] > 1000][\"number_time_used\"], \"Number of Times Label Used(Less Than 100)\", \"Number Used\", \"Count\")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Statistics on how often labels have been used"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 42,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "count     20493.000000\n",
+       "mean        156.555653\n",
+       "std        4947.912097\n",
+       "min           1.000000\n",
+       "25%           1.000000\n",
+       "50%           1.000000\n",
+       "75%           5.000000\n",
+       "max      469002.000000\n",
+       "Name: number_time_used, dtype: float64"
+      ]
+     },
+     "execution_count": 42,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "number_times_label_used[\"number_time_used\"].describe()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 43,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/html": [
+       "<div>\n",
+       "<table border=\"1\" class=\"dataframe\">\n",
+       "  <thead>\n",
+       "    <tr style=\"text-align: right;\">\n",
+       "      <th></th>\n",
+       "      <th>label_id</th>\n",
+       "      <th>number_time_used</th>\n",
+       "    </tr>\n",
+       "  </thead>\n",
+       "  <tbody>\n",
+       "    <tr>\n",
+       "      <th>17030</th>\n",
+       "      <td>18246154</td>\n",
+       "      <td>469002</td>\n",
+       "    </tr>\n",
+       "  </tbody>\n",
+       "</table>\n",
+       "</div>"
+      ],
+      "text/plain": [
+       "       label_id  number_time_used\n",
+       "17030  18246154            469002"
+      ]
+     },
+     "execution_count": 43,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "number_times_label_used[number_times_label_used[\"number_time_used\"] > 450000]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 44,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "label_def = table_to_dataframe(\"LabelDef\", connection)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 45,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/html": [
+       "<div>\n",
+       "<table border=\"1\" class=\"dataframe\">\n",
+       "  <thead>\n",
+       "    <tr style=\"text-align: right;\">\n",
+       "      <th></th>\n",
+       "      <th>id</th>\n",
+       "      <th>project_id</th>\n",
+       "      <th>label</th>\n",
+       "      <th>rank</th>\n",
+       "      <th>docstring</th>\n",
+       "      <th>deprecated</th>\n",
+       "    </tr>\n",
+       "  </thead>\n",
+       "  <tbody>\n",
+       "    <tr>\n",
+       "      <th>5566</th>\n",
+       "      <td>18246154</td>\n",
+       "      <td>16</td>\n",
+       "      <td>Type-Bug</td>\n",
+       "      <td>215.0</td>\n",
+       "      <td>Software not working correctly</td>\n",
+       "      <td>0.0</td>\n",
+       "    </tr>\n",
+       "  </tbody>\n",
+       "</table>\n",
+       "</div>"
+      ],
+      "text/plain": [
+       "            id  project_id     label   rank                       docstring  \\\n",
+       "5566  18246154          16  Type-Bug  215.0  Software not working correctly   \n",
+       "\n",
+       "      deprecated  \n",
+       "5566         0.0  "
+      ]
+     },
+     "execution_count": 45,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "label_def[label_def[\"id\"] == 18246154]"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Explore Components"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 46,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "0\n",
+      "100000\n",
+      "200000\n",
+      "300000\n",
+      "400000\n",
+      "500000\n"
+     ]
+    }
+   ],
+   "source": [
+    "components_by_issue = defaultdict(list)\n",
+    "num_times_comp_used = defaultdict(int)\n",
+    "i = 0\n",
+    "for index, row in issue_component.iterrows():\n",
+    "    if row[\"issue_id\"] in chrome_issue_id_set:\n",
+    "        components_by_issue[row[\"issue_id\"]].append(row[\"component_id\"])\n",
+    "        num_times_comp_used[row[\"component_id\"]] += 1\n",
+    "    if i % 100000 == 0:\n",
+    "        print(i)\n",
+    "    i += 1"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 47,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "chrome_issue[\"components\"] = chrome_issue[\"issue_id\"].apply(lambda i_id: components_by_issue[i_id])\n",
+    "chrome_issue[\"num_components\"] = chrome_issue[\"components\"].apply(lambda comp_list: len(comp_list))"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 48,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgYAAAFtCAYAAAB85KKkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Wt8lNW5/vFrMkkIzExABFuUGCvKwdpg0wBiAgIKxgqK\nRYoEkCqioEFbhH8iAWNAMDQgCuG0te626EZQKVs/tbWohdSEU4soZ5CqDRKRNJDMDOT4rP8Lyiop\nhMM2BxJ/3zcy63lmzX1PYuaa5+gyxhgBAABICmnoAgAAwMWDYAAAACyCAQAAsAgGAADAIhgAAACL\nYAAAACyCAfAvBw4cUOfOnfX6669XG//Vr36lJ598stZep1+/fvrkk09qbb6zCQQCuvfeezVo0CCt\nWbPmtOX79+/XhAkTdOedd+quu+7SqFGj9Le//a1eaqtPDzzwgI4ePdqgNaxatUrjxo1r0BqA8xHa\n0AUAF5OQkBBlZWWpW7duuuqqqyRJLper1l+nvi4fsmvXLhUVFelPf/rTacv+/ve/62c/+5kyMzMV\nHx8vSVq/fr3GjRun1157TR06dKiXGutDXl5evb3nQGNHMABO0axZM91///2aOHGiVqxYobCwsGof\nKKmpqerYsaMeeOCB0x7369dPgwYN0tq1a3X06FFNmDBBW7Zs0Y4dOxQaGqrFixfrsssukyS99tpr\nysjIUHl5ue6//34NGTJEkvTBBx9oyZIlqqioUEREhFJSUnTDDTdowYIF2rp1qw4fPqzOnTvrl7/8\nZbW633vvPS1cuFBVVVXyer1KTU2Vz+dTWlqaDh06pLvvvluvvfaamjVrZp/z4osvasiQITYUSFLP\nnj313HPPKTw8vMZ5Y2JitGDBAv3jH/9Qfn6+vv76a3Xt2lXx8fFavXq1Dhw4oMmTJ+uOO+7QggUL\ntG/fPhUVFdnaZ86cKa/Xq3379mn69OkqLi6Wy+XS/fffr8GDB2vjxo2aN2+errzySu3bt0/l5eV6\n6qmn1KNHD5WXl2vOnDn661//qqqqKl133XVKS0uT1+tVv3799JOf/ETr169XQUGBbr/9dk2ePNlu\n7Rk9erT+67/+Sx988IH92TZr1kzTp08/LQSdre5Dhw5pxowZOnjwoCorK3XHHXfo4Ycf1oEDBzRi\nxAhdc801OnDggF599VW1adPmjL9n+/fvV1pamsrLyyVJ99xzj5KSkmocX7BggY4ePapp06bZ+k4+\n9vv9mjlzpvbu3avKykr17NlT/+///T+53e4L+dUH/s0AMMYYk5+fb2644QbjOI4ZMWKEyczMNMYY\n89JLL5nU1FRjjDGpqanm5Zdfts859XHfvn3tc37/+9+bLl26mN27dxtjjHn00UfNkiVL7HoZGRnG\nGGMOHTpkevbsafbt22c+++wzM3DgQHP06FFjjDF79+418fHx5tixY2b+/Pnm9ttvN1VVVafV/emn\nn5r4+HiTn59vjDFm/fr1Jj4+3gQCAbNx40YzcODAM/Y7cOBAs27duhrfj5rm9fv9Zv78+aZfv37G\n7/eb0tJS0717d9v7e++9ZwYMGGCMMWb+/PkmISHBFBYWGsdxzMSJE01mZqaprKw0t9xyi1mzZo19\nH3r37m0++ugjs2HDBnPdddeZXbt2GWOMefnll83IkSONMcYsWLDAzJ4929Y4d+5c8/TTT9v39eSy\nr776ysTExJgDBw4YY4zp1KmTOXLkiKmsrDTXX3+9OXz4sDHGmNWrV5uVK1ee1ntNdRtjzKhRo8wH\nH3xgjDGmtLTUjBo1yrzzzjsmPz/fdOrUyfz1r3894/v55ptvmocfftgYY8yTTz5pli5daowx5vDh\nw2bixInGcZwaxxcsWGCmT59u51qwYIGZMWOGMebE7+CyZcuMMcZUVlaaSZMmmRdffLHGnytwLmwx\nAP6Dy+VSVlaWBg8erF69ep22K8GcZZP0gAEDJElRUVFq06aNOnXqZB8XFxfb9YYNGyZJuuyyy5SQ\nkKD169crJCREhw8f1ujRo+16brdbX3zxhVwul7p27aqQkNMPC9qwYYN69uyp9u3bS5JuvPFGXXrp\npdq+fftZ+wwJCTlrLzXNu2PHDrlcLsXHx8vr9do+evfufcZeExMTdemll0o68Q141qxZuueee1Re\nXq5bb73VPn/AgAH6y1/+oh49eujyyy9X586dJUldunTRqlWrJElr166V3+9XXl6eJKmiosLOLUm3\n3HKLJOk73/mOLr30UhUXF+uKK66o9n4mJiZq2LBh6tOnj+Lj49WnT5/Tene5XGes+7HHHtPmzZtV\nUlKiF154QZJ0/Phx7d69Wz/4wQ8UGhqqH/7wh2d936UTvycpKSnatm2bevbsqbS0NLlcrhrHz2bt\n2rXavn273njjDUlSWVnZGX9PgPNFMADOoF27dsrIyFBKSooGDx5cbdmpH6YnN/medHITvCSFhtb8\nv9epf7gdx1FoaKiqqqrUs2dPzZs3zy47ePCgvvvd7+q9995TixYtapzvPz/gHcdRVVXVWTcnd+3a\nVR999JFuvvnmauPZ2dmKjo6ucd7KykpJUlhYWLVlNfV7ag2O48jtdstxnNPWO3XuiIgIO37qB6Pj\nOJo6dap69eolSQoGgyorK7PLT33emeqXpKysLH366afKzc3Viy++qDfeeEOLFi06Z90nf0aStGLF\nCrtbpqioSBERESoqKlJYWNh5fSj36dNH7777rvLy8rR+/XotXLhQr732Wo3j/9nLqb93juPohRde\n0NVXXy1JKikpqZPjYvDtQawEapCYmKjevXvrN7/5jR1r3bq1/SZeVFR0QUfwn/qH/eQ34IMHD2r9\n+vW66aabdOONNyo3N1d///vfJUk5OTkaPHiwysrKzvrN/uTz8vPzJZ04gPDQoUOKiYk5az0PPvig\nXn/9deXm5tqxnJwcLVu2TF26dKlx3q5du17QgXwffPCB/H6/HMfRypUr1a9fP33ve99TWFiYPVPi\n0KFD+tOf/qT4+Pizzt2rVy+98sorKi8vl+M4Sk9P1/PPP3/OGtxutyoqKlRUVKQ+ffqoZcuWGj16\ntB5//HHt2bPntPWNMafV3bdvX3m9XnXt2lUvv/yyJMnv92vEiBH64IMPzvv9kKQnnnhC77zzjn78\n4x/rqaeektfrVUFBwRnHv/rqK7Vu3Vo7duyQJB07dkwffvihnSshIUG//vWvZYxReXm5Hn30Uf3P\n//zPBdUDnIotBsAp/vOb1tSpU6t9+I8aNUqTJk1SYmKirrjiCvXo0eO85zr1cUVFhe6++25VVlZq\n2rRp9hv69OnTNXHiRBlj7AGLzZs3l8vlqvFbYIcOHZSenq4JEyaoqqpKzZs31+LFi+1m/ppceeWV\nWrJkiZ5//nnNnj1bjuPo0ksv1dKlS3XNNddIUo3znq2e/+y1TZs2euihh1RUVKRu3bpp3LhxCg0N\n1cKFCzVz5kwtWLBAVVVVSk5OVvfu3bVx48Ya533kkUc0e/Zs3X333XIcR9ddd51SUlLO2qck9e/f\nXyNGjNDChQs1fvx4/exnP1OzZs0UGhqqZ5555oz1n6luSZo7d65mzJihQYMGqaKiQgMHDtTAgQN1\n4MCB835PHnnkEU2dOlUrVqyQ2+1W//791b17d1166aWnjXfr1k1dunRRTk6OBgwYoO985zuKjY21\nc02dOlUzZ87UnXfeqYqKCsXHx+vBBx8853sC1MRlLiT6A8AFWLBggQoLC5WRkdHQpVyQxlo3UBvq\nbItBVVWVpk6dqs8//1wul0sZGRkKDw9XamqqQkJCdO211yo9PV0ul0srV67UihUrFBoaqvHjx6tP\nnz4qLS3V5MmTVVRUJI/Ho8zMTLVu3Vpbt27VrFmz5Ha7FR8fr+TkZEkn9ouuW7dObrdbU6ZMOedm\nVAB171xbFi5WjbVuoFbU1ekOa9asMVOmTDHGGLNx40Yzbtw4M27cOLNp0yZjjDFPPfWUWbNmjfn6\n66/NwIEDTXl5ufH7/WbgwIGmrKzMvPzyy2bBggXGmBOnfj3zzDPGGGPuvPNO849//MMYY8zYsWPN\nzp07zfbt2819991njDHm4MGDZsiQIXXVFgAATVqdbTG49dZb1bdvX0nSl19+qZYtWyovL0/dunWT\nJPXu3Vu5ubkKCQlRbGyswsLCFBYWpujoaO3Zs0dbtmzR2LFjJZ044GjRokUKBAKqqKhQVFSUpBMH\n3eTl5Sk8PNxepKVdu3aqqqrSkSNHdMkll9RVewAANEl1elaC2+1WamqqZs6cqUGDBlU72tjj8cjv\n9ysQCMjn81UbDwQCCgQC8ng81dYNBoPVDqg61xwAAODC1PlZCZmZmSosLNTQoUOrnXsbCAQUGRkp\nr9erYDBox4PBoHw+X7XxYDCoyMhIeTyeauuenCMsLOyMc5yNMYZ9iAAA/Ic6CwarV6/WoUOH9PDD\nDysiIkIhISG6/vrrtWnTJnXv3l05OTnq2bOnYmJiNG/ePJWXl6usrEz79+9Xx44dFRsbq5ycHMXE\nxCgnJ0dxcXHyer0KCwtTfn6+2rdvr9zcXCUnJ8vtdisrK0tjxoxRQUGBHMdRq1atzlqfy+XS4cP+\numq/wbVt66O/Rqop9ybRX2NHf41X27Zn/8J8Up0Fg8TERKWmpmrkyJGqrKxUWlqarr76ak2bNk0V\nFRXq0KGDEhMT5XK5dN999ykpKUmO42jixIkKDw/X8OHDlZKSoqSkJIWHh2vu3LmSpIyMDE2aNElV\nVVVKSEiwZx/ExcVp2LBh9qInAADgwn2rr2PQVFOh1LRTr9S0+2vKvUn019jRX+N1vlsMuCQyAACw\nCAYAAMAiGAAAAItgAAAALIIBAACwCAYAAMAiGAAAAItgAAAALIIBAACwCAYAAMAiGAAAAItgAAAA\nLIIBAACwCAYAAMAiGAAAAItgAAAALIIBAACwCAYAAMAiGAAAAItgAAAALIIBAACwCAYAAMAiGAAA\nAItgAAAALIIBAACwCAYAAMAiGAAAAItgAAAALIIBAACwCAYAAMAiGAAAAItgAAAALIIBAACwCAYA\nAMAiGAAAACu0oQtA7THGyO8vkSSFhzsqKfGfcT2fL1Iul6s+SwMANBIEgybE7y/Rmo2fqnkLj7ye\nIgWCZaetc/xYUP17XKPIyJYNUCEA4GJHMGhimrfwqIXHJ483Qo5KG7ocAEAjwzEGAADAIhgAAACL\nYAAAACyCAQAAsAgGAADAqrOzEioqKjRlyhQdPHhQ5eXlGj9+vL773e/q4Ycf1lVXXSVJSkpK0u23\n366VK1dqxYoVCg0N1fjx49WnTx+VlpZq8uTJKioqksfjUWZmplq3bq2tW7dq1qxZcrvdio+PV3Jy\nsiQpOztb69atk9vt1pQpUxQTE1NXrQEA0GTVWTB4++231bp1a2VlZam4uFh33XWXHn30UT3wwAO6\n//777XqHDx/WsmXLtGrVKpWVlWn48OG66aabtHz5cnXq1EnJycl65513tHjxYqWlpSk9PV3Z2dmK\niorSQw89pF27dslxHG3evFmvv/66CgoKNGHCBL3xxht11RoAAE1WnQWDxMRE3XbbbZIkx3EUGhqq\nHTt26LPPPtP777+v6OhoTZkyRZ988oliY2MVFhamsLAwRUdHa8+ePdqyZYvGjh0rSerVq5cWLVqk\nQCCgiooKRUVFSZISEhKUl5en8PBwxcfHS5LatWunqqoqHTlyRJdcckldtQcAQJNUZ8cYtGjRQh6P\nR4FAQI8//rh+8YtfKCYmRikpKXrllVcUFRWl7OxsBYNB+Xw++7yTzwkEAvJ4PHbM7/crGAzK6/VW\nW9fv9ysQCJxxDgAAcGHq9MqHBQUFSk5O1ogRI3THHXfI7/fbD/D+/ftrxowZ6tatm4LBoH3OyaDg\n9XrteDAYVGRkpDweT7V1A4GAIiMjFRYWdsY5zqVt23Ov05iEhzvyeork8UZIknz/+u+pQlSuNm18\natmy8ffe1H5+p2rKvUn019jRX9NWZ8GgsLBQDzzwgNLT03XjjTdKkh588EGlpaUpJiZGeXl5uv76\n6xUTE6N58+apvLxcZWVl2r9/vzp27KjY2Fjl5OQoJiZGOTk5iouLk9frVVhYmPLz89W+fXvl5uYq\nOTlZbrdbWVlZGjNmjAoKCuQ4jlq1anXOGg8fPvNNhhqrkhK/AsEyOSqVzxshf+D0SyIfC5apsNCv\n8vLGfUJK27a+JvfzO6kp9ybRX2NHf43X+QaeOgsGS5Yskd/v18KFC7Vw4UJJ0pQpU/Tss88qNDRU\nl112maZPny6Px6P77rtPSUlJchxHEydOVHh4uIYPH66UlBQlJSUpPDxcc+fOlSRlZGRo0qRJqqqq\nUkJCgj37IC4uTsOGDZPjOEpPT6+rtgAAaNJcxhjT0EU0lKaWCktKivXhtgK18PjOssXAr4QftGv0\nd1ds6qm+qfYm0V9jR3+N1/luMWjc25MBAECtIhgAAACLYAAAACyCAQAAsAgGAADAIhgAAACLYAAA\nACyCAQAAsAgGAADAIhgAAACLYAAAACyCAQAAsAgGAADAIhgAAACLYAAAACyCAQAAsAgGAADACm3o\nAhrKHz7YqOPHTY3LKyrL1fOHndW8efN6rAoAgIb1rQ0GwYpwmfCaP/SPlxWrsrJCEsEAAPDtwa4E\nAABgEQwAAIBFMAAAABbBAAAAWAQDAABgEQwAAIBFMAAAABbBAAAAWAQDAABgEQwAAIBFMAAAABbB\nAAAAWAQDAABgEQwAAIBFMAAAABbBAAAAWAQDAABgEQwAAIBFMAAAABbBAAAAWAQDAABgEQwAAIBF\nMAAAABbBAAAAWKF1NXFFRYWmTJmigwcPqry8XOPHj1eHDh2UmpqqkJAQXXvttUpPT5fL5dLKlSu1\nYsUKhYaGavz48erTp49KS0s1efJkFRUVyePxKDMzU61bt9bWrVs1a9Ysud1uxcfHKzk5WZKUnZ2t\ndevWye12a8qUKYqJiamr1gAAaLLqLBi8/fbbat26tbKyslRcXKy77rpLXbp00cSJE9WtWzelp6fr\n/fffV9euXbVs2TKtWrVKZWVlGj58uG666SYtX75cnTp1UnJyst555x0tXrxYaWlpSk9PV3Z2tqKi\novTQQw9p165dchxHmzdv1uuvv66CggJNmDBBb7zxRl21BgBAk1VnwSAxMVG33XabJMlxHIWGhmrn\nzp3q1q2bJKl3797Kzc1VSEiIYmNjFRYWprCwMEVHR2vPnj3asmWLxo4dK0nq1auXFi1apEAgoIqK\nCkVFRUmSEhISlJeXp/DwcMXHx0uS2rVrp6qqKh05ckSXXHJJXbUHAECTVGfHGLRo0UIej0eBQECP\n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\nAABYBAMAAGARDAAAgEUwAAAAFsEAAABYBAMAAGARDAAAgEUwAAAAFsEAAABYBAMAAGCFNsSL3n33\n3fJ6vZKkqKgoPfzww0pNTVVISIiuvfZapaeny+VyaeXKlVqxYoVCQ0M1fvx49enTR6WlpZo8ebKK\niork8XiUmZmp1q1ba+vWrZo1a5bcbrfi4+OVnJzcEK0BANCo1XswKCsrkyQtW7bMjo0bN04TJ05U\nt27dlJ6ervfff19du3bVsmXLtGrVKpWVlWn48OG66aabtHz5cnXq1EnJycl65513tHjxYqWlpSk9\nPV3Z2dmKiorSQw89pF27dqlLly713R4AAI1ave9K2L17t44fP64xY8Zo9OjR2rp1q3bu3Klu3bpJ\nknr37q28vDxt27ZNsbGxCgsLk9frVXR0tPbs2aMtW7aod+/ekqRevXpp/fr1CgQCqqioUFRUlCQp\nISFBeXl59d0aAACNXr1vMWjevLnGjBmjoUOH6vPPP9eDDz5YbbnH45Hf71cgEJDP56s2HggEFAgE\n5PF4qq0bDAbtromT4/n5+fXTEAAATUi9B4OrrrpK0dHR9t+tWrXSrl277PJAIKDIyEh5vV4Fg0E7\nHgwG5fP5qo0Hg0FFRkbK4/FUW/fkHAAA4MLUezBYtWqV9uzZo/T0dB06dEjBYFDx8fHatGmTunfv\nrpycHPXs2VMxMTGaN2+eysvLVVZWpv3796tjx46KjY1VTk6OYmJilJOTo7i4OHm9XoWFhSk/P1/t\n27dXbm7ueR186PNG1LjMZcrUpo1PkZG+Gte52ISHO/J6iuT5V19n6i9E5WrTxqeWLRtHX//Z06lO\n9tfYejofbds2nV7OhP4aN/pr2uo9GNxzzz168sknNWLECEnSs88+q1atWmnatGmqqKhQhw4dlJiY\nKJfLpfvuu09JSUlyHEcTJ05UeHi4hg8frpSUFCUlJSk8PFxz586VJGVkZGjSpEmqqqpSQkKCYmJi\nzlmLP1Ba47JgoFSFhX6Vlblqp/F6UFLiVyBYJkel8nkjztjfsWCZCgv9Ki9vHGeqntrTqU7tr7H1\ndC5t2/p0+LC/ocuoM/TXuNFf43W+gafeg0FoaKiysrJOGz/1LIWThg4dqqFDh1Ybi4iI0AsvvHDa\nul27dtWKFStqr1AAAL6FmsZXLAAAUCsIBgAAwCIYAAAAi2AAAAAsggEAALAIBgAAwCIYAAAAi2AA\n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\nAAAASUVORK5CYII=\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd63079db90>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(chrome_issue[\"num_components\"], \"Number of Components per Issue\", \"Number of Components\", \"Count\")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "Statistics on Components per issue"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 49,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "count    611859.000000\n",
+       "mean          0.870696\n",
+       "std           0.843908\n",
+       "min           0.000000\n",
+       "25%           0.000000\n",
+       "50%           1.000000\n",
+       "75%           1.000000\n",
+       "max           8.000000\n",
+       "Name: num_components, dtype: float64"
+      ]
+     },
+     "execution_count": 49,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "chrome_issue[\"num_components\"].describe()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 50,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "number_comp_used = pd.DataFrame(num_times_comp_used.items(), columns=[\"component_id\", \"number_time_used\"])"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 51,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Number of Unique Components 657\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(\"Number of Unique Components\", number_comp_used.shape[0])"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 52,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "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\nYWGhDhw4oNtvv10+ny84Tp++V1xcLMuyVFpaqq1btyo/P1+HDh0KLqdP/3bxxRcrISEh+O82bdpo\ny5YtweX06ntt27ZVYmKinE6nOnbsqOjoaO3fvz+4vKn6dFa9e3K74Lo6d+6s8vJySdLatWvVtWtX\ndenSRZ988ol8Pp+qqqq0Y8cOXXbZZXV6d3xdl8ulyMhI7d69W7Ztq6SkRF27dm3OXWoUBw4c0IgR\nI/TQQw/plltukUSvTmXFihV6/vnnJUktWrSQw+HQlVdeSZ9+YOHChSoqKlJRUZE6deqk2bNnq2fP\nnvTpFIqLi1VYWChJ2rdvn7xer3r06EGvfuCaa67Rhx9+KOn7PlVXVystLa3J+3RW3QnQ5nbB+uqr\nr/Tggw9q8eLF2rlzpyZPniy/36/ExETNmDFDlmXp1Vdf1ZIlSxQIBJSbm6sbbrhB1dXVGj9+vCor\nKxUVFaUnnnhC7dq102effaZHH31UtbW16tmzpx544IHm3sWfbcaMGVq1alWd58bEiRM1c+ZMenWC\n6upq5efn68CBAzp27Jh+//vf65JLLuE5VY8hQ4Zo+vTpsiyLPp3CsWPHNGHCBO3Zs0eS9NBDD6lN\nmzb06hTmzJmjsrIyBQIBjRs3Th06dGjyPp1VAQAAADSOs+oUAAAAaBwEAAAADEQAAADAQAQAAAAM\nRAAAAMBABAAAAAxEAADOEl999ZU6dep00v29+/TpE/ze9c/Rp08fHT58+GfPI0n5+flavnx5nbF5\n8+Zp/vz5P3vuUaNGBW+YAuCnIwAAZxGn06lJkybVueVnY2qs24JYliXLsk4aC9fcAH68s+q3AADT\ntW/fXj179tTs2bODv+R3XFlZmebPn6+ioiJJ338K7969u7p166YxY8booosu0rZt23TllVeqW7du\nWr58uY4cOaL58+crMTFRkvT4449r8+bNio6O1owZM3TppZfqwIEDKigo0N69e+VwODRu3Dilp6dr\n3rx52rBhg77++msNHjxYOTk5deqpL0zMnj1bpaWlioiIUJ8+fTR27Fh5vV5Nnz5d27dvVyAQ0N13\n362bbrpJPp9PkydP1j/+8Q+df/75de7DD+Cn4wgAcJZ5+OGH9fe//73Bn/o8/knZtm1t27ZN99xz\nj1atWqWNGzdqz549Wrx4sW666SYtXbo0+DdJSUlavny5cnNzlZ+fL0maOXOmbr31VhUXF+uZZ57R\nlClTgkcg/H6/3nzzzZPe/OuzZ88effjhh1q5cqUWL16sL7/8Uj6fT88++6yuvPJKFRcXa+HChXru\nuee0e/duLVy4ULW1tXr77bc1bdo07dy588c3DcBJOAIAnGVcLpf++7//W5MmTdIbb7wR0t+cc845\n6tSpkyTp3HPPVVpamiTp/PPP18cffxxc77bbbpMk9e7dWw8//LA8Ho9KS0v1xRdf6KmnnpIk1dbW\navfu3bIsS8nJyafc3qkO0du2rYiICJ177rmKjo5WTk6OrrvuOt1///2KiopSaWmpampqtGzZMknS\n0aNH9fnnn6u8vFwDBw6UJF1wwQXB2gH8PAQA4CzUo0cP9ejRI/jLa9LJb7p+vz/478jIyDrLnM5T\nv/QjIiJOWs+2bb388svBnxbdt2+f4uPj9d577yk6OvqU87Ru3VrffvttnbEDBw7osssuU0REhF59\n9VWVl5drzZo1GjhwoBYuXCjbtvX444+rc+fOkqTKykq1adMm+EMoDdUO4MfhFABwlho/frxKSkqC\nvyPetm1b7d69Wz6fT4cPH9ann376o+c8fkTh3Xff1SWXXKIWLVooLS1NixYtkiRt375dN998s44e\nPVrvOf60tDS99dZbOnr0qKTv38zXrFmjtLQ0bd26VYMHD1ZqaqrGjx+vSy+9VF988YXS0tL0l7/8\nRZK0f/9+DRgwQF9//bV69OihlStXyrZt7d+/X2VlZT96vwCcjCgNnEVO/JR//FTA7373O0nfn7/v\n3bu3brrpJnXo0CH4W+D1XTX/w/Ft27YpOztbbrdbs2fPliRNmjRJU6ZM0c033xz8lB4TE1Pvlfi9\ne/dWRUWF7rjjDlmWJYfDoYcffjh4seHVV1+tfv36qWXLlrriiivUu3dvpaamatq0aerfv79qa2v1\n4IMP6sILL1ROTo4+//xz3XjjjTr33HN1+eWX//QGAgji54ABADAQpwAAADAQAQAAAAMRAAAAMBAB\nAAAAAxEAAAAwEAEAAAADEQAAADAQAQAAAAP9PzPPt1vMZ1s2AAAAAElFTkSuQmCC\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd64be42710>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(number_comp_used[\"number_time_used\"], \"Number of Times Comp Used\", \"Number Used\", \"Count\")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Statistics on Component Frequency"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 53,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "count      657.000000\n",
+       "mean       810.872146\n",
+       "std       3318.952857\n",
+       "min          1.000000\n",
+       "25%         15.000000\n",
+       "50%        121.000000\n",
+       "75%        557.000000\n",
+       "max      59116.000000\n",
+       "Name: number_time_used, dtype: float64"
+      ]
+     },
+     "execution_count": 53,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "number_comp_used[\"number_time_used\"].describe()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Use Issue Updates to determine time to correct component assignment"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 54,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "component_def = table_to_dataframe(\"ComponentDef\", connection)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 55,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "chrome_components = component_def[component_def[\"project_id\"] == 16]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 56,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "issue_update = table_to_dataframe(\"IssueUpdate\", connection)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 57,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "chrome_issue_update = issue_update[issue_update[\"issue_id\"].isin(unique_chrome_issues)]\n",
+    "chrome_comp_updates = chrome_issue_update[chrome_issue_update[\"field\"] == \"components\"]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 58,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "0\n",
+      "100000\n",
+      "200000\n",
+      "300000\n",
+      "400000\n",
+      "500000\n",
+      "600000\n"
+     ]
+    }
+   ],
+   "source": [
+    "updates_by_issue_id = dict()\n",
+    "i = 0\n",
+    "for index, row in chrome_issue.iterrows():\n",
+    "    issue_id = row[\"issue_id\"]\n",
+    "    updates_by_issue_id[issue_id] = []\n",
+    "    for comp_index, comp_row in chrome_comp_updates[chrome_comp_updates[\"issue_id\"] == issue_id].iterrows():\n",
+    "        updates_by_issue_id[issue_id].append(comp_index)\n",
+    "    \n",
+    "    if i % 100000 == 0:\n",
+    "        print(i)\n",
+    "    i += 1"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 59,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "chrome_issue[\"comp_updates\"] = chrome_issue[\"issue_id\"].apply(lambda i_id: updates_by_issue_id[i_id])\n",
+    "chrome_issue[\"num_comp_updates\"] = chrome_issue[\"issue_id\"].apply(lambda i_id: len(updates_by_issue_id[i_id]))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Work only with Closed Issues to determine time to correct component assignment"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 60,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "closed_chrome_issue = chrome_issue[chrome_issue[\"closed\"] != 0]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 61,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "The Number of closed chrome issues 538161\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(\"The Number of closed chrome issues\", closed_chrome_issue.shape[0])"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 62,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "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\nWwUCAbve6XTK4/HI6/XK7XaXW+71euX1euV0OsuN9fl8crlclzwHAAD4Yar1Xgn5+flKTk7W8OHD\nNWDAAGVmZtp1Xq9XkZGRcrlc8vl8drnP55Pb7S633OfzKTIyUk6ns9zYs3OEh4efd46LcbvqV7rO\nYUrUtKlbkZEXn+dyERERkMtZKOf/9nW+/kJUqqZN3WrUqPb0VZlmzWp/D5Wpy71J9Ffb0V/dVm3B\noKCgQKNHj1Z6erq6dOkiSWrbtq0++OADderUSdnZ2eratauio6M1f/58lZaWqqSkRAcPHlSrVq0U\nExOj7OxsRUdHKzs7Wx06dJDL5VJ4eLjy8vLUvHlz5eTkKDk5WaGhocrMzNSYMWOUn5+vQCCgxo0b\nX7RGj/dUpet83lMqKPCopMRRZe9JdSsu9sjrK1FAp+R21T9vfyd8JSoo8Ki0tHafkNKsmVtHj3qC\nXUa1qMu9SfRX29Ff7XWpgafagsHSpUvl8Xi0ePFiLV68WJKUlpammTNnqqysTC1btlT//v3lcDg0\ncuRIDRs2TIFAQJMmTVJERIQSExOVkpKiYcOGKSIiQvPmzZMkZWRkaPLkyfL7/YqLi7NnH3To0EEJ\nCQkKBAJKT0+vrrYAAKjTHMYYE+wiguHVtz+56G2Xe9zWvFbddrm4uEjvf5avhk73BbYYeBT3H9cq\nMrJRECqsOnU91dfV3iT6q+3or/a61C0GtXt7MgAAqFIEAwAAYBEMAACARTAAAAAWwQAAAFgEAwAA\nYBEMAACARTAAAAAWwQAAAFgEAwAAYBEMAACARTAAAAAWwQAAAFgEAwAAYBEMAACARTAAAAAWwQAA\nAFgEAwAAYBEMAACARTAAAAAWwQAAAFgEAwAAYBEMAACARTAAAAAWwQAAAFgEAwAAYBEMAACARTAA\nAAAWwQAAAFgEAwAAYBEMAACARTAAAAAWwQAAAFgEAwAAYBEMAACARTAAAAAWwQAAAFgEAwAAYBEM\nAACARTAAAAAWwQAAAFgEAwAAYBEMAACARTAAAAAWwQAAAFgEAwAAYBEMAACARTAAAAAWwQAAAFgE\nAwAAYBEMAACARTAAAAAWwQAAAFgEAwAAYFV7MPj000+VlJQkSdq9e7d69OihpKQkJSUl6a233pIk\nrVq1SoMHD1ZCQoI2btwoSTp16pQmTpyo4cOHa/z48SosLJQkbd++Xffff78SExOVlZVlXycrK0tD\n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\nsaO62wIAoE6q1mDw3HPPaerUqSorK5MkzZo1S5MmTdKLL74oY4zWr1+vo0ePasWKFXrppZf0xz/+\nUfPmzVNpaalWrlyp1q1b68UXX1R8fLy9o2N6errmzZunlStXaseOHdqzZ4927dqlDz/8UK+88orm\nz5+v6dOnV2dbAADUWdUaDFq0aKGsrCy7ZWD37t3q2LGjJKlHjx7Kzc3VZ599ppiYGIWHh8vlcqlF\nixbat2+ftm3bph49ekiSunfvrs2bN8vr9aqsrExRUVGSpLi4OOXm5mrbtm2KjY2VJF177bXy+/06\nduxYdbYGAECdVK3BoF+/fgoNDbWPzwYESXI6nfJ4PPJ6vXK73eWWe71eeb1eOZ3OcmN9Pp9cLtcl\nzwEAAH6YC952uaqFhPwrh3i9XkVGRsrlcsnn89nlPp9Pbre73HKfz6fIyEg5nc5yY8/OER4eft45\nLsbtql/pOocpUdOmbkVGXnyey0VEREAuZ6Gc/9vX+foLUamaNnWrUaPa01dlmjWr/T1Upi73JtFf\nbUd/dVuNBoO2bdvqgw8+UKdOnZSdna2uXbsqOjpa8+fPV2lpqUpKSnTw4EG1atVKMTExys7OVnR0\ntLKzs9WhQwe5XC6Fh4crLy9PzZs3V05OjpKTkxUaGqrMzEyNGTNG+fn5CgQCaty48UXr8XhPVbrO\n5z2lggKPSkocVfkWVKviYo+8vhIFdEpuV/3z9nfCV6KCAo9KS2v3CSnNmrl19Kgn2GVUi7rcm0R/\ntR391V6XGnhqJBg4HGc+XFNTUzVt2jSVlZWpZcuW6t+/vxwOh0aOHKlhw4YpEAho0qRJioiIUGJi\nolJSUjRs2DBFRERo3rx5kqSMjAxNnjxZfr9fcXFxio6OliR16NBBCQkJCgQCSk9Pr4m2AACocxzm\n3B3/V5BX3/5EJqRBpet9niL1uK253O7IGqzq31NcXKT3P8tXQ6f7AlsMPIr7j2sVGdkoCBVWnbqe\n6utqbxL91Xb0V3td6haD2r09GQAAVCmCAQAAsAgGAADAIhgAAACLYAAAACyCAQAAsAgGAADAIhgA\nAACLYAAAACyCAQAAsAgGAADAIhgAAACrRm+7DPxQxhh5PMUVlkdEBFRc/K8bnbjdkfYungCA/zuC\nAS5rHk+x1m39XA0aOsstdzkL5fWVSJJOnvCpb+eba/0dIwHgckAwwGWvQUOnGjrL3y7U6aqvgCre\nVhoA8O/hGAMAAGARDAAAgEUwAAAAFsEAAABYBAMAAGARDAAAgEUwAAAAFsEAAABYBAMAAGARDAAA\ngEUwAAA8JoEkAAATPklEQVQAFsEAAABYBAMAAGARDAAAgEUwAAAAFsEAAABYBAMAAGARDAAAgEUw\nAAAAFsEAAABYBAMAAGARDAAAgEUwAAAAFsEAAABYBAMAAGARDAAAgEUwAAAAFsEAAABYBAMAAGAR\nDAAAgEUwAAAAFsEAAABYBAMAAGARDAAAgEUwAAAAFsEAAABYBAMAAGARDAAAgBUWjBcdNGiQXC6X\nJCkqKkq//vWvlZqaqpCQEN1yyy1KT0+Xw+HQqlWr9PLLLyssLEwTJkxQr169dOrUKU2ZMkWFhYVy\nOp2aPXu2mjRpou3bt+vpp59WaGioYmNjlZycHIzWAACo1Wo8GJSUlEiSVqxYYZc9+OCDmjRpkjp2\n7Kj09HStX79e7du314oVK7RmzRqVlJQoMTFR3bp108qVK9W6dWslJyfrzTff1LPPPqu0tDSlp6cr\nKytLUVFRGj9+vPbs2aO2bdvWdHsAANRqNb4rYe/evTp58qTGjBmjUaNGafv27dq9e7c6duwoSerR\no4dyc3P12WefKSYmRuHh4XK5XGrRooX27dunbdu2qUePHpKk7t27a/PmzfJ6vSorK1NUVJQkKS4u\nTrm5uTXdGgAAtV6NbzFo0KCBxowZoyFDhuirr77S2LFjy613Op3yeDzyer1yu93llnu9Xnm9Xjmd\nznJjfT6f3TVxdnleXl7NNAQAQB1S48HgxhtvVIsWLezPjRs31p49e+x6r9eryMhIuVwu+Xw+u9zn\n88ntdpdb7vP5FBkZKafTWW7s2Tkuxu2qX+k6hylR06ZuRUa6Kx1zuYmICMjlLJTzf/s6X38hKlXT\npm41alQ7+vp+T+c6219t6+lSNGtWd3o5H/qr3eivbqvxYLBmzRrt27dP6enpOnLkiHw+n2JjY/XB\nBx+oU6dOys7OVteuXRUdHa358+ertLRUJSUlOnjwoFq1aqWYmBhlZ2crOjpa2dnZ6tChg1wul8LD\nw5WXl6fmzZsrJyfnkg4+9HhPVbrO5z2lggKPSkocVdl+tSou9sjrK1FAp+R21T9vfyd8JSoo8Ki0\ntHackHJuT+c6t7/a1tPFNGvm1tGjnmCXUW3or3ajv9rrUgNPjQeD++67T4899piGDx8uSZo1a5Ya\nN26sadOmqaysTC1btlT//v3lcDg0cuRIDRs2TIFAQJMmTVJERIQSExOVkpKiYcOGKSIiQvPmzZMk\nZWRkaPLkyfL7/YqLi1N0dHRNtwYAQK1X48EgLCxMmZmZFZafe5bCWUOGDNGQIUPKLatfv77+8Ic/\nVBjbvn17vfzyy1VXKAAAV6C6se0VAABUCYIBAACwCAYAAMAiGAAAAItgAAAALIIBAACwCAYAAMAi\nGAAAAItgAAAALIIBAACwCAYAAMAiGAAAAItgAAAALIIBAACwCAYAAMAiGAAAAItgAAAALIIBAACw\nCAYAAMAiGAAAAItgAAAALIIBAACwCAYAAMAiGAAAAItgAAAALIIBAACwCAYAAMAiGAAAAItgAAAA\nLIIBAACwCAYAAMAiGAAAAItgAAAALIIBAACwCAYAAMAiGAAAACss2AUAVyJjjDye4vOui4gIqLjY\nI0lyuyPlcDhqsjQAVziCARAEHk+x1m39XA0aOiusczkL5fWV6OQJn/p2vlmRkY2CUCGAKxXBAAiS\nBg2dauh0V1judNVXQKeCUBEAcIwBAAA4B8EAAABYBAMAAGARDAAAgEUwAAAAFsEAAABYBAMAAGAR\nDAAAgEUwAAAAFsEAAABYBAMAAGARDAAAgEUwAAAAFsEAAABY3HYZQI0xxqioqEjFxZ4LjnO7I+Vw\nOGqoKgDnqjPBIBAI6Mknn9T+/fsVHh6umTNn6oYbbgh2WQDO4fEU6+3NeQqYyv/0nDzhU9/ONysy\nslENVgbgrDoTDN555x2VlZXppZde0qeffqrZs2dryZIlwS4LwPc0bOhUQBHBLgNAJepMMNi2bZu6\nd+8uSWrfvr127twZ5IoAXCmMMfJ4iiVJERGBSneVsIsEtUGdCQZer1cul8s+Dg0NVSAQUEjI+Y+v\n9JcUqey0r9L5/CUn5fX6ZIyp8lqri8dTrJMnzvQUolKd8JVUGHPyhM/+AasNzu3pXOf2V9t6kirv\nS/pXb7Wxr4vxeIp14oRPAVPxd/Os2ti3x1Osdz/+UvXrN5CzYT35TlTs79Spk+r985vkdkcGocKq\nc6HgUxfU5f6aNXNf0rg6EwxcLpd8vn/9ob1QKJCkhHt61UBVNe+2224NdglVri72JNXdvi7mttuC\nXUH1uJL+PRs1qtvHf9T1/i6mzpyuGBMTo+zsbEnS9u3b1bp16yBXBABA7eMwtWlb+QUYY/Tkk09q\n3759kqRZs2bppptuCnJVAADULnUmGAAAgH9fndmVAAAA/n0EAwAAYBEMAACAVWdOV7xUV8qlkz/9\n9FPNnTtXK1asCHYpVaasrEyPP/64Dh8+rNLSUk2YMEF9+vQJdllVxu/3a+rUqfrqq6/kcDiUkZGh\nW265JdhlVbnvvvtOv/zlL/WnP/2pzh0gPGjQIHs9laioKD399NNBrqjqLFu2TO+++67Kyso0YsQI\nDRo0KNglVZm//vWvWrNmjSSppKREe/fuVW5ubrlr49RmgUBAaWlp+uqrrxQSEqIZM2boJz/5SaXj\nr7hgcCVcOvm5557Ta6+9JqfTGexSqtTrr7+uJk2aKDMzU0VFRYqPj69TweDdd99VSEiIVq5cqQ8+\n+EDz58+vc7+bZWVleuKJJ9SgQYNgl1LlSkrOXNSoLoXxs7Zu3apPPvlEL730kk6cOKHly5cHu6Qq\nNWjQIBt0pk+friFDhtSZUCBJ77//vk6ePKmVK1cqNzdXCxYs0MKFCysdf8XtSrgSLp3cokULZWVl\n1aqrNl6K/v376+GHH5Z0JgGHhoYGuaKqdccdd2j69OmSpG+++aZOXmTl97//vRITE9WsWbNgl1Ll\n9u7dq5MnT2rMmDEaNWqUPv3002CXVGVycnLUunVr/eY3v9GDDz5YpwL5uT777DMdOHBAQ4YMCXYp\nVap+/fryeDz/e+luj8LDwy84/orbYvBDL51cG/Xr10+HDh0KdhlVrmHDhpLO/Bs+8sgj+t3vfhfk\niqpeaGioUlNTtW7dugsm+tpozZo1atKkieLi4rRs2bI6F1wbNGigMWPGaMiQIfrqq680btw4vf32\n23Xib0thYaHy8/O1bNky5eXlacKECfrb3/4W7LKq3LJlyzRx4sRgl1HlYmJiVFpaqv79++v48eNa\nunTpBcfX/t/YH+iHXjoZl5f8/HyNGjVK8fHxuvvuu4NdTrWYPXu23n77bU2bNk2nTp0KdjlVZs2a\nNcrNzVVSUpL27t2r1NRUFRQUBLusKnPjjTfqnnvusT83btxYR48eDXJVVeOqq65SXFycwsLCdNNN\nN6levXoqLCwMdllVqri4WF999ZU6deoU7FKq3PLlyxUTE6O3335b//3f/63U1FSVlpZWOv6K+0Tk\n0sm1V0FBgUaPHq0pU6bol7/8ZbDLqXJr167VsmXLJJ3Z9OdwOOpUaH3hhRe0YsUKrVixQm3atNGc\nOXPUtGnTYJdVZdasWaPZs2dLko4cOSKv11tndpn8/Oc/13vvvSfpTG8nT57UVVddFeSqqtaHH36o\nLl26BLuManHy5El7zFlkZKTKysoUCAQqHX/F7Uro27evcnJyNHToUElnLp1cV9W127suXbpUHo9H\nixcv1uLFiyWdScL16tULcmVVo3///kpNTdWIESN0+vRppaWlKSIiIthl4RLdd999euyxxzR8+HBJ\nZ/621JVg16tXL3344Ye67777FAgElJ6eXuf+vnz11Vd18gw1SRozZowee+wxDRs2TKdPn9ajjz6q\n+vXrVzqeSyIDAACrbsRZAABQJQgGAADAIhgAAACLYAAAACyCAQAAsAgGAADAIhgAl4lDhw6pTZs2\nys3NLbe8T58+Onz48L89f58+fXT8+PF/e54LOXz4sPr376/BgweXu8KoJH3xxRd68MEHNXDgQA0c\nOFCPPvqojh07Vq31VLcdO3Zo7ty5wS4DqFIEA+AyEhYWpqlTp1b4UK0q1X3Zkg8++EA//elPtXr1\n6nJ39zxy5IhGjRqloUOH6vXXX9frr7+uVq1aKTk5uVrrqW6ff/65vvvuu2CXAVSpK+7Kh8Dl7Jpr\nrlFcXJzmzJlj77R41tatW5WVlWVv65uamqrOnTurU6dO+s1vfqMbbrhB+/fvV7t27dSpUyf99a9/\nVVFRkbKystSyZUtJ0ty5c7V7927Vq1dPTz31lG6++WYVFBQoPT1d+fn5CgkJ0aOPPqquXbtq0aJF\n2r59u/75z39qxIgRSkxMtLV8+eWXeuKJJ1RUVKSGDRsqLS1N4eHh+sMf/qATJ07oySef1JNPPmnH\nr1y5UnFxcerVq5ddNm7cOEVFRcnv96u0tFRTp07V/v375XA4NHr0aMXHx2vNmjXauHGjvv32Wxsu\nDh8+rC1btqhx48Zavny5vv32W02cOFE//vGPlZeXp+uuu06ZmZlq1KiR3n33Xf3hD39QIBBQVFSU\npk+frquvvlp9+vTRvffea29HO2fOHP30pz/V119/rYyMDB0/flz169fXtGnT1LZtW6WmpsrtdmvX\nrl365z//qeTkZPXt21cLFy7UyZMntWzZMvXs2VPp6ek6ffq06tWrp1mzZqlFixbV98sCVBcD4LKQ\nl5dnevfubTwej+ndu7fJyckxxhjTu3dv880335gtW7aYESNG2PGpqanmr3/9q8nLyzNt2rQxe/bs\nMYFAwPTt29c888wzxhhjFi1aZJ5++mk7z3/9138ZY4zZuHGjGTx4sDHGmN/+9rdm/fr1xhhjjhw5\nYu644w7j9XrNwoULTVJS0nlrHTx4sFm3bp0xxpjt27eb3r17m5KSErNmzRqTmppaYfyvf/1rs3Ll\nykp7nzNnjnnqqaeMMcYUFhaa22+/3ezdu9esXr3a9O7d23i9XvPNN9+Y1q1bm/fff98YY0xSUpJ5\n5513bP8ff/yxMcaY2bNnmxkzZpiCggLTvXt388033xhjjFm+fLl5+OGH7Xvx5z//2RhjzIoVK8zE\niRONMcYkJCSY3bt3G2OMOXDggLnzzjuNMcakpKTYMfv27TOdOnUyxphy/aamppq33nrLGGPMG2+8\nYdauXVtpv8DljF0JwGXG5XJpxowZP2iXQtOmTdWmTRs5HA796Ec/sjeDue6661RcXGzH3XfffZKk\nnj17Ki8vT16vV7m5uVq4cKHi4+M1fvx4+f1+5eXlyeFwqH379hVey+fzKS8vT3fccYckqX379mrU\nqJG+/PLLSndVOByOC960ZevWrba2q666Srfffrs++OADORwO/exnP5PT6dR1110nSeratask6frr\nr5fH45HD4VCrVq0UExMjSYqPj9fWrVv12WefKTo62j7v/vvv15YtW+xrdu/eXZJ088036/jx4zpx\n4oR27typxx57TPHx8Zo8ebJOnjyp48ePy+FwKDY2VpJ0yy23qKioSFL5XTO9evXSjBkz7D0uBg4c\nWGm/wOWMXQnAZSg2NlaxsbH2bn1SxZtilZWV2Z/Dw8PLrQsLO/9/7dDQ0ArjjDH6y1/+osjISEln\njgdo1qyZ3nnnnfPeoMoYUyEAGGMUCAQqvbFOu3bttHPnznLLAoGAHn74YWVkZFSYMxAIyO/3S1KF\nG0md78ZE5/YVCAQUGhpaIYgYY3T69Gn7+GxvDofD1l+vXj2tXbvWjsnPz1fjxo3L1VFZj3feeadu\nu+02bdy4UX/+85+1adMmzZgx47xjgcsZWwyAy1RKSopycnL07bffSjrzTTovL0+lpaU6fvy4Pv74\n4x885+uvvy5JWrdunX7yk5+ofv366tKli1588UVJ0oEDB3TPPffo5MmTlX77d7lcioqK0rp16ySd\nuX15QUGBbrnllkqfk5CQoE2bNmnTpk2SznxIL1myRMeOHdPVV1+tzp0769VXX5UkFRYWav369erc\nufNFD5Y8Gyj279+v/fv3S5JWr16tnj17qn379tq+fbu++eYbSdLLL798wdvqulwutWjRQq+99pok\nKScnR0lJSRd8/dDQUBs2Hn30UX322WdKSEjQww8/rF27dl3wucDlii0GwGXk3G+jZ3cpjB07VtKZ\nTdg9e/bU3Xffreuvv14dOnSwz6nsW+z3l+/fv1/x8fFyu92aM2eOJGnq1Kl64okndM8998gYo7lz\n58rpdF7wtrqZmZlKT0/XwoULVa9ePWVlZSksLKzS5zRt2lTPPfecfv/732vu3LkKBAL66U9/am+f\n/dBDDykjI0MDBw5UIBDQhAkT1LZtW+3du/eC/ZztvUmTJnrmmWeUl5enNm3aaPLkyapfv75mzJih\n5ORklZWV6frrr9fMmTPP+x6dnXfu3LlKT0/X8uXLFRERoQULFpz3tc/+3L59ey1evFjPPPOMxo0b\np6lTp2rJkiUKDQ3V448/Xun7B1zOuO0ygFrt0KFDGjdunN56661glwLUCexKAFDrXWjrBoAfhi0G\nAADAYosBAACwCAYAAMAiGAAAAItgAAAALIIBAACwCAYAAMD6/6nIhwNYcR/WAAAAAElFTkSuQmCC\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd64ceb8c10>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(closed_chrome_issue[\"num_components\"], \"Number of Components (Closed)\", \"Number of Components\", \"Count\")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Statistics on Component assignment for closed chrome issues"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 63,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "count    538161.000000\n",
+       "mean          0.853496\n",
+       "std           0.850581\n",
+       "min           0.000000\n",
+       "25%           0.000000\n",
+       "50%           1.000000\n",
+       "75%           1.000000\n",
+       "max           8.000000\n",
+       "Name: num_components, dtype: float64"
+      ]
+     },
+     "execution_count": 63,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "closed_chrome_issue[\"num_components\"].describe()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 64,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgYAAAFtCAYAAAB85KKkAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtcVHX+x/H3AIOXGVApay3J0rzVPrAHgYngJbY1Ns00\nNQRFf2WaKdZGmigqapmomZtg5s/a3dTWW6s+autRqZtR4G1zTfOemeFKXhYvzCgwzpzfHz38rqTg\n+FsRL6/nX845Z77ncz4zct5z5pwzNsuyLAEAAEgKqO4CAADA1YNgAAAADIIBAAAwCAYAAMAgGAAA\nAINgAAAADIIBqsWBAwfUokULLV26tNz0d955R6NGjbps64mPj9eWLVsu23iVcblc6t27tx599FGt\nXLnyvPl79+7VsGHD1LVrVz322GNKSUnR119/fUVqu5KeeuopHT9+/Lzp69ev16OPPnre9IkTJyon\nJ+eS1rF161bFx8dfdLmlS5fqL3/5yyWNfTEjRozQnj17JEmlpaX6wx/+oO7du6tbt2569NFHNXfu\nXLNsSkqKPv3008u6/gvp0qWLNmzYcN70ZcuWafDgwVW+fn+MGDFC33//fXWXAT8EVXcBuHEFBARo\n2rRpio6O1p133ilJstlsl309V+pWHTt27FBRUZE+++yz8+Z9//33+p//+R9lZWUpNjZWkrR27VoN\nHjxYixYtUpMmTa5IjVdCfn7+JfW8Kl7zs77++ms1a9bsso338ccfq06dOmratKksy9KQIUPUuHFj\nLV68WMHBwTp+/LieeeYZnT59Ws8995ykqt2+s2w22xVZz3/jueee0/Dhw7V48eLqLgUXQTBAtalR\no4aefPJJpaWlafHixbLb7eV2KOnp6WrWrJmeeuqp8x7Hx8fr0Ucf1Zo1a3T8+HENGzZMmzZt0rZt\n2xQUFKTZs2frlltukSQtWrRIEyZMUFlZmZ588kn16NFDkvT3v/9db731ljwej2rWrKmRI0fqvvvu\nU3Z2tjZv3qwjR46oRYsWmjp1arm6V61apVmzZsnr9crpdCo9PV0hISHKyMjQoUOH1L17dy1atEg1\natQwz5k7d6569OhhQoEkxcTE6PXXX1dwcHCF40ZERCg7O1s//vijCgoKdPjwYbVq1UqxsbFasWKF\nDhw4oBEjRqhz587Kzs7Wnj17VFRUZGqfNGmSnE6n9uzZo4kTJ+rEiROy2Wx68skn1a1bN61fv14z\nZszQHXfcoT179qisrEzjxo3TAw88oLKyMr322mv6xz/+Ia/Xq3vuuUcZGRlyOp2Kj4/X448/rrVr\n16qwsFC/+93vNGLECHO0p3///vrf//1f/epXv7qk90RKSoqaNGmibdu26dixY3rsscc0bNgwSdJf\n/vIXvfvuuwoJCVHTpk3Nc44ePapx48aZ7b7tttv0xhtv6Ouvv9bnn3+u/Px81axZU8nJyZo9e7ZW\nrlwpn8+n22+/XZmZmbrlllv02Wef6a233pLNZlNgYKBeeuklRUVFnVdfTk6OZs6cKUnauHGj9u3b\np7ffftvslOvWraupU6fq4MGD5z23otd37969ysjIUFlZmSSpZ8+eSk5OlqQK6/3uu+80evRolZSU\n6K677pLb7b5obytaT0XTs7Ozdfz4cY0dO1aSyj0uLi7WpEmTtHv3bp05c0YxMTF66aWXFBgYqJkz\nZ2rVqlWy2+2qW7eusrKyVL9+fYWHhyskJESrV6/Wb37zG//eEKgeFlANCgoKrPvuu8/y+XxWnz59\nrKysLMuyLOvtt9+20tPTLcuyrPT0dOuPf/yjec65jx988EHznI8++shq2bKltXPnTsuyLGvo0KHW\nW2+9ZZabMGGCZVmWdejQISsmJsbas2ePtW/fPqtLly7W8ePHLcuyrN27d1uxsbHWqVOnrJkzZ1q/\n+93vLK/Xe17d3333nRUbG2sVFBRYlmVZa9eutWJjYy2Xy2WtX7/e6tKlywW3t0uXLtYXX3xRYT8q\nGre4uNiaOXOmFR8fbxUXF1slJSVW69atzbavWrXK6tSpk2VZljVz5kwrLi7OOnr0qOXz+ay0tDQr\nKyvLOnPmjPWb3/zGWrlypelD+/btrX/+85/WunXrrHvuucfasWOHZVmW9cc//tHq27evZVmWlZ2d\nbU2ZMsXUOH36dGv8+PGmr2fn/fTTT1ZERIR14MABy7Isq3nz5taxY8fO28Z169ZdsD8TJ060srOz\nLcuyrL59+1pPP/205fF4rOLiYishIcH6/PPPre3bt1tt27a1jh49almWZU2YMMGKj4+3LMuy3n33\nXWvu3LlmvIEDB5r3ybnvmeXLl1svvPCCdebMGcuyLGvRokXWwIEDLcuyrIceesj65ptvLMuyrK++\n+sqaNWvWeXXu2rXLevDBB83jd955x/r9739/3nLn6tu3r/Xpp59W+vqOGjXKmjNnjmVZlnXkyBEr\nLS3N8vl8ldb72GOPWe+//75lWZa1efNmq2XLltaGDRvOW/9f//pX65lnnrEsy6pwPRVNz87OtiZO\nnGjGys7Otl5++WXT1/nz51uWZVlnzpyxhg8fbs2dO9c6ePCgdf/991tlZWWWZf38fjr7vrMsy1qw\nYIE1cuTISnuG6scRA1Qrm82madOmqVu3bmrXrt15h0OtSg5Jd+rUSZIUHh6um2++Wc2bNzePT5w4\nYZZLTEyUJN1yyy2Ki4vT2rVrFRAQoCNHjqh///5mucDAQO3fv182m02tWrVSQMD5p+CsW7dOMTEx\natiwoSSpTZs2uummm/Ttt99Wup0BAQGVbktF427btk02m02xsbFyOp1mO9q3b3/BbU1ISNBNN90k\n6edPfq+++qp69uypsrIyPfTQQ+b5nTp10pdffqkHHnhAt912m1q0aCFJatmypZYtWyZJWrNmjYqL\ni5Wfny9J8ng8ZmxJ5lPfrbfeqptuukknTpzQ7bffXmkPLsTn8ykwMNA8TkxMVFBQkJxOpxISEvTV\nV1/p9ttvV1xcnFl/YmKi1qxZI0nq16+f/vGPf+hPf/qTfvjhB+3Zs0etWrU6bz2ff/65tm7dao4Y\neb1elZaWSpIeeeQRDRkyRB07dlTbtm319NNPn/f877//Xo0aNSq3PV6vt8LtPcuyrEpf306dOmnk\nyJHaunWrYmJilJGRIZvNVmG9x48f1+7du9WtWzdJUqtWrczrV5mK1lPR9MqsWbNG3377rd5//31J\nUklJiQICAvSrX/1KLVq0UPfu3dWuXTu1b99eMTEx5nnh4eH64IMPLlorqhfBANWuQYMGmjBhgkaO\nHGn+2J117s707KHOs84egpekoKCK38rn7pB8Pp+CgoLk9XoVExOjGTNmmHkHDx7Ur371K61atUq1\na9eucLxf7uB9Pp+8Xm+5ndsvtWrVSv/85z/VoUOHctNzcnLMzuZC4545c0aSZLfby82raHvPreHs\nDtfn85233Llj16xZ00w/d4fg8/k0ZswYtWvXTpLkdrvNjvSXz7tQ/b9Ur169C56UePTo0XLnAfzy\n9QoICJDNZiu3Hedu57Rp07R161b17NlTbdq0kdfrvWAtlmVp0KBB6t27t6Sf309n63nhhRfUs2dP\n5eXlafny5Zo7d66WLVtWrh+/DAL33Xef5s2bZ2o8a8uWLVqwYMF5X0FV9L7p2LGjPv30U+Xn52vt\n2rWaNWuWFi1aVGm9Z59/tg+VvffOqmg9FU3/Zc3n/v/z+Xx644031LhxY0nSyZMnzXkOCxYs0Lff\nfqv8/HxNnjxZDzzwgDIyMszzKgqIuHrwCuGqkJCQoPbt2+vdd98108LCwswn8aKioks6g//cP2hn\nPwEfPHhQa9euVdu2bdWmTRvl5eWZs6Rzc3PVrVs3lZaWVrqDO/u8goICST+fQHjo0CFFRERUWs/T\nTz+tpUuXKi8vz0zLzc3V/Pnz1bJlywrHbdWq1SWdyPf3v/9dxcXF8vl8WrJkieLj43XXXXfJbreb\nKyUOHTqkzz77TLGxsZWO3a5dOy1YsEBlZWXy+XzKzMzUH/7wh4vWEBgYKI/Hc970xo0bKzg4WB9/\n/LGZ9t1332nDhg3lzr348MMPZVmWTpw4oU8++UTx8fFq27at8vLydOjQIUn/eU0lKS8vT/3791fX\nrl0VFham/Px8EyLOrSUuLk5LliyRy+WS9HMoS09Pl9frVXx8vE6fPq3evXtr3Lhx2rt3rwlOZ915\n5506cOCAeXzffffprrvu0uTJk81O8+jRo3r55ZcVHh5ulrPZbJW+b1588UV9/PHHeuSRRzRu3Dg5\nnU799NNPFdZbt25d3XvvveaKnh07dmjHjh0XfV0utJ7CwsIK1x8WFqZt27ZJkk6dOqWvvvrKjBUX\nF6c///nPsixLZWVlGjp0qP7yl79o586d6tKlixo3bqxBgwapf//+2rVrl3leQUHBdXWi7fWKIwao\nNr88XDlmzJhyO/+UlBQNHz5cCQkJuv322/XAAw/4Pda5jz0ej7p3764zZ85o7Nix5hP6xIkTlZaW\nJsuyzAmLtWrVqvQM7yZNmigzM1PDhg2T1+tVrVq1NHv2bHOYvyJ33HGH3nrrLf3hD3/QlClT5PP5\ndNNNN2nOnDm6++67JanCcS92xvm5826++WYNGjRIRUVFio6O1uDBgxUUFKRZs2Zp0qRJys7Oltfr\nVWpqqlq3bq3169dXOO6QIUM0ZcoUde/eXT6fT/fcc49GjhxZ6XZK0m9/+1tzot/ZbZN+/sQ9Z84c\nTZ48WbNnz5Yk1a5dW1OnTtUdd9xhlisrK1PPnj3lcrmUlJSkNm3aSPr5crf+/fvL4XAoIiLCbPfQ\noUM1depUzZkzR2FhYXr44Ye1f/9+SVL79u01ceJESdLAgQN16NAhJSYmymaz6bbbblNWVpYCAwM1\n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\n3dS5c+fqLueqlpWVpU8//VRjx45VSUlJdZdz1Vm2bJny8/OVkpKinTt3Kj09XUePHq3usq5Kd955\np7p27Wr+XbduXR05cqSaq7r61KtXT3FxcQoKCtJdd92lGjVqqKioqMLlb7g9IrdNxuV29OhRPfXU\nUxoxYoQef/zx6i7nqrVixQrNmTNHklSzZk3ZbDZC+QUsWLBA8+fP1/z589WiRQtNmTJFN998c3WX\ndVVatmyZsrKyJEmHDh2Sy+Xi65cLuP/++/Xll19K+rlPp0+fVr169Spc/ob7KuG3v/2t8vLy1Lt3\nb0k/3zYZlePnbyv31ltvqbi4WLNmzdKsWbMkSW+//bZq1KhRzZVdXRISEpSenq6+ffvqzJkzysjI\nUHBwcHWXhWtYz549NWrUKPXp00fSz3/PCZvn69ixozZu3KiePXvK5/MpMzOz0r/r3BIZAAAYRCsA\nAGAQDAAAgEEwAAAABsEAAAAYBAMAAGAQDAAAgEEwAK5BBw4cUIsWLZSfn19uenx8vA4ePPhfjx8f\nH6/jx4//1+NU5uDBg0pISFCPHj3K3Y102bJlGjVqVLll169ff8m/8tmlS5dKe1FcXKyhQ4deWtHA\nDYBgAFyjgoKCNGbMmHI71cupqm9xsmHDBt17773661//Wu4XPC/XDbUuNs6JEye0Y8eOy7Iu4Hpy\nw935ELhe3HLLLYqLi9OUKVPMrxaetX79euXk5Jifo01PT9cDDzyg1q1ba8iQIbrjjju0e/du/frX\nv1br1q21fPlynThxQjk5OWrSpIkk6bXXXtP27dtVo0YNvfLKK7r77rt19OhRZWZmqrCwUAEBAXrx\nxRcVExOj7Oxsbd68WT/99JP69u2rpKQkU8u+ffs0btw4nThxQrVr11ZGRobsdrveeOMNnTp1SuPH\nj9f48eP93u709HTZ7XZt375dLpdLQ4YM0WOPPaYTJ07opZde0sGDB3XnnXeawORyuTR69GgdPnxY\nhw8fVlRUlKZOnapXXnlFhw8f1rBhw5Sdna0VK1Zo3rx58vl8uvfee83d4UaPHq3vvvtOkpScnKxe\nvXr9Ny8bcNXjiAFwDXvppZf01VdfnfeVwi/ZbDbZbDZZlqXdu3dr6NCh+uSTT7R161YdPHhQixYt\nUufOnbVkyRLznKZNm2r58uV69tlnlZ6eLkmaNGmSevTooWXLlunNN9/UuHHjzA7Y4/Hoo48+KhcK\nJGnEiBHq37+/PvjgA40aNUrPP/+8GjdurOeee07x8fGXFArOOnz4sJYuXap58+Zp6tSpOnr0qGbO\nnKkWLVroww8/1MCBA/XTTz9Jkr744gvde++9WrRokT755BNt3rxZ27dv19ixY3XLLbcoOztbe/bs\n0dKlS7Vo0SKtWLFCYWFheuedd7R582adPHlSy5cv15/+9Cdt2rTpkmsFrjUcMQCuYU6nUy+//LLG\njBmjDz/80K/n3HzzzWrRooUk6dZbb1WbNm0kSbfddps2btxoluvZs6ckqUOHDnrppZfkcrmUn5+v\nffv2mZ9M9nq9KigokM1mU6tWrc5bl9vtVkFBgR566CFJUqtWrVSnTh3t27evwq8qLvQVgGVZ5h74\nNptNvXr1UkBAgG699VZFRkbq66+/1oYNGzR9+nRJUkREhJo2bSpJ6ty5s7Zs2aI///nP+v7773X8\n+HGdOnVKoaGhZvz169dr//79euKJJyT9HHLuvfdeJSUlad++fRowYIA6dOig4cOH+9Vj4FpGMACu\ncbGxsYqNjTW/Miedv3P1eDzm33a7vdy8oKAL/xkIDAw8bznLsjRv3jyzUz106JDq16+vVatWXfBH\noyzLOi8AWJYln89X4TkAderU0cmTJ8tNKyoqUp06dS5Ym8/nM499Pl+5ZSzL0vz58/XZZ58pMTFR\nsbGx2rNnz3k1+Xw+JSQkaMyYMZJ+DjRer1ehoaH629/+pvz8fH3xxRfq3r27PvroI4WEhFywduB6\nwFcJwHVg5MiRysvL0+HDhyX9/PvrBQUFKisr0/Hjx/X1119f8phnj0CsXLlSjRs3Vs2aNdWmTRu9\n9957kqQ9e/aoa9euOn36dIWf/p1Op8LDw7Vy5UpJP//U+dGjR9W0adMKn9OqVStt2bJFBQUFkqSy\nsjKtWLFCbdu2lfRzsPjb3/4mSfrXv/6lb775RtHR0YqNjdXy5cslSbt27dLu3bslSfn5+UpMTFSX\nLl0kSTt37pTX61VQUJC8Xq8kqXXr1lq1apWKiopkWZbGjx+vefPmac2aNRoxYoQ6duyojIwM1a5d\n23xFAVyvOGIAXKPO/cR99iuFp59+WtLP5wd06NBBnTt31u23366oqCjznIo+qf9y+u7du9WtWzeF\nhIRoypQpkqQxY8Zo3Lhx6tq1qyzL0muvvSaHw1HpFQDTpk1TZmamZs6cqRo1aignJ0dBQUEVPics\nLEwvv/yynn/+efl8PpWVlenhhx9WYmKiqfPUqVN6/PHH5fF49Morr6hOnToaNmyYRo0apc6dO+uO\nO+5Q48aNZbPZ1L9/f7Ojv+222/Tggw/qwIEDioqKUoMGDdS/f3+9++67Gjp0qPr37y+fz6d77rlH\ngwYNUkBAgD755BN17txZNWrU0MMPP2y+ogCuV/zsMoBryqhRo9SuXTs98sgj1V0KcF3iqwQAAGBw\nxAAAABgcMQAAAAbBAAAAGAQDAABgEAwAAIBBMAAAAAbBAAAAGP8HqTVXT7Vh3DMAAAAASUVORK5C\nYII=\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd616727450>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(closed_chrome_issue[\"num_comp_updates\"], \"Number of Component Updates (Closed Issues)\", \"Number of Updates\", \"Count\")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Only include issues that were created after issue tracking was transorted to Monorail"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 65,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "import_date = \"02/18/2016\"\n",
+    "import_date = time.mktime(datetime.datetime.strptime(import_date, \"%m/%d/%Y\").timetuple())"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 66,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "closed_chrome_issues_monorail = closed_chrome_issue[closed_chrome_issue[\"opened\"] > import_date]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 67,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "(12381, 24)"
+      ]
+     },
+     "execution_count": 67,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "closed_chrome_issues_monorail.shape"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 68,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAfoAAAFtCAYAAADvdqiyAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xt4FPW9x/HP5sZld4MGYi1UUCOXqE1sJEAghJgqTQvY\nUORgAhGFekFBbSQnoVwCKMcgRlqueqzt01IE0hp5pPXUC0jTEiC2iAdELgLSUDAkRpLdhWST7Jw/\neNhDhE0iMAmO79fz8DzsbyYz3/ntJp/5/XZ3xmYYhiEAAGBJQe1dAAAAMA9BDwCAhRH0AABYGEEP\nAICFEfQAAFgYQQ8AgIUR9LhkR48eVb9+/fSHP/yhSfsrr7yiGTNmXLb9pKSk6H//938v2/aa43a7\nde+992rUqFF65513zlt+8OBBTZs2TXfffbd+/OMfKzMzU//85z/bpLa2NGnSJJ08efK89qKiIt1+\n++1KS0vT6NGjlZaWpvT0dO3cufOS9nf06FF973vfu6RtXIzy8nJNmTLF/7i557etaty1a5dSUlIu\nuCwzM1NvvfWW6TW05LPPPtPUqVPFt7SvbCHtXQCsISgoSIsWLVJ8fLyuv/56SZLNZrvs+2mrPygf\nf/yxqqqq9Pbbb5+37NChQ7r//vuVn5+vIUOGSJK2bt2qRx55RGvXrlVUVFSb1NgWSkpKAvZ5fHy8\nXnzxRf/j9957T1OnTlVxcbGCgr5eY4hZs2bpySeflNTy89uhQ4f2LNXPjN+vr+raa69VdHS0Xn31\nVY0fP769y0EABD0uiw4dOuiBBx5QVlaW1q1bp9DQ0CYBkZubqz59+mjSpEnnPU5JSdGoUaO0efNm\nnTx5UtOmTdOOHTv00UcfKSQkRCtXrtQ111wjSVq7dq3mzZsnr9erBx54QGPGjJEkbdq0SS+++KLq\n6+vVsWNH5eTk6LbbbtPSpUu1c+dOVVRUqF+/fnruueea1P3uu+9q+fLlamxslMPhUG5urpxOp2bO\nnKny8nKNHj36vD/uL7/8ssaMGeMPAUlKSEjQCy+8oLCwsIDbjYmJ0dKlS/Wvf/1LZWVlOnHihGJj\nYzVkyBCtX79eR48eVXZ2tkaMGKGlS5fqwIEDqqqq8te+YMECORwOHThwQPPnz1d1dbVsNpseeOAB\npaWlafv27Vq8eLF69uypAwcOyOv1as6cORo4cKC8Xq+ef/55/eMf/1BjY6NuvvlmzZw5Uw6HQykp\n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\n0JIlS7Ro0SLV1dXJ5/Np0aJF6t69u+6//37l5ORo1KhRCg0NVXR0tP/tjsrKSlVVVen2229v1fOL\ntmczvsoQA0CbWLp0qSorKzVv3rz2LuUbYfLkyXryySf13e9+t71L+dpZunSpunbtqoyMjPYuBQGY\nOqJ//fXX/dNPdXV12rt3r1599VUtWLBAQUFB6t27t/Ly8mSz2VRYWKh169YpJCREU6ZMUXJysmpr\na5Wdna2qqirZ7Xbl5+crIiLCzJKBK0JLI39cXvPnz9fTTz8d8DMHuLDjx49rz549WrFiRXuXgma0\n2Yh+/vz5io6O1qZNmzRp0iTFx8crLy9PQ4cOVWxsrCZNmqSioiLV1dUpPT1dr732mlavXi2Px6Op\nU6fqzTff1AcffKCZM2e2RbkAAFhCm3wYb9euXfrkk080duxYffTRR4qPj5ckJSUlqaSkRLt27VJc\nXJxCQ0PlcDjUq1cv7du3Tzt27PB/9Wjo0KHaunVrW5QLAIBltEnQv/TSS5o6daqkpp+gttvtcrlc\ncrvdcjqdTdrdbrfcbrfsdnuTdQEAQOuZHvQ1NTX69NNPNWDAgDM7POd70G63W+Hh4XI4HPJ4PP52\nj8cjp9PZpN3j8Sg8PLzZffG5QgAAmjL963Xvv/++Bg0a5H8cHR2t0tJSDRgwQMXFxUpISFBMTIwW\nL14sr9eruro6HTx4UH369FFcXJyKi4sVExOj4uLiFq+mZbPZVFHBqN9MkZFO+rgN0M/mo4/NRx+b\nLzLS2eI6pgf9p59+qp49e/of5+bmavbs2aqvr1dUVJRSU1Nls9l03333KSMjQz6fT1lZWQoLC1N6\nerpycnKUkZGhsLAwFRQUmF0uAACWYrnv0XP2aC7O0NsG/Ww++th89LH5WjOi5xK4AABYGEEPAICF\nEfQAAFgYQQ8AgIUR9AAAWBhBDwCAhRH0AABYGEEPAICFEfQAAFgYQQ8AgIUR9AAAWBhBDwCAhRH0\nAABYGEEPAICFEfQAAFgYQQ8AgIWFtHcB+PowDEPV1dWqqXE1u57TGS6bzdZGVQEAmkPQo9Vcrhq9\ntbVMPiPwy+b0KY/uGniTwsO7tGFlAIBACHp8JZ072+VTWHuXAQBoJd6jBwDAwgh6AAAsjKAHAMDC\nCHoAACyMoAcAwMIIegAALIygBwDAwgh6AAAsjKAHAMDCCHoAACyMoAcAwMIIegAALIygBwDAwgh6\n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\ncLlrAy5zu2tVUeEi6C9STc2ZWZXm+viUp06VlS55vXyh42K11M/08eURGelURQUzhWaij83XmhOp\nNgl6m80mScrNzdXs2bNVX1+vqKgopaamymaz6b777lNGRoZ8Pp+ysrIUFham9PR05eTkKCMjQ2Fh\nYSooKGiLUgEAsBSbYaFP9RS9u1uNAd7XlCR3daWGJ0Qzor9INTXV2nmoSj4F7r9THpcSv/tt3j++\nBC31M318eTDaNB99bL7WjOiZ+wMAwMIIegAALIygBwDAwgh6AAAsjKAHAMDCCHoAACyMoAcAwMII\negAALIygBwDAwgh6AAAsjKAHAMDCCHoAACyMoAcAwMIIegAALIygBwDAwgh6AAAsjKAHAMDCCHoA\nACyMoAcAwMIIegAALIygBwDAwgh6AAAsjKAHAMDCCHoAACyMoAcAwMIIegAALIygBwDAwgh6AAAs\njKAHAMDCCHoAACyMoAcAwMIIegAALIygBwDAwgh6AAAsLKS9CwCAtmYYhqqrq1VT42p2PaczXDab\nrY2qAsxB0AP4xnG5avTW1jL5jMB/Ak+f8uiugTcpPLxLG1YGXH5XdND7fD7NnTtX+/fvV2hoqBYs\nWKCePXu2d1kALKBzZ7t8CmvvMgDTXdHv0b/77ruqr6/X2rVrNX36dOXn57d3SQAAfK1c0SP6HTt2\naOjQoZKk2NhY7d69u50rAgC0Bp+DuHJc0UHvdrvlcDj8j4ODg+Xz+RQUdOGJiDpPlbz1gbdXf9ot\nl8ul0NAr+rCvWC5XjU6d8shn1AVc5/Qpj1yumjasynpa6mf6+NLxWjafy1Wj0o+PqdEXeOK4tva0\n7rj9Bjmd4W1YmbVERjpbXOeKTjyHwyGPx+N/3FzIS1L6j5PaoqxvtNtua+8KvhnoZ/PRx+a77bab\n27sE6Ap/jz4uLk7FxcWSpJ07d6pv377tXBEAAF8vNsMwjPYuIhDDMDR37lzt27dPkvTss8/qhhtu\naOeqAAD4+riigx4AAFyaK3rqHgAAXBqCHgAACyPoAQCwMEsEvc/n05w5c3TvvfcqMzNT//rXv9q7\nJMv68MMPlZmZ2d5lWFJ9fb2ys7M1fvx4jR07Vps2bWrvkiynsbFRM2bMUHp6ujIyMnTgwIH2LsnS\nPv/8cw0bNkyHDx9u71IsafTo0crMzFRmZqZ+/vOfB1zviv4efWude6ncDz/8UPn5+VqxYkV7l2U5\nL7/8st544w3Z7fb2LsWSNmzYoIiICC1atEjV1dVKS0tTSkpKe5dlKe+9956CgoK0Zs0alZaWavHi\nxfytMEl9fb3mzJmjTp06tXcpllRXd+ZiT6tWrWpxXUuM6LlUbtvo1auXli1bJr6oYY7U1FQ9/vjj\nks7MUgUHB7dzRdZz5513av78+ZKkf//73+rShTvTmeW5555Tenq6IiMj27sUS9q7d69Onz6tyZMn\na+LEifrwww8DrmuJoA90qVxcXsOHDyd8TNS5c2fZ7Xa53W498cQT+tnPftbeJVlScHCwcnNz9cwz\nz2jkyJHtXY4lFRUVKSIiQomJiZLE4MAEnTp10uTJk/XKK69o3rx5mj59esDcs0TQf9VL5QJXquPH\nj2vixIlKS0vTiBEj2rscy8rPz9dbb72l2bNnq7a2tr3LsZyioiKVlJQoMzNTe/fuVW5uriorK9u7\nLEu5/vrrdffdd/v/f9VVV6miouKC61oiDblULqygsrJSkyZNUnZ2tn7yk5+0dzmWtH79er300kuS\npI4dO8pmszEoMMHvf/97rVq1SqtWrVK/fv20cOFCdevWrb3LspSioiL/rdvLy8vldrsDvk1iiQ/j\n3XXXXdqyZYvuvfdeSWculQvzcEtJc7z44otyuVxavny5li9fLkn61a9+pQ4dOrRzZdaRmpqq3Nxc\nTZgwQQ0NDZo5c6bCwsLauyzgK7vnnns0Y8YMjR8/XtKZ3At00solcAEAsDDmrAAAsDCCHgAACyPo\nAQCwMIIeAAALI+gBALAwgh4AAAsj6IEr0NGjR9WvXz+VlJQ0aU9JSdGxY8cuefspKSk6efLkJW+n\nOceOHVNqaqrGjBnT5MqVknTo0CE98sgjGjVqlEaNGqWnnnpKX3zxhan1AN9UBD1whQoJCdGsWbPO\nC8nLxexLaJSWluqWW27Ra6+91uSOh+Xl5Zo4caLuvfdebdiwQRs2bFCfPn00depUU+sBvqkscWU8\nwIquueYaJSYmauHChf47rp21fft2LVu2zH+LytzcXA0cOFADBgzQo48+qp49e2r//v269dZbNWDA\nAL3++uuqrq7WsmXLFBUVJUl6/vnntWfPHnXo0EHPPPOMbrrpJlVWViovL0/Hjx9XUFCQnnrqKSUk\nJGjp0qXauXOnPvvsM02YMEHp6en+Wg4fPqw5c+aourpanTt31syZMxUaGqpf/vKXOnXqlObOnau5\nc+f611+zZo0SExOVnJzsb3vwwQd13XXXqbGxUV6vV7NmzdL+/ftls9k0adIkpaWlqaioSJs3b9aJ\nEyf8JwvHjh3Ttm3bdNVVV+lXv/qVTpw4oWnTpunaa69VWVmZunfvrkWLFqlz5876+c9/rk8++USS\nlJGRobFjx5r0zAFXFkb0wBXsP//zP/X3v//9vCn8L7PZbLLZbDIMQ/v379djjz2mv/zlL9q1a5eO\nHTumtWvXasSIESosLPT/TO/evfX6669rypQpys3NlSQtWLBAY8aMUVFRkVasWKE5c+b4ZxTq6+v1\n5z//uUnIS1J2drYmTpyoN954QzNmzNATTzyhG2+8UY8//rhSUlKahLx05vaasbGxTdqCgoL0ox/9\nSMHBwVq6dKkiIiK0YcMG/fa3v9WyZcu0b98+SdLu3bv1yiuvaPXq1crPz9ewYcP0xhtvSJL+9re/\n+bf/4IMP6k9/+pOioqL8Jyk1NTV6/fXX9Zvf/EY7duz4is8E8PVF0ANXMIfDoaeffvorTeF369ZN\n/fr1k81m07e+9S0NGjRIktS9e3fV1NT417vnnnskScOGDVNZWZncbrdKSkq0ZMkSpaWl6aGHHlJj\nY6PKyspks9nOC2dJ8ng8Kisr05133ilJio2NVZcuXXT48OGAbw3YbLZmbyO9fft2f21XX321vv/9\n76u0tFQ2m03f+973ZLfb1b17d0lSQkKCJKlHjx5yuVyy2Wzq06eP4uLiJElpaWnavn27evfurcOH\nD2vy5Ml64403NH369Fb1JWAFBD1whRsyZIiGDBniv1OVdP6Nherr6/3/Dw0NbbIsJOTC79AFBwef\nt55hGPrd736n9evXa/369VqzZo369OkjSRe8uY5hGOcFumEY8vl8AW9+dOutt2r37t1N2nw+n6ZO\nnarPP//8vG36fD41NjZK0nk3oLnQTTzOPS6fz6fg4GBdddVV+tOf/qTMzEwdPnxYo0ePlsvlumB9\ngNUQ9MDXQE5OjrZs2aITJ05IOjPSLSsrk9fr1cmTJ/XPf/7zK29zw4YNkqR33nlHN954ozp27KhB\ngwZp9erVkqQDBw7o7rvv1unTpwOOzh0Oh6677jq98847ks7cJrqyslK9e/cO+DPjxo3TX//6V/31\nr3+VdObEYMWKFfriiy/UtWtXDRw4UH/84x8lSVVVVdq4caMGDhzY4ocHz54g7N+/X/v375ckvfba\naxo2bJg2b96s7OxsJScna+bMmercubM+++yzr9hjwNcTH8YDrlDnjojPTuH/9Kc/lXTm/fVhw4Zp\nxIgR6tGjh/r37+//mUAj6S+379+/X2lpaXI6nVq4cKEkadasWZozZ47uvvtuGYah559/Xna7vdlb\nEy9atEh5eXlasmSJOnTooGXLlikkJCTgz3Tr1k0vv/yynnvuOT3//PPy+Xy65ZZb/LfmfeyxxzRv\n3jyNGjVKPp9PU6ZMUXR0tPbu3dvs8Zw99oiICL3wwgsqKytTv379NH36dIWEhOgvf/mLRowYoQ4d\nOugHP/iBevfuHfCYACvhNrUALOPo0aN68MEH9T//8z/tXQpwxWDqHoClNDf7AHwTMaIHAMDCGNED\nAGBhBD0AABZG0AMAYGEEPQAAFkbQAwBgYQQ9AAAW9n9dww2EeebmrQAAAABJRU5ErkJggg==\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd6a66983d0>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(closed_chrome_issues_monorail[\"num_components\"],  \"Number of Component Per Issue(Closed Issues)\", \"Number of Comps\", \"Count\")"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 69,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "count    12381.000000\n",
+       "mean         0.725305\n",
+       "std          0.663298\n",
+       "min          0.000000\n",
+       "25%          0.000000\n",
+       "50%          1.000000\n",
+       "75%          1.000000\n",
+       "max          5.000000\n",
+       "Name: num_components, dtype: float64"
+      ]
+     },
+     "execution_count": 69,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "closed_chrome_issues_monorail[\"num_components\"].describe()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 70,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "closed_chrome_with_comps = closed_chrome_issues_monorail[closed_chrome_issues_monorail[\"num_components\"] > 0]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 71,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Number of Closed Issues with Components (opened after 2/18/2016) 7672\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(\"Number of Closed Issues with Components (opened after 2/18/2016)\", closed_chrome_with_comps.shape[0])"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 72,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Number of Closed Issues with no Components (opened after 2/18/2016) 4709\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(\"Number of Closed Issues with no Components (opened after 2/18/2016)\", np.sum(closed_chrome_issues_monorail[\"num_components\"] == 0))"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 73,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "no_comps_with_updates = closed_chrome_issues_monorail[(closed_chrome_issues_monorail[\"num_comp_updates\"] > 0) & (closed_chrome_issues_monorail[\"num_components\"] == 0)]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 74,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "Number of Issues that were asigned a componet but were closed with no componet: 27\n"
+     ]
+    }
+   ],
+   "source": [
+    "print(\"Number of Issues that were asigned a componet but were closed with no componet:\", no_comps_with_updates.shape[0])"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 75,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "<matplotlib.axes.AxesSubplot at 0x7fd684fae6d0>"
+      ]
+     },
+     "execution_count": 75,
+     "metadata": {},
+     "output_type": "execute_result"
+    },
+    {
+     "data": {
+      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAesAAAFkCAYAAAAAFROsAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X90VPWd//HX5Mc0MD+QHAbX7WqsLGFhIXRTQhckAanQ\nuLRbFBBnQugKCrIFrdnlJBIBg/WYYintLj9ru9s9gY1wjrOesgfXKkhnS6iURfkhJa45qNWybEI0\nzL2YmZCZ7x98nQUkyQUJ+Zg8H38l996Z+/68j+Z1P58Z7nUlk8mkAACAsdJ6ugAAANA5whoAAMMR\n1gAAGI6wBgDAcIQ1AACGI6wBADCco7A+ffq0Jk6cqBMnTujYsWMqLCxUaWmpSktL9eKLL0qStm/f\nrhkzZmj27Nnas2ePJKm1tVVLlixRSUmJFixYoObm5m4bCAAAvZWrq39n3dbWpu9+97tqaGjQhg0b\n9F//9V+yLEv3339/6pjGxkbNmzdP4XBYsVhMwWBQzz//vLZu3SrbtrV48WLt3LlTr7/+uiorK7t9\nUAAA9CZdzqxXr16tYDCoQCAgSXrzzTe1Z88ezZkzR5WVlbJtW4cPH1Z+fr4yMzPl9XqVk5Oj+vp6\nHTx4UEVFRZKkwsJC7du3r3tHAwBAL9RpWIfDYWVnZ2vChAmpbXl5eSovL9eWLVt08803a926dbJt\nWz6fL3WMx+ORZVmyLEsejye1LRqNdtMwAADovboM67q6OpWWlur48eOqqKhQUVGRRowYIUmaMmWK\nfve738nr9cq27dTrPgnvC7fbti2/399lQdz9FACAi2V0tnPLli2pn0tLS1VVVaXvfOc7qqysVF5e\nnurq6jRy5Ejl5eVp7dq1isfjisViamhoUG5urvLz8xWJRJSXl6dIJKIxY8Z0WZDL5VJjIzPwrgQC\nPvrkEL1yhj45R6+coU/OBAK+Lo/pNKwv5XK5VFVVpaqqKmVkZGjw4MFatWqVPB6P5s6dq1AopEQi\nobKyMrndbgWDQZWXlysUCsntdmvNmjVXPRgAAPqqLr8N3hO4EusaV6zO0Stn6JNz9MoZ+uSMk5k1\nN0UBAMBwhDUAAIYjrAEAMBxhDQCA4QhrAAAMR1gDAGA4whoAAMNd0U1RroeXfnVAZ+1zHe4/dy6m\nwrGjlZ6efh2rAgCg5xgX1nZbltozOy7LOtuk9vZ2whoA0GewDA4AgOEIawAADEdYAwBgOMIaAADD\nEdYAABiOsAYAwHCENQAAhiOsAQAwHGENAIDhCGsAAAxHWAMAYDjCGgAAwxHWAAAYjrAGAMBwhDUA\nAIYjrAEAMBxhDQCA4RyF9enTpzVx4kSdOHFC7777roLBoEpKSvTEE08omUxKkrZv364ZM2Zo9uzZ\n2rNnjySptbVVS5YsUUlJiRYsWKDm5uZuGwgAAL1Vl2Hd1tamFStWqF+/fkomk3r66adVVlamrVu3\nKplMateuXWpsbFRNTY2ee+45/exnP9OaNWsUj8dVW1urYcOGaevWrZo+fbo2btx4PcYEAECv0mVY\nr169WsFgUIFAQJJ07NgxFRQUSJKKiopUV1enI0eOKD8/X5mZmfJ6vcrJyVF9fb0OHjyooqIiSVJh\nYaH27dvXjUMBAKB36jSsw+GwsrOzNWHCBElSMplMLXtLksfjUTQalWVZ8vl8F223LEuWZcnj8Vx0\nLAAAuDIZne0Mh8NyuVyqq6vT8ePHVVFRoQ8//DC137Is+f1+eb1e2bad2m7btnw+30XbbduW3+93\nVJTPm9XxzvYsBQI+ud1uR+/VmwUCvq4PgiR65RR9co5eOUOfro1Ow3rLli2pn0tLS1VVVaXVq1dr\n//79Gjt2rCKRiMaNG6e8vDytXbtW8XhcsVhMDQ0Nys3NVX5+viKRiPLy8hSJRDRmzBhHRUWt1g73\nWVarGhujfT6sAwGfGhtZqXCCXjlDn5yjV87QJ2ecXNB0GtaXcrlcqqio0PLly9XW1qYhQ4aouLhY\nLpdLc+fOVSgUUiKRUFlZmdxut4LBoMrLyxUKheR2u7VmzZqrHgwAAH2VK3nhh9AGCL9yVO3Jjq8h\nrJYmTR03nJk1V6yO0Stn6JNz9MoZ+uSMk5k1N0UBAMBwhDUAAIYjrAEAMBxhDQCA4QhrAAAMR1gD\nAGA4whoAAMMR1gAAGI6wBgDAcIQ1AACGI6wBADAcYQ0AgOEIawAADEdYAwBgOMIaAADDEdYAABiO\nsAYAwHCENQAAhiOsAQAwHGENAIDhCGsAAAxHWAMAYDjCGgAAwxHWAAAYjrAGAMBwhDUAAIbL6OqA\n9vZ2Pf7443rnnXfkcrlUVVWltrY2LVy4ULfeeqskKRQK6a677tL27du1bds2ZWRkaNGiRZo0aZJa\nW1u1dOlSNTc3y+PxqLq6WtnZ2d09LgAAeo0uw/rVV19VWlqaamtrtX//fq1du1Z33HGH5s2bp/vv\nvz91XGNjo2pqahQOhxWLxRQMBjV+/HjV1tZq2LBhWrx4sXbu3KmNGzeqsrKyWwcFAEBv0mVY33nn\nnbrjjjskSR988IH8fr/efPNNnThxQrt27VJOTo6WLVumw4cPKz8/X5mZmcrMzFROTo7q6+t18OBB\nPfjgg5KkwsJCbdiwoXtHBABAL9NlWEtSenq6Kioq9Morr+jHP/6xTp06pXvvvVcjRozQpk2btG7d\nOg0fPlw+ny/1Go/HI8uyZFmWPB5Pals0Gu2ekQAA0Es5CmtJqq6uVlNTk+69917V1tbqxhtvlCRN\nmTJFTz75pAoKCmTbdup427bl8/nk9XpT223blt/v7/JcPm9WxzvbsxQI+OR2u52W3msFAr6uD4Ik\neuUUfXKOXjlDn66NLsP6hRde0KlTp7Rw4UJlZWXJ5XJpyZIlevzxx5WXl6e6ujqNHDlSeXl5Wrt2\nreLxuGKxmBoaGpSbm6v8/HxFIhHl5eUpEolozJgxXRYVtVo73GdZrWpsjPb5sA4EfGpsZJXCCXrl\nDH1yjl45Q5+ccXJB02VYFxcXq6KiQnPmzNG5c+dUWVmpP/7jP1ZVVZUyMjI0ePBgrVq1Sh6PR3Pn\nzlUoFFIikVBZWZncbreCwaDKy8sVCoXkdru1Zs2aazI4AAD6ClcymUz2dBEXCr9yVO3Jjq8hrJYm\nTR03nJk1V6yO0Stn6JNz9MoZ+uSMk5k1N0UBAMBwhDUAAIYjrAEAMBxhDQCA4QhrAAAMR1gDAGA4\nwhoAAMMR1gAAGI6wBgDAcIQ1AACGI6wBADAcYQ0AgOEIawAADEdYAwBgOMIaAADDEdYAABiOsAYA\nwHCENQAAhiOsAQAwHGENAIDhCGsAAAxHWAMAYDjCGgAAwxHWAAAYjrAGAMBwhDUAAIbL6OqA9vZ2\nPf7443rnnXfkcrlUVVUlt9utiooKpaWlaejQoVq5cqVcLpe2b9+ubdu2KSMjQ4sWLdKkSZPU2tqq\npUuXqrm5WR6PR9XV1crOzr4eYwMAoFfoMqxfffVVpaWlqba2Vvv379cPf/hDSVJZWZkKCgq0cuVK\n7dq1S6NHj1ZNTY3C4bBisZiCwaDGjx+v2tpaDRs2TIsXL9bOnTu1ceNGVVZWdvvAAADoLboM6zvv\nvFN33HGHJOmDDz7QgAEDVFdXp4KCAklSUVGR9u7dq7S0NOXn5yszM1OZmZnKyclRfX29Dh48qAcf\nfFCSVFhYqA0bNnTjcAAA6H0cfWadnp6uiooKPfXUU/rmN7+pZDKZ2ufxeBSNRmVZlnw+30XbLcuS\nZVnyeDwXHQsAAJzrcmb9ierqajU1NWnWrFmKx+Op7ZZlye/3y+v1yrbt1HbbtuXz+S7abtu2/H5/\nl+fyebM63tmepUDAJ7fb7bT0XisQ8HV9ECTRK6fok3P0yhn6dG10GdYvvPCCTp06pYULFyorK0tp\naWkaOXKk9u/fr7FjxyoSiWjcuHHKy8vT2rVrFY/HFYvF1NDQoNzcXOXn5ysSiSgvL0+RSERjxozp\nsqio1drhPstqVWNjtM+HdSDgU2MjqxRO0Ctn6JNz9MoZ+uSMkwuaLsO6uLhYFRUVmjNnjs6dO6fK\nykrddtttWr58udra2jRkyBAVFxfL5XJp7ty5CoVCSiQSKisrk9vtVjAYVHl5uUKhkNxut9asWXNN\nBgcAQF/hSl74AbQBwq8cVXuy42sIq6VJU8cNZ2bNFatj9MoZ+uQcvXKGPjnjZGbNTVEAADAcYQ0A\ngOEIawAADEdYAwBgOMIaAADDEdYAABiOsAYAwHCENQAAhiOsAQAwHGENAIDhCGsAAAxHWAMAYDjC\nGgAAwxHWAAAYjrAGAMBwHT84GkZJJpOKRs+kfne7Ezpz5tPPifX5/HK5XNezNABANyOsPyei0TN6\n+bW31a+/R5Lk9TTLsmMXHfPxWVtTvvqn8vsH9ESJAIBuQlh/jvTr71F/j0+S5PFmKaHWHq4IAHA9\n8Jk1AACGI6wBADAcYQ0AgOEIawAADEdYAwBgOMIaAADDEdYAABiOsAYAwHCENQAAhuv0DmZtbW1a\ntmyZ/vCHPygej2vRokX6oz/6Iy1cuFC33nqrJCkUCumuu+7S9u3btW3bNmVkZGjRokWaNGmSWltb\ntXTpUjU3N8vj8ai6ulrZ2dnXY1wAAPQanYb1jh07lJ2drWeeeUYtLS361re+pe985zuaN2+e7r//\n/tRxjY2NqqmpUTgcViwWUzAY1Pjx41VbW6thw4Zp8eLF2rlzpzZu3KjKyspuHxQAAL1Jp8vgxcXF\nevjhhyVJiURCGRkZevPNN7Vnzx7NmTNHlZWVsm1bhw8fVn5+vjIzM+X1epWTk6P6+nodPHhQRUVF\nkqTCwkLt27ev+0cEAEAv0+nMun///pIky7L0yCOP6NFHH1UsFtO9996rESNGaNOmTVq3bp2GDx8u\nn8+Xep3H45FlWbIsSx6PJ7UtGv30Ix0vx+fN6nhne5YCAZ/cbrej9+ot3O6EvJ5meS7ozaV9SlNc\ngwb5NGCA79KX93mBAD1xgj45R6+coU/XRpdP3Tp58qQWL16skpISTZs2TdFoNBXMU6ZM0ZNPPqmC\nggLZtp16jW3b8vl88nq9qe22bcvv9zsqKmp1/DQpy2pVY2O0z4X1mTNRWXYs9aQtnzfrU306a8fU\n1BRVPM73Bi8UCPjU2OjsQrEvo0/O0Stn6JMzTi5oOv2r3tTUpHnz5mnp0qW65557JEkPPPCADh8+\nLEmqq6vTyJEjlZeXpwMHDigejysajaqhoUG5ubnKz89XJBKRJEUiEY0ZM+azjgkAgD6n05n1pk2b\nFI1GtX79eq1fv16StGzZMj399NPKyMjQ4MGDtWrVKnk8Hs2dO1ehUEiJREJlZWVyu90KBoMqLy9X\nKBSS2+3WmjVrrsugAADoTVzJZDLZ00VcKPzKUbUnO76GsFqaNHXc8D64DN6iXx85qf6e88sll18G\nj2rCqJvk9w/oiRKNxVKcM/TJOXrlDH1y5jMvgwMAgJ5HWAMAYDjCGgAAwxHWAAAYjrAGAMBwhDUA\nAIYjrAEAMBxhDQCA4QhrAAAMR1gDAGA4whoAAMMR1gAAGI6wBgDAcIQ1AACGI6wBADAcYQ0AgOEI\nawAADEdYAwBgOMIaAADDEdYAABiOsAYAwHCENQAAhiOsAQAwHGENAIDhCGsAAAxHWAMAYLiMzna2\ntbVp2bJl+sMf/qB4PK5FixZpyJAhqqioUFpamoYOHaqVK1fK5XJp+/bt2rZtmzIyMrRo0SJNmjRJ\nra2tWrp0qZqbm+XxeFRdXa3s7OzrNTYAAHqFTsN6x44dys7O1jPPPKOWlhZ961vf0vDhw1VWVqaC\nggKtXLlSu3bt0ujRo1VTU6NwOKxYLKZgMKjx48ertrZWw4YN0+LFi7Vz505t3LhRlZWV12tsAAD0\nCp0ugxcXF+vhhx+WJCUSCWVkZOjYsWMqKCiQJBUVFamurk5HjhxRfn6+MjMz5fV6lZOTo/r6eh08\neFBFRUWSpMLCQu3bt6+bhwMAQO/T6cy6f//+kiTLsvTII4/ou9/9rr7//e+n9ns8HkWjUVmWJZ/P\nd9F2y7JkWZY8Hs9Fxzrh82Z1vLM9S4GAT26329F79RZud0JeT7M8F/Tm0j6lKa5Bg3waMMB36cv7\nvECAnjhBn5yjV87Qp2uj07CWpJMnT2rx4sUqKSnRN77xDT3zzDOpfZZlye/3y+v1yrbt1HbbtuXz\n+S7abtu2/H6/o6KiVmuH+yyrVY2N0T4X1mfORGXZMSV0vjc+b9an+nTWjqmpKap4nO8NXigQ8Kmx\n0dmFYl9Gn5yjV87QJ2ecXNB0+le9qalJ8+bN09KlS3XPPfdIkoYPH679+/dLkiKRiMaMGaO8vDwd\nOHBA8Xhc0WhUDQ0Nys3NVX5+viKRyEXHAgCAK9PpzHrTpk2KRqNav3691q9fL0mqrKzUU089pba2\nNg0ZMkTFxcVyuVyaO3euQqGQEomEysrK5Ha7FQwGVV5erlAoJLfbrTVr1lyXQQEA0Ju4kslksqeL\nuFD4laNqT3Z8DWG1NGnquOF9cBm8Rb8+clL9PeeXSy6/DB7VhFE3ye8f0BMlGoulOGfok3P0yhn6\n5MxnXgYHAAA9j7AGAMBwhDUAAIYjrAEAMBxhDQCA4QhrAAAMR1gDAGA4whoAAMMR1gAAGI6wBgDA\ncIQ1AACGI6wBADAcYQ0AgOEIawAADEdYAwBgOMIaAADDEdYAABiOsAYAwHCENQAAhiOsAQAwHGEN\nAIDhCGsAAAxHWAMAYDjCGgAAwxHWAAAYjrAGAMBwjsL60KFDKi0tlSQdO3ZMRUVFKi0tVWlpqV58\n8UVJ0vbt2zVjxgzNnj1be/bskSS1trZqyZIlKikp0YIFC9Tc3Nw9owAAoBfL6OqAZ599Vr/4xS/k\n8XgkSW+++abuv/9+3X///aljGhsbVVNTo3A4rFgspmAwqPHjx6u2tlbDhg3T4sWLtXPnTm3cuFGV\nlZXdNxoAAHqhLmfWOTk5WrdunZLJpCTp6NGj2rNnj+bMmaPKykrZtq3Dhw8rPz9fmZmZ8nq9ysnJ\nUX19vQ4ePKiioiJJUmFhofbt29e9owEAoBfqcmY9depUvf/++6nfR48erdmzZ2vEiBHatGmT1q1b\np+HDh8vn86WO8Xg8sixLlmWlZuQej0fRaNRRUT5vVsc727MUCPjkdrsdvVdv4XYn5PU0y3NBby7t\nU5riGjTIpwEDfJe+vM8LBOiJE/TJOXrlDH26NroM60tNmTIlFcxTpkzRk08+qYKCAtm2nTrGtm35\nfD55vd7Udtu25ff7HZ0jarV2uM+yWtXYGO1zYX3mTFSWHVNC53vj82Z9qk9n7ZiamqKKx/ne4IUC\nAZ8aG51dKPZl9Mk5euUMfXLGyQXNFf9Vf+CBB3T48GFJUl1dnUaOHKm8vDwdOHBA8Xhc0WhUDQ0N\nys3NVX5+viKRiCQpEolozJgxV3o6AAD6PMcza5fLJUmqqqpSVVWVMjIyNHjwYK1atUoej0dz585V\nKBRSIpFQWVmZ3G63gsGgysvLFQqF5Ha7tWbNmm4bCAAAvZUr+ck3xwwRfuWo2pMdX0NYLU2aOm54\nH1wGb9Gvj5xUf8/55ZLLL4NHNWHUTfL7B/REicZiKc4Z+uQcvXKGPjnTLcvgAADg+iKsAQAwHGEN\nAIDhCGsAAAxHWAMAYDjCGgAAwxHWAAAYjrAGAMBwhDUAAIYjrAEAMBxhDQCA4QhrAAAMR1gDAGA4\nwhoAAMMR1gAAGI6wBgDAcIQ1AACGI6wBADAcYQ0AgOEIawAADEdYAwBgOMIaAADDEdYAABiOsAYA\nwHCENQAAhiOsAQAwnKOwPnTokEpLSyVJ7777roLBoEpKSvTEE08omUxKkrZv364ZM2Zo9uzZ2rNn\njySptbVVS5YsUUlJiRYsWKDm5ubuGQUAAL1Yl2H97LPP6vHHH1dbW5sk6emnn1ZZWZm2bt2qZDKp\nXbt2qbGxUTU1NXruuef0s5/9TGvWrFE8Hldtba2GDRumrVu3avr06dq4cWO3DwgAgN6my7DOycnR\nunXrUjPoY8eOqaCgQJJUVFSkuro6HTlyRPn5+crMzJTX61VOTo7q6+t18OBBFRUVSZIKCwu1b9++\nbhwKAAC9U5dhPXXqVKWnp6d+/yS0Jcnj8SgajcqyLPl8vou2W5Yly7Lk8XguOhYAAFyZjCt9QVra\n/+W7ZVny+/3yer2ybTu13bZt+Xy+i7bbti2/3+/oHD5vVsc727MUCPjkdruvtPTPNbc7Ia+nWZ4L\nenNpn9IU16BBPg0Y4Lv05X1eIEBPnKBPztErZ+jTtXHFYT18+HDt379fY8eOVSQS0bhx45SXl6e1\na9cqHo8rFoupoaFBubm5ys/PVyQSUV5eniKRiMaMGePoHFGrtcN9ltWqxsZonwvrM2eisuyYEjrf\nG58361N9OmvH1NQUVTzOl/wvFAj41NjIqk5X6JNz9MoZ+uSMkwsax2HtcrkkSRUVFVq+fLna2to0\nZMgQFRcXy+Vyae7cuQqFQkokEiorK5Pb7VYwGFR5eblCoZDcbrfWrFlz9aMBAKCPciUv/BDaAOFX\njqo92fE1hNXSpKnjhvfBmXWLfn3kpPp7zl+BXX5mHdWEUTfJ7x/QEyUai6t7Z+iTc/TKGfrkjJOZ\nNeulAAAYjrAGAMBwhDUAAIYjrAEAMBxhDQCA4QhrAAAMR1gDAGA4whoAAMMR1gAAGI6wBgDAcIQ1\nAACGI6wBADAcYQ0AgOEIawAADEdYAwBgOMIaAADDEdYAABiOsAYAwHCENQAAhiOsAQAwHGENAIDh\nCGsAAAxHWAMAYDjCGgAAwxHWAAAYjrAGAMBwGVf7wrvvvlter1eSdPPNN2vhwoWqqKhQWlqahg4d\nqpUrV8rlcmn79u3atm2bMjIytGjRIk2aNOla1Q4AQJ9wVWEdi8UkSTU1NaltDz30kMrKylRQUKCV\nK1dq165dGj16tGpqahQOhxWLxRQMBjV+/Hi53e5rUz0AAH3AVYX18ePH9fHHH2v+/Pk6d+6cHn30\nUR07dkwFBQWSpKKiIu3du1dpaWnKz89XZmamMjMzlZOTo/r6eo0aNeqaDgIAgN7sqsK6X79+mj9/\nvmbNmqV33nlHDzzwwEX7PR6PotGoLMuSz+e7aLtlWZ+tYgAA+pirCutbb71VOTk5qZ9vuOEG/e53\nv0vttyxLfr9fXq9Xtm2nttu2Lb/f3+X7+7xZHe9sz1Ig4OtzS+lud0JeT7M8F/Tm0j6lKa5Bg3wa\nMMB36cv7vECAnjhBn5yjV87Qp2vjqsI6HA6rvr5eK1eu1KlTp2Tbtm6//Xbt379fY8eOVSQS0bhx\n45SXl6e1a9cqHo8rFoupoaFBQ4cO7fL9o1Zrh/ssq1WNjdE+F9ZnzkRl2TEldL43Pm/Wp/p01o6p\nqSmqeJwv+V8oEPCpsTHa02UYjz45R6+coU/OOLmguaqwnjlzph577DGVlJRIkp5++mndcMMNWr58\nudra2jRkyBAVFxfL5XJp7ty5CoVCSiQSKisr63MhCwDAZ3VVYZ2RkaFnnnnmU9sv/Hb4J2bNmqVZ\ns2ZdzWkAx5LJpKLRM5fd53YndObM+at7n88vl8t1PUsDgM/sqv+dNWCSaPSMXn7tbfXr7/nUPq+n\nWZYd08dnbU356p/K7x/QAxUCwNUjrNFr9OvvUX/Ppz/78XizUp/1A8DnEd9EAgDAcIQ1AACGI6wB\nADAcYQ0AgOEIawAADEdYAwBgOMIaAADDEdYAABiOsAYAwHCENQAAhiOsAQAwHGENAIDhCGsAAAxH\nWAMAYDjCGgAAwxHWAAAYLqOnCwDQ85LJpFpaWnTmTLTT43w+v1wu13WqCsAnCGsAikbP6KV9v1ci\n2fGfhI/P2pry1T+V3z/gOlYGQCKsAfx//ft7lJC7p8sAcBl8Zg0AgOEIawAADEdYAwBgOMIaAADD\nEdYAABiu278Nnkgk9MQTT+itt95SZmamnnrqKd1yyy3dfVoAAHqNbg/rV155RW1tbXruued06NAh\nVVdXa8OGDd19WgC4ZpLJpKLRM6nf3e7EZW8gw01j0F26PawPHjyowsJCSdLo0aN19OjR7j4lAFxT\n0egZvfza2+rX3yNJ8nqaZdmxi47hpjHoTt0e1pZlyev1pn5PT09XIpFQWtrlPy5vb/1IsXjH75eI\nW4pGo8rM7Fv3c4lGz+jjs3bq9zTFdfYyfywuvPrvSy7tz4U+6VVf7k9XotEzOnvWViIZ6/CYvtw/\np+Puq/3pSEcrELhYIODr8phuTzyv1yvb/r8/op0FtSTN+saE7i7pc+vLXx7R0yUYjf58Nl/+ck9X\nYDb++7o6Awaw0nAtdPu3wfPz8xWJRCRJb7zxhoYNG9bdpwQAoFdxJZPJZHeeIJlM6oknnlB9fb0k\n6emnn9aXvvSl7jwlAAC9SreHNQAA+Gy4KQoAAIYjrAEAMBxhDQCA4QhrAAAMZ0xYJxIJrVixQvfd\nd59KS0v13nvv9XRJRjt06JBKS0t7ugxjtbW1aenSpSopKdGsWbO0e/funi7JWO3t7XrssccUDAYV\nCoX03//93z1dktFOnz6tiRMn6sSJEz1ditHuvvtulZaWqrS0VMuWLevpcoy1efNm3XfffZoxY4b+\n7d/+rcPjjLkNGPcQd+7ZZ5/VL37xC3k8np4uxVg7duxQdna2nnnmGbW0tGj69OmaPHlyT5dlpFdf\nfVVpaWmqra3V/v37tXbtWv7f60BbW5tWrFihfv369XQpRovFzt8Jr6ampocrMdtrr72m119/Xc89\n95zOnj2rn/70px0ea8zMmnuIO5eTk6N169aJf3XXseLiYj388MOSzq/apKen93BF5rrzzju1atUq\nSdIHH3zAHac6sXr1agWDQQUCgZ4uxWjHjx/Xxx9/rPnz5+vb3/62Dh061NMlGWnv3r0aNmyY/vZv\n/1YPPfRQpxMKY2bWV3oP8b5s6tSpev/993u6DKP1799f0vn/rh555BE9+uijPVyR2dLT01VRUaGX\n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\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd64c67d910>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "sns.distplot(closed_chrome_with_comps[\"num_comp_updates\"], kde=False)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 76,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "def time_of_last_component_1(updates):\n",
+    "    # If there are no comp updates then all comp assignments \n",
+    "    # were assigned during issue creation\n",
+    "    if len(updates) == 0:\n",
+    "        return 0\n",
+    "    # If there is more than one update the time to correct component assignment\n",
+    "    # is the time of the last assignment. Note that this interpretation assumes\n",
+    "    # a correct component assignment as being not just assinging the correct one\n",
+    "    # but also removing any incorrect ones.\n",
+    "    comment_id = updates.iloc[-1][\"comment_id\"]\n",
+    "    return chrome_comment[chrome_comment[\"id\"] == comment_id][\"created\"].values[0]\n",
+    "        "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 77,
+   "metadata": {
+    "collapsed": false,
+    "scrolled": false
+   },
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "0\n",
+      "1000\n",
+      "2000\n",
+      "3000\n",
+      "4000\n",
+      "5000\n",
+      "6000\n",
+      "7000\n"
+     ]
+    }
+   ],
+   "source": [
+    "i = 0\n",
+    "time_to_comp_assignment = dict()\n",
+    "for index, row in closed_chrome_with_comps.iterrows():\n",
+    "    ish_id = row[\"issue_id\"]\n",
+    "    updates = chrome_comp_updates.loc[row[\"comp_updates\"]]\n",
+    "    time = time_of_last_component_1(updates)\n",
+    "    if time == 0:\n",
+    "        time_to_comp_assignment[ish_id] = time\n",
+    "    else:\n",
+    "        time = time - row[\"opened\"]\n",
+    "        time_to_comp_assignment[ish_id] = time\n",
+    "    \n",
+    "    if (i % 1000) == 0:\n",
+    "        print(i)\n",
+    "    i += 1\n",
+    "    "
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Histogram Showing time to correct component assignment"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 78,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "image/png": "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\nr83Pz1N9trAmV+3vavVfbf21Wbe3p1utNYdGXbx3N/Kz97T+srJS9fh526tukH/6xbf6SYtmclz8\n8b+92v7bvd5/m7Wp72pq23+jRq1rPFJjtk9U3dShHxYWJofD4X59tcCXpJQnE+ujLADwG/fff19D\nl3BVdVVf06bmCvea3NS34Y2JiVFubq4kac+ePerQoUMDVwQAgO+yGJdPKt2EDMPQzJkzdfjwYUnS\n/Pnz1bZt2wauCgAA33RThz4AAKg7N/XhfQAAUHcIfQAATILQBwDAJG7qj+zV1s12u966snfvXr36\n6qvKzs7WsWPHlJaWpoCAALVr104ZGRk+excqp9OpqVOn6uTJk6qoqNDYsWMVFRXlN/1VVlZq2rRp\nOnr0qCwWi2bNmqWQkBC/6e+yf/zjH+rXr5/ee+89BQQE+FV/ffv2dd8j5M4779To0aP9qr9ly5bp\n008/ldPp1JAhQxQTE+M3/f3xj39UTk6OJKm8vFyHDh3SH/7wB82bN8/n+3O5XEpPT9fRo0cVEBCg\nOXPmKDAw8Np+doYf2LRpk5GWlmYYhmHs2bPHGDt2bANXdON+//vfG7179zYGDhxoGIZhjB492sjP\nzzcMwzBmzJhhfPLJJw1Z3g358MMPjZdfftkwDMM4f/680a1bN2PMmDF+098nn3xiTJ061TAMw9i1\na5cxZswYv+rPMAyjoqLCGDdunPH4448bR44c8avfz7KyMiM5ObnKmD/195e//MUYPXq0YRiG4XA4\njNdee83vfj8vmzVrlrFu3Tq/6e+zzz4zXnjhBcMwDGPHjh1GamrqNffmF4f3/e12vZIUGRmpxYsX\nu2/T+eWXXyouLk6SlJiYqLy8vIYs74YkJSVpwoQJkn7Ycg0KCvKr/nr16qXZs2dLkk6cOKGmTZvq\nwIEDftOfJC1YsEApKSmKiIiQ5F+/n4cOHVJpaalGjhyp4cOHa8+ePX7V344dO9ShQweNGzdOY8aM\nUc+ePf3u91OS9u3bp6+//loDBgzwm/5CQ0NVUlLyz9sblyg4OPiae/OLw/vXerteX/DYY4/pu+++\nc782rvhkZZMmTVRSUv0tJX1BkyY/3K7VbrfrhRde0IsvvqhXXnmlynRf7k+S+5Db5s2b9dprr2nH\njh3uab7eX05Ojlq0aKFHHnlEy5Ytk2EYfvX72bhxY40cOVIDBgzQ0aNHNWrUqCrTfb2/oqIinTp1\nSsuWLdPx48c1ZswYv/r5XbZs2TKlpqZK8p+/nzExMaqoqFBSUpLOnz+vpUuXavfu3e7ptenNL0L/\nWm/X64uu7MfhcCg83LcfInHq1CmlpqZq8ODB6t27txYuXOie5g/9SVJmZqbOnj2rAQMGqKKiwj3u\n6/3l5OTIYrEoLy9Phw4dUlpams6dO+ee7uv9tWnTRpGRke6vmzVrpoMHD7qn+3p/zZs3V1RUlIKC\ngtS2bVs1atRIZ86ccU/39f4kqbi4WEePHlV8fLwk//n7+c477ygmJka/+c1v9P3332vYsGG6dOmS\ne3ptevOLZDTD7Xo7duyo/Px8SVJubq5iY2MbuKLrd/bsWY0YMUKTJ09Wv379JPlXf+vXr9eyZcsk\n/XA4LiAgQD/96U/9pr+VK1cqOztb2dnZuvfee/XKK6/okUce8Zv+cnJylJmZKUk6ffq0HA6HHn74\nYb/p7+c//7k+//xzST/0V1ZWpi5duvhNf5K0e/dudenSxf3aX/6+lJaWyvrPhx+Fh4fr0qVLuu++\n+66pN7/Y03/00Ue1Y8cOPfPMM5J+uF2vv7h8FWZaWpqmT58up9OpqKgoJSUlNXBl12/p0qUqKSnR\nm2++qTfffFOSlJ6ernnz5vlFf0lJSUpLS9OQIUN06dIlpaen6+677/abn9+/s1gsfvX72b9/f730\n0ksaPHiwpB/+njRr1sxv+uvevbt2796t/v37y+VyKSMjQ61bt/ab/iTp6NGjVT7B5S+/nyNHjtRL\nL72kQYMG6dKlS5o0aZI6dep0Tb1xG14AAEzCLw7vAwAAzwh9AABMgtAHAMAkCH0AAEyC0AcAwCQI\nfQAATMIvPqcP4F9mz56tgoICOZ1OHTt2TPfcc48kadiwYdq4caPmzZvnvmd+XXnllVf061//WsXF\nxRozZowiIyNlGIbKysoUFxenqVOnum+/fKMOHDigDRs2aPLkyXWyPMBM+Jw+4KdOnDihoUOHauvW\nrV5dz6FDh7R8+XItXLhQu3bt0uLFi5WdnS1JunTpkqZOnSrph4f01JVJkyZp9OjRat++fZ0tEzAD\n9vQBP1Xd9nzPnj2VnZ2tXbt2adu2bTpz5oxOnz6t4cOH6+TJk/rLX/6iZs2a6Z133lFISIjWr1+v\nFStWyOVyqVOnTsrIyFBISEiVZb777rt68sknq60hKChIv/3tb9W9e3fNmDFDkjR16lSdOXNGZ86c\nUWxsrBYsWKDJkycrLi5OTz/9tCRp6NChmjx5sr744gutX79eAQEB+tnPfuZ+emGfPn307rvvum+X\nC6B2OKcPmMzlWzvv379fy5cv16pVq5SZmalu3brpT3/6kyTp888/11dffaX3339fa9as0fr169Wi\nRQstX768yrIMw9Bnn3121ft9t2zZUuHh4frmm2/02WefqVOnTlqzZo02btyoPXv26MCBA+rfv797\n3SdOnND58+fVqVMn/f73v1dOTo5ycnIUEBCg06dPS5JiY2P16aefeuPtAfwae/qAyVw+AvDAAw/I\narW6H+CRkJAgSWrdurWKi4u1a9cuHTt2zL337XQ61alTpyrLuvx0vdDQ0Kuu02KxqHHjxnriiSf0\nt7/9Te+9956++eYbnT9/XqWlpYqPj9eZM2d04sQJrV+/Xk8++aQCAwP1wAMP6KmnntIvfvELDR48\nWLfeequkH56saRiGzp8/r2bNmtXdmwP4OUIfMKl/P0z/74+jdrlcSkpK0rRp0yT98NjOysrKKvNY\nLBYFBgZedT2FhYUqKSnRXXfdpezsbH388ccaOHCgHn74YX311VcyDEMWi0XJycn685//rI0bN+rd\nd9+VJL311lvau3evPvvsM40aNUqvvvqq4uLiJP1w6sDfHqENeBv/YgBUKz4+Xps3b1ZRUZEMw9DM\nmTO1YsWKKvM0b95cLpdLpaWl1S6joqJCCxcuVL9+/dSoUSPl5eVp4MCB6t27t6QfLgK8vCHRr18/\nrVmzRq1atVJERISKior0q1/9Su3atdOECRP08MMP6+9//7skyW63yzAMn30uOtBQ2NMH/Njl8/dX\nvr78n6f57r33Xj3//PMaPny4XC6X7rvvPj333HM/WkdiYqLy8/PVrVs3ST9cK5CcnCxJqqysVJcu\nXdwfrxs+fLh746FVq1bq0aOHvvvuO0nSbbfdplatWqlv376SpBYtWujpp59W//79FRoaqtatW7un\n7d69Wz169LjRtwcwHT6yB+CGHDp0SEuWLNFrr712Q8s5ffq0hg0bpj//+c8KDg6+6rwTJkzQ+PHj\n1a5duxtaJ2A2HN4HcEPuvfde3X777Tp48OB1L2Pjxo1KTk7WpEmTPAb+vn371Lp1awIfuA7s6QMA\nYBLs6QMAYBKEPgAAJkHoAwBgEoQ+AAAmQegDAGAShD4AACbx/wGRRf51cGsowwAAAABJRU5ErkJg\ngg==\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd69d32d110>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "histrogram_plot(pd.DataFrame(time_to_comp_assignment.items())[1] / (3600*24), \"Time to assignment\", \"Time (Days)\", \"Number of Issues\")"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 79,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "count    7672.000000\n",
+       "mean        5.716000\n",
+       "std        14.322087\n",
+       "min         0.000000\n",
+       "25%         0.000000\n",
+       "50%         0.000000\n",
+       "75%         1.160851\n",
+       "max        71.252500\n",
+       "Name: 1, dtype: float64"
+      ]
+     },
+     "execution_count": 79,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "(pd.DataFrame(time_to_comp_assignment.items())[1] / (3600*24)).describe()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 80,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "no_comp = closed_chrome_issues_monorail[closed_chrome_issues_monorail[\"num_components\"] == 0]\n",
+    "with_comp = closed_chrome_issues_monorail[closed_chrome_issues_monorail[\"num_components\"] != 0]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 81,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "<matplotlib.legend.Legend at 0x7fd617f5dd90>"
+      ]
+     },
+     "execution_count": 81,
+     "metadata": {},
+     "output_type": "execute_result"
+    },
+    {
+     "data": {
+      "image/png": "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\nPaPnhDlEREQSxkJPREQkYSz0REREEsZCT0REJGEs9ERERBLGQk9ERCRhLPREREQSxkJPREQkYSz0\nREREEsZCT0REJGEs9ERERBLGQk9ERCRhLPREREQSxkJPREQkYSz0REREEsZCT0REJGEs9ERERBLG\nQk9ERCRhLPREREQSxkJPREQkYSz0REREEsZCT0REJGEs9ERERBLGQk9ERCRhLPREREQSxkJPREQk\nYSz0REREEsZCT0REJGEs9ERERBLGQk9ERCRhLPREREQSxkJPREQkYSz0REREEqYsz5vS09ORmZkJ\nhUKBiIgItGjRwtdxERERURXwWOidTic2btyItWvXIjg4GPXr14dSqcSZM2dgNBoxatQoDBs2DHI5\nLwoQERFVVx4L/cSJE3H//fdj06ZNqFGjRom23NxcbNu2DePHj8fy5cvd7u90OjFjxgwcO3YMKpUK\nc+bMQUREhKt9x44dWLduHRQKBVq0aIEZM2ZAJpNh0KBB0Ov1AICGDRti7ty5VZEnERHRLcljoZ83\nbx6CgoLctoWEhGDUqFEYMmSIx4537twJh8OBjRs3IjU1FQkJCVi2bBkAwGq1YtGiRdixYwc0Gg1e\nfvllJCcno1OnTgCAxMTEyuREREREf/FY6JOSkiCTySCEcP0XAGQyGQAgOjoawcHBHjtOSUlBly5d\nAACRkZFIS0tztWk0GmzatAkajQYAkJ+fD61Wi/T0dFgsFsTFxSE/Px8vvfQSIiMjK58lERHRLcpj\nof/ll18gk8lw4sQJnD59Gg899BAUCgV2796Npk2bIjo6usyOTSaT6xI8ACgUCjidTsjlcshkMoSF\nhQEoPHu3WCx44IEHcOzYMcTFxWHo0KE4deoUxowZg6SkJI4DICIiukEeC/20adMAACNGjMC2bdsQ\nGhoKAJgwYQL+9a9/ee1Yr9fDbDa7XhcV+eKv58+fj8zMTCxevBgA0LhxYzRq1Mj1c40aNZCdnY26\ndeveQGpERETk9fG6S5culTgzV6vVuHr1qteOo6KikJycjL59++LIkSNo2bJlifZp06ZBo9Fg6dKl\nrtsBW7duRUZGBqZPn46srCyYTCaEh4d7/SyDXut2e6hdh/Bwg9f9q4tAitUTKeQASCMPKeQAMI/q\nRAo5ANLJo7xkoujmuwfz5s1DWloaevfuDafTiS+//BIPPPAAnn/++TI7FkJgxowZyMjIAADEx8fj\n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\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd6167363d0>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "sns.distplot((no_comp[\"closed\"] - no_comp[\"opened\"]) / (3600 * 24), kde=False, label=\"NO Component\", norm_hist=True, color=\"pink\")\n",
+    "sns.distplot((with_comp[\"closed\"] - with_comp[\"opened\"]) / (3600 * 24), kde=False, label=\"With Component\", norm_hist=True, color=\"Blue\")\n",
+    "plt.xlabel(\"Days\")\n",
+    "plt.ylabel(\"Numbe of Issues (normalized)\")\n",
+    "plt.title(\"Time to closure (normalized)\")\n",
+    "plt.legend()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 82,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "count    4709.000000\n",
+       "mean        7.838234\n",
+       "std        13.047354\n",
+       "min         0.000000\n",
+       "25%         0.254734\n",
+       "50%         1.507581\n",
+       "75%         8.759780\n",
+       "max        76.061817\n",
+       "dtype: float64"
+      ]
+     },
+     "execution_count": 82,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "((no_comp[\"closed\"] - no_comp[\"opened\"]) / (3600 * 24)).describe()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 83,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "count    7672.000000\n",
+       "mean        9.754343\n",
+       "std        13.647165\n",
+       "min         0.000000\n",
+       "25%         0.735463\n",
+       "50%         4.048987\n",
+       "75%        13.455067\n",
+       "max        84.907685\n",
+       "dtype: float64"
+      ]
+     },
+     "execution_count": 83,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "((with_comp[\"closed\"] - with_comp[\"opened\"]) / (3600 * 24)).describe()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Perform the same analysis as above but now excluding issues marked as \"WontFix\" or \"Duplicate\""
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 84,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "status_def = table_to_dataframe(\"StatusDef\", connection)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 85,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "chrome_not_valid = set(chrome_issue_update[(chrome_issue_update[\"new_value\"] == \"WontFix\") | \n",
+    "                                  (chrome_issue_update[\"new_value\"] == \"Duplicate\")][\"issue_id\"])"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 86,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "closed_chrome_valid = closed_chrome_issue[closed_chrome_issue[\"issue_id\"].apply(lambda i_id: i_id not in chrome_not_valid)]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 87,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "no_comp_valid = closed_chrome_valid[closed_chrome_valid[\"num_components\"] == 0]\n",
+    "with_comp_valid = closed_chrome_valid[closed_chrome_valid[\"num_components\"] != 0]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 88,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "<matplotlib.legend.Legend at 0x7fd6161809d0>"
+      ]
+     },
+     "execution_count": 88,
+     "metadata": {},
+     "output_type": "execute_result"
+    },
+    {
+     "data": {
+      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAgUAAAFtCAYAAACX0xmnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3Xd4FOXexvHvpocUOiJoUJBmQ+kWQCKgQaoEjELAY+xS\njooaAUGlBQRRQQ7FgiJIEZUjRw+KgVdBShQCgpRDRCLV0JJN22yy8/6RZCQkm12E3SDcn+vykp1n\nZvY3T7K7d559ZsZiGIaBiIiIXPJ8KroAERERuTAoFIiIiAigUCAiIiJFFApEREQEUCgQERGRIgoF\nIiIiAigUVIhx48bRq1cvevXqxfXXX8/dd99tPv7444+ZM2eOR553zZo1vPXWW2e1TWJiIuPGjfNI\nPeciMjKSHTt2VHQZLFy4kCVLlgCFNZ3+syz+Lzk5+az3e+DAAW6++eaz3q5bt24kJSVx9OhRYmJi\nznp7Z6ZPn87YsWPP2/4uVH+130/37rvv8uKLL5ZaHhUVxapVq8zHa9eupUmTJixevNhctm3bNm6/\n/fa//NwzZszg22+/BeDTTz+lRYsWpX4fExMTvfa63rhxIzfeeKP53N27dycmJobvvvvunPb76aef\n8vjjjwMwatQo1q9f/5f28/vvvzN06FCX6x05coTBgwdzKZzB71fRBVyKRo0aZf47MjKSqVOnct11\n13n8eX/++WfS09PPapvIyEgiIyM9VNHf28GDB/n888/NUAB47WfpjMViAeCyyy5j0aJF532/8td1\n6NCBTZs20alTJwBWr15NZGQkiYmJ3HfffQBs2LCB9u3b/+Xn2LhxIw0bNjQft2rVilmzZpW5rrde\n1/Xq1ePzzz83H+/atYuHH36YmTNncuONN57z/s8l3Bw6dIh9+/a5XK927do0bdqUhQsX0r9//7/8\nfH8HGim4wJz+F1lkZCTTpk2jZ8+edOjQgU8++YQRI0bQs2dP+vTpwx9//AHA0aNHGTx4MPfeey89\nevRg9uzZpfa7detWFi9ezJdffskbb7wBwNtvv80999xDjx49GDp0KMeOHSu13emJ/Ouvv+bee++l\nT58+9OvXjx9//LHc5bGxsaxcudLc1+mPU1JSiIuL495776VXr14sW7aszP7Yt28fsbGxdOvWje7d\nu/Pll1+WWmfx4sV0796dnj17EhcXx2+//QbAjz/+SN++fc3avv76awDi4+N57733zO1PfxwZGcnT\n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\n9ZP71FfuOR/ByWK4mLkXExPDokWLzvmJvG3OZKvTUHD45F6GDL9GoQC92NylfnKf+so96if3qa/c\ncz5CgcuRgt69ezNt2jTatm2Ln9+fq7dq1eqcn1xEREQuHC5DwaZNm/j555/ZvHlzieXz58/3WFEi\nIiLifS5Dwfbt21m5cqVulywiInKRc3lFw0aNGrF7925v1CIiIiIVyOVIQWpqKr1796ZGjRrmxDyL\nxcK3337r8eJERETEe1yGgpkzZ5a6tLC+ShAREbn4uDXRsKwQULduXY8UJCIiIhXDZSjYuHGjGQrs\ndjs//fQTLVu2pFevXh4vTkRERLzHZSg4/fbFUHj3xH/+858eK0hEREQqhsuzD85UqVIlDh486Ila\nREREpAK5HCmIjY0t8fj333+nQ4cOHitIREREKoZbN0QqZrFYqFq1Kg0bNvRoUSIiIuJ9TkPBoUOH\nALjyyivLbKtTp47nqhIRERGvcxoKBgwYUObyP/74g4KCAnbu3OmxokRERMT7nIaCxMTEEo+zsrJI\nSEhg3bp1jB071uOFiYiIiHe5dfbBDz/8QPfu3QH497//zW233ebRokRERMT7yp1omJWVxaRJk1i7\ndi1jx45VGBAREbmIOR0p0OiAiIjIpcXpSMFDDz2En58fa9euZe3atSXadJdEERGRi4/TULBq1Spv\n1iEiIiIVzGkouOKKK7xZh4iIiFSws773gYiIiFycFApEREQEUCgQERGRIgoFIiIiAigUiIiISBGF\nAhEREQEUCkRERKSIQoGIiIgACgUiIiJSRKFAREREAIUCERERKaJQICIiIoBCgYiIiBRRKBARERFA\noUBERESKKBSIiIgIoFAgIiIiRRQKREREBFAoEBERkSIKBSIiIgIoFIiIiEgRhQIREREBwM9TO3Y4\nHLz88svs2bMHf39/xo8fT0REhNmemJjIzJkz8fPzo0+fPvTt29fpNjt37mTcuHH4+PgQEBDA5MmT\nqV69uqdKFxERuSR5bKRg1apV2O12Fi1axPDhw0lISDDb7HY7CQkJvP/++8yfP5/Fixdz/Phxp9tM\nmDCBl156ifnz59OlSxfmzp3rqbJFREQuWR4bKdi8eTPt2rUDoFmzZmzfvt1sS0lJISIigrCwMABa\ntGhBUlISycnJZW7z+uuvU7NmTQDy8/MJDAz0VNkiIiKXLI+FgszMTEJDQ83Hvr6+OBwOfHx8yMzM\n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\n",
+      "text/plain": [
+       "<matplotlib.figure.Figure at 0x7fd6627d47d0>"
+      ]
+     },
+     "metadata": {},
+     "output_type": "display_data"
+    }
+   ],
+   "source": [
+    "sns.distplot((no_comp_valid[\"closed\"] - no_comp_valid[\"opened\"]) / (3600 * 24), kde=False, label=\"NO Component\", norm_hist=True, color=\"pink\")\n",
+    "sns.distplot((with_comp_valid[\"closed\"] - with_comp_valid[\"opened\"]) / (3600 * 24), kde=False, label=\"With Component\", norm_hist=True, color=\"Blue\")\n",
+    "plt.xlabel(\"Days\")\n",
+    "plt.ylabel(\"Numbe of Issues (normalized)\")\n",
+    "plt.title(\"Time to issue closure(Excluding Issues marked WontFix or Duplicate)\")\n",
+    "plt.legend()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 89,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "count    94498.000000\n",
+       "mean       246.740942\n",
+       "std        408.972934\n",
+       "min          0.000000\n",
+       "25%          0.000000\n",
+       "50%         11.163003\n",
+       "75%        411.270145\n",
+       "max       2656.412662\n",
+       "dtype: float64"
+      ]
+     },
+     "execution_count": 89,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "((no_comp_valid[\"closed\"] - no_comp_valid[\"opened\"]) / (3600 * 24)).describe()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 90,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "count    177877.000000\n",
+       "mean        153.512277\n",
+       "std         311.320375\n",
+       "min           0.000000\n",
+       "25%           3.199873\n",
+       "50%          19.683600\n",
+       "75%         120.228102\n",
+       "max        2798.843438\n",
+       "dtype: float64"
+      ]
+     },
+     "execution_count": 90,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
+   "source": [
+    "((with_comp_valid[\"closed\"] - with_comp_valid[\"opened\"]) / (3600 * 24)).describe()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 2",
+   "language": "python",
+   "name": "python2"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 2
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython2",
+   "version": "2.7.6"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/tools/datalab/ratelimiting.ipynb b/tools/datalab/ratelimiting.ipynb
new file mode 100644
index 0000000..9f29fc7
--- /dev/null
+++ b/tools/datalab/ratelimiting.ipynb
@@ -0,0 +1,298 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "# Analyzing Rate Limit Exceeded events\n",
+    "\n",
+    "Use this notebook to dig into Rate Limit Exceeded events on Monorail."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "import gcp\n",
+    "import gcp.bigquery as bq\n",
+    "\n",
+    "context = gcp.Context.default()\n",
+    "print 'The current project is %s' % context.project_id\n",
+    "\n",
+    "# Set the date to analyze here:\n",
+    "date = 20160514"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "%%sql --module by_ip\n",
+    "SELECT\n",
+    "  protoPayload.ip as ip,\n",
+    "  COUNT(protoPayload.requestId) AS num\n",
+    "FROM\n",
+    "  [logs.appengine_googleapis_com_request_log_$date]\n",
+    "WHERE\n",
+    "  protoPayload.moduleId is null # == \"default\", otherwise you get backend queries too.\n",
+    "  AND\n",
+    "  protoPayload.line.logMessage LIKE \"Rate Limit Exceeded%\"\n",
+    "GROUP BY\n",
+    "  ip\n",
+    "ORDER BY\n",
+    "  num DESC\n",
+    "LIMIT\n",
+    "  100;"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "%%sql --module by_ip_class\n",
+    "SELECT\n",
+    "  REGEXP_EXTRACT(protoPayload.ip,r'^(?:[^\\.]*\\.){0}([^\\.]*)\\.?') AS a,\n",
+    "  REGEXP_EXTRACT(protoPayload.ip,r'^(?:[^\\.]*\\.){1}([^\\.]*)\\.?') AS b,\n",
+    "  REGEXP_EXTRACT(protoPayload.ip,r'^(?:[^\\.]*\\.){2}([^\\.]*)\\.?') AS c,\n",
+    "  REGEXP_EXTRACT(protoPayload.ip,r'^(?:[^\\.]*\\.){3}([^\\.]*)\\.?') AS d,\n",
+    "  COUNT(protoPayload.requestId) AS num\n",
+    "FROM\n",
+    "  [logs.appengine_googleapis_com_request_log_$date]\n",
+    "WHERE\n",
+    "  protoPayload.moduleId is null # == \"default\", otherwise you get backend queries too.\n",
+    "  AND\n",
+    "  protoPayload.line.logMessage LIKE \"Rate Limit Exceeded%\"\n",
+    "GROUP BY\n",
+    "  a,\n",
+    "  b,\n",
+    "  c,\n",
+    "  d\n",
+    "ORDER BY\n",
+    "  num DESC\n",
+    "LIMIT\n",
+    "  100;"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "%%sql --module by_country\n",
+    "SELECT\n",
+    "  protoPayload.line.logMessage as line,\n",
+    "  COUNT(DISTINCT protoPayload.ip) as ip_count,\n",
+    "  COUNT(protoPayload.requestId) AS req_count\n",
+    "FROM\n",
+    "  FLATTEN ([logs.appengine_googleapis_com_request_log_$date], protoPayload.line)\n",
+    "WHERE\n",
+    "  protoPayload.moduleId is null # == \"default\", otherwise you get backend queries too.\n",
+    "  AND\n",
+    "  protoPayload.line.logMessage LIKE \"Rate Limit Exceeded%\"\n",
+    "  AND\n",
+    "  REGEXP_MATCH(protoPayload.line.logMessage, 'X-AppEngine-Country')\n",
+    "GROUP BY\n",
+    "  line\n",
+    "ORDER BY\n",
+    "  req_count DESC\n",
+    "LIMIT\n",
+    "  100;"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "%%sql --module by_resource\n",
+    "SELECT\n",
+    "  protoPayload.resource as resource,\n",
+    "  COUNT(protoPayload.requestId) AS req_count\n",
+    "FROM\n",
+    "  [logs.appengine_googleapis_com_request_log_$date]\n",
+    "WHERE\n",
+    "  protoPayload.moduleId is null # == \"default\", otherwise you get backend queries too.\n",
+    "  AND\n",
+    "  protoPayload.line.logMessage LIKE \"Rate Limit Exceeded%\"\n",
+    "GROUP BY\n",
+    "  resource\n",
+    "ORDER BY\n",
+    "  req_count DESC\n",
+    "LIMIT\n",
+    "  100;"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Requests by IP"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "df = bq.Query(by_ip, date=date).to_dataframe()\n",
+    "df.head(20)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "if len(df):\n",
+    "  df.plot()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Requests by IP Class"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "df = bq.Query(by_ip_class,  date=date).to_dataframe()\n",
+    "df.head(20)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "if len(df):\n",
+    "  df.plot()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Requests by Country Code"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "df = bq.Query(by_country, date=date).to_dataframe()\n",
+    "df.head(20)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "if len(df):\n",
+    "  df.plot()"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Requests by Requested Resource"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "df = bq.Query(by_resource, date=date).to_dataframe()\n",
+    "df.head(20)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "if len(df):\n",
+    "  df.plot()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 2",
+   "language": "python",
+   "name": "python2"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 2
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython2",
+   "version": "2.7.9"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/tools/datalab/simple_end_to_end.ipynb b/tools/datalab/simple_end_to_end.ipynb
new file mode 100644
index 0000000..326c49c
--- /dev/null
+++ b/tools/datalab/simple_end_to_end.ipynb
@@ -0,0 +1,365 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "%pylab inline"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "from __future__ import print_function\n",
+    "from __future__ import division"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "import pandas as pd\n",
+    "import seaborn as sns\n",
+    "import pickle\n",
+    "import unicodedata\n",
+    "import time\n",
+    "import sklearn\n",
+    "from sklearn.preprocessing import MultiLabelBinarizer\n",
+    "from sklearn.feature_extraction.text import CountVectorizer, TfidfTransformer\n",
+    "from sklearn.svm import LinearSVC\n",
+    "from sklearn.cross_validation import train_test_split\n",
+    "from sklearn.multiclass import OneVsRestClassifier"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "issues = pickle.load(open(\"subset_issue.pkl\"))\n",
+    "comment_text = pickle.load(open(\"comment_text.pkl\"))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "table for removing punctuation from text."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "table = dict.fromkeys(i for i in xrange(sys.maxunicode)\n",
+    "                      if unicodedata.category(unichr(i)).startswith('P'))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Clean The text"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "def get_text_components_per_issue(issues):\n",
+    "    text_per_issue = []\n",
+    "    components_per_issue = []\n",
+    "\n",
+    "    for index, row in issues.iterrows():\n",
+    "        issue_text = \"\"\n",
+    "        for comment_id in row[\"comments\"]:\n",
+    "            text = comment_text[comment_id].strip()\n",
+    "            # Remove punctuation\n",
+    "            text = text.translate(table)\n",
+    "            issue_text += text + \" \"\n",
+    "        text_per_issue.append(issue_text.strip())\n",
+    "\n",
+    "        components_per_issue.append(set(row[\"components\"]))\n",
+    "    \n",
+    "    return text_per_issue, components_per_issue\n",
+    "    "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "text_per_issue, components_per_issue = get_text_components_per_issue(issues)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Filter out components that are used infrequently(not enough singal) or too frequently (signal not meaningful)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "def prune_and_bin_components(components_per_issue, prune_low=0.005, prune_high=0.25):\n",
+    "    mlb = MultiLabelBinarizer()\n",
+    "    bins = mlb.fit_transform(components_per_issue)\n",
+    "    exclude_comp_ids = set(mlb.classes_[~(((bins.sum(axis=0) / bins.sum()) > prune_low) & \n",
+    "                                        ((bins.sum(axis=0) / bins.sum()) < prune_high))])\n",
+    "    \n",
+    "    comps_per_issue_exclude = []\n",
+    "    for comp_set in components_per_issue:\n",
+    "        comps = comp_set - exclude_comp_ids\n",
+    "        comps_per_issue_exclude.append(comps)\n",
+    "    \n",
+    "    mlb = MultiLabelBinarizer()\n",
+    "    bins = mlb.fit_transform(comps_per_issue_exclude)\n",
+    "    return bins, mlb"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "bins, mlb = prune_and_bin_components(components_per_issue)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Tokenize the text and perform tfidf transformations"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "bigram_vectorizer = CountVectorizer(ngram_range=(1, 2),\n",
+    "                                    token_pattern=r'\\b\\w+\\b',\n",
+    "                                    min_df=5,\n",
+    "                                    max_df=0.5,\n",
+    "                                    stop_words='english')\n",
+    "\n",
+    "tfidf_transformer =  TfidfTransformer()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "counts = bigram_vectorizer.fit_transform(text_per_issue)\n",
+    "tfidf = tfidf_transformer.fit_transform(counts)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "X_train, X_test, y_train, y_test = train_test_split(tfidf, bins, train_size=0.8, random_state=42)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Train a very simple linear model"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "clf = OneVsRestClassifier(LinearSVC(C=1.0))\n",
+    "clf.fit(X_train, y_train)"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Predict and analyze the results"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "predictions = clf.predict(X_test)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "(y_test == predictions).sum() / (y_test.shape[0] * y_test.shape[1])"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "np.sum((y_test == predictions).sum(axis=1) == 44) / y_test.shape[0]"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "sns.distplot(y_test.sum(axis=1), kde=False)\n",
+    "sns.distplot(predictions.sum(axis=1), kde=False)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "sns.barplot(range(44), y_test.sum(axis=0), color=\"red\")\n",
+    "sns.barplot(range(44), predictions.sum(axis=0), color=\"blue\")"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Serialize the data and the model"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "def serialize_data_model(vectorizer, classifier, features, targets, transformer=None):\n",
+    "    current_time = int(time.time())\n",
+    "    pickle.dump(vectorizer, open(\"{}-vectorizer.pkl\".format(current_time), \"wb\"))\n",
+    "    pickle.dump(classifier, open(\"{}-classifier.pkl\".format(current_time), \"wb\"))\n",
+    "    \n",
+    "    training = {\"features\": features, \"targets\": targets}\n",
+    "    pickle.dump(training, open(\"{}.pkl\".format(current_time), \"wb\"))\n",
+    "    \n",
+    "    if transformer:\n",
+    "        pickle.dump(transformer, open(\"{}-transformer.pkl\".format(current_time), \"wb\"))\n",
+    "    "
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "serialize_data_model(bigram_vectorizer, clf, tfidf, bins, tfidf_transformer)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 2",
+   "language": "python",
+   "name": "python2"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 2
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython2",
+   "version": "2.7.6"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/tools/datalab/subsample_data.ipynb b/tools/datalab/subsample_data.ipynb
new file mode 100644
index 0000000..988bfbc
--- /dev/null
+++ b/tools/datalab/subsample_data.ipynb
@@ -0,0 +1,286 @@
+{
+ "cells": [
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "This notebook is intended to show the process for going from \n",
+    "a database connection to two files the first associating an issue\n",
+    "to its components and the second to assocating an issue to its \n",
+    "comments. These files can then be used a machine learning pipeline\n",
+    "that will apply cleaning, vectorization of the text and building models."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "%pylab inline"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "from __future__ import print_function\n",
+    "from __future__ import division"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "import pandas as pd\n",
+    "from bs4 import BeautifulSoup\n",
+    "from collections import defaultdict\n",
+    "import pickle\n",
+    "import MySQLdb as mdb"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "connection = mdb.connect(host='', user='', db='monorail')\n",
+    "cursor = connection.cursor()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "def table_to_dataframe(name, connection):\n",
+    "    return pd.read_sql(\"SELECT * FROM {};\".format(name) , con=connection)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "issue = table_to_dataframe('Issue', connection)\n",
+    "comment = table_to_dataframe('Comment', connection)\n",
+    "issue_component = table_to_dataframe('Issue2Component', connection)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "issue.rename(columns={'id':'issue_id'}, inplace=True)\n",
+    "chrome_issue = issue[issue['project_id'] == 16].copy()\n",
+    "chrome_issue_id_set = set(chrome_issue['issue_id'])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Associate an issue withs its components"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "components_by_issue = defaultdict(list)\n",
+    "i = 0\n",
+    "for index, row in issue_component.iterrows():\n",
+    "    if row['issue_id'] in chrome_issue_id_set:\n",
+    "        components_by_issue[row['issue_id']].append(row['component_id'])\n",
+    "    if i % 100000 == 0:\n",
+    "        print(i)\n",
+    "    i += 1\n",
+    "\n",
+    "chrome_issue['components'] = chrome_issue['issue_id'].apply(lambda i_id: components_by_issue[i_id])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Associate an issue withs its comments"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "comments_by_issue = defaultdict(list)\n",
+    "i = 0\n",
+    "for index, row in chrome_comment.iterrows():\n",
+    "    comments_by_issue[row[\"issue_id\"]].append((index, row.created))\n",
+    "    if i % 1000000 == 0:\n",
+    "        print(i)\n",
+    "    i += 1\n",
+    "\n",
+    "chrome_issue[\"comments\"] = chrome_issue[\"issue_id\"].apply(lambda i_id: \n",
+    "                                                          [tup[0] for tup \n",
+    "                                                           in sorted(comments_by_issue[i_id], \n",
+    "                                                                     key=lambda x: x[1])])"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Only work with closed issues for training"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "closed_chrome_issues = chrome_issue[chrome_issue[\"closed\"] > 0]"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Subsample the data (faster to run experiments)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "num_issues = len(closed_chrome_issues)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "issue_subset = closed_chrome_issues.sample(int(num_issues * 0.05))"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Very light cleaning of text (removing markup)."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "comment_index_to_text = defaultdict(unicode)\n",
+    "\n",
+    "i = 0\n",
+    "for index, row in issue_subset.iterrows():\n",
+    "    for num, comment_id in enumerate(row['comments']):\n",
+    "        text =  BeautifulSoup(comment.loc[comment_id]['content']).get_text().strip().lower()\n",
+    "        comment_index_to_text[comment_id] = text\n",
+    "    \n",
+    "    if i % 10000 == 0:\n",
+    "        print(i)\n",
+    "    i += 1"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": [
+    "issue_subset.to_pickle('subset_issue.pkl')"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "pickle.dump(comment_index_to_text, open('comment_text.pkl', 'w'))"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": true
+   },
+   "outputs": [],
+   "source": []
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 2",
+   "language": "python",
+   "name": "python2"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 2
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython2",
+   "version": "2.7.6"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/tools/datalab/update_paths.ipynb b/tools/datalab/update_paths.ipynb
new file mode 100644
index 0000000..56dbe74
--- /dev/null
+++ b/tools/datalab/update_paths.ipynb
@@ -0,0 +1,325 @@
+{
+ "cells": [
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "%pylab inline"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "from __future__ import print_function\n",
+    "from __future__ import division\n",
+    "from IPython.display import display, HTML"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "import seaborn as sns\n",
+    "import pandas as pd\n",
+    "import MySQLdb as mdb\n",
+    "import bs4\n",
+    "import datetime\n",
+    "from collections import defaultdict\n",
+    "from matplotlib import pyplot as plt\n",
+    "from ipywidgets import widgets"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Load the Data"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "def table_to_dataframe(name, connection):\n",
+    "    return pd.read_sql(\"SELECT * FROM {};\".format(name) , con=connection)\n",
+    "\n",
+    "def project_table_to_dataframe(name, connection):\n",
+    "    # project_id 1 is monorail\n",
+    "    return pd.read_sql(\"SELECT * FROM {} where project_id = 1;\".format(name) , con=connection)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "connection = mdb.connect(host=\"localhost\", user=\"root\", db=\"monorail\")"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "cursor = connection.cursor()"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "# Only look at monorail issues, and only look at issues opened in the past year.\n",
+    "issue = pd.read_sql(\"SELECT * FROM Issue where project_id = 1 and opened > 1436396241;\", con=connection)\n",
+    "comment = pd.read_sql(\"SELECT * FROM Comment where project_id = 1 and created > 1436396241;\", con=connection)\n",
+    "status_def = project_table_to_dataframe(\"StatusDef\", connection)\n",
+    "issue_summarny = table_to_dataframe(\"IssueSummary\", connection)\n",
+    "issue_label = table_to_dataframe(\"Issue2Label\", connection)\n",
+    "issue_component = table_to_dataframe(\"Issue2Component\", connection)\n",
+    "issue_update = table_to_dataframe(\"IssueUpdate\", connection)\n",
+    "issue.rename(columns={\"id\":\"issue_id\"}, inplace=True)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "print(\"Number of Issues\", issue.shape[0])\n",
+    "print(\"Number of IssueUpdates\", issue_update.shape[0])\n"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "### Associate IssueUpdates with their Issues\n",
+    "This next step is resource intensive and can take a while."
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "updates_by_issue = defaultdict(list)\n",
+    "i = 0\n",
+    "for index, row in issue_update.iterrows():\n",
+    "    updates_by_issue[row[\"issue_id\"]].append(row)\n",
+    "    if i % 1000000 == 0:\n",
+    "        print(i)\n",
+    "    i += 1"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "issues_by_id = {}\n",
+    "i = 0\n",
+    "for index, row in issue.iterrows():\n",
+    "    issues_by_id[row[\"issue_id\"]] = row\n",
+    "    if i % 1000000 == 0:\n",
+    "        print(i)\n",
+    "    i += 1"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "status_by_id = {}\n",
+    "i = 0\n",
+    "for index, row in status_def.iterrows():\n",
+    "    status_by_id[row[\"id\"]] = row\n",
+    "    if i % 1000000 == 0:\n",
+    "        print(i)\n",
+    "    i += 1"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "issue[\"updates\"] = issue[\"issue_id\"].apply(lambda i_id: [u for u in sorted(updates_by_issue[i_id], key=lambda x: x.id)])\n",
+    "issue[\"num_updates\"] = issue[\"updates\"].apply(lambda updates: len(updates))"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "sns.distplot(issue[\"num_updates\"], kde=False)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "def StatusPath(i_id, updates):\n",
+    "    statuses = []\n",
+    "    for update in updates:\n",
+    "        if update.field == 'status':\n",
+    "            if len(statuses) == 0:\n",
+    "                statuses.append(update.old_value if update.old_value else 'none')\n",
+    "            statuses.append(update.new_value if update.new_value else 'none')\n",
+    "\n",
+    "    if len(statuses) == 0:\n",
+    "        # use ~np.isnan here instead?\n",
+    "        if issues_by_id[i_id].status_id == issues_by_id[i_id].status_id: # cheap NaN hack\n",
+    "            status_id = int(issues_by_id[i_id].status_id)\n",
+    "            if status_id is not NaN and status_id in status_by_id:\n",
+    "                statuses = [status_by_id[status_id].status]\n",
+    "            else:\n",
+    "                statuses = ['mystery status id: %d' % status_id]\n",
+    "        else:\n",
+    "            statuses = ['never had status']\n",
+    "    statuses = [s.decode('utf-8', errors='replace') for s in statuses]\n",
+    "    return u'->'.join(statuses)\n",
+    "\n"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "issue[\"status_path\"] = issue[\"issue_id\"].apply(lambda i_id: StatusPath(i_id, sorted(updates_by_issue[i_id], key=lambda x: x.id)))"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false,
+    "scrolled": true
+   },
+   "outputs": [],
+   "source": [
+    "plt.rcParams['figure.figsize']=(10,25)\n",
+    "by_path = issue.groupby([\"status_path\"]).size()\n",
+    "by_path.sort()\n",
+    "by_path.plot(kind='barh')"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "# Find distributions of time-to-close for various closed states.\n",
+    "\n",
+    "closed_issue = issue[issue[\"closed\"] > 0]\n",
+    "    \n",
+    "closed_issue[\"time_to_close\"] = closed_issue[\"issue_id\"].apply(lambda i_id: issues_by_id[i_id].closed - issues_by_id[i_id].opened)\n",
+    "closed_issue[\"issue_state\"] = closed_issue[\"status_id\"].apply(lambda s_id: status_by_id[s_id].status)\n",
+    "print(\"Number of closed issues %d\" % closed_issue.shape[0])"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false
+   },
+   "outputs": [],
+   "source": [
+    "plt.rcParams['figure.figsize']=(10,5)\n",
+    "sns.distplot(closed_issue[closed_issue[\"time_to_close\"] < 1e7][\"time_to_close\"], kde=False)"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": null,
+   "metadata": {
+    "collapsed": false,
+    "scrolled": true
+   },
+   "outputs": [],
+   "source": [
+    "# filter for time_to_close < 1e7 (~11 days since timestamps are seconds)\n",
+    "# since the time_to_close distribution skews waaaay out\n",
+    "sns.boxplot(data=closed_issue, x=\"time_to_close\", y=\"issue_state\", palette=\"colorblind\")"
+   ]
+  }
+ ],
+ "metadata": {
+  "kernelspec": {
+   "display_name": "Python 2",
+   "language": "python",
+   "name": "python2"
+  },
+  "language_info": {
+   "codemirror_mode": {
+    "name": "ipython",
+    "version": 2
+   },
+   "file_extension": ".py",
+   "mimetype": "text/x-python",
+   "name": "python",
+   "nbconvert_exporter": "python",
+   "pygments_lexer": "ipython2",
+   "version": "2.7.6"
+  }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/tools/gc-unused-labels.sql b/tools/gc-unused-labels.sql
new file mode 100644
index 0000000..d5c05d0
--- /dev/null
+++ b/tools/gc-unused-labels.sql
@@ -0,0 +1,17 @@
+-- Garbage collect LabelDef rows from all projects where:
+-- 1. The label is not currently in use (it does not join to Issue2Label).
+-- 2. The label is not a well-known label (it does not have a rank).
+-- There are currently about 1500 such labels in the prod database.
+
+CREATE TABLE LabelDefToDelete (id INT);
+
+INSERT INTO LabelDefToDelete (id)
+  SELECT id FROM LabelDef
+    LEFT JOIN Issue2Label ON LabelDef.id = Issue2Label.label_id
+    WHERE issue_id IS NULL
+    AND rank IS NULL;
+
+DELETE FROM LabelDef
+  WHERE id IN (SELECT * FROM LabelDefToDelete)
+  LIMIT 2000;
+
diff --git a/tools/ml/Makefile b/tools/ml/Makefile
new file mode 100644
index 0000000..b0a8684
--- /dev/null
+++ b/tools/ml/Makefile
@@ -0,0 +1,222 @@
+# Copyright 2019 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
+
+# Use 'make help' for a list of commands.
+
+OUTPUT_DIR := /tmp/monospam-local-training/
+TIMESTAMP := $(shell date +%s)
+MODEL_DIR := /tmp/monospam-local-training/export/Servo/{TIMESTAMP}/
+SPAM_JOB_NAME := spam_trainer_$(TIMESTAMP)
+COMP_JOB_NAME := comp_trainer_$(TIMESTAMP)
+
+default: help
+
+help:
+	@echo "Available commands:"
+	@sed -n '/^[a-zA-Z0-9_.]*:/s/:.*//p' <Makefile
+
+train_local_spam:
+	gcloud ai-platform local train \
+		--package-path trainer/ \
+		--module-name trainer.task \
+		--job-dir $(OUTPUT_DIR) \
+		-- \
+		--train-steps 1000 \
+		--verbosity DEBUG \
+		--train-file $(TRAIN_FILE) \
+		--trainer-type spam
+
+train_local_spam_2:
+	gcloud ai-platform local train \
+		--package-path trainer2/ \
+		--module-name trainer2.task \
+		--job-dir $(OUTPUT_DIR) \
+		-- \
+		--train-steps 1000 \
+		--verbosity DEBUG \
+		--train-file $(TRAIN_FILE) \
+		--trainer-type spam
+
+predict_local_spam:
+	./spam.py local-predict
+	gcloud ai-platform local predict \
+		--model-dir $(MODEL_DIR) \
+		--json-instances /tmp/instances.json
+
+train_from_prod_data_spam:
+	gcloud ai-platform local train \
+		--package-path trainer/ \
+		--module-name trainer.task \
+		--job-dir $(OUTPUT_DIR) \
+		-- \
+		--train-steps 1000 \
+		--verbosity DEBUG \
+		--gcs-bucket monorail-prod.appspot.com \
+		--gcs-prefix spam_training_data \
+		--trainer-type spam
+
+train_from_prod_data_spam_2:
+	gcloud ai-platform local train \
+		--package-path trainer2/ \
+		--module-name trainer2.task \
+		--job-dir $(OUTPUT_DIR) \
+		-- \
+		--train-steps 1000 \
+		--verbosity DEBUG \
+		--gcs-bucket monorail-prod.appspot.com \
+		--gcs-prefix spam_training_data \
+		--trainer-type spam
+
+submit_train_job_spam:
+	@echo ${TIMESTAMP}
+	gcloud ai-platform jobs submit training $(SPAM_JOB_NAME) \
+		--package-path trainer/ \
+		--module-name trainer.task \
+		--runtime-version 1.2 \
+		--job-dir gs://monorail-prod-mlengine/$(SPAM_JOB_NAME) \
+		--region us-central1 \
+		-- \
+		--train-steps 1000 \
+		--verbosity DEBUG \
+		--gcs-bucket monorail-prod.appspot.com \
+		--gcs-prefix spam_training_data \
+		--trainer-type spam
+
+submit_train_job_spam_2:
+	@echo ${TIMESTAMP}
+	gcloud ai-platform jobs submit training $(SPAM_JOB_NAME) \
+		--package-path trainer2/ \
+		--module-name trainer2.task \
+		--runtime-version 2.1 \
+		--python-version 3.7 \
+		--job-dir gs://monorail-prod-mlengine/$(SPAM_JOB_NAME) \
+		--region us-central1 \
+		-- \
+		--train-steps 1000 \
+		--verbosity DEBUG \
+		--gcs-bucket monorail-prod.appspot.com \
+		--gcs-prefix spam_training_data \
+		--trainer-type spam
+
+# VERSION of format 'v_TIMESTAMP' should match TIMESTAMP in SPAM_JOB_NAME and MODEL_BINARIES.
+upload_model_prod_spam:
+ifndef MODEL_BINARIES
+	$(error MODEL_BINARIES not set)
+endif
+ifndef VERSION
+	$(error VERSION not set)
+endif
+	gsutil ls -r gs://monorail-prod-mlengine/$(SPAM_JOB_NAME)
+	gcloud ai-platform versions create $(VERSION) \
+		--model spam_only_words \
+		--origin $(MODEL_BINARIES) \
+		--runtime-version 1.2
+	gcloud ai-platform versions set-default $(VERSION) --model spam_only_words
+
+submit_pred_spam:
+ifndef SUMMARY_PATH
+	$(error SUMMARY_PATH not set)
+endif
+ifndef CONTENT_PATH
+	$(error CONTENT_PATH not set)
+endif
+	./spam.py predict --summary $(SUMMARY_PATH) --content $(CONTENT_PATH)
+
+
+train_from_prod_data_component:
+	gcloud ai-platform local train \
+		--package-path trainer/ \
+		--module-name trainer.task \
+		--job-dir $(OUTPUT_DIR) \
+		-- \
+		--train-steps 10000 \
+		--eval-steps 1000 \
+		--verbosity DEBUG \
+		--gcs-bucket monorail-prod.appspot.com \
+		--gcs-prefix component_training_data \
+		--trainer-type component
+
+submit_train_job_component:
+	gcloud init
+	gcloud ai-platform jobs submit training $(COMP_JOB_NAME) \
+		--package-path trainer/ \
+		--module-name trainer.task \
+		--runtime-version 1.2 \
+		--job-dir gs://monorail-prod-mlengine/$(COMP_JOB_NAME) \
+		--region us-central1 \
+		--scale-tier custom \
+		--config config.json \
+		-- \
+		--train-steps 10000 \
+		--eval-steps 1000 \
+		--verbosity DEBUG \
+		--gcs-bucket monorail-prod.appspot.com \
+		--gcs-prefix component_training_data \
+		--trainer-type component
+
+submit_train_job_component_2:
+	gcloud ai-platform jobs submit training $(COMP_JOB_NAME) \
+		--package-path trainer2/ \
+		--module-name trainer2.task \
+		--runtime-version 2.1 \
+		--python-version 3.7 \
+		--job-dir gs://monorail-prod-mlengine/$(COMP_JOB_NAME) \
+		--region us-central1 \
+		--scale-tier custom \
+		--master-machine-type n1-highmem-8 \
+		-- \
+		--train-steps 10000 \
+		--eval-steps 1000 \
+		--verbosity DEBUG \
+		--gcs-bucket monorail-prod.appspot.com \
+		--gcs-prefix component_training_data \
+		--trainer-type component
+
+# VERSION of format 'v_TIMESTAMP' should match TIMESTAMP in COMP_JOB_NAME and MODEL_BINARIES.
+upload_model_prod_component:
+ifndef MODEL_BINARIES
+	$(error MODEL_BINARIES not set)
+endif
+ifndef VERSION
+	$(error VERSION not set)
+endif
+	gsutil ls -r gs://monorail-prod-mlengine/$(COMP_JOB_NAME)
+	gcloud ai-platform versions create $(VERSION) \
+		--model component_top_words \
+		--origin $(MODEL_BINARIES) \
+		--runtime-version 1.2
+	gcloud ai-platform versions set-default $(VERSION) --model component_top_words
+
+submit_pred_component:
+ifndef CONTENT_PATH
+	$(error CONTENT_PATH not set)
+endif
+	./component.py --project monorail-prod --content $(CONTENT_PATH)
+
+
+### Local Training in TF 2.0
+
+tf2_train_local_spam:
+ifndef TRAIN_FILE
+	$(error TRAIN_FILE not set)
+endif
+	python3 ./trainer2/task.py \
+		--train-file $(TRAIN_FILE) \
+		--job-dir $(OUTPUT_DIR) \
+		--train-steps 1000 \
+		--verbosity DEBUG \
+		--trainer-type spam
+
+tf2_train_local_component:
+ifndef TRAIN_FILE
+	$(error TRAIN_FILE not set)
+endif
+	python3 ./trainer2/task.py \
+		--train-file $(TRAIN_FILE) \
+		--job-dir $(OUTPUT_DIR) \
+		--train-steps 10000 \
+		--eval-steps 1000 \
+		--verbosity DEBUG \
+		--trainer-type component
diff --git a/tools/ml/README.md b/tools/ml/README.md
new file mode 100644
index 0000000..01b0702
--- /dev/null
+++ b/tools/ml/README.md
@@ -0,0 +1,222 @@
+# Monorail Machine Learning Classifiers
+
+Monorail has two machine learning classifiers running in ML Engine: a spam classifier and a component predictor.
+
+Whenever a user creates a new issue (or comments on an issue without an assigned component), components are suggested based on the text the user types using Monorail's component predictor.
+
+Monorail also runs each new issue and comment through a spam classifier model.
+
+In order to train a new model locally or in the cloud, follow the instructions below.
+
+> Note: you must be logged into the correct GCP project with `gcloud` in order to run the below commands.
+
+### New model in trainer2/
+
+The new code is used for local training and exporting model using Python3 and TensorFlow 2.0. Future predictor should also be migrated to use the training files in trainer2/.
+
+### Trainer
+
+Both trainers are Python modules that do the following:
+
+1. Download all (spam or component) exported training data from GCS
+2. Define a TensorFlow Estimator and Experiment
+
+ML Engine uses the high-level [`learn_runner`](https://www.tensorflow.org/api_docs/python/tf/contrib/learn/learn_runner/run) API (see [`trainer/task.py`](trainer/task.py)) which allows it to train, evaluate, and predict against a model saved in GCS.
+
+## Monorail Spam Classifier
+
+### Run locally
+
+To run any training jobs locally, you'll need Python 2 and TensorFlow 1.2:
+
+```sh
+pip install -r requirements.txt
+```
+
+Run a local training job with placeholder data:
+
+```sh
+make TRAIN_FILE=./sample_spam_training_data.csv train_local_spam
+```
+
+To have the local trainer download and train on the real training data, you'll
+need to be logged into `gcloud` and have access to the `monorail-prod` project.
+
+```sh
+make train_from_prod_data_spam
+```
+
+<!-- TODO: the below has not been reviewed recently. -->
+
+### Submit a local prediction
+
+```sh
+./spam.py local-predict
+gcloud ml-engine local predict --model-dir $OUTPUT_DIR/export/Servo/{TIMESTAMP}/ --json-instances /tmp/instances.json
+```
+
+### Submitting a training job to ML Engine
+
+This will run a job and output a trained model to GCS. Job names must be unique.
+
+First verify you're in the `monorail-prod` GCP project.
+
+```sh
+gcloud init
+```
+
+To submit a training job manually, run:
+
+```sh
+TIMESTAMP=$(date +%s)
+JOB_NAME=spam_trainer_$TIMESTAMP
+gcloud ml-engine jobs submit training $JOB_NAME \
+    --package-path trainer/ \
+    --module-name trainer.task \
+    --runtime-version 1.2 \
+    --job-dir gs://monorail-prod-mlengine/$JOB_NAME \
+    --region us-central1 \
+    -- \
+    --train-steps 1000 \
+    --verbosity DEBUG \
+    --gcs-bucket monorail-prod.appspot.com \
+    --gcs-prefix spam_training_data \
+    --trainer-type spam
+```
+
+### Uploading a model and and promoting it to production
+
+To upload a model you'll need to locate the exported model directory in GCS. To do that, run:
+
+```sh
+gsutil ls -r gs://monorail-prod-mlengine/$JOB_NAME
+
+# Look for a directory that matches the below structure and assign it.
+# It should have the structure $GCS_OUTPUT_LOCATION/export/Servo/$TIMESTAMP/.
+MODEL_BINARIES=gs://monorail-prod-mlengine/spam_trainer_1507059720/export/Servo/1507060043/
+
+VERSION=v_$TIMESTAMP
+gcloud ml-engine versions create $VERSION \
+    --model spam_only_words \
+    --origin $MODEL_BINARIES \
+    --runtime-version 1.2
+```
+
+To promote to production, set that model as default.
+
+```sh
+gcloud ml-engine versions set-default $VERSION --model spam_only_words
+```
+
+### Submit a prediction
+
+Use the script [`spam.py`](spam.py) to make predictions
+from the command line. Files containing text for classification must be provided as summary and content arguments.
+
+```sh
+$ ./spam.py predict --summary summary.txt --content content.txt
+{u'predictions': [{u'classes': [u'0', u'1'], u'scores': [0.4986788034439087, 0.5013211965560913]}]}
+```
+
+A higher probability for class 1 indicates that the text was classified as spam.
+
+### Compare model accuracy
+
+After submitting a job to ML Engine, you can compare the accuracy of two submitted jobs using their trainer names.
+
+```sh
+$ ./spam.py --project monorail-prod compare-accuracy --model1 spam_trainer_1521756634 --model2 spam_trainer_1516759200
+spam_trainer_1521756634:
+AUC: 0.996436  AUC Precision/Recall: 0.997456
+
+spam_trainer_1516759200:
+AUC: 0.982159  AUC Precision/Recall: 0.985069
+```
+
+By default, model1 is the default model running in the specified project. Note that an error will be thrown if the trainer does not contain an eval_data.json file.
+
+## Monorail Component Predictor
+
+### Run locally
+
+To kick off a local training job, run:
+
+```sh
+OUTPUT_DIR=/tmp/monospam-local-training
+rm -rf $OUTPUT_DIR
+gcloud ml-engine local train \
+    --package-path trainer/ \
+    --module-name trainer.task \
+    --job-dir $OUTPUT_DIR \
+    -- \
+    --train-steps 10000 \
+    --eval-steps 1000 \
+    --verbosity DEBUG \
+    --gcs-bucket monorail-prod.appspot.com \
+    --gcs-prefix component_training_data \
+    --trainer-type component
+```
+
+### Submitting a training job to ML Engine
+
+This will run a job and output a trained model to GCS. Job names must be unique.
+
+First verify you're in the `monorail-prod` GCP project.
+
+```sh
+gcloud init
+```
+
+To submit a training job manually, run:
+
+```sh
+TIMESTAMP=$(date +%s)
+JOB_NAME=component_trainer_$TIMESTAMP
+gcloud ml-engine jobs submit training $JOB_NAME \
+    --package-path trainer/ \
+    --module-name trainer.task \
+    --runtime-version 1.2 \
+    --job-dir gs://monorail-prod-mlengine/$JOB_NAME \
+    --region us-central1 \
+    --scale-tier custom \
+    --config config.json \
+    -- \
+    --train-steps 10000 \
+    --eval-steps 1000 \
+    --verbosity DEBUG \
+    --gcs-bucket monorail-prod.appspot.com \
+    --gcs-prefix component_training_data \
+    --trainer-type component
+```
+
+### Uploading a model and and promoting it to production
+
+To upload a model you'll need to locate the exported model directory in GCS. To do that, run:
+
+```sh
+gsutil ls -r gs://monorail-prod-mlengine/$JOB_NAME
+
+# Look for a directory that matches the below structure and assign it.
+# It should have the structure $GCS_OUTPUT_LOCATION/export/Servo/$TIMESTAMP/.
+MODEL_BINARIES=gs://monorail-prod-mlengine/component_trainer_1507059720/export/Servo/1507060043/
+
+VERSION=v_$TIMESTAMP
+gcloud ml-engine versions create $VERSION \
+    --model component_top_words \
+    --origin $MODEL_BINARIES \
+    --runtime-version 1.2
+```
+To promote to production, set that model as default.
+
+```sh
+gcloud ml-engine versions set-default $VERSION --model component_top_words
+```
+
+### Submit a prediction
+
+Use the script [`component.py`](component.py) to make predictions from the command line. A file containing text for classification must be provided as the content argument.
+
+```sh
+$ ./component.py --project monorail-prod --content content.txt
+Most likely component: index 108, component id 36250211
+```
diff --git a/tools/ml/comment-training-export.sql b/tools/ml/comment-training-export.sql
new file mode 100644
index 0000000..891ed18
--- /dev/null
+++ b/tools/ml/comment-training-export.sql
@@ -0,0 +1,16 @@
+select
+  IF(v.is_spam, "spam", "ham"),
+  "",
+  REPLACE(cc.content, '\n', '\r'),
+  u.email,
+  CONCAT("https://bugs.chromium.org/p/", p.project_name, "/issues/detail?id=", i.local_id),
+  r.email
+from SpamVerdict v
+  join Comment c on c.id = v.comment_id
+  join CommentContent cc on cc.comment_id = c.id
+  join Project p on p.project_id = c.project_id
+  join Issue i on i.id=c.issue_id
+  join User u on u.user_id = c.commenter_id
+  join User r on r.user_id = v.user_id
+where
+  v.reason='manual' and v.overruled = 0;
diff --git a/tools/ml/component.py b/tools/ml/component.py
new file mode 100755
index 0000000..9b401f3
--- /dev/null
+++ b/tools/ml/component.py
@@ -0,0 +1,137 @@
+#!/usr/bin/env python
+# Copyright 2018 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
+
+"""
+Component classifier command line tools.
+
+Use this command to submit predictions to the model running
+in production.
+
+Note that in order for this command to work, you must be logged into
+gcloud in the project under which you wish to run commands.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import argparse
+import json
+import os
+import re
+import sys
+
+import googleapiclient
+from googleapiclient import discovery
+from googleapiclient import errors
+from google.cloud.storage import client, bucket, blob
+from apiclient.discovery import build
+from oauth2client.client import GoogleCredentials
+
+import ml_helpers
+
+credentials = GoogleCredentials.get_application_default()
+
+# This must be identical with settings.component_features.
+COMPONENT_FEATURES = 5000
+
+MODEL_NAME = 'component_top_words'
+
+
+def Predict(args):
+  ml = googleapiclient.discovery.build('ml', 'v1', credentials=credentials)
+
+  with open(args.content) as f:
+    content = f.read()
+
+  project_ID = 'projects/%s' % args.project
+  full_model_name = '%s/models/%s' % (project_ID, MODEL_NAME)
+  model_request = ml.projects().models().get(name=full_model_name)
+  model_response = model_request.execute()
+
+  version_name = model_response['defaultVersion']['name']
+
+  model_name = 'component_trainer_' + re.search("v_(\d+)",
+                                                version_name).group(1)
+
+  client_obj = client.Client(project=args.project)
+  bucket_name = '%s-mlengine' % args.project
+  bucket_obj = bucket.Bucket(client_obj, bucket_name)
+
+  instance = ml_helpers.GenerateFeaturesRaw([content],
+                                            COMPONENT_FEATURES,
+                                            getTopWords(bucket_name,
+                                                        model_name))
+
+
+  request = ml.projects().predict(name=full_model_name, body={
+    'instances': [{'inputs': instance['word_features']}]
+  })
+
+  try:
+    response = request.execute()
+
+
+    bucket_obj.blob = blob.Blob('%s/component_index.json'
+                                % model_name, bucket_obj)
+    component_index = bucket_obj.blob.download_as_string()
+    component_index_dict = json.loads(component_index)
+
+    return read_indexes(response, component_index_dict)
+
+  except googleapiclient.errors.HttpError, err:
+    print('There was an error. Check the details:')
+    print(err._get_reason())
+
+
+def getTopWords(bucket_name, model_name):
+  storage = discovery.build('storage', 'v1', credentials=credentials)
+  objects = storage.objects()
+
+  request = objects.get_media(bucket=bucket_name,
+                              object=model_name + '/topwords.txt')
+  response = request.execute()
+
+  top_list = response.split()
+  top_words = {}
+  for i in range(len(top_list)):
+    top_words[top_list[i]] = i
+
+  return top_words
+
+
+def read_indexes(response, component_index):
+
+  scores = response['predictions'][0]['scores']
+  highest = scores.index(max(scores))
+
+  component_id = component_index[str(highest)]
+
+  return "Most likely component: index %d, component id %d" % (
+      int(highest), int(component_id))
+
+
+def main():
+  if not credentials and 'GOOGLE_APPLICATION_CREDENTIALS' not in os.environ:
+    print(('GOOGLE_APPLICATION_CREDENTIALS environment variable is not set. '
+          'Exiting.'))
+    sys.exit(1)
+
+  parser = argparse.ArgumentParser(
+      description='Component classifier utilities.')
+  parser.add_argument('--project', '-p', default='monorail-staging')
+
+  parser.add_argument('--content', '-c', required=True,
+                      help='A file containing the content.')
+
+  args = parser.parse_args()
+
+  res = Predict(args)
+
+  print(res)
+
+
+if __name__ == '__main__':
+  main()
diff --git a/tools/ml/config.json b/tools/ml/config.json
new file mode 100644
index 0000000..6c36e3e
--- /dev/null
+++ b/tools/ml/config.json
@@ -0,0 +1,5 @@
+{
+    "trainingInput": {
+        "masterType": "large_model"
+    }
+}
diff --git a/tools/ml/issue-training-export.sql b/tools/ml/issue-training-export.sql
new file mode 100644
index 0000000..73a637b
--- /dev/null
+++ b/tools/ml/issue-training-export.sql
@@ -0,0 +1,17 @@
+select
+  IF(v.is_spam, "spam", "ham"),
+  REPLACE(s.summary, '\n', '\r'),
+  REPLACE(cc.content, '\n', '\r'),
+  u.email,
+  CONCAT("https://bugs.chromium.org/p/", p.project_name, "/issues/detail?id=", i.local_id),
+  r.email
+from SpamVerdict v
+  join Issue i on i.id = v.issue_id
+  join Comment c on c.issue_id = i.id
+  join CommentContent cc on cc.comment_id = c.id
+  join IssueSummary s on s.issue_id = i.id
+  join Project p on p.project_id = i.project_id
+  join User u on u.user_id = c.commenter_id
+  join User r on r.user_id = v.user_id
+where
+  v.reason='manual' and v.overruled = 0;
diff --git a/tools/ml/ml_helpers.py b/tools/ml/ml_helpers.py
new file mode 120000
index 0000000..894569b
--- /dev/null
+++ b/tools/ml/ml_helpers.py
@@ -0,0 +1 @@
+../../services/ml_helpers.py
\ No newline at end of file
diff --git a/tools/ml/requirements.txt b/tools/ml/requirements.txt
new file mode 100644
index 0000000..e0a7166
--- /dev/null
+++ b/tools/ml/requirements.txt
@@ -0,0 +1 @@
+tensorflow==1.2
diff --git a/tools/ml/sample_spam_training_data.csv b/tools/ml/sample_spam_training_data.csv
new file mode 100644
index 0000000..4de2805
--- /dev/null
+++ b/tools/ml/sample_spam_training_data.csv
@@ -0,0 +1,36 @@
+"ham","","Okay. I think we've found another way to do what we need - thanks, though!","wscalf@gmail.com"
+"ham","","# 1231
+ - sdfsdf","ddoman@google.com"
+"ham","","Okay. I think we've found another way to do what we need - thanks, though!","wscalf@gmail.com"
+"ham","","# 1231
+ - sdfsdf","ddoman@google.com"
+"ham","","Okay. I think we've found another way to do what we need - thanks, though!","wscalf@gmail.com"
+"ham","","# 1231
+ - sdfsdf","ddoman@google.com"
+"ham","","Okay. I think we've found another way to do what we need - thanks, though!","wscalf@gmail.com"
+"ham","","# 1231
+ - sdfsdf","ddoman@google.com"
+"ham","","Okay. I think we've found another way to do what we need - thanks, though!","wscalf@gmail.com"
+"ham","","# 1231
+ - sdfsdf","ddoman@google.com"
+"ham","","Okay. I think we've found another way to do what we need - thanks, though!","wscalf@gmail.com"
+"spam","Chicken","<b>Feature description:</b>  <b>--</b> test <b>PRD:</b>ewre <b>Mocks:</b> <b>Design doc:</b> <b>Test Plan:</b> <b>Metrics (go/CrOSlaunchMetrics):</b>  ","jojwang@google.com"
+"spam","test","hmmm","zhangtiff@google.com"
+"spam","Chicken","<b>Feature description:</b>  <b>--</b> test <b>PRD:</b>ewre <b>Mocks:</b> <b>Design doc:</b> <b>Test Plan:</b> <b>Metrics (go/CrOSlaunchMetrics):</b>  ","jojwang@google.com"
+"spam","test","hmmm","zhangtiff@google.com"
+"spam","Chicken","<b>Feature description:</b>  <b>--</b> test <b>PRD:</b>ewre <b>Mocks:</b> <b>Design doc:</b> <b>Test Plan:</b> <b>Metrics (go/CrOSlaunchMetrics):</b>  ","jojwang@google.com"
+"spam","test","hmmm","zhangtiff@google.com"
+"spam","Chicken","<b>Feature description:</b>  <b>--</b> test <b>PRD:</b>ewre <b>Mocks:</b> <b>Design doc:</b> <b>Test Plan:</b> <b>Metrics (go/CrOSlaunchMetrics):</b>  ","jojwang@google.com"
+"spam","test","hmmm","zhangtiff@google.com"
+"spam","Chicken","<b>Feature description:</b>  <b>--</b> test <b>PRD:</b>ewre <b>Mocks:</b> <b>Design doc:</b> <b>Test Plan:</b> <b>Metrics (go/CrOSlaunchMetrics):</b>  ","jojwang@google.com"
+"spam","test","hmmm","zhangtiff@google.com"
+"spam","Chicken","<b>Feature description:</b>  <b>--</b> test <b>PRD:</b>ewre <b>Mocks:</b> <b>Design doc:</b> <b>Test Plan:</b> <b>Metrics (go/CrOSlaunchMetrics):</b>  ","jojwang@google.com"
+"spam","test","hmmm","zhangtiff@google.com"
+"ham","Chicken","<b>Feature description:</b>  <b>--</b> test <b>PRD:</b>ewre <b>Mocks:</b> <b>Design doc:</b> <b>Test Plan:</b> <b>Metrics (go/CrOSlaunchMetrics):</b>  ","jojwang@google.com"
+"spam","test","hmmm","zhangtiff@google.com"
+"ham","Chicken","<b>Feature description:</b>  <b>--</b> test <b>PRD:</b>ewre <b>Mocks:</b> <b>Design doc:</b> <b>Test Plan:</b> <b>Metrics (go/CrOSlaunchMetrics):</b>  ","jojwang@google.com"
+"ham","Chicken","<b>Feature description:</b>  <b>--</b> test <b>PRD:</b>ewre <b>Mocks:</b> <b>Design doc:</b> <b>Test Plan:</b> <b>Metrics (go/CrOSlaunchMetrics):</b>  ","jojwang@google.com"
+"ham","Chicken","<b>Feature description:</b>  <b>--</b> test <b>PRD:</b>ewre <b>Mocks:</b> <b>Design doc:</b> <b>Test Plan:</b> <b>Metrics (go/CrOSlaunchMetrics):</b>  ","jojwang@google.com"
+"ham","Chicken","<b>Feature description:</b>  <b>--</b> test <b>PRD:</b>ewre <b>Mocks:</b> <b>Design doc:</b> <b>Test Plan:</b> <b>Metrics (go/CrOSlaunchMetrics):</b>  ","jojwang@google.com"
+"ham","Chicken","<b>Feature description:</b>  <b>--</b> test <b>PRD:</b>ewre <b>Mocks:</b> <b>Design doc:</b> <b>Test Plan:</b> <b>Metrics (go/CrOSlaunchMetrics):</b>  ","jojwang@google.com"
+"ham","Chicken","<b>Feature description:</b>  <b>--</b> test <b>PRD:</b>ewre <b>Mocks:</b> <b>Design doc:</b> <b>Test Plan:</b> <b>Metrics (go/CrOSlaunchMetrics):</b>  ","jojwang@google.com"
diff --git a/tools/ml/setup.py b/tools/ml/setup.py
new file mode 100644
index 0000000..728cd55
--- /dev/null
+++ b/tools/ml/setup.py
@@ -0,0 +1,19 @@
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from setuptools import find_packages
+from setuptools import setup
+
+REQUIRED_PACKAGES = ['google-cloud-storage']
+
+setup(
+  name='trainer',
+  version='0.1',
+  install_requires=REQUIRED_PACKAGES,
+  packages=find_packages(),
+  include_package_data=True,
+  description="""Trainer application package for training a spam classification
+                 model in ML Engine and storing the saved model and accuracy
+                 results in GCS."""
+)
diff --git a/tools/ml/spam.py b/tools/ml/spam.py
new file mode 100755
index 0000000..afc9d4d
--- /dev/null
+++ b/tools/ml/spam.py
@@ -0,0 +1,159 @@
+#!/usr/bin/env python
+# 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
+
+"""
+Spam classifier command line tools.
+
+Use this command to submit predictions locally or to the model running
+in production. See tools/spam/README.md for more context on training
+and model operations.
+
+Note that in order for this command to work, you must be logged into
+gcloud in the project under which you wish to run commands.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import argparse
+import json
+import os
+import re
+import sys
+import googleapiclient
+
+from google.cloud.storage import client, bucket, blob
+import ml_helpers
+from apiclient.discovery import build
+from oauth2client.client import GoogleCredentials
+
+credentials = GoogleCredentials.get_application_default()
+
+# This must be identical with settings.spam_feature_hashes.
+SPAM_FEATURE_HASHES = 500
+
+MODEL_NAME = 'spam_only_words'
+
+
+def Predict(args):
+  ml = googleapiclient.discovery.build('ml', 'v1', credentials=credentials)
+
+  with open(args.summary) as f:
+    summary = f.read()
+  with open(args.content) as f:
+    content = f.read()
+
+  instance = ml_helpers.GenerateFeaturesRaw([summary, content],
+    SPAM_FEATURE_HASHES)
+
+  project_ID = 'projects/%s' % args.project
+  full_model_name = '%s/models/%s' % (project_ID, MODEL_NAME)
+  request = ml.projects().predict(name=full_model_name, body={
+    'instances': [{'inputs': instance['word_hashes']}]
+  })
+
+  try:
+    response = request.execute()
+    print(response)
+  except googleapiclient.errors.HttpError, err:
+    print('There was an error. Check the details:')
+    print(err._get_reason())
+
+
+def LocalPredict(_):
+  print('This will write /tmp/instances.json.')
+  print('Then you can call:')
+  print(('gcloud ml-engine local predict --json-instances /tmp/instances.json'
+    ' --model-dir {model_dir}'))
+
+  summary = raw_input('Summary: ')
+  description = raw_input('Description: ')
+  instance = ml_helpers.GenerateFeaturesRaw([summary, description],
+    SPAM_FEATURE_HASHES)
+
+  with open('/tmp/instances.json', 'w') as f:
+    json.dump({'inputs': instance['word_hashes']}, f)
+
+
+def get_auc(model_name, bucket_obj):
+  bucket_obj.blob = blob.Blob('%s/eval_data.json' % model_name, bucket_obj)
+  data = bucket_obj.blob.download_as_string()
+  data_dict = json.loads(data)
+  return data_dict['auc'], data_dict['auc_precision_recall']
+
+
+def CompareAccuracy(args):
+  client_obj = client.Client(project=args.project)
+  bucket_name = '%s-mlengine' % args.project
+  bucket_obj = bucket.Bucket(client_obj, bucket_name)
+
+  model1_auc, model1_auc_pr = get_auc(args.model1, bucket_obj)
+  print('%s:\nAUC: %f\tAUC Precision/Recall: %f\n'
+        % (args.model1, model1_auc, model1_auc_pr))
+
+  model2_auc, model2_auc_pr = get_auc(args.model2, bucket_obj)
+  print('%s:\nAUC: %f\tAUC Precision/Recall: %f'
+        % (args.model2, model2_auc, model2_auc_pr))
+
+
+def main():
+  if not credentials and 'GOOGLE_APPLICATION_CREDENTIALS' not in os.environ:
+    print(('GOOGLE_APPLICATION_CREDENTIALS environment variable is not set. '
+          'Exiting.'))
+    sys.exit(1)
+
+  parser = argparse.ArgumentParser(description='Spam classifier utilities.')
+  parser.add_argument('--project', '-p', default='monorail-staging')
+
+  project = parser.parse_known_args()
+  subparsers = parser.add_subparsers(dest='command')
+
+  predict = subparsers.add_parser('predict',
+    help='Submit a prediction to the default model in ML Engine.')
+  predict.add_argument('--summary', help='A file containing the summary.')
+  predict.add_argument('--content', help='A file containing the content.')
+
+  subparsers.add_parser('local-predict',
+    help='Create an instance on the local filesystem to use in prediction.')
+
+  ml = googleapiclient.discovery.build('ml', 'v1', credentials=credentials)
+
+  request = ml.projects().models().get(name='projects/%s/models/%s'
+                                       % (project[0].project, MODEL_NAME))
+  response = request.execute()
+
+  default_version = re.search(
+      '.*(spam_trainer_\d+).*',
+      response['defaultVersion']['deploymentUri']).group(1)
+
+  compare = subparsers.add_parser('compare-accuracy',
+                                  help='Compare the accuracy of two models.')
+
+  compare.add_argument('--model1',
+                       default=default_version,
+                       help='The first model to find the auc values of.')
+
+  # TODO(carapew): Make second default the most recently deployed model
+  compare.add_argument('--model2',
+                       default='spam_trainer_1513384515'
+                       if project[0].project == 'monorail-staging' else
+                       'spam_trainer_1522141200',
+                       help='The second model to find the auc values of.')
+
+  args = parser.parse_args()
+
+  cmds = {
+    'predict':  Predict,
+    'local-predict':  LocalPredict,
+    'compare-accuracy': CompareAccuracy,
+  }
+  res = cmds[args.command](args)
+
+  print(json.dumps(res, indent=2))
+
+
+if __name__ == '__main__':
+  main()
diff --git a/tools/ml/trainer/__init__.py b/tools/ml/trainer/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/ml/trainer/__init__.py
diff --git a/tools/ml/trainer/dataset.py b/tools/ml/trainer/dataset.py
new file mode 100644
index 0000000..0def4b6
--- /dev/null
+++ b/tools/ml/trainer/dataset.py
@@ -0,0 +1,95 @@
+# Copyright 2018 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import StringIO
+import tensorflow as tf
+
+import csv
+import sys
+from googleapiclient import discovery
+from googleapiclient import errors
+from oauth2client.client import GoogleCredentials
+
+import trainer.ml_helpers
+
+
+def fetch_training_data(bucket, prefix, trainer_type):
+
+  credentials = GoogleCredentials.get_application_default()
+  storage = discovery.build('storage', 'v1', credentials=credentials)
+  objects = storage.objects()
+
+  request = objects.list(bucket=bucket, prefix=prefix)
+  response = make_api_request(request)
+  items = response.get('items')
+  csv_filepaths = [blob.get('name') for blob in items]
+
+  if trainer_type == 'spam':
+    return fetch_spam(csv_filepaths, bucket, objects)
+  else:
+    return fetch_component(csv_filepaths, bucket, objects)
+
+
+def fetch_spam(csv_filepaths, bucket, objects):
+
+  training_data = []
+  # Add code
+  csv_filepaths = [
+    'spam-training-data/full-android.csv',
+    'spam-training-data/full-support.csv',
+  ] + csv_filepaths
+
+  for filepath in csv_filepaths:
+    media = fetch_training_csv(filepath, objects, bucket)
+    rows, skipped_rows = trainer.ml_helpers.spam_from_file(
+        StringIO.StringIO(media))
+
+    if len(rows):
+      training_data.extend(rows)
+
+    tf.logging.info('{:<40}{:<20}{:<20}'.format(
+        filepath,
+        'added %d rows' % len(rows),
+        'skipped %d rows' % skipped_rows))
+
+  return training_data
+
+
+def fetch_component(csv_filepaths, bucket, objects):
+
+  training_data = []
+  for filepath in csv_filepaths:
+    media = fetch_training_csv(filepath, objects, bucket)
+    rows = trainer.ml_helpers.component_from_file(
+        StringIO.StringIO(media))
+
+    if len(rows):
+      training_data.extend(rows)
+
+    tf.logging.info('{:<40}{:<20}'.format(
+        filepath,
+        'added %d rows' % len(rows)))
+
+  return training_data
+
+
+def fetch_training_csv(filepath, objects, bucket):
+  request = objects.get_media(bucket=bucket, object=filepath)
+  return make_api_request(request)
+
+
+def make_api_request(request):
+  try:
+    return request.execute()
+  except errors.HttpError, err:
+    tf.logging.error('There was an error with the API. Details:')
+    tf.logging.error(err._get_reason())
+    raise
+
+
diff --git a/tools/ml/trainer/ml_helpers.py b/tools/ml/trainer/ml_helpers.py
new file mode 120000
index 0000000..c790a2c
--- /dev/null
+++ b/tools/ml/trainer/ml_helpers.py
@@ -0,0 +1 @@
+../../../services/ml_helpers.py
\ No newline at end of file
diff --git a/tools/ml/trainer/model.py b/tools/ml/trainer/model.py
new file mode 100644
index 0000000..3b627a9
--- /dev/null
+++ b/tools/ml/trainer/model.py
@@ -0,0 +1,109 @@
+# Copyright 2018 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
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+import numpy as np
+import tensorflow as tf
+
+from trainer.ml_helpers import COMPONENT_FEATURES
+from trainer.ml_helpers import SPAM_FEATURE_HASHES
+
+# Important: we assume this list mirrors the output of GenerateFeaturesRaw.
+INPUT_COLUMNS = {'component': [
+                     tf.feature_column.numeric_column(
+                         key='word_features',
+                         shape=(COMPONENT_FEATURES,)),
+                 ],
+                 'spam': [
+                     tf.feature_column.numeric_column(
+                         key='word_hashes',
+                         shape=(SPAM_FEATURE_HASHES,)),
+                 ]}
+
+
+def build_estimator(config, trainer_type, class_count):
+  """Returns a tf.Estimator.
+
+  Args:
+    config: tf.contrib.learn.RunConfig defining the runtime environment for the
+      estimator (including model_dir).
+  Returns:
+    A LinearClassifier
+  """
+  return tf.contrib.learn.DNNClassifier(
+    config=config,
+    feature_columns=(INPUT_COLUMNS[trainer_type]),
+    hidden_units=[1024, 512, 256],
+    optimizer=tf.train.AdamOptimizer(learning_rate=0.001,
+      beta1=0.9,
+      beta2=0.999,
+      epsilon=1e-08,
+      use_locking=False,
+      name='Adam'),
+    n_classes=class_count
+  )
+
+
+def feature_list_to_dict(X, trainer_type):
+  """Converts an array of feature dicts into to one dict of
+    {feature_name: [feature_values]}.
+
+  Important: this assumes the ordering of X and INPUT_COLUMNS is the same.
+
+  Args:
+    X: an array of feature dicts
+  Returns:
+    A dictionary where each key is a feature name its value is a numpy array of
+    shape (len(X),).
+  """
+  feature_dict = {}
+
+  for feature_column in INPUT_COLUMNS[trainer_type]:
+    feature_dict[feature_column.name] = []
+
+  for instance in X:
+    for key in instance.keys():
+      feature_dict[key].append(instance[key])
+
+  for key in [f.name for f in INPUT_COLUMNS[trainer_type]]:
+    feature_dict[key] = np.array(feature_dict[key])
+
+  return feature_dict
+
+
+def generate_json_serving_input_fn(trainer_type):
+  def json_serving_input_fn():
+    """Build the serving inputs.
+
+    Returns:
+      An InputFnOps containing features with placeholders.
+    """
+    features_placeholders = {}
+    for column in INPUT_COLUMNS[trainer_type]:
+      name = '%s_placeholder' % column.name
+
+      # Special case non-scalar features.
+      if column.shape[0] > 1:
+        shape = [None, column.shape[0]]
+      else:
+        shape = [None]
+
+      placeholder = tf.placeholder(tf.float32, shape, name=name)
+      features_placeholders[column.name] = placeholder
+
+    labels = None # Unknown at serving time
+    return tf.contrib.learn.InputFnOps(features_placeholders, labels,
+      features_placeholders)
+
+  return json_serving_input_fn
+
+
+SERVING_FUNCTIONS = {
+    'JSON-component': generate_json_serving_input_fn('component'),
+    'JSON-spam':  generate_json_serving_input_fn('spam')
+}
diff --git a/tools/ml/trainer/task.py b/tools/ml/trainer/task.py
new file mode 100644
index 0000000..7416c68
--- /dev/null
+++ b/tools/ml/trainer/task.py
@@ -0,0 +1,284 @@
+# Copyright 2018 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
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+import argparse
+import json
+import os
+import re
+
+import numpy as np
+import tensorflow as tf
+from googleapiclient import discovery
+from googleapiclient import errors
+from oauth2client.client import GoogleCredentials
+from sklearn.model_selection import train_test_split
+from tensorflow.contrib.learn.python.learn import learn_runner
+from tensorflow.contrib.learn.python.learn.estimators import run_config
+from tensorflow.contrib.learn.python.learn.utils import saved_model_export_utils
+from tensorflow.contrib.training.python.training import hparam
+
+from google.cloud.storage import blob, bucket, client
+
+import trainer.dataset
+import trainer.model
+import trainer.ml_helpers
+import trainer.top_words
+
+def generate_experiment_fn(**experiment_args):
+  """Create an experiment function.
+
+  Args:
+    experiment_args: keyword arguments to be passed through to experiment
+      See `tf.contrib.learn.Experiment` for full args.
+  Returns:
+    A function:
+      (tf.contrib.learn.RunConfig, tf.contrib.training.HParams) -> Experiment
+
+    This function is used by learn_runner to create an Experiment which
+    executes model code provided in the form of an Estimator and
+    input functions.
+  """
+  def _experiment_fn(config, hparams):
+    index_to_component = {}
+
+    if hparams.train_file:
+      with open(hparams.train_file) as f:
+        if hparams.trainer_type == 'spam':
+          training_data = trainer.ml_helpers.spam_from_file(f)
+        else:
+          training_data = trainer.ml_helpers.component_from_file(f)
+    else:
+      training_data = trainer.dataset.fetch_training_data(hparams.gcs_bucket,
+        hparams.gcs_prefix, hparams.trainer_type)
+
+    tf.logging.info('Training data received. Len: %d' % len(training_data))
+
+    if hparams.trainer_type == 'spam':
+      X, y = trainer.ml_helpers.transform_spam_csv_to_features(
+          training_data)
+    else:
+      top_list = trainer.top_words.make_top_words_list(hparams.job_dir)
+      X, y, index_to_component = trainer.ml_helpers \
+          .transform_component_csv_to_features(training_data, top_list)
+
+    tf.logging.info('Features generated')
+    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2,
+      random_state=42)
+
+    train_input_fn = tf.estimator.inputs.numpy_input_fn(
+      x=trainer.model.feature_list_to_dict(X_train, hparams.trainer_type),
+      y=np.array(y_train),
+      num_epochs=hparams.num_epochs,
+      batch_size=hparams.train_batch_size,
+      shuffle=True
+    )
+    eval_input_fn = tf.estimator.inputs.numpy_input_fn(
+      x=trainer.model.feature_list_to_dict(X_test, hparams.trainer_type),
+      y=np.array(y_test),
+      num_epochs=None,
+      batch_size=hparams.eval_batch_size,
+      shuffle=False # Don't shuffle evaluation data
+    )
+
+    tf.logging.info('Numpy fns created')
+    if hparams.trainer_type == 'component':
+      store_component_conversion(hparams.job_dir, index_to_component)
+
+    return tf.contrib.learn.Experiment(
+      trainer.model.build_estimator(config=config,
+                                    trainer_type=hparams.trainer_type,
+                                    class_count=len(set(y))),
+      train_input_fn=train_input_fn,
+      eval_input_fn=eval_input_fn,
+      **experiment_args
+    )
+  return _experiment_fn
+
+
+def store_component_conversion(job_dir, data):
+
+  tf.logging.info('job_dir: %s' % job_dir)
+  job_info = re.search('gs://(monorail-.+)-mlengine/(component_trainer_\d+)',
+                       job_dir)
+
+  # Check if training is being done on GAE or locally.
+  if job_info:
+    project = job_info.group(1)
+    job_name = job_info.group(2)
+
+    client_obj = client.Client(project=project)
+    bucket_name = '%s-mlengine' % project
+    bucket_obj = bucket.Bucket(client_obj, bucket_name)
+
+    bucket_obj.blob = blob.Blob(job_name + '/component_index.json', bucket_obj)
+
+    bucket_obj.blob.upload_from_string(json.dumps(data),
+                                       content_type='application/json')
+
+  else:
+    paths = job_dir.split('/')
+    for y, _ in enumerate(list(range(1, len(paths))), 1):
+      if not os.path.exists("/".join(paths[:y+1])):
+        os.makedirs('/'.join(paths[:y+1]))
+    with open(job_dir + '/component_index.json', 'w') as f:
+      f.write(json.dumps(data))
+
+
+def store_eval(job_dir, results):
+
+  tf.logging.info('job_dir: %s' % job_dir)
+  job_info = re.search('gs://(monorail-.+)-mlengine/(spam_trainer_\d+)',
+                       job_dir)
+
+  # Only upload eval data if this is not being run locally.
+  if job_info:
+    project = job_info.group(1)
+    job_name = job_info.group(2)
+
+    tf.logging.info('project: %s' % project)
+    tf.logging.info('job_name: %s' % job_name)
+
+    client_obj = client.Client(project=project)
+    bucket_name = '%s-mlengine' % project
+    bucket_obj = bucket.Bucket(client_obj, bucket_name)
+
+    bucket_obj.blob = blob.Blob(job_name + '/eval_data.json', bucket_obj)
+    for key, value in results[0].items():
+      if isinstance(value, np.float32):
+        results[0][key] = value.item()
+
+    bucket_obj.blob.upload_from_string(json.dumps(results[0]),
+                                       content_type='application/json')
+
+  else:
+    tf.logging.error('Could not find bucket "%s" to output evalution to.'
+                     % job_dir)
+
+
+if __name__ == '__main__':
+  parser = argparse.ArgumentParser()
+
+  # Input Arguments
+  parser.add_argument(
+    '--train-file',
+    help='GCS or local path to training data',
+  )
+  parser.add_argument(
+    '--gcs-bucket',
+    help='GCS bucket for training data.',
+  )
+  parser.add_argument(
+    '--gcs-prefix',
+    help='Training data path prefix inside GCS bucket.',
+  )
+  parser.add_argument(
+    '--num-epochs',
+    help="""\
+    Maximum number of training data epochs on which to train.
+    If both --max-steps and --num-epochs are specified,
+    the training job will run for --max-steps or --num-epochs,
+    whichever occurs first. If unspecified will run for --max-steps.\
+    """,
+    type=int,
+  )
+  parser.add_argument(
+    '--train-batch-size',
+    help='Batch size for training steps',
+    type=int,
+    default=128
+  )
+  parser.add_argument(
+    '--eval-batch-size',
+    help='Batch size for evaluation steps',
+    type=int,
+    default=128
+  )
+
+  # Training arguments
+  parser.add_argument(
+    '--job-dir',
+    help='GCS location to write checkpoints and export models',
+    required=True
+  )
+
+  # Logging arguments
+  parser.add_argument(
+    '--verbosity',
+    choices=[
+        'DEBUG',
+        'ERROR',
+        'FATAL',
+        'INFO',
+        'WARN'
+    ],
+    default='INFO',
+  )
+
+  # Experiment arguments
+  parser.add_argument(
+    '--eval-delay-secs',
+    help='How long to wait before running first evaluation',
+    default=10,
+    type=int
+  )
+  parser.add_argument(
+    '--min-eval-frequency',
+    help='Minimum number of training steps between evaluations',
+    default=None,  # Use TensorFlow's default (currently, 1000)
+    type=int
+  )
+  parser.add_argument(
+    '--train-steps',
+    help="""\
+    Steps to run the training job for. If --num-epochs is not specified,
+    this must be. Otherwise the training job will run indefinitely.\
+    """,
+    type=int
+  )
+  parser.add_argument(
+    '--eval-steps',
+    help='Number of steps to run evalution for at each checkpoint',
+    default=100,
+    type=int
+  )
+  parser.add_argument(
+    '--trainer-type',
+    help='Which trainer to use (spam or component)',
+    choices=['spam', 'component'],
+    required=True
+  )
+
+  args = parser.parse_args()
+
+  tf.logging.set_verbosity(args.verbosity)
+
+  # Run the training job
+  # learn_runner pulls configuration information from environment
+  # variables using tf.learn.RunConfig and uses this configuration
+  # to conditionally execute Experiment, or param server code.
+  eval_results = learn_runner.run(
+    generate_experiment_fn(
+      min_eval_frequency=args.min_eval_frequency,
+      eval_delay_secs=args.eval_delay_secs,
+      train_steps=args.train_steps,
+      eval_steps=args.eval_steps,
+      export_strategies=[saved_model_export_utils.make_export_strategy(
+        trainer.model.SERVING_FUNCTIONS['JSON-' + args.trainer_type],
+        exports_to_keep=1,
+        default_output_alternative_key=None,
+      )],
+    ),
+    run_config=run_config.RunConfig(model_dir=args.job_dir),
+    hparams=hparam.HParams(**args.__dict__)
+  )
+
+  # Store a json blob in GCS with the results of training job (AUC of
+  # precision/recall, etc).
+  if args.trainer_type == 'spam':
+    store_eval(args.job_dir, eval_results)
diff --git a/tools/ml/trainer/top_words.py b/tools/ml/trainer/top_words.py
new file mode 100644
index 0000000..26da211
--- /dev/null
+++ b/tools/ml/trainer/top_words.py
@@ -0,0 +1,127 @@
+# Copyright 2018 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
+
+from __future__ import absolute_import
+from __future__ import division
+from __future__ import print_function
+
+import csv
+import os
+import re
+import StringIO
+import sys
+import tensorflow as tf
+import time
+
+from googleapiclient import discovery
+from googleapiclient import errors
+from oauth2client.client import GoogleCredentials
+import google
+from google.cloud.storage import blob, bucket, client
+
+import trainer.ml_helpers
+import trainer.dataset
+
+
+TOP_WORDS = 'topwords.txt'
+STOP_WORDS = 'stopwords.txt'
+
+
+def fetch_stop_words(project_id, objects):
+  request = objects.get_media(bucket=project_id + '-mlengine',
+                              object=STOP_WORDS)
+  response = trainer.dataset.make_api_request(request)
+  return response.split()
+
+
+def fetch_training_csv(filepath, objects, b):
+  request = objects.get_media(bucket=b, object=filepath)
+  return trainer.dataset.make_api_request(request)
+
+
+def GenerateTopWords(objects, word_dict, project_id):
+  stop_words = fetch_stop_words(project_id, objects)
+  sorted_words = sorted(word_dict, key=word_dict.get, reverse=True)
+
+  top_words = []
+  index = 0
+
+  while len(top_words) < trainer.ml_helpers.COMPONENT_FEATURES:
+    if sorted_words[index] not in stop_words:
+      top_words.append(sorted_words[index])
+    index += 1
+
+  return top_words
+
+
+def make_top_words_list(job_dir):
+  """Returns the top (most common) words in the entire dataset for component
+  prediction. If a file is already stored in GCS containing these words, the
+  words from the file are simply returned. Otherwise, the most common words are
+  determined and written to GCS, before being returned.
+
+  Returns:
+    A list of the most common words in the dataset (the number of them
+    determined by ml_helpers.COMPONENT_FEATURES).
+  """
+
+  credentials = GoogleCredentials.get_application_default()
+  storage = discovery.build('storage', 'v1', credentials=credentials)
+  objects = storage.objects()
+
+  subpaths = re.match('gs://(monorail-.*)-mlengine/(component_trainer_\d+)',
+                      job_dir)
+
+  if subpaths:
+    project_id = subpaths.group(1)
+    trainer_folder = subpaths.group(2)
+  else:
+    project_id = 'monorail-prod'
+
+  storage_bucket = project_id + '.appspot.com'
+  request = objects.list(bucket=storage_bucket,
+                         prefix='component_training_data')
+
+  response = trainer.dataset.make_api_request(request)
+
+  items = response.get('items')
+  csv_filepaths = [b.get('name') for b in items]
+
+  final_string = ''
+
+  for word in parse_words(csv_filepaths, objects, storage_bucket, project_id):
+    final_string += word + '\n'
+
+  if subpaths:
+    client_obj = client.Client(project=project_id)
+    bucket_obj = bucket.Bucket(client_obj, project_id + '-mlengine')
+
+    bucket_obj.blob = google.cloud.storage.blob.Blob(trainer_folder
+                                                   + '/'
+                                                   + TOP_WORDS,
+                                                   bucket_obj)
+    bucket_obj.blob.upload_from_string(final_string,
+                                       content_type='text/plain')
+  return final_string.split()
+
+
+def parse_words(files, objects, b, project_id):
+  word_dict = {}
+
+  csv.field_size_limit(sys.maxsize)
+  for filepath in files:
+    media = fetch_training_csv(filepath, objects, b)
+
+    for row in csv.reader(StringIO.StringIO(media)):
+      _, content = row
+      words = content.split()
+
+      for word in words:
+        if word in word_dict:
+          word_dict[word] += 1
+        else:
+          word_dict[word] = 1
+
+  return GenerateTopWords(objects, word_dict, project_id)
diff --git a/tools/ml/trainer2/README.md b/tools/ml/trainer2/README.md
new file mode 100644
index 0000000..d32c8bf
--- /dev/null
+++ b/tools/ml/trainer2/README.md
@@ -0,0 +1,35 @@
+### Trainer
+
+## Monorail Spam Classifier
+
+To have the trainer run locally, you'll need to supply the
+`--train-file` arguments.
+
+```sh
+TRAIN_FILE=./spam_training_examples.csv
+OUTPUT_DIR=/tmp/monospam-local-training/
+rm -rf $OUTPUT_DIR
+python3 ./task.py \
+    --train-file $TRAIN_FILE \
+    --job-dir $OUTPUT_DIR \
+    --train-steps 1000 \
+    --verbosity DEBUG \
+    --trainer-type spam
+```
+## Monorail Component Predictor
+
+To have the trainer run locally, you'll need to supply the
+`--train-file` arguments.
+
+```sh
+TRAIN_FILE=./component_training_examples.csv
+OUTPUT_DIR=/tmp/monospam-local-training/
+rm -rf $OUTPUT_DIR
+python3 ./task.py \
+    --train-file $TRAIN_FILE \
+    --job-dir $OUTPUT_DIR \
+    --train-steps 10000 \
+    --eval-steps 1000 \
+    --verbosity DEBUG \
+    --trainer-type component
+```
\ No newline at end of file
diff --git a/tools/ml/trainer2/__init__.py b/tools/ml/trainer2/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/ml/trainer2/__init__.py
diff --git a/tools/ml/trainer2/dataset.py b/tools/ml/trainer2/dataset.py
new file mode 100644
index 0000000..9e7ae77
--- /dev/null
+++ b/tools/ml/trainer2/dataset.py
@@ -0,0 +1,95 @@
+# Copyright 2020 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
+
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import io
+import tensorflow as tf
+
+from googleapiclient import discovery
+from googleapiclient import errors
+from oauth2client.client import GoogleCredentials
+
+from trainer2 import train_ml_helpers
+
+
+def fetch_training_data(bucket, prefix, trainer_type):
+
+  credentials = GoogleCredentials.get_application_default()
+  storage = discovery.build('storage', 'v1', credentials=credentials)
+  objects = storage.objects()
+
+  request = objects.list(bucket=bucket, prefix=prefix)
+  response = make_api_request(request)
+  items = response.get('items')
+  csv_filepaths = [blob.get('name') for blob in items]
+
+  if trainer_type == 'spam':
+    return fetch_spam(csv_filepaths, bucket, objects)
+  else:
+    return fetch_component(csv_filepaths, bucket, objects)
+
+
+def fetch_spam(csv_filepaths, bucket, objects):
+
+  all_contents = []
+  all_labels = []
+  # Add code
+  csv_filepaths = [
+      'spam-training-data/full-android.csv',
+      'spam-training-data/full-support.csv',
+  ] + csv_filepaths
+
+  for filepath in csv_filepaths:
+    media = fetch_training_csv(filepath, objects, bucket)
+    contents, labels, skipped_rows = train_ml_helpers.spam_from_file(
+        io.StringIO(media))
+
+    # Sanity check: the contents and labels should be matched pairs.
+    if len(contents) == len(labels) != 0:
+      all_contents.extend(contents)
+      all_labels.extend(labels)
+
+    tf.get_logger().info(
+        '{:<40}{:<20}{:<20}'.format(
+            filepath, 'added %d rows' % len(contents),
+            'skipped %d rows' % skipped_rows))
+
+  return all_contents, all_labels
+
+
+def fetch_component(csv_filepaths, bucket, objects):
+
+  all_contents = []
+  all_labels = []
+  for filepath in csv_filepaths:
+    media = fetch_training_csv(filepath, objects, bucket)
+    contents, labels = train_ml_helpers.component_from_file(io.StringIO(media))
+
+    # Sanity check: the contents and labels should be matched pairs.
+    if len(contents) == len(labels) != 0:
+      all_contents.extend(contents)
+      all_labels.extend(labels)
+
+    tf.get_logger().info(
+        '{:<40}{:<20}'.format(filepath, 'added %d rows' % len(contents)))
+
+  return all_contents, all_labels
+
+
+def fetch_training_csv(filepath, objects, bucket):
+  request = objects.get_media(bucket=bucket, object=filepath)
+  return str(make_api_request(request), 'utf-8')
+
+
+def make_api_request(request):
+  try:
+    return request.execute()
+  except errors.HttpError as err:
+    tf.get_logger().error('There was an error with the API. Details:')
+    tf.get_logger().error(err._get_reason())
+    raise
diff --git a/tools/ml/trainer2/model.py b/tools/ml/trainer2/model.py
new file mode 100644
index 0000000..823d0d1
--- /dev/null
+++ b/tools/ml/trainer2/model.py
@@ -0,0 +1,45 @@
+# Copyright 2019 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
+
+from __future__ import absolute_import
+
+import tensorflow as tf
+
+from trainer2.train_ml_helpers import COMPONENT_FEATURES
+from trainer2.train_ml_helpers import SPAM_FEATURE_HASHES
+
+# Important: we assume this list mirrors the output of GenerateFeaturesRaw.
+INPUT_COLUMNS = {'component': [
+                     tf.feature_column.numeric_column(
+                         key='word_features',
+                         shape=(COMPONENT_FEATURES,)),
+                 ],
+                 'spam': [
+                     tf.feature_column.numeric_column(
+                         key='word_hashes',
+                         shape=(SPAM_FEATURE_HASHES,)),
+                 ]}
+
+def build_estimator(config, job_dir, trainer_type, class_count):
+  """Returns a tf.Estimator.
+
+  Args:
+    config: tf.contrib.learn.RunConfig defining the runtime environment for the
+      estimator (including model_dir).
+  Returns:
+    A LinearClassifier
+  """
+  return tf.estimator.DNNClassifier(
+    config=config,
+    model_dir=job_dir,
+    feature_columns=(INPUT_COLUMNS[trainer_type]),
+    hidden_units=[1024, 512, 256],
+    optimizer=tf.keras.optimizers.Adam(learning_rate=0.001,
+      beta_1=0.9,
+      beta_2=0.999,
+      epsilon=1e-08,
+      name='Adam'),
+    n_classes=class_count
+  )
diff --git a/tools/ml/trainer2/requirements.txt b/tools/ml/trainer2/requirements.txt
new file mode 100644
index 0000000..7ff5ef7
--- /dev/null
+++ b/tools/ml/trainer2/requirements.txt
@@ -0,0 +1,3 @@
+google-cloud-storage==1.26.0
+tensorflow==2.1.0
+scikit-learn[alldeps]
diff --git a/tools/ml/trainer2/stopwords.py b/tools/ml/trainer2/stopwords.py
new file mode 100644
index 0000000..c4e4c31
--- /dev/null
+++ b/tools/ml/trainer2/stopwords.py
@@ -0,0 +1,21 @@
+# Copyright 2019 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
+
+# A list of stopwords to parse text in component predictor.
+STOP_WORDS = ['i', 'me', 'my', 'myself', 'we', 'our', 'ours',
+  'ourselves', 'you', 'your', 'yours', 'yourself', 'yourselves',
+  'he', 'him', 'his', 'himself', 'she', 'her', 'hers', 'herself',
+  'it', 'its', 'itself', 'they', 'them', 'their', 'theirs', 'themselves',
+  'what', 'which', 'who', 'whom', 'this', 'that', 'these', 'those', 'am',
+  'is', 'are', 'was', 'were', 'be', 'been', 'being', 'have', 'has', 'had',
+  'having', 'do', 'does', 'did', 'doing', 'a', 'an', 'the', 'and', 'but',
+  'if', 'or', 'because', 'as', 'until', 'while', 'of', 'at', 'by', 'for',
+  'with', 'about', 'against', 'between', 'into', 'through', 'during',
+  'before', 'after', 'above', 'below', 'to', 'from', 'up', 'down', 'in',
+  'out', 'on', 'off', 'over', 'under', 'again', 'further', 'then', 'once',
+  'here', 'there', 'when', 'where', 'why', 'how', 'all', 'any', 'both',
+  'each', 'few', 'more', 'most', 'other', 'some', 'such', 'no', 'nor',
+  'not', 'only', 'own', 'same', 'so', 'than', 'too', 'very', 's', 't',
+  'can', 'will', 'just', 'don', 'should', 'now']
diff --git a/tools/ml/trainer2/task.py b/tools/ml/trainer2/task.py
new file mode 100644
index 0000000..2fa8580
--- /dev/null
+++ b/tools/ml/trainer2/task.py
@@ -0,0 +1,256 @@
+# Copyright 2019 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
+
+from __future__ import absolute_import
+
+import argparse
+import json
+import logging
+import os
+
+import tensorflow as tf
+from tensorflow.estimator import RunConfig
+from sklearn.model_selection import train_test_split
+
+from trainer2 import dataset
+from trainer2 import model
+from trainer2 import top_words
+from trainer2 import train_ml_helpers
+from trainer2.train_ml_helpers import COMPONENT_FEATURES
+from trainer2.train_ml_helpers import SPAM_FEATURE_HASHES
+
+INPUT_TYPE_MAP = {
+  'component': {'key': 'word_features', 'shape': (COMPONENT_FEATURES,)},
+  'spam': {'key': 'word_hashes', 'shape': (SPAM_FEATURE_HASHES,)}
+}
+
+
+def make_input_fn(trainer_type, features, targets,
+  num_epochs=None, shuffle=True, batch_size=128):
+  """Generate input function for training and testing.
+
+  Args:
+    trainer_type: spam / component
+    features: an array of features shape like INPUT_TYPE_MAP
+    targets: an array of labels with the same length of features
+    num_epochs: training epochs
+    batch_size: dataset batch size
+
+  Returns:
+    input function to feed into TrainSpec and EvalSpec.
+  """
+  def _input_fn():
+    def gen():
+      """Generator function to format feature and target. """
+      for feature, target in zip(features, targets):
+        yield feature[INPUT_TYPE_MAP[trainer_type]['key']], target
+
+    data = tf.data.Dataset.from_generator(
+        gen, (tf.float64, tf.int32),
+        output_shapes=(INPUT_TYPE_MAP[trainer_type]['shape'], ()))
+    data = data.map(lambda x, y: ({INPUT_TYPE_MAP[trainer_type]['key']: x}, y))
+    if shuffle:
+      data = data.shuffle(buffer_size=batch_size * 10)
+    data = data.repeat(num_epochs).batch(batch_size)
+    return data
+
+  return _input_fn
+
+
+def generate_json_input_fn(trainer_type):
+  """Generate ServingInputReceiver function for testing.
+
+  Args:
+    trainer_type: spam / component
+
+  Returns:
+    ServingInputReceiver function to feed into exporter.
+  """
+  feature_spec = {
+    INPUT_TYPE_MAP[trainer_type]['key']:
+    tf.io.FixedLenFeature(INPUT_TYPE_MAP[trainer_type]['shape'], tf.float32)
+  }
+  return tf.estimator.export.build_parsing_serving_input_receiver_fn(
+    feature_spec)
+
+
+def train_and_evaluate_model(config, hparams):
+  """Runs the local training job given provided command line arguments.
+
+  Args:
+    config: RunConfig object
+    hparams: dictionary passed by command line arguments
+
+  """
+
+  if hparams['train_file']:
+    with open(hparams['train_file']) as f:
+      if hparams['trainer_type'] == 'spam':
+        contents, labels, _ = train_ml_helpers.spam_from_file(f)
+      else:
+        contents, labels = train_ml_helpers.component_from_file(f)
+  else:
+    contents, labels = dataset.fetch_training_data(
+        hparams['gcs_bucket'], hparams['gcs_prefix'], hparams['trainer_type'])
+
+  logger.info('Training data received. Len: %d' % len(contents))
+
+  # Generate features and targets from extracted contents and labels.
+  if hparams['trainer_type'] == 'spam':
+    features, targets = train_ml_helpers \
+      .transform_spam_csv_to_features(contents, labels)
+  else:
+    #top_list = top_words.make_top_words_list(contents, hparams['job_dir'])
+    top_list = top_words.parse_words_from_content(contents)
+    features, targets, index_to_component = train_ml_helpers \
+      .transform_component_csv_to_features(contents, labels, top_list)
+
+  # Split training and testing set.
+  logger.info('Features generated')
+  features_train, features_test, targets_train, targets_test = train_test_split(
+      features, targets, test_size=0.2, random_state=42)
+
+  # Generate TrainSpec and EvalSpec for train and evaluate.
+  estimator = model.build_estimator(config=config,
+                                    job_dir=hparams['job_dir'],
+                                    trainer_type=hparams['trainer_type'],
+                                    class_count=len(set(labels)))
+  exporter = tf.estimator.LatestExporter(name='saved_model',
+    serving_input_receiver_fn=generate_json_input_fn(hparams['trainer_type']))
+
+  train_spec = tf.estimator.TrainSpec(
+    input_fn=make_input_fn(hparams['trainer_type'],
+    features_train, targets_train, num_epochs=hparams['num_epochs'],
+    batch_size=hparams['train_batch_size']),
+    max_steps=hparams['train_steps'])
+  eval_spec = tf.estimator.EvalSpec(
+    input_fn=make_input_fn(hparams['trainer_type'],
+    features_test, targets_test, shuffle=False,
+    batch_size=hparams['eval_batch_size']),
+    exporters=exporter, steps=hparams['eval_steps'])
+
+  if hparams['trainer_type'] == 'component':
+    store_component_conversion(hparams['job_dir'], index_to_component)
+
+  result = tf.estimator.train_and_evaluate(estimator, train_spec, eval_spec)
+  logging.info(result)
+
+  parsing_spec = tf.feature_column.make_parse_example_spec(
+      model.INPUT_COLUMNS[hparams['trainer_type']])
+  serving_input_fn = (
+      tf.estimator.export.build_parsing_serving_input_receiver_fn(parsing_spec))
+  estimator.export_saved_model(hparams['job_dir'], serving_input_fn)
+
+
+def store_component_conversion(job_dir, data):
+  logger.info('job_dir: %s' % job_dir)
+
+  # Store component conversion locally.
+  paths = job_dir.split('/')
+  for y, _ in enumerate(list(range(1, len(paths))), 1):
+    if not os.path.exists("/".join(paths[:y+1])):
+      os.makedirs('/'.join(paths[:y+1]))
+  with open(job_dir + '/component_index.json', 'w') as f:
+    f.write(json.dumps(data))
+
+
+if __name__ == '__main__':
+  parser = argparse.ArgumentParser()
+
+  # Input Arguments
+  parser.add_argument(
+      '--train-file',
+      help='GCS or local path to training data',
+  )
+  parser.add_argument(
+      '--gcs-bucket',
+      help='GCS bucket for training data.',
+  )
+  parser.add_argument(
+      '--gcs-prefix',
+      help='Training data path prefix inside GCS bucket.',
+  )
+  parser.add_argument(
+    '--num-epochs',
+    help="""\
+    Maximum number of training data epochs on which to train.
+    If both --train-steps and --num-epochs are specified,
+    the training job will run for --num-epochs.
+    If unspecified will run for --train-steps.\
+    """,
+    type=int,
+  )
+  parser.add_argument(
+    '--train-batch-size',
+    help='Batch size for training steps',
+    type=int,
+    default=128
+  )
+  parser.add_argument(
+    '--eval-batch-size',
+    help='Batch size for evaluation steps',
+    type=int,
+    default=128
+  )
+
+  # Training arguments
+  parser.add_argument(
+    '--job-dir',
+    help='GCS location to write checkpoints and export models',
+    required=True
+  )
+
+  # Logging arguments
+  parser.add_argument(
+    '--verbosity',
+    choices=[
+        'DEBUG',
+        'ERROR',
+        'CRITICAL',
+        'INFO',
+        'WARNING'
+    ],
+    default='INFO',
+  )
+
+  # Input function arguments
+  parser.add_argument(
+    '--train-steps',
+    help="""\
+    Steps to run the training job for. If --num-epochs is not specified,
+    this must be. Otherwise the training job will run indefinitely.\
+    """,
+    type=int,
+    required=True
+  )
+  parser.add_argument(
+    '--eval-steps',
+    help='Number of steps to run evalution for at each checkpoint',
+    default=100,
+    type=int
+  )
+  parser.add_argument(
+    '--trainer-type',
+    help='Which trainer to use (spam or component)',
+    choices=['spam', 'component'],
+    required=True
+  )
+
+  args = parser.parse_args()
+
+  logger = logging.getLogger()
+  logger.setLevel(getattr(logging, args.verbosity))
+
+  if not args.num_epochs:
+    args.num_epochs = args.train_steps
+
+  # Set C++ Graph Execution level verbosity.
+  os.environ['TF_CPP_MIN_LOG_LEVEL'] = str(
+    getattr(logging, args.verbosity) / 10)
+
+  # Run the training job.
+  train_and_evaluate_model(
+    config=RunConfig(model_dir=args.job_dir),
+    hparams=vars(args))
diff --git a/tools/ml/trainer2/top_words.py b/tools/ml/trainer2/top_words.py
new file mode 100644
index 0000000..bb57699
--- /dev/null
+++ b/tools/ml/trainer2/top_words.py
@@ -0,0 +1,66 @@
+# Copyright 2019 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
+
+from __future__ import absolute_import
+
+import os
+
+from trainer2 import train_ml_helpers
+from trainer2.stopwords import STOP_WORDS
+
+
+def GenerateTopWords(word_dict):
+  """Requires ./stopwords.txt exist in folder for the function to run.
+  """
+  stop_words = [s.encode('utf-8') for s in STOP_WORDS]
+  sorted_words = sorted(word_dict, key=word_dict.get, reverse=True)
+  top_words = []
+  index = 0
+
+  while len(top_words) < train_ml_helpers.COMPONENT_FEATURES:
+    if sorted_words[index] not in stop_words:
+      top_words.append(sorted_words[index])
+    index += 1
+
+  return top_words
+
+
+def parse_words_from_content(contents):
+  """Returns given list of strings, extract the top (most common) words.
+  """
+  word_dict = {}
+  for content in contents:
+    words = content.encode('utf-8').split()
+    for word in words:
+      if word in word_dict:
+        word_dict[word] += 1
+      else:
+        word_dict[word] = 1
+
+  return GenerateTopWords(word_dict)
+
+
+def make_top_words_list(contents, job_dir):
+  """Returns the top (most common) words in the entire dataset for component
+  prediction. If a file is already stored in job_dir containing these words, the
+  words from the file are simply returned. Otherwise, the most common words are
+  determined and written to job_dir, before being returned.
+
+  Returns:
+    A list of the most common words in the dataset (the number of them
+    determined by train_ml_helpers.COMPONENT_FEATURES).
+  """
+  if not os.path.exists(job_dir):
+    os.mkdir(job_dir)
+  if os.access(job_dir + 'topwords.txt', os.R_OK):
+    print("Found topwords.txt")
+    with open(job_dir + 'topwords.txt', 'rb') as f:
+      top_words = f.read().split()
+  else:
+    top_words = parse_words_from_content(contents)
+    with open(job_dir + 'topwords.txt', 'w') as f:
+      for word in top_words:
+        f.write('%s\n' % word.decode('utf-8'))
+  return top_words
diff --git a/tools/ml/trainer2/train_ml_helpers.py b/tools/ml/trainer2/train_ml_helpers.py
new file mode 100644
index 0000000..36113a2
--- /dev/null
+++ b/tools/ml/trainer2/train_ml_helpers.py
@@ -0,0 +1,158 @@
+# Copyright 2019 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
+
+"""
+Helper functions for spam and component classification. These are mostly for
+feature extraction, so that the serving code and training code both use the same
+set of features.
+TODO(jeffcarp): This file is duplicate of services/ml_helpers.py
+  (with slight difference). Will eventually be merged to one.
+"""
+
+from __future__ import absolute_import
+
+import csv
+import hashlib
+import re
+import sys
+
+SPAM_COLUMNS = ['verdict', 'subject', 'content', 'email']
+LEGACY_CSV_COLUMNS = ['verdict', 'subject', 'content']
+DELIMITERS = [r'\s', r'\,', r'\.', r'\?', r'!', r'\:', r'\(', r'\)']
+
+# Must be identical to settings.spam_feature_hashes.
+SPAM_FEATURE_HASHES = 500
+# Must be identical to settings.component_features.
+COMPONENT_FEATURES = 5000
+
+
+def _ComponentFeatures(content, num_features, top_words):
+  """
+    This uses the most common words in the entire dataset as features.
+    The count of common words in the issue comments makes up the features.
+  """
+
+  features = [0] * num_features
+  for blob in content:
+    words = blob.split()
+    for word in words:
+      if word in top_words:
+        features[top_words[word]] += 1
+
+  return features
+
+
+def _SpamHashFeatures(content, num_features):
+  """
+    Feature hashing is a fast and compact way to turn a string of text into a
+    vector of feature values for classification and training.
+    See also: https://en.wikipedia.org/wiki/Feature_hashing
+    This is a simple implementation that doesn't try to minimize collisions
+    or anything else fancy.
+  """
+  features = [0] * num_features
+  total = 0.0
+  for blob in content:
+    words = re.split('|'.join(DELIMITERS).encode('utf-8'), blob)
+    for word in words:
+      feature_index = int(int(hashlib.sha1(word).hexdigest(), 16)
+                          % num_features)
+      features[feature_index] += 1.0
+      total += 1.0
+
+  if total > 0:
+    features = [f / total for f in features]
+
+  return features
+
+
+def GenerateFeaturesRaw(content, num_features, top_words=None):
+  """Generates a vector of features for a given issue or comment.
+
+  Args:
+    content: The content of the issue's description and comments.
+    num_features: The number of features to generate.
+  """
+  # If we've been passed real unicode strings, convert them to just bytestrings.
+  for idx, value in enumerate(content):
+    content[idx] = value.encode('utf-8')
+  if top_words:
+    return {'word_features': _ComponentFeatures(content,
+                                                   num_features,
+                                                   top_words)}
+
+  return {'word_hashes': _SpamHashFeatures(content, num_features)}
+
+
+def transform_spam_csv_to_features(contents, labels):
+  """Generate arrays of features and targets for spam.
+  """
+  features = []
+  targets = []
+  for i, row in enumerate(contents):
+    subject, content = row
+    label = labels[i]
+    features.append(GenerateFeaturesRaw([str(subject), str(content)],
+                                 SPAM_FEATURE_HASHES))
+    targets.append(1 if label == 'spam' else 0)
+  return features, targets
+
+
+def transform_component_csv_to_features(contents, labels, top_list):
+  """Generate arrays of features and targets for components.
+  """
+  features = []
+  targets = []
+  top_words = {}
+
+  for i, row in enumerate(top_list):
+    top_words[row] = i
+
+  component_to_index = {}
+  index_to_component = {}
+  component_index = 0
+
+  for i, content in enumerate(contents):
+    component = labels[i]
+    component = str(component).split(",")[0]
+
+    if component not in component_to_index:
+      component_to_index[component] = component_index
+      index_to_component[component_index] = component
+      component_index += 1
+
+    features.append(GenerateFeaturesRaw([content],
+                                 COMPONENT_FEATURES,
+                                 top_words))
+    targets.append(component_to_index[component])
+
+  return features, targets, index_to_component
+
+
+def spam_from_file(f):
+  """Reads a training data file and returns arrays of contents and labels."""
+  contents = []
+  labels = []
+  skipped_rows = 0
+  for row in csv.reader(f):
+    if len(row) >= len(LEGACY_CSV_COLUMNS):
+      # Throw out email field.
+      contents.append(row[1:3])
+      labels.append(row[0])
+    else:
+      skipped_rows += 1
+  return contents, labels, skipped_rows
+
+
+def component_from_file(f):
+  """Reads a training data file and returns arrays of contents and labels."""
+  contents = []
+  labels = []
+  csv.field_size_limit(sys.maxsize)
+  for row in csv.reader(f):
+    label, content = row
+    contents.append(content)
+    labels.append(label)
+  return contents, labels
diff --git a/tools/normalize-casing.sql b/tools/normalize-casing.sql
new file mode 100644
index 0000000..139593e
--- /dev/null
+++ b/tools/normalize-casing.sql
@@ -0,0 +1,353 @@
+-- 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
+
+
+DROP PROCEDURE IF EXISTS InspectStatusCase;
+DROP PROCEDURE IF EXISTS CleanupStatusCase;
+DROP PROCEDURE IF EXISTS InspectLabelCase;
+DROP PROCEDURE IF EXISTS CleanupLabelCase;
+DROP PROCEDURE IF EXISTS InspectPermissionCase;
+DROP PROCEDURE IF EXISTS CleanupPermissionCase;
+DROP PROCEDURE IF EXISTS InspectComponentCase;
+DROP PROCEDURE IF EXISTS CleanupComponentCase;
+DROP PROCEDURE IF EXISTS CleanupCase;
+
+delimiter //
+
+CREATE PROCEDURE InspectStatusCase(IN in_pid SMALLINT UNSIGNED)
+BEGIN
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_id INT;
+  DECLARE c_pid SMALLINT UNSIGNED;
+  DECLARE c_status VARCHAR(80) BINARY;
+
+  DECLARE curs CURSOR FOR SELECT id, project_id, status FROM StatusDef WHERE project_id=in_pid AND rank IS NOT NULL ORDER BY rank;
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+  OPEN curs;
+
+  wks_loop: LOOP
+    FETCH curs INTO c_id, c_pid, c_status;
+    IF done THEN
+      LEAVE wks_loop;
+    END IF;
+
+    -- This is the canonical capitalization of the well-known status.
+    SELECT c_status AS 'Processing:';
+
+    -- Alternate forms are a) in the same project, and b) spelled the same,
+    -- but c) not the same exact status.
+    DROP TEMPORARY TABLE IF EXISTS alt_ids;
+    CREATE TEMPORARY TABLE alt_ids (id INT);
+    INSERT INTO alt_ids SELECT id FROM StatusDef WHERE project_id=c_pid AND status COLLATE UTF8_GENERAL_CI LIKE c_status AND id!=c_id;
+    SELECT status AS 'Alternate forms:' FROM StatusDef WHERE id IN (SELECT id FROM alt_ids);
+    SELECT id AS 'Offending issues:' FROM Issue WHERE status_id IN (SELECT id FROM alt_ids);
+  END LOOP;
+
+  CLOSE curs;
+END;
+//
+
+CREATE PROCEDURE CleanupStatusCase(IN in_pid SMALLINT UNSIGNED)
+BEGIN
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_id INT;
+  DECLARE c_pid SMALLINT UNSIGNED;
+  DECLARE c_status VARCHAR(80) BINARY;
+
+  DECLARE curs CURSOR FOR SELECT id, project_id, status FROM StatusDef WHERE project_id=in_pid AND rank IS NOT NULL ORDER BY rank;
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+  OPEN curs;
+
+  wks_loop: LOOP
+    FETCH curs INTO c_id, c_pid, c_status;
+    IF done THEN
+      LEAVE wks_loop;
+    END IF;
+
+    SELECT c_status AS 'Processing:';
+    DROP TEMPORARY TABLE IF EXISTS alt_ids;
+    CREATE TEMPORARY TABLE alt_ids (id INT);
+    INSERT INTO alt_ids SELECT id FROM StatusDef WHERE project_id=c_pid AND status COLLATE UTF8_GENERAL_CI LIKE c_status AND id!=c_id;
+
+    -- Fix offending issues first, to avoid foreign key constraints.
+    UPDATE Issue SET status_id=c_id WHERE status_id IN (SELECT id FROM alt_ids);
+
+    -- Then remove the alternate status definitions.
+    DELETE FROM StatusDef WHERE id IN (SELECT id FROM alt_ids);
+  END LOOP;
+
+  CLOSE curs;
+END;
+//
+
+CREATE PROCEDURE InspectLabelCase(IN in_pid SMALLINT UNSIGNED)
+BEGIN
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_id INT;
+  DECLARE c_pid SMALLINT UNSIGNED;
+  DECLARE c_label VARCHAR(80) BINARY;
+
+  DECLARE curs CURSOR FOR SELECT id, project_id, label FROM LabelDef WHERE project_id=in_pid AND rank IS NOT NULL ORDER BY rank;
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+  OPEN curs;
+
+  wkl_loop: LOOP
+    FETCH curs INTO c_id, c_pid, c_label;
+    IF done THEN
+      LEAVE wkl_loop;
+    END IF;
+
+    -- This is the canonical capitalization of the well-known label.
+    SELECT c_label AS 'Processing:';
+
+    -- Alternate forms are a) in the same project, and b) spelled the same,
+    -- but c) not the same exact label.
+    DROP TEMPORARY TABLE IF EXISTS alt_ids;
+    CREATE TEMPORARY TABLE alt_ids (id INT);
+    INSERT INTO alt_ids SELECT id FROM LabelDef WHERE project_id=c_pid AND label COLLATE UTF8_GENERAL_CI LIKE c_label AND id!=c_id;
+    SELECT label AS 'Alternate forms:' FROM LabelDef WHERE id IN (SELECT id FROM alt_ids);
+    SELECT issue_id AS 'Offending issues:' FROM Issue2Label WHERE label_id IN (SELECT id FROM alt_ids);
+  END LOOP;
+
+  CLOSE curs;
+END;
+//
+
+CREATE PROCEDURE CleanupLabelCase(IN in_pid SMALLINT UNSIGNED)
+BEGIN
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_id INT;
+  DECLARE c_pid SMALLINT UNSIGNED;
+  DECLARE c_label VARCHAR(80) BINARY;
+
+  DECLARE curs CURSOR FOR SELECT id, project_id, label FROM LabelDef WHERE project_id=in_pid AND rank IS NOT NULL ORDER BY rank;
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+  OPEN curs;
+
+  wkl_loop: LOOP
+    FETCH curs INTO c_id, c_pid, c_label;
+    IF done THEN
+      LEAVE wkl_loop;
+    END IF;
+
+    SELECT c_label AS 'Processing:';
+    DROP TEMPORARY TABLE IF EXISTS alt_ids;
+    CREATE TEMPORARY TABLE alt_ids (id INT);
+    INSERT INTO alt_ids SELECT id FROM LabelDef WHERE project_id=c_pid AND label COLLATE UTF8_GENERAL_CI LIKE c_label AND id!=c_id;
+
+    -- Fix offending issues first, to avoid foreign key constraints.
+    -- DELETE after UPDATE IGNORE to catch issues with two spellings.
+    UPDATE IGNORE Issue2Label SET label_id=c_id WHERE label_id IN (SELECT id FROM alt_ids);
+    DELETE FROM Issue2Label WHERE label_id IN (SELECT id FROM alt_ids);
+
+    -- Then remove the alternate label definitions.
+    DELETE FROM LabelDef WHERE id IN (SELECT id FROM alt_ids);
+  END LOOP;
+
+  CLOSE curs;
+END;
+//
+
+CREATE PROCEDURE InspectPermissionCase(IN in_pid SMALLINT UNSIGNED)
+BEGIN
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_id INT;
+  DECLARE c_pid SMALLINT UNSIGNED;
+  DECLARE c_label VARCHAR(80) BINARY;
+
+  -- This complex query takes the Actions table (defined below) and combines it
+  -- with the set of all permissions granted in the project to construct a list
+  -- of all possible Restrict-Action-Permission labels. It then combines that
+  -- with LabelDef to see which ones are actually used (whether or not they are
+  -- also defined as well-known labels).
+  DECLARE curs CURSOR FOR SELECT LabelDef.id, LabelDef.project_id, RapDef.label FROM (
+      SELECT DISTINCT CONCAT_WS('-', 'Restrict', Actions.action, ExtraPerm.perm)
+      AS label FROM ExtraPerm, Actions where ExtraPerm.project_id=16) AS RapDef
+    LEFT JOIN LabelDef
+    ON BINARY RapDef.label = BINARY LabelDef.label
+    WHERE LabelDef.project_id=in_pid;
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+  DROP TEMPORARY TABLE IF EXISTS Actions;
+  CREATE TEMPORARY TABLE Actions (action VARCHAR(80));
+  INSERT INTO Actions (action) VALUES ('View'), ('EditIssue'), ('AddIssueComment'), ('DeleteIssue'), ('ViewPrivateArtifact');
+
+  OPEN curs;
+
+  perm_loop: LOOP
+    FETCH curs INTO c_id, c_pid, c_label;
+    IF done THEN
+      LEAVE perm_loop;
+    END IF;
+
+    -- This is the canonical capitalization of the permission.
+    SELECT c_label AS 'Processing:';
+
+    -- Alternate forms are a) in the same project, and b) spelled the same,
+    -- but c) not the same exact label.
+    DROP TEMPORARY TABLE IF EXISTS alt_ids;
+    CREATE TEMPORARY TABLE alt_ids (id INT);
+    INSERT INTO alt_ids SELECT id FROM LabelDef WHERE project_id=c_pid AND label COLLATE UTF8_GENERAL_CI LIKE c_label AND id!=c_id;
+    SELECT label AS 'Alternate forms:' FROM LabelDef WHERE id IN (SELECT id FROM alt_ids);
+    SELECT issue_id AS 'Offending issues:' FROM Issue2Label WHERE label_id IN (SELECT id FROM alt_ids);
+  END LOOP;
+
+  CLOSE curs;
+END;
+//
+
+CREATE PROCEDURE CleanupPermissionCase(IN in_pid SMALLINT UNSIGNED)
+BEGIN
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_id INT;
+  DECLARE c_pid SMALLINT UNSIGNED;
+  DECLARE c_label VARCHAR(80) BINARY;
+
+  -- This complex query takes the Actions table (defined below) and combines
+  -- it with the set of all permissions granted in the project to construct a
+  -- list of all possible Restrict-Action-Permission labels. It then combines
+  -- that with LabelDef to see which ones are actually used (whether or not
+  -- they are also defined as well-known labels).
+  DECLARE curs CURSOR FOR SELECT LabelDef.id, LabelDef.project_id, RapDef.label FROM (
+      SELECT DISTINCT CONCAT_WS('-', 'Restrict', Actions.action, ExtraPerm.perm)
+      AS label FROM ExtraPerm, Actions where ExtraPerm.project_id=16) AS RapDef
+    LEFT JOIN LabelDef
+    ON BINARY RapDef.label = BINARY LabelDef.label
+    WHERE LabelDef.project_id=in_pid;
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+  DROP TEMPORARY TABLE IF EXISTS Actions;
+  CREATE TEMPORARY TABLE Actions (action VARCHAR(80));
+  INSERT INTO Actions (action) VALUES ('View'), ('EditIssue'), ('AddIssueComment'), ('DeleteIssue'), ('ViewPrivateArtifact');
+
+  OPEN curs;
+
+  perm_loop: LOOP
+    FETCH curs INTO c_id, c_pid, c_label;
+    IF done THEN
+      LEAVE perm_loop;
+    END IF;
+
+    -- This is the canonical capitalization of the permission.
+    SELECT c_label AS 'Processing:';
+
+    -- Alternate forms are a) in the same project, and b) spelled the same,
+    -- but c) not the same exact label.
+    DROP TEMPORARY TABLE IF EXISTS alt_ids;
+    CREATE TEMPORARY TABLE alt_ids (id INT);
+    INSERT INTO alt_ids SELECT id FROM LabelDef WHERE project_id=c_pid AND label COLLATE UTF8_GENERAL_CI LIKE c_label AND id!=c_id;
+
+    -- Fix offending issues first, to avoid foreign key constraings.
+    -- DELETE after UPDATE IGNORE to catch issues with two spellings.
+    UPDATE IGNORE Issue2Label SET label_id=c_id WHERE label_id IN (SELECT id FROM alt_ids);
+    DELETE FROM Issue2Label WHERE label_id IN (SELECT id FROM alt_ids);
+
+    -- Then remove the alternate label definitions.
+    DELETE FROM LabelDef WHERE id IN (SELECT id FROM alt_ids);
+  END LOOP;
+
+  CLOSE curs;
+
+  -- Remove ExtraPerm rows where the user isn't a member of the project.
+  DELETE FROM ExtraPerm WHERE project_id=in_pid AND user_id NOT IN (
+    SELECT user_id FROM User2Project WHERE project_id=in_pid);
+END;
+//
+
+CREATE PROCEDURE InspectComponentCase(IN in_pid SMALLINT UNSIGNED)
+BEGIN
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_id INT;
+  DECLARE c_pid SMALLINT UNSIGNED;
+  DECLARE c_path VARCHAR(80) BINARY;
+
+  DECLARE curs CURSOR FOR SELECT id, project_id, path FROM ComponentDef WHERE project_id=in_pid AND docstring IS NOT NULL ORDER BY path;
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+  OPEN curs;
+
+  wks_loop: LOOP
+    FETCH curs INTO c_id, c_pid, c_path;
+    IF done THEN
+      LEAVE wks_loop;
+    END IF;
+
+    -- This is the canonical capitalization of the component path.
+    SELECT c_path AS 'Processing:';
+
+    -- Alternate forms are a) in the same project, and b) spelled the same,
+    -- but c) not the same exact path.
+    DROP TEMPORARY TABLE IF EXISTS alt_ids;
+    CREATE TEMPORARY TABLE alt_ids (id INT);
+    INSERT INTO alt_ids SELECT id FROM ComponentDef WHERE project_id=c_pid AND path COLLATE UTF8_GENERAL_CI LIKE c_path AND id!=c_id;
+    SELECT path AS 'Alternate forms:' FROM ComponentDef WHERE id IN (SELECT id FROM alt_ids);
+    SELECT issue_id AS 'Offending issues:' FROM Issue2Component WHERE component_id IN (SELECT id FROM alt_ids);
+  END LOOP;
+
+  CLOSE curs;
+END;
+//
+
+CREATE PROCEDURE CleanupComponentCase(IN in_pid SMALLINT UNSIGNED)
+BEGIN
+  DECLARE done INT DEFAULT FALSE;
+
+  DECLARE c_id INT;
+  DECLARE c_pid SMALLINT UNSIGNED;
+  DECLARE c_path VARCHAR(80) BINARY;
+
+  DECLARE curs CURSOR FOR SELECT id, project_id, path FROM ComponentDef WHERE project_id=in_pid AND docstring IS NOT NULL ORDER BY path;
+  DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+  OPEN curs;
+
+  wks_loop: LOOP
+    FETCH curs INTO c_id, c_pid, c_path;
+    IF done THEN
+      LEAVE wks_loop;
+    END IF;
+
+    SELECT c_path AS 'Processing:';
+    DROP TEMPORARY TABLE IF EXISTS alt_ids;
+    CREATE TEMPORARY TABLE alt_ids (id INT);
+    INSERT INTO alt_ids SELECT id FROM ComponentDef WHERE project_id=c_pid AND path COLLATE UTF8_GENERAL_CI LIKE c_path AND id!=c_id;
+
+    -- Fix offending issues first, to avoid foreign key constraints.
+    -- DELETE after UPDATE IGNORE to catch issues with two spellings.
+    UPDATE IGNORE Issue2Component SET component_id=c_id WHERE component_id IN (SELECT id FROM alt_ids);
+    DELETE FROM Issue2Component WHERE component_id IN (SELECT id FROM alt_ids);
+
+    -- Then remove the alternate path definitions.
+    DELETE FROM ComponentDef WHERE id IN (SELECT id FROM alt_ids);
+  END LOOP;
+
+  CLOSE curs;
+END;
+//
+
+
+CREATE PROCEDURE CleanupCase(IN in_pid SMALLINT UNSIGNED)
+BEGIN
+  CALL CleanupStatusCase(in_pid);
+  CALL CleanupLabelCase(in_pid);
+  CALL CleanupPermissionCase(in_pid);
+  CALL CleanupComponentCase(in_pid);
+END;
+//
+
+
+delimiter ;
diff --git a/tools/null-comment-table-strings.sql b/tools/null-comment-table-strings.sql
new file mode 100644
index 0000000..ae97db3
--- /dev/null
+++ b/tools/null-comment-table-strings.sql
@@ -0,0 +1,62 @@
+-- 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
+
+
+DROP PROCEDURE IF EXISTS NullCommentTableStrings;
+
+delimiter //
+
+CREATE PROCEDURE NullCommentTableStrings(
+    IN in_start INT, IN in_stop INT, IN in_step INT)
+BEGIN
+  comment_loop: LOOP
+    IF in_start >= in_stop THEN
+      LEAVE comment_loop;
+    END IF;
+
+    SELECT in_start AS StartingAt;
+    SELECT count(*)
+    FROM Comment
+    WHERE Comment.id >= in_start
+    AND Comment.id < in_start + in_step;
+
+    UPDATE Comment
+    SET content = NULL, inbound_message = NULL
+    WHERE Comment.id >= in_start
+    AND Comment.id < in_start + in_step;
+
+    SET in_start = in_start + in_step;
+
+  END LOOP;
+
+END;
+
+
+//
+
+
+delimiter ;
+
+
+-- Copy and paste these individually and verify that the site is still responsive.
+-- the first one, takes about 30 sec, then 4-7 minutes for each of the rest.
+-- CALL NullCommentTableStrings(           0, 13 * 1000000, 10000);
+-- CALL NullCommentTableStrings(13 * 1000000, 16 * 1000000, 10000);
+-- CALL NullCommentTableStrings(16 * 1000000, 17 * 1000000, 10000);
+-- CALL NullCommentTableStrings(17 * 1000000, 18 * 1000000, 10000);
+-- CALL NullCommentTableStrings(18 * 1000000, 19 * 1000000, 10000);
+-- CALL NullCommentTableStrings(19 * 1000000, 20 * 1000000, 10000);
+-- CALL NullCommentTableStrings(20 * 1000000, 21 * 1000000, 10000);
+-- CALL NullCommentTableStrings(21 * 1000000, 22 * 1000000, 10000);
+-- CALL NullCommentTableStrings(22 * 1000000, 23 * 1000000, 10000);
+-- CALL NullCommentTableStrings(23 * 1000000, 24 * 1000000, 10000);
+-- CALL NullCommentTableStrings(24 * 1000000, 25 * 1000000, 10000);
+-- CALL NullCommentTableStrings(25 * 1000000, 26 * 1000000, 10000);
+-- CALL NullCommentTableStrings(26 * 1000000, 27 * 1000000, 10000);
+-- CALL NullCommentTableStrings(27 * 1000000, 28 * 1000000, 10000);
+-- CALL NullCommentTableStrings(28 * 1000000, 29 * 1000000, 10000);
+-- CALL NullCommentTableStrings(29 * 1000000, 30 * 1000000, 10000);
+-- CALL NullCommentTableStrings(30 * 1000000, 40 * 1000000, 10000);
diff --git a/tools/rewrite-user-id.sql b/tools/rewrite-user-id.sql
new file mode 100644
index 0000000..b95a0e4
--- /dev/null
+++ b/tools/rewrite-user-id.sql
@@ -0,0 +1,101 @@
+-- Copyright 2019 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
+
+-- There have been cases of imported data that used the wrong email
+-- address for a user.  This script can change all the user_ids in our
+-- database from the ID for old_email to the ID for new_email.
+
+DROP PROCEDURE IF EXISTS RewriteUserID;
+
+delimiter //
+
+CREATE PROCEDURE RewriteUserID(
+    IN in_old_email VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
+    IN in_new_email VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci)
+proc_label:BEGIN
+  DECLARE old_id INT UNSIGNED;
+  DECLARE new_id INT UNSIGNED;
+
+  IF in_old_email is NULL OR in_old_email = '' THEN
+    SELECT CONCAT('in_old_email cannot be null or empty') as ErrorMsg;
+    LEAVE proc_label;
+  END IF;
+
+  IF in_new_email is NULL OR in_new_email = '' THEN
+    SELECT CONCAT('in_new_email cannot be null or empty') as ErrorMsg;
+    LEAVE proc_label;
+  END IF;
+
+  SET old_id = (SELECT user_id FROM User WHERE email = in_old_email);
+  SET new_id = (SELECT user_id FROM User WHERE email = in_new_email);
+
+  IF old_id is NULL THEN
+    SELECT CONCAT('User ', in_old_email, ' not found') as ErrorMsg;
+    LEAVE proc_label;
+  END IF;
+
+  IF new_id is NULL THEN
+    SELECT CONCAT('User ', in_new_email, ' not found') as ErrorMsg;
+    LEAVE proc_label;
+  END IF;
+
+  SELECT CONCAT('Rewriting ', old_id, ' to ', new_id) AS Progress;
+
+  UPDATE Component2Admin SET admin_id = new_id
+  WHERE admin_id = old_id LIMIT 1000;
+
+  UPDATE Component2Cc SET cc_id = new_id
+  WHERE cc_id = old_id LIMIT 1000;
+
+  UPDATE FieldDef2Admin SET admin_id = new_id
+  WHERE admin_id = old_id LIMIT 1000;
+
+  UPDATE Issue SET reporter_id = new_id
+  WHERE reporter_id = old_id LIMIT 1000;
+
+  UPDATE Issue SET owner_id = new_id
+  WHERE owner_id = old_id LIMIT 1000;
+
+  UPDATE IGNORE Issue2FieldValue SET user_id = new_id
+  WHERE user_id = old_id LIMIT 1000;
+
+  UPDATE IGNORE Issue2Cc SET cc_id = new_id
+  WHERE cc_id = old_id LIMIT 1000;
+
+  UPDATE IGNORE IssueStar SET user_id = new_id
+  WHERE user_id = old_id LIMIT 1000;
+
+  UPDATE Comment SET commenter_id = new_id
+  WHERE commenter_id = old_id LIMIT 10000;
+
+  UPDATE IssueUpdate SET added_user_id = new_id
+  WHERE added_user_id = old_id LIMIT 10000;
+
+  UPDATE IssueUpdate SET removed_user_id = new_id
+  WHERE removed_user_id = old_id LIMIT 10000;
+
+  UPDATE Template SET owner_id = new_id
+  WHERE owner_id = old_id LIMIT 1000;
+
+  UPDATE Template2Admin SET admin_id = new_id
+  WHERE admin_id = old_id LIMIT 1000;
+
+  -- Ignore filter rules, saved queries, hotlists, deleted_by, approvers.
+
+  UPDATE IssueSnapshot SET reporter_id = new_id
+  WHERE reporter_id = old_id LIMIT 10000;
+
+  UPDATE IssueSnapshot SET owner_id = new_id
+  WHERE owner_id = old_id LIMIT 10000;
+
+  UPDATE IGNORE IssueSnapshot2Cc SET cc_id = new_id
+  WHERE cc_id = old_id LIMIT 10000;
+
+END;
+
+//
+
+delimiter ;
diff --git a/tracker/__init__.py b/tracker/__init__.py
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/tracker/__init__.py
@@ -0,0 +1 @@
+
diff --git a/tracker/attachment_helpers.py b/tracker/attachment_helpers.py
new file mode 100644
index 0000000..9ed9a7c
--- /dev/null
+++ b/tracker/attachment_helpers.py
@@ -0,0 +1,112 @@
+# 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
+
+"""Functions to help display attachments and compute quotas."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import base64
+import hmac
+import logging
+
+from framework import urls
+from services import secrets_svc
+from tracker import tracker_helpers
+
+
+VIEWABLE_IMAGE_TYPES = [
+    'image/jpeg', 'image/gif', 'image/png', 'image/x-png', 'image/webp',
+    ]
+VIEWABLE_VIDEO_TYPES = [
+    'video/ogg', 'video/mp4', 'video/mpg', 'video/mpeg', 'video/webm',
+    'video/quicktime',
+    ]
+MAX_PREVIEW_FILESIZE = 15 * 1024 * 1024  # 15 MB
+
+
+def IsViewableImage(mimetype_charset, filesize):
+  """Return true if we can safely display such an image in the browser.
+
+  Args:
+    mimetype_charset: string with the mimetype string that we got back
+        from the 'file' command.  It may have just the mimetype, or it
+        may have 'foo/bar; charset=baz'.
+    filesize: int length of the file in bytes.
+
+  Returns:
+    True iff we should allow the user to view a thumbnail or safe version
+    of the image in the browser.  False if this might not be safe to view,
+    in which case we only offer a download link.
+  """
+  mimetype = mimetype_charset.split(';', 1)[0]
+  return (mimetype in VIEWABLE_IMAGE_TYPES and
+          filesize < MAX_PREVIEW_FILESIZE)
+
+
+def IsViewableVideo(mimetype_charset, filesize):
+  """Return true if we can safely display such a video in the browser.
+
+  Args:
+    mimetype_charset: string with the mimetype string that we got back
+        from the 'file' command.  It may have just the mimetype, or it
+        may have 'foo/bar; charset=baz'.
+    filesize: int length of the file in bytes.
+
+  Returns:
+    True iff we should allow the user to watch the video in the page.
+  """
+  mimetype = mimetype_charset.split(';', 1)[0]
+  return (mimetype in VIEWABLE_VIDEO_TYPES and
+          filesize < MAX_PREVIEW_FILESIZE)
+
+
+def IsViewableText(mimetype, filesize):
+  """Return true if we can safely display such a file as escaped text."""
+  return (mimetype.startswith('text/') and
+          filesize < MAX_PREVIEW_FILESIZE)
+
+
+def SignAttachmentID(aid):
+  """One-way hash of attachment ID to make it harder for people to scan."""
+  digester = hmac.new(secrets_svc.GetXSRFKey())
+  digester.update(str(aid))
+  return base64.urlsafe_b64encode(digester.digest())
+
+
+def GetDownloadURL(attachment_id):
+  """Return a relative URL to download an attachment to local disk."""
+  return 'attachment?aid=%s&signed_aid=%s' % (
+        attachment_id, SignAttachmentID(attachment_id))
+
+
+def GetViewURL(attach, download_url, project_name):
+  """Return a relative URL to view an attachment in the browser."""
+  if IsViewableImage(attach.mimetype, attach.filesize):
+    return download_url + '&inline=1'
+  elif IsViewableVideo(attach.mimetype, attach.filesize):
+    return download_url + '&inline=1'
+  elif IsViewableText(attach.mimetype, attach.filesize):
+    return tracker_helpers.FormatRelativeIssueURL(
+        project_name, urls.ISSUE_ATTACHMENT_TEXT,
+        aid=attach.attachment_id)
+  else:
+    return None
+
+
+def GetThumbnailURL(attach, download_url):
+  """Return a relative URL to view an attachment thumbnail."""
+  if IsViewableImage(attach.mimetype, attach.filesize):
+    return download_url + '&inline=1&thumb=1'
+  else:
+    return None
+
+
+def GetVideoURL(attach, download_url):
+  """Return a relative URL to view an attachment thumbnail."""
+  if IsViewableVideo(attach.mimetype, attach.filesize):
+    return download_url + '&inline=1'
+  else:
+    return None
diff --git a/tracker/component_helpers.py b/tracker/component_helpers.py
new file mode 100644
index 0000000..786ab96
--- /dev/null
+++ b/tracker/component_helpers.py
@@ -0,0 +1,93 @@
+# 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
+
+"""Helper functions for component-related servlets."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+import re
+
+from proto import tracker_pb2
+from tracker import tracker_bizobj
+
+
+ParsedComponentDef = collections.namedtuple(
+    'ParsedComponentDef',
+    'leaf_name, docstring, deprecated, '
+    'admin_usernames, cc_usernames, admin_ids, cc_ids, '
+    'label_strs, label_ids')
+
+
+def ParseComponentRequest(mr, post_data, services):
+  """Parse the user's request to create or update a component definition.
+
+  If an error is encountered then this function populates mr.errors
+  """
+  leaf_name = post_data.get('leaf_name', '')
+  docstring = post_data.get('docstring', '')
+  deprecated = 'deprecated' in post_data
+
+  admin_usernames = [
+      uname.strip() for uname in re.split('[,;\s]+', post_data['admins'])
+      if uname.strip()]
+  cc_usernames = [
+      uname.strip() for uname in re.split('[,;\s]+', post_data['cc'])
+      if uname.strip()]
+  all_user_ids = services.user.LookupUserIDs(
+      mr.cnxn, admin_usernames + cc_usernames, autocreate=True)
+
+  admin_ids = []
+  for admin_name in admin_usernames:
+    if admin_name not in all_user_ids:
+      mr.errors.member_admins = '%s unrecognized' % admin_name
+      continue
+    admin_id = all_user_ids[admin_name]
+    if admin_id not in admin_ids:
+     admin_ids.append(admin_id)
+
+  cc_ids = []
+  for cc_name in cc_usernames:
+    if cc_name not in all_user_ids:
+      mr.errors.member_cc = '%s unrecognized' % cc_name
+      continue
+    cc_id = all_user_ids[cc_name]
+    if cc_id not in cc_ids:
+      cc_ids.append(cc_id)
+
+  label_strs = [
+    lab.strip() for lab in re.split('[,;\s]+', post_data['labels'])
+    if lab.strip()]
+
+  label_ids = services.config.LookupLabelIDs(
+      mr.cnxn, mr.project_id, label_strs, autocreate=True)
+
+  return ParsedComponentDef(
+      leaf_name, docstring, deprecated,
+      admin_usernames, cc_usernames, admin_ids, cc_ids,
+      label_strs, label_ids)
+
+
+def GetComponentCcIDs(issue, config):
+  """Return auto-cc'd users for any component or ancestor the issue is in."""
+  result = set()
+  for component_id in issue.component_ids:
+    cd = tracker_bizobj.FindComponentDefByID(component_id, config)
+    if cd:
+      result.update(GetCcIDsForComponentAndAncestors(config, cd))
+
+  return result
+
+
+def GetCcIDsForComponentAndAncestors(config, cd):
+  """Return auto-cc'd user IDs for the given component and ancestors."""
+  result = set(cd.cc_ids)
+  ancestors = tracker_bizobj.FindAncestorComponents(config, cd)
+  for anc_cd in ancestors:
+    result.update(anc_cd.cc_ids)
+
+  return result
diff --git a/tracker/componentcreate.py b/tracker/componentcreate.py
new file mode 100644
index 0000000..9cb713c
--- /dev/null
+++ b/tracker/componentcreate.py
@@ -0,0 +1,153 @@
+# 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
+
+"""A servlet for project owners to create a new component def."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+from framework import framework_helpers
+from framework import framework_views
+from framework import jsonfeed
+from framework import permissions
+from framework import servlet
+from framework import urls
+from tracker import component_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_views
+
+import ezt
+
+
+class ComponentCreate(servlet.Servlet):
+  """Servlet allowing project owners to create a component."""
+
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_PROCESS
+  _PAGE_TEMPLATE = 'tracker/component-create-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    """Check whether the user has any permission to visit this page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+    """
+    super(ComponentCreate, self).AssertBasePermission(mr)
+    if not self.CheckPerm(mr, permissions.EDIT_PROJECT):
+      raise permissions.PermissionException(
+          'User is not allowed to administer this project')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    users_by_id = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user,
+        *[list(cd.admin_ids) + list(cd.cc_ids)
+          for cd in config.component_defs])
+    component_def_views = [
+        tracker_views.ComponentDefView(mr.cnxn, self.services, cd, users_by_id)
+        # TODO(jrobbins): future component-level view restrictions.
+        for cd in config.component_defs]
+    for cdv in component_def_views:
+      setattr(cdv, 'selected', None)
+      path = (cdv.parent_path + '>' + cdv.leaf_name).lstrip('>')
+      if path == mr.component_path:
+        setattr(cdv, 'selected', True)
+
+    return {
+        'parent_path': mr.component_path,
+        'admin_tab_mode': servlet.Servlet.PROCESS_TAB_COMPONENTS,
+        'component_defs': component_def_views,
+        'initial_leaf_name': '',
+        'initial_docstring': '',
+        'initial_deprecated': ezt.boolean(False),
+        'initial_admins': [],
+        'initial_cc': [],
+        'initial_labels': [],
+        }
+
+  def ProcessFormData(self, mr, post_data):
+    """Validate and store the contents of the issues tracker admin page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: HTML form data from the request.
+
+    Returns:
+      String URL to redirect the user to, or None if response was already sent.
+    """
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    parent_path = post_data.get('parent_path', '')
+    parsed = component_helpers.ParseComponentRequest(
+        mr, post_data, self.services)
+
+    if parent_path:
+      parent_def = tracker_bizobj.FindComponentDef(parent_path, config)
+      if not parent_def:
+        self.abort(500, 'parent component not found')
+      allow_parent_edit = permissions.CanEditComponentDef(
+          mr.auth.effective_ids, mr.perms, mr.project, parent_def, config)
+      if not allow_parent_edit:
+        raise permissions.PermissionException(
+            'User is not allowed to add a subcomponent here')
+
+      path = '%s>%s' % (parent_path, parsed.leaf_name)
+    else:
+      path = parsed.leaf_name
+
+    leaf_name_error_msg = LeafNameErrorMessage(
+        parent_path, parsed.leaf_name, config)
+    if leaf_name_error_msg:
+      mr.errors.leaf_name = leaf_name_error_msg
+
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(
+          mr, parent_path=parent_path,
+          initial_leaf_name=parsed.leaf_name,
+          initial_docstring=parsed.docstring,
+          initial_deprecated=ezt.boolean(parsed.deprecated),
+          initial_admins=parsed.admin_usernames,
+          initial_cc=parsed.cc_usernames,
+          initial_labels=parsed.label_strs,
+      )
+      return
+
+    created = int(time.time())
+    creator_id = self.services.user.LookupUserID(
+        mr.cnxn, mr.auth.email, autocreate=False)
+
+    self.services.config.CreateComponentDef(
+        mr.cnxn, mr.project_id, path, parsed.docstring, parsed.deprecated,
+        parsed.admin_ids, parsed.cc_ids, created, creator_id,
+        label_ids=parsed.label_ids)
+
+    return framework_helpers.FormatAbsoluteURL(
+        mr, urls.ADMIN_COMPONENTS, saved=1, ts=int(time.time()))
+
+
+def LeafNameErrorMessage(parent_path, leaf_name, config):
+  """Return an error message for the given component name, or None."""
+  if not tracker_constants.COMPONENT_NAME_RE.match(leaf_name):
+    return 'Invalid component name'
+
+  if parent_path:
+    path = '%s>%s' % (parent_path, leaf_name)
+  else:
+    path = leaf_name
+
+  if tracker_bizobj.FindComponentDef(path, config):
+    return 'That name is already in use.'
+
+  return None
diff --git a/tracker/componentdetail.py b/tracker/componentdetail.py
new file mode 100644
index 0000000..01f2469
--- /dev/null
+++ b/tracker/componentdetail.py
@@ -0,0 +1,246 @@
+# 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
+
+"""A servlet for project and component owners to view and edit components."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from features import filterrules_helpers
+from framework import framework_helpers
+from framework import framework_views
+from framework import permissions
+from framework import servlet
+from framework import timestr
+from framework import urls
+from tracker import component_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_views
+
+
+class ComponentDetail(servlet.Servlet):
+  """Servlets allowing project owners to view and edit a component."""
+
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_PROCESS
+  _PAGE_TEMPLATE = 'tracker/component-detail-page.ezt'
+
+  def _GetComponentDef(self, mr):
+    """Get the config and component definition to be viewed or edited."""
+    if not mr.component_path:
+      self.abort(404, 'component not specified')
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    component_def = tracker_bizobj.FindComponentDef(mr.component_path, config)
+    if not component_def:
+      self.abort(404, 'component not found')
+    return config, component_def
+
+  def AssertBasePermission(self, mr):
+    """Check whether the user has any permission to visit this page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+    """
+    super(ComponentDetail, self).AssertBasePermission(mr)
+    _config, component_def = self._GetComponentDef(mr)
+
+    # TODO(jrobbins): optional restrictions on viewing fields by component.
+
+    allow_view = permissions.CanViewComponentDef(
+        mr.auth.effective_ids, mr.perms, mr.project, component_def)
+    if not allow_view:
+      raise permissions.PermissionException(
+          'User is not allowed to view this component')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    config, component_def = self._GetComponentDef(mr)
+    users_by_id = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user,
+        component_def.admin_ids, component_def.cc_ids)
+    component_def_view = tracker_views.ComponentDefView(
+        mr.cnxn, self.services, component_def, users_by_id)
+    initial_admins = [users_by_id[uid].email for uid in component_def.admin_ids]
+    initial_cc = [users_by_id[uid].email for uid in component_def.cc_ids]
+    initial_labels = [
+        self.services.config.LookupLabel(mr.cnxn, mr.project_id, label_id)
+        for label_id in component_def.label_ids]
+
+    creator, created = self._GetUserViewAndFormattedTime(
+        mr, component_def.creator_id, component_def.created)
+    modifier, modified = self._GetUserViewAndFormattedTime(
+        mr, component_def.modifier_id, component_def.modified)
+
+    allow_edit = permissions.CanEditComponentDef(
+        mr.auth.effective_ids, mr.perms, mr.project, component_def, config)
+
+    subcomponents = tracker_bizobj.FindDescendantComponents(
+        config, component_def)
+    templates = self.services.template.TemplatesWithComponent(
+        mr.cnxn, component_def.component_id)
+    allow_delete = allow_edit and not subcomponents and not templates
+
+    return {
+        'admin_tab_mode': servlet.Servlet.PROCESS_TAB_COMPONENTS,
+        'component_def': component_def_view,
+        'initial_leaf_name': component_def_view.leaf_name,
+        'initial_docstring': component_def.docstring,
+        'initial_deprecated': ezt.boolean(component_def.deprecated),
+        'initial_admins': initial_admins,
+        'initial_cc': initial_cc,
+        'initial_labels': initial_labels,
+        'allow_edit': ezt.boolean(allow_edit),
+        'allow_delete': ezt.boolean(allow_delete),
+        'subcomponents': subcomponents,
+        'templates': templates,
+        'creator': creator,
+        'created': created,
+        'modifier': modifier,
+        'modified': modified,
+        }
+
+  def ProcessFormData(self, mr, post_data):
+    """Validate and store the contents of the issues tracker admin page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: HTML form data from the request.
+
+    Returns:
+      String URL to redirect the user to, or None if response was already sent.
+    """
+    config, component_def = self._GetComponentDef(mr)
+    allow_edit = permissions.CanEditComponentDef(
+        mr.auth.effective_ids, mr.perms, mr.project, component_def, config)
+    if not allow_edit:
+      raise permissions.PermissionException(
+          'User is not allowed to edit or delete this component')
+
+    if 'deletecomponent' in post_data:
+      allow_delete = not tracker_bizobj.FindDescendantComponents(
+          config, component_def)
+      if not allow_delete:
+        raise permissions.PermissionException(
+            'User tried to delete component that had subcomponents')
+      return self._ProcessDeleteComponent(mr, component_def)
+
+    else:
+      return self._ProcessEditComponent(mr, post_data, config, component_def)
+
+
+  def _ProcessDeleteComponent(self, mr, component_def):
+    """The user wants to delete the specified custom field definition."""
+    self.services.issue.DeleteComponentReferences(
+        mr.cnxn, component_def.component_id)
+    self.services.config.DeleteComponentDef(
+        mr.cnxn, mr.project_id, component_def.component_id)
+    return framework_helpers.FormatAbsoluteURL(
+        mr, urls.ADMIN_COMPONENTS, deleted=1, ts=int(time.time()))
+
+  def _GetUserViewAndFormattedTime(self, mr, user_id, timestamp):
+    formatted_time = (timestr.FormatAbsoluteDate(timestamp)
+                      if timestamp else None)
+    user = self.services.user.GetUser(mr.cnxn, user_id) if user_id else None
+    user_view = None
+    if user:
+      user_view = framework_views.UserView(user)
+      viewing_self = mr.auth.user_id == user_id
+      # Do not obscure email if current user is a site admin. Do not obscure
+      # email if current user is the same as the creator. For all other
+      # cases do whatever obscure_email setting for the user is.
+      email_obscured = (not(mr.auth.user_pb.is_site_admin or viewing_self)
+                        and user_view.obscure_email)
+      if not email_obscured:
+        user_view.RevealEmail()
+
+    return user_view, formatted_time
+
+  def _ProcessEditComponent(self, mr, post_data, config, component_def):
+    """The user wants to edit this component definition."""
+    parsed = component_helpers.ParseComponentRequest(
+        mr, post_data, self.services)
+
+    if not tracker_constants.COMPONENT_NAME_RE.match(parsed.leaf_name):
+      mr.errors.leaf_name = 'Invalid component name'
+
+    original_path = component_def.path
+    if mr.component_path and '>' in mr.component_path:
+      parent_path = mr.component_path[:mr.component_path.rindex('>')]
+      new_path = '%s>%s' % (parent_path, parsed.leaf_name)
+    else:
+      new_path = parsed.leaf_name
+
+    conflict = tracker_bizobj.FindComponentDef(new_path, config)
+    if conflict and conflict.component_id != component_def.component_id:
+      mr.errors.leaf_name = 'That name is already in use.'
+
+    creator, created = self._GetUserViewAndFormattedTime(
+        mr, component_def.creator_id, component_def.created)
+    modifier, modified = self._GetUserViewAndFormattedTime(
+        mr, component_def.modifier_id, component_def.modified)
+
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(
+          mr, initial_leaf_name=parsed.leaf_name,
+          initial_docstring=parsed.docstring,
+          initial_deprecated=ezt.boolean(parsed.deprecated),
+          initial_admins=parsed.admin_usernames,
+          initial_cc=parsed.cc_usernames,
+          initial_labels=parsed.label_strs,
+          created=created,
+          creator=creator,
+          modified=modified,
+          modifier=modifier,
+      )
+      return None
+
+    new_modified = int(time.time())
+    new_modifier_id = self.services.user.LookupUserID(
+        mr.cnxn, mr.auth.email, autocreate=False)
+    self.services.config.UpdateComponentDef(
+        mr.cnxn, mr.project_id, component_def.component_id,
+        path=new_path, docstring=parsed.docstring, deprecated=parsed.deprecated,
+        admin_ids=parsed.admin_ids, cc_ids=parsed.cc_ids, modified=new_modified,
+        modifier_id=new_modifier_id, label_ids=parsed.label_ids)
+
+    update_rule = False
+    if new_path != original_path:
+      update_rule = True
+      # If the name changed then update all of its subcomponents as well.
+      subcomponent_ids = tracker_bizobj.FindMatchingComponentIDs(
+          original_path, config, exact=False)
+      for subcomponent_id in subcomponent_ids:
+        if subcomponent_id == component_def.component_id:
+          continue
+        subcomponent_def = tracker_bizobj.FindComponentDefByID(
+            subcomponent_id, config)
+        subcomponent_new_path = subcomponent_def.path.replace(
+            original_path, new_path, 1)
+        self.services.config.UpdateComponentDef(
+            mr.cnxn, mr.project_id, subcomponent_def.component_id,
+            path=subcomponent_new_path)
+
+    if (set(parsed.cc_ids) != set(component_def.cc_ids) or
+        set(parsed.label_ids) != set(component_def.label_ids)):
+      update_rule = True
+    if update_rule:
+      filterrules_helpers.RecomputeAllDerivedFields(
+          mr.cnxn, self.services, mr.project, config)
+
+    return framework_helpers.FormatAbsoluteURL(
+        mr, urls.COMPONENT_DETAIL,
+        component=new_path, saved=1, ts=int(time.time()))
diff --git a/tracker/field_helpers.py b/tracker/field_helpers.py
new file mode 100644
index 0000000..d15f5e0
--- /dev/null
+++ b/tracker/field_helpers.py
@@ -0,0 +1,542 @@
+# 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
+
+"""Helper functions for custom field sevlets."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import itertools
+import logging
+import re
+
+from features import autolink_constants
+from framework import authdata
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import permissions
+from framework import timestr
+from framework import validate
+from proto import tracker_pb2
+from services import config_svc
+from tracker import tracker_bizobj
+
+
+INVALID_USER_ID = -1
+
+ParsedFieldDef = collections.namedtuple(
+    'ParsedFieldDef',
+    'field_name, field_type_str, min_value, max_value, regex, '
+    'needs_member, needs_perm, grants_perm, notify_on, is_required, '
+    'is_niche, importance, is_multivalued, field_docstring, choices_text, '
+    'applicable_type, applicable_predicate, revised_labels, date_action_str, '
+    'approvers_str, survey, parent_approval_name, is_phase_field, '
+    'is_restricted_field')
+
+
+def ListApplicableFieldDefs(issues, config):
+  # type: (Sequence[proto.tracker_pb2.Issue],
+  #     proto.tracker_pb2.ProjectIssueConfig) ->
+  #     Sequence[proto.tracker_pb2.FieldDef]
+  """Return the applicable FieldDefs for the given issues. """
+  issue_labels = []
+  issue_approval_ids = []
+  for issue in issues:
+    issue_labels.extend(issue.labels)
+    issue_approval_ids.extend(
+        [approval.approval_id for approval in issue.approval_values])
+  labels_by_prefix = tracker_bizobj.LabelsByPrefix(list(set(issue_labels)), [])
+  types = set(labels_by_prefix.get('type', []))
+  types_lower = [t.lower() for t in types]
+  applicable_fds = []
+  for fd in config.field_defs:
+    if fd.is_deleted:
+      continue
+    if fd.field_id in issue_approval_ids:
+      applicable_fds.append(fd)
+    elif fd.field_type != tracker_pb2.FieldTypes.APPROVAL_TYPE and (
+        not fd.applicable_type or fd.applicable_type.lower() in types_lower):
+      applicable_fds.append(fd)
+  return applicable_fds
+
+
+def ParseFieldDefRequest(post_data, config):
+  """Parse the user's HTML form data to update a field definition."""
+  field_name = post_data.get('name', '')
+  field_type_str = post_data.get('field_type')
+  # TODO(jrobbins): once a min or max is set, it cannot be completely removed.
+  min_value_str = post_data.get('min_value')
+  try:
+    min_value = int(min_value_str)
+  except (ValueError, TypeError):
+    min_value = None
+  max_value_str = post_data.get('max_value')
+  try:
+    max_value = int(max_value_str)
+  except (ValueError, TypeError):
+    max_value = None
+  regex = post_data.get('regex')
+  needs_member = 'needs_member' in post_data
+  needs_perm = post_data.get('needs_perm', '').strip()
+  grants_perm = post_data.get('grants_perm', '').strip()
+  notify_on_str = post_data.get('notify_on')
+  if notify_on_str in config_svc.NOTIFY_ON_ENUM:
+    notify_on = config_svc.NOTIFY_ON_ENUM.index(notify_on_str)
+  else:
+    notify_on = 0
+  importance = post_data.get('importance')
+  is_required = (importance == 'required')
+  is_niche = (importance == 'niche')
+  is_multivalued = 'is_multivalued' in post_data
+  field_docstring = post_data.get('docstring', '')
+  choices_text = post_data.get('choices', '')
+  applicable_type = post_data.get('applicable_type', '')
+  applicable_predicate = ''  # TODO(jrobbins): placeholder for future feature
+  revised_labels = _ParseChoicesIntoWellKnownLabels(
+      choices_text, field_name, config, field_type_str)
+  date_action_str = post_data.get('date_action')
+  approvers_str = post_data.get('approver_names', '').strip().rstrip(',')
+  survey = post_data.get('survey', '')
+  parent_approval_name = post_data.get('parent_approval_name', '')
+  # TODO(jojwang): monorail:3774, remove enum_type condition when
+  # phases can have labels.
+  is_phase_field = ('is_phase_field' in post_data) and (
+      field_type_str not in ['approval_type', 'enum_type'])
+  is_restricted_field = 'is_restricted_field' in post_data
+
+  return ParsedFieldDef(
+      field_name, field_type_str, min_value, max_value, regex, needs_member,
+      needs_perm, grants_perm, notify_on, is_required, is_niche, importance,
+      is_multivalued, field_docstring, choices_text, applicable_type,
+      applicable_predicate, revised_labels, date_action_str, approvers_str,
+      survey, parent_approval_name, is_phase_field, is_restricted_field)
+
+
+def _ParseChoicesIntoWellKnownLabels(
+    choices_text, field_name, config, field_type_str):
+  """Parse a field's possible choices and integrate them into the config.
+
+  Args:
+    choices_text: string with one label and optional docstring per line.
+    field_name: string name of the field definition being edited.
+    config: ProjectIssueConfig PB of the current project.
+    field_type_str: string name of the new field's type. None if an existing
+      field is being updated
+
+  Returns:
+    A revised list of labels that can be used to update the config.
+  """
+  fd = tracker_bizobj.FindFieldDef(field_name, config)
+  matches = framework_constants.IDENTIFIER_DOCSTRING_RE.findall(choices_text)
+  maskingFieldNames = []
+  # wkls should only be masked by the field if it is an enum_type.
+  if (field_type_str == 'enum_type') or (
+      fd and fd.field_type is tracker_pb2.FieldTypes.ENUM_TYPE):
+    maskingFieldNames.append(field_name.lower())
+
+  new_labels = [
+      ('%s-%s' % (field_name, label), choice_docstring.strip(), False)
+      for label, choice_docstring in matches]
+  kept_labels = [
+      (wkl.label, wkl.label_docstring, wkl.deprecated)
+      for wkl in config.well_known_labels
+      if not tracker_bizobj.LabelIsMaskedByField(
+          wkl.label, maskingFieldNames)]
+  revised_labels = kept_labels + new_labels
+  return revised_labels
+
+
+def ShiftEnumFieldsIntoLabels(
+    labels, labels_remove, field_val_strs, field_val_strs_remove, config):
+  """Look at the custom field values and treat enum fields as labels.
+
+  Args:
+    labels: list of labels to add/set on the issue.
+    labels_remove: list of labels to remove from the issue.
+    field_val_strs: {field_id: [val_str, ...]} of custom fields to add/set.
+    field_val_strs_remove: {field_id: [val_str, ...]} of custom fields to
+        remove.
+    config: ProjectIssueConfig PB including custom field definitions.
+
+  SIDE-EFFECT: the labels and labels_remove lists will be extended with
+  key-value labels corresponding to the enum field values.  Those field
+  entries will be removed from field_val_strs and field_val_strs_remove.
+  """
+  for fd in config.field_defs:
+    if fd.field_type != tracker_pb2.FieldTypes.ENUM_TYPE:
+      continue
+
+    if fd.field_id in field_val_strs:
+      labels.extend(
+          '%s-%s' % (fd.field_name, val)
+          for val in field_val_strs[fd.field_id]
+          if val and val != '--')
+      del field_val_strs[fd.field_id]
+
+    if fd.field_id in field_val_strs_remove:
+      labels_remove.extend(
+          '%s-%s' % (fd.field_name, val)
+          for val in field_val_strs_remove[fd.field_id]
+          if val and val != '--')
+      del field_val_strs_remove[fd.field_id]
+
+
+def ReviseApprovals(approval_id, approver_ids, survey, config):
+  revised_approvals = [(
+      approval.approval_id, approval.approver_ids, approval.survey) for
+                       approval in config.approval_defs if
+                       approval.approval_id != approval_id]
+  revised_approvals.append((approval_id, approver_ids, survey))
+  return revised_approvals
+
+
+def ParseOneFieldValue(cnxn, user_service, fd, val_str):
+  """Make one FieldValue PB from the given user-supplied string."""
+  if fd.field_type == tracker_pb2.FieldTypes.INT_TYPE:
+    try:
+      return tracker_bizobj.MakeFieldValue(
+          fd.field_id, int(val_str), None, None, None, None, False)
+    except ValueError:
+      return None  # TODO(jrobbins): should bounce
+
+  elif fd.field_type == tracker_pb2.FieldTypes.STR_TYPE:
+    return tracker_bizobj.MakeFieldValue(
+        fd.field_id, None, val_str, None, None, None, False)
+
+  elif fd.field_type == tracker_pb2.FieldTypes.USER_TYPE:
+    if val_str:
+      try:
+        user_id = user_service.LookupUserID(cnxn, val_str, autocreate=False)
+      except exceptions.NoSuchUserException:
+        # Set to invalid user ID to display error during the validation step.
+        user_id = INVALID_USER_ID
+      return tracker_bizobj.MakeFieldValue(
+          fd.field_id, None, None, user_id, None, None, False)
+    else:
+      return None
+
+  elif fd.field_type == tracker_pb2.FieldTypes.DATE_TYPE:
+    try:
+      timestamp = timestr.DateWidgetStrToTimestamp(val_str)
+      return tracker_bizobj.MakeFieldValue(
+          fd.field_id, None, None, None, timestamp, None, False)
+    except ValueError:
+      return None  # TODO(jrobbins): should bounce
+
+  elif fd.field_type == tracker_pb2.FieldTypes.URL_TYPE:
+    val_str = FormatUrlFieldValue(val_str)
+    try:
+      return tracker_bizobj.MakeFieldValue(
+          fd.field_id, None, None, None, None, val_str, False)
+    except ValueError:
+      return None # TODO(jojwang): should bounce
+
+  else:
+    logging.error('Cant parse field with unexpected type %r', fd.field_type)
+    return None
+
+
+def ParseOnePhaseFieldValue(cnxn, user_service, fd, val_str, phase_ids):
+  """Return a list containing a FieldValue PB for each phase."""
+  phase_fvs = []
+  for phase_id in phase_ids:
+    # TODO(jojwang): monorail:3970, create the FieldValue once and find some
+    # proto2 CopyFrom() method to create a new one for each phase.
+    fv = ParseOneFieldValue(cnxn, user_service, fd, val_str)
+    if fv:
+      fv.phase_id = phase_id
+      phase_fvs.append(fv)
+
+  return phase_fvs
+
+
+def ParseFieldValues(cnxn, user_service, field_val_strs, phase_field_val_strs,
+                     config, phase_ids_by_name=None):
+  """Return a list of FieldValue PBs based on the given dict of strings."""
+  field_values = []
+  for fd in config.field_defs:
+    if fd.is_phase_field and (
+        fd.field_id in phase_field_val_strs) and phase_ids_by_name:
+      fvs_by_phase_name = phase_field_val_strs.get(fd.field_id, {})
+      for phase_name, val_strs in fvs_by_phase_name.items():
+        phase_ids = phase_ids_by_name.get(phase_name)
+        if not phase_ids:
+          continue
+        for val_str in val_strs:
+          field_values.extend(
+              ParseOnePhaseFieldValue(
+                  cnxn, user_service, fd, val_str, phase_ids=phase_ids))
+    # We do not save phase fields when there are no phases.
+    elif not fd.is_phase_field and (fd.field_id in field_val_strs):
+      for val_str in field_val_strs[fd.field_id]:
+        fv = ParseOneFieldValue(cnxn, user_service, fd, val_str)
+        if fv:
+          field_values.append(fv)
+
+  return field_values
+
+
+def ValidateCustomFieldValue(cnxn, project, services, field_def, field_val):
+  # type: (MonorailConnection, proto.tracker_pb2.Project, Services,
+  #     proto.tracker_pb2.FieldDef, proto.tracker_pb2.FieldValue) -> str
+  """Validate one custom field value and return an error string or None.
+
+  Args:
+    cnxn: MonorailConnection object.
+    project: Project PB with info on the project the custom field belongs to.
+    services: Services object referencing services that can be queried.
+    field_def: FieldDef for the custom field we're validating against.
+    field_val: The value of the custom field.
+
+  Returns:
+    A string containing an error message if there was one.
+  """
+  if field_def.field_type == tracker_pb2.FieldTypes.INT_TYPE:
+    if (field_def.min_value is not None and
+        field_val.int_value < field_def.min_value):
+      return 'Value must be >= %d.' % field_def.min_value
+    if (field_def.max_value is not None and
+        field_val.int_value > field_def.max_value):
+      return 'Value must be <= %d.' % field_def.max_value
+
+  elif field_def.field_type == tracker_pb2.FieldTypes.STR_TYPE:
+    if field_def.regex and field_val.str_value:
+      try:
+        regex = re.compile(field_def.regex)
+        if not regex.match(field_val.str_value):
+          return 'Value must match regular expression: %s.' % field_def.regex
+      except re.error:
+        logging.info('Failed to process regex %r with value %r. Allowing.',
+                     field_def.regex, field_val.str_value)
+        return None
+
+  elif field_def.field_type == tracker_pb2.FieldTypes.USER_TYPE:
+    field_val_user = services.user.GetUser(cnxn, field_val.user_id)
+    auth = authdata.AuthData.FromUser(cnxn, field_val_user, services)
+    if auth.user_pb.user_id == INVALID_USER_ID:
+      return 'User not found.'
+    if field_def.needs_member:
+      user_value_in_project = framework_bizobj.UserIsInProject(
+          project, auth.effective_ids)
+      if not user_value_in_project:
+        return 'User must be a member of the project.'
+      if field_def.needs_perm:
+        user_perms = permissions.GetPermissions(
+            auth.user_pb, auth.effective_ids, project)
+        has_perm = user_perms.CanUsePerm(
+            field_def.needs_perm, auth.effective_ids, project, [])
+        if not has_perm:
+          return 'User must have permission "%s".' % field_def.needs_perm
+    return None
+
+  elif field_def.field_type == tracker_pb2.FieldTypes.DATE_TYPE:
+    # TODO(jrobbins): date validation
+    pass
+
+  elif field_def.field_type == tracker_pb2.FieldTypes.URL_TYPE:
+    if field_val.url_value:
+      if not (validate.IsValidURL(field_val.url_value)
+              or autolink_constants.IS_A_SHORT_LINK_RE.match(
+                  field_val.url_value)
+              or autolink_constants.IS_A_NUMERIC_SHORT_LINK_RE.match(
+                  field_val.url_value)
+              or autolink_constants.IS_IMPLIED_LINK_RE.match(
+                  field_val.url_value)):
+        return 'Value must be a valid url.'
+
+  return None
+
+def ValidateCustomFields(
+    cnxn, services, field_values, config, project, ezt_errors=None, issue=None):
+  # type: (MonorailConnection, Services,
+  #     Collection[proto.tracker_pb2.FieldValue],
+  #     proto.tracker_pb2.ProjectConfig, proto.tracker_pb2.Project,
+  #     Optional[EZTError], Optional[proto.tracker_pb2.Issue]) ->
+  #     Sequence[str]
+  """Validate given fields and report problems in error messages."""
+  fds_by_id = {fd.field_id: fd for fd in config.field_defs}
+  err_msgs = []
+
+  # Create a set of field_ids that have required values. If this set still
+  # contains items by the end of the function, there is an error.
+  required_fds = set()
+  if issue:
+    applicable_fds = ListApplicableFieldDefs([issue], config)
+
+    lower_field_names = [fd.field_name.lower() for fd in applicable_fds]
+    label_prefixes = tracker_bizobj.LabelsByPrefix(
+        list(set(issue.labels)), lower_field_names)
+
+    # Add applicable required fields to required_fds.
+    for fd in applicable_fds:
+      if not fd.is_required:
+        continue
+
+      if (fd.field_type is tracker_pb2.FieldTypes.ENUM_TYPE and
+          fd.field_name.lower() in label_prefixes):
+        # Handle custom enum fields - they're a special case because their
+        # values are stored in labels instead of FieldValues.
+        continue
+
+      required_fds.add(fd.field_id)
+  # Ensure that every field value entered is valid. ie: That users exist.
+  for fv in field_values:
+    # Remove field_ids from the required set when found.
+    if fv.field_id in required_fds:
+      required_fds.remove(fv.field_id)
+
+    fd = fds_by_id.get(fv.field_id)
+    if fd:
+      err_msg = ValidateCustomFieldValue(cnxn, project, services, fd, fv)
+
+      if err_msg:
+        err_msgs.append('Error for %r: %s' % (fv, err_msg))
+        if ezt_errors:
+          ezt_errors.SetCustomFieldError(fv.field_id, err_msg)
+
+  # Add errors for any fields still left in the required set.
+  for field_id in required_fds:
+    fd = fds_by_id.get(field_id)
+    err_msg = '%s field is required.' % (fd.field_name)
+    err_msgs.append(err_msg)
+    if ezt_errors:
+      ezt_errors.SetCustomFieldError(field_id, err_msg)
+
+  return err_msgs
+
+
+def AssertCustomFieldsEditPerms(
+    mr, config, field_vals, field_vals_remove, fields_clear, labels,
+    labels_remove):
+  """Check permissions for any kind of custom field edition attempt."""
+  # TODO: When clearing phase_fields is possible, include it in this method.
+  field_ids = set()
+
+  for fv in field_vals:
+    field_ids.add(fv.field_id)
+  for fvr in field_vals_remove:
+    field_ids.add(fvr.field_id)
+  for fd_id in fields_clear:
+    field_ids.add(fd_id)
+
+  enum_fds_by_name = {
+      fd.field_name.lower(): fd.field_id
+      for fd in config.field_defs
+      if fd.field_type is tracker_pb2.FieldTypes.ENUM_TYPE and not fd.is_deleted
+  }
+  for label in itertools.chain(labels, labels_remove):
+    enum_field_name = tracker_bizobj.LabelIsMaskedByField(
+        label, enum_fds_by_name.keys())
+    if enum_field_name:
+      field_ids.add(enum_fds_by_name.get(enum_field_name))
+
+  fds_by_id = {fd.field_id: fd for fd in config.field_defs}
+  for field_id in field_ids:
+    fd = fds_by_id.get(field_id)
+    if fd:
+      assert permissions.CanEditValueForFieldDef(
+          mr.auth.effective_ids, mr.perms, mr.project,
+          fd), 'No permission to edit certain fields.'
+
+
+def ApplyRestrictedDefaultValues(
+    mr, config, field_vals, labels, template_field_vals, template_labels):
+  """Add default values of template fields that the user cannot edit.
+
+     This method can be called by servlets where restricted field values that
+     a user cannot edit are displayed but do not get returned when the user
+     submits the form (and also assumes that previous assertions ensure these
+     conditions). These missing default values still need to be passed to the
+     services layer when a 'write' is done so that these default values do
+     not get removed.
+
+     Args:
+       mr: MonorailRequest Object to hold info about the request and the user.
+       config: ProjectIssueConfig Object for the project.
+       field_vals: list of FieldValues that the user wants to save.
+       labels: list of labels that the user wants to save.
+       template_field_vals: list of FieldValues belonging to the template.
+       template_labels: list of labels belonging to the template.
+
+     Side Effect:
+       The default values of a template that the user cannot edit are added
+       to 'field_vals' and 'labels'.
+  """
+
+  fds_by_id = {fd.field_id: fd for fd in config.field_defs}
+  for fv in template_field_vals:
+    fd = fds_by_id.get(fv.field_id)
+    if fd and not permissions.CanEditValueForFieldDef(mr.auth.effective_ids,
+                                                      mr.perms, mr.project, fd):
+      field_vals.append(fv)
+
+  fds_by_name = {
+      fd.field_name.lower(): fd
+      for fd in config.field_defs
+      if fd.field_type is tracker_pb2.FieldTypes.ENUM_TYPE and not fd.is_deleted
+  }
+  for label in template_labels:
+    enum_field_name = tracker_bizobj.LabelIsMaskedByField(
+        label, fds_by_name.keys())
+    if enum_field_name:
+      fd = fds_by_name.get(enum_field_name)
+      if fd and not permissions.CanEditValueForFieldDef(
+          mr.auth.effective_ids, mr.perms, mr.project, fd):
+        labels.append(label)
+
+
+def FormatUrlFieldValue(url_str):
+  """Check for and add 'https://' to a url string"""
+  if not url_str.startswith('http'):
+    return 'http://' + url_str
+  return url_str
+
+
+def ReviseFieldDefFromParsed(parsed, old_fd):
+  """Creates new FieldDef based on an original FieldDef and parsed FieldDef"""
+  if parsed.date_action_str in config_svc.DATE_ACTION_ENUM:
+    date_action = config_svc.DATE_ACTION_ENUM.index(parsed.date_action_str)
+  else:
+    date_action = 0
+  return tracker_bizobj.MakeFieldDef(
+      old_fd.field_id, old_fd.project_id, old_fd.field_name, old_fd.field_type,
+      parsed.applicable_type, parsed.applicable_predicate, parsed.is_required,
+      parsed.is_niche, parsed.is_multivalued, parsed.min_value,
+      parsed.max_value, parsed.regex, parsed.needs_member, parsed.needs_perm,
+      parsed.grants_perm, parsed.notify_on, date_action, parsed.field_docstring,
+      False, approval_id=old_fd.approval_id or None,
+      is_phase_field=old_fd.is_phase_field)
+
+
+def ParsedFieldDefAssertions(mr, parsed):
+  """Checks if new/updated FieldDef is not violating basic assertions.
+      If the assertions are violated, the errors
+      will be included in the mr.errors.
+
+    Args:
+      mr: MonorailRequest object used to hold
+          commonly info parsed from the request.
+      parsed: ParsedFieldDef object used to contain parsed info,
+          in this case regarding a custom field definition.
+    """
+  # TODO(crbug/monorail/7275): This method is meant to eventually
+  # do all assertion checkings (shared by create/update fieldDef)
+  # and assign all mr.errors values.
+  if (parsed.is_required and parsed.is_niche):
+    mr.errors.is_niche = 'A field cannot be both required and niche.'
+  if parsed.date_action_str is not None and (
+      parsed.date_action_str not in config_svc.DATE_ACTION_ENUM):
+    mr.errors.date_action = 'The date action should be either: ' + ', '.join(
+        config_svc.DATE_ACTION_ENUM) + '.'
+  if (parsed.min_value is not None and parsed.max_value is not None and
+      parsed.min_value > parsed.max_value):
+    mr.errors.min_value = 'Minimum value must be less than maximum.'
+  if parsed.regex:
+    try:
+      re.compile(parsed.regex)
+    except re.error:
+      mr.errors.regex = 'Invalid regular expression.'
diff --git a/tracker/fieldcreate.py b/tracker/fieldcreate.py
new file mode 100644
index 0000000..ead72ad
--- /dev/null
+++ b/tracker/fieldcreate.py
@@ -0,0 +1,220 @@
+# 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
+
+"""A servlet for project owners to create a new field def."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import re
+import time
+
+import ezt
+
+from framework import exceptions
+from framework import framework_helpers
+from framework import jsonfeed
+from framework import permissions
+from framework import servlet
+from framework import urls
+from proto import tracker_pb2
+from tracker import field_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+
+
+class FieldCreate(servlet.Servlet):
+  """Servlet allowing project owners to create a custom field."""
+
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_PROCESS
+  _PAGE_TEMPLATE = 'tracker/field-create-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    """Check whether the user has any permission to visit this page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+    """
+    super(FieldCreate, self).AssertBasePermission(mr)
+    if not self.CheckPerm(mr, permissions.EDIT_PROJECT):
+      raise permissions.PermissionException(
+          'You are not allowed to administer this project')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    well_known_issue_types = tracker_helpers.FilterIssueTypes(config)
+    approval_names = [fd.field_name for fd in config.field_defs if
+                      fd.field_type is tracker_pb2.FieldTypes.APPROVAL_TYPE and
+                      not fd.is_deleted]
+
+    return {
+        'admin_tab_mode': servlet.Servlet.PROCESS_TAB_LABELS,
+        'initial_field_name': '',
+        'initial_field_docstring': '',
+        'initial_importance': 'normal',
+        'initial_is_multivalued': ezt.boolean(False),
+        'initial_parent_approval_name': '',
+        'initial_choices': '',
+        'initial_admins': '',
+        'initial_editors': '',
+        'initial_type': 'enum_type',
+        'initial_applicable_type': '',  # That means any issue type
+        'initial_applicable_predicate': '',
+        'initial_needs_member': ezt.boolean(False),
+        'initial_needs_perm': '',
+        'initial_grants_perm': '',
+        'initial_notify_on': 0,
+        'initial_date_action': 'no_action',
+        'well_known_issue_types': well_known_issue_types,
+        'initial_approvers': '',
+        'initial_survey': '',
+        'approval_names': approval_names,
+        'initial_is_phase_field': ezt.boolean(False),
+        'initial_is_restricted_field': ezt.boolean(False),
+    }
+
+  def ProcessFormData(self, mr, post_data):
+    """Validate and store the contents of the issues tracker admin page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: HTML form data from the request.
+
+    Returns:
+      String URL to redirect the user to, or None if response was already sent.
+    """
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    parsed = field_helpers.ParseFieldDefRequest(post_data, config)
+
+    if not tracker_constants.FIELD_NAME_RE.match(parsed.field_name):
+      mr.errors.field_name = 'Invalid field name'
+
+    field_name_error_msg = FieldNameErrorMessage(parsed.field_name, config)
+    if field_name_error_msg:
+      mr.errors.field_name = field_name_error_msg
+
+    admin_ids, admin_str = tracker_helpers.ParsePostDataUsers(
+        mr.cnxn, post_data['admin_names'], self.services.user)
+    editor_ids, editor_str = tracker_helpers.ParsePostDataUsers(
+        mr.cnxn, post_data.get('editor_names', ''), self.services.user)
+
+    field_helpers.ParsedFieldDefAssertions(mr, parsed)
+
+    if not (parsed.is_restricted_field):
+      assert not editor_ids, 'Editors are only for restricted fields.'
+
+    # TODO(crbug/monorail/7275): This condition could potentially be
+    # included in the field_helpers.ParsedFieldDefAssertions method,
+    # just remember that it should be compatible with its usage in
+    # fielddetail.py where there is a very similar condition.
+    if parsed.field_type_str == 'approval_type':
+      assert not (
+          parsed.is_restricted_field), 'Approval fields cannot be restricted.'
+      if parsed.approvers_str:
+        approver_ids_dict = self.services.user.LookupUserIDs(
+            mr.cnxn, re.split('[,;\s]+', parsed.approvers_str),
+            autocreate=True)
+        approver_ids = list(set(approver_ids_dict.values()))
+      else:
+        mr.errors.approvers = 'Please provide at least one default approver.'
+
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(
+          mr,
+          initial_field_name=parsed.field_name,
+          initial_type=parsed.field_type_str,
+          initial_parent_approval_name=parsed.parent_approval_name,
+          initial_field_docstring=parsed.field_docstring,
+          initial_applicable_type=parsed.applicable_type,
+          initial_applicable_predicate=parsed.applicable_predicate,
+          initial_needs_member=ezt.boolean(parsed.needs_member),
+          initial_needs_perm=parsed.needs_perm,
+          initial_importance=parsed.importance,
+          initial_is_multivalued=ezt.boolean(parsed.is_multivalued),
+          initial_grants_perm=parsed.grants_perm,
+          initial_notify_on=parsed.notify_on,
+          initial_date_action=parsed.date_action_str,
+          initial_choices=parsed.choices_text,
+          initial_approvers=parsed.approvers_str,
+          initial_survey=parsed.survey,
+          initial_is_phase_field=parsed.is_phase_field,
+          initial_admins=admin_str,
+          initial_editors=editor_str,
+          initial_is_restricted_field=parsed.is_restricted_field)
+      return
+
+    approval_id = None
+    if parsed.parent_approval_name and (
+        parsed.field_type_str != 'approval_type'):
+      approval_fd = tracker_bizobj.FindFieldDef(
+          parsed.parent_approval_name, config)
+      if approval_fd:
+        approval_id = approval_fd.field_id
+    field_id = self.services.config.CreateFieldDef(
+        mr.cnxn,
+        mr.project_id,
+        parsed.field_name,
+        parsed.field_type_str,
+        parsed.applicable_type,
+        parsed.applicable_predicate,
+        parsed.is_required,
+        parsed.is_niche,
+        parsed.is_multivalued,
+        parsed.min_value,
+        parsed.max_value,
+        parsed.regex,
+        parsed.needs_member,
+        parsed.needs_perm,
+        parsed.grants_perm,
+        parsed.notify_on,
+        parsed.date_action_str,
+        parsed.field_docstring,
+        admin_ids,
+        editor_ids,
+        approval_id,
+        parsed.is_phase_field,
+        is_restricted_field=parsed.is_restricted_field)
+    if parsed.field_type_str == 'approval_type':
+      revised_approvals = field_helpers.ReviseApprovals(
+          field_id, approver_ids, parsed.survey, config)
+      self.services.config.UpdateConfig(
+          mr.cnxn, mr.project, approval_defs=revised_approvals)
+    if parsed.field_type_str == 'enum_type':
+      self.services.config.UpdateConfig(
+          mr.cnxn, mr.project, well_known_labels=parsed.revised_labels)
+
+    return framework_helpers.FormatAbsoluteURL(
+        mr, urls.ADMIN_LABELS, saved=1, ts=int(time.time()))
+
+
+def FieldNameErrorMessage(field_name, config):
+  """Return an error message for the given field name, or None."""
+  field_name_lower = field_name.lower()
+  if field_name_lower in tracker_constants.RESERVED_PREFIXES:
+    return 'That name is reserved.'
+  if field_name_lower.endswith(
+      tuple(tracker_constants.RESERVED_COL_NAME_SUFFIXES)):
+    return 'That suffix is reserved.'
+
+  for fd in config.field_defs:
+    fn_lower = fd.field_name.lower()
+    if field_name_lower == fn_lower:
+      return 'That name is already in use.'
+    if field_name_lower.startswith(fn_lower + '-'):
+      return 'An existing field name is a prefix of that name.'
+    if fn_lower.startswith(field_name_lower + '-'):
+      return 'That name is a prefix of an existing field name.'
+
+  return None
diff --git a/tracker/fielddetail.py b/tracker/fielddetail.py
new file mode 100644
index 0000000..3e7ebb3
--- /dev/null
+++ b/tracker/fielddetail.py
@@ -0,0 +1,249 @@
+# 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
+
+"""A servlet for project and component owners to view and edit field defs."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+import re
+
+import ezt
+
+from framework import exceptions
+from framework import framework_helpers
+from framework import framework_views
+from framework import permissions
+from framework import servlet
+from framework import urls
+from proto import tracker_pb2
+from tracker import field_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_helpers
+from tracker import tracker_views
+
+
+class FieldDetail(servlet.Servlet):
+  """Servlet allowing project owners to view and edit a custom field."""
+
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_PROCESS
+  _PAGE_TEMPLATE = 'tracker/field-detail-page.ezt'
+
+  def _GetFieldDef(self, mr):
+    """Get the config and field definition to be viewed or edited."""
+    # TODO(jrobbins): since so many requests get the config object, and
+    # it is usually cached in RAM, just always get it and include it
+    # in the MonorailRequest, mr.
+    config = self.services.config.GetProjectConfig(
+        mr.cnxn, mr.project_id, use_cache=False)
+    field_def = tracker_bizobj.FindFieldDef(mr.field_name, config)
+    if not field_def:
+      self.abort(404, 'custom field not found')
+    return config, field_def
+
+  def AssertBasePermission(self, mr):
+    """Check whether the user has any permission to visit this page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+    """
+    super(FieldDetail, self).AssertBasePermission(mr)
+    _config, field_def = self._GetFieldDef(mr)
+
+    allow_view = permissions.CanViewFieldDef(
+        mr.auth.effective_ids, mr.perms, mr.project, field_def)
+    if not allow_view:
+      raise permissions.PermissionException(
+          'User is not allowed to view this field definition')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    config, field_def = self._GetFieldDef(mr)
+    approval_def, subfields = None, []
+    if field_def.field_type == tracker_pb2.FieldTypes.APPROVAL_TYPE:
+      approval_def = tracker_bizobj.FindApprovalDefByID(
+          field_def.field_id, config)
+      user_views = framework_views.MakeAllUserViews(
+          mr.cnxn, self.services.user, field_def.admin_ids,
+          approval_def.approver_ids)
+      subfields = tracker_bizobj.FindApprovalsSubfields(
+          [field_def.field_id], config)[field_def.field_id]
+    else:
+      user_views = framework_views.MakeAllUserViews(
+          mr.cnxn, self.services.user, field_def.admin_ids,
+          field_def.editor_ids)
+    field_def_view = tracker_views.FieldDefView(
+        field_def, config, user_views=user_views, approval_def=approval_def)
+
+    well_known_issue_types = tracker_helpers.FilterIssueTypes(config)
+
+    allow_edit = permissions.CanEditFieldDef(
+        mr.auth.effective_ids, mr.perms, mr.project, field_def)
+
+    # Right now we do not allow renaming of enum fields.
+    _uneditable_name = field_def.field_type == tracker_pb2.FieldTypes.ENUM_TYPE
+
+    initial_choices = '\n'.join(
+        [choice.name if not choice.docstring else (
+            choice.name + ' = ' + choice.docstring) for
+         choice in field_def_view.choices])
+
+    initial_approvers = ', '.join(sorted([
+      approver_view.email for approver_view in field_def_view.approvers]))
+
+    initial_admins = ', '.join(sorted([
+        uv.email for uv in field_def_view.admins]))
+    initial_editors = ', '.join(
+        sorted([uv.email for uv in field_def_view.editors]))
+
+    return {
+        'admin_tab_mode': servlet.Servlet.PROCESS_TAB_LABELS,
+        'field_def': field_def_view,
+        'allow_edit': ezt.boolean(allow_edit),
+        # TODO(jojwang): update when name changes are actually saved
+        'uneditable_name': ezt.boolean(True),
+        'initial_admins': initial_admins,
+        'initial_editors': initial_editors,
+        'initial_applicable_type': field_def.applicable_type,
+        'initial_applicable_predicate': field_def.applicable_predicate,
+        'initial_approvers': initial_approvers,
+        'initial_choices': initial_choices,
+        'approval_subfields': [fd for fd in subfields if not fd.is_deleted],
+        'well_known_issue_types': well_known_issue_types,
+    }
+
+  def ProcessFormData(self, mr, post_data):
+    """Validate and store the contents of the issues tracker admin page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: HTML form data from the request.
+
+    Returns:
+      String URL to redirect the user to, or None if response was already sent.
+    """
+    config, field_def = self._GetFieldDef(mr)
+    allow_edit = permissions.CanEditFieldDef(
+        mr.auth.effective_ids, mr.perms, mr.project, field_def)
+    if not allow_edit:
+      raise permissions.PermissionException(
+          'User is not allowed to delete this field')
+
+    if 'deletefield' in post_data:
+      return self._ProcessDeleteField(mr, config, field_def)
+    elif 'cancel' in post_data:
+      return framework_helpers.FormatAbsoluteURL(
+          mr, urls.ADMIN_LABELS, ts=int(time.time()))
+    else:
+      return self._ProcessEditField(mr, post_data, config, field_def)
+
+
+  def _ProcessDeleteField(self, mr, config, field_def):
+    """The user wants to delete the specified custom field definition."""
+    field_ids = [field_def.field_id]
+    if field_def.field_type is tracker_pb2.FieldTypes.APPROVAL_TYPE:
+      for fd in config.field_defs:
+        if fd.approval_id == field_def.field_id:
+          field_ids.append(fd.field_id)
+    self.services.config.SoftDeleteFieldDefs(
+        mr.cnxn, mr.project_id, field_ids)
+
+    return framework_helpers.FormatAbsoluteURL(
+          mr, urls.ADMIN_LABELS, deleted=1, ts=int(time.time()))
+
+    # TODO(jrobbins): add logic to reaper cron task to look for
+    # soft deleted field definitions that have no issues with
+    # any value and hard deleted them.
+
+  def _ProcessEditField(self, mr, post_data, config, field_def):
+    """The user wants to edit this field definition."""
+    # TODO(jrobbins): future feature: editable field names
+
+    parsed = field_helpers.ParseFieldDefRequest(post_data, config)
+
+    admin_ids, admin_str = tracker_helpers.ParsePostDataUsers(
+        mr.cnxn, post_data['admin_names'], self.services.user)
+    editor_ids, editor_str = tracker_helpers.ParsePostDataUsers(
+        mr.cnxn, post_data.get('editor_names', ''), self.services.user)
+
+    field_helpers.ParsedFieldDefAssertions(mr, parsed)
+
+    if not parsed.is_restricted_field:
+      assert not editor_ids, 'Editors are only for restricted fields.'
+
+    if field_def.field_type == tracker_pb2.FieldTypes.APPROVAL_TYPE:
+      assert not (
+          parsed.is_restricted_field), 'Approval fields cannot be restricted.'
+      assert not editor_ids, 'Approval fields cannot have editors.'
+
+      if parsed.approvers_str:
+        approver_ids_dict = self.services.user.LookupUserIDs(
+            mr.cnxn, re.split('[,;\s]+', parsed.approvers_str),
+            autocreate=True)
+        approver_ids = list(set(approver_ids_dict.values()))
+      else:
+        mr.errors.approvers = 'Please provide at least one default approver.'
+
+    if mr.errors.AnyErrors():
+      new_field_def = field_helpers.ReviseFieldDefFromParsed(parsed, field_def)
+
+      new_field_def_view = tracker_views.FieldDefView(
+          new_field_def, config)
+
+      self.PleaseCorrect(
+          mr,
+          field_def=new_field_def_view,
+          initial_applicable_type=parsed.applicable_type,
+          initial_choices=parsed.choices_text,
+          initial_admins=admin_str,
+          initial_editors=editor_str,
+          initial_approvers=parsed.approvers_str,
+          initial_is_restricted_field=parsed.is_restricted_field)
+      return
+
+    self.services.config.UpdateFieldDef(
+        mr.cnxn,
+        mr.project_id,
+        field_def.field_id,
+        applicable_type=parsed.applicable_type,
+        applicable_predicate=parsed.applicable_predicate,
+        is_required=parsed.is_required,
+        is_niche=parsed.is_niche,
+        min_value=parsed.min_value,
+        max_value=parsed.max_value,
+        regex=parsed.regex,
+        needs_member=parsed.needs_member,
+        needs_perm=parsed.needs_perm,
+        grants_perm=parsed.grants_perm,
+        notify_on=parsed.notify_on,
+        is_multivalued=parsed.is_multivalued,
+        date_action=parsed.date_action_str,
+        docstring=parsed.field_docstring,
+        admin_ids=admin_ids,
+        editor_ids=editor_ids,
+        is_restricted_field=parsed.is_restricted_field)
+
+    if field_def.field_type == tracker_pb2.FieldTypes.APPROVAL_TYPE:
+      approval_defs = field_helpers.ReviseApprovals(
+          field_def.field_id, approver_ids, parsed.survey, config)
+      self.services.config.UpdateConfig(
+          mr.cnxn, mr.project, approval_defs=approval_defs)
+
+    if field_def.field_type == tracker_pb2.FieldTypes.ENUM_TYPE:
+      self.services.config.UpdateConfig(
+          mr.cnxn, mr.project, well_known_labels=parsed.revised_labels)
+
+    return framework_helpers.FormatAbsoluteURL(
+          mr, urls.FIELD_DETAIL, field=field_def.field_name,
+          saved=1, ts=int(time.time()))
diff --git a/tracker/fltconversion.py b/tracker/fltconversion.py
new file mode 100644
index 0000000..c26ab62
--- /dev/null
+++ b/tracker/fltconversion.py
@@ -0,0 +1,599 @@
+# Copyright 2018 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
+
+"""FLT task to be manually triggered to convert launch issues."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+import re
+import settings
+import time
+
+from businesslogic import work_env
+from framework import permissions
+from framework import exceptions
+from framework import jsonfeed
+from proto import tracker_pb2
+from tracker import template_helpers
+from tracker import tracker_bizobj
+
+PM_PREFIX = 'pm-'
+TL_PREFIX = 'tl-'
+TEST_PREFIX = 'test-'
+UX_PREFIX = 'ux-'
+
+PM_FIELD = 'pm'
+TL_FIELD = 'tl'
+TE_FIELD = 'te'
+UX_FIELD = 'ux'
+MTARGET_FIELD = 'm-target'
+MAPPROVED_FIELD = 'm-approved'
+
+CONVERSION_COMMENT = 'Automatic generating of FLT Launch data.'
+
+BROWSER_APPROVALS_TO_LABELS = {
+    'Chrome-Accessibility': 'Launch-Accessibility-',
+    'Chrome-Leadership-Exp': 'Launch-Exp-Leadership-',
+    'Chrome-Leadership-Full': 'Launch-Leadership-',
+    'Chrome-Legal': 'Launch-Legal-',
+    'Chrome-Privacy': 'Launch-Privacy-',
+    'Chrome-Security': 'Launch-Security-',
+    'Chrome-Test': 'Launch-Test-',
+    'Chrome-UX': 'Launch-UI-',
+    }
+
+OS_APPROVALS_TO_LABELS = {
+    'ChromeOS-Accessibility': 'Launch-Accessibility-',
+    'ChromeOS-Leadership-Exp': 'Launch-Exp-Leadership-',
+    'ChromeOS-Leadership-Full': 'Launch-Leadership-',
+    'ChromeOS-Legal': 'Launch-Legal-',
+    'ChromeOS-Privacy': 'Launch-Privacy-',
+    'ChromeOS-Security': 'Launch-Security-',
+    'ChromeOS-Test': 'Launch-Test-',
+    'ChromeOS-UX': 'Launch-UI-',
+    }
+
+# 'NotReviewed' not included because this should be converted to
+# the template approval's default value, eg NOT_SET OR NEEDS_REVIEW
+VALUE_TO_STATUS = {
+    'ReviewRequested': tracker_pb2.ApprovalStatus.REVIEW_REQUESTED,
+    'NeedInfo': tracker_pb2.ApprovalStatus.NEED_INFO,
+    'Yes': tracker_pb2.ApprovalStatus.APPROVED,
+    'No': tracker_pb2.ApprovalStatus.NOT_APPROVED,
+    'NA': tracker_pb2.ApprovalStatus.NA,
+    # 'Started' is not a valid label value in the chromium project,
+    # but for some reason, some labels have this value.
+    'Started': tracker_pb2.ApprovalStatus.REVIEW_STARTED,
+}
+
+# This works in the Browser and OS process because
+# BROWSER_APPROVALS_TO_LABELS and OS_APPROVALS_TO_LABELS have the same values.
+# Adding '^' before each label prefix to ensure Blah-Launch-UI-Yes is ignored
+REVIEW_LABELS_RE = re.compile('^' + '|^'.join(
+    list(OS_APPROVALS_TO_LABELS.values())))
+
+# Maps template phases to channel names in 'Launch-M-Target-80-[Channel]' labels
+BROWSER_PHASE_MAP = {
+    'beta': 'beta',
+    'stable': 'stable',
+    'stable-full': 'stable',
+    'stable-exp': 'stable-exp',
+    }
+
+PHASE_PAT = '$|'.join(list(BROWSER_PHASE_MAP.values()))
+# Matches launch milestone labels, eg. Launch-M-Target-70-Stable-Exp
+BROWSER_M_LABELS_RE = re.compile(
+    r'^Launch-M-(?P<type>Approved|Target)-(?P<m>\d\d)-'
+    r'(?P<channel>%s$)' % PHASE_PAT,
+    re.IGNORECASE)
+
+OS_PHASE_MAP = {'feature freeze': '',
+                 'branch': '',
+                'stable': 'stable',
+                'stable-full': 'stable',
+                'stable-exp': 'stable-exp',}
+# We only care about Launch-M-<type>-<m>-Stable|Stable-Exp labels for OS.
+OS_M_LABELS_RE = re.compile(
+    r'^Launch-M-(?P<type>Approved|Target)-(?P<m>\d\d)-'
+    r'(?P<channel>Stable$|Stable-Exp$)', re.IGNORECASE)
+
+CAN = 2  # Query for open issues only
+# Ensure empty group_by_spec and sort_spec so issues are sorted by 'ID'.
+GROUP_BY_SPEC = ''
+SORT_SPEC = ''
+
+CONVERT_NUM = 20
+CONVERT_START = 0
+VERIFY_NUM = 400
+
+# Queries
+QUERY_MAP = {
+    'default':
+    'Type=Launch Rollout-Type=Default OS=Windows,Mac,Linux,Android,iOS',
+    'finch': 'Type=Launch Rollout-Type=Finch OS=Windows,Mac,Linux,Android,iOS',
+    'os': 'Type=Launch OS=Chrome -OS=Windows,Mac,Linux,Android,iOS'
+    ' Rollout-Type=Default',
+    'os-finch': 'Type=Launch OS=Chrome -OS=Windows,Mac,Linux,Android,iOS'
+    ' Rollout-Type=Finch'}
+
+TEMPLATE_MAP = {
+    'default': 'Chrome Launch - Default',
+    'finch': 'Chrome Launch - Experimental',
+    'os': 'Chrome OS Launch - Default',
+    'os-finch': 'Chrome OS Launch - Experimental',
+}
+
+ProjectInfo = collections.namedtuple(
+    'ProjectInfo', 'config, q, approval_values, phases, '
+    'pm_fid, tl_fid, te_fid, ux_fid, m_target_id, m_approved_id, '
+    'phase_map, approvals_to_labels, labels_re')
+
+
+class FLTConvertTask(jsonfeed.InternalTask):
+  """FLTConvert converts current Type=Launch issues into Type=FLT-Launch."""
+
+  def AssertBasePermission(self, mr):
+    super(FLTConvertTask, self).AssertBasePermission(mr)
+    if not mr.auth.user_pb.is_site_admin:
+      raise permissions.PermissionException(
+          'Only site admins may trigger conversion job')
+
+  def UndoConversion(self, mr):
+    with work_env.WorkEnv(mr, self.services) as we:
+      pipeline = we.ListIssues(
+          'Type=FLT-Launch FLT=Conversion', ['chromium'], mr.auth.user_id,
+          CONVERT_NUM, CONVERT_START, 2, GROUP_BY_SPEC, SORT_SPEC, False)
+
+    project = self.services.project.GetProjectByName(mr.cnxn, 'chromium')
+    config = self.services.config.GetProjectConfig(mr.cnxn, project.project_id)
+    pm_id = tracker_bizobj.FindFieldDef('PM', config).field_id
+    tl_id = tracker_bizobj.FindFieldDef('TL', config).field_id
+    te_id = tracker_bizobj.FindFieldDef('TE', config).field_id
+    ux_id = tracker_bizobj.FindFieldDef('UX', config).field_id
+    for possible_stale_issue in pipeline.visible_results:
+      issue = self.services.issue.GetIssue(
+          mr.cnxn, possible_stale_issue.issue_id, use_cache=False)
+
+      issue.approval_values = []
+      issue.phases = []
+      issue.field_values = [fv for fv in issue.field_values
+                            if fv.phase_id is None]
+      issue.field_values = [fv for fv in issue.field_values
+                            if fv.field_id not in
+                            [pm_id, tl_id, te_id, ux_id]]
+      issue.labels.remove('Type-FLT-Launch')
+      issue.labels.remove('FLT-Conversion')
+      issue.labels.append('Type-Launch')
+
+      self.services.issue._UpdateIssuesApprovals(mr.cnxn, issue)
+      self.services.issue.UpdateIssue(mr.cnxn, issue)
+    return {'deleting': [issue.local_id for issue in pipeline.visible_results],
+            'num': len(pipeline.visible_results),
+    }
+
+  def VerifyConversion(self, mr):
+    """Verify that all FLT-Conversion issues were converted correctly."""
+    with work_env.WorkEnv(mr, self.services) as we:
+      pipeline = we.ListIssues(
+          'FLT=Conversion', ['chromium'], mr.auth.user_id, VERIFY_NUM,
+          CONVERT_START, 2, GROUP_BY_SPEC, SORT_SPEC, False)
+
+    project = self.services.project.GetProjectByName(mr.cnxn, 'chromium')
+    config = self.services.config.GetProjectConfig(mr.cnxn, project.project_id)
+    browser_approval_names = {fd.field_id: fd.field_name for fd
+                              in config.field_defs if fd.field_name in
+                              BROWSER_APPROVALS_TO_LABELS.keys()}
+    os_approval_names = {fd.field_id: fd.field_name for fd in config.field_defs
+                         if (fd.field_name in OS_APPROVALS_TO_LABELS.keys())
+                         or fd.field_name == 'ChromeOS-Enterprise'}
+    pm_id = tracker_bizobj.FindFieldDef('PM', config).field_id
+    tl_id = tracker_bizobj.FindFieldDef('TL', config).field_id
+    te_id = tracker_bizobj.FindFieldDef('TE', config).field_id
+    ux_id = tracker_bizobj.FindFieldDef('UX', config).field_id
+    mapproved_id = tracker_bizobj.FindFieldDef('M-Approved', config).field_id
+    mtarget_id = tracker_bizobj.FindFieldDef('M-Target', config).field_id
+
+    problems = []
+    for possible_stale_issue in pipeline.allowed_results:
+      issue = self.services.issue.GetIssue(
+          mr.cnxn, possible_stale_issue.issue_id, use_cache=False)
+      # Check correct template used
+      approval_names = browser_approval_names
+      approvals_to_labels = BROWSER_APPROVALS_TO_LABELS
+      m_labels_re = BROWSER_M_LABELS_RE
+      label_channel_to_phase_id = {
+          phase.name.lower(): phase.phase_id for phase in issue.phases}
+      if [l for l in issue.labels if l.startswith('OS-')] == ['OS-Chrome']:
+        approval_names = os_approval_names
+        m_labels_re = OS_M_LABELS_RE
+        approvals_to_labels = OS_APPROVALS_TO_LABELS
+        # OS default launch
+        if 'Rollout-Type-Default' in issue.labels:
+          if not all(phase.name in ['Feature Freeze', 'Branch', 'Stable']
+                     for phase in issue.phases):
+            problems.append((
+                issue.local_id, 'incorrect phases for OS default launch.'))
+        # OS finch launch
+        elif 'Rollout-Type-Finch' in issue.labels:
+          if not all(phase.name in (
+              'Feature Freeze', 'Branch', 'Stable-Exp', 'Stable-Full')
+                     for phase in issue.phases):
+            problems.append((
+                issue.local_id, 'incorrect phases for OS finch launch.'))
+        else:
+          problems.append((
+              issue.local_id,
+              'no rollout-type; should not have been converted'))
+      # Browser default launch
+      elif 'Rollout-Type-Default' in issue.labels:
+        if not all(phase.name.lower() in ['beta', 'stable']
+                   for phase in issue.phases):
+          problems.append((
+              issue.local_id, 'incorrect phases for Default rollout'))
+      # Browser finch launch
+      elif 'Rollout-Type-Finch' in issue.labels:
+        if not all(phase.name.lower() in ['beta', 'stable-exp', 'stable-full']
+                   for phase in issue.phases):
+          problems.append((
+              issue.local_id, 'incorrect phases for Finch rollout'))
+      else:
+        problems.append((
+            issue.local_id,
+            'no rollout-type; should not have been converted'))
+
+      # Check approval_values
+      for av in issue.approval_values:
+        name = approval_names.get(av.approval_id)
+        if name == 'ChromeOS-Enterprise':
+          if av.status != tracker_pb2.ApprovalStatus.NEEDS_REVIEW:
+            problems.append((issue.local_id, 'bad ChromeOS-Enterprise status'))
+          continue
+        label_pre = approvals_to_labels.get(name)
+        if not label_pre:
+          # either name was None or not found in APPROVALS_TO_LABELS
+          problems.append((issue.local_id, 'approval %s not recognized' % name))
+          continue
+        label_value = next((l[len(label_pre):] for l in issue.labels
+                            if l.startswith(label_pre)), None)
+        if (not label_value or label_value == 'NotReviewed') and av.status in [
+            tracker_pb2.ApprovalStatus.NOT_SET,
+            tracker_pb2.ApprovalStatus.NEEDS_REVIEW]:
+          continue
+        if av.status is VALUE_TO_STATUS.get(label_value):
+          continue
+        # neither of the above ifs passed
+        problems.append((issue.local_id,
+                         'approval %s has status %r for label value %s' % (
+                             name, av.status.name, label_value)))
+
+      # Check people field_values
+      expected_people_fvs = self.ConvertPeopleLabels(
+          mr, issue.labels, pm_id, tl_id, te_id, ux_id)
+      for people_fv in expected_people_fvs:
+        if people_fv not in issue.field_values:
+          if people_fv.field_id == tl_id:
+            role = 'TL'
+          elif people_fv.field_id == pm_id:
+            role = 'PM'
+          elif people_fv.field_id == ux_id:
+            role = 'UX'
+          else:
+            role = 'TE'
+          problems.append((issue.local_id, 'missing a field for %s' % role))
+
+      # Check M phase field_values
+      for label in issue.labels:
+        match = re.match(m_labels_re, label)
+        if match:
+          channel = match.group('channel')
+          if (channel.lower() == 'stable-exp'
+              and 'Rollout-Type-Default' in issue.labels):
+            # ignore stable-exp for default rollouts.
+            continue
+          milestone = match.group('m')
+          m_type = match.group('type')
+          m_id = mapproved_id if m_type == 'Approved' else mtarget_id
+          phase_id = label_channel_to_phase_id.get(
+              channel.lower(), label_channel_to_phase_id.get('stable-full'))
+          if not next((
+              fv for fv in issue.field_values
+              if fv.phase_id == phase_id and fv.field_id == m_id and
+              fv.int_value == int(milestone)), None):
+            problems.append((
+                issue.local_id, 'no phase field for label %s' % label))
+
+    return {
+        'problems found': ['issue %d: %s' % problem for problem in problems],
+        'issues verified': ['issue %d' % issue.local_id for
+                            issue in pipeline.allowed_results],
+        'num': len(pipeline.allowed_results),
+    }
+
+  def HandleRequest(self, mr):
+    """Convert Type=Launch issues to new Type=FLT-Launch issues."""
+    launch = mr.GetParam('launch')
+    if launch == 'delete':
+      return self.UndoConversion(mr)
+    if launch == 'verify':
+      return self.VerifyConversion(mr)
+    project_info = self.FetchAndAssertProjectInfo(mr)
+
+    # Search for issues:
+    with work_env.WorkEnv(mr, self.services) as we:
+      pipeline = we.ListIssues(
+          project_info.q, ['chromium'], mr.auth.user_id, CONVERT_NUM,
+          CONVERT_START, 2, GROUP_BY_SPEC, SORT_SPEC, False)
+
+    # Convert issues:
+    for possible_stale_issue in pipeline.visible_results:
+      # Note: These approval values and phases from templates will be used
+      # and modified to create approval values and phases for each issue.
+      # We need to create copies for each issue so changes are not carried
+      # over to the conversion of the next issue in the loop.
+      template_avs = self.CreateApprovalCopies(project_info.approval_values)
+      template_phases = self.CreatePhasesCopies(project_info.phases)
+      issue = self.services.issue.GetIssue(
+          mr.cnxn, possible_stale_issue.issue_id, use_cache=False)
+      new_approvals = ConvertLaunchLabels(
+          issue.labels, template_avs,
+          project_info.config.field_defs, project_info.approvals_to_labels)
+      m_fvs = ConvertMLabels(
+          issue.labels, template_phases,
+          project_info.m_target_id, project_info.m_approved_id,
+          project_info.labels_re, project_info.phase_map)
+      people_fvs = self.ConvertPeopleLabels(
+          mr, issue.labels,
+          project_info.pm_fid, project_info.tl_fid, project_info.te_fid,
+          project_info.ux_fid)
+      amendments = self.ExecuteIssueChanges(
+          project_info.config, issue, new_approvals,
+          template_phases, m_fvs + people_fvs)
+      logging.info(amendments)
+
+    return {
+        'converted_issues': [
+            issue.local_id for issue in pipeline.visible_results],
+        'num': len(pipeline.visible_results),
+        }
+
+  def CreateApprovalCopies(self, avs):
+    return [
+      tracker_pb2.ApprovalValue(
+          approval_id=av.approval_id,
+          status=av.status,
+          setter_id=av.setter_id,
+          set_on=av.set_on,
+          phase_id=av.phase_id) for av in avs
+    ]
+
+  def CreatePhasesCopies(self, phases):
+    return [
+      tracker_pb2.Phase(
+          phase_id=phase.phase_id,
+          name=phase.name,
+          rank=phase.rank) for phase in phases
+        ]
+
+  def FetchAndAssertProjectInfo(self, mr):
+    # Get request details
+    launch = mr.GetParam('launch')
+    logging.info(launch)
+    q = QUERY_MAP.get(launch)
+    template_name = TEMPLATE_MAP.get(launch)
+    assert q and template_name, 'bad launch type: %s' % launch
+
+    phase_map = (
+        OS_PHASE_MAP if launch in ['os', 'os-finch'] else BROWSER_PHASE_MAP)
+    approvals_to_labels = (
+        OS_APPROVALS_TO_LABELS if launch in ['os', 'os-finch']
+        else BROWSER_APPROVALS_TO_LABELS)
+    m_labels_re = (
+        OS_M_LABELS_RE if launch in ['os', 'os-finch'] else BROWSER_M_LABELS_RE)
+
+    # Get project, config, template, assert template in project
+    project = self.services.project.GetProjectByName(mr.cnxn, 'chromium')
+    config = self.services.config.GetProjectConfig(mr.cnxn, project.project_id)
+    template = self.services.template.GetTemplateByName(
+        mr.cnxn, template_name, project.project_id)
+    assert template, 'template %s not found in chromium project' % template_name
+
+    # Get template approval_values/phases and assert they are expected
+    approval_values, phases = template_helpers.FilterApprovalsAndPhases(
+        template.approval_values, template.phases, config)
+    assert approval_values and phases, (
+        'no approvals or phases in %s' % template_name)
+    assert all(phase.name.lower() in list(
+        phase_map.keys()) for phase in phases), (
+          'one or more phases not recognized')
+    if launch in ['finch', 'os', 'os-finch']:
+      assert all(
+          av.status is tracker_pb2.ApprovalStatus.NEEDS_REVIEW
+          for av in approval_values
+      ), '%s template not set up correctly' % launch
+
+    approval_fds = {fd.field_id: fd.field_name for fd in config.field_defs
+                    if fd.field_type is tracker_pb2.FieldTypes.APPROVAL_TYPE}
+    assert all(
+        approval_fds.get(av.approval_id) in list(approvals_to_labels.keys())
+        for av in approval_values
+        if approval_fds.get(av.approval_id) != 'ChromeOS-Enterprise'), (
+            'one or more approvals not recognized')
+    approval_def_ids = [ad.approval_id for ad in config.approval_defs]
+    assert all(av.approval_id in approval_def_ids for av in approval_values), (
+        'one or more approvals not in config.approval_defs')
+
+    # Get relevant USER_TYPE FieldDef ids and assert they exist
+    user_fds = {fd.field_name.lower(): fd.field_id for fd in config.field_defs
+                    if fd.field_type is tracker_pb2.FieldTypes.USER_TYPE}
+    logging.info('project USER_TYPE FieldDefs: %s' % user_fds)
+    pm_fid = user_fds.get(PM_FIELD)
+    assert pm_fid, 'project has no FieldDef %s' % PM_FIELD
+    tl_fid = user_fds.get(TL_FIELD)
+    assert tl_fid, 'project has no FieldDef %s' % TL_FIELD
+    te_fid = user_fds.get(TE_FIELD)
+    assert te_fid, 'project has no FieldDef %s' % TE_FIELD
+    ux_fid = user_fds.get(UX_FIELD)
+    assert ux_fid, 'project has no FieldDef %s' % UX_FIELD
+
+    # Get relevant M Phase INT_TYPE FieldDef ids and assert they exist
+    phase_int_fds = {fd.field_name.lower(): fd.field_id
+                     for fd in config.field_defs
+                     if fd.field_type is tracker_pb2.FieldTypes.INT_TYPE
+                     and fd.is_phase_field and fd.is_multivalued}
+    logging.info(
+        'project Phase INT_TYPE multivalued FieldDefs: %s' % phase_int_fds)
+    m_target_id = phase_int_fds.get(MTARGET_FIELD)
+    assert m_target_id, 'project has no FieldDef %s' % MTARGET_FIELD
+    m_approved_id = phase_int_fds.get(MAPPROVED_FIELD)
+    assert m_approved_id, 'project has no FieldDef %s' % MAPPROVED_FIELD
+
+    return ProjectInfo(config, q, approval_values, phases, pm_fid, tl_fid,
+                       te_fid, ux_fid, m_target_id, m_approved_id, phase_map,
+                       approvals_to_labels, m_labels_re)
+
+  # TODO(jojwang): mr needs to be passed in as arg and
+  # all self.mr should be changed to mr
+  def ExecuteIssueChanges(self, config, issue, new_approvals, phases, new_fvs):
+    # Apply Approval and phase changes
+    approval_defs_by_id = {ad.approval_id: ad for ad in config.approval_defs}
+    for av in new_approvals:
+      ad = approval_defs_by_id.get(av.approval_id)
+      if ad:
+        av.approver_ids = ad.approver_ids
+        survey = ''
+        if ad.survey:
+          questions = ad.survey.split('\n')
+          survey = '\n'.join(['<b>' + q + '</b>' for q in questions])
+        self.services.issue.InsertComment(
+            self.mr.cnxn, tracker_pb2.IssueComment(
+                issue_id=issue.issue_id, project_id=issue.project_id,
+                user_id=self.mr.auth.user_id, content=survey,
+                is_description=True, approval_id=av.approval_id,
+                timestamp=int(time.time())))
+      else:
+        logging.info(
+            'ERROR: ApprovalDef %r for ApprovalValue %r not valid', ad, av)
+    issue.approval_values = new_approvals
+    self.services.issue._UpdateIssuesApprovals(self.mr.cnxn, issue)
+
+    # Apply field value changes
+    issue.phases = phases
+    delta = tracker_bizobj.MakeIssueDelta(
+        None, None, [], [], [], [], ['Type-FLT-Launch', 'FLT-Conversion'],
+        ['Type-Launch'], new_fvs, [], [], [], [], [], [], None, None)
+    amendments, _ = self.services.issue.DeltaUpdateIssue(
+        self.mr.cnxn, self.services, self.mr.auth.user_id, issue.project_id,
+        config, issue, delta, comment=CONVERSION_COMMENT)
+
+    return amendments
+
+  def ConvertPeopleLabels(
+      self, mr, labels, pm_field_id, tl_field_id, te_field_id, ux_field_id):
+    field_values = []
+    pm_ldap, tl_ldap, test_ldaps, ux_ldaps = ExtractLabelLDAPs(labels)
+
+    pm_fv = self.CreateUserFieldValue(mr, pm_ldap, pm_field_id)
+    if pm_fv:
+      field_values.append(pm_fv)
+
+    tl_fv = self.CreateUserFieldValue(mr, tl_ldap, tl_field_id)
+    if tl_fv:
+      field_values.append(tl_fv)
+
+    for test_ldap in test_ldaps:
+      te_fv = self.CreateUserFieldValue(mr, test_ldap, te_field_id)
+      if te_fv:
+        field_values.append(te_fv)
+
+    for ux_ldap in ux_ldaps:
+      ux_fv = self.CreateUserFieldValue(mr, ux_ldap, ux_field_id)
+      if ux_fv:
+        field_values.append(ux_fv)
+    return field_values
+
+  def CreateUserFieldValue(self, mr, ldap, field_id):
+    if ldap is None:
+      return None
+    try:
+      user_id = self.services.user.LookupUserID(mr.cnxn, ldap+'@chromium.org')
+    except exceptions.NoSuchUserException:
+      try:
+        user_id = self.services.user.LookupUserID(mr.cnxn, ldap+'@google.com')
+      except exceptions.NoSuchUserException:
+        logging.info('No chromium.org or google.com accound found for %s', ldap)
+        return None
+    return tracker_bizobj.MakeFieldValue(
+        field_id, None, None, user_id, None, None, False)
+
+
+def ConvertMLabels(
+    labels, phases, m_target_id, m_approved_id, labels_re, phase_map):
+  field_values = []
+  for label in labels:
+    match = re.match(labels_re, label)
+    if match:
+      milestone = match.group('m')
+      m_type = match.group('type')
+      channel = match.group('channel')
+      for phase in phases:
+        # We know get(phase) will return something because
+        # we're checking before ConvertMLabels, that all phases
+        # exist in BROWSER_PHASE_MAP or OS_PHASE_MAP
+        if phase_map.get(phase.name.lower()) == channel.lower():
+          field_id = m_target_id if (
+              m_type.lower() == 'target') else m_approved_id
+          field_values.append(tracker_bizobj.MakeFieldValue(
+              field_id, int(milestone), None, None, None, None, False,
+              phase_id=phase.phase_id))
+          break  # exit phase loop if match is found.
+  return field_values
+
+
+def ConvertLaunchLabels(labels, approvals, project_fds, approvals_to_labels):
+  """Converts 'Launch-[Review]' values into statuses for given approvals."""
+  label_values = {}
+  for label in labels:
+    launch_match = REVIEW_LABELS_RE.match(label)
+    if launch_match:
+      prefix = launch_match.group()
+      value = label[len(prefix):]  # returns 'Yes' from 'Launch-UI-Yes'
+      label_values[prefix] = value
+
+  field_names_dict = {fd.field_id: fd.field_name for fd in project_fds}
+  for approval in approvals:
+    approval_name = field_names_dict.get(approval.approval_id, '')
+    old_prefix = approvals_to_labels.get(approval_name)
+    label_value = label_values.get(old_prefix, '')
+    # if label_value not found in VALUE_TO_STATUS, use current status.
+    approval.status = VALUE_TO_STATUS.get(label_value, approval.status)
+
+  return approvals
+
+
+def ExtractLabelLDAPs(labels):
+  """Extracts LDAPs from labels 'PM-', 'TL-', 'UX-', and 'test-'"""
+
+  pm_ldap = None
+  tl_ldap = None
+  test_ldaps = []
+  ux_ldaps = []
+  for label in labels:
+    label = label.lower()
+    if label.startswith(PM_PREFIX):
+      pm_ldap = label[len(PM_PREFIX):]
+    elif label.startswith(TL_PREFIX):
+      tl_ldap = label[len(TL_PREFIX):]
+    elif label.startswith(TEST_PREFIX):
+      ldap = label[len(TEST_PREFIX):]
+      if ldap:
+        test_ldaps.append(ldap)
+    elif label.startswith(UX_PREFIX):
+      ldap = label[len(UX_PREFIX):]
+      if ldap:
+        ux_ldaps.append(ldap)
+  return pm_ldap, tl_ldap, test_ldaps, ux_ldaps
diff --git a/tracker/issue-blocking-change-notification-email.ezt b/tracker/issue-blocking-change-notification-email.ezt
new file mode 100644
index 0000000..9e45c69
--- /dev/null
+++ b/tracker/issue-blocking-change-notification-email.ezt
@@ -0,0 +1,7 @@
+Issue [issue.local_id]: [format "raw"][summary][end]
+[detail_url]
+
+[if-any is_blocking]This issue is now blocking issue [downstream_issue_ref].
+See [downstream_issue_url]
+[else]This issue is no longer blocking issue [downstream_issue_ref].
+See [downstream_issue_url][end]
diff --git a/tracker/issue-bulk-change-notification-email.ezt b/tracker/issue-bulk-change-notification-email.ezt
new file mode 100644
index 0000000..2051220
--- /dev/null
+++ b/tracker/issue-bulk-change-notification-email.ezt
@@ -0,0 +1,18 @@
+[if-any amendments]Updates:
+[amendments]
+[end]
+Comment[if-any commenter] by [commenter.display_name][end]:
+[if-any comment_text][format "raw"][comment_text][end][else](No comment was entered for this change.)[end]
+
+Affected issues:
+[for issues]  issue [issues.local_id]: [format "raw"][issues.summary][end]
+    [format "raw"]http://[hostport][issues.detail_relative_url][end]
+
+[end]
+[is body_type "email"]
+--
+You received this message because you are listed in the owner
+or CC fields of these issues, or because you starred them.
+You may adjust your issue notification preferences at:
+http://[hostport]/hosting/settings
+[end]
diff --git a/tracker/issueadmin.py b/tracker/issueadmin.py
new file mode 100644
index 0000000..5c34f72
--- /dev/null
+++ b/tracker/issueadmin.py
@@ -0,0 +1,587 @@
+# 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
+
+"""Servlets for issue tracker configuration.
+
+These classes implement the Statuses, Labels and fields, Components, Rules, and
+Views subtabs under the Process tab.  Unlike most servlet modules, this single
+file holds a base class and several related servlet classes.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import itertools
+import logging
+import time
+
+import ezt
+
+from features import filterrules_helpers
+from features import filterrules_views
+from features import savedqueries_helpers
+from framework import authdata
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import monorailrequest
+from framework import permissions
+from framework import servlet
+from framework import urls
+from proto import tracker_pb2
+from tracker import field_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+from tracker import tracker_views
+
+
+class IssueAdminBase(servlet.Servlet):
+  """Base class for servlets allowing project owners to configure tracker."""
+
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_PROCESS
+  _PROCESS_SUBTAB = None  # specified in subclasses
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    config_view = tracker_views.ConfigView(mr, self.services, config,
+        template=None, load_all_templates=True)
+    open_text, closed_text = tracker_views.StatusDefsAsText(config)
+    labels_text = tracker_views.LabelDefsAsText(config)
+
+    return {
+        'admin_tab_mode': self._PROCESS_SUBTAB,
+        'config': config_view,
+        'open_text': open_text,
+        'closed_text': closed_text,
+        'labels_text': labels_text,
+        }
+
+  def ProcessFormData(self, mr, post_data):
+    """Validate and store the contents of the issues tracker admin page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: HTML form data from the request.
+
+    Returns:
+      String URL to redirect the user to, or None if response was already sent.
+    """
+    page_url = self.ProcessSubtabForm(post_data, mr)
+
+    if page_url:
+      return framework_helpers.FormatAbsoluteURL(
+          mr, page_url, saved=1, ts=int(time.time()))
+
+
+class AdminStatuses(IssueAdminBase):
+  """Servlet allowing project owners to configure well-known statuses."""
+
+  _PAGE_TEMPLATE = 'tracker/admin-statuses-page.ezt'
+  _PROCESS_SUBTAB = servlet.Servlet.PROCESS_TAB_STATUSES
+
+  def ProcessSubtabForm(self, post_data, mr):
+    """Process the status definition section of the admin page.
+
+    Args:
+      post_data: HTML form data for the HTTP request being processed.
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      The URL of the page to show after processing.
+    """
+    if not self.CheckPerm(mr, permissions.EDIT_PROJECT):
+      raise permissions.PermissionException(
+          'Only project owners may edit the status definitions')
+
+    wks_open_text = post_data.get('predefinedopen', '')
+    wks_open_matches = framework_constants.IDENTIFIER_DOCSTRING_RE.findall(
+        wks_open_text)
+    wks_open_tuples = [
+        (status.lstrip('#'), docstring.strip(), True, status.startswith('#'))
+        for status, docstring in wks_open_matches]
+    if not wks_open_tuples:
+      mr.errors.open_statuses = 'A project cannot have zero open statuses'
+
+    wks_closed_text = post_data.get('predefinedclosed', '')
+    wks_closed_matches = framework_constants.IDENTIFIER_DOCSTRING_RE.findall(
+        wks_closed_text)
+    wks_closed_tuples = [
+        (status.lstrip('#'), docstring.strip(), False, status.startswith('#'))
+        for status, docstring in wks_closed_matches]
+    if not wks_closed_tuples:
+      mr.errors.closed_statuses = 'A project cannot have zero closed statuses'
+
+    statuses_offer_merge_text = post_data.get('statuses_offer_merge', '')
+    statuses_offer_merge = framework_constants.IDENTIFIER_RE.findall(
+        statuses_offer_merge_text)
+
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(
+          mr, open_text=wks_open_text, closed_text=wks_closed_text)
+      return
+
+    self.services.config.UpdateConfig(
+        mr.cnxn, mr.project, statuses_offer_merge=statuses_offer_merge,
+        well_known_statuses=wks_open_tuples + wks_closed_tuples)
+
+    # TODO(jrobbins): define a "strict" mode that affects only statuses.
+
+    return urls.ADMIN_STATUSES
+
+
+class AdminLabels(IssueAdminBase):
+  """Servlet allowing project owners to labels and fields."""
+
+  _PAGE_TEMPLATE = 'tracker/admin-labels-page.ezt'
+  _PROCESS_SUBTAB = servlet.Servlet.PROCESS_TAB_LABELS
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    page_data = super(AdminLabels, self).GatherPageData(mr)
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    field_def_views = [
+        tracker_views.FieldDefView(fd, config)
+        # TODO(jrobbins): future field-level view restrictions.
+        for fd in config.field_defs
+        if not fd.is_deleted]
+    page_data.update({
+        'field_defs': field_def_views,
+        })
+    return page_data
+
+  def ProcessSubtabForm(self, post_data, mr):
+    """Process changes to labels and custom field definitions.
+
+    Args:
+      post_data: HTML form data for the HTTP request being processed.
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      The URL of the page to show after processing.
+    """
+    if not self.CheckPerm(mr, permissions.EDIT_PROJECT):
+      raise permissions.PermissionException(
+          'Only project owners may edit the label definitions')
+
+    wkl_text = post_data.get('predefinedlabels', '')
+    wkl_matches = framework_constants.IDENTIFIER_DOCSTRING_RE.findall(wkl_text)
+    wkl_tuples = [
+        (label.lstrip('#'), docstring.strip(), label.startswith('#'))
+        for label, docstring in wkl_matches]
+    if not wkl_tuples:
+      mr.errors.label_defs = 'A project cannot have zero labels'
+    label_counter = collections.Counter(wkl[0].lower() for wkl in wkl_tuples)
+    for lab, count in label_counter.items():
+      if count > 1:
+        mr.errors.label_defs = 'Duplicate label: %s' % lab
+
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    field_names = [fd.field_name for fd in config.field_defs
+                   if fd.field_type is tracker_pb2.FieldTypes.ENUM_TYPE
+                   and not fd.is_deleted]
+    masked_labels = tracker_helpers.LabelsMaskedByFields(config, field_names)
+    field_names_lower = [field_name.lower() for field_name in field_names]
+    for wkl in wkl_tuples:
+      conflict = tracker_bizobj.LabelIsMaskedByField(wkl[0], field_names_lower)
+      if conflict:
+        mr.errors.label_defs = (
+            'Label "%s" should be defined in enum "%s"' % (wkl[0], conflict))
+    wkl_tuples.extend([
+        (masked.name, masked.docstring, False) for masked in masked_labels])
+
+    excl_prefix_text = post_data.get('excl_prefixes', '')
+    excl_prefixes = framework_constants.IDENTIFIER_RE.findall(excl_prefix_text)
+
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(mr, labels_text=wkl_text)
+      return
+
+    self.services.config.UpdateConfig(
+        mr.cnxn, mr.project,
+        well_known_labels=wkl_tuples, excl_label_prefixes=excl_prefixes)
+
+    # TODO(jrobbins): define a "strict" mode that affects only labels.
+
+    return urls.ADMIN_LABELS
+
+
+class AdminTemplates(IssueAdminBase):
+  """Servlet allowing project owners to configure templates."""
+
+  _PAGE_TEMPLATE = 'tracker/admin-templates-page.ezt'
+  _PROCESS_SUBTAB = servlet.Servlet.PROCESS_TAB_TEMPLATES
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    return super(AdminTemplates, self).GatherPageData(mr)
+
+  def ProcessSubtabForm(self, post_data, mr):
+    """Process changes to new issue templates.
+
+    Args:
+      post_data: HTML form data for the HTTP request being processed.
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      The URL of the page to show after processing.
+    """
+    if not self.CheckPerm(mr, permissions.EDIT_PROJECT):
+      raise permissions.PermissionException(
+          'Only project owners may edit the default templates')
+
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+
+    templates = self.services.template.GetProjectTemplates(mr.cnxn,
+        config.project_id)
+    default_template_id_for_developers, default_template_id_for_users = (
+        self._ParseDefaultTemplateSelections(post_data, templates))
+    if default_template_id_for_developers or default_template_id_for_users:
+      self.services.config.UpdateConfig(
+          mr.cnxn, mr.project,
+          default_template_for_developers=default_template_id_for_developers,
+          default_template_for_users=default_template_id_for_users)
+
+    return urls.ADMIN_TEMPLATES
+
+  def _ParseDefaultTemplateSelections(self, post_data, templates):
+    """Parse the input for the default templates to offer users."""
+    def GetSelectedTemplateID(name):
+      """Find the ID of the template specified in post_data[name]."""
+      if name not in post_data:
+        return None
+      selected_template_name = post_data[name]
+      for template in templates:
+        if selected_template_name == template.name:
+          return template.template_id
+
+      logging.error('User somehow selected an invalid template: %r',
+                    selected_template_name)
+      return None
+
+    return (GetSelectedTemplateID('default_template_for_developers'),
+            GetSelectedTemplateID('default_template_for_users'))
+
+
+class AdminComponents(IssueAdminBase):
+  """Servlet allowing project owners to view the list of components."""
+
+  _PAGE_TEMPLATE = 'tracker/admin-components-page.ezt'
+  _PROCESS_SUBTAB = servlet.Servlet.PROCESS_TAB_COMPONENTS
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    page_data = super(AdminComponents, self).GatherPageData(mr)
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    users_by_id = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user,
+        *[list(cd.admin_ids) + list(cd.cc_ids)
+          for cd in config.component_defs])
+    framework_views.RevealAllEmailsToMembers(
+        mr.cnxn, self.services, mr.auth, users_by_id, mr.project)
+    component_def_views = [
+        tracker_views.ComponentDefView(mr.cnxn, self.services, cd, users_by_id)
+        # TODO(jrobbins): future component-level view restrictions.
+        for cd in config.component_defs]
+    for cd in component_def_views:
+      if mr.auth.email in [user.email for user in cd.admins]:
+        cd.classes += 'myadmin '
+      if mr.auth.email in [user.email for user in cd.cc]:
+        cd.classes += 'mycc '
+
+    page_data.update({
+        'component_defs': component_def_views,
+        'failed_perm': mr.GetParam('failed_perm'),
+        'failed_subcomp': mr.GetParam('failed_subcomp'),
+        'failed_templ': mr.GetParam('failed_templ'),
+        })
+    return page_data
+
+  def _GetComponentDefs(self, _mr, post_data, config):
+    """Get the config and component definitions from the request."""
+    component_defs = []
+    component_paths = post_data.get('delete_components').split(',')
+    for component_path in component_paths:
+      component_def = tracker_bizobj.FindComponentDef(component_path, config)
+      component_defs.append(component_def)
+    return component_defs
+
+  def _ProcessDeleteComponent(self, mr, component_def):
+    """Delete the specified component and its references."""
+    self.services.issue.DeleteComponentReferences(
+        mr.cnxn, component_def.component_id)
+    self.services.config.DeleteComponentDef(
+        mr.cnxn, mr.project_id, component_def.component_id)
+
+  def ProcessFormData(self, mr, post_data):
+    """Processes a POST command to delete components.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: HTML form data from the request.
+
+    Returns:
+      String URL to redirect the user to, or None if response was already sent.
+    """
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    component_defs = self._GetComponentDefs(mr, post_data, config)
+    # Reverse the component_defs so that we start deleting from subcomponents.
+    component_defs.reverse()
+
+    # Collect errors.
+    perm_errors = []
+    subcomponents_errors = []
+    templates_errors = []
+    # Collect successes.
+    deleted_components = []
+
+    for component_def in component_defs:
+      allow_edit = permissions.CanEditComponentDef(
+          mr.auth.effective_ids, mr.perms, mr.project, component_def, config)
+      if not allow_edit:
+        perm_errors.append(component_def.path)
+
+      subcomponents = tracker_bizobj.FindDescendantComponents(
+          config, component_def)
+      if subcomponents:
+        subcomponents_errors.append(component_def.path)
+
+      templates = self.services.template.TemplatesWithComponent(
+          mr.cnxn, component_def.component_id)
+      if templates:
+        templates_errors.append(component_def.path)
+
+      allow_delete = allow_edit and not subcomponents and not templates
+      if allow_delete:
+        self._ProcessDeleteComponent(mr, component_def)
+        deleted_components.append(component_def.path)
+        # Refresh project config after the component deletion.
+        config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+
+    return framework_helpers.FormatAbsoluteURL(
+        mr, urls.ADMIN_COMPONENTS, ts=int(time.time()),
+        failed_perm=','.join(perm_errors),
+        failed_subcomp=','.join(subcomponents_errors),
+        failed_templ=','.join(templates_errors),
+        deleted=','.join(deleted_components))
+
+
+class AdminViews(IssueAdminBase):
+  """Servlet for project owners to set default columns, axes, and sorting."""
+
+  _PAGE_TEMPLATE = 'tracker/admin-views-page.ezt'
+  _PROCESS_SUBTAB = servlet.Servlet.PROCESS_TAB_VIEWS
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    page_data = super(AdminViews, self).GatherPageData(mr)
+    with mr.profiler.Phase('getting canned queries'):
+      canned_queries = self.services.features.GetCannedQueriesByProjectID(
+          mr.cnxn, mr.project_id)
+      canned_query_views = [
+          savedqueries_helpers.SavedQueryView(sq, idx + 1, None, None)
+          for idx, sq in enumerate(canned_queries)]
+
+    page_data.update({
+        'canned_queries': canned_query_views,
+        'new_query_indexes': list(range(
+            len(canned_queries) + 1, savedqueries_helpers.MAX_QUERIES + 1)),
+        'issue_notify': mr.project.issue_notify_address,
+        'max_queries': savedqueries_helpers.MAX_QUERIES,
+        })
+    return page_data
+
+  def ProcessSubtabForm(self, post_data, mr):
+    """Process the Views subtab.
+
+    Args:
+      post_data: HTML form data for the HTTP request being processed.
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      The URL of the page to show after processing.
+    """
+    if not self.CheckPerm(mr, permissions.EDIT_PROJECT):
+      raise permissions.PermissionException(
+          'Only project owners may edit the default views')
+    existing_queries = savedqueries_helpers.ParseSavedQueries(
+        mr.cnxn, post_data, self.services.project)
+    added_queries = savedqueries_helpers.ParseSavedQueries(
+        mr.cnxn, post_data, self.services.project, prefix='new_')
+    canned_queries = existing_queries + added_queries
+
+    list_prefs = _ParseListPreferences(post_data)
+
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(mr)
+      return
+
+    self.services.config.UpdateConfig(
+        mr.cnxn, mr.project, list_prefs=list_prefs)
+    self.services.features.UpdateCannedQueries(
+        mr.cnxn, mr.project_id, canned_queries)
+
+    return urls.ADMIN_VIEWS
+
+
+def _ParseListPreferences(post_data):
+  """Parse the part of a project admin form about artifact list preferences."""
+  default_col_spec = ''
+  if 'default_col_spec' in post_data:
+    default_col_spec = post_data['default_col_spec']
+  # Don't allow empty colum spec
+  if not default_col_spec:
+    default_col_spec = tracker_constants.DEFAULT_COL_SPEC
+  col_spec_words = monorailrequest.ParseColSpec(
+      default_col_spec, max_parts=framework_constants.MAX_COL_PARTS)
+  col_spec = ' '.join(word for word in col_spec_words)
+
+  default_sort_spec = ''
+  if 'default_sort_spec' in post_data:
+    default_sort_spec = post_data['default_sort_spec']
+  sort_spec_words = monorailrequest.ParseColSpec(default_sort_spec)
+  sort_spec = ' '.join(sort_spec_words)
+
+  x_attr_str = ''
+  if 'default_x_attr' in post_data:
+    x_attr_str = post_data['default_x_attr']
+  x_attr_words = monorailrequest.ParseColSpec(x_attr_str)
+  x_attr = ''
+  if x_attr_words:
+    x_attr = x_attr_words[0]
+
+  y_attr_str = ''
+  if 'default_y_attr' in post_data:
+    y_attr_str = post_data['default_y_attr']
+  y_attr_words = monorailrequest.ParseColSpec(y_attr_str)
+  y_attr = ''
+  if y_attr_words:
+    y_attr = y_attr_words[0]
+
+  member_default_query = ''
+  if 'member_default_query' in post_data:
+    member_default_query = post_data['member_default_query']
+
+  return col_spec, sort_spec, x_attr, y_attr, member_default_query
+
+
+class AdminRules(IssueAdminBase):
+  """Servlet allowing project owners to configure filter rules."""
+
+  _PAGE_TEMPLATE = 'tracker/admin-rules-page.ezt'
+  _PROCESS_SUBTAB = servlet.Servlet.PROCESS_TAB_RULES
+
+  def AssertBasePermission(self, mr):
+    """Check whether the user has any permission to visit this page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+    """
+    super(AdminRules, self).AssertBasePermission(mr)
+    if not self.CheckPerm(mr, permissions.EDIT_PROJECT):
+      raise permissions.PermissionException(
+          'User is not allowed to administer this project')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    page_data = super(AdminRules, self).GatherPageData(mr)
+    rules = self.services.features.GetFilterRules(
+        mr.cnxn, mr.project_id)
+    users_by_id = framework_views.MakeAllUserViews(
+        mr.cnxn, self.services.user,
+        [rule.default_owner_id for rule in rules],
+        *[rule.add_cc_ids for rule in rules])
+    framework_views.RevealAllEmailsToMembers(
+        mr.cnxn, self.services, mr.auth, users_by_id, mr.project)
+    rule_views = [filterrules_views.RuleView(rule, users_by_id)
+                  for rule in rules]
+
+    for idx, rule_view in enumerate(rule_views):
+      rule_view.idx = idx + 1  # EZT has no loop index, so we set idx.
+
+    page_data.update({
+        'rules': rule_views,
+        'new_rule_indexes': (
+            list(range(len(rules) + 1, filterrules_helpers.MAX_RULES + 1))),
+        'max_rules': filterrules_helpers.MAX_RULES,
+        })
+    return page_data
+
+  def ProcessSubtabForm(self, post_data, mr):
+    """Process the Rules subtab.
+
+    Args:
+      post_data: HTML form data for the HTTP request being processed.
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      The URL of the page to show after processing.
+    """
+    old_rules = self.services.features.GetFilterRules(mr.cnxn, mr.project_id)
+    rules = filterrules_helpers.ParseRules(
+        mr.cnxn, post_data, self.services.user, mr.errors)
+    new_rules = filterrules_helpers.ParseRules(
+        mr.cnxn, post_data, self.services.user, mr.errors, prefix='new_')
+    rules.extend(new_rules)
+
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(mr)
+      return
+
+    config = self.services.features.UpdateFilterRules(
+        mr.cnxn, mr.project_id, rules)
+
+    if old_rules != rules:
+      logging.info('recomputing derived fields')
+      config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+      filterrules_helpers.RecomputeAllDerivedFields(
+          mr.cnxn, self.services, mr.project, config)
+
+    return urls.ADMIN_RULES
diff --git a/tracker/issueadvsearch.py b/tracker/issueadvsearch.py
new file mode 100644
index 0000000..d824098
--- /dev/null
+++ b/tracker/issueadvsearch.py
@@ -0,0 +1,123 @@
+# 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
+
+"""Classes that implement the advanced search feature page.
+
+The advanced search page simply displays an HTML page with a form.
+The form handler converts the widget-based query into a googley query
+string and redirects the user to the issue list servlet.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import re
+
+from features import savedqueries_helpers
+from framework import framework_helpers
+from framework import permissions
+from framework import servlet
+from framework import urls
+
+# Patterns for search values that can be words, labels,
+# component paths, or email addresses.
+VALUE_RE = re.compile(r'[-a-zA-Z0-9._>@]+')
+
+
+class IssueAdvancedSearch(servlet.Servlet):
+  """IssueAdvancedSearch shows a form to enter an advanced search."""
+
+  _PAGE_TEMPLATE = 'tracker/issue-advsearch-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_ISSUES
+
+  # This form *only* redirects to a GET request, and permissions are checked
+  # in that handler.
+  CHECK_SECURITY_TOKEN = False
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    # TODO(jrobbins): Allow deep-linking into this page.
+    canned_query_views = []
+    if mr.project_id:
+      with mr.profiler.Phase('getting canned queries'):
+        canned_queries = self.services.features.GetCannedQueriesByProjectID(
+            mr.cnxn, mr.project_id)
+      canned_query_views = [
+          savedqueries_helpers.SavedQueryView(sq, idx + 1, None, None)
+          for idx, sq in enumerate(canned_queries)]
+
+    saved_query_views = []
+    if mr.auth.user_id and self.services.features:
+      with mr.profiler.Phase('getting saved queries'):
+        saved_queries = self.services.features.GetSavedQueriesByUserID(
+            mr.cnxn, mr.me_user_id)
+        saved_query_views = [
+            savedqueries_helpers.SavedQueryView(sq, idx + 1, None, None)
+            for idx, sq in enumerate(saved_queries)
+            if (mr.project_id in sq.executes_in_project_ids or
+                not mr.project_id)]
+
+    return {
+        'issue_tab_mode': 'issueAdvSearch',
+        'page_perms': self.MakePagePerms(mr, None, permissions.CREATE_ISSUE),
+        'canned_queries': canned_query_views,
+        'saved_queries': saved_query_views,
+        }
+
+  def ProcessFormData(self, mr, post_data):
+    """Process a posted advanced query form.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: HTML form data from the request.
+
+    Returns:
+      String URL to redirect the user to after processing.
+    """
+    # Default to searching open issues in this project.
+    can = post_data.get('can', 2)
+
+    terms = []
+    self._AccumulateANDTerm('', 'words', post_data, terms)
+    self._AccumulateANDTerm('-', 'without', post_data, terms)
+    self._AccumulateANDTerm('label:', 'labels', post_data, terms)
+    self._AccumulateORTerm('component:', 'components', post_data, terms)
+    self._AccumulateORTerm('status:', 'statuses', post_data, terms)
+    self._AccumulateORTerm('reporter:', 'reporters', post_data, terms)
+    self._AccumulateORTerm('owner:', 'owners', post_data, terms)
+    self._AccumulateORTerm('cc:', 'cc', post_data, terms)
+    self._AccumulateORTerm('commentby:', 'commentby', post_data, terms)
+
+    if 'starcount' in post_data:
+      starcount = int(post_data['starcount'])
+      if starcount >= 0:
+        terms.append('starcount:%s' % starcount)
+
+    return framework_helpers.FormatAbsoluteURL(
+        mr, urls.ISSUE_LIST, q=' '.join(terms), can=can)
+
+  def _AccumulateANDTerm(self, operator, form_field, post_data, search_query):
+    """Build a query that matches issues with ALL of the given field values."""
+    user_input = post_data.get(form_field)
+    if user_input:
+      values = VALUE_RE.findall(user_input)
+      search_terms = ['%s%s' % (operator, v) for v in values]
+      search_query.extend(search_terms)
+
+  def _AccumulateORTerm(self, operator, form_field, post_data, search_query):
+    """Build a query that matches issues with ANY of the given field values."""
+    user_input = post_data.get(form_field)
+    if user_input:
+      values = VALUE_RE.findall(user_input)
+      search_term = '%s%s' % (operator, ','.join(values))
+      search_query.append(search_term)
diff --git a/tracker/issueattachment.py b/tracker/issueattachment.py
new file mode 100644
index 0000000..d6fa978
--- /dev/null
+++ b/tracker/issueattachment.py
@@ -0,0 +1,93 @@
+# 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
+
+"""Issue Tracker code to serve out issue attachments.
+
+Summary of page classes:
+  AttachmentPage: Serve the content of an attachment w/ the appropriate
+                  MIME type.
+  IssueAttachmentDeletion: Form handler for deleting attachments.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import base64
+import logging
+import os
+import re
+import urllib
+
+import webapp2
+
+from google.appengine.api import app_identity
+from google.appengine.api import images
+
+from framework import exceptions
+from framework import framework_constants
+from framework import framework_helpers
+from framework import gcs_helpers
+from framework import permissions
+from framework import servlet
+from framework import urls
+from tracker import attachment_helpers
+from tracker import tracker_helpers
+from tracker import tracker_views
+
+
+# This will likely appear blank or as a broken image icon in the browser.
+NO_PREVIEW_ICON = ''
+NO_PREVIEW_MIME_TYPE = 'image/png'
+
+
+class AttachmentPage(servlet.Servlet):
+  """AttachmentPage serves issue attachments."""
+
+  def GatherPageData(self, mr):
+    """Parse the attachment ID from the request and serve its content.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns: dict of values used by EZT for rendering the page.
+    """
+    if mr.signed_aid != attachment_helpers.SignAttachmentID(mr.aid):
+      webapp2.abort(400, 'Please reload the issue page')
+
+    try:
+      attachment, _issue = tracker_helpers.GetAttachmentIfAllowed(
+          mr, self.services)
+    except exceptions.NoSuchIssueException:
+      webapp2.abort(404, 'issue not found')
+    except exceptions.NoSuchAttachmentException:
+      webapp2.abort(404, 'attachment not found')
+    except exceptions.NoSuchCommentException:
+      webapp2.abort(404, 'comment not found')
+
+    if not attachment.gcs_object_id:
+      webapp2.abort(404, 'attachment data not found')
+
+    bucket_name = app_identity.get_default_gcs_bucket_name()
+
+    gcs_object_id = attachment.gcs_object_id
+
+    logging.info('attachment id %d is %s', mr.aid, gcs_object_id)
+
+    # By default GCS will return images and attachments displayable inline.
+    if mr.thumb:
+      # Thumbnails are stored in a separate obj always displayed inline.
+      gcs_object_id = gcs_object_id + '-thumbnail'
+    elif not mr.inline:
+      # Downloads are stored in a separate obj with disposiiton set.
+      filename = attachment.filename
+      if not framework_constants.FILENAME_RE.match(filename):
+        logging.info('bad file name: %s' % attachment.attachment_id)
+        filename = 'attachment-%d.dat' % attachment.attachment_id
+      if gcs_helpers.MaybeCreateDownload(
+          bucket_name, gcs_object_id, filename):
+        gcs_object_id = gcs_object_id + '-download'
+
+    url = gcs_helpers.SignUrl(bucket_name, gcs_object_id)
+    self.redirect(url, abort=True)
diff --git a/tracker/issueattachmenttext.py b/tracker/issueattachmenttext.py
new file mode 100644
index 0000000..d3daaf9
--- /dev/null
+++ b/tracker/issueattachmenttext.py
@@ -0,0 +1,103 @@
+# 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
+
+"""Servlet to safely display textual issue attachments.
+
+Unlike most attachments, this is not a download, it is a full HTML page
+with safely escaped user content.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+import webapp2
+
+from google.appengine.api import app_identity
+
+from third_party import cloudstorage
+import ezt
+
+from features import prettify
+from framework import exceptions
+from framework import filecontent
+from framework import permissions
+from framework import servlet
+from framework import template_helpers
+from tracker import attachment_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_helpers
+
+
+class AttachmentText(servlet.Servlet):
+  """AttachmentText displays textual attachments much like source browsing."""
+
+  _PAGE_TEMPLATE = 'tracker/issue-attachment-text.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_ISSUES
+
+  def GatherPageData(self, mr):
+    """Parse the attachment ID from the request and serve its content.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering almost the page.
+    """
+    with mr.profiler.Phase('get issue, comment, and attachment'):
+      try:
+        attachment, issue = tracker_helpers.GetAttachmentIfAllowed(
+            mr, self.services)
+      except exceptions.NoSuchIssueException:
+        webapp2.abort(404, 'issue not found')
+      except exceptions.NoSuchAttachmentException:
+        webapp2.abort(404, 'attachment not found')
+      except exceptions.NoSuchCommentException:
+        webapp2.abort(404, 'comment not found')
+
+    content = []
+    if attachment.gcs_object_id:
+      bucket_name = app_identity.get_default_gcs_bucket_name()
+      full_path = '/' + bucket_name + attachment.gcs_object_id
+      logging.info("reading gcs: %s" % full_path)
+      with cloudstorage.open(full_path, 'r') as f:
+        content = f.read()
+
+    filesize = len(content)
+
+    # This servlet only displays safe textual attachments. The user should
+    # not have been given a link to this servlet for any other kind.
+    if not attachment_helpers.IsViewableText(attachment.mimetype, filesize):
+      self.abort(400, 'not a text file')
+
+    u_text, is_binary, too_large = filecontent.DecodeFileContents(content)
+    lines = prettify.PrepareSourceLinesForHighlighting(u_text.encode('utf8'))
+
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    granted_perms = tracker_bizobj.GetGrantedPerms(
+        issue, mr.auth.effective_ids, config)
+    page_perms = self.MakePagePerms(
+        mr, issue, permissions.DELETE_ISSUE, permissions.CREATE_ISSUE,
+        granted_perms=granted_perms)
+
+    page_data = {
+        'issue_tab_mode': 'issueDetail',
+        'local_id': issue.local_id,
+        'filename': attachment.filename,
+        'filesize': template_helpers.BytesKbOrMb(filesize),
+        'file_lines': lines,
+        'is_binary': ezt.boolean(is_binary),
+        'too_large': ezt.boolean(too_large),
+        'code_reviews': None,
+        'page_perms': page_perms,
+        }
+    if is_binary or too_large:
+      page_data['should_prettify'] = ezt.boolean(False)
+    else:
+      page_data.update(prettify.BuildPrettifyData(
+          len(lines), attachment.filename))
+
+    return page_data
diff --git a/tracker/issuebulkedit.py b/tracker/issuebulkedit.py
new file mode 100644
index 0000000..c1f5229
--- /dev/null
+++ b/tracker/issuebulkedit.py
@@ -0,0 +1,473 @@
+# 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
+
+"""Classes that implement the issue bulk edit page and related forms.
+
+Summary of classes:
+  IssueBulkEdit: Show a form for editing multiple issues and allow the
+     user to update them all at once.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import httplib
+import itertools
+import logging
+import time
+
+import ezt
+
+from features import filterrules_helpers
+from features import send_notifications
+from framework import exceptions
+from framework import framework_constants
+from framework import framework_views
+from framework import permissions
+from framework import servlet
+from framework import template_helpers
+from services import tracker_fulltext
+from tracker import field_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+from tracker import tracker_views
+
+
+class IssueBulkEdit(servlet.Servlet):
+  """IssueBulkEdit lists multiple issues and allows an edit to all of them."""
+
+  _PAGE_TEMPLATE = 'tracker/issue-bulk-edit-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_ISSUES
+  _SECONDS_OVERHEAD = 4
+  _SECONDS_PER_UPDATE = 0.12
+  _SLOWNESS_THRESHOLD = 10
+
+  def AssertBasePermission(self, mr):
+    """Check whether the user has any permission to visit this page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Raises:
+      PermissionException: if the user is not allowed to enter an issue.
+    """
+    super(IssueBulkEdit, self).AssertBasePermission(mr)
+    can_edit = self.CheckPerm(mr, permissions.EDIT_ISSUE)
+    can_comment = self.CheckPerm(mr, permissions.ADD_ISSUE_COMMENT)
+    if not (can_edit and can_comment):
+      raise permissions.PermissionException('bulk edit forbidden')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    with mr.profiler.Phase('getting issues'):
+      if not mr.local_id_list:
+        raise exceptions.InputException()
+      requested_issues = self.services.issue.GetIssuesByLocalIDs(
+          mr.cnxn, mr.project_id, sorted(mr.local_id_list))
+
+    with mr.profiler.Phase('filtering issues'):
+      # TODO(jrobbins): filter out issues that the user cannot edit and
+      # provide that as feedback rather than just siliently ignoring them.
+      open_issues, closed_issues = (
+          tracker_helpers.GetAllowedOpenedAndClosedIssues(
+              mr, [issue.issue_id for issue in requested_issues],
+              self.services))
+      issues = open_issues + closed_issues
+
+    if not issues:
+      self.abort(404, 'no issues found')
+
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    type_label_set = {
+        lab.lower() for lab in issues[0].labels
+        if lab.lower().startswith('type-')}
+    for issue in issues[1:]:
+      new_type_set = {
+          lab.lower() for lab in issue.labels
+          if lab.lower().startswith('type-')}
+      type_label_set &= new_type_set
+
+    issue_phases = list(
+        itertools.chain.from_iterable(issue.phases for issue in issues))
+
+    field_views = tracker_views.MakeAllFieldValueViews(
+        config, type_label_set, [], [], {}, phases=issue_phases)
+    for fv in field_views:
+      # Explicitly set all field views to not required. We do not want to force
+      # users to have to set it for issues missing required fields.
+      # See https://bugs.chromium.org/p/monorail/issues/detail?id=500 for more
+      # details.
+      fv.field_def.is_required_bool = None
+
+      if permissions.CanEditValueForFieldDef(
+          mr.auth.effective_ids, mr.perms, mr.project, fv.field_def.field_def):
+        fv.is_editable = ezt.boolean(True)
+      else:
+        fv.is_editable = ezt.boolean(False)
+
+    with mr.profiler.Phase('making issue proxies'):
+      issue_views = [
+          template_helpers.EZTItem(
+              local_id=issue.local_id, summary=issue.summary,
+              closed=ezt.boolean(issue in closed_issues))
+          for issue in issues]
+
+    num_seconds = (int(len(issue_views) * self._SECONDS_PER_UPDATE) +
+                   self._SECONDS_OVERHEAD)
+
+    page_perms = self.MakePagePerms(
+        mr, None,
+        permissions.CREATE_ISSUE,
+        permissions.DELETE_ISSUE)
+
+    return {
+        'issue_tab_mode': 'issueBulkEdit',
+        'issues': issue_views,
+        'local_ids_str': ','.join([str(issue.local_id) for issue in issues]),
+        'num_issues': len(issue_views),
+        'show_progress': ezt.boolean(num_seconds > self._SLOWNESS_THRESHOLD),
+        'num_seconds': num_seconds,
+
+        'initial_blocked_on': '',
+        'initial_blocking': '',
+        'initial_comment': '',
+        'initial_status': '',
+        'initial_owner': '',
+        'initial_merge_into': '',
+        'initial_cc': '',
+        'initial_components': '',
+        'labels': [],
+        'fields': field_views,
+
+        'restrict_to_known': ezt.boolean(config.restrict_to_known),
+        'page_perms': page_perms,
+        'statuses_offer_merge': config.statuses_offer_merge,
+        'issue_phase_names': list(
+            {phase.name.lower() for phase in issue_phases}),
+        }
+
+  def ProcessFormData(self, mr, post_data):
+    # (...) -> str
+    """Process the posted issue update form.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: HTML form data from the request.
+
+    Returns:
+      String URL to redirect the user to after processing.
+    """
+    if not mr.local_id_list:
+      logging.info('missing issue local IDs, probably tampered')
+      self.response.status = httplib.BAD_REQUEST
+      return
+
+    # Check that the user is logged in; anon users cannot update issues.
+    if not mr.auth.user_id:
+      logging.info('user was not logged in, cannot update issue')
+      self.response.status = httplib.BAD_REQUEST  # xxx should raise except
+      return
+
+    # Check that the user has permission to add a comment, and to enter
+    # metadata if they are trying to do that.
+    if not self.CheckPerm(mr, permissions.ADD_ISSUE_COMMENT):
+      logging.info('user has no permission to add issue comment')
+      self.response.status = httplib.BAD_REQUEST
+      return
+
+    if not self.CheckPerm(mr, permissions.EDIT_ISSUE):
+      logging.info('user has no permission to edit issue metadata')
+      self.response.status = httplib.BAD_REQUEST
+      return
+
+    move_to = post_data.get('move_to', '').lower()
+    if move_to and not self.CheckPerm(mr, permissions.DELETE_ISSUE):
+      logging.info('user has no permission to move issue')
+      self.response.status = httplib.BAD_REQUEST
+      return
+
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+
+    parsed = tracker_helpers.ParseIssueRequest(
+        mr.cnxn, post_data, self.services, mr.errors, mr.project_name)
+    bounce_labels = (
+        parsed.labels[:] +
+        ['-%s' % lr for lr in parsed.labels_remove])
+    bounce_fields = tracker_views.MakeBounceFieldValueViews(
+        parsed.fields.vals, parsed.fields.phase_vals, config)
+    field_helpers.ShiftEnumFieldsIntoLabels(
+        parsed.labels, parsed.labels_remove,
+        parsed.fields.vals, parsed.fields.vals_remove,
+        config)
+    issue_list = self.services.issue.GetIssuesByLocalIDs(
+        mr.cnxn, mr.project_id, mr.local_id_list)
+    issue_phases = list(
+        itertools.chain.from_iterable(issue.phases for issue in issue_list))
+    phase_ids_by_name = collections.defaultdict(set)
+    for phase in issue_phases:
+      phase_ids_by_name[phase.name.lower()].add(phase.phase_id)
+    # Note: Not all parsed phase field values will be applicable to every issue.
+    # tracker_bizobj.ApplyFieldValueChanges will take care of not adding
+    # phase field values to issues that don't contain the correct phase.
+    field_vals = field_helpers.ParseFieldValues(
+        mr.cnxn, self.services.user, parsed.fields.vals,
+        parsed.fields.phase_vals, config,
+        phase_ids_by_name=phase_ids_by_name)
+    field_vals_remove = field_helpers.ParseFieldValues(
+        mr.cnxn, self.services.user, parsed.fields.vals_remove,
+        parsed.fields.phase_vals_remove, config,
+        phase_ids_by_name=phase_ids_by_name)
+
+    field_helpers.AssertCustomFieldsEditPerms(
+        mr, config, field_vals, field_vals_remove, parsed.fields.fields_clear,
+        parsed.labels, parsed.labels_remove)
+    field_helpers.ValidateCustomFields(
+        mr.cnxn, self.services, field_vals, config, mr.project,
+        ezt_errors=mr.errors)
+
+    # Treat status '' as no change and explicit 'clear' as clearing the status.
+    status = parsed.status
+    if status == '':
+      status = None
+    if post_data.get('op_statusenter') == 'clear':
+      status = ''
+
+    reporter_id = mr.auth.user_id
+    logging.info('bulk edit request by %s', reporter_id)
+
+    if parsed.users.owner_id is None:
+      mr.errors.owner = 'Invalid owner username'
+    else:
+      valid, msg = tracker_helpers.IsValidIssueOwner(
+          mr.cnxn, mr.project, parsed.users.owner_id, self.services)
+      if not valid:
+        mr.errors.owner = msg
+
+    if (status in config.statuses_offer_merge and
+        not post_data.get('merge_into')):
+      mr.errors.merge_into_id = 'Please enter a valid issue ID'
+
+    move_to_project = None
+    if move_to:
+      if mr.project_name == move_to:
+        mr.errors.move_to = 'The issues are already in project ' + move_to
+      else:
+        move_to_project = self.services.project.GetProjectByName(
+            mr.cnxn, move_to)
+        if not move_to_project:
+          mr.errors.move_to = 'No such project: ' + move_to
+
+    # Treat owner '' as no change, and explicit 'clear' as NO_USER_SPECIFIED
+    owner_id = parsed.users.owner_id
+    if parsed.users.owner_username == '':
+      owner_id = None
+    if post_data.get('op_ownerenter') == 'clear':
+      owner_id = framework_constants.NO_USER_SPECIFIED
+
+    comp_ids = tracker_helpers.LookupComponentIDs(
+        parsed.components.paths, config, mr.errors)
+    comp_ids_remove = tracker_helpers.LookupComponentIDs(
+        parsed.components.paths_remove, config, mr.errors)
+    if post_data.get('op_componententer') == 'remove':
+      comp_ids, comp_ids_remove = comp_ids_remove, comp_ids
+
+    cc_ids, cc_ids_remove = parsed.users.cc_ids, parsed.users.cc_ids_remove
+    if post_data.get('op_memberenter') == 'remove':
+      cc_ids, cc_ids_remove = parsed.users.cc_ids_remove, parsed.users.cc_ids
+
+    issue_list_iids = {issue.issue_id for issue in issue_list}
+    if post_data.get('op_blockedonenter') == 'append':
+      if issue_list_iids.intersection(parsed.blocked_on.iids):
+        mr.errors.blocked_on = 'Cannot block an issue on itself.'
+      blocked_on_add = parsed.blocked_on.iids
+      blocked_on_remove = []
+    else:
+      blocked_on_add = []
+      blocked_on_remove = parsed.blocked_on.iids
+    if post_data.get('op_blockingenter') == 'append':
+      if issue_list_iids.intersection(parsed.blocking.iids):
+        mr.errors.blocking = 'Cannot block an issue on itself.'
+      blocking_add = parsed.blocking.iids
+      blocking_remove = []
+    else:
+      blocking_add = []
+      blocking_remove = parsed.blocking.iids
+
+    if len(parsed.comment) > tracker_constants.MAX_COMMENT_CHARS:
+      mr.errors.comment = 'Comment is too long.'
+
+    iids_actually_changed = []
+    old_owner_ids = []
+    combined_amendments = []
+    merge_into_issue = None
+    new_starrers = set()
+
+    if not mr.errors.AnyErrors():
+      # Because we will modify issues, load from DB rather than cache.
+      issue_list = self.services.issue.GetIssuesByLocalIDs(
+          mr.cnxn, mr.project_id, mr.local_id_list, use_cache=False)
+
+      # Skip any individual issues that the user is not allowed to edit.
+      editable_issues = [
+          issue for issue in issue_list
+          if permissions.CanEditIssue(
+              mr.auth.effective_ids, mr.perms, mr.project, issue)]
+
+      # Skip any restrict issues that cannot be moved
+      if move_to:
+        editable_issues = [
+            issue for issue in editable_issues
+            if not permissions.GetRestrictions(issue)]
+
+      # If 'Duplicate' status is specified ensure there are no permission issues
+      # with the issue we want to merge with.
+      if post_data.get('merge_into'):
+        for issue in editable_issues:
+          _, merge_into_issue = tracker_helpers.ParseMergeFields(
+              mr.cnxn, self.services, mr.project_name, post_data, parsed.status,
+              config, issue, mr.errors)
+          if merge_into_issue:
+            merge_allowed = tracker_helpers.IsMergeAllowed(
+                merge_into_issue, mr, self.services)
+            if not merge_allowed:
+              mr.errors.merge_into_id = 'Target issue %s cannot be modified' % (
+                                            merge_into_issue.local_id)
+              break
+
+            # Update the new_starrers set.
+            new_starrers.update(tracker_helpers.GetNewIssueStarrers(
+                mr.cnxn, self.services, [issue.issue_id],
+                merge_into_issue.issue_id))
+
+      # Proceed with amendments only if there are no reported errors.
+      if not mr.errors.AnyErrors():
+        # Sort the issues: we want them in this order so that the
+        # corresponding old_owner_id are found in the same order.
+        editable_issues.sort(key=lambda issue: issue.local_id)
+
+        iids_to_invalidate = set()
+        rules = self.services.features.GetFilterRules(
+            mr.cnxn, config.project_id)
+        predicate_asts = filterrules_helpers.ParsePredicateASTs(
+            rules, config, [])
+        for issue in editable_issues:
+          old_owner_id = tracker_bizobj.GetOwnerId(issue)
+          merge_into_iid = (
+              merge_into_issue.issue_id if merge_into_issue else None)
+
+          delta = tracker_bizobj.MakeIssueDelta(
+            status, owner_id, cc_ids, cc_ids_remove, comp_ids, comp_ids_remove,
+            parsed.labels, parsed.labels_remove, field_vals, field_vals_remove,
+            parsed.fields.fields_clear, blocked_on_add, blocked_on_remove,
+            blocking_add, blocking_remove, merge_into_iid, None)
+          amendments, _ = self.services.issue.DeltaUpdateIssue(
+              mr.cnxn, self.services, mr.auth.user_id, mr.project_id, config,
+              issue, delta, comment=parsed.comment,
+              iids_to_invalidate=iids_to_invalidate, rules=rules,
+              predicate_asts=predicate_asts)
+
+          if amendments or parsed.comment:  # Avoid empty comments.
+            iids_actually_changed.append(issue.issue_id)
+            old_owner_ids.append(old_owner_id)
+            combined_amendments.extend(amendments)
+
+        self.services.issue.InvalidateIIDs(mr.cnxn, iids_to_invalidate)
+        self.services.project.UpdateRecentActivity(
+            mr.cnxn, mr.project.project_id)
+
+        # Add new_starrers and new CCs to merge_into_issue.
+        if merge_into_issue:
+          merge_into_project = self.services.project.GetProjectByName(
+              mr.cnxn, merge_into_issue.project_name)
+          tracker_helpers.AddIssueStarrers(
+              mr.cnxn, self.services, mr, merge_into_issue.issue_id,
+              merge_into_project, new_starrers)
+          # Load target issue again to get the updated star count.
+          merge_into_issue = self.services.issue.GetIssue(
+              mr.cnxn, merge_into_issue.issue_id, use_cache=False)
+          tracker_helpers.MergeCCsAndAddCommentMultipleIssues(
+              self.services, mr, editable_issues, merge_into_issue)
+
+        if move_to and editable_issues:
+          tracker_fulltext.UnindexIssues(
+              [issue.issue_id for issue in editable_issues])
+          for issue in editable_issues:
+            old_text_ref = 'issue %s:%s' % (issue.project_name, issue.local_id)
+            moved_back_iids = self.services.issue.MoveIssues(
+                mr.cnxn, move_to_project, [issue], self.services.user)
+            new_text_ref = 'issue %s:%s' % (issue.project_name, issue.local_id)
+            if issue.issue_id in moved_back_iids:
+              content = 'Moved %s back to %s again.' % (
+                  old_text_ref, new_text_ref)
+            else:
+              content = 'Moved %s to now be %s.' % (old_text_ref, new_text_ref)
+            self.services.issue.CreateIssueComment(
+                mr.cnxn, issue, mr.auth.user_id, content, amendments=[
+                   tracker_bizobj.MakeProjectAmendment(
+                       move_to_project.project_name)])
+
+        send_email = 'send_email' in post_data
+
+        users_by_id = framework_views.MakeAllUserViews(
+            mr.cnxn, self.services.user,
+            [owner_id], cc_ids, cc_ids_remove, old_owner_ids,
+            tracker_bizobj.UsersInvolvedInAmendments(combined_amendments))
+        if move_to and editable_issues:
+          iids_actually_changed = [
+              issue.issue_id for issue in editable_issues]
+
+        send_notifications.SendIssueBulkChangeNotification(
+            iids_actually_changed, mr.request.host,
+            old_owner_ids, parsed.comment,
+            reporter_id, combined_amendments, send_email, users_by_id)
+
+    if mr.errors.AnyErrors():
+      bounce_cc_parts = (
+          parsed.users.cc_usernames +
+          ['-%s' % ccur for ccur in parsed.users.cc_usernames_remove])
+      self.PleaseCorrect(
+          mr, initial_status=parsed.status,
+          initial_owner=parsed.users.owner_username,
+          initial_merge_into=post_data.get('merge_into', 0),
+          initial_cc=', '.join(bounce_cc_parts),
+          initial_comment=parsed.comment,
+          initial_components=parsed.components.entered_str,
+          labels=bounce_labels,
+          fields=bounce_fields)
+      return
+
+    with mr.profiler.Phase('reindexing issues'):
+      logging.info('starting reindexing')
+      start = time.time()
+      # Get the updated issues and index them
+      issue_list = self.services.issue.GetIssuesByLocalIDs(
+          mr.cnxn, mr.project_id, mr.local_id_list)
+      tracker_fulltext.IndexIssues(
+          mr.cnxn, issue_list, self.services.user, self.services.issue,
+          self.services.config)
+      logging.info('reindexing %d issues took %s sec',
+                   len(issue_list), time.time() - start)
+
+    # TODO(jrobbins): These could be put into the form action attribute.
+    mr.can = int(post_data['can'])
+    mr.query = post_data['q']
+    mr.col_spec = post_data['colspec']
+    mr.sort_spec = post_data['sort']
+    mr.group_by_spec = post_data['groupby']
+    mr.start = int(post_data['start'])
+    mr.num = int(post_data['num'])
+
+    # TODO(jrobbins): implement bulk=N param for a better confirmation alert.
+    return tracker_helpers.FormatIssueListURL(
+        mr, config, saved=len(mr.local_id_list), ts=int(time.time()))
diff --git a/tracker/issuedetailezt.py b/tracker/issuedetailezt.py
new file mode 100644
index 0000000..9460669
--- /dev/null
+++ b/tracker/issuedetailezt.py
@@ -0,0 +1,316 @@
+# 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
+
+"""Classes that implement the issue detail page and related forms.
+
+Summary of classes:
+  IssueDetailEzt: Show one issue in detail w/ all metadata and comments, and
+               process additional comments or metadata changes on it.
+  FlagSpamForm: Record the user's desire to report the issue as spam.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import httplib
+import json
+import logging
+import time
+import ezt
+
+import settings
+from api import converters
+from businesslogic import work_env
+from features import features_bizobj
+from features import send_notifications
+from features import hotlist_helpers
+from features import hotlist_views
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import jsonfeed
+from framework import paginate
+from framework import permissions
+from framework import servlet
+from framework import servlet_helpers
+from framework import sorting
+from framework import sql
+from framework import template_helpers
+from framework import urls
+from framework import xsrf
+from proto import user_pb2
+from proto import tracker_pb2
+from services import features_svc
+from services import tracker_fulltext
+from tracker import field_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+from tracker import tracker_views
+
+from google.protobuf import json_format
+
+
+def CheckMoveIssueRequest(
+    services, mr, issue, move_selected, move_to, errors):
+  """Process the move issue portions of the issue update form.
+
+  Args:
+    services: A Services object
+    mr: commonly used info parsed from the request.
+    issue: Issue protobuf for the issue being moved.
+    move_selected: True if the user selected the Move action.
+    move_to: A project_name or url to move this issue to or None
+      if the project name wasn't sent in the form.
+    errors: The errors object for this request.
+
+    Returns:
+      The project pb for the project the issue will be moved to
+      or None if the move cannot be performed. Perhaps because
+      the project does not exist, in which case move_to and
+      move_to_project will be set on the errors object. Perhaps
+      the user does not have permission to move the issue to the
+      destination project, in which case the move_to field will be
+      set on the errors object.
+  """
+  if not move_selected:
+    return None
+
+  if not move_to:
+    errors.move_to = 'No destination project specified'
+    errors.move_to_project = move_to
+    return None
+
+  if issue.project_name == move_to:
+    errors.move_to = 'This issue is already in project ' + move_to
+    errors.move_to_project = move_to
+    return None
+
+  move_to_project = services.project.GetProjectByName(mr.cnxn, move_to)
+  if not move_to_project:
+    errors.move_to = 'No such project: ' + move_to
+    errors.move_to_project = move_to
+    return None
+
+  # permissions enforcement
+  if not servlet_helpers.CheckPermForProject(
+      mr, permissions.EDIT_ISSUE, move_to_project):
+    errors.move_to = 'You do not have permission to move issues to project'
+    errors.move_to_project = move_to
+    return None
+
+  elif permissions.GetRestrictions(issue):
+    errors.move_to = (
+        'Issues with Restrict labels are not allowed to be moved.')
+    errors.move_to_project = ''
+    return None
+
+  return move_to_project
+
+
+def _ComputeBackToListURL(mr, issue, config, hotlist, services):
+  """Construct a URL to return the user to the place that they came from."""
+  if hotlist:
+    back_to_list_url = hotlist_helpers.GetURLOfHotlist(
+        mr.cnxn, hotlist, services.user)
+  else:
+    back_to_list_url = tracker_helpers.FormatIssueListURL(
+        mr, config, cursor='%s:%d' % (issue.project_name, issue.local_id))
+
+  return back_to_list_url
+
+
+class FlipperRedirectBase(servlet.Servlet):
+
+  # pylint: disable=arguments-differ
+  # pylint: disable=unused-argument
+  def get(self, project_name=None, viewed_username=None, hotlist_id=None):
+    with work_env.WorkEnv(self.mr, self.services) as we:
+      hotlist_id = self.mr.GetIntParam('hotlist_id')
+      current_issue = we.GetIssueByLocalID(self.mr.project_id, self.mr.local_id,
+                                   use_cache=False)
+      hotlist = None
+      if hotlist_id:
+        try:
+          hotlist = self.services.features.GetHotlist(self.mr.cnxn, hotlist_id)
+        except features_svc.NoSuchHotlistException:
+          pass
+
+      try:
+        adj_issue = GetAdjacentIssue(
+            self.mr, we, current_issue, hotlist=hotlist,
+            next_issue=self.next_handler)
+        path = '/p/%s%s' % (adj_issue.project_name, urls.ISSUE_DETAIL)
+        url = framework_helpers.FormatURL(
+            [(name, self.mr.GetParam(name)) for
+             name in framework_helpers.RECOGNIZED_PARAMS],
+            path, id=adj_issue.local_id)
+      except exceptions.NoSuchIssueException:
+        config = we.GetProjectConfig(self.mr.project_id)
+        url = _ComputeBackToListURL(self.mr, current_issue, config,
+                                                 hotlist, self.services)
+      self.redirect(url)
+
+
+class FlipperNext(FlipperRedirectBase):
+  next_handler = True
+
+
+class FlipperPrev(FlipperRedirectBase):
+  next_handler = False
+
+
+class FlipperList(servlet.Servlet):
+  # pylint: disable=arguments-differ
+  # pylint: disable=unused-argument
+  def get(self, project_name=None, viewed_username=None, hotlist_id=None):
+    with work_env.WorkEnv(self.mr, self.services) as we:
+      hotlist_id = self.mr.GetIntParam('hotlist_id')
+      current_issue = we.GetIssueByLocalID(self.mr.project_id, self.mr.local_id,
+                                   use_cache=False)
+      hotlist = None
+      if hotlist_id:
+        try:
+          hotlist = self.services.features.GetHotlist(self.mr.cnxn, hotlist_id)
+        except features_svc.NoSuchHotlistException:
+          pass
+
+      config = we.GetProjectConfig(self.mr.project_id)
+
+      if hotlist:
+        self.mr.ComputeColSpec(hotlist)
+      else:
+        self.mr.ComputeColSpec(config)
+
+      url = _ComputeBackToListURL(self.mr, current_issue, config,
+                                               hotlist, self.services)
+    self.redirect(url)
+
+
+class FlipperIndex(jsonfeed.JsonFeed):
+  """Return a JSON object of an issue's index in search.
+
+  This is a distinct JSON endpoint because it can be expensive to compute.
+  """
+  CHECK_SECURITY_TOKEN = False
+
+  def HandleRequest(self, mr):
+    hotlist_id = mr.GetIntParam('hotlist_id')
+    list_url = None
+    with work_env.WorkEnv(mr, self.services) as we:
+      if not _ShouldShowFlipper(mr, self.services):
+        return {}
+      issue = we.GetIssueByLocalID(mr.project_id, mr.local_id, use_cache=False)
+      hotlist = None
+
+      if hotlist_id:
+        hotlist = self.services.features.GetHotlist(mr.cnxn, hotlist_id)
+
+        if not features_bizobj.IssueIsInHotlist(hotlist, issue.issue_id):
+          raise exceptions.InvalidHotlistException()
+
+        if not permissions.CanViewHotlist(
+            mr.auth.effective_ids, mr.perms, hotlist):
+          raise permissions.PermissionException()
+
+        (prev_iid, cur_index, next_iid, total_count
+            ) = we.GetIssuePositionInHotlist(
+                issue, hotlist, mr.can, mr.sort_spec, mr.group_by_spec)
+      else:
+        (prev_iid, cur_index, next_iid, total_count
+            ) = we.FindIssuePositionInSearch(issue)
+
+      config = we.GetProjectConfig(self.mr.project_id)
+
+      if hotlist:
+        mr.ComputeColSpec(hotlist)
+      else:
+        mr.ComputeColSpec(config)
+
+      list_url = _ComputeBackToListURL(mr, issue, config, hotlist,
+        self.services)
+
+    prev_url = None
+    next_url = None
+
+    recognized_params = [(name, mr.GetParam(name)) for name in
+                           framework_helpers.RECOGNIZED_PARAMS]
+    if prev_iid:
+      prev_issue = we.services.issue.GetIssue(mr.cnxn, prev_iid)
+      path = '/p/%s%s' % (prev_issue.project_name, urls.ISSUE_DETAIL)
+      prev_url = framework_helpers.FormatURL(
+          recognized_params, path, id=prev_issue.local_id)
+
+    if next_iid:
+      next_issue = we.services.issue.GetIssue(mr.cnxn, next_iid)
+      path = '/p/%s%s' % (next_issue.project_name, urls.ISSUE_DETAIL)
+      next_url = framework_helpers.FormatURL(
+          recognized_params, path, id=next_issue.local_id)
+
+    return {
+      'prev_iid': prev_iid,
+      'prev_url': prev_url,
+      'cur_index': cur_index,
+      'next_iid': next_iid,
+      'next_url': next_url,
+      'list_url': list_url,
+      'total_count': total_count,
+    }
+
+
+def _ShouldShowFlipper(mr, services):
+  """Return True if we should show the flipper."""
+
+  # Check if the user entered a specific issue ID of an existing issue.
+  if tracker_constants.JUMP_RE.match(mr.query):
+    return False
+
+  # Check if the user came directly to an issue without specifying any
+  # query or sort.  E.g., through crbug.com.  Generating the issue ref
+  # list can be too expensive in projects that have a large number of
+  # issues.  The all and open issues cans are broad queries, other
+  # canned queries should be narrow enough to not need this special
+  # treatment.
+  if (not mr.query and not mr.sort_spec and
+      mr.can in [tracker_constants.ALL_ISSUES_CAN,
+                 tracker_constants.OPEN_ISSUES_CAN]):
+    num_issues_in_project = services.issue.GetHighestLocalID(
+        mr.cnxn, mr.project_id)
+    if num_issues_in_project > settings.threshold_to_suppress_prev_next:
+      return False
+
+  return True
+
+
+def GetAdjacentIssue(
+    mr, we, issue, hotlist=None, next_issue=False):
+  """Compute next or previous issue given params of current issue.
+
+  Args:
+    mr: MonorailRequest, including can and sorting/grouping order.
+    we: A WorkEnv instance.
+    issue: The current issue (from which to compute prev/next).
+    hotlist (optional): The current hotlist.
+    next_issue (bool): If True, return next, issue, else return previous issue.
+
+  Returns:
+    The adjacent issue.
+
+  Raises:
+    NoSuchIssueException when there is no adjacent issue in the list.
+  """
+  if hotlist:
+    (prev_iid, _cur_index, next_iid, _total_count
+        ) = we.GetIssuePositionInHotlist(
+            issue, hotlist, mr.can, mr.sort_spec, mr.group_by_spec)
+  else:
+    (prev_iid, _cur_index, next_iid, _total_count
+        ) = we.FindIssuePositionInSearch(issue)
+  iid = next_iid if next_issue else prev_iid
+  if iid is None:
+    raise exceptions.NoSuchIssueException()
+  return we.GetIssue(iid)
diff --git a/tracker/issueentry.py b/tracker/issueentry.py
new file mode 100644
index 0000000..77de114
--- /dev/null
+++ b/tracker/issueentry.py
@@ -0,0 +1,630 @@
+# 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
+
+"""Servlet that implements the entry of new issues."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import difflib
+import logging
+import string
+import time
+
+from businesslogic import work_env
+from features import hotlist_helpers
+from features import send_notifications
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import permissions
+from framework import servlet
+from framework import template_helpers
+from framework import urls
+import ezt
+from tracker import field_helpers
+from tracker import template_helpers as issue_tmpl_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+from tracker import tracker_views
+from proto import tracker_pb2
+
+PLACEHOLDER_SUMMARY = 'Enter one-line summary'
+PHASES_WITH_MILESTONES = ['Beta', 'Stable', 'Stable-Exp', 'Stable-Full']
+CORP_RESTRICTION_LABEL = 'Restrict-View-Google'
+RESTRICTED_FLT_FIELDS = ['notice', 'whitepaper', 'm-approved']
+
+
+class IssueEntry(servlet.Servlet):
+  """IssueEntry shows a page with a simple form to enter a new issue."""
+
+  _PAGE_TEMPLATE = 'tracker/issue-entry-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_ISSUES
+
+  # The issue filing wizard is a separate app that posted back to Monorail's
+  # issue entry page. To make this possible for the wizard, we need to allow
+  # XHR-scoped XSRF tokens.
+  ALLOW_XHR = True
+
+  def AssertBasePermission(self, mr):
+    """Check whether the user has any permission to visit this page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+    """
+    super(IssueEntry, self).AssertBasePermission(mr)
+    if not self.CheckPerm(mr, permissions.CREATE_ISSUE):
+      raise permissions.PermissionException(
+          'User is not allowed to enter an issue')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    with mr.profiler.Phase('getting config'):
+      config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+
+    # In addition to checking perms, we adjust some default field values for
+    # project members.
+    is_member = framework_bizobj.UserIsInProject(
+        mr.project, mr.auth.effective_ids)
+    page_perms = self.MakePagePerms(
+        mr, None,
+        permissions.CREATE_ISSUE,
+        permissions.SET_STAR,
+        permissions.EDIT_ISSUE,
+        permissions.EDIT_ISSUE_SUMMARY,
+        permissions.EDIT_ISSUE_STATUS,
+        permissions.EDIT_ISSUE_OWNER,
+        permissions.EDIT_ISSUE_CC)
+
+
+    with work_env.WorkEnv(mr, self.services) as we:
+      userprefs = we.GetUserPrefs(mr.auth.user_id)
+      code_font = any(pref for pref in userprefs.prefs
+                      if pref.name == 'code_font' and pref.value == 'true')
+
+    template = self._GetTemplate(mr.cnxn, config, mr.template_name, is_member)
+
+    if template.summary:
+      initial_summary = template.summary
+      initial_summary_must_be_edited = template.summary_must_be_edited
+    else:
+      initial_summary = PLACEHOLDER_SUMMARY
+      initial_summary_must_be_edited = True
+
+    if template.status:
+      initial_status = template.status
+    elif is_member:
+      initial_status = 'Accepted'
+    else:
+      initial_status = 'New'  # not offering meta, only used in hidden field.
+
+    component_paths = []
+    for component_id in template.component_ids:
+      component_paths.append(
+          tracker_bizobj.FindComponentDefByID(component_id, config).path)
+    initial_components = ', '.join(component_paths)
+
+    if template.owner_id:
+      initial_owner = framework_views.MakeUserView(
+          mr.cnxn, self.services.user, template.owner_id)
+    elif template.owner_defaults_to_member and page_perms.EditIssue:
+      initial_owner = mr.auth.user_view
+    else:
+      initial_owner = None
+
+    if initial_owner:
+      initial_owner_name = initial_owner.email
+      owner_avail_state = initial_owner.avail_state
+      owner_avail_message_short = initial_owner.avail_message_short
+    else:
+      initial_owner_name = ''
+      owner_avail_state = None
+      owner_avail_message_short = None
+
+    # Check whether to allow attachments from the entry page
+    allow_attachments = tracker_helpers.IsUnderSoftAttachmentQuota(mr.project)
+
+    config_view = tracker_views.ConfigView(mr, self.services, config, template)
+    # If the user followed a link that specified the template name, make sure
+    # that it is also in the menu as the current choice.
+    # TODO(jeffcarp): Unit test this.
+    config_view.template_view.can_view = ezt.boolean(True)
+
+    # TODO(jeffcarp): Unit test this.
+    offer_templates = len(config_view.template_names) > 1
+    restrict_to_known = config.restrict_to_known
+    link_or_template_labels = mr.GetListParam('labels', template.labels)
+    labels, _derived_labels = tracker_bizobj.ExplicitAndDerivedNonMaskedLabels(
+        link_or_template_labels, [], config)
+
+    # Users with restrict_new_issues user pref automatically add R-V-G.
+    with work_env.WorkEnv(mr, self.services) as we:
+      userprefs = we.GetUserPrefs(mr.auth.user_id)
+      restrict_new_issues = any(
+          up.name == 'restrict_new_issues' and up.value == 'true'
+          for up in userprefs.prefs)
+      if restrict_new_issues:
+        if not any(lab.lower().startswith('restrict-view-') for lab in labels):
+          labels.append(CORP_RESTRICTION_LABEL)
+
+    field_user_views = tracker_views.MakeFieldUserViews(
+        mr.cnxn, template, self.services.user)
+    approval_ids = [av.approval_id for av in template.approval_values]
+    field_views = tracker_views.MakeAllFieldValueViews(
+        config, link_or_template_labels, [], template.field_values,
+        field_user_views, parent_approval_ids=approval_ids,
+        phases=template.phases)
+    # TODO(jojwang): monorail:6305, remove this hack when Edit perms for field
+    # values are implemented.
+    field_views = [view for view in field_views
+                   if view.field_name.lower() not in RESTRICTED_FLT_FIELDS]
+    uneditable_fields = ezt.boolean(False)
+    for fv in field_views:
+      if permissions.CanEditValueForFieldDef(
+          mr.auth.effective_ids, mr.perms, mr.project, fv.field_def.field_def):
+        fv.is_editable = ezt.boolean(True)
+      else:
+        fv.is_editable = ezt.boolean(False)
+        uneditable_fields = ezt.boolean(True)
+
+    # TODO(jrobbins): remove "or []" after next release.
+    (prechecked_approvals, required_approval_ids,
+     phases) = issue_tmpl_helpers.GatherApprovalsPageData(
+         template.approval_values or [], template.phases, config)
+    approvals = [view for view in field_views if view.field_id in
+                 approval_ids]
+
+    page_data = {
+        'issue_tab_mode':
+            'issueEntry',
+        'initial_summary':
+            initial_summary,
+        'template_summary':
+            initial_summary,
+        'clear_summary_on_click':
+            ezt.boolean(
+                initial_summary_must_be_edited and
+                'initial_summary' not in mr.form_overrides),
+        'must_edit_summary':
+            ezt.boolean(initial_summary_must_be_edited),
+        'initial_description':
+            template.content,
+        'template_name':
+            template.name,
+        'component_required':
+            ezt.boolean(template.component_required),
+        'initial_status':
+            initial_status,
+        'initial_owner':
+            initial_owner_name,
+        'owner_avail_state':
+            owner_avail_state,
+        'owner_avail_message_short':
+            owner_avail_message_short,
+        'initial_components':
+            initial_components,
+        'initial_cc':
+            '',
+        'initial_blocked_on':
+            '',
+        'initial_blocking':
+            '',
+        'initial_hotlists':
+            '',
+        'labels':
+            labels,
+        'fields':
+            field_views,
+        'any_errors':
+            ezt.boolean(mr.errors.AnyErrors()),
+        'page_perms':
+            page_perms,
+        'allow_attachments':
+            ezt.boolean(allow_attachments),
+        'max_attach_size':
+            template_helpers.BytesKbOrMb(
+                framework_constants.MAX_POST_BODY_SIZE),
+        'offer_templates':
+            ezt.boolean(offer_templates),
+        'config':
+            config_view,
+        'restrict_to_known':
+            ezt.boolean(restrict_to_known),
+        'is_member':
+            ezt.boolean(is_member),
+        'code_font':
+            ezt.boolean(code_font),
+        # The following are necessary for displaying phases that come with
+        # this template. These are read-only.
+        'allow_edit':
+            ezt.boolean(False),
+        'uneditable_fields':
+            uneditable_fields,
+        'initial_phases':
+            phases,
+        'approvals':
+            approvals,
+        'prechecked_approvals':
+            prechecked_approvals,
+        'required_approval_ids':
+            required_approval_ids,
+        # See monorail:4692 and the use of PHASES_WITH_MILESTONES
+        # in elements/flt/mr-launch-overview/mr-phase.js
+        'issue_phase_names':
+            list(
+                {
+                    phase.name.lower()
+                    for phase in phases
+                    if phase.name in PHASES_WITH_MILESTONES
+                }),
+    }
+
+    return page_data
+
+  def GatherHelpData(self, mr, page_data):
+    """Return a dict of values to drive on-page user help.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      page_data: Dictionary of base and page template data.
+
+    Returns:
+      A dict of values to drive on-page user help, to be added to page_data.
+    """
+    help_data = super(IssueEntry, self).GatherHelpData(mr, page_data)
+    dismissed = []
+    if mr.auth.user_pb:
+      with work_env.WorkEnv(mr, self.services) as we:
+        userprefs = we.GetUserPrefs(mr.auth.user_id)
+      dismissed = [
+          pv.name for pv in userprefs.prefs if pv.value == 'true']
+    is_privileged_domain_user = framework_bizobj.IsPriviledgedDomainUser(
+        mr.auth.user_pb.email)
+    if (mr.auth.user_id and
+        'privacy_click_through' not in dismissed):
+      help_data['cue'] = 'privacy_click_through'
+    elif (mr.auth.user_id and
+        'code_of_conduct' not in dismissed):
+      help_data['cue'] = 'code_of_conduct'
+
+    help_data.update({
+        'is_privileged_domain_user': ezt.boolean(is_privileged_domain_user),
+        })
+    return help_data
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the issue entry form.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: The post_data dict for the current request.
+
+    Returns:
+      String URL to redirect the user to after processing.
+    """
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+
+    parsed = tracker_helpers.ParseIssueRequest(
+        mr.cnxn, post_data, self.services, mr.errors, mr.project_name)
+
+    # Updates parsed.labels and parsed.fields in place.
+    field_helpers.ShiftEnumFieldsIntoLabels(
+        parsed.labels, parsed.labels_remove, parsed.fields.vals,
+        parsed.fields.vals_remove, config)
+
+    labels = _DiscardUnusedTemplateLabelPrefixes(parsed.labels)
+
+    is_member = framework_bizobj.UserIsInProject(
+        mr.project, mr.auth.effective_ids)
+    template = self._GetTemplate(
+        mr.cnxn, config, parsed.template_name, is_member)
+
+    (approval_values,
+     phases) = issue_tmpl_helpers.FilterApprovalsAndPhases(
+         template.approval_values or [], template.phases, config)
+
+    # Issue PB with only approval_values and labels filled out, for the purpose
+    # of computing applicable fields.
+    partial_issue = tracker_pb2.Issue(
+        approval_values=approval_values, labels=labels)
+    applicable_fields = field_helpers.ListApplicableFieldDefs(
+        [partial_issue], config)
+
+    bounce_labels = parsed.labels[:]
+    bounce_fields = tracker_views.MakeBounceFieldValueViews(
+        parsed.fields.vals,
+        parsed.fields.phase_vals,
+        config,
+        applicable_fields=applicable_fields)
+
+    phase_ids_by_name = {
+        phase.name.lower(): [phase.phase_id] for phase in template.phases}
+    field_values = field_helpers.ParseFieldValues(
+        mr.cnxn, self.services.user, parsed.fields.vals,
+        parsed.fields.phase_vals, config,
+        phase_ids_by_name=phase_ids_by_name)
+
+    component_ids = tracker_helpers.LookupComponentIDs(
+        parsed.components.paths, config, mr.errors)
+
+    if not parsed.summary.strip() or parsed.summary == PLACEHOLDER_SUMMARY:
+      mr.errors.summary = 'Summary is required'
+
+    if not parsed.comment.strip():
+      mr.errors.comment = 'A description is required'
+
+    if len(parsed.comment) > tracker_constants.MAX_COMMENT_CHARS:
+      mr.errors.comment = 'Comment is too long'
+    if len(parsed.summary) > tracker_constants.MAX_SUMMARY_CHARS:
+      mr.errors.summary = 'Summary is too long'
+
+    if _MatchesTemplate(parsed.comment, template):
+      mr.errors.comment = 'Template must be filled out.'
+
+    if parsed.users.owner_id is None:
+      mr.errors.owner = 'Invalid owner username'
+    else:
+      valid, msg = tracker_helpers.IsValidIssueOwner(
+          mr.cnxn, mr.project, parsed.users.owner_id, self.services)
+      if not valid:
+        mr.errors.owner = msg
+
+    if None in parsed.users.cc_ids:
+      mr.errors.cc = 'Invalid Cc username'
+
+    field_helpers.AssertCustomFieldsEditPerms(
+        mr, config, field_values, [], [], labels, [])
+    field_helpers.ApplyRestrictedDefaultValues(
+        mr, config, field_values, labels, template.field_values,
+        template.labels)
+
+    # This ValidateCustomFields call is redundant with work already done
+    # in CreateIssue. However, this instance passes in an ezt_errors object
+    # to allow showing related errors next to the fields they happen on.
+    field_helpers.ValidateCustomFields(
+        mr.cnxn,
+        self.services,
+        field_values,
+        config,
+        mr.project,
+        ezt_errors=mr.errors,
+        issue=partial_issue)
+
+    hotlist_pbs = ProcessParsedHotlistRefs(
+        mr, self.services, parsed.hotlists.hotlist_refs)
+
+    if not mr.errors.AnyErrors():
+      with work_env.WorkEnv(mr, self.services) as we:
+        try:
+          if parsed.attachments:
+            new_bytes_used = tracker_helpers.ComputeNewQuotaBytesUsed(
+                mr.project, parsed.attachments)
+            # TODO(jrobbins): Make quota be calculated and stored as
+            # part of applying the comment.
+            self.services.project.UpdateProject(
+                mr.cnxn, mr.project.project_id,
+                attachment_bytes_used=new_bytes_used)
+
+          marked_description = tracker_helpers.MarkupDescriptionOnInput(
+              parsed.comment, template.content)
+          has_star = 'star' in post_data and post_data['star'] == '1'
+
+          if approval_values:
+            _AttachDefaultApprovers(config, approval_values)
+
+          # To preserve previous behavior, do not raise filter rule errors.
+          issue, _ = we.CreateIssue(
+              mr.project_id,
+              parsed.summary,
+              parsed.status,
+              parsed.users.owner_id,
+              parsed.users.cc_ids,
+              labels,
+              field_values,
+              component_ids,
+              marked_description,
+              blocked_on=parsed.blocked_on.iids,
+              blocking=parsed.blocking.iids,
+              dangling_blocked_on=[
+                  tracker_pb2.DanglingIssueRef(ext_issue_identifier=ref_string)
+                  for ref_string in parsed.blocked_on.federated_ref_strings
+              ],
+              dangling_blocking=[
+                  tracker_pb2.DanglingIssueRef(ext_issue_identifier=ref_string)
+                  for ref_string in parsed.blocking.federated_ref_strings
+              ],
+              attachments=parsed.attachments,
+              approval_values=approval_values,
+              phases=phases,
+              raise_filter_errors=False)
+
+          if has_star:
+            we.StarIssue(issue, True)
+
+          if hotlist_pbs:
+            hotlist_ids = {hotlist.hotlist_id for hotlist in hotlist_pbs}
+            issue_tuple = (issue.issue_id, mr.auth.user_id, int(time.time()),
+                           '')
+            self.services.features.AddIssueToHotlists(
+                mr.cnxn, hotlist_ids, issue_tuple, self.services.issue,
+                self.services.chart)
+
+        except exceptions.OverAttachmentQuota:
+          mr.errors.attachments = 'Project attachment quota exceeded.'
+        except exceptions.InputException as e:
+          if 'Undefined or deprecated component with id' in e.message:
+            mr.errors.components = 'Undefined or deprecated component'
+
+    mr.template_name = parsed.template_name
+    if mr.errors.AnyErrors():
+      self.PleaseCorrect(
+          mr, initial_summary=parsed.summary, initial_status=parsed.status,
+          initial_owner=parsed.users.owner_username,
+          initial_cc=', '.join(parsed.users.cc_usernames),
+          initial_components=', '.join(parsed.components.paths),
+          initial_comment=parsed.comment, labels=bounce_labels,
+          fields=bounce_fields, template_name=parsed.template_name,
+          initial_blocked_on=parsed.blocked_on.entered_str,
+          initial_blocking=parsed.blocking.entered_str,
+          initial_hotlists=parsed.hotlists.entered_str,
+          component_required=ezt.boolean(template.component_required))
+      return
+
+    # format a redirect url
+    return framework_helpers.FormatAbsoluteURL(
+        mr, urls.ISSUE_DETAIL, id=issue.local_id)
+
+  def _GetTemplate(self, cnxn, config, template_name, is_member):
+    """Tries to fetch template by name and implements default template logic
+    if not found."""
+    template = None
+    if template_name:
+      template_name = template_name.replace('+', ' ')
+      template = self.services.template.GetTemplateByName(cnxn,
+          template_name, config.project_id)
+
+    if not template:
+      if is_member:
+        template_id = config.default_template_for_developers
+      else:
+        template_id = config.default_template_for_users
+      template = self.services.template.GetTemplateById(cnxn, template_id)
+      # If the default templates were deleted, load all and pick the first one.
+      if not template:
+        templates = self.services.template.GetProjectTemplates(cnxn,
+            config.project_id)
+        assert len(templates) > 0, 'Project has no templates!'
+        template = templates[0]
+
+    return template
+
+
+def _AttachDefaultApprovers(config, approval_values):
+  approval_defs_by_id = {ad.approval_id: ad for ad in config.approval_defs}
+  for av in approval_values:
+    ad = approval_defs_by_id.get(av.approval_id)
+    if ad:
+      av.approver_ids = ad.approver_ids[:]
+    else:
+      logging.info('ApprovalDef with approval_id %r could not be found',
+          av.approval_id)
+
+
+def _MatchesTemplate(content, template):
+  content = content.strip(string.whitespace)
+  template_content = template.content.strip(string.whitespace)
+  diff = difflib.unified_diff(content.splitlines(),
+      template_content.splitlines())
+  return len('\n'.join(diff)) == 0
+
+
+def _DiscardUnusedTemplateLabelPrefixes(labels):
+  """Drop any labels that end in '-?'.
+
+  Args:
+    labels: a list of label strings.
+
+  Returns:
+    A list of the same labels, but without any that end with '-?'.
+    Those label prefixes in the new issue templates are intended to
+    prompt the user to enter some label with that prefix, but if
+    nothing is entered there, we do not store anything.
+  """
+  return [lab for lab in labels
+          if not lab.endswith('-?')]
+
+
+def ProcessParsedHotlistRefs(mr, services, parsed_hotlist_refs):
+  """Process a list of ParsedHotlistRefs, returning referenced hotlists.
+
+  This function validates the given ParsedHotlistRefs using four checks; if all
+  of them succeed, then it returns the corresponding hotlist protobuf objects.
+  If any of them fail, it sets the appropriate error string in mr.errors, and
+  returns an empty list.
+
+  Args:
+    mr: the MonorailRequest object
+    services: the service manager
+    parsed_hotlist_refs: a list of ParsedHotlistRef objects
+
+  Returns:
+    on valid input, a list of hotlist protobuf objects
+    if a check fails (and the input is thus considered invalid), an empty list
+
+  Side-effects:
+    if any of the checks fails, set mr.errors.hotlists to a descriptive error
+  """
+  # Pre-processing; common pieces used by functions later.
+  user_hotlist_pbs = services.features.GetHotlistsByUserID(
+      mr.cnxn, mr.auth.user_id)
+  user_hotlist_owners_ids = {hotlist.owner_ids[0]
+      for hotlist in user_hotlist_pbs}
+  user_hotlist_owners_to_emails = services.user.LookupUserEmails(
+      mr.cnxn, user_hotlist_owners_ids)
+  user_hotlist_emails_to_owners = {v: k
+      for k, v in user_hotlist_owners_to_emails.items()}
+  user_hotlist_refs_to_pbs = {
+      hotlist_helpers.HotlistRef(hotlist.owner_ids[0], hotlist.name): hotlist
+      for hotlist in user_hotlist_pbs }
+  short_refs = list()
+  full_refs = list()
+  for parsed_ref in parsed_hotlist_refs:
+    if parsed_ref.user_email is None:
+      short_refs.append(parsed_ref)
+    else:
+      full_refs.append(parsed_ref)
+
+  invalid_names = hotlist_helpers.InvalidParsedHotlistRefsNames(
+      parsed_hotlist_refs, user_hotlist_pbs)
+  if invalid_names:
+    mr.errors.hotlists = (
+        'You have no hotlist(s) named: %s' % ', '.join(invalid_names))
+    return []
+
+  ambiguous_names = hotlist_helpers.AmbiguousShortrefHotlistNames(
+      short_refs, user_hotlist_pbs)
+  if ambiguous_names:
+    mr.errors.hotlists = (
+        'Ambiguous hotlist(s) specified: %s' % ', '.join(ambiguous_names))
+    return []
+
+  # At this point, all refs' named hotlists are guaranteed to exist, and
+  # short refs are guaranteed to be unambiguous;
+  # therefore, short refs are also valid.
+  short_refs_hotlist_names = {sref.hotlist_name for sref in short_refs}
+  shortref_valid_pbs = [hotlist for hotlist in user_hotlist_pbs
+      if hotlist.name in short_refs_hotlist_names]
+
+  invalid_emails = hotlist_helpers.InvalidParsedHotlistRefsEmails(
+      full_refs, user_hotlist_emails_to_owners)
+  if invalid_emails:
+    mr.errors.hotlists = (
+        'You have no hotlist(s) owned by: %s' % ', '.join(invalid_emails))
+    return []
+
+  fullref_valid_pbs, invalid_refs = (
+      hotlist_helpers.GetHotlistsOfParsedHotlistFullRefs(
+        full_refs, user_hotlist_emails_to_owners, user_hotlist_refs_to_pbs))
+  if invalid_refs:
+    invalid_refs_readable = [':'.join(parsed_ref)
+        for parsed_ref in invalid_refs]
+    mr.errors.hotlists = (
+        'Not in your hotlist(s): %s' % ', '.join(invalid_refs_readable))
+    return []
+
+  hotlist_pbs = shortref_valid_pbs + fullref_valid_pbs
+
+  return hotlist_pbs
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)
diff --git a/tracker/issueexport.py b/tracker/issueexport.py
new file mode 100644
index 0000000..a457a17
--- /dev/null
+++ b/tracker/issueexport.py
@@ -0,0 +1,279 @@
+# 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
+
+"""Servlet to export a range of issues in JSON format.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import time
+
+import ezt
+
+from businesslogic import work_env
+from features import savedqueries_helpers
+from framework import permissions
+from framework import jsonfeed
+from framework import servlet
+from tracker import tracker_bizobj
+
+
+class IssueExport(servlet.Servlet):
+  """IssueExportControls let's an admin choose how to export issues."""
+
+  _PAGE_TEMPLATE = 'tracker/issue-export-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_ISSUES
+
+  def AssertBasePermission(self, mr):
+    """Make sure that the logged in user has permission to view this page."""
+    super(IssueExport, self).AssertBasePermission(mr)
+    if not mr.auth.user_pb.is_site_admin:
+      raise permissions.PermissionException(
+          'Only site admins may export issues')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+
+    canned_query_views = []
+    if mr.project_id:
+      with mr.profiler.Phase('getting canned queries'):
+        canned_queries = self.services.features.GetCannedQueriesByProjectID(
+            mr.cnxn, mr.project_id)
+      canned_query_views = [
+          savedqueries_helpers.SavedQueryView(sq, idx + 1, None, None)
+          for idx, sq in enumerate(canned_queries)
+      ]
+
+    saved_query_views = []
+    if mr.auth.user_id and self.services.features:
+      with mr.profiler.Phase('getting saved queries'):
+        saved_queries = self.services.features.GetSavedQueriesByUserID(
+            mr.cnxn, mr.me_user_id)
+        saved_query_views = [
+            savedqueries_helpers.SavedQueryView(sq, idx + 1, None, None)
+            for idx, sq in enumerate(saved_queries)
+            if
+            (mr.project_id in sq.executes_in_project_ids or not mr.project_id)
+        ]
+
+    return {
+        'issue_tab_mode': None,
+        'initial_start': mr.start,
+        'initial_num': mr.num,
+        'page_perms': self.MakePagePerms(mr, None, permissions.CREATE_ISSUE),
+        'canned_queries': canned_query_views,
+        'saved_queries': saved_query_views,
+    }
+
+
+class IssueExportJSON(jsonfeed.JsonFeed):
+  """IssueExport shows a range of issues in JSON format."""
+
+  # Pretty-print the JSON output.
+  JSON_INDENT = 4
+
+  def AssertBasePermission(self, mr):
+    """Make sure that the logged in user has permission to view this page."""
+    super(IssueExportJSON, self).AssertBasePermission(mr)
+    if not mr.auth.user_pb.is_site_admin:
+      raise permissions.PermissionException(
+          'Only site admins may export issues')
+
+  def HandleRequest(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    if mr.query or mr.can != 1:
+      with work_env.WorkEnv(mr, self.services) as we:
+        pipeline = we.ListIssues(
+            mr.query, [mr.project.project_name], mr.auth.user_id, mr.num,
+            mr.start, mr.can, mr.group_by_spec, mr.sort_spec, False)
+      issues = pipeline.allowed_results
+    # no user query and mr.can == 1 (we want all issues)
+    elif not mr.start and not mr.num:
+      issues = self.services.issue.GetAllIssuesInProject(
+          mr.cnxn, mr.project.project_id)
+    else:
+      local_id_range = list(range(mr.start, mr.start + mr.num))
+      issues = self.services.issue.GetIssuesByLocalIDs(
+          mr.cnxn, mr.project.project_id, local_id_range)
+
+    user_id_set = tracker_bizobj.UsersInvolvedInIssues(issues)
+
+    comments_dict = self.services.issue.GetCommentsForIssues(
+        mr.cnxn, [issue.issue_id for issue in issues])
+    for comment_list in comments_dict.values():
+      user_id_set.update(
+        tracker_bizobj.UsersInvolvedInCommentList(comment_list))
+
+    starrers_dict = self.services.issue_star.LookupItemsStarrers(
+        mr.cnxn, [issue.issue_id for issue in issues])
+    for starrer_id_list in starrers_dict.values():
+      user_id_set.update(starrer_id_list)
+
+    # The value 0 indicates "no user", e.g., that an issue has no owner.
+    # We don't need to create a User row to represent that.
+    user_id_set.discard(0)
+    email_dict = self.services.user.LookupUserEmails(
+        mr.cnxn, user_id_set, ignore_missed=True)
+
+    issues_json = [
+      self._MakeIssueJSON(
+          mr, issue, email_dict,
+          comments_dict.get(issue.issue_id, []),
+          starrers_dict.get(issue.issue_id, []))
+      for issue in issues if not issue.deleted]
+
+    json_data = {
+        'metadata': {
+            'version': 1,
+            'when': int(time.time()),
+            'who': mr.auth.email,
+            'project': mr.project_name,
+            'start': mr.start,
+            'num': mr.num,
+        },
+        'issues': issues_json,
+        # This list could be derived from the 'issues', but we provide it for
+        # ease of processing.
+        'emails': list(email_dict.values()),
+    }
+    return json_data
+
+  def _MakeAmendmentJSON(self, amendment, email_dict):
+    amendment_json = {
+        'field': amendment.field.name,
+    }
+    if amendment.custom_field_name:
+      amendment_json.update({'custom_field_name': amendment.custom_field_name})
+    if amendment.newvalue:
+      amendment_json.update({'new_value': amendment.newvalue})
+    if amendment.added_user_ids:
+      amendment_json.update(
+          {'added_emails': [email_dict.get(user_id)
+                            for user_id in amendment.added_user_ids]})
+    if amendment.removed_user_ids:
+      amendment_json.update(
+          {'removed_emails': [email_dict.get(user_id)
+                              for user_id in amendment.removed_user_ids]})
+    return amendment_json
+
+  def _MakeAttachmentJSON(self, attachment):
+    if attachment.deleted:
+      return None
+    attachment_json = {
+      'name': attachment.filename,
+      'size': attachment.filesize,
+      'mimetype': attachment.mimetype,
+      'gcs_object_id': attachment.gcs_object_id,
+    }
+    return attachment_json
+
+  def _MakeCommentJSON(self, comment, email_dict):
+    if comment.deleted_by:
+      return None
+    amendments = [self._MakeAmendmentJSON(a, email_dict)
+                  for a in comment.amendments]
+    attachments = [self._MakeAttachmentJSON(a)
+                   for a in comment.attachments]
+    comment_json = {
+      'timestamp': comment.timestamp,
+      'commenter': email_dict.get(comment.user_id),
+      'content': comment.content,
+      'amendments': [a for a in amendments if a],
+      'attachments': [a for a in attachments if a],
+      'description_num': comment.description_num
+    }
+    return comment_json
+
+  def _MakePhaseJSON(self, phase):
+    return {'id': phase.phase_id, 'name': phase.name, 'rank': phase.rank}
+
+  def _MakeFieldValueJSON(self, field, fd_dict, email_dict, phase_dict):
+    fd = fd_dict.get(field.field_id)
+    field_value_json = {
+        'field': fd.field_name,
+        'phase': phase_dict.get(field.phase_id),
+    }
+    approval_fd = fd_dict.get(fd.approval_id)
+    if approval_fd:
+      field_value_json['approval'] = approval_fd.field_name
+
+    if field.int_value:
+      field_value_json['int_value'] = field.int_value
+    if field.str_value:
+      field_value_json['str_value'] = field.str_value
+    if field.user_id:
+      field_value_json['user_value'] = email_dict.get(field.user_id)
+    if field.date_value:
+      field_value_json['date_value'] = field.date_value
+    return field_value_json
+
+  def _MakeApprovalValueJSON(
+      self, approval_value, fd_dict, email_dict, phase_dict):
+    av_json = {
+        'approval': fd_dict.get(approval_value.approval_id).field_name,
+        'status': approval_value.status.name,
+        'setter': email_dict.get(approval_value.setter_id),
+        'set_on': approval_value.set_on,
+        'approvers': [email_dict.get(approver_id) for
+                      approver_id in approval_value.approver_ids],
+        'phase': phase_dict.get(approval_value.phase_id),
+    }
+    return av_json
+
+  def _MakeIssueJSON(
+        self, mr, issue, email_dict, comment_list, starrer_id_list):
+    """Return a dict of info about the issue and its comments."""
+    descriptions = [c for c in comment_list if c.is_description]
+    for i, d in enumerate(descriptions):
+      d.description_num = str(i+1)
+    comments = [self._MakeCommentJSON(c, email_dict) for c in comment_list]
+    phase_dict = {phase.phase_id: phase.name for phase in issue.phases}
+    config = self.services.config.GetProjectConfig(
+        mr.cnxn, mr.project.project_id)
+    fd_dict = {fd.field_id: fd for fd in config.field_defs}
+    issue_json = {
+        'local_id': issue.local_id,
+        'reporter': email_dict.get(issue.reporter_id),
+        'summary': issue.summary,
+        'owner': email_dict.get(issue.owner_id),
+        'status': issue.status,
+        'cc': [email_dict[cc_id] for cc_id in issue.cc_ids],
+        'labels': issue.labels,
+        'phases': [self._MakePhaseJSON(phase) for phase in issue.phases],
+        'fields': [
+            self._MakeFieldValueJSON(field, fd_dict, email_dict, phase_dict)
+            for field in issue.field_values],
+        'approvals': [self._MakeApprovalValueJSON(
+            approval, fd_dict, email_dict, phase_dict)
+                      for approval in issue.approval_values],
+        'starrers': [email_dict[starrer] for starrer in starrer_id_list],
+        'comments': [c for c in comments if c],
+        'opened': issue.opened_timestamp,
+        'modified': issue.modified_timestamp,
+        'closed': issue.closed_timestamp,
+    }
+    # TODO(http://crbug.com/monorail/7217): Export cross-project references.
+    if issue.blocked_on_iids:
+      issue_json['blocked_on'] = [i.local_id for i in
+           self.services.issue.GetIssues(mr.cnxn, issue.blocked_on_iids)
+           if i.project_id == mr.project.project_id]
+    if issue.blocking_iids:
+      issue_json['blocking'] = [i.local_id for i in
+           self.services.issue.GetIssues(mr.cnxn, issue.blocking_iids)
+           if i.project_id == mr.project.project_id]
+    if issue.merged_into:
+      merge = self.services.issue.GetIssue(mr.cnxn, issue.merged_into)
+      if merge.project_id == mr.project.project_id:
+        issue_json['merged_into'] = merge.local_id
+    return issue_json
diff --git a/tracker/issueimport.py b/tracker/issueimport.py
new file mode 100644
index 0000000..1e0289b
--- /dev/null
+++ b/tracker/issueimport.py
@@ -0,0 +1,310 @@
+# 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
+
+"""Servlet to import a file of issues in JSON format.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import json
+import logging
+import time
+
+import ezt
+
+from features import filterrules_helpers
+from framework import framework_helpers
+from framework import jsonfeed
+from framework import permissions
+from framework import servlet
+from framework import urls
+from proto import tracker_pb2
+
+
+ParserState = collections.namedtuple(
+    'ParserState',
+    'user_id_dict, nonexist_emails, issue_list, comments_dict, starrers_dict, '
+    'relations_dict')
+
+
+class IssueImport(servlet.Servlet):
+  """IssueImport loads a file of issues in JSON format."""
+
+  _PAGE_TEMPLATE = 'tracker/issue-import-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_ISSUES
+
+  def AssertBasePermission(self, mr):
+    """Make sure that the logged in user has permission to view this page."""
+    super(IssueImport, self).AssertBasePermission(mr)
+    if not mr.auth.user_pb.is_site_admin:
+      raise permissions.PermissionException(
+          'Only site admins may import issues')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+    return {
+        'issue_tab_mode': None,
+        'page_perms': self.MakePagePerms(mr, None, permissions.CREATE_ISSUE),
+        'import_errors': [],
+    }
+
+  def ProcessFormData(self, mr, post_data):
+    """Process the issue entry form.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: The post_data dict for the current request.
+
+    Returns:
+      String URL to redirect the user to after processing.
+    """
+    import_errors = []
+    json_data = None
+
+    pre_check_only = 'pre_check_only' in post_data
+
+    uploaded_file = post_data.get('jsonfile')
+    if uploaded_file is None:
+      import_errors.append('No file uploaded')
+    else:
+      try:
+        json_str = uploaded_file.value
+        if json_str.startswith(jsonfeed.XSSI_PREFIX):
+          json_str = json_str[len(jsonfeed.XSSI_PREFIX):]
+        json_data = json.loads(json_str)
+      except ValueError:
+        import_errors.append('error parsing JSON in file')
+
+    if uploaded_file and not json_data:
+      import_errors.append('JSON file was empty')
+
+    # Note that the project must already exist in order to even reach
+    # this servlet because it is hosted in the context of a project.
+    if json_data and mr.project_name != json_data['metadata']['project']:
+      import_errors.append(
+        'Project name does not match. '
+        'Edit the file if you want to import into this project anyway.')
+
+    if import_errors:
+      return self.PleaseCorrect(mr, import_errors=import_errors)
+
+    event_log = []  # We accumulate a list of messages to display to the user.
+
+    try:
+      # First we parse the JSON into objects, but we don't have DB IDs yet.
+      state = self._ParseObjects(mr.cnxn, mr.project_id, json_data, event_log)
+      # If that worked, go ahead and start saving the data to the DB.
+      if not pre_check_only:
+        self._SaveObjects(mr.cnxn, mr.project_id, state, event_log)
+    except JSONImportError:
+      # just report it to the user by displaying event_log
+      event_log.append('Aborted import processing')
+
+    # This is a little bit of a hack because it always uses the form validation
+    # error message display logic to show the results of this import run,
+    # which may include errors or not.
+    return self.PleaseCorrect(mr, import_errors=event_log)
+
+  def _ParseObjects(self, cnxn, project_id, json_data, event_log):
+    """Examine JSON data and return a parser state for further processing."""
+    # Decide which users need to be created.
+    needed_emails = json_data['emails']
+    user_id_dict = self.services.user.LookupExistingUserIDs(cnxn, needed_emails)
+    nonexist_emails = [email for email in needed_emails
+                       if email not in user_id_dict]
+
+    event_log.append('Need to create %d users: %r' %
+                     (len(nonexist_emails), nonexist_emails))
+    user_id_dict.update({
+        email.lower(): framework_helpers.MurmurHash3_x86_32(email.lower())
+        for email in nonexist_emails})
+
+    num_comments = 0
+    num_stars = 0
+    issue_list = []
+    comments_dict = collections.defaultdict(list)
+    starrers_dict = collections.defaultdict(list)
+    relations_dict = collections.defaultdict(list)
+    for issue_json in json_data.get('issues', []):
+      issue, comment_list, starrer_list, relation_list = self._ParseIssue(
+          cnxn, project_id, user_id_dict, issue_json, event_log)
+      issue_list.append(issue)
+      comments_dict[issue.local_id] = comment_list
+      starrers_dict[issue.local_id] = starrer_list
+      relations_dict[issue.local_id] = relation_list
+      num_comments += len(comment_list)
+      num_stars += len(starrer_list)
+
+    event_log.append(
+      'Found info for %d issues: %r' %
+      (len(issue_list), sorted([issue.local_id for issue in issue_list])))
+
+    event_log.append(
+      'Found %d total comments for %d issues' %
+      (num_comments, len(comments_dict)))
+
+    event_log.append(
+      'Found %d total stars for %d issues' %
+      (num_stars, len(starrers_dict)))
+
+    event_log.append(
+      'Found %d total relationships.' %
+      sum((len(dsts) for dsts in relations_dict.values())))
+
+    event_log.append('Parsing phase finished OK')
+    return ParserState(
+      user_id_dict, nonexist_emails, issue_list,
+      comments_dict, starrers_dict, relations_dict)
+
+  def _ParseIssue(self, cnxn, project_id, user_id_dict, issue_json, event_log):
+    issue = tracker_pb2.Issue(
+      project_id=project_id,
+      local_id=issue_json['local_id'],
+      reporter_id=user_id_dict[issue_json['reporter']],
+      summary=issue_json['summary'],
+      opened_timestamp=issue_json['opened'],
+      modified_timestamp=issue_json['modified'],
+      cc_ids=[user_id_dict[cc_email]
+              for cc_email in issue_json.get('cc', [])
+              if cc_email in user_id_dict],
+      status=issue_json.get('status', ''),
+      labels=issue_json.get('labels', []),
+      field_values=[self._ParseFieldValue(cnxn, project_id, user_id_dict, field)
+                    for field in issue_json.get('fields', [])])
+    if issue_json.get('owner'):
+      issue.owner_id = user_id_dict[issue_json['owner']]
+    if issue_json.get('closed'):
+      issue.closed_timestamp = issue_json['closed']
+    comments = [self._ParseComment(
+                    project_id, user_id_dict, comment_json, event_log)
+                for comment_json in issue_json.get('comments', [])]
+
+    starrers = [user_id_dict[starrer] for starrer in issue_json['starrers']]
+
+    relations = []
+    relations.extend(
+        [(i, 'blockedon') for i in issue_json.get('blocked_on', [])])
+    relations.extend(
+        [(i, 'blocking') for i in issue_json.get('blocking', [])])
+    if 'merged_into' in issue_json:
+      relations.append((issue_json['merged_into'], 'mergedinto'))
+
+    return issue, comments, starrers, relations
+
+  def _ParseFieldValue(self, cnxn, project_id, user_id_dict, field_json):
+    field = tracker_pb2.FieldValue(
+        field_id=self.services.config.LookupFieldID(cnxn, project_id,
+                                                    field_json['field']))
+    if 'int_value' in field_json:
+      field.int_value = field_json['int_value']
+    if 'str_value' in field_json:
+      field.str_value = field_json['str_value']
+    if 'user_value' in field_json:
+      field.user_value = user_id_dict.get(field_json['user_value'])
+
+    return field
+
+  def _ParseComment(self, project_id, user_id_dict, comment_json, event_log):
+    comment = tracker_pb2.IssueComment(
+        # Note: issue_id is filled in after the issue is saved.
+        project_id=project_id,
+        timestamp=comment_json['timestamp'],
+        user_id=user_id_dict[comment_json['commenter']],
+        content=comment_json.get('content'))
+
+    for amendment in comment_json['amendments']:
+      comment.amendments.append(
+          self._ParseAmendment(amendment, user_id_dict, event_log))
+
+    for attachment in comment_json['attachments']:
+      comment.attachments.append(
+          self._ParseAttachment(attachment, event_log))
+
+    if comment_json['description_num']:
+      comment.is_description = True
+
+    return comment
+
+  def _ParseAmendment(self, amendment_json, user_id_dict, _event_log):
+    amendment = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID(amendment_json['field']))
+
+    if 'new_value' in amendment_json:
+      amendment.newvalue = amendment_json['new_value']
+    if 'custom_field_name' in amendment_json:
+      amendment.custom_field_name = amendment_json['custom_field_name']
+    if 'added_users' in amendment_json:
+      amendment.added_user_ids.extend(
+          [user_id_dict[email] for email in amendment_json['added_users']])
+    if 'removed_users' in amendment_json:
+      amendment.removed_user_ids.extend(
+          [user_id_dict[email] for email in amendment_json['removed_users']])
+
+    return amendment
+
+  def _ParseAttachment(self, attachment_json, _event_log):
+    attachment = tracker_pb2.Attachment(
+        filename=attachment_json['name'],
+        filesize=attachment_json['size'],
+        mimetype=attachment_json['mimetype'],
+        gcs_object_id=attachment_json['gcs_object_id']
+    )
+    return attachment
+
+  def _SaveObjects(self, cnxn, project_id, state, event_log):
+    """Examine JSON data and create users, issues, and comments."""
+
+    created_user_ids = self.services.user.LookupUserIDs(
+      cnxn, state.nonexist_emails, autocreate=True)
+    for created_email, created_id in created_user_ids.items():
+      if created_id != state.user_id_dict[created_email]:
+        event_log.append('Mismatched user_id for %r' % created_email)
+        raise JSONImportError()
+    event_log.append('Created %d users' % len(state.nonexist_emails))
+
+    total_comments = 0
+    total_stars = 0
+    config = self.services.config.GetProjectConfig(cnxn, project_id)
+    for issue in state.issue_list:
+      # TODO(jrobbins): renumber issues if there is a local_id conflict.
+      if issue.local_id not in state.starrers_dict:
+        # Issues with stars will have filter rules applied in SetStar().
+        filterrules_helpers.ApplyFilterRules(
+            cnxn, self.services, issue, config)
+      issue_id = self.services.issue.InsertIssue(cnxn, issue)
+      for comment in state.comments_dict[issue.local_id]:
+        total_comments += 1
+        comment.issue_id = issue_id
+        self.services.issue.InsertComment(cnxn, comment)
+      self.services.issue_star.SetStarsBatch(
+          cnxn, self.services, config, issue_id,
+          state.starrers_dict[issue.local_id], True)
+      total_stars += len(state.starrers_dict[issue.local_id])
+
+    event_log.append('Created %d issues' % len(state.issue_list))
+    event_log.append('Created %d comments for %d issues' % (
+        total_comments, len(state.comments_dict)))
+    event_log.append('Set %d stars on %d issues' % (
+        total_stars, len(state.starrers_dict)))
+
+    global_relations_dict = collections.defaultdict(list)
+    for issue, rels in state.relations_dict.items():
+      src_iid = self.services.issue.GetIssueByLocalID(
+          cnxn, project_id, issue).issue_id
+      dst_iids = [i.issue_id for i in self.services.issue.GetIssuesByLocalIDs(
+          cnxn, project_id, [rel[0] for rel in rels])]
+      kinds = [rel[1] for rel in rels]
+      global_relations_dict[src_iid] = list(zip(dst_iids, kinds))
+    self.services.issue.RelateIssues(cnxn, global_relations_dict)
+
+    self.services.issue.SetUsedLocalID(cnxn, project_id)
+    event_log.append('Finished import')
+
+
+class JSONImportError(Exception):
+  """Exception to raise if imported JSON is invalid."""
+  pass
diff --git a/tracker/issueoriginal.py b/tracker/issueoriginal.py
new file mode 100644
index 0000000..55a494f
--- /dev/null
+++ b/tracker/issueoriginal.py
@@ -0,0 +1,98 @@
+# 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
+
+"""Servlet to show the original email that caused an issue comment.
+
+The text of the body the email is shown in an HTML page with <pre>.
+All the text is automatically escaped by EZT to make it safe to
+include in an HTML page.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import ezt
+
+from businesslogic import work_env
+from framework import filecontent
+from framework import permissions
+from framework import servlet
+from services import issue_svc
+
+
+class IssueOriginal(servlet.Servlet):
+  """IssueOriginal shows an inbound email that caused an issue comment."""
+
+  _PAGE_TEMPLATE = 'tracker/issue-original-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    """Make sure that the logged in user has permission to view this page."""
+    super(IssueOriginal, self).AssertBasePermission(mr)
+    issue, comment = self._GetIssueAndComment(mr)
+
+    # TODO(jrobbins): take granted perms into account here.
+    if issue and not permissions.CanViewIssue(
+        mr.auth.effective_ids, mr.perms, mr.project, issue,
+        allow_viewing_deleted=True):
+      raise permissions.PermissionException(
+          'User is not allowed to view this issue')
+
+    can_view_inbound_message = self.CheckPerm(
+        mr, permissions.VIEW_INBOUND_MESSAGES, art=issue)
+    issue_perms = permissions.UpdateIssuePermissions(
+        mr.perms, mr.project, issue, mr.auth.effective_ids)
+    commenter = self.services.user.GetUser(mr.cnxn, comment.user_id)
+    can_view_comment = permissions.CanViewComment(
+        comment, commenter, mr.auth.user_id, issue_perms)
+    if not can_view_inbound_message or not can_view_comment:
+      raise permissions.PermissionException(
+          'Only project members may view original email text')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    issue, comment = self._GetIssueAndComment(mr)
+    message_body_unicode, is_binary, _is_long = (
+        filecontent.DecodeFileContents(comment.inbound_message))
+
+    # Take out the iso8859-1 non-breaking-space characters that gmail
+    # inserts between consecutive spaces when quoting text in a reply.
+    # You can see this in gmail by sending a plain text reply to a
+    # message that had multiple spaces on some line, then use the
+    # "Show original" menu item to view your reply, you will see "=A0".
+    #message_body_unicode = message_body_unicode.replace(u'\xa0', u' ')
+
+    page_data = {
+        'local_id': issue.local_id,
+        'seq': comment.sequence,
+        'is_binary': ezt.boolean(is_binary),
+        'message_body': message_body_unicode,
+        }
+
+    return page_data
+
+  def _GetIssueAndComment(self, mr):
+    """Wait on retriving the specified issue and issue comment."""
+    if mr.seq is None:
+      self.abort(404, 'comment not specified')
+
+    with work_env.WorkEnv(mr, self.services) as we:
+      issue = self.services.issue.GetIssueByLocalID(
+          mr.cnxn, mr.project_id, mr.local_id)
+      comments = we.ListIssueComments(issue)
+
+    try:
+      comment = comments[mr.seq]
+    except IndexError:
+      self.abort(404, 'comment not found')
+
+    return issue, comment
diff --git a/tracker/issuereindex.py b/tracker/issuereindex.py
new file mode 100644
index 0000000..de5d2f0
--- /dev/null
+++ b/tracker/issuereindex.py
@@ -0,0 +1,87 @@
+# 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
+
+"""Classes that implement an admin utility to re-index issues in bulk."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import urllib
+
+import settings
+from framework import permissions
+from framework import servlet
+from framework import urls
+from services import tracker_fulltext
+
+
+class IssueReindex(servlet.Servlet):
+  """IssueReindex shows a form to request that issues be indexed."""
+
+  _PAGE_TEMPLATE = 'tracker/issue-reindex-page.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_ISSUES
+
+  def AssertBasePermission(self, mr):
+    """Check whether the user has any permission to visit this page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+    """
+    super(IssueReindex, self).AssertBasePermission(mr)
+    if not self.CheckPerm(mr, permissions.EDIT_PROJECT):
+      raise permissions.PermissionException(
+          'You are not allowed to administer this project')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    return {
+        # start and num are already passed to the template.
+        'issue_tab_mode': None,
+        'auto_submit': mr.auto_submit,
+        'page_perms': self.MakePagePerms(mr, None, permissions.CREATE_ISSUE),
+        }
+
+  def ProcessFormData(self, mr, post_data):
+    """Process a posted issue reindex form.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: HTML form data from the request.
+
+    Returns:
+      String URL to redirect the user to after processing. The URL will contain
+      a new start that is auto-incremented using the specified num value.
+    """
+    start = max(0, int(post_data['start']))
+    num = max(0, min(settings.max_artifact_search_results_per_page,
+                     int(post_data['num'])))
+
+    issues = self.services.issue.GetIssuesByLocalIDs(
+        mr.cnxn, mr.project_id, list(range(start, start + num)))
+    logging.info('got %d issues to index', len(issues))
+    if issues:
+      tracker_fulltext.IndexIssues(
+          mr.cnxn, issues, self.services.user, self.services.issue,
+          self.services.config)
+
+    # Make the browser keep submitting the form, if the user wants that,
+    # and we have not run out of issues to process.
+    auto_submit = issues and ('auto_submit' in post_data)
+
+    query_map = {
+      'start': start + num,  # auto-increment start.
+      'num': num,
+      'auto_submit': bool(auto_submit),
+    }
+    return '/p/%s%s?%s' % (mr.project_name, urls.ISSUE_REINDEX,
+                           urllib.urlencode(query_map))
diff --git a/tracker/issuetips.py b/tracker/issuetips.py
new file mode 100644
index 0000000..eb75265
--- /dev/null
+++ b/tracker/issuetips.py
@@ -0,0 +1,29 @@
+# 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
+
+"""A class to render a page of issue tracker search tips."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+
+from framework import servlet
+from framework import permissions
+
+
+class IssueSearchTips(servlet.Servlet):
+  """IssueSearchTips on-line help on how to use issue search."""
+
+  _PAGE_TEMPLATE = 'tracker/issue-search-tips.ezt'
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_ISSUES
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page."""
+
+    return {
+        'issue_tab_mode': 'issueSearchTips',
+        'page_perms': self.MakePagePerms(mr, None, permissions.CREATE_ISSUE),
+    }
diff --git a/tracker/rerank_helpers.py b/tracker/rerank_helpers.py
new file mode 100644
index 0000000..f27582c
--- /dev/null
+++ b/tracker/rerank_helpers.py
@@ -0,0 +1,133 @@
+# 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
+
+"""Functions to help rerank issues in a lit.
+
+This file contains methods that implement a reranking algorithm for
+issues in a list.
+"""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import sys
+
+from framework import exceptions
+
+MAX_RANKING = sys.maxint
+MIN_RANKING = 0
+
+def GetHotlistRerankChanges(hotlist_items, moved_issue_ids, target_position):
+  # type: (int, Sequence[int], int) -> Collection[Tuple[int, int]]
+  """Computes the new ranks from reranking and or inserting of HotlistItems.
+
+  Args:
+    hotlist_items: The current list of HotlistItems in the Hotlist.
+    moved_issue_ids: A list of issue IDs to be moved/inserted together,
+      in the order
+      they should have the reranking.
+    target_position: The index, starting at 0, of the new position the
+      first issue in moved_issue_ids should occupy in the updated ordering.
+      Therefore this value cannot be greater than
+      (len(hotlist.items) - len(moved_issue_ids)).
+
+  Returns:
+    A list of [(issue_id, rank), ...] of HotlistItems that need to be updated.
+
+  Raises:
+    InputException: If the target_position is not valid.
+  """
+  # Sort hotlist items by rank.
+  sorted_hotlist_items = sorted(hotlist_items, key=lambda item: item.rank)
+  unmoved_hotlist_items = [
+      item for item in sorted_hotlist_items
+      if item.issue_id not in moved_issue_ids]
+  if target_position < 0:
+    raise exceptions.InputException(
+        'given `target_position`: %d, must be non-negative')
+  if target_position > len(unmoved_hotlist_items):
+    raise exceptions.InputException(
+        '`target_position` %d is higher than maximum allowed (%d) for'
+        'moving %d items in a hotlist with %d items total.' % (
+            target_position, len(unmoved_hotlist_items),
+            len(moved_issue_ids), len(sorted_hotlist_items)))
+  lower, higher = [], []
+  for i, item in enumerate(unmoved_hotlist_items):
+    item_tuple = (item.issue_id, item.rank)
+    if i < target_position:
+      lower.append(item_tuple)
+    else:
+      higher.append(item_tuple)
+
+  return GetInsertRankings(lower, higher, moved_issue_ids)
+
+def GetInsertRankings(lower, higher, moved_ids):
+  """Compute rankings for moved_ids to insert between the
+  lower and higher rankings
+
+  Args:
+    lower: a list of [(id, rank),...] of blockers that should have
+      a lower rank than the moved issues. Should be sorted from highest
+      to lowest rank.
+    higher: a list of [(id, rank),...] of blockers that should have
+      a higher rank than the moved issues. Should be sorted from highest
+      to lowest rank.
+    moved_ids: a list of global IDs for issues to re-rank.
+
+  Returns:
+    a list of [(id, rank),...] of blockers that need to be updated. rank
+    is the new rank of the issue with the specified id.
+  """
+  if lower:
+    lower_rank = lower[-1][1]
+  else:
+    lower_rank = MIN_RANKING
+
+  if higher:
+    higher_rank = higher[0][1]
+  else:
+    higher_rank = MAX_RANKING
+
+  slot_count = higher_rank - lower_rank - 1
+  if slot_count >= len(moved_ids):
+    new_ranks = _DistributeRanks(lower_rank, higher_rank, len(moved_ids))
+    return list(zip(moved_ids, new_ranks))
+  else:
+    new_lower, new_higher, new_moved_ids = _ResplitRanks(
+        lower, higher, moved_ids)
+    if not new_moved_ids:
+      return None
+    else:
+      return GetInsertRankings(new_lower, new_higher, new_moved_ids)
+
+
+def _DistributeRanks(low, high, rank_count):
+  """Compute evenly distributed ranks in a range"""
+  bucket_size = (high - low) // rank_count
+  first_rank = low + (bucket_size + 1) // 2
+  return list(range(first_rank, high, bucket_size))
+
+
+def _ResplitRanks(lower, higher, moved_ids):
+  if not (lower or higher):
+    return None, None, None
+
+  if not lower:
+    take_from = 'higher'
+  elif not higher:
+    take_from = 'lower'
+  else:
+    next_lower = lower[-2][1] if len(lower) >= 2 else MIN_RANKING
+    next_higher = higher[1][1] if len(higher) >= 2 else MAX_RANKING
+    if (lower[-1][1] - next_lower) > (next_higher - higher[0][1]):
+      take_from = 'lower'
+    else:
+      take_from = 'higher'
+
+  if take_from == 'lower':
+    return (lower[:-1], higher, [lower[-1][0]] + moved_ids)
+  else:
+    return (lower, higher[1:], moved_ids + [higher[0][0]])
diff --git a/tracker/spam.py b/tracker/spam.py
new file mode 100644
index 0000000..a30fc3e
--- /dev/null
+++ b/tracker/spam.py
@@ -0,0 +1,60 @@
+# 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
+
+"""Classes that implement spam flagging features.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import httplib
+import logging
+
+from framework import framework_helpers
+from framework import paginate
+from framework import permissions
+from framework import urls
+from framework import servlet
+from framework import template_helpers
+from framework import xsrf
+from tracker import spam_helpers
+from tracker import tracker_bizobj
+
+
+class ModerationQueue(servlet.Servlet):
+  _PAGE_TEMPLATE = 'tracker/spam-moderation-queue.ezt'
+
+  def GatherPageData(self, mr):
+    if not self.CheckPerm(mr, permissions.MODERATE_SPAM):
+      raise permissions.PermissionException()
+
+    page_perms = self.MakePagePerms(
+        mr, None, permissions.MODERATE_SPAM,
+        permissions.EDIT_ISSUE, permissions.CREATE_ISSUE,
+        permissions.SET_STAR)
+
+    # TODO(seanmccullough): Figure out how to get the IssueFlagQueue either
+    # integrated into this page data, or on its own subtab of spam moderation.
+    # Also figure out the same for Comments.
+    issue_items, total_count = self.services.spam.GetIssueClassifierQueue(
+        mr.cnxn, self.services.issue, mr.project.project_id, mr.start, mr.num)
+
+    issue_queue = spam_helpers.DecorateIssueClassifierQueue(mr.cnxn,
+        self.services.issue, self.services.spam, self.services.user,
+        issue_items)
+
+    url_params = [(name, mr.GetParam(name)) for name in
+                  framework_helpers.RECOGNIZED_PARAMS]
+    p = paginate.ArtifactPagination(
+        [], mr.num, mr.GetPositiveIntParam('start'),
+        mr.project_name, urls.SPAM_MODERATION_QUEUE, total_count=total_count,
+        url_params=url_params)
+
+    return {
+        'issue_queue': issue_queue,
+        'projectname': mr.project.project_name,
+        'pagination': p,
+        'page_perms': page_perms,
+    }
diff --git a/tracker/spam_helpers.py b/tracker/spam_helpers.py
new file mode 100644
index 0000000..2bf2c90
--- /dev/null
+++ b/tracker/spam_helpers.py
@@ -0,0 +1,47 @@
+# 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
+
+"""Set of helpers for constructing spam-related pages.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+from framework import template_helpers
+import ezt
+
+from datetime import datetime
+
+def DecorateIssueClassifierQueue(
+    cnxn, issue_service, spam_service, user_service, moderation_items):
+  issue_ids = [item.issue_id for item in moderation_items]
+  issues = issue_service.GetIssues(cnxn, issue_ids)
+  issue_map = {}
+  for issue in issues:
+    issue_map[issue.issue_id] = issue
+
+  flag_counts = spam_service.LookupIssueFlagCounts(cnxn, issue_ids)
+
+  reporter_ids = [issue.reporter_id for issue in issues]
+  reporters = user_service.GetUsersByIDs(cnxn, reporter_ids)
+  comments = issue_service.GetCommentsForIssues(cnxn, issue_ids)
+
+  items = []
+  for item in moderation_items:
+    issue=issue_map[item.issue_id]
+    first_comment = comments.get(item.issue_id, ["[Empty]"])[0]
+
+    items.append(template_helpers.EZTItem(
+        issue=issue,
+        summary=template_helpers.FitUnsafeText(issue.summary, 80),
+        comment_text=template_helpers.FitUnsafeText(first_comment.content, 80),
+        reporter=reporters[issue.reporter_id],
+        flag_count=flag_counts.get(issue.issue_id, 0),
+        is_spam=ezt.boolean(item.is_spam),
+        verdict_time=item.verdict_time,
+        classifier_confidence=item.classifier_confidence,
+        reason=item.reason,
+    ))
+
+  return items
diff --git a/tracker/tablecell.py b/tracker/tablecell.py
new file mode 100644
index 0000000..afb6468
--- /dev/null
+++ b/tracker/tablecell.py
@@ -0,0 +1,506 @@
+# 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
+
+"""Classes that generate value cells in the issue list table."""
+
+from __future__ import division
+from __future__ import print_function
+from __future__ import absolute_import
+
+import logging
+import time
+import ezt
+
+from framework import framework_constants
+from framework import table_view_helpers
+from framework import template_helpers
+from framework import urls
+from tracker import tracker_bizobj
+from tracker import tracker_helpers
+
+# pylint: disable=unused-argument
+
+
+class TableCellNote(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing a hotlist issue's note."""
+
+  def __init__(self, issue, note=None, **_kw):
+    if note:
+      display_note = [note]
+    else:
+      display_note = []
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_NOTE, display_note)
+
+
+class TableCellDateAdded(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing the date added of an issue."""
+
+  def __init__(self, issue, date_added=None, **_kw):
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ATTR, [date_added])
+
+
+class TableCellAdderID(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing an issue's adder_id."""
+
+  def __init__(self, issue, adder_id=None, users_by_id=None, **_kw):
+    if adder_id:
+      display_name = [users_by_id[adder_id].display_name]
+    else:
+      display_name = [None]
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ATTR,
+        display_name)
+
+
+class TableCellRank(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing issue rank."""
+
+  def __init__(self, issue, issue_rank=None, **_kw):
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ATTR, [issue_rank])
+
+
+class TableCellID(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing issue IDs."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ID, [str(issue.local_id)])
+
+
+class TableCellStatus(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing issue status values."""
+
+  def __init__(self, issue, **_kws):
+    values = []
+    derived_values = []
+    if issue.status:
+      values = [issue.status]
+    if issue.derived_status:
+      derived_values = [issue.derived_status]
+
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ATTR, values,
+        derived_values=derived_values)
+
+
+class TableCellOwner(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing issue owner name."""
+
+  def __init__(self, issue, users_by_id=None, **_kw):
+    values = []
+    derived_values = []
+    if issue.owner_id:
+      values = [users_by_id[issue.owner_id].display_name]
+    if issue.derived_owner_id:
+      derived_values = [users_by_id[issue.derived_owner_id].display_name]
+
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ATTR, values,
+        derived_values=derived_values)
+
+
+class TableCellReporter(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing issue reporter name."""
+
+  def __init__(self, issue, users_by_id=None, **_kw):
+    try:
+      values = [users_by_id[issue.reporter_id].display_name]
+    except KeyError:
+      logging.info('issue reporter %r not found', issue.reporter_id)
+      values = ['deleted?']
+
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ATTR, values)
+
+
+class TableCellCc(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing issue Cc user names."""
+
+  def __init__(self, issue, users_by_id=None, **_kw):
+    values = [users_by_id[cc_id].display_name
+              for cc_id in issue.cc_ids]
+
+    derived_values = [users_by_id[cc_id].display_name
+                      for cc_id in issue.derived_cc_ids]
+
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ATTR, values,
+        derived_values=derived_values)
+
+
+class TableCellAttachments(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing issue attachment count."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ATTR, [issue.attachment_count],
+        align='right')
+
+
+class TableCellOpened(table_view_helpers.TableCellDate):
+  """TableCell subclass specifically for showing issue opened date."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCellDate.__init__(self, issue.opened_timestamp)
+
+
+class TableCellClosed(table_view_helpers.TableCellDate):
+  """TableCell subclass specifically for showing issue closed date."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCellDate.__init__(self, issue.closed_timestamp)
+
+
+class TableCellModified(table_view_helpers.TableCellDate):
+  """TableCell subclass specifically for showing issue modified date."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCellDate.__init__(self, issue.modified_timestamp)
+
+
+class TableCellOwnerModified(table_view_helpers.TableCellDate):
+  """TableCell subclass specifically for showing owner modified age."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCellDate.__init__(
+        self, issue.owner_modified_timestamp, days_only=True)
+
+
+class TableCellStatusModified(table_view_helpers.TableCellDate):
+  """TableCell subclass specifically for showing status modified age."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCellDate.__init__(
+        self, issue.status_modified_timestamp, days_only=True)
+
+
+class TableCellComponentModified(table_view_helpers.TableCellDate):
+  """TableCell subclass specifically for showing component modified age."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCellDate.__init__(
+        self, issue.component_modified_timestamp, days_only=True)
+
+
+class TableCellOwnerLastVisit(table_view_helpers.TableCellDate):
+  """TableCell subclass specifically for showing owner last visit days ago."""
+
+  def __init__(self, issue, users_by_id=None, **_kw):
+    owner_view = users_by_id.get(issue.owner_id or issue.derived_owner_id)
+    last_visit = None
+    if owner_view:
+      last_visit = owner_view.user.last_visit_timestamp
+    table_view_helpers.TableCellDate.__init__(
+        self, last_visit, days_only=True)
+
+def _make_issue_view(default_pn, config, viewable_iids_set, ref_issue):
+  viewable = ref_issue.issue_id in viewable_iids_set
+  return template_helpers.EZTItem(
+      id=tracker_bizobj.FormatIssueRef(
+          (ref_issue.project_name, ref_issue.local_id),
+          default_project_name=default_pn),
+      href=tracker_helpers.FormatRelativeIssueURL(
+          ref_issue.project_name, urls.ISSUE_DETAIL, id=ref_issue.local_id),
+      closed=ezt.boolean(
+          viewable and
+          not tracker_helpers.MeansOpenInProject(ref_issue.status, config)),
+      title=ref_issue.summary if viewable else "")
+
+
+class TableCellBlockedOn(table_view_helpers.TableCell):
+  """TableCell subclass for listing issues the current issue is blocked on."""
+
+  def __init__(self, issue, related_issues=None, **_kw):
+    ref_issues = [related_issues[iid] for iid in issue.blocked_on_iids
+                  if iid in related_issues]
+    values = [_make_issue_view(issue.project_name, _kw["config"],
+                                _kw["viewable_iids_set"], ref_issue)
+              for ref_issue in ref_issues]
+    values.sort(key=lambda x: (x.closed, x.id))
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ISSUES, values, sort_values=False)
+
+
+class TableCellBlocking(table_view_helpers.TableCell):
+  """TableCell subclass for listing issues the current issue is blocking."""
+
+  def __init__(self, issue, related_issues=None, **_kw):
+    ref_issues = [related_issues[iid] for iid in issue.blocking_iids
+                  if iid in related_issues]
+    values = [_make_issue_view(issue.project_name, _kw["config"],
+                                _kw["viewable_iids_set"], ref_issue)
+              for ref_issue in ref_issues]
+    values.sort(key=lambda x: (x.closed, x.id))
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ISSUES, values, sort_values=False)
+
+
+class TableCellBlocked(table_view_helpers.TableCell):
+  """TableCell subclass for showing whether an issue is blocked."""
+
+  def __init__(self, issue, **_kw):
+    if issue.blocked_on_iids:
+      value = 'Yes'
+    else:
+      value = 'No'
+
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ATTR, [value])
+
+
+class TableCellMergedInto(table_view_helpers.TableCell):
+  """TableCell subclass for showing whether an issue is blocked."""
+
+  def __init__(self, issue, related_issues=None, **_kw):
+    if issue.merged_into:
+      ref_issue = related_issues[issue.merged_into]
+      values = [_make_issue_view(issue.project_name, _kw["config"],
+                                  _kw["viewable_iids_set"], ref_issue)]
+    else:   # Note: None means not merged into any issue.
+      values = []
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ISSUES, values)
+
+
+class TableCellComponent(table_view_helpers.TableCell):
+  """TableCell subclass for showing components."""
+
+  def __init__(self, issue, config=None, **_kw):
+    explicit_paths = []
+    for component_id in issue.component_ids:
+      cd = tracker_bizobj.FindComponentDefByID(component_id, config)
+      if cd:
+        explicit_paths.append(cd.path)
+
+    derived_paths = []
+    for component_id in issue.derived_component_ids:
+      cd = tracker_bizobj.FindComponentDefByID(component_id, config)
+      if cd:
+        derived_paths.append(cd.path)
+
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ATTR, explicit_paths,
+        derived_values=derived_paths)
+
+
+class TableCellAllLabels(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing all labels on an issue."""
+
+  def __init__(self, issue, **_kw):
+    values = []
+    derived_values = []
+    if issue.labels:
+      values = issue.labels[:]
+    if issue.derived_labels:
+      derived_values = issue.derived_labels[:]
+
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_ATTR, values,
+        derived_values=derived_values)
+
+
+# This maps column names to factories/constructors that make table cells.
+# Subclasses can override this mapping, so any additions to this mapping
+# should also be added to subclasses.
+CELL_FACTORIES = {
+    'id': TableCellID,
+    'project': table_view_helpers.TableCellProject,
+    'component': TableCellComponent,
+    'summary': table_view_helpers.TableCellSummary,
+    'status': TableCellStatus,
+    'owner': TableCellOwner,
+    'reporter': TableCellReporter,
+    'cc': TableCellCc,
+    'stars': table_view_helpers.TableCellStars,
+    'attachments': TableCellAttachments,
+    'opened': TableCellOpened,
+    'closed': TableCellClosed,
+    'modified': TableCellModified,
+    'blockedon': TableCellBlockedOn,
+    'blocking': TableCellBlocking,
+    'blocked': TableCellBlocked,
+    'mergedinto': TableCellMergedInto,
+    'ownermodified': TableCellOwnerModified,
+    'statusmodified': TableCellStatusModified,
+    'componentmodified': TableCellComponentModified,
+    'ownerlastvisit': TableCellOwnerLastVisit,
+    'rank': TableCellRank,
+    'added': TableCellDateAdded,
+    'adder': TableCellAdderID,
+    'note': TableCellNote,
+    'alllabels': TableCellAllLabels,
+    }
+
+
+# Time format that spreadsheets seem to understand.
+# E.g.: "May 19 2008 13:30:23".  Tested with MS Excel 2003,
+# OpenOffice.org, NeoOffice, and Google Spreadsheets.
+CSV_DATE_TIME_FMT = '%b %d, %Y %H:%M:%S'
+
+
+def TimeStringForCSV(timestamp):
+  """Return a timestamp in a format that spreadsheets understand."""
+  return time.strftime(CSV_DATE_TIME_FMT, time.gmtime(timestamp))
+
+
+class TableCellOpenedCSV(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing issue opened date."""
+
+  def __init__(self, issue, **_kw):
+    date_str = TimeStringForCSV(issue.opened_timestamp)
+
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_UNFILTERABLE, [date_str])
+
+
+class TableCellOpenedTimestamp(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing issue opened timestamp."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_UNFILTERABLE,
+        [issue.opened_timestamp])
+
+
+class TableCellModifiedCSV(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing issue modified date."""
+
+  def __init__(self, issue, **_kw):
+    values = []
+    if issue.modified_timestamp:
+      values = [TimeStringForCSV(issue.modified_timestamp)]
+
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_UNFILTERABLE, values)
+
+
+class TableCellModifiedTimestamp(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing issue modified timestamp."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_UNFILTERABLE,
+        [issue.modified_timestamp])
+
+
+class TableCellClosedCSV(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing issue closed date."""
+
+  def __init__(self, issue, **_kw):
+    values = []
+    if issue.closed_timestamp:
+      values = [TimeStringForCSV(issue.closed_timestamp)]
+
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_UNFILTERABLE, values)
+
+
+class TableCellClosedTimestamp(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing issue closed timestamp."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_UNFILTERABLE,
+        [issue.closed_timestamp])
+
+
+class TableCellOwnerModifiedCSV(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing owner modified date."""
+
+  def __init__(self, issue, **_kw):
+    values = []
+    if issue.modified_timestamp:
+      values = [TimeStringForCSV(issue.owner_modified_timestamp)]
+
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_UNFILTERABLE, values)
+
+
+class TableCellOwnerModifiedTimestamp(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing owner modified timestamp."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_UNFILTERABLE,
+        [issue.owner_modified_timestamp])
+
+
+class TableCellStatusModifiedCSV(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing status modified date."""
+
+  def __init__(self, issue, **_kw):
+    values = []
+    if issue.modified_timestamp:
+      values = [TimeStringForCSV(issue.status_modified_timestamp)]
+
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_UNFILTERABLE, values)
+
+
+class TableCellStatusModifiedTimestamp(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing status modified timestamp."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_UNFILTERABLE,
+        [issue.status_modified_timestamp])
+
+
+class TableCellComponentModifiedCSV(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing component modified date."""
+
+  def __init__(self, issue, **_kw):
+    values = []
+    if issue.modified_timestamp:
+      values = [TimeStringForCSV(issue.component_modified_timestamp)]
+
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_UNFILTERABLE, values)
+
+
+class TableCellComponentModifiedTimestamp(table_view_helpers.TableCell):
+  """TableCell subclass for showing component modified timestamp."""
+
+  def __init__(self, issue, **_kw):
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_UNFILTERABLE,
+        [issue.component_modified_timestamp])
+
+
+class TableCellOwnerLastVisitDaysAgo(table_view_helpers.TableCell):
+  """TableCell subclass specifically for showing owner last visit days ago."""
+
+  def __init__(self, issue, users_by_id=None, **_kw):
+    owner_view = users_by_id.get(issue.owner_id or issue.derived_owner_id)
+    last_visit_days_ago = None
+    if owner_view and owner_view.user.last_visit_timestamp:
+      secs_ago = int(time.time()) - owner_view.user.last_visit_timestamp
+      last_visit_days_ago = secs_ago // framework_constants.SECS_PER_DAY
+    table_view_helpers.TableCell.__init__(
+        self, table_view_helpers.CELL_TYPE_UNFILTERABLE, [last_visit_days_ago])
+
+
+# Maps column names to factories/constructors that make table cells.
+# Uses the defaults in issuelist.py but changes the factory for the
+# summary cell to properly escape the data for CSV files.
+CSV_CELL_FACTORIES = CELL_FACTORIES.copy()
+CSV_CELL_FACTORIES.update({
+    'opened': TableCellOpenedCSV,
+    'openedtimestamp': TableCellOpenedTimestamp,
+    'closed': TableCellClosedCSV,
+    'closedtimestamp': TableCellClosedTimestamp,
+    'modified': TableCellModifiedCSV,
+    'modifiedtimestamp': TableCellModifiedTimestamp,
+    'ownermodified': TableCellOwnerModifiedCSV,
+    'ownermodifiedtimestamp': TableCellOwnerModifiedTimestamp,
+    'statusmodified': TableCellStatusModifiedCSV,
+    'statusmodifiedtimestamp': TableCellStatusModifiedTimestamp,
+    'componentmodified': TableCellComponentModifiedCSV,
+    'componentmodifiedtimestamp': TableCellComponentModifiedTimestamp,
+    'ownerlastvisitdaysago': TableCellOwnerLastVisitDaysAgo,
+    })
diff --git a/tracker/template_helpers.py b/tracker/template_helpers.py
new file mode 100644
index 0000000..c567b4a
--- /dev/null
+++ b/tracker/template_helpers.py
@@ -0,0 +1,261 @@
+# Copyright 2018 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
+
+"""Helper functions for issue template servlets"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+
+from framework import authdata
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_helpers
+from tracker import field_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+from proto import tracker_pb2
+
+MAX_NUM_PHASES = 6
+
+PHASE_INPUTS = [
+    'phase_0', 'phase_1', 'phase_2', 'phase_3', 'phase_4', 'phase_5']
+
+_NO_PHASE_VALUE = 'no_phase'
+
+ParsedTemplate = collections.namedtuple(
+    'ParsedTemplate', 'name, members_only, summary, summary_must_be_edited, '
+    'content, status, owner_str, labels, field_val_strs, component_paths, '
+    'component_required, owner_defaults_to_member, admin_str, add_approvals, '
+    'phase_names, approvals_to_phase_idx, required_approval_ids')
+
+
+def ParseTemplateRequest(post_data, config):
+  """Parse an issue template."""
+
+  name = post_data.get('name', '')
+  members_only = (post_data.get('members_only') == 'on')
+  summary = post_data.get('summary', '')
+  summary_must_be_edited = (
+      post_data.get('summary_must_be_edited') == 'on')
+  content = post_data.get('content', '')
+  content = framework_helpers.WordWrapSuperLongLines(content, max_cols=75)
+  status = post_data.get('status', '')
+  owner_str = post_data.get('owner', '')
+  labels = post_data.getall('label')
+  field_val_strs = collections.defaultdict(list)
+  for fd in config.field_defs:
+    field_value_key = 'custom_%d' % fd.field_id
+    if post_data.get(field_value_key):
+      field_val_strs[fd.field_id].append(post_data[field_value_key])
+
+  component_paths = []
+  if post_data.get('components'):
+    for component_path in post_data.get('components').split(','):
+      if component_path.strip() not in component_paths:
+        component_paths.append(component_path.strip())
+  component_required = post_data.get('component_required') == 'on'
+
+  owner_defaults_to_member = post_data.get('owner_defaults_to_member') == 'on'
+
+  admin_str = post_data.get('admin_names', '')
+
+  add_approvals = post_data.get('add_approvals') == 'on'
+  phase_names = [post_data.get(phase_input, '') for phase_input in PHASE_INPUTS]
+
+  required_approval_ids = []
+  approvals_to_phase_idx = {}
+
+  for approval_def in config.approval_defs:
+    phase_num = post_data.get('approval_%d' % approval_def.approval_id, '')
+    if phase_num == _NO_PHASE_VALUE:
+      approvals_to_phase_idx[approval_def.approval_id] = None
+    else:
+      try:
+        idx = PHASE_INPUTS.index(phase_num)
+        approvals_to_phase_idx[approval_def.approval_id] = idx
+      except ValueError:
+        logging.info('approval %d was omitted' % approval_def.approval_id)
+    required_name = 'approval_%d_required' % approval_def.approval_id
+    if (post_data.get(required_name) == 'on'):
+      required_approval_ids.append(approval_def.approval_id)
+
+  return ParsedTemplate(
+      name, members_only, summary, summary_must_be_edited, content, status,
+      owner_str, labels, field_val_strs, component_paths, component_required,
+      owner_defaults_to_member, admin_str, add_approvals, phase_names,
+      approvals_to_phase_idx, required_approval_ids)
+
+
+def GetTemplateInfoFromParsed(mr, services, parsed, config):
+  """Get Template field info and PBs from a ParsedTemplate."""
+
+  admin_ids, _ = tracker_helpers.ParsePostDataUsers(
+      mr.cnxn, parsed.admin_str, services.user)
+
+  owner_id = 0
+  if parsed.owner_str:
+    try:
+      user_id = services.user.LookupUserID(mr.cnxn, parsed.owner_str)
+      auth = authdata.AuthData.FromUserID(mr.cnxn, user_id, services)
+      if framework_bizobj.UserIsInProject(mr.project, auth.effective_ids):
+        owner_id = user_id
+      else:
+        mr.errors.owner = 'User is not a member of this project.'
+    except exceptions.NoSuchUserException:
+      mr.errors.owner = 'Owner not found.'
+
+  component_ids = tracker_helpers.LookupComponentIDs(
+      parsed.component_paths, config, mr.errors)
+
+  # TODO(jojwang): monorail:4678 Process phase field values.
+  phase_field_val_strs = {}
+  field_values = field_helpers.ParseFieldValues(
+      mr.cnxn, services.user, parsed.field_val_strs,
+      phase_field_val_strs, config)
+  for fv in field_values:
+    logging.info('field_value is %r: %r',
+                 fv.field_id, tracker_bizobj.GetFieldValue(fv, {}))
+
+  phases = []
+  approvals = []
+  if parsed.add_approvals:
+    phases, approvals = _GetPhasesAndApprovalsFromParsed(
+        mr, parsed.phase_names, parsed.approvals_to_phase_idx,
+        parsed.required_approval_ids)
+
+  return admin_ids, owner_id, component_ids, field_values, phases, approvals
+
+
+def _GetPhasesAndApprovalsFromParsed(
+    mr, phase_names, approvals_to_phase_idx, required_approval_ids):
+  """Get Phase PBs from a parsed phase_names and approvals_by_phase_idx."""
+
+  phases = []
+  approvals = []
+  valid_phase_names = []
+
+  for name in phase_names:
+    if name:
+      if not tracker_constants.PHASE_NAME_RE.match(name):
+        mr.errors.phase_approvals = 'Invalid gate name(s).'
+        return phases, approvals
+      valid_phase_names.append(name)
+  if len(valid_phase_names) != len(
+      set(name.lower() for name in valid_phase_names)):
+    mr.errors.phase_approvals = 'Duplicate gate names.'
+    return phases, approvals
+  valid_phase_idxs = [idx for idx, name in enumerate(phase_names) if name]
+  if set(valid_phase_idxs) != set([
+      idx for idx in approvals_to_phase_idx.values() if idx is not None]):
+    mr.errors.phase_approvals = 'Defined gates must have assigned approvals.'
+    return phases, approvals
+
+  # Distributing the ranks over a wider range is not necessary since
+  # any edits to template phases will cause a complete rewrite.
+  # phase_id is temporarily the idx for keeping track of which approvals
+  # belong to which phases.
+  for idx, phase_name in enumerate(phase_names):
+    if phase_name:
+      phase = tracker_pb2.Phase(name=phase_name, rank=idx, phase_id=idx)
+      phases.append(phase)
+
+  for approval_id, phase_idx in approvals_to_phase_idx.items():
+    av = tracker_pb2.ApprovalValue(
+        approval_id=approval_id, phase_id=phase_idx)
+    if approval_id in required_approval_ids:
+      av.status = tracker_pb2.ApprovalStatus.NEEDS_REVIEW
+    approvals.append(av)
+
+  return phases, approvals
+
+
+def FilterApprovalsAndPhases(approval_values, phases, config):
+  """Return lists without deleted approvals and empty phases."""
+  deleted_approval_ids = [fd.field_id for fd in config.field_defs if
+                          fd.is_deleted and
+                          fd.field_type is tracker_pb2.FieldTypes.APPROVAL_TYPE]
+  filtered_avs = [av for av in approval_values if
+                     av.approval_id not in deleted_approval_ids]
+
+  av_phase_ids = list(set([av.phase_id for av in filtered_avs]))
+  filtered_phases = [phase for phase in phases if
+                     phase.phase_id in av_phase_ids]
+  return filtered_avs, filtered_phases
+
+
+def GatherApprovalsPageData(approval_values, tmpl_phases, config):
+  """Create the page data necessary for filling in the launch-gates-table."""
+  filtered_avs, filtered_phases = FilterApprovalsAndPhases(
+      approval_values, tmpl_phases, config)
+  filtered_phases.sort(key=lambda phase: phase.rank)
+
+  required_approval_ids = []
+  prechecked_approvals = []
+
+  phase_idx_by_id = {
+        phase.phase_id:idx for idx, phase in enumerate(filtered_phases)}
+  for av in filtered_avs:
+    # approval is part of a phase and that phase can be found.
+    if phase_idx_by_id.get(av.phase_id) is not None:
+      idx = phase_idx_by_id.get(av.phase_id)
+      prechecked_approvals.append(
+          '%d_phase_%d' % (av.approval_id, idx))
+    else:
+      prechecked_approvals.append('%d' % av.approval_id)
+    if av.status is tracker_pb2.ApprovalStatus.NEEDS_REVIEW:
+      required_approval_ids.append(av.approval_id)
+
+  num_phases = len(filtered_phases)
+  filtered_phases.extend([tracker_pb2.Phase()] * (
+      MAX_NUM_PHASES - num_phases))
+  return prechecked_approvals, required_approval_ids, filtered_phases
+
+
+def GetCheckedApprovalsFromParsed(approvals_to_phase_idx):
+  checked_approvals = []
+  for approval_id, phs_idx in approvals_to_phase_idx.items():
+    if phs_idx is not None:
+      checked_approvals.append('%d_phase_%d' % (approval_id, phs_idx))
+    else:
+      checked_approvals.append('%d' % approval_id)
+  return checked_approvals
+
+
+def GetIssueFromTemplate(template, project_id, reporter_id):
+  # type: (proto.tracker_pb2.TemplateDef, int, int) ->
+  #     proto.tracker_pb2.Issue
+  """Build a templated issue from TemplateDef.
+
+  Args:
+    template: Template that issue creation is based on.
+    project_id: ID of the Project the template belongs to.
+    reporter_id: Requesting user's ID.
+
+  Returns:
+    protorpc Issue filled with data from given `template`.
+  """
+  owner_id = None
+  if template.owner_id:
+    owner_id = template.owner_id
+  elif template.owner_defaults_to_member:
+    owner_id = reporter_id
+
+  issue = tracker_pb2.Issue(
+      project_id=project_id,
+      summary=template.summary,
+      status=template.status,
+      owner_id=owner_id,
+      labels=template.labels,
+      component_ids=template.component_ids,
+      reporter_id=reporter_id,
+      field_values=template.field_values,
+      phases=template.phases,
+      approval_values=template.approval_values)
+
+  return issue
diff --git a/tracker/templatecreate.py b/tracker/templatecreate.py
new file mode 100644
index 0000000..e10a25b
--- /dev/null
+++ b/tracker/templatecreate.py
@@ -0,0 +1,193 @@
+# Copyright 2018 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
+
+"""A servlet for project owners to create a new template"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+import time
+
+import ezt
+
+from framework import authdata
+from framework import framework_bizobj
+from framework import framework_helpers
+from framework import servlet
+from framework import urls
+from framework import permissions
+from tracker import field_helpers
+from tracker import template_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_helpers
+from tracker import tracker_views
+from services import user_svc
+from proto import tracker_pb2
+
+
+class TemplateCreate(servlet.Servlet):
+  """Servlet allowing project owners to create an issue template."""
+
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_PROCESS
+  _PAGE_TEMPLATE = 'tracker/template-detail-page.ezt'
+  _PROCESS_SUBTAB = servlet.Servlet.PROCESS_TAB_TEMPLATES
+
+  def AssertBasePermission(self, mr):
+    """Check whether the user has any permission to visit this page.
+
+    Args:
+      mr: commonly used info parsed from the request
+    """
+    super(TemplateCreate, self).AssertBasePermission(mr)
+    if not self.CheckPerm(mr, permissions.EDIT_PROJECT):
+      raise permissions.PermissionException(
+          'User is not allowed to administer this project')
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    field_views = tracker_views.MakeAllFieldValueViews(
+        config, [], [], [], {})
+    approval_subfields_present = any(
+        fv.field_def.is_approval_subfield for fv in field_views)
+
+    initial_phases = [tracker_pb2.Phase()] * template_helpers.MAX_NUM_PHASES
+    return {
+        'admin_tab_mode':
+            self._PROCESS_SUBTAB,
+        'allow_edit':
+            ezt.boolean(True),
+        'uneditable_fields':
+            ezt.boolean(False),
+        'new_template_form':
+            ezt.boolean(True),
+        'initial_members_only':
+            ezt.boolean(False),
+        'template_name':
+            '',
+        'initial_content':
+            '',
+        'initial_must_edit_summary':
+            ezt.boolean(False),
+        'initial_summary':
+            '',
+        'initial_status':
+            '',
+        'initial_owner':
+            '',
+        'initial_owner_defaults_to_member':
+            ezt.boolean(False),
+        'initial_components':
+            '',
+        'initial_component_required':
+            ezt.boolean(False),
+        'initial_admins':
+            '',
+        'fields':
+            [
+                view for view in field_views
+                if view.field_def.type_name is not "APPROVAL_TYPE"
+            ],
+        'initial_add_approvals':
+            ezt.boolean(False),
+        'initial_phases':
+            initial_phases,
+        'approvals':
+            [
+                view for view in field_views
+                if view.field_def.type_name is "APPROVAL_TYPE"
+            ],
+        'prechecked_approvals': [],
+        'required_approval_ids': [],
+        'approval_subfields_present':
+            ezt.boolean(approval_subfields_present),
+        # We do not support setting phase field values during template creation.
+        'phase_fields_present':
+            ezt.boolean(False),
+    }
+
+  def ProcessFormData(self, mr, post_data):
+    """Validate and store the contents of the issues tracker admin page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: HTML form data from the request.
+
+    Returns:
+      String URL to redirect the user to, or None if response was already sent.
+    """
+
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    parsed = template_helpers.ParseTemplateRequest(post_data, config)
+    field_helpers.ShiftEnumFieldsIntoLabels(
+        parsed.labels, [], parsed.field_val_strs, [], config)
+
+    if not parsed.name:
+      mr.errors.name = 'Please provide a template name'
+    if self.services.template.GetTemplateByName(mr.cnxn, parsed.name,
+                                                mr.project_id):
+      mr.errors.name = 'Template with name %s already exists' % parsed.name
+
+    (admin_ids, owner_id, component_ids,
+     field_values, phases,
+     approvals) = template_helpers.GetTemplateInfoFromParsed(
+         mr, self.services, parsed, config)
+
+    labels = [label for label in parsed.labels if label]
+    field_helpers.AssertCustomFieldsEditPerms(
+        mr, config, field_values, [], [], labels, [])
+
+    if mr.errors.AnyErrors():
+      field_views = tracker_views.MakeAllFieldValueViews(
+          config, [], [], field_values, {})
+      prechecked_approvals = template_helpers.GetCheckedApprovalsFromParsed(
+          parsed.approvals_to_phase_idx)
+
+      self.PleaseCorrect(
+          mr,
+          initial_members_only=ezt.boolean(parsed.members_only),
+          template_name=parsed.name,
+          initial_content=parsed.summary,
+          initial_must_edit_summary=ezt.boolean(parsed.summary_must_be_edited),
+          initial_description=parsed.content,
+          initial_status=parsed.status,
+          initial_owner=parsed.owner_str,
+          initial_owner_defaults_to_member=ezt.boolean(
+              parsed.owner_defaults_to_member),
+          initial_components=', '.join(parsed.component_paths),
+          initial_component_required=ezt.boolean(parsed.component_required),
+          initial_admins=parsed.admin_str,
+          labels=parsed.labels,
+          fields=[view for view in field_views
+                  if view.field_def.type_name is not 'APPROVAL_TYPE'],
+          initial_add_approvals=ezt.boolean(parsed.add_approvals),
+          initial_phases=[tracker_pb2.Phase(name=name) for name in
+                          parsed.phase_names],
+          approvals=[view for view in field_views
+                     if view.field_def.type_name is 'APPROVAL_TYPE'],
+          prechecked_approvals=prechecked_approvals,
+          required_approval_ids=parsed.required_approval_ids
+      )
+      return
+
+    self.services.template.CreateIssueTemplateDef(
+        mr.cnxn, mr.project_id, parsed.name, parsed.content, parsed.summary,
+        parsed.summary_must_be_edited, parsed.status, parsed.members_only,
+        parsed.owner_defaults_to_member, parsed.component_required,
+        owner_id, labels, component_ids, admin_ids, field_values, phases=phases,
+        approval_values=approvals)
+
+    return framework_helpers.FormatAbsoluteURL(
+        mr, urls.ADMIN_TEMPLATES, saved=1, ts=int(time.time()))
diff --git a/tracker/templatedetail.py b/tracker/templatedetail.py
new file mode 100644
index 0000000..cd48a80
--- /dev/null
+++ b/tracker/templatedetail.py
@@ -0,0 +1,245 @@
+# Copyright 2018 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
+
+"""A servlet for project owners to edit/delete a template"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+import time
+
+import ezt
+
+from framework import authdata
+from framework import framework_bizobj
+from framework import framework_helpers
+from framework import framework_views
+from framework import servlet
+from framework import urls
+from framework import permissions
+from tracker import field_helpers
+from tracker import template_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_helpers
+from tracker import tracker_views
+from proto import tracker_pb2
+from services import user_svc
+
+
+class TemplateDetail(servlet.Servlet):
+  """Servlet allowing project owners to edit/delete an issue template"""
+
+  _MAIN_TAB_MODE = servlet.Servlet.MAIN_TAB_PROCESS
+  _PAGE_TEMPLATE = 'tracker/template-detail-page.ezt'
+  _PROCESS_SUBTAB = servlet.Servlet.PROCESS_TAB_TEMPLATES
+
+  def AssertBasePermission(self, mr):
+    """Check whether the user has any permission to visit this page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+    """
+    super(TemplateDetail, self).AssertBasePermission(mr)
+    template = self.services.template.GetTemplateByName(mr.cnxn,
+        mr.template_name, mr.project_id)
+
+    if template:
+      allow_view = permissions.CanViewTemplate(
+          mr.auth.effective_ids, mr.perms, mr.project, template)
+      if not allow_view:
+        raise permissions.PermissionException(
+            'User is not allowed to view this issue template')
+    else:
+      self.abort(404, 'issue template not found %s' % mr.template_name)
+
+  def GatherPageData(self, mr):
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    template = self.services.template.GetTemplateByName(mr.cnxn,
+        mr.template_name, mr.project_id)
+    template_view = tracker_views.IssueTemplateView(
+        mr, template, self.services.user, config)
+    with mr.profiler.Phase('making user views'):
+      users_involved = tracker_bizobj.UsersInvolvedInTemplate(template)
+      users_by_id = framework_views.MakeAllUserViews(
+          mr.cnxn, self.services.user, users_involved)
+      framework_views.RevealAllEmailsToMembers(
+          mr.cnxn, self.services, mr.auth, users_by_id, mr.project)
+    field_name_set = {fd.field_name.lower() for fd in config.field_defs
+                      if fd.field_type is tracker_pb2.FieldTypes.ENUM_TYPE and
+                      not fd.is_deleted}
+    non_masked_labels = tracker_bizobj.NonMaskedLabels(
+        template.labels, field_name_set)
+
+    field_views = tracker_views.MakeAllFieldValueViews(
+        config, template.labels, [], template.field_values, users_by_id,
+        phases=template.phases)
+    uneditable_fields = ezt.boolean(False)
+    for fv in field_views:
+      if permissions.CanEditValueForFieldDef(
+          mr.auth.effective_ids, mr.perms, mr.project, fv.field_def.field_def):
+        fv.is_editable = ezt.boolean(True)
+      else:
+        fv.is_editable = ezt.boolean(False)
+        uneditable_fields = ezt.boolean(True)
+
+    (prechecked_approvals, required_approval_ids,
+     initial_phases) = template_helpers.GatherApprovalsPageData(
+         template.approval_values, template.phases, config)
+
+    allow_edit = permissions.CanEditTemplate(
+        mr.auth.effective_ids, mr.perms, mr.project, template)
+
+    return {
+        'admin_tab_mode':
+            self._PROCESS_SUBTAB,
+        'allow_edit':
+            ezt.boolean(allow_edit),
+        'uneditable_fields':
+            uneditable_fields,
+        'new_template_form':
+            ezt.boolean(False),
+        'initial_members_only':
+            template_view.members_only,
+        'template_name':
+            template_view.name,
+        'initial_summary':
+            template_view.summary,
+        'initial_must_edit_summary':
+            template_view.summary_must_be_edited,
+        'initial_content':
+            template_view.content,
+        'initial_status':
+            template_view.status,
+        'initial_owner':
+            template_view.ownername,
+        'initial_owner_defaults_to_member':
+            template_view.owner_defaults_to_member,
+        'initial_components':
+            template_view.components,
+        'initial_component_required':
+            template_view.component_required,
+        'fields':
+            [
+                view for view in field_views
+                if view.field_def.type_name is not 'APPROVAL_TYPE'
+            ],
+        'initial_add_approvals':
+            ezt.boolean(prechecked_approvals),
+        'initial_phases':
+            initial_phases,
+        'approvals':
+            [
+                view for view in field_views
+                if view.field_def.type_name is 'APPROVAL_TYPE'
+            ],
+        'prechecked_approvals':
+            prechecked_approvals,
+        'required_approval_ids':
+            required_approval_ids,
+        'labels':
+            non_masked_labels,
+        'initial_admins':
+            template_view.admin_names,
+    }
+
+  def ProcessFormData(self, mr, post_data):
+    """Validate and store the contents of the issues tracker admin page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+      post_data: HTML form data from the request.
+
+    Returns:
+      String URL to redirect the user to, or None if response was already sent.
+    """
+
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    parsed = template_helpers.ParseTemplateRequest(post_data, config)
+    field_helpers.ShiftEnumFieldsIntoLabels(
+        parsed.labels, [], parsed.field_val_strs, [], config)
+    template = self.services.template.GetTemplateByName(mr.cnxn,
+        parsed.name, mr.project_id)
+    allow_edit = permissions.CanEditTemplate(
+        mr.auth.effective_ids, mr.perms, mr.project, template)
+    if not allow_edit:
+      raise permissions.PermissionException(
+          'User is not allowed edit this issue template.')
+
+    if 'deletetemplate' in post_data:
+      self.services.template.DeleteIssueTemplateDef(
+          mr.cnxn, mr.project_id, template.template_id)
+      return framework_helpers.FormatAbsoluteURL(
+          mr, urls.ADMIN_TEMPLATES, deleted=1, ts=int(time.time()))
+
+    (admin_ids, owner_id, component_ids,
+     field_values, phases,
+     approvals) = template_helpers.GetTemplateInfoFromParsed(
+         mr, self.services, parsed, config)
+
+    labels = [label for label in parsed.labels if label]
+    field_helpers.AssertCustomFieldsEditPerms(
+        mr, config, field_values, [], [], labels, [])
+    field_helpers.ApplyRestrictedDefaultValues(
+        mr, config, field_values, labels, template.field_values,
+        template.labels)
+
+    if mr.errors.AnyErrors():
+      field_views = tracker_views.MakeAllFieldValueViews(
+          config, [], [], field_values, {})
+
+      prechecked_approvals = template_helpers.GetCheckedApprovalsFromParsed(
+          parsed.approvals_to_phase_idx)
+
+      self.PleaseCorrect(
+          mr,
+          initial_members_only=ezt.boolean(parsed.members_only),
+          template_name=parsed.name,
+          initial_summary=parsed.summary,
+          initial_must_edit_summary=ezt.boolean(parsed.summary_must_be_edited),
+          initial_content=parsed.content,
+          initial_status=parsed.status,
+          initial_owner=parsed.owner_str,
+          initial_owner_defaults_to_member=ezt.boolean(
+              parsed.owner_defaults_to_member),
+          initial_components=', '.join(parsed.component_paths),
+          initial_component_required=ezt.boolean(parsed.component_required),
+          initial_admins=parsed.admin_str,
+          labels=parsed.labels,
+          fields=[view for view in field_views
+                  if view.field_def.type_name is not 'APPROVAL_TYPE'],
+          initial_add_approvals=ezt.boolean(parsed.add_approvals),
+          initial_phases=[tracker_pb2.Phase(name=name) for name in
+                          parsed.phase_names],
+          approvals=[view for view in field_views
+                     if view.field_def.type_name is 'APPROVAL_TYPE'],
+          prechecked_approvals=prechecked_approvals,
+          required_approval_ids=parsed.required_approval_ids
+      )
+      return
+
+    self.services.template.UpdateIssueTemplateDef(
+        mr.cnxn, mr.project_id, template.template_id, name=parsed.name,
+        content=parsed.content, summary=parsed.summary,
+        summary_must_be_edited=parsed.summary_must_be_edited,
+        status=parsed.status, members_only=parsed.members_only,
+        owner_defaults_to_member=parsed.owner_defaults_to_member,
+        component_required=parsed.component_required, owner_id=owner_id,
+        labels=labels, component_ids=component_ids, admin_ids=admin_ids,
+        field_values=field_values, phases=phases, approval_values=approvals)
+
+    return framework_helpers.FormatAbsoluteURL(
+        mr, urls.TEMPLATE_DETAIL, template=template.name,
+        saved=1, ts=int(time.time()))
diff --git a/tracker/test/__init__.py b/tracker/test/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tracker/test/__init__.py
diff --git a/tracker/test/attachment_helpers_test.py b/tracker/test/attachment_helpers_test.py
new file mode 100644
index 0000000..18e0efc
--- /dev/null
+++ b/tracker/test/attachment_helpers_test.py
@@ -0,0 +1,149 @@
+# 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
+
+"""Unittest for the tracker helpers module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+from mock import Mock, patch
+import unittest
+
+from proto import tracker_pb2
+from tracker import attachment_helpers
+
+
+class AttachmentHelpersFunctionsTest(unittest.TestCase):
+
+  def testIsViewableImage(self):
+    self.assertTrue(attachment_helpers.IsViewableImage('image/gif', 123))
+    self.assertTrue(attachment_helpers.IsViewableImage(
+        'image/gif; charset=binary', 123))
+    self.assertTrue(attachment_helpers.IsViewableImage('image/png', 123))
+    self.assertTrue(attachment_helpers.IsViewableImage(
+        'image/png; charset=binary', 123))
+    self.assertTrue(attachment_helpers.IsViewableImage('image/x-png', 123))
+    self.assertTrue(attachment_helpers.IsViewableImage('image/jpeg', 123))
+    self.assertTrue(attachment_helpers.IsViewableImage(
+        'image/jpeg; charset=binary', 123))
+    self.assertTrue(attachment_helpers.IsViewableImage(
+        'image/jpeg', 14 * 1024 * 1024))
+
+    self.assertFalse(attachment_helpers.IsViewableImage('junk/bits', 123))
+    self.assertFalse(attachment_helpers.IsViewableImage(
+        'junk/bits; charset=binary', 123))
+    self.assertFalse(attachment_helpers.IsViewableImage(
+        'image/jpeg', 16 * 1024 * 1024))
+
+  def testIsViewableVideo(self):
+    self.assertTrue(attachment_helpers.IsViewableVideo('video/ogg', 123))
+    self.assertTrue(attachment_helpers.IsViewableVideo(
+        'video/ogg; charset=binary', 123))
+    self.assertTrue(attachment_helpers.IsViewableVideo('video/mp4', 123))
+    self.assertTrue(attachment_helpers.IsViewableVideo(
+        'video/mp4; charset=binary', 123))
+    self.assertTrue(attachment_helpers.IsViewableVideo('video/mpg', 123))
+    self.assertTrue(attachment_helpers.IsViewableVideo(
+        'video/mpg; charset=binary', 123))
+    self.assertTrue(attachment_helpers.IsViewableVideo('video/mpeg', 123))
+    self.assertTrue(attachment_helpers.IsViewableVideo(
+        'video/mpeg; charset=binary', 123))
+    self.assertTrue(attachment_helpers.IsViewableVideo(
+        'video/mpeg', 14 * 1024 * 1024))
+
+    self.assertFalse(attachment_helpers.IsViewableVideo('junk/bits', 123))
+    self.assertFalse(attachment_helpers.IsViewableVideo(
+        'junk/bits; charset=binary', 123))
+    self.assertFalse(attachment_helpers.IsViewableVideo(
+        'video/mp4', 16 * 1024 * 1024))
+
+  def testIsViewableText(self):
+    self.assertTrue(attachment_helpers.IsViewableText('text/plain', 0))
+    self.assertTrue(attachment_helpers.IsViewableText('text/plain', 1000))
+    self.assertTrue(attachment_helpers.IsViewableText('text/html', 1000))
+    self.assertFalse(
+        attachment_helpers.IsViewableText('text/plain', 200 * 1024 * 1024))
+    self.assertFalse(attachment_helpers.IsViewableText('image/jpeg', 200))
+    self.assertFalse(
+        attachment_helpers.IsViewableText('image/jpeg', 200 * 1024 * 1024))
+
+  def testSignAttachmentID(self):
+    pass  # TODO(jrobbins): write tests
+
+  @patch('tracker.attachment_helpers.SignAttachmentID')
+  def testGetDownloadURL(self, mock_SignAttachmentID):
+    """The download URL is always our to attachment servlet."""
+    mock_SignAttachmentID.return_value = 67890
+    self.assertEqual(
+      'attachment?aid=12345&signed_aid=67890',
+      attachment_helpers.GetDownloadURL(12345))
+
+  def testGetViewURL(self):
+    """The view URL may add &inline=1, or use our text attachment servlet."""
+    attach = tracker_pb2.Attachment(
+        attachment_id=1, mimetype='see below', filesize=1000)
+    download_url = 'attachment?aid=1&signed_aid=2'
+
+    # Viewable image.
+    attach.mimetype = 'image/jpeg'
+    self.assertEqual(
+      download_url + '&inline=1',
+      attachment_helpers.GetViewURL(attach, download_url, 'proj'))
+
+    # Viewable video.
+    attach.mimetype = 'video/mpeg'
+    self.assertEqual(
+      download_url + '&inline=1',
+      attachment_helpers.GetViewURL(attach, download_url, 'proj'))
+
+    # Viewable text file.
+    attach.mimetype = 'text/html'
+    self.assertEqual(
+      '/p/proj/issues/attachmentText?aid=1',
+      attachment_helpers.GetViewURL(attach, download_url, 'proj'))
+
+    # Something we don't support.
+    attach.mimetype = 'audio/mp3'
+    self.assertIsNone(
+      attachment_helpers.GetViewURL(attach, download_url, 'proj'))
+
+  def testGetThumbnailURL(self):
+    """The thumbnail URL may add param thumb=1 or not."""
+    attach = tracker_pb2.Attachment(
+        attachment_id=1, mimetype='see below', filesize=1000)
+    download_url = 'attachment?aid=1&signed_aid=2'
+
+    # Viewable image.
+    attach.mimetype = 'image/jpeg'
+    self.assertEqual(
+      download_url + '&inline=1&thumb=1',
+      attachment_helpers.GetThumbnailURL(attach, download_url))
+
+    # Viewable video.
+    attach.mimetype = 'video/mpeg'
+    self.assertIsNone(
+      # Video thumbs are displayed via GetVideoURL rather than this.
+      attachment_helpers.GetThumbnailURL(attach, download_url))
+
+    # Something that we don't thumbnail.
+    attach.mimetype = 'audio/mp3'
+    self.assertIsNone(attachment_helpers.GetThumbnailURL(attach, download_url))
+
+  def testGetVideoURL(self):
+    """The video URL is the same as the view URL for actual videos."""
+    attach = tracker_pb2.Attachment(
+        attachment_id=1, mimetype='see below', filesize=1000)
+    download_url = 'attachment?aid=1&signed_aid=2'
+
+    # Viewable video.
+    attach.mimetype = 'video/mpeg'
+    self.assertEqual(
+      download_url + '&inline=1',
+      attachment_helpers.GetVideoURL(attach, download_url))
+
+    # Anything that is not a video.
+    attach.mimetype = 'audio/mp3'
+    self.assertIsNone(attachment_helpers.GetVideoURL(attach, download_url))
+
diff --git a/tracker/test/component_helpers_test.py b/tracker/test/component_helpers_test.py
new file mode 100644
index 0000000..ee7f56c
--- /dev/null
+++ b/tracker/test/component_helpers_test.py
@@ -0,0 +1,113 @@
+# 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
+
+"""Unit tests for the component_helpers module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from tracker import component_helpers
+from tracker import tracker_bizobj
+
+
+class ComponentHelpersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.cd1 = tracker_bizobj.MakeComponentDef(
+        1, 789, 'FrontEnd', 'doc', False, [], [111], 0, 0)
+    self.cd2 = tracker_bizobj.MakeComponentDef(
+        2, 789, 'FrontEnd>Splash', 'doc', False, [], [222], 0, 0)
+    self.cd3 = tracker_bizobj.MakeComponentDef(
+        3, 789, 'BackEnd', 'doc', True, [], [111, 333], 0, 0)
+    self.config.component_defs = [self.cd1, self.cd2, self.cd3]
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        config=fake.ConfigService())
+    self.services.user.TestAddUser('a@example.com', 111)
+    self.services.user.TestAddUser('b@example.com', 222)
+    self.services.user.TestAddUser('c@example.com', 333)
+    self.mr = fake.MonorailRequest(self.services)
+    self.mr.cnxn = fake.MonorailConnection()
+
+  def testParseComponentRequest_Empty(self):
+    post_data = fake.PostData(admins=[''], cc=[''], labels=[''])
+    parsed = component_helpers.ParseComponentRequest(
+        self.mr, post_data, self.services)
+    self.assertEqual('', parsed.leaf_name)
+    self.assertEqual('', parsed.docstring)
+    self.assertEqual([], parsed.admin_usernames)
+    self.assertEqual([], parsed.cc_usernames)
+    self.assertEqual([], parsed.admin_ids)
+    self.assertEqual([], parsed.cc_ids)
+    self.assertFalse(self.mr.errors.AnyErrors())
+
+  def testParseComponentRequest_Normal(self):
+    post_data = fake.PostData(
+        leaf_name=['FrontEnd'],
+        docstring=['The server-side app that serves pages'],
+        deprecated=[False],
+        admins=['a@example.com'],
+        cc=['b@example.com, c@example.com'],
+        labels=['Hot, Cold'])
+    parsed = component_helpers.ParseComponentRequest(
+        self.mr, post_data, self.services)
+    self.assertEqual('FrontEnd', parsed.leaf_name)
+    self.assertEqual('The server-side app that serves pages', parsed.docstring)
+    self.assertEqual(['a@example.com'], parsed.admin_usernames)
+    self.assertEqual(['b@example.com', 'c@example.com'], parsed.cc_usernames)
+    self.assertEqual(['Hot', 'Cold'], parsed.label_strs)
+    self.assertEqual([111], parsed.admin_ids)
+    self.assertEqual([222, 333], parsed.cc_ids)
+    self.assertEqual([0, 1], parsed.label_ids)
+    self.assertFalse(self.mr.errors.AnyErrors())
+
+  def testParseComponentRequest_InvalidUser(self):
+    post_data = fake.PostData(
+        leaf_name=['FrontEnd'],
+        docstring=['The server-side app that serves pages'],
+        deprecated=[False],
+        admins=['a@example.com, invalid_user'],
+        cc=['b@example.com, c@example.com'],
+        labels=[''])
+    parsed = component_helpers.ParseComponentRequest(
+        self.mr, post_data, self.services)
+    self.assertEqual('FrontEnd', parsed.leaf_name)
+    self.assertEqual('The server-side app that serves pages', parsed.docstring)
+    self.assertEqual(['a@example.com', 'invalid_user'], parsed.admin_usernames)
+    self.assertEqual(['b@example.com', 'c@example.com'], parsed.cc_usernames)
+    self.assertEqual([111], parsed.admin_ids)
+    self.assertEqual([222, 333], parsed.cc_ids)
+    self.assertTrue(self.mr.errors.AnyErrors())
+    self.assertEqual('invalid_user unrecognized', self.mr.errors.member_admins)
+
+  def testGetComponentCcIDs(self):
+    issue = tracker_pb2.Issue()
+    issues_components_cc_ids = component_helpers.GetComponentCcIDs(
+        issue, self.config)
+    self.assertEqual(set(), issues_components_cc_ids)
+
+    issue.component_ids = [1, 2]
+    issues_components_cc_ids = component_helpers.GetComponentCcIDs(
+        issue, self.config)
+    self.assertEqual({111, 222}, issues_components_cc_ids)
+
+  def testGetCcIDsForComponentAndAncestors(self):
+    components_cc_ids = component_helpers.GetCcIDsForComponentAndAncestors(
+        self.config, self.cd1)
+    self.assertEqual({111}, components_cc_ids)
+
+    components_cc_ids = component_helpers.GetCcIDsForComponentAndAncestors(
+        self.config, self.cd2)
+    self.assertEqual({111, 222}, components_cc_ids)
+
+    components_cc_ids = component_helpers.GetCcIDsForComponentAndAncestors(
+        self.config, self.cd3)
+    self.assertEqual({111, 333}, components_cc_ids)
diff --git a/tracker/test/componentcreate_test.py b/tracker/test/componentcreate_test.py
new file mode 100644
index 0000000..1325d9b
--- /dev/null
+++ b/tracker/test/componentcreate_test.py
@@ -0,0 +1,143 @@
+# 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
+
+"""Unit tests for the componentcreate servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import permissions
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import componentcreate
+from tracker import tracker_bizobj
+
+import webapp2
+
+
+class ComponentCreateTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        config=fake.ConfigService(),
+        project=fake.ProjectService())
+    self.servlet = componentcreate.ComponentCreate(
+        'req', 'res', services=self.services)
+    self.project = self.services.project.TestAddProject('proj')
+    self.mr = testing_helpers.MakeMonorailRequest(
+        project=self.project, perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.mr.auth.email = 'b@example.com'
+    self.config = self.services.config.GetProjectConfig(
+        'fake cnxn', self.project.project_id)
+    self.services.config.StoreConfig('fake cnxn', self.config)
+    self.cd = tracker_bizobj.MakeComponentDef(
+        1, self.project.project_id, 'BackEnd', 'doc', False, [], [111], 0,
+        122)
+    self.config.component_defs = [self.cd]
+    self.services.user.TestAddUser('a@example.com', 111)
+    self.services.user.TestAddUser('b@example.com', 122)
+
+  def testAssertBasePermission(self):
+    # Anon users can never do it
+    self.mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+
+    # Project owner can do it.
+    self.mr.perms = permissions.OWNER_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+
+    # Project member cannot do it
+    self.mr.perms = permissions.COMMITTER_ACTIVE_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+    self.mr.perms = permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+
+  def testGatherPageData_CreatingAtTopLevel(self):
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(self.servlet.PROCESS_TAB_COMPONENTS,
+                     page_data['admin_tab_mode'])
+    self.assertIsNone(page_data['parent_path'])
+
+  def testGatherPageData_CreatingASubComponent(self):
+    self.mr.component_path = 'BackEnd'
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(self.servlet.PROCESS_TAB_COMPONENTS,
+                     page_data['admin_tab_mode'])
+    self.assertEqual('BackEnd', page_data['parent_path'])
+
+  def testProcessFormData_NotFound(self):
+    post_data = fake.PostData(
+        parent_path=['Monitoring'],
+        leaf_name=['Rules'],
+        docstring=['Detecting outages'],
+        deprecated=[False],
+        admins=[''],
+        cc=[''],
+        labels=[''])
+    self.assertRaises(
+        webapp2.HTTPException,
+        self.servlet.ProcessFormData, self.mr, post_data)
+
+  def testProcessFormData_Normal(self):
+    post_data = fake.PostData(
+        parent_path=['BackEnd'],
+        leaf_name=['DB'],
+        docstring=['A database'],
+        deprecated=[False],
+        admins=[''],
+        cc=[''],
+        labels=[''])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue('/adminComponents?saved=1&' in url)
+    config = self.services.config.GetProjectConfig(
+        self.mr.cnxn, self.mr.project_id)
+
+    cd = tracker_bizobj.FindComponentDef('BackEnd>DB', config)
+    self.assertEqual('BackEnd>DB', cd.path)
+    self.assertEqual('A database', cd.docstring)
+    self.assertEqual([], cd.admin_ids)
+    self.assertEqual([], cd.cc_ids)
+    self.assertTrue(cd.created > 0)
+    self.assertEqual(122, cd.creator_id)
+
+
+class ComponentCreateMethodsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cd1 = tracker_bizobj.MakeComponentDef(
+        1, 789, 'BackEnd', 'doc', False, [], [111], 0, 122)
+    cd2 = tracker_bizobj.MakeComponentDef(
+        2, 789, 'BackEnd>DB', 'doc', True, [], [111], 0, 122)
+    self.config.component_defs = [cd1, cd2]
+
+  def testLeafNameErrorMessage_Invalid(self):
+    self.assertEqual(
+        'Invalid component name',
+        componentcreate.LeafNameErrorMessage('', 'bad name', self.config))
+
+  def testLeafNameErrorMessage_AlreadyInUse(self):
+    self.assertEqual(
+        'That name is already in use.',
+        componentcreate.LeafNameErrorMessage('', 'BackEnd', self.config))
+    self.assertEqual(
+        'That name is already in use.',
+        componentcreate.LeafNameErrorMessage('BackEnd', 'DB', self.config))
+
+  def testLeafNameErrorMessage_OK(self):
+    self.assertIsNone(
+        componentcreate.LeafNameErrorMessage('', 'FrontEnd', self.config))
+    self.assertIsNone(
+        componentcreate.LeafNameErrorMessage('BackEnd', 'Search', self.config))
diff --git a/tracker/test/componentdetail_test.py b/tracker/test/componentdetail_test.py
new file mode 100644
index 0000000..18886bc
--- /dev/null
+++ b/tracker/test/componentdetail_test.py
@@ -0,0 +1,320 @@
+# 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
+
+"""Unit tests for the componentdetail servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from mock import Mock, patch
+
+import mox
+
+from features import filterrules_helpers
+from framework import permissions
+from proto import project_pb2
+from services import service_manager
+from services import template_svc
+from testing import fake
+from testing import testing_helpers
+from tracker import componentdetail
+from tracker import tracker_bizobj
+
+import webapp2
+
+
+class ComponentDetailTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        issue=fake.IssueService(),
+        config=fake.ConfigService(),
+        template=Mock(spec=template_svc.TemplateService),
+        project=fake.ProjectService())
+    self.servlet = componentdetail.ComponentDetail(
+        'req', 'res', services=self.services)
+    self.project = self.services.project.TestAddProject('proj')
+    self.mr = testing_helpers.MakeMonorailRequest(
+        project=self.project, perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.mr.auth.email = 'b@example.com'
+    self.config = self.services.config.GetProjectConfig(
+        'fake cnxn', self.project.project_id)
+    self.services.config.StoreConfig('fake cnxn', self.config)
+    self.cd = tracker_bizobj.MakeComponentDef(
+        1, self.project.project_id, 'BackEnd', 'doc', False, [], [111], 100000,
+        122, 10000000, 133)
+    self.config.component_defs = [self.cd]
+    self.services.user.TestAddUser('a@example.com', 111)
+    self.services.user.TestAddUser('b@example.com', 122)
+    self.services.user.TestAddUser('c@example.com', 133)
+    self.mr.component_path = 'BackEnd'
+
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testGetComponentDef_NotFound(self):
+    self.mr.component_path = 'NeverHeardOfIt'
+    self.assertRaises(
+        webapp2.HTTPException,
+        self.servlet._GetComponentDef, self.mr)
+
+  def testGetComponentDef_Normal(self):
+    actual_config, actual_cd = self.servlet._GetComponentDef(self.mr)
+    self.assertEqual(self.config, actual_config)
+    self.assertEqual(self.cd, actual_cd)
+
+  def testAssertBasePermission_AnyoneCanView(self):
+    self.servlet.AssertBasePermission(self.mr)
+    self.mr.perms = permissions.COMMITTER_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+    self.mr.perms = permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+    self.mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+
+  def testAssertBasePermission_MembersOnly(self):
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    # The project members can view the component definition.
+    self.servlet.AssertBasePermission(self.mr)
+    self.mr.perms = permissions.COMMITTER_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+    self.mr.perms = permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+    # Non-member is not allowed to view anything in the project.
+    self.mr.perms = permissions.EMPTY_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+
+  def testGatherPageData_ReadWrite(self):
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(self.servlet.PROCESS_TAB_COMPONENTS,
+                     page_data['admin_tab_mode'])
+    self.assertTrue(page_data['allow_edit'])
+    self.assertEqual([], page_data['initial_admins'])
+    component_def_view = page_data['component_def']
+    self.assertEqual('BackEnd', component_def_view.path)
+
+  def testGatherPageData_ReadOnly(self):
+    self.mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(self.servlet.PROCESS_TAB_COMPONENTS,
+                     page_data['admin_tab_mode'])
+    self.assertFalse(page_data['allow_edit'])
+    self.assertFalse(page_data['allow_delete'])
+    self.assertEqual([], page_data['initial_admins'])
+    component_def_view = page_data['component_def']
+    self.assertEqual('BackEnd', component_def_view.path)
+
+  def testGatherPageData_ObscuredCreatorModifier(self):
+    page_data = self.servlet.GatherPageData(self.mr)
+
+    self.assertEqual('b...@example.com', page_data['creator'].display_name)
+    self.assertEqual('/u/122/', page_data['creator'].profile_url)
+    self.assertEqual('Jan 1970', page_data['created'])
+    self.assertEqual('c...@example.com', page_data['modifier'].display_name)
+    self.assertEqual('/u/133/', page_data['modifier'].profile_url)
+    self.assertEqual('Apr 1970', page_data['modified'])
+
+  def testGatherPageData_VisibleCreatorModifierForAdmin(self):
+    self.mr.auth.user_pb.is_site_admin = True
+    page_data = self.servlet.GatherPageData(self.mr)
+
+    self.assertEqual('b@example.com', page_data['creator'].display_name)
+    self.assertEqual('/u/b@example.com/', page_data['creator'].profile_url)
+    self.assertEqual('Jan 1970', page_data['created'])
+    self.assertEqual('c@example.com', page_data['modifier'].display_name)
+    self.assertEqual('/u/c@example.com/', page_data['modifier'].profile_url)
+    self.assertEqual('Apr 1970', page_data['modified'])
+
+  def testGatherPageData_VisibleCreatorForSelf(self):
+    self.mr.auth.user_id = 122
+    page_data = self.servlet.GatherPageData(self.mr)
+
+    self.assertEqual('b@example.com', page_data['creator'].display_name)
+    self.assertEqual('/u/b@example.com/', page_data['creator'].profile_url)
+    self.assertEqual('Jan 1970', page_data['created'])
+    # Modifier should still be obscured.
+    self.assertEqual('c...@example.com', page_data['modifier'].display_name)
+    self.assertEqual('/u/133/', page_data['modifier'].profile_url)
+    self.assertEqual('Apr 1970', page_data['modified'])
+
+  def testGatherPageData_VisibleCreatorModifierForUnobscuredEmail(self):
+    creator = self.services.user.GetUser(self.mr.cnxn, 122)
+    creator.obscure_email = False
+    modifier = self.services.user.GetUser(self.mr.cnxn, 133)
+    modifier.obscure_email = False
+    page_data = self.servlet.GatherPageData(self.mr)
+
+    self.assertEqual('b@example.com', page_data['creator'].display_name)
+    self.assertEqual('/u/b@example.com/', page_data['creator'].profile_url)
+    self.assertEqual('Jan 1970', page_data['created'])
+    self.assertEqual('c@example.com', page_data['modifier'].display_name)
+    self.assertEqual('/u/c@example.com/', page_data['modifier'].profile_url)
+    self.assertEqual('Apr 1970', page_data['modified'])
+
+  def testGatherPageData_WithSubComponents(self):
+    subcd = tracker_bizobj.MakeComponentDef(
+        2, self.project.project_id, 'BackEnd>Worker', 'doc', False, [], [111],
+        0, 122)
+    self.config.component_defs.append(subcd)
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertFalse(page_data['allow_delete'])
+    self.assertEqual([subcd], page_data['subcomponents'])
+
+  def testGatherPageData_WithTemplates(self):
+    self.services.template.TemplatesWithComponent.return_value = ['template']
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertFalse(page_data['allow_delete'])
+    self.assertEqual(['template'], page_data['templates'])
+
+  def testProcessFormData_Permission(self):
+    """Only owners can edit components."""
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+    mr.component_path = 'BackEnd'
+    post_data = fake.PostData(
+        name=['BackEnd'],
+        deletecomponent=['Submit'])
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.ProcessFormData, mr, post_data)
+
+    self.servlet.ProcessFormData(self.mr, post_data)
+
+  def testProcessFormData_Delete(self):
+    post_data = fake.PostData(
+        name=['BackEnd'],
+        deletecomponent=['Submit'])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue('/adminComponents?deleted=1&' in url)
+    self.assertIsNone(
+        tracker_bizobj.FindComponentDef('BackEnd', self.config))
+
+  def testProcessFormData_Delete_WithSubComponent(self):
+    subcd = tracker_bizobj.MakeComponentDef(
+        2, self.project.project_id, 'BackEnd>Worker', 'doc', False, [], [111],
+        0, 122)
+    self.config.component_defs.append(subcd)
+
+    post_data = fake.PostData(
+        name=['BackEnd'],
+        deletecomponent=['Submit'])
+    with self.assertRaises(permissions.PermissionException) as cm:
+      self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertEqual(
+        'User tried to delete component that had subcomponents',
+        cm.exception.message)
+
+  def testProcessFormData_Edit(self):
+    post_data = fake.PostData(
+        leaf_name=['BackEnd'],
+        docstring=['This is where the magic happens'],
+        deprecated=[True],
+        admins=['a@example.com'],
+        cc=['a@example.com'],
+        labels=['Hot, Cold'])
+
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+
+    self.mox.VerifyAll()
+    self.assertTrue('/components/detail?component=BackEnd&saved=1&' in url)
+    config = self.services.config.GetProjectConfig(
+        self.mr.cnxn, self.mr.project_id)
+
+    cd = tracker_bizobj.FindComponentDef('BackEnd', config)
+    self.assertEqual('BackEnd', cd.path)
+    self.assertEqual(
+        'This is where the magic happens',
+        cd.docstring)
+    self.assertEqual(True, cd.deprecated)
+    self.assertEqual([111], cd.admin_ids)
+    self.assertEqual([111], cd.cc_ids)
+
+  def testProcessDeleteComponent(self):
+    self.servlet._ProcessDeleteComponent(self.mr, self.cd)
+    self.assertIsNone(
+        tracker_bizobj.FindComponentDef('BackEnd', self.config))
+
+  def testProcessEditComponent(self):
+    post_data = fake.PostData(
+        leaf_name=['BackEnd'],
+        docstring=['This is where the magic happens'],
+        deprecated=[True],
+        admins=['a@example.com'],
+        cc=['a@example.com'],
+        labels=['Hot, Cold'])
+
+    self.servlet._ProcessEditComponent(
+        self.mr, post_data, self.config, self.cd)
+
+    self.mox.VerifyAll()
+    config = self.services.config.GetProjectConfig(
+        self.mr.cnxn, self.mr.project_id)
+    cd = tracker_bizobj.FindComponentDef('BackEnd', config)
+    self.assertEqual('BackEnd', cd.path)
+    self.assertEqual(
+        'This is where the magic happens',
+        cd.docstring)
+    self.assertEqual(True, cd.deprecated)
+    self.assertEqual([111], cd.admin_ids)
+    self.assertEqual([111], cd.cc_ids)
+    # Assert that creator and created were not updated.
+    self.assertEqual(122, cd.creator_id)
+    self.assertEqual(100000, cd.created)
+    # Assert that modifier and modified were updated.
+    self.assertEqual(122, cd.modifier_id)
+    self.assertTrue(cd.modified > 10000000)
+
+  def testProcessEditComponent_RenameWithSubComponents(self):
+    subcd_1 = tracker_bizobj.MakeComponentDef(
+        2, self.project.project_id, 'BackEnd>Worker1', 'doc', False, [], [111],
+        0, 125, 3, 126)
+    subcd_2 = tracker_bizobj.MakeComponentDef(
+        3, self.project.project_id, 'BackEnd>Worker2', 'doc', False, [], [111],
+        0, 125, 4, 127)
+    self.config.component_defs.extend([subcd_1, subcd_2])
+
+    self.mox.StubOutWithMock(filterrules_helpers, 'RecomputeAllDerivedFields')
+    filterrules_helpers.RecomputeAllDerivedFields(
+        self.mr.cnxn, self.services, self.mr.project, self.config)
+    self.mox.ReplayAll()
+    post_data = fake.PostData(
+        leaf_name=['BackEnds'],
+        docstring=['This is where the magic happens'],
+        deprecated=[True],
+        admins=['a@example.com'],
+        cc=['a@example.com'],
+        labels=[''])
+
+    self.servlet._ProcessEditComponent(
+        self.mr, post_data, self.config, self.cd)
+
+    self.mox.VerifyAll()
+    config = self.services.config.GetProjectConfig(
+        self.mr.cnxn, self.mr.project_id)
+    cd = tracker_bizobj.FindComponentDef('BackEnds', config)
+    self.assertEqual('BackEnds', cd.path)
+    subcd_1 = tracker_bizobj.FindComponentDef('BackEnds>Worker1', config)
+    self.assertEqual('BackEnds>Worker1', subcd_1.path)
+    # Assert that creator and modifier have not changed for subcd_1.
+    self.assertEqual(125, subcd_1.creator_id)
+    self.assertEqual(0, subcd_1.created)
+    self.assertEqual(126, subcd_1.modifier_id)
+    self.assertEqual(3, subcd_1.modified)
+
+    subcd_2 = tracker_bizobj.FindComponentDef('BackEnds>Worker2', config)
+    self.assertEqual('BackEnds>Worker2', subcd_2.path)
+    # Assert that creator and modifier have not changed for subcd_2.
+    self.assertEqual(125, subcd_2.creator_id)
+    self.assertEqual(0, subcd_2.created)
+    self.assertEqual(127, subcd_2.modifier_id)
+    self.assertEqual(4, subcd_2.modified)
diff --git a/tracker/test/field_helpers_test.py b/tracker/test/field_helpers_test.py
new file mode 100644
index 0000000..f49a147
--- /dev/null
+++ b/tracker/test/field_helpers_test.py
@@ -0,0 +1,1276 @@
+# 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
+
+"""Unit tests for the field_helpers module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+import unittest
+import re
+
+from framework import exceptions
+from framework import permissions
+from framework import template_helpers
+from proto import project_pb2
+from proto import tracker_pb2
+from services import service_manager
+from services import config_svc
+from testing import fake
+from testing import testing_helpers
+from tracker import field_helpers
+from tracker import tracker_bizobj
+
+
+class FieldHelpersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.config.well_known_labels.append(tracker_pb2.LabelDef(
+        label='OldLabel', label_docstring='Do not use any longer',
+        deprecated=True))
+
+    self.services = service_manager.Services(
+        issue=fake.IssueService(),
+        usergroup=fake.UserGroupService(),
+        config=fake.ConfigService(),
+        user=fake.UserService())
+    self.project = fake.Project()
+    self.mr = testing_helpers.MakeMonorailRequest(
+        project=self.project, services=self.services)
+    self.mr.cnxn = fake.MonorailConnection()
+    self.errors = template_helpers.EZTError()
+
+  def testListApplicableFieldDefs(self):
+    issue_1 = fake.MakeTestIssue(
+        789,
+        1,
+        'sum',
+        'New',
+        111,
+        issue_id=78901,
+        labels=['type-defect', 'other-label'])
+    issue_2 = fake.MakeTestIssue(
+        789,
+        2,
+        'sum',
+        'New',
+        111,
+        issue_id=78902,
+        labels=['type-feedback', 'other-label1'])
+    issue_3 = fake.MakeTestIssue(
+        789,
+        3,
+        'sum',
+        'New',
+        111,
+        issue_id=78903,
+        labels=['type-defect'],
+        approval_values=[
+            tracker_pb2.ApprovalValue(approval_id=3),
+            tracker_pb2.ApprovalValue(approval_id=5)
+        ])
+    issue_4 = fake.MakeTestIssue(
+        789, 4, 'sum', 'New', 111, issue_id=78904)  # test no labels at all
+    issue_5 = fake.MakeTestIssue(
+        789,
+        5,
+        'sum',
+        'New',
+        111,
+        issue_id=78905,
+        labels=['type'],  # test labels ignored
+        approval_values=[tracker_pb2.ApprovalValue(approval_id=5)])
+    self.services.issue.TestAddIssue(issue_1)
+    self.services.issue.TestAddIssue(issue_2)
+    self.services.issue.TestAddIssue(issue_3)
+    self.services.issue.TestAddIssue(issue_4)
+    self.services.issue.TestAddIssue(issue_5)
+    fd_1 = tracker_pb2.FieldDef(
+        field_name='FirstField',
+        field_id=1,
+        field_type=tracker_pb2.FieldTypes.STR_TYPE,
+        applicable_type='feedback')  # applicable
+    fd_2 = tracker_pb2.FieldDef(
+        field_name='SecField',
+        field_id=2,
+        field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        applicable_type='no')  # not applicable
+    fd_3 = tracker_pb2.FieldDef(
+        field_name='LegalApproval',
+        field_id=3,
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        applicable_type='')  # applicable
+    fd_4 = tracker_pb2.FieldDef(
+        field_name='UserField',
+        field_id=4,
+        field_type=tracker_pb2.FieldTypes.USER_TYPE,
+        applicable_type='')  # applicable
+    fd_5 = tracker_pb2.FieldDef(
+        field_name='DogApproval',
+        field_id=5,
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        applicable_type='')  # applicable
+    fd_6 = tracker_pb2.FieldDef(
+        field_name='SixthField',
+        field_id=6,
+        field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        applicable_type='Defect')  # applicable
+    fd_7 = tracker_pb2.FieldDef(
+        field_name='CatApproval',
+        field_id=7,
+        field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        applicable_type='')  # not applicable
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.field_defs = [fd_1, fd_2, fd_3, fd_4, fd_5, fd_6, fd_7]
+    issues = [issue_1, issue_2, issue_3, issue_4, issue_5]
+
+    actual_fds = field_helpers.ListApplicableFieldDefs(issues, config)
+    self.assertEqual(actual_fds, [fd_1, fd_3, fd_4, fd_5, fd_6])
+
+  def testParseFieldDefRequest_Empty(self):
+    post_data = fake.PostData()
+    parsed = field_helpers.ParseFieldDefRequest(post_data, self.config)
+    self.assertEqual('', parsed.field_name)
+    self.assertEqual(None, parsed.field_type_str)
+    self.assertEqual(None, parsed.min_value)
+    self.assertEqual(None, parsed.max_value)
+    self.assertEqual(None, parsed.regex)
+    self.assertFalse(parsed.needs_member)
+    self.assertEqual('', parsed.needs_perm)
+    self.assertEqual('', parsed.grants_perm)
+    self.assertEqual(0, parsed.notify_on)
+    self.assertFalse(parsed.is_required)
+    self.assertFalse(parsed.is_niche)
+    self.assertFalse(parsed.is_multivalued)
+    self.assertEqual('', parsed.field_docstring)
+    self.assertEqual('', parsed.choices_text)
+    self.assertEqual('', parsed.applicable_type)
+    self.assertEqual('', parsed.applicable_predicate)
+    unchanged_labels = [
+        (label_def.label, label_def.label_docstring, label_def.deprecated)
+        for label_def in self.config.well_known_labels]
+    self.assertEqual(unchanged_labels, parsed.revised_labels)
+    self.assertEqual('', parsed.approvers_str)
+    self.assertEqual('', parsed.survey)
+    self.assertEqual('', parsed.parent_approval_name)
+    self.assertFalse(parsed.is_phase_field)
+
+  def testParseFieldDefRequest_Normal(self):
+    post_data = fake.PostData(
+        name=['somefield'],
+        field_type=['INT_TYPE'],
+        min_value=['11'],
+        max_value=['99'],
+        regex=['.*'],
+        needs_member=['Yes'],
+        needs_perm=['Commit'],
+        grants_perm=['View'],
+        notify_on=['any_comment'],
+        importance=['required'],
+        is_multivalued=['Yes'],
+        docstring=['It is just some field'],
+        choices=['Hot = Lots of activity\nCold = Not much activity'],
+        applicable_type=['Defect'],
+        approver_names=['approver@chromium.org'],
+        survey=['Are there UX changes?'],
+        parent_approval_name=['UIReview'],
+        is_phase_field=['on'],
+    )
+    parsed = field_helpers.ParseFieldDefRequest(post_data, self.config)
+    self.assertEqual('somefield', parsed.field_name)
+    self.assertEqual('INT_TYPE', parsed.field_type_str)
+    self.assertEqual(11, parsed.min_value)
+    self.assertEqual(99, parsed.max_value)
+    self.assertEqual('.*', parsed.regex)
+    self.assertTrue(parsed.needs_member)
+    self.assertEqual('Commit', parsed.needs_perm)
+    self.assertEqual('View', parsed.grants_perm)
+    self.assertEqual(1, parsed.notify_on)
+    self.assertTrue(parsed.is_required)
+    self.assertFalse(parsed.is_niche)
+    self.assertTrue(parsed.is_multivalued)
+    self.assertEqual('It is just some field', parsed.field_docstring)
+    self.assertEqual('Hot = Lots of activity\nCold = Not much activity',
+                     parsed.choices_text)
+    self.assertEqual('Defect', parsed.applicable_type)
+    self.assertEqual('', parsed.applicable_predicate)
+    unchanged_labels = [
+        (label_def.label, label_def.label_docstring, label_def.deprecated)
+        for label_def in self.config.well_known_labels]
+    new_labels = [
+        ('somefield-Hot', 'Lots of activity', False),
+        ('somefield-Cold', 'Not much activity', False)]
+    self.assertEqual(unchanged_labels + new_labels, parsed.revised_labels)
+    self.assertEqual('approver@chromium.org', parsed.approvers_str)
+    self.assertEqual('Are there UX changes?', parsed.survey)
+    self.assertEqual('UIReview', parsed.parent_approval_name)
+    self.assertTrue(parsed.is_phase_field)
+
+  def testParseFieldDefRequest_PreventPhaseApprovals(self):
+    post_data = fake.PostData(
+        field_type=['approval_type'],
+        is_phase_field=['on'],
+    )
+    parsed = field_helpers.ParseFieldDefRequest(post_data, self.config)
+    self.assertEqual('approval_type', parsed.field_type_str)
+    self.assertFalse(parsed.is_phase_field)
+
+  def testParseChoicesIntoWellKnownLabels_NewFieldDef(self):
+    choices_text = 'Hot = Lots of activity\nCold = Not much activity'
+    field_name = 'somefield'
+    revised_labels = field_helpers._ParseChoicesIntoWellKnownLabels(
+        choices_text, field_name, self.config, 'enum_type')
+    unchanged_labels = [
+        (label_def.label, label_def.label_docstring, label_def.deprecated)
+        for label_def in self.config.well_known_labels]
+    new_labels = [
+        ('somefield-Hot', 'Lots of activity', False),
+        ('somefield-Cold', 'Not much activity', False)]
+    self.assertEqual(unchanged_labels + new_labels, revised_labels)
+
+  def testParseChoicesIntoWellKnownLabels_ConvertExistingLabel(self):
+    choices_text = 'High = Must be fixed\nMedium = Might slip'
+    field_name = 'Priority'
+    revised_labels = field_helpers._ParseChoicesIntoWellKnownLabels(
+        choices_text, field_name, self.config, 'enum_type')
+    kept_labels = [
+        (label_def.label, label_def.label_docstring, label_def.deprecated)
+        for label_def in self.config.well_known_labels
+        if not label_def.label.startswith('Priority-')]
+    new_labels = [
+        ('Priority-High', 'Must be fixed', False),
+        ('Priority-Medium', 'Might slip', False)]
+    self.maxDiff = None
+    self.assertEqual(kept_labels + new_labels, revised_labels)
+
+    # TODO(jojwang): test this separately
+    # test None field_type_str, updating existing fielddef
+    self.config.field_defs.append(tracker_pb2.FieldDef(
+        field_id=13, field_name='Priority',
+        field_type=tracker_pb2.FieldTypes.ENUM_TYPE))
+    revised_labels = field_helpers._ParseChoicesIntoWellKnownLabels(
+        choices_text, field_name, self.config, None)
+    self.assertEqual(kept_labels + new_labels, revised_labels)
+
+  def testParseChoicesIntoWellKnownLabels_NotEnumField(self):
+    choices_text = ''
+    field_name = 'NotEnum'
+    self.config.well_known_labels = [
+        tracker_pb2.LabelDef(label='NotEnum-Should'),
+        tracker_pb2.LabelDef(label='NotEnum-Not-Be-Masked')]
+    revised_labels = field_helpers._ParseChoicesIntoWellKnownLabels(
+        choices_text, field_name, self.config, 'str_type')
+    new_labels = [
+        ('NotEnum-Should', None, False),
+        ('NotEnum-Not-Be-Masked', None, False)]
+    self.assertEqual(new_labels, revised_labels)
+
+    # TODO(jojwang): test this separately
+    # test None field_type_str, updating existing fielddef
+    self.config.field_defs.append(tracker_pb2.FieldDef(
+        field_id=13, field_name='NotEnum',
+        field_type=tracker_pb2.FieldTypes.STR_TYPE))
+    revised_labels = field_helpers._ParseChoicesIntoWellKnownLabels(
+        choices_text, field_name, self.config, None)
+    self.assertEqual(revised_labels, new_labels)
+
+  def testShiftEnumFieldsIntoLabels_Empty(self):
+    labels = []
+    labels_remove = []
+    field_val_strs = {}
+    field_val_strs_remove = {}
+    field_helpers.ShiftEnumFieldsIntoLabels(
+        labels, labels_remove, field_val_strs, field_val_strs_remove,
+        self.config)
+    self.assertEqual([], labels)
+    self.assertEqual([], labels_remove)
+    self.assertEqual({}, field_val_strs)
+    self.assertEqual({}, field_val_strs_remove)
+
+  def testShiftEnumFieldsIntoLabels_NoOp(self):
+    labels = ['Security', 'Performance', 'Pri-1', 'M-2']
+    labels_remove = ['ReleaseBlock']
+    field_val_strs = {123: ['CPU']}
+    field_val_strs_remove = {234: ['Small']}
+    field_helpers.ShiftEnumFieldsIntoLabels(
+        labels, labels_remove, field_val_strs, field_val_strs_remove,
+        self.config)
+    self.assertEqual(['Security', 'Performance', 'Pri-1', 'M-2'], labels)
+    self.assertEqual(['ReleaseBlock'], labels_remove)
+    self.assertEqual({123: ['CPU']}, field_val_strs)
+    self.assertEqual({234: ['Small']}, field_val_strs_remove)
+
+  def testShiftEnumFieldsIntoLabels_FoundSomeEnumFields(self):
+    self.config.field_defs.append(
+        tracker_bizobj.MakeFieldDef(
+            123, 789, 'Component', tracker_pb2.FieldTypes.ENUM_TYPE, None,
+            '', False, False, False, None, None, '', False, '', '',
+            tracker_pb2.NotifyTriggers.NEVER,
+            'no_action', 'What HW part is affected?',
+            False))
+    self.config.field_defs.append(
+        tracker_bizobj.MakeFieldDef(
+            234, 789, 'Size', tracker_pb2.FieldTypes.ENUM_TYPE, None,
+            '', False, False, False, None, None, '', False, '', '',
+            tracker_pb2.NotifyTriggers.NEVER,
+            'no_action', 'How big is this work item?',
+            False))
+    labels = ['Security', 'Performance', 'Pri-1', 'M-2']
+    labels_remove = ['ReleaseBlock']
+    field_val_strs = {123: ['CPU']}
+    field_val_strs_remove = {234: ['Small']}
+    field_helpers.ShiftEnumFieldsIntoLabels(
+        labels, labels_remove, field_val_strs, field_val_strs_remove,
+        self.config)
+    self.assertEqual(
+        ['Security', 'Performance', 'Pri-1', 'M-2', 'Component-CPU'],
+        labels)
+    self.assertEqual(['ReleaseBlock', 'Size-Small'], labels_remove)
+    self.assertEqual({}, field_val_strs)
+    self.assertEqual({}, field_val_strs_remove)
+
+  def testReviseApprovals_New(self):
+    self.config.field_defs.append(
+      tracker_bizobj.MakeFieldDef(
+          123, 789, 'UX Review', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+          '', False, False, False, None, None, '', False, '', '',
+          tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+          'Approval for UX review', False))
+    existing_approvaldef = tracker_pb2.ApprovalDef(
+        approval_id=123, approver_ids=[101, 102], survey='')
+    self.config.approval_defs = [existing_approvaldef]
+    revised_approvals = field_helpers.ReviseApprovals(
+        124, [103], '', self.config)
+    self.assertEqual(len(revised_approvals), 2)
+    self.assertEqual(revised_approvals,
+                     [(123, [101, 102], ''), (124, [103], '')])
+
+  def testReviseApprovals_Existing(self):
+    existing_approvaldef = tracker_pb2.ApprovalDef(
+        approval_id=123, approver_ids=[101, 102], survey='')
+    self.config.approval_defs = [existing_approvaldef]
+    revised_approvals = field_helpers.ReviseApprovals(
+        123, [103], '', self.config)
+    self.assertEqual(revised_approvals, [(123, [103], '')])
+
+  def testParseOneFieldValue_IntType(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'Foo', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    fv = field_helpers.ParseOneFieldValue(
+        self.mr.cnxn, self.services.user, fd, '8675309')
+    self.assertEqual(fv.field_id, 123)
+    self.assertEqual(fv.int_value, 8675309)
+
+  def testParseOneFieldValue_StrType(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'Foo', tracker_pb2.FieldTypes.STR_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    fv = field_helpers.ParseOneFieldValue(
+        self.mr.cnxn, self.services.user, fd, '8675309')
+    self.assertEqual(fv.field_id, 123)
+    self.assertEqual(fv.str_value, '8675309')
+
+  def testParseOneFieldValue_UserType(self):
+    self.services.user.TestAddUser('user@example.com', 111)
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'Foo', tracker_pb2.FieldTypes.USER_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    fv = field_helpers.ParseOneFieldValue(
+        self.mr.cnxn, self.services.user, fd, 'user@example.com')
+    self.assertEqual(fv.field_id, 123)
+    self.assertEqual(fv.user_id, 111)
+
+  def testParseOneFieldValue_DateType(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'Deadline', tracker_pb2.FieldTypes.DATE_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    fv = field_helpers.ParseOneFieldValue(
+        self.mr.cnxn, self.services.user, fd, '2009-02-13')
+    self.assertEqual(fv.field_id, 123)
+    self.assertEqual(fv.date_value, 1234483200)
+
+  def testParseOneFieldValue_UrlType(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'Design Doc', tracker_pb2.FieldTypes.URL_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    fv = field_helpers.ParseOneFieldValue(
+        self.mr.cnxn, self.services.user, fd, 'www.google.com')
+    self.assertEqual(fv.field_id, 123)
+    self.assertEqual(fv.url_value, 'http://www.google.com')
+
+  def testParseOneFieldValue(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'Target', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'milestone target',
+        False, is_phase_field=True)
+    phase_fvs = field_helpers.ParseOnePhaseFieldValue(
+        self.mr.cnxn, self.services.user, fd, '70', [30, 40])
+    self.assertEqual(len(phase_fvs), 2)
+    self.assertEqual(phase_fvs[0].phase_id, 30)
+    self.assertEqual(phase_fvs[1].phase_id, 40)
+
+  def testParseFieldValues_Empty(self):
+    field_val_strs = {}
+    phase_field_val_strs = {}
+    field_values = field_helpers.ParseFieldValues(
+        self.mr.cnxn, self.services.user, field_val_strs,
+        phase_field_val_strs, self.config)
+    self.assertEqual([], field_values)
+
+  def testParseFieldValues_EmptyPhases(self):
+    field_val_strs = {126: ['70']}
+    phase_field_val_strs = {}
+    fd_phase = tracker_bizobj.MakeFieldDef(
+        126, 789, 'Target', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'milestone target',
+        False, is_phase_field=True)
+    self.config.field_defs.extend([fd_phase])
+    field_values = field_helpers.ParseFieldValues(
+        self.mr.cnxn, self.services.user, field_val_strs,
+        phase_field_val_strs, self.config)
+    self.assertEqual([], field_values)
+
+  def testParseFieldValues_Normal(self):
+    fd_int = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    fd_date = tracker_bizobj.MakeFieldDef(
+        124, 789, 'Deadline', tracker_pb2.FieldTypes.DATE_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    fd_url = tracker_bizobj.MakeFieldDef(
+        125, 789, 'Design Doc', tracker_pb2.FieldTypes.URL_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    fd_phase = tracker_bizobj.MakeFieldDef(
+        126, 789, 'Target', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'milestone target',
+        False, is_phase_field=True)
+    self.config.field_defs.extend([fd_int, fd_date, fd_url, fd_phase])
+    field_val_strs = {
+        123: ['80386', '68040'],
+        124: ['2009-02-13'],
+        125: ['www.google.com'],
+    }
+    phase_field_val_strs = {
+        126: {'beta': ['89'],
+              'stable': ['70'],
+              'missing': ['234'],
+        }}
+    field_values = field_helpers.ParseFieldValues(
+        self.mr.cnxn, self.services.user, field_val_strs,
+        phase_field_val_strs, self.config,
+        phase_ids_by_name={'stable': [30, 40], 'beta': [88]})
+    fv1 = tracker_bizobj.MakeFieldValue(
+        123, 80386, None, None, None, None, False)
+    fv2 = tracker_bizobj.MakeFieldValue(
+        123, 68040, None, None, None, None, False)
+    fv3 = tracker_bizobj.MakeFieldValue(
+        124, None, None, None, 1234483200, None, False)
+    fv4 = tracker_bizobj.MakeFieldValue(
+        125, None, None, None, None, 'http://www.google.com', False)
+    fv5 = tracker_bizobj.MakeFieldValue(
+        126, 89, None, None, None, None, False, phase_id=88)
+    fv6 = tracker_bizobj.MakeFieldValue(
+        126, 70, None, None, None, None, False, phase_id=30)
+    fv7 = tracker_bizobj.MakeFieldValue(
+        126, 70, None, None, None, None, False, phase_id=40)
+    self.assertEqual([fv1, fv2, fv3, fv4, fv5, fv6, fv7], field_values)
+
+  def test_IntType(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    fv = tracker_bizobj.MakeFieldValue(123, 8086, None, None, None, None, False)
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, fv)
+    self.assertIsNone(msg)
+
+    fd.min_value = 1
+    fd.max_value = 999
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, fv)
+    self.assertEqual('Value must be <= 999.', msg)
+
+    fv.int_value = 0
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, fv)
+    self.assertEqual('Value must be >= 1.', msg)
+
+  def test_StrType(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.STR_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    fv = tracker_bizobj.MakeFieldValue(
+        123, None, 'i386', None, None, None, False)
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, fv)
+    self.assertIsNone(msg)
+
+    fd.regex = r'^\d*$'
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, fv)
+    self.assertEqual(r'Value must match regular expression: ^\d*$.', msg)
+
+    fv.str_value = '386'
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, fv)
+    self.assertIsNone(msg)
+
+  def test_UserType(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'Fake Field', tracker_pb2.FieldTypes.USER_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+
+    self.services.user.TestAddUser('owner@example.com', 111)
+    self.mr.project.owner_ids.extend([111])
+    owner = tracker_bizobj.MakeFieldValue(
+        fd.field_id, None, None, 111, None, None, False)
+
+    self.services.user.TestAddUser('committer@example.com', 222)
+    self.mr.project.committer_ids.extend([222])
+    self.mr.project.extra_perms = [
+        project_pb2.Project.ExtraPerms(
+            member_id=222,
+            perms=['FooPerm'])]
+    committer = tracker_bizobj.MakeFieldValue(
+        fd.field_id, None, None, 222, None, None, False)
+
+    self.services.user.TestAddUser('user@example.com', 333)
+    user = tracker_bizobj.MakeFieldValue(
+        fd.field_id, None, None, 333, None, None, False)
+
+    # Normal
+    for fv in (owner, committer, user):
+      msg = field_helpers.ValidateCustomFieldValue(
+          self.mr.cnxn, self.mr.project, self.services, fd, fv)
+      self.assertIsNone(msg)
+
+    # Needs to be member (user isn't a member).
+    fd.needs_member = True
+    for fv in (owner, committer):
+      msg = field_helpers.ValidateCustomFieldValue(
+          self.mr.cnxn, self.mr.project, self.services, fd, fv)
+      self.assertIsNone(msg)
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, user)
+    self.assertEqual('User must be a member of the project.', msg)
+
+    # Needs DeleteAny permission (only owner has it).
+    fd.needs_perm = 'DeleteAny'
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, owner)
+    self.assertIsNone(msg)
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, committer)
+    self.assertEqual('User must have permission "DeleteAny".', msg)
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, user)
+    self.assertEqual('User must be a member of the project.', msg)
+
+    # Needs custom permission (only committer has it).
+    fd.needs_perm = 'FooPerm'
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, owner)
+    self.assertEqual('User must have permission "FooPerm".', msg)
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, committer)
+    self.assertIsNone(msg)
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, user)
+    self.assertEqual('User must be a member of the project.', msg)
+
+  def test_DateType(self):
+    pass  # TODO(jrobbins): write this test. @@@
+
+  def test_UrlType(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.URL_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+
+    fv = tracker_bizobj.MakeFieldValue(
+        123, None, None, None, None, 'www.google.com', False)
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, fv)
+    self.assertIsNone(msg)
+
+    fv.url_value = 'go/puppies'
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, fv)
+    self.assertIsNone(msg)
+
+    fv.url_value = 'go/213'
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, fv)
+    self.assertIsNone(msg)
+
+    fv.url_value = 'puppies'
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, fv)
+    self.assertEqual('Value must be a valid url.', msg)
+
+  def test_OtherType(self):
+    # There are currently no validation options for date-type custom fields.
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'Deadline', tracker_pb2.FieldTypes.DATE_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    fv = tracker_bizobj.MakeFieldValue(
+        123, None, None, None, 1234567890, None, False)
+    msg = field_helpers.ValidateCustomFieldValue(
+        self.mr.cnxn, self.mr.project, self.services, fd, fv)
+    self.assertIsNone(msg)
+
+  def testValidateCustomFields_NoCustomFieldValues(self):
+    err_msgs = field_helpers.ValidateCustomFields(
+        self.mr, self.services, [], self.config, self.mr.project,
+        ezt_errors=self.errors)
+    self.assertFalse(self.errors.AnyErrors())
+    self.assertEqual(err_msgs, [])
+
+  def testValidateCustomFields_NoErrors(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(fd)
+    fv1 = tracker_bizobj.MakeFieldValue(
+        123, 8086, None, None, None, None, False)
+    fv2 = tracker_bizobj.MakeFieldValue(123, 486, None, None, None, None, False)
+
+    err_msgs = field_helpers.ValidateCustomFields(
+        self.mr, self.services, [fv1, fv2], self.config, self.mr.project,
+        ezt_errors=self.errors)
+    self.assertFalse(self.errors.AnyErrors())
+    self.assertEqual(err_msgs, [])
+
+  def testValidateCustomFields_SomeValueErrors(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(fd)
+    fv1 = tracker_bizobj.MakeFieldValue(
+        123, 8086, None, None, None, None, False)
+    fv2 = tracker_bizobj.MakeFieldValue(123, 486, None, None, None, None, False)
+
+    fd.min_value = 1
+    fd.max_value = 999
+    err_msgs = field_helpers.ValidateCustomFields(
+        self.mr, self.services, [fv1, fv2], self.config, self.mr.project,
+        ezt_errors=self.errors)
+    self.assertTrue(self.errors.AnyErrors())
+    self.assertEqual(1, len(self.errors.custom_fields))
+    custom_field_error = self.errors.custom_fields[0]
+    self.assertEqual(123, custom_field_error.field_id)
+    self.assertEqual('Value must be <= 999.', custom_field_error.message)
+    self.assertEqual(len(err_msgs), 1)
+    self.assertTrue(re.search(r'Value must be <= 999.', err_msgs[0]))
+
+  def testValidateCustomFields_DeletedRequiredFields_Ignored(self):
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'sum',
+        'New',
+        111,
+        issue_id=78901,
+        labels=['type-defect', 'other-label'])
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None, '', False,
+        False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', True)
+    self.config.field_defs.append(fd)
+
+    err_msgs = field_helpers.ValidateCustomFields(
+        self.mr,
+        self.services, [],
+        self.config,
+        self.mr.project,
+        ezt_errors=self.errors,
+        issue=issue)
+    self.assertFalse(self.errors.AnyErrors())
+    self.assertEqual(err_msgs, [])
+
+  def testValidateCustomFields_RequiredFields_Normal(self):
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'sum',
+        'New',
+        111,
+        issue_id=78901,
+        labels=['type-defect', 'other-label'])
+
+    required = True
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None, '', required,
+        False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(fd)
+    fv1 = tracker_bizobj.MakeFieldValue(
+        123, 8086, None, None, None, None, False)
+    fv2 = tracker_bizobj.MakeFieldValue(123, 486, None, None, None, None, False)
+
+    err_msgs = field_helpers.ValidateCustomFields(
+        self.mr,
+        self.services, [fv1, fv2],
+        self.config,
+        self.mr.project,
+        issue=issue)
+    self.assertEqual(len(err_msgs), 0)
+
+  def testValidateCustomFields_RequiredFields_ErrorsWhenMissing(self):
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'sum',
+        'New',
+        111,
+        issue_id=78901,
+        labels=['type-defect', 'other-label'])
+
+    required = True
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None, '', required,
+        False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(fd)
+
+    err_msgs = field_helpers.ValidateCustomFields(
+        self.mr, self.services, [], self.config, self.mr.project, issue=issue)
+    self.assertEqual(len(err_msgs), 1)
+    self.assertTrue(re.search(r'CPU field is required.', err_msgs[0]))
+
+  def testValidateCustomFields_RequiredFields_EnumFieldNormal(self):
+    # Enums are a special case because their values are stored in labels.
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'sum',
+        'New',
+        111,
+        issue_id=78901,
+        labels=['type-defect', 'other-label', 'CPU-enum-value'])
+    required = True
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.ENUM_TYPE, None, '', required,
+        False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(fd)
+
+    err_msgs = field_helpers.ValidateCustomFields(
+        self.mr, self.services, [], self.config, self.mr.project, issue=issue)
+    self.assertEqual(len(err_msgs), 0)
+
+  def testValidateCustomFields_RequiredFields_EnumFieldMultiWord(self):
+    # Enum fields with dashes in them require special label prefix parsing.
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'sum',
+        'New',
+        111,
+        issue_id=78901,
+        labels=['type-defect', 'other-label', 'an-enum-value'])
+    required = True
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'an-enum', tracker_pb2.FieldTypes.ENUM_TYPE, None, '',
+        required, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(fd)
+
+    err_msgs = field_helpers.ValidateCustomFields(
+        self.mr, self.services, [], self.config, self.mr.project, issue=issue)
+    self.assertEqual(len(err_msgs), 0)
+
+  def testValidateCustomFields_RequiredFields_EnumFieldError(self):
+    # Enums are a special case because their values are stored in labels.
+    issue = fake.MakeTestIssue(
+        789,
+        1,
+        'sum',
+        'New',
+        111,
+        issue_id=78901,
+        labels=['type-defect', 'other-label'])
+    required = True
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.ENUM_TYPE, None, '', required,
+        False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(fd)
+
+    err_msgs = field_helpers.ValidateCustomFields(
+        self.mr, self.services, [], self.config, self.mr.project, issue=issue)
+    self.assertEqual(len(err_msgs), 1)
+    self.assertTrue(re.search(r'CPU field is required.', err_msgs[0]))
+
+  def testAssertCustomFieldsEditPerms_Empty(self):
+    self.assertIsNone(
+        field_helpers.AssertCustomFieldsEditPerms(
+            self.mr, self.config, [], [], [], [], []))
+
+  def testAssertCustomFieldsEditPerms_Normal(self):
+    self.services.user.TestAddUser('user@example.com', 222)
+    self.mr.auth.effective_ids = {222}
+    fd_int = tracker_bizobj.MakeFieldDef(
+        11111,
+        1,
+        'fdInt',
+        tracker_pb2.FieldTypes.INT_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=True)
+    fd_str = tracker_bizobj.MakeFieldDef(
+        22222,
+        1,
+        'fdStr',
+        tracker_pb2.FieldTypes.STR_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=True)
+    fd_date = tracker_bizobj.MakeFieldDef(
+        33333,
+        1,
+        'fdDate',
+        tracker_pb2.FieldTypes.DATE_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=True)
+    fd_enum1 = tracker_bizobj.MakeFieldDef(
+        44444,
+        1,
+        'fdEnum1',
+        tracker_pb2.FieldTypes.ENUM_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=True)
+    fd_enum2 = tracker_bizobj.MakeFieldDef(
+        55555,
+        1,
+        'fdEnum2',
+        tracker_pb2.FieldTypes.ENUM_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=True)
+    self.config.field_defs = [fd_int, fd_str, fd_date, fd_enum1, fd_enum2]
+    fv1 = tracker_bizobj.MakeFieldValue(
+        11111, 37, None, None, None, None, False)
+    fv2 = tracker_bizobj.MakeFieldValue(
+        22222, None, 'Chicken', None, None, None, False)
+    self.assertIsNone(
+        field_helpers.AssertCustomFieldsEditPerms(
+            self.mr, self.config, [fv1], [fv2], [33333], ['Dog', 'fdEnum1-a'],
+            ['Cat', 'fdEnum2-b']))
+
+  def testAssertCustomFieldsEditPerms_Reject(self):
+    self.mr.perms = permissions.PermissionSet([])
+    fd_int = tracker_bizobj.MakeFieldDef(
+        11111,
+        1,
+        'fdInt',
+        tracker_pb2.FieldTypes.INT_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=True)
+    fd_enum = tracker_bizobj.MakeFieldDef(
+        44444,
+        1,
+        'fdEnum',
+        tracker_pb2.FieldTypes.ENUM_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=True)
+    self.config.field_defs = [fd_int, fd_enum]
+    fv = tracker_bizobj.MakeFieldValue(11111, 37, None, None, None, None, False)
+
+    self.assertRaises(
+        AssertionError, field_helpers.AssertCustomFieldsEditPerms, self.mr,
+        self.config, [fv], [], [], [], [])
+
+    self.assertRaises(
+        AssertionError, field_helpers.AssertCustomFieldsEditPerms, self.mr,
+        self.config, [], [fv], [], [], [])
+
+    self.assertRaises(
+        AssertionError, field_helpers.AssertCustomFieldsEditPerms, self.mr,
+        self.config, [], [], [11111], [], [])
+
+    self.assertRaises(
+        AssertionError, field_helpers.AssertCustomFieldsEditPerms, self.mr,
+        self.config, [], [], [], ['Dog', 'fdEnum-a'], [])
+
+    self.assertRaises(
+        AssertionError, field_helpers.AssertCustomFieldsEditPerms, self.mr,
+        self.config, [], [], [], [], ['Cat', 'fdEnum-b'])
+
+  def testApplyRestrictedDefaultValues(self):
+    self.mr.perms = permissions.PermissionSet([])
+    self.services.user.TestAddUser('user@example.com', 222)
+    self.mr.auth.effective_ids = {222}
+    fd_int = tracker_bizobj.MakeFieldDef(
+        11111,
+        1,
+        'fdInt',
+        tracker_pb2.FieldTypes.INT_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=False)
+    fd_str = tracker_bizobj.MakeFieldDef(
+        22222,
+        1,
+        'fdStr',
+        tracker_pb2.FieldTypes.STR_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=True)
+    fd_str_2 = tracker_bizobj.MakeFieldDef(
+        33333,
+        1,
+        'fdStr_2',
+        tracker_pb2.FieldTypes.STR_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=False)
+    fd_enum = tracker_bizobj.MakeFieldDef(
+        44444,
+        1,
+        'fdEnum',
+        tracker_pb2.FieldTypes.ENUM_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=False)
+    fd_restricted_enum = tracker_bizobj.MakeFieldDef(
+        55555,
+        1,
+        'fdRestrictedEnum',
+        tracker_pb2.FieldTypes.ENUM_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=True)
+    self.config.field_defs = [
+        fd_int, fd_str, fd_str_2, fd_enum, fd_restricted_enum
+    ]
+    fv = tracker_bizobj.MakeFieldValue(
+        33333, None, 'Happy', None, None, None, False)
+    temp_fv = tracker_bizobj.MakeFieldValue(
+        11111, 37, None, None, None, None, False)
+    temp_restricted_fv = tracker_bizobj.MakeFieldValue(
+        22222, None, 'Chicken', None, None, None, False)
+    field_vals = [fv]
+    labels = ['Car', 'Bus']
+    temp_field_vals = [temp_fv, temp_restricted_fv]
+    temp_labels = ['Bike', 'fdEnum-a', 'fdRestrictedEnum-b']
+    field_helpers.ApplyRestrictedDefaultValues(
+        self.mr, self.config, field_vals, labels, temp_field_vals, temp_labels)
+    self.assertEqual(labels, ['Car', 'Bus', 'fdRestrictedEnum-b'])
+    self.assertEqual(field_vals, [fv, temp_restricted_fv])
+
+  def testFormatUrlFieldValue(self):
+    self.assertEqual('http://www.google.com',
+                     field_helpers.FormatUrlFieldValue('www.google.com'))
+    self.assertEqual('https://www.bing.com',
+                     field_helpers.FormatUrlFieldValue('https://www.bing.com'))
+
+  def testReviseFieldDefFromParsed_INT(self):
+    parsed_field_def = field_helpers.ParsedFieldDef(
+        'EstDays',
+        'int_type',
+        min_value=5,
+        max_value=7,
+        regex='',
+        needs_member=True,
+        needs_perm='Commit',
+        grants_perm='View',
+        notify_on=tracker_pb2.NotifyTriggers.ANY_COMMENT,
+        is_required=True,
+        is_niche=True,
+        importance='required',
+        is_multivalued=True,
+        field_docstring='updated doc',
+        choices_text='',
+        applicable_type='Launch',
+        applicable_predicate='',
+        revised_labels=[],
+        date_action_str='ping_participants',
+        approvers_str='',
+        survey='',
+        parent_approval_name='',
+        is_phase_field=False,
+        is_restricted_field=False)
+
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'EstDays', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, 4, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False,
+        approval_id=3)
+
+    new_fd = field_helpers.ReviseFieldDefFromParsed(parsed_field_def, fd)
+    # assert INT fields
+    self.assertEqual(new_fd.min_value, 5)
+    self.assertEqual(new_fd.max_value, 7)
+
+    # assert USER fields
+    self.assertEqual(new_fd.notify_on, tracker_pb2.NotifyTriggers.ANY_COMMENT)
+    self.assertTrue(new_fd.needs_member)
+    self.assertEqual(new_fd.needs_perm, 'Commit')
+    self.assertEqual(new_fd.grants_perm, 'View')
+
+    # assert DATE fields
+    self.assertEqual(new_fd.date_action,
+                     tracker_pb2.DateAction.PING_PARTICIPANTS)
+
+    # assert general fields
+    self.assertTrue(new_fd.is_required)
+    self.assertTrue(new_fd.is_niche)
+    self.assertEqual(new_fd.applicable_type, 'Launch')
+    self.assertEqual(new_fd.docstring, 'updated doc')
+    self.assertTrue(new_fd.is_multivalued)
+    self.assertEqual(new_fd.approval_id, 3)
+    self.assertFalse(new_fd.is_phase_field)
+    self.assertFalse(new_fd.is_restricted_field)
+
+  def testParsedFieldDefAssertions_Accepted(self):
+    parsed_fd = field_helpers.ParsedFieldDef(
+        'EstDays',
+        'int_type',
+        min_value=5,
+        max_value=7,
+        regex='',
+        needs_member=True,
+        needs_perm='Commit',
+        grants_perm='View',
+        notify_on=tracker_pb2.NotifyTriggers.ANY_COMMENT,
+        is_required=True,
+        is_niche=False,
+        importance='required',
+        is_multivalued=True,
+        field_docstring='updated doc',
+        choices_text='',
+        applicable_type='Launch',
+        applicable_predicate='',
+        revised_labels=[],
+        date_action_str='ping_participants',
+        approvers_str='',
+        survey='',
+        parent_approval_name='',
+        is_phase_field=False,
+        is_restricted_field=False)
+
+    field_helpers.ParsedFieldDefAssertions(self.mr, parsed_fd)
+    self.assertFalse(self.mr.errors.AnyErrors())
+
+  def testParsedFieldDefAssertions_Rejected(self):
+    parsed_fd = field_helpers.ParsedFieldDef(
+        'restrictApprovalField',
+        'approval_type',
+        min_value=10,
+        max_value=7,
+        regex='/foo(?)/',
+        needs_member=True,
+        needs_perm='Commit',
+        grants_perm='View',
+        notify_on=tracker_pb2.NotifyTriggers.ANY_COMMENT,
+        is_required=True,
+        is_niche=True,
+        importance='required',
+        is_multivalued=True,
+        field_docstring='updated doc',
+        choices_text='',
+        applicable_type='Launch',
+        applicable_predicate='',
+        revised_labels=[],
+        date_action_str='custom_date_action_str',
+        approvers_str='',
+        survey='',
+        parent_approval_name='',
+        is_phase_field=False,
+        is_restricted_field=True)
+
+    field_helpers.ParsedFieldDefAssertions(self.mr, parsed_fd)
+    self.assertTrue(self.mr.errors.AnyErrors())
+
+    self.assertEqual(
+        self.mr.errors.is_niche, 'A field cannot be both required and niche.')
+    self.assertEqual(
+        self.mr.errors.date_action,
+        'The date action should be either: ' + ', '.join(
+            config_svc.DATE_ACTION_ENUM) + '.')
+    self.assertEqual(
+        self.mr.errors.min_value, 'Minimum value must be less than maximum.')
+    self.assertEqual(self.mr.errors.regex, 'Invalid regular expression.')
diff --git a/tracker/test/fieldcreate_test.py b/tracker/test/fieldcreate_test.py
new file mode 100644
index 0000000..580d095
--- /dev/null
+++ b/tracker/test/fieldcreate_test.py
@@ -0,0 +1,301 @@
+# 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
+
+"""Unit tests for the fieldcreate servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mox
+import mock
+import unittest
+import logging
+
+import ezt
+
+from framework import permissions
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import fieldcreate
+from tracker import tracker_bizobj
+
+
+class FieldCreateTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        config=fake.ConfigService(),
+        project=fake.ProjectService())
+    self.servlet = fieldcreate.FieldCreate(
+        'req', 'res', services=self.services)
+    self.project = self.services.project.TestAddProject('proj')
+    self.mr = testing_helpers.MakeMonorailRequest(
+        project=self.project, perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.services.user.TestAddUser('gatsby@example.com', 111)
+    self.services.user.TestAddUser('sport@example.com', 222)
+
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testAssertBasePermission(self):
+    # Anon users can never do it
+    self.mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+
+    # Project owner can do it.
+    self.mr.perms = permissions.OWNER_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+
+    # Project member cannot do it
+    self.mr.perms = permissions.COMMITTER_ACTIVE_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+    self.mr.perms = permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+
+  def testGatherPageData(self):
+    approval_fd = tracker_bizobj.MakeFieldDef(
+        1, self.mr.project_id, 'LaunchApproval',
+        tracker_pb2.FieldTypes.APPROVAL_TYPE, None, '', False,
+        False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+        'some approval thing', False)
+    config = self.services.config.GetProjectConfig(
+        self.mr.cnxn, self.mr.project_id)
+    config.field_defs.append(approval_fd)
+    self.services.config.StoreConfig(self.cnxn, config)
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(self.servlet.PROCESS_TAB_LABELS,
+                     page_data['admin_tab_mode'])
+    self.assertItemsEqual(
+        ['Defect', 'Enhancement', 'Task', 'Other'],
+        page_data['well_known_issue_types'])
+    self.assertEqual(['LaunchApproval'], page_data['approval_names'])
+    self.assertEqual('', page_data['initial_admins'])
+    self.assertEqual('', page_data['initial_editors'])
+    self.assertIsNone(page_data['initial_is_restricted_field'])
+
+  def testProcessFormData(self):
+    post_data = fake.PostData(
+        name=['somefield'],
+        field_type=['INT_TYPE'],
+        min_value=['1'],
+        max_value=['99'],
+        notify_on=['any_comment'],
+        importance=['required'],
+        is_multivalued=['Yes'],
+        docstring=['It is just some field'],
+        applicable_type=['Defect'],
+        date_action=['no_action'],
+        admin_names=['gatsby@example.com'],
+        editor_names=['sport@example.com'],
+        is_restricted_field=['Yes'])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue('/adminLabels?saved=1&' in url)
+    config = self.services.config.GetProjectConfig(
+        self.mr.cnxn, self.mr.project_id)
+
+    fd = tracker_bizobj.FindFieldDef('somefield', config)
+    self.assertEqual('somefield', fd.field_name)
+    self.assertEqual(tracker_pb2.FieldTypes.INT_TYPE, fd.field_type)
+    self.assertEqual(1, fd.min_value)
+    self.assertEqual(99, fd.max_value)
+    self.assertEqual(tracker_pb2.NotifyTriggers.ANY_COMMENT, fd.notify_on)
+    self.assertTrue(fd.is_required)
+    self.assertFalse(fd.is_niche)
+    self.assertTrue(fd.is_multivalued)
+    self.assertEqual('It is just some field', fd.docstring)
+    self.assertEqual('Defect', fd.applicable_type)
+    self.assertEqual('', fd.applicable_predicate)
+    self.assertEqual([111], fd.admin_ids)
+    self.assertEqual([222], fd.editor_ids)
+
+  def testProcessFormData_Reject_EditorsForNonRestrictedField(self):
+    # This method tests that an exception is raised
+    # when trying to add editors to a non restricted field.
+    post_data = fake.PostData(
+        name=['somefield'],
+        field_type=['INT_TYPE'],
+        min_value=['1'],
+        max_value=['99'],
+        notify_on=['any_comment'],
+        importance=['required'],
+        is_multivalued=['Yes'],
+        docstring=['It is just some field'],
+        applicable_type=['Defect'],
+        date_action=['no_action'],
+        admin_names=['gatsby@example.com'],
+        editor_names=['sport@example.com'])
+
+    self.assertRaises(
+        AssertionError, self.servlet.ProcessFormData, self.mr, post_data)
+
+  def testProcessFormData_Reject_EditorsForApprovalField(self):
+    #This method tests that an exception is raised
+    #when trying to add editors to an approval field.
+    post_data = fake.PostData(
+        name=['approval_field'],
+        field_type=['approval_type'],
+        notify_on=['any_comment'],
+        importance=['required'],
+        is_multivalued=['Yes'],
+        docstring=['It is just some field'],
+        applicable_type=['Defect'],
+        date_action=['no_action'],
+        approver_names=['gatsby@example.com'],
+        is_restricted_field=['Yes'],
+        admin_names=['gatsby@example.com'],
+        editor_names=[''])
+
+    self.assertRaises(
+        AssertionError, self.servlet.ProcessFormData, self.mr, post_data)
+
+  @mock.patch('framework.servlet.Servlet.PleaseCorrect')
+  def testProcessFormData_RejectAssertions(self, fake_servlet_pc):
+    #This method tests when errors are found using when the
+    #field_helpers.ParsedFieldDefAssertions is triggered.
+    post_data = fake.PostData(
+        name=['somefield'],
+        field_type=['INT_TYPE'],
+        min_value=['1'],
+        max_value=['99'],
+        notify_on=['any_comment'],
+        importance=['required'],
+        is_multivalued=['Yes'],
+        docstring=['It is just some field'],
+        applicable_type=['Defect'],
+        date_action=['wrong_date_action'],
+        admin_names=['gatsby@example.com'],
+        editor_names=[''])
+
+    self.servlet.ProcessFormData(self.mr, post_data)
+
+    fake_servlet_pc.assert_called_once_with(
+        self.mr,
+        initial_field_name='somefield',
+        initial_type='INT_TYPE',
+        initial_parent_approval_name='',
+        initial_field_docstring='It is just some field',
+        initial_applicable_type='Defect',
+        initial_applicable_predicate='',
+        initial_needs_member=None,
+        initial_needs_perm='',
+        initial_importance='required',
+        initial_is_multivalued='yes',
+        initial_grants_perm='',
+        initial_notify_on=1,
+        initial_date_action='wrong_date_action',
+        initial_choices='',
+        initial_approvers='',
+        initial_survey='',
+        initial_is_phase_field=False,
+        initial_admins='gatsby@example.com',
+        initial_editors='',
+        initial_is_restricted_field=False)
+    self.assertTrue(self.mr.errors.AnyErrors())
+
+
+  def testProcessFormData_RejectNoApprover(self):
+    post_data = fake.PostData(
+        name=['approvalField'],
+        field_type=['approval_type'],
+        approver_names=[''],
+        admin_names=[''],
+        editor_names=[''],
+        parent_approval_name=['UIApproval'],
+        is_phase_field=['on'])
+
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        self.mr,
+        initial_field_name=post_data.get('name'),
+        initial_type=post_data.get('field_type'),
+        initial_field_docstring=post_data.get('docstring', ''),
+        initial_applicable_type=post_data.get('applical_type', ''),
+        initial_applicable_predicate='',
+        initial_needs_member=ezt.boolean('needs_member' in post_data),
+        initial_needs_perm=post_data.get('needs_perm', '').strip(),
+        initial_importance=post_data.get('importance'),
+        initial_is_multivalued=ezt.boolean('is_multivalued' in post_data),
+        initial_grants_perm=post_data.get('grants_perm', '').strip(),
+        initial_notify_on=0,
+        initial_date_action=post_data.get('date_action'),
+        initial_choices=post_data.get('choices', ''),
+        initial_approvers=post_data.get('approver_names'),
+        initial_parent_approval_name=post_data.get('parent_approval_name', ''),
+        initial_survey=post_data.get('survey', ''),
+        initial_is_phase_field=False,
+        initial_admins=post_data.get('admin_names'),
+        initial_editors=post_data.get('editor_names'),
+        initial_is_restricted_field=False)
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual(
+        'Please provide at least one default approver.',
+        self.mr.errors.approvers)
+    self.assertIsNone(url)
+
+
+class FieldCreateMethodsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+
+  def testFieldNameErrorMessage_NoConflict(self):
+    self.assertIsNone(fieldcreate.FieldNameErrorMessage(
+        'somefield', self.config))
+
+  def testFieldNameErrorMessage_PrefixReserved(self):
+    self.assertEqual(
+        'That name is reserved.',
+        fieldcreate.FieldNameErrorMessage('owner', self.config))
+
+  def testFieldNameErrorMessage_SuffixReserved(self):
+    self.assertEqual(
+        'That suffix is reserved.',
+        fieldcreate.FieldNameErrorMessage('doh-approver', self.config))
+
+  def testFieldNameErrorMessage_AlreadyInUse(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(fd)
+    self.assertEqual(
+        'That name is already in use.',
+        fieldcreate.FieldNameErrorMessage('CPU', self.config))
+
+  def testFieldNameErrorMessage_PrefixOfExisting(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'sign-off', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(fd)
+    self.assertEqual(
+        'That name is a prefix of an existing field name.',
+        fieldcreate.FieldNameErrorMessage('sign', self.config))
+
+  def testFieldNameErrorMessage_IncludesExisting(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'opt', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(fd)
+    self.assertEqual(
+        'An existing field name is a prefix of that name.',
+        fieldcreate.FieldNameErrorMessage('opt-in', self.config))
diff --git a/tracker/test/fielddetail_test.py b/tracker/test/fielddetail_test.py
new file mode 100644
index 0000000..f9f27b4
--- /dev/null
+++ b/tracker/test/fielddetail_test.py
@@ -0,0 +1,355 @@
+# 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
+
+"""Unit tests for the fielddetail servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mox
+import unittest
+import logging
+
+import webapp2
+
+import ezt
+
+from framework import permissions
+from proto import project_pb2
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import fielddetail
+from tracker import tracker_bizobj
+from tracker import tracker_views
+
+
+class FieldDetailTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        config=fake.ConfigService(),
+        project=fake.ProjectService())
+    self.servlet = fielddetail.FieldDetail(
+        'req', 'res', services=self.services)
+    self.project = self.services.project.TestAddProject('proj')
+    self.mr = testing_helpers.MakeMonorailRequest(
+        project=self.project, perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.config = self.services.config.GetProjectConfig(
+        'fake cnxn', self.project.project_id)
+    self.services.config.StoreConfig('fake cnxn', self.config)
+    self.fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.fd.admin_ids = [111]
+    self.fd.editor_ids = [222]
+    self.config.field_defs.append(self.fd)
+    self.services.user.TestAddUser('gatsby@example.com', 111)
+    self.services.user.TestAddUser('sport@example.com', 222)
+    self.mr.field_name = 'CPU'
+
+    # Approvals
+    self.approval_def = tracker_pb2.ApprovalDef(
+        approval_id=234, approver_ids=[111], survey='Question 1?')
+    self.sub_fd = tracker_pb2.FieldDef(
+        field_name='UIMocks', approval_id=234, applicable_type='')
+    self.sub_fd_deleted = tracker_pb2.FieldDef(
+        field_name='UIMocksDeleted', approval_id=234, applicable_type='',
+        is_deleted=True)
+    self.config.field_defs.extend([self.sub_fd, self.sub_fd_deleted])
+    self.config.approval_defs.append(self.approval_def)
+    self.approval_fd = tracker_bizobj.MakeFieldDef(
+        234, 789, 'UIReview', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(self.approval_fd)
+
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testGetFieldDef_NotFound(self):
+    self.mr.field_name = 'NeverHeardOfIt'
+    self.assertRaises(
+        webapp2.HTTPException,
+        self.servlet._GetFieldDef, self.mr)
+
+  def testGetFieldDef_Normal(self):
+    actual_config, actual_fd = self.servlet._GetFieldDef(self.mr)
+    self.assertEqual(self.config, actual_config)
+    self.assertEqual(self.fd, actual_fd)
+
+  def testAssertBasePermission_AnyoneCanView(self):
+    self.servlet.AssertBasePermission(self.mr)
+    self.mr.perms = permissions.COMMITTER_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+    self.mr.perms = permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+    self.mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+
+  def testAssertBasePermission_MembersOnly(self):
+    self.project.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    # The project members can view the field definition.
+    self.servlet.AssertBasePermission(self.mr)
+    self.mr.perms = permissions.COMMITTER_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+    self.mr.perms = permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+    # Non-member is not allowed to view anything in the project.
+    self.mr.perms = permissions.EMPTY_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+
+  def testGatherPageData_ReadWrite(self):
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(self.servlet.PROCESS_TAB_LABELS,
+                     page_data['admin_tab_mode'])
+    self.assertTrue(page_data['allow_edit'])
+    self.assertEqual('gatsby@example.com', page_data['initial_admins'])
+    self.assertEqual('sport@example.com', page_data['initial_editors'])
+    field_def_view = page_data['field_def']
+    self.assertEqual('CPU', field_def_view.field_name)
+    self.assertEqual(page_data['approval_subfields'], [])
+    self.assertEqual(page_data['initial_approvers'], '')
+
+  def testGatherPageData_ReadOnly(self):
+    self.mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(self.servlet.PROCESS_TAB_LABELS,
+                     page_data['admin_tab_mode'])
+    self.assertFalse(page_data['allow_edit'])
+    self.assertEqual('gatsby@example.com', page_data['initial_admins'])
+    self.assertEqual('sport@example.com', page_data['initial_editors'])
+    field_def_view = page_data['field_def']
+    self.assertEqual('CPU', field_def_view.field_name)
+    self.assertEqual(page_data['approval_subfields'], [])
+    self.assertEqual(page_data['initial_approvers'], '')
+
+  def testGatherPageData_Approval(self):
+    self.mr.field_name = 'UIReview'
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(page_data['approval_subfields'], [self.sub_fd])
+    self.assertEqual(page_data['initial_approvers'], 'gatsby@example.com')
+    field_def_view = page_data['field_def']
+    self.assertEqual(field_def_view.field_name, 'UIReview')
+    self.assertEqual(field_def_view.survey, 'Question 1?')
+
+  def testProcessFormData_Permission(self):
+    """Only owners can edit fields."""
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+    mr.field_name = 'CPU'
+    post_data = fake.PostData(
+        name=['CPU'],
+        deletefield=['Submit'])
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.ProcessFormData, mr, post_data)
+
+    self.servlet.ProcessFormData(self.mr, post_data)
+
+  def testProcessFormData_Delete(self):
+    post_data = fake.PostData(
+        name=['CPU'],
+        deletefield=['Submit'])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue('/adminLabels?deleted=1&' in url)
+    fd = tracker_bizobj.FindFieldDef('CPU', self.config)
+    self.assertEqual('CPU', fd.field_name)
+    self.assertTrue(fd.is_deleted)
+
+  def testProcessFormData_Cancel(self):
+    post_data = fake.PostData(
+        name=['CPU'],
+        cancel=['Submit'],
+        max_value=['200'])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    logging.info(url)
+    self.assertTrue('/adminLabels?ts=' in url)
+    config = self.services.config.GetProjectConfig(
+        self.mr.cnxn, self.mr.project_id)
+
+    fd = tracker_bizobj.FindFieldDef('CPU', config)
+    self.assertIsNone(fd.max_value)
+    self.assertIsNone(fd.min_value)
+
+  def testProcessFormData_Edit(self):
+    post_data = fake.PostData(
+        name=['CPU'],
+        field_type=['INT_TYPE'],
+        min_value=['2'],
+        max_value=['98'],
+        notify_on=['never'],
+        is_required=[],
+        is_multivalued=[],
+        docstring=['It is just some field'],
+        applicable_type=['Defect'],
+        admin_names=['gatsby@example.com'])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue('/fields/detail?field=CPU&saved=1&' in url)
+    config = self.services.config.GetProjectConfig(
+        self.mr.cnxn, self.mr.project_id)
+
+    fd = tracker_bizobj.FindFieldDef('CPU', config)
+    self.assertEqual('CPU', fd.field_name)
+    self.assertEqual(2, fd.min_value)
+    self.assertEqual(98, fd.max_value)
+    self.assertEqual([111], fd.admin_ids)
+    self.assertEqual([], fd.editor_ids)
+
+  def testProcessDeleteField(self):
+    self.servlet._ProcessDeleteField(self.mr, self.config, self.fd)
+    self.assertTrue(self.fd.is_deleted)
+
+  def testProcessDeleteField_subfields(self):
+    approval_fd = tracker_bizobj.MakeFieldDef(
+        3, 789, 'Legal', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.fd.approval_id=3
+    self.config.field_defs.append(approval_fd)
+    self.servlet._ProcessDeleteField(self.mr, self.config, approval_fd)
+    self.assertTrue(self.fd.is_deleted)
+    self.assertTrue(approval_fd.is_deleted)
+
+  def testProcessEditField_Normal(self):
+    post_data = fake.PostData(
+        name=['CPU'],
+        field_type=['INT_TYPE'],
+        min_value=['2'],
+        admin_names=['gatsby@example.com'],
+        editor_names=['sport@example.com'],
+        is_restricted_field=['Yes'])
+    self.servlet._ProcessEditField(
+        self.mr, post_data, self.config, self.fd)
+    fd = tracker_bizobj.FindFieldDef('CPU', self.config)
+    self.assertEqual('CPU', fd.field_name)
+    self.assertEqual(2, fd.min_value)
+    self.assertEqual([111], fd.admin_ids)
+    self.assertEqual([222], fd.editor_ids)
+
+  def testProcessEditField_Reject(self):
+    post_data = fake.PostData(
+        name=['CPU'],
+        field_type=['INT_TYPE'],
+        min_value=['4'],
+        max_value=['1'],
+        admin_names=[''],
+        editor_names=[''])
+
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        self.mr,
+        field_def=mox.IgnoreArg(),
+        initial_applicable_type='',
+        initial_choices='',
+        initial_admins='',
+        initial_editors='',
+        initial_approvers='',
+        initial_is_restricted_field=False)
+    self.mox.ReplayAll()
+
+    url = self.servlet._ProcessEditField(
+        self.mr, post_data, self.config, self.fd)
+    self.assertEqual('Minimum value must be less than maximum.',
+                     self.mr.errors.min_value)
+    self.assertIsNone(url)
+
+    fd = tracker_bizobj.FindFieldDef('CPU', self.config)
+    self.assertIsNone(fd.min_value)
+    self.assertIsNone(fd.max_value)
+
+  def testProcessEditField_Reject_EditorsForNonRestrictedField(self):
+    # This method tests that an exception is raised
+    # when trying to add editors to a non restricted field.
+    post_data = fake.PostData(
+        name=['CPU'],
+        field_type=['INT_TYPE'],
+        min_value=['2'],
+        admin_names=[''],
+        editor_names=['gatsby@example.com'])
+
+    self.assertRaises(
+        AssertionError, self.servlet._ProcessEditField, self.mr, post_data,
+        self.config, self.fd)
+
+  def testProcessEditField_RejectAssertions_1(self):
+    # This method tests that an exception is raised
+    # when trying to add editors to an approval field.
+    post_data = fake.PostData(
+        name=['CPU'],
+        approver_names=['gatsby@example.com'],
+        admin_names=[''],
+        editor_names=['sports@example.com'])
+
+    self.assertRaises(
+        AssertionError, self.servlet._ProcessEditField, self.mr, post_data,
+        self.config, self.approval_fd)
+
+  def testProcessEditField_RejectAssertions_2(self):
+    #This method tests that an exception is raised
+    #when trying to restrict an approval field.
+    post_data = fake.PostData(
+        name=['CPU'],
+        approver_names=['gatsby@example.com'],
+        is_restricted_field=['Yes'],
+        admin_names=[''],
+        editor_names=[''])
+
+    self.assertRaises(
+        AssertionError, self.servlet._ProcessEditField, self.mr, post_data,
+        self.config, self.approval_fd)
+
+  def testProcessEditField_RejectApproval(self):
+    self.mr.field_name = 'UIReview'
+    post_data = fake.PostData(
+        name=['UIReview'],
+        admin_names=[''],
+        editor_names=[''],
+        survey=['WIll there be UI changes?'],
+        approver_names=[''])
+
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        self.mr,
+        field_def=mox.IgnoreArg(),
+        initial_applicable_type='',
+        initial_choices='',
+        initial_admins='',
+        initial_editors='',
+        initial_approvers='',
+        initial_is_restricted_field=False)
+    self.mox.ReplayAll()
+
+    url = self.servlet._ProcessEditField(
+        self.mr, post_data, self.config, self.approval_fd)
+    self.assertEqual('Please provide at least one default approver.',
+                     self.mr.errors.approvers)
+    self.assertIsNone(url)
+
+  def testProcessEditField_Approval(self):
+    self.mr.field_name = 'UIReview'
+    post_data = fake.PostData(
+        name=['UIReview'],
+        admin_names=[''],
+        editor_names=[''],
+        survey=['WIll there be UI changes?'],
+        approver_names=['sport@example.com, gatsby@example.com'])
+
+
+    url = self.servlet._ProcessEditField(
+        self.mr, post_data, self.config, self.approval_fd)
+    self.assertTrue('/fields/detail?field=UIReview&saved=1&' in url)
+
+    approval_def = tracker_bizobj.FindApprovalDef('UIReview', self.config)
+    self.assertEqual(len(approval_def.approver_ids), 2)
+    self.assertEqual(sorted(approval_def.approver_ids), sorted([111, 222]))
diff --git a/tracker/test/fltconversion_test.py b/tracker/test/fltconversion_test.py
new file mode 100644
index 0000000..e0bae41
--- /dev/null
+++ b/tracker/test/fltconversion_test.py
@@ -0,0 +1,930 @@
+# Copyright 2018 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
+
+"""Unittests for the flt launch issues conversion task."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+import copy
+import unittest
+import settings
+import mock
+
+from businesslogic import work_env
+from framework import exceptions
+from framework import permissions
+from services import service_manager
+from services import template_svc
+from tracker import fltconversion
+from tracker import tracker_bizobj
+from testing import fake
+from testing import testing_helpers
+from proto import tracker_pb2
+
+class FLTConvertTask(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        template=mock.Mock(spec=template_svc.TemplateService),)
+    self.mr = testing_helpers.MakeMonorailRequest()
+    self.task = fltconversion.FLTConvertTask(
+        'req', 'res', services=self.services)
+    self.task.mr = self.mr
+    self.issue = fake.MakeTestIssue(
+        789, 1, 'summary', 'New', 111, issue_id=78901)
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.work_env = work_env.WorkEnv(
+        self.mr, self.services, 'Testing')
+    self.issue1 = fake.MakeTestIssue(
+        789, 1, 'sum', 'New', 111, issue_id=78901,
+        labels=[
+            'Launch-M-Approved-71-Stable', 'Launch-M-Target-70-Beta',
+            'Launch-UI-Yes', 'Launch-Privacy-NeedInfo',
+            'pm-jojwang', 'tl-annajo', 'ux-shiba', 'Type-Launch'])
+    self.issue2 = fake.MakeTestIssue(
+        789, 2, 'sum', 'New', 111, issue_id=78902,
+        labels=[
+            'Launch-M-Target-71-Stable', 'Launch-M-Approved-70-Beta',
+            'pm-jojwang', 'tl-annajo', 'OS-Chrome', 'OS-Android',
+            'Type-Launch'])
+    self.issue3 = fake.MakeTestIssue(
+        789, 3, 'sum', 'New', 111, issue_id=78903,
+        labels=['Launch-M-Approved-71-Stable',
+                'Launch-M-Approved-79-Stable-Exp', 'Launch-M-Target-70-Beta',
+                'Launch-M-Target-70-Stable', 'Launch-UI-Yes',
+                'Launch-Exp-Leadership-Yes', 'pm-annajo', 'tl-jojwang',
+                'OS-Chrome', 'Type-Launch'])
+    self.issue4 = fake.MakeTestIssue(
+        789, 4, 'sum', 'New', 111, issue_id=78904,
+        labels=['Launch-UI-Yes', 'OS-Chrome', 'Type-Launch'])
+    self.issue5 = fake.MakeTestIssue(
+        789, 5, 'sum', 'New', 111, issue_id=78905,
+        labels=['Launch-M-Approved-71-Stable',
+                'Launch-M-Approved-79-Stable-Exp', 'Launch-M-Target-70-Beta',
+                'Launch-M-Target-70-Stable', 'Launch-UI-Yes',
+                'Launch-Privacy-NeedInfo', 'Launch-Exp-Leadership-Yes',
+                'pm-annajo', 'tl-jojwang', 'OS-Chrome', 'Type-Launch'])
+
+    self.approval_values = [
+        tracker_pb2.ApprovalValue(
+            approval_id=7, status=tracker_pb2.ApprovalStatus.NOT_SET),
+        tracker_pb2.ApprovalValue(
+            approval_id=8, status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW)]
+    self.phases = [tracker_pb2.Phase(name='Stable', phase_id=88),
+              tracker_pb2.Phase(name='Beta', phase_id=89)]
+
+  def testAssertBasePermission(self):
+    self.mr.auth.user_pb.is_site_admin = True
+    settings.app_id = 'monorail-staging'
+    self.task.AssertBasePermission(self.mr)
+
+    settings.app_id = 'monorail-prod'
+    self.task.AssertBasePermission(self.mr)
+
+    self.mr.auth.user_pb.is_site_admin = False
+    self.assertRaises(permissions.PermissionException,
+                      self.task.AssertBasePermission, self.mr)
+
+  def testHandleRequest(self):
+    # Set up Objects
+    project_info = fltconversion.ProjectInfo(
+        self.config, 'q=query', self.approval_values, self.phases,
+        11, 12, 13, 16, 14, 15, fltconversion.BROWSER_PHASE_MAP,
+        fltconversion.BROWSER_APPROVALS_TO_LABELS,
+        fltconversion.BROWSER_M_LABELS_RE)
+
+    self.config.field_defs = [
+        tracker_pb2.FieldDef(field_id=7, field_name='Chrome-UX',
+                             field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE),
+        tracker_pb2.FieldDef(field_id=8, field_name='Chrome-Privacy',
+                             field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    ]
+
+    # Set up mocks
+    patcher = mock.patch(
+        'search.frontendsearchpipeline.FrontendSearchPipeline',
+        spec=True, visible_results=[self.issue1, self.issue2])
+    mockPipeline = patcher.start()
+
+    self.task.services.issue.GetIssue = mock.Mock(
+        side_effect=[self.issue1, self.issue2])
+
+    self.task.FetchAndAssertProjectInfo = mock.Mock(return_value=project_info)
+
+    with self.work_env as we:
+      we.ListIssues = mock.Mock(return_value=mockPipeline)
+
+    def side_effect(_cnxn, email):
+      if email == 'jojwang@chromium.org':
+        return 111
+      if email == 'annajo@google.com':
+        return 222
+      if email == 'shiba@google.com':
+        return 333
+      raise exceptions.NoSuchUserException
+    self.task.services.user.LookupUserID = mock.Mock(side_effect=side_effect)
+
+    self.task.ExecuteIssueChanges = mock.Mock(return_value=[])
+
+    # Call
+    json = self.task.HandleRequest(self.mr)
+
+    # assert
+    self.assertEqual(json['converted_issues'], [1, 2])
+
+    new_approvals1 = [
+        tracker_pb2.ApprovalValue(
+            approval_id=7, status=tracker_pb2.ApprovalStatus.APPROVED),
+        tracker_pb2.ApprovalValue(
+            approval_id=8, status=tracker_pb2.ApprovalStatus.NEED_INFO)]
+    new_fvs1 = [
+      # M-Approved Stable
+      tracker_bizobj.MakeFieldValue(
+          15, 71, None, None, None, None, False, phase_id=88),
+      # M-Target Beta
+      tracker_bizobj.MakeFieldValue(
+          14, 70, None, None, None, None, False, phase_id=89),
+      # PM field
+      tracker_bizobj.MakeFieldValue(
+          11, None, None, 111, None, None, False),
+      # TL field
+      tracker_bizobj.MakeFieldValue(
+          12, None, None, 222, None, None, False),
+      # UX field
+      tracker_bizobj.MakeFieldValue(
+          16, None, None, 333, None, None, False)
+    ]
+
+
+    new_approvals2 = [
+        tracker_pb2.ApprovalValue(
+            approval_id=7, status=tracker_pb2.ApprovalStatus.NOT_SET),
+        tracker_pb2.ApprovalValue(
+            approval_id=8, status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW)
+    ]
+    new_fvs2 = [
+        tracker_bizobj.MakeFieldValue(
+            14, 71, None, None, None, None, False, phase_id=88),
+        tracker_bizobj.MakeFieldValue(
+            15, 70, None, None, None, None, False, phase_id=89),
+        # PM field
+        tracker_bizobj.MakeFieldValue(
+            11, None, None, 111, None, None, False),
+        # TL field
+        tracker_bizobj.MakeFieldValue(
+            12, None, None, 222, None, None, False)]
+
+    execute_calls = [
+        mock.call(
+            self.config, self.issue1, new_approvals1, self.phases, new_fvs1),
+        mock.call(
+            self.config, self.issue2, new_approvals2, self.phases, new_fvs2)]
+    self.task.ExecuteIssueChanges.assert_has_calls(execute_calls)
+
+    patcher.stop()
+
+  def testHandleRequest_UndoConversion(self):
+    # test Delete() is actually called
+    mr = testing_helpers.MakeMonorailRequest(path='url/url?launch=delete')
+    self.task.UndoConversion = mock.Mock(return_value={'deleteing': [1, 2]})
+    actualReturn = self.task.HandleRequest(mr)
+    self.assertEqual({'deleteing': [1, 2]}, actualReturn)
+
+  def testUndoConversion(self):
+    # Set up objects
+    self.issue1.field_values = [
+        # Test non phase and TL/PM/TE field_values are not deleted
+        tracker_bizobj.MakeFieldValue(
+            17, None, 'strvalue', None, None, None, False)]
+    issue1 = copy.deepcopy(self.issue1)
+    issue2 = copy.deepcopy(self.issue2)
+    fvs = [
+        tracker_bizobj.MakeFieldValue(
+            11, None, None, 222, None, None, False),
+        tracker_bizobj.MakeFieldValue(
+            12, None, None, 111, None, None, False),
+        tracker_bizobj.MakeFieldValue(
+            16, None, None, 111, None, None, False)]
+    self.config.field_defs = [
+        tracker_pb2.FieldDef(field_id=11, field_name='PM'),
+        tracker_pb2.FieldDef(field_id=12, field_name='TL'),
+        tracker_pb2.FieldDef(field_id=13, field_name='TE'),
+        tracker_pb2.FieldDef(field_id=16, field_name='UX')]
+    # Make element edits made during conversion that should be undone.
+    issue1.labels.extend(['Type-FLT-Launch', 'FLT-Conversion'])
+    issue1.labels.remove('Type-Launch')
+    issue2.labels.extend(['Type-FLT-Launch', 'FLT-Conversion'])
+    issue2.labels.remove('Type-Launch')
+    issue1.approval_values = self.approval_values
+    issue2.approval_values = self.approval_values
+    issue1.phases = self.phases
+    issue2.phases = self.phases
+    issue1.field_values.extend(fvs)
+
+    # Set up mocks
+    patcher = mock.patch(
+        'search.frontendsearchpipeline.FrontendSearchPipeline',
+        spec=True, visible_results=[issue1, issue2])  # converted issues
+    mockPipeline = patcher.start()
+    self.task.services.project.GetProjectByName = mock.Mock()
+    self.task.services.config.GetProjectConfig = mock.Mock(
+        return_value=self.config)
+    self.task.services.issue.GetIssue = mock.Mock(
+        side_effect=[issue1, issue2])
+    self.task.services.issue._UpdateIssuesApprovals = mock.Mock()
+    self.task.services.issue.UpdateIssue = mock.Mock()
+
+    with self.work_env as we:
+      we.ListIssues = mock.Mock(return_value=mockPipeline)
+
+    json = self.task.UndoConversion(self.mr)
+    self.assertEqual(json['deleting'], [1, 2])
+    # assert convert issue1 is back to the pre-conversion state, self.issue1.
+    self.assertEqual(issue1, self.issue1)
+    self.assertEqual(issue2, self.issue2)
+
+    # assert UpdateIssue calls were made with pre-conversion state issues.
+    update_calls = [
+        mock.call(self.mr.cnxn, self.issue1),
+        mock.call(self.mr.cnxn, self.issue2)]
+    self.task.services.issue._UpdateIssuesApprovals.assert_has_calls(
+        update_calls)
+    self.task.services.issue.UpdateIssue.assert_has_calls(update_calls)
+    patcher.stop()
+
+  def testVerifyConversion(self):
+    # Set up objects
+    self.issue1.labels.extend(
+        # Launch-M-Target-70-Stable-Exp should be ignored
+        ['Rollout-Type-Default', 'Launch-M-Target-70-Stable-Exp'])
+    self.issue1.phases = [tracker_pb2.Phase(name='Beta', phase_id=1),
+                          tracker_pb2.Phase(name='Stable', phase_id=2)]
+    self.issue1.approval_values = [
+      tracker_pb2.ApprovalValue(
+          approval_id=1, status=tracker_pb2.ApprovalStatus.NOT_SET),
+      tracker_pb2.ApprovalValue(
+          approval_id=2, status=tracker_pb2.ApprovalStatus.APPROVED),
+      tracker_pb2.ApprovalValue(
+          approval_id=3, status=tracker_pb2.ApprovalStatus.NEED_INFO),
+    ]
+    self.issue1.field_values = [
+        # problem = expected field for TL
+        tracker_bizobj.MakeFieldValue(4, None, None, 111, None, None, False),
+        tracker_pb2.FieldValue(field_id=7, int_value=70, phase_id=1),
+        tracker_pb2.FieldValue(field_id=8, int_value=71, phase_id=2),
+    ]
+
+    self.issue2.labels.extend(['Rollout-Type-Finch'])
+    self.issue2.phases = [tracker_pb2.Phase(name='Beta', phase_id=1),
+                          tracker_pb2.Phase(name='Stable-Full', phase_id=2),
+                          tracker_pb2.Phase(name='Stable-Exp', phase_id=3)]
+    self.issue2.approval_values = [
+        tracker_pb2.ApprovalValue(
+            approval_id=1, status=tracker_pb2.ApprovalStatus.NOT_SET),
+        tracker_pb2.ApprovalValue(
+            approval_id=2, status=tracker_pb2.ApprovalStatus.NOT_SET),
+        tracker_pb2.ApprovalValue(
+            # problem = approval Chrome-Privacy has status approved for None
+            approval_id=3, status=tracker_pb2.ApprovalStatus.APPROVED),
+    ]
+    self.issue2.field_values = [
+        # problem = no phase field for label 'Launch-M-Approved-70-Beta'
+        tracker_pb2.FieldValue(field_id=7, int_value=71, phase_id=2),
+        tracker_bizobj.MakeFieldValue(4, None, None, 111, None, None, False),
+        tracker_bizobj.MakeFieldValue(5, None, None, 111, None, None, False),
+        ]
+
+    self.issue3.labels.extend(['Rollout-Type-Default'])
+    self.issue3.phases = [tracker_pb2.Phase(name='Feature Freeze', phase_id=4),
+                          tracker_pb2.Phase(name='Branch', phase_id=5),
+                          tracker_pb2.Phase(name='Stable', phase_id=6)]
+    self.issue3.approval_values = [
+      tracker_pb2.ApprovalValue(
+          approval_id=9, status=tracker_pb2.ApprovalStatus.APPROVED),
+      tracker_pb2.ApprovalValue(
+          approval_id=10, status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW)]
+    # problem = no phase field label Launch-M-Target-70-Stable
+    # problem = missing a field for TL
+    self.issue3.field_values = [
+        tracker_pb2.FieldValue(field_id=8, int_value=71, phase_id=6),
+        tracker_bizobj.MakeFieldValue(4, None, None, 111, None, None, False)
+    ]
+
+    self.issue4.labels.extend(['Rollout-Type-Default'])
+    # problem = incorrect phases for OS default launch
+    self.issue4.phases = [tracker_pb2.Phase(name='Branch', phase_id=5),
+                          tracker_pb2.Phase(name='Stable-Exp', phase_id=7)]
+    # problem = approval ChromeOS-UX has status 'NEEDS_REVIEW'
+    # for label value Yes
+    self.issue4.approval_values = [
+      tracker_pb2.ApprovalValue(
+          approval_id=9, status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW)]
+
+    self.issue5.labels.extend(['Rollout-Type-Finch'])
+    self.issue5.phases = [tracker_pb2.Phase(name='Branch', phase_id=5),
+                          tracker_pb2.Phase(name='Feature Freeze', phase_id=4),
+                          tracker_pb2.Phase(name='Stable-Exp', phase_id=7),
+                          tracker_pb2.Phase(name='Stable-Full', phase_id=8)]
+    self.issue5.approval_values = [
+        tracker_pb2.ApprovalValue(
+            approval_id=9, status=tracker_pb2.ApprovalStatus.APPROVED),
+        # problem = approval ChromeOS-Privacy has status 'REVIEW_REQUESTED'
+        # for label value NeedInfo
+        tracker_pb2.ApprovalValue(
+            approval_id=11, status=tracker_pb2.ApprovalStatus.REVIEW_REQUESTED),
+        # problem = approval ChromeOS-Leadership-Exp has status 'NA' for label
+        # value Yes.
+        tracker_pb2.ApprovalValue(
+            approval_id=13, status=tracker_pb2.ApprovalStatus.NA)
+    ]
+
+    # problem = no phase field for label Launch-M-Approved-79-Stable-Exp
+    # problem = no phase field for label Launch-M-Target-70-Stable
+    self.issue5.field_values = [
+        tracker_pb2.FieldValue(field_id=8, int_value=71, phase_id=8),
+        tracker_bizobj.MakeFieldValue(4, None, None, 111, None, None, False),
+        tracker_bizobj.MakeFieldValue(5, None, None, 111, None, None, False)]
+
+    self.config.field_defs = [
+        tracker_pb2.FieldDef(field_id=1, field_name='Chrome-Test'),
+        tracker_pb2.FieldDef(field_id=2, field_name='Chrome-UX'),
+        tracker_pb2.FieldDef(field_id=3, field_name='Chrome-Privacy'),
+        tracker_pb2.FieldDef(field_id=4, field_name='PM'),
+        tracker_pb2.FieldDef(field_id=5, field_name='TL'),
+        tracker_pb2.FieldDef(field_id=6, field_name='TE'),
+        tracker_pb2.FieldDef(field_id=12, field_name='UX'),
+        tracker_pb2.FieldDef(field_id=7, field_name='M-Target'),
+        tracker_pb2.FieldDef(field_id=8, field_name='M-Approved'),
+        tracker_pb2.FieldDef(field_id=9, field_name='ChromeOS-UX'),
+        tracker_pb2.FieldDef(field_id=10, field_name='ChromeOS-Enterprise'),
+        tracker_pb2.FieldDef(field_id=11, field_name='ChromeOS-Privacy'),
+        tracker_pb2.FieldDef(field_id=13, field_name='ChromeOS-Leadership-Exp')
+    ]
+
+    # Set up mocks
+    patcher = mock.patch(
+        'search.frontendsearchpipeline.FrontendSearchPipeline',
+        spec=True, allowed_results=[
+            self.issue1, self.issue2, self.issue3, self.issue4, self.issue5])
+    mockPipeline = patcher.start()
+    self.task.services.project.GetProjectByName = mock.Mock()
+    self.task.services.config.GetProjectConfig = mock.Mock(
+        return_value=self.config)
+    self.task.services.issue.GetIssue = mock.Mock(
+        side_effect=[
+            self.issue1, self.issue2, self.issue3, self.issue4, self.issue5])
+    self.task.services.user.LookupUserID = mock.Mock(return_value=111)
+    with self.work_env as we:
+      we.ListIssues = mock.Mock(return_value=mockPipeline)
+
+    # Assert
+    json = self.task.VerifyConversion(self.mr)
+    self.assertEqual(json['issues verified'],
+                     ['issue 1', 'issue 2', 'issue 3', 'issue 4', 'issue 5'])
+    problems = json['problems found']
+    expected_problems = [
+        'issue 1: missing a field for TL',
+        'issue 1: missing a field for UX',
+        'issue 2: approval Chrome-Privacy has status \'APPROVED\' for '
+        'label value None',
+        'issue 2: no phase field for label Launch-M-Approved-70-Beta',
+        'issue 3: missing a field for TL',
+        'issue 3: no phase field for label Launch-M-Target-70-Stable',
+        'issue 4: incorrect phases for OS default launch.',
+        'issue 4: approval ChromeOS-UX has status \'NEEDS_REVIEW\' for '
+        'label value Yes',
+        'issue 5: approval ChromeOS-Privacy has status \'REVIEW_REQUESTED\' '
+        'for label value NeedInfo',
+        'issue 5: approval ChromeOS-Leadership-Exp has status \'NA\' for label '
+        'value Yes',
+        'issue 5: no phase field for label Launch-M-Approved-79-Stable-Exp',
+        'issue 5: no phase field for label Launch-M-Target-70-Stable',
+    ]
+    self.assertEqual(problems, expected_problems)
+    patcher.stop()
+
+  def testFetchAndAssertProjectInfo(self):
+
+    # test no 'launch' in request
+    self.assertRaisesRegexp(
+        AssertionError, r'bad launch type:',
+        self.task.FetchAndAssertProjectInfo, self.mr)
+
+    # test bad 'launch' in request
+    mr = testing_helpers.MakeMonorailRequest(path='url/url?launch=bad')
+    self.assertRaisesRegexp(
+        AssertionError, r'bad launch type: bad',
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    self.task.services.project.GetProjectByName = mock.Mock()
+    self.task.services.config.GetProjectConfig = mock.Mock(
+        return_value=self.config)
+
+    mr = testing_helpers.MakeMonorailRequest(path='url/url?launch=default')
+    # test no template
+    self.task.services.template.GetTemplateByName = mock.Mock(
+        return_value=None)
+    self.assertRaisesRegexp(
+        AssertionError, r'not found in chromium project',
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    # test template has no phases/approvals
+    template = tracker_bizobj.MakeIssueTemplate(
+        'template', 'sum', 'New', 111, 'content', [], [], [], [])
+    self.task.services.template.GetTemplateByName = mock.Mock(
+        return_value=template)
+    self.assertRaisesRegexp(
+        AssertionError, 'no approvals or phases in',
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    # test phases not recognized
+    template.phases = [tracker_pb2.Phase(name='WeirdPhase')]
+    template.approval_values = [tracker_pb2.ApprovalValue()]
+    self.assertRaisesRegexp(
+        AssertionError, 'one or more phases not recognized',
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    template.phases = [tracker_pb2.Phase(name='Stable'),
+                       tracker_pb2.Phase(name='Stable-Exp')]
+    template.approval_values = [
+        tracker_pb2.ApprovalValue(approval_id=1),
+        tracker_pb2.ApprovalValue(approval_id=2),
+        tracker_pb2.ApprovalValue(approval_id=3)]
+
+    # test approvals not recognized
+    self.assertRaisesRegexp(
+        AssertionError, 'one or more approvals not recognized',
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    self.config.field_defs = [
+        tracker_pb2.FieldDef(field_id=1, field_name='ChromeOS-Enterprise',
+                             field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE),
+        tracker_pb2.FieldDef(field_id=2, field_name='Chrome-UX',
+                             field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE),
+        tracker_pb2.FieldDef(field_id=3, field_name='Chrome-Privacy',
+                             field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    ]
+
+    # test approvals not in config's approval_defs
+    self.assertRaisesRegexp(
+        AssertionError, 'one or more approvals not in config.approval_defs',
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    self.config.approval_defs = [
+        tracker_pb2.ApprovalDef(approval_id=1),
+        tracker_pb2.ApprovalDef(approval_id=2),
+        tracker_pb2.ApprovalDef(approval_id=3)]
+
+    # test no pm field exists in project
+    self.assertRaisesRegexp(
+        AssertionError, 'project has no FieldDef %s' % fltconversion.PM_FIELD,
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    self.config.field_defs.extend([
+      tracker_pb2.FieldDef(field_id=4, field_name='PM',
+                           field_type=tracker_pb2.FieldTypes.USER_TYPE),
+      tracker_pb2.FieldDef(field_id=5, field_name='TL',
+                           field_type=tracker_pb2.FieldTypes.USER_TYPE),
+      tracker_pb2.FieldDef(field_id=9, field_name='UX',
+                           field_type=tracker_pb2.FieldTypes.USER_TYPE),
+      tracker_pb2.FieldDef(field_id=6, field_name='TE')
+    ])
+
+    # test no USER_TYPE te field exists in project
+    self.assertRaisesRegexp(
+        AssertionError, 'project has no FieldDef %s' % fltconversion.TE_FIELD,
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    self.config.field_defs[-1].field_type = tracker_pb2.FieldTypes.USER_TYPE
+    self.config.field_defs.extend([
+        tracker_pb2.FieldDef(
+            field_id=7, field_name='M-Target', is_phase_field=True),
+        tracker_pb2.FieldDef(
+            field_id=8, field_name='M-Approved', is_multivalued=True,
+            field_type=tracker_pb2.FieldTypes.INT_TYPE)
+        ])
+
+    # test no M-Target INT_TYPE multivalued Phase FieldDefs
+    self.assertRaisesRegexp(
+        AssertionError,
+        'project has no FieldDef %s' % fltconversion.MTARGET_FIELD,
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    self.config.field_defs[-2].field_type = tracker_pb2.FieldTypes.INT_TYPE
+    self.config.field_defs[-2].is_multivalued = True
+
+    # test no M-Approved INT_TYPE multivalued Phase FieldDefs
+    self.assertRaisesRegexp(
+        AssertionError,
+        'project has no FieldDef %s' % fltconversion.MAPPROVED_FIELD,
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    self.config.field_defs[-1].is_phase_field = True
+
+    self.assertEqual(
+        self.task.FetchAndAssertProjectInfo(mr),
+        fltconversion.ProjectInfo(
+            self.config, fltconversion.QUERY_MAP['default'],
+            template.approval_values, template.phases, 4, 5, 6, 9, 7, 8,
+            fltconversion.BROWSER_PHASE_MAP,
+            fltconversion.BROWSER_APPROVALS_TO_LABELS,
+            fltconversion.BROWSER_M_LABELS_RE))
+
+    # FINCH special case
+    # test approvals for Finch not required
+    mr = testing_helpers.MakeMonorailRequest(path='url/url?launch=finch')
+    self.assertRaisesRegexp(
+        AssertionError, 'finch template not set up correctly',
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    for av in template.approval_values:
+      av.status = tracker_pb2.ApprovalStatus.NEEDS_REVIEW
+
+    self.assertEqual(
+        self.task.FetchAndAssertProjectInfo(mr),
+        fltconversion.ProjectInfo(
+            self.config, fltconversion.QUERY_MAP['finch'],
+            template.approval_values, template.phases, 4, 5, 6, 9, 7, 8,
+            fltconversion.BROWSER_PHASE_MAP,
+            fltconversion.BROWSER_APPROVALS_TO_LABELS,
+            fltconversion.BROWSER_M_LABELS_RE))
+
+  def testFetchAndAssertProjectInfo_OS(self):
+    self.task.services.project.GetProjectByName = mock.Mock()
+    self.task.services.config.GetProjectConfig = mock.Mock(
+        return_value=self.config)
+
+    mr = testing_helpers.MakeMonorailRequest(path='url/url?launch=os')
+    template = tracker_bizobj.MakeIssueTemplate(
+        'template', 'sum', 'New', 111, 'content', [], [], [], [])
+    self.task.services.template.GetTemplateByName = mock.Mock(
+        return_value=template)
+
+    # test phases not recognized
+    template.phases = [tracker_pb2.Phase(name='Chrome-Test')]
+    template.approval_values = [tracker_pb2.ApprovalValue()]
+    self.assertRaisesRegexp(
+        AssertionError, 'one or more phases not recognized',
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    template.phases = [tracker_pb2.Phase(name='feature freeze'),
+                       tracker_pb2.Phase(name='branch')]
+
+    # test template not set up correctly
+    template.approval_values = [
+        tracker_pb2.ApprovalValue(approval_id=1),
+        tracker_pb2.ApprovalValue(approval_id=2),
+        tracker_pb2.ApprovalValue(approval_id=3)]
+    self.assertRaisesRegexp(
+        AssertionError, 'os template not set up correctly',
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    for av in template.approval_values:
+      av.status = tracker_pb2.ApprovalStatus.NEEDS_REVIEW
+
+    # test approvals not recognized
+    self.assertRaisesRegexp(
+        AssertionError, 'one or more approvals not recognized',
+        self.task.FetchAndAssertProjectInfo, mr)
+
+    self.config.field_defs = [
+        tracker_pb2.FieldDef(field_id=1, field_name='ChromeOS-Enterprise',
+                             field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE),
+        tracker_pb2.FieldDef(field_id=2, field_name='ChromeOS-UX',
+                             field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE),
+        tracker_pb2.FieldDef(field_id=3, field_name='ChromeOS-Privacy',
+                             field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    ]
+
+    # Skip remaining checks. No different from Browser process.
+    self.config.approval_defs = [
+        tracker_pb2.ApprovalDef(approval_id=1),
+        tracker_pb2.ApprovalDef(approval_id=2),
+        tracker_pb2.ApprovalDef(approval_id=3)]
+
+    self.config.field_defs.extend([
+      tracker_pb2.FieldDef(field_id=4, field_name='PM',
+                           field_type=tracker_pb2.FieldTypes.USER_TYPE),
+      tracker_pb2.FieldDef(field_id=5, field_name='TL',
+                           field_type=tracker_pb2.FieldTypes.USER_TYPE),
+      tracker_pb2.FieldDef(field_id=6, field_name='TE',
+                           field_type=tracker_pb2.FieldTypes.USER_TYPE),
+      tracker_pb2.FieldDef(field_id=9, field_name='UX',
+                           field_type=tracker_pb2.FieldTypes.USER_TYPE)
+    ])
+    self.config.field_defs.extend([
+        tracker_pb2.FieldDef(
+            field_id=7, field_name='M-Target', is_phase_field=True,
+            is_multivalued=True, field_type=tracker_pb2.FieldTypes.INT_TYPE),
+        tracker_pb2.FieldDef(
+            field_id=8, field_name='M-Approved', is_phase_field=True,
+            is_multivalued=True, field_type=tracker_pb2.FieldTypes.INT_TYPE)
+    ])
+
+    self.assertEqual(
+        self.task.FetchAndAssertProjectInfo(mr),
+        fltconversion.ProjectInfo(
+            self.config, fltconversion.QUERY_MAP['os'],
+            template.approval_values, template.phases, 4, 5, 6, 9, 7, 8,
+            fltconversion.OS_PHASE_MAP, fltconversion.OS_APPROVALS_TO_LABELS,
+            fltconversion.OS_M_LABELS_RE))
+
+  @mock.patch('time.time')
+  def testExecuteIssueChanges(self, mockTime):
+    mockTime.return_value = 123
+    self.task.services.issue._UpdateIssuesApprovals = mock.Mock()
+    self.task.services.issue.DeltaUpdateIssue = mock.Mock(
+        return_value=([], None))
+    self.task.services.issue.InsertComment = mock.Mock()
+    self.config.approval_defs = [
+        tracker_pb2.ApprovalDef(
+            # test empty survey
+            approval_id=1, survey='', approver_ids=[111, 222]),
+        tracker_pb2.ApprovalDef(approval_id=2), # test missing survey
+        tracker_pb2.ApprovalDef(survey='Missing approval_id should not error.'),
+        tracker_pb2.ApprovalDef(approval_id=3, survey='Q1\nQ2\n\nQ3'),
+        tracker_pb2.ApprovalDef(approval_id=4, survey='Q1\nQ2\n\nQ3 two'),
+        tracker_pb2.ApprovalDef()]
+
+    new_avs = [tracker_pb2.ApprovalValue(
+        approval_id=1, status=tracker_pb2.ApprovalStatus.APPROVED),
+               tracker_pb2.ApprovalValue(approval_id=4),
+               tracker_pb2.ApprovalValue(approval_id=2),
+               tracker_pb2.ApprovalValue(approval_id=3)]
+
+    phases = [tracker_pb2.Phase(phase_id=1, name='Phase1', rank=1)]
+    new_fvs = [tracker_bizobj.MakeFieldValue(
+        11, 70, None, None, None, None, False, phase_id=1),
+               tracker_bizobj.MakeFieldValue(
+                   12, None, 'strfield', None, None, None, False)]
+    _amendments = self.task.ExecuteIssueChanges(
+        self.config, self.issue, new_avs, phases, new_fvs)
+
+    # approver_ids set in ExecuteIssueChanges()
+    new_avs[0].approver_ids = [111, 222]
+    self.issue.approval_values = new_avs
+    self.issue.phases = phases
+    delta = tracker_pb2.IssueDelta(
+        labels_add=['Type-FLT-Launch', 'FLT-Conversion'],
+        labels_remove=['Type-Launch'], field_vals_add=new_fvs)
+    cmt_1 = tracker_pb2.IssueComment(
+        issue_id=78901, project_id=789, user_id=self.mr.auth.user_id,
+        content='', is_description=True, approval_id=1, timestamp=123)
+    cmt_2 = tracker_pb2.IssueComment(
+        issue_id=78901, project_id=789, user_id=self.mr.auth.user_id,
+        content='', is_description=True, approval_id=2, timestamp=123)
+    cmt_3 = tracker_pb2.IssueComment(
+        issue_id=78901, project_id=789, user_id=self.mr.auth.user_id,
+        content='<b>Q1</b>\n<b>Q2</b>\n<b></b>\n<b>Q3</b>',
+        is_description=True, approval_id=3, timestamp=123)
+    cmt_4 = tracker_pb2.IssueComment(
+        issue_id=78901, project_id=789, user_id=self.mr.auth.user_id,
+        content='<b>Q1</b>\n<b>Q2</b>\n<b></b>\n<b>Q3 two</b>',
+        is_description=True, approval_id=4, timestamp=123)
+
+
+    comment_calls = [mock.call(self.mr.cnxn, cmt_1),
+                     mock.call(self.mr.cnxn, cmt_4),
+                     mock.call(self.mr.cnxn, cmt_2),
+                     mock.call(self.mr.cnxn, cmt_3)]
+    self.task.services.issue.InsertComment.assert_has_calls(comment_calls)
+
+    self.task.services.issue._UpdateIssuesApprovals.assert_called_once_with(
+        self.mr.cnxn, self.issue)
+    self.task.services.issue.DeltaUpdateIssue.assert_called_once_with(
+        self.mr.cnxn, self.task.services, self.mr.auth.user_id, 789,
+        self.config, self.issue, delta,
+        comment=fltconversion.CONVERSION_COMMENT)
+
+  def testConvertPeopleLabels(self):
+    self.task.services.user.LookupUserID = mock.Mock(
+        side_effect=[1, 2, 3, 4, 5, 6])
+    labels = [
+        'pm-u1', 'pm-u2', 'tl-u2', 'test-3', 'test-4', 'ux-u5', 'ux-6']
+    fvs = self.task.ConvertPeopleLabels(self.mr, labels, 11, 12, 13, 14)
+    expected = [
+        tracker_bizobj.MakeFieldValue(11, None, None, 1, None, None, False),
+        tracker_bizobj.MakeFieldValue(12, None, None, 2, None, None, False),
+        tracker_bizobj.MakeFieldValue(13, None, None, 3, None, None, False),
+        tracker_bizobj.MakeFieldValue(13, None, None, 4, None, None, False),
+        tracker_bizobj.MakeFieldValue(14, None, None, 5, None, None, False),
+        tracker_bizobj.MakeFieldValue(14, None, None, 6, None, None, False),
+        ]
+    self.assertEqual(fvs, expected)
+
+  def testConvertPeopleLabels_NoUsers(self):
+    def side_effect(_cnxn, _email):
+      raise exceptions.NoSuchUserException()
+    labels = []
+    self.task.services.user.LookupUserID = mock.Mock(side_effect=side_effect)
+    self.assertFalse(
+        len(self.task.ConvertPeopleLabels(self.mr, labels, 11, 12, 13, 14)))
+
+  def testCreateUserFieldValue_Chromium(self):
+    self.task.services.user.LookupUserID = mock.Mock(return_value=1)
+    actual = self.task.CreateUserFieldValue(self.mr, 'ldap', 11)
+    expected = tracker_bizobj.MakeFieldValue(
+        11, None, None, 1, None, None, False)
+    self.assertEqual(actual, expected)
+    self.task.services.user.LookupUserID.assert_called_once_with(
+        self.mr.cnxn, 'ldap@chromium.org')
+
+  def testCreateUserFieldValue_Goog(self):
+    def side_effect(_cnxn, email):
+      if email.endswith('chromium.org'):
+        raise exceptions.NoSuchUserException()
+      else:
+        return 2
+    self.task.services.user.LookupUserID = mock.Mock(side_effect=side_effect)
+    actual = self.task.CreateUserFieldValue(self.mr, 'ldap', 11)
+    expected = tracker_bizobj.MakeFieldValue(
+        11, None, None, 2, None, None, False)
+    self.assertEqual(actual, expected)
+    self.task.services.user.LookupUserID.assert_any_call(
+        self.mr.cnxn, 'ldap@chromium.org')
+    self.task.services.user.LookupUserID.assert_any_call(
+        self.mr.cnxn, 'ldap@google.com')
+
+  def testCreateUserFieldValue_NoUserFound(self):
+    def side_effect(_cnxn, _email):
+      raise exceptions.NoSuchUserException()
+    self.task.services.user.LookupUserID = mock.Mock(side_effect=side_effect)
+    self.assertIsNone(self.task.CreateUserFieldValue(self.mr, 'ldap', 11))
+
+
+class ConvertMLabels(unittest.TestCase):
+
+  def setUp(self):
+    self.target_id = 24
+    self.approved_id = 27
+    self.beta_phase = tracker_pb2.Phase(phase_id=1, name='bEtA')
+    self.stable_phase = tracker_pb2.Phase(phase_id=2, name='StAbLe')
+    self.stable_full_phase = tracker_pb2.Phase(phase_id=3, name='stable-FULL')
+    self.stable_exp_phase = tracker_pb2.Phase(phase_id=4, name='STABLE-exp')
+    self.feature_freeze_phase = tracker_pb2.Phase(
+        phase_id=5, name='FEATURE Freeze')
+    self.branch_phase = tracker_pb2.Phase(phase_id=6, name='bRANCH')
+
+  def testConvertMLabels_NormalFinch(self):
+
+    phases = [self.stable_exp_phase, self.beta_phase, self.stable_full_phase]
+    labels = [
+        'launch-m-approved-81-beta',  # beta:M-Approved=81
+        'launch-m-target-80-stable-car',  # ignore
+        'a-Launch-M-Target-80-Stable-car',  # ignore
+        'launch-m-target-70-Stable',  # stable-full:M-Target=70
+        'LAUNCH-M-TARGET-71-STABLE',  # stable-full:M-Target=71
+        'launch-m-target-70-stable-exp',  # stable-exp:M-Target=70
+        'launch-m-target-69-stable-exp',  # stable-exp:M-Target=69
+        'launch-M-APPROVED-70-Stable-Exp',  # stable-exp:M-Approved-70
+        'launch-m-approved-73-stable',  # stable-full:M-Approved-73
+        'launch-m-error-73-stable',  # ignore
+        'launch-m-approved-8-stable',  #ignore
+        'irrelevant label-weird',  # ignore
+    ]
+    actual_fvs = fltconversion.ConvertMLabels(
+        labels, phases, self.target_id, self.approved_id,
+        fltconversion.BROWSER_M_LABELS_RE, fltconversion.BROWSER_PHASE_MAP)
+
+    expected_fvs = [
+      tracker_pb2.FieldValue(
+          field_id=self.approved_id, int_value=81,
+          phase_id=self.beta_phase.phase_id, derived=False,),
+      tracker_pb2.FieldValue(
+          field_id=self.target_id, int_value=70,
+          phase_id=self.stable_full_phase.phase_id, derived=False),
+      tracker_pb2.FieldValue(
+          field_id=self.target_id, int_value=71,
+          phase_id=self.stable_full_phase.phase_id, derived=False),
+      tracker_pb2.FieldValue(
+          field_id=self.target_id, int_value=70,
+          phase_id=self.stable_exp_phase.phase_id, derived=False),
+      tracker_pb2.FieldValue(
+          field_id=self.target_id, int_value=69,
+          phase_id=self.stable_exp_phase.phase_id, derived=False),
+      tracker_pb2.FieldValue(
+          field_id=self.approved_id, int_value=70,
+          phase_id=self.stable_exp_phase.phase_id, derived=False),
+      tracker_pb2.FieldValue(
+          field_id=self.approved_id, int_value=73,
+          phase_id=self.stable_full_phase.phase_id, derived=False)
+    ]
+
+    self.assertEqual(actual_fvs, expected_fvs)
+
+  def testConvertMLabels_OS(self):
+    phases = [self.feature_freeze_phase, self.branch_phase, self.stable_phase]
+    labels = [
+        'launch-m-approved-81-beta',  # ignore
+        'launch-m-target-80-stable-car',  # ignore
+        'a-Launch-M-Target-80-Stable-car',  # ignore
+        'launch-m-target-70-Stable',  # stable:M-Target=70
+        'LAUNCH-M-TARGET-71-STABLE',  # stable:M-Target=71
+        'launch-m-target-70-stable-exp',  # ignore
+        'launch-M-APPROVED-70-Stable-Exp',  # ignore
+        'launch-m-approved-73-stable',  # stable:M-Approved-73
+        'launch-m-error-73-stable',  # ignore
+        'launch-m-approved-8-stable',  #ignore
+        'irrelevant label-weird',  # ignore
+        ]
+    actual_fvs = fltconversion.ConvertMLabels(
+        labels, phases, self.target_id, self.approved_id,
+        fltconversion.OS_M_LABELS_RE, fltconversion.OS_PHASE_MAP)
+
+    expected_fvs = [
+      tracker_pb2.FieldValue(
+          field_id=self.target_id, int_value=70,
+          phase_id=self.stable_phase.phase_id, derived=False,),
+      tracker_pb2.FieldValue(
+          field_id=self.target_id, int_value=71,
+          phase_id=self.stable_phase.phase_id, derived=False),
+      tracker_pb2.FieldValue(
+          field_id=self.approved_id, int_value=73,
+          phase_id=self.stable_phase.phase_id, derived=False)
+    ]
+
+    self.assertEqual(actual_fvs, expected_fvs)
+
+
+class ConvertLaunchLabels(unittest.TestCase):
+
+  def setUp(self):
+    self.project_fds = [
+        tracker_pb2.FieldDef(
+            field_id=1, project_id=789, field_name='String',
+            field_type=tracker_pb2.FieldTypes.STR_TYPE),
+        tracker_pb2.FieldDef(
+            field_id=2, project_id=789, field_name='Chrome-UX',
+            field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE),
+        tracker_pb2.FieldDef(
+            field_id=3, project_id=789, field_name='Chrome-Privacy',
+            field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+        ]
+    approvalUX = tracker_pb2.ApprovalValue(
+        approval_id=2, status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW)
+    approvalPrivacy = tracker_pb2.ApprovalValue(approval_id=3)
+    self.approvals = [approvalUX, approvalPrivacy]
+
+  def testConvertLaunchLabels_Normal(self):
+    labels = [
+        'Launch-UX-NotReviewed', 'Launch-Privacy-Yes', 'Launch-NotRelevant']
+    actual = fltconversion.ConvertLaunchLabels(
+        labels, self.approvals, self.project_fds,
+        fltconversion.BROWSER_APPROVALS_TO_LABELS)
+    expected = [
+      tracker_pb2.ApprovalValue(
+          approval_id=2, status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW),
+      tracker_pb2.ApprovalValue(
+          approval_id=3, status=tracker_pb2.ApprovalStatus.APPROVED)
+    ]
+    self.assertEqual(actual, expected)
+
+  def testConvertLaunchLabels_ExtraAndMissingLabels(self):
+    labels = [
+        'Blah-Launch-Privacy-Yes',  # Missing, this is not a valid Label
+        'Launch-Security-Yes',  # Extra, no matching approval in given approvals
+        'Launch-UI-Yes']  # Missing Launch-Privacy
+    actual = fltconversion.ConvertLaunchLabels(
+        labels, self.approvals, self.project_fds,
+        fltconversion.BROWSER_APPROVALS_TO_LABELS)
+    expected = [
+        tracker_pb2.ApprovalValue(
+            approval_id=2, status=tracker_pb2.ApprovalStatus.APPROVED),
+      tracker_pb2.ApprovalValue(
+          approval_id=3, status=tracker_pb2.ApprovalStatus.NOT_SET)
+        ]
+    self.assertEqual(actual, expected)
+
+class ExtractLabelLDAPs(unittest.TestCase):
+
+  def testExtractLabelLDAPs_Normal(self):
+    labels = [
+        'tl-USER1',
+        'pm-',
+        'tL-User2',
+        'test-user4',
+        'PM-USER3',
+        'pm',
+        'test-user5',
+        'test-',
+        'ux-user9']
+    (actual_pm, actual_tl, actual_tests,
+     actual_ux) = fltconversion.ExtractLabelLDAPs(labels)
+    self.assertEqual(actual_pm, 'user3')
+    self.assertEqual(actual_tl, 'user2')
+    self.assertEqual(actual_tests, ['user4', 'user5'])
+    self.assertEqual(actual_ux, ['user9'])
+
+  def testExtractLabelLDAPs_NoLabels(self):
+    (actual_pm, actual_tl, actual_tests,
+     actual_ux) = fltconversion.ExtractLabelLDAPs([])
+    self.assertIsNone(actual_pm)
+    self.assertIsNone(actual_tl)
+    self.assertFalse(len(actual_tests))
+    self.assertFalse(len(actual_ux))
diff --git a/tracker/test/issueadmin_test.py b/tracker/test/issueadmin_test.py
new file mode 100644
index 0000000..751e414
--- /dev/null
+++ b/tracker/test/issueadmin_test.py
@@ -0,0 +1,464 @@
+# 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
+
+"""Tests for the issue admin pages."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mox
+import unittest
+
+from mock import Mock, patch
+
+from framework import permissions
+from framework import urls
+from proto import tracker_pb2
+from services import service_manager
+from services import template_svc
+from testing import fake
+from testing import testing_helpers
+from tracker import issueadmin
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+class TestBase(unittest.TestCase):
+
+  def setUpServlet(self, servlet_factory):
+    # pylint: disable=attribute-defined-outside-init
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        user=fake.UserService(),
+        issue=fake.IssueService(),
+        template=Mock(spec=template_svc.TemplateService),
+        features=fake.FeaturesService())
+    self.servlet = servlet_factory('req', 'res', services=self.services)
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=789, contrib_ids=[333])
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.services.config.StoreConfig(None, self.config)
+    self.cnxn = fake.MonorailConnection()
+    self.mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/admin', project=self.project)
+    self.mox = mox.Mox()
+    self.test_template = tracker_bizobj.MakeIssueTemplate(
+        'Test Template', 'sum', 'New', 111, 'content', [], [], [], [])
+    self.test_template.template_id = 12345
+    self.test_templates = testing_helpers.DefaultTemplates()
+    self.test_templates.append(self.test_template)
+    self.services.template.GetProjectTemplates\
+        .return_value = self.test_templates
+    self.services.template.GetTemplateSetForProject\
+        .return_value = [(12345, 'Test template', 0)]
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def _mockGetUser(self):
+    self.mox.StubOutWithMock(self.services.user, 'GetUser')
+    user = self.services.user.TestAddUser('user@invalid', 100)
+    self.services.user.GetUser(
+        mox.IgnoreArg(), mox.IgnoreArg()).MultipleTimes().AndReturn(user)
+
+
+class IssueAdminBaseTest(TestBase):
+
+  def setUp(self):
+    super(IssueAdminBaseTest, self).setUpServlet(issueadmin.IssueAdminBase)
+
+  def testGatherPageData(self):
+    self._mockGetUser()
+    self.mox.ReplayAll()
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.mox.VerifyAll()
+
+    self.assertItemsEqual(
+        ['admin_tab_mode', 'config', 'open_text', 'closed_text', 'labels_text'],
+        list(page_data.keys()))
+    config_view = page_data['config']
+    self.assertEqual(789, config_view.project_id)
+
+
+class AdminStatusesTest(TestBase):
+
+  def setUp(self):
+    super(AdminStatusesTest, self).setUpServlet(issueadmin.AdminStatuses)
+
+  @patch('framework.servlet.Servlet.PleaseCorrect')
+  def testProcessSubtabForm_MissingInput(self, mock_pc):
+    post_data = fake.PostData()
+    next_url = self.servlet.ProcessSubtabForm(post_data, self.mr)
+    self.assertIsNone(next_url)
+    mock_pc.assert_called_once()
+    self.assertEqual(len(tracker_constants.DEFAULT_WELL_KNOWN_STATUSES),
+                     len(self.config.well_known_statuses))
+    self.assertEqual(tracker_constants.DEFAULT_STATUSES_OFFER_MERGE,
+                     self.config.statuses_offer_merge)
+
+  @patch('framework.servlet.Servlet.PleaseCorrect')
+  def testProcessSubtabForm_EmptyInput(self, mock_pc):
+    post_data = fake.PostData(
+        predefinedopen=[''], predefinedclosed=[''], statuses_offer_merge=[''])
+    next_url = self.servlet.ProcessSubtabForm(post_data, self.mr)
+    self.assertIsNone(next_url)
+    mock_pc.assert_called_once()
+    self.assertEqual(len(tracker_constants.DEFAULT_WELL_KNOWN_STATUSES),
+                     len(self.config.well_known_statuses))
+    self.assertEqual(tracker_constants.DEFAULT_STATUSES_OFFER_MERGE,
+                     self.config.statuses_offer_merge)
+
+  def testProcessSubtabForm_Normal(self):
+    post_data = fake.PostData(
+        predefinedopen=['New = newly reported'],
+        predefinedclosed=['Fixed\nDuplicate'],
+        statuses_offer_merge=['Duplicate'])
+    next_url = self.servlet.ProcessSubtabForm(post_data, self.mr)
+    self.assertEqual(urls.ADMIN_STATUSES, next_url)
+    self.assertEqual(3, len(self.config.well_known_statuses))
+    self.assertEqual('New', self.config.well_known_statuses[0].status)
+    self.assertTrue(self.config.well_known_statuses[0].means_open)
+    self.assertEqual('Fixed', self.config.well_known_statuses[1].status)
+    self.assertFalse(self.config.well_known_statuses[1].means_open)
+    self.assertEqual('Duplicate', self.config.well_known_statuses[2].status)
+    self.assertFalse(self.config.well_known_statuses[2].means_open)
+    self.assertEqual(['Duplicate'], self.config.statuses_offer_merge)
+
+
+class AdminLabelsTest(TestBase):
+
+  def setUp(self):
+    super(AdminLabelsTest, self).setUpServlet(issueadmin.AdminLabels)
+
+  def testGatherPageData(self):
+    self._mockGetUser()
+    self.mox.ReplayAll()
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.mox.VerifyAll()
+
+    self.assertItemsEqual(
+        ['admin_tab_mode', 'config', 'field_defs',
+         'open_text', 'closed_text', 'labels_text'],
+        list(page_data.keys()))
+    config_view = page_data['config']
+    self.assertEqual(789, config_view.project_id)
+    self.assertEqual([], page_data['field_defs'])
+
+  @patch('framework.servlet.Servlet.PleaseCorrect')
+  def testProcessSubtabForm_MissingInput(self, mock_pc):
+    post_data = fake.PostData()
+    next_url = self.servlet.ProcessSubtabForm(post_data, self.mr)
+    self.assertIsNone(next_url)
+    mock_pc.assert_called_once()
+    self.assertEqual(len(tracker_constants.DEFAULT_WELL_KNOWN_LABELS),
+                     len(self.config.well_known_labels))
+    self.assertEqual(tracker_constants.DEFAULT_EXCL_LABEL_PREFIXES,
+                     self.config.exclusive_label_prefixes)
+
+  @patch('framework.servlet.Servlet.PleaseCorrect')
+  def testProcessSubtabForm_EmptyInput(self, mock_pc):
+    post_data = fake.PostData(
+        predefinedlabels=[''], excl_prefixes=[''])
+    next_url = self.servlet.ProcessSubtabForm(post_data, self.mr)
+    self.assertIsNone(next_url)  # Because PleaseCorrect() was called.
+    mock_pc.assert_called_once()
+    self.assertEqual(len(tracker_constants.DEFAULT_WELL_KNOWN_LABELS),
+                     len(self.config.well_known_labels))
+    self.assertEqual(tracker_constants.DEFAULT_EXCL_LABEL_PREFIXES,
+                     self.config.exclusive_label_prefixes)
+
+  def testProcessSubtabForm_Normal(self):
+    post_data = fake.PostData(
+        predefinedlabels=['Pri-0 = Burning issue\nPri-4 = It can wait'],
+        excl_prefixes=['pri'])
+    next_url = self.servlet.ProcessSubtabForm(post_data, self.mr)
+    self.assertEqual(urls.ADMIN_LABELS, next_url)
+    self.assertEqual(2, len(self.config.well_known_labels))
+    self.assertEqual('Pri-0', self.config.well_known_labels[0].label)
+    self.assertEqual('Pri-4', self.config.well_known_labels[1].label)
+    self.assertEqual(['pri'], self.config.exclusive_label_prefixes)
+
+  @patch('framework.servlet.Servlet.PleaseCorrect')
+  def testProcessSubtabForm_Duplicates(self, mock_pc):
+    post_data = fake.PostData(
+        predefinedlabels=['Pri-0\nPri-4\npri-0'],
+        excl_prefixes=['pri'])
+    next_url = self.servlet.ProcessSubtabForm(post_data, self.mr)
+    self.assertIsNone(next_url)
+    mock_pc.assert_called_once()
+    self.assertEqual(
+        'Duplicate label: pri-0',
+        self.mr.errors.label_defs)
+
+  @patch('framework.servlet.Servlet.PleaseCorrect')
+  def testProcessSubtabForm_Conflict(self, mock_pc):
+    post_data = fake.PostData(
+        predefinedlabels=['Multi-Part-One\nPri-4\npri-0'],
+        excl_prefixes=['pri'])
+    self.config.field_defs = [
+        tracker_pb2.FieldDef(
+            field_name='Multi-Part',
+            field_type=tracker_pb2.FieldTypes.ENUM_TYPE)]
+    next_url = self.servlet.ProcessSubtabForm(post_data, self.mr)
+    self.assertIsNone(next_url)
+    mock_pc.assert_called_once()
+    self.assertEqual(
+        'Label "Multi-Part-One" should be defined in enum "multi-part"',
+        self.mr.errors.label_defs)
+
+
+class AdminTemplatesTest(TestBase):
+
+  def setUp(self):
+    super(AdminTemplatesTest, self).setUpServlet(issueadmin.AdminTemplates)
+    self.mr.auth.user_id = 333
+    self.mr.auth.effective_ids = {333}
+
+  def testGatherPageData(self):
+    self._mockGetUser()
+    self.mox.ReplayAll()
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.mox.VerifyAll()
+
+    config_view = page_data['config']
+    self.assertEqual(789, config_view.project_id)
+
+  def testProcessSubtabForm_NoEditProjectPerm(self):
+    """If user lacks perms, raise an exception."""
+    post_data = fake.PostData(
+        default_template_for_developers=['Test Template'],
+        default_template_for_users=['Test Template'])
+    self.mr.perms = permissions.EMPTY_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.ProcessSubtabForm, post_data, self.mr)
+    self.assertEqual(0, self.config.default_template_for_developers)
+    self.assertEqual(0, self.config.default_template_for_users)
+
+  def testProcessSubtabForm_Normal(self):
+    """If user has perms, set default templates."""
+    post_data = fake.PostData(
+        default_template_for_developers=['Test Template'],
+        default_template_for_users=['Test Template'])
+    next_url = self.servlet.ProcessSubtabForm(post_data, self.mr)
+    self.assertEqual(urls.ADMIN_TEMPLATES, next_url)
+    self.assertEqual(12345, self.config.default_template_for_developers)
+    self.assertEqual(12345, self.config.default_template_for_users)
+
+  def testParseDefaultTemplateSelections_NotSpecified(self):
+    post_data = fake.PostData()
+    for_devs, for_users = self.servlet._ParseDefaultTemplateSelections(
+        post_data, self.test_templates)
+    self.assertEqual(None, for_devs)
+    self.assertEqual(None, for_users)
+
+  def testParseDefaultTemplateSelections_TemplateNotFoundIsIgnored(self):
+    post_data = fake.PostData(
+        default_template_for_developers=['Bad value'],
+        default_template_for_users=['Bad value'])
+    for_devs, for_users = self.servlet._ParseDefaultTemplateSelections(
+        post_data, self.test_templates)
+    self.assertEqual(None, for_devs)
+    self.assertEqual(None, for_users)
+
+  def testParseDefaultTemplateSelections_Normal(self):
+    post_data = fake.PostData(
+        default_template_for_developers=['Test Template'],
+        default_template_for_users=['Test Template'])
+    for_devs, for_users = self.servlet._ParseDefaultTemplateSelections(
+        post_data, self.test_templates)
+    self.assertEqual(12345, for_devs)
+    self.assertEqual(12345, for_users)
+
+
+class AdminComponentsTest(TestBase):
+
+  def setUp(self):
+    super(AdminComponentsTest, self).setUpServlet(issueadmin.AdminComponents)
+    self.cd_clean = tracker_bizobj.MakeComponentDef(
+        1, self.project.project_id, 'BackEnd', 'doc', False, [], [111], 100000,
+        122, 10000000, 133)
+    self.cd_with_subcomp = tracker_bizobj.MakeComponentDef(
+        2, self.project.project_id, 'FrontEnd', 'doc', False, [], [111],
+        100000, 122, 10000000, 133)
+    self.subcd = tracker_bizobj.MakeComponentDef(
+        3, self.project.project_id, 'FrontEnd>Worker', 'doc', False, [], [111],
+        100000, 122, 10000000, 133)
+    self.cd_with_template = tracker_bizobj.MakeComponentDef(
+        4, self.project.project_id, 'Middle', 'doc', False, [], [111],
+        100000, 122, 10000000, 133)
+
+  def testGatherPageData(self):
+    self._mockGetUser()
+    self.mox.ReplayAll()
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.mox.VerifyAll()
+    self.assertItemsEqual(
+        ['admin_tab_mode', 'failed_templ', 'component_defs', 'failed_perm',
+         'config', 'failed_subcomp',
+         'open_text', 'closed_text', 'labels_text'],
+        list(page_data.keys()))
+    config_view = page_data['config']
+    self.assertEqual(789, config_view.project_id)
+    self.assertEqual([], page_data['component_defs'])
+
+  def testProcessFormData_NoErrors(self):
+    self.config.component_defs = [
+        self.cd_clean, self.cd_with_subcomp, self.subcd, self.cd_with_template]
+    self.services.template.TemplatesWithComponent.return_value = []
+    post_data = {
+        'delete_components' : '%s,%s,%s' % (
+            self.cd_clean.path, self.cd_with_subcomp.path, self.subcd.path)}
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue(
+        url.startswith('http://127.0.0.1/p/proj/adminComponents?deleted='
+                       'FrontEnd%3EWorker%2CFrontEnd%2CBackEnd&failed_perm=&'
+                       'failed_subcomp=&failed_templ=&ts='))
+
+  def testProcessFormData_SubCompError(self):
+    self.config.component_defs = [
+        self.cd_clean, self.cd_with_subcomp, self.subcd, self.cd_with_template]
+    self.services.template.TemplatesWithComponent.return_value = []
+    post_data = {
+        'delete_components' : '%s,%s' % (
+            self.cd_clean.path, self.cd_with_subcomp.path)}
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue(
+        url.startswith('http://127.0.0.1/p/proj/adminComponents?deleted='
+                       'BackEnd&failed_perm=&failed_subcomp=FrontEnd&'
+                       'failed_templ=&ts='))
+
+  def testProcessFormData_TemplateError(self):
+    self.config.component_defs = [
+        self.cd_clean, self.cd_with_subcomp, self.subcd, self.cd_with_template]
+
+    def mockTemplatesWithComponent(_cnxn, component_id):
+      if component_id == 4:
+        return 'template'
+    self.services.template.TemplatesWithComponent\
+        .side_effect = mockTemplatesWithComponent
+
+    post_data = {
+        'delete_components' : '%s,%s,%s,%s' % (
+            self.cd_clean.path, self.cd_with_subcomp.path, self.subcd.path,
+            self.cd_with_template.path)}
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue(
+        url.startswith('http://127.0.0.1/p/proj/adminComponents?deleted='
+                       'FrontEnd%3EWorker%2CFrontEnd%2CBackEnd&failed_perm=&'
+                       'failed_subcomp=&failed_templ=Middle&ts='))
+
+
+class AdminViewsTest(TestBase):
+
+  def setUp(self):
+    super(AdminViewsTest, self).setUpServlet(issueadmin.AdminViews)
+
+  def testGatherPageData(self):
+    self._mockGetUser()
+    self.mox.ReplayAll()
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.mox.VerifyAll()
+
+    self.assertItemsEqual(
+        ['canned_queries', 'admin_tab_mode', 'config', 'issue_notify',
+         'new_query_indexes', 'max_queries',
+         'open_text', 'closed_text', 'labels_text'],
+        list(page_data.keys()))
+    config_view = page_data['config']
+    self.assertEqual(789, config_view.project_id)
+
+  def testProcessSubtabForm(self):
+    post_data = fake.PostData(
+        default_col_spec=['id pri mstone owner status summary'],
+        default_sort_spec=['mstone pri'],
+        default_x_attr=['owner'], default_y_attr=['mstone'])
+    next_url = self.servlet.ProcessSubtabForm(post_data, self.mr)
+    self.assertEqual(urls.ADMIN_VIEWS, next_url)
+    self.assertEqual(
+        'id pri mstone owner status summary', self.config.default_col_spec)
+    self.assertEqual('mstone pri', self.config.default_sort_spec)
+    self.assertEqual('owner', self.config.default_x_attr)
+    self.assertEqual('mstone', self.config.default_y_attr)
+
+
+class AdminViewsFunctionsTest(unittest.TestCase):
+
+  def testParseListPreferences(self):
+    # If no input, col_spec will be default column spec.
+    # For other fiels empty strings should be returned.
+    (col_spec, sort_spec, x_attr, y_attr, member_default_query,
+     ) = issueadmin._ParseListPreferences({})
+    self.assertEqual(tracker_constants.DEFAULT_COL_SPEC, col_spec)
+    self.assertEqual('', sort_spec)
+    self.assertEqual('', x_attr)
+    self.assertEqual('', y_attr)
+    self.assertEqual('', member_default_query)
+
+    # Test how hyphens in input are treated.
+    spec = 'label1-sub1  label2  label3-sub3'
+    (col_spec, sort_spec, x_attr, y_attr, member_default_query,
+     ) = issueadmin._ParseListPreferences(
+        fake.PostData(default_col_spec=[spec],
+                      default_sort_spec=[spec],
+                      default_x_attr=[spec],
+                      default_y_attr=[spec]),
+        )
+
+    # Hyphens (and anything following) should be stripped from each term.
+    self.assertEqual('label1-sub1 label2 label3-sub3', col_spec)
+
+    # The sort spec should be as given (except with whitespace condensed).
+    self.assertEqual(' '.join(spec.split()), sort_spec)
+
+    # Only the first term (up to the first hyphen) should be used for x- or
+    # y-attr.
+    self.assertEqual('label1-sub1', x_attr)
+    self.assertEqual('label1-sub1', y_attr)
+
+    # Test that multibyte strings are not mangled.
+    spec = ('\xe7\xaa\xbf\xe8\x8b\xa5-\xe7\xb9\xb9 '
+            '\xe5\x9c\xb0\xe3\x81\xa6-\xe5\xbd\x93-\xe3\x81\xbe\xe3\x81\x99')
+    spec = spec.decode('utf-8')
+    (col_spec, sort_spec, x_attr, y_attr, member_default_query,
+     ) = issueadmin._ParseListPreferences(
+        fake.PostData(default_col_spec=[spec],
+                      default_sort_spec=[spec],
+                      default_x_attr=[spec],
+                      default_y_attr=[spec],
+                      member_default_query=[spec]),
+        )
+    self.assertEqual(spec, col_spec)
+    self.assertEqual(' '.join(spec.split()), sort_spec)
+    self.assertEqual('\xe7\xaa\xbf\xe8\x8b\xa5-\xe7\xb9\xb9'.decode('utf-8'),
+                     x_attr)
+    self.assertEqual('\xe7\xaa\xbf\xe8\x8b\xa5-\xe7\xb9\xb9'.decode('utf-8'),
+                     y_attr)
+    self.assertEqual(spec, member_default_query)
+
+
+class AdminRulesTest(TestBase):
+
+  def setUp(self):
+    super(AdminRulesTest, self).setUpServlet(issueadmin.AdminRules)
+
+  def testGatherPageData(self):
+    self._mockGetUser()
+    self.mox.ReplayAll()
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.mox.VerifyAll()
+
+    self.assertItemsEqual(
+        ['admin_tab_mode', 'config', 'rules', 'new_rule_indexes',
+         'max_rules', 'open_text', 'closed_text', 'labels_text'],
+        list(page_data.keys()))
+    config_view = page_data['config']
+    self.assertEqual(789, config_view.project_id)
+    self.assertEqual([], page_data['rules'])
+
+  def testProcessSubtabForm(self):
+    pass  # TODO(jrobbins): write this test
diff --git a/tracker/test/issueadvsearch_test.py b/tracker/test/issueadvsearch_test.py
new file mode 100644
index 0000000..fd1ee2e
--- /dev/null
+++ b/tracker/test/issueadvsearch_test.py
@@ -0,0 +1,78 @@
+# 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
+
+"""Tests for monorail.tracker.issueadvsearch."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import issueadvsearch
+
+class IssueAdvSearchTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        features=fake.FeaturesService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        project=fake.ProjectService())
+    self.project = self.services.project.TestAddProject('proj', project_id=987)
+    self.servlet = issueadvsearch.IssueAdvancedSearch(
+        'req', 'res', services=self.services)
+
+  def testGatherData(self):
+    mr = testing_helpers.MakeMonorailRequest(
+      path='/p/proj/issues/advsearch')
+    page_data = self.servlet.GatherPageData(mr)
+
+    self.assertTrue('issue_tab_mode' in page_data)
+    self.assertTrue('page_perms' in page_data)
+
+  def testProcessFormData(self):
+    mr = testing_helpers.MakeMonorailRequest(
+      path='/p/proj/issues/advsearch')
+    post_data = {}
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.assertTrue('can=2' in url)
+
+    post_data['can'] = 42
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.assertTrue('can=42' in url)
+
+    post_data['starcount'] = 42
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.assertTrue('starcount%3A42' in url)
+
+    post_data['starcount'] = -1
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.assertTrue('starcount' not in url)
+
+  def _testAND(self, operator, field, post_data, query):
+    self.servlet._AccumulateANDTerm(operator, field, post_data, query)
+    return query
+
+  def test_AccumulateANDTerm(self):
+    query = self._testAND('', 'foo', {'foo': 'bar'}, [])
+    self.assertEqual(['bar'], query)
+
+    query = self._testAND('', 'bar', {'bar': 'baz=zippy'}, query)
+    self.assertEqual(['bar', 'baz', 'zippy'], query)
+
+  def _testOR(self, operator, field, post_data, query):
+    self.servlet._AccumulateORTerm(operator, field, post_data, query)
+    return query
+
+  def test_AccumulateORTerm(self):
+    query = self._testOR('', 'foo', {'foo': 'bar'}, [])
+    self.assertEqual(['bar'], query)
+
+    query = self._testOR('', 'bar', {'bar': 'baz=zippy'}, query)
+    self.assertEqual(['bar', 'baz,zippy'], query)
diff --git a/tracker/test/issueattachment_test.py b/tracker/test/issueattachment_test.py
new file mode 100644
index 0000000..8c65014
--- /dev/null
+++ b/tracker/test/issueattachment_test.py
@@ -0,0 +1,198 @@
+# 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
+
+"""Tests for monorail.tracker.issueattachment."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from google.appengine.api import images
+from google.appengine.ext import testbed
+
+import mox
+import webapp2
+
+from framework import gcs_helpers
+from framework import permissions
+from framework import servlet
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import attachment_helpers
+from tracker import issueattachment
+from tracker import tracker_helpers
+
+from third_party import cloudstorage
+
+
+class IssueattachmentTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_app_identity_stub()
+    self.testbed.init_urlfetch_stub()
+    self.attachment_data = ""
+
+    self._old_gcs_open = cloudstorage.open
+    cloudstorage.open = fake.gcs_open
+
+    services = service_manager.Services(
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService())
+    self.project = services.project.TestAddProject('proj')
+    self.servlet = issueattachment.AttachmentPage(
+        'req', webapp2.Response(), services=services)
+    services.user.TestAddUser('commenter@example.com', 111)
+    self.issue = fake.MakeTestIssue(
+        self.project.project_id, 1, 'summary', 'New', 111)
+    services.issue.TestAddIssue(self.issue)
+    self.comment = tracker_pb2.IssueComment(
+        id=123, issue_id=self.issue.issue_id,
+        project_id=self.project.project_id, user_id=111,
+        content='this is a comment')
+    services.issue.TestAddComment(self.comment, self.issue.local_id)
+    self.attachment = tracker_pb2.Attachment(
+        attachment_id=54321, filename='hello.txt', filesize=23432,
+        mimetype='text/plain', gcs_object_id='/pid/attachments/object_id')
+    services.issue.TestAddAttachment(
+        self.attachment, self.comment.id, self.issue.issue_id)
+    self.orig_sign_attachment_id = attachment_helpers.SignAttachmentID
+    attachment_helpers.SignAttachmentID = (
+        lambda aid: 'signed_%d' % aid)
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+    self.testbed.deactivate()
+    cloudstorage.open = self._old_gcs_open
+    attachment_helpers.SignAttachmentID = self.orig_sign_attachment_id
+
+  def testGatherPageData_NotFound(self):
+    aid = 12345
+    path = '/p/proj/issues/attachment?aid=%s&signed_aid=signed_%d' % (
+        aid, aid)
+    # But, no such attachment is in the database.
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project, path=path,
+        perms=permissions.EMPTY_PERMISSIONSET)
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.servlet.GatherPageData(mr)
+    self.assertEqual(404, cm.exception.code)
+
+  # TODO(jrobbins): test cases for missing comment and missing issue.
+
+  def testGatherPageData_PermissionDenied(self):
+    aid = self.attachment.attachment_id
+    path = '/p/proj/issues/attachment?aid=%s&signed_aid=signed_%d' % (
+        aid, aid)
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project, path=path,
+        perms=permissions.EMPTY_PERMISSIONSET)  # not even VIEW
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.GatherPageData, mr)
+
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project, path=path,
+        perms=permissions.READ_ONLY_PERMISSIONSET)  # includes VIEW
+
+    # issue is now deleted
+    self.issue.deleted = True
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.GatherPageData, mr)
+    self.issue.deleted = False
+
+    # issue is now restricted
+    self.issue.labels.extend(['Restrict-View-PermYouLack'])
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.GatherPageData, mr)
+
+  def testGatherPageData_Download_WithDisposition(self):
+    aid = self.attachment.attachment_id
+    self.mox.StubOutWithMock(gcs_helpers, 'MaybeCreateDownload')
+    gcs_helpers.MaybeCreateDownload(
+        'app_default_bucket',
+        '/pid/attachments/object_id',
+        self.attachment.filename).AndReturn(True)
+    self.mox.StubOutWithMock(gcs_helpers, 'SignUrl')
+    gcs_helpers.SignUrl(
+        'app_default_bucket',
+        '/pid/attachments/object_id-download'
+        ).AndReturn('googleusercontent.com/...-download...')
+    self.mox.StubOutWithMock(self.servlet, 'redirect')
+    path = '/p/proj/issues/attachment?aid=%s&signed_aid=signed_%d' % (
+        aid, aid)
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project, path=path,
+        perms=permissions.READ_ONLY_PERMISSIONSET)  # includes VIEW
+    self.servlet.redirect(
+      mox.And(mox.StrContains('googleusercontent.com'),
+              mox.StrContains('-download')), abort=True)
+    self.mox.ReplayAll()
+    self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+
+  def testGatherPageData_Download_WithoutDisposition(self):
+    aid = self.attachment.attachment_id
+    path = '/p/proj/issues/attachment?aid=%s&signed_aid=signed_%d' % (
+        aid, aid)
+    self.mox.StubOutWithMock(gcs_helpers, 'MaybeCreateDownload')
+    gcs_helpers.MaybeCreateDownload(
+        'app_default_bucket',
+        '/pid/attachments/object_id',
+        self.attachment.filename).AndReturn(False)
+    self.mox.StubOutWithMock(gcs_helpers, 'SignUrl')
+    gcs_helpers.SignUrl(
+        'app_default_bucket',
+        '/pid/attachments/object_id'
+        ).AndReturn('googleusercontent.com/...')
+    self.mox.StubOutWithMock(self.servlet, 'redirect')
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project, path=path,
+        perms=permissions.READ_ONLY_PERMISSIONSET)  # includes VIEW
+    self.servlet.redirect(
+      mox.And(mox.StrContains('googleusercontent.com'),
+              mox.Not(mox.StrContains('-download'))), abort=True)
+    self.mox.ReplayAll()
+    self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+
+  def testGatherPageData_DownloadBadFilename(self):
+    aid = self.attachment.attachment_id
+    path = '/p/proj/issues/attachment?aid=%s&signed_aid=signed_%d' % (
+        aid, aid)
+    self.attachment.filename = '<script>alert("xsrf")</script>.txt';
+    safe_filename = 'attachment-%d.dat' % aid
+    self.mox.StubOutWithMock(gcs_helpers, 'MaybeCreateDownload')
+    gcs_helpers.MaybeCreateDownload(
+        'app_default_bucket',
+        '/pid/attachments/object_id',
+        safe_filename).AndReturn(True)
+    self.mox.StubOutWithMock(gcs_helpers, 'SignUrl')
+    gcs_helpers.SignUrl(
+        'app_default_bucket',
+        '/pid/attachments/object_id-download'
+        ).AndReturn('googleusercontent.com/...-download...')
+    self.mox.StubOutWithMock(self.servlet, 'redirect')
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project,
+        path=path,
+        perms=permissions.READ_ONLY_PERMISSIONSET)  # includes VIEW
+    self.servlet.redirect(mox.And(
+        mox.Not(mox.StrContains(self.attachment.filename)),
+        mox.StrContains('googleusercontent.com')), abort=True)
+    self.mox.ReplayAll()
+    self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
diff --git a/tracker/test/issueattachmenttext_test.py b/tracker/test/issueattachmenttext_test.py
new file mode 100644
index 0000000..187aa42
--- /dev/null
+++ b/tracker/test/issueattachmenttext_test.py
@@ -0,0 +1,191 @@
+# 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
+
+"""Tests for issueattachmenttext."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import unittest
+from mock import patch
+
+from google.appengine.ext import testbed
+
+from third_party import cloudstorage
+import ezt
+
+import webapp2
+
+from framework import filecontent
+from framework import permissions
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import issueattachmenttext
+
+
+class IssueAttachmentTextTest(unittest.TestCase):
+
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_app_identity_stub()
+
+    services = service_manager.Services(
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService())
+    self.project = services.project.TestAddProject('proj')
+    self.servlet = issueattachmenttext.AttachmentText(
+        'req', 'res', services=services)
+
+    services.user.TestAddUser('commenter@example.com', 111)
+
+    self.issue = tracker_pb2.Issue()
+    self.issue.local_id = 1
+    self.issue.issue_id = 1
+    self.issue.summary = 'sum'
+    self.issue.project_name = 'proj'
+    self.issue.project_id = self.project.project_id
+    services.issue.TestAddIssue(self.issue)
+
+    self.comment0 = tracker_pb2.IssueComment()
+    self.comment0.content = 'this is the description'
+    self.comment0.user_id = 111
+    self.comment1 = tracker_pb2.IssueComment()
+    self.comment1.content = 'this is a comment'
+    self.comment1.user_id = 111
+
+    self.attach0 = tracker_pb2.Attachment(
+        attachment_id=4567, filename='b.txt', mimetype='text/plain',
+        gcs_object_id='/pid/attachments/abcd')
+    self.comment0.attachments.append(self.attach0)
+
+    self.attach1 = tracker_pb2.Attachment(
+        attachment_id=1234, filename='a.txt', mimetype='text/plain',
+        gcs_object_id='/pid/attachments/abcdefg')
+    self.comment0.attachments.append(self.attach1)
+
+    self.bin_attach = tracker_pb2.Attachment(
+        attachment_id=2468, mimetype='application/octets',
+        gcs_object_id='/pid/attachments/\0\0\0\0\0\1\2\3')
+    self.comment1.attachments.append(self.bin_attach)
+
+    self.comment0.project_id = self.project.project_id
+    services.issue.TestAddComment(self.comment0, self.issue.local_id)
+    self.comment1.project_id = self.project.project_id
+    services.issue.TestAddComment(self.comment1, self.issue.local_id)
+    services.issue.TestAddAttachment(
+        self.attach0, self.comment0.id, self.issue.issue_id)
+    services.issue.TestAddAttachment(
+        self.attach1, self.comment1.id, self.issue.issue_id)
+    # TODO(jrobbins): add tests for binary content
+    self._old_gcs_open = cloudstorage.open
+    cloudstorage.open = fake.gcs_open
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    cloudstorage.open = self._old_gcs_open
+
+  def testGatherPageData_CommentDeleted(self):
+    """If the attachment's comment was deleted, give a 403."""
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project,
+        path='/a/d.com/p/proj/issues/attachmentText?aid=1234',
+        perms=permissions.READ_ONLY_PERMISSIONSET)
+    self.servlet.GatherPageData(mr)  # OK
+    self.comment1.deleted_by = 111
+    self.assertRaises(  # 403
+        permissions.PermissionException,
+        self.servlet.GatherPageData, mr)
+
+  def testGatherPageData_IssueNotViewable(self):
+    """If the attachment's issue is not viewable, give a 403."""
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project,
+        path='/p/proj/issues/attachment?aid=1234',
+        perms=permissions.EMPTY_PERMISSIONSET)  # No VIEW
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.GatherPageData, mr)
+
+  def testGatherPageData_IssueDeleted(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project,
+        path='/p/proj/issues/attachment?aid=1234',
+        perms=permissions.READ_ONLY_PERMISSIONSET)
+    self.issue.deleted = True
+    self.assertRaises(  # Issue was deleted
+        permissions.PermissionException,
+        self.servlet.GatherPageData, mr)
+
+  def testGatherPageData_IssueRestricted(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project,
+        path='/p/proj/issues/attachment?aid=1234',
+        perms=permissions.READ_ONLY_PERMISSIONSET)
+    self.issue.labels.append('Restrict-View-Nobody')
+    self.assertRaises(  # Issue is restricted
+        permissions.PermissionException,
+        self.servlet.GatherPageData, mr)
+
+  def testGatherPageData_NoSuchAttachment(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project,
+        path='/p/proj/issues/attachmentText?aid=9999',
+        perms=permissions.READ_ONLY_PERMISSIONSET)
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.servlet.GatherPageData(mr)
+    self.assertEqual(404, cm.exception.code)
+
+  def testGatherPageData_AttachmentDeleted(self):
+    """If the attachment was deleted, give a 404."""
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project,
+        path='/p/proj/issues/attachmentText?aid=1234',
+        perms=permissions.READ_ONLY_PERMISSIONSET)
+    self.attach1.deleted = True
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.servlet.GatherPageData(mr)
+    self.assertEqual(404, cm.exception.code)
+
+  def testGatherPageData_Normal(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project,
+        path='/p/proj/issues/attachmentText?id=1&aid=1234',
+        perms=permissions.READ_ONLY_PERMISSIONSET)
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(1, page_data['local_id'])
+    self.assertEqual('a.txt', page_data['filename'])
+    self.assertEqual('43 bytes', page_data['filesize'])
+    self.assertEqual(ezt.boolean(False), page_data['should_prettify'])
+    self.assertEqual(ezt.boolean(False), page_data['is_binary'])
+    self.assertEqual(ezt.boolean(False), page_data['too_large'])
+
+    file_lines = page_data['file_lines']
+    self.assertEqual(1, len(file_lines))
+    self.assertEqual(1, file_lines[0].num)
+    self.assertEqual('/app_default_bucket/pid/attachments/abcdefg',
+                     file_lines[0].line)
+
+    self.assertEqual(None, page_data['code_reviews'])
+
+  @patch('framework.filecontent.DecodeFileContents')
+  def testGatherPageData_HugeFile(self, mock_DecodeFileContents):
+    _request, mr = testing_helpers.GetRequestObjects(
+        project=self.project,
+        path='/p/proj/issues/attachmentText?id=1&aid=1234',
+        perms=permissions.READ_ONLY_PERMISSIONSET)
+    mock_DecodeFileContents.return_value = (
+        'too large text', False, True)
+
+    page_data = self.servlet.GatherPageData(mr)
+
+    self.assertEqual(ezt.boolean(False), page_data['should_prettify'])
+    self.assertEqual(ezt.boolean(False), page_data['is_binary'])
+    self.assertEqual(ezt.boolean(True), page_data['too_large'])
diff --git a/tracker/test/issuebulkedit_test.py b/tracker/test/issuebulkedit_test.py
new file mode 100644
index 0000000..89d9bc3
--- /dev/null
+++ b/tracker/test/issuebulkedit_test.py
@@ -0,0 +1,892 @@
+# 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
+
+"""Unittests for monorail.tracker.issuebulkedit."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import os
+import unittest
+import webapp2
+
+from google.appengine.api import memcache
+from google.appengine.ext import testbed
+
+from framework import exceptions
+from framework import permissions
+from proto import tracker_pb2
+from services import service_manager
+from services import tracker_fulltext
+from testing import fake
+from testing import testing_helpers
+from tracker import issuebulkedit
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+class Response(object):
+
+  def __init__(self):
+    self.status = None
+
+
+class IssueBulkEditTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        features=fake.FeaturesService(),
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        issue_star=fake.IssueStarService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.servlet = issuebulkedit.IssueBulkEdit(
+        'req', 'res', services=self.services)
+    self.mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.project = self.services.project.TestAddProject(
+        name='proj', project_id=789, owner_ids=[111])
+    self.cnxn = 'fake connection'
+    self.config = self.services.config.GetProjectConfig(
+        self.cnxn, self.project.project_id)
+    self.services.config.StoreConfig(self.cnxn, self.config)
+    self.owner = self.services.user.TestAddUser('owner@example.com', 111)
+
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+
+    self.mocked_methods = {}
+
+  def tearDown(self):
+    """Restore mocked objects of other modules."""
+    self.testbed.deactivate()
+    for obj, items in self.mocked_methods.items():
+      for member, previous_value in items.items():
+        setattr(obj, member, previous_value)
+
+  def testAssertBasePermission(self):
+    """Permit users with EDIT_ISSUE and ADD_ISSUE_COMMENT permissions."""
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+
+    self.servlet.AssertBasePermission(self.mr)
+
+  def testGatherPageData(self):
+    """Test GPD works in a normal no-corner-cases case."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 0, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project)
+    mr.local_id_list = [local_id_1]
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(1, page_data['num_issues'])
+
+  def testGatherPageData_CustomFieldEdition(self):
+    """Test GPD works in a normal no-corner-cases case."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 0, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project, perms=permissions.PermissionSet([]))
+    mr.local_id_list = [local_id_1]
+    mr.auth.effective_ids = {222}
+
+    fd_not_restricted = tracker_bizobj.MakeFieldDef(
+        123,
+        789,
+        'CPU',
+        tracker_pb2.FieldTypes.INT_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=False)
+    self.config.field_defs.append(fd_not_restricted)
+
+    fd_restricted = tracker_bizobj.MakeFieldDef(
+        124,
+        789,
+        'CPU',
+        tracker_pb2.FieldTypes.INT_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=True)
+    self.config.field_defs.append(fd_restricted)
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertTrue(page_data['fields'][0].is_editable)
+    self.assertFalse(page_data['fields'][1].is_editable)
+
+  def testGatherPageData_NoIssues(self):
+    """Test GPD when no issues are specified in the mr."""
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project)
+    self.assertRaises(exceptions.InputException,
+                      self.servlet.GatherPageData, mr)
+
+  def testGatherPageData_FilteredIssues(self):
+    """Test GPD when all specified issues get filtered out."""
+    created_issue_1 = fake.MakeTestIssue(
+        789,
+        1,
+        'issue summary',
+        'New',
+        0,
+        reporter_id=111,
+        labels=['restrict-view-Googler'])
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project)
+    mr.local_id_list = [local_id_1]
+
+    self.assertRaises(webapp2.HTTPException,
+                      self.servlet.GatherPageData, mr)
+
+  def testGatherPageData_TypeLabels(self):
+    """Test that GPD displays a custom field for appropriate issues."""
+    created_issue_1 = fake.MakeTestIssue(
+        789,
+        1,
+        'issue summary',
+        'New',
+        0,
+        reporter_id=111,
+        labels=['type-customlabels'])
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project)
+    mr.local_id_list = [local_id_1]
+
+    fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(fd)
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(1, len(page_data['fields']))
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testProcessFormData(self, _create_task_mock):
+    """Test that PFD works in a normal no-corner-cases case."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.local_id_list = [local_id_1]
+
+    post_data = fake.PostData(
+        owner=['owner@example.com'], can=[1],
+        q=[''], colspec=[''], sort=[''], groupby=[''], start=[0], num=[100])
+    self._MockMethods()
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.assertTrue('list?can=1&q=&saved=1' in url)
+
+  def testProcessFormData_NoIssues(self):
+    """Test PFD when no issues are specified."""
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    post_data = fake.PostData()
+    self.servlet.response = Response()
+    self.servlet.ProcessFormData(mr, post_data)
+    # 400 == bad request
+    self.assertEqual(400, self.servlet.response.status)
+
+  def testProcessFormData_NoUser(self):
+    """Test PFD when the user is not logged in."""
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project)
+    mr.local_id_list = [99999]
+    post_data = fake.PostData()
+    self.servlet.response = Response()
+    self.servlet.ProcessFormData(mr, post_data)
+    # 400 == bad request
+    self.assertEqual(400, self.servlet.response.status)
+
+  def testProcessFormData_CantComment(self):
+    """Test PFD when the user can't comment on any of the issues."""
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.EMPTY_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.local_id_list = [99999]
+    post_data = fake.PostData()
+    self.servlet.response = Response()
+    self.servlet.ProcessFormData(mr, post_data)
+    # 400 == bad request
+    self.assertEqual(400, self.servlet.response.status)
+
+  def testProcessFormData_CantEdit(self):
+    """Test PFD when the user can't edit any issue metadata."""
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.local_id_list = [99999]
+    post_data = fake.PostData()
+    self.servlet.response = Response()
+    self.servlet.ProcessFormData(mr, post_data)
+    # 400 == bad request
+    self.assertEqual(400, self.servlet.response.status)
+
+  def testProcessFormData_CantMove(self):
+    """Test PFD when the user can't move issues."""
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.COMMITTER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.local_id_list = [99999]
+    post_data = fake.PostData(move_to=['proj'])
+    self.servlet.response = Response()
+    self.servlet.ProcessFormData(mr, post_data)
+    # 400 == bad request
+    self.assertEqual(400, self.servlet.response.status)
+
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    mr.perms = permissions.OWNER_ACTIVE_PERMISSIONSET
+    mr.local_id_list = [local_id_1]
+    mr.project_name = 'proj'
+    self._MockMethods()
+    self.servlet.ProcessFormData(mr, post_data)
+    self.assertEqual(
+        'The issues are already in project proj', mr.errors.move_to)
+
+    post_data = fake.PostData(move_to=['notexist'])
+    self.servlet.ProcessFormData(mr, post_data)
+    self.assertEqual('No such project: notexist', mr.errors.move_to)
+
+  def _MockMethods(self):
+    # Mock methods of other modules to avoid unnecessary testing
+    self.mocked_methods[tracker_fulltext] = {
+        'IndexIssues': tracker_fulltext.IndexIssues,
+        'UnindexIssues': tracker_fulltext.UnindexIssues}
+    def DoNothing(*_args, **_kwargs):
+      pass
+    self.servlet.PleaseCorrect = DoNothing
+    tracker_fulltext.IndexIssues = DoNothing
+    tracker_fulltext.UnindexIssues = DoNothing
+
+  def GetFirstAmendment(self, project_id, local_id):
+    issue = self.services.issue.GetIssueByLocalID(
+        self.cnxn, project_id, local_id)
+    issue_id = issue.issue_id
+    comments = self.services.issue.GetCommentsForIssue(self.cnxn, issue_id)
+    last_comment = comments[-1]
+    first_amendment = last_comment.amendments[0]
+    return first_amendment.field, first_amendment.newvalue
+
+  def testProcessFormData_BadUserField(self):
+    """Test PFD when a nonexistent user is added as a field value."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.local_id_list = [local_id_1]
+
+    fd = tracker_bizobj.MakeFieldDef(
+        12345, 789, 'PM', tracker_pb2.FieldTypes.USER_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(fd)
+
+    post_data = fake.PostData(
+        custom_12345=['ghost@gmail.com'], owner=['owner@example.com'], can=[1],
+        q=[''], colspec=[''], sort=[''], groupby=[''], start=[0], num=[100])
+    self._MockMethods()
+    self.servlet.ProcessFormData(mr, post_data)
+    self.assertEqual('User not found.', mr.errors.custom_fields[0].message)
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testProcessFormData_CustomFields(self, _create_task_mock):
+    """Test PFD processes edits to custom fields."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.local_id_list = [local_id_1]
+
+    fd = tracker_bizobj.MakeFieldDef(
+        12345, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.config.field_defs.append(fd)
+
+    post_data = fake.PostData(
+        custom_12345=['10'],
+        owner=['owner@example.com'],
+        can=[1],
+        q=[''],
+        colspec=[''],
+        sort=[''],
+        groupby=[''],
+        start=[0],
+        num=[100])
+    self._MockMethods()
+    self.servlet.ProcessFormData(mr, post_data)
+    self.assertEqual(
+        (tracker_pb2.FieldID.CUSTOM, '10'),
+        self.GetFirstAmendment(789, local_id_1))
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testProcessFormData_RestrictedCustomFieldsAccept(self, _create_task_mock):
+    """We accept edits to restricted fields by editors (or admins)."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.PermissionSet(
+            [
+                permissions.EDIT_ISSUE, permissions.ADD_ISSUE_COMMENT,
+                permissions.VIEW
+            ]),
+        user_info={'user_id': 111})
+    mr.local_id_list = [local_id_1]
+
+    fd = tracker_bizobj.MakeFieldDef(
+        12345,
+        789,
+        'CPU',
+        tracker_pb2.FieldTypes.INT_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=True)
+    fd.editor_ids = [111]
+    self.config.field_defs.append(fd)
+
+    post_data = fake.PostData(
+        custom_12345=['10'],
+        owner=['owner@example.com'],
+        can=[1],
+        q=[''],
+        colspec=[''],
+        sort=[''],
+        groupby=[''],
+        start=[0],
+        num=[100])
+    self._MockMethods()
+    self.servlet.ProcessFormData(mr, post_data)
+    self.assertEqual(
+        (tracker_pb2.FieldID.CUSTOM, '10'),
+        self.GetFirstAmendment(789, local_id_1))
+
+  def testProcessFormData_RestrictedCustomFieldsReject(self):
+    """We reject edits to restricted fields by non-editors (and non-admins)."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.PermissionSet(
+            [
+                permissions.EDIT_ISSUE, permissions.ADD_ISSUE_COMMENT,
+                permissions.VIEW
+            ]),
+        user_info={'user_id': 111})
+    mr.local_id_list = [local_id_1]
+
+    fd_int = tracker_bizobj.MakeFieldDef(
+        11111,
+        789,
+        'fd_int',
+        tracker_pb2.FieldTypes.INT_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=True)
+    fd_enum = tracker_bizobj.MakeFieldDef(
+        44444,
+        789,
+        'fdEnum',
+        tracker_pb2.FieldTypes.ENUM_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'doc',
+        False,
+        is_restricted_field=True)
+    fd_int.admin_ids = [222]
+    fd_enum.editor_ids = [333]
+    self.config.field_defs = [fd_int, fd_enum]
+
+    post_data_add_fv = fake.PostData(
+        custom_11111=['10'],
+        owner=['owner@example.com'],
+        can=[1],
+        q=[''],
+        colspec=[''],
+        sort=[''],
+        groupby=[''],
+        start=[0],
+        num=[100])
+    post_data_rm_fv = fake.PostData(
+        op_custom_11111=['remove'],
+        custom_11111=['10'],
+        owner=['owner@example.com'],
+        can=[1],
+        q=[''],
+        colspec=[''],
+        sort=[''],
+        groupby=[''],
+        start=[0],
+        num=[100])
+    post_data_clear_fd = fake.PostData(
+        op_custom_11111=['clear'],
+        owner=['owner@example.com'],
+        can=[1],
+        q=[''],
+        colspec=[''],
+        sort=[''],
+        groupby=[''],
+        start=[0],
+        num=[100])
+    post_data_label_edits_enum = fake.PostData(
+        label=['fdEnum-a'],
+        owner=['owner@example.com'],
+        can=[1],
+        q=[''],
+        colspec=[''],
+        sort=[''],
+        groupby=[''],
+        start=[0],
+        num=[100])
+    post_data_label_rm_enum = fake.PostData(
+        label=['-fdEnum-b'],
+        owner=['owner@example.com'],
+        can=[1],
+        q=[''],
+        colspec=[''],
+        sort=[''],
+        groupby=[''],
+        start=[0],
+        num=[100])
+
+    self._MockMethods()
+    self.assertRaises(
+        AssertionError, self.servlet.ProcessFormData, mr, post_data_add_fv)
+    self.assertRaises(
+        AssertionError, self.servlet.ProcessFormData, mr, post_data_rm_fv)
+    self.assertRaises(
+        AssertionError, self.servlet.ProcessFormData, mr, post_data_clear_fd)
+    self.assertRaises(
+        AssertionError, self.servlet.ProcessFormData, mr,
+        post_data_label_edits_enum)
+    self.assertRaises(
+        AssertionError, self.servlet.ProcessFormData, mr,
+        post_data_label_rm_enum)
+
+  def testProcessFormData_DuplicateStatus_MergeSameIssue(self):
+    """Test PFD processes null/cleared status values."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+
+    created_issue_2 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 112, reporter_id=112)
+    self.services.issue.TestAddIssue(created_issue_2)
+    merge_into_local_id_2 = created_issue_2.local_id
+
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.local_id_list = [local_id_1, merge_into_local_id_2]
+    mr.project_name = 'proj'
+
+    # Add required project_name to merge_into_issue.
+    merge_into_issue = self.services.issue.GetIssueByLocalID(
+        mr.cnxn, self.project.project_id, merge_into_local_id_2)
+    merge_into_issue.project_name = 'proj'
+
+    post_data = fake.PostData(status=['Duplicate'],
+        merge_into=[str(merge_into_local_id_2)], owner=['owner@example.com'],
+        can=[1], q=[''], colspec=[''], sort=[''], groupby=[''], start=[0],
+        num=[100])
+    self._MockMethods()
+    self.servlet.ProcessFormData(mr, post_data)
+    self.assertEqual('Cannot merge issue into itself', mr.errors.merge_into_id)
+
+  def testProcessFormData_DuplicateStatus_MergeMissingIssue(self):
+    """Test PFD processes null/cleared status values."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    created_issue_2 = fake.MakeTestIssue(
+        789, 1, 'issue summary2', 'New', 112, reporter_id=112)
+    self.services.issue.TestAddIssue(created_issue_2)
+    local_id_2 = created_issue_2.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.local_id_list = [local_id_1, local_id_2]
+    mr.project_name = 'proj'
+
+    post_data = fake.PostData(status=['Duplicate'],
+        merge_into=['non existant id'], owner=['owner@example.com'],
+        can=[1], q=[''], colspec=[''], sort=[''], groupby=[''], start=[0],
+        num=[100])
+    self._MockMethods()
+    self.servlet.ProcessFormData(mr, post_data)
+    self.assertEqual('Please enter an issue ID', mr.errors.merge_into_id)
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testProcessFormData_DuplicateStatus_Success(self, _create_task_mock):
+    """Test PFD processes null/cleared status values."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    created_issue_2 = fake.MakeTestIssue(
+        789, 2, 'issue summary2', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_2)
+    local_id_2 = created_issue_2.local_id
+    created_issue_3 = fake.MakeTestIssue(
+        789, 3, 'issue summary3', 'New', 112, reporter_id=112)
+    self.services.issue.TestAddIssue(created_issue_3)
+    merge_into_local_id_3 = created_issue_3.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.local_id_list = [local_id_1, local_id_2]
+    mr.project_name = 'proj'
+
+    post_data = fake.PostData(status=['Duplicate'],
+        merge_into=[str(merge_into_local_id_3)], owner=['owner@example.com'],
+        can=[1], q=[''], colspec=[''], sort=[''], groupby=[''], start=[0],
+        num=[100])
+    self._MockMethods()
+
+    # Add project_name, CCs and starrers to the merge_into_issue.
+    merge_into_issue = self.services.issue.GetIssueByLocalID(
+        mr.cnxn, self.project.project_id, merge_into_local_id_3)
+    merge_into_issue.project_name = 'proj'
+    merge_into_issue.cc_ids = [113, 120]
+    self.services.issue_star.SetStar(
+        mr.cnxn, self.services, None, merge_into_issue.issue_id, 120, True)
+
+    # Add project_name, CCs and starrers to the source issues.
+    # Issue 1
+    issue_1 = self.services.issue.GetIssueByLocalID(
+        mr.cnxn, self.project.project_id, local_id_1)
+    issue_1.project_name = 'proj'
+    issue_1.cc_ids = [113, 114]
+    self.services.issue_star.SetStar(
+        mr.cnxn, self.services, None, issue_1.issue_id, 113, True)
+    # Issue 2
+    issue_2 = self.services.issue.GetIssueByLocalID(
+        mr.cnxn, self.project.project_id, local_id_2)
+    issue_2.project_name = 'proj'
+    issue_2.cc_ids = [113, 115, 118]
+    self.services.issue_star.SetStar(
+        mr.cnxn, self.services, None, issue_2.issue_id, 114, True)
+    self.services.issue_star.SetStar(
+        mr.cnxn, self.services, None, issue_2.issue_id, 115, True)
+
+    self.servlet.ProcessFormData(mr, post_data)
+
+    # Verify both source issues were updated.
+    self.assertEqual(
+        (tracker_pb2.FieldID.STATUS, 'Duplicate'),
+        self.GetFirstAmendment(self.project.project_id, local_id_1))
+    self.assertEqual(
+        (tracker_pb2.FieldID.STATUS, 'Duplicate'),
+        self.GetFirstAmendment(self.project.project_id, local_id_2))
+
+    # Verify that the merge into issue was updated with a comment.
+    comments = self.services.issue.GetCommentsForIssue(
+        self.cnxn, merge_into_issue.issue_id)
+    self.assertEqual(
+        'Issue 1 has been merged into this issue.\n'
+        'Issue 2 has been merged into this issue.', comments[-1].content)
+
+    # Verify CC lists and owner were merged to the merge_into issue.
+    self.assertEqual(
+            [113, 120, 114, 115, 118, 111], merge_into_issue.cc_ids)
+    # Verify new starrers were added to the merge_into issue.
+    self.assertEqual(4,
+                      self.services.issue_star.CountItemStars(
+                          self.cnxn, merge_into_issue.issue_id))
+    self.assertEqual([120, 113, 114, 115],
+                      self.services.issue_star.LookupItemStarrers(
+                          self.cnxn, merge_into_issue.issue_id))
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testProcessFormData_ClearStatus(self, _create_task_mock):
+    """Test PFD processes null/cleared status values."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.local_id_list = [local_id_1]
+
+    post_data = fake.PostData(
+        op_statusenter=['clear'], owner=['owner@example.com'], can=[1],
+        q=[''], colspec=[''], sort=[''], groupby=[''], start=[0], num=[100])
+    self._MockMethods()
+    self.servlet.ProcessFormData(mr, post_data)
+    self.assertEqual(
+        (tracker_pb2.FieldID.STATUS, ''), self.GetFirstAmendment(
+            789, local_id_1))
+
+  def testProcessFormData_InvalidOwner(self):
+    """Test PFD rejects invalid owner emails."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 0, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.local_id_list = [local_id_1]
+    post_data = fake.PostData(
+        owner=['invalid'])
+    self.servlet.response = Response()
+    self._MockMethods()
+    self.servlet.ProcessFormData(mr, post_data)
+    self.assertTrue(mr.errors.AnyErrors())
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testProcessFormData_MoveTo(self, _create_task_mock):
+    """Test PFD processes move_to values."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    move_to_project = self.services.project.TestAddProject(
+        name='proj2', project_id=790, owner_ids=[111])
+
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.project_name = 'proj'
+    mr.local_id_list = [local_id_1]
+
+    self._MockMethods()
+    post_data = fake.PostData(
+        move_to=['proj2'], can=[1], q=[''],
+        colspec=[''], sort=[''], groupby=[''], start=[0], num=[100])
+    self.servlet.response = Response()
+    self.servlet.ProcessFormData(mr, post_data)
+
+    issue = self.services.issue.GetIssueByLocalID(
+        self.cnxn, move_to_project.project_id, local_id_1)
+    self.assertIsNotNone(issue)
+
+  def testProcessFormData_InvalidBlockIssues(self):
+    """Test PFD processes invalid blocked_on and blocking values."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.project_name = 'proj'
+    mr.local_id_list = [local_id_1]
+
+    self._MockMethods()
+    post_data = fake.PostData(
+        op_blockedonenter=['append'], blocked_on=['12345'],
+        op_blockingenter=['append'], blocking=['54321'],
+        can=[1], q=[''],
+        colspec=[''], sort=[''], groupby=[''], start=[0], num=[100])
+    self.servlet.ProcessFormData(mr, post_data)
+
+    self.assertEqual('Invalid issue ID 12345', mr.errors.blocked_on)
+    self.assertEqual('Invalid issue ID 54321', mr.errors.blocking)
+
+  def testProcessFormData_BlockIssuesOnItself(self):
+    """Test PFD processes invalid blocked_on and blocking values."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+    created_issue_2 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_2)
+    local_id_2 = created_issue_2.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.project_name = 'proj'
+    mr.local_id_list = [local_id_1, local_id_2]
+
+    self._MockMethods()
+    post_data = fake.PostData(
+        op_blockedonenter=['append'], blocked_on=[str(local_id_1)],
+        op_blockingenter=['append'], blocking=[str(local_id_2)],
+        can=[1], q=[''],
+        colspec=[''], sort=[''], groupby=[''], start=[0], num=[100])
+    self.servlet.ProcessFormData(mr, post_data)
+
+    self.assertEqual('Cannot block an issue on itself.', mr.errors.blocked_on)
+    self.assertEqual('Cannot block an issue on itself.', mr.errors.blocking)
+
+  @mock.patch('framework.cloud_tasks_helpers.create_task')
+  def testProcessFormData_NormalBlockIssues(self, _create_task_mock):
+    """Test PFD processes blocked_on and blocking values."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+
+    created_issueid = fake.MakeTestIssue(
+        789, 2, 'blocking', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issueid)
+    blocking_id = created_issueid.local_id
+
+    created_issueid = fake.MakeTestIssue(
+        789, 3, 'blocked on', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issueid)
+    blocked_on_id = created_issueid.local_id
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.project_name = 'proj'
+    mr.local_id_list = [local_id_1]
+
+    self._MockMethods()
+    post_data = fake.PostData(
+        op_blockedonenter=['append'], blocked_on=[str(blocked_on_id)],
+        op_blockingenter=['append'], blocking=[str(blocking_id)],
+        can=[1], q=[''],
+        colspec=[''], sort=[''], groupby=[''], start=[0], num=[100])
+    self.servlet.ProcessFormData(mr, post_data)
+
+    self.assertIsNone(mr.errors.blocked_on)
+    self.assertIsNone(mr.errors.blocking)
+
+  def testProcessFormData_TooLongComment(self):
+    """Test PFD rejects comments that are too long."""
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, 'issue summary', 'New', 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    local_id_1 = created_issue_1.local_id
+
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project,
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET,
+        user_info={'user_id': 111})
+    mr.local_id_list = [local_id_1]
+
+    post_data = fake.PostData(
+        owner=['owner@example.com'],
+        can=[1],
+        q=[''],
+        colspec=[''],
+        sort=[''],
+        groupby=[''],
+        start=[0],
+        num=[100],
+        comment=['   ' + 'c' * tracker_constants.MAX_COMMENT_CHARS + '  '])
+    self._MockMethods()
+    self.servlet.ProcessFormData(mr, post_data)
+    self.assertTrue(mr.errors.AnyErrors())
+    self.assertEqual('Comment is too long.', mr.errors.comment)
diff --git a/tracker/test/issuedetailezt_test.py b/tracker/test/issuedetailezt_test.py
new file mode 100644
index 0000000..d3b8327
--- /dev/null
+++ b/tracker/test/issuedetailezt_test.py
@@ -0,0 +1,306 @@
+# 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
+
+"""Unittests for monorail.tracker.issuedetailezt."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import mock
+import mox
+import time
+import unittest
+
+import settings
+from businesslogic import work_env
+from proto import features_pb2
+from features import hotlist_views
+from features import send_notifications
+from framework import authdata
+from framework import exceptions
+from framework import framework_views
+from framework import framework_helpers
+from framework import urls
+from framework import permissions
+from framework import profiler
+from framework import sorting
+from framework import template_helpers
+from proto import project_pb2
+from proto import tracker_pb2
+from proto import user_pb2
+from services import service_manager
+from services import issue_svc
+from services import tracker_fulltext
+from testing import fake
+from testing import testing_helpers
+from tracker import issuedetailezt
+from tracker import tracker_constants
+from tracker import tracker_helpers
+
+
+class GetAdjacentIssueTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        project=fake.ProjectService(),
+        issue_star=fake.IssueStarService(),
+        spam=fake.SpamService())
+    self.services.project.TestAddProject('proj', project_id=789)
+    self.mr = testing_helpers.MakeMonorailRequest()
+    self.mr.auth.user_id = 111
+    self.mr.auth.effective_ids = {111}
+    self.mr.me_user_id = 111
+    self.work_env = work_env.WorkEnv(
+      self.mr, self.services, 'Testing phase')
+
+  def testGetAdjacentIssue_PrevIssue(self):
+    cur_issue = fake.MakeTestIssue(789, 2, 'sum', 'New', 111, issue_id=78902)
+    next_issue = fake.MakeTestIssue(789, 3, 'sum', 'New', 111, issue_id=78903)
+    prev_issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(cur_issue)
+    self.services.issue.TestAddIssue(next_issue)
+    self.services.issue.TestAddIssue(prev_issue)
+
+    with self.work_env as we:
+      we.FindIssuePositionInSearch = mock.Mock(
+          return_value=[78901, 1, 78903, 3])
+
+      actual_issue = issuedetailezt.GetAdjacentIssue(
+         self.mr, we, cur_issue)
+      self.assertEqual(prev_issue, actual_issue)
+      we.FindIssuePositionInSearch.assert_called_once_with(cur_issue)
+
+  def testGetAdjacentIssue_NextIssue(self):
+    cur_issue = fake.MakeTestIssue(789, 2, 'sum', 'New', 111, issue_id=78902)
+    next_issue = fake.MakeTestIssue(789, 3, 'sum', 'New', 111, issue_id=78903)
+    prev_issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(cur_issue)
+    self.services.issue.TestAddIssue(next_issue)
+    self.services.issue.TestAddIssue(prev_issue)
+
+    with self.work_env as we:
+      we.FindIssuePositionInSearch = mock.Mock(
+          return_value=[78901, 1, 78903, 3])
+
+      actual_issue = issuedetailezt.GetAdjacentIssue(
+          self.mr, we, cur_issue, next_issue=True)
+      self.assertEqual(next_issue, actual_issue)
+      we.FindIssuePositionInSearch.assert_called_once_with(cur_issue)
+
+  def testGetAdjacentIssue_NotFound(self):
+    cur_issue = fake.MakeTestIssue(789, 2, 'sum', 'New', 111, issue_id=78902)
+    prev_issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(cur_issue)
+    self.services.issue.TestAddIssue(prev_issue)
+
+    with self.work_env as we:
+      we.FindIssuePositionInSearch = mock.Mock(
+          return_value=[78901, 1, 78903, 3])
+
+      with self.assertRaises(exceptions.NoSuchIssueException):
+        issuedetailezt.GetAdjacentIssue(
+            self.mr, we, cur_issue, next_issue=True)
+      we.FindIssuePositionInSearch.assert_called_once_with(cur_issue)
+
+  def testGetAdjacentIssue_Hotlist(self):
+    cur_issue = fake.MakeTestIssue(789, 2, 'sum', 'New', 111, issue_id=78902)
+    next_issue = fake.MakeTestIssue(789, 3, 'sum', 'New', 111, issue_id=78903)
+    prev_issue = fake.MakeTestIssue(789, 1, 'sum', 'New', 111, issue_id=78901)
+    self.services.issue.TestAddIssue(cur_issue)
+    self.services.issue.TestAddIssue(next_issue)
+    self.services.issue.TestAddIssue(prev_issue)
+    hotlist = fake.Hotlist('name', 678, owner_ids=[111])
+
+    with self.work_env as we:
+      we.GetIssuePositionInHotlist = mock.Mock(
+          return_value=[78901, 1, 78903, 3])
+
+      actual_issue = issuedetailezt.GetAdjacentIssue(
+          self.mr, we, cur_issue, hotlist=hotlist, next_issue=True)
+      self.assertEqual(next_issue, actual_issue)
+      we.GetIssuePositionInHotlist.assert_called_once_with(
+          cur_issue, hotlist, self.mr.can, self.mr.sort_spec,
+          self.mr.group_by_spec)
+
+
+class FlipperRedirectTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        features=fake.FeaturesService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        project=fake.ProjectService())
+    self.project = self.services.project.TestAddProject(
+      'proj', project_id=987, committer_ids=[111])
+    self.next_servlet = issuedetailezt.FlipperNext(
+        'req', 'res', services=self.services)
+    self.prev_servlet = issuedetailezt.FlipperPrev(
+        'req', 'res', services=self.services)
+    self.list_servlet = issuedetailezt.FlipperList(
+        'req', 'res', services=self.services)
+    mr = testing_helpers.MakeMonorailRequest(project=self.project)
+    mr.local_id = 123
+    mr.me_user_id = 111
+
+    self.next_servlet.mr = mr
+    self.prev_servlet.mr = mr
+    self.list_servlet.mr = mr
+
+    self.fake_issue_1 = fake.MakeTestIssue(987, 123, 'summary', 'New', 111,
+        project_name='rutabaga')
+    self.services.issue.TestAddIssue(self.fake_issue_1)
+    self.fake_issue_2 = fake.MakeTestIssue(987, 456, 'summary', 'New', 111,
+        project_name='rutabaga')
+    self.services.issue.TestAddIssue(self.fake_issue_2)
+    self.fake_issue_3 = fake.MakeTestIssue(987, 789, 'summary', 'New', 111,
+        project_name='potato')
+    self.services.issue.TestAddIssue(self.fake_issue_3)
+
+    self.next_servlet.redirect = mock.Mock()
+    self.prev_servlet.redirect = mock.Mock()
+    self.list_servlet.redirect = mock.Mock()
+
+  @mock.patch('tracker.issuedetailezt.GetAdjacentIssue')
+  def testFlipperNext(self, patchGetAdjacentIssue):
+    patchGetAdjacentIssue.return_value = self.fake_issue_2
+    self.next_servlet.mr.GetIntParam = mock.Mock(return_value=None)
+
+    self.next_servlet.get(project_name='proj', viewed_username=None)
+    self.next_servlet.mr.GetIntParam.assert_called_once_with('hotlist_id')
+    patchGetAdjacentIssue.assert_called_once()
+    self.next_servlet.redirect.assert_called_once_with(
+      '/p/rutabaga/issues/detail?id=456')
+
+  @mock.patch('tracker.issuedetailezt.GetAdjacentIssue')
+  def testFlipperNext_Hotlist(self, patchGetAdjacentIssue):
+    patchGetAdjacentIssue.return_value = self.fake_issue_3
+    self.next_servlet.mr.GetIntParam = mock.Mock(return_value=123)
+    # TODO(jeffcarp): Mock hotlist_id param on path here.
+
+    self.next_servlet.get(project_name='proj', viewed_username=None)
+    self.next_servlet.mr.GetIntParam.assert_called_with('hotlist_id')
+    self.next_servlet.redirect.assert_called_once_with(
+      '/p/potato/issues/detail?id=789')
+
+  @mock.patch('tracker.issuedetailezt.GetAdjacentIssue')
+  def testFlipperPrev(self, patchGetAdjacentIssue):
+    patchGetAdjacentIssue.return_value = self.fake_issue_2
+    self.next_servlet.mr.GetIntParam = mock.Mock(return_value=None)
+
+    self.prev_servlet.get(project_name='proj', viewed_username=None)
+    self.prev_servlet.mr.GetIntParam.assert_called_with('hotlist_id')
+    patchGetAdjacentIssue.assert_called_once()
+    self.prev_servlet.redirect.assert_called_once_with(
+      '/p/rutabaga/issues/detail?id=456')
+
+  @mock.patch('tracker.issuedetailezt.GetAdjacentIssue')
+  def testFlipperPrev_Hotlist(self, patchGetAdjacentIssue):
+    patchGetAdjacentIssue.return_value = self.fake_issue_3
+    self.prev_servlet.mr.GetIntParam = mock.Mock(return_value=123)
+    # TODO(jeffcarp): Mock hotlist_id param on path here.
+
+    self.prev_servlet.get(project_name='proj', viewed_username=None)
+    self.prev_servlet.mr.GetIntParam.assert_called_with('hotlist_id')
+    self.prev_servlet.redirect.assert_called_once_with(
+      '/p/potato/issues/detail?id=789')
+
+  @mock.patch('tracker.issuedetailezt._ComputeBackToListURL')
+  def testFlipperList(self, patch_ComputeBackToListURL):
+    patch_ComputeBackToListURL.return_value = '/p/test/issues/list'
+    self.list_servlet.mr.GetIntParam = mock.Mock(return_value=None)
+
+    self.list_servlet.get()
+
+    self.list_servlet.mr.GetIntParam.assert_called_with('hotlist_id')
+    patch_ComputeBackToListURL.assert_called_once()
+    self.list_servlet.redirect.assert_called_once_with(
+      '/p/test/issues/list')
+
+  @mock.patch('tracker.issuedetailezt._ComputeBackToListURL')
+  def testFlipperList_Hotlist(self, patch_ComputeBackToListURL):
+    patch_ComputeBackToListURL.return_value = '/p/test/issues/list'
+    self.list_servlet.mr.GetIntParam = mock.Mock(return_value=123)
+
+    self.list_servlet.get()
+
+    self.list_servlet.mr.GetIntParam.assert_called_with('hotlist_id')
+    self.list_servlet.redirect.assert_called_once_with(
+      '/p/test/issues/list')
+
+
+class ShouldShowFlipperTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+
+  def VerifyShouldShowFlipper(
+      self, expected, query, sort_spec, can, create_issues=0):
+    """Instantiate a _Flipper and check if makes a pipeline or not."""
+    services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        project=fake.ProjectService(),
+        user=fake.UserService())
+    project = services.project.TestAddProject(
+      'proj', project_id=987, committer_ids=[111])
+    mr = testing_helpers.MakeMonorailRequest(project=project)
+    mr.query = query
+    mr.sort_spec = sort_spec
+    mr.can = can
+    mr.project_name = project.project_name
+    mr.project = project
+
+    for idx in range(create_issues):
+      _created_issue = fake.MakeTestIssue(
+          project.project_id,
+          idx,
+          'summary_%d' % idx,
+          'status',
+          111,
+          reporter_id=111)
+      services.issue.TestAddIssue(_created_issue)
+
+    self.assertEqual(expected, issuedetailezt._ShouldShowFlipper(mr, services))
+
+  def testShouldShowFlipper_RegularSizedProject(self):
+    # If the user is looking for a specific issue, no flipper.
+    self.VerifyShouldShowFlipper(
+        False, '123', '', tracker_constants.OPEN_ISSUES_CAN)
+    self.VerifyShouldShowFlipper(False, '123', '', 5)
+    self.VerifyShouldShowFlipper(
+        False, '123', 'priority', tracker_constants.OPEN_ISSUES_CAN)
+
+    # If the user did a search or sort or all in a small can, show flipper.
+    self.VerifyShouldShowFlipper(
+        True, 'memory leak', '', tracker_constants.OPEN_ISSUES_CAN)
+    self.VerifyShouldShowFlipper(
+        True, 'id=1,2,3', '', tracker_constants.OPEN_ISSUES_CAN)
+    # Any can other than 1 or 2 is doing a query and so it should have a
+    # failry narrow result set size.  5 is issues starred by me.
+    self.VerifyShouldShowFlipper(True, '', '', 5)
+    self.VerifyShouldShowFlipper(
+        True, '', 'status', tracker_constants.OPEN_ISSUES_CAN)
+
+    # In a project without a huge number of issues, still show the flipper even
+    # if there was no specific query.
+    self.VerifyShouldShowFlipper(
+        True, '', '', tracker_constants.OPEN_ISSUES_CAN)
+
+  def testShouldShowFlipper_LargeSizedProject(self):
+    settings.threshold_to_suppress_prev_next = 1
+
+    # In a project that has tons of issues, save time by not showing the
+    # flipper unless there was a specific query, sort, or can.
+    self.VerifyShouldShowFlipper(
+        False, '', '', tracker_constants.ALL_ISSUES_CAN, create_issues=3)
+    self.VerifyShouldShowFlipper(
+        False, '', '', tracker_constants.OPEN_ISSUES_CAN, create_issues=3)
diff --git a/tracker/test/issueentry_test.py b/tracker/test/issueentry_test.py
new file mode 100644
index 0000000..4a64d7c
--- /dev/null
+++ b/tracker/test/issueentry_test.py
@@ -0,0 +1,1045 @@
+# 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
+
+"""Unittests for the issueentry servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mox
+import time
+import unittest
+
+import ezt
+
+from google.appengine.ext import testbed
+from mock import Mock, patch
+import webapp2
+
+from framework import framework_bizobj
+from framework import framework_views
+from framework import permissions
+from services import service_manager
+from services import template_svc
+from testing import fake
+from testing import testing_helpers
+from tracker import issueentry
+from tracker import tracker_bizobj
+from proto import tracker_pb2
+from proto import user_pb2
+
+
+class IssueEntryTest(unittest.TestCase):
+  def setUp(self):
+    self.testbed = testbed.Testbed()
+    self.testbed.activate()
+    self.testbed.init_memcache_stub()
+    self.testbed.init_datastore_v3_stub()
+    # Load queue.yaml.
+
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService(),
+        project=fake.ProjectService(),
+        template=Mock(spec=template_svc.TemplateService),
+        features=fake.FeaturesService())
+    self.project = self.services.project.TestAddProject('proj', project_id=987)
+    request = webapp2.Request.blank('/p/proj/issues/entry')
+    response = webapp2.Response()
+    self.servlet = issueentry.IssueEntry(
+        request, response, services=self.services)
+    self.user = self.services.user.TestAddUser('to_pass_tests', 0)
+    self.services.features.TestAddHotlist(
+        name='dontcare', summary='', owner_ids=[0])
+    self.template = testing_helpers.DefaultTemplates()[1]
+    self.services.template.GetTemplateByName = Mock(return_value=self.template)
+    self.services.template.GetTemplateSetForProject = Mock(
+        return_value=[(1, 'name', False)])
+
+    # Set-up for testing hotlist parsing.
+    # Scenario:
+    #   Users: U1, U2, and U3
+    #   Hotlists:
+    #     H1: owned by U1 (private)
+    #     H2: owned by U2, can be edited by U1 (private)
+    #     H2: owned by U3, can be edited by U1 and U2 (public)
+    self.cnxn = fake.MonorailConnection()
+    self.U1 = self.services.user.TestAddUser('U1', 111)
+    self.U2 = self.services.user.TestAddUser('U2', 222)
+    self.U3 = self.services.user.TestAddUser('U3', 333)
+
+    self.H1 = self.services.features.TestAddHotlist(
+        name='H1', summary='', owner_ids=[111], is_private=True)
+    self.H2 = self.services.features.TestAddHotlist(
+        name='H2', summary='', owner_ids=[222], editor_ids=[111],
+        is_private=True)
+    self.H2_U3 = self.services.features.TestAddHotlist(
+        name='H2', summary='', owner_ids=[333], editor_ids=[111, 222],
+        is_private=False)
+
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.testbed.deactivate()
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testAssertBasePermission(self):
+    """Permit users with CREATE_ISSUE."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', services=self.services,
+        perms=permissions.EMPTY_PERMISSIONSET)
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', services=self.services,
+        perms=permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+    self.servlet.AssertBasePermission(mr)
+
+  def testDiscardUnusedTemplateLabelPrefixes(self):
+    labels = ['pre-val', 'other-value', 'oneword', 'x', '-y', '-w-z', '', '-']
+    self.assertEqual(labels,
+                     issueentry._DiscardUnusedTemplateLabelPrefixes(labels))
+
+    labels = ['prefix-value', 'other-?', 'third-', '', '-', '-?']
+    self.assertEqual(['prefix-value', 'third-', '', '-'],
+                     issueentry._DiscardUnusedTemplateLabelPrefixes(labels))
+
+  def testGatherPageData(self):
+    user = self.services.user.TestAddUser('user@invalid', 100)
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', services=self.services)
+    mr.perms = permissions.PermissionSet(
+        [permissions.CREATE_ISSUE, permissions.EDIT_ISSUE])
+    mr.auth.user_view = framework_views.MakeUserView(
+        'cnxn', self.services.user, 100)
+    mr.auth.effective_ids = {100}
+    mr.template_name = 'rutabaga'
+
+    self.mox.StubOutWithMock(self.services.user, 'GetUser')
+    self.services.user.GetUser(
+        mox.IgnoreArg(), mox.IgnoreArg()).MultipleTimes().AndReturn(user)
+    self.mox.ReplayAll()
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    config.field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            22, mr.project_id, 'NotEnum', tracker_pb2.FieldTypes.STR_TYPE, None,
+            '', False, False, False, None, None, '', False, '', '',
+            tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            23, mr.project_id, 'Choices', tracker_pb2.FieldTypes.ENUM_TYPE,
+            None, '', False, False, False, None, None, '', False, '', '',
+            tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            24,
+            mr.project_id,
+            'RestrictedField',
+            tracker_pb2.FieldTypes.STR_TYPE,
+            None,
+            '',
+            False,
+            False,
+            False,
+            None,
+            None,
+            '',
+            False,
+            '',
+            '',
+            tracker_pb2.NotifyTriggers.NEVER,
+            'no_action',
+            'doc',
+            False,
+            is_restricted_field=True)
+    ]
+    self.services.config.StoreConfig(mr.cnxn, config)
+    template = tracker_pb2.TemplateDef(
+        labels=['NotEnum-Not-Masked', 'Choices-Masked'])
+    self.services.template.GetTemplateByName.return_value = template
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+    self.assertEqual(page_data['initial_owner'], 'user@invalid')
+    self.assertEqual(page_data['initial_status'], 'New')
+    self.assertTrue(page_data['clear_summary_on_click'])
+    self.assertTrue(page_data['must_edit_summary'])
+    self.assertEqual(page_data['labels'], ['NotEnum-Not-Masked'])
+    self.assertEqual(page_data['offer_templates'], ezt.boolean(False))
+    self.assertEqual(page_data['fields'][0].is_editable, ezt.boolean(True))
+    self.assertEqual(page_data['fields'][1].is_editable, ezt.boolean(True))
+    self.assertEqual(page_data['fields'][2].is_editable, ezt.boolean(False))
+    self.assertEqual(page_data['uneditable_fields'], ezt.boolean(True))
+
+  def testGatherPageData_Approvals(self):
+    user = self.services.user.TestAddUser('user@invalid', 100)
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', services=self.services)
+    mr.auth.user_view = framework_views.MakeUserView(
+        'cnxn', self.services.user, 100)
+    mr.template_name = 'rutabaga'
+
+    self.mox.StubOutWithMock(self.services.user, 'GetUser')
+    self.services.user.GetUser(
+        mox.IgnoreArg(), mox.IgnoreArg()).MultipleTimes().AndReturn(user)
+    self.mox.ReplayAll()
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    config.field_defs = [
+    tracker_bizobj.MakeFieldDef(
+        24, mr.project_id, 'UXReview',
+        tracker_pb2.FieldTypes.APPROVAL_TYPE, None, '', False, False,
+        False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)]
+    self.services.config.StoreConfig(mr.cnxn, config)
+    template = tracker_pb2.TemplateDef()
+    template.phases = [tracker_pb2.Phase(
+        phase_id=1, rank=4, name='Stable')]
+    template.approval_values = [tracker_pb2.ApprovalValue(
+        approval_id=24, phase_id=1,
+        status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW)]
+    self.services.template.GetTemplateByName.return_value = template
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+    self.assertEqual(page_data['approvals'][0].field_name, 'UXReview')
+    self.assertEqual(page_data['initial_phases'][0],
+                          tracker_pb2.Phase(phase_id=1, name='Stable', rank=4))
+    self.assertEqual(page_data['prechecked_approvals'], ['24_phase_0'])
+    self.assertEqual(page_data['required_approval_ids'], [24])
+
+    # phase fields row shown when config contains phase fields.
+    config.field_defs.append(tracker_bizobj.MakeFieldDef(
+        26, mr.project_id, 'GateTarget',
+        tracker_pb2.FieldTypes.INT_TYPE, None, '', False, False, False,
+        None, None, '', False, '', '', tracker_pb2.NotifyTriggers.NEVER,
+        'no_action', 'doc', False, is_phase_field=True))
+    self.services.config.StoreConfig(mr.cnxn, config)
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(page_data['issue_phase_names'], ['stable'])
+
+    # approval subfields in config hidden when chosen template does not contain
+    # its parent approval
+    template = tracker_pb2.TemplateDef()
+    self.services.template.GetTemplateByName.return_value = template
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(page_data['approvals'], [])
+    # phase fields row hidden when template has no phases
+    self.assertEqual(page_data['issue_phase_names'], [])
+
+  # TODO(jojwang): monorail:6305, remove this test when Edit perms
+  # for field values are implemented.
+  def testGatherPageData_FLTSpecialFields(self):
+    user = self.services.user.TestAddUser('user@invalid', 100)
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', services=self.services)
+    mr.auth.user_view = framework_views.MakeUserView(
+        'cnxn', self.services.user, 100)
+    mr.template_name = 'rutabaga'
+
+    self.mox.StubOutWithMock(self.services.user, 'GetUser')
+    self.services.user.GetUser(
+        mox.IgnoreArg(), mox.IgnoreArg()).MultipleTimes().AndReturn(user)
+    self.mox.ReplayAll()
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    config.field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            25, mr.project_id, 'nOtice',
+            tracker_pb2.FieldTypes.STR_TYPE, None, '', False, False,
+            False, None, None, '', False, '', '',
+            tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            24, mr.project_id, 'M-Target',
+            tracker_pb2.FieldTypes.STR_TYPE, None, '', False, False,
+            False, None, None, '', False, '', '',
+            tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            25, mr.project_id, 'whitepaper',
+            tracker_pb2.FieldTypes.STR_TYPE, None, '', False, False,
+            False, None, None, '', False, '', '',
+            tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False),
+        tracker_bizobj.MakeFieldDef(
+            25, mr.project_id, 'm-approved',
+            tracker_pb2.FieldTypes.STR_TYPE, None, '', False, False,
+            False, None, None, '', False, '', '',
+            tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False),
+    ]
+
+    self.services.config.StoreConfig(mr.cnxn, config)
+    template = tracker_pb2.TemplateDef()
+    self.services.template.GetTemplateByName.return_value = template
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+    self.assertEqual(page_data['fields'][0].field_name, 'M-Target')
+    self.assertEqual(len(page_data['fields']), 1)
+
+  def testGatherPageData_DefaultOwnerAvailability(self):
+    user = self.services.user.TestAddUser('user@invalid', 100)
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', services=self.services)
+    mr.auth.user_view = framework_views.MakeUserView(
+        'cnxn', self.services.user, 100)
+    mr.template_name = 'rutabaga'
+
+    self.mox.StubOutWithMock(self.services.user, 'GetUser')
+    self.services.user.GetUser(
+        mox.IgnoreArg(), mox.IgnoreArg()).MultipleTimes().AndReturn(user)
+    self.mox.ReplayAll()
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+    self.assertEqual(page_data['initial_owner'], 'user@invalid')
+    self.assertEqual(page_data['owner_avail_state'], 'never')
+    self.assertEqual(
+        page_data['owner_avail_message_short'],
+        'User never visited')
+
+    user.last_visit_timestamp = int(time.time())
+    mr.auth.user_view = framework_views.MakeUserView(
+        'cnxn', self.services.user, 100)
+    page_data = self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+    self.assertEqual(page_data['initial_owner'], 'user@invalid')
+    self.assertEqual(page_data['owner_avail_state'], None)
+    self.assertEqual(page_data['owner_avail_message_short'], '')
+
+  def testGatherPageData_TemplateAllowsKeepingSummary(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', services=self.services)
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    mr.template_name = 'rutabaga'
+    user = self.services.user.TestAddUser('user@invalid', 100)
+
+    self.mox.StubOutWithMock(self.services.user, 'GetUser')
+    self.services.user.GetUser(
+        mox.IgnoreArg(), mox.IgnoreArg()).MultipleTimes().AndReturn(user)
+    self.mox.ReplayAll()
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    self.services.config.StoreConfig(mr.cnxn, config)
+    self.template.summary_must_be_edited = False
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+    self.assertEqual(page_data['initial_owner'], 'user@invalid')
+    self.assertEqual(page_data['initial_status'], 'New')
+    self.assertFalse(page_data['clear_summary_on_click'])
+    self.assertFalse(page_data['must_edit_summary'])
+
+  def testGatherPageData_DeepLinkSetsSummary(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry?summary=foo', services=self.services)
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    user = self.services.user.TestAddUser('user@invalid', 100)
+    mr.template_name = 'rutabaga'
+
+    self.mox.StubOutWithMock(self.services.user, 'GetUser')
+    self.services.user.GetUser(
+        mox.IgnoreArg(), mox.IgnoreArg()).MultipleTimes().AndReturn(user)
+    self.mox.ReplayAll()
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+    self.assertEqual(page_data['initial_owner'], 'user@invalid')
+    self.assertEqual(page_data['initial_status'], 'New')
+    self.assertFalse(page_data['clear_summary_on_click'])
+    self.assertTrue(page_data['must_edit_summary'])
+
+  @patch('framework.framework_bizobj.UserIsInProject')
+  def testGatherPageData_MembersOnlyTemplatesExcluded(self,
+        mockUserIsInProject):
+    """Templates with members_only=True are excluded from results
+    when the user is not a member of the project."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', services=self.services)
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    user = self.services.user.TestAddUser('user@invalid', 100)
+    mr.template_name = 'rutabaga'
+    self.services.template.GetTemplateSetForProject = Mock(
+        return_value=[(1, 'one', False), (2, 'two', True)])
+    mockUserIsInProject.return_value = False
+
+    self.mox.StubOutWithMock(self.services.user, 'GetUser')
+    self.services.user.GetUser(
+        mox.IgnoreArg(), mox.IgnoreArg()).MultipleTimes().AndReturn(user)
+    self.mox.ReplayAll()
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+    self.assertEqual(page_data['config'].template_names, ['one'])
+
+  @patch('framework.framework_bizobj.UserIsInProject')
+  def testGatherPageData_DefaultTemplatesMember(self, mockUserIsInProject):
+    """If no template is specified, the default one is used based on
+    whether the user is a project member."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', services=self.services)
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    user = self.services.user.TestAddUser('user@invalid', 100)
+    self.services.template.GetTemplateSetForProject = Mock(
+        return_value=[(1, 'one', False), (2, 'two', True)])
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    config.default_template_for_users = 456
+    config.default_template_for_developers = 789
+    self.services.config.StoreConfig(mr.cnxn, config)
+
+    mockUserIsInProject.return_value = True
+    self.services.template.GetTemplateById = Mock(return_value=self.template)
+    self.mox.StubOutWithMock(self.services.user, 'GetUser')
+    self.services.user.GetUser(
+        mox.IgnoreArg(), mox.IgnoreArg()).MultipleTimes().AndReturn(user)
+
+    self.mox.ReplayAll()
+    self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+
+    call_args = self.services.template.GetTemplateById.call_args[0]
+    self.assertEqual(call_args[1], 789)
+
+  @patch('framework.framework_bizobj.UserIsInProject')
+  def testGatherPageData_DefaultTemplatesNonMember(self, mockUserIsInProject):
+    """If no template is specified, the default one is used based on
+    whether the user is not a project member."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', services=self.services)
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    user = self.services.user.TestAddUser('user@invalid', 100)
+    self.services.template.GetTemplateSetForProject = Mock(
+        return_value=[(1, 'one', False), (2, 'two', True)])
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    config.default_template_for_users = 456
+    config.default_template_for_developers = 789
+    self.services.config.StoreConfig(mr.cnxn, config)
+
+    mockUserIsInProject.return_value = False
+    self.services.template.GetTemplateById = Mock(return_value=self.template)
+    self.mox.StubOutWithMock(self.services.user, 'GetUser')
+    self.services.user.GetUser(
+        mox.IgnoreArg(), mox.IgnoreArg()).MultipleTimes().AndReturn(user)
+
+    self.mox.ReplayAll()
+    self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+
+    call_args = self.services.template.GetTemplateById.call_args[0]
+    self.assertEqual(call_args[1], 456)
+
+  def testGatherPageData_MissingDefaultTemplates(self):
+    """If the default templates were deleted, pick the first template."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', services=self.services)
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    user = self.services.user.TestAddUser('user@invalid', 100)
+    self.services.template.GetTemplateSetForProject = Mock(
+        return_value=[(1, 'one', False), (2, 'two', True)])
+
+    self.services.template.GetTemplateById.return_value = None
+    self.services.template.GetProjectTemplates.return_value = [
+        tracker_pb2.TemplateDef(members_only=True),
+        tracker_pb2.TemplateDef(members_only=False)]
+    self.mox.StubOutWithMock(self.services.user, 'GetUser')
+    self.services.user.GetUser(
+        mox.IgnoreArg(), mox.IgnoreArg()).MultipleTimes().AndReturn(user)
+
+    self.mox.ReplayAll()
+    page_data = self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+
+    self.assertTrue(self.services.template.GetProjectTemplates.called)
+    self.assertTrue(page_data['config'].template_view.members_only)
+
+  def testGatherPageData_IncorrectTemplate(self):
+    """The handler shouldn't error out if passed a non-existent template."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', services=self.services)
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    mr.template_name = 'rutabaga'
+
+    user = self.services.user.TestAddUser('user@invalid', 100)
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    config.default_template_for_users = 456
+    config.default_template_for_developers = 789
+    self.services.config.StoreConfig(mr.cnxn, config)
+
+    self.services.template.GetTemplateSetForProject.return_value = [
+        (1, 'one', False), (2, 'two', True)]
+    self.services.template.GetTemplateByName.return_value = None
+    self.services.template.GetTemplateById.return_value = \
+        tracker_pb2.TemplateDef(template_id=123, labels=['yo'])
+    self.services.template.GetProjectTemplates.return_value = [
+        tracker_pb2.TemplateDef(labels=['no']),
+        tracker_pb2.TemplateDef(labels=['maybe'])]
+    self.mox.StubOutWithMock(self.services.user, 'GetUser')
+    self.services.user.GetUser(
+        mox.IgnoreArg(), mox.IgnoreArg()).MultipleTimes().AndReturn(user)
+
+    self.mox.ReplayAll()
+    page_data = self.servlet.GatherPageData(mr)
+    self.mox.VerifyAll()
+
+    self.assertTrue(self.services.template.GetTemplateByName.called)
+    self.assertTrue(self.services.template.GetTemplateById.called)
+    self.assertFalse(self.services.template.GetProjectTemplates.called)
+    self.assertEqual(page_data['config'].template_view.label0, 'yo')
+
+  def testGatherPageData_RestrictNewIssues(self):
+    """Users with this pref set default to reporting issues with R-V-G."""
+    self.mox.ReplayAll()
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', services=self.services)
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    user = self.services.user.TestAddUser('user@invalid', 100)
+    self.services.user.GetUser = Mock(return_value=user)
+    self.services.template.GetTemplateById = Mock(return_value=self.template)
+
+    mr.auth.user_id = 100
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertNotIn('Restrict-View-Google', page_data['labels'])
+
+    pref = user_pb2.UserPrefValue(name='restrict_new_issues', value='true')
+    self.services.user.SetUserPrefs(self.cnxn, 100, [pref])
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertIn('Restrict-View-Google', page_data['labels'])
+
+  def testGatherHelpData_Anon(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', project=self.project)
+    mr.auth.user_pb = user_pb2.User()
+    mr.auth.user_id = 0
+
+    help_data = self.servlet.GatherHelpData(mr, {})
+    self.assertEqual(
+        {'account_cue': None,
+         'cue': None,
+         'is_privileged_domain_user': None},
+        help_data)
+
+  def testGatherHelpData_NewUser(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', project=self.project)
+    mr.auth.user_pb = user_pb2.User(user_id=111)
+    mr.auth.user_id = 111
+
+    help_data = self.servlet.GatherHelpData(mr, {})
+    self.assertEqual(
+        {'account_cue': None,
+         'cue': 'privacy_click_through',
+         'is_privileged_domain_user': None},
+        help_data)
+
+  def testGatherHelpData_AlreadyClickedThroughPrivacy(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', project=self.project)
+    mr.auth.user_pb = user_pb2.User(user_id=111)
+    mr.auth.user_id = 111
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='privacy_click_through', value='true')])
+
+    help_data = self.servlet.GatherHelpData(mr, {})
+    self.assertEqual(
+        {'account_cue': None,
+         'cue': 'code_of_conduct',
+         'is_privileged_domain_user': None},
+        help_data)
+
+  def testGatherHelpData_DismissedEverything(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', project=self.project)
+    mr.auth.user_pb = user_pb2.User(user_id=111)
+    mr.auth.user_id = 111
+    self.services.user.SetUserPrefs(
+        self.cnxn, 111,
+        [user_pb2.UserPrefValue(name='privacy_click_through', value='true'),
+         user_pb2.UserPrefValue(name='code_of_conduct', value='true')])
+
+    help_data = self.servlet.GatherHelpData(mr, {})
+    self.assertEqual(
+        {'account_cue': None,
+         'cue': None,
+         'is_privileged_domain_user': None},
+        help_data)
+
+  @patch('framework.cloud_tasks_helpers.create_task')
+  def testProcessFormData_RedirectToEnteredIssue(self, _create_task_mock):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', project=self.project)
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    mr.template_name = 'rutabaga'
+    mr.auth.effective_ids = set([100])
+    post_data = fake.PostData(
+        template_name=['rutabaga'],
+        summary=['fake summary'],
+        comment=['fake comment'],
+        status=['New'])
+
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(mr, post_data)
+
+    self.mox.VerifyAll()
+    self.assertTrue('/p/proj/issues/detail?id=' in url)
+
+  @patch('framework.cloud_tasks_helpers.create_task')
+  def testProcessFormData_AcceptWithFields(self, _create_task_mock):
+    """We can create new issues with custom fields (restricted or not)."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', project=self.project)
+    mr.auth.user_view = framework_views.StuffUserView(100, 'admin@test', True)
+    mr.template_name = 'rutabaga'
+    mr.auth.effective_ids = set([100])
+    config = self.services.config.GetProjectConfig(
+        mr.cnxn, self.project.project_id)
+    config.field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            1, 789, 'NonRestrictedField', tracker_pb2.FieldTypes.INT_TYPE, None,
+            '', False, False, False, None, None, '', False, '', '',
+            tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'NonRestrictedField',
+            False),
+        tracker_bizobj.MakeFieldDef(
+            2,
+            789,
+            'RestrictedField',
+            tracker_pb2.FieldTypes.INT_TYPE,
+            None,
+            '',
+            False,
+            False,
+            False,
+            None,
+            None,
+            '',
+            False,
+            '',
+            '',
+            tracker_pb2.NotifyTriggers.NEVER,
+            'no_action',
+            'RestrictedField',
+            False,
+            is_restricted_field=True),
+        tracker_bizobj.MakeFieldDef(
+            3,
+            789,
+            'RestrictedEnumField',
+            tracker_pb2.FieldTypes.ENUM_TYPE,
+            None,
+            '',
+            False,
+            False,
+            False,
+            None,
+            None,
+            '',
+            False,
+            '',
+            '',
+            tracker_pb2.NotifyTriggers.NEVER,
+            'no_action',
+            'RestrictedEnumField',
+            False,
+            is_restricted_field=True)
+    ]
+    self.services.config.StoreConfig(mr.cnxn, config)
+    post_data = fake.PostData(
+        template_name=['rutabaga'],
+        summary=['fake summary'],
+        comment=['fake comment'],
+        custom_1=['3'],
+        custom_2=['7'],
+        label=['RestrictedEnumField-7'],
+        status=['New'])
+
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(mr, post_data)
+
+    self.mox.VerifyAll()
+    self.assertTrue('/p/proj/issues/detail?id=' in url)
+    field_values = self.services.issue.issues_by_project[987][1].field_values
+    self.assertEqual(
+        self.services.issue.issues_by_project[987][1].labels,
+        ['RestrictedEnumField-7'])
+    self.assertEqual(field_values[0].int_value, 3)
+    self.assertEqual(field_values[1].int_value, 7)
+
+  @patch('framework.cloud_tasks_helpers.create_task')
+  def testProcessFormData_AcceptEnforceTemplateRestrictedDefaultValues(
+      self, _create_task_mock):
+    """The template applies default vals on fields that the user cannot edit."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', project=self.project)
+    mr.auth.user_view = framework_views.StuffUserView(100, 'admin@test', True)
+    mr.template_name = 'rutabaga'
+    mr.auth.effective_ids = set([100])
+    mr.perms = permissions.PermissionSet([])
+    config = self.services.config.GetProjectConfig(
+        mr.cnxn, self.project.project_id)
+    config.field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            1, 789, 'NonRestrictedField', tracker_pb2.FieldTypes.INT_TYPE, None,
+            '', False, False, False, None, None, '', False, '', '',
+            tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'NonRestrictedField',
+            False),
+        tracker_bizobj.MakeFieldDef(
+            2,
+            789,
+            'RestrictedField',
+            tracker_pb2.FieldTypes.INT_TYPE,
+            None,
+            '',
+            False,
+            False,
+            False,
+            None,
+            None,
+            '',
+            False,
+            '',
+            '',
+            tracker_pb2.NotifyTriggers.NEVER,
+            'no_action',
+            'RestrictedField',
+            False,
+            is_restricted_field=True),
+        tracker_bizobj.MakeFieldDef(
+            3,
+            789,
+            'RestrictedEnumField',
+            tracker_pb2.FieldTypes.ENUM_TYPE,
+            None,
+            '',
+            False,
+            False,
+            False,
+            None,
+            None,
+            '',
+            False,
+            '',
+            '',
+            tracker_pb2.NotifyTriggers.NEVER,
+            'no_action',
+            'RestrictedEnumField',
+            False,
+            is_restricted_field=True)
+    ]
+    self.services.config.StoreConfig(mr.cnxn, config)
+    post_data = fake.PostData(
+        template_name=['rutabaga'],
+        summary=['fake summary'],
+        comment=['fake comment'],
+        custom_1=['3'],
+        label=['Hey'],
+        status=['New'])
+
+    temp_restricted_fv = tracker_bizobj.MakeFieldValue(
+        2, 3737, None, None, None, None, False)
+    self.template.field_values.append(temp_restricted_fv)
+    self.template.labels.append('RestrictedEnumField-b')
+
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(mr, post_data)
+
+    self.mox.VerifyAll()
+    self.assertTrue('/p/proj/issues/detail?id=' in url)
+    field_values = self.services.issue.issues_by_project[987][1].field_values
+    self.assertEqual(
+        self.services.issue.issues_by_project[987][1].labels,
+        ['Hey', 'RestrictedEnumField-b'])
+    self.assertEqual(field_values[0].int_value, 3)
+    self.assertEqual(field_values[1].int_value, 3737)
+
+  def testProcessFormData_RejectRestrictedFields(self):
+    """We raise an AssertionError when restricted fields are set w/o perms."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', project=self.project)
+    mr.auth.user_view = framework_views.StuffUserView(
+        100, 'non-admin@test', True)
+    mr.template_name = 'rutabaga'
+    mr.auth.effective_ids = set([100])
+    mr.perms = permissions.PermissionSet([])
+    config = self.services.config.GetProjectConfig(
+        mr.cnxn, self.project.project_id)
+    config.field_defs = [
+        tracker_bizobj.MakeFieldDef(
+            1, 789, 'NonRestrictedField', tracker_pb2.FieldTypes.INT_TYPE, None,
+            '', False, False, False, None, None, '', False, '', '',
+            tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'NonRestrictedField',
+            False),
+        tracker_bizobj.MakeFieldDef(
+            2,
+            789,
+            'RestrictedField',
+            tracker_pb2.FieldTypes.INT_TYPE,
+            None,
+            '',
+            False,
+            False,
+            False,
+            None,
+            None,
+            '',
+            False,
+            '',
+            '',
+            tracker_pb2.NotifyTriggers.NEVER,
+            'no_action',
+            'RestrictedField',
+            False,
+            is_restricted_field=True),
+        tracker_bizobj.MakeFieldDef(
+            3,
+            789,
+            'RestrictedEnumField',
+            tracker_pb2.FieldTypes.ENUM_TYPE,
+            None,
+            '',
+            False,
+            False,
+            False,
+            None,
+            None,
+            '',
+            False,
+            '',
+            '',
+            tracker_pb2.NotifyTriggers.NEVER,
+            'no_action',
+            'RestrictedEnumField',
+            False,
+            is_restricted_field=True)
+    ]
+    self.services.config.StoreConfig(mr.cnxn, config)
+    post_data_add_fv = fake.PostData(
+        template_name=['rutabaga'],
+        summary=['fake summary'],
+        comment=['fake comment'],
+        custom_1=['3'],
+        custom_2=['7'],
+        status=['New'])
+    post_data_label_edits_enum = fake.PostData(
+        template_name=['rutabaga'],
+        summary=['fake summary'],
+        comment=['fake comment'],
+        label=['RestrictedEnumField-7'],
+        status=['New'])
+
+    self.assertRaises(
+        AssertionError, self.servlet.ProcessFormData, mr, post_data_add_fv)
+    self.assertRaises(
+        AssertionError, self.servlet.ProcessFormData, mr,
+        post_data_label_edits_enum)
+
+  def testProcessFormData_RejectPlacedholderSummary(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry')
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    mr.perms = permissions.USER_PERMISSIONSET
+    mr.template_name = 'rutabaga'
+    post_data = fake.PostData(
+        template_name=['rutabaga'],
+        summary=[issueentry.PLACEHOLDER_SUMMARY],
+        comment=['fake comment'],
+        status=['New'])
+
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        mr, component_required=None, fields=[], initial_blocked_on='',
+        initial_blocking='', initial_cc='', initial_comment='fake comment',
+        initial_components='', initial_owner='', initial_status='New',
+        initial_summary='Enter one-line summary', initial_hotlists='',
+        labels=[], template_name='rutabaga')
+    self.mox.ReplayAll()
+
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual('Summary is required', mr.errors.summary)
+    self.assertIsNone(url)
+
+  def testProcessFormData_RejectUnmodifiedTemplate(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry')
+    mr.perms = permissions.USER_PERMISSIONSET
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    post_data = fake.PostData(
+        template_name=['rutabaga'],
+        summary=['Nya nya I modified the summary'],
+        comment=[self.template.content],
+        status=['New'])
+
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        mr, component_required=None, fields=[], initial_blocked_on='',
+        initial_blocking='', initial_cc='',
+        initial_comment=self.template.content, initial_components='',
+        initial_owner='', initial_status='New',
+        initial_summary='Nya nya I modified the summary', initial_hotlists='',
+        labels=[], template_name='rutabaga')
+    self.mox.ReplayAll()
+
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual('Template must be filled out.', mr.errors.comment)
+    self.assertIsNone(url)
+
+  def testProcessFormData_RejectNonexistentHotlist(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', user_info={'user_id': 111})
+    entered_hotlists = 'H3'
+    post_data = fake.PostData(hotlists=[entered_hotlists],
+        template_name=['rutabaga'])
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        mr, component_required=None, fields=[], initial_blocked_on='',
+        initial_blocking='', initial_cc='', initial_comment='',
+        initial_components='', initial_owner='', initial_status='',
+        initial_summary='', initial_hotlists=entered_hotlists, labels=[],
+        template_name='rutabaga')
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual('You have no hotlist(s) named: H3', mr.errors.hotlists)
+    self.assertIsNone(url)
+
+  def testProcessFormData_RejectNonexistentHotlistOwner(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', user_info={'user_id': 111})
+    entered_hotlists = 'abc:H1'
+    post_data = fake.PostData(hotlists=[entered_hotlists],
+                              template_name=['rutabaga'])
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        mr, component_required=None, fields=[], initial_blocked_on='',
+        initial_blocking='', initial_cc='', initial_comment='',
+        initial_components='', initial_owner='', initial_status='',
+        initial_summary='', initial_hotlists=entered_hotlists, labels=[],
+        template_name='rutabaga')
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual('You have no hotlist(s) owned by: abc', mr.errors.hotlists)
+    self.assertIsNone(url)
+
+  def testProcessFormData_RejectInvalidHotlistName(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', user_info={'user_id': 111})
+    entered_hotlists = 'U1:H2'
+    post_data = fake.PostData(hotlists=[entered_hotlists],
+                              template_name=['rutabaga'])
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        mr, component_required=None, fields=[], initial_blocked_on='',
+        initial_blocking='', initial_cc='', initial_comment='',
+        initial_components='', initial_owner='', initial_status='',
+        initial_summary='', initial_hotlists=entered_hotlists, labels=[],
+        template_name='rutabaga')
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual('Not in your hotlist(s): U1:H2', mr.errors.hotlists)
+    self.assertIsNone(url)
+
+  def testProcessFormData_RejectDeprecatedComponent(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry',
+        user_info={'user_id': 111},
+        project=self.project)
+    config = self.services.config.GetProjectConfig(mr.cnxn, mr.project_id)
+    config.component_defs = [
+        tracker_bizobj.MakeComponentDef(
+            1, mr.project_id, 'active', '', False, [], [], 0, 0),
+        tracker_bizobj.MakeComponentDef(
+            2, mr.project_id, 'notactive', '', True, [], [], 0, 0),
+    ]
+    self.services.config.StoreConfig(mr.cnxn, config)
+    print(config)
+    post_data = fake.PostData(
+        template_name=['rutabaga'],
+        summary=['fake summary'],
+        comment=['fake comment'],
+        components=['notactive'])
+
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        mr,
+        component_required=None,
+        fields=[],
+        initial_blocked_on='',
+        initial_blocking='',
+        initial_cc='',
+        initial_comment='fake comment',
+        initial_components='notactive',
+        initial_owner='',
+        initial_status='',
+        initial_summary='fake summary',
+        initial_hotlists='',
+        labels=[],
+        template_name='rutabaga')
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual(mr.errors.components, 'Undefined or deprecated component')
+    self.assertIsNone(url)
+
+  @patch('framework.cloud_tasks_helpers.create_task')
+  def testProcessFormData_TemplateNameMissing(self, _create_task_mock):
+    """POST doesn't fail if no template_name is passed."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', project=self.project)
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    mr.auth.effective_ids = set([100])
+
+    self.services.template.GetTemplateById.return_value = None
+    self.services.template.GetProjectTemplates.return_value = [
+        tracker_pb2.TemplateDef(members_only=True, content=''),
+        tracker_pb2.TemplateDef(members_only=False, content='')]
+    post_data = fake.PostData(
+        summary=['fake summary'],
+        comment=['fake comment'],
+        status=['New'])
+
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(mr, post_data)
+
+    self.mox.VerifyAll()
+    self.assertTrue('/p/proj/issues/detail?id=' in url)
+
+  @patch('framework.cloud_tasks_helpers.create_task')
+  def testProcessFormData_AcceptsFederatedReferences(self, _create_task_mock):
+    """ProcessFormData accepts federated references."""
+    mr = testing_helpers.MakeMonorailRequest(
+        path='/p/proj/issues/entry', project=self.project)
+    mr.auth.user_view = framework_views.StuffUserView(100, 'user@invalid', True)
+    mr.auth.effective_ids = set([100])
+
+    post_data = fake.PostData(
+        summary=['fake summary'],
+        comment=['fake comment'],
+        status=['New'],
+        template_name='rutabaga',
+        blocking=['b/123, b/987'],
+        blockedon=['b/456, b/654'])
+
+    self.mox.ReplayAll()
+    self.servlet.ProcessFormData(mr, post_data)
+
+    self.mox.VerifyAll()
+    self.assertIsNone(mr.errors.blockedon)
+    self.assertIsNone(mr.errors.blocking)
+
+  def testAttachDefaultApprovers(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.approval_defs = [
+        tracker_pb2.ApprovalDef(
+            approval_id=23, approver_ids=[222], survey='Question?'),
+        tracker_pb2.ApprovalDef(
+            approval_id=24, approver_ids=[111], survey='Question?')]
+    approval_values = [tracker_pb2.ApprovalValue(
+         approval_id=24, phase_id=1,
+         status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW)]
+    issueentry._AttachDefaultApprovers(config, approval_values)
+    self.assertEqual(approval_values[0].approver_ids, [111])
+
+  # TODO(aneeshm): add a test for the ambiguous hotlist name case; it works
+  # correctly when tested locally, but for some reason doesn't in the test
+  # environment. Probably a result of some quirk in fake.py?
diff --git a/tracker/test/issueexport_test.py b/tracker/test/issueexport_test.py
new file mode 100644
index 0000000..4e70ab7
--- /dev/null
+++ b/tracker/test/issueexport_test.py
@@ -0,0 +1,163 @@
+# 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
+
+"""Unittests for the issueexport servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from mock import Mock, patch
+
+from framework import permissions
+from proto import tracker_pb2
+from services import service_manager
+from testing import testing_helpers
+from testing import fake
+from tracker import issueexport
+
+
+class IssueExportTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        project=fake.ProjectService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        issue_star=fake.IssueStarService(),
+    )
+    self.cnxn = 'fake connection'
+    self.project = self.services.project.TestAddProject('proj', project_id=789)
+    self.servlet = issueexport.IssueExport(
+        'req', 'res', services=self.services)
+    self.jsonfeed = issueexport.IssueExportJSON(
+        'req', 'res', services=self.services)
+    self.mr = testing_helpers.MakeMonorailRequest(
+        project=self.project, perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.mr.can = 1
+
+  def testAssertBasePermission(self):
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, self.mr)
+    self.mr.auth.user_pb.is_site_admin = True
+    self.servlet.AssertBasePermission(self.mr)
+
+  @patch('time.time')
+  def testHandleRequest(self, mockTime):
+    mockTime.return_value = 1234
+    self.services.issue.GetAllIssuesInProject = Mock(return_value=[])
+    self.services.issue.GetCommentsForIssues = Mock(return_value={})
+    self.services.issue_star.LookupItemsStarrers = Mock(return_value={})
+    self.services.user.LookupUserEmails = Mock(
+        return_value={111: 'user1@test.com', 222: 'user2@test.com'})
+
+    self.mr.project_name = self.project.project_name
+    json_data = self.jsonfeed.HandleRequest(self.mr)
+
+    self.assertEqual(json_data['metadata'],
+                     {'version': 1, 'who': None, 'when': 1234,
+                      'project': 'proj', 'start': 0, 'num': 100})
+    self.assertEqual(json_data['issues'], [])
+    self.assertItemsEqual(
+        json_data['emails'], ['user1@test.com', 'user2@test.com'])
+
+  # TODO(jojwang): test attachments, amendments, comment details
+  def testMakeIssueJSON(self):
+    config = self.services.config.GetProjectConfig(
+        self.cnxn, 789)
+    config.field_defs.extend(
+        [tracker_pb2.FieldDef(
+            field_id=1, field_name='UXReview',
+            field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE),
+         tracker_pb2.FieldDef(
+             field_id=2, field_name='approvalsubfield',
+             field_type=tracker_pb2.FieldTypes.STR_TYPE, approval_id=1),
+         tracker_pb2.FieldDef(
+             field_id=3, field_name='phasefield',
+             field_type=tracker_pb2.FieldTypes.INT_TYPE, is_phase_field=True),
+         tracker_pb2.FieldDef(
+             field_id=4, field_name='normalfield',
+             field_type=tracker_pb2.FieldTypes.STR_TYPE)
+        ])
+    self.services.config.StoreConfig(self.cnxn, config)
+
+    phases = [tracker_pb2.Phase(phase_id=1, name='Phase1', rank=1),
+              tracker_pb2.Phase(phase_id=2, name='Phase2', rank=2)]
+    avs = [tracker_pb2.ApprovalValue(
+        approval_id=1, status=tracker_pb2.ApprovalStatus.APPROVED,
+        setter_id=111, set_on=7, approver_ids=[333, 444], phase_id=1)]
+    fvs = [tracker_pb2.FieldValue(field_id=2, str_value='two'),
+           tracker_pb2.FieldValue(field_id=3, int_value=3, phase_id=2),
+           tracker_pb2.FieldValue(field_id=4, str_value='four')]
+    labels = ['test', 'Type-FLT-Launch']
+
+    issue = fake.MakeTestIssue(
+        self.project.project_id, 1, 'summary', 'Open', 111, labels=labels,
+        issue_id=78901, reporter_id=222, opened_timestamp=1,
+        closed_timestamp=2, modified_timestamp=3, project_name='project',
+        field_values=fvs, phases=phases, approval_values=avs)
+
+    email_dict = {111: 'user1@test.com', 222: 'user2@test.com',
+                  333: 'user3@test.com', 444: 'user4@test.com'}
+    comment_list = [
+        tracker_pb2.IssueComment(content='simple'),
+        tracker_pb2.IssueComment(
+            content='issue desc', is_description=True)]
+    starrer_id_list = [222, 333]
+
+    issue_JSON = self.jsonfeed._MakeIssueJSON(
+        self.mr, issue, email_dict, comment_list, starrer_id_list)
+    expected_JSON = {
+        'local_id': 1,
+        'reporter': 'user2@test.com',
+        'summary': 'summary',
+        'owner': 'user1@test.com',
+        'status': 'Open',
+        'cc': [],
+        'labels': labels,
+        'phases': [{'id': 1, 'name': 'Phase1', 'rank': 1},
+                   {'id': 2, 'name': 'Phase2', 'rank': 2}],
+        'fields': [
+            {'field': 'approvalsubfield',
+             'phase': None,
+             'approval': 'UXReview',
+             'str_value': 'two'},
+            {'field': 'phasefield',
+             'phase': 'Phase2',
+             'int_value': 3},
+            {'field': 'normalfield',
+             'phase': None,
+             'str_value': 'four'}],
+        'approvals': [
+            {'approval': 'UXReview',
+             'status': 'APPROVED',
+             'setter': 'user1@test.com',
+             'set_on': 7,
+             'approvers': ['user3@test.com', 'user4@test.com'],
+             'phase': 'Phase1'}
+        ],
+        'starrers': ['user2@test.com', 'user3@test.com'],
+        'comments': [
+            {'content': 'simple',
+             'timestamp': None,
+             'amendments': [],
+             'commenter': None,
+             'attachments': [],
+             'description_num': None},
+            {'content': 'issue desc',
+             'timestamp': None,
+             'amendments': [],
+             'commenter': None,
+             'attachments': [],
+             'description_num': '1'},
+            ],
+        'opened': 1,
+        'modified': 3,
+        'closed': 2,
+    }
+
+    self.assertEqual(expected_JSON, issue_JSON)
diff --git a/tracker/test/issueimport_test.py b/tracker/test/issueimport_test.py
new file mode 100644
index 0000000..c0e38af
--- /dev/null
+++ b/tracker/test/issueimport_test.py
@@ -0,0 +1,69 @@
+# 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
+
+"""Unittests for the issueimport servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import permissions
+from services import service_manager
+from testing import testing_helpers
+from tracker import issueimport
+from proto import tracker_pb2
+
+
+class IssueExportTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services()
+    self.servlet = issueimport.IssueImport(
+        'req', 'res', services=self.services)
+    self.event_log = None
+
+  def testAssertBasePermission(self):
+    """Only site admins can import issues."""
+    mr = testing_helpers.MakeMonorailRequest(
+        perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+    mr.auth.user_pb.is_site_admin = True
+    self.servlet.AssertBasePermission(mr)
+
+  def testParseComment(self):
+    """Test a Comment JSON is correctly parsed."""
+    users_id_dict = {'adam@test.com': 111}
+    json = {
+        'timestamp': 123,
+        'commenter': 'adam@test.com',
+        'content': 'so basically, what I was thinkig of',
+        'amendments': [],
+        'attachments': [],
+        'description_num': None,
+        }
+    comment = self.servlet._ParseComment(
+        12, users_id_dict, json, self.event_log)
+    self.assertEqual(
+        comment, tracker_pb2.IssueComment(
+            project_id=12, timestamp=123, user_id=111,
+            content='so basically, what I was thinkig of'))
+
+    json_desc = {
+        'timestamp': 223,
+        'commenter': 'adam@test.com',
+        'content': 'I cant believe youve done this',
+        'description_num': '2',
+        'amendments': [],
+        'attachments': [],
+    }
+    desc_comment = self.servlet._ParseComment(
+        12, users_id_dict, json_desc, self.event_log)
+    self.assertEqual(
+        desc_comment, tracker_pb2.IssueComment(
+            project_id=12, timestamp=223, user_id=111,
+            content='I cant believe youve done this',
+            is_description=True))
diff --git a/tracker/test/issueoriginal_test.py b/tracker/test/issueoriginal_test.py
new file mode 100644
index 0000000..1b2b7d6
--- /dev/null
+++ b/tracker/test/issueoriginal_test.py
@@ -0,0 +1,226 @@
+# 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
+
+"""Tests for the issueoriginal module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+
+import webapp2
+
+from framework import exceptions
+from framework import framework_helpers
+from framework import monorailrequest
+from framework import permissions
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import issueoriginal
+
+
+STRIPPED_MSG = 'Are you sure that it is   plugged in?\n'
+ORIG_MSG = ('Are you sure that it is   plugged in?\n'
+            '\n'
+            '> Issue 1 entered by user foo:\n'
+            '> http://blah blah\n'
+            '> The screen is just dark when I press power on\n')
+XXX_GOOD_UNICODE_MSG = u'Thanks,\n\342\230\206*username*'.encode('utf-8')
+GOOD_UNICODE_MSG = u'Thanks,\n XXX *username*'
+XXX_BAD_UNICODE_MSG = ORIG_MSG + ('\xff' * 1000)
+BAD_UNICODE_MSG = ORIG_MSG + 'XXX'
+GMAIL_CRUFT_MSG = ORIG_MSG  # XXX .replace('   ', ' \xa0 ')
+
+
+class IssueOriginalTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService())
+    self.servlet = issueoriginal.IssueOriginal(
+        'req', 'res', services=self.services)
+
+    self.proj = self.services.project.TestAddProject('proj', project_id=789)
+    summary = 'System wont boot'
+    status = 'New'
+    cnxn = 'fake connection'
+    self.services.user.TestAddUser('commenter@example.com', 222)
+
+    created_issue_1 = fake.MakeTestIssue(
+        789, 1, summary, status, 111, reporter_id=111)
+    self.services.issue.TestAddIssue(created_issue_1)
+    self.local_id_1 = created_issue_1.local_id
+    comment_0 = tracker_pb2.IssueComment(
+        issue_id=created_issue_1.issue_id,
+        user_id=222,
+        project_id=789,
+        content=STRIPPED_MSG,
+        inbound_message=ORIG_MSG)
+    self.services.issue.InsertComment(cnxn, comment_0)
+    comment_1 = tracker_pb2.IssueComment(
+        issue_id=created_issue_1.issue_id,
+        user_id=222,
+        project_id=789,
+        content=STRIPPED_MSG,
+        inbound_message=BAD_UNICODE_MSG)
+    self.services.issue.InsertComment(cnxn, comment_1)
+    comment_2 = tracker_pb2.IssueComment(
+        issue_id=created_issue_1.issue_id,
+        user_id=222,
+        project_id=789,
+        content=STRIPPED_MSG,
+        inbound_message=GMAIL_CRUFT_MSG)
+    self.services.issue.InsertComment(cnxn, comment_2)
+    comment_3 = tracker_pb2.IssueComment(
+        issue_id=created_issue_1.issue_id,
+        user_id=222,
+        project_id=789,
+        content=STRIPPED_MSG,
+        inbound_message=GOOD_UNICODE_MSG)
+    self.services.issue.InsertComment(cnxn, comment_3)
+    self.issue_1 = self.services.issue.GetIssueByLocalID(
+        cnxn, 789, self.local_id_1)
+    self.comments = [comment_0, comment_1, comment_2, comment_3]
+
+  @mock.patch('framework.permissions.GetPermissions')
+  def testAssertBasePermission(self, mock_getpermissions):
+    """Permit users who can view issue, view inbound message and delete."""
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/original?id=1&seq=1',
+        project=self.proj)
+
+    # Allow the user to view the issue itself.
+    mock_getpermissions.return_value = (
+        permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+
+    # Someone without VIEW permission cannot view the inbound email.
+    mr.perms = permissions.EMPTY_PERMISSIONSET
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+
+    # Contributors don't have VIEW_INBOUND_MESSAGES.
+    mr.perms = permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+
+    # Committers do have VIEW_INBOUND_MESSAGES.
+    mr.perms = permissions.COMMITTER_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(mr)
+
+    # But, a committer cannot use that if they cannot view the issue.
+    self.issue_1.labels.append('Restrict-View-Foo')
+    mr.perms = permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET
+    self.assertRaises(permissions.PermissionException,
+                      self.servlet.AssertBasePermission, mr)
+
+    # Project owners have VIEW_INBOUND_MESSAGES and bypass restrictions.
+    mock_getpermissions.return_value = (
+        permissions.OWNER_ACTIVE_PERMISSIONSET)
+    mr.perms = permissions.OWNER_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(mr)
+
+  def testGatherPageData_Normal(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/original?id=1&seq=1',
+        project=self.proj)
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(1, page_data['local_id'])
+    self.assertEqual(1, page_data['seq'])
+    self.assertFalse(page_data['is_binary'])
+    self.assertEqual(ORIG_MSG, page_data['message_body'])
+
+  def testGatherPageData_GoodUnicode(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/original?id=1&seq=4',
+        project=self.proj)
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(1, page_data['local_id'])
+    self.assertEqual(4, page_data['seq'])
+    self.assertEqual(GOOD_UNICODE_MSG, page_data['message_body'])
+    self.assertFalse(page_data['is_binary'])
+
+  def testGatherPageData_BadUnicode(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/original?id=1&seq=2',
+        project=self.proj)
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(1, page_data['local_id'])
+    self.assertEqual(2, page_data['seq'])
+    # xxx: should be true if cruft was there.
+    # self.assertTrue(page_data['is_binary'])
+
+  def testGatherPageData_GmailCruft(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/original?id=1&seq=3',
+        project=self.proj)
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(1, page_data['local_id'])
+    self.assertEqual(3, page_data['seq'])
+    self.assertFalse(page_data['is_binary'])
+    self.assertEqual(ORIG_MSG, page_data['message_body'])
+
+  def testGatherPageData_404(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/original',
+        project=self.proj)
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.servlet.GatherPageData(mr)
+    self.assertEqual(404, cm.exception.code)
+
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/original?id=1&seq=999',
+        project=self.proj)
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.servlet.GatherPageData(mr)
+    self.assertEqual(404, cm.exception.code)
+
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/original?id=999&seq=1',
+        project=self.proj)
+    with self.assertRaises(exceptions.NoSuchIssueException) as cm:
+      self.servlet.GatherPageData(mr)
+
+  def testGetIssueAndComment_Normal(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/original?id=1&seq=1',
+        project=self.proj)
+    issue, comment = self.servlet._GetIssueAndComment(mr)
+    self.assertEqual(self.issue_1, issue)
+    self.assertEqual(self.comments[1].content, comment.content)
+
+  def testGetIssueAndComment_NoSuchComment(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/original?id=1&seq=99',
+        project=self.proj)
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.servlet._GetIssueAndComment(mr)
+    self.assertEqual(404, cm.exception.code)
+
+  def testGetIssueAndComment_Malformed(self):
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/original',
+        project=self.proj)
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.servlet._GetIssueAndComment(mr)
+    self.assertEqual(404, cm.exception.code)
+
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/original?id=1',
+        project=self.proj)
+    with self.assertRaises(webapp2.HTTPException) as cm:
+      self.servlet._GetIssueAndComment(mr)
+    self.assertEqual(404, cm.exception.code)
+
+    _request, mr = testing_helpers.GetRequestObjects(
+        path='/p/proj/issues/original?seq=1',
+        project=self.proj)
+    with self.assertRaises(exceptions.NoSuchIssueException) as cm:
+      self.servlet._GetIssueAndComment(mr)
diff --git a/tracker/test/issuereindex_test.py b/tracker/test/issuereindex_test.py
new file mode 100644
index 0000000..fe033b8
--- /dev/null
+++ b/tracker/test/issuereindex_test.py
@@ -0,0 +1,124 @@
+# 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
+
+"""Unittests for monorail.tracker.issuereindex."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+import mox
+
+import settings
+from framework import permissions
+from framework import template_helpers
+from services import service_manager
+from services import tracker_fulltext
+from testing import fake
+from testing import testing_helpers
+from tracker import issuereindex
+
+
+class IssueReindexTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        project=fake.ProjectService())
+    self.project = self.services.project.TestAddProject('proj', project_id=987)
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testAssertBasePermission_NoAccess(self):
+    # Non-members and contributors do not have permission to view this page.
+    for permission in (permissions.USER_PERMISSIONSET,
+                       permissions.COMMITTER_ACTIVE_PERMISSIONSET):
+      request, mr = testing_helpers.GetRequestObjects(
+          project=self.project, perms=permission)
+      servlet = issuereindex.IssueReindex(
+          request, 'res', services=self.services)
+    with self.assertRaises(permissions.PermissionException) as cm:
+      servlet.AssertBasePermission(mr)
+    self.assertEqual('You are not allowed to administer this project',
+                     cm.exception.message)
+
+  def testAssertBasePermission_WithAccess(self):
+    # Owners and admins have permission to view this page.
+    for permission in (permissions.OWNER_ACTIVE_PERMISSIONSET,
+                       permissions.ADMIN_PERMISSIONSET):
+      request, mr = testing_helpers.GetRequestObjects(
+          project=self.project, perms=permission)
+      servlet = issuereindex.IssueReindex(
+          request, 'res', services=self.services)
+      servlet.AssertBasePermission(mr)
+
+  def testGatherPageData(self):
+    servlet = issuereindex.IssueReindex('req', 'res', services=self.services)
+
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.auto_submit = True
+    ret = servlet.GatherPageData(mr)
+
+    self.assertTrue(ret['auto_submit'])
+    self.assertIsNone(ret['issue_tab_mode'])
+    self.assertTrue(ret['page_perms'].CreateIssue)
+
+  def _callProcessFormData(self, post_data, index_issue_1=True):
+    servlet = issuereindex.IssueReindex('req', 'res', services=self.services)
+
+    mr = testing_helpers.MakeMonorailRequest(project=self.project)
+    mr.cnxn = self.cnxn
+
+    issue1 = fake.MakeTestIssue(
+        project_id=self.project.project_id, local_id=1, summary='sum',
+        status='New', owner_id=111)
+    issue1.project_name = self.project.project_name
+    self.services.issue.TestAddIssue(issue1)
+
+    self.mox.StubOutWithMock(tracker_fulltext, 'IndexIssues')
+    if index_issue_1:
+      tracker_fulltext.IndexIssues(
+          self.cnxn, [issue1], self.services.user, self.services.issue,
+          self.services.config)
+
+    self.mox.ReplayAll()
+
+    ret = servlet.ProcessFormData(mr, post_data)
+    self.mox.VerifyAll()
+    return ret
+
+  def testProcessFormData_NormalInputs(self):
+    post_data = {'start': 1, 'num': 5}
+    ret = self._callProcessFormData(post_data)
+    self.assertEqual(
+        '/p/None/issues/reindex?start=6&auto_submit=False&num=5', ret)
+
+  def testProcessFormData_LargeInputs(self):
+    post_data = {'start': 0, 'num': 10000000}
+    ret = self._callProcessFormData(post_data)
+    self.assertEqual(
+        '/p/None/issues/reindex?start=%s&auto_submit=False&num=%s' % (
+            settings.max_artifact_search_results_per_page,
+            settings.max_artifact_search_results_per_page), ret)
+
+  def testProcessFormData_WithAutoSubmit(self):
+    post_data = {'start': 1, 'num': 5, 'auto_submit': 1}
+    ret = self._callProcessFormData(post_data)
+    self.assertEqual(
+        '/p/None/issues/reindex?start=6&auto_submit=True&num=5', ret)
+
+  def testProcessFormData_WithAutoSubmitButNoMoreIssues(self):
+    """This project has no issues 6-10, so stop autosubmitting."""
+    post_data = {'start': 6, 'num': 5, 'auto_submit': 1}
+    ret = self._callProcessFormData(post_data, index_issue_1=False)
+    self.assertEqual(
+        '/p/None/issues/reindex?start=11&auto_submit=False&num=5', ret)
diff --git a/tracker/test/issuetips_test.py b/tracker/test/issuetips_test.py
new file mode 100644
index 0000000..44f5f70
--- /dev/null
+++ b/tracker/test/issuetips_test.py
@@ -0,0 +1,33 @@
+# 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
+
+"""Tests for issuetips module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import issuetips
+
+
+class IssueTipsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        project=fake.ProjectService())
+    self.servlet = issuetips.IssueSearchTips(
+        'req', 'res', services=self.services)
+
+  def testGatherPageData(self):
+    mr = testing_helpers.MakeMonorailRequest(path='/p/proj/issues/tips')
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual('issueSearchTips', page_data['issue_tab_mode'])
diff --git a/tracker/test/rerank_helpers_test.py b/tracker/test/rerank_helpers_test.py
new file mode 100644
index 0000000..47ddd47
--- /dev/null
+++ b/tracker/test/rerank_helpers_test.py
@@ -0,0 +1,135 @@
+# 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
+
+"""Unittests for monorail.tracker.rerank_helpers."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+
+from framework import exceptions
+from testing import fake
+from tracker import rerank_helpers
+
+
+rerank_helpers.MAX_RANKING = 10
+
+
+class Rerank_HelpersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.PAST_TIME = 12345
+    hotlist_item_fields = [
+        (78904, 31, 111, self.PAST_TIME, 'note'),
+        (78903, 21, 222, self.PAST_TIME, 'note'),
+        (78902, 11, 111, self.PAST_TIME, 'note'),
+        (78901, 1, 222, self.PAST_TIME, 'note')]
+    self.hotlist = fake.Hotlist(
+        'hotlist_name', 1234, hotlist_item_fields=hotlist_item_fields)
+
+  # Tested in tests for RerankHotlistItems.
+  def testGetHotlistRerankChanges_FirstPosition(self):
+    moved_issue_ids = [78903, 78902]
+    target_position = 0
+    changed_ranks = rerank_helpers.GetHotlistRerankChanges(
+        self.hotlist.items, moved_issue_ids, target_position)
+    self.assertEqual(changed_ranks, [(78903, 5), (78902, 15), (78901, 25)])
+
+  def testGetHotlistRerankChanges_LastPosition(self):
+    moved_issue_ids = [78903, 78902]
+    target_position = 2
+    changed_ranks = rerank_helpers.GetHotlistRerankChanges(
+        self.hotlist.items, moved_issue_ids, target_position)
+    self.assertEqual(changed_ranks, [(78904, 3), (78903, 6), (78902, 9)])
+
+  def testGetHotlistRerankChanges_Middle(self):
+    moved_issue_ids = [78903]
+    target_position = 1
+    changed_ranks = rerank_helpers.GetHotlistRerankChanges(
+        self.hotlist.items, moved_issue_ids, target_position)
+    self.assertEqual(changed_ranks, [(78903, 6)])
+
+
+  def testGetHotlistRerankChanges_NewMoveIds(self):
+    "We can handle reranking for inserting new issues."
+    moved_issue_ids = [78909, 78910, 78903]
+    target_position = 0
+    changed_ranks = rerank_helpers.GetHotlistRerankChanges(
+        self.hotlist.items, moved_issue_ids, target_position)
+    self.assertEqual(
+        changed_ranks, [(78909, 1), (78910, 3), (78903, 5), (78901, 7)])
+
+  def testGetHotlistRerankChanges_InvalidMovedIds(self):
+    moved_issue_ids = [78903]
+    target_position = -1
+    with self.assertRaises(exceptions.InputException):
+      rerank_helpers.GetHotlistRerankChanges(
+          self.hotlist.items, moved_issue_ids, target_position)
+
+  def testGetHotlistRerankChanges_InvalidPosition(self):
+    moved_issue_ids = [78909]
+    target_position = 8
+    with self.assertRaises(exceptions.InputException):
+      rerank_helpers.GetHotlistRerankChanges(
+          self.hotlist.items, moved_issue_ids, target_position)
+
+  def testGetInsertRankings(self):
+    lower = [(1, 0)]
+    higher = [(2, 10)]
+    moved_ids = [3]
+    ret = rerank_helpers.GetInsertRankings(lower, higher, moved_ids)
+    self.assertEqual(ret, [(3, 5)])
+
+  def testGetInsertRankings_Below(self):
+    lower = []
+    higher = [(1, 2)]
+    moved_ids = [2]
+    ret = rerank_helpers.GetInsertRankings(lower, higher, moved_ids)
+    self.assertEqual(ret, [(2, 1)])
+
+  def testGetInsertRankings_Above(self):
+    lower = [(1, 0)]
+    higher = []
+    moved_ids = [2]
+    ret = rerank_helpers.GetInsertRankings(lower, higher, moved_ids)
+    self.assertEqual(ret, [(2, 5)])
+
+  def testGetInsertRankings_Multiple(self):
+    lower = [(1, 0)]
+    higher = [(2, 10)]
+    moved_ids = [3,4,5]
+    ret = rerank_helpers.GetInsertRankings(lower, higher, moved_ids)
+    self.assertEqual(ret, [(3, 2), (4, 5), (5, 8)])
+
+  def testGetInsertRankings_SplitLow(self):
+    lower = [(1, 0), (2, 5)]
+    higher = [(3, 6), (4, 10)]
+    moved_ids = [5]
+    ret = rerank_helpers.GetInsertRankings(lower, higher, moved_ids)
+    self.assertEqual(ret, [(2, 2), (5, 5)])
+
+  def testGetInsertRankings_SplitHigh(self):
+    lower = [(1, 0), (2, 4)]
+    higher = [(3, 5), (4, 10)]
+    moved_ids = [5]
+    ret = rerank_helpers.GetInsertRankings(lower, higher, moved_ids)
+    self.assertEqual(ret, [(5, 6), (3, 9)])
+
+  def testGetInsertRankings_NoLower(self):
+    lower = []
+    higher = [(1, 1)]
+    moved_ids = [2]
+    ret = rerank_helpers.GetInsertRankings(lower, higher, moved_ids)
+    self.assertEqual(ret, [(2, 3), (1, 8)])
+
+  def testGetInsertRankings_NoRoom(self):
+    max_ranking, rerank_helpers.MAX_RANKING = rerank_helpers.MAX_RANKING, 1
+    lower = [(1, 0)]
+    higher = [(2, 1)]
+    moved_ids = [3]
+    ret = rerank_helpers.GetInsertRankings(lower, higher, moved_ids)
+    self.assertIsNone(ret)
+    rerank_helpers.MAX_RANKING = max_ranking
diff --git a/tracker/test/tablecell_test.py b/tracker/test/tablecell_test.py
new file mode 100644
index 0000000..c8b7292
--- /dev/null
+++ b/tracker/test/tablecell_test.py
@@ -0,0 +1,491 @@
+# 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
+
+"""Unit tests for issuelist module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import time
+import unittest
+
+from framework import framework_constants
+from framework import table_view_helpers
+from framework import template_helpers
+from proto import tracker_pb2
+from testing import fake
+from testing import testing_helpers
+from tracker import tablecell
+from tracker import tracker_bizobj
+
+
+class DisplayNameMock(object):
+
+  def __init__(self, name):
+    self.display_name = name
+    self.user = None
+
+
+def MakeTestIssue(local_id, issue_id, summary, status=None):
+  issue = tracker_pb2.Issue()
+  issue.local_id = local_id
+  issue.issue_id = issue_id
+  issue.summary = summary
+  if status:
+    issue.status = status
+  return issue
+
+
+class TableCellUnitTest(unittest.TestCase):
+
+  USERS_BY_ID = {
+      23456: DisplayNameMock('Jason'),
+      34567: DisplayNameMock('Nathan'),
+      }
+
+  def setUp(self):
+    self.issue1 = MakeTestIssue(
+        local_id=1, issue_id=100001, summary='One', status="New")
+    self.issue2 = MakeTestIssue(
+        local_id=2, issue_id=100002, summary='Two', status="Fixed")
+    self.issue3 = MakeTestIssue(
+        local_id=3, issue_id=100003, summary='Three', status="UndefinedString")
+    self.issue5 = MakeTestIssue(
+        local_id=5, issue_id=100005, summary='FiveUnviewable', status="Fixed")
+    self.table_cell_kws = {
+        'col': None,
+        'users_by_id': self.USERS_BY_ID,
+        'non_col_labels': [],
+        'label_values': {},
+        'related_issues': {},
+        'config': tracker_bizobj.MakeDefaultProjectIssueConfig(678),
+        'viewable_iids_set': {100001, 100002, 100003}
+        }
+
+  def testTableCellNote(self):
+    table_cell_kws = self.table_cell_kws.copy()
+    table_cell_kws.update({'note': ''})
+    cell = tablecell.TableCellNote(
+        self.issue1, **table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_NOTE)
+    self.assertEqual(cell.values, [])
+
+  def testTableCellNote_NoNote(self):
+    table_cell_kws = self.table_cell_kws.copy()
+    table_cell_kws.update({'note': 'some note'})
+    cell = tablecell.TableCellNote(
+        self.issue1, **table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_NOTE)
+    self.assertEqual(cell.values[0].item, 'some note')
+
+  def testTableCellDateAdded(self):
+    table_cell_kws = self.table_cell_kws.copy()
+    table_cell_kws.update({'date_added': 1234})
+    cell = tablecell.TableCellDateAdded(
+        self.issue1, **table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell.values[0].item, 1234)
+
+  def testTableCellAdderID(self):
+    table_cell_kws = self.table_cell_kws.copy()
+    table_cell_kws.update({'adder_id': 23456})
+    cell = tablecell.TableCellAdderID(
+        self.issue1, **table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell.values[0].item, 'Jason')
+
+  def testTableCellRank(self):
+    table_cell_kws = self.table_cell_kws.copy()
+    table_cell_kws.update({'issue_rank': 3})
+    cell = tablecell.TableCellRank(
+        self.issue1, **table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell.values[0].item, 3)
+
+  def testTableCellID(self):
+    cell = tablecell.TableCellID(
+        MakeTestIssue(4, 4, 'Four'), **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ID)
+    # Note that the ID itself is accessed from the row, not the cell.
+
+  def testTableCellOwner(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.owner_id=23456
+
+    cell = tablecell.TableCellOwner(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell.values[0].item, 'Jason')
+
+  def testTableCellOwnerNoOwner(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.owner_id=framework_constants.NO_USER_SPECIFIED
+
+    cell = tablecell.TableCellOwner(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell.values, [])
+
+  def testTableCellReporter(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.reporter_id=34567
+
+    cell = tablecell.TableCellReporter(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell.values[0].item, 'Nathan')
+
+  def testTableCellCc(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.cc_ids = [23456, 34567]
+
+    cell = tablecell.TableCellCc(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell.values[0].item, 'Jason')
+    self.assertEqual(cell.values[1].item, 'Nathan')
+
+  def testTableCellCcNoCcs(self):
+    cell = tablecell.TableCellCc(
+        MakeTestIssue(4, 4, 'Four'), **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell.values, [])
+
+  def testTableCellAttachmentsNone(self):
+    cell = tablecell.TableCellAttachments(
+        MakeTestIssue(4, 4, 'Four'), **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell.values[0].item, 0)
+
+  def testTableCellAttachments(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.attachment_count = 2
+
+    cell = tablecell.TableCellAttachments(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell.values[0].item, 2)
+
+  def testTableCellOpened(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.opened_timestamp = 1200000000
+
+    cell = tablecell.TableCellOpened(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 'Jan 2008')
+
+  def testTableCellClosed(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.closed_timestamp = None
+
+    cell = tablecell.TableCellClosed(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values, [])
+
+    test_issue.closed_timestamp = 1200000000
+    cell = tablecell.TableCellClosed(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 'Jan 2008')
+
+  def testTableCellModified(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.modified_timestamp = None
+
+    cell = tablecell.TableCellModified(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values, [])
+
+    test_issue.modified_timestamp = 1200000000
+    cell = tablecell.TableCellModified(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 'Jan 2008')
+
+  def testTableCellOwnerLastVisit(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.owner_id = None
+
+    cell = tablecell.TableCellOwnerLastVisit(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values, [])
+
+    test_issue.owner_id = 23456
+    self.USERS_BY_ID[23456].user = testing_helpers.Blank(last_visit_timestamp=0)
+    cell = tablecell.TableCellOwnerLastVisit(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values, [])
+
+    self.USERS_BY_ID[23456].user.last_visit_timestamp = int(time.time())
+    cell = tablecell.TableCellOwnerLastVisit(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 'Today')
+
+    self.USERS_BY_ID[23456].user.last_visit_timestamp = (
+        int(time.time()) - 25 * framework_constants.SECS_PER_HOUR)
+    cell = tablecell.TableCellOwnerLastVisit(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 'Yesterday')
+
+  def testTableCellBlockedOn(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.blocked_on_iids = [
+        self.issue1.issue_id, self.issue2.issue_id, self.issue3.issue_id,
+        self.issue5.issue_id]
+    table_cell_kws = self.table_cell_kws.copy()
+    table_cell_kws['related_issues'] = {
+        self.issue1.issue_id: self.issue1, self.issue2.issue_id: self.issue2,
+        self.issue3.issue_id: self.issue3, self.issue5.issue_id: self.issue5}
+
+    cell = tablecell.TableCellBlockedOn(
+        test_issue, **table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ISSUES)
+    self.assertEqual(
+        [x.item for x in cell.values], [
+            template_helpers.EZTItem(
+                href='/p/None/issues/detail?id=1',
+                id='1',
+                closed=None,
+                title='One'),
+            template_helpers.EZTItem(
+                href='/p/None/issues/detail?id=3',
+                id='3',
+                closed=None,
+                title='Three'),
+            template_helpers.EZTItem(
+                href='/p/None/issues/detail?id=5',
+                id='5',
+                closed=None,
+                title=''),
+            template_helpers.EZTItem(
+                href='/p/None/issues/detail?id=2',
+                id='2',
+                closed='yes',
+                title='Two')
+        ])
+
+  def testTableCellBlockedOnNone(self):
+    cell = tablecell.TableCellBlockedOn(
+        MakeTestIssue(4, 4, 'Four'), **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ISSUES)
+    self.assertEqual(cell.values, [])
+
+  def testTableCellBlocking(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.blocking_iids = [
+        self.issue1.issue_id, self.issue2.issue_id, self.issue3.issue_id,
+        self.issue5.issue_id]
+    table_cell_kws = self.table_cell_kws.copy()
+    table_cell_kws['related_issues'] = {
+        self.issue1.issue_id: self.issue1, self.issue2.issue_id: self.issue2,
+        self.issue3.issue_id: self.issue3, self.issue5.issue_id: self.issue5}
+
+    cell = tablecell.TableCellBlocking(
+        test_issue, **table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ISSUES)
+    self.assertEqual(
+        [x.item for x in cell.values], [
+            template_helpers.EZTItem(
+                href='/p/None/issues/detail?id=1',
+                id='1',
+                closed=None,
+                title='One'),
+            template_helpers.EZTItem(
+                href='/p/None/issues/detail?id=3',
+                id='3',
+                closed=None,
+                title='Three'),
+            template_helpers.EZTItem(
+                href='/p/None/issues/detail?id=5',
+                id='5',
+                closed=None,
+                title=''),
+            template_helpers.EZTItem(
+                href='/p/None/issues/detail?id=2',
+                id='2',
+                closed='yes',
+                title='Two')
+        ])
+
+  def testTableCellBlockingNone(self):
+    cell = tablecell.TableCellBlocking(
+        MakeTestIssue(4, 4, 'Four'),
+        **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ISSUES)
+    self.assertEqual(cell.values, [])
+
+  def testTableCellBlocked(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.blocked_on_iids = [1, 2, 3]
+
+    cell = tablecell.TableCellBlocked(
+        test_issue, **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell.values[0].item, 'Yes')
+
+  def testTableCellBlockedNotBlocked(self):
+    cell = tablecell.TableCellBlocked(
+        MakeTestIssue(4, 4, 'Four'), **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual(cell.values[0].item, 'No')
+
+  def testTableCellMergedInto(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.merged_into = self.issue2.issue_id
+    table_cell_kws = self.table_cell_kws.copy()
+    table_cell_kws['related_issues'] = {self.issue2.issue_id: self.issue2}
+
+    cell = tablecell.TableCellMergedInto(
+        test_issue, **table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ISSUES)
+    self.assertEqual(
+        cell.values[0].item,
+        template_helpers.EZTItem(
+            href='/p/None/issues/detail?id=2',
+            id='2',
+            closed='yes',
+            title='Two'))
+
+  def testTableCellMergedIntoUnviewable(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.merged_into = self.issue5.issue_id
+    table_cell_kws = self.table_cell_kws.copy()
+    table_cell_kws['related_issues'] = {self.issue5.issue_id: self.issue5}
+
+    cell = tablecell.TableCellMergedInto(
+        test_issue, **table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ISSUES)
+    self.assertEqual(
+        cell.values[0].item,
+        template_helpers.EZTItem(
+            href='/p/None/issues/detail?id=5', id='5', closed=None, title=''))
+
+  def testTableCellMergedIntoNotMerged(self):
+    cell = tablecell.TableCellMergedInto(
+        MakeTestIssue(4, 4, 'Four'), **self.table_cell_kws)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ISSUES)
+    self.assertEqual(cell.values, [])
+
+  def testTableCellAllLabels(self):
+    labels = ['A', 'B', 'C', 'D-E', 'F-G']
+    derived_labels = ['W', 'X', 'Y-Z']
+
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.labels = labels
+    test_issue.derived_labels = derived_labels
+
+    cell = tablecell.TableCellAllLabels(test_issue)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_ATTR)
+    self.assertEqual([v.item for v in cell.values], labels + derived_labels)
+
+
+class TableCellCSVTest(unittest.TestCase):
+
+  USERS_BY_ID = {
+      23456: DisplayNameMock('Jason'),
+      }
+
+  def testTableCellOpenedTimestamp(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.opened_timestamp = 1200000000
+
+    cell = tablecell.TableCellOpenedTimestamp(test_issue)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 1200000000)
+
+  def testTableCellClosedTimestamp(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.closed_timestamp = None
+
+    cell = tablecell.TableCellClosedTimestamp(test_issue)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 0)
+
+    test_issue.closed_timestamp = 1200000000
+    cell = tablecell.TableCellClosedTimestamp(test_issue)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 1200000000)
+
+  def testTableCellModifiedTimestamp(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.modified_timestamp = 0
+
+    cell = tablecell.TableCellModifiedTimestamp(test_issue)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 0)
+
+    test_issue.modified_timestamp = 1200000000
+    cell = tablecell.TableCellModifiedTimestamp(test_issue)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 1200000000)
+
+  def testTableCellOwnerModifiedTimestamp(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.owner_modified_timestamp = 0
+
+    cell = tablecell.TableCellOwnerModifiedTimestamp(test_issue)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 0)
+
+    test_issue.owner_modified_timestamp = 1200000000
+    cell = tablecell.TableCellOwnerModifiedTimestamp(test_issue)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 1200000000)
+
+  def testTableCellStatusModifiedTimestamp(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.status_modified_timestamp = 0
+
+    cell = tablecell.TableCellStatusModifiedTimestamp(test_issue)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 0)
+
+    test_issue.status_modified_timestamp = 1200000000
+    cell = tablecell.TableCellStatusModifiedTimestamp(test_issue)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 1200000000)
+
+  def testTableCellComponentModifiedTimestamp(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.component_modified_timestamp = 0
+
+    cell = tablecell.TableCellComponentModifiedTimestamp(test_issue)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 0)
+
+    test_issue.component_modified_timestamp = 1200000000
+    cell = tablecell.TableCellComponentModifiedTimestamp(test_issue)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(cell.values[0].item, 1200000000)
+
+  def testTableCellOwnerLastVisitDaysAgo(self):
+    test_issue = MakeTestIssue(4, 4, 'Four')
+    test_issue.owner_id = None
+
+    cell = tablecell.TableCellOwnerLastVisitDaysAgo(
+        test_issue, users_by_id=self.USERS_BY_ID)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(None, cell.values[0].item)
+
+    test_issue.owner_id = 23456
+    self.USERS_BY_ID[23456].user = testing_helpers.Blank(last_visit_timestamp=0)
+    cell = tablecell.TableCellOwnerLastVisitDaysAgo(
+        test_issue, users_by_id=self.USERS_BY_ID)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(None, cell.values[0].item)
+
+    self.USERS_BY_ID[23456].user.last_visit_timestamp = (
+        int(time.time()) - 25 * 60 * 60)
+    cell = tablecell.TableCellOwnerLastVisitDaysAgo(
+        test_issue, users_by_id=self.USERS_BY_ID)
+    self.assertEqual(cell.type, table_view_helpers.CELL_TYPE_UNFILTERABLE)
+    self.assertEqual(1, cell.values[0].item)
diff --git a/tracker/test/template_helpers_test.py b/tracker/test/template_helpers_test.py
new file mode 100644
index 0000000..6c4a034
--- /dev/null
+++ b/tracker/test/template_helpers_test.py
@@ -0,0 +1,355 @@
+# Copyright 2018 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
+
+"""Unittest for the template helpers module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import unittest
+
+import settings
+
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import template_helpers
+from tracker import tracker_bizobj
+from proto import tracker_pb2
+
+
+class TemplateHelpers(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        config=fake.ConfigService(),
+        project=fake.ProjectService(),
+        usergroup=fake.UserGroupService())
+    self.project = self.services.project.TestAddProject('proj')
+    self.mr = testing_helpers.MakeMonorailRequest(
+        project=self.project)
+    self.config = self.services.config.GetProjectConfig(
+        'fake cnxn', self.project.project_id)
+    self.fd_1 =  tracker_bizobj.MakeFieldDef(
+        1, 789, 'UXReview', tracker_pb2.FieldTypes.STR_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+        'Approval for UX review', False)
+    self.fd_2 =  tracker_bizobj.MakeFieldDef(
+        2, 789, 'UXReview', tracker_pb2.FieldTypes.STR_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+        'Approval for UX review', False)
+    self.fd_3 = tracker_bizobj.MakeFieldDef(
+        3, 789, 'UXApproval', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+        'Approval for UX review', False)
+    self.fd_4 = tracker_bizobj.MakeFieldDef(
+        4, 789, 'TestApproval', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+        'Approval for Test review', False)
+    self.fd_5 = tracker_bizobj.MakeFieldDef(
+        5, 789, 'SomeApproval', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+        'Approval for Test review', False)
+    self.ad_3 = tracker_pb2.ApprovalDef(approval_id=3)
+    self.ad_4 = tracker_pb2.ApprovalDef(approval_id=4)
+    self.ad_5 = tracker_pb2.ApprovalDef(approval_id=5)
+    self.cd_1 = tracker_bizobj.MakeComponentDef(
+        1, 789, 'BackEnd', 'doc', False, [111], [], 100000, 222)
+
+    self.services.user.TestAddUser('1@ex.com', 111)
+    self.services.user.TestAddUser('2@ex.com', 222)
+    self.services.user.TestAddUser('3@ex.com', 333)
+    self.services.project.TestAddProjectMembers(
+        [111], self.project, 'OWNER_ROLE')
+
+  def testParseTemplateRequest_Empty(self):
+    post_data = fake.PostData()
+    parsed = template_helpers.ParseTemplateRequest(post_data, self.config)
+    self.assertEqual(parsed.name, '')
+    self.assertFalse(parsed.members_only)
+    self.assertEqual(parsed.summary, '')
+    self.assertFalse(parsed.summary_must_be_edited)
+    self.assertEqual(parsed.content, '')
+    self.assertEqual(parsed.status, '')
+    self.assertEqual(parsed.owner_str, '')
+    self.assertEqual(parsed.labels, [])
+    self.assertEqual(parsed.field_val_strs, {})
+    self.assertEqual(parsed.component_paths, [])
+    self.assertFalse(parsed.component_required)
+    self.assertFalse(parsed.owner_defaults_to_member)
+    self.assertFalse(parsed.add_approvals)
+    self.assertItemsEqual(parsed.phase_names, ['', '', '', '', '', ''])
+    self.assertEqual(parsed.approvals_to_phase_idx, {})
+    self.assertEqual(parsed.required_approval_ids, [])
+
+  def testParseTemplateRequest_Normal(self):
+    self.config.field_defs.extend([self.fd_1, self.fd_2])
+    self.config.approval_defs.extend([self.ad_3, self.ad_4])
+    post_data = fake.PostData(
+        name=['sometemplate'],
+        members_only=['on'],
+        summary=['TLDR'],
+        summary_must_be_edited=['on'],
+        content=['HEY WHY'],
+        status=['Accepted'],
+        owner=['someone@world.com'],
+        label=['label-One', 'label-Two'],
+        custom_1=['NO'],
+        custom_2=['MOOD'],
+        components=['hey, hey2,he3'],
+        component_required=['on'],
+        owner_defaults_to_memeber=['no'],
+        admin_names=['jojwang@test.com, annajo@test.com'],
+        add_approvals=['on'],
+        phase_0=['Canary'],
+        phase_1=['Stable-Exp'],
+        phase_2=['Stable'],
+        phase_3=[''],
+        phase_4=[''],
+        phase_5=['Oops'],
+        approval_3=['phase_2'],
+        approval_4=['no_phase'],
+        approval_3_required=['on'],
+        approval_4_required=['on'],
+        # ignore required cb for omitted approvals
+        approval_5_required=['on']
+    )
+
+    parsed = template_helpers.ParseTemplateRequest(post_data, self.config)
+    self.assertEqual(parsed.name, 'sometemplate')
+    self.assertTrue(parsed.members_only)
+    self.assertEqual(parsed.summary, 'TLDR')
+    self.assertTrue(parsed.summary_must_be_edited)
+    self.assertEqual(parsed.content, 'HEY WHY')
+    self.assertEqual(parsed.status, 'Accepted')
+    self.assertEqual(parsed.owner_str, 'someone@world.com')
+    self.assertEqual(parsed.labels, ['label-One', 'label-Two'])
+    self.assertEqual(parsed.field_val_strs, {1: ['NO'], 2: ['MOOD']})
+    self.assertEqual(parsed.component_paths, ['hey', 'hey2', 'he3'])
+    self.assertTrue(parsed.component_required)
+    self.assertFalse(parsed.owner_defaults_to_member)
+    self.assertTrue(parsed.add_approvals)
+    self.assertEqual(parsed.admin_str, 'jojwang@test.com, annajo@test.com')
+    self.assertItemsEqual(parsed.phase_names,
+                          ['Canary', 'Stable-Exp', 'Stable', '', '', 'Oops'])
+    self.assertEqual(parsed.approvals_to_phase_idx, {3: 2, 4: None})
+    self.assertItemsEqual(parsed.required_approval_ids, [3, 4])
+
+  def testGetTemplateInfoFromParsed_Normal(self):
+    self.config.field_defs.extend([self.fd_1, self.fd_2])
+    self.config.component_defs.append(self.cd_1)
+    parsed = template_helpers.ParsedTemplate(
+        'template', True, 'summary', True, 'content', 'Available',
+        '1@ex.com', ['label1', 'label1'], {1: ['NO'], 2: ['MOOD']},
+        ['BackEnd'], True, True, '2@ex.com', False, [], {}, [])
+    (admin_ids, owner_id, component_ids,
+     field_values, phases,
+     approval_values) = template_helpers.GetTemplateInfoFromParsed(
+        self.mr, self.services, parsed, self.config)
+    self.assertEqual(admin_ids, [222])
+    self.assertEqual(owner_id, 111)
+    self.assertEqual(component_ids, [1])
+    self.assertEqual(field_values[0].str_value, 'NO')
+    self.assertEqual(field_values[1].str_value, 'MOOD')
+    self.assertEqual(phases, [])
+    self.assertEqual(approval_values, [])
+
+  def testGetTemplateInfoFromParsed_Errors(self):
+    self.config.field_defs.extend([self.fd_1, self.fd_2])
+    parsed = template_helpers.ParsedTemplate(
+        'template', True, 'summary', True, 'content', 'Available',
+        '4@ex.com', ['label1', 'label1'], {1: ['NO'], 2: ['MOOD']},
+        ['BackEnd'], True, True, '2@ex.com', False, [], {}, [])
+    (admin_ids, _owner_id, _component_ids,
+     field_values, phases,
+     approval_values) = template_helpers.GetTemplateInfoFromParsed(
+        self.mr, self.services, parsed, self.config)
+    self.assertEqual(admin_ids, [222])
+    self.assertEqual(field_values[0].str_value, 'NO')
+    self.assertEqual(field_values[1].str_value, 'MOOD')
+    self.assertEqual(self.mr.errors.owner, 'Owner not found.')
+    self.assertEqual(self.mr.errors.components, 'Unknown component BackEnd')
+    self.assertEqual(phases, [])
+    self.assertEqual(approval_values, [])
+
+  def testGetPhasesAndApprovalsFromParsed_Normal(self):
+    self.config.field_defs.extend([self.fd_1, self.fd_2])
+    self.config.approval_defs.extend([self.ad_3, self.ad_4, self.ad_5])
+
+    phase_names = ['Canary', '', 'Stable-Exp', '', '', '']
+    approvals_to_phase_idx = {3: 0, 4: None, 5: 2}
+    required_approval_ids = [3, 5]
+
+    phases, approval_values = template_helpers._GetPhasesAndApprovalsFromParsed(
+        self.mr, phase_names, approvals_to_phase_idx, required_approval_ids)
+    self.assertEqual(len(phases), 2)
+    self.assertEqual(len(approval_values), 3)
+
+    canary = tracker_bizobj.FindPhase('canary', phases)
+    self.assertEqual(canary.rank, 0)
+    av_3 = tracker_bizobj.FindApprovalValueByID(3, approval_values)
+    self.assertEqual(av_3.status, tracker_pb2.ApprovalStatus.NEEDS_REVIEW)
+    self.assertEqual(av_3.phase_id, canary.phase_id)
+
+    av_4 = tracker_bizobj.FindApprovalValueByID(4, approval_values)
+    self.assertEqual(av_4.status, tracker_pb2.ApprovalStatus.NOT_SET)
+    self.assertIsNone(av_4.phase_id)
+
+    stable_exp = tracker_bizobj.FindPhase('stable-exp', phases)
+    self.assertEqual(stable_exp.rank, 2)
+    av_5 = tracker_bizobj.FindApprovalValueByID(5, approval_values)
+    self.assertEqual(av_5.status, tracker_pb2.ApprovalStatus.NEEDS_REVIEW)
+    self.assertEqual(av_5.phase_id, stable_exp.phase_id)
+
+    self.assertIsNone(self.mr.errors.phase_approvals)
+
+  def testGetPhasesAndApprovalsFromParsed_Errors(self):
+    self.config.field_defs.extend([self.fd_1, self.fd_2])
+    self.config.approval_defs.extend([self.ad_3, self.ad_4, self.ad_5])
+    required_approval_ids = []
+
+    phase_names = ['Canary', 'Extra', 'Stable-Exp', '', '', '']
+    approvals_to_phase_idx = {3: 0, 4: None, 5: 2}
+
+    template_helpers._GetPhasesAndApprovalsFromParsed(
+        self.mr, phase_names, approvals_to_phase_idx, required_approval_ids)
+    self.assertEqual(self.mr.errors.phase_approvals,
+                     'Defined gates must have assigned approvals.')
+
+  def testGetPhasesAndApprovalsFromParsed_DupsErrors(self):
+    self.config.field_defs.extend([self.fd_1, self.fd_2])
+    self.config.approval_defs.extend([self.ad_3, self.ad_4, self.ad_5])
+    required_approval_ids = []
+
+    phase_names = ['Canary', 'canary', 'Stable-Exp', '', '', '']
+    approvals_to_phase_idx = {3: 0, 4: None, 5: 2}
+
+    template_helpers._GetPhasesAndApprovalsFromParsed(
+        self.mr, phase_names, approvals_to_phase_idx, required_approval_ids)
+    self.assertEqual(self.mr.errors.phase_approvals,
+                     'Duplicate gate names.')
+
+  def testGetPhasesAndApprovalsFromParsed_InvalidPhaseName(self):
+    self.config.field_defs.extend([self.fd_1, self.fd_2])
+    self.config.approval_defs.extend([self.ad_3, self.ad_4, self.ad_5])
+    required_approval_ids = []
+
+    phase_names = ['Canary', 'A B', 'Stable-Exp', '', '', '']
+    approvals_to_phase_idx = {3: 0, 4: None, 5: 2}
+
+    template_helpers._GetPhasesAndApprovalsFromParsed(
+        self.mr, phase_names, approvals_to_phase_idx, required_approval_ids)
+    self.assertEqual(self.mr.errors.phase_approvals,
+                     'Invalid gate name(s).')
+
+  def testGatherApprovalsPageData(self):
+    self.fd_3.is_deleted = True
+    self.config.field_defs = [self.fd_3, self.fd_4, self.fd_5]
+    approval_values = [
+        tracker_pb2.ApprovalValue(approval_id=3, phase_id=8),
+        tracker_pb2.ApprovalValue(
+            approval_id=4, phase_id=9,
+            status=tracker_pb2.ApprovalStatus.NEEDS_REVIEW),
+        tracker_pb2.ApprovalValue(approval_id=5)
+    ]
+    tmpl_phases = [
+        tracker_pb2.Phase(phase_id=8, rank=1, name='deletednoshow'),
+        tracker_pb2.Phase(phase_id=9, rank=2, name='notdeleted')
+    ]
+
+    (prechecked_approvals, required_approval_ids,
+     phases) = template_helpers.GatherApprovalsPageData(
+         approval_values, tmpl_phases, self.config)
+    self.assertItemsEqual(prechecked_approvals,
+                          ['4_phase_0', '5'])
+    self.assertEqual(required_approval_ids, [4])
+    self.assertEqual(phases[0], tmpl_phases[1])
+    self.assertIsNone(phases[1].name)
+    self.assertEqual(len(phases), 6)
+
+  def testGetCheckedApprovalsFromParsed(self):
+    approvals_to_phase_idx = {23: 0, 25: 1, 26: None}
+    checked = template_helpers.GetCheckedApprovalsFromParsed(
+        approvals_to_phase_idx)
+    self.assertItemsEqual(checked,
+                          ['23_phase_0', '25_phase_1', '26'])
+
+  def testGetIssueFromTemplate(self):
+    """Can fill and return the templated issue"""
+    expected_fvs = [
+        tracker_pb2.FieldValue(field_id=123, str_value='fv_1_value'),
+        tracker_pb2.FieldValue(field_id=124, str_value='fv_2_value'),
+    ]
+    expected_phases = [
+        tracker_pb2.Phase(phase_id=123, name='phase_1_name', rank=1)
+    ]
+    expected_avs = [
+        tracker_pb2.ApprovalValue(
+            approval_id=1,
+            setter_id=111,
+            set_on=1232352,
+            approver_ids=[111],
+            phase_id=123),
+    ]
+    input_template = tracker_pb2.TemplateDef(
+        summary='expected_summary',
+        owner_id=111,
+        status='expected_status',
+        labels=['expected-label_1, expected-label_2'],
+        field_values=expected_fvs,
+        component_ids=[987],
+        phases=expected_phases,
+        approval_values=expected_avs)
+    reporter_id = 321
+    project_id = 1
+
+    actual = template_helpers.GetIssueFromTemplate(
+        input_template, project_id, reporter_id)
+    expected = tracker_pb2.Issue(
+        project_id=project_id,
+        summary='expected_summary',
+        status='expected_status',
+        owner_id=111,
+        labels=['expected-label_1, expected-label_2'],
+        component_ids=[987],
+        reporter_id=reporter_id,
+        field_values=expected_fvs,
+        phases=expected_phases,
+        approval_values=expected_avs)
+    self.assertEqual(actual, expected)
+
+  def testGetIssueFromTemplate_NoOwner(self):
+    """Uses reporter as owner when owner_defaults_to_member"""
+    input_template = tracker_pb2.TemplateDef(owner_defaults_to_member=False)
+
+    actual = template_helpers.GetIssueFromTemplate(input_template, 1, 1)
+    self.assertEqual(actual.owner_id, None)
+
+  def testGetIssueFromTemplate_DefaultsOwnerToReporter(self):
+    """Uses reporter as owner when owner_defaults_to_member"""
+    input_template = tracker_pb2.TemplateDef(owner_defaults_to_member=True)
+    reporter_id = 321
+
+    actual = template_helpers.GetIssueFromTemplate(
+        input_template, 1, reporter_id)
+    self.assertEqual(actual.owner_id, reporter_id)
+
+  def testGetIssueFromTemplate_SpecifiedOwnerOverridesReporter(self):
+    """Specified owner overrides owner_defaults_to_member"""
+    expected_owner_id = 111
+    input_template = tracker_pb2.TemplateDef(
+        owner_id=expected_owner_id, owner_defaults_to_member=True)
+    reporter_id = 321
+
+    actual = template_helpers.GetIssueFromTemplate(
+        input_template, 1, reporter_id)
+    self.assertEqual(actual.owner_id, expected_owner_id)
diff --git a/tracker/test/templatecreate_test.py b/tracker/test/templatecreate_test.py
new file mode 100644
index 0000000..60db78b
--- /dev/null
+++ b/tracker/test/templatecreate_test.py
@@ -0,0 +1,374 @@
+# Copyright 2018 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
+
+"""Unit test for Template creation servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mox
+import unittest
+import settings
+
+from mock import Mock
+
+import ezt
+
+from framework import permissions
+from services import service_manager
+from services import template_svc
+from testing import fake
+from testing import testing_helpers
+from tracker import templatecreate
+from tracker import tracker_bizobj
+from tracker import tracker_views
+from proto import tracker_pb2
+
+
+class TemplateCreateTest(unittest.TestCase):
+  """Tests for the TemplateCreate servlet."""
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        template=Mock(spec=template_svc.TemplateService),
+        user=fake.UserService())
+    self.servlet = templatecreate.TemplateCreate('req', 'res',
+        services=self.services)
+    self.project = self.services.project.TestAddProject('proj')
+
+    self.fd_1 = tracker_bizobj.MakeFieldDef(
+        1, self.project.project_id, 'StringFieldName',
+        tracker_pb2.FieldTypes.STR_TYPE, None, '', False,
+        False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+        'some approval thing', False, approval_id=2)
+
+    self.fd_2 = tracker_bizobj.MakeFieldDef(
+        2, self.project.project_id, 'UXApproval',
+        tracker_pb2.FieldTypes.APPROVAL_TYPE, None, '', False, False, False,
+        None, None, '', False, '', '', tracker_pb2.NotifyTriggers.NEVER,
+        'no_action', 'Approval for UX review', False)
+    self.fd_3 = tracker_bizobj.MakeFieldDef(
+        3, self.project.project_id, 'TestApproval',
+        tracker_pb2.FieldTypes.APPROVAL_TYPE, None, '', False, False, False,
+        None, None, '', False, '', '', tracker_pb2.NotifyTriggers.NEVER,
+        'no_action', 'Approval for Test review', False)
+    self.fd_4 =  tracker_bizobj.MakeFieldDef(
+        4, self.project.project_id, 'Target',
+        tracker_pb2.FieldTypes.INT_TYPE, None, '', False, False, False, None,
+        None, '', False, '', '', tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+        'milestone target', False, is_phase_field=True)
+    self.fd_5 = tracker_bizobj.MakeFieldDef(
+        5,
+        self.project.project_id,
+        'RestrictedField',
+        tracker_pb2.FieldTypes.INT_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'RestrictedField',
+        False,
+        is_restricted_field=True)
+    self.fd_6 = tracker_bizobj.MakeFieldDef(
+        6,
+        self.project.project_id,
+        'RestrictedEnumField',
+        tracker_pb2.FieldTypes.ENUM_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'RestrictedEnumField',
+        False,
+        is_restricted_field=True)
+    ad_2 = tracker_pb2.ApprovalDef(approval_id=2)
+    ad_3 = tracker_pb2.ApprovalDef(approval_id=3)
+
+    self.config = self.services.config.GetProjectConfig(
+        'fake cnxn', self.project.project_id)
+    self.config.approval_defs.extend([ad_2, ad_3])
+    self.config.field_defs.extend(
+        [self.fd_1, self.fd_2, self.fd_3, self.fd_4, self.fd_5, self.fd_6])
+
+    first_tmpl = tracker_bizobj.MakeIssueTemplate(
+        'sometemplate', 'summary', None, None, 'content', [], [], [],
+        [])
+    self.services.config.StoreConfig(None, self.config)
+
+    templates = testing_helpers.DefaultTemplates()
+    templates.append(first_tmpl)
+    self.services.template.GetProjectTemplates = Mock(
+        return_value=templates)
+
+    self.mr = testing_helpers.MakeMonorailRequest(
+        project=self.project, perms=permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testAssertBasePermission(self):
+    # Anon users can never do it
+    self.mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+
+    # Project owner can do it.
+    self.mr.perms = permissions.OWNER_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+
+    # Project member cannot do it
+    self.mr.perms = permissions.COMMITTER_ACTIVE_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+    self.mr.perms = permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+
+  def testGatherPageData(self):
+    precomp_view_info = tracker_views._PrecomputeInfoForValueViews(
+        [], [], [], self.config, [])
+    fv = tracker_views._MakeFieldValueView(
+        self.fd_1, self.config, precomp_view_info, {})
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(self.servlet.PROCESS_TAB_TEMPLATES,
+                     page_data['admin_tab_mode'])
+    self.assertTrue(page_data['allow_edit'])
+    self.assertEqual(page_data['uneditable_fields'], ezt.boolean(False))
+    self.assertTrue(page_data['new_template_form'])
+    self.assertFalse(page_data['initial_members_only'])
+    self.assertEqual(page_data['template_name'], '')
+    self.assertEqual(page_data['initial_summary'], '')
+    self.assertFalse(page_data['initial_must_edit_summary'])
+    self.assertEqual(page_data['initial_content'], '')
+    self.assertEqual(page_data['initial_status'], '')
+    self.assertEqual(page_data['initial_owner'], '')
+    self.assertFalse(page_data['initial_owner_defaults_to_member'])
+    self.assertEqual(page_data['initial_components'], '')
+    self.assertFalse(page_data['initial_component_required'])
+    self.assertEqual(page_data['fields'][2].field_name, fv.field_name)
+    self.assertEqual(page_data['initial_admins'], '')
+    self.assertEqual(page_data['approval_subfields_present'], ezt.boolean(True))
+    self.assertEqual(page_data['phase_fields_present'], ezt.boolean(False))
+
+  def testProcessFormData_Reject(self):
+    self.services.user.TestAddUser('user@example.com', 222)
+    self.mr.auth.effective_ids = {222}
+    post_data = fake.PostData(
+      name=['sometemplate'],
+      members_only=['on'],
+      summary=['TLDR'],
+      summary_must_be_edited=['on'],
+      content=['HEY WHY'],
+      status=['Accepted'],
+      owner=['someone@world.com'],
+      label=['label-One', 'label-Two'],
+      custom_1=['NO'],
+      custom_2=['MOOD'],
+      components=['hey, hey2,he3'],
+      component_required=['on'],
+      owner_defaults_to_member=['no'],
+      add_approvals = ['on'],
+      phase_0=['Canary'],
+      phase_1=['Stable-Exp'],
+      phase_2=['Stable'],
+      phase_3=[''],
+      phase_4=[''],
+      phase_5=[''],
+      approval_2=['phase_1'],
+      approval_3=['phase_2']
+    )
+
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        self.mr,
+        initial_members_only=ezt.boolean(True),
+        template_name='sometemplate',
+        initial_content='TLDR',
+        initial_must_edit_summary=ezt.boolean(True),
+        initial_description='HEY WHY',
+        initial_status='Accepted',
+        initial_owner='someone@world.com',
+        initial_owner_defaults_to_member=ezt.boolean(False),
+        initial_components='hey, hey2, he3',
+        initial_component_required=ezt.boolean(True),
+        initial_admins='',
+        labels=['label-One', 'label-Two'],
+        fields=mox.IgnoreArg(),
+        initial_add_approvals=ezt.boolean(True),
+        initial_phases=[tracker_pb2.Phase(name=name) for
+                        name in ['Canary', 'Stable-Exp', 'Stable', '', '', '']],
+        approvals=mox.IgnoreArg(),
+        prechecked_approvals=['2_phase_1', '3_phase_2'],
+        required_approval_ids=[]
+        )
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual('Owner not found.', self.mr.errors.owner)
+    self.assertEqual('Unknown component he3', self.mr.errors.components)
+    self.assertEqual(
+        'Template with name sometemplate already exists', self.mr.errors.name)
+    self.assertEqual('Defined gates must have assigned approvals.',
+                     self.mr.errors.phase_approvals)
+    self.assertIsNone(url)
+
+  def testProcessFormData_RejectRestrictedFields(self):
+    self.services.template.GetTemplateByName = Mock(return_value=None)
+    self.mr.perms = permissions.PermissionSet([])
+    post_data_add_fv = fake.PostData(
+        name=['secondtemplate'],
+        members_only=['on'],
+        summary=['TLDR'],
+        summary_must_be_edited=['on'],
+        content=['HEY WHY'],
+        status=['Accepted'],
+        label=['label-One', 'label-Two'],
+        custom_1=['Hey'],
+        custom_5=['7'],
+        component_required=['on'],
+        owner_defaults_to_member=['no'],
+        add_approvals=['no'],
+        phase_0=[''],
+        phase_1=[''],
+        phase_2=[''],
+        phase_3=[''],
+        phase_4=[''],
+        phase_5=['OOPs'],
+        approval_2=['phase_0'],
+        approval_3=['phase_2'])
+    post_data_label_edits_enum = fake.PostData(
+        name=['secondtemplate'],
+        members_only=['on'],
+        summary=['TLDR'],
+        summary_must_be_edited=['on'],
+        content=['HEY WHY'],
+        status=['Accepted'],
+        label=['label-One', 'label-Two', 'RestrictedEnumField-7'],
+        component_required=['on'],
+        owner_defaults_to_member=['no'],
+        add_approvals=['no'],
+        phase_0=[''],
+        phase_1=[''],
+        phase_2=[''],
+        phase_3=[''],
+        phase_4=[''],
+        phase_5=['OOPs'],
+        approval_2=['phase_0'],
+        approval_3=['phase_2'])
+
+    self.assertRaises(
+        AssertionError, self.servlet.ProcessFormData, self.mr, post_data_add_fv)
+    self.assertRaises(
+        AssertionError, self.servlet.ProcessFormData, self.mr,
+        post_data_label_edits_enum)
+
+  def testProcessFormData_Accept(self):
+    self.services.user.TestAddUser('user@example.com', 222)
+    self.mr.auth.effective_ids = {222}
+    self.services.template.GetTemplateByName = Mock(return_value=None)
+    post_data = fake.PostData(
+        name=['secondtemplate'],
+        members_only=['on'],
+        summary=['TLDR'],
+        summary_must_be_edited=['on'],
+        content=['HEY WHY'],
+        status=['Accepted'],
+        label=['label-One', 'label-Two', 'RestrictedEnumField-7'],
+        custom_1=['NO'],
+        custom_5=['37'],
+        component_required=['on'],
+        owner_defaults_to_member=['no'],
+        add_approvals=['no'],
+        phase_0=[''],
+        phase_1=[''],
+        phase_2=[''],
+        phase_3=[''],
+        phase_4=[''],
+        phase_5=['OOPs'],
+        approval_2=['phase_0'],
+        approval_3=['phase_2'])
+
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+
+    self.assertTrue('/adminTemplates?saved=1&ts' in url)
+
+    self.assertEqual(0,
+        self.services.template.UpdateIssueTemplateDef.call_count)
+
+    # errors in phases should not matter if add_approvals is not 'on'
+    self.assertIsNone(self.mr.errors.phase_approvals)
+
+  def testProcessFormData_AcceptPhases(self):
+    self.services.user.TestAddUser('user@example.com', 222)
+    self.mr.auth.effective_ids = {222}
+    self.services.template.GetTemplateByName = Mock(return_value=None)
+    post_data = fake.PostData(
+      name=['secondtemplate'],
+      members_only=['on'],
+      summary=['TLDR'],
+      summary_must_be_edited=['on'],
+      content=['HEY WHY'],
+      status=['Accepted'],
+      label=['label-One', 'label-Two'],
+      custom_1=['NO'],
+      component_required=['on'],
+      owner_defaults_to_member=['no'],
+      add_approvals = ['on'],
+      phase_0=['Canary'],
+      phase_1=['Stable'],
+      phase_2=[''],
+      phase_3=[''],
+      phase_4=[''],
+      phase_5=[''],
+      approval_2=['phase_0'],
+      approval_3=['phase_1'],
+      approval_3_required=['on']
+    )
+
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.assertTrue('/adminTemplates?saved=1&ts' in url)
+
+    fv = tracker_pb2.FieldValue(field_id=1, str_value='NO', derived=False)
+    phases = [
+        tracker_pb2.Phase(name='Canary', rank=0, phase_id=0),
+        tracker_pb2.Phase(name='Stable', rank=1, phase_id=1)
+    ]
+    approval_values = [
+        tracker_pb2.ApprovalValue(approval_id=2, phase_id=0),
+        tracker_pb2.ApprovalValue(
+            approval_id=3, status=tracker_pb2.ApprovalStatus(
+                tracker_pb2.ApprovalStatus.NEEDS_REVIEW), phase_id=1)
+        ]
+    self.services.template.CreateIssueTemplateDef.assert_called_once_with(
+        self.mr.cnxn, 47925, 'secondtemplate', 'HEY WHY', 'TLDR', True,
+        'Accepted', True, False, True, 0, ['label-One', 'label-Two'], [], [],
+        [fv], phases=phases, approval_values=approval_values)
diff --git a/tracker/test/templatedetail_test.py b/tracker/test/templatedetail_test.py
new file mode 100644
index 0000000..607996a
--- /dev/null
+++ b/tracker/test/templatedetail_test.py
@@ -0,0 +1,521 @@
+# Copyright 2018 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
+
+"""Unit tests for Template editing/viewing servlet."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mox
+import logging
+import unittest
+import settings
+
+from mock import Mock
+
+import ezt
+
+from framework import permissions
+from services import service_manager
+from services import template_svc
+from testing import fake
+from testing import testing_helpers
+from tracker import templatedetail
+from tracker import tracker_bizobj
+from proto import tracker_pb2
+
+
+class TemplateDetailTest(unittest.TestCase):
+  """Tests for the TemplateDetail servlet."""
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    mock_template_service = Mock(spec=template_svc.TemplateService)
+    self.services = service_manager.Services(project=fake.ProjectService(),
+                                             config=fake.ConfigService(),
+                                             template=mock_template_service,
+                                             usergroup=fake.UserGroupService(),
+                                             user=fake.UserService())
+    self.servlet = templatedetail.TemplateDetail('req', 'res',
+                                               services=self.services)
+
+    self.services.user.TestAddUser('gatsby@example.com', 111)
+    self.services.user.TestAddUser('sport@example.com', 222)
+    self.services.user.TestAddUser('gatsby@example.com', 111)
+    self.services.user.TestAddUser('daisy@example.com', 333)
+
+    self.project = self.services.project.TestAddProject('proj')
+    self.services.project.TestAddProjectMembers(
+        [333], self.project, 'CONTRIBUTOR_ROLE')
+
+    self.template = self.test_template = tracker_bizobj.MakeIssueTemplate(
+        'TestTemplate', 'sum', 'New', 111, 'content', ['label1', 'label2'],
+        [], [222], [], summary_must_be_edited=True,
+        owner_defaults_to_member=True, component_required=False,
+        members_only=False)
+    self.template.template_id = 12345
+    self.services.template.GetTemplateByName = Mock(
+        return_value=self.template)
+
+    self.mr = testing_helpers.MakeMonorailRequest(project=self.project)
+    self.mr.template_name = 'TestTemplate'
+
+    self.mox = mox.Mox()
+
+    self.fd_1 =  tracker_bizobj.MakeFieldDef(
+        1, 789, 'UXReview', tracker_pb2.FieldTypes.STR_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+        'Approval for UX review', False, approval_id=2)
+    self.fd_2 =  tracker_bizobj.MakeFieldDef(
+        2, 789, 'UXReview', tracker_pb2.FieldTypes.STR_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+        'Approval for UX review', False)
+    self.fd_3 = tracker_bizobj.MakeFieldDef(
+        3, 789, 'TestApproval', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'Approval for Test',
+        False)
+    self.fd_4 = tracker_bizobj.MakeFieldDef(
+        4, 789, 'SecurityApproval', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'Approval for Security',
+        False)
+    self.fd_5 = tracker_bizobj.MakeFieldDef(
+        5, 789, 'GateTarget', tracker_pb2.FieldTypes.INT_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+        'milestone target', False, is_phase_field=True)
+    self.fd_6 = tracker_bizobj.MakeFieldDef(
+        6, 789, 'Choices', tracker_pb2.FieldTypes.ENUM_TYPE, None,
+        '', False, False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action',
+        'milestone target', False, is_phase_field=True)
+    self.fd_7 = tracker_bizobj.MakeFieldDef(
+        7,
+        789,
+        'RestrictedField',
+        tracker_pb2.FieldTypes.INT_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'RestrictedField',
+        False,
+        is_restricted_field=True)
+    self.fd_8 = tracker_bizobj.MakeFieldDef(
+        8,
+        789,
+        'RestrictedEnumField',
+        tracker_pb2.FieldTypes.ENUM_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'RestrictedEnumField',
+        False,
+        is_restricted_field=True)
+    self.fd_9 = tracker_bizobj.MakeFieldDef(
+        9,
+        789,
+        'RestrictedField_2',
+        tracker_pb2.FieldTypes.INT_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'RestrictedField_2',
+        False,
+        is_restricted_field=True)
+    self.fd_10 = tracker_bizobj.MakeFieldDef(
+        10,
+        789,
+        'RestrictedEnumField_2',
+        tracker_pb2.FieldTypes.ENUM_TYPE,
+        None,
+        '',
+        False,
+        False,
+        False,
+        None,
+        None,
+        '',
+        False,
+        '',
+        '',
+        tracker_pb2.NotifyTriggers.NEVER,
+        'no_action',
+        'RestrictedEnumField_2',
+        False,
+        is_restricted_field=True)
+
+    self.ad_3 = tracker_pb2.ApprovalDef(approval_id=3)
+    self.ad_4 = tracker_pb2.ApprovalDef(approval_id=4)
+
+    self.cd_1 = tracker_bizobj.MakeComponentDef(
+        1, 789, 'BackEnd', 'doc', False, [111], [], 100000, 222)
+    self.template.component_ids.append(1)
+
+    self.canary_phase = tracker_pb2.Phase(
+        name='Canary', phase_id=1, rank=1)
+    self.av_3 = tracker_pb2.ApprovalValue(approval_id=3, phase_id=1)
+    self.stable_phase = tracker_pb2.Phase(
+        name='Stable', phase_id=2, rank=3)
+    self.av_4 = tracker_pb2.ApprovalValue(approval_id=4, phase_id=2)
+    self.template.phases.extend([self.stable_phase, self.canary_phase])
+    self.template.approval_values.extend([self.av_3, self.av_4])
+
+    self.config = self.services.config.GetProjectConfig(
+        'fake cnxn', self.project.project_id)
+    self.templates = testing_helpers.DefaultTemplates()
+    self.template.labels.extend(
+        ['GateTarget-Should-Not', 'GateTarget-Be-Masked',
+         'Choices-Wrapped', 'Choices-Burritod'])
+    self.templates.append(self.template)
+    self.services.template.GetProjectTemplates = Mock(
+        return_value=self.templates)
+    self.services.template.FindTemplateByName = Mock(return_value=self.template)
+    self.config.component_defs.append(self.cd_1)
+    self.config.field_defs.extend(
+        [
+            self.fd_1, self.fd_2, self.fd_3, self.fd_4, self.fd_5, self.fd_6,
+            self.fd_7, self.fd_8, self.fd_9, self.fd_10
+        ])
+    self.config.approval_defs.extend([self.ad_3, self.ad_4])
+    self.services.config.StoreConfig(None, self.config)
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testAssertBasePermission_Anyone(self):
+    self.mr.auth.effective_ids = {222}
+    self.servlet.AssertBasePermission(self.mr)
+
+    self.mr.auth.effective_ids = {333}
+    self.servlet.AssertBasePermission(self.mr)
+
+    self.mr.perms = permissions.OWNER_ACTIVE_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+
+    self.mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    self.servlet.AssertBasePermission(self.mr)
+
+  def testAssertBasePermision_MembersOnly(self):
+    self.template.members_only = True
+    self.mr.auth.effective_ids = {222}
+    self.servlet.AssertBasePermission(self.mr)
+
+    self.mr.auth.effective_ids = {333}
+    self.servlet.AssertBasePermission(self.mr)
+
+    self.mr.auth.effective_ids = {444}
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+
+    self.mr.perms = permissions.READ_ONLY_PERMISSIONSET
+    self.assertRaises(
+        permissions.PermissionException,
+        self.servlet.AssertBasePermission, self.mr)
+
+  def testGatherPageData(self):
+    self.mr.perms = permissions.PermissionSet([])
+    self.mr.auth.effective_ids = {222}  # template admin
+    page_data = self.servlet.GatherPageData(self.mr)
+    self.assertEqual(self.servlet.PROCESS_TAB_TEMPLATES,
+                     page_data['admin_tab_mode'])
+    self.assertTrue(page_data['allow_edit'])
+    self.assertEqual(page_data['uneditable_fields'], ezt.boolean(True))
+    self.assertFalse(page_data['new_template_form'])
+    self.assertFalse(page_data['initial_members_only'])
+    self.assertEqual(page_data['template_name'], 'TestTemplate')
+    self.assertEqual(page_data['initial_summary'], 'sum')
+    self.assertTrue(page_data['initial_must_edit_summary'])
+    self.assertEqual(page_data['initial_content'], 'content')
+    self.assertEqual(page_data['initial_status'], 'New')
+    self.assertEqual(page_data['initial_owner'], 'gatsby@example.com')
+    self.assertTrue(page_data['initial_owner_defaults_to_member'])
+    self.assertEqual(page_data['initial_components'], 'BackEnd')
+    self.assertFalse(page_data['initial_component_required'])
+    self.assertItemsEqual(
+        page_data['labels'],
+        ['label1', 'label2', 'GateTarget-Should-Not', 'GateTarget-Be-Masked'])
+    self.assertEqual(page_data['initial_admins'], 'sport@example.com')
+    self.assertTrue(page_data['initial_add_approvals'])
+    self.assertEqual(len(page_data['initial_phases']), 6)
+    phases = [phase for phase in page_data['initial_phases'] if phase.name]
+    self.assertEqual(len(phases), 2)
+    self.assertEqual(len(page_data['approvals']), 2)
+    self.assertItemsEqual(page_data['prechecked_approvals'],
+                          ['3_phase_0', '4_phase_1'])
+    self.assertTrue(page_data['fields'][3].is_editable)  #nonRestrictedField
+    self.assertIsNone(page_data['fields'][4].is_editable)  #restrictedField
+
+  def testProcessFormData_Reject(self):
+    self.mr.auth.effective_ids = {222}
+    post_data = fake.PostData(
+      name=['TestTemplate'],
+      members_only=['on'],
+      summary=['TLDR'],
+      summary_must_be_edited=['on'],
+      content=['HEY WHY'],
+      status=['Accepted'],
+      owner=['someone@world.com'],
+      label=['label-One', 'label-Two'],
+      custom_1=['NO'],
+      custom_2=['MOOD'],
+      components=['hey, hey2,he3'],
+      component_required=['on'],
+      owner_defaults_to_member=['no'],
+      add_approvals = ['on'],
+      phase_0=['Canary'],
+      phase_1=['Stable-Exp'],
+      phase_2=['Stable'],
+      phase_3=[''],
+      phase_4=[''],
+      phase_5=[''],
+      approval_3=['phase_0'],
+      approval_4=['phase_2']
+    )
+
+    self.mox.StubOutWithMock(self.servlet, 'PleaseCorrect')
+    self.servlet.PleaseCorrect(
+        self.mr,
+        initial_members_only=ezt.boolean(True),
+        template_name='TestTemplate',
+        initial_summary='TLDR',
+        initial_must_edit_summary=ezt.boolean(True),
+        initial_content='HEY WHY',
+        initial_status='Accepted',
+        initial_owner='someone@world.com',
+        initial_owner_defaults_to_member=ezt.boolean(False),
+        initial_components='hey, hey2, he3',
+        initial_component_required=ezt.boolean(True),
+        initial_admins='',
+        labels=['label-One', 'label-Two'],
+        fields=mox.IgnoreArg(),
+        initial_add_approvals=ezt.boolean(True),
+        initial_phases=[tracker_pb2.Phase(name=name) for
+                        name in ['Canary', 'Stable-Exp', 'Stable', '', '', '']],
+        approvals=mox.IgnoreArg(),
+        prechecked_approvals=['3_phase_0', '4_phase_2'],
+        required_approval_ids=[]
+        )
+    self.mox.ReplayAll()
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+    self.mox.VerifyAll()
+    self.assertEqual('Owner not found.', self.mr.errors.owner)
+    self.assertEqual('Unknown component he3', self.mr.errors.components)
+    self.assertIsNone(url)
+    self.assertEqual('Defined gates must have assigned approvals.',
+                     self.mr.errors.phase_approvals)
+
+  def testProcessFormData_RejectRestrictedFields(self):
+    """Template admins cannot set restricted fields by default."""
+    self.mr.perms = permissions.PermissionSet([])
+    self.mr.auth.effective_ids = {222}  # template admin
+    post_data_add_fv = fake.PostData(
+        name=['TestTemplate'],
+        members_only=['on'],
+        summary=['TLDR'],
+        summary_must_be_edited=[''],
+        content=['HEY WHY'],
+        status=['Accepted'],
+        owner=['daisy@example.com'],
+        label=['label-One', 'label-Two'],
+        custom_1=['NO'],
+        custom_2=['MOOD'],
+        custom_7=['37'],
+        components=['BackEnd'],
+        component_required=['on'],
+        owner_defaults_to_member=['on'],
+        add_approvals=['no'],
+        phase_0=[''],
+        phase_1=[''],
+        phase_2=[''],
+        phase_3=[''],
+        phase_4=[''],
+        phase_5=['OOPs'],
+        approval_3=['phase_0'],
+        approval_4=['phase_2'])
+    post_data_label_edits_enum = fake.PostData(
+        name=['TestTemplate'],
+        members_only=['on'],
+        summary=['TLDR'],
+        summary_must_be_edited=[''],
+        content=['HEY WHY'],
+        status=['Accepted'],
+        owner=['daisy@example.com'],
+        label=['label-One', 'label-Two', 'RestrictedEnumField-7'],
+        components=['BackEnd'],
+        component_required=['on'],
+        owner_defaults_to_member=['on'],
+        add_approvals=['no'],
+        phase_0=[''],
+        phase_1=[''],
+        phase_2=[''],
+        phase_3=[''],
+        phase_4=[''],
+        phase_5=['OOPs'],
+        approval_3=['phase_0'],
+        approval_4=['phase_2'])
+
+    self.assertRaises(
+        AssertionError, self.servlet.ProcessFormData, self.mr, post_data_add_fv)
+    self.assertRaises(
+        AssertionError, self.servlet.ProcessFormData, self.mr,
+        post_data_label_edits_enum)
+
+  def testProcessFormData_Accept(self):
+    self.fd_7.editor_ids = [222]
+    self.fd_8.editor_ids = [222]
+    self.mr.perms = permissions.PermissionSet([])
+    self.mr.auth.effective_ids = {222}  # template admin
+    temp_restricted_fv = tracker_bizobj.MakeFieldValue(
+        9, 3737, None, None, None, None, False)
+    self.template.field_values.append(temp_restricted_fv)
+    self.template.labels.append('RestrictedEnumField_2-b')
+    post_data = fake.PostData(
+        name=['TestTemplate'],
+        members_only=['on'],
+        summary=['TLDR'],
+        summary_must_be_edited=[''],
+        content=['HEY WHY'],
+        status=['Accepted'],
+        owner=['daisy@example.com'],
+        label=['label-One', 'label-Two', 'RestrictedEnumField-7'],
+        custom_1=['NO'],
+        custom_2=['MOOD'],
+        custom_7=['37'],
+        components=['BackEnd'],
+        component_required=['on'],
+        owner_defaults_to_member=['on'],
+        add_approvals=['no'],
+        phase_0=[''],
+        phase_1=[''],
+        phase_2=[''],
+        phase_3=[''],
+        phase_4=[''],
+        phase_5=['OOPs'],
+        approval_3=['phase_0'],
+        approval_4=['phase_2'])
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+
+    self.assertTrue('/templates/detail?saved=1&template=TestTemplate&' in url)
+
+    self.services.template.UpdateIssueTemplateDef.assert_called_once_with(
+        self.mr.cnxn,
+        47925,
+        12345,
+        status='Accepted',
+        component_required=True,
+        phases=[],
+        approval_values=[],
+        name='TestTemplate',
+        field_values=[
+            tracker_pb2.FieldValue(field_id=1, str_value='NO', derived=False),
+            tracker_pb2.FieldValue(field_id=2, str_value='MOOD', derived=False),
+            tracker_pb2.FieldValue(field_id=7, int_value=37, derived=False),
+            tracker_pb2.FieldValue(field_id=9, int_value=3737, derived=False)
+        ],
+        labels=[
+            'label-One', 'label-Two', 'RestrictedEnumField-7',
+            'RestrictedEnumField_2-b'
+        ],
+        owner_defaults_to_member=True,
+        admin_ids=[],
+        content='HEY WHY',
+        component_ids=[1],
+        summary_must_be_edited=False,
+        summary='TLDR',
+        members_only=True,
+        owner_id=333)
+
+  def testProcessFormData_AcceptPhases(self):
+    self.mr.auth.effective_ids = {222}
+    post_data = fake.PostData(
+      name=['TestTemplate'],
+      members_only=['on'],
+      summary=['TLDR'],
+      summary_must_be_edited=[''],
+      content=['HEY WHY'],
+      status=['Accepted'],
+      owner=['daisy@example.com'],
+      label=['label-One', 'label-Two'],
+      custom_1=['NO'],
+      custom_2=['MOOD'],
+      components=['BackEnd'],
+      component_required=['on'],
+      owner_defaults_to_member=['on'],
+      add_approvals = ['on'],
+      phase_0=['Canary'],
+      phase_1=['Stable'],
+      phase_2=[''],
+      phase_3=[''],
+      phase_4=[''],
+      phase_5=[''],
+      approval_3=['phase_0'],
+      approval_4=['phase_1']
+    )
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+
+    self.assertTrue('/templates/detail?saved=1&template=TestTemplate&' in url)
+
+    self.services.template.UpdateIssueTemplateDef.assert_called_once_with(
+        self.mr.cnxn, 47925, 12345, status='Accepted', component_required=True,
+        phases=[
+            tracker_pb2.Phase(name='Canary', rank=0, phase_id=0),
+            tracker_pb2.Phase(name='Stable', rank=1, phase_id=1)],
+        approval_values=[tracker_pb2.ApprovalValue(approval_id=3, phase_id=0),
+                         tracker_pb2.ApprovalValue(approval_id=4, phase_id=1)],
+        name='TestTemplate', field_values=[
+            tracker_pb2.FieldValue(field_id=1, str_value='NO', derived=False),
+            tracker_pb2.FieldValue(
+                field_id=2, str_value='MOOD', derived=False)],
+        labels=['label-One', 'label-Two'], owner_defaults_to_member=True,
+        admin_ids=[], content='HEY WHY', component_ids=[1],
+        summary_must_be_edited=False, summary='TLDR', members_only=True,
+        owner_id=333)
+
+  def testProcessFormData_Delete(self):
+    post_data = fake.PostData(
+      deletetemplate=['Submit'],
+      name=['TestTemplate'],
+      members_only=['on'],
+    )
+    url = self.servlet.ProcessFormData(self.mr, post_data)
+
+    self.assertTrue('/p/None/adminTemplates?deleted=1' in url)
+    self.services.template.DeleteIssueTemplateDef\
+        .assert_called_once_with(self.mr.cnxn, 47925, 12345)
diff --git a/tracker/test/tracker_bizobj_test.py b/tracker/test/tracker_bizobj_test.py
new file mode 100644
index 0000000..29351b0
--- /dev/null
+++ b/tracker/test/tracker_bizobj_test.py
@@ -0,0 +1,2456 @@
+# 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
+
+"""Tests for issue  bizobj functions."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import unittest
+import logging
+
+from framework import framework_constants
+from framework import framework_views
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+class BizobjTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        issue=fake.IssueService())
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.config.field_defs = [
+        tracker_pb2.FieldDef(
+            field_id=1, project_id=789, field_name='EstDays',
+            field_type=tracker_pb2.FieldTypes.INT_TYPE)
+        ]
+    self.config.component_defs = [
+        tracker_pb2.ComponentDef(component_id=1, project_id=789, path='UI'),
+        tracker_pb2.ComponentDef(component_id=2, project_id=789, path='DB'),
+        ]
+
+  def testGetOwnerId(self):
+    issue = tracker_pb2.Issue()
+    self.assertEqual(
+        tracker_bizobj.GetOwnerId(issue), framework_constants.NO_USER_SPECIFIED)
+
+    issue.derived_owner_id = 123
+    self.assertEqual(tracker_bizobj.GetOwnerId(issue), 123)
+
+    issue.owner_id = 456
+    self.assertEqual(tracker_bizobj.GetOwnerId(issue), 456)
+
+  def testGetStatus(self):
+    issue = tracker_pb2.Issue()
+    self.assertEqual(tracker_bizobj.GetStatus(issue), '')
+
+    issue.derived_status = 'InReview'
+    self.assertEqual(tracker_bizobj.GetStatus(issue), 'InReview')
+
+    issue.status = 'Forgotten'
+    self.assertEqual(tracker_bizobj.GetStatus(issue), 'Forgotten')
+
+  def testGetCcIds(self):
+    issue = tracker_pb2.Issue()
+    self.assertEqual(tracker_bizobj.GetCcIds(issue), [])
+
+    issue.derived_cc_ids.extend([1, 2, 3])
+    self.assertEqual(tracker_bizobj.GetCcIds(issue), [1, 2, 3])
+
+    issue.cc_ids.extend([4, 5, 6])
+    self.assertEqual(tracker_bizobj.GetCcIds(issue), [4, 5, 6, 1, 2, 3])
+
+  def testGetApproverIds(self):
+    issue = tracker_pb2.Issue()
+    self.assertEqual(tracker_bizobj.GetApproverIds(issue), [])
+
+    av_1 = tracker_pb2.ApprovalValue(approver_ids=[111, 222])
+    av_2 = tracker_pb2.ApprovalValue()
+    av_3 = tracker_pb2.ApprovalValue(approver_ids=[222, 333])
+    issue.approval_values = [av_1, av_2, av_3]
+    self.assertItemsEqual(
+        tracker_bizobj.GetApproverIds(issue), [111, 222, 333])
+
+  def testGetLabels(self):
+    issue = tracker_pb2.Issue()
+    self.assertEqual(tracker_bizobj.GetLabels(issue), [])
+
+    issue.derived_labels.extend(['a', 'b', 'c'])
+    self.assertEqual(tracker_bizobj.GetLabels(issue), ['a', 'b', 'c'])
+
+    issue.labels.extend(['d', 'e', 'f'])
+    self.assertEqual(
+        tracker_bizobj.GetLabels(issue), ['d', 'e', 'f', 'a', 'b', 'c'])
+
+  def testFindFieldDef_None(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    self.assertIsNone(tracker_bizobj.FindFieldDef(None, config))
+
+  def testFindFieldDef_Empty(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    self.assertIsNone(tracker_bizobj.FindFieldDef('EstDays', config))
+
+  def testFindFieldDef_Default(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.assertIsNone(tracker_bizobj.FindFieldDef('EstDays', config))
+
+  def testFindFieldDef_Normal(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    fd = tracker_pb2.FieldDef(field_name='EstDays')
+    config.field_defs = [fd]
+    self.assertEqual(fd, tracker_bizobj.FindFieldDef('EstDays', config))
+    self.assertEqual(fd, tracker_bizobj.FindFieldDef('ESTDAYS', config))
+    self.assertIsNone(tracker_bizobj.FindFieldDef('Unknown', config))
+
+  def testFindFieldDefByID_Empty(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    self.assertIsNone(tracker_bizobj.FindFieldDefByID(1, config))
+
+  def testFindFieldDefByID_Default(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    self.assertIsNone(tracker_bizobj.FindFieldDefByID(1, config))
+
+  def testFindFieldDefByID_Normal(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    fd = tracker_pb2.FieldDef(field_id=1)
+    config.field_defs = [fd]
+    self.assertEqual(fd, tracker_bizobj.FindFieldDefByID(1, config))
+    self.assertIsNone(tracker_bizobj.FindFieldDefByID(99, config))
+
+  def testFindApprovalDef_Empty(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    self.assertEqual(None, tracker_bizobj.FindApprovalDef(
+        'Nonexistent', config))
+
+  def testFindApprovalDef_Normal(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    approval_fd = tracker_pb2.FieldDef(field_id=1, field_name='UIApproval')
+    approval_def = tracker_pb2.ApprovalDef(
+        approval_id=1, approver_ids=[111], survey='')
+    config.field_defs = [approval_fd]
+    config.approval_defs = [approval_def]
+    self.assertEqual(approval_def, tracker_bizobj.FindApprovalDef(
+        'UIApproval', config))
+
+  def testFindApprovalDef_NotApproval(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    field_def = tracker_pb2.FieldDef(field_id=1, field_name='DesignDoc')
+    config.field_defs = [field_def]
+    self.assertEqual(None, tracker_bizobj.FindApprovalDef('DesignDoc', config))
+
+  def testFindApprovalDefByID_Empty(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    self.assertEqual(None, tracker_bizobj.FindApprovalDefByID(1, config))
+
+  def testFindApprovalDefByID_Normal(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    approval_def = tracker_pb2.ApprovalDef(
+        approval_id=1, approver_ids=[111, 222], survey='')
+    config.approval_defs = [approval_def]
+    self.assertEqual(approval_def, tracker_bizobj.FindApprovalDefByID(
+        1, config))
+    self.assertEqual(None, tracker_bizobj.FindApprovalDefByID(99, config))
+
+  def testFindApprovalValueByID_Normal(self):
+    av_24 = tracker_pb2.ApprovalValue(approval_id=24)
+    av_22 = tracker_pb2.ApprovalValue()
+    self.assertEqual(
+        av_24, tracker_bizobj.FindApprovalValueByID(24, [av_22, av_24]))
+
+  def testFindApprovalValueByID_None(self):
+    av_no_id = tracker_pb2.ApprovalValue()
+    self.assertIsNone(tracker_bizobj.FindApprovalValueByID(24, [av_no_id]))
+
+  def testFindApprovalsSubfields(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    subfd_1 = tracker_pb2.FieldDef(approval_id=1)
+    subfd_2 = tracker_pb2.FieldDef(approval_id=2)
+    subfd_3 = tracker_pb2.FieldDef(approval_id=1)
+    subfd_4 = tracker_pb2.FieldDef()
+    config.field_defs = [subfd_1, subfd_2, subfd_3, subfd_4]
+
+    subfields_dict = tracker_bizobj.FindApprovalsSubfields([1, 2], config)
+    self.assertItemsEqual(subfields_dict[1], [subfd_1, subfd_3])
+    self.assertItemsEqual(subfields_dict[2], [subfd_2])
+    self.assertItemsEqual(subfields_dict[3], [])
+
+  def testFindPhaseByID_Normal(self):
+    canary_phase = tracker_pb2.Phase(phase_id=2, name='Canary')
+    stable_phase = tracker_pb2.Phase(name='Stable')
+    self.assertEqual(
+        canary_phase,
+        tracker_bizobj.FindPhaseByID(2, [stable_phase, canary_phase]))
+
+  def testFindPhaseByID_None(self):
+    stable_phase = tracker_pb2.Phase(name='Stable')
+    self.assertIsNone(tracker_bizobj.FindPhaseByID(42, [stable_phase]))
+
+  def testFindPhase_Normal(self):
+    canary_phase = tracker_pb2.Phase(phase_id=2)
+    stable_phase = tracker_pb2.Phase(name='Stable')
+    self.assertEqual(stable_phase, tracker_bizobj.FindPhase(
+        'Stable', [stable_phase, canary_phase]))
+
+  def testFindPhase_None(self):
+    self.assertIsNone(tracker_bizobj.FindPhase('ghost_phase', []))
+
+  def testGetGrantedPerms_Empty(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    issue = tracker_pb2.Issue()
+    self.assertEqual(
+        set(), tracker_bizobj.GetGrantedPerms(issue, {111}, config))
+
+  def testGetGrantedPerms_Default(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    issue = tracker_pb2.Issue()
+    self.assertEqual(
+        set(), tracker_bizobj.GetGrantedPerms(issue, {111}, config))
+
+  def testGetGrantedPerms_NothingGranted(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    fd = tracker_pb2.FieldDef(field_id=1)  # Nothing granted
+    config.field_defs = [fd]
+    fv = tracker_pb2.FieldValue(field_id=1, user_id=222)
+    issue = tracker_pb2.Issue(field_values=[fv])
+    self.assertEqual(
+        set(),
+        tracker_bizobj.GetGrantedPerms(issue, {111, 222}, config))
+
+  def testGetGrantedPerms_Normal(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    fd = tracker_pb2.FieldDef(field_id=1, grants_perm='Highlight')
+    config.field_defs = [fd]
+    fv = tracker_pb2.FieldValue(field_id=1, user_id=222)
+    issue = tracker_pb2.Issue(field_values=[fv])
+    self.assertEqual(
+        set(),
+        tracker_bizobj.GetGrantedPerms(issue, {111}, config))
+    self.assertEqual(
+        set(['highlight']),
+        tracker_bizobj.GetGrantedPerms(issue, {111, 222}, config))
+
+  def testLabelsByPrefix(self):
+    expected = tracker_bizobj.LabelsByPrefix(
+      ['OneWordLabel', 'Key-Value1', 'Key-Value2', 'Launch-X-Y-Z'],
+      ['launch-x'])
+    self.assertEqual(
+      {'key': ['Value1', 'Value2'],
+       'launch-x': ['Y-Z']},
+      expected)
+
+  def testLabelIsMaskedByField(self):
+    self.assertIsNone(tracker_bizobj.LabelIsMaskedByField('UI', []))
+    self.assertIsNone(tracker_bizobj.LabelIsMaskedByField('P-1', []))
+    field_names = ['priority', 'size']
+    self.assertIsNone(tracker_bizobj.LabelIsMaskedByField(
+        'UI', field_names))
+    self.assertIsNone(tracker_bizobj.LabelIsMaskedByField(
+        'OS-All', field_names))
+    self.assertEqual(
+        'size', tracker_bizobj.LabelIsMaskedByField('size-xl', field_names))
+    self.assertEqual(
+        'size', tracker_bizobj.LabelIsMaskedByField('Size-XL', field_names))
+
+  def testNonMaskedLabels(self):
+    self.assertEqual([], tracker_bizobj.NonMaskedLabels([], []))
+    field_names = ['priority', 'size']
+    self.assertEqual([], tracker_bizobj.NonMaskedLabels([], field_names))
+    self.assertEqual(
+        [], tracker_bizobj.NonMaskedLabels(['Size-XL'], field_names))
+    self.assertEqual(
+        ['Hot'], tracker_bizobj.NonMaskedLabels(['Hot'], field_names))
+    self.assertEqual(
+        ['Hot'],
+        tracker_bizobj.NonMaskedLabels(['Hot', 'Size-XL'], field_names))
+
+  def testMakeApprovalValue_Basic(self):
+    av = tracker_bizobj.MakeApprovalValue(2)
+    expected = tracker_pb2.ApprovalValue(approval_id=2)
+    self.assertEqual(av, expected)
+
+  def testMakeApprovalValue_Full(self):
+    av = tracker_bizobj.MakeApprovalValue(
+        2, approver_ids=[], status=tracker_pb2.ApprovalStatus.APPROVED,
+        setter_id=3, set_on=123, phase_id=3)
+    expected = tracker_pb2.ApprovalValue(
+        approval_id=2, approver_ids=[],
+        status=tracker_pb2.ApprovalStatus.APPROVED,
+        setter_id=3, set_on=123, phase_id=3)
+    self.assertEqual(av, expected)
+
+  def testMakeFieldDef_Basic(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        1, 789, 'Size', tracker_pb2.FieldTypes.USER_TYPE, None, None,
+        False, False, False, None, None, None, False,
+        None, None, None, 'no_action', 'Some field', False)
+    self.assertEqual(1, fd.field_id)
+    self.assertEqual(None, fd.approval_id)
+    self.assertFalse(fd.is_phase_field)
+    self.assertFalse(fd.is_restricted_field)
+
+  def testMakeFieldDef_Full(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        1,
+        789,
+        'Size',
+        tracker_pb2.FieldTypes.INT_TYPE,
+        None,
+        None,
+        False,
+        False,
+        False,
+        1,
+        100,
+        None,
+        False,
+        None,
+        None,
+        None,
+        'no_action',
+        'Some field',
+        False,
+        approval_id=4,
+        is_phase_field=True,
+        is_restricted_field=True)
+    self.assertEqual(1, fd.min_value)
+    self.assertEqual(100, fd.max_value)
+    self.assertEqual(4, fd.approval_id)
+    self.assertTrue(fd.is_phase_field)
+    self.assertTrue(fd.is_restricted_field)
+
+    fd = tracker_bizobj.MakeFieldDef(
+        1,
+        789,
+        'Size',
+        tracker_pb2.FieldTypes.STR_TYPE,
+        None,
+        None,
+        False,
+        False,
+        False,
+        None,
+        None,
+        'A.*Z',
+        False,
+        'EditIssue',
+        None,
+        None,
+        'no_action',
+        'Some field',
+        False,
+        4,
+        is_restricted_field=False)
+    self.assertEqual('A.*Z', fd.regex)
+    self.assertEqual('EditIssue', fd.needs_perm)
+    self.assertEqual(4, fd.approval_id)
+    self.assertFalse(fd.is_restricted_field)
+
+  def testMakeFieldDef_IntBools(self):
+    fd = tracker_bizobj.MakeFieldDef(
+        1,
+        789,
+        'Size',
+        tracker_pb2.FieldTypes.INT_TYPE,
+        None,
+        None,
+        0,
+        0,
+        0,
+        1,
+        100,
+        None,
+        0,
+        None,
+        None,
+        None,
+        'no_action',
+        'Some field',
+        0,
+        approval_id=4,
+        is_phase_field=1,
+        is_restricted_field=1)
+    self.assertFalse(fd.is_required)
+    self.assertFalse(fd.is_niche)
+    self.assertFalse(fd.is_multivalued)
+    self.assertFalse(fd.needs_member)
+    self.assertFalse(fd.is_deleted)
+    self.assertTrue(fd.is_phase_field)
+    self.assertTrue(fd.is_restricted_field)
+
+  def testMakeFieldValue(self):
+    # Only the first value counts.
+    fv = tracker_bizobj.MakeFieldValue(1, 42, 'yay', 111, None, None, True)
+    self.assertEqual(1, fv.field_id)
+    self.assertEqual(42, fv.int_value)
+    self.assertIsNone(fv.str_value)
+    self.assertEqual(None, fv.user_id)
+    self.assertEqual(None, fv.phase_id)
+
+    fv = tracker_bizobj.MakeFieldValue(1, None, 'yay', 111, None, None, True)
+    self.assertEqual('yay', fv.str_value)
+    self.assertEqual(None, fv.user_id)
+
+    fv = tracker_bizobj.MakeFieldValue(1, None, None, 111, None, None, True)
+    self.assertEqual(111, fv.user_id)
+    self.assertEqual(True, fv.derived)
+
+    fv = tracker_bizobj.MakeFieldValue(
+        1, None, None, None, 1234567890, None, True)
+    self.assertEqual(1234567890, fv.date_value)
+    self.assertEqual(True, fv.derived)
+
+    fv = tracker_bizobj.MakeFieldValue(
+        1, None, None, None, None, 'www.google.com', True, phase_id=1)
+    self.assertEqual('www.google.com', fv.url_value)
+    self.assertEqual(True, fv.derived)
+    self.assertEqual(1, fv.phase_id)
+
+    with self.assertRaises(ValueError):
+      tracker_bizobj.MakeFieldValue(1, None, None, None, None, None, True)
+
+  def testGetFieldValueWithRawValue(self):
+    class MockUser(object):
+      def __init__(self):
+        self.email = 'test@example.com'
+    users_by_id = {111: MockUser()}
+
+    class MockFieldValue(object):
+      def __init__(
+          self, int_value=None, str_value=None, user_id=None,
+          date_value=None, url_value=None):
+        self.int_value = int_value
+        self.str_value = str_value
+        self.user_id = user_id
+        self.date_value = date_value
+        self.url_value = url_value
+
+    # Test user types.
+    # Use user_id from the field_value and get user from users_by_id.
+    val = tracker_bizobj.GetFieldValueWithRawValue(
+        field_type=tracker_pb2.FieldTypes.USER_TYPE,
+        users_by_id=users_by_id,
+        field_value=MockFieldValue(user_id=111),
+        raw_value=113,
+    )
+    self.assertEqual('test@example.com', val)
+    # Specify user_id that does not exist in users_by_id.
+    val = tracker_bizobj.GetFieldValueWithRawValue(
+        field_type=tracker_pb2.FieldTypes.USER_TYPE,
+        users_by_id=users_by_id,
+        field_value=MockFieldValue(user_id=112),
+        raw_value=113,
+    )
+    self.assertEqual(112, val)
+    # Pass in empty users_by_id.
+    val = tracker_bizobj.GetFieldValueWithRawValue(
+        field_type=tracker_pb2.FieldTypes.USER_TYPE,
+        users_by_id={},
+        field_value=MockFieldValue(user_id=111),
+        raw_value=113,
+    )
+    self.assertEqual(111, val)
+    # Test different raw_values.
+    raw_value_tests = (
+        (111, 'test@example.com'),
+        (112, 112),
+        (framework_constants.NO_USER_NAME, framework_constants.NO_USER_NAME))
+    for (raw_value, expected_output) in raw_value_tests:
+      val = tracker_bizobj.GetFieldValueWithRawValue(
+          field_type=tracker_pb2.FieldTypes.USER_TYPE,
+          users_by_id=users_by_id,
+          field_value=None,
+          raw_value=raw_value,
+      )
+      self.assertEqual(expected_output, val)
+
+    # Test enum types.
+    # The returned value should be the raw_value regardless of field_value being
+    # specified.
+    for field_value in (MockFieldValue(), None):
+      val = tracker_bizobj.GetFieldValueWithRawValue(
+          field_type=tracker_pb2.FieldTypes.ENUM_TYPE,
+          users_by_id=users_by_id,
+          field_value=field_value,
+          raw_value='abc',
+      )
+      self.assertEqual('abc', val)
+
+    # Test int type.
+    # Use int_value from the field_value.
+    val = tracker_bizobj.GetFieldValueWithRawValue(
+        field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        users_by_id=users_by_id,
+        field_value=MockFieldValue(int_value=100),
+        raw_value=101,
+    )
+    self.assertEqual(100, val)
+    # Use the raw_value when field_value is not specified.
+    val = tracker_bizobj.GetFieldValueWithRawValue(
+        field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        users_by_id=users_by_id,
+        field_value=None,
+        raw_value=101,
+    )
+    self.assertEqual(101, val)
+
+    # Test str type.
+    # Use str_value from the field_value.
+    val = tracker_bizobj.GetFieldValueWithRawValue(
+        field_type=tracker_pb2.FieldTypes.STR_TYPE,
+        users_by_id=users_by_id,
+        field_value=MockFieldValue(str_value='testing'),
+        raw_value='test',
+    )
+    self.assertEqual('testing', val)
+    # Use the raw_value when field_value is not specified.
+    val = tracker_bizobj.GetFieldValueWithRawValue(
+        field_type=tracker_pb2.FieldTypes.STR_TYPE,
+        users_by_id=users_by_id,
+        field_value=None,
+        raw_value='test',
+    )
+    self.assertEqual('test', val)
+
+    # Test date type.
+    # Use date_value from the field_value.
+    val = tracker_bizobj.GetFieldValueWithRawValue(
+        field_type=tracker_pb2.FieldTypes.DATE_TYPE,
+        users_by_id=users_by_id,
+        field_value=MockFieldValue(date_value=1234567890),
+        raw_value=2345678901,
+    )
+    self.assertEqual('2009-02-13', val)
+    # Use the raw_value when field_value is not specified.
+    val = tracker_bizobj.GetFieldValueWithRawValue(
+        field_type=tracker_pb2.FieldTypes.DATE_TYPE,
+        users_by_id=users_by_id,
+        field_value=None,
+        raw_value='2016-10-30',
+    )
+    self.assertEqual('2016-10-30', val)
+
+  def testFindComponentDef_Empty(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    actual = tracker_bizobj.FindComponentDef('DB', config)
+    self.assertIsNone(actual)
+
+  def testFindComponentDef_NoMatch(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cd = tracker_pb2.ComponentDef(path='UI>Splash')
+    config.component_defs.append(cd)
+    actual = tracker_bizobj.FindComponentDef('DB', config)
+    self.assertIsNone(actual)
+
+  def testFindComponentDef_MatchFound(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cd = tracker_pb2.ComponentDef(path='UI>Splash')
+    config.component_defs.append(cd)
+    actual = tracker_bizobj.FindComponentDef('UI>Splash', config)
+    self.assertEqual(cd, actual)
+
+  def testFindMatchingComponentIDs_Empty(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    actual = tracker_bizobj.FindMatchingComponentIDs('DB', config)
+    self.assertEqual([], actual)
+    actual = tracker_bizobj.FindMatchingComponentIDs('DB', config, exact=False)
+    self.assertEqual([], actual)
+
+  def testFindMatchingComponentIDs_NoMatch(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.component_defs.append(tracker_pb2.ComponentDef(
+        component_id=1, path='UI>Splash'))
+    config.component_defs.append(tracker_pb2.ComponentDef(
+        component_id=2, path='UI>AboutBox'))
+    actual = tracker_bizobj.FindMatchingComponentIDs('DB', config)
+    self.assertEqual([], actual)
+    actual = tracker_bizobj.FindMatchingComponentIDs('DB', config, exact=False)
+    self.assertEqual([], actual)
+
+  def testFindMatchingComponentIDs_Match(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.component_defs.append(tracker_pb2.ComponentDef(
+        component_id=1, path='UI>Splash'))
+    config.component_defs.append(tracker_pb2.ComponentDef(
+        component_id=2, path='UI>AboutBox'))
+    config.component_defs.append(tracker_pb2.ComponentDef(
+        component_id=3, path='DB>Attachments'))
+    actual = tracker_bizobj.FindMatchingComponentIDs('DB', config)
+    self.assertEqual([], actual)
+    actual = tracker_bizobj.FindMatchingComponentIDs('DB', config, exact=False)
+    self.assertEqual([3], actual)
+
+  def testFindMatchingComponentIDs_MatchMultiple(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.component_defs.append(tracker_pb2.ComponentDef(
+        component_id=1, path='UI>Splash'))
+    config.component_defs.append(tracker_pb2.ComponentDef(
+        component_id=2, path='UI>AboutBox'))
+    config.component_defs.append(tracker_pb2.ComponentDef(
+        component_id=22, path='UI>AboutBox'))
+    config.component_defs.append(tracker_pb2.ComponentDef(
+        component_id=3, path='DB>Attachments'))
+    actual = tracker_bizobj.FindMatchingComponentIDs('UI>AboutBox', config)
+    self.assertEqual([2, 22], actual)
+    actual = tracker_bizobj.FindMatchingComponentIDs('UI', config, exact=False)
+    self.assertEqual([1, 2, 22], actual)
+
+  def testFindComponentDefByID_Empty(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    actual = tracker_bizobj.FindComponentDefByID(999, config)
+    self.assertIsNone(actual)
+
+  def testFindComponentDefByID_NoMatch(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.component_defs.append(tracker_pb2.ComponentDef(
+        component_id=1, path='UI>Splash'))
+    config.component_defs.append(tracker_pb2.ComponentDef(
+        component_id=2, path='UI>AboutBox'))
+    actual = tracker_bizobj.FindComponentDefByID(999, config)
+    self.assertIsNone(actual)
+
+  def testFindComponentDefByID_MatchFound(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cd = tracker_pb2.ComponentDef(component_id=1, path='UI>Splash')
+    config.component_defs.append(cd)
+    config.component_defs.append(tracker_pb2.ComponentDef(
+        component_id=2, path='UI>AboutBox'))
+    actual = tracker_bizobj.FindComponentDefByID(1, config)
+    self.assertEqual(cd, actual)
+
+  def testFindAncestorComponents_Empty(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cd = tracker_pb2.ComponentDef(component_id=1, path='UI>Splash')
+    actual = tracker_bizobj.FindAncestorComponents(config, cd)
+    self.assertEqual([], actual)
+
+  def testFindAncestorComponents_NoMatch(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cd = tracker_pb2.ComponentDef(component_id=1, path='UI>Splash')
+    config.component_defs.append(tracker_pb2.ComponentDef(
+        component_id=2, path='UI>AboutBox'))
+    actual = tracker_bizobj.FindAncestorComponents(config, cd)
+    self.assertEqual([], actual)
+
+  def testFindAncestorComponents_NoComponents(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cd = tracker_pb2.ComponentDef(component_id=1, path='UI')
+    config.component_defs.append(cd)
+    cd2 = tracker_pb2.ComponentDef(component_id=2, path='UI>Splash')
+    config.component_defs.append(cd2)
+    actual = tracker_bizobj.FindAncestorComponents(config, cd2)
+    self.assertEqual([cd], actual)
+
+  def testGetIssueComponentsAndAncestors_NoSuchComponent(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cd = tracker_pb2.ComponentDef(component_id=1, path='UI')
+    config.component_defs.append(cd)
+    cd2 = tracker_pb2.ComponentDef(component_id=2, path='UI>Splash')
+    config.component_defs.append(cd2)
+    issue = tracker_pb2.Issue(component_ids=[999])
+    actual = tracker_bizobj.GetIssueComponentsAndAncestors(issue, config)
+    self.assertEqual([], actual)
+
+  def testGetIssueComponentsAndAncestors_AffectsNoComponents(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cd = tracker_pb2.ComponentDef(component_id=1, path='UI')
+    config.component_defs.append(cd)
+    cd2 = tracker_pb2.ComponentDef(component_id=2, path='UI>Splash')
+    config.component_defs.append(cd2)
+    issue = tracker_pb2.Issue(component_ids=[])
+    actual = tracker_bizobj.GetIssueComponentsAndAncestors(issue, config)
+    self.assertEqual([], actual)
+
+  def testGetIssueComponentsAndAncestors_AffectsSomeComponents(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cd = tracker_pb2.ComponentDef(component_id=1, path='UI')
+    config.component_defs.append(cd)
+    cd2 = tracker_pb2.ComponentDef(component_id=2, path='UI>Splash')
+    config.component_defs.append(cd2)
+    issue = tracker_pb2.Issue(component_ids=[2])
+    actual = tracker_bizobj.GetIssueComponentsAndAncestors(issue, config)
+    self.assertEqual([cd, cd2], actual)
+
+  def testFindDescendantComponents_Empty(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cd = tracker_pb2.ComponentDef(component_id=1, path='UI')
+    actual = tracker_bizobj.FindDescendantComponents(config, cd)
+    self.assertEqual([], actual)
+
+  def testFindDescendantComponents_NoMatch(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cd = tracker_pb2.ComponentDef(component_id=1, path='UI')
+    config.component_defs.append(cd)
+    actual = tracker_bizobj.FindDescendantComponents(config, cd)
+    self.assertEqual([], actual)
+
+  def testFindDescendantComponents_SomeMatch(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    cd = tracker_pb2.ComponentDef(component_id=1, path='UI')
+    config.component_defs.append(cd)
+    cd2 = tracker_pb2.ComponentDef(component_id=2, path='UI>Splash')
+    config.component_defs.append(cd2)
+    actual = tracker_bizobj.FindDescendantComponents(config, cd)
+    self.assertEqual([cd2], actual)
+
+  def testMakeComponentDef(self):
+    cd = tracker_bizobj.MakeComponentDef(
+      1, 789, 'UI', 'doc', False, [111], [222], 1234567890,
+      111)
+    self.assertEqual(1, cd.component_id)
+    self.assertEqual([111], cd.admin_ids)
+    self.assertEqual([], cd.label_ids)
+
+  def testMakeSavedQuery_WithNone(self):
+    sq = tracker_bizobj.MakeSavedQuery(
+      None, 'my query', 2, 'priority:high')
+    self.assertEqual(None, sq.query_id)
+    self.assertEqual(None, sq.subscription_mode)
+    self.assertEqual([], sq.executes_in_project_ids)
+
+  def testMakeSavedQuery(self):
+    sq = tracker_bizobj.MakeSavedQuery(
+      100, 'my query', 2, 'priority:high',
+      subscription_mode='immediate', executes_in_project_ids=[789])
+    self.assertEqual(100, sq.query_id)
+    self.assertEqual('immediate', sq.subscription_mode)
+    self.assertEqual([789], sq.executes_in_project_ids)
+
+  def testConvertDictToTemplate(self):
+    template = tracker_bizobj.ConvertDictToTemplate(
+        dict(name='name', content='content', summary='summary',
+             status='status', owner_id=111))
+    self.assertEqual('name', template.name)
+    self.assertEqual('content', template.content)
+    self.assertEqual('summary', template.summary)
+    self.assertEqual('status', template.status)
+    self.assertEqual(111, template.owner_id)
+    self.assertFalse(template.summary_must_be_edited)
+    self.assertTrue(template.owner_defaults_to_member)
+    self.assertFalse(template.component_required)
+
+    template = tracker_bizobj.ConvertDictToTemplate(
+        dict(name='name', content='content', labels=['a', 'b', 'c']))
+    self.assertListEqual(
+        ['a', 'b', 'c'], list(template.labels))
+
+    template = tracker_bizobj.ConvertDictToTemplate(
+        dict(name='name', content='content', summary_must_be_edited=True,
+             owner_defaults_to_member=True, component_required=True))
+    self.assertTrue(template.summary_must_be_edited)
+    self.assertTrue(template.owner_defaults_to_member)
+    self.assertTrue(template.component_required)
+
+    template = tracker_bizobj.ConvertDictToTemplate(
+        dict(name='name', content='content', summary_must_be_edited=False,
+             owner_defaults_to_member=False, component_required=False))
+    self.assertFalse(template.summary_must_be_edited)
+    self.assertFalse(template.owner_defaults_to_member)
+    self.assertFalse(template.component_required)
+
+  def CheckDefaultConfig(self, config):
+    self.assertTrue(len(config.well_known_statuses) > 0)
+    self.assertTrue(config.statuses_offer_merge > 0)
+    self.assertTrue(len(config.well_known_labels) > 0)
+    self.assertTrue(len(config.exclusive_label_prefixes) > 0)
+    # TODO(jrobbins): test actual values from default config
+
+  def testMakeDefaultProjectIssueConfig(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.default_template_for_developers = 1
+    config.default_template_for_users = 2
+    self.CheckDefaultConfig(config)
+
+  def testHarmonizeConfigs_Empty(self):
+    harmonized = tracker_bizobj.HarmonizeConfigs([])
+    self.CheckDefaultConfig(harmonized)
+
+  def testHarmonizeConfigs(self):
+    c1 = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    harmonized = tracker_bizobj.HarmonizeConfigs([c1])
+    self.assertListEqual(
+        [stat.status for stat in c1.well_known_statuses],
+        [stat.status for stat in harmonized.well_known_statuses])
+    self.assertListEqual(
+        [lab.label for lab in c1.well_known_labels],
+        [lab.label for lab in harmonized.well_known_labels])
+    self.assertEqual('', harmonized.default_sort_spec)
+
+    c2 = tracker_bizobj.MakeDefaultProjectIssueConfig(678)
+    tracker_bizobj.SetConfigStatuses(c2, [
+        ('Unconfirmed', '', True, False),
+        ('New', '', True, True),
+        ('Accepted', '', True, False),
+        ('Begun', '', True, False),
+        ('Fixed', '', False, False),
+        ('Obsolete', '', False, False)])
+    tracker_bizobj.SetConfigLabels(c2, [
+        ('Pri-0', '', False),
+        ('Priority-High', '', True),
+        ('Pri-1', '', False),
+        ('Priority-Medium', '', True),
+        ('Pri-2', '', False),
+        ('Priority-Low', '', True),
+        ('Pri-3', '', False),
+        ('Pri-4', '', False)])
+    c2.default_sort_spec = 'Pri -status'
+
+    c1.approval_defs = [
+        tracker_pb2.ApprovalDef(approval_id=1),
+        tracker_pb2.ApprovalDef(approval_id=3),
+    ]
+    c1.field_defs = [
+      tracker_pb2.FieldDef(
+          field_id=1, project_id=789, field_name='CowApproval',
+          field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE),
+      tracker_pb2.FieldDef(
+          field_id=3, project_id=789, field_name='MooApproval',
+          field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)
+    ]
+    c2.approval_defs = [
+        tracker_pb2.ApprovalDef(approval_id=2),
+    ]
+    c2.field_defs = [
+        tracker_pb2.FieldDef(
+            field_id=2, project_id=788, field_name='CowApproval',
+            field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE),
+    ]
+    harmonized = tracker_bizobj.HarmonizeConfigs([c1, c2])
+    result_statuses = [stat.status
+                       for stat in harmonized.well_known_statuses]
+    result_labels = [lab.label
+                     for lab in harmonized.well_known_labels]
+    self.assertListEqual(
+        ['Unconfirmed', 'New', 'Accepted', 'Begun', 'Started', 'Fixed',
+         'Obsolete', 'Verified', 'Invalid', 'Duplicate', 'WontFix', 'Done'],
+        result_statuses)
+    self.assertListEqual(
+        ['Pri-0', 'Type-Defect', 'Type-Enhancement', 'Type-Task',
+         'Type-Other', 'Priority-Critical', 'Priority-High',
+         'Pri-1', 'Priority-Medium', 'Pri-2', 'Priority-Low', 'Pri-3',
+         'Pri-4'],
+        result_labels[:result_labels.index('OpSys-All')])
+    self.assertEqual('Pri -status', harmonized.default_sort_spec.strip())
+    self.assertItemsEqual(c1.field_defs + c2.field_defs,
+                          harmonized.field_defs)
+    self.assertItemsEqual(c1.approval_defs + c2.approval_defs,
+                          harmonized.approval_defs)
+
+  def testHarmonizeConfigsMeansOpen(self):
+    c1 = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    c2 = tracker_bizobj.MakeDefaultProjectIssueConfig(678)
+    means_open = [("TT", True, True),
+                  ("TF", True, False),
+                  ("FT", False, True),
+                  ("FF", False, False)]
+    tracker_bizobj.SetConfigStatuses(c1, [
+        (x[0], x[0], x[1], False)
+         for x in means_open])
+    tracker_bizobj.SetConfigStatuses(c2, [
+        (x[0], x[0], x[2], False)
+         for x in means_open])
+
+    harmonized = tracker_bizobj.HarmonizeConfigs([c1, c2])
+    for stat in harmonized.well_known_statuses:
+      self.assertEqual(stat.means_open, stat.status != "FF")
+
+  def testHarmonizeConfigs_DeletedCustomField(self):
+    """Only non-deleted custom fields in configs are included."""
+    harmonized = tracker_bizobj.HarmonizeConfigs([self.config])
+    self.assertEqual(1, len(harmonized.field_defs))
+
+    self.config.field_defs[0].is_deleted = True
+    harmonized = tracker_bizobj.HarmonizeConfigs([self.config])
+    self.assertEqual(0, len(harmonized.field_defs))
+
+  def testHarmonizeLabelOrStatusRows_Empty(self):
+    def_rows = []
+    actual = tracker_bizobj.HarmonizeLabelOrStatusRows(def_rows)
+    self.assertEqual([], actual)
+
+  def testHarmonizeLabelOrStatusRows_Normal(self):
+    def_rows = [
+        (100, 789, 1, 'Priority-High'),
+        (101, 789, 2, 'Priority-Normal'),
+        (103, 789, 3, 'Priority-Low'),
+        (199, 789, None, 'Monday'),
+        (200, 678, 1, 'Priority-High'),
+        (201, 678, 2, 'Priority-Medium'),
+        (202, 678, 3, 'Priority-Low'),
+        (299, 678, None, 'Hot'),
+        ]
+    actual = tracker_bizobj.HarmonizeLabelOrStatusRows(def_rows)
+    self.assertEqual(
+        [(199, None, 'Monday'),
+         (299, None, 'Hot'),
+         (200, 1, 'Priority-High'),
+         (100, 1, 'Priority-High'),
+         (101, 2, 'Priority-Normal'),
+         (201, 2, 'Priority-Medium'),
+         (202, 3, 'Priority-Low'),
+         (103, 3, 'Priority-Low')
+         ],
+        actual)
+
+  def testCombineOrderedLists_Empty(self):
+    self.assertEqual([], tracker_bizobj._CombineOrderedLists([]))
+
+  def testCombineOrderedLists_Normal(self):
+    a = ['Mon', 'Wed', 'Fri']
+    b = ['Mon', 'Tue']
+    c = ['Wed', 'Thu']
+    self.assertEqual(['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
+                     tracker_bizobj._CombineOrderedLists([a, b, c]))
+
+    d = ['Mon', 'StartOfWeek', 'Wed', 'MidWeek', 'Fri', 'EndOfWeek']
+    self.assertEqual(['Mon', 'StartOfWeek', 'Tue', 'Wed', 'MidWeek', 'Thu',
+                      'Fri', 'EndOfWeek'],
+                     tracker_bizobj._CombineOrderedLists([a, b, c, d]))
+
+  def testAccumulateCombinedList_Empty(self):
+    combined_items = []
+    combined_keys = []
+    seen_keys_set = set()
+    tracker_bizobj._AccumulateCombinedList(
+        [], combined_items, combined_keys, seen_keys_set)
+    self.assertEqual([], combined_items)
+    self.assertEqual([], combined_keys)
+    self.assertEqual(set(), seen_keys_set)
+
+  def testAccumulateCombinedList_Normal(self):
+    combined_items = ['a', 'b', 'C']
+    combined_keys = ['a', 'b', 'c']  # Keys are always lowercased
+    seen_keys_set = set(['a', 'b', 'c'])
+    tracker_bizobj._AccumulateCombinedList(
+        ['b', 'x', 'C', 'd', 'a'], combined_items, combined_keys, seen_keys_set)
+    self.assertEqual(['a', 'b', 'x', 'C', 'd'], combined_items)
+    self.assertEqual(['a', 'b', 'x', 'c', 'd'], combined_keys)
+    self.assertEqual(set(['a', 'b', 'x', 'c', 'd']), seen_keys_set)
+
+  def testAccumulateCombinedList_NormalWithKeyFunction(self):
+    combined_items = ['A', 'B', 'C']
+    combined_keys = ['@a', '@b', '@c']
+    seen_keys_set = set(['@a', '@b', '@c'])
+    tracker_bizobj._AccumulateCombinedList(
+        ['B', 'X', 'c', 'D', 'A'], combined_items, combined_keys, seen_keys_set,
+        key=lambda s: '@' + s)
+    self.assertEqual(['A', 'B', 'X', 'C', 'D'], combined_items)
+    self.assertEqual(['@a', '@b', '@x', '@c', '@d'], combined_keys)
+    self.assertEqual(set(['@a', '@b', '@x', '@c', '@d']), seen_keys_set)
+
+  def testGetBuiltInQuery(self):
+    self.assertEqual(
+        'is:open', tracker_bizobj.GetBuiltInQuery(2))
+    self.assertEqual(
+        '', tracker_bizobj.GetBuiltInQuery(101))
+
+  def testUsersInvolvedInComment(self):
+    comment = tracker_pb2.IssueComment()
+    self.assertEqual({0}, tracker_bizobj.UsersInvolvedInComment(comment))
+
+    comment.user_id = 111
+    self.assertEqual(
+        {111}, tracker_bizobj.UsersInvolvedInComment(comment))
+
+    amendment = tracker_pb2.Amendment(newvalue='foo')
+    comment.amendments.append(amendment)
+    self.assertEqual(
+        {111}, tracker_bizobj.UsersInvolvedInComment(comment))
+
+    amendment.added_user_ids.append(222)
+    amendment.removed_user_ids.append(333)
+    self.assertEqual({111, 222, 333},
+                     tracker_bizobj.UsersInvolvedInComment(comment))
+
+  def testUsersInvolvedInCommentList(self):
+    self.assertEqual(set(), tracker_bizobj.UsersInvolvedInCommentList([]))
+
+    c1 = tracker_pb2.IssueComment()
+    c1.user_id = 111
+    c1.amendments.append(tracker_pb2.Amendment(newvalue='foo'))
+
+    c2 = tracker_pb2.IssueComment()
+    c2.user_id = 111
+    c2.amendments.append(tracker_pb2.Amendment(
+        added_user_ids=[222], removed_user_ids=[333]))
+
+    self.assertEqual({111},
+                     tracker_bizobj.UsersInvolvedInCommentList([c1]))
+
+    self.assertEqual({111, 222, 333},
+                     tracker_bizobj.UsersInvolvedInCommentList([c2]))
+
+    self.assertEqual({111, 222, 333},
+                     tracker_bizobj.UsersInvolvedInCommentList([c1, c2]))
+
+  def testUsersInvolvedInIssues_Empty(self):
+    self.assertEqual(set(), tracker_bizobj.UsersInvolvedInIssues([]))
+
+  def testUsersInvolvedInIssues_Normal(self):
+    av_1 = tracker_pb2.ApprovalValue(approver_ids=[666, 222, 444])
+    av_2 = tracker_pb2.ApprovalValue(approver_ids=[777], setter_id=888)
+    issue1 = tracker_pb2.Issue(
+        reporter_id=111, owner_id=222, cc_ids=[222, 333],
+        approval_values=[av_1, av_2])
+    issue2 = tracker_pb2.Issue(
+        reporter_id=333, owner_id=444, derived_cc_ids=[222, 444])
+    issue2.field_values = [tracker_pb2.FieldValue(user_id=555)]
+    self.assertEqual(
+        set([0, 111, 222, 333, 444, 555, 666, 777, 888]),
+        tracker_bizobj.UsersInvolvedInIssues([issue1, issue2]))
+
+  def testUsersInvolvedInTemplate_Empty(self):
+    template = tracker_bizobj.MakeIssueTemplate(
+        'A report', 'Something went wrong', 'New', None, 'Look out!',
+        ['Priority-High'], [], [], [])
+    self.assertEqual(set(), tracker_bizobj.UsersInvolvedInTemplate(template))
+
+  def testUsersInvolvedInTemplate_Normal(self):
+    template = tracker_bizobj.MakeIssueTemplate(
+        'A report', 'Something went wrong', 'New', 111, 'Look out!',
+        ['Priority-High'], [], [333, 444], [])
+    template.field_values = [
+        tracker_bizobj.MakeFieldValue(22, None, None, 222, None, None, False),
+        tracker_bizobj.MakeFieldValue(23, None, None, 333, None, None, False),
+        tracker_bizobj.MakeFieldValue(24, None, None, 222, None, None, False),
+        tracker_bizobj.MakeFieldValue(25, None, 'pop', None, None, None, False)]
+    template.approval_values = [
+        tracker_pb2.ApprovalValue(
+            approval_id=30, setter_id=666, approver_ids=[444, 555]),
+        tracker_pb2.ApprovalValue(approval_id=31),
+    ]
+    self.assertEqual(
+        {111, 333, 444, 222, 555, 666},
+        tracker_bizobj.UsersInvolvedInTemplate(template))
+
+  def testUsersInvolvedInTemplates_NoTemplates(self):
+    self.assertEqual(set(), tracker_bizobj.UsersInvolvedInTemplates([]))
+
+  def testUsersInvolvedInTemplates_Normal(self):
+    template1 = tracker_bizobj.MakeIssueTemplate(
+        'A report', 'Something went wrong', 'New', 111, 'Look out!',
+        ['Priority-High'], [], [333, 444], [])
+    template1.field_values = [
+        tracker_bizobj.MakeFieldValue(22, None, None, 222, None, None, False)]
+
+    template2 = tracker_bizobj.MakeIssueTemplate(
+        'dude', 'wheres my', 'New', 222, 'car', [], [], [999, 888], [])
+    template2.field_values = [
+        tracker_bizobj.MakeFieldValue(23, None, None, 333, None, None, False)]
+    template2.approval_values = [
+        tracker_pb2.ApprovalValue(
+            approval_id=30, setter_id=666, approver_ids=[444, 555]),
+        tracker_pb2.ApprovalValue(approval_id=31)]
+
+    self.assertEqual(
+        {111, 333, 444, 222, 555, 666, 888, 999},
+        tracker_bizobj.UsersInvolvedInTemplates([template1, template2]))
+
+  def testUsersInvolvedInApprovalDefs_Empty(self):
+    """There are no user IDs given empty inputs"""
+    actual = tracker_bizobj.UsersInvolvedInApprovalDefs([], [])
+    self.assertEqual(set(), actual)
+
+  def testsersInvolvedInApprovalDefs_Normal(self):
+    """We find user IDs mentioned in approval approvers and field admins"""
+    self.config.field_defs[0].admin_ids = [111, 222]
+    approval_def = tracker_pb2.ApprovalDef(
+        approval_id=1, approver_ids=[111, 333], survey='')
+    self.config.approval_defs = [approval_def]
+    actual = tracker_bizobj.UsersInvolvedInApprovalDefs(
+        [approval_def], [self.config.field_defs[0]])
+    self.assertEqual({111, 222, 333}, actual)
+
+  def testUsersInvolvedInConfig_Empty(self):
+    """There are no user IDs mentioned in a default config."""
+    actual = tracker_bizobj.UsersInvolvedInConfig(self.config)
+    self.assertEqual(set(), actual)
+
+  def testUsersInvolvedInConfig_Normal(self):
+    """We find user IDs mentioned components, fields, and approvals."""
+    self.config.component_defs[0].admin_ids = [111]
+    self.config.component_defs[0].cc_ids = [444]
+    self.config.field_defs[0].admin_ids = [111, 222]
+    approval_def = tracker_pb2.ApprovalDef(
+        approval_id=1, approver_ids=[111, 333], survey='')
+    self.config.approval_defs = [approval_def]
+    actual = tracker_bizobj.UsersInvolvedInConfig(self.config)
+    self.assertEqual({111, 222, 333, 444}, actual)
+
+  def testLabelIDsInvolvedInConfig_Empty(self):
+    """There are no label IDs mentioned in a default config."""
+    actual = tracker_bizobj.LabelIDsInvolvedInConfig(self.config)
+    self.assertEqual(set(), actual)
+
+  def testLabelIDsInvolvedInConfig_Normal(self):
+    """We find label IDs added by components."""
+    self.config.component_defs[0].label_ids = [1, 2, 3]
+    actual = tracker_bizobj.LabelIDsInvolvedInConfig(self.config)
+    self.assertEqual({1, 2, 3}, actual)
+
+  def testMakeApprovalDelta_AllSpecified(self):
+    added_fv = tracker_bizobj.MakeFieldValue(
+      1, None, 'added str', None, None, None, False)
+    removed_fv = tracker_bizobj.MakeFieldValue(
+      1, None, 'removed str', None, None, None, False)
+    clear_fvs = [24]
+    labels_add = ['ittly-bittly', 'piggly-wiggly']
+    labels_remove = ['golly-goops', 'whoopsie']
+    actual = tracker_bizobj.MakeApprovalDelta(
+        tracker_pb2.ApprovalStatus.APPROVED, 111, [222], [],
+        [added_fv], [removed_fv], clear_fvs, labels_add, labels_remove,
+        set_on=1234)
+    self.assertEqual(actual.status, tracker_pb2.ApprovalStatus.APPROVED)
+    self.assertEqual(actual.setter_id, 111)
+    self.assertEqual(actual.set_on, 1234)
+    self.assertEqual(actual.subfield_vals_add, [added_fv])
+    self.assertEqual(actual.subfield_vals_remove, [removed_fv])
+    self.assertEqual(actual.subfields_clear, clear_fvs)
+    self.assertEqual(actual.labels_add, labels_add)
+    self.assertEqual(actual.labels_remove, labels_remove)
+
+  def testMakeApprovalDelta_WithNones(self):
+    added_fv = tracker_bizobj.MakeFieldValue(
+      1, None, 'added str', None, None, None, False)
+    removed_fv = tracker_bizobj.MakeFieldValue(
+      1, None, 'removed str', None, None, None, False)
+    clear_fields = [2]
+    labels_add = ['ittly-bittly', 'piggly-wiggly']
+    labels_remove = ['golly-goops', 'whoopsie']
+    actual = tracker_bizobj.MakeApprovalDelta(
+        None, 111, [222], [],
+        [added_fv], [removed_fv], clear_fields,
+        labels_add, labels_remove)
+    self.assertIsNone(actual.status)
+    self.assertIsNone(actual.setter_id)
+    self.assertIsNone(actual.set_on)
+
+  def testMakeIssueDelta_AllSpecified(self):
+    added_fv = tracker_bizobj.MakeFieldValue(
+      1, None, 'added str', None, None, None, False)
+    removed_fv = tracker_bizobj.MakeFieldValue(
+      1, None, 'removed str', None, None, None, False)
+    actual = tracker_bizobj.MakeIssueDelta(
+      'New', 111, [222], [333], [1], [2],
+      ['AddedLabel'], ['RemovedLabel'], [added_fv], [removed_fv],
+      [3], [78901], [78902], [78903], [78904], 78905,
+      'New summary',
+      ext_blocked_on_add=['b/123', 'b/234'],
+      ext_blocked_on_remove=['b/345', 'b/456'],
+      ext_blocking_add=['b/567', 'b/678'],
+      ext_blocking_remove=['b/789', 'b/890'])
+    self.assertEqual('New', actual.status)
+    self.assertEqual(111, actual.owner_id)
+    self.assertEqual([222], actual.cc_ids_add)
+    self.assertEqual([333], actual.cc_ids_remove)
+    self.assertEqual([1], actual.comp_ids_add)
+    self.assertEqual([2], actual.comp_ids_remove)
+    self.assertEqual(['AddedLabel'], actual.labels_add)
+    self.assertEqual(['RemovedLabel'], actual.labels_remove)
+    self.assertEqual([added_fv], actual.field_vals_add)
+    self.assertEqual([removed_fv], actual.field_vals_remove)
+    self.assertEqual([3], actual.fields_clear)
+    self.assertEqual([78901], actual.blocked_on_add)
+    self.assertEqual([78902], actual.blocked_on_remove)
+    self.assertEqual([78903], actual.blocking_add)
+    self.assertEqual([78904], actual.blocking_remove)
+    self.assertEqual(78905, actual.merged_into)
+    self.assertEqual('New summary', actual.summary)
+    self.assertEqual(['b/123', 'b/234'], actual.ext_blocked_on_add)
+    self.assertEqual(['b/345', 'b/456'], actual.ext_blocked_on_remove)
+    self.assertEqual(['b/567', 'b/678'], actual.ext_blocking_add)
+    self.assertEqual(['b/789', 'b/890'], actual.ext_blocking_remove)
+
+  def testMakeIssueDelta_WithNones(self):
+    """None for status, owner_id, or summary does not set a value."""
+    actual = tracker_bizobj.MakeIssueDelta(
+      None, None, [], [], [], [],
+      [], [], [], [],
+      [], [], [], [], [], None,
+      None)
+    self.assertIsNone(actual.status)
+    self.assertIsNone(actual.owner_id)
+    self.assertIsNone(actual.merged_into)
+    self.assertIsNone(actual.summary)
+
+  def testApplyLabelChanges_RemoveAndAdd(self):
+    issue = tracker_pb2.Issue(
+        labels=['tobe-removed', 'tobe-notremoved', 'tobe-removed-2'])
+    amendment = tracker_bizobj.ApplyLabelChanges(
+        issue, self.config,
+        [u'tobe-added', 'to:be-added-2'],
+        [u'tobe-removed', u'to:be-removed-2'])
+    self.assertEqual(amendment, tracker_bizobj.MakeLabelsAmendment(
+        ['tobe-added', 'tobe-added-2'], ['tobe-removed', 'tobe-removed-2']))
+
+  def testApplyLabelChanges_RemoveInvalidLabel(self):
+    issue = tracker_pb2.Issue(labels=[])
+    amendment = tracker_bizobj.ApplyLabelChanges(
+        issue, self.config, [], [u'lost-car'])
+    self.assertIsNone(amendment)
+
+  def testApplyLabelChanges_NoChangesAfterMerge(self):
+    issue = tracker_pb2.Issue(labels=['lost-car'])
+    amendment = tracker_bizobj.ApplyLabelChanges(
+        issue, self.config, [u'lost-car'], [])
+    self.assertIsNone(amendment)
+
+  def testApplyLabelChanges_Empty(self):
+    issue = tracker_pb2.Issue(labels=[])
+    amendment = tracker_bizobj.ApplyLabelChanges(issue, self.config, [], [])
+    self.assertIsNone(amendment)
+
+  def testApplyFieldValueChanges(self):
+    self.config.field_defs = [
+        tracker_pb2.FieldDef(
+            field_id=1, project_id=789, field_name='EstDays',
+            field_type=tracker_pb2.FieldTypes.INT_TYPE),
+        tracker_pb2.FieldDef(
+            field_id=2, project_id=789, field_name='SleepHrs',
+            field_type=tracker_pb2.FieldTypes.INT_TYPE, is_phase_field=True),
+        tracker_pb2.FieldDef(
+            field_id=3, project_id=789, field_name='Chickens',
+            field_type=tracker_pb2.FieldTypes.STR_TYPE, is_phase_field=True,
+            is_multivalued=True),
+    ]
+    original_keep = [
+        tracker_pb2.FieldValue(field_id=3, str_value='bok', phase_id=45)]
+    original_replace = [
+        tracker_pb2.FieldValue(field_id=1, int_value=72),
+        tracker_pb2.FieldValue(field_id=2, int_value=88, phase_id=44)]
+    original_remove = [
+        tracker_pb2.FieldValue(field_id=3, str_value='removedbok', phase_id=45),
+    ]
+    issue = tracker_pb2.Issue(
+        phases=[
+            tracker_pb2.Phase(phase_id=45, name='high-school'),
+            tracker_pb2.Phase(phase_id=44, name='college')])
+    issue.field_values = original_keep + original_replace + original_remove
+
+    fvs_add_ignore = [
+        tracker_pb2.FieldValue(field_id=3, str_value='egg', phase_id=42)]
+    fvs_add = [
+        tracker_pb2.FieldValue(field_id=1, int_value=73),  # replace
+        tracker_pb2.FieldValue(field_id=2, int_value=99, phase_id=44),  #replace
+        tracker_pb2.FieldValue(field_id=2, int_value=100, phase_id=45),  # added
+        # added
+        tracker_pb2.FieldValue(field_id=3, str_value='rooster', phase_id=45),
+    ]
+    fvs_remove = original_remove
+    fields_clear = []
+    amendments = tracker_bizobj.ApplyFieldValueChanges(
+        issue, self.config, fvs_add+fvs_add_ignore, fvs_remove, fields_clear)
+
+    self.assertEqual(
+        amendments,
+        [tracker_bizobj.MakeFieldAmendment(1, self.config, [73]),
+         tracker_bizobj.MakeFieldAmendment(
+             2, self.config, [99], phase_name='college'),
+         tracker_bizobj.MakeFieldAmendment(
+             2, self.config, [100], phase_name='high-school'),
+         tracker_bizobj.MakeFieldAmendment(
+             3, self.config, ['rooster'], old_values=['removedbok'],
+             phase_name='high-school')])
+    self.assertEqual(issue.field_values, original_keep + fvs_add)
+
+  def testApplyIssueDelta_NoChange(self):
+    """A delta with no change should change nothing."""
+    issue = tracker_pb2.Issue(
+        status='New', owner_id=111, cc_ids=[222], labels=['a', 'b'],
+        component_ids=[1], blocked_on_iids=[78902], blocking_iids=[78903],
+        merged_into=78904, summary='Sum')
+    delta = tracker_pb2.IssueDelta()
+
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+
+    self.assertEqual('New', issue.status)
+    self.assertEqual(111, issue.owner_id)
+    self.assertEqual([222], issue.cc_ids)
+    self.assertEqual(['a', 'b'], issue.labels)
+    self.assertEqual([1], issue.component_ids)
+    self.assertEqual([78902], issue.blocked_on_iids)
+    self.assertEqual([78903], issue.blocking_iids)
+    self.assertEqual(78904, issue.merged_into)
+    self.assertEqual('Sum', issue.summary)
+
+    self.assertEqual(0, len(amendments))
+    self.assertEqual(0, len(impacted_iids))
+
+  def testApplyIssueDelta_BuiltInFields(self):
+    """A delta can change built-in fields."""
+    ref_issue_70 = fake.MakeTestIssue(
+        789, 70, 'Something that must be done before', 'New', 111)
+    self.services.issue.TestAddIssue(ref_issue_70)
+    ref_issue_71 = fake.MakeTestIssue(
+        789, 71, 'Something that can only be done after', 'New', 111)
+    self.services.issue.TestAddIssue(ref_issue_71)
+    ref_issue_72 = fake.MakeTestIssue(
+        789, 72, 'Something that seems the same', 'New', 111)
+    self.services.issue.TestAddIssue(ref_issue_72)
+    ref_issue_73 = fake.MakeTestIssue(
+        789, 73, 'Something that used to seem the same', 'New', 111)
+    self.services.issue.TestAddIssue(ref_issue_73)
+    issue = tracker_pb2.Issue(
+        status='New', owner_id=111, cc_ids=[222], labels=['a', 'b'],
+        component_ids=[1], blocked_on_iids=[78902], blocking_iids=[78903],
+        merged_into=ref_issue_73.issue_id, summary='Sum')
+    delta = tracker_pb2.IssueDelta(
+      status='Duplicate', owner_id=999, cc_ids_add=[333, 444],
+      comp_ids_add=[2], labels_add=['c', 'd'],
+      blocked_on_add=[ref_issue_70.issue_id],
+      blocking_add=[ref_issue_71.issue_id],
+      merged_into=ref_issue_72.issue_id, summary='New summary')
+
+    actual_amendments, actual_impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+
+    self.assertEqual('Duplicate', issue.status)
+    self.assertEqual(999, issue.owner_id)
+    self.assertEqual([222, 333, 444], issue.cc_ids)
+    self.assertEqual([1, 2], issue.component_ids)
+    self.assertEqual(['a', 'b', 'c', 'd'], issue.labels)
+    self.assertEqual([78902, ref_issue_70.issue_id], issue.blocked_on_iids)
+    self.assertEqual([78903, ref_issue_71.issue_id], issue.blocking_iids)
+    self.assertEqual(ref_issue_72.issue_id, issue.merged_into)
+    self.assertEqual('New summary', issue.summary)
+
+    self.assertEqual(
+      [tracker_bizobj.MakeStatusAmendment('Duplicate', 'New'),
+       tracker_bizobj.MakeOwnerAmendment(999, 111),
+       tracker_bizobj.MakeCcAmendment([333, 444], []),
+       tracker_bizobj.MakeComponentsAmendment([2], [], self.config),
+       tracker_bizobj.MakeLabelsAmendment(['c', 'd'], []),
+       tracker_bizobj.MakeBlockedOnAmendment([(None, 70)], []),
+       tracker_bizobj.MakeBlockingAmendment([(None, 71)], []),
+       tracker_bizobj.MakeMergedIntoAmendment([(None, 72)], [(None, 73)]),
+       tracker_bizobj.MakeSummaryAmendment('New summary', 'Sum'),
+       ],
+      actual_amendments)
+    self.assertEqual(
+      set([ref_issue_70.issue_id, ref_issue_71.issue_id,
+           ref_issue_72.issue_id, ref_issue_73.issue_id]),
+      actual_impacted_iids)
+
+  def testApplyIssueDelta_ReferrencedIssueNotFound(self):
+    """This part of the code copes with missing issues."""
+    issue = tracker_pb2.Issue(
+        status='New', owner_id=111, cc_ids=[222], labels=['a', 'b'],
+        component_ids=[1], blocked_on_iids=[78902], blocking_iids=[78903],
+        merged_into=78904, summary='Sum')
+    delta = tracker_pb2.IssueDelta(
+      blocked_on_add=[78905], blocked_on_remove=[78902],
+      blocking_add=[78906], blocking_remove=[78903],
+      merged_into=78907)
+
+    actual_amendments, actual_impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+
+    self.assertEqual([78905], issue.blocked_on_iids)
+    self.assertEqual([78906], issue.blocking_iids)
+    self.assertEqual(78907, issue.merged_into)
+
+    self.assertEqual(
+      [tracker_bizobj.MakeBlockedOnAmendment([], []),
+       tracker_bizobj.MakeBlockingAmendment([], []),
+       tracker_bizobj.MakeMergedIntoAmendment([], []),
+       ],
+      actual_amendments)
+    self.assertEqual(
+      set([78902, 78903, 78905, 78906]),
+      actual_impacted_iids)
+
+  def testApplyIssueDelta_CustomPhaseFields(self):
+    """A delta can add, remove, or clear custom phase fields."""
+    fd_a = tracker_pb2.FieldDef(
+        field_id=1, project_id=789, field_name='a',
+        field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        is_multivalued=True, is_phase_field=True)
+    fd_b = tracker_pb2.FieldDef(
+        field_id=2, project_id=789, field_name='b',
+        field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        is_phase_field=True)
+    fd_c = tracker_pb2.FieldDef(
+        field_id=3, project_id=789, field_name='c',
+        field_type=tracker_pb2.FieldTypes.INT_TYPE, is_phase_field=True)
+    self.config.field_defs = [fd_a, fd_b, fd_c]
+    fv_a1_p1 = tracker_pb2.FieldValue(
+        field_id=1, int_value=1, phase_id=1)  # fv
+    fv_a2_p1 = tracker_pb2.FieldValue(
+        field_id=1, int_value=2, phase_id=1)  # add
+    fv_a3_p1 = tracker_pb2.FieldValue(
+        field_id=1, int_value=3, phase_id=1)  # add
+    fv_b1_p1 = tracker_pb2.FieldValue(
+        field_id=2, int_value=1, phase_id=1)  # add
+    fv_c2_p1 = tracker_pb2.FieldValue(
+        field_id=3, int_value=2, phase_id=1)  # clear
+
+    fv_a2_p2 = tracker_pb2.FieldValue(
+        field_id=1, int_value=2, phase_id=2)  # add
+    fv_b1_p2 = tracker_pb2.FieldValue(
+        field_id=2, int_value=1, phase_id=2)  # fv remove
+    fv_c1_p2 = tracker_pb2.FieldValue(
+        field_id=3, int_value=1, phase_id=2)  # clear
+
+    issue = tracker_pb2.Issue(
+        status='New', owner_id=111, summary='Sum',
+        field_values=[fv_a1_p1, fv_c2_p1, fv_b1_p2, fv_c1_p2])
+    issue.phases = [
+        tracker_pb2.Phase(phase_id=1, name='Phase-1'),
+        tracker_pb2.Phase(phase_id=2, name='Phase-2')]
+
+    delta = tracker_pb2.IssueDelta(
+        field_vals_add=[fv_a2_p1, fv_a3_p1, fv_b1_p1, fv_a2_p2],
+        field_vals_remove=[fv_b1_p2], fields_clear=[3])
+
+    actual_amendments, actual_impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+    self.assertEqual(
+      [tracker_bizobj.MakeFieldAmendment(
+          1, self.config, ['2', '3'], [], phase_name='Phase-1'),
+       tracker_bizobj.MakeFieldAmendment(
+           1, self.config, ['2'], [], phase_name='Phase-2'),
+       tracker_bizobj.MakeFieldAmendment(
+           2, self.config, ['1'], [], phase_name='Phase-1'),
+       tracker_bizobj.MakeFieldAmendment(
+           2, self.config, [], ['1'], phase_name='Phase-2'),
+       tracker_bizobj.MakeFieldClearedAmendment(3, self.config)],
+      actual_amendments)
+    self.assertEqual(set(), actual_impacted_iids)
+
+  def testApplyIssueDelta_CustomFields(self):
+    """A delta can add, remove, or clear custom fields."""
+    fd_a = tracker_pb2.FieldDef(
+        field_id=1, project_id=789, field_name='a',
+        field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        is_multivalued=True)
+    fd_b = tracker_pb2.FieldDef(
+        field_id=2, project_id=789, field_name='b',
+        field_type=tracker_pb2.FieldTypes.INT_TYPE)
+    fd_c = tracker_pb2.FieldDef(
+        field_id=3, project_id=789, field_name='c',
+        field_type=tracker_pb2.FieldTypes.INT_TYPE)
+    fd_d = tracker_pb2.FieldDef(
+        field_id=4, project_id=789, field_name='d',
+        field_type=tracker_pb2.FieldTypes.ENUM_TYPE)
+    self.config.field_defs = [fd_a, fd_b, fd_c, fd_d]
+    fv_a1 = tracker_pb2.FieldValue(field_id=1, int_value=1)
+    fv_a2 = tracker_pb2.FieldValue(field_id=1, int_value=2)
+    fv_b1 = tracker_pb2.FieldValue(field_id=2, int_value=1)
+    fv_c1 = tracker_pb2.FieldValue(field_id=3, int_value=1)
+    issue = tracker_pb2.Issue(
+        status='New', owner_id=111, labels=['d-val', 'Hot'], summary='Sum',
+        field_values=[fv_a1, fv_b1, fv_c1])
+    delta = tracker_pb2.IssueDelta(
+      field_vals_add=[fv_a2], field_vals_remove=[fv_b1], fields_clear=[3, 4])
+
+    actual_amendments, actual_impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+
+    self.assertEqual([fv_a1, fv_a2], issue.field_values)
+    self.assertEqual(['Hot'], issue.labels)
+
+    self.assertEqual(
+      [tracker_bizobj.MakeFieldAmendment(1, self.config, ['2'], []),
+       tracker_bizobj.MakeFieldAmendment(2, self.config, [], ['1']),
+       tracker_bizobj.MakeFieldClearedAmendment(3, self.config),
+       tracker_bizobj.MakeFieldClearedAmendment(4, self.config),
+       ],
+      actual_amendments)
+    self.assertEqual(set(), actual_impacted_iids)
+
+  def testApplyIssueDelta_ExternalRefs(self):
+    """Only applies valid issue refs from a delta."""
+    issue = tracker_pb2.Issue(
+        status='New', owner_id=111, cc_ids=[222], labels=['a', 'b'],
+        component_ids=[1], blocked_on_iids=[78902], blocking_iids=[78903],
+        merged_into=78904, summary='Sum',
+        dangling_blocked_on_refs=[
+          tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/345'),
+          tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/111')],
+        dangling_blocking_refs=[
+          tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/789'),
+          tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/222')])
+    delta = tracker_pb2.IssueDelta(
+        # Add one valid, one invalid, and another valid.
+        ext_blocked_on_add=['b/123', 'b123', 'b/234'],
+        # Remove one valid, one invalid, and one that does not exist.
+        ext_blocked_on_remove=['b/345', 'b', 'b/456'],
+        # Add one valid, one invalid, and another valid.
+        ext_blocking_add=['b/567', 'b//123', 'b/678'],
+        # Remove one valid, one invalid, and one that does not exist.
+        ext_blocking_remove=['b/789', 'b/123/123', 'b/890'])
+
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+
+    # Test amendments.
+    self.assertEqual(2, len(amendments))
+    self.assertEqual(tracker_pb2.FieldID.BLOCKEDON, amendments[0].field)
+    self.assertEqual('-b/345 b/123 b/234', amendments[0].newvalue)
+    self.assertEqual(tracker_pb2.FieldID.BLOCKING, amendments[1].field)
+    self.assertEqual('-b/789 b/567 b/678', amendments[1].newvalue)
+
+    self.assertEqual(0, len(impacted_iids))
+
+    # Issue refs are applied correctly and alphabetized.
+    self.assertEqual([
+          tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/111'),
+          tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/123'),
+          tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/234'),
+        ], issue.dangling_blocked_on_refs)
+    self.assertEqual([
+          tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/222'),
+          tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/567'),
+          tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/678'),
+        ], issue.dangling_blocking_refs)
+
+  def testApplyIssueDelta_AddAndRemoveExtRef(self):
+    """Only applies valid issue refs from a delta."""
+    issue = tracker_pb2.Issue(
+        status='New',
+        summary='Sum',
+        dangling_blocked_on_refs=[
+            tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/111')
+        ],
+        dangling_blocking_refs=[
+            tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/222')
+        ])
+    delta = tracker_pb2.IssueDelta(
+        ext_blocked_on_add=['b/123'],
+        ext_blocked_on_remove=['b/123'],
+        ext_blocking_add=['b/456'],
+        ext_blocking_remove=['b/456'])
+
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+
+    # Nothing changed.
+    self.assertEqual(0, len(amendments))
+    self.assertEqual(0, len(impacted_iids))
+
+    self.assertEqual(
+        [tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/111')],
+        issue.dangling_blocked_on_refs)
+    self.assertEqual(
+        [tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/222')],
+        issue.dangling_blocking_refs)
+
+  def testApplyIssueDelta_OnlyInvalidExternalRefs(self):
+    """Only applies valid issue refs from a delta."""
+    issue = tracker_pb2.Issue(
+        status='New',
+        summary='Sum',
+        dangling_blocked_on_refs=[
+            tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/111')
+        ],
+        dangling_blocking_refs=[
+            tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/222')
+        ])
+    delta = tracker_pb2.IssueDelta(
+        # Add one invalid and one that already exists.
+        ext_blocked_on_add=['b123', 'b/111'],
+        # Remove one invalid, and one that does not exist.
+        ext_blocked_on_remove=['b', 'b/456'],
+        # Add one invalid and one that already exists.
+        ext_blocking_add=['b//123', 'b/222'],
+        # Remove one invalid, and one that does not exist.
+        ext_blocking_remove=['b/123/123', 'b/890'])
+
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+
+    # Nothing changed.
+    self.assertEqual(0, len(amendments))
+    self.assertEqual(0, len(impacted_iids))
+
+    self.assertEqual(
+        [tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/111')],
+        issue.dangling_blocked_on_refs)
+    self.assertEqual(
+        [tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/222')],
+        issue.dangling_blocking_refs)
+
+  def testApplyIssueDelta_MergedIntoExternal(self):
+    """ApplyIssueDelta applies valid mergedinto refs."""
+    issue = tracker_pb2.Issue(status='New', owner_id=111)
+    delta = tracker_pb2.IssueDelta(merged_into_external='b/5678')
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+
+    # Test amendments.
+    self.assertEqual(1, len(amendments))
+    self.assertEqual(tracker_pb2.FieldID.MERGEDINTO, amendments[0].field)
+    self.assertEqual('b/5678', amendments[0].newvalue)
+
+    self.assertEqual(0, len(impacted_iids))
+
+    # Issue refs are applied correctly and alphabetized.
+    self.assertEqual('b/5678', issue.merged_into_external)
+
+  def testApplyIssueDelta_MergedIntoExternalInvalid(self):
+    """ApplyIssueDelta does not accept invalid mergedinto refs."""
+    issue = tracker_pb2.Issue(status='New', owner_id=111)
+    delta = tracker_pb2.IssueDelta(merged_into_external='a/5678')
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+
+    # No change.
+    self.assertEqual(0, len(amendments))
+    self.assertEqual(0, len(impacted_iids))
+    self.assertEqual(None, issue.merged_into_external)
+
+  def testApplyIssueDelta_MergedIntoFromInternalToExternal(self):
+    """ApplyIssueDelta updates from an internal to an external ref."""
+    self.services.issue.TestAddIssue(fake.MakeTestIssue(1, 2, 'Summary',
+        'New', 111, issue_id=6789))
+    issue = tracker_pb2.Issue(status='New', owner_id=111, merged_into=6789)
+    delta = tracker_pb2.IssueDelta(merged_into_external='b/5678')
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+
+    # Test amendments.
+    self.assertEqual(1, len(amendments))
+    self.assertEqual(tracker_pb2.FieldID.MERGEDINTO, amendments[0].field)
+    self.assertEqual('-2 b/5678', amendments[0].newvalue)
+    self.assertEqual(set([6789]), impacted_iids)
+    self.assertEqual(0, issue.merged_into)
+    self.assertEqual('b/5678', issue.merged_into_external)
+
+  def testApplyIssueDelta_MergedIntoFromExternalToInternal(self):
+    """ApplyIssueDelta updates from an external to an internalref."""
+    self.services.issue.TestAddIssue(fake.MakeTestIssue(1, 2, 'Summary',
+        'New', 111, issue_id=6789))
+    issue = tracker_pb2.Issue(status='New', owner_id=111,
+        merged_into_external='b/5678')
+    delta = tracker_pb2.IssueDelta(merged_into=6789)
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+
+    # Test amendments.
+    self.assertEqual(1, len(amendments))
+    self.assertEqual(tracker_pb2.FieldID.MERGEDINTO, amendments[0].field)
+    self.assertEqual('-b/5678 2', amendments[0].newvalue)
+    self.assertEqual(set([6789]), impacted_iids)
+    self.assertEqual(6789, issue.merged_into)
+    self.assertEqual(None, issue.merged_into_external)
+
+  def testApplyIssueDelta_MergedIntoFromExternalToExternal(self):
+    """ApplyIssueDelta updates from an external to another external ref."""
+    issue = tracker_pb2.Issue(
+        status='New', owner_id=111, merged_into_external='b/1')
+    delta = tracker_pb2.IssueDelta(merged_into_external='b/5678')
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+
+    # Test amendments.
+    self.assertEqual(1, len(amendments))
+    self.assertEqual(tracker_pb2.FieldID.MERGEDINTO, amendments[0].field)
+    self.assertEqual('-b/1 b/5678', amendments[0].newvalue)
+    self.assertEqual(set(), impacted_iids)
+    self.assertEqual(0, issue.merged_into)
+    self.assertEqual('b/5678', issue.merged_into_external)
+
+  def testApplyIssueDelta_NoMergedIntoInternalAndExternal(self):
+    """ApplyIssueDelta does not allow updating the internal and external
+    merged_into fields at the same time.
+    """
+    issue = tracker_pb2.Issue(status='New', owner_id=111, merged_into=321)
+    delta = tracker_pb2.IssueDelta(merged_into=543,
+        merged_into_external='b/5678')
+    with self.assertRaises(ValueError):
+      tracker_bizobj.ApplyIssueDelta(self.cnxn, self.services.issue, issue,
+          delta, self.config)
+
+  def testApplyIssueDelta_RemoveExistingMergedInto(self):
+    self.services.issue.TestAddIssue(
+        fake.MakeTestIssue(1, 2, 'Summary', 'New', 111, issue_id=6789))
+    issue = tracker_pb2.Issue(status='New', owner_id=111, merged_into=6789)
+    delta = tracker_pb2.IssueDelta(merged_into=0)
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+    self.assertEqual(impacted_iids, {6789})
+    self.assertEqual(1, len(amendments))
+    self.assertEqual(
+        amendments[0],
+        tracker_bizobj.MakeMergedIntoAmendment(
+            [], [(issue.project_name, 2)],
+            default_project_name=issue.project_name))
+    self.assertEqual(issue.merged_into, 0)
+
+  def testApplyIssueDelta_RemoveExternalMergedInto(self):
+    issue = tracker_pb2.Issue(
+        status='New', owner_id=111, merged_into_external='b/123')
+    delta = tracker_pb2.IssueDelta(merged_into_external='')
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+    self.assertEqual(impacted_iids, set())
+    self.assertEqual(1, len(amendments))
+    self.assertEqual(
+        amendments[0],
+        tracker_bizobj.MakeMergedIntoAmendment(
+            [], [tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/123')]))
+    self.assertEqual(issue.merged_into_external, '')
+
+  def testApplyIssueDelta_RemoveMergedIntoNoop(self):
+    issue = tracker_pb2.Issue(
+        status='New', owner_id=111, merged_into_external='b/123')
+    delta = tracker_pb2.IssueDelta(merged_into=0)
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+    self.assertEqual(impacted_iids, set())
+    self.assertEqual(0, len(amendments))
+    # A noop request to remove merged_into, should not affect the existing
+    # external value.
+    self.assertIsNone(issue.merged_into)
+    self.assertEqual(issue.merged_into_external, 'b/123')
+
+  def testApplyIssueDelta_RemoveExternalMergedIntoNoop(self):
+    self.services.issue.TestAddIssue(
+        fake.MakeTestIssue(1, 2, 'Summary', 'New', 111, issue_id=6789))
+    issue = tracker_pb2.Issue(status='New', owner_id=111, merged_into=6789)
+    delta = tracker_pb2.IssueDelta(merged_into_external='')
+    amendments, impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        self.cnxn, self.services.issue, issue, delta, self.config)
+    self.assertEqual(impacted_iids, set())
+    self.assertEqual(len(amendments), 0)
+    # A noop request to remove merged_into_external, should not affect the
+    # existing internal merged_into value.
+    self.assertIsNone(issue.merged_into_external)
+    self.assertEqual(issue.merged_into, 6789)
+
+  def testApplyIssueBlockRelationChanges(self):
+    """We can apply blocking and blocked_on relation changes to an issue."""
+
+    blocked_on = fake.MakeTestIssue(
+        789, 2, 'Something that must be done before', 'New', 111,
+        project_name='proj')
+    self.services.issue.TestAddIssue(blocked_on)
+    blocking = fake.MakeTestIssue(
+        789, 3, 'Something that must be done after', 'New', 111,
+        project_name='proj')
+    self.services.issue.TestAddIssue(blocking)
+
+    issue = tracker_pb2.Issue(
+        project_name='chicken',
+        blocked_on_iids=[blocked_on.issue_id, 78904],
+        blocking_iids=[blocking.issue_id, 78905])
+    blocked_on_add = fake.MakeTestIssue(
+        789, 6, 'Something that must be done before', 'New', 111,
+        project_name='chicken')
+    self.services.issue.TestAddIssue(blocked_on_add)
+    blocking_add = fake.MakeTestIssue(
+        789, 7, 'Something that must be done after', 'New', 111,
+        project_name='chicken')
+    self.services.issue.TestAddIssue(blocking_add)
+
+    (actual_amendments, actual_impacted_iids
+    ) = tracker_bizobj.ApplyIssueBlockRelationChanges(
+        self.cnxn,
+        issue,
+        # 78904 ref already exists can't be added, shuold ignore.
+        # 78404 ref does not exist, can't be removed, should ignore.
+        # blocked_on is ignored in the add list, but honored in the remove.
+        [blocked_on_add.issue_id, 78904, blocked_on.issue_id],
+        [78404, blocked_on.issue_id],
+        # 78905 ref already exists, can't be added, should ignore.
+        # 79404 ref does not exist in issue, can't be removed, should ignore.
+        # blocking_add is ignored in the remove list, but honored in the add.
+        [blocking_add.issue_id, 78905],
+        [79404, blocking.issue_id, blocking_add.issue_id],
+        self.services.issue)
+
+    expected_amendments = [
+        tracker_bizobj.MakeBlockedOnAmendment(
+            [('chicken', blocked_on_add.local_id)],
+            [('proj', blocked_on.local_id)],
+            default_project_name=issue.project_name),
+        tracker_bizobj.MakeBlockingAmendment(
+            [('chicken', blocking_add.local_id)], [('proj', blocking.local_id)],
+            default_project_name=issue.project_name)
+    ]
+    self.assertEqual(actual_amendments, expected_amendments)
+    self.assertItemsEqual(
+        actual_impacted_iids, [
+            blocked_on_add.issue_id, blocking_add.issue_id, blocked_on.issue_id,
+            blocking.issue_id
+        ])
+    self.assertEqual(issue.blocked_on_iids, [78904, blocked_on_add.issue_id])
+    self.assertEqual(issue.blocking_iids, [78905, blocking_add.issue_id])
+
+  def testApplyIssueBlockRelationChanges_Empty(self):
+    """We can handle empty blocking and blocked_on relation changes."""
+    issue = tracker_pb2.Issue(blocked_on_iids=[78901], blocking_iids=[78902])
+    (actual_amendments,
+     actual_impacted_iids) = tracker_bizobj.ApplyIssueBlockRelationChanges(
+         self.cnxn, issue, [], [], [], [], self.services.issue)
+
+    self.assertEqual(actual_amendments, [])
+    self.assertEqual(actual_impacted_iids, set())
+    self.assertEqual(issue.blocked_on_iids, [78901])
+    self.assertEqual(issue.blocking_iids, [78902])
+
+  def testMakeAmendment(self):
+    amendment = tracker_bizobj.MakeAmendment(
+        tracker_pb2.FieldID.STATUS, 'new', [111], [222])
+    self.assertEqual(tracker_pb2.FieldID.STATUS, amendment.field)
+    self.assertEqual('new', amendment.newvalue)
+    self.assertEqual([111], amendment.added_user_ids)
+    self.assertEqual([222], amendment.removed_user_ids)
+
+  def testPlusMinusString(self):
+    self.assertEqual('', tracker_bizobj._PlusMinusString([], []))
+    self.assertEqual('-a -b c d',
+                     tracker_bizobj._PlusMinusString(['c', 'd'], ['a', 'b']))
+
+  def testPlusMinusAmendment(self):
+    amendment = tracker_bizobj._PlusMinusAmendment(
+        tracker_pb2.FieldID.STATUS, ['add1', 'add2'], ['remove1'])
+    self.assertEqual(tracker_pb2.FieldID.STATUS, amendment.field)
+    self.assertEqual('-remove1 add1 add2', amendment.newvalue)
+
+  def testPlusMinusRefsAmendment(self):
+    ref1 = (None, 1)
+    ref2 = ('other-proj', 2)
+    amendment = tracker_bizobj._PlusMinusRefsAmendment(
+        tracker_pb2.FieldID.STATUS, [ref1], [ref2])
+    self.assertEqual(tracker_pb2.FieldID.STATUS, amendment.field)
+    self.assertEqual('-other-proj:2 1', amendment.newvalue)
+
+  def testMakeSummaryAmendment(self):
+    amendment = tracker_bizobj.MakeSummaryAmendment('', None)
+    self.assertEqual(tracker_pb2.FieldID.SUMMARY, amendment.field)
+    self.assertEqual('', amendment.newvalue)
+    self.assertEqual(None, amendment.oldvalue)
+
+    amendment = tracker_bizobj.MakeSummaryAmendment('new summary', '')
+    self.assertEqual(tracker_pb2.FieldID.SUMMARY, amendment.field)
+    self.assertEqual('new summary', amendment.newvalue)
+    self.assertEqual('', amendment.oldvalue)
+
+  def testMakeStatusAmendment(self):
+    amendment = tracker_bizobj.MakeStatusAmendment('', None)
+    self.assertEqual(tracker_pb2.FieldID.STATUS, amendment.field)
+    self.assertEqual('', amendment.newvalue)
+    self.assertEqual(None, amendment.oldvalue)
+
+    amendment = tracker_bizobj.MakeStatusAmendment('New', '')
+    self.assertEqual(tracker_pb2.FieldID.STATUS, amendment.field)
+    self.assertEqual('New', amendment.newvalue)
+    self.assertEqual('', amendment.oldvalue)
+
+  def testMakeOwnerAmendment(self):
+    amendment = tracker_bizobj.MakeOwnerAmendment(111, 0)
+    self.assertEqual(tracker_pb2.FieldID.OWNER, amendment.field)
+    self.assertEqual('', amendment.newvalue)
+    self.assertEqual([111], amendment.added_user_ids)
+    self.assertEqual([0], amendment.removed_user_ids)
+
+  def testMakeCcAmendment(self):
+    amendment = tracker_bizobj.MakeCcAmendment([111], [222])
+    self.assertEqual(tracker_pb2.FieldID.CC, amendment.field)
+    self.assertEqual('', amendment.newvalue)
+    self.assertEqual([111], amendment.added_user_ids)
+    self.assertEqual([222], amendment.removed_user_ids)
+
+  def testMakeLabelsAmendment(self):
+    amendment = tracker_bizobj.MakeLabelsAmendment(['added1'], ['removed1'])
+    self.assertEqual(tracker_pb2.FieldID.LABELS, amendment.field)
+    self.assertEqual('-removed1 added1', amendment.newvalue)
+
+  def testDiffValueLists(self):
+    added, removed = tracker_bizobj.DiffValueLists([], [])
+    self.assertItemsEqual([], added)
+    self.assertItemsEqual([], removed)
+
+    added, removed = tracker_bizobj.DiffValueLists([], None)
+    self.assertItemsEqual([], added)
+    self.assertItemsEqual([], removed)
+
+    added, removed = tracker_bizobj.DiffValueLists([1, 2], [])
+    self.assertItemsEqual([1, 2], added)
+    self.assertItemsEqual([], removed)
+
+    added, removed = tracker_bizobj.DiffValueLists([], [8, 9])
+    self.assertItemsEqual([], added)
+    self.assertItemsEqual([8, 9], removed)
+
+    added, removed = tracker_bizobj.DiffValueLists([1, 2], [8, 9])
+    self.assertItemsEqual([1, 2], added)
+    self.assertItemsEqual([8, 9], removed)
+
+    added, removed = tracker_bizobj.DiffValueLists([1, 2, 5, 6], [5, 6, 8, 9])
+    self.assertItemsEqual([1, 2], added)
+    self.assertItemsEqual([8, 9], removed)
+
+    added, removed = tracker_bizobj.DiffValueLists([5, 6], [5, 6, 8, 9])
+    self.assertItemsEqual([], added)
+    self.assertItemsEqual([8, 9], removed)
+
+    added, removed = tracker_bizobj.DiffValueLists([1, 2, 5, 6], [5, 6])
+    self.assertItemsEqual([1, 2], added)
+    self.assertItemsEqual([], removed)
+
+    added, removed = tracker_bizobj.DiffValueLists(
+        [1, 2, 2, 5, 6], [5, 6, 8, 9])
+    self.assertItemsEqual([1, 2, 2], added)
+    self.assertItemsEqual([8, 9], removed)
+
+    added, removed = tracker_bizobj.DiffValueLists(
+        [1, 2, 5, 6], [5, 6, 8, 8, 9])
+    self.assertItemsEqual([1, 2], added)
+    self.assertItemsEqual([8, 8, 9], removed)
+
+  def testMakeFieldAmendment_NoSuchFieldDef(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    with self.assertRaises(ValueError):
+      tracker_bizobj.MakeFieldAmendment(1, config, ['Large'], ['Small'])
+
+  def testMakeFieldAmendment_MultiValued(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='Days', is_multivalued=True)
+    config.field_defs.append(fd)
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.CUSTOM, '-Mon Tue Wed', [], [], 'Days'),
+        tracker_bizobj.MakeFieldAmendment(1, config, ['Tue', 'Wed'], ['Mon']))
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.CUSTOM, '-Mon', [], [], 'Days'),
+        tracker_bizobj.MakeFieldAmendment(1, config, [], ['Mon']))
+
+  def testMakeFieldAmendment_MultiValuedUser(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='Friends', is_multivalued=True,
+        field_type=tracker_pb2.FieldTypes.USER_TYPE)
+    config.field_defs.append(fd)
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.CUSTOM, '', [111], [222], 'Friends'),
+        tracker_bizobj.MakeFieldAmendment(1, config, [111], [222]))
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.CUSTOM, '', [], [222], 'Friends'),
+        tracker_bizobj.MakeFieldAmendment(1, config, [], [222]))
+
+  def testMakeFieldAmendment_SingleValued(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    fd = tracker_pb2.FieldDef(field_id=1, field_name='Size')
+    config.field_defs.append(fd)
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.CUSTOM, 'Large', [], [], 'Size'),
+        tracker_bizobj.MakeFieldAmendment(1, config, ['Large'], ['Small']))
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.CUSTOM, '----', [], [], 'Size'),
+        tracker_bizobj.MakeFieldAmendment(1, config, [], ['Small']))
+
+  def testMakeFieldAmendment_SingleValuedUser(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='Friend',
+        field_type=tracker_pb2.FieldTypes.USER_TYPE)
+    config.field_defs.append(fd)
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.CUSTOM, '', [111], [], 'Friend'),
+        tracker_bizobj.MakeFieldAmendment(1, config, [111], [222]))
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.CUSTOM, '', [], [], 'Friend'),
+        tracker_bizobj.MakeFieldAmendment(1, config, [], [222]))
+
+  def testMakeFieldAmendment_PhaseField(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='Friend',
+        field_type=tracker_pb2.FieldTypes.USER_TYPE, is_phase_field=True)
+    config.field_defs.append(fd)
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.CUSTOM, '', [111], [], 'PhaseName-Friend'),
+        tracker_bizobj.MakeFieldAmendment(
+            1, config, [111], [222], phase_name='PhaseName'))
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.CUSTOM, '', [], [], 'PhaseName-3-Friend'),
+        tracker_bizobj.MakeFieldAmendment(
+            1, config, [], [222], phase_name='PhaseName-3'))
+
+  def testMakeFieldClearedAmendment_FieldNotFound(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    with self.assertRaises(ValueError):
+      tracker_bizobj.MakeFieldClearedAmendment(1, config)
+
+  def testMakeFieldClearedAmendment_Normal(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    fd = tracker_pb2.FieldDef(field_id=1, field_name='Rabbit')
+    config.field_defs.append(fd)
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.CUSTOM, '----', [], [], 'Rabbit'),
+        tracker_bizobj.MakeFieldClearedAmendment(1, config))
+
+  def testMakeApprovalStructureAmendment(self):
+    actual_amendment = tracker_bizobj.MakeApprovalStructureAmendment(
+        ['Chicken1', 'Chicken', 'Llama'], ['Cow', 'Chicken2', 'Llama'])
+    amendment = tracker_bizobj.MakeAmendment(
+        tracker_pb2.FieldID.CUSTOM, '-Cow -Chicken2 Chicken1 Chicken',
+        [], [], 'Approvals')
+    self.assertEqual(amendment, actual_amendment)
+
+  def testMakeApprovalStatusAmendment(self):
+    actual_amendment = tracker_bizobj.MakeApprovalStatusAmendment(
+        tracker_pb2.ApprovalStatus.APPROVED)
+    amendment = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.CUSTOM, newvalue='approved',
+        custom_field_name='Status')
+    self.assertEqual(amendment, actual_amendment)
+
+  def testMakeApprovalApproversAmendment(self):
+    actual_amendment = tracker_bizobj.MakeApprovalApproversAmendment(
+        [222], [333])
+    amendment = tracker_pb2.Amendment(
+        field=tracker_pb2.FieldID.CUSTOM, newvalue='', added_user_ids=[222],
+        removed_user_ids=[333], custom_field_name='Approvers')
+    self.assertEqual(actual_amendment, amendment)
+
+  def testMakeComponentsAmendment_NoChange(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.component_defs = [
+        tracker_pb2.ComponentDef(component_id=1, path='UI'),
+        tracker_pb2.ComponentDef(component_id=2, path='DB')]
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.COMPONENTS, '', [], []),
+        tracker_bizobj.MakeComponentsAmendment([], [], config))
+
+  def testMakeComponentsAmendment_NotFound(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.component_defs = [
+        tracker_pb2.ComponentDef(component_id=1, path='UI'),
+        tracker_pb2.ComponentDef(component_id=2, path='DB')]
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.COMPONENTS, '', [], []),
+        tracker_bizobj.MakeComponentsAmendment([99], [999], config))
+
+  def testMakeComponentsAmendment_Normal(self):
+    config = tracker_bizobj.MakeDefaultProjectIssueConfig(789)
+    config.component_defs = [
+        tracker_pb2.ComponentDef(component_id=1, path='UI'),
+        tracker_pb2.ComponentDef(component_id=2, path='DB')]
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.COMPONENTS, '-UI DB', [], []),
+        tracker_bizobj.MakeComponentsAmendment([2], [1], config))
+
+  def testMakeBlockedOnAmendment(self):
+    ref1 = (None, 1)
+    ref2 = ('other-proj', 2)
+    amendment = tracker_bizobj.MakeBlockedOnAmendment([ref1], [ref2])
+    self.assertEqual(tracker_pb2.FieldID.BLOCKEDON, amendment.field)
+    self.assertEqual('-other-proj:2 1', amendment.newvalue)
+
+    amendment = tracker_bizobj.MakeBlockedOnAmendment([ref2], [ref1])
+    self.assertEqual(tracker_pb2.FieldID.BLOCKEDON, amendment.field)
+    self.assertEqual('-1 other-proj:2', amendment.newvalue)
+
+  def testMakeBlockingAmendment(self):
+    ref1 = (None, 1)
+    ref2 = ('other-proj', 2)
+    amendment = tracker_bizobj.MakeBlockingAmendment([ref1], [ref2])
+    self.assertEqual(tracker_pb2.FieldID.BLOCKING, amendment.field)
+    self.assertEqual('-other-proj:2 1', amendment.newvalue)
+
+  def testMakeMergedIntoAmendment(self):
+    ref1 = (None, 1)
+    ref2 = ('other-proj', 2)
+    ref3 = ('chicken-proj', 3)
+    amendment = tracker_bizobj.MakeMergedIntoAmendment(
+        [ref1, None], [ref2, ref3])
+    self.assertEqual(tracker_pb2.FieldID.MERGEDINTO, amendment.field)
+    self.assertEqual('-other-proj:2 -chicken-proj:3 1', amendment.newvalue)
+
+  def testMakeProjectAmendment(self):
+    self.assertEqual(
+        tracker_bizobj.MakeAmendment(
+            tracker_pb2.FieldID.PROJECT, 'moonshot', [], []),
+        tracker_bizobj.MakeProjectAmendment('moonshot'))
+
+  def testAmendmentString(self):
+    users_by_id = {
+        111: framework_views.StuffUserView(111, 'username@gmail.com', True),
+        framework_constants.DELETED_USER_ID: framework_views.StuffUserView(
+            framework_constants.DELETED_USER_ID, '', True),
+    }
+    summary_amendment = tracker_bizobj.MakeSummaryAmendment('new summary', None)
+    self.assertEqual(
+        'new summary',
+        tracker_bizobj.AmendmentString(summary_amendment, users_by_id))
+
+    status_amendment = tracker_bizobj.MakeStatusAmendment('', None)
+    self.assertEqual(
+        '', tracker_bizobj.AmendmentString(status_amendment, users_by_id))
+    status_amendment = tracker_bizobj.MakeStatusAmendment('Assigned', 'New')
+    self.assertEqual(
+        'Assigned',
+        tracker_bizobj.AmendmentString(status_amendment, users_by_id))
+
+    owner_amendment = tracker_bizobj.MakeOwnerAmendment(0, 0)
+    self.assertEqual(
+        '----', tracker_bizobj.AmendmentString(owner_amendment, users_by_id))
+    owner_amendment = tracker_bizobj.MakeOwnerAmendment(111, 0)
+    self.assertEqual(
+        'usern...@gmail.com',
+        tracker_bizobj.AmendmentString(owner_amendment, users_by_id))
+
+    owner_amendment_deleted = tracker_bizobj.MakeOwnerAmendment(1, 0)
+    self.assertEqual(
+        framework_constants.DELETED_USER_NAME,
+        tracker_bizobj.AmendmentString(owner_amendment_deleted, users_by_id))
+
+  def testAmendmentString_New(self):
+    """AmendmentString_New behaves equivalently to the old version."""
+    # TODO(crbug.com/monorail/7571): Delete this test.
+    users_by_id = {
+        111:
+            framework_views.StuffUserView(111, 'username@gmail.com', True),
+        framework_constants.DELETED_USER_ID:
+            framework_views.StuffUserView(
+                framework_constants.DELETED_USER_ID, '', True),
+    }
+    user_display_names = {
+        111:
+            'usern...@gmail.com',
+        framework_constants.DELETED_USER_ID:
+            framework_constants.DELETED_USER_NAME
+    }
+
+    summary_amendment = tracker_bizobj.MakeSummaryAmendment('new summary', None)
+    new_str_summary = tracker_bizobj.AmendmentString_New(
+        summary_amendment, user_display_names)
+    self.assertEqual(
+        tracker_bizobj.AmendmentString(summary_amendment, users_by_id),
+        new_str_summary)
+
+    status_amendment = tracker_bizobj.MakeStatusAmendment('', None)
+    new_str_status = tracker_bizobj.AmendmentString_New(
+        status_amendment, user_display_names)
+    self.assertEqual(
+        tracker_bizobj.AmendmentString(status_amendment, users_by_id),
+        new_str_status)
+
+    status_amendment_2 = tracker_bizobj.MakeStatusAmendment('Assigned', 'New')
+    new_str_status_2 = tracker_bizobj.AmendmentString_New(
+        status_amendment_2, user_display_names)
+    self.assertEqual(
+        tracker_bizobj.AmendmentString(status_amendment_2, users_by_id),
+        new_str_status_2)
+
+    owner_amendment = tracker_bizobj.MakeOwnerAmendment(0, 0)
+    new_str_owner = tracker_bizobj.AmendmentString_New(
+        owner_amendment, user_display_names)
+    self.assertEqual(
+        tracker_bizobj.AmendmentString(owner_amendment, users_by_id),
+        new_str_owner)
+
+    owner_amendment_2 = tracker_bizobj.MakeOwnerAmendment(111, 0)
+    new_str_owner_2 = tracker_bizobj.AmendmentString_New(
+        owner_amendment_2, user_display_names)
+    self.assertEqual(
+        tracker_bizobj.AmendmentString(owner_amendment_2, users_by_id),
+        new_str_owner_2)
+
+    owner_amendment_deleted = tracker_bizobj.MakeOwnerAmendment(1, 0)
+    new_str_owner_deleted = tracker_bizobj.AmendmentString_New(
+        owner_amendment_deleted, user_display_names)
+    self.assertEqual(
+        tracker_bizobj.AmendmentString(owner_amendment_deleted, users_by_id),
+        new_str_owner_deleted)
+
+
+  def testAmendmentLinks(self):
+    users_by_id = {
+        111: framework_views.StuffUserView(111, 'foo@gmail.com', False),
+        222: framework_views.StuffUserView(222, 'bar@gmail.com', False),
+        333: framework_views.StuffUserView(333, 'baz@gmail.com', False),
+        framework_constants.DELETED_USER_ID: framework_views.StuffUserView(
+            framework_constants.DELETED_USER_ID, '', True),
+        }
+    # SUMMARY
+    summary_amendment = tracker_bizobj.MakeSummaryAmendment('new summary', None)
+    self.assertEqual(
+        [{'value': 'new summary', 'url': None}],
+        tracker_bizobj.AmendmentLinks(summary_amendment, users_by_id, 'proj'))
+
+    summary_amendment = tracker_bizobj.MakeSummaryAmendment(
+        'new summary', 'NULL')
+    self.assertEqual(
+        [{'value': 'new summary', 'url': None}],
+        tracker_bizobj.AmendmentLinks(summary_amendment, users_by_id, 'proj'))
+
+    summary_amendment = tracker_bizobj.MakeSummaryAmendment(
+        'new summary', 'old info')
+    self.assertEqual(
+        [{'value': 'new summary (was: old info)', 'url': None}],
+        tracker_bizobj.AmendmentLinks(summary_amendment, users_by_id, 'proj'))
+
+    # STATUS
+    status_amendment = tracker_bizobj.MakeStatusAmendment('New', None)
+    self.assertEqual(
+        [{'value': 'New', 'url': None}],
+        tracker_bizobj.AmendmentLinks(status_amendment, users_by_id, 'proj'))
+
+    status_amendment = tracker_bizobj.MakeStatusAmendment('New', 'NULL')
+    self.assertEqual(
+        [{'value': 'New', 'url': None}],
+        tracker_bizobj.AmendmentLinks(status_amendment, users_by_id, 'proj'))
+
+    status_amendment = tracker_bizobj.MakeStatusAmendment(
+        'Assigned', 'New')
+    self.assertEqual(
+        [{'value': 'Assigned (was: New)', 'url': None}],
+        tracker_bizobj.AmendmentLinks(status_amendment, users_by_id, 'proj'))
+
+    # OWNER
+    owner_amendment = tracker_bizobj.MakeOwnerAmendment(0, 0)
+    self.assertEqual(
+        [{'value': '----', 'url': None}],
+        tracker_bizobj.AmendmentLinks(owner_amendment, users_by_id, 'proj'))
+    owner_amendment = tracker_bizobj.MakeOwnerAmendment(111, 0)
+    self.assertEqual(
+        [{'value': 'foo@gmail.com', 'url': None}],
+        tracker_bizobj.AmendmentLinks(owner_amendment, users_by_id, 'proj'))
+
+    # BLOCKEDON, BLOCKING, MERGEDINTO
+    blocking_amendment = tracker_bizobj.MakeBlockingAmendment(
+        [(None, 123), ('blah', 234)], [(None, 345), ('blah', 456)])
+    self.assertEqual([
+        {'value': '-345', 'url': '/p/proj/issues/detail?id=345'},
+        {'value': '-blah:456', 'url': '/p/blah/issues/detail?id=456'},
+        {'value': '123', 'url': '/p/proj/issues/detail?id=123'},
+        {'value': 'blah:234', 'url': '/p/blah/issues/detail?id=234'}],
+        tracker_bizobj.AmendmentLinks(blocking_amendment, users_by_id, 'proj'))
+
+    # newvalue catchall
+    label_amendment = tracker_bizobj.MakeLabelsAmendment(
+        ['My-Label', 'Your-Label'], ['Their-Label'])
+    self.assertEqual([
+        {'value': '-Their-Label', 'url': None},
+        {'value': 'My-Label', 'url': None},
+        {'value': 'Your-Label', 'url': None}],
+        tracker_bizobj.AmendmentLinks(label_amendment, users_by_id, 'proj'))
+
+    # CC, or CUSTOM with user type
+    cc_amendment = tracker_bizobj.MakeCcAmendment([222, 333], [111])
+    self.assertEqual([
+        {'value': '-foo@gmail.com', 'url': None},
+        {'value': 'bar@gmail.com', 'url': None},
+        {'value': 'baz@gmail.com', 'url': None}],
+        tracker_bizobj.AmendmentLinks(cc_amendment, users_by_id, 'proj'))
+    user_amendment = tracker_bizobj.MakeAmendment(
+        tracker_pb2.FieldID.CUSTOM, None, [222, 333], [111], 'ultracc')
+    self.assertEqual([
+        {'value': '-foo@gmail.com', 'url': None},
+        {'value': 'bar@gmail.com', 'url': None},
+        {'value': 'baz@gmail.com', 'url': None}],
+        tracker_bizobj.AmendmentLinks(user_amendment, users_by_id, 'proj'))
+
+    # deleted users
+    cc_amendment_deleted = tracker_bizobj.MakeCcAmendment(
+        [framework_constants.DELETED_USER_ID], [])
+    self.assertEqual(
+        [{'value': framework_constants.DELETED_USER_NAME, 'url': None}],
+        tracker_bizobj.AmendmentLinks(
+            cc_amendment_deleted, users_by_id, 'proj'))
+
+  def testGetAmendmentFieldName_Custom(self):
+    amendment = tracker_bizobj.MakeAmendment(
+        tracker_pb2.FieldID.CUSTOM, None, [222, 333], [111], 'Rabbit')
+    self.assertEqual('Rabbit', tracker_bizobj.GetAmendmentFieldName(amendment))
+
+  def testGetAmendmentFieldName_Builtin(self):
+    amendment = tracker_bizobj.MakeAmendment(
+        tracker_pb2.FieldID.SUMMARY, 'It broke', [], [])
+    self.assertEqual('Summary', tracker_bizobj.GetAmendmentFieldName(amendment))
+
+  def testMakeDanglingIssueRef(self):
+    di_ref = tracker_bizobj.MakeDanglingIssueRef('proj', 123)
+    self.assertEqual('proj', di_ref.project)
+    self.assertEqual(123, di_ref.issue_id)
+
+  def testFormatIssueURL_NoRef(self):
+    self.assertEqual('', tracker_bizobj.FormatIssueURL(None))
+
+  def testFormatIssueRef(self):
+    self.assertEqual('', tracker_bizobj.FormatIssueRef(None))
+
+    self.assertEqual(
+        'p:1', tracker_bizobj.FormatIssueRef(('p', 1)))
+
+    self.assertEqual(
+        '1', tracker_bizobj.FormatIssueRef((None, 1)))
+
+  def testFormatIssueRef_External(self):
+    """Outputs shortlink as-is."""
+    ref = tracker_pb2.DanglingIssueRef(ext_issue_identifier='b/1234')
+    self.assertEqual('b/1234', tracker_bizobj.FormatIssueRef(ref))
+
+  def testFormatIssueRef_ExternalInvalid(self):
+    """Does not validate external IDs."""
+    ref = tracker_pb2.DanglingIssueRef(ext_issue_identifier='invalid')
+    self.assertEqual('invalid', tracker_bizobj.FormatIssueRef(ref))
+
+  def testFormatIssueRef_Empty(self):
+    """Passes on empty values."""
+    ref = tracker_pb2.DanglingIssueRef(ext_issue_identifier='')
+    self.assertEqual('', tracker_bizobj.FormatIssueRef(ref))
+
+  def testParseIssueRef(self):
+    self.assertEqual(None, tracker_bizobj.ParseIssueRef(''))
+    self.assertEqual(None, tracker_bizobj.ParseIssueRef('  \t '))
+
+    ref_pn, ref_id = tracker_bizobj.ParseIssueRef('1')
+    self.assertEqual(None, ref_pn)
+    self.assertEqual(1, ref_id)
+
+    ref_pn, ref_id = tracker_bizobj.ParseIssueRef('-1')
+    self.assertEqual(None, ref_pn)
+    self.assertEqual(1, ref_id)
+
+    ref_pn, ref_id = tracker_bizobj.ParseIssueRef('p:2')
+    self.assertEqual('p', ref_pn)
+    self.assertEqual(2, ref_id)
+
+    ref_pn, ref_id = tracker_bizobj.ParseIssueRef('-p:2')
+    self.assertEqual('p', ref_pn)
+    self.assertEqual(2, ref_id)
+
+  def testSafeParseIssueRef(self):
+    self.assertEqual(None, tracker_bizobj._SafeParseIssueRef('-'))
+    self.assertEqual(None, tracker_bizobj._SafeParseIssueRef('test:'))
+    ref_pn, ref_id = tracker_bizobj.ParseIssueRef('p:2')
+    self.assertEqual('p', ref_pn)
+    self.assertEqual(2, ref_id)
+
+  def testMergeFields_NoChange(self):
+    fv1 = tracker_bizobj.MakeFieldValue(1, 42, None, None, None, None, False)
+    merged_fvs, fvs_added_dict, fvs_removed_dict = tracker_bizobj._MergeFields(
+        [fv1], [], [], [])
+    self.assertEqual([fv1], merged_fvs)
+    self.assertEqual({}, fvs_added_dict)
+    self.assertEqual({}, fvs_removed_dict)
+
+  def testMergeFields_SingleValued(self):
+    fd = tracker_pb2.FieldDef(field_id=1, field_name='foo')
+    fv1 = tracker_bizobj.MakeFieldValue(1, 42, None, None, None, None, False)
+    fv2 = tracker_bizobj.MakeFieldValue(1, 43, None, None, None, None, False)
+    fv3 = tracker_bizobj.MakeFieldValue(1, 44, None, None, None, None, False)
+
+    # Adding one replaces all values since the field is single-valued.
+    merged_fvs, fvs_added_dict, fvs_removed_dict = tracker_bizobj._MergeFields(
+        [fv1, fv2], [fv3], [], [fd])
+    self.assertEqual([fv3], merged_fvs)
+    self.assertEqual({fv3.field_id: [fv3]}, fvs_added_dict)
+    self.assertEqual({}, fvs_removed_dict)
+
+    # Removing one just removes it, does not reset.
+    merged_fvs, fvs_added_dict, fvs_removed_dict = tracker_bizobj._MergeFields(
+        [fv1, fv2], [], [fv2], [fd])
+    self.assertEqual([fv1], merged_fvs)
+    self.assertEqual({}, fvs_added_dict)
+    self.assertEqual({fv2.field_id: [fv2]}, fvs_removed_dict)
+
+  def testMergeFields_SingleValuedPhase(self):
+    fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='phase-foo', is_phase_field=True)
+    fv1 = tracker_bizobj.MakeFieldValue(
+        1, 45, None, None, None, None, False, phase_id=1)
+    fv2 = tracker_bizobj.MakeFieldValue(
+        1, 46, None, None, None, None, False, phase_id=2)
+    fv3 = tracker_bizobj.MakeFieldValue(
+        1, 47, None, None, None, None, False, phase_id=1) # should replace fv4
+
+    # Adding one replaces all values since the field is single-valued.
+    merged_fvs, fvs_added_dict, fvs_removed_dict = tracker_bizobj._MergeFields(
+        [fv1, fv2], [fv3], [], [fd])
+    self.assertEqual([fv2, fv3], merged_fvs)
+    self.assertEqual({fv3.field_id: [fv3]}, fvs_added_dict)
+    self.assertEqual({}, fvs_removed_dict)
+
+    # Removing one just removes it, does not reset.
+    merged_fvs, fvs_added_dict, fvs_removed_dict = tracker_bizobj._MergeFields(
+        [fv1, fv2], [], [fv2], [fd])
+    self.assertEqual([fv1], merged_fvs)
+    self.assertEqual({}, fvs_added_dict)
+    self.assertEqual({fv2.field_id: [fv2]}, fvs_removed_dict)
+
+  def testMergeFields_MultiValued(self):
+    fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='foo', is_multivalued=True)
+    fv1 = tracker_bizobj.MakeFieldValue(1, 42, None, None, None, None, False)
+    fv2 = tracker_bizobj.MakeFieldValue(1, 43, None, None, None, None, False)
+    fv3 = tracker_bizobj.MakeFieldValue(1, 44, None, None, None, None, False)
+    fv4 = tracker_bizobj.MakeFieldValue(1, 42, None, None, None, None, False)
+    fv5 = tracker_bizobj.MakeFieldValue(1, 99, None, None, None, None, False)
+    fv6 = tracker_bizobj.MakeFieldValue(1, 100, None, None, None, None, False)
+
+    merged_fvs, fvs_added_dict, fvs_removed_dict = tracker_bizobj._MergeFields(
+        [fv1, fv2], [fv2, fv3, fv6], [fv4, fv5], [fd])
+    self.assertEqual([fv2, fv3, fv6], merged_fvs)
+    self.assertEqual({fv3.field_id: [fv3, fv6]}, fvs_added_dict)
+    self.assertEqual({fv4.field_id: [fv4]}, fvs_removed_dict)
+
+  def testMergeFields_MultiValuedPhase(self):
+    fd = tracker_pb2.FieldDef(
+        field_id=1, field_name='foo', is_multivalued=True, is_phase_field=True)
+    fd2 = tracker_pb2.FieldDef(
+        field_id=2, field_name='cow', is_multivalued=True, is_phase_field=True)
+    fv1 = tracker_bizobj.MakeFieldValue(
+        1, 42, None, None, None, None, False, phase_id=1)
+    fv2 = tracker_bizobj.MakeFieldValue(
+        1, 43, None, None, None, None, False, phase_id=2)
+    fv3 = tracker_bizobj.MakeFieldValue(
+        1, 44, None, None, None, None, False, phase_id=1)
+    fv4 = tracker_bizobj.MakeFieldValue(
+        1, 99, None, None, None, None, False, phase_id=2)
+    fv5 = tracker_bizobj.MakeFieldValue(
+        2, 22, None, None, None, None, False, phase_id=2)
+
+    merged_fvs, fvs_added_dict, fvs_removed_dict = tracker_bizobj._MergeFields(
+        [fv1, fv2], [fv3, fv1, fv5], [fv2, fv4], [fd, fd2])
+    self.assertEqual([fv1, fv3, fv5], merged_fvs)
+    self.assertEqual({fv3.field_id: [fv3], fv5.field_id: [fv5]}, fvs_added_dict)
+    self.assertEqual({fv2.field_id: [fv2]}, fvs_removed_dict)
+
+  def testSplitBlockedOnRanks_Normal(self):
+    issue = tracker_pb2.Issue()
+    issue.blocked_on_iids = [78902, 78903, 78904]
+    issue.blocked_on_ranks = [10, 20, 30]
+    rank_rows = list(zip(issue.blocked_on_iids, issue.blocked_on_ranks))
+    rank_rows.reverse()
+    ret = tracker_bizobj.SplitBlockedOnRanks(
+        issue, 78903, False, issue.blocked_on_iids)
+    self.assertEqual(ret, (rank_rows[:1], rank_rows[1:]))
+
+  def testSplitBlockedOnRanks_BadTarget(self):
+    issue = tracker_pb2.Issue()
+    issue.blocked_on_iids = [78902, 78903, 78904]
+    issue.blocked_on_ranks = [10, 20, 30]
+    rank_rows = list(zip(issue.blocked_on_iids, issue.blocked_on_ranks))
+    rank_rows.reverse()
+    ret = tracker_bizobj.SplitBlockedOnRanks(
+        issue, 78999, False, issue.blocked_on_iids)
+    self.assertEqual(ret, (rank_rows, []))
diff --git a/tracker/test/tracker_helpers_test.py b/tracker/test/tracker_helpers_test.py
new file mode 100644
index 0000000..4f89cc9
--- /dev/null
+++ b/tracker/test/tracker_helpers_test.py
@@ -0,0 +1,2775 @@
+# 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
+
+"""Unittest for the tracker helpers module."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import copy
+import mock
+import unittest
+
+import settings
+
+from businesslogic import work_env
+from framework import exceptions
+from framework import framework_constants
+from framework import framework_helpers
+from framework import permissions
+from framework import template_helpers
+from framework import urls
+from proto import project_pb2
+from proto import tracker_pb2
+from proto import user_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+
+TEST_ID_MAP = {
+    'a@example.com': 1,
+    'b@example.com': 2,
+    'c@example.com': 3,
+    'd@example.com': 4,
+    }
+
+
+def _Issue(project_name, local_id, summary='', status='', project_id=789):
+  issue = tracker_pb2.Issue()
+  issue.project_name = project_name
+  issue.project_id = project_id
+  issue.local_id = local_id
+  issue.issue_id = 100000 + local_id
+  issue.summary = summary
+  issue.status = status
+  return issue
+
+
+def _MakeConfig():
+  config = tracker_pb2.ProjectIssueConfig()
+  config.well_known_statuses.append(tracker_pb2.StatusDef(
+      means_open=True, status='New', deprecated=False))
+  config.well_known_statuses.append(tracker_pb2.StatusDef(
+      status='Old', means_open=False, deprecated=False))
+  config.well_known_statuses.append(tracker_pb2.StatusDef(
+      status='StatusThatWeDontUseAnymore', means_open=False, deprecated=True))
+
+  return config
+
+
+class HelpersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+
+    for email, user_id in TEST_ID_MAP.items():
+      self.services.user.TestAddUser(email, user_id)
+
+    self.services.project.TestAddProject('testproj', project_id=789)
+    self.issue1 = fake.MakeTestIssue(789, 1, 'one', 'New', 111)
+    self.issue1.project_name = 'testproj'
+    self.services.issue.TestAddIssue(self.issue1)
+    self.issue2 = fake.MakeTestIssue(789, 2, 'two', 'New', 111)
+    self.issue2.project_name = 'testproj'
+    self.services.issue.TestAddIssue(self.issue2)
+    self.issue3 = fake.MakeTestIssue(789, 3, 'three', 'New', 111)
+    self.issue3.project_name = 'testproj'
+    self.services.issue.TestAddIssue(self.issue3)
+    self.cnxn = 'fake connextion'
+    self.errors = template_helpers.EZTError()
+    self.default_colspec_param = 'colspec=%s' % (
+        tracker_constants.DEFAULT_COL_SPEC.replace(' ', '%20'))
+    self.services.usergroup.TestAddGroupSettings(999, 'group@example.com')
+
+  def testParseIssueRequest_Empty(self):
+    post_data = fake.PostData()
+    errors = template_helpers.EZTError()
+    parsed = tracker_helpers.ParseIssueRequest(
+        'fake cnxn', post_data, self.services, errors, 'proj')
+    self.assertEqual('', parsed.summary)
+    self.assertEqual('', parsed.comment)
+    self.assertEqual('', parsed.status)
+    self.assertEqual('', parsed.users.owner_username)
+    self.assertEqual(0, parsed.users.owner_id)
+    self.assertEqual([], parsed.users.cc_usernames)
+    self.assertEqual([], parsed.users.cc_usernames_remove)
+    self.assertEqual([], parsed.users.cc_ids)
+    self.assertEqual([], parsed.users.cc_ids_remove)
+    self.assertEqual('', parsed.template_name)
+    self.assertEqual([], parsed.labels)
+    self.assertEqual([], parsed.labels_remove)
+    self.assertEqual({}, parsed.fields.vals)
+    self.assertEqual({}, parsed.fields.vals_remove)
+    self.assertEqual([], parsed.fields.fields_clear)
+    self.assertEqual('', parsed.blocked_on.entered_str)
+    self.assertEqual([], parsed.blocked_on.iids)
+
+  def testParseIssueRequest_Normal(self):
+    post_data = fake.PostData({
+        'summary': ['some summary'],
+        'comment': ['some comment'],
+        'status': ['SomeStatus'],
+        'template_name': ['some template'],
+        'label': ['lab1', '-lab2'],
+        'custom_123': ['field1123a', 'field1123b'],
+        })
+    errors = template_helpers.EZTError()
+    parsed = tracker_helpers.ParseIssueRequest(
+        'fake cnxn', post_data, self.services, errors, 'proj')
+    self.assertEqual('some summary', parsed.summary)
+    self.assertEqual('some comment', parsed.comment)
+    self.assertEqual('SomeStatus', parsed.status)
+    self.assertEqual('', parsed.users.owner_username)
+    self.assertEqual(0, parsed.users.owner_id)
+    self.assertEqual([], parsed.users.cc_usernames)
+    self.assertEqual([], parsed.users.cc_usernames_remove)
+    self.assertEqual([], parsed.users.cc_ids)
+    self.assertEqual([], parsed.users.cc_ids_remove)
+    self.assertEqual('some template', parsed.template_name)
+    self.assertEqual(['lab1'], parsed.labels)
+    self.assertEqual(['lab2'], parsed.labels_remove)
+    self.assertEqual({123: ['field1123a', 'field1123b']}, parsed.fields.vals)
+    self.assertEqual({}, parsed.fields.vals_remove)
+    self.assertEqual([], parsed.fields.fields_clear)
+
+  def testMarkupDescriptionOnInput(self):
+    content = 'What?\nthat\nWhy?\nidk\nWhere?\n'
+    tmpl_txt = 'What?\nWhy?\nWhere?\nWhen?'
+    desc = '<b>What?</b>\nthat\n<b>Why?</b>\nidk\n<b>Where?</b>\n'
+    self.assertEqual(tracker_helpers.MarkupDescriptionOnInput(
+        content, tmpl_txt), desc)
+
+  def testMarkupDescriptionLineOnInput(self):
+    line = 'What happened??'
+    tmpl_lines = ['What happened??','Why?']
+    self.assertEqual(tracker_helpers._MarkupDescriptionLineOnInput(
+        line, tmpl_lines), '<b>What happened??</b>')
+
+    line = 'Something terrible!!!'
+    self.assertEqual(tracker_helpers._MarkupDescriptionLineOnInput(
+        line, tmpl_lines), 'Something terrible!!!')
+
+  def testClassifyPlusMinusItems(self):
+    add, remove = tracker_helpers._ClassifyPlusMinusItems([])
+    self.assertEqual([], add)
+    self.assertEqual([], remove)
+
+    add, remove = tracker_helpers._ClassifyPlusMinusItems(
+        ['', ' ', '  \t', '-'])
+    self.assertItemsEqual([], add)
+    self.assertItemsEqual([], remove)
+
+    add, remove = tracker_helpers._ClassifyPlusMinusItems(
+        ['a', 'b', 'c'])
+    self.assertItemsEqual(['a', 'b', 'c'], add)
+    self.assertItemsEqual([], remove)
+
+    add, remove = tracker_helpers._ClassifyPlusMinusItems(
+        ['a-a-a', 'b-b', 'c-'])
+    self.assertItemsEqual(['a-a-a', 'b-b', 'c-'], add)
+    self.assertItemsEqual([], remove)
+
+    add, remove = tracker_helpers._ClassifyPlusMinusItems(
+        ['-a'])
+    self.assertItemsEqual([], add)
+    self.assertItemsEqual(['a'], remove)
+
+    add, remove = tracker_helpers._ClassifyPlusMinusItems(
+        ['-a', 'b', 'c-c'])
+    self.assertItemsEqual(['b', 'c-c'], add)
+    self.assertItemsEqual(['a'], remove)
+
+    add, remove = tracker_helpers._ClassifyPlusMinusItems(
+        ['-a', '-b-b', '-c-'])
+    self.assertItemsEqual([], add)
+    self.assertItemsEqual(['a', 'b-b', 'c-'], remove)
+
+    # We dedup, but we don't cancel out items that are both added and removed.
+    add, remove = tracker_helpers._ClassifyPlusMinusItems(
+        ['a', 'a', '-a'])
+    self.assertItemsEqual(['a'], add)
+    self.assertItemsEqual(['a'], remove)
+
+  def testParseIssueRequestFields(self):
+    parsed_fields = tracker_helpers._ParseIssueRequestFields(fake.PostData({
+        'custom_1': ['https://hello.com'],
+        'custom_12': ['https://blah.com'],
+        'custom_14': ['https://remove.com'],
+        'custom_15_goats': ['2', '3'],
+        'custom_15_sheep': ['3', '5'],
+        'custom_16_sheep': ['yarn'],
+        'op_custom_14': ['remove'],
+        'op_custom_12': ['clear'],
+        'op_custom_16_sheep': ['remove'],
+        'ignore': 'no matter',}))
+    self.assertEqual(
+        parsed_fields,
+        tracker_helpers.ParsedFields(
+            {
+                1: ['https://hello.com'],
+                12: ['https://blah.com']
+            }, {14: ['https://remove.com']}, [12],
+            {15: {
+                'goats': ['2', '3'],
+                'sheep': ['3', '5']
+            }}, {16: {
+                'sheep': ['yarn']
+            }}))
+
+  def testParseIssueRequestAttachments(self):
+    file1 = testing_helpers.Blank(
+        filename='hello.c',
+        value='hello world')
+
+    file2 = testing_helpers.Blank(
+        filename='README',
+        value='Welcome to our project')
+
+    file3 = testing_helpers.Blank(
+        filename='c:\\dir\\subdir\\FILENAME.EXT',
+        value='Abort, Retry, or Fail?')
+
+    # Browsers send this if FILE field was not filled in.
+    file4 = testing_helpers.Blank(
+        filename='',
+        value='')
+
+    attachments = tracker_helpers._ParseIssueRequestAttachments({})
+    self.assertEqual([], attachments)
+
+    attachments = tracker_helpers._ParseIssueRequestAttachments(fake.PostData({
+        'file1': [file1],
+        }))
+    self.assertEqual(
+        [('hello.c', 'hello world', 'text/plain')],
+        attachments)
+
+    attachments = tracker_helpers._ParseIssueRequestAttachments(fake.PostData({
+        'file1': [file1],
+        'file2': [file2],
+        }))
+    self.assertEqual(
+        [('hello.c', 'hello world', 'text/plain'),
+         ('README', 'Welcome to our project', 'text/plain')],
+        attachments)
+
+    attachments = tracker_helpers._ParseIssueRequestAttachments(fake.PostData({
+        'file3': [file3],
+        }))
+    self.assertEqual(
+        [('FILENAME.EXT', 'Abort, Retry, or Fail?',
+          'application/octet-stream')],
+        attachments)
+
+    attachments = tracker_helpers._ParseIssueRequestAttachments(fake.PostData({
+        'file1': [file4],  # Does not appear in result
+        'file3': [file3],
+        'file4': [file4],  # Does not appear in result
+        }))
+    self.assertEqual(
+        [('FILENAME.EXT', 'Abort, Retry, or Fail?',
+          'application/octet-stream')],
+        attachments)
+
+  def testParseIssueRequestKeptAttachments(self):
+    pass  # TODO(jrobbins): Write this test.
+
+  def testParseIssueRequestUsers(self):
+    post_data = {}
+    parsed_users = tracker_helpers._ParseIssueRequestUsers(
+        'fake connection', post_data, self.services)
+    self.assertEqual('', parsed_users.owner_username)
+    self.assertEqual(
+        framework_constants.NO_USER_SPECIFIED, parsed_users.owner_id)
+    self.assertEqual([], parsed_users.cc_usernames)
+    self.assertEqual([], parsed_users.cc_usernames_remove)
+    self.assertEqual([], parsed_users.cc_ids)
+    self.assertEqual([], parsed_users.cc_ids_remove)
+
+    post_data = fake.PostData({
+        'owner': [''],
+        })
+    parsed_users = tracker_helpers._ParseIssueRequestUsers(
+        'fake connection', post_data, self.services)
+    self.assertEqual('', parsed_users.owner_username)
+    self.assertEqual(
+        framework_constants.NO_USER_SPECIFIED, parsed_users.owner_id)
+    self.assertEqual([], parsed_users.cc_usernames)
+    self.assertEqual([], parsed_users.cc_usernames_remove)
+    self.assertEqual([], parsed_users.cc_ids)
+    self.assertEqual([], parsed_users.cc_ids_remove)
+
+    post_data = fake.PostData({
+        'owner': [' \t'],
+        })
+    parsed_users = tracker_helpers._ParseIssueRequestUsers(
+        'fake connection', post_data, self.services)
+    self.assertEqual('', parsed_users.owner_username)
+    self.assertEqual(
+        framework_constants.NO_USER_SPECIFIED, parsed_users.owner_id)
+    self.assertEqual([], parsed_users.cc_usernames)
+    self.assertEqual([], parsed_users.cc_usernames_remove)
+    self.assertEqual([], parsed_users.cc_ids)
+    self.assertEqual([], parsed_users.cc_ids_remove)
+
+    post_data = fake.PostData({
+        'owner': ['b@example.com'],
+        })
+    parsed_users = tracker_helpers._ParseIssueRequestUsers(
+        'fake connection', post_data, self.services)
+    self.assertEqual('b@example.com', parsed_users.owner_username)
+    self.assertEqual(TEST_ID_MAP['b@example.com'], parsed_users.owner_id)
+    self.assertEqual([], parsed_users.cc_usernames)
+    self.assertEqual([], parsed_users.cc_usernames_remove)
+    self.assertEqual([], parsed_users.cc_ids)
+    self.assertEqual([], parsed_users.cc_ids_remove)
+
+    post_data = fake.PostData({
+        'owner': ['b@example.com'],
+        })
+    parsed_users = tracker_helpers._ParseIssueRequestUsers(
+        'fake connection', post_data, self.services)
+    self.assertEqual('b@example.com', parsed_users.owner_username)
+    self.assertEqual(TEST_ID_MAP['b@example.com'], parsed_users.owner_id)
+    self.assertEqual([], parsed_users.cc_usernames)
+    self.assertEqual([], parsed_users.cc_usernames_remove)
+    self.assertEqual([], parsed_users.cc_ids)
+    self.assertEqual([], parsed_users.cc_ids_remove)
+
+    post_data = fake.PostData({
+        'cc': ['b@example.com'],
+        })
+    parsed_users = tracker_helpers._ParseIssueRequestUsers(
+        'fake connection', post_data, self.services)
+    self.assertEqual('', parsed_users.owner_username)
+    self.assertEqual(
+        framework_constants.NO_USER_SPECIFIED, parsed_users.owner_id)
+    self.assertEqual(['b@example.com'], parsed_users.cc_usernames)
+    self.assertEqual([], parsed_users.cc_usernames_remove)
+    self.assertEqual([TEST_ID_MAP['b@example.com']], parsed_users.cc_ids)
+    self.assertEqual([], parsed_users.cc_ids_remove)
+
+    post_data = fake.PostData({
+        'cc': ['-b@example.com, c@example.com,,'
+               'a@example.com,'],
+        })
+    parsed_users = tracker_helpers._ParseIssueRequestUsers(
+        'fake connection', post_data, self.services)
+    self.assertEqual('', parsed_users.owner_username)
+    self.assertEqual(
+        framework_constants.NO_USER_SPECIFIED, parsed_users.owner_id)
+    self.assertItemsEqual(['c@example.com', 'a@example.com'],
+                          parsed_users.cc_usernames)
+    self.assertEqual(['b@example.com'], parsed_users.cc_usernames_remove)
+    self.assertItemsEqual([TEST_ID_MAP['c@example.com'],
+                           TEST_ID_MAP['a@example.com']],
+                          parsed_users.cc_ids)
+    self.assertEqual([TEST_ID_MAP['b@example.com']],
+                      parsed_users.cc_ids_remove)
+
+    post_data = fake.PostData({
+        'owner': ['fuhqwhgads@example.com'],
+        'cc': ['c@example.com, fuhqwhgads@example.com'],
+        })
+    parsed_users = tracker_helpers._ParseIssueRequestUsers(
+        'fake connection', post_data, self.services)
+    self.assertEqual('fuhqwhgads@example.com', parsed_users.owner_username)
+    gen_uid = framework_helpers.MurmurHash3_x86_32(parsed_users.owner_username)
+    self.assertEqual(gen_uid, parsed_users.owner_id)  # autocreated user
+    self.assertItemsEqual(
+        ['c@example.com', 'fuhqwhgads@example.com'], parsed_users.cc_usernames)
+    self.assertEqual([], parsed_users.cc_usernames_remove)
+    self.assertItemsEqual(
+       [TEST_ID_MAP['c@example.com'], gen_uid], parsed_users.cc_ids)
+    self.assertEqual([], parsed_users.cc_ids_remove)
+
+    post_data = fake.PostData({
+        'cc': ['C@example.com, b@exAmple.cOm'],
+        })
+    parsed_users = tracker_helpers._ParseIssueRequestUsers(
+        'fake connection', post_data, self.services)
+    self.assertItemsEqual(
+        ['c@example.com', 'b@example.com'], parsed_users.cc_usernames)
+    self.assertEqual([], parsed_users.cc_usernames_remove)
+    self.assertItemsEqual(
+       [TEST_ID_MAP['c@example.com'], TEST_ID_MAP['b@example.com']],
+       parsed_users.cc_ids)
+    self.assertEqual([], parsed_users.cc_ids_remove)
+
+  def testParseBlockers_BlockedOnNothing(self):
+    """Was blocked on nothing, still nothing."""
+    post_data = {tracker_helpers.BLOCKED_ON: ''}
+    parsed_blockers = tracker_helpers._ParseBlockers(
+        self.cnxn, post_data, self.services, self.errors, 'testproj',
+        tracker_helpers.BLOCKED_ON)
+
+    self.assertEqual('', parsed_blockers.entered_str)
+    self.assertEqual([], parsed_blockers.iids)
+    self.assertIsNone(getattr(self.errors, tracker_helpers.BLOCKED_ON))
+    self.assertIsNone(getattr(self.errors, tracker_helpers.BLOCKING))
+
+  def testParseBlockers_BlockedOnAdded(self):
+    """Was blocked on nothing; now 1, 2, 3."""
+    post_data = {tracker_helpers.BLOCKED_ON: '1, 2, 3'}
+    parsed_blockers = tracker_helpers._ParseBlockers(
+        self.cnxn, post_data, self.services, self.errors, 'testproj',
+        tracker_helpers.BLOCKED_ON)
+
+    self.assertEqual('1, 2, 3', parsed_blockers.entered_str)
+    self.assertEqual([100001, 100002, 100003], parsed_blockers.iids)
+    self.assertIsNone(getattr(self.errors, tracker_helpers.BLOCKED_ON))
+    self.assertIsNone(getattr(self.errors, tracker_helpers.BLOCKING))
+
+  def testParseBlockers_BlockedOnDuplicateRef(self):
+    """Was blocked on nothing; now just 2, but repeated in input."""
+    post_data = {tracker_helpers.BLOCKED_ON: '2, 2, 2'}
+    parsed_blockers = tracker_helpers._ParseBlockers(
+        self.cnxn, post_data, self.services, self.errors, 'testproj',
+        tracker_helpers.BLOCKED_ON)
+
+    self.assertEqual('2, 2, 2', parsed_blockers.entered_str)
+    self.assertEqual([100002], parsed_blockers.iids)
+    self.assertIsNone(getattr(self.errors, tracker_helpers.BLOCKED_ON))
+    self.assertIsNone(getattr(self.errors, tracker_helpers.BLOCKING))
+
+  def testParseBlockers_Missing(self):
+    """Parsing an input field that was not in the POST."""
+    post_data = {}
+    parsed_blockers = tracker_helpers._ParseBlockers(
+        self.cnxn, post_data, self.services, self.errors, 'testproj',
+        tracker_helpers.BLOCKED_ON)
+
+    self.assertEqual('', parsed_blockers.entered_str)
+    self.assertEqual([], parsed_blockers.iids)
+    self.assertIsNone(getattr(self.errors, tracker_helpers.BLOCKED_ON))
+    self.assertIsNone(getattr(self.errors, tracker_helpers.BLOCKING))
+
+  def testParseBlockers_SameIssueNoProject(self):
+    """Adding same issue as blocker should modify the errors object."""
+    post_data = {'id': '2', tracker_helpers.BLOCKING: '2, 3'}
+
+    parsed_blockers = tracker_helpers._ParseBlockers(
+        self.cnxn, post_data, self.services, self.errors, 'testproj',
+        tracker_helpers.BLOCKING)
+    self.assertEqual('2, 3', parsed_blockers.entered_str)
+    self.assertEqual([], parsed_blockers.iids)
+    self.assertEqual(
+        getattr(self.errors, tracker_helpers.BLOCKING),
+        'Cannot be blocking the same issue')
+    self.assertIsNone(getattr(self.errors, tracker_helpers.BLOCKED_ON))
+
+  def testParseBlockers_SameIssueSameProject(self):
+    """Adding same issue as blocker should modify the errors object."""
+    post_data = {'id': '2', tracker_helpers.BLOCKING: 'testproj:2, 3'}
+
+    parsed_blockers = tracker_helpers._ParseBlockers(
+        self.cnxn, post_data, self.services, self.errors, 'testproj',
+        tracker_helpers.BLOCKING)
+    self.assertEqual('testproj:2, 3', parsed_blockers.entered_str)
+    self.assertEqual([], parsed_blockers.iids)
+    self.assertEqual(
+        getattr(self.errors, tracker_helpers.BLOCKING),
+        'Cannot be blocking the same issue')
+    self.assertIsNone(getattr(self.errors, tracker_helpers.BLOCKED_ON))
+
+  def testParseBlockers_SameIssueDifferentProject(self):
+    """Adding different blocker issue should not modify the errors object."""
+    post_data = {'id': '2', tracker_helpers.BLOCKING: 'testproj:2'}
+
+    parsed_blockers = tracker_helpers._ParseBlockers(
+        self.cnxn, post_data, self.services, self.errors, 'testprojB',
+        tracker_helpers.BLOCKING)
+    self.assertEqual('testproj:2', parsed_blockers.entered_str)
+    self.assertEqual([100002], parsed_blockers.iids)
+    self.assertIsNone(getattr(self.errors, tracker_helpers.BLOCKING))
+    self.assertIsNone(getattr(self.errors, tracker_helpers.BLOCKED_ON))
+
+  def testParseBlockers_Invalid(self):
+    """Input fields with invalid values should modify the errors object."""
+    post_data = {tracker_helpers.BLOCKING: '2, foo',
+                 tracker_helpers.BLOCKED_ON: '3, bar'}
+
+    parsed_blockers = tracker_helpers._ParseBlockers(
+        self.cnxn, post_data, self.services, self.errors, 'testproj',
+        tracker_helpers.BLOCKING)
+    self.assertEqual('2, foo', parsed_blockers.entered_str)
+    self.assertEqual([100002], parsed_blockers.iids)
+    self.assertEqual(
+        getattr(self.errors, tracker_helpers.BLOCKING), 'Invalid issue ID foo')
+    self.assertIsNone(getattr(self.errors, tracker_helpers.BLOCKED_ON))
+
+    parsed_blockers = tracker_helpers._ParseBlockers(
+        self.cnxn, post_data, self.services, self.errors, 'testproj',
+        tracker_helpers.BLOCKED_ON)
+    self.assertEqual('3, bar', parsed_blockers.entered_str)
+    self.assertEqual([100003], parsed_blockers.iids)
+    self.assertEqual(
+        getattr(self.errors, tracker_helpers.BLOCKED_ON),
+        'Invalid issue ID bar')
+
+  def testParseBlockers_Dangling(self):
+    """A ref to a sanctioned projected should be allowed."""
+    post_data = {'id': '2', tracker_helpers.BLOCKING: 'otherproj:2'}
+    real_codesite_projects = settings.recognized_codesite_projects
+    settings.recognized_codesite_projects = ['otherproj']
+    parsed_blockers = tracker_helpers._ParseBlockers(
+        self.cnxn, post_data, self.services, self.errors, 'testproj',
+        tracker_helpers.BLOCKING)
+    self.assertEqual('otherproj:2', parsed_blockers.entered_str)
+    self.assertEqual([('otherproj', 2)], parsed_blockers.dangling_refs)
+    settings.recognized_codesite_projects = real_codesite_projects
+
+  def testParseBlockers_FederatedReferences(self):
+    """Should parse and return FedRefs."""
+    post_data = {'id': '9', tracker_helpers.BLOCKING: '2, b/123, 3, b/789'}
+    parsed_blockers = tracker_helpers._ParseBlockers(
+        self.cnxn, post_data, self.services, self.errors, 'testproj',
+        tracker_helpers.BLOCKING)
+    self.assertEqual('2, b/123, 3, b/789', parsed_blockers.entered_str)
+    self.assertEqual([100002, 100003], parsed_blockers.iids)
+    self.assertEqual(['b/123', 'b/789'], parsed_blockers.federated_ref_strings)
+
+  def testIsValidIssueOwner(self):
+    project = project_pb2.Project()
+    project.owner_ids.extend([1, 2])
+    project.committer_ids.extend([3])
+    project.contributor_ids.extend([4, 999])
+
+    valid, _ = tracker_helpers.IsValidIssueOwner(
+        'fake cnxn', project, framework_constants.NO_USER_SPECIFIED,
+        self.services)
+    self.assertTrue(valid)
+
+    valid, _ = tracker_helpers.IsValidIssueOwner(
+        'fake cnxn', project, 1,
+        self.services)
+    self.assertTrue(valid)
+    valid, _ = tracker_helpers.IsValidIssueOwner(
+        'fake cnxn', project, 2,
+        self.services)
+    self.assertTrue(valid)
+    valid, _ = tracker_helpers.IsValidIssueOwner(
+        'fake cnxn', project, 3,
+        self.services)
+    self.assertTrue(valid)
+    valid, _ = tracker_helpers.IsValidIssueOwner(
+        'fake cnxn', project, 4,
+        self.services)
+    self.assertTrue(valid)
+
+    valid, _ = tracker_helpers.IsValidIssueOwner(
+        'fake cnxn', project, 7,
+        self.services)
+    self.assertFalse(valid)
+
+    valid, _ = tracker_helpers.IsValidIssueOwner(
+        'fake cnxn', project, 999,
+        self.services)
+    self.assertFalse(valid)
+
+  # MakeViewsForUsersInIssuesTest is tested in MakeViewsForUsersInIssuesTest.
+
+  def testGetAllowedOpenedAndClosedIssues(self):
+    pass  # TOOD(jrobbins): Write this test.
+
+  def testFormatIssueListURL_JumpedToIssue(self):
+    """If we jumped to issue 123, the list is can=1&q=id-123."""
+    config = tracker_pb2.ProjectIssueConfig()
+    path = '/p/proj/issues/detail?id=123&q=123'
+    mr = testing_helpers.MakeMonorailRequest(
+        path=path, headers={'Host': 'code.google.com'})
+    mr.ComputeColSpec(config)
+
+    absolute_base_url = 'http://code.google.com'
+
+    url_1 = tracker_helpers.FormatIssueListURL(mr, config)
+    self.assertEqual(
+        '%s/p/proj/issues/list?can=1&%s&q=id%%3D123' % (
+            absolute_base_url, self.default_colspec_param),
+        url_1)
+
+  def testFormatIssueListURL_NoCurrentState(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    path = '/p/proj/issues/detail?id=123'
+    mr = testing_helpers.MakeMonorailRequest(
+        path=path, headers={'Host': 'code.google.com'})
+    mr.ComputeColSpec(config)
+
+    absolute_base_url = 'http://code.google.com'
+
+    url_1 = tracker_helpers.FormatIssueListURL(mr, config)
+    self.assertEqual(
+        '%s/p/proj/issues/list?%s&q=' % (
+            absolute_base_url, self.default_colspec_param),
+        url_1)
+
+    url_2 = tracker_helpers.FormatIssueListURL(
+        mr, config, foo=123)
+    self.assertEqual(
+        '%s/p/proj/issues/list?%s&foo=123&q=' % (
+            absolute_base_url, self.default_colspec_param),
+        url_2)
+
+    url_3 = tracker_helpers.FormatIssueListURL(
+        mr, config, foo=123, bar='abc')
+    self.assertEqual(
+        '%s/p/proj/issues/list?bar=abc&%s&foo=123&q=' % (
+            absolute_base_url, self.default_colspec_param),
+        url_3)
+
+    url_4 = tracker_helpers.FormatIssueListURL(
+        mr, config, baz='escaped+encoded&and100% "safe"')
+    self.assertEqual(
+        '%s/p/proj/issues/list?'
+        'baz=escaped%%2Bencoded%%26and100%%25%%20%%22safe%%22&%s&q=' % (
+            absolute_base_url, self.default_colspec_param),
+        url_4)
+
+  def testFormatIssueListURL_KeepCurrentState(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    path = '/p/proj/issues/detail?id=123&sort=aa&colspec=a b c&groupby=d'
+    mr = testing_helpers.MakeMonorailRequest(
+        path=path, headers={'Host': 'localhost:8080'})
+    mr.ComputeColSpec(config)
+
+    absolute_base_url = 'http://localhost:8080'
+
+    url_1 = tracker_helpers.FormatIssueListURL(mr, config)
+    self.assertEqual(
+        '%s/p/proj/issues/list?colspec=a%%20b%%20c'
+        '&groupby=d&q=&sort=aa' % absolute_base_url,
+        url_1)
+
+    url_2 = tracker_helpers.FormatIssueListURL(
+        mr, config, foo=123)
+    self.assertEqual(
+        '%s/p/proj/issues/list?'
+        'colspec=a%%20b%%20c&foo=123&groupby=d&q=&sort=aa' % absolute_base_url,
+        url_2)
+
+    url_3 = tracker_helpers.FormatIssueListURL(
+        mr, config, colspec='X Y Z')
+    self.assertEqual(
+        '%s/p/proj/issues/list?colspec=a%%20b%%20c'
+        '&groupby=d&q=&sort=aa' % absolute_base_url,
+        url_3)
+
+  def testFormatRelativeIssueURL(self):
+    self.assertEqual(
+        '/p/proj/issues/attachment',
+        tracker_helpers.FormatRelativeIssueURL(
+            'proj', urls.ISSUE_ATTACHMENT))
+
+    self.assertEqual(
+        '/p/proj/issues/detail?id=123',
+        tracker_helpers.FormatRelativeIssueURL(
+            'proj', urls.ISSUE_DETAIL, id=123))
+
+  @mock.patch('google.appengine.api.app_identity.get_application_id')
+  def testFormatCrBugURL_Prod(self, mock_get_app_id):
+    mock_get_app_id.return_value = 'monorail-prod'
+    self.assertEqual(
+        'https://crbug.com/proj/123',
+        tracker_helpers.FormatCrBugURL('proj', 123))
+    self.assertEqual(
+        'https://crbug.com/123456',
+        tracker_helpers.FormatCrBugURL('chromium', 123456))
+
+  @mock.patch('google.appengine.api.app_identity.get_application_id')
+  def testFormatCrBugURL_NonProd(self, mock_get_app_id):
+    mock_get_app_id.return_value = 'monorail-staging'
+    self.assertEqual(
+        '/p/proj/issues/detail?id=123',
+        tracker_helpers.FormatCrBugURL('proj', 123))
+    self.assertEqual(
+        '/p/chromium/issues/detail?id=123456',
+        tracker_helpers.FormatCrBugURL('chromium', 123456))
+
+  @mock.patch('tracker.tracker_constants.ISSUE_ATTACHMENTS_QUOTA_HARD', 1)
+  def testComputeNewQuotaBytesUsed_ProjectQuota(self):
+    upload_1 = framework_helpers.AttachmentUpload(
+        'matter not', 'three men make a tiger', 'matter not')
+    upload_2 = framework_helpers.AttachmentUpload(
+        'matter not', 'chicken', 'matter not')
+    attachments = [upload_1, upload_2]
+
+    project = fake.Project()
+    project.attachment_bytes_used = 10
+    project.attachment_quota = project.attachment_bytes_used + len(
+        upload_1.contents + upload_2.contents) + 1
+
+    actual_new = tracker_helpers.ComputeNewQuotaBytesUsed(project, attachments)
+    expected_new = project.attachment_quota - 1
+    self.assertEqual(actual_new, expected_new)
+
+    upload_3 = framework_helpers.AttachmentUpload(
+        'matter not', 'donut', 'matter not')
+    attachments.append(upload_3)
+    with self.assertRaises(exceptions.OverAttachmentQuota):
+      tracker_helpers.ComputeNewQuotaBytesUsed(project, attachments)
+
+  @mock.patch(
+      'tracker.tracker_constants.ISSUE_ATTACHMENTS_QUOTA_HARD', len('tiger'))
+  def testComputeNewQuotaBytesUsed_GeneralQuota(self):
+    upload_1 = framework_helpers.AttachmentUpload(
+        'matter not', 'tiger', 'matter not')
+    attachments = [upload_1]
+
+    project = fake.Project()
+
+    actual_new = tracker_helpers.ComputeNewQuotaBytesUsed(project, attachments)
+    expected_new = len(upload_1.contents)
+    self.assertEqual(actual_new, expected_new)
+
+    upload_2 = framework_helpers.AttachmentUpload(
+        'matter not', 'donut', 'matter not')
+    attachments.append(upload_2)
+    with self.assertRaises(exceptions.OverAttachmentQuota):
+      tracker_helpers.ComputeNewQuotaBytesUsed(project, attachments)
+
+    upload_3 = framework_helpers.AttachmentUpload(
+        'matter not', 'donut', 'matter not')
+    attachments.append(upload_3)
+    with self.assertRaises(exceptions.OverAttachmentQuota):
+      tracker_helpers.ComputeNewQuotaBytesUsed(project, attachments)
+
+  def testIsUnderSoftAttachmentQuota(self):
+    pass  # TODO(jrobbins): Write this test.
+
+  # GetAllIssueProjects is tested in GetAllIssueProjectsTest.
+
+  def testGetPermissionsInAllProjects(self):
+    pass  # TODO(jrobbins): Write this test.
+
+  # FilterOutNonViewableIssues is tested in FilterOutNonViewableIssuesTest.
+
+  def testMeansOpenInProject(self):
+    config = _MakeConfig()
+
+    # ensure open means open
+    self.assertTrue(tracker_helpers.MeansOpenInProject('New', config))
+    self.assertTrue(tracker_helpers.MeansOpenInProject('new', config))
+
+    # ensure an unrecognized status means open
+    self.assertTrue(tracker_helpers.MeansOpenInProject(
+        '_undefined_status_', config))
+
+    # ensure closed means closed
+    self.assertFalse(tracker_helpers.MeansOpenInProject('Old', config))
+    self.assertFalse(tracker_helpers.MeansOpenInProject('old', config))
+    self.assertFalse(tracker_helpers.MeansOpenInProject(
+        'StatusThatWeDontUseAnymore', config))
+
+  def testIsNoisy(self):
+    self.assertTrue(tracker_helpers.IsNoisy(778, 320))
+    self.assertFalse(tracker_helpers.IsNoisy(20, 500))
+    self.assertFalse(tracker_helpers.IsNoisy(500, 20))
+    self.assertFalse(tracker_helpers.IsNoisy(1, 1))
+
+  def testMergeCCsAndAddComment(self):
+    target_issue = fake.MakeTestIssue(
+        789, 10, 'Target issue', 'New', 111)
+    source_issue = fake.MakeTestIssue(
+        789, 100, 'Source issue', 'New', 222)
+    source_issue.cc_ids.append(111)
+    # Issue without owner
+    source_issue_2 = fake.MakeTestIssue(
+        789, 101, 'Source issue 2', 'New', 0)
+
+    self.services.issue.TestAddIssue(target_issue)
+    self.services.issue.TestAddIssue(source_issue)
+    self.services.issue.TestAddIssue(source_issue_2)
+
+    # We copy this list so that it isn't updated by the test framework
+    initial_issue_comments = (
+        self.services.issue.GetCommentsForIssue(
+            'fake cnxn', target_issue.issue_id)[:])
+    mr = testing_helpers.MakeMonorailRequest(user_info={'user_id': 111})
+
+    # Merging source into target should create a comment.
+    self.assertIsNotNone(
+        tracker_helpers.MergeCCsAndAddComment(
+            self.services, mr, source_issue, target_issue))
+    updated_issue_comments = self.services.issue.GetCommentsForIssue(
+        'fake cnxn', target_issue.issue_id)
+    for comment in initial_issue_comments:
+      self.assertIn(comment, updated_issue_comments)
+      self.assertEqual(
+          len(initial_issue_comments) + 1, len(updated_issue_comments))
+
+    # Merging source into target should add source's owner to target's CCs.
+    updated_target_issue = self.services.issue.GetIssueByLocalID(
+        'fake cnxn', 789, 10)
+    self.assertIn(111, updated_target_issue.cc_ids)
+    self.assertIn(222, updated_target_issue.cc_ids)
+
+    # Merging source 2 into target should make a comment, but not update CCs.
+    self.assertIsNotNone(
+        tracker_helpers.MergeCCsAndAddComment(
+            self.services, mr, source_issue_2, updated_target_issue))
+    updated_target_issue = self.services.issue.GetIssueByLocalID(
+        'fake cnxn', 789, 10)
+    self.assertNotIn(0, updated_target_issue.cc_ids)
+
+  def testMergeCCsAndAddComment_RestrictedSourceIssue(self):
+    target_issue = fake.MakeTestIssue(
+        789, 10, 'Target issue', 'New', 222)
+    target_issue_2 = fake.MakeTestIssue(
+        789, 11, 'Target issue 2', 'New', 222)
+    source_issue = fake.MakeTestIssue(
+        789, 100, 'Source issue', 'New', 111)
+    source_issue.cc_ids.append(111)
+    source_issue.labels.append('Restrict-View-Commit')
+    target_issue_2.labels.append('Restrict-View-Commit')
+
+    self.services.issue.TestAddIssue(source_issue)
+    self.services.issue.TestAddIssue(target_issue)
+    self.services.issue.TestAddIssue(target_issue_2)
+
+    # We copy this list so that it isn't updated by the test framework
+    initial_issue_comments = self.services.issue.GetCommentsForIssue(
+        'fake cnxn', target_issue.issue_id)[:]
+    mr = testing_helpers.MakeMonorailRequest(user_info={'user_id': 111})
+    self.assertIsNotNone(
+        tracker_helpers.MergeCCsAndAddComment(
+            self.services, mr, source_issue, target_issue))
+
+    # When the source is restricted, we update the target comments...
+    updated_issue_comments = self.services.issue.GetCommentsForIssue(
+        'fake cnxn', target_issue.issue_id)
+    for comment in initial_issue_comments:
+      self.assertIn(comment, updated_issue_comments)
+      self.assertEqual(
+          len(initial_issue_comments) + 1, len(updated_issue_comments))
+    # ...but not the target CCs...
+    updated_target_issue = self.services.issue.GetIssueByLocalID(
+        'fake cnxn', 789, 10)
+    self.assertNotIn(111, updated_target_issue.cc_ids)
+    # ...unless both issues have the same restrictions.
+    self.assertIsNotNone(
+        tracker_helpers.MergeCCsAndAddComment(
+            self.services, mr, source_issue, target_issue_2))
+    updated_target_issue_2 = self.services.issue.GetIssueByLocalID(
+        'fake cnxn', 789, 11)
+    self.assertIn(111, updated_target_issue_2.cc_ids)
+
+  def testMergeCCsAndAddCommentMultipleIssues(self):
+    pass  # TODO(jrobbins): Write this test.
+
+  def testGetAttachmentIfAllowed(self):
+    pass  # TODO(jrobbins): Write this test.
+
+  def testLabelsMaskedByFields(self):
+    pass  # TODO(jrobbins): Write this test.
+
+  def testLabelsNotMaskedByFields(self):
+    pass  # TODO(jrobbins): Write this test.
+
+  def testLookupComponentIDs(self):
+    pass  # TODO(jrobbins): Write this test.
+
+  def testParsePostDataUsers(self):
+    pd_users = 'a@example.com, b@example.com'
+
+    pd_users_ids, pd_users_str = tracker_helpers.ParsePostDataUsers(
+        self.cnxn, pd_users, self.services.user)
+
+    self.assertEqual([1, 2], sorted(pd_users_ids))
+    self.assertEqual('a@example.com, b@example.com', pd_users_str)
+
+  def testParsePostDataUsers_Empty(self):
+    pd_users = ''
+
+    pd_users_ids, pd_users_str = tracker_helpers.ParsePostDataUsers(
+        self.cnxn, pd_users, self.services.user)
+
+    self.assertEqual([], sorted(pd_users_ids))
+    self.assertEqual('', pd_users_str)
+
+  def testFilterIssueTypes(self):
+    pass  # TODO(jrobbins): Write this test.
+
+  # ParseMergeFields is tested in IssueMergeTest.
+  # AddIssueStarrers is tested in IssueMergeTest.testMergeIssueStars().
+  # IsMergeAllowed is tested in IssueMergeTest.
+
+  def testPairDerivedValuesWithRuleExplanations_Nothing(self):
+    """Test we return nothing for an issue with no derived values."""
+    proposed_issue = tracker_pb2.Issue()  # No derived values.
+    traces = {}
+    derived_users_by_id = {}
+    actual = tracker_helpers.PairDerivedValuesWithRuleExplanations(
+        proposed_issue, traces, derived_users_by_id)
+    (derived_labels_and_why, derived_owner_and_why,
+     derived_cc_and_why, warnings_and_why, errors_and_why) = actual
+    self.assertEqual([], derived_labels_and_why)
+    self.assertEqual([], derived_owner_and_why)
+    self.assertEqual([], derived_cc_and_why)
+    self.assertEqual([], warnings_and_why)
+    self.assertEqual([], errors_and_why)
+
+  def testPairDerivedValuesWithRuleExplanations_SomeValues(self):
+    """Test we return derived values and explanations for an issue."""
+    proposed_issue = tracker_pb2.Issue(
+        derived_owner_id=111, derived_cc_ids=[222, 333],
+        derived_labels=['aaa', 'zzz'],
+        derived_warnings=['Watch out'],
+        derived_errors=['Status Assigned requires an owner'])
+    traces = {
+        (tracker_pb2.FieldID.OWNER, 111): 'explain 1',
+        (tracker_pb2.FieldID.CC, 222): 'explain 2',
+        (tracker_pb2.FieldID.CC, 333): 'explain 3',
+        (tracker_pb2.FieldID.LABELS, 'aaa'): 'explain 4',
+        (tracker_pb2.FieldID.WARNING, 'Watch out'): 'explain 6',
+        (tracker_pb2.FieldID.ERROR,
+         'Status Assigned requires an owner'): 'explain 7',
+        # There can be extra traces that are not used.
+        (tracker_pb2.FieldID.LABELS, 'bbb'): 'explain 5',
+        # If there is no trace for some derived value, why is None.
+        }
+    derived_users_by_id = {
+      111: testing_helpers.Blank(display_name='one@example.com'),
+      222: testing_helpers.Blank(display_name='two@example.com'),
+      333: testing_helpers.Blank(display_name='three@example.com'),
+      }
+    actual = tracker_helpers.PairDerivedValuesWithRuleExplanations(
+        proposed_issue, traces, derived_users_by_id)
+    (derived_labels_and_why, derived_owner_and_why,
+     derived_cc_and_why, warnings_and_why, errors_and_why) = actual
+    self.assertEqual([
+        {'value': 'aaa', 'why': 'explain 4'},
+        {'value': 'zzz', 'why': None},
+        ], derived_labels_and_why)
+    self.assertEqual([
+        {'value': 'one@example.com', 'why': 'explain 1'},
+        ], derived_owner_and_why)
+    self.assertEqual([
+        {'value': 'two@example.com', 'why': 'explain 2'},
+        {'value': 'three@example.com', 'why': 'explain 3'},
+        ], derived_cc_and_why)
+    self.assertEqual([
+        {'value': 'Watch out', 'why': 'explain 6'},
+        ], warnings_and_why)
+    self.assertEqual([
+        {'value': 'Status Assigned requires an owner', 'why': 'explain 7'},
+        ], errors_and_why)
+
+
+class MakeViewsForUsersInIssuesTest(unittest.TestCase):
+
+  def setUp(self):
+    self.issue1 = _Issue('proj', 1)
+    self.issue1.owner_id = 1001
+    self.issue1.reporter_id = 1002
+
+    self.issue2 = _Issue('proj', 2)
+    self.issue2.owner_id = 2001
+    self.issue2.reporter_id = 2002
+    self.issue2.cc_ids.extend([1, 1001, 1002, 1003])
+
+    self.issue3 = _Issue('proj', 3)
+    self.issue3.owner_id = 1001
+    self.issue3.reporter_id = 3002
+
+    self.user = fake.UserService()
+    for user_id in [1, 1001, 1002, 1003, 2001, 2002, 3002]:
+      self.user.TestAddUser(
+          'test%d' % user_id, user_id, add_user=True)
+
+  def testMakeViewsForUsersInIssues(self):
+    issue_list = [self.issue1, self.issue2, self.issue3]
+    users_by_id = tracker_helpers.MakeViewsForUsersInIssues(
+        'fake cnxn', issue_list, self.user)
+    self.assertItemsEqual([0, 1, 1001, 1002, 1003, 2001, 2002, 3002],
+                          list(users_by_id.keys()))
+    for user_id in [1001, 1002, 1003, 2001]:
+      self.assertEqual(users_by_id[user_id].user_id, user_id)
+
+  def testMakeViewsForUsersInIssuesOmittingSome(self):
+    issue_list = [self.issue1, self.issue2, self.issue3]
+    users_by_id = tracker_helpers.MakeViewsForUsersInIssues(
+        'fake cnxn', issue_list, self.user, omit_ids=[1001, 1003])
+    self.assertItemsEqual([0, 1, 1002, 2001, 2002, 3002],
+        list(users_by_id.keys()))
+    for user_id in [1002, 2001, 2002, 3002]:
+      self.assertEqual(users_by_id[user_id].user_id, user_id)
+
+  def testMakeViewsForUsersInIssuesEmpty(self):
+    issue_list = []
+    users_by_id = tracker_helpers.MakeViewsForUsersInIssues(
+        'fake cnxn', issue_list, self.user)
+    self.assertItemsEqual([], list(users_by_id.keys()))
+
+
+class GetAllIssueProjectsTest(unittest.TestCase):
+  issue_x_1 = tracker_pb2.Issue()
+  issue_x_1.project_id = 789
+  issue_x_1.local_id = 1
+  issue_x_1.reporter_id = 1002
+
+  issue_x_2 = tracker_pb2.Issue()
+  issue_x_2.project_id = 789
+  issue_x_2.local_id = 2
+  issue_x_2.reporter_id = 2002
+
+  issue_y_1 = tracker_pb2.Issue()
+  issue_y_1.project_id = 678
+  issue_y_1.local_id = 1
+  issue_y_1.reporter_id = 2002
+
+  def setUp(self):
+    self.project_service = fake.ProjectService()
+    self.project_service.TestAddProject('proj-x', project_id=789)
+    self.project_service.TestAddProject('proj-y', project_id=678)
+    self.cnxn = 'fake connection'
+
+  def testGetAllIssueProjects_Empty(self):
+    self.assertEqual(
+        {}, tracker_helpers.GetAllIssueProjects(
+            self.cnxn, [], self.project_service))
+
+  def testGetAllIssueProjects_Normal(self):
+    self.assertEqual(
+        {789: self.project_service.GetProjectByName(self.cnxn, 'proj-x')},
+        tracker_helpers.GetAllIssueProjects(
+            self.cnxn, [self.issue_x_1, self.issue_x_2], self.project_service))
+    self.assertEqual(
+        {789: self.project_service.GetProjectByName(self.cnxn, 'proj-x'),
+         678: self.project_service.GetProjectByName(self.cnxn, 'proj-y')},
+        tracker_helpers.GetAllIssueProjects(
+            self.cnxn, [self.issue_x_1, self.issue_x_2, self.issue_y_1],
+            self.project_service))
+
+
+class FilterOutNonViewableIssuesTest(unittest.TestCase):
+  owner_id = 111
+  committer_id = 222
+  nonmember_1_id = 1002
+  nonmember_2_id = 2002
+  nonmember_3_id = 3002
+
+  issue1 = tracker_pb2.Issue()
+  issue1.project_name = 'proj'
+  issue1.project_id = 789
+  issue1.local_id = 1
+  issue1.reporter_id = nonmember_1_id
+
+  issue2 = tracker_pb2.Issue()
+  issue2.project_name = 'proj'
+  issue2.project_id = 789
+  issue2.local_id = 2
+  issue2.reporter_id = nonmember_2_id
+  issue2.labels.extend(['foo', 'bar'])
+
+  issue3 = tracker_pb2.Issue()
+  issue3.project_name = 'proj'
+  issue3.project_id = 789
+  issue3.local_id = 3
+  issue3.reporter_id = nonmember_3_id
+  issue3.labels.extend(['restrict-view-commit'])
+
+  issue4 = tracker_pb2.Issue()
+  issue4.project_name = 'proj'
+  issue4.project_id = 789
+  issue4.local_id = 4
+  issue4.reporter_id = nonmember_3_id
+  issue4.labels.extend(['Foo', 'Restrict-View-Commit'])
+
+  def setUp(self):
+    self.user = user_pb2.User()
+    self.project = self.MakeProject(project_pb2.ProjectState.LIVE)
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(
+        self.project.project_id)
+    self.project_dict = {self.project.project_id: self.project}
+    self.config_dict = {self.config.project_id: self.config}
+
+  def MakeProject(self, state):
+    p = project_pb2.Project(
+        project_id=789, project_name='proj', state=state,
+        owner_ids=[self.owner_id], committer_ids=[self.committer_id])
+    return p
+
+  def testFilterOutNonViewableIssues_Member(self):
+    # perms will be permissions.COMMITTER_ACTIVE_PERMISSIONSET
+    filtered_issues = tracker_helpers.FilterOutNonViewableIssues(
+        {self.committer_id}, self.user, self.project_dict,
+        self.config_dict,
+        [self.issue1, self.issue2, self.issue3, self.issue4])
+    self.assertListEqual([1, 2, 3, 4],
+                         [issue.local_id for issue in filtered_issues])
+
+  def testFilterOutNonViewableIssues_Owner(self):
+    # perms will be permissions.OWNER_ACTIVE_PERMISSIONSET
+    filtered_issues = tracker_helpers.FilterOutNonViewableIssues(
+        {self.owner_id}, self.user, self.project_dict, self.config_dict,
+        [self.issue1, self.issue2, self.issue3, self.issue4])
+    self.assertListEqual([1, 2, 3, 4],
+                         [issue.local_id for issue in filtered_issues])
+
+  def testFilterOutNonViewableIssues_Empty(self):
+    # perms will be permissions.COMMITTER_ACTIVE_PERMISSIONSET
+    filtered_issues = tracker_helpers.FilterOutNonViewableIssues(
+        {self.committer_id}, self.user, self.project_dict,
+        self.config_dict, [])
+    self.assertListEqual([], filtered_issues)
+
+  def testFilterOutNonViewableIssues_NonMember(self):
+    # perms will be permissions.READ_ONLY_PERMISSIONSET
+    filtered_issues = tracker_helpers.FilterOutNonViewableIssues(
+        {self.nonmember_1_id}, self.user, self.project_dict,
+        self.config_dict, [self.issue1, self.issue2, self.issue3, self.issue4])
+    self.assertListEqual([1, 2],
+                         [issue.local_id for issue in filtered_issues])
+
+  def testFilterOutNonViewableIssues_Reporter(self):
+    # perms will be permissions.READ_ONLY_PERMISSIONSET
+    filtered_issues = tracker_helpers.FilterOutNonViewableIssues(
+        {self.nonmember_3_id}, self.user, self.project_dict,
+        self.config_dict, [self.issue1, self.issue2, self.issue3, self.issue4])
+    self.assertListEqual([1, 2, 3, 4],
+                         [issue.local_id for issue in filtered_issues])
+
+
+class IssueMergeTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        project=fake.ProjectService(),
+        issue_star=fake.IssueStarService(),
+        spam=fake.SpamService()
+    )
+    self.project = self.services.project.TestAddProject('proj', project_id=987)
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(
+        self.project.project_id)
+    self.project_dict = {self.project.project_id: self.project}
+    self.config_dict = {self.config.project_id: self.config}
+
+  def testParseMergeFields_NotSpecified(self):
+    issue = fake.MakeTestIssue(987, 1, 'summary', 'New', 111)
+    errors = template_helpers.EZTError()
+    post_data = {}
+
+    text, merge_into_issue = tracker_helpers.ParseMergeFields(
+        self.cnxn, None, 'proj', post_data, 'New', self.config, issue, errors)
+    self.assertEqual('', text)
+    self.assertEqual(None, merge_into_issue)
+
+    text, merge_into_issue = tracker_helpers.ParseMergeFields(
+        self.cnxn, None, 'proj', post_data, 'Duplicate', self.config, issue,
+        errors)
+    self.assertEqual('', text)
+    self.assertTrue(errors.merge_into_id)
+    self.assertEqual(None, merge_into_issue)
+
+  def testParseMergeFields_WrongStatus(self):
+    issue = fake.MakeTestIssue(987, 1, 'summary', 'New', 111)
+    errors = template_helpers.EZTError()
+    post_data = {'merge_into': '12'}
+
+    text, merge_into_issue = tracker_helpers.ParseMergeFields(
+        self.cnxn, None, 'proj', post_data, 'New', self.config, issue, errors)
+    self.assertEqual('', text)
+    self.assertEqual(None, merge_into_issue)
+
+  def testParseMergeFields_NoSuchIssue(self):
+    issue = fake.MakeTestIssue(987, 1, 'summary', 'New', 111)
+    issue.merged_into = 12
+    errors = template_helpers.EZTError()
+    post_data = {'merge_into': '12'}
+
+    text, merge_into_issue = tracker_helpers.ParseMergeFields(
+        self.cnxn, self.services, 'proj', post_data, 'Duplicate',
+        self.config, issue, errors)
+    self.assertEqual('12', text)
+    self.assertEqual(None, merge_into_issue)
+
+  def testParseMergeFields_DontSelfMerge(self):
+    issue = fake.MakeTestIssue(987, 1, 'summary', 'New', 111)
+    errors = template_helpers.EZTError()
+    post_data = {'merge_into': '1'}
+
+    text, merge_into_issue = tracker_helpers.ParseMergeFields(
+        self.cnxn, self.services, 'proj', post_data, 'Duplicate', self.config,
+        issue, errors)
+    self.assertEqual('1', text)
+    self.assertEqual(None, merge_into_issue)
+    self.assertEqual('Cannot merge issue into itself', errors.merge_into_id)
+
+  def testParseMergeFields_NewIssueToMerge(self):
+    merged_issue = fake.MakeTestIssue(
+        self.project.project_id,
+        1,
+        'unused_summary',
+        'unused_status',
+        111,
+        reporter_id=111)
+    self.services.issue.TestAddIssue(merged_issue)
+    mergee_issue = fake.MakeTestIssue(
+        self.project.project_id,
+        2,
+        'unused_summary',
+        'unused_status',
+        111,
+        reporter_id=111)
+    self.services.issue.TestAddIssue(mergee_issue)
+
+    errors = template_helpers.EZTError()
+    post_data = {'merge_into': str(mergee_issue.local_id)}
+
+    text, merge_into_issue = tracker_helpers.ParseMergeFields(
+        self.cnxn, self.services, 'proj', post_data, 'Duplicate', self.config,
+        merged_issue, errors)
+    self.assertEqual(str(mergee_issue.local_id), text)
+    self.assertEqual(mergee_issue, merge_into_issue)
+
+  def testIsMergeAllowed(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    issue = fake.MakeTestIssue(987, 1, 'summary', 'New', 111)
+    issue.project_name = self.project.project_name
+
+    for (perm_set, expected_merge_allowed) in (
+            (permissions.READ_ONLY_PERMISSIONSET, False),
+            (permissions.COMMITTER_INACTIVE_PERMISSIONSET, False),
+            (permissions.COMMITTER_ACTIVE_PERMISSIONSET, True),
+            (permissions.OWNER_ACTIVE_PERMISSIONSET, True)):
+      mr.perms = perm_set
+      merge_allowed = tracker_helpers.IsMergeAllowed(issue, mr, self.services)
+      self.assertEqual(expected_merge_allowed, merge_allowed)
+
+  def testMergeIssueStars(self):
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.project_name = self.project.project_name
+    mr.project = self.project
+
+    config = self.services.config.GetProjectConfig(
+        self.cnxn, self.project.project_id)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, config, 1, 1, True)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, config, 1, 2, True)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, config, 1, 3, True)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, config, 3, 3, True)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, config, 3, 6, True)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, config, 2, 3, True)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, config, 2, 4, True)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, config, 2, 5, True)
+
+    new_starrers = tracker_helpers.GetNewIssueStarrers(
+        self.cnxn, self.services, [1, 3], 2)
+    self.assertItemsEqual(new_starrers, [1, 2, 6])
+    tracker_helpers.AddIssueStarrers(
+        self.cnxn, self.services, mr, 2, self.project, new_starrers)
+    issue_2_starrers = self.services.issue_star.LookupItemStarrers(
+        self.cnxn, 2)
+    # XXX(jrobbins): these tests incorrectly mix local IDs with IIDs.
+    self.assertItemsEqual([1, 2, 3, 4, 5, 6], issue_2_starrers)
+
+
+class MergeLinkedMembersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(
+        user=fake.UserService())
+    self.user1 = self.services.user.TestAddUser('one@example.com', 111)
+    self.user2 = self.services.user.TestAddUser('two@example.com', 222)
+
+  def testNoLinkedAccounts(self):
+    """When no candidate accounts are linked, they are all returned."""
+    actual = tracker_helpers._MergeLinkedMembers(
+        self.cnxn, self.services.user, [111, 222])
+    self.assertEqual([111, 222], actual)
+
+  def testSomeLinkedButNoMasking(self):
+    """If an account has linked accounts, but they are not here, keep it."""
+    self.user1.linked_child_ids = [999]
+    self.user2.linked_parent_id = 999
+    actual = tracker_helpers._MergeLinkedMembers(
+        self.cnxn, self.services.user, [111, 222])
+    self.assertEqual([111, 222], actual)
+
+  def testParentMasksChild(self):
+    """When two accounts linked, only the parent is returned."""
+    self.user2.linked_parent_id = 111
+    actual = tracker_helpers._MergeLinkedMembers(
+        self.cnxn, self.services.user, [111, 222])
+    self.assertEqual([111], actual)
+
+
+class FilterMemberDataTest(unittest.TestCase):
+
+  def setUp(self):
+    services = service_manager.Services(
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService())
+    self.owner_email = 'owner@dom.com'
+    self.committer_email = 'commit@dom.com'
+    self.contributor_email = 'contrib@dom.com'
+    self.indirect_member_email = 'ind@dom.com'
+    self.all_emails = [self.owner_email, self.committer_email,
+                       self.contributor_email, self.indirect_member_email]
+    self.project = services.project.TestAddProject('proj')
+
+  def DoFiltering(self, perms, unsigned_user=False):
+    mr = testing_helpers.MakeMonorailRequest(
+        project=self.project, perms=perms)
+    if not unsigned_user:
+      mr.auth.user_id = 111
+      mr.auth.user_view = testing_helpers.Blank(domain='jrobbins.org')
+    return tracker_helpers._FilterMemberData(
+        mr, [self.owner_email], [self.committer_email],
+        [self.contributor_email], [self.indirect_member_email], mr.project)
+
+  def testUnsignedUser_NormalProject(self):
+    visible_members = self.DoFiltering(
+        permissions.READ_ONLY_PERMISSIONSET, unsigned_user=True)
+    self.assertItemsEqual(
+        [self.owner_email, self.committer_email, self.contributor_email,
+         self.indirect_member_email],
+        visible_members)
+
+  def testUnsignedUser_RestrictedProject(self):
+    self.project.only_owners_see_contributors = True
+    visible_members = self.DoFiltering(
+        permissions.READ_ONLY_PERMISSIONSET, unsigned_user=True)
+    self.assertItemsEqual(
+        [self.owner_email, self.committer_email, self.indirect_member_email],
+        visible_members)
+
+  def testOwnersAndAdminsCanSeeAll_NormalProject(self):
+    visible_members = self.DoFiltering(
+        permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.assertItemsEqual(self.all_emails, visible_members)
+
+    visible_members = self.DoFiltering(
+        permissions.ADMIN_PERMISSIONSET)
+    self.assertItemsEqual(self.all_emails, visible_members)
+
+  def testOwnersAndAdminsCanSeeAll_HubAndSpoke(self):
+    self.project.only_owners_see_contributors = True
+
+    visible_members = self.DoFiltering(
+        permissions.OWNER_ACTIVE_PERMISSIONSET)
+    self.assertItemsEqual(self.all_emails, visible_members)
+
+    visible_members = self.DoFiltering(
+        permissions.ADMIN_PERMISSIONSET)
+    self.assertItemsEqual(self.all_emails, visible_members)
+
+    visible_members = self.DoFiltering(
+        permissions.COMMITTER_ACTIVE_PERMISSIONSET)
+    self.assertItemsEqual(self.all_emails, visible_members)
+
+  def testNonOwnersCanSeeAll_NormalProject(self):
+    visible_members = self.DoFiltering(
+        permissions.COMMITTER_ACTIVE_PERMISSIONSET)
+    self.assertItemsEqual(self.all_emails, visible_members)
+
+    visible_members = self.DoFiltering(
+        permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+    self.assertItemsEqual(self.all_emails, visible_members)
+
+  def testCommittersSeeOnlySameDomain_HubAndSpoke(self):
+    self.project.only_owners_see_contributors = True
+
+    visible_members = self.DoFiltering(
+        permissions.CONTRIBUTOR_ACTIVE_PERMISSIONSET)
+    self.assertItemsEqual(
+        [self.owner_email, self.committer_email, self.indirect_member_email],
+        visible_members)
+
+
+class GetLabelOptionsTest(unittest.TestCase):
+
+  @mock.patch('tracker.tracker_helpers.LabelsNotMaskedByFields')
+  def testGetLabelOptions(self, mockLabelsNotMaskedByFields):
+    mockLabelsNotMaskedByFields.return_value = []
+    config = tracker_pb2.ProjectIssueConfig()
+    custom_perms = []
+    actual = tracker_helpers.GetLabelOptions(config, custom_perms)
+    expected = [
+      {'doc': 'Only users who can edit the issue may access it',
+       'name': 'Restrict-View-EditIssue'},
+      {'doc': 'Only users who can edit the issue may add comments',
+       'name': 'Restrict-AddIssueComment-EditIssue'},
+      {'doc': 'Custom permission CoreTeam is needed to access',
+       'name': 'Restrict-View-CoreTeam'}
+    ]
+    self.assertEqual(expected, actual)
+
+  def testBuildRestrictionChoices(self):
+    choices = tracker_helpers._BuildRestrictionChoices([], [], [])
+    self.assertEqual([], choices)
+
+    choices = tracker_helpers._BuildRestrictionChoices(
+        [], ['Hop', 'Jump'], [])
+    self.assertEqual([], choices)
+
+    freq = [('View', 'B', 'You need permission B to do anything'),
+            ('A', 'B', 'You need B to use A')]
+    choices = tracker_helpers._BuildRestrictionChoices(freq, [], [])
+    expected = [dict(name='Restrict-View-B',
+                     doc='You need permission B to do anything'),
+                dict(name='Restrict-A-B',
+                     doc='You need B to use A')]
+    self.assertListEqual(expected, choices)
+
+    extra_perms = ['Over18', 'Over21']
+    choices = tracker_helpers._BuildRestrictionChoices(
+        [], ['Drink', 'Smoke'], extra_perms)
+    expected = [dict(name='Restrict-Drink-Over18',
+                     doc='Permission Over18 needed to use Drink'),
+                dict(name='Restrict-Drink-Over21',
+                     doc='Permission Over21 needed to use Drink'),
+                dict(name='Restrict-Smoke-Over18',
+                     doc='Permission Over18 needed to use Smoke'),
+                dict(name='Restrict-Smoke-Over21',
+                     doc='Permission Over21 needed to use Smoke')]
+    self.assertListEqual(expected, choices)
+
+
+class FilterKeptAttachmentsTest(unittest.TestCase):
+  def testFilterKeptAttachments(self):
+    comments = [
+        tracker_pb2.IssueComment(
+            is_description=True,
+            attachments=[tracker_pb2.Attachment(attachment_id=1)]),
+        tracker_pb2.IssueComment(),
+        tracker_pb2.IssueComment(
+            is_description=True,
+            attachments=[
+                tracker_pb2.Attachment(attachment_id=2),
+                tracker_pb2.Attachment(attachment_id=3)]),
+        tracker_pb2.IssueComment(),
+        tracker_pb2.IssueComment(
+            approval_id=24,
+            is_description=True,
+            attachments=[tracker_pb2.Attachment(attachment_id=4)])]
+
+    filtered = tracker_helpers.FilterKeptAttachments(
+        True, [1, 2, 3, 4], comments, None)
+    self.assertEqual([2, 3], filtered)
+
+  def testApprovalDescription(self):
+    comments = [
+        tracker_pb2.IssueComment(
+            is_description=True,
+            attachments=[tracker_pb2.Attachment(attachment_id=1)]),
+        tracker_pb2.IssueComment(),
+        tracker_pb2.IssueComment(
+            is_description=True,
+            attachments=[
+                tracker_pb2.Attachment(attachment_id=2),
+                tracker_pb2.Attachment(attachment_id=3)]),
+        tracker_pb2.IssueComment(),
+        tracker_pb2.IssueComment(
+            approval_id=24,
+            is_description=True,
+            attachments=[tracker_pb2.Attachment(attachment_id=4)])]
+
+    filtered = tracker_helpers.FilterKeptAttachments(
+        True, [1, 2, 3, 4], comments, 24)
+    self.assertEqual([4], filtered)
+
+  def testNotAnIssueDescription(self):
+    comments = [
+        tracker_pb2.IssueComment(
+            is_description=True,
+            attachments=[tracker_pb2.Attachment(attachment_id=1)]),
+        tracker_pb2.IssueComment(),
+        tracker_pb2.IssueComment(
+            is_description=True,
+            attachments=[
+                tracker_pb2.Attachment(attachment_id=2),
+                tracker_pb2.Attachment(attachment_id=3)]),
+        tracker_pb2.IssueComment(),
+        tracker_pb2.IssueComment(
+            approval_id=24,
+            is_description=True,
+            attachments=[tracker_pb2.Attachment(attachment_id=4)])]
+
+    filtered = tracker_helpers.FilterKeptAttachments(
+        False, [1, 2, 3, 4], comments, None)
+    self.assertIsNone(filtered)
+
+  def testNoDescriptionsInComments(self):
+    comments = [
+        tracker_pb2.IssueComment(),
+        tracker_pb2.IssueComment()]
+
+    filtered = tracker_helpers.FilterKeptAttachments(
+        True, [1, 2, 3, 4], comments, None)
+    self.assertEqual([], filtered)
+
+  def testNoComments(self):
+    filtered = tracker_helpers.FilterKeptAttachments(
+        True, [1, 2, 3, 4], [], None)
+    self.assertEqual([], filtered)
+
+
+class EnumFieldHelpersTest(unittest.TestCase):
+
+  def test_GetEnumFieldValuesAndDocstrings(self):
+    """We can get all choices for an enum field"""
+    fd = tracker_pb2.FieldDef(
+        field_id=123,
+        project_id=1,
+        field_name='yellow',
+        field_type=tracker_pb2.FieldTypes.ENUM_TYPE)
+    ld_1 = tracker_pb2.LabelDef(
+        label='yellow-submarine', label_docstring='ld_1_docstring')
+    ld_2 = tracker_pb2.LabelDef(
+        label='yellow-tisket', label_docstring='ld_2_docstring')
+    ld_3 = tracker_pb2.LabelDef(
+        label='yellow-basket', label_docstring='ld_3_docstring')
+    ld_4 = tracker_pb2.LabelDef(
+        label='yellow', label_docstring='ld_4_docstring')
+    ld_5 = tracker_pb2.LabelDef(
+        label='not-yellow', label_docstring='ld_5_docstring')
+    ld_6 = tracker_pb2.LabelDef(
+        label='yellow-tasket',
+        label_docstring='ld_6_docstring',
+        deprecated=True)
+    config = tracker_pb2.ProjectIssueConfig(
+        default_template_for_developers=1,
+        default_template_for_users=2,
+        well_known_labels=[ld_1, ld_2, ld_3, ld_4, ld_5, ld_6])
+    actual = tracker_helpers._GetEnumFieldValuesAndDocstrings(fd, config)
+    # Expect to omit labels `yellow` and `not-yellow` due to prefix mismatch
+    # Also expect to omit label `yellow-tasket` because it's deprecated
+    expected = [
+        ('submarine', 'ld_1_docstring'), ('tisket', 'ld_2_docstring'),
+        ('basket', 'ld_3_docstring')
+    ]
+    self.assertEqual(expected, actual)
+
+
+class CreateIssueHelpersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.cnxn = 'fake cnxn'
+
+    self.project_member = self.services.user.TestAddUser(
+        'user_1@example.com', 111)
+    self.project_group_member = self.services.user.TestAddUser(
+        'group@example.com', 999)
+    self.project = self.services.project.TestAddProject(
+        'proj',
+        project_id=789,
+        committer_ids=[
+            self.project_member.user_id, self.project_group_member.user_id
+        ])
+    self.no_project_user = self.services.user.TestAddUser(
+        'user_2@example.com', 222)
+    self.config = fake.MakeTestConfig(self.project.project_id, [], [])
+    self.int_fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None, '', False,
+        False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.int_fd.max_value = 999
+    self.config.field_defs = [self.int_fd]
+    self.status_1 = tracker_pb2.StatusDef(
+        status='New', means_open=True, status_docstring='status_1 docstring')
+    self.config.well_known_statuses = [self.status_1]
+    self.component_def_1 = tracker_pb2.ComponentDef(
+        component_id=1, path='compFOO')
+    self.component_def_2 = tracker_pb2.ComponentDef(
+        component_id=2, path='deprecated', deprecated=True)
+    self.config.component_defs = [self.component_def_1, self.component_def_2]
+    self.services.config.StoreConfig('cnxn', self.config)
+    self.services.usergroup.TestAddGroupSettings(999, 'group@example.com')
+
+  def testAssertValidIssueForCreate_Valid(self):
+    input_issue = tracker_pb2.Issue(
+        summary='sum',
+        status='New',
+        owner_id=111,
+        project_id=789,
+        component_ids=[1],
+        cc_ids=[999])
+    tracker_helpers.AssertValidIssueForCreate(
+        self.cnxn, self.services, input_issue, 'nonempty description')
+
+  def testAssertValidIssueForCreate_ValidatesOwner(self):
+    input_issue = tracker_pb2.Issue(
+        summary='sum', status='New', owner_id=222, project_id=789)
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 'Issue owner must be a project member'):
+      tracker_helpers.AssertValidIssueForCreate(
+          self.cnxn, self.services, input_issue, 'nonempty description')
+    input_issue.owner_id = 333
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 'Issue owner user ID not found'):
+      tracker_helpers.AssertValidIssueForCreate(
+          self.cnxn, self.services, input_issue, 'nonempty description')
+    input_issue.owner_id = 999
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 'Issue owner cannot be a user group'):
+      tracker_helpers.AssertValidIssueForCreate(
+          self.cnxn, self.services, input_issue, 'nonempty description')
+
+  def testAssertValidIssueForCreate_ValidatesSummary(self):
+    input_issue = tracker_pb2.Issue(
+        summary='', status='New', owner_id=111, project_id=789)
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 'Summary is required'):
+      tracker_helpers.AssertValidIssueForCreate(
+          self.cnxn, self.services, input_issue, 'nonempty description')
+      input_issue.summary = '   '
+      tracker_helpers.AssertValidIssueForCreate(
+          self.cnxn, self.services, input_issue, 'nonempty description')
+
+  def testAssertValidIssueForCreate_ValidatesDescription(self):
+    input_issue = tracker_pb2.Issue(
+        summary='sum', status='New', owner_id=111, project_id=789)
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 'Description is required'):
+      tracker_helpers.AssertValidIssueForCreate(
+          self.cnxn, self.services, input_issue, '')
+      tracker_helpers.AssertValidIssueForCreate(
+          self.cnxn, self.services, input_issue, '    ')
+
+  def testAssertValidIssueForCreate_ValidatesFieldDef(self):
+    fv = tracker_bizobj.MakeFieldValue(
+        self.int_fd.field_id, 1000, None, None, None, None, False)
+    input_issue = tracker_pb2.Issue(
+        summary='sum',
+        status='New',
+        owner_id=111,
+        project_id=789,
+        field_values=[fv])
+    with self.assertRaises(exceptions.InputException):
+      tracker_helpers.AssertValidIssueForCreate(
+          self.cnxn, self.services, input_issue, 'nonempty description')
+
+  def testAssertValidIssueForCreate_ValidatesStatus(self):
+    input_issue = tracker_pb2.Issue(
+        summary='sum', status='DNE_status', owner_id=111, project_id=789)
+
+    def mock_status_lookup(*_args, **_kwargs):
+      return None
+
+    self.services.config.LookupStatusID = mock_status_lookup
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 'Undefined status: DNE_status'):
+      tracker_helpers.AssertValidIssueForCreate(
+          self.cnxn, self.services, input_issue, 'nonempty description')
+
+  def testAssertValidIssueForCreate_ValidatesComponents(self):
+    # Tests an undefined component.
+    input_issue = tracker_pb2.Issue(
+        summary='',
+        status='New',
+        owner_id=111,
+        project_id=789,
+        component_ids=[3])
+    with self.assertRaisesRegexp(
+        exceptions.InputException,
+        'Undefined or deprecated component with id: 3'):
+      tracker_helpers.AssertValidIssueForCreate(
+          self.cnxn, self.services, input_issue, 'nonempty description')
+
+    # Tests a deprecated component.
+    input_issue = tracker_pb2.Issue(
+        summary='',
+        status='New',
+        owner_id=111,
+        project_id=789,
+        component_ids=[self.component_def_2.component_id])
+    with self.assertRaisesRegexp(
+        exceptions.InputException,
+        'Undefined or deprecated component with id: 2'):
+      tracker_helpers.AssertValidIssueForCreate(
+          self.cnxn, self.services, input_issue, 'nonempty description')
+
+  def testAssertValidIssueForCreate_ValidatesUsers(self):
+    user_fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None, '', False,
+        False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.services.config.TestAddFieldDef(user_fd)
+
+    input_issue = tracker_pb2.Issue(
+        summary='sum',
+        status='New',
+        owner_id=111,
+        project_id=789,
+        cc_ids=[123],
+        field_values=[
+            tracker_bizobj.MakeFieldValue(
+                user_fd.field_id, None, None, 124, None, None, False)
+        ])
+    copied_issue = copy.deepcopy(input_issue)
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 r'users/123: .+\nusers/124: .+'):
+      tracker_helpers.AssertValidIssueForCreate(
+          self.cnxn, self.services, input_issue, 'nonempty description')
+    self.assertEqual(input_issue, copied_issue)
+
+    self.services.user.TestAddUser('a@test.com', 123)
+    self.services.user.TestAddUser('a@test.com', 124)
+    tracker_helpers.AssertValidIssueForCreate(
+        self.cnxn, self.services, input_issue, 'nonempty description')
+    self.assertEqual(input_issue, copied_issue)
+
+
+class ModifyIssuesHelpersTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        project=fake.ProjectService(),
+        config=fake.ConfigService(),
+        issue=fake.IssueService(),
+        issue_star=fake.IssueStarService(),
+        user=fake.UserService(),
+        usergroup=fake.UserGroupService())
+    self.cnxn = 'fake cnxn'
+
+    self.project_member = self.services.user.TestAddUser(
+        'user_1@example.com', 111)
+    self.project = self.services.project.TestAddProject(
+        'proj', project_id=789, committer_ids=[self.project_member.user_id])
+    self.no_project_user = self.services.user.TestAddUser(
+        'user_2@example.com', 222)
+
+    self.config = fake.MakeTestConfig(self.project.project_id, [], [])
+    self.int_fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.INT_TYPE, None, '', False,
+        False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.int_fd.max_value = 999
+    self.config.field_defs = [self.int_fd]
+    self.services.config.StoreConfig('cnxn', self.config)
+
+  def testApplyAllIssueChanges(self):
+    issue_delta_pairs = []
+    no_change_iid = 78942
+
+    expected_issues_to_update = {}
+    expected_amendments = {}
+    expected_imp_amendments = {}
+    expected_old_owners = {}
+    expected_old_statuses = {}
+    expected_old_components = {}
+    expected_merged_from_add = {}
+    expected_new_starrers = {}
+
+    issue_main = _Issue('proj', 100)
+    issue_main_ref = ('proj', issue_main.local_id)
+    issue_main.owner_id = 999
+    issue_main.cc_ids = [111, 222]
+    issue_main.labels = ['dont_touch', 'remove_me']
+
+    expected_main = copy.deepcopy(issue_main)
+    expected_main.owner_id = 888
+    expected_main.cc_ids = [111, 333]
+    expected_main.labels = ['dont_touch', 'add_me']
+    expected_amendments[issue_main.issue_id] = [
+        tracker_bizobj.MakeOwnerAmendment(888, 999),
+        tracker_bizobj.MakeCcAmendment([333], [222]),
+        tracker_bizobj.MakeLabelsAmendment(['add_me'], ['remove_me'])
+    ]
+    expected_old_owners[issue_main.issue_id] = 999
+
+    # blocked_on issues changes setup.
+    bo_add = _Issue('proj', 1)
+    self.services.issue.TestAddIssue(bo_add)
+    expected_bo_add = copy.deepcopy(bo_add)
+    # All impacted issues should be fetched within ApplyAllIssueChanges
+    # directly from the DB, skipping cache with `use_cache=False` in GetIssue().
+    # So we expect these issues to have assume_stale=False.
+    expected_bo_add.assume_stale = False
+    expected_bo_add.blocking_iids = [issue_main.issue_id]
+    expected_issues_to_update[expected_bo_add.issue_id] = expected_bo_add
+    expected_imp_amendments[bo_add.issue_id] = [
+        tracker_bizobj.MakeBlockingAmendment(
+            [issue_main_ref], [], default_project_name='proj')
+    ]
+
+    bo_remove = _Issue('proj', 2)
+    bo_remove.blocking_iids = [issue_main.issue_id]
+    self.services.issue.TestAddIssue(bo_remove)
+    expected_bo_remove = copy.deepcopy(bo_remove)
+    expected_bo_remove.assume_stale = False
+    expected_bo_remove.blocking_iids = []
+    expected_issues_to_update[expected_bo_remove.issue_id] = expected_bo_remove
+    expected_imp_amendments[bo_remove.issue_id] = [
+        tracker_bizobj.MakeBlockingAmendment(
+            [], [issue_main_ref], default_project_name='proj')
+    ]
+
+    issue_main.blocked_on_iids = [no_change_iid, bo_remove.issue_id]
+    # By default new blocked_on issues that appear in blocked_on_iids
+    # with no prior rank associated with it are un-ranked and assigned rank 0.
+    # See SortBlockedOn in issue_svc.py.
+    issue_main.blocked_on_ranks = [0, 0]
+    expected_main.blocked_on_iids = [no_change_iid, bo_add.issue_id]
+    expected_main.blocked_on_ranks = [0, 0]
+    expected_amendments[issue_main.issue_id].append(
+        tracker_bizobj.MakeBlockedOnAmendment(
+            [('proj', bo_add.local_id)], [('proj', bo_remove.local_id)],
+            default_project_name='proj'))
+
+    # blocking_issues changes setup.
+    b_add = _Issue('proj', 3)
+    self.services.issue.TestAddIssue(b_add)
+    expected_b_add = copy.deepcopy(b_add)
+    expected_b_add.assume_stale = False
+    expected_b_add.blocked_on_iids = [issue_main.issue_id]
+    expected_b_add.blocked_on_ranks = [0]
+    expected_issues_to_update[expected_b_add.issue_id] = expected_b_add
+    expected_imp_amendments[b_add.issue_id] = [
+        tracker_bizobj.MakeBlockedOnAmendment(
+            [issue_main_ref], [], default_project_name='proj')
+    ]
+
+    b_remove = _Issue('proj', 4)
+    b_remove.blocked_on_iids = [issue_main.issue_id]
+    self.services.issue.TestAddIssue(b_remove)
+    expected_b_remove = copy.deepcopy(b_remove)
+    expected_b_remove.assume_stale = False
+    expected_b_remove.blocked_on_iids = []
+    # Test we can process delta changes and impact changes.
+    delta_b_remove = tracker_pb2.IssueDelta(labels_add=['more_chickens'])
+    expected_b_remove.labels = ['more_chickens']
+    issue_delta_pairs.append((b_remove, delta_b_remove))
+    expected_issues_to_update[expected_b_remove.issue_id] = expected_b_remove
+    expected_imp_amendments[b_remove.issue_id] = [
+        tracker_bizobj.MakeBlockedOnAmendment(
+            [], [issue_main_ref], default_project_name='proj')
+    ]
+    expected_amendments[b_remove.issue_id] = [
+        tracker_bizobj.MakeLabelsAmendment(['more_chickens'], [])
+    ]
+
+    issue_main.blocking_iids = [no_change_iid, b_remove.issue_id]
+    expected_main.blocking_iids = [no_change_iid, b_add.issue_id]
+    expected_amendments[issue_main.issue_id].append(
+        tracker_bizobj.MakeBlockingAmendment(
+            [('proj', b_add.local_id)], [('proj', b_remove.local_id)],
+            default_project_name='proj'))
+
+    # Merged issues changes setup.
+    merge_remove = _Issue('proj', 5)
+    self.services.issue.TestAddIssue(merge_remove)
+    expected_merge_remove = copy.deepcopy(merge_remove)
+    expected_merge_remove.assume_stale = False
+    expected_issues_to_update[
+        expected_merge_remove.issue_id] = expected_merge_remove
+    expected_imp_amendments[merge_remove.issue_id] = [
+        tracker_bizobj.MakeMergedIntoAmendment(
+            [], [issue_main_ref], default_project_name='proj')
+    ]
+
+    merge_add = _Issue('proj', 6)
+    self.services.issue.TestAddIssue(merge_add)
+    expected_merge_add = copy.deepcopy(merge_add)
+    expected_merge_add.assume_stale = False
+    # We are adding 333 and removing 222 in issue_main with delta_main.
+    expected_merge_add.cc_ids = [expected_main.owner_id, 333, 111]
+    expected_merged_from_add[expected_merge_add.issue_id] = [
+        issue_main.issue_id
+    ]
+
+    expected_imp_amendments[merge_add.issue_id] = [
+        tracker_bizobj.MakeCcAmendment(expected_merge_add.cc_ids, []),
+        tracker_bizobj.MakeMergedIntoAmendment(
+            [issue_main_ref], [], default_project_name='proj')
+    ]
+    # We are merging issue_main into merge_add, so issue_main's starrers
+    # should be merged into merge_add's starrers.
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, None, issue_main.issue_id, 111, True)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, None, issue_main.issue_id, 222, True)
+    expected_merge_add.star_count = 2
+    expected_new_starrers[merge_add.issue_id] = [222, 111]
+
+    expected_issues_to_update[expected_merge_add.issue_id] = expected_merge_add
+
+
+    issue_main.merged_into = merge_remove.issue_id
+    expected_main.merged_into = merge_add.issue_id
+    expected_amendments[issue_main.issue_id].append(
+        tracker_bizobj.MakeMergedIntoAmendment(
+            [('proj', merge_add.local_id)], [('proj', merge_remove.local_id)],
+            default_project_name='proj'))
+
+    self.services.issue.TestAddIssue(issue_main)
+    expected_issues_to_update[expected_main.issue_id] = expected_main
+
+
+    # Issues we'll put in delta_main.*_remove fields that aren't in issue_main.
+    # These issues should not show up in issues_to_update.
+    missing_1 = _Issue('proj', 404)
+    expected_missing_1 = copy.deepcopy(missing_1)
+    expected_missing_1.assume_stale = False
+    self.services.issue.TestAddIssue(missing_1)
+    missing_2 = _Issue('proj', 405)
+    self.services.issue.TestAddIssue(missing_2)
+    expected_missing_2 = copy.deepcopy(missing_2)
+    expected_missing_2.assume_stale = False
+
+    delta_main = tracker_pb2.IssueDelta(
+        owner_id=888,
+        cc_ids_remove=[222, 404], cc_ids_add=[333],
+        labels_remove=['remove_me', 'remove_404'], labels_add=['add_me'],
+        merged_into=merge_add.issue_id,
+        blocked_on_add=[bo_add.issue_id],
+        blocked_on_remove=[bo_remove.issue_id, missing_1.issue_id],
+        blocking_add=[b_add.issue_id],
+        blocking_remove=[b_remove.issue_id, missing_2.issue_id])
+    issue_delta_pairs.append((issue_main, delta_main))
+
+    actual_tuple = tracker_helpers.ApplyAllIssueChanges(
+        self.cnxn, issue_delta_pairs, self.services)
+
+    expected_tuple = tracker_helpers._IssueChangesTuple(
+        expected_issues_to_update, expected_merged_from_add,
+        expected_amendments, expected_imp_amendments, expected_old_owners,
+        expected_old_statuses, expected_old_components, expected_new_starrers)
+    self.assertEqual(actual_tuple, expected_tuple)
+
+    self.assertEqual(missing_1, expected_missing_1)
+    self.assertEqual(missing_2, expected_missing_2)
+
+  def testApplyAllIssueChanges_NOOP(self):
+    """Check we can ignore issue-delta pairs that are NOOP."""
+    noop_issue = _Issue('proj', 1)
+    bo_add_noop = _Issue('proj', 2)
+    bo_remove_noop = _Issue('proj', 3)
+
+    noop_issue.owner_id = 111
+    noop_issue.cc_ids = [222]
+    noop_issue.blocked_on_iids = [bo_add_noop.issue_id]
+    bo_add_noop.blocking_iids = [noop_issue.issue_id]
+
+    self.services.issue.TestAddIssue(noop_issue)
+    self.services.issue.TestAddIssue(bo_add_noop)
+    self.services.issue.TestAddIssue(bo_remove_noop)
+    expected_noop_issue = copy.deepcopy(noop_issue)
+    noop_delta = tracker_pb2.IssueDelta(
+        owner_id=noop_issue.owner_id,
+        cc_ids_add=noop_issue.cc_ids, cc_ids_remove=[333],
+        blocked_on_add=noop_issue.blocked_on_iids,
+        blocked_on_remove=[bo_remove_noop.issue_id])
+    issue_delta_pairs = [(noop_issue, noop_delta)]
+
+    actual_tuple = tracker_helpers.ApplyAllIssueChanges(
+        self.cnxn, issue_delta_pairs, self.services)
+    expected_tuple = tracker_helpers._IssueChangesTuple(
+        {}, {}, {}, {}, {}, {}, {}, {})
+    self.assertEqual(actual_tuple, expected_tuple)
+
+    self.assertEqual(noop_issue, expected_noop_issue)
+
+  def testApplyAllIssueChanges_Empty(self):
+    issue_delta_pairs = []
+    actual_tuple = tracker_helpers.ApplyAllIssueChanges(
+        self.cnxn, issue_delta_pairs, self.services)
+    expected_tuple = tracker_helpers._IssueChangesTuple(
+        {}, {}, {}, {}, {}, {}, {}, {})
+    self.assertEqual(actual_tuple, expected_tuple)
+
+  def testUpdateClosedTimestamp(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    config.well_known_statuses.append(
+        tracker_pb2.StatusDef(status='New', means_open=True))
+    config.well_known_statuses.append(
+        tracker_pb2.StatusDef(status='Accepted', means_open=True))
+    config.well_known_statuses.append(
+        tracker_pb2.StatusDef(status='Old', means_open=False))
+    config.well_known_statuses.append(
+        tracker_pb2.StatusDef(status='Closed', means_open=False))
+
+    issue = tracker_pb2.Issue()
+    issue.local_id = 1234
+    issue.status = 'New'
+
+    # ensure the default value is undef
+    self.assertTrue(not issue.closed_timestamp)
+
+    # ensure transitioning to the same and other open states
+    # doesn't set the timestamp
+    issue.status = 'New'
+    tracker_helpers.UpdateClosedTimestamp(config, issue, 'New')
+    self.assertTrue(not issue.closed_timestamp)
+
+    issue.status = 'Accepted'
+    tracker_helpers.UpdateClosedTimestamp(config, issue, 'New')
+    self.assertTrue(not issue.closed_timestamp)
+
+    # ensure transitioning from open to closed sets the timestamp
+    issue.status = 'Closed'
+    tracker_helpers.UpdateClosedTimestamp(config, issue, 'Accepted')
+    self.assertTrue(issue.closed_timestamp)
+
+    # ensure that the timestamp is cleared when transitioning from
+    # closed to open
+    issue.status = 'New'
+    tracker_helpers.UpdateClosedTimestamp(config, issue, 'Closed')
+    self.assertTrue(not issue.closed_timestamp)
+
+  def testGroupUniqueDeltaIssues(self):
+    """We can identify unique IssueDeltas and group Issues by their deltas."""
+    issue_1 = _Issue('proj', 1)
+    delta_1 = tracker_pb2.IssueDelta(cc_ids_add=[111])
+
+    issue_2 = _Issue('proj', 2)
+    delta_2 = tracker_pb2.IssueDelta(cc_ids_add=[111], cc_ids_remove=[222])
+
+    issue_3 = _Issue('proj', 3)
+    delta_3 = tracker_pb2.IssueDelta(cc_ids_add=[111])
+
+    issue_4 = _Issue('proj', 4)
+    delta_4 = tracker_pb2.IssueDelta()
+
+    issue_5 = _Issue('proj', 5)
+    delta_5 = tracker_pb2.IssueDelta()
+
+    issue_delta_pairs = [
+        (issue_1, delta_1), (issue_2, delta_2), (issue_3, delta_3),
+        (issue_4, delta_4), (issue_5, delta_5)
+    ]
+    unique_deltas, issues_for_deltas = tracker_helpers.GroupUniqueDeltaIssues(
+        issue_delta_pairs)
+
+    expected_unique_deltas = [delta_1, delta_2, delta_4]
+    self.assertEqual(unique_deltas, expected_unique_deltas)
+    expected_issues_for_deltas = [
+        [issue_1, issue_3], [issue_2], [issue_4, issue_5]
+    ]
+    self.assertEqual(issues_for_deltas, expected_issues_for_deltas)
+
+  def testEnforceAttachmentQuotaLimits(self):
+    self.services.project.TestAddProject('Circe', project_id=798)
+    issue_a1 = _Issue('Circe', 1, project_id=798)
+    delta_a1 = tracker_pb2.IssueDelta()
+
+    issue_a2 = _Issue('Circe', 2, project_id=798)
+    delta_a2 = tracker_pb2.IssueDelta()
+
+    self.services.project.TestAddProject('Patroclus', project_id=788)
+    issue_b1 = _Issue('Patroclus', 1, project_id=788)
+    delta_b1 = tracker_pb2.IssueDelta()
+
+    issue_delta_pairs = [
+        (issue_a1, delta_a1), (issue_a2, delta_a2), (issue_b1, delta_b1)
+    ]
+
+    upload_1 = framework_helpers.AttachmentUpload(
+        'dragon', 'OOOOOO\n', 'text/plain')
+    upload_2 = framework_helpers.AttachmentUpload(
+        'snake', 'ooooo\n', 'text/plain')
+    attachment_uploads = [upload_1, upload_2]
+
+    actual = tracker_helpers._EnforceAttachmentQuotaLimits(
+        self.cnxn, issue_delta_pairs, self.services, attachment_uploads)
+
+    expected = {
+        798: len(upload_1.contents + upload_2.contents) * 2,
+        788: len(upload_1.contents + upload_2.contents)
+    }
+    self.assertEqual(actual, expected)
+
+  @mock.patch('tracker.tracker_constants.ISSUE_ATTACHMENTS_QUOTA_HARD', 1)
+  def testEnforceAttachmentQuotaLimits_Exceeded(self):
+    self.services.project.TestAddProject('Circe', project_id=798)
+    issue_a1 = _Issue('Circe', 1, project_id=798)
+    delta_a1 = tracker_pb2.IssueDelta()
+
+    issue_a2 = _Issue('Circe', 2, project_id=798)
+    delta_a2 = tracker_pb2.IssueDelta()
+
+    self.services.project.TestAddProject('Patroclus', project_id=788)
+    issue_b1 = _Issue('Patroclus', 1, project_id=788)
+    delta_b1 = tracker_pb2.IssueDelta()
+
+    issue_delta_pairs = [
+        (issue_a1, delta_a1), (issue_a2, delta_a2), (issue_b1, delta_b1)
+    ]
+
+    upload_1 = framework_helpers.AttachmentUpload(
+        'dragon', 'OOOOOO\n', 'text/plain')
+    upload_2 = framework_helpers.AttachmentUpload(
+        'snake', 'ooooo\n', 'text/plain')
+    attachment_uploads = [upload_1, upload_2]
+
+    with self.assertRaisesRegexp(exceptions.OverAttachmentQuota,
+                                 r'.+ project Patroclus\n.+ project Circe'):
+      tracker_helpers._EnforceAttachmentQuotaLimits(
+          self.cnxn, issue_delta_pairs, self.services, attachment_uploads)
+
+  def testAssertIssueChangesValid_Valid(self):
+    """We can assert when deltas are valid for issues."""
+    impacted_issue = _Issue('chicken', 101)
+    self.services.issue.TestAddIssue(impacted_issue)
+
+    issue_1 = _Issue('chicken', 1)
+    self.services.issue.TestAddIssue(issue_1)
+    delta_1 = tracker_pb2.IssueDelta(
+        merged_into=impacted_issue.issue_id, status='Duplicate')
+    exp_d1 = copy.deepcopy(delta_1)
+
+    issue_2 = _Issue('chicken', 2)
+    self.services.issue.TestAddIssue(issue_2)
+    delta_2 = tracker_pb2.IssueDelta(blocked_on_add=[impacted_issue.issue_id])
+    exp_d2 = copy.deepcopy(delta_2)
+
+    issue_3 = _Issue('chicken', 3)
+    self.services.issue.TestAddIssue(issue_3)
+    delta_3 = tracker_pb2.IssueDelta()
+    exp_d3 = copy.deepcopy(delta_3)
+
+    issue_4 = _Issue('chicken', 4)
+    self.services.issue.TestAddIssue(issue_4)
+    delta_4 = tracker_pb2.IssueDelta(owner_id=self.project_member.user_id)
+    exp_d4 = copy.deepcopy(delta_4)
+
+    issue_5 = _Issue('chicken', 5)
+    self.services.issue.TestAddIssue(issue_5)
+    fv = tracker_bizobj.MakeFieldValue(
+        self.int_fd.field_id, 998, None, None, None, None, False)
+    delta_5 = tracker_pb2.IssueDelta(field_vals_add=[fv])
+    exp_d5 = copy.deepcopy(delta_5)
+
+    issue_6 = _Issue('chicken', 6)
+    self.services.issue.TestAddIssue(issue_6)
+    delta_6 = tracker_pb2.IssueDelta(
+        summary='  ' + 's' * tracker_constants.MAX_SUMMARY_CHARS + '  ')
+    exp_d6 = copy.deepcopy(delta_6)
+
+    issue_7 = _Issue('chicken', 7)
+    self.services.issue.TestAddIssue(issue_7)
+    issue_8 = _Issue('chicken', 8)
+    self.services.issue.TestAddIssue(issue_8)
+
+    # We are fine with duplicate/consistent deltas.
+    delta_7 = tracker_pb2.IssueDelta(blocked_on_add=[issue_8.issue_id])
+    exp_d7 = copy.deepcopy(delta_7)
+    delta_8 = tracker_pb2.IssueDelta(blocking_add=[issue_7.issue_id])
+    exp_d8 = copy.deepcopy(delta_8)
+
+    issue_9 = _Issue('chicken', 9)
+    self.services.issue.TestAddIssue(issue_9)
+    issue_10 = _Issue('chicken', 10)
+    self.services.issue.TestAddIssue(issue_10)
+
+    delta_9 = tracker_pb2.IssueDelta(blocked_on_remove=[issue_10.issue_id])
+    exp_d9 = copy.deepcopy(delta_9)
+    delta_10 = tracker_pb2.IssueDelta(blocking_remove=[issue_9.issue_id])
+    exp_d10 = copy.deepcopy(delta_10)
+
+    issue_11 = _Issue('chicken', 11)
+    user_fd = tracker_bizobj.MakeFieldDef(
+        123, 789, 'CPU', tracker_pb2.FieldTypes.USER_TYPE, None, '', False,
+        False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.services.config.TestAddFieldDef(user_fd)
+    a_user = self.services.user.TestAddUser('a_user@test.com', 123)
+    delta_11 = tracker_pb2.IssueDelta(
+        cc_ids_add=[222],
+        field_vals_add=[
+            tracker_bizobj.MakeFieldValue(
+                user_fd.field_id, None, None, a_user.user_id, None, None, False)
+        ])
+    exp_d11 = copy.deepcopy(delta_11)
+
+    issue_delta_pairs = [
+        (issue_1, delta_1), (issue_2, delta_2), (issue_3, delta_3),
+        (issue_4, delta_4), (issue_5, delta_5), (issue_6, delta_6),
+        (issue_7, delta_7), (issue_8, delta_8), (issue_9, delta_9),
+        (issue_10, delta_10), (issue_11, delta_11)
+    ]
+    comment = '   ' + 'c' * tracker_constants.MAX_COMMENT_CHARS + '  '
+    tracker_helpers._AssertIssueChangesValid(
+        self.cnxn, issue_delta_pairs, self.services, comment_content=comment)
+
+    # Check we can handle None `comment_content`.
+    tracker_helpers._AssertIssueChangesValid(
+        self.cnxn, issue_delta_pairs, self.services)
+    self.assertEqual(
+        [
+            exp_d1, exp_d2, exp_d3, exp_d4, exp_d5, exp_d6, exp_d7, exp_d8,
+            exp_d9, exp_d10, exp_d11
+        ], [
+            delta_1, delta_2, delta_3, delta_4, delta_5, delta_6, delta_7,
+            delta_8, delta_9, delta_10, delta_11
+        ])
+
+  def testAssertIssueChangesValid_RequiredField(self):
+    """Asserts fields and requried fields.."""
+    issue_1 = _Issue('chicken', 1)
+    self.services.issue.TestAddIssue(issue_1)
+    delta_1 = tracker_pb2.IssueDelta()
+    exp_d1 = copy.deepcopy(delta_1)
+
+    required_fd = tracker_bizobj.MakeFieldDef(
+        124, 789, 'StrField', tracker_pb2.FieldTypes.STR_TYPE, None, '', True,
+        False, False, None, None, '', False, '', '',
+        tracker_pb2.NotifyTriggers.NEVER, 'no_action', 'doc', False)
+    self.services.config.TestAddFieldDef(required_fd)
+
+    issue_delta_pairs = [(issue_1, delta_1)]
+    comment = 'just a plain comment'
+    tracker_helpers._AssertIssueChangesValid(
+        self.cnxn, issue_delta_pairs, self.services, comment_content=comment)
+
+    # Check we can handle adding a field value when issue is in invalid state.
+    fv = tracker_bizobj.MakeFieldValue(
+        self.int_fd.field_id, 998, None, None, None, None, False)
+    delta_2 = tracker_pb2.IssueDelta(field_vals_add=[fv])
+    exp_d2 = copy.deepcopy(delta_2)
+    tracker_helpers._AssertIssueChangesValid(
+        self.cnxn, issue_delta_pairs, self.services)
+    self.assertEqual([exp_d1, exp_d2], [delta_1, delta_2])
+
+  def testAssertIssueChangesValid_Invalid(self):
+    """We can raise exceptions when deltas are not valid for issues. """
+
+    def getRef(issue):
+      return '%s:%d' % (issue.project_name, issue.local_id)
+
+    issue_delta_pairs = []
+    expected_err_msgs = []
+
+    comment = 'c' * (tracker_constants.MAX_COMMENT_CHARS + 1)
+    expected_err_msgs.append('Comment is too long.')
+
+    issue_1 = _Issue('chicken', 1)
+    self.services.issue.TestAddIssue(issue_1)
+    issue_1_ref = getRef(issue_1)
+
+    delta_1 = tracker_pb2.IssueDelta(
+        merged_into=issue_1.issue_id,
+        blocked_on_add=[issue_1.issue_id],
+        summary='',
+        status='',
+        cc_ids_add=[9876])
+
+    issue_delta_pairs.append((issue_1, delta_1))
+    expected_err_msgs.extend(
+        [
+            ('%s: MERGED type statuses must accompany mergedInto values.') %
+            issue_1_ref,
+            '%s: Cannot merge an issue into itself.' % issue_1_ref,
+            '%s: Cannot block an issue on itself.' % issue_1_ref,
+            'users/9876: User does not exist.',
+            '%s: Summary required.' % issue_1_ref,
+            '%s: Status is required.' % issue_1_ref
+        ])
+
+    issue_2 = _Issue('chicken', 2)
+    self.services.issue.TestAddIssue(issue_2)
+    issue_2_ref = getRef(issue_2)
+
+    fv = tracker_bizobj.MakeFieldValue(
+        self.int_fd.field_id, 1000, None, None, None, None, False)
+    delta_2 = tracker_pb2.IssueDelta(
+        status='Duplicate',
+        blocking_add=[issue_2.issue_id],
+        summary='s' * (tracker_constants.MAX_SUMMARY_CHARS + 1),
+        owner_id=self.no_project_user.user_id,
+        field_vals_add=[fv])
+    issue_delta_pairs.append((issue_2, delta_2))
+
+    expected_err_msgs.extend(
+        [
+            ('%s: MERGED type statuses must accompany mergedInto values.') %
+            issue_2_ref,
+            '%s: Cannot block an issue on itself.' % issue_2_ref,
+            '%s: Issue owner must be a project member.' % issue_2_ref,
+            '%s: Summary is too long.' % issue_2_ref,
+            '%s: Error for %r: Value must be <= 999.' % (issue_2_ref, fv)
+        ])
+
+    issue_3 = _Issue('chicken', 3)
+    issue_3.status = 'Duplicate'
+    issue_3.merged_into = 78911
+    self.services.issue.TestAddIssue(issue_3)
+    issue_3_ref = getRef(issue_3)
+    delta_3 = tracker_pb2.IssueDelta(
+        status='Available', merged_into_external='b/123')
+    issue_delta_pairs.append((issue_3, delta_3))
+    expected_err_msgs.append(
+        '%s: MERGED type statuses must accompany mergedInto values.' %
+        issue_3_ref)
+
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 '\n'.join(expected_err_msgs)):
+      tracker_helpers._AssertIssueChangesValid(
+          self.cnxn, issue_delta_pairs, self.services, comment_content=comment)
+
+  def testAssertIssueChangesValid_ConflictingDeltas(self):
+
+    def getRef(issue):
+      return '%s:%d' % (issue.project_name, issue.local_id)
+
+    expected_err_msgs = []
+    issue_3 = _Issue('chicken', 3)
+    self.services.issue.TestAddIssue(issue_3)
+    issue_3_ref = getRef(issue_3)
+    issue_4 = _Issue('chicken', 4)
+    self.services.issue.TestAddIssue(issue_4)
+    issue_4_ref = getRef(issue_4)
+    issue_5 = _Issue('chicken', 5)
+    self.services.issue.TestAddIssue(issue_5)
+    issue_5_ref = getRef(issue_5)
+    issue_6 = _Issue('chicken', 6)
+    self.services.issue.TestAddIssue(issue_6)
+    issue_6_ref = getRef(issue_6)
+    issue_7 = _Issue('chicken', 7)
+    self.services.issue.TestAddIssue(issue_7)
+    issue_7_ref = getRef(issue_7)
+
+    delta_3 = tracker_pb2.IssueDelta(
+        blocking_add=[issue_4.issue_id],
+        blocked_on_add=[issue_5.issue_id, issue_6.issue_id])
+
+    delta_4 = tracker_pb2.IssueDelta(
+        blocked_on_remove=[issue_3.issue_id], blocking_add=[issue_5.issue_id])
+    expected_err_msgs.append(
+        'Changes for %s conflict for %s' % (issue_4_ref, issue_3_ref))
+
+    delta_5 = tracker_pb2.IssueDelta(
+        blocking_remove=[issue_3.issue_id],
+        blocked_on_remove=[issue_4.issue_id])
+    expected_err_msgs.append(
+        'Changes for %s conflict for %s, %s' %
+        (issue_5_ref, issue_3_ref, issue_4_ref))
+
+    delta_6 = tracker_pb2.IssueDelta(blocking_remove=[issue_3.issue_id])
+    expected_err_msgs.append(
+        'Changes for %s conflict for %s' % (issue_6_ref, issue_3_ref))
+
+    impacted_issue = _Issue('chicken', 11)
+    self.services.issue.TestAddIssue(impacted_issue)
+    impacted_issue_ref = getRef(impacted_issue)
+    delta_7 = tracker_pb2.IssueDelta(
+        blocking_remove=[issue_3.issue_id],
+        blocking_add=[issue_3.issue_id],
+        blocked_on_remove=[impacted_issue.issue_id],
+        blocked_on_add=[impacted_issue.issue_id])
+    expected_err_msgs.append(
+        'Changes for %s conflict for %s, %s' %
+        (issue_7_ref, issue_3_ref, impacted_issue_ref))
+
+    issue_delta_pairs = [
+        (issue_3, delta_3),
+        (issue_4, delta_4),
+        (issue_5, delta_5),
+        (issue_6, delta_6),
+        (issue_7, delta_7),
+    ]
+
+    with self.assertRaisesRegexp(exceptions.InputException,
+                                 '\n'.join(expected_err_msgs)):
+      tracker_helpers._AssertIssueChangesValid(
+          self.cnxn, issue_delta_pairs, self.services)
+
+  def testComputeNewCcsFromIssueMerge(self):
+    """We can compute the new ccs to add to a merge-into issue."""
+    target_issue = fake.MakeTestIssue(789, 10, 'Target issue', 'New', 111)
+    source_issue_1 = fake.MakeTestIssue(
+        789, 11, 'Source issue', 'New', 111)  # different restrictions
+    source_issue_2 = fake.MakeTestIssue(
+        789, 12, 'Source issue', 'New', 222)  # same restrictions
+    source_issue_3 = fake.MakeTestIssue(
+        789, 13, 'Source issue', 'New', 222)  # no restrictions
+    source_issue_4 = fake.MakeTestIssue(
+        789, 14, 'Source issue', 'New', 666)  # empty ccs
+    source_issue_5 = fake.MakeTestIssue(
+        788, 15, 'Source issue', 'New', 666)  # different project
+    source_issue_1.cc_ids.append(333)
+    source_issue_2.cc_ids.append(444)
+    source_issue_3.cc_ids.append(555)
+    source_issue_5.cc_ids.append(999)
+
+    target_issue.labels.append('Restrict-View-Chicken')
+    source_issue_1.labels.append('Restrict-View-Cow')
+    source_issue_2.labels.append('Restrict-View-Chicken')
+
+    self.services.issue.TestAddIssue(target_issue)
+    self.services.issue.TestAddIssue(source_issue_1)
+    self.services.issue.TestAddIssue(source_issue_2)
+    self.services.issue.TestAddIssue(source_issue_3)
+    self.services.issue.TestAddIssue(source_issue_4)
+    self.services.issue.TestAddIssue(source_issue_5)
+
+    new_cc_ids = tracker_helpers._ComputeNewCcsFromIssueMerge(
+        target_issue, [source_issue_1, source_issue_2, source_issue_3])
+    self.assertItemsEqual(new_cc_ids, [444, 555, 222])
+
+  def testComputeNewCcsFromIssueMerge_Empty(self):
+    target_issue = fake.MakeTestIssue(789, 10, 'Target issue', 'New', 111)
+    self.services.issue.TestAddIssue(target_issue)
+    new_cc_ids = tracker_helpers._ComputeNewCcsFromIssueMerge(target_issue, [])
+    self.assertItemsEqual(new_cc_ids, [])
+
+  def testEnforceNonMergeStatusDeltas(self):
+    # No updates: user is setting to a non-MERGED status with no
+    # existing merged_into values.
+    issue_1 = _Issue('chicken', 1)
+    self.services.issue.TestAddIssue(issue_1)
+    delta_1 = tracker_pb2.IssueDelta(status='Available')
+    exp_delta_1 = copy.deepcopy(delta_1)
+
+    # No updates: user is setting to a MERGED status. Whether this request
+    # goes through will be handled by _AssertIssueChangesValid().
+    issue_2 = _Issue('chicken', 2)
+    self.services.issue.TestAddIssue(issue_2)
+    delta_2 = tracker_pb2.IssueDelta(status='Duplicate')
+    exp_delta_2 = copy.deepcopy(delta_2)
+
+    # No updates: user is setting to a MERGED status. (This test issue starts
+    # out with a merged_into value but a non-MERGED status. We don't expect
+    # real data to ever be in this state)
+    issue_3 = _Issue('chicken', 3)
+    issue_3.merged_into = 7011
+    self.services.issue.TestAddIssue(issue_3)
+    delta_3 = tracker_pb2.IssueDelta(status='Duplicate')
+    exp_delta_3 = copy.deepcopy(delta_3)
+
+    # No updates: same situation as above.
+    issue_4 = _Issue('chicken', 4)
+    issue_4.merged_into_external = 'b/123'
+    self.services.issue.TestAddIssue(issue_4)
+    delta_4 = tracker_pb2.IssueDelta(status='Duplicate')
+    exp_delta_4 = copy.deepcopy(delta_4)
+
+    # Update delta: user is setting status AWAY from a MERGED status, so we
+    # auto-remove any existing merged_into values.
+    issue_5 = _Issue('chicken', 5)
+    issue_5.merged_into = 7011
+    self.services.issue.TestAddIssue(issue_5)
+    delta_5 = tracker_pb2.IssueDelta(status='Available')
+    exp_delta_5 = copy.deepcopy(delta_5)
+    exp_delta_5.merged_into = 0
+
+    # Update delta: user is setting status AWAY from a MERGED status, so we
+    # auto-remove any existing merged_into values.
+    issue_6 = _Issue('chicken', 6)
+    issue_6.merged_into_external = 'b/123'
+    self.services.issue.TestAddIssue(issue_6)
+    delta_6 = tracker_pb2.IssueDelta(status='Available')
+    exp_delta_6 = copy.deepcopy(delta_6)
+    exp_delta_6.merged_into_external = ''
+
+    # No updates: user is setting to a non-MERGED status while also setting
+    # a merged_into value. This will be rejected down the line by
+    # _AssertIssueChangesValid()
+    issue_7 = _Issue('chicken', 7)
+    issue_7.merged_into = 7011
+    self.services.issue.TestAddIssue(issue_7)
+    delta_7 = tracker_pb2.IssueDelta(
+        merged_into_external='b/123', status='Available')
+    exp_delta_7 = copy.deepcopy(delta_7)
+
+    # No updates: user is setting to a non-MERGED status while also setting
+    # a merged_into value. This will be rejected down the line by
+    # _AssertIssueChangesValid()
+    issue_8 = _Issue('chicken', 8)
+    issue_8.merged_into_external = 'b/123'
+    self.services.issue.TestAddIssue(issue_8)
+    delta_8 = tracker_pb2.IssueDelta(merged_into=8011, status='Available')
+    exp_delta_8 = copy.deepcopy(delta_8)
+
+    pairs = [
+        (issue_1, delta_1), (issue_2, delta_2), (issue_3, delta_3),
+        (issue_4, delta_4), (issue_5, delta_5), (issue_6, delta_6),
+        (issue_7, delta_7), (issue_8, delta_8)
+    ]
+
+    tracker_helpers._EnforceNonMergeStatusDeltas(
+        self.cnxn, pairs, self.services)
+    self.assertEqual(
+        [
+            delta_1, delta_2, delta_3, delta_4, delta_5, delta_6, delta_7,
+            delta_8
+        ], [
+            exp_delta_1, exp_delta_2, exp_delta_3, exp_delta_4, exp_delta_5,
+            exp_delta_6, exp_delta_7, exp_delta_8
+        ])
+
+
+class IssueChangeImpactedIssuesTest(unittest.TestCase):
+  """Tests for the _IssueChangeImpactedIssues class."""
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        issue=fake.IssueService(), issue_star=fake.IssueStarService())
+    self.cnxn = 'fake connection'
+
+  def testComputeAllImpactedIDs(self):
+    tracker = tracker_helpers._IssueChangeImpactedIssues()
+    tracker.blocking_add[78901].append(1)
+    tracker.blocking_remove[78902].append(2)
+    tracker.blocked_on_add[78903].append(1)
+    tracker.blocked_on_remove[78904].append(1)
+    tracker.merged_from_add[78905].append(3)
+    tracker.merged_from_remove[78906].append(3)
+
+    # Repeat a few iids.
+    tracker.blocked_on_remove[78901].append(1)
+    tracker.merged_from_add[78903].append(1)
+
+    actual = tracker.ComputeAllImpactedIIDs()
+    expected = {78901, 78902, 78903, 78904, 78905, 78906}
+    self.assertEqual(actual, expected)
+
+  def testComputeAllImpactedIDs_Empty(self):
+    tracker = tracker_helpers._IssueChangeImpactedIssues()
+    actual = tracker.ComputeAllImpactedIIDs()
+    self.assertEqual(actual, set())
+
+  def testTrackImpactedIssues(self):
+    issue_delta_pairs = []
+
+    issue_1 = _Issue('project', 1)
+    issue_1.merged_into = 78906
+    delta_1 = tracker_pb2.IssueDelta(
+        merged_into=78905,
+        blocked_on_add=[78901, 78902],
+        blocked_on_remove=[78903, 78904],
+    )
+    issue_delta_pairs.append((issue_1, delta_1))
+
+    issue_2 = _Issue('project', 2)
+    issue_2.merged_into = 78905
+    delta_2 = tracker_pb2.IssueDelta(
+        merged_into=78905,  # This should be ignored.
+        blocking_add=[78901, 78902],
+        blocking_remove=[78903, 78904],
+    )
+    issue_delta_pairs.append((issue_2, delta_2))
+
+    issue_3 = _Issue('project', 3)
+    issue_3.merged_into = 78902
+    delta_3 = tracker_pb2.IssueDelta(merged_into=78901)
+    issue_delta_pairs.append((issue_3, delta_3))
+
+    issue_4 = _Issue('project', 4)
+    issue_4.merged_into = 78901
+    delta_4 = tracker_pb2.IssueDelta(
+        merged_into=framework_constants.NO_ISSUE_SPECIFIED)
+    issue_delta_pairs.append((issue_4, delta_4))
+
+    impacted_issues = tracker_helpers._IssueChangeImpactedIssues()
+    for issue, delta in issue_delta_pairs:
+      impacted_issues.TrackImpactedIssues(issue, delta)
+
+    self.assertEqual(
+        impacted_issues.blocking_add, {
+            78901: [issue_1.issue_id],
+            78902: [issue_1.issue_id]
+        })
+    self.assertEqual(
+        impacted_issues.blocking_remove, {
+            78903: [issue_1.issue_id],
+            78904: [issue_1.issue_id]
+        })
+    self.assertEqual(
+        impacted_issues.blocked_on_add, {
+            78901: [issue_2.issue_id],
+            78902: [issue_2.issue_id]
+        })
+    self.assertEqual(
+        impacted_issues.blocked_on_remove, {
+            78903: [issue_2.issue_id],
+            78904: [issue_2.issue_id]
+        })
+    self.assertEqual(
+        impacted_issues.merged_from_add, {
+            78901: [issue_3.issue_id],
+            78905: [issue_1.issue_id],
+        })
+    self.assertEqual(
+        impacted_issues.merged_from_remove, {
+            78901: [issue_4.issue_id],
+            78902: [issue_3.issue_id],
+            78906: [issue_1.issue_id],
+        })
+
+  def testApplyImpactedIssueChanges(self):
+    impacted_tracker = tracker_helpers._IssueChangeImpactedIssues()
+    impacted_issue = _Issue('proj', 1)
+    self.services.issue.TestAddIssue(impacted_issue)
+    impacted_iid = impacted_issue.issue_id
+
+    # Setup.
+    bo_add = _Issue('proj', 2)
+    self.services.issue.TestAddIssue(bo_add)
+    impacted_tracker.blocked_on_add[impacted_iid].append(bo_add.issue_id)
+
+    bo_remove = _Issue('proj', 3)
+    self.services.issue.TestAddIssue(bo_remove)
+    impacted_tracker.blocked_on_remove[impacted_iid].append(
+        bo_remove.issue_id)
+
+    b_add = _Issue('proj', 4)
+    self.services.issue.TestAddIssue(b_add)
+    impacted_tracker.blocking_add[impacted_iid].append(
+        b_add.issue_id)
+
+    b_remove = _Issue('proj', 5)
+    self.services.issue.TestAddIssue(b_remove)
+    impacted_tracker.blocking_remove[impacted_iid].append(
+        b_remove.issue_id)
+
+    m_add = _Issue('proj', 6)
+    m_add.cc_ids = [666, 777]
+    self.services.issue.TestAddIssue(m_add)
+    m_add_no_ccs = _Issue('proj', 7, '', '')
+    self.services.issue.TestAddIssue(m_add_no_ccs)
+    impacted_tracker.merged_from_add[impacted_iid].extend(
+        [m_add.issue_id, m_add_no_ccs.issue_id])
+    # Set up starrers.
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, None, impacted_iid, 111, True)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, None, impacted_iid, 222, True)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, None, m_add.issue_id, 222, True)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, None, m_add.issue_id, 333, True)
+    self.services.issue_star.SetStar(
+        self.cnxn, self.services, None, m_add.issue_id, 444, True)
+
+    m_remove = _Issue('proj', 8)
+    m_remove.cc_ids = [888]
+    self.services.issue.TestAddIssue(m_remove)
+    impacted_tracker.merged_from_remove[impacted_iid].append(
+        m_remove.issue_id)
+
+
+    impacted_issue.cc_ids = [666]
+    impacted_issue.blocked_on_iids = [78404, bo_remove.issue_id]
+    impacted_issue.blocking_iids = [78405, b_remove.issue_id]
+    expected_issue = copy.deepcopy(impacted_issue)
+
+    # Verify.
+    (actual_amendments,
+     actual_new_starrers) = impacted_tracker.ApplyImpactedIssueChanges(
+         self.cnxn, impacted_issue, self.services)
+    expected_amendments = [
+        tracker_bizobj.MakeBlockedOnAmendment(
+            [('proj', bo_add.local_id)],
+            [('proj', bo_remove.local_id)], default_project_name='proj'),
+        tracker_bizobj.MakeBlockingAmendment(
+            [('proj', b_add.local_id)],
+            [('proj', b_remove.local_id)], default_project_name='proj'),
+        tracker_bizobj.MakeCcAmendment([777], []),
+        tracker_bizobj.MakeMergedIntoAmendment(
+            [('proj', m_add.local_id), ('proj', m_add_no_ccs.local_id)],
+            [('proj', m_remove.local_id)], default_project_name='proj')
+        ]
+    self.assertEqual(actual_amendments, expected_amendments)
+    self.assertItemsEqual(actual_new_starrers, [333, 444])
+
+    expected_issue.cc_ids.append(777)
+    expected_issue.blocked_on_iids = [78404, bo_add.issue_id]
+    # By default new blocked_on issues that appear in blocked_on_iids
+    # with no prior rank associated with it are un-ranked and assigned rank 0.
+    # See SortBlockedOn in issue_svc.py.
+    expected_issue.blocked_on_ranks = [0, 0]
+    expected_issue.blocking_iids = [78405, b_add.issue_id]
+    expected_issue.star_count = 4
+    self.assertEqual(impacted_issue, expected_issue)
+
+  def testApplyImpactedIssueChanges_Empty(self):
+    impacted_tracker = tracker_helpers._IssueChangeImpactedIssues()
+    impacted_issue = _Issue('proj', 1)
+    expected_issue = copy.deepcopy(impacted_issue)
+
+    (actual_amendments,
+     actual_new_starrers) = impacted_tracker.ApplyImpactedIssueChanges(
+         self.cnxn, impacted_issue, self.services)
+
+    expected_amendments = []
+    self.assertEqual(actual_amendments, expected_amendments)
+    expected_new_starrers = []
+    self.assertEqual(actual_new_starrers, expected_new_starrers)
+    self.assertEqual(impacted_issue, expected_issue)
+
+  def testApplyImpactedIssueChanges_PartiallyEmptyMergedFrom(self):
+    """We can process merged_from changes when one of the lists is empty."""
+    impacted_tracker = tracker_helpers._IssueChangeImpactedIssues()
+    impacted_issue = _Issue('proj', 1)
+    impacted_iid = impacted_issue.issue_id
+    expected_issue = copy.deepcopy(impacted_issue)
+
+    m_add = _Issue('proj', 2)
+    self.services.issue.TestAddIssue(m_add)
+    impacted_tracker.merged_from_add[impacted_iid].append(
+        m_add.issue_id)
+    # We're leaving impacted_tracker.merged_from_remove empty.
+
+    (actual_amendments,
+     actual_new_starrers) = impacted_tracker.ApplyImpactedIssueChanges(
+         self.cnxn, impacted_issue, self.services)
+
+    expected_amendments = [tracker_bizobj.MakeMergedIntoAmendment(
+            [('proj', m_add.local_id)], [], default_project_name='proj')]
+    self.assertEqual(actual_amendments, expected_amendments)
+    expected_new_starrers = []
+    self.assertEqual(actual_new_starrers, expected_new_starrers)
+    self.assertEqual(impacted_issue, expected_issue)
+
+
+class AssertUsersExistTest(unittest.TestCase):
+
+  def setUp(self):
+    self.cnxn = 'fake cnxn'
+    self.services = service_manager.Services(user=fake.UserService())
+    for user_id in [1, 1001, 1002, 1003, 2001, 2002, 3002]:
+      self.services.user.TestAddUser('test%d' % user_id, user_id, add_user=True)
+
+  def test_AssertUsersExist_Passes(self):
+    existing = [1, 1001, 1002, 1003, 2001, 2002, 3002]
+    with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+      tracker_helpers.AssertUsersExist(
+          self.cnxn, self.services, existing, err_agg)
+
+  def test_AssertUsersExist_Empty(self):
+    with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+      tracker_helpers.AssertUsersExist(
+          self.cnxn, self.services, [], err_agg)
+
+  def test_AssertUsersExist(self):
+    dne_users = [2, 3]
+    existing = [1, 1001, 1002, 1003, 2001, 2002, 3002]
+    all_users = existing + dne_users
+    with self.assertRaisesRegexp(
+        exceptions.InputException,
+        'users/2: User does not exist.\nusers/3: User does not exist.'):
+      with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+        tracker_helpers.AssertUsersExist(
+            self.cnxn, self.services, all_users, err_agg)
diff --git a/tracker/test/tracker_views_test.py b/tracker/test/tracker_views_test.py
new file mode 100644
index 0000000..797b079
--- /dev/null
+++ b/tracker/test/tracker_views_test.py
@@ -0,0 +1,787 @@
+# 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
+
+"""Unittest for issue tracker views."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import logging
+import unittest
+
+import mox
+
+from google.appengine.api import app_identity
+import ezt
+
+from framework import framework_views
+from framework import gcs_helpers
+from framework import template_helpers
+from framework import urls
+from proto import project_pb2
+from proto import tracker_pb2
+from services import service_manager
+from testing import fake
+from testing import testing_helpers
+from tracker import attachment_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+from tracker import tracker_views
+
+
+def _Issue(project_name, local_id, summary, status):
+  issue = tracker_pb2.Issue()
+  issue.project_name = project_name
+  issue.local_id = local_id
+  issue.issue_id = 100000 + local_id
+  issue.summary = summary
+  issue.status = status
+  return issue
+
+
+def _MakeConfig():
+  config = tracker_pb2.ProjectIssueConfig()
+  config.well_known_labels = [
+    tracker_pb2.LabelDef(
+        label='Priority-High', label_docstring='Must be resolved'),
+    tracker_pb2.LabelDef(
+        label='Priority-Low', label_docstring='Can be slipped'),
+    ]
+  config.well_known_statuses.append(tracker_pb2.StatusDef(
+      status='New', means_open=True))
+  config.well_known_statuses.append(tracker_pb2.StatusDef(
+      status='Old', means_open=False))
+  return config
+
+
+class IssueViewTest(unittest.TestCase):
+
+  def setUp(self):
+    self.issue1 = _Issue('proj', 1, 'not too long summary', 'New')
+    self.issue2 = _Issue('proj', 2, 'sum 2', '')
+    self.issue3 = _Issue('proj', 3, 'sum 3', '')
+    self.issue4 = _Issue('proj', 4, 'sum 4', '')
+
+    self.issue1.reporter_id = 1002
+    self.issue1.owner_id = 2002
+    self.issue1.labels.extend(['A', 'B'])
+    self.issue1.derived_labels.extend(['C', 'D'])
+
+    self.issue2.reporter_id = 2002
+    self.issue2.labels.extend(['foo', 'bar'])
+    self.issue2.blocked_on_iids.extend(
+        [self.issue1.issue_id, self.issue3.issue_id])
+    self.issue2.blocking_iids.extend(
+        [self.issue1.issue_id, self.issue4.issue_id])
+    dref = tracker_pb2.DanglingIssueRef()
+    dref.project = 'codesite'
+    dref.issue_id = 5001
+    self.issue2.dangling_blocking_refs.append(dref)
+
+    self.issue3.reporter_id = 3002
+    self.issue3.labels.extend(['Hot'])
+
+    self.issue4.reporter_id = 3002
+    self.issue4.labels.extend(['Foo', 'Bar'])
+
+    self.restricted = _Issue('proj', 7, 'summary 7', '')
+    self.restricted.labels.extend([
+        'Restrict-View-Commit', 'Restrict-View-MyCustomPerm'])
+    self.restricted.derived_labels.extend([
+        'Restrict-AddIssueComment-Commit', 'Restrict-EditIssue-Commit',
+        'Restrict-Action-NeededPerm'])
+
+    self.users_by_id = {
+        0: 'user 0',
+        1002: 'user 1002',
+        2002: 'user 2002',
+        3002: 'user 3002',
+        4002: 'user 4002',
+        }
+
+  def CheckSimpleIssueView(self, config):
+    view1 = tracker_views.IssueView(
+        self.issue1, self.users_by_id, config)
+    self.assertEqual('not too long summary', view1.summary)
+    self.assertEqual('New', view1.status.name)
+    self.assertEqual('user 2002', view1.owner)
+    self.assertEqual('A', view1.labels[0].name)
+    self.assertEqual('B', view1.labels[1].name)
+    self.assertEqual('C', view1.derived_labels[0].name)
+    self.assertEqual('D', view1.derived_labels[1].name)
+    self.assertEqual([], view1.blocked_on)
+    self.assertEqual([], view1.blocking)
+    detail_url = '/p/%s%s?id=%d' % (
+        self.issue1.project_name, urls.ISSUE_DETAIL,
+        self.issue1.local_id)
+    self.assertEqual(detail_url, view1.detail_relative_url)
+    return view1
+
+  def testSimpleIssueView(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    view1 = self.CheckSimpleIssueView(config)
+    self.assertEqual('', view1.status.docstring)
+
+    config.well_known_statuses.append(tracker_pb2.StatusDef(
+        status='New', status_docstring='Issue has not had review yet'))
+    view1 = self.CheckSimpleIssueView(config)
+    self.assertEqual('Issue has not had review yet',
+                     view1.status.docstring)
+    self.assertIsNone(view1.restrictions.has_restrictions)
+    self.assertEqual('', view1.restrictions.view)
+    self.assertEqual('', view1.restrictions.add_comment)
+    self.assertEqual('', view1.restrictions.edit)
+
+  def testIsOpen(self):
+    config = _MakeConfig()
+    view1 = tracker_views.IssueView(
+        self.issue1, self.users_by_id, config)
+    self.assertEqual(ezt.boolean(True), view1.is_open)
+
+    self.issue1.status = 'Old'
+    view1 = tracker_views.IssueView(
+        self.issue1, self.users_by_id, config)
+    self.assertEqual(ezt.boolean(False), view1.is_open)
+
+  def testIssueViewWithRestrictions(self):
+    view = tracker_views.IssueView(
+        self.restricted, self.users_by_id, _MakeConfig())
+    self.assertTrue(view.restrictions.has_restrictions)
+    self.assertEqual('Commit and MyCustomPerm', view.restrictions.view)
+    self.assertEqual('Commit', view.restrictions.add_comment)
+    self.assertEqual('Commit', view.restrictions.edit)
+    self.assertEqual(['Restrict-Action-NeededPerm'], view.restrictions.other)
+    self.assertEqual('Restrict-View-Commit', view.labels[0].name)
+    self.assertTrue(view.labels[0].is_restrict)
+
+
+class RestrictionsViewTest(unittest.TestCase):
+  pass  # TODO(jrobbins): write tests
+
+
+class AttachmentViewTest(unittest.TestCase):
+
+  def setUp(self):
+    self.orig_sign_attachment_id = attachment_helpers.SignAttachmentID
+    attachment_helpers.SignAttachmentID = (
+        lambda aid: 'signed_%d' % aid)
+
+  def tearDown(self):
+    attachment_helpers.SignAttachmentID = self.orig_sign_attachment_id
+
+  def MakeViewAndVerifyFields(
+      self, size, name, mimetype, expected_size_str, expect_viewable):
+    attach_pb = tracker_pb2.Attachment()
+    attach_pb.filesize = size
+    attach_pb.attachment_id = 12345
+    attach_pb.filename = name
+    attach_pb.mimetype = mimetype
+
+    view = tracker_views.AttachmentView(attach_pb, 'proj')
+    self.assertEqual('/images/paperclip.png', view.iconurl)
+    self.assertEqual(expected_size_str, view.filesizestr)
+    dl = 'attachment?aid=12345&signed_aid=signed_12345'
+    self.assertEqual(dl, view.downloadurl)
+    if expect_viewable:
+      self.assertEqual(dl + '&inline=1', view.url)
+      self.assertEqual(dl + '&inline=1&thumb=1', view.thumbnail_url)
+    else:
+      self.assertEqual(None, view.url)
+      self.assertEqual(None, view.thumbnail_url)
+
+  def testNonImage(self):
+    self.MakeViewAndVerifyFields(
+        123, 'file.ext', 'funky/bits', '123 bytes', False)
+
+  def testViewableImage(self):
+    self.MakeViewAndVerifyFields(
+        123, 'logo.gif', 'image/gif', '123 bytes', True)
+
+    self.MakeViewAndVerifyFields(
+        123, 'screenshot.jpg', 'image/jpeg', '123 bytes', True)
+
+  def testHugeImage(self):
+    self.MakeViewAndVerifyFields(
+        18 * 1024 * 1024, 'panorama.png', 'image/jpeg', '18.0 MB', False)
+
+  def testViewableText(self):
+    name = 'hello.c'
+    attach_pb = tracker_pb2.Attachment()
+    attach_pb.filesize = 1234
+    attach_pb.attachment_id = 12345
+    attach_pb.filename = name
+    attach_pb.mimetype = 'text/plain'
+    view = tracker_views.AttachmentView(attach_pb, 'proj')
+
+    view_url = '/p/proj/issues/attachmentText?aid=12345'
+    self.assertEqual(view_url, view.url)
+
+
+class LogoViewTest(unittest.TestCase):
+
+  def setUp(self):
+    self.mox = mox.Mox()
+
+  def tearDown(self):
+    self.mox.UnsetStubs()
+    self.mox.ResetAll()
+
+  def testProjectWithLogo(self):
+    bucket_name = 'testbucket'
+    logo_gcs_id = '123'
+    logo_file_name = 'logo.png'
+    project_pb = project_pb2.MakeProject(
+        'testProject', logo_gcs_id=logo_gcs_id, logo_file_name=logo_file_name)
+
+    self.mox.StubOutWithMock(app_identity, 'get_default_gcs_bucket_name')
+    app_identity.get_default_gcs_bucket_name().AndReturn(bucket_name)
+
+    self.mox.StubOutWithMock(gcs_helpers, 'SignUrl')
+    gcs_helpers.SignUrl(bucket_name,
+        logo_gcs_id + '-thumbnail').AndReturn('signed/url')
+    gcs_helpers.SignUrl(bucket_name, logo_gcs_id).AndReturn('signed/url')
+
+    self.mox.ReplayAll()
+
+    view = tracker_views.LogoView(project_pb)
+    self.mox.VerifyAll()
+    self.assertEqual('logo.png', view.filename)
+    self.assertEqual('image/png', view.mimetype)
+    self.assertEqual('signed/url', view.thumbnail_url)
+    self.assertEqual(
+        'signed/url&response-content-displacement=attachment%3B'
+        '+filename%3Dlogo.png', view.viewurl)
+
+  def testProjectWithNoLogo(self):
+    project_pb = project_pb2.MakeProject('testProject')
+    view = tracker_views.LogoView(project_pb)
+    self.assertEqual('', view.thumbnail_url)
+    self.assertEqual('', view.viewurl)
+
+
+class AmendmentViewTest(unittest.TestCase):
+  pass  # TODO(jrobbins): write tests
+
+
+class ComponentDefViewTest(unittest.TestCase):
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        config=fake.ConfigService())
+    self.services.user.TestAddUser('admin@example.com', 111)
+    self.services.user.TestAddUser('cc@example.com', 222)
+    self.users_by_id = framework_views.MakeAllUserViews(
+      'cnxn', self.services.user, [111, 222])
+    self.services.config.TestAddLabelsDict({'Hot': 1, 'Cold': 2})
+    self.cd = tracker_bizobj.MakeComponentDef(
+      10, 789, 'UI', 'User interface', False,
+      [111], [222], 0, 111, label_ids=[1, 2])
+
+  def testRootComponent(self):
+    view = tracker_views.ComponentDefView(
+       'cnxn', self.services, self.cd, self.users_by_id)
+    self.assertEqual('', view.parent_path)
+    self.assertEqual('UI', view.leaf_name)
+    self.assertEqual('User interface', view.docstring_short)
+    self.assertEqual('admin@example.com', view.admins[0].email)
+    self.assertEqual(['Hot', 'Cold'], view.labels)
+    self.assertEqual('all toplevel active ', view.classes)
+
+  def testNestedComponent(self):
+    self.cd.path = 'UI>Dialogs>Print'
+    view = tracker_views.ComponentDefView(
+       'cnxn', self.services, self.cd, self.users_by_id)
+    self.assertEqual('UI>Dialogs', view.parent_path)
+    self.assertEqual('Print', view.leaf_name)
+    self.assertEqual('User interface', view.docstring_short)
+    self.assertEqual('admin@example.com', view.admins[0].email)
+    self.assertEqual(['Hot', 'Cold'], view.labels)
+    self.assertEqual('all active ', view.classes)
+
+
+class ComponentValueTest(unittest.TestCase):
+  pass  # TODO(jrobbins): write tests
+
+
+class FieldValueViewTest(unittest.TestCase):
+
+  def setUp(self):
+    self.config = tracker_pb2.ProjectIssueConfig()
+    self.estdays_fd = tracker_bizobj.MakeFieldDef(
+        1, 789, 'EstDays', tracker_pb2.FieldTypes.INT_TYPE, None,
+        None, False, False, False, 3, 99, None, False, None, None,
+        None, 'no_action', 'descriptive docstring', False, approval_id=None,
+        is_phase_field=False)
+    self.designdoc_fd = tracker_bizobj.MakeFieldDef(
+        2, 789, 'DesignDoc', tracker_pb2.FieldTypes.STR_TYPE, 'Enhancement',
+        None, False, False, False, None, None, None, False, None, None,
+        None, 'no_action', 'descriptive docstring', False, approval_id=None,
+        is_phase_field=False)
+    self.mtarget_fd = tracker_bizobj.MakeFieldDef(
+        3, 789, 'M-Target', tracker_pb2.FieldTypes.INT_TYPE, 'Enhancement',
+        None, False, False, False, None, None, None, False, None, None,
+        None, 'no_action', 'doc doc', False, approval_id=None,
+        is_phase_field=True)
+    self.config.field_defs = [self.estdays_fd, self.designdoc_fd]
+
+  def testNoValues(self):
+    """We can create a FieldValueView with no values."""
+    values = []
+    derived_values = []
+    estdays_fvv = tracker_views.FieldValueView(
+        self.estdays_fd, self.config, values, derived_values, ['defect'],
+        phase_name='Gate')
+    self.assertEqual('EstDays', estdays_fvv.field_def.field_name)
+    self.assertEqual(3, estdays_fvv.field_def.min_value)
+    self.assertEqual(99, estdays_fvv.field_def.max_value)
+    self.assertEqual([], estdays_fvv.values)
+    self.assertEqual([], estdays_fvv.derived_values)
+
+  def testSomeValues(self):
+    """We can create a FieldValueView with some values."""
+    values = [template_helpers.EZTItem(val=12, docstring=None, idx=0)]
+    derived_values = [template_helpers.EZTItem(val=88, docstring=None, idx=0)]
+    estdays_fvv = tracker_views.FieldValueView(
+        self.estdays_fd, self.config, values, derived_values, ['defect'])
+    self.assertEqual(self.estdays_fd, estdays_fvv.field_def.field_def)
+    self.assertTrue(estdays_fvv.is_editable)
+    self.assertEqual(values, estdays_fvv.values)
+    self.assertEqual(derived_values, estdays_fvv.derived_values)
+    self.assertEqual('', estdays_fvv.phase_name)
+    self.assertEqual(ezt.boolean(False), estdays_fvv.field_def.is_phase_field)
+
+  def testApplicability(self):
+    """We know whether a field should show an editing widget."""
+    # Not the right type and has no values.
+    designdoc_fvv = tracker_views.FieldValueView(
+        self.designdoc_fd, self.config, [], [], ['defect'])
+    self.assertFalse(designdoc_fvv.applicable)
+    self.assertEqual('', designdoc_fvv.phase_name)
+    self.assertEqual(ezt.boolean(False), designdoc_fvv.field_def.is_phase_field)
+
+    # Has a value.
+    designdoc_fvv = tracker_views.FieldValueView(
+        self.designdoc_fd, self.config, ['fake value item'], [], ['defect'])
+    self.assertTrue(designdoc_fvv.applicable)
+
+    # Derived values don't cause editing fields to display.
+    designdoc_fvv = tracker_views.FieldValueView(
+        self.designdoc_fd, self.config, [], ['fake value item'], ['defect'])
+    self.assertFalse(designdoc_fvv.applicable)
+
+    # Applicable to this type of issue.
+    designdoc_fvv = tracker_views.FieldValueView(
+        self.designdoc_fd, self.config, [], [], ['enhancement'])
+    self.assertTrue(designdoc_fvv.applicable)
+
+    # Applicable to some issues in a bulk edit.
+    designdoc_fvv = tracker_views.FieldValueView(
+        self.designdoc_fd, self.config, [], [],
+        ['defect', 'task', 'enhancement'])
+    self.assertTrue(designdoc_fvv.applicable)
+
+    # Applicable to all issues.
+    estdays_fvv = tracker_views.FieldValueView(
+        self.estdays_fd, self.config, [], [], ['enhancement'])
+    self.assertTrue(estdays_fvv.applicable)
+
+    # Explicitly set to be applicable when showing bounce values.
+    designdoc_fvv = tracker_views.FieldValueView(
+        self.designdoc_fd, self.config, [], [], ['defect'],
+        applicable=True)
+    self.assertTrue(designdoc_fvv.applicable)
+
+  def testDisplay(self):
+    """We know when a value (or --) should be shown in the metadata column."""
+    # Not the right type and has no values.
+    designdoc_fvv = tracker_views.FieldValueView(
+        self.designdoc_fd, self.config, [], [], ['defect'])
+    self.assertFalse(designdoc_fvv.display)
+
+    # Has a value.
+    designdoc_fvv = tracker_views.FieldValueView(
+        self.designdoc_fd, self.config, ['fake value item'], [], ['defect'])
+    self.assertTrue(designdoc_fvv.display)
+
+    # Has a derived value.
+    designdoc_fvv = tracker_views.FieldValueView(
+        self.designdoc_fd, self.config, [], ['fake value item'], ['defect'])
+    self.assertTrue(designdoc_fvv.display)
+
+    # Applicable to this type of issue, it will show "--".
+    designdoc_fvv = tracker_views.FieldValueView(
+        self.designdoc_fd, self.config, [], [], ['enhancement'])
+    self.assertTrue(designdoc_fvv.display)
+
+    # Applicable to all issues, it will show "--".
+    estdays_fvv = tracker_views.FieldValueView(
+        self.estdays_fd, self.config, [], [], ['enhancement'])
+    self.assertTrue(estdays_fvv.display)
+
+  def testPhaseField(self):
+    mtarget_fvv = tracker_views.FieldValueView(
+        self.mtarget_fd, self.config, [], [], [], phase_name='Stage')
+    self.assertEqual('Stage', mtarget_fvv.phase_name)
+    self.assertEqual(ezt.boolean(True), mtarget_fvv.field_def.is_phase_field)
+
+
+class FVVFunctionsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.config = tracker_pb2.ProjectIssueConfig()
+    self.estdays_fd = tracker_bizobj.MakeFieldDef(
+        1, 789, 'EstDays', tracker_pb2.FieldTypes.INT_TYPE, None,
+        None, False, False, False, 3, 99, None, False, None, None,
+        None, 'no_action', 'descriptive docstring', False, None, False)
+    self.os_fd = tracker_bizobj.MakeFieldDef(
+        2, 789, 'OS', tracker_pb2.FieldTypes.ENUM_TYPE,
+        'Enhancement', None, False, False, False, None, None, None,
+        False, None, None, None, 'no_action', 'descriptive docstring',
+        False, None, False)
+    self.milestone_fd = tracker_bizobj.MakeFieldDef(
+        3, 789, 'Launch-Milestone', tracker_pb2.FieldTypes.ENUM_TYPE,
+        'Enhancement', None, False, False, False, None, None, None,
+        False, None, None, None, 'no_action', 'descriptive docstring',
+        False, None, False)
+    self.config.field_defs = [self.estdays_fd, self.os_fd, self.milestone_fd]
+    self.config.well_known_labels = [
+        tracker_pb2.LabelDef(
+            label='Priority-High', label_docstring='Must be resolved'),
+        tracker_pb2.LabelDef(
+            label='Priority-Low', label_docstring='Can be slipped'),
+        ]
+
+  def testPrecomputeInfoForValueViews_NoValues(self):
+    """We can precompute info needed for an issue with no fields or labels."""
+    labels = []
+    derived_labels = []
+    field_values = []
+    phases = []
+    precomp_view_info = tracker_views._PrecomputeInfoForValueViews(
+        labels, derived_labels, field_values, self.config, phases)
+    (labels_by_prefix, der_labels_by_prefix, field_values_by_id,
+     label_docs, phases_by_name) = precomp_view_info
+    self.assertEqual({}, labels_by_prefix)
+    self.assertEqual({}, der_labels_by_prefix)
+    self.assertEqual({}, field_values_by_id)
+    self.assertEqual(
+        {'priority-high': 'Must be resolved',
+         'priority-low': 'Can be slipped'},
+        label_docs)
+    self.assertEqual({}, phases_by_name)
+
+  def testPrecomputeInfoForValueViews_SomeValues(self):
+    """We can precompute info needed for an issue with fields and labels."""
+    labels = ['Priority-Low', 'GoodFirstBug', 'Feature-UI', 'Feature-Installer',
+              'Launch-Milestone-66']
+    derived_labels = ['OS-Windows', 'OS-Linux']
+    field_values = [
+        tracker_bizobj.MakeFieldValue(1, 5, None, None, None, None, False),
+        ]
+    phase_1 = tracker_pb2.Phase(phase_id=1, name='Stable')
+    phase_2 = tracker_pb2.Phase(phase_id=2, name='Beta')
+    phase_3 = tracker_pb2.Phase(phase_id=3, name='stable')
+    precomp_view_info = tracker_views._PrecomputeInfoForValueViews(
+        labels, derived_labels, field_values, self.config,
+        phases=[phase_1, phase_2, phase_3])
+    (labels_by_prefix, der_labels_by_prefix, field_values_by_id,
+     _label_docs, phases_by_name) = precomp_view_info
+    self.assertEqual(
+        {'priority': ['Low'],
+         'feature': ['UI', 'Installer'],
+         'launch-milestone': ['66']},
+        labels_by_prefix)
+    self.assertEqual(
+        {'os': ['Windows', 'Linux']},
+        der_labels_by_prefix)
+    self.assertEqual(
+        {1: field_values},
+        field_values_by_id)
+    self.assertEqual(
+        {'stable': [phase_1, phase_3],
+         'beta': [phase_2]},
+        phases_by_name)
+
+  def testMakeAllFieldValueViews(self):
+    labels = ['Priority-Low', 'GoodFirstBug', 'Feature-UI', 'Feature-Installer',
+              'Launch-Milestone-66']
+    derived_labels = ['OS-Windows', 'OS-Linux']
+    self.config.field_defs.append(tracker_bizobj.MakeFieldDef(
+        4, 789, 'UIMocks', tracker_pb2.FieldTypes.URL_TYPE,
+        'Enhancement', None, False, False, False, None, None, None,
+        False, None, None, None, 'no_action', 'descriptive docstring',
+        False, approval_id=23, is_phase_field=False))
+    self.config.field_defs.append(tracker_bizobj.MakeFieldDef(
+        5, 789, 'LegalFAQs', tracker_pb2.FieldTypes.URL_TYPE,
+        'Enhancement', None, False, False, False, None, None, None,
+        False, None, None, None, 'no_action', 'descriptive docstring',
+        False, approval_id=26, is_phase_field=False))
+    self.config.field_defs.append(tracker_bizobj.MakeFieldDef(
+        23, 789, 'Legal', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        'Enhancement', None, False, False, False, None, None, None,
+        False, None, None, None, 'no_action', 'descriptive docstring',
+        False, approval_id=None, is_phase_field=False))
+    self.config.field_defs.append(tracker_bizobj.MakeFieldDef(
+        26, 789, 'UI', tracker_pb2.FieldTypes.APPROVAL_TYPE,
+        'Enhancement', None, False, False, False, None, None, None,
+        False, None, None, None, 'no_action', 'descriptive docstring',
+        False, approval_id=None, is_phase_field=False))
+    self.config.field_defs.append(tracker_bizobj.MakeFieldDef(
+        27, 789, 'M-Target', tracker_pb2.FieldTypes.INT_TYPE,
+        'Enhancement', None, False, False, False, None, None, None,
+        False, None, None, None, 'no_action', 'descriptive docstring',
+        False, approval_id=None, is_phase_field=True))
+    field_values = [
+        tracker_bizobj.MakeFieldValue(1, 5, None, None, None, None, False),
+        tracker_bizobj.MakeFieldValue(
+            27, 74, None, None, None, None, False, phase_id=3),
+        # phase_id=4 does not belong to any of the phases given below.
+        # this field value should not show up in the views.
+        tracker_bizobj.MakeFieldValue(
+            27, 79, None, None, None, None, False, phase_id=4),
+        ]
+    users_by_id = {}
+    phase_1 = tracker_pb2.Phase(phase_id=1, name='Stable')
+    phase_2 = tracker_pb2.Phase(phase_id=2, name='Beta')
+    phase_3 = tracker_pb2.Phase(phase_id=3, name='stable')
+    fvvs = tracker_views.MakeAllFieldValueViews(
+        self.config, labels, derived_labels, field_values, users_by_id,
+        parent_approval_ids=[23], phases=[phase_1, phase_2, phase_3])
+    self.assertEqual(9, len(fvvs))
+    # Values are sorted by (applicable_type, field_name).
+    logging.info([fv.field_name for fv in fvvs])
+    (estdays_fvv, launch_milestone_fvv, legal_fvv, legal_faq_fvv,
+      beta_mtarget_fvv, stable_mtarget_fvv, os_fvv, ui_fvv, ui_mocks_fvv) = fvvs
+    self.assertEqual('EstDays', estdays_fvv.field_name)
+    self.assertEqual(1, len(estdays_fvv.values))
+    self.assertEqual(0, len(estdays_fvv.derived_values))
+    self.assertEqual('Launch-Milestone', launch_milestone_fvv.field_name)
+    self.assertEqual(1, len(launch_milestone_fvv.values))
+    self.assertEqual(0, len(launch_milestone_fvv.derived_values))
+    self.assertEqual('OS', os_fvv.field_name)
+    self.assertEqual(0, len(os_fvv.values))
+    self.assertEqual(2, len(os_fvv.derived_values))
+    self.assertEqual(ui_mocks_fvv.field_name, 'UIMocks')
+    self.assertEqual(ui_mocks_fvv.phase_name, '')
+    self.assertTrue(ui_mocks_fvv.applicable)
+    self.assertEqual(legal_faq_fvv.field_name, 'LegalFAQs')
+    self.assertFalse(legal_faq_fvv.applicable)
+    self.assertFalse(legal_fvv.applicable)
+    self.assertFalse(ui_fvv.applicable)
+    self.assertEqual('M-Target', stable_mtarget_fvv.field_name)
+    self.assertEqual('stable', stable_mtarget_fvv.phase_name)
+    self.assertEqual(1, len(stable_mtarget_fvv.values))
+    self.assertEqual(74, stable_mtarget_fvv.values[0].val)
+    self.assertEqual(0, len(stable_mtarget_fvv.derived_values))
+    self.assertEqual('M-Target', beta_mtarget_fvv.field_name)
+    self.assertEqual('beta', beta_mtarget_fvv.phase_name)
+    self.assertEqual(0, len(beta_mtarget_fvv.values))
+    self.assertEqual(0, len(beta_mtarget_fvv.values))
+
+  def testMakeFieldValueView(self):
+    pass  # Covered by testMakeAllFieldValueViews()
+
+  def testMakeFieldValueItemsTest(self):
+    pass  # Covered by testMakeAllFieldValueViews()
+
+  def testMakeBounceFieldValueViews(self):
+    config = tracker_pb2.ProjectIssueConfig()
+    fd = tracker_pb2.FieldDef(
+        field_id=3, field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        applicable_type='', field_name='EstDays')
+    phase_fd = tracker_pb2.FieldDef(
+        field_id=4, field_type=tracker_pb2.FieldTypes.INT_TYPE,
+        applicable_type='', field_name='Gump')
+    config.field_defs = [fd,
+                         phase_fd,
+                         tracker_pb2.FieldDef(
+        field_id=5, field_type=tracker_pb2.FieldTypes.STR_TYPE)
+    ]
+    parsed_fvs = {3: [455]}
+    parsed_phase_fvs = {
+        4: {'stable': [73, 74], 'beta': [8], 'beta-exp': [75]},
+    }
+    fvs = tracker_views.MakeBounceFieldValueViews(
+        parsed_fvs, parsed_phase_fvs, config)
+
+    self.assertEqual(len(fvs), 4)
+
+    estdays_ezt_fv = template_helpers.EZTItem(val=455, docstring='', idx=0)
+    expected = tracker_views.FieldValueView(
+        fd, config, [estdays_ezt_fv], [], [])
+    self.assertEqual(fvs[0].field_name, expected.field_name)
+    self.assertEqual(fvs[0].values[0].val, expected.values[0].val)
+    self.assertEqual(fvs[0].values[0].idx, expected.values[0].idx)
+    self.assertTrue(fvs[0].applicable)
+
+    self.assertEqual(fvs[1].field_name, phase_fd.field_name)
+    self.assertEqual(fvs[2].field_name, phase_fd.field_name)
+    self.assertEqual(fvs[3].field_name, phase_fd.field_name)
+
+    fd.approval_id = 23
+    config.field_defs = [fd,
+                         tracker_pb2.FieldDef(
+                             field_id=23, field_name='Legal',
+                             field_type=tracker_pb2.FieldTypes.APPROVAL_TYPE)]
+    fvs = tracker_views.MakeBounceFieldValueViews(parsed_fvs, {}, config)
+    self.assertTrue(fvs[0].applicable)
+
+
+class ConvertLabelsToFieldValuesTest(unittest.TestCase):
+
+  def testConvertLabelsToFieldValues_NoLabels(self):
+    result = tracker_views._ConvertLabelsToFieldValues(
+        [], 'opsys', {})
+    self.assertEqual([], result)
+
+  def testConvertLabelsToFieldValues_NoMatch(self):
+    result = tracker_views._ConvertLabelsToFieldValues(
+        [], 'opsys', {})
+    self.assertEqual([], result)
+
+  def testConvertLabelsToFieldValues_HasMatch(self):
+    result = tracker_views._ConvertLabelsToFieldValues(
+        ['OSX'], 'opsys', {})
+    self.assertEqual(1, len(result))
+    self.assertEqual('OSX', result[0].val)
+    self.assertEqual('', result[0].docstring)
+
+    result = tracker_views._ConvertLabelsToFieldValues(
+        ['OSX', 'All'], 'opsys', {'opsys-all': 'Happens everywhere'})
+    self.assertEqual(2, len(result))
+    self.assertEqual('OSX', result[0].val)
+    self.assertEqual('', result[0].docstring)
+    self.assertEqual('All', result[1].val)
+    self.assertEqual('Happens everywhere', result[1].docstring)
+
+
+class FieldDefViewTest(unittest.TestCase):
+
+  def setUp(self):
+    self.approval_fd = tracker_bizobj.MakeFieldDef(
+        1, 789, 'LaunchApproval', tracker_pb2.FieldTypes.APPROVAL_TYPE, None,
+        None, True, True, False, 3, 99, None, False, None, None,
+        None, 'no_action', 'descriptive docstring', False, None, False)
+
+    self.approval_def = tracker_pb2.ApprovalDef(
+        approval_id=1, approver_ids=[111], survey='question?')
+
+    self.field_def = tracker_bizobj.MakeFieldDef(
+        2, 789, 'AffectedUsers', tracker_pb2.FieldTypes.INT_TYPE, None,
+        None, True, True, False, 3, 99, None, False, None, None,
+        None, 'no_action', 'descriptive docstring', False, 1, False)
+
+    self.field_def.admin_ids = [222]
+    self.field_def.editor_ids = [111, 333]
+
+  def testFieldDefView_Normal(self):
+    config = _MakeConfig()
+    config.field_defs.append(self.approval_fd)
+    config.approval_defs.append(self.approval_def)
+
+    user_view_1 = framework_views.StuffUserView(111, 'uv1@example.com', False)
+    user_view_2 = framework_views.StuffUserView(222, 'uv2@example.com', False)
+    user_view_3 = framework_views.StuffUserView(333, 'uv3@example.com', False)
+    user_views = {111: user_view_1, 222: user_view_2, 333: user_view_3}
+    view = tracker_views.FieldDefView(
+        self.field_def, config, user_views=user_views)
+
+    self.assertEqual('AffectedUsers', view.field_name)
+    self.assertEqual(self.field_def, view.field_def)
+    self.assertEqual('descriptive docstring', view.docstring_short)
+    self.assertEqual('INT_TYPE', view.type_name)
+    self.assertEqual([], view.choices)
+    self.assertEqual('required', view.importance)
+    self.assertEqual(3, view.min_value)
+    self.assertEqual(99, view.max_value)
+    self.assertEqual('no_action', view.date_action_str)
+    self.assertEqual(view.approval_id, 1)
+    self.assertEqual(view.is_approval_subfield, ezt.boolean(True))
+    self.assertEqual(view.approvers, [])
+    self.assertEqual(view.survey, '')
+    self.assertEqual(view.survey_questions, [])
+    self.assertEqual(len(view.admins), 1)
+    self.assertEqual(len(view.editors), 2)
+    self.assertIsNone(view.is_phase_field)
+    self.assertIsNone(view.is_restricted_field)
+
+  def testFieldDefView_Approval(self):
+    config = _MakeConfig()
+    approver_view = framework_views.StuffUserView(
+        111, 'shouldnotmatter@ch.org', False)
+    user_views = {111: approver_view}
+
+    view = tracker_views.FieldDefView(
+        self.approval_fd, config,
+        user_views= user_views, approval_def=self.approval_def)
+    self.assertEqual(view.approvers, [approver_view])
+    self.assertEqual(view.survey, self.approval_def.survey)
+    self.assertEqual(view.survey_questions, [view.survey])
+
+    self.approval_def.survey = None
+    view = tracker_views.FieldDefView(
+        self.approval_fd, config,
+        user_views= user_views, approval_def=self.approval_def)
+    self.assertEqual(view.survey, '')
+    self.assertEqual(view.survey_questions, [])
+
+    self.approval_def.survey = 'Q1\nQ2\nQ3'
+    view = tracker_views.FieldDefView(
+        self.approval_fd, config,
+        user_views= user_views, approval_def=self.approval_def)
+    self.assertEqual(view.survey, self.approval_def.survey)
+    self.assertEqual(view.survey_questions, ['Q1', 'Q2', 'Q3'])
+
+
+class IssueTemplateViewTest(unittest.TestCase):
+  pass  # TODO(jrobbins): write tests
+
+
+class MakeFieldUserViewsTest(unittest.TestCase):
+  pass  # TODO(jrobbins): write tests
+
+
+class ConfigViewTest(unittest.TestCase):
+  pass  # TODO(jrobbins): write tests
+
+
+class ConfigFunctionsTest(unittest.TestCase):
+
+  def setUp(self):
+    self.config = tracker_bizobj.MakeDefaultProjectIssueConfig(768)
+
+  def testStatusDefsAsText(self):
+    open_text, closed_text = tracker_views.StatusDefsAsText(self.config)
+
+    for wks in tracker_constants.DEFAULT_WELL_KNOWN_STATUSES:
+      status, doc, means_open, _deprecated = wks
+      if means_open:
+        self.assertIn(status, open_text)
+        self.assertIn(doc, open_text)
+      else:
+        self.assertIn(status, closed_text)
+        self.assertIn(doc, closed_text)
+
+    self.assertEqual(
+        len(tracker_constants.DEFAULT_WELL_KNOWN_STATUSES),
+        len(open_text.split('\n')) + len(closed_text.split('\n')))
+
+  def testLabelDefsAsText(self):
+    # Note: Day-Monday will not be part of the result because it is masked.
+    self.config.field_defs.append(tracker_pb2.FieldDef(
+        field_id=1, field_name='Day',
+        field_type=tracker_pb2.FieldTypes.ENUM_TYPE))
+    self.config.well_known_labels.append(tracker_pb2.LabelDef(
+        label='Day-Monday'))
+    labels_text = tracker_views.LabelDefsAsText(self.config)
+
+    for wkl in tracker_constants.DEFAULT_WELL_KNOWN_LABELS:
+      label, doc, _deprecated = wkl
+      self.assertIn(label, labels_text)
+      self.assertIn(doc, labels_text)
+    self.assertEqual(
+        len(tracker_constants.DEFAULT_WELL_KNOWN_LABELS),
+        len(labels_text.split('\n')))
diff --git a/tracker/test/webcomponentspage_test.py b/tracker/test/webcomponentspage_test.py
new file mode 100644
index 0000000..65cfc66
--- /dev/null
+++ b/tracker/test/webcomponentspage_test.py
@@ -0,0 +1,120 @@
+# Copyright 2020 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
+"""Tests for the Monorail SPA pages, as served by EZT."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import mock
+import unittest
+
+import ezt
+
+import settings
+from framework import permissions
+from proto import project_pb2
+from proto import site_pb2
+from services import service_manager
+from tracker import webcomponentspage
+from testing import fake
+from testing import testing_helpers
+
+
+class WebComponentsPageTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(
+        user=fake.UserService(),
+        project=fake.ProjectService(),
+        features=fake.FeaturesService())
+
+    self.user = self.services.user.TestAddUser('user@example.com', 111)
+    self.project = self.services.project.TestAddProject('proj', project_id=789)
+    self.hotlist = self.services.features.TestAddHotlist(
+        'HotlistName', summary='summary', owner_ids=[111], hotlist_id=1236)
+
+    self.servlet = webcomponentspage.WebComponentsPage(
+        'req', 'res', services=self.services)
+
+  def testHotlistPage_OldUiUrl(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 111},
+        path='/hotlists/1236',
+        services=self.services)
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual('/u/111/hotlists/HotlistName', page_data['old_ui_url'])
+
+  def testHotlistPage_OldUiUrl_People(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 111},
+        path='/hotlists/1236/people',
+        services=self.services)
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(
+        '/u/111/hotlists/HotlistName/people', page_data['old_ui_url'])
+
+  def testHotlistPage_OldUiUrl_Settings(self):
+    mr = testing_helpers.MakeMonorailRequest(
+        user_info={'user_id': 111},
+        path='/hotlists/1236/settings',
+        services=self.services)
+
+    page_data = self.servlet.GatherPageData(mr)
+    self.assertEqual(
+        '/u/111/hotlists/HotlistName/details', page_data['old_ui_url'])
+
+
+class ProjectListPageTest(unittest.TestCase):
+
+  def setUp(self):
+    self.services = service_manager.Services(project=fake.ProjectService())
+
+    self.project_a = self.services.project.TestAddProject('a', project_id=1)
+    self.project_b = self.services.project.TestAddProject('b', project_id=2)
+
+    self.servlet = webcomponentspage.ProjectListPage(
+        'req', 'res', services=self.services)
+
+  @mock.patch('settings.domain_to_default_project', {})
+  def testMaybeRedirectToDomainDefaultProject_NoMatch(self):
+    """No redirect if the user is not accessing via a configured domain."""
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.request.host = 'example.com'
+    msg = self.servlet._MaybeRedirectToDomainDefaultProject(mr)
+    print('msg: ' + msg)
+    self.assertTrue(msg.startswith('No configured'))
+
+  @mock.patch('settings.domain_to_default_project', {'example.com': 'huh'})
+  def testMaybeRedirectToDomainDefaultProject_NoSuchProject(self):
+    """No redirect if the configured project does not exist."""
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.request.host = 'example.com'
+    print('host is %r' % mr.request.host)
+    msg = self.servlet._MaybeRedirectToDomainDefaultProject(mr)
+    print('msg: ' + msg)
+    self.assertTrue(msg.endswith('not found'))
+
+  @mock.patch('settings.domain_to_default_project', {'example.com': 'a'})
+  def testMaybeRedirectToDomainDefaultProject_CantView(self):
+    """No redirect if the user can't view the configured project."""
+    self.project_a.access = project_pb2.ProjectAccess.MEMBERS_ONLY
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.request.host = 'example.com'
+    msg = self.servlet._MaybeRedirectToDomainDefaultProject(mr)
+    print('msg: ' + msg)
+    self.assertTrue(msg.startswith('User cannot'))
+
+  @mock.patch('settings.domain_to_default_project', {'example.com': 'a'})
+  def testMaybeRedirectToDomainDefaultProject_Redirect(self):
+    """We redirect if there's a configured project that the user can view."""
+    mr = testing_helpers.MakeMonorailRequest()
+    mr.request.host = 'example.com'
+    self.servlet.redirect = mock.Mock()
+    msg = self.servlet._MaybeRedirectToDomainDefaultProject(mr)
+    print('msg: ' + msg)
+    self.assertTrue(msg.startswith('Redirected'))
+    self.servlet.redirect.assert_called_once()
diff --git a/tracker/tracker_bizobj.py b/tracker/tracker_bizobj.py
new file mode 100644
index 0000000..f3f2594
--- /dev/null
+++ b/tracker/tracker_bizobj.py
@@ -0,0 +1,1831 @@
+# 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
+
+"""Business objects for the Monorail issue tracker.
+
+These are classes and functions that operate on the objects that
+users care about in the issue tracker: e.g., issues, and the issue
+tracker configuration.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+import time
+
+from six import string_types
+
+from features import federated
+from framework import exceptions
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import timestr
+from framework import urls
+from proto import tracker_pb2
+from tracker import tracker_constants
+
+
+def GetOwnerId(issue):
+  """Get the owner of an issue, whether it is explicit or derived."""
+  return (issue.owner_id or issue.derived_owner_id or
+          framework_constants.NO_USER_SPECIFIED)
+
+
+def GetStatus(issue):
+  """Get the status of an issue, whether it is explicit or derived."""
+  return issue.status or issue.derived_status or  ''
+
+
+def GetCcIds(issue):
+  """Get the Cc's of an issue, whether they are explicit or derived."""
+  return issue.cc_ids + issue.derived_cc_ids
+
+
+def GetApproverIds(issue):
+  """Get the Approvers' ids of an isuses approval_values."""
+  approver_ids = []
+  for av in issue.approval_values:
+    approver_ids.extend(av.approver_ids)
+
+  return list(set(approver_ids))
+
+
+def GetLabels(issue):
+  """Get the labels of an issue, whether explicit or derived."""
+  return issue.labels + issue.derived_labels
+
+
+def MakeProjectIssueConfig(
+    project_id, well_known_statuses, statuses_offer_merge, well_known_labels,
+    excl_label_prefixes, col_spec):
+  """Return a ProjectIssueConfig with the given values."""
+  # pylint: disable=multiple-statements
+  if not well_known_statuses: well_known_statuses = []
+  if not statuses_offer_merge: statuses_offer_merge = []
+  if not well_known_labels: well_known_labels = []
+  if not excl_label_prefixes: excl_label_prefixes = []
+  if not col_spec: col_spec = ' '
+
+  project_config = tracker_pb2.ProjectIssueConfig()
+  if project_id:  # There is no ID for harmonized configs.
+    project_config.project_id = project_id
+
+  SetConfigStatuses(project_config, well_known_statuses)
+  project_config.statuses_offer_merge = statuses_offer_merge
+  SetConfigLabels(project_config, well_known_labels)
+  project_config.exclusive_label_prefixes = excl_label_prefixes
+
+  # ID 0 means that nothing has been specified, so use hard-coded defaults.
+  project_config.default_template_for_developers = 0
+  project_config.default_template_for_users = 0
+
+  project_config.default_col_spec = col_spec
+
+  # Note: default project issue config has no filter rules.
+
+  return project_config
+
+
+def FindFieldDef(field_name, config):
+  """Find the specified field, or return None."""
+  if not field_name:
+    return None
+  field_name_lower = field_name.lower()
+  for fd in config.field_defs:
+    if fd.field_name.lower() == field_name_lower:
+      return fd
+
+  return None
+
+
+def FindFieldDefByID(field_id, config):
+  """Find the specified field, or return None."""
+  for fd in config.field_defs:
+    if fd.field_id == field_id:
+      return fd
+
+  return None
+
+
+def FindApprovalDef(approval_name, config):
+  """Find the specified approval, or return None."""
+  fd = FindFieldDef(approval_name, config)
+  if fd:
+    return FindApprovalDefByID(fd.field_id, config)
+
+  return None
+
+
+def FindApprovalDefByID(approval_id, config):
+  """Find the specified approval, or return None."""
+  for approval_def in config.approval_defs:
+    if approval_def.approval_id == approval_id:
+      return approval_def
+
+  return None
+
+
+def FindApprovalValueByID(approval_id, approval_values):
+  """Find the specified approval_value in the given list or return None."""
+  for av in approval_values:
+    if av.approval_id == approval_id:
+      return av
+
+  return None
+
+
+def FindApprovalsSubfields(approval_ids, config):
+  """Return a dict of {approval_ids: approval_subfields}."""
+  approval_subfields_dict = collections.defaultdict(list)
+  for fd in config.field_defs:
+    if fd.approval_id in approval_ids:
+      approval_subfields_dict[fd.approval_id].append(fd)
+
+  return approval_subfields_dict
+
+
+def FindPhaseByID(phase_id, phases):
+  """Find the specified phase, or return None"""
+  for phase in phases:
+    if phase.phase_id == phase_id:
+      return phase
+
+  return None
+
+
+def FindPhase(name, phases):
+  """Find the specified phase, or return None"""
+  for phase in phases:
+    if phase.name.lower() == name.lower():
+      return phase
+
+  return None
+
+
+def GetGrantedPerms(issue, effective_ids, config):
+  """Return a set of permissions granted by user-valued fields in an issue."""
+  granted_perms = set()
+  for field_value in issue.field_values:
+    if field_value.user_id in effective_ids:
+      field_def = FindFieldDefByID(field_value.field_id, config)
+      if field_def and field_def.grants_perm:
+        # TODO(jrobbins): allow comma-separated list in grants_perm
+        granted_perms.add(field_def.grants_perm.lower())
+
+  return granted_perms
+
+
+def LabelsByPrefix(labels, lower_field_names):
+  """Convert a list of key-value labels into {lower_prefix: [value, ...]}.
+
+  It also handles custom fields with dashes in the field name.
+  """
+  label_values_by_prefix = collections.defaultdict(list)
+  for lab in labels:
+    if '-' not in lab:
+      continue
+    lower_lab = lab.lower()
+    for lower_field_name in lower_field_names:
+      if lower_lab.startswith(lower_field_name + '-'):
+        prefix = lower_field_name
+        value = lab[len(lower_field_name)+1:]
+        break
+    else:  # No field name matched
+      prefix, value = lab.split('-', 1)
+      prefix = prefix.lower()
+    label_values_by_prefix[prefix].append(value)
+  return label_values_by_prefix
+
+
+def LabelIsMaskedByField(label, field_names):
+  """If the label should be displayed as a field, return the field name.
+
+  Args:
+    label: string label to consider.
+    field_names: a list of field names in lowercase.
+
+  Returns:
+    If masked, return the lowercase name of the field, otherwise None.  A label
+    is masked by a custom field if the field name "Foo" matches the key part of
+    a key-value label "Foo-Bar".
+  """
+  if '-' not in label:
+    return None
+
+  for field_name_lower in field_names:
+    if label.lower().startswith(field_name_lower + '-'):
+      return field_name_lower
+
+  return None
+
+
+def NonMaskedLabels(labels, field_names):
+  """Return only those labels that are not masked by custom fields."""
+  return [lab for lab in labels
+          if not LabelIsMaskedByField(lab, field_names)]
+
+
+def ExplicitAndDerivedNonMaskedLabels(labels, derived_labels, config):
+  """Return two lists of labels that are not masked by enum custom fields."""
+  field_names = [fd.field_name.lower() for fd in config.field_defs
+                 if fd.field_type is tracker_pb2.FieldTypes.ENUM_TYPE and
+                 not fd.is_deleted]  # TODO(jrobbins): restricts
+  labels = [
+      lab for lab in labels
+      if not LabelIsMaskedByField(lab, field_names)]
+  derived_labels = [
+    lab for lab in derived_labels
+    if not LabelIsMaskedByField(lab, field_names)]
+  return labels, derived_labels
+
+
+def MakeApprovalValue(approval_id, approver_ids=None, status=None,
+                      setter_id=None, set_on=None, phase_id=None):
+  """Return an ApprovalValue PB with the given field values."""
+  av = tracker_pb2.ApprovalValue(
+      approval_id=approval_id, status=status,
+      setter_id=setter_id, set_on=set_on, phase_id=phase_id)
+  if approver_ids is not None:
+    av.approver_ids = approver_ids
+  return av
+
+
+def MakeFieldDef(
+    field_id,
+    project_id,
+    field_name,
+    field_type_int,
+    applic_type,
+    applic_pred,
+    is_required,
+    is_niche,
+    is_multivalued,
+    min_value,
+    max_value,
+    regex,
+    needs_member,
+    needs_perm,
+    grants_perm,
+    notify_on,
+    date_action,
+    docstring,
+    is_deleted,
+    approval_id=None,
+    is_phase_field=False,
+    is_restricted_field=False,
+    admin_ids=None,
+    editor_ids=None):
+  """Make a FieldDef PB for the given FieldDef table row tuple."""
+  if isinstance(date_action, string_types):
+    date_action = date_action.upper()
+  fd = tracker_pb2.FieldDef(
+      field_id=field_id,
+      project_id=project_id,
+      field_name=field_name,
+      field_type=field_type_int,
+      is_required=bool(is_required),
+      is_niche=bool(is_niche),
+      is_multivalued=bool(is_multivalued),
+      docstring=docstring,
+      is_deleted=bool(is_deleted),
+      applicable_type=applic_type or '',
+      applicable_predicate=applic_pred or '',
+      needs_member=bool(needs_member),
+      grants_perm=grants_perm or '',
+      notify_on=tracker_pb2.NotifyTriggers(notify_on or 0),
+      date_action=tracker_pb2.DateAction(date_action or 0),
+      is_phase_field=bool(is_phase_field),
+      is_restricted_field=bool(is_restricted_field))
+  if min_value is not None:
+    fd.min_value = min_value
+  if max_value is not None:
+    fd.max_value = max_value
+  if regex is not None:
+    fd.regex = regex
+  if needs_perm is not None:
+    fd.needs_perm = needs_perm
+  if approval_id is not None:
+    fd.approval_id = approval_id
+  if admin_ids:
+    fd.admin_ids = admin_ids
+  if editor_ids:
+    fd.editor_ids = editor_ids
+  return fd
+
+
+def MakeFieldValue(
+    field_id, int_value, str_value, user_id, date_value, url_value, derived,
+    phase_id=None):
+  """Make a FieldValue based on the given information."""
+  fv = tracker_pb2.FieldValue(field_id=field_id, derived=derived)
+  if phase_id is not None:
+    fv.phase_id = phase_id
+  if int_value is not None:
+    fv.int_value = int_value
+  elif str_value is not None:
+    fv.str_value = str_value
+  elif user_id is not None:
+    fv.user_id = user_id
+  elif date_value is not None:
+    fv.date_value = date_value
+  elif url_value is not None:
+    fv.url_value = url_value
+  else:
+    raise ValueError('Unexpected field value')
+  return fv
+
+
+def GetFieldValueWithRawValue(field_type, field_value, users_by_id, raw_value):
+  """Find and return the field value of the specified field type.
+
+  If the specified field_value is None or is empty then the raw_value is
+  returned. When the field type is USER_TYPE the raw_value is used as a key to
+  lookup users_by_id.
+
+  Args:
+    field_type: tracker_pb2.FieldTypes type.
+    field_value: tracker_pb2.FieldValue type.
+    users_by_id: Dict mapping user_ids to UserViews.
+    raw_value: String to use if field_value is not specified.
+
+  Returns:
+    Value of the specified field type.
+  """
+  ret_value = GetFieldValue(field_value, users_by_id)
+  if ret_value:
+    return ret_value
+  # Special case for user types.
+  if field_type == tracker_pb2.FieldTypes.USER_TYPE:
+    if raw_value in users_by_id:
+      return users_by_id[raw_value].email
+  return raw_value
+
+
+def GetFieldValue(fv, users_by_id):
+  """Return the value of this field.  Give emails for users in users_by_id."""
+  if fv is None:
+    return None
+  elif fv.int_value is not None:
+    return fv.int_value
+  elif fv.str_value is not None:
+    return fv.str_value
+  elif fv.user_id is not None:
+    if fv.user_id in users_by_id:
+      return users_by_id[fv.user_id].email
+    else:
+      logging.info('Failed to lookup user %d when getting field', fv.user_id)
+      return fv.user_id
+  elif fv.date_value is not None:
+    return timestr.TimestampToDateWidgetStr(fv.date_value)
+  elif fv.url_value is not None:
+    return fv.url_value
+  else:
+    return None
+
+
+def FindComponentDef(path, config):
+  """Find the specified component, or return None."""
+  path_lower = path.lower()
+  for cd in config.component_defs:
+    if cd.path.lower() == path_lower:
+      return cd
+
+  return None
+
+
+def FindMatchingComponentIDs(path, config, exact=True):
+  """Return a list of components that match the given path."""
+  component_ids = []
+  path_lower = path.lower()
+
+  if exact:
+    for cd in config.component_defs:
+      if cd.path.lower() == path_lower:
+        component_ids.append(cd.component_id)
+  else:
+    path_lower_delim = path.lower() + '>'
+    for cd in config.component_defs:
+      target_delim = cd.path.lower() + '>'
+      if target_delim.startswith(path_lower_delim):
+        component_ids.append(cd.component_id)
+
+  return component_ids
+
+
+def FindComponentDefByID(component_id, config):
+  """Find the specified component, or return None."""
+  for cd in config.component_defs:
+    if cd.component_id == component_id:
+      return cd
+
+  return None
+
+
+def FindAncestorComponents(config, component_def):
+  """Return a list of all components the given component is under."""
+  path_lower = component_def.path.lower()
+  return [cd for cd in config.component_defs
+          if path_lower.startswith(cd.path.lower() + '>')]
+
+
+def GetIssueComponentsAndAncestors(issue, config):
+  """Return a list of all the components that an issue is in."""
+  result = set()
+  for component_id in issue.component_ids:
+    cd = FindComponentDefByID(component_id, config)
+    if cd is None:
+      logging.error('Tried to look up non-existent component %r' % component_id)
+      continue
+    ancestors = FindAncestorComponents(config, cd)
+    result.add(cd)
+    result.update(ancestors)
+
+  return sorted(result, key=lambda cd: cd.path)
+
+
+def FindDescendantComponents(config, component_def):
+  """Return a list of all nested components under the given component."""
+  path_plus_delim = component_def.path.lower() + '>'
+  return [cd for cd in config.component_defs
+          if cd.path.lower().startswith(path_plus_delim)]
+
+
+def MakeComponentDef(
+    component_id, project_id, path, docstring, deprecated, admin_ids, cc_ids,
+    created, creator_id, modified=None, modifier_id=None, label_ids=None):
+  """Make a ComponentDef PB for the given FieldDef table row tuple."""
+  cd = tracker_pb2.ComponentDef(
+      component_id=component_id, project_id=project_id, path=path,
+      docstring=docstring, deprecated=bool(deprecated),
+      admin_ids=admin_ids, cc_ids=cc_ids, created=created,
+      creator_id=creator_id, modified=modified, modifier_id=modifier_id,
+      label_ids=label_ids or [])
+  return cd
+
+
+def MakeSavedQuery(
+    query_id, name, base_query_id, query, subscription_mode=None,
+    executes_in_project_ids=None):
+  """Make SavedQuery PB for the given info."""
+  saved_query = tracker_pb2.SavedQuery(
+      name=name, base_query_id=base_query_id, query=query)
+  if query_id is not None:
+    saved_query.query_id = query_id
+  if subscription_mode is not None:
+    saved_query.subscription_mode = subscription_mode
+  if executes_in_project_ids is not None:
+    saved_query.executes_in_project_ids = executes_in_project_ids
+  return saved_query
+
+
+def SetConfigStatuses(project_config, well_known_statuses):
+  """Internal method to set the well-known statuses of ProjectIssueConfig."""
+  project_config.well_known_statuses = []
+  for status, docstring, means_open, deprecated in well_known_statuses:
+    canonical_status = framework_bizobj.CanonicalizeLabel(status)
+    project_config.well_known_statuses.append(tracker_pb2.StatusDef(
+        status_docstring=docstring, status=canonical_status,
+        means_open=means_open, deprecated=deprecated))
+
+
+def SetConfigLabels(project_config, well_known_labels):
+  """Internal method to set the well-known labels of a ProjectIssueConfig."""
+  project_config.well_known_labels = []
+  for label, docstring, deprecated in well_known_labels:
+    canonical_label = framework_bizobj.CanonicalizeLabel(label)
+    project_config.well_known_labels.append(tracker_pb2.LabelDef(
+        label=canonical_label, label_docstring=docstring,
+        deprecated=deprecated))
+
+
+def SetConfigApprovals(project_config, approval_def_tuples):
+  """Internal method to set up approval defs of a ProjectissueConfig."""
+  project_config.approval_defs = []
+  for approval_id, approver_ids, survey in approval_def_tuples:
+    project_config.approval_defs.append(tracker_pb2.ApprovalDef(
+        approval_id=approval_id, approver_ids=approver_ids, survey=survey))
+
+
+def ConvertDictToTemplate(template_dict):
+  """Construct a Template PB with the values from template_dict.
+
+  Args:
+    template_dict: dictionary with fields corresponding to the Template
+        PB fields.
+
+  Returns:
+    A Template protocol buffer that can be stored in the
+    project's ProjectIssueConfig PB.
+  """
+  return MakeIssueTemplate(
+      template_dict.get('name'), template_dict.get('summary'),
+      template_dict.get('status'), template_dict.get('owner_id'),
+      template_dict.get('content'), template_dict.get('labels'), [], [],
+      template_dict.get('components'),
+      summary_must_be_edited=template_dict.get('summary_must_be_edited'),
+      owner_defaults_to_member=template_dict.get('owner_defaults_to_member'),
+      component_required=template_dict.get('component_required'),
+      members_only=template_dict.get('members_only'))
+
+
+def MakeIssueTemplate(
+    name,
+    summary,
+    status,
+    owner_id,
+    content,
+    labels,
+    field_values,
+    admin_ids,
+    component_ids,
+    summary_must_be_edited=None,
+    owner_defaults_to_member=None,
+    component_required=None,
+    members_only=None,
+    phases=None,
+    approval_values=None):
+  """Make an issue template PB."""
+  template = tracker_pb2.TemplateDef()
+  template.name = name
+  if summary:
+    template.summary = summary
+  if status:
+    template.status = status
+  if owner_id:
+    template.owner_id = owner_id
+  template.content = content
+  template.field_values = field_values
+  template.labels = labels or []
+  template.admin_ids = admin_ids
+  template.component_ids = component_ids or []
+  template.approval_values = approval_values or []
+
+  if summary_must_be_edited is not None:
+    template.summary_must_be_edited = summary_must_be_edited
+  if owner_defaults_to_member is not None:
+    template.owner_defaults_to_member = owner_defaults_to_member
+  if component_required is not None:
+    template.component_required = component_required
+  if members_only is not None:
+    template.members_only = members_only
+  if phases is not None:
+    template.phases = phases
+
+  return template
+
+
+def MakeDefaultProjectIssueConfig(project_id):
+  """Return a ProjectIssueConfig with use by projects that don't have one."""
+  return MakeProjectIssueConfig(
+      project_id,
+      tracker_constants.DEFAULT_WELL_KNOWN_STATUSES,
+      tracker_constants.DEFAULT_STATUSES_OFFER_MERGE,
+      tracker_constants.DEFAULT_WELL_KNOWN_LABELS,
+      tracker_constants.DEFAULT_EXCL_LABEL_PREFIXES,
+      tracker_constants.DEFAULT_COL_SPEC)
+
+
+def HarmonizeConfigs(config_list):
+  """Combine several ProjectIssueConfigs into one for cross-project sorting.
+
+  Args:
+    config_list: a list of ProjectIssueConfig PBs with labels and statuses
+        among other fields.
+
+  Returns:
+    A new ProjectIssueConfig with just the labels and status values filled
+    in to be a logical union of the given configs.  Specifically, the order
+    of the combined status and label lists should be maintained.
+  """
+  if not config_list:
+    return MakeDefaultProjectIssueConfig(None)
+
+  harmonized_status_names = _CombineOrderedLists(
+      [[stat.status for stat in config.well_known_statuses]
+       for config in config_list])
+  harmonized_label_names = _CombineOrderedLists(
+      [[lab.label for lab in config.well_known_labels]
+       for config in config_list])
+  harmonized_default_sort_spec = ' '.join(
+      config.default_sort_spec for config in config_list)
+  harmonized_means_open = {
+      status: any([stat.means_open
+                   for config in config_list
+                   for stat in config.well_known_statuses
+                   if stat.status == status])
+      for status in harmonized_status_names}
+
+  # This col_spec is probably not what the user wants to view because it is
+  # too much information.  We join all the col_specs here so that we are sure
+  # to lookup all users needed for sorting, even if it is more than needed.
+  # xxx we need to look up users based on colspec rather than sortspec?
+  harmonized_default_col_spec = ' '.join(
+      config.default_col_spec for config in config_list)
+
+  result_config = tracker_pb2.ProjectIssueConfig()
+  # The combined config is only used during sorting, never stored.
+  result_config.default_col_spec = harmonized_default_col_spec
+  result_config.default_sort_spec = harmonized_default_sort_spec
+
+  for status_name in harmonized_status_names:
+    result_config.well_known_statuses.append(tracker_pb2.StatusDef(
+        status=status_name, means_open=harmonized_means_open[status_name]))
+
+  for label_name in harmonized_label_names:
+    result_config.well_known_labels.append(tracker_pb2.LabelDef(
+        label=label_name))
+
+  for config in config_list:
+    result_config.field_defs.extend(
+      list(fd for fd in config.field_defs if not fd.is_deleted))
+    result_config.component_defs.extend(config.component_defs)
+    result_config.approval_defs.extend(config.approval_defs)
+
+  return result_config
+
+
+def HarmonizeLabelOrStatusRows(def_rows):
+  """Put the given label defs into a logical global order."""
+  ranked_defs_by_project = {}
+  oddball_defs = []
+  for row in def_rows:
+    def_id, project_id, rank, label = row[0], row[1], row[2], row[3]
+    if rank is not None:
+      ranked_defs_by_project.setdefault(project_id, []).append(
+          (def_id, rank, label))
+    else:
+      oddball_defs.append((def_id, rank, label))
+
+  oddball_defs.sort(reverse=True, key=lambda def_tuple: def_tuple[2].lower())
+  # Compose the list-of-lists in a consistent order by project_id.
+  list_of_lists = [ranked_defs_by_project[pid]
+                   for pid in sorted(ranked_defs_by_project.keys())]
+  harmonized_ranked_defs = _CombineOrderedLists(
+      list_of_lists, include_duplicate_keys=True,
+      key=lambda def_tuple: def_tuple[2])
+
+  return oddball_defs + harmonized_ranked_defs
+
+
+def _CombineOrderedLists(
+    list_of_lists, include_duplicate_keys=False, key=lambda x: x):
+  """Combine lists of items while maintaining their desired order.
+
+  Args:
+    list_of_lists: a list of lists of strings.
+    include_duplicate_keys: Pass True to make the combined list have the
+        same total number of elements as the sum of the input lists.
+    key: optional function to choose which part of the list items hold the
+        string used for comparison.  The result will have the whole items.
+
+  Returns:
+    A single list of items containing one copy of each of the items
+    in any of the original list, and in an order that maintains the original
+    list ordering as much as possible.
+  """
+  combined_items = []
+  combined_keys = []
+  seen_keys_set = set()
+  for one_list in list_of_lists:
+    _AccumulateCombinedList(
+        one_list, combined_items, combined_keys, seen_keys_set, key=key,
+        include_duplicate_keys=include_duplicate_keys)
+
+  return combined_items
+
+
+def _AccumulateCombinedList(
+    one_list, combined_items, combined_keys, seen_keys_set,
+    include_duplicate_keys=False, key=lambda x: x):
+  """Accumulate strings into a combined list while its maintaining ordering.
+
+  Args:
+    one_list: list of strings in a desired order.
+    combined_items: accumulated list of items in the desired order.
+    combined_keys: accumulated list of key strings in the desired order.
+    seen_keys_set: set of strings that are already in combined_list.
+    include_duplicate_keys: Pass True to make the combined list have the
+        same total number of elements as the sum of the input lists.
+    key: optional function to choose which part of the list items hold the
+        string used for comparison.  The result will have the whole items.
+
+  Returns:
+    Nothing.  But, combined_items is modified to mix in all the items of
+    one_list at appropriate points such that nothing in combined_items
+    is reordered, and the ordering of items from one_list is maintained
+    as much as possible.  Also, seen_keys_set is modified to add any keys
+    for items that were added to combined_items.
+
+  Also, any strings that begin with "#" are compared regardless of the "#".
+  The purpose of such strings is to guide the final ordering.
+  """
+  insert_idx = 0
+  for item in one_list:
+    s = key(item).lower()
+    if s in seen_keys_set:
+      item_idx = combined_keys.index(s)  # Need parallel list of keys
+      insert_idx = max(insert_idx, item_idx + 1)
+
+    if s not in seen_keys_set or include_duplicate_keys:
+      combined_items.insert(insert_idx, item)
+      combined_keys.insert(insert_idx, s)
+      insert_idx += 1
+
+    seen_keys_set.add(s)
+
+
+def GetBuiltInQuery(query_id):
+  """If the given query ID is for a built-in query, return that string."""
+  return tracker_constants.DEFAULT_CANNED_QUERY_CONDS.get(query_id, '')
+
+
+def UsersInvolvedInAmendments(amendments):
+  """Return a set of all user IDs mentioned in the given Amendments."""
+  user_id_set = set()
+  for amendment in amendments:
+    user_id_set.update(amendment.added_user_ids)
+    user_id_set.update(amendment.removed_user_ids)
+
+  return user_id_set
+
+
+def _AccumulateUsersInvolvedInComment(comment, user_id_set):
+  """Build up a set of all users involved in an IssueComment.
+
+  Args:
+    comment: an IssueComment PB.
+    user_id_set: a set of user IDs to build up.
+
+  Returns:
+    The same set, but modified to have the user IDs of user who
+    entered the comment, and all the users mentioned in any amendments.
+  """
+  user_id_set.add(comment.user_id)
+  user_id_set.update(UsersInvolvedInAmendments(comment.amendments))
+
+  return user_id_set
+
+
+def UsersInvolvedInComment(comment):
+  """Return a set of all users involved in an IssueComment.
+
+  Args:
+    comment: an IssueComment PB.
+
+  Returns:
+    A set with the user IDs of user who entered the comment, and all the
+    users mentioned in any amendments.
+  """
+  return _AccumulateUsersInvolvedInComment(comment, set())
+
+
+def UsersInvolvedInCommentList(comments):
+  """Return a set of all users involved in a list of IssueComments.
+
+  Args:
+    comments: a list of IssueComment PBs.
+
+  Returns:
+    A set with the user IDs of user who entered the comment, and all the
+    users mentioned in any amendments.
+  """
+  result = set()
+  for c in comments:
+    _AccumulateUsersInvolvedInComment(c, result)
+
+  return result
+
+
+def UsersInvolvedInIssues(issues):
+  """Return a set of all user IDs referenced in the issues' metadata."""
+  result = set()
+  for issue in issues:
+    result.update([issue.reporter_id, issue.owner_id, issue.derived_owner_id])
+    result.update(issue.cc_ids)
+    result.update(issue.derived_cc_ids)
+    result.update(fv.user_id for fv in issue.field_values if fv.user_id)
+    for av in issue.approval_values:
+      result.update(approver_id for approver_id in av.approver_ids)
+      if av.setter_id:
+        result.update([av.setter_id])
+
+  return result
+
+
+def UsersInvolvedInTemplate(template):
+  """Return a set of all user IDs referenced in the template."""
+  result = set(
+    template.admin_ids +
+    [fv.user_id for fv in template.field_values if fv.user_id])
+  if template.owner_id:
+    result.add(template.owner_id)
+  for av in template.approval_values:
+    result.update(set(av.approver_ids))
+    if av.setter_id:
+      result.add(av.setter_id)
+  return result
+
+
+def UsersInvolvedInTemplates(templates):
+  """Return a set of all user IDs referenced in the given templates."""
+  result = set()
+  for template in templates:
+    result.update(UsersInvolvedInTemplate(template))
+  return result
+
+
+def UsersInvolvedInComponents(component_defs):
+  """Return a set of user IDs referenced in the given components."""
+  result = set()
+  for cd in component_defs:
+    result.update(cd.admin_ids)
+    result.update(cd.cc_ids)
+    if cd.creator_id:
+      result.add(cd.creator_id)
+    if cd.modifier_id:
+      result.add(cd.modifier_id)
+
+  return result
+
+
+def UsersInvolvedInApprovalDefs(approval_defs, matching_fds):
+  # type: (Sequence[proto.tracker_pb2.ApprovalDef],
+  #     Sequence[proto.tracker_pb2.FieldDef]) -> Collection[int]
+  """Return a set of user IDs referenced in the approval_defs and field defs"""
+  result = set()
+  for ad in approval_defs:
+    result.update(ad.approver_ids)
+  for fd in matching_fds:
+    result.update(fd.admin_ids)
+  return result
+
+
+def UsersInvolvedInConfig(config):
+  """Return a set of all user IDs referenced in the config."""
+  result = set()
+  for ad in config.approval_defs:
+    result.update(ad.approver_ids)
+  for fd in config.field_defs:
+    result.update(fd.admin_ids)
+  result.update(UsersInvolvedInComponents(config.component_defs))
+  return result
+
+
+def LabelIDsInvolvedInConfig(config):
+  """Return a set of all label IDs referenced in the config."""
+  result = set()
+  for cd in config.component_defs:
+    result.update(cd.label_ids)
+  return result
+
+
+def MakeApprovalDelta(
+    status, setter_id, approver_ids_add, approver_ids_remove,
+    subfield_vals_add, subfield_vals_remove, subfields_clear, labels_add,
+    labels_remove, set_on=None):
+  approval_delta = tracker_pb2.ApprovalDelta(
+      approver_ids_add=approver_ids_add,
+      approver_ids_remove=approver_ids_remove,
+      subfield_vals_add=subfield_vals_add,
+      subfield_vals_remove=subfield_vals_remove,
+      subfields_clear=subfields_clear,
+      labels_add=labels_add,
+      labels_remove=labels_remove
+  )
+  if status is not None:
+    approval_delta.status = status
+    approval_delta.set_on = set_on or int(time.time())
+    approval_delta.setter_id = setter_id
+
+  return approval_delta
+
+
+def MakeIssueDelta(
+    status, owner_id, cc_ids_add, cc_ids_remove, comp_ids_add, comp_ids_remove,
+    labels_add, labels_remove, field_vals_add, field_vals_remove, fields_clear,
+    blocked_on_add, blocked_on_remove, blocking_add, blocking_remove,
+    merged_into, summary, ext_blocked_on_add=None, ext_blocked_on_remove=None,
+    ext_blocking_add=None, ext_blocking_remove=None, merged_into_external=None):
+  """Construct an IssueDelta object with the given fields, iff non-None."""
+  delta = tracker_pb2.IssueDelta(
+      cc_ids_add=cc_ids_add, cc_ids_remove=cc_ids_remove,
+      comp_ids_add=comp_ids_add, comp_ids_remove=comp_ids_remove,
+      labels_add=labels_add, labels_remove=labels_remove,
+      field_vals_add=field_vals_add, field_vals_remove=field_vals_remove,
+      fields_clear=fields_clear,
+      blocked_on_add=blocked_on_add, blocked_on_remove=blocked_on_remove,
+      blocking_add=blocking_add, blocking_remove=blocking_remove)
+  if status is not None:
+    delta.status = status
+  if owner_id is not None:
+    delta.owner_id = owner_id
+  if merged_into is not None:
+    delta.merged_into = merged_into
+  if merged_into_external is not None:
+    delta.merged_into_external = merged_into_external
+  if summary is not None:
+    delta.summary = summary
+  if ext_blocked_on_add is not None:
+    delta.ext_blocked_on_add = ext_blocked_on_add
+  if ext_blocked_on_remove is not None:
+    delta.ext_blocked_on_remove = ext_blocked_on_remove
+  if ext_blocking_add is not None:
+    delta.ext_blocking_add = ext_blocking_add
+  if ext_blocking_remove is not None:
+    delta.ext_blocking_remove = ext_blocking_remove
+
+  return delta
+
+
+def ApplyLabelChanges(issue, config, labels_add, labels_remove):
+  """Updates the PB issue's labels and returns the amendment or None."""
+  canon_labels_add = [framework_bizobj.CanonicalizeLabel(l)
+                      for l in labels_add]
+  labels_add = [l for l in canon_labels_add if l]
+  canon_labels_remove = [framework_bizobj.CanonicalizeLabel(l)
+                         for l in labels_remove]
+  labels_remove = [l for l in canon_labels_remove if l]
+
+  (labels, update_labels_add,
+   update_labels_remove) = framework_bizobj.MergeLabels(
+       issue.labels, labels_add, labels_remove, config)
+
+  if update_labels_add or update_labels_remove:
+    issue.labels = labels
+    return MakeLabelsAmendment(
+          update_labels_add, update_labels_remove)
+  return None
+
+
+def ApplyFieldValueChanges(issue, config, fvs_add, fvs_remove, fields_clear):
+  """Updates the PB issue's field_values and returns an amendments list."""
+  phase_names_dict = {phase.phase_id: phase.name for phase in issue.phases}
+  phase_ids = list(phase_names_dict.keys())
+  (field_vals, added_fvs_by_id,
+   removed_fvs_by_id) = _MergeFields(
+       issue.field_values,
+       [fv for fv in fvs_add if not fv.phase_id or fv.phase_id in phase_ids],
+       [fv for fv in fvs_remove if not fv.phase_id or fv.phase_id in phase_ids],
+       config.field_defs)
+  amendments = []
+  if added_fvs_by_id or removed_fvs_by_id:
+    issue.field_values = field_vals
+    for fd in config.field_defs:
+      fd_added_values_by_phase = collections.defaultdict(list)
+      fd_removed_values_by_phase = collections.defaultdict(list)
+      # Split fd's added/removed fvs by the phase they belong to.
+      # non-phase fds will result in {None: [added_fvs]}
+      for fv in added_fvs_by_id.get(fd.field_id, []):
+        fd_added_values_by_phase[fv.phase_id].append(fv)
+      for fv in removed_fvs_by_id.get(fd.field_id, []):
+        fd_removed_values_by_phase[fv.phase_id].append(fv)
+      # Use all_fv_phase_ids to create Amendments, so no empty amendments
+      # are created for issue phases that had no field value changes.
+      all_fv_phase_ids = set(
+          fd_removed_values_by_phase.keys() + fd_added_values_by_phase.keys())
+      for phase_id in all_fv_phase_ids:
+        new_values = [GetFieldValue(fv, {}) for fv
+                      in fd_added_values_by_phase.get(phase_id, [])]
+        old_values = [GetFieldValue(fv, {}) for fv
+                      in fd_removed_values_by_phase.get(phase_id, [])]
+        amendments.append(MakeFieldAmendment(
+              fd.field_id, config, new_values, old_values=old_values,
+              phase_name=phase_names_dict.get(phase_id)))
+
+  # Note: Clearing fields is used with bulk-editing and phase fields do
+  # not appear there and cannot be bulk-edited.
+  if fields_clear:
+    field_clear_set = set(fields_clear)
+    revised_fields = []
+    for fd in config.field_defs:
+      if fd.field_id not in field_clear_set:
+        revised_fields.extend(
+            fv for fv in issue.field_values if fv.field_id == fd.field_id)
+      else:
+        amendments.append(
+            MakeFieldClearedAmendment(fd.field_id, config))
+        if fd.field_type == tracker_pb2.FieldTypes.ENUM_TYPE:
+          prefix = fd.field_name.lower() + '-'
+          filtered_labels = [
+              lab for lab in issue.labels
+              if not lab.lower().startswith(prefix)]
+          issue.labels = filtered_labels
+
+    issue.field_values = revised_fields
+  return amendments
+
+
+def ApplyIssueDelta(cnxn, issue_service, issue, delta, config):
+  """Apply an issue delta to an issue in RAM.
+
+  Args:
+    cnxn: connection to SQL database.
+    issue_service: object to access issue-related data in the database.
+    issue: Issue to be updated.
+    delta: IssueDelta object with new values for everything being changed.
+    config: ProjectIssueConfig object for the project containing the issue.
+
+  Returns:
+    A pair (amendments, impacted_iids) where amendments is a list of Amendment
+    protos to describe what changed, and impacted_iids is a set of other IIDs
+    for issues that are modified because they are related to the given issue.
+  """
+  amendments = []
+  impacted_iids = set()
+  if (delta.status is not None and delta.status != issue.status):
+    status = framework_bizobj.CanonicalizeLabel(delta.status)
+    amendments.append(MakeStatusAmendment(status, issue.status))
+    issue.status = status
+  if (delta.owner_id is not None and delta.owner_id != issue.owner_id):
+    amendments.append(MakeOwnerAmendment(delta.owner_id, issue.owner_id))
+    issue.owner_id = delta.owner_id
+
+  # compute the set of cc'd users added and removed
+  cc_add = [cc for cc in delta.cc_ids_add if cc not in issue.cc_ids]
+  cc_remove = [cc for cc in delta.cc_ids_remove if cc in issue.cc_ids]
+  if cc_add or cc_remove:
+    cc_ids = [cc for cc in list(issue.cc_ids) + cc_add
+              if cc not in cc_remove]
+    issue.cc_ids = cc_ids
+    amendments.append(MakeCcAmendment(cc_add, cc_remove))
+
+  # compute the set of components added and removed
+  comp_ids_add = [
+      c for c in delta.comp_ids_add if c not in issue.component_ids]
+  comp_ids_remove = [
+      c for c in delta.comp_ids_remove if c in issue.component_ids]
+  if comp_ids_add or comp_ids_remove:
+    comp_ids = [cid for cid in list(issue.component_ids) + comp_ids_add
+                if cid not in comp_ids_remove]
+    issue.component_ids = comp_ids
+    amendments.append(MakeComponentsAmendment(
+        comp_ids_add, comp_ids_remove, config))
+
+  # compute the set of labels added and removed
+  label_amendment = ApplyLabelChanges(
+      issue, config, delta.labels_add, delta.labels_remove)
+  if label_amendment:
+    amendments.append(label_amendment)
+
+  # compute the set of custom fields added and removed
+  fv_amendments = ApplyFieldValueChanges(
+      issue, config, delta.field_vals_add, delta.field_vals_remove,
+      delta.fields_clear)
+  amendments.extend(fv_amendments)
+
+  # Update blocking and blocked on issues.
+  (block_changes_amendments,
+   block_changes_impacted_iids) = ApplyIssueBlockRelationChanges(
+       cnxn, issue, delta.blocked_on_add, delta.blocked_on_remove,
+       delta.blocking_add, delta.blocking_remove, issue_service)
+  amendments.extend(block_changes_amendments)
+  impacted_iids.update(block_changes_impacted_iids)
+
+  # Update external issue references.
+  if delta.ext_blocked_on_add or delta.ext_blocked_on_remove:
+    add_refs = []
+    for ext_id in delta.ext_blocked_on_add:
+      ref = tracker_pb2.DanglingIssueRef(ext_issue_identifier=ext_id)
+      if (federated.IsShortlinkValid(ext_id) and
+          ref not in issue.dangling_blocked_on_refs and
+          ext_id not in delta.ext_blocked_on_remove):
+        add_refs.append(ref)
+    remove_refs = []
+    for ext_id in delta.ext_blocked_on_remove:
+      ref = tracker_pb2.DanglingIssueRef(ext_issue_identifier=ext_id)
+      if (federated.IsShortlinkValid(ext_id) and
+          ref in issue.dangling_blocked_on_refs):
+        remove_refs.append(ref)
+    if add_refs or remove_refs:
+      amendments.append(MakeBlockedOnAmendment(add_refs, remove_refs))
+    issue.dangling_blocked_on_refs = [
+        ref for ref in issue.dangling_blocked_on_refs + add_refs
+        if ref.ext_issue_identifier not in delta.ext_blocked_on_remove]
+
+  # Update external issue references.
+  if delta.ext_blocking_add or delta.ext_blocking_remove:
+    add_refs = []
+    for ext_id in delta.ext_blocking_add:
+      ref = tracker_pb2.DanglingIssueRef(ext_issue_identifier=ext_id)
+      if (federated.IsShortlinkValid(ext_id) and
+          ref not in issue.dangling_blocking_refs and
+          ext_id not in delta.ext_blocking_remove):
+        add_refs.append(ref)
+    remove_refs = []
+    for ext_id in delta.ext_blocking_remove:
+      ref = tracker_pb2.DanglingIssueRef(ext_issue_identifier=ext_id)
+      if (federated.IsShortlinkValid(ext_id) and
+          ref in issue.dangling_blocking_refs):
+        remove_refs.append(ref)
+    if add_refs or remove_refs:
+      amendments.append(MakeBlockingAmendment(add_refs, remove_refs))
+    issue.dangling_blocking_refs = [
+        ref for ref in issue.dangling_blocking_refs + add_refs
+        if ref.ext_issue_identifier not in delta.ext_blocking_remove]
+
+  if delta.merged_into is not None and delta.merged_into_external is not None:
+    raise ValueError(('Cannot update merged_into and merged_into_external'
+      ' fields at the same time.'))
+
+  if (delta.merged_into is not None and
+      delta.merged_into != issue.merged_into and
+      ((delta.merged_into == 0 and issue.merged_into is not None) or
+       delta.merged_into != 0)):
+
+    # Handle removing the existing internal merged_into.
+    try:
+      merged_remove = issue.merged_into
+      remove_issue = issue_service.GetIssue(cnxn, merged_remove)
+      remove_ref = remove_issue.project_name, remove_issue.local_id
+      impacted_iids.add(merged_remove)
+    except exceptions.NoSuchIssueException:
+      remove_ref = None
+
+    # Handle going from external->internal mergedinto.
+    if issue.merged_into_external:
+      remove_ref = tracker_pb2.DanglingIssueRef(
+          ext_issue_identifier=issue.merged_into_external)
+      issue.merged_into_external = None
+
+    # Handle adding the new merged_into.
+    try:
+      merged_add = delta.merged_into
+      issue.merged_into = delta.merged_into
+      add_issue = issue_service.GetIssue(cnxn, merged_add)
+      add_ref = add_issue.project_name, add_issue.local_id
+      impacted_iids.add(merged_add)
+    except exceptions.NoSuchIssueException:
+      add_ref = None
+
+    amendments.append(MakeMergedIntoAmendment(
+        [add_ref], [remove_ref], default_project_name=issue.project_name))
+
+  if (delta.merged_into_external is not None and
+      delta.merged_into_external != issue.merged_into_external and
+      (federated.IsShortlinkValid(delta.merged_into_external) or
+       (delta.merged_into_external == '' and issue.merged_into_external))):
+
+    remove_ref = None
+    if issue.merged_into_external:
+      remove_ref = tracker_pb2.DanglingIssueRef(
+          ext_issue_identifier=issue.merged_into_external)
+    elif issue.merged_into:
+      # Handle moving from internal->external mergedinto.
+      try:
+        remove_issue = issue_service.GetIssue(cnxn, issue.merged_into)
+        remove_ref = remove_issue.project_name, remove_issue.local_id
+        impacted_iids.add(issue.merged_into)
+      except exceptions.NoSuchIssueException:
+        pass
+
+    add_ref = tracker_pb2.DanglingIssueRef(
+        ext_issue_identifier=delta.merged_into_external)
+    issue.merged_into = 0
+    issue.merged_into_external = delta.merged_into_external
+    amendments.append(MakeMergedIntoAmendment([add_ref], [remove_ref],
+        default_project_name=issue.project_name))
+
+  if delta.summary and delta.summary != issue.summary:
+    amendments.append(MakeSummaryAmendment(delta.summary, issue.summary))
+    issue.summary = delta.summary
+
+  return amendments, impacted_iids
+
+
+def ApplyIssueBlockRelationChanges(
+    cnxn, issue, blocked_on_add, blocked_on_remove, blocking_add,
+    blocking_remove, issue_service):
+  # type: (MonorailConnection, Issue, Collection[int], Collection[int],
+  #     Collection[int], Collection[int], IssueService) ->
+  #     Sequence[Amendment], Collection[int]
+  """Apply issue blocking/blocked_on relation changes to an issue in RAM.
+
+  Args:
+    cnxn: connection to SQL database.
+    issue: Issue PB that we are applying the changes to.
+    blocked_on_add: list of issue IDs that we want to add as blocked_on.
+    blocked_on_remove: list of issue IDs that we want to remove from blocked_on.
+    blocking_add: list of issue IDs that we want to add as blocking.
+    blocking_remove: list of issue IDs that we want to remove from blocking.
+    issue_service: IssueService used to fetch info from DB or cache.
+
+  Returns:
+    A tuple that holds the list of Amendments that represent the applied changes
+    and a set of issue IDs that are impacted by the changes.
+
+
+  Side-effect:
+    The given issue's blocked_on and blocking fields will be modified.
+  """
+  amendments = []
+  impacted_iids = set()
+
+  def addAmendment(add_iids, remove_iids, amendment_func):
+    add_refs = issue_service.LookupIssueRefs(cnxn, add_iids).values()
+    remove_refs = issue_service.LookupIssueRefs(cnxn, remove_iids).values()
+    new_am = amendment_func(
+        add_refs, remove_refs, default_project_name=issue.project_name)
+    amendments.append(new_am)
+
+  # Apply blocked_on changes.
+  old_blocked_on = issue.blocked_on_iids
+  blocked_on_add = [iid for iid in blocked_on_add if iid not in old_blocked_on]
+  blocked_on_remove = [
+      iid for iid in blocked_on_remove if iid in old_blocked_on
+  ]
+  # blocked_on_add and blocked_on_remove are filtered above such that they
+  # could not contain matching items.
+  if blocked_on_add or blocked_on_remove:
+    addAmendment(blocked_on_add, blocked_on_remove, MakeBlockedOnAmendment)
+
+    new_blocked_on_iids = [
+        iid for iid in old_blocked_on + blocked_on_add
+        if iid not in blocked_on_remove
+    ]
+    (issue.blocked_on_iids,
+     issue.blocked_on_ranks) = issue_service.SortBlockedOn(
+         cnxn, issue, new_blocked_on_iids)
+    impacted_iids.update(blocked_on_add + blocked_on_remove)
+
+  # Apply blocking changes.
+  old_blocking = issue.blocking_iids
+  blocking_add = [iid for iid in blocking_add if iid not in old_blocking]
+  blocking_remove = [iid for iid in blocking_remove if iid in old_blocking]
+  # blocking_add and blocking_remove are filtered above such that they
+  # could not contain matching items.
+  if blocking_add or blocking_remove:
+    addAmendment(blocking_add, blocking_remove, MakeBlockingAmendment)
+    issue.blocking_iids = [
+        iid for iid in old_blocking + blocking_add if iid not in blocking_remove
+    ]
+    impacted_iids.update(blocking_add + blocking_remove)
+
+  return amendments, impacted_iids
+
+
+def MakeAmendment(
+    field, new_value, added_ids, removed_ids, custom_field_name=None,
+    old_value=None):
+  """Utility function to populate an Amendment PB.
+
+  Args:
+    field: enum for the field being updated.
+    new_value: new string value of that field.
+    added_ids: list of user IDs being added.
+    removed_ids: list of user IDs being removed.
+    custom_field_name: optional name of a custom field.
+    old_value: old string value of that field.
+
+  Returns:
+    An instance of Amendment.
+  """
+  amendment = tracker_pb2.Amendment()
+  amendment.field = field
+  amendment.newvalue = new_value
+  amendment.added_user_ids.extend(added_ids)
+  amendment.removed_user_ids.extend(removed_ids)
+
+  if old_value is not None:
+    amendment.oldvalue = old_value
+
+  if custom_field_name is not None:
+    amendment.custom_field_name = custom_field_name
+
+  return amendment
+
+
+def _PlusMinusString(added_items, removed_items):
+  """Return a concatenation of the items, with a minus on removed items.
+
+  Args:
+    added_items: list of string items added.
+    removed_items: list of string items removed.
+
+  Returns:
+    A unicode string with all the removed items first (preceeded by minus
+    signs) and then the added items.
+  """
+  assert all(isinstance(item, string_types)
+             for item in added_items + removed_items)
+  # TODO(jrobbins): this is not good when values can be negative ints.
+  return ' '.join(
+      ['-%s' % item.strip()
+       for item in removed_items if item] +
+      ['%s' % item for item in added_items if item])
+
+
+def _PlusMinusAmendment(
+    field, added_items, removed_items, custom_field_name=None):
+  """Make an Amendment PB with the given added/removed items."""
+  return MakeAmendment(
+      field, _PlusMinusString(added_items, removed_items), [], [],
+      custom_field_name=custom_field_name)
+
+
+def _PlusMinusRefsAmendment(
+    field, added_refs, removed_refs, default_project_name=None):
+  """Make an Amendment PB with the given added/removed refs."""
+  return _PlusMinusAmendment(
+      field,
+      [FormatIssueRef(r, default_project_name=default_project_name)
+       for r in added_refs if r],
+      [FormatIssueRef(r, default_project_name=default_project_name)
+       for r in removed_refs if r])
+
+
+def MakeSummaryAmendment(new_summary, old_summary):
+  """Make an Amendment PB for a change to the summary."""
+  return MakeAmendment(
+      tracker_pb2.FieldID.SUMMARY, new_summary, [], [], old_value=old_summary)
+
+
+def MakeStatusAmendment(new_status, old_status):
+  """Make an Amendment PB for a change to the status."""
+  return MakeAmendment(
+      tracker_pb2.FieldID.STATUS, new_status, [], [], old_value=old_status)
+
+
+def MakeOwnerAmendment(new_owner_id, old_owner_id):
+  """Make an Amendment PB for a change to the owner."""
+  return MakeAmendment(
+      tracker_pb2.FieldID.OWNER, '', [new_owner_id], [old_owner_id])
+
+
+def MakeCcAmendment(added_cc_ids, removed_cc_ids):
+  """Make an Amendment PB for a change to the Cc list."""
+  return MakeAmendment(
+      tracker_pb2.FieldID.CC, '', added_cc_ids, removed_cc_ids)
+
+
+def MakeLabelsAmendment(added_labels, removed_labels):
+  """Make an Amendment PB for a change to the labels."""
+  return _PlusMinusAmendment(
+      tracker_pb2.FieldID.LABELS, added_labels, removed_labels)
+
+
+def DiffValueLists(new_list, old_list):
+  """Give an old list and a new list, return the added and removed items."""
+  if not old_list:
+    return new_list, []
+  if not new_list:
+    return [], old_list
+
+  added = []
+  removed = old_list[:]  # Assume everything was removed, then narrow that down
+  for val in new_list:
+    if val in removed:
+      removed.remove(val)
+    else:
+      added.append(val)
+
+  return added, removed
+
+
+def MakeFieldAmendment(
+    field_id, config, new_values, old_values=None, phase_name=None):
+  """Return an amendment showing how an issue's field changed.
+
+  Args:
+    field_id: int field ID of a built-in or custom issue field.
+    config: config info for the current project, including field_defs.
+    new_values: list of strings representing new values of field.
+    old_values: list of strings representing old values of field.
+    phase_name: name of the phase that owned the field that was changed.
+
+  Returns:
+    A new Amemdnent object.
+
+  Raises:
+    ValueError: if the specified field was not found.
+  """
+  fd = FindFieldDefByID(field_id, config)
+
+  if fd is None:
+    raise ValueError('field %r vanished mid-request', field_id)
+
+  field_name = fd.field_name if not phase_name else '%s-%s' % (
+      phase_name, fd.field_name)
+  if fd.is_multivalued:
+    old_values = old_values or []
+    added, removed = DiffValueLists(new_values, old_values)
+    if fd.field_type == tracker_pb2.FieldTypes.USER_TYPE:
+      return MakeAmendment(
+          tracker_pb2.FieldID.CUSTOM, '', added, removed,
+          custom_field_name=field_name)
+    else:
+      return _PlusMinusAmendment(
+          tracker_pb2.FieldID.CUSTOM,
+          ['%s' % item for item in added],
+          ['%s' % item for item in removed],
+          custom_field_name=field_name)
+
+  else:
+    if fd.field_type == tracker_pb2.FieldTypes.USER_TYPE:
+      return MakeAmendment(
+          tracker_pb2.FieldID.CUSTOM, '', new_values, [],
+          custom_field_name=field_name)
+
+    if new_values:
+      new_str = ', '.join('%s' % item for item in new_values)
+    else:
+      new_str = '----'
+
+    return MakeAmendment(
+        tracker_pb2.FieldID.CUSTOM, new_str, [], [],
+        custom_field_name=field_name)
+
+
+def MakeFieldClearedAmendment(field_id, config):
+  fd = FindFieldDefByID(field_id, config)
+
+  if fd is None:
+    raise ValueError('field %r vanished mid-request', field_id)
+
+  return MakeAmendment(
+      tracker_pb2.FieldID.CUSTOM, '----', [], [],
+      custom_field_name=fd.field_name)
+
+
+def MakeApprovalStructureAmendment(new_approvals, old_approvals):
+  """Return an Amendment showing an issue's approval structure changed.
+
+  Args:
+    new_approvals: the new list of approvals.
+    old_approvals: the old list of approvals.
+
+  Returns:
+    A new Amendment object.
+  """
+
+  approvals_added, approvals_removed = DiffValueLists(
+      new_approvals, old_approvals)
+  return MakeAmendment(
+      tracker_pb2.FieldID.CUSTOM, _PlusMinusString(
+          approvals_added, approvals_removed),
+      [], [], custom_field_name='Approvals')
+
+
+def MakeApprovalStatusAmendment(new_status):
+  """Return an Amendment showing an issue approval's status changed.
+
+  Args:
+    new_status: ApprovalStatus representing the new approval status.
+
+  Returns:
+    A new Amemdnent object.
+  """
+  return MakeAmendment(
+      tracker_pb2.FieldID.CUSTOM, new_status.name.lower(), [], [],
+      custom_field_name='Status')
+
+
+def MakeApprovalApproversAmendment(approvers_add, approvers_remove):
+  """Return an Amendment showing an issue approval's approvers changed.
+
+  Args:
+    approvers_add: list of approver user_ids being added.
+    approvers_remove: list of approver user_ids being removed.
+
+  Returns:
+    A new Amendment object.
+  """
+  return MakeAmendment(
+      tracker_pb2.FieldID.CUSTOM, '', approvers_add, approvers_remove,
+      custom_field_name='Approvers')
+
+
+def MakeComponentsAmendment(added_comp_ids, removed_comp_ids, config):
+  """Make an Amendment PB for a change to the components."""
+  # TODO(jrobbins): record component IDs as ints and display them with
+  # lookups (and maybe permission checks in the future).  But, what
+  # about history that references deleleted components?
+  added_comp_paths = []
+  for comp_id in added_comp_ids:
+    cd = FindComponentDefByID(comp_id, config)
+    if cd:
+      added_comp_paths.append(cd.path)
+
+  removed_comp_paths = []
+  for comp_id in removed_comp_ids:
+    cd = FindComponentDefByID(comp_id, config)
+    if cd:
+      removed_comp_paths.append(cd.path)
+
+  return _PlusMinusAmendment(
+      tracker_pb2.FieldID.COMPONENTS,
+      added_comp_paths, removed_comp_paths)
+
+
+def MakeBlockedOnAmendment(
+    added_refs, removed_refs, default_project_name=None):
+  """Make an Amendment PB for a change to the blocked on issues."""
+  return _PlusMinusRefsAmendment(
+      tracker_pb2.FieldID.BLOCKEDON, added_refs, removed_refs,
+      default_project_name=default_project_name)
+
+
+def MakeBlockingAmendment(added_refs, removed_refs, default_project_name=None):
+  """Make an Amendment PB for a change to the blocking issues."""
+  return _PlusMinusRefsAmendment(
+      tracker_pb2.FieldID.BLOCKING, added_refs, removed_refs,
+      default_project_name=default_project_name)
+
+
+def MakeMergedIntoAmendment(
+    added_refs, removed_refs, default_project_name=None):
+  """Make an Amendment PB for a change to the merged-into issue."""
+  return _PlusMinusRefsAmendment(
+      tracker_pb2.FieldID.MERGEDINTO, added_refs, removed_refs,
+      default_project_name=default_project_name)
+
+
+def MakeProjectAmendment(new_project_name):
+  """Make an Amendment PB for a change to an issue's project."""
+  return MakeAmendment(
+      tracker_pb2.FieldID.PROJECT, new_project_name, [], [])
+
+
+def AmendmentString_New(amendment, user_display_names):
+  # type: (tracker_pb2.Amendment, Mapping[int, str]) -> str
+  """Produce a displayable string for an Amendment PB.
+
+  Args:
+    amendment: Amendment PB to display.
+    user_display_names: dict {user_id: display_name, ...} including all users
+        mentioned in amendment.
+
+  Returns:
+    A string that could be displayed on a web page or sent in email.
+  """
+  if amendment.newvalue:
+    return amendment.newvalue
+
+  # Display new owner only
+  if amendment.field == tracker_pb2.FieldID.OWNER:
+    if amendment.added_user_ids and amendment.added_user_ids[0]:
+      uid = amendment.added_user_ids[0]
+      result = user_display_names[uid]
+    else:
+      result = framework_constants.NO_USER_NAME
+  else:
+    added = [
+        user_display_names[uid]
+        for uid in amendment.added_user_ids
+        if uid in user_display_names
+    ]
+    removed = [
+        user_display_names[uid]
+        for uid in amendment.removed_user_ids
+        if uid in user_display_names
+    ]
+    result = _PlusMinusString(added, removed)
+
+  return result
+
+
+def AmendmentString(amendment, user_views_by_id):
+  """Produce a displayable string for an Amendment PB.
+
+  TODO(crbug.com/monorail/7571): Delete this function in favor of _New.
+
+  Args:
+    amendment: Amendment PB to display.
+    user_views_by_id: dict {user_id: user_view, ...} including all users
+        mentioned in amendment.
+
+  Returns:
+    A string that could be displayed on a web page or sent in email.
+  """
+  if amendment.newvalue:
+    return amendment.newvalue
+
+  # Display new owner only
+  if amendment.field == tracker_pb2.FieldID.OWNER:
+    if amendment.added_user_ids and amendment.added_user_ids[0]:
+      uid = amendment.added_user_ids[0]
+      result = user_views_by_id[uid].display_name
+    else:
+      result = framework_constants.NO_USER_NAME
+  else:
+    result = _PlusMinusString(
+        [user_views_by_id[uid].display_name for uid in amendment.added_user_ids
+         if uid in user_views_by_id],
+        [user_views_by_id[uid].display_name
+         for uid in amendment.removed_user_ids if uid in user_views_by_id])
+
+  return result
+
+
+def AmendmentLinks(amendment, users_by_id, project_name):
+  """Produce a list of value/url pairs for an Amendment PB.
+
+  Args:
+    amendment: Amendment PB to display.
+    users_by_id: dict {user_id: user_view, ...} including all users
+      mentioned in amendment.
+    project_nme: Name of project the issue/comment/amendment is in.
+
+  Returns:
+    A list of dicts with 'value' and 'url' keys. 'url' may be None.
+  """
+  # Display both old and new summary, status
+  if (amendment.field == tracker_pb2.FieldID.SUMMARY or
+      amendment.field == tracker_pb2.FieldID.STATUS):
+    result = amendment.newvalue
+    oldValue = amendment.oldvalue;
+    # Old issues have a 'NULL' string as the old value of the summary
+    # or status fields. See crbug.com/monorail/3805
+    if oldValue and oldValue != 'NULL':
+      result += ' (was: %s)' % amendment.oldvalue
+    return [{'value': result, 'url': None}]
+  # Display new owner only
+  elif amendment.field == tracker_pb2.FieldID.OWNER:
+    if amendment.added_user_ids and amendment.added_user_ids[0]:
+      uid = amendment.added_user_ids[0]
+      return [{'value': users_by_id[uid].display_name, 'url': None}]
+    return [{'value': framework_constants.NO_USER_NAME, 'url': None}]
+  elif amendment.field in (tracker_pb2.FieldID.BLOCKEDON,
+                           tracker_pb2.FieldID.BLOCKING,
+                           tracker_pb2.FieldID.MERGEDINTO):
+    values = amendment.newvalue.split()
+    bug_refs = [_SafeParseIssueRef(v.strip()) for v in values]
+    issue_urls = [FormatIssueURL(ref, default_project_name=project_name)
+                  for ref in bug_refs]
+    # TODO(jrobbins): Permission checks on referenced issues to allow
+    # showing summary on hover.
+    return [{'value': v, 'url': u} for (v, u) in zip(values, issue_urls)]
+  elif amendment.newvalue:
+    # Catchall for everything except user-valued fields.
+    return [{'value': v, 'url': None} for v in amendment.newvalue.split()]
+  else:
+    # Applies to field==CC or CUSTOM with user type.
+    values = _PlusMinusString(
+        [users_by_id[uid].display_name for uid in amendment.added_user_ids
+         if uid in users_by_id],
+        [users_by_id[uid].display_name for uid in amendment.removed_user_ids
+         if uid in users_by_id])
+    return [{'value': v.strip(), 'url': None} for v in values.split()]
+
+
+def GetAmendmentFieldName(amendment):
+  """Get user-visible name for an amendment to a built-in or custom field."""
+  if amendment.custom_field_name:
+    return amendment.custom_field_name
+  else:
+    field_name = str(amendment.field)
+    return field_name.capitalize()
+
+
+def MakeDanglingIssueRef(project_name, issue_id, ext_id=''):
+  """Create a DanglingIssueRef pb."""
+  ret = tracker_pb2.DanglingIssueRef()
+  ret.project = project_name
+  ret.issue_id = issue_id
+  ret.ext_issue_identifier = ext_id
+  return ret
+
+
+def FormatIssueURL(issue_ref_tuple, default_project_name=None):
+  """Format an issue url from an issue ref."""
+  if issue_ref_tuple is None:
+    return ''
+  project_name, local_id = issue_ref_tuple
+  project_name = project_name or default_project_name
+  url = framework_helpers.FormatURL(
+    None, '/p/%s%s' % (project_name, urls.ISSUE_DETAIL), id=local_id)
+  return url
+
+
+def FormatIssueRef(issue_ref_tuple, default_project_name=None):
+  """Format an issue reference for users: e.g., 123, or projectname:123."""
+  if issue_ref_tuple is None:
+    return ''
+
+  # TODO(jeffcarp): Improve method signature to not require isinstance.
+  if isinstance(issue_ref_tuple, tracker_pb2.DanglingIssueRef):
+    return issue_ref_tuple.ext_issue_identifier or ''
+
+  project_name, local_id = issue_ref_tuple
+  if project_name and project_name != default_project_name:
+    return '%s:%d' % (project_name, local_id)
+  else:
+    return str(local_id)
+
+
+def ParseIssueRef(ref_str):
+  """Parse an issue ref string: e.g., 123, or projectname:123 into a tuple.
+
+  Raises ValueError if the ref string exists but can't be parsed.
+  """
+  if not ref_str.strip():
+    return None
+
+  if ':' in ref_str:
+    project_name, id_str = ref_str.split(':', 1)
+    project_name = project_name.strip().lstrip('-')
+  else:
+    project_name = None
+    id_str = ref_str
+
+  id_str = id_str.lstrip('-')
+
+  return project_name, int(id_str)
+
+
+def _SafeParseIssueRef(ref_str):
+  """Same as ParseIssueRef, but catches ValueError and returns None instead."""
+  try:
+    return ParseIssueRef(ref_str)
+  except ValueError:
+    return None
+
+
+def _MergeFields(field_values, fields_add, fields_remove, field_defs):
+  """Merge the fields to add/remove into the current field values.
+
+  Args:
+    field_values: list of current FieldValue PBs.
+    fields_add: list of FieldValue PBs to add to field_values.  If any of these
+        is for a single-valued field, it replaces all previous values for the
+        same field_id in field_values.
+    fields_remove: list of FieldValues to remove from field_values, if found.
+    field_defs: list of FieldDef PBs from the issue's project's config.
+
+  Returns:
+    A 3-tuple with the merged list of field values and {field_id: field_values}
+    dict for the specific values that are added or removed.  The actual added
+    or removed might be fewer than the requested ones if the issue already had
+    one of the values-to-add or lacked one of the values-to-remove.
+  """
+  is_multi = {fd.field_id: fd.is_multivalued for fd in field_defs}
+  merged_fvs = list(field_values)
+  added_fvs_by_id = collections.defaultdict(list)
+  for fv_consider in fields_add:
+    consider_value = GetFieldValue(fv_consider, {})
+    for old_fv in field_values:
+      # Don't add fv_consider if field_values already contains consider_value
+      if (fv_consider.field_id == old_fv.field_id and
+          GetFieldValue(old_fv, {}) == consider_value and
+          fv_consider.phase_id == old_fv.phase_id):
+        break
+    else:
+      # Drop any existing values for non-multi fields.
+      if not is_multi.get(fv_consider.field_id):
+        if fv_consider.phase_id:
+          # Drop existing phase fvs that belong to the same phase
+          merged_fvs = [fv for fv in merged_fvs if
+                        not (fv.field_id == fv_consider.field_id
+                             and fv.phase_id == fv_consider.phase_id)]
+        else:
+          # Drop existing non-phase fvs
+          merged_fvs = [fv for fv in merged_fvs if
+                        not fv.field_id == fv_consider.field_id]
+      added_fvs_by_id[fv_consider.field_id].append(fv_consider)
+      merged_fvs.append(fv_consider)
+
+  removed_fvs_by_id = collections.defaultdict(list)
+  for fv_consider in fields_remove:
+    consider_value = GetFieldValue(fv_consider, {})
+    for old_fv in field_values:
+      # Only remove fv_consider if field_values contains consider_value
+      if (fv_consider.field_id == old_fv.field_id and
+          GetFieldValue(old_fv, {}) == consider_value and
+          fv_consider.phase_id == old_fv.phase_id):
+        removed_fvs_by_id[fv_consider.field_id].append(fv_consider)
+        merged_fvs.remove(old_fv)
+  return merged_fvs, added_fvs_by_id, removed_fvs_by_id
+
+
+def SplitBlockedOnRanks(issue, target_iid, split_above, open_iids):
+  """Splits issue relation rankings by some target issue's rank
+
+  Args:
+    issue: Issue PB for the issue considered.
+    target_iid: the global ID of the issue to split rankings about.
+    split_above: False to split below the target issue, True to split above.
+    open_iids: a list of global IDs of open and visible issues blocking
+      the considered issue.
+
+  Returns:
+    A tuple (lower, higher) where both are lists of
+    [(blocker_iid, rank),...] of issues in rank order. If split_above is False
+    the target issue is included in higher, otherwise it is included in lower
+  """
+  issue_rank_pairs = [(dst_iid, rank)
+      for (dst_iid, rank) in zip(issue.blocked_on_iids, issue.blocked_on_ranks)
+      if dst_iid in open_iids]
+  # blocked_on_iids is sorted high-to-low, we need low-to-high
+  issue_rank_pairs.reverse()
+  offset = int(split_above)
+  for i, (dst_iid, _) in enumerate(issue_rank_pairs):
+    if dst_iid == target_iid:
+      return issue_rank_pairs[:i + offset], issue_rank_pairs[i + offset:]
+
+  logging.error('Target issue %r was not found in blocked_on_iids of %r',
+                target_iid, issue)
+  return issue_rank_pairs, []
diff --git a/tracker/tracker_constants.py b/tracker/tracker_constants.py
new file mode 100644
index 0000000..e0fe1b2
--- /dev/null
+++ b/tracker/tracker_constants.py
@@ -0,0 +1,252 @@
+# 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
+
+"""Some constants used in Monorail issue tracker pages."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import re
+
+from proto import user_pb2
+
+
+# Default columns shown on issue list page, and other built-in cols.
+DEFAULT_COL_SPEC = 'ID Type Status Priority Milestone Owner Summary'
+OTHER_BUILT_IN_COLS = [
+    'AllLabels', 'Attachments', 'Stars', 'Opened', 'Closed', 'Modified',
+    'BlockedOn', 'Blocking', 'Blocked', 'MergedInto',
+    'Reporter', 'Cc', 'Project', 'Component',
+    'OwnerModified', 'StatusModified', 'ComponentModified',
+    'OwnerLastVisit']
+
+# These are label prefixes that would conflict with built-in column names.
+# E.g., no issue should have a *label* id-1234 or status-foo because any
+# search for "id:1234" or "status:foo" would not look at labels.
+RESERVED_PREFIXES = [
+    'id', 'project', 'reporter', 'summary', 'status', 'owner', 'cc',
+    'attachments', 'attachment', 'component', 'opened', 'closed',
+    'modified', 'is', 'has', 'blockedon', 'blocking', 'blocked', 'mergedinto',
+    'stars', 'starredby', 'description', 'comment', 'commentby', 'label',
+    'hotlist', 'rank', 'explicit_status', 'derived_status', 'explicit_owner',
+    'derived_owner', 'explicit_cc', 'derived_cc', 'explicit_label',
+    'derived_label', 'last_comment_by', 'exact_component',
+    'explicit_component', 'derived_component', 'alllabels', 'gate']
+
+# Suffix of a column name for an approval's approvers.
+APPROVER_COL_SUFFIX = '-approver'
+APPROVAL_SETTER_COL_SUFFIX = '-setter'
+APPROVAL_SET_ON_COL_SUFFIX = '-on'
+
+# Reserved column name suffixes that field names cannot end with.
+RESERVED_COL_NAME_SUFFIXES = [
+    APPROVER_COL_SUFFIX,
+    APPROVAL_SETTER_COL_SUFFIX,
+    APPROVAL_SET_ON_COL_SUFFIX
+]
+
+# The columns are useless in the grid view, so don't offer them.
+# These are also not used in groupby in the issue list.
+NOT_USED_IN_GRID_AXES = [
+    'Summary', 'ID', 'Opened', 'Closed', 'Modified', 'Cc',
+    'OwnerModified', 'StatusModified', 'ComponentModified',
+    'OwnerLastVisit', 'AllLabels']
+
+# Issues per page in the issue list
+DEFAULT_RESULTS_PER_PAGE = 100
+
+# Search field input indicating that the user wants to
+# jump to the specified issue.
+JUMP_RE = re.compile(r'^\d+$')
+
+# Regular expression defining a single search term.
+# Used when parsing the contents of the issue search field.
+TERM_RE = re.compile(r'[-a-zA-Z0-9._]+')
+
+# Pattern used to validate component leaf names, the parts of
+# a component path between the ">" symbols.
+COMPONENT_LEAF_PATTERN = '[a-zA-Z]([-_]?[a-zA-Z0-9])+'
+
+# Regular expression used to validate new component leaf names.
+# This should never match any string with a ">" in it.
+COMPONENT_NAME_RE = re.compile(r'^%s$' % (COMPONENT_LEAF_PATTERN))
+
+# Pattern for matching a full component name, not just a single leaf.
+# Allows any number of repeating valid leaf names separated by ">" characters.
+COMPONENT_PATH_PATTERN = '%s(\>%s)*' % (
+    COMPONENT_LEAF_PATTERN, COMPONENT_LEAF_PATTERN)
+
+# Regular expression used to validate new field names.
+FIELD_NAME_RE = re.compile(r'^[a-zA-Z]([-_]?[a-zA-Z0-9])*$')
+
+# Regular expression used to validate new phase_names.
+PHASE_NAME_RE = re.compile(r'^[a-z]([-_]?[a-z0-9])*$', re.IGNORECASE)
+
+# The next few items are specifications of the defaults for project
+# issue configurations.  These are used for projects that do not have
+# their own config.
+DEFAULT_CANNED_QUERIES = [
+    # Query ID, Name, Base query ID (not used for built-in queries), conditions
+    (1, 'All issues', 0, ''),
+    (2, 'Open issues', 0, 'is:open'),
+    (3, 'Open and owned by me', 0, 'is:open owner:me'),
+    (4, 'Open and reported by me', 0, 'is:open reporter:me'),
+    (5, 'Open and starred by me', 0, 'is:open is:starred'),
+    (6, 'New issues', 0, 'status:new'),
+    (7, 'Issues to verify', 0, 'status=fixed,done'),
+    (8, 'Open with comment by me', 0, 'is:open commentby:me'),
+    ]
+
+DEFAULT_CANNED_QUERY_CONDS = {
+    query_id: cond
+    for (query_id, _name, _base, cond) in DEFAULT_CANNED_QUERIES}
+
+ALL_ISSUES_CAN = 1
+OPEN_ISSUES_CAN = 2
+
+# Define well-known issue statuses.  Each status has 3 parts: a name, a
+# description, and True if the status means that an issue should be
+# considered to be open or False if it should be considered closed.
+DEFAULT_WELL_KNOWN_STATUSES = [
+    # Name, docstring, means_open, deprecated
+    ('New', 'Issue has not had initial review yet', True, False),
+    ('Accepted', 'Problem reproduced / Need acknowledged', True, False),
+    ('Started', 'Work on this issue has begun', True, False),
+    ('Fixed', 'Developer made source code changes, QA should verify', False,
+     False),
+    ('Verified', 'QA has verified that the fix worked', False, False),
+    ('Invalid', 'This was not a valid issue report', False, False),
+    ('Duplicate', 'This report duplicates an existing issue', False, False),
+    ('WontFix', 'We decided to not take action on this issue', False, False),
+    ('Done', 'The requested non-coding task was completed', False, False),
+    ]
+
+DEFAULT_WELL_KNOWN_LABELS = [
+    # Name, docstring, deprecated
+    ('Type-Defect', 'Report of a software defect', False),
+    ('Type-Enhancement', 'Request for enhancement', False),
+    ('Type-Task', 'Work item that doesn\'t change the code or docs', False),
+    ('Type-Other', 'Some other kind of issue', False),
+    ('Priority-Critical', 'Must resolve in the specified milestone', False),
+    ('Priority-High', 'Strongly want to resolve in the specified milestone',
+        False),
+    ('Priority-Medium', 'Normal priority', False),
+    ('Priority-Low', 'Might slip to later milestone', False),
+    ('OpSys-All', 'Affects all operating systems', False),
+    ('OpSys-Windows', 'Affects Windows users', False),
+    ('OpSys-Linux', 'Affects Linux users', False),
+    ('OpSys-OSX', 'Affects Mac OS X users', False),
+    ('Milestone-Release1.0', 'All essential functionality working', False),
+    ('Security', 'Security risk to users', False),
+    ('Performance', 'Performance issue', False),
+    ('Usability', 'Affects program usability', False),
+    ('Maintainability', 'Hinders future changes', False),
+    ]
+
+# Exclusive label prefixes are ones that can only be used once per issue.
+# For example, an issue would normally have only one Priority-* label, whereas
+# an issue might have many OpSys-* labels.
+DEFAULT_EXCL_LABEL_PREFIXES = ['Type', 'Priority', 'Milestone']
+
+DEFAULT_USER_DEFECT_REPORT_TEMPLATE = {
+    'name': 'Defect report from user',
+    'summary': 'Enter one-line summary',
+    'summary_must_be_edited': True,
+    'content': (
+        'What steps will reproduce the problem?\n'
+        '1. \n'
+        '2. \n'
+        '3. \n'
+        '\n'
+        'What is the expected output?\n'
+        '\n'
+        '\n'
+        'What do you see instead?\n'
+        '\n'
+        '\n'
+        'What version of the product are you using? '
+        'On what operating system?\n'
+        '\n'
+        '\n'
+        'Please provide any additional information below.\n'),
+    'status': 'New',
+    'labels': ['Type-Defect', 'Priority-Medium'],
+    }
+
+DEFAULT_DEVELOPER_DEFECT_REPORT_TEMPLATE = {
+    'name': 'Defect report from developer',
+    'summary': 'Enter one-line summary',
+    'summary_must_be_edited': True,
+    'content': (
+        'What steps will reproduce the problem?\n'
+        '1. \n'
+        '2. \n'
+        '3. \n'
+        '\n'
+        'What is the expected output?\n'
+        '\n'
+        '\n'
+        'What do you see instead?\n'
+        '\n'
+        '\n'
+        'Please use labels and text to provide additional information.\n'),
+    'status': 'Accepted',
+    'labels': ['Type-Defect', 'Priority-Medium'],
+    'members_only': True,
+    }
+
+
+DEFAULT_TEMPLATES = [
+    DEFAULT_DEVELOPER_DEFECT_REPORT_TEMPLATE,
+    DEFAULT_USER_DEFECT_REPORT_TEMPLATE,
+    ]
+
+DEFAULT_STATUSES_OFFER_MERGE = ['Duplicate']
+
+
+# This is used by JS on the issue admin page to indicate that the user deleted
+# this template, so it should not be considered when updating the project's
+# issue config.
+DELETED_TEMPLATE_NAME = '<DELETED>'
+
+
+# This is the default maximum total bytes of files attached
+# to all the issues in a project.
+ISSUE_ATTACHMENTS_QUOTA_HARD = 50 * 1024 * 1024
+ISSUE_ATTACHMENTS_QUOTA_SOFT = ISSUE_ATTACHMENTS_QUOTA_HARD - 1 * 1024 * 1024
+
+# Default value for nav action after updating an issue.
+DEFAULT_AFTER_ISSUE_UPDATE = user_pb2.IssueUpdateNav.STAY_SAME_ISSUE
+
+# Maximum comment length to mitigate spammy comments
+MAX_COMMENT_CHARS = 50 * 1024
+MAX_SUMMARY_CHARS = 500
+
+SHORT_SUMMARY_LENGTH = 45
+
+# Number of recent commands to offer the user on the quick edit form.
+MAX_RECENT_COMMANDS = 5
+
+# These recent commands are shown if the user has no history of their own.
+DEFAULT_RECENT_COMMANDS = [
+    ('owner=me status=Accepted', "I'll handle this one."),
+    ('owner=me Priority=High status=Accepted', "I'll look into it soon."),
+    ('status=Fixed', 'The change for this is done now.'),
+    ('Type=Enhancement', 'This is an enhancement, not a defect.'),
+    ('status=Invalid', 'Please report this in a more appropriate place.'),
+    ]
+
+# Consider an issue to be a "noisy" issue if it has more than these:
+NOISY_ISSUE_COMMENT_COUNT = 100
+NOISY_ISSUE_STARRER_COUNT = 100
+
+# After a project owner edits the filter rules, we recompute the
+# derived field values in work items that each handle a chunk of
+# of this many items.
+RECOMPUTE_DERIVED_FIELDS_BLOCK_SIZE = 1000
+
+# This is the number of issues listed in the ReindexQueue table that will
+# be processed each minute.
+MAX_ISSUES_TO_REINDEX_PER_MINUTE = 1000
diff --git a/tracker/tracker_helpers.py b/tracker/tracker_helpers.py
new file mode 100644
index 0000000..c9f9e5a
--- /dev/null
+++ b/tracker/tracker_helpers.py
@@ -0,0 +1,1826 @@
+# 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
+
+"""Helper functions and classes used by the Monorail Issue Tracker pages.
+
+This module has functions that are reused in multiple servlets or
+other modules.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import itertools
+import logging
+import re
+import time
+import urllib
+
+from google.appengine.api import app_identity
+
+from six import string_types
+
+import settings
+
+from features import federated
+from framework import authdata
+from framework import exceptions
+from framework import filecontent
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import permissions
+from framework import sorting
+from framework import template_helpers
+from framework import urls
+from project import project_helpers
+from proto import tracker_pb2
+from services import client_config_svc
+from tracker import field_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+
+
+# HTML input field names for blocked on and blocking issue refs.
+BLOCKED_ON = 'blocked_on'
+BLOCKING = 'blocking'
+
+# This string is used in HTML form element names to identify custom fields.
+# E.g., a value for a custom field with field_id 12 would be specified in
+# an HTML form element with name="custom_12".
+_CUSTOM_FIELD_NAME_PREFIX = 'custom_'
+
+# When the attachment quota gets within 1MB of the limit, stop offering
+# users the option to attach files.
+_SOFT_QUOTA_LEEWAY = 1024 * 1024
+
+# Accessors for sorting built-in fields.
+SORTABLE_FIELDS = {
+    'project': lambda issue: issue.project_name,
+    'id': lambda issue: issue.local_id,
+    'owner': tracker_bizobj.GetOwnerId,  # And postprocessor
+    'reporter': lambda issue: issue.reporter_id,  # And postprocessor
+    'component': lambda issue: issue.component_ids,
+    'cc': tracker_bizobj.GetCcIds,  # And postprocessor
+    'summary': lambda issue: issue.summary.lower(),
+    'stars': lambda issue: issue.star_count,
+    'attachments': lambda issue: issue.attachment_count,
+    'opened': lambda issue: issue.opened_timestamp,
+    'closed': lambda issue: issue.closed_timestamp,
+    'modified': lambda issue: issue.modified_timestamp,
+    'status': tracker_bizobj.GetStatus,
+    'blocked': lambda issue: bool(issue.blocked_on_iids),
+    'blockedon': lambda issue: issue.blocked_on_iids or sorting.MAX_STRING,
+    'blocking': lambda issue: issue.blocking_iids or sorting.MAX_STRING,
+    'mergedinto': lambda issue: issue.merged_into or sorting.MAX_STRING,
+    'ownermodified': lambda issue: issue.owner_modified_timestamp,
+    'statusmodified': lambda issue: issue.status_modified_timestamp,
+    'componentmodified': lambda issue: issue.component_modified_timestamp,
+    'ownerlastvisit': tracker_bizobj.GetOwnerId,  # And postprocessor
+    }
+
+# Some fields take a user ID from the issue and then use that to index
+# into a dictionary of user views, and then get a field of the user view
+# as the value to sort key.
+SORTABLE_FIELDS_POSTPROCESSORS = {
+    'owner': lambda user_view: user_view.email,
+    'reporter': lambda user_view: user_view.email,
+    'cc': lambda user_view: user_view.email,
+    'ownerlastvisit': lambda user_view: -user_view.user.last_visit_timestamp,
+    }
+
+# Here are some restriction labels to help people do the most common things
+# that they might want to do with restrictions.
+_FREQUENT_ISSUE_RESTRICTIONS = [
+    (permissions.VIEW, permissions.EDIT_ISSUE,
+     'Only users who can edit the issue may access it'),
+    (permissions.ADD_ISSUE_COMMENT, permissions.EDIT_ISSUE,
+     'Only users who can edit the issue may add comments'),
+    ]
+
+# These issue restrictions should be offered as examples whenever the project
+# does not have any custom permissions in use already.
+_EXAMPLE_ISSUE_RESTRICTIONS = [
+    (permissions.VIEW, 'CoreTeam',
+     'Custom permission CoreTeam is needed to access'),
+    ]
+
+# Namedtuples that hold data parsed from post_data.
+ParsedComponents = collections.namedtuple(
+    'ParsedComponents', 'entered_str, paths, paths_remove')
+ParsedFields = collections.namedtuple(
+    'ParsedFields',
+    'vals, vals_remove, fields_clear, '
+    'phase_vals, phase_vals_remove')
+ParsedUsers = collections.namedtuple(
+    'ParsedUsers', 'owner_username, owner_id, cc_usernames, '
+    'cc_usernames_remove, cc_ids, cc_ids_remove')
+ParsedBlockers = collections.namedtuple(
+    'ParsedBlockers', 'entered_str, iids, dangling_refs, '
+    'federated_ref_strings')
+ParsedHotlistRef = collections.namedtuple(
+    'ParsedHotlistRef', 'user_email, hotlist_name')
+ParsedHotlists = collections.namedtuple(
+    'ParsedHotlists', 'entered_str, hotlist_refs')
+ParsedIssue = collections.namedtuple(
+    'ParsedIssue', 'summary, comment, is_description, status, users, labels, '
+    'labels_remove, components, fields, template_name, attachments, '
+    'kept_attachments, blocked_on, blocking, hotlists')
+
+
+def ParseIssueRequest(cnxn, post_data, services, errors, default_project_name):
+  """Parse all the possible arguments out of the request.
+
+  Args:
+    cnxn: connection to SQL database.
+    post_data: HTML form information.
+    services: Connections to persistence layer.
+    errors: object to accumulate validation error info.
+    default_project_name: name of the project that contains the issue.
+
+  Returns:
+    A namedtuple with all parsed information.  User IDs are looked up, but
+    also the strings are returned to allow bouncing the user back to correct
+    any errors.
+  """
+  summary = post_data.get('summary', '')
+  comment = post_data.get('comment', '')
+  is_description = bool(post_data.get('description', ''))
+  status = post_data.get('status', '')
+  template_name = urllib.unquote_plus(post_data.get('template_name', ''))
+  component_str = post_data.get('components', '')
+  label_strs = post_data.getall('label')
+
+  if is_description:
+    tmpl_txt = post_data.get('tmpl_txt', '')
+    comment = MarkupDescriptionOnInput(comment, tmpl_txt)
+
+  comp_paths, comp_paths_remove = _ClassifyPlusMinusItems(
+      re.split('[,;\s]+', component_str))
+  parsed_components = ParsedComponents(
+      component_str, comp_paths, comp_paths_remove)
+  labels, labels_remove = _ClassifyPlusMinusItems(label_strs)
+  parsed_fields = _ParseIssueRequestFields(post_data)
+  # TODO(jrobbins): change from numbered fields to a multi-valued field.
+  attachments = _ParseIssueRequestAttachments(post_data)
+  kept_attachments = _ParseIssueRequestKeptAttachments(post_data)
+  parsed_users = _ParseIssueRequestUsers(cnxn, post_data, services)
+  parsed_blocked_on = _ParseBlockers(
+      cnxn, post_data, services, errors, default_project_name, BLOCKED_ON)
+  parsed_blocking = _ParseBlockers(
+      cnxn, post_data, services, errors, default_project_name, BLOCKING)
+  parsed_hotlists = _ParseHotlists(post_data)
+
+  parsed_issue = ParsedIssue(
+      summary, comment, is_description, status, parsed_users, labels,
+      labels_remove, parsed_components, parsed_fields, template_name,
+      attachments, kept_attachments, parsed_blocked_on, parsed_blocking,
+      parsed_hotlists)
+  return parsed_issue
+
+
+def MarkupDescriptionOnInput(content, tmpl_text):
+  """Return HTML for the content of an issue description or comment.
+
+  Args:
+    content: the text sumbitted by the user, any user-entered markup
+             has already been escaped.
+    tmpl_text: the initial text that was put into the textarea.
+
+  Returns:
+    The description content text with template lines highlighted.
+  """
+  tmpl_lines = tmpl_text.split('\n')
+  tmpl_lines = [pl.strip() for pl in tmpl_lines if pl.strip()]
+
+  entered_lines = content.split('\n')
+  marked_lines = [_MarkupDescriptionLineOnInput(line, tmpl_lines)
+                  for line in entered_lines]
+  return '\n'.join(marked_lines)
+
+
+def _MarkupDescriptionLineOnInput(line, tmpl_lines):
+  """Markup one line of an issue description that was just entered.
+
+  Args:
+    line: string containing one line of the user-entered comment.
+    tmpl_lines: list of strings for the text of the template lines.
+
+  Returns:
+    The same user-entered line, or that line highlighted to
+    indicate that it came from the issue template.
+  """
+  for tmpl_line in tmpl_lines:
+    if line.startswith(tmpl_line):
+      return '<b>' + tmpl_line + '</b>' + line[len(tmpl_line):]
+
+  return line
+
+
+def _ClassifyPlusMinusItems(add_remove_list):
+  """Classify the given plus-or-minus items into add and remove lists."""
+  add_remove_set = {s.strip() for s in add_remove_list}
+  add_strs = [s for s in add_remove_set if s and not s.startswith('-')]
+  remove_strs = [s[1:] for s in add_remove_set if s[1:] and s.startswith('-')]
+  return add_strs, remove_strs
+
+
+def _ParseHotlists(post_data):
+  entered_str = post_data.get('hotlists', '').strip()
+  hotlist_refs = []
+  for ref_str in re.split('[,;\s]+', entered_str):
+    if not ref_str:
+      continue
+    if ':' in ref_str:
+      if ref_str.split(':')[0]:
+        # E-mail isn't empty; full reference.
+        hotlist_refs.append(ParsedHotlistRef(*ref_str.split(':', 1)))
+      else:
+        # Short reference.
+        hotlist_refs.append(ParsedHotlistRef(None, ref_str.split(':', 1)[1]))
+    else:
+      # Short reference
+      hotlist_refs.append(ParsedHotlistRef(None, ref_str))
+  parsed_hotlists = ParsedHotlists(entered_str, hotlist_refs)
+  return parsed_hotlists
+
+
+def _ParseIssueRequestFields(post_data):
+  """Iterate over post_data and return custom field values found in it."""
+  field_val_strs = {}
+  field_val_strs_remove = {}
+  phase_field_val_strs = collections.defaultdict(dict)
+  phase_field_val_strs_remove = collections.defaultdict(dict)
+  for key in post_data.keys():
+    if key.startswith(_CUSTOM_FIELD_NAME_PREFIX):
+      val_strs = [v for v in post_data.getall(key) if v]
+      if val_strs:
+        try:
+          field_id = int(key[len(_CUSTOM_FIELD_NAME_PREFIX):])
+          phase_name = None
+        except ValueError:  # key must be in format <field_id>_<phase_name>
+          field_id, phase_name = key[len(_CUSTOM_FIELD_NAME_PREFIX):].split(
+              '_', 1)
+          field_id = int(field_id)
+        if post_data.get('op_' + key) == 'remove':
+          if phase_name:
+            phase_field_val_strs_remove[field_id][phase_name] = val_strs
+          else:
+            field_val_strs_remove[field_id] = val_strs
+        else:
+          if phase_name:
+            phase_field_val_strs[field_id][phase_name] = val_strs
+          else:
+            field_val_strs[field_id] = val_strs
+
+  # TODO(jojwang): monorail:5154, no support for clearing phase field values.
+  fields_clear = []
+  op_prefix = 'op_' + _CUSTOM_FIELD_NAME_PREFIX
+  for op_key in post_data.keys():
+    if op_key.startswith(op_prefix):
+      if post_data.get(op_key) == 'clear':
+        field_id = int(op_key[len(op_prefix):])
+        fields_clear.append(field_id)
+
+  return ParsedFields(
+      field_val_strs, field_val_strs_remove, fields_clear,
+      phase_field_val_strs, phase_field_val_strs_remove)
+
+
+def _ParseIssueRequestAttachments(post_data):
+  """Extract and clean-up any attached files from the post data.
+
+  Args:
+    post_data: dict w/ values from the user's HTTP POST form data.
+
+  Returns:
+    [(filename, filecontents, mimetype), ...] with items for each attachment.
+  """
+  # TODO(jrobbins): change from numbered fields to a multi-valued field.
+  attachments = []
+  for i in range(1, 16):
+    if 'file%s' % i in post_data:
+      item = post_data['file%s' % i]
+      if isinstance(item, string_types):
+        continue
+      if '\\' in item.filename:  # IE insists on giving us the whole path.
+        item.filename = item.filename[item.filename.rindex('\\') + 1:]
+      if not item.filename:
+        continue  # Skip any FILE fields that were not filled in.
+      attachments.append((
+          item.filename, item.value,
+          filecontent.GuessContentTypeFromFilename(item.filename)))
+
+  return attachments
+
+
+def _ParseIssueRequestKeptAttachments(post_data):
+  """Extract attachment ids for attachments kept when updating description
+
+  Args:
+    post_data: dict w/ values from the user's HTTP POST form data.
+
+  Returns:
+    a list of attachment ids for kept attachments
+  """
+  kept_attachments = post_data.getall('keep-attachment')
+  return [int(aid) for aid in kept_attachments]
+
+
+def _ParseIssueRequestUsers(cnxn, post_data, services):
+  """Extract usernames from the POST data, categorize them, and look up IDs.
+
+  Args:
+    cnxn: connection to SQL database.
+    post_data: dict w/ data from the HTTP POST.
+    services: Services.
+
+  Returns:
+    A namedtuple (owner_username, owner_id, cc_usernames, cc_usernames_remove,
+    cc_ids, cc_ids_remove), containing:
+      - issue owner's name and user ID, if any
+      - the list of all cc'd usernames
+      - the user IDs to add or remove from the issue CC list.
+    Any of these user IDs may be  None if the corresponding username
+    or email address is invalid.
+  """
+  # Get the user-entered values from post_data.
+  cc_username_str = post_data.get('cc', '').lower()
+  owner_email = post_data.get('owner', '').strip().lower()
+
+  cc_usernames, cc_usernames_remove = _ClassifyPlusMinusItems(
+      re.split('[,;\s]+', cc_username_str))
+
+  # Figure out the email addresses to lookup and do the lookup.
+  emails_to_lookup = cc_usernames + cc_usernames_remove
+  if owner_email:
+    emails_to_lookup.append(owner_email)
+  all_user_ids = services.user.LookupUserIDs(
+      cnxn, emails_to_lookup, autocreate=True)
+  if owner_email:
+    owner_id = all_user_ids.get(owner_email)
+  else:
+    owner_id = framework_constants.NO_USER_SPECIFIED
+
+  # Lookup the user IDs of the Cc addresses to add or remove.
+  cc_ids = [all_user_ids.get(cc) for cc in cc_usernames if cc]
+  cc_ids_remove = [all_user_ids.get(cc) for cc in cc_usernames_remove if cc]
+
+  return ParsedUsers(owner_email, owner_id, cc_usernames, cc_usernames_remove,
+                     cc_ids, cc_ids_remove)
+
+
+def _ParseBlockers(cnxn, post_data, services, errors, default_project_name,
+                   field_name):
+  """Parse input for issues that the current issue is blocking/blocked on.
+
+  Args:
+    cnxn: connection to SQL database.
+    post_data: dict w/ values from the user's HTTP POST.
+    services: connections to backend services.
+    errors: object to accumulate validation error info.
+    default_project_name: name of the project that contains the issue.
+    field_name: string HTML input field name, e.g., BLOCKED_ON or BLOCKING.
+
+  Returns:
+    A namedtuple with the user input string, and a list of issue IDs.
+  """
+  entered_str = post_data.get(field_name, '').strip()
+  blocker_iids = []
+  dangling_ref_tuples = []
+  federated_ref_strings = []
+
+  issue_ref = None
+  for ref_str in re.split('[,;\s]+', entered_str):
+    # Handle federated references.
+    if federated.IsShortlinkValid(ref_str):
+      federated_ref_strings.append(ref_str)
+      continue
+
+    try:
+      issue_ref = tracker_bizobj.ParseIssueRef(ref_str)
+    except ValueError:
+      setattr(errors, field_name, 'Invalid issue ID %s' % ref_str.strip())
+      break
+
+    if not issue_ref:
+      continue
+
+    blocker_project_name, blocker_issue_id = issue_ref
+    if not blocker_project_name:
+      blocker_project_name = default_project_name
+
+    # Detect and report if the same issue was specified.
+    current_issue_id = int(post_data.get('id')) if post_data.get('id') else -1
+    if (blocker_issue_id == current_issue_id and
+        blocker_project_name == default_project_name):
+      setattr(errors, field_name, 'Cannot be %s the same issue' % field_name)
+      break
+
+    ref_projects = services.project.GetProjectsByName(
+        cnxn, set([blocker_project_name]))
+    blocker_iid, _misses = services.issue.ResolveIssueRefs(
+        cnxn, ref_projects, default_project_name, [issue_ref])
+    if not blocker_iid:
+      if blocker_project_name in settings.recognized_codesite_projects:
+        # We didn't find the issue, but it had a explicitly-specified project
+        # which we know is on Codesite. Allow it as a dangling reference.
+        dangling_ref_tuples.append(issue_ref)
+        continue
+      else:
+        # Otherwise, it doesn't exist, so report it.
+        setattr(errors, field_name, 'Invalid issue ID %s' % ref_str.strip())
+        break
+    if blocker_iid[0] not in blocker_iids:
+      blocker_iids.extend(blocker_iid)
+
+  blocker_iids.sort()
+  dangling_ref_tuples.sort()
+  return ParsedBlockers(entered_str, blocker_iids, dangling_ref_tuples,
+      federated_ref_strings)
+
+
+def PairDerivedValuesWithRuleExplanations(
+    proposed_issue, traces, derived_users_by_id):
+  """Pair up values and explanations into JSON objects."""
+  derived_labels_and_why = [
+      {'value': lab,
+       'why': traces.get((tracker_pb2.FieldID.LABELS, lab))}
+      for lab in proposed_issue.derived_labels]
+
+  derived_users_by_id = {
+      user_id: user_view.display_name
+      for user_id, user_view in derived_users_by_id.items()
+      if user_view.display_name}
+
+  derived_owner_and_why = []
+  if proposed_issue.derived_owner_id:
+    derived_owner_and_why = [{
+        'value': derived_users_by_id[proposed_issue.derived_owner_id],
+        'why': traces.get(
+            (tracker_pb2.FieldID.OWNER, proposed_issue.derived_owner_id))}]
+  derived_cc_and_why = [
+      {'value': derived_users_by_id[cc_id],
+       'why': traces.get((tracker_pb2.FieldID.CC, cc_id))}
+      for cc_id in proposed_issue.derived_cc_ids
+      if cc_id in derived_users_by_id]
+
+  warnings_and_why = [
+      {'value': warning,
+       'why': traces.get((tracker_pb2.FieldID.WARNING, warning))}
+      for warning in proposed_issue.derived_warnings]
+
+  errors_and_why = [
+      {'value': error,
+       'why': traces.get((tracker_pb2.FieldID.ERROR, error))}
+      for error in proposed_issue.derived_errors]
+
+  return (derived_labels_and_why, derived_owner_and_why, derived_cc_and_why,
+          warnings_and_why, errors_and_why)
+
+
+def IsValidIssueOwner(cnxn, project, owner_id, services):
+  """Return True if the given user ID can be an issue owner.
+
+  Args:
+    cnxn: connection to SQL database.
+    project: the current Project PB.
+    owner_id: the user ID of the proposed issue owner.
+    services: connections to backends.
+
+  It is OK to have 0 for the owner_id, that simply means that the issue is
+  unassigned.
+
+  Returns:
+    A pair (valid, err_msg).  valid is True if the given user ID can be an
+    issue owner. err_msg is an error message string to display to the user
+    if valid == False, and is None if valid == True.
+  """
+  # An issue is always allowed to have no owner specified.
+  if owner_id == framework_constants.NO_USER_SPECIFIED:
+    return True, None
+
+  try:
+    auth = authdata.AuthData.FromUserID(cnxn, owner_id, services)
+    if not framework_bizobj.UserIsInProject(project, auth.effective_ids):
+      return False, 'Issue owner must be a project member.'
+  except exceptions.NoSuchUserException:
+    return False, 'Issue owner user ID not found.'
+
+  group_ids = services.usergroup.DetermineWhichUserIDsAreGroups(
+      cnxn, [owner_id])
+  if owner_id in group_ids:
+    return False, 'Issue owner cannot be a user group.'
+
+  return True, None
+
+
+def GetAllowedOpenedAndClosedIssues(mr, issue_ids, services):
+  """Get filtered lists of open and closed issues identified by issue_ids.
+
+  The function then filters the results to only the issues that the user
+  is allowed to view.  E.g., we only auto-link to issues that the user
+  would be able to view if they clicked the link.
+
+  Args:
+    mr: commonly used info parsed from the request.
+    issue_ids: list of int issue IDs for the target issues.
+    services: connection to issue, config, and project persistence layers.
+
+  Returns:
+    Two lists of issues that the user is allowed to view: one for open
+    issues and one for closed issues.
+  """
+  open_issues, closed_issues = services.issue.GetOpenAndClosedIssues(
+      mr.cnxn, issue_ids)
+  return GetAllowedIssues(mr, [open_issues, closed_issues], services)
+
+
+def GetAllowedIssues(mr, issue_groups, services):
+  """Filter lists of issues identified by issue_groups.
+
+  Args:
+    mr: commonly used info parsed from the request.
+    issue_groups: list of list of issues to filter.
+    services: connection to issue, config, and project persistence layers.
+
+  Returns:
+    List of filtered list of issues.
+  """
+
+  project_dict = GetAllIssueProjects(
+      mr.cnxn, itertools.chain.from_iterable(issue_groups), services.project)
+  config_dict = services.config.GetProjectConfigs(mr.cnxn,
+      list(project_dict.keys()))
+  return [FilterOutNonViewableIssues(
+      mr.auth.effective_ids, mr.auth.user_pb, project_dict, config_dict,
+      issues)
+          for issues in issue_groups]
+
+
+def MakeViewsForUsersInIssues(cnxn, issue_list, user_service, omit_ids=None):
+  """Lookup all the users involved in any of the given issues.
+
+  Args:
+    cnxn: connection to SQL database.
+    issue_list: list of Issue PBs from a result query.
+    user_service: Connection to User backend storage.
+    omit_ids: a list of user_ids to omit, e.g., because we already have them.
+
+  Returns:
+    A dictionary {user_id: user_view,...} for all the users involved
+    in the given issues.
+  """
+  issue_participant_id_set = tracker_bizobj.UsersInvolvedInIssues(issue_list)
+  if omit_ids:
+    issue_participant_id_set.difference_update(omit_ids)
+
+  # TODO(jrobbins): consider caching View objects as well.
+  users_by_id = framework_views.MakeAllUserViews(
+      cnxn, user_service, issue_participant_id_set)
+
+  return users_by_id
+
+
+def FormatIssueListURL(
+    mr, config, absolute=True, project_names=None, **kwargs):
+  """Format a link back to list view as configured by user."""
+  if project_names is None:
+    project_names = [mr.project_name]
+  if tracker_constants.JUMP_RE.match(mr.query):
+    kwargs['q'] = 'id=%s' % mr.query
+    kwargs['can'] = 1  # The specified issue might be closed.
+  else:
+    kwargs['q'] = mr.query
+    if mr.can and mr.can != 2:
+      kwargs['can'] = mr.can
+  def_col_spec = config.default_col_spec
+  if mr.col_spec and mr.col_spec != def_col_spec:
+    kwargs['colspec'] = mr.col_spec
+  if mr.sort_spec:
+    kwargs['sort'] = mr.sort_spec
+  if mr.group_by_spec:
+    kwargs['groupby'] = mr.group_by_spec
+  if mr.start:
+    kwargs['start'] = mr.start
+  if mr.num != tracker_constants.DEFAULT_RESULTS_PER_PAGE:
+    kwargs['num'] = mr.num
+
+  if len(project_names) == 1:
+    url = '/p/%s%s' % (project_names[0], urls.ISSUE_LIST)
+  else:
+    url = urls.ISSUE_LIST
+    kwargs['projects'] = ','.join(sorted(project_names))
+
+  param_strings = ['%s=%s' % (k, urllib.quote((u'%s' % v).encode('utf-8')))
+                   for k, v in kwargs.items()]
+  if param_strings:
+    url += '?' + '&'.join(sorted(param_strings))
+  if absolute:
+    url = '%s://%s%s' % (mr.request.scheme, mr.request.host, url)
+
+  return url
+
+
+def FormatRelativeIssueURL(project_name, path, **kwargs):
+  """Format a URL to get to an issue in the named project.
+
+  Args:
+    project_name: string name of the project containing the issue.
+    path: string servlet path, e.g., from framework/urls.py.
+    **kwargs: additional query-string parameters to include in the URL.
+
+  Returns:
+    A URL string.
+  """
+  return framework_helpers.FormatURL(
+      None, '/p/%s%s' % (project_name, path), **kwargs)
+
+
+def FormatCrBugURL(project_name, local_id):
+  """Format a short URL to get to an issue in the named project.
+
+  Args:
+    project_name: string name of the project containing the issue.
+    local_id: int local ID of the issue.
+
+  Returns:
+    A URL string.
+  """
+  if app_identity.get_application_id() != 'monorail-prod':
+    return FormatRelativeIssueURL(
+      project_name, urls.ISSUE_DETAIL, id=local_id)
+
+  if project_name == 'chromium':
+    return 'https://crbug.com/%d' % local_id
+
+  return 'https://crbug.com/%s/%d' % (project_name, local_id)
+
+
+def ComputeNewQuotaBytesUsed(project, attachments):
+  """Add the given attachments to the project's attachment quota usage.
+
+  Args:
+    project: Project PB  for the project being updated.
+    attachments: a list of attachments being added to an issue.
+
+  Returns:
+    The new number of bytes used.
+
+  Raises:
+    OverAttachmentQuota: If project would go over quota.
+  """
+  total_attach_size = 0
+  for _filename, content, _mimetype in attachments:
+    total_attach_size += len(content)
+
+  new_bytes_used = project.attachment_bytes_used + total_attach_size
+  quota = (project.attachment_quota or
+           tracker_constants.ISSUE_ATTACHMENTS_QUOTA_HARD)
+  if new_bytes_used > quota:
+    raise exceptions.OverAttachmentQuota(new_bytes_used - quota)
+  return new_bytes_used
+
+
+def IsUnderSoftAttachmentQuota(project):
+  """Check the project's attachment quota against the soft quota limit.
+
+  If there is a custom quota on the project, this will check against
+  that instead of the system-wide default quota.
+
+  Args:
+    project: Project PB for the project to examine
+
+  Returns:
+    True if the project is under quota, false otherwise.
+  """
+  quota = tracker_constants.ISSUE_ATTACHMENTS_QUOTA_SOFT
+  if project.attachment_quota:
+    quota = project.attachment_quota - _SOFT_QUOTA_LEEWAY
+
+  return project.attachment_bytes_used < quota
+
+
+def GetAllIssueProjects(cnxn, issues, project_service):
+  """Get all the projects that the given issues belong to.
+
+  Args:
+    cnxn: connection to SQL database.
+    issues: list of issues, which may come from different projects.
+    project_service: connection to project persistence layer.
+
+  Returns:
+    A dictionary {project_id: project} of all the projects that
+    any of the given issues belongs to.
+  """
+  needed_project_ids = {issue.project_id for issue in issues}
+  project_dict = project_service.GetProjects(cnxn, needed_project_ids)
+  return project_dict
+
+
+def GetPermissionsInAllProjects(user, effective_ids, projects):
+  """Look up the permissions for the given user in each project."""
+  return {
+      project.project_id:
+      permissions.GetPermissions(user, effective_ids, project)
+      for project in projects}
+
+
+def FilterOutNonViewableIssues(
+    effective_ids, user, project_dict, config_dict, issues):
+  """Return a filtered list of issues that the user can view."""
+  perms_dict = GetPermissionsInAllProjects(
+      user, effective_ids, list(project_dict.values()))
+
+  denied_project_ids = {
+      pid for pid, p in project_dict.items()
+      if not permissions.CanView(effective_ids, perms_dict[pid], p, [])}
+
+  results = []
+  for issue in issues:
+    if issue.deleted or issue.project_id in denied_project_ids:
+      continue
+
+    if not permissions.HasRestrictions(issue):
+      may_view = True
+    else:
+      perms = perms_dict[issue.project_id]
+      project = project_dict[issue.project_id]
+      config = config_dict.get(issue.project_id, config_dict.get('harmonized'))
+      granted_perms = tracker_bizobj.GetGrantedPerms(
+          issue, effective_ids, config)
+      may_view = permissions.CanViewIssue(
+          effective_ids, perms, project, issue, granted_perms=granted_perms)
+
+    if may_view:
+      results.append(issue)
+
+  return results
+
+
+def MeansOpenInProject(status, config):
+  """Return true if this status means that the issue is still open.
+
+  This defaults to true if we could not find a matching status.
+
+  Args:
+    status: issue status string. E.g., 'New'.
+    config: the config of the current project.
+
+  Returns:
+    Boolean True if the status means that the issue is open.
+  """
+  status_lower = status.lower()
+
+  # iterate over the list of known statuses for this project
+  # return true if we find a match that declares itself to be open
+  for wks in config.well_known_statuses:
+    if wks.status.lower() == status_lower:
+      return wks.means_open
+
+  return True
+
+
+def IsNoisy(num_comments, num_starrers):
+  """Return True if this is a "noisy" issue that would send a ton of emails.
+
+  The rule is that a very active issue with a large number of comments
+  and starrers will only send notification when a comment (or change)
+  is made by a project member.
+
+  Args:
+    num_comments: int number of comments on issue so far.
+    num_starrers: int number of users who starred the issue.
+
+  Returns:
+    True if we will not bother starrers with an email notification for
+    changes made by non-members.
+  """
+  return (num_comments >= tracker_constants.NOISY_ISSUE_COMMENT_COUNT and
+          num_starrers >= tracker_constants.NOISY_ISSUE_STARRER_COUNT)
+
+
+def MergeCCsAndAddComment(services, mr, issue, merge_into_issue):
+  """Modify the CC field of the target issue and add a comment to it."""
+  return MergeCCsAndAddCommentMultipleIssues(
+      services, mr, [issue], merge_into_issue)
+
+
+def MergeCCsAndAddCommentMultipleIssues(
+    services, mr, issues, merge_into_issue):
+  """Modify the CC field of the target issue and add a comment to it."""
+  merge_comment = ''
+  for issue in issues:
+    if issue.project_name == merge_into_issue.project_name:
+      issue_ref_str = '%d' % issue.local_id
+    else:
+      issue_ref_str = '%s:%d' % (issue.project_name, issue.local_id)
+    if merge_comment:
+      merge_comment += '\n'
+    merge_comment += 'Issue %s has been merged into this issue.' % issue_ref_str
+
+  add_cc = _ComputeNewCcsFromIssueMerge(merge_into_issue, issues)
+
+  config = services.config.GetProjectConfig(
+      mr.cnxn, merge_into_issue.project_id)
+  delta = tracker_pb2.IssueDelta(cc_ids_add=add_cc)
+  _, merge_comment_pb = services.issue.DeltaUpdateIssue(
+    mr.cnxn, services, mr.auth.user_id, merge_into_issue.project_id,
+    config, merge_into_issue, delta, index_now=False, comment=merge_comment)
+
+  return merge_comment_pb
+
+
+def GetAttachmentIfAllowed(mr, services):
+  """Retrieve the requested attachment, or raise an appropriate exception.
+
+  Args:
+    mr: commonly used info parsed from the request.
+    services: connections to backend services.
+
+  Returns:
+    The requested Attachment PB, and the Issue that it belongs to.
+
+  Raises:
+    NoSuchAttachmentException: attachment was not found or was marked deleted.
+    NoSuchIssueException: issue that contains attachment was not found.
+    PermissionException: the user is not allowed to view the attachment.
+  """
+  attachment = None
+
+  attachment, cid, issue_id = services.issue.GetAttachmentAndContext(
+      mr.cnxn, mr.aid)
+
+  issue = services.issue.GetIssue(mr.cnxn, issue_id)
+  config = services.config.GetProjectConfig(mr.cnxn, issue.project_id)
+  granted_perms = tracker_bizobj.GetGrantedPerms(
+      issue, mr.auth.effective_ids, config)
+  permit_view = permissions.CanViewIssue(
+      mr.auth.effective_ids, mr.perms, mr.project, issue,
+      granted_perms=granted_perms)
+  if not permit_view:
+    raise permissions.PermissionException('Cannot view attachment\'s issue')
+
+  comment = services.issue.GetComment(mr.cnxn, cid)
+  commenter = services.user.GetUser(mr.cnxn, comment.user_id)
+  issue_perms = permissions.UpdateIssuePermissions(
+      mr.perms, mr.project, issue, mr.auth.effective_ids,
+      granted_perms=granted_perms)
+  can_view_comment = permissions.CanViewComment(
+      comment, commenter, mr.auth.user_id, issue_perms)
+  if not can_view_comment:
+    raise permissions.PermissionException('Cannot view attachment\'s comment')
+
+  return attachment, issue
+
+
+def LabelsMaskedByFields(config, field_names, trim_prefix=False):
+  """Return a list of EZTItems for labels that would be masked by fields."""
+  return _LabelsMaskedOrNot(config, field_names, trim_prefix=trim_prefix)
+
+
+def LabelsNotMaskedByFields(config, field_names, trim_prefix=False):
+  """Return a list of EZTItems for labels that would not be masked."""
+  return _LabelsMaskedOrNot(
+      config, field_names, invert=True, trim_prefix=trim_prefix)
+
+
+def _LabelsMaskedOrNot(config, field_names, invert=False, trim_prefix=False):
+  """Return EZTItems for labels that'd be masked. Or not, when invert=True."""
+  field_names = [fn.lower() for fn in field_names]
+  result = []
+  for wkl in config.well_known_labels:
+    masked_by = tracker_bizobj.LabelIsMaskedByField(wkl.label, field_names)
+    if (masked_by and not invert) or (not masked_by and invert):
+      display_name = wkl.label
+      if trim_prefix:
+        display_name = display_name[len(masked_by) + 1:]
+      result.append(template_helpers.EZTItem(
+          name=display_name,
+          name_padded=display_name.ljust(20),
+          commented='#' if wkl.deprecated else '',
+          docstring=wkl.label_docstring,
+          docstring_short=template_helpers.FitUnsafeText(
+              wkl.label_docstring, 40),
+          idx=len(result)))
+
+  return result
+
+
+def LookupComponentIDs(component_paths, config, errors=None):
+  """Look up the IDs of the specified components in the given config."""
+  component_ids = []
+  for path in component_paths:
+    if not path:
+      continue
+    cd = tracker_bizobj.FindComponentDef(path, config)
+    if cd:
+      component_ids.append(cd.component_id)
+    else:
+      error_text = 'Unknown component %s' % path
+      if errors:
+        errors.components = error_text
+      else:
+        logging.info(error_text)
+
+  return component_ids
+
+
+def ParsePostDataUsers(cnxn, pd_users_str, user_service):
+  """Parse all the usernames from a users string found in a post data."""
+  emails, _remove = _ClassifyPlusMinusItems(re.split('[,;\s]+', pd_users_str))
+  users_ids_by_email = user_service.LookupUserIDs(cnxn, emails, autocreate=True)
+  user_ids = [users_ids_by_email[username] for username in emails if username]
+  return user_ids, pd_users_str
+
+
+def FilterIssueTypes(config):
+  """Return a list of well-known issue types."""
+  well_known_issue_types = []
+  for wk_label in config.well_known_labels:
+    if wk_label.label.lower().startswith('type-'):
+      _, type_name = wk_label.label.split('-', 1)
+      well_known_issue_types.append(type_name)
+
+  return well_known_issue_types
+
+
+def ParseMergeFields(
+    cnxn, services, project_name, post_data, status, config, issue, errors):
+  """Parse info that identifies the issue to merge into, if any."""
+  merge_into_text = ''
+  merge_into_ref = None
+  merge_into_issue = None
+
+  if status not in config.statuses_offer_merge:
+    return '', None
+
+  merge_into_text = post_data.get('merge_into', '')
+  if merge_into_text:
+    try:
+      merge_into_ref = tracker_bizobj.ParseIssueRef(merge_into_text)
+    except ValueError:
+      logging.info('merge_into not an int: %r', merge_into_text)
+      errors.merge_into_id = 'Please enter a valid issue ID'
+
+  if not merge_into_ref:
+    errors.merge_into_id = 'Please enter an issue ID'
+    return merge_into_text, None
+
+  merge_into_project_name, merge_into_id = merge_into_ref
+  if (merge_into_id == issue.local_id and
+      (merge_into_project_name == project_name or
+       not merge_into_project_name)):
+    logging.info('user tried to merge issue into itself: %r', merge_into_ref)
+    errors.merge_into_id = 'Cannot merge issue into itself'
+    return merge_into_text, None
+
+  project = services.project.GetProjectByName(
+      cnxn, merge_into_project_name or project_name)
+  try:
+    # Because we will modify this issue, load from DB rather than cache.
+    merge_into_issue = services.issue.GetIssueByLocalID(
+        cnxn, project.project_id, merge_into_id, use_cache=False)
+  except Exception:
+    logging.info('merge_into issue not found: %r', merge_into_ref)
+    errors.merge_into_id = 'No such issue'
+    return merge_into_text, None
+
+  return merge_into_text, merge_into_issue
+
+
+def GetNewIssueStarrers(cnxn, services, issue_ids, merge_into_iid):
+  # type: (MonorailConnection, Services, Sequence[int], int) ->
+  #     Collection[int]
+  """Get starrers of current issue who have not starred the target issue."""
+  source_starrers_dict = services.issue_star.LookupItemsStarrers(
+      cnxn, issue_ids)
+  source_starrers = list(
+      itertools.chain.from_iterable(source_starrers_dict.values()))
+  target_starrers = services.issue_star.LookupItemStarrers(
+      cnxn, merge_into_iid)
+  return set(source_starrers) - set(target_starrers)
+
+
+def AddIssueStarrers(
+    cnxn, services, mr, merge_into_iid, merge_into_project, new_starrers):
+  """Merge all the starrers for the current issue into the target issue."""
+  project = merge_into_project or mr.project
+  config = services.config.GetProjectConfig(mr.cnxn, project.project_id)
+  services.issue_star.SetStarsBatch(
+      cnxn, services, config, merge_into_iid, new_starrers, True)
+
+
+def IsMergeAllowed(merge_into_issue, mr, services):
+  """Check to see if user has permission to merge with specified issue."""
+  merge_into_project = services.project.GetProjectByName(
+      mr.cnxn, merge_into_issue.project_name)
+  merge_into_config = services.config.GetProjectConfig(
+      mr.cnxn, merge_into_project.project_id)
+  merge_granted_perms = tracker_bizobj.GetGrantedPerms(
+      merge_into_issue, mr.auth.effective_ids, merge_into_config)
+
+  merge_view_allowed = mr.perms.CanUsePerm(
+      permissions.VIEW, mr.auth.effective_ids,
+      merge_into_project, permissions.GetRestrictions(merge_into_issue),
+      granted_perms=merge_granted_perms)
+  merge_edit_allowed = mr.perms.CanUsePerm(
+      permissions.EDIT_ISSUE, mr.auth.effective_ids,
+      merge_into_project, permissions.GetRestrictions(merge_into_issue),
+      granted_perms=merge_granted_perms)
+
+  return merge_view_allowed and merge_edit_allowed
+
+
+def GetVisibleMembers(mr, project, services):
+  all_member_ids = project_helpers.AllProjectMembers(project)
+
+  all_group_ids = services.usergroup.DetermineWhichUserIDsAreGroups(
+      mr.cnxn, all_member_ids)
+
+  (ac_exclusion_ids, no_expand_ids
+   ) = services.project.GetProjectAutocompleteExclusion(
+      mr.cnxn, project.project_id)
+
+  group_ids_to_expand = [
+    gid for gid in all_group_ids if gid not in no_expand_ids]
+
+  # TODO(jrobbins): Normally, users will be allowed view the members
+  # of any user group if the project From: email address is listed
+  # as a group member, as well as any group that they are personally
+  # members of.
+  member_ids, owner_ids = services.usergroup.LookupVisibleMembers(
+      mr.cnxn, group_ids_to_expand, mr.perms, mr.auth.effective_ids, services)
+  indirect_user_ids = set()
+  for gids in member_ids.values():
+    indirect_user_ids.update(gids)
+  for gids in owner_ids.values():
+    indirect_user_ids.update(gids)
+
+  visible_member_ids = _FilterMemberData(
+      mr, project.owner_ids, project.committer_ids, project.contributor_ids,
+      indirect_user_ids, project)
+
+  visible_member_ids = _MergeLinkedMembers(
+      mr.cnxn, services.user, visible_member_ids)
+
+  visible_member_views = framework_views.MakeAllUserViews(
+      mr.cnxn, services.user, visible_member_ids, group_ids=all_group_ids)
+  framework_views.RevealAllEmailsToMembers(
+      mr.cnxn, services, mr.auth, visible_member_views, project)
+
+  # Filter out service accounts
+  service_acct_emails = set(
+      client_config_svc.GetClientConfigSvc().GetClientIDEmails()[1])
+  visible_member_views = {
+      m.user_id: m
+      for m in visible_member_views.values()
+      # Hide service accounts from autocomplete.
+      if not framework_helpers.IsServiceAccount(
+          m.email, client_emails=service_acct_emails)
+      # Hide users who opted out of autocomplete.
+      and not m.user_id in ac_exclusion_ids
+      # Hide users who have obscured email addresses.
+      and not m.obscure_email
+  }
+
+  return visible_member_views
+
+
+def _MergeLinkedMembers(cnxn, user_service, user_ids):
+  """Remove any linked child accounts if the parent would also be shown."""
+  all_ids = set(user_ids)
+  users_by_id = user_service.GetUsersByIDs(cnxn, user_ids)
+  result = [uid for uid in user_ids
+            if users_by_id[uid].linked_parent_id not in all_ids]
+  return result
+
+
+def _FilterMemberData(
+    mr, owner_ids, committer_ids, contributor_ids, indirect_member_ids,
+    project):
+  """Return a filtered list of members that the user can view.
+
+  In most projects, everyone can view the entire member list.  But,
+  some projects are configured to only allow project owners to see
+  all members. In those projects, committers and contributors do not
+  see any contributors.  Regardless of how the project is configured
+  or the role that the user plays in the current project, we include
+  any indirect members through user groups that the user has access
+  to view.
+
+  Args:
+    mr: Commonly used info parsed from the HTTP request.
+    owner_views: list of user IDs for project owners.
+    committer_views: list of user IDs for project committers.
+    contributor_views: list of user IDs for project contributors.
+    indirect_member_views: list of user IDs for users who have
+        an indirect role in the project via a user group, and that the
+        logged in user is allowed to see.
+    project: the Project we're interested in.
+
+  Returns:
+    A list of owners, committer and visible indirect members if the user is not
+    signed in.  If the project is set to display contributors to non-owners or
+    the signed in user has necessary permissions then additionally a list of
+    contributors.
+  """
+  visible_members_ids = set()
+
+  # Everyone can view owners and committers
+  visible_members_ids.update(owner_ids)
+  visible_members_ids.update(committer_ids)
+
+  # The list of indirect members is already limited to ones that the user
+  # is allowed to see according to user group settings.
+  visible_members_ids.update(indirect_member_ids)
+
+  # If the user is allowed to view the list of contributors, add those too.
+  if permissions.CanViewContributorList(mr, project):
+    visible_members_ids.update(contributor_ids)
+
+  return sorted(visible_members_ids)
+
+
+def GetLabelOptions(config, custom_permissions):
+  """Prepares label options for autocomplete."""
+  labels = []
+  field_names = [
+    fd.field_name
+    for fd in config.field_defs
+    if not fd.is_deleted
+    and fd.field_type is tracker_pb2.FieldTypes.ENUM_TYPE
+  ]
+  non_masked_labels = LabelsNotMaskedByFields(config, field_names)
+  for wkl in non_masked_labels:
+    if not wkl.commented:
+      item = {'name': wkl.name, 'doc': wkl.docstring}
+      labels.append(item)
+
+  frequent_restrictions = _FREQUENT_ISSUE_RESTRICTIONS[:]
+  if not custom_permissions:
+    frequent_restrictions.extend(_EXAMPLE_ISSUE_RESTRICTIONS)
+
+  labels.extend(_BuildRestrictionChoices(
+      frequent_restrictions, permissions.STANDARD_ISSUE_PERMISSIONS,
+      custom_permissions))
+
+  return labels
+
+
+def _BuildRestrictionChoices(freq_restrictions, actions, custom_permissions):
+  """Return a list of autocompletion choices for restriction labels.
+
+  Args:
+    freq_restrictions: list of (action, perm, doc) tuples for restrictions
+        that are frequently used.
+    actions: list of strings for actions that are relevant to the current
+      artifact.
+    custom_permissions: list of strings with custom permissions for the project.
+
+  Returns:
+    A list of dictionaries [{'name': 'perm name', 'doc': 'docstring'}, ...]
+    suitable for use in a JSON feed to our JS autocompletion functions.
+  """
+  choices = []
+
+  for action, perm, doc in freq_restrictions:
+    choices.append({
+        'name': 'Restrict-%s-%s' % (action, perm),
+        'doc': doc,
+        })
+
+  for action in actions:
+    for perm in custom_permissions:
+      choices.append({
+          'name': 'Restrict-%s-%s' % (action, perm),
+          'doc': 'Permission %s needed to use %s' % (perm, action),
+          })
+
+  return choices
+
+
+def FilterKeptAttachments(
+    is_description, kept_attachments, comments, approval_id):
+  """Filter kept attachments to be a subset of last description's attachments.
+
+  Args:
+    is_description: bool, if the comment is a change to the issue description.
+    kept_attachments: list of ints with the attachment ids for attachments
+        kept from previous descriptions, if the comment is a change to the
+        issue description.
+    comments: list of IssueComment PBs for the issue we want to edit.
+    approval_id: int id of the APPROVAL_TYPE fielddef, if we're editing an
+        approval description, or None otherwise.
+
+  Returns:
+    A list of kept_attachment ids that are a subset of the last description.
+  """
+  if not is_description:
+    return None
+
+  attachment_ids = set()
+  for comment in reversed(comments):
+    if comment.is_description and comment.approval_id == approval_id:
+      attachment_ids = set([a.attachment_id for a in comment.attachments])
+      break
+
+  kept_attachments = [
+      aid for aid in kept_attachments if aid in attachment_ids]
+  return kept_attachments
+
+
+def _GetEnumFieldValuesAndDocstrings(field_def, config):
+  # type: (proto.tracker_pb2.LabelDef, proto.tracker_pb2.ProjectIssueConfig) ->
+  #     Sequence[tuple(string, string)]
+  """Get sequence of value, docstring tuples for an enum field"""
+  label_defs = config.well_known_labels
+  lower_field_name = field_def.field_name.lower()
+  tuples = []
+  for ld in label_defs:
+    if (ld.label.lower().startswith(lower_field_name + '-') and
+        not ld.deprecated):
+      label_value = ld.label[len(lower_field_name) + 1:]
+      tuples.append((label_value, ld.label_docstring))
+    else:
+      continue
+  return tuples
+
+
+# _IssueChangesTuple is returned by ApplyAllIssueChanges() and is used to bundle
+# the updated issues. resulting amendments, and other information needed by the
+# called to process the changes in the DB and send notifications.
+_IssueChangesTuple = collections.namedtuple(
+    '_IssueChangesTuple', [
+        'issues_to_update_dict', 'merged_from_add_by_iid', 'amendments_by_iid',
+        'imp_amendments_by_iid', 'old_owners_by_iid', 'old_statuses_by_iid',
+        'old_components_by_iid', 'new_starrers_by_iid'
+    ])
+# type: (Mapping[int, Issue], DefaultDict[int, Sequence[int]],
+#     Mapping[int, Amendment], Mapping[int, Amendment], Mapping[int, int],
+#     Mapping[int, str], Mapping[int, Sequence[int]],
+#     Mapping[int, Sequence[int]])-> None
+
+
+def ApplyAllIssueChanges(cnxn, issue_delta_pairs, services):
+  # type: (MonorailConnection, Sequence[Tuple[Issue, IssueDelta]], Services) ->
+  #     IssueChangesTuple
+  """Modify the given issues with the given deltas and impacted issues in RAM.
+
+    Filter rules are not applied in this method.
+    This method implements phases 3 and 4 of the process for modifying issues.
+    See WorkEnv.ModifyIssues() for other phases and overall process.
+
+    Args:
+      cnxn: MonorailConnection object.
+      issue_delta_pairs: List of tuples that couple Issues with the IssueDeltas
+          that represent the updates we want to make to each Issue.
+      services: Services object for connection to backend services.
+
+    Returns:
+      An _IssueChangesTuple named tuple.
+  """
+  impacted_tracker = _IssueChangeImpactedIssues()
+  project_ids = {issue.project_id for issue, _delta in issue_delta_pairs}
+  configs_by_pid = services.config.GetProjectConfigs(cnxn, list(project_ids))
+
+  # Track issues which have been modified in RAM and will need to
+  # be updated in the DB.
+  issues_to_update_dict = {}
+
+  amendments_by_iid = {}
+  old_owners_by_iid = {}
+  old_statuses_by_iid = {}
+  old_components_by_iid = {}
+  # PHASE 3: Update the main issues in RAM (not indirectly, impacted issues).
+  for issue, delta in issue_delta_pairs:
+    # Cache old data that will be used by future computations.
+    old_owner = tracker_bizobj.GetOwnerId(issue)
+    old_status = tracker_bizobj.GetStatus(issue)
+    if delta.owner_id is not None and delta.owner_id != old_owner:
+      old_owners_by_iid[issue.issue_id] = old_owner
+    if delta.status is not None and delta.status != old_status:
+      old_statuses_by_iid[issue.issue_id] = old_status
+    new_components = set(issue.component_ids)
+    new_components.update(delta.comp_ids_add or [])
+    new_components.difference_update(delta.comp_ids_remove or [])
+    if set(issue.component_ids) != new_components:
+      old_components_by_iid[issue.issue_id] = issue.component_ids
+
+    impacted_tracker.TrackImpactedIssues(issue, delta)
+    config = configs_by_pid.get(issue.project_id)
+    amendments, _impacted_iids = tracker_bizobj.ApplyIssueDelta(
+        cnxn, services.issue, issue, delta, config)
+    if amendments:
+      issues_to_update_dict[issue.issue_id] = issue
+      amendments_by_iid[issue.issue_id] = amendments
+
+  # PHASE 4: Update impacted issues in RAM.
+  logging.info('Applying impacted issue changes: %r', impacted_tracker.__dict__)
+  imp_amendments_by_iid = {}
+  impacted_iids = impacted_tracker.ComputeAllImpactedIIDs()
+  new_starrers_by_iid = {}
+  for issue_id in impacted_iids:
+    # Changes made to an impacted issue should be on top of changes
+    # made to it in PHASE 3 where it might have been a 'main' issue.
+    issue = issues_to_update_dict.get(
+        issue_id, services.issue.GetIssue(cnxn, issue_id, use_cache=False))
+
+    # Apply impacted changes.
+    amendments, new_starrers = impacted_tracker.ApplyImpactedIssueChanges(
+        cnxn, issue, services)
+    if amendments:
+      imp_amendments_by_iid[issue.issue_id] = amendments
+      issues_to_update_dict[issue.issue_id] = issue
+      if new_starrers:
+        new_starrers_by_iid[issue.issue_id] = new_starrers
+
+  return _IssueChangesTuple(
+      issues_to_update_dict, impacted_tracker.merged_from_add,
+      amendments_by_iid, imp_amendments_by_iid, old_owners_by_iid,
+      old_statuses_by_iid, old_components_by_iid, new_starrers_by_iid)
+
+
+def UpdateClosedTimestamp(config, issue, old_effective_status):
+  # type: (proto.tracker_pb2.ProjectIssueConfig, proto.tracker_pb2.Issue, str)
+  #     -> None
+  """Sets or unsets the closed_timestamp based based on status changes.
+
+  If the status is changing from open to closed, the closed_timestamp is set to
+  the current time.
+
+  If the status is changing form closed to open, the close_timestamp is unset.
+
+  If the status is changing from one closed to another closed, or from one
+  open to another open, no operations are performed.
+
+  Args:
+    config: the project configuration
+    issue: the issue being updated (a protocol buffer)
+    old_effective_status: the old issue status string. E.g., 'New'
+
+  SIDE EFFECTS:
+    Updated issue in place with new closed timestamp.
+  """
+  old_effective_status = old_effective_status or ''
+  # open -> closed
+  if (MeansOpenInProject(old_effective_status, config) and
+      not MeansOpenInProject(tracker_bizobj.GetStatus(issue), config)):
+
+    issue.closed_timestamp = int(time.time())
+    return
+
+  # closed -> open
+  if (not MeansOpenInProject(old_effective_status, config) and
+      MeansOpenInProject(tracker_bizobj.GetStatus(issue), config)):
+
+    issue.reset('closed_timestamp')
+    return
+
+
+def GroupUniqueDeltaIssues(issue_delta_pairs):
+  # type: (Tuple[Issue, IssueDelta]) -> (
+  #     Sequence[IssueDelta], Sequence[Sequence[Issue]])
+  """Identifies unique IssueDeltas and groups Issues with identical IssueDeltas.
+
+    Args:
+      issue_delta_pairs: List of tuples that couple Issues with the IssueDeltas
+          that represent the updates we want to make to each Issue.
+
+    Returns:
+      (unique_deltas, issues_for_unique_deltas):
+      unique_deltas: List of unique IssueDeltas found in issue_delta_pairs.
+      issues_for_unique_deltas: List of Issue lists. Each Issue list
+              contains all the Issues that had identical IssueDeltas.
+              Each issues_for_unique_deltas[i] is the list of Issues
+              that had unique_deltas[i] as their IssueDeltas.
+  """
+  unique_deltas = []
+  issues_for_unique_deltas = []
+  for issue, delta in issue_delta_pairs:
+    try:
+      delta_index = unique_deltas.index(delta)
+      issues_for_unique_deltas[delta_index].append(issue)
+    except ValueError:
+      # delta is not in unique_deltas yet.
+      # Add delta to unique_deltas and add a new list of issues
+      # to issues_for_unique_deltas at the same index.
+      unique_deltas.append(delta)
+      issues_for_unique_deltas.append([issue])
+
+  return unique_deltas, issues_for_unique_deltas
+
+
+def _AssertNoConflictingDeltas(issue_delta_pairs, refs_dict, err_agg):
+  # type: (Sequence[Tuple[Issue, IssueDelta]], Mapping[int, str],
+  #     exceptions.ErrorAggregator) -> None
+  """Checks if any issue deltas conflict with each other or themselves.
+
+  Note: refs_dict should contain issue ref strings for all issues found
+      in issue_delta_pairs, including all issues found in
+      {blocked_on|blocking}_{add|remove}.
+  """
+  err_message = 'Changes for {} conflict for {}'
+
+  # Track all delta blocked_on_add and blocking_add in terms of
+  # 'blocking_add' so we can track when a {blocked_on|blocking}_remove
+  # is in conflict with some {blocked_on|blocking}_add.
+  blocking_add = collections.defaultdict(list)
+  for issue, delta in issue_delta_pairs:
+    blocking_add[issue.issue_id].extend(delta.blocking_add)
+
+    for imp_iid in delta.blocked_on_add:
+      blocking_add[imp_iid].append(issue.issue_id)
+
+  # Check *_remove for conflicts with tracking blocking_add.
+  for issue, delta in issue_delta_pairs:
+    added_iids = blocking_add[issue.issue_id]
+    # Get intersection of iids that are in `blocking_remove` and
+    # the tracked `blocking_add`.
+    conflict_iids = set(delta.blocking_remove) & set(added_iids)
+
+    # Get iids of `blocked_on_remove` that conflict with the
+    # tracked `blocking_add`.
+    for possible_conflict_iid in delta.blocked_on_remove:
+      if issue.issue_id in blocking_add[possible_conflict_iid]:
+        conflict_iids.add(possible_conflict_iid)
+
+    if conflict_iids:
+      refs_str = ', '.join([refs_dict[iid] for iid in conflict_iids])
+      err_agg.AddErrorMessage(err_message, refs_dict[issue.issue_id], refs_str)
+
+
+def PrepareIssueChanges(
+    cnxn,
+    issue_delta_pairs,
+    services,
+    attachment_uploads=None,
+    comment_content=None):
+  # type: (MonorailConnection, Sequence[Tuple[Issue, IssueDelta]], Services,
+  #     Optional[Sequence[framework_helpers.AttachmentUpload]], Optional[str])
+  #     -> Mapping[int, int]
+  """Clean the deltas and assert they are valid for each paired issue."""
+  _EnforceNonMergeStatusDeltas(cnxn, issue_delta_pairs, services)
+  _AssertIssueChangesValid(
+      cnxn, issue_delta_pairs, services, comment_content=comment_content)
+
+  if attachment_uploads:
+    return _EnforceAttachmentQuotaLimits(
+        cnxn, issue_delta_pairs, services, attachment_uploads)
+  return {}
+
+
+def _EnforceAttachmentQuotaLimits(
+    cnxn, issue_delta_pairs, services, attachment_uploads):
+  # type: (MonorailConnection, Sequence[Tuple[Issue, IssueDelta]], Services
+  #     Optional[Sequence[framework_helpers.AttachmentUpload]]
+  #     -> Mapping[int, int]
+  """Assert that the attachments don't exceed project quotas."""
+  issue_count_by_pid = collections.defaultdict(int)
+  for issue, _delta in issue_delta_pairs:
+    issue_count_by_pid[issue.project_id] += 1
+
+  projects_by_id = services.project.GetProjects(cnxn, issue_count_by_pid.keys())
+
+  new_bytes_by_pid = {}
+  with exceptions.ErrorAggregator(exceptions.OverAttachmentQuota) as err_agg:
+    for pid, count in issue_count_by_pid.items():
+      project = projects_by_id[pid]
+      try:
+        new_bytes_used = ComputeNewQuotaBytesUsed(
+            project, attachment_uploads * count)
+        new_bytes_by_pid[pid] = new_bytes_used
+      except exceptions.OverAttachmentQuota:
+        err_agg.AddErrorMessage(
+            'Attachment quota exceeded for project {}', project.project_name)
+  return new_bytes_by_pid
+
+
+def _AssertIssueChangesValid(
+    cnxn, issue_delta_pairs, services, comment_content=None):
+  # type: (MonorailConnection, Sequence[Tuple[Issue, IssueDelta]], Services,
+  #     Optional[str]) -> None
+  """Assert that the delta changes are valid for each paired issue.
+
+    Note: this method does not check if the changes trigger any FilterRule
+      `warnings` or `errors`.
+  """
+  project_ids = list(
+      {issue.project_id for (issue, _delta) in issue_delta_pairs})
+  projects_by_id = services.project.GetProjects(cnxn, project_ids)
+  configs_by_id = services.config.GetProjectConfigs(cnxn, project_ids)
+  refs_dict = {
+      iss.issue_id: '%s:%d' % (iss.project_name, iss.local_id)
+      for iss, _delta in issue_delta_pairs
+  }
+  # Add refs of deltas' blocking/blocked_on issues needed by
+  # _AssertNoConflictingDeltas.
+  relation_iids = set()
+  for _iss, delta in issue_delta_pairs:
+    relation_iids.update(
+        delta.blocked_on_remove + delta.blocking_remove + delta.blocked_on_add +
+        delta.blocking_add)
+  relation_issues_dict, misses = services.issue.GetIssuesDict(
+      cnxn, relation_iids)
+  if misses:
+    raise exceptions.NoSuchIssueException(
+        'Could not find issues with ids: %r' % misses)
+  for iid, iss in relation_issues_dict.items():
+    if iid not in refs_dict:
+      refs_dict[iid] = '%s:%d' % (iss.project_name, iss.local_id)
+
+  with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+    if (comment_content and
+        len(comment_content.strip()) > tracker_constants.MAX_COMMENT_CHARS):
+      err_agg.AddErrorMessage('Comment is too long.')
+
+    _AssertNoConflictingDeltas(issue_delta_pairs, refs_dict, err_agg)
+
+    for issue, delta in issue_delta_pairs:
+      project = projects_by_id.get(issue.project_id)
+      config = configs_by_id.get(issue.project_id)
+      issue_ref = refs_dict[issue.issue_id]
+
+      if (delta.merged_into is not None or
+          delta.merged_into_external is not None or delta.status is not None):
+        end_status = delta.status or issue.status
+        merged_options = [
+            delta.merged_into, delta.merged_into_external, issue.merged_into,
+            issue.merged_into_external
+        ]
+        end_merged_into = next(
+            (merge for merge in merged_options if merge is not None), None)
+
+        is_merge_status = end_status.lower() in [
+            status.lower() for status in config.statuses_offer_merge
+        ]
+
+        if ((is_merge_status and not end_merged_into) or
+            (not is_merge_status and end_merged_into)):
+          err_agg.AddErrorMessage(
+              '{}: MERGED type statuses must accompany mergedInto values.',
+              issue_ref)
+
+      if delta.merged_into and issue.issue_id == delta.merged_into:
+        err_agg.AddErrorMessage(
+            '{}: Cannot merge an issue into itself.', issue_ref)
+      if (issue.issue_id in set(
+          delta.blocked_on_add)) or (issue.issue_id in set(delta.blocking_add)):
+        err_agg.AddErrorMessage(
+            '{}: Cannot block an issue on itself.', issue_ref)
+      if (delta.owner_id is not None) and (delta.owner_id != issue.owner_id):
+        parsed_owner_valid, msg = IsValidIssueOwner(
+            cnxn, project, delta.owner_id, services)
+        if not parsed_owner_valid:
+          err_agg.AddErrorMessage('{}: {}', issue_ref, msg)
+      # Owner already check by IsValidIssueOwner
+      all_users = [uid for uid in delta.cc_ids_add]
+      field_users = [fv.user_id for fv in delta.field_vals_add if fv.user_id]
+      all_users.extend(field_users)
+      AssertUsersExist(cnxn, services, all_users, err_agg)
+      if (delta.summary and
+          len(delta.summary.strip()) > tracker_constants.MAX_SUMMARY_CHARS):
+        err_agg.AddErrorMessage('{}: Summary is too long.', issue_ref)
+      if delta.summary == '':
+        err_agg.AddErrorMessage('{}: Summary required.', issue_ref)
+      if delta.status == '':
+        err_agg.AddErrorMessage('{}: Status is required.', issue_ref)
+      # Do not pass in issue for validation, as issue is pre-update, and would
+      # result in being unable to edit issues in invalid states.
+      fvs_err_msgs = field_helpers.ValidateCustomFields(
+          cnxn, services, delta.field_vals_add, config, project)
+      if fvs_err_msgs:
+        err_agg.AddErrorMessage('{}: {}', issue_ref, '\n'.join(fvs_err_msgs))
+      # TODO(crbug.com/monorail/9156): Validate that we do not remove fields
+      # such that a required field becomes unset.
+
+
+def AssertUsersExist(cnxn, services, user_ids, err_agg):
+  # type: (MonorailConnection, Services, Sequence[int], ErrorAggregator) -> None
+  """Assert that all users exist.
+
+    Has the side-effect of adding error messages to the input ErrorAggregator.
+  """
+  users_dict = services.user.GetUsersByIDs(cnxn, user_ids, skip_missed=True)
+  found_ids = set(users_dict.keys())
+  missing = [user_id for user_id in user_ids if user_id not in found_ids]
+  for missing_user_id in missing:
+    err_agg.AddErrorMessage(
+        'users/{}: User does not exist.'.format(missing_user_id))
+
+
+def AssertValidIssueForCreate(cnxn, services, issue, description):
+  # type: (MonorailConnection, Services, Issue, str) -> None
+  """Assert that issue proto is valid for issue creation.
+
+  Args:
+    cnxn: A connection object to use services with.
+    services: An object containing services to use to look up relevant data.
+    issues: A PB containing the issue to validate.
+    description: The description for the issue.
+
+  Raises:
+    InputException if the issue is not valid.
+  """
+  project = services.project.GetProject(cnxn, issue.project_id)
+  config = services.config.GetProjectConfig(cnxn, issue.project_id)
+
+  with exceptions.ErrorAggregator(exceptions.InputException) as err_agg:
+    owner_is_valid, owner_err_msg = IsValidIssueOwner(
+        cnxn, project, issue.owner_id, services)
+    if not owner_is_valid:
+      err_agg.AddErrorMessage(owner_err_msg)
+    if not issue.summary.strip():
+      err_agg.AddErrorMessage('Summary is required')
+    if not description.strip():
+      err_agg.AddErrorMessage('Description is required')
+    if len(issue.summary) > tracker_constants.MAX_SUMMARY_CHARS:
+      err_agg.AddErrorMessage('Summary is too long')
+    if len(description) > tracker_constants.MAX_COMMENT_CHARS:
+      err_agg.AddErrorMessage('Description is too long')
+
+    # Check all users exist. Owner already check by IsValidIssueOwner.
+    all_users = [uid for uid in issue.cc_ids]
+    for av in issue.approval_values:
+      all_users.extend(av.approver_ids)
+    field_users = [fv.user_id for fv in issue.field_values if fv.user_id]
+    all_users.extend(field_users)
+    AssertUsersExist(cnxn, services, all_users, err_agg)
+
+    field_validity_errors = field_helpers.ValidateCustomFields(
+        cnxn, services, issue.field_values, config, project, issue=issue)
+    if field_validity_errors:
+      err_agg.AddErrorMessage("\n".join(field_validity_errors))
+    if not services.config.LookupStatusID(cnxn, issue.project_id, issue.status,
+                                          autocreate=False):
+      err_agg.AddErrorMessage('Undefined status: %s' % issue.status)
+    all_comp_ids = {
+        cd.component_id for cd in config.component_defs if not cd.deprecated
+    }
+    for comp_id in issue.component_ids:
+      if comp_id not in all_comp_ids:
+        err_agg.AddErrorMessage(
+            'Undefined or deprecated component with id: %d' % comp_id)
+
+
+def _ComputeNewCcsFromIssueMerge(merge_into_issue, source_issues):
+  # type: (Issue, Collection[Issue]) -> Collection[int]
+  """Compute ccs that should be added from source_issues to merge_into_issue."""
+
+  merge_into_restrictions = permissions.GetRestrictions(merge_into_issue)
+  new_cc_ids = set()
+  for issue in source_issues:
+    # We don't want to leak metadata like ccs of restricted issues.
+    # So we don't merge ccs from restricted source issues, unless their
+    # restrictions match the restrictions of the target.
+    if permissions.HasRestrictions(issue, perm='View'):
+      source_restrictions = permissions.GetRestrictions(issue)
+      if (issue.project_id != merge_into_issue.project_id or
+          set(source_restrictions) != set(merge_into_restrictions)):
+        continue
+
+    new_cc_ids.update(issue.cc_ids)
+    if issue.owner_id:
+      new_cc_ids.add(issue.owner_id)
+
+  return [cc_id for cc_id in new_cc_ids if cc_id not in merge_into_issue.cc_ids]
+
+
+def _EnforceNonMergeStatusDeltas(cnxn, issue_delta_pairs, services):
+  # type: (MonorailConnection, Sequence[Tuple[Issue, IssueDelta]], Services)
+  """Update deltas in RAM to remove merged if a MERGED status is removed."""
+  project_ids = list(
+      {issue.project_id for (issue, _delta) in issue_delta_pairs})
+  configs_by_id = services.config.GetProjectConfigs(cnxn, project_ids)
+  statuses_offer_merge_by_pid = {
+      pid:
+      [status.lower() for status in configs_by_id[pid].statuses_offer_merge]
+      for pid in project_ids
+  }
+
+  for issue, delta in issue_delta_pairs:
+    statuses_offer_merge = statuses_offer_merge_by_pid[issue.project_id]
+    # Remove merged_into and merged_into_external when a status is moved
+    # to a non-MERGED status ONLY if the delta does not have merged_into values
+    # If delta does change merged_into values, the request will fail from
+    # AssertIssueChangesValue().
+    if (delta.status and delta.status.lower() not in statuses_offer_merge and
+        delta.merged_into is None and delta.merged_into_external is None):
+      if issue.merged_into:
+        delta.merged_into = 0
+      elif issue.merged_into_external:
+        delta.merged_into_external = ''
+
+
+class _IssueChangeImpactedIssues():
+  """Class to track changes of issues impacted by updates to other issues."""
+
+  def __init__(self):
+
+    # Each of the dicts below should be used to track
+    # {impacted_issue_id: [issues being modified that impact the keyed issue]}.
+
+    # e.g. `blocking_remove` with {iid_1: [iid_2, iid_3]} means that
+    # `TrackImpactedIssues` has been called with a delta of
+    # IssueDelta(blocked_on_remove=[iid_1]) for both issue 2 and issue 3.
+    self.blocking_add = collections.defaultdict(list)
+    self.blocking_remove = collections.defaultdict(list)
+    self.blocked_on_add = collections.defaultdict(list)
+    self.blocked_on_remove = collections.defaultdict(list)
+    self.merged_from_add = collections.defaultdict(list)
+    self.merged_from_remove = collections.defaultdict(list)
+
+  def ComputeAllImpactedIIDs(self):
+    # type: () -> Collection[int]
+    """Computes the unique set of all impacted issue ids."""
+    return set(self.blocking_add.keys() + self.blocking_remove.keys() +
+               self.blocked_on_add.keys() + self.blocked_on_remove.keys() +
+               self.merged_from_add.keys() + self.merged_from_remove.keys())
+
+  def TrackImpactedIssues(self, issue, delta):
+    # type: (Issue, IssueDelta) -> None
+    """Track impacted issues from when `delta` is applied to `issue`.
+
+    Args:
+      issue: Issue that the delta will be applied to, but has not yet.
+      delta: IssueDelta representing the changes that will be made to
+        the issue.
+    """
+    for impacted_iid in delta.blocked_on_add:
+      self.blocking_add[impacted_iid].append(issue.issue_id)
+    for impacted_iid in delta.blocked_on_remove:
+      self.blocking_remove[impacted_iid].append(issue.issue_id)
+
+    for impacted_iid in delta.blocking_add:
+      self.blocked_on_add[impacted_iid].append(issue.issue_id)
+    for impacted_iid in delta.blocking_remove:
+      self.blocked_on_remove[impacted_iid].append(issue.issue_id)
+
+    if (delta.merged_into == framework_constants.NO_ISSUE_SPECIFIED and
+        issue.merged_into):
+      self.merged_from_remove[issue.merged_into].append(issue.issue_id)
+    elif delta.merged_into and issue.merged_into != delta.merged_into:
+      self.merged_from_add[delta.merged_into].append(issue.issue_id)
+      if issue.merged_into:
+        self.merged_from_remove[issue.merged_into].append(issue.issue_id)
+
+  def ApplyImpactedIssueChanges(self, cnxn, impacted_issue, services):
+    # type: (MonorailConnection, Issue, Services) ->
+    #     Tuple[Collection[Amendment], Sequence[int]]
+    """Apply the tracked changes in RAM for the given impacted issue.
+
+    Args:
+      cnxn: connection to SQL database.
+      impacted_issue: Issue PB that we are applying the changes to.
+      services: Services used to fetch info from DB or cache.
+
+    Returns:
+      All the amendments that represent the changes applied to the issue
+      and a list of the new issue starrers.
+
+    Side-effect:
+      The given impacted_issue will be updated in RAM.
+    """
+    issue_id = impacted_issue.issue_id
+
+    # Process changes for blocking/blocked_on issue changes.
+    amendments, _impacted_iids = tracker_bizobj.ApplyIssueBlockRelationChanges(
+        cnxn, impacted_issue, self.blocked_on_add[issue_id],
+        self.blocked_on_remove[issue_id], self.blocking_add[issue_id],
+        self.blocking_remove[issue_id], services.issue)
+
+    # Process changes in merged issues.
+    merged_from_add = self.merged_from_add.get(issue_id, [])
+    merged_from_remove = self.merged_from_remove.get(issue_id, [])
+
+    # Merge ccs into impacted_issue from all merged issues,
+    # compute new starrers, and set star_count.
+    new_starrers = []
+    if merged_from_add:
+      issues_dict, _misses = services.issue.GetIssuesDict(cnxn, merged_from_add)
+      merged_from_add_issues = issues_dict.values()
+      new_cc_ids = _ComputeNewCcsFromIssueMerge(
+          impacted_issue, merged_from_add_issues)
+      if new_cc_ids:
+        impacted_issue.cc_ids.extend(new_cc_ids)
+        amendments.append(
+            tracker_bizobj.MakeCcAmendment(new_cc_ids, []))
+      new_starrers = list(
+          GetNewIssueStarrers(cnxn, services, merged_from_add, issue_id))
+      if new_starrers:
+        impacted_issue.star_count += len(new_starrers)
+
+    if merged_from_add or merged_from_remove:
+      merged_from_add_refs = services.issue.LookupIssueRefs(
+          cnxn, merged_from_add).values()
+      merged_from_remove_refs = services.issue.LookupIssueRefs(
+          cnxn, merged_from_remove).values()
+      amendments.append(
+          tracker_bizobj.MakeMergedIntoAmendment(
+              merged_from_add_refs, merged_from_remove_refs,
+              default_project_name=impacted_issue.project_name))
+    return amendments, new_starrers
diff --git a/tracker/tracker_views.py b/tracker/tracker_views.py
new file mode 100644
index 0000000..0c54555
--- /dev/null
+++ b/tracker/tracker_views.py
@@ -0,0 +1,871 @@
+# 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
+
+"""View objects to help display tracker business objects in templates."""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+import collections
+import logging
+import re
+import time
+import urllib
+
+from google.appengine.api import app_identity
+import ezt
+
+from features import federated
+from framework import exceptions
+from framework import filecontent
+from framework import framework_bizobj
+from framework import framework_constants
+from framework import framework_helpers
+from framework import framework_views
+from framework import gcs_helpers
+from framework import permissions
+from framework import template_helpers
+from framework import timestr
+from framework import urls
+from proto import tracker_pb2
+from tracker import attachment_helpers
+from tracker import tracker_bizobj
+from tracker import tracker_constants
+from tracker import tracker_helpers
+
+
+class IssueView(template_helpers.PBProxy):
+  """Wrapper class that makes it easier to display an Issue via EZT."""
+
+  def __init__(self, issue, users_by_id, config):
+    """Store relevant values for later display by EZT.
+
+    Args:
+      issue: An Issue protocol buffer.
+      users_by_id: dict {user_id: UserViews} for all users mentioned in issue.
+      config: ProjectIssueConfig for this issue.
+    """
+    super(IssueView, self).__init__(issue)
+
+    # The users involved in this issue must be present in users_by_id if
+    # this IssueView is to be used on the issue detail or peek pages. But,
+    # they can be absent from users_by_id if the IssueView is used as a
+    # tile in the grid view.
+    self.owner = users_by_id.get(issue.owner_id)
+    self.derived_owner = users_by_id.get(issue.derived_owner_id)
+    self.cc = [users_by_id.get(cc_id) for cc_id in issue.cc_ids
+               if cc_id]
+    self.derived_cc = [users_by_id.get(cc_id)
+                       for cc_id in issue.derived_cc_ids
+                       if cc_id]
+    self.status = framework_views.StatusView(issue.status, config)
+    self.derived_status = framework_views.StatusView(
+        issue.derived_status, config)
+    # If we don't have a config available, we don't need to access is_open, so
+    # let it be True.
+    self.is_open = ezt.boolean(
+        not config or
+        tracker_helpers.MeansOpenInProject(
+            tracker_bizobj.GetStatus(issue), config))
+
+    self.components = sorted(
+        [ComponentValueView(component_id, config, False)
+         for component_id in issue.component_ids
+         if tracker_bizobj.FindComponentDefByID(component_id, config)] +
+        [ComponentValueView(component_id, config, True)
+         for component_id in issue.derived_component_ids
+         if tracker_bizobj.FindComponentDefByID(component_id, config)],
+        key=lambda cvv: cvv.path)
+
+    self.fields = MakeAllFieldValueViews(
+        config, issue.labels, issue.derived_labels, issue.field_values,
+        users_by_id)
+
+    labels, derived_labels = tracker_bizobj.ExplicitAndDerivedNonMaskedLabels(
+        issue.labels, issue.derived_labels, config)
+    self.labels = [
+        framework_views.LabelView(label, config)
+        for label in labels]
+    self.derived_labels = [
+        framework_views.LabelView(label, config)
+        for label in derived_labels]
+    self.restrictions = _RestrictionsView(issue)
+
+    # TODO(jrobbins): sort by order of labels in project config
+
+    self.short_summary = issue.summary[:tracker_constants.SHORT_SUMMARY_LENGTH]
+
+    if issue.closed_timestamp:
+      self.closed = timestr.FormatAbsoluteDate(issue.closed_timestamp)
+    else:
+      self.closed = ''
+
+    self.blocked_on = []
+    self.has_dangling = ezt.boolean(self.dangling_blocked_on_refs)
+    self.blocking = []
+
+    self.detail_relative_url = tracker_helpers.FormatRelativeIssueURL(
+        issue.project_name, urls.ISSUE_DETAIL, id=issue.local_id)
+    self.crbug_url = tracker_helpers.FormatCrBugURL(
+        issue.project_name, issue.local_id)
+
+
+class _RestrictionsView(object):
+  """An EZT object for the restrictions associated with an issue."""
+
+  # Restrict label fragments that correspond to known permissions.
+  _VIEW = permissions.VIEW.lower()
+  _EDIT = permissions.EDIT_ISSUE.lower()
+  _ADD_COMMENT = permissions.ADD_ISSUE_COMMENT.lower()
+  _KNOWN_ACTION_KINDS = {_VIEW, _EDIT, _ADD_COMMENT}
+
+  def __init__(self, issue):
+    # List of restrictions that don't map to a known action kind.
+    self.other = []
+
+    restrictions_by_action = collections.defaultdict(list)
+    # We can't use GetRestrictions here, as we prefer to preserve
+    # the case of the label when showing restrictions in the UI.
+    for label in tracker_bizobj.GetLabels(issue):
+      if permissions.IsRestrictLabel(label):
+        _kw, action_kind, needed_perm = label.split('-', 2)
+        action_kind = action_kind.lower()
+        if action_kind in self._KNOWN_ACTION_KINDS:
+          restrictions_by_action[action_kind].append(needed_perm)
+        else:
+          self.other.append(label)
+
+    self.view = ' and '.join(restrictions_by_action[self._VIEW])
+    self.add_comment = ' and '.join(restrictions_by_action[self._ADD_COMMENT])
+    self.edit = ' and '.join(restrictions_by_action[self._EDIT])
+
+    self.has_restrictions = ezt.boolean(
+        self.view or self.add_comment or self.edit or self.other)
+
+
+class IssueCommentView(template_helpers.PBProxy):
+  """Wrapper class that makes it easier to display an IssueComment via EZT."""
+
+  def __init__(
+      self, project_name, comment_pb, users_by_id, autolink,
+      all_referenced_artifacts, mr, issue, effective_ids=None):
+    """Get IssueComment PB and make its fields available as attrs.
+
+    Args:
+      project_name: Name of the project this issue belongs to.
+      comment_pb: Comment protocol buffer.
+      users_by_id: dict mapping user_ids to UserViews, including
+          the user that entered the comment, and any changed participants.
+      autolink: utility object for automatically linking to other
+        issues, git revisions, etc.
+      all_referenced_artifacts: opaque object with details of referenced
+        artifacts that is needed by autolink.
+      mr: common information parsed from the HTTP request.
+      issue: Issue PB for the issue that this comment is part of.
+      effective_ids: optional set of int user IDs for the comment author.
+    """
+    super(IssueCommentView, self).__init__(comment_pb)
+
+    self.id = comment_pb.id
+    self.creator = users_by_id[comment_pb.user_id]
+
+    # TODO(jrobbins): this should be based on the issue project, not the
+    # request project for non-project views and cross-project.
+    if mr.project:
+      self.creator_role = framework_helpers.GetRoleName(
+          effective_ids or {self.creator.user_id}, mr.project)
+    else:
+      self.creator_role = None
+
+    time_tuple = time.localtime(comment_pb.timestamp)
+    self.date_string = timestr.FormatAbsoluteDate(
+        comment_pb.timestamp, old_format=timestr.MONTH_DAY_YEAR_FMT)
+    self.date_relative = timestr.FormatRelativeDate(comment_pb.timestamp)
+    self.date_tooltip = time.asctime(time_tuple)
+    self.date_yyyymmdd = timestr.FormatAbsoluteDate(
+        comment_pb.timestamp, recent_format=timestr.MONTH_DAY_YEAR_FMT,
+        old_format=timestr.MONTH_DAY_YEAR_FMT)
+    self.text_runs = _ParseTextRuns(comment_pb.content)
+    if autolink and not comment_pb.deleted_by:
+      self.text_runs = autolink.MarkupAutolinks(
+          mr, self.text_runs, all_referenced_artifacts)
+
+    self.attachments = [AttachmentView(attachment, project_name)
+                        for attachment in comment_pb.attachments]
+    self.amendments = sorted([
+        AmendmentView(amendment, users_by_id, mr.project_name)
+        for amendment in comment_pb.amendments],
+        key=lambda amendment: amendment.field_name.lower())
+    # Treat comments from banned users as being deleted.
+    self.is_deleted = (comment_pb.deleted_by or
+                       (self.creator and self.creator.banned))
+    self.can_delete = False
+
+    # TODO(jrobbins): pass through config to get granted permissions.
+    perms = permissions.UpdateIssuePermissions(
+        mr.perms, mr.project, issue, mr.auth.effective_ids)
+    if mr.auth.user_id and mr.project:
+      self.can_delete = permissions.CanDeleteComment(
+          comment_pb, self.creator, mr.auth.user_id, perms)
+
+    self.visible = permissions.CanViewComment(
+        comment_pb, self.creator, mr.auth.user_id, perms)
+
+
+_TEMPLATE_TEXT_RE = re.compile('^(<b>[^<]+</b>)', re.MULTILINE)
+
+
+def _ParseTextRuns(content):
+  """Convert the user's comment to a list of TextRun objects."""
+  chunks = _TEMPLATE_TEXT_RE.split(content.strip())
+  runs = [_ChunkToRun(chunk) for chunk in chunks]
+  return runs
+
+
+def _ChunkToRun(chunk):
+  """Convert a substring of the user's comment to a TextRun object."""
+  if chunk.startswith('<b>') and chunk.endswith('</b>'):
+    return template_helpers.TextRun(chunk[3:-4], tag='b')
+  else:
+    return template_helpers.TextRun(chunk)
+
+
+class LogoView(template_helpers.PBProxy):
+  """Wrapper class to make it easier to display project logos via EZT."""
+
+  def __init__(self, project_pb):
+    super(LogoView, self).__init__(None)
+    if (not project_pb or
+        not project_pb.logo_gcs_id or
+        not project_pb.logo_file_name):
+      self.thumbnail_url = ''
+      self.viewurl = ''
+      return
+
+    bucket_name = app_identity.get_default_gcs_bucket_name()
+    gcs_object = project_pb.logo_gcs_id
+    self.filename = project_pb.logo_file_name
+    self.mimetype = filecontent.GuessContentTypeFromFilename(self.filename)
+
+    self.thumbnail_url = gcs_helpers.SignUrl(bucket_name,
+        gcs_object + '-thumbnail')
+    self.viewurl = (
+        gcs_helpers.SignUrl(bucket_name, gcs_object) + '&' + urllib.urlencode(
+            {'response-content-displacement':
+                ('attachment; filename=%s' % self.filename)}))
+
+
+class AttachmentView(template_helpers.PBProxy):
+  """Wrapper class to make it easier to display issue attachments via EZT."""
+
+  def __init__(self, attach_pb, project_name):
+    """Get IssueAttachmentContent PB and make its fields available as attrs.
+
+    Args:
+      attach_pb: Attachment part of IssueComment protocol buffer.
+      project_name: string Name of the current project.
+    """
+    super(AttachmentView, self).__init__(attach_pb)
+    self.filesizestr = template_helpers.BytesKbOrMb(attach_pb.filesize)
+    self.downloadurl = attachment_helpers.GetDownloadURL(
+        attach_pb.attachment_id)
+    self.url = attachment_helpers.GetViewURL(
+        attach_pb, self.downloadurl, project_name)
+    self.thumbnail_url = attachment_helpers.GetThumbnailURL(
+        attach_pb, self.downloadurl)
+    self.video_url = attachment_helpers.GetVideoURL(
+        attach_pb, self.downloadurl)
+
+    self.iconurl = '/images/paperclip.png'
+
+
+class AmendmentView(object):
+  """Wrapper class that makes it easier to display an Amendment via EZT."""
+
+  def __init__(self, amendment, users_by_id, project_name):
+    """Get the info from the PB and put it into easily accessible attrs.
+
+    Args:
+      amendment: Amendment part of an IssueComment protocol buffer.
+      users_by_id: dict mapping user_ids to UserViews.
+      project_name: Name of the project the issue/comment/amendment is in.
+    """
+    # TODO(jrobbins): take field-level restrictions into account.
+    # Including the case where user is not allowed to see any amendments.
+    self.field_name = tracker_bizobj.GetAmendmentFieldName(amendment)
+    self.newvalue = tracker_bizobj.AmendmentString(amendment, users_by_id)
+    self.values = tracker_bizobj.AmendmentLinks(
+        amendment, users_by_id, project_name)
+
+
+class ComponentDefView(template_helpers.PBProxy):
+  """Wrapper class to make it easier to display component definitions."""
+
+  def __init__(self, cnxn, services, component_def, users_by_id):
+    super(ComponentDefView, self).__init__(component_def)
+
+    c_path = component_def.path
+    if '>' in c_path:
+      self.parent_path = c_path[:c_path.rindex('>')]
+      self.leaf_name = c_path[c_path.rindex('>') + 1:]
+    else:
+      self.parent_path = ''
+      self.leaf_name = c_path
+
+    self.docstring_short = template_helpers.FitUnsafeText(
+        component_def.docstring, 200)
+
+    self.admins = [users_by_id.get(admin_id)
+                   for admin_id in component_def.admin_ids]
+    self.cc = [users_by_id.get(cc_id) for cc_id in component_def.cc_ids]
+    self.labels = [
+        services.config.LookupLabel(cnxn, component_def.project_id, label_id)
+        for label_id in component_def.label_ids]
+    self.classes = 'all '
+    if self.parent_path == '':
+      self.classes += 'toplevel '
+    self.classes += 'deprecated ' if component_def.deprecated else 'active '
+
+
+class ComponentValueView(object):
+  """Wrapper class that makes it easier to display a component value."""
+
+  def __init__(self, component_id, config, derived):
+    """Make the component name and docstring available as attrs.
+
+    Args:
+      component_id: int component_id to look up in the config
+      config: ProjectIssueConfig PB for the issue's project.
+      derived: True if this component was derived.
+    """
+    cd = tracker_bizobj.FindComponentDefByID(component_id, config)
+    self.path = cd.path
+    self.docstring = cd.docstring
+    self.docstring_short = template_helpers.FitUnsafeText(cd.docstring, 60)
+    self.derived = ezt.boolean(derived)
+
+
+class FieldValueView(object):
+  """Wrapper class that makes it easier to display a custom field value."""
+
+  def __init__(
+      self, fd, config, values, derived_values, issue_types, applicable=None,
+      phase_name=None):
+    """Make several values related to this field available as attrs.
+
+    Args:
+      fd: field definition to be displayed (or not, if no value).
+      config: ProjectIssueConfig PB for the issue's project.
+      values: list of explicit field values.
+      derived_values: list of derived field values.
+      issue_types: set of lowered string values from issues' "Type-*" labels.
+      applicable: optional boolean that overrides the rule that determines
+          when a field is applicable.
+      phase_name: name of the phase this field value belongs to.
+    """
+    self.field_def = FieldDefView(fd, config)
+    self.field_id = fd.field_id
+    self.field_name = fd.field_name
+    self.field_docstring = fd.docstring
+    self.field_docstring_short = template_helpers.FitUnsafeText(
+        fd.docstring, 60)
+    self.phase_name = phase_name or ""
+
+    self.values = values
+    self.derived_values = derived_values
+
+    self.applicable_type = fd.applicable_type
+    if applicable is not None:
+      self.applicable = ezt.boolean(applicable)
+    else:
+      # Note: We don't show approval types, approval sub fields, or
+      # phase fields in ezt issue pages.
+      if (fd.field_type == tracker_pb2.FieldTypes.APPROVAL_TYPE or
+          fd.approval_id or fd.is_phase_field):
+        self.applicable = ezt.boolean(False)
+      else:
+        # A field is applicable to a given issue if it (a) applies to all,
+        # issues or (b) already has a value on this issue, or (c) says that
+        # it applies to issues with this type (or a prefix of it).
+        applicable_type_lower = self.applicable_type.lower()
+        self.applicable = ezt.boolean(
+            not self.applicable_type or values or
+            any(type_label.startswith(applicable_type_lower)
+                for type_label in issue_types))
+      # TODO(jrobbins): also evaluate applicable_predicate
+
+    self.display = ezt.boolean(   # or fd.show_empty
+        self.values or self.derived_values or
+        (self.applicable and not fd.is_niche))
+
+    #FieldValueView does not handle determining if it's editable
+    #by the logged-in user. This can be determined by using
+    #permission.CanEditValueForFieldDef.
+    self.is_editable = ezt.boolean(True)
+
+
+def _PrecomputeInfoForValueViews(labels, derived_labels, field_values, config,
+                                 phases):
+  """Organize issue values into datastructures used to make FieldValueViews."""
+  field_values_by_id = collections.defaultdict(list)
+  for fv in field_values:
+    field_values_by_id[fv.field_id].append(fv)
+  lower_enum_field_names = [
+      fd.field_name.lower() for fd in config.field_defs
+      if fd.field_type == tracker_pb2.FieldTypes.ENUM_TYPE]
+  labels_by_prefix = tracker_bizobj.LabelsByPrefix(
+      labels, lower_enum_field_names)
+  der_labels_by_prefix = tracker_bizobj.LabelsByPrefix(
+      derived_labels, lower_enum_field_names)
+  label_docs = {wkl.label.lower(): wkl.label_docstring
+                for wkl in config.well_known_labels}
+  phases_by_name = collections.defaultdict(list)
+  # group issue phases by name
+  for phase in phases:
+    phases_by_name[phase.name.lower()].append(phase)
+  return (labels_by_prefix, der_labels_by_prefix, field_values_by_id,
+          label_docs, phases_by_name)
+
+
+def MakeAllFieldValueViews(
+    config, labels, derived_labels, field_values, users_by_id,
+    parent_approval_ids=None, phases=None):
+  """Return a list of FieldValues, each containing values from the issue.
+     A phase field value view will be created for each unique phase name found
+     in the given list a phases. Phase field value views will not be created
+     if the phases list is empty.
+  """
+  parent_approval_ids = parent_approval_ids or []
+  precomp_view_info = _PrecomputeInfoForValueViews(
+      labels, derived_labels, field_values, config, phases or [])
+  def GetApplicable(fd):
+    if fd.approval_id and fd.approval_id in parent_approval_ids:
+      return True
+    return None
+  field_value_views = [
+      _MakeFieldValueView(fd, config, precomp_view_info, users_by_id,
+                          applicable=GetApplicable(fd))
+      # TODO(jrobbins): field-level view restrictions, display options
+      for fd in config.field_defs
+      if not fd.is_deleted and not fd.is_phase_field]
+
+  # Make a phase field's view for each unique phase_name found in phases.
+  (_, _, _, _, phases_by_name) = precomp_view_info
+  for phase_name in phases_by_name.keys():
+    field_value_views.extend([
+        _MakeFieldValueView(
+            fd, config, precomp_view_info, users_by_id, phase_name=phase_name)
+        for fd in config.field_defs if fd.is_phase_field])
+
+  field_value_views = sorted(
+      field_value_views, key=lambda f: (f.applicable_type, f.field_name))
+  return field_value_views
+
+
+def _MakeFieldValueView(
+    fd, config, precomp_view_info, users_by_id, applicable=None,
+    phase_name=None):
+  """Return a FieldValueView with all values from the issue for that field."""
+  (labels_by_prefix, der_labels_by_prefix, field_values_by_id,
+   label_docs, phases_by_name) = precomp_view_info
+
+  field_name_lower = fd.field_name.lower()
+  values = []
+  derived_values = []
+
+  if fd.field_type == tracker_pb2.FieldTypes.ENUM_TYPE:
+    values = _ConvertLabelsToFieldValues(
+        labels_by_prefix.get(field_name_lower, []),
+        field_name_lower, label_docs)
+    derived_values = _ConvertLabelsToFieldValues(
+        der_labels_by_prefix.get(field_name_lower, []),
+        field_name_lower, label_docs)
+  else:
+    # Phases with the same name may have different phase_ids. Phases
+    # are defined during template creation and updating a template structure
+    # may result in new phase rows to be created while existing issues
+    # are referencing older phase rows.
+    phase_ids_for_phase_name = [
+        phase.phase_id for phase in phases_by_name.get(phase_name, [])]
+    # If a phase_name is given, we must filter field_values_by_id fvs to those
+    # that belong to the given phase. This is not done for labels
+    # because monorail does not support phase enum_type field values.
+    values = _MakeFieldValueItems(
+        [fv for fv in field_values_by_id.get(fd.field_id, [])
+         if not fv.derived and
+         (not phase_name or (fv.phase_id in phase_ids_for_phase_name))],
+        users_by_id)
+    derived_values = _MakeFieldValueItems(
+        [fv for fv in field_values_by_id.get(fd.field_id, [])
+         if fv.derived and
+         (not phase_name or (fv.phase_id in phase_ids_for_phase_name))],
+        users_by_id)
+
+  issue_types = (labels_by_prefix.get('type', []) +
+                 der_labels_by_prefix.get('type', []))
+  issue_types_lower = [it.lower() for it in issue_types]
+
+  return FieldValueView(fd, config, values, derived_values, issue_types_lower,
+                        applicable=applicable, phase_name=phase_name)
+
+
+def _MakeFieldValueItems(field_values, users_by_id):
+  """Make appropriate int, string, or user values in the given fields."""
+  result = []
+  for fv in field_values:
+    val = tracker_bizobj.GetFieldValue(fv, users_by_id)
+    result.append(template_helpers.EZTItem(
+        val=val, docstring=val, idx=len(result)))
+
+  return result
+
+
+def MakeBounceFieldValueViews(
+    field_vals, phase_field_vals, config, applicable_fields=None):
+  # type: (Sequence[proto.tracker_pb2.FieldValue],
+  #     Sequence[proto.tracker_pb2.FieldValue],
+  #     proto.tracker_pb2.ProjectIssueConfig
+  #     Sequence[proto.tracker_pb2.FieldDef]) -> Sequence[FieldValueView]
+  """Return a list of field values to display on a validation bounce page."""
+  applicable_set = set()
+  # Handle required fields
+  if applicable_fields:
+    for fd in applicable_fields:
+      applicable_set.add(fd.field_id)
+
+  field_value_views = []
+  for fd in config.field_defs:
+    if fd.field_id in field_vals:
+      # TODO(jrobbins): also bounce derived values.
+      val_items = [
+          template_helpers.EZTItem(val=v, docstring='', idx=idx)
+          for idx, v in enumerate(field_vals[fd.field_id])]
+      field_value_views.append(FieldValueView(
+          fd, config, val_items, [], None, applicable=True))
+    elif fd.field_id in phase_field_vals:
+      vals_by_phase_name = phase_field_vals.get(fd.field_id)
+      for phase_name, values in vals_by_phase_name.items():
+        val_items = [
+            template_helpers.EZTItem(val=v, docstring='', idx=idx)
+            for idx, v in enumerate(values)]
+        field_value_views.append(FieldValueView(
+            fd, config, val_items, [], None, applicable=False,
+            phase_name=phase_name))
+    elif fd.is_required and fd.field_id in applicable_set:
+      # Show required fields that have no value set.
+      field_value_views.append(
+          FieldValueView(fd, config, [], [], None, applicable=True))
+
+  return field_value_views
+
+
+def _ConvertLabelsToFieldValues(label_values, field_name_lower, label_docs):
+  """Iterate through the given labels and pull out values for the field.
+
+  Args:
+    label_values: a list of label strings for the given field.
+    field_name_lower: lowercase string name of the custom field.
+    label_docs: {lower_label: docstring} for well-known labels in the project.
+
+  Returns:
+    A list of EZT items with val and docstring fields.  One item is included
+    for each label that matches the given field name.
+  """
+  values = []
+  for idx, lab_val in enumerate(label_values):
+    full_label_lower = '%s-%s' % (field_name_lower, lab_val.lower())
+    values.append(template_helpers.EZTItem(
+        val=lab_val, docstring=label_docs.get(full_label_lower, ''), idx=idx))
+
+  return values
+
+
+class FieldDefView(template_helpers.PBProxy):
+  """Wrapper class to make it easier to display field definitions via EZT."""
+
+  def __init__(self, field_def, config, user_views=None, approval_def=None):
+    super(FieldDefView, self).__init__(field_def)
+
+    self.type_name = str(field_def.field_type)
+    self.field_def = field_def
+
+    self.choices = []
+    if field_def.field_type == tracker_pb2.FieldTypes.ENUM_TYPE:
+      self.choices = tracker_helpers.LabelsMaskedByFields(
+          config, [field_def.field_name], trim_prefix=True)
+
+    self.approvers = []
+    self.survey = ''
+    self.survey_questions = []
+    if (approval_def and
+        field_def.field_type == tracker_pb2.FieldTypes.APPROVAL_TYPE):
+      self.approvers = [user_views.get(approver_id) for
+                             approver_id in approval_def.approver_ids]
+      if approval_def.survey:
+        self.survey = approval_def.survey
+        self.survey_questions = self.survey.split('\n')
+
+
+    self.docstring_short = template_helpers.FitUnsafeText(
+        field_def.docstring, 200)
+    self.validate_help = None
+
+    if field_def.is_required:
+      self.importance = 'required'
+    elif field_def.is_niche:
+      self.importance = 'niche'
+    else:
+      self.importance = 'normal'
+
+    if field_def.min_value is not None:
+      self.min_value = field_def.min_value
+      self.validate_help = 'Value must be >= %d' % field_def.min_value
+    else:
+      self.min_value = None  # Otherwise it would default to 0
+
+    if field_def.max_value is not None:
+      self.max_value = field_def.max_value
+      self.validate_help = 'Value must be <= %d' % field_def.max_value
+    else:
+      self.max_value = None  # Otherwise it would default to 0
+
+    if field_def.min_value is not None and field_def.max_value is not None:
+      self.validate_help = 'Value must be between %d and %d' % (
+          field_def.min_value, field_def.max_value)
+
+    if field_def.regex:
+      self.validate_help = 'Value must match regex: %s' % field_def.regex
+
+    if field_def.needs_member:
+      self.validate_help = 'Value must be a project member'
+
+    if field_def.needs_perm:
+      self.validate_help = (
+          'Value must be a project member with permission %s' %
+          field_def.needs_perm)
+
+    self.date_action_str = str(field_def.date_action or 'no_action').lower()
+
+    self.admins = []
+    if user_views:
+      self.admins = [user_views.get(admin_id)
+                     for admin_id in field_def.admin_ids]
+
+    self.editors = []
+    if user_views:
+      self.editors = [
+          user_views.get(editor_id) for editor_id in field_def.editor_ids
+      ]
+
+    if field_def.approval_id:
+      self.is_approval_subfield = ezt.boolean(True)
+      self.parent_approval_name = tracker_bizobj.FindFieldDefByID(
+          field_def.approval_id, config).field_name
+    else:
+      self.is_approval_subfield = ezt.boolean(False)
+
+    self.is_phase_field = ezt.boolean(field_def.is_phase_field)
+    self.is_restricted_field = ezt.boolean(field_def.is_restricted_field)
+
+
+class IssueTemplateView(template_helpers.PBProxy):
+  """Wrapper class to make it easier to display an issue template via EZT."""
+
+  def __init__(self, mr, template, user_service, config):
+    super(IssueTemplateView, self).__init__(template)
+
+    self.ownername = ''
+    try:
+      self.owner_view = framework_views.MakeUserView(
+          mr.cnxn, user_service, template.owner_id)
+    except exceptions.NoSuchUserException:
+      self.owner_view = None
+    if self.owner_view:
+      self.ownername = self.owner_view.email
+
+    self.admin_views = list(framework_views.MakeAllUserViews(
+        mr.cnxn, user_service, template.admin_ids).values())
+    self.admin_names = ', '.join(sorted([
+        admin_view.email for admin_view in self.admin_views]))
+
+    self.summary_must_be_edited = ezt.boolean(template.summary_must_be_edited)
+    self.members_only = ezt.boolean(template.members_only)
+    self.owner_defaults_to_member = ezt.boolean(
+        template.owner_defaults_to_member)
+    self.component_required = ezt.boolean(template.component_required)
+
+    component_paths = []
+    for component_id in template.component_ids:
+      component_paths.append(
+          tracker_bizobj.FindComponentDefByID(component_id, config).path)
+    self.components = ', '.join(component_paths)
+
+    self.can_view = ezt.boolean(permissions.CanViewTemplate(
+        mr.auth.effective_ids, mr.perms, mr.project, template))
+    self.can_edit = ezt.boolean(permissions.CanEditTemplate(
+        mr.auth.effective_ids, mr.perms, mr.project, template))
+
+    field_name_set = {fd.field_name.lower() for fd in config.field_defs
+                      if fd.field_type is tracker_pb2.FieldTypes.ENUM_TYPE and
+                      not fd.is_deleted}  # TODO(jrobbins): restrictions
+    non_masked_labels = [
+        lab for lab in template.labels
+        if not tracker_bizobj.LabelIsMaskedByField(lab, field_name_set)]
+
+    for i, label in enumerate(non_masked_labels):
+      setattr(self, 'label%d' % i, label)
+    for i in range(len(non_masked_labels), framework_constants.MAX_LABELS):
+      setattr(self, 'label%d' % i, '')
+
+    field_user_views = MakeFieldUserViews(mr.cnxn, template, user_service)
+
+    self.field_values = []
+    for fv in template.field_values:
+      self.field_values.append(template_helpers.EZTItem(
+          field_id=fv.field_id,
+          val=tracker_bizobj.GetFieldValue(fv, field_user_views),
+          idx=len(self.field_values)))
+
+    self.complete_field_values = MakeAllFieldValueViews(
+        config, template.labels, [], template.field_values, field_user_views)
+
+    # Templates only display and edit the first value of multi-valued fields, so
+    # expose a single value, if any.
+    # TODO(jrobbins): Fully support multi-valued fields in templates.
+    for idx, field_value_view in enumerate(self.complete_field_values):
+      field_value_view.idx = idx
+      if field_value_view.values:
+        field_value_view.val = field_value_view.values[0].val
+      else:
+        field_value_view.val = None
+
+
+def MakeFieldUserViews(cnxn, template, user_service):
+  """Return {user_id: user_view} for users in template field values."""
+  field_user_ids = [
+      fv.user_id for fv in template.field_values
+      if fv.user_id]
+  field_user_views = framework_views.MakeAllUserViews(
+      cnxn, user_service, field_user_ids)
+  return field_user_views
+
+
+class ConfigView(template_helpers.PBProxy):
+  """Make it easy to display most fields of a ProjectIssueConfig in EZT."""
+
+  def __init__(self, mr, services, config, template=None,
+               load_all_templates=False):
+    """Gather data for the issue section of a project admin page.
+
+    Args:
+      mr: MonorailRequest, including a database connection, the current
+          project, and authenticated user IDs.
+      services: Persist services with ProjectService, ConfigService,
+          TemplateService and UserService included.
+      config: ProjectIssueConfig for the current project..
+      template (TemplateDef, optional): the current template.
+      load_all_templates (boolean): default False. If true loads self.templates.
+
+    Returns:
+      Project info in a dict suitable for EZT.
+    """
+    super(ConfigView, self).__init__(config)
+    self.open_statuses = []
+    self.closed_statuses = []
+    for wks in config.well_known_statuses:
+      item = template_helpers.EZTItem(
+          name=wks.status,
+          name_padded=wks.status.ljust(20),
+          commented='#' if wks.deprecated else '',
+          docstring=wks.status_docstring)
+      if tracker_helpers.MeansOpenInProject(wks.status, config):
+        self.open_statuses.append(item)
+      else:
+        self.closed_statuses.append(item)
+
+    is_member = framework_bizobj.UserIsInProject(
+        mr.project, mr.auth.effective_ids)
+    template_set = services.template.GetTemplateSetForProject(mr.cnxn,
+        config.project_id)
+
+    # Filter non-viewable templates
+    self.template_names = []
+    for _, template_name, members_only in template_set:
+      if members_only and not is_member:
+        continue
+      self.template_names.append(template_name)
+
+    if load_all_templates:
+      templates = services.template.GetProjectTemplates(mr.cnxn,
+          config.project_id)
+      self.templates = [
+          IssueTemplateView(mr, tmpl, services.user, config)
+          for tmpl in templates]
+      for index, template_view in enumerate(self.templates):
+        template_view.index = index
+
+    if template:
+      self.template_view = IssueTemplateView(mr, template, services.user,
+          config)
+
+    self.field_names = [  # TODO(jrobbins): field-level controls
+        fd.field_name for fd in config.field_defs if
+        fd.field_type is tracker_pb2.FieldTypes.ENUM_TYPE and
+        not fd.is_deleted]
+    self.issue_labels = tracker_helpers.LabelsNotMaskedByFields(
+        config, self.field_names)
+    self.excl_prefixes = [
+        prefix.lower() for prefix in config.exclusive_label_prefixes]
+    self.restrict_to_known = ezt.boolean(config.restrict_to_known)
+
+    self.default_col_spec = (
+        config.default_col_spec or tracker_constants.DEFAULT_COL_SPEC)
+
+
+def StatusDefsAsText(config):
+  """Return two strings for editing open and closed status definitions."""
+  open_lines = []
+  closed_lines = []
+  for wks in config.well_known_statuses:
+    line = '%s%s%s%s' % (
+      '#' if wks.deprecated else '',
+      wks.status.ljust(20),
+      '\t= ' if wks.status_docstring else '',
+      wks.status_docstring)
+
+    if tracker_helpers.MeansOpenInProject(wks.status, config):
+      open_lines.append(line)
+    else:
+      closed_lines.append(line)
+
+  open_text = '\n'.join(open_lines)
+  closed_text = '\n'.join(closed_lines)
+  logging.info('open_text is \n%s', open_text)
+  logging.info('closed_text is \n%s', closed_text)
+  return open_text, closed_text
+
+
+def LabelDefsAsText(config):
+  """Return a string for editing label definitions."""
+  field_names = [fd.field_name for fd in config.field_defs
+                 if fd.field_type is tracker_pb2.FieldTypes.ENUM_TYPE
+                 and not fd.is_deleted]
+  masked_labels = tracker_helpers.LabelsMaskedByFields(config, field_names)
+  masked_set = set(masked.name for masked in masked_labels)
+
+  label_def_lines = []
+  for wkl in config.well_known_labels:
+    if wkl.label in masked_set:
+      continue
+    line = '%s%s%s%s' % (
+      '#' if wkl.deprecated else '',
+      wkl.label.ljust(20),
+      '\t= ' if wkl.label_docstring else '',
+      wkl.label_docstring)
+    label_def_lines.append(line)
+
+  labels_text = '\n'.join(label_def_lines)
+  logging.info('labels_text is \n%s', labels_text)
+  return labels_text
diff --git a/tracker/webcomponentspage.py b/tracker/webcomponentspage.py
new file mode 100644
index 0000000..4e2ad0d
--- /dev/null
+++ b/tracker/webcomponentspage.py
@@ -0,0 +1,117 @@
+# Copyright 2018 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
+
+"""Classes that implement a web components page.
+
+Summary of classes:
+ WebComponentsPage: Show one web components page.
+"""
+from __future__ import print_function
+from __future__ import division
+from __future__ import absolute_import
+
+
+import logging
+
+import settings
+from framework import servlet
+from framework import framework_helpers
+from framework import permissions
+from framework import urls
+
+
+class WebComponentsPage(servlet.Servlet):
+
+  _PAGE_TEMPLATE = 'tracker/web-components-page.ezt'
+
+  def AssertBasePermission(self, mr):
+    # type: (MonorailRequest) -> None
+    """Check that the user has permission to visit this page."""
+    super(WebComponentsPage, self).AssertBasePermission(mr)
+
+  def GatherPageData(self, mr):
+    # type: (MonorailRequest) -> Mapping[str, Any]
+    """Build up a dictionary of data values to use when rendering the page.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    # Create link to view in old UI for the list view pages.
+    old_ui_url = None
+    url = mr.request.url
+    if '/hotlists/' in url:
+      hotlist = self.services.features.GetHotlist(mr.cnxn, mr.hotlist_id)
+      if '/people' in url:
+        old_ui_url = '/u/%s/hotlists/%s/people' % (
+            hotlist.owner_ids[0], hotlist.name)
+      elif '/settings' in url:
+        old_ui_url = '/u/%s/hotlists/%s/details' % (
+            hotlist.owner_ids[0], hotlist.name)
+      else:
+        old_ui_url = '/u/%s/hotlists/%s' % (hotlist.owner_ids[0], hotlist.name)
+
+    return {
+       'local_id': mr.local_id,
+       'old_ui_url': old_ui_url,
+      }
+
+
+class ProjectListPage(WebComponentsPage):
+
+  def GatherPageData(self, mr):
+    # type: (MonorailRequest) -> Mapping[str, Any]
+    """Build up a dictionary of data values to use when rendering the page.
+
+    May redirect the user to a default project if one is configured for
+    the current domain.
+
+    Args:
+      mr: commonly used info parsed from the request.
+
+    Returns:
+      Dict of values used by EZT for rendering the page.
+    """
+    redirect_msg = self._MaybeRedirectToDomainDefaultProject(mr)
+    logging.info(redirect_msg)
+    return {
+        'local_id': None,
+        'old_ui_url': '/hosting_old/',
+    }
+
+  def _MaybeRedirectToDomainDefaultProject(self, mr):
+    # type: (MonorailRequest) -> str
+    """If there is a relevant default project, redirect to it.
+
+      This function is copied from: sitewide/hostinghome.py
+
+      Args:
+        mr: commonly used info parsed from the request.
+
+      Returns:
+        String with a message about what happened for logging purposes.
+    """
+    project_name = settings.domain_to_default_project.get(mr.request.host)
+    if not project_name:
+      return 'No configured default project redirect for this domain.'
+
+    project = None
+    try:
+      project = self.services.project.GetProjectByName(mr.cnxn, project_name)
+    except exceptions.NoSuchProjectException:
+      pass
+
+    if not project:
+      return 'Domain default project %s not found' % project_name
+
+    if not permissions.UserCanViewProject(mr.auth.user_pb,
+                                          mr.auth.effective_ids, project):
+      return 'User cannot view default project: %r' % project
+
+    project_url = '/p/%s' % project_name
+    self.redirect(project_url, abort=True)
+    return 'Redirected to %r' % project_url
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..c7f3722
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,70 @@
+{
+  "compilerOptions": {
+    /* Visit https://aka.ms/tsconfig.json to read more about this file */
+
+    /* Basic Options */
+    // "incremental": true,                   /* Enable incremental compilation */
+    "target": "ES2018",                       /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
+    "module": "ES2020",                       /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
+    // "lib": [],                             /* Specify library files to be included in the compilation. */
+    "allowJs": true,                          /* Allow javascript files to be compiled. */
+    //"checkJs": true,                        /* Report errors in .js files. */
+    "jsx": "react",                           /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
+    // "declaration": true,                   /* Generates corresponding '.d.ts' file. */
+    // "declarationMap": true,                /* Generates a sourcemap for each corresponding '.d.ts' file. */
+    // "sourceMap": true,                     /* Generates corresponding '.map' file. */
+    // "outFile": "./",                       /* Concatenate and emit output to single file. */
+    // "outDir": "./",                        /* Redirect output structure to the directory. */
+    // "rootDir": "./",                       /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
+    // "composite": true,                     /* Enable project compilation */
+    // "tsBuildInfoFile": "./",               /* Specify file to store incremental compilation information */
+    // "removeComments": true,                /* Do not emit comments to output. */
+    // "noEmit": true,                        /* Do not emit outputs. */
+    // "importHelpers": true,                 /* Import emit helpers from 'tslib'. */
+    // "downlevelIteration": true,            /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
+    // "isolatedModules": true,               /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
+
+    /* Strict Type-Checking Options */
+    "strict": true,                           /* Enable all strict type-checking options. */
+    // "noImplicitAny": true,                 /* Raise error on expressions and declarations with an implied 'any' type. */
+    // "strictNullChecks": true,              /* Enable strict null checks. */
+    // "strictFunctionTypes": true,           /* Enable strict checking of function types. */
+    // "strictBindCallApply": true,           /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
+    // "strictPropertyInitialization": true,  /* Enable strict checking of property initialization in classes. */
+    // "noImplicitThis": true,                /* Raise error on 'this' expressions with an implied 'any' type. */
+    // "alwaysStrict": true,                  /* Parse in strict mode and emit "use strict" for each source file. */
+
+    /* Additional Checks */
+    // "noUnusedLocals": true,                /* Report errors on unused locals. */
+    // "noUnusedParameters": true,            /* Report errors on unused parameters. */
+    // "noImplicitReturns": true,             /* Report error when not all code paths in function return a value. */
+    // "noFallthroughCasesInSwitch": true,    /* Report errors for fallthrough cases in switch statement. */
+    // "noUncheckedIndexedAccess": true,      /* Include 'undefined' in index signature results */
+
+    /* Module Resolution Options */
+    "moduleResolution": "node",               /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
+    "baseUrl": "./static_src/",               /* Base directory to resolve non-absolute module names. */
+    // "paths": {},                           /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
+    // "rootDirs": [],                        /* List of root folders whose combined content represents the structure of the project at runtime. */
+    // "typeRoots": [],                       /* List of folders to include type definitions from. */
+    // "types": [],                           /* Type declaration files to be included in compilation. */
+    // "allowSyntheticDefaultImports": true,  /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
+    // "esModuleInterop": true,               /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
+    // "preserveSymlinks": true,              /* Do not resolve the real path of symlinks. */
+    // "allowUmdGlobalAccess": true,          /* Allow accessing UMD globals from modules. */
+
+    /* Source Map Options */
+    // "sourceRoot": "",                      /* Specify the location where debugger should locate TypeScript files instead of source locations. */
+    // "mapRoot": "",                         /* Specify the location where debugger should locate map files instead of generated locations. */
+    // "inlineSourceMap": true,               /* Emit a single file with source maps instead of having a separate file. */
+    // "inlineSources": true,                 /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
+
+    /* Experimental Options */
+    "experimentalDecorators": true,           /* Enables experimental support for ES7 decorators. */
+    // "emitDecoratorMetadata": true,         /* Enables experimental support for emitting type metadata for decorators. */
+
+    /* Advanced Options */
+    "skipLibCheck": true,                     /* Skip type checking of declaration files. */
+    "forceConsistentCasingInFileNames": true  /* Disallow inconsistently-cased references to the same file. */
+  }
+}
diff --git a/webpack.config.js b/webpack.config.js
new file mode 100644
index 0000000..a24aec6
--- /dev/null
+++ b/webpack.config.js
@@ -0,0 +1,124 @@
+/* Copyright 2019 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.
+ */
+
+const path = require('path');
+const webpack = require('webpack');
+const BundleAnalyzerPlugin =
+  require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
+const HtmlWebpackPlugin = require('html-webpack-plugin');
+const ScriptExtHtmlWebpackPlugin = require('script-ext-html-webpack-plugin');
+const CircularDependencyPlugin = require('circular-dependency-plugin');
+
+const config = {
+  entry: {
+    'mr-app': './static_src/elements/mr-app/mr-app.js',
+    'mr-profile-page':
+      './static_src/elements/chdir/mr-profile-page/mr-profile-page.js',
+    'ezt-element-package': './static_src/elements/ezt/ezt-element-package.js',
+    'ezt-footer-scripts-package':
+      './static_src/elements/ezt/ezt-footer-scripts-package.js',
+  },
+  devtool: 'eval-source-map',
+  plugins: [
+    new CircularDependencyPlugin({
+      // exclude detection of files based on a RegExp
+      exclude: /a\.js|node_modules/,
+      // add errors to webpack instead of warnings
+      failOnError: true,
+      // set the current working directory for displaying module paths
+      cwd: process.cwd(),
+    }),
+    new HtmlWebpackPlugin({
+      chunks: ['mr-app'],
+      template: 'static_src/webpacked-scripts-template.html',
+      filename: '../../templates/webpack-out/mr-app.ezt',
+    }),
+    new HtmlWebpackPlugin({
+      chunks: ['mr-profile-page'],
+      template: 'static_src/webpacked-scripts-template.html',
+      filename: '../../templates/webpack-out/mr-profile-page.ezt',
+    }),
+    new HtmlWebpackPlugin({
+      chunks: ['ezt-element-package'],
+      template: 'static_src/webpacked-scripts-template.html',
+      filename: '../../templates/webpack-out/ezt-element-package.ezt',
+    }),
+    new HtmlWebpackPlugin({
+      chunks: ['ezt-footer-scripts-package'],
+      template: 'static_src/webpacked-scripts-template.html',
+      filename: '../../templates/webpack-out/ezt-footer-scripts-package.ezt',
+    }),
+    new ScriptExtHtmlWebpackPlugin({
+      custom: [
+        {
+          test: /\.js$/,
+          attribute: 'nonce',
+          value: '[nonce]',
+        },
+        {
+          test: /\.js$/,
+          attribute: 'type',
+          value: 'module',
+        },
+      ],
+    }),
+  ],
+  module: {
+    rules: [
+      {
+        test: /\.(ts|tsx)$/,
+        exclude: /node_modules/,
+        use: ['babel-loader'],
+      },
+      {
+        test: /\.css$/i,
+        use: [
+          {loader: 'style-loader', options: {injectType: 'styleTag'}},
+          {
+            loader: 'css-loader',
+            options: {
+              modules: true,
+              importLoaders: 1,
+            },
+          },
+          'postcss-loader',
+        ],
+      },
+    ],
+  },
+  resolve: {
+    extensions: ['.js', '.ts', '.tsx'],
+    modules: ['node_modules', 'static_src'],
+  },
+  output: {
+    filename: '[name].[contenthash].min.js',
+    path: path.resolve(__dirname, 'static/dist'),
+    // __webpack_public_path__ is used to dynamically set the public path to
+    // the App Engine version URL.
+    publicPath: '/static/dist/',
+  },
+  externals: {
+    moment: 'moment',
+  },
+};
+
+module.exports = (env, argv) => {
+  if (argv.mode === 'production') {
+    // Settings for deploying JS to production.
+    config.devtool = 'source-map';
+
+    config.plugins = config.plugins.concat([
+      new webpack.DefinePlugin(
+          {'process.env.NODE_ENV': '"production"'},
+      ),
+    ]);
+  }
+
+  if (argv.analyze) {
+    config.plugins.push(new BundleAnalyzerPlugin());
+  }
+  return config;
+};
